// File: /workspace/github_c_makefile_star2_O3/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 0x1f7f
movq %rsi, %r15
movq %rdi, %rbx
testb $0x1, 0x20(%rsi)
movq (%rdi), %rdi
jne 0x1dfe
leaq 0x206(%rip), %rcx       # 0x1fa1
xorl %esi, %esi
movq %rbx, %rdx
callq 0x3be7
testq %rax, %rax
je 0x1f7a
movq %rax, %r14
leaq 0x28(%rax), %rdi
callq 0x297b
leaq 0x18(%rbx), %rax
movq %rax, 0x28(%r14)
movl $0x1, %r15d
movq %r15, 0x30(%r14)
movq %r14, %rdi
addq $0x38, %rdi
movl $0x110, %edx            # imm = 0x110
xorl %esi, %esi
callq 0x10e0
movq %r15, 0x148(%r14)
xorps %xmm0, %xmm0
movups %xmm0, 0x150(%r14)
movups %xmm0, 0x160(%r14)
jmp 0x1ed8
leaq 0x190(%rip), %rcx       # 0x1f95
movl $0x1, %esi
movq %rbx, %rdx
callq 0x3be7
testq %rax, %rax
je 0x1f7a
movq %rax, %r14
leaq 0x28(%r15), %rdi
callq 0x2a38
cmpb $0x0, 0x2c(%rbx)
jne 0x1e4f
movb $0x1, 0x2c(%rbx)
leaq 0x6322(%rip), %rcx      # 0x815a
movq %rcx, 0x28(%r14)
movq $0x2, 0x30(%r14)
movq $0x1, 0x148(%r14)
movl 0x20(%r15), %ecx
testb $0x2, %cl
jne 0x1e5c
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)
movq %r14, %rdi
movl $0x1, %esi
callq *0x8(%rbx)
movl %eax, %ebp
testl %eax, %eax
jne 0x1f7f
xorl %ebp, %ebp
cmpl $0x0, 0x28(%rbx)
jne 0x1f7f
movq (%rbx), %rdi
leaq 0x39d(%rip), %rcx       # 0x22a0
movl $0x1, %esi
movq %rbx, %rdx
callq 0x3be7
testq %rax, %rax
je 0x1f7a
movq %rax, %r14
leaq 0x623d(%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 0x1f8c
movl %eax, %r15d
movq %r14, %rdi
callq 0x3c7a
movl %r15d, %ebp
jmp 0x1f7f
movl $0xfffffff4, %ebp       # imm = 0xFFFFFFF4
movl %ebp, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
movl $0x1, 0x28(%rbx)
jmp 0x1f7f