@sml_check_flag=external local_unnamed_addr global i32
@_SMLZN23SMLSharp__SMLNJ__POSIX__IO11mkBinReaderE=external local_unnamed_addr global i8*
@_SMLZN23SMLSharp__SMLNJ__POSIX__IO11mkBinWriterE=external local_unnamed_addr global i8*
@_SMLZN9BinPrimIO10openVectorE=external local_unnamed_addr global i8*
@_SMLZN9BinPrimIO13augmentReaderE=external local_unnamed_addr global i8*
@_SMLZN9BinPrimIO13augmentWriterE=external local_unnamed_addr global i8*
@_SMLZN9BinPrimIO6nullRdE=external local_unnamed_addr global i8*
@_SMLZN9BinPrimIO6nullWrE=external local_unnamed_addr global i8*
@_SMLZN9BinPrimIO7compareE=external local_unnamed_addr global i8*
@a=private unnamed_addr constant<{[4x i8],i32,[3x i8]}><{[4x i8]zeroinitializer,i32 -2147483645,[3x i8]c"rb\00"}>,align 8
@b=private unnamed_addr constant<{[4x i8],i32,i8*,void(...)*,void(...)*,i32}><{[4x i8]zeroinitializer,i32 -805306344,i8*null,void(...)*bitcast(i8*(i8*)*@_SMLFN29SMLSharp__SMLNJ__PosixBinPrimIO6openRdE to void(...)*),void(...)*bitcast(i8*(i8*,i8*)*@_SMLLN29SMLSharp__SMLNJ__PosixBinPrimIO6openRdE_51 to void(...)*),i32 -2147483647}>,align 8
@_SMLZN29SMLSharp__SMLNJ__PosixBinPrimIO6openRdE=local_unnamed_addr constant i8*bitcast(i8**getelementptr inbounds(<{[4x i8],i32,i8*,void(...)*,void(...)*,i32}>,<{[4x i8],i32,i8*,void(...)*,void(...)*,i32}>*@b,i64 0,i32 2)to i8*)
@c=private unnamed_addr constant<{[4x i8],i32,[3x i8]}><{[4x i8]zeroinitializer,i32 -2147483645,[3x i8]c"wb\00"}>,align 8
@d=private unnamed_addr constant<{[4x i8],i32,i8*,void(...)*,void(...)*,i32}><{[4x i8]zeroinitializer,i32 -805306344,i8*null,void(...)*bitcast(i8*(i8*)*@_SMLFN29SMLSharp__SMLNJ__PosixBinPrimIO6openWrE to void(...)*),void(...)*bitcast(i8*(i8*,i8*)*@_SMLLN29SMLSharp__SMLNJ__PosixBinPrimIO6openWrE_52 to void(...)*),i32 -2147483647}>,align 8
@_SMLZN29SMLSharp__SMLNJ__PosixBinPrimIO6openWrE=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*)
@e=private unnamed_addr constant<{[4x i8],i32,[3x i8]}><{[4x i8]zeroinitializer,i32 -2147483645,[3x i8]c"ab\00"}>,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*)*@_SMLFN29SMLSharp__SMLNJ__PosixBinPrimIO7openAppE to void(...)*),void(...)*bitcast(i8*(i8*,i8*)*@_SMLLN29SMLSharp__SMLNJ__PosixBinPrimIO7openAppE_53 to void(...)*),i32 -2147483647}>,align 8
@_SMLZN29SMLSharp__SMLNJ__PosixBinPrimIO7openAppE=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*)
@_SML_gvard7bed40ec7aa770a_posix_bin_prim_io=private global<{[4x i8],i32,[8x i8*]}><{[4x i8]zeroinitializer,i32 -1342177216,[8x i8*]zeroinitializer}>,align 8
@g=private unnamed_addr global[2x i64][i64 1,i64 sub(i64 ptrtoint(i8**getelementptr inbounds(<{[4x i8],i32,[8x i8*]}>,<{[4x i8],i32,[8x i8*]}>*@_SML_gvard7bed40ec7aa770a_posix_bin_prim_io,i32 0,i32 2,i32 0)to i64),i64 ptrtoint([2x i64]*@g to i64))]
@_SML_ftabd7bed40ec7aa770a_posix_bin_prim_io=external global i8
@h=private unnamed_addr global i8 0
@_SMLZN29SMLSharp__SMLNJ__PosixBinPrimIO6PrimIO7compareE=alias i8*,getelementptr inbounds(<{[4x i8],i32,[8x i8*]}>,<{[4x i8],i32,[8x i8*]}>*@_SML_gvard7bed40ec7aa770a_posix_bin_prim_io,i32 0,i32 2,i32 0)
@_SMLZN29SMLSharp__SMLNJ__PosixBinPrimIO6PrimIO10openVectorE=alias i8*,getelementptr inbounds(<{[4x i8],i32,[8x i8*]}>,<{[4x i8],i32,[8x i8*]}>*@_SML_gvard7bed40ec7aa770a_posix_bin_prim_io,i32 0,i32 2,i32 1)
@_SMLZN29SMLSharp__SMLNJ__PosixBinPrimIO6PrimIO6nullRdE=alias i8*,getelementptr inbounds(<{[4x i8],i32,[8x i8*]}>,<{[4x i8],i32,[8x i8*]}>*@_SML_gvard7bed40ec7aa770a_posix_bin_prim_io,i32 0,i32 2,i32 2)
@_SMLZN29SMLSharp__SMLNJ__PosixBinPrimIO6PrimIO6nullWrE=alias i8*,getelementptr inbounds(<{[4x i8],i32,[8x i8*]}>,<{[4x i8],i32,[8x i8*]}>*@_SML_gvard7bed40ec7aa770a_posix_bin_prim_io,i32 0,i32 2,i32 3)
@_SMLZN29SMLSharp__SMLNJ__PosixBinPrimIO6PrimIO13augmentReaderE=alias i8*,getelementptr inbounds(<{[4x i8],i32,[8x i8*]}>,<{[4x i8],i32,[8x i8*]}>*@_SML_gvard7bed40ec7aa770a_posix_bin_prim_io,i32 0,i32 2,i32 4)
@_SMLZN29SMLSharp__SMLNJ__PosixBinPrimIO6PrimIO13augmentWriterE=alias i8*,getelementptr inbounds(<{[4x i8],i32,[8x i8*]}>,<{[4x i8],i32,[8x i8*]}>*@_SML_gvard7bed40ec7aa770a_posix_bin_prim_io,i32 0,i32 2,i32 5)
@_SMLZN29SMLSharp__SMLNJ__PosixBinPrimIO8mkReaderE=alias i8*,getelementptr inbounds(<{[4x i8],i32,[8x i8*]}>,<{[4x i8],i32,[8x i8*]}>*@_SML_gvard7bed40ec7aa770a_posix_bin_prim_io,i32 0,i32 2,i32 6)
@_SMLZN29SMLSharp__SMLNJ__PosixBinPrimIO8mkWriterE=alias i8*,getelementptr inbounds(<{[4x i8],i32,[8x i8*]}>,<{[4x i8],i32,[8x i8*]}>*@_SML_gvard7bed40ec7aa770a_posix_bin_prim_io,i32 0,i32 2,i32 7)
declare void@llvm.gcroot(i8**,i8*)#0
declare i8*@sml_alloc(i32 inreg)local_unnamed_addr#0
declare void@sml_check(i32 inreg)local_unnamed_addr
declare void@sml_end()local_unnamed_addr#0
declare void@sml_gcroot(i8*,void()*,i8*,i8*)local_unnamed_addr#0
declare void@sml_start(i8*inreg)local_unnamed_addr#0
declare void@sml_write(i8*inreg,i8**inreg,i8*inreg)local_unnamed_addr#0
declare i8*@_SMLFN23SMLSharp__SMLNJ__POSIX__IO11mkBinReaderE(i8*inreg)local_unnamed_addr#1 gc"smlsharp"
declare i8*@_SMLFN23SMLSharp__SMLNJ__POSIX__IO11mkBinWriterE(i8*inreg)local_unnamed_addr#1 gc"smlsharp"
declare i32@_SMLFN23SMLSharp__SMLNJ__POSIX__IO5openfE(i8*inreg)local_unnamed_addr#1 gc"smlsharp"
declare void@_SML_main30f3441b4c55ef58_prim_io_bin()local_unnamed_addr#1 gc"smlsharp"
declare void@_SML_maindb25ec4de893a8c4_posix_io()local_unnamed_addr#1 gc"smlsharp"
declare void@_SML_load30f3441b4c55ef58_prim_io_bin(i8*)local_unnamed_addr
declare void@_SML_loaddb25ec4de893a8c4_posix_io(i8*)local_unnamed_addr
define private void@_SML_tabbd7bed40ec7aa770a_posix_bin_prim_io()#2{
unreachable
}
define void@_SML_loadd7bed40ec7aa770a_posix_bin_prim_io(i8*%a)local_unnamed_addr#0{
%b=load i8,i8*@h,align 1
%c=icmp eq i8%b,0
br i1%c,label%e,label%d
d:
ret void
e:
store i8 1,i8*@h,align 1
tail call void@_SML_load30f3441b4c55ef58_prim_io_bin(i8*%a)#0
tail call void@_SML_loaddb25ec4de893a8c4_posix_io(i8*%a)#0
tail call void@sml_gcroot(i8*%a,void()*@_SML_tabbd7bed40ec7aa770a_posix_bin_prim_io,i8*@_SML_ftabd7bed40ec7aa770a_posix_bin_prim_io,i8*bitcast([2x i64]*@g to i8*))#0
ret void
}
define void@_SML_maind7bed40ec7aa770a_posix_bin_prim_io()local_unnamed_addr#1 gc"smlsharp"{
%a=alloca[3x i8*],align 8
%b=load i8,i8*@h,align 1
%c=and i8%b,2
%d=icmp eq i8%c,0
br i1%d,label%f,label%e
e:
ret void
f:
store i8 3,i8*@h,align 1
tail call void@_SML_main30f3441b4c55ef58_prim_io_bin()#1
tail call void@_SML_maindb25ec4de893a8c4_posix_io()#1
%g=bitcast[3x i8*]*%a to i8*
call void@sml_start(i8*inreg%g)#0
%h=load i8*,i8**@_SMLZN9BinPrimIO7compareE,align 8
call void@sml_write(i8*inreg bitcast(i8**getelementptr inbounds(<{[4x i8],i32,[8x i8*]}>,<{[4x i8],i32,[8x i8*]}>*@_SML_gvard7bed40ec7aa770a_posix_bin_prim_io,i64 0,i32 2,i64 0)to i8*),i8**inreg getelementptr inbounds(<{[4x i8],i32,[8x i8*]}>,<{[4x i8],i32,[8x i8*]}>*@_SML_gvard7bed40ec7aa770a_posix_bin_prim_io,i64 0,i32 2,i64 0),i8*inreg%h)#0
%i=load i8*,i8**@_SMLZN9BinPrimIO10openVectorE,align 8
call void@sml_write(i8*inreg bitcast(i8**getelementptr inbounds(<{[4x i8],i32,[8x i8*]}>,<{[4x i8],i32,[8x i8*]}>*@_SML_gvard7bed40ec7aa770a_posix_bin_prim_io,i64 0,i32 2,i64 0)to i8*),i8**inreg getelementptr inbounds(<{[4x i8],i32,[8x i8*]}>,<{[4x i8],i32,[8x i8*]}>*@_SML_gvard7bed40ec7aa770a_posix_bin_prim_io,i64 0,i32 2,i64 1),i8*inreg%i)#0
%j=load i8*,i8**@_SMLZN9BinPrimIO6nullRdE,align 8
call void@sml_write(i8*inreg bitcast(i8**getelementptr inbounds(<{[4x i8],i32,[8x i8*]}>,<{[4x i8],i32,[8x i8*]}>*@_SML_gvard7bed40ec7aa770a_posix_bin_prim_io,i64 0,i32 2,i64 0)to i8*),i8**inreg getelementptr inbounds(<{[4x i8],i32,[8x i8*]}>,<{[4x i8],i32,[8x i8*]}>*@_SML_gvard7bed40ec7aa770a_posix_bin_prim_io,i64 0,i32 2,i64 2),i8*inreg%j)#0
%k=load i8*,i8**@_SMLZN9BinPrimIO6nullWrE,align 8
call void@sml_write(i8*inreg bitcast(i8**getelementptr inbounds(<{[4x i8],i32,[8x i8*]}>,<{[4x i8],i32,[8x i8*]}>*@_SML_gvard7bed40ec7aa770a_posix_bin_prim_io,i64 0,i32 2,i64 0)to i8*),i8**inreg getelementptr inbounds(<{[4x i8],i32,[8x i8*]}>,<{[4x i8],i32,[8x i8*]}>*@_SML_gvard7bed40ec7aa770a_posix_bin_prim_io,i64 0,i32 2,i64 3),i8*inreg%k)#0
%l=load i8*,i8**@_SMLZN9BinPrimIO13augmentReaderE,align 8
call void@sml_write(i8*inreg bitcast(i8**getelementptr inbounds(<{[4x i8],i32,[8x i8*]}>,<{[4x i8],i32,[8x i8*]}>*@_SML_gvard7bed40ec7aa770a_posix_bin_prim_io,i64 0,i32 2,i64 0)to i8*),i8**inreg getelementptr inbounds(<{[4x i8],i32,[8x i8*]}>,<{[4x i8],i32,[8x i8*]}>*@_SML_gvard7bed40ec7aa770a_posix_bin_prim_io,i64 0,i32 2,i64 4),i8*inreg%l)#0
%m=load i8*,i8**@_SMLZN9BinPrimIO13augmentWriterE,align 8
call void@sml_write(i8*inreg bitcast(i8**getelementptr inbounds(<{[4x i8],i32,[8x i8*]}>,<{[4x i8],i32,[8x i8*]}>*@_SML_gvard7bed40ec7aa770a_posix_bin_prim_io,i64 0,i32 2,i64 0)to i8*),i8**inreg getelementptr inbounds(<{[4x i8],i32,[8x i8*]}>,<{[4x i8],i32,[8x i8*]}>*@_SML_gvard7bed40ec7aa770a_posix_bin_prim_io,i64 0,i32 2,i64 5),i8*inreg%m)#0
%n=load i8*,i8**@_SMLZN23SMLSharp__SMLNJ__POSIX__IO11mkBinReaderE,align 8
call void@sml_write(i8*inreg bitcast(i8**getelementptr inbounds(<{[4x i8],i32,[8x i8*]}>,<{[4x i8],i32,[8x i8*]}>*@_SML_gvard7bed40ec7aa770a_posix_bin_prim_io,i64 0,i32 2,i64 0)to i8*),i8**inreg getelementptr inbounds(<{[4x i8],i32,[8x i8*]}>,<{[4x i8],i32,[8x i8*]}>*@_SML_gvard7bed40ec7aa770a_posix_bin_prim_io,i64 0,i32 2,i64 6),i8*inreg%n)#0
%o=load i8*,i8**@_SMLZN23SMLSharp__SMLNJ__POSIX__IO11mkBinWriterE,align 8
call void@sml_write(i8*inreg bitcast(i8**getelementptr inbounds(<{[4x i8],i32,[8x i8*]}>,<{[4x i8],i32,[8x i8*]}>*@_SML_gvard7bed40ec7aa770a_posix_bin_prim_io,i64 0,i32 2,i64 0)to i8*),i8**inreg getelementptr inbounds(<{[4x i8],i32,[8x i8*]}>,<{[4x i8],i32,[8x i8*]}>*@_SML_gvard7bed40ec7aa770a_posix_bin_prim_io,i64 0,i32 2,i64 7),i8*inreg%o)#0
call void@sml_end()#0
ret void
}
define fastcc i32@_SMLFN29SMLSharp__SMLNJ__PosixBinPrimIO6PrimIO7compareE(i8*inreg%a)local_unnamed_addr#1 gc"smlsharp"{
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=load i8*,i8**getelementptr inbounds(<{[4x i8],i32,[8x i8*]}>,<{[4x i8],i32,[8x i8*]}>*@_SML_gvard7bed40ec7aa770a_posix_bin_prim_io,i64 0,i32 2,i64 0),align 8
%k=getelementptr inbounds i8,i8*%j,i64 16
%l=bitcast i8*%k to i8*(i8*,i8*)**
%m=load i8*(i8*,i8*)*,i8*(i8*,i8*)**%l,align 8
%n=bitcast i8*%j to i8**
%o=load i8*,i8**%n,align 8
%p=call fastcc i8*%m(i8*inreg%o,i8*inreg%h)
%q=bitcast i8*%p to i32*
%r=load i32,i32*%q,align 4
ret i32%r
}
define fastcc i8*@_SMLFN29SMLSharp__SMLNJ__PosixBinPrimIO6PrimIO10openVectorE(i8*inreg%a)local_unnamed_addr#1 gc"smlsharp"{
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]
%j=load i8*,i8**getelementptr inbounds(<{[4x i8],i32,[8x i8*]}>,<{[4x i8],i32,[8x i8*]}>*@_SML_gvard7bed40ec7aa770a_posix_bin_prim_io,i64 0,i32 2,i64 1),align 8
%k=getelementptr inbounds i8,i8*%j,i64 16
%l=bitcast i8*%k to i8*(i8*,i8*)**
%m=load i8*(i8*,i8*)*,i8*(i8*,i8*)**%l,align 8
%n=bitcast i8*%j to i8**
%o=load i8*,i8**%n,align 8
%p=tail call fastcc i8*%m(i8*inreg%o,i8*inreg%h)
ret i8*%p
}
define fastcc i8*@_SMLFN29SMLSharp__SMLNJ__PosixBinPrimIO6PrimIO6nullRdE(i32 inreg%a)local_unnamed_addr#1 gc"smlsharp"{
%b=alloca i8*,align 8
call void@llvm.gcroot(i8**%b,i8*null)#0
%c=load atomic i32,i32*@sml_check_flag unordered,align 4
%d=icmp eq i32%c,0
br i1%d,label%f,label%e
e:
call void@sml_check(i32 inreg%c)
br label%f
f:
%g=load i8*,i8**getelementptr inbounds(<{[4x i8],i32,[8x i8*]}>,<{[4x i8],i32,[8x i8*]}>*@_SML_gvard7bed40ec7aa770a_posix_bin_prim_io,i64 0,i32 2,i64 2),align 8
%h=getelementptr inbounds i8,i8*%g,i64 16
%i=bitcast i8*%h to i8*(i8*,i8*)**
%j=load i8*(i8*,i8*)*,i8*(i8*,i8*)**%i,align 8
%k=bitcast i8*%g to i8**
%l=load i8*,i8**%k,align 8
store i8*%l,i8**%b,align 8
%m=call i8*@sml_alloc(i32 inreg 4)#0
%n=bitcast i8*%m to i32*
%o=getelementptr inbounds i8,i8*%m,i64 -4
%p=bitcast i8*%o to i32*
store i32 4,i32*%p,align 4
store i32%a,i32*%n,align 4
%q=load i8*,i8**%b,align 8
%r=tail call fastcc i8*%j(i8*inreg%q,i8*inreg%m)
ret i8*%r
}
define fastcc i8*@_SMLFN29SMLSharp__SMLNJ__PosixBinPrimIO6PrimIO6nullWrE(i32 inreg%a)local_unnamed_addr#1 gc"smlsharp"{
%b=alloca i8*,align 8
call void@llvm.gcroot(i8**%b,i8*null)#0
%c=load atomic i32,i32*@sml_check_flag unordered,align 4
%d=icmp eq i32%c,0
br i1%d,label%f,label%e
e:
call void@sml_check(i32 inreg%c)
br label%f
f:
%g=load i8*,i8**getelementptr inbounds(<{[4x i8],i32,[8x i8*]}>,<{[4x i8],i32,[8x i8*]}>*@_SML_gvard7bed40ec7aa770a_posix_bin_prim_io,i64 0,i32 2,i64 3),align 8
%h=getelementptr inbounds i8,i8*%g,i64 16
%i=bitcast i8*%h to i8*(i8*,i8*)**
%j=load i8*(i8*,i8*)*,i8*(i8*,i8*)**%i,align 8
%k=bitcast i8*%g to i8**
%l=load i8*,i8**%k,align 8
store i8*%l,i8**%b,align 8
%m=call i8*@sml_alloc(i32 inreg 4)#0
%n=bitcast i8*%m to i32*
%o=getelementptr inbounds i8,i8*%m,i64 -4
%p=bitcast i8*%o to i32*
store i32 4,i32*%p,align 4
store i32%a,i32*%n,align 4
%q=load i8*,i8**%b,align 8
%r=tail call fastcc i8*%j(i8*inreg%q,i8*inreg%m)
ret i8*%r
}
define fastcc i8*@_SMLFN29SMLSharp__SMLNJ__PosixBinPrimIO6PrimIO13augmentReaderE(i8*inreg%a)local_unnamed_addr#1 gc"smlsharp"{
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]
%j=load i8*,i8**getelementptr inbounds(<{[4x i8],i32,[8x i8*]}>,<{[4x i8],i32,[8x i8*]}>*@_SML_gvard7bed40ec7aa770a_posix_bin_prim_io,i64 0,i32 2,i64 4),align 8
%k=getelementptr inbounds i8,i8*%j,i64 16
%l=bitcast i8*%k to i8*(i8*,i8*)**
%m=load i8*(i8*,i8*)*,i8*(i8*,i8*)**%l,align 8
%n=bitcast i8*%j to i8**
%o=load i8*,i8**%n,align 8
%p=tail call fastcc i8*%m(i8*inreg%o,i8*inreg%h)
ret i8*%p
}
define fastcc i8*@_SMLFN29SMLSharp__SMLNJ__PosixBinPrimIO6PrimIO13augmentWriterE(i8*inreg%a)local_unnamed_addr#1 gc"smlsharp"{
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]
%j=load i8*,i8**getelementptr inbounds(<{[4x i8],i32,[8x i8*]}>,<{[4x i8],i32,[8x i8*]}>*@_SML_gvard7bed40ec7aa770a_posix_bin_prim_io,i64 0,i32 2,i64 5),align 8
%k=getelementptr inbounds i8,i8*%j,i64 16
%l=bitcast i8*%k to i8*(i8*,i8*)**
%m=load i8*(i8*,i8*)*,i8*(i8*,i8*)**%l,align 8
%n=bitcast i8*%j to i8**
%o=load i8*,i8**%n,align 8
%p=tail call fastcc i8*%m(i8*inreg%o,i8*inreg%h)
ret i8*%p
}
define fastcc i8*@_SMLFN29SMLSharp__SMLNJ__PosixBinPrimIO6openRdE(i8*inreg%a)#1 gc"smlsharp"{
%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%f,label%e
e:
call void@sml_check(i32 inreg%c)
br label%f
f:
%g=call i8*@sml_alloc(i32 inreg 20)#0
%h=getelementptr inbounds i8,i8*%g,i64 -4
%i=bitcast i8*%h to i32*
store i32 1342177296,i32*%i,align 4
%j=load i8*,i8**%b,align 8
%k=bitcast i8*%g to i8**
store i8*%j,i8**%k,align 8
%l=getelementptr inbounds i8,i8*%g,i64 8
%m=bitcast i8*%l to i8**
store i8*getelementptr inbounds(<{[4x i8],i32,[3x i8]}>,<{[4x i8],i32,[3x i8]}>*@a,i64 0,i32 2,i64 0),i8**%m,align 8
%n=getelementptr inbounds i8,i8*%g,i64 16
%o=bitcast i8*%n to i32*
store i32 3,i32*%o,align 4
%p=call fastcc i32@_SMLFN23SMLSharp__SMLNJ__POSIX__IO5openfE(i8*inreg%g)
%q=call i8*@sml_alloc(i32 inreg 20)#0
%r=bitcast i8*%q to i32*
%s=getelementptr inbounds i8,i8*%q,i64 -4
%t=bitcast i8*%s to i32*
store i32 1342177296,i32*%t,align 4
store i32%p,i32*%r,align 4
%u=getelementptr inbounds i8,i8*%q,i64 4
%v=bitcast i8*%u to i32*
store i32 1,i32*%v,align 4
%w=load i8*,i8**%b,align 8
%x=getelementptr inbounds i8,i8*%q,i64 8
%y=bitcast i8*%x to i8**
store i8*%w,i8**%y,align 8
%z=getelementptr inbounds i8,i8*%q,i64 16
%A=bitcast i8*%z to i32*
store i32 2,i32*%A,align 4
%B=tail call fastcc i8*@_SMLFN23SMLSharp__SMLNJ__POSIX__IO11mkBinReaderE(i8*inreg%q)
ret i8*%B
}
define fastcc i8*@_SMLFN29SMLSharp__SMLNJ__PosixBinPrimIO6openWrE(i8*inreg%a)#1 gc"smlsharp"{
%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%f,label%e
e:
call void@sml_check(i32 inreg%c)
br label%f
f:
%g=call i8*@sml_alloc(i32 inreg 20)#0
%h=getelementptr inbounds i8,i8*%g,i64 -4
%i=bitcast i8*%h to i32*
store i32 1342177296,i32*%i,align 4
%j=load i8*,i8**%b,align 8
%k=bitcast i8*%g to i8**
store i8*%j,i8**%k,align 8
%l=getelementptr inbounds i8,i8*%g,i64 8
%m=bitcast i8*%l to i8**
store i8*getelementptr inbounds(<{[4x i8],i32,[3x i8]}>,<{[4x i8],i32,[3x i8]}>*@c,i64 0,i32 2,i64 0),i8**%m,align 8
%n=getelementptr inbounds i8,i8*%g,i64 16
%o=bitcast i8*%n to i32*
store i32 3,i32*%o,align 4
%p=call fastcc i32@_SMLFN23SMLSharp__SMLNJ__POSIX__IO5openfE(i8*inreg%g)
%q=call i8*@sml_alloc(i32 inreg 28)#0
%r=bitcast i8*%q to i32*
%s=getelementptr inbounds i8,i8*%q,i64 -4
%t=bitcast i8*%s to i32*
store i32 1342177304,i32*%t,align 4
store i32 0,i32*%r,align 4
%u=getelementptr inbounds i8,i8*%q,i64 4
%v=bitcast i8*%u to i32*
store i32 4096,i32*%v,align 4
%w=getelementptr inbounds i8,i8*%q,i64 8
%x=bitcast i8*%w to i32*
store i32%p,i32*%x,align 4
%y=getelementptr inbounds i8,i8*%q,i64 12
%z=bitcast i8*%y to i32*
store i32 1,i32*%z,align 4
%A=load i8*,i8**%b,align 8
%B=getelementptr inbounds i8,i8*%q,i64 16
%C=bitcast i8*%B to i8**
store i8*%A,i8**%C,align 8
%D=getelementptr inbounds i8,i8*%q,i64 24
%E=bitcast i8*%D to i32*
store i32 4,i32*%E,align 4
%F=tail call fastcc i8*@_SMLFN23SMLSharp__SMLNJ__POSIX__IO11mkBinWriterE(i8*inreg%q)
ret i8*%F
}
define fastcc i8*@_SMLFN29SMLSharp__SMLNJ__PosixBinPrimIO7openAppE(i8*inreg%a)#1 gc"smlsharp"{
%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%f,label%e
e:
call void@sml_check(i32 inreg%c)
br label%f
f:
%g=call i8*@sml_alloc(i32 inreg 20)#0
%h=getelementptr inbounds i8,i8*%g,i64 -4
%i=bitcast i8*%h to i32*
store i32 1342177296,i32*%i,align 4
%j=load i8*,i8**%b,align 8
%k=bitcast i8*%g to i8**
store i8*%j,i8**%k,align 8
%l=getelementptr inbounds i8,i8*%g,i64 8
%m=bitcast i8*%l to i8**
store i8*getelementptr inbounds(<{[4x i8],i32,[3x i8]}>,<{[4x i8],i32,[3x i8]}>*@e,i64 0,i32 2,i64 0),i8**%m,align 8
%n=getelementptr inbounds i8,i8*%g,i64 16
%o=bitcast i8*%n to i32*
store i32 3,i32*%o,align 4
%p=call fastcc i32@_SMLFN23SMLSharp__SMLNJ__POSIX__IO5openfE(i8*inreg%g)
%q=call i8*@sml_alloc(i32 inreg 28)#0
%r=bitcast i8*%q to i32*
%s=getelementptr inbounds i8,i8*%q,i64 -4
%t=bitcast i8*%s to i32*
store i32 1342177304,i32*%t,align 4
store i32 1,i32*%r,align 4
%u=getelementptr inbounds i8,i8*%q,i64 4
%v=bitcast i8*%u to i32*
store i32 4096,i32*%v,align 4
%w=getelementptr inbounds i8,i8*%q,i64 8
%x=bitcast i8*%w to i32*
store i32%p,i32*%x,align 4
%y=getelementptr inbounds i8,i8*%q,i64 12
%z=bitcast i8*%y to i32*
store i32 1,i32*%z,align 4
%A=load i8*,i8**%b,align 8
%B=getelementptr inbounds i8,i8*%q,i64 16
%C=bitcast i8*%B to i8**
store i8*%A,i8**%C,align 8
%D=getelementptr inbounds i8,i8*%q,i64 24
%E=bitcast i8*%D to i32*
store i32 4,i32*%E,align 4
%F=tail call fastcc i8*@_SMLFN23SMLSharp__SMLNJ__POSIX__IO11mkBinWriterE(i8*inreg%q)
ret i8*%F
}
define fastcc i8*@_SMLFN29SMLSharp__SMLNJ__PosixBinPrimIO8mkReaderE(i8*inreg%a)local_unnamed_addr#1 gc"smlsharp"{
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]
%j=load i8*,i8**getelementptr inbounds(<{[4x i8],i32,[8x i8*]}>,<{[4x i8],i32,[8x i8*]}>*@_SML_gvard7bed40ec7aa770a_posix_bin_prim_io,i64 0,i32 2,i64 6),align 8
%k=getelementptr inbounds i8,i8*%j,i64 16
%l=bitcast i8*%k to i8*(i8*,i8*)**
%m=load i8*(i8*,i8*)*,i8*(i8*,i8*)**%l,align 8
%n=bitcast i8*%j to i8**
%o=load i8*,i8**%n,align 8
%p=tail call fastcc i8*%m(i8*inreg%o,i8*inreg%h)
ret i8*%p
}
define fastcc i8*@_SMLFN29SMLSharp__SMLNJ__PosixBinPrimIO8mkWriterE(i8*inreg%a)local_unnamed_addr#1 gc"smlsharp"{
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]
%j=load i8*,i8**getelementptr inbounds(<{[4x i8],i32,[8x i8*]}>,<{[4x i8],i32,[8x i8*]}>*@_SML_gvard7bed40ec7aa770a_posix_bin_prim_io,i64 0,i32 2,i64 7),align 8
%k=getelementptr inbounds i8,i8*%j,i64 16
%l=bitcast i8*%k to i8*(i8*,i8*)**
%m=load i8*(i8*,i8*)*,i8*(i8*,i8*)**%l,align 8
%n=bitcast i8*%j to i8**
%o=load i8*,i8**%n,align 8
%p=tail call fastcc i8*%m(i8*inreg%o,i8*inreg%h)
ret i8*%p
}
define internal fastcc i8*@_SMLLN29SMLSharp__SMLNJ__PosixBinPrimIO6openRdE_51(i8*inreg%a,i8*inreg%b)#1 gc"smlsharp"{
%c=tail call fastcc i8*@_SMLFN29SMLSharp__SMLNJ__PosixBinPrimIO6openRdE(i8*inreg%b)
ret i8*%c
}
define internal fastcc i8*@_SMLLN29SMLSharp__SMLNJ__PosixBinPrimIO6openWrE_52(i8*inreg%a,i8*inreg%b)#1 gc"smlsharp"{
%c=tail call fastcc i8*@_SMLFN29SMLSharp__SMLNJ__PosixBinPrimIO6openWrE(i8*inreg%b)
ret i8*%c
}
define internal fastcc i8*@_SMLLN29SMLSharp__SMLNJ__PosixBinPrimIO7openAppE_53(i8*inreg%a,i8*inreg%b)#1 gc"smlsharp"{
%c=tail call fastcc i8*@_SMLFN29SMLSharp__SMLNJ__PosixBinPrimIO7openAppE(i8*inreg%b)
ret i8*%c
}
attributes#0={nounwind}
attributes#1={uwtable}
attributes#2={noreturn nounwind}
