	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ath9k_hif_usb_disconnect
_ath9k_hif_usb_disconnect:              ## @ath9k_hif_usb_disconnect
	.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	%r13
	pushq	%r12
	pushq	%rbx
	subq	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r15
	callq	_interface_to_usbdev
	movq	%rax, %rbx
	movq	%r15, %rdi
	callq	_usb_get_intfdata
	movq	%rax, %r13
	movq	%rbx, -56(%rbp)                 ## 8-byte Spill
	movq	(%rbx), %rbx
	movq	_USB_STATE_NOTATTACHED@GOTPCREL(%rip), %rax
	movq	(%rax), %r14
	xorl	%r12d, %r12d
	cmpq	%r14, %rbx
	sete	%al
	testq	%r13, %r13
	je	LBB0_7
## %bb.1:
	movb	%al, -41(%rbp)                  ## 1-byte Spill
	movq	%r13, %rdi
	addq	$8, %rdi
	callq	_wait_for_completion
	movq	_HIF_USB_READY@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, (%r13)
	je	LBB0_3
## %bb.2:
	movb	-41(%rbp), %al                  ## 1-byte Reload
	movb	%al, %r12b
	movl	4(%r13), %edi
	movl	%r12d, %esi
	callq	_ath9k_htc_hw_deinit
	movl	4(%r13), %edi
	callq	_ath9k_htc_hw_free
	movq	%r13, %rdi
	callq	_ath9k_hif_usb_dev_deinit
LBB0_3:
	movq	%r15, %rdi
	xorl	%esi, %esi
	callq	_usb_set_intfdata
	cmpq	%r14, %rbx
	movq	-56(%rbp), %r14                 ## 8-byte Reload
	je	LBB0_6
## %bb.4:
	movq	_HIF_USB_READY@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, (%r13)
	je	LBB0_6
## %bb.5:
	movq	%r14, %rdi
	callq	_ath9k_hif_usb_reboot
LBB0_6:
	movq	%r13, %rdi
	callq	_kfree
	movq	%r14, %rdi
	addq	$8, %rdi
	leaq	L_.str(%rip), %rsi
	callq	_dev_info
	movq	%r14, %rdi
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_usb_put_dev                    ## TAILCALL
LBB0_7:
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_USB_STATE_NOTATTACHED,8,3      ## @USB_STATE_NOTATTACHED
	.comm	_HIF_USB_READY,4,2              ## @HIF_USB_READY
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"ath9k_htc: USB layer deinitialized\n"

	.no_dead_strip	_ath9k_hif_usb_disconnect
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ath9k_hif_usb_disconnect
_ath9k_hif_usb_disconnect:              ; @ath9k_hif_usb_disconnect
	.cfi_startproc
; %bb.0:
	stp	x26, x25, [sp, #-80]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	mov	x21, x0
	bl	_interface_to_usbdev
	mov	x19, x0
	mov	x0, x21
	bl	_usb_get_intfdata
	ldr	x23, [x19]
Lloh0:
	adrp	x8, _USB_STATE_NOTATTACHED@GOTPAGE
Lloh1:
	ldr	x8, [x8, _USB_STATE_NOTATTACHED@GOTPAGEOFF]
Lloh2:
	ldr	x24, [x8]
	cmp	x23, x24
	cset	w22, eq
	cbz	x0, LBB0_7
; %bb.1:
	mov	x20, x0
	add	x0, x0, #8
	bl	_wait_for_completion
	ldr	w8, [x20]
Lloh3:
	adrp	x25, _HIF_USB_READY@GOTPAGE
Lloh4:
	ldr	x25, [x25, _HIF_USB_READY@GOTPAGEOFF]
	ldr	w9, [x25]
	tst	w9, w8
	b.eq	LBB0_3
; %bb.2:
	ldr	w0, [x20, #4]
	mov	x1, x22
	bl	_ath9k_htc_hw_deinit
	ldr	w0, [x20, #4]
	bl	_ath9k_htc_hw_free
	mov	x0, x20
	bl	_ath9k_hif_usb_dev_deinit
LBB0_3:
	mov	x0, x21
	mov	x1, #0
	bl	_usb_set_intfdata
	cmp	x23, x24
	b.eq	LBB0_6
; %bb.4:
	ldr	w8, [x20]
	ldr	w9, [x25]
	tst	w9, w8
	b.eq	LBB0_6
; %bb.5:
	mov	x0, x19
	bl	_ath9k_hif_usb_reboot
LBB0_6:
	mov	x0, x20
	bl	_kfree
	add	x0, x19, #8
Lloh5:
	adrp	x1, l_.str@PAGE
Lloh6:
	add	x1, x1, l_.str@PAGEOFF
	bl	_dev_info
	mov	x0, x19
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	b	_usb_put_dev
LBB0_7:
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpAdd	Lloh5, Lloh6
	.cfi_endproc
                                        ; -- End function
	.comm	_USB_STATE_NOTATTACHED,8,3      ; @USB_STATE_NOTATTACHED
	.comm	_HIF_USB_READY,4,2              ; @HIF_USB_READY
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"ath9k_htc: USB layer deinitialized\n"

	.no_dead_strip	_ath9k_hif_usb_disconnect
.subsections_via_symbols
