// File: /workspace/github_c_makefile_star2_O0/Carton32[P]quectel-CM/QMIThread.c
// Function: requestSetEthMode
static int requestSetEthMode(PROFILE_T *profile) {
    PQCQMIMSG pRequest;
    PQCQMIMSG pResponse = NULL;
    PQMUX_MSG pMUXMsg;
    int err;
    PQMIWDS_ADMIN_SET_DATA_FORMAT_TLV linkProto;
    UCHAR IpPreference;
    UCHAR autoconnect_setting = 0;
    QMAP_SETTING qmap_settings = {0};

    qmap_settings.size = sizeof(qmap_settings);
    
    if (profile->qmap_mode) {
        profile->rawIP = 1;
        s_9x07 = profile->rawIP;
        
        qmap_settings.MuxId = profile->muxid;

        if (profile->hardware_interface == HARDWARE_PCIE) { //SDX20_PCIE
            qmap_settings.rx_urb_size = profile->qmap_size; //SDX24&SDX55 support 32KB 
            qmap_settings.ep_type = DATA_EP_TYPE_PCIE;
            qmap_settings.iface_id = 0x04;
        }
        else { // for MDM9x07&MDM9x40&SDX20 USB
            qmap_settings.rx_urb_size = profile->qmap_size; //SDX24&SDX55 support 32KB
            qmap_settings.ep_type = DATA_EP_TYPE_HSUSB;
            qmap_settings.iface_id = 0x04;
        }

        qmap_settings.ul_data_aggregation_max_datagrams = 11; //by test result, 11 can get best TPUT
        qmap_settings.ul_data_aggregation_max_size = 8*1024;
        qmap_settings.dl_minimum_padding = 0; //no effect when register to real netowrk
        if(profile->qmap_version != 0x09)
            profile->qmap_version = 0x05;

        qmap_version = profile->qmap_version;
        if (profile->rmnet_info.size) {
            qmap_settings.rx_urb_size = profile->rmnet_info.rx_urb_size;
            qmap_settings.ep_type = profile->rmnet_info.ep_type;
            qmap_settings.iface_id = profile->rmnet_info.iface_id;
            qmap_settings.dl_minimum_padding = profile->rmnet_info.dl_minimum_padding;
            qmap_version = profile->rmnet_info.qmap_version;
        }

        if (!profile->wda_client) {
            if (qmidev_is_gobinet(profile->qmichannel)) {
                //when QMAP enabled, set data format in GobiNet driver
            }
            else if (profile->proxy[0]) {
                /* the first running 'quectel-cm' had alloc wda client and set data format,
                   so we can ingore to set data format here. */
            }
            goto skip_WdaSetDataFormat;
        }
    }

    pRequest = ComposeQMUXMsg(QMUX_TYPE_WDS_ADMIN, QMIWDS_ADMIN_SET_DATA_FORMAT_REQ, WdaSetDataFormat, (void *)&qmap_settings);
    err = QmiThreadSendQMI(pRequest, &pResponse);
    qmi_rsp_check_and_return();

    linkProto = (PQMIWDS_ADMIN_SET_DATA_FORMAT_TLV)GetTLV(&pResponse->MUXMsg.QMUXMsgHdr, 0x11);
    if (linkProto != NULL) {
        profile->rawIP = (le32_to_cpu(linkProto->Value) == 2);
        s_9x07 = profile->rawIP; //MDM90x7 only support RAW IP, do not support Eth
    }

    linkProto = (PQMIWDS_ADMIN_SET_DATA_FORMAT_TLV)GetTLV(&pResponse->MUXMsg.QMUXMsgHdr, 0x16);
    if (linkProto != NULL && profile->qmap_mode) {
        qmap_settings.rx_urb_size = le32_to_cpu(linkProto->Value);
        dbg_time("qmap_settings.rx_urb_size = %u", qmap_settings.rx_urb_size); //must same as rx_urb_size defined in GobiNet&qmi_wwan driver
    }

#ifdef QUECTEL_UL_DATA_AGG
    if (qmap_settings.ul_data_aggregation_max_datagrams)
    {
        linkProto = (PQMIWDS_ADMIN_SET_DATA_FORMAT_TLV)GetTLV(&pResponse->MUXMsg.QMUXMsgHdr, 0x17);
        if (linkProto != NULL) {
            qmap_settings.ul_data_aggregation_max_datagrams = MIN(qmap_settings.ul_data_aggregation_max_datagrams, le32_to_cpu(linkProto->Value));
            dbg_time("qmap_settings.ul_data_aggregation_max_datagrams  = %u", qmap_settings.ul_data_aggregation_max_datagrams);
        }

        linkProto = (PQMIWDS_ADMIN_SET_DATA_FORMAT_TLV)GetTLV(&pResponse->MUXMsg.QMUXMsgHdr, 0x18);
        if (linkProto != NULL) {
            qmap_settings.ul_data_aggregation_max_size = MIN(qmap_settings.ul_data_aggregation_max_size, le32_to_cpu(linkProto->Value));
            dbg_time("qmap_settings.ul_data_aggregation_max_size       = %u", qmap_settings.ul_data_aggregation_max_size);
        }

        linkProto = (PQMIWDS_ADMIN_SET_DATA_FORMAT_TLV)GetTLV(&pResponse->MUXMsg.QMUXMsgHdr, 0x1A);
        if (linkProto != NULL) {
            qmap_settings.dl_minimum_padding = le32_to_cpu(linkProto->Value);
            dbg_time("qmap_settings.dl_minimum_padding                 = %u", qmap_settings.dl_minimum_padding);
        }

	if (qmap_settings.ul_data_aggregation_max_datagrams > 1) {
		ql_set_driver_qmap_setting(profile, &qmap_settings);
	}
    }
#endif

    free(pResponse);

skip_WdaSetDataFormat:
    if (profile->enable_ipv4) {
    	if (profile->qmapnet_adapter[0]) {
            // bind wds mux data port
        	pRequest = ComposeQMUXMsg(QMUX_TYPE_WDS, QMIWDS_BIND_MUX_DATA_PORT_REQ , WdsSetQMUXBindMuxDataPort, (void *)&qmap_settings);
        	err = QmiThreadSendQMI(pRequest, &pResponse);
        	qmi_rsp_check_and_return();
        	if (pResponse) free(pResponse);
        }

        // set ipv4
    	IpPreference = IpFamilyV4;
    	pRequest = ComposeQMUXMsg(QMUX_TYPE_WDS, QMIWDS_SET_CLIENT_IP_FAMILY_PREF_REQ, WdsSetClientIPFamilyPref, (void *)&IpPreference);
    	err = QmiThreadSendQMI(pRequest, &pResponse);
    	if (pResponse) free(pResponse);
    }

    if (profile->enable_ipv6) {
        if (profile->qmapnet_adapter[0]) {
            // bind wds ipv6 mux data port
            pRequest = ComposeQMUXMsg(QMUX_TYPE_WDS_IPV6, QMIWDS_BIND_MUX_DATA_PORT_REQ , WdsSetQMUXBindMuxDataPort, (void *)&qmap_settings);
            err = QmiThreadSendQMI(pRequest, &pResponse);
            qmi_rsp_check_and_return();
            if (pResponse) free(pResponse);
        }

        // set ipv6
        IpPreference = IpFamilyV6;
        pRequest = ComposeQMUXMsg(QMUX_TYPE_WDS_IPV6, QMIWDS_SET_CLIENT_IP_FAMILY_PREF_REQ, WdsSetClientIPFamilyPref, (void *)&IpPreference);
        err = QmiThreadSendQMI(pRequest, &pResponse);
        qmi_rsp_check_and_return();
        if (pResponse) free(pResponse);
    }

    pRequest = ComposeQMUXMsg(QMUX_TYPE_WDS, QMIWDS_SET_AUTO_CONNECT_REQ , WdsSetAutoConnect, (void *)&autoconnect_setting);
    QmiThreadSendQMI(pRequest, &pResponse);
    if (pResponse) free(pResponse);

    return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x180, %rsp            # imm = 0x180
movq %rdi, -0x10(%rbp)
movq $0x0, -0x20(%rbp)
movb $0x0, -0x3a(%rbp)
leaq -0x5a(%rbp), %rdi
xorl %esi, %esi
movl $0x20, %edx
callq 0x5200
movl $0x20, -0x5a(%rbp)
movq -0x10(%rbp), %rax
cmpl $0x0, 0x10a(%rax)
je 0xd019
movq -0x10(%rbp), %rax
movl $0x1, 0x11a(%rax)
movq -0x10(%rbp), %rax
movl 0x11a(%rax), %eax
movl %eax, 0x2a40f(%rip)     # 0x37300
movq -0x10(%rbp), %rax
movl 0x11e(%rax), %eax
movl %eax, -0x4a(%rbp)
movq -0x10(%rbp), %rax
cmpl $0x5, 0x1bd(%rax)
jne 0xcf28
movq -0x10(%rbp), %rax
movl 0x10e(%rax), %eax
movl %eax, -0x56(%rbp)
movl $0x3, -0x52(%rbp)
movl $0x4, -0x4e(%rbp)
jmp 0xcf43
movq -0x10(%rbp), %rax
movl 0x10e(%rax), %eax
movl %eax, -0x56(%rbp)
movl $0x2, -0x52(%rbp)
movl $0x4, -0x4e(%rbp)
movl $0xb, -0x46(%rbp)
movl $0x2000, -0x42(%rbp)    # imm = 0x2000
movl $0x0, -0x3e(%rbp)
movq -0x10(%rbp), %rax
cmpl $0x9, 0x112(%rax)
je 0xcf73
movq -0x10(%rbp), %rax
movl $0x5, 0x112(%rax)
movq -0x10(%rbp), %rax
movl 0x112(%rax), %eax
movl %eax, 0x2a381(%rip)     # 0x37304
movq -0x10(%rbp), %rax
cmpl $0x0, 0x32e(%rax)
je 0xcfd4
movq -0x10(%rbp), %rax
movl 0x332(%rax), %eax
movl %eax, -0x56(%rbp)
movq -0x10(%rbp), %rax
movl 0x336(%rax), %eax
movl %eax, -0x52(%rbp)
movq -0x10(%rbp), %rax
movl 0x33a(%rax), %eax
movl %eax, -0x4e(%rbp)
movq -0x10(%rbp), %rax
movl 0x346(%rax), %eax
movl %eax, -0x3e(%rbp)
movq -0x10(%rbp), %rax
movl 0x342(%rax), %eax
movl %eax, 0x2a330(%rip)     # 0x37304
movq -0x10(%rbp), %rax
cmpl $0x0, 0x122(%rax)
jne 0xd017
movq -0x10(%rbp), %rdi
addq $0x8a, %rdi
leaq 0x1ec99(%rip), %rsi     # 0x2bc8c
movl $0xa, %edx
callq 0x5090
cmpl $0x0, %eax
jne 0xd004
jmp 0xd012
movq -0x10(%rbp), %rax
cmpb $0x0, 0x28(%rax)
je 0xd010
jmp 0xd010
jmp 0xd012
jmp 0xd594
jmp 0xd019
movl $0x1a, %edi
movl $0x20, %esi
leaq 0x43f6(%rip), %rdx      # 0x11420
leaq -0x5a(%rbp), %rcx
callq 0x11170
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rdi
leaq -0x20(%rbp), %rsi
movl $0x7530, %edx           # imm = 0x7530
leaq 0x20970(%rip), %rcx     # 0x2d9bb
callq 0xc670
movl %eax, -0x2c(%rbp)
cmpl $0x0, -0x2c(%rbp)
jl 0xd064
cmpq $0x0, -0x20(%rbp)
jne 0xd0e6
jmp 0xd066
movq 0x29f73(%rip), %rax     # 0x36fe0
movq (%rax), %rax
movq %rax, -0x70(%rbp)
callq 0x13930
movq -0x70(%rbp), %rdi
movq %rax, %rdx
movl -0x2c(%rbp), %r8d
leaq 0x208d6(%rip), %rsi     # 0x2d961
leaq 0x20929(%rip), %rcx     # 0x2d9bb
movb $0x0, %al
callq 0x52c0
leaq 0x2adc8(%rip), %rax     # 0x37e68
cmpq $0x0, (%rax)
je 0xd0d9
leaq 0x2adbb(%rip), %rax     # 0x37e68
movq (%rax), %rax
movq %rax, -0x78(%rbp)
callq 0x13930
movq -0x78(%rbp), %rdi
movq %rax, %rdx
movl -0x2c(%rbp), %r8d
leaq 0x20896(%rip), %rsi     # 0x2d961
leaq 0x208e9(%rip), %rcx     # 0x2d9bb
movb $0x0, %al
callq 0x52c0
jmp 0xd0db
movl -0x2c(%rbp), %eax
movl %eax, -0x4(%rbp)
jmp 0xdc89
movq -0x20(%rbp), %rax
addq $0x6, %rax
movq %rax, -0x28(%rbp)
movq -0x28(%rbp), %rax
movzwl 0xa(%rax), %edi
callq 0x13ed0
movzwl %ax, %eax
cmpl $0x0, %eax
jne 0xd120
movq -0x28(%rbp), %rax
movzwl 0xc(%rax), %edi
callq 0x13ed0
movzwl %ax, %eax
cmpl $0x0, %eax
je 0xd1fb
movq -0x28(%rbp), %rax
movzwl 0xc(%rax), %edi
callq 0x13ed0
movw %ax, -0x5c(%rbp)
movq 0x29ea8(%rip), %rax     # 0x36fe0
movq (%rax), %rax
movq %rax, -0x88(%rbp)
callq 0x13930
movq %rax, -0x80(%rbp)
movq -0x28(%rbp), %rax
movzwl 0xa(%rax), %edi
callq 0x13ed0
movq -0x88(%rbp), %rdi
movq -0x80(%rbp), %rdx
movzwl %ax, %r8d
movzwl -0x5c(%rbp), %r9d
leaq 0x20800(%rip), %rsi     # 0x2d973
leaq 0x20841(%rip), %rcx     # 0x2d9bb
movb $0x0, %al
callq 0x52c0
leaq 0x2ace0(%rip), %rax     # 0x37e68
cmpq $0x0, (%rax)
je 0xd1e4
leaq 0x2acd3(%rip), %rax     # 0x37e68
movq (%rax), %rax
movq %rax, -0x98(%rbp)
callq 0x13930
movq %rax, -0x90(%rbp)
movq -0x28(%rbp), %rax
movzwl 0xa(%rax), %edi
callq 0x13ed0
movq -0x98(%rbp), %rdi
movq -0x90(%rbp), %rdx
movzwl %ax, %r8d
movzwl -0x5c(%rbp), %r9d
leaq 0x2079d(%rip), %rsi     # 0x2d973
leaq 0x207de(%rip), %rcx     # 0x2d9bb
movb $0x0, %al
callq 0x52c0
jmp 0xd1e6
movq -0x20(%rbp), %rdi
callq 0x5040
movzwl -0x5c(%rbp), %eax
movl %eax, -0x4(%rbp)
jmp 0xdc89
jmp 0xd1fd
movq -0x20(%rbp), %rdi
addq $0x6, %rdi
addq $0x3, %rdi
movl $0x11, %esi
callq 0xc580
movq %rax, -0x38(%rbp)
cmpq $0x0, -0x38(%rbp)
je 0xd24f
movq -0x38(%rbp), %rax
movl 0x3(%rax), %edi
callq 0x13f20
cmpl $0x2, %eax
sete %al
andb $0x1, %al
movzbl %al, %ecx
movq -0x10(%rbp), %rax
movl %ecx, 0x11a(%rax)
movq -0x10(%rbp), %rax
movl 0x11a(%rax), %eax
movl %eax, 0x2a0b1(%rip)     # 0x37300
movq -0x20(%rbp), %rdi
addq $0x6, %rdi
addq $0x3, %rdi
movl $0x16, %esi
callq 0xc580
movq %rax, -0x38(%rbp)
cmpq $0x0, -0x38(%rbp)
je 0xd307
movq -0x10(%rbp), %rax
cmpl $0x0, 0x10a(%rax)
je 0xd307
movq -0x38(%rbp), %rax
movl 0x3(%rax), %edi
callq 0x13f20
movl %eax, -0x56(%rbp)
movq 0x29d45(%rip), %rax     # 0x36fe0
movq (%rax), %rax
movq %rax, -0xa0(%rbp)
callq 0x13930
movq -0xa0(%rbp), %rdi
movq %rax, %rdx
movl -0x56(%rbp), %ecx
leaq 0x2070f(%rip), %rsi     # 0x2d9cd
movb $0x0, %al
callq 0x52c0
leaq 0x2ab9c(%rip), %rax     # 0x37e68
cmpq $0x0, (%rax)
je 0xd303
leaq 0x2ab8f(%rip), %rax     # 0x37e68
movq (%rax), %rax
movq %rax, -0xa8(%rbp)
callq 0x13930
movq -0xa8(%rbp), %rdi
movq %rax, %rdx
movl -0x56(%rbp), %ecx
leaq 0x206d1(%rip), %rsi     # 0x2d9cd
movb $0x0, %al
callq 0x52c0
jmp 0xd305
jmp 0xd307
cmpl $0x0, -0x46(%rbp)
je 0xd58b
movq -0x20(%rbp), %rdi
addq $0x6, %rdi
addq $0x3, %rdi
movl $0x17, %esi
callq 0xc580
movq %rax, -0x38(%rbp)
cmpq $0x0, -0x38(%rbp)
je 0xd3f0
movl -0x46(%rbp), %eax
movl %eax, -0xac(%rbp)
movq -0x38(%rbp), %rax
movl 0x3(%rax), %edi
callq 0x13f20
movl %eax, %ecx
movl -0xac(%rbp), %eax
cmpl %ecx, %eax
jae 0xd362
movl -0x46(%rbp), %eax
movl %eax, -0xb0(%rbp)
jmp 0xd374
movq -0x38(%rbp), %rax
movl 0x3(%rax), %edi
callq 0x13f20
movl %eax, -0xb0(%rbp)
movl -0xb0(%rbp), %eax
movl %eax, -0x46(%rbp)
movq 0x29c5c(%rip), %rax     # 0x36fe0
movq (%rax), %rax
movq %rax, -0xb8(%rbp)
callq 0x13930
movq -0xb8(%rbp), %rdi
movq %rax, %rdx
movl -0x46(%rbp), %ecx
leaq 0x2064b(%rip), %rsi     # 0x2d9f2
movb $0x0, %al
callq 0x52c0
leaq 0x2aab3(%rip), %rax     # 0x37e68
cmpq $0x0, (%rax)
je 0xd3ec
leaq 0x2aaa6(%rip), %rax     # 0x37e68
movq (%rax), %rax
movq %rax, -0xc0(%rbp)
callq 0x13930
movq -0xc0(%rbp), %rdi
movq %rax, %rdx
movl -0x46(%rbp), %ecx
leaq 0x2060d(%rip), %rsi     # 0x2d9f2
movb $0x0, %al
callq 0x52c0
jmp 0xd3ee
jmp 0xd3f0
movq -0x20(%rbp), %rdi
addq $0x6, %rdi
addq $0x3, %rdi
movl $0x18, %esi
callq 0xc580
movq %rax, -0x38(%rbp)
cmpq $0x0, -0x38(%rbp)
je 0xd4cf
movl -0x42(%rbp), %eax
movl %eax, -0xc4(%rbp)
movq -0x38(%rbp), %rax
movl 0x3(%rax), %edi
callq 0x13f20
movl %eax, %ecx
movl -0xc4(%rbp), %eax
cmpl %ecx, %eax
jae 0xd441
movl -0x42(%rbp), %eax
movl %eax, -0xc8(%rbp)
jmp 0xd453
movq -0x38(%rbp), %rax
movl 0x3(%rax), %edi
callq 0x13f20
movl %eax, -0xc8(%rbp)
movl -0xc8(%rbp), %eax
movl %eax, -0x42(%rbp)
movq 0x29b7d(%rip), %rax     # 0x36fe0
movq (%rax), %rax
movq %rax, -0xd0(%rbp)
callq 0x13930
movq -0xd0(%rbp), %rdi
movq %rax, %rdx
movl -0x42(%rbp), %ecx
leaq 0x205a8(%rip), %rsi     # 0x2da2e
movb $0x0, %al
callq 0x52c0
leaq 0x2a9d4(%rip), %rax     # 0x37e68
cmpq $0x0, (%rax)
je 0xd4cb
leaq 0x2a9c7(%rip), %rax     # 0x37e68
movq (%rax), %rax
movq %rax, -0xd8(%rbp)
callq 0x13930
movq -0xd8(%rbp), %rdi
movq %rax, %rdx
movl -0x42(%rbp), %ecx
leaq 0x2056a(%rip), %rsi     # 0x2da2e
movb $0x0, %al
callq 0x52c0
jmp 0xd4cd
jmp 0xd4cf
movq -0x20(%rbp), %rdi
addq $0x6, %rdi
addq $0x3, %rdi
movl $0x1a, %esi
callq 0xc580
movq %rax, -0x38(%rbp)
cmpq $0x0, -0x38(%rbp)
je 0xd576
movq -0x38(%rbp), %rax
movl 0x3(%rax), %edi
callq 0x13f20
movl %eax, -0x3e(%rbp)
movq 0x29ad6(%rip), %rax     # 0x36fe0
movq (%rax), %rax
movq %rax, -0xe0(%rbp)
callq 0x13930
movq -0xe0(%rbp), %rdi
movq %rax, %rdx
movl -0x3e(%rbp), %ecx
leaq 0x2053d(%rip), %rsi     # 0x2da6a
movb $0x0, %al
callq 0x52c0
leaq 0x2a92d(%rip), %rax     # 0x37e68
cmpq $0x0, (%rax)
je 0xd572
leaq 0x2a920(%rip), %rax     # 0x37e68
movq (%rax), %rax
movq %rax, -0xe8(%rbp)
callq 0x13930
movq -0xe8(%rbp), %rdi
movq %rax, %rdx
movl -0x3e(%rbp), %ecx
leaq 0x204ff(%rip), %rsi     # 0x2da6a
movb $0x0, %al
callq 0x52c0
jmp 0xd574
jmp 0xd576
cmpl $0x1, -0x46(%rbp)
jbe 0xd589
movq -0x10(%rbp), %rdi
leaq -0x5a(%rbp), %rsi
callq 0x14cb0
jmp 0xd58b
movq -0x20(%rbp), %rdi
callq 0x5040
movq -0x10(%rbp), %rax
cmpb $0x0, 0x50(%rax)
je 0xd80b
movq -0x10(%rbp), %rax
cmpb $0x0, 0xca(%rax)
je 0xd7bb
movl $0x1, %edi
movl $0xa2, %esi
leaq 0x415c(%rip), %rdx      # 0x11720
leaq -0x5a(%rbp), %rcx
callq 0x11170
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rdi
leaq -0x20(%rbp), %rsi
movl $0x7530, %edx           # imm = 0x7530
leaq 0x203d6(%rip), %rcx     # 0x2d9bb
callq 0xc670
movl %eax, -0x2c(%rbp)
cmpl $0x0, -0x2c(%rbp)
jl 0xd5fe
cmpq $0x0, -0x20(%rbp)
jne 0xd68c
jmp 0xd600
movq 0x299d9(%rip), %rax     # 0x36fe0
movq (%rax), %rax
movq %rax, -0xf0(%rbp)
callq 0x13930
movq -0xf0(%rbp), %rdi
movq %rax, %rdx
movl -0x2c(%rbp), %r8d
leaq 0x20336(%rip), %rsi     # 0x2d961
leaq 0x20389(%rip), %rcx     # 0x2d9bb
movb $0x0, %al
callq 0x52c0
leaq 0x2a828(%rip), %rax     # 0x37e68
cmpq $0x0, (%rax)
je 0xd67f
leaq 0x2a81b(%rip), %rax     # 0x37e68
movq (%rax), %rax
movq %rax, -0xf8(%rbp)
callq 0x13930
movq -0xf8(%rbp), %rdi
movq %rax, %rdx
movl -0x2c(%rbp), %r8d
leaq 0x202f0(%rip), %rsi     # 0x2d961
leaq 0x20343(%rip), %rcx     # 0x2d9bb
movb $0x0, %al
callq 0x52c0
jmp 0xd681
movl -0x2c(%rbp), %eax
movl %eax, -0x4(%rbp)
jmp 0xdc89
movq -0x20(%rbp), %rax
addq $0x6, %rax
movq %rax, -0x28(%rbp)
movq -0x28(%rbp), %rax
movzwl 0xa(%rax), %edi
callq 0x13ed0
movzwl %ax, %eax
cmpl $0x0, %eax
jne 0xd6c6
movq -0x28(%rbp), %rax
movzwl 0xc(%rax), %edi
callq 0x13ed0
movzwl %ax, %eax
cmpl $0x0, %eax
je 0xd7a7
movq -0x28(%rbp), %rax
movzwl 0xc(%rax), %edi
callq 0x13ed0
movw %ax, -0x5e(%rbp)
movq 0x29902(%rip), %rax     # 0x36fe0
movq (%rax), %rax
movq %rax, -0x108(%rbp)
callq 0x13930
movq %rax, -0x100(%rbp)
movq -0x28(%rbp), %rax
movzwl 0xa(%rax), %edi
callq 0x13ed0
movq -0x108(%rbp), %rdi
movq -0x100(%rbp), %rdx
movzwl %ax, %r8d
movzwl -0x5e(%rbp), %r9d
leaq 0x20254(%rip), %rsi     # 0x2d973
leaq 0x20295(%rip), %rcx     # 0x2d9bb
movb $0x0, %al
callq 0x52c0
leaq 0x2a734(%rip), %rax     # 0x37e68
cmpq $0x0, (%rax)
je 0xd790
leaq 0x2a727(%rip), %rax     # 0x37e68
movq (%rax), %rax
movq %rax, -0x118(%rbp)
callq 0x13930
movq %rax, -0x110(%rbp)
movq -0x28(%rbp), %rax
movzwl 0xa(%rax), %edi
callq 0x13ed0
movq -0x118(%rbp), %rdi
movq -0x110(%rbp), %rdx
movzwl %ax, %r8d
movzwl -0x5e(%rbp), %r9d
leaq 0x201f1(%rip), %rsi     # 0x2d973
leaq 0x20232(%rip), %rcx     # 0x2d9bb
movb $0x0, %al
callq 0x52c0
jmp 0xd792
movq -0x20(%rbp), %rdi
callq 0x5040
movzwl -0x5e(%rbp), %eax
movl %eax, -0x4(%rbp)
jmp 0xdc89
jmp 0xd7a9
cmpq $0x0, -0x20(%rbp)
je 0xd7b9
movq -0x20(%rbp), %rdi
callq 0x5040
jmp 0xd7bb
movb $0x4, -0x39(%rbp)
movl $0x1, %edi
movl $0x4d, %esi
leaq 0x4020(%rip), %rdx      # 0x117f0
leaq -0x39(%rbp), %rcx
callq 0x11170
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rdi
leaq -0x20(%rbp), %rsi
movl $0x7530, %edx           # imm = 0x7530
leaq 0x201ca(%rip), %rcx     # 0x2d9bb
callq 0xc670
movl %eax, -0x2c(%rbp)
cmpq $0x0, -0x20(%rbp)
je 0xd809
movq -0x20(%rbp), %rdi
callq 0x5040
jmp 0xd80b
movq -0x10(%rbp), %rax
cmpb $0x0, 0x51(%rax)
je 0xdc3b
movq -0x10(%rbp), %rax
cmpb $0x0, 0xca(%rax)
je 0xda32
movl $0x11, %edi
movl $0xa2, %esi
leaq 0x3ee5(%rip), %rdx      # 0x11720
leaq -0x5a(%rbp), %rcx
callq 0x11170
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rdi
leaq -0x20(%rbp), %rsi
movl $0x7530, %edx           # imm = 0x7530
leaq 0x2015f(%rip), %rcx     # 0x2d9bb
callq 0xc670
movl %eax, -0x2c(%rbp)
cmpl $0x0, -0x2c(%rbp)
jl 0xd875
cmpq $0x0, -0x20(%rbp)
jne 0xd903
jmp 0xd877
movq 0x29762(%rip), %rax     # 0x36fe0
movq (%rax), %rax
movq %rax, -0x120(%rbp)
callq 0x13930
movq -0x120(%rbp), %rdi
movq %rax, %rdx
movl -0x2c(%rbp), %r8d
leaq 0x200bf(%rip), %rsi     # 0x2d961
leaq 0x20112(%rip), %rcx     # 0x2d9bb
movb $0x0, %al
callq 0x52c0
leaq 0x2a5b1(%rip), %rax     # 0x37e68
cmpq $0x0, (%rax)
je 0xd8f6
leaq 0x2a5a4(%rip), %rax     # 0x37e68
movq (%rax), %rax
movq %rax, -0x128(%rbp)
callq 0x13930
movq -0x128(%rbp), %rdi
movq %rax, %rdx
movl -0x2c(%rbp), %r8d
leaq 0x20079(%rip), %rsi     # 0x2d961
leaq 0x200cc(%rip), %rcx     # 0x2d9bb
movb $0x0, %al
callq 0x52c0
jmp 0xd8f8
movl -0x2c(%rbp), %eax
movl %eax, -0x4(%rbp)
jmp 0xdc89
movq -0x20(%rbp), %rax
addq $0x6, %rax
movq %rax, -0x28(%rbp)
movq -0x28(%rbp), %rax
movzwl 0xa(%rax), %edi
callq 0x13ed0
movzwl %ax, %eax
cmpl $0x0, %eax
jne 0xd93d
movq -0x28(%rbp), %rax
movzwl 0xc(%rax), %edi
callq 0x13ed0
movzwl %ax, %eax
cmpl $0x0, %eax
je 0xda1e
movq -0x28(%rbp), %rax
movzwl 0xc(%rax), %edi
callq 0x13ed0
movw %ax, -0x60(%rbp)
movq 0x2968b(%rip), %rax     # 0x36fe0
movq (%rax), %rax
movq %rax, -0x138(%rbp)
callq 0x13930
movq %rax, -0x130(%rbp)
movq -0x28(%rbp), %rax
movzwl 0xa(%rax), %edi
callq 0x13ed0
movq -0x138(%rbp), %rdi
movq -0x130(%rbp), %rdx
movzwl %ax, %r8d
movzwl -0x60(%rbp), %r9d
leaq 0x1ffdd(%rip), %rsi     # 0x2d973
leaq 0x2001e(%rip), %rcx     # 0x2d9bb
movb $0x0, %al
callq 0x52c0
leaq 0x2a4bd(%rip), %rax     # 0x37e68
cmpq $0x0, (%rax)
je 0xda07
leaq 0x2a4b0(%rip), %rax     # 0x37e68
movq (%rax), %rax
movq %rax, -0x148(%rbp)
callq 0x13930
movq %rax, -0x140(%rbp)
movq -0x28(%rbp), %rax
movzwl 0xa(%rax), %edi
callq 0x13ed0
movq -0x148(%rbp), %rdi
movq -0x140(%rbp), %rdx
movzwl %ax, %r8d
movzwl -0x60(%rbp), %r9d
leaq 0x1ff7a(%rip), %rsi     # 0x2d973
leaq 0x1ffbb(%rip), %rcx     # 0x2d9bb
movb $0x0, %al
callq 0x52c0
jmp 0xda09
movq -0x20(%rbp), %rdi
callq 0x5040
movzwl -0x60(%rbp), %eax
movl %eax, -0x4(%rbp)
jmp 0xdc89
jmp 0xda20
cmpq $0x0, -0x20(%rbp)
je 0xda30
movq -0x20(%rbp), %rdi
callq 0x5040
jmp 0xda32
movb $0x6, -0x39(%rbp)
movl $0x11, %edi
movl $0x4d, %esi
leaq 0x3da9(%rip), %rdx      # 0x117f0
leaq -0x39(%rbp), %rcx
callq 0x11170
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rdi
leaq -0x20(%rbp), %rsi
movl $0x7530, %edx           # imm = 0x7530
leaq 0x1ff53(%rip), %rcx     # 0x2d9bb
callq 0xc670
movl %eax, -0x2c(%rbp)
cmpl $0x0, -0x2c(%rbp)
jl 0xda81
cmpq $0x0, -0x20(%rbp)
jne 0xdb0f
jmp 0xda83
movq 0x29556(%rip), %rax     # 0x36fe0
movq (%rax), %rax
movq %rax, -0x150(%rbp)
callq 0x13930
movq -0x150(%rbp), %rdi
movq %rax, %rdx
movl -0x2c(%rbp), %r8d
leaq 0x1feb3(%rip), %rsi     # 0x2d961
leaq 0x1ff06(%rip), %rcx     # 0x2d9bb
movb $0x0, %al
callq 0x52c0
leaq 0x2a3a5(%rip), %rax     # 0x37e68
cmpq $0x0, (%rax)
je 0xdb02
leaq 0x2a398(%rip), %rax     # 0x37e68
movq (%rax), %rax
movq %rax, -0x158(%rbp)
callq 0x13930
movq -0x158(%rbp), %rdi
movq %rax, %rdx
movl -0x2c(%rbp), %r8d
leaq 0x1fe6d(%rip), %rsi     # 0x2d961
leaq 0x1fec0(%rip), %rcx     # 0x2d9bb
movb $0x0, %al
callq 0x52c0
jmp 0xdb04
movl -0x2c(%rbp), %eax
movl %eax, -0x4(%rbp)
jmp 0xdc89
movq -0x20(%rbp), %rax
addq $0x6, %rax
movq %rax, -0x28(%rbp)
movq -0x28(%rbp), %rax
movzwl 0xa(%rax), %edi
callq 0x13ed0
movzwl %ax, %eax
cmpl $0x0, %eax
jne 0xdb49
movq -0x28(%rbp), %rax
movzwl 0xc(%rax), %edi
callq 0x13ed0
movzwl %ax, %eax
cmpl $0x0, %eax
je 0xdc27
movq -0x28(%rbp), %rax
movzwl 0xc(%rax), %edi
callq 0x13ed0
movw %ax, -0x62(%rbp)
movq 0x2947f(%rip), %rax     # 0x36fe0
movq (%rax), %rax
movq %rax, -0x168(%rbp)
callq 0x13930
movq %rax, -0x160(%rbp)
movq -0x28(%rbp), %rax
movzwl 0xa(%rax), %edi
callq 0x13ed0
movq -0x168(%rbp), %rdi
movq -0x160(%rbp), %rdx
movzwl %ax, %r8d
movzwl -0x62(%rbp), %r9d
leaq 0x1fdd1(%rip), %rsi     # 0x2d973
leaq 0x1fe12(%rip), %rcx     # 0x2d9bb
movb $0x0, %al
callq 0x52c0
leaq 0x2a2b1(%rip), %rax     # 0x37e68
cmpq $0x0, (%rax)
je 0xdc13
leaq 0x2a2a4(%rip), %rax     # 0x37e68
movq (%rax), %rax
movq %rax, -0x178(%rbp)
callq 0x13930
movq %rax, -0x170(%rbp)
movq -0x28(%rbp), %rax
movzwl 0xa(%rax), %edi
callq 0x13ed0
movq -0x178(%rbp), %rdi
movq -0x170(%rbp), %rdx
movzwl %ax, %r8d
movzwl -0x62(%rbp), %r9d
leaq 0x1fd6e(%rip), %rsi     # 0x2d973
leaq 0x1fdaf(%rip), %rcx     # 0x2d9bb
movb $0x0, %al
callq 0x52c0
jmp 0xdc15
movq -0x20(%rbp), %rdi
callq 0x5040
movzwl -0x62(%rbp), %eax
movl %eax, -0x4(%rbp)
jmp 0xdc89
jmp 0xdc29
cmpq $0x0, -0x20(%rbp)
je 0xdc39
movq -0x20(%rbp), %rdi
callq 0x5040
jmp 0xdc3b
movl $0x1, %edi
movl $0x51, %esi
leaq 0x3bf4(%rip), %rdx      # 0x11840
leaq -0x3a(%rbp), %rcx
callq 0x11170
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rdi
leaq -0x20(%rbp), %rsi
movl $0x7530, %edx           # imm = 0x7530
leaq 0x1fd4e(%rip), %rcx     # 0x2d9bb
callq 0xc670
cmpq $0x0, -0x20(%rbp)
je 0xdc82
movq -0x20(%rbp), %rdi
callq 0x5040
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x180, %rsp            # imm = 0x180
popq %rbp
retq
nopw %cs:(%rax,%rax)