// File: /workspace/github_c_makefile_star2_O2/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 0xcea2(%rip), %r13      # 0x10ff8
movq (%r13), %rcx
leaq 0x7534(%rip), %rdi      # 0xb695
pushq $0xf
popq %rsi
pushq $0x1
popq %rdx
callq 0x21b0
callq 0x3ea7
movq %rax, %rbx
xorl %edi, %edi
callq 0x319d
movq %rax, %r15
xorl %edi, %edi
callq 0x319d
testq %rbx, %rbx
jne 0x41a2
leaq 0x80fe(%rip), %rdi      # 0xc28f
leaq 0x7472(%rip), %rsi      # 0xb60a
movl $0xa3, %edx
callq 0x3cc4
movq %rax, %r14
movq %rbx, %rdi
movq %r15, %rsi
callq 0x3f25
movq %rbx, %rdi
callq 0x3fb7
cmpl $0x1, %eax
jne 0x4213
movq %rbx, %rdi
movq %r14, %rsi
callq 0x3f25
movq %rbx, %rdi
callq 0x3fb7
cmpl $0x2, %eax
jne 0x422b
movq %rbx, %rdi
xorl %esi, %esi
callq 0x3fdf
cmpq %r15, %rax
jne 0x4243
pushq $0x1
popq %rsi
movq %rbx, %rdi
callq 0x3fdf
cmpq %r14, %rax
jne 0x425b
movl 0x84(%rbx), %ebp
movq %rbx, %rdi
callq 0x3fb7
cmpl %ebp, %eax
jg 0x4273
movq %rbx, %rdi
movq %r15, %rsi
callq 0x3f25
jmp 0x41fa
leaq 0x748b(%rip), %rdi      # 0xb6a5
leaq 0x73e9(%rip), %rsi      # 0xb60a
movl $0xa6, %edx
callq 0x3cc4
leaq 0x748c(%rip), %rdi      # 0xb6be
leaq 0x73d1(%rip), %rsi      # 0xb60a
movl $0xa8, %edx
callq 0x3cc4
leaq 0x748d(%rip), %rdi      # 0xb6d7
leaq 0x73b9(%rip), %rsi      # 0xb60a
movl $0xaa, %edx
callq 0x3cc4
leaq 0x7491(%rip), %rdi      # 0xb6f3
leaq 0x73a1(%rip), %rsi      # 0xb60a
movl $0xab, %edx
callq 0x3cc4
cmpl %ebp, 0x84(%rbx)
jle 0x434a
movq %rbx, %rdi
xorl %esi, %esi
callq 0x3fdf
cmpq %r15, %rax
jne 0x4362
pushq $0x1
popq %rsi
movq %rbx, %rdi
callq 0x3fdf
cmpq %r14, %rax
jne 0x437a
movq %rbx, %rdi
callq 0x3fb7
leal -0x1(%rax), %esi
movq %rbx, %rdi
callq 0x3fdf
cmpq %r15, %rax
jne 0x4392
leaq 0x74b6(%rip), %r12      # 0xb77f
movq %rbx, %rdi
movq %r12, %rsi
movq %r15, %rdx
callq 0x3f58
leaq 0x74c6(%rip), %rsi      # 0xb7a4
movq %rbx, %rdi
movq %r14, %rdx
callq 0x3f58
movq %rbx, %rdi
movq %r12, %rsi
callq 0x40b6
cmpq %r15, %rax
jne 0x43aa
leaq 0x74a0(%rip), %rsi      # 0xb7a4
movq %rbx, %rdi
callq 0x40b6
cmpq %r14, %rax
jne 0x43c2
leaq 0x748e(%rip), %rsi      # 0xb7aa
movq %rbx, %rdi
callq 0x40b6
testq %rax, %rax
jne 0x43da
movq (%r13), %rcx
leaq 0x74a8(%rip), %rdi      # 0xb7e0
pushq $0x5
popq %rsi
pushq $0x1
popq %rdx
callq 0x21b0
xorl %edi, %edi
callq 0x21a0
leaq 0x73be(%rip), %rdi      # 0xb70f
leaq 0x72b2(%rip), %rsi      # 0xb60a
movl $0xb1, %edx
callq 0x3cc4
leaq 0x736e(%rip), %rdi      # 0xb6d7
leaq 0x729a(%rip), %rsi      # 0xb60a
movl $0xb2, %edx
callq 0x3cc4
leaq 0x7372(%rip), %rdi      # 0xb6f3
leaq 0x7282(%rip), %rsi      # 0xb60a
movl $0xb3, %edx
callq 0x3cc4
leaq 0x7395(%rip), %rdi      # 0xb72e
leaq 0x726a(%rip), %rsi      # 0xb60a
movl $0xb4, %edx
callq 0x3cc4
leaq 0x73af(%rip), %rdi      # 0xb760
leaq 0x7252(%rip), %rsi      # 0xb60a
movl $0xb8, %edx
callq 0x3cc4
leaq 0x73bc(%rip), %rdi      # 0xb785
leaq 0x723a(%rip), %rsi      # 0xb60a
movl $0xb9, %edx
callq 0x3cc4
leaq 0x73d5(%rip), %rdi      # 0xb7b6
leaq 0x7222(%rip), %rsi      # 0xb60a
movl $0xba, %edx
callq 0x3cc4