#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 pilha {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ DESCRIBE(char *);
int /*<<< orphan*/ IF(char *);
int /*<<< orphan*/ THEN(char *);
int /*<<< orphan*/ WHEN(char *);
struct pilha *create();
int /*<<< orphan*/ destroy(struct pilha *);
int /*<<< orphan*/ isEqual(int /*<<< orphan*/, int);
int /*<<< orphan*/ isNotNull(struct pilha *);
int /*<<< orphan*/ vazia(struct pilha *);
void test_create() {
  DESCRIBE("CRIA PILHA");
  WHEN("Eu crio uma pilha");
  IF("Sem parâmetros");
  THEN("Resultado deve ser ponteiro");
  struct pilha *p = create();
  isNotNull(p);
  THEN("Deve ser vazia");
  isEqual(vazia(p), 1);
  destroy(p);
}


x86 assembly (clang, -O0):
<test_create>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    0xe61(%rip),%rdi
call   1080 <DESCRIBE@plt>
lea    0xe60(%rip),%rdi
call   10b0 <WHEN@plt>
lea    0xe66(%rip),%rdi
call   10a0 <IF@plt>
lea    0xe6a(%rip),%rdi
call   1040 <THEN@plt>
mov    $0x0,%al
call   1060 <create@plt>
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1050 <isNotNull@plt>
lea    0xe66(%rip),%rdi
call   1040 <THEN@plt>
mov    -0x8(%rbp),%rdi
call   1030 <vazia@plt>
mov    %eax,%edi
mov    $0x1,%esi
call   1090 <isEqual@plt>
mov    -0x8(%rbp),%rdi
call   1070 <destroy@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_create>:
push   %rbx
lea    0xe68(%rip),%rdi
call   1080 <DESCRIBE@plt>
lea    0xe67(%rip),%rdi
call   10b0 <WHEN@plt>
lea    0xe6d(%rip),%rdi
call   10a0 <IF@plt>
lea    0xe71(%rip),%rdi
call   1040 <THEN@plt>
xor    %eax,%eax
call   1060 <create@plt>
mov    %rax,%rbx
mov    %rax,%rdi
call   1050 <isNotNull@plt>
lea    0xe6f(%rip),%rdi
call   1040 <THEN@plt>
mov    %rbx,%rdi
call   1030 <vazia@plt>
mov    %eax,%edi
mov    $0x1,%esi
call   1090 <isEqual@plt>
mov    %rbx,%rdi
pop    %rbx
jmp    1070 <destroy@plt>

LLVM IR (-O0):
%struct.pilha = type { i32 }
@.str = [11 x i8] c"CRIA PILHA\00"
@.str.1 = [18 x i8] c"Eu crio uma pilha\00"
@.str.2 = [16 x i8] c"Sem par\C3\A2metros\00"
@.str.3 = [28 x i8] c"Resultado deve ser ponteiro\00"
@.str.4 = [15 x i8] c"Deve ser vazia\00"
define void @test_create() {
%1 = alloca %struct.pilha*
%2 = call i32 @DESCRIBE(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0))
%3 = call i32 @WHEN(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.1, i64 0, i64 0))
%4 = call i32 @IF(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.2, i64 0, i64 0))
%5 = call i32 @THEN(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.3, i64 0, i64 0))
%6 = call %struct.pilha* (...) @create()
store %struct.pilha* %6, %struct.pilha** %1
%7 = load %struct.pilha*, %struct.pilha** %1
%8 = call i32 @isNotNull(%struct.pilha* %7)
%9 = call i32 @THEN(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.4, i64 0, i64 0))
%10 = load %struct.pilha*, %struct.pilha** %1
%11 = call i32 @vazia(%struct.pilha* %10)
%12 = call i32 @isEqual(i32 %11, i32 1)
%13 = load %struct.pilha*, %struct.pilha** %1
%14 = call i32 @destroy(%struct.pilha* %13)
ret void
}

LLVM IR (-O2):
%struct.pilha = type { i32 }
@.str = [11 x i8] c"CRIA PILHA\00"
@.str.1 = [18 x i8] c"Eu crio uma pilha\00"
@.str.2 = [16 x i8] c"Sem par\C3\A2metros\00"
@.str.3 = [28 x i8] c"Resultado deve ser ponteiro\00"
@.str.4 = [15 x i8] c"Deve ser vazia\00"
define void @test_create() {
%1 = tail call i32 @DESCRIBE(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0))
%2 = tail call i32 @WHEN(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.1, i64 0, i64 0))
%3 = tail call i32 @IF(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.2, i64 0, i64 0))
%4 = tail call i32 @THEN(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.3, i64 0, i64 0))
%5 = tail call %struct.pilha* (...) @create()
%6 = tail call i32 @isNotNull(%struct.pilha* %5)
%7 = tail call i32 @THEN(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.4, i64 0, i64 0))
%8 = tail call i32 @vazia(%struct.pilha* %5)
%9 = tail call i32 @isEqual(i32 %8, i32 1)
%10 = tail call i32 @destroy(%struct.pilha* %5)
ret void
}