// File: /workspace/github_c_makefile_star2_O1/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 0x5703
movl 0xa0(%rbx), %esi
leal 0x1(%rsi), %ecx
movl %ecx, 0x98(%rbx)
leaq 0xa4(%rbx), %rdi
leaq 0x78(%rbx), %r14
movq %r14, %rdx
callq 0x310f
movl %eax, 0x68(%rbx)
cmpl $0x2, 0x5c(%rbx)
jl 0x56de
movq 0xe8(%rbx), %rdi
movl 0x98(%rbx), %r8d
movl 0xa0(%rbx), %edx
leaq 0x155c(%rip), %rsi      # 0x6c30
movq %r14, %rcx
xorl %eax, %eax
callq 0x3741
cmpl $-0x1, 0x68(%rbx)
jne 0x5703
movl $0x0, 0x1a8(%rbx)
movq 0xe8(%rbx), %rdi
leaq 0x1559(%rip), %rsi      # 0x6c55
xorl %eax, %eax
callq 0x3741
cmpl $0x0, 0x1a8(%rbx)
je 0x5b5b
leaq 0x120(%rbx), %rax
movq %rax, 0x10(%rsp)
leaq 0xe8(%rsp), %r12
leaq 0x30(%rsp), %r14
movq 0x10(%rsp), %rdi
callq 0x2080
cmpl $0x0, 0x1a8(%rbx)
je 0x5759
movq 0x8(%rbx), %rax
movl 0x2c(%rbx), %ecx
xorl %edx, %edx
divq %rcx
testq %rdx, %rdx
je 0x577d
incq %rax
movq %rax, 0x38(%rbx)
movl %edx, 0x30(%rbx)
jmp 0x5784
cmpl $0x2, 0x5c(%rbx)
jl 0x5b4e
movq 0xe8(%rbx), %rdi
leaq 0x14fe(%rip), %rsi      # 0x6c6f
xorl %eax, %eax
callq 0x3741
jmp 0x5b4e
movq %rax, 0x38(%rbx)
movl %ecx, 0x30(%rbx)
movq $0x0, 0x48(%rbx)
movq 0x38(%rbx), %rax
movq %rax, 0x40(%rbx)
movq %rax, %rcx
shrq $0x3, %rcx
addq $0x2, %rcx
movq %rcx, 0xd8(%rbx)
movl $0x1, 0xe0(%rbx)
testq %rax, %rax
je 0x57cb
movq 0xc8(%rbx), %rax
xorl %ecx, %ecx
movq %rcx, (%rax,%rcx,8)
incq %rcx
cmpq 0x38(%rbx), %rcx
jb 0x57be
movq %rbx, %rdi
callq 0x2be2
movq %rbx, %rdi
movl $0x3, %esi
callq 0x5e9b
movq 0xd0(%rbx), %rax
xorps %xmm0, %xmm0
movups %xmm0, (%rax)
movups %xmm0, 0xe(%rax)
movq %rax, 0x18(%rsp)
movl $0x5, (%rax)
xorl %ebp, %ebp
testl %ebp, %ebp
jne 0x5b34
cmpl $0x0, 0x1a8(%rbx)
je 0x5b34
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
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)
cmpl %eax, %ecx
movl %eax, %ebp
cmovgl %ecx, %ebp
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 0x59d4
incl %ebp
movq %r13, %r15
addq $0xc, %r15
movq $0x5, 0x20(%rsp)
movq $0x0, 0x28(%rsp)
movl $0x10, %ecx
movq %r12, %rdi
movq %r14, %rsi
rep  movsq (%rsi), %es:(%rdi)
movl %ebp, %edi
movq %r12, %rsi
xorl %edx, %edx
xorl %ecx, %ecx
leaq 0x20(%rsp), %r8
callq 0x22a0
cmpl $-0x1, %eax
je 0x5b1a
testl %eax, %eax
jle 0x59c7
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 0x59a2
movl 0x34(%rbx), %edx
movq %r13, %rsi
xorl %ecx, %ecx
callq 0x2050
movq %rax, %r12
testl %r12d, %r12d
jle 0x5b23
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 0x30(%rsp), %r14
callq 0x2c4d
incq 0x48(%rbx)
andl $0x7fffffff, %r12d      # imm = 0x7FFFFFFF
addq %r12, 0x3968(%rip)      # 0x9300
leaq 0xe8(%rsp), %r12
jmp 0x59c7
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 0x5af9
cmpl $0x0, 0x1a8(%rbx)
jne 0x58dc
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 0x2c97
movq %rax, %r15
testq %rax, %rax
je 0x5a11
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 0x34ad
cltq
cmpq %r14, %rax
je 0x5a69
movq 0xe8(%rbx), %r14
callq 0x2060
movl (%rax), %edi
callq 0x2450
movq %r14, %rdi
leaq 0x1242(%rip), %rsi      # 0x6c9c
movq %rax, %rdx
xorl %eax, %eax
callq 0x3741
movl $0x1, %ebp
testq %r15, %r15
leaq 0xe8(%rsp), %r12
leaq 0x30(%rsp), %r14
je 0x5a8a
xorl %eax, %eax
testl %eax, %eax
je 0x57fe
jmp 0x5b34
cmpl $0x0, 0x1a4(%rbx)
je 0x5a7b
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)
movq %rax, %r15
xorl %eax, %eax
testq %r15, %r15
jns 0x5af2
movq 0xe8(%rbx), %r14
callq 0x2060
movl (%rax), %edi
callq 0x2450
movq %r14, %rdi
leaq 0x30(%rsp), %r14
leaq 0x11dc(%rip), %rsi      # 0x6cbf
movq %rax, %rdx
xorl %eax, %eax
callq 0x3741
movl $0x5, %eax
testq %r15, %r15
jns 0x5a7b
jmp 0x5a7d
movl $0x1, %edx
leaq 0xf(%rsp), %rsi
callq 0x2200
testq %rax, %rax
jns 0x59d4
leaq 0x121a(%rip), %rdi      # 0x6d32
jmp 0x5b2a
leaq 0x11f8(%rip), %rdi      # 0x6d19
jmp 0x5b2a
leaq 0x11f8(%rip), %rdi      # 0x6d22
callq 0x2390
jmp 0x59d4
cmpl $0x0, 0x1a0(%rbx)
je 0x5b4e
movq 0x20(%rbx), %rsi
testq %rsi, %rsi
je 0x5b4e
movq (%rbx), %rdi
callq 0x2310
cmpl $0x0, 0x1a8(%rbx)
jne 0x5729
movl $0x0, 0x1a8(%rbx)
xorl %edi, %edi
callq 0x22d0