// File: /workspace/github_c_makefile_star2_O0/uhlin[P]enhanced-duc/source/network.c
// Function: net_recv_plain
int
net_recv_plain(char *recvbuf, size_t recvbuf_size)
{
#if IO_MULTIPLEXING
	const int	 maxfdp1 = g_socket + 1;
	fd_set		 readset;
	struct timeval	 tv;

	tv.tv_sec	= 10;
	tv.tv_usec	= 333;

	FD_ZERO(&readset);
	FD_SET(g_socket, &readset);

	if (select(maxfdp1, &readset, NULL, NULL, &tv) == -1) {
		log_warn(errno, "net_recv_plain: select");
		return -1;
	} else if (!FD_ISSET(g_socket, &readset)) {
		log_warn(0, "net_recv_plain: no data to receive  --  "
		    "timed out!");
		return -1;
	}
#endif /* IO_MULTIPLEXING */

	log_assert_arg_nonnull("net_recv_plain", "recvbuf", recvbuf);

	switch (recv(g_socket, recvbuf, recvbuf_size, 0)) {
	case -1:
		log_warn(errno, "net_recv_plain: recv");
		return -1;
	case 0:
		log_warn(0, "net_recv_plain: fatal: connection lost");
		return -1;
	default:
		break;
	}
	return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0xd0, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movl 0x82ef(%rip), %eax      # 0x104a8
addl $0x1, %eax
movl %eax, -0x1c(%rbp)
movq $0xa, -0xb0(%rbp)
movq $0x14d, -0xa8(%rbp) # imm = 0x14D
leaq -0xa0(%rbp), %rax
movq %rax, -0xc0(%rbp)
movl $0x0, -0xb4(%rbp)
movl -0xb4(%rbp), %eax
cmpq $0x10, %rax
jae 0x821f
movq -0xc0(%rbp), %rax
movl -0xb4(%rbp), %ecx
movq $0x0, (%rax,%rcx,8)
movl -0xb4(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xb4(%rbp)
jmp 0x81ed
jmp 0x8221
movl 0x8281(%rip), %eax      # 0x104a8
movl $0x40, %ecx
cltd
idivl %ecx
movl %edx, %eax
movl %eax, %ecx
movl $0x1, %eax
shlq %cl, %rax
movq %rax, %rcx
movl 0x8264(%rip), %eax      # 0x104a8
movl $0x40, %esi
cltd
idivl %esi
cltq
orq -0xa0(%rbp,%rax,8), %rcx
movq %rcx, -0xa0(%rbp,%rax,8)
movl -0x1c(%rbp), %edi
leaq -0xa0(%rbp), %rsi
xorl %eax, %eax
movl %eax, %ecx
leaq -0xb0(%rbp), %r8
movq %rcx, %rdx
callq 0x43c0
cmpl $-0x1, %eax
jne 0x82a1
callq 0x4050
movl (%rax), %edi
leaq 0x4374(%rip), %rsi      # 0xc602
movb $0x0, %al
callq 0x6300
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x8395
movl 0x8201(%rip), %eax      # 0x104a8
movl $0x40, %ecx
cltd
idivl %ecx
cltq
movq -0xa0(%rbp,%rax,8), %rax
movq %rax, -0xc8(%rbp)
movl 0x81e2(%rip), %eax      # 0x104a8
movl $0x40, %ecx
cltd
idivl %ecx
movq -0xc8(%rbp), %rax
movl %edx, %ecx
movl $0x1, %edx
shlq %cl, %rdx
movq %rdx, %rcx
andq %rcx, %rax
cmpq $0x0, %rax
jne 0x8307
xorl %edi, %edi
leaq 0x4325(%rip), %rsi      # 0xc619
movb $0x0, %al
callq 0x6300
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x8395
jmp 0x8309
movq -0x10(%rbp), %rdx
leaq 0x4338(%rip), %rdi      # 0xc64c
leaq 0x3e64(%rip), %rsi      # 0xc17f
callq 0x8670
movl 0x8182(%rip), %edi      # 0x104a8
movq -0x10(%rbp), %rsi
movq -0x18(%rbp), %rdx
xorl %ecx, %ecx
callq 0x4140
movq %rax, %rcx
movq %rcx, -0xd0(%rbp)
subq $-0x1, %rax
je 0x8355
jmp 0x8347
movq -0xd0(%rbp), %rax
testq %rax, %rax
je 0x8373
jmp 0x838c
callq 0x4050
movl (%rax), %edi
leaq 0x42f8(%rip), %rsi      # 0xc65b
movb $0x0, %al
callq 0x6300
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x8395
xorl %edi, %edi
leaq 0x42f4(%rip), %rsi      # 0xc670
movb $0x0, %al
callq 0x6300
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x8395
jmp 0x838e
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0xd0, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)