; LLVM IR from guanzhi/GmSSL :: src (tls)

; 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.TLS_CTX = type { i32, i32, [64 x i32], i64, ptr, i64, ptr, i64, %struct.SM2_KEY, %struct.SM2_KEY, i32, i32 }
%struct.SM2_KEY = type { %struct.SM2_Z256_POINT, [4 x i64] }
%struct.SM2_Z256_POINT = type { [4 x i64], [4 x i64], [4 x i64] }
%struct.TLS_CONNECT = type { i32, i32, [64 x i32], i64, i32, [18437 x i8], i64, [18437 x i8], [18437 x i8], ptr, i64, i32, [32 x i8], i64, [2048 x i8], i64, [2048 x i8], i64, [2048 x i8], i64, %struct.SM2_KEY, %struct.SM2_KEY, i32, [48 x i8], [96 x i8], %struct.SM3_HMAC_CTX, %struct.SM3_HMAC_CTX, %struct.SM4_KEY, %struct.SM4_KEY, [8 x i8], [8 x i8], [12 x i8], [12 x i8], %struct.BLOCK_CIPHER_KEY, %struct.BLOCK_CIPHER_KEY, i32 }
%struct.SM3_HMAC_CTX = type { %struct.SM3_CTX, [64 x i8] }
%struct.SM3_CTX = type { [8 x i32], i64, [64 x i8], i64 }
%struct.SM4_KEY = type { [32 x i32] }
%struct.BLOCK_CIPHER_KEY = type { %union.anon, ptr }
%union.anon = type { %struct.SM4_KEY }

@stderr = external global ptr, align 8
@.str = external hidden unnamed_addr constant [13 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [57 x i8], align 1
@__FUNCTION__.tls_init = external hidden unnamed_addr constant [9 x i8], align 1

; 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) #0

; Function Attrs: nounwind
declare i32 @fprintf(ptr noundef, 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: nocallback nofree nounwind willreturn memory(argmem: write)
declare void @llvm.memset.p0.i64(ptr nocapture writeonly, i8, i64, i1 immarg) #3

; Function Attrs: nounwind uwtable
define dso_local i32 @tls_init(ptr noundef %0, ptr noundef %1) #4 {
  %3 = alloca i32, align 4
  %4 = alloca ptr, align 8
  %5 = alloca ptr, align 8
  %6 = alloca i64, align 8
  %7 = alloca i32, align 4
  store ptr %0, ptr %4, align 8, !tbaa !5
  store ptr %1, ptr %5, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %6) #5
  %8 = load ptr, ptr %4, align 8, !tbaa !5
  call void @llvm.memset.p0.i64(ptr align 8 %8, i8 0, i64 63176, i1 false)
  %9 = load ptr, ptr %5, align 8, !tbaa !5
  %10 = getelementptr inbounds %struct.TLS_CTX, ptr %9, i32 0, i32 0
  %11 = load i32, ptr %10, align 8, !tbaa !9
  %12 = load ptr, ptr %4, align 8, !tbaa !5
  %13 = getelementptr inbounds %struct.TLS_CONNECT, ptr %12, i32 0, i32 0
  store i32 %11, ptr %13, align 8, !tbaa !15
  %14 = load ptr, ptr %5, align 8, !tbaa !5
  %15 = getelementptr inbounds %struct.TLS_CTX, ptr %14, i32 0, i32 1
  %16 = load i32, ptr %15, align 4, !tbaa !21
  %17 = load ptr, ptr %4, align 8, !tbaa !5
  %18 = getelementptr inbounds %struct.TLS_CONNECT, ptr %17, i32 0, i32 1
  store i32 %16, ptr %18, align 4, !tbaa !22
  store i64 0, ptr %6, align 8, !tbaa !23
  br label %19

19:                                               ; preds = %35, %2
  %20 = load i64, ptr %6, align 8, !tbaa !23
  %21 = load ptr, ptr %5, align 8, !tbaa !5
  %22 = getelementptr inbounds %struct.TLS_CTX, ptr %21, i32 0, i32 3
  %23 = load i64, ptr %22, align 8, !tbaa !24
  %24 = icmp ult i64 %20, %23
  br i1 %24, label %25, label %38

25:                                               ; preds = %19
  %26 = load ptr, ptr %5, align 8, !tbaa !5
  %27 = getelementptr inbounds %struct.TLS_CTX, ptr %26, i32 0, i32 2
  %28 = load i64, ptr %6, align 8, !tbaa !23
  %29 = getelementptr inbounds [64 x i32], ptr %27, i64 0, i64 %28
  %30 = load i32, ptr %29, align 4, !tbaa !25
  %31 = load ptr, ptr %4, align 8, !tbaa !5
  %32 = getelementptr inbounds %struct.TLS_CONNECT, ptr %31, i32 0, i32 2
  %33 = load i64, ptr %6, align 8, !tbaa !23
  %34 = getelementptr inbounds [64 x i32], ptr %32, i64 0, i64 %33
  store i32 %30, ptr %34, align 4, !tbaa !25
  br label %35

35:                                               ; preds = %25
  %36 = load i64, ptr %6, align 8, !tbaa !23
  %37 = add i64 %36, 1
  store i64 %37, ptr %6, align 8, !tbaa !23
  br label %19, !llvm.loop !26

38:                                               ; preds = %19
  %39 = load ptr, ptr %5, align 8, !tbaa !5
  %40 = getelementptr inbounds %struct.TLS_CTX, ptr %39, i32 0, i32 3
  %41 = load i64, ptr %40, align 8, !tbaa !24
  %42 = load ptr, ptr %4, align 8, !tbaa !5
  %43 = getelementptr inbounds %struct.TLS_CONNECT, ptr %42, i32 0, i32 3
  store i64 %41, ptr %43, align 8, !tbaa !28
  %44 = load ptr, ptr %5, align 8, !tbaa !5
  %45 = getelementptr inbounds %struct.TLS_CTX, ptr %44, i32 0, i32 7
  %46 = load i64, ptr %45, align 8, !tbaa !29
  %47 = icmp ugt i64 %46, 2048
  br i1 %47, label %48, label %54

48:                                               ; preds = %38
  br label %49

49:                                               ; preds = %48
  %50 = load ptr, ptr @stderr, align 8, !tbaa !5
  %51 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %50, ptr noundef @.str, ptr noundef @.str.1, i32 noundef 2289, ptr noundef @__FUNCTION__.tls_init) #5
  br label %52

52:                                               ; preds = %49
  br label %53

53:                                               ; preds = %52
  store i32 -1, ptr %3, align 4
  store i32 1, ptr %7, align 4
  br label %128

54:                                               ; preds = %38
  %55 = load ptr, ptr %4, align 8, !tbaa !5
  %56 = getelementptr inbounds %struct.TLS_CONNECT, ptr %55, i32 0, i32 1
  %57 = load i32, ptr %56, align 4, !tbaa !22
  %58 = icmp ne i32 %57, 0
  br i1 %58, label %59, label %74

59:                                               ; preds = %54
  %60 = load ptr, ptr %4, align 8, !tbaa !5
  %61 = getelementptr inbounds %struct.TLS_CONNECT, ptr %60, i32 0, i32 16
  %62 = getelementptr inbounds [2048 x i8], ptr %61, i64 0, i64 0
  %63 = load ptr, ptr %5, align 8, !tbaa !5
  %64 = getelementptr inbounds %struct.TLS_CTX, ptr %63, i32 0, i32 6
  %65 = load ptr, ptr %64, align 8, !tbaa !30
  %66 = load ptr, ptr %5, align 8, !tbaa !5
  %67 = getelementptr inbounds %struct.TLS_CTX, ptr %66, i32 0, i32 7
  %68 = load i64, ptr %67, align 8, !tbaa !29
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %62, ptr align 1 %65, i64 %68, i1 false)
  %69 = load ptr, ptr %5, align 8, !tbaa !5
  %70 = getelementptr inbounds %struct.TLS_CTX, ptr %69, i32 0, i32 7
  %71 = load i64, ptr %70, align 8, !tbaa !29
  %72 = load ptr, ptr %4, align 8, !tbaa !5
  %73 = getelementptr inbounds %struct.TLS_CONNECT, ptr %72, i32 0, i32 17
  store i64 %71, ptr %73, align 8, !tbaa !31
  br label %89

74:                                               ; preds = %54
  %75 = load ptr, ptr %4, align 8, !tbaa !5
  %76 = getelementptr inbounds %struct.TLS_CONNECT, ptr %75, i32 0, i32 14
  %77 = getelementptr inbounds [2048 x i8], ptr %76, i64 0, i64 0
  %78 = load ptr, ptr %5, align 8, !tbaa !5
  %79 = getelementptr inbounds %struct.TLS_CTX, ptr %78, i32 0, i32 6
  %80 = load ptr, ptr %79, align 8, !tbaa !30
  %81 = load ptr, ptr %5, align 8, !tbaa !5
  %82 = getelementptr inbounds %struct.TLS_CTX, ptr %81, i32 0, i32 7
  %83 = load i64, ptr %82, align 8, !tbaa !29
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %77, ptr align 1 %80, i64 %83, i1 false)
  %84 = load ptr, ptr %5, align 8, !tbaa !5
  %85 = getelementptr inbounds %struct.TLS_CTX, ptr %84, i32 0, i32 7
  %86 = load i64, ptr %85, align 8, !tbaa !29
  %87 = load ptr, ptr %4, align 8, !tbaa !5
  %88 = getelementptr inbounds %struct.TLS_CONNECT, ptr %87, i32 0, i32 15
  store i64 %86, ptr %88, align 8, !tbaa !32
  br label %89

89:                                               ; preds = %74, %59
  %90 = load ptr, ptr %5, align 8, !tbaa !5
  %91 = getelementptr inbounds %struct.TLS_CTX, ptr %90, i32 0, i32 5
  %92 = load i64, ptr %91, align 8, !tbaa !33
  %93 = icmp ugt i64 %92, 2048
  br i1 %93, label %94, label %100

94:                                               ; preds = %89
  br label %95

95:                                               ; preds = %94
  %96 = load ptr, ptr @stderr, align 8, !tbaa !5
  %97 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %96, ptr noundef @.str, ptr noundef @.str.1, i32 noundef 2301, ptr noundef @__FUNCTION__.tls_init) #5
  br label %98

98:                                               ; preds = %95
  br label %99

99:                                               ; preds = %98
  store i32 -1, ptr %3, align 4
  store i32 1, ptr %7, align 4
  br label %128

100:                                              ; preds = %89
  %101 = load ptr, ptr %4, align 8, !tbaa !5
  %102 = getelementptr inbounds %struct.TLS_CONNECT, ptr %101, i32 0, i32 18
  %103 = getelementptr inbounds [2048 x i8], ptr %102, i64 0, i64 0
  %104 = load ptr, ptr %5, align 8, !tbaa !5
  %105 = getelementptr inbounds %struct.TLS_CTX, ptr %104, i32 0, i32 4
  %106 = load ptr, ptr %105, align 8, !tbaa !34
  %107 = load ptr, ptr %5, align 8, !tbaa !5
  %108 = getelementptr inbounds %struct.TLS_CTX, ptr %107, i32 0, i32 5
  %109 = load i64, ptr %108, align 8, !tbaa !33
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %103, ptr align 1 %106, i64 %109, i1 false)
  %110 = load ptr, ptr %5, align 8, !tbaa !5
  %111 = getelementptr inbounds %struct.TLS_CTX, ptr %110, i32 0, i32 5
  %112 = load i64, ptr %111, align 8, !tbaa !33
  %113 = load ptr, ptr %4, align 8, !tbaa !5
  %114 = getelementptr inbounds %struct.TLS_CONNECT, ptr %113, i32 0, i32 19
  store i64 %112, ptr %114, align 8, !tbaa !35
  %115 = load ptr, ptr %4, align 8, !tbaa !5
  %116 = getelementptr inbounds %struct.TLS_CONNECT, ptr %115, i32 0, i32 20
  %117 = load ptr, ptr %5, align 8, !tbaa !5
  %118 = getelementptr inbounds %struct.TLS_CTX, ptr %117, i32 0, i32 8
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %116, ptr align 8 %118, i64 128, i1 false), !tbaa.struct !36
  %119 = load ptr, ptr %4, align 8, !tbaa !5
  %120 = getelementptr inbounds %struct.TLS_CONNECT, ptr %119, i32 0, i32 21
  %121 = load ptr, ptr %5, align 8, !tbaa !5
  %122 = getelementptr inbounds %struct.TLS_CTX, ptr %121, i32 0, i32 9
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %120, ptr align 8 %122, i64 128, i1 false), !tbaa.struct !36
  %123 = load ptr, ptr %5, align 8, !tbaa !5
  %124 = getelementptr inbounds %struct.TLS_CTX, ptr %123, i32 0, i32 11
  %125 = load i32, ptr %124, align 4, !tbaa !38
  %126 = load ptr, ptr %4, align 8, !tbaa !5
  %127 = getelementptr inbounds %struct.TLS_CONNECT, ptr %126, i32 0, i32 35
  store i32 %125, ptr %127, align 8, !tbaa !39
  store i32 1, ptr %3, align 4
  store i32 1, ptr %7, align 4
  br label %128

128:                                              ; preds = %100, %99, %53
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #5
  %129 = load i32, ptr %3, align 4
  ret i32 %129
}

attributes #0 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { 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 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #3 = { nocallback nofree nounwind willreturn memory(argmem: write) }
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 = { 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 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
!9 = !{!10, !11, i64 0}
!10 = !{!"", !11, i64 0, !11, i64 4, !7, i64 8, !12, i64 264, !6, i64 272, !12, i64 280, !6, i64 288, !12, i64 296, !13, i64 304, !13, i64 432, !11, i64 560, !11, i64 564}
!11 = !{!"int", !7, i64 0}
!12 = !{!"long", !7, i64 0}
!13 = !{!"", !14, i64 0, !7, i64 96}
!14 = !{!"", !7, i64 0, !7, i64 32, !7, i64 64}
!15 = !{!16, !11, i64 0}
!16 = !{!"", !11, i64 0, !11, i64 4, !7, i64 8, !12, i64 264, !11, i64 272, !7, i64 276, !12, i64 18720, !7, i64 18728, !7, i64 37165, !6, i64 55608, !12, i64 55616, !11, i64 55624, !7, i64 55628, !12, i64 55664, !7, i64 55672, !12, i64 57720, !7, i64 57728, !12, i64 59776, !7, i64 59784, !12, i64 61832, !13, i64 61840, !13, i64 61968, !11, i64 62096, !7, i64 62100, !7, i64 62148, !17, i64 62248, !17, i64 62424, !19, i64 62600, !19, i64 62728, !7, i64 62856, !7, i64 62864, !7, i64 62872, !7, i64 62884, !20, i64 62896, !20, i64 63032, !11, i64 63168}
!17 = !{!"", !18, i64 0, !7, i64 112}
!18 = !{!"", !7, i64 0, !12, i64 32, !7, i64 40, !12, i64 104}
!19 = !{!"", !7, i64 0}
!20 = !{!"BLOCK_CIPHER_KEY", !7, i64 0, !6, i64 128}
!21 = !{!10, !11, i64 4}
!22 = !{!16, !11, i64 4}
!23 = !{!12, !12, i64 0}
!24 = !{!10, !12, i64 264}
!25 = !{!11, !11, i64 0}
!26 = distinct !{!26, !27}
!27 = !{!"llvm.loop.mustprogress"}
!28 = !{!16, !12, i64 264}
!29 = !{!10, !12, i64 296}
!30 = !{!10, !6, i64 288}
!31 = !{!16, !12, i64 59776}
!32 = !{!16, !12, i64 57720}
!33 = !{!10, !12, i64 280}
!34 = !{!10, !6, i64 272}
!35 = !{!16, !12, i64 61832}
!36 = !{i64 0, i64 32, !37, i64 32, i64 32, !37, i64 64, i64 32, !37, i64 96, i64 32, !37}
!37 = !{!7, !7, i64 0}
!38 = !{!10, !11, i64 564}
!39 = !{!16, !11, i64 63168}


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

@stderr = external local_unnamed_addr global ptr, align 8
@.str = external hidden unnamed_addr constant [13 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [57 x i8], align 1
@__FUNCTION__.tls_init = external hidden unnamed_addr constant [9 x i8], align 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) #0

; Function Attrs: nofree nounwind
declare noundef i32 @fprintf(ptr nocapture noundef, ptr nocapture noundef readonly, ...) local_unnamed_addr #1

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

; Function Attrs: nofree nounwind uwtable
define dso_local range(i32 -1, 2) i32 @tls_init(ptr nocapture noundef %0, ptr nocapture noundef readonly %1) local_unnamed_addr #3 {
  tail call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(63176) %0, i8 0, i64 63176, i1 false)
  %3 = getelementptr inbounds i8, ptr %0, i64 4
  %4 = load <2 x i32>, ptr %1, align 8, !tbaa !5
  store <2 x i32> %4, ptr %0, align 8, !tbaa !5
  %5 = getelementptr inbounds i8, ptr %1, i64 264
  %6 = load i64, ptr %5, align 8, !tbaa !9
  %.not43 = icmp eq i64 %6, 0
  br i1 %.not43, label %._crit_edge, label %.lr.ph

.lr.ph:                                           ; preds = %2
  %7 = ptrtoint ptr %0 to i64
  %8 = ptrtoint ptr %1 to i64
  %9 = getelementptr inbounds i8, ptr %1, i64 8
  %10 = getelementptr inbounds i8, ptr %0, i64 8
  %min.iters.check = icmp ult i64 %6, 8
  %11 = sub i64 %7, %8
  %diff.check = icmp ult i64 %11, 32
  %or.cond = or i1 %min.iters.check, %diff.check
  br i1 %or.cond, label %scalar.ph.preheader, label %vector.ph

vector.ph:                                        ; preds = %.lr.ph
  %n.vec = and i64 %6, -8
  br label %vector.body

vector.body:                                      ; preds = %vector.body, %vector.ph
  %index = phi i64 [ 0, %vector.ph ], [ %index.next, %vector.body ]
  %12 = getelementptr inbounds [64 x i32], ptr %9, i64 0, i64 %index
  %13 = getelementptr inbounds i8, ptr %12, i64 16
  %wide.load = load <4 x i32>, ptr %12, align 4, !tbaa !5
  %wide.load48 = load <4 x i32>, ptr %13, align 4, !tbaa !5
  %14 = getelementptr inbounds [64 x i32], ptr %10, i64 0, i64 %index
  %15 = getelementptr inbounds i8, ptr %14, i64 16
  store <4 x i32> %wide.load, ptr %14, align 4, !tbaa !5
  store <4 x i32> %wide.load48, ptr %15, align 4, !tbaa !5
  %index.next = add nuw i64 %index, 8
  %16 = icmp eq i64 %index.next, %n.vec
  br i1 %16, label %middle.block, label %vector.body, !llvm.loop !15

middle.block:                                     ; preds = %vector.body
  %cmp.n = icmp eq i64 %6, %n.vec
  br i1 %cmp.n, label %._crit_edge, label %scalar.ph.preheader

scalar.ph.preheader:                              ; preds = %middle.block, %.lr.ph
  %.042.ph = phi i64 [ 0, %.lr.ph ], [ %n.vec, %middle.block ]
  %xtraiter = and i64 %6, 3
  %lcmp.mod.not = icmp eq i64 %xtraiter, 0
  br i1 %lcmp.mod.not, label %scalar.ph.prol.loopexit, label %scalar.ph.prol

scalar.ph.prol:                                   ; preds = %scalar.ph.preheader, %scalar.ph.prol
  %.042.prol = phi i64 [ %20, %scalar.ph.prol ], [ %.042.ph, %scalar.ph.preheader ]
  %prol.iter = phi i64 [ %prol.iter.next, %scalar.ph.prol ], [ 0, %scalar.ph.preheader ]
  %17 = getelementptr inbounds [64 x i32], ptr %9, i64 0, i64 %.042.prol
  %18 = load i32, ptr %17, align 4, !tbaa !5
  %19 = getelementptr inbounds [64 x i32], ptr %10, i64 0, i64 %.042.prol
  store i32 %18, ptr %19, align 4, !tbaa !5
  %20 = add nuw i64 %.042.prol, 1
  %prol.iter.next = add i64 %prol.iter, 1
  %prol.iter.cmp.not = icmp eq i64 %prol.iter.next, %xtraiter
  br i1 %prol.iter.cmp.not, label %scalar.ph.prol.loopexit, label %scalar.ph.prol, !llvm.loop !19

scalar.ph.prol.loopexit:                          ; preds = %scalar.ph.prol, %scalar.ph.preheader
  %.042.unr = phi i64 [ %.042.ph, %scalar.ph.preheader ], [ %20, %scalar.ph.prol ]
  %21 = sub i64 %.042.ph, %6
  %22 = icmp ugt i64 %21, -4
  br i1 %22, label %._crit_edge, label %scalar.ph

scalar.ph:                                        ; preds = %scalar.ph.prol.loopexit, %scalar.ph
  %.042 = phi i64 [ %38, %scalar.ph ], [ %.042.unr, %scalar.ph.prol.loopexit ]
  %23 = getelementptr inbounds [64 x i32], ptr %9, i64 0, i64 %.042
  %24 = load i32, ptr %23, align 4, !tbaa !5
  %25 = getelementptr inbounds [64 x i32], ptr %10, i64 0, i64 %.042
  store i32 %24, ptr %25, align 4, !tbaa !5
  %26 = add nuw i64 %.042, 1
  %27 = getelementptr inbounds [64 x i32], ptr %9, i64 0, i64 %26
  %28 = load i32, ptr %27, align 4, !tbaa !5
  %29 = getelementptr inbounds [64 x i32], ptr %10, i64 0, i64 %26
  store i32 %28, ptr %29, align 4, !tbaa !5
  %30 = add nuw i64 %.042, 2
  %31 = getelementptr inbounds [64 x i32], ptr %9, i64 0, i64 %30
  %32 = load i32, ptr %31, align 4, !tbaa !5
  %33 = getelementptr inbounds [64 x i32], ptr %10, i64 0, i64 %30
  store i32 %32, ptr %33, align 4, !tbaa !5
  %34 = add nuw i64 %.042, 3
  %35 = getelementptr inbounds [64 x i32], ptr %9, i64 0, i64 %34
  %36 = load i32, ptr %35, align 4, !tbaa !5
  %37 = getelementptr inbounds [64 x i32], ptr %10, i64 0, i64 %34
  store i32 %36, ptr %37, align 4, !tbaa !5
  %38 = add nuw i64 %.042, 4
  %exitcond.not.3 = icmp eq i64 %38, %6
  br i1 %exitcond.not.3, label %._crit_edge, label %scalar.ph, !llvm.loop !21

._crit_edge:                                      ; preds = %scalar.ph.prol.loopexit, %scalar.ph, %middle.block, %2
  %39 = getelementptr inbounds i8, ptr %0, i64 264
  store i64 %6, ptr %39, align 8, !tbaa !22
  %40 = getelementptr inbounds i8, ptr %1, i64 296
  %41 = load i64, ptr %40, align 8, !tbaa !28
  %42 = icmp ugt i64 %41, 2048
  br i1 %42, label %43, label %46

43:                                               ; preds = %._crit_edge
  %44 = load ptr, ptr @stderr, align 8, !tbaa !29
  %45 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %44, ptr noundef nonnull @.str, ptr noundef nonnull @.str.1, i32 noundef 2289, ptr noundef nonnull @__FUNCTION__.tls_init) #4
  br label %72

46:                                               ; preds = %._crit_edge
  %47 = load i32, ptr %3, align 4, !tbaa !30
  %.not = icmp eq i32 %47, 0
  %48 = getelementptr inbounds i8, ptr %1, i64 288
  %49 = load ptr, ptr %48, align 8, !tbaa !31
  %. = select i1 %.not, i64 55672, i64 57728
  %.47 = select i1 %.not, i64 57720, i64 59776
  %50 = getelementptr inbounds i8, ptr %0, i64 %.
  tail call void @llvm.memcpy.p0.p0.i64(ptr nonnull align 8 %50, ptr align 1 %49, i64 %41, i1 false)
  %51 = load i64, ptr %40, align 8, !tbaa !28
  %52 = getelementptr inbounds i8, ptr %0, i64 %.47
  store i64 %51, ptr %52, align 8, !tbaa !32
  %53 = getelementptr inbounds i8, ptr %1, i64 280
  %54 = load i64, ptr %53, align 8, !tbaa !33
  %55 = icmp ugt i64 %54, 2048
  br i1 %55, label %56, label %59

56:                                               ; preds = %46
  %57 = load ptr, ptr @stderr, align 8, !tbaa !29
  %58 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %57, ptr noundef nonnull @.str, ptr noundef nonnull @.str.1, i32 noundef 2301, ptr noundef nonnull @__FUNCTION__.tls_init) #4
  br label %72

59:                                               ; preds = %46
  %60 = getelementptr inbounds i8, ptr %0, i64 59784
  %61 = getelementptr inbounds i8, ptr %1, i64 272
  %62 = load ptr, ptr %61, align 8, !tbaa !34
  tail call void @llvm.memcpy.p0.p0.i64(ptr nonnull align 8 %60, ptr align 1 %62, i64 %54, i1 false)
  %63 = load i64, ptr %53, align 8, !tbaa !33
  %64 = getelementptr inbounds i8, ptr %0, i64 61832
  store i64 %63, ptr %64, align 8, !tbaa !35
  %65 = getelementptr inbounds i8, ptr %0, i64 61840
  %66 = getelementptr inbounds i8, ptr %1, i64 304
  tail call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 8 dereferenceable(128) %65, ptr noundef nonnull align 8 dereferenceable(128) %66, i64 128, i1 false), !tbaa.struct !36
  %67 = getelementptr inbounds i8, ptr %0, i64 61968
  %68 = getelementptr inbounds i8, ptr %1, i64 432
  tail call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 8 dereferenceable(128) %67, ptr noundef nonnull align 8 dereferenceable(128) %68, i64 128, i1 false), !tbaa.struct !36
  %69 = getelementptr inbounds i8, ptr %1, i64 564
  %70 = load i32, ptr %69, align 4, !tbaa !38
  %71 = getelementptr inbounds i8, ptr %0, i64 63168
  store i32 %70, ptr %71, align 8, !tbaa !39
  br label %72

72:                                               ; preds = %59, %56, %43
  %.038 = phi i32 [ -1, %43 ], [ -1, %56 ], [ 1, %59 ]
  ret i32 %.038
}

attributes #0 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { nofree 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 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: write) }
attributes #3 = { nofree 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 = { cold 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, !11, i64 264}
!10 = !{!"", !6, i64 0, !6, i64 4, !7, i64 8, !11, i64 264, !12, i64 272, !11, i64 280, !12, i64 288, !11, i64 296, !13, i64 304, !13, i64 432, !6, i64 560, !6, i64 564}
!11 = !{!"long", !7, i64 0}
!12 = !{!"any pointer", !7, i64 0}
!13 = !{!"", !14, i64 0, !7, i64 96}
!14 = !{!"", !7, i64 0, !7, i64 32, !7, i64 64}
!15 = distinct !{!15, !16, !17, !18}
!16 = !{!"llvm.loop.mustprogress"}
!17 = !{!"llvm.loop.isvectorized", i32 1}
!18 = !{!"llvm.loop.unroll.runtime.disable"}
!19 = distinct !{!19, !20}
!20 = !{!"llvm.loop.unroll.disable"}
!21 = distinct !{!21, !16, !17}
!22 = !{!23, !11, i64 264}
!23 = !{!"", !6, i64 0, !6, i64 4, !7, i64 8, !11, i64 264, !6, i64 272, !7, i64 276, !11, i64 18720, !7, i64 18728, !7, i64 37165, !12, i64 55608, !11, i64 55616, !6, i64 55624, !7, i64 55628, !11, i64 55664, !7, i64 55672, !11, i64 57720, !7, i64 57728, !11, i64 59776, !7, i64 59784, !11, i64 61832, !13, i64 61840, !13, i64 61968, !6, i64 62096, !7, i64 62100, !7, i64 62148, !24, i64 62248, !24, i64 62424, !26, i64 62600, !26, i64 62728, !7, i64 62856, !7, i64 62864, !7, i64 62872, !7, i64 62884, !27, i64 62896, !27, i64 63032, !6, i64 63168}
!24 = !{!"", !25, i64 0, !7, i64 112}
!25 = !{!"", !7, i64 0, !11, i64 32, !7, i64 40, !11, i64 104}
!26 = !{!"", !7, i64 0}
!27 = !{!"BLOCK_CIPHER_KEY", !7, i64 0, !12, i64 128}
!28 = !{!10, !11, i64 296}
!29 = !{!12, !12, i64 0}
!30 = !{!23, !6, i64 4}
!31 = !{!10, !12, i64 288}
!32 = !{!11, !11, i64 0}
!33 = !{!10, !11, i64 280}
!34 = !{!10, !12, i64 272}
!35 = !{!23, !11, i64 61832}
!36 = !{i64 0, i64 32, !37, i64 32, i64 32, !37, i64 64, i64 32, !37, i64 96, i64 32, !37}
!37 = !{!7, !7, i64 0}
!38 = !{!10, !6, i64 564}
!39 = !{!23, !6, i64 63168}


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