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

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

@.str = external hidden unnamed_addr constant [40 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [182 x i8], align 1
@.str.39 = external hidden unnamed_addr constant [35 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

; 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

declare zeroext i16 @pbuf_copy_partial(ptr noundef, ptr noundef, i16 noundef zeroext, i16 noundef zeroext) #1

declare i32 @lwip_htonl(i32 noundef) #1

; Function Attrs: nounwind uwtable
declare hidden void @tcp_output_fill_options(ptr noundef, ptr noundef, i8 noundef zeroext, i8 noundef zeroext) #2

; Function Attrs: nounwind uwtable
declare hidden signext i8 @tcp_output_control_segment(ptr noundef, ptr noundef, ptr noundef, ptr noundef) #2

; Function Attrs: nounwind uwtable
declare hidden ptr @tcp_output_alloc_header(ptr noundef, i16 noundef zeroext, i16 noundef zeroext, i32 noundef) #2

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

14:                                               ; preds = %1
  %15 = load ptr, ptr %3, align 8, !tbaa !5
  %16 = icmp ne ptr %15, null
  br i1 %16, label %22, label %17

17:                                               ; preds = %14
  br label %18

18:                                               ; preds = %17
  %19 = call i32 (ptr, ...) @printf(ptr noundef @.str, ptr noundef @.str.39, i32 noundef 2127, ptr noundef @.str.2)
  br label %20

20:                                               ; preds = %18
  br label %21

21:                                               ; preds = %20
  br label %22

22:                                               ; preds = %21, %14
  br label %23

23:                                               ; preds = %22
  br label %24

24:                                               ; preds = %23
  %25 = load ptr, ptr %3, align 8, !tbaa !5
  %26 = getelementptr inbounds %struct.tcp_pcb, ptr %25, i32 0, i32 44
  %27 = load ptr, ptr %26, align 8, !tbaa !10
  store ptr %27, ptr %7, align 8, !tbaa !5
  %28 = load ptr, ptr %7, align 8, !tbaa !5
  %29 = icmp eq ptr %28, null
  br i1 %29, label %30, label %31

30:                                               ; preds = %24
  store i8 0, ptr %2, align 1
  store i32 1, ptr %12, align 4
  br label %154

31:                                               ; preds = %24
  %32 = load ptr, ptr %3, align 8, !tbaa !5
  %33 = getelementptr inbounds %struct.tcp_pcb, ptr %32, i32 0, i32 56
  %34 = load i8, ptr %33, align 2, !tbaa !15
  %35 = zext i8 %34 to i32
  %36 = icmp slt i32 %35, 255
  br i1 %36, label %37, label %42

37:                                               ; preds = %31
  %38 = load ptr, ptr %3, align 8, !tbaa !5
  %39 = getelementptr inbounds %struct.tcp_pcb, ptr %38, i32 0, i32 56
  %40 = load i8, ptr %39, align 2, !tbaa !15
  %41 = add i8 %40, 1
  store i8 %41, ptr %39, align 2, !tbaa !15
  br label %42

42:                                               ; preds = %37, %31
  %43 = load ptr, ptr %7, align 8, !tbaa !5
  %44 = getelementptr inbounds %struct.tcp_seg, ptr %43, i32 0, i32 4
  %45 = load ptr, ptr %44, align 8, !tbaa !16
  %46 = getelementptr inbounds %struct.tcp_hdr, ptr %45, i32 0, i32 4
  %47 = load i16, ptr %46, align 1, !tbaa !18
  %48 = call zeroext i16 @lwip_htons(i16 noundef zeroext %47)
  %49 = zext i16 %48 to i32
  %50 = and i32 %49, 63
  %51 = trunc i32 %50 to i8
  %52 = zext i8 %51 to i32
  %53 = and i32 %52, 1
  %54 = icmp ne i32 %53, 0
  br i1 %54, label %55, label %61

55:                                               ; preds = %42
  %56 = load ptr, ptr %7, align 8, !tbaa !5
  %57 = getelementptr inbounds %struct.tcp_seg, ptr %56, i32 0, i32 2
  %58 = load i16, ptr %57, align 8, !tbaa !20
  %59 = zext i16 %58 to i32
  %60 = icmp eq i32 %59, 0
  br label %61

61:                                               ; preds = %55, %42
  %62 = phi i1 [ false, %42 ], [ %60, %55 ]
  %63 = zext i1 %62 to i32
  %64 = trunc i32 %63 to i8
  store i8 %64, ptr %9, align 1, !tbaa !9
  %65 = load i8, ptr %9, align 1, !tbaa !9
  %66 = zext i8 %65 to i32
  %67 = icmp ne i32 %66, 0
  %68 = zext i1 %67 to i64
  %69 = select i1 %67, i32 0, i32 1
  %70 = trunc i32 %69 to i16
  store i16 %70, ptr %8, align 2, !tbaa !21
  %71 = load ptr, ptr %3, align 8, !tbaa !5
  %72 = load i8, ptr %11, align 1, !tbaa !9
  %73 = zext i8 %72 to i16
  %74 = load i16, ptr %8, align 2, !tbaa !21
  %75 = load ptr, ptr %7, align 8, !tbaa !5
  %76 = getelementptr inbounds %struct.tcp_seg, ptr %75, i32 0, i32 4
  %77 = load ptr, ptr %76, align 8, !tbaa !16
  %78 = getelementptr inbounds %struct.tcp_hdr, ptr %77, i32 0, i32 2
  %79 = load i32, ptr %78, align 1, !tbaa !22
  %80 = call ptr @tcp_output_alloc_header(ptr noundef %71, i16 noundef zeroext %73, i16 noundef zeroext %74, i32 noundef %79)
  store ptr %80, ptr %5, align 8, !tbaa !5
  %81 = load ptr, ptr %5, align 8, !tbaa !5
  %82 = icmp eq ptr %81, null
  br i1 %82, label %83, label %84

83:                                               ; preds = %61
  store i8 -1, ptr %2, align 1
  store i32 1, ptr %12, align 4
  br label %154

84:                                               ; preds = %61
  %85 = load ptr, ptr %5, align 8, !tbaa !5
  %86 = getelementptr inbounds %struct.pbuf, ptr %85, i32 0, i32 1
  %87 = load ptr, ptr %86, align 8, !tbaa !23
  store ptr %87, ptr %6, align 8, !tbaa !5
  %88 = load i8, ptr %9, align 1, !tbaa !9
  %89 = icmp ne i8 %88, 0
  br i1 %89, label %90, label %102

90:                                               ; preds = %84
  %91 = load ptr, ptr %6, align 8, !tbaa !5
  %92 = getelementptr inbounds %struct.tcp_hdr, ptr %91, i32 0, i32 4
  %93 = load i16, ptr %92, align 1, !tbaa !18
  %94 = zext i16 %93 to i32
  %95 = and i32 %94, 49407
  %96 = call zeroext i16 @lwip_htons(i16 noundef zeroext 17)
  %97 = zext i16 %96 to i32
  %98 = or i32 %95, %97
  %99 = trunc i32 %98 to i16
  %100 = load ptr, ptr %6, align 8, !tbaa !5
  %101 = getelementptr inbounds %struct.tcp_hdr, ptr %100, i32 0, i32 4
  store i16 %99, ptr %101, align 1, !tbaa !18
  br label %124

102:                                              ; preds = %84
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #3
  %103 = load ptr, ptr %5, align 8, !tbaa !5
  %104 = getelementptr inbounds %struct.pbuf, ptr %103, i32 0, i32 1
  %105 = load ptr, ptr %104, align 8, !tbaa !23
  %106 = getelementptr inbounds i8, ptr %105, i64 20
  store ptr %106, ptr %13, align 8, !tbaa !5
  %107 = load ptr, ptr %7, align 8, !tbaa !5
  %108 = getelementptr inbounds %struct.tcp_seg, ptr %107, i32 0, i32 1
  %109 = load ptr, ptr %108, align 8, !tbaa !25
  %110 = load ptr, ptr %13, align 8, !tbaa !5
  %111 = load ptr, ptr %7, align 8, !tbaa !5
  %112 = getelementptr inbounds %struct.tcp_seg, ptr %111, i32 0, i32 1
  %113 = load ptr, ptr %112, align 8, !tbaa !25
  %114 = getelementptr inbounds %struct.pbuf, ptr %113, i32 0, i32 2
  %115 = load i16, ptr %114, align 8, !tbaa !26
  %116 = zext i16 %115 to i32
  %117 = load ptr, ptr %7, align 8, !tbaa !5
  %118 = getelementptr inbounds %struct.tcp_seg, ptr %117, i32 0, i32 2
  %119 = load i16, ptr %118, align 8, !tbaa !20
  %120 = zext i16 %119 to i32
  %121 = sub nsw i32 %116, %120
  %122 = trunc i32 %121 to i16
  %123 = call zeroext i16 @pbuf_copy_partial(ptr noundef %109, ptr noundef %110, i16 noundef zeroext 1, i16 noundef zeroext %122)
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #3
  br label %124

124:                                              ; preds = %102, %90
  %125 = load ptr, ptr %7, align 8, !tbaa !5
  %126 = getelementptr inbounds %struct.tcp_seg, ptr %125, i32 0, i32 4
  %127 = load ptr, ptr %126, align 8, !tbaa !16
  %128 = getelementptr inbounds %struct.tcp_hdr, ptr %127, i32 0, i32 2
  %129 = load i32, ptr %128, align 1, !tbaa !22
  %130 = call i32 @lwip_htonl(i32 noundef %129)
  %131 = add i32 %130, 1
  store i32 %131, ptr %10, align 4, !tbaa !27
  %132 = load ptr, ptr %3, align 8, !tbaa !5
  %133 = getelementptr inbounds %struct.tcp_pcb, ptr %132, i32 0, i32 34
  %134 = load i32, ptr %133, align 8, !tbaa !28
  %135 = load i32, ptr %10, align 4, !tbaa !27
  %136 = sub i32 %134, %135
  %137 = icmp slt i32 %136, 0
  br i1 %137, label %138, label %142

138:                                              ; preds = %124
  %139 = load i32, ptr %10, align 4, !tbaa !27
  %140 = load ptr, ptr %3, align 8, !tbaa !5
  %141 = getelementptr inbounds %struct.tcp_pcb, ptr %140, i32 0, i32 34
  store i32 %139, ptr %141, align 8, !tbaa !28
  br label %142

142:                                              ; preds = %138, %124
  %143 = load ptr, ptr %3, align 8, !tbaa !5
  %144 = load ptr, ptr %5, align 8, !tbaa !5
  %145 = load i8, ptr %11, align 1, !tbaa !9
  call void @tcp_output_fill_options(ptr noundef %143, ptr noundef %144, i8 noundef zeroext 0, i8 noundef zeroext %145)
  %146 = load ptr, ptr %3, align 8, !tbaa !5
  %147 = load ptr, ptr %5, align 8, !tbaa !5
  %148 = load ptr, ptr %3, align 8, !tbaa !5
  %149 = getelementptr inbounds %struct.tcp_pcb, ptr %148, i32 0, i32 0
  %150 = load ptr, ptr %3, align 8, !tbaa !5
  %151 = getelementptr inbounds %struct.tcp_pcb, ptr %150, i32 0, i32 1
  %152 = call signext i8 @tcp_output_control_segment(ptr noundef %146, ptr noundef %147, ptr noundef %149, ptr noundef %151)
  store i8 %152, ptr %4, align 1, !tbaa !9
  %153 = load i8, ptr %4, align 1, !tbaa !9
  store i8 %153, ptr %2, align 1
  store i32 1, ptr %12, align 4
  br label %154

154:                                              ; preds = %142, %83, %30
  call void @llvm.lifetime.end.p0(i64 1, ptr %11) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #3
  call void @llvm.lifetime.end.p0(i64 1, ptr %9) #3
  call void @llvm.lifetime.end.p0(i64 2, ptr %8) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %5) #3
  call void @llvm.lifetime.end.p0(i64 1, ptr %4) #3
  %155 = load i8, ptr %2, align 1
  ret i8 %155
}

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, !6, i64 128}
!11 = !{!"tcp_pcb", !12, i64 0, !12, i64 4, !7, i64 8, !7, i64 9, !7, i64 10, !7, i64 11, !6, i64 16, !6, i64 24, !13, i64 32, !7, i64 36, !14, i64 38, !14, i64 40, !14, i64 42, !7, i64 44, !7, i64 45, !7, i64 46, !13, i64 48, !13, i64 52, !14, i64 56, !14, i64 58, !13, i64 60, !14, i64 64, !14, i64 66, !13, i64 68, !13, i64 72, !14, i64 76, !14, i64 78, !14, i64 80, !7, i64 82, !7, i64 83, !13, i64 84, !14, i64 88, !14, i64 90, !13, i64 92, !13, i64 96, !13, i64 100, !13, i64 104, !13, i64 108, !14, i64 112, !14, i64 114, !14, i64 116, !14, i64 118, !14, i64 120, !14, i64 122, !6, i64 128, !6, i64 136, !6, i64 144, !6, i64 152, !6, i64 160, !6, i64 168, !6, i64 176, !6, i64 184, !6, i64 192, !13, i64 200, !7, i64 204, !7, i64 205, !7, i64 206, !7, i64 207}
!12 = !{!"ip4_addr", !13, i64 0}
!13 = !{!"int", !7, i64 0}
!14 = !{!"short", !7, i64 0}
!15 = !{!11, !7, i64 206}
!16 = !{!17, !6, i64 24}
!17 = !{!"tcp_seg", !6, i64 0, !6, i64 8, !14, i64 16, !7, i64 18, !6, i64 24}
!18 = !{!19, !14, i64 12}
!19 = !{!"tcp_hdr", !14, i64 0, !14, i64 2, !13, i64 4, !13, i64 8, !14, i64 12, !14, i64 14, !14, i64 16, !14, i64 18}
!20 = !{!17, !14, i64 16}
!21 = !{!14, !14, i64 0}
!22 = !{!19, !13, i64 4}
!23 = !{!24, !6, i64 8}
!24 = !{!"pbuf", !6, i64 0, !6, i64 8, !14, i64 16, !14, i64 18, !7, i64 20, !7, i64 21, !7, i64 22, !7, i64 23}
!25 = !{!17, !6, i64 8}
!26 = !{!24, !14, i64 16}
!27 = !{!13, !13, i64 0}
!28 = !{!11, !13, i64 96}


; 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 [182 x i8], align 1
@.str.39 = external hidden unnamed_addr constant [35 x i8], align 1

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

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

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

declare i32 @lwip_htonl(i32 noundef) local_unnamed_addr #1

; Function Attrs: nounwind uwtable
declare hidden void @tcp_output_fill_options(ptr noundef, ptr noundef, i8 noundef zeroext, i8 noundef zeroext) local_unnamed_addr #2

; Function Attrs: nounwind uwtable
declare hidden signext i8 @tcp_output_control_segment(ptr noundef, ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #2

; Function Attrs: nounwind uwtable
declare hidden ptr @tcp_output_alloc_header(ptr noundef, i16 noundef zeroext, i16 noundef zeroext, i32 noundef) local_unnamed_addr #2

; Function Attrs: nounwind uwtable
define dso_local signext i8 @tcp_zero_window_probe(ptr noundef %0) local_unnamed_addr #2 {
  %.not = icmp eq ptr %0, null
  br i1 %.not, label %2, label %4

2:                                                ; preds = %1
  %3 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str, ptr noundef nonnull @.str.39, i32 noundef 2127, ptr noundef nonnull @.str.2)
  br label %4

4:                                                ; preds = %2, %1
  %5 = getelementptr inbounds i8, ptr %0, i64 128
  %6 = load ptr, ptr %5, align 8, !tbaa !5
  %7 = icmp eq ptr %6, null
  br i1 %7, label %67, label %8

8:                                                ; preds = %4
  %9 = getelementptr inbounds i8, ptr %0, i64 206
  %10 = load i8, ptr %9, align 2, !tbaa !13
  %.not37 = icmp eq i8 %10, -1
  br i1 %.not37, label %13, label %11

11:                                               ; preds = %8
  %12 = add nuw i8 %10, 1
  store i8 %12, ptr %9, align 2, !tbaa !13
  br label %13

13:                                               ; preds = %11, %8
  %14 = getelementptr inbounds i8, ptr %6, i64 24
  %15 = load ptr, ptr %14, align 8, !tbaa !14
  %16 = getelementptr inbounds i8, ptr %15, i64 12
  %17 = load i16, ptr %16, align 1, !tbaa !16
  %18 = tail call zeroext i16 @lwip_htons(i16 noundef zeroext %17) #3
  %19 = and i16 %18, 1
  %.not38 = icmp eq i16 %19, 0
  br i1 %.not38, label %25, label %20

20:                                               ; preds = %13
  %21 = getelementptr inbounds i8, ptr %6, i64 16
  %22 = load i16, ptr %21, align 8, !tbaa !18
  %23 = icmp eq i16 %22, 0
  %24 = zext i1 %23 to i8
  br label %25

25:                                               ; preds = %20, %13
  %26 = phi i8 [ 0, %13 ], [ %24, %20 ]
  %27 = xor i8 %26, 1
  %28 = zext nneg i8 %27 to i16
  %29 = load ptr, ptr %14, align 8, !tbaa !14
  %30 = getelementptr inbounds i8, ptr %29, i64 4
  %31 = load i32, ptr %30, align 1, !tbaa !19
  %32 = tail call ptr @tcp_output_alloc_header(ptr noundef nonnull %0, i16 noundef zeroext 0, i16 noundef zeroext %28, i32 noundef %31)
  %33 = icmp eq ptr %32, null
  br i1 %33, label %67, label %34

34:                                               ; preds = %25
  %35 = getelementptr inbounds i8, ptr %32, i64 8
  %36 = load ptr, ptr %35, align 8, !tbaa !20
  %.not40 = icmp eq i8 %26, 0
  br i1 %.not40, label %43, label %37

37:                                               ; preds = %34
  %38 = getelementptr inbounds i8, ptr %36, i64 12
  %39 = load i16, ptr %38, align 1, !tbaa !16
  %40 = and i16 %39, -16129
  %41 = tail call zeroext i16 @lwip_htons(i16 noundef zeroext 17) #3
  %42 = or i16 %40, %41
  store i16 %42, ptr %38, align 1, !tbaa !16
  br label %53

43:                                               ; preds = %34
  %44 = getelementptr inbounds i8, ptr %36, i64 20
  %45 = getelementptr inbounds i8, ptr %6, i64 8
  %46 = load ptr, ptr %45, align 8, !tbaa !22
  %47 = getelementptr inbounds i8, ptr %46, i64 16
  %48 = load i16, ptr %47, align 8, !tbaa !23
  %49 = getelementptr inbounds i8, ptr %6, i64 16
  %50 = load i16, ptr %49, align 8, !tbaa !18
  %51 = sub i16 %48, %50
  %52 = tail call zeroext i16 @pbuf_copy_partial(ptr noundef %46, ptr noundef nonnull %44, i16 noundef zeroext 1, i16 noundef zeroext %51) #3
  br label %53

53:                                               ; preds = %43, %37
  %54 = load ptr, ptr %14, align 8, !tbaa !14
  %55 = getelementptr inbounds i8, ptr %54, i64 4
  %56 = load i32, ptr %55, align 1, !tbaa !19
  %57 = tail call i32 @lwip_htonl(i32 noundef %56) #3
  %58 = add i32 %57, 1
  %59 = getelementptr inbounds i8, ptr %0, i64 96
  %60 = load i32, ptr %59, align 8, !tbaa !24
  %61 = sub i32 %60, %58
  %62 = icmp slt i32 %61, 0
  br i1 %62, label %63, label %64

63:                                               ; preds = %53
  store i32 %58, ptr %59, align 8, !tbaa !24
  br label %64

64:                                               ; preds = %63, %53
  tail call void @tcp_output_fill_options(ptr noundef nonnull %0, ptr noundef nonnull %32, i8 noundef zeroext 0, i8 noundef zeroext 0)
  %65 = getelementptr inbounds i8, ptr %0, i64 4
  %66 = tail call signext i8 @tcp_output_control_segment(ptr noundef nonnull %0, ptr noundef nonnull %32, ptr noundef nonnull %0, ptr noundef nonnull %65)
  br label %67

67:                                               ; preds = %25, %4, %64
  %.0 = phi i8 [ %66, %64 ], [ 0, %4 ], [ -1, %25 ]
  ret i8 %.0
}

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, !11, i64 128}
!6 = !{!"tcp_pcb", !7, i64 0, !7, i64 4, !9, i64 8, !9, i64 9, !9, i64 10, !9, i64 11, !11, i64 16, !11, i64 24, !8, i64 32, !9, i64 36, !12, i64 38, !12, i64 40, !12, i64 42, !9, i64 44, !9, i64 45, !9, i64 46, !8, i64 48, !8, i64 52, !12, i64 56, !12, i64 58, !8, i64 60, !12, i64 64, !12, i64 66, !8, i64 68, !8, i64 72, !12, i64 76, !12, i64 78, !12, i64 80, !9, i64 82, !9, i64 83, !8, i64 84, !12, i64 88, !12, i64 90, !8, i64 92, !8, i64 96, !8, i64 100, !8, i64 104, !8, i64 108, !12, i64 112, !12, i64 114, !12, i64 116, !12, i64 118, !12, i64 120, !12, i64 122, !11, i64 128, !11, i64 136, !11, i64 144, !11, i64 152, !11, i64 160, !11, i64 168, !11, i64 176, !11, i64 184, !11, i64 192, !8, i64 200, !9, i64 204, !9, i64 205, !9, i64 206, !9, i64 207}
!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 = !{!6, !9, i64 206}
!14 = !{!15, !11, i64 24}
!15 = !{!"tcp_seg", !11, i64 0, !11, i64 8, !12, i64 16, !9, i64 18, !11, i64 24}
!16 = !{!17, !12, i64 12}
!17 = !{!"tcp_hdr", !12, i64 0, !12, i64 2, !8, i64 4, !8, i64 8, !12, i64 12, !12, i64 14, !12, i64 16, !12, i64 18}
!18 = !{!15, !12, i64 16}
!19 = !{!17, !8, i64 4}
!20 = !{!21, !11, i64 8}
!21 = !{!"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}
!22 = !{!15, !11, i64 8}
!23 = !{!21, !12, i64 16}
!24 = !{!6, !8, i64 96}


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