	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function airport_detach
_airport_detach:                        ## @airport_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	%r15
	pushq	%r14
	pushq	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r15
	callq	_dev_get_drvdata
	movq	%rax, %r14
	movq	(%rax), %rbx
	cmpq	$0, 24(%rbx)
	je	LBB0_2
## %bb.1:
	movq	%r14, %rdi
	callq	_orinoco_if_del
LBB0_2:
	movq	$0, 24(%rbx)
	cmpq	$0, 8(%rbx)
	je	LBB0_4
## %bb.3:
	movl	16(%rbx), %edi
	movq	%r14, %rsi
	callq	_free_irq
LBB0_4:
	movq	$0, 8(%rbx)
	movq	(%rbx), %rdi
	testq	%rdi, %rdi
	je	LBB0_6
## %bb.5:
	callq	_iounmap
LBB0_6:
	movq	$0, (%rbx)
	movq	%r15, %rdi
	xorl	%esi, %esi
	callq	_macio_release_resource
	movq	_PMAC_FTR_AIRPORT_ENABLE@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	movq	%r15, %rdi
	callq	_macio_get_of_node
	movl	%ebx, %edi
	movl	%eax, %esi
	xorl	%edx, %edx
	xorl	%ecx, %ecx
	callq	_pmac_call_feature
	movl	$1, %edi
	callq	_ssleep
	movq	%r15, %rdi
	xorl	%esi, %esi
	callq	_macio_set_drvdata
	movq	%r14, %rdi
	callq	_free_orinocodev
	xorl	%eax, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_PMAC_FTR_AIRPORT_ENABLE,4,2    ## @PMAC_FTR_AIRPORT_ENABLE
	.no_dead_strip	_airport_detach
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function airport_detach
_airport_detach:                        ; @airport_detach
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	.cfi_offset w21, -40
	.cfi_offset w22, -48
	mov	x20, x0
	bl	_dev_get_drvdata
	mov	x19, x0
	ldr	x21, [x0]
	ldr	x8, [x21, #24]
	cbz	x8, LBB0_2
; %bb.1:
	mov	x0, x19
	bl	_orinoco_if_del
LBB0_2:
	str	xzr, [x21, #24]
	ldr	x8, [x21, #8]
	cbz	x8, LBB0_4
; %bb.3:
	ldr	w0, [x21, #16]
	mov	x1, x19
	bl	_free_irq
LBB0_4:
	str	xzr, [x21, #8]
	ldr	x0, [x21]
	cbz	x0, LBB0_6
; %bb.5:
	bl	_iounmap
LBB0_6:
	str	xzr, [x21]
	mov	x0, x20
	mov	w1, #0
	bl	_macio_release_resource
Lloh0:
	adrp	x8, _PMAC_FTR_AIRPORT_ENABLE@GOTPAGE
Lloh1:
	ldr	x8, [x8, _PMAC_FTR_AIRPORT_ENABLE@GOTPAGEOFF]
Lloh2:
	ldr	w21, [x8]
	mov	x0, x20
	bl	_macio_get_of_node
	mov	x1, x0
	mov	x0, x21
	mov	w2, #0
	mov	w3, #0
	bl	_pmac_call_feature
	mov	w0, #1
	bl	_ssleep
	mov	x0, x20
	mov	x1, #0
	bl	_macio_set_drvdata
	mov	x0, x19
	bl	_free_orinocodev
	mov	w0, #0
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_PMAC_FTR_AIRPORT_ENABLE,4,2    ; @PMAC_FTR_AIRPORT_ENABLE
	.no_dead_strip	_airport_detach
.subsections_via_symbols
