// File: /workspace/github_c_makefile_star2_O3/pencode-lab[P]Shoit/shoit_receiver.c
// Function: transfer_thread_run
static void transfer_thread_run(void *argv)
{
    shoit_core_t *receiver = (shoit_core_t *)argv;

    if(receiver->runing){
        //create udpserver
        receiver->udpRemotePort = receiver->udpLocalPort + 1;
        receiver->udpSockfd=shoit_network_udp_server_init(&receiver->udpServerAddr,
                                                            receiver->udpLocalPort,
                                                            receiver->remoteHost,
                                                            receiver->udpRemotePort);
        if(receiver->verbose>1) SHOIT_LOG("start udpserver 0.0.0.0:%d <-> %s:%d",
                            receiver->udpLocalPort,receiver->remoteHost,receiver->udpRemotePort);

        if(receiver->udpSockfd==-1){
            receiver->runing=false;
            SHOIT_LOG("start udp server failed.\n");
        }
    }

    while(receiver->runing){
        transfer_data_round_circle(receiver);
    }
    receiver->runing=false; 
    pthread_exit(0);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x168, %rsp            # imm = 0x168
movq %rdi, %rbx
cmpl $0x0, 0x1a8(%rdi)
je 0x5afc
movl 0xa0(%rbx), %esi
leal 0x1(%rsi), %ecx
movl %ecx, 0x98(%rbx)
leaq 0xa4(%rbx), %rdi
leaq 0x78(%rbx), %r14
movq %r14, %rdx
callq 0x310a
movl %eax, 0x68(%rbx)
cmpl $0x2, 0x5c(%rbx)
jl 0x56a2
movq 0xe8(%rbx), %rdi
movl 0x98(%rbx), %r8d
movl 0xa0(%rbx), %edx
leaq 0x15bb(%rip), %rsi      # 0x6c50
movq %r14, %rcx
xorl %eax, %eax
callq 0x374a
movl 0x68(%rbx), %eax
cmpl $-0x1, %eax
jne 0x56c6
movl $0x0, 0x1a8(%rbx)
movq 0xe8(%rbx), %rdi
leaq 0x15b6(%rip), %rsi      # 0x6c75
xorl %eax, %eax
callq 0x374a
cmpl $0x0, 0x1a8(%rbx)
je 0x5afc
leaq 0x120(%rbx), %rax
movq %rax, 0x10(%rsp)
leaq 0xe8(%rsp), %r14
leaq 0x30(%rsp), %r12
movq 0x10(%rsp), %rdi
callq 0x2080
cmpl $0x0, 0x1a8(%rbx)
je 0x5a89
movq 0x8(%rbx), %rax
movl 0x2c(%rbx), %ecx
xorl %edx, %edx
divq %rcx
xorl %esi, %esi
testq %rdx, %rdx
setne %sil
cmovel %ecx, %edx
addq %rax, %rsi
movq %rsi, 0x38(%rbx)
movl %edx, 0x30(%rbx)
movq $0x0, 0x48(%rbx)
movq %rsi, 0x40(%rbx)
movq %rsi, %rax
shrq $0x3, %rax
addq $0x2, %rax
movq %rax, 0xd8(%rbx)
movl $0x1, 0xe0(%rbx)
testq %rsi, %rsi
je 0x5768
movq 0xc8(%rbx), %rax
xorl %ecx, %ecx
movq %rcx, (%rax,%rcx,8)
incq %rcx
cmpq 0x38(%rbx), %rcx
jb 0x575b
movq %rbx, %rdi
callq 0x2bce
movq %rbx, %rdi
movl $0x3, %esi
callq 0x5e3b
movq 0xd0(%rbx), %rax
xorps %xmm0, %xmm0
movups %xmm0, 0x4(%rax)
movups %xmm0, 0xe(%rax)
movq %rax, 0x18(%rsp)
movl $0x5, (%rax)
cmpl $0x0, 0x1a8(%rbx)
je 0x5ad5
leaq 0xb8(%rsp), %rdi
xorl %esi, %esi
callq 0x2170
movl 0x34(%rbx), %edi
callq 0x22e0
movq %rax, %r13
movl 0x68(%rbx), %ecx
movl 0x140(%rbx), %eax
cmpl %eax, %ecx
movl %eax, %ebp
cmovgl %ecx, %ebp
xorps %xmm0, %xmm0
movaps %xmm0, 0xa0(%rsp)
movaps %xmm0, 0x90(%rsp)
movaps %xmm0, 0x80(%rsp)
movaps %xmm0, 0x70(%rsp)
movaps %xmm0, 0x60(%rsp)
movaps %xmm0, 0x50(%rsp)
leal 0x3f(%rcx), %edx
testl %ecx, %ecx
cmovnsl %ecx, %edx
movl %edx, %esi
andl $-0x40, %esi
subl %esi, %ecx
movl $0x1, %esi
shlq %cl, %rsi
movaps %xmm0, 0x40(%rsp)
movaps %xmm0, 0x30(%rsp)
sarl $0x6, %edx
movslq %edx, %rcx
orq %rsi, 0x30(%rsp,%rcx,8)
leal 0x3f(%rax), %edx
testl %eax, %eax
cmovnsl %eax, %edx
movl %edx, %ecx
andl $-0x40, %ecx
subl %ecx, %eax
movl $0x1, %esi
movl %eax, %ecx
shlq %cl, %rsi
sarl $0x6, %edx
movslq %edx, %rax
orq %rsi, 0x30(%rsp,%rax,8)
leaq 0xd8(%rsp), %rdi
xorl %esi, %esi
callq 0x2170
cmpl $0x0, 0x1a8(%rbx)
je 0x5968
incl %ebp
movq %r13, %r15
addq $0xc, %r15
movq $0x5, 0x20(%rsp)
movq $0x0, 0x28(%rsp)
movl $0x10, %ecx
movq %r14, %rdi
movq %r12, %rsi
rep  movsq (%rsi), %es:(%rdi)
movl %ebp, %edi
movq %r14, %rsi
xorl %edx, %edx
xorl %ecx, %ecx
leaq 0x20(%rsp), %r8
callq 0x22a0
cmpl $-0x1, %eax
je 0x5a6f
testl %eax, %eax
jle 0x595b
movl 0x68(%rbx), %edi
leal 0x3f(%rdi), %eax
testl %edi, %edi
cmovnsl %edi, %eax
sarl $0x6, %eax
cltq
movq 0xe8(%rsp,%rax,8), %rax
btq %rdi, %rax
jae 0x5936
movl 0x34(%rbx), %edx
movq %r13, %rsi
xorl %ecx, %ecx
callq 0x2050
movq %rax, %r12
testl %r12d, %r12d
jle 0x5a78
movq (%r13), %r14
movl 0x8(%r13), %eax
bswapl %eax
movl 0x2c(%rbx), %edi
imulq %r14, %rdi
addq (%rbx), %rdi
movslq %eax, %rdx
movq %r15, %rsi
callq 0x2280
movq %rbx, %rdi
movq %r14, %rsi
leaq 0xe8(%rsp), %r14
callq 0x2c39
incq 0x48(%rbx)
andl $0x7fffffff, %r12d      # imm = 0x7FFFFFFF
addq %r12, 0x39d1(%rip)      # 0x9300
leaq 0x30(%rsp), %r12
jmp 0x595b
movl 0x140(%rbx), %edi
leal 0x3f(%rdi), %eax
testl %edi, %edi
cmovnsl %edi, %eax
sarl $0x6, %eax
cltq
movq 0xe8(%rsp,%rax,8), %rax
btq %rdi, %rax
jb 0x5a4e
cmpl $0x0, 0x1a8(%rbx)
jne 0x5870
movq %r13, %rdi
callq 0x2040
xorl %r12d, %r12d
leaq 0xc8(%rsp), %rdi
xorl %esi, %esi
callq 0x2170
movl $0x1, %ebp
movq %rbx, %rdi
movl $0x1, %esi
callq 0x2c83
movq %rax, %r15
testq %rax, %rax
je 0x59a5
movl 0xd8(%rbx), %r12d
xorl %ebp, %ebp
movl %r12d, %r14d
bswapl %r12d
movq 0x18(%rsp), %rax
movl %r12d, 0x1a(%rax)
movl 0x6c(%rbx), %edi
movq 0xd0(%rbx), %rsi
addq $0x1e, %r14
movq %r14, %rdx
callq 0x34bd
cltq
cmpq %r14, %rax
je 0x59fd
movq 0xe8(%rbx), %r14
callq 0x2060
movl (%rax), %edi
callq 0x2450
movq %r14, %rdi
leaq 0x12ce(%rip), %rsi      # 0x6cbc
movq %rax, %rdx
xorl %eax, %eax
callq 0x374a
movl $0x1, %ebp
testq %r15, %r15
leaq 0x30(%rsp), %r12
jne 0x5a39
cmpl $0x0, 0x1a4(%rbx)
je 0x5a39
movl 0x2c(%rbx), %eax
movq 0x38(%rbx), %rcx
decq %rcx
imulq %rax, %rcx
movl 0x30(%rbx), %edx
addq %rcx, %rdx
movq 0x1b0(%rbx), %rax
movq (%rbx), %rsi
movq %rbx, %rdi
callq *0x10(%rax)
testq %rax, %rax
js 0x5aa6
testl %ebp, %ebp
leaq 0xe8(%rsp), %r14
je 0x579a
jmp 0x5ad5
movl $0x1, %edx
leaq 0xf(%rsp), %rsi
callq 0x2200
testq %rax, %rax
jns 0x5968
leaq 0x12e5(%rip), %rdi      # 0x6d52
jmp 0x5a7f
leaq 0x12c3(%rip), %rdi      # 0x6d39
jmp 0x5a7f
leaq 0x12c3(%rip), %rdi      # 0x6d42
callq 0x2390
jmp 0x5968
cmpl $0x1, 0x5c(%rbx)
jle 0x5afc
movq 0xe8(%rbx), %rdi
leaq 0x11f2(%rip), %rsi      # 0x6c8f
xorl %eax, %eax
callq 0x374a
jmp 0x5aef
movq 0xe8(%rbx), %r14
callq 0x2060
movl (%rax), %edi
callq 0x2450
movq %r14, %rdi
leaq 0x121c(%rip), %rsi      # 0x6cdf
movq %rax, %rdx
xorl %eax, %eax
callq 0x374a
leaq 0xe8(%rsp), %r14
cmpl $0x0, 0x1a0(%rbx)
je 0x5aef
movq 0x20(%rbx), %rsi
testq %rsi, %rsi
je 0x5aef
movq (%rbx), %rdi
callq 0x2310
cmpl $0x0, 0x1a8(%rbx)
jne 0x56ec
movl $0x0, 0x1a8(%rbx)
xorl %edi, %edi
callq 0x22d0