	.file	"extr_fc_exch.c_fc_exch_els_rec.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.type	fc_exch_els_rec, @function
fc_exch_els_rec:
.LFB0:
	.cfi_startproc
	endbr64
	push	r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	push	r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	push	r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	push	r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	push	rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	mov	rbp, rdi
	push	rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	sub	rsp, 24
	.cfi_def_cfa_offset 80
	mov	r15d, DWORD PTR ELS_RJT_LOGIC[rip]
	call	fr_dev@PLT
	mov	esi, 12
	mov	rdi, rbp
	mov	rbx, rax
	call	fc_frame_payload_get@PLT
	mov	edx, DWORD PTR ELS_EXPL_INV_LEN[rip]
	test	rax, rax
	je	.L3
	mov	edi, DWORD PTR [rax]
	mov	r14, rax
	call	ntoh24@PLT
	mov	edi, DWORD PTR 8[r14]
	mov	r12, rax
	call	ntohs@PLT
	mov	edi, DWORD PTR 4[r14]
	mov	QWORD PTR 8[rsp], rax
	call	ntohs@PLT
	mov	edi, DWORD PTR 8[rbx]
	mov	r13, rax
	call	fc_host_port_id@PLT
	mov	rsi, QWORD PTR 8[rsp]
	mov	rdi, rbx
	cmp	rax, r12
	cmove	rsi, r13
	call	fc_exch_lookup@PLT
	mov	edx, DWORD PTR ELS_EXPL_OXID_RXID[rip]
	mov	r8, rax
	test	rax, rax
	je	.L3
	cmp	QWORD PTR [rax], r12
	je	.L19
.L5:
	mov	rdi, r8
	mov	DWORD PTR 8[rsp], edx
	call	fc_exch_release@PLT
	mov	edx, DWORD PTR 8[rsp]
.L3:
	add	rsp, 24
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	mov	esi, r15d
	mov	rdi, rbp
	pop	rbx
	.cfi_def_cfa_offset 48
	pop	rbp
	.cfi_def_cfa_offset 40
	pop	r12
	.cfi_def_cfa_offset 32
	pop	r13
	.cfi_def_cfa_offset 24
	pop	r14
	.cfi_def_cfa_offset 16
	pop	r15
	.cfi_def_cfa_offset 8
	jmp	fc_seq_ls_rjt@PLT
	.p2align 4,,10
	.p2align 3
.L19:
	.cfi_restore_state
	cmp	QWORD PTR 8[rax], r13
	jne	.L5
	mov	rsi, QWORD PTR 8[rsp]
	cmp	QWORD PTR FC_XID_UNKNOWN[rip], rsi
	je	.L6
	cmp	QWORD PTR 16[rax], rsi
	jne	.L5
.L6:
	mov	esi, 40
	mov	rdi, rbx
	mov	QWORD PTR 8[rsp], r8
	call	fc_frame_alloc@PLT
	mov	r8, QWORD PTR 8[rsp]
	test	rax, rax
	mov	r13, rax
	je	.L7
	mov	esi, 40
	mov	rdi, rax
	call	fc_frame_payload_get@PLT
	mov	edx, 40
	xor	esi, esi
	mov	rdi, rax
	mov	r12, rax
	call	memset@PLT
	mov	eax, DWORD PTR ELS_LS_ACC[rip]
	mov	esi, DWORD PTR [r14]
	mov	edx, 3
	mov	edi, DWORD PTR 24[r12]
	mov	DWORD PTR 32[r12], eax
	mov	eax, DWORD PTR 4[r14]
	mov	DWORD PTR 28[r12], eax
	call	memcpy@PLT
	mov	r8, QWORD PTR 8[rsp]
	mov	rdi, QWORD PTR 16[r8]
	call	htons@PLT
	mov	r8, QWORD PTR 8[rsp]
	mov	DWORD PTR 20[r12], eax
	mov	rsi, QWORD PTR 24[r8]
	cmp	rsi, QWORD PTR [r8]
	je	.L20
	mov	edi, DWORD PTR 16[r12]
	mov	QWORD PTR 8[rsp], r8
	call	hton24@PLT
	mov	r8, QWORD PTR 8[rsp]
.L9:
	mov	edi, DWORD PTR 44[r8]
	mov	QWORD PTR 8[rsp], r8
	call	htonl@PLT
	mov	r8, QWORD PTR 8[rsp]
	mov	edi, DWORD PTR ESB_ST_RESP[rip]
	mov	QWORD PTR 8[r12], rax
	or	edi, DWORD PTR ESB_ST_SEQ_INIT[rip]
	or	edi, DWORD PTR ESB_ST_COMPLETE[rip]
	and	edi, DWORD PTR 40[r8]
	call	htonl@PLT
	mov	edx, DWORD PTR FC_RCTL_ELS_REP[rip]
	xor	ecx, ecx
	mov	rsi, rbp
	mov	QWORD PTR [r12], rax
	mov	rdi, r13
	call	fc_fill_reply_hdr@PLT
	mov	rsi, r13
	mov	rdi, rbx
	call	[QWORD PTR [rbx]]
	mov	r8, QWORD PTR 8[rsp]
.L7:
	add	rsp, 24
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	mov	rdi, r8
	pop	rbx
	.cfi_def_cfa_offset 48
	pop	rbp
	.cfi_def_cfa_offset 40
	pop	r12
	.cfi_def_cfa_offset 32
	pop	r13
	.cfi_def_cfa_offset 24
	pop	r14
	.cfi_def_cfa_offset 16
	pop	r15
	.cfi_def_cfa_offset 8
	jmp	fc_exch_release@PLT
	.p2align 4,,10
	.p2align 3
.L20:
	.cfi_restore_state
	mov	rsi, QWORD PTR 32[r8]
	mov	edi, DWORD PTR 16[r12]
	call	hton24@PLT
	mov	r8, QWORD PTR 8[rsp]
	jmp	.L9
	.cfi_endproc
.LFE0:
	.size	fc_exch_els_rec, .-fc_exch_els_rec
	.comm	FC_XID_UNKNOWN,8,8
	.comm	FC_RCTL_ELS_REP,4,4
	.comm	ESB_ST_SEQ_INIT,4,4
	.comm	ESB_ST_RESP,4,4
	.comm	ESB_ST_COMPLETE,4,4
	.comm	ELS_RJT_LOGIC,4,4
	.comm	ELS_LS_ACC,4,4
	.comm	ELS_EXPL_OXID_RXID,4,4
	.comm	ELS_EXPL_INV_LEN,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",@progbits
	.section	.note.gnu.property,"a"
	.align 8
	.long	 1f - 0f
	.long	 4f - 1f
	.long	 5
0:
	.string	 "GNU"
1:
	.align 8
	.long	 0xc0000002
	.long	 3f - 2f
2:
	.long	 0x3
3:
	.align 8
4:

	.arch armv5t
	.eabi_attribute 20, 1
	.eabi_attribute 21, 1
	.eabi_attribute 23, 3
	.eabi_attribute 24, 1
	.eabi_attribute 25, 1
	.eabi_attribute 26, 2
	.eabi_attribute 30, 2
	.eabi_attribute 34, 0
	.eabi_attribute 18, 4
	.file	"extr_fc_exch.c_fc_exch_els_rec.c"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	fc_exch_els_rec, %function
fc_exch_els_rec:
	@ args = 0, pretend = 0, frame = 8
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, r9, r10, fp, lr}
	ldr	r3, .L21
	sub	sp, sp, #12
	mov	r6, r0
	ldr	r10, [r3]
	bl	fr_dev
	mov	r1, #12
	mov	r7, r0
	mov	r0, r6
	bl	fc_frame_payload_get
	subs	r4, r0, #0
	beq	.L19
	ldr	r0, [r4]
	bl	ntoh24
	mov	r8, r0
	ldr	r0, [r4, #8]
	bl	ntohs
	mov	fp, r0
	ldr	r0, [r4, #4]
	bl	ntohs
	mov	r9, r0
	ldr	r0, [r7, #4]
	bl	fc_host_port_id
	mov	r1, r0
	cmp	r1, r8
	moveq	r1, r9
	movne	r1, fp
	mov	r0, r7
	bl	fc_exch_lookup
	ldr	r3, .L21+4
	subs	r5, r0, #0
	ldr	r2, [r3]
	beq	.L3
	ldr	r3, [r5]
	cmp	r3, r8
	beq	.L20
.L5:
	mov	r0, r5
	str	r2, [sp, #4]
	bl	fc_exch_release
	ldr	r2, [sp, #4]
.L3:
	mov	r1, r10
	mov	r0, r6
	add	sp, sp, #12
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, r10, fp, lr}
	b	fc_seq_ls_rjt
.L20:
	ldr	r3, [r5, #4]
	cmp	r3, r9
	bne	.L5
	ldr	r3, .L21+8
	ldr	r3, [r3]
	cmp	r3, fp
	beq	.L6
	ldr	r3, [r5, #8]
	cmp	r3, fp
	bne	.L5
.L6:
	mov	r1, #28
	mov	r0, r7
	bl	fc_frame_alloc
	subs	r9, r0, #0
	beq	.L7
	mov	r1, #28
	bl	fc_frame_payload_get
	mov	r8, r0
	mov	r2, #28
	mov	r1, #0
	bl	memset
	ldr	r3, .L21+12
	ldr	r2, [r4, #4]
	ldr	r3, [r3]
	ldr	r1, [r4]
	str	r3, [r8, #24]
	str	r2, [r8, #20]
	mov	r0, #0
	mov	r2, #3
	bl	memcpy
	ldr	r0, [r5, #8]
	bl	htons
	ldr	r1, [r5, #12]
	ldr	r3, [r5]
	str	r0, [r8, #12]
	cmp	r1, r3
	ldreq	r1, [r5, #16]
	ldr	r0, [r8, #8]
	bl	hton24
	ldr	r0, [r5, #24]
	bl	htonl
	ldr	r2, .L21+16
	ldr	r3, .L21+20
	ldr	r1, [r2]
	ldr	r2, .L21+24
	ldr	r3, [r3]
	ldr	r2, [r2]
	orr	r3, r3, r1
	str	r0, [r8, #4]
	ldr	r0, [r5, #20]
	orr	r3, r3, r2
	and	r0, r0, r3
	bl	htonl
	ldr	r3, .L21+28
	mov	r1, r6
	ldr	r2, [r3]
	str	r0, [r8]
	mov	r3, #0
	mov	r0, r9
	bl	fc_fill_reply_hdr
	mov	r1, r9
	mov	r0, r7
	ldr	r3, [r7]
	blx	r3
.L7:
	mov	r0, r5
	add	sp, sp, #12
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, r10, fp, lr}
	b	fc_exch_release
.L19:
	ldr	r3, .L21+32
	ldr	r2, [r3]
	b	.L3
.L22:
	.align	2
.L21:
	.word	ELS_RJT_LOGIC
	.word	ELS_EXPL_OXID_RXID
	.word	FC_XID_UNKNOWN
	.word	ELS_LS_ACC
	.word	ESB_ST_SEQ_INIT
	.word	ESB_ST_RESP
	.word	ESB_ST_COMPLETE
	.word	FC_RCTL_ELS_REP
	.word	ELS_EXPL_INV_LEN
	.size	fc_exch_els_rec, .-fc_exch_els_rec
	.comm	FC_XID_UNKNOWN,4,4
	.comm	FC_RCTL_ELS_REP,4,4
	.comm	ESB_ST_SEQ_INIT,4,4
	.comm	ESB_ST_RESP,4,4
	.comm	ESB_ST_COMPLETE,4,4
	.comm	ELS_RJT_LOGIC,4,4
	.comm	ELS_LS_ACC,4,4
	.comm	ELS_EXPL_OXID_RXID,4,4
	.comm	ELS_EXPL_INV_LEN,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
