#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*/ GenPrintLabel(char *);
int /*<<< orphan*/ printf2(char *);
int /*<<< orphan*/ puts2(char *);
void GenAddrData(int Size, char *Label) {
  if (Size == 1)
    printf2("\t.byte\t");
  else if (Size == 2)
    printf2("\t.half\t");
  else if (Size == 4)
    printf2("\t.word\t");
  GenPrintLabel(Label);
  puts2("");
}


x86 assembly (clang, -O0):
<GenAddrData>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
cmpl   $0x1,-0x4(%rbp)
jne    115a <GenAddrData+0x2a>
lea    0xeb0(%rip),%rdi
call   1030 <printf2@plt>
jmp    1195 <GenAddrData+0x65>
cmpl   $0x2,-0x4(%rbp)
jne    1175 <GenAddrData+0x45>
lea    0xe9d(%rip),%rdi
call   1030 <printf2@plt>
jmp    1190 <GenAddrData+0x60>
cmpl   $0x4,-0x4(%rbp)
jne    118b <GenAddrData+0x5b>
lea    0xe8a(%rip),%rdi
call   1030 <printf2@plt>
jmp    1190 <GenAddrData+0x60>
jmp    1195 <GenAddrData+0x65>
mov    -0x10(%rbp),%rdi
call   1040 <GenPrintLabel@plt>
lea    0xe72(%rip),%rdi
call   1050 <puts2@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<GenAddrData>:
push   %rbx
mov    %rsi,%rbx
cmp    $0x1,%edi
je     114c <GenAddrData+0x1c>
cmp    $0x4,%edi
je     1155 <GenAddrData+0x25>
cmp    $0x2,%edi
jne    1161 <GenAddrData+0x31>
lea    0xebe(%rip),%rdi
jmp    115c <GenAddrData+0x2c>
lea    0xead(%rip),%rdi
jmp    115c <GenAddrData+0x2c>
lea    0xeb4(%rip),%rdi
call   1030 <printf2@plt>
mov    %rbx,%rdi
call   1040 <GenPrintLabel@plt>
lea    0xea7(%rip),%rdi
pop    %rbx
jmp    1050 <puts2@plt>

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

LLVM IR (-O2):
@.str = [8 x i8] c"\09.byte\09\00"
@.str.1 = [8 x i8] c"\09.half\09\00"
@.str.2 = [8 x i8] c"\09.word\09\00"
@.str.3 = [1 x i8] zeroinitializer
define void @GenAddrData(i32 %0, i8* %1) {
switch i32 %0, label %8 [
i32 1, label %5
i32 2, label %3
i32 4, label %4
]
3: ; preds = %2
br label %5
4: ; preds = %2
br label %5
5: ; preds = %2, %4, %3
%6 = phi i8* [ getelementptr inbounds ([8 x i8], [8 x i8]* @.str.1, i64 0, i64 0), %3 ], [ getelementptr inbounds ([8 x i8], [8 x i8]* @.str.2, i64 0, i64 0), %4 ], [ getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), %2 ]
%7 = tail call i32 @printf2(i8* %6)
br label %8
8: ; preds = %5, %2
%9 = tail call i32 @GenPrintLabel(i8* %1)
%10 = tail call i32 @puts2(i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.3, i64 0, i64 0))
ret void
}