	.file	"extr_hosts.c_scsi_remove_host.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.globl	scsi_remove_host
	.type	scsi_remove_host, @function
scsi_remove_host:
.LFB0:
	.cfi_startproc
	endbr64
	push	r13
	.cfi_def_cfa_offset 16
	.cfi_offset 13, -16
	lea	r13, 12[rdi]
	push	r12
	.cfi_def_cfa_offset 24
	.cfi_offset 12, -24
	xor	r12d, r12d
	push	rbp
	.cfi_def_cfa_offset 32
	.cfi_offset 6, -32
	mov	rbp, rdi
	mov	rdi, r13
	call	mutex_lock@PLT
	mov	edi, DWORD PTR 8[rbp]
	mov	rsi, r12
	call	spin_lock_irqsave@PLT
	mov	esi, DWORD PTR SHOST_CANCEL[rip]
	mov	rdi, rbp
	call	scsi_host_set_state@PLT
	test	rax, rax
	je	.L2
	mov	esi, DWORD PTR SHOST_CANCEL_RECOVERY[rip]
	mov	rdi, rbp
	call	scsi_host_set_state@PLT
	test	rax, rax
	jne	.L15
.L2:
	xor	r12d, r12d
	mov	edi, DWORD PTR 8[rbp]
	mov	rsi, r12
	call	spin_unlock_irqrestore@PLT
	mov	rdi, rbp
	call	scsi_forget_host@PLT
	mov	rdi, r13
	call	mutex_unlock@PLT
	mov	rdi, rbp
	call	scsi_proc_host_rm@PLT
	mov	edi, DWORD PTR 8[rbp]
	mov	rsi, r12
	call	spin_lock_irqsave@PLT
	mov	esi, DWORD PTR SHOST_DEL[rip]
	mov	rdi, rbp
	call	scsi_host_set_state@PLT
	test	rax, rax
	jne	.L16
.L3:
	mov	edi, DWORD PTR 8[rbp]
	xor	r12d, r12d
	mov	rsi, r12
	call	spin_unlock_irqrestore@PLT
	mov	rdi, rbp
	call	transport_unregister_device@PLT
	lea	rdi, 4[rbp]
	call	device_unregister@PLT
	mov	rdi, rbp
	pop	rbp
	.cfi_remember_state
	.cfi_def_cfa_offset 24
	pop	r12
	.cfi_def_cfa_offset 16
	pop	r13
	.cfi_def_cfa_offset 8
	jmp	device_del@PLT
	.p2align 4,,10
	.p2align 3
.L16:
	.cfi_restore_state
	mov	esi, DWORD PTR SHOST_DEL_RECOVERY[rip]
	mov	rdi, rbp
	call	scsi_host_set_state@PLT
	mov	rdi, rax
	call	BUG_ON@PLT
	jmp	.L3
	.p2align 4,,10
	.p2align 3
.L15:
	mov	edi, DWORD PTR 8[rbp]
	mov	rsi, r12
	call	spin_unlock_irqrestore@PLT
	pop	rbp
	.cfi_def_cfa_offset 24
	mov	rdi, r13
	pop	r12
	.cfi_def_cfa_offset 16
	pop	r13
	.cfi_def_cfa_offset 8
	jmp	mutex_unlock@PLT
	.cfi_endproc
.LFE0:
	.size	scsi_remove_host, .-scsi_remove_host
	.comm	SHOST_DEL_RECOVERY,4,4
	.comm	SHOST_DEL,4,4
	.comm	SHOST_CANCEL_RECOVERY,4,4
	.comm	SHOST_CANCEL,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_hosts.c_scsi_remove_host.c"
	.text
	.align	2
	.global	scsi_remove_host
	.syntax unified
	.arm
	.fpu softvfp
	.type	scsi_remove_host, %function
scsi_remove_host:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, lr}
	mov	r4, r0
	add	r5, r0, #12
	mov	r0, r5
	bl	mutex_lock
	mov	r1, #0
	ldr	r0, [r4, #8]
	bl	spin_lock_irqsave
	ldr	r3, .L17
	mov	r0, r4
	ldr	r1, [r3]
	bl	scsi_host_set_state
	cmp	r0, #0
	beq	.L2
	ldr	r3, .L17+4
	mov	r0, r4
	ldr	r1, [r3]
	bl	scsi_host_set_state
	cmp	r0, #0
	bne	.L15
.L2:
	mov	r6, #0
	ldr	r0, [r4, #8]
	mov	r1, r6
	bl	spin_unlock_irqrestore
	mov	r0, r4
	bl	scsi_forget_host
	mov	r0, r5
	bl	mutex_unlock
	mov	r0, r4
	bl	scsi_proc_host_rm
	mov	r1, r6
	ldr	r0, [r4, #8]
	bl	spin_lock_irqsave
	ldr	r3, .L17+8
	mov	r0, r4
	ldr	r1, [r3]
	bl	scsi_host_set_state
	cmp	r0, r6
	bne	.L16
.L3:
	mov	r1, #0
	ldr	r0, [r4, #8]
	bl	spin_unlock_irqrestore
	mov	r0, r4
	bl	transport_unregister_device
	add	r0, r4, #4
	bl	device_unregister
	mov	r0, r4
	pop	{r4, r5, r6, lr}
	b	device_del
.L16:
	ldr	r3, .L17+12
	mov	r0, r4
	ldr	r1, [r3]
	bl	scsi_host_set_state
	bl	BUG_ON
	b	.L3
.L15:
	ldr	r0, [r4, #8]
	mov	r1, #0
	bl	spin_unlock_irqrestore
	mov	r0, r5
	pop	{r4, r5, r6, lr}
	b	mutex_unlock
.L18:
	.align	2
.L17:
	.word	SHOST_CANCEL
	.word	SHOST_CANCEL_RECOVERY
	.word	SHOST_DEL
	.word	SHOST_DEL_RECOVERY
	.size	scsi_remove_host, .-scsi_remove_host
	.comm	SHOST_DEL_RECOVERY,4,4
	.comm	SHOST_DEL,4,4
	.comm	SHOST_CANCEL_RECOVERY,4,4
	.comm	SHOST_CANCEL,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
