#define NULL ((void *)0)
typedef unsigned long size_t; // Customize by platform.
typedef long intptr_t;
typedef unsigned long uintptr_t;
typedef long scalar_t__; // Either arithmetic or pointer type.
/* By default, we understand bool (as a convenience). */
typedef int bool;
#define false 0
#define true 1

/* Forward declarations */

/* Type definitions */

/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void print_graph_overhead(unsigned long long duration) {
  if (duration == ~0ULL)
    return (void)printf("  ");
  if (duration > 100000ULL)
    return (void)printf("! ");
  if (duration > 10000ULL)
    return (void)printf("+ ");
  printf("  ");
}


x86 assembly (clang, -O0):
<print_graph_overhead>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
cmpq   $0xffffffffffffffff,-0x8(%rbp)
jne    1138 <print_graph_overhead+0x28>
lea    0xed2(%rip),%rdi
call   1030 <printf@plt>
jmp    1182 <print_graph_overhead+0x72>
cmpq   $0x186a0,-0x8(%rbp)
jbe    1157 <print_graph_overhead+0x47>
lea    0xeb6(%rip),%rdi
call   1030 <printf@plt>
jmp    1182 <print_graph_overhead+0x72>
cmpq   $0x2710,-0x8(%rbp)
jbe    1176 <print_graph_overhead+0x66>
lea    0xe9a(%rip),%rdi
call   1030 <printf@plt>
jmp    1182 <print_graph_overhead+0x72>
lea    0xe83(%rip),%rdi
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<print_graph_overhead>:
cmp    $0xffffffffffffffff,%rdi
je     112b <print_graph_overhead+0x1b>
cmp    $0x186a0,%rdi
jbe    1137 <print_graph_overhead+0x27>
lea    0xedd(%rip),%rdi
jmp    1030 <printf@plt>
lea    0xece(%rip),%rdi
jmp    1030 <printf@plt>
cmp    $0x2711,%rdi
lea    0xec1(%rip),%rax
lea    0xeb4(%rip),%rdi
cmovae %rax,%rdi
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [3 x i8] c" \00"
@.str.1 = [3 x i8] c"! \00"
@.str.2 = [3 x i8] c"+ \00"
define void @print_graph_overhead(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = load i64, i64* %2
%4 = icmp eq i64 %3, -1
br i1 %4, label %5, label %7
5: ; preds = %1
%6 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0))
br label %19
7: ; preds = %1
%8 = load i64, i64* %2
%9 = icmp ugt i64 %8, 100000
br i1 %9, label %10, label %12
10: ; preds = %7
%11 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0))
br label %19
12: ; preds = %7
%13 = load i64, i64* %2
%14 = icmp ugt i64 %13, 10000
br i1 %14, label %15, label %17
15: ; preds = %12
%16 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0))
br label %19
17: ; preds = %12
%18 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0))
br label %19
19: ; preds = %17, %15, %10, %5
ret void
}

LLVM IR (-O2):
@.str = [3 x i8] c" \00"
@.str.1 = [3 x i8] c"! \00"
@.str.2 = [3 x i8] c"+ \00"
define void @print_graph_overhead(i64 %0) {
%2 = icmp eq i64 %0, -1
br i1 %2, label %8, label %3
3: ; preds = %1
%4 = icmp ugt i64 %0, 100000
br i1 %4, label %8, label %5
5: ; preds = %3
%6 = icmp ugt i64 %0, 10000
%7 = select i1 %6, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0)
br label %8
8: ; preds = %5, %3, %1
%9 = phi i8* [ getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), %1 ], [ getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), %3 ], [ %7, %5 ]
%10 = tail call i32 @printf(i8* dereferenceable(1) %9)
ret void
}