; LLVM IR from DroneBridge/DroneBridge :: status (status_main)

; 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.timespec = type { i64, i64 }
%struct.timeval = type { i64, i64 }
%struct.db_rc_msg_t = type <{ [2 x i8], i8, [14 x i16] }>
%struct.db_system_status_msg_t = type <{ [2 x i8], i8, i8, i8, i8, i8, i32, i32, i32, i8 }>
%struct.db_socket_t = type { i32, %struct.sockaddr_ll }
%struct.sockaddr_ll = type { i16, i16, i32, i16, i8, i8, [8 x i8] }
%struct.fd_set = type { [16 x i64] }
%struct.tcp_server_info_t = type { i32, %struct.sockaddr_in }
%struct.sockaddr_in = type { i16, i16, %struct.in_addr, [8 x i8] }
%struct.in_addr = type { i32 }
%struct.db_gnd_status_t = type { i64, i32, i32, i32, i32, i32, i32, i32, i32, [8 x %struct.db_adapter_status] }
%struct.db_adapter_status = type <{ i32, i32, i8, [4 x i8], i8, i8, i8, i8, [16 x i8] }>
%struct.uav_rc_status_update_message_t = type { i8, i8, i8, i8, i8, [9 x i8] }
%struct.db_rc_status_t = type { i64, i32, i32, i32, i32, i32, i32, i32, i32, [8 x %struct.db_adapter_status] }
%struct.db_uav_status_t = type <{ i32, i8, i8, i32, i32, i32, i32, i32, i16, i16, i8, i8, i32, [8 x %struct.db_adapter_status] }>
%struct.db_rc_overwrite_values_t = type <{ %struct.timespec, [14 x i16] }>
%struct.db_rc_values_t = type { [14 x i16] }

@keeprunning = external dso_local global i8, align 1
@num_inf_status = external dso_local global i32, align 4
@comm_id = external dso_local global i8, align 1
@db_mode = external dso_local global i8, align 1
@adapters = external dso_local global [4 x [16 x i8]], align 16
@.str.2 = external hidden unnamed_addr constant [25 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [42 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [51 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [39 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [44 x i8], align 1
@.str.7 = external hidden unnamed_addr constant [57 x i8], align 1
@.str.8 = external hidden unnamed_addr constant [28 x i8], align 1

; Function Attrs: nounwind uwtable
declare dso_local void @int_handler(i32 noundef) #0

; Function Attrs: nounwind uwtable
declare dso_local i32 @process_command_line_args(i32 noundef, ptr noundef) #0

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

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

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

; Function Attrs: nounwind uwtable
define dso_local i32 @main(i32 noundef %0, ptr noundef %1) #0 {
  %3 = alloca i32, align 4
  %4 = alloca i32, align 4
  %5 = alloca ptr, align 8
  %6 = alloca %struct.timespec, align 8
  %7 = alloca i32, align 4
  %8 = alloca i32, align 4
  %9 = alloca i32, align 4
  %10 = alloca i32, align 4
  %11 = alloca i32, align 4
  %12 = alloca i32, align 4
  %13 = alloca %struct.timeval, align 8
  %14 = alloca i64, align 8
  %15 = alloca i64, align 8
  %16 = alloca i64, align 8
  %17 = alloca i8, align 1
  %18 = alloca i64, align 8
  %19 = alloca i8, align 1
  %20 = alloca i16, align 2
  %21 = alloca [2048 x i8], align 16
  %22 = alloca [2038 x i8], align 16
  %23 = alloca [2048 x i8], align 16
  %24 = alloca [10 x i32], align 16
  %25 = alloca %struct.db_rc_msg_t, align 1
  %26 = alloca %struct.db_system_status_msg_t, align 1
  %27 = alloca ptr, align 8
  %28 = alloca ptr, align 8
  %29 = alloca ptr, align 8
  %30 = alloca ptr, align 8
  %31 = alloca ptr, align 8
  %32 = alloca i32, align 4
  %33 = alloca [4 x %struct.db_socket_t], align 16
  %34 = alloca i32, align 4
  %35 = alloca %struct.db_socket_t, align 4
  %36 = alloca %struct.fd_set, align 8
  %37 = alloca %struct.timeval, align 8
  %38 = alloca %struct.tcp_server_info_t, align 4
  %39 = alloca i32, align 4
  %40 = alloca i32, align 4
  %41 = alloca ptr, align 8
  %42 = alloca i32, align 4
  %43 = alloca i32, align 4
  %44 = alloca i32, align 4
  %45 = alloca ptr, align 8
  %46 = alloca i32, align 4
  %47 = alloca i32, align 4
  %48 = alloca i32, align 4
  %49 = alloca i32, align 4
  %50 = alloca i32, align 4
  store i32 0, ptr %3, align 4
  store i32 %0, ptr %4, align 4, !tbaa !5
  store ptr %1, ptr %5, align 8, !tbaa !9
  %51 = call ptr @signal(i32 noundef 2, ptr noundef @int_handler) #9
  %52 = call ptr @signal(i32 noundef 15, ptr noundef @int_handler) #9
  call void @llvm.lifetime.start.p0(i64 16, ptr %6) #9
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #9
  store i32 0, ptr %7, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #9
  store i32 0, ptr %8, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #9
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #9
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #9
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #9
  store i32 0, ptr %12, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 16, ptr %13) #9
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #9
  call void @llvm.lifetime.start.p0(i64 8, ptr %15) #9
  call void @llvm.lifetime.start.p0(i64 8, ptr %16) #9
  store i64 100, ptr %16, align 8, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 1, ptr %17) #9
  store i8 0, ptr %17, align 1, !tbaa !13
  call void @llvm.lifetime.start.p0(i64 8, ptr %18) #9
  call void @llvm.lifetime.start.p0(i64 1, ptr %19) #9
  store i8 0, ptr %19, align 1, !tbaa !13
  call void @llvm.lifetime.start.p0(i64 2, ptr %20) #9
  call void @llvm.lifetime.start.p0(i64 2048, ptr %21) #9
  %53 = getelementptr inbounds [2048 x i8], ptr %21, i64 0, i64 0
  call void @llvm.memset.p0.i64(ptr align 16 %53, i8 0, i64 2048, i1 false)
  call void @llvm.lifetime.start.p0(i64 2038, ptr %22) #9
  call void @llvm.lifetime.start.p0(i64 2048, ptr %23) #9
  call void @llvm.lifetime.start.p0(i64 40, ptr %24) #9
  call void @llvm.memset.p0.i64(ptr align 16 %24, i8 0, i64 40, i1 false)
  call void @llvm.lifetime.start.p0(i64 31, ptr %25) #9
  %54 = getelementptr inbounds %struct.db_rc_msg_t, ptr %25, i32 0, i32 0
  %55 = getelementptr inbounds [2 x i8], ptr %54, i64 0, i64 0
  store i8 36, ptr %55, align 1, !tbaa !13
  %56 = getelementptr inbounds %struct.db_rc_msg_t, ptr %25, i32 0, i32 0
  %57 = getelementptr inbounds [2 x i8], ptr %56, i64 0, i64 1
  store i8 68, ptr %57, align 1, !tbaa !13
  %58 = getelementptr inbounds %struct.db_rc_msg_t, ptr %25, i32 0, i32 1
  store i8 2, ptr %58, align 1, !tbaa !14
  call void @llvm.lifetime.start.p0(i64 20, ptr %26) #9
  %59 = getelementptr inbounds %struct.db_system_status_msg_t, ptr %26, i32 0, i32 0
  %60 = getelementptr inbounds [2 x i8], ptr %59, i64 0, i64 0
  store i8 36, ptr %60, align 1, !tbaa !13
  %61 = getelementptr inbounds %struct.db_system_status_msg_t, ptr %26, i32 0, i32 0
  %62 = getelementptr inbounds [2 x i8], ptr %61, i64 0, i64 1
  store i8 68, ptr %62, align 1, !tbaa !13
  %63 = getelementptr inbounds %struct.db_system_status_msg_t, ptr %26, i32 0, i32 1
  store i8 1, ptr %63, align 1, !tbaa !16
  %64 = getelementptr inbounds %struct.db_system_status_msg_t, ptr %26, i32 0, i32 2
  store i8 109, ptr %64, align 1, !tbaa !18
  %65 = getelementptr inbounds %struct.db_system_status_msg_t, ptr %26, i32 0, i32 3
  store i8 0, ptr %65, align 1, !tbaa !19
  %66 = getelementptr inbounds %struct.db_system_status_msg_t, ptr %26, i32 0, i32 4
  store i8 0, ptr %66, align 1, !tbaa !20
  %67 = getelementptr inbounds %struct.db_system_status_msg_t, ptr %26, i32 0, i32 9
  store i8 0, ptr %67, align 1, !tbaa !21
  %68 = load i32, ptr %4, align 4, !tbaa !5
  %69 = load ptr, ptr %5, align 8, !tbaa !9
  %70 = call i32 @process_command_line_args(i32 noundef %68, ptr noundef %69)
  call void @llvm.lifetime.start.p0(i64 8, ptr %27) #9
  %71 = call ptr @db_rc_status_memory_open()
  store ptr %71, ptr %27, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %28) #9
  %72 = call ptr @db_rc_values_memory_open()
  store ptr %72, ptr %28, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %29) #9
  %73 = call ptr @db_rc_overwrite_values_memory_open()
  store ptr %73, ptr %29, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %30) #9
  %74 = call ptr @db_gnd_status_memory_open()
  store ptr %74, ptr %30, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %31) #9
  %75 = call ptr @db_uav_status_memory_open()
  store ptr %75, ptr %31, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %32) #9
  %76 = load ptr, ptr %30, align 8, !tbaa !9
  %77 = getelementptr inbounds %struct.db_gnd_status_t, ptr %76, i32 0, i32 8
  %78 = load i32, ptr %77, align 1, !tbaa !22
  store i32 %78, ptr %32, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 96, ptr %33) #9
  %79 = getelementptr inbounds [4 x %struct.db_socket_t], ptr %33, i64 0, i64 0
  call void @llvm.memset.p0.i64(ptr align 16 %79, i8 0, i64 4, i1 false)
  call void @llvm.lifetime.start.p0(i64 4, ptr %34) #9
  store i32 0, ptr %34, align 4, !tbaa !5
  br label %80

80:                                               ; preds = %95, %2
  %81 = load i32, ptr %34, align 4, !tbaa !5
  %82 = load i32, ptr @num_inf_status, align 4, !tbaa !5
  %83 = icmp slt i32 %81, %82
  br i1 %83, label %85, label %84

84:                                               ; preds = %80
  call void @llvm.lifetime.end.p0(i64 4, ptr %34) #9
  br label %98

85:                                               ; preds = %80
  %86 = load i32, ptr %34, align 4, !tbaa !5
  %87 = sext i32 %86 to i64
  %88 = getelementptr inbounds [4 x %struct.db_socket_t], ptr %33, i64 0, i64 %87
  call void @llvm.lifetime.start.p0(i64 24, ptr %35) #9
  %89 = load i32, ptr %34, align 4, !tbaa !5
  %90 = sext i32 %89 to i64
  %91 = getelementptr inbounds [4 x [16 x i8]], ptr @adapters, i64 0, i64 %90
  %92 = getelementptr inbounds [16 x i8], ptr %91, i64 0, i64 0
  %93 = load i8, ptr @comm_id, align 1, !tbaa !13
  %94 = load i8, ptr @db_mode, align 1, !tbaa !13
  call void @open_db_socket(ptr dead_on_unwind writable sret(%struct.db_socket_t) align 4 %35, ptr noundef %92, i8 noundef zeroext %93, i8 noundef signext %94, i32 noundef 6, i8 noundef zeroext 1, i8 noundef zeroext 5, i8 noundef zeroext 2)
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %88, ptr align 4 %35, i64 24, i1 false), !tbaa.struct !24
  call void @llvm.lifetime.end.p0(i64 24, ptr %35) #9
  br label %95

95:                                               ; preds = %85
  %96 = load i32, ptr %34, align 4, !tbaa !5
  %97 = add nsw i32 %96, 1
  store i32 %97, ptr %34, align 4, !tbaa !5
  br label %80, !llvm.loop !27

98:                                               ; preds = %84
  call void @llvm.lifetime.start.p0(i64 128, ptr %36) #9
  call void @llvm.lifetime.start.p0(i64 16, ptr %37) #9
  %99 = getelementptr inbounds %struct.timeval, ptr %37, i32 0, i32 0
  store i64 0, ptr %99, align 8, !tbaa !29
  %100 = getelementptr inbounds %struct.timeval, ptr %37, i32 0, i32 1
  store i64 100000, ptr %100, align 8, !tbaa !31
  call void @llvm.lifetime.start.p0(i64 20, ptr %38) #9
  call void @create_tcp_server_socket(ptr dead_on_unwind writable sret(%struct.tcp_server_info_t) align 4 %38, i32 noundef 1602)
  call void @llvm.lifetime.start.p0(i64 4, ptr %39) #9
  store i32 16, ptr %39, align 4, !tbaa !5
  br label %101

101:                                              ; preds = %98
  %102 = call i32 (ptr, ...) @printf(ptr noundef @.str.2)
  call void (i32, ptr, ...) @syslog(i32 noundef 6, ptr noundef @.str.2)
  br label %103

103:                                              ; preds = %101
  br label %104

104:                                              ; preds = %103
  %105 = call i32 @gettimeofday(ptr noundef %13, ptr noundef null) #9
  %106 = getelementptr inbounds %struct.timeval, ptr %13, i32 0, i32 0
  %107 = load i64, ptr %106, align 8, !tbaa !29
  %108 = mul nsw i64 %107, 1000
  %109 = getelementptr inbounds %struct.timeval, ptr %13, i32 0, i32 1
  %110 = load i64, ptr %109, align 8, !tbaa !31
  %111 = sdiv i64 %110, 1000
  %112 = add nsw i64 %108, %111
  store i64 %112, ptr %14, align 8, !tbaa !11
  br label %113

113:                                              ; preds = %594, %104
  %114 = load volatile i8, ptr @keeprunning, align 1, !tbaa !32, !range !34, !noundef !35
  %115 = trunc i8 %114 to i1
  br i1 %115, label %116, label %595

116:                                              ; preds = %113
  %117 = getelementptr inbounds %struct.timeval, ptr %37, i32 0, i32 0
  store i64 0, ptr %117, align 8, !tbaa !29
  %118 = getelementptr inbounds %struct.timeval, ptr %37, i32 0, i32 1
  store i64 100000, ptr %118, align 8, !tbaa !31
  br label %119

119:                                              ; preds = %116
  call void @llvm.lifetime.start.p0(i64 4, ptr %40) #9
  call void @llvm.lifetime.start.p0(i64 8, ptr %41) #9
  store ptr %36, ptr %41, align 8, !tbaa !9
  store i32 0, ptr %40, align 4, !tbaa !5
  br label %120

120:                                              ; preds = %130, %119
  %121 = load i32, ptr %40, align 4, !tbaa !5
  %122 = zext i32 %121 to i64
  %123 = icmp ult i64 %122, 16
  br i1 %123, label %124, label %133

124:                                              ; preds = %120
  %125 = load ptr, ptr %41, align 8, !tbaa !9
  %126 = getelementptr inbounds %struct.fd_set, ptr %125, i32 0, i32 0
  %127 = load i32, ptr %40, align 4, !tbaa !5
  %128 = zext i32 %127 to i64
  %129 = getelementptr inbounds [16 x i64], ptr %126, i64 0, i64 %128
  store i64 0, ptr %129, align 8, !tbaa !11
  br label %130

130:                                              ; preds = %124
  %131 = load i32, ptr %40, align 4, !tbaa !5
  %132 = add i32 %131, 1
  store i32 %132, ptr %40, align 4, !tbaa !5
  br label %120, !llvm.loop !36

133:                                              ; preds = %120
  call void @llvm.lifetime.end.p0(i64 8, ptr %41) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr %40) #9
  br label %134

134:                                              ; preds = %133
  br label %135

135:                                              ; preds = %134
  %136 = getelementptr inbounds %struct.tcp_server_info_t, ptr %38, i32 0, i32 0
  %137 = load i32, ptr %136, align 4, !tbaa !37
  %138 = srem i32 %137, 64
  %139 = zext i32 %138 to i64
  %140 = shl i64 1, %139
  %141 = getelementptr inbounds %struct.fd_set, ptr %36, i32 0, i32 0
  %142 = getelementptr inbounds %struct.tcp_server_info_t, ptr %38, i32 0, i32 0
  %143 = load i32, ptr %142, align 4, !tbaa !37
  %144 = sdiv i32 %143, 64
  %145 = sext i32 %144 to i64
  %146 = getelementptr inbounds [16 x i64], ptr %141, i64 0, i64 %145
  %147 = load i64, ptr %146, align 8, !tbaa !11
  %148 = or i64 %147, %140
  store i64 %148, ptr %146, align 8, !tbaa !11
  %149 = getelementptr inbounds %struct.tcp_server_info_t, ptr %38, i32 0, i32 0
  %150 = load i32, ptr %149, align 4, !tbaa !37
  store i32 %150, ptr %10, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %42) #9
  store i32 0, ptr %42, align 4, !tbaa !5
  br label %151

151:                                              ; preds = %190, %135
  %152 = load i32, ptr %42, align 4, !tbaa !5
  %153 = load i32, ptr @num_inf_status, align 4, !tbaa !5
  %154 = icmp slt i32 %152, %153
  br i1 %154, label %156, label %155

155:                                              ; preds = %151
  call void @llvm.lifetime.end.p0(i64 4, ptr %42) #9
  br label %193

156:                                              ; preds = %151
  %157 = load i32, ptr %42, align 4, !tbaa !5
  %158 = sext i32 %157 to i64
  %159 = getelementptr inbounds [4 x %struct.db_socket_t], ptr %33, i64 0, i64 %158
  %160 = getelementptr inbounds %struct.db_socket_t, ptr %159, i32 0, i32 0
  %161 = load i32, ptr %160, align 8, !tbaa !41
  %162 = srem i32 %161, 64
  %163 = zext i32 %162 to i64
  %164 = shl i64 1, %163
  %165 = getelementptr inbounds %struct.fd_set, ptr %36, i32 0, i32 0
  %166 = load i32, ptr %42, align 4, !tbaa !5
  %167 = sext i32 %166 to i64
  %168 = getelementptr inbounds [4 x %struct.db_socket_t], ptr %33, i64 0, i64 %167
  %169 = getelementptr inbounds %struct.db_socket_t, ptr %168, i32 0, i32 0
  %170 = load i32, ptr %169, align 8, !tbaa !41
  %171 = sdiv i32 %170, 64
  %172 = sext i32 %171 to i64
  %173 = getelementptr inbounds [16 x i64], ptr %165, i64 0, i64 %172
  %174 = load i64, ptr %173, align 8, !tbaa !11
  %175 = or i64 %174, %164
  store i64 %175, ptr %173, align 8, !tbaa !11
  %176 = load i32, ptr %42, align 4, !tbaa !5
  %177 = sext i32 %176 to i64
  %178 = getelementptr inbounds [4 x %struct.db_socket_t], ptr %33, i64 0, i64 %177
  %179 = getelementptr inbounds %struct.db_socket_t, ptr %178, i32 0, i32 0
  %180 = load i32, ptr %179, align 8, !tbaa !41
  %181 = load i32, ptr %10, align 4, !tbaa !5
  %182 = icmp sgt i32 %180, %181
  br i1 %182, label %183, label %189

183:                                              ; preds = %156
  %184 = load i32, ptr %42, align 4, !tbaa !5
  %185 = sext i32 %184 to i64
  %186 = getelementptr inbounds [4 x %struct.db_socket_t], ptr %33, i64 0, i64 %185
  %187 = getelementptr inbounds %struct.db_socket_t, ptr %186, i32 0, i32 0
  %188 = load i32, ptr %187, align 8, !tbaa !41
  store i32 %188, ptr %10, align 4, !tbaa !5
  br label %189

189:                                              ; preds = %183, %156
  br label %190

190:                                              ; preds = %189
  %191 = load i32, ptr %42, align 4, !tbaa !5
  %192 = add nsw i32 %191, 1
  store i32 %192, ptr %42, align 4, !tbaa !5
  br label %151, !llvm.loop !44

193:                                              ; preds = %155
  call void @llvm.lifetime.start.p0(i64 4, ptr %43) #9
  store i32 0, ptr %43, align 4, !tbaa !5
  br label %194

194:                                              ; preds = %235, %193
  %195 = load i32, ptr %43, align 4, !tbaa !5
  %196 = icmp slt i32 %195, 10
  br i1 %196, label %198, label %197

197:                                              ; preds = %194
  call void @llvm.lifetime.end.p0(i64 4, ptr %43) #9
  br label %238

198:                                              ; preds = %194
  %199 = load i32, ptr %43, align 4, !tbaa !5
  %200 = sext i32 %199 to i64
  %201 = getelementptr inbounds [10 x i32], ptr %24, i64 0, i64 %200
  %202 = load i32, ptr %201, align 4, !tbaa !5
  %203 = icmp sgt i32 %202, 0
  br i1 %203, label %204, label %234

204:                                              ; preds = %198
  %205 = load i32, ptr %43, align 4, !tbaa !5
  %206 = sext i32 %205 to i64
  %207 = getelementptr inbounds [10 x i32], ptr %24, i64 0, i64 %206
  %208 = load i32, ptr %207, align 4, !tbaa !5
  %209 = srem i32 %208, 64
  %210 = zext i32 %209 to i64
  %211 = shl i64 1, %210
  %212 = getelementptr inbounds %struct.fd_set, ptr %36, i32 0, i32 0
  %213 = load i32, ptr %43, align 4, !tbaa !5
  %214 = sext i32 %213 to i64
  %215 = getelementptr inbounds [10 x i32], ptr %24, i64 0, i64 %214
  %216 = load i32, ptr %215, align 4, !tbaa !5
  %217 = sdiv i32 %216, 64
  %218 = sext i32 %217 to i64
  %219 = getelementptr inbounds [16 x i64], ptr %212, i64 0, i64 %218
  %220 = load i64, ptr %219, align 8, !tbaa !11
  %221 = or i64 %220, %211
  store i64 %221, ptr %219, align 8, !tbaa !11
  %222 = load i32, ptr %43, align 4, !tbaa !5
  %223 = sext i32 %222 to i64
  %224 = getelementptr inbounds [10 x i32], ptr %24, i64 0, i64 %223
  %225 = load i32, ptr %224, align 4, !tbaa !5
  %226 = load i32, ptr %10, align 4, !tbaa !5
  %227 = icmp sgt i32 %225, %226
  br i1 %227, label %228, label %233

228:                                              ; preds = %204
  %229 = load i32, ptr %43, align 4, !tbaa !5
  %230 = sext i32 %229 to i64
  %231 = getelementptr inbounds [10 x i32], ptr %24, i64 0, i64 %230
  %232 = load i32, ptr %231, align 4, !tbaa !5
  store i32 %232, ptr %10, align 4, !tbaa !5
  br label %233

233:                                              ; preds = %228, %204
  br label %234

234:                                              ; preds = %233, %198
  br label %235

235:                                              ; preds = %234
  %236 = load i32, ptr %43, align 4, !tbaa !5
  %237 = add nsw i32 %236, 1
  store i32 %237, ptr %43, align 4, !tbaa !5
  br label %194, !llvm.loop !45

238:                                              ; preds = %197
  %239 = load i32, ptr %10, align 4, !tbaa !5
  %240 = add nsw i32 %239, 1
  %241 = call i32 @select(i32 noundef %240, ptr noundef %36, ptr noundef null, ptr noundef null, ptr noundef %37)
  store i32 %241, ptr %9, align 4, !tbaa !5
  %242 = load i32, ptr %9, align 4, !tbaa !5
  %243 = icmp eq i32 %242, -1
  br i1 %243, label %244, label %249

244:                                              ; preds = %238
  %245 = call ptr @__errno_location() #10
  %246 = load i32, ptr %245, align 4, !tbaa !5
  %247 = icmp ne i32 %246, 4
  br i1 %247, label %248, label %249

248:                                              ; preds = %244
  call void @perror(ptr noundef @.str.3)
  br label %507

249:                                              ; preds = %244, %238
  %250 = load i32, ptr %9, align 4, !tbaa !5
  %251 = icmp sgt i32 %250, 0
  br i1 %251, label %252, label %506

252:                                              ; preds = %249
  call void @llvm.lifetime.start.p0(i64 4, ptr %44) #9
  store i32 0, ptr %44, align 4, !tbaa !5
  br label %253

253:                                              ; preds = %339, %252
  %254 = load i32, ptr %44, align 4, !tbaa !5
  %255 = load i32, ptr @num_inf_status, align 4, !tbaa !5
  %256 = icmp slt i32 %254, %255
  br i1 %256, label %258, label %257

257:                                              ; preds = %253
  call void @llvm.lifetime.end.p0(i64 4, ptr %44) #9
  br label %342

258:                                              ; preds = %253
  %259 = getelementptr inbounds %struct.fd_set, ptr %36, i32 0, i32 0
  %260 = load i32, ptr %44, align 4, !tbaa !5
  %261 = sext i32 %260 to i64
  %262 = getelementptr inbounds [4 x %struct.db_socket_t], ptr %33, i64 0, i64 %261
  %263 = getelementptr inbounds %struct.db_socket_t, ptr %262, i32 0, i32 0
  %264 = load i32, ptr %263, align 8, !tbaa !41
  %265 = sdiv i32 %264, 64
  %266 = sext i32 %265 to i64
  %267 = getelementptr inbounds [16 x i64], ptr %259, i64 0, i64 %266
  %268 = load i64, ptr %267, align 8, !tbaa !11
  %269 = load i32, ptr %44, align 4, !tbaa !5
  %270 = sext i32 %269 to i64
  %271 = getelementptr inbounds [4 x %struct.db_socket_t], ptr %33, i64 0, i64 %270
  %272 = getelementptr inbounds %struct.db_socket_t, ptr %271, i32 0, i32 0
  %273 = load i32, ptr %272, align 8, !tbaa !41
  %274 = srem i32 %273, 64
  %275 = zext i32 %274 to i64
  %276 = shl i64 1, %275
  %277 = and i64 %268, %276
  %278 = icmp ne i64 %277, 0
  br i1 %278, label %279, label %338

279:                                              ; preds = %258
  %280 = load i32, ptr %44, align 4, !tbaa !5
  %281 = sext i32 %280 to i64
  %282 = getelementptr inbounds [4 x %struct.db_socket_t], ptr %33, i64 0, i64 %281
  %283 = getelementptr inbounds %struct.db_socket_t, ptr %282, i32 0, i32 0
  %284 = load i32, ptr %283, align 8, !tbaa !41
  %285 = getelementptr inbounds [2048 x i8], ptr %21, i64 0, i64 0
  %286 = call i64 @recv(i32 noundef %284, ptr noundef %285, i64 noundef 2048, i32 noundef 0)
  store i64 %286, ptr %18, align 8, !tbaa !11
  %287 = load i64, ptr %18, align 8, !tbaa !11
  %288 = icmp sgt i64 %287, 0
  br i1 %288, label %289, label %337

289:                                              ; preds = %279
  %290 = getelementptr inbounds [2048 x i8], ptr %21, i64 0, i64 0
  %291 = load i64, ptr %18, align 8, !tbaa !11
  %292 = getelementptr inbounds [2038 x i8], ptr %22, i64 0, i64 0
  %293 = call zeroext i16 @get_db_payload(ptr noundef %290, i64 noundef %291, ptr noundef %292, ptr noundef %19, ptr noundef %20)
  %294 = load i32, ptr %12, align 4, !tbaa !5
  %295 = load i8, ptr %19, align 1, !tbaa !13
  %296 = zext i8 %295 to i32
  %297 = icmp ne i32 %294, %296
  br i1 %297, label %298, label %336

298:                                              ; preds = %289
  %299 = load i8, ptr %19, align 1, !tbaa !13
  %300 = zext i8 %299 to i32
  store i32 %300, ptr %12, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %45) #9
  %301 = getelementptr inbounds [2038 x i8], ptr %22, i64 0, i64 0
  store ptr %301, ptr %45, align 8, !tbaa !9
  %302 = load ptr, ptr %45, align 8, !tbaa !9
  %303 = getelementptr inbounds %struct.uav_rc_status_update_message_t, ptr %302, i32 0, i32 0
  %304 = load i8, ptr %303, align 1, !tbaa !46
  %305 = getelementptr inbounds %struct.db_system_status_msg_t, ptr %26, i32 0, i32 4
  store i8 %304, ptr %305, align 1, !tbaa !20
  %306 = load ptr, ptr %45, align 8, !tbaa !9
  %307 = getelementptr inbounds %struct.uav_rc_status_update_message_t, ptr %306, i32 0, i32 1
  %308 = load i8, ptr %307, align 1, !tbaa !48
  %309 = getelementptr inbounds %struct.db_system_status_msg_t, ptr %26, i32 0, i32 3
  store i8 %308, ptr %309, align 1, !tbaa !19
  %310 = getelementptr inbounds %struct.db_system_status_msg_t, ptr %26, i32 0, i32 4
  %311 = load i8, ptr %310, align 1, !tbaa !20
  %312 = load ptr, ptr %27, align 8, !tbaa !9
  %313 = getelementptr inbounds %struct.db_rc_status_t, ptr %312, i32 0, i32 9
  %314 = getelementptr inbounds [8 x %struct.db_adapter_status], ptr %313, i64 0, i64 0
  %315 = getelementptr inbounds %struct.db_adapter_status, ptr %314, i32 0, i32 2
  store i8 %311, ptr %315, align 1, !tbaa !49
  %316 = getelementptr inbounds %struct.db_system_status_msg_t, ptr %26, i32 0, i32 3
  %317 = load i8, ptr %316, align 1, !tbaa !19
  %318 = zext i8 %317 to i32
  %319 = load ptr, ptr %27, align 8, !tbaa !9
  %320 = getelementptr inbounds %struct.db_rc_status_t, ptr %319, i32 0, i32 4
  store i32 %318, ptr %320, align 1, !tbaa !51
  %321 = load ptr, ptr %45, align 8, !tbaa !9
  %322 = getelementptr inbounds %struct.uav_rc_status_update_message_t, ptr %321, i32 0, i32 2
  %323 = load i8, ptr %322, align 1, !tbaa !52
  %324 = load ptr, ptr %31, align 8, !tbaa !9
  %325 = getelementptr inbounds %struct.db_uav_status_t, ptr %324, i32 0, i32 1
  store i8 %323, ptr %325, align 1, !tbaa !53
  %326 = load ptr, ptr %45, align 8, !tbaa !9
  %327 = getelementptr inbounds %struct.uav_rc_status_update_message_t, ptr %326, i32 0, i32 3
  %328 = load i8, ptr %327, align 1, !tbaa !55
  %329 = load ptr, ptr %31, align 8, !tbaa !9
  %330 = getelementptr inbounds %struct.db_uav_status_t, ptr %329, i32 0, i32 2
  store i8 %328, ptr %330, align 1, !tbaa !56
  %331 = load ptr, ptr %45, align 8, !tbaa !9
  %332 = getelementptr inbounds %struct.uav_rc_status_update_message_t, ptr %331, i32 0, i32 4
  %333 = load i8, ptr %332, align 1, !tbaa !57
  %334 = load ptr, ptr %31, align 8, !tbaa !9
  %335 = getelementptr inbounds %struct.db_uav_status_t, ptr %334, i32 0, i32 11
  store i8 %333, ptr %335, align 1, !tbaa !58
  call void @llvm.lifetime.end.p0(i64 8, ptr %45) #9
  br label %336

336:                                              ; preds = %298, %289
  br label %337

337:                                              ; preds = %336, %279
  br label %338

338:                                              ; preds = %337, %258
  br label %339

339:                                              ; preds = %338
  %340 = load i32, ptr %44, align 4, !tbaa !5
  %341 = add nsw i32 %340, 1
  store i32 %341, ptr %44, align 4, !tbaa !5
  br label %253, !llvm.loop !59

342:                                              ; preds = %257
  %343 = getelementptr inbounds %struct.fd_set, ptr %36, i32 0, i32 0
  %344 = getelementptr inbounds %struct.tcp_server_info_t, ptr %38, i32 0, i32 0
  %345 = load i32, ptr %344, align 4, !tbaa !37
  %346 = sdiv i32 %345, 64
  %347 = sext i32 %346 to i64
  %348 = getelementptr inbounds [16 x i64], ptr %343, i64 0, i64 %347
  %349 = load i64, ptr %348, align 8, !tbaa !11
  %350 = getelementptr inbounds %struct.tcp_server_info_t, ptr %38, i32 0, i32 0
  %351 = load i32, ptr %350, align 4, !tbaa !37
  %352 = srem i32 %351, 64
  %353 = zext i32 %352 to i64
  %354 = shl i64 1, %353
  %355 = and i64 %349, %354
  %356 = icmp ne i64 %355, 0
  br i1 %356, label %357, label %411

357:                                              ; preds = %342
  %358 = getelementptr inbounds %struct.tcp_server_info_t, ptr %38, i32 0, i32 0
  %359 = load i32, ptr %358, align 4, !tbaa !37
  %360 = getelementptr inbounds %struct.tcp_server_info_t, ptr %38, i32 0, i32 1
  %361 = call i32 @accept(i32 noundef %359, ptr noundef %360, ptr noundef %39)
  store i32 %361, ptr %11, align 4, !tbaa !5
  %362 = icmp slt i32 %361, 0
  br i1 %362, label %363, label %364

363:                                              ; preds = %357
  call void @perror(ptr noundef @.str.4)
  br label %410

364:                                              ; preds = %357
  call void @llvm.lifetime.start.p0(i64 4, ptr %46) #9
  store i32 0, ptr %46, align 4, !tbaa !5
  br label %365

365:                                              ; preds = %405, %364
  %366 = load i32, ptr %46, align 4, !tbaa !5
  %367 = icmp slt i32 %366, 10
  br i1 %367, label %369, label %368

368:                                              ; preds = %365
  store i32 23, ptr %47, align 4
  br label %408

369:                                              ; preds = %365
  %370 = load i32, ptr %46, align 4, !tbaa !5
  %371 = sext i32 %370 to i64
  %372 = getelementptr inbounds [10 x i32], ptr %24, i64 0, i64 %371
  %373 = load i32, ptr %372, align 4, !tbaa !5
  %374 = icmp eq i32 %373, 0
  br i1 %374, label %375, label %404

375:                                              ; preds = %369
  %376 = load i32, ptr %11, align 4, !tbaa !5
  %377 = load i32, ptr %46, align 4, !tbaa !5
  %378 = sext i32 %377 to i64
  %379 = getelementptr inbounds [10 x i32], ptr %24, i64 0, i64 %378
  store i32 %376, ptr %379, align 4, !tbaa !5
  br label %380

380:                                              ; preds = %375
  %381 = getelementptr inbounds %struct.tcp_server_info_t, ptr %38, i32 0, i32 1
  %382 = getelementptr inbounds %struct.sockaddr_in, ptr %381, i32 0, i32 2
  %383 = getelementptr inbounds %struct.in_addr, ptr %382, i32 0, i32 0
  %384 = load i32, ptr %383, align 4
  %385 = call ptr @inet_ntoa(i32 %384) #9
  %386 = getelementptr inbounds %struct.tcp_server_info_t, ptr %38, i32 0, i32 1
  %387 = getelementptr inbounds %struct.sockaddr_in, ptr %386, i32 0, i32 1
  %388 = load i16, ptr %387, align 2, !tbaa !60
  %389 = call zeroext i16 @__bswap_16(i16 noundef zeroext %388)
  %390 = zext i16 %389 to i32
  %391 = call i32 (ptr, ...) @printf(ptr noundef @.str.5, ptr noundef %385, i32 noundef %390)
  %392 = getelementptr inbounds %struct.tcp_server_info_t, ptr %38, i32 0, i32 1
  %393 = getelementptr inbounds %struct.sockaddr_in, ptr %392, i32 0, i32 2
  %394 = getelementptr inbounds %struct.in_addr, ptr %393, i32 0, i32 0
  %395 = load i32, ptr %394, align 4
  %396 = call ptr @inet_ntoa(i32 %395) #9
  %397 = getelementptr inbounds %struct.tcp_server_info_t, ptr %38, i32 0, i32 1
  %398 = getelementptr inbounds %struct.sockaddr_in, ptr %397, i32 0, i32 1
  %399 = load i16, ptr %398, align 2, !tbaa !60
  %400 = call zeroext i16 @__bswap_16(i16 noundef zeroext %399)
  %401 = zext i16 %400 to i32
  call void (i32, ptr, ...) @syslog(i32 noundef 6, ptr noundef @.str.5, ptr noundef %396, i32 noundef %401)
  br label %402

402:                                              ; preds = %380
  br label %403

403:                                              ; preds = %402
  store i32 23, ptr %47, align 4
  br label %408

404:                                              ; preds = %369
  br label %405

405:                                              ; preds = %404
  %406 = load i32, ptr %46, align 4, !tbaa !5
  %407 = add nsw i32 %406, 1
  store i32 %407, ptr %46, align 4, !tbaa !5
  br label %365, !llvm.loop !61

408:                                              ; preds = %403, %368
  call void @llvm.lifetime.end.p0(i64 4, ptr %46) #9
  br label %409

409:                                              ; preds = %408
  br label %410

410:                                              ; preds = %409, %363
  br label %411

411:                                              ; preds = %410, %342
  call void @llvm.lifetime.start.p0(i64 4, ptr %48) #9
  store i32 0, ptr %48, align 4, !tbaa !5
  br label %412

412:                                              ; preds = %502, %411
  %413 = load i32, ptr %48, align 4, !tbaa !5
  %414 = icmp slt i32 %413, 10
  br i1 %414, label %416, label %415

415:                                              ; preds = %412
  store i32 28, ptr %47, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %48) #9
  br label %505

416:                                              ; preds = %412
  %417 = getelementptr inbounds %struct.fd_set, ptr %36, i32 0, i32 0
  %418 = load i32, ptr %48, align 4, !tbaa !5
  %419 = sext i32 %418 to i64
  %420 = getelementptr inbounds [10 x i32], ptr %24, i64 0, i64 %419
  %421 = load i32, ptr %420, align 4, !tbaa !5
  %422 = sdiv i32 %421, 64
  %423 = sext i32 %422 to i64
  %424 = getelementptr inbounds [16 x i64], ptr %417, i64 0, i64 %423
  %425 = load i64, ptr %424, align 8, !tbaa !11
  %426 = load i32, ptr %48, align 4, !tbaa !5
  %427 = sext i32 %426 to i64
  %428 = getelementptr inbounds [10 x i32], ptr %24, i64 0, i64 %427
  %429 = load i32, ptr %428, align 4, !tbaa !5
  %430 = srem i32 %429, 64
  %431 = zext i32 %430 to i64
  %432 = shl i64 1, %431
  %433 = and i64 %425, %432
  %434 = icmp ne i64 %433, 0
  br i1 %434, label %435, label %501

435:                                              ; preds = %416
  %436 = load i32, ptr %48, align 4, !tbaa !5
  %437 = sext i32 %436 to i64
  %438 = getelementptr inbounds [10 x i32], ptr %24, i64 0, i64 %437
  %439 = load i32, ptr %438, align 4, !tbaa !5
  %440 = getelementptr inbounds [2048 x i8], ptr %23, i64 0, i64 0
  %441 = call i64 @read(i32 noundef %439, ptr noundef %440, i64 noundef 2048)
  %442 = icmp eq i64 %441, 0
  br i1 %442, label %443, label %482

443:                                              ; preds = %435
  %444 = load i32, ptr %48, align 4, !tbaa !5
  %445 = sext i32 %444 to i64
  %446 = getelementptr inbounds [10 x i32], ptr %24, i64 0, i64 %445
  %447 = load i32, ptr %446, align 4, !tbaa !5
  %448 = getelementptr inbounds %struct.tcp_server_info_t, ptr %38, i32 0, i32 1
  %449 = call i32 @getpeername(i32 noundef %447, ptr noundef %448, ptr noundef %39) #9
  br label %450

450:                                              ; preds = %443
  %451 = getelementptr inbounds %struct.tcp_server_info_t, ptr %38, i32 0, i32 1
  %452 = getelementptr inbounds %struct.sockaddr_in, ptr %451, i32 0, i32 2
  %453 = getelementptr inbounds %struct.in_addr, ptr %452, i32 0, i32 0
  %454 = load i32, ptr %453, align 4
  %455 = call ptr @inet_ntoa(i32 %454) #9
  %456 = getelementptr inbounds %struct.tcp_server_info_t, ptr %38, i32 0, i32 1
  %457 = getelementptr inbounds %struct.sockaddr_in, ptr %456, i32 0, i32 1
  %458 = load i16, ptr %457, align 2, !tbaa !60
  %459 = call zeroext i16 @__bswap_16(i16 noundef zeroext %458)
  %460 = zext i16 %459 to i32
  %461 = call i32 (ptr, ...) @printf(ptr noundef @.str.6, ptr noundef %455, i32 noundef %460)
  %462 = getelementptr inbounds %struct.tcp_server_info_t, ptr %38, i32 0, i32 1
  %463 = getelementptr inbounds %struct.sockaddr_in, ptr %462, i32 0, i32 2
  %464 = getelementptr inbounds %struct.in_addr, ptr %463, i32 0, i32 0
  %465 = load i32, ptr %464, align 4
  %466 = call ptr @inet_ntoa(i32 %465) #9
  %467 = getelementptr inbounds %struct.tcp_server_info_t, ptr %38, i32 0, i32 1
  %468 = getelementptr inbounds %struct.sockaddr_in, ptr %467, i32 0, i32 1
  %469 = load i16, ptr %468, align 2, !tbaa !60
  %470 = call zeroext i16 @__bswap_16(i16 noundef zeroext %469)
  %471 = zext i16 %470 to i32
  call void (i32, ptr, ...) @syslog(i32 noundef 6, ptr noundef @.str.6, ptr noundef %466, i32 noundef %471)
  br label %472

472:                                              ; preds = %450
  br label %473

473:                                              ; preds = %472
  %474 = load i32, ptr %48, align 4, !tbaa !5
  %475 = sext i32 %474 to i64
  %476 = getelementptr inbounds [10 x i32], ptr %24, i64 0, i64 %475
  %477 = load i32, ptr %476, align 4, !tbaa !5
  %478 = call i32 @close(i32 noundef %477)
  %479 = load i32, ptr %48, align 4, !tbaa !5
  %480 = sext i32 %479 to i64
  %481 = getelementptr inbounds [10 x i32], ptr %24, i64 0, i64 %480
  store i32 0, ptr %481, align 4, !tbaa !5
  br label %500

482:                                              ; preds = %435
  %483 = getelementptr inbounds [2048 x i8], ptr %23, i64 0, i64 2
  %484 = load i8, ptr %483, align 2, !tbaa !13
  %485 = zext i8 %484 to i32
  switch i32 %485, label %494 [
    i32 3, label %486
  ]

486:                                              ; preds = %482
  %487 = load ptr, ptr %29, align 8, !tbaa !9
  %488 = getelementptr inbounds %struct.db_rc_overwrite_values_t, ptr %487, i32 0, i32 1
  %489 = getelementptr inbounds [14 x i16], ptr %488, i64 0, i64 0
  %490 = getelementptr inbounds [2048 x i8], ptr %23, i64 0, i64 3
  call void @llvm.memcpy.p0.p0.i64(ptr align 1 %489, ptr align 1 %490, i64 28, i1 false)
  %491 = call i32 @clock_gettime(i32 noundef 6, ptr noundef %6) #9
  %492 = load ptr, ptr %29, align 8, !tbaa !9
  %493 = getelementptr inbounds %struct.db_rc_overwrite_values_t, ptr %492, i32 0, i32 0
  call void @llvm.memcpy.p0.p0.i64(ptr align 1 %493, ptr align 8 %6, i64 16, i1 false), !tbaa.struct !62
  br label %499

494:                                              ; preds = %482
  br label %495

495:                                              ; preds = %494
  %496 = call i32 (ptr, ...) @printf(ptr noundef @.str.7)
  call void (i32, ptr, ...) @syslog(i32 noundef 4, ptr noundef @.str.7)
  br label %497

497:                                              ; preds = %495
  br label %498

498:                                              ; preds = %497
  br label %499

499:                                              ; preds = %498, %486
  br label %500

500:                                              ; preds = %499, %473
  br label %501

501:                                              ; preds = %500, %416
  br label %502

502:                                              ; preds = %501
  %503 = load i32, ptr %48, align 4, !tbaa !5
  %504 = add nsw i32 %503, 1
  store i32 %504, ptr %48, align 4, !tbaa !5
  br label %412, !llvm.loop !63

505:                                              ; preds = %415
  br label %506

506:                                              ; preds = %505, %249
  br label %507

507:                                              ; preds = %506, %248
  %508 = call i32 @gettimeofday(ptr noundef %13, ptr noundef null) #9
  %509 = getelementptr inbounds %struct.timeval, ptr %13, i32 0, i32 0
  %510 = load i64, ptr %509, align 8, !tbaa !29
  %511 = mul nsw i64 %510, 1000
  %512 = getelementptr inbounds %struct.timeval, ptr %13, i32 0, i32 1
  %513 = load i64, ptr %512, align 8, !tbaa !31
  %514 = sdiv i64 %513, 1000
  %515 = add nsw i64 %511, %514
  store i64 %515, ptr %15, align 8, !tbaa !11
  %516 = load i64, ptr %15, align 8, !tbaa !11
  %517 = load i64, ptr %14, align 8, !tbaa !11
  %518 = sub nsw i64 %516, %517
  %519 = load i64, ptr %16, align 8, !tbaa !11
  %520 = icmp sge i64 %518, %519
  br i1 %520, label %521, label %594

521:                                              ; preds = %507
  store i8 -128, ptr %17, align 1, !tbaa !13
  store i32 0, ptr %8, align 4, !tbaa !5
  br label %522

522:                                              ; preds = %547, %521
  %523 = load i32, ptr %8, align 4, !tbaa !5
  %524 = load i32, ptr %32, align 4, !tbaa !5
  %525 = icmp slt i32 %523, %524
  br i1 %525, label %526, label %550

526:                                              ; preds = %522
  %527 = load i8, ptr %17, align 1, !tbaa !13
  %528 = sext i8 %527 to i32
  %529 = load ptr, ptr %30, align 8, !tbaa !9
  %530 = getelementptr inbounds %struct.db_gnd_status_t, ptr %529, i32 0, i32 9
  %531 = load i32, ptr %8, align 4, !tbaa !5
  %532 = sext i32 %531 to i64
  %533 = getelementptr inbounds [8 x %struct.db_adapter_status], ptr %530, i64 0, i64 %532
  %534 = getelementptr inbounds %struct.db_adapter_status, ptr %533, i32 0, i32 2
  %535 = load i8, ptr %534, align 1, !tbaa !49
  %536 = sext i8 %535 to i32
  %537 = icmp slt i32 %528, %536
  br i1 %537, label %538, label %546

538:                                              ; preds = %526
  %539 = load ptr, ptr %30, align 8, !tbaa !9
  %540 = getelementptr inbounds %struct.db_gnd_status_t, ptr %539, i32 0, i32 9
  %541 = load i32, ptr %8, align 4, !tbaa !5
  %542 = sext i32 %541 to i64
  %543 = getelementptr inbounds [8 x %struct.db_adapter_status], ptr %540, i64 0, i64 %542
  %544 = getelementptr inbounds %struct.db_adapter_status, ptr %543, i32 0, i32 2
  %545 = load i8, ptr %544, align 1, !tbaa !49
  store i8 %545, ptr %17, align 1, !tbaa !13
  br label %546

546:                                              ; preds = %538, %526
  br label %547

547:                                              ; preds = %546
  %548 = load i32, ptr %8, align 4, !tbaa !5
  %549 = add nsw i32 %548, 1
  store i32 %549, ptr %8, align 4, !tbaa !5
  br label %522, !llvm.loop !64

550:                                              ; preds = %522
  %551 = load i8, ptr %17, align 1, !tbaa !13
  %552 = getelementptr inbounds %struct.db_system_status_msg_t, ptr %26, i32 0, i32 5
  store i8 %551, ptr %552, align 1, !tbaa !65
  %553 = load ptr, ptr %30, align 8, !tbaa !9
  %554 = getelementptr inbounds %struct.db_gnd_status_t, ptr %553, i32 0, i32 2
  %555 = load i32, ptr %554, align 1, !tbaa !66
  %556 = getelementptr inbounds %struct.db_system_status_msg_t, ptr %26, i32 0, i32 6
  store i32 %555, ptr %556, align 1, !tbaa !67
  %557 = load ptr, ptr %30, align 8, !tbaa !9
  %558 = getelementptr inbounds %struct.db_gnd_status_t, ptr %557, i32 0, i32 3
  %559 = load i32, ptr %558, align 1, !tbaa !68
  %560 = getelementptr inbounds %struct.db_system_status_msg_t, ptr %26, i32 0, i32 7
  store i32 %559, ptr %560, align 1, !tbaa !69
  %561 = load ptr, ptr %30, align 8, !tbaa !9
  %562 = getelementptr inbounds %struct.db_gnd_status_t, ptr %561, i32 0, i32 7
  %563 = load i32, ptr %562, align 1, !tbaa !70
  %564 = getelementptr inbounds %struct.db_system_status_msg_t, ptr %26, i32 0, i32 8
  store i32 %563, ptr %564, align 1, !tbaa !71
  %565 = load ptr, ptr %31, align 8, !tbaa !9
  %566 = getelementptr inbounds %struct.db_uav_status_t, ptr %565, i32 0, i32 11
  %567 = load i8, ptr %566, align 1, !tbaa !58
  %568 = getelementptr inbounds %struct.db_system_status_msg_t, ptr %26, i32 0, i32 9
  store i8 %567, ptr %568, align 1, !tbaa !21
  %569 = load ptr, ptr %30, align 8, !tbaa !9
  %570 = getelementptr inbounds %struct.db_gnd_status_t, ptr %569, i32 0, i32 6
  %571 = load i32, ptr %570, align 1, !tbaa !72
  %572 = load i32, ptr %7, align 4, !tbaa !5
  %573 = icmp ugt i32 %571, %572
  br i1 %573, label %574, label %578

574:                                              ; preds = %550
  %575 = load i32, ptr %7, align 4, !tbaa !5
  %576 = add nsw i32 %575, 1
  store i32 %576, ptr %7, align 4, !tbaa !5
  %577 = call i32 @usleep(i32 noundef 10000000)
  br label %578

578:                                              ; preds = %574, %550
  %579 = getelementptr inbounds [10 x i32], ptr %24, i64 0, i64 0
  call void @send_to_all_tcp_clients(ptr noundef %579, ptr noundef %26, i32 noundef 20)
  %580 = getelementptr inbounds %struct.db_rc_msg_t, ptr %25, i32 0, i32 2
  %581 = getelementptr inbounds [14 x i16], ptr %580, i64 0, i64 0
  %582 = load ptr, ptr %28, align 8, !tbaa !9
  %583 = getelementptr inbounds %struct.db_rc_values_t, ptr %582, i32 0, i32 0
  %584 = getelementptr inbounds [14 x i16], ptr %583, i64 0, i64 0
  call void @llvm.memcpy.p0.p0.i64(ptr align 1 %581, ptr align 1 %584, i64 28, i1 false)
  %585 = getelementptr inbounds [10 x i32], ptr %24, i64 0, i64 0
  call void @send_to_all_tcp_clients(ptr noundef %585, ptr noundef %25, i32 noundef 31)
  %586 = call i32 @gettimeofday(ptr noundef %13, ptr noundef null) #9
  %587 = getelementptr inbounds %struct.timeval, ptr %13, i32 0, i32 0
  %588 = load i64, ptr %587, align 8, !tbaa !29
  %589 = mul nsw i64 %588, 1000
  %590 = getelementptr inbounds %struct.timeval, ptr %13, i32 0, i32 1
  %591 = load i64, ptr %590, align 8, !tbaa !31
  %592 = sdiv i64 %591, 1000
  %593 = add nsw i64 %589, %592
  store i64 %593, ptr %14, align 8, !tbaa !11
  br label %594

594:                                              ; preds = %578, %507
  br label %113, !llvm.loop !73

595:                                              ; preds = %113
  call void @llvm.lifetime.start.p0(i64 4, ptr %49) #9
  store i32 0, ptr %49, align 4, !tbaa !5
  br label %596

596:                                              ; preds = %613, %595
  %597 = load i32, ptr %49, align 4, !tbaa !5
  %598 = icmp slt i32 %597, 10
  br i1 %598, label %600, label %599

599:                                              ; preds = %596
  store i32 39, ptr %47, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %49) #9
  br label %616

600:                                              ; preds = %596
  %601 = load i32, ptr %49, align 4, !tbaa !5
  %602 = sext i32 %601 to i64
  %603 = getelementptr inbounds [10 x i32], ptr %24, i64 0, i64 %602
  %604 = load i32, ptr %603, align 4, !tbaa !5
  %605 = icmp sgt i32 %604, 0
  br i1 %605, label %606, label %612

606:                                              ; preds = %600
  %607 = load i32, ptr %49, align 4, !tbaa !5
  %608 = sext i32 %607 to i64
  %609 = getelementptr inbounds [10 x i32], ptr %24, i64 0, i64 %608
  %610 = load i32, ptr %609, align 4, !tbaa !5
  %611 = call i32 @close(i32 noundef %610)
  br label %612

612:                                              ; preds = %606, %600
  br label %613

613:                                              ; preds = %612
  %614 = load i32, ptr %49, align 4, !tbaa !5
  %615 = add nsw i32 %614, 1
  store i32 %615, ptr %49, align 4, !tbaa !5
  br label %596, !llvm.loop !74

616:                                              ; preds = %599
  %617 = getelementptr inbounds %struct.tcp_server_info_t, ptr %38, i32 0, i32 0
  %618 = load i32, ptr %617, align 4, !tbaa !37
  %619 = call i32 @close(i32 noundef %618)
  call void @llvm.lifetime.start.p0(i64 4, ptr %50) #9
  store i32 0, ptr %50, align 4, !tbaa !5
  br label %620

620:                                              ; preds = %639, %616
  %621 = load i32, ptr %50, align 4, !tbaa !5
  %622 = icmp slt i32 %621, 4
  br i1 %622, label %624, label %623

623:                                              ; preds = %620
  store i32 42, ptr %47, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %50) #9
  br label %642

624:                                              ; preds = %620
  %625 = load i32, ptr %50, align 4, !tbaa !5
  %626 = sext i32 %625 to i64
  %627 = getelementptr inbounds [4 x %struct.db_socket_t], ptr %33, i64 0, i64 %626
  %628 = getelementptr inbounds %struct.db_socket_t, ptr %627, i32 0, i32 0
  %629 = load i32, ptr %628, align 8, !tbaa !41
  %630 = icmp sgt i32 %629, 0
  br i1 %630, label %631, label %638

631:                                              ; preds = %624
  %632 = load i32, ptr %50, align 4, !tbaa !5
  %633 = sext i32 %632 to i64
  %634 = getelementptr inbounds [4 x %struct.db_socket_t], ptr %33, i64 0, i64 %633
  %635 = getelementptr inbounds %struct.db_socket_t, ptr %634, i32 0, i32 0
  %636 = load i32, ptr %635, align 8, !tbaa !41
  %637 = call i32 @close(i32 noundef %636)
  br label %638

638:                                              ; preds = %631, %624
  br label %639

639:                                              ; preds = %638
  %640 = load i32, ptr %50, align 4, !tbaa !5
  %641 = add nsw i32 %640, 1
  store i32 %641, ptr %50, align 4, !tbaa !5
  br label %620, !llvm.loop !75

642:                                              ; preds = %623
  br label %643

643:                                              ; preds = %642
  %644 = call i32 (ptr, ...) @printf(ptr noundef @.str.8)
  call void (i32, ptr, ...) @syslog(i32 noundef 6, ptr noundef @.str.8)
  br label %645

645:                                              ; preds = %643
  br label %646

646:                                              ; preds = %645
  call void @exit(i32 noundef 0) #11
  unreachable
}

; Function Attrs: nounwind
declare ptr @signal(i32 noundef, ptr noundef) #3

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

declare ptr @db_rc_status_memory_open() #2

declare ptr @db_rc_values_memory_open() #2

declare ptr @db_rc_overwrite_values_memory_open() #2

declare ptr @db_gnd_status_memory_open() #2

declare ptr @db_uav_status_memory_open() #2

declare void @open_db_socket(ptr dead_on_unwind writable sret(%struct.db_socket_t) align 4, ptr noundef, i8 noundef zeroext, i8 noundef signext, i32 noundef, i8 noundef zeroext, i8 noundef zeroext, i8 noundef zeroext) #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) #5

declare void @create_tcp_server_socket(ptr dead_on_unwind writable sret(%struct.tcp_server_info_t) align 4, i32 noundef) #2

declare void @syslog(i32 noundef, ptr noundef, ...) #2

; Function Attrs: nounwind
declare i32 @gettimeofday(ptr noundef, ptr noundef) #3

declare i32 @select(i32 noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef) #2

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

declare void @perror(ptr noundef) #2

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

declare zeroext i16 @get_db_payload(ptr noundef, i64 noundef, ptr noundef, ptr noundef, ptr noundef) #2

declare i32 @accept(i32 noundef, ptr noundef, ptr noundef) #2

; Function Attrs: nounwind
declare ptr @inet_ntoa(i32) #3

; Function Attrs: inlinehint nounwind uwtable
declare hidden zeroext i16 @__bswap_16(i16 noundef zeroext) #7

declare i64 @read(i32 noundef, ptr noundef, i64 noundef) #2

; Function Attrs: nounwind
declare i32 @getpeername(i32 noundef, ptr noundef, ptr noundef) #3

declare i32 @close(i32 noundef) #2

; Function Attrs: nounwind
declare i32 @clock_gettime(i32 noundef, ptr noundef) #3

declare i32 @usleep(i32 noundef) #2

declare void @send_to_all_tcp_clients(ptr noundef, ptr noundef, i32 noundef) #2

; Function Attrs: noreturn nounwind
declare void @exit(i32 noundef) #8

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 = { "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 = { nocallback nofree nounwind willreturn memory(argmem: write) }
attributes #5 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #6 = { 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 #7 = { 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 #8 = { noreturn 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 #9 = { nounwind }
attributes #10 = { nounwind willreturn memory(none) }
attributes #11 = { noreturn 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 = !{!"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, !12, i64 0}
!12 = !{!"long", !7, i64 0}
!13 = !{!7, !7, i64 0}
!14 = !{!15, !7, i64 2}
!15 = !{!"", !7, i64 0, !7, i64 2, !7, i64 3}
!16 = !{!17, !7, i64 2}
!17 = !{!"", !7, i64 0, !7, i64 2, !7, i64 3, !7, i64 4, !7, i64 5, !7, i64 6, !6, i64 7, !6, i64 11, !6, i64 15, !7, i64 19}
!18 = !{!17, !7, i64 3}
!19 = !{!17, !7, i64 4}
!20 = !{!17, !7, i64 5}
!21 = !{!17, !7, i64 19}
!22 = !{!23, !6, i64 36}
!23 = !{!"", !12, i64 0, !6, i64 8, !6, i64 12, !6, i64 16, !6, i64 20, !6, i64 24, !6, i64 28, !6, i64 32, !6, i64 36, !7, i64 40}
!24 = !{i64 0, i64 4, !5, i64 4, i64 2, !25, i64 6, i64 2, !25, i64 8, i64 4, !5, i64 12, i64 2, !25, i64 14, i64 1, !13, i64 15, i64 1, !13, i64 16, i64 8, !13}
!25 = !{!26, !26, i64 0}
!26 = !{!"short", !7, i64 0}
!27 = distinct !{!27, !28}
!28 = !{!"llvm.loop.mustprogress"}
!29 = !{!30, !12, i64 0}
!30 = !{!"timeval", !12, i64 0, !12, i64 8}
!31 = !{!30, !12, i64 8}
!32 = !{!33, !33, i64 0}
!33 = !{!"_Bool", !7, i64 0}
!34 = !{i8 0, i8 2}
!35 = !{}
!36 = distinct !{!36, !28}
!37 = !{!38, !6, i64 0}
!38 = !{!"tcp_server_info_t", !6, i64 0, !39, i64 4}
!39 = !{!"sockaddr_in", !26, i64 0, !26, i64 2, !40, i64 4, !7, i64 8}
!40 = !{!"in_addr", !6, i64 0}
!41 = !{!42, !6, i64 0}
!42 = !{!"", !6, i64 0, !43, i64 4}
!43 = !{!"sockaddr_ll", !26, i64 0, !26, i64 2, !6, i64 4, !26, i64 8, !7, i64 10, !7, i64 11, !7, i64 12}
!44 = distinct !{!44, !28}
!45 = distinct !{!45, !28}
!46 = !{!47, !7, i64 0}
!47 = !{!"uav_rc_status_update_message_t", !7, i64 0, !7, i64 1, !7, i64 2, !7, i64 3, !7, i64 4, !7, i64 5}
!48 = !{!47, !7, i64 1}
!49 = !{!50, !7, i64 8}
!50 = !{!"", !6, i64 0, !6, i64 4, !7, i64 8, !7, i64 9, !7, i64 13, !7, i64 14, !7, i64 15, !7, i64 16, !7, i64 17}
!51 = !{!23, !6, i64 20}
!52 = !{!47, !7, i64 2}
!53 = !{!54, !7, i64 4}
!54 = !{!"", !6, i64 0, !7, i64 4, !7, i64 5, !6, i64 6, !6, i64 10, !6, i64 14, !6, i64 18, !6, i64 22, !26, i64 26, !26, i64 28, !7, i64 30, !7, i64 31, !6, i64 32, !7, i64 36}
!55 = !{!47, !7, i64 3}
!56 = !{!54, !7, i64 5}
!57 = !{!47, !7, i64 4}
!58 = !{!54, !7, i64 31}
!59 = distinct !{!59, !28}
!60 = !{!38, !26, i64 6}
!61 = distinct !{!61, !28}
!62 = !{i64 0, i64 8, !11, i64 8, i64 8, !11}
!63 = distinct !{!63, !28}
!64 = distinct !{!64, !28}
!65 = !{!17, !7, i64 6}
!66 = !{!23, !6, i64 12}
!67 = !{!17, !6, i64 7}
!68 = !{!23, !6, i64 16}
!69 = !{!17, !6, i64 11}
!70 = !{!23, !6, i64 32}
!71 = !{!17, !6, i64 15}
!72 = !{!23, !6, i64 28}
!73 = distinct !{!73, !28}
!74 = distinct !{!74, !28}
!75 = distinct !{!75, !28}


; 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.timespec = type { i64, i64 }
%struct.timeval = type { i64, i64 }
%struct.db_rc_msg_t = type <{ [2 x i8], i8, [14 x i16] }>
%struct.db_system_status_msg_t = type <{ [2 x i8], i8, i8, i8, i8, i8, i32, i32, i32, i8 }>
%struct.db_socket_t = type { i32, %struct.sockaddr_ll }
%struct.sockaddr_ll = type { i16, i16, i32, i16, i8, i8, [8 x i8] }
%struct.fd_set = type { [16 x i64] }
%struct.tcp_server_info_t = type { i32, %struct.sockaddr_in }
%struct.sockaddr_in = type { i16, i16, %struct.in_addr, [8 x i8] }
%struct.in_addr = type { i32 }
%struct.db_adapter_status = type <{ i32, i32, i8, [4 x i8], i8, i8, i8, i8, [16 x i8] }>

@keeprunning = external dso_local global i8, align 1
@num_inf_status = external dso_local local_unnamed_addr global i32, align 4
@comm_id = external dso_local local_unnamed_addr global i8, align 1
@db_mode = external dso_local local_unnamed_addr global i8, align 1
@adapters = external dso_local global [4 x [16 x i8]], align 16
@.str.2 = external hidden unnamed_addr constant [25 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [42 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [51 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [39 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [44 x i8], align 1
@.str.7 = external hidden unnamed_addr constant [57 x i8], align 1
@.str.8 = external hidden unnamed_addr constant [28 x i8], align 1

; Function Attrs: nounwind uwtable
declare dso_local void @int_handler(i32 noundef) #0

; Function Attrs: nounwind uwtable
declare dso_local i32 @process_command_line_args(i32 noundef, ptr noundef) local_unnamed_addr #0

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

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

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

; Function Attrs: noreturn nounwind uwtable
define dso_local noundef i32 @main(i32 noundef %0, ptr noundef %1) local_unnamed_addr #3 {
  %3 = alloca %struct.timespec, align 8
  %4 = alloca %struct.timeval, align 8
  %5 = alloca i8, align 1
  %6 = alloca i16, align 2
  %7 = alloca [2048 x i8], align 16
  %8 = alloca [2038 x i8], align 16
  %9 = alloca [2048 x i8], align 16
  %10 = alloca [10 x i32], align 16
  %11 = alloca %struct.db_rc_msg_t, align 1
  %12 = alloca %struct.db_system_status_msg_t, align 4
  %13 = alloca [4 x %struct.db_socket_t], align 16
  %14 = alloca %struct.db_socket_t, align 4
  %15 = alloca %struct.fd_set, align 8
  %16 = alloca %struct.timeval, align 8
  %17 = alloca %struct.tcp_server_info_t, align 4
  %18 = alloca i32, align 4
  %19 = tail call ptr @signal(i32 noundef 2, ptr noundef nonnull @int_handler) #13
  %20 = tail call ptr @signal(i32 noundef 15, ptr noundef nonnull @int_handler) #13
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %3) #13
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %4) #13
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %5) #13
  store i8 0, ptr %5, align 1, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 2, ptr nonnull %6) #13
  call void @llvm.lifetime.start.p0(i64 2048, ptr nonnull %7) #13
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 16 dereferenceable(2048) %7, i8 0, i64 2048, i1 false)
  call void @llvm.lifetime.start.p0(i64 2038, ptr nonnull %8) #13
  call void @llvm.lifetime.start.p0(i64 2048, ptr nonnull %9) #13
  call void @llvm.lifetime.start.p0(i64 40, ptr nonnull %10) #13
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 16 dereferenceable(40) %10, i8 0, i64 40, i1 false)
  call void @llvm.lifetime.start.p0(i64 31, ptr nonnull %11) #13
  store i8 36, ptr %11, align 1, !tbaa !5
  %21 = getelementptr inbounds i8, ptr %11, i64 1
  store i8 68, ptr %21, align 1, !tbaa !5
  %22 = getelementptr inbounds i8, ptr %11, i64 2
  store i8 2, ptr %22, align 1, !tbaa !8
  call void @llvm.lifetime.start.p0(i64 20, ptr nonnull %12) #13
  store <4 x i8> <i8 36, i8 68, i8 1, i8 109>, ptr %12, align 4, !tbaa !5
  %23 = getelementptr inbounds i8, ptr %12, i64 4
  store i8 0, ptr %23, align 4, !tbaa !10
  %24 = getelementptr inbounds i8, ptr %12, i64 5
  store i8 0, ptr %24, align 1, !tbaa !13
  %25 = getelementptr inbounds i8, ptr %12, i64 19
  store i8 0, ptr %25, align 1, !tbaa !14
  %26 = tail call i32 @process_command_line_args(i32 noundef %0, ptr noundef %1)
  %27 = tail call ptr @db_rc_status_memory_open() #13
  %28 = tail call ptr @db_rc_values_memory_open() #13
  %29 = tail call ptr @db_rc_overwrite_values_memory_open() #13
  %30 = tail call ptr @db_gnd_status_memory_open() #13
  %31 = tail call ptr @db_uav_status_memory_open() #13
  %32 = getelementptr inbounds i8, ptr %30, i64 36
  %33 = load i32, ptr %32, align 1, !tbaa !15
  call void @llvm.lifetime.start.p0(i64 96, ptr nonnull %13) #13
  store i32 0, ptr %13, align 16
  %34 = load i32, ptr @num_inf_status, align 4, !tbaa !18
  %35 = icmp sgt i32 %34, 0
  %.lcssa.sroa.gep192 = getelementptr inbounds i8, ptr %10, i64 4
  %.lcssa.sroa.gep193 = getelementptr inbounds i8, ptr %10, i64 8
  %.lcssa.sroa.gep194 = getelementptr inbounds i8, ptr %10, i64 12
  %.lcssa.sroa.gep195 = getelementptr inbounds i8, ptr %10, i64 16
  %.lcssa.sroa.gep196 = getelementptr inbounds i8, ptr %10, i64 20
  %.lcssa.sroa.gep197 = getelementptr inbounds i8, ptr %10, i64 24
  %.lcssa.sroa.gep198 = getelementptr inbounds i8, ptr %10, i64 28
  %.lcssa.sroa.gep199 = getelementptr inbounds i8, ptr %10, i64 32
  %.lcssa.sroa.gep200 = getelementptr inbounds i8, ptr %10, i64 36
  br i1 %35, label %.lr.ph, label %._crit_edge

._crit_edge:                                      ; preds = %.lr.ph, %2
  call void @llvm.lifetime.start.p0(i64 128, ptr nonnull %15) #13
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %16) #13
  store i64 0, ptr %16, align 8, !tbaa !19
  %36 = getelementptr inbounds i8, ptr %16, i64 8
  store i64 100000, ptr %36, align 8, !tbaa !21
  call void @llvm.lifetime.start.p0(i64 20, ptr nonnull %17) #13
  call void @create_tcp_server_socket(ptr dead_on_unwind nonnull writable sret(%struct.tcp_server_info_t) align 4 %17, i32 noundef 1602) #13
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %18) #13
  store i32 16, ptr %18, align 4, !tbaa !18
  %37 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2)
  call void (i32, ptr, ...) @syslog(i32 noundef 6, ptr noundef nonnull @.str.2) #13
  %38 = call i32 @gettimeofday(ptr noundef nonnull %4, ptr noundef null) #13
  %39 = load i64, ptr %4, align 8, !tbaa !19
  %40 = getelementptr inbounds i8, ptr %4, i64 8
  %41 = load i64, ptr %40, align 8, !tbaa !21
  %42 = load volatile i8, ptr @keeprunning, align 1, !tbaa !22, !range !24, !noundef !25
  %43 = trunc nuw i8 %42 to i1
  br i1 %43, label %.lr.ph154, label %.preheader

.lr.ph154:                                        ; preds = %._crit_edge
  %44 = sdiv i64 %41, 1000
  %45 = mul nsw i64 %39, 1000
  %46 = add nsw i64 %44, %45
  %47 = getelementptr inbounds i8, ptr %8, i64 1
  %48 = getelementptr inbounds i8, ptr %27, i64 48
  %49 = getelementptr inbounds i8, ptr %27, i64 20
  %50 = getelementptr inbounds i8, ptr %8, i64 2
  %51 = getelementptr inbounds i8, ptr %31, i64 4
  %52 = getelementptr inbounds i8, ptr %8, i64 3
  %53 = getelementptr inbounds i8, ptr %31, i64 5
  %54 = getelementptr inbounds i8, ptr %8, i64 4
  %55 = getelementptr inbounds i8, ptr %31, i64 31
  %56 = getelementptr inbounds i8, ptr %17, i64 4
  %57 = getelementptr inbounds i8, ptr %17, i64 8
  %58 = getelementptr inbounds i8, ptr %17, i64 6
  %59 = getelementptr inbounds i8, ptr %9, i64 2
  %60 = getelementptr inbounds i8, ptr %29, i64 16
  %61 = getelementptr inbounds i8, ptr %9, i64 3
  %62 = icmp sgt i32 %33, 0
  %63 = getelementptr inbounds i8, ptr %30, i64 40
  %64 = getelementptr inbounds i8, ptr %12, i64 6
  %65 = getelementptr inbounds i8, ptr %30, i64 12
  %66 = getelementptr inbounds i8, ptr %12, i64 7
  %67 = getelementptr inbounds i8, ptr %30, i64 32
  %68 = getelementptr inbounds i8, ptr %12, i64 15
  %69 = getelementptr inbounds i8, ptr %30, i64 28
  %70 = getelementptr inbounds i8, ptr %11, i64 3
  %wide.trip.count182 = zext i32 %33 to i64
  %min.iters.check = icmp ult i32 %33, 8
  %min.iters.check201 = icmp ult i32 %33, 32
  %n.vec = and i64 %wide.trip.count182, 2147483616
  %cmp.n = icmp eq i64 %n.vec, %wide.trip.count182
  %n.vec.remaining = and i64 %wide.trip.count182, 24
  %min.epilog.iters.check = icmp eq i64 %n.vec.remaining, 0
  %n.vec204 = and i64 %wide.trip.count182, 2147483640
  %cmp.n208 = icmp eq i64 %n.vec204, %wide.trip.count182
  br label %80

.lr.ph:                                           ; preds = %2, %.lr.ph
  %indvars.iv = phi i64 [ %indvars.iv.next, %.lr.ph ], [ 0, %2 ]
  %71 = getelementptr inbounds [4 x %struct.db_socket_t], ptr %13, i64 0, i64 %indvars.iv
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %14) #13
  %72 = getelementptr inbounds [4 x [16 x i8]], ptr @adapters, i64 0, i64 %indvars.iv
  %73 = load i8, ptr @comm_id, align 1, !tbaa !5
  %74 = load i8, ptr @db_mode, align 1, !tbaa !5
  call void @open_db_socket(ptr dead_on_unwind nonnull writable sret(%struct.db_socket_t) align 4 %14, ptr noundef nonnull %72, i8 noundef zeroext %73, i8 noundef signext %74, i32 noundef 6, i8 noundef zeroext 1, i8 noundef zeroext 5, i8 noundef zeroext 2) #13
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 8 dereferenceable(24) %71, ptr noundef nonnull align 4 dereferenceable(24) %14, i64 24, i1 false), !tbaa.struct !26
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %14) #13
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %75 = load i32, ptr @num_inf_status, align 4, !tbaa !18
  %76 = sext i32 %75 to i64
  %77 = icmp slt i64 %indvars.iv.next, %76
  br i1 %77, label %.lr.ph, label %._crit_edge, !llvm.loop !29

.preheader:                                       ; preds = %532, %._crit_edge
  %78 = load i32, ptr %10, align 16, !tbaa !18
  %79 = icmp sgt i32 %78, 0
  br i1 %79, label %535, label %537

80:                                               ; preds = %.lr.ph154, %532
  %.092152 = phi i32 [ 0, %.lr.ph154 ], [ %.2, %532 ]
  %.0102151 = phi i32 [ 0, %.lr.ph154 ], [ %.3105, %532 ]
  %.0106150 = phi i64 [ %46, %.lr.ph154 ], [ %.1107, %532 ]
  store i64 0, ptr %16, align 8, !tbaa !19
  store i64 100000, ptr %36, align 8, !tbaa !21
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(128) %15, i8 0, i64 128, i1 false), !tbaa !31
  %81 = load i32, ptr %17, align 4, !tbaa !32
  %82 = srem i32 %81, 64
  %83 = zext nneg i32 %82 to i64
  %84 = shl nuw i64 1, %83
  %85 = sdiv i32 %81, 64
  %86 = sext i32 %85 to i64
  %87 = getelementptr inbounds [16 x i64], ptr %15, i64 0, i64 %86
  %88 = load i64, ptr %87, align 8, !tbaa !31
  %89 = or i64 %84, %88
  store i64 %89, ptr %87, align 8, !tbaa !31
  %90 = load i32, ptr @num_inf_status, align 4, !tbaa !18
  %91 = icmp sgt i32 %90, 0
  br i1 %91, label %.lr.ph134.preheader, label %.preheader128

.lr.ph134.preheader:                              ; preds = %80
  %wide.trip.count = zext nneg i32 %90 to i64
  br label %.lr.ph134

.preheader128:                                    ; preds = %.lr.ph134, %80
  %.099.lcssa = phi i32 [ %81, %80 ], [ %spec.select, %.lr.ph134 ]
  %92 = load i32, ptr %10, align 16, !tbaa !18
  %93 = icmp sgt i32 %92, 0
  br i1 %93, label %104, label %113

.lr.ph134:                                        ; preds = %.lr.ph134.preheader, %.lr.ph134
  %indvars.iv162 = phi i64 [ 0, %.lr.ph134.preheader ], [ %indvars.iv.next163, %.lr.ph134 ]
  %.099131 = phi i32 [ %81, %.lr.ph134.preheader ], [ %spec.select, %.lr.ph134 ]
  %94 = getelementptr inbounds [4 x %struct.db_socket_t], ptr %13, i64 0, i64 %indvars.iv162
  %95 = load i32, ptr %94, align 8, !tbaa !36
  %96 = srem i32 %95, 64
  %97 = zext nneg i32 %96 to i64
  %98 = shl nuw i64 1, %97
  %99 = sdiv i32 %95, 64
  %100 = sext i32 %99 to i64
  %101 = getelementptr inbounds [16 x i64], ptr %15, i64 0, i64 %100
  %102 = load i64, ptr %101, align 8, !tbaa !31
  %103 = or i64 %98, %102
  store i64 %103, ptr %101, align 8, !tbaa !31
  %spec.select = call i32 @llvm.smax.i32(i32 %95, i32 %.099131)
  %indvars.iv.next163 = add nuw nsw i64 %indvars.iv162, 1
  %exitcond.not = icmp eq i64 %indvars.iv.next163, %wide.trip.count
  br i1 %exitcond.not, label %.preheader128, label %.lr.ph134, !llvm.loop !39

104:                                              ; preds = %.preheader128
  %105 = and i32 %92, 63
  %106 = zext nneg i32 %105 to i64
  %107 = shl nuw i64 1, %106
  %108 = lshr i32 %92, 6
  %109 = zext nneg i32 %108 to i64
  %110 = getelementptr inbounds [16 x i64], ptr %15, i64 0, i64 %109
  %111 = load i64, ptr %110, align 8, !tbaa !31
  %112 = or i64 %111, %107
  store i64 %112, ptr %110, align 8, !tbaa !31
  %spec.select123 = call i32 @llvm.smax.i32(i32 %92, i32 %.099.lcssa)
  br label %113

113:                                              ; preds = %104, %.preheader128
  %.3 = phi i32 [ %.099.lcssa, %.preheader128 ], [ %spec.select123, %104 ]
  %114 = load i32, ptr %.lcssa.sroa.gep192, align 4, !tbaa !18
  %115 = icmp sgt i32 %114, 0
  br i1 %115, label %116, label %125

116:                                              ; preds = %113
  %117 = and i32 %114, 63
  %118 = zext nneg i32 %117 to i64
  %119 = shl nuw i64 1, %118
  %120 = lshr i32 %114, 6
  %121 = zext nneg i32 %120 to i64
  %122 = getelementptr inbounds [16 x i64], ptr %15, i64 0, i64 %121
  %123 = load i64, ptr %122, align 8, !tbaa !31
  %124 = or i64 %123, %119
  store i64 %124, ptr %122, align 8, !tbaa !31
  %spec.select123.1 = call i32 @llvm.smax.i32(i32 %114, i32 %.3)
  br label %125

125:                                              ; preds = %116, %113
  %.3.1 = phi i32 [ %.3, %113 ], [ %spec.select123.1, %116 ]
  %126 = load i32, ptr %.lcssa.sroa.gep193, align 8, !tbaa !18
  %127 = icmp sgt i32 %126, 0
  br i1 %127, label %128, label %137

128:                                              ; preds = %125
  %129 = and i32 %126, 63
  %130 = zext nneg i32 %129 to i64
  %131 = shl nuw i64 1, %130
  %132 = lshr i32 %126, 6
  %133 = zext nneg i32 %132 to i64
  %134 = getelementptr inbounds [16 x i64], ptr %15, i64 0, i64 %133
  %135 = load i64, ptr %134, align 8, !tbaa !31
  %136 = or i64 %135, %131
  store i64 %136, ptr %134, align 8, !tbaa !31
  %spec.select123.2 = call i32 @llvm.smax.i32(i32 %126, i32 %.3.1)
  br label %137

137:                                              ; preds = %128, %125
  %.3.2 = phi i32 [ %.3.1, %125 ], [ %spec.select123.2, %128 ]
  %138 = load i32, ptr %.lcssa.sroa.gep194, align 4, !tbaa !18
  %139 = icmp sgt i32 %138, 0
  br i1 %139, label %140, label %149

140:                                              ; preds = %137
  %141 = and i32 %138, 63
  %142 = zext nneg i32 %141 to i64
  %143 = shl nuw i64 1, %142
  %144 = lshr i32 %138, 6
  %145 = zext nneg i32 %144 to i64
  %146 = getelementptr inbounds [16 x i64], ptr %15, i64 0, i64 %145
  %147 = load i64, ptr %146, align 8, !tbaa !31
  %148 = or i64 %147, %143
  store i64 %148, ptr %146, align 8, !tbaa !31
  %spec.select123.3 = call i32 @llvm.smax.i32(i32 %138, i32 %.3.2)
  br label %149

149:                                              ; preds = %140, %137
  %.3.3 = phi i32 [ %.3.2, %137 ], [ %spec.select123.3, %140 ]
  %150 = load i32, ptr %.lcssa.sroa.gep195, align 16, !tbaa !18
  %151 = icmp sgt i32 %150, 0
  br i1 %151, label %152, label %161

152:                                              ; preds = %149
  %153 = and i32 %150, 63
  %154 = zext nneg i32 %153 to i64
  %155 = shl nuw i64 1, %154
  %156 = lshr i32 %150, 6
  %157 = zext nneg i32 %156 to i64
  %158 = getelementptr inbounds [16 x i64], ptr %15, i64 0, i64 %157
  %159 = load i64, ptr %158, align 8, !tbaa !31
  %160 = or i64 %159, %155
  store i64 %160, ptr %158, align 8, !tbaa !31
  %spec.select123.4 = call i32 @llvm.smax.i32(i32 %150, i32 %.3.3)
  br label %161

161:                                              ; preds = %152, %149
  %.3.4 = phi i32 [ %.3.3, %149 ], [ %spec.select123.4, %152 ]
  %162 = load i32, ptr %.lcssa.sroa.gep196, align 4, !tbaa !18
  %163 = icmp sgt i32 %162, 0
  br i1 %163, label %164, label %173

164:                                              ; preds = %161
  %165 = and i32 %162, 63
  %166 = zext nneg i32 %165 to i64
  %167 = shl nuw i64 1, %166
  %168 = lshr i32 %162, 6
  %169 = zext nneg i32 %168 to i64
  %170 = getelementptr inbounds [16 x i64], ptr %15, i64 0, i64 %169
  %171 = load i64, ptr %170, align 8, !tbaa !31
  %172 = or i64 %171, %167
  store i64 %172, ptr %170, align 8, !tbaa !31
  %spec.select123.5 = call i32 @llvm.smax.i32(i32 %162, i32 %.3.4)
  br label %173

173:                                              ; preds = %164, %161
  %.3.5 = phi i32 [ %.3.4, %161 ], [ %spec.select123.5, %164 ]
  %174 = load i32, ptr %.lcssa.sroa.gep197, align 8, !tbaa !18
  %175 = icmp sgt i32 %174, 0
  br i1 %175, label %176, label %185

176:                                              ; preds = %173
  %177 = and i32 %174, 63
  %178 = zext nneg i32 %177 to i64
  %179 = shl nuw i64 1, %178
  %180 = lshr i32 %174, 6
  %181 = zext nneg i32 %180 to i64
  %182 = getelementptr inbounds [16 x i64], ptr %15, i64 0, i64 %181
  %183 = load i64, ptr %182, align 8, !tbaa !31
  %184 = or i64 %183, %179
  store i64 %184, ptr %182, align 8, !tbaa !31
  %spec.select123.6 = call i32 @llvm.smax.i32(i32 %174, i32 %.3.5)
  br label %185

185:                                              ; preds = %176, %173
  %.3.6 = phi i32 [ %.3.5, %173 ], [ %spec.select123.6, %176 ]
  %186 = load i32, ptr %.lcssa.sroa.gep198, align 4, !tbaa !18
  %187 = icmp sgt i32 %186, 0
  br i1 %187, label %188, label %197

188:                                              ; preds = %185
  %189 = and i32 %186, 63
  %190 = zext nneg i32 %189 to i64
  %191 = shl nuw i64 1, %190
  %192 = lshr i32 %186, 6
  %193 = zext nneg i32 %192 to i64
  %194 = getelementptr inbounds [16 x i64], ptr %15, i64 0, i64 %193
  %195 = load i64, ptr %194, align 8, !tbaa !31
  %196 = or i64 %195, %191
  store i64 %196, ptr %194, align 8, !tbaa !31
  %spec.select123.7 = call i32 @llvm.smax.i32(i32 %186, i32 %.3.6)
  br label %197

197:                                              ; preds = %188, %185
  %.3.7 = phi i32 [ %.3.6, %185 ], [ %spec.select123.7, %188 ]
  %198 = load i32, ptr %.lcssa.sroa.gep199, align 16, !tbaa !18
  %199 = icmp sgt i32 %198, 0
  br i1 %199, label %200, label %209

200:                                              ; preds = %197
  %201 = and i32 %198, 63
  %202 = zext nneg i32 %201 to i64
  %203 = shl nuw i64 1, %202
  %204 = lshr i32 %198, 6
  %205 = zext nneg i32 %204 to i64
  %206 = getelementptr inbounds [16 x i64], ptr %15, i64 0, i64 %205
  %207 = load i64, ptr %206, align 8, !tbaa !31
  %208 = or i64 %207, %203
  store i64 %208, ptr %206, align 8, !tbaa !31
  %spec.select123.8 = call i32 @llvm.smax.i32(i32 %198, i32 %.3.7)
  br label %209

209:                                              ; preds = %200, %197
  %.3.8 = phi i32 [ %.3.7, %197 ], [ %spec.select123.8, %200 ]
  %210 = load i32, ptr %.lcssa.sroa.gep200, align 4, !tbaa !18
  %211 = icmp sgt i32 %210, 0
  br i1 %211, label %212, label %221

212:                                              ; preds = %209
  %213 = and i32 %210, 63
  %214 = zext nneg i32 %213 to i64
  %215 = shl nuw i64 1, %214
  %216 = lshr i32 %210, 6
  %217 = zext nneg i32 %216 to i64
  %218 = getelementptr inbounds [16 x i64], ptr %15, i64 0, i64 %217
  %219 = load i64, ptr %218, align 8, !tbaa !31
  %220 = or i64 %219, %215
  store i64 %220, ptr %218, align 8, !tbaa !31
  %spec.select123.9 = call i32 @llvm.smax.i32(i32 %210, i32 %.3.8)
  br label %221

221:                                              ; preds = %212, %209
  %.3.9 = phi i32 [ %.3.8, %209 ], [ %spec.select123.9, %212 ]
  %222 = add nsw i32 %.3.9, 1
  %223 = call i32 @select(i32 noundef %222, ptr noundef nonnull %15, ptr noundef null, ptr noundef null, ptr noundef nonnull %16) #13
  %224 = icmp eq i32 %223, -1
  br i1 %224, label %225, label %229

225:                                              ; preds = %221
  %226 = tail call ptr @__errno_location() #14
  %227 = load i32, ptr %226, align 4, !tbaa !18
  %.not = icmp eq i32 %227, 4
  br i1 %.not, label %.thread, label %228

228:                                              ; preds = %225
  call void @perror(ptr noundef nonnull @.str.3) #15
  br label %.thread

229:                                              ; preds = %221
  %230 = icmp sgt i32 %223, 0
  br i1 %230, label %.preheader127, label %.thread

.preheader127:                                    ; preds = %229
  %231 = load i32, ptr @num_inf_status, align 4, !tbaa !18
  %232 = icmp sgt i32 %231, 0
  br i1 %232, label %.lr.ph139, label %._crit_edge140

._crit_edge140:                                   ; preds = %266, %.preheader127
  %.1103.lcssa = phi i32 [ %.0102151, %.preheader127 ], [ %.2104, %266 ]
  %233 = load i32, ptr %17, align 4, !tbaa !32
  %234 = sdiv i32 %233, 64
  %235 = sext i32 %234 to i64
  %236 = getelementptr inbounds [16 x i64], ptr %15, i64 0, i64 %235
  %237 = load i64, ptr %236, align 8, !tbaa !31
  %238 = srem i32 %233, 64
  %239 = zext nneg i32 %238 to i64
  %240 = shl nuw i64 1, %239
  %241 = and i64 %240, %237
  %.not119 = icmp eq i64 %241, 0
  br i1 %.not119, label %.loopexit.preheader, label %270

.lr.ph139:                                        ; preds = %.preheader127, %266
  %indvars.iv169 = phi i64 [ %indvars.iv.next170, %266 ], [ 0, %.preheader127 ]
  %.1103137 = phi i32 [ %.2104, %266 ], [ %.0102151, %.preheader127 ]
  %242 = getelementptr inbounds [4 x %struct.db_socket_t], ptr %13, i64 0, i64 %indvars.iv169
  %243 = load i32, ptr %242, align 8, !tbaa !36
  %244 = sdiv i32 %243, 64
  %245 = sext i32 %244 to i64
  %246 = getelementptr inbounds [16 x i64], ptr %15, i64 0, i64 %245
  %247 = load i64, ptr %246, align 8, !tbaa !31
  %248 = srem i32 %243, 64
  %249 = zext nneg i32 %248 to i64
  %250 = shl nuw i64 1, %249
  %251 = and i64 %250, %247
  %.not121 = icmp eq i64 %251, 0
  br i1 %.not121, label %266, label %252

252:                                              ; preds = %.lr.ph139
  %253 = call i64 @recv(i32 noundef %243, ptr noundef nonnull %7, i64 noundef 2048, i32 noundef 0) #13
  %254 = icmp sgt i64 %253, 0
  br i1 %254, label %255, label %266

255:                                              ; preds = %252
  %256 = call zeroext i16 @get_db_payload(ptr noundef nonnull %7, i64 noundef %253, ptr noundef nonnull %8, ptr noundef nonnull %5, ptr noundef nonnull %6) #13
  %257 = load i8, ptr %5, align 1, !tbaa !5
  %258 = zext i8 %257 to i32
  %.not122 = icmp eq i32 %.1103137, %258
  br i1 %.not122, label %266, label %259

259:                                              ; preds = %255
  %260 = load i8, ptr %8, align 16, !tbaa !40
  store i8 %260, ptr %24, align 1, !tbaa !13
  %261 = load i8, ptr %47, align 1, !tbaa !42
  store i8 %261, ptr %23, align 4, !tbaa !10
  store i8 %260, ptr %48, align 1, !tbaa !43
  %262 = zext i8 %261 to i32
  store i32 %262, ptr %49, align 1, !tbaa !45
  %263 = load i8, ptr %50, align 2, !tbaa !46
  store i8 %263, ptr %51, align 1, !tbaa !47
  %264 = load i8, ptr %52, align 1, !tbaa !49
  store i8 %264, ptr %53, align 1, !tbaa !50
  %265 = load i8, ptr %54, align 4, !tbaa !51
  store i8 %265, ptr %55, align 1, !tbaa !52
  br label %266

266:                                              ; preds = %.lr.ph139, %255, %259, %252
  %.2104 = phi i32 [ %258, %259 ], [ %.1103137, %255 ], [ %.1103137, %252 ], [ %.1103137, %.lr.ph139 ]
  %indvars.iv.next170 = add nuw nsw i64 %indvars.iv169, 1
  %267 = load i32, ptr @num_inf_status, align 4, !tbaa !18
  %268 = sext i32 %267 to i64
  %269 = icmp slt i64 %indvars.iv.next170, %268
  br i1 %269, label %.lr.ph139, label %._crit_edge140, !llvm.loop !53

270:                                              ; preds = %._crit_edge140
  %271 = call i32 @accept(i32 noundef %233, ptr noundef nonnull %56, ptr noundef nonnull %18) #13
  %272 = icmp slt i32 %271, 0
  br i1 %272, label %275, label %.preheader126.preheader

.preheader126.preheader:                          ; preds = %270
  %273 = load i32, ptr %10, align 16, !tbaa !18
  %274 = icmp eq i32 %273, 0
  br i1 %274, label %294, label %.preheader126.1

275:                                              ; preds = %270
  call void @perror(ptr noundef nonnull @.str.4) #15
  br label %.loopexit.preheader

.preheader126.1:                                  ; preds = %.preheader126.preheader
  %276 = load i32, ptr %.lcssa.sroa.gep192, align 4, !tbaa !18
  %277 = icmp eq i32 %276, 0
  br i1 %277, label %294, label %.preheader126.2

.preheader126.2:                                  ; preds = %.preheader126.1
  %278 = load i32, ptr %.lcssa.sroa.gep193, align 8, !tbaa !18
  %279 = icmp eq i32 %278, 0
  br i1 %279, label %294, label %.preheader126.3

.preheader126.3:                                  ; preds = %.preheader126.2
  %280 = load i32, ptr %.lcssa.sroa.gep194, align 4, !tbaa !18
  %281 = icmp eq i32 %280, 0
  br i1 %281, label %294, label %.preheader126.4

.preheader126.4:                                  ; preds = %.preheader126.3
  %282 = load i32, ptr %.lcssa.sroa.gep195, align 16, !tbaa !18
  %283 = icmp eq i32 %282, 0
  br i1 %283, label %294, label %.preheader126.5

.preheader126.5:                                  ; preds = %.preheader126.4
  %284 = load i32, ptr %.lcssa.sroa.gep196, align 4, !tbaa !18
  %285 = icmp eq i32 %284, 0
  br i1 %285, label %294, label %.preheader126.6

.preheader126.6:                                  ; preds = %.preheader126.5
  %286 = load i32, ptr %.lcssa.sroa.gep197, align 8, !tbaa !18
  %287 = icmp eq i32 %286, 0
  br i1 %287, label %294, label %.preheader126.7

.preheader126.7:                                  ; preds = %.preheader126.6
  %288 = load i32, ptr %.lcssa.sroa.gep198, align 4, !tbaa !18
  %289 = icmp eq i32 %288, 0
  br i1 %289, label %294, label %.preheader126.8

.preheader126.8:                                  ; preds = %.preheader126.7
  %290 = load i32, ptr %.lcssa.sroa.gep199, align 16, !tbaa !18
  %291 = icmp eq i32 %290, 0
  br i1 %291, label %294, label %.preheader126.9

.preheader126.9:                                  ; preds = %.preheader126.8
  %292 = load i32, ptr %.lcssa.sroa.gep200, align 4, !tbaa !18
  %293 = icmp eq i32 %292, 0
  br i1 %293, label %294, label %.loopexit.preheader

294:                                              ; preds = %.preheader126.9, %.preheader126.8, %.preheader126.7, %.preheader126.6, %.preheader126.5, %.preheader126.4, %.preheader126.3, %.preheader126.2, %.preheader126.1, %.preheader126.preheader
  %.lcssa.sroa.phi = phi ptr [ %10, %.preheader126.preheader ], [ %.lcssa.sroa.gep192, %.preheader126.1 ], [ %.lcssa.sroa.gep193, %.preheader126.2 ], [ %.lcssa.sroa.gep194, %.preheader126.3 ], [ %.lcssa.sroa.gep195, %.preheader126.4 ], [ %.lcssa.sroa.gep196, %.preheader126.5 ], [ %.lcssa.sroa.gep197, %.preheader126.6 ], [ %.lcssa.sroa.gep198, %.preheader126.7 ], [ %.lcssa.sroa.gep199, %.preheader126.8 ], [ %.lcssa.sroa.gep200, %.preheader126.9 ]
  store i32 %271, ptr %.lcssa.sroa.phi, align 4, !tbaa !18
  %295 = load i32, ptr %57, align 4
  %296 = call ptr @inet_ntoa(i32 %295) #13
  %297 = load i16, ptr %58, align 2, !tbaa !54
  %298 = call zeroext i16 @__bswap_16(i16 noundef zeroext %297)
  %299 = zext i16 %298 to i32
  %300 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.5, ptr noundef %296, i32 noundef %299)
  %301 = load i32, ptr %57, align 4
  %302 = call ptr @inet_ntoa(i32 %301) #13
  %303 = load i16, ptr %58, align 2, !tbaa !54
  %304 = call zeroext i16 @__bswap_16(i16 noundef zeroext %303)
  %305 = zext i16 %304 to i32
  call void (i32, ptr, ...) @syslog(i32 noundef 6, ptr noundef nonnull @.str.5, ptr noundef %302, i32 noundef %305) #13
  br label %.loopexit.preheader

.loopexit.preheader:                              ; preds = %.preheader126.9, %294, %275, %._crit_edge140
  br label %.loopexit

.loopexit:                                        ; preds = %.loopexit.preheader, %341
  %indvars.iv176 = phi i64 [ %indvars.iv.next177, %341 ], [ 0, %.loopexit.preheader ]
  %306 = getelementptr inbounds [10 x i32], ptr %10, i64 0, i64 %indvars.iv176
  %307 = load i32, ptr %306, align 4, !tbaa !18
  %308 = sdiv i32 %307, 64
  %309 = sext i32 %308 to i64
  %310 = getelementptr inbounds [16 x i64], ptr %15, i64 0, i64 %309
  %311 = load i64, ptr %310, align 8, !tbaa !31
  %312 = srem i32 %307, 64
  %313 = zext nneg i32 %312 to i64
  %314 = shl nuw i64 1, %313
  %315 = and i64 %314, %311
  %.not120 = icmp eq i64 %315, 0
  br i1 %.not120, label %341, label %316

316:                                              ; preds = %.loopexit
  %317 = call i64 @read(i32 noundef %307, ptr noundef nonnull %9, i64 noundef 2048) #13
  %318 = icmp eq i64 %317, 0
  br i1 %318, label %319, label %335

319:                                              ; preds = %316
  %320 = load i32, ptr %306, align 4, !tbaa !18
  %321 = call i32 @getpeername(i32 noundef %320, ptr noundef nonnull %56, ptr noundef nonnull %18) #13
  %322 = load i32, ptr %57, align 4
  %323 = call ptr @inet_ntoa(i32 %322) #13
  %324 = load i16, ptr %58, align 2, !tbaa !54
  %325 = call zeroext i16 @__bswap_16(i16 noundef zeroext %324)
  %326 = zext i16 %325 to i32
  %327 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.6, ptr noundef %323, i32 noundef %326)
  %328 = load i32, ptr %57, align 4
  %329 = call ptr @inet_ntoa(i32 %328) #13
  %330 = load i16, ptr %58, align 2, !tbaa !54
  %331 = call zeroext i16 @__bswap_16(i16 noundef zeroext %330)
  %332 = zext i16 %331 to i32
  call void (i32, ptr, ...) @syslog(i32 noundef 6, ptr noundef nonnull @.str.6, ptr noundef %329, i32 noundef %332) #13
  %333 = load i32, ptr %306, align 4, !tbaa !18
  %334 = call i32 @close(i32 noundef %333) #13
  store i32 0, ptr %306, align 4, !tbaa !18
  br label %341

335:                                              ; preds = %316
  %336 = load i8, ptr %59, align 2, !tbaa !5
  %cond = icmp eq i8 %336, 3
  br i1 %cond, label %337, label %339

337:                                              ; preds = %335
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 1 dereferenceable(28) %60, ptr noundef nonnull align 1 dereferenceable(28) %61, i64 28, i1 false)
  %338 = call i32 @clock_gettime(i32 noundef 6, ptr noundef nonnull %3) #13
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 1 dereferenceable(16) %29, ptr noundef nonnull align 8 dereferenceable(16) %3, i64 16, i1 false), !tbaa.struct !55
  br label %341

339:                                              ; preds = %335
  %340 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.7)
  call void (i32, ptr, ...) @syslog(i32 noundef 4, ptr noundef nonnull @.str.7) #13
  br label %341

341:                                              ; preds = %.loopexit, %337, %339, %319
  %indvars.iv.next177 = add nuw nsw i64 %indvars.iv176, 1
  %exitcond179.not = icmp eq i64 %indvars.iv.next177, 10
  br i1 %exitcond179.not, label %.thread, label %.loopexit, !llvm.loop !56

.thread:                                          ; preds = %341, %225, %229, %228
  %.3105 = phi i32 [ %.0102151, %228 ], [ %.0102151, %229 ], [ %.0102151, %225 ], [ %.1103.lcssa, %341 ]
  %342 = call i32 @gettimeofday(ptr noundef nonnull %4, ptr noundef null) #13
  %343 = load i64, ptr %4, align 8, !tbaa !19
  %344 = mul nsw i64 %343, 1000
  %345 = load i64, ptr %40, align 8, !tbaa !21
  %346 = sdiv i64 %345, 1000
  %347 = sub i64 %344, %.0106150
  %348 = add i64 %347, %346
  %349 = icmp sgt i64 %348, 99
  br i1 %349, label %.preheader125, label %532

.preheader125:                                    ; preds = %.thread
  br i1 %62, label %iter.check, label %._crit_edge148

iter.check:                                       ; preds = %.preheader125
  br i1 %min.iters.check, label %.lr.ph147.preheader, label %vector.main.loop.iter.check

vector.main.loop.iter.check:                      ; preds = %iter.check
  br i1 %min.iters.check201, label %vec.epilog.ph, label %vector.body

vector.body:                                      ; preds = %vector.main.loop.iter.check, %vector.body
  %index = phi i64 [ %index.next, %vector.body ], [ 0, %vector.main.loop.iter.check ]
  %vec.phi = phi <16 x i8> [ %477, %vector.body ], [ <i8 -128, i8 -128, i8 -128, i8 -128, i8 -128, i8 -128, i8 -128, i8 -128, i8 -128, i8 -128, i8 -128, i8 -128, i8 -128, i8 -128, i8 -128, i8 -128>, %vector.main.loop.iter.check ]
  %vec.phi202 = phi <16 x i8> [ %478, %vector.body ], [ <i8 -128, i8 -128, i8 -128, i8 -128, i8 -128, i8 -128, i8 -128, i8 -128, i8 -128, i8 -128, i8 -128, i8 -128, i8 -128, i8 -128, i8 -128, i8 -128>, %vector.main.loop.iter.check ]
  %350 = or disjoint i64 %index, 1
  %351 = or disjoint i64 %index, 2
  %352 = or disjoint i64 %index, 3
  %353 = or disjoint i64 %index, 4
  %354 = or disjoint i64 %index, 5
  %355 = or disjoint i64 %index, 6
  %356 = or disjoint i64 %index, 7
  %357 = or disjoint i64 %index, 8
  %358 = or disjoint i64 %index, 9
  %359 = or disjoint i64 %index, 10
  %360 = or disjoint i64 %index, 11
  %361 = or disjoint i64 %index, 12
  %362 = or disjoint i64 %index, 13
  %363 = or disjoint i64 %index, 14
  %364 = or disjoint i64 %index, 15
  %365 = or disjoint i64 %index, 16
  %366 = or disjoint i64 %index, 17
  %367 = or disjoint i64 %index, 18
  %368 = or disjoint i64 %index, 19
  %369 = or disjoint i64 %index, 20
  %370 = or disjoint i64 %index, 21
  %371 = or disjoint i64 %index, 22
  %372 = or disjoint i64 %index, 23
  %373 = or disjoint i64 %index, 24
  %374 = or disjoint i64 %index, 25
  %375 = or disjoint i64 %index, 26
  %376 = or disjoint i64 %index, 27
  %377 = or disjoint i64 %index, 28
  %378 = or disjoint i64 %index, 29
  %379 = or disjoint i64 %index, 30
  %380 = or disjoint i64 %index, 31
  %381 = getelementptr inbounds [8 x %struct.db_adapter_status], ptr %63, i64 0, i64 %index, i32 2
  %382 = getelementptr inbounds [8 x %struct.db_adapter_status], ptr %63, i64 0, i64 %350, i32 2
  %383 = getelementptr inbounds [8 x %struct.db_adapter_status], ptr %63, i64 0, i64 %351, i32 2
  %384 = getelementptr inbounds [8 x %struct.db_adapter_status], ptr %63, i64 0, i64 %352, i32 2
  %385 = getelementptr inbounds [8 x %struct.db_adapter_status], ptr %63, i64 0, i64 %353, i32 2
  %386 = getelementptr inbounds [8 x %struct.db_adapter_status], ptr %63, i64 0, i64 %354, i32 2
  %387 = getelementptr inbounds [8 x %struct.db_adapter_status], ptr %63, i64 0, i64 %355, i32 2
  %388 = getelementptr inbounds [8 x %struct.db_adapter_status], ptr %63, i64 0, i64 %356, i32 2
  %389 = getelementptr inbounds [8 x %struct.db_adapter_status], ptr %63, i64 0, i64 %357, i32 2
  %390 = getelementptr inbounds [8 x %struct.db_adapter_status], ptr %63, i64 0, i64 %358, i32 2
  %391 = getelementptr inbounds [8 x %struct.db_adapter_status], ptr %63, i64 0, i64 %359, i32 2
  %392 = getelementptr inbounds [8 x %struct.db_adapter_status], ptr %63, i64 0, i64 %360, i32 2
  %393 = getelementptr inbounds [8 x %struct.db_adapter_status], ptr %63, i64 0, i64 %361, i32 2
  %394 = getelementptr inbounds [8 x %struct.db_adapter_status], ptr %63, i64 0, i64 %362, i32 2
  %395 = getelementptr inbounds [8 x %struct.db_adapter_status], ptr %63, i64 0, i64 %363, i32 2
  %396 = getelementptr inbounds [8 x %struct.db_adapter_status], ptr %63, i64 0, i64 %364, i32 2
  %397 = getelementptr inbounds [8 x %struct.db_adapter_status], ptr %63, i64 0, i64 %365, i32 2
  %398 = getelementptr inbounds [8 x %struct.db_adapter_status], ptr %63, i64 0, i64 %366, i32 2
  %399 = getelementptr inbounds [8 x %struct.db_adapter_status], ptr %63, i64 0, i64 %367, i32 2
  %400 = getelementptr inbounds [8 x %struct.db_adapter_status], ptr %63, i64 0, i64 %368, i32 2
  %401 = getelementptr inbounds [8 x %struct.db_adapter_status], ptr %63, i64 0, i64 %369, i32 2
  %402 = getelementptr inbounds [8 x %struct.db_adapter_status], ptr %63, i64 0, i64 %370, i32 2
  %403 = getelementptr inbounds [8 x %struct.db_adapter_status], ptr %63, i64 0, i64 %371, i32 2
  %404 = getelementptr inbounds [8 x %struct.db_adapter_status], ptr %63, i64 0, i64 %372, i32 2
  %405 = getelementptr inbounds [8 x %struct.db_adapter_status], ptr %63, i64 0, i64 %373, i32 2
  %406 = getelementptr inbounds [8 x %struct.db_adapter_status], ptr %63, i64 0, i64 %374, i32 2
  %407 = getelementptr inbounds [8 x %struct.db_adapter_status], ptr %63, i64 0, i64 %375, i32 2
  %408 = getelementptr inbounds [8 x %struct.db_adapter_status], ptr %63, i64 0, i64 %376, i32 2
  %409 = getelementptr inbounds [8 x %struct.db_adapter_status], ptr %63, i64 0, i64 %377, i32 2
  %410 = getelementptr inbounds [8 x %struct.db_adapter_status], ptr %63, i64 0, i64 %378, i32 2
  %411 = getelementptr inbounds [8 x %struct.db_adapter_status], ptr %63, i64 0, i64 %379, i32 2
  %412 = getelementptr inbounds [8 x %struct.db_adapter_status], ptr %63, i64 0, i64 %380, i32 2
  %413 = load i8, ptr %381, align 1, !tbaa !43
  %414 = load i8, ptr %382, align 1, !tbaa !43
  %415 = load i8, ptr %383, align 1, !tbaa !43
  %416 = load i8, ptr %384, align 1, !tbaa !43
  %417 = load i8, ptr %385, align 1, !tbaa !43
  %418 = load i8, ptr %386, align 1, !tbaa !43
  %419 = load i8, ptr %387, align 1, !tbaa !43
  %420 = load i8, ptr %388, align 1, !tbaa !43
  %421 = load i8, ptr %389, align 1, !tbaa !43
  %422 = load i8, ptr %390, align 1, !tbaa !43
  %423 = load i8, ptr %391, align 1, !tbaa !43
  %424 = load i8, ptr %392, align 1, !tbaa !43
  %425 = load i8, ptr %393, align 1, !tbaa !43
  %426 = load i8, ptr %394, align 1, !tbaa !43
  %427 = load i8, ptr %395, align 1, !tbaa !43
  %428 = load i8, ptr %396, align 1, !tbaa !43
  %429 = insertelement <16 x i8> poison, i8 %413, i64 0
  %430 = insertelement <16 x i8> %429, i8 %414, i64 1
  %431 = insertelement <16 x i8> %430, i8 %415, i64 2
  %432 = insertelement <16 x i8> %431, i8 %416, i64 3
  %433 = insertelement <16 x i8> %432, i8 %417, i64 4
  %434 = insertelement <16 x i8> %433, i8 %418, i64 5
  %435 = insertelement <16 x i8> %434, i8 %419, i64 6
  %436 = insertelement <16 x i8> %435, i8 %420, i64 7
  %437 = insertelement <16 x i8> %436, i8 %421, i64 8
  %438 = insertelement <16 x i8> %437, i8 %422, i64 9
  %439 = insertelement <16 x i8> %438, i8 %423, i64 10
  %440 = insertelement <16 x i8> %439, i8 %424, i64 11
  %441 = insertelement <16 x i8> %440, i8 %425, i64 12
  %442 = insertelement <16 x i8> %441, i8 %426, i64 13
  %443 = insertelement <16 x i8> %442, i8 %427, i64 14
  %444 = insertelement <16 x i8> %443, i8 %428, i64 15
  %445 = load i8, ptr %397, align 1, !tbaa !43
  %446 = load i8, ptr %398, align 1, !tbaa !43
  %447 = load i8, ptr %399, align 1, !tbaa !43
  %448 = load i8, ptr %400, align 1, !tbaa !43
  %449 = load i8, ptr %401, align 1, !tbaa !43
  %450 = load i8, ptr %402, align 1, !tbaa !43
  %451 = load i8, ptr %403, align 1, !tbaa !43
  %452 = load i8, ptr %404, align 1, !tbaa !43
  %453 = load i8, ptr %405, align 1, !tbaa !43
  %454 = load i8, ptr %406, align 1, !tbaa !43
  %455 = load i8, ptr %407, align 1, !tbaa !43
  %456 = load i8, ptr %408, align 1, !tbaa !43
  %457 = load i8, ptr %409, align 1, !tbaa !43
  %458 = load i8, ptr %410, align 1, !tbaa !43
  %459 = load i8, ptr %411, align 1, !tbaa !43
  %460 = load i8, ptr %412, align 1, !tbaa !43
  %461 = insertelement <16 x i8> poison, i8 %445, i64 0
  %462 = insertelement <16 x i8> %461, i8 %446, i64 1
  %463 = insertelement <16 x i8> %462, i8 %447, i64 2
  %464 = insertelement <16 x i8> %463, i8 %448, i64 3
  %465 = insertelement <16 x i8> %464, i8 %449, i64 4
  %466 = insertelement <16 x i8> %465, i8 %450, i64 5
  %467 = insertelement <16 x i8> %466, i8 %451, i64 6
  %468 = insertelement <16 x i8> %467, i8 %452, i64 7
  %469 = insertelement <16 x i8> %468, i8 %453, i64 8
  %470 = insertelement <16 x i8> %469, i8 %454, i64 9
  %471 = insertelement <16 x i8> %470, i8 %455, i64 10
  %472 = insertelement <16 x i8> %471, i8 %456, i64 11
  %473 = insertelement <16 x i8> %472, i8 %457, i64 12
  %474 = insertelement <16 x i8> %473, i8 %458, i64 13
  %475 = insertelement <16 x i8> %474, i8 %459, i64 14
  %476 = insertelement <16 x i8> %475, i8 %460, i64 15
  %477 = call <16 x i8> @llvm.smax.v16i8(<16 x i8> %vec.phi, <16 x i8> %444)
  %478 = call <16 x i8> @llvm.smax.v16i8(<16 x i8> %vec.phi202, <16 x i8> %476)
  %index.next = add nuw i64 %index, 32
  %479 = icmp eq i64 %index.next, %n.vec
  br i1 %479, label %middle.block, label %vector.body, !llvm.loop !57

middle.block:                                     ; preds = %vector.body
  %rdx.minmax = call <16 x i8> @llvm.smax.v16i8(<16 x i8> %477, <16 x i8> %478)
  %480 = call i8 @llvm.vector.reduce.smax.v16i8(<16 x i8> %rdx.minmax)
  br i1 %cmp.n, label %._crit_edge148, label %vec.epilog.iter.check

vec.epilog.iter.check:                            ; preds = %middle.block
  br i1 %min.epilog.iters.check, label %.lr.ph147.preheader, label %vec.epilog.ph

vec.epilog.ph:                                    ; preds = %vector.main.loop.iter.check, %vec.epilog.iter.check
  %bc.merge.rdx = phi i8 [ %480, %vec.epilog.iter.check ], [ -128, %vector.main.loop.iter.check ]
  %vec.epilog.resume.val = phi i64 [ %n.vec, %vec.epilog.iter.check ], [ 0, %vector.main.loop.iter.check ]
  %minmax.ident.splatinsert = insertelement <8 x i8> poison, i8 %bc.merge.rdx, i64 0
  %minmax.ident.splat = shufflevector <8 x i8> %minmax.ident.splatinsert, <8 x i8> poison, <8 x i32> zeroinitializer
  br label %vec.epilog.vector.body

vec.epilog.vector.body:                           ; preds = %vec.epilog.vector.body, %vec.epilog.ph
  %index205 = phi i64 [ %vec.epilog.resume.val, %vec.epilog.ph ], [ %index.next207, %vec.epilog.vector.body ]
  %vec.phi206 = phi <8 x i8> [ %minmax.ident.splat, %vec.epilog.ph ], [ %512, %vec.epilog.vector.body ]
  %481 = or disjoint i64 %index205, 1
  %482 = or disjoint i64 %index205, 2
  %483 = or disjoint i64 %index205, 3
  %484 = or disjoint i64 %index205, 4
  %485 = or disjoint i64 %index205, 5
  %486 = or disjoint i64 %index205, 6
  %487 = or disjoint i64 %index205, 7
  %488 = getelementptr inbounds [8 x %struct.db_adapter_status], ptr %63, i64 0, i64 %index205, i32 2
  %489 = getelementptr inbounds [8 x %struct.db_adapter_status], ptr %63, i64 0, i64 %481, i32 2
  %490 = getelementptr inbounds [8 x %struct.db_adapter_status], ptr %63, i64 0, i64 %482, i32 2
  %491 = getelementptr inbounds [8 x %struct.db_adapter_status], ptr %63, i64 0, i64 %483, i32 2
  %492 = getelementptr inbounds [8 x %struct.db_adapter_status], ptr %63, i64 0, i64 %484, i32 2
  %493 = getelementptr inbounds [8 x %struct.db_adapter_status], ptr %63, i64 0, i64 %485, i32 2
  %494 = getelementptr inbounds [8 x %struct.db_adapter_status], ptr %63, i64 0, i64 %486, i32 2
  %495 = getelementptr inbounds [8 x %struct.db_adapter_status], ptr %63, i64 0, i64 %487, i32 2
  %496 = load i8, ptr %488, align 1, !tbaa !43
  %497 = load i8, ptr %489, align 1, !tbaa !43
  %498 = load i8, ptr %490, align 1, !tbaa !43
  %499 = load i8, ptr %491, align 1, !tbaa !43
  %500 = load i8, ptr %492, align 1, !tbaa !43
  %501 = load i8, ptr %493, align 1, !tbaa !43
  %502 = load i8, ptr %494, align 1, !tbaa !43
  %503 = load i8, ptr %495, align 1, !tbaa !43
  %504 = insertelement <8 x i8> poison, i8 %496, i64 0
  %505 = insertelement <8 x i8> %504, i8 %497, i64 1
  %506 = insertelement <8 x i8> %505, i8 %498, i64 2
  %507 = insertelement <8 x i8> %506, i8 %499, i64 3
  %508 = insertelement <8 x i8> %507, i8 %500, i64 4
  %509 = insertelement <8 x i8> %508, i8 %501, i64 5
  %510 = insertelement <8 x i8> %509, i8 %502, i64 6
  %511 = insertelement <8 x i8> %510, i8 %503, i64 7
  %512 = call <8 x i8> @llvm.smax.v8i8(<8 x i8> %vec.phi206, <8 x i8> %511)
  %index.next207 = add nuw i64 %index205, 8
  %513 = icmp eq i64 %index.next207, %n.vec204
  br i1 %513, label %vec.epilog.middle.block, label %vec.epilog.vector.body, !llvm.loop !60

vec.epilog.middle.block:                          ; preds = %vec.epilog.vector.body
  %514 = call i8 @llvm.vector.reduce.smax.v8i8(<8 x i8> %512)
  br i1 %cmp.n208, label %._crit_edge148, label %.lr.ph147.preheader

.lr.ph147.preheader:                              ; preds = %vec.epilog.middle.block, %iter.check, %vec.epilog.iter.check
  %indvars.iv180.ph = phi i64 [ 0, %iter.check ], [ %n.vec, %vec.epilog.iter.check ], [ %n.vec204, %vec.epilog.middle.block ]
  %.0108145.ph = phi i8 [ -128, %iter.check ], [ %480, %vec.epilog.iter.check ], [ %514, %vec.epilog.middle.block ]
  br label %.lr.ph147

.lr.ph147:                                        ; preds = %.lr.ph147.preheader, %.lr.ph147
  %indvars.iv180 = phi i64 [ %indvars.iv.next181, %.lr.ph147 ], [ %indvars.iv180.ph, %.lr.ph147.preheader ]
  %.0108145 = phi i8 [ %spec.select124, %.lr.ph147 ], [ %.0108145.ph, %.lr.ph147.preheader ]
  %515 = getelementptr inbounds [8 x %struct.db_adapter_status], ptr %63, i64 0, i64 %indvars.iv180, i32 2
  %516 = load i8, ptr %515, align 1, !tbaa !43
  %spec.select124 = call i8 @llvm.smax.i8(i8 %.0108145, i8 %516)
  %indvars.iv.next181 = add nuw nsw i64 %indvars.iv180, 1
  %exitcond183.not = icmp eq i64 %indvars.iv.next181, %wide.trip.count182
  br i1 %exitcond183.not, label %._crit_edge148, label %.lr.ph147, !llvm.loop !61

._crit_edge148:                                   ; preds = %.lr.ph147, %middle.block, %vec.epilog.middle.block, %.preheader125
  %.0108.lcssa = phi i8 [ -128, %.preheader125 ], [ %480, %middle.block ], [ %514, %vec.epilog.middle.block ], [ %spec.select124, %.lr.ph147 ]
  store i8 %.0108.lcssa, ptr %64, align 2, !tbaa !62
  %517 = load <2 x i32>, ptr %65, align 1, !tbaa !18
  store <2 x i32> %517, ptr %66, align 1, !tbaa !18
  %518 = load i32, ptr %67, align 1, !tbaa !63
  store i32 %518, ptr %68, align 1, !tbaa !64
  %519 = load i8, ptr %55, align 1, !tbaa !52
  store i8 %519, ptr %25, align 1, !tbaa !14
  %520 = load i32, ptr %69, align 1, !tbaa !65
  %521 = icmp ugt i32 %520, %.092152
  br i1 %521, label %522, label %525

522:                                              ; preds = %._crit_edge148
  %523 = add nuw nsw i32 %.092152, 1
  %524 = call i32 @usleep(i32 noundef 10000000) #13
  br label %525

525:                                              ; preds = %522, %._crit_edge148
  %.1 = phi i32 [ %523, %522 ], [ %.092152, %._crit_edge148 ]
  call void @send_to_all_tcp_clients(ptr noundef nonnull %10, ptr noundef nonnull %12, i32 noundef 20) #13
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 1 dereferenceable(28) %70, ptr noundef nonnull align 1 dereferenceable(28) %28, i64 28, i1 false)
  call void @send_to_all_tcp_clients(ptr noundef nonnull %10, ptr noundef nonnull %11, i32 noundef 31) #13
  %526 = call i32 @gettimeofday(ptr noundef nonnull %4, ptr noundef null) #13
  %527 = load i64, ptr %4, align 8, !tbaa !19
  %528 = mul nsw i64 %527, 1000
  %529 = load i64, ptr %40, align 8, !tbaa !21
  %530 = sdiv i64 %529, 1000
  %531 = add nsw i64 %530, %528
  br label %532

532:                                              ; preds = %525, %.thread
  %.1107 = phi i64 [ %531, %525 ], [ %.0106150, %.thread ]
  %.2 = phi i32 [ %.1, %525 ], [ %.092152, %.thread ]
  %533 = load volatile i8, ptr @keeprunning, align 1, !tbaa !22, !range !24, !noundef !25
  %534 = trunc nuw i8 %533 to i1
  br i1 %534, label %80, label %.preheader, !llvm.loop !66

535:                                              ; preds = %.preheader
  %536 = call i32 @close(i32 noundef %78) #13
  br label %537

537:                                              ; preds = %.preheader, %535
  %538 = load i32, ptr %.lcssa.sroa.gep192, align 4, !tbaa !18
  %539 = icmp sgt i32 %538, 0
  br i1 %539, label %540, label %542

540:                                              ; preds = %537
  %541 = call i32 @close(i32 noundef %538) #13
  br label %542

542:                                              ; preds = %540, %537
  %543 = load i32, ptr %.lcssa.sroa.gep193, align 8, !tbaa !18
  %544 = icmp sgt i32 %543, 0
  br i1 %544, label %545, label %547

545:                                              ; preds = %542
  %546 = call i32 @close(i32 noundef %543) #13
  br label %547

547:                                              ; preds = %545, %542
  %548 = load i32, ptr %.lcssa.sroa.gep194, align 4, !tbaa !18
  %549 = icmp sgt i32 %548, 0
  br i1 %549, label %550, label %552

550:                                              ; preds = %547
  %551 = call i32 @close(i32 noundef %548) #13
  br label %552

552:                                              ; preds = %550, %547
  %553 = load i32, ptr %.lcssa.sroa.gep195, align 16, !tbaa !18
  %554 = icmp sgt i32 %553, 0
  br i1 %554, label %555, label %557

555:                                              ; preds = %552
  %556 = call i32 @close(i32 noundef %553) #13
  br label %557

557:                                              ; preds = %555, %552
  %558 = load i32, ptr %.lcssa.sroa.gep196, align 4, !tbaa !18
  %559 = icmp sgt i32 %558, 0
  br i1 %559, label %560, label %562

560:                                              ; preds = %557
  %561 = call i32 @close(i32 noundef %558) #13
  br label %562

562:                                              ; preds = %560, %557
  %563 = load i32, ptr %.lcssa.sroa.gep197, align 8, !tbaa !18
  %564 = icmp sgt i32 %563, 0
  br i1 %564, label %565, label %567

565:                                              ; preds = %562
  %566 = call i32 @close(i32 noundef %563) #13
  br label %567

567:                                              ; preds = %565, %562
  %568 = load i32, ptr %.lcssa.sroa.gep198, align 4, !tbaa !18
  %569 = icmp sgt i32 %568, 0
  br i1 %569, label %570, label %572

570:                                              ; preds = %567
  %571 = call i32 @close(i32 noundef %568) #13
  br label %572

572:                                              ; preds = %570, %567
  %573 = load i32, ptr %.lcssa.sroa.gep199, align 16, !tbaa !18
  %574 = icmp sgt i32 %573, 0
  br i1 %574, label %575, label %577

575:                                              ; preds = %572
  %576 = call i32 @close(i32 noundef %573) #13
  br label %577

577:                                              ; preds = %575, %572
  %578 = load i32, ptr %.lcssa.sroa.gep200, align 4, !tbaa !18
  %579 = icmp sgt i32 %578, 0
  br i1 %579, label %580, label %582

580:                                              ; preds = %577
  %581 = call i32 @close(i32 noundef %578) #13
  br label %582

582:                                              ; preds = %580, %577
  %583 = load i32, ptr %17, align 4, !tbaa !32
  %584 = call i32 @close(i32 noundef %583) #13
  %585 = load i32, ptr %13, align 16, !tbaa !36
  %586 = icmp sgt i32 %585, 0
  br i1 %586, label %587, label %589

587:                                              ; preds = %582
  %588 = call i32 @close(i32 noundef %585) #13
  br label %589

589:                                              ; preds = %582, %587
  %590 = getelementptr inbounds i8, ptr %13, i64 24
  %591 = load i32, ptr %590, align 8, !tbaa !36
  %592 = icmp sgt i32 %591, 0
  br i1 %592, label %593, label %595

593:                                              ; preds = %589
  %594 = call i32 @close(i32 noundef %591) #13
  br label %595

595:                                              ; preds = %593, %589
  %596 = getelementptr inbounds i8, ptr %13, i64 48
  %597 = load i32, ptr %596, align 16, !tbaa !36
  %598 = icmp sgt i32 %597, 0
  br i1 %598, label %599, label %601

599:                                              ; preds = %595
  %600 = call i32 @close(i32 noundef %597) #13
  br label %601

601:                                              ; preds = %599, %595
  %602 = getelementptr inbounds i8, ptr %13, i64 72
  %603 = load i32, ptr %602, align 8, !tbaa !36
  %604 = icmp sgt i32 %603, 0
  br i1 %604, label %605, label %607

605:                                              ; preds = %601
  %606 = call i32 @close(i32 noundef %603) #13
  br label %607

607:                                              ; preds = %605, %601
  %608 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.8)
  call void (i32, ptr, ...) @syslog(i32 noundef 6, ptr noundef nonnull @.str.8) #13
  call void @exit(i32 noundef 0) #16
  unreachable
}

; Function Attrs: nounwind
declare ptr @signal(i32 noundef, ptr noundef) local_unnamed_addr #4

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

declare ptr @db_rc_status_memory_open() local_unnamed_addr #6

declare ptr @db_rc_values_memory_open() local_unnamed_addr #6

declare ptr @db_rc_overwrite_values_memory_open() local_unnamed_addr #6

declare ptr @db_gnd_status_memory_open() local_unnamed_addr #6

declare ptr @db_uav_status_memory_open() local_unnamed_addr #6

declare void @open_db_socket(ptr dead_on_unwind writable sret(%struct.db_socket_t) align 4, ptr noundef, i8 noundef zeroext, i8 noundef signext, i32 noundef, i8 noundef zeroext, i8 noundef zeroext, i8 noundef zeroext) local_unnamed_addr #6

; 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) #7

declare void @create_tcp_server_socket(ptr dead_on_unwind writable sret(%struct.tcp_server_info_t) align 4, i32 noundef) local_unnamed_addr #6

declare void @syslog(i32 noundef, ptr noundef, ...) local_unnamed_addr #6

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

declare i32 @select(i32 noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #6

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

; Function Attrs: nofree nounwind
declare void @perror(ptr nocapture noundef readonly) local_unnamed_addr #2

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

declare zeroext i16 @get_db_payload(ptr noundef, i64 noundef, ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #6

declare i32 @accept(i32 noundef, ptr noundef, ptr noundef) local_unnamed_addr #6

; Function Attrs: nounwind
declare ptr @inet_ntoa(i32) local_unnamed_addr #4

; Function Attrs: inlinehint nounwind uwtable
declare hidden zeroext i16 @__bswap_16(i16 noundef zeroext) local_unnamed_addr #9

; Function Attrs: nofree
declare noundef i64 @read(i32 noundef, ptr nocapture noundef, i64 noundef) local_unnamed_addr #10

; Function Attrs: nounwind
declare i32 @getpeername(i32 noundef, ptr noundef, ptr noundef) local_unnamed_addr #4

declare i32 @close(i32 noundef) local_unnamed_addr #6

; Function Attrs: nounwind
declare i32 @clock_gettime(i32 noundef, ptr noundef) local_unnamed_addr #4

declare i32 @usleep(i32 noundef) local_unnamed_addr #6

declare void @send_to_all_tcp_clients(ptr noundef, ptr noundef, i32 noundef) local_unnamed_addr #6

; Function Attrs: noreturn nounwind
declare void @exit(i32 noundef) local_unnamed_addr #11

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare i8 @llvm.smax.i8(i8, i8) #12

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare i32 @llvm.smax.i32(i32, i32) #12

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare <16 x i8> @llvm.smax.v16i8(<16 x i8>, <16 x i8>) #12

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare i8 @llvm.vector.reduce.smax.v16i8(<16 x i8>) #12

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare <8 x i8> @llvm.smax.v8i8(<8 x i8>, <8 x i8>) #12

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare i8 @llvm.vector.reduce.smax.v8i8(<8 x i8>) #12

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 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { noreturn 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 #4 = { 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 #5 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: write) }
attributes #6 = { "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 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #8 = { 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 #9 = { 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 #10 = { nofree "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 #11 = { noreturn 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 #12 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #13 = { nounwind }
attributes #14 = { nounwind willreturn memory(none) }
attributes #15 = { cold }
attributes #16 = { noreturn 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 = !{!"omnipotent char", !7, i64 0}
!7 = !{!"Simple C/C++ TBAA"}
!8 = !{!9, !6, i64 2}
!9 = !{!"", !6, i64 0, !6, i64 2, !6, i64 3}
!10 = !{!11, !6, i64 4}
!11 = !{!"", !6, i64 0, !6, i64 2, !6, i64 3, !6, i64 4, !6, i64 5, !6, i64 6, !12, i64 7, !12, i64 11, !12, i64 15, !6, i64 19}
!12 = !{!"int", !6, i64 0}
!13 = !{!11, !6, i64 5}
!14 = !{!11, !6, i64 19}
!15 = !{!16, !12, i64 36}
!16 = !{!"", !17, i64 0, !12, i64 8, !12, i64 12, !12, i64 16, !12, i64 20, !12, i64 24, !12, i64 28, !12, i64 32, !12, i64 36, !6, i64 40}
!17 = !{!"long", !6, i64 0}
!18 = !{!12, !12, i64 0}
!19 = !{!20, !17, i64 0}
!20 = !{!"timeval", !17, i64 0, !17, i64 8}
!21 = !{!20, !17, i64 8}
!22 = !{!23, !23, i64 0}
!23 = !{!"_Bool", !6, i64 0}
!24 = !{i8 0, i8 2}
!25 = !{}
!26 = !{i64 0, i64 4, !18, i64 4, i64 2, !27, i64 6, i64 2, !27, i64 8, i64 4, !18, i64 12, i64 2, !27, i64 14, i64 1, !5, i64 15, i64 1, !5, i64 16, i64 8, !5}
!27 = !{!28, !28, i64 0}
!28 = !{!"short", !6, i64 0}
!29 = distinct !{!29, !30}
!30 = !{!"llvm.loop.mustprogress"}
!31 = !{!17, !17, i64 0}
!32 = !{!33, !12, i64 0}
!33 = !{!"tcp_server_info_t", !12, i64 0, !34, i64 4}
!34 = !{!"sockaddr_in", !28, i64 0, !28, i64 2, !35, i64 4, !6, i64 8}
!35 = !{!"in_addr", !12, i64 0}
!36 = !{!37, !12, i64 0}
!37 = !{!"", !12, i64 0, !38, i64 4}
!38 = !{!"sockaddr_ll", !28, i64 0, !28, i64 2, !12, i64 4, !28, i64 8, !6, i64 10, !6, i64 11, !6, i64 12}
!39 = distinct !{!39, !30}
!40 = !{!41, !6, i64 0}
!41 = !{!"uav_rc_status_update_message_t", !6, i64 0, !6, i64 1, !6, i64 2, !6, i64 3, !6, i64 4, !6, i64 5}
!42 = !{!41, !6, i64 1}
!43 = !{!44, !6, i64 8}
!44 = !{!"", !12, i64 0, !12, i64 4, !6, i64 8, !6, i64 9, !6, i64 13, !6, i64 14, !6, i64 15, !6, i64 16, !6, i64 17}
!45 = !{!16, !12, i64 20}
!46 = !{!41, !6, i64 2}
!47 = !{!48, !6, i64 4}
!48 = !{!"", !12, i64 0, !6, i64 4, !6, i64 5, !12, i64 6, !12, i64 10, !12, i64 14, !12, i64 18, !12, i64 22, !28, i64 26, !28, i64 28, !6, i64 30, !6, i64 31, !12, i64 32, !6, i64 36}
!49 = !{!41, !6, i64 3}
!50 = !{!48, !6, i64 5}
!51 = !{!41, !6, i64 4}
!52 = !{!48, !6, i64 31}
!53 = distinct !{!53, !30}
!54 = !{!33, !28, i64 6}
!55 = !{i64 0, i64 8, !31, i64 8, i64 8, !31}
!56 = distinct !{!56, !30}
!57 = distinct !{!57, !30, !58, !59}
!58 = !{!"llvm.loop.isvectorized", i32 1}
!59 = !{!"llvm.loop.unroll.runtime.disable"}
!60 = distinct !{!60, !30, !58, !59}
!61 = distinct !{!61, !30, !59, !58}
!62 = !{!11, !6, i64 6}
!63 = !{!16, !12, i64 32}
!64 = !{!11, !12, i64 15}
!65 = !{!16, !12, i64 28}
!66 = distinct !{!66, !30}


; Effective O3 passes: BDCEPass,CorrelatedValuePropagationPass,EarlyCSEPass,GVNPass,GlobalOptPass,IPSCCPPass,IndVarSimplifyPass,InferAlignmentPass,InferFunctionAttrsPass,InstCombinePass,InstSimplifyPass,JumpThreadingPass,LCSSAPass,LICMPass,LoopIdiomRecognizePass,LoopInstSimplifyPass,LoopLoadEliminationPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,LoopVectorizePass,PostOrderFunctionAttrsPass,ReassociatePass,SLPVectorizerPass,SROAPass,SimplifyCFGPass,TailCallElimPass