; LLVM IR from golems/ach :: src (achpipe-bin)

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

@opt_chan_name = external dso_local global [66 x i8], align 16
@opt_remote_chan_name = external dso_local global [66 x i8], align 16
@opt_pub = external dso_local global i32, align 4
@opt_sub = external dso_local global i32, align 4
@opt_verbosity = external dso_local global i32, align 4
@opt_last = external dso_local global i32, align 4
@opt_sync = external dso_local global i32, align 4
@opt_freq = external dso_local global double, align 8
@.str.9 = external hidden unnamed_addr constant [4 x i8], align 1
@.str.10 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.20 = external hidden unnamed_addr constant [62 x i8], align 1
@.str.23 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.28 = external hidden unnamed_addr constant [15 x i8], align 1
@optarg = external global ptr, align 8
@.str.29 = external hidden unnamed_addr constant [30 x i8], align 1
@.str.30 = external hidden unnamed_addr constant [12 x i8], align 1
@.str.31 = external hidden unnamed_addr constant [464 x i8], align 1
@.str.32 = external hidden unnamed_addr constant [22 x i8], align 1
@.str.33 = external hidden unnamed_addr constant [40 x i8], align 1
@.str.34 = external hidden unnamed_addr constant [41 x i8], align 1
@.str.35 = external hidden unnamed_addr constant [46 x i8], align 1
@.str.36 = external hidden unnamed_addr constant [28 x i8], align 1
@.str.37 = external hidden unnamed_addr constant [13 x i8], align 1
@.str.38 = external hidden unnamed_addr constant [13 x i8], align 1
@.str.39 = external hidden unnamed_addr constant [15 x i8], align 1
@stdin = external global ptr, align 8
@stdout = external global ptr, align 8
@__PRETTY_FUNCTION__.main = external hidden unnamed_addr constant [23 x i8], align 1

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

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

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

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

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

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

; Function Attrs: noreturn nounwind
declare void @__assert_fail(ptr noundef, ptr noundef, i32 noundef, ptr noundef) #2

; Function Attrs: nounwind uwtable
declare dso_local void @sighandler_install() #0

; Function Attrs: nounwind uwtable
define dso_local i32 @main(i32 noundef %0, ptr noundef %1) #0 {
  %3 = alloca i32, align 4
  %4 = alloca i32, align 4
  %5 = alloca ptr, align 8
  %6 = alloca i32, align 4
  store i32 0, ptr %3, align 4
  store i32 %0, ptr %4, align 4, !tbaa !5
  store ptr %1, ptr %5, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %6) #7
  br label %7

7:                                                ; preds = %46, %2
  %8 = load i32, ptr %4, align 4, !tbaa !5
  %9 = load ptr, ptr %5, align 8, !tbaa !9
  %10 = call i32 @getopt(i32 noundef %8, ptr noundef %9, ptr noundef @.str.28) #7
  store i32 %10, ptr %6, align 4, !tbaa !5
  %11 = icmp ne i32 %10, -1
  br i1 %11, label %12, label %47

12:                                               ; preds = %7
  %13 = load i32, ptr %6, align 4, !tbaa !5
  switch i32 %13, label %44 [
    i32 112, label %14
    i32 115, label %21
    i32 122, label %28
    i32 118, label %35
    i32 108, label %38
    i32 99, label %39
    i32 102, label %40
    i32 86, label %43
  ]

14:                                               ; preds = %12
  store i32 1, ptr @opt_pub, align 4, !tbaa !5
  %15 = load ptr, ptr @optarg, align 8, !tbaa !9
  %16 = call i64 @strlen(ptr noundef %15) #8
  %17 = icmp ult i64 %16, 63
  %18 = zext i1 %17 to i32
  call void (i32, ptr, ...) @hard_assert(i32 noundef %18, ptr noundef @.str.29)
  %19 = load ptr, ptr @optarg, align 8, !tbaa !9
  %20 = call ptr @strncpy(ptr noundef @opt_chan_name, ptr noundef %19, i64 noundef 64) #7
  br label %46

21:                                               ; preds = %12
  store i32 1, ptr @opt_sub, align 4, !tbaa !5
  %22 = load ptr, ptr @optarg, align 8, !tbaa !9
  %23 = call i64 @strlen(ptr noundef %22) #8
  %24 = icmp ult i64 %23, 63
  %25 = zext i1 %24 to i32
  call void (i32, ptr, ...) @hard_assert(i32 noundef %25, ptr noundef @.str.29)
  %26 = load ptr, ptr @optarg, align 8, !tbaa !9
  %27 = call ptr @strncpy(ptr noundef @opt_chan_name, ptr noundef %26, i64 noundef 64) #7
  br label %46

28:                                               ; preds = %12
  %29 = load ptr, ptr @optarg, align 8, !tbaa !9
  %30 = call i64 @strlen(ptr noundef %29) #8
  %31 = icmp ult i64 %30, 63
  %32 = zext i1 %31 to i32
  call void (i32, ptr, ...) @hard_assert(i32 noundef %32, ptr noundef @.str.29)
  %33 = load ptr, ptr @optarg, align 8, !tbaa !9
  %34 = call ptr @strncpy(ptr noundef @opt_remote_chan_name, ptr noundef %33, i64 noundef 64) #7
  br label %35

35:                                               ; preds = %28, %12
  %36 = load i32, ptr @opt_verbosity, align 4, !tbaa !5
  %37 = add nsw i32 %36, 1
  store i32 %37, ptr @opt_verbosity, align 4, !tbaa !5
  br label %46

38:                                               ; preds = %12
  store i32 1, ptr @opt_last, align 4, !tbaa !5
  br label %46

39:                                               ; preds = %12
  store i32 1, ptr @opt_sync, align 4, !tbaa !5
  br label %46

40:                                               ; preds = %12
  %41 = load ptr, ptr @optarg, align 8, !tbaa !9
  %42 = call double @atof(ptr noundef %41) #8
  store double %42, ptr @opt_freq, align 8, !tbaa !11
  br label %46

43:                                               ; preds = %12
  call void @ach_print_version(ptr noundef @.str.30)
  call void @exit(i32 noundef 0) #9
  unreachable

44:                                               ; preds = %12
  %45 = call i32 @puts(ptr noundef @.str.31)
  call void @exit(i32 noundef 0) #9
  unreachable

46:                                               ; preds = %40, %39, %38, %35, %21, %14
  br label %7, !llvm.loop !13

47:                                               ; preds = %7
  %48 = call i64 @strlen(ptr noundef @opt_chan_name) #8
  %49 = icmp ult i64 0, %48
  %50 = zext i1 %49 to i32
  call void (i32, ptr, ...) @hard_assert(i32 noundef %50, ptr noundef @.str.32)
  %51 = load i32, ptr @opt_pub, align 4, !tbaa !5
  %52 = icmp ne i32 %51, 0
  br i1 %52, label %53, label %56

53:                                               ; preds = %47
  %54 = load i32, ptr @opt_sub, align 4, !tbaa !5
  %55 = icmp ne i32 %54, 0
  br label %56

56:                                               ; preds = %53, %47
  %57 = phi i1 [ false, %47 ], [ %55, %53 ]
  %58 = xor i1 %57, true
  %59 = zext i1 %58 to i32
  call void (i32, ptr, ...) @hard_assert(i32 noundef %59, ptr noundef @.str.33)
  %60 = load i32, ptr @opt_pub, align 4, !tbaa !5
  %61 = icmp ne i32 %60, 0
  br i1 %61, label %65, label %62

62:                                               ; preds = %56
  %63 = load i32, ptr @opt_sub, align 4, !tbaa !5
  %64 = icmp ne i32 %63, 0
  br label %65

65:                                               ; preds = %62, %56
  %66 = phi i1 [ true, %56 ], [ %64, %62 ]
  %67 = zext i1 %66 to i32
  call void (i32, ptr, ...) @hard_assert(i32 noundef %67, ptr noundef @.str.34)
  %68 = load double, ptr @opt_freq, align 8, !tbaa !11
  %69 = fcmp ogt double 0.000000e+00, %68
  br i1 %69, label %73, label %70

70:                                               ; preds = %65
  %71 = load double, ptr @opt_freq, align 8, !tbaa !11
  %72 = fcmp olt double 0.000000e+00, %71
  br i1 %72, label %73, label %81

73:                                               ; preds = %70, %65
  %74 = load i32, ptr @opt_sync, align 4, !tbaa !5
  %75 = icmp ne i32 %74, 0
  br i1 %75, label %79, label %76

76:                                               ; preds = %73
  %77 = load i32, ptr @opt_sub, align 4, !tbaa !5
  %78 = icmp ne i32 %77, 0
  br label %79

79:                                               ; preds = %76, %73
  %80 = phi i1 [ false, %73 ], [ %78, %76 ]
  br label %81

81:                                               ; preds = %79, %70
  %82 = phi i1 [ true, %70 ], [ %80, %79 ]
  %83 = zext i1 %82 to i32
  call void (i32, ptr, ...) @hard_assert(i32 noundef %83, ptr noundef @.str.35)
  %84 = load double, ptr @opt_freq, align 8, !tbaa !11
  %85 = fcmp oge double %84, 0.000000e+00
  %86 = zext i1 %85 to i32
  call void (i32, ptr, ...) @hard_assert(i32 noundef %86, ptr noundef @.str.36)
  call void (i32, ptr, ...) @verbprintf(i32 noundef 1, ptr noundef @.str.37, ptr noundef @opt_chan_name)
  %87 = load i32, ptr @opt_pub, align 4, !tbaa !5
  %88 = icmp ne i32 %87, 0
  %89 = zext i1 %88 to i64
  %90 = select i1 %88, ptr @.str.9, ptr @.str.10
  call void (i32, ptr, ...) @verbprintf(i32 noundef 1, ptr noundef @.str.38, ptr noundef %90)
  %91 = load i32, ptr @opt_sub, align 4, !tbaa !5
  %92 = icmp ne i32 %91, 0
  %93 = zext i1 %92 to i64
  %94 = select i1 %92, ptr @.str.9, ptr @.str.10
  call void (i32, ptr, ...) @verbprintf(i32 noundef 1, ptr noundef @.str.39, ptr noundef %94)
  call void @sighandler_install()
  %95 = load i32, ptr @opt_pub, align 4, !tbaa !5
  %96 = icmp ne i32 %95, 0
  br i1 %96, label %97, label %99

97:                                               ; preds = %81
  %98 = load ptr, ptr @stdin, align 8, !tbaa !9
  call void @publish(ptr noundef %98, ptr noundef @opt_chan_name)
  br label %107

99:                                               ; preds = %81
  %100 = load i32, ptr @opt_sub, align 4, !tbaa !5
  %101 = icmp ne i32 %100, 0
  br i1 %101, label %102, label %105

102:                                              ; preds = %99
  %103 = load ptr, ptr @stdin, align 8, !tbaa !9
  %104 = load ptr, ptr @stdout, align 8, !tbaa !9
  call void @subscribe(ptr noundef %103, ptr noundef %104, ptr noundef @opt_chan_name)
  br label %106

105:                                              ; preds = %99
  call void @__assert_fail(ptr noundef @.str.23, ptr noundef @.str.20, i32 noundef 608, ptr noundef @__PRETTY_FUNCTION__.main) #9
  unreachable

106:                                              ; preds = %102
  br label %107

107:                                              ; preds = %106, %97
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #7
  ret i32 0
}

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

; Function Attrs: nounwind willreturn memory(read)
declare i64 @strlen(ptr noundef) #4

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

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

declare void @ach_print_version(ptr noundef) #6

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

declare i32 @puts(ptr noundef) #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 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
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 = { nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { nounwind willreturn memory(read) "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 = { 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 #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 = { noreturn nounwind }

!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"any pointer", !7, i64 0}
!11 = !{!12, !12, i64 0}
!12 = !{!"double", !7, i64 0}
!13 = distinct !{!13, !14}
!14 = !{!"llvm.loop.mustprogress"}


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

@opt_chan_name = external dso_local global [66 x i8], align 16
@opt_remote_chan_name = external dso_local global [66 x i8], align 16
@opt_pub = external dso_local local_unnamed_addr global i32, align 4
@opt_sub = external dso_local local_unnamed_addr global i32, align 4
@opt_verbosity = external dso_local local_unnamed_addr global i32, align 4
@opt_last = external dso_local local_unnamed_addr global i32, align 4
@opt_sync = external dso_local local_unnamed_addr global i32, align 4
@opt_freq = external dso_local local_unnamed_addr global double, align 8
@.str.9 = external hidden unnamed_addr constant [4 x i8], align 1
@.str.10 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.20 = external hidden unnamed_addr constant [62 x i8], align 1
@.str.23 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.28 = external hidden unnamed_addr constant [15 x i8], align 1
@optarg = external local_unnamed_addr global ptr, align 8
@.str.29 = external hidden unnamed_addr constant [30 x i8], align 1
@.str.30 = external hidden unnamed_addr constant [12 x i8], align 1
@.str.31 = external hidden unnamed_addr constant [464 x i8], align 1
@.str.32 = external hidden unnamed_addr constant [22 x i8], align 1
@.str.33 = external hidden unnamed_addr constant [40 x i8], align 1
@.str.34 = external hidden unnamed_addr constant [41 x i8], align 1
@.str.35 = external hidden unnamed_addr constant [46 x i8], align 1
@.str.36 = external hidden unnamed_addr constant [28 x i8], align 1
@.str.37 = external hidden unnamed_addr constant [13 x i8], align 1
@.str.38 = external hidden unnamed_addr constant [13 x i8], align 1
@.str.39 = external hidden unnamed_addr constant [15 x i8], align 1
@stdin = external local_unnamed_addr global ptr, align 8
@stdout = external local_unnamed_addr global ptr, align 8
@__PRETTY_FUNCTION__.main = external hidden unnamed_addr constant [23 x i8], align 1

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

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

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

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

; Function Attrs: noreturn nounwind
declare void @__assert_fail(ptr noundef, ptr noundef, i32 noundef, ptr noundef) local_unnamed_addr #1

; Function Attrs: nounwind uwtable
declare dso_local void @sighandler_install() local_unnamed_addr #0

; Function Attrs: nounwind uwtable
define dso_local noundef i32 @main(i32 noundef %0, ptr noundef %1) local_unnamed_addr #0 {
  br label %3

3:                                                ; preds = %.backedge, %2
  %4 = tail call i32 @getopt(i32 noundef %0, ptr noundef %1, ptr noundef nonnull @.str.28) #8
  switch i32 %4, label %35 [
    i32 -1, label %37
    i32 112, label %5
    i32 115, label %12
    i32 122, label %19
    i32 118, label %26
    i32 108, label %29
    i32 99, label %30
    i32 102, label %31
    i32 86, label %34
  ]

5:                                                ; preds = %3
  store i32 1, ptr @opt_pub, align 4, !tbaa !5
  %6 = load ptr, ptr @optarg, align 8, !tbaa !9
  %7 = tail call i64 @strlen(ptr noundef nonnull dereferenceable(1) %6) #9
  %8 = icmp ult i64 %7, 63
  %9 = zext i1 %8 to i32
  tail call void (i32, ptr, ...) @hard_assert(i32 noundef %9, ptr noundef nonnull @.str.29)
  %10 = load ptr, ptr @optarg, align 8, !tbaa !9
  %11 = tail call ptr @strncpy(ptr noundef nonnull dereferenceable(1) @opt_chan_name, ptr noundef nonnull dereferenceable(1) %10, i64 noundef 64) #8
  br label %.backedge

12:                                               ; preds = %3
  store i32 1, ptr @opt_sub, align 4, !tbaa !5
  %13 = load ptr, ptr @optarg, align 8, !tbaa !9
  %14 = tail call i64 @strlen(ptr noundef nonnull dereferenceable(1) %13) #9
  %15 = icmp ult i64 %14, 63
  %16 = zext i1 %15 to i32
  tail call void (i32, ptr, ...) @hard_assert(i32 noundef %16, ptr noundef nonnull @.str.29)
  %17 = load ptr, ptr @optarg, align 8, !tbaa !9
  %18 = tail call ptr @strncpy(ptr noundef nonnull dereferenceable(1) @opt_chan_name, ptr noundef nonnull dereferenceable(1) %17, i64 noundef 64) #8
  br label %.backedge

19:                                               ; preds = %3
  %20 = load ptr, ptr @optarg, align 8, !tbaa !9
  %21 = tail call i64 @strlen(ptr noundef nonnull dereferenceable(1) %20) #9
  %22 = icmp ult i64 %21, 63
  %23 = zext i1 %22 to i32
  tail call void (i32, ptr, ...) @hard_assert(i32 noundef %23, ptr noundef nonnull @.str.29)
  %24 = load ptr, ptr @optarg, align 8, !tbaa !9
  %25 = tail call ptr @strncpy(ptr noundef nonnull dereferenceable(1) @opt_remote_chan_name, ptr noundef nonnull dereferenceable(1) %24, i64 noundef 64) #8
  br label %26

26:                                               ; preds = %3, %19
  %27 = load i32, ptr @opt_verbosity, align 4, !tbaa !5
  %28 = add nsw i32 %27, 1
  store i32 %28, ptr @opt_verbosity, align 4, !tbaa !5
  br label %.backedge

29:                                               ; preds = %3
  store i32 1, ptr @opt_last, align 4, !tbaa !5
  br label %.backedge

30:                                               ; preds = %3
  store i32 1, ptr @opt_sync, align 4, !tbaa !5
  br label %.backedge

31:                                               ; preds = %3
  %32 = load ptr, ptr @optarg, align 8, !tbaa !9
  %33 = tail call double @atof(ptr noundef %32) #9
  store double %33, ptr @opt_freq, align 8, !tbaa !11
  br label %.backedge

.backedge:                                        ; preds = %31, %30, %29, %26, %12, %5
  br label %3, !llvm.loop !13

34:                                               ; preds = %3
  tail call void @ach_print_version(ptr noundef nonnull @.str.30) #8
  tail call void @exit(i32 noundef 0) #10
  unreachable

35:                                               ; preds = %3
  %36 = tail call i32 @puts(ptr noundef nonnull dereferenceable(1) @.str.31)
  tail call void @exit(i32 noundef 0) #10
  unreachable

37:                                               ; preds = %3
  %char0 = load i8, ptr @opt_chan_name, align 16
  %38 = icmp ne i8 %char0, 0
  %39 = zext i1 %38 to i32
  tail call void (i32, ptr, ...) @hard_assert(i32 noundef %39, ptr noundef nonnull @.str.32)
  %40 = load i32, ptr @opt_pub, align 4, !tbaa !5
  %41 = icmp eq i32 %40, 0
  %42 = load i32, ptr @opt_sub, align 4
  %43 = icmp eq i32 %42, 0
  %.not5 = select i1 %41, i1 true, i1 %43
  %44 = zext i1 %.not5 to i32
  tail call void (i32, ptr, ...) @hard_assert(i32 noundef %44, ptr noundef nonnull @.str.33)
  %45 = load i32, ptr @opt_pub, align 4, !tbaa !5
  %46 = icmp ne i32 %45, 0
  %47 = load i32, ptr @opt_sub, align 4
  %48 = icmp ne i32 %47, 0
  %49 = select i1 %46, i1 true, i1 %48
  %50 = zext i1 %49 to i32
  tail call void (i32, ptr, ...) @hard_assert(i32 noundef %50, ptr noundef nonnull @.str.34)
  %51 = load double, ptr @opt_freq, align 8
  %or.cond = fcmp ueq double %51, 0.000000e+00
  br i1 %or.cond, label %58, label %52

52:                                               ; preds = %37
  %53 = load i32, ptr @opt_sync, align 4, !tbaa !5
  %.not6 = icmp eq i32 %53, 0
  %54 = load i32, ptr @opt_sub, align 4
  %55 = icmp ne i32 %54, 0
  %56 = select i1 %.not6, i1 %55, i1 false
  %57 = zext i1 %56 to i32
  br label %58

58:                                               ; preds = %37, %52
  %59 = phi i32 [ %57, %52 ], [ 1, %37 ]
  tail call void (i32, ptr, ...) @hard_assert(i32 noundef %59, ptr noundef nonnull @.str.35)
  %60 = load double, ptr @opt_freq, align 8, !tbaa !11
  %61 = fcmp oge double %60, 0.000000e+00
  %62 = zext i1 %61 to i32
  tail call void (i32, ptr, ...) @hard_assert(i32 noundef %62, ptr noundef nonnull @.str.36)
  tail call void (i32, ptr, ...) @verbprintf(i32 noundef 1, ptr noundef nonnull @.str.37, ptr noundef nonnull @opt_chan_name)
  %63 = load i32, ptr @opt_pub, align 4, !tbaa !5
  %.not7 = icmp eq i32 %63, 0
  %64 = select i1 %.not7, ptr @.str.10, ptr @.str.9
  tail call void (i32, ptr, ...) @verbprintf(i32 noundef 1, ptr noundef nonnull @.str.38, ptr noundef nonnull %64)
  %65 = load i32, ptr @opt_sub, align 4, !tbaa !5
  %.not8 = icmp eq i32 %65, 0
  %66 = select i1 %.not8, ptr @.str.10, ptr @.str.9
  tail call void (i32, ptr, ...) @verbprintf(i32 noundef 1, ptr noundef nonnull @.str.39, ptr noundef nonnull %66)
  tail call void @sighandler_install()
  %67 = load i32, ptr @opt_pub, align 4, !tbaa !5
  %.not9 = icmp eq i32 %67, 0
  br i1 %.not9, label %70, label %68

68:                                               ; preds = %58
  %69 = load ptr, ptr @stdin, align 8, !tbaa !9
  tail call void @publish(ptr noundef %69, ptr noundef nonnull @opt_chan_name)
  br label %76

70:                                               ; preds = %58
  %71 = load i32, ptr @opt_sub, align 4, !tbaa !5
  %.not10 = icmp eq i32 %71, 0
  br i1 %.not10, label %75, label %72

72:                                               ; preds = %70
  %73 = load ptr, ptr @stdin, align 8, !tbaa !9
  %74 = load ptr, ptr @stdout, align 8, !tbaa !9
  tail call void @subscribe(ptr noundef %73, ptr noundef %74, ptr noundef nonnull @opt_chan_name)
  br label %76

75:                                               ; preds = %70
  tail call void @__assert_fail(ptr noundef nonnull @.str.23, ptr noundef nonnull @.str.20, i32 noundef 608, ptr noundef nonnull @__PRETTY_FUNCTION__.main) #10
  unreachable

76:                                               ; preds = %72, %68
  ret i32 0
}

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

; Function Attrs: mustprogress nofree nounwind willreturn memory(argmem: read)
declare i64 @strlen(ptr nocapture noundef) local_unnamed_addr #3

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

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

declare void @ach_print_version(ptr noundef) local_unnamed_addr #6

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

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

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 = { 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 #2 = { nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { mustprogress nofree nounwind willreturn memory(argmem: read) "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 = { 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 #5 = { 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 #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 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #8 = { nounwind }
attributes #9 = { nounwind willreturn memory(read) }
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 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"any pointer", !7, i64 0}
!11 = !{!12, !12, i64 0}
!12 = !{!"double", !7, i64 0}
!13 = distinct !{!13, !14}
!14 = !{!"llvm.loop.mustprogress"}


; Effective O3 passes: EarlyCSEPass,GlobalOptPass,InferAlignmentPass,InferFunctionAttrsPass,InstCombinePass,LoopUnrollPass,PostOrderFunctionAttrsPass,SROAPass,SimplifyCFGPass,TailCallElimPass