// File: /workspace/github_cpp_makefile_star2_O1/shreyas-gopalakrishna[P]Concurrent-Skip-list/unit_test_3.cpp
// Function: main
int main(int argc, char *argv[]){

    cout << "\n---------- Unit Test - 3 ----------" << endl;

    cout << "\nThis Unit test uses 8 Threads. Numbers (1-5000) are used for this unit test." << endl;
    cout << "All threads call a function which performs insert, delete, search and range with random numbers (1-5000)." << endl;
    cout << "This simulates all operations parallelly on the skip list." << endl;

    cout << "\nThe final elements in the skip list will be based on if insert or delete got scheduled and executed first for any given element.\n" << endl;
    
    cout << "Few of the numbers from the 'delete vector' are deleted from the skip list and few may still exist since insert got scheduled after delete for these numbers." << endl;
    cout << "But the tests notice that none of the numbers not present in the 'delete vector' are deleted. And our traversal of the skip list is sorted. This verifies our skip list to be accurate. \n" << endl;

	generate_input(5000);

    skiplist = SkipList(numbers_insert.size(), 0.5);

    concurrent_skiplist_combined();

    // checking if insert is done
    if(skiplist.search(numbers_insert[0]) == to_string(numbers_insert[0]) || skiplist.search(numbers_insert[0]) == ""){
        cout << "Unit Test 1: Insert: PASS" << endl;
    }else{
        cout << "Unit Test 1: Insert: FAIL" << endl;
    }

    // checking if insert is done
    if(skiplist.search(numbers_insert[1]) == to_string(numbers_insert[1]) || skiplist.search(numbers_insert[1]) == "" ){
        cout << "Unit Test 2: Insert: PASS" << endl;
    }else{
        cout << "Unit Test 2: Insert: FAIL" << endl;
    }


    // checking if delete is done
    if(skiplist.search(numbers_delete[0]) == ""){
        cout << "Unit Test 3: Delete: PASS" << endl;
    }else{
        cout << "Unit Test 3: Delete: FAIL" << endl;
    }

    // checking if delete is done
    if(skiplist.search(numbers_delete[1]) == ""){
        cout << "Unit Test 4: Delete: PASS" << endl;
    }else{
        cout << "Unit Test 4: Delete: FAIL" << endl;
    }


    if(skiplist.search(numbers_get[0]) == to_string(numbers_get[0]) || skiplist.search(numbers_get[0]) == ""){
        cout << "Unit Test 5: Search: PASS" << endl;
    }else{
        cout << "Unit Test 5: Insert: FAIL" << endl;
    }

    // checking if Search is done
    if(skiplist.search(numbers_get[1]) == to_string(numbers_get[1]) || skiplist.search(numbers_get[1]) == ""){
        cout << "Unit Test 6: Search: PASS" << endl;
    }else{
        cout << "Unit Test 6: Search: FAIL" << endl;
    }

    // checking by search if deleted element is present
    if(skiplist.search(numbers_delete[0]) == ""){
        cout << "Unit Test 7: Search: PASS" << endl;
    }else{
        cout << "Unit Test 7: Search: FAIL" << endl;
    }

    map<int, string> range_output = skiplist.range(1, 5000);

    // checking range
    if(range_output.count(numbers_delete[0]) == 0){
        cout << "Unit Test 8: Range: PASS" << endl;
    }else{
        cout << "Unit Test 8: Range: FAIL" << endl;
    }

    // checking range
    if(range_output.count(numbers_delete[1]) == 0){
        cout << "Unit Test 9: Range: PASS" << endl;
    }else{
        cout << "Unit Test 9: Range: FAIL" << endl;
    }

	
    return 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xd8, %rsp
movq 0x6351(%rip), %rbx      # 0x8fd0
leaq 0x339a(%rip), %rsi      # 0x6020
movl $0x24, %edx
movq %rbx, %rdi
callq 0x2200
movq (%rbx), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x21a0
movsbl %al, %esi
movq %rbx, %rdi
callq 0x2030
movq %rax, %rdi
callq 0x2110
leaq 0x3384(%rip), %rsi      # 0x6045
movl $0x4d, %edx
movq %rbx, %rdi
callq 0x2200
movq (%rbx), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x21a0
movsbl %al, %esi
movq %rbx, %rdi
callq 0x2030
movq %rax, %rdi
callq 0x2110
leaq 0x3397(%rip), %rsi      # 0x6093
movl $0x69, %edx
movq %rbx, %rdi
callq 0x2200
movq (%rbx), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x21a0
movsbl %al, %esi
movq %rbx, %rdi
callq 0x2030
movq %rax, %rdi
callq 0x2110
leaq 0x33c6(%rip), %rsi      # 0x60fd
movl $0x3a, %edx
movq %rbx, %rdi
callq 0x2200
movq (%rbx), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x21a0
movsbl %al, %esi
movq %rbx, %rdi
callq 0x2030
movq %rax, %rdi
callq 0x2110
leaq 0x33c6(%rip), %rsi      # 0x6138
movl $0x82, %edx
movq %rbx, %rdi
callq 0x2200
movq (%rbx), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x21a0
movsbl %al, %esi
movq %rbx, %rdi
callq 0x2030
movq %rax, %rdi
callq 0x2110
leaq 0x340e(%rip), %rsi      # 0x61bb
movl $0x9d, %edx
movq %rbx, %rdi
callq 0x2200
movq (%rbx), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x21a0
movsbl %al, %esi
movq %rbx, %rdi
callq 0x2030
movq %rax, %rdi
callq 0x2110
leaq 0x3471(%rip), %rsi      # 0x6259
movl $0xb9, %edx
movq %rbx, %rdi
callq 0x2200
movq (%rbx), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x21a0
movsbl %al, %esi
movq %rbx, %rdi
callq 0x2030
movq %rax, %rdi
callq 0x2110
movl $0x1388, %edi           # imm = 0x1388
callq 0x252c
movq 0x6383(%rip), %rsi      # 0x91b0
subq 0x6374(%rip), %rsi      # 0x91a8
shrq $0x2, %rsi
leaq 0x28(%rsp), %r14
movss 0x31bf(%rip), %xmm0     # 0x6004
movq %r14, %rdi
callq 0x455c
movups (%r14), %xmm0
movups %xmm0, 0x6340(%rip)     # 0x9198
leaq 0x6339(%rip), %r15      # 0x9198
movq %r14, %rdi
callq 0x554a
callq 0x2bac
movq 0x6335(%rip), %rax      # 0x91a8
movl (%rax), %edx
leaq 0x28(%rsp), %rdi
movq %r15, %rsi
callq 0x4bde
movq 0x631f(%rip), %rax      # 0x91a8
movl (%rax), %r14d
movl %r14d, %ebp
negl %ebp
cmovsl %r14d, %ebp
movl $0x1, %r15d
cmpl $0xa, %ebp
jb 0x2ee9
movl $0x4, %r15d
movl $0xd1b71759, %eax       # imm = 0xD1B71759
movl %ebp, %ecx
cmpl $0x63, %ecx
jbe 0x2ee0
cmpl $0x3e7, %ecx            # imm = 0x3E7
jbe 0x2ee6
cmpl $0x2710, %ecx           # imm = 0x2710
jb 0x2ee9
movl %ecx, %edx
imulq %rax, %rdx
shrq $0x2d, %rdx
addl $0x4, %r15d
cmpl $0x1869f, %ecx          # imm = 0x1869F
movl %edx, %ecx
ja 0x2ead
addl $-0x3, %r15d
jmp 0x2ee9
addl $-0x2, %r15d
jmp 0x2ee9
decl %r15d
shrl $0x1f, %r14d
leal (%r15,%r14), %esi
leaq 0x18(%rsp), %r13
movq %r13, -0x10(%r13)
leaq 0x8(%rsp), %rdi
movl $0x2d, %edx
callq 0x2210
addq 0x8(%rsp), %r14
movq %r14, %rdi
movl %r15d, %esi
movl %ebp, %edx
callq 0x39ae
movq 0x30(%rsp), %rdx
cmpq 0x10(%rsp), %rdx
jne 0x2f43
testq %rdx, %rdx
je 0x2f47
movq 0x8(%rsp), %rsi
movq 0x28(%rsp), %rdi
callq 0x21e0
testl %eax, %eax
sete %bpl
jmp 0x2f4a
xorl %ebp, %ebp
jmp 0x2f4a
movb $0x1, %bpl
testb %bpl, %bpl
je 0x2f58
leaq 0x33bd(%rip), %r14      # 0x6313
jmp 0x2f9d
movq 0x6249(%rip), %rax      # 0x91a8
movl (%rax), %edx
leaq 0x6230(%rip), %rsi      # 0x9198
leaq 0xb8(%rsp), %rdi
callq 0x4bde
leaq 0x3396(%rip), %rsi      # 0x6312
leaq 0xb8(%rsp), %rdi
callq 0x2080
testl %eax, %eax
leaq 0x3381(%rip), %rax      # 0x6313
leaq 0x3394(%rip), %r14      # 0x632d
cmoveq %rax, %r14
testb %bpl, %bpl
jne 0x2fc3
leaq 0xc8(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x2fc3
movq 0xc8(%rsp), %rsi
incq %rsi
callq 0x21d0
movq 0x8(%rsp), %rdi
cmpq %r13, %rdi
je 0x2fda
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x21d0
leaq 0x38(%rsp), %r12
movq -0x10(%r12), %rdi
cmpq %r12, %rdi
je 0x2ff6
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x21d0
movl $0x19, %edx
movq %rbx, %rdi
movq %r14, %rsi
callq 0x2200
movq (%rbx), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x21a0
movsbl %al, %esi
movq %rbx, %rdi
callq 0x2030
movq %rax, %rdi
callq 0x2110
movq 0x6174(%rip), %rax      # 0x91a8
movl 0x4(%rax), %edx
leaq 0x615a(%rip), %rsi      # 0x9198
leaq 0x28(%rsp), %rdi
callq 0x4bde
movq 0x6159(%rip), %rax      # 0x91a8
movl 0x4(%rax), %r14d
movl %r14d, %ebp
negl %ebp
cmovsl %r14d, %ebp
movl $0x1, %r15d
cmpl $0xa, %ebp
jb 0x30b0
movl $0x4, %r15d
movl $0xd1b71759, %eax       # imm = 0xD1B71759
movl %ebp, %ecx
cmpl $0x63, %ecx
jbe 0x30a7
cmpl $0x3e7, %ecx            # imm = 0x3E7
jbe 0x30ad
cmpl $0x2710, %ecx           # imm = 0x2710
jb 0x30b0
movl %ecx, %edx
imulq %rax, %rdx
shrq $0x2d, %rdx
addl $0x4, %r15d
cmpl $0x1869f, %ecx          # imm = 0x1869F
movl %edx, %ecx
ja 0x3074
addl $-0x3, %r15d
jmp 0x30b0
addl $-0x2, %r15d
jmp 0x30b0
decl %r15d
shrl $0x1f, %r14d
leal (%r15,%r14), %esi
leaq 0x8(%rsp), %rdi
movq %r13, (%rdi)
movl $0x2d, %edx
callq 0x2210
addq 0x8(%rsp), %r14
movq %r14, %rdi
movl %r15d, %esi
movl %ebp, %edx
callq 0x39ae
movq 0x30(%rsp), %rdx
cmpq 0x10(%rsp), %rdx
jne 0x3104
testq %rdx, %rdx
je 0x3108
movq 0x8(%rsp), %rsi
movq 0x28(%rsp), %rdi
callq 0x21e0
testl %eax, %eax
sete %bpl
jmp 0x310b
xorl %ebp, %ebp
jmp 0x310b
movb $0x1, %bpl
testb %bpl, %bpl
je 0x3119
leaq 0x3230(%rip), %r14      # 0x6347
jmp 0x315f
movq 0x6088(%rip), %rax      # 0x91a8
movl 0x4(%rax), %edx
leaq 0x606e(%rip), %rsi      # 0x9198
leaq 0x98(%rsp), %rdi
callq 0x4bde
leaq 0x31d4(%rip), %rsi      # 0x6312
leaq 0x98(%rsp), %rdi
callq 0x2080
testl %eax, %eax
leaq 0x31f3(%rip), %rax      # 0x6347
leaq 0x3206(%rip), %r14      # 0x6361
cmoveq %rax, %r14
testb %bpl, %bpl
jne 0x3185
leaq 0xa8(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x3185
movq 0xa8(%rsp), %rsi
incq %rsi
callq 0x21d0
movq 0x8(%rsp), %rdi
cmpq %r13, %rdi
je 0x319c
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x21d0
movq 0x28(%rsp), %rdi
cmpq %r12, %rdi
je 0x31b3
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x21d0
movl $0x19, %edx
movq %rbx, %rdi
movq %r14, %rsi
callq 0x2200
movq (%rbx), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x21a0
movsbl %al, %esi
movq %rbx, %rdi
callq 0x2030
movq %rax, %rdi
callq 0x2110
movq 0x5fcf(%rip), %rax      # 0x91c0
movl (%rax), %edx
leaq 0x5f9e(%rip), %rsi      # 0x9198
leaq 0x28(%rsp), %r14
movq %r14, %rdi
callq 0x4bde
leaq 0x3104(%rip), %rsi      # 0x6312
movq %r14, %rdi
callq 0x2080
movl %eax, %ebp
movq (%r14), %rdi
cmpq %r12, %rdi
je 0x322d
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x21d0
testl %ebp, %ebp
leaq 0x3145(%rip), %rax      # 0x637b
leaq 0x3158(%rip), %rsi      # 0x6395
cmoveq %rax, %rsi
movl $0x19, %edx
movq %rbx, %rdi
callq 0x2200
movq (%rbx), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x21a0
movsbl %al, %esi
movq %rbx, %rdi
callq 0x2030
movq %rax, %rdi
callq 0x2110
movq 0x5f44(%rip), %rax      # 0x91c0
movl 0x4(%rax), %edx
leaq 0x5f12(%rip), %rsi      # 0x9198
leaq 0x28(%rsp), %r14
movq %r14, %rdi
callq 0x4bde
leaq 0x3078(%rip), %rsi      # 0x6312
movq %r14, %rdi
callq 0x2080
movl %eax, %ebp
movq (%r14), %rdi
cmpq %r12, %rdi
je 0x32b9
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x21d0
testl %ebp, %ebp
leaq 0x30ed(%rip), %rax      # 0x63af
leaq 0x3100(%rip), %rsi      # 0x63c9
cmoveq %rax, %rsi
movl $0x19, %edx
movq %rbx, %rdi
callq 0x2200
movq (%rbx), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x21a0
movsbl %al, %esi
movq %rbx, %rdi
callq 0x2030
movq %rax, %rdi
callq 0x2110
movq 0x5ed0(%rip), %rax      # 0x91d8
movl (%rax), %edx
leaq 0x5e87(%rip), %rsi      # 0x9198
leaq 0x28(%rsp), %rdi
callq 0x4bde
movq 0x5eb6(%rip), %rax      # 0x91d8
movl (%rax), %r14d
movl %r14d, %ebp
negl %ebp
cmovsl %r14d, %ebp
movl $0x1, %r15d
cmpl $0xa, %ebp
jb 0x3382
movl $0x4, %r15d
movl $0xd1b71759, %eax       # imm = 0xD1B71759
movl %ebp, %ecx
cmpl $0x63, %ecx
jbe 0x3379
cmpl $0x3e7, %ecx            # imm = 0x3E7
jbe 0x337f
cmpl $0x2710, %ecx           # imm = 0x2710
jb 0x3382
movl %ecx, %edx
imulq %rax, %rdx
shrq $0x2d, %rdx
addl $0x4, %r15d
cmpl $0x1869f, %ecx          # imm = 0x1869F
movl %edx, %ecx
ja 0x3346
addl $-0x3, %r15d
jmp 0x3382
addl $-0x2, %r15d
jmp 0x3382
decl %r15d
shrl $0x1f, %r14d
leal (%r15,%r14), %esi
leaq 0x8(%rsp), %rdi
movq %r13, (%rdi)
movl $0x2d, %edx
callq 0x2210
addq 0x8(%rsp), %r14
movq %r14, %rdi
movl %r15d, %esi
movl %ebp, %edx
callq 0x39ae
movq 0x30(%rsp), %rdx
cmpq 0x10(%rsp), %rdx
jne 0x33d6
testq %rdx, %rdx
je 0x33da
movq 0x8(%rsp), %rsi
movq 0x28(%rsp), %rdi
callq 0x21e0
testl %eax, %eax
sete %bpl
jmp 0x33dd
xorl %ebp, %ebp
jmp 0x33dd
movb $0x1, %bpl
testb %bpl, %bpl
je 0x33eb
leaq 0x2ffa(%rip), %r14      # 0x63e3
jmp 0x342a
movq 0x5de6(%rip), %rax      # 0x91d8
movl (%rax), %edx
leaq 0x5d9d(%rip), %rsi      # 0x9198
leaq 0x78(%rsp), %rdi
callq 0x4bde
leaq 0x2f06(%rip), %rsi      # 0x6312
leaq 0x78(%rsp), %rdi
callq 0x2080
testl %eax, %eax
leaq 0x2fc4(%rip), %rax      # 0x63e3
leaq 0x2fd7(%rip), %r14      # 0x63fd
cmoveq %rax, %r14
testb %bpl, %bpl
jne 0x3450
leaq 0x88(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x3450
movq 0x88(%rsp), %rsi
incq %rsi
callq 0x21d0
movq 0x8(%rsp), %rdi
cmpq %r13, %rdi
je 0x3467
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x21d0
movq 0x28(%rsp), %rdi
cmpq %r12, %rdi
je 0x347e
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x21d0
movl $0x19, %edx
movq %rbx, %rdi
movq %r14, %rsi
callq 0x2200
movq (%rbx), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x21a0
movsbl %al, %esi
movq %rbx, %rdi
callq 0x2030
movq %rax, %rdi
callq 0x2110
movq 0x5d1c(%rip), %rax      # 0x91d8
movl 0x4(%rax), %edx
leaq 0x5cd2(%rip), %rsi      # 0x9198
leaq 0x28(%rsp), %rdi
callq 0x4bde
movq 0x5d01(%rip), %rax      # 0x91d8
movl 0x4(%rax), %r14d
movl %r14d, %ebp
negl %ebp
cmovsl %r14d, %ebp
movl $0x1, %r15d
cmpl $0xa, %ebp
jb 0x3538
movl $0x4, %r15d
movl $0xd1b71759, %eax       # imm = 0xD1B71759
movl %ebp, %ecx
cmpl $0x63, %ecx
jbe 0x352f
cmpl $0x3e7, %ecx            # imm = 0x3E7
jbe 0x3535
cmpl $0x2710, %ecx           # imm = 0x2710
jb 0x3538
movl %ecx, %edx
imulq %rax, %rdx
shrq $0x2d, %rdx
addl $0x4, %r15d
cmpl $0x1869f, %ecx          # imm = 0x1869F
movl %edx, %ecx
ja 0x34fc
addl $-0x3, %r15d
jmp 0x3538
addl $-0x2, %r15d
jmp 0x3538
decl %r15d
shrl $0x1f, %r14d
leal (%r15,%r14), %esi
leaq 0x8(%rsp), %rdi
movq %r13, (%rdi)
movl $0x2d, %edx
callq 0x2210
addq 0x8(%rsp), %r14
movq %r14, %rdi
movl %r15d, %esi
movl %ebp, %edx
callq 0x39ae
movq 0x30(%rsp), %rdx
cmpq 0x10(%rsp), %rdx
jne 0x358c
testq %rdx, %rdx
je 0x3590
movq 0x8(%rsp), %rsi
movq 0x28(%rsp), %rdi
callq 0x21e0
testl %eax, %eax
sete %bpl
jmp 0x3593
xorl %ebp, %ebp
jmp 0x3593
movb $0x1, %bpl
testb %bpl, %bpl
je 0x35a1
leaq 0x2e78(%rip), %r14      # 0x6417
jmp 0x35e1
movq 0x5c30(%rip), %rax      # 0x91d8
movl 0x4(%rax), %edx
leaq 0x5be6(%rip), %rsi      # 0x9198
leaq 0x58(%rsp), %rdi
callq 0x4bde
leaq 0x2d4f(%rip), %rsi      # 0x6312
leaq 0x58(%rsp), %rdi
callq 0x2080
testl %eax, %eax
leaq 0x2e41(%rip), %rax      # 0x6417
leaq 0x2e54(%rip), %r14      # 0x6431
cmoveq %rax, %r14
testb %bpl, %bpl
jne 0x3601
leaq 0x68(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x3601
movq 0x68(%rsp), %rsi
incq %rsi
callq 0x21d0
movq 0x8(%rsp), %rdi
cmpq %r13, %rdi
je 0x3618
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x21d0
movq 0x28(%rsp), %rdi
cmpq %r12, %rdi
je 0x362f
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x21d0
movl $0x19, %edx
movq %rbx, %rdi
movq %r14, %rsi
callq 0x2200
movq (%rbx), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x21a0
movsbl %al, %esi
movq %rbx, %rdi
callq 0x2030
movq %rax, %rdi
callq 0x2110
movq 0x5b53(%rip), %rax      # 0x91c0
movl (%rax), %edx
leaq 0x5b22(%rip), %rsi      # 0x9198
leaq 0x28(%rsp), %r14
movq %r14, %rdi
callq 0x4bde
leaq 0x2c88(%rip), %rsi      # 0x6312
movq %r14, %rdi
callq 0x2080
movl %eax, %ebp
movq (%r14), %rdi
cmpq %r12, %rdi
je 0x36a9
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x21d0
testl %ebp, %ebp
leaq 0x2d99(%rip), %rax      # 0x644b
leaq 0x2dac(%rip), %rsi      # 0x6465
cmoveq %rax, %rsi
movl $0x19, %edx
movq %rbx, %rdi
callq 0x2200
movq (%rbx), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x21a0
movsbl %al, %esi
movq %rbx, %rdi
callq 0x2030
movq %rax, %rdi
callq 0x2110
leaq 0x5aa0(%rip), %rsi      # 0x9198
leaq 0x28(%rsp), %rbx
movq %rbx, %rdi
movl $0x1, %edx
movl $0x1388, %ecx           # imm = 0x1388
callq 0x5182
movq 0x5aaa(%rip), %rsi      # 0x91c0
movq %rbx, %rdi
callq 0x3964
testq %rax, %rax
leaq 0x2d57(%rip), %rax      # 0x647f
leaq 0x2d69(%rip), %rsi      # 0x6498
cmoveq %rax, %rsi
movq 0x5896(%rip), %rbx      # 0x8fd0
movl $0x18, %edx
movq %rbx, %rdi
callq 0x2200
movq (%rbx), %rax
addq -0x18(%rax), %rbx
movq %rbx, %rdi
movl $0xa, %esi
callq 0x21a0
movsbl %al, %esi
movq 0x586b(%rip), %rdi      # 0x8fd0
callq 0x2030
movq %rax, %rdi
callq 0x2110
movq 0x5a47(%rip), %rsi      # 0x91c0
addq $0x4, %rsi
leaq 0x28(%rsp), %rdi
callq 0x3964
testq %rax, %rax
leaq 0x2d20(%rip), %rax      # 0x64b1
leaq 0x2d32(%rip), %rsi      # 0x64ca
cmoveq %rax, %rsi
movq 0x582d(%rip), %rbx      # 0x8fd0
movl $0x18, %edx
movq %rbx, %rdi
callq 0x2200
movq (%rbx), %rax
addq -0x18(%rax), %rbx
movq %rbx, %rdi
movl $0xa, %esi
callq 0x21a0
movsbl %al, %esi
movq 0x5802(%rip), %rdi      # 0x8fd0
callq 0x2030
movq %rax, %rdi
callq 0x2110
leaq 0x28(%rsp), %rdi
callq 0x3a1c
xorl %eax, %eax
addq $0xd8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x37fd
jmp 0x37fd
movq %rax, %rbx
movq 0x8(%rsp), %rdi
cmpq %r13, %rdi
je 0x383c
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x21d0
jmp 0x383c
movq %rax, %rbx
movq 0x8(%rsp), %rdi
cmpq %r13, %rdi
je 0x384b
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x21d0
jmp 0x384b
jmp 0x3839
jmp 0x3839
movq %rax, %rbx
movq 0x28(%rsp), %rdi
cmpq %r12, %rdi
jne 0x3859
jmp 0x3875
movq %rax, %rbx
leaq 0x38(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x3875
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x21d0
jmp 0x3875
movq %rax, %rbx
leaq 0x28(%rsp), %rdi
callq 0x3a1c
movq %rbx, %rdi
callq 0x2290
nop