#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 SIGSEGV;
char *gettext(char *);
int /*<<< orphan*/ printf(char *);
void myCatch(int numS) {
  if (numS == SIGINT) {
    printf(
        gettext("\nSorry, you can not exit with the key combination Ctrl + C"));
    printf(gettext("\nTry the default setting\n\n"));
  }
  if (numS == SIGSEGV) {
    printf(gettext("\nError:"));
    printf(gettext("\nSegmentation fault\n\n"));
  }
}


x86 assembly (clang, -O0):
<myCatch>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
mov    0x2eab(%rip),%rcx
cmp    (%rcx),%eax
jne    1165 <myCatch+0x45>
lea    0xebc(%rip),%rdi
call   1030 <gettext@plt>
mov    %rax,%rdi
call   1040 <printf@plt>
lea    0xee3(%rip),%rdi
call   1030 <gettext@plt>
mov    %rax,%rdi
call   1040 <printf@plt>
mov    -0x4(%rbp),%eax
mov    0x2e79(%rip),%rcx
cmp    (%rcx),%eax
jne    119f <myCatch+0x7f>
lea    0xed8(%rip),%rdi
call   1030 <gettext@plt>
mov    %rax,%rdi
call   1040 <printf@plt>
lea    0xecc(%rip),%rdi
call   1030 <gettext@plt>
mov    %rax,%rdi
call   1040 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<myCatch>:
push   %rbx
mov    %edi,%ebx
mov    0x2eb6(%rip),%rax
cmp    %edi,(%rax)
jne    1156 <myCatch+0x36>
lea    0xecb(%rip),%rdi
call   1030 <gettext@plt>
mov    %rax,%rdi
call   1040 <printf@plt>
lea    0xef2(%rip),%rdi
call   1030 <gettext@plt>
mov    %rax,%rdi
call   1040 <printf@plt>
mov    0x2e8b(%rip),%rax
cmp    %ebx,(%rax)
jne    118a <myCatch+0x6a>
lea    0xeee(%rip),%rdi
call   1030 <gettext@plt>
mov    %rax,%rdi
call   1040 <printf@plt>
lea    0xee2(%rip),%rdi
call   1030 <gettext@plt>
mov    %rax,%rdi
pop    %rbx
jmp    1040 <printf@plt>
pop    %rbx
ret

LLVM IR (-O0):
@SIGINT = global i32 0
@.str = [59 x i8] c"\0ASorry, you can not exit with the key combination Ctrl + C\00"
@.str.1 = [27 x i8] c"\0ATry the default setting\0A\0A\00"
@SIGSEGV = global i32 0
@.str.2 = [8 x i8] c"\0AError:\00"
@.str.3 = [22 x i8] c"\0ASegmentation fault\0A\0A\00"
define void @myCatch(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 %11
6: ; preds = %1
%7 = call i8* @gettext(i8* getelementptr inbounds ([59 x i8], [59 x i8]* @.str, i64 0, i64 0))
%8 = call i32 @printf(i8* %7)
%9 = call i8* @gettext(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.1, i64 0, i64 0))
%10 = call i32 @printf(i8* %9)
br label %11
11: ; preds = %6, %1
%12 = load i32, i32* %2
%13 = load i32, i32* @SIGSEGV
%14 = icmp eq i32 %12, %13
br i1 %14, label %15, label %20
15: ; preds = %11
%16 = call i8* @gettext(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.2, i64 0, i64 0))
%17 = call i32 @printf(i8* %16)
%18 = call i8* @gettext(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.3, i64 0, i64 0))
%19 = call i32 @printf(i8* %18)
br label %20
20: ; preds = %15, %11
ret void
}

LLVM IR (-O2):
@SIGINT = global i32 0
@.str = [59 x i8] c"\0ASorry, you can not exit with the key combination Ctrl + C\00"
@.str.1 = [27 x i8] c"\0ATry the default setting\0A\0A\00"
@SIGSEGV = global i32 0
@.str.2 = [8 x i8] c"\0AError:\00"
@.str.3 = [22 x i8] c"\0ASegmentation fault\0A\0A\00"
define void @myCatch(i32 %0) {
%2 = load i32, i32* @SIGINT
%3 = icmp eq i32 %2, %0
br i1 %3, label %4, label %9
4: ; preds = %1
%5 = tail call i8* @gettext(i8* getelementptr inbounds ([59 x i8], [59 x i8]* @.str, i64 0, i64 0))
%6 = tail call i32 @printf(i8* dereferenceable(1) %5)
%7 = tail call i8* @gettext(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.1, i64 0, i64 0))
%8 = tail call i32 @printf(i8* dereferenceable(1) %7)
br label %9
9: ; preds = %4, %1
%10 = load i32, i32* @SIGSEGV
%11 = icmp eq i32 %10, %0
br i1 %11, label %12, label %17
12: ; preds = %9
%13 = tail call i8* @gettext(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.2, i64 0, i64 0))
%14 = tail call i32 @printf(i8* dereferenceable(1) %13)
%15 = tail call i8* @gettext(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.3, i64 0, i64 0))
%16 = tail call i32 @printf(i8* dereferenceable(1) %15)
br label %17
17: ; preds = %12, %9
ret void
}