; LLVM IR from erthink/libmdbx :: src (api-cursor)

; 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.libmdbx_globals = type { %union.bin128, i32, i32, i8, i8, i8, i8, i32, %union.logger_union, %union.pthread_mutex_t, i64, ptr }
%union.bin128 = type { %struct.anon.16 }
%struct.anon.16 = type { i64, i64 }
%union.logger_union = type { ptr }
%union.pthread_mutex_t = type { %struct.__pthread_mutex_s }
%struct.__pthread_mutex_s = type { i32, i32, i32, i32, i32, i16, i16, %struct.__pthread_internal_list }
%struct.__pthread_internal_list = type { ptr, ptr }
%struct.iovec = type { ptr, i64 }
%struct.MDBX_cursor = type { i32, %union.anon, i8, i8, ptr, ptr, ptr, ptr, ptr, [32 x ptr], [32 x i16], ptr, ptr }
%union.anon = type { i16 }
%struct.MDBX_txn = type { i32, i32, i64, i64, ptr, ptr, %struct.geo, i64, i64, ptr, ptr, ptr, ptr, ptr, ptr, %struct.MDBX_canary, ptr, %union.anon.2 }
%struct.geo = type { i16, i16, i32, i32, %union.anon.0, %union.anon.1 }
%union.anon.0 = type { i32 }
%union.anon.1 = type { i32 }
%struct.MDBX_canary = type { i64, i64, i64, i64 }
%union.anon.2 = type { %struct.anon.4 }
%struct.anon.4 = type { %struct.troika, ptr, %struct.anon.5, i8, i32, i32, i64, ptr, ptr, ptr, i64, %union.anon.6 }
%struct.troika = type { i8, i8, i8, i8, i32, [3 x i64] }
%struct.anon.5 = type { %struct.MDBX_rkl, i64, %struct.MDBX_rkl }
%struct.MDBX_rkl = type { i64, i64, i32, i32, ptr, [12 x i64] }
%union.anon.6 = type { %struct.anon.7 }
%struct.anon.7 = type { i64, ptr }

@globals = external global %struct.libmdbx_globals, align 8
@__func__.mdbx_cursor_scan_from = external hidden unnamed_addr constant [22 x i8], align 1
@.str.16 = external hidden unnamed_addr constant [18 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(none)
declare i64 @llvm.expect.i64(i64, i64) #1

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

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

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

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

declare i32 @cursor_ops(ptr noundef, ptr noundef, ptr noundef, i32 noundef) #5

; Function Attrs: hot nounwind uwtable
declare hidden i32 @scan_confinue(ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, i32 noundef) #6

; Function Attrs: nounwind uwtable
define dso_local i32 @mdbx_cursor_scan_from(ptr noundef %0, ptr noundef %1, ptr noundef %2, i32 noundef %3, ptr noundef %4, ptr noundef %5, i32 noundef %6, ptr noundef %7) #4 {
  %9 = alloca i32, align 4
  %10 = alloca ptr, align 8
  %11 = alloca ptr, align 8
  %12 = alloca ptr, align 8
  %13 = alloca i32, align 4
  %14 = alloca ptr, align 8
  %15 = alloca ptr, align 8
  %16 = alloca i32, align 4
  %17 = alloca ptr, align 8
  %18 = alloca i32, align 4
  %19 = alloca i32, align 4
  %20 = alloca i32, align 4
  %21 = alloca i32, align 4
  %22 = alloca %struct.iovec, align 8
  store ptr %0, ptr %10, align 8, !tbaa !5
  store ptr %1, ptr %11, align 8, !tbaa !5
  store ptr %2, ptr %12, align 8, !tbaa !5
  store i32 %3, ptr %13, align 4, !tbaa !9
  store ptr %4, ptr %14, align 8, !tbaa !5
  store ptr %5, ptr %15, align 8, !tbaa !5
  store i32 %6, ptr %16, align 4, !tbaa !9
  store ptr %7, ptr %17, align 8, !tbaa !5
  %23 = load ptr, ptr %11, align 8, !tbaa !5
  %24 = icmp ne ptr %23, null
  br i1 %24, label %25, label %29

25:                                               ; preds = %8
  %26 = load ptr, ptr %14, align 8, !tbaa !5
  %27 = icmp ne ptr %26, null
  %28 = xor i1 %27, true
  br label %29

29:                                               ; preds = %25, %8
  %30 = phi i1 [ true, %8 ], [ %28, %25 ]
  %31 = xor i1 %30, true
  %32 = xor i1 %31, true
  %33 = zext i1 %32 to i32
  %34 = sext i32 %33 to i64
  %35 = call i64 @llvm.expect.i64(i64 %34, i64 0)
  %36 = icmp ne i64 %35, 0
  br i1 %36, label %37, label %39

37:                                               ; preds = %29
  %38 = call i32 @log_if_error(i32 noundef 22, ptr noundef @__func__.mdbx_cursor_scan_from, i32 noundef 569)
  store i32 %38, ptr %9, align 4
  br label %165

39:                                               ; preds = %29
  call void @llvm.lifetime.start.p0(i64 4, ptr %18) #7
  store i32 1638444, ptr %18, align 4, !tbaa !9
  %40 = load i32, ptr %13, align 4, !tbaa !9
  %41 = icmp ult i32 %40, 21
  br i1 %41, label %42, label %47

42:                                               ; preds = %39
  %43 = load i32, ptr %13, align 4, !tbaa !9
  %44 = shl i32 1, %43
  %45 = and i32 %44, 1638444
  %46 = icmp eq i32 %45, 0
  br label %47

47:                                               ; preds = %42, %39
  %48 = phi i1 [ false, %39 ], [ %46, %42 ]
  %49 = xor i1 %48, true
  %50 = xor i1 %49, true
  %51 = zext i1 %50 to i32
  %52 = sext i32 %51 to i64
  %53 = call i64 @llvm.expect.i64(i64 %52, i64 0)
  %54 = icmp ne i64 %53, 0
  br i1 %54, label %55, label %57

55:                                               ; preds = %47
  %56 = call i32 @log_if_error(i32 noundef 22, ptr noundef @__func__.mdbx_cursor_scan_from, i32 noundef 574)
  store i32 %56, ptr %9, align 4
  store i32 1, ptr %19, align 4
  br label %164

57:                                               ; preds = %47
  call void @llvm.lifetime.start.p0(i64 4, ptr %20) #7
  store i32 294656, ptr %20, align 4, !tbaa !9
  %58 = load i32, ptr %16, align 4, !tbaa !9
  %59 = icmp ugt i32 %58, 30
  br i1 %59, label %65, label %60

60:                                               ; preds = %57
  %61 = load i32, ptr %16, align 4, !tbaa !9
  %62 = shl i32 1, %61
  %63 = and i32 %62, 294656
  %64 = icmp eq i32 %63, 0
  br label %65

65:                                               ; preds = %60, %57
  %66 = phi i1 [ true, %57 ], [ %64, %60 ]
  %67 = xor i1 %66, true
  %68 = xor i1 %67, true
  %69 = zext i1 %68 to i32
  %70 = sext i32 %69 to i64
  %71 = call i64 @llvm.expect.i64(i64 %70, i64 0)
  %72 = icmp ne i64 %71, 0
  br i1 %72, label %73, label %75

73:                                               ; preds = %65
  %74 = call i32 @log_if_error(i32 noundef 22, ptr noundef @__func__.mdbx_cursor_scan_from, i32 noundef 580)
  store i32 %74, ptr %9, align 4
  store i32 1, ptr %19, align 4
  br label %163

75:                                               ; preds = %65
  call void @llvm.lifetime.start.p0(i64 4, ptr %21) #7
  %76 = load ptr, ptr %10, align 8, !tbaa !5
  %77 = load ptr, ptr %14, align 8, !tbaa !5
  %78 = load ptr, ptr %15, align 8, !tbaa !5
  %79 = load i32, ptr %13, align 4, !tbaa !9
  %80 = call i32 @mdbx_cursor_get(ptr noundef %76, ptr noundef %77, ptr noundef %78, i32 noundef %79)
  store i32 %80, ptr %21, align 4, !tbaa !9
  %81 = load i32, ptr %21, align 4, !tbaa !9
  %82 = icmp ne i32 %81, -1
  br i1 %82, label %83, label %86

83:                                               ; preds = %75
  %84 = load i32, ptr %21, align 4, !tbaa !9
  %85 = icmp ne i32 %84, 0
  br label %86

86:                                               ; preds = %83, %75
  %87 = phi i1 [ false, %75 ], [ %85, %83 ]
  %88 = xor i1 %87, true
  %89 = xor i1 %88, true
  %90 = zext i1 %89 to i32
  %91 = sext i32 %90 to i64
  %92 = call i64 @llvm.expect.i64(i64 %91, i64 0)
  %93 = icmp ne i64 %92, 0
  br i1 %93, label %94, label %97

94:                                               ; preds = %86
  %95 = load i32, ptr %21, align 4, !tbaa !9
  %96 = call i32 @log_if_error(i32 noundef %95, ptr noundef @__func__.mdbx_cursor_scan_from, i32 noundef 584)
  store i32 %96, ptr %9, align 4
  store i32 1, ptr %19, align 4
  br label %162

97:                                               ; preds = %86
  br label %98

98:                                               ; preds = %97
  %99 = load i8, ptr getelementptr inbounds (%struct.libmdbx_globals, ptr @globals, i32 0, i32 4), align 1, !tbaa !11
  %100 = zext i8 %99 to i32
  %101 = and i32 %100, 1
  %102 = icmp ne i32 %101, 0
  %103 = xor i1 %102, true
  %104 = xor i1 %103, true
  %105 = zext i1 %104 to i32
  %106 = sext i32 %105 to i64
  %107 = call i64 @llvm.expect.i64(i64 %106, i64 1)
  %108 = icmp ne i64 %107, 0
  br i1 %108, label %109, label %129

109:                                              ; preds = %98
  br label %110

110:                                              ; preds = %109
  %111 = load ptr, ptr %14, align 8, !tbaa !5
  %112 = icmp ne ptr %111, null
  %113 = xor i1 %112, true
  %114 = xor i1 %113, true
  %115 = xor i1 %114, true
  %116 = zext i1 %115 to i32
  %117 = sext i32 %116 to i64
  %118 = call i64 @llvm.expect.i64(i64 %117, i64 0)
  %119 = icmp ne i64 %118, 0
  br i1 %119, label %120, label %126

120:                                              ; preds = %110
  %121 = load ptr, ptr %10, align 8, !tbaa !5
  %122 = getelementptr inbounds %struct.MDBX_cursor, ptr %121, i32 0, i32 5
  %123 = load ptr, ptr %122, align 8, !tbaa !15
  %124 = getelementptr inbounds %struct.MDBX_txn, ptr %123, i32 0, i32 9
  %125 = load ptr, ptr %124, align 8, !tbaa !17
  call void @mdbx_assert_fail(ptr noundef %125, ptr noundef @.str.16, ptr noundef @__func__.mdbx_cursor_scan_from, i32 noundef 586) #8
  unreachable

126:                                              ; preds = %110
  br label %127

127:                                              ; preds = %126
  br label %128

128:                                              ; preds = %127
  br label %129

129:                                              ; preds = %128, %98
  br label %130

130:                                              ; preds = %129
  br label %131

131:                                              ; preds = %130
  call void @llvm.lifetime.start.p0(i64 16, ptr %22) #7
  %132 = load ptr, ptr %15, align 8, !tbaa !5
  %133 = icmp ne ptr %132, null
  br i1 %133, label %151, label %134

134:                                              ; preds = %131
  store ptr %22, ptr %15, align 8, !tbaa !5
  %135 = load ptr, ptr %10, align 8, !tbaa !5
  %136 = load ptr, ptr %14, align 8, !tbaa !5
  %137 = load ptr, ptr %15, align 8, !tbaa !5
  %138 = call i32 @cursor_ops(ptr noundef %135, ptr noundef %136, ptr noundef %137, i32 noundef 4)
  store i32 %138, ptr %21, align 4, !tbaa !9
  %139 = load i32, ptr %21, align 4, !tbaa !9
  %140 = icmp ne i32 %139, 0
  %141 = xor i1 %140, true
  %142 = xor i1 %141, true
  %143 = zext i1 %142 to i32
  %144 = sext i32 %143 to i64
  %145 = call i64 @llvm.expect.i64(i64 %144, i64 0)
  %146 = icmp ne i64 %145, 0
  br i1 %146, label %147, label %150

147:                                              ; preds = %134
  %148 = load i32, ptr %21, align 4, !tbaa !9
  %149 = call i32 @log_if_error(i32 noundef %148, ptr noundef @__func__.mdbx_cursor_scan_from, i32 noundef 592)
  store i32 %149, ptr %9, align 4
  store i32 1, ptr %19, align 4
  br label %161

150:                                              ; preds = %134
  br label %151

151:                                              ; preds = %150, %131
  %152 = load ptr, ptr %10, align 8, !tbaa !5
  %153 = load ptr, ptr %11, align 8, !tbaa !5
  %154 = load ptr, ptr %12, align 8, !tbaa !5
  %155 = load ptr, ptr %17, align 8, !tbaa !5
  %156 = load ptr, ptr %14, align 8, !tbaa !5
  %157 = load ptr, ptr %15, align 8, !tbaa !5
  %158 = load i32, ptr %16, align 4, !tbaa !9
  %159 = call i32 @scan_confinue(ptr noundef %152, ptr noundef %153, ptr noundef %154, ptr noundef %155, ptr noundef %156, ptr noundef %157, i32 noundef %158) #9
  %160 = call i32 @log_if_error(i32 noundef %159, ptr noundef @__func__.mdbx_cursor_scan_from, i32 noundef 594)
  store i32 %160, ptr %9, align 4
  store i32 1, ptr %19, align 4
  br label %161

161:                                              ; preds = %151, %147
  call void @llvm.lifetime.end.p0(i64 16, ptr %22) #7
  br label %162

162:                                              ; preds = %161, %94
  call void @llvm.lifetime.end.p0(i64 4, ptr %21) #7
  br label %163

163:                                              ; preds = %162, %73
  call void @llvm.lifetime.end.p0(i64 4, ptr %20) #7
  br label %164

164:                                              ; preds = %163, %55
  call void @llvm.lifetime.end.p0(i64 4, ptr %18) #7
  br label %165

165:                                              ; preds = %164, %37
  %166 = load i32, ptr %9, align 4
  ret i32 %166
}

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

!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 = !{!12, !7, i64 25}
!12 = !{!"libmdbx_globals", !7, i64 0, !10, i64 16, !10, i64 20, !7, i64 24, !7, i64 25, !7, i64 26, !13, i64 27, !10, i64 28, !7, i64 32, !7, i64 40, !14, i64 80, !6, i64 88}
!13 = !{!"_Bool", !7, i64 0}
!14 = !{!"long", !7, i64 0}
!15 = !{!16, !6, i64 16}
!16 = !{!"MDBX_cursor", !10, i64 0, !7, i64 4, !7, i64 6, !7, i64 7, !6, i64 8, !6, i64 16, !6, i64 24, !6, i64 32, !6, i64 40, !7, i64 48, !7, i64 304, !6, i64 368, !6, i64 376}
!17 = !{!18, !6, i64 80}
!18 = !{!"MDBX_txn", !10, i64 0, !10, i64 4, !14, i64 8, !14, i64 16, !6, i64 24, !6, i64 32, !19, i64 40, !14, i64 64, !14, i64 72, !6, i64 80, !6, i64 88, !6, i64 96, !6, i64 104, !6, i64 112, !6, i64 120, !21, i64 128, !6, i64 160, !7, i64 168}
!19 = !{!"geo", !20, i64 0, !20, i64 2, !10, i64 4, !10, i64 8, !7, i64 12, !7, i64 16}
!20 = !{!"short", !7, i64 0}
!21 = !{!"MDBX_canary", !14, i64 0, !14, i64 8, !14, i64 16, !14, i64 24}


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

@__func__.mdbx_cursor_scan_from = external hidden unnamed_addr constant [22 x i8], align 1

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

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

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

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

declare i32 @cursor_ops(ptr noundef, ptr noundef, ptr noundef, i32 noundef) local_unnamed_addr #3

; Function Attrs: hot nounwind uwtable
declare hidden i32 @scan_confinue(ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, i32 noundef) local_unnamed_addr #4

; Function Attrs: nounwind uwtable
define dso_local i32 @mdbx_cursor_scan_from(ptr noundef %0, ptr noundef %1, ptr noundef %2, i32 noundef %3, ptr noundef %4, ptr noundef %5, i32 noundef %6, ptr noundef %7) local_unnamed_addr #2 {
  %9 = alloca %struct.iovec, align 8
  %.not = icmp eq ptr %1, null
  %.not33 = icmp eq ptr %4, null
  %10 = or i1 %.not, %.not33
  br i1 %10, label %11, label %13, !prof !5

11:                                               ; preds = %8
  %12 = tail call i32 @log_if_error(i32 noundef 22, ptr noundef nonnull @__func__.mdbx_cursor_scan_from, i32 noundef 569)
  br label %44

13:                                               ; preds = %8
  %14 = icmp ult i32 %3, 21
  %15 = shl nuw i32 1, %3
  %16 = and i32 %15, 1638444
  %17 = icmp eq i32 %16, 0
  %18 = select i1 %14, i1 %17, i1 false
  br i1 %18, label %19, label %21, !prof !5

19:                                               ; preds = %13
  %20 = tail call i32 @log_if_error(i32 noundef 22, ptr noundef nonnull @__func__.mdbx_cursor_scan_from, i32 noundef 574)
  br label %44

21:                                               ; preds = %13
  %22 = icmp ugt i32 %6, 30
  %23 = shl nuw i32 1, %6
  %24 = and i32 %23, 294656
  %25 = icmp eq i32 %24, 0
  %26 = select i1 %22, i1 true, i1 %25, !prof !5
  br i1 %26, label %27, label %29, !prof !5

27:                                               ; preds = %21
  %28 = tail call i32 @log_if_error(i32 noundef 22, ptr noundef nonnull @__func__.mdbx_cursor_scan_from, i32 noundef 580)
  br label %44

29:                                               ; preds = %21
  %30 = tail call i32 @mdbx_cursor_get(ptr noundef %0, ptr noundef nonnull %4, ptr noundef %5, i32 noundef %3)
  %31 = add i32 %30, -1
  %32 = icmp ult i32 %31, -2
  br i1 %32, label %33, label %35, !prof !5

33:                                               ; preds = %29
  %34 = tail call i32 @log_if_error(i32 noundef %30, ptr noundef nonnull @__func__.mdbx_cursor_scan_from, i32 noundef 584)
  br label %44

35:                                               ; preds = %29
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %9) #5
  %.not35 = icmp eq ptr %5, null
  br i1 %.not35, label %36, label %40

36:                                               ; preds = %35
  %37 = call i32 @cursor_ops(ptr noundef %0, ptr noundef nonnull %4, ptr noundef nonnull %9, i32 noundef 4) #5
  %.not36 = icmp eq i32 %37, 0
  br i1 %.not36, label %40, label %38, !prof !6

38:                                               ; preds = %36
  %39 = call i32 @log_if_error(i32 noundef %37, ptr noundef nonnull @__func__.mdbx_cursor_scan_from, i32 noundef 592)
  br label %43

40:                                               ; preds = %36, %35
  %.028 = phi ptr [ %5, %35 ], [ %9, %36 ]
  %41 = call i32 @scan_confinue(ptr noundef %0, ptr noundef nonnull %1, ptr noundef %2, ptr noundef %7, ptr noundef nonnull %4, ptr noundef nonnull %.028, i32 noundef %6) #6
  %42 = call i32 @log_if_error(i32 noundef %41, ptr noundef nonnull @__func__.mdbx_cursor_scan_from, i32 noundef 594)
  br label %43

43:                                               ; preds = %40, %38
  %.0 = phi i32 [ %42, %40 ], [ %39, %38 ]
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %9) #5
  br label %44

44:                                               ; preds = %19, %33, %43, %27, %11
  %.4 = phi i32 [ %12, %11 ], [ %20, %19 ], [ %28, %27 ], [ %34, %33 ], [ %.0, %43 ]
  ret i32 %.4
}

attributes #0 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { inlinehint 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 = { 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 = { "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 = { hot 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 = { hot }

!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 = !{!"branch_weights", !"expected", i32 1, i32 2000}
!6 = !{!"branch_weights", !"expected", i32 2000, i32 1}


; Effective O3 passes: CorrelatedValuePropagationPass,EarlyCSEPass,GlobalOptPass,IPSCCPPass,InferFunctionAttrsPass,InstCombinePass,JumpThreadingPass,LowerExpectIntrinsicPass,SROAPass,SimplifyCFGPass,TailCallElimPass