'reschedule'/1 =
    %% Line 67
    fun (_cor0) ->
	case _cor0 of
	  <{%% Line 68
	    'state',%% Line 68
		    _rec13,_cor60,_cor61,_cor62,_cor63,_cor64}> when 'true' ->
	      %% Line 68
	      case _rec13 of
		%% Line 69
		<[]> when 'true' ->
		    do  %% Line 70
			call 'schedule_native':'leave'
			    ()
			%% Line 71
			receive
			  %% Line 72
			  <{'scheduler',Pid,'enter'}> when 'true' ->
			      do  %% Line 73
				  call 'schedule_native':'enter'
				      ()
				  let <_rec14> =
				      %% Line 75
				      [Pid|[]]
				  in  let <_rec15> =
					  %% Line 76
					  call 'lists':'delete'
					      (Pid, _cor60)
				      in  let <_cor8> =
					      %% Line 76
					      call 'erlang':'setelement'
						  (3, _cor0, _rec15)
					  in  let <_cor10> =
						  %% Line 75
						  call 'erlang':'setelement'
						      (2, _cor8, _rec14)
					      in  %% Line 74
						  apply 'reschedule'/1
						      (_cor10)
			  %% Line 77
			  <{'scheduler','stop',Ans}>
			      when try
				    let <_cor13> =
					case <> of
					  <>
					      when call 'erlang':'is_record'
						    (_cor0,
						     'state',
						     7) ->
					      'true'
					  <> when 'true' ->
					      'fail'
					end
				    in  let <_cor14> =
					    call 'erlang':'=:='
						(_cor13, 'true')
					in  let <_cor15> =
						call 'erlang':'element'
						    (3, _cor0)
					    in  let <_cor16> =
						    call 'erlang':'=='
							(_cor15, [])
						in  let <_cor17> =
							call 'erlang':'and'
							    (_cor14, _cor16)
						    in  let <_cor18> =
							    call 'erlang':'is_boolean'
								(_cor13)
							in  call 'erlang':'and'
								(_cor17, _cor18)
				of <Try> ->
				    Try
				catch <T,R> ->
				    'false' ->
			      do  %% Line 78
				  call 'schedule_native':'enter'
				      ()
				  let <_cor21> =
				      %% Line 80
				      call 'lists':'reverse'
					  (_cor61)
				  in  do  %% Line 79
					  call 'erlang':'!'
					      (_cor63, %% Line 80
						       {'scheduler',_cor21,Ans})
					  %% Line 81
					  call 'schedule_native':'yield'
					      ()
			  %% Line 82
			  <{'EXIT',Pid,Reason}>
			      when call 'erlang':'/='
				    (Reason,
				     'normal') ->
			      do  %% Line 83
				  call 'schedule_native':'enter'
				      ()
				  let <_cor26> =
				      %% Line 85
				      call 'lists':'reverse'
					  (_cor61)
				  in  do  %% Line 84
					  call 'erlang':'!'
					      (_cor63, %% Line 85
						       {'scheduler',_cor26,{'EXIT',Pid,Reason}})
					  %% Line 86
					  call 'schedule_native':'yield'
					      ()
			after 'infinity' ->
			  'true'
		%% Line 88
		<Pids> when 'true' ->
		    let <_cor130,L,N,NewSchedule> =
			%% Line 89
			case _cor62 of
			  %% Line 90
			  <[]> when 'true' ->
			      let <_cor31> =
				  %% Line 91
				  call 'erlang':'length'
				      (Pids)
			      in  let <N> =
				      %% Line 91
				      call 'random':'uniform'
					  (_cor31)
				  in  let <L> =
					  %% Line 92
					  call 'erlang':'length'
					      (Pids)
				      in  <%% Line 93
					   [],L,N,%% Line 93
						  []>
			  %% Line 94
			  <[{N,L}|NewSchedule]> when 'true' ->
			      %% Line 95
			      <'ok',L,N,NewSchedule>
			  ( <_cor35> when 'true' ->
				primop 'match_fail'
				    ({'case_clause',_cor35})
			    -| ['compiler_generated'] )
			end
		    in  %% Line 97
			case call 'erlang':'length'
				 (Pids) of
			  %% Line 98
			  <_cor109>
			      when call 'erlang':'=:='
				    (_cor109,
				     L) ->
			      let <Pid> =
				  %% Line 99
				  call 'lists':'nth'
				      (N, Pids)
			      in  do  %% Line 100
				      call 'erlang':'link'
					  (Pid)
				      do  %% Line 101
					  call 'erlang':'!'
					      (Pid, {'schedule','go'})
					  do  %% Line 102
					      call 'schedule_native':'yield'
						  ()
					      let <_rec23> =
						  %% Line 103
						  call 'lists':'delete'
						      (Pid, Pids)
					      in  let <_rec24> =
						      %% Line 104
						      [{N,L}|_cor61]
						  in  let <_cor43> =
							  %% Line 106
							  {'state',_rec23,_cor60,_rec24,NewSchedule,_cor63,Pid}
						      in  %% Line 103
							  apply 'scheduler'/1
							      (_cor43)
			  %% Line 107
			  <_cor117> when 'true' ->
			      let <_cor50> =
				  %% Line 109
				  call 'erlang':'length'
				      (Pids)
			      in  let <_cor49> =
				      %% Line 110
				      letrec
					  'lc$^0'/1 =
					      fun (_cor46) ->
						  case _cor46 of
						    <[Pid|_cor45]> when 'true' ->
							let <_cor47> =
							    apply 'rename_pid'/1
								(Pid)
							in  let <_cor48> =
								apply 'lc$^0'/1
								    (_cor45)
							    in  ( [_cor47|_cor48]
								  -| ['compiler_generated'] )
						    <[]> when 'true' ->
							[]
						    ( <_cor46> when 'true' ->
							  primop 'match_fail'
							      ({( 'function_clause'
								  -| [{'name',{'lc$^0',1}}] ),_cor46})
						      -| ['compiler_generated'] )
						  end
				      in  apply 'lc$^0'/1
					      (Pids)
				  in  let <Ans> =
					  %% Line 108
					  {'scheduler','wrong_number_of_ready_pids',%% Line 109
										    L,_cor50,_cor49}
				      in  let <_cor54> =
					      %% Line 113
					      call 'lists':'reverse'
						  (_cor61)
					  in  do  %% Line 112
						  call 'erlang':'!'
						      (_cor63, %% Line 113
							       {'scheduler',_cor54,Ans})
						  do  %% Line 114
						      call 'schedule_native':'yield'
							  ()
						      %% Line 115
						      call 'erlang':'exit'
							  (Ans)
			end
	      end
	  <_cor65> when 'true' ->
	      call 'erlang':'error'
		  ({'badrecord','state'})
	end