#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 timex {
  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*/ adjtimex(struct timex *);
int /*<<< orphan*/ settimeofday(struct timeval *, struct timezone *);
int syscall(int /*<<< orphan*/, int, ...);
int main() {
  int t;
  struct timeval tv;
  struct timespec ts;
  struct timex tx;
  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);
  adjtimex((struct timex *)-1);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movl   $0x0,-0x4(%rbp)
mov    0x2e4a(%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    0x2e00(%rip),%rax
mov    (%rax),%edi
mov    $0xffffffff,%esi
xor    %eax,%eax
mov    %eax,%edx
mov    $0x0,%al
call   1030 <syscall@plt>
mov    0x2de7(%rip),%rax
mov    (%rax),%edi
lea    -0x10(%rbp),%rax
mov    %eax,%esi
mov    $0xffffffff,%edx
mov    $0x0,%al
call   1030 <syscall@plt>
mov    0x2e2c(%rip),%rax
mov    (%rax),%edi
mov    0x2dd3(%rip),%rax
mov    (%rax),%esi
lea    -0x20(%rbp),%rdx
mov    $0x0,%al
call   1030 <syscall@plt>
mov    0x2dd7(%rip),%rax
mov    (%rax),%edi
mov    0x2db6(%rip),%rax
mov    (%rax),%esi
lea    -0x20(%rbp),%rdx
mov    $0x0,%al
call   1030 <syscall@plt>
mov    0x2dea(%rip),%rax
mov    (%rax),%edi
mov    0x2d99(%rip),%rax
mov    (%rax),%esi
lea    -0x20(%rbp),%rdx
mov    $0x0,%al
call   1030 <syscall@plt>
mov    0x2dcd(%rip),%rax
mov    (%rax),%edi
mov    $0xffffffff,%esi
lea    -0x20(%rbp),%rdx
mov    $0x0,%al
call   1030 <syscall@plt>
mov    0x2db4(%rip),%rax
mov    (%rax),%edi
mov    0x2d63(%rip),%rax
mov    (%rax),%esi
mov    $0xffffffff,%edx
mov    $0x0,%al
call   1030 <syscall@plt>
mov    0x2d9e(%rip),%rax
mov    (%rax),%edi
mov    0x2d65(%rip),%rax
mov    (%rax),%esi
lea    -0x20(%rbp),%rdx
mov    $0x0,%al
call   1030 <syscall@plt>
mov    0x2d49(%rip),%rax
mov    (%rax),%edi
mov    0x2d48(%rip),%rax
mov    (%rax),%esi
lea    -0x20(%rbp),%rdx
mov    $0x0,%al
call   1030 <syscall@plt>
mov    0x2d5c(%rip),%rax
mov    (%rax),%edi
mov    0x2d2b(%rip),%rax
mov    (%rax),%esi
lea    -0x20(%rbp),%rdx
mov    $0x0,%al
call   1030 <syscall@plt>
mov    0x2d47(%rip),%rax
mov    (%rax),%edi
mov    0x2d1e(%rip),%rax
mov    (%rax),%esi
lea    -0x20(%rbp),%rdx
mov    $0x0,%al
call   1030 <syscall@plt>
mov    0x2cf2(%rip),%rax
mov    (%rax),%edi
mov    0x2d01(%rip),%rax
mov    (%rax),%esi
lea    -0x20(%rbp),%rdx
mov    $0x0,%al
call   1030 <syscall@plt>
mov    0x2d05(%rip),%rax
mov    (%rax),%edi
mov    0x2ce4(%rip),%rax
mov    (%rax),%esi
lea    -0x20(%rbp),%rdx
mov    $0x0,%al
call   1030 <syscall@plt>
mov    0x2cf0(%rip),%rax
mov    (%rax),%edi
mov    0x2ccf(%rip),%rax
mov    (%rax),%esi
lea    -0x20(%rbp),%rdx
mov    $0x0,%al
call   1030 <syscall@plt>
mov    0x2c9b(%rip),%rax
mov    (%rax),%edi
mov    0x2cb2(%rip),%rax
mov    (%rax),%esi
lea    -0x20(%rbp),%rdx
mov    $0x0,%al
call   1030 <syscall@plt>
mov    0x2cae(%rip),%rax
mov    (%rax),%edi
mov    0x2c95(%rip),%rax
mov    (%rax),%esi
lea    -0x20(%rbp),%rdx
mov    $0x0,%al
call   1030 <syscall@plt>
mov    0x2c99(%rip),%rax
mov    (%rax),%edi
mov    0x2c40(%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    0x2c28(%rip),%rax
mov    (%rax),%edi
mov    0x2c17(%rip),%rax
mov    (%rax),%esi
mov    0x2c36(%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    0x2bf3(%rip),%rax
mov    (%rax),%edi
mov    0x2be2(%rip),%rax
mov    (%rax),%esi
xor    %edx,%edx
lea    -0x20(%rbp),%rcx
mov    $0x0,%al
call   1030 <syscall@plt>
mov    0x2c1c(%rip),%rax
mov    (%rax),%edi
mov    $0xffffffff,%esi
lea    -0x20(%rbp),%rdx
mov    $0x0,%al
call   1030 <syscall@plt>
mov    0x2c03(%rip),%rax
mov    (%rax),%edi
mov    0x2baa(%rip),%rax
mov    (%rax),%esi
mov    $0xffffffff,%edx
mov    $0x0,%al
call   1030 <syscall@plt>
mov    0x2bad(%rip),%rax
mov    (%rax),%edi
mov    $0xffffffff,%esi
lea    -0x20(%rbp),%rdx
mov    $0x0,%al
call   1030 <syscall@plt>
mov    0x2b94(%rip),%rax
mov    (%rax),%edi
mov    0x2b93(%rip),%rax
mov    (%rax),%esi
mov    $0xffffffff,%edx
mov    $0x0,%al
call   1030 <syscall@plt>
movq   $0x0,-0x18(%rbp)
movl   $0x2710,-0x20(%rbp)
mov    0x2b57(%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    0x2b2d(%rip),%rax
mov    (%rax),%edi
mov    0x2b1c(%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    0x2afc(%rip),%rax
mov    (%rax),%edi
mov    0x2aeb(%rip),%rax
mov    (%rax),%esi
xor    %edx,%edx
mov    $0xffffffff,%ecx
mov    $0x0,%al
call   1030 <syscall@plt>
mov    $0xffffffffffffffff,%rdi
call   1050 <adjtimex@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    0x2e4b(%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    0x2e48(%rip),%rax
mov    (%rax),%edi
mov    %rax,%rbp
mov    0x2dec(%rip),%r14
mov    (%r14),%esi
mov    %rsp,%rbx
mov    %rbx,%rdx
xor    %eax,%eax
call   1030 <syscall@plt>
mov    0x2ded(%rip),%r12
mov    (%r12),%edi
mov    (%r14),%esi
mov    %rbx,%rdx
xor    %eax,%eax
call   1030 <syscall@plt>
mov    0x2e05(%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    0x2d9f(%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    0x2d9a(%rip),%rbp
mov    0x0(%rbp),%edi
mov    0x2d70(%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    0x2d3a(%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    0x2cbe(%rip),%r15
mov    (%r15),%edi
mov    (%r14),%esi
mov    0x2cd1(%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    0x2c57(%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>
mov    $0xffffffffffffffff,%rdi
call   1050 <adjtimex@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.timex = type { i32 }
%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 %struct.timex
%6 = alloca i32
store i32 0, i32* %1
%7 = load i32, i32* @SYS_gettimeofday
%8 = ptrtoint %struct.timeval* %3 to i32
%9 = call i32 (i32, i32, ...) @syscall(i32 %7, i32 %8, i8* null)
store i32 %9, i32* %2
%10 = call i32 @settimeofday(%struct.timeval* %3, %struct.timezone* null)
%11 = call i32 @settimeofday(%struct.timeval* inttoptr (i64 -1 to %struct.timeval*), %struct.timezone* null)
%12 = call i32 @settimeofday(%struct.timeval* %3, %struct.timezone* inttoptr (i64 -1 to %struct.timezone*))
%13 = load i32, i32* @SYS_gettimeofday
%14 = call i32 (i32, i32, ...) @syscall(i32 %13, i32 -1, i8* null)
%15 = load i32, i32* @SYS_gettimeofday
%16 = ptrtoint %struct.timeval* %3 to i32
%17 = call i32 (i32, i32, ...) @syscall(i32 %15, i32 %16, i32 -1)
%18 = load i32, i32* @SYS_clock_gettime
%19 = load i32, i32* @CLOCK_REALTIME
%20 = call i32 (i32, i32, ...) @syscall(i32 %18, i32 %19, %struct.timespec* %4)
%21 = load i32, i32* @SYS_clock_settime
%22 = load i32, i32* @CLOCK_REALTIME
%23 = call i32 (i32, i32, ...) @syscall(i32 %21, i32 %22, %struct.timespec* %4)
%24 = load i32, i32* @SYS_clock_getres
%25 = load i32, i32* @CLOCK_REALTIME
%26 = call i32 (i32, i32, ...) @syscall(i32 %24, i32 %25, %struct.timespec* %4)
%27 = load i32, i32* @SYS_clock_getres
%28 = call i32 (i32, i32, ...) @syscall(i32 %27, i32 -1, %struct.timespec* %4)
%29 = load i32, i32* @SYS_clock_getres
%30 = load i32, i32* @CLOCK_REALTIME
%31 = call i32 (i32, i32, ...) @syscall(i32 %29, i32 %30, i32 -1)
%32 = load i32, i32* @SYS_clock_gettime
%33 = load i32, i32* @CLOCK_MONOTONIC
%34 = call i32 (i32, i32, ...) @syscall(i32 %32, i32 %33, %struct.timespec* %4)
%35 = load i32, i32* @SYS_clock_settime
%36 = load i32, i32* @CLOCK_MONOTONIC
%37 = call i32 (i32, i32, ...) @syscall(i32 %35, i32 %36, %struct.timespec* %4)
%38 = load i32, i32* @SYS_clock_getres
%39 = load i32, i32* @CLOCK_MONOTONIC
%40 = call i32 (i32, i32, ...) @syscall(i32 %38, i32 %39, %struct.timespec* %4)
%41 = load i32, i32* @SYS_clock_gettime
%42 = load i32, i32* @CLOCK_PROCESS_CPUTIME_ID
%43 = call i32 (i32, i32, ...) @syscall(i32 %41, i32 %42, %struct.timespec* %4)
%44 = load i32, i32* @SYS_clock_settime
%45 = load i32, i32* @CLOCK_PROCESS_CPUTIME_ID
%46 = call i32 (i32, i32, ...) @syscall(i32 %44, i32 %45, %struct.timespec* %4)
%47 = load i32, i32* @SYS_clock_getres
%48 = load i32, i32* @CLOCK_PROCESS_CPUTIME_ID
%49 = call i32 (i32, i32, ...) @syscall(i32 %47, i32 %48, %struct.timespec* %4)
%50 = load i32, i32* @SYS_clock_gettime
%51 = load i32, i32* @CLOCK_THREAD_CPUTIME_ID
%52 = call i32 (i32, i32, ...) @syscall(i32 %50, i32 %51, %struct.timespec* %4)
%53 = load i32, i32* @SYS_clock_settime
%54 = load i32, i32* @CLOCK_THREAD_CPUTIME_ID
%55 = call i32 (i32, i32, ...) @syscall(i32 %53, i32 %54, %struct.timespec* %4)
%56 = load i32, i32* @SYS_clock_getres
%57 = load i32, i32* @CLOCK_THREAD_CPUTIME_ID
%58 = call i32 (i32, i32, ...) @syscall(i32 %56, i32 %57, %struct.timespec* %4)
%59 = load i32, i32* @SYS_clock_gettime
%60 = load i32, i32* @CLOCK_REALTIME
%61 = call i32 (i32, i32, ...) @syscall(i32 %59, i32 %60, %struct.timespec* %4)
%62 = getelementptr inbounds %struct.timespec, %struct.timespec* %4, i32 0, i32 1
%63 = load i64, i64* %62
%64 = add nsw i64 %63, 1
store i64 %64, i64* %62
%65 = load i32, i32* @SYS_clock_nanosleep
%66 = load i32, i32* @CLOCK_REALTIME
%67 = load i32, i32* @TIMER_ABSTIME
%68 = call i32 (i32, i32, ...) @syscall(i32 %65, i32 %66, i32 %67, %struct.timespec* %4)
%69 = getelementptr inbounds %struct.timespec, %struct.timespec* %4, i32 0, i32 1
store i64 0, i64* %69
%70 = getelementptr inbounds %struct.timespec, %struct.timespec* %4, i32 0, i32 0
store i32 10000, i32* %70
%71 = load i32, i32* @SYS_clock_nanosleep
%72 = load i32, i32* @CLOCK_REALTIME
%73 = call i32 (i32, i32, ...) @syscall(i32 %71, i32 %72, i32 0, %struct.timespec* %4)
%74 = load i32, i32* @SYS_clock_gettime
%75 = call i32 (i32, i32, ...) @syscall(i32 %74, i32 -1, %struct.timespec* %4)
%76 = load i32, i32* @SYS_clock_gettime
%77 = load i32, i32* @CLOCK_REALTIME
%78 = call i32 (i32, i32, ...) @syscall(i32 %76, i32 %77, i32 -1)
%79 = load i32, i32* @SYS_clock_settime
%80 = call i32 (i32, i32, ...) @syscall(i32 %79, i32 -1, %struct.timespec* %4)
%81 = load i32, i32* @SYS_clock_settime
%82 = load i32, i32* @CLOCK_MONOTONIC
%83 = call i32 (i32, i32, ...) @syscall(i32 %81, i32 %82, i32 -1)
%84 = getelementptr inbounds %struct.timespec, %struct.timespec* %4, i32 0, i32 1
store i64 0, i64* %84
%85 = getelementptr inbounds %struct.timespec, %struct.timespec* %4, i32 0, i32 0
store i32 10000, i32* %85
%86 = load i32, i32* @SYS_clock_nanosleep
%87 = call i32 (i32, i32, ...) @syscall(i32 %86, i32 -1, i32 0, %struct.timespec* %4)
%88 = getelementptr inbounds %struct.timespec, %struct.timespec* %4, i32 0, i32 1
store i64 0, i64* %88
%89 = getelementptr inbounds %struct.timespec, %struct.timespec* %4, i32 0, i32 0
store i32 10000, i32* %89
%90 = load i32, i32* @SYS_clock_nanosleep
%91 = load i32, i32* @CLOCK_REALTIME
%92 = call i32 (i32, i32, ...) @syscall(i32 %90, i32 %91, i32 -1, %struct.timespec* %4)
%93 = getelementptr inbounds %struct.timespec, %struct.timespec* %4, i32 0, i32 1
store i64 0, i64* %93
%94 = getelementptr inbounds %struct.timespec, %struct.timespec* %4, i32 0, i32 0
store i32 10000, i32* %94
%95 = load i32, i32* @SYS_clock_nanosleep
%96 = load i32, i32* @CLOCK_REALTIME
%97 = call i32 (i32, i32, ...) @syscall(i32 %95, i32 %96, i32 0, i32 -1)
%98 = call i32 @adjtimex(%struct.timex* inttoptr (i64 -1 to %struct.timex*))
ret i32 0
}

LLVM IR (-O2):
%struct.timeval = type { i32 }
%struct.timespec = type { i32, i64 }
%struct.timezone = type { i32 }
%struct.timex = 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)
%89 = call i32 @adjtimex(%struct.timex* inttoptr (i64 -1 to %struct.timex*))
ret i32 0
}