; LLVM IR from Tiramisu-Compiler/tiramisu :: 3rdParty/isl/imath (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 }

@.str.1 = external hidden unnamed_addr constant [87 x i8], align 1
@.str.17 = external hidden unnamed_addr constant [37 x i8], align 1
@__PRETTY_FUNCTION__.mp_int_read_cstring = external hidden unnamed_addr constant [70 x i8], align 1

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

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

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

; Function Attrs: nounwind uwtable
declare hidden i32 @s_pad(ptr noundef, i32 noundef) #2

; Function Attrs: nounwind uwtable
define dso_local i32 @mp_int_read_cstring(ptr noundef %0, i32 noundef %1, ptr noundef %2, ptr noundef %3) #2 {
  %5 = alloca i32, align 4
  %6 = alloca ptr, align 8
  %7 = alloca i32, align 4
  %8 = alloca ptr, align 8
  %9 = alloca ptr, align 8
  %10 = alloca i32, align 4
  %11 = alloca i32, align 4
  %12 = alloca ptr, align 8
  %13 = alloca i32, align 4
  %14 = alloca ptr, align 8
  store ptr %0, ptr %6, align 8, !tbaa !5
  store i32 %1, ptr %7, align 4, !tbaa !9
  store ptr %2, ptr %8, align 8, !tbaa !5
  store ptr %3, ptr %9, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #5
  %15 = load ptr, ptr %6, align 8, !tbaa !5
  %16 = icmp ne ptr %15, null
  br i1 %16, label %17, label %21

17:                                               ; preds = %4
  %18 = load ptr, ptr %8, align 8, !tbaa !5
  %19 = icmp ne ptr %18, null
  br i1 %19, label %20, label %21

20:                                               ; preds = %17
  br label %22

21:                                               ; preds = %17, %4
  call void @__assert_fail(ptr noundef @.str.17, ptr noundef @.str.1, i32 noundef 1756, ptr noundef @__PRETTY_FUNCTION__.mp_int_read_cstring) #6
  unreachable

22:                                               ; preds = %20
  %23 = load i32, ptr %7, align 4, !tbaa !9
  %24 = icmp ult i32 %23, 2
  br i1 %24, label %28, label %25

25:                                               ; preds = %22
  %26 = load i32, ptr %7, align 4, !tbaa !9
  %27 = icmp ugt i32 %26, 36
  br i1 %27, label %28, label %29

28:                                               ; preds = %25, %22
  store i32 -3, ptr %5, align 4
  store i32 1, ptr %11, align 4
  br label %178

29:                                               ; preds = %25
  br label %30

30:                                               ; preds = %42, %29
  %31 = call ptr @__ctype_b_loc() #7
  %32 = load ptr, ptr %31, align 8, !tbaa !5
  %33 = load ptr, ptr %8, align 8, !tbaa !5
  %34 = load i8, ptr %33, align 1, !tbaa !11
  %35 = sext i8 %34 to i32
  %36 = sext i32 %35 to i64
  %37 = getelementptr inbounds i16, ptr %32, i64 %36
  %38 = load i16, ptr %37, align 2, !tbaa !12
  %39 = zext i16 %38 to i32
  %40 = and i32 %39, 8192
  %41 = icmp ne i32 %40, 0
  br i1 %41, label %42, label %45

42:                                               ; preds = %30
  %43 = load ptr, ptr %8, align 8, !tbaa !5
  %44 = getelementptr inbounds i8, ptr %43, i32 1
  store ptr %44, ptr %8, align 8, !tbaa !5
  br label %30, !llvm.loop !14

45:                                               ; preds = %30
  %46 = load ptr, ptr %8, align 8, !tbaa !5
  %47 = load i8, ptr %46, align 1, !tbaa !11
  %48 = sext i8 %47 to i32
  switch i32 %48, label %57 [
    i32 45, label %49
    i32 43, label %54
  ]

49:                                               ; preds = %45
  %50 = load ptr, ptr %6, align 8, !tbaa !5
  %51 = getelementptr inbounds %struct.mpz, ptr %50, i32 0, i32 4
  store i8 1, ptr %51, align 8, !tbaa !16
  %52 = load ptr, ptr %8, align 8, !tbaa !5
  %53 = getelementptr inbounds i8, ptr %52, i32 1
  store ptr %53, ptr %8, align 8, !tbaa !5
  br label %60

54:                                               ; preds = %45
  %55 = load ptr, ptr %8, align 8, !tbaa !5
  %56 = getelementptr inbounds i8, ptr %55, i32 1
  store ptr %56, ptr %8, align 8, !tbaa !5
  br label %57

57:                                               ; preds = %54, %45
  %58 = load ptr, ptr %6, align 8, !tbaa !5
  %59 = getelementptr inbounds %struct.mpz, ptr %58, i32 0, i32 4
  store i8 0, ptr %59, align 8, !tbaa !16
  br label %60

60:                                               ; preds = %57, %49
  br label %61

61:                                               ; preds = %67, %60
  %62 = load ptr, ptr %8, align 8, !tbaa !5
  %63 = load i8, ptr %62, align 1, !tbaa !11
  %64 = load i32, ptr %7, align 4, !tbaa !9
  %65 = call i32 @s_ch2val(i8 noundef signext %63, i32 noundef %64)
  store i32 %65, ptr %10, align 4, !tbaa !9
  %66 = icmp eq i32 %65, 0
  br i1 %66, label %67, label %70

67:                                               ; preds = %61
  %68 = load ptr, ptr %8, align 8, !tbaa !5
  %69 = getelementptr inbounds i8, ptr %68, i32 1
  store ptr %69, ptr %8, align 8, !tbaa !5
  br label %61, !llvm.loop !18

70:                                               ; preds = %61
  %71 = load ptr, ptr %6, align 8, !tbaa !5
  %72 = load ptr, ptr %8, align 8, !tbaa !5
  %73 = call i64 @strlen(ptr noundef %72) #8
  %74 = trunc i64 %73 to i32
  %75 = load i32, ptr %7, align 4, !tbaa !9
  %76 = call i32 @s_inlen(i32 noundef %74, i32 noundef %75)
  %77 = call i32 @s_pad(ptr noundef %71, i32 noundef %76)
  %78 = icmp ne i32 %77, 0
  br i1 %78, label %80, label %79

79:                                               ; preds = %70
  store i32 -2, ptr %5, align 4
  store i32 1, ptr %11, align 4
  br label %178

80:                                               ; preds = %70
  %81 = load ptr, ptr %6, align 8, !tbaa !5
  %82 = getelementptr inbounds %struct.mpz, ptr %81, i32 0, i32 3
  store i32 1, ptr %82, align 4, !tbaa !19
  %83 = load ptr, ptr %6, align 8, !tbaa !5
  %84 = getelementptr inbounds %struct.mpz, ptr %83, i32 0, i32 1
  %85 = load ptr, ptr %84, align 8, !tbaa !20
  %86 = getelementptr inbounds i32, ptr %85, i64 0
  store i32 0, ptr %86, align 4, !tbaa !9
  br label %87

87:                                               ; preds = %100, %80
  %88 = load ptr, ptr %8, align 8, !tbaa !5
  %89 = load i8, ptr %88, align 1, !tbaa !11
  %90 = sext i8 %89 to i32
  %91 = icmp ne i32 %90, 0
  br i1 %91, label %92, label %98

92:                                               ; preds = %87
  %93 = load ptr, ptr %8, align 8, !tbaa !5
  %94 = load i8, ptr %93, align 1, !tbaa !11
  %95 = load i32, ptr %7, align 4, !tbaa !9
  %96 = call i32 @s_ch2val(i8 noundef signext %94, i32 noundef %95)
  store i32 %96, ptr %10, align 4, !tbaa !9
  %97 = icmp sge i32 %96, 0
  br label %98

98:                                               ; preds = %92, %87
  %99 = phi i1 [ false, %87 ], [ %97, %92 ]
  br i1 %99, label %100, label %107

100:                                              ; preds = %98
  %101 = load ptr, ptr %6, align 8, !tbaa !5
  %102 = load i32, ptr %7, align 4, !tbaa !9
  call void @s_dmul(ptr noundef %101, i32 noundef %102)
  %103 = load ptr, ptr %6, align 8, !tbaa !5
  %104 = load i32, ptr %10, align 4, !tbaa !9
  call void @s_dadd(ptr noundef %103, i32 noundef %104)
  %105 = load ptr, ptr %8, align 8, !tbaa !5
  %106 = getelementptr inbounds i8, ptr %105, i32 1
  store ptr %106, ptr %8, align 8, !tbaa !5
  br label %87, !llvm.loop !21

107:                                              ; preds = %98
  br label %108

108:                                              ; preds = %107
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #5
  %109 = load ptr, ptr %6, align 8, !tbaa !5
  store ptr %109, ptr %12, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #5
  %110 = load ptr, ptr %12, align 8, !tbaa !5
  %111 = getelementptr inbounds %struct.mpz, ptr %110, i32 0, i32 3
  %112 = load i32, ptr %111, align 4, !tbaa !19
  store i32 %112, ptr %13, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #5
  %113 = load ptr, ptr %12, align 8, !tbaa !5
  %114 = getelementptr inbounds %struct.mpz, ptr %113, i32 0, i32 1
  %115 = load ptr, ptr %114, align 8, !tbaa !20
  %116 = load i32, ptr %13, align 4, !tbaa !9
  %117 = zext i32 %116 to i64
  %118 = getelementptr inbounds i32, ptr %115, i64 %117
  %119 = getelementptr inbounds i32, ptr %118, i64 -1
  store ptr %119, ptr %14, align 8, !tbaa !5
  br label %120

120:                                              ; preds = %130, %108
  %121 = load i32, ptr %13, align 4, !tbaa !9
  %122 = icmp ugt i32 %121, 1
  br i1 %122, label %123, label %128

123:                                              ; preds = %120
  %124 = load ptr, ptr %14, align 8, !tbaa !5
  %125 = getelementptr inbounds i32, ptr %124, i32 -1
  store ptr %125, ptr %14, align 8, !tbaa !5
  %126 = load i32, ptr %124, align 4, !tbaa !9
  %127 = icmp eq i32 %126, 0
  br label %128

128:                                              ; preds = %123, %120
  %129 = phi i1 [ false, %120 ], [ %127, %123 ]
  br i1 %129, label %130, label %133

130:                                              ; preds = %128
  %131 = load i32, ptr %13, align 4, !tbaa !9
  %132 = add i32 %131, -1
  store i32 %132, ptr %13, align 4, !tbaa !9
  br label %120, !llvm.loop !22

133:                                              ; preds = %128
  %134 = load i32, ptr %13, align 4, !tbaa !9
  %135 = load ptr, ptr %12, align 8, !tbaa !5
  %136 = getelementptr inbounds %struct.mpz, ptr %135, i32 0, i32 3
  store i32 %134, ptr %136, align 4, !tbaa !19
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #5
  br label %137

137:                                              ; preds = %133
  br label %138

138:                                              ; preds = %137
  %139 = load ptr, ptr %6, align 8, !tbaa !5
  %140 = getelementptr inbounds %struct.mpz, ptr %139, i32 0, i32 3
  %141 = load i32, ptr %140, align 4, !tbaa !19
  %142 = icmp eq i32 %141, 1
  br i1 %142, label %143, label %151

143:                                              ; preds = %138
  %144 = load ptr, ptr %6, align 8, !tbaa !5
  %145 = getelementptr inbounds %struct.mpz, ptr %144, i32 0, i32 1
  %146 = load ptr, ptr %145, align 8, !tbaa !20
  %147 = getelementptr inbounds i32, ptr %146, i64 0
  %148 = load i32, ptr %147, align 4, !tbaa !9
  %149 = icmp eq i32 %148, 0
  br i1 %149, label %150, label %151

150:                                              ; preds = %143
  br label %159

151:                                              ; preds = %143, %138
  %152 = load ptr, ptr %6, align 8, !tbaa !5
  %153 = getelementptr inbounds %struct.mpz, ptr %152, i32 0, i32 4
  %154 = load i8, ptr %153, align 8, !tbaa !16
  %155 = zext i8 %154 to i32
  %156 = icmp eq i32 %155, 1
  %157 = zext i1 %156 to i64
  %158 = select i1 %156, i32 -1, i32 1
  br label %159

159:                                              ; preds = %151, %150
  %160 = phi i32 [ 0, %150 ], [ %158, %151 ]
  %161 = icmp eq i32 %160, 0
  br i1 %161, label %162, label %165

162:                                              ; preds = %159
  %163 = load ptr, ptr %6, align 8, !tbaa !5
  %164 = getelementptr inbounds %struct.mpz, ptr %163, i32 0, i32 4
  store i8 0, ptr %164, align 8, !tbaa !16
  br label %165

165:                                              ; preds = %162, %159
  %166 = load ptr, ptr %9, align 8, !tbaa !5
  %167 = icmp ne ptr %166, null
  br i1 %167, label %168, label %171

168:                                              ; preds = %165
  %169 = load ptr, ptr %8, align 8, !tbaa !5
  %170 = load ptr, ptr %9, align 8, !tbaa !5
  store ptr %169, ptr %170, align 8, !tbaa !5
  br label %171

171:                                              ; preds = %168, %165
  %172 = load ptr, ptr %8, align 8, !tbaa !5
  %173 = load i8, ptr %172, align 1, !tbaa !11
  %174 = sext i8 %173 to i32
  %175 = icmp ne i32 %174, 0
  br i1 %175, label %176, label %177

176:                                              ; preds = %171
  store i32 -5, ptr %5, align 4
  store i32 1, ptr %11, align 4
  br label %178

177:                                              ; preds = %171
  store i32 0, ptr %5, align 4
  store i32 1, ptr %11, align 4
  br label %178

178:                                              ; preds = %177, %176, %79, %28
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #5
  %179 = load i32, ptr %5, align 4
  ret i32 %179
}

; Function Attrs: nounwind willreturn memory(none)
declare ptr @__ctype_b_loc() #3

; Function Attrs: nounwind uwtable
declare hidden i32 @s_ch2val(i8 noundef signext, i32 noundef) #2

; Function Attrs: nounwind uwtable
declare hidden i32 @s_inlen(i32 noundef, i32 noundef) #2

; Function Attrs: nounwind willreturn memory(read)
declare i64 @strlen(ptr noundef) #4

; Function Attrs: nounwind uwtable
declare hidden void @s_dmul(ptr noundef, i32 noundef) #2

; Function Attrs: nounwind uwtable
declare hidden void @s_dadd(ptr noundef, i32 noundef) #2

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { 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 #2 = { 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 #3 = { nounwind willreturn memory(none) "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 willreturn memory(read) "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 #5 = { nounwind }
attributes #6 = { noreturn nounwind }
attributes #7 = { nounwind willreturn memory(none) }
attributes #8 = { nounwind willreturn memory(read) }

!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 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"int", !7, i64 0}
!11 = !{!7, !7, i64 0}
!12 = !{!13, !13, i64 0}
!13 = !{!"short", !7, i64 0}
!14 = distinct !{!14, !15}
!15 = !{!"llvm.loop.mustprogress"}
!16 = !{!17, !7, i64 24}
!17 = !{!"mpz", !10, i64 0, !6, i64 8, !10, i64 16, !10, i64 20, !7, i64 24}
!18 = distinct !{!18, !15}
!19 = !{!17, !10, i64 20}
!20 = !{!17, !6, i64 8}
!21 = distinct !{!21, !15}
!22 = distinct !{!22, !15}


; 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"

@.str.1 = external hidden unnamed_addr constant [87 x i8], align 1
@.str.17 = external hidden unnamed_addr constant [37 x i8], align 1
@__PRETTY_FUNCTION__.mp_int_read_cstring = external hidden unnamed_addr constant [70 x i8], align 1

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

; Function Attrs: nounwind uwtable
declare hidden i32 @s_pad(ptr noundef, i32 noundef) local_unnamed_addr #1

; Function Attrs: nounwind uwtable
define dso_local range(i32 -5, 1) i32 @mp_int_read_cstring(ptr noundef %0, i32 noundef %1, ptr noundef %2, ptr noundef writeonly %3) local_unnamed_addr #1 {
  %5 = icmp ne ptr %0, null
  %6 = icmp ne ptr %2, null
  %or.cond = and i1 %5, %6
  br i1 %or.cond, label %8, label %7

7:                                                ; preds = %4
  tail call void @__assert_fail(ptr noundef nonnull @.str.17, ptr noundef nonnull @.str.1, i32 noundef 1756, ptr noundef nonnull @__PRETTY_FUNCTION__.mp_int_read_cstring) #4
  unreachable

8:                                                ; preds = %4
  %9 = add i32 %1, -37
  %or.cond3 = icmp ult i32 %9, -35
  br i1 %or.cond3, label %63, label %.preheader

.preheader:                                       ; preds = %8
  %10 = tail call ptr @__ctype_b_loc() #5
  %11 = load ptr, ptr %10, align 8, !tbaa !5
  br label %12

12:                                               ; preds = %12, %.preheader
  %.051 = phi ptr [ %18, %12 ], [ %2, %.preheader ]
  %13 = load i8, ptr %.051, align 1, !tbaa !9
  %14 = sext i8 %13 to i64
  %15 = getelementptr inbounds i16, ptr %11, i64 %14
  %16 = load i16, ptr %15, align 2, !tbaa !10
  %17 = and i16 %16, 8192
  %.not = icmp eq i16 %17, 0
  %18 = getelementptr inbounds i8, ptr %.051, i64 1
  br i1 %.not, label %19, label %12, !llvm.loop !12

19:                                               ; preds = %12
  switch i8 %13, label %21 [
    i8 45, label %22
    i8 43, label %20
  ]

20:                                               ; preds = %19
  br label %22

21:                                               ; preds = %19
  br label %22

22:                                               ; preds = %20, %19, %21
  %.sink = phi i8 [ 1, %19 ], [ 0, %20 ], [ 0, %21 ]
  %.2 = phi ptr [ %18, %19 ], [ %18, %20 ], [ %.051, %21 ]
  %23 = getelementptr inbounds i8, ptr %0, i64 24
  store i8 %.sink, ptr %23, align 8, !tbaa !14
  br label %24

24:                                               ; preds = %24, %22
  %.3 = phi ptr [ %.2, %22 ], [ %28, %24 ]
  %25 = load i8, ptr %.3, align 1, !tbaa !9
  %26 = tail call i32 @s_ch2val(i8 noundef signext %25, i32 noundef %1)
  %27 = icmp eq i32 %26, 0
  %28 = getelementptr inbounds i8, ptr %.3, i64 1
  br i1 %27, label %24, label %29, !llvm.loop !17

29:                                               ; preds = %24
  %30 = tail call i64 @strlen(ptr noundef nonnull dereferenceable(1) %.3) #6
  %31 = trunc i64 %30 to i32
  %32 = tail call i32 @s_inlen(i32 noundef %31, i32 noundef %1)
  %33 = tail call i32 @s_pad(ptr noundef nonnull %0, i32 noundef %32)
  %.not56 = icmp eq i32 %33, 0
  br i1 %.not56, label %63, label %34

34:                                               ; preds = %29
  %35 = getelementptr inbounds i8, ptr %0, i64 20
  store i32 1, ptr %35, align 4, !tbaa !18
  %36 = getelementptr inbounds i8, ptr %0, i64 8
  %37 = load ptr, ptr %36, align 8, !tbaa !19
  store i32 0, ptr %37, align 4, !tbaa !20
  %38 = load i8, ptr %.3, align 1, !tbaa !9
  %.not5763 = icmp eq i8 %38, 0
  br i1 %.not5763, label %.critedge, label %.lr.ph

.lr.ph:                                           ; preds = %34, %42
  %39 = phi i8 [ %44, %42 ], [ %38, %34 ]
  %.464 = phi ptr [ %43, %42 ], [ %.3, %34 ]
  %40 = tail call i32 @s_ch2val(i8 noundef signext %39, i32 noundef %1)
  %41 = icmp sgt i32 %40, -1
  br i1 %41, label %42, label %.critedge.loopexit

42:                                               ; preds = %.lr.ph
  tail call void @s_dmul(ptr noundef nonnull %0, i32 noundef %1)
  tail call void @s_dadd(ptr noundef nonnull %0, i32 noundef %40)
  %43 = getelementptr inbounds i8, ptr %.464, i64 1
  %44 = load i8, ptr %43, align 1, !tbaa !9
  %.not57 = icmp eq i8 %44, 0
  br i1 %.not57, label %.critedge.loopexit, label %.lr.ph, !llvm.loop !21

.critedge.loopexit:                               ; preds = %.lr.ph, %42
  %.4.lcssa.ph = phi ptr [ %43, %42 ], [ %.464, %.lr.ph ]
  %.pre = load ptr, ptr %36, align 8, !tbaa !19
  br label %.critedge

.critedge:                                        ; preds = %.critedge.loopexit, %34
  %45 = phi ptr [ %37, %34 ], [ %.pre, %.critedge.loopexit ]
  %.4.lcssa = phi ptr [ %.3, %34 ], [ %.4.lcssa.ph, %.critedge.loopexit ]
  %46 = load i32, ptr %35, align 4, !tbaa !18
  %47 = icmp ugt i32 %46, 1
  br i1 %47, label %.lr.ph70.preheader, label %.critedge5

.lr.ph70.preheader:                               ; preds = %.critedge
  %48 = zext i32 %46 to i64
  %49 = getelementptr inbounds i32, ptr %45, i64 %48
  br label %.lr.ph70

.lr.ph70:                                         ; preds = %.lr.ph70.preheader, %52
  %.069.pn = phi ptr [ %.069, %52 ], [ %49, %.lr.ph70.preheader ]
  %.04968 = phi i32 [ %53, %52 ], [ %46, %.lr.ph70.preheader ]
  %.069 = getelementptr inbounds i8, ptr %.069.pn, i64 -4
  %50 = load i32, ptr %.069, align 4, !tbaa !20
  %51 = icmp eq i32 %50, 0
  br i1 %51, label %52, label %.critedge5.thread

.critedge5.thread:                                ; preds = %.lr.ph70
  store i32 %.04968, ptr %35, align 4, !tbaa !18
  br label %.critedge61

52:                                               ; preds = %.lr.ph70
  %53 = add i32 %.04968, -1
  %54 = icmp ugt i32 %53, 1
  br i1 %54, label %.lr.ph70, label %.critedge5.thread75, !llvm.loop !22

.critedge5.thread75:                              ; preds = %52
  store i32 1, ptr %35, align 4, !tbaa !18
  br label %55

.critedge5:                                       ; preds = %.critedge
  %.not72 = icmp eq i32 %46, 0
  br i1 %.not72, label %.critedge61, label %55

55:                                               ; preds = %.critedge5.thread75, %.critedge5
  %56 = load i32, ptr %45, align 4, !tbaa !20
  %57 = icmp eq i32 %56, 0
  br i1 %57, label %58, label %.critedge61

58:                                               ; preds = %55
  %59 = getelementptr inbounds i8, ptr %0, i64 24
  store i8 0, ptr %59, align 8, !tbaa !14
  br label %.critedge61

.critedge61:                                      ; preds = %.critedge5.thread, %.critedge5, %55, %58
  %.not58 = icmp eq ptr %3, null
  br i1 %.not58, label %61, label %60

60:                                               ; preds = %.critedge61
  store ptr %.4.lcssa, ptr %3, align 8, !tbaa !5
  br label %61

61:                                               ; preds = %60, %.critedge61
  %62 = load i8, ptr %.4.lcssa, align 1, !tbaa !9
  %.not59 = icmp eq i8 %62, 0
  %. = select i1 %.not59, i32 0, i32 -5
  br label %63

63:                                               ; preds = %61, %29, %8
  %.050 = phi i32 [ -3, %8 ], [ -2, %29 ], [ %., %61 ]
  ret i32 %.050
}

; Function Attrs: mustprogress nofree nosync nounwind willreturn memory(none)
declare ptr @__ctype_b_loc() local_unnamed_addr #2

; Function Attrs: nounwind uwtable
declare hidden i32 @s_ch2val(i8 noundef signext, i32 noundef) local_unnamed_addr #1

; Function Attrs: nounwind uwtable
declare hidden i32 @s_inlen(i32 noundef, i32 noundef) local_unnamed_addr #1

; Function Attrs: mustprogress nofree nounwind willreturn memory(argmem: read)
declare i64 @strlen(ptr nocapture noundef) local_unnamed_addr #3

; Function Attrs: nounwind uwtable
declare hidden void @s_dmul(ptr noundef, i32 noundef) local_unnamed_addr #1

; Function Attrs: nounwind uwtable
declare hidden void @s_dadd(ptr noundef, i32 noundef) local_unnamed_addr #1

attributes #0 = { 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 #1 = { 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 #2 = { mustprogress nofree nosync nounwind willreturn memory(none) "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 = { mustprogress nofree nounwind willreturn memory(argmem: read) "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 = { noreturn nounwind }
attributes #5 = { nounwind willreturn memory(none) }
attributes #6 = { nounwind willreturn memory(read) }

!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 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
!9 = !{!7, !7, i64 0}
!10 = !{!11, !11, i64 0}
!11 = !{!"short", !7, i64 0}
!12 = distinct !{!12, !13}
!13 = !{!"llvm.loop.mustprogress"}
!14 = !{!15, !7, i64 24}
!15 = !{!"mpz", !16, i64 0, !6, i64 8, !16, i64 16, !16, i64 20, !7, i64 24}
!16 = !{!"int", !7, i64 0}
!17 = distinct !{!17, !13}
!18 = !{!15, !16, i64 20}
!19 = !{!15, !6, i64 8}
!20 = !{!16, !16, i64 0}
!21 = distinct !{!21, !13}
!22 = distinct !{!22, !13}


; Effective O3 passes: CorrelatedValuePropagationPass,DSEPass,EarlyCSEPass,GVNPass,GlobalOptPass,IPSCCPPass,IndVarSimplifyPass,InferFunctionAttrsPass,InstCombinePass,InstSimplifyPass,JumpThreadingPass,LCSSAPass,LICMPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,PostOrderFunctionAttrsPass,SROAPass,SimplifyCFGPass,TailCallElimPass