// File: /workspace/github_c_makefile_star2_O0/theck01[P]offbrand_lib/src/tests/obvector_test.c
// Function: main
int main(){

  uint32_t i, id;
  obtest *tests[6], *singleton, *tmp;
  obvector *main_vec, *copy_vec;

  main_vec = obvector_new(1);
  singleton = obtest_new(7);

  for(i=0; i<6; i++){
    tests[i] = obtest_new(i);
    obvector_store_at_index(main_vec, (obj *)tests[i], i);

    if(ob_reference_count((obj *)tests[i]) != 2){
      fprintf(stderr, "obvector_test: vector did not properly ob_retain element "
                      "TEST FAILED\n");
      exit(1);
    }

    ob_release((obj *)tests[i]); /* vector should maintain only references */
  }

  if(obvector_length(main_vec) != 6){
    fprintf(stderr, "obvector_test: vector size is off, TEST FAILED\n");
    exit(1);
  }

  for(i=0; i<6; i++){
    if(obtest_id((obtest *)obvector_obj_at_index(main_vec,i)) != i){
      fprintf(stderr, "obvector_test: vector does not contain added contents "
                      "in expected order\nTEST FAILED\n");
      printf("%d\n", i);
      exit(1);
    }
  }

  obvector_store_at_index(main_vec, (obj *)singleton, 12);
  if(obvector_length(main_vec) != 13){
    fprintf(stderr, "obvector_test: store did not properly extend length "
                    "TEST FAILED\n");
    exit(1);
  }


  obvector_store_at_index(main_vec, NULL, 12);
  if(obvector_length(main_vec) != 6){
    fprintf(stderr, "obvector_test: remove did not properly get rid of element "
                    "TEST FAILED\n");
    exit(1);
  }

  if(ob_reference_count((obj *)singleton) != 1){
    fprintf(stderr, "obvector_test: vector did not ob_release element on removal "
                    "TEST FAILED\n");
    exit(1);
  }

  tmp = (obtest *)obvector_obj_at_index(main_vec, 3);
  ob_retain((obj *)tmp);

  obvector_store_at_index(main_vec, (obj *)singleton, 3);
  if(ob_reference_count((obj *)tmp) != 1){
    fprintf(stderr, "obvector_test: vector did not ob_release element on "
                    "replacement, TEST FAILED\n");
    exit(1);
  }

  if(obvector_length(main_vec) != 6 ||
     obtest_id((obtest *)obvector_obj_at_index(main_vec, 3)) !=
     obtest_id(singleton)){
    fprintf(stderr, "obvector_test: element was not added properly to vector "
                    "at index\nTEST FAILED\n");
    exit(1);
  }

  obvector_store_at_index(main_vec, (obj *)tmp, 3);

  /* reduce reference count to 1, so only vector holds reference to obj */
  ob_release((obj *)tmp);

  if(obvector_find_obj(main_vec, (obj *)singleton)){
    fprintf(stderr, "obvector_test: vector did not replace element correctly, "
                    "or was not found\nTEST FAILED\n");
    exit(1);
  }

  obvector_store_at_index(main_vec, (obj *)singleton, 10);
  if(obvector_length(main_vec) != 11){
    fprintf(stderr, "obvector_test: store did not properly extend length "
                    "TEST FAILED\n");
    exit(1);
  }

  obvector_sort(main_vec, OB_LEAST_TO_GREATEST);
  if(obvector_length(main_vec) != 7){
    fprintf(stderr, "obvector_test: sort did not properly remove NULLs "
                    "TEST FAILED\n");
    fprintf(stderr, "obvector_test: vector size == %d\n",
                    obvector_length(main_vec));
    for(i=0; i<obvector_length(main_vec); i++){
      if(obvector_obj_at_index(main_vec, i)) printf("object\n");
      else printf("NULL\n");
    }
    exit(1);
  }

  id = 0;
  for(i=0; i<obvector_length(main_vec); i++){
    if(id > obtest_id((obtest *)obvector_obj_at_index(main_vec, i))){
      fprintf(stderr, "obvector_test: vector was not sorted least to "
                      "greatest, TEST FAILED\n");
      exit(1);
    }
    id = obtest_id((obtest *)obvector_obj_at_index(main_vec, i));
  }

  obvector_store_at_index(main_vec, NULL, 6);
  obvector_store_at_index(main_vec, (obj *)singleton, 10);

  obvector_sort(main_vec, OB_GREATEST_TO_LEAST);
  if(obvector_length(main_vec) != 7){
    fprintf(stderr, "obvector_test: second sort did not properly remove NULLs "
                    "TEST FAILED\n");
    exit(1);
  }

  id = 10;
  for(i=0; i<obvector_length(main_vec); i++){
    if(id < obtest_id((obtest *)obvector_obj_at_index(main_vec, i))){
      fprintf(stderr, "obvector_test: vector was not sorted greatest to "
                      "least, TEST FAILED\n");
      exit(1);
    }
    id = obtest_id((obtest *)obvector_obj_at_index(main_vec, i));
  }

  copy_vec = obvector_copy(main_vec);

  assert(ob_compare((obj *)copy_vec, (obj *)main_vec) == OB_EQUAL_TO);
  assert(ob_hash((obj *)copy_vec) == ob_hash((obj *)main_vec));

  ob_release((obj *)singleton); /* ob_release singleton once so it is only referenced
                                by containing vectors */

  for(i=0; i<obvector_length(main_vec); i++){
    if(ob_reference_count((obj *)(obtest *)obvector_obj_at_index(main_vec, i)) != 2){
      fprintf(stderr, "obvector_test: vector contents not ob_retained on copy, "
                      "TEST FAILED\n");
      exit(1);
    }
  }

  /* get obj at index and ob_retain it so it isnt deallocated */
  tmp = (obtest *)obvector_obj_at_index(main_vec, 3);
  ob_retain((obj *)tmp);

  obvector_store_at_index(main_vec, NULL, 3);

  assert(ob_compare((obj *)copy_vec, (obj *)main_vec) == OB_NOT_EQUAL);
  assert(ob_hash((obj *)copy_vec) != ob_hash((obj *)main_vec));

  if(obvector_find_obj(main_vec, (obj *)tmp)){
    fprintf(stderr, "obvector_test: Item was not removed properly from vector"
                    "index, TEST FAILED\n");
    exit(1);
  }

  obvector_store_at_index(main_vec, (obj *)tmp, 3);
  assert(obvector_length(main_vec) == 7);
  obvector_concat(main_vec, copy_vec);
  assert(obvector_length(main_vec) == 14);

  for(i=0; i<obvector_length(main_vec)/2; i++){
    if(obtest_id((obtest *)obvector_obj_at_index(main_vec,i)) !=
       obtest_id((obtest *)obvector_obj_at_index(main_vec,i+7))){
      fprintf(stderr, "obvector_test: Copy of vector not appended properly, "
                      "TEST FAILED\n");
      exit(1);
    }
  }

  ob_release((obj *)main_vec);
  ob_release((obj *)copy_vec);

  if(ob_reference_count((obj *)tmp) != 1){
    fprintf(stderr, "obvector_test: ob_releases of obvector container did not "
                    "properly manage\ncontained obtest reference count, TEST "
                    "FAILED\n");
    exit(1);
  }

  ob_release((obj *)tmp);

  printf("obvector: TESTS PASSED\n");
  return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0xb0, %rsp
movl $0x0, -0x4(%rbp)
movl $0x1, %edi
callq 0x1de0
movq %rax, -0x58(%rbp)
movl $0x7, %edi
callq 0x1ad0
movq %rax, -0x48(%rbp)
movl $0x0, -0x8(%rbp)
cmpl $0x6, -0x8(%rbp)
jae 0x1280
movl -0x8(%rbp), %edi
callq 0x1ad0
movq %rax, %rcx
movl -0x8(%rbp), %eax
movq %rcx, -0x40(%rbp,%rax,8)
movq -0x58(%rbp), %rdi
movl -0x8(%rbp), %eax
movq -0x40(%rbp,%rax,8), %rsi
movl -0x8(%rbp), %eax
movl %eax, %edx
callq 0x2040
movl -0x8(%rbp), %eax
movq -0x40(%rbp,%rax,8), %rdi
callq 0x3210
cmpl $0x2, %eax
je 0x1268
movq 0x5dab(%rip), %rax      # 0x6ff8
movq (%rax), %rdi
leaq 0x2dad(%rip), %rsi      # 0x4004
movb $0x0, %al
callq 0x1080
movl $0x1, %edi
callq 0x10b0
movl -0x8(%rbp), %eax
movq -0x40(%rbp,%rax,8), %rdi
callq 0x3120
movl -0x8(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x8(%rbp)
jmp 0x1205
movq -0x58(%rbp), %rdi
callq 0x1ff0
cmpl $0x6, %eax
je 0x12b0
movq 0x5d63(%rip), %rax      # 0x6ff8
movq (%rax), %rdi
leaq 0x2dab(%rip), %rsi      # 0x404a
movb $0x0, %al
callq 0x1080
movl $0x1, %edi
callq 0x10b0
movl $0x0, -0x8(%rbp)
cmpl $0x6, -0x8(%rbp)
jae 0x1318
movq -0x58(%rbp), %rdi
movl -0x8(%rbp), %eax
movl %eax, %esi
callq 0x2300
movq %rax, %rdi
callq 0x1d90
cmpl -0x8(%rbp), %eax
je 0x130b
movq 0x5d19(%rip), %rax      # 0x6ff8
movq (%rax), %rdi
leaq 0x2d91(%rip), %rsi      # 0x407a
movb $0x0, %al
callq 0x1080
movl -0x8(%rbp), %esi
leaq 0x2ff6(%rip), %rdi      # 0x42f0
movb $0x0, %al
callq 0x1040
movl $0x1, %edi
callq 0x10b0
jmp 0x130d
movl -0x8(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x8(%rbp)
jmp 0x12b7
movq -0x58(%rbp), %rdi
movq -0x48(%rbp), %rsi
movl $0xc, %edx
callq 0x2040
movq -0x58(%rbp), %rdi
callq 0x1ff0
cmpl $0xd, %eax
je 0x135a
movq 0x5cb9(%rip), %rax      # 0x6ff8
movq (%rax), %rdi
leaq 0x2d86(%rip), %rsi      # 0x40cf
movb $0x0, %al
callq 0x1080
movl $0x1, %edi
callq 0x10b0
movq -0x58(%rbp), %rdi
xorl %eax, %eax
movl %eax, %esi
movl $0xc, %edx
callq 0x2040
movq -0x58(%rbp), %rdi
callq 0x1ff0
cmpl $0x6, %eax
je 0x139c
movq 0x5c77(%rip), %rax      # 0x6ff8
movq (%rax), %rdi
leaq 0x2d85(%rip), %rsi      # 0x4110
movb $0x0, %al
callq 0x1080
movl $0x1, %edi
callq 0x10b0
movq -0x48(%rbp), %rdi
callq 0x3210
cmpl $0x1, %eax
je 0x13cc
movq 0x5c47(%rip), %rax      # 0x6ff8
movq (%rax), %rdi
leaq 0x2d9c(%rip), %rsi      # 0x4157
movb $0x0, %al
callq 0x1080
movl $0x1, %edi
callq 0x10b0
movq -0x58(%rbp), %rdi
movl $0x3, %esi
callq 0x2300
movq %rax, -0x50(%rbp)
movq -0x50(%rbp), %rdi
callq 0x31a0
movq -0x58(%rbp), %rdi
movq -0x48(%rbp), %rsi
movl $0x3, %edx
callq 0x2040
movq -0x50(%rbp), %rdi
callq 0x3210
cmpl $0x1, %eax
je 0x1429
movq 0x5bea(%rip), %rax      # 0x6ff8
movq (%rax), %rdi
leaq 0x2d88(%rip), %rsi      # 0x41a0
movb $0x0, %al
callq 0x1080
movl $0x1, %edi
callq 0x10b0
movq -0x58(%rbp), %rdi
callq 0x1ff0
cmpl $0x6, %eax
jne 0x1462
movq -0x58(%rbp), %rdi
movl $0x3, %esi
callq 0x2300
movq %rax, %rdi
callq 0x1d90
movl %eax, -0x64(%rbp)
movq -0x48(%rbp), %rdi
callq 0x1d90
movl %eax, %ecx
movl -0x64(%rbp), %eax
cmpl %ecx, %eax
je 0x1484
movq 0x5b8f(%rip), %rax      # 0x6ff8
movq (%rax), %rdi
leaq 0x2d7b(%rip), %rsi      # 0x41ee
movb $0x0, %al
callq 0x1080
movl $0x1, %edi
callq 0x10b0
movq -0x58(%rbp), %rdi
movq -0x50(%rbp), %rsi
movl $0x3, %edx
callq 0x2040
movq -0x50(%rbp), %rdi
callq 0x3120
movq -0x58(%rbp), %rdi
movq -0x48(%rbp), %rsi
callq 0x2510
cmpb $0x0, %al
je 0x14d2
movq 0x5b41(%rip), %rax      # 0x6ff8
movq (%rax), %rdi
leaq 0x2d7b(%rip), %rsi      # 0x423c
movb $0x0, %al
callq 0x1080
movl $0x1, %edi
callq 0x10b0
movq -0x58(%rbp), %rdi
movq -0x48(%rbp), %rsi
movl $0xa, %edx
callq 0x2040
movq -0x58(%rbp), %rdi
callq 0x1ff0
cmpl $0xb, %eax
je 0x1514
movq 0x5aff(%rip), %rax      # 0x6ff8
movq (%rax), %rdi
leaq 0x2bcc(%rip), %rsi      # 0x40cf
movb $0x0, %al
callq 0x1080
movl $0x1, %edi
callq 0x10b0
movq -0x58(%rbp), %rdi
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
callq 0x25d0
movq -0x58(%rbp), %rdi
callq 0x1ff0
cmpl $0x7, %eax
je 0x15df
movq 0x5abd(%rip), %rax      # 0x6ff8
movq (%rax), %rdi
leaq 0x2d4e(%rip), %rsi      # 0x4293
movb $0x0, %al
callq 0x1080
movq 0x5aa5(%rip), %rax      # 0x6ff8
movq (%rax), %rax
movq %rax, -0x70(%rbp)
movq -0x58(%rbp), %rdi
callq 0x1ff0
movq -0x70(%rbp), %rdi
movl %eax, %edx
leaq 0x2d62(%rip), %rsi      # 0x42d2
movb $0x0, %al
callq 0x1080
movl $0x0, -0x8(%rbp)
movl -0x8(%rbp), %eax
movl %eax, -0x74(%rbp)
movq -0x58(%rbp), %rdi
callq 0x1ff0
movl %eax, %ecx
movl -0x74(%rbp), %eax
cmpl %ecx, %eax
jae 0x15d5
movq -0x58(%rbp), %rdi
movl -0x8(%rbp), %eax
movl %eax, %esi
callq 0x2300
cmpq $0x0, %rax
je 0x15ba
leaq 0x2d43(%rip), %rdi      # 0x42f4
movb $0x0, %al
callq 0x1040
jmp 0x15c8
leaq 0x2d3b(%rip), %rdi      # 0x42fc
movb $0x0, %al
callq 0x1040
jmp 0x15ca
movl -0x8(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x8(%rbp)
jmp 0x157e
movl $0x1, %edi
callq 0x10b0
movl $0x0, -0xc(%rbp)
movl $0x0, -0x8(%rbp)
movl -0x8(%rbp), %eax
movl %eax, -0x78(%rbp)
movq -0x58(%rbp), %rdi
callq 0x1ff0
movl %eax, %ecx
movl -0x78(%rbp), %eax
cmpl %ecx, %eax
jae 0x1673
movl -0xc(%rbp), %eax
movl %eax, -0x7c(%rbp)
movq -0x58(%rbp), %rdi
movl -0x8(%rbp), %eax
movl %eax, %esi
callq 0x2300
movq %rax, %rdi
callq 0x1d90
movl %eax, %ecx
movl -0x7c(%rbp), %eax
cmpl %ecx, %eax
jbe 0x164c
movq 0x59c7(%rip), %rax      # 0x6ff8
movq (%rax), %rdi
leaq 0x2cc7(%rip), %rsi      # 0x4302
movb $0x0, %al
callq 0x1080
movl $0x1, %edi
callq 0x10b0
movq -0x58(%rbp), %rdi
movl -0x8(%rbp), %eax
movl %eax, %esi
callq 0x2300
movq %rax, %rdi
callq 0x1d90
movl %eax, -0xc(%rbp)
movl -0x8(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x8(%rbp)
jmp 0x15ed
movq -0x58(%rbp), %rdi
xorl %eax, %eax
movl %eax, %esi
movl $0x6, %edx
callq 0x2040
movq -0x58(%rbp), %rdi
movq -0x48(%rbp), %rsi
movl $0xa, %edx
callq 0x2040
movq -0x58(%rbp), %rdi
movl $0x1, %esi
callq 0x25d0
movq -0x58(%rbp), %rdi
callq 0x1ff0
cmpl $0x7, %eax
je 0x16d5
movq 0x593e(%rip), %rax      # 0x6ff8
movq (%rax), %rdi
leaq 0x2c83(%rip), %rsi      # 0x4347
movb $0x0, %al
callq 0x1080
movl $0x1, %edi
callq 0x10b0
movl $0xa, -0xc(%rbp)
movl $0x0, -0x8(%rbp)
movl -0x8(%rbp), %eax
movl %eax, -0x80(%rbp)
movq -0x58(%rbp), %rdi
callq 0x1ff0
movl %eax, %ecx
movl -0x80(%rbp), %eax
cmpl %ecx, %eax
jae 0x176f
movl -0xc(%rbp), %eax
movl %eax, -0x84(%rbp)
movq -0x58(%rbp), %rdi
movl -0x8(%rbp), %eax
movl %eax, %esi
callq 0x2300
movq %rax, %rdi
callq 0x1d90
movl %eax, %ecx
movl -0x84(%rbp), %eax
cmpl %ecx, %eax
jae 0x1748
movq 0x58cb(%rip), %rax      # 0x6ff8
movq (%rax), %rdi
leaq 0x2c56(%rip), %rsi      # 0x438d
movb $0x0, %al
callq 0x1080
movl $0x1, %edi
callq 0x10b0
movq -0x58(%rbp), %rdi
movl -0x8(%rbp), %eax
movl %eax, %esi
callq 0x2300
movq %rax, %rdi
callq 0x1d90
movl %eax, -0xc(%rbp)
movl -0x8(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x8(%rbp)
jmp 0x16e3
movq -0x58(%rbp), %rdi
callq 0x1f40
movq %rax, -0x60(%rbp)
movq -0x60(%rbp), %rdi
movq -0x58(%rbp), %rsi
callq 0x3000
movsbl %al, %eax
cmpl $0x0, %eax
jne 0x1793
jmp 0x17b2
leaq 0x2c38(%rip), %rdi      # 0x43d2
leaq 0x2c6d(%rip), %rsi      # 0x440e
movl $0x98, %edx
leaq 0x2c7b(%rip), %rcx      # 0x4428
callq 0x1050
movq -0x60(%rbp), %rdi
callq 0x2f60
movq %rax, -0x90(%rbp)
movq -0x58(%rbp), %rdi
callq 0x2f60
movq %rax, %rcx
movq -0x90(%rbp), %rax
cmpq %rcx, %rax
jne 0x17dc
jmp 0x17fb
leaq 0x2c50(%rip), %rdi      # 0x4433
leaq 0x2c24(%rip), %rsi      # 0x440e
movl $0x99, %edx
leaq 0x2c32(%rip), %rcx      # 0x4428
callq 0x1050
movq -0x48(%rbp), %rdi
callq 0x3120
movl $0x0, -0x8(%rbp)
movl -0x8(%rbp), %eax
movl %eax, -0x94(%rbp)
movq -0x58(%rbp), %rdi
callq 0x1ff0
movl %eax, %ecx
movl -0x94(%rbp), %eax
cmpl %ecx, %eax
jae 0x1873
movq -0x58(%rbp), %rdi
movl -0x8(%rbp), %eax
movl %eax, %esi
callq 0x2300
movq %rax, %rdi
callq 0x3210
cmpl $0x2, %eax
je 0x1866
movq 0x57ad(%rip), %rax      # 0x6ff8
movq (%rax), %rdi
leaq 0x2c13(%rip), %rsi      # 0x4468
movb $0x0, %al
callq 0x1080
movl $0x1, %edi
callq 0x10b0
jmp 0x1868
movl -0x8(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x8(%rbp)
jmp 0x180b
movq -0x58(%rbp), %rdi
movl $0x3, %esi
callq 0x2300
movq %rax, -0x50(%rbp)
movq -0x50(%rbp), %rdi
callq 0x31a0
movq -0x58(%rbp), %rdi
xorl %eax, %eax
movl %eax, %esi
movl $0x3, %edx
callq 0x2040
movq -0x60(%rbp), %rdi
movq -0x58(%rbp), %rsi
callq 0x3000
movsbl %al, %eax
cmpl $0x2, %eax
jne 0x18b7
jmp 0x18d6
leaq 0x2bef(%rip), %rdi      # 0x44ad
leaq 0x2b49(%rip), %rsi      # 0x440e
movl $0xac, %edx
leaq 0x2b57(%rip), %rcx      # 0x4428
callq 0x1050
movq -0x60(%rbp), %rdi
callq 0x2f60
movq %rax, -0xa0(%rbp)
movq -0x58(%rbp), %rdi
callq 0x2f60
movq %rax, %rcx
movq -0xa0(%rbp), %rax
cmpq %rcx, %rax
je 0x1900
jmp 0x191f
leaq 0x2be3(%rip), %rdi      # 0x44ea
leaq 0x2b00(%rip), %rsi      # 0x440e
movl $0xad, %edx
leaq 0x2b0e(%rip), %rcx      # 0x4428
callq 0x1050
movq -0x58(%rbp), %rdi
movq -0x50(%rbp), %rsi
callq 0x2510
cmpb $0x0, %al
je 0x1952
movq 0x56c1(%rip), %rax      # 0x6ff8
movq (%rax), %rdi
leaq 0x2bde(%rip), %rsi      # 0x451f
movb $0x0, %al
callq 0x1080
movl $0x1, %edi
callq 0x10b0
movq -0x58(%rbp), %rdi
movq -0x50(%rbp), %rsi
movl $0x3, %edx
callq 0x2040
movq -0x58(%rbp), %rdi
callq 0x1ff0
cmpl $0x7, %eax
jne 0x1974
jmp 0x1993
leaq 0x2bf0(%rip), %rdi      # 0x456b
leaq 0x2a8c(%rip), %rsi      # 0x440e
movl $0xb6, %edx
leaq 0x2a9a(%rip), %rcx      # 0x4428
callq 0x1050
movq -0x58(%rbp), %rdi
movq -0x60(%rbp), %rsi
callq 0x23e0
movq -0x58(%rbp), %rdi
callq 0x1ff0
cmpl $0xe, %eax
jne 0x19b0
jmp 0x19cf
leaq 0x2bd3(%rip), %rdi      # 0x458a
leaq 0x2a50(%rip), %rsi      # 0x440e
movl $0xb8, %edx
leaq 0x2a5e(%rip), %rcx      # 0x4428
callq 0x1050
movl $0x0, -0x8(%rbp)
movl -0x8(%rbp), %eax
movl %eax, -0xa4(%rbp)
movq -0x58(%rbp), %rdi
callq 0x1ff0
movl %eax, %ecx
movl -0xa4(%rbp), %eax
shrl %ecx
cmpl %ecx, %eax
jae 0x1a6b
movq -0x58(%rbp), %rdi
movl -0x8(%rbp), %eax
movl %eax, %esi
callq 0x2300
movq %rax, %rdi
callq 0x1d90
movl %eax, -0xa8(%rbp)
movq -0x58(%rbp), %rdi
movl -0x8(%rbp), %eax
addl $0x7, %eax
movl %eax, %eax
movl %eax, %esi
callq 0x2300
movq %rax, %rdi
callq 0x1d90
movl %eax, %ecx
movl -0xa8(%rbp), %eax
cmpl %ecx, %eax
je 0x1a5b
movq 0x55b8(%rip), %rax      # 0x6ff8
movq (%rax), %rdi
leaq 0x2b60(%rip), %rsi      # 0x45aa
movb $0x0, %al
callq 0x1080
movl $0x1, %edi
callq 0x10b0
jmp 0x1a5d
movl -0x8(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x8(%rbp)
jmp 0x19d6
movq -0x58(%rbp), %rdi
callq 0x3120
movq -0x60(%rbp), %rdi
callq 0x3120
movq -0x50(%rbp), %rdi
callq 0x3210
cmpl $0x1, %eax
je 0x1aad
movq 0x5566(%rip), %rax      # 0x6ff8
movq (%rax), %rdi
leaq 0x2b50(%rip), %rsi      # 0x45ec
movb $0x0, %al
callq 0x1080
movl $0x1, %edi
callq 0x10b0
movq -0x50(%rbp), %rdi
callq 0x3120
leaq 0x2ba7(%rip), %rdi      # 0x4664
movb $0x0, %al
callq 0x1040
xorl %eax, %eax
addq $0xb0, %rsp
popq %rbp
retq
nop