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

; 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.anon.0 = type { i32, ptr, i64, i32, ptr, i64, i64, i64, ptr, i64, %struct.SM2_KEY, ptr, i64, ptr, i64, ptr, i64 }
%struct.SM2_KEY = type { %struct.SM2_Z256_POINT, [4 x i64] }
%struct.SM2_Z256_POINT = type { [4 x i64], [4 x i64], [4 x i64] }

@stderr = external global ptr, align 8
@.str.3 = external hidden unnamed_addr constant [13 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [62 x i8], align 1
@__FUNCTION__.x509_cert_get_details = external hidden unnamed_addr constant [22 x i8], align 1

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

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

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

declare i32 @asn1_length_is_zero(i64 noundef) #2

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

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

; Function Attrs: nounwind uwtable
define dso_local i32 @x509_cert_get_details(ptr noundef %0, i64 noundef %1, ptr noundef %2, ptr noundef %3, ptr noundef %4, ptr noundef %5, ptr noundef %6, ptr noundef %7, ptr noundef %8, ptr noundef %9, ptr noundef %10, ptr noundef %11, ptr noundef %12, ptr noundef %13, ptr noundef %14, ptr noundef %15, ptr noundef %16, ptr noundef %17, ptr noundef %18, ptr noundef %19, ptr noundef %20, ptr noundef %21) #3 {
  %23 = alloca i32, align 4
  %24 = alloca ptr, align 8
  %25 = alloca i64, align 8
  %26 = alloca ptr, align 8
  %27 = alloca ptr, align 8
  %28 = alloca ptr, align 8
  %29 = alloca ptr, align 8
  %30 = alloca ptr, align 8
  %31 = alloca ptr, align 8
  %32 = alloca ptr, align 8
  %33 = alloca ptr, align 8
  %34 = alloca ptr, align 8
  %35 = alloca ptr, align 8
  %36 = alloca ptr, align 8
  %37 = alloca ptr, align 8
  %38 = alloca ptr, align 8
  %39 = alloca ptr, align 8
  %40 = alloca ptr, align 8
  %41 = alloca ptr, align 8
  %42 = alloca ptr, align 8
  %43 = alloca ptr, align 8
  %44 = alloca ptr, align 8
  %45 = alloca ptr, align 8
  %46 = alloca ptr, align 8
  %47 = alloca i64, align 8
  %48 = alloca i32, align 4
  %49 = alloca ptr, align 8
  %50 = alloca i64, align 8
  %51 = alloca %struct.anon.0, align 8
  %52 = alloca i32, align 4
  store ptr %0, ptr %24, align 8, !tbaa !5
  store i64 %1, ptr %25, align 8, !tbaa !9
  store ptr %2, ptr %26, align 8, !tbaa !5
  store ptr %3, ptr %27, align 8, !tbaa !5
  store ptr %4, ptr %28, align 8, !tbaa !5
  store ptr %5, ptr %29, align 8, !tbaa !5
  store ptr %6, ptr %30, align 8, !tbaa !5
  store ptr %7, ptr %31, align 8, !tbaa !5
  store ptr %8, ptr %32, align 8, !tbaa !5
  store ptr %9, ptr %33, align 8, !tbaa !5
  store ptr %10, ptr %34, align 8, !tbaa !5
  store ptr %11, ptr %35, align 8, !tbaa !5
  store ptr %12, ptr %36, align 8, !tbaa !5
  store ptr %13, ptr %37, align 8, !tbaa !5
  store ptr %14, ptr %38, align 8, !tbaa !5
  store ptr %15, ptr %39, align 8, !tbaa !5
  store ptr %16, ptr %40, align 8, !tbaa !5
  store ptr %17, ptr %41, align 8, !tbaa !5
  store ptr %18, ptr %42, align 8, !tbaa !5
  store ptr %19, ptr %43, align 8, !tbaa !5
  store ptr %20, ptr %44, align 8, !tbaa !5
  store ptr %21, ptr %45, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %46) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %47) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr %48) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %49) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %50) #5
  call void @llvm.lifetime.start.p0(i64 256, ptr %51) #5
  %53 = call i32 @x509_signed_from_der(ptr noundef %46, ptr noundef %47, ptr noundef %48, ptr noundef %49, ptr noundef %50, ptr noundef %24, ptr noundef %25)
  %54 = icmp ne i32 %53, 1
  br i1 %54, label %59, label %55

55:                                               ; preds = %22
  %56 = load i64, ptr %25, align 8, !tbaa !9
  %57 = call i32 @asn1_length_is_zero(i64 noundef %56)
  %58 = icmp ne i32 %57, 1
  br i1 %58, label %59, label %65

59:                                               ; preds = %55, %22
  br label %60

60:                                               ; preds = %59
  %61 = load ptr, ptr @stderr, align 8, !tbaa !5
  %62 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %61, ptr noundef @.str.3, ptr noundef @.str.4, i32 noundef 1418, ptr noundef @__FUNCTION__.x509_cert_get_details) #5
  br label %63

63:                                               ; preds = %60
  br label %64

64:                                               ; preds = %63
  store i32 -1, ptr %23, align 4
  store i32 1, ptr %52, align 4
  br label %228

65:                                               ; preds = %55
  %66 = getelementptr inbounds %struct.anon.0, ptr %51, i32 0, i32 0
  %67 = getelementptr inbounds %struct.anon.0, ptr %51, i32 0, i32 1
  %68 = getelementptr inbounds %struct.anon.0, ptr %51, i32 0, i32 2
  %69 = getelementptr inbounds %struct.anon.0, ptr %51, i32 0, i32 3
  %70 = getelementptr inbounds %struct.anon.0, ptr %51, i32 0, i32 4
  %71 = getelementptr inbounds %struct.anon.0, ptr %51, i32 0, i32 5
  %72 = getelementptr inbounds %struct.anon.0, ptr %51, i32 0, i32 6
  %73 = getelementptr inbounds %struct.anon.0, ptr %51, i32 0, i32 7
  %74 = getelementptr inbounds %struct.anon.0, ptr %51, i32 0, i32 8
  %75 = getelementptr inbounds %struct.anon.0, ptr %51, i32 0, i32 9
  %76 = getelementptr inbounds %struct.anon.0, ptr %51, i32 0, i32 10
  %77 = getelementptr inbounds %struct.anon.0, ptr %51, i32 0, i32 11
  %78 = getelementptr inbounds %struct.anon.0, ptr %51, i32 0, i32 12
  %79 = getelementptr inbounds %struct.anon.0, ptr %51, i32 0, i32 13
  %80 = getelementptr inbounds %struct.anon.0, ptr %51, i32 0, i32 14
  %81 = getelementptr inbounds %struct.anon.0, ptr %51, i32 0, i32 15
  %82 = getelementptr inbounds %struct.anon.0, ptr %51, i32 0, i32 16
  %83 = call i32 @x509_tbs_cert_from_der(ptr noundef %66, ptr noundef %67, ptr noundef %68, ptr noundef %69, ptr noundef %70, ptr noundef %71, ptr noundef %72, ptr noundef %73, ptr noundef %74, ptr noundef %75, ptr noundef %76, ptr noundef %77, ptr noundef %78, ptr noundef %79, ptr noundef %80, ptr noundef %81, ptr noundef %82, ptr noundef %46, ptr noundef %47)
  %84 = icmp ne i32 %83, 1
  br i1 %84, label %85, label %91

85:                                               ; preds = %65
  br label %86

86:                                               ; preds = %85
  %87 = load ptr, ptr @stderr, align 8, !tbaa !5
  %88 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %87, ptr noundef @.str.3, ptr noundef @.str.4, i32 noundef 1432, ptr noundef @__FUNCTION__.x509_cert_get_details) #5
  br label %89

89:                                               ; preds = %86
  br label %90

90:                                               ; preds = %89
  store i32 -1, ptr %23, align 4
  store i32 1, ptr %52, align 4
  br label %228

91:                                               ; preds = %65
  %92 = load ptr, ptr %26, align 8, !tbaa !5
  %93 = icmp ne ptr %92, null
  br i1 %93, label %94, label %98

94:                                               ; preds = %91
  %95 = getelementptr inbounds %struct.anon.0, ptr %51, i32 0, i32 0
  %96 = load i32, ptr %95, align 8, !tbaa !11
  %97 = load ptr, ptr %26, align 8, !tbaa !5
  store i32 %96, ptr %97, align 4, !tbaa !16
  br label %98

98:                                               ; preds = %94, %91
  %99 = load ptr, ptr %27, align 8, !tbaa !5
  %100 = icmp ne ptr %99, null
  br i1 %100, label %101, label %105

101:                                              ; preds = %98
  %102 = getelementptr inbounds %struct.anon.0, ptr %51, i32 0, i32 1
  %103 = load ptr, ptr %102, align 8, !tbaa !17
  %104 = load ptr, ptr %27, align 8, !tbaa !5
  store ptr %103, ptr %104, align 8, !tbaa !5
  br label %105

105:                                              ; preds = %101, %98
  %106 = load ptr, ptr %28, align 8, !tbaa !5
  %107 = icmp ne ptr %106, null
  br i1 %107, label %108, label %112

108:                                              ; preds = %105
  %109 = getelementptr inbounds %struct.anon.0, ptr %51, i32 0, i32 2
  %110 = load i64, ptr %109, align 8, !tbaa !18
  %111 = load ptr, ptr %28, align 8, !tbaa !5
  store i64 %110, ptr %111, align 8, !tbaa !9
  br label %112

112:                                              ; preds = %108, %105
  %113 = load ptr, ptr %29, align 8, !tbaa !5
  %114 = icmp ne ptr %113, null
  br i1 %114, label %115, label %119

115:                                              ; preds = %112
  %116 = getelementptr inbounds %struct.anon.0, ptr %51, i32 0, i32 3
  %117 = load i32, ptr %116, align 8, !tbaa !19
  %118 = load ptr, ptr %29, align 8, !tbaa !5
  store i32 %117, ptr %118, align 4, !tbaa !16
  br label %119

119:                                              ; preds = %115, %112
  %120 = load ptr, ptr %30, align 8, !tbaa !5
  %121 = icmp ne ptr %120, null
  br i1 %121, label %122, label %126

122:                                              ; preds = %119
  %123 = getelementptr inbounds %struct.anon.0, ptr %51, i32 0, i32 4
  %124 = load ptr, ptr %123, align 8, !tbaa !20
  %125 = load ptr, ptr %30, align 8, !tbaa !5
  store ptr %124, ptr %125, align 8, !tbaa !5
  br label %126

126:                                              ; preds = %122, %119
  %127 = load ptr, ptr %31, align 8, !tbaa !5
  %128 = icmp ne ptr %127, null
  br i1 %128, label %129, label %133

129:                                              ; preds = %126
  %130 = getelementptr inbounds %struct.anon.0, ptr %51, i32 0, i32 5
  %131 = load i64, ptr %130, align 8, !tbaa !21
  %132 = load ptr, ptr %31, align 8, !tbaa !5
  store i64 %131, ptr %132, align 8, !tbaa !9
  br label %133

133:                                              ; preds = %129, %126
  %134 = load ptr, ptr %32, align 8, !tbaa !5
  %135 = icmp ne ptr %134, null
  br i1 %135, label %136, label %140

136:                                              ; preds = %133
  %137 = getelementptr inbounds %struct.anon.0, ptr %51, i32 0, i32 6
  %138 = load i64, ptr %137, align 8, !tbaa !22
  %139 = load ptr, ptr %32, align 8, !tbaa !5
  store i64 %138, ptr %139, align 8, !tbaa !9
  br label %140

140:                                              ; preds = %136, %133
  %141 = load ptr, ptr %33, align 8, !tbaa !5
  %142 = icmp ne ptr %141, null
  br i1 %142, label %143, label %147

143:                                              ; preds = %140
  %144 = getelementptr inbounds %struct.anon.0, ptr %51, i32 0, i32 7
  %145 = load i64, ptr %144, align 8, !tbaa !23
  %146 = load ptr, ptr %33, align 8, !tbaa !5
  store i64 %145, ptr %146, align 8, !tbaa !9
  br label %147

147:                                              ; preds = %143, %140
  %148 = load ptr, ptr %34, align 8, !tbaa !5
  %149 = icmp ne ptr %148, null
  br i1 %149, label %150, label %154

150:                                              ; preds = %147
  %151 = getelementptr inbounds %struct.anon.0, ptr %51, i32 0, i32 8
  %152 = load ptr, ptr %151, align 8, !tbaa !24
  %153 = load ptr, ptr %34, align 8, !tbaa !5
  store ptr %152, ptr %153, align 8, !tbaa !5
  br label %154

154:                                              ; preds = %150, %147
  %155 = load ptr, ptr %35, align 8, !tbaa !5
  %156 = icmp ne ptr %155, null
  br i1 %156, label %157, label %161

157:                                              ; preds = %154
  %158 = getelementptr inbounds %struct.anon.0, ptr %51, i32 0, i32 9
  %159 = load i64, ptr %158, align 8, !tbaa !25
  %160 = load ptr, ptr %35, align 8, !tbaa !5
  store i64 %159, ptr %160, align 8, !tbaa !9
  br label %161

161:                                              ; preds = %157, %154
  %162 = load ptr, ptr %36, align 8, !tbaa !5
  %163 = icmp ne ptr %162, null
  br i1 %163, label %164, label %167

164:                                              ; preds = %161
  %165 = load ptr, ptr %36, align 8, !tbaa !5
  %166 = getelementptr inbounds %struct.anon.0, ptr %51, i32 0, i32 10
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %165, ptr align 8 %166, i64 128, i1 false), !tbaa.struct !26
  br label %167

167:                                              ; preds = %164, %161
  %168 = load ptr, ptr %37, align 8, !tbaa !5
  %169 = icmp ne ptr %168, null
  br i1 %169, label %170, label %174

170:                                              ; preds = %167
  %171 = getelementptr inbounds %struct.anon.0, ptr %51, i32 0, i32 11
  %172 = load ptr, ptr %171, align 8, !tbaa !28
  %173 = load ptr, ptr %37, align 8, !tbaa !5
  store ptr %172, ptr %173, align 8, !tbaa !5
  br label %174

174:                                              ; preds = %170, %167
  %175 = load ptr, ptr %38, align 8, !tbaa !5
  %176 = icmp ne ptr %175, null
  br i1 %176, label %177, label %181

177:                                              ; preds = %174
  %178 = getelementptr inbounds %struct.anon.0, ptr %51, i32 0, i32 12
  %179 = load i64, ptr %178, align 8, !tbaa !29
  %180 = load ptr, ptr %38, align 8, !tbaa !5
  store i64 %179, ptr %180, align 8, !tbaa !9
  br label %181

181:                                              ; preds = %177, %174
  %182 = load ptr, ptr %39, align 8, !tbaa !5
  %183 = icmp ne ptr %182, null
  br i1 %183, label %184, label %188

184:                                              ; preds = %181
  %185 = getelementptr inbounds %struct.anon.0, ptr %51, i32 0, i32 13
  %186 = load ptr, ptr %185, align 8, !tbaa !30
  %187 = load ptr, ptr %39, align 8, !tbaa !5
  store ptr %186, ptr %187, align 8, !tbaa !5
  br label %188

188:                                              ; preds = %184, %181
  %189 = load ptr, ptr %40, align 8, !tbaa !5
  %190 = icmp ne ptr %189, null
  br i1 %190, label %191, label %195

191:                                              ; preds = %188
  %192 = getelementptr inbounds %struct.anon.0, ptr %51, i32 0, i32 14
  %193 = load i64, ptr %192, align 8, !tbaa !31
  %194 = load ptr, ptr %40, align 8, !tbaa !5
  store i64 %193, ptr %194, align 8, !tbaa !9
  br label %195

195:                                              ; preds = %191, %188
  %196 = load ptr, ptr %41, align 8, !tbaa !5
  %197 = icmp ne ptr %196, null
  br i1 %197, label %198, label %202

198:                                              ; preds = %195
  %199 = getelementptr inbounds %struct.anon.0, ptr %51, i32 0, i32 15
  %200 = load ptr, ptr %199, align 8, !tbaa !32
  %201 = load ptr, ptr %41, align 8, !tbaa !5
  store ptr %200, ptr %201, align 8, !tbaa !5
  br label %202

202:                                              ; preds = %198, %195
  %203 = load ptr, ptr %42, align 8, !tbaa !5
  %204 = icmp ne ptr %203, null
  br i1 %204, label %205, label %209

205:                                              ; preds = %202
  %206 = getelementptr inbounds %struct.anon.0, ptr %51, i32 0, i32 16
  %207 = load i64, ptr %206, align 8, !tbaa !33
  %208 = load ptr, ptr %42, align 8, !tbaa !5
  store i64 %207, ptr %208, align 8, !tbaa !9
  br label %209

209:                                              ; preds = %205, %202
  %210 = load ptr, ptr %43, align 8, !tbaa !5
  %211 = icmp ne ptr %210, null
  br i1 %211, label %212, label %215

212:                                              ; preds = %209
  %213 = load i32, ptr %48, align 4, !tbaa !16
  %214 = load ptr, ptr %43, align 8, !tbaa !5
  store i32 %213, ptr %214, align 4, !tbaa !16
  br label %215

215:                                              ; preds = %212, %209
  %216 = load ptr, ptr %44, align 8, !tbaa !5
  %217 = icmp ne ptr %216, null
  br i1 %217, label %218, label %221

218:                                              ; preds = %215
  %219 = load ptr, ptr %49, align 8, !tbaa !5
  %220 = load ptr, ptr %44, align 8, !tbaa !5
  store ptr %219, ptr %220, align 8, !tbaa !5
  br label %221

221:                                              ; preds = %218, %215
  %222 = load ptr, ptr %45, align 8, !tbaa !5
  %223 = icmp ne ptr %222, null
  br i1 %223, label %224, label %227

224:                                              ; preds = %221
  %225 = load i64, ptr %50, align 8, !tbaa !9
  %226 = load ptr, ptr %45, align 8, !tbaa !5
  store i64 %225, ptr %226, align 8, !tbaa !9
  br label %227

227:                                              ; preds = %224, %221
  store i32 1, ptr %23, align 4
  store i32 1, ptr %52, align 4
  br label %228

228:                                              ; preds = %227, %90, %64
  call void @llvm.lifetime.end.p0(i64 256, ptr %51) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %50) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %49) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %48) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %47) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %46) #5
  %229 = load i32, ptr %23, align 4
  ret i32 %229
}

; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: readwrite)
declare void @llvm.memcpy.p0.p0.i64(ptr noalias nocapture writeonly, ptr noalias nocapture readonly, i64, i1 immarg) #4

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

!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !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 = !{!"long", !7, i64 0}
!11 = !{!12, !13, i64 0}
!12 = !{!"", !13, i64 0, !6, i64 8, !10, i64 16, !13, i64 24, !6, i64 32, !10, i64 40, !10, i64 48, !10, i64 56, !6, i64 64, !10, i64 72, !14, i64 80, !6, i64 208, !10, i64 216, !6, i64 224, !10, i64 232, !6, i64 240, !10, i64 248}
!13 = !{!"int", !7, i64 0}
!14 = !{!"", !15, i64 0, !7, i64 96}
!15 = !{!"", !7, i64 0, !7, i64 32, !7, i64 64}
!16 = !{!13, !13, i64 0}
!17 = !{!12, !6, i64 8}
!18 = !{!12, !10, i64 16}
!19 = !{!12, !13, i64 24}
!20 = !{!12, !6, i64 32}
!21 = !{!12, !10, i64 40}
!22 = !{!12, !10, i64 48}
!23 = !{!12, !10, i64 56}
!24 = !{!12, !6, i64 64}
!25 = !{!12, !10, i64 72}
!26 = !{i64 0, i64 32, !27, i64 32, i64 32, !27, i64 64, i64 32, !27, i64 96, i64 32, !27}
!27 = !{!7, !7, i64 0}
!28 = !{!12, !6, i64 208}
!29 = !{!12, !10, i64 216}
!30 = !{!12, !6, i64 224}
!31 = !{!12, !10, i64 232}
!32 = !{!12, !6, i64 240}
!33 = !{!12, !10, i64 248}


; 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.anon.0 = type { i32, ptr, i64, i32, ptr, i64, i64, i64, ptr, i64, %struct.SM2_KEY, ptr, i64, ptr, i64, ptr, i64 }
%struct.SM2_KEY = type { %struct.SM2_Z256_POINT, [4 x i64] }
%struct.SM2_Z256_POINT = type { [4 x i64], [4 x i64], [4 x i64] }

@stderr = external local_unnamed_addr global ptr, align 8
@.str.3 = external hidden unnamed_addr constant [13 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [62 x i8], align 1
@__FUNCTION__.x509_cert_get_details = external hidden unnamed_addr constant [22 x i8], align 1

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

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

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

declare i32 @asn1_length_is_zero(i64 noundef) local_unnamed_addr #2

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

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

; Function Attrs: nounwind uwtable
define dso_local range(i32 -1, 2) i32 @x509_cert_get_details(ptr noundef %0, i64 noundef %1, ptr noundef writeonly %2, ptr noundef writeonly %3, ptr noundef writeonly %4, ptr noundef writeonly %5, ptr noundef writeonly %6, ptr noundef writeonly %7, ptr noundef writeonly %8, ptr noundef writeonly %9, ptr noundef writeonly %10, ptr noundef writeonly %11, ptr noundef writeonly %12, ptr noundef writeonly %13, ptr noundef writeonly %14, ptr noundef writeonly %15, ptr noundef writeonly %16, ptr noundef writeonly %17, ptr noundef writeonly %18, ptr noundef writeonly %19, ptr noundef writeonly %20, ptr noundef writeonly %21) local_unnamed_addr #3 {
  %23 = alloca ptr, align 8
  %24 = alloca i64, align 8
  %25 = alloca ptr, align 8
  %26 = alloca i64, align 8
  %27 = alloca i32, align 4
  %28 = alloca ptr, align 8
  %29 = alloca i64, align 8
  %30 = alloca %struct.anon.0, align 8
  store ptr %0, ptr %23, align 8, !tbaa !5
  store i64 %1, ptr %24, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %25) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %26) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %27) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %28) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %29) #5
  call void @llvm.lifetime.start.p0(i64 256, ptr nonnull %30) #5
  %31 = call i32 @x509_signed_from_der(ptr noundef nonnull %25, ptr noundef nonnull %26, ptr noundef nonnull %27, ptr noundef nonnull %28, ptr noundef nonnull %29, ptr noundef nonnull %23, ptr noundef nonnull %24)
  %.not = icmp eq i32 %31, 1
  br i1 %.not, label %32, label %35

32:                                               ; preds = %22
  %33 = load i64, ptr %24, align 8, !tbaa !9
  %34 = call i32 @asn1_length_is_zero(i64 noundef %33) #5
  %.not60 = icmp eq i32 %34, 1
  br i1 %.not60, label %38, label %35

35:                                               ; preds = %22, %32
  %36 = load ptr, ptr @stderr, align 8, !tbaa !5
  %37 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %36, ptr noundef nonnull @.str.3, ptr noundef nonnull @.str.4, i32 noundef 1418, ptr noundef nonnull @__FUNCTION__.x509_cert_get_details) #6
  br label %118

38:                                               ; preds = %32
  %39 = getelementptr inbounds i8, ptr %30, i64 8
  %40 = getelementptr inbounds i8, ptr %30, i64 16
  %41 = getelementptr inbounds i8, ptr %30, i64 24
  %42 = getelementptr inbounds i8, ptr %30, i64 32
  %43 = getelementptr inbounds i8, ptr %30, i64 40
  %44 = getelementptr inbounds i8, ptr %30, i64 48
  %45 = getelementptr inbounds i8, ptr %30, i64 56
  %46 = getelementptr inbounds i8, ptr %30, i64 64
  %47 = getelementptr inbounds i8, ptr %30, i64 72
  %48 = getelementptr inbounds i8, ptr %30, i64 80
  %49 = getelementptr inbounds i8, ptr %30, i64 208
  %50 = getelementptr inbounds i8, ptr %30, i64 216
  %51 = getelementptr inbounds i8, ptr %30, i64 224
  %52 = getelementptr inbounds i8, ptr %30, i64 232
  %53 = getelementptr inbounds i8, ptr %30, i64 240
  %54 = getelementptr inbounds i8, ptr %30, i64 248
  %55 = call i32 @x509_tbs_cert_from_der(ptr noundef nonnull %30, ptr noundef nonnull %39, ptr noundef nonnull %40, ptr noundef nonnull %41, ptr noundef nonnull %42, ptr noundef nonnull %43, ptr noundef nonnull %44, ptr noundef nonnull %45, ptr noundef nonnull %46, ptr noundef nonnull %47, ptr noundef nonnull %48, ptr noundef nonnull %49, ptr noundef nonnull %50, ptr noundef nonnull %51, ptr noundef nonnull %52, ptr noundef nonnull %53, ptr noundef nonnull %54, ptr noundef nonnull %25, ptr noundef nonnull %26)
  %.not61 = icmp eq i32 %55, 1
  br i1 %.not61, label %59, label %56

56:                                               ; preds = %38
  %57 = load ptr, ptr @stderr, align 8, !tbaa !5
  %58 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %57, ptr noundef nonnull @.str.3, ptr noundef nonnull @.str.4, i32 noundef 1432, ptr noundef nonnull @__FUNCTION__.x509_cert_get_details) #6
  br label %118

59:                                               ; preds = %38
  %.not62 = icmp eq ptr %2, null
  br i1 %.not62, label %62, label %60

60:                                               ; preds = %59
  %61 = load i32, ptr %30, align 8, !tbaa !11
  store i32 %61, ptr %2, align 4, !tbaa !16
  br label %62

62:                                               ; preds = %60, %59
  %.not63 = icmp eq ptr %3, null
  br i1 %.not63, label %65, label %63

63:                                               ; preds = %62
  %64 = load ptr, ptr %39, align 8, !tbaa !17
  store ptr %64, ptr %3, align 8, !tbaa !5
  br label %65

65:                                               ; preds = %63, %62
  %.not64 = icmp eq ptr %4, null
  br i1 %.not64, label %68, label %66

66:                                               ; preds = %65
  %67 = load i64, ptr %40, align 8, !tbaa !18
  store i64 %67, ptr %4, align 8, !tbaa !9
  br label %68

68:                                               ; preds = %66, %65
  %.not65 = icmp eq ptr %5, null
  br i1 %.not65, label %71, label %69

69:                                               ; preds = %68
  %70 = load i32, ptr %41, align 8, !tbaa !19
  store i32 %70, ptr %5, align 4, !tbaa !16
  br label %71

71:                                               ; preds = %69, %68
  %.not66 = icmp eq ptr %6, null
  br i1 %.not66, label %74, label %72

72:                                               ; preds = %71
  %73 = load ptr, ptr %42, align 8, !tbaa !20
  store ptr %73, ptr %6, align 8, !tbaa !5
  br label %74

74:                                               ; preds = %72, %71
  %.not67 = icmp eq ptr %7, null
  br i1 %.not67, label %77, label %75

75:                                               ; preds = %74
  %76 = load i64, ptr %43, align 8, !tbaa !21
  store i64 %76, ptr %7, align 8, !tbaa !9
  br label %77

77:                                               ; preds = %75, %74
  %.not68 = icmp eq ptr %8, null
  br i1 %.not68, label %80, label %78

78:                                               ; preds = %77
  %79 = load i64, ptr %44, align 8, !tbaa !22
  store i64 %79, ptr %8, align 8, !tbaa !9
  br label %80

80:                                               ; preds = %78, %77
  %.not69 = icmp eq ptr %9, null
  br i1 %.not69, label %83, label %81

81:                                               ; preds = %80
  %82 = load i64, ptr %45, align 8, !tbaa !23
  store i64 %82, ptr %9, align 8, !tbaa !9
  br label %83

83:                                               ; preds = %81, %80
  %.not70 = icmp eq ptr %10, null
  br i1 %.not70, label %86, label %84

84:                                               ; preds = %83
  %85 = load ptr, ptr %46, align 8, !tbaa !24
  store ptr %85, ptr %10, align 8, !tbaa !5
  br label %86

86:                                               ; preds = %84, %83
  %.not71 = icmp eq ptr %11, null
  br i1 %.not71, label %89, label %87

87:                                               ; preds = %86
  %88 = load i64, ptr %47, align 8, !tbaa !25
  store i64 %88, ptr %11, align 8, !tbaa !9
  br label %89

89:                                               ; preds = %87, %86
  %.not72 = icmp eq ptr %12, null
  br i1 %.not72, label %91, label %90

90:                                               ; preds = %89
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 8 dereferenceable(128) %12, ptr noundef nonnull align 8 dereferenceable(128) %48, i64 128, i1 false), !tbaa.struct !26
  br label %91

91:                                               ; preds = %90, %89
  %.not73 = icmp eq ptr %13, null
  br i1 %.not73, label %94, label %92

92:                                               ; preds = %91
  %93 = load ptr, ptr %49, align 8, !tbaa !28
  store ptr %93, ptr %13, align 8, !tbaa !5
  br label %94

94:                                               ; preds = %92, %91
  %.not74 = icmp eq ptr %14, null
  br i1 %.not74, label %97, label %95

95:                                               ; preds = %94
  %96 = load i64, ptr %50, align 8, !tbaa !29
  store i64 %96, ptr %14, align 8, !tbaa !9
  br label %97

97:                                               ; preds = %95, %94
  %.not75 = icmp eq ptr %15, null
  br i1 %.not75, label %100, label %98

98:                                               ; preds = %97
  %99 = load ptr, ptr %51, align 8, !tbaa !30
  store ptr %99, ptr %15, align 8, !tbaa !5
  br label %100

100:                                              ; preds = %98, %97
  %.not76 = icmp eq ptr %16, null
  br i1 %.not76, label %103, label %101

101:                                              ; preds = %100
  %102 = load i64, ptr %52, align 8, !tbaa !31
  store i64 %102, ptr %16, align 8, !tbaa !9
  br label %103

103:                                              ; preds = %101, %100
  %.not77 = icmp eq ptr %17, null
  br i1 %.not77, label %106, label %104

104:                                              ; preds = %103
  %105 = load ptr, ptr %53, align 8, !tbaa !32
  store ptr %105, ptr %17, align 8, !tbaa !5
  br label %106

106:                                              ; preds = %104, %103
  %.not78 = icmp eq ptr %18, null
  br i1 %.not78, label %109, label %107

107:                                              ; preds = %106
  %108 = load i64, ptr %54, align 8, !tbaa !33
  store i64 %108, ptr %18, align 8, !tbaa !9
  br label %109

109:                                              ; preds = %107, %106
  %.not79 = icmp eq ptr %19, null
  br i1 %.not79, label %112, label %110

110:                                              ; preds = %109
  %111 = load i32, ptr %27, align 4, !tbaa !16
  store i32 %111, ptr %19, align 4, !tbaa !16
  br label %112

112:                                              ; preds = %110, %109
  %.not80 = icmp eq ptr %20, null
  br i1 %.not80, label %115, label %113

113:                                              ; preds = %112
  %114 = load ptr, ptr %28, align 8, !tbaa !5
  store ptr %114, ptr %20, align 8, !tbaa !5
  br label %115

115:                                              ; preds = %113, %112
  %.not81 = icmp eq ptr %21, null
  br i1 %.not81, label %118, label %116

116:                                              ; preds = %115
  %117 = load i64, ptr %29, align 8, !tbaa !9
  store i64 %117, ptr %21, align 8, !tbaa !9
  br label %118

118:                                              ; preds = %115, %116, %56, %35
  %.0 = phi i32 [ -1, %35 ], [ -1, %56 ], [ 1, %116 ], [ 1, %115 ]
  call void @llvm.lifetime.end.p0(i64 256, ptr nonnull %30) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %29) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %28) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %27) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %26) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %25) #5
  ret i32 %.0
}

; Function Attrs: mustprogress nocallback nofree nounwind willreturn memory(argmem: readwrite)
declare void @llvm.memcpy.p0.p0.i64(ptr noalias nocapture writeonly, ptr noalias nocapture readonly, i64, i1 immarg) #4

attributes #0 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { 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 #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 uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #5 = { nounwind }
attributes #6 = { cold nounwind }

!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"long", !7, i64 0}
!11 = !{!12, !13, i64 0}
!12 = !{!"", !13, i64 0, !6, i64 8, !10, i64 16, !13, i64 24, !6, i64 32, !10, i64 40, !10, i64 48, !10, i64 56, !6, i64 64, !10, i64 72, !14, i64 80, !6, i64 208, !10, i64 216, !6, i64 224, !10, i64 232, !6, i64 240, !10, i64 248}
!13 = !{!"int", !7, i64 0}
!14 = !{!"", !15, i64 0, !7, i64 96}
!15 = !{!"", !7, i64 0, !7, i64 32, !7, i64 64}
!16 = !{!13, !13, i64 0}
!17 = !{!12, !6, i64 8}
!18 = !{!12, !10, i64 16}
!19 = !{!12, !13, i64 24}
!20 = !{!12, !6, i64 32}
!21 = !{!12, !10, i64 40}
!22 = !{!12, !10, i64 48}
!23 = !{!12, !10, i64 56}
!24 = !{!12, !6, i64 64}
!25 = !{!12, !10, i64 72}
!26 = !{i64 0, i64 32, !27, i64 32, i64 32, !27, i64 64, i64 32, !27, i64 96, i64 32, !27}
!27 = !{!7, !7, i64 0}
!28 = !{!12, !6, i64 208}
!29 = !{!12, !10, i64 216}
!30 = !{!12, !6, i64 224}
!31 = !{!12, !10, i64 232}
!32 = !{!12, !6, i64 240}
!33 = !{!12, !10, i64 248}


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