; LLVM IR from trustwallet/wallet-core :: trezor-crypto/crypto (scrypt)

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

; Function Attrs: nounwind uwtable
define dso_local i32 @scrypt(ptr noundef %0, i64 noundef %1, ptr noundef %2, i64 noundef %3, i64 noundef %4, i32 noundef %5, i32 noundef %6, ptr noundef %7, i64 noundef %8) #0 {
  %10 = alloca i32, align 4
  %11 = alloca ptr, align 8
  %12 = alloca i64, align 8
  %13 = alloca ptr, align 8
  %14 = alloca i64, align 8
  %15 = alloca i64, align 8
  %16 = alloca i32, align 4
  %17 = alloca i32, align 4
  %18 = alloca ptr, align 8
  %19 = alloca i64, align 8
  %20 = alloca ptr, align 8
  %21 = alloca ptr, align 8
  %22 = alloca ptr, align 8
  %23 = alloca ptr, align 8
  %24 = alloca ptr, align 8
  %25 = alloca ptr, align 8
  %26 = alloca i32, align 4
  %27 = alloca i32, align 4
  store ptr %0, ptr %11, align 8, !tbaa !5
  store i64 %1, ptr %12, align 8, !tbaa !9
  store ptr %2, ptr %13, align 8, !tbaa !5
  store i64 %3, ptr %14, align 8, !tbaa !9
  store i64 %4, ptr %15, align 8, !tbaa !9
  store i32 %5, ptr %16, align 4, !tbaa !11
  store i32 %6, ptr %17, align 4, !tbaa !11
  store ptr %7, ptr %18, align 8, !tbaa !5
  store i64 %8, ptr %19, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %20) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr %21) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr %22) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr %23) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr %24) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr %25) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr %26) #6
  %28 = load i64, ptr %19, align 8, !tbaa !9
  %29 = icmp ugt i64 %28, 137438953440
  br i1 %29, label %30, label %32

30:                                               ; preds = %9
  %31 = call ptr @__errno_location() #7
  store i32 27, ptr %31, align 4, !tbaa !11
  br label %174

32:                                               ; preds = %9
  %33 = load i32, ptr %16, align 4, !tbaa !11
  %34 = zext i32 %33 to i64
  %35 = load i32, ptr %17, align 4, !tbaa !11
  %36 = zext i32 %35 to i64
  %37 = mul i64 %34, %36
  %38 = icmp uge i64 %37, 1073741824
  br i1 %38, label %39, label %41

39:                                               ; preds = %32
  %40 = call ptr @__errno_location() #7
  store i32 27, ptr %40, align 4, !tbaa !11
  br label %174

41:                                               ; preds = %32
  %42 = load i32, ptr %16, align 4, !tbaa !11
  %43 = icmp eq i32 %42, 0
  br i1 %43, label %47, label %44

44:                                               ; preds = %41
  %45 = load i32, ptr %17, align 4, !tbaa !11
  %46 = icmp eq i32 %45, 0
  br i1 %46, label %47, label %49

47:                                               ; preds = %44, %41
  %48 = call ptr @__errno_location() #7
  store i32 22, ptr %48, align 4, !tbaa !11
  br label %174

49:                                               ; preds = %44
  %50 = load i64, ptr %15, align 8, !tbaa !9
  %51 = load i64, ptr %15, align 8, !tbaa !9
  %52 = sub i64 %51, 1
  %53 = and i64 %50, %52
  %54 = icmp ne i64 %53, 0
  br i1 %54, label %58, label %55

55:                                               ; preds = %49
  %56 = load i64, ptr %15, align 8, !tbaa !9
  %57 = icmp ult i64 %56, 2
  br i1 %57, label %58, label %60

58:                                               ; preds = %55, %49
  %59 = call ptr @__errno_location() #7
  store i32 22, ptr %59, align 4, !tbaa !11
  br label %174

60:                                               ; preds = %55
  %61 = load i32, ptr %16, align 4, !tbaa !11
  %62 = zext i32 %61 to i64
  %63 = load i32, ptr %17, align 4, !tbaa !11
  %64 = zext i32 %63 to i64
  %65 = udiv i64 144115188075855871, %64
  %66 = icmp ugt i64 %62, %65
  br i1 %66, label %73, label %67

67:                                               ; preds = %60
  %68 = load i64, ptr %15, align 8, !tbaa !9
  %69 = load i32, ptr %16, align 4, !tbaa !11
  %70 = zext i32 %69 to i64
  %71 = udiv i64 144115188075855871, %70
  %72 = icmp ugt i64 %68, %71
  br i1 %72, label %73, label %75

73:                                               ; preds = %67, %60
  %74 = call ptr @__errno_location() #7
  store i32 12, ptr %74, align 4, !tbaa !11
  br label %174

75:                                               ; preds = %67
  %76 = load i32, ptr %16, align 4, !tbaa !11
  %77 = mul i32 128, %76
  %78 = load i32, ptr %17, align 4, !tbaa !11
  %79 = mul i32 %77, %78
  %80 = add i32 %79, 63
  %81 = zext i32 %80 to i64
  %82 = call noalias ptr @malloc(i64 noundef %81) #8
  store ptr %82, ptr %20, align 8, !tbaa !5
  %83 = icmp eq ptr %82, null
  br i1 %83, label %84, label %85

84:                                               ; preds = %75
  br label %174

85:                                               ; preds = %75
  %86 = load ptr, ptr %20, align 8, !tbaa !5
  %87 = ptrtoint ptr %86 to i64
  %88 = add i64 %87, 63
  %89 = and i64 %88, -64
  %90 = inttoptr i64 %89 to ptr
  store ptr %90, ptr %23, align 8, !tbaa !5
  %91 = load i32, ptr %16, align 4, !tbaa !11
  %92 = mul i32 256, %91
  %93 = add i32 %92, 64
  %94 = add i32 %93, 63
  %95 = zext i32 %94 to i64
  %96 = call noalias ptr @malloc(i64 noundef %95) #8
  store ptr %96, ptr %22, align 8, !tbaa !5
  %97 = icmp eq ptr %96, null
  br i1 %97, label %98, label %99

98:                                               ; preds = %85
  br label %172

99:                                               ; preds = %85
  %100 = load ptr, ptr %22, align 8, !tbaa !5
  %101 = ptrtoint ptr %100 to i64
  %102 = add i64 %101, 63
  %103 = and i64 %102, -64
  %104 = inttoptr i64 %103 to ptr
  store ptr %104, ptr %25, align 8, !tbaa !5
  %105 = load i32, ptr %16, align 4, !tbaa !11
  %106 = mul i32 128, %105
  %107 = zext i32 %106 to i64
  %108 = load i64, ptr %15, align 8, !tbaa !9
  %109 = mul i64 %107, %108
  %110 = call ptr @mmap(ptr noundef null, i64 noundef %109, i32 noundef 3, i32 noundef 34, i32 noundef -1, i64 noundef 0) #6
  store ptr %110, ptr %21, align 8, !tbaa !5
  %111 = icmp eq ptr %110, inttoptr (i64 -1 to ptr)
  br i1 %111, label %112, label %113

112:                                              ; preds = %99
  br label %170

113:                                              ; preds = %99
  %114 = load ptr, ptr %21, align 8, !tbaa !5
  store ptr %114, ptr %24, align 8, !tbaa !5
  %115 = load ptr, ptr %11, align 8, !tbaa !5
  %116 = load i64, ptr %12, align 8, !tbaa !9
  %117 = trunc i64 %116 to i32
  %118 = load ptr, ptr %13, align 8, !tbaa !5
  %119 = load i64, ptr %14, align 8, !tbaa !9
  %120 = trunc i64 %119 to i32
  %121 = load ptr, ptr %23, align 8, !tbaa !5
  %122 = load i32, ptr %17, align 4, !tbaa !11
  %123 = mul i32 %122, 128
  %124 = load i32, ptr %16, align 4, !tbaa !11
  %125 = mul i32 %123, %124
  call void @pbkdf2_hmac_sha256(ptr noundef %115, i32 noundef %117, ptr noundef %118, i32 noundef %120, i32 noundef 1, ptr noundef %121, i32 noundef %125)
  store i32 0, ptr %26, align 4, !tbaa !11
  br label %126

126:                                              ; preds = %143, %113
  %127 = load i32, ptr %26, align 4, !tbaa !11
  %128 = load i32, ptr %17, align 4, !tbaa !11
  %129 = icmp ult i32 %127, %128
  br i1 %129, label %130, label %146

130:                                              ; preds = %126
  %131 = load ptr, ptr %23, align 8, !tbaa !5
  %132 = load i32, ptr %26, align 4, !tbaa !11
  %133 = mul i32 %132, 128
  %134 = load i32, ptr %16, align 4, !tbaa !11
  %135 = mul i32 %133, %134
  %136 = zext i32 %135 to i64
  %137 = getelementptr inbounds i8, ptr %131, i64 %136
  %138 = load i32, ptr %16, align 4, !tbaa !11
  %139 = zext i32 %138 to i64
  %140 = load i64, ptr %15, align 8, !tbaa !9
  %141 = load ptr, ptr %24, align 8, !tbaa !5
  %142 = load ptr, ptr %25, align 8, !tbaa !5
  call void @smix(ptr noundef %137, i64 noundef %139, i64 noundef %140, ptr noundef %141, ptr noundef %142)
  br label %143

143:                                              ; preds = %130
  %144 = load i32, ptr %26, align 4, !tbaa !11
  %145 = add i32 %144, 1
  store i32 %145, ptr %26, align 4, !tbaa !11
  br label %126, !llvm.loop !13

146:                                              ; preds = %126
  %147 = load ptr, ptr %11, align 8, !tbaa !5
  %148 = load i64, ptr %12, align 8, !tbaa !9
  %149 = trunc i64 %148 to i32
  %150 = load ptr, ptr %23, align 8, !tbaa !5
  %151 = load i32, ptr %17, align 4, !tbaa !11
  %152 = mul i32 %151, 128
  %153 = load i32, ptr %16, align 4, !tbaa !11
  %154 = mul i32 %152, %153
  %155 = load ptr, ptr %18, align 8, !tbaa !5
  %156 = load i64, ptr %19, align 8, !tbaa !9
  %157 = trunc i64 %156 to i32
  call void @pbkdf2_hmac_sha256(ptr noundef %147, i32 noundef %149, ptr noundef %150, i32 noundef %154, i32 noundef 1, ptr noundef %155, i32 noundef %157)
  %158 = load ptr, ptr %21, align 8, !tbaa !5
  %159 = load i32, ptr %16, align 4, !tbaa !11
  %160 = mul i32 128, %159
  %161 = zext i32 %160 to i64
  %162 = load i64, ptr %15, align 8, !tbaa !9
  %163 = mul i64 %161, %162
  %164 = call i32 @munmap(ptr noundef %158, i64 noundef %163) #6
  %165 = icmp ne i32 %164, 0
  br i1 %165, label %166, label %167

166:                                              ; preds = %146
  br label %170

167:                                              ; preds = %146
  %168 = load ptr, ptr %22, align 8, !tbaa !5
  call void @free(ptr noundef %168) #6
  %169 = load ptr, ptr %20, align 8, !tbaa !5
  call void @free(ptr noundef %169) #6
  store i32 0, ptr %10, align 4
  store i32 1, ptr %27, align 4
  br label %175

170:                                              ; preds = %166, %112
  %171 = load ptr, ptr %22, align 8, !tbaa !5
  call void @free(ptr noundef %171) #6
  br label %172

172:                                              ; preds = %170, %98
  %173 = load ptr, ptr %20, align 8, !tbaa !5
  call void @free(ptr noundef %173) #6
  br label %174

174:                                              ; preds = %172, %84, %73, %58, %47, %39, %30
  store i32 -1, ptr %10, align 4
  store i32 1, ptr %27, align 4
  br label %175

175:                                              ; preds = %174, %167
  call void @llvm.lifetime.end.p0(i64 4, ptr %26) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %25) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %24) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %23) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %22) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %21) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %20) #6
  %176 = load i32, ptr %10, align 4
  ret i32 %176
}

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

; Function Attrs: nounwind willreturn memory(none)
declare ptr @__errno_location() #2

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

; Function Attrs: nounwind
declare ptr @mmap(ptr noundef, i64 noundef, i32 noundef, i32 noundef, i32 noundef, i64 noundef) #4

declare void @pbkdf2_hmac_sha256(ptr noundef, i32 noundef, ptr noundef, i32 noundef, i32 noundef, ptr noundef, i32 noundef) #5

; Function Attrs: nounwind uwtable
declare hidden void @smix(ptr noundef, i64 noundef, i64 noundef, ptr noundef, ptr noundef) #0

; Function Attrs: nounwind
declare i32 @munmap(ptr noundef, i64 noundef) #4

; Function Attrs: nounwind
declare void @free(ptr noundef) #4

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

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

!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 = !{!"long", !7, i64 0}
!11 = !{!12, !12, i64 0}
!12 = !{!"int", !7, i64 0}
!13 = distinct !{!13, !14}
!14 = !{!"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"

; Function Attrs: nounwind uwtable
define dso_local range(i32 -1, 1) i32 @scrypt(ptr noundef %0, i64 noundef %1, ptr noundef %2, i64 noundef %3, i64 noundef %4, i32 noundef %5, i32 noundef %6, ptr noundef %7, i64 noundef %8) local_unnamed_addr #0 {
  %10 = icmp ugt i64 %8, 137438953440
  br i1 %10, label %11, label %13

11:                                               ; preds = %9
  %12 = tail call ptr @__errno_location() #7
  store i32 27, ptr %12, align 4, !tbaa !5
  br label %79

13:                                               ; preds = %9
  %14 = zext i32 %5 to i64
  %15 = zext i32 %6 to i64
  %16 = mul nuw i64 %15, %14
  %17 = icmp ugt i64 %16, 1073741823
  br i1 %17, label %18, label %20

18:                                               ; preds = %13
  %19 = tail call ptr @__errno_location() #7
  store i32 27, ptr %19, align 4, !tbaa !5
  br label %79

20:                                               ; preds = %13
  %21 = icmp eq i32 %5, 0
  %22 = icmp eq i32 %6, 0
  %or.cond = or i1 %21, %22
  br i1 %or.cond, label %23, label %25

23:                                               ; preds = %20
  %24 = tail call ptr @__errno_location() #7
  store i32 22, ptr %24, align 4, !tbaa !5
  br label %79

25:                                               ; preds = %20
  %26 = tail call range(i64 0, 65) i64 @llvm.ctpop.i64(i64 %4)
  %27 = icmp ugt i64 %26, 1
  %28 = icmp ult i64 %4, 2
  %or.cond3 = or i1 %28, %27
  br i1 %or.cond3, label %29, label %31

29:                                               ; preds = %25
  %30 = tail call ptr @__errno_location() #7
  store i32 22, ptr %30, align 4, !tbaa !5
  br label %79

31:                                               ; preds = %25
  %32 = udiv i64 144115188075855871, %15
  %33 = icmp ult i64 %32, %14
  br i1 %33, label %37, label %34

34:                                               ; preds = %31
  %35 = udiv i64 144115188075855871, %14
  %36 = icmp ult i64 %35, %4
  br i1 %36, label %37, label %39

37:                                               ; preds = %34, %31
  %38 = tail call ptr @__errno_location() #7
  store i32 12, ptr %38, align 4, !tbaa !5
  br label %79

39:                                               ; preds = %34
  %40 = shl i32 %5, 7
  %41 = mul i32 %40, %6
  %42 = or disjoint i32 %41, 63
  %43 = zext i32 %42 to i64
  %44 = tail call noalias ptr @malloc(i64 noundef %43) #8
  %45 = icmp eq ptr %44, null
  br i1 %45, label %79, label %46

46:                                               ; preds = %39
  %47 = ptrtoint ptr %44 to i64
  %48 = add i64 %47, 63
  %49 = and i64 %48, -64
  %50 = inttoptr i64 %49 to ptr
  %51 = shl i32 %5, 8
  %52 = or disjoint i32 %51, 127
  %53 = zext i32 %52 to i64
  %54 = tail call noalias ptr @malloc(i64 noundef %53) #8
  %55 = icmp eq ptr %54, null
  br i1 %55, label %78, label %56

56:                                               ; preds = %46
  %57 = ptrtoint ptr %54 to i64
  %58 = add i64 %57, 63
  %59 = and i64 %58, -64
  %60 = inttoptr i64 %59 to ptr
  %61 = zext i32 %40 to i64
  %62 = mul i64 %61, %4
  %63 = tail call ptr @mmap(ptr noundef null, i64 noundef %62, i32 noundef 3, i32 noundef 34, i32 noundef -1, i64 noundef 0) #9
  %64 = icmp eq ptr %63, inttoptr (i64 -1 to ptr)
  br i1 %64, label %77, label %.lr.ph

.lr.ph:                                           ; preds = %56
  %65 = trunc i64 %1 to i32
  %66 = trunc i64 %3 to i32
  %67 = shl i32 %6, 7
  %68 = mul i32 %67, %5
  tail call void @pbkdf2_hmac_sha256(ptr noundef %0, i32 noundef %65, ptr noundef %2, i32 noundef %66, i32 noundef 1, ptr noundef %50, i32 noundef %68) #9
  br label %69

69:                                               ; preds = %.lr.ph, %69
  %indvars.iv = phi i64 [ 0, %.lr.ph ], [ %indvars.iv.next, %69 ]
  %70 = trunc nuw i64 %indvars.iv to i32
  %71 = mul i32 %40, %70
  %72 = zext i32 %71 to i64
  %73 = getelementptr inbounds i8, ptr %50, i64 %72
  tail call void @smix(ptr noundef %73, i64 noundef %14, i64 noundef %4, ptr noundef %63, ptr noundef %60)
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %exitcond.not = icmp eq i64 %indvars.iv.next, %15
  br i1 %exitcond.not, label %._crit_edge, label %69, !llvm.loop !9

._crit_edge:                                      ; preds = %69
  %74 = trunc i64 %8 to i32
  tail call void @pbkdf2_hmac_sha256(ptr noundef %0, i32 noundef %65, ptr noundef %50, i32 noundef %68, i32 noundef 1, ptr noundef %7, i32 noundef %74) #9
  %75 = tail call i32 @munmap(ptr noundef %63, i64 noundef %62) #9
  %.not = icmp eq i32 %75, 0
  br i1 %.not, label %76, label %77

76:                                               ; preds = %._crit_edge
  tail call void @free(ptr noundef %54) #9
  tail call void @free(ptr noundef %44) #9
  br label %79

77:                                               ; preds = %._crit_edge, %56
  tail call void @free(ptr noundef %54) #9
  br label %78

78:                                               ; preds = %46, %77
  tail call void @free(ptr noundef %44) #9
  br label %79

79:                                               ; preds = %11, %18, %23, %29, %37, %78, %39, %76
  %.054 = phi i32 [ 0, %76 ], [ -1, %39 ], [ -1, %78 ], [ -1, %37 ], [ -1, %29 ], [ -1, %23 ], [ -1, %18 ], [ -1, %11 ]
  ret i32 %.054
}

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

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

; Function Attrs: nounwind
declare ptr @mmap(ptr noundef, i64 noundef, i32 noundef, i32 noundef, i32 noundef, i64 noundef) local_unnamed_addr #3

declare void @pbkdf2_hmac_sha256(ptr noundef, i32 noundef, ptr noundef, i32 noundef, i32 noundef, ptr noundef, i32 noundef) local_unnamed_addr #4

; Function Attrs: nounwind uwtable
declare hidden void @smix(ptr noundef, i64 noundef, i64 noundef, ptr noundef, ptr noundef) local_unnamed_addr #0

; Function Attrs: nounwind
declare i32 @munmap(ptr noundef, i64 noundef) local_unnamed_addr #3

; Function Attrs: mustprogress nounwind willreturn allockind("free") memory(argmem: readwrite, inaccessiblemem: readwrite)
declare void @free(ptr allocptr nocapture noundef) local_unnamed_addr #5

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare i64 @llvm.ctpop.i64(i64) #6

attributes #0 = { nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { mustprogress 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 #2 = { 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 #3 = { 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 = { "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 = { mustprogress nounwind willreturn allockind("free") memory(argmem: readwrite, 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 #6 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #7 = { nounwind willreturn memory(none) }
attributes #8 = { nounwind allocsize(0) }
attributes #9 = { 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 = distinct !{!9, !10}
!10 = !{!"llvm.loop.mustprogress"}


; Effective O3 passes: EarlyCSEPass,GVNPass,GlobalOptPass,IPSCCPPass,IndVarSimplifyPass,InferFunctionAttrsPass,InstCombinePass,JumpThreadingPass,LICMPass,LoopRotatePass,LoopSimplifyPass,ReassociatePass,SCCPPass,SROAPass,SimplifyCFGPass,TailCallElimPass