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

; 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.SM3_XMSS_KEY = type { i32, [32 x i8], [32 x i8], [32 x i8], [32 x i8], i32, ptr }

@stderr = external global ptr, align 8
@.str = external hidden unnamed_addr constant [13 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [62 x i8], align 1
@__FUNCTION__.sm3_xmss_key_to_bytes = external hidden unnamed_addr constant [22 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 nounwind willreturn memory(argmem: readwrite)
declare void @llvm.memcpy.p0.p0.i64(ptr noalias nocapture writeonly, ptr noalias nocapture readonly, i64, i1 immarg) #1

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

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

; Function Attrs: nounwind
declare i32 @fprintf(ptr noundef, ptr noundef, ...) #3

; Function Attrs: nounwind uwtable
define dso_local i32 @sm3_xmss_key_to_bytes(ptr noundef %0, ptr noundef %1, ptr noundef %2) #2 {
  %4 = alloca i32, align 4
  %5 = alloca ptr, align 8
  %6 = alloca ptr, align 8
  %7 = alloca ptr, align 8
  %8 = alloca i32, align 4
  %9 = alloca i64, align 8
  %10 = alloca ptr, align 8
  %11 = alloca i32, align 4
  store ptr %0, ptr %5, align 8, !tbaa !5
  store ptr %1, ptr %6, align 8, !tbaa !5
  store ptr %2, ptr %7, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #4
  %12 = load ptr, ptr %7, align 8, !tbaa !5
  %13 = icmp ne ptr %12, null
  br i1 %13, label %20, label %14

14:                                               ; preds = %3
  br label %15

15:                                               ; preds = %14
  %16 = load ptr, ptr @stderr, align 8, !tbaa !5
  %17 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %16, ptr noundef @.str, ptr noundef @.str.1, i32 noundef 554, ptr noundef @__FUNCTION__.sm3_xmss_key_to_bytes) #4
  br label %18

18:                                               ; preds = %15
  br label %19

19:                                               ; preds = %18
  store i32 -1, ptr %4, align 4
  store i32 1, ptr %11, align 4
  br label %154

20:                                               ; preds = %3
  %21 = load ptr, ptr %5, align 8, !tbaa !5
  %22 = getelementptr inbounds %struct.SM3_XMSS_KEY, ptr %21, i32 0, i32 0
  %23 = load i32, ptr %22, align 8, !tbaa !9
  %24 = call i32 @sm3_xmss_height_from_oid(ptr noundef %8, i32 noundef %23)
  %25 = icmp ne i32 %24, 1
  br i1 %25, label %26, label %32

26:                                               ; preds = %20
  br label %27

27:                                               ; preds = %26
  %28 = load ptr, ptr @stderr, align 8, !tbaa !5
  %29 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %28, ptr noundef @.str, ptr noundef @.str.1, i32 noundef 559, ptr noundef @__FUNCTION__.sm3_xmss_key_to_bytes) #4
  br label %30

30:                                               ; preds = %27
  br label %31

31:                                               ; preds = %30
  store i32 -1, ptr %4, align 4
  store i32 1, ptr %11, align 4
  br label %154

32:                                               ; preds = %20
  %33 = load i32, ptr %8, align 4, !tbaa !12
  %34 = add i32 %33, 1
  %35 = shl i32 1, %34
  %36 = sub nsw i32 %35, 1
  %37 = mul nsw i32 32, %36
  %38 = sext i32 %37 to i64
  store i64 %38, ptr %9, align 8, !tbaa !13
  %39 = load ptr, ptr %5, align 8, !tbaa !5
  %40 = getelementptr inbounds %struct.SM3_XMSS_KEY, ptr %39, i32 0, i32 6
  %41 = load ptr, ptr %40, align 8, !tbaa !15
  %42 = icmp ne ptr %41, null
  br i1 %42, label %49, label %43

43:                                               ; preds = %32
  br label %44

44:                                               ; preds = %43
  %45 = load ptr, ptr @stderr, align 8, !tbaa !5
  %46 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %45, ptr noundef @.str, ptr noundef @.str.1, i32 noundef 564, ptr noundef @__FUNCTION__.sm3_xmss_key_to_bytes) #4
  br label %47

47:                                               ; preds = %44
  br label %48

48:                                               ; preds = %47
  store i32 -1, ptr %4, align 4
  store i32 1, ptr %11, align 4
  br label %154

49:                                               ; preds = %32
  %50 = load ptr, ptr %6, align 8, !tbaa !5
  %51 = icmp ne ptr %50, null
  br i1 %51, label %56, label %52

52:                                               ; preds = %49
  %53 = load i64, ptr %9, align 8, !tbaa !13
  %54 = add i64 136, %53
  %55 = load ptr, ptr %7, align 8, !tbaa !5
  store i64 %54, ptr %55, align 8, !tbaa !13
  store i32 1, ptr %4, align 4
  store i32 1, ptr %11, align 4
  br label %154

56:                                               ; preds = %49
  %57 = load ptr, ptr %6, align 8, !tbaa !5
  store ptr %57, ptr %10, align 8, !tbaa !5
  %58 = load ptr, ptr %5, align 8, !tbaa !5
  %59 = getelementptr inbounds %struct.SM3_XMSS_KEY, ptr %58, i32 0, i32 0
  %60 = load i32, ptr %59, align 8, !tbaa !9
  %61 = lshr i32 %60, 24
  %62 = trunc i32 %61 to i8
  %63 = load ptr, ptr %10, align 8, !tbaa !5
  %64 = getelementptr inbounds i8, ptr %63, i64 0
  store i8 %62, ptr %64, align 1, !tbaa !16
  %65 = load ptr, ptr %5, align 8, !tbaa !5
  %66 = getelementptr inbounds %struct.SM3_XMSS_KEY, ptr %65, i32 0, i32 0
  %67 = load i32, ptr %66, align 8, !tbaa !9
  %68 = lshr i32 %67, 16
  %69 = trunc i32 %68 to i8
  %70 = load ptr, ptr %10, align 8, !tbaa !5
  %71 = getelementptr inbounds i8, ptr %70, i64 1
  store i8 %69, ptr %71, align 1, !tbaa !16
  %72 = load ptr, ptr %5, align 8, !tbaa !5
  %73 = getelementptr inbounds %struct.SM3_XMSS_KEY, ptr %72, i32 0, i32 0
  %74 = load i32, ptr %73, align 8, !tbaa !9
  %75 = lshr i32 %74, 8
  %76 = trunc i32 %75 to i8
  %77 = load ptr, ptr %10, align 8, !tbaa !5
  %78 = getelementptr inbounds i8, ptr %77, i64 2
  store i8 %76, ptr %78, align 1, !tbaa !16
  %79 = load ptr, ptr %5, align 8, !tbaa !5
  %80 = getelementptr inbounds %struct.SM3_XMSS_KEY, ptr %79, i32 0, i32 0
  %81 = load i32, ptr %80, align 8, !tbaa !9
  %82 = trunc i32 %81 to i8
  %83 = load ptr, ptr %10, align 8, !tbaa !5
  %84 = getelementptr inbounds i8, ptr %83, i64 3
  store i8 %82, ptr %84, align 1, !tbaa !16
  %85 = load ptr, ptr %10, align 8, !tbaa !5
  %86 = getelementptr inbounds i8, ptr %85, i64 4
  store ptr %86, ptr %10, align 8, !tbaa !5
  %87 = load ptr, ptr %10, align 8, !tbaa !5
  %88 = load ptr, ptr %5, align 8, !tbaa !5
  %89 = getelementptr inbounds %struct.SM3_XMSS_KEY, ptr %88, i32 0, i32 1
  %90 = getelementptr inbounds [32 x i8], ptr %89, i64 0, i64 0
  call void @llvm.memcpy.p0.p0.i64(ptr align 1 %87, ptr align 4 %90, i64 32, i1 false)
  %91 = load ptr, ptr %10, align 8, !tbaa !5
  %92 = getelementptr inbounds i8, ptr %91, i64 32
  store ptr %92, ptr %10, align 8, !tbaa !5
  %93 = load ptr, ptr %10, align 8, !tbaa !5
  %94 = load ptr, ptr %5, align 8, !tbaa !5
  %95 = getelementptr inbounds %struct.SM3_XMSS_KEY, ptr %94, i32 0, i32 2
  %96 = getelementptr inbounds [32 x i8], ptr %95, i64 0, i64 0
  call void @llvm.memcpy.p0.p0.i64(ptr align 1 %93, ptr align 4 %96, i64 32, i1 false)
  %97 = load ptr, ptr %10, align 8, !tbaa !5
  %98 = getelementptr inbounds i8, ptr %97, i64 32
  store ptr %98, ptr %10, align 8, !tbaa !5
  %99 = load ptr, ptr %10, align 8, !tbaa !5
  %100 = load ptr, ptr %5, align 8, !tbaa !5
  %101 = getelementptr inbounds %struct.SM3_XMSS_KEY, ptr %100, i32 0, i32 3
  %102 = getelementptr inbounds [32 x i8], ptr %101, i64 0, i64 0
  call void @llvm.memcpy.p0.p0.i64(ptr align 1 %99, ptr align 4 %102, i64 32, i1 false)
  %103 = load ptr, ptr %10, align 8, !tbaa !5
  %104 = getelementptr inbounds i8, ptr %103, i64 32
  store ptr %104, ptr %10, align 8, !tbaa !5
  %105 = load ptr, ptr %10, align 8, !tbaa !5
  %106 = load ptr, ptr %5, align 8, !tbaa !5
  %107 = getelementptr inbounds %struct.SM3_XMSS_KEY, ptr %106, i32 0, i32 4
  %108 = getelementptr inbounds [32 x i8], ptr %107, i64 0, i64 0
  call void @llvm.memcpy.p0.p0.i64(ptr align 1 %105, ptr align 4 %108, i64 32, i1 false)
  %109 = load ptr, ptr %10, align 8, !tbaa !5
  %110 = getelementptr inbounds i8, ptr %109, i64 32
  store ptr %110, ptr %10, align 8, !tbaa !5
  %111 = load ptr, ptr %5, align 8, !tbaa !5
  %112 = getelementptr inbounds %struct.SM3_XMSS_KEY, ptr %111, i32 0, i32 5
  %113 = load i32, ptr %112, align 4, !tbaa !17
  %114 = lshr i32 %113, 24
  %115 = trunc i32 %114 to i8
  %116 = load ptr, ptr %10, align 8, !tbaa !5
  %117 = getelementptr inbounds i8, ptr %116, i64 0
  store i8 %115, ptr %117, align 1, !tbaa !16
  %118 = load ptr, ptr %5, align 8, !tbaa !5
  %119 = getelementptr inbounds %struct.SM3_XMSS_KEY, ptr %118, i32 0, i32 5
  %120 = load i32, ptr %119, align 4, !tbaa !17
  %121 = lshr i32 %120, 16
  %122 = trunc i32 %121 to i8
  %123 = load ptr, ptr %10, align 8, !tbaa !5
  %124 = getelementptr inbounds i8, ptr %123, i64 1
  store i8 %122, ptr %124, align 1, !tbaa !16
  %125 = load ptr, ptr %5, align 8, !tbaa !5
  %126 = getelementptr inbounds %struct.SM3_XMSS_KEY, ptr %125, i32 0, i32 5
  %127 = load i32, ptr %126, align 4, !tbaa !17
  %128 = lshr i32 %127, 8
  %129 = trunc i32 %128 to i8
  %130 = load ptr, ptr %10, align 8, !tbaa !5
  %131 = getelementptr inbounds i8, ptr %130, i64 2
  store i8 %129, ptr %131, align 1, !tbaa !16
  %132 = load ptr, ptr %5, align 8, !tbaa !5
  %133 = getelementptr inbounds %struct.SM3_XMSS_KEY, ptr %132, i32 0, i32 5
  %134 = load i32, ptr %133, align 4, !tbaa !17
  %135 = trunc i32 %134 to i8
  %136 = load ptr, ptr %10, align 8, !tbaa !5
  %137 = getelementptr inbounds i8, ptr %136, i64 3
  store i8 %135, ptr %137, align 1, !tbaa !16
  %138 = load ptr, ptr %10, align 8, !tbaa !5
  %139 = getelementptr inbounds i8, ptr %138, i64 4
  store ptr %139, ptr %10, align 8, !tbaa !5
  %140 = load ptr, ptr %10, align 8, !tbaa !5
  %141 = load ptr, ptr %5, align 8, !tbaa !5
  %142 = getelementptr inbounds %struct.SM3_XMSS_KEY, ptr %141, i32 0, i32 6
  %143 = load ptr, ptr %142, align 8, !tbaa !15
  %144 = load i64, ptr %9, align 8, !tbaa !13
  call void @llvm.memcpy.p0.p0.i64(ptr align 1 %140, ptr align 1 %143, i64 %144, i1 false)
  %145 = load i64, ptr %9, align 8, !tbaa !13
  %146 = load ptr, ptr %10, align 8, !tbaa !5
  %147 = getelementptr inbounds i8, ptr %146, i64 %145
  store ptr %147, ptr %10, align 8, !tbaa !5
  %148 = load ptr, ptr %10, align 8, !tbaa !5
  %149 = load ptr, ptr %6, align 8, !tbaa !5
  %150 = ptrtoint ptr %148 to i64
  %151 = ptrtoint ptr %149 to i64
  %152 = sub i64 %150, %151
  %153 = load ptr, ptr %7, align 8, !tbaa !5
  store i64 %152, ptr %153, align 8, !tbaa !13
  store i32 1, ptr %4, align 4
  store i32 1, ptr %11, align 4
  br label %154

154:                                              ; preds = %56, %52, %48, %31, %19
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #4
  %155 = load i32, ptr %4, align 4
  ret i32 %155
}

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }
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 = { 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 = { 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, !7, i64 4, !7, i64 36, !7, i64 68, !7, i64 100, !11, i64 132, !6, i64 136}
!11 = !{!"int", !7, i64 0}
!12 = !{!11, !11, i64 0}
!13 = !{!14, !14, i64 0}
!14 = !{!"long", !7, i64 0}
!15 = !{!10, !6, i64 136}
!16 = !{!7, !7, i64 0}
!17 = !{!10, !11, i64 132}


; 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 [62 x i8], align 1
@__FUNCTION__.sm3_xmss_key_to_bytes = 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 nounwind willreturn memory(argmem: readwrite)
declare void @llvm.memcpy.p0.p0.i64(ptr noalias nocapture writeonly, ptr noalias nocapture readonly, i64, i1 immarg) #1

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

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

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

; Function Attrs: nounwind uwtable
define dso_local range(i32 -1, 2) i32 @sm3_xmss_key_to_bytes(ptr nocapture noundef readonly %0, ptr noundef %1, ptr noundef writeonly %2) local_unnamed_addr #2 {
  %4 = alloca i32, align 4
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %4) #4
  %.not = icmp eq ptr %2, null
  br i1 %.not, label %5, label %8

5:                                                ; preds = %3
  %6 = load ptr, ptr @stderr, align 8, !tbaa !5
  %7 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %6, ptr noundef nonnull @.str, ptr noundef nonnull @.str.1, i32 noundef 554, ptr noundef nonnull @__FUNCTION__.sm3_xmss_key_to_bytes) #5
  br label %73

8:                                                ; preds = %3
  %9 = load i32, ptr %0, align 8, !tbaa !9
  %10 = call i32 @sm3_xmss_height_from_oid(ptr noundef nonnull %4, i32 noundef %9)
  %.not47 = icmp eq i32 %10, 1
  br i1 %.not47, label %14, label %11

11:                                               ; preds = %8
  %12 = load ptr, ptr @stderr, align 8, !tbaa !5
  %13 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %12, ptr noundef nonnull @.str, ptr noundef nonnull @.str.1, i32 noundef 559, ptr noundef nonnull @__FUNCTION__.sm3_xmss_key_to_bytes) #5
  br label %73

14:                                               ; preds = %8
  %15 = load i32, ptr %4, align 4, !tbaa !12
  %16 = add i32 %15, 1
  %notmask = shl nsw i32 -1, %16
  %17 = xor i32 %notmask, -1
  %18 = shl nsw i32 %17, 5
  %19 = zext nneg i32 %18 to i64
  %20 = getelementptr inbounds i8, ptr %0, i64 136
  %21 = load ptr, ptr %20, align 8, !tbaa !13
  %.not48 = icmp eq ptr %21, null
  br i1 %.not48, label %22, label %25

22:                                               ; preds = %14
  %23 = load ptr, ptr @stderr, align 8, !tbaa !5
  %24 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %23, ptr noundef nonnull @.str, ptr noundef nonnull @.str.1, i32 noundef 564, ptr noundef nonnull @__FUNCTION__.sm3_xmss_key_to_bytes) #5
  br label %73

25:                                               ; preds = %14
  %.not49 = icmp eq ptr %1, null
  br i1 %.not49, label %26, label %28

26:                                               ; preds = %25
  %27 = add nuw nsw i64 %19, 136
  store i64 %27, ptr %2, align 8, !tbaa !14
  br label %73

28:                                               ; preds = %25
  %29 = load i32, ptr %0, align 8, !tbaa !9
  %30 = lshr i32 %29, 24
  %31 = trunc nuw i32 %30 to i8
  store i8 %31, ptr %1, align 1, !tbaa !16
  %32 = load i32, ptr %0, align 8, !tbaa !9
  %33 = lshr i32 %32, 16
  %34 = trunc i32 %33 to i8
  %35 = getelementptr inbounds i8, ptr %1, i64 1
  store i8 %34, ptr %35, align 1, !tbaa !16
  %36 = load i32, ptr %0, align 8, !tbaa !9
  %37 = lshr i32 %36, 8
  %38 = trunc i32 %37 to i8
  %39 = getelementptr inbounds i8, ptr %1, i64 2
  store i8 %38, ptr %39, align 1, !tbaa !16
  %40 = load i32, ptr %0, align 8, !tbaa !9
  %41 = trunc i32 %40 to i8
  %42 = getelementptr inbounds i8, ptr %1, i64 3
  store i8 %41, ptr %42, align 1, !tbaa !16
  %43 = getelementptr inbounds i8, ptr %1, i64 4
  %44 = getelementptr inbounds i8, ptr %0, i64 4
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 1 dereferenceable(32) %43, ptr noundef nonnull align 4 dereferenceable(32) %44, i64 32, i1 false)
  %45 = getelementptr inbounds i8, ptr %1, i64 36
  %46 = getelementptr inbounds i8, ptr %0, i64 36
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 1 dereferenceable(32) %45, ptr noundef nonnull align 4 dereferenceable(32) %46, i64 32, i1 false)
  %47 = getelementptr inbounds i8, ptr %1, i64 68
  %48 = getelementptr inbounds i8, ptr %0, i64 68
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 1 dereferenceable(32) %47, ptr noundef nonnull align 4 dereferenceable(32) %48, i64 32, i1 false)
  %49 = getelementptr inbounds i8, ptr %1, i64 100
  %50 = getelementptr inbounds i8, ptr %0, i64 100
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 1 dereferenceable(32) %49, ptr noundef nonnull align 4 dereferenceable(32) %50, i64 32, i1 false)
  %51 = getelementptr inbounds i8, ptr %1, i64 132
  %52 = getelementptr inbounds i8, ptr %0, i64 132
  %53 = load i32, ptr %52, align 4, !tbaa !17
  %54 = lshr i32 %53, 24
  %55 = trunc nuw i32 %54 to i8
  store i8 %55, ptr %51, align 1, !tbaa !16
  %56 = load i32, ptr %52, align 4, !tbaa !17
  %57 = lshr i32 %56, 16
  %58 = trunc i32 %57 to i8
  %59 = getelementptr inbounds i8, ptr %1, i64 133
  store i8 %58, ptr %59, align 1, !tbaa !16
  %60 = load i32, ptr %52, align 4, !tbaa !17
  %61 = lshr i32 %60, 8
  %62 = trunc i32 %61 to i8
  %63 = getelementptr inbounds i8, ptr %1, i64 134
  store i8 %62, ptr %63, align 1, !tbaa !16
  %64 = load i32, ptr %52, align 4, !tbaa !17
  %65 = trunc i32 %64 to i8
  %66 = getelementptr inbounds i8, ptr %1, i64 135
  store i8 %65, ptr %66, align 1, !tbaa !16
  %67 = getelementptr inbounds i8, ptr %1, i64 136
  %68 = load ptr, ptr %20, align 8, !tbaa !13
  call void @llvm.memcpy.p0.p0.i64(ptr nonnull align 1 %67, ptr align 1 %68, i64 %19, i1 false)
  %69 = getelementptr inbounds i8, ptr %67, i64 %19
  %70 = ptrtoint ptr %69 to i64
  %71 = ptrtoint ptr %1 to i64
  %72 = sub i64 %70, %71
  store i64 %72, ptr %2, align 8, !tbaa !14
  br label %73

73:                                               ; preds = %28, %26, %22, %11, %5
  %.0 = phi i32 [ -1, %11 ], [ 1, %28 ], [ 1, %26 ], [ -1, %22 ], [ -1, %5 ]
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %4) #4
  ret i32 %.0
}

attributes #0 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: readwrite) }
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 = { 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 #4 = { nounwind }
attributes #5 = { 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 = !{!"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, !7, i64 4, !7, i64 36, !7, i64 68, !7, i64 100, !11, i64 132, !6, i64 136}
!11 = !{!"int", !7, i64 0}
!12 = !{!11, !11, i64 0}
!13 = !{!10, !6, i64 136}
!14 = !{!15, !15, i64 0}
!15 = !{!"long", !7, i64 0}
!16 = !{!7, !7, i64 0}
!17 = !{!10, !11, i64 132}


; Effective O3 passes: EarlyCSEPass,GlobalOptPass,IPSCCPPass,InferFunctionAttrsPass,InstCombinePass,PostOrderFunctionAttrsPass,SROAPass,SimplifyCFGPass,TailCallElimPass