; LLVM IR from ShahjalalShohag/code-library :: Miscellaneous/Fraction Binary Search.ll (Z6fracBSx)

; 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.frac = type { i64, i64 }

@__const._Z6fracBSx.lo = external hidden unnamed_addr constant %struct.frac, align 8
@__const._Z6fracBSx.hi = external hidden unnamed_addr constant %struct.frac, align 8
@.str = external hidden unnamed_addr constant [6 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [103 x i8], align 1
@__PRETTY_FUNCTION__._Z6fracBSx = external hidden unnamed_addr constant [23 x i8], align 1

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_Z1f4frac(i64, i64) #0

; Function Attrs: mustprogress uwtable
define dso_local { i64, i64 } @_Z6fracBSx(i64 noundef %0) #1 {
  %2 = alloca %struct.frac, align 8
  %3 = alloca i64, align 8
  %4 = alloca i8, align 1
  %5 = alloca i8, align 1
  %6 = alloca i8, align 1
  %7 = alloca %struct.frac, align 8
  %8 = alloca %struct.frac, align 8
  %9 = alloca %struct.frac, align 8
  %10 = alloca i32, align 4
  %11 = alloca %struct.frac, align 8
  %12 = alloca i64, align 8
  %13 = alloca i64, align 8
  %14 = alloca i32, align 4
  %15 = alloca %struct.frac, align 8
  %16 = alloca %struct.frac, align 8
  store i64 %0, ptr %3, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 1, ptr %4) #6
  store i8 1, ptr %4, align 1, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 1, ptr %5) #6
  store i8 1, ptr %5, align 1, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 1, ptr %6) #6
  store i8 1, ptr %6, align 1, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 16, ptr %7) #6
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %7, ptr align 8 @__const._Z6fracBSx.lo, i64 16, i1 false)
  call void @llvm.lifetime.start.p0(i64 16, ptr %8) #6
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %8, ptr align 8 @__const._Z6fracBSx.hi, i64 16, i1 false)
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %9, ptr align 8 %7, i64 16, i1 false), !tbaa.struct !11
  %17 = getelementptr inbounds { i64, i64 }, ptr %9, i32 0, i32 0
  %18 = load i64, ptr %17, align 8
  %19 = getelementptr inbounds { i64, i64 }, ptr %9, i32 0, i32 1
  %20 = load i64, ptr %19, align 8
  %21 = call noundef zeroext i1 @_Z1f4frac(i64 %18, i64 %20)
  br i1 %21, label %22, label %23

22:                                               ; preds = %1
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %2, ptr align 8 %7, i64 16, i1 false), !tbaa.struct !11
  store i32 1, ptr %10, align 4
  br label %134

23:                                               ; preds = %1
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %11, ptr align 8 %8, i64 16, i1 false), !tbaa.struct !11
  %24 = getelementptr inbounds { i64, i64 }, ptr %11, i32 0, i32 0
  %25 = load i64, ptr %24, align 8
  %26 = getelementptr inbounds { i64, i64 }, ptr %11, i32 0, i32 1
  %27 = load i64, ptr %26, align 8
  %28 = call noundef zeroext i1 @_Z1f4frac(i64 %25, i64 %27)
  br i1 %28, label %29, label %30

29:                                               ; preds = %23
  br label %32

30:                                               ; preds = %23
  call void @__assert_fail(ptr noundef @.str, ptr noundef @.str.1, i32 noundef 17, ptr noundef @__PRETTY_FUNCTION__._Z6fracBSx) #7
  unreachable

31:                                               ; No predecessors!
  br label %32

32:                                               ; preds = %31, %29
  br label %33

33:                                               ; preds = %100, %32
  %34 = load i8, ptr %5, align 1, !tbaa !9, !range !12, !noundef !13
  %35 = trunc i8 %34 to i1
  br i1 %35, label %39, label %36

36:                                               ; preds = %33
  %37 = load i8, ptr %6, align 1, !tbaa !9, !range !12, !noundef !13
  %38 = trunc i8 %37 to i1
  br label %39

39:                                               ; preds = %36, %33
  %40 = phi i1 [ true, %33 ], [ %38, %36 ]
  br i1 %40, label %41, label %127

41:                                               ; preds = %39
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #6
  store i64 0, ptr %12, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #6
  store i64 1, ptr %13, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %14) #6
  store i32 0, ptr %14, align 4, !tbaa !14
  br label %42

42:                                               ; preds = %93, %41
  %43 = load i64, ptr %13, align 8, !tbaa !5
  %44 = icmp ne i64 %43, 0
  br i1 %44, label %46, label %45

45:                                               ; preds = %42
  store i32 4, ptr %10, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #6
  br label %100

46:                                               ; preds = %42
  %47 = load i64, ptr %13, align 8, !tbaa !5
  %48 = load i64, ptr %12, align 8, !tbaa !5
  %49 = add nsw i64 %48, %47
  store i64 %49, ptr %12, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 16, ptr %15) #6
  %50 = getelementptr inbounds %struct.frac, ptr %15, i32 0, i32 0
  %51 = getelementptr inbounds %struct.frac, ptr %7, i32 0, i32 0
  %52 = load i64, ptr %51, align 8, !tbaa !16
  %53 = load i64, ptr %12, align 8, !tbaa !5
  %54 = mul nsw i64 %52, %53
  %55 = getelementptr inbounds %struct.frac, ptr %8, i32 0, i32 0
  %56 = load i64, ptr %55, align 8, !tbaa !16
  %57 = add nsw i64 %54, %56
  store i64 %57, ptr %50, align 8, !tbaa !16
  %58 = getelementptr inbounds %struct.frac, ptr %15, i32 0, i32 1
  %59 = getelementptr inbounds %struct.frac, ptr %7, i32 0, i32 1
  %60 = load i64, ptr %59, align 8, !tbaa !18
  %61 = load i64, ptr %12, align 8, !tbaa !5
  %62 = mul nsw i64 %60, %61
  %63 = getelementptr inbounds %struct.frac, ptr %8, i32 0, i32 1
  %64 = load i64, ptr %63, align 8, !tbaa !18
  %65 = add nsw i64 %62, %64
  store i64 %65, ptr %58, align 8, !tbaa !18
  %66 = getelementptr inbounds %struct.frac, ptr %15, i32 0, i32 0
  %67 = load i64, ptr %66, align 8, !tbaa !16
  %68 = call noundef i64 @_ZSt3absx(i64 noundef %67)
  %69 = load i64, ptr %3, align 8, !tbaa !5
  %70 = icmp sgt i64 %68, %69
  br i1 %70, label %88, label %71

71:                                               ; preds = %46
  %72 = getelementptr inbounds %struct.frac, ptr %15, i32 0, i32 1
  %73 = load i64, ptr %72, align 8, !tbaa !18
  %74 = load i64, ptr %3, align 8, !tbaa !5
  %75 = icmp sgt i64 %73, %74
  br i1 %75, label %88, label %76

76:                                               ; preds = %71
  %77 = load i8, ptr %4, align 1, !tbaa !9, !range !12, !noundef !13
  %78 = trunc i8 %77 to i1
  %79 = zext i1 %78 to i32
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %16, ptr align 8 %15, i64 16, i1 false), !tbaa.struct !11
  %80 = getelementptr inbounds { i64, i64 }, ptr %16, i32 0, i32 0
  %81 = load i64, ptr %80, align 8
  %82 = getelementptr inbounds { i64, i64 }, ptr %16, i32 0, i32 1
  %83 = load i64, ptr %82, align 8
  %84 = call noundef zeroext i1 @_Z1f4frac(i64 %81, i64 %83)
  %85 = xor i1 %84, true
  %86 = zext i1 %85 to i32
  %87 = icmp eq i32 %79, %86
  br i1 %87, label %88, label %92

88:                                               ; preds = %76, %71, %46
  %89 = load i64, ptr %13, align 8, !tbaa !5
  %90 = load i64, ptr %12, align 8, !tbaa !5
  %91 = sub nsw i64 %90, %89
  store i64 %91, ptr %12, align 8, !tbaa !5
  store i32 2, ptr %14, align 4, !tbaa !14
  br label %92

92:                                               ; preds = %88, %76
  call void @llvm.lifetime.end.p0(i64 16, ptr %15) #6
  br label %93

93:                                               ; preds = %92
  %94 = load i32, ptr %14, align 4, !tbaa !14
  %95 = load i64, ptr %13, align 8, !tbaa !5
  %96 = mul nsw i64 %95, 2
  store i64 %96, ptr %13, align 8, !tbaa !5
  %97 = load i64, ptr %13, align 8, !tbaa !5
  %98 = zext i32 %94 to i64
  %99 = ashr i64 %97, %98
  store i64 %99, ptr %13, align 8, !tbaa !5
  br label %42, !llvm.loop !19

100:                                              ; preds = %45
  %101 = getelementptr inbounds %struct.frac, ptr %7, i32 0, i32 0
  %102 = load i64, ptr %101, align 8, !tbaa !16
  %103 = load i64, ptr %12, align 8, !tbaa !5
  %104 = mul nsw i64 %102, %103
  %105 = getelementptr inbounds %struct.frac, ptr %8, i32 0, i32 0
  %106 = load i64, ptr %105, align 8, !tbaa !16
  %107 = add nsw i64 %106, %104
  store i64 %107, ptr %105, align 8, !tbaa !16
  %108 = getelementptr inbounds %struct.frac, ptr %7, i32 0, i32 1
  %109 = load i64, ptr %108, align 8, !tbaa !18
  %110 = load i64, ptr %12, align 8, !tbaa !5
  %111 = mul nsw i64 %109, %110
  %112 = getelementptr inbounds %struct.frac, ptr %8, i32 0, i32 1
  %113 = load i64, ptr %112, align 8, !tbaa !18
  %114 = add nsw i64 %113, %111
  store i64 %114, ptr %112, align 8, !tbaa !18
  %115 = load i8, ptr %4, align 1, !tbaa !9, !range !12, !noundef !13
  %116 = trunc i8 %115 to i1
  %117 = xor i1 %116, true
  %118 = zext i1 %117 to i8
  store i8 %118, ptr %4, align 1, !tbaa !9
  call void @_ZSt4swapI4fracENSt9enable_ifIXsr6__and_ISt6__not_ISt15__is_tuple_likeIT_EESt21is_move_constructibleIS4_ESt18is_move_assignableIS4_EEE5valueEvE4typeERS4_SD_(ptr noundef nonnull align 8 dereferenceable(16) %7, ptr noundef nonnull align 8 dereferenceable(16) %8) #6
  %119 = load i8, ptr %6, align 1, !tbaa !9, !range !12, !noundef !13
  %120 = trunc i8 %119 to i1
  %121 = zext i1 %120 to i8
  store i8 %121, ptr %5, align 1, !tbaa !9
  %122 = load i64, ptr %12, align 8, !tbaa !5
  %123 = icmp ne i64 %122, 0
  %124 = xor i1 %123, true
  %125 = xor i1 %124, true
  %126 = zext i1 %125 to i8
  store i8 %126, ptr %6, align 1, !tbaa !9
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #6
  br label %33, !llvm.loop !21

127:                                              ; preds = %39
  %128 = load i8, ptr %4, align 1, !tbaa !9, !range !12, !noundef !13
  %129 = trunc i8 %128 to i1
  br i1 %129, label %130, label %131

130:                                              ; preds = %127
  br label %132

131:                                              ; preds = %127
  br label %132

132:                                              ; preds = %131, %130
  %133 = phi ptr [ %8, %130 ], [ %7, %131 ]
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %2, ptr align 8 %133, i64 16, i1 false), !tbaa.struct !11
  store i32 1, ptr %10, align 4
  br label %134

134:                                              ; preds = %132, %22
  call void @llvm.lifetime.end.p0(i64 16, ptr %8) #6
  call void @llvm.lifetime.end.p0(i64 16, ptr %7) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr %6) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr %5) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr %4) #6
  %135 = load { i64, i64 }, ptr %2, align 8
  ret { i64, i64 } %135
}

; 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 nounwind willreturn memory(argmem: readwrite)
declare void @llvm.memcpy.p0.p0.i64(ptr noalias nocapture writeonly, ptr noalias nocapture readonly, i64, i1 immarg) #3

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef i64 @_ZSt3absx(i64 noundef) #5

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZSt4swapI4fracENSt9enable_ifIXsr6__and_ISt6__not_ISt15__is_tuple_likeIT_EESt21is_move_constructibleIS4_ESt18is_move_assignableIS4_EEE5valueEvE4typeERS4_SD_(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 8 dereferenceable(16)) #5

attributes #0 = { mustprogress 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 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 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #3 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #4 = { 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 #5 = { inlinehint mustprogress 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 #6 = { nounwind }
attributes #7 = { 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 = !{!"long long", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"bool", !7, i64 0}
!11 = !{i64 0, i64 8, !5, i64 8, i64 8, !5}
!12 = !{i8 0, i8 2}
!13 = !{}
!14 = !{!15, !15, i64 0}
!15 = !{!"int", !7, i64 0}
!16 = !{!17, !6, i64 0}
!17 = !{!"_ZTS4frac", !6, i64 0, !6, i64 8}
!18 = !{!17, !6, i64 8}
!19 = distinct !{!19, !20}
!20 = !{!"llvm.loop.mustprogress"}
!21 = distinct !{!21, !20}


; 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.frac = type { i64, i64 }

@__const._Z6fracBSx.lo = external hidden unnamed_addr constant %struct.frac, align 8
@__const._Z6fracBSx.hi = external hidden unnamed_addr constant %struct.frac, align 8
@.str = external hidden unnamed_addr constant [6 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [103 x i8], align 1
@__PRETTY_FUNCTION__._Z6fracBSx = external hidden unnamed_addr constant [23 x i8], align 1

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_Z1f4frac(i64, i64) local_unnamed_addr #0

; Function Attrs: mustprogress nounwind uwtable
define dso_local { i64, i64 } @_Z6fracBSx(i64 noundef %0) local_unnamed_addr #0 {
  %2 = alloca %struct.frac, align 8
  %3 = alloca %struct.frac, align 8
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %2) #5
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 8 dereferenceable(16) %2, ptr noundef nonnull align 8 dereferenceable(16) @__const._Z6fracBSx.lo, i64 16, i1 false)
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %3) #5
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 8 dereferenceable(16) %3, ptr noundef nonnull align 8 dereferenceable(16) @__const._Z6fracBSx.hi, i64 16, i1 false)
  %.sroa.018.0.copyload = load i64, ptr %2, align 8, !tbaa !5
  %.sroa.219.0..sroa_idx = getelementptr inbounds i8, ptr %2, i64 8
  %.sroa.219.0.copyload = load i64, ptr %.sroa.219.0..sroa_idx, align 8, !tbaa !5
  %4 = tail call noundef zeroext i1 @_Z1f4frac(i64 %.sroa.018.0.copyload, i64 %.sroa.219.0.copyload)
  br i1 %4, label %42, label %5

5:                                                ; preds = %1
  %.sroa.016.0.copyload = load i64, ptr %3, align 8, !tbaa !5
  %.sroa.217.0..sroa_idx = getelementptr inbounds i8, ptr %3, i64 8
  %.sroa.217.0.copyload = load i64, ptr %.sroa.217.0..sroa_idx, align 8, !tbaa !5
  %6 = tail call noundef zeroext i1 @_Z1f4frac(i64 %.sroa.016.0.copyload, i64 %.sroa.217.0.copyload)
  br i1 %6, label %.preheader, label %7

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

.preheader:                                       ; preds = %5, %8
  %.046 = phi i1 [ %17, %8 ], [ true, %5 ]
  %.03745 = phi i1 [ %18, %8 ], [ true, %5 ]
  br label %20

8:                                                ; preds = %37
  %9 = load i64, ptr %2, align 8, !tbaa !9
  %10 = mul nsw i64 %9, %.136
  %11 = load i64, ptr %3, align 8, !tbaa !9
  %12 = add nsw i64 %11, %10
  store i64 %12, ptr %3, align 8, !tbaa !9
  %13 = load i64, ptr %.sroa.219.0..sroa_idx, align 8, !tbaa !11
  %14 = mul nsw i64 %13, %.136
  %15 = load i64, ptr %.sroa.217.0..sroa_idx, align 8, !tbaa !11
  %16 = add nsw i64 %15, %14
  store i64 %16, ptr %.sroa.217.0..sroa_idx, align 8, !tbaa !11
  %17 = xor i1 %.046, true
  call void @_ZSt4swapI4fracENSt9enable_ifIXsr6__and_ISt6__not_ISt15__is_tuple_likeIT_EESt21is_move_constructibleIS4_ESt18is_move_assignableIS4_EEE5valueEvE4typeERS4_SD_(ptr noundef nonnull align 8 dereferenceable(16) %2, ptr noundef nonnull align 8 dereferenceable(16) %3) #5
  %18 = icmp ne i64 %.136, 0
  %19 = or i1 %.03745, %18
  br i1 %19, label %.preheader, label %41, !llvm.loop !12

20:                                               ; preds = %.preheader, %37
  %.03344 = phi i32 [ 0, %.preheader ], [ %.1, %37 ]
  %.03443 = phi i64 [ 1, %.preheader ], [ %40, %37 ]
  %.03542 = phi i64 [ 0, %.preheader ], [ %.136, %37 ]
  %21 = add nsw i64 %.03443, %.03542
  %22 = load i64, ptr %2, align 8, !tbaa !9
  %23 = mul nsw i64 %22, %21
  %24 = load i64, ptr %3, align 8, !tbaa !9
  %25 = add nsw i64 %23, %24
  %26 = load i64, ptr %.sroa.219.0..sroa_idx, align 8, !tbaa !11
  %27 = mul nsw i64 %26, %21
  %28 = load i64, ptr %.sroa.217.0..sroa_idx, align 8, !tbaa !11
  %29 = add nsw i64 %27, %28
  %30 = call noundef i64 @_ZSt3absx(i64 noundef %25)
  %31 = icmp sgt i64 %30, %0
  %32 = icmp sgt i64 %29, %0
  %or.cond = select i1 %31, i1 true, i1 %32
  br i1 %or.cond, label %36, label %33

33:                                               ; preds = %20
  %34 = call noundef zeroext i1 @_Z1f4frac(i64 %25, i64 %29)
  %35 = xor i1 %.046, %34
  br i1 %35, label %36, label %37

36:                                               ; preds = %33, %20
  br label %37

37:                                               ; preds = %36, %33
  %.136 = phi i64 [ %.03542, %36 ], [ %21, %33 ]
  %.1 = phi i32 [ 2, %36 ], [ %.03344, %33 ]
  %38 = shl nsw i64 %.03443, 1
  %39 = zext nneg i32 %.1 to i64
  %40 = ashr i64 %38, %39
  %.not = icmp eq i64 %40, 0
  br i1 %.not, label %8, label %20, !llvm.loop !14

41:                                               ; preds = %8
  %.val = load i64, ptr %3, align 8
  %.val40 = load i64, ptr %2, align 8
  %.sroa.028.0.copyload29 = select i1 %.046, i64 %.val40, i64 %.val
  %.sroa.217.0..sroa_idx.val = load i64, ptr %.sroa.217.0..sroa_idx, align 8
  %.sroa.219.0..sroa_idx.val = load i64, ptr %.sroa.219.0..sroa_idx, align 8
  %.sroa.3.0.copyload30 = select i1 %.046, i64 %.sroa.219.0..sroa_idx.val, i64 %.sroa.217.0..sroa_idx.val
  br label %42

42:                                               ; preds = %1, %41
  %.sroa.028.0 = phi i64 [ %.sroa.028.0.copyload29, %41 ], [ %.sroa.018.0.copyload, %1 ]
  %.sroa.3.0 = phi i64 [ %.sroa.3.0.copyload30, %41 ], [ %.sroa.219.0.copyload, %1 ]
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %3) #5
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %2) #5
  %.fca.0.insert = insertvalue { i64, i64 } poison, i64 %.sroa.028.0, 0
  %.fca.1.insert = insertvalue { i64, i64 } %.fca.0.insert, i64 %.sroa.3.0, 1
  ret { i64, i64 } %.fca.1.insert
}

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

; Function Attrs: mustprogress nocallback nofree nounwind willreturn memory(argmem: readwrite)
declare void @llvm.memcpy.p0.p0.i64(ptr noalias nocapture writeonly, ptr noalias nocapture readonly, i64, i1 immarg) #2

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef i64 @_ZSt3absx(i64 noundef) local_unnamed_addr #4

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZSt4swapI4fracENSt9enable_ifIXsr6__and_ISt6__not_ISt15__is_tuple_likeIT_EESt21is_move_constructibleIS4_ESt18is_move_assignableIS4_EEE5valueEvE4typeERS4_SD_(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 8 dereferenceable(16)) local_unnamed_addr #4

attributes #0 = { mustprogress 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 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: readwrite) }
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 = { inlinehint mustprogress 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 #5 = { nounwind }
attributes #6 = { 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 = !{!"long long", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !6, i64 0}
!10 = !{!"_ZTS4frac", !6, i64 0, !6, i64 8}
!11 = !{!10, !6, i64 8}
!12 = distinct !{!12, !13}
!13 = !{!"llvm.loop.mustprogress"}
!14 = distinct !{!14, !13}


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