#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*/ insertNode(int);
int /*<<< orphan*/ kLastElement(int);
int /*<<< orphan*/ print();
int main() {
  insertNode(1);
  insertNode(2);
  insertNode(3);
  insertNode(4);
  insertNode(5);
  insertNode(6);
  insertNode(7);
  insertNode(8);
  print();
  kLastElement(2);
  kLastElement(5);
  kLastElement(1);
  kLastElement(6);
  kLastElement(7);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
mov    $0x1,%edi
call   1030 <insertNode@plt>
mov    $0x2,%edi
call   1030 <insertNode@plt>
mov    $0x3,%edi
call   1030 <insertNode@plt>
mov    $0x4,%edi
call   1030 <insertNode@plt>
mov    $0x5,%edi
call   1030 <insertNode@plt>
mov    $0x6,%edi
call   1030 <insertNode@plt>
mov    $0x7,%edi
call   1030 <insertNode@plt>
mov    $0x8,%edi
call   1030 <insertNode@plt>
mov    $0x0,%al
call   1040 <print@plt>
mov    $0x2,%edi
call   1050 <kLastElement@plt>
mov    $0x5,%edi
call   1050 <kLastElement@plt>
mov    $0x1,%edi
call   1050 <kLastElement@plt>
mov    $0x6,%edi
call   1050 <kLastElement@plt>
mov    $0x7,%edi
call   1050 <kLastElement@plt>
xor    %eax,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    $0x1,%edi
call   1030 <insertNode@plt>
mov    $0x2,%edi
call   1030 <insertNode@plt>
mov    $0x3,%edi
call   1030 <insertNode@plt>
mov    $0x4,%edi
call   1030 <insertNode@plt>
mov    $0x5,%edi
call   1030 <insertNode@plt>
mov    $0x6,%edi
call   1030 <insertNode@plt>
mov    $0x7,%edi
call   1030 <insertNode@plt>
mov    $0x8,%edi
call   1030 <insertNode@plt>
xor    %eax,%eax
call   1040 <print@plt>
mov    $0x2,%edi
call   1050 <kLastElement@plt>
mov    $0x5,%edi
call   1050 <kLastElement@plt>
mov    $0x1,%edi
call   1050 <kLastElement@plt>
mov    $0x6,%edi
call   1050 <kLastElement@plt>
mov    $0x7,%edi
call   1050 <kLastElement@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @main() {
%1 = call i32 @insertNode(i32 1)
%2 = call i32 @insertNode(i32 2)
%3 = call i32 @insertNode(i32 3)
%4 = call i32 @insertNode(i32 4)
%5 = call i32 @insertNode(i32 5)
%6 = call i32 @insertNode(i32 6)
%7 = call i32 @insertNode(i32 7)
%8 = call i32 @insertNode(i32 8)
%9 = call i32 (...) @print()
%10 = call i32 @kLastElement(i32 2)
%11 = call i32 @kLastElement(i32 5)
%12 = call i32 @kLastElement(i32 1)
%13 = call i32 @kLastElement(i32 6)
%14 = call i32 @kLastElement(i32 7)
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 @insertNode(i32 1)
%2 = tail call i32 @insertNode(i32 2)
%3 = tail call i32 @insertNode(i32 3)
%4 = tail call i32 @insertNode(i32 4)
%5 = tail call i32 @insertNode(i32 5)
%6 = tail call i32 @insertNode(i32 6)
%7 = tail call i32 @insertNode(i32 7)
%8 = tail call i32 @insertNode(i32 8)
%9 = tail call i32 (...) @print()
%10 = tail call i32 @kLastElement(i32 2)
%11 = tail call i32 @kLastElement(i32 5)
%12 = tail call i32 @kLastElement(i32 1)
%13 = tail call i32 @kLastElement(i32 6)
%14 = tail call i32 @kLastElement(i32 7)
ret i32 0
}