; LLVM IR from PaddlePaddle/FastDeploy :: third_party/onnx/onnx (onnxifi_wrapper)

; 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.onnxMemoryFenceV1 = type { i32, i64, %union.anon.0 }
%union.anon.0 = type { ptr }
%struct.onnxifi_graph_wrapper = type { i32, ptr, ptr }
%struct.onnxifi_event_wrapper = type { i32, ptr, ptr }
%struct.onnxifi_library = type { ptr, i32, %union.anon }
%union.anon = type { %struct.anon }
%struct.anon = type { ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr }

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

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

; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: write)
declare void @llvm.memset.p0.i64(ptr nocapture writeonly, i8, i64, i1 immarg) #2

; 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) #3

; Function Attrs: nounwind uwtable
define dso_local i32 @onnxRunGraph(ptr noundef %0, ptr noundef %1, ptr noundef %2) #4 {
  %4 = alloca i32, align 4
  %5 = alloca ptr, align 8
  %6 = alloca ptr, align 8
  %7 = alloca ptr, align 8
  %8 = alloca ptr, align 8
  %9 = alloca i32, align 4
  %10 = alloca ptr, align 8
  %11 = alloca %struct.onnxMemoryFenceV1, align 8
  %12 = alloca ptr, align 8
  %13 = alloca ptr, align 8
  %14 = alloca %struct.onnxMemoryFenceV1, align 8
  %15 = alloca ptr, align 8
  %16 = alloca i32, align 4
  store ptr %0, ptr %5, align 8, !tbaa !5
  store ptr %1, ptr %6, align 8, !tbaa !5
  store ptr %2, ptr %7, align 8, !tbaa !5
  %17 = load ptr, ptr %5, align 8, !tbaa !5
  %18 = icmp eq ptr %17, null
  br i1 %18, label %19, label %20

19:                                               ; preds = %3
  store i32 263, ptr %4, align 4
  br label %146

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

23:                                               ; preds = %20
  store i32 259, ptr %4, align 4
  br label %146

24:                                               ; preds = %20
  %25 = load ptr, ptr %7, align 8, !tbaa !5
  %26 = icmp eq ptr %25, null
  br i1 %26, label %27, label %28

27:                                               ; preds = %24
  store i32 259, ptr %4, align 4
  br label %146

28:                                               ; preds = %24
  %29 = load ptr, ptr %6, align 8, !tbaa !5
  %30 = getelementptr inbounds %struct.onnxMemoryFenceV1, ptr %29, i32 0, i32 0
  %31 = load i32, ptr %30, align 8, !tbaa !9
  switch i32 %31, label %32 [
    i32 601918123, label %33
  ]

32:                                               ; preds = %28
  store i32 513, ptr %4, align 4
  br label %146

33:                                               ; preds = %28
  %34 = load ptr, ptr %7, align 8, !tbaa !5
  %35 = getelementptr inbounds %struct.onnxMemoryFenceV1, ptr %34, i32 0, i32 0
  %36 = load i32, ptr %35, align 8, !tbaa !9
  switch i32 %36, label %37 [
    i32 601918123, label %38
  ]

37:                                               ; preds = %33
  store i32 513, ptr %4, align 4
  br label %146

38:                                               ; preds = %33
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #5
  %39 = load ptr, ptr %5, align 8, !tbaa !5
  store ptr %39, ptr %8, align 8, !tbaa !5
  %40 = load ptr, ptr %8, align 8, !tbaa !5
  %41 = getelementptr inbounds %struct.onnxifi_graph_wrapper, ptr %40, i32 0, i32 0
  %42 = load i32, ptr %41, align 8, !tbaa !13
  %43 = icmp ne i32 %42, -642975027
  br i1 %43, label %44, label %45

44:                                               ; preds = %38
  store i32 263, ptr %4, align 4
  store i32 1, ptr %9, align 4
  br label %145

45:                                               ; preds = %38
  %46 = load ptr, ptr %8, align 8, !tbaa !5
  %47 = getelementptr inbounds %struct.onnxifi_graph_wrapper, ptr %46, i32 0, i32 2
  %48 = load ptr, ptr %47, align 8, !tbaa !15
  %49 = icmp eq ptr %48, null
  br i1 %49, label %50, label %51

50:                                               ; preds = %45
  store i32 263, ptr %4, align 4
  store i32 1, ptr %9, align 4
  br label %145

51:                                               ; preds = %45
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #5
  %52 = load ptr, ptr %6, align 8, !tbaa !5
  store ptr %52, ptr %10, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 24, ptr %11) #5
  %53 = load ptr, ptr %6, align 8, !tbaa !5
  %54 = getelementptr inbounds %struct.onnxMemoryFenceV1, ptr %53, i32 0, i32 1
  %55 = load i64, ptr %54, align 8, !tbaa !16
  switch i64 %55, label %89 [
    i64 0, label %56
  ]

56:                                               ; preds = %51
  %57 = load ptr, ptr %6, align 8, !tbaa !5
  %58 = getelementptr inbounds %struct.onnxMemoryFenceV1, ptr %57, i32 0, i32 2
  %59 = load ptr, ptr %58, align 8, !tbaa !17
  %60 = icmp eq ptr %59, null
  br i1 %60, label %61, label %62

61:                                               ; preds = %56
  store i32 264, ptr %4, align 4
  store i32 1, ptr %9, align 4
  br label %144

62:                                               ; preds = %56
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #5
  %63 = load ptr, ptr %6, align 8, !tbaa !5
  %64 = getelementptr inbounds %struct.onnxMemoryFenceV1, ptr %63, i32 0, i32 2
  %65 = load ptr, ptr %64, align 8, !tbaa !17
  store ptr %65, ptr %12, align 8, !tbaa !5
  %66 = load ptr, ptr %12, align 8, !tbaa !5
  %67 = getelementptr inbounds %struct.onnxifi_event_wrapper, ptr %66, i32 0, i32 0
  %68 = load i32, ptr %67, align 8, !tbaa !18
  %69 = icmp ne i32 %68, 415356725
  br i1 %69, label %70, label %71

70:                                               ; preds = %62
  store i32 264, ptr %4, align 4
  store i32 1, ptr %9, align 4
  br label %87

71:                                               ; preds = %62
  %72 = load ptr, ptr %12, align 8, !tbaa !5
  %73 = getelementptr inbounds %struct.onnxifi_event_wrapper, ptr %72, i32 0, i32 2
  %74 = load ptr, ptr %73, align 8, !tbaa !20
  %75 = load ptr, ptr %8, align 8, !tbaa !5
  %76 = getelementptr inbounds %struct.onnxifi_graph_wrapper, ptr %75, i32 0, i32 2
  %77 = load ptr, ptr %76, align 8, !tbaa !15
  %78 = icmp ne ptr %74, %77
  br i1 %78, label %79, label %80

79:                                               ; preds = %71
  store i32 264, ptr %4, align 4
  store i32 1, ptr %9, align 4
  br label %87

80:                                               ; preds = %71
  %81 = getelementptr inbounds %struct.onnxMemoryFenceV1, ptr %11, i32 0, i32 0
  store i32 601918123, ptr %81, align 8, !tbaa !9
  %82 = getelementptr inbounds %struct.onnxMemoryFenceV1, ptr %11, i32 0, i32 1
  store i64 0, ptr %82, align 8, !tbaa !16
  %83 = load ptr, ptr %12, align 8, !tbaa !5
  %84 = getelementptr inbounds %struct.onnxifi_event_wrapper, ptr %83, i32 0, i32 1
  %85 = load ptr, ptr %84, align 8, !tbaa !21
  %86 = getelementptr inbounds %struct.onnxMemoryFenceV1, ptr %11, i32 0, i32 2
  store ptr %85, ptr %86, align 8, !tbaa !17
  store ptr %11, ptr %10, align 8, !tbaa !5
  store i32 4, ptr %9, align 4
  br label %87

87:                                               ; preds = %80, %79, %70
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #5
  %88 = load i32, ptr %9, align 4
  switch i32 %88, label %144 [
    i32 4, label %90
  ]

89:                                               ; preds = %51
  br label %90

90:                                               ; preds = %89, %87
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #5
  %91 = load ptr, ptr %7, align 8, !tbaa !5
  store ptr %91, ptr %13, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 24, ptr %14) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %15) #5
  store ptr null, ptr %15, align 8, !tbaa !5
  %92 = load ptr, ptr %7, align 8, !tbaa !5
  %93 = getelementptr inbounds %struct.onnxMemoryFenceV1, ptr %92, i32 0, i32 1
  %94 = load i64, ptr %93, align 8, !tbaa !16
  switch i64 %94, label %105 [
    i64 0, label %95
  ]

95:                                               ; preds = %90
  %96 = getelementptr inbounds %struct.onnxMemoryFenceV1, ptr %14, i32 0, i32 0
  store i32 601918123, ptr %96, align 8, !tbaa !9
  %97 = getelementptr inbounds %struct.onnxMemoryFenceV1, ptr %14, i32 0, i32 1
  store i64 0, ptr %97, align 8, !tbaa !16
  %98 = getelementptr inbounds %struct.onnxMemoryFenceV1, ptr %14, i32 0, i32 2
  store ptr null, ptr %98, align 8, !tbaa !17
  store ptr %14, ptr %13, align 8, !tbaa !5
  %99 = call noalias ptr @malloc(i64 noundef 24) #6
  store ptr %99, ptr %15, align 8, !tbaa !5
  %100 = load ptr, ptr %15, align 8, !tbaa !5
  %101 = icmp eq ptr %100, null
  br i1 %101, label %102, label %103

102:                                              ; preds = %95
  store i32 1025, ptr %4, align 4
  store i32 1, ptr %9, align 4
  br label %143

103:                                              ; preds = %95
  %104 = load ptr, ptr %15, align 8, !tbaa !5
  call void @llvm.memset.p0.i64(ptr align 8 %104, i8 0, i64 24, i1 false)
  br label %105

105:                                              ; preds = %103, %90
  call void @llvm.lifetime.start.p0(i64 4, ptr %16) #5
  %106 = load ptr, ptr %8, align 8, !tbaa !5
  %107 = getelementptr inbounds %struct.onnxifi_graph_wrapper, ptr %106, i32 0, i32 2
  %108 = load ptr, ptr %107, align 8, !tbaa !15
  %109 = getelementptr inbounds %struct.onnxifi_library, ptr %108, i32 0, i32 2
  %110 = getelementptr inbounds %struct.anon, ptr %109, i32 0, i32 13
  %111 = load ptr, ptr %110, align 8, !tbaa !17
  %112 = load ptr, ptr %8, align 8, !tbaa !5
  %113 = getelementptr inbounds %struct.onnxifi_graph_wrapper, ptr %112, i32 0, i32 1
  %114 = load ptr, ptr %113, align 8, !tbaa !22
  %115 = load ptr, ptr %10, align 8, !tbaa !5
  %116 = load ptr, ptr %13, align 8, !tbaa !5
  %117 = call i32 %111(ptr noundef %114, ptr noundef %115, ptr noundef %116)
  store i32 %117, ptr %16, align 4, !tbaa !23
  %118 = load i32, ptr %16, align 4, !tbaa !23
  %119 = icmp eq i32 %118, 0
  br i1 %119, label %120, label %139

120:                                              ; preds = %105
  %121 = load ptr, ptr %15, align 8, !tbaa !5
  %122 = icmp ne ptr %121, null
  br i1 %122, label %123, label %138

123:                                              ; preds = %120
  %124 = load ptr, ptr %15, align 8, !tbaa !5
  %125 = getelementptr inbounds %struct.onnxifi_event_wrapper, ptr %124, i32 0, i32 0
  store i32 415356725, ptr %125, align 8, !tbaa !18
  %126 = getelementptr inbounds %struct.onnxMemoryFenceV1, ptr %14, i32 0, i32 2
  %127 = load ptr, ptr %126, align 8, !tbaa !17
  %128 = load ptr, ptr %15, align 8, !tbaa !5
  %129 = getelementptr inbounds %struct.onnxifi_event_wrapper, ptr %128, i32 0, i32 1
  store ptr %127, ptr %129, align 8, !tbaa !21
  %130 = load ptr, ptr %8, align 8, !tbaa !5
  %131 = getelementptr inbounds %struct.onnxifi_graph_wrapper, ptr %130, i32 0, i32 2
  %132 = load ptr, ptr %131, align 8, !tbaa !15
  %133 = load ptr, ptr %15, align 8, !tbaa !5
  %134 = getelementptr inbounds %struct.onnxifi_event_wrapper, ptr %133, i32 0, i32 2
  store ptr %132, ptr %134, align 8, !tbaa !20
  %135 = load ptr, ptr %15, align 8, !tbaa !5
  %136 = load ptr, ptr %7, align 8, !tbaa !5
  %137 = getelementptr inbounds %struct.onnxMemoryFenceV1, ptr %136, i32 0, i32 2
  store ptr %135, ptr %137, align 8, !tbaa !17
  br label %138

138:                                              ; preds = %123, %120
  br label %141

139:                                              ; preds = %105
  %140 = load ptr, ptr %15, align 8, !tbaa !5
  call void @free(ptr noundef %140) #5
  br label %141

141:                                              ; preds = %139, %138
  %142 = load i32, ptr %16, align 4, !tbaa !23
  store i32 %142, ptr %4, align 4
  store i32 1, ptr %9, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %16) #5
  br label %143

143:                                              ; preds = %141, %102
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #5
  call void @llvm.lifetime.end.p0(i64 24, ptr %14) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #5
  br label %144

144:                                              ; preds = %143, %87, %61
  call void @llvm.lifetime.end.p0(i64 24, ptr %11) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #5
  br label %145

145:                                              ; preds = %144, %50, %44
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #5
  br label %146

146:                                              ; preds = %145, %37, %32, %27, %23, %19
  %147 = load i32, ptr %4, align 4
  ret i32 %147
}

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { 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 #2 = { nocallback nofree nounwind willreturn memory(argmem: write) }
attributes #3 = { nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { nounwind 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, !11, i64 0}
!10 = !{!"onnxMemoryFenceV1", !11, i64 0, !12, i64 8, !7, i64 16}
!11 = !{!"int", !7, i64 0}
!12 = !{!"long", !7, i64 0}
!13 = !{!14, !11, i64 0}
!14 = !{!"onnxifi_graph_wrapper", !11, i64 0, !6, i64 8, !6, i64 16}
!15 = !{!14, !6, i64 16}
!16 = !{!10, !12, i64 8}
!17 = !{!7, !7, i64 0}
!18 = !{!19, !11, i64 0}
!19 = !{!"onnxifi_event_wrapper", !11, i64 0, !6, i64 8, !6, i64 16}
!20 = !{!19, !6, i64 16}
!21 = !{!19, !6, i64 8}
!22 = !{!14, !6, i64 8}
!23 = !{!11, !11, 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"

%struct.onnxMemoryFenceV1 = type { i32, i64, %union.anon.0 }
%union.anon.0 = type { ptr }

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

; Function Attrs: mustprogress nocallback nofree nounwind willreturn memory(argmem: write)
declare void @llvm.memset.p0.i64(ptr nocapture writeonly, i8, i64, i1 immarg) #1

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

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

; Function Attrs: nounwind uwtable
define dso_local i32 @onnxRunGraph(ptr noundef readonly %0, ptr noundef %1, ptr noundef %2) local_unnamed_addr #3 {
  %4 = alloca %struct.onnxMemoryFenceV1, align 8
  %5 = alloca %struct.onnxMemoryFenceV1, align 8
  %6 = icmp eq ptr %0, null
  br i1 %6, label %60, label %7

7:                                                ; preds = %3
  %8 = icmp eq ptr %1, null
  %9 = icmp eq ptr %2, null
  %or.cond = or i1 %8, %9
  br i1 %or.cond, label %60, label %10

10:                                               ; preds = %7
  %11 = load i32, ptr %1, align 8, !tbaa !5
  %cond = icmp eq i32 %11, 601918123
  br i1 %cond, label %12, label %60

12:                                               ; preds = %10
  %13 = load i32, ptr %2, align 8, !tbaa !5
  %cond1 = icmp eq i32 %13, 601918123
  br i1 %cond1, label %14, label %60

14:                                               ; preds = %12
  %15 = load i32, ptr %0, align 8, !tbaa !11
  %.not = icmp eq i32 %15, -642975027
  br i1 %.not, label %16, label %60

16:                                               ; preds = %14
  %17 = getelementptr inbounds i8, ptr %0, i64 16
  %18 = load ptr, ptr %17, align 8, !tbaa !14
  %19 = icmp eq ptr %18, null
  br i1 %19, label %60, label %20

20:                                               ; preds = %16
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %4) #5
  %21 = getelementptr inbounds i8, ptr %1, i64 8
  %22 = load i64, ptr %21, align 8, !tbaa !15
  %cond2 = icmp eq i64 %22, 0
  br i1 %cond2, label %23, label %37

23:                                               ; preds = %20
  %24 = getelementptr inbounds i8, ptr %1, i64 16
  %25 = load ptr, ptr %24, align 8, !tbaa !16
  %26 = icmp eq ptr %25, null
  br i1 %26, label %.thread, label %27

27:                                               ; preds = %23
  %28 = load i32, ptr %25, align 8, !tbaa !17
  %.not48 = icmp eq i32 %28, 415356725
  br i1 %.not48, label %29, label %.thread

29:                                               ; preds = %27
  %30 = getelementptr inbounds i8, ptr %25, i64 16
  %31 = load ptr, ptr %30, align 8, !tbaa !19
  %.not49 = icmp eq ptr %31, %18
  br i1 %.not49, label %32, label %.thread

32:                                               ; preds = %29
  store i32 601918123, ptr %4, align 8, !tbaa !5
  %33 = getelementptr inbounds i8, ptr %4, i64 8
  store i64 0, ptr %33, align 8, !tbaa !15
  %34 = getelementptr inbounds i8, ptr %25, i64 8
  %35 = load ptr, ptr %34, align 8, !tbaa !20
  %36 = getelementptr inbounds i8, ptr %4, i64 16
  store ptr %35, ptr %36, align 8, !tbaa !16
  br label %37

37:                                               ; preds = %32, %20
  %.143 = phi ptr [ %4, %32 ], [ %1, %20 ]
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %5) #5
  %38 = getelementptr inbounds i8, ptr %2, i64 8
  %39 = load i64, ptr %38, align 8, !tbaa !15
  %cond3 = icmp eq i64 %39, 0
  br i1 %cond3, label %40, label %43

40:                                               ; preds = %37
  store i32 601918123, ptr %5, align 8, !tbaa !5
  %41 = getelementptr inbounds i8, ptr %5, i64 8
  %calloc = tail call dereferenceable_or_null(24) ptr @calloc(i64 1, i64 24)
  %42 = icmp eq ptr %calloc, null
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(16) %41, i8 0, i64 16, i1 false)
  br i1 %42, label %59, label %43

43:                                               ; preds = %40, %37
  %.040 = phi ptr [ %2, %37 ], [ %5, %40 ]
  %.039 = phi ptr [ null, %37 ], [ %calloc, %40 ]
  %44 = getelementptr inbounds i8, ptr %18, i64 120
  %45 = load ptr, ptr %44, align 8, !tbaa !16
  %46 = getelementptr inbounds i8, ptr %0, i64 8
  %47 = load ptr, ptr %46, align 8, !tbaa !21
  %48 = call i32 %45(ptr noundef %47, ptr noundef nonnull %.143, ptr noundef nonnull %.040) #5
  %49 = icmp eq i32 %48, 0
  br i1 %49, label %50, label %58

50:                                               ; preds = %43
  %.not50 = icmp eq ptr %.039, null
  br i1 %.not50, label %59, label %51

51:                                               ; preds = %50
  store i32 415356725, ptr %.039, align 8, !tbaa !17
  %52 = getelementptr inbounds i8, ptr %5, i64 16
  %53 = load ptr, ptr %52, align 8, !tbaa !16
  %54 = getelementptr inbounds i8, ptr %.039, i64 8
  store ptr %53, ptr %54, align 8, !tbaa !20
  %55 = load ptr, ptr %17, align 8, !tbaa !14
  %56 = getelementptr inbounds i8, ptr %.039, i64 16
  store ptr %55, ptr %56, align 8, !tbaa !19
  %57 = getelementptr inbounds i8, ptr %2, i64 16
  store ptr %.039, ptr %57, align 8, !tbaa !16
  br label %59

58:                                               ; preds = %43
  call void @free(ptr noundef %.039) #5
  br label %59

59:                                               ; preds = %58, %51, %50, %40
  %.1 = phi i32 [ 1025, %40 ], [ 0, %50 ], [ 0, %51 ], [ %48, %58 ]
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %5) #5
  br label %.thread

.thread:                                          ; preds = %29, %27, %23, %59
  %.2 = phi i32 [ %.1, %59 ], [ 264, %23 ], [ 264, %27 ], [ 264, %29 ]
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %4) #5
  br label %60

60:                                               ; preds = %.thread, %14, %16, %12, %10, %7, %3
  %.4 = phi i32 [ 263, %3 ], [ 259, %7 ], [ 513, %10 ], [ 513, %12 ], [ %.2, %.thread ], [ 263, %14 ], [ 263, %16 ]
  ret i32 %.4
}

; Function Attrs: nofree nounwind willreturn allockind("alloc,zeroed") allocsize(0,1) memory(inaccessiblemem: readwrite)
declare noalias noundef ptr @calloc(i64 noundef, i64 noundef) local_unnamed_addr #4

attributes #0 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: write) }
attributes #2 = { 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 #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 = { nofree nounwind willreturn allockind("alloc,zeroed") allocsize(0,1) memory(inaccessiblemem: readwrite) "alloc-family"="malloc" }
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, !7, i64 0}
!6 = !{!"onnxMemoryFenceV1", !7, i64 0, !10, i64 8, !8, i64 16}
!7 = !{!"int", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C/C++ TBAA"}
!10 = !{!"long", !8, i64 0}
!11 = !{!12, !7, i64 0}
!12 = !{!"onnxifi_graph_wrapper", !7, i64 0, !13, i64 8, !13, i64 16}
!13 = !{!"any pointer", !8, i64 0}
!14 = !{!12, !13, i64 16}
!15 = !{!6, !10, i64 8}
!16 = !{!8, !8, i64 0}
!17 = !{!18, !7, i64 0}
!18 = !{!"onnxifi_event_wrapper", !7, i64 0, !13, i64 8, !13, i64 16}
!19 = !{!18, !13, i64 16}
!20 = !{!18, !13, i64 8}
!21 = !{!12, !13, i64 8}


; Effective O3 passes: CorrelatedValuePropagationPass,DSEPass,EarlyCSEPass,GlobalOptPass,InferFunctionAttrsPass,InstCombinePass,JumpThreadingPass,MemCpyOptPass,PostOrderFunctionAttrsPass,SROAPass,SimplifyCFGPass,TailCallElimPass