	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ath10k_download_cal_data
_ath10k_download_cal_data:              ## @ath10k_download_cal_data
	.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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %rbx
	callq	_ath10k_core_pre_cal_config
	xorl	%r14d, %r14d
	testl	%eax, %eax
	je	LBB0_10
## %bb.1:
	movq	_ATH10K_DBG_BOOT@GOTPCREL(%rip), %r12
	movl	(%r12), %esi
	leaq	L_.str(%rip), %rdx
	movq	%rbx, %rdi
	movl	%eax, %ecx
	callq	_ath10k_dbg
	movl	4(%rbx), %esi
	movq	%rbx, %rdi
	callq	_ath10k_download_cal_file
	testl	%eax, %eax
	je	LBB0_2
## %bb.3:
	movl	(%r12), %esi
	leaq	L_.str.1(%rip), %rdx
	movq	%rbx, %rdi
	movl	%eax, %ecx
	callq	_ath10k_dbg
	leaq	L_.str.2(%rip), %rsi
	movq	%rbx, %rdi
	callq	_ath10k_download_cal_dt
	testl	%eax, %eax
	je	LBB0_4
## %bb.5:
	movl	(%r12), %esi
	leaq	L_.str.3(%rip), %rdx
	movq	%rbx, %rdi
	movl	%eax, %ecx
	callq	_ath10k_dbg
	movq	%rbx, %rdi
	callq	_ath10k_download_cal_eeprom
	testl	%eax, %eax
	je	LBB0_6
## %bb.7:
	movl	(%r12), %esi
	leaq	L_.str.4(%rip), %rdx
	movq	%rbx, %rdi
	movl	%eax, %ecx
	callq	_ath10k_dbg
	movq	%rbx, %rdi
	callq	_ath10k_download_and_run_otp
	testl	%eax, %eax
	je	LBB0_8
## %bb.11:
	movl	%eax, %r15d
	leaq	L_.str.5(%rip), %rsi
	movq	%rbx, %rdi
	movl	%eax, %edx
	callq	_ath10k_err
	movl	%r15d, %r14d
	jmp	LBB0_10
LBB0_2:
	movq	_ATH10K_CAL_MODE_FILE@GOTPCREL(%rip), %rax
	jmp	LBB0_9
LBB0_4:
	movq	_ATH10K_CAL_MODE_DT@GOTPCREL(%rip), %rax
	jmp	LBB0_9
LBB0_6:
	movq	_ATH10K_CAL_MODE_EEPROM@GOTPCREL(%rip), %rax
	jmp	LBB0_9
LBB0_8:
	movq	_ATH10K_CAL_MODE_OTP@GOTPCREL(%rip), %rax
LBB0_9:
	movl	(%rax), %edi
	movl	%edi, (%rbx)
	movl	(%r12), %r15d
	callq	_ath10k_cal_mode_str
	leaq	L_.str.6(%rip), %rdx
	movq	%rbx, %rdi
	movl	%r15d, %esi
	movl	%eax, %ecx
	callq	_ath10k_dbg
LBB0_10:
	movl	%r14d, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_ATH10K_DBG_BOOT,4,2            ## @ATH10K_DBG_BOOT
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"pre cal download procedure failed, try cal file: %d\n"

	.comm	_ATH10K_CAL_MODE_FILE,4,2       ## @ATH10K_CAL_MODE_FILE
L_.str.1:                               ## @.str.1
	.asciz	"boot did not find a calibration file, try DT next: %d\n"

L_.str.2:                               ## @.str.2
	.asciz	"qcom,ath10k-calibration-data"

	.comm	_ATH10K_CAL_MODE_DT,4,2         ## @ATH10K_CAL_MODE_DT
L_.str.3:                               ## @.str.3
	.asciz	"boot did not find DT entry, try target EEPROM next: %d\n"

	.comm	_ATH10K_CAL_MODE_EEPROM,4,2     ## @ATH10K_CAL_MODE_EEPROM
L_.str.4:                               ## @.str.4
	.asciz	"boot did not find target EEPROM entry, try OTP next: %d\n"

L_.str.5:                               ## @.str.5
	.asciz	"failed to run otp: %d\n"

	.comm	_ATH10K_CAL_MODE_OTP,4,2        ## @ATH10K_CAL_MODE_OTP
L_.str.6:                               ## @.str.6
	.asciz	"boot using calibration mode %s\n"

	.no_dead_strip	_ath10k_download_cal_data
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ath10k_download_cal_data
_ath10k_download_cal_data:              ; @ath10k_download_cal_data
	.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	x19, x0
	bl	_ath10k_core_pre_cal_config
	cbz	w0, LBB0_11
; %bb.1:
	mov	x3, x0
Lloh0:
	adrp	x21, _ATH10K_DBG_BOOT@GOTPAGE
Lloh1:
	ldr	x21, [x21, _ATH10K_DBG_BOOT@GOTPAGEOFF]
	ldr	w1, [x21]
Lloh2:
	adrp	x2, l_.str@PAGE
Lloh3:
	add	x2, x2, l_.str@PAGEOFF
	mov	x0, x19
	bl	_ath10k_dbg
	ldr	w1, [x19, #4]
	mov	x0, x19
	bl	_ath10k_download_cal_file
	cbz	w0, LBB0_6
; %bb.2:
	mov	x3, x0
	ldr	w1, [x21]
Lloh4:
	adrp	x2, l_.str.1@PAGE
Lloh5:
	add	x2, x2, l_.str.1@PAGEOFF
	mov	x0, x19
	bl	_ath10k_dbg
Lloh6:
	adrp	x1, l_.str.2@PAGE
Lloh7:
	add	x1, x1, l_.str.2@PAGEOFF
	mov	x0, x19
	bl	_ath10k_download_cal_dt
	cbz	w0, LBB0_7
; %bb.3:
	mov	x3, x0
	ldr	w1, [x21]
Lloh8:
	adrp	x2, l_.str.3@PAGE
Lloh9:
	add	x2, x2, l_.str.3@PAGEOFF
	mov	x0, x19
	bl	_ath10k_dbg
	mov	x0, x19
	bl	_ath10k_download_cal_eeprom
	cbz	w0, LBB0_8
; %bb.4:
	mov	x3, x0
	ldr	w1, [x21]
Lloh10:
	adrp	x2, l_.str.4@PAGE
Lloh11:
	add	x2, x2, l_.str.4@PAGEOFF
	mov	x0, x19
	bl	_ath10k_dbg
	mov	x0, x19
	bl	_ath10k_download_and_run_otp
	cbz	w0, LBB0_9
; %bb.5:
	mov	x20, x0
Lloh12:
	adrp	x1, l_.str.5@PAGE
Lloh13:
	add	x1, x1, l_.str.5@PAGEOFF
	mov	x0, x19
	mov	x2, x20
	bl	_ath10k_err
	b	LBB0_12
LBB0_6:
Lloh14:
	adrp	x8, _ATH10K_CAL_MODE_FILE@GOTPAGE
Lloh15:
	ldr	x8, [x8, _ATH10K_CAL_MODE_FILE@GOTPAGEOFF]
	b	LBB0_10
LBB0_7:
Lloh16:
	adrp	x8, _ATH10K_CAL_MODE_DT@GOTPAGE
Lloh17:
	ldr	x8, [x8, _ATH10K_CAL_MODE_DT@GOTPAGEOFF]
	b	LBB0_10
LBB0_8:
Lloh18:
	adrp	x8, _ATH10K_CAL_MODE_EEPROM@GOTPAGE
Lloh19:
	ldr	x8, [x8, _ATH10K_CAL_MODE_EEPROM@GOTPAGEOFF]
	b	LBB0_10
LBB0_9:
Lloh20:
	adrp	x8, _ATH10K_CAL_MODE_OTP@GOTPAGE
Lloh21:
	ldr	x8, [x8, _ATH10K_CAL_MODE_OTP@GOTPAGEOFF]
LBB0_10:
	ldr	w0, [x8]
	str	w0, [x19]
	ldr	w20, [x21]
	bl	_ath10k_cal_mode_str
	mov	x3, x0
Lloh22:
	adrp	x2, l_.str.6@PAGE
Lloh23:
	add	x2, x2, l_.str.6@PAGEOFF
	mov	x0, x19
	mov	x1, x20
	bl	_ath10k_dbg
LBB0_11:
	mov	w20, #0
LBB0_12:
	mov	x0, x20
	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 AdrpAdd	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpAdd	Lloh4, Lloh5
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpAdd	Lloh10, Lloh11
	.loh AdrpAdd	Lloh12, Lloh13
	.loh AdrpLdrGot	Lloh14, Lloh15
	.loh AdrpLdrGot	Lloh16, Lloh17
	.loh AdrpLdrGot	Lloh18, Lloh19
	.loh AdrpLdrGot	Lloh20, Lloh21
	.loh AdrpAdd	Lloh22, Lloh23
	.cfi_endproc
                                        ; -- End function
	.comm	_ATH10K_DBG_BOOT,4,2            ; @ATH10K_DBG_BOOT
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"pre cal download procedure failed, try cal file: %d\n"

	.comm	_ATH10K_CAL_MODE_FILE,4,2       ; @ATH10K_CAL_MODE_FILE
l_.str.1:                               ; @.str.1
	.asciz	"boot did not find a calibration file, try DT next: %d\n"

l_.str.2:                               ; @.str.2
	.asciz	"qcom,ath10k-calibration-data"

	.comm	_ATH10K_CAL_MODE_DT,4,2         ; @ATH10K_CAL_MODE_DT
l_.str.3:                               ; @.str.3
	.asciz	"boot did not find DT entry, try target EEPROM next: %d\n"

	.comm	_ATH10K_CAL_MODE_EEPROM,4,2     ; @ATH10K_CAL_MODE_EEPROM
l_.str.4:                               ; @.str.4
	.asciz	"boot did not find target EEPROM entry, try OTP next: %d\n"

l_.str.5:                               ; @.str.5
	.asciz	"failed to run otp: %d\n"

	.comm	_ATH10K_CAL_MODE_OTP,4,2        ; @ATH10K_CAL_MODE_OTP
l_.str.6:                               ; @.str.6
	.asciz	"boot using calibration mode %s\n"

	.no_dead_strip	_ath10k_download_cal_data
.subsections_via_symbols
