	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ath9k_hif_usb_firmware_cb
_ath9k_hif_usb_firmware_cb:             ## @ath9k_hif_usb_firmware_cb
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r14
	pushq	%rbx
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	%rsi, %rbx
	testq	%rdi, %rdi
	je	LBB0_1
## %bb.3:
	movq	%rdi, %r14
	movq	24(%rbx), %rdx
	addq	$4, %rdx
	movq	_hif_usb@GOTPCREL(%rip), %rsi
	movq	%rbx, %rdi
	callq	_ath9k_htc_hw_alloc
	movq	%rax, (%rbx)
	testq	%rax, %rax
	je	LBB0_8
## %bb.4:
	movl	4(%r14), %eax
	movl	%eax, 44(%rbx)
	movl	(%r14), %eax
	movl	%eax, 40(%rbx)
	movq	%rbx, %rdi
	callq	_ath9k_hif_usb_dev_init
	testl	%eax, %eax
	jne	LBB0_7
## %bb.5:
	movq	32(%rbx), %rsi
	movq	(%rbx), %rdi
	movq	16(%rbx), %rax
	movl	(%rax), %r8d
	movl	4(%rax), %edx
	movq	24(%rbx), %rax
	movl	(%rax), %ecx
	callq	_ath9k_htc_hw_init
	testl	%eax, %eax
	je	LBB0_11
## %bb.6:
	movq	%rbx, %rdi
	callq	_ath9k_hif_usb_dev_deinit
LBB0_7:
	movq	(%rbx), %rdi
	callq	_ath9k_htc_hw_free
LBB0_8:
	movq	%r14, %rdi
	callq	_release_firmware
	jmp	LBB0_9
LBB0_1:
	movq	%rbx, %rdi
	xorl	%esi, %esi
	callq	_ath9k_hif_request_firmware
	testl	%eax, %eax
	je	LBB0_10
## %bb.2:
	movq	24(%rbx), %rdi
	addq	$4, %rdi
	movl	48(%rbx), %edx
	leaq	L_.str(%rip), %rsi
	callq	_dev_err
LBB0_9:
	movq	%rbx, %rdi
	popq	%rbx
	popq	%r14
	popq	%rbp
	jmp	_ath9k_hif_usb_firmware_fail    ## TAILCALL
LBB0_10:
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
LBB0_11:
	movq	%r14, %rdi
	callq	_release_firmware
	movq	_HIF_USB_READY@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	orl	%eax, 12(%rbx)
	addq	$8, %rbx
	movq	%rbx, %rdi
	popq	%rbx
	popq	%r14
	popq	%rbp
	jmp	_complete_all                   ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"ath9k_htc: Failed to get firmware %s\n"

	.comm	_hif_usb,4,2                    ## @hif_usb
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_HIF_USB_READY,4,2              ## @HIF_USB_READY
	.no_dead_strip	_ath9k_hif_usb_firmware_cb
.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_firmware_cb
_ath9k_hif_usb_firmware_cb:             ; @ath9k_hif_usb_firmware_cb
	.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, x1
	cbz	x0, LBB0_7
; %bb.1:
	mov	x20, x0
	ldr	x8, [x19, #24]
	add	x2, x8, #4
Lloh0:
	adrp	x1, _hif_usb@GOTPAGE
Lloh1:
	ldr	x1, [x1, _hif_usb@GOTPAGEOFF]
	mov	x0, x19
	bl	_ath9k_htc_hw_alloc
	str	x0, [x19]
	cbz	x0, LBB0_6
; %bb.2:
	ldr	d0, [x20]
	str	d0, [x19, #40]
	mov	x0, x19
	bl	_ath9k_hif_usb_dev_init
	cbnz	w0, LBB0_5
; %bb.3:
	ldr	x0, [x19]
	ldp	x9, x1, [x19, #24]
	ldr	x8, [x19, #16]
	ldr	w3, [x9]
	ldp	w4, w2, [x8]
	bl	_ath9k_htc_hw_init
	cbz	w0, LBB0_11
; %bb.4:
	mov	x0, x19
	bl	_ath9k_hif_usb_dev_deinit
LBB0_5:
	ldr	x0, [x19]
	bl	_ath9k_htc_hw_free
LBB0_6:
	mov	x0, x20
	bl	_release_firmware
	b	LBB0_9
LBB0_7:
	mov	x0, x19
	mov	w1, #0
	bl	_ath9k_hif_request_firmware
	cbz	w0, LBB0_10
; %bb.8:
	ldr	x8, [x19, #24]
	add	x0, x8, #4
	ldr	w2, [x19, #48]
Lloh2:
	adrp	x1, l_.str@PAGE
Lloh3:
	add	x1, x1, l_.str@PAGEOFF
	bl	_dev_err
LBB0_9:
	mov	x0, x19
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	b	_ath9k_hif_usb_firmware_fail
LBB0_10:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
LBB0_11:
	mov	x0, x20
	bl	_release_firmware
Lloh4:
	adrp	x8, _HIF_USB_READY@GOTPAGE
Lloh5:
	ldr	x8, [x8, _HIF_USB_READY@GOTPAGEOFF]
Lloh6:
	ldr	w8, [x8]
	ldr	w9, [x19, #12]
	orr	w8, w9, w8
	str	w8, [x19, #12]
	add	x0, x19, #8
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	b	_complete_all
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"ath9k_htc: Failed to get firmware %s\n"

	.comm	_hif_usb,4,2                    ; @hif_usb
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_HIF_USB_READY,4,2              ; @HIF_USB_READY
	.no_dead_strip	_ath9k_hif_usb_firmware_cb
.subsections_via_symbols
