@ -5,28 +5,32 @@ target triple = "wasm32-unknown-wasi"
declare noalias nonnull i8 * @runtime.alloc ( i32 , i8 * , i8 * )
define hidden void @main.init ( i8 * %context , i8 * %parentHandle ) unnamed_addr {
; F u n c t i o n Attrs: nounwind
define hidden void @main.init ( i8 * %context , i8 * %parentHandle ) unnamed_addr #0 {
entry:
ret void
}
define hidden i32 @main.sliceLen ( i32 * %ints.data , i32 %ints.len , i32 %ints.cap , i8 * %context , i8 * %parentHandle ) unnamed_addr {
; F u n c t i o n Attrs: nounwind
define hidden i32 @main.sliceLen ( i32 * %ints.data , i32 %ints.len , i32 %ints.cap , i8 * %context , i8 * %parentHandle ) unnamed_addr #0 {
entry:
ret i32 %ints.len
}
define hidden i32 @main.sliceCap ( i32 * %ints.data , i32 %ints.len , i32 %ints.cap , i8 * %context , i8 * %parentHandle ) unnamed_addr {
; F u n c t i o n Attrs: nounwind
define hidden i32 @main.sliceCap ( i32 * %ints.data , i32 %ints.len , i32 %ints.cap , i8 * %context , i8 * %parentHandle ) unnamed_addr #0 {
entry:
ret i32 %ints.cap
}
define hidden i32 @main.sliceElement ( i32 * %ints.data , i32 %ints.len , i32 %ints.cap , i32 %index , i8 * %context , i8 * %parentHandle ) unnamed_addr {
; F u n c t i o n Attrs: nounwind
define hidden i32 @main.sliceElement ( i32 * %ints.data , i32 %ints.len , i32 %ints.cap , i32 %index , i8 * %context , i8 * %parentHandle ) unnamed_addr #0 {
entry:
%.not = icmp ult i32 %index , %ints.len
br i1 %.not , label %lookup.next , label %lookup.throw
lookup.throw: ; p r e d s = %entry
call void @runtime.lookupPanic ( i8 * undef , i8 * null )
call void @runtime.lookupPanic ( i8 * undef , i8 * null ) #0
unreachable
lookup.next: ; p r e d s = %entry
@ -37,9 +41,10 @@ lookup.next: ; preds = %entry
declare void @runtime.lookupPanic ( i8 * , i8 * )
define hidden { i32 * , i32 , i32 } @main.sliceAppendValues ( i32 * %ints.data , i32 %ints.len , i32 %ints.cap , i8 * %context , i8 * %parentHandle ) unnamed_addr {
; F u n c t i o n Attrs: nounwind
define hidden { i32 * , i32 , i32 } @main.sliceAppendValues ( i32 * %ints.data , i32 %ints.len , i32 %ints.cap , i8 * %context , i8 * %parentHandle ) unnamed_addr #0 {
entry:
%varargs = call i8 * @runtime.alloc ( i32 12 , i8 * undef , i8 * null )
%varargs = call i8 * @runtime.alloc ( i32 12 , i8 * undef , i8 * null ) #0
%0 = bitcast i8 * %varargs to i32 *
store i32 1 , i32 * %0 , align 4
%1 = getelementptr inbounds i8 , i8 * %varargs , i32 4
@ -49,7 +54,7 @@ entry:
%4 = bitcast i8 * %3 to i32 *
store i32 3 , i32 * %4 , align 4
%append.srcPtr = bitcast i32 * %ints.data to i8 *
%append.new = call { i8 * , i32 , i32 } @runtime.sliceAppend ( i8 * %append.srcPtr , i8 * nonnull %varargs , i32 %ints.len , i32 %ints.cap , i32 3 , i32 4 , i8 * undef , i8 * null )
%append.new = call { i8 * , i32 , i32 } @runtime.sliceAppend ( i8 * %append.srcPtr , i8 * nonnull %varargs , i32 %ints.len , i32 %ints.cap , i32 3 , i32 4 , i8 * undef , i8 * null ) #0
%append.newPtr = extractvalue { i8 * , i32 , i32 } %append.new , 0
%append.newBuf = bitcast i8 * %append.newPtr to i32 *
%append.newLen = extractvalue { i8 * , i32 , i32 } %append.new , 1
@ -62,11 +67,12 @@ entry:
declare { i8 * , i32 , i32 } @runtime.sliceAppend ( i8 * , i8 * nocapture readonly , i32 , i32 , i32 , i32 , i8 * , i8 * )
define hidden { i32 * , i32 , i32 } @main.sliceAppendSlice ( i32 * %ints.data , i32 %ints.len , i32 %ints.cap , i32 * %added.data , i32 %added.len , i32 %added.cap , i8 * %context , i8 * %parentHandle ) unnamed_addr {
; F u n c t i o n Attrs: nounwind
define hidden { i32 * , i32 , i32 } @main.sliceAppendSlice ( i32 * %ints.data , i32 %ints.len , i32 %ints.cap , i32 * %added.data , i32 %added.len , i32 %added.cap , i8 * %context , i8 * %parentHandle ) unnamed_addr #0 {
entry:
%append.srcPtr = bitcast i32 * %ints.data to i8 *
%append.srcPtr1 = bitcast i32 * %added.data to i8 *
%append.new = call { i8 * , i32 , i32 } @runtime.sliceAppend ( i8 * %append.srcPtr , i8 * %append.srcPtr1 , i32 %ints.len , i32 %ints.cap , i32 %added.len , i32 4 , i8 * undef , i8 * null )
%append.new = call { i8 * , i32 , i32 } @runtime.sliceAppend ( i8 * %append.srcPtr , i8 * %append.srcPtr1 , i32 %ints.len , i32 %ints.cap , i32 %added.len , i32 4 , i8 * undef , i8 * null ) #0
%append.newPtr = extractvalue { i8 * , i32 , i32 } %append.new , 0
%append.newBuf = bitcast i8 * %append.newPtr to i32 *
%append.newLen = extractvalue { i8 * , i32 , i32 } %append.new , 1
@ -77,27 +83,29 @@ entry:
ret { i32 * , i32 , i32 } %2
}
define hidden i32 @main.sliceCopy ( i32 * %dst.data , i32 %dst.len , i32 %dst.cap , i32 * %src.data , i32 %src.len , i32 %src.cap , i8 * %context , i8 * %parentHandle ) unnamed_addr {
; F u n c t i o n Attrs: nounwind
define hidden i32 @main.sliceCopy ( i32 * %dst.data , i32 %dst.len , i32 %dst.cap , i32 * %src.data , i32 %src.len , i32 %src.cap , i8 * %context , i8 * %parentHandle ) unnamed_addr #0 {
entry:
%copy.dstPtr = bitcast i32 * %dst.data to i8 *
%copy.srcPtr = bitcast i32 * %src.data to i8 *
%copy.n = call i32 @runtime.sliceCopy ( i8 * %copy.dstPtr , i8 * %copy.srcPtr , i32 %dst.len , i32 %src.len , i32 4 , i8 * undef , i8 * null )
%copy.n = call i32 @runtime.sliceCopy ( i8 * %copy.dstPtr , i8 * %copy.srcPtr , i32 %dst.len , i32 %src.len , i32 4 , i8 * undef , i8 * null ) #0
ret i32 %copy.n
}
declare i32 @runtime.sliceCopy ( i8 * nocapture writeonly , i8 * nocapture readonly , i32 , i32 , i32 , i8 * , i8 * )
define hidden { i8 * , i32 , i32 } @main.makeByteSlice ( i32 %len , i8 * %context , i8 * %parentHandle ) unnamed_addr {
; F u n c t i o n Attrs: nounwind
define hidden { i8 * , i32 , i32 } @main.makeByteSlice ( i32 %len , i8 * %context , i8 * %parentHandle ) unnamed_addr #0 {
entry:
%slice.maxcap = icmp slt i32 %len , 0
br i1 %slice.maxcap , label %slice.throw , label %slice.next
slice.throw: ; p r e d s = %entry
call void @runtime.slicePanic ( i8 * undef , i8 * null )
call void @runtime.slicePanic ( i8 * undef , i8 * null ) #0
unreachable
slice.next: ; p r e d s = %entry
%makeslice.buf = call i8 * @runtime.alloc ( i32 %len , i8 * undef , i8 * null )
%makeslice.buf = call i8 * @runtime.alloc ( i32 %len , i8 * undef , i8 * null ) #0
%0 = insertvalue { i8 * , i32 , i32 } undef , i8 * %makeslice.buf , 0
%1 = insertvalue { i8 * , i32 , i32 } %0 , i32 %len , 1
%2 = insertvalue { i8 * , i32 , i32 } %1 , i32 %len , 2
@ -106,18 +114,19 @@ slice.next: ; preds = %entry
declare void @runtime.slicePanic ( i8 * , i8 * )
define hidden { i16 * , i32 , i32 } @main.makeInt16Slice ( i32 %len , i8 * %context , i8 * %parentHandle ) unnamed_addr {
; F u n c t i o n Attrs: nounwind
define hidden { i16 * , i32 , i32 } @main.makeInt16Slice ( i32 %len , i8 * %context , i8 * %parentHandle ) unnamed_addr #0 {
entry:
%slice.maxcap = icmp slt i32 %len , 0
br i1 %slice.maxcap , label %slice.throw , label %slice.next
slice.throw: ; p r e d s = %entry
call void @runtime.slicePanic ( i8 * undef , i8 * null )
call void @runtime.slicePanic ( i8 * undef , i8 * null ) #0
unreachable
slice.next: ; p r e d s = %entry
%makeslice.cap = shl i32 %len , 1
%makeslice.buf = call i8 * @runtime.alloc ( i32 %makeslice.cap , i8 * undef , i8 * null )
%makeslice.buf = call i8 * @runtime.alloc ( i32 %makeslice.cap , i8 * undef , i8 * null ) #0
%makeslice.array = bitcast i8 * %makeslice.buf to i16 *
%0 = insertvalue { i16 * , i32 , i32 } undef , i16 * %makeslice.array , 0
%1 = insertvalue { i16 * , i32 , i32 } %0 , i32 %len , 1
@ -125,18 +134,19 @@ slice.next: ; preds = %entry
ret { i16 * , i32 , i32 } %2
}
define hidden { [ 3 x i8 ] * , i32 , i32 } @main.makeArraySlice ( i32 %len , i8 * %context , i8 * %parentHandle ) unnamed_addr {
; F u n c t i o n Attrs: nounwind
define hidden { [ 3 x i8 ] * , i32 , i32 } @main.makeArraySlice ( i32 %len , i8 * %context , i8 * %parentHandle ) unnamed_addr #0 {
entry:
%slice.maxcap = icmp ugt i32 %len , 1431655765
br i1 %slice.maxcap , label %slice.throw , label %slice.next
slice.throw: ; p r e d s = %entry
call void @runtime.slicePanic ( i8 * undef , i8 * null )
call void @runtime.slicePanic ( i8 * undef , i8 * null ) #0
unreachable
slice.next: ; p r e d s = %entry
%makeslice.cap = mul i32 %len , 3
%makeslice.buf = call i8 * @runtime.alloc ( i32 %makeslice.cap , i8 * undef , i8 * null )
%makeslice.buf = call i8 * @runtime.alloc ( i32 %makeslice.cap , i8 * undef , i8 * null ) #0
%makeslice.array = bitcast i8 * %makeslice.buf to [ 3 x i8 ] *
%0 = insertvalue { [ 3 x i8 ] * , i32 , i32 } undef , [ 3 x i8 ] * %makeslice.array , 0
%1 = insertvalue { [ 3 x i8 ] * , i32 , i32 } %0 , i32 %len , 1
@ -144,21 +154,24 @@ slice.next: ; preds = %entry
ret { [ 3 x i8 ] * , i32 , i32 } %2
}
define hidden { i32 * , i32 , i32 } @main.makeInt32Slice ( i32 %len , i8 * %context , i8 * %parentHandle ) unnamed_addr {
; F u n c t i o n Attrs: nounwind
define hidden { i32 * , i32 , i32 } @main.makeInt32Slice ( i32 %len , i8 * %context , i8 * %parentHandle ) unnamed_addr #0 {
entry:
%slice.maxcap = icmp ugt i32 %len , 1073741823
br i1 %slice.maxcap , label %slice.throw , label %slice.next
slice.throw: ; p r e d s = %entry
call void @runtime.slicePanic ( i8 * undef , i8 * null )
call void @runtime.slicePanic ( i8 * undef , i8 * null ) #0
unreachable
slice.next: ; p r e d s = %entry
%makeslice.cap = shl i32 %len , 2
%makeslice.buf = call i8 * @runtime.alloc ( i32 %makeslice.cap , i8 * undef , i8 * null )
%makeslice.buf = call i8 * @runtime.alloc ( i32 %makeslice.cap , i8 * undef , i8 * null ) #0
%makeslice.array = bitcast i8 * %makeslice.buf to i32 *
%0 = insertvalue { i32 * , i32 , i32 } undef , i32 * %makeslice.array , 0
%1 = insertvalue { i32 * , i32 , i32 } %0 , i32 %len , 1
%2 = insertvalue { i32 * , i32 , i32 } %1 , i32 %len , 2
ret { i32 * , i32 , i32 } %2
}
attributes #0 = { nounwind }