; LLVM IR from specinfo-ua/UAPKI :: library/uapkif/src/asn1 (asn1-utils)

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

@.str = external hidden unnamed_addr constant [25 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

declare void @stacktrace_create(ptr noundef, i64 noundef, i32 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

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

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

; Function Attrs: nounwind uwtable
define dso_local i32 @asn_bytes2INTEGER(ptr noundef %0, ptr noundef %1, i64 noundef %2) #4 {
  %4 = alloca ptr, align 8
  %5 = alloca ptr, align 8
  %6 = alloca i64, align 8
  %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 i32, align 4
  store ptr %0, ptr %4, align 8, !tbaa !5
  store ptr %1, ptr %5, align 8, !tbaa !5
  store i64 %2, ptr %6, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #5
  store i32 0, ptr %12, align 4, !tbaa !11
  br label %13

13:                                               ; preds = %3
  %14 = load ptr, ptr %4, align 8, !tbaa !5
  %15 = icmp ne ptr %14, null
  br i1 %15, label %18, label %16

16:                                               ; preds = %13
  store i32 2, ptr %12, align 4, !tbaa !11
  %17 = load i32, ptr %12, align 4, !tbaa !11
  call void @stacktrace_create(ptr noundef @.str, i64 noundef 918, i32 noundef %17, ptr noundef null)
  br label %112

18:                                               ; preds = %13
  br label %19

19:                                               ; preds = %18
  br label %20

20:                                               ; preds = %19
  br label %21

21:                                               ; preds = %20
  %22 = load ptr, ptr %5, align 8, !tbaa !5
  %23 = icmp ne ptr %22, null
  br i1 %23, label %26, label %24

24:                                               ; preds = %21
  store i32 2, ptr %12, align 4, !tbaa !11
  %25 = load i32, ptr %12, align 4, !tbaa !11
  call void @stacktrace_create(ptr noundef @.str, i64 noundef 919, i32 noundef %25, ptr noundef null)
  br label %112

26:                                               ; preds = %21
  br label %27

27:                                               ; preds = %26
  br label %28

28:                                               ; preds = %27
  br label %29

29:                                               ; preds = %28
  %30 = load i64, ptr %6, align 8, !tbaa !9
  %31 = call noalias ptr @malloc(i64 noundef %30) #6
  store ptr %31, ptr %7, align 8, !tbaa !5
  %32 = icmp eq ptr null, %31
  br i1 %32, label %33, label %35

33:                                               ; preds = %29
  store i32 1, ptr %12, align 4, !tbaa !11
  %34 = load i32, ptr %12, align 4, !tbaa !11
  call void @stacktrace_create(ptr noundef @.str, i64 noundef 921, i32 noundef %34, ptr noundef null)
  br label %112

35:                                               ; preds = %29
  br label %36

36:                                               ; preds = %35
  br label %37

37:                                               ; preds = %36
  %38 = load ptr, ptr %5, align 8, !tbaa !5
  store ptr %38, ptr %10, align 8, !tbaa !5
  %39 = load ptr, ptr %10, align 8, !tbaa !5
  %40 = load i64, ptr %6, align 8, !tbaa !9
  %41 = getelementptr inbounds i8, ptr %39, i64 %40
  %42 = getelementptr inbounds i8, ptr %41, i64 -1
  store ptr %42, ptr %11, align 8, !tbaa !5
  %43 = load ptr, ptr %10, align 8, !tbaa !5
  store ptr %43, ptr %9, align 8, !tbaa !5
  br label %44

44:                                               ; preds = %71, %37
  %45 = load ptr, ptr %9, align 8, !tbaa !5
  %46 = load ptr, ptr %11, align 8, !tbaa !5
  %47 = icmp ne ptr %45, %46
  br i1 %47, label %48, label %74

48:                                               ; preds = %44
  %49 = load ptr, ptr %9, align 8, !tbaa !5
  %50 = load i8, ptr %49, align 1, !tbaa !13
  %51 = zext i8 %50 to i32
  switch i32 %51, label %70 [
    i32 0, label %52
    i32 255, label %61
  ]

52:                                               ; preds = %48
  %53 = load ptr, ptr %9, align 8, !tbaa !5
  %54 = getelementptr inbounds i8, ptr %53, i64 1
  %55 = load i8, ptr %54, align 1, !tbaa !13
  %56 = zext i8 %55 to i32
  %57 = and i32 %56, 128
  %58 = icmp eq i32 %57, 0
  br i1 %58, label %59, label %60

59:                                               ; preds = %52
  br label %71

60:                                               ; preds = %52
  br label %70

61:                                               ; preds = %48
  %62 = load ptr, ptr %9, align 8, !tbaa !5
  %63 = getelementptr inbounds i8, ptr %62, i64 1
  %64 = load i8, ptr %63, align 1, !tbaa !13
  %65 = zext i8 %64 to i32
  %66 = and i32 %65, 128
  %67 = icmp ne i32 %66, 0
  br i1 %67, label %68, label %69

68:                                               ; preds = %61
  br label %71

69:                                               ; preds = %61
  br label %70

70:                                               ; preds = %69, %60, %48
  br label %74

71:                                               ; preds = %68, %59
  %72 = load ptr, ptr %9, align 8, !tbaa !5
  %73 = getelementptr inbounds i8, ptr %72, i32 1
  store ptr %73, ptr %9, align 8, !tbaa !5
  br label %44, !llvm.loop !14

74:                                               ; preds = %70, %44
  %75 = load ptr, ptr %9, align 8, !tbaa !5
  store ptr %75, ptr %10, align 8, !tbaa !5
  %76 = load ptr, ptr %7, align 8, !tbaa !5
  store ptr %76, ptr %8, align 8, !tbaa !5
  %77 = load ptr, ptr %11, align 8, !tbaa !5
  %78 = getelementptr inbounds i8, ptr %77, i32 1
  store ptr %78, ptr %11, align 8, !tbaa !5
  br label %79

79:                                               ; preds = %88, %74
  %80 = load ptr, ptr %9, align 8, !tbaa !5
  %81 = load ptr, ptr %11, align 8, !tbaa !5
  %82 = icmp ne ptr %80, %81
  br i1 %82, label %83, label %91

83:                                               ; preds = %79
  %84 = load ptr, ptr %9, align 8, !tbaa !5
  %85 = load i8, ptr %84, align 1, !tbaa !13
  %86 = load ptr, ptr %8, align 8, !tbaa !5
  %87 = getelementptr inbounds i8, ptr %86, i32 1
  store ptr %87, ptr %8, align 8, !tbaa !5
  store i8 %85, ptr %86, align 1, !tbaa !13
  br label %88

88:                                               ; preds = %83
  %89 = load ptr, ptr %9, align 8, !tbaa !5
  %90 = getelementptr inbounds i8, ptr %89, i32 1
  store ptr %90, ptr %9, align 8, !tbaa !5
  br label %79, !llvm.loop !16

91:                                               ; preds = %79
  %92 = load ptr, ptr %4, align 8, !tbaa !5
  %93 = getelementptr inbounds %struct.ASN__PRIMITIVE_TYPE_s, ptr %92, i32 0, i32 0
  %94 = load ptr, ptr %93, align 8, !tbaa !17
  %95 = icmp ne ptr %94, null
  br i1 %95, label %96, label %100

96:                                               ; preds = %91
  %97 = load ptr, ptr %4, align 8, !tbaa !5
  %98 = getelementptr inbounds %struct.ASN__PRIMITIVE_TYPE_s, ptr %97, i32 0, i32 0
  %99 = load ptr, ptr %98, align 8, !tbaa !17
  call void @free(ptr noundef %99) #5
  br label %100

100:                                              ; preds = %96, %91
  %101 = load ptr, ptr %7, align 8, !tbaa !5
  %102 = load ptr, ptr %4, align 8, !tbaa !5
  %103 = getelementptr inbounds %struct.ASN__PRIMITIVE_TYPE_s, ptr %102, i32 0, i32 0
  store ptr %101, ptr %103, align 8, !tbaa !17
  %104 = load ptr, ptr %8, align 8, !tbaa !5
  %105 = load ptr, ptr %7, align 8, !tbaa !5
  %106 = ptrtoint ptr %104 to i64
  %107 = ptrtoint ptr %105 to i64
  %108 = sub i64 %106, %107
  %109 = trunc i64 %108 to i32
  %110 = load ptr, ptr %4, align 8, !tbaa !5
  %111 = getelementptr inbounds %struct.ASN__PRIMITIVE_TYPE_s, ptr %110, i32 0, i32 1
  store i32 %109, ptr %111, align 8, !tbaa !19
  br label %112

112:                                              ; preds = %100, %33, %24, %16
  %113 = load i32, ptr %12, align 4, !tbaa !11
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #5
  ret i32 %113
}

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 = { 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 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 #4 = { 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 #5 = { nounwind }
attributes #6 = { 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 = !{!"long", !7, i64 0}
!11 = !{!12, !12, i64 0}
!12 = !{!"int", !7, i64 0}
!13 = !{!7, !7, i64 0}
!14 = distinct !{!14, !15}
!15 = !{!"llvm.loop.mustprogress"}
!16 = distinct !{!16, !15}
!17 = !{!18, !6, i64 0}
!18 = !{!"ASN__PRIMITIVE_TYPE_s", !6, i64 0, !12, i64 8}
!19 = !{!18, !12, i64 8}


; 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 [25 x i8], align 1

declare void @stacktrace_create(ptr noundef, i64 noundef, i32 noundef, ptr noundef) local_unnamed_addr #0

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

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

; Function Attrs: nounwind uwtable
define dso_local range(i32 0, 3) i32 @asn_bytes2INTEGER(ptr noundef %0, ptr noundef readonly %1, i64 noundef %2) local_unnamed_addr #3 {
  %4 = ptrtoint ptr %1 to i64
  %.not = icmp eq ptr %0, null
  br i1 %.not, label %5, label %6

5:                                                ; preds = %3
  tail call void @stacktrace_create(ptr noundef nonnull @.str, i64 noundef 918, i32 noundef 2, ptr noundef null) #4
  br label %72

6:                                                ; preds = %3
  %.not37 = icmp eq ptr %1, null
  br i1 %.not37, label %7, label %8

7:                                                ; preds = %6
  tail call void @stacktrace_create(ptr noundef nonnull @.str, i64 noundef 919, i32 noundef 2, ptr noundef null) #4
  br label %72

8:                                                ; preds = %6
  %9 = tail call noalias ptr @malloc(i64 noundef %2) #5
  %10 = ptrtoint ptr %9 to i64
  %11 = icmp eq ptr %9, null
  br i1 %11, label %12, label %13

12:                                               ; preds = %8
  tail call void @stacktrace_create(ptr noundef nonnull @.str, i64 noundef 921, i32 noundef 1, ptr noundef null) #4
  br label %72

13:                                               ; preds = %8
  %14 = getelementptr inbounds i8, ptr %1, i64 %2
  %15 = getelementptr inbounds i8, ptr %14, i64 -1
  %.not3842 = icmp eq ptr %15, %1
  br i1 %.not3842, label %._crit_edge, label %.lr.ph.preheader

.lr.ph.preheader:                                 ; preds = %13
  %.pre = load i8, ptr %1, align 1, !tbaa !5
  br label %.lr.ph

.lr.ph:                                           ; preds = %.lr.ph.preheader, %24
  %16 = phi i8 [ %25, %24 ], [ %.pre, %.lr.ph.preheader ]
  %.03143 = phi ptr [ %26, %24 ], [ %1, %.lr.ph.preheader ]
  switch i8 %16, label %._crit_edge [
    i8 0, label %17
    i8 -1, label %21
  ]

17:                                               ; preds = %.lr.ph
  %18 = getelementptr inbounds i8, ptr %.03143, i64 1
  %19 = load i8, ptr %18, align 1, !tbaa !5
  %20 = icmp sgt i8 %19, -1
  br i1 %20, label %24, label %._crit_edge

21:                                               ; preds = %.lr.ph
  %22 = getelementptr inbounds i8, ptr %.03143, i64 1
  %23 = load i8, ptr %22, align 1, !tbaa !5
  %.not39 = icmp sgt i8 %23, -1
  br i1 %.not39, label %._crit_edge, label %24

24:                                               ; preds = %21, %17
  %25 = phi i8 [ %23, %21 ], [ %19, %17 ]
  %26 = getelementptr inbounds i8, ptr %.03143, i64 1
  %.not38 = icmp eq ptr %26, %15
  br i1 %.not38, label %.lr.ph54.preheader, label %.lr.ph, !llvm.loop !8

._crit_edge:                                      ; preds = %21, %17, %.lr.ph, %13
  %.031.lcssa = phi ptr [ %1, %13 ], [ %.03143, %.lr.ph ], [ %.03143, %17 ], [ %.03143, %21 ]
  %.not4050 = icmp eq ptr %.031.lcssa, %14
  br i1 %.not4050, label %._crit_edge55, label %.lr.ph54.preheader

.lr.ph54.preheader:                               ; preds = %24, %._crit_edge
  %.031.lcssa59 = phi ptr [ %.031.lcssa, %._crit_edge ], [ %15, %24 ]
  %.031.lcssa5962 = ptrtoint ptr %.031.lcssa59 to i64
  %27 = add i64 %4, %2
  %28 = sub i64 %27, %.031.lcssa5962
  %min.iters.check = icmp ult i64 %28, 32
  %29 = sub i64 %10, %.031.lcssa5962
  %diff.check = icmp ult i64 %29, 32
  %or.cond = or i1 %min.iters.check, %diff.check
  br i1 %or.cond, label %.lr.ph54.preheader69, label %vector.ph

vector.ph:                                        ; preds = %.lr.ph54.preheader
  %n.vec = and i64 %28, -32
  %ind.end = getelementptr i8, ptr %.031.lcssa59, i64 %n.vec
  %ind.end63 = getelementptr i8, ptr %9, i64 %n.vec
  br label %vector.body

vector.body:                                      ; preds = %vector.body, %vector.ph
  %index = phi i64 [ 0, %vector.ph ], [ %index.next, %vector.body ]
  %next.gep = getelementptr i8, ptr %.031.lcssa59, i64 %index
  %next.gep66 = getelementptr i8, ptr %9, i64 %index
  %30 = getelementptr i8, ptr %next.gep, i64 16
  %wide.load = load <16 x i8>, ptr %next.gep, align 1, !tbaa !5
  %wide.load68 = load <16 x i8>, ptr %30, align 1, !tbaa !5
  %31 = getelementptr i8, ptr %next.gep66, i64 16
  store <16 x i8> %wide.load, ptr %next.gep66, align 1, !tbaa !5
  store <16 x i8> %wide.load68, ptr %31, align 1, !tbaa !5
  %index.next = add nuw i64 %index, 32
  %32 = icmp eq i64 %index.next, %n.vec
  br i1 %32, label %middle.block, label %vector.body, !llvm.loop !10

middle.block:                                     ; preds = %vector.body
  %cmp.n = icmp eq i64 %28, %n.vec
  br i1 %cmp.n, label %._crit_edge55, label %.lr.ph54.preheader69

.lr.ph54.preheader69:                             ; preds = %middle.block, %.lr.ph54.preheader
  %.152.ph = phi ptr [ %.031.lcssa59, %.lr.ph54.preheader ], [ %ind.end, %middle.block ]
  %.03251.ph = phi ptr [ %9, %.lr.ph54.preheader ], [ %ind.end63, %middle.block ]
  %33 = add i64 %4, %2
  %.152.ph71 = ptrtoint ptr %.152.ph to i64
  %34 = sub i64 %33, %.152.ph71
  %xtraiter = and i64 %34, 7
  %lcmp.mod.not = icmp eq i64 %xtraiter, 0
  br i1 %lcmp.mod.not, label %.lr.ph54.prol.loopexit, label %.lr.ph54.prol

.lr.ph54.prol:                                    ; preds = %.lr.ph54.preheader69, %.lr.ph54.prol
  %.152.prol = phi ptr [ %37, %.lr.ph54.prol ], [ %.152.ph, %.lr.ph54.preheader69 ]
  %.03251.prol = phi ptr [ %36, %.lr.ph54.prol ], [ %.03251.ph, %.lr.ph54.preheader69 ]
  %prol.iter = phi i64 [ %prol.iter.next, %.lr.ph54.prol ], [ 0, %.lr.ph54.preheader69 ]
  %35 = load i8, ptr %.152.prol, align 1, !tbaa !5
  %36 = getelementptr inbounds i8, ptr %.03251.prol, i64 1
  store i8 %35, ptr %.03251.prol, align 1, !tbaa !5
  %37 = getelementptr inbounds i8, ptr %.152.prol, i64 1
  %prol.iter.next = add i64 %prol.iter, 1
  %prol.iter.cmp.not = icmp eq i64 %prol.iter.next, %xtraiter
  br i1 %prol.iter.cmp.not, label %.lr.ph54.prol.loopexit, label %.lr.ph54.prol, !llvm.loop !13

.lr.ph54.prol.loopexit:                           ; preds = %.lr.ph54.prol, %.lr.ph54.preheader69
  %.lcssa.unr = phi ptr [ poison, %.lr.ph54.preheader69 ], [ %36, %.lr.ph54.prol ]
  %.152.unr = phi ptr [ %.152.ph, %.lr.ph54.preheader69 ], [ %37, %.lr.ph54.prol ]
  %.03251.unr = phi ptr [ %.03251.ph, %.lr.ph54.preheader69 ], [ %36, %.lr.ph54.prol ]
  %38 = sub i64 %.152.ph71, %33
  %39 = icmp ugt i64 %38, -8
  br i1 %39, label %._crit_edge55, label %.lr.ph54

.lr.ph54:                                         ; preds = %.lr.ph54.prol.loopexit, %.lr.ph54
  %.152 = phi ptr [ %63, %.lr.ph54 ], [ %.152.unr, %.lr.ph54.prol.loopexit ]
  %.03251 = phi ptr [ %62, %.lr.ph54 ], [ %.03251.unr, %.lr.ph54.prol.loopexit ]
  %40 = load i8, ptr %.152, align 1, !tbaa !5
  %41 = getelementptr inbounds i8, ptr %.03251, i64 1
  store i8 %40, ptr %.03251, align 1, !tbaa !5
  %42 = getelementptr inbounds i8, ptr %.152, i64 1
  %43 = load i8, ptr %42, align 1, !tbaa !5
  %44 = getelementptr inbounds i8, ptr %.03251, i64 2
  store i8 %43, ptr %41, align 1, !tbaa !5
  %45 = getelementptr inbounds i8, ptr %.152, i64 2
  %46 = load i8, ptr %45, align 1, !tbaa !5
  %47 = getelementptr inbounds i8, ptr %.03251, i64 3
  store i8 %46, ptr %44, align 1, !tbaa !5
  %48 = getelementptr inbounds i8, ptr %.152, i64 3
  %49 = load i8, ptr %48, align 1, !tbaa !5
  %50 = getelementptr inbounds i8, ptr %.03251, i64 4
  store i8 %49, ptr %47, align 1, !tbaa !5
  %51 = getelementptr inbounds i8, ptr %.152, i64 4
  %52 = load i8, ptr %51, align 1, !tbaa !5
  %53 = getelementptr inbounds i8, ptr %.03251, i64 5
  store i8 %52, ptr %50, align 1, !tbaa !5
  %54 = getelementptr inbounds i8, ptr %.152, i64 5
  %55 = load i8, ptr %54, align 1, !tbaa !5
  %56 = getelementptr inbounds i8, ptr %.03251, i64 6
  store i8 %55, ptr %53, align 1, !tbaa !5
  %57 = getelementptr inbounds i8, ptr %.152, i64 6
  %58 = load i8, ptr %57, align 1, !tbaa !5
  %59 = getelementptr inbounds i8, ptr %.03251, i64 7
  store i8 %58, ptr %56, align 1, !tbaa !5
  %60 = getelementptr inbounds i8, ptr %.152, i64 7
  %61 = load i8, ptr %60, align 1, !tbaa !5
  %62 = getelementptr inbounds i8, ptr %.03251, i64 8
  store i8 %61, ptr %59, align 1, !tbaa !5
  %63 = getelementptr inbounds i8, ptr %.152, i64 8
  %.not40.7 = icmp eq ptr %63, %14
  br i1 %.not40.7, label %._crit_edge55, label %.lr.ph54, !llvm.loop !15

._crit_edge55:                                    ; preds = %.lr.ph54.prol.loopexit, %.lr.ph54, %middle.block, %._crit_edge
  %.032.lcssa = phi ptr [ %9, %._crit_edge ], [ %ind.end63, %middle.block ], [ %.lcssa.unr, %.lr.ph54.prol.loopexit ], [ %62, %.lr.ph54 ]
  %64 = load ptr, ptr %0, align 8, !tbaa !16
  %.not41 = icmp eq ptr %64, null
  br i1 %.not41, label %66, label %65

65:                                               ; preds = %._crit_edge55
  tail call void @free(ptr noundef nonnull %64) #4
  br label %66

66:                                               ; preds = %65, %._crit_edge55
  store ptr %9, ptr %0, align 8, !tbaa !16
  %67 = ptrtoint ptr %.032.lcssa to i64
  %68 = ptrtoint ptr %9 to i64
  %69 = sub i64 %67, %68
  %70 = trunc i64 %69 to i32
  %71 = getelementptr inbounds i8, ptr %0, i64 8
  store i32 %70, ptr %71, align 8, !tbaa !20
  br label %72

72:                                               ; preds = %66, %12, %7, %5
  %.0 = phi i32 [ 1, %12 ], [ 0, %66 ], [ 2, %7 ], [ 2, %5 ]
  ret i32 %.0
}

attributes #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 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 #2 = { 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 #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 = { nounwind }
attributes #5 = { 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 = !{!"omnipotent char", !7, i64 0}
!7 = !{!"Simple C/C++ TBAA"}
!8 = distinct !{!8, !9}
!9 = !{!"llvm.loop.mustprogress"}
!10 = distinct !{!10, !9, !11, !12}
!11 = !{!"llvm.loop.isvectorized", i32 1}
!12 = !{!"llvm.loop.unroll.runtime.disable"}
!13 = distinct !{!13, !14}
!14 = !{!"llvm.loop.unroll.disable"}
!15 = distinct !{!15, !9, !11}
!16 = !{!17, !18, i64 0}
!17 = !{!"ASN__PRIMITIVE_TYPE_s", !18, i64 0, !19, i64 8}
!18 = !{!"any pointer", !6, i64 0}
!19 = !{!"int", !6, i64 0}
!20 = !{!17, !19, i64 8}


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