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

; 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.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.2 = external hidden unnamed_addr constant [180 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [25 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [34 x i8], align 1
@ip_addr_any = external constant %struct.ip4_addr, align 4
@netif_num = external hidden global i8, align 1
@netif_list = external dso_local global ptr, align 8
@.str.6 = external hidden unnamed_addr constant [20 x i8], align 1
@.str.7 = external hidden unnamed_addr constant [46 x i8], align 1

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

; Function Attrs: nounwind uwtable
define dso_local ptr @netif_add(ptr noundef %0, ptr noundef %1, ptr noundef %2, ptr noundef %3, ptr noundef %4, ptr noundef %5, ptr noundef %6) #1 {
  %8 = alloca ptr, align 8
  %9 = alloca ptr, align 8
  %10 = alloca ptr, align 8
  %11 = alloca ptr, align 8
  %12 = alloca ptr, align 8
  %13 = alloca ptr, align 8
  %14 = alloca ptr, align 8
  %15 = alloca ptr, align 8
  %16 = alloca ptr, align 8
  %17 = 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 ptr %3, ptr %12, align 8, !tbaa !5
  store ptr %4, ptr %13, align 8, !tbaa !5
  store ptr %5, ptr %14, align 8, !tbaa !5
  store ptr %6, ptr %15, align 8, !tbaa !5
  br label %18

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

21:                                               ; preds = %18
  br label %22

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

24:                                               ; preds = %22
  store ptr null, ptr %8, align 8
  br label %171

25:                                               ; preds = %18
  br label %26

26:                                               ; preds = %25
  br label %27

27:                                               ; preds = %26
  %28 = load ptr, ptr %14, align 8, !tbaa !5
  %29 = icmp ne ptr %28, null
  br i1 %29, label %34, label %30

30:                                               ; preds = %27
  br label %31

31:                                               ; preds = %30
  %32 = call i32 (ptr, ...) @printf(ptr noundef @.str, ptr noundef @.str.5, i32 noundef 296, ptr noundef @.str.2)
  br label %33

33:                                               ; preds = %31
  store ptr null, ptr %8, align 8
  br label %171

34:                                               ; preds = %27
  br label %35

35:                                               ; preds = %34
  %36 = load ptr, ptr %10, align 8, !tbaa !5
  %37 = icmp eq ptr %36, null
  br i1 %37, label %38, label %39

38:                                               ; preds = %35
  store ptr @ip_addr_any, ptr %10, align 8, !tbaa !5
  br label %39

39:                                               ; preds = %38, %35
  %40 = load ptr, ptr %11, align 8, !tbaa !5
  %41 = icmp eq ptr %40, null
  br i1 %41, label %42, label %43

42:                                               ; preds = %39
  store ptr @ip_addr_any, ptr %11, align 8, !tbaa !5
  br label %43

43:                                               ; preds = %42, %39
  %44 = load ptr, ptr %12, align 8, !tbaa !5
  %45 = icmp eq ptr %44, null
  br i1 %45, label %46, label %47

46:                                               ; preds = %43
  store ptr @ip_addr_any, ptr %12, align 8, !tbaa !5
  br label %47

47:                                               ; preds = %46, %43
  %48 = load ptr, ptr %9, align 8, !tbaa !5
  %49 = getelementptr inbounds %struct.netif, ptr %48, i32 0, i32 1
  %50 = getelementptr inbounds %struct.ip4_addr, ptr %49, i32 0, i32 0
  store i32 0, ptr %50, align 8, !tbaa !9
  %51 = load ptr, ptr %9, align 8, !tbaa !5
  %52 = getelementptr inbounds %struct.netif, ptr %51, i32 0, i32 2
  %53 = getelementptr inbounds %struct.ip4_addr, ptr %52, i32 0, i32 0
  store i32 0, ptr %53, align 4, !tbaa !14
  %54 = load ptr, ptr %9, align 8, !tbaa !5
  %55 = getelementptr inbounds %struct.netif, ptr %54, i32 0, i32 3
  %56 = getelementptr inbounds %struct.ip4_addr, ptr %55, i32 0, i32 0
  store i32 0, ptr %56, align 8, !tbaa !15
  %57 = load ptr, ptr %9, align 8, !tbaa !5
  %58 = getelementptr inbounds %struct.netif, ptr %57, i32 0, i32 5
  store ptr @netif_null_output_ip4, ptr %58, align 8, !tbaa !16
  %59 = load ptr, ptr %9, align 8, !tbaa !5
  %60 = getelementptr inbounds %struct.netif, ptr %59, i32 0, i32 10
  store i16 0, ptr %60, align 8, !tbaa !17
  %61 = load ptr, ptr %9, align 8, !tbaa !5
  %62 = getelementptr inbounds %struct.netif, ptr %61, i32 0, i32 13
  store i8 0, ptr %62, align 1, !tbaa !18
  %63 = load ptr, ptr %9, align 8, !tbaa !5
  %64 = getelementptr inbounds %struct.netif, ptr %63, i32 0, i32 9
  %65 = getelementptr inbounds [1 x ptr], ptr %64, i64 0, i64 0
  call void @llvm.memset.p0.i64(ptr align 8 %65, i8 0, i64 8, i1 false)
  %66 = load ptr, ptr %9, align 8, !tbaa !5
  %67 = getelementptr inbounds %struct.netif, ptr %66, i32 0, i32 7
  store ptr null, ptr %67, align 8, !tbaa !19
  %68 = load ptr, ptr %13, align 8, !tbaa !5
  %69 = load ptr, ptr %9, align 8, !tbaa !5
  %70 = getelementptr inbounds %struct.netif, ptr %69, i32 0, i32 8
  store ptr %68, ptr %70, align 8, !tbaa !20
  %71 = load i8, ptr @netif_num, align 1, !tbaa !21
  %72 = load ptr, ptr %9, align 8, !tbaa !5
  %73 = getelementptr inbounds %struct.netif, ptr %72, i32 0, i32 15
  store i8 %71, ptr %73, align 4, !tbaa !22
  %74 = load ptr, ptr %15, align 8, !tbaa !5
  %75 = load ptr, ptr %9, align 8, !tbaa !5
  %76 = getelementptr inbounds %struct.netif, ptr %75, i32 0, i32 4
  store ptr %74, ptr %76, align 8, !tbaa !23
  %77 = load ptr, ptr %9, align 8, !tbaa !5
  %78 = load ptr, ptr %10, align 8, !tbaa !5
  %79 = load ptr, ptr %11, align 8, !tbaa !5
  %80 = load ptr, ptr %12, align 8, !tbaa !5
  call void @netif_set_addr(ptr noundef %77, ptr noundef %78, ptr noundef %79, ptr noundef %80)
  %81 = load ptr, ptr %14, align 8, !tbaa !5
  %82 = load ptr, ptr %9, align 8, !tbaa !5
  %83 = call signext i8 %81(ptr noundef %82)
  %84 = sext i8 %83 to i32
  %85 = icmp ne i32 %84, 0
  br i1 %85, label %86, label %87

86:                                               ; preds = %47
  store ptr null, ptr %8, align 8
  br label %171

87:                                               ; preds = %47
  call void @llvm.lifetime.start.p0(i64 8, ptr %16) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr %17) #4
  br label %88

88:                                               ; preds = %148, %87
  %89 = load ptr, ptr %9, align 8, !tbaa !5
  %90 = getelementptr inbounds %struct.netif, ptr %89, i32 0, i32 15
  %91 = load i8, ptr %90, align 4, !tbaa !22
  %92 = zext i8 %91 to i32
  %93 = icmp eq i32 %92, 255
  br i1 %93, label %94, label %97

94:                                               ; preds = %88
  %95 = load ptr, ptr %9, align 8, !tbaa !5
  %96 = getelementptr inbounds %struct.netif, ptr %95, i32 0, i32 15
  store i8 0, ptr %96, align 4, !tbaa !22
  br label %97

97:                                               ; preds = %94, %88
  store i32 0, ptr %17, align 4, !tbaa !24
  %98 = load ptr, ptr @netif_list, align 8, !tbaa !5
  store ptr %98, ptr %16, align 8, !tbaa !5
  br label %99

99:                                               ; preds = %143, %97
  %100 = load ptr, ptr %16, align 8, !tbaa !5
  %101 = icmp ne ptr %100, null
  br i1 %101, label %102, label %147

102:                                              ; preds = %99
  br label %103

103:                                              ; preds = %102
  %104 = load ptr, ptr %16, align 8, !tbaa !5
  %105 = load ptr, ptr %9, align 8, !tbaa !5
  %106 = icmp ne ptr %104, %105
  br i1 %106, label %112, label %107

107:                                              ; preds = %103
  br label %108

108:                                              ; preds = %107
  %109 = call i32 (ptr, ...) @printf(ptr noundef @.str, ptr noundef @.str.6, i32 noundef 395, ptr noundef @.str.2)
  br label %110

110:                                              ; preds = %108
  br label %111

111:                                              ; preds = %110
  br label %112

112:                                              ; preds = %111, %103
  br label %113

113:                                              ; preds = %112
  br label %114

114:                                              ; preds = %113
  %115 = load i32, ptr %17, align 4, !tbaa !24
  %116 = add nsw i32 %115, 1
  store i32 %116, ptr %17, align 4, !tbaa !24
  br label %117

117:                                              ; preds = %114
  %118 = load i32, ptr %17, align 4, !tbaa !24
  %119 = icmp sle i32 %118, 255
  br i1 %119, label %125, label %120

120:                                              ; preds = %117
  br label %121

121:                                              ; preds = %120
  %122 = call i32 (ptr, ...) @printf(ptr noundef @.str, ptr noundef @.str.7, i32 noundef 397, ptr noundef @.str.2)
  br label %123

123:                                              ; preds = %121
  br label %124

124:                                              ; preds = %123
  br label %125

125:                                              ; preds = %124, %117
  br label %126

126:                                              ; preds = %125
  br label %127

127:                                              ; preds = %126
  %128 = load ptr, ptr %16, align 8, !tbaa !5
  %129 = getelementptr inbounds %struct.netif, ptr %128, i32 0, i32 15
  %130 = load i8, ptr %129, align 4, !tbaa !22
  %131 = zext i8 %130 to i32
  %132 = load ptr, ptr %9, align 8, !tbaa !5
  %133 = getelementptr inbounds %struct.netif, ptr %132, i32 0, i32 15
  %134 = load i8, ptr %133, align 4, !tbaa !22
  %135 = zext i8 %134 to i32
  %136 = icmp eq i32 %131, %135
  br i1 %136, label %137, label %142

137:                                              ; preds = %127
  %138 = load ptr, ptr %9, align 8, !tbaa !5
  %139 = getelementptr inbounds %struct.netif, ptr %138, i32 0, i32 15
  %140 = load i8, ptr %139, align 4, !tbaa !22
  %141 = add i8 %140, 1
  store i8 %141, ptr %139, align 4, !tbaa !22
  br label %147

142:                                              ; preds = %127
  br label %143

143:                                              ; preds = %142
  %144 = load ptr, ptr %16, align 8, !tbaa !5
  %145 = getelementptr inbounds %struct.netif, ptr %144, i32 0, i32 0
  %146 = load ptr, ptr %145, align 8, !tbaa !25
  store ptr %146, ptr %16, align 8, !tbaa !5
  br label %99, !llvm.loop !26

147:                                              ; preds = %137, %99
  br label %148

148:                                              ; preds = %147
  %149 = load ptr, ptr %16, align 8, !tbaa !5
  %150 = icmp ne ptr %149, null
  br i1 %150, label %88, label %151, !llvm.loop !28

151:                                              ; preds = %148
  call void @llvm.lifetime.end.p0(i64 4, ptr %17) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #4
  %152 = load ptr, ptr %9, align 8, !tbaa !5
  %153 = getelementptr inbounds %struct.netif, ptr %152, i32 0, i32 15
  %154 = load i8, ptr %153, align 4, !tbaa !22
  %155 = zext i8 %154 to i32
  %156 = icmp eq i32 %155, 254
  br i1 %156, label %157, label %158

157:                                              ; preds = %151
  store i8 0, ptr @netif_num, align 1, !tbaa !21
  br label %165

158:                                              ; preds = %151
  %159 = load ptr, ptr %9, align 8, !tbaa !5
  %160 = getelementptr inbounds %struct.netif, ptr %159, i32 0, i32 15
  %161 = load i8, ptr %160, align 4, !tbaa !22
  %162 = zext i8 %161 to i32
  %163 = add nsw i32 %162, 1
  %164 = trunc i32 %163 to i8
  store i8 %164, ptr @netif_num, align 1, !tbaa !21
  br label %165

165:                                              ; preds = %158, %157
  %166 = load ptr, ptr @netif_list, align 8, !tbaa !5
  %167 = load ptr, ptr %9, align 8, !tbaa !5
  %168 = getelementptr inbounds %struct.netif, ptr %167, i32 0, i32 0
  store ptr %166, ptr %168, align 8, !tbaa !25
  %169 = load ptr, ptr %9, align 8, !tbaa !5
  store ptr %169, ptr @netif_list, align 8, !tbaa !5
  %170 = load ptr, ptr %9, align 8, !tbaa !5
  store ptr %170, ptr %8, align 8
  br label %171

171:                                              ; preds = %165, %86, %33, %24
  %172 = load ptr, ptr %8, align 8
  ret ptr %172
}

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

; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: write)
declare void @llvm.memset.p0.i64(ptr nocapture writeonly, i8, i64, i1 immarg) #2

; Function Attrs: nounwind uwtable
declare dso_local void @netif_set_addr(ptr noundef, ptr noundef, ptr noundef, ptr noundef) #1

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

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

attributes #0 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { 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 = { nocallback nofree nounwind willreturn memory(argmem: write) }
attributes #3 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
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, !6, i64 0}
!6 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
!9 = !{!10, !12, i64 8}
!10 = !{!"netif", !6, i64 0, !11, i64 8, !11, i64 12, !11, i64 16, !6, i64 24, !6, i64 32, !6, i64 40, !6, i64 48, !6, i64 56, !7, i64 64, !13, i64 72, !7, i64 74, !7, i64 80, !7, i64 81, !7, i64 82, !7, i64 84, !7, i64 85}
!11 = !{!"ip4_addr", !12, i64 0}
!12 = !{!"int", !7, i64 0}
!13 = !{!"short", !7, i64 0}
!14 = !{!10, !12, i64 12}
!15 = !{!10, !12, i64 16}
!16 = !{!10, !6, i64 32}
!17 = !{!10, !13, i64 72}
!18 = !{!10, !7, i64 81}
!19 = !{!10, !6, i64 48}
!20 = !{!10, !6, i64 56}
!21 = !{!7, !7, i64 0}
!22 = !{!10, !7, i64 84}
!23 = !{!10, !6, i64 24}
!24 = !{!12, !12, i64 0}
!25 = !{!10, !6, i64 0}
!26 = distinct !{!26, !27}
!27 = !{!"llvm.loop.mustprogress"}
!28 = distinct !{!28, !27}


; 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.2 = external hidden unnamed_addr constant [180 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [25 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [34 x i8], align 1
@ip_addr_any = external constant %struct.ip4_addr, align 4
@netif_num = external hidden local_unnamed_addr global i8, align 1
@netif_list = external dso_local local_unnamed_addr global ptr, align 8
@.str.6 = external hidden unnamed_addr constant [20 x i8], align 1
@.str.7 = 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

; Function Attrs: nounwind uwtable
define dso_local noundef ptr @netif_add(ptr noundef %0, ptr noundef %1, ptr noundef %2, ptr noundef %3, ptr noundef %4, ptr noundef readonly %5, ptr noundef %6) local_unnamed_addr #1 {
  %.not = icmp eq ptr %0, null
  br i1 %.not, label %8, label %10

8:                                                ; preds = %7
  %9 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str, ptr noundef nonnull @.str.4, i32 noundef 295, ptr noundef nonnull @.str.2)
  br label %54

10:                                               ; preds = %7
  %.not48 = icmp eq ptr %5, null
  br i1 %.not48, label %11, label %13

11:                                               ; preds = %10
  %12 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str, ptr noundef nonnull @.str.5, i32 noundef 296, ptr noundef nonnull @.str.2)
  br label %54

13:                                               ; preds = %10
  %14 = icmp eq ptr %1, null
  %spec.store.select = select i1 %14, ptr @ip_addr_any, ptr %1
  %15 = icmp eq ptr %2, null
  %spec.store.select2 = select i1 %15, ptr @ip_addr_any, ptr %2
  %16 = icmp eq ptr %3, null
  %spec.store.select1 = select i1 %16, ptr @ip_addr_any, ptr %3
  %17 = getelementptr inbounds i8, ptr %0, i64 8
  store i32 0, ptr %17, align 8, !tbaa !5
  %18 = getelementptr inbounds i8, ptr %0, i64 12
  store i32 0, ptr %18, align 4, !tbaa !13
  %19 = getelementptr inbounds i8, ptr %0, i64 16
  store i32 0, ptr %19, align 8, !tbaa !14
  %20 = getelementptr inbounds i8, ptr %0, i64 32
  store ptr @netif_null_output_ip4, ptr %20, align 8, !tbaa !15
  %21 = getelementptr inbounds i8, ptr %0, i64 72
  store i16 0, ptr %21, align 8, !tbaa !16
  %22 = getelementptr inbounds i8, ptr %0, i64 81
  store i8 0, ptr %22, align 1, !tbaa !17
  %23 = getelementptr inbounds i8, ptr %0, i64 64
  store i64 0, ptr %23, align 8
  %24 = getelementptr inbounds i8, ptr %0, i64 48
  store ptr null, ptr %24, align 8, !tbaa !18
  %25 = getelementptr inbounds i8, ptr %0, i64 56
  store ptr %4, ptr %25, align 8, !tbaa !19
  %26 = load i8, ptr @netif_num, align 1, !tbaa !20
  %27 = getelementptr inbounds i8, ptr %0, i64 84
  store i8 %26, ptr %27, align 4, !tbaa !21
  %28 = getelementptr inbounds i8, ptr %0, i64 24
  store ptr %6, ptr %28, align 8, !tbaa !22
  tail call void @netif_set_addr(ptr noundef nonnull %0, ptr noundef nonnull %spec.store.select, ptr noundef nonnull %spec.store.select2, ptr noundef nonnull %spec.store.select1)
  %29 = tail call signext i8 %5(ptr noundef nonnull %0) #2
  %.not49 = icmp eq i8 %29, 0
  br i1 %.not49, label %thread-pre-split, label %54

thread-pre-split:                                 ; preds = %13
  %.pr = load i8, ptr %27, align 4, !tbaa !21
  br label %30

30:                                               ; preds = %49, %thread-pre-split
  %31 = phi i8 [ %.pr, %thread-pre-split ], [ %50, %49 ]
  %32 = icmp eq i8 %31, -1
  br i1 %32, label %33, label %34

33:                                               ; preds = %30
  store i8 0, ptr %27, align 4, !tbaa !21
  br label %34

34:                                               ; preds = %33, %30
  %35 = phi i8 [ 0, %33 ], [ %31, %30 ]
  %.04356 = load ptr, ptr @netif_list, align 8, !tbaa !23
  %.not5057 = icmp eq ptr %.04356, null
  br i1 %.not5057, label %.critedge, label %.lr.ph

36:                                               ; preds = %44
  %.043 = load ptr, ptr %.04359, align 8, !tbaa !23
  %.not50 = icmp eq ptr %.043, null
  br i1 %.not50, label %.critedge, label %.lr.ph, !llvm.loop !24

.lr.ph:                                           ; preds = %34, %36
  %.04359 = phi ptr [ %.043, %36 ], [ %.04356, %34 ]
  %.058 = phi i32 [ %40, %36 ], [ 0, %34 ]
  %.not51 = icmp eq ptr %.04359, %0
  br i1 %.not51, label %37, label %39

37:                                               ; preds = %.lr.ph
  %38 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str, ptr noundef nonnull @.str.6, i32 noundef 395, ptr noundef nonnull @.str.2)
  br label %39

39:                                               ; preds = %37, %.lr.ph
  %40 = add nuw nsw i32 %.058, 1
  %41 = icmp ult i32 %.058, 255
  br i1 %41, label %44, label %42

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

44:                                               ; preds = %42, %39
  %45 = getelementptr inbounds i8, ptr %.04359, i64 84
  %46 = load i8, ptr %45, align 4, !tbaa !21
  %47 = load i8, ptr %27, align 4, !tbaa !21
  %48 = icmp eq i8 %46, %47
  br i1 %48, label %49, label %36, !llvm.loop !24

49:                                               ; preds = %44
  %50 = add i8 %46, 1
  store i8 %50, ptr %27, align 4, !tbaa !21
  br label %30, !llvm.loop !26

.critedge:                                        ; preds = %34, %36
  %.lcssa = phi i8 [ %47, %36 ], [ %35, %34 ]
  %51 = icmp eq i8 %.lcssa, -2
  %52 = add i8 %.lcssa, 1
  %storemerge = select i1 %51, i8 0, i8 %52
  store i8 %storemerge, ptr @netif_num, align 1, !tbaa !20
  %53 = load ptr, ptr @netif_list, align 8, !tbaa !23
  store ptr %53, ptr %0, align 8, !tbaa !27
  store ptr %0, ptr @netif_list, align 8, !tbaa !23
  br label %54

54:                                               ; preds = %13, %.critedge, %11, %8
  %.044 = phi ptr [ %0, %.critedge ], [ null, %11 ], [ null, %8 ], [ null, %13 ]
  ret ptr %.044
}

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

; Function Attrs: nounwind uwtable
declare dso_local void @netif_set_addr(ptr noundef, ptr noundef, ptr noundef, 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 = { 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 = { 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 8}
!6 = !{!"netif", !7, i64 0, !10, i64 8, !10, i64 12, !10, i64 16, !7, i64 24, !7, i64 32, !7, i64 40, !7, i64 48, !7, i64 56, !8, i64 64, !12, i64 72, !8, i64 74, !8, i64 80, !8, i64 81, !8, i64 82, !8, i64 84, !8, i64 85}
!7 = !{!"any pointer", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C/C++ TBAA"}
!10 = !{!"ip4_addr", !11, i64 0}
!11 = !{!"int", !8, i64 0}
!12 = !{!"short", !8, i64 0}
!13 = !{!6, !11, i64 12}
!14 = !{!6, !11, i64 16}
!15 = !{!6, !7, i64 32}
!16 = !{!6, !12, i64 72}
!17 = !{!6, !8, i64 81}
!18 = !{!6, !7, i64 48}
!19 = !{!6, !7, i64 56}
!20 = !{!8, !8, i64 0}
!21 = !{!6, !8, i64 84}
!22 = !{!6, !7, i64 24}
!23 = !{!7, !7, i64 0}
!24 = distinct !{!24, !25}
!25 = !{!"llvm.loop.mustprogress"}
!26 = distinct !{!26, !25}
!27 = !{!6, !7, i64 0}


; Effective O3 passes: EarlyCSEPass,GVNPass,GlobalOptPass,IPSCCPPass,InferFunctionAttrsPass,InstCombinePass,InstSimplifyPass,JumpThreadingPass,LCSSAPass,LoopRotatePass,LoopUnrollPass,PostOrderFunctionAttrsPass,SROAPass,SimplifyCFGPass,TailCallElimPass