	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ath10k_download_fw
_ath10k_download_fw:                    ## @ath10k_download_fw
	.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
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %rbx
	movl	8(%rdi), %r14d
	movq	16(%rdi), %rsi
	movq	(%rsi), %r15
	movl	8(%rsi), %r12d
	callq	_ath10k_swap_code_seg_configure
	testl	%eax, %eax
	je	LBB0_3
## %bb.1:
	movl	%eax, %r13d
	leaq	L_.str(%rip), %rsi
	movq	%rbx, %rdi
	movl	%eax, %edx
	callq	_ath10k_err
LBB0_2:
	movl	%r13d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_3:
	movq	_ATH10K_DBG_BOOT@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str.1(%rip), %rdx
	movq	%rbx, %rdi
	movq	%r15, %rcx
	movl	%r12d, %r8d
	callq	_ath10k_dbg
	cmpq	$0, (%rbx)
	je	LBB0_7
## %bb.4:
	movq	%rbx, %rdi
	movl	%r14d, %esi
	movq	%r15, %rdx
	movl	%r12d, %ecx
	callq	_ath10k_hw_diag_fast_download
	testl	%eax, %eax
	je	LBB0_5
## %bb.6:
	leaq	L_.str.2(%rip), %rsi
	movq	%rbx, %rdi
	movl	%eax, %edx
	callq	_ath10k_warn
LBB0_7:
	movq	%rbx, %rdi
	movl	%r14d, %esi
	movq	%r15, %rdx
	movl	%r12d, %ecx
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_ath10k_bmi_fast_download       ## TAILCALL
LBB0_5:
	xorl	%r13d, %r13d
	jmp	LBB0_2
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"failed to configure fw code swap: %d\n"

	.comm	_ATH10K_DBG_BOOT,4,2            ## @ATH10K_DBG_BOOT
L_.str.1:                               ## @.str.1
	.asciz	"boot uploading firmware image %pK len %d\n"

L_.str.2:                               ## @.str.2
	.asciz	"failed to upload firmware via diag ce, trying BMI: %d"

	.no_dead_strip	_ath10k_download_fw
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ath10k_download_fw
_ath10k_download_fw:                    ; @ath10k_download_fw
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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
	mov	x19, x0
	ldr	w20, [x0, #8]
	ldr	x1, [x0, #16]
	ldr	x21, [x1]
	ldr	w22, [x1, #8]
	bl	_ath10k_swap_code_seg_configure
	cbz	w0, LBB0_3
; %bb.1:
	mov	x23, x0
Lloh0:
	adrp	x1, l_.str@PAGE
Lloh1:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x19
	mov	x2, x23
	bl	_ath10k_err
LBB0_2:
	mov	x0, x23
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
LBB0_3:
Lloh2:
	adrp	x8, _ATH10K_DBG_BOOT@GOTPAGE
Lloh3:
	ldr	x8, [x8, _ATH10K_DBG_BOOT@GOTPAGEOFF]
Lloh4:
	ldr	w1, [x8]
Lloh5:
	adrp	x2, l_.str.1@PAGE
Lloh6:
	add	x2, x2, l_.str.1@PAGEOFF
	mov	x0, x19
	mov	x3, x21
	mov	x4, x22
	bl	_ath10k_dbg
	ldr	x8, [x19]
	cbz	x8, LBB0_6
; %bb.4:
	mov	x0, x19
	mov	x1, x20
	mov	x2, x21
	mov	x3, x22
	bl	_ath10k_hw_diag_fast_download
	cbz	w0, LBB0_7
; %bb.5:
	mov	x2, x0
Lloh7:
	adrp	x1, l_.str.2@PAGE
Lloh8:
	add	x1, x1, l_.str.2@PAGEOFF
	mov	x0, x19
	bl	_ath10k_warn
LBB0_6:
	mov	x0, x19
	mov	x1, x20
	mov	x2, x21
	mov	x3, x22
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	b	_ath10k_bmi_fast_download
LBB0_7:
	mov	w23, #0
	b	LBB0_2
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpAdd	Lloh7, Lloh8
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"failed to configure fw code swap: %d\n"

	.comm	_ATH10K_DBG_BOOT,4,2            ; @ATH10K_DBG_BOOT
l_.str.1:                               ; @.str.1
	.asciz	"boot uploading firmware image %pK len %d\n"

l_.str.2:                               ; @.str.2
	.asciz	"failed to upload firmware via diag ce, trying BMI: %d"

	.no_dead_strip	_ath10k_download_fw
.subsections_via_symbols
