#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 */
typedef struct TYPE_2__ TYPE_1__;

/* Type definitions */
typedef int suseconds_t;
struct TYPE_2__ {
  int tv_usec;
  scalar_t__ tv_sec;
};
struct itimerval {
  TYPE_1__ it_value;
  TYPE_1__ it_interval;
};

/* Variables and functions */
int /*<<< orphan*/ ITIMER_REAL;
int /*<<< orphan*/ xsetitimer(int /*<<< orphan*/, struct itimerval *,
                              int /*<<< orphan*/);
void timer_start(void) {
  struct itimerval it;
  it.it_value.tv_sec = 0;
  it.it_value.tv_usec = ((suseconds_t)1000 * 1000 / 10);
  it.it_interval = it.it_value;
  xsetitimer(ITIMER_REAL, &it, 0);
}


x86 assembly (clang, -O0):
<timer_start>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movq   $0x0,-0x18(%rbp)
movl   $0x186a0,-0x20(%rbp)
mov    -0x20(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x18(%rbp),%rax
mov    %rax,-0x8(%rbp)
mov    0x2ea2(%rip),%rax
mov    (%rax),%edi
lea    -0x20(%rbp),%rsi
xor    %edx,%edx
call   1030 <xsetitimer@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<timer_start>:
sub    $0x28,%rsp
movq   $0x0,0x10(%rsp)
movl   $0x186a0,0x8(%rsp)
mov    0x8(%rsp),%eax
mov    %eax,0x18(%rsp)
mov    0xc(%rsp),%eax
mov    %eax,0x1c(%rsp)
mov    0x10(%rsp),%rax
mov    %rax,0x20(%rsp)
mov    0x2e9a(%rip),%rax
mov    (%rax),%edi
lea    0x8(%rsp),%rsi
xor    %edx,%edx
call   1030 <xsetitimer@plt>
add    $0x28,%rsp
ret

LLVM IR (-O0):
%struct.itimerval = type { %struct.TYPE_2__, %struct.TYPE_2__ }
%struct.TYPE_2__ = type { i32, i64 }
@ITIMER_REAL = global i32 0
define void @timer_start() {
%1 = alloca %struct.itimerval
%2 = getelementptr inbounds %struct.itimerval, %struct.itimerval* %1, i32 0, i32 0
%3 = getelementptr inbounds %struct.TYPE_2__, %struct.TYPE_2__* %2, i32 0, i32 1
store i64 0, i64* %3
%4 = getelementptr inbounds %struct.itimerval, %struct.itimerval* %1, i32 0, i32 0
%5 = getelementptr inbounds %struct.TYPE_2__, %struct.TYPE_2__* %4, i32 0, i32 0
store i32 100000, i32* %5
%6 = getelementptr inbounds %struct.itimerval, %struct.itimerval* %1, i32 0, i32 1
%7 = getelementptr inbounds %struct.itimerval, %struct.itimerval* %1, i32 0, i32 0
%8 = bitcast %struct.TYPE_2__* %6 to i8*
%9 = bitcast %struct.TYPE_2__* %7 to i8*
%10 = load i32, i32* @ITIMER_REAL
%11 = call i32 @xsetitimer(i32 %10, %struct.itimerval* %1, i32 0)
ret void
}

LLVM IR (-O2):
%struct.itimerval = type { %struct.TYPE_2__, %struct.TYPE_2__ }
%struct.TYPE_2__ = type { i32, i64 }
@ITIMER_REAL = global i32 0
define void @timer_start() {
%1 = alloca %struct.itimerval
%2 = bitcast %struct.itimerval* %1 to i8*
%3 = getelementptr inbounds %struct.itimerval, %struct.itimerval* %1, i64 0, i32 0, i32 1
store i64 0, i64* %3
%4 = getelementptr inbounds %struct.itimerval, %struct.itimerval* %1, i64 0, i32 0, i32 0
store i32 100000, i32* %4
%5 = getelementptr inbounds %struct.itimerval, %struct.itimerval* %1, i64 0, i32 1
%6 = bitcast %struct.TYPE_2__* %5 to i8*
%7 = load i32, i32* @ITIMER_REAL
%8 = call i32 @xsetitimer(i32 %7, %struct.itimerval* %1, i32 0)
ret void
}