	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ata_port_detach
_ata_port_detach:                       ## @ata_port_detach
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%rbx
	pushq	%rax
	.cfi_offset %rbx, -24
	movq	%rdi, %rbx
	movq	16(%rdi), %rax
	cmpl	$0, (%rax)
	je	LBB0_2
## %bb.1:
	movl	12(%rbx), %edi
	callq	_spin_lock_irqsave
	movq	_ATA_PFLAG_UNLOADING@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	orl	%eax, (%rbx)
	movq	%rbx, %rdi
	callq	_ata_port_schedule_eh
	movl	12(%rbx), %edi
	callq	_spin_unlock_irqrestore
	movq	%rbx, %rdi
	callq	_ata_port_wait_eh
	movq	_ATA_PFLAG_UNLOADED@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	xorl	%edi, %edi
	andl	(%rbx), %eax
	sete	%dil
	callq	_WARN_ON
	leaq	8(%rbx), %rdi
	callq	_cancel_rearming_delayed_work
LBB0_2:
	movl	4(%rbx), %edi
	addq	$8, %rsp
	popq	%rbx
	popq	%rbp
	jmp	_scsi_remove_host               ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_ATA_PFLAG_UNLOADING,4,2        ## @ATA_PFLAG_UNLOADING
	.comm	_ATA_PFLAG_UNLOADED,4,2         ## @ATA_PFLAG_UNLOADED
	.no_dead_strip	_ata_port_detach
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ata_port_detach
_ata_port_detach:                       ; @ata_port_detach
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	mov	x19, x0
	ldr	x8, [x0, #16]
	ldr	w8, [x8]
	cbz	w8, LBB0_2
; %bb.1:
	ldr	w0, [x19, #12]
	bl	_spin_lock_irqsave
Lloh0:
	adrp	x8, _ATA_PFLAG_UNLOADING@GOTPAGE
Lloh1:
	ldr	x8, [x8, _ATA_PFLAG_UNLOADING@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	ldr	w9, [x19]
	orr	w8, w9, w8
	str	w8, [x19]
	mov	x0, x19
	bl	_ata_port_schedule_eh
	ldr	w0, [x19, #12]
	bl	_spin_unlock_irqrestore
	mov	x0, x19
	bl	_ata_port_wait_eh
	ldr	w8, [x19]
Lloh3:
	adrp	x9, _ATA_PFLAG_UNLOADED@GOTPAGE
Lloh4:
	ldr	x9, [x9, _ATA_PFLAG_UNLOADED@GOTPAGEOFF]
Lloh5:
	ldr	w9, [x9]
	tst	w9, w8
	cset	w0, eq
	bl	_WARN_ON
	add	x0, x19, #8
	bl	_cancel_rearming_delayed_work
LBB0_2:
	ldr	w0, [x19, #4]
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	b	_scsi_remove_host
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_ATA_PFLAG_UNLOADING,4,2        ; @ATA_PFLAG_UNLOADING
	.comm	_ATA_PFLAG_UNLOADED,4,2         ; @ATA_PFLAG_UNLOADED
	.no_dead_strip	_ata_port_detach
.subsections_via_symbols
