#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*/ pause2(int);
int /*<<< orphan*/ printf(char *);
int main() {
  unsigned long delay = 500;
  printf("Starting ... \ndelay 1/2 second ... \n");
  pause2(delay);
  printf("now delay 3 seconds ... \n");
  delay = 3000;
  pause2(delay);
  printf("now delay 5 seconds ... \n");
  pause2(5000);
  printf("Done \n");
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movq   $0x1f4,-0x8(%rbp)
lea    0xec9(%rip),%rdi
call   1030 <printf@plt>
mov    -0x8(%rbp),%rax
mov    %eax,%edi
call   1040 <pause2@plt>
lea    0xed7(%rip),%rdi
call   1030 <printf@plt>
movq   $0xbb8,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    %eax,%edi
call   1040 <pause2@plt>
lea    0xed2(%rip),%rdi
call   1030 <printf@plt>
mov    $0x1388,%edi
call   1040 <pause2@plt>
lea    0xed6(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xed8(%rip),%rdi
call   1030 <puts@plt>
mov    $0x1f4,%edi
call   1040 <pause2@plt>
lea    0xee6(%rip),%rdi
call   1030 <puts@plt>
mov    $0xbb8,%edi
call   1040 <pause2@plt>
lea    0xee9(%rip),%rdi
call   1030 <puts@plt>
mov    $0x1388,%edi
call   1040 <pause2@plt>
lea    0xeec(%rip),%rdi
call   1030 <puts@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [37 x i8] c"Starting ... \0Adelay 1/2 second ... \0A\00"
@.str.1 = [26 x i8] c"now delay 3 seconds ... \0A\00"
@.str.2 = [26 x i8] c"now delay 5 seconds ... \0A\00"
@.str.3 = [7 x i8] c"Done \0A\00"
define i32 @main() {
%1 = alloca i64
store i64 500, i64* %1
%2 = call i32 @printf(i8* getelementptr inbounds ([37 x i8], [37 x i8]* @.str, i64 0, i64 0))
%3 = load i64, i64* %1
%4 = trunc i64 %3 to i32
%5 = call i32 @pause2(i32 %4)
%6 = call i32 @printf(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.1, i64 0, i64 0))
store i64 3000, i64* %1
%7 = load i64, i64* %1
%8 = trunc i64 %7 to i32
%9 = call i32 @pause2(i32 %8)
%10 = call i32 @printf(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.2, i64 0, i64 0))
%11 = call i32 @pause2(i32 5000)
%12 = call i32 @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.3, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@str = [36 x i8] c"Starting ... \0Adelay 1/2 second ... \00"
@str.4 = [25 x i8] c"now delay 3 seconds ... \00"
@str.5 = [25 x i8] c"now delay 5 seconds ... \00"
@str.6 = [6 x i8] c"Done \00"
define i32 @main() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([36 x i8], [36 x i8]* @str, i64 0, i64 0))
%2 = tail call i32 @pause2(i32 500)
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([25 x i8], [25 x i8]* @str.4, i64 0, i64 0))
%4 = tail call i32 @pause2(i32 3000)
%5 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([25 x i8], [25 x i8]* @str.5, i64 0, i64 0))
%6 = tail call i32 @pause2(i32 5000)
%7 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([6 x i8], [6 x i8]* @str.6, i64 0, i64 0))
ret i32 0
}