	.file	"extr_ib_cm.c_cm_apr_handler.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.type	cm_apr_handler, @function
cm_apr_handler:
.LFB0:
	.cfi_startproc
	endbr64
	push	r13
	.cfi_def_cfa_offset 16
	.cfi_offset 13, -16
	mov	r13, rdi
	push	r12
	.cfi_def_cfa_offset 24
	.cfi_offset 12, -24
	push	rbp
	.cfi_def_cfa_offset 32
	.cfi_offset 6, -32
	push	rbx
	.cfi_def_cfa_offset 40
	.cfi_offset 3, -40
	sub	rsp, 8
	.cfi_def_cfa_offset 48
	mov	rax, QWORD PTR 40[rdi]
	mov	rbx, QWORD PTR [rax]
	mov	esi, DWORD PTR 16[rbx]
	mov	edi, DWORD PTR 20[rbx]
	call	cm_acquire_id@PLT
	test	rax, rax
	je	.L8
	mov	rbp, rax
	mov	eax, DWORD PTR 12[rbx]
	mov	rdi, rbp
	mov	DWORD PTR 32[r13], eax
	lea	rax, 8[rbx]
	mov	QWORD PTR 24[r13], rax
	mov	eax, DWORD PTR 4[rbx]
	mov	QWORD PTR 8[r13], rbx
	mov	DWORD PTR 16[r13], eax
	call	spin_lock_irq@PLT
	mov	rax, QWORD PTR IB_CM_ESTABLISHED[rip]
	cmp	QWORD PTR 32[rbp], rax
	jne	.L4
	mov	rax, QWORD PTR 40[rbp]
	cmp	rax, QWORD PTR IB_CM_LAP_SENT[rip]
	je	.L5
	cmp	rax, QWORD PTR IB_CM_MRA_LAP_RCVD[rip]
	je	.L5
.L4:
	mov	rdi, rbp
	call	spin_unlock_irq@PLT
	mov	rdi, rbp
	call	cm_deref_id@PLT
.L8:
	mov	r12d, DWORD PTR EINVAL[rip]
	add	rsp, 8
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	pop	rbx
	.cfi_def_cfa_offset 32
	pop	rbp
	.cfi_def_cfa_offset 24
	neg	r12d
	mov	eax, r12d
	pop	r12
	.cfi_def_cfa_offset 16
	pop	r13
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L5:
	.cfi_restore_state
	mov	rax, QWORD PTR IB_CM_LAP_IDLE[rip]
	mov	rsi, QWORD PTR 16[rbp]
	mov	QWORD PTR 40[rbp], rax
	mov	rax, QWORD PTR 24[rbp]
	mov	edi, DWORD PTR [rax]
	call	ib_cancel_mad@PLT
	mov	QWORD PTR 16[rbp], 0
	lea	rdi, 8[rbp]
	call	atomic_inc_and_test@PLT
	mov	r12d, eax
	test	eax, eax
	je	.L10
	mov	rdi, rbp
	xor	r12d, r12d
	call	spin_unlock_irq@PLT
	mov	rsi, r13
	mov	rdi, rbp
	call	cm_process_work@PLT
	add	rsp, 8
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	mov	eax, r12d
	pop	rbx
	.cfi_def_cfa_offset 32
	pop	rbp
	.cfi_def_cfa_offset 24
	pop	r12
	.cfi_def_cfa_offset 16
	pop	r13
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L10:
	.cfi_restore_state
	lea	rsi, 4[rbp]
	mov	rdi, r13
	call	list_add_tail@PLT
	mov	rdi, rbp
	call	spin_unlock_irq@PLT
	mov	rdi, rbp
	call	cm_deref_id@PLT
	add	rsp, 8
	.cfi_def_cfa_offset 40
	mov	eax, r12d
	pop	rbx
	.cfi_def_cfa_offset 32
	pop	rbp
	.cfi_def_cfa_offset 24
	pop	r12
	.cfi_def_cfa_offset 16
	pop	r13
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE0:
	.size	cm_apr_handler, .-cm_apr_handler
	.comm	IB_CM_MRA_LAP_RCVD,8,8
	.comm	IB_CM_LAP_SENT,8,8
	.comm	IB_CM_LAP_IDLE,8,8
	.comm	IB_CM_ESTABLISHED,8,8
	.comm	EINVAL,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_ib_cm.c_cm_apr_handler.c"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	cm_apr_handler, %function
cm_apr_handler:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	ldr	r3, [r0, #20]
	push	{r4, r5, r6, r7, r8, lr}
	ldr	r5, [r3]
	mov	r6, r0
	ldr	r1, [r5, #16]
	ldr	r0, [r5, #20]
	bl	cm_acquire_id
	subs	r4, r0, #0
	beq	.L8
	ldr	r3, [r5, #12]
	ldr	r2, [r5, #4]
	str	r3, [r6, #16]
	add	r3, r5, #8
	str	r2, [r6, #8]
	str	r3, [r6, #12]
	str	r5, [r6, #4]
	bl	spin_lock_irq
	ldr	r3, .L11
	ldr	r2, [r4, #20]
	ldr	r3, [r3]
	cmp	r2, r3
	bne	.L4
	ldr	r2, .L11+4
	ldr	r3, [r4, #24]
	ldr	r2, [r2]
	cmp	r3, r2
	beq	.L5
	ldr	r2, .L11+8
	ldr	r2, [r2]
	cmp	r3, r2
	beq	.L5
.L4:
	mov	r0, r4
	bl	spin_unlock_irq
	mov	r0, r4
	bl	cm_deref_id
.L8:
	ldr	r3, .L11+12
	ldr	r5, [r3]
	rsb	r5, r5, #0
	mov	r0, r5
	pop	{r4, r5, r6, r7, r8, pc}
.L5:
	mov	r7, #0
	ldr	r3, .L11+16
	ldr	r2, [r4, #16]
	ldr	r3, [r3]
	ldr	r0, [r2]
	ldr	r1, [r4, #12]
	str	r3, [r4, #24]
	bl	ib_cancel_mad
	str	r7, [r4, #12]
	add	r0, r4, #8
	bl	atomic_inc_and_test
	subs	r5, r0, #0
	beq	.L10
	mov	r5, r7
	mov	r0, r4
	bl	spin_unlock_irq
	mov	r1, r6
	mov	r0, r4
	bl	cm_process_work
	mov	r0, r5
	pop	{r4, r5, r6, r7, r8, pc}
.L10:
	add	r1, r4, #4
	mov	r0, r6
	bl	list_add_tail
	mov	r0, r4
	bl	spin_unlock_irq
	mov	r0, r4
	bl	cm_deref_id
	mov	r0, r5
	pop	{r4, r5, r6, r7, r8, pc}
.L12:
	.align	2
.L11:
	.word	IB_CM_ESTABLISHED
	.word	IB_CM_LAP_SENT
	.word	IB_CM_MRA_LAP_RCVD
	.word	EINVAL
	.word	IB_CM_LAP_IDLE
	.size	cm_apr_handler, .-cm_apr_handler
	.comm	IB_CM_MRA_LAP_RCVD,4,4
	.comm	IB_CM_LAP_SENT,4,4
	.comm	IB_CM_LAP_IDLE,4,4
	.comm	IB_CM_ESTABLISHED,4,4
	.comm	EINVAL,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
