; LLVM IR from specinfo-ua/UAPKI :: library/common/pkix (extension-helper-json)

; 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.BIT_STRING_s = type { ptr, i32, i32, %struct.asn_struct_ctx_s }
%struct.asn_struct_ctx_s = type { i16, i16, i32, ptr, i64 }

@.str = external hidden unnamed_addr constant [38 x i8], align 1
@_ZN7UapkiNSL15KEY_USAGE_NAMESE = external hidden global [9 x ptr], align 16

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

declare ptr @asn_decode_ba_with_alloc(ptr noundef, ptr noundef) #1

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

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

declare void @asn_free(ptr noundef, ptr noundef) #1

declare noundef i32 @_ZN12ParsonHelper20jsonObjectSetBooleanEP13json_object_tPKcb(ptr noundef, ptr noundef, i1 noundef zeroext) #1

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

11:                                               ; preds = %2
  %12 = call ptr @get_KeyUsage_desc()
  %13 = load ptr, ptr %4, align 8, !tbaa !5
  %14 = call ptr @asn_decode_ba_with_alloc(ptr noundef %12, ptr noundef %13)
  store ptr %14, ptr %7, align 8, !tbaa !5
  %15 = icmp eq ptr null, %14
  br i1 %15, label %16, label %18

16:                                               ; preds = %11
  store i32 2, ptr %6, align 4, !tbaa !9
  %17 = load i32, ptr %6, align 4, !tbaa !9
  call void @stacktrace_add(ptr noundef @.str, i64 noundef 414, i32 noundef %17)
  br label %65

18:                                               ; preds = %11
  br label %19

19:                                               ; preds = %18
  br label %20

20:                                               ; preds = %19
  %21 = load ptr, ptr %7, align 8, !tbaa !5
  %22 = getelementptr inbounds %struct.BIT_STRING_s, ptr %21, i32 0, i32 1
  %23 = load i32, ptr %22, align 8, !tbaa !11
  %24 = icmp sgt i32 %23, 0
  br i1 %24, label %25, label %64

25:                                               ; preds = %20
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #3
  store i32 0, ptr %8, align 4, !tbaa !9
  br label %26

26:                                               ; preds = %58, %25
  %27 = load i32, ptr %8, align 4, !tbaa !9
  %28 = icmp slt i32 %27, 9
  br i1 %28, label %30, label %29

29:                                               ; preds = %26
  store i32 5, ptr %9, align 4
  br label %61

30:                                               ; preds = %26
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #3
  store i32 0, ptr %10, align 4, !tbaa !9
  br label %31

31:                                               ; preds = %30
  %32 = load ptr, ptr %7, align 8, !tbaa !5
  %33 = load i32, ptr %8, align 4, !tbaa !9
  %34 = call i32 @asn_BITSTRING_get_bit(ptr noundef %32, i32 noundef %33, ptr noundef %10)
  store i32 %34, ptr %6, align 4, !tbaa !9
  %35 = load i32, ptr %6, align 4, !tbaa !9
  %36 = icmp ne i32 %35, 0
  br i1 %36, label %37, label %39

37:                                               ; preds = %31
  %38 = load i32, ptr %6, align 4, !tbaa !9
  call void @stacktrace_add(ptr noundef @.str, i64 noundef 419, i32 noundef %38)
  store i32 4, ptr %9, align 4
  br label %55

39:                                               ; preds = %31
  br label %40

40:                                               ; preds = %39
  br label %41

41:                                               ; preds = %40
  %42 = load i32, ptr %10, align 4, !tbaa !9
  %43 = icmp ne i32 %42, 0
  br i1 %43, label %44, label %54

44:                                               ; preds = %41
  %45 = load ptr, ptr %5, align 8, !tbaa !5
  %46 = load i32, ptr %8, align 4, !tbaa !9
  %47 = sext i32 %46 to i64
  %48 = getelementptr inbounds [9 x ptr], ptr @_ZN7UapkiNSL15KEY_USAGE_NAMESE, i64 0, i64 %47
  %49 = load ptr, ptr %48, align 8, !tbaa !5
  %50 = call noundef i32 @_ZN12ParsonHelper20jsonObjectSetBooleanEP13json_object_tPKcb(ptr noundef %45, ptr noundef %49, i1 noundef zeroext true)
  %51 = icmp ne i32 %50, 0
  br i1 %51, label %52, label %53

52:                                               ; preds = %44
  store i32 4113, ptr %6, align 4, !tbaa !9
  store i32 4, ptr %9, align 4
  br label %55

53:                                               ; preds = %44
  br label %54

54:                                               ; preds = %53, %41
  store i32 0, ptr %9, align 4
  br label %55

55:                                               ; preds = %54, %52, %37
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #3
  %56 = load i32, ptr %9, align 4
  switch i32 %56, label %61 [
    i32 0, label %57
  ]

57:                                               ; preds = %55
  br label %58

58:                                               ; preds = %57
  %59 = load i32, ptr %8, align 4, !tbaa !9
  %60 = add nsw i32 %59, 1
  store i32 %60, ptr %8, align 4, !tbaa !9
  br label %26, !llvm.loop !16

61:                                               ; preds = %55, %29
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #3
  %62 = load i32, ptr %9, align 4
  switch i32 %62, label %69 [
    i32 5, label %63
    i32 4, label %65
  ]

63:                                               ; preds = %61
  br label %64

64:                                               ; preds = %63, %20
  br label %65

65:                                               ; preds = %64, %61, %16
  %66 = call ptr @get_KeyUsage_desc()
  %67 = load ptr, ptr %7, align 8, !tbaa !5
  call void @asn_free(ptr noundef %66, ptr noundef %67)
  %68 = load i32, ptr %6, align 4, !tbaa !9
  store i32 %68, ptr %3, align 4
  store i32 1, ptr %9, align 4
  br label %69

69:                                               ; preds = %65, %61
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #3
  %70 = load i32, ptr %3, align 4
  ret i32 %70
}

declare ptr @get_KeyUsage_desc() #1

declare i32 @asn_BITSTRING_get_bit(ptr noundef, i32 noundef, ptr noundef) #1

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #2 = { mustprogress 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 #3 = { 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++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"int", !7, i64 0}
!11 = !{!12, !10, i64 8}
!12 = !{!"_ZTS12BIT_STRING_s", !6, i64 0, !10, i64 8, !10, i64 12, !13, i64 16}
!13 = !{!"_ZTS16asn_struct_ctx_s", !14, i64 0, !14, i64 2, !10, i64 4, !6, i64 8, !15, i64 16}
!14 = !{!"short", !7, i64 0}
!15 = !{!"long", !7, i64 0}
!16 = distinct !{!16, !17}
!17 = !{!"llvm.loop.mustprogress"}


; Optimized IR (opt -passes='default<O3>'):
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"

@.str = external hidden unnamed_addr constant [38 x i8], align 1
@_ZN7UapkiNSL15KEY_USAGE_NAMESE = external hidden local_unnamed_addr global [9 x ptr], align 16

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

declare ptr @asn_decode_ba_with_alloc(ptr noundef, ptr noundef) local_unnamed_addr #1

declare void @stacktrace_add(ptr noundef, i64 noundef, i32 noundef) 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 void @asn_free(ptr noundef, ptr noundef) local_unnamed_addr #1

declare noundef i32 @_ZN12ParsonHelper20jsonObjectSetBooleanEP13json_object_tPKcb(ptr noundef, ptr noundef, i1 noundef zeroext) local_unnamed_addr #1

; Function Attrs: mustprogress uwtable
define dso_local noundef i32 @_ZN7UapkiNS15ExtensionHelper18DecodeToJsonObject8keyUsageEPK12ByteArray_stP13json_object_t(ptr noundef %0, ptr noundef %1) local_unnamed_addr #2 {
  %3 = alloca i32, align 4
  %4 = tail call ptr @get_KeyUsage_desc()
  %5 = tail call ptr @asn_decode_ba_with_alloc(ptr noundef %4, ptr noundef %0)
  %6 = icmp eq ptr %5, null
  br i1 %6, label %7, label %8

7:                                                ; preds = %2
  tail call void @stacktrace_add(ptr noundef nonnull @.str, i64 noundef 414, i32 noundef 2)
  br label %.loopexit

8:                                                ; preds = %2
  %9 = getelementptr inbounds i8, ptr %5, i64 8
  %10 = load i32, ptr %9, align 8, !tbaa !5
  %11 = icmp sgt i32 %10, 0
  br i1 %11, label %.preheader.preheader, label %.loopexit

.preheader.preheader:                             ; preds = %8
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %3) #3
  store i32 0, ptr %3, align 4, !tbaa !14
  %12 = call i32 @asn_BITSTRING_get_bit(ptr noundef nonnull %5, i32 noundef 0, ptr noundef nonnull %3)
  %.not = icmp eq i32 %12, 0
  br i1 %.not, label %14, label %13

13:                                               ; preds = %.preheader.8, %.preheader.7, %.preheader.6, %.preheader.5, %.preheader.4, %.preheader.3, %.preheader.2, %.preheader.1, %.preheader.preheader
  %.lcssa = phi i32 [ %12, %.preheader.preheader ], [ %19, %.preheader.1 ], [ %25, %.preheader.2 ], [ %31, %.preheader.3 ], [ %37, %.preheader.4 ], [ %43, %.preheader.5 ], [ %49, %.preheader.6 ], [ %55, %.preheader.7 ], [ %61, %.preheader.8 ]
  call void @stacktrace_add(ptr noundef nonnull @.str, i64 noundef 419, i32 noundef %.lcssa)
  br label %.thread

14:                                               ; preds = %.preheader.preheader
  %15 = load i32, ptr %3, align 4, !tbaa !14
  %.not22 = icmp eq i32 %15, 0
  br i1 %.not22, label %.preheader.1, label %16

16:                                               ; preds = %14
  %17 = load ptr, ptr @_ZN7UapkiNSL15KEY_USAGE_NAMESE, align 16, !tbaa !15
  %18 = call noundef i32 @_ZN12ParsonHelper20jsonObjectSetBooleanEP13json_object_tPKcb(ptr noundef %1, ptr noundef %17, i1 noundef zeroext true)
  %.not23 = icmp eq i32 %18, 0
  br i1 %.not23, label %.preheader.1, label %.thread

.thread:                                          ; preds = %16, %22, %28, %34, %40, %46, %52, %58, %64, %13
  %.117.ph = phi i32 [ %.lcssa, %13 ], [ 4113, %64 ], [ 4113, %58 ], [ 4113, %52 ], [ 4113, %46 ], [ 4113, %40 ], [ 4113, %34 ], [ 4113, %28 ], [ 4113, %22 ], [ 4113, %16 ]
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %3) #3
  br label %.loopexit

.preheader.1:                                     ; preds = %16, %14
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %3) #3
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %3) #3
  store i32 0, ptr %3, align 4, !tbaa !14
  %19 = call i32 @asn_BITSTRING_get_bit(ptr noundef nonnull %5, i32 noundef 1, ptr noundef nonnull %3)
  %.not.1 = icmp eq i32 %19, 0
  br i1 %.not.1, label %20, label %13

20:                                               ; preds = %.preheader.1
  %21 = load i32, ptr %3, align 4, !tbaa !14
  %.not22.1 = icmp eq i32 %21, 0
  br i1 %.not22.1, label %.preheader.2, label %22

22:                                               ; preds = %20
  %23 = load ptr, ptr getelementptr inbounds (i8, ptr @_ZN7UapkiNSL15KEY_USAGE_NAMESE, i64 8), align 8, !tbaa !15
  %24 = call noundef i32 @_ZN12ParsonHelper20jsonObjectSetBooleanEP13json_object_tPKcb(ptr noundef %1, ptr noundef %23, i1 noundef zeroext true)
  %.not23.1 = icmp eq i32 %24, 0
  br i1 %.not23.1, label %.preheader.2, label %.thread

.preheader.2:                                     ; preds = %22, %20
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %3) #3
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %3) #3
  store i32 0, ptr %3, align 4, !tbaa !14
  %25 = call i32 @asn_BITSTRING_get_bit(ptr noundef nonnull %5, i32 noundef 2, ptr noundef nonnull %3)
  %.not.2 = icmp eq i32 %25, 0
  br i1 %.not.2, label %26, label %13

26:                                               ; preds = %.preheader.2
  %27 = load i32, ptr %3, align 4, !tbaa !14
  %.not22.2 = icmp eq i32 %27, 0
  br i1 %.not22.2, label %.preheader.3, label %28

28:                                               ; preds = %26
  %29 = load ptr, ptr getelementptr inbounds (i8, ptr @_ZN7UapkiNSL15KEY_USAGE_NAMESE, i64 16), align 16, !tbaa !15
  %30 = call noundef i32 @_ZN12ParsonHelper20jsonObjectSetBooleanEP13json_object_tPKcb(ptr noundef %1, ptr noundef %29, i1 noundef zeroext true)
  %.not23.2 = icmp eq i32 %30, 0
  br i1 %.not23.2, label %.preheader.3, label %.thread

.preheader.3:                                     ; preds = %28, %26
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %3) #3
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %3) #3
  store i32 0, ptr %3, align 4, !tbaa !14
  %31 = call i32 @asn_BITSTRING_get_bit(ptr noundef nonnull %5, i32 noundef 3, ptr noundef nonnull %3)
  %.not.3 = icmp eq i32 %31, 0
  br i1 %.not.3, label %32, label %13

32:                                               ; preds = %.preheader.3
  %33 = load i32, ptr %3, align 4, !tbaa !14
  %.not22.3 = icmp eq i32 %33, 0
  br i1 %.not22.3, label %.preheader.4, label %34

34:                                               ; preds = %32
  %35 = load ptr, ptr getelementptr inbounds (i8, ptr @_ZN7UapkiNSL15KEY_USAGE_NAMESE, i64 24), align 8, !tbaa !15
  %36 = call noundef i32 @_ZN12ParsonHelper20jsonObjectSetBooleanEP13json_object_tPKcb(ptr noundef %1, ptr noundef %35, i1 noundef zeroext true)
  %.not23.3 = icmp eq i32 %36, 0
  br i1 %.not23.3, label %.preheader.4, label %.thread

.preheader.4:                                     ; preds = %34, %32
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %3) #3
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %3) #3
  store i32 0, ptr %3, align 4, !tbaa !14
  %37 = call i32 @asn_BITSTRING_get_bit(ptr noundef nonnull %5, i32 noundef 4, ptr noundef nonnull %3)
  %.not.4 = icmp eq i32 %37, 0
  br i1 %.not.4, label %38, label %13

38:                                               ; preds = %.preheader.4
  %39 = load i32, ptr %3, align 4, !tbaa !14
  %.not22.4 = icmp eq i32 %39, 0
  br i1 %.not22.4, label %.preheader.5, label %40

40:                                               ; preds = %38
  %41 = load ptr, ptr getelementptr inbounds (i8, ptr @_ZN7UapkiNSL15KEY_USAGE_NAMESE, i64 32), align 16, !tbaa !15
  %42 = call noundef i32 @_ZN12ParsonHelper20jsonObjectSetBooleanEP13json_object_tPKcb(ptr noundef %1, ptr noundef %41, i1 noundef zeroext true)
  %.not23.4 = icmp eq i32 %42, 0
  br i1 %.not23.4, label %.preheader.5, label %.thread

.preheader.5:                                     ; preds = %40, %38
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %3) #3
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %3) #3
  store i32 0, ptr %3, align 4, !tbaa !14
  %43 = call i32 @asn_BITSTRING_get_bit(ptr noundef nonnull %5, i32 noundef 5, ptr noundef nonnull %3)
  %.not.5 = icmp eq i32 %43, 0
  br i1 %.not.5, label %44, label %13

44:                                               ; preds = %.preheader.5
  %45 = load i32, ptr %3, align 4, !tbaa !14
  %.not22.5 = icmp eq i32 %45, 0
  br i1 %.not22.5, label %.preheader.6, label %46

46:                                               ; preds = %44
  %47 = load ptr, ptr getelementptr inbounds (i8, ptr @_ZN7UapkiNSL15KEY_USAGE_NAMESE, i64 40), align 8, !tbaa !15
  %48 = call noundef i32 @_ZN12ParsonHelper20jsonObjectSetBooleanEP13json_object_tPKcb(ptr noundef %1, ptr noundef %47, i1 noundef zeroext true)
  %.not23.5 = icmp eq i32 %48, 0
  br i1 %.not23.5, label %.preheader.6, label %.thread

.preheader.6:                                     ; preds = %46, %44
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %3) #3
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %3) #3
  store i32 0, ptr %3, align 4, !tbaa !14
  %49 = call i32 @asn_BITSTRING_get_bit(ptr noundef nonnull %5, i32 noundef 6, ptr noundef nonnull %3)
  %.not.6 = icmp eq i32 %49, 0
  br i1 %.not.6, label %50, label %13

50:                                               ; preds = %.preheader.6
  %51 = load i32, ptr %3, align 4, !tbaa !14
  %.not22.6 = icmp eq i32 %51, 0
  br i1 %.not22.6, label %.preheader.7, label %52

52:                                               ; preds = %50
  %53 = load ptr, ptr getelementptr inbounds (i8, ptr @_ZN7UapkiNSL15KEY_USAGE_NAMESE, i64 48), align 16, !tbaa !15
  %54 = call noundef i32 @_ZN12ParsonHelper20jsonObjectSetBooleanEP13json_object_tPKcb(ptr noundef %1, ptr noundef %53, i1 noundef zeroext true)
  %.not23.6 = icmp eq i32 %54, 0
  br i1 %.not23.6, label %.preheader.7, label %.thread

.preheader.7:                                     ; preds = %52, %50
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %3) #3
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %3) #3
  store i32 0, ptr %3, align 4, !tbaa !14
  %55 = call i32 @asn_BITSTRING_get_bit(ptr noundef nonnull %5, i32 noundef 7, ptr noundef nonnull %3)
  %.not.7 = icmp eq i32 %55, 0
  br i1 %.not.7, label %56, label %13

56:                                               ; preds = %.preheader.7
  %57 = load i32, ptr %3, align 4, !tbaa !14
  %.not22.7 = icmp eq i32 %57, 0
  br i1 %.not22.7, label %.preheader.8, label %58

58:                                               ; preds = %56
  %59 = load ptr, ptr getelementptr inbounds (i8, ptr @_ZN7UapkiNSL15KEY_USAGE_NAMESE, i64 56), align 8, !tbaa !15
  %60 = call noundef i32 @_ZN12ParsonHelper20jsonObjectSetBooleanEP13json_object_tPKcb(ptr noundef %1, ptr noundef %59, i1 noundef zeroext true)
  %.not23.7 = icmp eq i32 %60, 0
  br i1 %.not23.7, label %.preheader.8, label %.thread

.preheader.8:                                     ; preds = %58, %56
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %3) #3
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %3) #3
  store i32 0, ptr %3, align 4, !tbaa !14
  %61 = call i32 @asn_BITSTRING_get_bit(ptr noundef nonnull %5, i32 noundef 8, ptr noundef nonnull %3)
  %.not.8 = icmp eq i32 %61, 0
  br i1 %.not.8, label %62, label %13

62:                                               ; preds = %.preheader.8
  %63 = load i32, ptr %3, align 4, !tbaa !14
  %.not22.8 = icmp eq i32 %63, 0
  br i1 %.not22.8, label %.loopexit.loopexit, label %64

64:                                               ; preds = %62
  %65 = load ptr, ptr getelementptr inbounds (i8, ptr @_ZN7UapkiNSL15KEY_USAGE_NAMESE, i64 64), align 16, !tbaa !15
  %66 = call noundef i32 @_ZN12ParsonHelper20jsonObjectSetBooleanEP13json_object_tPKcb(ptr noundef %1, ptr noundef %65, i1 noundef zeroext true)
  %.not23.8 = icmp eq i32 %66, 0
  br i1 %.not23.8, label %.loopexit.loopexit, label %.thread

.loopexit.loopexit:                               ; preds = %64, %62
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %3) #3
  br label %.loopexit

.loopexit:                                        ; preds = %.loopexit.loopexit, %.thread, %8, %7
  %.3 = phi i32 [ 2, %7 ], [ 0, %8 ], [ %.117.ph, %.thread ], [ 0, %.loopexit.loopexit ]
  %67 = call ptr @get_KeyUsage_desc()
  call void @asn_free(ptr noundef %67, ptr noundef %5)
  ret i32 %.3
}

declare ptr @get_KeyUsage_desc() local_unnamed_addr #1

declare i32 @asn_BITSTRING_get_bit(ptr noundef, i32 noundef, ptr noundef) local_unnamed_addr #1

attributes #0 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #2 = { mustprogress 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 #3 = { 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, !10, i64 8}
!6 = !{!"_ZTS12BIT_STRING_s", !7, i64 0, !10, i64 8, !10, i64 12, !11, i64 16}
!7 = !{!"any pointer", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C++ TBAA"}
!10 = !{!"int", !8, i64 0}
!11 = !{!"_ZTS16asn_struct_ctx_s", !12, i64 0, !12, i64 2, !10, i64 4, !7, i64 8, !13, i64 16}
!12 = !{!"short", !8, i64 0}
!13 = !{!"long", !8, i64 0}
!14 = !{!10, !10, i64 0}
!15 = !{!7, !7, i64 0}


; Effective O3 passes: CorrelatedValuePropagationPass,GVNPass,GlobalOptPass,IPSCCPPass,IndVarSimplifyPass,InferAlignmentPass,InferFunctionAttrsPass,InstCombinePass,JumpThreadingPass,LCSSAPass,LoopRotatePass,LoopSimplifyPass,SROAPass,SimplifyCFGPass,TailCallElimPass