; LLVM IR from guanzhi/GmSSL :: tools (crlparse)

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

@stdin = external global ptr, align 8
@stdout = external global ptr, align 8
@stderr = external global ptr, align 8
@.str = external hidden unnamed_addr constant [14 x i8], align 1
@options = external hidden global ptr, align 8
@.str.1 = external hidden unnamed_addr constant [6 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [4 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [28 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.7 = external hidden unnamed_addr constant [25 x i8], align 1
@.str.8 = external hidden unnamed_addr constant [31 x i8], align 1
@.str.9 = external hidden unnamed_addr constant [27 x i8], align 1
@.str.10 = external hidden unnamed_addr constant [29 x i8], align 1
@.str.11 = external hidden unnamed_addr constant [20 x i8], align 1
@.str.12 = external hidden unnamed_addr constant [26 x i8], align 1
@.str.13 = external hidden unnamed_addr constant [22 x i8], align 1
@.str.14 = external hidden unnamed_addr constant [4 x i8], align 1

; Function Attrs: nounwind uwtable
define dso_local i32 @crlparse_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 ptr, align 8
  %8 = alloca ptr, align 8
  %9 = alloca ptr, align 8
  %10 = alloca ptr, align 8
  %11 = alloca ptr, align 8
  %12 = alloca ptr, align 8
  %13 = alloca i64, align 8
  %14 = alloca ptr, align 8
  %15 = alloca ptr, align 8
  %16 = alloca i64, align 8
  %17 = alloca i32, 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) #7
  store i32 1, ptr %6, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #7
  %18 = load ptr, ptr %5, align 8, !tbaa !9
  %19 = getelementptr inbounds ptr, ptr %18, i64 0
  %20 = load ptr, ptr %19, align 8, !tbaa !9
  store ptr %20, ptr %7, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #7
  store ptr null, ptr %8, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #7
  store ptr null, ptr %9, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #7
  %21 = load ptr, ptr @stdin, align 8, !tbaa !9
  store ptr %21, ptr %10, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #7
  %22 = load ptr, ptr @stdout, align 8, !tbaa !9
  store ptr %22, ptr %11, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #7
  store ptr null, ptr %12, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr %15) #7
  store ptr null, ptr %15, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %16) #7
  %23 = load i32, ptr %4, align 4, !tbaa !5
  %24 = add nsw i32 %23, -1
  store i32 %24, ptr %4, align 4, !tbaa !5
  %25 = load ptr, ptr %5, align 8, !tbaa !9
  %26 = getelementptr inbounds ptr, ptr %25, i32 1
  store ptr %26, ptr %5, align 8, !tbaa !9
  %27 = load i32, ptr %4, align 4, !tbaa !5
  %28 = icmp slt i32 %27, 1
  br i1 %28, label %29, label %34

29:                                               ; preds = %2
  %30 = load ptr, ptr @stderr, align 8, !tbaa !9
  %31 = load ptr, ptr %7, align 8, !tbaa !9
  %32 = load ptr, ptr @options, align 8, !tbaa !9
  %33 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %30, ptr noundef @.str, ptr noundef %31, ptr noundef %32) #7
  store i32 1, ptr %3, align 4
  store i32 1, ptr %17, align 4
  br label %197

34:                                               ; preds = %2
  br label %35

35:                                               ; preds = %113, %34
  %36 = load i32, ptr %4, align 4, !tbaa !5
  %37 = icmp sgt i32 %36, 0
  br i1 %37, label %38, label %118

38:                                               ; preds = %35
  %39 = load ptr, ptr %5, align 8, !tbaa !9
  %40 = load ptr, ptr %39, align 8, !tbaa !9
  %41 = call i32 @strcmp(ptr noundef %40, ptr noundef @.str.1) #8
  %42 = icmp ne i32 %41, 0
  br i1 %42, label %47, label %43

43:                                               ; preds = %38
  %44 = load ptr, ptr %7, align 8, !tbaa !9
  %45 = load ptr, ptr @options, align 8, !tbaa !9
  %46 = call i32 (ptr, ...) @printf(ptr noundef @.str, ptr noundef %44, ptr noundef %45)
  br label %172

47:                                               ; preds = %38
  %48 = load ptr, ptr %5, align 8, !tbaa !9
  %49 = load ptr, ptr %48, align 8, !tbaa !9
  %50 = call i32 @strcmp(ptr noundef %49, ptr noundef @.str.2) #8
  %51 = icmp ne i32 %50, 0
  br i1 %51, label %73, label %52

52:                                               ; preds = %47
  %53 = load i32, ptr %4, align 4, !tbaa !5
  %54 = add nsw i32 %53, -1
  store i32 %54, ptr %4, align 4, !tbaa !5
  %55 = icmp slt i32 %54, 1
  br i1 %55, label %56, label %57

56:                                               ; preds = %52
  br label %105

57:                                               ; preds = %52
  %58 = load ptr, ptr %5, align 8, !tbaa !9
  %59 = getelementptr inbounds ptr, ptr %58, i32 1
  store ptr %59, ptr %5, align 8, !tbaa !9
  %60 = load ptr, ptr %59, align 8, !tbaa !9
  store ptr %60, ptr %8, align 8, !tbaa !9
  %61 = load ptr, ptr %8, align 8, !tbaa !9
  %62 = call noalias ptr @fopen(ptr noundef %61, ptr noundef @.str.3)
  store ptr %62, ptr %10, align 8, !tbaa !9
  %63 = icmp ne ptr %62, null
  br i1 %63, label %72, label %64

64:                                               ; preds = %57
  %65 = load ptr, ptr @stderr, align 8, !tbaa !9
  %66 = load ptr, ptr %7, align 8, !tbaa !9
  %67 = load ptr, ptr %8, align 8, !tbaa !9
  %68 = call ptr @__errno_location() #9
  %69 = load i32, ptr %68, align 4, !tbaa !5
  %70 = call ptr @strerror(i32 noundef %69) #7
  %71 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %65, ptr noundef @.str.4, ptr noundef %66, ptr noundef %67, ptr noundef %70) #7
  br label %172

72:                                               ; preds = %57
  br label %112

73:                                               ; preds = %47
  %74 = load ptr, ptr %5, align 8, !tbaa !9
  %75 = load ptr, ptr %74, align 8, !tbaa !9
  %76 = call i32 @strcmp(ptr noundef %75, ptr noundef @.str.5) #8
  %77 = icmp ne i32 %76, 0
  br i1 %77, label %99, label %78

78:                                               ; preds = %73
  %79 = load i32, ptr %4, align 4, !tbaa !5
  %80 = add nsw i32 %79, -1
  store i32 %80, ptr %4, align 4, !tbaa !5
  %81 = icmp slt i32 %80, 1
  br i1 %81, label %82, label %83

82:                                               ; preds = %78
  br label %105

83:                                               ; preds = %78
  %84 = load ptr, ptr %5, align 8, !tbaa !9
  %85 = getelementptr inbounds ptr, ptr %84, i32 1
  store ptr %85, ptr %5, align 8, !tbaa !9
  %86 = load ptr, ptr %85, align 8, !tbaa !9
  store ptr %86, ptr %9, align 8, !tbaa !9
  %87 = load ptr, ptr %9, align 8, !tbaa !9
  %88 = call noalias ptr @fopen(ptr noundef %87, ptr noundef @.str.6)
  store ptr %88, ptr %11, align 8, !tbaa !9
  %89 = icmp ne ptr %88, null
  br i1 %89, label %98, label %90

90:                                               ; preds = %83
  %91 = load ptr, ptr @stderr, align 8, !tbaa !9
  %92 = load ptr, ptr %7, align 8, !tbaa !9
  %93 = load ptr, ptr %9, align 8, !tbaa !9
  %94 = call ptr @__errno_location() #9
  %95 = load i32, ptr %94, align 4, !tbaa !5
  %96 = call ptr @strerror(i32 noundef %95) #7
  %97 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %91, ptr noundef @.str.4, ptr noundef %92, ptr noundef %93, ptr noundef %96) #7
  br label %172

98:                                               ; preds = %83
  br label %111

99:                                               ; preds = %73
  %100 = load ptr, ptr @stderr, align 8, !tbaa !9
  %101 = load ptr, ptr %7, align 8, !tbaa !9
  %102 = load ptr, ptr %5, align 8, !tbaa !9
  %103 = load ptr, ptr %102, align 8, !tbaa !9
  %104 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %100, ptr noundef @.str.7, ptr noundef %101, ptr noundef %103) #7
  br label %172

105:                                              ; preds = %82, %56
  %106 = load ptr, ptr @stderr, align 8, !tbaa !9
  %107 = load ptr, ptr %7, align 8, !tbaa !9
  %108 = load ptr, ptr %5, align 8, !tbaa !9
  %109 = load ptr, ptr %108, align 8, !tbaa !9
  %110 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %106, ptr noundef @.str.8, ptr noundef %107, ptr noundef %109) #7
  br label %172

111:                                              ; preds = %98
  br label %112

112:                                              ; preds = %111, %72
  br label %113

113:                                              ; preds = %112
  %114 = load i32, ptr %4, align 4, !tbaa !5
  %115 = add nsw i32 %114, -1
  store i32 %115, ptr %4, align 4, !tbaa !5
  %116 = load ptr, ptr %5, align 8, !tbaa !9
  %117 = getelementptr inbounds ptr, ptr %116, i32 1
  store ptr %117, ptr %5, align 8, !tbaa !9
  br label %35, !llvm.loop !11

118:                                              ; preds = %35
  %119 = load ptr, ptr %8, align 8, !tbaa !9
  %120 = icmp ne ptr %119, null
  br i1 %120, label %125, label %121

121:                                              ; preds = %118
  %122 = load ptr, ptr @stderr, align 8, !tbaa !9
  %123 = load ptr, ptr %7, align 8, !tbaa !9
  %124 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %122, ptr noundef @.str.9, ptr noundef %123) #7
  br label %172

125:                                              ; preds = %118
  %126 = load ptr, ptr %10, align 8, !tbaa !9
  %127 = call i32 @file_size(ptr noundef %126, ptr noundef %13)
  %128 = icmp ne i32 %127, 1
  br i1 %128, label %129, label %133

129:                                              ; preds = %125
  %130 = load ptr, ptr @stderr, align 8, !tbaa !9
  %131 = load ptr, ptr %7, align 8, !tbaa !9
  %132 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %130, ptr noundef @.str.10, ptr noundef %131) #7
  br label %172

133:                                              ; preds = %125
  %134 = load i64, ptr %13, align 8, !tbaa !13
  %135 = call noalias ptr @malloc(i64 noundef %134) #10
  store ptr %135, ptr %12, align 8, !tbaa !9
  %136 = icmp ne ptr %135, null
  br i1 %136, label %141, label %137

137:                                              ; preds = %133
  %138 = load ptr, ptr @stderr, align 8, !tbaa !9
  %139 = load ptr, ptr %7, align 8, !tbaa !9
  %140 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %138, ptr noundef @.str.11, ptr noundef %139) #7
  br label %172

141:                                              ; preds = %133
  %142 = load ptr, ptr %12, align 8, !tbaa !9
  %143 = load i64, ptr %13, align 8, !tbaa !13
  %144 = load ptr, ptr %10, align 8, !tbaa !9
  %145 = call i64 @fread(ptr noundef %142, i64 noundef 1, i64 noundef %143, ptr noundef %144)
  %146 = load i64, ptr %13, align 8, !tbaa !13
  %147 = icmp ne i64 %145, %146
  br i1 %147, label %148, label %155

148:                                              ; preds = %141
  %149 = load ptr, ptr @stderr, align 8, !tbaa !9
  %150 = load ptr, ptr %7, align 8, !tbaa !9
  %151 = call ptr @__errno_location() #9
  %152 = load i32, ptr %151, align 4, !tbaa !5
  %153 = call ptr @strerror(i32 noundef %152) #7
  %154 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %149, ptr noundef @.str.12, ptr noundef %150, ptr noundef %153) #7
  br label %172

155:                                              ; preds = %141
  %156 = load ptr, ptr %12, align 8, !tbaa !9
  store ptr %156, ptr %14, align 8, !tbaa !9
  %157 = call i32 @x509_crl_from_der(ptr noundef %15, ptr noundef %16, ptr noundef %14, ptr noundef %13)
  %158 = icmp ne i32 %157, 1
  br i1 %158, label %163, label %159

159:                                              ; preds = %155
  %160 = load i64, ptr %13, align 8, !tbaa !13
  %161 = call i32 @asn1_length_is_zero(i64 noundef %160)
  %162 = icmp ne i32 %161, 1
  br i1 %162, label %163, label %167

163:                                              ; preds = %159, %155
  %164 = load ptr, ptr @stderr, align 8, !tbaa !9
  %165 = load ptr, ptr %7, align 8, !tbaa !9
  %166 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %164, ptr noundef @.str.13, ptr noundef %165) #7
  br label %172

167:                                              ; preds = %159
  %168 = load ptr, ptr %11, align 8, !tbaa !9
  %169 = load ptr, ptr %15, align 8, !tbaa !9
  %170 = load i64, ptr %16, align 8, !tbaa !13
  %171 = call i32 @x509_crl_print(ptr noundef %168, i32 noundef 0, i32 noundef 0, ptr noundef @.str.14, ptr noundef %169, i64 noundef %170)
  store i32 0, ptr %6, align 4, !tbaa !5
  br label %172

172:                                              ; preds = %167, %163, %148, %137, %129, %121, %105, %99, %90, %64, %43
  %173 = load ptr, ptr %8, align 8, !tbaa !9
  %174 = icmp ne ptr %173, null
  br i1 %174, label %175, label %181

175:                                              ; preds = %172
  %176 = load ptr, ptr %10, align 8, !tbaa !9
  %177 = icmp ne ptr %176, null
  br i1 %177, label %178, label %181

178:                                              ; preds = %175
  %179 = load ptr, ptr %10, align 8, !tbaa !9
  %180 = call i32 @fclose(ptr noundef %179)
  br label %181

181:                                              ; preds = %178, %175, %172
  %182 = load ptr, ptr %9, align 8, !tbaa !9
  %183 = icmp ne ptr %182, null
  br i1 %183, label %184, label %190

184:                                              ; preds = %181
  %185 = load ptr, ptr %11, align 8, !tbaa !9
  %186 = icmp ne ptr %185, null
  br i1 %186, label %187, label %190

187:                                              ; preds = %184
  %188 = load ptr, ptr %11, align 8, !tbaa !9
  %189 = call i32 @fclose(ptr noundef %188)
  br label %190

190:                                              ; preds = %187, %184, %181
  %191 = load ptr, ptr %12, align 8, !tbaa !9
  %192 = icmp ne ptr %191, null
  br i1 %192, label %193, label %195

193:                                              ; preds = %190
  %194 = load ptr, ptr %12, align 8, !tbaa !9
  call void @free(ptr noundef %194) #7
  br label %195

195:                                              ; preds = %193, %190
  %196 = load i32, ptr %6, align 4, !tbaa !5
  store i32 %196, ptr %3, align 4
  store i32 1, ptr %17, align 4
  br label %197

197:                                              ; preds = %195, %29
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #7
  %198 = load i32, ptr %3, align 4
  ret i32 %198
}

; 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 @fprintf(ptr noundef, ptr noundef, ...) #2

; Function Attrs: nounwind willreturn memory(read)
declare i32 @strcmp(ptr noundef, ptr noundef) #3

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

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

; Function Attrs: nounwind
declare ptr @strerror(i32 noundef) #2

; Function Attrs: nounwind willreturn memory(none)
declare ptr @__errno_location() #5

declare i32 @file_size(ptr noundef, ptr noundef) #4

; Function Attrs: nounwind allocsize(0)
declare noalias ptr @malloc(i64 noundef) #6

declare i64 @fread(ptr noundef, i64 noundef, i64 noundef, ptr noundef) #4

declare i32 @x509_crl_from_der(ptr noundef, ptr noundef, ptr noundef, ptr noundef) #4

declare i32 @asn1_length_is_zero(i64 noundef) #4

declare i32 @x509_crl_print(ptr noundef, i32 noundef, i32 noundef, ptr noundef, ptr noundef, i64 noundef) #4

declare i32 @fclose(ptr noundef) #4

; Function Attrs: nounwind
declare void @free(ptr noundef) #2

; 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 = { 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 #4 = { "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 willreturn memory(none) "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 allocsize(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 #7 = { nounwind }
attributes #8 = { nounwind willreturn memory(read) }
attributes #9 = { nounwind willreturn memory(none) }
attributes #10 = { nounwind allocsize(0) }

!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 = distinct !{!11, !12}
!12 = !{!"llvm.loop.mustprogress"}
!13 = !{!14, !14, i64 0}
!14 = !{!"long", !7, i64 0}


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

@stdin = external local_unnamed_addr global ptr, align 8
@stdout = external local_unnamed_addr global ptr, align 8
@stderr = external local_unnamed_addr global ptr, align 8
@.str = external hidden unnamed_addr constant [14 x i8], align 1
@options = external hidden local_unnamed_addr global ptr, align 8
@.str.1 = external hidden unnamed_addr constant [6 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [4 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [28 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.7 = external hidden unnamed_addr constant [25 x i8], align 1
@.str.8 = external hidden unnamed_addr constant [31 x i8], align 1
@.str.9 = external hidden unnamed_addr constant [27 x i8], align 1
@.str.10 = external hidden unnamed_addr constant [29 x i8], align 1
@.str.11 = external hidden unnamed_addr constant [20 x i8], align 1
@.str.12 = external hidden unnamed_addr constant [26 x i8], align 1
@.str.13 = external hidden unnamed_addr constant [22 x i8], align 1
@.str.14 = external hidden unnamed_addr constant [4 x i8], align 1

; Function Attrs: nounwind uwtable
define dso_local range(i32 0, 2) i32 @crlparse_main(i32 noundef %0, ptr nocapture noundef readonly %1) local_unnamed_addr #0 {
  %3 = alloca i64, align 8
  %4 = alloca ptr, align 8
  %5 = alloca ptr, align 8
  %6 = alloca i64, align 8
  %7 = load ptr, ptr %1, align 8, !tbaa !5
  %8 = load ptr, ptr @stdin, align 8, !tbaa !5
  %9 = load ptr, ptr @stdout, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %3) #9
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %4) #9
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %5) #9
  store ptr null, ptr %5, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %6) #9
  %10 = icmp slt i32 %0, 2
  br i1 %10, label %12, label %.preheader.preheader

.preheader.preheader:                             ; preds = %2
  %11 = getelementptr inbounds i8, ptr %1, i64 8
  br label %.preheader

12:                                               ; preds = %2
  %13 = load ptr, ptr @stderr, align 8, !tbaa !5
  %14 = load ptr, ptr @options, align 8, !tbaa !5
  %15 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %13, ptr noundef nonnull @.str, ptr noundef %7, ptr noundef %14) #10
  br label %105

.preheader:                                       ; preds = %.preheader.preheader, %55
  %.049129 = phi ptr [ %.1, %55 ], [ %9, %.preheader.preheader ]
  %.050128 = phi ptr [ %.151, %55 ], [ %8, %.preheader.preheader ]
  %.053127 = phi ptr [ %.154, %55 ], [ null, %.preheader.preheader ]
  %.056126 = phi ptr [ %.157, %55 ], [ null, %.preheader.preheader ]
  %.061125 = phi ptr [ %56, %55 ], [ %11, %.preheader.preheader ]
  %.063.in124 = phi i32 [ %.164, %55 ], [ %0, %.preheader.preheader ]
  %16 = load ptr, ptr %.061125, align 8, !tbaa !5
  %17 = tail call i32 @strcmp(ptr noundef nonnull dereferenceable(1) %16, ptr noundef nonnull dereferenceable(1) @.str.1) #11
  %.not79 = icmp eq i32 %17, 0
  br i1 %.not79, label %18, label %21

18:                                               ; preds = %.preheader
  %19 = load ptr, ptr @options, align 8, !tbaa !5
  %20 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str, ptr noundef %7, ptr noundef %19)
  br label %94

21:                                               ; preds = %.preheader
  %22 = tail call i32 @strcmp(ptr noundef nonnull dereferenceable(1) %16, ptr noundef nonnull dereferenceable(1) @.str.2) #11
  %.not80 = icmp eq i32 %22, 0
  br i1 %.not80, label %23, label %35

23:                                               ; preds = %21
  %24 = icmp eq i32 %.063.in124, 2
  br i1 %24, label %52, label %25

25:                                               ; preds = %23
  %26 = getelementptr inbounds i8, ptr %.061125, i64 8
  %27 = load ptr, ptr %26, align 8, !tbaa !5
  %28 = tail call noalias ptr @fopen(ptr noundef %27, ptr noundef nonnull @.str.3)
  %.not81 = icmp eq ptr %28, null
  br i1 %.not81, label %29, label %55

29:                                               ; preds = %25
  %30 = load ptr, ptr @stderr, align 8, !tbaa !5
  %31 = tail call ptr @__errno_location() #12
  %32 = load i32, ptr %31, align 4, !tbaa !9
  %33 = tail call ptr @strerror(i32 noundef %32) #9
  %34 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %30, ptr noundef nonnull @.str.4, ptr noundef %7, ptr noundef %27, ptr noundef %33) #10
  br label %.thread

35:                                               ; preds = %21
  %36 = tail call i32 @strcmp(ptr noundef nonnull dereferenceable(1) %16, ptr noundef nonnull dereferenceable(1) @.str.5) #11
  %.not82 = icmp eq i32 %36, 0
  br i1 %.not82, label %37, label %49

37:                                               ; preds = %35
  %38 = icmp eq i32 %.063.in124, 2
  br i1 %38, label %52, label %39

39:                                               ; preds = %37
  %40 = getelementptr inbounds i8, ptr %.061125, i64 8
  %41 = load ptr, ptr %40, align 8, !tbaa !5
  %42 = tail call noalias ptr @fopen(ptr noundef %41, ptr noundef nonnull @.str.6)
  %.not83 = icmp eq ptr %42, null
  br i1 %.not83, label %43, label %55

43:                                               ; preds = %39
  %44 = load ptr, ptr @stderr, align 8, !tbaa !5
  %45 = tail call ptr @__errno_location() #12
  %46 = load i32, ptr %45, align 4, !tbaa !9
  %47 = tail call ptr @strerror(i32 noundef %46) #9
  %48 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %44, ptr noundef nonnull @.str.4, ptr noundef %7, ptr noundef %41, ptr noundef %47) #10
  br label %94

49:                                               ; preds = %35
  %50 = load ptr, ptr @stderr, align 8, !tbaa !5
  %51 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %50, ptr noundef nonnull @.str.7, ptr noundef %7, ptr noundef %16) #10
  br label %94

52:                                               ; preds = %37, %23
  %53 = load ptr, ptr @stderr, align 8, !tbaa !5
  %54 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %53, ptr noundef nonnull @.str.8, ptr noundef %7, ptr noundef %16) #10
  br label %94

55:                                               ; preds = %25, %39
  %.157 = phi ptr [ %.056126, %39 ], [ %27, %25 ]
  %.154 = phi ptr [ %41, %39 ], [ %.053127, %25 ]
  %.151 = phi ptr [ %.050128, %39 ], [ %28, %25 ]
  %.1 = phi ptr [ %42, %39 ], [ %.049129, %25 ]
  %.164 = add nsw i32 %.063.in124, -2
  %56 = getelementptr inbounds i8, ptr %.061125, i64 16
  %57 = icmp sgt i32 %.063.in124, 3
  br i1 %57, label %.preheader, label %58, !llvm.loop !11

58:                                               ; preds = %55
  %.not = icmp eq ptr %.157, null
  br i1 %.not, label %59, label %62

59:                                               ; preds = %58
  %60 = load ptr, ptr @stderr, align 8, !tbaa !5
  %61 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %60, ptr noundef nonnull @.str.9, ptr noundef %7) #10
  br label %.thread

62:                                               ; preds = %58
  %63 = call i32 @file_size(ptr noundef %.151, ptr noundef nonnull %3) #9
  %.not74 = icmp eq i32 %63, 1
  br i1 %.not74, label %67, label %64

64:                                               ; preds = %62
  %65 = load ptr, ptr @stderr, align 8, !tbaa !5
  %66 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %65, ptr noundef nonnull @.str.10, ptr noundef %7) #10
  br label %94

67:                                               ; preds = %62
  %68 = load i64, ptr %3, align 8, !tbaa !13
  %69 = call noalias ptr @malloc(i64 noundef %68) #13
  %.not75 = icmp eq ptr %69, null
  br i1 %.not75, label %70, label %73

70:                                               ; preds = %67
  %71 = load ptr, ptr @stderr, align 8, !tbaa !5
  %72 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %71, ptr noundef nonnull @.str.11, ptr noundef %7) #10
  br label %94

73:                                               ; preds = %67
  %74 = call i64 @fread(ptr noundef nonnull %69, i64 noundef 1, i64 noundef %68, ptr noundef %.151)
  %75 = load i64, ptr %3, align 8, !tbaa !13
  %.not76 = icmp eq i64 %74, %75
  br i1 %.not76, label %82, label %76

76:                                               ; preds = %73
  %77 = load ptr, ptr @stderr, align 8, !tbaa !5
  %78 = tail call ptr @__errno_location() #12
  %79 = load i32, ptr %78, align 4, !tbaa !9
  %80 = call ptr @strerror(i32 noundef %79) #9
  %81 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %77, ptr noundef nonnull @.str.12, ptr noundef %7, ptr noundef %80) #10
  br label %94

82:                                               ; preds = %73
  store ptr %69, ptr %4, align 8, !tbaa !5
  %83 = call i32 @x509_crl_from_der(ptr noundef nonnull %5, ptr noundef nonnull %6, ptr noundef nonnull %4, ptr noundef nonnull %3) #9
  %.not77 = icmp eq i32 %83, 1
  br i1 %.not77, label %84, label %87

84:                                               ; preds = %82
  %85 = load i64, ptr %3, align 8, !tbaa !13
  %86 = call i32 @asn1_length_is_zero(i64 noundef %85) #9
  %.not78 = icmp eq i32 %86, 1
  br i1 %.not78, label %90, label %87

87:                                               ; preds = %84, %82
  %88 = load ptr, ptr @stderr, align 8, !tbaa !5
  %89 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %88, ptr noundef nonnull @.str.13, ptr noundef %7) #10
  br label %94

90:                                               ; preds = %84
  %91 = load ptr, ptr %5, align 8, !tbaa !5
  %92 = load i64, ptr %6, align 8, !tbaa !13
  %93 = call i32 @x509_crl_print(ptr noundef %.1, i32 noundef 0, i32 noundef 0, ptr noundef nonnull @.str.14, ptr noundef %91, i64 noundef %92) #9
  br label %94

94:                                               ; preds = %90, %87, %76, %70, %64, %52, %49, %43, %18
  %.056117 = phi ptr [ %.056126, %49 ], [ %.056126, %52 ], [ %.056126, %43 ], [ %.056126, %18 ], [ %.157, %64 ], [ %.157, %76 ], [ %.157, %87 ], [ %.157, %90 ], [ %.157, %70 ]
  %.050106 = phi ptr [ %.050128, %49 ], [ %.050128, %52 ], [ %.050128, %43 ], [ %.050128, %18 ], [ %.151, %64 ], [ %.151, %76 ], [ %.151, %87 ], [ %.151, %90 ], [ %.151, %70 ]
  %.060 = phi i32 [ 1, %49 ], [ 1, %52 ], [ 1, %43 ], [ 1, %18 ], [ 1, %64 ], [ 1, %76 ], [ 1, %87 ], [ 0, %90 ], [ 1, %70 ]
  %.255 = phi ptr [ %.053127, %49 ], [ %.053127, %52 ], [ %41, %43 ], [ %.053127, %18 ], [ %.154, %64 ], [ %.154, %76 ], [ %.154, %87 ], [ %.154, %90 ], [ %.154, %70 ]
  %.2 = phi ptr [ %.049129, %49 ], [ %.049129, %52 ], [ null, %43 ], [ %.049129, %18 ], [ %.1, %64 ], [ %.1, %76 ], [ %.1, %87 ], [ %.1, %90 ], [ %.1, %70 ]
  %.0 = phi ptr [ null, %49 ], [ null, %52 ], [ null, %43 ], [ null, %18 ], [ null, %64 ], [ %69, %76 ], [ %69, %87 ], [ %69, %90 ], [ null, %70 ]
  %95 = icmp ne ptr %.056117, null
  %96 = icmp ne ptr %.050106, null
  %or.cond = select i1 %95, i1 %96, i1 false
  br i1 %or.cond, label %97, label %.thread

97:                                               ; preds = %94
  %98 = call i32 @fclose(ptr noundef nonnull %.050106)
  br label %.thread

.thread:                                          ; preds = %29, %59, %97, %94
  %.095 = phi ptr [ %.0, %97 ], [ %.0, %94 ], [ null, %59 ], [ null, %29 ]
  %.294 = phi ptr [ %.2, %97 ], [ %.2, %94 ], [ %.1, %59 ], [ %.049129, %29 ]
  %.25593 = phi ptr [ %.255, %97 ], [ %.255, %94 ], [ %.154, %59 ], [ %.053127, %29 ]
  %.06092 = phi i32 [ %.060, %97 ], [ %.060, %94 ], [ 1, %59 ], [ 1, %29 ]
  %99 = icmp ne ptr %.25593, null
  %100 = icmp ne ptr %.294, null
  %or.cond3 = select i1 %99, i1 %100, i1 false
  br i1 %or.cond3, label %101, label %103

101:                                              ; preds = %.thread
  %102 = call i32 @fclose(ptr noundef nonnull %.294)
  br label %103

103:                                              ; preds = %101, %.thread
  %.not84 = icmp eq ptr %.095, null
  br i1 %.not84, label %105, label %104

104:                                              ; preds = %103
  call void @free(ptr noundef nonnull %.095) #9
  br label %105

105:                                              ; preds = %103, %104, %12
  %.059 = phi i32 [ 1, %12 ], [ %.06092, %104 ], [ %.06092, %103 ]
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %6) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %5) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %4) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %3) #9
  ret i32 %.059
}

; 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 @fprintf(ptr nocapture noundef, ptr nocapture noundef readonly, ...) local_unnamed_addr #2

; Function Attrs: mustprogress nofree nounwind willreturn memory(argmem: read)
declare i32 @strcmp(ptr nocapture noundef, ptr nocapture noundef) local_unnamed_addr #3

; Function Attrs: nofree nounwind
declare noundef i32 @printf(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: nounwind
declare ptr @strerror(i32 noundef) local_unnamed_addr #4

; Function Attrs: mustprogress nofree nosync nounwind willreturn memory(none)
declare ptr @__errno_location() local_unnamed_addr #5

declare i32 @file_size(ptr noundef, ptr noundef) local_unnamed_addr #6

; Function Attrs: mustprogress nofree nounwind willreturn allockind("alloc,uninitialized") allocsize(0) memory(inaccessiblemem: readwrite)
declare noalias noundef ptr @malloc(i64 noundef) local_unnamed_addr #7

; Function Attrs: nofree nounwind
declare noundef i64 @fread(ptr nocapture noundef, i64 noundef, i64 noundef, ptr nocapture noundef) local_unnamed_addr #2

declare i32 @x509_crl_from_der(ptr noundef, ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #6

declare i32 @asn1_length_is_zero(i64 noundef) local_unnamed_addr #6

declare i32 @x509_crl_print(ptr noundef, i32 noundef, i32 noundef, ptr noundef, ptr noundef, i64 noundef) local_unnamed_addr #6

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

; Function Attrs: mustprogress nounwind willreturn allockind("free") memory(argmem: readwrite, inaccessiblemem: readwrite)
declare void @free(ptr allocptr nocapture noundef) local_unnamed_addr #8

; Function Attrs: mustprogress 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 = { 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 = { mustprogress nofree nounwind willreturn memory(argmem: 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 #4 = { 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 #5 = { mustprogress nofree nosync nounwind willreturn memory(none) "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 = { "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 #7 = { mustprogress nofree nounwind willreturn allockind("alloc,uninitialized") allocsize(0) memory(inaccessiblemem: readwrite) "alloc-family"="malloc" "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 #8 = { mustprogress nounwind willreturn allockind("free") memory(argmem: readwrite, inaccessiblemem: readwrite) "alloc-family"="malloc" "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 #9 = { nounwind }
attributes #10 = { cold nounwind }
attributes #11 = { nounwind willreturn memory(read) }
attributes #12 = { nounwind willreturn memory(none) }
attributes #13 = { nounwind allocsize(0) }

!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"}
!13 = !{!14, !14, i64 0}
!14 = !{!"long", !7, i64 0}


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