; LLVM IR from specinfo-ua/UAPKI :: library/uapkic/src (dstu7564)

; 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.Dstu7564Ctx_st = type { [256 x i8], i64, [2 x i64], [128 x i8], i64, i64, i64, i64, i64, ptr }
%struct.Dstu7564Hmac = type { [128 x i8], [128 x i8], i64 }

@.str = 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

declare void @stacktrace_create(ptr noundef, i64 noundef, i32 noundef, ptr noundef) #1

; Function Attrs: nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.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) #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: inlinehint nounwind uwtable
declare hidden void @digest(ptr noundef, ptr noundef) #4

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

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

declare void @stacktrace_add(ptr noundef, i64 noundef, i32 noundef) #1

; Function Attrs: nounwind uwtable
define dso_local i32 @dstu7564_final_kmac(ptr noundef %0, ptr noundef %1) #5 {
  %3 = alloca ptr, align 8
  %4 = alloca ptr, align 8
  %5 = alloca i32, align 4
  store ptr %0, ptr %3, align 8, !tbaa !5
  store ptr %1, ptr %4, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %5) #6
  store i32 0, ptr %5, align 4, !tbaa !9
  br label %6

6:                                                ; preds = %2
  %7 = load ptr, ptr %3, align 8, !tbaa !5
  %8 = icmp ne ptr %7, null
  br i1 %8, label %11, label %9

9:                                                ; preds = %6
  store i32 2, ptr %5, align 4, !tbaa !9
  %10 = load i32, ptr %5, align 4, !tbaa !9
  call void @stacktrace_create(ptr noundef @.str, i64 noundef 793, i32 noundef %10, ptr noundef null)
  br label %211

11:                                               ; preds = %6
  br label %12

12:                                               ; preds = %11
  br label %13

13:                                               ; preds = %12
  br label %14

14:                                               ; preds = %13
  %15 = load ptr, ptr %4, align 8, !tbaa !5
  %16 = icmp ne ptr %15, null
  br i1 %16, label %19, label %17

17:                                               ; preds = %14
  store i32 2, ptr %5, align 4, !tbaa !9
  %18 = load i32, ptr %5, align 4, !tbaa !9
  call void @stacktrace_create(ptr noundef @.str, i64 noundef 794, i32 noundef %18, ptr noundef null)
  br label %211

19:                                               ; preds = %14
  br label %20

20:                                               ; preds = %19
  br label %21

21:                                               ; preds = %20
  %22 = load ptr, ptr %3, align 8, !tbaa !5
  %23 = getelementptr inbounds %struct.Dstu7564Ctx_st, ptr %22, i32 0, i32 7
  %24 = load i64, ptr %23, align 8, !tbaa !11
  %25 = icmp eq i64 %24, 0
  br i1 %25, label %26, label %31

26:                                               ; preds = %21
  br label %27

27:                                               ; preds = %26
  store i32 4, ptr %5, align 4, !tbaa !9
  %28 = load i32, ptr %5, align 4, !tbaa !9
  call void @stacktrace_create(ptr noundef @.str, i64 noundef 796, i32 noundef %28, ptr noundef null)
  br label %211

29:                                               ; No predecessors!
  br label %30

30:                                               ; preds = %29
  br label %31

31:                                               ; preds = %30, %21
  %32 = load ptr, ptr %3, align 8, !tbaa !5
  %33 = getelementptr inbounds %struct.Dstu7564Ctx_st, ptr %32, i32 0, i32 0
  %34 = getelementptr inbounds [256 x i8], ptr %33, i64 0, i64 0
  %35 = load ptr, ptr %3, align 8, !tbaa !5
  %36 = getelementptr inbounds %struct.Dstu7564Ctx_st, ptr %35, i32 0, i32 1
  %37 = load i64, ptr %36, align 8, !tbaa !14
  %38 = load ptr, ptr %3, align 8, !tbaa !5
  %39 = getelementptr inbounds %struct.Dstu7564Ctx_st, ptr %38, i32 0, i32 2
  %40 = getelementptr inbounds [2 x i64], ptr %39, i64 0, i64 0
  %41 = load ptr, ptr %3, align 8, !tbaa !5
  %42 = getelementptr inbounds %struct.Dstu7564Ctx_st, ptr %41, i32 0, i32 4
  %43 = load i64, ptr %42, align 8, !tbaa !15
  call void @padding(ptr noundef %34, i64 noundef %37, ptr noundef %40, i64 noundef %43)
  %44 = load ptr, ptr %3, align 8, !tbaa !5
  %45 = load ptr, ptr %3, align 8, !tbaa !5
  %46 = getelementptr inbounds %struct.Dstu7564Ctx_st, ptr %45, i32 0, i32 0
  %47 = getelementptr inbounds [256 x i8], ptr %46, i64 0, i64 0
  call void @digest(ptr noundef %44, ptr noundef %47)
  %48 = load ptr, ptr %3, align 8, !tbaa !5
  %49 = getelementptr inbounds %struct.Dstu7564Ctx_st, ptr %48, i32 0, i32 4
  %50 = load i64, ptr %49, align 8, !tbaa !15
  %51 = load ptr, ptr %3, align 8, !tbaa !5
  %52 = getelementptr inbounds %struct.Dstu7564Ctx_st, ptr %51, i32 0, i32 1
  %53 = load i64, ptr %52, align 8, !tbaa !14
  %54 = sub i64 %50, %53
  %55 = load ptr, ptr %3, align 8, !tbaa !5
  %56 = getelementptr inbounds %struct.Dstu7564Ctx_st, ptr %55, i32 0, i32 2
  %57 = getelementptr inbounds [2 x i64], ptr %56, i64 0, i64 0
  %58 = load i64, ptr %57, align 8, !tbaa !16
  %59 = add i64 %58, %54
  store i64 %59, ptr %57, align 8, !tbaa !16
  %60 = load ptr, ptr %3, align 8, !tbaa !5
  %61 = getelementptr inbounds %struct.Dstu7564Ctx_st, ptr %60, i32 0, i32 2
  %62 = getelementptr inbounds [2 x i64], ptr %61, i64 0, i64 0
  %63 = load i64, ptr %62, align 8, !tbaa !16
  %64 = load ptr, ptr %3, align 8, !tbaa !5
  %65 = getelementptr inbounds %struct.Dstu7564Ctx_st, ptr %64, i32 0, i32 4
  %66 = load i64, ptr %65, align 8, !tbaa !15
  %67 = load ptr, ptr %3, align 8, !tbaa !5
  %68 = getelementptr inbounds %struct.Dstu7564Ctx_st, ptr %67, i32 0, i32 1
  %69 = load i64, ptr %68, align 8, !tbaa !14
  %70 = sub i64 %66, %69
  %71 = icmp ult i64 %63, %70
  br i1 %71, label %72, label %78

72:                                               ; preds = %31
  %73 = load ptr, ptr %3, align 8, !tbaa !5
  %74 = getelementptr inbounds %struct.Dstu7564Ctx_st, ptr %73, i32 0, i32 2
  %75 = getelementptr inbounds [2 x i64], ptr %74, i64 0, i64 1
  %76 = load i64, ptr %75, align 8, !tbaa !16
  %77 = add i64 %76, 1
  store i64 %77, ptr %75, align 8, !tbaa !16
  br label %78

78:                                               ; preds = %72, %31
  %79 = load ptr, ptr %3, align 8, !tbaa !5
  %80 = getelementptr inbounds %struct.Dstu7564Ctx_st, ptr %79, i32 0, i32 1
  %81 = load i64, ptr %80, align 8, !tbaa !14
  %82 = load ptr, ptr %3, align 8, !tbaa !5
  %83 = getelementptr inbounds %struct.Dstu7564Ctx_st, ptr %82, i32 0, i32 4
  %84 = load i64, ptr %83, align 8, !tbaa !15
  %85 = sub i64 %84, 13
  %86 = icmp ugt i64 %81, %85
  br i1 %86, label %87, label %119

87:                                               ; preds = %78
  %88 = load ptr, ptr %3, align 8, !tbaa !5
  %89 = load ptr, ptr %3, align 8, !tbaa !5
  %90 = getelementptr inbounds %struct.Dstu7564Ctx_st, ptr %89, i32 0, i32 0
  %91 = getelementptr inbounds [256 x i8], ptr %90, i64 0, i64 0
  %92 = load ptr, ptr %3, align 8, !tbaa !5
  %93 = getelementptr inbounds %struct.Dstu7564Ctx_st, ptr %92, i32 0, i32 4
  %94 = load i64, ptr %93, align 8, !tbaa !15
  %95 = getelementptr inbounds i8, ptr %91, i64 %94
  call void @digest(ptr noundef %88, ptr noundef %95)
  %96 = load ptr, ptr %3, align 8, !tbaa !5
  %97 = getelementptr inbounds %struct.Dstu7564Ctx_st, ptr %96, i32 0, i32 4
  %98 = load i64, ptr %97, align 8, !tbaa !15
  %99 = load ptr, ptr %3, align 8, !tbaa !5
  %100 = getelementptr inbounds %struct.Dstu7564Ctx_st, ptr %99, i32 0, i32 2
  %101 = getelementptr inbounds [2 x i64], ptr %100, i64 0, i64 0
  %102 = load i64, ptr %101, align 8, !tbaa !16
  %103 = add i64 %102, %98
  store i64 %103, ptr %101, align 8, !tbaa !16
  %104 = load ptr, ptr %3, align 8, !tbaa !5
  %105 = getelementptr inbounds %struct.Dstu7564Ctx_st, ptr %104, i32 0, i32 2
  %106 = getelementptr inbounds [2 x i64], ptr %105, i64 0, i64 0
  %107 = load i64, ptr %106, align 8, !tbaa !16
  %108 = load ptr, ptr %3, align 8, !tbaa !5
  %109 = getelementptr inbounds %struct.Dstu7564Ctx_st, ptr %108, i32 0, i32 4
  %110 = load i64, ptr %109, align 8, !tbaa !15
  %111 = icmp ult i64 %107, %110
  br i1 %111, label %112, label %118

112:                                              ; preds = %87
  %113 = load ptr, ptr %3, align 8, !tbaa !5
  %114 = getelementptr inbounds %struct.Dstu7564Ctx_st, ptr %113, i32 0, i32 2
  %115 = getelementptr inbounds [2 x i64], ptr %114, i64 0, i64 1
  %116 = load i64, ptr %115, align 8, !tbaa !16
  %117 = add i64 %116, 1
  store i64 %117, ptr %115, align 8, !tbaa !16
  br label %118

118:                                              ; preds = %112, %87
  br label %119

119:                                              ; preds = %118, %78
  %120 = load ptr, ptr %3, align 8, !tbaa !5
  %121 = getelementptr inbounds %struct.Dstu7564Ctx_st, ptr %120, i32 0, i32 0
  %122 = getelementptr inbounds [256 x i8], ptr %121, i64 0, i64 0
  %123 = load ptr, ptr %3, align 8, !tbaa !5
  %124 = getelementptr inbounds %struct.Dstu7564Ctx_st, ptr %123, i32 0, i32 4
  %125 = load i64, ptr %124, align 8, !tbaa !15
  call void @llvm.memset.p0.i64(ptr align 8 %122, i8 0, i64 %125, i1 false)
  %126 = load ptr, ptr %3, align 8, !tbaa !5
  %127 = getelementptr inbounds %struct.Dstu7564Ctx_st, ptr %126, i32 0, i32 1
  store i64 0, ptr %127, align 8, !tbaa !14
  %128 = load ptr, ptr %3, align 8, !tbaa !5
  %129 = getelementptr inbounds %struct.Dstu7564Ctx_st, ptr %128, i32 0, i32 4
  %130 = load i64, ptr %129, align 8, !tbaa !15
  %131 = load ptr, ptr %3, align 8, !tbaa !5
  %132 = getelementptr inbounds %struct.Dstu7564Ctx_st, ptr %131, i32 0, i32 9
  %133 = load ptr, ptr %132, align 8, !tbaa !17
  %134 = getelementptr inbounds %struct.Dstu7564Hmac, ptr %133, i32 0, i32 2
  %135 = load i64, ptr %134, align 8, !tbaa !18
  %136 = add i64 %130, %135
  %137 = load ptr, ptr %3, align 8, !tbaa !5
  %138 = getelementptr inbounds %struct.Dstu7564Ctx_st, ptr %137, i32 0, i32 2
  %139 = getelementptr inbounds [2 x i64], ptr %138, i64 0, i64 0
  %140 = load i64, ptr %139, align 8, !tbaa !16
  %141 = add i64 %140, %136
  store i64 %141, ptr %139, align 8, !tbaa !16
  %142 = load ptr, ptr %3, align 8, !tbaa !5
  %143 = getelementptr inbounds %struct.Dstu7564Ctx_st, ptr %142, i32 0, i32 2
  %144 = getelementptr inbounds [2 x i64], ptr %143, i64 0, i64 0
  %145 = load i64, ptr %144, align 8, !tbaa !16
  %146 = load ptr, ptr %3, align 8, !tbaa !5
  %147 = getelementptr inbounds %struct.Dstu7564Ctx_st, ptr %146, i32 0, i32 4
  %148 = load i64, ptr %147, align 8, !tbaa !15
  %149 = load ptr, ptr %3, align 8, !tbaa !5
  %150 = getelementptr inbounds %struct.Dstu7564Ctx_st, ptr %149, i32 0, i32 9
  %151 = load ptr, ptr %150, align 8, !tbaa !17
  %152 = getelementptr inbounds %struct.Dstu7564Hmac, ptr %151, i32 0, i32 2
  %153 = load i64, ptr %152, align 8, !tbaa !18
  %154 = add i64 %148, %153
  %155 = icmp ult i64 %145, %154
  br i1 %155, label %156, label %162

156:                                              ; preds = %119
  %157 = load ptr, ptr %3, align 8, !tbaa !5
  %158 = getelementptr inbounds %struct.Dstu7564Ctx_st, ptr %157, i32 0, i32 2
  %159 = getelementptr inbounds [2 x i64], ptr %158, i64 0, i64 1
  %160 = load i64, ptr %159, align 8, !tbaa !16
  %161 = add i64 %160, 1
  store i64 %161, ptr %159, align 8, !tbaa !16
  br label %162

162:                                              ; preds = %156, %119
  %163 = load ptr, ptr %3, align 8, !tbaa !5
  %164 = getelementptr inbounds %struct.Dstu7564Ctx_st, ptr %163, i32 0, i32 0
  %165 = getelementptr inbounds [256 x i8], ptr %164, i64 0, i64 0
  %166 = load ptr, ptr %3, align 8, !tbaa !5
  %167 = getelementptr inbounds %struct.Dstu7564Ctx_st, ptr %166, i32 0, i32 9
  %168 = load ptr, ptr %167, align 8, !tbaa !17
  %169 = getelementptr inbounds %struct.Dstu7564Hmac, ptr %168, i32 0, i32 1
  %170 = getelementptr inbounds [128 x i8], ptr %169, i64 0, i64 0
  %171 = load ptr, ptr %3, align 8, !tbaa !5
  %172 = getelementptr inbounds %struct.Dstu7564Ctx_st, ptr %171, i32 0, i32 9
  %173 = load ptr, ptr %172, align 8, !tbaa !17
  %174 = getelementptr inbounds %struct.Dstu7564Hmac, ptr %173, i32 0, i32 2
  %175 = load i64, ptr %174, align 8, !tbaa !18
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %165, ptr align 8 %170, i64 %175, i1 false)
  %176 = load ptr, ptr %3, align 8, !tbaa !5
  %177 = getelementptr inbounds %struct.Dstu7564Ctx_st, ptr %176, i32 0, i32 0
  %178 = getelementptr inbounds [256 x i8], ptr %177, i64 0, i64 0
  %179 = load ptr, ptr %3, align 8, !tbaa !5
  %180 = getelementptr inbounds %struct.Dstu7564Ctx_st, ptr %179, i32 0, i32 9
  %181 = load ptr, ptr %180, align 8, !tbaa !17
  %182 = getelementptr inbounds %struct.Dstu7564Hmac, ptr %181, i32 0, i32 2
  %183 = load i64, ptr %182, align 8, !tbaa !18
  %184 = load ptr, ptr %3, align 8, !tbaa !5
  %185 = getelementptr inbounds %struct.Dstu7564Ctx_st, ptr %184, i32 0, i32 2
  %186 = getelementptr inbounds [2 x i64], ptr %185, i64 0, i64 0
  %187 = load ptr, ptr %3, align 8, !tbaa !5
  %188 = getelementptr inbounds %struct.Dstu7564Ctx_st, ptr %187, i32 0, i32 4
  %189 = load i64, ptr %188, align 8, !tbaa !15
  call void @padding(ptr noundef %178, i64 noundef %183, ptr noundef %186, i64 noundef %189)
  %190 = load ptr, ptr %3, align 8, !tbaa !5
  %191 = load ptr, ptr %3, align 8, !tbaa !5
  %192 = getelementptr inbounds %struct.Dstu7564Ctx_st, ptr %191, i32 0, i32 0
  %193 = getelementptr inbounds [256 x i8], ptr %192, i64 0, i64 0
  call void @digest(ptr noundef %190, ptr noundef %193)
  br label %194

194:                                              ; preds = %162
  %195 = load ptr, ptr %3, align 8, !tbaa !5
  %196 = load ptr, ptr %4, align 8, !tbaa !5
  %197 = call i32 @output_transformation(ptr noundef %195, ptr noundef %196)
  store i32 %197, ptr %5, align 4, !tbaa !9
  %198 = load i32, ptr %5, align 4, !tbaa !9
  %199 = icmp ne i32 %198, 0
  br i1 %199, label %200, label %202

200:                                              ; preds = %194
  %201 = load i32, ptr %5, align 4, !tbaa !9
  call void @stacktrace_add(ptr noundef @.str, i64 noundef 835, i32 noundef %201)
  br label %211

202:                                              ; preds = %194
  br label %203

203:                                              ; preds = %202
  br label %204

204:                                              ; preds = %203
  %205 = load ptr, ptr %3, align 8, !tbaa !5
  %206 = load ptr, ptr %3, align 8, !tbaa !5
  %207 = getelementptr inbounds %struct.Dstu7564Ctx_st, ptr %206, i32 0, i32 9
  %208 = load ptr, ptr %207, align 8, !tbaa !17
  %209 = getelementptr inbounds %struct.Dstu7564Hmac, ptr %208, i32 0, i32 0
  %210 = getelementptr inbounds [128 x i8], ptr %209, i64 0, i64 0
  call void @digest(ptr noundef %205, ptr noundef %210)
  br label %211

211:                                              ; preds = %204, %200, %27, %17, %9
  %212 = load i32, ptr %5, align 4, !tbaa !9
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #6
  ret i32 %212
}

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { "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 nounwind willreturn memory(argmem: readwrite) }
attributes #3 = { nocallback nofree nounwind willreturn memory(argmem: write) }
attributes #4 = { 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 #5 = { 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 }

!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, !13, i64 432}
!12 = !{!"Dstu7564Ctx_st", !7, i64 0, !13, i64 256, !7, i64 264, !7, i64 280, !13, i64 408, !13, i64 416, !13, i64 424, !13, i64 432, !13, i64 440, !6, i64 448}
!13 = !{!"long", !7, i64 0}
!14 = !{!12, !13, i64 256}
!15 = !{!12, !13, i64 408}
!16 = !{!13, !13, i64 0}
!17 = !{!12, !6, i64 448}
!18 = !{!19, !13, i64 256}
!19 = !{!"", !7, i64 0, !7, i64 128, !13, i64 256}


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

@.str = external hidden unnamed_addr constant [18 x i8], align 1

declare void @stacktrace_create(ptr noundef, i64 noundef, i32 noundef, ptr noundef) local_unnamed_addr #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 nounwind willreturn memory(argmem: write)
declare void @llvm.memset.p0.i64(ptr nocapture writeonly, i8, i64, i1 immarg) #2

; Function Attrs: inlinehint nounwind uwtable
declare hidden void @digest(ptr noundef, ptr noundef) local_unnamed_addr #3

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

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

declare void @stacktrace_add(ptr noundef, i64 noundef, i32 noundef) local_unnamed_addr #0

; Function Attrs: nounwind uwtable
define dso_local i32 @dstu7564_final_kmac(ptr noundef %0, ptr noundef %1) local_unnamed_addr #4 {
  %.not = icmp eq ptr %0, null
  br i1 %.not, label %3, label %4

3:                                                ; preds = %2
  tail call void @stacktrace_create(ptr noundef nonnull @.str, i64 noundef 793, i32 noundef 2, ptr noundef null) #5
  br label %68

4:                                                ; preds = %2
  %.not57 = icmp eq ptr %1, null
  br i1 %.not57, label %5, label %6

5:                                                ; preds = %4
  tail call void @stacktrace_create(ptr noundef nonnull @.str, i64 noundef 794, i32 noundef 2, ptr noundef null) #5
  br label %68

6:                                                ; preds = %4
  %7 = getelementptr inbounds i8, ptr %0, i64 432
  %8 = load i64, ptr %7, align 8, !tbaa !5
  %9 = icmp eq i64 %8, 0
  br i1 %9, label %10, label %11

10:                                               ; preds = %6
  tail call void @stacktrace_create(ptr noundef nonnull @.str, i64 noundef 796, i32 noundef 4, ptr noundef null) #5
  br label %68

11:                                               ; preds = %6
  %12 = getelementptr inbounds i8, ptr %0, i64 256
  %13 = load i64, ptr %12, align 8, !tbaa !11
  %14 = getelementptr inbounds i8, ptr %0, i64 264
  %15 = getelementptr inbounds i8, ptr %0, i64 408
  %16 = load i64, ptr %15, align 8, !tbaa !12
  tail call void @padding(ptr noundef nonnull %0, i64 noundef %13, ptr noundef nonnull %14, i64 noundef %16)
  tail call void @digest(ptr noundef nonnull %0, ptr noundef nonnull %0)
  %17 = load i64, ptr %15, align 8, !tbaa !12
  %18 = load i64, ptr %12, align 8, !tbaa !11
  %19 = sub i64 %17, %18
  %20 = load i64, ptr %14, align 8, !tbaa !13
  %21 = add i64 %20, %19
  store i64 %21, ptr %14, align 8, !tbaa !13
  %22 = icmp ult i64 %21, %19
  br i1 %22, label %23, label %27

23:                                               ; preds = %11
  %24 = getelementptr inbounds i8, ptr %0, i64 272
  %25 = load i64, ptr %24, align 8, !tbaa !13
  %26 = add i64 %25, 1
  store i64 %26, ptr %24, align 8, !tbaa !13
  br label %27

27:                                               ; preds = %23, %11
  %28 = add i64 %17, -13
  %29 = icmp ugt i64 %18, %28
  br i1 %29, label %30, label %40

30:                                               ; preds = %27
  %31 = getelementptr inbounds i8, ptr %0, i64 %17
  tail call void @digest(ptr noundef nonnull %0, ptr noundef nonnull %31)
  %32 = load i64, ptr %15, align 8, !tbaa !12
  %33 = load i64, ptr %14, align 8, !tbaa !13
  %34 = add i64 %33, %32
  store i64 %34, ptr %14, align 8, !tbaa !13
  %35 = icmp ult i64 %34, %32
  br i1 %35, label %36, label %40

36:                                               ; preds = %30
  %37 = getelementptr inbounds i8, ptr %0, i64 272
  %38 = load i64, ptr %37, align 8, !tbaa !13
  %39 = add i64 %38, 1
  store i64 %39, ptr %37, align 8, !tbaa !13
  br label %40

40:                                               ; preds = %30, %36, %27
  %41 = phi i64 [ %32, %30 ], [ %32, %36 ], [ %17, %27 ]
  tail call void @llvm.memset.p0.i64(ptr nonnull align 8 %0, i8 0, i64 %41, i1 false)
  store i64 0, ptr %12, align 8, !tbaa !11
  %42 = load i64, ptr %15, align 8, !tbaa !12
  %43 = getelementptr inbounds i8, ptr %0, i64 448
  %44 = load ptr, ptr %43, align 8, !tbaa !14
  %45 = getelementptr inbounds i8, ptr %44, i64 256
  %46 = load i64, ptr %45, align 8, !tbaa !15
  %47 = add i64 %46, %42
  %48 = load i64, ptr %14, align 8, !tbaa !13
  %49 = add i64 %47, %48
  store i64 %49, ptr %14, align 8, !tbaa !13
  %50 = load i64, ptr %45, align 8, !tbaa !15
  %51 = add i64 %50, %42
  %52 = icmp ult i64 %49, %51
  br i1 %52, label %53, label %57

53:                                               ; preds = %40
  %54 = getelementptr inbounds i8, ptr %0, i64 272
  %55 = load i64, ptr %54, align 8, !tbaa !13
  %56 = add i64 %55, 1
  store i64 %56, ptr %54, align 8, !tbaa !13
  %.pre = load i64, ptr %45, align 8, !tbaa !15
  br label %57

57:                                               ; preds = %53, %40
  %58 = phi i64 [ %.pre, %53 ], [ %50, %40 ]
  %59 = getelementptr inbounds i8, ptr %44, i64 128
  tail call void @llvm.memcpy.p0.p0.i64(ptr nonnull align 8 %0, ptr nonnull align 8 %59, i64 %58, i1 false)
  %60 = load ptr, ptr %43, align 8, !tbaa !14
  %61 = getelementptr inbounds i8, ptr %60, i64 256
  %62 = load i64, ptr %61, align 8, !tbaa !15
  %63 = load i64, ptr %15, align 8, !tbaa !12
  tail call void @padding(ptr noundef nonnull %0, i64 noundef %62, ptr noundef nonnull %14, i64 noundef %63)
  tail call void @digest(ptr noundef nonnull %0, ptr noundef nonnull %0)
  %64 = tail call i32 @output_transformation(ptr noundef nonnull %0, ptr noundef nonnull %1)
  %.not58 = icmp eq i32 %64, 0
  br i1 %.not58, label %66, label %65

65:                                               ; preds = %57
  tail call void @stacktrace_add(ptr noundef nonnull @.str, i64 noundef 835, i32 noundef %64) #5
  br label %68

66:                                               ; preds = %57
  %67 = load ptr, ptr %43, align 8, !tbaa !14
  tail call void @digest(ptr noundef nonnull %0, ptr noundef %67)
  br label %68

68:                                               ; preds = %66, %65, %10, %5, %3
  %.0 = phi i32 [ 4, %10 ], [ %64, %65 ], [ 0, %66 ], [ 2, %5 ], [ 2, %3 ]
  ret i32 %.0
}

attributes #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 nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: write) }
attributes #3 = { 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 #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, !9, i64 432}
!6 = !{!"Dstu7564Ctx_st", !7, i64 0, !9, i64 256, !7, i64 264, !7, i64 280, !9, i64 408, !9, i64 416, !9, i64 424, !9, i64 432, !9, i64 440, !10, i64 448}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
!9 = !{!"long", !7, i64 0}
!10 = !{!"any pointer", !7, i64 0}
!11 = !{!6, !9, i64 256}
!12 = !{!6, !9, i64 408}
!13 = !{!9, !9, i64 0}
!14 = !{!6, !10, i64 448}
!15 = !{!16, !9, i64 256}
!16 = !{!"", !7, i64 0, !7, i64 128, !9, i64 256}


; Effective O3 passes: CorrelatedValuePropagationPass,EarlyCSEPass,GVNPass,GlobalOptPass,IPSCCPPass,InferFunctionAttrsPass,InstCombinePass,ReassociatePass,SROAPass,SimplifyCFGPass,TailCallElimPass