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

/* Variables and functions */
int /*<<< orphan*/ InsertLinkedList(struct linkList **, int, int);
int /*<<< orphan*/ displayList(struct linkList *);
void main() {
  int dat;
  struct linkList *head = NULL;
  InsertLinkedList(&head, 21, 1);
  InsertLinkedList(&head, 31, 2);
  InsertLinkedList(&head, 41, 3);
  InsertLinkedList(&head, 51, 4);
  InsertLinkedList(&head, 61, 5);
  InsertLinkedList(&head, 72, 6);
  InsertLinkedList(&head, 99, 1);
  displayList(head);
  InsertLinkedList(&head, 199, 3);
  displayList(head);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movq   $0x0,-0x10(%rbp)
lea    -0x10(%rbp),%rdi
mov    $0x15,%esi
mov    $0x1,%edx
call   1030 <InsertLinkedList@plt>
lea    -0x10(%rbp),%rdi
mov    $0x1f,%esi
mov    $0x2,%edx
call   1030 <InsertLinkedList@plt>
lea    -0x10(%rbp),%rdi
mov    $0x29,%esi
mov    $0x3,%edx
call   1030 <InsertLinkedList@plt>
lea    -0x10(%rbp),%rdi
mov    $0x33,%esi
mov    $0x4,%edx
call   1030 <InsertLinkedList@plt>
lea    -0x10(%rbp),%rdi
mov    $0x3d,%esi
mov    $0x5,%edx
call   1030 <InsertLinkedList@plt>
lea    -0x10(%rbp),%rdi
mov    $0x48,%esi
mov    $0x6,%edx
call   1030 <InsertLinkedList@plt>
lea    -0x10(%rbp),%rdi
mov    $0x63,%esi
mov    $0x1,%edx
call   1030 <InsertLinkedList@plt>
mov    -0x10(%rbp),%rdi
call   1040 <displayList@plt>
lea    -0x10(%rbp),%rdi
mov    $0xc7,%esi
mov    $0x3,%edx
call   1030 <InsertLinkedList@plt>
mov    -0x10(%rbp),%rdi
call   1040 <displayList@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x10,%rsp
movq   $0x0,0x8(%rsp)
lea    0x8(%rsp),%rbx
mov    %rbx,%rdi
mov    $0x15,%esi
mov    $0x1,%edx
call   1030 <InsertLinkedList@plt>
mov    %rbx,%rdi
mov    $0x1f,%esi
mov    $0x2,%edx
call   1030 <InsertLinkedList@plt>
mov    %rbx,%rdi
mov    $0x29,%esi
mov    $0x3,%edx
call   1030 <InsertLinkedList@plt>
mov    %rbx,%rdi
mov    $0x33,%esi
mov    $0x4,%edx
call   1030 <InsertLinkedList@plt>
mov    %rbx,%rdi
mov    $0x3d,%esi
mov    $0x5,%edx
call   1030 <InsertLinkedList@plt>
mov    %rbx,%rdi
mov    $0x48,%esi
mov    $0x6,%edx
call   1030 <InsertLinkedList@plt>
mov    %rbx,%rdi
mov    $0x63,%esi
mov    $0x1,%edx
call   1030 <InsertLinkedList@plt>
mov    0x8(%rsp),%rdi
call   1040 <displayList@plt>
mov    %rbx,%rdi
mov    $0xc7,%esi
mov    $0x3,%edx
call   1030 <InsertLinkedList@plt>
mov    0x8(%rsp),%rdi
call   1040 <displayList@plt>
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
%struct.linkList = type { i32 }
define void @main() {
%1 = alloca i32
%2 = alloca %struct.linkList*
store %struct.linkList* null, %struct.linkList** %2
%3 = call i32 @InsertLinkedList(%struct.linkList** %2, i32 21, i32 1)
%4 = call i32 @InsertLinkedList(%struct.linkList** %2, i32 31, i32 2)
%5 = call i32 @InsertLinkedList(%struct.linkList** %2, i32 41, i32 3)
%6 = call i32 @InsertLinkedList(%struct.linkList** %2, i32 51, i32 4)
%7 = call i32 @InsertLinkedList(%struct.linkList** %2, i32 61, i32 5)
%8 = call i32 @InsertLinkedList(%struct.linkList** %2, i32 72, i32 6)
%9 = call i32 @InsertLinkedList(%struct.linkList** %2, i32 99, i32 1)
%10 = load %struct.linkList*, %struct.linkList** %2
%11 = call i32 @displayList(%struct.linkList* %10)
%12 = call i32 @InsertLinkedList(%struct.linkList** %2, i32 199, i32 3)
%13 = load %struct.linkList*, %struct.linkList** %2
%14 = call i32 @displayList(%struct.linkList* %13)
ret void
}

LLVM IR (-O2):
%struct.linkList = type { i32 }
define void @main() {
%1 = alloca %struct.linkList*
%2 = bitcast %struct.linkList** %1 to i8*
store %struct.linkList* null, %struct.linkList** %1
%3 = call i32 @InsertLinkedList(%struct.linkList** %1, i32 21, i32 1)
%4 = call i32 @InsertLinkedList(%struct.linkList** %1, i32 31, i32 2)
%5 = call i32 @InsertLinkedList(%struct.linkList** %1, i32 41, i32 3)
%6 = call i32 @InsertLinkedList(%struct.linkList** %1, i32 51, i32 4)
%7 = call i32 @InsertLinkedList(%struct.linkList** %1, i32 61, i32 5)
%8 = call i32 @InsertLinkedList(%struct.linkList** %1, i32 72, i32 6)
%9 = call i32 @InsertLinkedList(%struct.linkList** %1, i32 99, i32 1)
%10 = load %struct.linkList*, %struct.linkList** %1
%11 = call i32 @displayList(%struct.linkList* %10)
%12 = call i32 @InsertLinkedList(%struct.linkList** %1, i32 199, i32 3)
%13 = load %struct.linkList*, %struct.linkList** %1
%14 = call i32 @displayList(%struct.linkList* %13)
ret void
}