// File: /workspace/github_c_makefile_star2_O2/rouming[P]io/io.c
// Function: buf_memcpy_to
int buf_memcpy_to(struct io_buf *src, size_t off, void *ptr, size_t len)
{
	int rc;
	struct iovec_iter it_s;
	struct io_buf dst = {
		.iov[0] = {
			.iov_base = ptr,
			.iov_len = len,
		},
		.iov_num = 1,
	};
	struct iovec_iter beg_d = BEG_IT(&dst);

	rc = buf_check(src);
	if (rc)
		return rc;

	it_s = buf_it(src, off);

	return buf_it_append(src, &it_s, &dst, &beg_d, len);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x198, %rsp            # imm = 0x198
movq %rcx, %r13
movq %rdx, %rbx
movq %rsi, %r15
movq %rdi, %r14
leaq 0x60(%rsp), %r12
movl $0x138, %edx            # imm = 0x138
movq %r12, %rdi
xorl %esi, %esi
callq 0x10e0
movq %rbx, -0x10(%r12)
movq %r13, -0x8(%r12)
movq $0x1, 0x110(%r12)
xorps %xmm0, %xmm0
movaps %xmm0, 0x10(%rsp)
movq %r14, %rdi
callq 0x2c07
movl %eax, %ecx
testl %eax, %eax
jne 0x2bf3
xorps %xmm0, %xmm0
movaps %xmm0, 0x20(%rsp)
movq 0x120(%r14), %rbp
cmpb $0x0, 0x128(%r14)
movq %r13, 0x8(%rsp)
je 0x29a9
xorl %eax, %eax
jmp 0x29b8
decq %rbp
movq %rbp, %rax
shlq $0x4, %rax
movq 0x8(%r14,%rax), %rax
leaq 0x38(%rsp), %r12
movq %rbp, (%r12)
movq %rax, (%rsp)
movq %rax, 0x8(%r12)
xorl %eax, %eax
leaq 0x20(%rsp), %r13
cmpq %rbp, %rax
jae 0x29dd
testq %r15, %r15
jne 0x29ef
jmp 0x2a1f
movq 0x28(%rsp), %rcx
ja 0x2a24
cmpq (%rsp), %rcx
jae 0x2a24
testq %r15, %r15
je 0x2a24
movq %r14, %rdi
movq %r13, %rsi
movq %r12, %rdx
callq 0x38a5
movq %rax, %rbx
cmpq %rax, %r15
cmovbq %r15, %rbx
movq %r14, %rdi
movq %r13, %rsi
movq %rbx, %rdx
callq 0x38e8
subq %rbx, %r15
movq 0x20(%rsp), %rax
jmp 0x29d1
movq 0x28(%rsp), %rcx
leaq 0x38(%rsp), %rdi
andq $0x0, 0x20(%rsp)
movq %rax, (%rdi)
movq %rcx, 0x8(%rdi)
movq 0x8(%rsp), %rbx
movq %rbx, 0x28(%rsp)
leaq 0x100(%r14), %r13
movq %r13, %rsi
callq 0x3882
xorl %ecx, %ecx
testl %eax, %eax
jns 0x2bf3
movq %r14, %rdi
callq 0x286c
cltq
movq %rbx, (%rsp)
cmpq %rbx, %rax
ja 0x2a7a
movq %r14, %rdi
callq 0x286c
cltq
movq %rax, (%rsp)
movb $0x1, %r15b
movq $0x0, 0x48(%rsp)
movq %r13, 0x30(%rsp)
leaq 0x38(%rsp), %rdi
movq %r13, %rsi
callq 0x3882
testl %eax, %eax
jns 0x2bec
cmpq %rbx, 0x18(%rsp)
setb %al
andb %al, %r15b
cmpb $0x1, %r15b
jne 0x2bec
cmpq $0x0, (%rsp)
je 0x2bec
movq %r14, %rdi
leaq 0x38(%rsp), %rsi
movq %r13, %rdx
callq 0x38a5
movq %rax, %r13
movq (%rsp), %rax
cmpq %r13, %rax
cmovbq %rax, %r13
xorl %ebx, %ebx
testq %rbx, %rbx
sete %r15b
jne 0x2bd8
movq 0x8(%rsp), %rax
cmpq %rax, 0x18(%rsp)
jae 0x2bd8
testq %r13, %r13
je 0x2bd8
movq 0x170(%rsp), %rax
decq %rax
cmpq %rax, %rbx
jne 0x2b29
movq 0x18(%rsp), %rax
movq %rbx, %rcx
shlq $0x4, %rcx
cmpq 0x58(%rsp,%rcx), %rax
je 0x2b3a
movq %rbx, %rax
shlq $0x4, %rax
movq 0x50(%rsp,%rax), %r15
testq %r15, %r15
jne 0x2b5e
leaq 0x50(%rsp), %rdi
leaq 0x10(%rsp), %rsi
movq (%rsp), %rdx
callq 0x3942
testl %eax, %eax
js 0x2be7
shlq $0x4, %rbx
movq 0x50(%rsp,%rbx), %r15
leaq 0x50(%rsp), %rbp
movq %rbp, %rdi
leaq 0x10(%rsp), %r12
movq %r12, %rsi
leaq 0x20(%rsp), %rdx
callq 0x38a5
movq %rax, %rbx
cmpq %rax, %r13
cmovbq %r13, %rbx
addq 0x18(%rsp), %r15
movq 0x38(%rsp), %rax
shlq $0x4, %rax
movq (%r14,%rax), %rsi
addq 0x40(%rsp), %rsi
movq %r15, %rdi
movq %rbx, %rdx
callq 0x1160
subq %rbx, %r13
subq %rbx, (%rsp)
addq %rbx, 0x48(%rsp)
movq %r14, %rdi
leaq 0x38(%rsp), %rsi
movq %rbx, %rdx
callq 0x38e8
movq %rbp, %rdi
movq %r12, %rsi
movq %rbx, %rdx
callq 0x38e8
movq 0x10(%rsp), %rbx
jmp 0x2ae0
movq 0x8(%rsp), %rbx
movq 0x30(%rsp), %r13
jmp 0x2a8b
pushq $-0xc
popq %rcx
jmp 0x2bf3
movq 0x48(%rsp), %rax
movl %eax, %ecx
movl %ecx, %eax
addq $0x198, %rsp            # imm = 0x198
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq