#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 SIGTERM;
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ system_log(char *, char *, int, char *, ...);
void sig_exit(int signo) {
  if (signo == SIGTERM) {
    system_log("<D>",
               "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/"
               "outputs/2022-01-22/02-19-57/repos/hfs/afd/refs/heads/master/"
               "src/init_afd/init_afd.c",
               2614, ("Received SIGTERM!"));
  } else if (signo == SIGINT) {
    system_log("<D>",
               "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/"
               "outputs/2022-01-22/02-19-57/repos/hfs/afd/refs/heads/master/"
               "src/init_afd/init_afd.c",
               2618, ("Received SIGINT!"));
  } else {
    system_log("<D>",
               "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/"
               "outputs/2022-01-22/02-19-57/repos/hfs/afd/refs/heads/master/"
               "src/init_afd/init_afd.c",
               2622, ("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    0x2eab(%rip),%rcx
cmp    (%rcx),%eax
jne    1163 <sig_exit+0x43>
lea    0xebc(%rip),%rdi
lea    0xeb9(%rip),%rsi
mov    $0xa36,%edx
lea    0xf39(%rip),%rcx
mov    $0x0,%al
call   1030 <system_log@plt>
jmp    11c5 <sig_exit+0xa5>
mov    -0x4(%rbp),%eax
mov    0x2e7b(%rip),%rcx
cmp    (%rcx),%eax
jne    119b <sig_exit+0x7b>
lea    0xe84(%rip),%rdi
lea    0xe81(%rip),%rsi
mov    $0xa3a,%edx
lea    0xf13(%rip),%rcx
mov    $0x0,%al
call   1030 <system_log@plt>
jmp    11c0 <sig_exit+0xa0>
mov    -0x4(%rbp),%r8d
lea    0xe5a(%rip),%rdi
lea    0xe57(%rip),%rsi
mov    $0xa3e,%edx
lea    0xefa(%rip),%rcx
mov    $0x0,%al
call   1030 <system_log@plt>
jmp    11c5 <sig_exit+0xa5>
mov    $0xffffffff,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<sig_exit>:
push   %rax
mov    0x2eb8(%rip),%rax
cmp    %edi,(%rax)
jne    1148 <sig_exit+0x28>
lea    0xecd(%rip),%rdi
lea    0xeca(%rip),%rsi
lea    0xf4f(%rip),%rcx
mov    $0xa36,%edx
jmp    1170 <sig_exit+0x50>
mov    %edi,%r8d
mov    0x2e96(%rip),%rax
cmp    %edi,(%rax)
jne    1181 <sig_exit+0x61>
lea    0xea3(%rip),%rdi
lea    0xea0(%rip),%rsi
lea    0xf37(%rip),%rcx
mov    $0xa3a,%edx
xor    %eax,%eax
call   1030 <system_log@plt>
mov    $0xffffffff,%edi
call   1040 <exit@plt>
lea    0xe78(%rip),%rdi
lea    0xe75(%rip),%rsi
lea    0xf1d(%rip),%rcx
mov    $0xa3e,%edx
xor    %eax,%eax
call   1030 <system_log@plt>
mov    $0xffffffff,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@SIGTERM = global i32 0
@.str = [4 x i8] c"<D>\00"
@.str.1 = [140 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/hfs/afd/refs/heads/master/src/init_afd/init_afd.c\00"
@.str.2 = [18 x i8] c"Received SIGTERM!\00"
@SIGINT = global i32 0
@.str.3 = [17 x i8] c"Received SIGINT!\00"
@.str.4 = [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* @SIGTERM
%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 ([140 x i8], [140 x i8]* @.str.1, i64 0, i64 0), i32 2614, i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.2, i64 0, i64 0))
br label %18
8: ; preds = %1
%9 = load i32, i32* %2
%10 = load i32, i32* @SIGINT
%11 = icmp eq i32 %9, %10
br i1 %11, label %12, label %14
12: ; preds = %8
%13 = 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 ([140 x i8], [140 x i8]* @.str.1, i64 0, i64 0), i32 2618, i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.3, i64 0, i64 0))
br label %17
14: ; preds = %8
%15 = load i32, i32* %2
%16 = 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 ([140 x i8], [140 x i8]* @.str.1, i64 0, i64 0), i32 2622, i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.4, i64 0, i64 0), i32 %15)
br label %17
17: ; preds = %14, %12
br label %18
18: ; preds = %17, %6
%19 = call i32 @exit(i32 -1)
unreachable
}

LLVM IR (-O2):
@SIGTERM = global i32 0
@.str = [4 x i8] c"<D>\00"
@.str.1 = [140 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/hfs/afd/refs/heads/master/src/init_afd/init_afd.c\00"
@.str.2 = [18 x i8] c"Received SIGTERM!\00"
@SIGINT = global i32 0
@.str.3 = [17 x i8] c"Received SIGINT!\00"
@.str.4 = [13 x i8] c"Received %d!\00"
define void @sig_exit(i32 %0) {
%2 = load i32, i32* @SIGTERM
%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 ([140 x i8], [140 x i8]* @.str.1, i64 0, i64 0), i32 2614, i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.2, i64 0, i64 0))
br label %13
6: ; preds = %1
%7 = load i32, i32* @SIGINT
%8 = icmp eq i32 %7, %0
br i1 %8, label %9, label %11
9: ; preds = %6
%10 = 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 ([140 x i8], [140 x i8]* @.str.1, i64 0, i64 0), i32 2618, i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.3, i64 0, i64 0))
br label %13
11: ; preds = %6
%12 = 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 ([140 x i8], [140 x i8]* @.str.1, i64 0, i64 0), i32 2622, i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.4, i64 0, i64 0), i32 %0)
br label %13
13: ; preds = %9, %11, %4
%14 = tail call i32 @exit(i32 -1)
unreachable
}