LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O0/maandree[P]libkeccak/digest.c
// Function: libkeccak_update
int
libkeccak_update(struct libkeccak_state *restrict state, const void *restrict msg, size_t msglen)
{
	size_t len;
	auto unsigned char *restrict new;

	if (__builtin_expect(state->mptr + msglen > state->mlen, 0)) {
		state->mlen += msglen;
		new = malloc(state->mlen * sizeof(char));
		if (!new) {
			state->mlen -= msglen;
			return -1;
		}
		libkeccak_state_wipe_message(state);
		free(state->M);
		state->M = new;
	}

	__builtin_memcpy(state->M + state->mptr, msg, msglen * sizeof(char));
	state->mptr += msglen;
	len = state->mptr;
	len -= state->mptr % (size_t)(state->r >> 3);
	state->mptr -= len;

	libkeccak_absorption_phase(state, state->M, len);
	__builtin_memmove(state->M, state->M + len, state->mptr * sizeof(char));

	return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq -0x10(%rbp), %rax
movq 0x108(%rax), %rax
addq -0x20(%rbp), %rax
movq -0x10(%rbp), %rcx
cmpq 0x110(%rcx), %rax
seta %al
andb $0x1, %al
movzbl %al, %eax
cltq
cmpq $0x0, %rax
je 0x2ac4
movq -0x20(%rbp), %rcx
movq -0x10(%rbp), %rax
addq 0x110(%rax), %rcx
movq %rcx, 0x110(%rax)
movq -0x10(%rbp), %rax
movq 0x110(%rax), %rdi
shlq $0x0, %rdi
callq 0x10b0
movq %rax, -0x30(%rbp)
cmpq $0x0, -0x30(%rbp)
jne 0x2a9c
movq -0x20(%rbp), %rdx
movq -0x10(%rbp), %rax
movq 0x110(%rax), %rcx
subq %rdx, %rcx
movq %rcx, 0x110(%rax)
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x2ba0
movq -0x10(%rbp), %rdi
callq 0x6820
movq -0x10(%rbp), %rax
movq 0x118(%rax), %rdi
callq 0x1030
movq -0x30(%rbp), %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x118(%rax)
movq -0x10(%rbp), %rax
movq 0x118(%rax), %rdi
movq -0x10(%rbp), %rax
addq 0x108(%rax), %rdi
movq -0x18(%rbp), %rsi
movq -0x20(%rbp), %rdx
shlq $0x0, %rdx
callq 0x10a0
movq -0x20(%rbp), %rcx
movq -0x10(%rbp), %rax
addq 0x108(%rax), %rcx
movq %rcx, 0x108(%rax)
movq -0x10(%rbp), %rax
movq 0x108(%rax), %rax
movq %rax, -0x28(%rbp)
movq -0x10(%rbp), %rax
movq 0x108(%rax), %rax
movq -0x10(%rbp), %rcx
movq 0xc8(%rcx), %rcx
sarq $0x3, %rcx
xorl %edx, %edx
divq %rcx
movq -0x28(%rbp), %rax
subq %rdx, %rax
movq %rax, -0x28(%rbp)
movq -0x28(%rbp), %rdx
movq -0x10(%rbp), %rax
movq 0x108(%rax), %rcx
subq %rdx, %rcx
movq %rcx, 0x108(%rax)
movq -0x10(%rbp), %rdi
movq -0x10(%rbp), %rax
movq 0x118(%rax), %rsi
movq -0x28(%rbp), %rdx
callq 0x15a0
movq -0x10(%rbp), %rax
movq 0x118(%rax), %rdi
movq -0x10(%rbp), %rax
movq 0x118(%rax), %rsi
addq -0x28(%rbp), %rsi
movq -0x10(%rbp), %rax
movq 0x108(%rax), %rdx
shlq $0x0, %rdx
callq 0x10d0
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/maandree[P]libkeccak/digest.c
// Function: libkeccak_pad10star1
LIBKECCAK_GCC_ONLY(__attribute__((__nonnull__, __nothrow__, __gnu_inline__)))
static inline size_t
libkeccak_pad10star1(register size_t r, unsigned char *msg, size_t msglen, register size_t bits)
{
	register size_t nrf = msglen - !!bits;
	register size_t len = (nrf << 3) | bits;
	register size_t ll = len % r;
	register unsigned char b = (unsigned char)(bits ? (msg[nrf] | (1 << bits)) : 1);

	if (r - 8 <= ll && ll <= r - 2) {
		msg[nrf] = (unsigned char)(b ^ 0x80);
		msglen = nrf + 1;
	} else {
		len = ++nrf << 3;
		len = (len - (len % r) + (r - 8)) >> 3;
		msglen = len + 1;

		msg[nrf - 1] = b;
		__builtin_memset(&msg[nrf], 0, (len - nrf) * sizeof(char));
		msg[len] = (unsigned char)0x80;
	}
	return msglen;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movq -0x18(%rbp), %rax
cmpq $0x0, -0x20(%rbp)
setne %cl
xorb $-0x1, %cl
xorb $-0x1, %cl
andb $0x1, %cl
movzbl %cl, %ecx
movslq %ecx, %rcx
subq %rcx, %rax
movq %rax, -0x28(%rbp)
movq -0x28(%rbp), %rax
shlq $0x3, %rax
orq -0x20(%rbp), %rax
movq %rax, -0x30(%rbp)
movq -0x30(%rbp), %rax
xorl %ecx, %ecx
movl %ecx, %edx
divq -0x8(%rbp)
movq %rdx, -0x38(%rbp)
cmpq $0x0, -0x20(%rbp)
je 0x2e71
movq -0x10(%rbp), %rax
movq -0x28(%rbp), %rcx
movzbl (%rax,%rcx), %eax
movq -0x20(%rbp), %rcx
movl $0x1, %edx
shll %cl, %edx
movl %edx, %ecx
orl %ecx, %eax
movl %eax, -0x40(%rbp)
jmp 0x2e7b
movl $0x1, %eax
movl %eax, -0x40(%rbp)
jmp 0x2e7b
movl -0x40(%rbp), %eax
movb %al, -0x39(%rbp)
movq -0x8(%rbp), %rax
subq $0x8, %rax
cmpq -0x38(%rbp), %rax
ja 0x2ec7
movq -0x38(%rbp), %rax
movq -0x8(%rbp), %rcx
subq $0x2, %rcx
cmpq %rcx, %rax
ja 0x2ec7
movzbl -0x39(%rbp), %eax
xorl $0x80, %eax
movb %al, %dl
movq -0x10(%rbp), %rax
movq -0x28(%rbp), %rcx
movb %dl, (%rax,%rcx)
movq -0x28(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x18(%rbp)
jmp 0x2f4e
movq -0x28(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x28(%rbp)
shlq $0x3, %rax
movq %rax, -0x30(%rbp)
movq -0x30(%rbp), %rax
movq %rax, -0x48(%rbp)
movq -0x30(%rbp), %rax
xorl %ecx, %ecx
movl %ecx, %edx
divq -0x8(%rbp)
movq -0x48(%rbp), %rax
subq %rdx, %rax
movq -0x8(%rbp), %rcx
subq $0x8, %rcx
addq %rcx, %rax
shrq $0x3, %rax
movq %rax, -0x30(%rbp)
movq -0x30(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x18(%rbp)
movb -0x39(%rbp), %dl
movq -0x10(%rbp), %rax
movq -0x28(%rbp), %rcx
subq $0x1, %rcx
movb %dl, (%rax,%rcx)
movq -0x10(%rbp), %rdi
addq -0x28(%rbp), %rdi
movq -0x30(%rbp), %rdx
subq -0x28(%rbp), %rdx
shlq $0x0, %rdx
xorl %esi, %esi
callq 0x1070
movq -0x10(%rbp), %rax
movq -0x30(%rbp), %rcx
movb $-0x80, (%rax,%rcx)
movq -0x18(%rbp), %rax
addq $0x50, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/maandree[P]libkeccak/digest.c
// Function: libkeccak_f
LIBKECCAK_GCC_ONLY(__attribute__((__nonnull__, __nothrow__, __gnu_inline__)))
static inline void
libkeccak_f(register struct libkeccak_state *state)
{
	register long int i = 0;
	register long int nr = state->nr;

	if (nr == 24) {
		for (; i < nr; i++)
			libkeccak_f_round64(state, rc64[i]);
	} else if (nr == 22) {
		for (; i < nr; i++)
			libkeccak_f_round32(state, rc32[i]);
	} else if (nr == 20) {
		for (; i < nr; i++)
			libkeccak_f_round16(state, rc16[i]);
	} else if (nr == 18) {
		libkeccak_f8(state);
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq $0x0, -0x10(%rbp)
movq -0x8(%rbp), %rax
movq 0x100(%rax), %rax
movq %rax, -0x18(%rbp)
cmpq $0x18, -0x18(%rbp)
jne 0x3531
jmp 0x34fc
movq -0x10(%rbp), %rax
cmpq -0x18(%rbp), %rax
jge 0x352c
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rcx
leaq 0x3c2b(%rip), %rax      # 0x7140
movq (%rax,%rcx,8), %rsi
callq 0x4310
movq -0x10(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x10(%rbp)
jmp 0x34fc
jmp 0x35bc
cmpq $0x16, -0x18(%rbp)
jne 0x356b
jmp 0x353a
movq -0x10(%rbp), %rax
cmpq -0x18(%rbp), %rax
jge 0x3569
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rcx
leaq 0x3cad(%rip), %rax      # 0x7200
movl (%rax,%rcx,4), %esi
callq 0x4ce0
movq -0x10(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x10(%rbp)
jmp 0x353a
jmp 0x35ba
cmpq $0x14, -0x18(%rbp)
jne 0x35a6
jmp 0x3574
movq -0x10(%rbp), %rax
cmpq -0x18(%rbp), %rax
jge 0x35a4
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rcx
leaq 0x3cd3(%rip), %rax      # 0x7260
movzwl (%rax,%rcx,2), %esi
callq 0x5410
movq -0x10(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x10(%rbp)
jmp 0x3574
jmp 0x35b8
cmpq $0x12, -0x18(%rbp)
jne 0x35b6
movq -0x8(%rbp), %rdi
callq 0x5d20
jmp 0x35b8
jmp 0x35ba
jmp 0x35bc
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/maandree[P]libkeccak/./800.c
// Function: libkeccak_to_lane32
LIBKECCAK_GCC_ONLY(__attribute__((__nonnull__, __nothrow__, __pure__, __hot__, __warn_unused_result__, __gnu_inline__)))
static inline uint32_t
libkeccak_to_lane32(register const unsigned char *message, register size_t msglen, register long int rr, size_t off)
{
	register long int n = (long)((msglen < (size_t)rr ? msglen : (size_t)rr) - off);
	uint32_t rc = 0;
	message += off;
#define X(N) if (__builtin_expect(N < n, 1)) rc |= (uint32_t)message[N] << (N * 8);\
             else return rc
	LIST_4(X, ;);
#undef X
	return rc;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq %rcx, -0x28(%rbp)
movq -0x18(%rbp), %rax
cmpq -0x20(%rbp), %rax
jae 0x40b8
movq -0x18(%rbp), %rax
movq %rax, -0x40(%rbp)
jmp 0x40c0
movq -0x20(%rbp), %rax
movq %rax, -0x40(%rbp)
movq -0x40(%rbp), %rax
subq -0x28(%rbp), %rax
movq %rax, -0x30(%rbp)
movl $0x0, -0x34(%rbp)
movq -0x28(%rbp), %rax
addq -0x10(%rbp), %rax
movq %rax, -0x10(%rbp)
xorl %eax, %eax
cmpq -0x30(%rbp), %rax
setl %al
andb $0x1, %al
movzbl %al, %eax
cltq
cmpq $0x0, %rax
je 0x4107
movq -0x10(%rbp), %rax
movzbl (%rax), %eax
shll $0x0, %eax
orl -0x34(%rbp), %eax
movl %eax, -0x34(%rbp)
jmp 0x4112
movl -0x34(%rbp), %eax
movl %eax, -0x4(%rbp)
jmp 0x41b4
movl $0x1, %eax
cmpq -0x30(%rbp), %rax
setl %al
andb $0x1, %al
movzbl %al, %eax
cltq
cmpq $0x0, %rax
je 0x413e
movq -0x10(%rbp), %rax
movzbl 0x1(%rax), %eax
shll $0x8, %eax
orl -0x34(%rbp), %eax
movl %eax, -0x34(%rbp)
jmp 0x4146
movl -0x34(%rbp), %eax
movl %eax, -0x4(%rbp)
jmp 0x41b4
movl $0x2, %eax
cmpq -0x30(%rbp), %rax
setl %al
andb $0x1, %al
movzbl %al, %eax
cltq
cmpq $0x0, %rax
je 0x4172
movq -0x10(%rbp), %rax
movzbl 0x2(%rax), %eax
shll $0x10, %eax
orl -0x34(%rbp), %eax
movl %eax, -0x34(%rbp)
jmp 0x417a
movl -0x34(%rbp), %eax
movl %eax, -0x4(%rbp)
jmp 0x41b4
movl $0x3, %eax
cmpq -0x30(%rbp), %rax
setl %al
andb $0x1, %al
movzbl %al, %eax
cltq
cmpq $0x0, %rax
je 0x41a6
movq -0x10(%rbp), %rax
movzbl 0x3(%rax), %eax
shll $0x18, %eax
orl -0x34(%rbp), %eax
movl %eax, -0x34(%rbp)
jmp 0x41ae
movl -0x34(%rbp), %eax
movl %eax, -0x4(%rbp)
jmp 0x41b4
movl -0x34(%rbp), %eax
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/maandree[P]libkeccak/./400.c
// Function: libkeccak_to_lane16
LIBKECCAK_GCC_ONLY(__attribute__((__nonnull__, __nothrow__, __pure__, __hot__, __warn_unused_result__, __gnu_inline__)))
static inline uint16_t
libkeccak_to_lane16(register const unsigned char *message, register size_t msglen, register long int rr, size_t off)
{
	register long int n = (long)((msglen < (size_t)rr ? msglen : (size_t)rr) - off);
	uint16_t rc = 0;
	message += off;
#define X(N) if (__builtin_expect(N < n, 1)) rc |= (uint16_t)message[N] << (N * 8);\
             else return rc
	LIST_2(X, ;);
#undef X
	return rc;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq %rcx, -0x28(%rbp)
movq -0x18(%rbp), %rax
cmpq -0x20(%rbp), %rax
jae 0x41e8
movq -0x18(%rbp), %rax
movq %rax, -0x40(%rbp)
jmp 0x41f0
movq -0x20(%rbp), %rax
movq %rax, -0x40(%rbp)
movq -0x40(%rbp), %rax
subq -0x28(%rbp), %rax
movq %rax, -0x30(%rbp)
movw $0x0, -0x32(%rbp)
movq -0x28(%rbp), %rax
addq -0x10(%rbp), %rax
movq %rax, -0x10(%rbp)
xorl %eax, %eax
cmpq -0x30(%rbp), %rax
setl %al
andb $0x1, %al
movzbl %al, %eax
cltq
cmpq $0x0, %rax
je 0x423d
movq -0x10(%rbp), %rax
movzbl (%rax), %eax
movzwl %ax, %ecx
shll $0x0, %ecx
movzwl -0x32(%rbp), %eax
orl %ecx, %eax
movw %ax, -0x32(%rbp)
jmp 0x4247
movw -0x32(%rbp), %ax
movw %ax, -0x2(%rbp)
jmp 0x428c
movl $0x1, %eax
cmpq -0x30(%rbp), %rax
setl %al
andb $0x1, %al
movzbl %al, %eax
cltq
cmpq $0x0, %rax
je 0x427a
movq -0x10(%rbp), %rax
movzbl 0x1(%rax), %eax
movzwl %ax, %ecx
shll $0x8, %ecx
movzwl -0x32(%rbp), %eax
orl %ecx, %eax
movw %ax, -0x32(%rbp)
jmp 0x4284
movw -0x32(%rbp), %ax
movw %ax, -0x2(%rbp)
jmp 0x428c
movw -0x32(%rbp), %ax
movw %ax, -0x2(%rbp)
movw -0x2(%rbp), %ax
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/maandree[P]libkeccak/./200.c
// Function: libkeccak_to_lane8
LIBKECCAK_GCC_ONLY(__attribute__((__nonnull__, __nothrow__, __pure__, __hot__, __warn_unused_result__, __gnu_inline__)))
static inline uint8_t
libkeccak_to_lane8(register const unsigned char *message, register size_t msglen, register long int rr, size_t off)
{
	register long int n = (long)((msglen < (size_t)rr ? msglen : (size_t)rr) - off);
	if (__builtin_expect(0 < n, 1))
		return (uint8_t)message[off];
	return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq %rcx, -0x28(%rbp)
movq -0x18(%rbp), %rax
cmpq -0x20(%rbp), %rax
jae 0x42c8
movq -0x18(%rbp), %rax
movq %rax, -0x38(%rbp)
jmp 0x42d0
movq -0x20(%rbp), %rax
movq %rax, -0x38(%rbp)
movq -0x38(%rbp), %rax
subq -0x28(%rbp), %rax
movq %rax, -0x30(%rbp)
xorl %eax, %eax
cmpq -0x30(%rbp), %rax
setl %al
andb $0x1, %al
movzbl %al, %eax
cltq
cmpq $0x0, %rax
je 0x4302
movq -0x10(%rbp), %rax
movq -0x28(%rbp), %rcx
movb (%rax,%rcx), %al
movb %al, -0x1(%rbp)
jmp 0x4306
movb $0x0, -0x1(%rbp)
movb -0x1(%rbp), %al
popq %rbp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/maandree[P]libkeccak/extra/libkeccak_state_wipe_message.c
// Function: libkeccak_state_wipe_message
void
libkeccak_state_wipe_message(volatile struct libkeccak_state *state)
{
	volatile unsigned char *restrict M = state->M;
	size_t i;

	for (i = 0; i < state->mptr; i++)
		M[i] = 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq 0x118(%rax), %rax
movq %rax, -0x10(%rbp)
movq $0x0, -0x18(%rbp)
movq -0x18(%rbp), %rax
movq -0x8(%rbp), %rcx
movq 0x108(%rcx), %rcx
cmpq %rcx, %rax
jae 0x686d
movq -0x10(%rbp), %rax
movq -0x18(%rbp), %rcx
movb $0x0, (%rax,%rcx)
movq -0x18(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x18(%rbp)
jmp 0x683f
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/maandree[P]libkeccak/util/libkeccak_behex_lower.c
// Function: libkeccak_behex_lower
void
libkeccak_behex_lower(char *restrict output, const void *restrict hashsum_, size_t n)
{
	const unsigned char *restrict hashsum = hashsum_;

	output[2 * n] = '\0';
	while (n--) {
		output[2 * n + 0] = "0123456789abcdef"[(hashsum[n] >> 4) & 15];
		output[2 * n + 1] = "0123456789abcdef"[(hashsum[n] >> 0) & 15];
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x20(%rbp)
movq -0x8(%rbp), %rax
movq -0x18(%rbp), %rcx
shlq %rcx
movb $0x0, (%rax,%rcx)
movq -0x18(%rbp), %rax
movq %rax, %rcx
addq $-0x1, %rcx
movq %rcx, -0x18(%rbp)
cmpq $0x0, %rax
je 0x6909
movq -0x20(%rbp), %rax
movq -0x18(%rbp), %rcx
movzbl (%rax,%rcx), %eax
sarl $0x4, %eax
andl $0xf, %eax
movslq %eax, %rcx
leaq 0x9da(%rip), %rax       # 0x72a2
movb (%rax,%rcx), %dl
movq -0x8(%rbp), %rax
movq -0x18(%rbp), %rcx
shlq %rcx
movb %dl, (%rax,%rcx)
movq -0x20(%rbp), %rax
movq -0x18(%rbp), %rcx
movzbl (%rax,%rcx), %eax
sarl $0x0, %eax
andl $0xf, %eax
movslq %eax, %rcx
leaq 0x9ad(%rip), %rax       # 0x72a2
movb (%rax,%rcx), %dl
movq -0x8(%rbp), %rax
movq -0x18(%rbp), %rcx
shlq %rcx
movb %dl, 0x1(%rax,%rcx)
jmp 0x6897
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O0/mkubecek[P]nperf/client/main.c
// Function: one_iteration
int one_iteration(struct client_config *config, double *iter_result)
{
	int ret;

	ret = ctrl_initialize(config);
	if (ret < 0)
		goto err;
	ret = prepare_buffers(config);
	if (ret < 0)
		goto err_close;
	ret = start_workers(config);
	if (ret < 0)
		goto err_close;
	ret = connect_workers(config);
	if (ret < 0)
		goto err_workers;
	ret = run_test(config);
	if (ret < 0)
		goto err_workers;

	ret = collect_stats(config, iter_result);
	ctrl_close(config);
	return ret;

err_workers:
	kill_workers(config);
err_close:
	ctrl_close(config);
err:
	return 2;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq -0x10(%rbp), %rdi
callq 0x2590
movl %eax, -0x1c(%rbp)
cmpl $0x0, -0x1c(%rbp)
jge 0x24f7
jmp 0x257a
movq -0x10(%rbp), %rdi
callq 0x2620
movl %eax, -0x1c(%rbp)
cmpl $0x0, -0x1c(%rbp)
jge 0x250b
jmp 0x2571
movq -0x10(%rbp), %rdi
callq 0x26e0
movl %eax, -0x1c(%rbp)
cmpl $0x0, -0x1c(%rbp)
jge 0x251f
jmp 0x2571
movq -0x10(%rbp), %rdi
callq 0x27a0
movl %eax, -0x1c(%rbp)
cmpl $0x0, -0x1c(%rbp)
jge 0x2533
jmp 0x2568
movq -0x10(%rbp), %rdi
callq 0x27f0
movl %eax, -0x1c(%rbp)
cmpl $0x0, -0x1c(%rbp)
jge 0x2547
jmp 0x2568
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
callq 0x28e0
movl %eax, -0x1c(%rbp)
movq -0x10(%rbp), %rdi
callq 0x2c80
movl -0x1c(%rbp), %eax
movl %eax, -0x4(%rbp)
jmp 0x2581
movq -0x10(%rbp), %rdi
callq 0x2ca0
movq -0x10(%rbp), %rdi
callq 0x2c80
movl $0x2, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x20, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/mkubecek[P]nperf/client/main.c
// Function: ctrl_initialize
static int ctrl_initialize(struct client_config *config)
{
	int ret;

	if (server_addr.sa.sa_family)
		ret = ctrl_connect_fast(config);
	else
		ret = ctrl_connect_with_lookup(config);
	if (ret < 0)
		return ret;
	ret = ctrl_send_start(config);
	if (ret < 0)
		return ret;
	ret = ctrl_recv_start(config);
	if (ret < 0)
		return ret;

	return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
cmpw $0x0, 0x93dc(%rip)      # 0xb980
je 0x25b4
movq -0x10(%rbp), %rdi
callq 0x35a0
movl %eax, -0x14(%rbp)
jmp 0x25c0
movq -0x10(%rbp), %rdi
callq 0x3650
movl %eax, -0x14(%rbp)
cmpl $0x0, -0x14(%rbp)
jge 0x25ce
movl -0x14(%rbp), %eax
movl %eax, -0x4(%rbp)
jmp 0x2609
movq -0x10(%rbp), %rdi
callq 0x3820
movl %eax, -0x14(%rbp)
cmpl $0x0, -0x14(%rbp)
jge 0x25e8
movl -0x14(%rbp), %eax
movl %eax, -0x4(%rbp)
jmp 0x2609
movq -0x10(%rbp), %rdi
callq 0x38e0
movl %eax, -0x14(%rbp)
cmpl $0x0, -0x14(%rbp)
jge 0x2602
movl -0x14(%rbp), %eax
movl %eax, -0x4(%rbp)
jmp 0x2609
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/mkubecek[P]nperf/client/main.c
// Function: prepare_buffers
static int prepare_buffers(struct client_config *config)
{
	unsigned int i;

	memset(config->workers_data, '\0',
	       config->n_threads * sizeof(struct client_worker_data));

	for (i = 0; i < config->n_threads; i++) {
		struct client_worker_data *wdata = &config->workers_data[i];

		wdata->id = i;
		wdata->buff = config->buffers + i * config->buff_size;
		wdata->msg_size = config->msg_size;
		wdata->reply = (config->test_mode == MODE_TCP_RR);
	}

	return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq 0x70(%rax), %rdi
movq -0x8(%rbp), %rax
movl 0x1c(%rax), %eax
movl %eax, %edx
shlq $0x7, %rdx
xorl %esi, %esi
callq 0x2180
movl $0x0, -0xc(%rbp)
movl -0xc(%rbp), %eax
movq -0x8(%rbp), %rcx
cmpl 0x1c(%rcx), %eax
jae 0x26ca
movq -0x8(%rbp), %rax
movq 0x70(%rax), %rax
movl -0xc(%rbp), %ecx
shlq $0x7, %rcx
addq %rcx, %rax
movq %rax, -0x18(%rbp)
movl -0xc(%rbp), %ecx
movq -0x18(%rbp), %rax
movl %ecx, (%rax)
movq -0x8(%rbp), %rax
movq 0x58(%rax), %rcx
movl -0xc(%rbp), %eax
movq -0x8(%rbp), %rdx
imulq 0x60(%rdx), %rax
addq %rax, %rcx
movq -0x18(%rbp), %rax
movq %rcx, 0x10(%rax)
movq -0x8(%rbp), %rax
movl 0x40(%rax), %eax
movl %eax, %ecx
movq -0x18(%rbp), %rax
movq %rcx, 0x20(%rax)
movq -0x8(%rbp), %rax
cmpl $0x1, 0xc(%rax)
sete %cl
movq -0x18(%rbp), %rax
andb $0x1, %cl
movb %cl, 0x18(%rax)
movl -0xc(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xc(%rbp)
jmp 0x264f
xorl %eax, %eax
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/mkubecek[P]nperf/client/main.c
// Function: start_workers
static int start_workers(struct client_config *config)
{
	unsigned int n, i;
	int ret;

	wsync_set_state(&client_worker_sync, WS_INIT);
	n = 0;
	while (n < config->n_threads) {
		ret = start_client_worker(&config->workers_data[n]);
		if (ret < 0)
			goto failed;
		n++;
	}
	wsync_wait_for_counter(&client_worker_sync, config->n_threads);

	return 0;
failed:
	for (i = 0; i < n; i++)
		pthread_cancel(config->workers_data[i].tid);
	return -EFAULT;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
leaq 0x92ad(%rip), %rdi      # 0xb9a0
xorl %esi, %esi
callq 0x3a60
movl $0x0, -0x14(%rbp)
movl -0x14(%rbp), %eax
movq -0x10(%rbp), %rcx
cmpl 0x1c(%rcx), %eax
jae 0x273a
movq -0x10(%rbp), %rax
movq 0x70(%rax), %rdi
movl -0x14(%rbp), %eax
shlq $0x7, %rax
addq %rax, %rdi
callq 0x47b0
movl %eax, -0x1c(%rbp)
cmpl $0x0, -0x1c(%rbp)
jge 0x272f
jmp 0x2756
movl -0x14(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x14(%rbp)
jmp 0x2701
movq -0x10(%rbp), %rax
movl 0x1c(%rax), %esi
leaq 0x9258(%rip), %rdi      # 0xb9a0
callq 0x3aa0
movl $0x0, -0x4(%rbp)
jmp 0x2792
movl $0x0, -0x18(%rbp)
movl -0x18(%rbp), %eax
cmpl -0x14(%rbp), %eax
jae 0x278b
movq -0x10(%rbp), %rax
movq 0x70(%rax), %rax
movl -0x18(%rbp), %ecx
shlq $0x7, %rcx
addq %rcx, %rax
movq 0x28(%rax), %rdi
callq 0x2380
movl -0x18(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x18(%rbp)
jmp 0x275d
movl $0xfffffff2, -0x4(%rbp) # imm = 0xFFFFFFF2
movl -0x4(%rbp), %eax
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/mkubecek[P]nperf/client/main.c
// Function: connect_workers
static int connect_workers(struct client_config *config)
{
	wsync_reset_counter(&client_worker_sync);
	wsync_set_state(&client_worker_sync, WS_CONNECT);
	wsync_wait_for_counter(&client_worker_sync, config->n_threads);

	return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
leaq 0x91ed(%rip), %rdi      # 0xb9a0
callq 0x3af0
leaq 0x91e1(%rip), %rdi      # 0xb9a0
movl $0x1, %esi
callq 0x3a60
movq -0x8(%rbp), %rax
movl 0x1c(%rax), %esi
leaq 0x91c9(%rip), %rdi      # 0xb9a0
callq 0x3aa0
xorl %eax, %eax
addq $0x10, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/mkubecek[P]nperf/client/main.c
// Function: run_test
static int run_test(struct client_config *config)
{
	struct timespec ts0, ts1;
	int ret;

	wsync_reset_counter(&client_worker_sync);
	wsync_set_state(&client_worker_sync, WS_RUN);

	ret = clock_gettime(CLOCK_MONOTONIC, &ts0);
	if (ret < 0)
		return -errno;
	ret = wsync_sleep(&client_worker_sync, config->test_length);
	if (ret < 0)
		return ret;
	kill_workers(&client_config);
	ret = clock_gettime(CLOCK_MONOTONIC, &ts1);
	if (ret < 0)
		return -errno;

	config->elapsed = (ts1.tv_sec - ts0.tv_sec) +
			  1E-9 * (ts1.tv_nsec - ts0.tv_nsec);
	return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x10(%rbp)
leaq 0x919d(%rip), %rdi      # 0xb9a0
callq 0x3af0
leaq 0x9191(%rip), %rdi      # 0xb9a0
movl $0x2, %esi
callq 0x3a60
movl $0x1, %edi
leaq -0x20(%rbp), %rsi
callq 0x20c0
movl %eax, -0x34(%rbp)
cmpl $0x0, -0x34(%rbp)
jge 0x2844
callq 0x2070
movq %rax, %rcx
xorl %eax, %eax
subl (%rcx), %eax
movl %eax, -0x4(%rbp)
jmp 0x28d6
movq -0x10(%rbp), %rax
movl 0x10(%rax), %esi
leaq 0x914e(%rip), %rdi      # 0xb9a0
callq 0x3b20
movl %eax, -0x34(%rbp)
cmpl $0x0, -0x34(%rbp)
jge 0x2868
movl -0x34(%rbp), %eax
movl %eax, -0x4(%rbp)
jmp 0x28d6
leaq 0x8991(%rip), %rdi      # 0xb200
callq 0x2ca0
movl $0x1, %edi
leaq -0x30(%rbp), %rsi
callq 0x20c0
movl %eax, -0x34(%rbp)
cmpl $0x0, -0x34(%rbp)
jge 0x289c
callq 0x2070
movq %rax, %rcx
xorl %eax, %eax
subl (%rcx), %eax
movl %eax, -0x4(%rbp)
jmp 0x28d6
movq -0x30(%rbp), %rax
subq -0x20(%rbp), %rax
cvtsi2sd %rax, %xmm1
movq -0x28(%rbp), %rax
subq -0x18(%rbp), %rax
cvtsi2sd %rax, %xmm0
movsd 0x474a(%rip), %xmm2     # 0x7008
mulsd %xmm2, %xmm0
addsd %xmm1, %xmm0
movq -0x10(%rbp), %rax
movsd %xmm0, 0x78(%rax)
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x40, %rsp
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/mkubecek[P]nperf/client/main.c
// Function: kill_workers
static void kill_workers(struct client_config *config)
{
	unsigned int i;

	for (i = 0; i < config->n_threads; i++)
		config->workers_data[i].test_finished = 1;
	for (i = 0; i < config->n_threads; i++)
		pthread_kill(config->workers_data[i].tid, SIGUSR1);
	for (i = 0; i < config->n_threads; i++)
		pthread_join(config->workers_data[i].tid, NULL);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movl $0x0, -0xc(%rbp)
movl -0xc(%rbp), %eax
movq -0x8(%rbp), %rcx
cmpl 0x1c(%rcx), %eax
jae 0x2ce3
movq -0x8(%rbp), %rax
movq 0x70(%rax), %rax
movl -0xc(%rbp), %ecx
shlq $0x7, %rcx
addq %rcx, %rax
movl $0x1, 0x64(%rax)
movl -0xc(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xc(%rbp)
jmp 0x2cb3
movl $0x0, -0xc(%rbp)
movl -0xc(%rbp), %eax
movq -0x8(%rbp), %rcx
cmpl 0x1c(%rcx), %eax
jae 0x2d21
movq -0x8(%rbp), %rax
movq 0x70(%rax), %rax
movl -0xc(%rbp), %ecx
shlq $0x7, %rcx
addq %rcx, %rax
movq 0x28(%rax), %rdi
movl $0xa, %esi
callq 0x21e0
movl -0xc(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xc(%rbp)
jmp 0x2cea
movl $0x0, -0xc(%rbp)
movl -0xc(%rbp), %eax
movq -0x8(%rbp), %rcx
cmpl 0x1c(%rcx), %eax
jae 0x2d5e
movq -0x8(%rbp), %rax
movq 0x70(%rax), %rax
movl -0xc(%rbp), %ecx
shlq $0x7, %rcx
addq %rcx, %rax
movq 0x28(%rax), %rdi
xorl %eax, %eax
movl %eax, %esi
callq 0x2350
movl -0xc(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xc(%rbp)
jmp 0x2d28
addq $0x10, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/mkubecek[P]nperf/client/../estimate.h
// Function: confid_level_output
static inline unsigned int confid_level_output(enum confid_level level)
{
	switch(level) {
	case CONFID_LEVEL_95:
		return 95;
	case CONFID_LEVEL_99:
		return 99;
	default:
		return 0;
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movl %edi, -0x8(%rbp)
movl -0x8(%rbp), %eax
movl %eax, -0xc(%rbp)
testl %eax, %eax
je 0x330d
jmp 0x3303
movl -0xc(%rbp), %eax
subl $0x1, %eax
je 0x3316
jmp 0x331f
movl $0x5f, -0x4(%rbp)
jmp 0x3326
movl $0x63, -0x4(%rbp)
jmp 0x3326
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
popq %rbp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/mkubecek[P]nperf/client/main.c
// Function: client_init
static int client_init(void)
{
	int ret;

	ret = client_set_usr1_handler();
	if (ret < 0)
		return ret;
	return ignore_signal(SIGPIPE);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
callq 0x3f00
movl %eax, -0x8(%rbp)
cmpl $0x0, -0x8(%rbp)
jge 0x334e
movl -0x8(%rbp), %eax
movl %eax, -0x4(%rbp)
jmp 0x335b
movl $0xd, %edi
callq 0x62d0
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x10, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/mkubecek[P]nperf/client/../wsync.h
// Function: wsync_init
static inline int wsync_init(struct worker_sync *ws)
{
	pthread_condattr_t attr;
	int ret;

	ret = pthread_condattr_init(&attr);
	if (ret)
		return -ret;
	ret = pthread_condattr_setclock(&attr, CLOCK_MONOTONIC);
	if (ret)
		return -ret;
	ret = pthread_cond_init(&ws->cv, &attr);
	if (ret)
		return -ret;
	ret = pthread_condattr_destroy(&attr);

	return -ret;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
leaq -0x14(%rbp), %rdi
callq 0x2270
movl %eax, -0x18(%rbp)
cmpl $0x0, -0x18(%rbp)
je 0x3398
xorl %eax, %eax
subl -0x18(%rbp), %eax
movl %eax, -0x4(%rbp)
jmp 0x33f1
leaq -0x14(%rbp), %rdi
movl $0x1, %esi
callq 0x21c0
movl %eax, -0x18(%rbp)
cmpl $0x0, -0x18(%rbp)
je 0x33b9
xorl %eax, %eax
subl -0x18(%rbp), %eax
movl %eax, -0x4(%rbp)
jmp 0x33f1
movq -0x10(%rbp), %rdi
addq $0x28, %rdi
leaq -0x14(%rbp), %rsi
callq 0x2210
movl %eax, -0x18(%rbp)
cmpl $0x0, -0x18(%rbp)
je 0x33dd
xorl %eax, %eax
subl -0x18(%rbp), %eax
movl %eax, -0x4(%rbp)
jmp 0x33f1
leaq -0x14(%rbp), %rdi
callq 0x2190
movl %eax, -0x18(%rbp)
xorl %eax, %eax
subl -0x18(%rbp), %eax
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x20, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/mkubecek[P]nperf/client/main.c
// Function: alloc_buffers
static int alloc_buffers(struct client_config *config)
{
	long page_size;
	int ret;

	page_size = sysconf(_SC_PAGESIZE);
	if (page_size < 0)
		return -EFAULT;
	config->buff_size = ROUND_UP(config->msg_size, page_size);
	config->buffers_size = config->n_threads * config->buff_size;
	config->buffers_size +=
		ROUND_UP(config->n_threads * sizeof(struct client_worker_data),
			 page_size);


	ret = 0;
	config->buffers = mmap(NULL, config->buffers_size,
			       PROT_READ | PROT_WRITE,
			       MAP_PRIVATE | MAP_ANONYMOUS, -1, 0);
	if (config->buffers == MAP_FAILED) {
		ret = -errno;
		fprintf(stderr, "failed to allocate buffers\n");
		free(config->workers_data);
	}
	config->workers_data = (struct client_worker_data *)
		(config->buffers + config->n_threads * config->buff_size);

	return ret;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
movl $0x1e, %edi
callq 0x22c0
movq %rax, -0x18(%rbp)
cmpq $0x0, -0x18(%rbp)
jge 0x342d
movl $0xfffffff2, -0x4(%rbp) # imm = 0xFFFFFFF2
jmp 0x3540
movq -0x10(%rbp), %rax
movl 0x40(%rax), %eax
addq -0x18(%rbp), %rax
subq $0x1, %rax
cqto
idivq -0x18(%rbp)
movq %rax, %rcx
imulq -0x18(%rbp), %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x60(%rax)
movq -0x10(%rbp), %rax
movl 0x1c(%rax), %eax
movl %eax, %ecx
movq -0x10(%rbp), %rax
imulq 0x60(%rax), %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x68(%rax)
movq -0x10(%rbp), %rax
movl 0x1c(%rax), %eax
shlq $0x7, %rax
addq -0x18(%rbp), %rax
subq $0x1, %rax
xorl %ecx, %ecx
movl %ecx, %edx
divq -0x18(%rbp)
movq %rax, %rcx
imulq -0x18(%rbp), %rcx
movq -0x10(%rbp), %rax
addq 0x68(%rax), %rcx
movq %rcx, 0x68(%rax)
movl $0x0, -0x1c(%rbp)
movq -0x10(%rbp), %rax
movq 0x68(%rax), %rsi
xorl %eax, %eax
movl %eax, %r9d
movl $0x3, %edx
movl $0x22, %ecx
movl $0xffffffff, %r8d       # imm = 0xFFFFFFFF
movq %r9, %rdi
callq 0x20f0
movq %rax, %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x58(%rax)
movq -0x10(%rbp), %rax
movq $-0x1, %rcx
cmpq %rcx, 0x58(%rax)
jne 0x3517
callq 0x2070
movq %rax, %rcx
xorl %eax, %eax
subl (%rcx), %eax
movl %eax, -0x1c(%rbp)
movq 0x7aff(%rip), %rax      # 0xaff8
movq (%rax), %rdi
leaq 0x3d2c(%rip), %rsi      # 0x722f
movb $0x0, %al
callq 0x21f0
movq -0x10(%rbp), %rax
movq 0x70(%rax), %rdi
callq 0x2030
movq -0x10(%rbp), %rax
movq 0x58(%rax), %rcx
movq -0x10(%rbp), %rax
movl 0x1c(%rax), %eax
movq -0x10(%rbp), %rdx
imulq 0x60(%rdx), %rax
addq %rax, %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x70(%rax)
movl -0x1c(%rbp), %eax
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/mkubecek[P]nperf/client/main.c
// Function: ctrl_connect_fast
static int ctrl_connect_fast(struct client_config *config)
{
	socklen_t addr_len;
	int ret, sd;

	sd = socket(server_addr.sa.sa_family, SOCK_STREAM, IPPROTO_TCP);
	if (sd < 0)
		return -errno;
	ret = sockaddr_length(&server_addr);
	if (ret < 0)
		goto err;
	addr_len = ret;
	ret = connect(sd, &server_addr.sa, addr_len);
	if (ret < 0) {
		ret = -errno;
		goto err;
	}

	config->ctrl_sd = sd;
	return 0;
err:
	close(sd);
	return ret;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
movzwl 0x83cd(%rip), %edi      # 0xb980
movl $0x1, %esi
movl $0x6, %edx
callq 0x23b0
movl %eax, -0x1c(%rbp)
cmpl $0x0, -0x1c(%rbp)
jge 0x35dc
callq 0x2070
movq %rax, %rcx
xorl %eax, %eax
subl (%rcx), %eax
movl %eax, -0x4(%rbp)
jmp 0x3646
leaq 0x839d(%rip), %rdi      # 0xb980
callq 0x3990
movl %eax, -0x18(%rbp)
cmpl $0x0, -0x18(%rbp)
jge 0x35f3
jmp 0x3638
movl -0x18(%rbp), %eax
movl %eax, -0x14(%rbp)
movl -0x1c(%rbp), %edi
movl -0x14(%rbp), %edx
leaq 0x837a(%rip), %rsi      # 0xb980
callq 0x2310
movl %eax, -0x18(%rbp)
cmpl $0x0, -0x18(%rbp)
jge 0x3625
callq 0x2070
movq %rax, %rcx
xorl %eax, %eax
subl (%rcx), %eax
movl %eax, -0x18(%rbp)
jmp 0x3638
movl -0x1c(%rbp), %ecx
movq -0x10(%rbp), %rax
movl %ecx, 0x54(%rax)
movl $0x0, -0x4(%rbp)
jmp 0x3646
movl -0x1c(%rbp), %edi
callq 0x21a0
movl -0x18(%rbp), %eax
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x20, %rsp
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/mkubecek[P]nperf/client/main.c
// Function: ctrl_send_start
static int ctrl_send_start(struct client_config *config)
{
	struct client_ctrl_msg msg = {
		.length		= htonl(sizeof(msg)),
		.version	= htonl(CTRL_VERSION),
		.test_id	= htonl(1),
		.mode		= htonl(config->test_mode),
		.n_threads	= htonl(config->n_threads),
		.msg_size	= htonl(config->msg_size),
		.tcp_nodelay	= !!config->tcp_nodelay,
	};
	int ret;

	ret = ctrl_send_msg(config->ctrl_sd, &msg, sizeof(msg));
	if (ret < 0)
		return ret;

	return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movl $0x1c, %edi
callq 0x2170
movl %eax, -0x2c(%rbp)
movl $0x1, %edi
callq 0x2170
movl %eax, -0x28(%rbp)
movl $0x1, %edi
callq 0x2170
movl %eax, -0x24(%rbp)
movq -0x10(%rbp), %rax
movl 0xc(%rax), %edi
callq 0x2170
movl %eax, -0x20(%rbp)
movq -0x10(%rbp), %rax
movl 0x1c(%rax), %edi
callq 0x2170
movl %eax, -0x1c(%rbp)
movq -0x10(%rbp), %rax
movl 0x40(%rax), %edi
callq 0x2170
movl %eax, -0x18(%rbp)
movq -0x10(%rbp), %rax
movb 0x44(%rax), %al
xorb $-0x1, %al
xorb $-0x1, %al
andb $0x1, %al
movzbl %al, %eax
movb %al, -0x14(%rbp)
leaq -0x2c(%rbp), %rdi
addq $0x19, %rdi
xorl %esi, %esi
movl $0x3, %edx
callq 0x2180
movq -0x10(%rbp), %rax
movl 0x54(%rax), %edi
leaq -0x2c(%rbp), %rsi
movl $0x1c, %edx
callq 0x64a0
movl %eax, -0x30(%rbp)
cmpl $0x0, -0x30(%rbp)
jge 0x38cd
movl -0x30(%rbp), %eax
movl %eax, -0x4(%rbp)
jmp 0x38d4
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/mkubecek[P]nperf/client/main.c
// Function: ctrl_recv_start
static int ctrl_recv_start(struct client_config *config)
{
	struct server_start_msg msg;
	int ret;

	ret = ctrl_recv_msg(config->ctrl_sd, &msg, sizeof(msg));
	if (ret < 0)
		return ret;

	config->test_port = ntohs(msg.port);
	memcpy(&test_addr, &server_addr, sizeof(test_addr));
	ret = sockaddr_set_port(&test_addr, config->test_port);
	if (ret < 0)
		return ret;

	return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movq -0x10(%rbp), %rax
movl 0x54(%rax), %edi
leaq -0x20(%rbp), %rsi
movl $0x10, %edx
callq 0x64d0
movl %eax, -0x24(%rbp)
cmpl $0x0, -0x24(%rbp)
jge 0x3912
movl -0x24(%rbp), %eax
movl %eax, -0x4(%rbp)
jmp 0x3982
movzwl -0x14(%rbp), %edi
callq 0x2260
movw %ax, %cx
movq -0x10(%rbp), %rax
movw %cx, 0xa(%rax)
leaq 0x80d3(%rip), %rax      # 0xba00
movq 0x804c(%rip), %rcx      # 0xb980
movq %rcx, (%rax)
movq 0x804a(%rip), %rcx      # 0xb988
movq %rcx, 0x8(%rax)
movq 0x8047(%rip), %rcx      # 0xb990
movq %rcx, 0x10(%rax)
movl 0x8045(%rip), %ecx      # 0xb998
movl %ecx, 0x18(%rax)
movq -0x10(%rbp), %rax
leaq 0x809f(%rip), %rdi      # 0xba00
movzwl 0xa(%rax), %esi
callq 0x39e0
movl %eax, -0x24(%rbp)
cmpl $0x0, -0x24(%rbp)
jge 0x397b
movl -0x24(%rbp), %eax
movl %eax, -0x4(%rbp)
jmp 0x3982
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/mkubecek[P]nperf/client/../common.h
// Function: sockaddr_length
static inline int sockaddr_length(const union sockaddr_any *addr)
{
	switch(addr->sa.sa_family) {
	case AF_INET:
		return sizeof(addr->sa4);
	case AF_INET6:
		return sizeof(addr->sa6);
	default:
		return -EINVAL;
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x10(%rbp)
movq -0x10(%rbp), %rax
movzwl (%rax), %eax
movl %eax, -0x14(%rbp)
subl $0x2, %eax
je 0x39b3
jmp 0x39a9
movl -0x14(%rbp), %eax
subl $0xa, %eax
je 0x39bc
jmp 0x39c5
movl $0x10, -0x4(%rbp)
jmp 0x39cc
movl $0x1c, -0x4(%rbp)
jmp 0x39cc
movl $0xffffffea, -0x4(%rbp) # imm = 0xFFFFFFEA
movl -0x4(%rbp), %eax
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/mkubecek[P]nperf/client/../common.h
// Function: sockaddr_set_port
static inline int sockaddr_set_port(union sockaddr_any *addr, uint16_t port)
{
	switch(addr->sa.sa_family) {
	case AF_INET:
		addr->sa4.sin_port = htons(port);
		return 0;
	case AF_INET6:
		addr->sa6.sin6_port = htons(port);
		return 0;
	default:
		return -EINVAL;
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movw %si, %ax
movq %rdi, -0x10(%rbp)
movw %ax, -0x12(%rbp)
movq -0x10(%rbp), %rax
movzwl (%rax), %eax
movl %eax, -0x18(%rbp)
subl $0x2, %eax
je 0x3a0e
jmp 0x3a04
movl -0x18(%rbp), %eax
subl $0xa, %eax
je 0x3a2b
jmp 0x3a48
movzwl -0x12(%rbp), %edi
callq 0x2110
movw %ax, %cx
movq -0x10(%rbp), %rax
movw %cx, 0x2(%rax)
movl $0x0, -0x4(%rbp)
jmp 0x3a4f
movzwl -0x12(%rbp), %edi
callq 0x2110
movw %ax, %cx
movq -0x10(%rbp), %rax
movw %cx, 0x2(%rax)
movl $0x0, -0x4(%rbp)
jmp 0x3a4f
movl $0xffffffea, -0x4(%rbp) # imm = 0xFFFFFFEA
movl -0x4(%rbp), %eax
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/mkubecek[P]nperf/client/../wsync.h
// Function: wsync_set_state
static inline void wsync_set_state(struct worker_sync *ws, unsigned int state)
{
	pthread_mutex_lock(&ws->mtx);
	ws->state = state;
	pthread_cond_broadcast(&ws->cv);
	pthread_mutex_unlock(&ws->mtx);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movq -0x8(%rbp), %rdi
callq 0x2390
movl -0xc(%rbp), %ecx
movq -0x8(%rbp), %rax
movl %ecx, 0x5c(%rax)
movq -0x8(%rbp), %rdi
addq $0x28, %rdi
callq 0x2080
movq -0x8(%rbp), %rdi
callq 0x2220
addq $0x10, %rsp
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/mkubecek[P]nperf/client/../wsync.h
// Function: wsync_wait_for_counter
static inline void wsync_wait_for_counter(struct worker_sync *ws,
					  unsigned int count)
{
	pthread_mutex_lock(&ws->mtx);
	while (ws->counter < count)
		pthread_cond_wait(&ws->cv, &ws->mtx);
	pthread_mutex_unlock(&ws->mtx);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movq -0x8(%rbp), %rdi
callq 0x2390
movq -0x8(%rbp), %rax
movl 0x58(%rax), %eax
cmpl -0xc(%rbp), %eax
jae 0x3ad7
movq -0x8(%rbp), %rdi
addq $0x28, %rdi
movq -0x8(%rbp), %rsi
callq 0x20d0
jmp 0x3ab8
movq -0x8(%rbp), %rdi
callq 0x2220
addq $0x10, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/mkubecek[P]nperf/client/../wsync.h
// Function: wsync_sleep
static inline int wsync_sleep(struct worker_sync *ws, unsigned int timeout)
{
	struct timespec ts;
	int ret;

	ret = clock_gettime(CLOCK_MONOTONIC, &ts);
	if (ret < 0)
		return ret;
	ts.tv_sec += timeout;

	pthread_mutex_lock(&ws->mtx);
	while (!ret)
		ret = pthread_cond_timedwait(&ws->cv, &ws->mtx, &ts);
	pthread_mutex_unlock(&ws->mtx);
	return (ret == ETIMEDOUT) ? 0 : -ret;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movl %esi, -0x14(%rbp)
movl $0x1, %edi
leaq -0x28(%rbp), %rsi
callq 0x20c0
movl %eax, -0x2c(%rbp)
cmpl $0x0, -0x2c(%rbp)
jge 0x3b4e
movl -0x2c(%rbp), %eax
movl %eax, -0x4(%rbp)
jmp 0x3baf
movl -0x14(%rbp), %eax
addq -0x28(%rbp), %rax
movq %rax, -0x28(%rbp)
movq -0x10(%rbp), %rdi
callq 0x2390
cmpl $0x0, -0x2c(%rbp)
setne %al
xorb $-0x1, %al
testb $0x1, %al
jne 0x3b71
jmp 0x3b8b
movq -0x10(%rbp), %rdi
addq $0x28, %rdi
movq -0x10(%rbp), %rsi
leaq -0x28(%rbp), %rdx
callq 0x2290
movl %eax, -0x2c(%rbp)
jmp 0x3b62
movq -0x10(%rbp), %rdi
callq 0x2220
cmpl $0x6e, -0x2c(%rbp)
jne 0x3ba1
xorl %eax, %eax
movl %eax, -0x30(%rbp)
jmp 0x3ba9
xorl %eax, %eax
subl -0x2c(%rbp), %eax
movl %eax, -0x30(%rbp)
movl -0x30(%rbp), %eax
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/mkubecek[P]nperf/client/main.c
// Function: recv_server_stats
static struct xfer_stats *recv_server_stats(struct client_config *config)
{
	struct server_thread_info tinfo;
	struct xfer_stats *server_stats;
	struct server_end_msg msg;
	unsigned int i;
	int ret;

	server_stats = calloc(config->n_threads, sizeof(server_stats[0]));
	if (!server_stats)
		return NULL;
	ret = ctrl_recv_msg(config->ctrl_sd, &msg, sizeof(msg));
	if (ret < 0 || ntohl(msg.status) ||
	    ntohl(msg.thread_length) != sizeof(tinfo) ||
	    ntohl(msg.n_threads) != config->n_threads)
		goto err;

	for (i = 0; i < config->n_threads; i++) {
		int local_idx;

		ret = recv_block(config->ctrl_sd, &tinfo, sizeof(tinfo));
		if (ret < 0)
			goto err;
		local_idx = worker_by_port(config, ntohs(tinfo.client_port));
		if (local_idx < 0)
			goto err;
		xfer_stats_ntoh(&tinfo.stats, &server_stats[local_idx]);
	}


	return server_stats;
err:
	free(server_stats);
	fprintf(stderr, "failed to receive server stats\n");
	return NULL;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x80, %rsp
movq %rdi, -0x10(%rbp)
movq -0x10(%rbp), %rax
movl 0x1c(%rax), %eax
movl %eax, %edi
movl $0x30, %esi
callq 0x21d0
movq %rax, -0x50(%rbp)
cmpq $0x0, -0x50(%rbp)
jne 0x3bfa
movq $0x0, -0x8(%rbp)
jmp 0x3cfc
movq -0x10(%rbp), %rax
movl 0x54(%rax), %edi
leaq -0x68(%rbp), %rsi
movl $0x18, %edx
callq 0x64d0
movl %eax, -0x70(%rbp)
cmpl $0x0, -0x70(%rbp)
jl 0x3c46
movl -0x5c(%rbp), %edi
callq 0x2360
cmpl $0x0, %eax
jne 0x3c46
movl -0x58(%rbp), %edi
callq 0x2360
movl %eax, %eax
cmpq $0x38, %rax
jne 0x3c46
movl -0x54(%rbp), %edi
callq 0x2360
movq -0x10(%rbp), %rcx
cmpl 0x1c(%rcx), %eax
je 0x3c4b
jmp 0x3cd3
movl $0x0, -0x6c(%rbp)
movl -0x6c(%rbp), %eax
movq -0x10(%rbp), %rcx
cmpl 0x1c(%rcx), %eax
jae 0x3cc9
movq -0x10(%rbp), %rax
movl 0x54(%rax), %edi
leaq -0x48(%rbp), %rsi
movl $0x38, %edx
callq 0x6400
movl %eax, -0x70(%rbp)
cmpl $0x0, -0x70(%rbp)
jge 0x3c7e
jmp 0x3cd3
movq -0x10(%rbp), %rax
movq %rax, -0x80(%rbp)
movzwl -0x14(%rbp), %edi
callq 0x2260
movq -0x80(%rbp), %rdi
movzwl %ax, %esi
callq 0x3d80
movl %eax, -0x74(%rbp)
cmpl $0x0, -0x74(%rbp)
jge 0x3ca6
jmp 0x3cd3
leaq -0x48(%rbp), %rdi
movq -0x50(%rbp), %rsi
movslq -0x74(%rbp), %rax
imulq $0x30, %rax, %rax
addq %rax, %rsi
callq 0x3df0
movl -0x6c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x6c(%rbp)
jmp 0x3c52
movq -0x50(%rbp), %rax
movq %rax, -0x8(%rbp)
jmp 0x3cfc
movq -0x50(%rbp), %rdi
callq 0x2030
movq 0x7315(%rip), %rax      # 0xaff8
movq (%rax), %rdi
leaq 0x3522(%rip), %rsi      # 0x720f
movb $0x0, %al
callq 0x21f0
movq $0x0, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x80, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/mkubecek[P]nperf/client/main.c
// Function: worker_by_port
static int worker_by_port(struct client_config *config, uint16_t port)
{
	unsigned int i;

	for (i = 0; i < config->n_threads; i++)
		if (config->workers_data[i].client_port == port)
			return i;

	return -1;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movw %si, %ax
movq %rdi, -0x10(%rbp)
movw %ax, -0x12(%rbp)
movl $0x0, -0x18(%rbp)
movl -0x18(%rbp), %eax
movq -0x10(%rbp), %rcx
cmpl 0x1c(%rcx), %eax
jae 0x3dd5
movq -0x10(%rbp), %rax
movq 0x70(%rax), %rax
movl -0x18(%rbp), %ecx
shlq $0x7, %rcx
addq %rcx, %rax
movzwl 0x8(%rax), %eax
movzwl -0x12(%rbp), %ecx
cmpl %ecx, %eax
jne 0x3dc8
movl -0x18(%rbp), %eax
movl %eax, -0x4(%rbp)
jmp 0x3ddc
jmp 0x3dca
movl -0x18(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x18(%rbp)
jmp 0x3d96
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
movl -0x4(%rbp), %eax
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/mkubecek[P]nperf/client/main.c
// Function: client_set_usr1_handler
static int client_set_usr1_handler(void)
{
	struct sigaction action;
	int ret;

	ret = sigaction(SIGUSR1, NULL, &action);
	if (ret < 0)
		return -errno;
	action.sa_handler = SIG_IGN;
	action.sa_flags &= ~(int)SA_RESTART;
	ret = sigaction(SIGUSR1, &action, NULL);
	if (ret < 0)
		return -errno;

	return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0xb0, %rsp
movl $0xa, %edi
xorl %eax, %eax
movl %eax, %esi
leaq -0xa0(%rbp), %rdx
callq 0x2090
movl %eax, -0xa4(%rbp)
cmpl $0x0, -0xa4(%rbp)
jge 0x3f40
callq 0x2070
movq %rax, %rcx
xorl %eax, %eax
subl (%rcx), %eax
movl %eax, -0x4(%rbp)
jmp 0x3f93
movl $0x1, %eax
movq %rax, -0xa0(%rbp)
movl -0x18(%rbp), %eax
andl $0xefffffff, %eax       # imm = 0xEFFFFFFF
movl %eax, -0x18(%rbp)
movl $0xa, %edi
leaq -0xa0(%rbp), %rsi
xorl %eax, %eax
movl %eax, %edx
callq 0x2090
movl %eax, -0xa4(%rbp)
cmpl $0x0, -0xa4(%rbp)
jge 0x3f8c
callq 0x2070
movq %rax, %rcx
xorl %eax, %eax
subl (%rcx), %eax
movl %eax, -0x4(%rbp)
jmp 0x3f93
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0xb0, %rsp
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/mkubecek[P]nperf/client/worker.c
// Function: worker_setup
int worker_setup(struct client_worker_data *data)
{
	int val;
	int ret;
	int sd;

	sd = socket(test_addr.sa.sa_family, SOCK_STREAM, IPPROTO_TCP);
	if (sd < 0) {
		ret = -errno;
		perror("socket");
		return ret;
	}

	if (client_config.tcp_nodelay) {
		val = 1;
		ret = setsockopt(sd, SOL_TCP, TCP_NODELAY, &val, sizeof(val));
		if (ret < 0) {
			ret = -errno;
			perror("setsockopt(TCP_NODELAY)");
			return ret;
		}
	}
	if (client_config.rcvbuf_size) {
		val = client_config.rcvbuf_size;
		ret = setsockopt(sd, SOL_SOCKET, SO_RCVBUF, &val, sizeof(val));
		if (ret < 0) {
			ret = -errno;
			perror("setsockopt(SO_RCVBUF)");
			return ret;
		}
	}
	if (client_config.sndbuf_size) {
		val = client_config.sndbuf_size;
		ret = setsockopt(sd, SOL_SOCKET, SO_SNDBUF, &val, sizeof(val));
		if (ret < 0) {
			ret = -errno;
			perror("setsockopt(SO_SNDBUF)");
			return ret;
		}
	}

	data->sd = sd;
	return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
movzwl 0x7a4d(%rip), %edi      # 0xba00
movl $0x1, %esi
movl $0x6, %edx
callq 0x23b0
movl %eax, -0x1c(%rbp)
cmpl $0x0, -0x1c(%rbp)
jge 0x3ff1
callq 0x2070
movq %rax, %rcx
xorl %eax, %eax
subl (%rcx), %eax
movl %eax, -0x18(%rbp)
leaq 0x326a(%rip), %rdi      # 0x724b
callq 0x22b0
movl -0x18(%rbp), %eax
movl %eax, -0x4(%rbp)
jmp 0x412b
leaq 0x7208(%rip), %rax      # 0xb200
testb $0x1, 0x44(%rax)
je 0x4052
movl $0x1, -0x14(%rbp)
movl -0x1c(%rbp), %edi
movl $0x6, %esi
movl $0x1, %edx
leaq -0x14(%rbp), %rcx
movl $0x4, %r8d
callq 0x20b0
movl %eax, -0x18(%rbp)
cmpl $0x0, -0x18(%rbp)
jge 0x4050
callq 0x2070
movq %rax, %rcx
xorl %eax, %eax
subl (%rcx), %eax
movl %eax, -0x18(%rbp)
leaq 0x3212(%rip), %rdi      # 0x7252
callq 0x22b0
movl -0x18(%rbp), %eax
movl %eax, -0x4(%rbp)
jmp 0x412b
jmp 0x4052
leaq 0x71a7(%rip), %rax      # 0xb200
cmpl $0x0, 0x38(%rax)
je 0x40b6
leaq 0x719a(%rip), %rax      # 0xb200
movl 0x38(%rax), %eax
movl %eax, -0x14(%rbp)
movl -0x1c(%rbp), %edi
movl $0x1, %esi
movl $0x8, %edx
leaq -0x14(%rbp), %rcx
movl $0x4, %r8d
callq 0x20b0
movl %eax, -0x18(%rbp)
cmpl $0x0, -0x18(%rbp)
jge 0x40b4
callq 0x2070
movq %rax, %rcx
xorl %eax, %eax
subl (%rcx), %eax
movl %eax, -0x18(%rbp)
leaq 0x31c3(%rip), %rdi      # 0x726a
callq 0x22b0
movl -0x18(%rbp), %eax
movl %eax, -0x4(%rbp)
jmp 0x412b
jmp 0x40b6
leaq 0x7143(%rip), %rax      # 0xb200
cmpl $0x0, 0x3c(%rax)
je 0x411a
leaq 0x7136(%rip), %rax      # 0xb200
movl 0x3c(%rax), %eax
movl %eax, -0x14(%rbp)
movl -0x1c(%rbp), %edi
movl $0x1, %esi
movl $0x7, %edx
leaq -0x14(%rbp), %rcx
movl $0x4, %r8d
callq 0x20b0
movl %eax, -0x18(%rbp)
cmpl $0x0, -0x18(%rbp)
jge 0x4118
callq 0x2070
movq %rax, %rcx
xorl %eax, %eax
subl (%rcx), %eax
movl %eax, -0x18(%rbp)
leaq 0x3175(%rip), %rdi      # 0x7280
callq 0x22b0
movl -0x18(%rbp), %eax
movl %eax, -0x4(%rbp)
jmp 0x412b
jmp 0x411a
movl -0x1c(%rbp), %ecx
movq -0x10(%rbp), %rax
movl %ecx, 0x4(%rax)
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/mkubecek[P]nperf/client/worker.c
// Function: worker_connect
int worker_connect(struct client_worker_data *data)
{
	union sockaddr_any local_addr;
	socklen_t addr_len;
	int ret;

	ret = sockaddr_length(&test_addr);
	if (ret < 0)
		return ret;
	addr_len = ret;
	ret = connect(data->sd, &test_addr.sa, addr_len);
	if (ret < 0)
		return ret;

	addr_len = sizeof(local_addr);
	ret = getsockname(data->sd, &local_addr.sa, &addr_len);
	if (ret < 0) {
		ret = -errno;
		goto err_close;
	}
	ret = sockaddr_get_port(&local_addr);
	if (ret < 0)
		goto err_close;
	data->client_port = ret;

	return 0;
err_close:
	close(data->sd);
	return ret;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x10(%rbp)
leaq 0x78ad(%rip), %rdi      # 0xba00
callq 0x4220
movl %eax, -0x34(%rbp)
cmpl $0x0, -0x34(%rbp)
jge 0x416c
movl -0x34(%rbp), %eax
movl %eax, -0x4(%rbp)
jmp 0x420b
movl -0x34(%rbp), %eax
movl %eax, -0x30(%rbp)
movq -0x10(%rbp), %rax
movl 0x4(%rax), %edi
movl -0x30(%rbp), %edx
leaq 0x787d(%rip), %rsi      # 0xba00
callq 0x2310
movl %eax, -0x34(%rbp)
cmpl $0x0, -0x34(%rbp)
jge 0x4199
movl -0x34(%rbp), %eax
movl %eax, -0x4(%rbp)
jmp 0x420b
movl $0x1c, -0x30(%rbp)
movq -0x10(%rbp), %rax
movl 0x4(%rax), %edi
leaq -0x2c(%rbp), %rsi
leaq -0x30(%rbp), %rdx
callq 0x22d0
movl %eax, -0x34(%rbp)
cmpl $0x0, -0x34(%rbp)
jge 0x41ce
callq 0x2070
movq %rax, %rcx
xorl %eax, %eax
subl (%rcx), %eax
movl %eax, -0x34(%rbp)
jmp 0x41f9
leaq -0x2c(%rbp), %rdi
callq 0x4270
movl %eax, -0x34(%rbp)
cmpl $0x0, -0x34(%rbp)
jge 0x41e2
jmp 0x41f9
movl -0x34(%rbp), %eax
movw %ax, %cx
movq -0x10(%rbp), %rax
movw %cx, 0x8(%rax)
movl $0x0, -0x4(%rbp)
jmp 0x420b
movq -0x10(%rbp), %rax
movl 0x4(%rax), %edi
callq 0x21a0
movl -0x34(%rbp), %eax
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x40, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)