// File: /workspace/github_c_makefile_star2_O1/rouming[P]io/zmtp.c
// Function: on_proto_submit_REP
static int on_proto_submit_REP(struct io_proto *p, struct io_req *req)
{
	struct io_req *hdr_req;
	struct zmtp *zmtp;
	int rc;

	zmtp = container_of(p, struct zmtp, io_proto);
	if (zmtp->inner_state == ZMTP_REP_CLOSED)
		/* That's all folks */
		return -ENOTCONN;

	if (req->flags & REQ_WR)
		hdr_req = zmtp_create_wr_hdr_req(zmtp, req);
	else
		hdr_req = zmtp_create_rd_hdr_req(zmtp);

	if (hdr_req == NULL)
		return -ENOMEM;

	rc = zmtp->io_proto.submit(hdr_req, TO_TAIL);
	if (rc)
		return rc;

	if (zmtp->inner_state == ZMTP_UNKNOWN)
		/* Start greeting */
		return zmtp_start_greeting_REP(zmtp);

	return 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movl $0xffffff95, %ebp       # imm = 0xFFFFFF95
cmpl $0x2, 0x28(%rdi)
je 0x1f82
movq %rsi, %r15
movq %rdi, %rbx
testb $0x1, 0x20(%rsi)
movq (%rdi), %rdi
jne 0x1e80
leaq 0x219(%rip), %rcx       # 0x2030
xorl %r14d, %r14d
xorl %esi, %esi
movq %rbx, %rdx
callq 0x3d60
testq %rax, %rax
je 0x1f5f
movq %rax, %r15
leaq 0x28(%rax), %rdi
callq 0x29c7
leaq 0x18(%rbx), %rax
movq %rax, 0x28(%r15)
movl $0x1, %r14d
movq %r14, 0x30(%r15)
movq %r15, %rdi
addq $0x38, %rdi
movl $0x110, %edx            # imm = 0x110
xorl %esi, %esi
callq 0x10e0
movq %r14, 0x148(%r15)
xorps %xmm0, %xmm0
movups %xmm0, 0x150(%r15)
movups %xmm0, 0x160(%r15)
movq %r15, %r14
jmp 0x1f5f
leaq 0x19d(%rip), %rcx       # 0x2024
movl $0x1, %esi
movq %rbx, %rdx
callq 0x3d60
testq %rax, %rax
je 0x1f5c
movq %rax, %r14
leaq 0x28(%r15), %rdi
callq 0x2aa2
cmpb $0x0, 0x2c(%rbx)
jne 0x1ed1
movb $0x1, 0x2c(%rbx)
leaq 0x62a0(%rip), %rcx      # 0x815a
movq %rcx, 0x28(%r14)
movq $0x2, 0x30(%r14)
movq $0x1, 0x148(%r14)
movl 0x20(%r15), %ecx
testb $0x2, %cl
jne 0x1ede
movb $0x0, 0x2c(%rbx)
xorl %edx, %edx
cmpl $0x100, %eax            # imm = 0x100
setge %dl
movl %eax, %esi
bswapq %rsi
movzbl %al, %eax
cmovlq %rax, %rsi
movl $0x8, %eax
movl $0x1, %edi
cmovgeq %rax, %rdi
leaq 0x160(%r14), %rax
movq %rsi, 0x160(%r14)
movq %r14, %rsi
addq $0x161, %rsi            # imm = 0x161
shrl %ecx
andl $0x1, %ecx
leal (%rcx,%rdx,2), %ecx
movb %cl, 0x161(%r14)
movq 0x148(%r14), %rcx
movq %rcx, %rdx
shlq $0x4, %rdx
movq %rsi, 0x28(%r14,%rdx)
movq $0x1, 0x30(%r14,%rdx)
movq %rax, 0x38(%r14,%rdx)
movq %rdi, 0x40(%r14,%rdx)
addq $0x2, %rcx
movq %rcx, 0x148(%r14)
jmp 0x1f5f
xorl %r14d, %r14d
movl $0xfffffff4, %ebp       # imm = 0xFFFFFFF4
testq %r14, %r14
je 0x1f82
movq %r14, %rdi
movl $0x1, %esi
callq *0x8(%rbx)
movl %eax, %ebp
testl %eax, %eax
jne 0x1f82
xorl %ebp, %ebp
cmpl $0x0, 0x28(%rbx)
je 0x1f8f
movl %ebp, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
movq (%rbx), %rdi
leaq 0x3a3(%rip), %rcx       # 0x233c
movl $0x1, %esi
movq %rbx, %rdx
callq 0x3d60
movl $0xfffffff4, %ebp       # imm = 0xFFFFFFF4
testq %rax, %rax
je 0x1f82
movq %rax, %r14
leaq 0x61a2(%rip), %rax      # 0x815c
movq %rax, 0x28(%r14)
movq $0xb, 0x30(%r14)
movq %r14, %rdi
addq $0x38, %rdi
xorl %ebp, %ebp
movl $0x110, %edx            # imm = 0x110
xorl %esi, %esi
callq 0x10e0
movq $0x1, 0x148(%r14)
xorps %xmm0, %xmm0
movups %xmm0, 0x150(%r14)
movups %xmm0, 0x160(%r14)
movq %r14, %rdi
xorl %esi, %esi
callq *0x8(%rbx)
testl %eax, %eax
je 0x2018
movl %eax, %r15d
movq %r14, %rdi
callq 0x3df6
movl %r15d, %ebp
jmp 0x1f82
movl $0x1, 0x28(%rbx)
jmp 0x1f82