#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*/ fprintf(int /*<<< orphan*/, char *);
int /*<<< orphan*/ stderr;
int throw_error(int code) {
  switch (code) {
  case (3): {
    fprintf(stderr, "Soubor nema spravny format.");
    return 65;
  }
  case (1): {
    fprintf(stderr, "Soubor nemohl byt otevren.");
    return 66;
  }
  case (4): {
    fprintf(stderr, "Chyba alokovani pameti.");
    return 71;
  }
  }
  return 1;
}


x86 assembly (clang, -O0):
<throw_error>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
mov    -0x8(%rbp),%eax
mov    %eax,-0xc(%rbp)
sub    $0x1,%eax
je     1172 <throw_error+0x62>
jmp    112f <throw_error+0x1f>
mov    -0xc(%rbp),%eax
sub    $0x3,%eax
je     1151 <throw_error+0x41>
jmp    1140 <throw_error+0x30>
mov    -0xc(%rbp),%eax
sub    $0x4,%eax
je     1193 <throw_error+0x83>
jmp    11b4 <throw_error+0xa4>
mov    0x2e88(%rip),%rax
mov    (%rax),%edi
lea    0xe9f(%rip),%rsi
call   1030 <fprintf@plt>
movl   $0x41,-0x4(%rbp)
jmp    11bb <throw_error+0xab>
mov    0x2e67(%rip),%rax
mov    (%rax),%edi
lea    0xe9a(%rip),%rsi
call   1030 <fprintf@plt>
movl   $0x42,-0x4(%rbp)
jmp    11bb <throw_error+0xab>
mov    0x2e46(%rip),%rax
mov    (%rax),%edi
lea    0xe94(%rip),%rsi
call   1030 <fprintf@plt>
movl   $0x47,-0x4(%rbp)
jmp    11bb <throw_error+0xab>
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<throw_error>:
push   %rbx
cmp    $0x4,%edi
je     1133 <throw_error+0x23>
cmp    $0x3,%edi
je     1141 <throw_error+0x31>
mov    $0x1,%ebx
cmp    $0x1,%edi
jne    115b <throw_error+0x4b>
mov    $0x42,%ebx
lea    0xeeb(%rip),%rsi
jmp    114d <throw_error+0x3d>
mov    $0x47,%ebx
lea    0xef8(%rip),%rsi
jmp    114d <throw_error+0x3d>
mov    $0x41,%ebx
lea    0xeb3(%rip),%rsi
mov    0x2e8c(%rip),%rax
mov    (%rax),%edi
call   1030 <fprintf@plt>
mov    %ebx,%eax
pop    %rbx
ret

LLVM IR (-O0):
@stderr = global i32 0
@.str = [28 x i8] c"Soubor nema spravny format.\00"
@.str.1 = [27 x i8] c"Soubor nemohl byt otevren.\00"
@.str.2 = [24 x i8] c"Chyba alokovani pameti.\00"
define i32 @throw_error(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %3
%4 = load i32, i32* %3
switch i32 %4, label %14 [
i32 3, label %5
i32 1, label %8
i32 4, label %11
]
5: ; preds = %1
%6 = load i32, i32* @stderr
%7 = call i32 @fprintf(i32 %6, i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str, i64 0, i64 0))
store i32 65, i32* %2
br label %15
8: ; preds = %1
%9 = load i32, i32* @stderr
%10 = call i32 @fprintf(i32 %9, i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.1, i64 0, i64 0))
store i32 66, i32* %2
br label %15
11: ; preds = %1
%12 = load i32, i32* @stderr
%13 = call i32 @fprintf(i32 %12, i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.2, i64 0, i64 0))
store i32 71, i32* %2
br label %15
14: ; preds = %1
store i32 1, i32* %2
br label %15
15: ; preds = %14, %11, %8, %5
%16 = load i32, i32* %2
ret i32 %16
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [28 x i8] c"Soubor nema spravny format.\00"
@.str.1 = [27 x i8] c"Soubor nemohl byt otevren.\00"
@.str.2 = [24 x i8] c"Chyba alokovani pameti.\00"
define i32 @throw_error(i32 %0) {
switch i32 %0, label %9 [
i32 3, label %4
i32 1, label %2
i32 4, label %3
]
2: ; preds = %1
br label %4
3: ; preds = %1
br label %4
4: ; preds = %1, %2, %3
%5 = phi i8* [ getelementptr inbounds ([24 x i8], [24 x i8]* @.str.2, i64 0, i64 0), %3 ], [ getelementptr inbounds ([27 x i8], [27 x i8]* @.str.1, i64 0, i64 0), %2 ], [ getelementptr inbounds ([28 x i8], [28 x i8]* @.str, i64 0, i64 0), %1 ]
%6 = phi i32 [ 71, %3 ], [ 66, %2 ], [ 65, %1 ]
%7 = load i32, i32* @stderr
%8 = tail call i32 @fprintf(i32 %7, i8* %5)
br label %9
9: ; preds = %4, %1
%10 = phi i32 [ 1, %1 ], [ %6, %4 ]
ret i32 %10
}