#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 print_IPA_error(int rc) {
  switch (rc) {
  case 0x0:
    break;
  case 0x4:
    fprintf(stderr, "Error: Command not supported\n");
    break;
  case 0x8:
    fprintf(stderr, "Error: Invalid/unsupported sub_command/scope\n");
    break;
  case 0x10:
    fprintf(stderr, "Error: No active data connection\n");
    break;
  case 0x14:
    fprintf(stderr, "Error: OSA temporary resource shortage\n");
    break;
  default:
    return 1;
  }
  return 0;
}


x86 assembly (clang, -O0):
<print_IPA_error>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
mov    -0x8(%rbp),%eax
mov    %rax,-0x10(%rbp)
sub    $0x14,%rax
ja     11ad <print_IPA_error+0x9d>
mov    -0x10(%rbp),%rax
lea    0xec9(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
jmp    11b9 <print_IPA_error+0xa9>
mov    0x2e94(%rip),%rax
mov    (%rax),%edi
lea    0xeff(%rip),%rsi
call   1030 <fprintf@plt>
jmp    11b9 <print_IPA_error+0xa9>
mov    0x2e7a(%rip),%rax
mov    (%rax),%edi
lea    0xf03(%rip),%rsi
call   1030 <fprintf@plt>
jmp    11b9 <print_IPA_error+0xa9>
mov    0x2e60(%rip),%rax
mov    (%rax),%edi
lea    0xf17(%rip),%rsi
call   1030 <fprintf@plt>
jmp    11b9 <print_IPA_error+0xa9>
mov    0x2e46(%rip),%rax
mov    (%rax),%edi
lea    0xf1f(%rip),%rsi
call   1030 <fprintf@plt>
jmp    11b9 <print_IPA_error+0xa9>
movl   $0x1,-0x4(%rbp)
jmp    11c0 <print_IPA_error+0xb0>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<print_IPA_error>:
push   %rax
rol    $0x1e,%edi
mov    $0x1,%eax
cmp    $0x5,%edi
ja     115e <print_IPA_error+0x4e>
lea    0xef3(%rip),%rsi
lea    0xed4(%rip),%rcx
movslq (%rcx,%rdi,4),%rdx
add    %rcx,%rdx
jmp    *%rdx
lea    0xefa(%rip),%rsi
jmp    114e <print_IPA_error+0x3e>
lea    0xf1f(%rip),%rsi
jmp    114e <print_IPA_error+0x3e>
lea    0xf38(%rip),%rsi
mov    0x2e8b(%rip),%rax
mov    (%rax),%edi
call   1030 <fprintf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@stderr = global i32 0
@.str = [30 x i8] c"Error: Command not supported\0A\00"
@.str.1 = [46 x i8] c"Error: Invalid/unsupported sub_command/scope\0A\00"
@.str.2 = [34 x i8] c"Error: No active data connection\0A\00"
@.str.3 = [40 x i8] c"Error: OSA temporary resource shortage\0A\00"
define i32 @print_IPA_error(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %3
%4 = load i32, i32* %3
switch i32 %4, label %18 [
i32 0, label %5
i32 4, label %6
i32 8, label %9
i32 16, label %12
i32 20, label %15
]
5: ; preds = %1
br label %19
6: ; preds = %1
%7 = load i32, i32* @stderr
%8 = call i32 @fprintf(i32 %7, i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str, i64 0, i64 0))
br label %19
9: ; preds = %1
%10 = load i32, i32* @stderr
%11 = call i32 @fprintf(i32 %10, i8* getelementptr inbounds ([46 x i8], [46 x i8]* @.str.1, i64 0, i64 0))
br label %19
12: ; preds = %1
%13 = load i32, i32* @stderr
%14 = call i32 @fprintf(i32 %13, i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str.2, i64 0, i64 0))
br label %19
15: ; preds = %1
%16 = load i32, i32* @stderr
%17 = call i32 @fprintf(i32 %16, i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str.3, i64 0, i64 0))
br label %19
18: ; preds = %1
store i32 1, i32* %2
br label %20
19: ; preds = %15, %12, %9, %6, %5
store i32 0, i32* %2
br label %20
20: ; preds = %19, %18
%21 = load i32, i32* %2
ret i32 %21
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [30 x i8] c"Error: Command not supported\0A\00"
@.str.1 = [46 x i8] c"Error: Invalid/unsupported sub_command/scope\0A\00"
@.str.2 = [34 x i8] c"Error: No active data connection\0A\00"
@.str.3 = [40 x i8] c"Error: OSA temporary resource shortage\0A\00"
define i32 @print_IPA_error(i32 %0) {
%2 = tail call i32 @llvm.fshl.i32(i32 %0, i32 %0, i32 30)
switch i32 %2, label %11 [
i32 0, label %10
i32 1, label %6
i32 2, label %3
i32 4, label %4
i32 5, label %5
]
3: ; preds = %1
br label %6
4: ; preds = %1
br label %6
5: ; preds = %1
br label %6
6: ; preds = %1, %3, %4, %5
%7 = phi i8* [ getelementptr inbounds ([40 x i8], [40 x i8]* @.str.3, i64 0, i64 0), %5 ], [ getelementptr inbounds ([34 x i8], [34 x i8]* @.str.2, i64 0, i64 0), %4 ], [ getelementptr inbounds ([46 x i8], [46 x i8]* @.str.1, i64 0, i64 0), %3 ], [ getelementptr inbounds ([30 x i8], [30 x i8]* @.str, i64 0, i64 0), %1 ]
%8 = load i32, i32* @stderr
%9 = tail call i32 @fprintf(i32 %8, i8* %7)
br label %10
10: ; preds = %6, %1
br label %11
11: ; preds = %1, %10
%12 = phi i32 [ 0, %10 ], [ 1, %1 ]
ret i32 %12
}