// File: /workspace/github_cpp_makefile_star2_O3/qian-jiahong[P]uvncrep017-ws/repeater.cpp
// Function: main
int main(int argc, char **argv)
{
    //Viewer port listener variable
    listenPortInfo viewerListener = {-1, -1};

    //Server port listener variable
    listenPortInfo serverListener = {-1, -1};

    //ctrl+c signal handler
    struct sigaction saInt;

    //ini file default
    char defaultIniFilePathAndName[] = "/etc/uvnc/uvncrepeater.ini";
    char tmpBuf[MAX_PATH];
    bool memoryOk;

    //Startup event
    startEndEvent seEv;
    
    stopped = false;
    mode1ConnCode = 0;
    
    fprintf(stderr, "UltraVnc Linux Repeater version %s\n", REPEATER_VERSION);
    
    //Read parameters from ini file
    // strlcpy(tmpBuf, (argc >= 2) ? argv[1] : defaultIniFilePathAndName, MAX_PATH);
    strlcpy(tmpBuf, (argc >= 2) ? argv[1] : DEFAULT_INI_FILE_PATH_AND_NAME, MAX_PATH);
    if (false == readIniFile(tmpBuf)) {
        debug(LEVEL_1, "main(): ini file (%s) read error, using defaults\n", tmpBuf);
    }
    listInitializationValues();

    //Send startup event to event interface 
    initRepeaterEventInterface();
    if (useEventInterface) {
        event.eventNum = REPEATER_STARTUP;
        event.timeStamp = time(NULL);
        event.repeaterProcessId = getpid();
        
        seEv.maxSessions = maxSessions;
        memcpy(event.extraInfo, &seEv, sizeof(startEndEvent));
        
        //Event fifo can not be full here ;-)
        sendRepeaterEvent(event);
    }

    //Allocate and clean various repeater lists
    if (false == allocateMemoryForRepeaterLists(maxSessions)) {
        debug(LEVEL_0, "main(): memory allocation for repeater lists failed, exiting program\n");
        memoryOk = false;
    }
    else {
        memoryOk = true;
        cleanLists();
    }

    //If we got lists allocated, we can run
    if (memoryOk) {
        //Initialize ctrl+c signal handler
        memset(&saInt, 0, sizeof(saInt));
    
        //Restart interrupted system calls after handler returns    
        saInt.sa_flags = SA_RESTART;    
        saInt.sa_handler = &handleSigInt;
        sigaction(SIGINT, &saInt, NULL);

        //Initialize and start listening on viewer port
        if (((allowedModes & CONN_MODE1) > 0) || ((allowedModes & CONN_MODE2) > 0)) {
            viewerListener.port = viewerPort;
            startListeningOnPort(&viewerListener);
        }

        //Initialize and start listening on server port
        if ((allowedModes & CONN_MODE2) > 0) {
            serverListener.port = serverPort;
            startListeningOnPort(&serverListener);
        }

        //Drop root privileges (if we are running as root) after all listen ports have been bound
        if (geteuid() == 0) {
            dropRootPrivileges(); 
        }

        //Accept & Route new connections
        if (stopped == false) {
            routeConnections(viewerListener.socket, serverListener.socket);
        }

        close(viewerListener.socket);
        close(serverListener.socket);
    }

    //Free allocated memory of repeater lists
    freeMemoryOfRepeaterLists();

    //Send shutdown event to event interface
    if (useEventInterface) {
        event.eventNum = REPEATER_SHUTDOWN;
        event.timeStamp = time(NULL);
        event.repeaterProcessId = getpid();
        
        seEv.maxSessions = maxSessions;
        memcpy(event.extraInfo, &seEv, sizeof(startEndEvent));
        if (false == sendRepeaterEvent(event)) {
            debug(LEVEL_1, "main(): Warning, event fifo is full\n");
        }
        handleRepeaterEvents();
    }

    debug(LEVEL_0, "main(): relaying done.\n");

    return 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x3b8, %rsp            # imm = 0x3B8
orq $-0x1, 0xd8(%rsp)
orq $-0x1, 0xd0(%rsp)
movq %rsi, %rbx
andq $0x0, 0xc5dc(%rip)      # 0xeac0
movl %edi, %ebp
movb $0x0, 0xa683(%rip)      # 0xcb70
movq 0x9aec(%rip), %r15      # 0xbfe0
movq (%r15), %rdi
leaq 0x4e3d(%rip), %rsi      # 0x733b
leaq 0x4e5a(%rip), %rdx      # 0x735f
xorl %eax, %eax
callq 0x22c0
cmpl $0x2, %ebp
jl 0x2517
movq 0x8(%rbx), %rsi
jmp 0x251e
leaq 0x9cb2(%rip), %rsi      # 0xc1d0
leaq 0x2b0(%rsp), %rbx
movl $0xfa, %edx
movq %rbx, %rdi
callq 0x5804
movq %rbx, %rdi
callq 0x6390
testb %al, %al
jne 0x2558
leaq 0x4e1e(%rip), %rsi      # 0x7364
pushq $0x1
popq %rdi
leaq 0x2b0(%rsp), %rdx
xorl %eax, %eax
callq 0x352c
leaq 0x9c91(%rip), %rax      # 0xc1f0
movl (%rax), %edx
leaq 0x5196(%rip), %rsi      # 0x76fe
pushq $0x2
popq %rbp
movl %ebp, %edi
xorl %eax, %eax
callq 0x352c
leaq 0x9c79(%rip), %rax      # 0xc1f4
movl (%rax), %edx
leaq 0x51a7(%rip), %rsi      # 0x772b
movl %ebp, %edi
xorl %eax, %eax
callq 0x352c
leaq 0xa4ac(%rip), %rax      # 0xca40
movl (%rax), %edx
leaq 0x51bb(%rip), %rsi      # 0x7758
movl %ebp, %edi
xorl %eax, %eax
callq 0x352c
leaq 0xa497(%rip), %r12      # 0xca44
movl (%r12), %edx
leaq 0x51cd(%rip), %rsi      # 0x7785
movl %ebp, %edi
xorl %eax, %eax
callq 0x352c
leaq 0x51eb(%rip), %rsi      # 0x77b3
leaq 0x9d31(%rip), %rdx      # 0xc300
movl %ebp, %edi
xorl %eax, %eax
callq 0x352c
leaq 0x5225(%rip), %rsi      # 0x7804
leaq 0x9c1a(%rip), %rdx      # 0xc200
movl %ebp, %edi
xorl %eax, %eax
callq 0x352c
leaq 0x9c02(%rip), %r14      # 0xc1f8
testb $0x1, (%r14)
leaq 0x5285(%rip), %rbx      # 0x7886
leaq 0x527a(%rip), %r13      # 0x7882
movq %r13, %rdx
cmoveq %rbx, %rdx
leaq 0x522f(%rip), %rsi      # 0x7845
movl %ebp, %edi
xorl %eax, %eax
callq 0x352c
testb $0x2, (%r14)
movq %r13, %rdx
cmoveq %rbx, %rdx
leaq 0x5258(%rip), %rsi      # 0x7889
movl %ebp, %edi
xorl %eax, %eax
callq 0x352c
leaq 0x12adf(%rip), %rax     # 0x15120
movl (%rax), %edx
leaq 0x527c(%rip), %rsi      # 0x78c6
movl %ebp, %edi
xorl %eax, %eax
callq 0x352c
leaq 0x12c66(%rip), %r14     # 0x152c0
cmpl $0x1, (%r14)
movq %rbx, %rdx
cmoveq %r13, %rdx
leaq 0x529f(%rip), %rsi      # 0x790b
movl %ebp, %edi
xorl %eax, %eax
callq 0x352c
cmpl $0x1, (%r14)
jne 0x2753
cmpl $0x2, (%r12)
jl 0x2753
leaq 0x52bd(%rip), %rsi      # 0x794e
pushq $0x2
popq %rdi
xorl %eax, %eax
callq 0x352c
pushq $0xc
popq %rbp
leaq 0x9d5b(%rip), %r12      # 0xc400
leaq 0x52f1(%rip), %r14      # 0x799d
movq (%r15), %rdi
movl -0xc(%r12,%rbp), %edx
movl -0x8(%r12,%rbp), %ecx
movl -0x4(%r12,%rbp), %r8d
movl (%r12,%rbp), %r9d
movq %r14, %rsi
xorl %eax, %eax
callq 0x22c0
addq $0x10, %rbp
cmpq $0x32c, %rbp            # imm = 0x32C
jne 0x26ac
movq (%r15), %rsi
pushq $0xa
popq %rdi
callq 0x2270
leaq 0xa359(%rip), %r12      # 0xca44
cmpl $0x2, (%r12)
jl 0x2753
leaq 0x52b1(%rip), %rsi      # 0x79aa
pushq $0x2
popq %rdi
xorl %eax, %eax
callq 0x352c
pushq $0xc
popq %rbp
leaq 0xa013(%rip), %r12      # 0xc720
leaq 0x5289(%rip), %r14      # 0x799d
movq (%r15), %rdi
movl -0xc(%r12,%rbp), %edx
movl -0x8(%r12,%rbp), %ecx
movl -0x4(%r12,%rbp), %r8d
movl (%r12,%rbp), %r9d
movq %r14, %rsi
xorl %eax, %eax
callq 0x22c0
addq $0x10, %rbp
cmpq $0x32c, %rbp            # imm = 0x32C
jne 0x2714
movq (%r15), %rsi
pushq $0xa
popq %rdi
callq 0x2270
leaq 0xa2f1(%rip), %r12      # 0xca44
leaq 0x129ca(%rip), %r14     # 0x15124
cmpl $0x1, (%r14)
cmoveq %r13, %rbx
leaq 0x528e(%rip), %rsi      # 0x79f7
pushq $0x2
popq %rdi
movq %rbx, %rdx
xorl %eax, %eax
callq 0x352c
cmpl $0x1, (%r14)
jne 0x27ca
cmpl $0x2, (%r12)
jl 0x27ca
leaq 0x52b1(%rip), %rsi      # 0x7a3b
pushq $0x2
popq %rdi
xorl %eax, %eax
callq 0x352c
leaq 0x12995(%rip), %r14     # 0x15130
leaq 0x52dd(%rip), %rbx      # 0x7a7f
xorl %r12d, %r12d
movq (%r15), %rdi
movl (%r14,%r12,4), %edx
movq %rbx, %rsi
xorl %eax, %eax
callq 0x22c0
incq %r12
cmpq $0x64, %r12
jne 0x27a5
movq (%r15), %rsi
pushq $0xa
popq %rdi
callq 0x2270
leaq 0x12af3(%rip), %r15     # 0x152c4
leaq 0x52de(%rip), %r14      # 0x7ab6
cmpb $0x0, (%r15)
leaq 0x52d8(%rip), %rbx      # 0x7abb
movq %rbx, %rdx
cmovneq %r14, %rdx
leaq 0x5292(%rip), %rsi      # 0x7a83
pushq $0x2
popq %rbp
movl %ebp, %edi
xorl %eax, %eax
callq 0x352c
leaq 0x52bd(%rip), %rsi      # 0x7ac1
leaq 0xa245(%rip), %rdx      # 0xca50
movl %ebp, %edi
xorl %eax, %eax
callq 0x352c
leaq 0xa335(%rip), %rax      # 0xcb50
movl (%rax), %edx
leaq 0x52d1(%rip), %rsi      # 0x7af5
movl %ebp, %edi
xorl %eax, %eax
callq 0x352c
leaq 0x12a91(%rip), %rax     # 0x152c5
cmpb $0x0, (%rax)
cmovneq %r14, %rbx
leaq 0x52e7(%rip), %rsi      # 0x7b29
movl %ebp, %edi
movq %rbx, %rdx
xorl %eax, %eax
callq 0x352c
callq 0x6799
cmpb $0x1, (%r15)
leaq 0xa1e2(%rip), %r15      # 0xca40
jne 0x28a4
movl $0x6, 0xc25e(%rip)      # 0xeac8
leaq 0xc257(%rip), %rbx      # 0xeac8
xorl %edi, %edi
callq 0x21c0
movq %rax, 0xc251(%rip)      # 0xead0
callq 0x22e0
movl %eax, 0xc24e(%rip)      # 0xead8
movl (%r15), %eax
movl %eax, 0xc249(%rip)      # 0xeadc
pushq $0xf
popq %rcx
movq %rsp, %rdi
movq %rbx, %rsi
rep  movsq (%rsi), %es:(%rdi)
callq 0x67c9
movslq (%r15), %r14
leaq 0xa2d2(%rip), %r13      # 0xcb80
movl $0x1f40, %edx           # imm = 0x1F40
movq %r13, %rdi
xorl %esi, %esi
callq 0x2110
leaq 0xc27c(%rip), %rbp      # 0xeb40
movl $0x1f40, %edx           # imm = 0x1F40
movq %rbp, %rdi
xorl %esi, %esi
callq 0x2110
leaq 0xe1a6(%rip), %r12      # 0x10a80
movl $0x1f40, %edx           # imm = 0x1F40
movq %r12, %rdi
xorl %esi, %esi
callq 0x2110
leaq 0x100d0(%rip), %rdi     # 0x129c0
movl $0x1f40, %edx           # imm = 0x1F40
xorl %esi, %esi
callq 0x2110
testq %r14, %r14
jle 0x2a51
pushq $0x1
popq %rdi
pushq $0x68
popq %rsi
callq 0x2150
movq %rax, 0xa269(%rip)      # 0xcb80
testq %rax, %rax
je 0x2b61
pushq $0x1
popq %r12
pushq $0x10
popq %rsi
movq %r12, %rdi
callq 0x2150
movq %rax, 0xc20a(%rip)      # 0xeb40
testq %rax, %rax
je 0x2b61
xorl %r13d, %r13d
pushq $0x30
popq %r15
movq %r12, %rbx
xorl %ebp, %ebp
movq %r12, %rdi
movq %r15, %rsi
callq 0x2150
leaq 0xe123(%rip), %rcx      # 0x10a80
movq %rax, (%r13,%rcx)
testq %rax, %rax
je 0x29c9
movq %r12, %rdi
movq %r15, %rsi
callq 0x2150
leaq 0x10047(%rip), %rcx     # 0x129c0
movq %rax, (%r13,%rcx)
testq %rax, %rax
je 0x29c9
cmpq %r14, %rbx
setae %bpl
je 0x29c9
movq %r12, %rdi
pushq $0x68
popq %rsi
callq 0x2150
leaq 0xa1e2(%rip), %rcx      # 0xcb80
movq %rax, (%rcx,%rbx,8)
testq %rax, %rax
je 0x29c9
movq %r12, %rdi
pushq $0x10
popq %rsi
callq 0x2150
leaq 0xc187(%rip), %rcx      # 0xeb40
movq %rax, (%rcx,%rbx,8)
incq %rbx
addq $0x8, %r13
testq %rax, %rax
jne 0x294b
testb $0x1, %bpl
leaq 0xa06c(%rip), %r15      # 0xca40
leaq 0xa1a5(%rip), %r13      # 0xcb80
leaq 0xc15e(%rip), %rbp      # 0xeb40
je 0x2b61
xorl %eax, %eax
xorps %xmm0, %xmm0
xorl %ecx, %ecx
leaq 0xe08a(%rip), %r12      # 0x10a80
leaq 0xffc3(%rip), %rsi      # 0x129c0
movq (%rax,%r13), %rdx
movups %xmm0, 0x50(%rdx)
movups %xmm0, 0x40(%rdx)
movups %xmm0, 0x30(%rdx)
movups %xmm0, 0x20(%rdx)
andq $0x0, 0x60(%rdx)
movups %xmm0, 0x10(%rdx)
movups %xmm0, (%rdx)
movq (%rax,%rbp), %rdx
movups %xmm0, (%rdx)
movq (%rax,%r12), %rdx
movups %xmm0, 0x20(%rdx)
movups %xmm0, 0x10(%rdx)
movups %xmm0, (%rdx)
movq (%rax,%rsi), %rdx
movups %xmm0, 0x20(%rdx)
movups %xmm0, 0x10(%rdx)
movups %xmm0, (%rdx)
incq %rcx
movslq (%r15), %rdx
addq $0x8, %rax
cmpq %rdx, %rcx
jl 0x29fd
leaq 0x220(%rsp), %rbx
movl $0x90, %edx
movq %rbx, %rdi
xorl %esi, %esi
callq 0x2110
movl $0x10000000, 0x80(%rbx) # imm = 0x10000000
leaq 0x1348(%rip), %rax      # 0x3dc1
movq %rax, -0x8(%rbx)
pushq $0x2
popq %rdi
leaq 0x218(%rsp), %rsi
xorl %edx, %edx
callq 0x2280
leaq 0x9762(%rip), %rbx      # 0xc1f8
movl (%rbx), %eax
testb $0x3, %al
je 0x2ab7
leaq 0x974d(%rip), %rax      # 0xc1f0
movl (%rax), %eax
leaq 0xd8(%rsp), %rdi
movl %eax, 0x4(%rdi)
callq 0x3dc9
movl (%rbx), %eax
testb $0x2, %al
leaq 0xff00(%rip), %r14      # 0x129c0
je 0x2adb
leaq 0x972b(%rip), %rax      # 0xc1f4
movl (%rax), %eax
leaq 0xd0(%rsp), %rdi
movl %eax, 0x4(%rdi)
callq 0x3dc9
callq 0x2130
testl %eax, %eax
jne 0x2bb0
leaq 0x9711(%rip), %r15      # 0xc200
movq %r15, %rdi
callq 0x2190
movq %rax, %rbx
leaq 0x5222(%rip), %rsi      # 0x7d23
pushq $0x1
popq %rdi
movq %r15, %rdx
xorl %eax, %eax
callq 0x352c
testq %rbx, %rbx
je 0x333f
movl 0x14(%rbx), %edi
callq 0x2320
testl %eax, %eax
jne 0x3360
movl 0x10(%rbx), %edi
callq 0x2350
testl %eax, %eax
leaq 0x9f08(%rip), %r15      # 0xca40
jne 0x3373
callq 0x2130
testl %eax, %eax
je 0x2b84
leaq 0x52c1(%rip), %rsi      # 0x7e0f
leaq 0x96ab(%rip), %rdx      # 0xc200
pushq $0x1
popq %rdi
xorl %eax, %eax
callq 0x352c
jmp 0x2bb0
leaq 0x482e(%rip), %rsi      # 0x7396
xorl %edi, %edi
xorl %eax, %eax
callq 0x352c
leaq 0xdf08(%rip), %r12      # 0x10a80
leaq 0xfe41(%rip), %r14      # 0x129c0
jmp 0x2c0d
leaq 0x51f7(%rip), %rdi      # 0x7d82
leaq 0x966e(%rip), %rsi      # 0xc200
callq 0x22a0
testl %eax, %eax
jne 0x3386
leaq 0x51e1(%rip), %rsi      # 0x7d87
pushq $0x1
popq %rdi
xorl %eax, %eax
callq 0x352c
movl 0xd8(%rsp), %edi
movl 0xd0(%rsp), %ebx
cmpb $0x0, 0x9fab(%rip)      # 0xcb70
jne 0x2c01
cmpl %ebx, %edi
movl %ebx, %eax
movl %edi, 0x7c(%rsp)
cmovgl %edi, %eax
movl %eax, 0x80(%rsp)
leaq 0x52e2(%rip), %rsi      # 0x7ec2
xorl %edi, %edi
xorl %eax, %eax
callq 0x352c
cmpb $0x0, 0x9f80(%rip)      # 0xcb70
je 0x2cf6
leaq 0x9f83(%rip), %r13      # 0xcb80
movl 0x7c(%rsp), %edi
callq 0x2360
movl %ebx, %edi
callq 0x2360
xorl %ebx, %ebx
movq (%rbx,%r13), %rdi
testq %rdi, %rdi
je 0x2c22
callq 0x2240
andq $0x0, (%rbx,%r13)
movq (%rbx,%rbp), %rdi
testq %rdi, %rdi
je 0x2c35
callq 0x2240
andq $0x0, (%rbx,%rbp)
movq (%rbx,%r12), %rdi
testq %rdi, %rdi
je 0x2c48
callq 0x2240
andq $0x0, (%rbx,%r12)
movq (%rbx,%r14), %rdi
testq %rdi, %rdi
je 0x2c5b
callq 0x2240
andq $0x0, (%rbx,%r14)
addq $0x8, %rbx
cmpq $0x1f40, %rbx           # imm = 0x1F40
jne 0x2c0f
leaq 0x12655(%rip), %rax     # 0x152c4
cmpb $0x1, (%rax)
jne 0x2cd2
movl $0x7, 0xbe4a(%rip)      # 0xeac8
leaq 0xbe43(%rip), %rbx      # 0xeac8
xorl %edi, %edi
callq 0x21c0
movq %rax, 0xbe3d(%rip)      # 0xead0
callq 0x22e0
movl %eax, 0xbe3a(%rip)      # 0xead8
movl (%r15), %eax
movl %eax, 0xbe35(%rip)      # 0xeadc
pushq $0xf
popq %rcx
movq %rsp, %rdi
movq %rbx, %rsi
rep  movsq (%rsi), %es:(%rdi)
callq 0x67c9
testb %al, %al
jne 0x2ccd
leaq 0x4719(%rip), %rsi      # 0x73dc
pushq $0x1
popq %rdi
xorl %eax, %eax
callq 0x352c
callq 0x6835
leaq 0x4728(%rip), %rsi      # 0x7401
xorl %edi, %edi
xorl %eax, %eax
callq 0x352c
xorl %eax, %eax
addq $0x3b8, %rsp            # imm = 0x3B8
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
pushq $0x1
popq %rdi
pushq $0x40
popq %rsi
movl 0x7c(%rsp), %ecx
movl %ecx, %eax
cltd
idivl %esi
movslq %eax, %rdx
movq %rdx, 0xb8(%rsp)
shll $0x6, %eax
subl %eax, %ecx
movq %rdi, %rax
shlq %cl, %rax
movq %rax, 0xb0(%rsp)
movl %ebx, %eax
cltd
idivl %esi
movslq %eax, %rcx
movq %rcx, 0xa8(%rsp)
shll $0x6, %eax
movl %ebx, %ecx
subl %eax, %ecx
shlq %cl, %rdi
movq %rdi, 0xc0(%rsp)
incl 0x80(%rsp)
pushq $0x1
popq %r13
movl $0x0, 0x84(%rsp)
movq $0x0, 0xc8(%rsp)
movl %ebx, 0x90(%rsp)
xorps %xmm0, %xmm0
movaps %xmm0, 0x170(%rsp)
movaps %xmm0, 0x160(%rsp)
movaps %xmm0, 0x150(%rsp)
movaps %xmm0, 0x140(%rsp)
movaps %xmm0, 0x130(%rsp)
movaps %xmm0, 0x120(%rsp)
movaps %xmm0, 0x110(%rsp)
movaps %xmm0, 0x100(%rsp)
cmpl $-0x1, 0x7c(%rsp)
je 0x2dd0
movq 0xb8(%rsp), %rax
movq 0xb0(%rsp), %rcx
orq %rcx, 0x100(%rsp,%rax,8)
cmpl $-0x1, %ebx
je 0x2ded
movq 0xc0(%rsp), %rax
movq 0xa8(%rsp), %rcx
orq %rax, 0x100(%rsp,%rcx,8)
movq $0x1, 0xe0(%rsp)
andq $0x0, 0xe8(%rsp)
movl 0x80(%rsp), %edi
leaq 0x100(%rsp), %rsi
xorl %edx, %edx
xorl %ecx, %ecx
leaq 0xe0(%rsp), %r8
callq 0x21d0
movb 0x9d48(%rip), %cl       # 0xcb70
cmpl $-0x1, %eax
je 0x2ec7
testb $0x1, %cl
jne 0x2bf6
movl 0x7c(%rsp), %r14d
cmpl $-0x1, %r14d
je 0x2e7b
movq 0xb8(%rsp), %rax
movq 0xb0(%rsp), %rcx
testq %rcx, 0x100(%rsp,%rax,8)
je 0x2e7b
pushq $0x3
popq %rdi
leaq 0x50d0(%rip), %rsi      # 0x7f39
xorl %eax, %eax
callq 0x352c
movl %r14d, %edi
movl %r13d, %esi
callq 0x3ee8
cmpl $-0x1, %ebx
je 0x2eb4
movq 0xc0(%rsp), %rax
movq 0xa8(%rsp), %rcx
testq %rax, 0x100(%rsp,%rcx,8)
je 0x2eb4
pushq $0x3
popq %rdi
leaq 0x50ce(%rip), %rsi      # 0x7f72
xorl %eax, %eax
callq 0x352c
movl %ebx, %edi
xorl %esi, %esi
callq 0x3ee8
movl 0x84(%rsp), %r13d
cmpl $0x4, %r13d
jge 0x2ef9
incl %r13d
jmp 0x2f3d
testb $0x1, %cl
jne 0x2bf6
callq 0x2030
movl (%rax), %ebx
movl %ebx, %edi
callq 0x20a0
pushq $0x2
popq %rdi
leaq 0x501d(%rip), %rsi      # 0x7f05
movl %ebx, %edx
movq %rax, %rcx
xorl %eax, %eax
callq 0x352c
jmp 0x32ad
cmpl $0x0, (%r15)
jle 0x2f3a
xorl %r14d, %r14d
xorl %ebx, %ebx
leaq 0xfab5(%rip), %rax      # 0x129c0
movq (%r14,%rax), %rsi
pushq $0x1
popq %rdi
movl %ebx, %edx
callq 0x511e
movq (%r14,%r12), %rsi
xorl %r13d, %r13d
xorl %edi, %edi
movl %ebx, %edx
callq 0x511e
incq %rbx
movslq (%r15), %rax
addq $0x8, %r14
cmpq %rax, %rbx
jl 0x2f04
jmp 0x2f3d
xorl %r13d, %r13d
movl %r13d, 0x84(%rsp)
movq 0xc8(%rsp), %rbx
cmpl $0x59, %ebx
jge 0x32c6
incl %ebx
pushq $0x1
popq %r13
movq %rbx, 0xc8(%rsp)
cmpl $0x0, (%r15)
jle 0x32a1
xorl %r14d, %r14d
movq (%rbp,%r14,8), %rax
cmpq $0x0, (%rax)
je 0x3022
movl 0x8(%rax), %edi
leaq 0x94(%rsp), %rsi
movl %r13d, %edx
callq 0x2180
testl %eax, %eax
jle 0x3022
movl %eax, %ebx
movzbl 0x95(%rsp), %ebp
pushq $0x3
popq %rdi
leaq 0x5ec3(%rip), %rsi      # 0x8e72
movl %ebp, %edx
movl %eax, %ecx
xorl %eax, %eax
callq 0x352c
movslq (%r15), %rax
testq %rax, %rax
jle 0x2fe1
leaq 0xbb77(%rip), %r12      # 0xeb40
xorl %r15d, %r15d
movq (%r12), %rcx
cmpl %ebx, 0x8(%rcx)
je 0x3036
incq %r15
addq $0x8, %r12
cmpq %r15, %rax
jne 0x2fcc
pushq $0x2
popq %r15
movl %r15d, %edi
leaq 0x6043(%rip), %rsi      # 0x9032
movl %ebx, %edx
xorl %eax, %eax
callq 0x352c
movl %r15d, %edi
leaq 0x5fbc(%rip), %rsi      # 0x8fbe
xorl %eax, %eax
callq 0x352c
leaq 0x9a30(%rip), %r15      # 0xca40
leaq 0xda69(%rip), %r12      # 0x10a80
leaq 0xbb22(%rip), %rbp      # 0xeb40
pushq $0x1
popq %r13
incq %r14
movslq (%r15), %rax
cmpq %rax, %r14
jl 0x2f71
jmp 0x32a1
movq (%rcx), %r8
pushq $0x3
popq %rdi
leaq 0x5fab(%rip), %rsi      # 0x8fee
movl %r15d, %edx
movl %ebx, %ecx
xorl %eax, %eax
callq 0x352c
cmpq $0xf423f, %r15          # imm = 0xF423F
pushq $0x2
popq %r15
je 0x2ff8
movq (%r12), %rax
movq (%rax), %r12
movq %r12, %rdi
callq 0x5050
movl %eax, %r13d
movq %r12, 0x88(%rsp)
movq %r12, %rdi
callq 0x50b7
movl %eax, %r12d
movl $0xf423f, %ecx          # imm = 0xF423F
cmpl %ecx, %r13d
sete %al
cmpl %ecx, %r12d
sete %cl
orb %al, %cl
jne 0x30d9
leaq 0x99a3(%rip), %rax      # 0xca40
movslq (%rax), %rax
testq %rax, %rax
jle 0x30c2
leaq 0xba94(%rip), %r15      # 0xeb40
xorl %edx, %edx
movq (%r15), %rcx
cmpl %ebx, 0x8(%rcx)
je 0x30f5
incq %rdx
addq $0x8, %r15
cmpq %rdx, %rax
jne 0x30ae
pushq $0x2
popq %r15
movl %r15d, %edi
leaq 0x5fe2(%rip), %rsi      # 0x90b2
xorl %eax, %eax
callq 0x352c
jmp 0x3117
movl %r15d, %edi
leaq 0x5e92(%rip), %rsi      # 0x8f75
movl %r12d, %edx
movl %r13d, %ecx
xorl %eax, %eax
callq 0x352c
jmp 0x3009
pushq $0x3
popq %rdi
leaq 0x5f74(%rip), %rsi      # 0x9073
movl %ebx, %ecx
xorl %eax, %eax
callq 0x352c
movq (%r15), %rax
andq $0x0, (%rax)
andl $0x0, 0x8(%rax)
pushq $0x2
popq %r15
pushq $0x3
popq %rdi
leaq 0x5d86(%rip), %rsi      # 0x8ea7
movq 0x88(%rsp), %rdx
movl %r13d, %ecx
movl %r12d, %r8d
xorl %eax, %eax
callq 0x352c
leaq 0x12187(%rip), %rax     # 0x152c4
cmpb $0x1, (%rax)
movslq %r13d, %rax
movq %rax, 0x98(%rsp)
movslq %r12d, %rax
movq %rax, 0xa0(%rsp)
jne 0x3237
xorl %edi, %edi
callq 0x21c0
movq %rax, %rbx
callq 0x22e0
movq 0x88(%rsp), %rsi
movq %rsi, %rcx
shrq $0x3f, %rcx
subl %ecx, %r15d
leaq 0xd8fc(%rip), %rcx      # 0x10a80
movq 0x98(%rsp), %rdi
movq (%rcx,%rdi,8), %rcx
movups 0x18(%rcx), %xmm0
movaps %xmm0, 0x200(%rsp)
leaq 0xf81d(%rip), %rcx      # 0x129c0
movq 0xa0(%rsp), %rdi
movq (%rcx,%rdi,8), %rcx
movups 0x18(%rcx), %xmm1
movaps %xmm1, 0xf0(%rsp)
movl $0x5, 0x188(%rsp)
movq %rbx, 0x190(%rsp)
movl %eax, 0x198(%rsp)
movl %r13d, 0x19c(%rsp)
movl %r12d, 0x1a0(%rsp)
movq %rsi, 0x1a4(%rsp)
movl %r15d, 0x1ac(%rsp)
leaq 0x1b0(%rsp), %rax
movups %xmm0, (%rax)
movaps 0xf0(%rsp), %xmm0
movups %xmm0, 0x10(%rax)
pushq $0xf
popq %rcx
movq %rsp, %rdi
leaq 0x188(%rsp), %rsi
rep  movsq (%rsi), %es:(%rdi)
callq 0x67c9
testb %al, %al
jne 0x3237
pushq $0x1
popq %rdi
leaq 0x5cbd(%rip), %rsi      # 0x8eed
xorl %eax, %eax
callq 0x352c
decl %ebp
cmpl $0x4, %ebp
leaq 0x97fd(%rip), %r15      # 0xca40
leaq 0xd836(%rip), %r12      # 0x10a80
ja 0x3017
movq 0x98(%rsp), %rax
movq (%r12,%rax,8), %rax
movl (%rax), %edx
leaq 0xf75b(%rip), %rax      # 0x129c0
movq 0xa0(%rsp), %rcx
movq (%rax,%rcx,8), %rax
movl (%rax), %ecx
pushq $0x1
popq %rdi
leaq 0x5cad(%rip), %rsi      # 0x8f2a
xorl %eax, %eax
callq 0x352c
movq 0x88(%rsp), %rbx
movq %rbx, %rdi
callq 0x5320
movq %rbx, %rdi
callq 0x52b7
jmp 0x3017
callq 0x6835
leaq 0xf713(%rip), %r14      # 0x129c0
cmpb $0x1, 0x98bc(%rip)      # 0xcb70
movl 0x90(%rsp), %ebx
jne 0x2d6e
jmp 0x2bf6
xorl %ebx, %ebx
leaq 0x11ff5(%rip), %rax     # 0x152c4
cmpb $0x1, (%rax)
pushq $0x1
popq %r13
jne 0x2f5c
movl $0x8, 0xb7e2(%rip)      # 0xeac8
xorl %ebx, %ebx
xorl %edi, %edi
callq 0x21c0
movq %rax, 0xb7da(%rip)      # 0xead0
callq 0x22e0
movl %eax, 0xb7d7(%rip)      # 0xead8
movl (%r15), %eax
movl %eax, 0xb7d2(%rip)      # 0xeadc
pushq $0xf
popq %rcx
movq %rsp, %rdi
leaq 0xb7b1(%rip), %rsi      # 0xeac8
rep  movsq (%rsi), %es:(%rdi)
callq 0x67c9
testb %al, %al
jne 0x2f5c
xorl %ebx, %ebx
movl %r13d, %edi
leaq 0x4c78(%rip), %rsi      # 0x7fab
xorl %eax, %eax
callq 0x352c
jmp 0x2f5c
leaq 0x4b18(%rip), %rdi      # 0x7e5e
leaq 0x8e83(%rip), %rsi      # 0xc1d0
xorl %eax, %eax
callq 0x2405
leaq 0x96e5(%rip), %r15      # 0xca40
jmp 0x2bb0
leaq 0x49cd(%rip), %rdi      # 0x7d34
xorl %eax, %eax
callq 0x2405
jmp 0x2b27
leaq 0x49e1(%rip), %rdi      # 0x7d5b
xorl %eax, %eax
callq 0x2405
jmp 0x2b3e
leaq 0x4a50(%rip), %rdi      # 0x7ddd
xorl %eax, %eax
callq 0x2405
jmp 0x2bb0