	.file	"extr_ipmi_msghandler.c_ipmi_unregister_for_cmd.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.globl	ipmi_unregister_for_cmd
	.type	ipmi_unregister_for_cmd, @function
ipmi_unregister_for_cmd:
.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
	mov	r12, rdi
	push	rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	push	rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	mov	ebx, ecx
	sub	rsp, 24
	.cfi_def_cfa_offset 80
	mov	r13, QWORD PTR [rdi]
	mov	eax, DWORD PTR ENOENT[rip]
	mov	BYTE PTR 2[rsp], sil
	neg	eax
	mov	rdi, r13
	mov	BYTE PTR 3[rsp], dl
	mov	DWORD PTR 4[rsp], eax
	call	mutex_lock@PLT
	mov	eax, DWORD PTR IPMI_NUM_CHANNELS[rip]
	test	eax, eax
	jle	.L2
	xor	r14d, r14d
	xor	r15d, r15d
	mov	ebp, 1
	jmp	.L4
	.p2align 4,,10
	.p2align 3
.L3:
	add	r14d, 1
	cmp	DWORD PTR IPMI_NUM_CHANNELS[rip], r14d
	jle	.L23
.L4:
	mov	eax, ebp
	mov	ecx, r14d
	sal	eax, cl
	test	eax, ebx
	je	.L3
	movzx	edx, BYTE PTR 3[rsp]
	movzx	esi, BYTE PTR 2[rsp]
	mov	ecx, r14d
	mov	rdi, r13
	call	find_cmd_rcvr@PLT
	mov	rdx, rax
	test	rax, rax
	je	.L3
	cmp	QWORD PTR 24[rax], r12
	jne	.L3
	mov	eax, ebx
	mov	DWORD PTR 4[rsp], 0
	not	eax
	and	DWORD PTR [rdx], eax
	jne	.L3
	lea	rdi, 16[rdx]
	mov	QWORD PTR 8[rsp], rdx
	add	r14d, 1
	call	list_del_rcu@PLT
	mov	rdx, QWORD PTR 8[rsp]
	cmp	DWORD PTR IPMI_NUM_CHANNELS[rip], r14d
	mov	QWORD PTR 8[rdx], r15
	mov	r15, rdx
	jg	.L4
	.p2align 4,,10
	.p2align 3
.L23:
	mov	rdi, r13
	call	mutex_unlock@PLT
	xor	eax, eax
	call	synchronize_rcu@PLT
	test	r15, r15
	je	.L1
	.p2align 4,,10
	.p2align 3
.L7:
	mov	rdi, r15
	mov	r15, QWORD PTR 8[r15]
	call	kfree@PLT
	test	r15, r15
	jne	.L7
.L1:
	mov	eax, DWORD PTR 4[rsp]
	add	rsp, 24
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	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
	ret
	.p2align 4,,10
	.p2align 3
.L2:
	.cfi_restore_state
	mov	rdi, r13
	call	mutex_unlock@PLT
	xor	eax, eax
	call	synchronize_rcu@PLT
	jmp	.L1
	.cfi_endproc
.LFE0:
	.size	ipmi_unregister_for_cmd, .-ipmi_unregister_for_cmd
	.comm	IPMI_NUM_CHANNELS,4,4
	.comm	ENOENT,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_ipmi_msghandler.c_ipmi_unregister_for_cmd.c"
	.text
	.align	2
	.global	ipmi_unregister_for_cmd
	.syntax unified
	.arm
	.fpu softvfp
	.type	ipmi_unregister_for_cmd, %function
ipmi_unregister_for_cmd:
	@ args = 0, pretend = 0, frame = 16
	@ frame_needed = 0, uses_anonymous_args = 0
	mov	ip, r0
	push	{r4, r5, r6, r7, r8, r9, r10, fp, lr}
	ldr	r0, .L25
	sub	sp, sp, #20
	ldr	fp, [ip]
	str	ip, [sp, #8]
	ldr	ip, [r0]
	ldr	r6, .L25+4
	mov	r0, fp
	mov	r5, r3
	rsb	r3, ip, #0
	str	r3, [sp]
	mov	r9, r1
	mov	r10, r2
	bl	mutex_lock
	ldr	r3, [r6]
	cmp	r3, #0
	ble	.L2
	mov	r8, #0
	mvn	r3, r5
	mov	r4, r10
	mov	r7, #1
	ldr	r10, [sp, #8]
	str	r3, [sp, #12]
	str	r8, [sp, #4]
	b	.L4
.L3:
	ldr	r3, [r6]
	add	r8, r8, #1
	cmp	r3, r8
	ble	.L24
.L4:
	ands	r3, r5, r7, lsl r8
	beq	.L3
	mov	r3, r8
	mov	r2, r4
	mov	r1, r9
	mov	r0, fp
	bl	find_cmd_rcvr
	subs	r3, r0, #0
	beq	.L3
	ldr	r1, [r3, #12]
	cmp	r1, r10
	bne	.L3
	ldr	r1, [r3]
	ldr	r2, [sp, #12]
	and	r1, r1, r2
	cmp	r1, #0
	str	r1, [r3]
	movne	r3, #0
	strne	r3, [sp]
	bne	.L3
	add	r0, r3, #8
	str	r3, [sp, #8]
	str	r1, [sp]
	bl	list_del_rcu
	ldmib	sp, {r2, r3}
	str	r2, [r3, #4]
	str	r3, [sp, #4]
	ldr	r3, [r6]
	add	r8, r8, #1
	cmp	r3, r8
	bgt	.L4
.L24:
	ldr	r4, [sp, #4]
	mov	r0, fp
	bl	mutex_unlock
	bl	synchronize_rcu
	cmp	r4, #0
	beq	.L1
.L7:
	mov	r0, r4
	ldr	r4, [r4, #4]
	bl	kfree
	cmp	r4, #0
	bne	.L7
.L1:
	ldr	r0, [sp]
	add	sp, sp, #20
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, r10, fp, pc}
.L2:
	mov	r0, fp
	bl	mutex_unlock
	bl	synchronize_rcu
	ldr	r0, [sp]
	add	sp, sp, #20
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, r10, fp, pc}
.L26:
	.align	2
.L25:
	.word	ENOENT
	.word	IPMI_NUM_CHANNELS
	.size	ipmi_unregister_for_cmd, .-ipmi_unregister_for_cmd
	.comm	IPMI_NUM_CHANNELS,4,4
	.comm	ENOENT,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
