#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 */
char *gettext(char *);
int /*<<< orphan*/ printf(char *);
void echo_sig_type(unsigned char type) {
  switch (type) {
  case 0x01:
    printf(gettext("Signature of a carnonical text document.\n"));
    break;
  case 0x02:
    printf(gettext("Standalone singature.\n"));
    break;
  case 0x10:
    printf(
        gettext("Generic certification of a User ID and Public Key packet.\n"));
    break;
  case 0x11:
    printf(
        gettext("Persona certification of a UserID and Public Key packet.\n"));
    break;
  case 0x12:
    printf(
        gettext("Casual certification of a UserID and Pubkey Key packet.\n"));
    break;
  case 0x13:
    printf(
        gettext("Positive certificate of a UserID and Pubkey Key Packet.\n"));
    break;
  case 0x18:
    printf(gettext("Subkey Binding Signature\n"));
    break;
  case 0x19:
    printf(gettext("Primary Key Binding Signature\n"));
    break;
  case 0x1F:
    printf(gettext("Signature directly on a key\n"));
    break;
  case 0x20:
    printf(gettext("Key revocation signature\n"));
    break;
  case 0x28:
    printf(gettext("Subkey revocation signature\n"));
    break;
  case 0x30:
    printf(gettext("Certification revocation signature\n"));
    break;
  case 0x40:
    printf(gettext("Timestamp signature\n"));
    break;
  case 0x50:
    printf(gettext("Third-Party Confirmation signature\n"));
    break;
  default:
    printf(gettext("Signature Typing error.\n"));
    break;
  }
}


x86 assembly (clang, -O0):
<echo_sig_type>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movzbl -0x1(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,%ecx
mov    %rcx,-0x10(%rbp)
sub    $0x4f,%eax
ja     12b6 <echo_sig_type+0x196>
mov    -0x10(%rbp),%rax
lea    0xeb1(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
lea    0xfe1(%rip),%rdi
call   1030 <gettext@plt>
mov    %rax,%rdi
call   1040 <printf@plt>
jmp    12ca <echo_sig_type+0x1aa>
lea    0xff2(%rip),%rdi
call   1030 <gettext@plt>
mov    %rax,%rdi
call   1040 <printf@plt>
jmp    12ca <echo_sig_type+0x1aa>
lea    0xff0(%rip),%rdi
call   1030 <gettext@plt>
mov    %rax,%rdi
call   1040 <printf@plt>
jmp    12ca <echo_sig_type+0x1aa>
lea    0x1012(%rip),%rdi
call   1030 <gettext@plt>
mov    %rax,%rdi
call   1040 <printf@plt>
jmp    12ca <echo_sig_type+0x1aa>
lea    0x1033(%rip),%rdi
call   1030 <gettext@plt>
mov    %rax,%rdi
call   1040 <printf@plt>
jmp    12ca <echo_sig_type+0x1aa>
lea    0x1053(%rip),%rdi
call   1030 <gettext@plt>
mov    %rax,%rdi
call   1040 <printf@plt>
jmp    12ca <echo_sig_type+0x1aa>
lea    0x1073(%rip),%rdi
call   1030 <gettext@plt>
mov    %rax,%rdi
call   1040 <printf@plt>
jmp    12ca <echo_sig_type+0x1aa>
lea    0x1074(%rip),%rdi
call   1030 <gettext@plt>
mov    %rax,%rdi
call   1040 <printf@plt>
jmp    12ca <echo_sig_type+0x1aa>
lea    0x107a(%rip),%rdi
call   1030 <gettext@plt>
mov    %rax,%rdi
call   1040 <printf@plt>
jmp    12ca <echo_sig_type+0x1aa>
lea    0x107e(%rip),%rdi
call   1030 <gettext@plt>
mov    %rax,%rdi
call   1040 <printf@plt>
jmp    12ca <echo_sig_type+0x1aa>
lea    0x107f(%rip),%rdi
call   1030 <gettext@plt>
mov    %rax,%rdi
call   1040 <printf@plt>
jmp    12ca <echo_sig_type+0x1aa>
lea    0x1083(%rip),%rdi
call   1030 <gettext@plt>
mov    %rax,%rdi
call   1040 <printf@plt>
jmp    12ca <echo_sig_type+0x1aa>
lea    0x108e(%rip),%rdi
call   1030 <gettext@plt>
mov    %rax,%rdi
call   1040 <printf@plt>
jmp    12ca <echo_sig_type+0x1aa>
lea    0x108a(%rip),%rdi
call   1030 <gettext@plt>
mov    %rax,%rdi
call   1040 <printf@plt>
jmp    12ca <echo_sig_type+0x1aa>
lea    0x1095(%rip),%rdi
call   1030 <gettext@plt>
mov    %rax,%rdi
call   1040 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<echo_sig_type>:
push   %rax
mov    %edi,%eax
add    $0xff,%al
cmp    $0x4f,%al
ja     114c <echo_sig_type+0x2c>
lea    0x1010(%rip),%rdi
movzbl %al,%eax
lea    0xec6(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
lea    0x1020(%rip),%rdi
jmp    11bf <echo_sig_type+0x9f>
lea    0x11ff(%rip),%rdi
jmp    11bf <echo_sig_type+0x9f>
lea    0x1025(%rip),%rdi
jmp    11bf <echo_sig_type+0x9f>
lea    0x1057(%rip),%rdi
jmp    11bf <echo_sig_type+0x9f>
lea    0x1088(%rip),%rdi
jmp    11bf <echo_sig_type+0x9f>
lea    0x10b8(%rip),%rdi
jmp    11bf <echo_sig_type+0x9f>
lea    0x10e8(%rip),%rdi
jmp    11bf <echo_sig_type+0x9f>
lea    0x10f9(%rip),%rdi
jmp    11bf <echo_sig_type+0x9f>
lea    0x110f(%rip),%rdi
jmp    11bf <echo_sig_type+0x9f>
lea    0x1123(%rip),%rdi
jmp    11bf <echo_sig_type+0x9f>
lea    0x1134(%rip),%rdi
jmp    11bf <echo_sig_type+0x9f>
lea    0x1148(%rip),%rdi
jmp    11bf <echo_sig_type+0x9f>
lea    0x1163(%rip),%rdi
jmp    11bf <echo_sig_type+0x9f>
lea    0x116f(%rip),%rdi
call   1030 <gettext@plt>
mov    %rax,%rdi
pop    %rax
jmp    1040 <printf@plt>

LLVM IR (-O0):
@.str = [42 x i8] c"Signature of a carnonical text document.\0A\00"
@.str.1 = [23 x i8] c"Standalone singature.\0A\00"
@.str.2 = [59 x i8] c"Generic certification of a User ID and Public Key packet.\0A\00"
@.str.3 = [58 x i8] c"Persona certification of a UserID and Public Key packet.\0A\00"
@.str.4 = [57 x i8] c"Casual certification of a UserID and Pubkey Key packet.\0A\00"
@.str.5 = [57 x i8] c"Positive certificate of a UserID and Pubkey Key Packet.\0A\00"
@.str.6 = [26 x i8] c"Subkey Binding Signature\0A\00"
@.str.7 = [31 x i8] c"Primary Key Binding Signature\0A\00"
@.str.8 = [29 x i8] c"Signature directly on a key\0A\00"
@.str.9 = [26 x i8] c"Key revocation signature\0A\00"
@.str.10 = [29 x i8] c"Subkey revocation signature\0A\00"
@.str.11 = [36 x i8] c"Certification revocation signature\0A\00"
@.str.12 = [21 x i8] c"Timestamp signature\0A\00"
@.str.13 = [36 x i8] c"Third-Party Confirmation signature\0A\00"
@.str.14 = [25 x i8] c"Signature Typing error.\0A\00"
define void @echo_sig_type(i8 zeroext %0) {
%2 = alloca i8
store i8 %0, i8* %2
%3 = load i8, i8* %2
%4 = zext i8 %3 to i32
switch i32 %4, label %47 [
i32 1, label %5
i32 2, label %8
i32 16, label %11
i32 17, label %14
i32 18, label %17
i32 19, label %20
i32 24, label %23
i32 25, label %26
i32 31, label %29
i32 32, label %32
i32 40, label %35
i32 48, label %38
i32 64, label %41
i32 80, label %44
]
5: ; preds = %1
%6 = call i8* @gettext(i8* getelementptr inbounds ([42 x i8], [42 x i8]* @.str, i64 0, i64 0))
%7 = call i32 @printf(i8* %6)
br label %50
8: ; preds = %1
%9 = call i8* @gettext(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.1, i64 0, i64 0))
%10 = call i32 @printf(i8* %9)
br label %50
11: ; preds = %1
%12 = call i8* @gettext(i8* getelementptr inbounds ([59 x i8], [59 x i8]* @.str.2, i64 0, i64 0))
%13 = call i32 @printf(i8* %12)
br label %50
14: ; preds = %1
%15 = call i8* @gettext(i8* getelementptr inbounds ([58 x i8], [58 x i8]* @.str.3, i64 0, i64 0))
%16 = call i32 @printf(i8* %15)
br label %50
17: ; preds = %1
%18 = call i8* @gettext(i8* getelementptr inbounds ([57 x i8], [57 x i8]* @.str.4, i64 0, i64 0))
%19 = call i32 @printf(i8* %18)
br label %50
20: ; preds = %1
%21 = call i8* @gettext(i8* getelementptr inbounds ([57 x i8], [57 x i8]* @.str.5, i64 0, i64 0))
%22 = call i32 @printf(i8* %21)
br label %50
23: ; preds = %1
%24 = call i8* @gettext(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.6, i64 0, i64 0))
%25 = call i32 @printf(i8* %24)
br label %50
26: ; preds = %1
%27 = call i8* @gettext(i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str.7, i64 0, i64 0))
%28 = call i32 @printf(i8* %27)
br label %50
29: ; preds = %1
%30 = call i8* @gettext(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.8, i64 0, i64 0))
%31 = call i32 @printf(i8* %30)
br label %50
32: ; preds = %1
%33 = call i8* @gettext(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.9, i64 0, i64 0))
%34 = call i32 @printf(i8* %33)
br label %50
35: ; preds = %1
%36 = call i8* @gettext(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.10, i64 0, i64 0))
%37 = call i32 @printf(i8* %36)
br label %50
38: ; preds = %1
%39 = call i8* @gettext(i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str.11, i64 0, i64 0))
%40 = call i32 @printf(i8* %39)
br label %50
41: ; preds = %1
%42 = call i8* @gettext(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.12, i64 0, i64 0))
%43 = call i32 @printf(i8* %42)
br label %50
44: ; preds = %1
%45 = call i8* @gettext(i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str.13, i64 0, i64 0))
%46 = call i32 @printf(i8* %45)
br label %50
47: ; preds = %1
%48 = call i8* @gettext(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.14, i64 0, i64 0))
%49 = call i32 @printf(i8* %48)
br label %50
50: ; preds = %47, %44, %41, %38, %35, %32, %29, %26, %23, %20, %17, %14, %11, %8, %5
ret void
}

LLVM IR (-O2):
@.str = [42 x i8] c"Signature of a carnonical text document.\0A\00"
@.str.1 = [23 x i8] c"Standalone singature.\0A\00"
@.str.2 = [59 x i8] c"Generic certification of a User ID and Public Key packet.\0A\00"
@.str.3 = [58 x i8] c"Persona certification of a UserID and Public Key packet.\0A\00"
@.str.4 = [57 x i8] c"Casual certification of a UserID and Pubkey Key packet.\0A\00"
@.str.5 = [57 x i8] c"Positive certificate of a UserID and Pubkey Key Packet.\0A\00"
@.str.6 = [26 x i8] c"Subkey Binding Signature\0A\00"
@.str.7 = [31 x i8] c"Primary Key Binding Signature\0A\00"
@.str.8 = [29 x i8] c"Signature directly on a key\0A\00"
@.str.9 = [26 x i8] c"Key revocation signature\0A\00"
@.str.10 = [29 x i8] c"Subkey revocation signature\0A\00"
@.str.11 = [36 x i8] c"Certification revocation signature\0A\00"
@.str.12 = [21 x i8] c"Timestamp signature\0A\00"
@.str.13 = [36 x i8] c"Third-Party Confirmation signature\0A\00"
@.str.14 = [25 x i8] c"Signature Typing error.\0A\00"
define void @echo_sig_type(i8 zeroext %0) {
switch i8 %0, label %15 [
i8 1, label %16
i8 2, label %2
i8 16, label %3
i8 17, label %4
i8 18, label %5
i8 19, label %6
i8 24, label %7
i8 25, label %8
i8 31, label %9
i8 32, label %10
i8 40, label %11
i8 48, label %12
i8 64, label %13
i8 80, label %14
]
2: ; preds = %1
br label %16
3: ; preds = %1
br label %16
4: ; preds = %1
br label %16
5: ; preds = %1
br label %16
6: ; preds = %1
br label %16
7: ; preds = %1
br label %16
8: ; preds = %1
br label %16
9: ; preds = %1
br label %16
10: ; preds = %1
br label %16
11: ; preds = %1
br label %16
12: ; preds = %1
br label %16
13: ; preds = %1
br label %16
14: ; preds = %1
br label %16
15: ; preds = %1
br label %16
16: ; preds = %1, %15, %14, %13, %12, %11, %10, %9, %8, %7, %6, %5, %4, %3, %2
%17 = phi i8* [ getelementptr inbounds ([25 x i8], [25 x i8]* @.str.14, i64 0, i64 0), %15 ], [ getelementptr inbounds ([36 x i8], [36 x i8]* @.str.13, i64 0, i64 0), %14 ], [ getelementptr inbounds ([21 x i8], [21 x i8]* @.str.12, i64 0, i64 0), %13 ], [ getelementptr inbounds ([36 x i8], [36 x i8]* @.str.11, i64 0, i64 0), %12 ], [ getelementptr inbounds ([29 x i8], [29 x i8]* @.str.10, i64 0, i64 0), %11 ], [ getelementptr inbounds ([26 x i8], [26 x i8]* @.str.9, i64 0, i64 0), %10 ], [ getelementptr inbounds ([29 x i8], [29 x i8]* @.str.8, i64 0, i64 0), %9 ], [ getelementptr inbounds ([31 x i8], [31 x i8]* @.str.7, i64 0, i64 0), %8 ], [ getelementptr inbounds ([26 x i8], [26 x i8]* @.str.6, i64 0, i64 0), %7 ], [ getelementptr inbounds ([57 x i8], [57 x i8]* @.str.5, i64 0, i64 0), %6 ], [ getelementptr inbounds ([57 x i8], [57 x i8]* @.str.4, i64 0, i64 0), %5 ], [ getelementptr inbounds ([58 x i8], [58 x i8]* @.str.3, i64 0, i64 0), %4 ], [ getelementptr inbounds ([59 x i8], [59 x i8]* @.str.2, i64 0, i64 0), %3 ], [ getelementptr inbounds ([23 x i8], [23 x i8]* @.str.1, i64 0, i64 0), %2 ], [ getelementptr inbounds ([42 x i8], [42 x i8]* @.str, i64 0, i64 0), %1 ]
%18 = tail call i8* @gettext(i8* %17)
%19 = tail call i32 @printf(i8* dereferenceable(1) %18)
ret void
}