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

; 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.api_msg = type { ptr, i8, %union.anon }
%union.anon = type { %struct.anon.2 }
%struct.anon.2 = type { ptr, i16, i64, i64, i64, i8, i32 }
%struct.netconn = type { i32, i32, %union.anon.5, i8, ptr, ptr, ptr, i32, i32, i32, i8, ptr, ptr }
%union.anon.5 = type { ptr }
%struct.netvector = type { ptr, i64 }

@.str = external hidden unnamed_addr constant [40 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [181 x i8], align 1
@.str.22 = external hidden unnamed_addr constant [28 x i8], align 1
@.str.23 = external hidden unnamed_addr constant [34 x i8], align 1
@.str.24 = 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

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

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

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

declare i32 @sys_now() #2

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

19:                                               ; preds = %5
  %20 = load ptr, ptr %7, align 8, !tbaa !5
  %21 = icmp ne ptr %20, null
  br i1 %21, label %27, label %22

22:                                               ; preds = %19
  br label %23

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

25:                                               ; preds = %23
  br label %26

26:                                               ; preds = %25
  store i8 -16, ptr %6, align 1
  store i32 1, ptr %17, align 4
  br label %181

27:                                               ; preds = %19
  br label %28

28:                                               ; preds = %27
  br label %29

29:                                               ; preds = %28
  br label %30

30:                                               ; preds = %29
  %31 = load ptr, ptr %7, align 8, !tbaa !5
  %32 = getelementptr inbounds %struct.netconn, ptr %31, i32 0, i32 0
  %33 = load i32, ptr %32, align 8, !tbaa !12
  %34 = and i32 %33, 240
  %35 = icmp eq i32 %34, 16
  br i1 %35, label %41, label %36

36:                                               ; preds = %30
  br label %37

37:                                               ; preds = %36
  %38 = call i32 (ptr, ...) @printf(ptr noundef @.str, ptr noundef @.str.23, i32 noundef 1007, ptr noundef @.str.2)
  br label %39

39:                                               ; preds = %37
  br label %40

40:                                               ; preds = %39
  store i8 -6, ptr %6, align 1
  store i32 1, ptr %17, align 4
  br label %181

41:                                               ; preds = %30
  br label %42

42:                                               ; preds = %41
  br label %43

43:                                               ; preds = %42
  %44 = load ptr, ptr %7, align 8, !tbaa !5
  %45 = getelementptr inbounds %struct.netconn, ptr %44, i32 0, i32 10
  %46 = load i8, ptr %45, align 4, !tbaa !15
  %47 = zext i8 %46 to i32
  %48 = and i32 %47, 2
  %49 = icmp ne i32 %48, 0
  br i1 %49, label %55, label %50

50:                                               ; preds = %43
  %51 = load i8, ptr %10, align 1, !tbaa !11
  %52 = zext i8 %51 to i32
  %53 = and i32 %52, 4
  %54 = icmp ne i32 %53, 0
  br label %55

55:                                               ; preds = %50, %43
  %56 = phi i1 [ true, %43 ], [ %54, %50 ]
  %57 = zext i1 %56 to i32
  %58 = trunc i32 %57 to i8
  store i8 %58, ptr %14, align 1, !tbaa !11
  %59 = load ptr, ptr %7, align 8, !tbaa !5
  %60 = getelementptr inbounds %struct.netconn, ptr %59, i32 0, i32 8
  %61 = load i32, ptr %60, align 4, !tbaa !16
  %62 = icmp ne i32 %61, 0
  br i1 %62, label %63, label %64

63:                                               ; preds = %55
  store i8 1, ptr %14, align 1, !tbaa !11
  br label %64

64:                                               ; preds = %63, %55
  %65 = load i8, ptr %14, align 1, !tbaa !11
  %66 = zext i8 %65 to i32
  %67 = icmp ne i32 %66, 0
  br i1 %67, label %68, label %72

68:                                               ; preds = %64
  %69 = load ptr, ptr %11, align 8, !tbaa !5
  %70 = icmp ne ptr %69, null
  br i1 %70, label %72, label %71

71:                                               ; preds = %68
  store i8 -6, ptr %6, align 1
  store i32 1, ptr %17, align 4
  br label %181

72:                                               ; preds = %68, %64
  store i64 0, ptr %15, align 8, !tbaa !17
  store i32 0, ptr %16, align 4, !tbaa !19
  br label %73

73:                                               ; preds = %97, %72
  %74 = load i32, ptr %16, align 4, !tbaa !19
  %75 = load i16, ptr %9, align 2, !tbaa !9
  %76 = zext i16 %75 to i32
  %77 = icmp slt i32 %74, %76
  br i1 %77, label %78, label %100

78:                                               ; preds = %73
  %79 = load ptr, ptr %8, align 8, !tbaa !5
  %80 = load i32, ptr %16, align 4, !tbaa !19
  %81 = sext i32 %80 to i64
  %82 = getelementptr inbounds %struct.netvector, ptr %79, i64 %81
  %83 = getelementptr inbounds %struct.netvector, ptr %82, i32 0, i32 1
  %84 = load i64, ptr %83, align 8, !tbaa !20
  %85 = load i64, ptr %15, align 8, !tbaa !17
  %86 = add i64 %85, %84
  store i64 %86, ptr %15, align 8, !tbaa !17
  %87 = load i64, ptr %15, align 8, !tbaa !17
  %88 = load ptr, ptr %8, align 8, !tbaa !5
  %89 = load i32, ptr %16, align 4, !tbaa !19
  %90 = sext i32 %89 to i64
  %91 = getelementptr inbounds %struct.netvector, ptr %88, i64 %90
  %92 = getelementptr inbounds %struct.netvector, ptr %91, i32 0, i32 1
  %93 = load i64, ptr %92, align 8, !tbaa !20
  %94 = icmp ult i64 %87, %93
  br i1 %94, label %95, label %96

95:                                               ; preds = %78
  store i8 -6, ptr %6, align 1
  store i32 1, ptr %17, align 4
  br label %181

96:                                               ; preds = %78
  br label %97

97:                                               ; preds = %96
  %98 = load i32, ptr %16, align 4, !tbaa !19
  %99 = add nsw i32 %98, 1
  store i32 %99, ptr %16, align 4, !tbaa !19
  br label %73, !llvm.loop !22

100:                                              ; preds = %73
  %101 = load i64, ptr %15, align 8, !tbaa !17
  %102 = icmp eq i64 %101, 0
  br i1 %102, label %103, label %104

103:                                              ; preds = %100
  store i8 0, ptr %6, align 1
  store i32 1, ptr %17, align 4
  br label %181

104:                                              ; preds = %100
  %105 = load i64, ptr %15, align 8, !tbaa !17
  %106 = icmp ugt i64 %105, 9223372036854775807
  br i1 %106, label %107, label %116

107:                                              ; preds = %104
  call void @llvm.lifetime.start.p0(i64 8, ptr %18) #3
  %108 = load ptr, ptr %11, align 8, !tbaa !5
  %109 = icmp ne ptr %108, null
  br i1 %109, label %111, label %110

110:                                              ; preds = %107
  store i8 -6, ptr %6, align 1
  store i32 1, ptr %17, align 4
  br label %113

111:                                              ; preds = %107
  store i64 9223372036854775807, ptr %18, align 8, !tbaa !17
  %112 = load i64, ptr %18, align 8, !tbaa !17
  store i64 %112, ptr %15, align 8, !tbaa !17
  store i32 0, ptr %17, align 4
  br label %113

113:                                              ; preds = %111, %110
  call void @llvm.lifetime.end.p0(i64 8, ptr %18) #3
  %114 = load i32, ptr %17, align 4
  switch i32 %114, label %181 [
    i32 0, label %115
  ]

115:                                              ; preds = %113
  br label %116

116:                                              ; preds = %115, %104
  br label %117

117:                                              ; preds = %116
  %118 = load ptr, ptr %7, align 8, !tbaa !5
  %119 = getelementptr inbounds %struct.api_msg, ptr %12, i32 0, i32 0
  store ptr %118, ptr %119, align 8, !tbaa !24
  %120 = load ptr, ptr %8, align 8, !tbaa !5
  %121 = getelementptr inbounds %struct.api_msg, ptr %12, i32 0, i32 2
  %122 = getelementptr inbounds %struct.anon.2, ptr %121, i32 0, i32 0
  store ptr %120, ptr %122, align 8, !tbaa !11
  %123 = load i16, ptr %9, align 2, !tbaa !9
  %124 = getelementptr inbounds %struct.api_msg, ptr %12, i32 0, i32 2
  %125 = getelementptr inbounds %struct.anon.2, ptr %124, i32 0, i32 1
  store i16 %123, ptr %125, align 8, !tbaa !11
  %126 = getelementptr inbounds %struct.api_msg, ptr %12, i32 0, i32 2
  %127 = getelementptr inbounds %struct.anon.2, ptr %126, i32 0, i32 2
  store i64 0, ptr %127, align 8, !tbaa !11
  %128 = load i8, ptr %10, align 1, !tbaa !11
  %129 = getelementptr inbounds %struct.api_msg, ptr %12, i32 0, i32 2
  %130 = getelementptr inbounds %struct.anon.2, ptr %129, i32 0, i32 5
  store i8 %128, ptr %130, align 8, !tbaa !11
  %131 = load i64, ptr %15, align 8, !tbaa !17
  %132 = getelementptr inbounds %struct.api_msg, ptr %12, i32 0, i32 2
  %133 = getelementptr inbounds %struct.anon.2, ptr %132, i32 0, i32 3
  store i64 %131, ptr %133, align 8, !tbaa !11
  %134 = getelementptr inbounds %struct.api_msg, ptr %12, i32 0, i32 2
  %135 = getelementptr inbounds %struct.anon.2, ptr %134, i32 0, i32 4
  store i64 0, ptr %135, align 8, !tbaa !11
  %136 = load ptr, ptr %7, align 8, !tbaa !5
  %137 = getelementptr inbounds %struct.netconn, ptr %136, i32 0, i32 8
  %138 = load i32, ptr %137, align 4, !tbaa !16
  %139 = icmp ne i32 %138, 0
  br i1 %139, label %140, label %144

140:                                              ; preds = %117
  %141 = call i32 @sys_now()
  %142 = getelementptr inbounds %struct.api_msg, ptr %12, i32 0, i32 2
  %143 = getelementptr inbounds %struct.anon.2, ptr %142, i32 0, i32 6
  store i32 %141, ptr %143, align 4, !tbaa !11
  br label %147

144:                                              ; preds = %117
  %145 = getelementptr inbounds %struct.api_msg, ptr %12, i32 0, i32 2
  %146 = getelementptr inbounds %struct.anon.2, ptr %145, i32 0, i32 6
  store i32 0, ptr %146, align 4, !tbaa !11
  br label %147

147:                                              ; preds = %144, %140
  %148 = call signext i8 @netconn_apimsg(ptr noundef @lwip_netconn_do_write, ptr noundef %12)
  store i8 %148, ptr %13, align 1, !tbaa !11
  %149 = load i8, ptr %13, align 1, !tbaa !11
  %150 = sext i8 %149 to i32
  %151 = icmp eq i32 %150, 0
  br i1 %151, label %152, label %179

152:                                              ; preds = %147
  %153 = load ptr, ptr %11, align 8, !tbaa !5
  %154 = icmp ne ptr %153, null
  br i1 %154, label %155, label %160

155:                                              ; preds = %152
  %156 = getelementptr inbounds %struct.api_msg, ptr %12, i32 0, i32 2
  %157 = getelementptr inbounds %struct.anon.2, ptr %156, i32 0, i32 4
  %158 = load i64, ptr %157, align 8, !tbaa !11
  %159 = load ptr, ptr %11, align 8, !tbaa !5
  store i64 %158, ptr %159, align 8, !tbaa !17
  br label %160

160:                                              ; preds = %155, %152
  %161 = load i8, ptr %14, align 1, !tbaa !11
  %162 = icmp ne i8 %161, 0
  br i1 %162, label %178, label %163

163:                                              ; preds = %160
  br label %164

164:                                              ; preds = %163
  %165 = getelementptr inbounds %struct.api_msg, ptr %12, i32 0, i32 2
  %166 = getelementptr inbounds %struct.anon.2, ptr %165, i32 0, i32 4
  %167 = load i64, ptr %166, align 8, !tbaa !11
  %168 = load i64, ptr %15, align 8, !tbaa !17
  %169 = icmp eq i64 %167, %168
  br i1 %169, label %175, label %170

170:                                              ; preds = %164
  br label %171

171:                                              ; preds = %170
  %172 = call i32 (ptr, ...) @printf(ptr noundef @.str, ptr noundef @.str.24, i32 noundef 1072, ptr noundef @.str.2)
  br label %173

173:                                              ; preds = %171
  br label %174

174:                                              ; preds = %173
  br label %175

175:                                              ; preds = %174, %164
  br label %176

176:                                              ; preds = %175
  br label %177

177:                                              ; preds = %176
  br label %178

178:                                              ; preds = %177, %160
  br label %179

179:                                              ; preds = %178, %147
  %180 = load i8, ptr %13, align 1, !tbaa !11
  store i8 %180, ptr %6, align 1
  store i32 1, ptr %17, align 4
  br label %181

181:                                              ; preds = %179, %113, %103, %95, %71, %40, %26
  call void @llvm.lifetime.end.p0(i64 4, ptr %16) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #3
  call void @llvm.lifetime.end.p0(i64 1, ptr %14) #3
  call void @llvm.lifetime.end.p0(i64 1, ptr %13) #3
  call void @llvm.lifetime.end.p0(i64 64, ptr %12) #3
  %182 = load i8, ptr %6, align 1
  ret i8 %182
}

declare void @lwip_netconn_do_write(ptr noundef) #2

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { 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 #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 = !{!"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 = !{!7, !7, i64 0}
!12 = !{!13, !14, i64 0}
!13 = !{!"netconn", !14, i64 0, !14, i64 4, !7, i64 8, !7, i64 16, !6, i64 24, !6, i64 32, !6, i64 40, !14, i64 48, !14, i64 52, !14, i64 56, !7, i64 60, !6, i64 64, !6, i64 72}
!14 = !{!"int", !7, i64 0}
!15 = !{!13, !7, i64 60}
!16 = !{!13, !14, i64 52}
!17 = !{!18, !18, i64 0}
!18 = !{!"long", !7, i64 0}
!19 = !{!14, !14, i64 0}
!20 = !{!21, !18, i64 8}
!21 = !{!"netvector", !6, i64 0, !18, i64 8}
!22 = distinct !{!22, !23}
!23 = !{!"llvm.loop.mustprogress"}
!24 = !{!25, !6, i64 0}
!25 = !{!"api_msg", !6, i64 0, !7, i64 8, !7, i64 16}


; 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.api_msg = type { ptr, i8, %union.anon }
%union.anon = type { %struct.anon.2 }
%struct.anon.2 = type { ptr, i16, i64, i64, i64, i8, i32 }
%struct.netvector = type { ptr, i64 }

@.str = external hidden unnamed_addr constant [40 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [181 x i8], align 1
@.str.22 = external hidden unnamed_addr constant [28 x i8], align 1
@.str.23 = external hidden unnamed_addr constant [34 x i8], align 1
@.str.24 = external hidden unnamed_addr constant [35 x i8], align 1

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

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

; Function Attrs: nofree nounwind
declare noundef i32 @printf(ptr nocapture noundef readonly, ...) 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) #0

declare i32 @sys_now() local_unnamed_addr #3

; Function Attrs: nounwind uwtable
define dso_local signext i8 @netconn_write_vectors_partly(ptr noundef %0, ptr noundef %1, i16 noundef zeroext %2, i8 noundef zeroext %3, ptr noundef writeonly %4) local_unnamed_addr #1 {
  %6 = alloca %struct.api_msg, align 8
  call void @llvm.lifetime.start.p0(i64 64, ptr nonnull %6) #5
  %.not = icmp eq ptr %0, null
  br i1 %.not, label %7, label %9

7:                                                ; preds = %5
  %8 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str, ptr noundef nonnull @.str.22, i32 noundef 1006, ptr noundef nonnull @.str.2)
  br label %.loopexit

9:                                                ; preds = %5
  %10 = load i32, ptr %0, align 8, !tbaa !5
  %11 = and i32 %10, 240
  %12 = icmp eq i32 %11, 16
  br i1 %12, label %15, label %13

13:                                               ; preds = %9
  %14 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str, ptr noundef nonnull @.str.23, i32 noundef 1007, ptr noundef nonnull @.str.2)
  br label %.loopexit

15:                                               ; preds = %9
  %16 = getelementptr inbounds i8, ptr %0, i64 60
  %17 = load i8, ptr %16, align 4, !tbaa !11
  %18 = and i8 %17, 2
  %19 = and i8 %3, 4
  %20 = or disjoint i8 %18, %19
  %21 = icmp ne i8 %20, 0
  %22 = getelementptr inbounds i8, ptr %0, i64 52
  %23 = load i32, ptr %22, align 4, !tbaa !12
  %.not40 = icmp ne i32 %23, 0
  %narrow = select i1 %.not40, i1 true, i1 %21
  %24 = icmp eq ptr %4, null
  %or.cond.not = and i1 %24, %narrow
  br i1 %or.cond.not, label %.loopexit, label %.preheader

.preheader:                                       ; preds = %15
  %.not50 = icmp eq i16 %2, 0
  br i1 %.not50, label %.loopexit, label %.lr.ph.preheader

.lr.ph.preheader:                                 ; preds = %.preheader
  %wide.trip.count = zext i16 %2 to i64
  br label %.lr.ph

25:                                               ; preds = %.lr.ph
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %exitcond.not = icmp eq i64 %indvars.iv.next, %wide.trip.count
  br i1 %exitcond.not, label %._crit_edge, label %.lr.ph, !llvm.loop !13

.lr.ph:                                           ; preds = %.lr.ph.preheader, %25
  %indvars.iv = phi i64 [ 0, %.lr.ph.preheader ], [ %indvars.iv.next, %25 ]
  %.03648 = phi i64 [ 0, %.lr.ph.preheader ], [ %28, %25 ]
  %26 = getelementptr inbounds %struct.netvector, ptr %1, i64 %indvars.iv, i32 1
  %27 = load i64, ptr %26, align 8, !tbaa !15
  %28 = add i64 %27, %.03648
  %29 = icmp ult i64 %28, %27
  br i1 %29, label %.loopexit, label %25

._crit_edge:                                      ; preds = %25
  %30 = icmp eq i64 %28, 0
  br i1 %30, label %.loopexit, label %31

31:                                               ; preds = %._crit_edge
  %32 = icmp slt i64 %28, 0
  %brmerge.not = and i1 %24, %32
  %.036.mux = tail call i64 @llvm.umin.i64(i64 %28, i64 9223372036854775807)
  br i1 %brmerge.not, label %.loopexit, label %33

33:                                               ; preds = %31
  store ptr %0, ptr %6, align 8, !tbaa !18
  %34 = getelementptr inbounds i8, ptr %6, i64 16
  store ptr %1, ptr %34, align 8, !tbaa !20
  %35 = getelementptr inbounds i8, ptr %6, i64 24
  store i16 %2, ptr %35, align 8, !tbaa !20
  %36 = getelementptr inbounds i8, ptr %6, i64 32
  store i64 0, ptr %36, align 8, !tbaa !20
  %37 = getelementptr inbounds i8, ptr %6, i64 56
  store i8 %3, ptr %37, align 8, !tbaa !20
  %38 = getelementptr inbounds i8, ptr %6, i64 40
  store i64 %.036.mux, ptr %38, align 8, !tbaa !20
  %39 = getelementptr inbounds i8, ptr %6, i64 48
  store i64 0, ptr %39, align 8, !tbaa !20
  %.not42 = icmp eq i32 %23, 0
  br i1 %.not42, label %42, label %40

40:                                               ; preds = %33
  %41 = tail call i32 @sys_now() #5
  br label %42

42:                                               ; preds = %33, %40
  %.sink = phi i32 [ %41, %40 ], [ 0, %33 ]
  %43 = getelementptr inbounds i8, ptr %6, i64 60
  store i32 %.sink, ptr %43, align 4
  %44 = call signext i8 @netconn_apimsg(ptr noundef nonnull @lwip_netconn_do_write, ptr noundef nonnull %6)
  %45 = icmp eq i8 %44, 0
  br i1 %45, label %46, label %.loopexit

46:                                               ; preds = %42
  %.pre = load i64, ptr %39, align 8
  br i1 %24, label %48, label %47

47:                                               ; preds = %46
  store i64 %.pre, ptr %4, align 8, !tbaa !21
  br label %48

48:                                               ; preds = %47, %46
  %49 = icmp eq i64 %.pre, %.036.mux
  %or.cond = select i1 %narrow, i1 true, i1 %49
  br i1 %or.cond, label %.loopexit, label %50

50:                                               ; preds = %48
  %51 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str, ptr noundef nonnull @.str.24, i32 noundef 1072, ptr noundef nonnull @.str.2)
  br label %.loopexit

.loopexit:                                        ; preds = %.lr.ph, %.preheader, %31, %42, %50, %48, %._crit_edge, %15, %13, %7
  %.1 = phi i8 [ -6, %13 ], [ -16, %7 ], [ -6, %15 ], [ 0, %._crit_edge ], [ 0, %48 ], [ 0, %50 ], [ %44, %42 ], [ -6, %31 ], [ 0, %.preheader ], [ -6, %.lr.ph ]
  call void @llvm.lifetime.end.p0(i64 64, ptr nonnull %6) #5
  ret i8 %.1
}

declare void @lwip_netconn_do_write(ptr noundef) #3

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare i64 @llvm.umin.i64(i64, i64) #4

attributes #0 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { 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 #2 = { 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 #3 = { "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 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #5 = { nounwind }

!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !7, i64 0}
!6 = !{!"netconn", !7, i64 0, !7, i64 4, !8, i64 8, !8, i64 16, !10, i64 24, !10, i64 32, !10, i64 40, !7, i64 48, !7, i64 52, !7, i64 56, !8, i64 60, !10, i64 64, !10, i64 72}
!7 = !{!"int", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C/C++ TBAA"}
!10 = !{!"any pointer", !8, i64 0}
!11 = !{!6, !8, i64 60}
!12 = !{!6, !7, i64 52}
!13 = distinct !{!13, !14}
!14 = !{!"llvm.loop.mustprogress"}
!15 = !{!16, !17, i64 8}
!16 = !{!"netvector", !10, i64 0, !17, i64 8}
!17 = !{!"long", !8, i64 0}
!18 = !{!19, !10, i64 0}
!19 = !{!"api_msg", !10, i64 0, !8, i64 8, !8, i64 16}
!20 = !{!8, !8, i64 0}
!21 = !{!17, !17, i64 0}


; Effective O3 passes: CorrelatedValuePropagationPass,EarlyCSEPass,GVNPass,GlobalOptPass,IPSCCPPass,IndVarSimplifyPass,InferFunctionAttrsPass,InstCombinePass,InstSimplifyPass,JumpThreadingPass,LCSSAPass,LICMPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,MergedLoadStoreMotionPass,PostOrderFunctionAttrsPass,ReassociatePass,SCCPPass,SROAPass,SimplifyCFGPass,TailCallElimPass