	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ath10k_ahb_prepare_device
_ath10k_ahb_prepare_device:             ## @ath10k_ahb_prepare_device
	.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	%rdi, %r14
	callq	_ath10k_ahb_clock_enable
	testl	%eax, %eax
	je	LBB0_2
## %bb.1:
	movl	%eax, %ebx
	leaq	L_.str(%rip), %rsi
	movq	%r14, %rdi
	callq	_ath10k_err
	jmp	LBB0_7
LBB0_2:
	movq	_ATH10K_AHB_GCC_FEPLL_PLL_DIV@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r14, %rdi
	callq	_ath10k_ahb_gcc_read32
	movq	_ATH10K_AHB_WIFI_SCRATCH_5_REG@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	movq	%r14, %rdi
	movl	%eax, %edx
	callq	_ath10k_ahb_write32
	movq	%r14, %rdi
	callq	_ath10k_ahb_release_reset
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_6
## %bb.3:
	movq	%r14, %rdi
	callq	_ath10k_ahb_irq_disable
	movq	_FW_INDICATOR_ADDRESS@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_FW_IND_HOST_READY@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r14, %rdi
	callq	_ath10k_ahb_write32
	movq	%r14, %rdi
	callq	_ath10k_pci_wait_for_target_init
	testl	%eax, %eax
	je	LBB0_4
## %bb.5:
	movl	%eax, %ebx
	movq	%r14, %rdi
	callq	_ath10k_ahb_halt_chip
LBB0_6:
	movq	%r14, %rdi
	callq	_ath10k_ahb_clock_disable
LBB0_7:
	movl	%ebx, %eax
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
LBB0_4:
	xorl	%ebx, %ebx
	jmp	LBB0_7
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"failed to enable clocks\n"

	.comm	_ATH10K_AHB_GCC_FEPLL_PLL_DIV,4,2 ## @ATH10K_AHB_GCC_FEPLL_PLL_DIV
	.comm	_ATH10K_AHB_WIFI_SCRATCH_5_REG,4,2 ## @ATH10K_AHB_WIFI_SCRATCH_5_REG
	.comm	_FW_INDICATOR_ADDRESS,4,2       ## @FW_INDICATOR_ADDRESS
	.comm	_FW_IND_HOST_READY,4,2          ## @FW_IND_HOST_READY
	.no_dead_strip	_ath10k_ahb_prepare_device
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ath10k_ahb_prepare_device
_ath10k_ahb_prepare_device:             ; @ath10k_ahb_prepare_device
	.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
	bl	_ath10k_ahb_clock_enable
	cbz	w0, LBB0_2
; %bb.1:
	mov	x20, x0
Lloh0:
	adrp	x1, l_.str@PAGE
Lloh1:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x19
	bl	_ath10k_err
	b	LBB0_6
LBB0_2:
Lloh2:
	adrp	x8, _ATH10K_AHB_GCC_FEPLL_PLL_DIV@GOTPAGE
Lloh3:
	ldr	x8, [x8, _ATH10K_AHB_GCC_FEPLL_PLL_DIV@GOTPAGEOFF]
Lloh4:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_ath10k_ahb_gcc_read32
	mov	x2, x0
Lloh5:
	adrp	x8, _ATH10K_AHB_WIFI_SCRATCH_5_REG@GOTPAGE
Lloh6:
	ldr	x8, [x8, _ATH10K_AHB_WIFI_SCRATCH_5_REG@GOTPAGEOFF]
Lloh7:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_ath10k_ahb_write32
	mov	x0, x19
	bl	_ath10k_ahb_release_reset
	mov	x20, x0
	cbnz	w0, LBB0_5
; %bb.3:
	mov	x0, x19
	bl	_ath10k_ahb_irq_disable
Lloh8:
	adrp	x8, _FW_INDICATOR_ADDRESS@GOTPAGE
Lloh9:
	ldr	x8, [x8, _FW_INDICATOR_ADDRESS@GOTPAGEOFF]
Lloh10:
	ldr	w1, [x8]
Lloh11:
	adrp	x8, _FW_IND_HOST_READY@GOTPAGE
Lloh12:
	ldr	x8, [x8, _FW_IND_HOST_READY@GOTPAGEOFF]
Lloh13:
	ldr	w2, [x8]
	mov	x0, x19
	bl	_ath10k_ahb_write32
	mov	x0, x19
	bl	_ath10k_pci_wait_for_target_init
	mov	x20, x0
	cbz	w0, LBB0_6
; %bb.4:
	mov	x0, x19
	bl	_ath10k_ahb_halt_chip
LBB0_5:
	mov	x0, x19
	bl	_ath10k_ahb_clock_disable
LBB0_6:
	mov	x0, x20
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"failed to enable clocks\n"

	.comm	_ATH10K_AHB_GCC_FEPLL_PLL_DIV,4,2 ; @ATH10K_AHB_GCC_FEPLL_PLL_DIV
	.comm	_ATH10K_AHB_WIFI_SCRATCH_5_REG,4,2 ; @ATH10K_AHB_WIFI_SCRATCH_5_REG
	.comm	_FW_INDICATOR_ADDRESS,4,2       ; @FW_INDICATOR_ADDRESS
	.comm	_FW_IND_HOST_READY,4,2          ; @FW_IND_HOST_READY
	.no_dead_strip	_ath10k_ahb_prepare_device
.subsections_via_symbols
