; LLVM IR from Tiramisu-Compiler/tiramisu :: 3rdParty/isl (isl_test_imath)

; Unoptimized IR (clang -disable-llvm-passes):
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"

%struct.mpz = type { i32, ptr, i32, i32, i8 }

@MP_OK = external constant i32, align 4
@.str = external hidden unnamed_addr constant [16 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [90 x i8], align 1
@__PRETTY_FUNCTION__.test_imath_internals = external hidden unnamed_addr constant [27 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [22 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [14 x i8], align 1
@MP_ZPOS = external constant i8, align 1
@.str.4 = external hidden unnamed_addr constant [20 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [19 x i8], align 1
@MP_NEG = external constant i8, align 1
@.str.6 = external hidden unnamed_addr constant [19 x i8], align 1
@.str.7 = external hidden unnamed_addr constant [19 x i8], align 1
@.str.8 = external hidden unnamed_addr constant [14 x i8], align 1
@.str.9 = external hidden unnamed_addr constant [19 x i8], align 1

; Function Attrs: nounwind uwtable
define dso_local i32 @test_imath_internals() #0 {
  %1 = alloca %struct.mpz, align 8
  %2 = alloca i32, align 4
  call void @llvm.lifetime.start.p0(i64 32, ptr %1) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr %2) #4
  %3 = call i32 @mp_int_init_value(ptr noundef %1, i64 noundef 0)
  store i32 %3, ptr %2, align 4, !tbaa !5
  %4 = load i32, ptr %2, align 4, !tbaa !5
  %5 = load i32, ptr @MP_OK, align 4, !tbaa !5
  %6 = icmp eq i32 %4, %5
  br i1 %6, label %7, label %8

7:                                                ; preds = %0
  br label %9

8:                                                ; preds = %0
  call void @__assert_fail(ptr noundef @.str, ptr noundef @.str.1, i32 noundef 41, ptr noundef @__PRETTY_FUNCTION__.test_imath_internals) #5
  unreachable

9:                                                ; preds = %7
  %10 = getelementptr inbounds %struct.mpz, ptr %1, i32 0, i32 2
  %11 = load i32, ptr %10, align 8, !tbaa !9
  %12 = getelementptr inbounds %struct.mpz, ptr %1, i32 0, i32 3
  %13 = load i32, ptr %12, align 4, !tbaa !12
  %14 = icmp uge i32 %11, %13
  br i1 %14, label %15, label %16

15:                                               ; preds = %9
  br label %17

16:                                               ; preds = %9
  call void @__assert_fail(ptr noundef @.str.2, ptr noundef @.str.1, i32 noundef 42, ptr noundef @__PRETTY_FUNCTION__.test_imath_internals) #5
  unreachable

17:                                               ; preds = %15
  %18 = getelementptr inbounds %struct.mpz, ptr %1, i32 0, i32 3
  %19 = load i32, ptr %18, align 4, !tbaa !12
  %20 = icmp eq i32 %19, 1
  br i1 %20, label %21, label %22

21:                                               ; preds = %17
  br label %23

22:                                               ; preds = %17
  call void @__assert_fail(ptr noundef @.str.3, ptr noundef @.str.1, i32 noundef 43, ptr noundef @__PRETTY_FUNCTION__.test_imath_internals) #5
  unreachable

23:                                               ; preds = %21
  %24 = getelementptr inbounds %struct.mpz, ptr %1, i32 0, i32 4
  %25 = load i8, ptr %24, align 8, !tbaa !13
  %26 = zext i8 %25 to i32
  %27 = load i8, ptr @MP_ZPOS, align 1, !tbaa !14
  %28 = zext i8 %27 to i32
  %29 = icmp eq i32 %26, %28
  br i1 %29, label %30, label %31

30:                                               ; preds = %23
  br label %32

31:                                               ; preds = %23
  call void @__assert_fail(ptr noundef @.str.4, ptr noundef @.str.1, i32 noundef 44, ptr noundef @__PRETTY_FUNCTION__.test_imath_internals) #5
  unreachable

32:                                               ; preds = %30
  %33 = getelementptr inbounds %struct.mpz, ptr %1, i32 0, i32 1
  %34 = load ptr, ptr %33, align 8, !tbaa !15
  %35 = getelementptr inbounds i32, ptr %34, i64 0
  %36 = load i32, ptr %35, align 4, !tbaa !5
  %37 = icmp eq i32 %36, 0
  br i1 %37, label %38, label %39

38:                                               ; preds = %32
  br label %40

39:                                               ; preds = %32
  call void @__assert_fail(ptr noundef @.str.5, ptr noundef @.str.1, i32 noundef 45, ptr noundef @__PRETTY_FUNCTION__.test_imath_internals) #5
  unreachable

40:                                               ; preds = %38
  %41 = call i32 @mp_int_set_value(ptr noundef %1, i64 noundef -1)
  store i32 %41, ptr %2, align 4, !tbaa !5
  %42 = load i32, ptr %2, align 4, !tbaa !5
  %43 = load i32, ptr @MP_OK, align 4, !tbaa !5
  %44 = icmp eq i32 %42, %43
  br i1 %44, label %45, label %46

45:                                               ; preds = %40
  br label %47

46:                                               ; preds = %40
  call void @__assert_fail(ptr noundef @.str, ptr noundef @.str.1, i32 noundef 48, ptr noundef @__PRETTY_FUNCTION__.test_imath_internals) #5
  unreachable

47:                                               ; preds = %45
  %48 = getelementptr inbounds %struct.mpz, ptr %1, i32 0, i32 2
  %49 = load i32, ptr %48, align 8, !tbaa !9
  %50 = getelementptr inbounds %struct.mpz, ptr %1, i32 0, i32 3
  %51 = load i32, ptr %50, align 4, !tbaa !12
  %52 = icmp uge i32 %49, %51
  br i1 %52, label %53, label %54

53:                                               ; preds = %47
  br label %55

54:                                               ; preds = %47
  call void @__assert_fail(ptr noundef @.str.2, ptr noundef @.str.1, i32 noundef 49, ptr noundef @__PRETTY_FUNCTION__.test_imath_internals) #5
  unreachable

55:                                               ; preds = %53
  %56 = getelementptr inbounds %struct.mpz, ptr %1, i32 0, i32 3
  %57 = load i32, ptr %56, align 4, !tbaa !12
  %58 = icmp eq i32 %57, 1
  br i1 %58, label %59, label %60

59:                                               ; preds = %55
  br label %61

60:                                               ; preds = %55
  call void @__assert_fail(ptr noundef @.str.3, ptr noundef @.str.1, i32 noundef 50, ptr noundef @__PRETTY_FUNCTION__.test_imath_internals) #5
  unreachable

61:                                               ; preds = %59
  %62 = getelementptr inbounds %struct.mpz, ptr %1, i32 0, i32 4
  %63 = load i8, ptr %62, align 8, !tbaa !13
  %64 = zext i8 %63 to i32
  %65 = load i8, ptr @MP_NEG, align 1, !tbaa !14
  %66 = zext i8 %65 to i32
  %67 = icmp eq i32 %64, %66
  br i1 %67, label %68, label %69

68:                                               ; preds = %61
  br label %70

69:                                               ; preds = %61
  call void @__assert_fail(ptr noundef @.str.6, ptr noundef @.str.1, i32 noundef 51, ptr noundef @__PRETTY_FUNCTION__.test_imath_internals) #5
  unreachable

70:                                               ; preds = %68
  %71 = getelementptr inbounds %struct.mpz, ptr %1, i32 0, i32 1
  %72 = load ptr, ptr %71, align 8, !tbaa !15
  %73 = getelementptr inbounds i32, ptr %72, i64 0
  %74 = load i32, ptr %73, align 4, !tbaa !5
  %75 = icmp eq i32 %74, 1
  br i1 %75, label %76, label %77

76:                                               ; preds = %70
  br label %78

77:                                               ; preds = %70
  call void @__assert_fail(ptr noundef @.str.7, ptr noundef @.str.1, i32 noundef 52, ptr noundef @__PRETTY_FUNCTION__.test_imath_internals) #5
  unreachable

78:                                               ; preds = %76
  %79 = call i32 @mp_int_set_value(ptr noundef %1, i64 noundef 1)
  store i32 %79, ptr %2, align 4, !tbaa !5
  %80 = load i32, ptr %2, align 4, !tbaa !5
  %81 = load i32, ptr @MP_OK, align 4, !tbaa !5
  %82 = icmp eq i32 %80, %81
  br i1 %82, label %83, label %84

83:                                               ; preds = %78
  br label %85

84:                                               ; preds = %78
  call void @__assert_fail(ptr noundef @.str, ptr noundef @.str.1, i32 noundef 55, ptr noundef @__PRETTY_FUNCTION__.test_imath_internals) #5
  unreachable

85:                                               ; preds = %83
  %86 = getelementptr inbounds %struct.mpz, ptr %1, i32 0, i32 2
  %87 = load i32, ptr %86, align 8, !tbaa !9
  %88 = getelementptr inbounds %struct.mpz, ptr %1, i32 0, i32 3
  %89 = load i32, ptr %88, align 4, !tbaa !12
  %90 = icmp uge i32 %87, %89
  br i1 %90, label %91, label %92

91:                                               ; preds = %85
  br label %93

92:                                               ; preds = %85
  call void @__assert_fail(ptr noundef @.str.2, ptr noundef @.str.1, i32 noundef 56, ptr noundef @__PRETTY_FUNCTION__.test_imath_internals) #5
  unreachable

93:                                               ; preds = %91
  %94 = getelementptr inbounds %struct.mpz, ptr %1, i32 0, i32 3
  %95 = load i32, ptr %94, align 4, !tbaa !12
  %96 = icmp eq i32 %95, 1
  br i1 %96, label %97, label %98

97:                                               ; preds = %93
  br label %99

98:                                               ; preds = %93
  call void @__assert_fail(ptr noundef @.str.3, ptr noundef @.str.1, i32 noundef 57, ptr noundef @__PRETTY_FUNCTION__.test_imath_internals) #5
  unreachable

99:                                               ; preds = %97
  %100 = getelementptr inbounds %struct.mpz, ptr %1, i32 0, i32 4
  %101 = load i8, ptr %100, align 8, !tbaa !13
  %102 = zext i8 %101 to i32
  %103 = load i8, ptr @MP_ZPOS, align 1, !tbaa !14
  %104 = zext i8 %103 to i32
  %105 = icmp eq i32 %102, %104
  br i1 %105, label %106, label %107

106:                                              ; preds = %99
  br label %108

107:                                              ; preds = %99
  call void @__assert_fail(ptr noundef @.str.4, ptr noundef @.str.1, i32 noundef 58, ptr noundef @__PRETTY_FUNCTION__.test_imath_internals) #5
  unreachable

108:                                              ; preds = %106
  %109 = getelementptr inbounds %struct.mpz, ptr %1, i32 0, i32 1
  %110 = load ptr, ptr %109, align 8, !tbaa !15
  %111 = getelementptr inbounds i32, ptr %110, i64 0
  %112 = load i32, ptr %111, align 4, !tbaa !5
  %113 = icmp eq i32 %112, 1
  br i1 %113, label %114, label %115

114:                                              ; preds = %108
  br label %116

115:                                              ; preds = %108
  call void @__assert_fail(ptr noundef @.str.7, ptr noundef @.str.1, i32 noundef 59, ptr noundef @__PRETTY_FUNCTION__.test_imath_internals) #5
  unreachable

116:                                              ; preds = %114
  %117 = call i32 @mp_int_mul_pow2(ptr noundef %1, i64 noundef 32, ptr noundef %1)
  store i32 %117, ptr %2, align 4, !tbaa !5
  %118 = load i32, ptr %2, align 4, !tbaa !5
  %119 = load i32, ptr @MP_OK, align 4, !tbaa !5
  %120 = icmp eq i32 %118, %119
  br i1 %120, label %121, label %122

121:                                              ; preds = %116
  br label %123

122:                                              ; preds = %116
  call void @__assert_fail(ptr noundef @.str, ptr noundef @.str.1, i32 noundef 62, ptr noundef @__PRETTY_FUNCTION__.test_imath_internals) #5
  unreachable

123:                                              ; preds = %121
  %124 = getelementptr inbounds %struct.mpz, ptr %1, i32 0, i32 2
  %125 = load i32, ptr %124, align 8, !tbaa !9
  %126 = getelementptr inbounds %struct.mpz, ptr %1, i32 0, i32 3
  %127 = load i32, ptr %126, align 4, !tbaa !12
  %128 = icmp uge i32 %125, %127
  br i1 %128, label %129, label %130

129:                                              ; preds = %123
  br label %131

130:                                              ; preds = %123
  call void @__assert_fail(ptr noundef @.str.2, ptr noundef @.str.1, i32 noundef 63, ptr noundef @__PRETTY_FUNCTION__.test_imath_internals) #5
  unreachable

131:                                              ; preds = %129
  %132 = getelementptr inbounds %struct.mpz, ptr %1, i32 0, i32 3
  %133 = load i32, ptr %132, align 4, !tbaa !12
  %134 = icmp eq i32 %133, 2
  br i1 %134, label %135, label %136

135:                                              ; preds = %131
  br label %137

136:                                              ; preds = %131
  call void @__assert_fail(ptr noundef @.str.8, ptr noundef @.str.1, i32 noundef 64, ptr noundef @__PRETTY_FUNCTION__.test_imath_internals) #5
  unreachable

137:                                              ; preds = %135
  %138 = getelementptr inbounds %struct.mpz, ptr %1, i32 0, i32 4
  %139 = load i8, ptr %138, align 8, !tbaa !13
  %140 = zext i8 %139 to i32
  %141 = load i8, ptr @MP_ZPOS, align 1, !tbaa !14
  %142 = zext i8 %141 to i32
  %143 = icmp eq i32 %140, %142
  br i1 %143, label %144, label %145

144:                                              ; preds = %137
  br label %146

145:                                              ; preds = %137
  call void @__assert_fail(ptr noundef @.str.4, ptr noundef @.str.1, i32 noundef 65, ptr noundef @__PRETTY_FUNCTION__.test_imath_internals) #5
  unreachable

146:                                              ; preds = %144
  %147 = getelementptr inbounds %struct.mpz, ptr %1, i32 0, i32 1
  %148 = load ptr, ptr %147, align 8, !tbaa !15
  %149 = getelementptr inbounds i32, ptr %148, i64 0
  %150 = load i32, ptr %149, align 4, !tbaa !5
  %151 = icmp eq i32 %150, 0
  br i1 %151, label %152, label %153

152:                                              ; preds = %146
  br label %154

153:                                              ; preds = %146
  call void @__assert_fail(ptr noundef @.str.5, ptr noundef @.str.1, i32 noundef 66, ptr noundef @__PRETTY_FUNCTION__.test_imath_internals) #5
  unreachable

154:                                              ; preds = %152
  %155 = getelementptr inbounds %struct.mpz, ptr %1, i32 0, i32 1
  %156 = load ptr, ptr %155, align 8, !tbaa !15
  %157 = getelementptr inbounds i32, ptr %156, i64 1
  %158 = load i32, ptr %157, align 4, !tbaa !5
  %159 = icmp eq i32 %158, 1
  br i1 %159, label %160, label %161

160:                                              ; preds = %154
  br label %162

161:                                              ; preds = %154
  call void @__assert_fail(ptr noundef @.str.9, ptr noundef @.str.1, i32 noundef 67, ptr noundef @__PRETTY_FUNCTION__.test_imath_internals) #5
  unreachable

162:                                              ; preds = %160
  call void @mp_int_clear(ptr noundef %1)
  call void @llvm.lifetime.end.p0(i64 4, ptr %2) #4
  call void @llvm.lifetime.end.p0(i64 32, ptr %1) #4
  ret i32 0
}

; Function Attrs: nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1

declare i32 @mp_int_init_value(ptr noundef, i64 noundef) #2

; Function Attrs: noreturn nounwind
declare void @__assert_fail(ptr noundef, ptr noundef, i32 noundef, ptr noundef) #3

declare i32 @mp_int_set_value(ptr noundef, i64 noundef) #2

declare i32 @mp_int_mul_pow2(ptr noundef, i64 noundef, ptr noundef) #2

declare void @mp_int_clear(ptr noundef) #2

; Function Attrs: nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1

attributes #0 = { nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { noreturn nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { nounwind }
attributes #5 = { noreturn nounwind }

!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
!9 = !{!10, !6, i64 16}
!10 = !{!"mpz", !6, i64 0, !11, i64 8, !6, i64 16, !6, i64 20, !7, i64 24}
!11 = !{!"any pointer", !7, i64 0}
!12 = !{!10, !6, i64 20}
!13 = !{!10, !7, i64 24}
!14 = !{!7, !7, i64 0}
!15 = !{!10, !11, i64 8}


; Optimized IR (opt -passes='default<O3>'):
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"

%struct.mpz = type { i32, ptr, i32, i32, i8 }

@MP_OK = external local_unnamed_addr constant i32, align 4
@.str = external hidden unnamed_addr constant [16 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [90 x i8], align 1
@__PRETTY_FUNCTION__.test_imath_internals = external hidden unnamed_addr constant [27 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [22 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [14 x i8], align 1
@MP_ZPOS = external local_unnamed_addr constant i8, align 1
@.str.4 = external hidden unnamed_addr constant [20 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [19 x i8], align 1
@MP_NEG = external local_unnamed_addr constant i8, align 1
@.str.6 = external hidden unnamed_addr constant [19 x i8], align 1
@.str.7 = external hidden unnamed_addr constant [19 x i8], align 1
@.str.8 = external hidden unnamed_addr constant [14 x i8], align 1
@.str.9 = external hidden unnamed_addr constant [19 x i8], align 1

; Function Attrs: nounwind uwtable
define dso_local noundef i32 @test_imath_internals() local_unnamed_addr #0 {
  %1 = alloca %struct.mpz, align 8
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %1) #4
  %2 = call i32 @mp_int_init_value(ptr noundef nonnull %1, i64 noundef 0) #4
  %3 = load i32, ptr @MP_OK, align 4, !tbaa !5
  %4 = icmp eq i32 %2, %3
  br i1 %4, label %6, label %5

5:                                                ; preds = %0
  call void @__assert_fail(ptr noundef nonnull @.str, ptr noundef nonnull @.str.1, i32 noundef 41, ptr noundef nonnull @__PRETTY_FUNCTION__.test_imath_internals) #5
  unreachable

6:                                                ; preds = %0
  %7 = getelementptr inbounds i8, ptr %1, i64 16
  %8 = load i32, ptr %7, align 8, !tbaa !9
  %9 = getelementptr inbounds i8, ptr %1, i64 20
  %10 = load i32, ptr %9, align 4, !tbaa !12
  %.not = icmp ult i32 %8, %10
  br i1 %.not, label %11, label %12

11:                                               ; preds = %6
  call void @__assert_fail(ptr noundef nonnull @.str.2, ptr noundef nonnull @.str.1, i32 noundef 42, ptr noundef nonnull @__PRETTY_FUNCTION__.test_imath_internals) #5
  unreachable

12:                                               ; preds = %6
  %13 = icmp eq i32 %10, 1
  br i1 %13, label %15, label %14

14:                                               ; preds = %12
  call void @__assert_fail(ptr noundef nonnull @.str.3, ptr noundef nonnull @.str.1, i32 noundef 43, ptr noundef nonnull @__PRETTY_FUNCTION__.test_imath_internals) #5
  unreachable

15:                                               ; preds = %12
  %16 = getelementptr inbounds i8, ptr %1, i64 24
  %17 = load i8, ptr %16, align 8, !tbaa !13
  %18 = load i8, ptr @MP_ZPOS, align 1, !tbaa !14
  %19 = icmp eq i8 %17, %18
  br i1 %19, label %21, label %20

20:                                               ; preds = %15
  call void @__assert_fail(ptr noundef nonnull @.str.4, ptr noundef nonnull @.str.1, i32 noundef 44, ptr noundef nonnull @__PRETTY_FUNCTION__.test_imath_internals) #5
  unreachable

21:                                               ; preds = %15
  %22 = getelementptr inbounds i8, ptr %1, i64 8
  %23 = load ptr, ptr %22, align 8, !tbaa !15
  %24 = load i32, ptr %23, align 4, !tbaa !5
  %25 = icmp eq i32 %24, 0
  br i1 %25, label %27, label %26

26:                                               ; preds = %21
  call void @__assert_fail(ptr noundef nonnull @.str.5, ptr noundef nonnull @.str.1, i32 noundef 45, ptr noundef nonnull @__PRETTY_FUNCTION__.test_imath_internals) #5
  unreachable

27:                                               ; preds = %21
  %28 = call i32 @mp_int_set_value(ptr noundef nonnull %1, i64 noundef -1) #4
  %29 = icmp eq i32 %28, %2
  br i1 %29, label %31, label %30

30:                                               ; preds = %27
  call void @__assert_fail(ptr noundef nonnull @.str, ptr noundef nonnull @.str.1, i32 noundef 48, ptr noundef nonnull @__PRETTY_FUNCTION__.test_imath_internals) #5
  unreachable

31:                                               ; preds = %27
  %32 = load i32, ptr %7, align 8, !tbaa !9
  %33 = load i32, ptr %9, align 4, !tbaa !12
  %.not7 = icmp ult i32 %32, %33
  br i1 %.not7, label %34, label %35

34:                                               ; preds = %31
  call void @__assert_fail(ptr noundef nonnull @.str.2, ptr noundef nonnull @.str.1, i32 noundef 49, ptr noundef nonnull @__PRETTY_FUNCTION__.test_imath_internals) #5
  unreachable

35:                                               ; preds = %31
  %36 = icmp eq i32 %33, 1
  br i1 %36, label %38, label %37

37:                                               ; preds = %35
  call void @__assert_fail(ptr noundef nonnull @.str.3, ptr noundef nonnull @.str.1, i32 noundef 50, ptr noundef nonnull @__PRETTY_FUNCTION__.test_imath_internals) #5
  unreachable

38:                                               ; preds = %35
  %39 = load i8, ptr %16, align 8, !tbaa !13
  %40 = load i8, ptr @MP_NEG, align 1, !tbaa !14
  %41 = icmp eq i8 %39, %40
  br i1 %41, label %43, label %42

42:                                               ; preds = %38
  call void @__assert_fail(ptr noundef nonnull @.str.6, ptr noundef nonnull @.str.1, i32 noundef 51, ptr noundef nonnull @__PRETTY_FUNCTION__.test_imath_internals) #5
  unreachable

43:                                               ; preds = %38
  %44 = load ptr, ptr %22, align 8, !tbaa !15
  %45 = load i32, ptr %44, align 4, !tbaa !5
  %46 = icmp eq i32 %45, 1
  br i1 %46, label %48, label %47

47:                                               ; preds = %43
  call void @__assert_fail(ptr noundef nonnull @.str.7, ptr noundef nonnull @.str.1, i32 noundef 52, ptr noundef nonnull @__PRETTY_FUNCTION__.test_imath_internals) #5
  unreachable

48:                                               ; preds = %43
  %49 = call i32 @mp_int_set_value(ptr noundef nonnull %1, i64 noundef 1) #4
  %50 = icmp eq i32 %49, %2
  br i1 %50, label %52, label %51

51:                                               ; preds = %48
  call void @__assert_fail(ptr noundef nonnull @.str, ptr noundef nonnull @.str.1, i32 noundef 55, ptr noundef nonnull @__PRETTY_FUNCTION__.test_imath_internals) #5
  unreachable

52:                                               ; preds = %48
  %53 = load i32, ptr %7, align 8, !tbaa !9
  %54 = load i32, ptr %9, align 4, !tbaa !12
  %.not8 = icmp ult i32 %53, %54
  br i1 %.not8, label %55, label %56

55:                                               ; preds = %52
  call void @__assert_fail(ptr noundef nonnull @.str.2, ptr noundef nonnull @.str.1, i32 noundef 56, ptr noundef nonnull @__PRETTY_FUNCTION__.test_imath_internals) #5
  unreachable

56:                                               ; preds = %52
  %57 = icmp eq i32 %54, 1
  br i1 %57, label %59, label %58

58:                                               ; preds = %56
  call void @__assert_fail(ptr noundef nonnull @.str.3, ptr noundef nonnull @.str.1, i32 noundef 57, ptr noundef nonnull @__PRETTY_FUNCTION__.test_imath_internals) #5
  unreachable

59:                                               ; preds = %56
  %60 = load i8, ptr %16, align 8, !tbaa !13
  %61 = icmp eq i8 %60, %17
  br i1 %61, label %63, label %62

62:                                               ; preds = %59
  call void @__assert_fail(ptr noundef nonnull @.str.4, ptr noundef nonnull @.str.1, i32 noundef 58, ptr noundef nonnull @__PRETTY_FUNCTION__.test_imath_internals) #5
  unreachable

63:                                               ; preds = %59
  %64 = load ptr, ptr %22, align 8, !tbaa !15
  %65 = load i32, ptr %64, align 4, !tbaa !5
  %66 = icmp eq i32 %65, 1
  br i1 %66, label %68, label %67

67:                                               ; preds = %63
  call void @__assert_fail(ptr noundef nonnull @.str.7, ptr noundef nonnull @.str.1, i32 noundef 59, ptr noundef nonnull @__PRETTY_FUNCTION__.test_imath_internals) #5
  unreachable

68:                                               ; preds = %63
  %69 = call i32 @mp_int_mul_pow2(ptr noundef nonnull %1, i64 noundef 32, ptr noundef nonnull %1) #4
  %70 = icmp eq i32 %69, %2
  br i1 %70, label %72, label %71

71:                                               ; preds = %68
  call void @__assert_fail(ptr noundef nonnull @.str, ptr noundef nonnull @.str.1, i32 noundef 62, ptr noundef nonnull @__PRETTY_FUNCTION__.test_imath_internals) #5
  unreachable

72:                                               ; preds = %68
  %73 = load i32, ptr %7, align 8, !tbaa !9
  %74 = load i32, ptr %9, align 4, !tbaa !12
  %.not9 = icmp ult i32 %73, %74
  br i1 %.not9, label %75, label %76

75:                                               ; preds = %72
  call void @__assert_fail(ptr noundef nonnull @.str.2, ptr noundef nonnull @.str.1, i32 noundef 63, ptr noundef nonnull @__PRETTY_FUNCTION__.test_imath_internals) #5
  unreachable

76:                                               ; preds = %72
  %77 = icmp eq i32 %74, 2
  br i1 %77, label %79, label %78

78:                                               ; preds = %76
  call void @__assert_fail(ptr noundef nonnull @.str.8, ptr noundef nonnull @.str.1, i32 noundef 64, ptr noundef nonnull @__PRETTY_FUNCTION__.test_imath_internals) #5
  unreachable

79:                                               ; preds = %76
  %80 = load i8, ptr %16, align 8, !tbaa !13
  %81 = icmp eq i8 %80, %17
  br i1 %81, label %83, label %82

82:                                               ; preds = %79
  call void @__assert_fail(ptr noundef nonnull @.str.4, ptr noundef nonnull @.str.1, i32 noundef 65, ptr noundef nonnull @__PRETTY_FUNCTION__.test_imath_internals) #5
  unreachable

83:                                               ; preds = %79
  %84 = load ptr, ptr %22, align 8, !tbaa !15
  %85 = load i32, ptr %84, align 4, !tbaa !5
  %86 = icmp eq i32 %85, 0
  br i1 %86, label %88, label %87

87:                                               ; preds = %83
  call void @__assert_fail(ptr noundef nonnull @.str.5, ptr noundef nonnull @.str.1, i32 noundef 66, ptr noundef nonnull @__PRETTY_FUNCTION__.test_imath_internals) #5
  unreachable

88:                                               ; preds = %83
  %89 = getelementptr inbounds i8, ptr %84, i64 4
  %90 = load i32, ptr %89, align 4, !tbaa !5
  %91 = icmp eq i32 %90, 1
  br i1 %91, label %93, label %92

92:                                               ; preds = %88
  call void @__assert_fail(ptr noundef nonnull @.str.9, ptr noundef nonnull @.str.1, i32 noundef 67, ptr noundef nonnull @__PRETTY_FUNCTION__.test_imath_internals) #5
  unreachable

93:                                               ; preds = %88
  call void @mp_int_clear(ptr noundef nonnull %1) #4
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %1) #4
  ret i32 0
}

; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1

declare i32 @mp_int_init_value(ptr noundef, i64 noundef) local_unnamed_addr #2

; Function Attrs: noreturn nounwind
declare void @__assert_fail(ptr noundef, ptr noundef, i32 noundef, ptr noundef) local_unnamed_addr #3

declare i32 @mp_int_set_value(ptr noundef, i64 noundef) local_unnamed_addr #2

declare i32 @mp_int_mul_pow2(ptr noundef, i64 noundef, ptr noundef) local_unnamed_addr #2

declare void @mp_int_clear(ptr noundef) local_unnamed_addr #2

; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1

attributes #0 = { nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { noreturn nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { nounwind }
attributes #5 = { noreturn nounwind }

!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
!9 = !{!10, !6, i64 16}
!10 = !{!"mpz", !6, i64 0, !11, i64 8, !6, i64 16, !6, i64 20, !7, i64 24}
!11 = !{!"any pointer", !7, i64 0}
!12 = !{!10, !6, i64 20}
!13 = !{!10, !7, i64 24}
!14 = !{!7, !7, i64 0}
!15 = !{!10, !11, i64 8}


; Effective O3 passes: EarlyCSEPass,GVNPass,GlobalOptPass,InferFunctionAttrsPass,InstCombinePass,PostOrderFunctionAttrsPass,SROAPass,SimplifyCFGPass