#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 isDirectiveAddressing(char *, int);
int /*<<< orphan*/ isEmpty(char *);
int /*<<< orphan*/ printf(char *, int);
int entryF(char *buff, char *label, int line) {
  int rval;
  if (!isEmpty(buff)) {
    printf("Error:line %d: Missing arguments\n", line);
    return -1;
  }
  if (label) {
    printf("warnning:line %d:no need lable for .entry function.\n", line);
  }
  if ((rval = isDirectiveAddressing(buff, line)) == -1) {
    return -1;
  } else if (rval == 1) {
    return 0;
  }
  printf("error : line %d: unligal label!!\n", line);
  return -1;
}


x86 assembly (clang, -O0):
<entryF>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    %edx,-0x1c(%rbp)
mov    -0x10(%rbp),%rdi
call   1040 <isEmpty@plt>
cmp    $0x0,%eax
jne    1170 <entryF+0x40>
mov    -0x1c(%rbp),%esi
lea    0xea1(%rip),%rdi
call   1030 <printf@plt>
movl   $0xffffffff,-0x4(%rbp)
jmp    11df <entryF+0xaf>
cmpq   $0x0,-0x18(%rbp)
je     118a <entryF+0x5a>
mov    -0x1c(%rbp),%esi
lea    0xe9d(%rip),%rdi
call   1030 <printf@plt>
mov    -0x10(%rbp),%rdi
mov    -0x1c(%rbp),%esi
call   1050 <isDirectiveAddressing@plt>
mov    %eax,-0x20(%rbp)
cmp    $0xffffffff,%eax
jne    11ae <entryF+0x7e>
movl   $0xffffffff,-0x4(%rbp)
jmp    11df <entryF+0xaf>
cmpl   $0x1,-0x20(%rbp)
jne    11c4 <entryF+0x94>
movl   $0x0,-0x4(%rbp)
jmp    11df <entryF+0xaf>
jmp    11c9 <entryF+0x99>
mov    -0x1c(%rbp),%esi
lea    0xe84(%rip),%rdi
call   1030 <printf@plt>
movl   $0xffffffff,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<entryF>:
push   %rbp
push   %r14
push   %rbx
mov    %edx,%r14d
mov    %rsi,%rbp
mov    %rdi,%rbx
call   1040 <isEmpty@plt>
test   %eax,%eax
je     1173 <entryF+0x43>
test   %rbp,%rbp
je     115a <entryF+0x2a>
lea    0xed0(%rip),%rdi
mov    %r14d,%esi
call   1030 <printf@plt>
mov    %rbx,%rdi
mov    %r14d,%esi
call   1050 <isDirectiveAddressing@plt>
cmp    $0xffffffff,%eax
je     1190 <entryF+0x60>
cmp    $0x1,%eax
jne    117c <entryF+0x4c>
xor    %eax,%eax
jmp    1190 <entryF+0x60>
lea    0xe86(%rip),%rdi
jmp    1183 <entryF+0x53>
lea    0xed4(%rip),%rdi
mov    %r14d,%esi
call   1030 <printf@plt>
mov    $0xffffffff,%eax
pop    %rbx
pop    %r14
pop    %rbp
ret

LLVM IR (-O0):
@.str = [34 x i8] c"Error:line %d: Missing arguments\0A\00"
@.str.1 = [53 x i8] c"warnning:line %d:no need lable for .entry function.\0A\00"
@.str.2 = [34 x i8] c"error : line %d: unligal label!!\0A\00"
define i32 @entryF(i8* %0, i8* %1, i32 %2) {
%4 = alloca i32
%5 = alloca i8*
%6 = alloca i8*
%7 = alloca i32
%8 = alloca i32
store i8* %0, i8** %5
store i8* %1, i8** %6
store i32 %2, i32* %7
%9 = load i8*, i8** %5
%10 = call i32 @isEmpty(i8* %9)
%11 = icmp ne i32 %10, 0
br i1 %11, label %15, label %12
12: ; preds = %3
%13 = load i32, i32* %7
%14 = call i32 @printf(i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str, i64 0, i64 0), i32 %13)
store i32 -1, i32* %4
br label %35
15: ; preds = %3
%16 = load i8*, i8** %6
%17 = icmp ne i8* %16, null
br i1 %17, label %18, label %21
18: ; preds = %15
%19 = load i32, i32* %7
%20 = call i32 @printf(i8* getelementptr inbounds ([53 x i8], [53 x i8]* @.str.1, i64 0, i64 0), i32 %19)
br label %21
21: ; preds = %18, %15
%22 = load i8*, i8** %5
%23 = load i32, i32* %7
%24 = call i32 @isDirectiveAddressing(i8* %22, i32 %23)
store i32 %24, i32* %8
%25 = icmp eq i32 %24, -1
br i1 %25, label %26, label %27
26: ; preds = %21
store i32 -1, i32* %4
br label %35
27: ; preds = %21
%28 = load i32, i32* %8
%29 = icmp eq i32 %28, 1
br i1 %29, label %30, label %31
30: ; preds = %27
store i32 0, i32* %4
br label %35
31: ; preds = %27
br label %32
32: ; preds = %31
%33 = load i32, i32* %7
%34 = call i32 @printf(i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str.2, i64 0, i64 0), i32 %33)
store i32 -1, i32* %4
br label %35
35: ; preds = %32, %30, %26, %12
%36 = load i32, i32* %4
ret i32 %36
}

LLVM IR (-O2):
@.str = [34 x i8] c"Error:line %d: Missing arguments\0A\00"
@.str.1 = [53 x i8] c"warnning:line %d:no need lable for .entry function.\0A\00"
@.str.2 = [34 x i8] c"error : line %d: unligal label!!\0A\00"
define i32 @entryF(i8* %0, i8* readnone %1, i32 %2) {
%4 = tail call i32 @isEmpty(i8* %0)
%5 = icmp eq i32 %4, 0
br i1 %5, label %6, label %8
6: ; preds = %3
%7 = tail call i32 @printf(i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str, i64 0, i64 0), i32 %2)
br label %17
8: ; preds = %3
%9 = icmp eq i8* %1, null
br i1 %9, label %12, label %10
10: ; preds = %8
%11 = tail call i32 @printf(i8* getelementptr inbounds ([53 x i8], [53 x i8]* @.str.1, i64 0, i64 0), i32 %2)
br label %12
12: ; preds = %10, %8
%13 = tail call i32 @isDirectiveAddressing(i8* %0, i32 %2)
switch i32 %13, label %15 [
i32 -1, label %17
i32 1, label %14
]
14: ; preds = %12
br label %17
15: ; preds = %12
%16 = tail call i32 @printf(i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str.2, i64 0, i64 0), i32 %2)
br label %17
17: ; preds = %12, %15, %14, %6
%18 = phi i32 [ 0, %14 ], [ -1, %15 ], [ -1, %6 ], [ %13, %12 ]
ret i32 %18
}