#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 */
typedef int /*<<< orphan*/ time_t;
struct timezone {
  int dummy;
};
struct timeval {
  int dummy;
};
struct timespec {
  int tv_nsec;
  scalar_t__ tv_sec;
};

/* Variables and functions */
int /*<<< orphan*/ CLOCK_MONOTONIC;
int /*<<< orphan*/ CLOCK_PROCESS_CPUTIME_ID;
int /*<<< orphan*/ CLOCK_REALTIME;
int /*<<< orphan*/ CLOCK_THREAD_CPUTIME_ID;
int /*<<< orphan*/ SYS_clock_getres;
int /*<<< orphan*/ SYS_clock_gettime;
int /*<<< orphan*/ SYS_clock_nanosleep;
int /*<<< orphan*/ SYS_clock_settime;
int /*<<< orphan*/ SYS_gettimeofday;
int /*<<< orphan*/ TIMER_ABSTIME;
int /*<<< orphan*/ settimeofday(struct timeval *, struct timezone *);
int syscall(int /*<<< orphan*/, int, ...);
int main() {
  int t;
  struct timeval tv;
  struct timespec ts;
  time_t tt;
  t = syscall(SYS_gettimeofday, &tv, NULL);
  settimeofday(&tv, NULL);
  settimeofday((struct timeval *)-1, NULL);
  settimeofday(&tv, (struct timezone *)-1);
  syscall(SYS_gettimeofday, -1, NULL);
  syscall(SYS_gettimeofday, &tv, -1);
  syscall(SYS_clock_gettime, CLOCK_REALTIME, &ts);
  syscall(SYS_clock_settime, CLOCK_REALTIME, &ts);
  syscall(SYS_clock_getres, CLOCK_REALTIME, &ts);
  syscall(SYS_clock_getres, -1, &ts);
  syscall(SYS_clock_getres, CLOCK_REALTIME, -1);
  syscall(SYS_clock_gettime, CLOCK_MONOTONIC, &ts);
  syscall(SYS_clock_settime, CLOCK_MONOTONIC, &ts);
  syscall(SYS_clock_getres, CLOCK_MONOTONIC, &ts);
  syscall(SYS_clock_gettime, CLOCK_PROCESS_CPUTIME_ID, &ts);
  syscall(SYS_clock_settime, CLOCK_PROCESS_CPUTIME_ID, &ts);
  syscall(SYS_clock_getres, CLOCK_PROCESS_CPUTIME_ID, &ts);
  syscall(SYS_clock_gettime, CLOCK_THREAD_CPUTIME_ID, &ts);
  syscall(SYS_clock_settime, CLOCK_THREAD_CPUTIME_ID, &ts);
  syscall(SYS_clock_getres, CLOCK_THREAD_CPUTIME_ID, &ts);
  syscall(SYS_clock_gettime, CLOCK_REALTIME, &ts);
  ts.tv_sec++;
  syscall(SYS_clock_nanosleep, CLOCK_REALTIME, TIMER_ABSTIME, &ts);
  ts.tv_sec = 0;
  ts.tv_nsec = 10000;
  syscall(SYS_clock_nanosleep, CLOCK_REALTIME, 0x0, &ts);
  syscall(SYS_clock_gettime, -1, &ts);
  syscall(SYS_clock_gettime, CLOCK_REALTIME, -1);
  syscall(SYS_clock_settime, -1, &ts);
  syscall(SYS_clock_settime, CLOCK_MONOTONIC, -1);
  ts.tv_sec = 0;
  ts.tv_nsec = 10000;
  syscall(SYS_clock_nanosleep, -1, 0x0, &ts);
  ts.tv_sec = 0;
  ts.tv_nsec = 10000;
  syscall(SYS_clock_nanosleep, CLOCK_REALTIME, -1, &ts);
  ts.tv_sec = 0;
  ts.tv_nsec = 10000;
  syscall(SYS_clock_nanosleep, CLOCK_REALTIME, 0x0, -1);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movl   $0x0,-0x4(%rbp)
mov    0x2e5a(%rip),%rax
mov    (%rax),%edi
lea    -0x10(%rbp),%rax
mov    %eax,%esi
xor    %eax,%eax
mov    %eax,%edx
mov    $0x0,%al
call   1030 <syscall@plt>
mov    %eax,-0x8(%rbp)
lea    -0x10(%rbp),%rdi
xor    %eax,%eax
mov    %eax,%esi
call   1040 <settimeofday@plt>
mov    $0xffffffffffffffff,%rdi
xor    %eax,%eax
mov    %eax,%esi
call   1040 <settimeofday@plt>
lea    -0x10(%rbp),%rdi
mov    $0xffffffffffffffff,%rsi
call   1040 <settimeofday@plt>
mov    0x2e10(%rip),%rax
mov    (%rax),%edi
mov    $0xffffffff,%esi
xor    %eax,%eax
mov    %eax,%edx
mov    $0x0,%al
call   1030 <syscall@plt>
mov    0x2df7(%rip),%rax
mov    (%rax),%edi
lea    -0x10(%rbp),%rax
mov    %eax,%esi
mov    $0xffffffff,%edx
mov    $0x0,%al
call   1030 <syscall@plt>
mov    0x2e3c(%rip),%rax
mov    (%rax),%edi
mov    0x2de3(%rip),%rax
mov    (%rax),%esi
lea    -0x20(%rbp),%rdx
mov    $0x0,%al
call   1030 <syscall@plt>
mov    0x2de7(%rip),%rax
mov    (%rax),%edi
mov    0x2dc6(%rip),%rax
mov    (%rax),%esi
lea    -0x20(%rbp),%rdx
mov    $0x0,%al
call   1030 <syscall@plt>
mov    0x2dfa(%rip),%rax
mov    (%rax),%edi
mov    0x2da9(%rip),%rax
mov    (%rax),%esi
lea    -0x20(%rbp),%rdx
mov    $0x0,%al
call   1030 <syscall@plt>
mov    0x2ddd(%rip),%rax
mov    (%rax),%edi
mov    $0xffffffff,%esi
lea    -0x20(%rbp),%rdx
mov    $0x0,%al
call   1030 <syscall@plt>
mov    0x2dc4(%rip),%rax
mov    (%rax),%edi
mov    0x2d73(%rip),%rax
mov    (%rax),%esi
mov    $0xffffffff,%edx
mov    $0x0,%al
call   1030 <syscall@plt>
mov    0x2dae(%rip),%rax
mov    (%rax),%edi
mov    0x2d75(%rip),%rax
mov    (%rax),%esi
lea    -0x20(%rbp),%rdx
mov    $0x0,%al
call   1030 <syscall@plt>
mov    0x2d59(%rip),%rax
mov    (%rax),%edi
mov    0x2d58(%rip),%rax
mov    (%rax),%esi
lea    -0x20(%rbp),%rdx
mov    $0x0,%al
call   1030 <syscall@plt>
mov    0x2d6c(%rip),%rax
mov    (%rax),%edi
mov    0x2d3b(%rip),%rax
mov    (%rax),%esi
lea    -0x20(%rbp),%rdx
mov    $0x0,%al
call   1030 <syscall@plt>
mov    0x2d57(%rip),%rax
mov    (%rax),%edi
mov    0x2d2e(%rip),%rax
mov    (%rax),%esi
lea    -0x20(%rbp),%rdx
mov    $0x0,%al
call   1030 <syscall@plt>
mov    0x2d02(%rip),%rax
mov    (%rax),%edi
mov    0x2d11(%rip),%rax
mov    (%rax),%esi
lea    -0x20(%rbp),%rdx
mov    $0x0,%al
call   1030 <syscall@plt>
mov    0x2d15(%rip),%rax
mov    (%rax),%edi
mov    0x2cf4(%rip),%rax
mov    (%rax),%esi
lea    -0x20(%rbp),%rdx
mov    $0x0,%al
call   1030 <syscall@plt>
mov    0x2d00(%rip),%rax
mov    (%rax),%edi
mov    0x2cdf(%rip),%rax
mov    (%rax),%esi
lea    -0x20(%rbp),%rdx
mov    $0x0,%al
call   1030 <syscall@plt>
mov    0x2cab(%rip),%rax
mov    (%rax),%edi
mov    0x2cc2(%rip),%rax
mov    (%rax),%esi
lea    -0x20(%rbp),%rdx
mov    $0x0,%al
call   1030 <syscall@plt>
mov    0x2cbe(%rip),%rax
mov    (%rax),%edi
mov    0x2ca5(%rip),%rax
mov    (%rax),%esi
lea    -0x20(%rbp),%rdx
mov    $0x0,%al
call   1030 <syscall@plt>
mov    0x2ca9(%rip),%rax
mov    (%rax),%edi
mov    0x2c50(%rip),%rax
mov    (%rax),%esi
lea    -0x20(%rbp),%rdx
mov    $0x0,%al
call   1030 <syscall@plt>
mov    -0x18(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x18(%rbp)
mov    0x2c38(%rip),%rax
mov    (%rax),%edi
mov    0x2c27(%rip),%rax
mov    (%rax),%esi
mov    0x2c46(%rip),%rax
mov    (%rax),%edx
lea    -0x20(%rbp),%rcx
mov    $0x0,%al
call   1030 <syscall@plt>
movq   $0x0,-0x18(%rbp)
movl   $0x2710,-0x20(%rbp)
mov    0x2c03(%rip),%rax
mov    (%rax),%edi
mov    0x2bf2(%rip),%rax
mov    (%rax),%esi
xor    %edx,%edx
lea    -0x20(%rbp),%rcx
mov    $0x0,%al
call   1030 <syscall@plt>
mov    0x2c2c(%rip),%rax
mov    (%rax),%edi
mov    $0xffffffff,%esi
lea    -0x20(%rbp),%rdx
mov    $0x0,%al
call   1030 <syscall@plt>
mov    0x2c13(%rip),%rax
mov    (%rax),%edi
mov    0x2bba(%rip),%rax
mov    (%rax),%esi
mov    $0xffffffff,%edx
mov    $0x0,%al
call   1030 <syscall@plt>
mov    0x2bbd(%rip),%rax
mov    (%rax),%edi
mov    $0xffffffff,%esi
lea    -0x20(%rbp),%rdx
mov    $0x0,%al
call   1030 <syscall@plt>
mov    0x2ba4(%rip),%rax
mov    (%rax),%edi
mov    0x2ba3(%rip),%rax
mov    (%rax),%esi
mov    $0xffffffff,%edx
mov    $0x0,%al
call   1030 <syscall@plt>
movq   $0x0,-0x18(%rbp)
movl   $0x2710,-0x20(%rbp)
mov    0x2b67(%rip),%rax
mov    (%rax),%edi
mov    $0xffffffff,%esi
xor    %edx,%edx
lea    -0x20(%rbp),%rcx
mov    $0x0,%al
call   1030 <syscall@plt>
movq   $0x0,-0x18(%rbp)
movl   $0x2710,-0x20(%rbp)
mov    0x2b3d(%rip),%rax
mov    (%rax),%edi
mov    0x2b2c(%rip),%rax
mov    (%rax),%esi
mov    $0xffffffff,%edx
lea    -0x20(%rbp),%rcx
mov    $0x0,%al
call   1030 <syscall@plt>
movq   $0x0,-0x18(%rbp)
movl   $0x2710,-0x20(%rbp)
mov    0x2b0c(%rip),%rax
mov    (%rax),%edi
mov    0x2afb(%rip),%rax
mov    (%rax),%esi
xor    %edx,%edx
mov    $0xffffffff,%ecx
mov    $0x0,%al
call   1030 <syscall@plt>
xor    %eax,%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x18,%rsp
mov    0x2e5b(%rip),%rbp
mov    0x0(%rbp),%edi
lea    0x10(%rsp),%rbx
mov    %ebx,%esi
xor    %edx,%edx
xor    %eax,%eax
call   1030 <syscall@plt>
mov    %rbx,%rdi
xor    %esi,%esi
call   1040 <settimeofday@plt>
mov    $0xffffffffffffffff,%rdi
xor    %esi,%esi
call   1040 <settimeofday@plt>
mov    %rbx,%rdi
mov    $0xffffffffffffffff,%rsi
call   1040 <settimeofday@plt>
mov    0x0(%rbp),%edi
mov    $0xffffffff,%esi
xor    %edx,%edx
xor    %eax,%eax
call   1030 <syscall@plt>
mov    0x0(%rbp),%edi
mov    %ebx,%esi
mov    $0xffffffff,%edx
xor    %eax,%eax
call   1030 <syscall@plt>
mov    0x2e58(%rip),%rax
mov    (%rax),%edi
mov    %rax,%rbp
mov    0x2dfc(%rip),%r14
mov    (%r14),%esi
mov    %rsp,%rbx
mov    %rbx,%rdx
xor    %eax,%eax
call   1030 <syscall@plt>
mov    0x2dfd(%rip),%r12
mov    (%r12),%edi
mov    (%r14),%esi
mov    %rbx,%rdx
xor    %eax,%eax
call   1030 <syscall@plt>
mov    0x2e15(%rip),%r15
mov    (%r15),%edi
mov    (%r14),%esi
mov    %rbx,%rdx
xor    %eax,%eax
call   1030 <syscall@plt>
mov    (%r15),%edi
mov    $0xffffffff,%esi
mov    %rbx,%rdx
xor    %eax,%eax
call   1030 <syscall@plt>
mov    (%r15),%edi
mov    (%r14),%esi
mov    $0xffffffff,%edx
xor    %eax,%eax
call   1030 <syscall@plt>
mov    0x0(%rbp),%edi
mov    0x2daf(%rip),%rbp
mov    0x0(%rbp),%esi
mov    %rbx,%rdx
xor    %eax,%eax
call   1030 <syscall@plt>
mov    (%r12),%edi
mov    0x0(%rbp),%esi
mov    %rbx,%rdx
xor    %eax,%eax
call   1030 <syscall@plt>
mov    (%r15),%edi
mov    0x0(%rbp),%esi
mov    %rbx,%rdx
xor    %eax,%eax
call   1030 <syscall@plt>
mov    0x2daa(%rip),%rbp
mov    0x0(%rbp),%edi
mov    0x2d80(%rip),%r13
mov    0x0(%r13),%esi
mov    %rbx,%rdx
xor    %eax,%eax
call   1030 <syscall@plt>
mov    (%r12),%edi
mov    0x0(%r13),%esi
mov    %rbx,%rdx
xor    %eax,%eax
call   1030 <syscall@plt>
mov    (%r15),%edi
mov    0x0(%r13),%esi
mov    %rbx,%rdx
xor    %eax,%eax
call   1030 <syscall@plt>
mov    0x0(%rbp),%edi
mov    %rbp,%r13
mov    0x2d4a(%rip),%rbp
mov    0x0(%rbp),%esi
mov    %rbx,%rdx
xor    %eax,%eax
call   1030 <syscall@plt>
mov    (%r12),%edi
mov    0x0(%rbp),%esi
mov    %rbx,%rdx
xor    %eax,%eax
call   1030 <syscall@plt>
mov    (%r15),%edi
mov    0x0(%rbp),%esi
mov    %rbx,%rdx
xor    %eax,%eax
call   1030 <syscall@plt>
mov    0x0(%r13),%edi
mov    (%r14),%esi
mov    %rbx,%rdx
xor    %eax,%eax
call   1030 <syscall@plt>
addq   $0x1,0x8(%rsp)
mov    0x2cce(%rip),%r15
mov    (%r15),%edi
mov    (%r14),%esi
mov    0x2ce1(%rip),%rax
mov    (%rax),%edx
mov    %rbx,%rcx
xor    %eax,%eax
call   1030 <syscall@plt>
movq   $0x0,0x8(%rsp)
movl   $0x2710,(%rsp)
mov    (%r15),%edi
mov    (%r14),%esi
xor    %edx,%edx
mov    %rbx,%rcx
xor    %eax,%eax
call   1030 <syscall@plt>
mov    0x0(%r13),%edi
mov    $0xffffffff,%esi
mov    %rbx,%rdx
xor    %eax,%eax
call   1030 <syscall@plt>
mov    0x0(%r13),%edi
mov    (%r14),%esi
mov    $0xffffffff,%edx
xor    %eax,%eax
call   1030 <syscall@plt>
mov    (%r12),%edi
mov    $0xffffffff,%esi
mov    %rbx,%rdx
xor    %eax,%eax
call   1030 <syscall@plt>
mov    (%r12),%edi
mov    0x2c67(%rip),%rax
mov    (%rax),%esi
mov    $0xffffffff,%edx
xor    %eax,%eax
call   1030 <syscall@plt>
movq   $0x0,0x8(%rsp)
movl   $0x2710,(%rsp)
mov    (%r15),%edi
mov    $0xffffffff,%esi
xor    %edx,%edx
mov    %rbx,%rcx
xor    %eax,%eax
call   1030 <syscall@plt>
movq   $0x0,0x8(%rsp)
movl   $0x2710,(%rsp)
mov    (%r15),%edi
mov    (%r14),%esi
mov    $0xffffffff,%edx
mov    %rbx,%rcx
xor    %eax,%eax
call   1030 <syscall@plt>
movq   $0x0,0x8(%rsp)
movl   $0x2710,(%rsp)
mov    (%r15),%edi
mov    (%r14),%esi
xor    %edx,%edx
mov    $0xffffffff,%ecx
xor    %eax,%eax
call   1030 <syscall@plt>
xor    %eax,%eax
add    $0x18,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
%struct.timeval = type { i32 }
%struct.timespec = type { i32, i64 }
%struct.timezone = type { i32 }
@SYS_gettimeofday = global i32 0
@SYS_clock_gettime = global i32 0
@CLOCK_REALTIME = global i32 0
@SYS_clock_settime = global i32 0
@SYS_clock_getres = global i32 0
@CLOCK_MONOTONIC = global i32 0
@CLOCK_PROCESS_CPUTIME_ID = global i32 0
@CLOCK_THREAD_CPUTIME_ID = global i32 0
@SYS_clock_nanosleep = global i32 0
@TIMER_ABSTIME = global i32 0
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca %struct.timeval
%4 = alloca %struct.timespec
%5 = alloca i32
store i32 0, i32* %1
%6 = load i32, i32* @SYS_gettimeofday
%7 = ptrtoint %struct.timeval* %3 to i32
%8 = call i32 (i32, i32, ...) @syscall(i32 %6, i32 %7, i8* null)
store i32 %8, i32* %2
%9 = call i32 @settimeofday(%struct.timeval* %3, %struct.timezone* null)
%10 = call i32 @settimeofday(%struct.timeval* inttoptr (i64 -1 to %struct.timeval*), %struct.timezone* null)
%11 = call i32 @settimeofday(%struct.timeval* %3, %struct.timezone* inttoptr (i64 -1 to %struct.timezone*))
%12 = load i32, i32* @SYS_gettimeofday
%13 = call i32 (i32, i32, ...) @syscall(i32 %12, i32 -1, i8* null)
%14 = load i32, i32* @SYS_gettimeofday
%15 = ptrtoint %struct.timeval* %3 to i32
%16 = call i32 (i32, i32, ...) @syscall(i32 %14, i32 %15, i32 -1)
%17 = load i32, i32* @SYS_clock_gettime
%18 = load i32, i32* @CLOCK_REALTIME
%19 = call i32 (i32, i32, ...) @syscall(i32 %17, i32 %18, %struct.timespec* %4)
%20 = load i32, i32* @SYS_clock_settime
%21 = load i32, i32* @CLOCK_REALTIME
%22 = call i32 (i32, i32, ...) @syscall(i32 %20, i32 %21, %struct.timespec* %4)
%23 = load i32, i32* @SYS_clock_getres
%24 = load i32, i32* @CLOCK_REALTIME
%25 = call i32 (i32, i32, ...) @syscall(i32 %23, i32 %24, %struct.timespec* %4)
%26 = load i32, i32* @SYS_clock_getres
%27 = call i32 (i32, i32, ...) @syscall(i32 %26, i32 -1, %struct.timespec* %4)
%28 = load i32, i32* @SYS_clock_getres
%29 = load i32, i32* @CLOCK_REALTIME
%30 = call i32 (i32, i32, ...) @syscall(i32 %28, i32 %29, i32 -1)
%31 = load i32, i32* @SYS_clock_gettime
%32 = load i32, i32* @CLOCK_MONOTONIC
%33 = call i32 (i32, i32, ...) @syscall(i32 %31, i32 %32, %struct.timespec* %4)
%34 = load i32, i32* @SYS_clock_settime
%35 = load i32, i32* @CLOCK_MONOTONIC
%36 = call i32 (i32, i32, ...) @syscall(i32 %34, i32 %35, %struct.timespec* %4)
%37 = load i32, i32* @SYS_clock_getres
%38 = load i32, i32* @CLOCK_MONOTONIC
%39 = call i32 (i32, i32, ...) @syscall(i32 %37, i32 %38, %struct.timespec* %4)
%40 = load i32, i32* @SYS_clock_gettime
%41 = load i32, i32* @CLOCK_PROCESS_CPUTIME_ID
%42 = call i32 (i32, i32, ...) @syscall(i32 %40, i32 %41, %struct.timespec* %4)
%43 = load i32, i32* @SYS_clock_settime
%44 = load i32, i32* @CLOCK_PROCESS_CPUTIME_ID
%45 = call i32 (i32, i32, ...) @syscall(i32 %43, i32 %44, %struct.timespec* %4)
%46 = load i32, i32* @SYS_clock_getres
%47 = load i32, i32* @CLOCK_PROCESS_CPUTIME_ID
%48 = call i32 (i32, i32, ...) @syscall(i32 %46, i32 %47, %struct.timespec* %4)
%49 = load i32, i32* @SYS_clock_gettime
%50 = load i32, i32* @CLOCK_THREAD_CPUTIME_ID
%51 = call i32 (i32, i32, ...) @syscall(i32 %49, i32 %50, %struct.timespec* %4)
%52 = load i32, i32* @SYS_clock_settime
%53 = load i32, i32* @CLOCK_THREAD_CPUTIME_ID
%54 = call i32 (i32, i32, ...) @syscall(i32 %52, i32 %53, %struct.timespec* %4)
%55 = load i32, i32* @SYS_clock_getres
%56 = load i32, i32* @CLOCK_THREAD_CPUTIME_ID
%57 = call i32 (i32, i32, ...) @syscall(i32 %55, i32 %56, %struct.timespec* %4)
%58 = load i32, i32* @SYS_clock_gettime
%59 = load i32, i32* @CLOCK_REALTIME
%60 = call i32 (i32, i32, ...) @syscall(i32 %58, i32 %59, %struct.timespec* %4)
%61 = getelementptr inbounds %struct.timespec, %struct.timespec* %4, i32 0, i32 1
%62 = load i64, i64* %61
%63 = add nsw i64 %62, 1
store i64 %63, i64* %61
%64 = load i32, i32* @SYS_clock_nanosleep
%65 = load i32, i32* @CLOCK_REALTIME
%66 = load i32, i32* @TIMER_ABSTIME
%67 = call i32 (i32, i32, ...) @syscall(i32 %64, i32 %65, i32 %66, %struct.timespec* %4)
%68 = getelementptr inbounds %struct.timespec, %struct.timespec* %4, i32 0, i32 1
store i64 0, i64* %68
%69 = getelementptr inbounds %struct.timespec, %struct.timespec* %4, i32 0, i32 0
store i32 10000, i32* %69
%70 = load i32, i32* @SYS_clock_nanosleep
%71 = load i32, i32* @CLOCK_REALTIME
%72 = call i32 (i32, i32, ...) @syscall(i32 %70, i32 %71, i32 0, %struct.timespec* %4)
%73 = load i32, i32* @SYS_clock_gettime
%74 = call i32 (i32, i32, ...) @syscall(i32 %73, i32 -1, %struct.timespec* %4)
%75 = load i32, i32* @SYS_clock_gettime
%76 = load i32, i32* @CLOCK_REALTIME
%77 = call i32 (i32, i32, ...) @syscall(i32 %75, i32 %76, i32 -1)
%78 = load i32, i32* @SYS_clock_settime
%79 = call i32 (i32, i32, ...) @syscall(i32 %78, i32 -1, %struct.timespec* %4)
%80 = load i32, i32* @SYS_clock_settime
%81 = load i32, i32* @CLOCK_MONOTONIC
%82 = call i32 (i32, i32, ...) @syscall(i32 %80, i32 %81, i32 -1)
%83 = getelementptr inbounds %struct.timespec, %struct.timespec* %4, i32 0, i32 1
store i64 0, i64* %83
%84 = getelementptr inbounds %struct.timespec, %struct.timespec* %4, i32 0, i32 0
store i32 10000, i32* %84
%85 = load i32, i32* @SYS_clock_nanosleep
%86 = call i32 (i32, i32, ...) @syscall(i32 %85, i32 -1, i32 0, %struct.timespec* %4)
%87 = getelementptr inbounds %struct.timespec, %struct.timespec* %4, i32 0, i32 1
store i64 0, i64* %87
%88 = getelementptr inbounds %struct.timespec, %struct.timespec* %4, i32 0, i32 0
store i32 10000, i32* %88
%89 = load i32, i32* @SYS_clock_nanosleep
%90 = load i32, i32* @CLOCK_REALTIME
%91 = call i32 (i32, i32, ...) @syscall(i32 %89, i32 %90, i32 -1, %struct.timespec* %4)
%92 = getelementptr inbounds %struct.timespec, %struct.timespec* %4, i32 0, i32 1
store i64 0, i64* %92
%93 = getelementptr inbounds %struct.timespec, %struct.timespec* %4, i32 0, i32 0
store i32 10000, i32* %93
%94 = load i32, i32* @SYS_clock_nanosleep
%95 = load i32, i32* @CLOCK_REALTIME
%96 = call i32 (i32, i32, ...) @syscall(i32 %94, i32 %95, i32 0, i32 -1)
ret i32 0
}

LLVM IR (-O2):
%struct.timeval = type { i32 }
%struct.timespec = type { i32, i64 }
%struct.timezone = type { i32 }
@SYS_gettimeofday = global i32 0
@SYS_clock_gettime = global i32 0
@CLOCK_REALTIME = global i32 0
@SYS_clock_settime = global i32 0
@SYS_clock_getres = global i32 0
@CLOCK_MONOTONIC = global i32 0
@CLOCK_PROCESS_CPUTIME_ID = global i32 0
@CLOCK_THREAD_CPUTIME_ID = global i32 0
@SYS_clock_nanosleep = global i32 0
@TIMER_ABSTIME = global i32 0
define i32 @main() {
%1 = alloca %struct.timeval
%2 = alloca %struct.timespec
%3 = bitcast %struct.timeval* %1 to i8*
%4 = bitcast %struct.timespec* %2 to i8*
%5 = load i32, i32* @SYS_gettimeofday
%6 = ptrtoint %struct.timeval* %1 to i64
%7 = trunc i64 %6 to i32
%8 = call i32 (i32, i32, ...) @syscall(i32 %5, i32 %7, i8* null)
%9 = call i32 @settimeofday(%struct.timeval* %1, %struct.timezone* null)
%10 = call i32 @settimeofday(%struct.timeval* inttoptr (i64 -1 to %struct.timeval*), %struct.timezone* null)
%11 = call i32 @settimeofday(%struct.timeval* %1, %struct.timezone* inttoptr (i64 -1 to %struct.timezone*))
%12 = load i32, i32* @SYS_gettimeofday
%13 = call i32 (i32, i32, ...) @syscall(i32 %12, i32 -1, i8* null)
%14 = load i32, i32* @SYS_gettimeofday
%15 = call i32 (i32, i32, ...) @syscall(i32 %14, i32 %7, i32 -1)
%16 = load i32, i32* @SYS_clock_gettime
%17 = load i32, i32* @CLOCK_REALTIME
%18 = call i32 (i32, i32, ...) @syscall(i32 %16, i32 %17, %struct.timespec* %2)
%19 = load i32, i32* @SYS_clock_settime
%20 = load i32, i32* @CLOCK_REALTIME
%21 = call i32 (i32, i32, ...) @syscall(i32 %19, i32 %20, %struct.timespec* %2)
%22 = load i32, i32* @SYS_clock_getres
%23 = load i32, i32* @CLOCK_REALTIME
%24 = call i32 (i32, i32, ...) @syscall(i32 %22, i32 %23, %struct.timespec* %2)
%25 = load i32, i32* @SYS_clock_getres
%26 = call i32 (i32, i32, ...) @syscall(i32 %25, i32 -1, %struct.timespec* %2)
%27 = load i32, i32* @SYS_clock_getres
%28 = load i32, i32* @CLOCK_REALTIME
%29 = call i32 (i32, i32, ...) @syscall(i32 %27, i32 %28, i32 -1)
%30 = load i32, i32* @SYS_clock_gettime
%31 = load i32, i32* @CLOCK_MONOTONIC
%32 = call i32 (i32, i32, ...) @syscall(i32 %30, i32 %31, %struct.timespec* %2)
%33 = load i32, i32* @SYS_clock_settime
%34 = load i32, i32* @CLOCK_MONOTONIC
%35 = call i32 (i32, i32, ...) @syscall(i32 %33, i32 %34, %struct.timespec* %2)
%36 = load i32, i32* @SYS_clock_getres
%37 = load i32, i32* @CLOCK_MONOTONIC
%38 = call i32 (i32, i32, ...) @syscall(i32 %36, i32 %37, %struct.timespec* %2)
%39 = load i32, i32* @SYS_clock_gettime
%40 = load i32, i32* @CLOCK_PROCESS_CPUTIME_ID
%41 = call i32 (i32, i32, ...) @syscall(i32 %39, i32 %40, %struct.timespec* %2)
%42 = load i32, i32* @SYS_clock_settime
%43 = load i32, i32* @CLOCK_PROCESS_CPUTIME_ID
%44 = call i32 (i32, i32, ...) @syscall(i32 %42, i32 %43, %struct.timespec* %2)
%45 = load i32, i32* @SYS_clock_getres
%46 = load i32, i32* @CLOCK_PROCESS_CPUTIME_ID
%47 = call i32 (i32, i32, ...) @syscall(i32 %45, i32 %46, %struct.timespec* %2)
%48 = load i32, i32* @SYS_clock_gettime
%49 = load i32, i32* @CLOCK_THREAD_CPUTIME_ID
%50 = call i32 (i32, i32, ...) @syscall(i32 %48, i32 %49, %struct.timespec* %2)
%51 = load i32, i32* @SYS_clock_settime
%52 = load i32, i32* @CLOCK_THREAD_CPUTIME_ID
%53 = call i32 (i32, i32, ...) @syscall(i32 %51, i32 %52, %struct.timespec* %2)
%54 = load i32, i32* @SYS_clock_getres
%55 = load i32, i32* @CLOCK_THREAD_CPUTIME_ID
%56 = call i32 (i32, i32, ...) @syscall(i32 %54, i32 %55, %struct.timespec* %2)
%57 = load i32, i32* @SYS_clock_gettime
%58 = load i32, i32* @CLOCK_REALTIME
%59 = call i32 (i32, i32, ...) @syscall(i32 %57, i32 %58, %struct.timespec* %2)
%60 = getelementptr inbounds %struct.timespec, %struct.timespec* %2, i64 0, i32 1
%61 = load i64, i64* %60
%62 = add nsw i64 %61, 1
store i64 %62, i64* %60
%63 = load i32, i32* @SYS_clock_nanosleep
%64 = load i32, i32* @CLOCK_REALTIME
%65 = load i32, i32* @TIMER_ABSTIME
%66 = call i32 (i32, i32, ...) @syscall(i32 %63, i32 %64, i32 %65, %struct.timespec* %2)
store i64 0, i64* %60
%67 = getelementptr inbounds %struct.timespec, %struct.timespec* %2, i64 0, i32 0
store i32 10000, i32* %67
%68 = load i32, i32* @SYS_clock_nanosleep
%69 = load i32, i32* @CLOCK_REALTIME
%70 = call i32 (i32, i32, ...) @syscall(i32 %68, i32 %69, i32 0, %struct.timespec* %2)
%71 = load i32, i32* @SYS_clock_gettime
%72 = call i32 (i32, i32, ...) @syscall(i32 %71, i32 -1, %struct.timespec* %2)
%73 = load i32, i32* @SYS_clock_gettime
%74 = load i32, i32* @CLOCK_REALTIME
%75 = call i32 (i32, i32, ...) @syscall(i32 %73, i32 %74, i32 -1)
%76 = load i32, i32* @SYS_clock_settime
%77 = call i32 (i32, i32, ...) @syscall(i32 %76, i32 -1, %struct.timespec* %2)
%78 = load i32, i32* @SYS_clock_settime
%79 = load i32, i32* @CLOCK_MONOTONIC
%80 = call i32 (i32, i32, ...) @syscall(i32 %78, i32 %79, i32 -1)
store i64 0, i64* %60
store i32 10000, i32* %67
%81 = load i32, i32* @SYS_clock_nanosleep
%82 = call i32 (i32, i32, ...) @syscall(i32 %81, i32 -1, i32 0, %struct.timespec* %2)
store i64 0, i64* %60
store i32 10000, i32* %67
%83 = load i32, i32* @SYS_clock_nanosleep
%84 = load i32, i32* @CLOCK_REALTIME
%85 = call i32 (i32, i32, ...) @syscall(i32 %83, i32 %84, i32 -1, %struct.timespec* %2)
store i64 0, i64* %60
store i32 10000, i32* %67
%86 = load i32, i32* @SYS_clock_nanosleep
%87 = load i32, i32* @CLOCK_REALTIME
%88 = call i32 (i32, i32, ...) @syscall(i32 %86, i32 %87, i32 0, i32 -1)
ret i32 0
}