; LLVM IR from LoupVaillant/Monocypher-Utils :: src (hash)

; 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.getopt_ctx = type { i32, ptr, i32, i32 }

@.str.7 = external hidden unnamed_addr constant [379 x i8], align 1
@.str.8 = external hidden unnamed_addr constant [4 x i8], align 1
@.str.9 = external hidden unnamed_addr constant [10 x i8], align 1
@.str.10 = external hidden unnamed_addr constant [12 x i8], align 1
@.str.11 = external hidden unnamed_addr constant [4 x i8], align 1
@.str.12 = external hidden unnamed_addr constant [5 x i8], align 1
@stderr = external global ptr, align 8
@.str.13 = external hidden unnamed_addr constant [21 x i8], align 1
@.str.14 = external hidden unnamed_addr constant [20 x i8], align 1
@.str.15 = external hidden unnamed_addr constant [1 x i8], align 1
@.str.16 = external hidden unnamed_addr constant [32 x i8], align 1
@.str.17 = external hidden unnamed_addr constant [28 x i8], align 1
@.str.18 = external hidden unnamed_addr constant [3 x i8], align 1
@stdin = external global ptr, align 8
@.str.19 = external hidden unnamed_addr constant [47 x i8], align 1
@.str.20 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.21 = external hidden unnamed_addr constant [22 x i8], align 1
@.str.22 = external hidden unnamed_addr constant [23 x i8], align 1

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

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

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

declare void @panic(ptr noundef) #2

; Function Attrs: nounwind uwtable
define dso_local i32 @main(i32 noundef %0, ptr noundef %1) #0 {
  %3 = alloca i32, align 4
  %4 = alloca i32, align 4
  %5 = alloca ptr, align 8
  %6 = alloca i32, align 4
  %7 = alloca i32, align 4
  %8 = alloca [64 x i8], align 16
  %9 = alloca i64, align 8
  %10 = alloca i64, align 8
  %11 = alloca %struct.getopt_ctx, align 8
  %12 = alloca i32, align 4
  %13 = alloca ptr, align 8
  %14 = alloca i32, align 4
  %15 = alloca i32, align 4
  %16 = alloca ptr, align 8
  store i32 0, ptr %3, align 4
  store i32 %0, ptr %4, align 4, !tbaa !5
  store ptr %1, ptr %5, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %6) #4
  store i32 0, ptr %6, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #4
  store i32 0, ptr %7, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 64, ptr %8) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #4
  store i64 0, ptr %9, align 8, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #4
  store i64 64, ptr %10, align 8, !tbaa !11
  call void @set_usage_string(ptr noundef @.str.7)
  call void @llvm.lifetime.start.p0(i64 24, ptr %11) #4
  %17 = load i32, ptr %4, align 4, !tbaa !5
  %18 = load ptr, ptr %5, align 8, !tbaa !9
  call void @getopt_init(ptr noundef %11, i32 noundef %17, ptr noundef %18)
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #4
  br label %19

19:                                               ; preds = %118, %116, %2
  %20 = call i32 @getopt_next(ptr noundef %11)
  store i32 %20, ptr %12, align 4, !tbaa !5
  %21 = icmp ne i32 %20, -1
  br i1 %21, label %22, label %119

22:                                               ; preds = %19
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #4
  %23 = load i32, ptr %12, align 4, !tbaa !5
  %24 = icmp eq i32 %23, 45
  br i1 %24, label %25, label %27

25:                                               ; preds = %22
  %26 = call ptr @getopt_parameter(ptr noundef %11)
  br label %28

27:                                               ; preds = %22
  br label %28

28:                                               ; preds = %27, %25
  %29 = phi ptr [ %26, %25 ], [ null, %27 ]
  store ptr %29, ptr %13, align 8, !tbaa !9
  %30 = load i32, ptr %12, align 4, !tbaa !5
  %31 = icmp eq i32 %30, 116
  br i1 %31, label %39, label %32

32:                                               ; preds = %28
  %33 = load i32, ptr %12, align 4, !tbaa !5
  %34 = icmp eq i32 %33, 45
  br i1 %34, label %35, label %43

35:                                               ; preds = %32
  %36 = load ptr, ptr %13, align 8, !tbaa !9
  %37 = call i32 @string_equal(ptr noundef %36, ptr noundef @.str.8)
  %38 = icmp ne i32 %37, 0
  br i1 %38, label %39, label %43

39:                                               ; preds = %35, %28
  br label %40

40:                                               ; preds = %39
  br label %41

41:                                               ; preds = %40
  br label %42

42:                                               ; preds = %41
  store i32 1, ptr %7, align 4, !tbaa !5
  store i32 2, ptr %14, align 4
  br label %116, !llvm.loop !13

43:                                               ; preds = %35, %32
  %44 = load i32, ptr %12, align 4, !tbaa !5
  %45 = icmp eq i32 %44, 97
  br i1 %45, label %53, label %46

46:                                               ; preds = %43
  %47 = load i32, ptr %12, align 4, !tbaa !5
  %48 = icmp eq i32 %47, 45
  br i1 %48, label %49, label %58

49:                                               ; preds = %46
  %50 = load ptr, ptr %13, align 8, !tbaa !9
  %51 = call i32 @string_equal(ptr noundef %50, ptr noundef @.str.9)
  %52 = icmp ne i32 %51, 0
  br i1 %52, label %53, label %58

53:                                               ; preds = %49, %43
  br label %54

54:                                               ; preds = %53
  br label %55

55:                                               ; preds = %54
  br label %56

56:                                               ; preds = %55
  %57 = call i32 @parse_algorithm(ptr noundef %11)
  store i32 %57, ptr %6, align 4, !tbaa !5
  store i32 2, ptr %14, align 4
  br label %116, !llvm.loop !13

58:                                               ; preds = %49, %46
  %59 = load i32, ptr %12, align 4, !tbaa !5
  %60 = icmp eq i32 %59, 108
  br i1 %60, label %68, label %61

61:                                               ; preds = %58
  %62 = load i32, ptr %12, align 4, !tbaa !5
  %63 = icmp eq i32 %62, 45
  br i1 %63, label %64, label %73

64:                                               ; preds = %61
  %65 = load ptr, ptr %13, align 8, !tbaa !9
  %66 = call i32 @string_equal(ptr noundef %65, ptr noundef @.str.10)
  %67 = icmp ne i32 %66, 0
  br i1 %67, label %68, label %73

68:                                               ; preds = %64, %58
  br label %69

69:                                               ; preds = %68
  br label %70

70:                                               ; preds = %69
  br label %71

71:                                               ; preds = %70
  %72 = call i64 @parse_digest_size(ptr noundef %11)
  store i64 %72, ptr %10, align 8, !tbaa !11
  store i32 2, ptr %14, align 4
  br label %116, !llvm.loop !13

73:                                               ; preds = %64, %61
  %74 = load i32, ptr %12, align 4, !tbaa !5
  %75 = icmp eq i32 %74, 107
  br i1 %75, label %83, label %76

76:                                               ; preds = %73
  %77 = load i32, ptr %12, align 4, !tbaa !5
  %78 = icmp eq i32 %77, 45
  br i1 %78, label %79, label %90

79:                                               ; preds = %76
  %80 = load ptr, ptr %13, align 8, !tbaa !9
  %81 = call i32 @string_equal(ptr noundef %80, ptr noundef @.str.11)
  %82 = icmp ne i32 %81, 0
  br i1 %82, label %83, label %90

83:                                               ; preds = %79, %73
  br label %84

84:                                               ; preds = %83
  br label %85

85:                                               ; preds = %84
  br label %86

86:                                               ; preds = %85
  %87 = getelementptr inbounds [64 x i8], ptr %8, i64 0, i64 0
  %88 = call i32 @parse_key(ptr noundef %11, ptr noundef %87)
  %89 = sext i32 %88 to i64
  store i64 %89, ptr %9, align 8, !tbaa !11
  store i32 2, ptr %14, align 4
  br label %116, !llvm.loop !13

90:                                               ; preds = %79, %76
  %91 = load i32, ptr %12, align 4, !tbaa !5
  %92 = icmp eq i32 %91, 63
  br i1 %92, label %100, label %93

93:                                               ; preds = %90
  %94 = load i32, ptr %12, align 4, !tbaa !5
  %95 = icmp eq i32 %94, 45
  br i1 %95, label %96, label %104

96:                                               ; preds = %93
  %97 = load ptr, ptr %13, align 8, !tbaa !9
  %98 = call i32 @string_equal(ptr noundef %97, ptr noundef @.str.12)
  %99 = icmp ne i32 %98, 0
  br i1 %99, label %100, label %104

100:                                              ; preds = %96, %90
  br label %101

101:                                              ; preds = %100
  br label %102

102:                                              ; preds = %101
  br label %103

103:                                              ; preds = %102
  call void (...) @usage()
  store i32 2, ptr %14, align 4
  br label %116, !llvm.loop !13

104:                                              ; preds = %96, %93
  %105 = load ptr, ptr %13, align 8, !tbaa !9
  %106 = icmp ne ptr %105, null
  br i1 %106, label %107, label %111

107:                                              ; preds = %104
  %108 = load ptr, ptr @stderr, align 8, !tbaa !9
  %109 = load ptr, ptr %13, align 8, !tbaa !9
  %110 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %108, ptr noundef @.str.13, ptr noundef %109) #4
  br label %115

111:                                              ; preds = %104
  %112 = load ptr, ptr @stderr, align 8, !tbaa !9
  %113 = load i32, ptr %12, align 4, !tbaa !5
  %114 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %112, ptr noundef @.str.14, i32 noundef %113) #4
  br label %115

115:                                              ; preds = %111, %107
  call void @error(ptr noundef @.str.15)
  store i32 0, ptr %14, align 4
  br label %116

116:                                              ; preds = %115, %103, %86, %71, %56, %42
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #4
  %117 = load i32, ptr %14, align 4
  switch i32 %117, label %208 [
    i32 0, label %118
    i32 2, label %19
  ]

118:                                              ; preds = %116
  br label %19, !llvm.loop !13

119:                                              ; preds = %19
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #4
  br label %120

120:                                              ; preds = %119
  br label %121

121:                                              ; preds = %120
  br label %122

122:                                              ; preds = %121
  %123 = load i32, ptr %6, align 4, !tbaa !5
  %124 = icmp eq i32 %123, 1
  br i1 %124, label %125, label %134

125:                                              ; preds = %122
  %126 = load i64, ptr %9, align 8, !tbaa !11
  %127 = icmp ne i64 %126, 0
  br i1 %127, label %128, label %129

128:                                              ; preds = %125
  call void @error(ptr noundef @.str.16)
  br label %129

129:                                              ; preds = %128, %125
  %130 = load i64, ptr %10, align 8, !tbaa !11
  %131 = icmp ne i64 %130, 64
  br i1 %131, label %132, label %133

132:                                              ; preds = %129
  call void @error(ptr noundef @.str.17)
  br label %133

133:                                              ; preds = %132, %129
  br label %134

134:                                              ; preds = %133, %122
  %135 = getelementptr inbounds %struct.getopt_ctx, ptr %11, i32 0, i32 0
  %136 = load i32, ptr %135, align 8, !tbaa !15
  %137 = icmp eq i32 %136, 0
  br i1 %137, label %138, label %151

138:                                              ; preds = %134
  %139 = load ptr, ptr @stdin, align 8, !tbaa !9
  %140 = call ptr @freopen(ptr noundef null, ptr noundef @.str.18, ptr noundef %139)
  %141 = load ptr, ptr @stdin, align 8, !tbaa !9
  %142 = icmp ne ptr %140, %141
  br i1 %142, label %143, label %144

143:                                              ; preds = %138
  call void @panic(ptr noundef @.str.19)
  br label %144

144:                                              ; preds = %143, %138
  %145 = load i32, ptr %6, align 4, !tbaa !5
  %146 = load i32, ptr %7, align 4, !tbaa !5
  %147 = load ptr, ptr @stdin, align 8, !tbaa !9
  %148 = load i64, ptr %10, align 8, !tbaa !11
  %149 = getelementptr inbounds [64 x i8], ptr %8, i64 0, i64 0
  %150 = load i64, ptr %9, align 8, !tbaa !11
  call void @hash_input(i32 noundef %145, i32 noundef %146, ptr noundef %147, ptr noundef @.str.20, i64 noundef %148, ptr noundef %149, i64 noundef %150)
  br label %151

151:                                              ; preds = %144, %134
  call void @llvm.lifetime.start.p0(i64 4, ptr %15) #4
  store i32 0, ptr %15, align 4, !tbaa !5
  br label %152

152:                                              ; preds = %203, %151
  %153 = load i32, ptr %15, align 4, !tbaa !5
  %154 = getelementptr inbounds %struct.getopt_ctx, ptr %11, i32 0, i32 0
  %155 = load i32, ptr %154, align 8, !tbaa !15
  %156 = icmp slt i32 %153, %155
  br i1 %156, label %158, label %157

157:                                              ; preds = %152
  store i32 16, ptr %14, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #4
  br label %206

158:                                              ; preds = %152
  call void @llvm.lifetime.start.p0(i64 8, ptr %16) #4
  %159 = getelementptr inbounds %struct.getopt_ctx, ptr %11, i32 0, i32 1
  %160 = load ptr, ptr %159, align 8, !tbaa !17
  %161 = load i32, ptr %15, align 4, !tbaa !5
  %162 = sext i32 %161 to i64
  %163 = getelementptr inbounds ptr, ptr %160, i64 %162
  %164 = load ptr, ptr %163, align 8, !tbaa !9
  %165 = call noalias ptr @fopen(ptr noundef %164, ptr noundef @.str.18)
  store ptr %165, ptr %16, align 8, !tbaa !9
  %166 = load ptr, ptr %16, align 8, !tbaa !9
  %167 = icmp eq ptr %166, null
  br i1 %167, label %168, label %177

168:                                              ; preds = %158
  %169 = load ptr, ptr @stderr, align 8, !tbaa !9
  %170 = getelementptr inbounds %struct.getopt_ctx, ptr %11, i32 0, i32 1
  %171 = load ptr, ptr %170, align 8, !tbaa !17
  %172 = load i32, ptr %15, align 4, !tbaa !5
  %173 = sext i32 %172 to i64
  %174 = getelementptr inbounds ptr, ptr %171, i64 %173
  %175 = load ptr, ptr %174, align 8, !tbaa !9
  %176 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %169, ptr noundef @.str.21, ptr noundef %175) #4
  call void @panic(ptr noundef null)
  br label %177

177:                                              ; preds = %168, %158
  %178 = load i32, ptr %6, align 4, !tbaa !5
  %179 = load i32, ptr %7, align 4, !tbaa !5
  %180 = load ptr, ptr %16, align 8, !tbaa !9
  %181 = getelementptr inbounds %struct.getopt_ctx, ptr %11, i32 0, i32 1
  %182 = load ptr, ptr %181, align 8, !tbaa !17
  %183 = load i32, ptr %15, align 4, !tbaa !5
  %184 = sext i32 %183 to i64
  %185 = getelementptr inbounds ptr, ptr %182, i64 %184
  %186 = load ptr, ptr %185, align 8, !tbaa !9
  %187 = load i64, ptr %10, align 8, !tbaa !11
  %188 = getelementptr inbounds [64 x i8], ptr %8, i64 0, i64 0
  %189 = load i64, ptr %9, align 8, !tbaa !11
  call void @hash_input(i32 noundef %178, i32 noundef %179, ptr noundef %180, ptr noundef %186, i64 noundef %187, ptr noundef %188, i64 noundef %189)
  %190 = load ptr, ptr %16, align 8, !tbaa !9
  %191 = call i32 @fclose(ptr noundef %190)
  %192 = icmp ne i32 %191, 0
  br i1 %192, label %193, label %202

193:                                              ; preds = %177
  %194 = load ptr, ptr @stderr, align 8, !tbaa !9
  %195 = getelementptr inbounds %struct.getopt_ctx, ptr %11, i32 0, i32 1
  %196 = load ptr, ptr %195, align 8, !tbaa !17
  %197 = load i32, ptr %15, align 4, !tbaa !5
  %198 = sext i32 %197 to i64
  %199 = getelementptr inbounds ptr, ptr %196, i64 %198
  %200 = load ptr, ptr %199, align 8, !tbaa !9
  %201 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %194, ptr noundef @.str.22, ptr noundef %200) #4
  call void @panic(ptr noundef null)
  br label %202

202:                                              ; preds = %193, %177
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #4
  br label %203

203:                                              ; preds = %202
  %204 = load i32, ptr %15, align 4, !tbaa !5
  %205 = add nsw i32 %204, 1
  store i32 %205, ptr %15, align 4, !tbaa !5
  br label %152, !llvm.loop !18

206:                                              ; preds = %157
  store i32 0, ptr %3, align 4
  store i32 1, ptr %14, align 4
  call void @llvm.lifetime.end.p0(i64 24, ptr %11) #4
  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 64, ptr %8) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #4
  %207 = load i32, ptr %3, align 4
  ret i32 %207

208:                                              ; preds = %116
  unreachable
}

declare void @set_usage_string(ptr noundef) #2

declare void @getopt_init(ptr noundef, i32 noundef, ptr noundef) #2

declare i32 @getopt_next(ptr noundef) #2

declare ptr @getopt_parameter(ptr noundef) #2

declare i32 @string_equal(ptr noundef, ptr noundef) #2

; Function Attrs: nounwind uwtable
declare hidden i32 @parse_algorithm(ptr noundef) #0

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

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

declare void @usage(...) #2

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

declare void @error(ptr noundef) #2

declare ptr @freopen(ptr noundef, ptr noundef, ptr noundef) #2

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

declare i32 @fclose(ptr noundef) #2

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 = { "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 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"any pointer", !7, i64 0}
!11 = !{!12, !12, i64 0}
!12 = !{!"long", !7, i64 0}
!13 = distinct !{!13, !14}
!14 = !{!"llvm.loop.mustprogress"}
!15 = !{!16, !6, i64 0}
!16 = !{!"", !6, i64 0, !10, i64 8, !6, i64 16, !6, i64 20}
!17 = !{!16, !10, i64 8}
!18 = distinct !{!18, !14}


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

%struct.getopt_ctx = type { i32, ptr, i32, i32 }

@.str.7 = external hidden unnamed_addr constant [379 x i8], align 1
@.str.8 = external hidden unnamed_addr constant [4 x i8], align 1
@.str.9 = external hidden unnamed_addr constant [10 x i8], align 1
@.str.10 = external hidden unnamed_addr constant [12 x i8], align 1
@.str.11 = external hidden unnamed_addr constant [4 x i8], align 1
@.str.12 = external hidden unnamed_addr constant [5 x i8], align 1
@stderr = external local_unnamed_addr global ptr, align 8
@.str.13 = external hidden unnamed_addr constant [21 x i8], align 1
@.str.14 = external hidden unnamed_addr constant [20 x i8], align 1
@.str.15 = external hidden unnamed_addr constant [1 x i8], align 1
@.str.16 = external hidden unnamed_addr constant [32 x i8], align 1
@.str.17 = external hidden unnamed_addr constant [28 x i8], align 1
@.str.18 = external hidden unnamed_addr constant [3 x i8], align 1
@stdin = external local_unnamed_addr global ptr, align 8
@.str.19 = external hidden unnamed_addr constant [47 x i8], align 1
@.str.20 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.21 = external hidden unnamed_addr constant [22 x i8], align 1
@.str.22 = external hidden unnamed_addr constant [23 x i8], align 1

; Function Attrs: nounwind uwtable
declare dso_local void @hash_input(i32 noundef, i32 noundef, ptr noundef, ptr noundef, i64 noundef, ptr noundef, i64 noundef) local_unnamed_addr #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: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1

declare void @panic(ptr noundef) local_unnamed_addr #2

; Function Attrs: nounwind uwtable
define dso_local noundef i32 @main(i32 noundef %0, ptr noundef %1) local_unnamed_addr #0 {
  %3 = alloca [64 x i8], align 16
  %4 = alloca %struct.getopt_ctx, align 8
  call void @llvm.lifetime.start.p0(i64 64, ptr nonnull %3) #4
  tail call void @set_usage_string(ptr noundef nonnull @.str.7) #4
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %4) #4
  call void @getopt_init(ptr noundef nonnull %4, i32 noundef %0, ptr noundef %1) #4
  br label %.outer

.outer:                                           ; preds = %20, %2
  %.046.ph = phi i64 [ %22, %20 ], [ 0, %2 ]
  %.044.ph = phi i64 [ %.044.ph75, %20 ], [ 64, %2 ]
  %.042.ph = phi i32 [ %.042.ph79, %20 ], [ 0, %2 ]
  %.041.ph = phi i32 [ %.041.ph82, %20 ], [ 0, %2 ]
  br label %.outer74

.outer74:                                         ; preds = %.outer, %16
  %.044.ph75 = phi i64 [ %.044.ph, %.outer ], [ %17, %16 ]
  %.042.ph76 = phi i32 [ %.042.ph, %.outer ], [ %.042.ph79, %16 ]
  %.041.ph77 = phi i32 [ %.041.ph, %.outer ], [ %.041.ph82, %16 ]
  br label %.outer78

.outer78.loopexit:                                ; preds = %7, %5
  br label %.outer78

.outer78:                                         ; preds = %.outer78.loopexit, %.outer74
  %.042.ph79 = phi i32 [ %.042.ph76, %.outer74 ], [ 1, %.outer78.loopexit ]
  %.041.ph80 = phi i32 [ %.041.ph77, %.outer74 ], [ %.041.ph82, %.outer78.loopexit ]
  br label %.outer81

.outer81:                                         ; preds = %.outer78, %12
  %.041.ph82 = phi i32 [ %.041.ph80, %.outer78 ], [ %13, %12 ]
  br label %5

5:                                                ; preds = %.backedge, %.outer81
  %6 = call i32 @getopt_next(ptr noundef nonnull %4) #4
  switch i32 %6, label %.thread69 [
    i32 -1, label %33
    i32 45, label %7
    i32 116, label %.outer78.loopexit
    i32 97, label %12
    i32 108, label %16
    i32 107, label %20
    i32 63, label %25
  ]

7:                                                ; preds = %5
  %8 = call ptr @getopt_parameter(ptr noundef nonnull %4) #4
  %9 = call i32 @string_equal(ptr noundef %8, ptr noundef nonnull @.str.8) #4
  %.not54 = icmp eq i32 %9, 0
  br i1 %.not54, label %10, label %.outer78.loopexit, !llvm.loop !5

10:                                               ; preds = %7
  %11 = call i32 @string_equal(ptr noundef %8, ptr noundef nonnull @.str.9) #4
  %.not55 = icmp eq i32 %11, 0
  br i1 %.not55, label %14, label %12

12:                                               ; preds = %5, %10
  %13 = call i32 @parse_algorithm(ptr noundef nonnull %4)
  br label %.outer81, !llvm.loop !5

14:                                               ; preds = %10
  %15 = call i32 @string_equal(ptr noundef %8, ptr noundef nonnull @.str.10) #4
  %.not56 = icmp eq i32 %15, 0
  br i1 %.not56, label %18, label %16

16:                                               ; preds = %5, %14
  %17 = call i64 @parse_digest_size(ptr noundef nonnull %4)
  br label %.outer74, !llvm.loop !5

18:                                               ; preds = %14
  %19 = call i32 @string_equal(ptr noundef %8, ptr noundef nonnull @.str.11) #4
  %.not57 = icmp eq i32 %19, 0
  br i1 %.not57, label %23, label %20

20:                                               ; preds = %5, %18
  %21 = call i32 @parse_key(ptr noundef nonnull %4, ptr noundef nonnull %3)
  %22 = sext i32 %21 to i64
  br label %.outer, !llvm.loop !5

23:                                               ; preds = %18
  %24 = call i32 @string_equal(ptr noundef %8, ptr noundef nonnull @.str.12) #4
  %.not58 = icmp eq i32 %24, 0
  br i1 %.not58, label %26, label %25

25:                                               ; preds = %5, %23
  call void (...) @usage() #4
  br label %.backedge

26:                                               ; preds = %23
  %.not59 = icmp eq ptr %8, null
  br i1 %.not59, label %.thread69, label %27

27:                                               ; preds = %26
  %28 = load ptr, ptr @stderr, align 8, !tbaa !7
  %29 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %28, ptr noundef nonnull @.str.13, ptr noundef nonnull %8) #5
  br label %32

.thread69:                                        ; preds = %5, %26
  %30 = load ptr, ptr @stderr, align 8, !tbaa !7
  %31 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %30, ptr noundef nonnull @.str.14, i32 noundef %6) #5
  br label %32

32:                                               ; preds = %.thread69, %27
  call void @error(ptr noundef nonnull @.str.15) #4
  br label %.backedge

.backedge:                                        ; preds = %32, %25
  br label %5, !llvm.loop !5

33:                                               ; preds = %5
  %34 = icmp eq i32 %.041.ph82, 1
  br i1 %34, label %35, label %39

35:                                               ; preds = %33
  %.not50 = icmp eq i64 %.046.ph, 0
  br i1 %.not50, label %37, label %36

36:                                               ; preds = %35
  call void @error(ptr noundef nonnull @.str.16) #4
  br label %37

37:                                               ; preds = %36, %35
  %.not51 = icmp eq i64 %.044.ph75, 64
  br i1 %.not51, label %39, label %38

38:                                               ; preds = %37
  call void @error(ptr noundef nonnull @.str.17) #4
  br label %39

39:                                               ; preds = %37, %38, %33
  %40 = load i32, ptr %4, align 8, !tbaa !11
  %41 = icmp eq i32 %40, 0
  br i1 %41, label %42, label %49

42:                                               ; preds = %39
  %43 = load ptr, ptr @stdin, align 8, !tbaa !7
  %44 = call ptr @freopen(ptr noundef null, ptr noundef nonnull @.str.18, ptr noundef %43) #4
  %45 = load ptr, ptr @stdin, align 8, !tbaa !7
  %.not52 = icmp eq ptr %44, %45
  br i1 %.not52, label %47, label %46

46:                                               ; preds = %42
  call void @panic(ptr noundef nonnull @.str.19) #4
  %.pre = load ptr, ptr @stdin, align 8, !tbaa !7
  br label %47

47:                                               ; preds = %46, %42
  %48 = phi ptr [ %.pre, %46 ], [ %45, %42 ]
  call void @hash_input(i32 noundef %.041.ph82, i32 noundef %.042.ph79, ptr noundef %48, ptr noundef nonnull @.str.20, i64 noundef %.044.ph75, ptr noundef nonnull %3, i64 noundef %.046.ph)
  %.pre73 = load i32, ptr %4, align 8, !tbaa !11
  br label %49

49:                                               ; preds = %47, %39
  %50 = phi i32 [ %.pre73, %47 ], [ %40, %39 ]
  %51 = icmp sgt i32 %50, 0
  br i1 %51, label %.lr.ph, label %._crit_edge

.lr.ph:                                           ; preds = %49
  %52 = getelementptr inbounds i8, ptr %4, i64 8
  br label %53

._crit_edge:                                      ; preds = %76, %49
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %4) #4
  call void @llvm.lifetime.end.p0(i64 64, ptr nonnull %3) #4
  ret i32 0

53:                                               ; preds = %.lr.ph, %76
  %indvars.iv = phi i64 [ 0, %.lr.ph ], [ %indvars.iv.next, %76 ]
  %54 = load ptr, ptr %52, align 8, !tbaa !14
  %55 = getelementptr inbounds ptr, ptr %54, i64 %indvars.iv
  %56 = load ptr, ptr %55, align 8, !tbaa !7
  %57 = call noalias ptr @fopen(ptr noundef %56, ptr noundef nonnull @.str.18)
  %58 = icmp eq ptr %57, null
  br i1 %58, label %59, label %65

59:                                               ; preds = %53
  %60 = load ptr, ptr @stderr, align 8, !tbaa !7
  %61 = load ptr, ptr %52, align 8, !tbaa !14
  %62 = getelementptr inbounds ptr, ptr %61, i64 %indvars.iv
  %63 = load ptr, ptr %62, align 8, !tbaa !7
  %64 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %60, ptr noundef nonnull @.str.21, ptr noundef %63) #5
  call void @panic(ptr noundef null) #4
  br label %65

65:                                               ; preds = %59, %53
  %66 = load ptr, ptr %52, align 8, !tbaa !14
  %67 = getelementptr inbounds ptr, ptr %66, i64 %indvars.iv
  %68 = load ptr, ptr %67, align 8, !tbaa !7
  call void @hash_input(i32 noundef %.041.ph82, i32 noundef %.042.ph79, ptr noundef %57, ptr noundef %68, i64 noundef %.044.ph75, ptr noundef nonnull %3, i64 noundef %.046.ph)
  %69 = call i32 @fclose(ptr noundef %57)
  %.not53 = icmp eq i32 %69, 0
  br i1 %.not53, label %76, label %70

70:                                               ; preds = %65
  %71 = load ptr, ptr @stderr, align 8, !tbaa !7
  %72 = load ptr, ptr %52, align 8, !tbaa !14
  %73 = getelementptr inbounds ptr, ptr %72, i64 %indvars.iv
  %74 = load ptr, ptr %73, align 8, !tbaa !7
  %75 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %71, ptr noundef nonnull @.str.22, ptr noundef %74) #5
  call void @panic(ptr noundef null) #4
  br label %76

76:                                               ; preds = %70, %65
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %77 = load i32, ptr %4, align 8, !tbaa !11
  %78 = sext i32 %77 to i64
  %79 = icmp slt i64 %indvars.iv.next, %78
  br i1 %79, label %53, label %._crit_edge, !llvm.loop !15
}

declare void @set_usage_string(ptr noundef) local_unnamed_addr #2

declare void @getopt_init(ptr noundef, i32 noundef, ptr noundef) local_unnamed_addr #2

declare i32 @getopt_next(ptr noundef) local_unnamed_addr #2

declare ptr @getopt_parameter(ptr noundef) local_unnamed_addr #2

declare i32 @string_equal(ptr noundef, ptr noundef) local_unnamed_addr #2

; Function Attrs: nounwind uwtable
declare hidden i32 @parse_algorithm(ptr noundef) local_unnamed_addr #0

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

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

declare void @usage(...) local_unnamed_addr #2

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

declare void @error(ptr noundef) local_unnamed_addr #2

declare ptr @freopen(ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #2

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

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

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 = { "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 = distinct !{!5, !6}
!6 = !{!"llvm.loop.mustprogress"}
!7 = !{!8, !8, i64 0}
!8 = !{!"any pointer", !9, i64 0}
!9 = !{!"omnipotent char", !10, i64 0}
!10 = !{!"Simple C/C++ TBAA"}
!11 = !{!12, !13, i64 0}
!12 = !{!"", !13, i64 0, !8, i64 8, !13, i64 16, !13, i64 20}
!13 = !{!"int", !9, i64 0}
!14 = !{!12, !8, i64 8}
!15 = distinct !{!15, !6}


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