#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 /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, ...);
int /*<<< orphan*/ stderr;
int /*<<< orphan*/ tertius_error_display(int);
void error_deal_with(int origin, int a_number) {
  if (a_number != 0) {
    switch (origin) {
    case 1:
      tertius_error_display(a_number);
      break;
    default:
      fprintf(stderr, "The origin %d of errors is not defined.\n", origin);
      break;
    }
    fprintf(stderr, "\n");
    exit(0);
  }
}


x86 assembly (clang, -O0):
<error_deal_with>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
cmpl   $0x0,-0x8(%rbp)
je     119e <error_deal_with+0x6e>
mov    -0x4(%rbp),%eax
sub    $0x1,%eax
jne    1166 <error_deal_with+0x36>
jmp    1159 <error_deal_with+0x29>
mov    -0x8(%rbp),%edi
call   1040 <tertius_error_display@plt>
jmp    1180 <error_deal_with+0x50>
mov    0x2e73(%rip),%rax
mov    (%rax),%edi
mov    -0x4(%rbp),%edx
lea    0xe87(%rip),%rsi
mov    $0x0,%al
call   1030 <fprintf@plt>
mov    0x2e59(%rip),%rax
mov    (%rax),%edi
lea    0xe97(%rip),%rsi
mov    $0x0,%al
call   1030 <fprintf@plt>
xor    %edi,%edi
call   1050 <exit@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<error_deal_with>:
test   %esi,%esi
jne    1135 <error_deal_with+0x5>
ret
push   %rax
mov    %edi,%edx
cmp    $0x1,%edi
jne    1146 <error_deal_with+0x16>
mov    %esi,%edi
call   1040 <tertius_error_display@plt>
jmp    115d <error_deal_with+0x2d>
mov    0x2e93(%rip),%rax
mov    (%rax),%edi
lea    0xeaa(%rip),%rsi
xor    %eax,%eax
call   1030 <fprintf@plt>
mov    0x2e7c(%rip),%rax
mov    (%rax),%edi
lea    0xeba(%rip),%rsi
xor    %eax,%eax
call   1030 <fprintf@plt>
xor    %edi,%edi
call   1050 <exit@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [41 x i8] c"The origin %d of errors is not defined.\0A\00"
@.str.1 = [2 x i8] c"\0A\00"
define void @error_deal_with(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%5 = load i32, i32* %4
%6 = icmp ne i32 %5, 0
br i1 %6, label %7, label %20
7: ; preds = %2
%8 = load i32, i32* %3
switch i32 %8, label %12 [
i32 1, label %9
]
9: ; preds = %7
%10 = load i32, i32* %4
%11 = call i32 @tertius_error_display(i32 %10)
br label %16
12: ; preds = %7
%13 = load i32, i32* @stderr
%14 = load i32, i32* %3
%15 = call i32 (i32, i8*, ...) @fprintf(i32 %13, i8* getelementptr inbounds ([41 x i8], [41 x i8]* @.str, i64 0, i64 0), i32 %14)
br label %16
16: ; preds = %12, %9
%17 = load i32, i32* @stderr
%18 = call i32 (i32, i8*, ...) @fprintf(i32 %17, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
%19 = call i32 @exit(i32 0)
unreachable
20: ; preds = %2
ret void
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [41 x i8] c"The origin %d of errors is not defined.\0A\00"
@.str.1 = [2 x i8] c"\0A\00"
define void @error_deal_with(i32 %0, i32 %1) {
%3 = icmp eq i32 %1, 0
br i1 %3, label %15, label %4
4: ; preds = %2
%5 = icmp eq i32 %0, 1
br i1 %5, label %6, label %8
6: ; preds = %4
%7 = tail call i32 @tertius_error_display(i32 %1)
br label %11
8: ; preds = %4
%9 = load i32, i32* @stderr
%10 = tail call i32 (i32, i8*, ...) @fprintf(i32 %9, i8* getelementptr inbounds ([41 x i8], [41 x i8]* @.str, i64 0, i64 0), i32 %0)
br label %11
11: ; preds = %8, %6
%12 = load i32, i32* @stderr
%13 = tail call i32 (i32, i8*, ...) @fprintf(i32 %12, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
%14 = tail call i32 @exit(i32 0)
unreachable
15: ; preds = %2
ret void
}