// File: /workspace/github_c_makefile_star2_O1/hikalium[P]compilium/compilium.c
// Function: TestList
void TestList() {
  fprintf(stderr, "Testing List...");

  struct Node *list = AllocList();
  struct Node *item1 = AllocNode(kNodeNone);
  struct Node *item2 = AllocNode(kNodeNone);
  assert(list);

  PushToList(list, item1);
  assert(GetSizeOfList(list) == 1);
  PushToList(list, item2);
  assert(GetSizeOfList(list) == 2);

  assert(GetNodeAt(list, 0) == item1);
  assert(GetNodeAt(list, 1) == item2);

  int base_capacity = list->capacity;
  while (GetSizeOfList(list) <= base_capacity) {
    PushToList(list, item1);
  }
  assert(list->capacity > base_capacity);
  assert(GetNodeAt(list, 0) == item1);
  assert(GetNodeAt(list, 1) == item2);
  assert(GetNodeAt(list, GetSizeOfList(list) - 1) == item1);

  PushKeyValueToList(list, "item1", item1);
  PushKeyValueToList(list, "item2", item2);
  assert(GetNodeByKey(list, "item1") == item1);
  assert(GetNodeByKey(list, "item2") == item2);
  assert(GetNodeByKey(list, "not_existed") == NULL);

  fprintf(stderr, "PASS\n");
  exit(EXIT_SUCCESS);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq 0xc511(%rip), %r13      # 0x10ff8
movq (%r13), %rcx
leaq 0x6ba3(%rip), %rdi      # 0xb695
movl $0xf, %esi
movl $0x1, %edx
callq 0x21b0
movl $0x6, %edi
callq 0x3f05
movq %rax, %rbx
xorl %edi, %edi
callq 0x3f05
movq %rax, %r15
xorl %edi, %edi
callq 0x3f05
testq %rbx, %rbx
jne 0x4b3c
leaq 0x7768(%rip), %rdi      # 0xc293
leaq 0x6ad8(%rip), %rsi      # 0xb60a
movl $0xa3, %edx
callq 0x4704
movq %rax, %r14
movq %rbx, %rdi
callq 0x4810
movq 0x90(%rbx), %rcx
movslq 0x88(%rbx), %rax
leal 0x1(%rax), %edx
movl %edx, 0x88(%rbx)
movq %r15, (%rcx,%rax,8)
cmpl $0x6, (%rbx)
jne 0x4c0c
testl %eax, %eax
jne 0x4c24
movq %rbx, %rdi
callq 0x4810
movq 0x90(%rbx), %rcx
movslq 0x88(%rbx), %rdx
leal 0x1(%rdx), %eax
movl %eax, 0x88(%rbx)
movq %r14, (%rcx,%rdx,8)
cmpl $0x6, (%rbx)
jne 0x4c0c
cmpl $0x2, %eax
jne 0x4c3c
movq %rbx, %rdi
xorl %esi, %esi
callq 0x494c
cmpq %r15, %rax
jne 0x4c54
movq %rbx, %rdi
movl $0x1, %esi
callq 0x494c
cmpq %r14, %rax
jne 0x4c6c
cmpl $0x6, (%rbx)
jne 0x4c0c
movl 0x84(%rbx), %ebp
cmpl %ebp, 0x88(%rbx)
jg 0x4c84
movq %rbx, %rdi
callq 0x4810
movq 0x90(%rbx), %rax
movslq 0x88(%rbx), %rcx
leal 0x1(%rcx), %edx
movl %edx, 0x88(%rbx)
movq %r15, (%rax,%rcx,8)
cmpl $0x6, (%rbx)
je 0x4bd8
leaq 0x6a42(%rip), %rdi      # 0xb655
leaq 0x69f0(%rip), %rsi      # 0xb60a
movl $0x7f, %edx
callq 0x4704
leaq 0x6a7a(%rip), %rdi      # 0xb6a5
leaq 0x69d8(%rip), %rsi      # 0xb60a
movl $0xa6, %edx
callq 0x4704
leaq 0x6a7b(%rip), %rdi      # 0xb6be
leaq 0x69c0(%rip), %rsi      # 0xb60a
movl $0xa8, %edx
callq 0x4704
leaq 0x6a7c(%rip), %rdi      # 0xb6d7
leaq 0x69a8(%rip), %rsi      # 0xb60a
movl $0xaa, %edx
callq 0x4704
leaq 0x6a80(%rip), %rdi      # 0xb6f3
leaq 0x6990(%rip), %rsi      # 0xb60a
movl $0xab, %edx
callq 0x4704
cmpl %ebp, 0x84(%rbx)
jle 0x4d67
movq %rbx, %rdi
xorl %esi, %esi
callq 0x494c
cmpq %r15, %rax
jne 0x4d7f
movq %rbx, %rdi
movl $0x1, %esi
callq 0x494c
cmpq %r14, %rax
jne 0x4d97
cmpl $0x6, (%rbx)
jne 0x4c0c
movl 0x88(%rbx), %esi
decl %esi
movq %rbx, %rdi
callq 0x494c
cmpq %r15, %rax
jne 0x4daf
leaq 0x6a9d(%rip), %r12      # 0xb77f
movq %rbx, %rdi
movq %r12, %rsi
movq %r15, %rdx
callq 0x48c1
leaq 0x6aad(%rip), %rsi      # 0xb7a4
movq %rbx, %rdi
movq %r14, %rdx
callq 0x48c1
movq %rbx, %rdi
movq %r12, %rsi
callq 0x4a3d
cmpq %r15, %rax
jne 0x4dc7
leaq 0x6a87(%rip), %rsi      # 0xb7a4
movq %rbx, %rdi
callq 0x4a3d
cmpq %r14, %rax
jne 0x4ddf
leaq 0x6a75(%rip), %rsi      # 0xb7aa
movq %rbx, %rdi
callq 0x4a3d
testq %rax, %rax
jne 0x4df7
movq (%r13), %rcx
leaq 0x6a8f(%rip), %rdi      # 0xb7e0
movl $0x5, %esi
movl $0x1, %edx
callq 0x21b0
xorl %edi, %edi
callq 0x21a0
leaq 0x69a1(%rip), %rdi      # 0xb70f
leaq 0x6895(%rip), %rsi      # 0xb60a
movl $0xb1, %edx
callq 0x4704
leaq 0x6951(%rip), %rdi      # 0xb6d7
leaq 0x687d(%rip), %rsi      # 0xb60a
movl $0xb2, %edx
callq 0x4704
leaq 0x6955(%rip), %rdi      # 0xb6f3
leaq 0x6865(%rip), %rsi      # 0xb60a
movl $0xb3, %edx
callq 0x4704
leaq 0x6978(%rip), %rdi      # 0xb72e
leaq 0x684d(%rip), %rsi      # 0xb60a
movl $0xb4, %edx
callq 0x4704
leaq 0x6992(%rip), %rdi      # 0xb760
leaq 0x6835(%rip), %rsi      # 0xb60a
movl $0xb8, %edx
callq 0x4704
leaq 0x699f(%rip), %rdi      # 0xb785
leaq 0x681d(%rip), %rsi      # 0xb60a
movl $0xb9, %edx
callq 0x4704
leaq 0x69b8(%rip), %rdi      # 0xb7b6
leaq 0x6805(%rip), %rsi      # 0xb60a
movl $0xba, %edx
callq 0x4704