; LLVM IR from HewlettPackard/netperf :: src (netrt_rtnetlink)

; 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.sockaddr_nl = type { i16, i16, i32, i32 }
%struct.msghdr = type { ptr, i32, ptr, i64, ptr, i64, i32 }
%struct.iovec = type { ptr, i64 }
%struct.anon = type { %struct.nlmsghdr, %struct.rtmsg, [1024 x i8] }
%struct.nlmsghdr = type { i32, i16, i16, i32, i32 }
%struct.rtmsg = type { i8, i8, i8, i8, i8, i8, i8, i8, i32 }
%struct.sockaddr_in = type { i16, i16, %struct.in_addr, [8 x i8] }
%struct.in_addr = type { i32 }
%struct.rtattr = type { i16, i16 }
%struct.sockaddr_in6 = type { i16, i16, i32, %struct.in6_addr, i32 }
%struct.in6_addr = type { %union.anon }
%union.anon = type { [4 x i32] }

@.str = external hidden unnamed_addr constant [21 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [27 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [14 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [15 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [15 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [24 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [18 x i8], align 1
@.str.7 = external hidden unnamed_addr constant [21 x i8], align 1

; Function Attrs: nounwind uwtable
define dso_local ptr @find_egress_interface(ptr noundef %0, ptr noundef %1) #0 {
  %3 = alloca ptr, align 8
  %4 = alloca ptr, align 8
  %5 = alloca ptr, align 8
  %6 = alloca %struct.sockaddr_nl, align 4
  %7 = alloca %struct.sockaddr_nl, align 4
  %8 = alloca ptr, align 8
  %9 = alloca ptr, align 8
  %10 = alloca i32, align 4
  %11 = alloca [16 x i8], align 16
  %12 = alloca i32, align 4
  %13 = alloca %struct.msghdr, align 8
  %14 = alloca %struct.iovec, align 8
  %15 = alloca %struct.anon, align 4
  %16 = alloca [1024 x i8], align 16
  %17 = alloca ptr, align 8
  %18 = alloca ptr, align 8
  %19 = alloca ptr, align 8
  %20 = alloca i32, align 4
  %21 = alloca i32, align 4
  %22 = alloca i32, align 4
  %23 = alloca i32, align 4
  store ptr %0, ptr %4, align 8, !tbaa !5
  store ptr %1, ptr %5, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 12, ptr %6) #6
  call void @llvm.lifetime.start.p0(i64 12, ptr %7) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #6
  store i32 -1, ptr %10, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 16, ptr %11) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #6
  call void @llvm.lifetime.start.p0(i64 56, ptr %13) #6
  call void @llvm.lifetime.start.p0(i64 16, ptr %14) #6
  call void @llvm.lifetime.start.p0(i64 1052, ptr %15) #6
  call void @llvm.lifetime.start.p0(i64 1024, ptr %16) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr %17) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr %18) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr %19) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr %20) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr %21) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr %22) #6
  %24 = call i32 @socket(i32 noundef 16, i32 noundef 3, i32 noundef 0) #6
  store i32 %24, ptr %12, align 4, !tbaa !9
  call void @llvm.memset.p0.i64(ptr align 4 %6, i8 0, i64 12, i1 false)
  %25 = getelementptr inbounds %struct.sockaddr_nl, ptr %6, i32 0, i32 0
  store i16 16, ptr %25, align 4, !tbaa !11
  %26 = call i32 @getpid() #6
  %27 = getelementptr inbounds %struct.sockaddr_nl, ptr %6, i32 0, i32 2
  store i32 %26, ptr %27, align 4, !tbaa !14
  %28 = load i32, ptr %12, align 4, !tbaa !9
  %29 = call i32 @bind(i32 noundef %28, ptr noundef %6, i32 noundef 12) #6
  call void @llvm.memset.p0.i64(ptr align 4 %15, i8 0, i64 1052, i1 false)
  %30 = getelementptr inbounds %struct.anon, ptr %15, i32 0, i32 0
  %31 = getelementptr inbounds %struct.nlmsghdr, ptr %30, i32 0, i32 0
  store i32 28, ptr %31, align 4, !tbaa !15
  %32 = getelementptr inbounds %struct.anon, ptr %15, i32 0, i32 0
  %33 = getelementptr inbounds %struct.nlmsghdr, ptr %32, i32 0, i32 2
  store i16 1, ptr %33, align 2, !tbaa !19
  %34 = getelementptr inbounds %struct.anon, ptr %15, i32 0, i32 0
  %35 = getelementptr inbounds %struct.nlmsghdr, ptr %34, i32 0, i32 1
  store i16 26, ptr %35, align 4, !tbaa !20
  %36 = load ptr, ptr %5, align 8, !tbaa !5
  %37 = icmp ne ptr %36, null
  br i1 %37, label %38, label %82

38:                                               ; preds = %2
  %39 = load ptr, ptr %5, align 8, !tbaa !5
  store ptr %39, ptr %8, align 8, !tbaa !5
  %40 = load ptr, ptr %5, align 8, !tbaa !5
  store ptr %40, ptr %9, align 8, !tbaa !5
  %41 = load ptr, ptr %8, align 8, !tbaa !5
  %42 = getelementptr inbounds %struct.sockaddr_in, ptr %41, i32 0, i32 0
  %43 = load i16, ptr %42, align 4, !tbaa !21
  %44 = trunc i16 %43 to i8
  %45 = getelementptr inbounds %struct.anon, ptr %15, i32 0, i32 1
  %46 = getelementptr inbounds %struct.rtmsg, ptr %45, i32 0, i32 0
  store i8 %44, ptr %46, align 4, !tbaa !24
  %47 = getelementptr inbounds %struct.anon, ptr %15, i32 0, i32 2
  %48 = getelementptr inbounds [1024 x i8], ptr %47, i64 0, i64 0
  store ptr %48, ptr %19, align 8, !tbaa !5
  %49 = load ptr, ptr %19, align 8, !tbaa !5
  %50 = getelementptr inbounds %struct.rtattr, ptr %49, i32 0, i32 1
  store i16 1, ptr %50, align 2, !tbaa !25
  %51 = load ptr, ptr %8, align 8, !tbaa !5
  %52 = getelementptr inbounds %struct.sockaddr_in, ptr %51, i32 0, i32 0
  %53 = load i16, ptr %52, align 4, !tbaa !21
  %54 = zext i16 %53 to i32
  %55 = icmp eq i32 2, %54
  br i1 %55, label %56, label %63

56:                                               ; preds = %38
  %57 = load ptr, ptr %19, align 8, !tbaa !5
  %58 = getelementptr inbounds %struct.rtattr, ptr %57, i32 0, i32 0
  store i16 8, ptr %58, align 2, !tbaa !27
  %59 = load ptr, ptr %19, align 8, !tbaa !5
  %60 = getelementptr inbounds i8, ptr %59, i64 4
  %61 = load ptr, ptr %8, align 8, !tbaa !5
  %62 = getelementptr inbounds %struct.sockaddr_in, ptr %61, i32 0, i32 2
  call void @llvm.memcpy.p0.p0.i64(ptr align 1 %60, ptr align 4 %62, i64 4, i1 false)
  br label %81

63:                                               ; preds = %38
  %64 = load ptr, ptr %9, align 8, !tbaa !5
  %65 = getelementptr inbounds %struct.sockaddr_in6, ptr %64, i32 0, i32 0
  %66 = load i16, ptr %65, align 4, !tbaa !28
  %67 = zext i16 %66 to i32
  %68 = icmp eq i32 10, %67
  br i1 %68, label %69, label %76

69:                                               ; preds = %63
  %70 = load ptr, ptr %19, align 8, !tbaa !5
  %71 = getelementptr inbounds %struct.rtattr, ptr %70, i32 0, i32 0
  store i16 20, ptr %71, align 2, !tbaa !27
  %72 = load ptr, ptr %19, align 8, !tbaa !5
  %73 = getelementptr inbounds i8, ptr %72, i64 4
  %74 = load ptr, ptr %9, align 8, !tbaa !5
  %75 = getelementptr inbounds %struct.sockaddr_in6, ptr %74, i32 0, i32 3
  call void @llvm.memcpy.p0.p0.i64(ptr align 1 %73, ptr align 4 %75, i64 16, i1 false)
  br label %80

76:                                               ; preds = %63
  %77 = load i32, ptr %12, align 4, !tbaa !9
  %78 = call i32 @close(i32 noundef %77)
  %79 = call noalias ptr @strdup(ptr noundef @.str) #6
  store ptr %79, ptr %3, align 8
  store i32 1, ptr %23, align 4
  br label %309

80:                                               ; preds = %69
  br label %81

81:                                               ; preds = %80, %56
  br label %87

82:                                               ; preds = %2
  %83 = call i32 (ptr, ...) @printf(ptr noundef @.str.1)
  %84 = load i32, ptr %12, align 4, !tbaa !9
  %85 = call i32 @close(i32 noundef %84)
  %86 = call noalias ptr @strdup(ptr noundef @.str.2) #6
  store ptr %86, ptr %3, align 8
  store i32 1, ptr %23, align 4
  br label %309

87:                                               ; preds = %81
  %88 = load ptr, ptr %19, align 8, !tbaa !5
  %89 = getelementptr inbounds %struct.rtattr, ptr %88, i32 0, i32 0
  %90 = load i16, ptr %89, align 2, !tbaa !27
  %91 = zext i16 %90 to i32
  %92 = getelementptr inbounds %struct.anon, ptr %15, i32 0, i32 0
  %93 = getelementptr inbounds %struct.nlmsghdr, ptr %92, i32 0, i32 0
  %94 = load i32, ptr %93, align 4, !tbaa !15
  %95 = add i32 %94, %91
  store i32 %95, ptr %93, align 4, !tbaa !15
  %96 = load ptr, ptr %4, align 8, !tbaa !5
  %97 = icmp ne ptr %96, null
  br i1 %97, label %98, label %149

98:                                               ; preds = %87
  %99 = load ptr, ptr %4, align 8, !tbaa !5
  store ptr %99, ptr %8, align 8, !tbaa !5
  %100 = load ptr, ptr %4, align 8, !tbaa !5
  store ptr %100, ptr %9, align 8, !tbaa !5
  %101 = load ptr, ptr %19, align 8, !tbaa !5
  %102 = load ptr, ptr %19, align 8, !tbaa !5
  %103 = getelementptr inbounds %struct.rtattr, ptr %102, i32 0, i32 0
  %104 = load i16, ptr %103, align 2, !tbaa !27
  %105 = zext i16 %104 to i32
  %106 = sext i32 %105 to i64
  %107 = getelementptr inbounds i8, ptr %101, i64 %106
  store ptr %107, ptr %19, align 8, !tbaa !5
  %108 = load ptr, ptr %19, align 8, !tbaa !5
  %109 = getelementptr inbounds %struct.rtattr, ptr %108, i32 0, i32 1
  store i16 2, ptr %109, align 2, !tbaa !25
  %110 = load ptr, ptr %8, align 8, !tbaa !5
  %111 = getelementptr inbounds %struct.sockaddr_in, ptr %110, i32 0, i32 0
  %112 = load i16, ptr %111, align 4, !tbaa !21
  %113 = zext i16 %112 to i32
  %114 = icmp eq i32 2, %113
  br i1 %114, label %115, label %122

115:                                              ; preds = %98
  %116 = load ptr, ptr %19, align 8, !tbaa !5
  %117 = getelementptr inbounds %struct.rtattr, ptr %116, i32 0, i32 0
  store i16 8, ptr %117, align 2, !tbaa !27
  %118 = load ptr, ptr %19, align 8, !tbaa !5
  %119 = getelementptr inbounds i8, ptr %118, i64 4
  %120 = load ptr, ptr %8, align 8, !tbaa !5
  %121 = getelementptr inbounds %struct.sockaddr_in, ptr %120, i32 0, i32 2
  call void @llvm.memcpy.p0.p0.i64(ptr align 1 %119, ptr align 4 %121, i64 4, i1 false)
  br label %140

122:                                              ; preds = %98
  %123 = load ptr, ptr %9, align 8, !tbaa !5
  %124 = getelementptr inbounds %struct.sockaddr_in6, ptr %123, i32 0, i32 0
  %125 = load i16, ptr %124, align 4, !tbaa !28
  %126 = zext i16 %125 to i32
  %127 = icmp eq i32 10, %126
  br i1 %127, label %128, label %135

128:                                              ; preds = %122
  %129 = load ptr, ptr %19, align 8, !tbaa !5
  %130 = getelementptr inbounds %struct.rtattr, ptr %129, i32 0, i32 0
  store i16 20, ptr %130, align 2, !tbaa !27
  %131 = load ptr, ptr %19, align 8, !tbaa !5
  %132 = getelementptr inbounds i8, ptr %131, i64 4
  %133 = load ptr, ptr %9, align 8, !tbaa !5
  %134 = getelementptr inbounds %struct.sockaddr_in6, ptr %133, i32 0, i32 3
  call void @llvm.memcpy.p0.p0.i64(ptr align 1 %132, ptr align 4 %134, i64 16, i1 false)
  br label %139

135:                                              ; preds = %122
  %136 = load i32, ptr %12, align 4, !tbaa !9
  %137 = call i32 @close(i32 noundef %136)
  %138 = call noalias ptr @strdup(ptr noundef @.str) #6
  store ptr %138, ptr %3, align 8
  store i32 1, ptr %23, align 4
  br label %309

139:                                              ; preds = %128
  br label %140

140:                                              ; preds = %139, %115
  %141 = load ptr, ptr %19, align 8, !tbaa !5
  %142 = getelementptr inbounds %struct.rtattr, ptr %141, i32 0, i32 0
  %143 = load i16, ptr %142, align 2, !tbaa !27
  %144 = zext i16 %143 to i32
  %145 = getelementptr inbounds %struct.anon, ptr %15, i32 0, i32 0
  %146 = getelementptr inbounds %struct.nlmsghdr, ptr %145, i32 0, i32 0
  %147 = load i32, ptr %146, align 4, !tbaa !15
  %148 = add i32 %147, %144
  store i32 %148, ptr %146, align 4, !tbaa !15
  br label %149

149:                                              ; preds = %140, %87
  call void @llvm.memset.p0.i64(ptr align 4 %7, i8 0, i64 12, i1 false)
  %150 = getelementptr inbounds %struct.sockaddr_nl, ptr %7, i32 0, i32 0
  store i16 16, ptr %150, align 4, !tbaa !11
  call void @llvm.memset.p0.i64(ptr align 8 %13, i8 0, i64 56, i1 false)
  %151 = getelementptr inbounds %struct.msghdr, ptr %13, i32 0, i32 0
  store ptr %7, ptr %151, align 8, !tbaa !31
  %152 = getelementptr inbounds %struct.msghdr, ptr %13, i32 0, i32 1
  store i32 12, ptr %152, align 8, !tbaa !34
  %153 = getelementptr inbounds %struct.anon, ptr %15, i32 0, i32 0
  %154 = getelementptr inbounds %struct.iovec, ptr %14, i32 0, i32 0
  store ptr %153, ptr %154, align 8, !tbaa !35
  %155 = getelementptr inbounds %struct.anon, ptr %15, i32 0, i32 0
  %156 = getelementptr inbounds %struct.nlmsghdr, ptr %155, i32 0, i32 0
  %157 = load i32, ptr %156, align 4, !tbaa !15
  %158 = zext i32 %157 to i64
  %159 = getelementptr inbounds %struct.iovec, ptr %14, i32 0, i32 1
  store i64 %158, ptr %159, align 8, !tbaa !37
  %160 = getelementptr inbounds %struct.msghdr, ptr %13, i32 0, i32 2
  store ptr %14, ptr %160, align 8, !tbaa !38
  %161 = getelementptr inbounds %struct.msghdr, ptr %13, i32 0, i32 3
  store i64 1, ptr %161, align 8, !tbaa !39
  %162 = load i32, ptr %12, align 4, !tbaa !9
  %163 = call i64 @sendmsg(i32 noundef %162, ptr noundef %13, i32 noundef 0)
  %164 = trunc i64 %163 to i32
  store i32 %164, ptr %22, align 4, !tbaa !9
  %165 = load i32, ptr %22, align 4, !tbaa !9
  %166 = icmp slt i32 %165, 0
  br i1 %166, label %167, label %171

167:                                              ; preds = %149
  %168 = load i32, ptr %12, align 4, !tbaa !9
  %169 = call i32 @close(i32 noundef %168)
  %170 = call noalias ptr @strdup(ptr noundef @.str.3) #6
  store ptr %170, ptr %3, align 8
  store i32 1, ptr %23, align 4
  br label %309

171:                                              ; preds = %149
  %172 = getelementptr inbounds [1024 x i8], ptr %16, i64 0, i64 0
  call void @llvm.memset.p0.i64(ptr align 16 %172, i8 0, i64 1024, i1 false)
  %173 = load i32, ptr %12, align 4, !tbaa !9
  %174 = getelementptr inbounds [1024 x i8], ptr %16, i64 0, i64 0
  %175 = call i64 @recv(i32 noundef %173, ptr noundef %174, i64 noundef 1024, i32 noundef 0)
  %176 = trunc i64 %175 to i32
  store i32 %176, ptr %22, align 4, !tbaa !9
  %177 = load i32, ptr %22, align 4, !tbaa !9
  %178 = icmp slt i32 %177, 0
  br i1 %178, label %179, label %183

179:                                              ; preds = %171
  %180 = load i32, ptr %12, align 4, !tbaa !9
  %181 = call i32 @close(i32 noundef %180)
  %182 = call noalias ptr @strdup(ptr noundef @.str.4) #6
  store ptr %182, ptr %3, align 8
  store i32 1, ptr %23, align 4
  br label %309

183:                                              ; preds = %171
  %184 = load i32, ptr %22, align 4, !tbaa !9
  store i32 %184, ptr %20, align 4, !tbaa !9
  %185 = getelementptr inbounds [1024 x i8], ptr %16, i64 0, i64 0
  store ptr %185, ptr %17, align 8, !tbaa !5
  br label %186

186:                                              ; preds = %272, %183
  %187 = load i32, ptr %20, align 4, !tbaa !9
  %188 = icmp sge i32 %187, 16
  br i1 %188, label %189, label %201

189:                                              ; preds = %186
  %190 = load ptr, ptr %17, align 8, !tbaa !5
  %191 = getelementptr inbounds %struct.nlmsghdr, ptr %190, i32 0, i32 0
  %192 = load i32, ptr %191, align 4, !tbaa !40
  %193 = zext i32 %192 to i64
  %194 = icmp uge i64 %193, 16
  br i1 %194, label %195, label %201

195:                                              ; preds = %189
  %196 = load ptr, ptr %17, align 8, !tbaa !5
  %197 = getelementptr inbounds %struct.nlmsghdr, ptr %196, i32 0, i32 0
  %198 = load i32, ptr %197, align 4, !tbaa !40
  %199 = load i32, ptr %20, align 4, !tbaa !9
  %200 = icmp ule i32 %198, %199
  br label %201

201:                                              ; preds = %195, %189, %186
  %202 = phi i1 [ false, %189 ], [ false, %186 ], [ %200, %195 ]
  br i1 %202, label %203, label %290

203:                                              ; preds = %201
  %204 = load ptr, ptr %17, align 8, !tbaa !5
  %205 = getelementptr inbounds i8, ptr %204, i64 16
  store ptr %205, ptr %18, align 8, !tbaa !5
  %206 = load ptr, ptr %18, align 8, !tbaa !5
  %207 = getelementptr inbounds i8, ptr %206, i64 12
  store ptr %207, ptr %19, align 8, !tbaa !5
  %208 = load ptr, ptr %17, align 8, !tbaa !5
  %209 = getelementptr inbounds %struct.nlmsghdr, ptr %208, i32 0, i32 0
  %210 = load i32, ptr %209, align 4, !tbaa !40
  %211 = zext i32 %210 to i64
  %212 = sub i64 %211, 28
  %213 = trunc i64 %212 to i32
  store i32 %213, ptr %21, align 4, !tbaa !9
  br label %214

214:                                              ; preds = %251, %203
  %215 = load i32, ptr %21, align 4, !tbaa !9
  %216 = icmp sge i32 %215, 4
  br i1 %216, label %217, label %230

217:                                              ; preds = %214
  %218 = load ptr, ptr %19, align 8, !tbaa !5
  %219 = getelementptr inbounds %struct.rtattr, ptr %218, i32 0, i32 0
  %220 = load i16, ptr %219, align 2, !tbaa !27
  %221 = zext i16 %220 to i64
  %222 = icmp uge i64 %221, 4
  br i1 %222, label %223, label %230

223:                                              ; preds = %217
  %224 = load ptr, ptr %19, align 8, !tbaa !5
  %225 = getelementptr inbounds %struct.rtattr, ptr %224, i32 0, i32 0
  %226 = load i16, ptr %225, align 2, !tbaa !27
  %227 = zext i16 %226 to i32
  %228 = load i32, ptr %21, align 4, !tbaa !9
  %229 = icmp sle i32 %227, %228
  br label %230

230:                                              ; preds = %223, %217, %214
  %231 = phi i1 [ false, %217 ], [ false, %214 ], [ %229, %223 ]
  br i1 %231, label %232, label %271

232:                                              ; preds = %230
  %233 = load ptr, ptr %19, align 8, !tbaa !5
  %234 = getelementptr inbounds %struct.rtattr, ptr %233, i32 0, i32 1
  %235 = load i16, ptr %234, align 2, !tbaa !25
  %236 = zext i16 %235 to i32
  %237 = icmp eq i32 4, %236
  br i1 %237, label %238, label %250

238:                                              ; preds = %232
  %239 = load i32, ptr %10, align 4, !tbaa !9
  %240 = icmp eq i32 -1, %239
  br i1 %240, label %241, label %245

241:                                              ; preds = %238
  %242 = load ptr, ptr %19, align 8, !tbaa !5
  %243 = getelementptr inbounds i8, ptr %242, i64 4
  %244 = load i32, ptr %243, align 4, !tbaa !9
  store i32 %244, ptr %10, align 4, !tbaa !9
  br label %249

245:                                              ; preds = %238
  %246 = load i32, ptr %12, align 4, !tbaa !9
  %247 = call i32 @close(i32 noundef %246)
  %248 = call noalias ptr @strdup(ptr noundef @.str.5) #6
  store ptr %248, ptr %3, align 8
  store i32 1, ptr %23, align 4
  br label %309

249:                                              ; preds = %241
  br label %250

250:                                              ; preds = %249, %232
  br label %251

251:                                              ; preds = %250
  %252 = load ptr, ptr %19, align 8, !tbaa !5
  %253 = getelementptr inbounds %struct.rtattr, ptr %252, i32 0, i32 0
  %254 = load i16, ptr %253, align 2, !tbaa !27
  %255 = zext i16 %254 to i32
  %256 = add i32 %255, 4
  %257 = sub i32 %256, 1
  %258 = and i32 %257, -4
  %259 = load i32, ptr %21, align 4, !tbaa !9
  %260 = sub i32 %259, %258
  store i32 %260, ptr %21, align 4, !tbaa !9
  %261 = load ptr, ptr %19, align 8, !tbaa !5
  %262 = load ptr, ptr %19, align 8, !tbaa !5
  %263 = getelementptr inbounds %struct.rtattr, ptr %262, i32 0, i32 0
  %264 = load i16, ptr %263, align 2, !tbaa !27
  %265 = zext i16 %264 to i32
  %266 = add i32 %265, 4
  %267 = sub i32 %266, 1
  %268 = and i32 %267, -4
  %269 = zext i32 %268 to i64
  %270 = getelementptr inbounds i8, ptr %261, i64 %269
  store ptr %270, ptr %19, align 8, !tbaa !5
  br label %214, !llvm.loop !41

271:                                              ; preds = %230
  br label %272

272:                                              ; preds = %271
  %273 = load ptr, ptr %17, align 8, !tbaa !5
  %274 = getelementptr inbounds %struct.nlmsghdr, ptr %273, i32 0, i32 0
  %275 = load i32, ptr %274, align 4, !tbaa !40
  %276 = add i32 %275, 4
  %277 = sub i32 %276, 1
  %278 = and i32 %277, -4
  %279 = load i32, ptr %20, align 4, !tbaa !9
  %280 = sub i32 %279, %278
  store i32 %280, ptr %20, align 4, !tbaa !9
  %281 = load ptr, ptr %17, align 8, !tbaa !5
  %282 = load ptr, ptr %17, align 8, !tbaa !5
  %283 = getelementptr inbounds %struct.nlmsghdr, ptr %282, i32 0, i32 0
  %284 = load i32, ptr %283, align 4, !tbaa !40
  %285 = add i32 %284, 4
  %286 = sub i32 %285, 1
  %287 = and i32 %286, -4
  %288 = zext i32 %287 to i64
  %289 = getelementptr inbounds i8, ptr %281, i64 %288
  store ptr %289, ptr %17, align 8, !tbaa !5
  br label %186, !llvm.loop !43

290:                                              ; preds = %201
  %291 = load i32, ptr %10, align 4, !tbaa !9
  %292 = icmp eq i32 %291, -1
  br i1 %292, label %293, label %295

293:                                              ; preds = %290
  %294 = call noalias ptr @strdup(ptr noundef @.str.6) #6
  store ptr %294, ptr %3, align 8
  store i32 1, ptr %23, align 4
  br label %309

295:                                              ; preds = %290
  %296 = load i32, ptr %10, align 4, !tbaa !9
  %297 = getelementptr inbounds [16 x i8], ptr %11, i64 0, i64 0
  %298 = call ptr @if_indextoname(i32 noundef %296, ptr noundef %297) #6
  %299 = icmp eq ptr null, %298
  br i1 %299, label %300, label %304

300:                                              ; preds = %295
  %301 = load i32, ptr %12, align 4, !tbaa !9
  %302 = call i32 @close(i32 noundef %301)
  %303 = call noalias ptr @strdup(ptr noundef @.str.7) #6
  store ptr %303, ptr %3, align 8
  store i32 1, ptr %23, align 4
  br label %309

304:                                              ; preds = %295
  %305 = load i32, ptr %12, align 4, !tbaa !9
  %306 = call i32 @close(i32 noundef %305)
  %307 = getelementptr inbounds [16 x i8], ptr %11, i64 0, i64 0
  %308 = call noalias ptr @strdup(ptr noundef %307) #6
  store ptr %308, ptr %3, align 8
  store i32 1, ptr %23, align 4
  br label %309

309:                                              ; preds = %304, %300, %293, %245, %179, %167, %135, %82, %76
  call void @llvm.lifetime.end.p0(i64 4, ptr %22) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %21) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %20) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %19) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %18) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #6
  call void @llvm.lifetime.end.p0(i64 1024, ptr %16) #6
  call void @llvm.lifetime.end.p0(i64 1052, ptr %15) #6
  call void @llvm.lifetime.end.p0(i64 16, ptr %14) #6
  call void @llvm.lifetime.end.p0(i64 56, ptr %13) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #6
  call void @llvm.lifetime.end.p0(i64 16, ptr %11) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #6
  call void @llvm.lifetime.end.p0(i64 12, ptr %7) #6
  call void @llvm.lifetime.end.p0(i64 12, ptr %6) #6
  %310 = load ptr, ptr %3, align 8
  ret ptr %310
}

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

; Function Attrs: nounwind
declare i32 @socket(i32 noundef, i32 noundef, i32 noundef) #2

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

; Function Attrs: nounwind
declare i32 @getpid() #2

; Function Attrs: nounwind
declare i32 @bind(i32 noundef, ptr noundef, i32 noundef) #2

; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: readwrite)
declare void @llvm.memcpy.p0.p0.i64(ptr noalias nocapture writeonly, ptr noalias nocapture readonly, i64, i1 immarg) #4

declare i32 @close(i32 noundef) #5

; Function Attrs: nounwind
declare noalias ptr @strdup(ptr noundef) #2

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

declare i64 @sendmsg(i32 noundef, ptr noundef, i32 noundef) #5

declare i64 @recv(i32 noundef, ptr noundef, i64 noundef, i32 noundef) #5

; Function Attrs: nounwind
declare ptr @if_indextoname(i32 noundef, ptr noundef) #2

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

attributes #0 = { 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 #1 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { 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 = { nocallback nofree nounwind willreturn memory(argmem: write) }
attributes #4 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #5 = { "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 #6 = { 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 = !{!"int", !7, i64 0}
!11 = !{!12, !13, i64 0}
!12 = !{!"sockaddr_nl", !13, i64 0, !13, i64 2, !10, i64 4, !10, i64 8}
!13 = !{!"short", !7, i64 0}
!14 = !{!12, !10, i64 4}
!15 = !{!16, !10, i64 0}
!16 = !{!"", !17, i64 0, !18, i64 16, !7, i64 28}
!17 = !{!"nlmsghdr", !10, i64 0, !13, i64 4, !13, i64 6, !10, i64 8, !10, i64 12}
!18 = !{!"rtmsg", !7, i64 0, !7, i64 1, !7, i64 2, !7, i64 3, !7, i64 4, !7, i64 5, !7, i64 6, !7, i64 7, !10, i64 8}
!19 = !{!16, !13, i64 6}
!20 = !{!16, !13, i64 4}
!21 = !{!22, !13, i64 0}
!22 = !{!"sockaddr_in", !13, i64 0, !13, i64 2, !23, i64 4, !7, i64 8}
!23 = !{!"in_addr", !10, i64 0}
!24 = !{!16, !7, i64 16}
!25 = !{!26, !13, i64 2}
!26 = !{!"rtattr", !13, i64 0, !13, i64 2}
!27 = !{!26, !13, i64 0}
!28 = !{!29, !13, i64 0}
!29 = !{!"sockaddr_in6", !13, i64 0, !13, i64 2, !10, i64 4, !30, i64 8, !10, i64 24}
!30 = !{!"in6_addr", !7, i64 0}
!31 = !{!32, !6, i64 0}
!32 = !{!"msghdr", !6, i64 0, !10, i64 8, !6, i64 16, !33, i64 24, !6, i64 32, !33, i64 40, !10, i64 48}
!33 = !{!"long", !7, i64 0}
!34 = !{!32, !10, i64 8}
!35 = !{!36, !6, i64 0}
!36 = !{!"iovec", !6, i64 0, !33, i64 8}
!37 = !{!36, !33, i64 8}
!38 = !{!32, !6, i64 16}
!39 = !{!32, !33, i64 24}
!40 = !{!17, !10, i64 0}
!41 = distinct !{!41, !42}
!42 = !{!"llvm.loop.mustprogress"}
!43 = distinct !{!43, !42}


; 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.sockaddr_nl = type { i16, i16, i32, i32 }
%struct.msghdr = type { ptr, i32, ptr, i64, ptr, i64, i32 }
%struct.iovec = type { ptr, i64 }
%struct.anon = type { %struct.nlmsghdr, %struct.rtmsg, [1024 x i8] }
%struct.nlmsghdr = type { i32, i16, i16, i32, i32 }
%struct.rtmsg = type { i8, i8, i8, i8, i8, i8, i8, i8, i32 }

@.str = external hidden unnamed_addr constant [21 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [27 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [14 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [15 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [15 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [24 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [18 x i8], align 1
@.str.7 = external hidden unnamed_addr constant [21 x i8], align 1

; Function Attrs: nounwind uwtable
define dso_local noalias ptr @find_egress_interface(ptr noundef readonly %0, ptr noundef readonly %1) local_unnamed_addr #0 {
  %3 = alloca %struct.sockaddr_nl, align 4
  %4 = alloca %struct.sockaddr_nl, align 4
  %5 = alloca [16 x i8], align 16
  %6 = alloca %struct.msghdr, align 8
  %7 = alloca %struct.iovec, align 8
  %8 = alloca %struct.anon, align 4
  %9 = alloca [1024 x i8], align 16
  call void @llvm.lifetime.start.p0(i64 12, ptr nonnull %3) #8
  call void @llvm.lifetime.start.p0(i64 12, ptr nonnull %4) #8
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %5) #8
  call void @llvm.lifetime.start.p0(i64 56, ptr nonnull %6) #8
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %7) #8
  call void @llvm.lifetime.start.p0(i64 1052, ptr nonnull %8) #8
  call void @llvm.lifetime.start.p0(i64 1024, ptr nonnull %9) #8
  %10 = tail call i32 @socket(i32 noundef 16, i32 noundef 3, i32 noundef 0) #8
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 4 dereferenceable(12) %3, i8 0, i64 12, i1 false)
  store i16 16, ptr %3, align 4, !tbaa !5
  %11 = tail call i32 @getpid() #8
  %12 = getelementptr inbounds i8, ptr %3, i64 4
  store i32 %11, ptr %12, align 4, !tbaa !11
  %13 = call i32 @bind(i32 noundef %10, ptr noundef nonnull %3, i32 noundef 12) #8
  %14 = getelementptr inbounds i8, ptr %8, i64 8
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 4 dereferenceable(1052) %14, i8 0, i64 1044, i1 false)
  %15 = getelementptr inbounds i8, ptr %8, i64 6
  store i16 1, ptr %15, align 2, !tbaa !12
  %16 = getelementptr inbounds i8, ptr %8, i64 4
  store i16 26, ptr %16, align 4, !tbaa !16
  %.not = icmp eq ptr %1, null
  br i1 %.not, label %32, label %17

17:                                               ; preds = %2
  %18 = load i16, ptr %1, align 4, !tbaa !17
  %19 = trunc i16 %18 to i8
  %20 = getelementptr inbounds i8, ptr %8, i64 16
  store i8 %19, ptr %20, align 4, !tbaa !18
  %21 = getelementptr inbounds i8, ptr %8, i64 28
  %22 = getelementptr inbounds i8, ptr %8, i64 30
  store i16 1, ptr %22, align 2, !tbaa !19
  switch i16 %18, label %30 [
    i16 2, label %23
    i16 10, label %27
  ]

23:                                               ; preds = %17
  store i16 8, ptr %21, align 4, !tbaa !21
  %24 = getelementptr inbounds i8, ptr %8, i64 32
  %25 = getelementptr inbounds i8, ptr %1, i64 4
  %26 = load i32, ptr %25, align 4
  store i32 %26, ptr %24, align 4
  br label %35

27:                                               ; preds = %17
  store i16 20, ptr %21, align 4, !tbaa !21
  %28 = getelementptr inbounds i8, ptr %8, i64 32
  %29 = getelementptr inbounds i8, ptr %1, i64 8
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 4 dereferenceable(16) %28, ptr noundef nonnull align 4 dereferenceable(16) %29, i64 16, i1 false)
  br label %35

30:                                               ; preds = %17
  %31 = call i32 @close(i32 noundef %10) #8
  br label %.critedge.thread

32:                                               ; preds = %2
  %33 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1)
  %34 = call i32 @close(i32 noundef %10) #8
  br label %.critedge.thread

35:                                               ; preds = %23, %27
  %36 = phi i16 [ 8, %23 ], [ 20, %27 ]
  %narrow = add nuw nsw i16 %36, 28
  %37 = zext nneg i16 %narrow to i32
  store i32 %37, ptr %8, align 4, !tbaa !22
  %.not80 = icmp eq ptr %0, null
  br i1 %.not80, label %55, label %38

38:                                               ; preds = %35
  %39 = zext nneg i16 %36 to i64
  %40 = getelementptr inbounds i8, ptr %21, i64 %39
  %41 = getelementptr inbounds i8, ptr %40, i64 2
  store i16 2, ptr %41, align 2, !tbaa !19
  %42 = load i16, ptr %0, align 4, !tbaa !17
  switch i16 %42, label %50 [
    i16 2, label %43
    i16 10, label %47
  ]

43:                                               ; preds = %38
  store i16 8, ptr %40, align 4, !tbaa !21
  %44 = getelementptr inbounds i8, ptr %40, i64 4
  %45 = getelementptr inbounds i8, ptr %0, i64 4
  %46 = load i32, ptr %45, align 4
  store i32 %46, ptr %44, align 4
  br label %52

47:                                               ; preds = %38
  store i16 20, ptr %40, align 4, !tbaa !21
  %48 = getelementptr inbounds i8, ptr %40, i64 4
  %49 = getelementptr inbounds i8, ptr %0, i64 8
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 4 dereferenceable(16) %48, ptr noundef nonnull align 4 dereferenceable(16) %49, i64 16, i1 false)
  br label %52

50:                                               ; preds = %38
  %51 = call i32 @close(i32 noundef %10) #8
  br label %.critedge.thread

52:                                               ; preds = %47, %43
  %53 = phi i32 [ 20, %47 ], [ 8, %43 ]
  %54 = add nuw nsw i32 %53, %37
  store i32 %54, ptr %8, align 4, !tbaa !22
  br label %55

55:                                               ; preds = %52, %35
  %56 = phi i32 [ %54, %52 ], [ %37, %35 ]
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 4 dereferenceable(12) %4, i8 0, i64 12, i1 false)
  store i16 16, ptr %4, align 4, !tbaa !5
  %57 = getelementptr inbounds i8, ptr %6, i64 8
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(56) %57, i8 0, i64 48, i1 false)
  store ptr %4, ptr %6, align 8, !tbaa !23
  %58 = getelementptr inbounds i8, ptr %6, i64 8
  store i32 12, ptr %58, align 8, !tbaa !27
  store ptr %8, ptr %7, align 8, !tbaa !28
  %59 = zext nneg i32 %56 to i64
  %60 = getelementptr inbounds i8, ptr %7, i64 8
  store i64 %59, ptr %60, align 8, !tbaa !30
  %61 = getelementptr inbounds i8, ptr %6, i64 16
  store ptr %7, ptr %61, align 8, !tbaa !31
  %62 = getelementptr inbounds i8, ptr %6, i64 24
  store i64 1, ptr %62, align 8, !tbaa !32
  %63 = call i64 @sendmsg(i32 noundef %10, ptr noundef nonnull %6, i32 noundef 0) #8
  %64 = and i64 %63, 2147483648
  %.not81 = icmp eq i64 %64, 0
  br i1 %.not81, label %67, label %65

65:                                               ; preds = %55
  %66 = call i32 @close(i32 noundef %10) #8
  br label %.critedge.thread

67:                                               ; preds = %55
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 16 dereferenceable(1024) %9, i8 0, i64 1024, i1 false)
  %68 = call i64 @recv(i32 noundef %10, ptr noundef nonnull %9, i64 noundef 1024, i32 noundef 0) #8
  %69 = trunc i64 %68 to i32
  %70 = icmp slt i32 %69, 0
  br i1 %70, label %72, label %.preheader

.preheader:                                       ; preds = %67
  %71 = icmp ugt i32 %69, 15
  br i1 %71, label %.lr.ph95, label %.critedge.thread

72:                                               ; preds = %67
  %73 = call i32 @close(i32 noundef %10) #8
  br label %.critedge.thread

.lr.ph95:                                         ; preds = %.preheader, %.critedge2
  %.06994 = phi i32 [ %103, %.critedge2 ], [ %69, %.preheader ]
  %.07293 = phi ptr [ %105, %.critedge2 ], [ %9, %.preheader ]
  %.07392 = phi i32 [ %.1.lcssa, %.critedge2 ], [ -1, %.preheader ]
  %74 = load i32, ptr %.07293, align 4, !tbaa !33
  %75 = icmp ult i32 %74, 16
  %.not82 = icmp ugt i32 %74, %.06994
  %or.cond = or i1 %75, %.not82
  br i1 %or.cond, label %.critedge, label %76

76:                                               ; preds = %.lr.ph95
  %77 = icmp sgt i32 %74, 31
  br i1 %77, label %.lr.ph.preheader, label %.critedge2

.lr.ph.preheader:                                 ; preds = %76
  %78 = add nsw i32 %74, -28
  %79 = getelementptr inbounds i8, ptr %.07293, i64 28
  br label %.lr.ph

.lr.ph:                                           ; preds = %.lr.ph.preheader, %94
  %.089 = phi i32 [ %97, %94 ], [ %78, %.lr.ph.preheader ]
  %.07088 = phi ptr [ %99, %94 ], [ %79, %.lr.ph.preheader ]
  %.187 = phi i32 [ %.2, %94 ], [ %.07392, %.lr.ph.preheader ]
  %80 = load i16, ptr %.07088, align 2, !tbaa !21
  %81 = icmp ult i16 %80, 4
  %82 = zext i16 %80 to i32
  %.not83 = icmp ult i32 %.089, %82
  %or.cond84 = or i1 %81, %.not83
  br i1 %or.cond84, label %.critedge2, label %83

83:                                               ; preds = %.lr.ph
  %84 = getelementptr inbounds i8, ptr %.07088, i64 2
  %85 = load i16, ptr %84, align 2, !tbaa !19
  %86 = icmp eq i16 %85, 4
  br i1 %86, label %87, label %94

87:                                               ; preds = %83
  %88 = icmp eq i32 %.187, -1
  br i1 %88, label %89, label %92

89:                                               ; preds = %87
  %90 = getelementptr inbounds i8, ptr %.07088, i64 4
  %91 = load i32, ptr %90, align 4, !tbaa !34
  br label %94

92:                                               ; preds = %87
  %93 = call i32 @close(i32 noundef %10) #8
  br label %.critedge.thread

94:                                               ; preds = %83, %89
  %.2 = phi i32 [ %91, %89 ], [ %.187, %83 ]
  %95 = add nuw nsw i32 %82, 3
  %96 = and i32 %95, 131068
  %97 = sub nsw i32 %.089, %96
  %98 = zext nneg i32 %96 to i64
  %99 = getelementptr inbounds i8, ptr %.07088, i64 %98
  %100 = icmp sgt i32 %97, 3
  br i1 %100, label %.lr.ph, label %.critedge2, !llvm.loop !35

.critedge2:                                       ; preds = %.lr.ph, %94, %76
  %.1.lcssa = phi i32 [ %.07392, %76 ], [ %.2, %94 ], [ %.187, %.lr.ph ]
  %101 = add i32 %74, 3
  %102 = and i32 %101, -4
  %103 = sub i32 %.06994, %102
  %104 = zext i32 %102 to i64
  %105 = getelementptr inbounds i8, ptr %.07293, i64 %104
  %106 = icmp sgt i32 %103, 15
  br i1 %106, label %.lr.ph95, label %.critedge, !llvm.loop !37

.critedge:                                        ; preds = %.critedge2, %.lr.ph95
  %.073.lcssa = phi i32 [ %.1.lcssa, %.critedge2 ], [ %.07392, %.lr.ph95 ]
  %107 = icmp eq i32 %.073.lcssa, -1
  br i1 %107, label %.critedge.thread, label %108

108:                                              ; preds = %.critedge
  %109 = call ptr @if_indextoname(i32 noundef %.073.lcssa, ptr noundef nonnull %5) #8
  %110 = icmp eq ptr %109, null
  %111 = call i32 @close(i32 noundef %10) #8
  %.str.7. = select i1 %110, ptr @.str.7, ptr %5
  br label %.critedge.thread

.critedge.thread:                                 ; preds = %108, %.critedge, %.preheader, %92, %72, %65, %50, %32, %30
  %.sink = phi ptr [ @.str.5, %92 ], [ @.str.4, %72 ], [ @.str.3, %65 ], [ @.str, %50 ], [ @.str.2, %32 ], [ @.str, %30 ], [ @.str.6, %.preheader ], [ @.str.6, %.critedge ], [ %.str.7., %108 ]
  %112 = call noalias ptr @strdup(ptr noundef nonnull %.sink) #8
  call void @llvm.lifetime.end.p0(i64 1024, ptr nonnull %9) #8
  call void @llvm.lifetime.end.p0(i64 1052, ptr nonnull %8) #8
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %7) #8
  call void @llvm.lifetime.end.p0(i64 56, ptr nonnull %6) #8
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %5) #8
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %4) #8
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %3) #8
  ret ptr %112
}

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

; Function Attrs: nounwind
declare i32 @socket(i32 noundef, i32 noundef, i32 noundef) local_unnamed_addr #2

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

; Function Attrs: nounwind
declare i32 @getpid() local_unnamed_addr #2

; Function Attrs: nounwind
declare i32 @bind(i32 noundef, ptr noundef, i32 noundef) local_unnamed_addr #2

; Function Attrs: mustprogress nocallback nofree nounwind willreturn memory(argmem: readwrite)
declare void @llvm.memcpy.p0.p0.i64(ptr noalias nocapture writeonly, ptr noalias nocapture readonly, i64, i1 immarg) #4

declare i32 @close(i32 noundef) local_unnamed_addr #5

; Function Attrs: mustprogress nofree nounwind willreturn memory(argmem: readwrite, inaccessiblemem: readwrite)
declare noalias ptr @strdup(ptr nocapture noundef readonly) local_unnamed_addr #6

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

declare i64 @sendmsg(i32 noundef, ptr noundef, i32 noundef) local_unnamed_addr #5

declare i64 @recv(i32 noundef, ptr noundef, i64 noundef, i32 noundef) local_unnamed_addr #5

; Function Attrs: nounwind
declare ptr @if_indextoname(i32 noundef, ptr noundef) 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) #1

attributes #0 = { 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 #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { 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 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: write) }
attributes #4 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #5 = { "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 #6 = { mustprogress nofree nounwind willreturn memory(argmem: readwrite, inaccessiblemem: readwrite) "alloc-family"="malloc" "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 #7 = { 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 #8 = { 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 = !{!"sockaddr_nl", !7, i64 0, !7, i64 2, !10, i64 4, !10, i64 8}
!7 = !{!"short", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C/C++ TBAA"}
!10 = !{!"int", !8, i64 0}
!11 = !{!6, !10, i64 4}
!12 = !{!13, !7, i64 6}
!13 = !{!"", !14, i64 0, !15, i64 16, !8, i64 28}
!14 = !{!"nlmsghdr", !10, i64 0, !7, i64 4, !7, i64 6, !10, i64 8, !10, i64 12}
!15 = !{!"rtmsg", !8, i64 0, !8, i64 1, !8, i64 2, !8, i64 3, !8, i64 4, !8, i64 5, !8, i64 6, !8, i64 7, !10, i64 8}
!16 = !{!13, !7, i64 4}
!17 = !{!7, !7, i64 0}
!18 = !{!13, !8, i64 16}
!19 = !{!20, !7, i64 2}
!20 = !{!"rtattr", !7, i64 0, !7, i64 2}
!21 = !{!20, !7, i64 0}
!22 = !{!13, !10, i64 0}
!23 = !{!24, !25, i64 0}
!24 = !{!"msghdr", !25, i64 0, !10, i64 8, !25, i64 16, !26, i64 24, !25, i64 32, !26, i64 40, !10, i64 48}
!25 = !{!"any pointer", !8, i64 0}
!26 = !{!"long", !8, i64 0}
!27 = !{!24, !10, i64 8}
!28 = !{!29, !25, i64 0}
!29 = !{!"iovec", !25, i64 0, !26, i64 8}
!30 = !{!29, !26, i64 8}
!31 = !{!24, !25, i64 16}
!32 = !{!24, !26, i64 24}
!33 = !{!14, !10, i64 0}
!34 = !{!10, !10, i64 0}
!35 = distinct !{!35, !36}
!36 = !{!"llvm.loop.mustprogress"}
!37 = distinct !{!37, !36}


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