; LLVM IR from golems/ach :: src/test (clocktest)

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

%struct.ach_channel = type { %union.anon }
%union.anon = type { [16 x i64] }
%struct.ach_create_attr = type { %union.anon.1 }
%union.anon.1 = type { [16 x i64] }

@stderr = external global ptr, align 8
@.str = external hidden unnamed_addr constant [83 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [17 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [65 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [79 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [15 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [9 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [15 x i8], align 1
@.str.7 = external hidden unnamed_addr constant [75 x i8], align 1
@.str.8 = external hidden unnamed_addr constant [13 x i8], align 1
@.str.9 = external hidden unnamed_addr constant [9 x i8], align 1
@.str.10 = external hidden unnamed_addr constant [80 x i8], align 1
@.str.11 = external hidden unnamed_addr constant [16 x i8], align 1
@.str.12 = external hidden unnamed_addr constant [54 x i8], align 1
@.str.13 = external hidden unnamed_addr constant [12 x i8], align 1
@.str.14 = external hidden unnamed_addr constant [58 x i8], align 1
@.str.15 = external hidden unnamed_addr constant [12 x i8], align 1
@.str.16 = external hidden unnamed_addr constant [62 x i8], align 1
@.str.17 = external hidden unnamed_addr constant [13 x i8], align 1

; Function Attrs: nounwind uwtable
define dso_local i32 @test_clock(i32 noundef %0, i32 noundef %1) #0 {
  %3 = alloca i32, align 4
  %4 = alloca i32, align 4
  %5 = alloca %struct.ach_channel, align 8
  %6 = alloca %struct.ach_create_attr, align 8
  %7 = alloca i32, align 4
  %8 = alloca i32, align 4
  %9 = alloca i32, align 4
  %10 = alloca i32, align 4
  %11 = alloca i32, align 4
  %12 = alloca i32, align 4
  %13 = alloca i32, align 4
  %14 = alloca i32, align 4
  store i32 %0, ptr %3, align 4, !tbaa !5
  store i32 %1, ptr %4, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 128, ptr %5) #6
  call void @llvm.lifetime.start.p0(i64 128, ptr %6) #6
  call void @ach_create_attr_init(ptr noundef %6)
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #6
  %15 = load i32, ptr %3, align 4, !tbaa !5
  %16 = call i32 @ach_create_attr_set_clock(ptr noundef %6, i32 noundef %15)
  store i32 %16, ptr %7, align 4, !tbaa !5
  %17 = load i32, ptr %7, align 4, !tbaa !5
  %18 = icmp ne i32 0, %17
  br i1 %18, label %19, label %24

19:                                               ; preds = %2
  %20 = load ptr, ptr @stderr, align 8, !tbaa !9
  %21 = load i32, ptr %7, align 4, !tbaa !5
  %22 = call ptr @ach_result_to_string(i32 noundef %21)
  %23 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %20, ptr noundef @.str, ptr noundef @.str.1, ptr noundef %22, ptr noundef @.str.2, i32 noundef 71) #6
  call void @exit(i32 noundef 1) #7
  unreachable

24:                                               ; preds = %2
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #6
  %25 = load i32, ptr %4, align 4, !tbaa !5
  %26 = call i32 @ach_create_attr_set_map(ptr noundef %6, i32 noundef %25)
  store i32 %26, ptr %8, align 4, !tbaa !5
  %27 = load i32, ptr %8, align 4, !tbaa !5
  %28 = icmp ne i32 0, %27
  br i1 %28, label %29, label %34

29:                                               ; preds = %24
  %30 = load ptr, ptr @stderr, align 8, !tbaa !9
  %31 = load i32, ptr %8, align 4, !tbaa !5
  %32 = call ptr @ach_result_to_string(i32 noundef %31)
  %33 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %30, ptr noundef @.str.3, ptr noundef @.str.4, ptr noundef %32, ptr noundef @.str.2, i32 noundef 72) #6
  call void @exit(i32 noundef 1) #7
  unreachable

34:                                               ; preds = %24
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #6
  %35 = call i32 @ach_unlink(ptr noundef @.str.5)
  store i32 %35, ptr %9, align 4, !tbaa !5
  %36 = load i32, ptr %9, align 4, !tbaa !5
  %37 = call i32 @ach_status_match(i32 noundef %36, i32 noundef 513)
  %38 = icmp ne i32 %37, 0
  br i1 %38, label %41, label %39

39:                                               ; preds = %34
  %40 = load i32, ptr %9, align 4, !tbaa !5
  call void @fail_ach(ptr noundef @.str.6, i32 noundef %40)
  br label %41

41:                                               ; preds = %39, %34
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #6
  %42 = call i32 @ach_create(ptr noundef @.str.5, i64 noundef 0, i64 noundef 0, ptr noundef %6)
  store i32 %42, ptr %10, align 4, !tbaa !5
  %43 = load i32, ptr %10, align 4, !tbaa !5
  %44 = icmp ne i32 0, %43
  br i1 %44, label %45, label %50

45:                                               ; preds = %41
  %46 = load ptr, ptr @stderr, align 8, !tbaa !9
  %47 = load i32, ptr %10, align 4, !tbaa !5
  %48 = call ptr @ach_result_to_string(i32 noundef %47)
  %49 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %46, ptr noundef @.str.7, ptr noundef @.str.8, ptr noundef %48, ptr noundef @.str.2, i32 noundef 79) #6
  call void @exit(i32 noundef 1) #7
  unreachable

50:                                               ; preds = %41
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #6
  br label %51

51:                                               ; preds = %65, %57, %50
  %52 = call i32 @usleep(i32 noundef 1000)
  %53 = call i32 @ach_open(ptr noundef %5, ptr noundef @.str.5, ptr noundef null)
  store i32 %53, ptr %9, align 4, !tbaa !5
  %54 = load i32, ptr %9, align 4, !tbaa !5
  %55 = call i32 @ach_status_match(i32 noundef %54, i32 noundef 33280)
  %56 = icmp ne i32 %55, 0
  br i1 %56, label %57, label %58

57:                                               ; preds = %51
  br label %51

58:                                               ; preds = %51
  %59 = load i32, ptr %9, align 4, !tbaa !5
  %60 = icmp eq i32 0, %59
  br i1 %60, label %61, label %62

61:                                               ; preds = %58
  br label %66

62:                                               ; preds = %58
  %63 = load i32, ptr %9, align 4, !tbaa !5
  call void @fail_ach(ptr noundef @.str.9, i32 noundef %63)
  br label %64

64:                                               ; preds = %62
  br label %65

65:                                               ; preds = %64
  br label %51

66:                                               ; preds = %61
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #6
  %67 = call i32 @ach_channel_clock(ptr noundef %5, ptr noundef %11)
  store i32 %67, ptr %12, align 4, !tbaa !5
  %68 = load i32, ptr %12, align 4, !tbaa !5
  %69 = icmp ne i32 0, %68
  br i1 %69, label %70, label %75

70:                                               ; preds = %66
  %71 = load ptr, ptr @stderr, align 8, !tbaa !9
  %72 = load i32, ptr %12, align 4, !tbaa !5
  %73 = call ptr @ach_result_to_string(i32 noundef %72)
  %74 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %71, ptr noundef @.str.10, ptr noundef @.str.11, ptr noundef %73, ptr noundef @.str.2, i32 noundef 92) #6
  call void @exit(i32 noundef 1) #7
  unreachable

75:                                               ; preds = %66
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #6
  %76 = load i32, ptr %11, align 4, !tbaa !5
  %77 = load i32, ptr %3, align 4, !tbaa !5
  %78 = icmp eq i32 %76, %77
  br i1 %78, label %82, label %79

79:                                               ; preds = %75
  %80 = load ptr, ptr @stderr, align 8, !tbaa !9
  %81 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %80, ptr noundef @.str.12, ptr noundef @.str.13, ptr noundef @.str.2, i32 noundef 93) #6
  call void @exit(i32 noundef 1) #7
  unreachable

82:                                               ; preds = %75
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #6
  %83 = call i32 @ach_close(ptr noundef %5)
  store i32 %83, ptr %13, align 4, !tbaa !5
  %84 = load i32, ptr %13, align 4, !tbaa !5
  %85 = icmp ne i32 0, %84
  br i1 %85, label %86, label %91

86:                                               ; preds = %82
  %87 = load ptr, ptr @stderr, align 8, !tbaa !9
  %88 = load i32, ptr %13, align 4, !tbaa !5
  %89 = call ptr @ach_result_to_string(i32 noundef %88)
  %90 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %87, ptr noundef @.str.14, ptr noundef @.str.15, ptr noundef %89, ptr noundef @.str.2, i32 noundef 95) #6
  call void @exit(i32 noundef 1) #7
  unreachable

91:                                               ; preds = %82
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr %14) #6
  %92 = call i32 @ach_unlink(ptr noundef @.str.5)
  store i32 %92, ptr %14, align 4, !tbaa !5
  %93 = load i32, ptr %14, align 4, !tbaa !5
  %94 = icmp ne i32 0, %93
  br i1 %94, label %95, label %100

95:                                               ; preds = %91
  %96 = load ptr, ptr @stderr, align 8, !tbaa !9
  %97 = load i32, ptr %14, align 4, !tbaa !5
  %98 = call ptr @ach_result_to_string(i32 noundef %97)
  %99 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %96, ptr noundef @.str.16, ptr noundef @.str.17, ptr noundef %98, ptr noundef @.str.2, i32 noundef 96) #6
  call void @exit(i32 noundef 1) #7
  unreachable

100:                                              ; preds = %91
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #6
  call void @llvm.lifetime.end.p0(i64 128, ptr %6) #6
  call void @llvm.lifetime.end.p0(i64 128, ptr %5) #6
  ret i32 0
}

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

declare void @ach_create_attr_init(ptr noundef) #2

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

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

declare ptr @ach_result_to_string(i32 noundef) #2

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

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

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

declare i32 @ach_unlink(ptr noundef) #2

; Function Attrs: inlinehint nounwind uwtable
declare hidden i32 @ach_status_match(i32 noundef, i32 noundef) #5

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

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

declare i32 @usleep(i32 noundef) #2

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

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

declare i32 @ach_close(ptr noundef) #2

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


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

%struct.ach_channel = type { %union.anon }
%union.anon = type { [16 x i64] }
%struct.ach_create_attr = type { %union.anon.1 }
%union.anon.1 = type { [16 x i64] }

@stderr = external local_unnamed_addr global ptr, align 8
@.str = external hidden unnamed_addr constant [83 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [17 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [65 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [79 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [15 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [9 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [15 x i8], align 1
@.str.7 = external hidden unnamed_addr constant [75 x i8], align 1
@.str.8 = external hidden unnamed_addr constant [13 x i8], align 1
@.str.9 = external hidden unnamed_addr constant [9 x i8], align 1
@.str.10 = external hidden unnamed_addr constant [80 x i8], align 1
@.str.11 = external hidden unnamed_addr constant [16 x i8], align 1
@.str.12 = external hidden unnamed_addr constant [54 x i8], align 1
@.str.13 = external hidden unnamed_addr constant [12 x i8], align 1
@.str.14 = external hidden unnamed_addr constant [58 x i8], align 1
@.str.15 = external hidden unnamed_addr constant [12 x i8], align 1
@.str.16 = external hidden unnamed_addr constant [62 x i8], align 1
@.str.17 = external hidden unnamed_addr constant [13 x i8], align 1

; Function Attrs: nounwind uwtable
define dso_local noundef i32 @test_clock(i32 noundef %0, i32 noundef %1) local_unnamed_addr #0 {
  %3 = alloca %struct.ach_channel, align 8
  %4 = alloca %struct.ach_create_attr, align 8
  %5 = alloca i32, align 4
  call void @llvm.lifetime.start.p0(i64 128, ptr nonnull %3) #6
  call void @llvm.lifetime.start.p0(i64 128, ptr nonnull %4) #6
  call void @ach_create_attr_init(ptr noundef nonnull %4) #6
  %6 = call i32 @ach_create_attr_set_clock(ptr noundef nonnull %4, i32 noundef %0) #6
  %.not = icmp eq i32 %6, 0
  br i1 %.not, label %11, label %7

7:                                                ; preds = %2
  %8 = load ptr, ptr @stderr, align 8, !tbaa !5
  %9 = call ptr @ach_result_to_string(i32 noundef %6) #6
  %10 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %8, ptr noundef nonnull @.str, ptr noundef nonnull @.str.1, ptr noundef %9, ptr noundef nonnull @.str.2, i32 noundef 71) #7
  call void @exit(i32 noundef 1) #8
  unreachable

11:                                               ; preds = %2
  %12 = call i32 @ach_create_attr_set_map(ptr noundef nonnull %4, i32 noundef %1) #6
  %.not26 = icmp eq i32 %12, 0
  br i1 %.not26, label %17, label %13

13:                                               ; preds = %11
  %14 = load ptr, ptr @stderr, align 8, !tbaa !5
  %15 = call ptr @ach_result_to_string(i32 noundef %12) #6
  %16 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %14, ptr noundef nonnull @.str.3, ptr noundef nonnull @.str.4, ptr noundef %15, ptr noundef nonnull @.str.2, i32 noundef 72) #7
  call void @exit(i32 noundef 1) #8
  unreachable

17:                                               ; preds = %11
  %18 = call i32 @ach_unlink(ptr noundef nonnull @.str.5) #6
  %19 = call i32 @ach_status_match(i32 noundef %18, i32 noundef 513)
  %.not27 = icmp eq i32 %19, 0
  br i1 %.not27, label %20, label %21

20:                                               ; preds = %17
  call void @fail_ach(ptr noundef nonnull @.str.6, i32 noundef %18) #6
  br label %21

21:                                               ; preds = %20, %17
  %22 = call i32 @ach_create(ptr noundef nonnull @.str.5, i64 noundef 0, i64 noundef 0, ptr noundef nonnull %4) #6
  %.not28 = icmp eq i32 %22, 0
  br i1 %.not28, label %.preheader, label %23

23:                                               ; preds = %21
  %24 = load ptr, ptr @stderr, align 8, !tbaa !5
  %25 = call ptr @ach_result_to_string(i32 noundef %22) #6
  %26 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %24, ptr noundef nonnull @.str.7, ptr noundef nonnull @.str.8, ptr noundef %25, ptr noundef nonnull @.str.2, i32 noundef 79) #7
  call void @exit(i32 noundef 1) #8
  unreachable

.preheader:                                       ; preds = %21, %.preheader.backedge
  %27 = call i32 @usleep(i32 noundef 1000) #6
  %28 = call i32 @ach_open(ptr noundef nonnull %3, ptr noundef nonnull @.str.5, ptr noundef null) #6
  %29 = call i32 @ach_status_match(i32 noundef %28, i32 noundef 33280)
  %.not29 = icmp eq i32 %29, 0
  br i1 %.not29, label %30, label %.preheader.backedge

30:                                               ; preds = %.preheader
  %31 = icmp eq i32 %28, 0
  br i1 %31, label %33, label %32

32:                                               ; preds = %30
  call void @fail_ach(ptr noundef nonnull @.str.9, i32 noundef %28) #6
  br label %.preheader.backedge

.preheader.backedge:                              ; preds = %32, %.preheader
  br label %.preheader

33:                                               ; preds = %30
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %5) #6
  %34 = call i32 @ach_channel_clock(ptr noundef nonnull %3, ptr noundef nonnull %5) #6
  %.not30 = icmp eq i32 %34, 0
  br i1 %.not30, label %39, label %35

35:                                               ; preds = %33
  %36 = load ptr, ptr @stderr, align 8, !tbaa !5
  %37 = call ptr @ach_result_to_string(i32 noundef %34) #6
  %38 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %36, ptr noundef nonnull @.str.10, ptr noundef nonnull @.str.11, ptr noundef %37, ptr noundef nonnull @.str.2, i32 noundef 92) #7
  call void @exit(i32 noundef 1) #8
  unreachable

39:                                               ; preds = %33
  %40 = load i32, ptr %5, align 4, !tbaa !9
  %41 = icmp eq i32 %40, %0
  br i1 %41, label %45, label %42

42:                                               ; preds = %39
  %43 = load ptr, ptr @stderr, align 8, !tbaa !5
  %44 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %43, ptr noundef nonnull @.str.12, ptr noundef nonnull @.str.13, ptr noundef nonnull @.str.2, i32 noundef 93) #7
  call void @exit(i32 noundef 1) #8
  unreachable

45:                                               ; preds = %39
  %46 = call i32 @ach_close(ptr noundef nonnull %3) #6
  %.not31 = icmp eq i32 %46, 0
  br i1 %.not31, label %51, label %47

47:                                               ; preds = %45
  %48 = load ptr, ptr @stderr, align 8, !tbaa !5
  %49 = call ptr @ach_result_to_string(i32 noundef %46) #6
  %50 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %48, ptr noundef nonnull @.str.14, ptr noundef nonnull @.str.15, ptr noundef %49, ptr noundef nonnull @.str.2, i32 noundef 95) #7
  call void @exit(i32 noundef 1) #8
  unreachable

51:                                               ; preds = %45
  %52 = call i32 @ach_unlink(ptr noundef nonnull @.str.5) #6
  %.not32 = icmp eq i32 %52, 0
  br i1 %.not32, label %57, label %53

53:                                               ; preds = %51
  %54 = load ptr, ptr @stderr, align 8, !tbaa !5
  %55 = call ptr @ach_result_to_string(i32 noundef %52) #6
  %56 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %54, ptr noundef nonnull @.str.16, ptr noundef nonnull @.str.17, ptr noundef %55, ptr noundef nonnull @.str.2, i32 noundef 96) #7
  call void @exit(i32 noundef 1) #8
  unreachable

57:                                               ; preds = %51
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %5) #6
  call void @llvm.lifetime.end.p0(i64 128, ptr nonnull %4) #6
  call void @llvm.lifetime.end.p0(i64 128, ptr nonnull %3) #6
  ret i32 0
}

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

declare void @ach_create_attr_init(ptr noundef) local_unnamed_addr #2

declare i32 @ach_create_attr_set_clock(ptr noundef, i32 noundef) local_unnamed_addr #2

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

declare ptr @ach_result_to_string(i32 noundef) local_unnamed_addr #2

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

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

declare i32 @ach_create_attr_set_map(ptr noundef, i32 noundef) local_unnamed_addr #2

declare i32 @ach_unlink(ptr noundef) local_unnamed_addr #2

; Function Attrs: inlinehint nounwind uwtable
declare hidden i32 @ach_status_match(i32 noundef, i32 noundef) local_unnamed_addr #5

declare void @fail_ach(ptr noundef, i32 noundef) local_unnamed_addr #2

declare i32 @ach_create(ptr noundef, i64 noundef, i64 noundef, ptr noundef) local_unnamed_addr #2

declare i32 @usleep(i32 noundef) local_unnamed_addr #2

declare i32 @ach_open(ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #2

declare i32 @ach_channel_clock(ptr noundef, ptr noundef) local_unnamed_addr #2

declare i32 @ach_close(ptr noundef) local_unnamed_addr #2

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


; Effective O3 passes: GlobalOptPass,InferFunctionAttrsPass,InstCombinePass,LoopSimplifyPass,LoopUnrollPass,PostOrderFunctionAttrsPass,SROAPass,SimplifyCFGPass