// File: /workspace/github_c_makefile_star2_O3/Carton32[P]quectel-CM/device.c
// Function: qmidevice_detect
BOOL qmidevice_detect(char *qmichannel, char *usbnet_adapter, unsigned bufsize, PROFILE_T *profile) {
    struct dirent* ent = NULL;
    DIR *pDir;
    const char *rootdir = "/sys/bus/usb/devices";
    struct {
        char path[255*2];
    } *pl;
    pl = (typeof(pl)) malloc(sizeof(*pl));
    memset(pl, 0x00, sizeof(*pl));

    pDir = opendir(rootdir);
    if (!pDir) {
        dbg_time("opendir %s failed: %s", rootdir, strerror(errno));
        goto error;
    }

    while ((ent = readdir(pDir)) != NULL)  {
        char netcard[32+1] = {'\0'};
        char devname[32+5] = {'\0'}; //+strlen("/dev/")
        int netIntf;
        int driver_type;

        if (ent->d_name[0] == 'u')
            continue;

        snprintf(pl->path, sizeof(pl->path), "%s/%s", rootdir, ent->d_name);
        query_usb_device_info(pl->path, &profile->usb_dev);
        if (profile->usb_dev.idVendor == CM_INVALID_VAL)
            continue;

        if (profile->usb_dev.idVendor == 0x2c7c || profile->usb_dev.idVendor == 0x05c6) {
            dbg_time("Find %s/%s idVendor=0x%x idProduct=0x%x, bus=0x%03x, dev=0x%03x",
                rootdir, ent->d_name, profile->usb_dev.idVendor, profile->usb_dev.idProduct,
                profile->usb_dev.busnum, profile->usb_dev.devnum);
        }

        /* get network interface */
        /* NOTICE: there is a case that, bNumberInterface=6, but the net interface is 8 */
        /* toolchain-mips_24kc_gcc-5.4.0_musl donot support GLOB_BRACE */
        /* RG500U's MBIM is at inteface 0 */
        for (netIntf = 0;  netIntf < (profile->usb_dev.bNumInterfaces + 8); netIntf++) {
            snprintf(pl->path, sizeof(pl->path), "%s/%s:1.%d/net", rootdir, ent->d_name, netIntf);
            dir_get_child(pl->path, netcard, sizeof(netcard), NULL);
            if (netcard[0])
                break;
        }

        if (netcard[0] == '\0') { //for centos 2.6.x
            const char *n= "usb0";
            const char *c = "qcqmi0";

            snprintf(pl->path, sizeof(pl->path), "%s/%s:1.4/net:%s", rootdir, ent->d_name, n);
            if (!access(pl->path, F_OK)) {
                snprintf(pl->path, sizeof(pl->path), "%s/%s:1.4/GobiQMI:%s", rootdir, ent->d_name, c);
                if (!access(pl->path, F_OK)) {
                    snprintf(qmichannel, bufsize, "/dev/%s", c);
                    snprintf(usbnet_adapter, bufsize, "%s", n);
                    snprintf(pl->path, sizeof(pl->path), "%s/%s:1.4", rootdir, ent->d_name);
                    query_usb_interface_info(pl->path, &profile->usb_intf);
                    break;
                }
            }
        }

        if (netcard[0] == '\0')
            continue;

        /* not '-i iface' */
        if (usbnet_adapter[0] && strcmp(usbnet_adapter, netcard))
            continue;

        snprintf(pl->path, sizeof(pl->path), "%s/%s:1.%d", rootdir, ent->d_name, netIntf);
        query_usb_interface_info(pl->path, &profile->usb_intf);
        driver_type = get_driver_type(profile);

        if (driver_type == SOFTWARE_QMI || driver_type == SOFTWARE_MBIM) {
            detect_path_cdc_wdm_or_qcqmi(pl->path, devname, sizeof(devname));
        }
        else if (driver_type == SOFTWARE_ECM_RNDIS_NCM)
        {
            int atIntf = -1;

            if (profile->usb_dev.idVendor == 0x2c7c) { //Quectel
                switch (profile->usb_dev.idProduct) { //EC200U
                case 0x0901: //EC200U
                case 0x8101: //RG801H
                    atIntf = 2;
                break;
                case 0x0900: //RG500U
                    atIntf = 4;
                break;
                case 0x6026: //EC200T
                case 0x6002: //EC200S
                    atIntf = 3;
                break;
                default:
                   dbg_time("unknow at interface for USB idProduct:%04x\n", profile->usb_dev.idProduct);
                break;
                }
            }

            if (atIntf != -1) {
                snprintf(pl->path, sizeof(pl->path), "%s/%s:1.%d", rootdir, ent->d_name, atIntf);
                dir_get_child(pl->path, devname, sizeof(devname), "tty");
                if (devname[0] && !strcmp(devname, "tty")) {
                    snprintf(pl->path, sizeof(pl->path), "%s/%s:1.%d/tty", rootdir, ent->d_name, atIntf);
                    dir_get_child(pl->path, devname, sizeof(devname), "tty");
                }
            }
        }
        
        if (netcard[0] && devname[0]) {
            if (devname[0] == '/')
                snprintf(qmichannel, bufsize, "%s", devname);
            else
                snprintf(qmichannel, bufsize, "/dev/%s", devname);
            snprintf(usbnet_adapter, bufsize, "%s", netcard);
            dbg_time("Auto find qmichannel = %s", qmichannel);
            dbg_time("Auto find usbnet_adapter = %s", usbnet_adapter);
            break;
        }
    }
    closedir(pDir);

    if (qmichannel[0] == '\0' || usbnet_adapter[0] == '\0') {
        dbg_time("network interface '%s' or qmidev '%s' is not exist", usbnet_adapter, qmichannel);
        goto error;
    }
    free(pl);
    return TRUE;
error:
    free(pl);
    return FALSE;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xb8, %rsp
movq %rcx, (%rsp)
movl %edx, %r13d
movq %rsi, %r15
movq %rdi, %r14
movl $0x1, %edi
movl $0x1fe, %esi            # imm = 0x1FE
callq 0x5290
movq %rax, %rbx
leaq 0xc309(%rip), %rdi      # 0x22860
callq 0x5140
testq %rax, %rax
je 0x16e73
movq %rax, %r12
movl %r13d, 0x14(%rsp)
movq %r15, 0x8(%rsp)
movq %r14, 0x18(%rsp)
movq %rax, %rdi
callq 0x5320
testq %rax, %rax
movq (%rsp), %rdx
je 0x17057
movq %rax, %r13
movabsq $0x6d756e7375622f, %rcx # imm = 0x6D756E7375622F
leaq 0x1c5(%rdx), %rax
movq %rax, 0x50(%rsp)
leaq 0x1d9(%rdx), %rax
movq %rax, 0x48(%rsp)
leaq 0x2f00200(%rcx), %rax
movq %rax, 0x88(%rsp)
movq %r12, 0x58(%rsp)
xorps %xmm0, %xmm0
movaps %xmm0, 0x70(%rsp)
movaps %xmm0, 0x60(%rsp)
movb $0x0, 0x80(%rsp)
movaps %xmm0, 0x30(%rsp)
movaps %xmm0, 0x20(%rsp)
movq $0x0, 0x3d(%rsp)
cmpb $0x75, 0x13(%r13)
je 0x16db9
addq $0x13, %r13
movl $0x1fe, %esi            # imm = 0x1FE
movq %rbx, %rdi
leaq 0x8807(%rip), %rdx      # 0x1ee12
leaq 0xc24e(%rip), %rcx      # 0x22860
movq %r13, %r8
xorl %eax, %eax
callq 0x51c0
movq %rbx, %rdi
callq 0x5160
movq %rax, %r15
movq 0x50(%rsp), %r12
xorps %xmm0, %xmm0
movups %xmm0, (%r12)
movl $0x0, 0x10(%r12)
movb $0x0, (%rbx,%rax)
movq %rbx, %rdi
callq 0x5160
movabsq $0x6f646e655664692f, %rcx # imm = 0x6F646E655664692F
movq %rcx, (%rbx,%rax)
movw $0x72, 0x8(%rbx,%rax)
movq %rbx, %rdi
movl $0x10, %esi
callq 0x181f3
movl %eax, (%r12)
cmpl $-0x1, %eax
je 0x16db9
xorl %r14d, %r14d
movb %r14b, (%rbx,%r15)
movq %rbx, %rdi
callq 0x5160
movabsq $0x75646f725064692f, %rcx # imm = 0x75646F725064692F
movq %rcx, (%rbx,%rax)
movl $0x746375, 0x7(%rbx,%rax) # imm = 0x746375
movq %rbx, %rdi
movl $0x10, %esi
callq 0x181f3
movq (%rsp), %rcx
movl %eax, 0x1c9(%rcx)
movb %r14b, (%rbx,%r15)
movq %rbx, %rdi
callq 0x5160
movabsq $0x6d756e7375622f, %rcx # imm = 0x6D756E7375622F
movq %rcx, (%rbx,%rax)
movq %rbx, %rdi
movl $0xa, %esi
callq 0x181f3
movq (%rsp), %rcx
movl %eax, 0x1cd(%rcx)
movb %r14b, (%rbx,%r15)
movq %rbx, %rdi
callq 0x5160
movq 0x88(%rsp), %rcx
movq %rcx, (%rbx,%rax)
movq %rbx, %rdi
movl $0xa, %esi
callq 0x181f3
movq (%rsp), %rcx
movl %eax, 0x1d1(%rcx)
movb %r14b, (%rbx,%r15)
movq %rbx, %rdi
callq 0x5160
movups 0xc721(%rip), %xmm0     # 0x22e48
movups %xmm0, (%rbx,%rax)
movq %rbx, %rdi
movl $0xa, %esi
callq 0x181f3
movq (%rsp), %rcx
movl %eax, 0x1d5(%rcx)
movb %r14b, (%rbx,%r15)
movq (%rsp), %r14
leaq 0xc140(%rip), %rbp      # 0x22891
movl 0x1c5(%r14), %ecx
cmpl $-0x1, %ecx
je 0x16db9
cmpl $0x2c7c, %ecx           # imm = 0x2C7C
je 0x16775
cmpl $0x5c6, %ecx            # imm = 0x5C6
jne 0x1682f
movq 0x13844(%rip), %rax     # 0x29fc0
movq (%rax), %r15
callq 0xea3b
movl 0x1c5(%r14), %r9d
movl 0x1c9(%r14), %r10d
movl 0x1cd(%r14), %r11d
movl 0x1d1(%r14), %r12d
subq $0x8, %rsp
movq %r15, %rdi
movq %rbp, %rsi
movq %rax, %rdx
movq %r14, %rbp
leaq 0xc0a9(%rip), %r14      # 0x22860
movq %r14, %rcx
movq %r13, %r8
xorl %eax, %eax
pushq %r12
pushq %r11
pushq %r10
callq 0x52c0
addq $0x20, %rsp
leaq 0x144d3(%rip), %rax     # 0x2aca8
movq (%rax), %r15
testq %r15, %r15
je 0x16826
callq 0xea3b
movl 0x1c5(%rbp), %r9d
movl 0x1c9(%rbp), %r10d
movl 0x1cd(%rbp), %r11d
movl 0x1d1(%rbp), %r12d
subq $0x8, %rsp
movq %r15, %rdi
leaq 0xc085(%rip), %rsi      # 0x22891
movq %rax, %rdx
movq %r14, %rcx
movq %r13, %r8
xorl %eax, %eax
pushq %r12
pushq %r11
pushq %r10
callq 0x52c0
addq $0x20, %rsp
movl 0x1d5(%rbp), %eax
movq %rbp, %r14
cmpl $-0x7, %eax
jl 0x16892
xorl %r12d, %r12d
movl $0x1fe, %esi            # imm = 0x1FE
movq %rbx, %rdi
leaq 0xc091(%rip), %rdx      # 0x228d7
leaq 0xc013(%rip), %rcx      # 0x22860
movq %r13, %r8
movl %r12d, %r9d
xorl %eax, %eax
callq 0x51c0
movq %rbx, %rdi
leaq 0x60(%rsp), %rsi
movl $0x21, %edx
xorl %ecx, %ecx
callq 0x170f2
cmpb $0x0, 0x60(%rsp)
jne 0x1691d
leal 0x1(%r12), %r15d
movl 0x1d5(%r14), %eax
addl $0x7, %eax
cmpl %eax, %r12d
movl %r15d, %r12d
jl 0x16837
jmp 0x168a0
xorl %r15d, %r15d
cmpb $0x0, 0x60(%rsp)
jne 0x16920
movl $0x1fe, %esi            # imm = 0x1FE
movq %rbx, %rdi
leaq 0xc043(%rip), %rdx      # 0x228f2
leaq 0xbfaa(%rip), %r14      # 0x22860
movq %r14, %rcx
movq %r13, %r8
leaq 0xc023(%rip), %r9       # 0x228e6
xorl %eax, %eax
callq 0x51c0
movq %rbx, %rdi
xorl %esi, %esi
callq 0x5450
testl %eax, %eax
jne 0x1690d
movl $0x1fe, %esi            # imm = 0x1FE
movq %rbx, %rdi
leaq 0xc01c(%rip), %rdx      # 0x22903
movq %r14, %rcx
movq %r13, %r8
leaq 0xbff7(%rip), %r9       # 0x228eb
xorl %eax, %eax
callq 0x51c0
movq %rbx, %rdi
xorl %esi, %esi
callq 0x5450
testl %eax, %eax
je 0x16fe6
cmpb $0x0, 0x60(%rsp)
movq (%rsp), %r14
jne 0x16920
jmp 0x16db9
movl %r12d, %r15d
movq 0x8(%rsp), %rax
cmpb $0x0, (%rax)
je 0x16941
movq 0x8(%rsp), %rdi
leaq 0x60(%rsp), %rsi
callq 0x52a0
testl %eax, %eax
jne 0x16db9
movl $0x1fe, %esi            # imm = 0x1FE
movq %rbx, %rdi
leaq 0xbfda(%rip), %rdx      # 0x2292a
leaq 0xbf09(%rip), %r12      # 0x22860
movq %r12, %rcx
movq %r13, %r8
movl %r15d, %r9d
xorl %eax, %eax
callq 0x51c0
movq %rbx, %rdi
movq 0x48(%rsp), %rsi
callq 0x17193
movq %r14, %rdi
callq 0x17374
leal -0x1(%rax), %ecx
cmpl $0x1, %ecx
ja 0x16c50
movq %rbx, %rdi
callq 0x5160
movq %rax, %r15
movb $0x0, 0x20(%rsp)
movq %rbx, %rdi
movl $0x4, %esi
callq 0x5450
testl %eax, %eax
leaq 0xc528(%rip), %rbp      # 0x22ed6
jne 0x16d9d
xorl %r14d, %r14d
movb %r14b, (%rbx,%r15)
movq %rbx, %rdi
callq 0x5160
movabsq $0x494d5169626f472f, %rcx # imm = 0x494D5169626F472F
movq %rcx, (%rbx,%rax)
movb %r14b, 0x8(%rbx,%rax)
movq %rbx, %rdi
movl $0x4, %esi
callq 0x5450
testl %eax, %eax
je 0x16a4a
xorl %r14d, %r14d
movb %r14b, (%rbx,%r15)
movq %rbx, %rdi
callq 0x5160
movabsq $0x6373696d6273752f, %rcx # imm = 0x6373696D6273752F
movq %rcx, (%rbx,%rax)
movb %r14b, 0x8(%rbx,%rax)
movq %rbx, %rdi
movl $0x4, %esi
callq 0x5450
testl %eax, %eax
je 0x16a4a
xorl %r14d, %r14d
movb %r14b, (%rbx,%r15)
movq %rbx, %rdi
callq 0x5160
movb %r14b, 0x4(%rbx,%rax)
movl $0x6273752f, (%rbx,%rax) # imm = 0x6273752F
movq %rbx, %rdi
movl $0x4, %esi
callq 0x5450
testl %eax, %eax
jne 0x16d9d
leaq 0x1397f(%rip), %rax     # 0x2a3d0
cmpl $0x0, (%rax)
je 0x16aa7
movq 0x13563(%rip), %rax     # 0x29fc0
movq (%rax), %r15
callq 0xea3b
movq %r15, %rdi
leaq 0x84d7(%rip), %rsi      # 0x1ef46
movq %rax, %rdx
movq %rbx, %rcx
xorl %eax, %eax
callq 0x52c0
leaq 0x14225(%rip), %rax     # 0x2aca8
movq (%rax), %r15
testq %r15, %r15
je 0x16aa7
callq 0xea3b
movq %r15, %rdi
leaq 0x84ac(%rip), %rsi      # 0x1ef46
movq %rax, %rdx
movq %rbx, %rcx
xorl %eax, %eax
callq 0x52c0
movq %rbx, %rdi
leaq 0x90(%rsp), %rsi
movl $0x20, %edx
xorl %ecx, %ecx
callq 0x170f2
cmpb $0x0, 0x90(%rsp)
je 0x16d9d
movl $0x25, %esi
leaq 0x20(%rsp), %r14
movq %r14, %rdi
leaq 0xbe38(%rip), %rdx      # 0x22918
leaq 0x90(%rsp), %rcx
xorl %eax, %eax
callq 0x51c0
movq %r14, %rdi
movl $0x4, %esi
callq 0x5450
testl %eax, %eax
je 0x16d9d
callq 0x5070
cmpl $0x2, (%rax)
jne 0x16d9d
movq %rax, %r15
movq 0x134a4(%rip), %rax     # 0x29fc0
movq (%rax), %r14
callq 0xea3b
movq %rax, %r13
movl (%r15), %r12d
movl %r12d, %edi
callq 0x5530
movq %r14, %rdi
movq %rbp, %rsi
movq %r13, %rdx
leaq 0x20(%rsp), %r14
movq %r14, %rcx
movl %r12d, %r8d
movq %rax, %r9
xorl %eax, %eax
callq 0x52c0
leaq 0x14151(%rip), %rax     # 0x2aca8
movq (%rax), %r12
testq %r12, %r12
je 0x16b8b
callq 0xea3b
movq %rax, %r13
movl (%r15), %r15d
movl %r15d, %edi
callq 0x5530
movq %r12, %rdi
movq %rbp, %rsi
movq %r13, %rdx
movq %r14, %rcx
movl %r15d, %r8d
movq %rax, %r9
xorl %eax, %eax
callq 0x52c0
movq %rbx, %rdi
callq 0x5160
movw $0x2f, (%rbx,%rax)
movq %rbx, %rdi
leaq 0x90(%rsp), %rsi
callq 0x54c0
movq %rbx, %rdi
callq 0x5160
movabsq $0x746e657665752f, %rcx # imm = 0x746E657665752F
movq %rcx, (%rbx,%rax)
movq %rbx, %rdi
leaq 0xc335(%rip), %rsi      # 0x22efe
callq 0x18305
movl %eax, %r15d
movq %rbx, %rdi
leaq 0xc329(%rip), %rsi      # 0x22f04
callq 0x18305
movl %eax, %r13d
cmpl $-0x1, %r15d
sete %al
cmpl $-0x1, %r13d
sete %cl
orb %al, %cl
cmpb $0x1, %cl
jne 0x16dd7
movq 0x133bd(%rip), %rax     # 0x29fc0
movq (%rax), %r15
callq 0xea3b
movq %r15, %rdi
leaq 0xc2f5(%rip), %rsi      # 0x22f0a
movq %rax, %rdx
xorl %eax, %eax
callq 0x52c0
leaq 0x14082(%rip), %rax     # 0x2aca8
movq (%rax), %r15
testq %r15, %r15
je 0x16d9d
callq 0xea3b
movq %r15, %rdi
leaq 0xc2c9(%rip), %rsi      # 0x22f0a
movq %rax, %rdx
xorl %eax, %eax
callq 0x52c0
jmp 0x16d9d
cmpl $0x3, %eax
jne 0x16d9d
movq 0x50(%rsp), %rax
cmpl $0x2c7c, (%rax)         # imm = 0x2C7C
jne 0x16d9d
movl 0x1c9(%r14), %eax
movl $0x2, %r15d
cmpl $0x6001, %eax           # imm = 0x6001
jle 0x16c9d
cmpl $0x6002, %eax           # imm = 0x6002
je 0x16d0d
cmpl $0x6026, %eax           # imm = 0x6026
je 0x16d0d
cmpl $0x8101, %eax           # imm = 0x8101
je 0x16d1b
jmp 0x16cab
cmpl $0x900, %eax            # imm = 0x900
je 0x16d15
cmpl $0x901, %eax            # imm = 0x901
je 0x16d1b
movq 0x1330e(%rip), %rax     # 0x29fc0
movq (%rax), %r15
callq 0xea3b
movl 0x1c9(%r14), %ecx
movq %r15, %rdi
leaq 0xbc6a(%rip), %rsi      # 0x22935
movq %rax, %rdx
xorl %eax, %eax
callq 0x52c0
leaq 0x13fcc(%rip), %rax     # 0x2aca8
movq (%rax), %r15
testq %r15, %r15
je 0x16d9d
callq 0xea3b
movl 0x1c9(%r14), %ecx
movq %r15, %rdi
leaq 0xbc37(%rip), %rsi      # 0x22935
movq %rax, %rdx
xorl %eax, %eax
callq 0x52c0
jmp 0x16d9d
movl $0x3, %r15d
jmp 0x16d1b
movl $0x4, %r15d
movl $0x1fe, %esi            # imm = 0x1FE
movq %rbx, %rdi
leaq 0xbc00(%rip), %rdx      # 0x2292a
movq %r12, %rcx
movq %r13, %r8
movl %r15d, %r9d
xorl %eax, %eax
callq 0x51c0
movq %rbx, %rdi
leaq 0x20(%rsp), %rsi
movl $0x25, %edx
leaq 0xbc24(%rip), %rcx      # 0x22972
callq 0x170f2
movb 0x20(%rsp), %al
testb %al, %al
je 0x16da1
cmpl $0x797474, 0x20(%rsp)   # imm = 0x797474
jne 0x16da1
movl $0x1fe, %esi            # imm = 0x1FE
movq %rbx, %rdi
leaq 0xbbf3(%rip), %rdx      # 0x22967
movq %r12, %rcx
movq %r13, %r8
movl %r15d, %r9d
xorl %eax, %eax
callq 0x51c0
movq %rbx, %rdi
leaq 0x20(%rsp), %rsi
movl $0x25, %edx
leaq 0xbbda(%rip), %rcx      # 0x22972
callq 0x170f2
movb 0x20(%rsp), %al
cmpb $0x0, 0x60(%rsp)
setne %cl
testb %al, %al
setne %dl
andb %cl, %dl
cmpb $0x1, %dl
je 0x16ef5
movq 0x58(%rsp), %r12
movq %r12, %rdi
callq 0x5320
movq %rax, %r13
testq %rax, %rax
jne 0x165c5
jmp 0x17057
movl %r15d, %eax
shll $0x8, %eax
andl $0xfff00, %eax          # imm = 0xFFF00
movzbl %r13b, %ecx
orl %eax, %ecx
movl %r13d, %eax
shll $0xc, %eax
andl $0xfff00000, %eax       # imm = 0xFFF00000
orl %ecx, %eax
movslq %eax, %rdx
movq %r14, %rdi
movl $0x21b6, %esi           # imm = 0x21B6
callq 0x52d0
testl %eax, %eax
je 0x16d9d
movq 0x131b0(%rip), %rax     # 0x29fc0
movq (%rax), %r12
callq 0xea3b
movq %r12, %rdi
leaq 0xc109(%rip), %rsi      # 0x22f2b
movq %rax, %rdx
leaq 0x20(%rsp), %rcx
movl %r15d, %r8d
movl %r13d, %r9d
xorl %eax, %eax
callq 0x52c0
leaq 0x13e6a(%rip), %rax     # 0x2aca8
movq (%rax), %r12
testq %r12, %r12
je 0x16d9d
callq 0xea3b
movq %r12, %rdi
leaq 0xc0d2(%rip), %rsi      # 0x22f2b
movq %rax, %rdx
leaq 0x20(%rsp), %rcx
movl %r15d, %r8d
movl %r13d, %r9d
xorl %eax, %eax
callq 0x52c0
jmp 0x16d9d
movq 0x13146(%rip), %rax     # 0x29fc0
movq (%rax), %r15
callq 0xea3b
movq %rax, %r12
callq 0x5070
movq %rax, %r14
movl (%rax), %edi
callq 0x5530
leaq 0xb9da(%rip), %rsi      # 0x22875
leaq 0xb9be(%rip), %rcx      # 0x22860
xorl %ebp, %ebp
movq %r15, %rdi
movq %r12, %rdx
movq %rax, %r8
xorl %eax, %eax
callq 0x52c0
leaq 0x13ded(%rip), %rax     # 0x2aca8
movq (%rax), %r15
testq %r15, %r15
je 0x170d6
callq 0xea3b
movq %rax, %r12
movl (%r14), %edi
callq 0x5530
leaq 0xb997(%rip), %rsi      # 0x22875
leaq 0xb97b(%rip), %rcx      # 0x22860
xorl %ebp, %ebp
movq %r15, %rdi
movq %r12, %rdx
movq %rax, %r8
jmp 0x170cf
cmpb $0x2f, %al
movl 0x14(%rsp), %ebp
leaq 0xbf2b(%rip), %r15      # 0x22e2d
leaq 0xba0f(%rip), %rdx      # 0x22918
cmoveq %r15, %rdx
leaq 0x20(%rsp), %rcx
movq 0x18(%rsp), %r12
movq %r12, %rdi
movq %rbp, %rsi
xorl %eax, %eax
callq 0x51c0
leaq 0x60(%rsp), %rcx
movq 0x8(%rsp), %r13
movq %r13, %rdi
movq %rbp, %rsi
movq %r15, %rdx
xorl %eax, %eax
callq 0x51c0
movq 0x1307b(%rip), %rax     # 0x29fc0
movq (%rax), %r15
callq 0xea3b
leaq 0xba22(%rip), %rsi      # 0x22976
movq %r15, %rdi
movq %rax, %rdx
movq %r12, %rcx
xorl %eax, %eax
callq 0x52c0
leaq 0x13d3d(%rip), %rax     # 0x2aca8
movq (%rax), %r15
testq %r15, %r15
je 0x16f8f
callq 0xea3b
leaq 0xb9f7(%rip), %rsi      # 0x22976
movq %r15, %rdi
movq %rax, %rdx
movq %r12, %rcx
xorl %eax, %eax
callq 0x52c0
movq 0x1302a(%rip), %rax     # 0x29fc0
movq (%rax), %r15
callq 0xea3b
leaq 0xb9f1(%rip), %rsi      # 0x22996
movq %r15, %rdi
movq %rax, %rdx
movq %r13, %rcx
xorl %eax, %eax
callq 0x52c0
leaq 0x13cec(%rip), %rax     # 0x2aca8
movq (%rax), %r15
testq %r15, %r15
je 0x17052
callq 0xea3b
leaq 0xb9c2(%rip), %rsi      # 0x22996
movq %r15, %rdi
movq %rax, %rdx
movq %r13, %rcx
xorl %eax, %eax
callq 0x52c0
jmp 0x17052
movl 0x14(%rsp), %r15d
leaq 0xb926(%rip), %rdx      # 0x22918
leaq 0xb8f2(%rip), %rcx      # 0x228eb
movq 0x18(%rsp), %rdi
movq %r15, %rsi
xorl %eax, %eax
callq 0x51c0
leaq 0xbe1e(%rip), %rdx      # 0x22e2d
leaq 0xb8d0(%rip), %rcx      # 0x228e6
movq 0x8(%rsp), %rdi
movq %r15, %rsi
xorl %eax, %eax
callq 0x51c0
leaq 0xb8f4(%rip), %rdx      # 0x22920
leaq 0xb82d(%rip), %rcx      # 0x22860
movl $0x1fe, %esi            # imm = 0x1FE
movq %rbx, %rdi
movq %r13, %r8
xorl %eax, %eax
callq 0x51c0
movq %rbx, %rdi
movq 0x48(%rsp), %rsi
callq 0x17193
movq 0x58(%rsp), %r12
movq %r12, %rdi
callq 0x5240
movq 0x18(%rsp), %r15
cmpb $0x0, (%r15)
movq 0x8(%rsp), %r12
je 0x1707b
movl $0x1, %ebp
cmpb $0x0, (%r12)
jne 0x170d6
movq 0x12f3e(%rip), %rax     # 0x29fc0
movq (%rax), %r14
callq 0xea3b
leaq 0xb929(%rip), %rsi      # 0x229ba
xorl %ebp, %ebp
movq %r14, %rdi
movq %rax, %rdx
movq %r12, %rcx
movq %r15, %r8
xorl %eax, %eax
callq 0x52c0
leaq 0x13bfb(%rip), %rax     # 0x2aca8
movq (%rax), %r14
testq %r14, %r14
je 0x170d6
callq 0xea3b
leaq 0xb8f9(%rip), %rsi      # 0x229ba
xorl %ebp, %ebp
movq %r14, %rdi
movq %rax, %rdx
movq %r12, %rcx
movq %r15, %r8
xorl %eax, %eax
callq 0x52c0
movq %rbx, %rdi
callq 0x5040
movl %ebp, %eax
addq $0xb8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq