; LLVM IR from asllop/AppOS :: net/ipv4 (ipv4)

; 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.NetIfaceStruct = type { i32, i8, i16, i8, i32, i32, i32, [128 x ptr], %struct.NetFragStruct, %struct.NetFragStruct }
%struct.NetFragStruct = type { i16, i8, [32 x ptr] }

@.str = external hidden unnamed_addr constant [18 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [19 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [17 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [10 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [24 x i8], align 1

; Function Attrs: nounwind uwtable
define dso_local i32 @ipv4_receive(i8 noundef zeroext %0, ptr noundef %1, i64 noundef %2) #0 {
  %4 = alloca i32, align 4
  %5 = alloca i8, align 1
  %6 = alloca ptr, align 8
  %7 = alloca i64, align 8
  %8 = alloca ptr, align 8
  %9 = alloca i32, align 4
  %10 = alloca i8, align 1
  %11 = alloca i16, align 2
  %12 = alloca i16, align 2
  %13 = alloca ptr, align 8
  %14 = alloca i16, align 2
  %15 = alloca [10 x i8], align 1
  %16 = alloca ptr, align 8
  %17 = alloca i32, align 4
  %18 = alloca ptr, align 8
  %19 = alloca i16, align 2
  store i8 %0, ptr %5, align 1, !tbaa !5
  store ptr %1, ptr %6, align 8, !tbaa !8
  store i64 %2, ptr %7, align 8, !tbaa !10
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #3
  %20 = load i8, ptr %5, align 1, !tbaa !5
  %21 = call ptr @net_iface(i8 noundef zeroext %20)
  store ptr %21, ptr %8, align 8, !tbaa !8
  %22 = load ptr, ptr %6, align 8, !tbaa !8
  %23 = getelementptr inbounds i8, ptr %22, i64 0
  %24 = load i8, ptr %23, align 1, !tbaa !5
  %25 = zext i8 %24 to i32
  %26 = and i32 %25, 240
  %27 = icmp ne i32 %26, 64
  br i1 %27, label %28, label %29

28:                                               ; preds = %3
  store i32 -503, ptr %4, align 4
  store i32 1, ptr %9, align 4
  br label %169

29:                                               ; preds = %3
  call void @llvm.lifetime.start.p0(i64 1, ptr %10) #3
  %30 = load ptr, ptr %6, align 8, !tbaa !8
  %31 = getelementptr inbounds i8, ptr %30, i64 0
  %32 = load i8, ptr %31, align 1, !tbaa !5
  %33 = zext i8 %32 to i32
  %34 = and i32 %33, 15
  %35 = mul nsw i32 %34, 4
  %36 = trunc i32 %35 to i8
  store i8 %36, ptr %10, align 1, !tbaa !5
  %37 = load i8, ptr %10, align 1, !tbaa !5
  %38 = zext i8 %37 to i32
  %39 = icmp slt i32 %38, 20
  br i1 %39, label %40, label %41

40:                                               ; preds = %29
  store i32 -502, ptr %4, align 4
  store i32 1, ptr %9, align 4
  br label %168

41:                                               ; preds = %29
  call void @llvm.lifetime.start.p0(i64 2, ptr %11) #3
  %42 = load ptr, ptr %6, align 8, !tbaa !8
  %43 = getelementptr inbounds i8, ptr %42, i64 2
  %44 = load i8, ptr %43, align 1, !tbaa !5
  %45 = zext i8 %44 to i32
  %46 = shl i32 %45, 8
  %47 = load ptr, ptr %6, align 8, !tbaa !8
  %48 = getelementptr inbounds i8, ptr %47, i64 3
  %49 = load i8, ptr %48, align 1, !tbaa !5
  %50 = zext i8 %49 to i32
  %51 = or i32 %46, %50
  %52 = trunc i32 %51 to i16
  store i16 %52, ptr %11, align 2, !tbaa !12
  %53 = load i16, ptr %11, align 2, !tbaa !12
  %54 = zext i16 %53 to i64
  %55 = load i64, ptr %7, align 8, !tbaa !10
  %56 = icmp ne i64 %54, %55
  br i1 %56, label %57, label %58

57:                                               ; preds = %41
  store i32 -501, ptr %4, align 4
  store i32 1, ptr %9, align 4
  br label %167

58:                                               ; preds = %41
  call void @llvm.lifetime.start.p0(i64 2, ptr %12) #3
  %59 = load ptr, ptr %6, align 8, !tbaa !8
  %60 = load i8, ptr %10, align 1, !tbaa !5
  %61 = zext i8 %60 to i32
  %62 = call zeroext i16 @net_checksum(ptr noundef %59, i32 noundef %61)
  store i16 %62, ptr %12, align 2, !tbaa !12
  %63 = load i16, ptr %12, align 2, !tbaa !12
  %64 = icmp ne i16 %63, 0
  br i1 %64, label %65, label %66

65:                                               ; preds = %58
  store i32 -500, ptr %4, align 4
  store i32 1, ptr %9, align 4
  br label %166

66:                                               ; preds = %58
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #3
  %67 = load i64, ptr %7, align 8, !tbaa !10
  %68 = call ptr @core_malloc(i64 noundef %67)
  store ptr %68, ptr %13, align 8, !tbaa !8
  %69 = load ptr, ptr %13, align 8, !tbaa !8
  %70 = icmp ne ptr %69, null
  br i1 %70, label %72, label %71

71:                                               ; preds = %66
  store i32 -499, ptr %4, align 4
  store i32 1, ptr %9, align 4
  br label %165

72:                                               ; preds = %66
  %73 = load ptr, ptr %13, align 8, !tbaa !8
  %74 = load ptr, ptr %6, align 8, !tbaa !8
  %75 = load i64, ptr %7, align 8, !tbaa !10
  %76 = call i32 @core_copy(ptr noundef %73, ptr noundef %74, i64 noundef %75)
  call void @llvm.lifetime.start.p0(i64 2, ptr %14) #3
  %77 = load ptr, ptr %6, align 8, !tbaa !8
  %78 = getelementptr inbounds i8, ptr %77, i64 4
  %79 = load i8, ptr %78, align 1, !tbaa !5
  %80 = zext i8 %79 to i32
  %81 = shl i32 %80, 8
  %82 = load ptr, ptr %6, align 8, !tbaa !8
  %83 = getelementptr inbounds i8, ptr %82, i64 5
  %84 = load i8, ptr %83, align 1, !tbaa !5
  %85 = zext i8 %84 to i32
  %86 = or i32 %81, %85
  %87 = trunc i32 %86 to i16
  store i16 %87, ptr %14, align 2, !tbaa !12
  %88 = load ptr, ptr %6, align 8, !tbaa !8
  %89 = getelementptr inbounds i8, ptr %88, i64 6
  %90 = load i8, ptr %89, align 1, !tbaa !5
  %91 = zext i8 %90 to i32
  %92 = and i32 %91, 32
  %93 = icmp ne i32 %92, 0
  br i1 %93, label %94, label %110

94:                                               ; preds = %72
  %95 = load ptr, ptr %8, align 8, !tbaa !8
  %96 = load i16, ptr %14, align 2, !tbaa !12
  %97 = call zeroext i8 @ipv4_fragment_present(ptr noundef %95, i16 noundef zeroext %96)
  %98 = icmp ne i8 %97, 0
  br i1 %98, label %99, label %104

99:                                               ; preds = %94
  call void @core_log(ptr noundef @.str)
  %100 = load ptr, ptr %8, align 8, !tbaa !8
  %101 = load i16, ptr %14, align 2, !tbaa !12
  %102 = load ptr, ptr %13, align 8, !tbaa !8
  %103 = call zeroext i8 @ipv4_add_existing_fragment(ptr noundef %100, i16 noundef zeroext %101, ptr noundef %102)
  br label %109

104:                                              ; preds = %94
  call void @core_log(ptr noundef @.str.1)
  %105 = load ptr, ptr %8, align 8, !tbaa !8
  %106 = load i16, ptr %14, align 2, !tbaa !12
  %107 = load ptr, ptr %13, align 8, !tbaa !8
  %108 = call zeroext i8 @ipv4_add_new_fragment(ptr noundef %105, i16 noundef zeroext %106, ptr noundef %107)
  br label %109

109:                                              ; preds = %104, %99
  br label %164

110:                                              ; preds = %72
  %111 = load ptr, ptr %8, align 8, !tbaa !8
  %112 = load i16, ptr %14, align 2, !tbaa !12
  %113 = call zeroext i8 @ipv4_fragment_present(ptr noundef %111, i16 noundef zeroext %112)
  %114 = icmp ne i8 %113, 0
  br i1 %114, label %115, label %160

115:                                              ; preds = %110
  call void @core_log(ptr noundef @.str.2)
  %116 = load ptr, ptr %8, align 8, !tbaa !8
  %117 = load i16, ptr %14, align 2, !tbaa !12
  %118 = load ptr, ptr %13, align 8, !tbaa !8
  %119 = call zeroext i8 @ipv4_add_existing_fragment(ptr noundef %116, i16 noundef zeroext %117, ptr noundef %118)
  %120 = load ptr, ptr %8, align 8, !tbaa !8
  %121 = load i16, ptr %14, align 2, !tbaa !12
  %122 = call zeroext i8 @ipv4_sort_fragments(ptr noundef %120, i16 noundef zeroext %121)
  call void @llvm.lifetime.start.p0(i64 10, ptr %15) #3
  call void @llvm.lifetime.start.p0(i64 8, ptr %16) #3
  %123 = load ptr, ptr %8, align 8, !tbaa !8
  %124 = getelementptr inbounds %struct.NetIfaceStruct, ptr %123, i32 0, i32 8
  store ptr %124, ptr %16, align 8, !tbaa !8
  call void @llvm.lifetime.start.p0(i64 4, ptr %17) #3
  store i32 0, ptr %17, align 4, !tbaa !14
  br label %125

125:                                              ; preds = %156, %115
  %126 = load i32, ptr %17, align 4, !tbaa !14
  %127 = load ptr, ptr %16, align 8, !tbaa !8
  %128 = getelementptr inbounds %struct.NetFragStruct, ptr %127, i32 0, i32 1
  %129 = load i8, ptr %128, align 2, !tbaa !16
  %130 = zext i8 %129 to i32
  %131 = icmp slt i32 %126, %130
  br i1 %131, label %133, label %132

132:                                              ; preds = %125
  store i32 2, ptr %9, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %17) #3
  br label %159

133:                                              ; preds = %125
  call void @llvm.lifetime.start.p0(i64 8, ptr %18) #3
  %134 = load ptr, ptr %16, align 8, !tbaa !8
  %135 = getelementptr inbounds %struct.NetFragStruct, ptr %134, i32 0, i32 2
  %136 = load i32, ptr %17, align 4, !tbaa !14
  %137 = sext i32 %136 to i64
  %138 = getelementptr inbounds [32 x ptr], ptr %135, i64 0, i64 %137
  %139 = load ptr, ptr %138, align 8, !tbaa !8
  store ptr %139, ptr %18, align 8, !tbaa !8
  call void @llvm.lifetime.start.p0(i64 2, ptr %19) #3
  %140 = load ptr, ptr %18, align 8, !tbaa !8
  %141 = getelementptr inbounds i8, ptr %140, i64 6
  %142 = load i8, ptr %141, align 1, !tbaa !5
  %143 = zext i8 %142 to i32
  %144 = and i32 %143, 31
  %145 = shl i32 %144, 8
  %146 = load ptr, ptr %18, align 8, !tbaa !8
  %147 = getelementptr inbounds i8, ptr %146, i64 7
  %148 = load i8, ptr %147, align 1, !tbaa !5
  %149 = zext i8 %148 to i32
  %150 = or i32 %145, %149
  %151 = trunc i32 %150 to i16
  store i16 %151, ptr %19, align 2, !tbaa !12
  call void @core_log(ptr noundef @.str.3)
  %152 = load i16, ptr %19, align 2, !tbaa !12
  %153 = zext i16 %152 to i64
  %154 = getelementptr inbounds [10 x i8], ptr %15, i64 0, i64 0
  %155 = call ptr @itoa(i64 noundef %153, ptr noundef %154, i32 noundef 10)
  call void @core_log(ptr noundef %155)
  call void @core_log(ptr noundef @.str.4)
  call void @llvm.lifetime.end.p0(i64 2, ptr %19) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %18) #3
  br label %156

156:                                              ; preds = %133
  %157 = load i32, ptr %17, align 4, !tbaa !14
  %158 = add nsw i32 %157, 1
  store i32 %158, ptr %17, align 4, !tbaa !14
  br label %125, !llvm.loop !18

159:                                              ; preds = %132
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #3
  call void @llvm.lifetime.end.p0(i64 10, ptr %15) #3
  br label %163

160:                                              ; preds = %110
  call void @core_log(ptr noundef @.str.5)
  %161 = load ptr, ptr %8, align 8, !tbaa !8
  %162 = load ptr, ptr %13, align 8, !tbaa !8
  call void @ipv4_enqueue(ptr noundef %161, ptr noundef %162)
  br label %163

163:                                              ; preds = %160, %159
  br label %164

164:                                              ; preds = %163, %109
  store i32 0, ptr %4, align 4
  store i32 1, ptr %9, align 4
  call void @llvm.lifetime.end.p0(i64 2, ptr %14) #3
  br label %165

165:                                              ; preds = %164, %71
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #3
  br label %166

166:                                              ; preds = %165, %65
  call void @llvm.lifetime.end.p0(i64 2, ptr %12) #3
  br label %167

167:                                              ; preds = %166, %57
  call void @llvm.lifetime.end.p0(i64 2, ptr %11) #3
  br label %168

168:                                              ; preds = %167, %40
  call void @llvm.lifetime.end.p0(i64 1, ptr %10) #3
  br label %169

169:                                              ; preds = %168, %28
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #3
  %170 = load i32, ptr %4, align 4
  ret i32 %170
}

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

declare ptr @net_iface(i8 noundef zeroext) #2

declare zeroext i16 @net_checksum(ptr noundef, i32 noundef) #2

declare ptr @core_malloc(i64 noundef) #2

declare i32 @core_copy(ptr noundef, ptr noundef, i64 noundef) #2

declare zeroext i8 @ipv4_fragment_present(ptr noundef, i16 noundef zeroext) #2

declare void @core_log(ptr noundef) #2

declare zeroext i8 @ipv4_add_existing_fragment(ptr noundef, i16 noundef zeroext, ptr noundef) #2

declare zeroext i8 @ipv4_add_new_fragment(ptr noundef, i16 noundef zeroext, ptr noundef) #2

declare zeroext i8 @ipv4_sort_fragments(ptr noundef, i16 noundef zeroext) #2

declare ptr @itoa(i64 noundef, ptr noundef, i32 noundef) #2

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

declare void @ipv4_enqueue(ptr noundef, ptr noundef) #2

attributes #0 = { nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { "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 = !{!"omnipotent char", !7, i64 0}
!7 = !{!"Simple C/C++ TBAA"}
!8 = !{!9, !9, i64 0}
!9 = !{!"any pointer", !6, i64 0}
!10 = !{!11, !11, i64 0}
!11 = !{!"long", !6, i64 0}
!12 = !{!13, !13, i64 0}
!13 = !{!"short", !6, i64 0}
!14 = !{!15, !15, i64 0}
!15 = !{!"int", !6, i64 0}
!16 = !{!17, !6, i64 2}
!17 = !{!"NetFragStruct", !13, i64 0, !6, i64 2, !6, i64 8}
!18 = distinct !{!18, !19}
!19 = !{!"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 [18 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [19 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [17 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [10 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [24 x i8], align 1

; Function Attrs: nounwind uwtable
define dso_local range(i32 -503, 1) i32 @ipv4_receive(i8 noundef zeroext %0, ptr noundef %1, i64 noundef %2) local_unnamed_addr #0 {
  %4 = alloca [10 x i8], align 1
  %5 = tail call ptr @net_iface(i8 noundef zeroext %0) #3
  %6 = load i8, ptr %1, align 1, !tbaa !5
  %7 = and i8 %6, -16
  %.not = icmp eq i8 %7, 64
  br i1 %.not, label %8, label %68

8:                                                ; preds = %3
  %9 = shl i8 %6, 2
  %10 = zext nneg i8 %9 to i32
  %11 = icmp ult i8 %9, 20
  br i1 %11, label %68, label %12

12:                                               ; preds = %8
  %13 = getelementptr inbounds i8, ptr %1, i64 2
  %14 = load i8, ptr %13, align 1, !tbaa !5
  %15 = zext i8 %14 to i64
  %16 = shl nuw nsw i64 %15, 8
  %17 = getelementptr inbounds i8, ptr %1, i64 3
  %18 = load i8, ptr %17, align 1, !tbaa !5
  %19 = zext i8 %18 to i64
  %20 = or disjoint i64 %16, %19
  %.not49 = icmp eq i64 %20, %2
  br i1 %.not49, label %21, label %68

21:                                               ; preds = %12
  %22 = tail call zeroext i16 @net_checksum(ptr noundef nonnull %1, i32 noundef %10) #3
  %.not50 = icmp eq i16 %22, 0
  br i1 %.not50, label %23, label %68

23:                                               ; preds = %21
  %24 = tail call ptr @core_malloc(i64 noundef %2) #3
  %.not51 = icmp eq ptr %24, null
  br i1 %.not51, label %68, label %25

25:                                               ; preds = %23
  %26 = tail call i32 @core_copy(ptr noundef nonnull %24, ptr noundef nonnull %1, i64 noundef %2) #3
  %27 = getelementptr inbounds i8, ptr %1, i64 4
  %28 = load i8, ptr %27, align 1, !tbaa !5
  %29 = zext i8 %28 to i16
  %30 = shl nuw i16 %29, 8
  %31 = getelementptr inbounds i8, ptr %1, i64 5
  %32 = load i8, ptr %31, align 1, !tbaa !5
  %33 = zext i8 %32 to i16
  %34 = or disjoint i16 %30, %33
  %35 = getelementptr inbounds i8, ptr %1, i64 6
  %36 = load i8, ptr %35, align 1, !tbaa !5
  %37 = and i8 %36, 32
  %.not52 = icmp eq i8 %37, 0
  %38 = tail call zeroext i8 @ipv4_fragment_present(ptr noundef %5, i16 noundef zeroext %34) #3
  %.not53 = icmp eq i8 %38, 0
  br i1 %.not52, label %44, label %39

39:                                               ; preds = %25
  br i1 %.not53, label %42, label %40

40:                                               ; preds = %39
  tail call void @core_log(ptr noundef nonnull @.str) #3
  %41 = tail call zeroext i8 @ipv4_add_existing_fragment(ptr noundef %5, i16 noundef zeroext %34, ptr noundef nonnull %24) #3
  br label %68

42:                                               ; preds = %39
  tail call void @core_log(ptr noundef nonnull @.str.1) #3
  %43 = tail call zeroext i8 @ipv4_add_new_fragment(ptr noundef %5, i16 noundef zeroext %34, ptr noundef nonnull %24) #3
  br label %68

44:                                               ; preds = %25
  br i1 %.not53, label %67, label %45

45:                                               ; preds = %44
  tail call void @core_log(ptr noundef nonnull @.str.2) #3
  %46 = tail call zeroext i8 @ipv4_add_existing_fragment(ptr noundef %5, i16 noundef zeroext %34, ptr noundef nonnull %24) #3
  %47 = tail call zeroext i8 @ipv4_sort_fragments(ptr noundef %5, i16 noundef zeroext %34) #3
  call void @llvm.lifetime.start.p0(i64 10, ptr nonnull %4) #3
  %48 = getelementptr inbounds i8, ptr %5, i64 1050
  %49 = load i8, ptr %48, align 2, !tbaa !8
  %.not56 = icmp eq i8 %49, 0
  br i1 %.not56, label %._crit_edge, label %.lr.ph

.lr.ph:                                           ; preds = %45
  %50 = getelementptr inbounds i8, ptr %5, i64 1056
  br label %51

._crit_edge:                                      ; preds = %51, %45
  call void @llvm.lifetime.end.p0(i64 10, ptr nonnull %4) #3
  br label %68

51:                                               ; preds = %.lr.ph, %51
  %indvars.iv = phi i64 [ 0, %.lr.ph ], [ %indvars.iv.next, %51 ]
  %52 = getelementptr inbounds [32 x ptr], ptr %50, i64 0, i64 %indvars.iv
  %53 = load ptr, ptr %52, align 8, !tbaa !11
  %54 = getelementptr inbounds i8, ptr %53, i64 6
  %55 = load i8, ptr %54, align 1, !tbaa !5
  %56 = and i8 %55, 31
  %57 = zext nneg i8 %56 to i64
  %58 = shl nuw nsw i64 %57, 8
  %59 = getelementptr inbounds i8, ptr %53, i64 7
  %60 = load i8, ptr %59, align 1, !tbaa !5
  %61 = zext i8 %60 to i64
  %62 = or disjoint i64 %58, %61
  call void @core_log(ptr noundef nonnull @.str.3) #3
  %63 = call ptr @itoa(i64 noundef %62, ptr noundef nonnull %4, i32 noundef 10) #3
  call void @core_log(ptr noundef %63) #3
  call void @core_log(ptr noundef nonnull @.str.4) #3
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %64 = load i8, ptr %48, align 2, !tbaa !8
  %65 = zext i8 %64 to i64
  %66 = icmp ult i64 %indvars.iv.next, %65
  br i1 %66, label %51, label %._crit_edge, !llvm.loop !13

67:                                               ; preds = %44
  tail call void @core_log(ptr noundef nonnull @.str.5) #3
  tail call void @ipv4_enqueue(ptr noundef %5, ptr noundef nonnull %24) #3
  br label %68

68:                                               ; preds = %8, %21, %42, %40, %67, %._crit_edge, %23, %12, %3
  %.4 = phi i32 [ -503, %3 ], [ -502, %8 ], [ -501, %12 ], [ -500, %21 ], [ -499, %23 ], [ 0, %._crit_edge ], [ 0, %67 ], [ 0, %40 ], [ 0, %42 ]
  ret i32 %.4
}

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

declare ptr @net_iface(i8 noundef zeroext) local_unnamed_addr #2

declare zeroext i16 @net_checksum(ptr noundef, i32 noundef) local_unnamed_addr #2

declare ptr @core_malloc(i64 noundef) local_unnamed_addr #2

declare i32 @core_copy(ptr noundef, ptr noundef, i64 noundef) local_unnamed_addr #2

declare zeroext i8 @ipv4_fragment_present(ptr noundef, i16 noundef zeroext) local_unnamed_addr #2

declare void @core_log(ptr noundef) local_unnamed_addr #2

declare zeroext i8 @ipv4_add_existing_fragment(ptr noundef, i16 noundef zeroext, ptr noundef) local_unnamed_addr #2

declare zeroext i8 @ipv4_add_new_fragment(ptr noundef, i16 noundef zeroext, ptr noundef) local_unnamed_addr #2

declare zeroext i8 @ipv4_sort_fragments(ptr noundef, i16 noundef zeroext) local_unnamed_addr #2

declare ptr @itoa(i64 noundef, ptr noundef, i32 noundef) local_unnamed_addr #2

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

declare void @ipv4_enqueue(ptr noundef, ptr noundef) local_unnamed_addr #2

attributes #0 = { nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { "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 = !{!"omnipotent char", !7, i64 0}
!7 = !{!"Simple C/C++ TBAA"}
!8 = !{!9, !6, i64 2}
!9 = !{!"NetFragStruct", !10, i64 0, !6, i64 2, !6, i64 8}
!10 = !{!"short", !6, i64 0}
!11 = !{!12, !12, i64 0}
!12 = !{!"any pointer", !6, i64 0}
!13 = distinct !{!13, !14}
!14 = !{!"llvm.loop.mustprogress"}


; Effective O3 passes: EarlyCSEPass,GlobalOptPass,IPSCCPPass,IndVarSimplifyPass,InferFunctionAttrsPass,InstCombinePass,JumpThreadingPass,LICMPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,ReassociatePass,SCCPPass,SROAPass,SimplifyCFGPass,TailCallElimPass