#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);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
int /*<<< orphan*/ stderr;
char *radix_getname_long(int radix) {
  if (radix == 10)
    return "decimal";
  else if (radix == 8)
    return "octal";
  else if (radix == 16)
    return "hexadecimal";
  else {
    fprintf(stderr, "radix_getname_long(): radix must be 10, 8 or 16\n");
    exit(1);
  }
}


x86 assembly (clang, -O0):
<radix_getname_long>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0xc(%rbp)
cmpl   $0xa,-0xc(%rbp)
jne    1145 <radix_getname_long+0x25>
lea    0xece(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    1198 <radix_getname_long+0x78>
cmpl   $0x8,-0xc(%rbp)
jne    115f <radix_getname_long+0x3f>
lea    0xeaa(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    1198 <radix_getname_long+0x78>
cmpl   $0x10,-0xc(%rbp)
jne    1179 <radix_getname_long+0x59>
lea    0xe96(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    1198 <radix_getname_long+0x78>
mov    0x2e60(%rip),%rax
mov    (%rax),%edi
lea    0xe89(%rip),%rsi
call   1030 <fprintf@plt>
mov    $0x1,%edi
call   1040 <exit@plt>
mov    -0x8(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<radix_getname_long>:
cmp    $0x10,%edi
je     1137 <radix_getname_long+0x17>
cmp    $0xa,%edi
je     113f <radix_getname_long+0x1f>
cmp    $0x8,%edi
jne    1147 <radix_getname_long+0x27>
lea    0xeca(%rip),%rax
ret
lea    0xec8(%rip),%rax
ret
lea    0xec4(%rip),%rax
ret
push   %rax
mov    0x2e91(%rip),%rax
mov    (%rax),%edi
lea    0xeba(%rip),%rsi
call   1030 <fprintf@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@.str = [8 x i8] c"decimal\00"
@.str.1 = [6 x i8] c"octal\00"
@.str.2 = [12 x i8] c"hexadecimal\00"
@stderr = global i32 0
@.str.3 = [49 x i8] c"radix_getname_long(): radix must be 10, 8 or 16\0A\00"
define i8* @radix_getname_long(i32 %0) {
%2 = alloca i8*
%3 = alloca i32
store i32 %0, i32* %3
%4 = load i32, i32* %3
%5 = icmp eq i32 %4, 10
br i1 %5, label %6, label %7
6: ; preds = %1
store i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i8** %2
br label %19
7: ; preds = %1
%8 = load i32, i32* %3
%9 = icmp eq i32 %8, 8
br i1 %9, label %10, label %11
10: ; preds = %7
store i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), i8** %2
br label %19
11: ; preds = %7
%12 = load i32, i32* %3
%13 = icmp eq i32 %12, 16
br i1 %13, label %14, label %15
14: ; preds = %11
store i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.2, i64 0, i64 0), i8** %2
br label %19
15: ; preds = %11
%16 = load i32, i32* @stderr
%17 = call i32 @fprintf(i32 %16, i8* getelementptr inbounds ([49 x i8], [49 x i8]* @.str.3, i64 0, i64 0))
%18 = call i32 @exit(i32 1)
unreachable
19: ; preds = %14, %10, %6
%20 = load i8*, i8** %2
ret i8* %20
}

LLVM IR (-O2):
@.str = [8 x i8] c"decimal\00"
@.str.1 = [6 x i8] c"octal\00"
@.str.2 = [12 x i8] c"hexadecimal\00"
@stderr = global i32 0
@.str.3 = [49 x i8] c"radix_getname_long(): radix must be 10, 8 or 16\0A\00"
define i8* @radix_getname_long(i32 %0) {
switch i32 %0, label %4 [
i32 10, label %8
i32 8, label %2
i32 16, label %3
]
2: ; preds = %1
br label %8
3: ; preds = %1
br label %8
4: ; preds = %1
%5 = load i32, i32* @stderr
%6 = tail call i32 @fprintf(i32 %5, i8* getelementptr inbounds ([49 x i8], [49 x i8]* @.str.3, i64 0, i64 0))
%7 = tail call i32 @exit(i32 1)
unreachable
8: ; preds = %1, %3, %2
%9 = phi i8* [ getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), %2 ], [ getelementptr inbounds ([12 x i8], [12 x i8]* @.str.2, i64 0, i64 0), %3 ], [ getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), %1 ]
ret i8* %9
}