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

; 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.etharp_entry = type { ptr, %struct.ip4_addr, ptr, %struct.eth_addr, i16, i8 }
%struct.ip4_addr = type { i32 }
%struct.eth_addr = type { [6 x i8] }
%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 }

@arp_table = external hidden global [10 x %struct.etharp_entry], align 16
@.str = external hidden unnamed_addr constant [40 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [186 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [15 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [14 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [10 x i8], align 1
@ethbroadcast = external constant %struct.eth_addr, align 1
@etharp_cached_entry = external hidden global 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: nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #0

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

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

14:                                               ; preds = %3
  %15 = load ptr, ptr %5, 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.4, i32 noundef 798, 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
  br label %25

25:                                               ; preds = %24
  %26 = load ptr, ptr %6, align 8, !tbaa !5
  %27 = icmp ne ptr %26, null
  br i1 %27, label %33, label %28

28:                                               ; preds = %25
  br label %29

29:                                               ; preds = %28
  %30 = call i32 (ptr, ...) @printf(ptr noundef @.str, ptr noundef @.str.6, i32 noundef 799, ptr noundef @.str.2)
  br label %31

31:                                               ; preds = %29
  br label %32

32:                                               ; preds = %31
  br label %33

33:                                               ; preds = %32, %25
  br label %34

34:                                               ; preds = %33
  br label %35

35:                                               ; preds = %34
  br label %36

36:                                               ; preds = %35
  %37 = load ptr, ptr %7, align 8, !tbaa !5
  %38 = icmp ne ptr %37, null
  br i1 %38, label %44, label %39

39:                                               ; preds = %36
  br label %40

40:                                               ; preds = %39
  %41 = call i32 (ptr, ...) @printf(ptr noundef @.str, ptr noundef @.str.3, i32 noundef 800, ptr noundef @.str.2)
  br label %42

42:                                               ; preds = %40
  br label %43

43:                                               ; preds = %42
  br label %44

44:                                               ; preds = %43, %36
  br label %45

45:                                               ; preds = %44
  br label %46

46:                                               ; preds = %45
  %47 = load ptr, ptr %7, align 8, !tbaa !5
  %48 = getelementptr inbounds %struct.ip4_addr, ptr %47, i32 0, i32 0
  %49 = load i32, ptr %48, align 4, !tbaa !9
  %50 = load ptr, ptr %5, align 8, !tbaa !5
  %51 = call zeroext i8 @ip4_addr_isbroadcast_u32(i32 noundef %49, ptr noundef %50)
  %52 = icmp ne i8 %51, 0
  br i1 %52, label %53, label %54

53:                                               ; preds = %46
  store ptr @ethbroadcast, ptr %8, align 8, !tbaa !5
  br label %207

54:                                               ; preds = %46
  %55 = load ptr, ptr %7, align 8, !tbaa !5
  %56 = getelementptr inbounds %struct.ip4_addr, ptr %55, i32 0, i32 0
  %57 = load i32, ptr %56, align 4, !tbaa !9
  %58 = zext i32 %57 to i64
  %59 = and i64 %58, 240
  %60 = icmp eq i64 %59, 224
  br i1 %60, label %61, label %89

61:                                               ; preds = %54
  %62 = getelementptr inbounds %struct.eth_addr, ptr %9, i32 0, i32 0
  %63 = getelementptr inbounds [6 x i8], ptr %62, i64 0, i64 0
  store i8 1, ptr %63, align 1, !tbaa !12
  %64 = getelementptr inbounds %struct.eth_addr, ptr %9, i32 0, i32 0
  %65 = getelementptr inbounds [6 x i8], ptr %64, i64 0, i64 1
  store i8 0, ptr %65, align 1, !tbaa !12
  %66 = getelementptr inbounds %struct.eth_addr, ptr %9, i32 0, i32 0
  %67 = getelementptr inbounds [6 x i8], ptr %66, i64 0, i64 2
  store i8 94, ptr %67, align 1, !tbaa !12
  %68 = load ptr, ptr %7, align 8, !tbaa !5
  %69 = getelementptr inbounds %struct.ip4_addr, ptr %68, i32 0, i32 0
  %70 = getelementptr inbounds i8, ptr %69, i64 1
  %71 = load i8, ptr %70, align 1, !tbaa !12
  %72 = zext i8 %71 to i32
  %73 = and i32 %72, 127
  %74 = trunc i32 %73 to i8
  %75 = getelementptr inbounds %struct.eth_addr, ptr %9, i32 0, i32 0
  %76 = getelementptr inbounds [6 x i8], ptr %75, i64 0, i64 3
  store i8 %74, ptr %76, align 1, !tbaa !12
  %77 = load ptr, ptr %7, align 8, !tbaa !5
  %78 = getelementptr inbounds %struct.ip4_addr, ptr %77, i32 0, i32 0
  %79 = getelementptr inbounds i8, ptr %78, i64 2
  %80 = load i8, ptr %79, align 2, !tbaa !12
  %81 = getelementptr inbounds %struct.eth_addr, ptr %9, i32 0, i32 0
  %82 = getelementptr inbounds [6 x i8], ptr %81, i64 0, i64 4
  store i8 %80, ptr %82, align 1, !tbaa !12
  %83 = load ptr, ptr %7, align 8, !tbaa !5
  %84 = getelementptr inbounds %struct.ip4_addr, ptr %83, i32 0, i32 0
  %85 = getelementptr inbounds i8, ptr %84, i64 3
  %86 = load i8, ptr %85, align 1, !tbaa !12
  %87 = getelementptr inbounds %struct.eth_addr, ptr %9, i32 0, i32 0
  %88 = getelementptr inbounds [6 x i8], ptr %87, i64 0, i64 5
  store i8 %86, ptr %88, align 1, !tbaa !12
  store ptr %9, ptr %8, align 8, !tbaa !5
  br label %206

89:                                               ; preds = %54
  call void @llvm.lifetime.start.p0(i64 1, ptr %11) #3
  %90 = load ptr, ptr %7, align 8, !tbaa !5
  %91 = getelementptr inbounds %struct.ip4_addr, ptr %90, i32 0, i32 0
  %92 = load i32, ptr %91, align 4, !tbaa !9
  %93 = load ptr, ptr %5, align 8, !tbaa !5
  %94 = getelementptr inbounds %struct.netif, ptr %93, i32 0, i32 2
  %95 = getelementptr inbounds %struct.ip4_addr, ptr %94, i32 0, i32 0
  %96 = load i32, ptr %95, align 4, !tbaa !9
  %97 = and i32 %92, %96
  %98 = load ptr, ptr %5, align 8, !tbaa !5
  %99 = getelementptr inbounds %struct.netif, ptr %98, i32 0, i32 1
  %100 = getelementptr inbounds %struct.ip4_addr, ptr %99, i32 0, i32 0
  %101 = load i32, ptr %100, align 8, !tbaa !9
  %102 = load ptr, ptr %5, align 8, !tbaa !5
  %103 = getelementptr inbounds %struct.netif, ptr %102, i32 0, i32 2
  %104 = getelementptr inbounds %struct.ip4_addr, ptr %103, i32 0, i32 0
  %105 = load i32, ptr %104, align 4, !tbaa !9
  %106 = and i32 %101, %105
  %107 = icmp eq i32 %97, %106
  br i1 %107, label %126, label %108

108:                                              ; preds = %89
  %109 = load ptr, ptr %7, align 8, !tbaa !5
  %110 = getelementptr inbounds %struct.ip4_addr, ptr %109, i32 0, i32 0
  %111 = load i32, ptr %110, align 4, !tbaa !9
  %112 = zext i32 %111 to i64
  %113 = and i64 %112, 65535
  %114 = icmp eq i64 %113, 65193
  br i1 %114, label %126, label %115

115:                                              ; preds = %108
  %116 = load ptr, ptr %5, align 8, !tbaa !5
  %117 = getelementptr inbounds %struct.netif, ptr %116, i32 0, i32 3
  %118 = getelementptr inbounds %struct.ip4_addr, ptr %117, i32 0, i32 0
  %119 = load i32, ptr %118, align 8, !tbaa !9
  %120 = icmp eq i32 %119, 0
  br i1 %120, label %124, label %121

121:                                              ; preds = %115
  %122 = load ptr, ptr %5, align 8, !tbaa !5
  %123 = getelementptr inbounds %struct.netif, ptr %122, i32 0, i32 3
  store ptr %123, ptr %10, align 8, !tbaa !5
  br label %125

124:                                              ; preds = %115
  store i8 -4, ptr %4, align 1
  store i32 1, ptr %12, align 4
  br label %205

125:                                              ; preds = %121
  br label %126

126:                                              ; preds = %125, %108, %89
  %127 = load i8, ptr @etharp_cached_entry, align 1, !tbaa !12
  %128 = zext i8 %127 to i64
  %129 = getelementptr inbounds [10 x %struct.etharp_entry], ptr @arp_table, i64 0, i64 %128
  %130 = getelementptr inbounds %struct.etharp_entry, ptr %129, i32 0, i32 5
  %131 = load i8, ptr %130, align 8, !tbaa !13
  %132 = zext i8 %131 to i32
  %133 = icmp sge i32 %132, 2
  br i1 %133, label %134, label %158

134:                                              ; preds = %126
  %135 = load i8, ptr @etharp_cached_entry, align 1, !tbaa !12
  %136 = zext i8 %135 to i64
  %137 = getelementptr inbounds [10 x %struct.etharp_entry], ptr @arp_table, i64 0, i64 %136
  %138 = getelementptr inbounds %struct.etharp_entry, ptr %137, i32 0, i32 2
  %139 = load ptr, ptr %138, align 8, !tbaa !17
  %140 = load ptr, ptr %5, align 8, !tbaa !5
  %141 = icmp eq ptr %139, %140
  br i1 %141, label %142, label %158

142:                                              ; preds = %134
  %143 = load ptr, ptr %10, align 8, !tbaa !5
  %144 = getelementptr inbounds %struct.ip4_addr, ptr %143, i32 0, i32 0
  %145 = load i32, ptr %144, align 4, !tbaa !9
  %146 = load i8, ptr @etharp_cached_entry, align 1, !tbaa !12
  %147 = zext i8 %146 to i64
  %148 = getelementptr inbounds [10 x %struct.etharp_entry], ptr @arp_table, i64 0, i64 %147
  %149 = getelementptr inbounds %struct.etharp_entry, ptr %148, i32 0, i32 1
  %150 = getelementptr inbounds %struct.ip4_addr, ptr %149, i32 0, i32 0
  %151 = load i32, ptr %150, align 8, !tbaa !18
  %152 = icmp eq i32 %145, %151
  br i1 %152, label %153, label %158

153:                                              ; preds = %142
  %154 = load ptr, ptr %5, align 8, !tbaa !5
  %155 = load ptr, ptr %6, align 8, !tbaa !5
  %156 = load i8, ptr @etharp_cached_entry, align 1, !tbaa !12
  %157 = call signext i8 @etharp_output_to_arp_index(ptr noundef %154, ptr noundef %155, i8 noundef zeroext %156)
  store i8 %157, ptr %4, align 1
  store i32 1, ptr %12, align 4
  br label %205

158:                                              ; preds = %142, %134, %126
  store i8 0, ptr %11, align 1, !tbaa !12
  br label %159

159:                                              ; preds = %197, %158
  %160 = load i8, ptr %11, align 1, !tbaa !12
  %161 = zext i8 %160 to i32
  %162 = icmp slt i32 %161, 10
  br i1 %162, label %163, label %200

163:                                              ; preds = %159
  %164 = load i8, ptr %11, align 1, !tbaa !12
  %165 = zext i8 %164 to i64
  %166 = getelementptr inbounds [10 x %struct.etharp_entry], ptr @arp_table, i64 0, i64 %165
  %167 = getelementptr inbounds %struct.etharp_entry, ptr %166, i32 0, i32 5
  %168 = load i8, ptr %167, align 8, !tbaa !13
  %169 = zext i8 %168 to i32
  %170 = icmp sge i32 %169, 2
  br i1 %170, label %171, label %196

171:                                              ; preds = %163
  %172 = load i8, ptr %11, align 1, !tbaa !12
  %173 = zext i8 %172 to i64
  %174 = getelementptr inbounds [10 x %struct.etharp_entry], ptr @arp_table, i64 0, i64 %173
  %175 = getelementptr inbounds %struct.etharp_entry, ptr %174, i32 0, i32 2
  %176 = load ptr, ptr %175, align 8, !tbaa !17
  %177 = load ptr, ptr %5, align 8, !tbaa !5
  %178 = icmp eq ptr %176, %177
  br i1 %178, label %179, label %196

179:                                              ; preds = %171
  %180 = load ptr, ptr %10, align 8, !tbaa !5
  %181 = getelementptr inbounds %struct.ip4_addr, ptr %180, i32 0, i32 0
  %182 = load i32, ptr %181, align 4, !tbaa !9
  %183 = load i8, ptr %11, align 1, !tbaa !12
  %184 = zext i8 %183 to i64
  %185 = getelementptr inbounds [10 x %struct.etharp_entry], ptr @arp_table, i64 0, i64 %184
  %186 = getelementptr inbounds %struct.etharp_entry, ptr %185, i32 0, i32 1
  %187 = getelementptr inbounds %struct.ip4_addr, ptr %186, i32 0, i32 0
  %188 = load i32, ptr %187, align 8, !tbaa !18
  %189 = icmp eq i32 %182, %188
  br i1 %189, label %190, label %196

190:                                              ; preds = %179
  %191 = load i8, ptr %11, align 1, !tbaa !12
  store i8 %191, ptr @etharp_cached_entry, align 1, !tbaa !12
  %192 = load ptr, ptr %5, align 8, !tbaa !5
  %193 = load ptr, ptr %6, align 8, !tbaa !5
  %194 = load i8, ptr %11, align 1, !tbaa !12
  %195 = call signext i8 @etharp_output_to_arp_index(ptr noundef %192, ptr noundef %193, i8 noundef zeroext %194)
  store i8 %195, ptr %4, align 1
  store i32 1, ptr %12, align 4
  br label %205

196:                                              ; preds = %179, %171, %163
  br label %197

197:                                              ; preds = %196
  %198 = load i8, ptr %11, align 1, !tbaa !12
  %199 = add i8 %198, 1
  store i8 %199, ptr %11, align 1, !tbaa !12
  br label %159, !llvm.loop !19

200:                                              ; preds = %159
  %201 = load ptr, ptr %5, align 8, !tbaa !5
  %202 = load ptr, ptr %10, align 8, !tbaa !5
  %203 = load ptr, ptr %6, align 8, !tbaa !5
  %204 = call signext i8 @etharp_query(ptr noundef %201, ptr noundef %202, ptr noundef %203)
  store i8 %204, ptr %4, align 1
  store i32 1, ptr %12, align 4
  br label %205

205:                                              ; preds = %200, %190, %153, %124
  call void @llvm.lifetime.end.p0(i64 1, ptr %11) #3
  br label %215

206:                                              ; preds = %61
  br label %207

207:                                              ; preds = %206, %53
  %208 = load ptr, ptr %5, align 8, !tbaa !5
  %209 = load ptr, ptr %6, align 8, !tbaa !5
  %210 = load ptr, ptr %5, align 8, !tbaa !5
  %211 = getelementptr inbounds %struct.netif, ptr %210, i32 0, i32 11
  %212 = getelementptr inbounds [6 x i8], ptr %211, i64 0, i64 0
  %213 = load ptr, ptr %8, align 8, !tbaa !5
  %214 = call signext i8 @ethernet_output(ptr noundef %208, ptr noundef %209, ptr noundef %212, ptr noundef %213, i16 noundef zeroext 2048)
  store i8 %214, ptr %4, align 1
  store i32 1, ptr %12, align 4
  br label %215

215:                                              ; preds = %207, %205
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #3
  call void @llvm.lifetime.end.p0(i64 6, ptr %9) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #3
  %216 = load i8, ptr %4, align 1
  ret i8 %216
}

declare zeroext i8 @ip4_addr_isbroadcast_u32(i32 noundef, ptr noundef) #1

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

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

declare signext i8 @ethernet_output(ptr noundef, ptr noundef, ptr noundef, ptr noundef, i16 noundef zeroext) #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, !11, i64 0}
!10 = !{!"ip4_addr", !11, i64 0}
!11 = !{!"int", !7, i64 0}
!12 = !{!7, !7, i64 0}
!13 = !{!14, !7, i64 32}
!14 = !{!"etharp_entry", !6, i64 0, !10, i64 8, !6, i64 16, !15, i64 24, !16, i64 30, !7, i64 32}
!15 = !{!"eth_addr", !7, i64 0}
!16 = !{!"short", !7, i64 0}
!17 = !{!14, !6, i64 16}
!18 = !{!14, !11, i64 8}
!19 = distinct !{!19, !20}
!20 = !{!"llvm.loop.mustprogress"}


; 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.etharp_entry = type { ptr, %struct.ip4_addr, ptr, %struct.eth_addr, i16, i8 }
%struct.ip4_addr = type { i32 }
%struct.eth_addr = type { [6 x i8] }

@arp_table = external hidden local_unnamed_addr global [10 x %struct.etharp_entry], align 16
@.str = external hidden unnamed_addr constant [40 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [186 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [15 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [14 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [10 x i8], align 1
@ethbroadcast = external constant %struct.eth_addr, align 1
@etharp_cached_entry = external hidden local_unnamed_addr global 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: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #0

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

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

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

7:                                                ; preds = %3, %5
  %.not44 = icmp eq ptr %1, null
  br i1 %.not44, label %8, label %10

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

10:                                               ; preds = %7, %8
  %.not45 = icmp eq ptr %2, null
  br i1 %.not45, label %11, label %13

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

13:                                               ; preds = %11, %10
  %14 = load i32, ptr %2, align 4, !tbaa !5
  %15 = tail call zeroext i8 @ip4_addr_isbroadcast_u32(i32 noundef %14, ptr noundef %0) #4
  %.not46 = icmp eq i8 %15, 0
  br i1 %.not46, label %16, label %140

16:                                               ; preds = %13
  %17 = load i32, ptr %2, align 4
  %18 = zext i32 %17 to i64
  %19 = and i64 %18, 240
  %20 = icmp eq i64 %19, 224
  br i1 %20, label %21, label %34

21:                                               ; preds = %16
  %22 = lshr i32 %17, 24
  %23 = trunc nuw i32 %22 to i8
  %24 = lshr i32 %17, 16
  %25 = trunc i32 %24 to i8
  %26 = lshr i32 %17, 8
  %27 = trunc i32 %26 to i8
  store i8 1, ptr %4, align 1, !tbaa !10
  %28 = getelementptr inbounds i8, ptr %4, i64 1
  store i8 0, ptr %28, align 1, !tbaa !10
  %29 = getelementptr inbounds i8, ptr %4, i64 2
  store i8 94, ptr %29, align 1, !tbaa !10
  %30 = and i8 %27, 127
  %31 = getelementptr inbounds i8, ptr %4, i64 3
  store i8 %30, ptr %31, align 1, !tbaa !10
  %32 = getelementptr inbounds i8, ptr %4, i64 4
  store i8 %25, ptr %32, align 1, !tbaa !10
  %33 = getelementptr inbounds i8, ptr %4, i64 5
  store i8 %23, ptr %33, align 1, !tbaa !10
  br label %140

34:                                               ; preds = %16
  %35 = getelementptr inbounds i8, ptr %0, i64 12
  %36 = load i32, ptr %35, align 4, !tbaa !5
  %37 = getelementptr inbounds i8, ptr %0, i64 8
  %38 = load i32, ptr %37, align 8, !tbaa !5
  %39 = xor i32 %38, %17
  %40 = and i32 %39, %36
  %41 = icmp eq i32 %40, 0
  %42 = and i64 %18, 65535
  %43 = icmp eq i64 %42, 65193
  %or.cond = or i1 %43, %41
  br i1 %or.cond, label %48, label %44

44:                                               ; preds = %34
  %45 = getelementptr inbounds i8, ptr %0, i64 16
  %46 = load i32, ptr %45, align 8, !tbaa !5
  %47 = icmp eq i32 %46, 0
  br i1 %47, label %143, label %48

48:                                               ; preds = %44, %34
  %49 = phi i32 [ %17, %34 ], [ %46, %44 ]
  %.039 = phi ptr [ %2, %34 ], [ %45, %44 ]
  %50 = load i8, ptr @etharp_cached_entry, align 1, !tbaa !10
  %51 = zext i8 %50 to i64
  %52 = getelementptr inbounds [10 x %struct.etharp_entry], ptr @arp_table, i64 0, i64 %51
  %53 = getelementptr inbounds i8, ptr %52, i64 32
  %54 = load i8, ptr %53, align 8, !tbaa !11
  %55 = icmp ugt i8 %54, 1
  br i1 %55, label %56, label %66

56:                                               ; preds = %48
  %57 = getelementptr inbounds i8, ptr %52, i64 16
  %58 = load ptr, ptr %57, align 8, !tbaa !16
  %59 = icmp eq ptr %58, %0
  br i1 %59, label %60, label %66

60:                                               ; preds = %56
  %61 = getelementptr inbounds i8, ptr %52, i64 8
  %62 = load i32, ptr %61, align 8, !tbaa !17
  %63 = icmp eq i32 %49, %62
  br i1 %63, label %64, label %66

64:                                               ; preds = %60
  %65 = tail call signext i8 @etharp_output_to_arp_index(ptr noundef nonnull %0, ptr noundef %1, i8 noundef zeroext %50)
  br label %143

66:                                               ; preds = %60, %56, %48
  %67 = load i8, ptr getelementptr inbounds (i8, ptr @arp_table, i64 32), align 16, !tbaa !11
  %68 = icmp ugt i8 %67, 1
  %69 = load ptr, ptr getelementptr inbounds (i8, ptr @arp_table, i64 16), align 16
  %70 = icmp eq ptr %69, %0
  %or.cond53 = select i1 %68, i1 %70, i1 false
  %71 = load i32, ptr getelementptr inbounds (i8, ptr @arp_table, i64 8), align 8
  %72 = icmp eq i32 %49, %71
  %or.cond55 = select i1 %or.cond53, i1 %72, i1 false
  br i1 %or.cond55, label %73, label %75

73:                                               ; preds = %131, %124, %117, %110, %103, %96, %89, %82, %75, %66
  %.049.lcssa.wide = phi i8 [ 0, %66 ], [ 1, %75 ], [ 2, %82 ], [ 3, %89 ], [ 4, %96 ], [ 5, %103 ], [ 6, %110 ], [ 7, %117 ], [ 8, %124 ], [ 9, %131 ]
  store i8 %.049.lcssa.wide, ptr @etharp_cached_entry, align 1, !tbaa !10
  %74 = tail call signext i8 @etharp_output_to_arp_index(ptr noundef nonnull %0, ptr noundef %1, i8 noundef zeroext %.049.lcssa.wide)
  br label %143

75:                                               ; preds = %66
  %76 = load i8, ptr getelementptr inbounds (i8, ptr @arp_table, i64 72), align 8, !tbaa !11
  %77 = icmp ugt i8 %76, 1
  %78 = load ptr, ptr getelementptr inbounds (i8, ptr @arp_table, i64 56), align 8
  %79 = icmp eq ptr %78, %0
  %or.cond57 = select i1 %77, i1 %79, i1 false
  %80 = load i32, ptr getelementptr inbounds (i8, ptr @arp_table, i64 48), align 16
  %81 = icmp eq i32 %49, %80
  %or.cond59 = select i1 %or.cond57, i1 %81, i1 false
  br i1 %or.cond59, label %73, label %82

82:                                               ; preds = %75
  %83 = load i8, ptr getelementptr inbounds (i8, ptr @arp_table, i64 112), align 16, !tbaa !11
  %84 = icmp ugt i8 %83, 1
  %85 = load ptr, ptr getelementptr inbounds (i8, ptr @arp_table, i64 96), align 16
  %86 = icmp eq ptr %85, %0
  %or.cond61 = select i1 %84, i1 %86, i1 false
  %87 = load i32, ptr getelementptr inbounds (i8, ptr @arp_table, i64 88), align 8
  %88 = icmp eq i32 %49, %87
  %or.cond63 = select i1 %or.cond61, i1 %88, i1 false
  br i1 %or.cond63, label %73, label %89

89:                                               ; preds = %82
  %90 = load i8, ptr getelementptr inbounds (i8, ptr @arp_table, i64 152), align 8, !tbaa !11
  %91 = icmp ugt i8 %90, 1
  %92 = load ptr, ptr getelementptr inbounds (i8, ptr @arp_table, i64 136), align 8
  %93 = icmp eq ptr %92, %0
  %or.cond65 = select i1 %91, i1 %93, i1 false
  %94 = load i32, ptr getelementptr inbounds (i8, ptr @arp_table, i64 128), align 16
  %95 = icmp eq i32 %49, %94
  %or.cond67 = select i1 %or.cond65, i1 %95, i1 false
  br i1 %or.cond67, label %73, label %96

96:                                               ; preds = %89
  %97 = load i8, ptr getelementptr inbounds (i8, ptr @arp_table, i64 192), align 16, !tbaa !11
  %98 = icmp ugt i8 %97, 1
  %99 = load ptr, ptr getelementptr inbounds (i8, ptr @arp_table, i64 176), align 16
  %100 = icmp eq ptr %99, %0
  %or.cond69 = select i1 %98, i1 %100, i1 false
  %101 = load i32, ptr getelementptr inbounds (i8, ptr @arp_table, i64 168), align 8
  %102 = icmp eq i32 %49, %101
  %or.cond71 = select i1 %or.cond69, i1 %102, i1 false
  br i1 %or.cond71, label %73, label %103

103:                                              ; preds = %96
  %104 = load i8, ptr getelementptr inbounds (i8, ptr @arp_table, i64 232), align 8, !tbaa !11
  %105 = icmp ugt i8 %104, 1
  %106 = load ptr, ptr getelementptr inbounds (i8, ptr @arp_table, i64 216), align 8
  %107 = icmp eq ptr %106, %0
  %or.cond73 = select i1 %105, i1 %107, i1 false
  %108 = load i32, ptr getelementptr inbounds (i8, ptr @arp_table, i64 208), align 16
  %109 = icmp eq i32 %49, %108
  %or.cond75 = select i1 %or.cond73, i1 %109, i1 false
  br i1 %or.cond75, label %73, label %110

110:                                              ; preds = %103
  %111 = load i8, ptr getelementptr inbounds (i8, ptr @arp_table, i64 272), align 16, !tbaa !11
  %112 = icmp ugt i8 %111, 1
  %113 = load ptr, ptr getelementptr inbounds (i8, ptr @arp_table, i64 256), align 16
  %114 = icmp eq ptr %113, %0
  %or.cond77 = select i1 %112, i1 %114, i1 false
  %115 = load i32, ptr getelementptr inbounds (i8, ptr @arp_table, i64 248), align 8
  %116 = icmp eq i32 %49, %115
  %or.cond79 = select i1 %or.cond77, i1 %116, i1 false
  br i1 %or.cond79, label %73, label %117

117:                                              ; preds = %110
  %118 = load i8, ptr getelementptr inbounds (i8, ptr @arp_table, i64 312), align 8, !tbaa !11
  %119 = icmp ugt i8 %118, 1
  %120 = load ptr, ptr getelementptr inbounds (i8, ptr @arp_table, i64 296), align 8
  %121 = icmp eq ptr %120, %0
  %or.cond81 = select i1 %119, i1 %121, i1 false
  %122 = load i32, ptr getelementptr inbounds (i8, ptr @arp_table, i64 288), align 16
  %123 = icmp eq i32 %49, %122
  %or.cond83 = select i1 %or.cond81, i1 %123, i1 false
  br i1 %or.cond83, label %73, label %124

124:                                              ; preds = %117
  %125 = load i8, ptr getelementptr inbounds (i8, ptr @arp_table, i64 352), align 16, !tbaa !11
  %126 = icmp ugt i8 %125, 1
  %127 = load ptr, ptr getelementptr inbounds (i8, ptr @arp_table, i64 336), align 16
  %128 = icmp eq ptr %127, %0
  %or.cond85 = select i1 %126, i1 %128, i1 false
  %129 = load i32, ptr getelementptr inbounds (i8, ptr @arp_table, i64 328), align 8
  %130 = icmp eq i32 %49, %129
  %or.cond87 = select i1 %or.cond85, i1 %130, i1 false
  br i1 %or.cond87, label %73, label %131

131:                                              ; preds = %124
  %132 = load i8, ptr getelementptr inbounds (i8, ptr @arp_table, i64 392), align 8, !tbaa !11
  %133 = icmp ugt i8 %132, 1
  %134 = load ptr, ptr getelementptr inbounds (i8, ptr @arp_table, i64 376), align 8
  %135 = icmp eq ptr %134, %0
  %or.cond89 = select i1 %133, i1 %135, i1 false
  %136 = load i32, ptr getelementptr inbounds (i8, ptr @arp_table, i64 368), align 16
  %137 = icmp eq i32 %49, %136
  %or.cond91 = select i1 %or.cond89, i1 %137, i1 false
  br i1 %or.cond91, label %73, label %138

138:                                              ; preds = %131
  %139 = tail call signext i8 @etharp_query(ptr noundef nonnull %0, ptr noundef nonnull %.039, ptr noundef %1)
  br label %143

140:                                              ; preds = %13, %21
  %.040 = phi ptr [ %4, %21 ], [ @ethbroadcast, %13 ]
  %141 = getelementptr inbounds i8, ptr %0, i64 74
  %142 = call signext i8 @ethernet_output(ptr noundef %0, ptr noundef %1, ptr noundef nonnull %141, ptr noundef nonnull %.040, i16 noundef zeroext 2048) #4
  br label %143

143:                                              ; preds = %64, %73, %138, %44, %140
  %.1 = phi i8 [ %142, %140 ], [ %65, %64 ], [ %74, %73 ], [ %139, %138 ], [ -4, %44 ]
  call void @llvm.lifetime.end.p0(i64 6, ptr nonnull %4) #4
  ret i8 %.1
}

declare zeroext i8 @ip4_addr_isbroadcast_u32(i32 noundef, ptr noundef) local_unnamed_addr #3

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

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

declare signext i8 @ethernet_output(ptr noundef, ptr noundef, ptr noundef, ptr noundef, i16 noundef zeroext) local_unnamed_addr #3

attributes #0 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { 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 #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 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { nounwind }

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !7, i64 0}
!6 = !{!"ip4_addr", !7, i64 0}
!7 = !{!"int", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C/C++ TBAA"}
!10 = !{!8, !8, i64 0}
!11 = !{!12, !8, i64 32}
!12 = !{!"etharp_entry", !13, i64 0, !6, i64 8, !13, i64 16, !14, i64 24, !15, i64 30, !8, i64 32}
!13 = !{!"any pointer", !8, i64 0}
!14 = !{!"eth_addr", !8, i64 0}
!15 = !{!"short", !8, i64 0}
!16 = !{!12, !13, i64 16}
!17 = !{!12, !7, i64 8}


; Effective O3 passes: BDCEPass,CorrelatedValuePropagationPass,EarlyCSEPass,GVNPass,GlobalOptPass,IPSCCPPass,IndVarSimplifyPass,InferAlignmentPass,InferFunctionAttrsPass,InstCombinePass,LCSSAPass,LoopRotatePass,ReassociatePass,SCCPPass,SROAPass,SimplifyCFGPass,TailCallElimPass