	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ath10k_tm_fetch_firmware
_ath10k_tm_fetch_firmware:              ## @ath10k_tm_fetch_firmware
	.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	%rbx
	subq	$120, %rsp
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r15
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -32(%rbp)
	movl	48(%rdi), %edi
	movl	%edi, %eax
	andl	$-2, %eax
	movq	_ATH10K_FW_UTF_FILE_BASE@GOTPCREL(%rip), %rcx
	movl	(%rcx), %r14d
	cmpl	$128, %eax
	jne	LBB0_2
## %bb.1:
	callq	_ath10k_bus_str
	leaq	L_.str(%rip), %rdx
	leaq	-144(%rbp), %rdi
	movl	$100, %esi
	movl	%r14d, %ecx
	movl	%eax, %r8d
	movl	$2, %r9d
	xorl	%eax, %eax
	callq	_scnprintf
	jmp	LBB0_3
LBB0_2:
	leaq	L_.str.1(%rip), %rdx
	leaq	-144(%rbp), %rdi
	movl	$100, %esi
	movl	%r14d, %ecx
	movl	$2, %r8d
	xorl	%eax, %eax
	callq	_scnprintf
LBB0_3:
	leaq	24(%r15), %rbx
	leaq	-144(%rbp), %rsi
	movq	%r15, %rdi
	movq	%rbx, %rdx
	callq	_ath10k_core_fetch_firmware_api_n
	testl	%eax, %eax
	je	LBB0_4
## %bb.5:
	movq	%r15, %rdi
	movq	%rbx, %rsi
	callq	_ath10k_tm_fetch_utf_firmware_api_1
	testl	%eax, %eax
	je	LBB0_6
## %bb.11:
	movl	%eax, %r14d
	leaq	L_.str.3(%rip), %rsi
	movq	%r15, %rdi
	movl	%eax, %edx
	callq	_ath10k_err
	jmp	LBB0_9
LBB0_4:
	leaq	L_.str.2(%rip), %rdx
	jmp	LBB0_7
LBB0_6:
	leaq	L_.str.4(%rip), %rdx
LBB0_7:
	movq	_ATH10K_DBG_TESTMODE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r15, %rdi
	callq	_ath10k_dbg
	movq	16(%r15), %rax
	movq	%rax, 40(%r15)
	xorl	%r14d, %r14d
	cmpq	$0, 32(%r15)
	jne	LBB0_9
## %bb.8:
	leaq	L_.str.5(%rip), %rsi
	movq	%r15, %rdi
	callq	_ath10k_info
	movq	8(%r15), %rax
	movq	%rax, 32(%r15)
	movl	(%r15), %eax
	movl	%eax, 24(%r15)
LBB0_9:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-32(%rbp), %rax
	jne	LBB0_12
## %bb.10:
	movl	%r14d, %eax
	addq	$120, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_12:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"%s-%s-%d.bin"

	.comm	_ATH10K_FW_UTF_FILE_BASE,4,2    ## @ATH10K_FW_UTF_FILE_BASE
L_.str.1:                               ## @.str.1
	.asciz	"%s-%d.bin"

	.comm	_ATH10K_DBG_TESTMODE,4,2        ## @ATH10K_DBG_TESTMODE
L_.str.2:                               ## @.str.2
	.asciz	"testmode using fw utf api 2"

L_.str.3:                               ## @.str.3
	.asciz	"failed to fetch utf firmware binary: %d"

L_.str.4:                               ## @.str.4
	.asciz	"testmode using utf api 1"

L_.str.5:                               ## @.str.5
	.asciz	"utf.bin didn't contain otp binary, taking it from the normal mode firmware"

	.no_dead_strip	_ath10k_tm_fetch_firmware
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ath10k_tm_fetch_firmware
_ath10k_tm_fetch_firmware:              ; @ath10k_tm_fetch_firmware
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #160
	.cfi_def_cfa_offset 160
	stp	x20, x19, [sp, #128]            ; 16-byte Folded Spill
	stp	x29, x30, [sp, #144]            ; 16-byte Folded Spill
	add	x29, sp, #144
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	mov	x19, x0
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	stur	x8, [x29, #-24]
	ldr	w0, [x0, #48]
	and	w8, w0, #0xfffffffe
Lloh3:
	adrp	x9, _ATH10K_FW_UTF_FILE_BASE@GOTPAGE
Lloh4:
	ldr	x9, [x9, _ATH10K_FW_UTF_FILE_BASE@GOTPAGEOFF]
Lloh5:
	ldr	w20, [x9]
	cmp	w8, #128
	b.ne	LBB0_2
; %bb.1:
	bl	_ath10k_bus_str
	mov	x4, x0
	mov	w8, #2
Lloh6:
	adrp	x2, l_.str@PAGE
Lloh7:
	add	x2, x2, l_.str@PAGEOFF
	str	x8, [sp]
	add	x0, sp, #20
	mov	w1, #100
	mov	x3, x20
	b	LBB0_3
LBB0_2:
Lloh8:
	adrp	x2, l_.str.1@PAGE
Lloh9:
	add	x2, x2, l_.str.1@PAGEOFF
	add	x0, sp, #20
	mov	w1, #100
	mov	x3, x20
	mov	w4, #2
LBB0_3:
	bl	_scnprintf
	add	x20, x19, #24
	add	x1, sp, #20
	mov	x0, x19
	mov	x2, x20
	bl	_ath10k_core_fetch_firmware_api_n
	cbz	w0, LBB0_6
; %bb.4:
	mov	x0, x19
	mov	x1, x20
	bl	_ath10k_tm_fetch_utf_firmware_api_1
	cbz	w0, LBB0_7
; %bb.5:
	mov	x20, x0
Lloh10:
	adrp	x1, l_.str.3@PAGE
Lloh11:
	add	x1, x1, l_.str.3@PAGEOFF
	mov	x0, x19
	mov	x2, x20
	bl	_ath10k_err
	b	LBB0_11
LBB0_6:
Lloh12:
	adrp	x2, l_.str.2@PAGE
Lloh13:
	add	x2, x2, l_.str.2@PAGEOFF
	b	LBB0_8
LBB0_7:
Lloh14:
	adrp	x2, l_.str.4@PAGE
Lloh15:
	add	x2, x2, l_.str.4@PAGEOFF
LBB0_8:
Lloh16:
	adrp	x8, _ATH10K_DBG_TESTMODE@GOTPAGE
Lloh17:
	ldr	x8, [x8, _ATH10K_DBG_TESTMODE@GOTPAGEOFF]
Lloh18:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_ath10k_dbg
	ldr	d0, [x19, #16]
	str	d0, [x19, #40]
	ldr	x8, [x19, #32]
	cbz	x8, LBB0_10
; %bb.9:
	mov	w20, #0
	b	LBB0_11
LBB0_10:
Lloh19:
	adrp	x1, l_.str.5@PAGE
Lloh20:
	add	x1, x1, l_.str.5@PAGEOFF
	mov	x0, x19
	bl	_ath10k_info
	mov	w20, #0
	ldr	x8, [x19, #8]
	str	x8, [x19, #32]
	ldr	w8, [x19]
	str	w8, [x19, #24]
LBB0_11:
	ldur	x8, [x29, #-24]
Lloh21:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh22:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh23:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_13
; %bb.12:
	mov	x0, x20
	ldp	x29, x30, [sp, #144]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #128]            ; 16-byte Folded Reload
	add	sp, sp, #160
	ret
LBB0_13:
	bl	___stack_chk_fail
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpAdd	Lloh10, Lloh11
	.loh AdrpAdd	Lloh12, Lloh13
	.loh AdrpAdd	Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpAdd	Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"%s-%s-%d.bin"

	.comm	_ATH10K_FW_UTF_FILE_BASE,4,2    ; @ATH10K_FW_UTF_FILE_BASE
l_.str.1:                               ; @.str.1
	.asciz	"%s-%d.bin"

	.comm	_ATH10K_DBG_TESTMODE,4,2        ; @ATH10K_DBG_TESTMODE
l_.str.2:                               ; @.str.2
	.asciz	"testmode using fw utf api 2"

l_.str.3:                               ; @.str.3
	.asciz	"failed to fetch utf firmware binary: %d"

l_.str.4:                               ; @.str.4
	.asciz	"testmode using utf api 1"

l_.str.5:                               ; @.str.5
	.asciz	"utf.bin didn't contain otp binary, taking it from the normal mode firmware"

	.no_dead_strip	_ath10k_tm_fetch_firmware
.subsections_via_symbols
