#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_4__ TYPE_2__;
typedef struct TYPE_3__ TYPE_1__;

/* Type definitions */
struct TYPE_4__ {
  scalar_t__ tv_usec;
  scalar_t__ tv_sec;
};
struct TYPE_3__ {
  scalar_t__ tv_usec;
  scalar_t__ tv_sec;
};
struct itimerval {
  TYPE_2__ it_value;
  TYPE_1__ it_interval;
};

/* Variables and functions */
int /*<<< orphan*/ ITIMER_REAL;
int /*<<< orphan*/ SIGALRM;
int /*<<< orphan*/ SIG_IGN;
int /*<<< orphan*/ setitimer(int /*<<< orphan*/, struct itimerval *,
                             int /*<<< orphan*/);
int /*<<< orphan*/ signal(int /*<<< orphan*/, int /*<<< orphan*/);
void disable_timers(void) {
  struct itimerval it;
  signal(SIGALRM, SIG_IGN);
  it.it_interval.tv_sec = 0;
  it.it_interval.tv_usec = 0;
  it.it_value.tv_sec = 0;
  it.it_value.tv_usec = 0;
  setitimer(ITIMER_REAL, &it, 0);
}


x86 assembly (clang, -O0):
<disable_timers>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    0x2eb9(%rip),%rax
mov    (%rax),%edi
mov    0x2ea8(%rip),%rax
mov    (%rax),%esi
call   1030 <signal@plt>
movq   $0x0,-0x8(%rbp)
movq   $0x0,-0x10(%rbp)
movq   $0x0,-0x18(%rbp)
movq   $0x0,-0x20(%rbp)
mov    0x2e6a(%rip),%rax
mov    (%rax),%edi
lea    -0x20(%rbp),%rsi
xor    %edx,%edx
call   1040 <setitimer@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<disable_timers>:
sub    $0x28,%rsp
mov    0x2ebd(%rip),%rax
mov    (%rax),%edi
mov    0x2eac(%rip),%rax
mov    (%rax),%esi
call   1030 <signal@plt>
xorps  %xmm0,%xmm0
movaps %xmm0,(%rsp)
movaps %xmm0,0x10(%rsp)
mov    0x2e82(%rip),%rax
mov    (%rax),%edi
mov    %rsp,%rsi
xor    %edx,%edx
call   1040 <setitimer@plt>
add    $0x28,%rsp
ret

LLVM IR (-O0):
%struct.itimerval = type { %struct.TYPE_4__, %struct.TYPE_3__ }
%struct.TYPE_4__ = type { i64, i64 }
%struct.TYPE_3__ = type { i64, i64 }
@SIGALRM = global i32 0
@SIG_IGN = global i32 0
@ITIMER_REAL = global i32 0
define void @disable_timers() {
%1 = alloca %struct.itimerval
%2 = load i32, i32* @SIGALRM
%3 = load i32, i32* @SIG_IGN
%4 = call i32 @signal(i32 %2, i32 %3)
%5 = getelementptr inbounds %struct.itimerval, %struct.itimerval* %1, i32 0, i32 1
%6 = getelementptr inbounds %struct.TYPE_3__, %struct.TYPE_3__* %5, i32 0, i32 1
store i64 0, i64* %6
%7 = getelementptr inbounds %struct.itimerval, %struct.itimerval* %1, i32 0, i32 1
%8 = getelementptr inbounds %struct.TYPE_3__, %struct.TYPE_3__* %7, i32 0, i32 0
store i64 0, i64* %8
%9 = getelementptr inbounds %struct.itimerval, %struct.itimerval* %1, i32 0, i32 0
%10 = getelementptr inbounds %struct.TYPE_4__, %struct.TYPE_4__* %9, i32 0, i32 1
store i64 0, i64* %10
%11 = getelementptr inbounds %struct.itimerval, %struct.itimerval* %1, i32 0, i32 0
%12 = getelementptr inbounds %struct.TYPE_4__, %struct.TYPE_4__* %11, i32 0, i32 0
store i64 0, i64* %12
%13 = load i32, i32* @ITIMER_REAL
%14 = call i32 @setitimer(i32 %13, %struct.itimerval* %1, i32 0)
ret void
}

LLVM IR (-O2):
%struct.itimerval = type { %struct.TYPE_4__, %struct.TYPE_3__ }
%struct.TYPE_4__ = type { i64, i64 }
%struct.TYPE_3__ = type { i64, i64 }
@SIGALRM = global i32 0
@SIG_IGN = global i32 0
@ITIMER_REAL = global i32 0
define void @disable_timers() {
%1 = alloca %struct.itimerval
%2 = bitcast %struct.itimerval* %1 to i8*
%3 = load i32, i32* @SIGALRM
%4 = load i32, i32* @SIG_IGN
%5 = tail call i32 @signal(i32 %3, i32 %4)
%6 = bitcast %struct.itimerval* %1 to i8*
%7 = load i32, i32* @ITIMER_REAL
%8 = call i32 @setitimer(i32 %7, %struct.itimerval* %1, i32 0)
ret void
}