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

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

@MP_OK = external constant i32, align 4
@.str.2 = external hidden unnamed_addr constant [92 x i8], align 1
@.str.33 = external hidden unnamed_addr constant [67 x i8], align 1
@__PRETTY_FUNCTION__.impq_get_str = external hidden unnamed_addr constant [40 x i8], align 1

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

declare i32 @mp_int_compare_value(ptr noundef, i64 noundef) #1

declare ptr @mp_rat_denom_ref(ptr noundef) #1

declare ptr @mp_rat_numer_ref(ptr noundef) #1

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

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

; Function Attrs: nounwind uwtable
declare dso_local ptr @impz_get_str(ptr noundef, i32 noundef, ptr noundef) #3

; Function Attrs: nounwind allocsize(0)
declare noalias ptr @malloc(i64 noundef) #4

; Function Attrs: nounwind willreturn memory(none)
declare ptr @__ctype_toupper_loc() #5

; Function Attrs: nounwind willreturn memory(none)
declare ptr @__ctype_tolower_loc() #5

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

20:                                               ; preds = %3
  %21 = load ptr, ptr %5, align 8, !tbaa !5
  %22 = load i32, ptr %6, align 4, !tbaa !9
  %23 = load ptr, ptr %7, align 8, !tbaa !5
  %24 = call ptr @mp_rat_numer_ref(ptr noundef %23)
  %25 = call ptr @impz_get_str(ptr noundef %21, i32 noundef %22, ptr noundef %24)
  store ptr %25, ptr %4, align 8
  store i32 1, ptr %11, align 4
  br label %106

26:                                               ; preds = %3
  %27 = load i32, ptr %6, align 4, !tbaa !9
  store i32 %27, ptr %9, align 4, !tbaa !9
  %28 = load i32, ptr %9, align 4, !tbaa !9
  %29 = icmp slt i32 %28, 0
  br i1 %29, label %30, label %33

30:                                               ; preds = %26
  %31 = load i32, ptr %9, align 4, !tbaa !9
  %32 = sub nsw i32 0, %31
  store i32 %32, ptr %9, align 4, !tbaa !9
  br label %33

33:                                               ; preds = %30, %26
  %34 = load ptr, ptr %7, align 8, !tbaa !5
  %35 = load i32, ptr %9, align 4, !tbaa !9
  %36 = call i32 @mp_rat_string_len(ptr noundef %34, i32 noundef %35)
  store i32 %36, ptr %10, align 4, !tbaa !9
  %37 = load ptr, ptr %5, align 8, !tbaa !5
  %38 = icmp eq ptr %37, null
  br i1 %38, label %39, label %43

39:                                               ; preds = %33
  %40 = load i32, ptr %10, align 4, !tbaa !9
  %41 = sext i32 %40 to i64
  %42 = call noalias ptr @malloc(i64 noundef %41) #7
  store ptr %42, ptr %5, align 8, !tbaa !5
  br label %43

43:                                               ; preds = %39, %33
  %44 = load ptr, ptr %7, align 8, !tbaa !5
  %45 = load i32, ptr %9, align 4, !tbaa !9
  %46 = load ptr, ptr %5, align 8, !tbaa !5
  %47 = load i32, ptr %10, align 4, !tbaa !9
  %48 = call i32 @mp_rat_to_string(ptr noundef %44, i32 noundef %45, ptr noundef %46, i32 noundef %47)
  %49 = load i32, ptr @MP_OK, align 4, !tbaa !9
  %50 = icmp eq i32 %48, %49
  br i1 %50, label %51, label %53

51:                                               ; preds = %43
  br i1 true, label %52, label %53

52:                                               ; preds = %51
  br label %54

53:                                               ; preds = %51, %43
  call void @__assert_fail(ptr noundef @.str.33, ptr noundef @.str.2, i32 noundef 369, ptr noundef @__PRETTY_FUNCTION__.impq_get_str) #8
  unreachable

54:                                               ; preds = %52
  store i32 0, ptr %8, align 4, !tbaa !9
  br label %55

55:                                               ; preds = %101, %54
  %56 = load i32, ptr %8, align 4, !tbaa !9
  %57 = load i32, ptr %10, align 4, !tbaa !9
  %58 = icmp slt i32 %56, %57
  br i1 %58, label %59, label %104

59:                                               ; preds = %55
  %60 = load i32, ptr %6, align 4, !tbaa !9
  %61 = icmp slt i32 %60, 0
  br i1 %61, label %62, label %81

62:                                               ; preds = %59
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #6
  %63 = call ptr @__ctype_toupper_loc() #9
  %64 = load ptr, ptr %63, align 8, !tbaa !5
  %65 = load ptr, ptr %5, align 8, !tbaa !5
  %66 = load i32, ptr %8, align 4, !tbaa !9
  %67 = sext i32 %66 to i64
  %68 = getelementptr inbounds i8, ptr %65, i64 %67
  %69 = load i8, ptr %68, align 1, !tbaa !11
  %70 = sext i8 %69 to i32
  %71 = sext i32 %70 to i64
  %72 = getelementptr inbounds i32, ptr %64, i64 %71
  %73 = load i32, ptr %72, align 4, !tbaa !9
  store i32 %73, ptr %12, align 4, !tbaa !9
  %74 = load i32, ptr %12, align 4, !tbaa !9
  store i32 %74, ptr %13, align 4, !tbaa !9
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #6
  %75 = load i32, ptr %13, align 4, !tbaa !9
  %76 = trunc i32 %75 to i8
  %77 = load ptr, ptr %5, align 8, !tbaa !5
  %78 = load i32, ptr %8, align 4, !tbaa !9
  %79 = sext i32 %78 to i64
  %80 = getelementptr inbounds i8, ptr %77, i64 %79
  store i8 %76, ptr %80, align 1, !tbaa !11
  br label %100

81:                                               ; preds = %59
  call void @llvm.lifetime.start.p0(i64 4, ptr %14) #6
  %82 = call ptr @__ctype_tolower_loc() #9
  %83 = load ptr, ptr %82, align 8, !tbaa !5
  %84 = load ptr, ptr %5, align 8, !tbaa !5
  %85 = load i32, ptr %8, align 4, !tbaa !9
  %86 = sext i32 %85 to i64
  %87 = getelementptr inbounds i8, ptr %84, i64 %86
  %88 = load i8, ptr %87, align 1, !tbaa !11
  %89 = sext i8 %88 to i32
  %90 = sext i32 %89 to i64
  %91 = getelementptr inbounds i32, ptr %83, i64 %90
  %92 = load i32, ptr %91, align 4, !tbaa !9
  store i32 %92, ptr %14, align 4, !tbaa !9
  %93 = load i32, ptr %14, align 4, !tbaa !9
  store i32 %93, ptr %15, align 4, !tbaa !9
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #6
  %94 = load i32, ptr %15, align 4, !tbaa !9
  %95 = trunc i32 %94 to i8
  %96 = load ptr, ptr %5, align 8, !tbaa !5
  %97 = load i32, ptr %8, align 4, !tbaa !9
  %98 = sext i32 %97 to i64
  %99 = getelementptr inbounds i8, ptr %96, i64 %98
  store i8 %95, ptr %99, align 1, !tbaa !11
  br label %100

100:                                              ; preds = %81, %62
  br label %101

101:                                              ; preds = %100
  %102 = load i32, ptr %8, align 4, !tbaa !9
  %103 = add nsw i32 %102, 1
  store i32 %103, ptr %8, align 4, !tbaa !9
  br label %55, !llvm.loop !12

104:                                              ; preds = %55
  %105 = load ptr, ptr %5, align 8, !tbaa !5
  store ptr %105, ptr %4, align 8
  store i32 1, ptr %11, align 4
  br label %106

106:                                              ; preds = %104, %20
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #6
  %107 = load ptr, ptr %4, align 8
  ret ptr %107
}

declare i32 @mp_rat_string_len(ptr noundef, i32 noundef) #1

declare i32 @mp_rat_to_string(ptr noundef, i32 noundef, ptr noundef, i32 noundef) #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 = { "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 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #3 = { 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 #4 = { nounwind allocsize(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 #5 = { 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 #6 = { nounwind }
attributes #7 = { nounwind allocsize(0) }
attributes #8 = { noreturn nounwind }
attributes #9 = { nounwind willreturn memory(none) }

!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 = distinct !{!12, !13}
!13 = !{!"llvm.loop.mustprogress"}


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

@MP_OK = external local_unnamed_addr constant i32, align 4
@.str.2 = external hidden unnamed_addr constant [92 x i8], align 1
@.str.33 = external hidden unnamed_addr constant [67 x i8], align 1
@__PRETTY_FUNCTION__.impq_get_str = external hidden unnamed_addr constant [40 x i8], align 1

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

declare i32 @mp_int_compare_value(ptr noundef, i64 noundef) local_unnamed_addr #1

declare ptr @mp_rat_denom_ref(ptr noundef) local_unnamed_addr #1

declare ptr @mp_rat_numer_ref(ptr noundef) local_unnamed_addr #1

; Function Attrs: nounwind uwtable
declare dso_local ptr @impz_get_str(ptr noundef, i32 noundef, ptr noundef) local_unnamed_addr #2

; Function Attrs: mustprogress nofree nounwind willreturn allockind("alloc,uninitialized") allocsize(0) memory(inaccessiblemem: readwrite)
declare noalias noundef ptr @malloc(i64 noundef) local_unnamed_addr #3

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

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

; Function Attrs: nounwind uwtable
define dso_local ptr @impq_get_str(ptr noundef %0, i32 noundef %1, ptr noundef %2) local_unnamed_addr #2 {
  %4 = tail call ptr @mp_rat_denom_ref(ptr noundef %2) #6
  %5 = tail call i32 @mp_int_compare_value(ptr noundef %4, i64 noundef 1) #6
  %6 = icmp eq i32 %5, 0
  br i1 %6, label %7, label %10

7:                                                ; preds = %3
  %8 = tail call ptr @mp_rat_numer_ref(ptr noundef %2) #6
  %9 = tail call ptr @impz_get_str(ptr noundef %0, i32 noundef %1, ptr noundef %8)
  br label %.loopexit

10:                                               ; preds = %3
  %11 = icmp slt i32 %1, 0
  %spec.select = tail call i32 @llvm.abs.i32(i32 %1, i1 true)
  %12 = tail call i32 @mp_rat_string_len(ptr noundef %2, i32 noundef %spec.select) #6
  %13 = icmp eq ptr %0, null
  br i1 %13, label %14, label %17

14:                                               ; preds = %10
  %15 = sext i32 %12 to i64
  %16 = tail call noalias ptr @malloc(i64 noundef %15) #7
  br label %17

17:                                               ; preds = %14, %10
  %.032 = phi ptr [ %16, %14 ], [ %0, %10 ]
  %18 = tail call i32 @mp_rat_to_string(ptr noundef %2, i32 noundef %spec.select, ptr noundef %.032, i32 noundef %12) #6
  %19 = load i32, ptr @MP_OK, align 4, !tbaa !5
  %20 = icmp eq i32 %18, %19
  br i1 %20, label %.preheader, label %55

.preheader:                                       ; preds = %17
  %21 = icmp sgt i32 %12, 0
  br i1 %21, label %.lr.ph, label %.loopexit

.lr.ph:                                           ; preds = %.preheader
  %wide.trip.count43 = zext nneg i32 %12 to i64
  br i1 %11, label %.lr.ph.split.us, label %.lr.ph.split

.lr.ph.split.us:                                  ; preds = %.lr.ph
  %22 = tail call ptr @__ctype_toupper_loc() #8
  %xtraiter49 = and i64 %wide.trip.count43, 3
  %23 = icmp ult i32 %12, 4
  br i1 %23, label %.loopexit.loopexit.unr-lcssa, label %.lr.ph.split.us.new

.lr.ph.split.us.new:                              ; preds = %.lr.ph.split.us
  %unroll_iter52 = and i64 %wide.trip.count43, 2147483644
  br label %24

24:                                               ; preds = %24, %.lr.ph.split.us.new
  %indvars.iv40 = phi i64 [ 0, %.lr.ph.split.us.new ], [ %indvars.iv.next41.3, %24 ]
  %niter53 = phi i64 [ 0, %.lr.ph.split.us.new ], [ %niter53.next.3, %24 ]
  %25 = load ptr, ptr %22, align 8, !tbaa !9
  %26 = getelementptr inbounds i8, ptr %.032, i64 %indvars.iv40
  %27 = load i8, ptr %26, align 1, !tbaa !11
  %28 = sext i8 %27 to i64
  %29 = getelementptr inbounds i32, ptr %25, i64 %28
  %30 = load i32, ptr %29, align 4, !tbaa !5
  %31 = trunc i32 %30 to i8
  store i8 %31, ptr %26, align 1, !tbaa !11
  %indvars.iv.next41 = or disjoint i64 %indvars.iv40, 1
  %32 = load ptr, ptr %22, align 8, !tbaa !9
  %33 = getelementptr inbounds i8, ptr %.032, i64 %indvars.iv.next41
  %34 = load i8, ptr %33, align 1, !tbaa !11
  %35 = sext i8 %34 to i64
  %36 = getelementptr inbounds i32, ptr %32, i64 %35
  %37 = load i32, ptr %36, align 4, !tbaa !5
  %38 = trunc i32 %37 to i8
  store i8 %38, ptr %33, align 1, !tbaa !11
  %indvars.iv.next41.1 = or disjoint i64 %indvars.iv40, 2
  %39 = load ptr, ptr %22, align 8, !tbaa !9
  %40 = getelementptr inbounds i8, ptr %.032, i64 %indvars.iv.next41.1
  %41 = load i8, ptr %40, align 1, !tbaa !11
  %42 = sext i8 %41 to i64
  %43 = getelementptr inbounds i32, ptr %39, i64 %42
  %44 = load i32, ptr %43, align 4, !tbaa !5
  %45 = trunc i32 %44 to i8
  store i8 %45, ptr %40, align 1, !tbaa !11
  %indvars.iv.next41.2 = or disjoint i64 %indvars.iv40, 3
  %46 = load ptr, ptr %22, align 8, !tbaa !9
  %47 = getelementptr inbounds i8, ptr %.032, i64 %indvars.iv.next41.2
  %48 = load i8, ptr %47, align 1, !tbaa !11
  %49 = sext i8 %48 to i64
  %50 = getelementptr inbounds i32, ptr %46, i64 %49
  %51 = load i32, ptr %50, align 4, !tbaa !5
  %52 = trunc i32 %51 to i8
  store i8 %52, ptr %47, align 1, !tbaa !11
  %indvars.iv.next41.3 = add nuw nsw i64 %indvars.iv40, 4
  %niter53.next.3 = add i64 %niter53, 4
  %niter53.ncmp.3 = icmp eq i64 %niter53.next.3, %unroll_iter52
  br i1 %niter53.ncmp.3, label %.loopexit.loopexit.unr-lcssa, label %24, !llvm.loop !12

.lr.ph.split:                                     ; preds = %.lr.ph
  %53 = tail call ptr @__ctype_tolower_loc() #8
  %xtraiter = and i64 %wide.trip.count43, 3
  %54 = icmp ult i32 %12, 4
  br i1 %54, label %.loopexit.loopexit47.unr-lcssa, label %.lr.ph.split.new

.lr.ph.split.new:                                 ; preds = %.lr.ph.split
  %unroll_iter = and i64 %wide.trip.count43, 2147483644
  br label %56

55:                                               ; preds = %17
  tail call void @__assert_fail(ptr noundef nonnull @.str.33, ptr noundef nonnull @.str.2, i32 noundef 369, ptr noundef nonnull @__PRETTY_FUNCTION__.impq_get_str) #9
  unreachable

56:                                               ; preds = %56, %.lr.ph.split.new
  %indvars.iv = phi i64 [ 0, %.lr.ph.split.new ], [ %indvars.iv.next.3, %56 ]
  %niter = phi i64 [ 0, %.lr.ph.split.new ], [ %niter.next.3, %56 ]
  %57 = load ptr, ptr %53, align 8, !tbaa !9
  %58 = getelementptr inbounds i8, ptr %.032, i64 %indvars.iv
  %59 = load i8, ptr %58, align 1, !tbaa !11
  %60 = sext i8 %59 to i64
  %61 = getelementptr inbounds i32, ptr %57, i64 %60
  %62 = load i32, ptr %61, align 4, !tbaa !5
  %63 = trunc i32 %62 to i8
  store i8 %63, ptr %58, align 1, !tbaa !11
  %indvars.iv.next = or disjoint i64 %indvars.iv, 1
  %64 = load ptr, ptr %53, align 8, !tbaa !9
  %65 = getelementptr inbounds i8, ptr %.032, i64 %indvars.iv.next
  %66 = load i8, ptr %65, align 1, !tbaa !11
  %67 = sext i8 %66 to i64
  %68 = getelementptr inbounds i32, ptr %64, i64 %67
  %69 = load i32, ptr %68, align 4, !tbaa !5
  %70 = trunc i32 %69 to i8
  store i8 %70, ptr %65, align 1, !tbaa !11
  %indvars.iv.next.1 = or disjoint i64 %indvars.iv, 2
  %71 = load ptr, ptr %53, align 8, !tbaa !9
  %72 = getelementptr inbounds i8, ptr %.032, i64 %indvars.iv.next.1
  %73 = load i8, ptr %72, align 1, !tbaa !11
  %74 = sext i8 %73 to i64
  %75 = getelementptr inbounds i32, ptr %71, i64 %74
  %76 = load i32, ptr %75, align 4, !tbaa !5
  %77 = trunc i32 %76 to i8
  store i8 %77, ptr %72, align 1, !tbaa !11
  %indvars.iv.next.2 = or disjoint i64 %indvars.iv, 3
  %78 = load ptr, ptr %53, align 8, !tbaa !9
  %79 = getelementptr inbounds i8, ptr %.032, i64 %indvars.iv.next.2
  %80 = load i8, ptr %79, align 1, !tbaa !11
  %81 = sext i8 %80 to i64
  %82 = getelementptr inbounds i32, ptr %78, i64 %81
  %83 = load i32, ptr %82, align 4, !tbaa !5
  %84 = trunc i32 %83 to i8
  store i8 %84, ptr %79, align 1, !tbaa !11
  %indvars.iv.next.3 = add nuw nsw i64 %indvars.iv, 4
  %niter.next.3 = add i64 %niter, 4
  %niter.ncmp.3 = icmp eq i64 %niter.next.3, %unroll_iter
  br i1 %niter.ncmp.3, label %.loopexit.loopexit47.unr-lcssa, label %56, !llvm.loop !12

.loopexit.loopexit.unr-lcssa:                     ; preds = %24, %.lr.ph.split.us
  %indvars.iv40.unr = phi i64 [ 0, %.lr.ph.split.us ], [ %indvars.iv.next41.3, %24 ]
  %lcmp.mod51.not = icmp eq i64 %xtraiter49, 0
  br i1 %lcmp.mod51.not, label %.loopexit, label %.epil.preheader48

.epil.preheader48:                                ; preds = %.loopexit.loopexit.unr-lcssa, %.epil.preheader48
  %indvars.iv40.epil = phi i64 [ %indvars.iv.next41.epil, %.epil.preheader48 ], [ %indvars.iv40.unr, %.loopexit.loopexit.unr-lcssa ]
  %epil.iter50 = phi i64 [ %epil.iter50.next, %.epil.preheader48 ], [ 0, %.loopexit.loopexit.unr-lcssa ]
  %85 = load ptr, ptr %22, align 8, !tbaa !9
  %86 = getelementptr inbounds i8, ptr %.032, i64 %indvars.iv40.epil
  %87 = load i8, ptr %86, align 1, !tbaa !11
  %88 = sext i8 %87 to i64
  %89 = getelementptr inbounds i32, ptr %85, i64 %88
  %90 = load i32, ptr %89, align 4, !tbaa !5
  %91 = trunc i32 %90 to i8
  store i8 %91, ptr %86, align 1, !tbaa !11
  %indvars.iv.next41.epil = add nuw nsw i64 %indvars.iv40.epil, 1
  %epil.iter50.next = add i64 %epil.iter50, 1
  %epil.iter50.cmp.not = icmp eq i64 %epil.iter50.next, %xtraiter49
  br i1 %epil.iter50.cmp.not, label %.loopexit, label %.epil.preheader48, !llvm.loop !14

.loopexit.loopexit47.unr-lcssa:                   ; preds = %56, %.lr.ph.split
  %indvars.iv.unr = phi i64 [ 0, %.lr.ph.split ], [ %indvars.iv.next.3, %56 ]
  %lcmp.mod.not = icmp eq i64 %xtraiter, 0
  br i1 %lcmp.mod.not, label %.loopexit, label %.epil.preheader

.epil.preheader:                                  ; preds = %.loopexit.loopexit47.unr-lcssa, %.epil.preheader
  %indvars.iv.epil = phi i64 [ %indvars.iv.next.epil, %.epil.preheader ], [ %indvars.iv.unr, %.loopexit.loopexit47.unr-lcssa ]
  %epil.iter = phi i64 [ %epil.iter.next, %.epil.preheader ], [ 0, %.loopexit.loopexit47.unr-lcssa ]
  %92 = load ptr, ptr %53, align 8, !tbaa !9
  %93 = getelementptr inbounds i8, ptr %.032, i64 %indvars.iv.epil
  %94 = load i8, ptr %93, align 1, !tbaa !11
  %95 = sext i8 %94 to i64
  %96 = getelementptr inbounds i32, ptr %92, i64 %95
  %97 = load i32, ptr %96, align 4, !tbaa !5
  %98 = trunc i32 %97 to i8
  store i8 %98, ptr %93, align 1, !tbaa !11
  %indvars.iv.next.epil = add nuw nsw i64 %indvars.iv.epil, 1
  %epil.iter.next = add i64 %epil.iter, 1
  %epil.iter.cmp.not = icmp eq i64 %epil.iter.next, %xtraiter
  br i1 %epil.iter.cmp.not, label %.loopexit, label %.epil.preheader, !llvm.loop !16

.loopexit:                                        ; preds = %.loopexit.loopexit47.unr-lcssa, %.epil.preheader, %.loopexit.loopexit.unr-lcssa, %.epil.preheader48, %.preheader, %7
  %.0 = phi ptr [ %9, %7 ], [ %.032, %.preheader ], [ %.032, %.epil.preheader48 ], [ %.032, %.loopexit.loopexit.unr-lcssa ], [ %.032, %.epil.preheader ], [ %.032, %.loopexit.loopexit47.unr-lcssa ]
  ret ptr %.0
}

declare i32 @mp_rat_string_len(ptr noundef, i32 noundef) local_unnamed_addr #1

declare i32 @mp_rat_to_string(ptr noundef, i32 noundef, ptr noundef, i32 noundef) local_unnamed_addr #1

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare i32 @llvm.abs.i32(i32, i1 immarg) #5

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 = { "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 = { mustprogress nofree nounwind willreturn allockind("alloc,uninitialized") allocsize(0) memory(inaccessiblemem: readwrite) "alloc-family"="malloc" "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 = { 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 #5 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #6 = { nounwind }
attributes #7 = { nounwind allocsize(0) }
attributes #8 = { nounwind willreturn memory(none) }
attributes #9 = { 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, !10, i64 0}
!10 = !{!"any pointer", !7, i64 0}
!11 = !{!7, !7, i64 0}
!12 = distinct !{!12, !13}
!13 = !{!"llvm.loop.mustprogress"}
!14 = distinct !{!14, !15}
!15 = !{!"llvm.loop.unroll.disable"}
!16 = distinct !{!16, !15}


; Effective O3 passes: EarlyCSEPass,GlobalOptPass,IndVarSimplifyPass,InferFunctionAttrsPass,InstCombinePass,InstSimplifyPass,JumpThreadingPass,LCSSAPass,LICMPass,LoopRotatePass,LoopSimplifyCFGPass,LoopSimplifyPass,LoopUnrollPass,SROAPass,SimplifyCFGPass,TailCallElimPass