; LLVM IR from whoiswelliton/Computer_Engineering_UTFPR-PB :: Embedded_Systems/TIVA Connected TM4C1294XL Projects/01 - lwIP_HTTPServer_on_TIVA (src)

; 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.ip4_addr = type { i32 }
%struct.pbuf = type { ptr, ptr, i16, i16, i8, i8, i8, i8 }
%struct.ip_hdr = type { i8, i8, i16, i16, i16, i8, i8, i16, %struct.ip4_addr_packed, %struct.ip4_addr_packed }
%struct.ip4_addr_packed = type { i32 }
%struct.netif = type { ptr, %struct.ip4_addr, %struct.ip4_addr, %struct.ip4_addr, ptr, ptr, ptr, ptr, ptr, [1 x ptr], i16, [6 x i8], i8, i8, [2 x i8], i8, i8 }

@.str = external hidden unnamed_addr constant [40 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [12 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [183 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [45 x i8], align 1
@ip_id = external hidden global i16, align 2
@ip_addr_any = external constant %struct.ip4_addr, align 4

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

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

declare zeroext i16 @lwip_htons(i16 noundef zeroext) #1

; Function Attrs: nounwind uwtable
define dso_local signext i8 @ip4_output_if_src(ptr noundef %0, ptr noundef %1, ptr noundef %2, i8 noundef zeroext %3, i8 noundef zeroext %4, i8 noundef zeroext %5, ptr noundef %6) #2 {
  %8 = alloca i8, align 1
  %9 = alloca ptr, align 8
  %10 = alloca ptr, align 8
  %11 = alloca ptr, align 8
  %12 = alloca i8, align 1
  %13 = alloca i8, align 1
  %14 = alloca i8, align 1
  %15 = alloca ptr, align 8
  %16 = alloca ptr, align 8
  %17 = alloca %struct.ip4_addr, align 4
  %18 = alloca i16, align 2
  %19 = alloca i32, align 4
  store ptr %0, ptr %9, align 8, !tbaa !5
  store ptr %1, ptr %10, align 8, !tbaa !5
  store ptr %2, ptr %11, align 8, !tbaa !5
  store i8 %3, ptr %12, align 1, !tbaa !9
  store i8 %4, ptr %13, align 1, !tbaa !9
  store i8 %5, ptr %14, align 1, !tbaa !9
  store ptr %6, ptr %15, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %16) #3
  call void @llvm.lifetime.start.p0(i64 4, ptr %17) #3
  br label %20

20:                                               ; preds = %7
  %21 = load ptr, ptr %9, align 8, !tbaa !5
  %22 = getelementptr inbounds %struct.pbuf, ptr %21, i32 0, i32 6
  %23 = load i8, ptr %22, align 2, !tbaa !10
  %24 = zext i8 %23 to i32
  %25 = icmp eq i32 %24, 1
  br i1 %25, label %31, label %26

26:                                               ; preds = %20
  br label %27

27:                                               ; preds = %26
  %28 = call i32 (ptr, ...) @printf(ptr noundef @.str, ptr noundef @.str.1, i32 noundef 852, ptr noundef @.str.2)
  br label %29

29:                                               ; preds = %27
  br label %30

30:                                               ; preds = %29
  br label %31

31:                                               ; preds = %30, %20
  br label %32

32:                                               ; preds = %31
  br label %33

33:                                               ; preds = %32
  %34 = load ptr, ptr %11, align 8, !tbaa !5
  %35 = icmp ne ptr %34, null
  br i1 %35, label %36, label %115

36:                                               ; preds = %33
  call void @llvm.lifetime.start.p0(i64 2, ptr %18) #3
  store i16 20, ptr %18, align 2, !tbaa !13
  %37 = load ptr, ptr %9, align 8, !tbaa !5
  %38 = call zeroext i8 @pbuf_add_header(ptr noundef %37, i64 noundef 20)
  %39 = icmp ne i8 %38, 0
  br i1 %39, label %40, label %41

40:                                               ; preds = %36
  store i8 -2, ptr %8, align 1
  store i32 1, ptr %19, align 4
  br label %112

41:                                               ; preds = %36
  %42 = load ptr, ptr %9, align 8, !tbaa !5
  %43 = getelementptr inbounds %struct.pbuf, ptr %42, i32 0, i32 1
  %44 = load ptr, ptr %43, align 8, !tbaa !14
  store ptr %44, ptr %16, align 8, !tbaa !5
  br label %45

45:                                               ; preds = %41
  %46 = load ptr, ptr %9, align 8, !tbaa !5
  %47 = getelementptr inbounds %struct.pbuf, ptr %46, i32 0, i32 3
  %48 = load i16, ptr %47, align 2, !tbaa !15
  %49 = zext i16 %48 to i64
  %50 = icmp uge i64 %49, 20
  br i1 %50, label %56, label %51

51:                                               ; preds = %45
  br label %52

52:                                               ; preds = %51
  %53 = call i32 (ptr, ...) @printf(ptr noundef @.str, ptr noundef @.str.3, i32 noundef 905, ptr noundef @.str.2)
  br label %54

54:                                               ; preds = %52
  br label %55

55:                                               ; preds = %54
  br label %56

56:                                               ; preds = %55, %45
  br label %57

57:                                               ; preds = %56
  br label %58

58:                                               ; preds = %57
  %59 = load i8, ptr %12, align 1, !tbaa !9
  %60 = load ptr, ptr %16, align 8, !tbaa !5
  %61 = getelementptr inbounds %struct.ip_hdr, ptr %60, i32 0, i32 5
  store i8 %59, ptr %61, align 1, !tbaa !16
  %62 = load i8, ptr %14, align 1, !tbaa !9
  %63 = load ptr, ptr %16, align 8, !tbaa !5
  %64 = getelementptr inbounds %struct.ip_hdr, ptr %63, i32 0, i32 6
  store i8 %62, ptr %64, align 1, !tbaa !20
  %65 = load ptr, ptr %11, align 8, !tbaa !5
  %66 = getelementptr inbounds %struct.ip4_addr, ptr %65, i32 0, i32 0
  %67 = load i32, ptr %66, align 4, !tbaa !21
  %68 = load ptr, ptr %16, align 8, !tbaa !5
  %69 = getelementptr inbounds %struct.ip_hdr, ptr %68, i32 0, i32 9
  %70 = getelementptr inbounds %struct.ip4_addr_packed, ptr %69, i32 0, i32 0
  store i32 %67, ptr %70, align 1, !tbaa !23
  %71 = load i16, ptr %18, align 2, !tbaa !13
  %72 = zext i16 %71 to i32
  %73 = sdiv i32 %72, 4
  %74 = or i32 64, %73
  %75 = trunc i32 %74 to i8
  %76 = load ptr, ptr %16, align 8, !tbaa !5
  %77 = getelementptr inbounds %struct.ip_hdr, ptr %76, i32 0, i32 0
  store i8 %75, ptr %77, align 1, !tbaa !24
  %78 = load i8, ptr %13, align 1, !tbaa !9
  %79 = load ptr, ptr %16, align 8, !tbaa !5
  %80 = getelementptr inbounds %struct.ip_hdr, ptr %79, i32 0, i32 1
  store i8 %78, ptr %80, align 1, !tbaa !25
  %81 = load ptr, ptr %9, align 8, !tbaa !5
  %82 = getelementptr inbounds %struct.pbuf, ptr %81, i32 0, i32 2
  %83 = load i16, ptr %82, align 8, !tbaa !26
  %84 = call zeroext i16 @lwip_htons(i16 noundef zeroext %83)
  %85 = load ptr, ptr %16, align 8, !tbaa !5
  %86 = getelementptr inbounds %struct.ip_hdr, ptr %85, i32 0, i32 2
  store i16 %84, ptr %86, align 1, !tbaa !27
  %87 = load ptr, ptr %16, align 8, !tbaa !5
  %88 = getelementptr inbounds %struct.ip_hdr, ptr %87, i32 0, i32 4
  store i16 0, ptr %88, align 1, !tbaa !28
  %89 = load i16, ptr @ip_id, align 2, !tbaa !13
  %90 = call zeroext i16 @lwip_htons(i16 noundef zeroext %89)
  %91 = load ptr, ptr %16, align 8, !tbaa !5
  %92 = getelementptr inbounds %struct.ip_hdr, ptr %91, i32 0, i32 3
  store i16 %90, ptr %92, align 1, !tbaa !29
  %93 = load i16, ptr @ip_id, align 2, !tbaa !13
  %94 = add i16 %93, 1
  store i16 %94, ptr @ip_id, align 2, !tbaa !13
  %95 = load ptr, ptr %10, align 8, !tbaa !5
  %96 = icmp eq ptr %95, null
  br i1 %96, label %97, label %102

97:                                               ; preds = %58
  %98 = load i32, ptr @ip_addr_any, align 4, !tbaa !21
  %99 = load ptr, ptr %16, align 8, !tbaa !5
  %100 = getelementptr inbounds %struct.ip_hdr, ptr %99, i32 0, i32 8
  %101 = getelementptr inbounds %struct.ip4_addr_packed, ptr %100, i32 0, i32 0
  store i32 %98, ptr %101, align 1, !tbaa !30
  br label %109

102:                                              ; preds = %58
  %103 = load ptr, ptr %10, align 8, !tbaa !5
  %104 = getelementptr inbounds %struct.ip4_addr, ptr %103, i32 0, i32 0
  %105 = load i32, ptr %104, align 4, !tbaa !21
  %106 = load ptr, ptr %16, align 8, !tbaa !5
  %107 = getelementptr inbounds %struct.ip_hdr, ptr %106, i32 0, i32 8
  %108 = getelementptr inbounds %struct.ip4_addr_packed, ptr %107, i32 0, i32 0
  store i32 %105, ptr %108, align 1, !tbaa !30
  br label %109

109:                                              ; preds = %102, %97
  %110 = load ptr, ptr %16, align 8, !tbaa !5
  %111 = getelementptr inbounds %struct.ip_hdr, ptr %110, i32 0, i32 7
  store i16 0, ptr %111, align 1, !tbaa !31
  store i32 0, ptr %19, align 4
  br label %112

112:                                              ; preds = %109, %40
  call void @llvm.lifetime.end.p0(i64 2, ptr %18) #3
  %113 = load i32, ptr %19, align 4
  switch i32 %113, label %160 [
    i32 0, label %114
  ]

114:                                              ; preds = %112
  br label %131

115:                                              ; preds = %33
  %116 = load ptr, ptr %9, align 8, !tbaa !5
  %117 = getelementptr inbounds %struct.pbuf, ptr %116, i32 0, i32 3
  %118 = load i16, ptr %117, align 2, !tbaa !15
  %119 = zext i16 %118 to i32
  %120 = icmp slt i32 %119, 20
  br i1 %120, label %121, label %122

121:                                              ; preds = %115
  store i8 -2, ptr %8, align 1
  store i32 1, ptr %19, align 4
  br label %160

122:                                              ; preds = %115
  %123 = load ptr, ptr %9, align 8, !tbaa !5
  %124 = getelementptr inbounds %struct.pbuf, ptr %123, i32 0, i32 1
  %125 = load ptr, ptr %124, align 8, !tbaa !14
  store ptr %125, ptr %16, align 8, !tbaa !5
  %126 = load ptr, ptr %16, align 8, !tbaa !5
  %127 = getelementptr inbounds %struct.ip_hdr, ptr %126, i32 0, i32 9
  %128 = getelementptr inbounds %struct.ip4_addr_packed, ptr %127, i32 0, i32 0
  %129 = load i32, ptr %128, align 1, !tbaa !23
  %130 = getelementptr inbounds %struct.ip4_addr, ptr %17, i32 0, i32 0
  store i32 %129, ptr %130, align 4, !tbaa !21
  store ptr %17, ptr %11, align 8, !tbaa !5
  br label %131

131:                                              ; preds = %122, %114
  %132 = load ptr, ptr %15, align 8, !tbaa !5
  %133 = getelementptr inbounds %struct.netif, ptr %132, i32 0, i32 10
  %134 = load i16, ptr %133, align 8, !tbaa !32
  %135 = zext i16 %134 to i32
  %136 = icmp ne i32 %135, 0
  br i1 %136, label %137, label %152

137:                                              ; preds = %131
  %138 = load ptr, ptr %9, align 8, !tbaa !5
  %139 = getelementptr inbounds %struct.pbuf, ptr %138, i32 0, i32 2
  %140 = load i16, ptr %139, align 8, !tbaa !26
  %141 = zext i16 %140 to i32
  %142 = load ptr, ptr %15, align 8, !tbaa !5
  %143 = getelementptr inbounds %struct.netif, ptr %142, i32 0, i32 10
  %144 = load i16, ptr %143, align 8, !tbaa !32
  %145 = zext i16 %144 to i32
  %146 = icmp sgt i32 %141, %145
  br i1 %146, label %147, label %152

147:                                              ; preds = %137
  %148 = load ptr, ptr %9, align 8, !tbaa !5
  %149 = load ptr, ptr %15, align 8, !tbaa !5
  %150 = load ptr, ptr %11, align 8, !tbaa !5
  %151 = call signext i8 @ip4_frag(ptr noundef %148, ptr noundef %149, ptr noundef %150)
  store i8 %151, ptr %8, align 1
  store i32 1, ptr %19, align 4
  br label %160

152:                                              ; preds = %137, %131
  %153 = load ptr, ptr %15, align 8, !tbaa !5
  %154 = getelementptr inbounds %struct.netif, ptr %153, i32 0, i32 5
  %155 = load ptr, ptr %154, align 8, !tbaa !34
  %156 = load ptr, ptr %15, align 8, !tbaa !5
  %157 = load ptr, ptr %9, align 8, !tbaa !5
  %158 = load ptr, ptr %11, align 8, !tbaa !5
  %159 = call signext i8 %155(ptr noundef %156, ptr noundef %157, ptr noundef %158)
  store i8 %159, ptr %8, align 1
  store i32 1, ptr %19, align 4
  br label %160

160:                                              ; preds = %152, %147, %121, %112
  call void @llvm.lifetime.end.p0(i64 4, ptr %17) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #3
  %161 = load i8, ptr %8, align 1
  ret i8 %161
}

declare i32 @printf(ptr noundef, ...) #1

declare zeroext i8 @pbuf_add_header(ptr noundef, i64 noundef) #1

declare signext i8 @ip4_frag(ptr noundef, ptr 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 = { 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 #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/C++ TBAA"}
!9 = !{!7, !7, i64 0}
!10 = !{!11, !7, i64 22}
!11 = !{!"pbuf", !6, i64 0, !6, i64 8, !12, i64 16, !12, i64 18, !7, i64 20, !7, i64 21, !7, i64 22, !7, i64 23}
!12 = !{!"short", !7, i64 0}
!13 = !{!12, !12, i64 0}
!14 = !{!11, !6, i64 8}
!15 = !{!11, !12, i64 18}
!16 = !{!17, !7, i64 8}
!17 = !{!"ip_hdr", !7, i64 0, !7, i64 1, !12, i64 2, !12, i64 4, !12, i64 6, !7, i64 8, !7, i64 9, !12, i64 10, !18, i64 12, !18, i64 16}
!18 = !{!"ip4_addr_packed", !19, i64 0}
!19 = !{!"int", !7, i64 0}
!20 = !{!17, !7, i64 9}
!21 = !{!22, !19, i64 0}
!22 = !{!"ip4_addr", !19, i64 0}
!23 = !{!17, !19, i64 16}
!24 = !{!17, !7, i64 0}
!25 = !{!17, !7, i64 1}
!26 = !{!11, !12, i64 16}
!27 = !{!17, !12, i64 2}
!28 = !{!17, !12, i64 6}
!29 = !{!17, !12, i64 4}
!30 = !{!17, !19, i64 12}
!31 = !{!17, !12, i64 10}
!32 = !{!33, !12, i64 72}
!33 = !{!"netif", !6, i64 0, !22, i64 8, !22, i64 12, !22, i64 16, !6, i64 24, !6, i64 32, !6, i64 40, !6, i64 48, !6, i64 56, !7, i64 64, !12, i64 72, !7, i64 74, !7, i64 80, !7, i64 81, !7, i64 82, !7, i64 84, !7, i64 85}
!34 = !{!33, !6, i64 32}


; 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.ip4_addr = type { i32 }

@.str = external hidden unnamed_addr constant [40 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [12 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [183 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [45 x i8], align 1
@ip_id = external hidden local_unnamed_addr global i16, align 2
@ip_addr_any = external local_unnamed_addr constant %struct.ip4_addr, align 4

; 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 nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #0

declare zeroext i16 @lwip_htons(i16 noundef zeroext) local_unnamed_addr #1

; Function Attrs: nounwind uwtable
define dso_local signext i8 @ip4_output_if_src(ptr noundef %0, ptr noundef readonly %1, ptr noundef %2, i8 noundef zeroext %3, i8 noundef zeroext %4, i8 noundef zeroext %5, ptr noundef %6) local_unnamed_addr #2 {
  %8 = alloca %struct.ip4_addr, align 4
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %8) #4
  %9 = getelementptr inbounds i8, ptr %0, i64 22
  %10 = load i8, ptr %9, align 2, !tbaa !5
  %11 = icmp eq i8 %10, 1
  br i1 %11, label %14, label %12

12:                                               ; preds = %7
  %13 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str, ptr noundef nonnull @.str.1, i32 noundef 852, ptr noundef nonnull @.str.2)
  br label %14

14:                                               ; preds = %12, %7
  %.not = icmp eq ptr %2, null
  br i1 %.not, label %44, label %15

15:                                               ; preds = %14
  %16 = tail call zeroext i8 @pbuf_add_header(ptr noundef nonnull %0, i64 noundef 20) #4
  %.not43 = icmp eq i8 %16, 0
  br i1 %.not43, label %17, label %.critedge

17:                                               ; preds = %15
  %18 = getelementptr inbounds i8, ptr %0, i64 8
  %19 = load ptr, ptr %18, align 8, !tbaa !11
  %20 = getelementptr inbounds i8, ptr %0, i64 18
  %21 = load i16, ptr %20, align 2, !tbaa !12
  %22 = icmp ugt i16 %21, 19
  br i1 %22, label %25, label %23

23:                                               ; preds = %17
  %24 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str, ptr noundef nonnull @.str.3, i32 noundef 905, ptr noundef nonnull @.str.2)
  br label %25

25:                                               ; preds = %23, %17
  %26 = getelementptr inbounds i8, ptr %19, i64 8
  store i8 %3, ptr %26, align 1, !tbaa !13
  %27 = getelementptr inbounds i8, ptr %19, i64 9
  store i8 %5, ptr %27, align 1, !tbaa !17
  %28 = load i32, ptr %2, align 4, !tbaa !18
  %29 = getelementptr inbounds i8, ptr %19, i64 16
  store i32 %28, ptr %29, align 1, !tbaa !20
  store i8 69, ptr %19, align 1, !tbaa !21
  %30 = getelementptr inbounds i8, ptr %19, i64 1
  store i8 %4, ptr %30, align 1, !tbaa !22
  %31 = getelementptr inbounds i8, ptr %0, i64 16
  %32 = load i16, ptr %31, align 8, !tbaa !23
  %33 = tail call zeroext i16 @lwip_htons(i16 noundef zeroext %32) #4
  %34 = getelementptr inbounds i8, ptr %19, i64 2
  store i16 %33, ptr %34, align 1, !tbaa !24
  %35 = getelementptr inbounds i8, ptr %19, i64 6
  store i16 0, ptr %35, align 1, !tbaa !25
  %36 = load i16, ptr @ip_id, align 2, !tbaa !26
  %37 = tail call zeroext i16 @lwip_htons(i16 noundef zeroext %36) #4
  %38 = getelementptr inbounds i8, ptr %19, i64 4
  store i16 %37, ptr %38, align 1, !tbaa !27
  %39 = load i16, ptr @ip_id, align 2, !tbaa !26
  %40 = add i16 %39, 1
  store i16 %40, ptr @ip_id, align 2, !tbaa !26
  %41 = icmp eq ptr %1, null
  %spec.select = select i1 %41, ptr @ip_addr_any, ptr %1
  %.sink = load i32, ptr %spec.select, align 4, !tbaa !18
  %42 = getelementptr inbounds i8, ptr %19, i64 12
  store i32 %.sink, ptr %42, align 1
  %43 = getelementptr inbounds i8, ptr %19, i64 10
  store i16 0, ptr %43, align 1, !tbaa !28
  br label %53

44:                                               ; preds = %14
  %45 = getelementptr inbounds i8, ptr %0, i64 18
  %46 = load i16, ptr %45, align 2, !tbaa !12
  %47 = icmp ult i16 %46, 20
  br i1 %47, label %.critedge, label %48

48:                                               ; preds = %44
  %49 = getelementptr inbounds i8, ptr %0, i64 8
  %50 = load ptr, ptr %49, align 8, !tbaa !11
  %51 = getelementptr inbounds i8, ptr %50, i64 16
  %52 = load i32, ptr %51, align 1, !tbaa !20
  store i32 %52, ptr %8, align 4, !tbaa !18
  br label %53

53:                                               ; preds = %25, %48
  %.039 = phi ptr [ %2, %25 ], [ %8, %48 ]
  %54 = getelementptr inbounds i8, ptr %6, i64 72
  %55 = load i16, ptr %54, align 8, !tbaa !29
  %.not44 = icmp eq i16 %55, 0
  br i1 %.not44, label %62, label %56

56:                                               ; preds = %53
  %57 = getelementptr inbounds i8, ptr %0, i64 16
  %58 = load i16, ptr %57, align 8, !tbaa !23
  %59 = icmp ugt i16 %58, %55
  br i1 %59, label %60, label %62

60:                                               ; preds = %56
  %61 = call signext i8 @ip4_frag(ptr noundef nonnull %0, ptr noundef nonnull %6, ptr noundef nonnull %.039) #4
  br label %.critedge

62:                                               ; preds = %56, %53
  %63 = getelementptr inbounds i8, ptr %6, i64 32
  %64 = load ptr, ptr %63, align 8, !tbaa !31
  %65 = call signext i8 %64(ptr noundef nonnull %6, ptr noundef nonnull %0, ptr noundef nonnull %.039) #4
  br label %.critedge

.critedge:                                        ; preds = %15, %44, %62, %60
  %.1 = phi i8 [ %61, %60 ], [ %65, %62 ], [ -2, %44 ], [ -2, %15 ]
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %8) #4
  ret i8 %.1
}

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

declare zeroext i8 @pbuf_add_header(ptr noundef, i64 noundef) local_unnamed_addr #1

declare signext i8 @ip4_frag(ptr noundef, ptr 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 = { 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 #3 = { 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 #4 = { 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, !8, i64 22}
!6 = !{!"pbuf", !7, i64 0, !7, i64 8, !10, i64 16, !10, i64 18, !8, i64 20, !8, i64 21, !8, i64 22, !8, i64 23}
!7 = !{!"any pointer", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C/C++ TBAA"}
!10 = !{!"short", !8, i64 0}
!11 = !{!6, !7, i64 8}
!12 = !{!6, !10, i64 18}
!13 = !{!14, !8, i64 8}
!14 = !{!"ip_hdr", !8, i64 0, !8, i64 1, !10, i64 2, !10, i64 4, !10, i64 6, !8, i64 8, !8, i64 9, !10, i64 10, !15, i64 12, !15, i64 16}
!15 = !{!"ip4_addr_packed", !16, i64 0}
!16 = !{!"int", !8, i64 0}
!17 = !{!14, !8, i64 9}
!18 = !{!19, !16, i64 0}
!19 = !{!"ip4_addr", !16, i64 0}
!20 = !{!14, !16, i64 16}
!21 = !{!14, !8, i64 0}
!22 = !{!14, !8, i64 1}
!23 = !{!6, !10, i64 16}
!24 = !{!14, !10, i64 2}
!25 = !{!14, !10, i64 6}
!26 = !{!10, !10, i64 0}
!27 = !{!14, !10, i64 4}
!28 = !{!14, !10, i64 10}
!29 = !{!30, !10, i64 72}
!30 = !{!"netif", !7, i64 0, !19, i64 8, !19, i64 12, !19, i64 16, !7, i64 24, !7, i64 32, !7, i64 40, !7, i64 48, !7, i64 56, !8, i64 64, !10, i64 72, !8, i64 74, !8, i64 80, !8, i64 81, !8, i64 82, !8, i64 84, !8, i64 85}
!31 = !{!30, !7, i64 32}


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