#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*/ printf2(char *, int);
int truncInt(int);
void GenIntData(int Size, int Val) {
  Val = truncInt(Val);
  if (Size == 1)
    printf2("\tdb($%d)\n", Val);
  else if (Size == 2)
    printf2("\tdw($%d)\n", Val);
  else if (Size == 4)
    printf2("\tdd($%d)\n", Val);
}


x86 assembly (clang, -O0):
<GenIntData>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x8(%rbp),%edi
call   1040 <truncInt@plt>
mov    %eax,-0x8(%rbp)
cmpl   $0x1,-0x4(%rbp)
jne    1157 <GenIntData+0x37>
mov    -0x8(%rbp),%esi
lea    0xeb3(%rip),%rdi
call   1030 <printf2@plt>
jmp    1198 <GenIntData+0x78>
cmpl   $0x2,-0x4(%rbp)
jne    1175 <GenIntData+0x55>
mov    -0x8(%rbp),%esi
lea    0xe9f(%rip),%rdi
call   1030 <printf2@plt>
jmp    1193 <GenIntData+0x73>
cmpl   $0x4,-0x4(%rbp)
jne    118e <GenIntData+0x6e>
mov    -0x8(%rbp),%esi
lea    0xe8b(%rip),%rdi
call   1030 <printf2@plt>
jmp    1193 <GenIntData+0x73>
jmp    1198 <GenIntData+0x78>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<GenIntData>:
push   %rbx
mov    %edi,%ebx
mov    %esi,%edi
call   1040 <truncInt@plt>
cmp    $0x1,%ebx
je     1142 <GenIntData+0x22>
cmp    $0x4,%ebx
je     114b <GenIntData+0x2b>
cmp    $0x2,%ebx
jne    115a <GenIntData+0x3a>
lea    0xeca(%rip),%rdi
jmp    1152 <GenIntData+0x32>
lea    0xeb7(%rip),%rdi
jmp    1152 <GenIntData+0x32>
lea    0xec2(%rip),%rdi
mov    %eax,%esi
pop    %rbx
jmp    1030 <printf2@plt>
pop    %rbx
ret

LLVM IR (-O0):
@.str = [10 x i8] c"\09db($%d)\0A\00"
@.str.1 = [10 x i8] c"\09dw($%d)\0A\00"
@.str.2 = [10 x i8] c"\09dd($%d)\0A\00"
define void @GenIntData(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%5 = load i32, i32* %4
%6 = call i32 @truncInt(i32 %5)
store i32 %6, i32* %4
%7 = load i32, i32* %3
%8 = icmp eq i32 %7, 1
br i1 %8, label %9, label %12
9: ; preds = %2
%10 = load i32, i32* %4
%11 = call i32 @printf2(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i32 %10)
br label %26
12: ; preds = %2
%13 = load i32, i32* %3
%14 = icmp eq i32 %13, 2
br i1 %14, label %15, label %18
15: ; preds = %12
%16 = load i32, i32* %4
%17 = call i32 @printf2(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.1, i64 0, i64 0), i32 %16)
br label %25
18: ; preds = %12
%19 = load i32, i32* %3
%20 = icmp eq i32 %19, 4
br i1 %20, label %21, label %24
21: ; preds = %18
%22 = load i32, i32* %4
%23 = call i32 @printf2(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.2, i64 0, i64 0), i32 %22)
br label %24
24: ; preds = %21, %18
br label %25
25: ; preds = %24, %15
br label %26
26: ; preds = %25, %9
ret void
}

LLVM IR (-O2):
@.str = [10 x i8] c"\09db($%d)\0A\00"
@.str.1 = [10 x i8] c"\09dw($%d)\0A\00"
@.str.2 = [10 x i8] c"\09dd($%d)\0A\00"
define void @GenIntData(i32 %0, i32 %1) {
%3 = tail call i32 @truncInt(i32 %1)
switch i32 %0, label %9 [
i32 1, label %6
i32 2, label %4
i32 4, label %5
]
4: ; preds = %2
br label %6
5: ; preds = %2
br label %6
6: ; preds = %2, %5, %4
%7 = phi i8* [ getelementptr inbounds ([10 x i8], [10 x i8]* @.str.1, i64 0, i64 0), %4 ], [ getelementptr inbounds ([10 x i8], [10 x i8]* @.str.2, i64 0, i64 0), %5 ], [ getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), %2 ]
%8 = tail call i32 @printf2(i8* %7, i32 %3)
br label %9
9: ; preds = %6, %2
ret void
}