; 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.udp_pcb = type { %struct.ip4_addr, %struct.ip4_addr, i8, i8, i8, i8, ptr, i8, i16, i16, ptr, ptr }
%struct.ip4_addr = type { i32 }
%struct.pbuf = type { ptr, ptr, i16, i16, i8, i8, i8, i8 }
%struct.udp_hdr = type { i16, i16, i16, i16 }

@.str = external hidden unnamed_addr constant [40 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [178 x i8], align 1
@.str.14 = external hidden unnamed_addr constant [31 x i8], align 1
@.str.15 = external hidden unnamed_addr constant [32 x i8], align 1
@.str.16 = external hidden unnamed_addr constant [34 x i8], align 1
@.str.17 = external hidden unnamed_addr constant [34 x i8], align 1
@.str.18 = external hidden unnamed_addr constant [33 x i8], align 1
@.str.19 = external hidden unnamed_addr constant [46 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 i32 @printf(ptr noundef, ...) #1

declare zeroext i8 @pbuf_free(ptr noundef) #1

declare zeroext i16 @lwip_htons(i16 noundef zeroext) #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 uwtable
define dso_local signext i8 @udp_sendto_if_src(ptr noundef %0, ptr noundef %1, ptr noundef %2, i16 noundef zeroext %3, ptr noundef %4, ptr noundef %5) #2 {
  %7 = alloca i8, align 1
  %8 = alloca ptr, align 8
  %9 = alloca ptr, align 8
  %10 = alloca ptr, align 8
  %11 = alloca i16, align 2
  %12 = alloca ptr, align 8
  %13 = alloca ptr, align 8
  %14 = alloca ptr, align 8
  %15 = alloca i8, align 1
  %16 = alloca ptr, align 8
  %17 = alloca i8, align 1
  %18 = alloca i8, align 1
  %19 = alloca i32, align 4
  store ptr %0, ptr %8, align 8, !tbaa !5
  store ptr %1, ptr %9, align 8, !tbaa !5
  store ptr %2, ptr %10, align 8, !tbaa !5
  store i16 %3, ptr %11, align 2, !tbaa !9
  store ptr %4, ptr %12, align 8, !tbaa !5
  store ptr %5, ptr %13, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #3
  call void @llvm.lifetime.start.p0(i64 1, ptr %15) #3
  call void @llvm.lifetime.start.p0(i64 8, ptr %16) #3
  call void @llvm.lifetime.start.p0(i64 1, ptr %17) #3
  call void @llvm.lifetime.start.p0(i64 1, ptr %18) #3
  br label %20

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

23:                                               ; preds = %20
  br label %24

24:                                               ; preds = %23
  %25 = call i32 (ptr, ...) @printf(ptr noundef @.str, ptr noundef @.str.14, i32 noundef 721, ptr noundef @.str.2)
  br label %26

26:                                               ; preds = %24
  br label %27

27:                                               ; preds = %26
  store i8 -16, ptr %7, align 1
  store i32 1, ptr %19, align 4
  br label %186

28:                                               ; preds = %20
  br label %29

29:                                               ; preds = %28
  br label %30

30:                                               ; preds = %29
  br label %31

31:                                               ; preds = %30
  %32 = load ptr, ptr %9, align 8, !tbaa !5
  %33 = icmp ne ptr %32, null
  br i1 %33, label %39, label %34

34:                                               ; preds = %31
  br label %35

35:                                               ; preds = %34
  %36 = call i32 (ptr, ...) @printf(ptr noundef @.str, ptr noundef @.str.15, i32 noundef 722, ptr noundef @.str.2)
  br label %37

37:                                               ; preds = %35
  br label %38

38:                                               ; preds = %37
  store i8 -16, ptr %7, align 1
  store i32 1, ptr %19, align 4
  br label %186

39:                                               ; preds = %31
  br label %40

40:                                               ; preds = %39
  br label %41

41:                                               ; preds = %40
  br label %42

42:                                               ; preds = %41
  %43 = load ptr, ptr %10, align 8, !tbaa !5
  %44 = icmp ne ptr %43, null
  br i1 %44, label %50, label %45

45:                                               ; preds = %42
  br label %46

46:                                               ; preds = %45
  %47 = call i32 (ptr, ...) @printf(ptr noundef @.str, ptr noundef @.str.16, i32 noundef 723, ptr noundef @.str.2)
  br label %48

48:                                               ; preds = %46
  br label %49

49:                                               ; preds = %48
  store i8 -16, ptr %7, align 1
  store i32 1, ptr %19, align 4
  br label %186

50:                                               ; preds = %42
  br label %51

51:                                               ; preds = %50
  br label %52

52:                                               ; preds = %51
  br label %53

53:                                               ; preds = %52
  %54 = load ptr, ptr %13, align 8, !tbaa !5
  %55 = icmp ne ptr %54, null
  br i1 %55, label %61, label %56

56:                                               ; preds = %53
  br label %57

57:                                               ; preds = %56
  %58 = call i32 (ptr, ...) @printf(ptr noundef @.str, ptr noundef @.str.17, i32 noundef 724, ptr noundef @.str.2)
  br label %59

59:                                               ; preds = %57
  br label %60

60:                                               ; preds = %59
  store i8 -16, ptr %7, align 1
  store i32 1, ptr %19, align 4
  br label %186

61:                                               ; preds = %53
  br label %62

62:                                               ; preds = %61
  br label %63

63:                                               ; preds = %62
  br label %64

64:                                               ; preds = %63
  %65 = load ptr, ptr %12, align 8, !tbaa !5
  %66 = icmp ne ptr %65, null
  br i1 %66, label %72, label %67

67:                                               ; preds = %64
  br label %68

68:                                               ; preds = %67
  %69 = call i32 (ptr, ...) @printf(ptr noundef @.str, ptr noundef @.str.18, i32 noundef 725, ptr noundef @.str.2)
  br label %70

70:                                               ; preds = %68
  br label %71

71:                                               ; preds = %70
  store i8 -16, ptr %7, align 1
  store i32 1, ptr %19, align 4
  br label %186

72:                                               ; preds = %64
  br label %73

73:                                               ; preds = %72
  br label %74

74:                                               ; preds = %73
  %75 = load ptr, ptr %8, align 8, !tbaa !5
  %76 = getelementptr inbounds %struct.udp_pcb, ptr %75, i32 0, i32 8
  %77 = load i16, ptr %76, align 2, !tbaa !11
  %78 = zext i16 %77 to i32
  %79 = icmp eq i32 %78, 0
  br i1 %79, label %80, label %94

80:                                               ; preds = %74
  %81 = load ptr, ptr %8, align 8, !tbaa !5
  %82 = load ptr, ptr %8, align 8, !tbaa !5
  %83 = getelementptr inbounds %struct.udp_pcb, ptr %82, i32 0, i32 0
  %84 = load ptr, ptr %8, align 8, !tbaa !5
  %85 = getelementptr inbounds %struct.udp_pcb, ptr %84, i32 0, i32 8
  %86 = load i16, ptr %85, align 2, !tbaa !11
  %87 = call signext i8 @udp_bind(ptr noundef %81, ptr noundef %83, i16 noundef zeroext %86)
  store i8 %87, ptr %15, align 1, !tbaa !15
  %88 = load i8, ptr %15, align 1, !tbaa !15
  %89 = sext i8 %88 to i32
  %90 = icmp ne i32 %89, 0
  br i1 %90, label %91, label %93

91:                                               ; preds = %80
  %92 = load i8, ptr %15, align 1, !tbaa !15
  store i8 %92, ptr %7, align 1
  store i32 1, ptr %19, align 4
  br label %186

93:                                               ; preds = %80
  br label %94

94:                                               ; preds = %93, %74
  %95 = load ptr, ptr %9, align 8, !tbaa !5
  %96 = getelementptr inbounds %struct.pbuf, ptr %95, i32 0, i32 2
  %97 = load i16, ptr %96, align 8, !tbaa !16
  %98 = zext i16 %97 to i32
  %99 = add nsw i32 %98, 8
  %100 = trunc i32 %99 to i16
  %101 = zext i16 %100 to i32
  %102 = load ptr, ptr %9, align 8, !tbaa !5
  %103 = getelementptr inbounds %struct.pbuf, ptr %102, i32 0, i32 2
  %104 = load i16, ptr %103, align 8, !tbaa !16
  %105 = zext i16 %104 to i32
  %106 = icmp slt i32 %101, %105
  br i1 %106, label %107, label %108

107:                                              ; preds = %94
  store i8 -1, ptr %7, align 1
  store i32 1, ptr %19, align 4
  br label %186

108:                                              ; preds = %94
  %109 = load ptr, ptr %9, align 8, !tbaa !5
  %110 = call zeroext i8 @pbuf_add_header(ptr noundef %109, i64 noundef 8)
  %111 = icmp ne i8 %110, 0
  br i1 %111, label %112, label %127

112:                                              ; preds = %108
  %113 = call ptr @pbuf_alloc(i32 noundef 36, i16 noundef zeroext 8, i32 noundef 640)
  store ptr %113, ptr %16, align 8, !tbaa !5
  %114 = load ptr, ptr %16, align 8, !tbaa !5
  %115 = icmp eq ptr %114, null
  br i1 %115, label %116, label %117

116:                                              ; preds = %112
  store i8 -1, ptr %7, align 1
  store i32 1, ptr %19, align 4
  br label %186

117:                                              ; preds = %112
  %118 = load ptr, ptr %9, align 8, !tbaa !5
  %119 = getelementptr inbounds %struct.pbuf, ptr %118, i32 0, i32 2
  %120 = load i16, ptr %119, align 8, !tbaa !16
  %121 = zext i16 %120 to i32
  %122 = icmp ne i32 %121, 0
  br i1 %122, label %123, label %126

123:                                              ; preds = %117
  %124 = load ptr, ptr %16, align 8, !tbaa !5
  %125 = load ptr, ptr %9, align 8, !tbaa !5
  call void @pbuf_chain(ptr noundef %124, ptr noundef %125)
  br label %126

126:                                              ; preds = %123, %117
  br label %129

127:                                              ; preds = %108
  %128 = load ptr, ptr %9, align 8, !tbaa !5
  store ptr %128, ptr %16, align 8, !tbaa !5
  br label %129

129:                                              ; preds = %127, %126
  br label %130

130:                                              ; preds = %129
  %131 = load ptr, ptr %16, align 8, !tbaa !5
  %132 = getelementptr inbounds %struct.pbuf, ptr %131, i32 0, i32 3
  %133 = load i16, ptr %132, align 2, !tbaa !18
  %134 = zext i16 %133 to i64
  %135 = icmp uge i64 %134, 8
  br i1 %135, label %141, label %136

136:                                              ; preds = %130
  br label %137

137:                                              ; preds = %136
  %138 = call i32 (ptr, ...) @printf(ptr noundef @.str, ptr noundef @.str.19, i32 noundef 782, ptr noundef @.str.2)
  br label %139

139:                                              ; preds = %137
  br label %140

140:                                              ; preds = %139
  br label %141

141:                                              ; preds = %140, %130
  br label %142

142:                                              ; preds = %141
  br label %143

143:                                              ; preds = %142
  %144 = load ptr, ptr %16, align 8, !tbaa !5
  %145 = getelementptr inbounds %struct.pbuf, ptr %144, i32 0, i32 1
  %146 = load ptr, ptr %145, align 8, !tbaa !19
  store ptr %146, ptr %14, align 8, !tbaa !5
  %147 = load ptr, ptr %8, align 8, !tbaa !5
  %148 = getelementptr inbounds %struct.udp_pcb, ptr %147, i32 0, i32 8
  %149 = load i16, ptr %148, align 2, !tbaa !11
  %150 = call zeroext i16 @lwip_htons(i16 noundef zeroext %149)
  %151 = load ptr, ptr %14, align 8, !tbaa !5
  %152 = getelementptr inbounds %struct.udp_hdr, ptr %151, i32 0, i32 0
  store i16 %150, ptr %152, align 1, !tbaa !20
  %153 = load i16, ptr %11, align 2, !tbaa !9
  %154 = call zeroext i16 @lwip_htons(i16 noundef zeroext %153)
  %155 = load ptr, ptr %14, align 8, !tbaa !5
  %156 = getelementptr inbounds %struct.udp_hdr, ptr %155, i32 0, i32 1
  store i16 %154, ptr %156, align 1, !tbaa !22
  %157 = load ptr, ptr %14, align 8, !tbaa !5
  %158 = getelementptr inbounds %struct.udp_hdr, ptr %157, i32 0, i32 3
  store i16 0, ptr %158, align 1, !tbaa !23
  %159 = load ptr, ptr %16, align 8, !tbaa !5
  %160 = getelementptr inbounds %struct.pbuf, ptr %159, i32 0, i32 2
  %161 = load i16, ptr %160, align 8, !tbaa !16
  %162 = call zeroext i16 @lwip_htons(i16 noundef zeroext %161)
  %163 = load ptr, ptr %14, align 8, !tbaa !5
  %164 = getelementptr inbounds %struct.udp_hdr, ptr %163, i32 0, i32 2
  store i16 %162, ptr %164, align 1, !tbaa !24
  store i8 17, ptr %17, align 1, !tbaa !15
  %165 = load ptr, ptr %8, align 8, !tbaa !5
  %166 = getelementptr inbounds %struct.udp_pcb, ptr %165, i32 0, i32 5
  %167 = load i8, ptr %166, align 1, !tbaa !25
  store i8 %167, ptr %18, align 1, !tbaa !15
  %168 = load ptr, ptr %16, align 8, !tbaa !5
  %169 = load ptr, ptr %13, align 8, !tbaa !5
  %170 = load ptr, ptr %10, align 8, !tbaa !5
  %171 = load i8, ptr %18, align 1, !tbaa !15
  %172 = load ptr, ptr %8, align 8, !tbaa !5
  %173 = getelementptr inbounds %struct.udp_pcb, ptr %172, i32 0, i32 4
  %174 = load i8, ptr %173, align 2, !tbaa !26
  %175 = load i8, ptr %17, align 1, !tbaa !15
  %176 = load ptr, ptr %12, align 8, !tbaa !5
  %177 = call signext i8 @ip4_output_if_src(ptr noundef %168, ptr noundef %169, ptr noundef %170, i8 noundef zeroext %171, i8 noundef zeroext %174, i8 noundef zeroext %175, ptr noundef %176)
  store i8 %177, ptr %15, align 1, !tbaa !15
  %178 = load ptr, ptr %16, align 8, !tbaa !5
  %179 = load ptr, ptr %9, align 8, !tbaa !5
  %180 = icmp ne ptr %178, %179
  br i1 %180, label %181, label %184

181:                                              ; preds = %143
  %182 = load ptr, ptr %16, align 8, !tbaa !5
  %183 = call zeroext i8 @pbuf_free(ptr noundef %182)
  store ptr null, ptr %16, align 8, !tbaa !5
  br label %184

184:                                              ; preds = %181, %143
  %185 = load i8, ptr %15, align 1, !tbaa !15
  store i8 %185, ptr %7, align 1
  store i32 1, ptr %19, align 4
  br label %186

186:                                              ; preds = %184, %116, %107, %91, %71, %60, %49, %38, %27
  call void @llvm.lifetime.end.p0(i64 1, ptr %18) #3
  call void @llvm.lifetime.end.p0(i64 1, ptr %17) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #3
  call void @llvm.lifetime.end.p0(i64 1, ptr %15) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #3
  %187 = load i8, ptr %7, align 1
  ret i8 %187
}

; Function Attrs: nounwind uwtable
declare dso_local signext i8 @udp_bind(ptr noundef, ptr noundef, i16 noundef zeroext) #2

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

declare ptr @pbuf_alloc(i32 noundef, i16 noundef zeroext, i32 noundef) #1

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

declare signext i8 @ip4_output_if_src(ptr noundef, ptr noundef, ptr noundef, i8 noundef zeroext, i8 noundef zeroext, i8 noundef zeroext, 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 = !{!10, !10, i64 0}
!10 = !{!"short", !7, i64 0}
!11 = !{!12, !10, i64 26}
!12 = !{!"udp_pcb", !13, i64 0, !13, i64 4, !7, i64 8, !7, i64 9, !7, i64 10, !7, i64 11, !6, i64 16, !7, i64 24, !10, i64 26, !10, i64 28, !6, i64 32, !6, i64 40}
!13 = !{!"ip4_addr", !14, i64 0}
!14 = !{!"int", !7, i64 0}
!15 = !{!7, !7, i64 0}
!16 = !{!17, !10, i64 16}
!17 = !{!"pbuf", !6, i64 0, !6, i64 8, !10, i64 16, !10, i64 18, !7, i64 20, !7, i64 21, !7, i64 22, !7, i64 23}
!18 = !{!17, !10, i64 18}
!19 = !{!17, !6, i64 8}
!20 = !{!21, !10, i64 0}
!21 = !{!"udp_hdr", !10, i64 0, !10, i64 2, !10, i64 4, !10, i64 6}
!22 = !{!21, !10, i64 2}
!23 = !{!21, !10, i64 6}
!24 = !{!21, !10, i64 4}
!25 = !{!12, !7, i64 11}
!26 = !{!12, !7, i64 10}


; 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 [40 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [178 x i8], align 1
@.str.14 = external hidden unnamed_addr constant [31 x i8], align 1
@.str.15 = external hidden unnamed_addr constant [32 x i8], align 1
@.str.16 = external hidden unnamed_addr constant [34 x i8], align 1
@.str.17 = external hidden unnamed_addr constant [34 x i8], align 1
@.str.18 = external hidden unnamed_addr constant [33 x i8], align 1
@.str.19 = external hidden unnamed_addr constant [46 x i8], align 1

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

declare zeroext i8 @pbuf_free(ptr noundef) local_unnamed_addr #1

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

; Function Attrs: nounwind uwtable
define dso_local signext i8 @udp_sendto_if_src(ptr noundef %0, ptr noundef %1, ptr noundef %2, i16 noundef zeroext %3, ptr noundef %4, ptr noundef %5) local_unnamed_addr #2 {
  %.not = icmp eq ptr %0, null
  br i1 %.not, label %7, label %9

7:                                                ; preds = %6
  %8 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str, ptr noundef nonnull @.str.14, i32 noundef 721, ptr noundef nonnull @.str.2)
  br label %64

9:                                                ; preds = %6
  %.not47 = icmp eq ptr %1, null
  br i1 %.not47, label %10, label %12

10:                                               ; preds = %9
  %11 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str, ptr noundef nonnull @.str.15, i32 noundef 722, ptr noundef nonnull @.str.2)
  br label %64

12:                                               ; preds = %9
  %.not48 = icmp eq ptr %2, null
  br i1 %.not48, label %13, label %15

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

15:                                               ; preds = %12
  %.not49 = icmp eq ptr %5, null
  br i1 %.not49, label %16, label %18

16:                                               ; preds = %15
  %17 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str, ptr noundef nonnull @.str.17, i32 noundef 724, ptr noundef nonnull @.str.2)
  br label %64

18:                                               ; preds = %15
  %.not50 = icmp eq ptr %4, null
  br i1 %.not50, label %19, label %21

19:                                               ; preds = %18
  %20 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str, ptr noundef nonnull @.str.18, i32 noundef 725, ptr noundef nonnull @.str.2)
  br label %64

21:                                               ; preds = %18
  %22 = getelementptr inbounds i8, ptr %0, i64 26
  %23 = load i16, ptr %22, align 2, !tbaa !5
  %24 = icmp eq i16 %23, 0
  br i1 %24, label %25, label %27

25:                                               ; preds = %21
  %26 = tail call signext i8 @udp_bind(ptr noundef nonnull %0, ptr noundef nonnull %0, i16 noundef zeroext 0)
  %.not51 = icmp eq i8 %26, 0
  br i1 %.not51, label %27, label %64

27:                                               ; preds = %25, %21
  %28 = getelementptr inbounds i8, ptr %1, i64 16
  %29 = load i16, ptr %28, align 8, !tbaa !13
  %30 = icmp ugt i16 %29, -9
  br i1 %30, label %64, label %31

31:                                               ; preds = %27
  %32 = tail call zeroext i8 @pbuf_add_header(ptr noundef nonnull %1, i64 noundef 8) #3
  %.not52 = icmp eq i8 %32, 0
  br i1 %.not52, label %39, label %33

33:                                               ; preds = %31
  %34 = tail call ptr @pbuf_alloc(i32 noundef 36, i16 noundef zeroext 8, i32 noundef 640) #3
  %35 = icmp eq ptr %34, null
  br i1 %35, label %64, label %36

36:                                               ; preds = %33
  %37 = load i16, ptr %28, align 8, !tbaa !13
  %.not53 = icmp eq i16 %37, 0
  br i1 %.not53, label %39, label %38

38:                                               ; preds = %36
  tail call void @pbuf_chain(ptr noundef nonnull %34, ptr noundef nonnull %1) #3
  br label %39

39:                                               ; preds = %31, %38, %36
  %.040 = phi ptr [ %34, %38 ], [ %34, %36 ], [ %1, %31 ]
  %40 = getelementptr inbounds i8, ptr %.040, i64 18
  %41 = load i16, ptr %40, align 2, !tbaa !15
  %42 = icmp ugt i16 %41, 7
  br i1 %42, label %45, label %43

43:                                               ; preds = %39
  %44 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str, ptr noundef nonnull @.str.19, i32 noundef 782, ptr noundef nonnull @.str.2)
  br label %45

45:                                               ; preds = %43, %39
  %46 = getelementptr inbounds i8, ptr %.040, i64 8
  %47 = load ptr, ptr %46, align 8, !tbaa !16
  %48 = load i16, ptr %22, align 2, !tbaa !5
  %49 = tail call zeroext i16 @lwip_htons(i16 noundef zeroext %48) #3
  store i16 %49, ptr %47, align 1, !tbaa !17
  %50 = tail call zeroext i16 @lwip_htons(i16 noundef zeroext %3) #3
  %51 = getelementptr inbounds i8, ptr %47, i64 2
  store i16 %50, ptr %51, align 1, !tbaa !19
  %52 = getelementptr inbounds i8, ptr %47, i64 6
  store i16 0, ptr %52, align 1, !tbaa !20
  %53 = getelementptr inbounds i8, ptr %.040, i64 16
  %54 = load i16, ptr %53, align 8, !tbaa !13
  %55 = tail call zeroext i16 @lwip_htons(i16 noundef zeroext %54) #3
  %56 = getelementptr inbounds i8, ptr %47, i64 4
  store i16 %55, ptr %56, align 1, !tbaa !21
  %57 = getelementptr inbounds i8, ptr %0, i64 11
  %58 = load i8, ptr %57, align 1, !tbaa !22
  %59 = getelementptr inbounds i8, ptr %0, i64 10
  %60 = load i8, ptr %59, align 2, !tbaa !23
  %61 = tail call signext i8 @ip4_output_if_src(ptr noundef nonnull %.040, ptr noundef nonnull %5, ptr noundef nonnull %2, i8 noundef zeroext %58, i8 noundef zeroext %60, i8 noundef zeroext 17, ptr noundef nonnull %4) #3
  %.not54 = icmp eq ptr %.040, %1
  br i1 %.not54, label %64, label %62

62:                                               ; preds = %45
  %63 = tail call zeroext i8 @pbuf_free(ptr noundef nonnull %.040) #3
  br label %64

64:                                               ; preds = %45, %62, %33, %27, %25, %19, %16, %13, %10, %7
  %.0 = phi i8 [ -16, %19 ], [ -16, %16 ], [ -16, %13 ], [ -16, %10 ], [ -16, %7 ], [ %26, %25 ], [ -1, %27 ], [ -1, %33 ], [ %61, %62 ], [ %61, %45 ]
  ret i8 %.0
}

; Function Attrs: nounwind uwtable
declare dso_local signext i8 @udp_bind(ptr noundef, ptr noundef, i16 noundef zeroext) local_unnamed_addr #2

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

declare ptr @pbuf_alloc(i32 noundef, i16 noundef zeroext, i32 noundef) local_unnamed_addr #1

declare void @pbuf_chain(ptr noundef, ptr noundef) local_unnamed_addr #1

declare signext i8 @ip4_output_if_src(ptr noundef, ptr noundef, ptr noundef, i8 noundef zeroext, i8 noundef zeroext, i8 noundef zeroext, ptr noundef) local_unnamed_addr #1

attributes #0 = { 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 #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, !12, i64 26}
!6 = !{!"udp_pcb", !7, i64 0, !7, i64 4, !9, i64 8, !9, i64 9, !9, i64 10, !9, i64 11, !11, i64 16, !9, i64 24, !12, i64 26, !12, i64 28, !11, i64 32, !11, i64 40}
!7 = !{!"ip4_addr", !8, i64 0}
!8 = !{!"int", !9, i64 0}
!9 = !{!"omnipotent char", !10, i64 0}
!10 = !{!"Simple C/C++ TBAA"}
!11 = !{!"any pointer", !9, i64 0}
!12 = !{!"short", !9, i64 0}
!13 = !{!14, !12, i64 16}
!14 = !{!"pbuf", !11, i64 0, !11, i64 8, !12, i64 16, !12, i64 18, !9, i64 20, !9, i64 21, !9, i64 22, !9, i64 23}
!15 = !{!14, !12, i64 18}
!16 = !{!14, !11, i64 8}
!17 = !{!18, !12, i64 0}
!18 = !{!"udp_hdr", !12, i64 0, !12, i64 2, !12, i64 4, !12, i64 6}
!19 = !{!18, !12, i64 2}
!20 = !{!18, !12, i64 6}
!21 = !{!18, !12, i64 4}
!22 = !{!6, !9, i64 11}
!23 = !{!6, !9, i64 10}


; Effective O3 passes: EarlyCSEPass,GVNPass,GlobalOptPass,IPSCCPPass,InferFunctionAttrsPass,InstCombinePass,SROAPass,SimplifyCFGPass,TailCallElimPass