; LLVM IR from pandax381/microps :: tcp (tcp_connect)

; 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"

%union.pthread_mutex_t = type { %struct.__pthread_mutex_s }
%struct.__pthread_mutex_s = type { i32, i32, i32, i32, i32, i16, i16, %struct.__pthread_internal_list }
%struct.__pthread_internal_list = type { ptr, ptr }
%struct.ip_endpoint = type { i32, i16 }
%struct.tcp_pcb = type { i32, i32, %struct.ip_endpoint, %struct.ip_endpoint, %struct.anon, i32, %struct.anon.0, i32, i16, i16, [65535 x i8], %struct.sched_ctx, %struct.queue_head, %struct.timeval, ptr, %struct.queue_head }
%struct.anon = type { i32, i32, i16, i16, i32, i32 }
%struct.anon.0 = type { i32, i16, i16 }
%struct.sched_ctx = type { %union.pthread_cond_t, i32, i32 }
%union.pthread_cond_t = type { %struct.__pthread_cond_s }
%struct.__pthread_cond_s = type { %union.__atomic_wide_counter, %union.__atomic_wide_counter, [2 x i32], [2 x i32], i32, i32, [2 x i32] }
%union.__atomic_wide_counter = type { i64 }
%struct.timeval = type { i64, i64 }
%struct.queue_head = type { ptr, ptr, i32 }
%struct.ip_iface = type { %struct.net_iface, ptr, i32, i32, i32 }
%struct.net_iface = type { ptr, ptr, i32 }

@stderr = external global ptr, align 8
@.str.1 = external hidden unnamed_addr constant [57 x i8], align 1
@mutex = external hidden global %union.pthread_mutex_t, align 8
@.str.8 = external hidden unnamed_addr constant [21 x i8], align 1
@.str.9 = external hidden unnamed_addr constant [12 x i8], align 1
@.str.10 = external hidden unnamed_addr constant [15 x i8], align 1
@.str.12 = external hidden unnamed_addr constant [14 x i8], align 1
@__func__.tcp_connect = external hidden unnamed_addr constant [12 x i8], align 1
@.str.14 = external hidden unnamed_addr constant [26 x i8], align 1
@IP_ADDR_ANY = external constant i32, align 4
@.str.15 = external hidden unnamed_addr constant [29 x i8], align 1
@.str.16 = external hidden unnamed_addr constant [26 x i8], align 1
@.str.17 = external hidden unnamed_addr constant [31 x i8], align 1
@.str.18 = external hidden unnamed_addr constant [37 x i8], align 1

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

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

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

; Function Attrs: inlinehint nounwind uwtable
declare hidden i32 @mutex_lock(ptr noundef) #2

; Function Attrs: inlinehint nounwind uwtable
declare hidden i32 @mutex_unlock(ptr noundef) #2

; Function Attrs: nounwind
declare i64 @random() #3

; Function Attrs: nounwind uwtable
declare hidden i64 @tcp_output(ptr noundef, i8 noundef zeroext, ptr noundef, i64 noundef) #4

; Function Attrs: nounwind uwtable
declare hidden void @tcp_pcb_release(ptr noundef) #4

declare i32 @sched_sleep(ptr noundef, ptr noundef, ptr noundef) #1

; Function Attrs: nounwind willreturn memory(none)
declare ptr @__errno_location() #5

; Function Attrs: nounwind uwtable
declare hidden i32 @tcp_pcb_id(ptr noundef) #4

; Function Attrs: nounwind uwtable
declare hidden ptr @tcp_pcb_get(i32 noundef) #4

; Function Attrs: nounwind uwtable
define dso_local i32 @tcp_connect(i32 noundef %0, ptr noundef %1) #4 {
  %3 = alloca i32, align 4
  %4 = alloca i32, align 4
  %5 = alloca ptr, align 8
  %6 = alloca ptr, align 8
  %7 = alloca %struct.ip_endpoint, align 4
  %8 = alloca ptr, align 8
  %9 = alloca [16 x i8], align 16
  %10 = alloca i32, align 4
  %11 = alloca i32, align 4
  %12 = alloca i32, align 4
  store i32 %0, ptr %4, align 4, !tbaa !5
  store ptr %1, ptr %5, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %6) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #6
  call void @llvm.lifetime.start.p0(i64 16, ptr %9) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #6
  %13 = call i32 @mutex_lock(ptr noundef @mutex)
  %14 = load i32, ptr %4, align 4, !tbaa !5
  %15 = call ptr @tcp_pcb_get(i32 noundef %14)
  store ptr %15, ptr %6, align 8, !tbaa !9
  %16 = load ptr, ptr %6, align 8, !tbaa !9
  %17 = icmp ne ptr %16, null
  br i1 %17, label %22, label %18

18:                                               ; preds = %2
  %19 = load ptr, ptr @stderr, align 8, !tbaa !9
  %20 = call i32 (ptr, i32, ptr, i32, ptr, ptr, ...) @lprintf(ptr noundef %19, i32 noundef 69, ptr noundef @.str.1, i32 noundef 1021, ptr noundef @__func__.tcp_connect, ptr noundef @.str.12)
  %21 = call i32 @mutex_unlock(ptr noundef @mutex)
  store i32 -1, ptr %3, align 4
  store i32 1, ptr %12, align 4
  br label %215

22:                                               ; preds = %2
  %23 = load ptr, ptr %6, align 8, !tbaa !9
  %24 = getelementptr inbounds %struct.tcp_pcb, ptr %23, i32 0, i32 1
  %25 = load i32, ptr %24, align 4, !tbaa !11
  %26 = icmp ne i32 %25, 2
  br i1 %26, label %27, label %31

27:                                               ; preds = %22
  %28 = load ptr, ptr @stderr, align 8, !tbaa !9
  %29 = call i32 (ptr, i32, ptr, i32, ptr, ptr, ...) @lprintf(ptr noundef %28, i32 noundef 69, ptr noundef @.str.1, i32 noundef 1026, ptr noundef @__func__.tcp_connect, ptr noundef @.str.14)
  %30 = call i32 @mutex_unlock(ptr noundef @mutex)
  store i32 -1, ptr %3, align 4
  store i32 1, ptr %12, align 4
  br label %215

31:                                               ; preds = %22
  %32 = load ptr, ptr %6, align 8, !tbaa !9
  %33 = getelementptr inbounds %struct.tcp_pcb, ptr %32, i32 0, i32 2
  %34 = getelementptr inbounds %struct.ip_endpoint, ptr %33, i32 0, i32 0
  %35 = load i32, ptr %34, align 8, !tbaa !21
  %36 = getelementptr inbounds %struct.ip_endpoint, ptr %7, i32 0, i32 0
  store i32 %35, ptr %36, align 4, !tbaa !22
  %37 = load ptr, ptr %6, align 8, !tbaa !9
  %38 = getelementptr inbounds %struct.tcp_pcb, ptr %37, i32 0, i32 2
  %39 = getelementptr inbounds %struct.ip_endpoint, ptr %38, i32 0, i32 1
  %40 = load i16, ptr %39, align 4, !tbaa !23
  %41 = getelementptr inbounds %struct.ip_endpoint, ptr %7, i32 0, i32 1
  store i16 %40, ptr %41, align 4, !tbaa !24
  %42 = getelementptr inbounds %struct.ip_endpoint, ptr %7, i32 0, i32 0
  %43 = load i32, ptr %42, align 4, !tbaa !22
  %44 = load i32, ptr @IP_ADDR_ANY, align 4, !tbaa !5
  %45 = icmp eq i32 %43, %44
  br i1 %45, label %46, label %69

46:                                               ; preds = %31
  %47 = load ptr, ptr %5, align 8, !tbaa !9
  %48 = getelementptr inbounds %struct.ip_endpoint, ptr %47, i32 0, i32 0
  %49 = load i32, ptr %48, align 4, !tbaa !22
  %50 = call ptr @ip_route_get_iface(i32 noundef %49)
  store ptr %50, ptr %8, align 8, !tbaa !9
  %51 = load ptr, ptr %8, align 8, !tbaa !9
  %52 = icmp ne ptr %51, null
  br i1 %52, label %57, label %53

53:                                               ; preds = %46
  %54 = load ptr, ptr @stderr, align 8, !tbaa !9
  %55 = call i32 (ptr, i32, ptr, i32, ptr, ptr, ...) @lprintf(ptr noundef %54, i32 noundef 69, ptr noundef @.str.1, i32 noundef 1035, ptr noundef @__func__.tcp_connect, ptr noundef @.str.15)
  %56 = call i32 @mutex_unlock(ptr noundef @mutex)
  store i32 -1, ptr %3, align 4
  store i32 1, ptr %12, align 4
  br label %215

57:                                               ; preds = %46
  %58 = load ptr, ptr @stderr, align 8, !tbaa !9
  %59 = load ptr, ptr %8, align 8, !tbaa !9
  %60 = getelementptr inbounds %struct.ip_iface, ptr %59, i32 0, i32 2
  %61 = load i32, ptr %60, align 8, !tbaa !25
  %62 = getelementptr inbounds [16 x i8], ptr %9, i64 0, i64 0
  %63 = call ptr @ip_addr_ntop(i32 noundef %61, ptr noundef %62, i64 noundef 16)
  %64 = call i32 (ptr, i32, ptr, i32, ptr, ptr, ...) @lprintf(ptr noundef %58, i32 noundef 68, ptr noundef @.str.1, i32 noundef 1039, ptr noundef @__func__.tcp_connect, ptr noundef @.str.16, ptr noundef %63)
  %65 = load ptr, ptr %8, align 8, !tbaa !9
  %66 = getelementptr inbounds %struct.ip_iface, ptr %65, i32 0, i32 2
  %67 = load i32, ptr %66, align 8, !tbaa !25
  %68 = getelementptr inbounds %struct.ip_endpoint, ptr %7, i32 0, i32 0
  store i32 %67, ptr %68, align 4, !tbaa !22
  br label %69

69:                                               ; preds = %57, %31
  %70 = getelementptr inbounds %struct.ip_endpoint, ptr %7, i32 0, i32 1
  %71 = load i16, ptr %70, align 4, !tbaa !24
  %72 = icmp ne i16 %71, 0
  br i1 %72, label %109, label %73

73:                                               ; preds = %69
  store i32 49152, ptr %10, align 4, !tbaa !5
  br label %74

74:                                               ; preds = %97, %73
  %75 = load i32, ptr %10, align 4, !tbaa !5
  %76 = icmp sle i32 %75, 65535
  br i1 %76, label %77, label %100

77:                                               ; preds = %74
  %78 = load i32, ptr %10, align 4, !tbaa !5
  %79 = trunc i32 %78 to i16
  %80 = getelementptr inbounds %struct.ip_endpoint, ptr %7, i32 0, i32 1
  store i16 %79, ptr %80, align 4, !tbaa !24
  %81 = load ptr, ptr %5, align 8, !tbaa !9
  %82 = call ptr @tcp_pcb_select(ptr noundef %7, ptr noundef %81)
  %83 = icmp ne ptr %82, null
  br i1 %83, label %96, label %84

84:                                               ; preds = %77
  %85 = load ptr, ptr @stderr, align 8, !tbaa !9
  %86 = getelementptr inbounds %struct.ip_endpoint, ptr %7, i32 0, i32 1
  %87 = load i16, ptr %86, align 4, !tbaa !24
  %88 = call zeroext i16 @ntoh16(i16 noundef zeroext %87)
  %89 = zext i16 %88 to i32
  %90 = call i32 (ptr, i32, ptr, i32, ptr, ptr, ...) @lprintf(ptr noundef %85, i32 noundef 68, ptr noundef @.str.1, i32 noundef 1046, ptr noundef @__func__.tcp_connect, ptr noundef @.str.17, i32 noundef %89)
  %91 = getelementptr inbounds %struct.ip_endpoint, ptr %7, i32 0, i32 1
  %92 = load i16, ptr %91, align 4, !tbaa !24
  %93 = load ptr, ptr %6, align 8, !tbaa !9
  %94 = getelementptr inbounds %struct.tcp_pcb, ptr %93, i32 0, i32 2
  %95 = getelementptr inbounds %struct.ip_endpoint, ptr %94, i32 0, i32 1
  store i16 %92, ptr %95, align 4, !tbaa !23
  br label %100

96:                                               ; preds = %77
  br label %97

97:                                               ; preds = %96
  %98 = load i32, ptr %10, align 4, !tbaa !5
  %99 = add nsw i32 %98, 1
  store i32 %99, ptr %10, align 4, !tbaa !5
  br label %74, !llvm.loop !28

100:                                              ; preds = %84, %74
  %101 = getelementptr inbounds %struct.ip_endpoint, ptr %7, i32 0, i32 1
  %102 = load i16, ptr %101, align 4, !tbaa !24
  %103 = icmp ne i16 %102, 0
  br i1 %103, label %108, label %104

104:                                              ; preds = %100
  %105 = load ptr, ptr @stderr, align 8, !tbaa !9
  %106 = call i32 (ptr, i32, ptr, i32, ptr, ptr, ...) @lprintf(ptr noundef %105, i32 noundef 68, ptr noundef @.str.1, i32 noundef 1052, ptr noundef @__func__.tcp_connect, ptr noundef @.str.18)
  %107 = call i32 @mutex_unlock(ptr noundef @mutex)
  store i32 -1, ptr %3, align 4
  store i32 1, ptr %12, align 4
  br label %215

108:                                              ; preds = %100
  br label %109

109:                                              ; preds = %108, %69
  %110 = getelementptr inbounds %struct.ip_endpoint, ptr %7, i32 0, i32 0
  %111 = load i32, ptr %110, align 4, !tbaa !22
  %112 = load ptr, ptr %6, align 8, !tbaa !9
  %113 = getelementptr inbounds %struct.tcp_pcb, ptr %112, i32 0, i32 2
  %114 = getelementptr inbounds %struct.ip_endpoint, ptr %113, i32 0, i32 0
  store i32 %111, ptr %114, align 8, !tbaa !21
  %115 = getelementptr inbounds %struct.ip_endpoint, ptr %7, i32 0, i32 1
  %116 = load i16, ptr %115, align 4, !tbaa !24
  %117 = load ptr, ptr %6, align 8, !tbaa !9
  %118 = getelementptr inbounds %struct.tcp_pcb, ptr %117, i32 0, i32 2
  %119 = getelementptr inbounds %struct.ip_endpoint, ptr %118, i32 0, i32 1
  store i16 %116, ptr %119, align 4, !tbaa !23
  %120 = load ptr, ptr %5, align 8, !tbaa !9
  %121 = getelementptr inbounds %struct.ip_endpoint, ptr %120, i32 0, i32 0
  %122 = load i32, ptr %121, align 4, !tbaa !22
  %123 = load ptr, ptr %6, align 8, !tbaa !9
  %124 = getelementptr inbounds %struct.tcp_pcb, ptr %123, i32 0, i32 3
  %125 = getelementptr inbounds %struct.ip_endpoint, ptr %124, i32 0, i32 0
  store i32 %122, ptr %125, align 8, !tbaa !30
  %126 = load ptr, ptr %5, align 8, !tbaa !9
  %127 = getelementptr inbounds %struct.ip_endpoint, ptr %126, i32 0, i32 1
  %128 = load i16, ptr %127, align 4, !tbaa !24
  %129 = load ptr, ptr %6, align 8, !tbaa !9
  %130 = getelementptr inbounds %struct.tcp_pcb, ptr %129, i32 0, i32 3
  %131 = getelementptr inbounds %struct.ip_endpoint, ptr %130, i32 0, i32 1
  store i16 %128, ptr %131, align 4, !tbaa !31
  %132 = load ptr, ptr %6, align 8, !tbaa !9
  %133 = getelementptr inbounds %struct.tcp_pcb, ptr %132, i32 0, i32 6
  %134 = getelementptr inbounds %struct.anon.0, ptr %133, i32 0, i32 1
  store i16 -1, ptr %134, align 4, !tbaa !32
  %135 = call i64 @random() #6
  %136 = trunc i64 %135 to i32
  %137 = load ptr, ptr %6, align 8, !tbaa !9
  %138 = getelementptr inbounds %struct.tcp_pcb, ptr %137, i32 0, i32 5
  store i32 %136, ptr %138, align 4, !tbaa !33
  %139 = load ptr, ptr %6, align 8, !tbaa !9
  %140 = call i64 @tcp_output(ptr noundef %139, i8 noundef zeroext 2, ptr noundef null, i64 noundef 0)
  %141 = icmp eq i64 %140, -1
  br i1 %141, label %142, label %149

142:                                              ; preds = %109
  %143 = load ptr, ptr @stderr, align 8, !tbaa !9
  %144 = call i32 (ptr, i32, ptr, i32, ptr, ptr, ...) @lprintf(ptr noundef %143, i32 noundef 69, ptr noundef @.str.1, i32 noundef 1064, ptr noundef @__func__.tcp_connect, ptr noundef @.str.8)
  %145 = load ptr, ptr %6, align 8, !tbaa !9
  %146 = getelementptr inbounds %struct.tcp_pcb, ptr %145, i32 0, i32 0
  store i32 1, ptr %146, align 8, !tbaa !34
  %147 = load ptr, ptr %6, align 8, !tbaa !9
  call void @tcp_pcb_release(ptr noundef %147)
  %148 = call i32 @mutex_unlock(ptr noundef @mutex)
  store i32 -1, ptr %3, align 4
  store i32 1, ptr %12, align 4
  br label %215

149:                                              ; preds = %109
  %150 = load ptr, ptr %6, align 8, !tbaa !9
  %151 = getelementptr inbounds %struct.tcp_pcb, ptr %150, i32 0, i32 5
  %152 = load i32, ptr %151, align 4, !tbaa !33
  %153 = load ptr, ptr %6, align 8, !tbaa !9
  %154 = getelementptr inbounds %struct.tcp_pcb, ptr %153, i32 0, i32 4
  %155 = getelementptr inbounds %struct.anon, ptr %154, i32 0, i32 1
  store i32 %152, ptr %155, align 4, !tbaa !35
  %156 = load ptr, ptr %6, align 8, !tbaa !9
  %157 = getelementptr inbounds %struct.tcp_pcb, ptr %156, i32 0, i32 5
  %158 = load i32, ptr %157, align 4, !tbaa !33
  %159 = add i32 %158, 1
  %160 = load ptr, ptr %6, align 8, !tbaa !9
  %161 = getelementptr inbounds %struct.tcp_pcb, ptr %160, i32 0, i32 4
  %162 = getelementptr inbounds %struct.anon, ptr %161, i32 0, i32 0
  store i32 %159, ptr %162, align 8, !tbaa !36
  %163 = load ptr, ptr %6, align 8, !tbaa !9
  %164 = getelementptr inbounds %struct.tcp_pcb, ptr %163, i32 0, i32 0
  store i32 3, ptr %164, align 8, !tbaa !34
  br label %165

165:                                              ; preds = %199, %149
  %166 = load ptr, ptr %6, align 8, !tbaa !9
  %167 = getelementptr inbounds %struct.tcp_pcb, ptr %166, i32 0, i32 0
  %168 = load i32, ptr %167, align 8, !tbaa !34
  store i32 %168, ptr %11, align 4, !tbaa !5
  br label %169

169:                                              ; preds = %188, %165
  %170 = load ptr, ptr %6, align 8, !tbaa !9
  %171 = getelementptr inbounds %struct.tcp_pcb, ptr %170, i32 0, i32 0
  %172 = load i32, ptr %171, align 8, !tbaa !34
  %173 = load i32, ptr %11, align 4, !tbaa !5
  %174 = icmp eq i32 %172, %173
  br i1 %174, label %175, label %189

175:                                              ; preds = %169
  %176 = load ptr, ptr %6, align 8, !tbaa !9
  %177 = getelementptr inbounds %struct.tcp_pcb, ptr %176, i32 0, i32 11
  %178 = call i32 @sched_sleep(ptr noundef %177, ptr noundef @mutex, ptr noundef null)
  %179 = icmp eq i32 %178, -1
  br i1 %179, label %180, label %188

180:                                              ; preds = %175
  %181 = load ptr, ptr @stderr, align 8, !tbaa !9
  %182 = call i32 (ptr, i32, ptr, i32, ptr, ptr, ...) @lprintf(ptr noundef %181, i32 noundef 68, ptr noundef @.str.1, i32 noundef 1078, ptr noundef @__func__.tcp_connect, ptr noundef @.str.9)
  %183 = load ptr, ptr %6, align 8, !tbaa !9
  %184 = getelementptr inbounds %struct.tcp_pcb, ptr %183, i32 0, i32 0
  store i32 1, ptr %184, align 8, !tbaa !34
  %185 = load ptr, ptr %6, align 8, !tbaa !9
  call void @tcp_pcb_release(ptr noundef %185)
  %186 = call i32 @mutex_unlock(ptr noundef @mutex)
  %187 = call ptr @__errno_location() #7
  store i32 4, ptr %187, align 4, !tbaa !5
  store i32 -1, ptr %3, align 4
  store i32 1, ptr %12, align 4
  br label %215

188:                                              ; preds = %175
  br label %169, !llvm.loop !37

189:                                              ; preds = %169
  %190 = load ptr, ptr %6, align 8, !tbaa !9
  %191 = getelementptr inbounds %struct.tcp_pcb, ptr %190, i32 0, i32 0
  %192 = load i32, ptr %191, align 8, !tbaa !34
  %193 = icmp ne i32 %192, 5
  br i1 %193, label %194, label %210

194:                                              ; preds = %189
  %195 = load ptr, ptr %6, align 8, !tbaa !9
  %196 = getelementptr inbounds %struct.tcp_pcb, ptr %195, i32 0, i32 0
  %197 = load i32, ptr %196, align 8, !tbaa !34
  %198 = icmp eq i32 %197, 4
  br i1 %198, label %199, label %200

199:                                              ; preds = %194
  br label %165

200:                                              ; preds = %194
  %201 = load ptr, ptr @stderr, align 8, !tbaa !9
  %202 = load ptr, ptr %6, align 8, !tbaa !9
  %203 = getelementptr inbounds %struct.tcp_pcb, ptr %202, i32 0, i32 0
  %204 = load i32, ptr %203, align 8, !tbaa !34
  %205 = call i32 (ptr, i32, ptr, i32, ptr, ptr, ...) @lprintf(ptr noundef %201, i32 noundef 69, ptr noundef @.str.1, i32 noundef 1090, ptr noundef @__func__.tcp_connect, ptr noundef @.str.10, i32 noundef %204)
  %206 = load ptr, ptr %6, align 8, !tbaa !9
  %207 = getelementptr inbounds %struct.tcp_pcb, ptr %206, i32 0, i32 0
  store i32 1, ptr %207, align 8, !tbaa !34
  %208 = load ptr, ptr %6, align 8, !tbaa !9
  call void @tcp_pcb_release(ptr noundef %208)
  %209 = call i32 @mutex_unlock(ptr noundef @mutex)
  store i32 -1, ptr %3, align 4
  store i32 1, ptr %12, align 4
  br label %215

210:                                              ; preds = %189
  %211 = load ptr, ptr %6, align 8, !tbaa !9
  %212 = call i32 @tcp_pcb_id(ptr noundef %211)
  store i32 %212, ptr %4, align 4, !tbaa !5
  %213 = call i32 @mutex_unlock(ptr noundef @mutex)
  %214 = load i32, ptr %4, align 4, !tbaa !5
  store i32 %214, ptr %3, align 4
  store i32 1, ptr %12, align 4
  br label %215

215:                                              ; preds = %210, %200, %180, %142, %104, %53, %27, %18
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #6
  call void @llvm.lifetime.end.p0(i64 16, ptr %9) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #6
  %216 = load i32, ptr %3, align 4
  ret i32 %216
}

declare ptr @ip_route_get_iface(i32 noundef) #1

declare ptr @ip_addr_ntop(i32 noundef, ptr noundef, i64 noundef) #1

; Function Attrs: nounwind uwtable
declare hidden ptr @tcp_pcb_select(ptr noundef, ptr noundef) #4

declare zeroext i16 @ntoh16(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 = { inlinehint 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 "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 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 #5 = { nounwind willreturn memory(none) "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 }
attributes #7 = { nounwind willreturn memory(none) }

!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 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"any pointer", !7, i64 0}
!11 = !{!12, !6, i64 4}
!12 = !{!"tcp_pcb", !6, i64 0, !6, i64 4, !13, i64 8, !13, i64 16, !15, i64 24, !6, i64 44, !16, i64 48, !6, i64 56, !14, i64 60, !14, i64 62, !7, i64 64, !17, i64 65600, !18, i64 65656, !19, i64 65680, !10, i64 65696, !18, i64 65704}
!13 = !{!"ip_endpoint", !6, i64 0, !14, i64 4}
!14 = !{!"short", !7, i64 0}
!15 = !{!"", !6, i64 0, !6, i64 4, !14, i64 8, !14, i64 10, !6, i64 12, !6, i64 16}
!16 = !{!"", !6, i64 0, !14, i64 4, !14, i64 6}
!17 = !{!"sched_ctx", !7, i64 0, !6, i64 48, !6, i64 52}
!18 = !{!"queue_head", !10, i64 0, !10, i64 8, !6, i64 16}
!19 = !{!"timeval", !20, i64 0, !20, i64 8}
!20 = !{!"long", !7, i64 0}
!21 = !{!12, !6, i64 8}
!22 = !{!13, !6, i64 0}
!23 = !{!12, !14, i64 12}
!24 = !{!13, !14, i64 4}
!25 = !{!26, !6, i64 32}
!26 = !{!"ip_iface", !27, i64 0, !10, i64 24, !6, i64 32, !6, i64 36, !6, i64 40}
!27 = !{!"net_iface", !10, i64 0, !10, i64 8, !6, i64 16}
!28 = distinct !{!28, !29}
!29 = !{!"llvm.loop.mustprogress"}
!30 = !{!12, !6, i64 16}
!31 = !{!12, !14, i64 20}
!32 = !{!12, !14, i64 52}
!33 = !{!12, !6, i64 44}
!34 = !{!12, !6, i64 0}
!35 = !{!12, !6, i64 28}
!36 = !{!12, !6, i64 24}
!37 = distinct !{!37, !29}


; 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"

%union.pthread_mutex_t = type { %struct.__pthread_mutex_s }
%struct.__pthread_mutex_s = type { i32, i32, i32, i32, i32, i16, i16, %struct.__pthread_internal_list }
%struct.__pthread_internal_list = type { ptr, ptr }
%struct.ip_endpoint = type { i32, i16 }

@stderr = external local_unnamed_addr global ptr, align 8
@.str.1 = external hidden unnamed_addr constant [57 x i8], align 1
@mutex = external hidden global %union.pthread_mutex_t, align 8
@.str.8 = external hidden unnamed_addr constant [21 x i8], align 1
@.str.9 = external hidden unnamed_addr constant [12 x i8], align 1
@.str.10 = external hidden unnamed_addr constant [15 x i8], align 1
@.str.12 = external hidden unnamed_addr constant [14 x i8], align 1
@__func__.tcp_connect = external hidden unnamed_addr constant [12 x i8], align 1
@.str.14 = external hidden unnamed_addr constant [26 x i8], align 1
@IP_ADDR_ANY = external local_unnamed_addr constant i32, align 4
@.str.15 = external hidden unnamed_addr constant [29 x i8], align 1
@.str.16 = external hidden unnamed_addr constant [26 x i8], align 1
@.str.17 = external hidden unnamed_addr constant [31 x i8], align 1
@.str.18 = external hidden unnamed_addr constant [37 x i8], align 1

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

declare i32 @lprintf(ptr noundef, i32 noundef, ptr noundef, i32 noundef, ptr noundef, ptr noundef, ...) local_unnamed_addr #1

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

; Function Attrs: inlinehint nounwind uwtable
declare hidden i32 @mutex_lock(ptr noundef) local_unnamed_addr #2

; Function Attrs: inlinehint nounwind uwtable
declare hidden i32 @mutex_unlock(ptr noundef) local_unnamed_addr #2

; Function Attrs: nounwind
declare i64 @random() local_unnamed_addr #3

; Function Attrs: nounwind uwtable
declare hidden i64 @tcp_output(ptr noundef, i8 noundef zeroext, ptr noundef, i64 noundef) local_unnamed_addr #4

; Function Attrs: nounwind uwtable
declare hidden void @tcp_pcb_release(ptr noundef) local_unnamed_addr #4

declare i32 @sched_sleep(ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #1

; Function Attrs: mustprogress nofree nosync nounwind willreturn memory(none)
declare ptr @__errno_location() local_unnamed_addr #5

; Function Attrs: nounwind uwtable
declare hidden i32 @tcp_pcb_id(ptr noundef) local_unnamed_addr #4

; Function Attrs: nounwind uwtable
declare hidden ptr @tcp_pcb_get(i32 noundef) local_unnamed_addr #4

; Function Attrs: nounwind uwtable
define dso_local i32 @tcp_connect(i32 noundef %0, ptr noundef %1) local_unnamed_addr #4 {
  %3 = alloca %struct.ip_endpoint, align 4
  %4 = alloca [16 x i8], align 16
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %3) #6
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %4) #6
  %5 = tail call i32 @mutex_lock(ptr noundef nonnull @mutex)
  %6 = tail call ptr @tcp_pcb_get(i32 noundef %0)
  %.not = icmp eq ptr %6, null
  br i1 %.not, label %7, label %11

7:                                                ; preds = %2
  %8 = load ptr, ptr @stderr, align 8, !tbaa !5
  %9 = tail call i32 (ptr, i32, ptr, i32, ptr, ptr, ...) @lprintf(ptr noundef %8, i32 noundef 69, ptr noundef nonnull @.str.1, i32 noundef 1021, ptr noundef nonnull @__func__.tcp_connect, ptr noundef nonnull @.str.12) #6
  %10 = tail call i32 @mutex_unlock(ptr noundef nonnull @mutex)
  br label %101

11:                                               ; preds = %2
  %12 = getelementptr inbounds i8, ptr %6, i64 4
  %13 = load i32, ptr %12, align 4, !tbaa !9
  %.not47 = icmp eq i32 %13, 2
  br i1 %.not47, label %18, label %14

14:                                               ; preds = %11
  %15 = load ptr, ptr @stderr, align 8, !tbaa !5
  %16 = tail call i32 (ptr, i32, ptr, i32, ptr, ptr, ...) @lprintf(ptr noundef %15, i32 noundef 69, ptr noundef nonnull @.str.1, i32 noundef 1026, ptr noundef nonnull @__func__.tcp_connect, ptr noundef nonnull @.str.14) #6
  %17 = tail call i32 @mutex_unlock(ptr noundef nonnull @mutex)
  br label %101

18:                                               ; preds = %11
  %19 = getelementptr inbounds i8, ptr %6, i64 8
  %20 = load i32, ptr %19, align 8, !tbaa !20
  store i32 %20, ptr %3, align 4, !tbaa !21
  %21 = getelementptr inbounds i8, ptr %6, i64 12
  %22 = load i16, ptr %21, align 4, !tbaa !22
  %23 = getelementptr inbounds i8, ptr %3, i64 4
  store i16 %22, ptr %23, align 4, !tbaa !23
  %24 = load i32, ptr @IP_ADDR_ANY, align 4, !tbaa !24
  %25 = icmp eq i32 %20, %24
  br i1 %25, label %26, label %39

26:                                               ; preds = %18
  %27 = load i32, ptr %1, align 4, !tbaa !21
  %28 = tail call ptr @ip_route_get_iface(i32 noundef %27) #6
  %.not48 = icmp eq ptr %28, null
  %29 = load ptr, ptr @stderr, align 8, !tbaa !5
  br i1 %.not48, label %30, label %33

30:                                               ; preds = %26
  %31 = tail call i32 (ptr, i32, ptr, i32, ptr, ptr, ...) @lprintf(ptr noundef %29, i32 noundef 69, ptr noundef nonnull @.str.1, i32 noundef 1035, ptr noundef nonnull @__func__.tcp_connect, ptr noundef nonnull @.str.15) #6
  %32 = tail call i32 @mutex_unlock(ptr noundef nonnull @mutex)
  br label %101

33:                                               ; preds = %26
  %34 = getelementptr inbounds i8, ptr %28, i64 32
  %35 = load i32, ptr %34, align 8, !tbaa !25
  %36 = call ptr @ip_addr_ntop(i32 noundef %35, ptr noundef nonnull %4, i64 noundef 16) #6
  %37 = call i32 (ptr, i32, ptr, i32, ptr, ptr, ...) @lprintf(ptr noundef %29, i32 noundef 68, ptr noundef nonnull @.str.1, i32 noundef 1039, ptr noundef nonnull @__func__.tcp_connect, ptr noundef nonnull @.str.16, ptr noundef %36) #6
  %38 = load i32, ptr %34, align 8, !tbaa !25
  store i32 %38, ptr %3, align 4, !tbaa !21
  br label %39

39:                                               ; preds = %33, %18
  %40 = phi i32 [ %38, %33 ], [ %20, %18 ]
  %.not49 = icmp eq i16 %22, 0
  br i1 %.not49, label %.preheader, label %58

41:                                               ; preds = %.preheader
  %42 = add nuw nsw i32 %.04358, 1
  %exitcond.not = icmp eq i32 %42, 65536
  br i1 %exitcond.not, label %thread-pre-split, label %.preheader, !llvm.loop !28

.preheader:                                       ; preds = %39, %41
  %.04358 = phi i32 [ %42, %41 ], [ 49152, %39 ]
  %43 = trunc nuw i32 %.04358 to i16
  store i16 %43, ptr %23, align 4, !tbaa !23
  %44 = call ptr @tcp_pcb_select(ptr noundef nonnull %3, ptr noundef %1)
  %.not50 = icmp eq ptr %44, null
  br i1 %.not50, label %45, label %41

45:                                               ; preds = %.preheader
  %46 = load ptr, ptr @stderr, align 8, !tbaa !5
  %47 = load i16, ptr %23, align 4, !tbaa !23
  %48 = call zeroext i16 @ntoh16(i16 noundef zeroext %47) #6
  %49 = zext i16 %48 to i32
  %50 = call i32 (ptr, i32, ptr, i32, ptr, ptr, ...) @lprintf(ptr noundef %46, i32 noundef 68, ptr noundef nonnull @.str.1, i32 noundef 1046, ptr noundef nonnull @__func__.tcp_connect, ptr noundef nonnull @.str.17, i32 noundef %49) #6
  %51 = load i16, ptr %23, align 4, !tbaa !23
  store i16 %51, ptr %21, align 4, !tbaa !22
  br label %52

thread-pre-split:                                 ; preds = %41
  %.pr53 = load i16, ptr %23, align 4, !tbaa !23
  br label %52

52:                                               ; preds = %thread-pre-split, %45
  %53 = phi i16 [ %.pr53, %thread-pre-split ], [ %51, %45 ]
  %.not51 = icmp eq i16 %53, 0
  br i1 %.not51, label %54, label %._crit_edge

._crit_edge:                                      ; preds = %52
  %.pre = load i32, ptr %3, align 4, !tbaa !21
  br label %58

54:                                               ; preds = %52
  %55 = load ptr, ptr @stderr, align 8, !tbaa !5
  %56 = call i32 (ptr, i32, ptr, i32, ptr, ptr, ...) @lprintf(ptr noundef %55, i32 noundef 68, ptr noundef nonnull @.str.1, i32 noundef 1052, ptr noundef nonnull @__func__.tcp_connect, ptr noundef nonnull @.str.18) #6
  %57 = call i32 @mutex_unlock(ptr noundef nonnull @mutex)
  br label %101

58:                                               ; preds = %._crit_edge, %39
  %59 = phi i16 [ %53, %._crit_edge ], [ %22, %39 ]
  %60 = phi i32 [ %.pre, %._crit_edge ], [ %40, %39 ]
  store i32 %60, ptr %19, align 8, !tbaa !20
  store i16 %59, ptr %21, align 4, !tbaa !22
  %61 = load i32, ptr %1, align 4, !tbaa !21
  %62 = getelementptr inbounds i8, ptr %6, i64 16
  store i32 %61, ptr %62, align 8, !tbaa !30
  %63 = getelementptr inbounds i8, ptr %1, i64 4
  %64 = load i16, ptr %63, align 4, !tbaa !23
  %65 = getelementptr inbounds i8, ptr %6, i64 20
  store i16 %64, ptr %65, align 4, !tbaa !31
  %66 = getelementptr inbounds i8, ptr %6, i64 52
  store i16 -1, ptr %66, align 4, !tbaa !32
  %67 = call i64 @random() #6
  %68 = trunc i64 %67 to i32
  %69 = getelementptr inbounds i8, ptr %6, i64 44
  store i32 %68, ptr %69, align 4, !tbaa !33
  %70 = call i64 @tcp_output(ptr noundef %6, i8 noundef zeroext 2, ptr noundef null, i64 noundef 0)
  %71 = icmp eq i64 %70, -1
  br i1 %71, label %72, label %76

72:                                               ; preds = %58
  %73 = load ptr, ptr @stderr, align 8, !tbaa !5
  %74 = call i32 (ptr, i32, ptr, i32, ptr, ptr, ...) @lprintf(ptr noundef %73, i32 noundef 69, ptr noundef nonnull @.str.1, i32 noundef 1064, ptr noundef nonnull @__func__.tcp_connect, ptr noundef nonnull @.str.8) #6
  store i32 1, ptr %6, align 8, !tbaa !34
  call void @tcp_pcb_release(ptr noundef nonnull %6)
  %75 = call i32 @mutex_unlock(ptr noundef nonnull @mutex)
  br label %101

76:                                               ; preds = %58
  %77 = load i32, ptr %69, align 4, !tbaa !33
  %78 = getelementptr inbounds i8, ptr %6, i64 24
  %79 = getelementptr inbounds i8, ptr %6, i64 28
  store i32 %77, ptr %79, align 4, !tbaa !35
  %80 = add i32 %77, 1
  store i32 %80, ptr %78, align 8, !tbaa !36
  store i32 3, ptr %6, align 8, !tbaa !34
  %81 = getelementptr inbounds i8, ptr %6, i64 65600
  br label %82

82:                                               ; preds = %93, %76
  %83 = phi i32 [ %.pr55, %93 ], [ 3, %76 ]
  br label %85

thread-pre-split54:                               ; preds = %85
  %.pr55 = load i32, ptr %6, align 8, !tbaa !34
  %84 = icmp eq i32 %.pr55, %83
  br i1 %84, label %85, label %93

85:                                               ; preds = %82, %thread-pre-split54
  %86 = call i32 @sched_sleep(ptr noundef nonnull %81, ptr noundef nonnull @mutex, ptr noundef null) #6
  %87 = icmp eq i32 %86, -1
  br i1 %87, label %88, label %thread-pre-split54, !llvm.loop !37

88:                                               ; preds = %85
  %89 = load ptr, ptr @stderr, align 8, !tbaa !5
  %90 = call i32 (ptr, i32, ptr, i32, ptr, ptr, ...) @lprintf(ptr noundef %89, i32 noundef 68, ptr noundef nonnull @.str.1, i32 noundef 1078, ptr noundef nonnull @__func__.tcp_connect, ptr noundef nonnull @.str.9) #6
  store i32 1, ptr %6, align 8, !tbaa !34
  call void @tcp_pcb_release(ptr noundef nonnull %6)
  %91 = call i32 @mutex_unlock(ptr noundef nonnull @mutex)
  %92 = tail call ptr @__errno_location() #7
  store i32 4, ptr %92, align 4, !tbaa !24
  br label %101

93:                                               ; preds = %thread-pre-split54
  switch i32 %.pr55, label %94 [
    i32 5, label %98
    i32 4, label %82
  ]

94:                                               ; preds = %93
  %95 = load ptr, ptr @stderr, align 8, !tbaa !5
  %96 = call i32 (ptr, i32, ptr, i32, ptr, ptr, ...) @lprintf(ptr noundef %95, i32 noundef 69, ptr noundef nonnull @.str.1, i32 noundef 1090, ptr noundef nonnull @__func__.tcp_connect, ptr noundef nonnull @.str.10, i32 noundef %.pr55) #6
  store i32 1, ptr %6, align 8, !tbaa !34
  call void @tcp_pcb_release(ptr noundef nonnull %6)
  %97 = call i32 @mutex_unlock(ptr noundef nonnull @mutex)
  br label %101

98:                                               ; preds = %93
  %99 = call i32 @tcp_pcb_id(ptr noundef nonnull %6)
  %100 = call i32 @mutex_unlock(ptr noundef nonnull @mutex)
  br label %101

101:                                              ; preds = %98, %94, %88, %72, %54, %30, %14, %7
  %.0 = phi i32 [ -1, %14 ], [ -1, %72 ], [ -1, %88 ], [ -1, %94 ], [ %99, %98 ], [ -1, %54 ], [ -1, %30 ], [ -1, %7 ]
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %4) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %3) #6
  ret i32 %.0
}

declare ptr @ip_route_get_iface(i32 noundef) local_unnamed_addr #1

declare ptr @ip_addr_ntop(i32 noundef, ptr noundef, i64 noundef) local_unnamed_addr #1

; Function Attrs: nounwind uwtable
declare hidden ptr @tcp_pcb_select(ptr noundef, ptr noundef) local_unnamed_addr #4

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

attributes #0 = { mustprogress 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 = { inlinehint 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 "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 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 #5 = { mustprogress nofree nosync nounwind willreturn memory(none) "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 }
attributes #7 = { nounwind willreturn memory(none) }

!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 4}
!10 = !{!"tcp_pcb", !11, i64 0, !11, i64 4, !12, i64 8, !12, i64 16, !14, i64 24, !11, i64 44, !15, i64 48, !11, i64 56, !13, i64 60, !13, i64 62, !7, i64 64, !16, i64 65600, !17, i64 65656, !18, i64 65680, !6, i64 65696, !17, i64 65704}
!11 = !{!"int", !7, i64 0}
!12 = !{!"ip_endpoint", !11, i64 0, !13, i64 4}
!13 = !{!"short", !7, i64 0}
!14 = !{!"", !11, i64 0, !11, i64 4, !13, i64 8, !13, i64 10, !11, i64 12, !11, i64 16}
!15 = !{!"", !11, i64 0, !13, i64 4, !13, i64 6}
!16 = !{!"sched_ctx", !7, i64 0, !11, i64 48, !11, i64 52}
!17 = !{!"queue_head", !6, i64 0, !6, i64 8, !11, i64 16}
!18 = !{!"timeval", !19, i64 0, !19, i64 8}
!19 = !{!"long", !7, i64 0}
!20 = !{!10, !11, i64 8}
!21 = !{!12, !11, i64 0}
!22 = !{!10, !13, i64 12}
!23 = !{!12, !13, i64 4}
!24 = !{!11, !11, i64 0}
!25 = !{!26, !11, i64 32}
!26 = !{!"ip_iface", !27, i64 0, !6, i64 24, !11, i64 32, !11, i64 36, !11, i64 40}
!27 = !{!"net_iface", !6, i64 0, !6, i64 8, !11, i64 16}
!28 = distinct !{!28, !29}
!29 = !{!"llvm.loop.mustprogress"}
!30 = !{!10, !11, i64 16}
!31 = !{!10, !13, i64 20}
!32 = !{!10, !13, i64 52}
!33 = !{!10, !11, i64 44}
!34 = !{!10, !11, i64 0}
!35 = !{!10, !11, i64 28}
!36 = !{!10, !11, i64 24}
!37 = distinct !{!37, !29}


; Effective O3 passes: EarlyCSEPass,GVNPass,GlobalOptPass,IndVarSimplifyPass,InferFunctionAttrsPass,InstCombinePass,InstSimplifyPass,JumpThreadingPass,LCSSAPass,LICMPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,SROAPass,SimplifyCFGPass,TailCallElimPass