	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ath10k_core_get_board_id_from_otp
_ath10k_core_get_board_id_from_otp:     ## @ath10k_core_get_board_id_from_otp
	.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, %r14
	cmpl	$0, 36(%rdi)
	je	LBB0_2
## %bb.1:
	movl	32(%r14), %r8d
	testl	%r8d, %r8d
	je	LBB0_2
## %bb.3:
	movl	40(%r14), %r15d
	movq	_ATH10K_DBG_BOOT@GOTPCREL(%rip), %r13
	movl	(%r13), %esi
	leaq	L_.str.1(%rip), %rdx
	movq	%r14, %rdi
	movl	%r15d, %ecx
	xorl	%eax, %eax
	callq	_ath10k_dbg
	movl	32(%r14), %ecx
	movl	36(%r14), %edx
	movq	%r14, %rdi
	movl	%r15d, %esi
	callq	_ath10k_bmi_fast_download
	testl	%eax, %eax
	je	LBB0_6
## %bb.4:
	movl	%eax, %ebx
	leaq	L_.str.2(%rip), %rsi
	jmp	LBB0_5
LBB0_2:
	leaq	L_.str(%rip), %rsi
	movq	%r14, %rdi
	callq	_ath10k_warn
	movq	_ENODATA@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
	jmp	LBB0_14
LBB0_6:
	movq	(%r14), %rax
	movq	_ATH10K_PRE_CAL_MODE_DT@GOTPCREL(%rip), %rcx
	movq	_ATH10K_PRE_CAL_MODE_FILE@GOTPCREL(%rip), %rdi
	movq	_BMI_PARAM_GET_FLASH_BOARD_ID@GOTPCREL(%rip), %rdx
	movq	%rdx, %rsi
	cmpq	(%rdi), %rax
	je	LBB0_8
## %bb.7:
	movq	_BMI_PARAM_GET_EEPROM_BOARD_ID@GOTPCREL(%rip), %rsi
LBB0_8:
	cmpq	(%rcx), %rax
	cmoveq	%rdx, %rsi
	movl	(%rsi), %edx
	leaq	-44(%rbp), %rcx
	movq	%r14, %rdi
	movl	%r15d, %esi
	callq	_ath10k_bmi_execute
	testl	%eax, %eax
	je	LBB0_10
## %bb.9:
	movl	%eax, %ebx
	leaq	L_.str.3(%rip), %rsi
LBB0_5:
	movq	%r14, %rdi
	movl	%ebx, %edx
	callq	_ath10k_err
LBB0_14:
	movl	%ebx, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_10:
	movl	-44(%rbp), %edi
	movq	_ATH10K_BMI_BOARD_ID_FROM_OTP@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_MS
	movq	%rax, %r15
	movl	-44(%rbp), %edi
	movq	_ATH10K_BMI_CHIP_ID_FROM_OTP@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_MS
	movq	%rax, %r9
	movl	-44(%rbp), %ecx
	movq	_ATH10K_BMI_EXT_BOARD_ID_SUPPORT@GOTPCREL(%rip), %rax
	movl	(%rax), %r12d
	andl	%ecx, %r12d
	movl	(%r13), %esi
	movl	%r12d, (%rsp)
	leaq	L_.str.4(%rip), %rdx
	xorl	%ebx, %ebx
	movq	%r14, %rdi
	movq	%r15, %r8
	movq	%r9, -56(%rbp)                  ## 8-byte Spill
	xorl	%eax, %eax
	callq	_ath10k_dbg
	movl	%r12d, 8(%r14)
	movq	_ATH10K_BMI_BOARD_ID_STATUS_MASK@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, -44(%rbp)
	jne	LBB0_12
## %bb.11:
	testq	%r15, %r15
	je	LBB0_12
## %bb.13:
	movl	$1, 12(%r14)
	movq	%r15, 24(%r14)
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	movq	%rax, 16(%r14)
	xorl	%ebx, %ebx
	jmp	LBB0_14
LBB0_12:
	movl	(%r13), %esi
	leaq	L_.str.5(%rip), %rdx
	movq	%r14, %rdi
	xorl	%eax, %eax
	callq	_ath10k_dbg
	movq	_EOPNOTSUPP@GOTPCREL(%rip), %rax
	subl	(%rax), %ebx
	jmp	LBB0_14
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"failed to retrieve board id because of invalid otp\n"

	.comm	_ENODATA,4,2                    ## @ENODATA
	.comm	_ATH10K_DBG_BOOT,4,2            ## @ATH10K_DBG_BOOT
L_.str.1:                               ## @.str.1
	.asciz	"boot upload otp to 0x%x len %zd for board id\n"

L_.str.2:                               ## @.str.2
	.asciz	"could not write otp for board id check: %d\n"

	.comm	_ATH10K_PRE_CAL_MODE_DT,8,3     ## @ATH10K_PRE_CAL_MODE_DT
	.comm	_ATH10K_PRE_CAL_MODE_FILE,8,3   ## @ATH10K_PRE_CAL_MODE_FILE
	.comm	_BMI_PARAM_GET_FLASH_BOARD_ID,4,2 ## @BMI_PARAM_GET_FLASH_BOARD_ID
	.comm	_BMI_PARAM_GET_EEPROM_BOARD_ID,4,2 ## @BMI_PARAM_GET_EEPROM_BOARD_ID
L_.str.3:                               ## @.str.3
	.asciz	"could not execute otp for board id check: %d\n"

	.comm	_ATH10K_BMI_BOARD_ID_FROM_OTP,4,2 ## @ATH10K_BMI_BOARD_ID_FROM_OTP
	.comm	_ATH10K_BMI_CHIP_ID_FROM_OTP,4,2 ## @ATH10K_BMI_CHIP_ID_FROM_OTP
	.comm	_ATH10K_BMI_EXT_BOARD_ID_SUPPORT,4,2 ## @ATH10K_BMI_EXT_BOARD_ID_SUPPORT
L_.str.4:                               ## @.str.4
	.asciz	"boot get otp board id result 0x%08x board_id %d chip_id %d ext_bid_support %d\n"

	.comm	_ATH10K_BMI_BOARD_ID_STATUS_MASK,4,2 ## @ATH10K_BMI_BOARD_ID_STATUS_MASK
L_.str.5:                               ## @.str.5
	.asciz	"board id does not exist in otp, ignore it\n"

	.comm	_EOPNOTSUPP,4,2                 ## @EOPNOTSUPP
	.no_dead_strip	_ath10k_core_get_board_id_from_otp
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ath10k_core_get_board_id_from_otp
_ath10k_core_get_board_id_from_otp:     ; @ath10k_core_get_board_id_from_otp
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	stp	x24, x23, [sp, #48]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #64]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #80]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #96]             ; 16-byte Folded Spill
	add	x29, sp, #96
	.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	w8, [x0, #36]
	cbz	w8, LBB0_4
; %bb.1:
	ldr	w8, [x19, #32]
	cbz	w8, LBB0_4
; %bb.2:
	ldr	w20, [x19, #40]
Lloh0:
	adrp	x23, _ATH10K_DBG_BOOT@GOTPAGE
Lloh1:
	ldr	x23, [x23, _ATH10K_DBG_BOOT@GOTPAGEOFF]
	ldr	w1, [x23]
	stp	x20, x8, [sp]
Lloh2:
	adrp	x2, l_.str.1@PAGE
Lloh3:
	add	x2, x2, l_.str.1@PAGEOFF
	mov	x0, x19
	bl	_ath10k_dbg
	ldp	w3, w2, [x19, #32]
	mov	x0, x19
	mov	x1, x20
	bl	_ath10k_bmi_fast_download
	cbz	w0, LBB0_6
; %bb.3:
	mov	x21, x0
Lloh4:
	adrp	x1, l_.str.2@PAGE
Lloh5:
	add	x1, x1, l_.str.2@PAGEOFF
	b	LBB0_8
LBB0_4:
Lloh6:
	adrp	x1, l_.str@PAGE
Lloh7:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x19
	bl	_ath10k_warn
Lloh8:
	adrp	x8, _ENODATA@GOTPAGE
Lloh9:
	ldr	x8, [x8, _ENODATA@GOTPAGEOFF]
LBB0_5:
	ldr	w8, [x8]
	neg	w21, w8
	b	LBB0_9
LBB0_6:
	ldr	x8, [x19]
Lloh10:
	adrp	x9, _ATH10K_PRE_CAL_MODE_DT@GOTPAGE
Lloh11:
	ldr	x9, [x9, _ATH10K_PRE_CAL_MODE_DT@GOTPAGEOFF]
Lloh12:
	ldr	x9, [x9]
Lloh13:
	adrp	x10, _ATH10K_PRE_CAL_MODE_FILE@GOTPAGE
Lloh14:
	ldr	x10, [x10, _ATH10K_PRE_CAL_MODE_FILE@GOTPAGEOFF]
Lloh15:
	ldr	x10, [x10]
	cmp	x8, x10
	ccmp	x8, x9, #4, ne
Lloh16:
	adrp	x8, _BMI_PARAM_GET_FLASH_BOARD_ID@GOTPAGE
Lloh17:
	ldr	x8, [x8, _BMI_PARAM_GET_FLASH_BOARD_ID@GOTPAGEOFF]
Lloh18:
	adrp	x9, _BMI_PARAM_GET_EEPROM_BOARD_ID@GOTPAGE
Lloh19:
	ldr	x9, [x9, _BMI_PARAM_GET_EEPROM_BOARD_ID@GOTPAGEOFF]
	csel	x8, x8, x9, eq
	ldr	w2, [x8]
	add	x3, sp, #44
	mov	x0, x19
	mov	x1, x20
	bl	_ath10k_bmi_execute
	cbz	w0, LBB0_10
; %bb.7:
	mov	x21, x0
Lloh20:
	adrp	x1, l_.str.3@PAGE
Lloh21:
	add	x1, x1, l_.str.3@PAGEOFF
LBB0_8:
	mov	x0, x19
	mov	x2, x21
	bl	_ath10k_err
LBB0_9:
	mov	x0, x21
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #64]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #48]             ; 16-byte Folded Reload
	add	sp, sp, #112
	ret
LBB0_10:
	ldr	w0, [sp, #44]
Lloh22:
	adrp	x8, _ATH10K_BMI_BOARD_ID_FROM_OTP@GOTPAGE
Lloh23:
	ldr	x8, [x8, _ATH10K_BMI_BOARD_ID_FROM_OTP@GOTPAGEOFF]
Lloh24:
	ldr	w1, [x8]
	bl	_MS
	mov	x20, x0
	ldr	w0, [sp, #44]
Lloh25:
	adrp	x8, _ATH10K_BMI_CHIP_ID_FROM_OTP@GOTPAGE
Lloh26:
	ldr	x8, [x8, _ATH10K_BMI_CHIP_ID_FROM_OTP@GOTPAGEOFF]
Lloh27:
	ldr	w1, [x8]
	bl	_MS
	mov	x22, x0
	ldr	w8, [sp, #44]
Lloh28:
	adrp	x9, _ATH10K_BMI_EXT_BOARD_ID_SUPPORT@GOTPAGE
Lloh29:
	ldr	x9, [x9, _ATH10K_BMI_EXT_BOARD_ID_SUPPORT@GOTPAGEOFF]
Lloh30:
	ldr	w9, [x9]
	and	w21, w9, w8
	ldr	w1, [x23]
	stp	x8, x20, [sp]
	stp	x0, x21, [sp, #16]
Lloh31:
	adrp	x2, l_.str.4@PAGE
Lloh32:
	add	x2, x2, l_.str.4@PAGEOFF
	mov	x0, x19
	bl	_ath10k_dbg
	str	w21, [x19, #8]
	ldr	w8, [sp, #44]
Lloh33:
	adrp	x9, _ATH10K_BMI_BOARD_ID_STATUS_MASK@GOTPAGE
Lloh34:
	ldr	x9, [x9, _ATH10K_BMI_BOARD_ID_STATUS_MASK@GOTPAGEOFF]
Lloh35:
	ldr	w9, [x9]
	tst	w9, w8
	b.ne	LBB0_13
; %bb.11:
	cbz	x20, LBB0_13
; %bb.12:
	mov	w21, #0
	mov	w8, #1
	str	w8, [x19, #12]
	stp	x22, x20, [x19, #16]
	b	LBB0_9
LBB0_13:
	ldr	w1, [x23]
Lloh36:
	adrp	x2, l_.str.5@PAGE
Lloh37:
	add	x2, x2, l_.str.5@PAGEOFF
	mov	x0, x19
	bl	_ath10k_dbg
Lloh38:
	adrp	x8, _EOPNOTSUPP@GOTPAGE
Lloh39:
	ldr	x8, [x8, _EOPNOTSUPP@GOTPAGEOFF]
	b	LBB0_5
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh18, Lloh19
	.loh AdrpLdrGot	Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpAdd	Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh33, Lloh34, Lloh35
	.loh AdrpAdd	Lloh31, Lloh32
	.loh AdrpLdrGotLdr	Lloh28, Lloh29, Lloh30
	.loh AdrpLdrGotLdr	Lloh25, Lloh26, Lloh27
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh24
	.loh AdrpLdrGot	Lloh38, Lloh39
	.loh AdrpAdd	Lloh36, Lloh37
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"failed to retrieve board id because of invalid otp\n"

	.comm	_ENODATA,4,2                    ; @ENODATA
	.comm	_ATH10K_DBG_BOOT,4,2            ; @ATH10K_DBG_BOOT
l_.str.1:                               ; @.str.1
	.asciz	"boot upload otp to 0x%x len %zd for board id\n"

l_.str.2:                               ; @.str.2
	.asciz	"could not write otp for board id check: %d\n"

	.comm	_ATH10K_PRE_CAL_MODE_DT,8,3     ; @ATH10K_PRE_CAL_MODE_DT
	.comm	_ATH10K_PRE_CAL_MODE_FILE,8,3   ; @ATH10K_PRE_CAL_MODE_FILE
	.comm	_BMI_PARAM_GET_FLASH_BOARD_ID,4,2 ; @BMI_PARAM_GET_FLASH_BOARD_ID
	.comm	_BMI_PARAM_GET_EEPROM_BOARD_ID,4,2 ; @BMI_PARAM_GET_EEPROM_BOARD_ID
l_.str.3:                               ; @.str.3
	.asciz	"could not execute otp for board id check: %d\n"

	.comm	_ATH10K_BMI_BOARD_ID_FROM_OTP,4,2 ; @ATH10K_BMI_BOARD_ID_FROM_OTP
	.comm	_ATH10K_BMI_CHIP_ID_FROM_OTP,4,2 ; @ATH10K_BMI_CHIP_ID_FROM_OTP
	.comm	_ATH10K_BMI_EXT_BOARD_ID_SUPPORT,4,2 ; @ATH10K_BMI_EXT_BOARD_ID_SUPPORT
l_.str.4:                               ; @.str.4
	.asciz	"boot get otp board id result 0x%08x board_id %d chip_id %d ext_bid_support %d\n"

	.comm	_ATH10K_BMI_BOARD_ID_STATUS_MASK,4,2 ; @ATH10K_BMI_BOARD_ID_STATUS_MASK
l_.str.5:                               ; @.str.5
	.asciz	"board id does not exist in otp, ignore it\n"

	.comm	_EOPNOTSUPP,4,2                 ; @EOPNOTSUPP
	.no_dead_strip	_ath10k_core_get_board_id_from_otp
.subsections_via_symbols
