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

/* Variables and functions */
struct ll *insert_front(struct ll *, int);
int /*<<< orphan*/ print(struct ll *);
struct ll *reverse(struct ll *);
int main() {
  struct ll *myList = NULL;
  myList = insert_front(myList, 7);
  myList = insert_front(myList, 3);
  myList = insert_front(myList, 6);
  myList = insert_front(myList, 10);
  print(myList);
  myList = reverse(myList);
  print(myList);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movq   $0x0,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
mov    $0x7,%esi
call   1050 <insert_front@plt>
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
mov    $0x3,%esi
call   1050 <insert_front@plt>
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
mov    $0x6,%esi
call   1050 <insert_front@plt>
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
mov    $0xa,%esi
call   1050 <insert_front@plt>
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
call   1040 <print@plt>
mov    -0x10(%rbp),%rdi
call   1030 <reverse@plt>
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
call   1040 <print@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
xor    %edi,%edi
mov    $0x7,%esi
call   1050 <insert_front@plt>
mov    %rax,%rdi
mov    $0x3,%esi
call   1050 <insert_front@plt>
mov    %rax,%rdi
mov    $0x6,%esi
call   1050 <insert_front@plt>
mov    %rax,%rdi
mov    $0xa,%esi
call   1050 <insert_front@plt>
mov    %rax,%rbx
mov    %rax,%rdi
call   1040 <print@plt>
mov    %rbx,%rdi
call   1030 <reverse@plt>
mov    %rax,%rdi
call   1040 <print@plt>
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
%struct.ll = type { i32 }
define i32 @main() {
%1 = alloca i32
%2 = alloca %struct.ll*
store i32 0, i32* %1
store %struct.ll* null, %struct.ll** %2
%3 = load %struct.ll*, %struct.ll** %2
%4 = call %struct.ll* @insert_front(%struct.ll* %3, i32 7)
store %struct.ll* %4, %struct.ll** %2
%5 = load %struct.ll*, %struct.ll** %2
%6 = call %struct.ll* @insert_front(%struct.ll* %5, i32 3)
store %struct.ll* %6, %struct.ll** %2
%7 = load %struct.ll*, %struct.ll** %2
%8 = call %struct.ll* @insert_front(%struct.ll* %7, i32 6)
store %struct.ll* %8, %struct.ll** %2
%9 = load %struct.ll*, %struct.ll** %2
%10 = call %struct.ll* @insert_front(%struct.ll* %9, i32 10)
store %struct.ll* %10, %struct.ll** %2
%11 = load %struct.ll*, %struct.ll** %2
%12 = call i32 @print(%struct.ll* %11)
%13 = load %struct.ll*, %struct.ll** %2
%14 = call %struct.ll* @reverse(%struct.ll* %13)
store %struct.ll* %14, %struct.ll** %2
%15 = load %struct.ll*, %struct.ll** %2
%16 = call i32 @print(%struct.ll* %15)
ret i32 0
}

LLVM IR (-O2):
%struct.ll = type { i32 }
define i32 @main() {
%1 = tail call %struct.ll* @insert_front(%struct.ll* null, i32 7)
%2 = tail call %struct.ll* @insert_front(%struct.ll* %1, i32 3)
%3 = tail call %struct.ll* @insert_front(%struct.ll* %2, i32 6)
%4 = tail call %struct.ll* @insert_front(%struct.ll* %3, i32 10)
%5 = tail call i32 @print(%struct.ll* %4)
%6 = tail call %struct.ll* @reverse(%struct.ll* %4)
%7 = tail call i32 @print(%struct.ll* %6)
ret i32 0
}