#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*/ printf(char *);
int /*<<< orphan*/ putchar(char);
void error_1(short set) {
  int i;
  for (i = 0; i <= 70; i++)
    printf("=");
  putchar('\n');
  switch (set) {
  case 1:
    printf("Can't identify input data format\n");
    break;
  case 2:
    printf("Different data format than last trace\n");
    break;
  case 3:
    printf("File error\n");
    break;
  default:
    break;
  }
  printf("Process cancel\n");
  for (i = 0; i <= 70; i++)
    printf("=");
  putchar('\n');
  exit(0);
}


x86 assembly (clang, -O0):
<error_1>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %di,%ax
mov    %ax,-0x2(%rbp)
movl   $0x0,-0x8(%rbp)
cmpl   $0x46,-0x8(%rbp)
jg     116a <error_1+0x3a>
lea    0xea9(%rip),%rdi
call   1040 <printf@plt>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1146 <error_1+0x16>
mov    $0xa,%edi
call   1030 <putchar@plt>
movswl -0x2(%rbp),%eax
mov    %eax,-0xc(%rbp)
sub    $0x1,%eax
je     11ab <error_1+0x7b>
jmp    1189 <error_1+0x59>
mov    -0xc(%rbp),%eax
sub    $0x2,%eax
je     11bc <error_1+0x8c>
jmp    119a <error_1+0x6a>
mov    -0xc(%rbp),%eax
sub    $0x3,%eax
je     11cd <error_1+0x9d>
jmp    11de <error_1+0xae>
lea    0xe50(%rip),%rdi
call   1040 <printf@plt>
jmp    11e3 <error_1+0xb3>
lea    0xe61(%rip),%rdi
call   1040 <printf@plt>
jmp    11e3 <error_1+0xb3>
lea    0xe77(%rip),%rdi
call   1040 <printf@plt>
jmp    11e3 <error_1+0xb3>
jmp    11e3 <error_1+0xb3>
lea    0xe6d(%rip),%rdi
call   1040 <printf@plt>
movl   $0x0,-0x8(%rbp)
cmpl   $0x46,-0x8(%rbp)
jg     121a <error_1+0xea>
lea    0xdf9(%rip),%rdi
call   1040 <printf@plt>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    11f6 <error_1+0xc6>
mov    $0xa,%edi
call   1030 <putchar@plt>
xor    %edi,%edi
call   1050 <exit@plt>

x86 assembly (clang, -O2):
<error_1>:
push   %rbp
push   %rbx
push   %rax
mov    %edi,%ebx
mov    $0x47,%ebp
nopw   0x0(%rax,%rax,1)
mov    $0x3d,%edi
call   1030 <putchar@plt>
add    $0xffffffff,%ebp
jne    1140 <error_1+0x10>
mov    $0xa,%edi
call   1030 <putchar@plt>
movswl %bx,%eax
add    $0xffffffff,%eax
cmp    $0x2,%eax
ja     1179 <error_1+0x49>
cltq
lea    0xef7(%rip),%rcx
movslq (%rcx,%rax,4),%rdi
add    %rcx,%rdi
call   1040 <puts@plt>
lea    0xe8b(%rip),%rdi
call   1040 <puts@plt>
mov    $0x47,%ebx
nopw   0x0(%rax,%rax,1)
mov    $0x3d,%edi
call   1030 <putchar@plt>
add    $0xffffffff,%ebx
jne    1190 <error_1+0x60>
mov    $0xa,%edi
call   1030 <putchar@plt>
xor    %edi,%edi
call   1050 <exit@plt>

LLVM IR (-O0):
@.str = [2 x i8] c"=\00"
@.str.1 = [34 x i8] c"Can't identify input data format\0A\00"
@.str.2 = [39 x i8] c"Different data format than last trace\0A\00"
@.str.3 = [12 x i8] c"File error\0A\00"
@.str.4 = [16 x i8] c"Process cancel\0A\00"
define void @error_1(i16 signext %0) {
%2 = alloca i16
%3 = alloca i32
store i16 %0, i16* %2
store i32 0, i32* %3
br label %4
4: ; preds = %9, %1
%5 = load i32, i32* %3
%6 = icmp sle i32 %5, 70
br i1 %6, label %7, label %12
7: ; preds = %4
%8 = call i32 @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
br label %9
9: ; preds = %7
%10 = load i32, i32* %3
%11 = add nsw i32 %10, 1
store i32 %11, i32* %3
br label %4
12: ; preds = %4
%13 = call i32 @putchar(i8 signext 10)
%14 = load i16, i16* %2
%15 = sext i16 %14 to i32
switch i32 %15, label %22 [
i32 1, label %16
i32 2, label %18
i32 3, label %20
]
16: ; preds = %12
%17 = call i32 @printf(i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str.1, i64 0, i64 0))
br label %23
18: ; preds = %12
%19 = call i32 @printf(i8* getelementptr inbounds ([39 x i8], [39 x i8]* @.str.2, i64 0, i64 0))
br label %23
20: ; preds = %12
%21 = call i32 @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.3, i64 0, i64 0))
br label %23
22: ; preds = %12
br label %23
23: ; preds = %22, %20, %18, %16
%24 = call i32 @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.4, i64 0, i64 0))
store i32 0, i32* %3
br label %25
25: ; preds = %30, %23
%26 = load i32, i32* %3
%27 = icmp sle i32 %26, 70
br i1 %27, label %28, label %33
28: ; preds = %25
%29 = call i32 @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
br label %30
30: ; preds = %28
%31 = load i32, i32* %3
%32 = add nsw i32 %31, 1
store i32 %32, i32* %3
br label %25
33: ; preds = %25
%34 = call i32 @putchar(i8 signext 10)
%35 = call i32 @exit(i32 0)
unreachable
}

LLVM IR (-O2):
@str = [11 x i8] c"File error\00"
@str.5 = [15 x i8] c"Process cancel\00"
@str.6 = [38 x i8] c"Different data format than last trace\00"
@str.7 = [33 x i8] c"Can't identify input data format\00"
@reltable.error_1 = [3 x i32] [i32 trunc (i64 sub (i64 ptrtoint ([33 x i8]* @str.7 to i64), i64 ptrtoint ([3 x i32]* @reltable.error_1 to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([38 x i8]* @str.6 to i64), i64 ptrtoint ([3 x i32]* @reltable.error_1 to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([11 x i8]* @str to i64), i64 ptrtoint ([3 x i32]* @reltable.error_1 to i64)) to i32)]
define void @error_1(i16 signext %0) {
br label %2
2: ; preds = %1, %2
%3 = phi i32 [ 0, %1 ], [ %5, %2 ]
%4 = tail call i32 bitcast (i32 (i8)* @putchar to i32 (i32)*)(i32 61)
%5 = add nuw nsw i32 %3, 1
%6 = icmp eq i32 %5, 71
br i1 %6, label %7, label %2
7: ; preds = %2
%8 = tail call i32 @putchar(i8 signext 10)
%9 = sext i16 %0 to i32
%10 = add nsw i32 %9, -1
%11 = icmp ult i32 %10, 3
br i1 %11, label %12, label %17
12: ; preds = %7
%13 = sext i32 %10 to i64
%14 = shl i64 %13, 2
%15 = call i8* @llvm.load.relative.i64(i8* bitcast ([3 x i32]* @reltable.error_1 to i8*), i64 %14)
%16 = tail call i32 @puts(i8* dereferenceable(1) %15)
br label %17
17: ; preds = %7, %12
%18 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([15 x i8], [15 x i8]* @str.5, i64 0, i64 0))
br label %19
19: ; preds = %17, %19
%20 = phi i32 [ 0, %17 ], [ %22, %19 ]
%21 = tail call i32 bitcast (i32 (i8)* @putchar to i32 (i32)*)(i32 61)
%22 = add nuw nsw i32 %20, 1
%23 = icmp eq i32 %22, 71
br i1 %23, label %24, label %19
24: ; preds = %19
%25 = tail call i32 @putchar(i8 signext 10)
%26 = tail call i32 @exit(i32 0)
unreachable
}