	.file	"extr_mac_esp.c_esp_mac_remove.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.type	esp_mac_remove, @function
esp_mac_remove:
.LFB0:
	.cfi_startproc
	endbr64
	push	r13
	.cfi_def_cfa_offset 16
	.cfi_offset 13, -16
	push	r12
	.cfi_def_cfa_offset 24
	.cfi_offset 12, -24
	mov	r12, rdi
	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
	call	platform_get_drvdata@PLT
	mov	rbx, QWORD PTR [rax]
	mov	rbp, rax
	mov	rax, QWORD PTR [rbx]
	mov	rdi, rbx
	mov	r13d, DWORD PTR [rax]
	call	scsi_esp_unregister@PLT
	lea	rdi, esp_chips_lock[rip]
	call	spin_lock@PLT
	mov	rax, QWORD PTR esp_chips[rip]
	mov	rdx, QWORD PTR [r12]
	lea	rdi, esp_chips_lock[rip]
	test	rdx, rdx
	lea	rcx, 8[rax]
	mov	QWORD PTR [rax+rdx*8], 0
	cmove	rax, rcx
	cmp	QWORD PTR [rax], 0
	je	.L7
	call	spin_unlock@PLT
.L4:
	mov	rdi, rbp
	call	kfree@PLT
	mov	rdi, QWORD PTR 8[rbx]
	call	kfree@PLT
	mov	rdi, QWORD PTR [rbx]
	call	scsi_host_put@PLT
	add	rsp, 8
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	xor	eax, eax
	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
.L7:
	.cfi_restore_state
	call	spin_unlock@PLT
	xor	esi, esi
	mov	edi, r13d
	call	free_irq@PLT
	jmp	.L4
	.cfi_endproc
.LFE0:
	.size	esp_mac_remove, .-esp_mac_remove
	.comm	esp_chips_lock,4,4
	.comm	esp_chips,8,8
	.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_mac_esp.c_esp_mac_remove.c"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	esp_mac_remove, %function
esp_mac_remove:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, lr}
	mov	r6, r0
	bl	platform_get_drvdata
	ldr	r4, [r0]
	mov	r5, r0
	ldr	r3, [r4]
	mov	r0, r4
	ldr	r7, [r3]
	bl	scsi_esp_unregister
	ldr	r0, .L8
	bl	spin_lock
	mov	r1, #0
	ldr	r3, .L8+4
	ldr	r2, [r6]
	ldr	r3, [r3]
	cmp	r2, r1
	str	r1, [r3, r2, lsl #2]
	addeq	r3, r3, #4
	ldr	r6, [r3]
	ldr	r0, .L8
	cmp	r6, #0
	beq	.L7
	bl	spin_unlock
.L4:
	mov	r0, r5
	bl	kfree
	ldr	r0, [r4, #4]
	bl	kfree
	ldr	r0, [r4]
	bl	scsi_host_put
	mov	r0, #0
	pop	{r4, r5, r6, r7, r8, pc}
.L7:
	bl	spin_unlock
	mov	r1, r6
	mov	r0, r7
	bl	free_irq
	b	.L4
.L9:
	.align	2
.L8:
	.word	esp_chips_lock
	.word	esp_chips
	.size	esp_mac_remove, .-esp_mac_remove
	.comm	esp_chips_lock,4,4
	.comm	esp_chips,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
