#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__ {
  int tv_sec;
  scalar_t__ tv_usec;
};
struct TYPE_3__ {
  int tv_sec;
  scalar_t__ tv_usec;
};
struct itimerval {
  TYPE_2__ it_value;
  TYPE_1__ it_interval;
};

/* Variables and functions */
int /*<<< orphan*/ ITIMER_REAL;
int /*<<< orphan*/ err_msg(char *);
int setitimer(int /*<<< orphan*/, struct itimerval *, int /*<<< orphan*/ *);
void dlinfo_alarm_launch(void) {
  struct itimerval new;
  new.it_interval.tv_sec = 1;
  new.it_interval.tv_usec = 0;
  new.it_value.tv_sec = 1;
  new.it_value.tv_usec = 0;
  if (setitimer(ITIMER_REAL, &new, NULL) == -1)
    err_msg("setitimer");
}


x86 assembly (clang, -O0):
<dlinfo_alarm_launch>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x1,-0x10(%rbp)
movq   $0x0,-0x8(%rbp)
movl   $0x1,-0x20(%rbp)
movq   $0x0,-0x18(%rbp)
mov    0x2e93(%rip),%rax
mov    (%rax),%edi
lea    -0x20(%rbp),%rsi
xor    %eax,%eax
mov    %eax,%edx
call   1030 <setitimer@plt>
cmp    $0xffffffff,%eax
jne    1171 <dlinfo_alarm_launch+0x51>
lea    0xe94(%rip),%rdi
call   1040 <err_msg@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<dlinfo_alarm_launch>:
sub    $0x28,%rsp
movl   $0x1,0x18(%rsp)
movq   $0x0,0x20(%rsp)
movl   $0x1,0x8(%rsp)
movq   $0x0,0x10(%rsp)
mov    0x2e93(%rip),%rax
mov    (%rax),%edi
lea    0x8(%rsp),%rsi
xor    %edx,%edx
call   1030 <setitimer@plt>
cmp    $0xffffffff,%eax
je     1165 <dlinfo_alarm_launch+0x45>
add    $0x28,%rsp
ret
lea    0xe94(%rip),%rdi
add    $0x28,%rsp
jmp    1040 <err_msg@plt>

LLVM IR (-O0):
%struct.itimerval = type { %struct.TYPE_4__, %struct.TYPE_3__ }
%struct.TYPE_4__ = type { i32, i64 }
%struct.TYPE_3__ = type { i32, i64 }
@ITIMER_REAL = global i32 0
@.str = [10 x i8] c"setitimer\00"
define void @dlinfo_alarm_launch() {
%1 = alloca %struct.itimerval
%2 = getelementptr inbounds %struct.itimerval, %struct.itimerval* %1, i32 0, i32 1
%3 = getelementptr inbounds %struct.TYPE_3__, %struct.TYPE_3__* %2, i32 0, i32 0
store i32 1, i32* %3
%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 1
store i64 0, i64* %5
%6 = getelementptr inbounds %struct.itimerval, %struct.itimerval* %1, i32 0, i32 0
%7 = getelementptr inbounds %struct.TYPE_4__, %struct.TYPE_4__* %6, i32 0, i32 0
store i32 1, i32* %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 1
store i64 0, i64* %9
%10 = load i32, i32* @ITIMER_REAL
%11 = call i32 @setitimer(i32 %10, %struct.itimerval* %1, i32* null)
%12 = icmp eq i32 %11, -1
br i1 %12, label %13, label %15
13: ; preds = %0
%14 = call i32 @err_msg(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0))
br label %15
15: ; preds = %13, %0
ret void
}

LLVM IR (-O2):
%struct.itimerval = type { %struct.TYPE_4__, %struct.TYPE_3__ }
%struct.TYPE_4__ = type { i32, i64 }
%struct.TYPE_3__ = type { i32, i64 }
@ITIMER_REAL = global i32 0
@.str = [10 x i8] c"setitimer\00"
define void @dlinfo_alarm_launch() {
%1 = alloca %struct.itimerval
%2 = bitcast %struct.itimerval* %1 to i8*
%3 = getelementptr inbounds %struct.itimerval, %struct.itimerval* %1, i64 0, i32 1, i32 0
store i32 1, i32* %3
%4 = getelementptr inbounds %struct.itimerval, %struct.itimerval* %1, i64 0, i32 1, i32 1
store i64 0, i64* %4
%5 = getelementptr inbounds %struct.itimerval, %struct.itimerval* %1, i64 0, i32 0, i32 0
store i32 1, i32* %5
%6 = getelementptr inbounds %struct.itimerval, %struct.itimerval* %1, i64 0, i32 0, i32 1
store i64 0, i64* %6
%7 = load i32, i32* @ITIMER_REAL
%8 = call i32 @setitimer(i32 %7, %struct.itimerval* %1, i32* null)
%9 = icmp eq i32 %8, -1
br i1 %9, label %10, label %12
10: ; preds = %0
%11 = tail call i32 @err_msg(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0))
br label %12
12: ; preds = %10, %0
ret void
}