; LLVM IR from beagleboard/librobotcontrol :: library/src (start_stop)

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

@stderr = external global ptr, align 8
@.str.5 = external hidden unnamed_addr constant [26 x i8], align 1
@.str.13 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.14 = external hidden unnamed_addr constant [62 x i8], align 1
@.str.15 = external hidden unnamed_addr constant [62 x i8], align 1
@.str.16 = external hidden unnamed_addr constant [60 x i8], align 1
@.str.17 = external hidden unnamed_addr constant [28 x i8], align 1
@.str.18 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.19 = external hidden unnamed_addr constant [66 x i8], align 1
@.str.20 = external hidden unnamed_addr constant [36 x i8], align 1
@.str.21 = external hidden unnamed_addr constant [68 x i8], align 1
@.str.22 = external hidden unnamed_addr constant [44 x i8], align 1
@.str.23 = external hidden unnamed_addr constant [69 x i8], align 1
@.str.24 = external hidden unnamed_addr constant [56 x i8], align 1
@.str.25 = external hidden unnamed_addr constant [41 x i8], align 1
@.str.26 = external hidden unnamed_addr constant [56 x i8], align 1
@.str.27 = external hidden unnamed_addr constant [37 x i8], align 1

; Function Attrs: nounwind
declare i32 @fprintf(ptr 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: nounwind
declare i32 @access(ptr noundef, i32 noundef) #0

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

declare noalias ptr @fopen(ptr noundef, ptr noundef) #3

; Function Attrs: nounwind
declare i32 @getpid() #0

declare i32 @fclose(ptr noundef) #3

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

; Function Attrs: nounwind uwtable
define dso_local i32 @rc_kill_existing_process(float noundef %0) #4 {
  %2 = alloca i32, align 4
  %3 = alloca float, 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
  store float %0, ptr %3, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %4) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr %5) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr %6) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #5
  %10 = load float, ptr %3, align 4, !tbaa !5
  %11 = fcmp olt float %10, 0x3FB99999A0000000
  br i1 %11, label %12, label %15

12:                                               ; preds = %1
  %13 = load ptr, ptr @stderr, align 8, !tbaa !9
  %14 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %13, ptr noundef @.str.14) #5
  store i32 -4, ptr %2, align 4
  store i32 1, ptr %9, align 4
  br label %132

15:                                               ; preds = %1
  %16 = call i32 @access(ptr noundef @.str.5, i32 noundef 0) #5
  %17 = icmp ne i32 %16, 0
  br i1 %17, label %18, label %19

18:                                               ; preds = %15
  store i32 0, ptr %2, align 4
  store i32 1, ptr %9, align 4
  br label %132

19:                                               ; preds = %15
  %20 = call i32 @access(ptr noundef @.str.5, i32 noundef 2) #5
  %21 = icmp ne i32 %20, 0
  br i1 %21, label %22, label %29

22:                                               ; preds = %19
  %23 = load ptr, ptr @stderr, align 8, !tbaa !9
  %24 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %23, ptr noundef @.str.15) #5
  %25 = load ptr, ptr @stderr, align 8, !tbaa !9
  %26 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %25, ptr noundef @.str.16) #5
  %27 = load ptr, ptr @stderr, align 8, !tbaa !9
  %28 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %27, ptr noundef @.str.17) #5
  store i32 -3, ptr %2, align 4
  store i32 1, ptr %9, align 4
  br label %132

29:                                               ; preds = %19
  %30 = call noalias ptr @fopen(ptr noundef @.str.5, ptr noundef @.str.18)
  store ptr %30, ptr %4, align 8, !tbaa !9
  %31 = load ptr, ptr %4, align 8, !tbaa !9
  %32 = icmp eq ptr %31, null
  br i1 %32, label %33, label %39

33:                                               ; preds = %29
  %34 = load ptr, ptr @stderr, align 8, !tbaa !9
  %35 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %34, ptr noundef @.str.19) #5
  %36 = load ptr, ptr @stderr, align 8, !tbaa !9
  %37 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %36, ptr noundef @.str.20) #5
  %38 = call i32 @remove(ptr noundef @.str.5) #5
  store i32 -2, ptr %2, align 4
  store i32 1, ptr %9, align 4
  br label %132

39:                                               ; preds = %29
  %40 = load ptr, ptr %4, align 8, !tbaa !9
  %41 = call i32 (ptr, ptr, ...) @__isoc99_fscanf(ptr noundef %40, ptr noundef @.str.13, ptr noundef %5)
  store i32 %41, ptr %7, align 4, !tbaa !11
  %42 = load ptr, ptr %4, align 8, !tbaa !9
  %43 = call i32 @fclose(ptr noundef %42)
  %44 = load i32, ptr %7, align 4, !tbaa !11
  %45 = icmp ne i32 %44, 1
  br i1 %45, label %46, label %52

46:                                               ; preds = %39
  %47 = load ptr, ptr @stderr, align 8, !tbaa !9
  %48 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %47, ptr noundef @.str.21) #5
  %49 = load ptr, ptr @stderr, align 8, !tbaa !9
  %50 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %49, ptr noundef @.str.22) #5
  %51 = call i32 @remove(ptr noundef @.str.5) #5
  store i32 -2, ptr %2, align 4
  store i32 1, ptr %9, align 4
  br label %132

52:                                               ; preds = %39
  %53 = load i32, ptr %5, align 4, !tbaa !11
  %54 = icmp eq i32 %53, 0
  br i1 %54, label %55, label %61

55:                                               ; preds = %52
  %56 = load ptr, ptr @stderr, align 8, !tbaa !9
  %57 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %56, ptr noundef @.str.21) #5
  %58 = load ptr, ptr @stderr, align 8, !tbaa !9
  %59 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %58, ptr noundef @.str.22) #5
  %60 = call i32 @remove(ptr noundef @.str.5) #5
  store i32 -2, ptr %2, align 4
  store i32 1, ptr %9, align 4
  br label %132

61:                                               ; preds = %52
  %62 = load i32, ptr %5, align 4, !tbaa !11
  %63 = call i32 @getpid() #5
  %64 = icmp eq i32 %62, %63
  br i1 %64, label %65, label %66

65:                                               ; preds = %61
  store i32 0, ptr %2, align 4
  store i32 1, ptr %9, align 4
  br label %132

66:                                               ; preds = %61
  %67 = load i32, ptr %5, align 4, !tbaa !11
  %68 = call i32 @getpgid(i32 noundef %67) #5
  %69 = icmp slt i32 %68, 0
  br i1 %69, label %70, label %72

70:                                               ; preds = %66
  %71 = call i32 @remove(ptr noundef @.str.5) #5
  store i32 0, ptr %2, align 4
  store i32 1, ptr %9, align 4
  br label %132

72:                                               ; preds = %66
  %73 = load i32, ptr %5, align 4, !tbaa !11
  %74 = call i32 @kill(i32 noundef %73, i32 noundef 2) #5
  %75 = icmp eq i32 %74, -1
  br i1 %75, label %76, label %89

76:                                               ; preds = %72
  %77 = call ptr @__errno_location() #6
  %78 = load i32, ptr %77, align 4, !tbaa !11
  %79 = icmp eq i32 %78, 1
  br i1 %79, label %80, label %87

80:                                               ; preds = %76
  %81 = load ptr, ptr @stderr, align 8, !tbaa !9
  %82 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %81, ptr noundef @.str.23) #5
  %83 = load ptr, ptr @stderr, align 8, !tbaa !9
  %84 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %83, ptr noundef @.str.24) #5
  %85 = load ptr, ptr @stderr, align 8, !tbaa !9
  %86 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %85, ptr noundef @.str.25) #5
  store i32 -3, ptr %2, align 4
  store i32 1, ptr %9, align 4
  br label %132

87:                                               ; preds = %76
  %88 = call i32 @remove(ptr noundef @.str.5) #5
  store i32 -2, ptr %2, align 4
  store i32 1, ptr %9, align 4
  br label %132

89:                                               ; preds = %72
  %90 = load float, ptr %3, align 4, !tbaa !5
  %91 = fdiv float %90, 0x3FB99999A0000000
  %92 = fptosi float %91 to i32
  store i32 %92, ptr %8, align 4, !tbaa !11
  store i32 0, ptr %6, align 4, !tbaa !11
  br label %93

93:                                               ; preds = %105, %89
  %94 = load i32, ptr %6, align 4, !tbaa !11
  %95 = load i32, ptr %8, align 4, !tbaa !11
  %96 = icmp sle i32 %94, %95
  br i1 %96, label %97, label %108

97:                                               ; preds = %93
  %98 = load i32, ptr %5, align 4, !tbaa !11
  %99 = call i32 @getpgid(i32 noundef %98) #5
  %100 = icmp eq i32 %99, -1
  br i1 %100, label %101, label %103

101:                                              ; preds = %97
  %102 = call i32 @remove(ptr noundef @.str.5) #5
  store i32 1, ptr %2, align 4
  store i32 1, ptr %9, align 4
  br label %132

103:                                              ; preds = %97
  call void @rc_usleep(i32 noundef 100000)
  br label %104

104:                                              ; preds = %103
  br label %105

105:                                              ; preds = %104
  %106 = load i32, ptr %6, align 4, !tbaa !11
  %107 = add nsw i32 %106, 1
  store i32 %107, ptr %6, align 4, !tbaa !11
  br label %93, !llvm.loop !13

108:                                              ; preds = %93
  %109 = load i32, ptr %5, align 4, !tbaa !11
  %110 = call i32 @kill(i32 noundef %109, i32 noundef 9) #5
  store i32 0, ptr %6, align 4, !tbaa !11
  br label %111

111:                                              ; preds = %123, %108
  %112 = load i32, ptr %6, align 4, !tbaa !11
  %113 = load i32, ptr %8, align 4, !tbaa !11
  %114 = icmp sle i32 %112, %113
  br i1 %114, label %115, label %126

115:                                              ; preds = %111
  %116 = load i32, ptr %5, align 4, !tbaa !11
  %117 = call i32 @getpgid(i32 noundef %116) #5
  %118 = icmp eq i32 %117, -1
  br i1 %118, label %119, label %121

119:                                              ; preds = %115
  %120 = call i32 @remove(ptr noundef @.str.5) #5
  store i32 1, ptr %2, align 4
  store i32 1, ptr %9, align 4
  br label %132

121:                                              ; preds = %115
  call void @rc_usleep(i32 noundef 100000)
  br label %122

122:                                              ; preds = %121
  br label %123

123:                                              ; preds = %122
  %124 = load i32, ptr %6, align 4, !tbaa !11
  %125 = add nsw i32 %124, 1
  store i32 %125, ptr %6, align 4, !tbaa !11
  br label %111, !llvm.loop !15

126:                                              ; preds = %111
  %127 = call i32 @remove(ptr noundef @.str.5) #5
  %128 = load ptr, ptr @stderr, align 8, !tbaa !9
  %129 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %128, ptr noundef @.str.26) #5
  %130 = load ptr, ptr @stderr, align 8, !tbaa !9
  %131 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %130, ptr noundef @.str.27) #5
  store i32 -1, ptr %2, align 4
  store i32 1, ptr %9, align 4
  br label %132

132:                                              ; preds = %126, %119, %101, %87, %80, %70, %65, %55, %46, %33, %22, %18, %12
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %4) #5
  %133 = load i32, ptr %2, align 4
  ret i32 %133
}

; Function Attrs: nounwind
declare i32 @remove(ptr noundef) #0

declare i32 @__isoc99_fscanf(ptr noundef, ptr noundef, ...) #3

; Function Attrs: nounwind
declare i32 @getpgid(i32 noundef) #0

; Function Attrs: nounwind
declare i32 @kill(i32 noundef, i32 noundef) #0

declare void @rc_usleep(i32 noundef) #3

attributes #0 = { 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 #1 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { 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 #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 = { nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #5 = { nounwind }
attributes #6 = { nounwind willreturn memory(none) }

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"float", !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 = !{!"int", !7, i64 0}
!13 = distinct !{!13, !14}
!14 = !{!"llvm.loop.mustprogress"}
!15 = distinct !{!15, !14}


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

@stderr = external local_unnamed_addr global ptr, align 8
@.str.5 = external hidden unnamed_addr constant [26 x i8], align 1
@.str.13 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.14 = external hidden unnamed_addr constant [62 x i8], align 1
@.str.15 = external hidden unnamed_addr constant [62 x i8], align 1
@.str.16 = external hidden unnamed_addr constant [60 x i8], align 1
@.str.17 = external hidden unnamed_addr constant [28 x i8], align 1
@.str.18 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.19 = external hidden unnamed_addr constant [66 x i8], align 1
@.str.20 = external hidden unnamed_addr constant [36 x i8], align 1
@.str.21 = external hidden unnamed_addr constant [68 x i8], align 1
@.str.22 = external hidden unnamed_addr constant [44 x i8], align 1
@.str.23 = external hidden unnamed_addr constant [69 x i8], align 1
@.str.24 = external hidden unnamed_addr constant [56 x i8], align 1
@.str.25 = external hidden unnamed_addr constant [41 x i8], align 1
@.str.26 = external hidden unnamed_addr constant [56 x i8], align 1
@.str.27 = external hidden unnamed_addr constant [37 x i8], align 1

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

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

; Function Attrs: nofree nounwind
declare noundef i32 @access(ptr nocapture noundef readonly, i32 noundef) local_unnamed_addr #0

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

; Function Attrs: nofree nounwind
declare noalias noundef ptr @fopen(ptr nocapture noundef readonly, ptr nocapture noundef readonly) local_unnamed_addr #0

; Function Attrs: nounwind
declare i32 @getpid() local_unnamed_addr #3

; Function Attrs: nofree nounwind
declare noundef i32 @fclose(ptr nocapture noundef) local_unnamed_addr #0

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

; Function Attrs: nounwind uwtable
define dso_local range(i32 -4, 2) i32 @rc_kill_existing_process(float noundef %0) local_unnamed_addr #4 {
  %2 = alloca i32, align 4
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %2) #6
  %3 = fcmp olt float %0, 0x3FB99999A0000000
  br i1 %3, label %4, label %7

4:                                                ; preds = %1
  %5 = load ptr, ptr @stderr, align 8, !tbaa !5
  %6 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %5, ptr noundef nonnull @.str.14) #7
  br label %97

7:                                                ; preds = %1
  %8 = tail call i32 @access(ptr noundef nonnull @.str.5, i32 noundef 0) #6
  %.not = icmp eq i32 %8, 0
  br i1 %.not, label %9, label %97

9:                                                ; preds = %7
  %10 = tail call i32 @access(ptr noundef nonnull @.str.5, i32 noundef 2) #6
  %.not17 = icmp eq i32 %10, 0
  br i1 %.not17, label %18, label %11

11:                                               ; preds = %9
  %12 = load ptr, ptr @stderr, align 8, !tbaa !5
  %13 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %12, ptr noundef nonnull @.str.15) #7
  %14 = load ptr, ptr @stderr, align 8, !tbaa !5
  %15 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %14, ptr noundef nonnull @.str.16) #7
  %16 = load ptr, ptr @stderr, align 8, !tbaa !5
  %17 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %16, ptr noundef nonnull @.str.17) #7
  br label %97

18:                                               ; preds = %9
  %19 = tail call noalias ptr @fopen(ptr noundef nonnull @.str.5, ptr noundef nonnull @.str.18)
  %20 = icmp eq ptr %19, null
  br i1 %20, label %21, label %27

21:                                               ; preds = %18
  %22 = load ptr, ptr @stderr, align 8, !tbaa !5
  %23 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %22, ptr noundef nonnull @.str.19) #7
  %24 = load ptr, ptr @stderr, align 8, !tbaa !5
  %25 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %24, ptr noundef nonnull @.str.20) #7
  %26 = tail call i32 @remove(ptr noundef nonnull @.str.5) #6
  br label %97

27:                                               ; preds = %18
  %28 = call i32 (ptr, ptr, ...) @__isoc99_fscanf(ptr noundef nonnull %19, ptr noundef nonnull @.str.13, ptr noundef nonnull %2) #6
  %29 = call i32 @fclose(ptr noundef nonnull %19)
  %.not18 = icmp eq i32 %28, 1
  br i1 %.not18, label %36, label %30

30:                                               ; preds = %27
  %31 = load ptr, ptr @stderr, align 8, !tbaa !5
  %32 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %31, ptr noundef nonnull @.str.21) #7
  %33 = load ptr, ptr @stderr, align 8, !tbaa !5
  %34 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %33, ptr noundef nonnull @.str.22) #7
  %35 = call i32 @remove(ptr noundef nonnull @.str.5) #6
  br label %97

36:                                               ; preds = %27
  %37 = load i32, ptr %2, align 4, !tbaa !9
  %38 = icmp eq i32 %37, 0
  br i1 %38, label %39, label %45

39:                                               ; preds = %36
  %40 = load ptr, ptr @stderr, align 8, !tbaa !5
  %41 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %40, ptr noundef nonnull @.str.21) #7
  %42 = load ptr, ptr @stderr, align 8, !tbaa !5
  %43 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %42, ptr noundef nonnull @.str.22) #7
  %44 = call i32 @remove(ptr noundef nonnull @.str.5) #6
  br label %97

45:                                               ; preds = %36
  %46 = call i32 @getpid() #6
  %47 = icmp eq i32 %37, %46
  br i1 %47, label %97, label %48

48:                                               ; preds = %45
  %49 = load i32, ptr %2, align 4, !tbaa !9
  %50 = call i32 @getpgid(i32 noundef %49) #6
  %51 = icmp slt i32 %50, 0
  br i1 %51, label %52, label %54

52:                                               ; preds = %48
  %53 = call i32 @remove(ptr noundef nonnull @.str.5) #6
  br label %97

54:                                               ; preds = %48
  %55 = load i32, ptr %2, align 4, !tbaa !9
  %56 = call i32 @kill(i32 noundef %55, i32 noundef 2) #6
  %57 = icmp eq i32 %56, -1
  br i1 %57, label %58, label %71

58:                                               ; preds = %54
  %59 = tail call ptr @__errno_location() #8
  %60 = load i32, ptr %59, align 4, !tbaa !9
  %61 = icmp eq i32 %60, 1
  br i1 %61, label %62, label %69

62:                                               ; preds = %58
  %63 = load ptr, ptr @stderr, align 8, !tbaa !5
  %64 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %63, ptr noundef nonnull @.str.23) #7
  %65 = load ptr, ptr @stderr, align 8, !tbaa !5
  %66 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %65, ptr noundef nonnull @.str.24) #7
  %67 = load ptr, ptr @stderr, align 8, !tbaa !5
  %68 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %67, ptr noundef nonnull @.str.25) #7
  br label %97

69:                                               ; preds = %58
  %70 = call i32 @remove(ptr noundef nonnull @.str.5) #6
  br label %97

71:                                               ; preds = %54
  %72 = fdiv float %0, 0x3FB99999A0000000
  %73 = fptosi float %72 to i32
  %.not1921 = icmp slt i32 %73, 0
  br i1 %.not1921, label %._crit_edge.thread, label %.lr.ph

._crit_edge.thread:                               ; preds = %71
  %74 = load i32, ptr %2, align 4, !tbaa !9
  %75 = call i32 @kill(i32 noundef %74, i32 noundef 9) #6
  br label %._crit_edge27

.lr.ph:                                           ; preds = %71, %81
  %.01222 = phi i32 [ %82, %81 ], [ 0, %71 ]
  %76 = load i32, ptr %2, align 4, !tbaa !9
  %77 = call i32 @getpgid(i32 noundef %76) #6
  %78 = icmp eq i32 %77, -1
  br i1 %78, label %79, label %81

79:                                               ; preds = %.lr.ph
  %80 = call i32 @remove(ptr noundef nonnull @.str.5) #6
  br label %97

81:                                               ; preds = %.lr.ph
  call void @rc_usleep(i32 noundef 100000) #6
  %82 = add nuw i32 %.01222, 1
  %exitcond.not = icmp eq i32 %.01222, %73
  br i1 %exitcond.not, label %._crit_edge, label %.lr.ph, !llvm.loop !11

._crit_edge:                                      ; preds = %81
  %83 = load i32, ptr %2, align 4, !tbaa !9
  %84 = call i32 @kill(i32 noundef %83, i32 noundef 9) #6
  br i1 %.not1921, label %._crit_edge27, label %.lr.ph26

.lr.ph26:                                         ; preds = %._crit_edge, %90
  %.124 = phi i32 [ %91, %90 ], [ 0, %._crit_edge ]
  %85 = load i32, ptr %2, align 4, !tbaa !9
  %86 = call i32 @getpgid(i32 noundef %85) #6
  %87 = icmp eq i32 %86, -1
  br i1 %87, label %88, label %90

88:                                               ; preds = %.lr.ph26
  %89 = call i32 @remove(ptr noundef nonnull @.str.5) #6
  br label %97

90:                                               ; preds = %.lr.ph26
  call void @rc_usleep(i32 noundef 100000) #6
  %91 = add nuw i32 %.124, 1
  %exitcond28.not = icmp eq i32 %.124, %73
  br i1 %exitcond28.not, label %._crit_edge27, label %.lr.ph26, !llvm.loop !13

._crit_edge27:                                    ; preds = %90, %._crit_edge.thread, %._crit_edge
  %92 = call i32 @remove(ptr noundef nonnull @.str.5) #6
  %93 = load ptr, ptr @stderr, align 8, !tbaa !5
  %94 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %93, ptr noundef nonnull @.str.26) #7
  %95 = load ptr, ptr @stderr, align 8, !tbaa !5
  %96 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %95, ptr noundef nonnull @.str.27) #7
  br label %97

97:                                               ; preds = %45, %7, %._crit_edge27, %88, %79, %69, %62, %52, %39, %30, %21, %11, %4
  %.0 = phi i32 [ -4, %4 ], [ -3, %11 ], [ -2, %21 ], [ -2, %30 ], [ -2, %39 ], [ 0, %52 ], [ -3, %62 ], [ -2, %69 ], [ 1, %79 ], [ 1, %88 ], [ -1, %._crit_edge27 ], [ 0, %7 ], [ 0, %45 ]
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %2) #6
  ret i32 %.0
}

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

declare i32 @__isoc99_fscanf(ptr noundef, ptr noundef, ...) local_unnamed_addr #5

; Function Attrs: nounwind
declare i32 @getpgid(i32 noundef) local_unnamed_addr #3

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

declare void @rc_usleep(i32 noundef) local_unnamed_addr #5

attributes #0 = { 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 #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { mustprogress nofree nosync nounwind willreturn memory(none) "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #5 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #6 = { nounwind }
attributes #7 = { cold nounwind }
attributes #8 = { nounwind willreturn memory(none) }

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

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


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