; LLVM IR from microsoft/PQCrypto-SIDH :: tests (PQCtestKAT_kem434)

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

@.str = external hidden unnamed_addr constant [21 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [29 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [7 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [9 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [9 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.7 = external hidden unnamed_addr constant [8 x i8], align 1
@.str.8 = external hidden unnamed_addr constant [40 x i8], align 1
@.str.9 = external hidden unnamed_addr constant [34 x i8], align 1
@.str.10 = external hidden unnamed_addr constant [6 x i8], align 1
@.str.11 = external hidden unnamed_addr constant [38 x i8], align 1
@.str.12 = external hidden unnamed_addr constant [6 x i8], align 1
@.str.13 = external hidden unnamed_addr constant [38 x i8], align 1
@.str.14 = external hidden unnamed_addr constant [34 x i8], align 1
@.str.15 = external hidden unnamed_addr constant [34 x i8], align 1
@.str.16 = external hidden unnamed_addr constant [30 x i8], align 1
@.str.17 = external hidden unnamed_addr constant [6 x i8], align 1
@.str.18 = external hidden unnamed_addr constant [6 x i8], align 1
@.str.19 = external hidden unnamed_addr constant [34 x i8], align 1
@.str.20 = external hidden unnamed_addr constant [34 x i8], align 1
@.str.21 = external hidden unnamed_addr constant [30 x i8], align 1
@.str.22 = external hidden unnamed_addr constant [40 x i8], align 1
@.str.23 = external hidden unnamed_addr constant [29 x i8], align 1
@.str.24 = external hidden unnamed_addr constant [3 x i8], align 1

; Function Attrs: nounwind uwtable
define dso_local i32 @main() #0 {
  %1 = alloca i32, align 4
  %2 = alloca [32 x i8], align 16
  %3 = alloca ptr, align 8
  %4 = alloca [48 x i8], align 16
  %5 = alloca [346 x i8], align 16
  %6 = alloca [16 x i8], align 16
  %7 = alloca [16 x i8], align 16
  %8 = alloca [346 x i8], align 16
  %9 = alloca [16 x i8], align 16
  %10 = alloca i32, align 4
  %11 = alloca i32, align 4
  %12 = alloca [330 x i8], align 16
  %13 = alloca [374 x i8], align 16
  %14 = alloca [330 x i8], align 16
  %15 = alloca [374 x i8], align 16
  %16 = alloca i32, align 4
  %17 = alloca i32, align 4
  store i32 0, ptr %1, align 4
  call void @llvm.lifetime.start.p0(i64 32, ptr %2) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %3) #5
  call void @llvm.lifetime.start.p0(i64 48, ptr %4) #5
  call void @llvm.lifetime.start.p0(i64 346, ptr %5) #5
  call void @llvm.lifetime.start.p0(i64 16, ptr %6) #5
  call void @llvm.lifetime.start.p0(i64 16, ptr %7) #5
  call void @llvm.lifetime.start.p0(i64 346, ptr %8) #5
  call void @llvm.lifetime.start.p0(i64 16, ptr %9) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #5
  call void @llvm.lifetime.start.p0(i64 330, ptr %12) #5
  call void @llvm.lifetime.start.p0(i64 374, ptr %13) #5
  call void @llvm.lifetime.start.p0(i64 330, ptr %14) #5
  call void @llvm.lifetime.start.p0(i64 374, ptr %15) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr %16) #5
  %18 = getelementptr inbounds [32 x i8], ptr %2, i64 0, i64 0
  %19 = call i32 (ptr, ptr, ...) @sprintf(ptr noundef %18, ptr noundef @.str, i32 noundef 374) #5
  %20 = getelementptr inbounds [32 x i8], ptr %2, i64 0, i64 0
  %21 = call noalias ptr @fopen(ptr noundef %20, ptr noundef @.str.1)
  store ptr %21, ptr %3, align 8, !tbaa !5
  %22 = icmp eq ptr %21, null
  br i1 %22, label %23, label %26

23:                                               ; preds = %0
  %24 = getelementptr inbounds [32 x i8], ptr %2, i64 0, i64 0
  %25 = call i32 (ptr, ...) @printf(ptr noundef @.str.2, ptr noundef %24)
  store i32 -1, ptr %1, align 4
  store i32 1, ptr %17, align 4
  br label %155

26:                                               ; preds = %0
  %27 = call i32 (ptr, ...) @printf(ptr noundef @.str.3, ptr noundef @.str.4)
  store i32 0, ptr %11, align 4, !tbaa !9
  br label %28

28:                                               ; preds = %146, %26
  %29 = load ptr, ptr %3, align 8, !tbaa !5
  %30 = call i32 @FindMarker(ptr noundef %29, ptr noundef @.str.5)
  %31 = icmp ne i32 %30, 0
  br i1 %31, label %32, label %38

32:                                               ; preds = %28
  %33 = load ptr, ptr %3, align 8, !tbaa !5
  %34 = call i32 (ptr, ptr, ...) @__isoc99_fscanf(ptr noundef %33, ptr noundef @.str.6, ptr noundef %10)
  %35 = icmp ne i32 %34, 1
  br i1 %35, label %36, label %37

36:                                               ; preds = %32
  store i32 1, ptr %11, align 4, !tbaa !9
  br label %150

37:                                               ; preds = %32
  br label %39

38:                                               ; preds = %28
  store i32 1, ptr %11, align 4, !tbaa !9
  br label %150

39:                                               ; preds = %37
  %40 = load ptr, ptr %3, align 8, !tbaa !5
  %41 = getelementptr inbounds [48 x i8], ptr %4, i64 0, i64 0
  %42 = call i32 @ReadHex(ptr noundef %40, ptr noundef %41, i32 noundef 48, ptr noundef @.str.7)
  %43 = icmp ne i32 %42, 0
  br i1 %43, label %47, label %44

44:                                               ; preds = %39
  %45 = getelementptr inbounds [32 x i8], ptr %2, i64 0, i64 0
  %46 = call i32 (ptr, ...) @printf(ptr noundef @.str.8, ptr noundef %45)
  store i32 -3, ptr %1, align 4
  store i32 1, ptr %17, align 4
  br label %155

47:                                               ; preds = %39
  %48 = getelementptr inbounds [48 x i8], ptr %4, i64 0, i64 0
  call void @randombytes_init(ptr noundef %48, ptr noundef null, i32 noundef 256)
  %49 = getelementptr inbounds [330 x i8], ptr %12, i64 0, i64 0
  %50 = getelementptr inbounds [374 x i8], ptr %13, i64 0, i64 0
  %51 = call i32 @crypto_kem_keypair_SIKEp434(ptr noundef %49, ptr noundef %50)
  store i32 %51, ptr %16, align 4, !tbaa !9
  %52 = icmp ne i32 %51, 0
  br i1 %52, label %53, label %56

53:                                               ; preds = %47
  %54 = load i32, ptr %16, align 4, !tbaa !9
  %55 = call i32 (ptr, ...) @printf(ptr noundef @.str.9, i32 noundef %54)
  store i32 -4, ptr %1, align 4
  store i32 1, ptr %17, align 4
  br label %155

56:                                               ; preds = %47
  %57 = load ptr, ptr %3, align 8, !tbaa !5
  %58 = getelementptr inbounds [330 x i8], ptr %14, i64 0, i64 0
  %59 = call i32 @ReadHex(ptr noundef %57, ptr noundef %58, i32 noundef 330, ptr noundef @.str.10)
  %60 = icmp ne i32 %59, 0
  br i1 %60, label %64, label %61

61:                                               ; preds = %56
  %62 = getelementptr inbounds [32 x i8], ptr %2, i64 0, i64 0
  %63 = call i32 (ptr, ...) @printf(ptr noundef @.str.11, ptr noundef %62)
  store i32 -3, ptr %1, align 4
  store i32 1, ptr %17, align 4
  br label %155

64:                                               ; preds = %56
  %65 = load ptr, ptr %3, align 8, !tbaa !5
  %66 = getelementptr inbounds [374 x i8], ptr %15, i64 0, i64 0
  %67 = call i32 @ReadHex(ptr noundef %65, ptr noundef %66, i32 noundef 374, ptr noundef @.str.12)
  %68 = icmp ne i32 %67, 0
  br i1 %68, label %72, label %69

69:                                               ; preds = %64
  %70 = getelementptr inbounds [32 x i8], ptr %2, i64 0, i64 0
  %71 = call i32 (ptr, ...) @printf(ptr noundef @.str.13, ptr noundef %70)
  store i32 -3, ptr %1, align 4
  store i32 1, ptr %17, align 4
  br label %155

72:                                               ; preds = %64
  %73 = getelementptr inbounds [330 x i8], ptr %12, i64 0, i64 0
  %74 = getelementptr inbounds [330 x i8], ptr %14, i64 0, i64 0
  %75 = call i32 @memcmp(ptr noundef %73, ptr noundef %74, i64 noundef 330) #6
  %76 = icmp ne i32 %75, 0
  br i1 %76, label %77, label %80

77:                                               ; preds = %72
  %78 = getelementptr inbounds [32 x i8], ptr %2, i64 0, i64 0
  %79 = call i32 (ptr, ...) @printf(ptr noundef @.str.14, ptr noundef %78)
  store i32 -2, ptr %1, align 4
  store i32 1, ptr %17, align 4
  br label %155

80:                                               ; preds = %72
  %81 = getelementptr inbounds [374 x i8], ptr %13, i64 0, i64 0
  %82 = getelementptr inbounds [374 x i8], ptr %15, i64 0, i64 0
  %83 = call i32 @memcmp(ptr noundef %81, ptr noundef %82, i64 noundef 374) #6
  %84 = icmp ne i32 %83, 0
  br i1 %84, label %85, label %88

85:                                               ; preds = %80
  %86 = getelementptr inbounds [32 x i8], ptr %2, i64 0, i64 0
  %87 = call i32 (ptr, ...) @printf(ptr noundef @.str.15, ptr noundef %86)
  store i32 -2, ptr %1, align 4
  store i32 1, ptr %17, align 4
  br label %155

88:                                               ; preds = %80
  %89 = getelementptr inbounds [346 x i8], ptr %5, i64 0, i64 0
  %90 = getelementptr inbounds [16 x i8], ptr %6, i64 0, i64 0
  %91 = getelementptr inbounds [330 x i8], ptr %12, i64 0, i64 0
  %92 = call i32 @crypto_kem_enc_SIKEp434(ptr noundef %89, ptr noundef %90, ptr noundef %91)
  store i32 %92, ptr %16, align 4, !tbaa !9
  %93 = icmp ne i32 %92, 0
  br i1 %93, label %94, label %97

94:                                               ; preds = %88
  %95 = load i32, ptr %16, align 4, !tbaa !9
  %96 = call i32 (ptr, ...) @printf(ptr noundef @.str.16, i32 noundef %95)
  store i32 -4, ptr %1, align 4
  store i32 1, ptr %17, align 4
  br label %155

97:                                               ; preds = %88
  %98 = load ptr, ptr %3, align 8, !tbaa !5
  %99 = getelementptr inbounds [346 x i8], ptr %8, i64 0, i64 0
  %100 = call i32 @ReadHex(ptr noundef %98, ptr noundef %99, i32 noundef 346, ptr noundef @.str.17)
  %101 = icmp ne i32 %100, 0
  br i1 %101, label %105, label %102

102:                                              ; preds = %97
  %103 = getelementptr inbounds [32 x i8], ptr %2, i64 0, i64 0
  %104 = call i32 (ptr, ...) @printf(ptr noundef @.str.11, ptr noundef %103)
  store i32 -3, ptr %1, align 4
  store i32 1, ptr %17, align 4
  br label %155

105:                                              ; preds = %97
  %106 = load ptr, ptr %3, align 8, !tbaa !5
  %107 = getelementptr inbounds [16 x i8], ptr %9, i64 0, i64 0
  %108 = call i32 @ReadHex(ptr noundef %106, ptr noundef %107, i32 noundef 16, ptr noundef @.str.18)
  %109 = icmp ne i32 %108, 0
  br i1 %109, label %113, label %110

110:                                              ; preds = %105
  %111 = getelementptr inbounds [32 x i8], ptr %2, i64 0, i64 0
  %112 = call i32 (ptr, ...) @printf(ptr noundef @.str.13, ptr noundef %111)
  store i32 -3, ptr %1, align 4
  store i32 1, ptr %17, align 4
  br label %155

113:                                              ; preds = %105
  %114 = getelementptr inbounds [346 x i8], ptr %5, i64 0, i64 0
  %115 = getelementptr inbounds [346 x i8], ptr %8, i64 0, i64 0
  %116 = call i32 @memcmp(ptr noundef %114, ptr noundef %115, i64 noundef 346) #6
  %117 = icmp ne i32 %116, 0
  br i1 %117, label %118, label %121

118:                                              ; preds = %113
  %119 = getelementptr inbounds [32 x i8], ptr %2, i64 0, i64 0
  %120 = call i32 (ptr, ...) @printf(ptr noundef @.str.19, ptr noundef %119)
  store i32 -2, ptr %1, align 4
  store i32 1, ptr %17, align 4
  br label %155

121:                                              ; preds = %113
  %122 = getelementptr inbounds [16 x i8], ptr %6, i64 0, i64 0
  %123 = getelementptr inbounds [16 x i8], ptr %9, i64 0, i64 0
  %124 = call i32 @memcmp(ptr noundef %122, ptr noundef %123, i64 noundef 16) #6
  %125 = icmp ne i32 %124, 0
  br i1 %125, label %126, label %129

126:                                              ; preds = %121
  %127 = getelementptr inbounds [32 x i8], ptr %2, i64 0, i64 0
  %128 = call i32 (ptr, ...) @printf(ptr noundef @.str.20, ptr noundef %127)
  store i32 -2, ptr %1, align 4
  store i32 1, ptr %17, align 4
  br label %155

129:                                              ; preds = %121
  %130 = getelementptr inbounds [16 x i8], ptr %7, i64 0, i64 0
  %131 = getelementptr inbounds [346 x i8], ptr %5, i64 0, i64 0
  %132 = getelementptr inbounds [374 x i8], ptr %13, i64 0, i64 0
  %133 = call i32 @crypto_kem_dec_SIKEp434(ptr noundef %130, ptr noundef %131, ptr noundef %132)
  store i32 %133, ptr %16, align 4, !tbaa !9
  %134 = icmp ne i32 %133, 0
  br i1 %134, label %135, label %138

135:                                              ; preds = %129
  %136 = load i32, ptr %16, align 4, !tbaa !9
  %137 = call i32 (ptr, ...) @printf(ptr noundef @.str.21, i32 noundef %136)
  store i32 -4, ptr %1, align 4
  store i32 1, ptr %17, align 4
  br label %155

138:                                              ; preds = %129
  %139 = getelementptr inbounds [16 x i8], ptr %6, i64 0, i64 0
  %140 = getelementptr inbounds [16 x i8], ptr %7, i64 0, i64 0
  %141 = call i32 @memcmp(ptr noundef %139, ptr noundef %140, i64 noundef 16) #6
  %142 = icmp ne i32 %141, 0
  br i1 %142, label %143, label %145

143:                                              ; preds = %138
  %144 = call i32 (ptr, ...) @printf(ptr noundef @.str.22)
  store i32 -4, ptr %1, align 4
  store i32 1, ptr %17, align 4
  br label %155

145:                                              ; preds = %138
  br label %146

146:                                              ; preds = %145
  %147 = load i32, ptr %11, align 4, !tbaa !9
  %148 = icmp ne i32 %147, 0
  %149 = xor i1 %148, true
  br i1 %149, label %28, label %150, !llvm.loop !11

150:                                              ; preds = %146, %38, %36
  %151 = load ptr, ptr %3, align 8, !tbaa !5
  %152 = call i32 @fclose(ptr noundef %151)
  %153 = call i32 (ptr, ...) @printf(ptr noundef @.str.23)
  %154 = call i32 (ptr, ...) @printf(ptr noundef @.str.24)
  store i32 0, ptr %1, align 4
  store i32 1, ptr %17, align 4
  br label %155

155:                                              ; preds = %150, %143, %135, %126, %118, %110, %102, %94, %85, %77, %69, %61, %53, %44, %23
  call void @llvm.lifetime.end.p0(i64 4, ptr %16) #5
  call void @llvm.lifetime.end.p0(i64 374, ptr %15) #5
  call void @llvm.lifetime.end.p0(i64 330, ptr %14) #5
  call void @llvm.lifetime.end.p0(i64 374, ptr %13) #5
  call void @llvm.lifetime.end.p0(i64 330, ptr %12) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #5
  call void @llvm.lifetime.end.p0(i64 16, ptr %9) #5
  call void @llvm.lifetime.end.p0(i64 346, ptr %8) #5
  call void @llvm.lifetime.end.p0(i64 16, ptr %7) #5
  call void @llvm.lifetime.end.p0(i64 16, ptr %6) #5
  call void @llvm.lifetime.end.p0(i64 346, ptr %5) #5
  call void @llvm.lifetime.end.p0(i64 48, ptr %4) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %3) #5
  call void @llvm.lifetime.end.p0(i64 32, ptr %2) #5
  %156 = load i32, ptr %1, align 4
  ret i32 %156
}

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

; Function Attrs: nounwind
declare i32 @sprintf(ptr noundef, ptr noundef, ...) #2

declare noalias ptr @fopen(ptr noundef, ptr noundef) #3

declare i32 @printf(ptr noundef, ...) #3

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

declare i32 @__isoc99_fscanf(ptr noundef, ptr noundef, ...) #3

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

declare void @randombytes_init(ptr noundef, ptr noundef, i32 noundef) #3

declare i32 @crypto_kem_keypair_SIKEp434(ptr noundef, ptr noundef) #3

; Function Attrs: nounwind willreturn memory(read)
declare i32 @memcmp(ptr noundef, ptr noundef, i64 noundef) #4

declare i32 @crypto_kem_enc_SIKEp434(ptr noundef, ptr noundef, ptr noundef) #3

declare i32 @crypto_kem_dec_SIKEp434(ptr noundef, ptr noundef, ptr noundef) #3

declare i32 @fclose(ptr noundef) #3

; 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 "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { nounwind willreturn memory(read) "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #5 = { nounwind }
attributes #6 = { nounwind willreturn memory(read) }

!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 = distinct !{!11, !12}
!12 = !{!"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"

@.str = external hidden unnamed_addr constant [21 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [29 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [7 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [9 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [9 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.7 = external hidden unnamed_addr constant [8 x i8], align 1
@.str.8 = external hidden unnamed_addr constant [40 x i8], align 1
@.str.9 = external hidden unnamed_addr constant [34 x i8], align 1
@.str.10 = external hidden unnamed_addr constant [6 x i8], align 1
@.str.11 = external hidden unnamed_addr constant [38 x i8], align 1
@.str.12 = external hidden unnamed_addr constant [6 x i8], align 1
@.str.13 = external hidden unnamed_addr constant [38 x i8], align 1
@.str.14 = external hidden unnamed_addr constant [34 x i8], align 1
@.str.15 = external hidden unnamed_addr constant [34 x i8], align 1
@.str.16 = external hidden unnamed_addr constant [30 x i8], align 1
@.str.17 = external hidden unnamed_addr constant [6 x i8], align 1
@.str.18 = external hidden unnamed_addr constant [6 x i8], align 1
@.str.19 = external hidden unnamed_addr constant [34 x i8], align 1
@.str.20 = external hidden unnamed_addr constant [34 x i8], align 1
@.str.21 = external hidden unnamed_addr constant [30 x i8], align 1
@.str.22 = external hidden unnamed_addr constant [40 x i8], align 1
@.str.23 = external hidden unnamed_addr constant [29 x i8], align 1
@.str.24 = external hidden unnamed_addr constant [3 x i8], align 1

; Function Attrs: nounwind uwtable
define dso_local range(i32 -4, 1) i32 @main() local_unnamed_addr #0 {
  %1 = alloca [32 x i8], align 16
  %2 = alloca [48 x i8], align 16
  %3 = alloca [346 x i8], align 16
  %4 = alloca [16 x i8], align 16
  %5 = alloca [16 x i8], align 16
  %6 = alloca [346 x i8], align 16
  %7 = alloca [16 x i8], align 16
  %8 = alloca i32, align 4
  %9 = alloca [330 x i8], align 16
  %10 = alloca [374 x i8], align 16
  %11 = alloca [330 x i8], align 16
  %12 = alloca [374 x i8], align 16
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %1) #5
  call void @llvm.lifetime.start.p0(i64 48, ptr nonnull %2) #5
  call void @llvm.lifetime.start.p0(i64 346, ptr nonnull %3) #5
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %4) #5
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %5) #5
  call void @llvm.lifetime.start.p0(i64 346, ptr nonnull %6) #5
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %7) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %8) #5
  call void @llvm.lifetime.start.p0(i64 330, ptr nonnull %9) #5
  call void @llvm.lifetime.start.p0(i64 374, ptr nonnull %10) #5
  call void @llvm.lifetime.start.p0(i64 330, ptr nonnull %11) #5
  call void @llvm.lifetime.start.p0(i64 374, ptr nonnull %12) #5
  %13 = call i32 (ptr, ptr, ...) @sprintf(ptr noundef nonnull dereferenceable(1) %1, ptr noundef nonnull dereferenceable(1) @.str, i32 noundef 374) #5
  %14 = call noalias ptr @fopen(ptr noundef nonnull %1, ptr noundef nonnull @.str.1)
  %15 = icmp eq ptr %14, null
  br i1 %15, label %16, label %18

16:                                               ; preds = %0
  %17 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, ptr noundef nonnull %1)
  br label %75

18:                                               ; preds = %0
  %19 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.3, ptr noundef nonnull @.str.4)
  br label %20

20:                                               ; preds = %68, %18
  %21 = call i32 @FindMarker(ptr noundef nonnull %14, ptr noundef nonnull @.str.5)
  %.not = icmp eq i32 %21, 0
  br i1 %.not, label %71, label %22

22:                                               ; preds = %20
  %23 = call i32 (ptr, ptr, ...) @__isoc99_fscanf(ptr noundef nonnull %14, ptr noundef nonnull @.str.6, ptr noundef nonnull %8) #5
  %.not16 = icmp eq i32 %23, 1
  br i1 %.not16, label %24, label %71

24:                                               ; preds = %22
  %25 = call i32 @ReadHex(ptr noundef nonnull %14, ptr noundef nonnull %2, i32 noundef 48, ptr noundef nonnull @.str.7)
  %.not17 = icmp eq i32 %25, 0
  br i1 %.not17, label %26, label %28

26:                                               ; preds = %24
  %27 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.8, ptr noundef nonnull %1)
  br label %75

28:                                               ; preds = %24
  call void @randombytes_init(ptr noundef nonnull %2, ptr noundef null, i32 noundef 256) #5
  %29 = call i32 @crypto_kem_keypair_SIKEp434(ptr noundef nonnull %9, ptr noundef nonnull %10) #5
  %.not18 = icmp eq i32 %29, 0
  br i1 %.not18, label %32, label %30

30:                                               ; preds = %28
  %31 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.9, i32 noundef %29)
  br label %75

32:                                               ; preds = %28
  %33 = call i32 @ReadHex(ptr noundef nonnull %14, ptr noundef nonnull %11, i32 noundef 330, ptr noundef nonnull @.str.10)
  %.not19 = icmp eq i32 %33, 0
  br i1 %.not19, label %34, label %36

34:                                               ; preds = %32
  %35 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.11, ptr noundef nonnull %1)
  br label %75

36:                                               ; preds = %32
  %37 = call i32 @ReadHex(ptr noundef nonnull %14, ptr noundef nonnull %12, i32 noundef 374, ptr noundef nonnull @.str.12)
  %.not20 = icmp eq i32 %37, 0
  br i1 %.not20, label %38, label %40

38:                                               ; preds = %36
  %39 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.13, ptr noundef nonnull %1)
  br label %75

40:                                               ; preds = %36
  %bcmp = call i32 @bcmp(ptr noundef nonnull dereferenceable(330) %9, ptr noundef nonnull dereferenceable(330) %11, i64 330)
  %.not21 = icmp eq i32 %bcmp, 0
  br i1 %.not21, label %43, label %41

41:                                               ; preds = %40
  %42 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.14, ptr noundef nonnull %1)
  br label %75

43:                                               ; preds = %40
  %bcmp22 = call i32 @bcmp(ptr noundef nonnull dereferenceable(374) %10, ptr noundef nonnull dereferenceable(374) %12, i64 374)
  %.not23 = icmp eq i32 %bcmp22, 0
  br i1 %.not23, label %46, label %44

44:                                               ; preds = %43
  %45 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.15, ptr noundef nonnull %1)
  br label %75

46:                                               ; preds = %43
  %47 = call i32 @crypto_kem_enc_SIKEp434(ptr noundef nonnull %3, ptr noundef nonnull %4, ptr noundef nonnull %9) #5
  %.not24 = icmp eq i32 %47, 0
  br i1 %.not24, label %50, label %48

48:                                               ; preds = %46
  %49 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.16, i32 noundef %47)
  br label %75

50:                                               ; preds = %46
  %51 = call i32 @ReadHex(ptr noundef nonnull %14, ptr noundef nonnull %6, i32 noundef 346, ptr noundef nonnull @.str.17)
  %.not25 = icmp eq i32 %51, 0
  br i1 %.not25, label %52, label %54

52:                                               ; preds = %50
  %53 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.11, ptr noundef nonnull %1)
  br label %75

54:                                               ; preds = %50
  %55 = call i32 @ReadHex(ptr noundef nonnull %14, ptr noundef nonnull %7, i32 noundef 16, ptr noundef nonnull @.str.18)
  %.not26 = icmp eq i32 %55, 0
  br i1 %.not26, label %56, label %58

56:                                               ; preds = %54
  %57 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.13, ptr noundef nonnull %1)
  br label %75

58:                                               ; preds = %54
  %bcmp27 = call i32 @bcmp(ptr noundef nonnull dereferenceable(346) %3, ptr noundef nonnull dereferenceable(346) %6, i64 346)
  %.not28 = icmp eq i32 %bcmp27, 0
  br i1 %.not28, label %61, label %59

59:                                               ; preds = %58
  %60 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.19, ptr noundef nonnull %1)
  br label %75

61:                                               ; preds = %58
  %bcmp29 = call i32 @bcmp(ptr noundef nonnull dereferenceable(16) %4, ptr noundef nonnull dereferenceable(16) %7, i64 16)
  %.not30 = icmp eq i32 %bcmp29, 0
  br i1 %.not30, label %64, label %62

62:                                               ; preds = %61
  %63 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.20, ptr noundef nonnull %1)
  br label %75

64:                                               ; preds = %61
  %65 = call i32 @crypto_kem_dec_SIKEp434(ptr noundef nonnull %5, ptr noundef nonnull %3, ptr noundef nonnull %10) #5
  %.not31 = icmp eq i32 %65, 0
  br i1 %.not31, label %68, label %66

66:                                               ; preds = %64
  %67 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.21, i32 noundef %65)
  br label %75

68:                                               ; preds = %64
  %bcmp32 = call i32 @bcmp(ptr noundef nonnull dereferenceable(16) %4, ptr noundef nonnull dereferenceable(16) %5, i64 16)
  %.not33 = icmp eq i32 %bcmp32, 0
  br i1 %.not33, label %20, label %69

69:                                               ; preds = %68
  %70 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.22)
  br label %75

71:                                               ; preds = %20, %22
  %72 = call i32 @fclose(ptr noundef nonnull %14)
  %73 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.23)
  %74 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.24)
  br label %75

75:                                               ; preds = %71, %69, %66, %62, %59, %56, %52, %48, %44, %41, %38, %34, %30, %26, %16
  %.0 = phi i32 [ -1, %16 ], [ 0, %71 ], [ -4, %30 ], [ -2, %41 ], [ -2, %44 ], [ -4, %48 ], [ -2, %59 ], [ -2, %62 ], [ -4, %66 ], [ -4, %69 ], [ -3, %56 ], [ -3, %52 ], [ -3, %38 ], [ -3, %34 ], [ -3, %26 ]
  call void @llvm.lifetime.end.p0(i64 374, ptr nonnull %12) #5
  call void @llvm.lifetime.end.p0(i64 330, ptr nonnull %11) #5
  call void @llvm.lifetime.end.p0(i64 374, ptr nonnull %10) #5
  call void @llvm.lifetime.end.p0(i64 330, ptr nonnull %9) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %8) #5
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %7) #5
  call void @llvm.lifetime.end.p0(i64 346, ptr nonnull %6) #5
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %5) #5
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %4) #5
  call void @llvm.lifetime.end.p0(i64 346, ptr nonnull %3) #5
  call void @llvm.lifetime.end.p0(i64 48, ptr nonnull %2) #5
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %1) #5
  ret i32 %.0
}

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

; Function Attrs: nofree nounwind
declare noundef i32 @sprintf(ptr noalias nocapture noundef writeonly, ptr nocapture noundef readonly, ...) local_unnamed_addr #2

; Function Attrs: nofree nounwind
declare noalias noundef ptr @fopen(ptr nocapture noundef readonly, ptr nocapture noundef readonly) local_unnamed_addr #2

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

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

declare i32 @__isoc99_fscanf(ptr noundef, ptr noundef, ...) local_unnamed_addr #3

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

declare void @randombytes_init(ptr noundef, ptr noundef, i32 noundef) local_unnamed_addr #3

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

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

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

; Function Attrs: nofree nounwind
declare noundef i32 @fclose(ptr nocapture noundef) local_unnamed_addr #2

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

; Function Attrs: nofree nounwind willreturn memory(argmem: read)
declare i32 @bcmp(ptr nocapture, ptr nocapture, i64) local_unnamed_addr #4

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


; Effective O3 passes: EarlyCSEPass,GVNPass,GlobalOptPass,IPSCCPPass,InferFunctionAttrsPass,InstCombinePass,InstSimplifyPass,LCSSAPass,LoopUnrollPass,SROAPass,SimplifyCFGPass,TailCallElimPass