#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 */
struct uc_program {
  int dummy;
};

/* Variables and functions */
int uc_program_current_character(struct uc_program *);
char uc_punctuation(struct uc_program *program) {
  switch (uc_program_current_character(program)) {
  case 'P':
    return '.';
  case 'E':
    return '!';
  case 'Q':
    return '?';
  case 'C':
    return ',';
  case 'A':
    return '\'';
  default:
    return 0;
  }
}


x86 assembly (clang, -O0):
<uc_punctuation>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
call   1030 <uc_program_current_character@plt>
add    $0xffffffbf,%eax
mov    %eax,%ecx
mov    %rcx,-0x18(%rbp)
sub    $0x10,%eax
ja     1178 <uc_punctuation+0x68>
mov    -0x18(%rbp),%rax
lea    0xebe(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
movb   $0x2e,-0x1(%rbp)
jmp    117c <uc_punctuation+0x6c>
movb   $0x21,-0x1(%rbp)
jmp    117c <uc_punctuation+0x6c>
movb   $0x3f,-0x1(%rbp)
jmp    117c <uc_punctuation+0x6c>
movb   $0x2c,-0x1(%rbp)
jmp    117c <uc_punctuation+0x6c>
movb   $0x27,-0x1(%rbp)
jmp    117c <uc_punctuation+0x6c>
movb   $0x0,-0x1(%rbp)
movsbl -0x1(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<uc_punctuation>:
push   %rax
call   1030 <uc_program_current_character@plt>
mov    %eax,%ecx
add    $0xffffffbf,%ecx
cmp    $0x10,%ecx
ja     1136 <uc_punctuation+0x26>
mov    $0x2e,%al
lea    0xed7(%rip),%rdx
movslq (%rdx,%rcx,4),%rcx
add    %rdx,%rcx
jmp    *%rcx
mov    $0x27,%al
pop    %rcx
ret
xor    %eax,%eax
pop    %rcx
ret
mov    $0x2c,%al
pop    %rcx
ret
mov    $0x21,%al
pop    %rcx
ret
mov    $0x3f,%al
pop    %rcx
ret

LLVM IR (-O0):
%struct.uc_program = type { i32 }
define signext i8 @uc_punctuation(%struct.uc_program* %0) {
%2 = alloca i8
%3 = alloca %struct.uc_program*
store %struct.uc_program* %0, %struct.uc_program** %3
%4 = load %struct.uc_program*, %struct.uc_program** %3
%5 = call i32 @uc_program_current_character(%struct.uc_program* %4)
switch i32 %5, label %11 [
i32 80, label %6
i32 69, label %7
i32 81, label %8
i32 67, label %9
i32 65, label %10
]
6: ; preds = %1
store i8 46, i8* %2
br label %12
7: ; preds = %1
store i8 33, i8* %2
br label %12
8: ; preds = %1
store i8 63, i8* %2
br label %12
9: ; preds = %1
store i8 44, i8* %2
br label %12
10: ; preds = %1
store i8 39, i8* %2
br label %12
11: ; preds = %1
store i8 0, i8* %2
br label %12
12: ; preds = %11, %10, %9, %8, %7, %6
%13 = load i8, i8* %2
ret i8 %13
}

LLVM IR (-O2):
%struct.uc_program = type { i32 }
define signext i8 @uc_punctuation(%struct.uc_program* %0) {
%2 = tail call i32 @uc_program_current_character(%struct.uc_program* %0)
switch i32 %2, label %7 [
i32 80, label %8
i32 69, label %3
i32 81, label %4
i32 67, label %5
i32 65, label %6
]
3: ; preds = %1
br label %8
4: ; preds = %1
br label %8
5: ; preds = %1
br label %8
6: ; preds = %1
br label %8
7: ; preds = %1
br label %8
8: ; preds = %1, %7, %6, %5, %4, %3
%9 = phi i8 [ 0, %7 ], [ 39, %6 ], [ 44, %5 ], [ 63, %4 ], [ 33, %3 ], [ 46, %1 ]
ret i8 %9
}