#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 popNumber();
int /*<<< orphan*/ pushNumber(int /*<<< orphan*/);
int /*<<< orphan*/ triangle(int, int, int, int, int, int);
void basTriangle() {
  int x1, y1, x2, y2, x3, y3;
  y3 = popNumber();
  x3 = popNumber();
  y2 = popNumber();
  x2 = popNumber();
  y1 = popNumber();
  x1 = popNumber();
  pushNumber(triangle(x1, y1, x2, y2, x3, y3));
}


x86 assembly (clang, -O0):
<basTriangle>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    $0x0,%al
call   1050 <popNumber@plt>
mov    %eax,-0x18(%rbp)
mov    $0x0,%al
call   1050 <popNumber@plt>
mov    %eax,-0x14(%rbp)
mov    $0x0,%al
call   1050 <popNumber@plt>
mov    %eax,-0x10(%rbp)
mov    $0x0,%al
call   1050 <popNumber@plt>
mov    %eax,-0xc(%rbp)
mov    $0x0,%al
call   1050 <popNumber@plt>
mov    %eax,-0x8(%rbp)
mov    $0x0,%al
call   1050 <popNumber@plt>
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x8(%rbp),%esi
mov    -0xc(%rbp),%edx
mov    -0x10(%rbp),%ecx
mov    -0x14(%rbp),%r8d
mov    -0x18(%rbp),%r9d
call   1030 <triangle@plt>
mov    %eax,%edi
call   1040 <pushNumber@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<basTriangle>:
push   %rbp
push   %r15
push   %r14
push   %r12
push   %rbx
xor    %eax,%eax
call   1050 <popNumber@plt>
mov    %eax,%r14d
xor    %eax,%eax
call   1050 <popNumber@plt>
mov    %eax,%r15d
xor    %eax,%eax
call   1050 <popNumber@plt>
mov    %eax,%r12d
xor    %eax,%eax
call   1050 <popNumber@plt>
mov    %eax,%ebp
xor    %eax,%eax
call   1050 <popNumber@plt>
mov    %eax,%ebx
xor    %eax,%eax
call   1050 <popNumber@plt>
mov    %eax,%edi
mov    %ebx,%esi
mov    %ebp,%edx
mov    %r12d,%ecx
mov    %r15d,%r8d
mov    %r14d,%r9d
call   1030 <triangle@plt>
mov    %eax,%edi
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
pop    %rbp
jmp    1040 <pushNumber@plt>

LLVM IR (-O0):
define void @basTriangle() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
%7 = call i32 (...) @popNumber()
store i32 %7, i32* %6
%8 = call i32 (...) @popNumber()
store i32 %8, i32* %5
%9 = call i32 (...) @popNumber()
store i32 %9, i32* %4
%10 = call i32 (...) @popNumber()
store i32 %10, i32* %3
%11 = call i32 (...) @popNumber()
store i32 %11, i32* %2
%12 = call i32 (...) @popNumber()
store i32 %12, i32* %1
%13 = load i32, i32* %1
%14 = load i32, i32* %2
%15 = load i32, i32* %3
%16 = load i32, i32* %4
%17 = load i32, i32* %5
%18 = load i32, i32* %6
%19 = call i32 @triangle(i32 %13, i32 %14, i32 %15, i32 %16, i32 %17, i32 %18)
%20 = call i32 @pushNumber(i32 %19)
ret void
}

LLVM IR (-O2):
define void @basTriangle() {
%1 = tail call i32 (...) @popNumber()
%2 = tail call i32 (...) @popNumber()
%3 = tail call i32 (...) @popNumber()
%4 = tail call i32 (...) @popNumber()
%5 = tail call i32 (...) @popNumber()
%6 = tail call i32 (...) @popNumber()
%7 = tail call i32 @triangle(i32 %6, i32 %5, i32 %4, i32 %3, i32 %2, i32 %1)
%8 = tail call i32 @pushNumber(i32 %7)
ret void
}