; LLVM IR from NTHU-LSALAB/Gemini :: src (scheduler)

; Unoptimized IR (clang -disable-llvm-passes):
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"

%union.pthread_cond_t = type { %struct.__pthread_cond_s }
%struct.__pthread_cond_s = type { %union.__atomic_wide_counter, %union.__atomic_wide_counter, [2 x i32], [2 x i32], i32, i32, [2 x i32] }
%union.__atomic_wide_counter = type { i64 }
%struct.option = type { ptr, i32, ptr, i32 }
%struct.sockaddr_in = type { i16, i16, %struct.in_addr, [8 x i8] }
%struct.in_addr = type { i32 }
%"class.std::thread" = type { %"class.std::thread::id" }
%"class.std::thread::id" = type { i64 }
%"class.std::reference_wrapper" = type { ptr }
%union.pthread_condattr_t = type { i32 }

@QUOTA = external dso_local global double, align 8
@MIN_QUOTA = external dso_local global double, align 8
@WINDOW_SIZE = external dso_local global double, align 8
@verbosity = external dso_local global i32, align 4
@limit_file_name = external dso_local global [4096 x i8], align 16
@limit_file_dir = external dso_local global [4096 x i8], align 16
@candidate_cond = external dso_local global %union.pthread_cond_t, align 8
@.str.25 = external hidden unnamed_addr constant [16 x i8], align 1
@__const.main.opts = external hidden unnamed_addr constant [9 x %struct.option], align 16
@optarg = external global ptr, align 8
@.str.34 = external hidden unnamed_addr constant [21 x i8], align 1
@.str.35 = external hidden unnamed_addr constant [9 x i8], align 1
@.str.36 = external hidden unnamed_addr constant [29 x i8], align 1
@.str.37 = external hidden unnamed_addr constant [32 x i8], align 1
@.str.38 = external hidden unnamed_addr constant [44 x i8], align 1
@.str.39 = external hidden unnamed_addr constant [45 x i8], align 1
@.str.40 = external hidden unnamed_addr constant [47 x i8], align 1
@.str.41 = external hidden unnamed_addr constant [59 x i8], align 1
@.str.42 = external hidden unnamed_addr constant [34 x i8], align 1
@.str.43 = external hidden unnamed_addr constant [15 x i8], align 1
@.str.44 = external hidden unnamed_addr constant [21 x i8], align 1
@.str.45 = external hidden unnamed_addr constant [19 x i8], align 1
@.str.46 = external hidden unnamed_addr constant [15 x i8], align 1
@.str.47 = external hidden unnamed_addr constant [15 x i8], align 1
@.str.48 = external hidden unnamed_addr constant [13 x i8], align 1
@.str.49 = external hidden unnamed_addr constant [25 x i8], align 1
@.str.50 = external hidden unnamed_addr constant [17 x i8], align 1
@.str.51 = external hidden unnamed_addr constant [38 x i8], align 1
@.str.52 = external hidden unnamed_addr constant [32 x i8], align 1
@.str.53 = external hidden unnamed_addr constant [33 x i8], align 1
@.str.54 = external hidden unnamed_addr constant [14 x i8], align 1

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

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

declare i32 @__gxx_personality_v0(...)

; Function Attrs: mustprogress uwtable
declare dso_local void @_Z20read_resource_configv() #1

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

; Function Attrs: nounwind
declare ptr @strncpy(ptr noundef, ptr noundef, i64 noundef) #3

declare void @_Z5ERRORPKcz(ptr noundef, ...) #4

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

declare void @_Z4INFOPKcz(ptr noundef, ...) #4

; Function Attrs: nobuiltin allocsize(0)
declare noundef nonnull ptr @_Znwm(i64 noundef) #6

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

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

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

; Function Attrs: mustprogress uwtable
declare dso_local noundef ptr @_Z20schedule_daemon_funcPv(ptr noundef) #1

; Function Attrs: mustprogress uwtable
declare dso_local noundef ptr @_Z15pod_client_funcPv(ptr noundef) #1

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main(i32 noundef %0, ptr noundef %1) #8 personality ptr @__gxx_personality_v0 {
  %3 = alloca i32, align 4
  %4 = alloca i32, align 4
  %5 = alloca ptr, align 8
  %6 = alloca i16, align 2
  %7 = alloca ptr, align 8
  %8 = alloca [9 x %struct.option], align 16
  %9 = alloca i32, align 4
  %10 = alloca i32, align 4
  %11 = alloca i32, align 4
  %12 = alloca i32, align 4
  %13 = alloca i32, align 4
  %14 = alloca %struct.sockaddr_in, align 4
  %15 = alloca i32, align 4
  %16 = alloca %"class.std::thread", align 8
  %17 = alloca %"class.std::reference_wrapper", align 8
  %18 = alloca %"class.std::reference_wrapper", align 8
  %19 = alloca ptr, align 8
  %20 = alloca i32, align 4
  %21 = alloca %struct.sockaddr_in, align 4
  %22 = alloca i64, align 8
  %23 = alloca %union.pthread_condattr_t, align 4
  %24 = alloca i64, align 8
  %25 = alloca ptr, align 8
  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
  call void @llvm.lifetime.start.p0(i64 2, ptr %6) #12
  store i16 -15485, ptr %6, align 2, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #12
  store ptr @.str.25, ptr %7, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 288, ptr %8) #12
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %8, ptr align 16 @__const.main.opts, i64 288, i1 false)
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #12
  br label %26

26:                                               ; preds = %72, %2
  %27 = load i32, ptr %4, align 4, !tbaa !5
  %28 = load ptr, ptr %5, align 8, !tbaa !9
  %29 = load ptr, ptr %7, align 8, !tbaa !9
  %30 = getelementptr inbounds [9 x %struct.option], ptr %8, i64 0, i64 0
  %31 = call i32 @getopt_long(i32 noundef %27, ptr noundef %28, ptr noundef %29, ptr noundef %30, ptr noundef null) #12
  store i32 %31, ptr %9, align 4, !tbaa !5
  %32 = icmp ne i32 %31, -1
  br i1 %32, label %33, label %73

33:                                               ; preds = %26
  %34 = load i32, ptr %9, align 4, !tbaa !5
  switch i32 %34, label %71 [
    i32 80, label %35
    i32 113, label %39
    i32 109, label %42
    i32 119, label %45
    i32 102, label %48
    i32 112, label %51
    i32 118, label %54
    i32 104, label %57
  ]

35:                                               ; preds = %33
  %36 = load ptr, ptr @optarg, align 8, !tbaa !9
  %37 = call i64 @strtoul(ptr noundef %36, ptr noundef null, i32 noundef 10) #12
  %38 = trunc i64 %37 to i16
  store i16 %38, ptr %6, align 2, !tbaa !11
  br label %72

39:                                               ; preds = %33
  %40 = load ptr, ptr @optarg, align 8, !tbaa !9
  %41 = call double @atof(ptr noundef %40) #13
  store double %41, ptr @QUOTA, align 8, !tbaa !13
  br label %72

42:                                               ; preds = %33
  %43 = load ptr, ptr @optarg, align 8, !tbaa !9
  %44 = call double @atof(ptr noundef %43) #13
  store double %44, ptr @MIN_QUOTA, align 8, !tbaa !13
  br label %72

45:                                               ; preds = %33
  %46 = load ptr, ptr @optarg, align 8, !tbaa !9
  %47 = call double @atof(ptr noundef %46) #13
  store double %47, ptr @WINDOW_SIZE, align 8, !tbaa !13
  br label %72

48:                                               ; preds = %33
  %49 = load ptr, ptr @optarg, align 8, !tbaa !9
  %50 = call ptr @strncpy(ptr noundef @limit_file_name, ptr noundef %49, i64 noundef 4095) #12
  br label %72

51:                                               ; preds = %33
  %52 = load ptr, ptr @optarg, align 8, !tbaa !9
  %53 = call ptr @strncpy(ptr noundef @limit_file_dir, ptr noundef %52, i64 noundef 4095) #12
  br label %72

54:                                               ; preds = %33
  %55 = load ptr, ptr @optarg, align 8, !tbaa !9
  %56 = call i32 @atoi(ptr noundef %55) #13
  store i32 %56, ptr @verbosity, align 4, !tbaa !5
  br label %72

57:                                               ; preds = %33
  %58 = load ptr, ptr %5, align 8, !tbaa !9
  %59 = getelementptr inbounds ptr, ptr %58, i64 0
  %60 = load ptr, ptr %59, align 8, !tbaa !9
  %61 = call i32 (ptr, ...) @printf(ptr noundef @.str.34, ptr noundef %60)
  %62 = call i32 @puts(ptr noundef @.str.35)
  %63 = call i32 @puts(ptr noundef @.str.36)
  %64 = call i32 @puts(ptr noundef @.str.37)
  %65 = call i32 @puts(ptr noundef @.str.38)
  %66 = call i32 @puts(ptr noundef @.str.39)
  %67 = call i32 @puts(ptr noundef @.str.40)
  %68 = call i32 @puts(ptr noundef @.str.41)
  %69 = call i32 @puts(ptr noundef @.str.42)
  %70 = call i32 @puts(ptr noundef @.str.43)
  store i32 0, ptr %3, align 4
  store i32 1, ptr %10, align 4
  br label %167

71:                                               ; preds = %33
  br label %72

72:                                               ; preds = %71, %54, %51, %48, %45, %42, %39, %35
  br label %26, !llvm.loop !15

73:                                               ; preds = %26
  %74 = load i32, ptr @verbosity, align 4, !tbaa !5
  %75 = icmp sgt i32 %74, 0
  br i1 %75, label %76, label %84

76:                                               ; preds = %73
  %77 = call i32 (ptr, ...) @printf(ptr noundef @.str.44)
  %78 = load double, ptr @QUOTA, align 8, !tbaa !13
  %79 = call i32 (ptr, ...) @printf(ptr noundef @.str.45, ptr noundef @.str.46, double noundef %78)
  %80 = load double, ptr @MIN_QUOTA, align 8, !tbaa !13
  %81 = call i32 (ptr, ...) @printf(ptr noundef @.str.45, ptr noundef @.str.47, double noundef %80)
  %82 = load double, ptr @WINDOW_SIZE, align 8, !tbaa !13
  %83 = call i32 (ptr, ...) @printf(ptr noundef @.str.45, ptr noundef @.str.48, double noundef %82)
  br label %84

84:                                               ; preds = %76, %73
  %85 = call ptr @signal(i32 noundef 11, ptr noundef @_Z11sig_handleri) #12
  call void @_Z20read_resource_configv()
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #12
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #12
  store i32 0, ptr %12, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #12
  store i32 0, ptr %13, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 16, ptr %14) #12
  call void @llvm.lifetime.start.p0(i64 4, ptr %15) #12
  store i32 16, ptr %15, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %16) #12
  call void @llvm.lifetime.start.p0(i64 8, ptr %17) #12
  %86 = call ptr @_ZSt3refIA4096_cESt17reference_wrapperIT_ERS2_(ptr noundef nonnull align 1 dereferenceable(4096) @limit_file_dir) #12
  %87 = getelementptr inbounds %"class.std::reference_wrapper", ptr %17, i32 0, i32 0
  store ptr %86, ptr %87, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %18) #12
  %88 = call ptr @_ZSt3refIA4096_cESt17reference_wrapperIT_ERS2_(ptr noundef nonnull align 1 dereferenceable(4096) @limit_file_name) #12
  %89 = getelementptr inbounds %"class.std::reference_wrapper", ptr %18, i32 0, i32 0
  store ptr %88, ptr %89, align 8
  call void @_ZNSt6threadC2IRFvPKcS2_EJSt17reference_wrapperIA4096_cES7_EvEEOT_DpOT0_(ptr noundef nonnull align 8 dereferenceable(8) %16, ptr noundef nonnull @_Z12monitor_filePKcS0_, ptr noundef nonnull align 8 dereferenceable(8) %17, ptr noundef nonnull align 8 dereferenceable(8) %18)
  call void @llvm.lifetime.end.p0(i64 8, ptr %18) #12
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #12
  invoke void @_ZNSt6thread6detachEv(ptr noundef nonnull align 8 dereferenceable(8) %16)
          to label %90 unwind label %96

90:                                               ; preds = %84
  %91 = call i32 @socket(i32 noundef 2, i32 noundef 1, i32 noundef 0) #12
  store i32 %91, ptr %12, align 4, !tbaa !5
  %92 = load i32, ptr %12, align 4, !tbaa !5
  %93 = icmp eq i32 %92, -1
  br i1 %93, label %94, label %100

94:                                               ; preds = %90
  invoke void (ptr, ...) @_Z5ERRORPKcz(ptr noundef @.str.49)
          to label %95 unwind label %96

95:                                               ; preds = %94
  call void @exit(i32 noundef -1) #14
  unreachable

96:                                               ; preds = %94, %84
  %97 = landingpad { ptr, i32 }
          cleanup
  %98 = extractvalue { ptr, i32 } %97, 0
  store ptr %98, ptr %19, align 8
  %99 = extractvalue { ptr, i32 } %97, 1
  store i32 %99, ptr %20, align 4
  br label %166

100:                                              ; preds = %90
  call void @llvm.lifetime.start.p0(i64 16, ptr %21) #12
  call void @llvm.memset.p0.i64(ptr align 4 %21, i8 0, i64 16, i1 false)
  %101 = getelementptr inbounds %struct.sockaddr_in, ptr %21, i32 0, i32 0
  store i16 2, ptr %101, align 4, !tbaa !17
  %102 = getelementptr inbounds %struct.sockaddr_in, ptr %21, i32 0, i32 2
  %103 = getelementptr inbounds %struct.in_addr, ptr %102, i32 0, i32 0
  store i32 0, ptr %103, align 4, !tbaa !20
  %104 = load i16, ptr %6, align 2, !tbaa !11
  %105 = invoke noundef zeroext i16 @_ZL10__bswap_16t(i16 noundef zeroext %104)
          to label %106 unwind label %113

106:                                              ; preds = %100
  %107 = getelementptr inbounds %struct.sockaddr_in, ptr %21, i32 0, i32 1
  store i16 %105, ptr %107, align 2, !tbaa !21
  %108 = load i32, ptr %12, align 4, !tbaa !5
  %109 = call i32 @bind(i32 noundef %108, ptr noundef %21, i32 noundef 16) #12
  %110 = icmp slt i32 %109, 0
  br i1 %110, label %111, label %117

111:                                              ; preds = %106
  invoke void (ptr, ...) @_Z5ERRORPKcz(ptr noundef @.str.50)
          to label %112 unwind label %113

112:                                              ; preds = %111
  call void @exit(i32 noundef -1) #14
  unreachable

113:                                              ; preds = %111, %100
  %114 = landingpad { ptr, i32 }
          cleanup
  %115 = extractvalue { ptr, i32 } %114, 0
  store ptr %115, ptr %19, align 8
  %116 = extractvalue { ptr, i32 } %114, 1
  store i32 %116, ptr %20, align 4
  br label %165

117:                                              ; preds = %106
  %118 = load i32, ptr %12, align 4, !tbaa !5
  %119 = call i32 @listen(i32 noundef %118, i32 noundef 4096) #12
  call void @llvm.lifetime.start.p0(i64 8, ptr %22) #12
  call void @llvm.lifetime.start.p0(i64 4, ptr %23) #12
  %120 = call i32 @pthread_condattr_init(ptr noundef %23) #12
  %121 = call i32 @pthread_condattr_setclock(ptr noundef %23, i32 noundef 1) #12
  %122 = call i32 @pthread_cond_init(ptr noundef @candidate_cond, ptr noundef %23) #12
  %123 = call i32 @pthread_create(ptr noundef %22, ptr noundef null, ptr noundef @_Z20schedule_daemon_funcPv, ptr noundef null) #12
  store i32 %123, ptr %11, align 4, !tbaa !5
  %124 = load i32, ptr %11, align 4, !tbaa !5
  %125 = icmp ne i32 %124, 0
  br i1 %125, label %126, label %134

126:                                              ; preds = %117
  %127 = load i32, ptr %11, align 4, !tbaa !5
  invoke void (ptr, ...) @_Z5ERRORPKcz(ptr noundef @.str.51, i32 noundef %127)
          to label %128 unwind label %130

128:                                              ; preds = %126
  %129 = load i32, ptr %11, align 4, !tbaa !5
  call void @exit(i32 noundef %129) #14
  unreachable

130:                                              ; preds = %160, %143, %138, %134, %126
  %131 = landingpad { ptr, i32 }
          cleanup
  %132 = extractvalue { ptr, i32 } %131, 0
  store ptr %132, ptr %19, align 8
  %133 = extractvalue { ptr, i32 } %131, 1
  store i32 %133, ptr %20, align 4
  br label %164

134:                                              ; preds = %117
  %135 = load i64, ptr %22, align 8, !tbaa !22
  %136 = call i32 @pthread_detach(i64 noundef %135) #12
  invoke void (ptr, ...) @_Z4INFOPKcz(ptr noundef @.str.52)
          to label %137 unwind label %130

137:                                              ; preds = %134
  br label %138

138:                                              ; preds = %146, %137
  %139 = load i32, ptr %12, align 4, !tbaa !5
  %140 = invoke i32 @accept(i32 noundef %139, ptr noundef %14, ptr noundef %15)
          to label %141 unwind label %130

141:                                              ; preds = %138
  store i32 %140, ptr %13, align 4, !tbaa !5
  %142 = icmp ne i32 %140, 0
  br i1 %142, label %143, label %157

143:                                              ; preds = %141
  invoke void (ptr, ...) @_Z4INFOPKcz(ptr noundef @.str.53)
          to label %144 unwind label %130

144:                                              ; preds = %143
  call void @llvm.lifetime.start.p0(i64 8, ptr %24) #12
  call void @llvm.lifetime.start.p0(i64 8, ptr %25) #12
  %145 = invoke noalias noundef nonnull ptr @_Znwm(i64 noundef 4) #15
          to label %146 unwind label %153

146:                                              ; preds = %144
  store ptr %145, ptr %25, align 8, !tbaa !9
  %147 = load i32, ptr %13, align 4, !tbaa !5
  %148 = load ptr, ptr %25, align 8, !tbaa !9
  store i32 %147, ptr %148, align 4, !tbaa !5
  %149 = load ptr, ptr %25, align 8, !tbaa !9
  %150 = call i32 @pthread_create(ptr noundef %24, ptr noundef null, ptr noundef @_Z15pod_client_funcPv, ptr noundef %149) #12
  %151 = load i64, ptr %24, align 8, !tbaa !22
  %152 = call i32 @pthread_detach(i64 noundef %151) #12
  call void @llvm.lifetime.end.p0(i64 8, ptr %25) #12
  call void @llvm.lifetime.end.p0(i64 8, ptr %24) #12
  br label %138, !llvm.loop !24

153:                                              ; preds = %144
  %154 = landingpad { ptr, i32 }
          cleanup
  %155 = extractvalue { ptr, i32 } %154, 0
  store ptr %155, ptr %19, align 8
  %156 = extractvalue { ptr, i32 } %154, 1
  store i32 %156, ptr %20, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %25) #12
  call void @llvm.lifetime.end.p0(i64 8, ptr %24) #12
  br label %164

157:                                              ; preds = %141
  %158 = load i32, ptr %13, align 4, !tbaa !5
  %159 = icmp slt i32 %158, 0
  br i1 %159, label %160, label %162

160:                                              ; preds = %157
  invoke void (ptr, ...) @_Z5ERRORPKcz(ptr noundef @.str.54)
          to label %161 unwind label %130

161:                                              ; preds = %160
  store i32 1, ptr %3, align 4
  store i32 1, ptr %10, align 4
  br label %163

162:                                              ; preds = %157
  store i32 0, ptr %3, align 4
  store i32 1, ptr %10, align 4
  br label %163

163:                                              ; preds = %162, %161
  call void @llvm.lifetime.end.p0(i64 4, ptr %23) #12
  call void @llvm.lifetime.end.p0(i64 8, ptr %22) #12
  call void @llvm.lifetime.end.p0(i64 16, ptr %21) #12
  call void @_ZNSt6threadD2Ev(ptr noundef nonnull align 8 dereferenceable(8) %16) #12
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #12
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #12
  call void @llvm.lifetime.end.p0(i64 16, ptr %14) #12
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #12
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #12
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #12
  br label %167

164:                                              ; preds = %153, %130
  call void @llvm.lifetime.end.p0(i64 4, ptr %23) #12
  call void @llvm.lifetime.end.p0(i64 8, ptr %22) #12
  br label %165

165:                                              ; preds = %164, %113
  call void @llvm.lifetime.end.p0(i64 16, ptr %21) #12
  br label %166

166:                                              ; preds = %165, %96
  call void @_ZNSt6threadD2Ev(ptr noundef nonnull align 8 dereferenceable(8) %16) #12
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #12
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #12
  call void @llvm.lifetime.end.p0(i64 16, ptr %14) #12
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #12
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #12
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #12
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #12
  call void @llvm.lifetime.end.p0(i64 288, ptr %8) #12
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #12
  call void @llvm.lifetime.end.p0(i64 2, ptr %6) #12
  br label %169

167:                                              ; preds = %163, %57
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #12
  call void @llvm.lifetime.end.p0(i64 288, ptr %8) #12
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #12
  call void @llvm.lifetime.end.p0(i64 2, ptr %6) #12
  %168 = load i32, ptr %3, align 4
  ret i32 %168

169:                                              ; preds = %166
  %170 = load ptr, ptr %19, align 8
  %171 = load i32, ptr %20, align 4
  %172 = insertvalue { ptr, i32 } poison, ptr %170, 0
  %173 = insertvalue { ptr, i32 } %172, i32 %171, 1
  resume { ptr, i32 } %173
}

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

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

; Function Attrs: inlinehint mustprogress nounwind willreturn memory(read) uwtable
declare double @atof(ptr noundef nonnull) #9

; Function Attrs: inlinehint mustprogress nounwind willreturn memory(read) uwtable
declare i32 @atoi(ptr noundef nonnull) #9

declare i32 @puts(ptr noundef) #4

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_Z11sig_handleri(i32 noundef) #1

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local ptr @_ZSt3refIA4096_cESt17reference_wrapperIT_ERS2_(ptr noundef nonnull align 1 dereferenceable(4096)) #10

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNSt6threadC2IRFvPKcS2_EJSt17reference_wrapperIA4096_cES7_EvEEOT_DpOT0_(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull, ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(8)) unnamed_addr #1 align 2

declare void @_ZNSt6thread6detachEv(ptr noundef nonnull align 8 dereferenceable(8)) #4

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare hidden noundef zeroext i16 @_ZL10__bswap_16t(i16 noundef zeroext) #10

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

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

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

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

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

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

; Function Attrs: nounwind
declare i32 @pthread_detach(i64 noundef) #3

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt6threadD2Ev(ptr noundef nonnull align 8 dereferenceable(8)) unnamed_addr #11 align 2

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #2 = { nocallback nofree nounwind willreturn memory(argmem: write) }
attributes #3 = { 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 = { "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 = { 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 #6 = { nobuiltin allocsize(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 #7 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #8 = { mustprogress norecurse 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 #9 = { inlinehint mustprogress nounwind willreturn memory(read) 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 = { inlinehint mustprogress 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 #11 = { mustprogress 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 #12 = { nounwind }
attributes #13 = { nounwind willreturn memory(read) }
attributes #14 = { noreturn nounwind }
attributes #15 = { builtin allocsize(0) }

!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++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"any pointer", !7, i64 0}
!11 = !{!12, !12, i64 0}
!12 = !{!"short", !7, i64 0}
!13 = !{!14, !14, i64 0}
!14 = !{!"double", !7, i64 0}
!15 = distinct !{!15, !16}
!16 = !{!"llvm.loop.mustprogress"}
!17 = !{!18, !12, i64 0}
!18 = !{!"_ZTS11sockaddr_in", !12, i64 0, !12, i64 2, !19, i64 4, !7, i64 8}
!19 = !{!"_ZTS7in_addr", !6, i64 0}
!20 = !{!18, !6, i64 4}
!21 = !{!18, !12, i64 2}
!22 = !{!23, !23, i64 0}
!23 = !{!"long", !7, i64 0}
!24 = distinct !{!24, !16}


; Optimized IR (opt -passes='default<O3>'):
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"

%union.pthread_cond_t = type { %struct.__pthread_cond_s }
%struct.__pthread_cond_s = type { %union.__atomic_wide_counter, %union.__atomic_wide_counter, [2 x i32], [2 x i32], i32, i32, [2 x i32] }
%union.__atomic_wide_counter = type { i64 }
%struct.option = type { ptr, i32, ptr, i32 }
%struct.sockaddr_in = type { i16, i16, %struct.in_addr, [8 x i8] }
%struct.in_addr = type { i32 }
%"class.std::thread" = type { %"class.std::thread::id" }
%"class.std::thread::id" = type { i64 }
%"class.std::reference_wrapper" = type { ptr }
%union.pthread_condattr_t = type { i32 }

@QUOTA = external dso_local local_unnamed_addr global double, align 8
@MIN_QUOTA = external dso_local local_unnamed_addr global double, align 8
@WINDOW_SIZE = external dso_local local_unnamed_addr global double, align 8
@verbosity = external dso_local local_unnamed_addr global i32, align 4
@limit_file_name = external dso_local global [4096 x i8], align 16
@limit_file_dir = external dso_local global [4096 x i8], align 16
@candidate_cond = external dso_local global %union.pthread_cond_t, align 8
@.str.25 = external hidden unnamed_addr constant [16 x i8], align 1
@__const.main.opts = external hidden unnamed_addr constant [9 x %struct.option], align 16
@optarg = external local_unnamed_addr global ptr, align 8
@.str.34 = external hidden unnamed_addr constant [21 x i8], align 1
@.str.35 = external hidden unnamed_addr constant [9 x i8], align 1
@.str.36 = external hidden unnamed_addr constant [29 x i8], align 1
@.str.37 = external hidden unnamed_addr constant [32 x i8], align 1
@.str.38 = external hidden unnamed_addr constant [44 x i8], align 1
@.str.39 = external hidden unnamed_addr constant [45 x i8], align 1
@.str.40 = external hidden unnamed_addr constant [47 x i8], align 1
@.str.41 = external hidden unnamed_addr constant [59 x i8], align 1
@.str.42 = external hidden unnamed_addr constant [34 x i8], align 1
@.str.43 = external hidden unnamed_addr constant [15 x i8], align 1
@.str.44 = external hidden unnamed_addr constant [21 x i8], align 1
@.str.45 = external hidden unnamed_addr constant [19 x i8], align 1
@.str.46 = external hidden unnamed_addr constant [15 x i8], align 1
@.str.47 = external hidden unnamed_addr constant [15 x i8], align 1
@.str.48 = external hidden unnamed_addr constant [13 x i8], align 1
@.str.49 = external hidden unnamed_addr constant [25 x i8], align 1
@.str.50 = external hidden unnamed_addr constant [17 x i8], align 1
@.str.51 = external hidden unnamed_addr constant [38 x i8], align 1
@.str.52 = external hidden unnamed_addr constant [32 x i8], align 1
@.str.53 = external hidden unnamed_addr constant [33 x i8], align 1

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

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

declare i32 @__gxx_personality_v0(...)

; Function Attrs: mustprogress uwtable
declare dso_local void @_Z20read_resource_configv() local_unnamed_addr #1

; Function Attrs: mustprogress nofree nounwind willreturn memory(argmem: readwrite)
declare ptr @strncpy(ptr noalias noundef returned writeonly, ptr noalias nocapture noundef readonly, i64 noundef) local_unnamed_addr #2

declare void @_Z5ERRORPKcz(ptr noundef, ...) local_unnamed_addr #3

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

declare void @_Z4INFOPKcz(ptr noundef, ...) local_unnamed_addr #3

; Function Attrs: nobuiltin allocsize(0)
declare noundef nonnull ptr @_Znwm(i64 noundef) local_unnamed_addr #5

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

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

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

; Function Attrs: mustprogress uwtable
declare dso_local noundef ptr @_Z20schedule_daemon_funcPv(ptr noundef) #1

; Function Attrs: mustprogress uwtable
declare dso_local noundef ptr @_Z15pod_client_funcPv(ptr noundef) #1

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main(i32 noundef %0, ptr noundef %1) local_unnamed_addr #8 personality ptr @__gxx_personality_v0 {
  %3 = alloca [9 x %struct.option], align 16
  %4 = alloca %struct.sockaddr_in, align 4
  %5 = alloca i32, align 4
  %6 = alloca %"class.std::thread", align 8
  %7 = alloca %"class.std::reference_wrapper", align 8
  %8 = alloca %"class.std::reference_wrapper", align 8
  %9 = alloca %struct.sockaddr_in, align 4
  %10 = alloca i64, align 8
  %11 = alloca %union.pthread_condattr_t, align 4
  %12 = alloca i64, align 8
  call void @llvm.lifetime.start.p0(i64 288, ptr nonnull %3) #14
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 16 dereferenceable(288) %3, ptr noundef nonnull align 16 dereferenceable(288) @__const.main.opts, i64 288, i1 false)
  br label %13

13:                                               ; preds = %.backedge, %2
  %.024 = phi i16 [ -15485, %2 ], [ %.024.be, %.backedge ]
  %14 = call i32 @getopt_long(i32 noundef %0, ptr noundef %1, ptr noundef nonnull @.str.25, ptr noundef nonnull %3, ptr noundef null) #14
  switch i32 %14, label %.backedge [
    i32 -1, label %49
    i32 80, label %15
    i32 113, label %19
    i32 109, label %22
    i32 119, label %25
    i32 102, label %28
    i32 112, label %31
    i32 118, label %34
    i32 104, label %37
  ]

.backedge:                                        ; preds = %13, %34, %31, %28, %25, %22, %19, %15
  %.024.be = phi i16 [ %.024, %34 ], [ %.024, %31 ], [ %.024, %28 ], [ %.024, %25 ], [ %.024, %22 ], [ %.024, %19 ], [ %18, %15 ], [ %.024, %13 ]
  br label %13, !llvm.loop !5

15:                                               ; preds = %13
  %16 = load ptr, ptr @optarg, align 8, !tbaa !7
  %17 = call i64 @strtoul(ptr nocapture noundef %16, ptr noundef null, i32 noundef 10) #14
  %18 = trunc i64 %17 to i16
  br label %.backedge

19:                                               ; preds = %13
  %20 = load ptr, ptr @optarg, align 8, !tbaa !7
  %21 = call double @atof(ptr noundef %20) #15
  store double %21, ptr @QUOTA, align 8, !tbaa !11
  br label %.backedge

22:                                               ; preds = %13
  %23 = load ptr, ptr @optarg, align 8, !tbaa !7
  %24 = call double @atof(ptr noundef %23) #15
  store double %24, ptr @MIN_QUOTA, align 8, !tbaa !11
  br label %.backedge

25:                                               ; preds = %13
  %26 = load ptr, ptr @optarg, align 8, !tbaa !7
  %27 = call double @atof(ptr noundef %26) #15
  store double %27, ptr @WINDOW_SIZE, align 8, !tbaa !11
  br label %.backedge

28:                                               ; preds = %13
  %29 = load ptr, ptr @optarg, align 8, !tbaa !7
  %30 = call ptr @strncpy(ptr noundef nonnull dereferenceable(1) @limit_file_name, ptr noundef nonnull dereferenceable(1) %29, i64 noundef 4095) #14
  br label %.backedge

31:                                               ; preds = %13
  %32 = load ptr, ptr @optarg, align 8, !tbaa !7
  %33 = call ptr @strncpy(ptr noundef nonnull dereferenceable(1) @limit_file_dir, ptr noundef nonnull dereferenceable(1) %32, i64 noundef 4095) #14
  br label %.backedge

34:                                               ; preds = %13
  %35 = load ptr, ptr @optarg, align 8, !tbaa !7
  %36 = call i32 @atoi(ptr nocapture noundef %35) #15
  store i32 %36, ptr @verbosity, align 4, !tbaa !13
  br label %.backedge

37:                                               ; preds = %13
  %38 = load ptr, ptr %1, align 8, !tbaa !7
  %39 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.34, ptr noundef %38)
  %40 = call i32 @puts(ptr noundef nonnull dereferenceable(1) @.str.35)
  %41 = call i32 @puts(ptr noundef nonnull dereferenceable(1) @.str.36)
  %42 = call i32 @puts(ptr noundef nonnull dereferenceable(1) @.str.37)
  %43 = call i32 @puts(ptr noundef nonnull dereferenceable(1) @.str.38)
  %44 = call i32 @puts(ptr noundef nonnull dereferenceable(1) @.str.39)
  %45 = call i32 @puts(ptr noundef nonnull dereferenceable(1) @.str.40)
  %46 = call i32 @puts(ptr noundef nonnull dereferenceable(1) @.str.41)
  %47 = call i32 @puts(ptr noundef nonnull dereferenceable(1) @.str.42)
  %48 = call i32 @puts(ptr noundef nonnull dereferenceable(1) @.str.43)
  br label %108

49:                                               ; preds = %13
  %50 = load i32, ptr @verbosity, align 4, !tbaa !13
  %51 = icmp sgt i32 %50, 0
  br i1 %51, label %52, label %60

52:                                               ; preds = %49
  %53 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.44)
  %54 = load double, ptr @QUOTA, align 8, !tbaa !11
  %55 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.45, ptr noundef nonnull @.str.46, double noundef %54)
  %56 = load double, ptr @MIN_QUOTA, align 8, !tbaa !11
  %57 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.45, ptr noundef nonnull @.str.47, double noundef %56)
  %58 = load double, ptr @WINDOW_SIZE, align 8, !tbaa !11
  %59 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.45, ptr noundef nonnull @.str.48, double noundef %58)
  br label %60

60:                                               ; preds = %52, %49
  %61 = call ptr @signal(i32 noundef 11, ptr noundef nonnull @_Z11sig_handleri) #14
  call void @_Z20read_resource_configv()
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %4) #14
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %5) #14
  store i32 16, ptr %5, align 4, !tbaa !13
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %6) #14
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %7) #14
  %62 = call ptr @_ZSt3refIA4096_cESt17reference_wrapperIT_ERS2_(ptr noundef nonnull align 1 dereferenceable(4096) @limit_file_dir) #14
  store ptr %62, ptr %7, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %8) #14
  %63 = call ptr @_ZSt3refIA4096_cESt17reference_wrapperIT_ERS2_(ptr noundef nonnull align 1 dereferenceable(4096) @limit_file_name) #14
  store ptr %63, ptr %8, align 8
  call void @_ZNSt6threadC2IRFvPKcS2_EJSt17reference_wrapperIA4096_cES7_EvEEOT_DpOT0_(ptr noundef nonnull align 8 dereferenceable(8) %6, ptr noundef nonnull @_Z12monitor_filePKcS0_, ptr noundef nonnull align 8 dereferenceable(8) %7, ptr noundef nonnull align 8 dereferenceable(8) %8)
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %8) #14
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %7) #14
  invoke void @_ZNSt6thread6detachEv(ptr noundef nonnull align 8 dereferenceable(8) %6)
          to label %64 unwind label %69

64:                                               ; preds = %60
  %65 = call i32 @socket(i32 noundef 2, i32 noundef 1, i32 noundef 0) #14
  %66 = icmp eq i32 %65, -1
  br i1 %66, label %67, label %71

67:                                               ; preds = %64
  invoke void (ptr, ...) @_Z5ERRORPKcz(ptr noundef nonnull @.str.49)
          to label %68 unwind label %69

68:                                               ; preds = %67
  call void @exit(i32 noundef -1) #16
  unreachable

69:                                               ; preds = %67, %60
  %70 = landingpad { ptr, i32 }
          cleanup
  br label %107

71:                                               ; preds = %64
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %9) #14
  %72 = getelementptr inbounds i8, ptr %9, i64 8
  store i64 0, ptr %72, align 4
  store i16 2, ptr %9, align 4, !tbaa !15
  %73 = getelementptr inbounds i8, ptr %9, i64 4
  store i32 0, ptr %73, align 4, !tbaa !19
  %74 = call noundef zeroext i16 @_ZL10__bswap_16t(i16 noundef zeroext %.024)
  %75 = getelementptr inbounds i8, ptr %9, i64 2
  store i16 %74, ptr %75, align 2, !tbaa !20
  %76 = call i32 @bind(i32 noundef %65, ptr noundef nonnull %9, i32 noundef 16) #14
  %77 = icmp slt i32 %76, 0
  br i1 %77, label %78, label %82

78:                                               ; preds = %71
  invoke void (ptr, ...) @_Z5ERRORPKcz(ptr noundef nonnull @.str.50)
          to label %79 unwind label %80

79:                                               ; preds = %78
  call void @exit(i32 noundef -1) #16
  unreachable

80:                                               ; preds = %78
  %81 = landingpad { ptr, i32 }
          cleanup
  br label %106

82:                                               ; preds = %71
  %83 = call i32 @listen(i32 noundef %65, i32 noundef 4096) #14
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %10) #14
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %11) #14
  %84 = call i32 @pthread_condattr_init(ptr noundef nonnull %11) #14
  %85 = call i32 @pthread_condattr_setclock(ptr noundef nonnull %11, i32 noundef 1) #14
  %86 = call i32 @pthread_cond_init(ptr noundef nonnull @candidate_cond, ptr noundef nonnull %11) #14
  %87 = call i32 @pthread_create(ptr noundef nonnull %10, ptr noundef null, ptr noundef nonnull @_Z20schedule_daemon_funcPv, ptr noundef null) #14
  %.not30 = icmp eq i32 %87, 0
  br i1 %.not30, label %90, label %88

88:                                               ; preds = %82
  invoke void (ptr, ...) @_Z5ERRORPKcz(ptr noundef nonnull @.str.51, i32 noundef %87)
          to label %89 unwind label %.loopexit.split-lp

89:                                               ; preds = %88
  call void @exit(i32 noundef %87) #16
  unreachable

.loopexit:                                        ; preds = %.preheader, %95
  %lpad.loopexit = landingpad { ptr, i32 }
          cleanup
  br label %105

.loopexit.split-lp:                               ; preds = %88, %90
  %lpad.loopexit.split-lp = landingpad { ptr, i32 }
          cleanup
  br label %105

90:                                               ; preds = %82
  %91 = load i64, ptr %10, align 8, !tbaa !21
  %92 = call i32 @pthread_detach(i64 noundef %91) #14
  invoke void (ptr, ...) @_Z4INFOPKcz(ptr noundef nonnull @.str.52)
          to label %.preheader unwind label %.loopexit.split-lp

.preheader:                                       ; preds = %90, %98
  %93 = invoke i32 @accept(i32 noundef %65, ptr noundef nonnull %4, ptr noundef nonnull %5)
          to label %94 unwind label %.loopexit

94:                                               ; preds = %.preheader
  %.not31 = icmp eq i32 %93, 0
  br i1 %.not31, label %104, label %95

95:                                               ; preds = %94
  invoke void (ptr, ...) @_Z4INFOPKcz(ptr noundef nonnull @.str.53)
          to label %96 unwind label %.loopexit

96:                                               ; preds = %95
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %12) #14
  %97 = invoke noalias noundef nonnull dereferenceable(4) ptr @_Znwm(i64 noundef 4) #17
          to label %98 unwind label %102

98:                                               ; preds = %96
  store i32 %93, ptr %97, align 4, !tbaa !13
  %99 = call i32 @pthread_create(ptr noundef nonnull %12, ptr noundef null, ptr noundef nonnull @_Z15pod_client_funcPv, ptr noundef nonnull %97) #14
  %100 = load i64, ptr %12, align 8, !tbaa !21
  %101 = call i32 @pthread_detach(i64 noundef %100) #14
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %12) #14
  br label %.preheader, !llvm.loop !23

102:                                              ; preds = %96
  %103 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %12) #14
  br label %105

104:                                              ; preds = %94
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %11) #14
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %10) #14
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %9) #14
  call void @_ZNSt6threadD2Ev(ptr noundef nonnull align 8 dereferenceable(8) %6) #14
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %6) #14
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %5) #14
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %4) #14
  br label %108

105:                                              ; preds = %.loopexit, %.loopexit.split-lp, %102
  %.pn = phi { ptr, i32 } [ %103, %102 ], [ %lpad.loopexit, %.loopexit ], [ %lpad.loopexit.split-lp, %.loopexit.split-lp ]
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %11) #14
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %10) #14
  br label %106

106:                                              ; preds = %105, %80
  %.pn33 = phi { ptr, i32 } [ %81, %80 ], [ %.pn, %105 ]
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %9) #14
  br label %107

107:                                              ; preds = %106, %69
  %.pn35 = phi { ptr, i32 } [ %70, %69 ], [ %.pn33, %106 ]
  call void @_ZNSt6threadD2Ev(ptr noundef nonnull align 8 dereferenceable(8) %6) #14
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %6) #14
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %5) #14
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %4) #14
  call void @llvm.lifetime.end.p0(i64 288, ptr nonnull %3) #14
  resume { ptr, i32 } %.pn35

108:                                              ; preds = %104, %37
  call void @llvm.lifetime.end.p0(i64 288, ptr nonnull %3) #14
  ret i32 0
}

; Function Attrs: nounwind
declare i32 @getopt_long(i32 noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #9

; Function Attrs: mustprogress nofree nounwind willreturn
declare i64 @strtoul(ptr noundef readonly, ptr nocapture noundef, i32 noundef) local_unnamed_addr #10

; Function Attrs: inlinehint mustprogress nofree nounwind willreturn memory(read) uwtable
declare double @atof(ptr nocapture noundef nonnull) local_unnamed_addr #11

; Function Attrs: inlinehint mustprogress nofree nounwind willreturn memory(read) uwtable
declare i32 @atoi(ptr nocapture noundef nonnull) local_unnamed_addr #11

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

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_Z11sig_handleri(i32 noundef) #1

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local ptr @_ZSt3refIA4096_cESt17reference_wrapperIT_ERS2_(ptr noundef nonnull align 1 dereferenceable(4096)) local_unnamed_addr #12

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNSt6threadC2IRFvPKcS2_EJSt17reference_wrapperIA4096_cES7_EvEEOT_DpOT0_(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull, ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(8)) unnamed_addr #1 align 2

declare void @_ZNSt6thread6detachEv(ptr noundef nonnull align 8 dereferenceable(8)) local_unnamed_addr #3

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare hidden noundef zeroext i16 @_ZL10__bswap_16t(i16 noundef zeroext) local_unnamed_addr #12

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

; Function Attrs: nounwind
declare i32 @listen(i32 noundef, i32 noundef) local_unnamed_addr #9

; Function Attrs: nounwind
declare i32 @pthread_condattr_init(ptr noundef) local_unnamed_addr #9

; Function Attrs: nounwind
declare i32 @pthread_condattr_setclock(ptr noundef, i32 noundef) local_unnamed_addr #9

; Function Attrs: nounwind
declare i32 @pthread_cond_init(ptr noundef, ptr noundef) local_unnamed_addr #9

; Function Attrs: nounwind
declare i32 @pthread_create(ptr noundef, ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #9

; Function Attrs: nounwind
declare i32 @pthread_detach(i64 noundef) local_unnamed_addr #9

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt6threadD2Ev(ptr noundef nonnull align 8 dereferenceable(8)) unnamed_addr #13 align 2

attributes #0 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #2 = { mustprogress nofree nounwind willreturn memory(argmem: readwrite) "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { 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 #5 = { nobuiltin allocsize(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 #6 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #7 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #8 = { mustprogress norecurse 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 #9 = { 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 #10 = { mustprogress nofree nounwind willreturn "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 = { inlinehint mustprogress nofree nounwind willreturn memory(read) 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 #12 = { inlinehint mustprogress 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 #13 = { mustprogress 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 #14 = { nounwind }
attributes #15 = { nounwind willreturn memory(read) }
attributes #16 = { noreturn nounwind }
attributes #17 = { builtin allocsize(0) }

!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 = distinct !{!5, !6}
!6 = !{!"llvm.loop.mustprogress"}
!7 = !{!8, !8, i64 0}
!8 = !{!"any pointer", !9, i64 0}
!9 = !{!"omnipotent char", !10, i64 0}
!10 = !{!"Simple C++ TBAA"}
!11 = !{!12, !12, i64 0}
!12 = !{!"double", !9, i64 0}
!13 = !{!14, !14, i64 0}
!14 = !{!"int", !9, i64 0}
!15 = !{!16, !17, i64 0}
!16 = !{!"_ZTS11sockaddr_in", !17, i64 0, !17, i64 2, !18, i64 4, !9, i64 8}
!17 = !{!"short", !9, i64 0}
!18 = !{!"_ZTS7in_addr", !14, i64 0}
!19 = !{!16, !14, i64 4}
!20 = !{!16, !17, i64 2}
!21 = !{!22, !22, i64 0}
!22 = !{!"long", !9, i64 0}
!23 = distinct !{!23, !6}


; Effective O3 passes: DSEPass,EarlyCSEPass,GVNPass,GlobalOptPass,IPSCCPPass,InferFunctionAttrsPass,InstCombinePass,InstSimplifyPass,LCSSAPass,LoopSimplifyPass,LoopUnrollPass,SROAPass,SimplifyCFGPass