; LLVM IR from mbheinen/bpa-ipf-tsp :: cflow (cflow_lib_ipc)

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

@.str.6 = external hidden unnamed_addr constant [16 x i8], align 1
@pf_connect = external hidden global i32, align 4
@pf_server = external hidden global i32, align 4
@pf_wait = external hidden global i32, align 4
@.str.7 = external hidden unnamed_addr constant [38 x i8], align 1
@node_name = external hidden global [128 x i8], align 16
@pf_cflow_socket = external dso_local global i32, align 4
@.str.8 = external hidden unnamed_addr constant [15 x i8], align 1
@.str.9 = external hidden unnamed_addr constant [20 x i8], align 1
@m2 = external hidden constant [38 x i8], align 16
@m1 = external hidden constant [51 x i8], align 16

; Function Attrs: nounwind uwtable
declare dso_local void @pf_usage_exit(ptr noundef) #0

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

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

; Function Attrs: nounwind uwtable
define dso_local void @pf_cflow_init(i32 noundef %0, ptr noundef %1) #0 {
  %3 = alloca i32, align 4
  %4 = alloca ptr, align 8
  %5 = alloca i32, align 4
  %6 = alloca i32, align 4
  %7 = alloca i32, align 4
  %8 = alloca i32, align 4
  %9 = alloca i32, align 4
  %10 = alloca i8, align 1
  %11 = alloca ptr, align 8
  %12 = alloca i32, align 4
  %13 = alloca i32, align 4
  %14 = alloca i32, align 4
  store i32 %0, ptr %3, align 4, !tbaa !5
  store ptr %1, ptr %4, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %5) #8
  call void @llvm.lifetime.start.p0(i64 4, ptr %6) #8
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #8
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #8
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #8
  call void @llvm.lifetime.start.p0(i64 1, ptr %10) #8
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #8
  %15 = load ptr, ptr %4, align 8, !tbaa !9
  %16 = getelementptr inbounds ptr, ptr %15, i64 0
  %17 = load ptr, ptr %16, align 8, !tbaa !9
  %18 = call i32 (ptr, ...) @printf(ptr noundef @.str.6, ptr noundef %17)
  store i32 0, ptr @pf_connect, align 4, !tbaa !5
  store i32 1, ptr @pf_server, align 4, !tbaa !5
  store i32 30, ptr @pf_wait, align 4, !tbaa !5
  store i32 0, ptr %5, align 4, !tbaa !5
  store i32 1, ptr %7, align 4, !tbaa !5
  br label %19

19:                                               ; preds = %184, %2
  %20 = load i32, ptr %7, align 4, !tbaa !5
  %21 = load i32, ptr %3, align 4, !tbaa !5
  %22 = icmp slt i32 %20, %21
  br i1 %22, label %23, label %185

23:                                               ; preds = %19
  %24 = load ptr, ptr %4, align 8, !tbaa !9
  %25 = load i32, ptr %7, align 4, !tbaa !5
  %26 = sext i32 %25 to i64
  %27 = getelementptr inbounds ptr, ptr %24, i64 %26
  %28 = load ptr, ptr %27, align 8, !tbaa !9
  %29 = getelementptr inbounds i8, ptr %28, i64 0
  %30 = load i8, ptr %29, align 1, !tbaa !11
  %31 = sext i8 %30 to i32
  %32 = icmp eq i32 %31, 45
  br i1 %32, label %33, label %181

33:                                               ; preds = %23
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #8
  %34 = load ptr, ptr %4, align 8, !tbaa !9
  %35 = load i32, ptr %7, align 4, !tbaa !5
  %36 = sext i32 %35 to i64
  %37 = getelementptr inbounds ptr, ptr %34, i64 %36
  %38 = load ptr, ptr %37, align 8, !tbaa !9
  %39 = getelementptr inbounds i8, ptr %38, i64 1
  %40 = load i8, ptr %39, align 1, !tbaa !11
  %41 = sext i8 %40 to i32
  %42 = call i1 @llvm.is.constant.i32(i32 %41)
  br i1 %42, label %43, label %68

43:                                               ; preds = %33
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #8
  %44 = load ptr, ptr %4, align 8, !tbaa !9
  %45 = load i32, ptr %7, align 4, !tbaa !5
  %46 = sext i32 %45 to i64
  %47 = getelementptr inbounds ptr, ptr %44, i64 %46
  %48 = load ptr, ptr %47, align 8, !tbaa !9
  %49 = getelementptr inbounds i8, ptr %48, i64 1
  %50 = load i8, ptr %49, align 1, !tbaa !11
  %51 = sext i8 %50 to i32
  store i32 %51, ptr %13, align 4, !tbaa !5
  %52 = load i32, ptr %13, align 4, !tbaa !5
  %53 = icmp slt i32 %52, -128
  br i1 %53, label %57, label %54

54:                                               ; preds = %43
  %55 = load i32, ptr %13, align 4, !tbaa !5
  %56 = icmp sgt i32 %55, 255
  br i1 %56, label %57, label %59

57:                                               ; preds = %54, %43
  %58 = load i32, ptr %13, align 4, !tbaa !5
  br label %66

59:                                               ; preds = %54
  %60 = call ptr @__ctype_toupper_loc() #9
  %61 = load ptr, ptr %60, align 8, !tbaa !9
  %62 = load i32, ptr %13, align 4, !tbaa !5
  %63 = sext i32 %62 to i64
  %64 = getelementptr inbounds i32, ptr %61, i64 %63
  %65 = load i32, ptr %64, align 4, !tbaa !5
  br label %66

66:                                               ; preds = %59, %57
  %67 = phi i32 [ %58, %57 ], [ %65, %59 ]
  store i32 %67, ptr %12, align 4, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #8
  br label %78

68:                                               ; preds = %33
  %69 = load ptr, ptr %4, align 8, !tbaa !9
  %70 = load i32, ptr %7, align 4, !tbaa !5
  %71 = sext i32 %70 to i64
  %72 = getelementptr inbounds ptr, ptr %69, i64 %71
  %73 = load ptr, ptr %72, align 8, !tbaa !9
  %74 = getelementptr inbounds i8, ptr %73, i64 1
  %75 = load i8, ptr %74, align 1, !tbaa !11
  %76 = sext i8 %75 to i32
  %77 = call i32 @toupper(i32 noundef %76) #10
  store i32 %77, ptr %12, align 4, !tbaa !5
  br label %78

78:                                               ; preds = %68, %66
  %79 = load i32, ptr %12, align 4, !tbaa !5
  store i32 %79, ptr %14, align 4, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #8
  %80 = load i32, ptr %14, align 4, !tbaa !5
  %81 = trunc i32 %80 to i8
  store i8 %81, ptr %10, align 1, !tbaa !11
  %82 = load i8, ptr %10, align 1, !tbaa !11
  %83 = sext i8 %82 to i32
  switch i32 %83, label %176 [
    i32 67, label %84
    i32 78, label %117
    i32 87, label %143
  ]

84:                                               ; preds = %78
  store i32 1, ptr @pf_connect, align 4, !tbaa !5
  %85 = load ptr, ptr %4, align 8, !tbaa !9
  %86 = load i32, ptr %7, align 4, !tbaa !5
  %87 = add nsw i32 %86, 1
  %88 = sext i32 %87 to i64
  %89 = getelementptr inbounds ptr, ptr %85, i64 %88
  %90 = load ptr, ptr %89, align 8, !tbaa !9
  %91 = call i32 @atoi(ptr noundef %90) #10
  store i32 %91, ptr %5, align 4, !tbaa !5
  %92 = load i32, ptr %7, align 4, !tbaa !5
  store i32 %92, ptr %8, align 4, !tbaa !5
  %93 = load i32, ptr %7, align 4, !tbaa !5
  %94 = add nsw i32 %93, 2
  store i32 %94, ptr %9, align 4, !tbaa !5
  br label %95

95:                                               ; preds = %109, %84
  %96 = load i32, ptr %9, align 4, !tbaa !5
  %97 = load i32, ptr %3, align 4, !tbaa !5
  %98 = icmp slt i32 %96, %97
  br i1 %98, label %99, label %114

99:                                               ; preds = %95
  %100 = load ptr, ptr %4, align 8, !tbaa !9
  %101 = load i32, ptr %9, align 4, !tbaa !5
  %102 = sext i32 %101 to i64
  %103 = getelementptr inbounds ptr, ptr %100, i64 %102
  %104 = load ptr, ptr %103, align 8, !tbaa !9
  %105 = load ptr, ptr %4, align 8, !tbaa !9
  %106 = load i32, ptr %8, align 4, !tbaa !5
  %107 = sext i32 %106 to i64
  %108 = getelementptr inbounds ptr, ptr %105, i64 %107
  store ptr %104, ptr %108, align 8, !tbaa !9
  br label %109

109:                                              ; preds = %99
  %110 = load i32, ptr %8, align 4, !tbaa !5
  %111 = add nsw i32 %110, 1
  store i32 %111, ptr %8, align 4, !tbaa !5
  %112 = load i32, ptr %9, align 4, !tbaa !5
  %113 = add nsw i32 %112, 1
  store i32 %113, ptr %9, align 4, !tbaa !5
  br label %95, !llvm.loop !12

114:                                              ; preds = %95
  %115 = load i32, ptr %3, align 4, !tbaa !5
  %116 = sub nsw i32 %115, 2
  store i32 %116, ptr %3, align 4, !tbaa !5
  br label %180

117:                                              ; preds = %78
  store i32 0, ptr @pf_server, align 4, !tbaa !5
  %118 = load i32, ptr %7, align 4, !tbaa !5
  store i32 %118, ptr %8, align 4, !tbaa !5
  %119 = load i32, ptr %7, align 4, !tbaa !5
  %120 = add nsw i32 %119, 1
  store i32 %120, ptr %9, align 4, !tbaa !5
  br label %121

121:                                              ; preds = %135, %117
  %122 = load i32, ptr %9, align 4, !tbaa !5
  %123 = load i32, ptr %3, align 4, !tbaa !5
  %124 = icmp slt i32 %122, %123
  br i1 %124, label %125, label %140

125:                                              ; preds = %121
  %126 = load ptr, ptr %4, align 8, !tbaa !9
  %127 = load i32, ptr %9, align 4, !tbaa !5
  %128 = sext i32 %127 to i64
  %129 = getelementptr inbounds ptr, ptr %126, i64 %128
  %130 = load ptr, ptr %129, align 8, !tbaa !9
  %131 = load ptr, ptr %4, align 8, !tbaa !9
  %132 = load i32, ptr %8, align 4, !tbaa !5
  %133 = sext i32 %132 to i64
  %134 = getelementptr inbounds ptr, ptr %131, i64 %133
  store ptr %130, ptr %134, align 8, !tbaa !9
  br label %135

135:                                              ; preds = %125
  %136 = load i32, ptr %8, align 4, !tbaa !5
  %137 = add nsw i32 %136, 1
  store i32 %137, ptr %8, align 4, !tbaa !5
  %138 = load i32, ptr %9, align 4, !tbaa !5
  %139 = add nsw i32 %138, 1
  store i32 %139, ptr %9, align 4, !tbaa !5
  br label %121, !llvm.loop !14

140:                                              ; preds = %121
  %141 = load i32, ptr %3, align 4, !tbaa !5
  %142 = add nsw i32 %141, -1
  store i32 %142, ptr %3, align 4, !tbaa !5
  br label %180

143:                                              ; preds = %78
  %144 = load ptr, ptr %4, align 8, !tbaa !9
  %145 = load i32, ptr %7, align 4, !tbaa !5
  %146 = add nsw i32 %145, 1
  %147 = sext i32 %146 to i64
  %148 = getelementptr inbounds ptr, ptr %144, i64 %147
  %149 = load ptr, ptr %148, align 8, !tbaa !9
  %150 = call i32 @atoi(ptr noundef %149) #10
  store i32 %150, ptr @pf_wait, align 4, !tbaa !5
  %151 = load i32, ptr %7, align 4, !tbaa !5
  store i32 %151, ptr %8, align 4, !tbaa !5
  %152 = load i32, ptr %7, align 4, !tbaa !5
  %153 = add nsw i32 %152, 2
  store i32 %153, ptr %9, align 4, !tbaa !5
  br label %154

154:                                              ; preds = %168, %143
  %155 = load i32, ptr %9, align 4, !tbaa !5
  %156 = load i32, ptr %3, align 4, !tbaa !5
  %157 = icmp slt i32 %155, %156
  br i1 %157, label %158, label %173

158:                                              ; preds = %154
  %159 = load ptr, ptr %4, align 8, !tbaa !9
  %160 = load i32, ptr %9, align 4, !tbaa !5
  %161 = sext i32 %160 to i64
  %162 = getelementptr inbounds ptr, ptr %159, i64 %161
  %163 = load ptr, ptr %162, align 8, !tbaa !9
  %164 = load ptr, ptr %4, align 8, !tbaa !9
  %165 = load i32, ptr %8, align 4, !tbaa !5
  %166 = sext i32 %165 to i64
  %167 = getelementptr inbounds ptr, ptr %164, i64 %166
  store ptr %163, ptr %167, align 8, !tbaa !9
  br label %168

168:                                              ; preds = %158
  %169 = load i32, ptr %8, align 4, !tbaa !5
  %170 = add nsw i32 %169, 1
  store i32 %170, ptr %8, align 4, !tbaa !5
  %171 = load i32, ptr %9, align 4, !tbaa !5
  %172 = add nsw i32 %171, 1
  store i32 %172, ptr %9, align 4, !tbaa !5
  br label %154, !llvm.loop !15

173:                                              ; preds = %154
  %174 = load i32, ptr %3, align 4, !tbaa !5
  %175 = sub nsw i32 %174, 2
  store i32 %175, ptr %3, align 4, !tbaa !5
  br label %180

176:                                              ; preds = %78
  %177 = load ptr, ptr %4, align 8, !tbaa !9
  %178 = getelementptr inbounds ptr, ptr %177, i64 0
  %179 = load ptr, ptr %178, align 8, !tbaa !9
  call void @pf_usage_exit(ptr noundef %179)
  br label %180

180:                                              ; preds = %176, %173, %140, %114
  br label %184

181:                                              ; preds = %23
  %182 = load i32, ptr %7, align 4, !tbaa !5
  %183 = add nsw i32 %182, 1
  store i32 %183, ptr %7, align 4, !tbaa !5
  br label %184

184:                                              ; preds = %181, %180
  br label %19, !llvm.loop !16

185:                                              ; preds = %19
  %186 = load i32, ptr @pf_connect, align 4, !tbaa !5
  %187 = icmp ne i32 %186, 0
  br i1 %187, label %188, label %207

188:                                              ; preds = %185
  %189 = load i32, ptr %5, align 4, !tbaa !5
  %190 = icmp slt i32 %189, 1024
  br i1 %190, label %194, label %191

191:                                              ; preds = %188
  %192 = load i32, ptr %5, align 4, !tbaa !5
  %193 = icmp sgt i32 %192, 5000
  br i1 %193, label %194, label %199

194:                                              ; preds = %191, %188
  %195 = call i32 (ptr, ...) @printf(ptr noundef @.str.7)
  %196 = load ptr, ptr %4, align 8, !tbaa !9
  %197 = getelementptr inbounds ptr, ptr %196, i64 0
  %198 = load ptr, ptr %197, align 8, !tbaa !9
  call void @pf_usage_exit(ptr noundef %198)
  br label %199

199:                                              ; preds = %194, %191
  call void @llvm.memset.p0.i64(ptr align 16 @node_name, i8 0, i64 128, i1 false)
  %200 = load i32, ptr %5, align 4, !tbaa !5
  %201 = call i32 @connect_to_socket(ptr noundef @node_name, i32 noundef %200, ptr noundef @pf_cflow_socket)
  store i32 %201, ptr %6, align 4, !tbaa !5
  %202 = load i32, ptr %6, align 4, !tbaa !5
  %203 = icmp ne i32 %202, 0
  br i1 %203, label %204, label %206

204:                                              ; preds = %199
  call void @perror(ptr noundef @.str.8)
  %205 = call i32 (ptr, ...) @printf(ptr noundef @.str.9, ptr noundef @m2)
  call void @exit(i32 noundef 1) #11
  unreachable

206:                                              ; preds = %199
  br label %232

207:                                              ; preds = %185
  store i32 1024, ptr %5, align 4, !tbaa !5
  %208 = call i32 @create_socket1(ptr noundef %5)
  store i32 %208, ptr %6, align 4, !tbaa !5
  %209 = load i32, ptr %6, align 4, !tbaa !5
  %210 = icmp ne i32 %209, 0
  br i1 %210, label %211, label %213

211:                                              ; preds = %207
  call void @perror(ptr noundef @.str.8)
  %212 = call i32 (ptr, ...) @printf(ptr noundef @.str.9, ptr noundef @m1)
  call void @exit(i32 noundef 1) #11
  unreachable

213:                                              ; preds = %207
  %214 = load i32, ptr @pf_server, align 4, !tbaa !5
  %215 = icmp ne i32 %214, 0
  br i1 %215, label %216, label %224

216:                                              ; preds = %213
  %217 = load i32, ptr %5, align 4, !tbaa !5
  %218 = call i32 @run_ipfsrv(i32 noundef %217)
  store i32 %218, ptr %6, align 4, !tbaa !5
  %219 = load i32, ptr %6, align 4, !tbaa !5
  %220 = icmp ne i32 %219, 0
  br i1 %220, label %221, label %223

221:                                              ; preds = %216
  call void @perror(ptr noundef @.str.8)
  %222 = call i32 (ptr, ...) @printf(ptr noundef @.str.9, ptr noundef @m1)
  call void @exit(i32 noundef 1) #11
  unreachable

223:                                              ; preds = %216
  br label %224

224:                                              ; preds = %223, %213
  %225 = load i32, ptr @pf_wait, align 4, !tbaa !5
  %226 = call i32 @create_socket2(ptr noundef @pf_cflow_socket, i32 noundef %225)
  store i32 %226, ptr %6, align 4, !tbaa !5
  %227 = load i32, ptr %6, align 4, !tbaa !5
  %228 = icmp ne i32 %227, 0
  br i1 %228, label %229, label %231

229:                                              ; preds = %224
  call void @perror(ptr noundef @.str.8)
  %230 = call i32 (ptr, ...) @printf(ptr noundef @.str.9, ptr noundef @m1)
  call void @exit(i32 noundef 1) #11
  unreachable

231:                                              ; preds = %224
  br label %232

232:                                              ; preds = %231, %206
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #8
  call void @llvm.lifetime.end.p0(i64 1, ptr %10) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #8
  ret void
}

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

; Function Attrs: convergent nocallback nofree nosync nounwind willreturn memory(none)
declare i1 @llvm.is.constant.i32(i32) #4

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

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

; Function Attrs: inlinehint nounwind willreturn memory(read) uwtable
declare i32 @toupper(i32 noundef) #6

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

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

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

declare void @perror(ptr noundef) #1

declare i32 @create_socket1(ptr noundef) #1

declare i32 @run_ipfsrv(i32 noundef) #1

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

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


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

@.str.6 = external hidden unnamed_addr constant [16 x i8], align 1
@pf_connect = external hidden local_unnamed_addr global i32, align 4
@pf_server = external hidden local_unnamed_addr global i32, align 4
@pf_wait = external hidden local_unnamed_addr global i32, align 4
@.str.7 = external hidden unnamed_addr constant [38 x i8], align 1
@node_name = external hidden global [128 x i8], align 16
@pf_cflow_socket = external dso_local global i32, align 4
@.str.8 = external hidden unnamed_addr constant [15 x i8], align 1
@.str.9 = external hidden unnamed_addr constant [20 x i8], align 1
@m2 = external hidden constant [38 x i8], align 16
@m1 = external hidden constant [51 x i8], align 16

; Function Attrs: nounwind uwtable
declare dso_local void @pf_usage_exit(ptr noundef) local_unnamed_addr #0

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

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

; Function Attrs: nounwind uwtable
define dso_local void @pf_cflow_init(i32 noundef %0, ptr nocapture noundef %1) local_unnamed_addr #0 {
  %3 = alloca i32, align 4
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %3) #7
  %4 = load ptr, ptr %1, align 8, !tbaa !5
  %5 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.6, ptr noundef %4)
  store i32 0, ptr @pf_connect, align 4, !tbaa !9
  store i32 1, ptr @pf_server, align 4, !tbaa !9
  store i32 30, ptr @pf_wait, align 4, !tbaa !9
  %6 = icmp sgt i32 %0, 1
  br i1 %6, label %.lr.ph93.preheader, label %._crit_edge94.thread

.lr.ph93.preheader:                               ; preds = %2
  %invariant.gep178 = getelementptr i8, ptr %1, i64 8
  %invariant.gep180 = getelementptr i8, ptr %1, i64 8
  %invariant.gep182 = getelementptr i8, ptr %1, i64 16
  %invariant.gep184 = getelementptr i8, ptr %1, i64 16
  %invariant.gep186 = getelementptr i8, ptr %1, i64 24
  %invariant.gep188 = getelementptr i8, ptr %1, i64 24
  %invariant.gep194 = getelementptr i8, ptr %1, i64 8
  %invariant.gep196 = getelementptr i8, ptr %1, i64 8
  %invariant.gep198 = getelementptr i8, ptr %1, i64 16
  %invariant.gep200 = getelementptr i8, ptr %1, i64 16
  %invariant.gep202 = getelementptr i8, ptr %1, i64 24
  %invariant.gep204 = getelementptr i8, ptr %1, i64 24
  %invariant.gep210 = getelementptr i8, ptr %1, i64 8
  %invariant.gep212 = getelementptr i8, ptr %1, i64 8
  %invariant.gep214 = getelementptr i8, ptr %1, i64 16
  %invariant.gep216 = getelementptr i8, ptr %1, i64 16
  %invariant.gep218 = getelementptr i8, ptr %1, i64 24
  %invariant.gep220 = getelementptr i8, ptr %1, i64 24
  br label %.lr.ph93

.lr.ph93:                                         ; preds = %.lr.ph93.preheader, %._crit_edge84
  %7 = phi i32 [ %111, %._crit_edge84 ], [ 0, %.lr.ph93.preheader ]
  %.091 = phi i32 [ %.1, %._crit_edge84 ], [ %0, %.lr.ph93.preheader ]
  %.06590 = phi i32 [ %.166, %._crit_edge84 ], [ 1, %.lr.ph93.preheader ]
  %8 = sext i32 %.06590 to i64
  %9 = getelementptr inbounds ptr, ptr %1, i64 %8
  %10 = load ptr, ptr %9, align 8, !tbaa !5
  %11 = load i8, ptr %10, align 1, !tbaa !11
  %12 = icmp eq i8 %11, 45
  br i1 %12, label %13, label %109

13:                                               ; preds = %.lr.ph93
  %14 = getelementptr inbounds i8, ptr %10, i64 1
  %15 = load i8, ptr %14, align 1, !tbaa !11
  %16 = sext i8 %15 to i32
  %17 = tail call i32 @toupper(i32 noundef %16) #8
  %sext = shl i32 %17, 24
  %18 = ashr exact i32 %sext, 24
  switch i32 %18, label %107 [
    i32 67, label %19
    i32 78, label %49
    i32 87, label %77
  ]

19:                                               ; preds = %13
  store i32 1, ptr @pf_connect, align 4, !tbaa !9
  %20 = getelementptr i8, ptr %9, i64 8
  %21 = load ptr, ptr %20, align 8, !tbaa !5
  %22 = tail call i32 @atoi(ptr nocapture noundef %21) #8
  %23 = add nsw i32 %.06590, 2
  %24 = icmp slt i32 %23, %.091
  br i1 %24, label %.lr.ph88.preheader, label %._crit_edge89

.lr.ph88.preheader:                               ; preds = %19
  %25 = sext i32 %23 to i64
  %26 = add i32 %.091, -3
  %27 = sub i32 %26, %.06590
  %28 = zext i32 %27 to i64
  %29 = add nuw nsw i64 %28, 1
  %min.iters.check = icmp ult i32 %27, 3
  br i1 %min.iters.check, label %.lr.ph88.preheader167, label %vector.memcheck

vector.memcheck:                                  ; preds = %.lr.ph88.preheader
  %30 = sub nsw i64 %8, %25
  %31 = and i64 %30, 2305843009213693948
  %diff.check = icmp eq i64 %31, 0
  br i1 %diff.check, label %.lr.ph88.preheader167, label %vector.ph

vector.ph:                                        ; preds = %vector.memcheck
  %n.vec = and i64 %29, 8589934588
  %ind.end = add nsw i64 %n.vec, %25
  %ind.end123 = add nsw i64 %n.vec, %8
  %invariant.gep206 = getelementptr ptr, ptr %1, i64 %25
  %invariant.gep208 = getelementptr ptr, ptr %1, i64 %8
  br label %vector.body

vector.body:                                      ; preds = %vector.body, %vector.ph
  %index = phi i64 [ 0, %vector.ph ], [ %index.next, %vector.body ]
  %gep207 = getelementptr ptr, ptr %invariant.gep206, i64 %index
  %32 = getelementptr inbounds i8, ptr %gep207, i64 16
  %wide.load = load <2 x ptr>, ptr %gep207, align 8, !tbaa !5
  %wide.load126 = load <2 x ptr>, ptr %32, align 8, !tbaa !5
  %gep209 = getelementptr ptr, ptr %invariant.gep208, i64 %index
  %33 = getelementptr inbounds i8, ptr %gep209, i64 16
  store <2 x ptr> %wide.load, ptr %gep209, align 8, !tbaa !5
  store <2 x ptr> %wide.load126, ptr %33, align 8, !tbaa !5
  %index.next = add nuw i64 %index, 4
  %34 = icmp eq i64 %index.next, %n.vec
  br i1 %34, label %middle.block, label %vector.body, !llvm.loop !12

middle.block:                                     ; preds = %vector.body
  %cmp.n = icmp eq i64 %29, %n.vec
  br i1 %cmp.n, label %._crit_edge89, label %.lr.ph88.preheader167

.lr.ph88.preheader167:                            ; preds = %middle.block, %vector.memcheck, %.lr.ph88.preheader
  %indvars.iv114.ph = phi i64 [ %25, %vector.memcheck ], [ %25, %.lr.ph88.preheader ], [ %ind.end, %middle.block ]
  %indvars.iv112.ph = phi i64 [ %8, %vector.memcheck ], [ %8, %.lr.ph88.preheader ], [ %ind.end123, %middle.block ]
  %35 = trunc i64 %indvars.iv114.ph to i32
  %36 = sub i32 %.091, %35
  %xtraiter173 = and i32 %36, 3
  %lcmp.mod174.not = icmp eq i32 %xtraiter173, 0
  br i1 %lcmp.mod174.not, label %.lr.ph88.prol.loopexit, label %.lr.ph88.prol

.lr.ph88.prol:                                    ; preds = %.lr.ph88.preheader167, %.lr.ph88.prol
  %indvars.iv114.prol = phi i64 [ %indvars.iv.next115.prol, %.lr.ph88.prol ], [ %indvars.iv114.ph, %.lr.ph88.preheader167 ]
  %indvars.iv112.prol = phi i64 [ %indvars.iv.next113.prol, %.lr.ph88.prol ], [ %indvars.iv112.ph, %.lr.ph88.preheader167 ]
  %prol.iter175 = phi i32 [ %prol.iter175.next, %.lr.ph88.prol ], [ 0, %.lr.ph88.preheader167 ]
  %37 = getelementptr inbounds ptr, ptr %1, i64 %indvars.iv114.prol
  %38 = load ptr, ptr %37, align 8, !tbaa !5
  %39 = getelementptr inbounds ptr, ptr %1, i64 %indvars.iv112.prol
  store ptr %38, ptr %39, align 8, !tbaa !5
  %indvars.iv.next113.prol = add nsw i64 %indvars.iv112.prol, 1
  %indvars.iv.next115.prol = add nsw i64 %indvars.iv114.prol, 1
  %prol.iter175.next = add i32 %prol.iter175, 1
  %prol.iter175.cmp.not = icmp eq i32 %prol.iter175.next, %xtraiter173
  br i1 %prol.iter175.cmp.not, label %.lr.ph88.prol.loopexit, label %.lr.ph88.prol, !llvm.loop !16

.lr.ph88.prol.loopexit:                           ; preds = %.lr.ph88.prol, %.lr.ph88.preheader167
  %indvars.iv114.unr = phi i64 [ %indvars.iv114.ph, %.lr.ph88.preheader167 ], [ %indvars.iv.next115.prol, %.lr.ph88.prol ]
  %indvars.iv112.unr = phi i64 [ %indvars.iv112.ph, %.lr.ph88.preheader167 ], [ %indvars.iv.next113.prol, %.lr.ph88.prol ]
  %40 = sub i32 %35, %.091
  %41 = icmp ugt i32 %40, -4
  br i1 %41, label %._crit_edge89, label %.lr.ph88

.lr.ph88:                                         ; preds = %.lr.ph88.prol.loopexit, %.lr.ph88
  %indvars.iv114 = phi i64 [ %indvars.iv.next115.3, %.lr.ph88 ], [ %indvars.iv114.unr, %.lr.ph88.prol.loopexit ]
  %indvars.iv112 = phi i64 [ %indvars.iv.next113.3, %.lr.ph88 ], [ %indvars.iv112.unr, %.lr.ph88.prol.loopexit ]
  %42 = getelementptr inbounds ptr, ptr %1, i64 %indvars.iv114
  %43 = load ptr, ptr %42, align 8, !tbaa !5
  %44 = getelementptr inbounds ptr, ptr %1, i64 %indvars.iv112
  store ptr %43, ptr %44, align 8, !tbaa !5
  %gep211 = getelementptr ptr, ptr %invariant.gep210, i64 %indvars.iv114
  %45 = load ptr, ptr %gep211, align 8, !tbaa !5
  %gep213 = getelementptr ptr, ptr %invariant.gep212, i64 %indvars.iv112
  store ptr %45, ptr %gep213, align 8, !tbaa !5
  %gep215 = getelementptr ptr, ptr %invariant.gep214, i64 %indvars.iv114
  %46 = load ptr, ptr %gep215, align 8, !tbaa !5
  %gep217 = getelementptr ptr, ptr %invariant.gep216, i64 %indvars.iv112
  store ptr %46, ptr %gep217, align 8, !tbaa !5
  %gep219 = getelementptr ptr, ptr %invariant.gep218, i64 %indvars.iv114
  %47 = load ptr, ptr %gep219, align 8, !tbaa !5
  %gep221 = getelementptr ptr, ptr %invariant.gep220, i64 %indvars.iv112
  store ptr %47, ptr %gep221, align 8, !tbaa !5
  %indvars.iv.next113.3 = add nsw i64 %indvars.iv112, 4
  %indvars.iv.next115.3 = add nsw i64 %indvars.iv114, 4
  %lftr.wideiv119.3 = trunc i64 %indvars.iv.next115.3 to i32
  %exitcond120.not.3 = icmp eq i32 %.091, %lftr.wideiv119.3
  br i1 %exitcond120.not.3, label %._crit_edge89, label %.lr.ph88, !llvm.loop !18

._crit_edge89:                                    ; preds = %.lr.ph88.prol.loopexit, %.lr.ph88, %middle.block, %19
  %48 = add nsw i32 %.091, -2
  br label %._crit_edge84

49:                                               ; preds = %13
  store i32 0, ptr @pf_server, align 4, !tbaa !9
  %.17079 = add nsw i32 %.06590, 1
  %50 = icmp slt i32 %.17079, %.091
  br i1 %50, label %.lr.ph83.preheader, label %.._crit_edge84_crit_edge

.._crit_edge84_crit_edge:                         ; preds = %49
  %.pre121 = add nsw i32 %.091, -1
  br label %._crit_edge84

.lr.ph83.preheader:                               ; preds = %49
  %51 = sext i32 %.17079 to i64
  %52 = add nsw i32 %.091, -1
  %53 = add i32 %.091, -2
  %54 = sub i32 %53, %.06590
  %55 = zext i32 %54 to i64
  %56 = add nuw nsw i64 %55, 1
  %min.iters.check131 = icmp ult i32 %54, 3
  br i1 %min.iters.check131, label %.lr.ph83.preheader168, label %vector.memcheck127

vector.memcheck127:                               ; preds = %.lr.ph83.preheader
  %57 = sub nsw i64 %8, %51
  %58 = and i64 %57, 2305843009213693948
  %diff.check128 = icmp eq i64 %58, 0
  br i1 %diff.check128, label %.lr.ph83.preheader168, label %vector.ph132

vector.ph132:                                     ; preds = %vector.memcheck127
  %n.vec134 = and i64 %56, 8589934588
  %ind.end135 = add nsw i64 %n.vec134, %8
  %ind.end137 = add nsw i64 %n.vec134, %51
  %invariant.gep190 = getelementptr ptr, ptr %1, i64 %51
  %invariant.gep192 = getelementptr ptr, ptr %1, i64 %8
  br label %vector.body139

vector.body139:                                   ; preds = %vector.body139, %vector.ph132
  %index140 = phi i64 [ 0, %vector.ph132 ], [ %index.next145, %vector.body139 ]
  %gep191 = getelementptr ptr, ptr %invariant.gep190, i64 %index140
  %59 = getelementptr inbounds i8, ptr %gep191, i64 16
  %wide.load143 = load <2 x ptr>, ptr %gep191, align 8, !tbaa !5
  %wide.load144 = load <2 x ptr>, ptr %59, align 8, !tbaa !5
  %gep193 = getelementptr ptr, ptr %invariant.gep192, i64 %index140
  %60 = getelementptr inbounds i8, ptr %gep193, i64 16
  store <2 x ptr> %wide.load143, ptr %gep193, align 8, !tbaa !5
  store <2 x ptr> %wide.load144, ptr %60, align 8, !tbaa !5
  %index.next145 = add nuw i64 %index140, 4
  %61 = icmp eq i64 %index.next145, %n.vec134
  br i1 %61, label %middle.block129, label %vector.body139, !llvm.loop !19

middle.block129:                                  ; preds = %vector.body139
  %cmp.n146 = icmp eq i64 %56, %n.vec134
  br i1 %cmp.n146, label %._crit_edge84, label %.lr.ph83.preheader168

.lr.ph83.preheader168:                            ; preds = %middle.block129, %vector.memcheck127, %.lr.ph83.preheader
  %indvars.iv104.ph = phi i64 [ %8, %vector.memcheck127 ], [ %8, %.lr.ph83.preheader ], [ %ind.end135, %middle.block129 ]
  %indvars.iv102.ph = phi i64 [ %51, %vector.memcheck127 ], [ %51, %.lr.ph83.preheader ], [ %ind.end137, %middle.block129 ]
  %62 = trunc i64 %indvars.iv104.ph to i32
  %63 = xor i32 %62, -1
  %64 = add i32 %.091, %63
  %65 = add i32 %.091, -2
  %66 = sub i32 %65, %62
  %xtraiter170 = and i32 %64, 3
  %lcmp.mod171.not = icmp eq i32 %xtraiter170, 0
  br i1 %lcmp.mod171.not, label %.lr.ph83.prol.loopexit, label %.lr.ph83.prol

.lr.ph83.prol:                                    ; preds = %.lr.ph83.preheader168, %.lr.ph83.prol
  %indvars.iv104.prol = phi i64 [ %indvars.iv.next105.prol, %.lr.ph83.prol ], [ %indvars.iv104.ph, %.lr.ph83.preheader168 ]
  %indvars.iv102.prol = phi i64 [ %indvars.iv.next103.prol, %.lr.ph83.prol ], [ %indvars.iv102.ph, %.lr.ph83.preheader168 ]
  %prol.iter172 = phi i32 [ %prol.iter172.next, %.lr.ph83.prol ], [ 0, %.lr.ph83.preheader168 ]
  %67 = getelementptr inbounds ptr, ptr %1, i64 %indvars.iv102.prol
  %68 = load ptr, ptr %67, align 8, !tbaa !5
  %69 = getelementptr inbounds ptr, ptr %1, i64 %indvars.iv104.prol
  store ptr %68, ptr %69, align 8, !tbaa !5
  %indvars.iv.next105.prol = add nsw i64 %indvars.iv104.prol, 1
  %indvars.iv.next103.prol = add nsw i64 %indvars.iv102.prol, 1
  %prol.iter172.next = add i32 %prol.iter172, 1
  %prol.iter172.cmp.not = icmp eq i32 %prol.iter172.next, %xtraiter170
  br i1 %prol.iter172.cmp.not, label %.lr.ph83.prol.loopexit, label %.lr.ph83.prol, !llvm.loop !20

.lr.ph83.prol.loopexit:                           ; preds = %.lr.ph83.prol, %.lr.ph83.preheader168
  %indvars.iv104.unr = phi i64 [ %indvars.iv104.ph, %.lr.ph83.preheader168 ], [ %indvars.iv.next105.prol, %.lr.ph83.prol ]
  %indvars.iv102.unr = phi i64 [ %indvars.iv102.ph, %.lr.ph83.preheader168 ], [ %indvars.iv.next103.prol, %.lr.ph83.prol ]
  %70 = icmp ult i32 %66, 3
  br i1 %70, label %._crit_edge84, label %.lr.ph83

.lr.ph83:                                         ; preds = %.lr.ph83.prol.loopexit, %.lr.ph83
  %indvars.iv104 = phi i64 [ %indvars.iv.next105.3, %.lr.ph83 ], [ %indvars.iv104.unr, %.lr.ph83.prol.loopexit ]
  %indvars.iv102 = phi i64 [ %indvars.iv.next103.3, %.lr.ph83 ], [ %indvars.iv102.unr, %.lr.ph83.prol.loopexit ]
  %71 = getelementptr inbounds ptr, ptr %1, i64 %indvars.iv102
  %72 = load ptr, ptr %71, align 8, !tbaa !5
  %73 = getelementptr inbounds ptr, ptr %1, i64 %indvars.iv104
  store ptr %72, ptr %73, align 8, !tbaa !5
  %gep195 = getelementptr ptr, ptr %invariant.gep194, i64 %indvars.iv102
  %74 = load ptr, ptr %gep195, align 8, !tbaa !5
  %gep197 = getelementptr ptr, ptr %invariant.gep196, i64 %indvars.iv104
  store ptr %74, ptr %gep197, align 8, !tbaa !5
  %gep199 = getelementptr ptr, ptr %invariant.gep198, i64 %indvars.iv102
  %75 = load ptr, ptr %gep199, align 8, !tbaa !5
  %gep201 = getelementptr ptr, ptr %invariant.gep200, i64 %indvars.iv104
  store ptr %75, ptr %gep201, align 8, !tbaa !5
  %gep203 = getelementptr ptr, ptr %invariant.gep202, i64 %indvars.iv102
  %76 = load ptr, ptr %gep203, align 8, !tbaa !5
  %gep205 = getelementptr ptr, ptr %invariant.gep204, i64 %indvars.iv104
  store ptr %76, ptr %gep205, align 8, !tbaa !5
  %indvars.iv.next105.3 = add nsw i64 %indvars.iv104, 4
  %indvars.iv.next103.3 = add nsw i64 %indvars.iv102, 4
  %lftr.wideiv109.3 = trunc i64 %indvars.iv.next105.3 to i32
  %exitcond110.not.3 = icmp eq i32 %52, %lftr.wideiv109.3
  br i1 %exitcond110.not.3, label %._crit_edge84, label %.lr.ph83, !llvm.loop !21

77:                                               ; preds = %13
  %78 = getelementptr i8, ptr %9, i64 8
  %79 = load ptr, ptr %78, align 8, !tbaa !5
  %80 = tail call i32 @atoi(ptr nocapture noundef %79) #8
  store i32 %80, ptr @pf_wait, align 4, !tbaa !9
  %81 = add nsw i32 %.06590, 2
  %82 = icmp slt i32 %81, %.091
  br i1 %82, label %.lr.ph.preheader, label %._crit_edge

.lr.ph.preheader:                                 ; preds = %77
  %83 = sext i32 %81 to i64
  %84 = add i32 %.091, -3
  %85 = sub i32 %84, %.06590
  %86 = zext i32 %85 to i64
  %87 = add nuw nsw i64 %86, 1
  %min.iters.check151 = icmp ult i32 %85, 3
  br i1 %min.iters.check151, label %.lr.ph.preheader169, label %vector.memcheck147

vector.memcheck147:                               ; preds = %.lr.ph.preheader
  %88 = sub nsw i64 %8, %83
  %89 = and i64 %88, 2305843009213693948
  %diff.check148 = icmp eq i64 %89, 0
  br i1 %diff.check148, label %.lr.ph.preheader169, label %vector.ph152

vector.ph152:                                     ; preds = %vector.memcheck147
  %n.vec154 = and i64 %87, 8589934588
  %ind.end155 = add nsw i64 %n.vec154, %83
  %ind.end157 = add nsw i64 %n.vec154, %8
  %invariant.gep = getelementptr ptr, ptr %1, i64 %83
  %invariant.gep176 = getelementptr ptr, ptr %1, i64 %8
  br label %vector.body159

vector.body159:                                   ; preds = %vector.body159, %vector.ph152
  %index160 = phi i64 [ 0, %vector.ph152 ], [ %index.next165, %vector.body159 ]
  %gep = getelementptr ptr, ptr %invariant.gep, i64 %index160
  %90 = getelementptr inbounds i8, ptr %gep, i64 16
  %wide.load163 = load <2 x ptr>, ptr %gep, align 8, !tbaa !5
  %wide.load164 = load <2 x ptr>, ptr %90, align 8, !tbaa !5
  %gep177 = getelementptr ptr, ptr %invariant.gep176, i64 %index160
  %91 = getelementptr inbounds i8, ptr %gep177, i64 16
  store <2 x ptr> %wide.load163, ptr %gep177, align 8, !tbaa !5
  store <2 x ptr> %wide.load164, ptr %91, align 8, !tbaa !5
  %index.next165 = add nuw i64 %index160, 4
  %92 = icmp eq i64 %index.next165, %n.vec154
  br i1 %92, label %middle.block149, label %vector.body159, !llvm.loop !22

middle.block149:                                  ; preds = %vector.body159
  %cmp.n166 = icmp eq i64 %87, %n.vec154
  br i1 %cmp.n166, label %._crit_edge, label %.lr.ph.preheader169

.lr.ph.preheader169:                              ; preds = %middle.block149, %vector.memcheck147, %.lr.ph.preheader
  %indvars.iv96.ph = phi i64 [ %83, %vector.memcheck147 ], [ %83, %.lr.ph.preheader ], [ %ind.end155, %middle.block149 ]
  %indvars.iv.ph = phi i64 [ %8, %vector.memcheck147 ], [ %8, %.lr.ph.preheader ], [ %ind.end157, %middle.block149 ]
  %93 = trunc i64 %indvars.iv96.ph to i32
  %94 = sub i32 %.091, %93
  %xtraiter = and i32 %94, 3
  %lcmp.mod.not = icmp eq i32 %xtraiter, 0
  br i1 %lcmp.mod.not, label %.lr.ph.prol.loopexit, label %.lr.ph.prol

.lr.ph.prol:                                      ; preds = %.lr.ph.preheader169, %.lr.ph.prol
  %indvars.iv96.prol = phi i64 [ %indvars.iv.next97.prol, %.lr.ph.prol ], [ %indvars.iv96.ph, %.lr.ph.preheader169 ]
  %indvars.iv.prol = phi i64 [ %indvars.iv.next.prol, %.lr.ph.prol ], [ %indvars.iv.ph, %.lr.ph.preheader169 ]
  %prol.iter = phi i32 [ %prol.iter.next, %.lr.ph.prol ], [ 0, %.lr.ph.preheader169 ]
  %95 = getelementptr inbounds ptr, ptr %1, i64 %indvars.iv96.prol
  %96 = load ptr, ptr %95, align 8, !tbaa !5
  %97 = getelementptr inbounds ptr, ptr %1, i64 %indvars.iv.prol
  store ptr %96, ptr %97, align 8, !tbaa !5
  %indvars.iv.next.prol = add nsw i64 %indvars.iv.prol, 1
  %indvars.iv.next97.prol = add nsw i64 %indvars.iv96.prol, 1
  %prol.iter.next = add i32 %prol.iter, 1
  %prol.iter.cmp.not = icmp eq i32 %prol.iter.next, %xtraiter
  br i1 %prol.iter.cmp.not, label %.lr.ph.prol.loopexit, label %.lr.ph.prol, !llvm.loop !23

.lr.ph.prol.loopexit:                             ; preds = %.lr.ph.prol, %.lr.ph.preheader169
  %indvars.iv96.unr = phi i64 [ %indvars.iv96.ph, %.lr.ph.preheader169 ], [ %indvars.iv.next97.prol, %.lr.ph.prol ]
  %indvars.iv.unr = phi i64 [ %indvars.iv.ph, %.lr.ph.preheader169 ], [ %indvars.iv.next.prol, %.lr.ph.prol ]
  %98 = sub i32 %93, %.091
  %99 = icmp ugt i32 %98, -4
  br i1 %99, label %._crit_edge, label %.lr.ph

.lr.ph:                                           ; preds = %.lr.ph.prol.loopexit, %.lr.ph
  %indvars.iv96 = phi i64 [ %indvars.iv.next97.3, %.lr.ph ], [ %indvars.iv96.unr, %.lr.ph.prol.loopexit ]
  %indvars.iv = phi i64 [ %indvars.iv.next.3, %.lr.ph ], [ %indvars.iv.unr, %.lr.ph.prol.loopexit ]
  %100 = getelementptr inbounds ptr, ptr %1, i64 %indvars.iv96
  %101 = load ptr, ptr %100, align 8, !tbaa !5
  %102 = getelementptr inbounds ptr, ptr %1, i64 %indvars.iv
  store ptr %101, ptr %102, align 8, !tbaa !5
  %gep179 = getelementptr ptr, ptr %invariant.gep178, i64 %indvars.iv96
  %103 = load ptr, ptr %gep179, align 8, !tbaa !5
  %gep181 = getelementptr ptr, ptr %invariant.gep180, i64 %indvars.iv
  store ptr %103, ptr %gep181, align 8, !tbaa !5
  %gep183 = getelementptr ptr, ptr %invariant.gep182, i64 %indvars.iv96
  %104 = load ptr, ptr %gep183, align 8, !tbaa !5
  %gep185 = getelementptr ptr, ptr %invariant.gep184, i64 %indvars.iv
  store ptr %104, ptr %gep185, align 8, !tbaa !5
  %gep187 = getelementptr ptr, ptr %invariant.gep186, i64 %indvars.iv96
  %105 = load ptr, ptr %gep187, align 8, !tbaa !5
  %gep189 = getelementptr ptr, ptr %invariant.gep188, i64 %indvars.iv
  store ptr %105, ptr %gep189, align 8, !tbaa !5
  %indvars.iv.next.3 = add nsw i64 %indvars.iv, 4
  %indvars.iv.next97.3 = add nsw i64 %indvars.iv96, 4
  %lftr.wideiv.3 = trunc i64 %indvars.iv.next97.3 to i32
  %exitcond.not.3 = icmp eq i32 %.091, %lftr.wideiv.3
  br i1 %exitcond.not.3, label %._crit_edge, label %.lr.ph, !llvm.loop !24

._crit_edge:                                      ; preds = %.lr.ph.prol.loopexit, %.lr.ph, %middle.block149, %77
  %106 = add nsw i32 %.091, -2
  br label %._crit_edge84

107:                                              ; preds = %13
  %108 = load ptr, ptr %1, align 8, !tbaa !5
  tail call void @pf_usage_exit(ptr noundef %108)
  br label %._crit_edge84

109:                                              ; preds = %.lr.ph93
  %110 = add nsw i32 %.06590, 1
  br label %._crit_edge84

._crit_edge84:                                    ; preds = %.lr.ph83.prol.loopexit, %.lr.ph83, %middle.block129, %.._crit_edge84_crit_edge, %._crit_edge89, %._crit_edge, %107, %109
  %111 = phi i32 [ %7, %107 ], [ %7, %._crit_edge ], [ %22, %._crit_edge89 ], [ %7, %109 ], [ %7, %.._crit_edge84_crit_edge ], [ %7, %middle.block129 ], [ %7, %.lr.ph83 ], [ %7, %.lr.ph83.prol.loopexit ]
  %.166 = phi i32 [ %.06590, %107 ], [ %.06590, %._crit_edge ], [ %.06590, %._crit_edge89 ], [ %110, %109 ], [ %.06590, %.._crit_edge84_crit_edge ], [ %.06590, %middle.block129 ], [ %.06590, %.lr.ph83 ], [ %.06590, %.lr.ph83.prol.loopexit ]
  %.1 = phi i32 [ %.091, %107 ], [ %106, %._crit_edge ], [ %48, %._crit_edge89 ], [ %.091, %109 ], [ %.pre121, %.._crit_edge84_crit_edge ], [ %52, %middle.block129 ], [ %52, %.lr.ph83 ], [ %52, %.lr.ph83.prol.loopexit ]
  %112 = icmp slt i32 %.166, %.1
  br i1 %112, label %.lr.ph93, label %._crit_edge94, !llvm.loop !25

._crit_edge94:                                    ; preds = %._crit_edge84
  %.pre = load i32, ptr @pf_connect, align 4, !tbaa !9
  %113 = icmp eq i32 %.pre, 0
  br i1 %113, label %._crit_edge94.thread, label %114

114:                                              ; preds = %._crit_edge94
  %115 = add i32 %111, -5001
  %or.cond3 = icmp ult i32 %115, -3977
  br i1 %or.cond3, label %116, label %119

116:                                              ; preds = %114
  %117 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.7)
  %118 = load ptr, ptr %1, align 8, !tbaa !5
  tail call void @pf_usage_exit(ptr noundef %118)
  br label %119

119:                                              ; preds = %114, %116
  tail call void @llvm.memset.p0.i64(ptr noundef nonnull align 16 dereferenceable(128) @node_name, i8 0, i64 128, i1 false)
  %120 = tail call i32 @connect_to_socket(ptr noundef nonnull @node_name, i32 noundef %111, ptr noundef nonnull @pf_cflow_socket) #7
  %.not76 = icmp eq i32 %120, 0
  br i1 %.not76, label %138, label %121

121:                                              ; preds = %119
  tail call void @perror(ptr noundef nonnull @.str.8) #9
  %122 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.9, ptr noundef nonnull @m2)
  tail call void @exit(i32 noundef 1) #10
  unreachable

._crit_edge94.thread:                             ; preds = %2, %._crit_edge94
  store i32 1024, ptr %3, align 4, !tbaa !9
  %123 = call i32 @create_socket1(ptr noundef nonnull %3) #7
  %.not72 = icmp eq i32 %123, 0
  br i1 %.not72, label %126, label %124

124:                                              ; preds = %._crit_edge94.thread
  call void @perror(ptr noundef nonnull @.str.8) #9
  %125 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.9, ptr noundef nonnull @m1)
  call void @exit(i32 noundef 1) #10
  unreachable

126:                                              ; preds = %._crit_edge94.thread
  %127 = load i32, ptr @pf_server, align 4, !tbaa !9
  %.not73 = icmp eq i32 %127, 0
  br i1 %.not73, label %133, label %128

128:                                              ; preds = %126
  %129 = load i32, ptr %3, align 4, !tbaa !9
  %130 = call i32 @run_ipfsrv(i32 noundef %129) #7
  %.not74 = icmp eq i32 %130, 0
  br i1 %.not74, label %133, label %131

131:                                              ; preds = %128
  call void @perror(ptr noundef nonnull @.str.8) #9
  %132 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.9, ptr noundef nonnull @m1)
  call void @exit(i32 noundef 1) #10
  unreachable

133:                                              ; preds = %128, %126
  %134 = load i32, ptr @pf_wait, align 4, !tbaa !9
  %135 = call i32 @create_socket2(ptr noundef nonnull @pf_cflow_socket, i32 noundef %134) #7
  %.not75 = icmp eq i32 %135, 0
  br i1 %.not75, label %138, label %136

136:                                              ; preds = %133
  call void @perror(ptr noundef nonnull @.str.8) #9
  %137 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.9, ptr noundef nonnull @m1)
  call void @exit(i32 noundef 1) #10
  unreachable

138:                                              ; preds = %133, %119
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %3) #7
  ret void
}

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

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

; Function Attrs: inlinehint mustprogress nofree nounwind willreturn memory(read) uwtable
declare i32 @toupper(i32 noundef) local_unnamed_addr #4

; Function Attrs: inlinehint mustprogress nofree nounwind willreturn memory(read) uwtable
declare i32 @atoi(ptr nocapture noundef nonnull) 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 i32 @connect_to_socket(ptr noundef, i32 noundef, ptr noundef) local_unnamed_addr #6

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

declare i32 @create_socket1(ptr noundef) local_unnamed_addr #6

declare i32 @run_ipfsrv(i32 noundef) local_unnamed_addr #6

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

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 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #2 = { 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 #3 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #4 = { 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 #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 = { nounwind }
attributes #8 = { nounwind willreturn memory(read) }
attributes #9 = { cold }
attributes #10 = { 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 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"int", !7, i64 0}
!11 = !{!7, !7, i64 0}
!12 = distinct !{!12, !13, !14, !15}
!13 = !{!"llvm.loop.mustprogress"}
!14 = !{!"llvm.loop.isvectorized", i32 1}
!15 = !{!"llvm.loop.unroll.runtime.disable"}
!16 = distinct !{!16, !17}
!17 = !{!"llvm.loop.unroll.disable"}
!18 = distinct !{!18, !13, !14}
!19 = distinct !{!19, !13, !14, !15}
!20 = distinct !{!20, !17}
!21 = distinct !{!21, !13, !14}
!22 = distinct !{!22, !13, !14, !15}
!23 = distinct !{!23, !17}
!24 = distinct !{!24, !13, !14}
!25 = distinct !{!25, !13}


; Effective O3 passes: DSEPass,EarlyCSEPass,GVNPass,GlobalDCEPass,GlobalOptPass,IPSCCPPass,IndVarSimplifyPass,InferFunctionAttrsPass,InstCombinePass,InstSimplifyPass,JumpThreadingPass,LCSSAPass,LICMPass,LoopLoadEliminationPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,LoopVectorizePass,LowerConstantIntrinsicsPass,PostOrderFunctionAttrsPass,SROAPass,SimplifyCFGPass,TailCallElimPass