#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_interval;
  TYPE_1__ it_value;
};

/* Variables and functions */
int /*<<< orphan*/ ITIMER_REAL;
int errno;
int /*<<< orphan*/ setitimer(int /*<<< orphan*/, struct itimerval *,
                             int /*<<< orphan*/ *);
void stop_timeout_timer(void) {
  struct itimerval ival;
  int olderr = errno;
  ival.it_value.tv_sec = ival.it_value.tv_usec = 0;
  ival.it_interval.tv_sec = ival.it_interval.tv_usec = 0;
  setitimer(ITIMER_REAL, &ival, NULL);
  errno = olderr;
}


x86 assembly (clang, -O0):
<stop_timeout_timer>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    0x2eb9(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x24(%rbp)
movq   $0x0,-0x10(%rbp)
movq   $0x0,-0x8(%rbp)
movq   $0x0,-0x20(%rbp)
movq   $0x0,-0x18(%rbp)
mov    0x2e95(%rip),%rax
mov    (%rax),%edi
lea    -0x20(%rbp),%rsi
xor    %eax,%eax
mov    %eax,%edx
call   1030 <setitimer@plt>
mov    -0x24(%rbp),%ecx
mov    0x2e74(%rip),%rax
mov    %ecx,(%rax)
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<stop_timeout_timer>:
push   %rbp
push   %rbx
sub    $0x28,%rsp
mov    0x2ebb(%rip),%rbx
mov    (%rbx),%ebp
xorps  %xmm0,%xmm0
movaps %xmm0,(%rsp)
movaps %xmm0,0x10(%rsp)
mov    0x2eae(%rip),%rax
mov    (%rax),%edi
mov    %rsp,%rsi
xor    %edx,%edx
call   1030 <setitimer@plt>
mov    %ebp,(%rbx)
add    $0x28,%rsp
pop    %rbx
pop    %rbp
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 }
@errno = global i32 0
@ITIMER_REAL = global i32 0
define void @stop_timeout_timer() {
%1 = alloca %struct.itimerval
%2 = alloca i32
%3 = load i32, i32* @errno
store i32 %3, i32* %2
%4 = getelementptr inbounds %struct.itimerval, %struct.itimerval* %1, i32 0, i32 1
%5 = getelementptr inbounds %struct.TYPE_3__, %struct.TYPE_3__* %4, i32 0, i32 0
store i64 0, i64* %5
%6 = getelementptr inbounds %struct.itimerval, %struct.itimerval* %1, i32 0, i32 1
%7 = getelementptr inbounds %struct.TYPE_3__, %struct.TYPE_3__* %6, i32 0, i32 1
store i64 0, i64* %7
%8 = getelementptr inbounds %struct.itimerval, %struct.itimerval* %1, i32 0, i32 0
%9 = getelementptr inbounds %struct.TYPE_4__, %struct.TYPE_4__* %8, i32 0, i32 0
store i64 0, i64* %9
%10 = getelementptr inbounds %struct.itimerval, %struct.itimerval* %1, i32 0, i32 0
%11 = getelementptr inbounds %struct.TYPE_4__, %struct.TYPE_4__* %10, i32 0, i32 1
store i64 0, i64* %11
%12 = load i32, i32* @ITIMER_REAL
%13 = call i32 @setitimer(i32 %12, %struct.itimerval* %1, i32* null)
%14 = load i32, i32* %2
store i32 %14, i32* @errno
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 }
@errno = global i32 0
@ITIMER_REAL = global i32 0
define void @stop_timeout_timer() {
%1 = alloca %struct.itimerval
%2 = bitcast %struct.itimerval* %1 to i8*
%3 = load i32, i32* @errno
%4 = bitcast %struct.itimerval* %1 to i8*
%5 = load i32, i32* @ITIMER_REAL
%6 = call i32 @setitimer(i32 %5, %struct.itimerval* %1, i32* null)
store i32 %3, i32* @errno
ret void
}