#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 */
typedef int uint32_t;

/* Variables and functions */
int /*<<< orphan*/ printf(char *, ...);
void printClass(uint32_t class) {
  printf("Class: 0x%08X ", class);
  if (class == 0x00000002) {
    printf("(NIL)");
  } else if (class == 0x00055552) {
    printf("(Symbol)");
  }
  printf("\n");
}


x86 assembly (clang, -O0):
<printClass>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%esi
lea    0xedb(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
cmpl   $0x2,-0x4(%rbp)
jne    1149 <printClass+0x39>
lea    0xed2(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    1169 <printClass+0x59>
cmpl   $0x55552,-0x4(%rbp)
jne    1164 <printClass+0x54>
lea    0xeb8(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    1169 <printClass+0x59>
lea    0xeae(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<printClass>:
push   %rbx
mov    %edi,%ebx
lea    0xed6(%rip),%rdi
mov    %ebx,%esi
xor    %eax,%eax
call   1040 <printf@plt>
cmp    $0x2,%ebx
je     1149 <printClass+0x29>
cmp    $0x55552,%ebx
jne    1157 <printClass+0x37>
lea    0xece(%rip),%rdi
jmp    1150 <printClass+0x30>
lea    0xebf(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
mov    $0xa,%edi
pop    %rbx
jmp    1030 <putchar@plt>

LLVM IR (-O0):
@.str = [15 x i8] c"Class: 0x%08X \00"
@.str.1 = [6 x i8] c"(NIL)\00"
@.str.2 = [9 x i8] c"(Symbol)\00"
@.str.3 = [2 x i8] c"\0A\00"
define void @printClass(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0), i32 %3)
%5 = load i32, i32* %2
%6 = icmp eq i32 %5, 2
br i1 %6, label %7, label %9
7: ; preds = %1
%8 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0))
br label %15
9: ; preds = %1
%10 = load i32, i32* %2
%11 = icmp eq i32 %10, 349522
br i1 %11, label %12, label %14
12: ; preds = %9
%13 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.2, i64 0, i64 0))
br label %14
14: ; preds = %12, %9
br label %15
15: ; preds = %14, %7
%16 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.3, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [15 x i8] c"Class: 0x%08X \00"
@.str.1 = [6 x i8] c"(NIL)\00"
@.str.2 = [9 x i8] c"(Symbol)\00"
define void @printClass(i32 %0) {
%2 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0), i32 %0)
switch i32 %0, label %7 [
i32 2, label %4
i32 349522, label %3
]
3: ; preds = %1
br label %4
4: ; preds = %1, %3
%5 = phi i8* [ getelementptr inbounds ([9 x i8], [9 x i8]* @.str.2, i64 0, i64 0), %3 ], [ getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), %1 ]
%6 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) %5)
br label %7
7: ; preds = %4, %1
%8 = tail call i32 @putchar(i32 10)
ret void
}