#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 */

/* Variables and functions */
int SIGINT;
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ system_log(char *, char *, int, char *, ...);
void sig_exit(int signo) {
  if (signo == SIGINT) {
    system_log("<D>",
               "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/"
               "outputs/2022-01-22/02-19-57/repos/holger24/AFD/refs/heads/"
               "master/src/init_afd/init_afd_worker.c",
               920, ("Received SIGINT!"));
  } else {
    system_log("<D>",
               "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/"
               "outputs/2022-01-22/02-19-57/repos/holger24/AFD/refs/heads/"
               "master/src/init_afd/init_afd_worker.c",
               924, ("Received %d!"), signo);
  }
  exit(-1);
}


x86 assembly (clang, -O0):
<sig_exit>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
mov    0x2eb3(%rip),%rcx
cmp    (%rcx),%eax
jne    1163 <sig_exit+0x43>
lea    0xebc(%rip),%rdi
lea    0xeb9(%rip),%rsi
mov    $0x398,%edx
lea    0xf45(%rip),%rcx
mov    $0x0,%al
call   1030 <system_log@plt>
jmp    1188 <sig_exit+0x68>
mov    -0x4(%rbp),%r8d
lea    0xe92(%rip),%rdi
lea    0xe8f(%rip),%rsi
mov    $0x39c,%edx
lea    0xf2c(%rip),%rcx
mov    $0x0,%al
call   1030 <system_log@plt>
mov    $0xffffffff,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<sig_exit>:
push   %rax
mov    0x2ec0(%rip),%rax
cmp    %edi,(%rax)
jne    1157 <sig_exit+0x37>
lea    0xecd(%rip),%rdi
lea    0xeca(%rip),%rsi
lea    0xf5b(%rip),%rcx
mov    $0x398,%edx
xor    %eax,%eax
call   1030 <system_log@plt>
mov    $0xffffffff,%edi
call   1040 <exit@plt>
mov    %edi,%r8d
lea    0xe9f(%rip),%rdi
lea    0xe9c(%rip),%rsi
lea    0xf3e(%rip),%rcx
mov    $0x39c,%edx
xor    %eax,%eax
call   1030 <system_log@plt>
mov    $0xffffffff,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@SIGINT = global i32 0
@.str = [4 x i8] c"<D>\00"
@.str.1 = [152 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/holger24/AFD/refs/heads/master/src/init_afd/init_afd_worker.c\00"
@.str.2 = [17 x i8] c"Received SIGINT!\00"
@.str.3 = [13 x i8] c"Received %d!\00"
define void @sig_exit(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = load i32, i32* @SIGINT
%5 = icmp eq i32 %3, %4
br i1 %5, label %6, label %8
6: ; preds = %1
%7 = call i32 (i8*, i8*, i32, i8*, ...) @system_log(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([152 x i8], [152 x i8]* @.str.1, i64 0, i64 0), i32 920, i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.2, i64 0, i64 0))
br label %11
8: ; preds = %1
%9 = load i32, i32* %2
%10 = call i32 (i8*, i8*, i32, i8*, ...) @system_log(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([152 x i8], [152 x i8]* @.str.1, i64 0, i64 0), i32 924, i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.3, i64 0, i64 0), i32 %9)
br label %11
11: ; preds = %8, %6
%12 = call i32 @exit(i32 -1)
unreachable
}

LLVM IR (-O2):
@SIGINT = global i32 0
@.str = [4 x i8] c"<D>\00"
@.str.1 = [152 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/holger24/AFD/refs/heads/master/src/init_afd/init_afd_worker.c\00"
@.str.2 = [17 x i8] c"Received SIGINT!\00"
@.str.3 = [13 x i8] c"Received %d!\00"
define void @sig_exit(i32 %0) {
%2 = load i32, i32* @SIGINT
%3 = icmp eq i32 %2, %0
br i1 %3, label %4, label %6
4: ; preds = %1
%5 = tail call i32 (i8*, i8*, i32, i8*, ...) @system_log(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([152 x i8], [152 x i8]* @.str.1, i64 0, i64 0), i32 920, i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.2, i64 0, i64 0))
br label %8
6: ; preds = %1
%7 = tail call i32 (i8*, i8*, i32, i8*, ...) @system_log(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([152 x i8], [152 x i8]* @.str.1, i64 0, i64 0), i32 924, i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.3, i64 0, i64 0), i32 %0)
br label %8
8: ; preds = %6, %4
%9 = tail call i32 @exit(i32 -1)
unreachable
}