#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*/ canceltimer(int);
int /*<<< orphan*/ sleep(int);
int /*<<< orphan*/ starttimer(double, int);
int main() {
  starttimer(20.0, 1);
  starttimer(10.0, 2);
  starttimer(30.0, 3);
  sleep(5);
  canceltimer(2);
  starttimer(20.0, 4);
  sleep(5);
  starttimer(18.0, 5);
  sleep(20);
  sleep(1);
  starttimer(1.0, 6);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movsd  0xec9(%rip),%xmm0
mov    $0x1,%edi
call   1040 <starttimer@plt>
movsd  0xec7(%rip),%xmm0
mov    $0x2,%edi
call   1040 <starttimer@plt>
movsd  0xead(%rip),%xmm0
mov    $0x3,%edi
call   1040 <starttimer@plt>
mov    $0x5,%edi
call   1050 <sleep@plt>
mov    $0x2,%edi
call   1030 <canceltimer@plt>
movsd  0xe7f(%rip),%xmm0
mov    $0x4,%edi
call   1040 <starttimer@plt>
mov    $0x5,%edi
call   1050 <sleep@plt>
movsd  0xe5b(%rip),%xmm0
mov    $0x5,%edi
call   1040 <starttimer@plt>
mov    $0x14,%edi
call   1050 <sleep@plt>
mov    $0x1,%edi
call   1050 <sleep@plt>
movsd  0xe2d(%rip),%xmm0
mov    $0x6,%edi
call   1040 <starttimer@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
movsd  0xec7(%rip),%xmm0
mov    $0x1,%edi
call   1040 <starttimer@plt>
movsd  0xebd(%rip),%xmm0
mov    $0x2,%edi
call   1040 <starttimer@plt>
movsd  0xeb3(%rip),%xmm0
mov    $0x3,%edi
call   1040 <starttimer@plt>
mov    $0x5,%edi
call   1050 <sleep@plt>
mov    $0x2,%edi
call   1030 <canceltimer@plt>
movsd  0xe7d(%rip),%xmm0
mov    $0x4,%edi
call   1040 <starttimer@plt>
mov    $0x5,%edi
call   1050 <sleep@plt>
movsd  0xe79(%rip),%xmm0
mov    $0x5,%edi
call   1040 <starttimer@plt>
mov    $0x14,%edi
call   1050 <sleep@plt>
mov    $0x1,%edi
call   1050 <sleep@plt>
movsd  0xe5b(%rip),%xmm0
mov    $0x6,%edi
call   1040 <starttimer@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 @starttimer(double 2.000000e+01, i32 1)
%3 = call i32 @starttimer(double 1.000000e+01, i32 2)
%4 = call i32 @starttimer(double 3.000000e+01, i32 3)
%5 = call i32 @sleep(i32 5)
%6 = call i32 @canceltimer(i32 2)
%7 = call i32 @starttimer(double 2.000000e+01, i32 4)
%8 = call i32 @sleep(i32 5)
%9 = call i32 @starttimer(double 1.800000e+01, i32 5)
%10 = call i32 @sleep(i32 20)
%11 = call i32 @sleep(i32 1)
%12 = call i32 @starttimer(double 1.000000e+00, i32 6)
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 @starttimer(double 2.000000e+01, i32 1)
%2 = tail call i32 @starttimer(double 1.000000e+01, i32 2)
%3 = tail call i32 @starttimer(double 3.000000e+01, i32 3)
%4 = tail call i32 @sleep(i32 5)
%5 = tail call i32 @canceltimer(i32 2)
%6 = tail call i32 @starttimer(double 2.000000e+01, i32 4)
%7 = tail call i32 @sleep(i32 5)
%8 = tail call i32 @starttimer(double 1.800000e+01, i32 5)
%9 = tail call i32 @sleep(i32 20)
%10 = tail call i32 @sleep(i32 1)
%11 = tail call i32 @starttimer(double 1.000000e+00, i32 6)
ret i32 0
}