@sml_check_flag=external local_unnamed_addr global i32
@_SMLZN16SMLSharp__Runtime3BugE=external local_unnamed_addr global i8*
@a=private unnamed_addr constant<{[4x i8],i32,i8*,void(...)*,void(...)*,i32}><{[4x i8]zeroinitializer,i32 -805306344,i8*null,void(...)*bitcast(i32(i8*)*@_SMLFN18SMLSharp__OSProcess6systemE to void(...)*),void(...)*bitcast(i8*(i8*,i8*)*@_SMLLN18SMLSharp__OSProcess6systemE_90 to void(...)*),i32 -2147483647}>,align 8
@b=private unnamed_addr constant<{[4x i8],i32,[49x i8]}><{[4x i8]zeroinitializer,i32 -2147483599,[49x i8]c"src/basis/main/SMLSharp_OSProcess.sml:48.13(970)\00"}>,align 8
@c=private unnamed_addr constant<{[4x i8],i32,[21x i8]}><{[4x i8]zeroinitializer,i32 -2147483627,[21x i8]c"OS.Process.terminate\00"}>,align 8
@d=private unnamed_addr constant<{[4x i8],i32,i8*,void(...)*,void(...)*,i32}><{[4x i8]zeroinitializer,i32 -805306344,i8*null,void(...)*bitcast(void(i8*)*@_SMLFN18SMLSharp__OSProcess5sleepE to void(...)*),void(...)*bitcast(i8*(i8*,i8*)*@_SMLLN18SMLSharp__OSProcess5sleepE_93 to void(...)*),i32 -2147483647}>,align 8
@_SMLDN18SMLSharp__OSProcess8cleanupsE_56=private global<{[4x i8],i32,i8*}><{[4x i8]zeroinitializer,i32 -1342177272,i8*null}>,align 8
@e=private unnamed_addr constant<{[4x i8],i32,i8*,void(...)*,void(...)*,i32}><{[4x i8]zeroinitializer,i32 -805306344,i8*null,void(...)*bitcast(void(i8*)*@_SMLFN18SMLSharp__OSProcess6atExitE to void(...)*),void(...)*bitcast(i8*(i8*,i8*)*@_SMLLN18SMLSharp__OSProcess6atExitE_97 to void(...)*),i32 -2147483647}>,align 8
@f=private unnamed_addr constant<{[4x i8],i32,i8*,void(...)*,void(...)*,i32}><{[4x i8]zeroinitializer,i32 -805306344,i8*null,void(...)*bitcast(i8*(i8*)*@_SMLFN18SMLSharp__OSProcess7atExit_GE to void(...)*),void(...)*bitcast(i8*(i8*,i8*)*@_SMLLN18SMLSharp__OSProcess7atExit_GE_98 to void(...)*),i32 -2147483647}>,align 8
@g=private unnamed_addr constant<{[4x i8],i32,[51x i8]}><{[4x i8]zeroinitializer,i32 -2147483597,[51x i8]c"src/basis/main/SMLSharp_OSProcess.sml:102.18(2298)\00"}>,align 8
@h=private unnamed_addr constant<{[4x i8],i32,[28x i8]}><{[4x i8]zeroinitializer,i32 -2147483620,[28x i8]c"cancelAtExit: tag not found\00"}>,align 8
@i=private unnamed_addr constant<{[4x i8],i32,i8*,void(...)*,void(...)*,i32}><{[4x i8]zeroinitializer,i32 -805306344,i8*null,void(...)*bitcast(void(i8*)*@_SMLFN18SMLSharp__OSProcess12cancelAtExitE to void(...)*),void(...)*bitcast(i8*(i8*,i8*)*@_SMLLN18SMLSharp__OSProcess12cancelAtExitE_100 to void(...)*),i32 -2147483647}>,align 8
@_SMLZN18SMLSharp__OSProcess7successE=local_unnamed_addr constant i32 0
@_SMLZN18SMLSharp__OSProcess7failureE=local_unnamed_addr constant i32 1
@j=private unnamed_addr constant<{[4x i8],i32,i8*,void(...)*,void(...)*,i32}><{[4x i8]zeroinitializer,i32 -805306344,i8*null,void(...)*bitcast(i32(i32)*@_SMLFN18SMLSharp__OSProcess9isSuccessE to void(...)*),void(...)*bitcast(i8*(i8*,i8*)*@_SMLLN18SMLSharp__OSProcess9isSuccessE_101 to void(...)*),i32 -2147483647}>,align 8
@_SMLZN18SMLSharp__OSProcess9isSuccessE=local_unnamed_addr constant i8*bitcast(i8**getelementptr inbounds(<{[4x i8],i32,i8*,void(...)*,void(...)*,i32}>,<{[4x i8],i32,i8*,void(...)*,void(...)*,i32}>*@j,i64 0,i32 2)to i8*)
@_SMLZN18SMLSharp__OSProcess6systemE=local_unnamed_addr constant i8*bitcast(i8**getelementptr inbounds(<{[4x i8],i32,i8*,void(...)*,void(...)*,i32}>,<{[4x i8],i32,i8*,void(...)*,void(...)*,i32}>*@a,i64 0,i32 2)to i8*)
@_SMLZN18SMLSharp__OSProcess6atExitE=local_unnamed_addr constant i8*bitcast(i8**getelementptr inbounds(<{[4x i8],i32,i8*,void(...)*,void(...)*,i32}>,<{[4x i8],i32,i8*,void(...)*,void(...)*,i32}>*@e,i64 0,i32 2)to i8*)
@k=private unnamed_addr constant<{[4x i8],i32,i8*,void(...)*,void(...)*,i32}><{[4x i8]zeroinitializer,i32 -805306344,i8*null,void(...)*bitcast(i8*(i32,i32)*@_SMLFN18SMLSharp__OSProcess4exitE to void(...)*),void(...)*bitcast(i8*(i8*,i8*,i8*)*@_SMLLN18SMLSharp__OSProcess4exitE_103 to void(...)*),i32 -2147483647}>,align 8
@_SMLZN18SMLSharp__OSProcess4exitE=local_unnamed_addr constant i8*bitcast(i8**getelementptr inbounds(<{[4x i8],i32,i8*,void(...)*,void(...)*,i32}>,<{[4x i8],i32,i8*,void(...)*,void(...)*,i32}>*@k,i64 0,i32 2)to i8*)
@l=private unnamed_addr constant<{[4x i8],i32,i8*,void(...)*,void(...)*,i32}><{[4x i8]zeroinitializer,i32 -805306344,i8*null,void(...)*bitcast(i8*(i32,i32)*@_SMLFN18SMLSharp__OSProcess9terminateE to void(...)*),void(...)*bitcast(i8*(i8*,i8*,i8*)*@_SMLLN18SMLSharp__OSProcess9terminateE_105 to void(...)*),i32 -2147483647}>,align 8
@_SMLZN18SMLSharp__OSProcess9terminateE=local_unnamed_addr constant i8*bitcast(i8**getelementptr inbounds(<{[4x i8],i32,i8*,void(...)*,void(...)*,i32}>,<{[4x i8],i32,i8*,void(...)*,void(...)*,i32}>*@l,i64 0,i32 2)to i8*)
@m=private unnamed_addr constant<{[4x i8],i32,i8*,void(...)*,void(...)*,i32}><{[4x i8]zeroinitializer,i32 -805306344,i8*null,void(...)*bitcast(i8*(i8*)*@_SMLFN18SMLSharp__OSProcess6getEnvE to void(...)*),void(...)*bitcast(i8*(i8*,i8*)*@_SMLLN18SMLSharp__OSProcess6getEnvE_106 to void(...)*),i32 -2147483647}>,align 8
@_SMLZN18SMLSharp__OSProcess6getEnvE=local_unnamed_addr constant i8*bitcast(i8**getelementptr inbounds(<{[4x i8],i32,i8*,void(...)*,void(...)*,i32}>,<{[4x i8],i32,i8*,void(...)*,void(...)*,i32}>*@m,i64 0,i32 2)to i8*)
@_SMLZN18SMLSharp__OSProcess5sleepE=local_unnamed_addr constant i8*bitcast(i8**getelementptr inbounds(<{[4x i8],i32,i8*,void(...)*,void(...)*,i32}>,<{[4x i8],i32,i8*,void(...)*,void(...)*,i32}>*@d,i64 0,i32 2)to i8*)
@_SMLZN18SMLSharp__OSProcess7atExit_GE=local_unnamed_addr constant i8*bitcast(i8**getelementptr inbounds(<{[4x i8],i32,i8*,void(...)*,void(...)*,i32}>,<{[4x i8],i32,i8*,void(...)*,void(...)*,i32}>*@f,i64 0,i32 2)to i8*)
@_SMLZN18SMLSharp__OSProcess12cancelAtExitE=local_unnamed_addr constant i8*bitcast(i8**getelementptr inbounds(<{[4x i8],i32,i8*,void(...)*,void(...)*,i32}>,<{[4x i8],i32,i8*,void(...)*,void(...)*,i32}>*@i,i64 0,i32 2)to i8*)
@n=private unnamed_addr constant<{[4x i8],i32,i8*,void(...)*,void(...)*,i32}><{[4x i8]zeroinitializer,i32 -805306344,i8*null,void(...)*bitcast(void(i8*)*@_SMLFN18SMLSharp__OSProcess12rebindAtExitE to void(...)*),void(...)*bitcast(i8*(i8*,i8*)*@_SMLLN18SMLSharp__OSProcess12rebindAtExitE_107 to void(...)*),i32 -2147483647}>,align 8
@_SMLZN18SMLSharp__OSProcess12rebindAtExitE=local_unnamed_addr constant i8*bitcast(i8**getelementptr inbounds(<{[4x i8],i32,i8*,void(...)*,void(...)*,i32}>,<{[4x i8],i32,i8*,void(...)*,void(...)*,i32}>*@n,i64 0,i32 2)to i8*)
@o=private unnamed_addr global[2x i64][i64 1,i64 sub(i64 ptrtoint(i8*getelementptr inbounds(i8,i8*getelementptr inbounds(<{[4x i8],i32,i8*}>,<{[4x i8],i32,i8*}>*@_SMLDN18SMLSharp__OSProcess8cleanupsE_56,i32 0,i32 0,i32 0),i32 8)to i64),i64 ptrtoint([2x i64]*@o to i64))]
@_SML_ftab19a59bcdb325454c_SMLSharp_OSProcess=external global i8
@p=private unnamed_addr global i8 0
declare i8*@getenv(i8*)local_unnamed_addr#0
declare void@llvm.gcroot(i8**,i8*)#0
declare void@prim_GenericOS_exit(i32)local_unnamed_addr
declare i32@sleep(i32)local_unnamed_addr
declare i8*@sml_alloc(i32 inreg)local_unnamed_addr#0
declare void@sml_check(i32 inreg)local_unnamed_addr
declare void@sml_enter()local_unnamed_addr#0
declare void@sml_gcroot(i8*,void()*,i8*,i8*)local_unnamed_addr#0
declare void@sml_leave()local_unnamed_addr#0
declare i32@sml_obj_equal(i8*inreg,i8*inreg)local_unnamed_addr#0
declare i32@sml_personality(...)#0
declare void@sml_raise(i8*inreg)local_unnamed_addr#1
declare i8*@sml_unsave_exn(i8*inreg)local_unnamed_addr#0
declare void@sml_write(i8*inreg,i8**inreg,i8*inreg)local_unnamed_addr#0
declare i32@system(i8*)local_unnamed_addr
declare i8*@_SMLFN16SMLSharp__Runtime14str__new__optionE(i64 inreg)local_unnamed_addr#2 gc"smlsharp"
declare i8*@_SMLFN16SMLSharp__Runtime9OS__SysErrE(i32 inreg)local_unnamed_addr#2 gc"smlsharp"
declare i8*@_SMLFN4Time9toSecondsE(i8*inreg)local_unnamed_addr#2 gc"smlsharp"
declare i32@_SMLFN6IntInf4signE(i8*inreg)local_unnamed_addr#2 gc"smlsharp"
declare i32@_SMLFN6Word3212fromLargeIntE(i8*inreg)local_unnamed_addr#2 gc"smlsharp"
declare void@_SML_main5d4c3ea7bd6f9540_IntInf()local_unnamed_addr#2 gc"smlsharp"
declare void@_SML_main00d884c96265bfea_SMLSharp_Runtime()local_unnamed_addr#2 gc"smlsharp"
declare void@_SML_main23870d5de35409ab_Time()local_unnamed_addr#2 gc"smlsharp"
declare void@_SML_mainf19563e8df97169c_Word32()local_unnamed_addr#2 gc"smlsharp"
declare void@_SML_load5d4c3ea7bd6f9540_IntInf(i8*)local_unnamed_addr
declare void@_SML_load00d884c96265bfea_SMLSharp_Runtime(i8*)local_unnamed_addr
declare void@_SML_load23870d5de35409ab_Time(i8*)local_unnamed_addr
declare void@_SML_loadf19563e8df97169c_Word32(i8*)local_unnamed_addr
define private void@_SML_tabb19a59bcdb325454c_SMLSharp_OSProcess()#3{
unreachable
}
define void@_SML_load19a59bcdb325454c_SMLSharp_OSProcess(i8*%a)local_unnamed_addr#0{
%b=load i8,i8*@p,align 1
%c=icmp eq i8%b,0
br i1%c,label%e,label%d
d:
ret void
e:
store i8 1,i8*@p,align 1
tail call void@_SML_load5d4c3ea7bd6f9540_IntInf(i8*%a)#0
tail call void@_SML_load00d884c96265bfea_SMLSharp_Runtime(i8*%a)#0
tail call void@_SML_load23870d5de35409ab_Time(i8*%a)#0
tail call void@_SML_loadf19563e8df97169c_Word32(i8*%a)#0
tail call void@sml_gcroot(i8*%a,void()*@_SML_tabb19a59bcdb325454c_SMLSharp_OSProcess,i8*@_SML_ftab19a59bcdb325454c_SMLSharp_OSProcess,i8*bitcast([2x i64]*@o to i8*))#0
ret void
}
define void@_SML_main19a59bcdb325454c_SMLSharp_OSProcess()local_unnamed_addr#2 gc"smlsharp"{
%a=load i8,i8*@p,align 1
%b=and i8%a,2
%c=icmp eq i8%b,0
br i1%c,label%e,label%d
d:
ret void
e:
store i8 3,i8*@p,align 1
tail call void@_SML_main5d4c3ea7bd6f9540_IntInf()#2
tail call void@_SML_main00d884c96265bfea_SMLSharp_Runtime()#2
tail call void@_SML_main23870d5de35409ab_Time()#2
tail call void@_SML_mainf19563e8df97169c_Word32()#2
br label%d
}
define fastcc i32@_SMLFN18SMLSharp__OSProcess6systemE(i8*inreg%a)#2 gc"smlsharp"personality i32(...)*@sml_personality{
i:
%b=alloca i8*,align 8
call void@llvm.gcroot(i8**%b,i8*null)#0
store i8*%a,i8**%b,align 8
%c=load atomic i32,i32*@sml_check_flag unordered,align 4
%d=icmp eq i32%c,0
br i1%d,label%g,label%e
e:
call void@sml_check(i32 inreg%c)
%f=load i8*,i8**%b,align 8
br label%g
g:
%h=phi i8*[%f,%e],[%a,%i]
call void@sml_leave()#0
%j=invoke i32@system(i8*%h)
to label%k unwind label%w
k:
call void@sml_enter()#0
store i8*null,i8**%b,align 8
%l=icmp sgt i32%j,-1
br i1%l,label%v,label%m
m:
%n=call fastcc i8*@_SMLFN16SMLSharp__Runtime9OS__SysErrE(i32 inreg 0)
store i8*%n,i8**%b,align 8
%o=call i8*@sml_alloc(i32 inreg 60)#0
%p=getelementptr inbounds i8,i8*%o,i64 -4
%q=bitcast i8*%p to i32*
store i32 1342177336,i32*%q,align 4
%r=getelementptr inbounds i8,i8*%o,i64 56
%s=bitcast i8*%r to i32*
store i32 1,i32*%s,align 4
%t=load i8*,i8**%b,align 8
%u=bitcast i8*%o to i8**
store i8*%t,i8**%u,align 8
call void@sml_raise(i8*inreg%o)#1
unreachable
v:
ret i32%j
w:
%x=landingpad{i8*,i8*}
cleanup
%y=extractvalue{i8*,i8*}%x,1
call void@sml_enter()#0
%z=call i8*@sml_unsave_exn(i8*inreg%y)#0
resume{i8*,i8*}%x
}
define internal fastcc i8*@_SMLLN18SMLSharp__OSProcess9terminateE_49(i32 inreg%a)unnamed_addr#4 gc"smlsharp"personality i32(...)*@sml_personality{
%b=alloca i8*,align 8
%c=alloca i8*,align 8
call void@llvm.gcroot(i8**%b,i8*null)#0
call void@llvm.gcroot(i8**%c,i8*null)#0
%d=load atomic i32,i32*@sml_check_flag unordered,align 4
%e=icmp eq i32%d,0
br i1%e,label%g,label%f
f:
call void@sml_check(i32 inreg%d)
br label%g
g:
call void@sml_leave()#0
invoke void@prim_GenericOS_exit(i32%a)
to label%h unwind label%B
h:
call void@sml_enter()#0
%i=load i8*,i8**@_SMLZN16SMLSharp__Runtime3BugE,align 8
store i8*%i,i8**%b,align 8
%j=call i8*@sml_alloc(i32 inreg 28)#0
%k=getelementptr inbounds i8,i8*%j,i64 -4
%l=bitcast i8*%k to i32*
store i32 1342177304,i32*%l,align 4
store i8*%j,i8**%c,align 8
%m=load i8*,i8**%b,align 8
store i8*null,i8**%b,align 8
%n=bitcast i8*%j to i8**
store i8*%m,i8**%n,align 8
%o=getelementptr inbounds i8,i8*%j,i64 8
%p=bitcast i8*%o to i8**
store i8*getelementptr inbounds(<{[4x i8],i32,[49x i8]}>,<{[4x i8],i32,[49x i8]}>*@b,i64 0,i32 2,i64 0),i8**%p,align 8
%q=getelementptr inbounds i8,i8*%j,i64 16
%r=bitcast i8*%q to i8**
store i8*getelementptr inbounds(<{[4x i8],i32,[21x i8]}>,<{[4x i8],i32,[21x i8]}>*@c,i64 0,i32 2,i64 0),i8**%r,align 8
%s=getelementptr inbounds i8,i8*%j,i64 24
%t=bitcast i8*%s to i32*
store i32 7,i32*%t,align 4
%u=call i8*@sml_alloc(i32 inreg 60)#0
%v=getelementptr inbounds i8,i8*%u,i64 -4
%w=bitcast i8*%v to i32*
store i32 1342177336,i32*%w,align 4
%x=getelementptr inbounds i8,i8*%u,i64 56
%y=bitcast i8*%x to i32*
store i32 1,i32*%y,align 4
%z=load i8*,i8**%c,align 8
%A=bitcast i8*%u to i8**
store i8*%z,i8**%A,align 8
call void@sml_raise(i8*inreg%u)#1
unreachable
B:
%C=landingpad{i8*,i8*}
cleanup
%D=extractvalue{i8*,i8*}%C,1
call void@sml_enter()#0
%E=call i8*@sml_unsave_exn(i8*inreg%D)#0
resume{i8*,i8*}%C
}
define fastcc void@_SMLFN18SMLSharp__OSProcess5sleepE(i8*inreg%a)#2 gc"smlsharp"personality i32(...)*@sml_personality{
i:
%b=alloca i8*,align 8
call void@llvm.gcroot(i8**%b,i8*null)#0
store i8*%a,i8**%b,align 8
%c=load atomic i32,i32*@sml_check_flag unordered,align 4
%d=icmp eq i32%c,0
br i1%d,label%g,label%e
e:
call void@sml_check(i32 inreg%c)
%f=load i8*,i8**%b,align 8
br label%g
g:
%h=phi i8*[%f,%e],[%a,%i]
store i8*null,i8**%b,align 8
%j=call fastcc i8*@_SMLFN4Time9toSecondsE(i8*inreg%h)
store i8*%j,i8**%b,align 8
%k=call fastcc i32@_SMLFN6IntInf4signE(i8*inreg%j)
%l=icmp sgt i32%k,0
br i1%l,label%n,label%m
m:
ret void
n:
%o=load i8*,i8**%b,align 8
store i8*null,i8**%b,align 8
%p=call fastcc i32@_SMLFN6Word3212fromLargeIntE(i8*inreg%o)
call void@sml_leave()#0
%q=invoke i32@sleep(i32%p)
to label%r unwind label%s
r:
call void@sml_enter()#0
ret void
s:
%t=landingpad{i8*,i8*}
cleanup
%u=extractvalue{i8*,i8*}%t,1
call void@sml_enter()#0
%v=call i8*@sml_unsave_exn(i8*inreg%u)#0
resume{i8*,i8*}%t
}
define internal fastcc void@_SMLL4loop_62(i8*inreg%a)unnamed_addr#2 gc"smlsharp"personality i32(...)*@sml_personality{
f:
%b=alloca i8*,align 8
%c=alloca i8*,align 8
call void@llvm.gcroot(i8**%b,i8*null)#0
call void@llvm.gcroot(i8**%c,i8*null)#0
br label%d
d:
%e=phi i8*[%J,%F],[%a,%f]
store i8*%e,i8**%b,align 8
%g=load atomic i32,i32*@sml_check_flag unordered,align 4
%h=icmp eq i32%g,0
br i1%h,label%k,label%i
i:
call void@sml_check(i32 inreg%g)
%j=load i8*,i8**%b,align 8
br label%k
k:
%l=phi i8*[%j,%i],[%e,%d]
%m=icmp eq i8*%l,null
br i1%m,label%n,label%o
n:
ret void
o:
%p=bitcast i8*%l to i8***
%q=load i8**,i8***%p,align 8
%r=load i8*,i8**%q,align 8
%s=getelementptr inbounds i8,i8*%r,i64 16
%t=bitcast i8*%s to i8*(i8*,i8*)**
%u=load i8*(i8*,i8*)*,i8*(i8*,i8*)**%t,align 8
%v=bitcast i8*%r to i8**
%w=load i8*,i8**%v,align 8
store i8*%w,i8**%c,align 8
%x=call i8*@sml_alloc(i32 inreg 4)#0
%y=bitcast i8*%x to i32*
%z=getelementptr inbounds i8,i8*%x,i64 -4
%A=bitcast i8*%z to i32*
store i32 4,i32*%A,align 4
store i32 0,i32*%y,align 4
%B=load i8*,i8**%c,align 8
store i8*null,i8**%c,align 8
%C=invoke fastcc i8*%u(i8*inreg%B,i8*inreg%x)
to label%F unwind label%D
D:
%E=landingpad{i8*,i8*}
catch i8*null
br label%F
F:
%G=load i8*,i8**%b,align 8
store i8*null,i8**%b,align 8
%H=getelementptr inbounds i8,i8*%G,i64 8
%I=bitcast i8*%H to i8**
%J=load i8*,i8**%I,align 8
br label%d
}
define internal fastcc i8*@_SMLLN18SMLSharp__OSProcess4exitE_64(i8*inreg%a,i32 inreg%b)#4 gc"smlsharp"{
%c=alloca i8*,align 8
call void@llvm.gcroot(i8**%c,i8*null)#0
store i8*%a,i8**%c,align 8
%d=load atomic i32,i32*@sml_check_flag unordered,align 4
%e=icmp eq i32%d,0
br i1%e,label%g,label%f
f:
call void@sml_check(i32 inreg%d)
br label%g
g:
%h=load i8*,i8**getelementptr inbounds(<{[4x i8],i32,i8*}>,<{[4x i8],i32,i8*}>*@_SMLDN18SMLSharp__OSProcess8cleanupsE_56,i64 0,i32 2),align 8
call void@sml_write(i8*inreg bitcast(i8**getelementptr inbounds(<{[4x i8],i32,i8*}>,<{[4x i8],i32,i8*}>*@_SMLDN18SMLSharp__OSProcess8cleanupsE_56,i64 0,i32 2)to i8*),i8**inreg getelementptr inbounds(<{[4x i8],i32,i8*}>,<{[4x i8],i32,i8*}>*@_SMLDN18SMLSharp__OSProcess8cleanupsE_56,i64 0,i32 2),i8*inreg null)#0
call fastcc void@_SMLL4loop_62(i8*inreg%h)
store i8*null,i8**%c,align 8
%i=call i8*@sml_alloc(i32 inreg 4)#0
%j=bitcast i8*%i to i32*
%k=getelementptr inbounds i8,i8*%i,i64 -4
%l=bitcast i8*%k to i32*
store i32 4,i32*%l,align 4
store i32%b,i32*%j,align 4
%m=load i8*,i8**%c,align 8
%n=tail call fastcc i8*@_SMLLN18SMLSharp__OSProcess9terminateE_91(i8*inreg%m,i8*inreg%i)
unreachable
}
define fastcc void@_SMLFN18SMLSharp__OSProcess6atExitE(i8*inreg%a)#5 gc"smlsharp"{
%b=alloca i8*,align 8
%c=alloca i8*,align 8
call void@llvm.gcroot(i8**%b,i8*null)#0
call void@llvm.gcroot(i8**%c,i8*null)#0
store i8*%a,i8**%b,align 8
%d=call i8*@sml_alloc(i32 inreg 8)#0
%e=getelementptr inbounds i8,i8*%d,i64 -4
%f=bitcast i8*%e to i32*
store i32 805306376,i32*%f,align 4
store i8*%d,i8**%c,align 8
%g=bitcast i8*%d to i64*
store i64 0,i64*%g,align 1
%h=load i8*,i8**%b,align 8
%i=bitcast i8*%d to i8**
call void@sml_write(i8*inreg%d,i8**inreg%i,i8*inreg%h)#0
%j=load i8*,i8**getelementptr inbounds(<{[4x i8],i32,i8*}>,<{[4x i8],i32,i8*}>*@_SMLDN18SMLSharp__OSProcess8cleanupsE_56,i64 0,i32 2),align 8
store i8*%j,i8**%b,align 8
%k=call i8*@sml_alloc(i32 inreg 20)#0
%l=getelementptr inbounds i8,i8*%k,i64 -4
%m=bitcast i8*%l to i32*
store i32 1342177296,i32*%m,align 4
%n=load i8*,i8**%c,align 8
%o=bitcast i8*%k to i8**
store i8*%n,i8**%o,align 8
%p=load i8*,i8**%b,align 8
%q=getelementptr inbounds i8,i8*%k,i64 8
%r=bitcast i8*%q to i8**
store i8*%p,i8**%r,align 8
%s=getelementptr inbounds i8,i8*%k,i64 16
%t=bitcast i8*%s to i32*
store i32 3,i32*%t,align 4
call void@sml_write(i8*inreg bitcast(i8**getelementptr inbounds(<{[4x i8],i32,i8*}>,<{[4x i8],i32,i8*}>*@_SMLDN18SMLSharp__OSProcess8cleanupsE_56,i64 0,i32 2)to i8*),i8**inreg getelementptr inbounds(<{[4x i8],i32,i8*}>,<{[4x i8],i32,i8*}>*@_SMLDN18SMLSharp__OSProcess8cleanupsE_56,i64 0,i32 2),i8*inreg%k)#0
ret void
}
define fastcc i8*@_SMLFN18SMLSharp__OSProcess7atExit_GE(i8*inreg%a)#5 gc"smlsharp"{
%b=alloca i8*,align 8
%c=alloca i8*,align 8
call void@llvm.gcroot(i8**%b,i8*null)#0
call void@llvm.gcroot(i8**%c,i8*null)#0
store i8*%a,i8**%b,align 8
%d=call i8*@sml_alloc(i32 inreg 8)#0
%e=getelementptr inbounds i8,i8*%d,i64 -4
%f=bitcast i8*%e to i32*
store i32 805306376,i32*%f,align 4
store i8*%d,i8**%c,align 8
%g=bitcast i8*%d to i64*
store i64 0,i64*%g,align 1
%h=load i8*,i8**%b,align 8
%i=bitcast i8*%d to i8**
call void@sml_write(i8*inreg%d,i8**inreg%i,i8*inreg%h)#0
%j=load i8*,i8**getelementptr inbounds(<{[4x i8],i32,i8*}>,<{[4x i8],i32,i8*}>*@_SMLDN18SMLSharp__OSProcess8cleanupsE_56,i64 0,i32 2),align 8
store i8*%j,i8**%b,align 8
%k=call i8*@sml_alloc(i32 inreg 20)#0
%l=getelementptr inbounds i8,i8*%k,i64 -4
%m=bitcast i8*%l to i32*
store i32 1342177296,i32*%m,align 4
%n=load i8*,i8**%c,align 8
%o=bitcast i8*%k to i8**
store i8*%n,i8**%o,align 8
%p=load i8*,i8**%b,align 8
%q=getelementptr inbounds i8,i8*%k,i64 8
%r=bitcast i8*%q to i8**
store i8*%p,i8**%r,align 8
%s=getelementptr inbounds i8,i8*%k,i64 16
%t=bitcast i8*%s to i32*
store i32 3,i32*%t,align 4
call void@sml_write(i8*inreg bitcast(i8**getelementptr inbounds(<{[4x i8],i32,i8*}>,<{[4x i8],i32,i8*}>*@_SMLDN18SMLSharp__OSProcess8cleanupsE_56,i64 0,i32 2)to i8*),i8**inreg getelementptr inbounds(<{[4x i8],i32,i8*}>,<{[4x i8],i32,i8*}>*@_SMLDN18SMLSharp__OSProcess8cleanupsE_56,i64 0,i32 2),i8*inreg%k)#0
%u=load i8*,i8**%c,align 8
ret i8*%u
}
define internal fastcc i8*@_SMLL6filter_73(i8*inreg%a,i8*inreg%b)#2 gc"smlsharp"{
o:
%c=alloca i8*,align 8
%d=alloca i8*,align 8
%e=alloca i8*,align 8
%f=alloca i8*,align 8
%g=alloca i8*,align 8
%h=alloca i8*,align 8
%i=alloca i8*,align 8
%j=alloca i8*,align 8
%k=alloca i8*,align 8
call void@llvm.gcroot(i8**%g,i8*null)#0
call void@llvm.gcroot(i8**%h,i8*null)#0
call void@llvm.gcroot(i8**%i,i8*null)#0
call void@llvm.gcroot(i8**%j,i8*null)#0
call void@llvm.gcroot(i8**%k,i8*null)#0
store i8*%a,i8**%j,align 8
%l=bitcast i8**%j to i8***
br label%m
m:
%n=phi i8*[%bn,%bc],[%b,%o]
store i8*%n,i8**%g,align 8
%p=load atomic i32,i32*@sml_check_flag unordered,align 4
%q=icmp eq i32%p,0
br i1%q,label%t,label%r
r:
call void@sml_check(i32 inreg%p)
%s=load i8*,i8**%g,align 8
br label%t
t:
%u=phi i8*[%s,%r],[%n,%m]
%v=bitcast i8*%u to i8**
%w=load i8*,i8**%v,align 8
store i8*%w,i8**%g,align 8
%x=getelementptr inbounds i8,i8*%u,i64 8
%y=bitcast i8*%x to i8**
%z=load i8*,i8**%y,align 8
%A=icmp eq i8*%z,null
br i1%A,label%B,label%V
B:
store i8*null,i8**%j,align 8
%C=load i8*,i8**@_SMLZN16SMLSharp__Runtime3BugE,align 8
store i8*%C,i8**%g,align 8
%D=call i8*@sml_alloc(i32 inreg 28)#0
%E=getelementptr inbounds i8,i8*%D,i64 -4
%F=bitcast i8*%E to i32*
store i32 1342177304,i32*%F,align 4
store i8*%D,i8**%h,align 8
%G=load i8*,i8**%g,align 8
store i8*null,i8**%g,align 8
%H=bitcast i8*%D to i8**
store i8*%G,i8**%H,align 8
%I=getelementptr inbounds i8,i8*%D,i64 8
%J=bitcast i8*%I to i8**
store i8*getelementptr inbounds(<{[4x i8],i32,[51x i8]}>,<{[4x i8],i32,[51x i8]}>*@g,i64 0,i32 2,i64 0),i8**%J,align 8
%K=getelementptr inbounds i8,i8*%D,i64 16
%L=bitcast i8*%K to i8**
store i8*getelementptr inbounds(<{[4x i8],i32,[28x i8]}>,<{[4x i8],i32,[28x i8]}>*@h,i64 0,i32 2,i64 0),i8**%L,align 8
%M=getelementptr inbounds i8,i8*%D,i64 24
%N=bitcast i8*%M to i32*
store i32 7,i32*%N,align 4
%O=call i8*@sml_alloc(i32 inreg 60)#0
%P=getelementptr inbounds i8,i8*%O,i64 -4
%Q=bitcast i8*%P to i32*
store i32 1342177336,i32*%Q,align 4
%R=getelementptr inbounds i8,i8*%O,i64 56
%S=bitcast i8*%R to i32*
store i32 1,i32*%S,align 4
%T=load i8*,i8**%h,align 8
%U=bitcast i8*%O to i8**
store i8*%T,i8**%U,align 8
call void@sml_raise(i8*inreg%O)#1
unreachable
V:
%W=bitcast i8*%z to i8**
%X=load i8*,i8**%W,align 8
store i8*%X,i8**%h,align 8
%Y=getelementptr inbounds i8,i8*%z,i64 8
%Z=bitcast i8*%Y to i8**
%aa=load i8*,i8**%Z,align 8
store i8*%aa,i8**%i,align 8
%ab=load i8**,i8***%l,align 8
%ac=load i8*,i8**%ab,align 8
%ad=call i32@sml_obj_equal(i8*inreg%X,i8*inreg%ac)#0
%ae=icmp eq i32%ad,0
br i1%ae,label%bc,label%af
af:
store i8*null,i8**%h,align 8
store i8*null,i8**%j,align 8
%ag=call i8*@sml_alloc(i32 inreg 20)#0
%ah=getelementptr inbounds i8,i8*%ag,i64 -4
%ai=bitcast i8*%ah to i32*
store i32 1342177296,i32*%ai,align 4
%aj=load i8*,i8**%g,align 8
%ak=bitcast i8*%ag to i8**
store i8*%aj,i8**%ak,align 8
%al=load i8*,i8**%i,align 8
%am=getelementptr inbounds i8,i8*%ag,i64 8
%an=bitcast i8*%am to i8**
store i8*%al,i8**%an,align 8
%ao=getelementptr inbounds i8,i8*%ag,i64 16
%ap=bitcast i8*%ao to i32*
store i32 3,i32*%ap,align 4
%aq=bitcast i8**%c to i8*
call void@llvm.lifetime.start.p0i8(i64 8,i8*%aq)
%ar=bitcast i8**%d to i8*
call void@llvm.lifetime.start.p0i8(i64 8,i8*%ar)
%as=bitcast i8**%e to i8*
call void@llvm.lifetime.start.p0i8(i64 8,i8*%as)
%at=bitcast i8**%f to i8*
call void@llvm.lifetime.start.p0i8(i64 8,i8*%at)
call void@llvm.gcroot(i8**%c,i8*null)#0
call void@llvm.gcroot(i8**%d,i8*null)#0
call void@llvm.gcroot(i8**%e,i8*null)#0
call void@llvm.gcroot(i8**%f,i8*null)#0
br label%au
au:
%av=phi i8*[%aY,%aF],[%ag,%af]
store i8*%av,i8**%c,align 8
%aw=load atomic i32,i32*@sml_check_flag unordered,align 4
%ax=icmp eq i32%aw,0
br i1%ax,label%aA,label%ay
ay:
call void@sml_check(i32 inreg%aw)
%az=load i8*,i8**%c,align 8
br label%aA
aA:
%aB=phi i8*[%az,%ay],[%av,%au]
%aC=bitcast i8*%aB to i8**
%aD=load i8*,i8**%aC,align 8
%aE=icmp eq i8*%aD,null
br i1%aE,label%a8,label%aF
aF:
%aG=bitcast i8*%aD to i8**
%aH=load i8*,i8**%aG,align 8
store i8*%aH,i8**%c,align 8
%aI=getelementptr inbounds i8,i8*%aD,i64 8
%aJ=bitcast i8*%aI to i8**
%aK=load i8*,i8**%aJ,align 8
store i8*%aK,i8**%d,align 8
%aL=getelementptr inbounds i8,i8*%aB,i64 8
%aM=bitcast i8*%aL to i8**
%aN=load i8*,i8**%aM,align 8
store i8*%aN,i8**%e,align 8
%aO=call i8*@sml_alloc(i32 inreg 20)#0
%aP=getelementptr inbounds i8,i8*%aO,i64 -4
%aQ=bitcast i8*%aP to i32*
store i32 1342177296,i32*%aQ,align 4
store i8*%aO,i8**%f,align 8
%aR=load i8*,i8**%c,align 8
store i8*null,i8**%c,align 8
%aS=bitcast i8*%aO to i8**
store i8*%aR,i8**%aS,align 8
%aT=load i8*,i8**%e,align 8
store i8*null,i8**%e,align 8
%aU=getelementptr inbounds i8,i8*%aO,i64 8
%aV=bitcast i8*%aU to i8**
store i8*%aT,i8**%aV,align 8
%aW=getelementptr inbounds i8,i8*%aO,i64 16
%aX=bitcast i8*%aW to i32*
store i32 3,i32*%aX,align 4
%aY=call i8*@sml_alloc(i32 inreg 20)#0
%aZ=getelementptr inbounds i8,i8*%aY,i64 -4
%a0=bitcast i8*%aZ to i32*
store i32 1342177296,i32*%a0,align 4
%a1=load i8*,i8**%d,align 8
store i8*null,i8**%d,align 8
%a2=bitcast i8*%aY to i8**
store i8*%a1,i8**%a2,align 8
%a3=load i8*,i8**%f,align 8
store i8*null,i8**%f,align 8
%a4=getelementptr inbounds i8,i8*%aY,i64 8
%a5=bitcast i8*%a4 to i8**
store i8*%a3,i8**%a5,align 8
%a6=getelementptr inbounds i8,i8*%aY,i64 16
%a7=bitcast i8*%a6 to i32*
store i32 3,i32*%a7,align 4
br label%au
a8:
%a9=getelementptr inbounds i8,i8*%aB,i64 8
%ba=bitcast i8*%a9 to i8**
%bb=load i8*,i8**%ba,align 8
call void@llvm.lifetime.end.p0i8(i64 8,i8*%aq)
call void@llvm.lifetime.end.p0i8(i64 8,i8*%ar)
call void@llvm.lifetime.end.p0i8(i64 8,i8*%as)
call void@llvm.lifetime.end.p0i8(i64 8,i8*%at)
ret i8*%bb
bc:
%bd=call i8*@sml_alloc(i32 inreg 20)#0
%be=getelementptr inbounds i8,i8*%bd,i64 -4
%bf=bitcast i8*%be to i32*
store i32 1342177296,i32*%bf,align 4
store i8*%bd,i8**%k,align 8
%bg=load i8*,i8**%h,align 8
store i8*null,i8**%h,align 8
%bh=bitcast i8*%bd to i8**
store i8*%bg,i8**%bh,align 8
%bi=load i8*,i8**%g,align 8
store i8*null,i8**%g,align 8
%bj=getelementptr inbounds i8,i8*%bd,i64 8
%bk=bitcast i8*%bj to i8**
store i8*%bi,i8**%bk,align 8
%bl=getelementptr inbounds i8,i8*%bd,i64 16
%bm=bitcast i8*%bl to i32*
store i32 3,i32*%bm,align 4
%bn=call i8*@sml_alloc(i32 inreg 20)#0
%bo=getelementptr inbounds i8,i8*%bn,i64 -4
%bp=bitcast i8*%bo to i32*
store i32 1342177296,i32*%bp,align 4
%bq=load i8*,i8**%k,align 8
store i8*null,i8**%k,align 8
%br=bitcast i8*%bn to i8**
store i8*%bq,i8**%br,align 8
%bs=load i8*,i8**%i,align 8
store i8*null,i8**%i,align 8
%bt=getelementptr inbounds i8,i8*%bn,i64 8
%bu=bitcast i8*%bt to i8**
store i8*%bs,i8**%bu,align 8
%bv=getelementptr inbounds i8,i8*%bn,i64 16
%bw=bitcast i8*%bv to i32*
store i32 3,i32*%bw,align 4
br label%m
}
define fastcc void@_SMLFN18SMLSharp__OSProcess12cancelAtExitE(i8*inreg%a)#2 gc"smlsharp"{
%b=alloca i8*,align 8
%c=alloca i8*,align 8
%d=alloca i8*,align 8
call void@llvm.gcroot(i8**%b,i8*null)#0
call void@llvm.gcroot(i8**%c,i8*null)#0
call void@llvm.gcroot(i8**%d,i8*null)#0
store i8*%a,i8**%b,align 8
%e=load atomic i32,i32*@sml_check_flag unordered,align 4
%f=icmp eq i32%e,0
br i1%f,label%h,label%g
g:
call void@sml_check(i32 inreg%e)
br label%h
h:
%i=call i8*@sml_alloc(i32 inreg 12)#0
%j=getelementptr inbounds i8,i8*%i,i64 -4
%k=bitcast i8*%j to i32*
store i32 1342177288,i32*%k,align 4
store i8*%i,i8**%d,align 8
%l=load i8*,i8**%b,align 8
store i8*null,i8**%b,align 8
%m=bitcast i8*%i to i8**
store i8*%l,i8**%m,align 8
%n=getelementptr inbounds i8,i8*%i,i64 8
%o=bitcast i8*%n to i32*
store i32 1,i32*%o,align 4
%p=call i8*@sml_alloc(i32 inreg 28)#0
%q=getelementptr inbounds i8,i8*%p,i64 -4
%r=bitcast i8*%q to i32*
store i32 1342177304,i32*%r,align 4
%s=load i8*,i8**%d,align 8
%t=bitcast i8*%p to i8**
store i8*%s,i8**%t,align 8
%u=getelementptr inbounds i8,i8*%p,i64 8
%v=bitcast i8*%u to void(...)**
store void(...)*bitcast(i8*(i8*,i8*)*@_SMLL6filter_73 to void(...)*),void(...)**%v,align 8
%w=getelementptr inbounds i8,i8*%p,i64 16
%x=bitcast i8*%w to void(...)**
store void(...)*bitcast(i8*(i8*,i8*)*@_SMLL6filter_73 to void(...)*),void(...)**%x,align 8
%y=getelementptr inbounds i8,i8*%p,i64 24
%z=bitcast i8*%y to i32*
store i32 -2147483647,i32*%z,align 4
%A=load i8*,i8**getelementptr inbounds(<{[4x i8],i32,i8*}>,<{[4x i8],i32,i8*}>*@_SMLDN18SMLSharp__OSProcess8cleanupsE_56,i64 0,i32 2),align 8
store i8*%A,i8**%b,align 8
%B=call i8*@sml_alloc(i32 inreg 20)#0
%C=getelementptr inbounds i8,i8*%B,i64 -4
%D=bitcast i8*%C to i32*
store i32 1342177296,i32*%D,align 4
%E=bitcast i8*%B to i8**
store i8*null,i8**%E,align 8
%F=load i8*,i8**%b,align 8
%G=getelementptr inbounds i8,i8*%B,i64 8
%H=bitcast i8*%G to i8**
store i8*%F,i8**%H,align 8
%I=getelementptr inbounds i8,i8*%B,i64 16
%J=bitcast i8*%I to i32*
store i32 3,i32*%J,align 4
store i8*null,i8**%b,align 8
store i8*%F,i8**%c,align 8
%K=call i8*@sml_alloc(i32 inreg 20)#0
%L=getelementptr inbounds i8,i8*%K,i64 -4
%M=bitcast i8*%L to i32*
store i32 1342177296,i32*%M,align 4
%N=load i8*,i8**%b,align 8
store i8*null,i8**%b,align 8
%O=bitcast i8*%K to i8**
store i8*%N,i8**%O,align 8
%P=load i8*,i8**%c,align 8
store i8*null,i8**%c,align 8
%Q=getelementptr inbounds i8,i8*%K,i64 8
%R=bitcast i8*%Q to i8**
store i8*%P,i8**%R,align 8
%S=getelementptr inbounds i8,i8*%K,i64 16
%T=bitcast i8*%S to i32*
store i32 3,i32*%T,align 4
%U=load i8*,i8**%d,align 8
store i8*null,i8**%d,align 8
%V=call fastcc i8*@_SMLL6filter_73(i8*inreg%U,i8*inreg%K)
call void@sml_write(i8*inreg bitcast(i8**getelementptr inbounds(<{[4x i8],i32,i8*}>,<{[4x i8],i32,i8*}>*@_SMLDN18SMLSharp__OSProcess8cleanupsE_56,i64 0,i32 2)to i8*),i8**inreg getelementptr inbounds(<{[4x i8],i32,i8*}>,<{[4x i8],i32,i8*}>*@_SMLDN18SMLSharp__OSProcess8cleanupsE_56,i64 0,i32 2),i8*inreg%V)#0
ret void
}
define fastcc i32@_SMLFN18SMLSharp__OSProcess9isSuccessE(i32 inreg%a)#5 gc"smlsharp"{
%b=icmp eq i32%a,0
%c=zext i1%b to i32
ret i32%c
}
define internal fastcc i8*@_SMLLN18SMLSharp__OSProcess4exitE_80(i8*inreg%a,i32 inreg%b)#2 gc"smlsharp"{
k:
%c=alloca i8*,align 8
%d=alloca i8*,align 8
call void@llvm.gcroot(i8**%d,i8*null)#0
store i8*%a,i8**%d,align 8
%e=load atomic i32,i32*@sml_check_flag unordered,align 4
%f=icmp eq i32%e,0
br i1%f,label%i,label%g
g:
call void@sml_check(i32 inreg%e)
%h=load i8*,i8**%d,align 8
br label%i
i:
%j=phi i8*[%h,%g],[%a,%k]
%l=bitcast i8*%j to i32*
%m=load i32,i32*%l,align 4
store i8*null,i8**%d,align 8
%n=getelementptr inbounds i8,i8*%j,i64 4
%o=bitcast i8*%n to i32*
%p=load i32,i32*%o,align 4
%q=bitcast i8**%c to i8*
call void@llvm.lifetime.start.p0i8(i64 8,i8*%q)
call void@llvm.gcroot(i8**%c,i8*null)#0
%r=call i8*@sml_alloc(i32 inreg 12)#0
%s=bitcast i8*%r to i32*
%t=getelementptr inbounds i8,i8*%r,i64 -4
%u=bitcast i8*%t to i32*
store i32 1342177288,i32*%u,align 4
store i8*%r,i8**%c,align 8
store i32%m,i32*%s,align 4
%v=getelementptr inbounds i8,i8*%r,i64 4
%w=bitcast i8*%v to i32*
store i32%p,i32*%w,align 4
%x=getelementptr inbounds i8,i8*%r,i64 8
%y=bitcast i8*%x to i32*
store i32 0,i32*%y,align 4
%z=call i8*@sml_alloc(i32 inreg 28)#0
%A=getelementptr inbounds i8,i8*%z,i64 -4
%B=bitcast i8*%A to i32*
store i32 1342177304,i32*%B,align 4
%C=load i8*,i8**%c,align 8
%D=bitcast i8*%z to i8**
store i8*%C,i8**%D,align 8
%E=getelementptr inbounds i8,i8*%z,i64 8
%F=bitcast i8*%E to void(...)**
store void(...)*bitcast(i8*(i8*,i32)*@_SMLLN18SMLSharp__OSProcess4exitE_64 to void(...)*),void(...)**%F,align 8
%G=getelementptr inbounds i8,i8*%z,i64 16
%H=bitcast i8*%G to void(...)**
store void(...)*bitcast(i8*(i8*,i8*)*@_SMLLN18SMLSharp__OSProcess4exitE_95 to void(...)*),void(...)**%H,align 8
%I=getelementptr inbounds i8,i8*%z,i64 24
%J=bitcast i8*%I to i32*
store i32 1,i32*%J,align 4
call void@llvm.lifetime.end.p0i8(i64 8,i8*%q)
store i8*%C,i8**%d,align 8
%K=call i8*@sml_alloc(i32 inreg 4)#0
%L=bitcast i8*%K to i32*
%M=getelementptr inbounds i8,i8*%K,i64 -4
%N=bitcast i8*%M to i32*
store i32 4,i32*%N,align 4
store i32%b,i32*%L,align 4
%O=load i8*,i8**%d,align 8
store i8*null,i8**%d,align 8
%P=call fastcc i8*@_SMLLN18SMLSharp__OSProcess4exitE_64(i8*inreg%O,i32 inreg%b)
unreachable
}
define fastcc i8*@_SMLFN18SMLSharp__OSProcess4exitE(i32 inreg%a,i32 inreg%b)#5 gc"smlsharp"{
%c=alloca i8*,align 8
call void@llvm.gcroot(i8**%c,i8*null)#0
%d=call i8*@sml_alloc(i32 inreg 12)#0
%e=bitcast i8*%d to i32*
%f=getelementptr inbounds i8,i8*%d,i64 -4
%g=bitcast i8*%f to i32*
store i32 1342177288,i32*%g,align 4
store i8*%d,i8**%c,align 8
store i32%a,i32*%e,align 4
%h=getelementptr inbounds i8,i8*%d,i64 4
%i=bitcast i8*%h to i32*
store i32%b,i32*%i,align 4
%j=getelementptr inbounds i8,i8*%d,i64 8
%k=bitcast i8*%j to i32*
store i32 0,i32*%k,align 4
%l=call i8*@sml_alloc(i32 inreg 28)#0
%m=getelementptr inbounds i8,i8*%l,i64 -4
%n=bitcast i8*%m to i32*
store i32 1342177304,i32*%n,align 4
%o=load i8*,i8**%c,align 8
%p=bitcast i8*%l to i8**
store i8*%o,i8**%p,align 8
%q=getelementptr inbounds i8,i8*%l,i64 8
%r=bitcast i8*%q to void(...)**
store void(...)*bitcast(i8*(i8*,i32)*@_SMLLN18SMLSharp__OSProcess4exitE_80 to void(...)*),void(...)**%r,align 8
%s=getelementptr inbounds i8,i8*%l,i64 16
%t=bitcast i8*%s to void(...)**
store void(...)*bitcast(i8*(i8*,i8*)*@_SMLLN18SMLSharp__OSProcess4exitE_102 to void(...)*),void(...)**%t,align 8
%u=getelementptr inbounds i8,i8*%l,i64 24
%v=bitcast i8*%u to i32*
store i32 1,i32*%v,align 4
ret i8*%l
}
define internal fastcc i8*@_SMLLN18SMLSharp__OSProcess9terminateE_83(i8*inreg%a,i32 inreg%b)#4 gc"smlsharp"{
%c=alloca i8*,align 8
call void@llvm.gcroot(i8**%c,i8*null)#0
store i8*%a,i8**%c,align 8
%d=load atomic i32,i32*@sml_check_flag unordered,align 4
%e=icmp eq i32%d,0
br i1%e,label%g,label%f
f:
call void@sml_check(i32 inreg%d)
br label%g
g:
store i8*null,i8**%c,align 8
%h=call i8*@sml_alloc(i32 inreg 4)#0
%i=bitcast i8*%h to i32*
%j=getelementptr inbounds i8,i8*%h,i64 -4
%k=bitcast i8*%j to i32*
store i32 4,i32*%k,align 4
store i32%b,i32*%i,align 4
%l=load i8*,i8**%c,align 8
store i8*null,i8**%c,align 8
%m=call fastcc i8*@_SMLLN18SMLSharp__OSProcess9terminateE_91(i8*inreg%l,i8*inreg%h)
unreachable
}
define fastcc i8*@_SMLFN18SMLSharp__OSProcess9terminateE(i32 inreg%a,i32 inreg%b)#5 gc"smlsharp"{
%c=alloca i8*,align 8
call void@llvm.gcroot(i8**%c,i8*null)#0
%d=call i8*@sml_alloc(i32 inreg 12)#0
%e=bitcast i8*%d to i32*
%f=getelementptr inbounds i8,i8*%d,i64 -4
%g=bitcast i8*%f to i32*
store i32 1342177288,i32*%g,align 4
store i8*%d,i8**%c,align 8
store i32%a,i32*%e,align 4
%h=getelementptr inbounds i8,i8*%d,i64 4
%i=bitcast i8*%h to i32*
store i32%b,i32*%i,align 4
%j=getelementptr inbounds i8,i8*%d,i64 8
%k=bitcast i8*%j to i32*
store i32 0,i32*%k,align 4
%l=call i8*@sml_alloc(i32 inreg 28)#0
%m=getelementptr inbounds i8,i8*%l,i64 -4
%n=bitcast i8*%m to i32*
store i32 1342177304,i32*%n,align 4
%o=load i8*,i8**%c,align 8
%p=bitcast i8*%l to i8**
store i8*%o,i8**%p,align 8
%q=getelementptr inbounds i8,i8*%l,i64 8
%r=bitcast i8*%q to void(...)**
store void(...)*bitcast(i8*(i8*,i32)*@_SMLLN18SMLSharp__OSProcess9terminateE_83 to void(...)*),void(...)**%r,align 8
%s=getelementptr inbounds i8,i8*%l,i64 16
%t=bitcast i8*%s to void(...)**
store void(...)*bitcast(i8*(i8*,i8*)*@_SMLLN18SMLSharp__OSProcess9terminateE_104 to void(...)*),void(...)**%t,align 8
%u=getelementptr inbounds i8,i8*%l,i64 24
%v=bitcast i8*%u to i32*
store i32 1,i32*%v,align 4
ret i8*%l
}
define fastcc i8*@_SMLFN18SMLSharp__OSProcess6getEnvE(i8*inreg%a)#2 gc"smlsharp"personality i32(...)*@sml_personality{
i:
%b=alloca i8*,align 8
call void@llvm.gcroot(i8**%b,i8*null)#0
store i8*%a,i8**%b,align 8
%c=load atomic i32,i32*@sml_check_flag unordered,align 4
%d=icmp eq i32%c,0
br i1%d,label%g,label%e
e:
call void@sml_check(i32 inreg%c)
%f=load i8*,i8**%b,align 8
br label%g
g:
%h=phi i8*[%f,%e],[%a,%i]
call void@sml_leave()#0
%j=call i8*@getenv(i8*%h)
call void@sml_enter()#0
%k=ptrtoint i8*%j to i64
%l=tail call fastcc i8*@_SMLFN16SMLSharp__Runtime14str__new__optionE(i64 inreg%k)
ret i8*%l
}
define fastcc void@_SMLFN18SMLSharp__OSProcess12rebindAtExitE(i8*inreg%a)#5 gc"smlsharp"{
%b=bitcast i8*%a to i8**
%c=load i8*,i8**%b,align 8
%d=getelementptr inbounds i8,i8*%a,i64 8
%e=bitcast i8*%d to i8**
%f=load i8*,i8**%e,align 8
%g=bitcast i8*%c to i8**
tail call void@sml_write(i8*inreg%c,i8**inreg%g,i8*inreg%f)#0
ret void
}
define internal fastcc i8*@_SMLLN18SMLSharp__OSProcess6systemE_90(i8*inreg%a,i8*inreg%b)#2 gc"smlsharp"{
%c=tail call fastcc i32@_SMLFN18SMLSharp__OSProcess6systemE(i8*inreg%b)
%d=tail call i8*@sml_alloc(i32 inreg 4)#0
%e=bitcast i8*%d to i32*
%f=getelementptr inbounds i8,i8*%d,i64 -4
%g=bitcast i8*%f to i32*
store i32 4,i32*%g,align 4
store i32%c,i32*%e,align 4
ret i8*%d
}
define internal fastcc i8*@_SMLLN18SMLSharp__OSProcess9terminateE_91(i8*inreg%a,i8*inreg%b)unnamed_addr#4 gc"smlsharp"{
%c=bitcast i8*%b to i32*
%d=load i32,i32*%c,align 4
%e=tail call fastcc i8*@_SMLLN18SMLSharp__OSProcess9terminateE_49(i32 inreg%d)
unreachable
}
define internal fastcc i8*@_SMLLN18SMLSharp__OSProcess5sleepE_93(i8*inreg%a,i8*inreg%b)#2 gc"smlsharp"{
tail call fastcc void@_SMLFN18SMLSharp__OSProcess5sleepE(i8*inreg%b)
%c=tail call i8*@sml_alloc(i32 inreg 4)#0
%d=bitcast i8*%c to i32*
%e=getelementptr inbounds i8,i8*%c,i64 -4
%f=bitcast i8*%e to i32*
store i32 4,i32*%f,align 4
store i32 0,i32*%d,align 4
ret i8*%c
}
define internal fastcc i8*@_SMLLN18SMLSharp__OSProcess4exitE_95(i8*inreg%a,i8*inreg%b)#4 gc"smlsharp"{
%c=bitcast i8*%b to i32*
%d=load i32,i32*%c,align 4
%e=tail call fastcc i8*@_SMLLN18SMLSharp__OSProcess4exitE_64(i8*inreg%a,i32 inreg%d)
unreachable
}
define internal fastcc i8*@_SMLLN18SMLSharp__OSProcess6atExitE_97(i8*inreg%a,i8*inreg%b)#5 gc"smlsharp"{
tail call fastcc void@_SMLFN18SMLSharp__OSProcess6atExitE(i8*inreg%b)
%c=tail call i8*@sml_alloc(i32 inreg 4)#0
%d=bitcast i8*%c to i32*
%e=getelementptr inbounds i8,i8*%c,i64 -4
%f=bitcast i8*%e to i32*
store i32 4,i32*%f,align 4
store i32 0,i32*%d,align 4
ret i8*%c
}
define internal fastcc i8*@_SMLLN18SMLSharp__OSProcess7atExit_GE_98(i8*inreg%a,i8*inreg%b)#5 gc"smlsharp"{
%c=tail call fastcc i8*@_SMLFN18SMLSharp__OSProcess7atExit_GE(i8*inreg%b)
ret i8*%c
}
define internal fastcc i8*@_SMLLN18SMLSharp__OSProcess12cancelAtExitE_100(i8*inreg%a,i8*inreg%b)#2 gc"smlsharp"{
tail call fastcc void@_SMLFN18SMLSharp__OSProcess12cancelAtExitE(i8*inreg%b)
%c=tail call i8*@sml_alloc(i32 inreg 4)#0
%d=bitcast i8*%c to i32*
%e=getelementptr inbounds i8,i8*%c,i64 -4
%f=bitcast i8*%e to i32*
store i32 4,i32*%f,align 4
store i32 0,i32*%d,align 4
ret i8*%c
}
define internal fastcc i8*@_SMLLN18SMLSharp__OSProcess9isSuccessE_101(i8*inreg%a,i8*inreg%b)#5 gc"smlsharp"{
%c=bitcast i8*%b to i32*
%d=load i32,i32*%c,align 4
%e=icmp eq i32%d,0
%f=zext i1%e to i32
%g=tail call i8*@sml_alloc(i32 inreg 4)#0
%h=bitcast i8*%g to i32*
%i=getelementptr inbounds i8,i8*%g,i64 -4
%j=bitcast i8*%i to i32*
store i32 4,i32*%j,align 4
store i32%f,i32*%h,align 4
ret i8*%g
}
define internal fastcc i8*@_SMLLN18SMLSharp__OSProcess4exitE_102(i8*inreg%a,i8*inreg%b)#2 gc"smlsharp"{
%c=bitcast i8*%b to i32*
%d=load i32,i32*%c,align 4
%e=tail call fastcc i8*@_SMLLN18SMLSharp__OSProcess4exitE_80(i8*inreg%a,i32 inreg%d)
ret i8*%e
}
define internal fastcc i8*@_SMLLN18SMLSharp__OSProcess4exitE_103(i8*inreg%a,i8*inreg%b,i8*inreg%c)#5 gc"smlsharp"{
%d=bitcast i8*%b to i32*
%e=load i32,i32*%d,align 4
%f=bitcast i8*%c to i32*
%g=load i32,i32*%f,align 4
%h=tail call fastcc i8*@_SMLFN18SMLSharp__OSProcess4exitE(i32 inreg%e,i32 inreg%g)
ret i8*%h
}
define internal fastcc i8*@_SMLLN18SMLSharp__OSProcess9terminateE_104(i8*inreg%a,i8*inreg%b)#4 gc"smlsharp"{
%c=bitcast i8*%b to i32*
%d=load i32,i32*%c,align 4
%e=tail call fastcc i8*@_SMLLN18SMLSharp__OSProcess9terminateE_83(i8*inreg%a,i32 inreg%d)
unreachable
}
define internal fastcc i8*@_SMLLN18SMLSharp__OSProcess9terminateE_105(i8*inreg%a,i8*inreg%b,i8*inreg%c)#5 gc"smlsharp"{
%d=bitcast i8*%b to i32*
%e=load i32,i32*%d,align 4
%f=bitcast i8*%c to i32*
%g=load i32,i32*%f,align 4
%h=tail call fastcc i8*@_SMLFN18SMLSharp__OSProcess9terminateE(i32 inreg%e,i32 inreg%g)
ret i8*%h
}
define internal fastcc i8*@_SMLLN18SMLSharp__OSProcess6getEnvE_106(i8*inreg%a,i8*inreg%b)#2 gc"smlsharp"{
%c=tail call fastcc i8*@_SMLFN18SMLSharp__OSProcess6getEnvE(i8*inreg%b)
ret i8*%c
}
define internal fastcc i8*@_SMLLN18SMLSharp__OSProcess12rebindAtExitE_107(i8*inreg%a,i8*inreg%b)#5 gc"smlsharp"{
tail call fastcc void@_SMLFN18SMLSharp__OSProcess12rebindAtExitE(i8*inreg%b)
%c=tail call i8*@sml_alloc(i32 inreg 4)#0
%d=bitcast i8*%c to i32*
%e=getelementptr inbounds i8,i8*%c,i64 -4
%f=bitcast i8*%e to i32*
store i32 4,i32*%f,align 4
store i32 0,i32*%d,align 4
ret i8*%c
}
declare void@llvm.lifetime.start.p0i8(i64,i8*)#0
declare void@llvm.lifetime.end.p0i8(i64,i8*)#0
attributes#0={nounwind}
attributes#1={noreturn}
attributes#2={uwtable}
attributes#3={noreturn nounwind}
attributes#4={noreturn uwtable}
attributes#5={nounwind uwtable}
