// File: /workspace/github_c_makefile_star2_O0/Carton32[P]quectel-CM/udhcpc.c
// Function: udhcpc_start
void udhcpc_start(PROFILE_T *profile) {
    char *ifname = profile->usbnet_adapter;
    char shell_cmd[128];

    ql_set_driver_link_state(profile, 1);

    if (profile->qmapnet_adapter[0]) {
        ifname = profile->qmapnet_adapter;
    }

    if (profile->rawIP && profile->ipv4.Address && profile->ipv4.Mtu) {
        ql_set_mtu(ifname, (profile->ipv4.Mtu));
    }

    if (strcmp(ifname, profile->usbnet_adapter)) {
        snprintf(shell_cmd, sizeof(shell_cmd), "ifconfig %s up", profile->usbnet_adapter);
        ql_system(shell_cmd);
        if (ifc_get_flags(ifname)&IFF_UP) {
            snprintf(shell_cmd, sizeof(shell_cmd), "ifconfig %s down", ifname);
            ql_system(shell_cmd);
        }
    }

    snprintf(shell_cmd, sizeof(shell_cmd), "ifconfig %s up", ifname);
    ql_system(shell_cmd);
	
    if (profile->ipv4.Address) {
        if (profile->PCSCFIpv4Addr1)
            dbg_time("pcscf1: %s", ipv4Str(profile->PCSCFIpv4Addr1));
        if (profile->PCSCFIpv4Addr2)
            dbg_time("pcscf2: %s", ipv4Str(profile->PCSCFIpv4Addr2));
    }

    if (profile->ipv6.Address[0] && profile->ipv6.PrefixLengthIPAddr) {
        if (profile->PCSCFIpv6Addr1[0])
            dbg_time("pcscf1: %s", ipv6Str(profile->PCSCFIpv6Addr1));
        if (profile->PCSCFIpv6Addr2[0])
            dbg_time("pcscf2: %s", ipv6Str(profile->PCSCFIpv6Addr2));
    }

#if 1 //for bridge mode, only one public IP, so do udhcpc manually
    if (ql_bridge_mode_detect(profile)) {
        return;
    }
#endif

//because must use udhcpc to obtain IP when working on ETH mode,
//so it is better also use udhcpc to obtain IP when working on IP mode.
//use the same policy for all modules
#if 0
    if (profile->rawIP != 0) //mdm9x07/ec25,ec20 R2.0
    {
        update_ip_address_by_qmi(ifname, &profile->ipv4, &profile->ipv6);
        return;
    }
#endif

    if (profile->ipv4.Address == 0)
        goto set_ipv6;

    if (profile->request_ops == &mbim_request_ops) { //lots of mbim modem do not support DHCP
        update_ip_address_by_qmi(ifname, &profile->ipv4, NULL);
    }
    else
/* Do DHCP using busybox tools */
    {
        char udhcpc_cmd[128];
        pthread_attr_t udhcpc_thread_attr;
        pthread_t udhcpc_thread_id;

        pthread_attr_init(&udhcpc_thread_attr);
        pthread_attr_setdetachstate(&udhcpc_thread_attr, PTHREAD_CREATE_DETACHED);

#ifdef USE_DHCLIENT
            snprintf(udhcpc_cmd, sizeof(udhcpc_cmd), "dhclient -4 -d --no-pid %s", ifname);
            dhclient_alive++;
#else
            if (access("/usr/share/udhcpc/default.script", X_OK)
                && access("/etc//udhcpc/default.script", X_OK)) {
                dbg_time("No default.script found, it should be in '/usr/share/udhcpc/' or '/etc//udhcpc' depend on your udhcpc version!");
            }

            //-f,--foreground    Run in foreground
            //-b,--background    Background if lease is not obtained
            //-n,--now        Exit if lease is not obtained
            //-q,--quit        Exit after obtaining lease
            //-t,--retries N        Send up to N discover packets (default 3)
            snprintf(udhcpc_cmd, sizeof(udhcpc_cmd), "busybox udhcpc -f -n -q -t 5 -i %s", ifname);
#endif

#if 1 //for OpenWrt
            if (!access("/lib/netifd/dhcp.script", X_OK) && !access("/sbin/ifup", X_OK) && !access("/sbin/ifstatus", X_OK)) {
#if 0 //20210415 do not promot these message
                dbg_time("you are use OpenWrt?");
                dbg_time("should not calling udhcpc manually?");
                dbg_time("should modify /etc/config/network as below?");
                dbg_time("config interface wan");
                dbg_time("\toption ifname	%s", ifname);
                dbg_time("\toption proto	dhcp");
                dbg_time("should use \"/sbin/ifstaus wan\" to check %s 's status?", ifname);
#endif
            }
#endif

#ifdef USE_DHCLIENT            
            pthread_create(&udhcpc_thread_id, &udhcpc_thread_attr, udhcpc_thread_function, (void*)strdup(udhcpc_cmd));
            sleep(1);
#else
            pthread_create(&udhcpc_thread_id, NULL, udhcpc_thread_function, (void*)strdup(udhcpc_cmd));
            pthread_join(udhcpc_thread_id, NULL);

            if (profile->request_ops == &atc_request_ops
                && !ql_netcard_ipv4_address_check(ifname, qmi2addr(profile->ipv4.Address))) {
                ql_get_netcard_carrier_state(ifname);
            }

            if (profile->request_ops != &qmi_request_ops) { //only QMI modem support next fixup!
                goto set_ipv6;
            }

            if (ql_raw_ip_mode_check(ifname, profile->ipv4.Address)) {
                pthread_create(&udhcpc_thread_id, NULL, udhcpc_thread_function, (void*)strdup(udhcpc_cmd));
                pthread_join(udhcpc_thread_id, NULL);
            }

            if (!ql_netcard_ipv4_address_check(ifname, qmi2addr(profile->ipv4.Address))) {
                //no udhcpc's default.script exist, directly set ip and dns
                update_ip_address_by_qmi(ifname, &profile->ipv4, NULL);
            }
#endif
    }

#ifdef QL_OPENWER_NETWORK_SETUP
    ql_openwrt_setup_wan(ifname, &profile->ipv4);
#endif

set_ipv6:
    if (profile->ipv6.Address[0] && profile->ipv6.PrefixLengthIPAddr) {
#if 1
        //module do not support DHCPv6, only support 'Router Solicit'
        //and it seem if enable /proc/sys/net/ipv6/conf/all/forwarding, Kernel do not send RS
        const char *forward_file = "/proc/sys/net/ipv6/conf/all/forwarding";
        int forward_fd = open(forward_file, O_RDONLY);
        if (forward_fd > 0) {
            char forward_state[2];
            if (read(forward_fd, forward_state, 2) == -1) {};
            if (forward_state[0] == '1') {
                //dbg_time("%s enabled, kernel maybe donot send 'Router Solicit'", forward_file);
            }
            close(forward_fd);
        }

        update_ip_address_by_qmi(ifname, NULL, &profile->ipv6);

        if (profile->ipv6.DnsPrimary[0] || profile->ipv6.DnsSecondary[0]) {
            char dns1str[64], dns2str[64];

            if (profile->ipv6.DnsPrimary[0]) {
                strcpy(dns1str, ipv6Str(profile->ipv6.DnsPrimary));
            }

            if (profile->ipv6.DnsSecondary[0]) {
                strcpy(dns2str, ipv6Str(profile->ipv6.DnsSecondary));
            }

            update_resolv_conf(6, ifname, profile->ipv6.DnsPrimary[0] ? dns1str : NULL,
                               profile->ipv6.DnsSecondary[0] != '\0' ? dns2str : NULL);
        }

#ifdef QL_OPENWER_NETWORK_SETUP
            ql_openwrt_setup_wan6(ifname, &profile->ipv6);
#endif
#else
#ifdef USE_DHCLIENT
        snprintf(udhcpc_cmd, sizeof(udhcpc_cmd), "dhclient -6 -d --no-pid %s",  ifname);
        dhclient_alive++;
#else
        /*
            DHCPv6: Dibbler - a portable DHCPv6
            1. download from http://klub.com.pl/dhcpv6/
            2. cross-compile
                2.1 ./configure --host=arm-linux-gnueabihf
                2.2 copy dibbler-client to your board
            3. mkdir -p /var/log/dibbler/ /var/lib/ on your board
            4. create /etc/dibbler/client.conf on your board, the content is
                log-mode short
                log-level 7
                iface wwan0 {
                    ia
                    option dns-server
                }
             5. run "dibbler-client start" to get ipV6 address
             6. run "route -A inet6 add default dev wwan0" to add default route
        */
        snprintf(shell_cmd, sizeof(shell_cmd), "route -A inet6 add default %s", ifname);
        ql_system(shell_cmd);
        snprintf(udhcpc_cmd, sizeof(udhcpc_cmd), "dibbler-client run");
        dibbler_client_alive++;
#endif

        pthread_create(&udhcpc_thread_id, &udhcpc_thread_attr, udhcpc_thread_function, (void*)strdup(udhcpc_cmd));
#endif
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x2b0, %rsp            # imm = 0x2B0
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0xaa, %rax
movq %rax, -0x10(%rbp)
movq -0x8(%rbp), %rdi
movl $0x1, %esi
callq 0x28c30
movq -0x8(%rbp), %rax
cmpb $0x0, 0xca(%rax)
je 0x293c6
movq -0x8(%rbp), %rax
addq $0xca, %rax
movq %rax, -0x10(%rbp)
movq -0x8(%rbp), %rax
cmpl $0x0, 0x11a(%rax)
je 0x29400
movq -0x8(%rbp), %rax
cmpl $0x0, 0x126(%rax)
je 0x29400
movq -0x8(%rbp), %rax
cmpl $0x0, 0x13a(%rax)
je 0x29400
movq -0x10(%rbp), %rdi
movq -0x8(%rbp), %rax
movl 0x13a(%rax), %esi
callq 0x29c60
movq -0x10(%rbp), %rdi
movq -0x8(%rbp), %rsi
addq $0xaa, %rsi
callq 0x52a0
cmpl $0x0, %eax
je 0x29488
leaq -0x90(%rbp), %rdi
movq -0x8(%rbp), %rcx
addq $0xaa, %rcx
movl $0x80, %esi
leaq 0x7055(%rip), %rdx      # 0x3048c
movb $0x0, %al
callq 0x51c0
leaq -0x90(%rbp), %rdi
callq 0x28f30
movq -0x10(%rbp), %rdi
callq 0x29d60
cwtl
andl $0x1, %eax
cmpl $0x0, %eax
je 0x29486
leaq -0x90(%rbp), %rdi
movq -0x10(%rbp), %rcx
movl $0x80, %esi
leaq 0x7615(%rip), %rdx      # 0x30a88
movb $0x0, %al
callq 0x51c0
leaq -0x90(%rbp), %rdi
callq 0x28f30
jmp 0x29488
leaq -0x90(%rbp), %rdi
movq -0x10(%rbp), %rcx
movl $0x80, %esi
leaq 0x6fed(%rip), %rdx      # 0x3048c
movb $0x0, %al
callq 0x51c0
leaq -0x90(%rbp), %rdi
callq 0x28f30
movq -0x8(%rbp), %rax
cmpl $0x0, 0x126(%rax)
je 0x29639
movq -0x8(%rbp), %rax
cmpl $0x0, 0x194(%rax)
je 0x2957d
jmp 0x294d6
movq 0xdb03(%rip), %rax      # 0x36fe0
movq (%rax), %rax
movq %rax, -0x1f0(%rbp)
callq 0x13930
movq %rax, -0x1e8(%rbp)
movq -0x8(%rbp), %rax
movl 0x194(%rax), %edi
callq 0x291e0
movq -0x1f0(%rbp), %rdi
movq -0x1e8(%rbp), %rdx
movq %rax, %rcx
leaq 0x7691(%rip), %rsi      # 0x30bab
movb $0x0, %al
callq 0x52c0
leaq 0xe940(%rip), %rax      # 0x37e68
cmpq $0x0, (%rax)
je 0x29579
leaq 0xe933(%rip), %rax      # 0x37e68
movq (%rax), %rax
movq %rax, -0x200(%rbp)
callq 0x13930
movq %rax, -0x1f8(%rbp)
movq -0x8(%rbp), %rax
movl 0x194(%rax), %edi
callq 0x291e0
movq -0x200(%rbp), %rdi
movq -0x1f8(%rbp), %rdx
movq %rax, %rcx
leaq 0x7639(%rip), %rsi      # 0x30bab
movb $0x0, %al
callq 0x52c0
jmp 0x2957b
jmp 0x2957d
movq -0x8(%rbp), %rax
cmpl $0x0, 0x198(%rax)
je 0x29637
jmp 0x29590
movq 0xda49(%rip), %rax      # 0x36fe0
movq (%rax), %rax
movq %rax, -0x210(%rbp)
callq 0x13930
movq %rax, -0x208(%rbp)
movq -0x8(%rbp), %rax
movl 0x198(%rax), %edi
callq 0x291e0
movq -0x210(%rbp), %rdi
movq -0x208(%rbp), %rdx
movq %rax, %rcx
leaq 0x75e8(%rip), %rsi      # 0x30bbc
movb $0x0, %al
callq 0x52c0
leaq 0xe886(%rip), %rax      # 0x37e68
cmpq $0x0, (%rax)
je 0x29633
leaq 0xe879(%rip), %rax      # 0x37e68
movq (%rax), %rax
movq %rax, -0x220(%rbp)
callq 0x13930
movq %rax, -0x218(%rbp)
movq -0x8(%rbp), %rax
movl 0x198(%rax), %edi
callq 0x291e0
movq -0x220(%rbp), %rdi
movq -0x218(%rbp), %rdx
movq %rax, %rcx
leaq 0x7590(%rip), %rsi      # 0x30bbc
movb $0x0, %al
callq 0x52c0
jmp 0x29635
jmp 0x29637
jmp 0x29639
movq -0x8(%rbp), %rax
movzbl 0x13e(%rax), %eax
cmpl $0x0, %eax
je 0x297db
movq -0x8(%rbp), %rax
movzbl 0x18e(%rax), %eax
cmpl $0x0, %eax
je 0x297db
movq -0x8(%rbp), %rax
cmpb $0x0, 0x19c(%rax)
je 0x2971d
jmp 0x29674
movq 0xd965(%rip), %rax      # 0x36fe0
movq (%rax), %rax
movq %rax, -0x230(%rbp)
callq 0x13930
movq %rax, -0x228(%rbp)
movq -0x8(%rbp), %rdi
addq $0x19c, %rdi            # imm = 0x19C
callq 0x29dd0
movq -0x230(%rbp), %rdi
movq -0x228(%rbp), %rdx
movq %rax, %rcx
leaq 0x74f2(%rip), %rsi      # 0x30bab
movb $0x0, %al
callq 0x52c0
leaq 0xe7a1(%rip), %rax      # 0x37e68
cmpq $0x0, (%rax)
je 0x29719
leaq 0xe794(%rip), %rax      # 0x37e68
movq (%rax), %rax
movq %rax, -0x240(%rbp)
callq 0x13930
movq %rax, -0x238(%rbp)
movq -0x8(%rbp), %rdi
addq $0x19c, %rdi            # imm = 0x19C
callq 0x29dd0
movq -0x240(%rbp), %rdi
movq -0x238(%rbp), %rdx
movq %rax, %rcx
leaq 0x7499(%rip), %rsi      # 0x30bab
movb $0x0, %al
callq 0x52c0
jmp 0x2971b
jmp 0x2971d
movq -0x8(%rbp), %rax
cmpb $0x0, 0x1ac(%rax)
je 0x297d9
jmp 0x29730
movq 0xd8a9(%rip), %rax      # 0x36fe0
movq (%rax), %rax
movq %rax, -0x250(%rbp)
callq 0x13930
movq %rax, -0x248(%rbp)
movq -0x8(%rbp), %rdi
addq $0x1ac, %rdi            # imm = 0x1AC
callq 0x29dd0
movq -0x250(%rbp), %rdi
movq -0x248(%rbp), %rdx
movq %rax, %rcx
leaq 0x7447(%rip), %rsi      # 0x30bbc
movb $0x0, %al
callq 0x52c0
leaq 0xe6e5(%rip), %rax      # 0x37e68
cmpq $0x0, (%rax)
je 0x297d5
leaq 0xe6d8(%rip), %rax      # 0x37e68
movq (%rax), %rax
movq %rax, -0x260(%rbp)
callq 0x13930
movq %rax, -0x258(%rbp)
movq -0x8(%rbp), %rdi
addq $0x1ac, %rdi            # imm = 0x1AC
callq 0x29dd0
movq -0x260(%rbp), %rdi
movq -0x258(%rbp), %rdx
movq %rax, %rcx
leaq 0x73ee(%rip), %rsi      # 0x30bbc
movb $0x0, %al
callq 0x52c0
jmp 0x297d7
jmp 0x297d9
jmp 0x297db
movq -0x8(%rbp), %rdi
callq 0x14e90
cmpl $0x0, %eax
je 0x297ee
jmp 0x29c54
movq -0x8(%rbp), %rax
cmpl $0x0, 0x126(%rax)
jne 0x29800
jmp 0x29a7f
movq -0x8(%rbp), %rax
leaq 0xccb5(%rip), %rcx      # 0x364c0
cmpq %rcx, 0x326(%rax)
jne 0x29831
movq -0x10(%rbp), %rdi
movq -0x8(%rbp), %rsi
addq $0x126, %rsi            # imm = 0x126
xorl %eax, %eax
movl %eax, %edx
callq 0x29e90
jmp 0x29a7d
leaq -0x148(%rbp), %rdi
callq 0x5260
leaq -0x148(%rbp), %rdi
movl $0x1, %esi
callq 0x5330
leaq 0x7378(%rip), %rdi      # 0x30bcd
movl $0x1, %esi
callq 0x5460
cmpl $0x0, %eax
je 0x298ed
leaq 0x737f(%rip), %rdi      # 0x30bee
movl $0x1, %esi
callq 0x5460
cmpl $0x0, %eax
je 0x298ed
jmp 0x29880
movq 0xd759(%rip), %rax      # 0x36fe0
movq (%rax), %rax
movq %rax, -0x268(%rbp)
callq 0x13930
movq -0x268(%rbp), %rdi
movq %rax, %rdx
leaq 0x7363(%rip), %rsi      # 0x30c0a
movb $0x0, %al
callq 0x52c0
leaq 0xe5b3(%rip), %rax      # 0x37e68
cmpq $0x0, (%rax)
je 0x298e9
leaq 0xe5a6(%rip), %rax      # 0x37e68
movq (%rax), %rax
movq %rax, -0x270(%rbp)
callq 0x13930
movq -0x270(%rbp), %rdi
movq %rax, %rdx
leaq 0x7328(%rip), %rsi      # 0x30c0a
movb $0x0, %al
callq 0x52c0
jmp 0x298eb
jmp 0x298ed
leaq -0x110(%rbp), %rdi
movq -0x10(%rbp), %rcx
movl $0x80, %esi
leaq 0x737b(%rip), %rdx      # 0x30c7f
movb $0x0, %al
callq 0x51c0
leaq 0x7390(%rip), %rdi      # 0x30ca2
movl $0x1, %esi
callq 0x5460
cmpl $0x0, %eax
jne 0x2994f
leaq 0x7392(%rip), %rdi      # 0x30cba
movl $0x1, %esi
callq 0x5460
cmpl $0x0, %eax
jne 0x2994f
leaq 0x7387(%rip), %rdi      # 0x30cc5
movl $0x1, %esi
callq 0x5460
cmpl $0x0, %eax
jne 0x2994f
jmp 0x2994f
leaq -0x110(%rbp), %rdi
callq 0x5530
movq %rax, %rcx
leaq -0x150(%rbp), %rdi
xorl %eax, %eax
movl %eax, %esi
leaq 0x780(%rip), %rdx       # 0x2a0f0
callq 0x53e0
movq -0x150(%rbp), %rdi
xorl %eax, %eax
movl %eax, %esi
callq 0x5520
movq -0x8(%rbp), %rax
leaq 0xd390(%rip), %rcx      # 0x36d20
cmpq %rcx, 0x326(%rax)
jne 0x299cf
movq -0x10(%rbp), %rax
movq %rax, -0x278(%rbp)
movq -0x8(%rbp), %rax
movl 0x126(%rax), %edi
callq 0x2a300
movq -0x278(%rbp), %rdi
movl %eax, %esi
callq 0x2a2c0
cmpl $0x0, %eax
jne 0x299cf
movq -0x10(%rbp), %rdi
callq 0x22610
movq -0x8(%rbp), %rax
leaq 0xc9c6(%rip), %rcx      # 0x363a0
cmpq %rcx, 0x326(%rax)
je 0x299e8
jmp 0x29a7f
movq -0x10(%rbp), %rdi
movq -0x8(%rbp), %rax
movl 0x126(%rax), %esi
callq 0x2a340
cmpl $0x0, %eax
je 0x29a36
leaq -0x110(%rbp), %rdi
callq 0x5530
movq %rax, %rcx
leaq -0x150(%rbp), %rdi
xorl %eax, %eax
movl %eax, %esi
leaq 0x6cf(%rip), %rdx       # 0x2a0f0
callq 0x53e0
movq -0x150(%rbp), %rdi
xorl %eax, %eax
movl %eax, %esi
callq 0x5520
movq -0x10(%rbp), %rax
movq %rax, -0x280(%rbp)
movq -0x8(%rbp), %rax
movl 0x126(%rax), %edi
callq 0x2a300
movq -0x280(%rbp), %rdi
movl %eax, %esi
callq 0x2a2c0
cmpl $0x0, %eax
jne 0x29a7b
movq -0x10(%rbp), %rdi
movq -0x8(%rbp), %rsi
addq $0x126, %rsi            # imm = 0x126
xorl %eax, %eax
movl %eax, %edx
callq 0x29e90
jmp 0x29a7d
jmp 0x29a7f
movq -0x8(%rbp), %rax
movzbl 0x13e(%rax), %eax
cmpl $0x0, %eax
je 0x29c54
movq -0x8(%rbp), %rax
movzbl 0x18e(%rax), %eax
cmpl $0x0, %eax
je 0x29c54
leaq 0x7226(%rip), %rax      # 0x30cd4
movq %rax, -0x158(%rbp)
movq -0x158(%rbp), %rdi
xorl %esi, %esi
movb $0x0, %al
callq 0x5450
movl %eax, -0x15c(%rbp)
cmpl $0x0, -0x15c(%rbp)
jle 0x29b0c
movl -0x15c(%rbp), %edi
leaq -0x15e(%rbp), %rsi
movl $0x2, %edx
callq 0x5250
cmpq $-0x1, %rax
jne 0x29af3
jmp 0x29af3
movsbl -0x15e(%rbp), %eax
cmpl $0x31, %eax
jne 0x29b01
jmp 0x29b01
movl -0x15c(%rbp), %edi
callq 0x5230
movq -0x10(%rbp), %rdi
movq -0x8(%rbp), %rdx
addq $0x13e, %rdx            # imm = 0x13E
xorl %eax, %eax
movl %eax, %esi
callq 0x29e90
movq -0x8(%rbp), %rax
movzbl 0x16e(%rax), %eax
cmpl $0x0, %eax
jne 0x29b48
movq -0x8(%rbp), %rax
movzbl 0x17e(%rax), %eax
cmpl $0x0, %eax
je 0x29c52
movq -0x8(%rbp), %rax
cmpb $0x0, 0x16e(%rax)
je 0x29b86
leaq -0x1a0(%rbp), %rax
movq %rax, -0x288(%rbp)
movq -0x8(%rbp), %rdi
addq $0x13e, %rdi            # imm = 0x13E
addq $0x30, %rdi
callq 0x29dd0
movq -0x288(%rbp), %rdi
movq %rax, %rsi
callq 0x50a0
movq -0x8(%rbp), %rax
cmpb $0x0, 0x17e(%rax)
je 0x29bc4
leaq -0x1e0(%rbp), %rax
movq %rax, -0x290(%rbp)
movq -0x8(%rbp), %rdi
addq $0x13e, %rdi            # imm = 0x13E
addq $0x40, %rdi
callq 0x29dd0
movq -0x290(%rbp), %rdi
movq %rax, %rsi
callq 0x50a0
movq -0x10(%rbp), %rax
movq %rax, -0x298(%rbp)
movq -0x8(%rbp), %rax
movzbl 0x16e(%rax), %eax
cmpl $0x0, %eax
je 0x29bef
leaq -0x1a0(%rbp), %rax
movq %rax, -0x2a0(%rbp)
jmp 0x29bfa
xorl %eax, %eax
movq %rax, -0x2a0(%rbp)
jmp 0x29bfa
movq -0x2a0(%rbp), %rax
movq %rax, -0x2a8(%rbp)
movq -0x8(%rbp), %rax
movzbl 0x17e(%rax), %eax
cmpl $0x0, %eax
je 0x29c28
leaq -0x1e0(%rbp), %rax
movq %rax, -0x2b0(%rbp)
jmp 0x29c33
xorl %eax, %eax
movq %rax, -0x2b0(%rbp)
jmp 0x29c33
movq -0x2a8(%rbp), %rdx
movq -0x298(%rbp), %rsi
movq -0x2b0(%rbp), %rcx
movl $0x6, %edi
callq 0x140b0
jmp 0x29c54
addq $0x2b0, %rsp            # imm = 0x2B0
popq %rbp
retq
nopl (%rax)