; ModuleID = 'github.com/goplus/llgo/compiler/cl/_testrt/unsafe' source_filename = "github.com/goplus/llgo/compiler/cl/_testrt/unsafe" %"github.com/goplus/llgo/runtime/internal/runtime.String" = type { ptr, i64 } %"github.com/goplus/llgo/runtime/internal/runtime.eface" = type { ptr, ptr } %"github.com/goplus/llgo/runtime/internal/runtime.Slice" = type { ptr, i64, i64 } @"github.com/goplus/llgo/compiler/cl/_testrt/unsafe.init$guard" = global i1 false, align 1 @0 = private unnamed_addr constant [5 x i8] c"error", align 1 @_llgo_string = linkonce global ptr null, align 8 @1 = private unnamed_addr constant [4 x i8] c"abc\00", align 1 @2 = private unnamed_addr constant [3 x i8] c"abc", align 1 define void @"github.com/goplus/llgo/compiler/cl/_testrt/unsafe.init"() { _llgo_0: %0 = load i1, ptr @"github.com/goplus/llgo/compiler/cl/_testrt/unsafe.init$guard", align 1 br i1 %0, label %_llgo_2, label %_llgo_1 _llgo_1: ; preds = %_llgo_0 store i1 true, ptr @"github.com/goplus/llgo/compiler/cl/_testrt/unsafe.init$guard", align 1 call void @"github.com/goplus/llgo/compiler/cl/_testrt/unsafe.init$after"() br label %_llgo_2 _llgo_2: ; preds = %_llgo_1, %_llgo_0 ret void } define void @"github.com/goplus/llgo/compiler/cl/_testrt/unsafe.main"() { _llgo_0: br i1 false, label %_llgo_1, label %_llgo_2 _llgo_1: ; preds = %_llgo_0 %0 = load ptr, ptr @_llgo_string, align 8 %1 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocU"(i64 16) store %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @0, i64 5 }, ptr %1, align 8 %2 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" undef, ptr %0, 0 %3 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" %2, ptr %1, 1 call void @"github.com/goplus/llgo/runtime/internal/runtime.Panic"(%"github.com/goplus/llgo/runtime/internal/runtime.eface" %3) unreachable _llgo_2: ; preds = %_llgo_0 br i1 false, label %_llgo_3, label %_llgo_4 _llgo_3: ; preds = %_llgo_2 %4 = load ptr, ptr @_llgo_string, align 8 %5 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocU"(i64 16) store %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @0, i64 5 }, ptr %5, align 8 %6 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" undef, ptr %4, 0 %7 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" %6, ptr %5, 1 call void @"github.com/goplus/llgo/runtime/internal/runtime.Panic"(%"github.com/goplus/llgo/runtime/internal/runtime.eface" %7) unreachable _llgo_4: ; preds = %_llgo_2 br i1 false, label %_llgo_5, label %_llgo_6 _llgo_5: ; preds = %_llgo_4 %8 = load ptr, ptr @_llgo_string, align 8 %9 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocU"(i64 16) store %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @0, i64 5 }, ptr %9, align 8 %10 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" undef, ptr %8, 0 %11 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" %10, ptr %9, 1 call void @"github.com/goplus/llgo/runtime/internal/runtime.Panic"(%"github.com/goplus/llgo/runtime/internal/runtime.eface" %11) unreachable _llgo_6: ; preds = %_llgo_4 br i1 false, label %_llgo_7, label %_llgo_8 _llgo_7: ; preds = %_llgo_6 %12 = load ptr, ptr @_llgo_string, align 8 %13 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocU"(i64 16) store %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @0, i64 5 }, ptr %13, align 8 %14 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" undef, ptr %12, 0 %15 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" %14, ptr %13, 1 call void @"github.com/goplus/llgo/runtime/internal/runtime.Panic"(%"github.com/goplus/llgo/runtime/internal/runtime.eface" %15) unreachable _llgo_8: ; preds = %_llgo_6 br i1 false, label %_llgo_9, label %_llgo_10 _llgo_9: ; preds = %_llgo_8 %16 = load ptr, ptr @_llgo_string, align 8 %17 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocU"(i64 16) store %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @0, i64 5 }, ptr %17, align 8 %18 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" undef, ptr %16, 0 %19 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" %18, ptr %17, 1 call void @"github.com/goplus/llgo/runtime/internal/runtime.Panic"(%"github.com/goplus/llgo/runtime/internal/runtime.eface" %19) unreachable _llgo_10: ; preds = %_llgo_8 br i1 false, label %_llgo_11, label %_llgo_12 _llgo_11: ; preds = %_llgo_10 %20 = load ptr, ptr @_llgo_string, align 8 %21 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocU"(i64 16) store %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @0, i64 5 }, ptr %21, align 8 %22 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" undef, ptr %20, 0 %23 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" %22, ptr %21, 1 call void @"github.com/goplus/llgo/runtime/internal/runtime.Panic"(%"github.com/goplus/llgo/runtime/internal/runtime.eface" %23) unreachable _llgo_12: ; preds = %_llgo_10 br i1 false, label %_llgo_13, label %_llgo_14 _llgo_13: ; preds = %_llgo_12 %24 = load ptr, ptr @_llgo_string, align 8 %25 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocU"(i64 16) store %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @0, i64 5 }, ptr %25, align 8 %26 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" undef, ptr %24, 0 %27 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" %26, ptr %25, 1 call void @"github.com/goplus/llgo/runtime/internal/runtime.Panic"(%"github.com/goplus/llgo/runtime/internal/runtime.eface" %27) unreachable _llgo_14: ; preds = %_llgo_12 br i1 false, label %_llgo_15, label %_llgo_16 _llgo_15: ; preds = %_llgo_14 %28 = load ptr, ptr @_llgo_string, align 8 %29 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocU"(i64 16) store %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @0, i64 5 }, ptr %29, align 8 %30 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" undef, ptr %28, 0 %31 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" %30, ptr %29, 1 call void @"github.com/goplus/llgo/runtime/internal/runtime.Panic"(%"github.com/goplus/llgo/runtime/internal/runtime.eface" %31) unreachable _llgo_16: ; preds = %_llgo_14 br i1 false, label %_llgo_17, label %_llgo_18 _llgo_17: ; preds = %_llgo_16 %32 = load ptr, ptr @_llgo_string, align 8 %33 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocU"(i64 16) store %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @0, i64 5 }, ptr %33, align 8 %34 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" undef, ptr %32, 0 %35 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" %34, ptr %33, 1 call void @"github.com/goplus/llgo/runtime/internal/runtime.Panic"(%"github.com/goplus/llgo/runtime/internal/runtime.eface" %35) unreachable _llgo_18: ; preds = %_llgo_16 br i1 false, label %_llgo_19, label %_llgo_20 _llgo_19: ; preds = %_llgo_18 %36 = load ptr, ptr @_llgo_string, align 8 %37 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocU"(i64 16) store %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @0, i64 5 }, ptr %37, align 8 %38 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" undef, ptr %36, 0 %39 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" %38, ptr %37, 1 call void @"github.com/goplus/llgo/runtime/internal/runtime.Panic"(%"github.com/goplus/llgo/runtime/internal/runtime.eface" %39) unreachable _llgo_20: ; preds = %_llgo_18 %40 = call i1 @"github.com/goplus/llgo/runtime/internal/runtime.StringEqual"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @1, i64 3 }, %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @2, i64 3 }) %41 = xor i1 %40, true br i1 %41, label %_llgo_21, label %_llgo_22 _llgo_21: ; preds = %_llgo_20 %42 = load ptr, ptr @_llgo_string, align 8 %43 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocU"(i64 16) store %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @0, i64 5 }, ptr %43, align 8 %44 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" undef, ptr %42, 0 %45 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" %44, ptr %43, 1 call void @"github.com/goplus/llgo/runtime/internal/runtime.Panic"(%"github.com/goplus/llgo/runtime/internal/runtime.eface" %45) unreachable _llgo_22: ; preds = %_llgo_20 %46 = load i8, ptr @1, align 1 %47 = icmp ne i8 %46, 97 br i1 %47, label %_llgo_23, label %_llgo_26 _llgo_23: ; preds = %_llgo_25, %_llgo_26, %_llgo_22 %48 = load ptr, ptr @_llgo_string, align 8 %49 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocU"(i64 16) store %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @0, i64 5 }, ptr %49, align 8 %50 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" undef, ptr %48, 0 %51 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" %50, ptr %49, 1 call void @"github.com/goplus/llgo/runtime/internal/runtime.Panic"(%"github.com/goplus/llgo/runtime/internal/runtime.eface" %51) unreachable _llgo_24: ; preds = %_llgo_25 %52 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocZ"(i64 16) %53 = getelementptr inbounds i64, ptr %52, i64 0 %54 = getelementptr inbounds i64, ptr %52, i64 1 store i64 1, ptr %53, align 4 store i64 2, ptr %54, align 4 %55 = getelementptr inbounds i64, ptr %52, i64 0 %56 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" undef, ptr %55, 0 %57 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %56, i64 2, 1 %58 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %57, i64 2, 2 %59 = extractvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %58, 0 %60 = extractvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %58, 1 %61 = icmp sge i64 0, %60 call void @"github.com/goplus/llgo/runtime/internal/runtime.AssertIndexRange"(i1 %61) %62 = getelementptr inbounds i64, ptr %59, i64 0 %63 = load i64, ptr %62, align 4 %64 = icmp ne i64 %63, 1 br i1 %64, label %_llgo_27, label %_llgo_29 _llgo_25: ; preds = %_llgo_26 %65 = load i8, ptr getelementptr inbounds (i8, ptr @1, i64 2), align 1 %66 = icmp ne i8 %65, 99 br i1 %66, label %_llgo_23, label %_llgo_24 _llgo_26: ; preds = %_llgo_22 %67 = load i8, ptr getelementptr inbounds (i8, ptr @1, i64 1), align 1 %68 = icmp ne i8 %67, 98 br i1 %68, label %_llgo_23, label %_llgo_25 _llgo_27: ; preds = %_llgo_29, %_llgo_24 %69 = load ptr, ptr @_llgo_string, align 8 %70 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocU"(i64 16) store %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @0, i64 5 }, ptr %70, align 8 %71 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" undef, ptr %69, 0 %72 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" %71, ptr %70, 1 call void @"github.com/goplus/llgo/runtime/internal/runtime.Panic"(%"github.com/goplus/llgo/runtime/internal/runtime.eface" %72) unreachable _llgo_28: ; preds = %_llgo_29 %73 = extractvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %58, 0 %74 = load i64, ptr %73, align 4 %75 = icmp ne i64 %74, 1 br i1 %75, label %_llgo_30, label %_llgo_31 _llgo_29: ; preds = %_llgo_24 %76 = extractvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %58, 0 %77 = extractvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %58, 1 %78 = icmp sge i64 1, %77 call void @"github.com/goplus/llgo/runtime/internal/runtime.AssertIndexRange"(i1 %78) %79 = getelementptr inbounds i64, ptr %76, i64 1 %80 = load i64, ptr %79, align 4 %81 = icmp ne i64 %80, 2 br i1 %81, label %_llgo_27, label %_llgo_28 _llgo_30: ; preds = %_llgo_28 %82 = load ptr, ptr @_llgo_string, align 8 %83 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocU"(i64 16) store %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @0, i64 5 }, ptr %83, align 8 %84 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" undef, ptr %82, 0 %85 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" %84, ptr %83, 1 call void @"github.com/goplus/llgo/runtime/internal/runtime.Panic"(%"github.com/goplus/llgo/runtime/internal/runtime.eface" %85) unreachable _llgo_31: ; preds = %_llgo_28 %86 = icmp ne i64 ptrtoint (ptr getelementptr (i8, ptr null, i64 1) to i64), 1 br i1 %86, label %_llgo_32, label %_llgo_33 _llgo_32: ; preds = %_llgo_31 %87 = load ptr, ptr @_llgo_string, align 8 %88 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocU"(i64 16) store %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @0, i64 5 }, ptr %88, align 8 %89 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" undef, ptr %87, 0 %90 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" %89, ptr %88, 1 call void @"github.com/goplus/llgo/runtime/internal/runtime.Panic"(%"github.com/goplus/llgo/runtime/internal/runtime.eface" %90) unreachable _llgo_33: ; preds = %_llgo_31 ret void } define void @"github.com/goplus/llgo/compiler/cl/_testrt/unsafe.init$after"() { _llgo_0: %0 = load ptr, ptr @_llgo_string, align 8 %1 = icmp eq ptr %0, null br i1 %1, label %_llgo_1, label %_llgo_2 _llgo_1: ; preds = %_llgo_0 %2 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.Basic"(i64 24) store ptr %2, ptr @_llgo_string, align 8 br label %_llgo_2 _llgo_2: ; preds = %_llgo_1, %_llgo_0 ret void } declare ptr @"github.com/goplus/llgo/runtime/internal/runtime.Basic"(i64) declare ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocU"(i64) declare void @"github.com/goplus/llgo/runtime/internal/runtime.Panic"(%"github.com/goplus/llgo/runtime/internal/runtime.eface") declare i1 @"github.com/goplus/llgo/runtime/internal/runtime.StringEqual"(%"github.com/goplus/llgo/runtime/internal/runtime.String", %"github.com/goplus/llgo/runtime/internal/runtime.String") declare ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocZ"(i64) declare void @"github.com/goplus/llgo/runtime/internal/runtime.AssertIndexRange"(i1)