	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ath10k_hw_diag_fast_download   ## -- Begin function ath10k_hw_diag_fast_download
	.p2align	4, 0x90
_ath10k_hw_diag_fast_download:          ## @ath10k_hw_diag_fast_download
	.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
	cmpl	$23, %ecx
	ja	LBB0_2
## %bb.1:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	jmp	LBB0_7
LBB0_2:
	movl	%ecx, %r13d
	movq	%rdx, %rbx
	movq	%rdi, %r14
	movl	16(%rdx), %edi
	callq	___le32_to_cpu
	movq	_BMI_SGMTFILE_MAGIC_NUM@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_5
## %bb.3:
	movq	(%rbx), %rcx
	testq	%rcx, %rcx
	je	LBB0_9
## %bb.4:
	movq	_ATH10K_DBG_BOOT@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str.1(%rip), %rdx
	xorl	%ebx, %ebx
	movq	%r14, %rdi
	xorl	%eax, %eax
	callq	_ath10k_dbg
	jmp	LBB0_6
LBB0_5:
	movq	_ATH10K_DBG_BOOT@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	16(%rbx), %ecx
	leaq	L_.str(%rip), %rdx
	xorl	%ebx, %ebx
	movq	%r14, %rdi
	xorl	%eax, %eax
	callq	_ath10k_dbg
LBB0_6:
	movq	_EINVAL@GOTPCREL(%rip), %rax
LBB0_7:
	subl	(%rax), %ebx
LBB0_8:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_9:
	movq	%r14, -48(%rbp)                 ## 8-byte Spill
	addl	$-24, %r13d
	testl	%r13d, %r13d
	jle	LBB0_23
## %bb.10:
	movq	8(%rbx), %rbx
	jmp	LBB0_11
LBB0_18:                                ##   in Loop: Header=BB0_11 Depth=1
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	movl	%r14d, %esi
	callq	_ath10k_bmi_set_start
	movl	%eax, %ebx
	xorl	%r12d, %r12d
	testl	%ebx, %ebx
	jne	LBB0_8
LBB0_20:                                ##   in Loop: Header=BB0_11 Depth=1
	movslq	%r12d, %rax
	leaq	(%r15,%rax,4), %rbx
	subl	%eax, %r13d
	jle	LBB0_23
LBB0_11:                                ## =>This Inner Loop Header: Depth=1
	cmpl	$16, %r13d
	jb	LBB0_21
## %bb.12:                              ##   in Loop: Header=BB0_11 Depth=1
	movl	12(%rbx), %edi
	callq	___le32_to_cpu
	movq	%rax, %r14
	movl	8(%rbx), %edi
	callq	___le32_to_cpu
	movq	%rax, %r12
	movq	(%rbx), %r15
	addl	$-16, %r13d
	addl	$-128, %eax
	cmpl	$3, %eax
	ja	LBB0_15
## %bb.13:                              ##   in Loop: Header=BB0_11 Depth=1
	leaq	LJTI0_0(%rip), %rcx
	movslq	(%rcx,%rax,4), %rax
	addq	%rcx, %rax
	jmpq	*%rax
LBB0_14:                                ##   in Loop: Header=BB0_11 Depth=1
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	leaq	L_.str.3(%rip), %rsi
	movl	%r12d, %edx
	xorl	%eax, %eax
	callq	_ath10k_warn
	jmp	LBB0_17
LBB0_15:                                ##   in Loop: Header=BB0_11 Depth=1
	cmpl	%r12d, %r13d
	jge	LBB0_19
## %bb.16:                              ##   in Loop: Header=BB0_11 Depth=1
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	leaq	L_.str.4(%rip), %rsi
	movl	%r12d, %edx
	movl	%r13d, %ecx
	xorl	%eax, %eax
	callq	_ath10k_warn
	.p2align	4, 0x90
LBB0_17:                                ##   in Loop: Header=BB0_11 Depth=1
	xorl	%ebx, %ebx
	movq	_EINVAL@GOTPCREL(%rip), %rax
	subl	(%rax), %ebx
	testl	%ebx, %ebx
	je	LBB0_20
	jmp	LBB0_8
LBB0_19:                                ##   in Loop: Header=BB0_11 Depth=1
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	movq	%r15, %rsi
	movl	%r14d, %edx
	movl	%r12d, %ecx
	callq	_ath10k_hw_diag_segment_download
	testl	%eax, %eax
	je	LBB0_20
## %bb.24:
	movl	%eax, %ebx
	leaq	L_.str.5(%rip), %rsi
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	movl	%eax, %edx
	xorl	%eax, %eax
	callq	_ath10k_warn
	jmp	LBB0_8
LBB0_21:
	leaq	L_.str.2(%rip), %rsi
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	movl	%r13d, %edx
	xorl	%eax, %eax
	callq	_ath10k_warn
	movq	_EINVAL@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	testl	%ebx, %ebx
	je	LBB0_23
## %bb.22:
	negl	%ebx
	jmp	LBB0_8
LBB0_23:
	movq	_ATH10K_DBG_BOOT@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str.6(%rip), %rdx
	xorl	%ebx, %ebx
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	xorl	%eax, %eax
	callq	_ath10k_dbg
	jmp	LBB0_8
	.cfi_endproc
	.p2align	2, 0x90
	.data_region jt32
.set L0_0_set_14, LBB0_14-LJTI0_0
.set L0_0_set_23, LBB0_23-LJTI0_0
.set L0_0_set_18, LBB0_18-LJTI0_0
LJTI0_0:
	.long	L0_0_set_14
	.long	L0_0_set_23
	.long	L0_0_set_18
	.long	L0_0_set_14
	.end_data_region
                                        ## -- End function
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_BMI_SGMTFILE_MAGIC_NUM,8,3     ## @BMI_SGMTFILE_MAGIC_NUM
	.comm	_ATH10K_DBG_BOOT,4,2            ## @ATH10K_DBG_BOOT
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Not a supported firmware, magic_num:0x%x\n"

L_.str.1:                               ## @.str.1
	.asciz	"Not a supported firmware, file_flags:0x%x\n"

L_.str.2:                               ## @.str.2
	.asciz	"firmware segment is truncated: %d\n"

L_.str.3:                               ## @.str.3
	.asciz	"firmware has unsupported segment:%d\n"

L_.str.4:                               ## @.str.4
	.asciz	"firmware has invalid segment length, %d > %d\n"

L_.str.5:                               ## @.str.5
	.asciz	"failed to download firmware via diag interface:%d\n"

L_.str.6:                               ## @.str.6
	.asciz	"boot firmware fast diag download successfully.\n"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ath10k_hw_diag_fast_download   ; -- Begin function ath10k_hw_diag_fast_download
	.p2align	2
_ath10k_hw_diag_fast_download:          ; @ath10k_hw_diag_fast_download
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	stp	x28, x27, [sp, #16]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #32]             ; 16-byte Folded Spill
	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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	cmp	w3, #23
	b.ls	LBB0_6
; %bb.1:
	mov	x21, x3
	mov	x20, x2
	mov	x19, x0
	ldr	w0, [x2, #16]
	bl	___le32_to_cpu
Lloh0:
	adrp	x8, _BMI_SGMTFILE_MAGIC_NUM@GOTPAGE
Lloh1:
	ldr	x8, [x8, _BMI_SGMTFILE_MAGIC_NUM@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	cmp	x0, x8
	b.ne	LBB0_4
; %bb.2:
	ldr	x8, [x20]
	cbz	x8, LBB0_9
; %bb.3:
Lloh3:
	adrp	x9, _ATH10K_DBG_BOOT@GOTPAGE
Lloh4:
	ldr	x9, [x9, _ATH10K_DBG_BOOT@GOTPAGEOFF]
Lloh5:
	ldr	w1, [x9]
	str	x8, [sp]
Lloh6:
	adrp	x2, l_.str.1@PAGE
Lloh7:
	add	x2, x2, l_.str.1@PAGEOFF
	b	LBB0_5
LBB0_4:
Lloh8:
	adrp	x8, _ATH10K_DBG_BOOT@GOTPAGE
Lloh9:
	ldr	x8, [x8, _ATH10K_DBG_BOOT@GOTPAGEOFF]
Lloh10:
	ldr	w1, [x8]
	ldr	w8, [x20, #16]
	str	x8, [sp]
Lloh11:
	adrp	x2, l_.str@PAGE
Lloh12:
	add	x2, x2, l_.str@PAGEOFF
LBB0_5:
	mov	x0, x19
	bl	_ath10k_dbg
LBB0_6:
Lloh13:
	adrp	x8, _EINVAL@GOTPAGE
Lloh14:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh15:
	ldr	w8, [x8]
LBB0_7:
	neg	w24, w8
LBB0_8:
	mov	x0, x24
	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
	ldp	x26, x25, [sp, #32]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #112
	ret
LBB0_9:
	sub	w2, w21, #24
	cmp	w2, #1
	b.lt	LBB0_22
; %bb.10:
	ldr	x22, [x20, #8]
Lloh16:
	adrp	x20, l_.str.4@PAGE
Lloh17:
	add	x20, x20, l_.str.4@PAGEOFF
Lloh18:
	adrp	x25, _EINVAL@GOTPAGE
Lloh19:
	ldr	x25, [x25, _EINVAL@GOTPAGEOFF]
Lloh20:
	adrp	x26, lJTI0_0@PAGE
Lloh21:
	add	x26, x26, lJTI0_0@PAGEOFF
Lloh22:
	adrp	x21, l_.str.3@PAGE
Lloh23:
	add	x21, x21, l_.str.3@PAGEOFF
LBB0_11:                                ; =>This Inner Loop Header: Depth=1
	subs	w27, w2, #16
	b.lo	LBB0_21
; %bb.12:                               ;   in Loop: Header=BB0_11 Depth=1
	ldr	w0, [x22, #12]
	bl	___le32_to_cpu
	mov	x24, x0
	ldr	w0, [x22, #8]
	bl	___le32_to_cpu
	mov	x23, x0
	ldr	x22, [x22]
	sub	w8, w23, #128
	cmp	w8, #3
	b.hi	LBB0_15
; %bb.13:                               ;   in Loop: Header=BB0_11 Depth=1
	adr	x9, LBB0_14
	ldrb	w10, [x26, x8]
	add	x9, x9, x10, lsl #2
	br	x9
LBB0_14:                                ;   in Loop: Header=BB0_11 Depth=1
	mov	x0, x19
	mov	x1, x21
	b	LBB0_17
LBB0_15:                                ;   in Loop: Header=BB0_11 Depth=1
	cmp	w27, w23
	b.ge	LBB0_19
; %bb.16:                               ;   in Loop: Header=BB0_11 Depth=1
	str	x27, [sp]
	mov	x0, x19
	mov	x1, x20
LBB0_17:                                ;   in Loop: Header=BB0_11 Depth=1
	mov	x2, x23
	bl	_ath10k_warn
	ldr	w8, [x25]
	neg	w24, w8
	cbz	w24, LBB0_20
	b	LBB0_8
LBB0_18:                                ;   in Loop: Header=BB0_11 Depth=1
	mov	x0, x19
	mov	x1, x24
	bl	_ath10k_bmi_set_start
	mov	x24, x0
	mov	w23, #0
	cbz	w24, LBB0_20
	b	LBB0_8
LBB0_19:                                ;   in Loop: Header=BB0_11 Depth=1
	mov	x0, x19
	mov	x1, x22
	mov	x2, x24
	mov	x3, x23
	bl	_ath10k_hw_diag_segment_download
	cbnz	w0, LBB0_23
LBB0_20:                                ;   in Loop: Header=BB0_11 Depth=1
	add	x22, x22, w23, sxtw #2
	sub	w2, w27, w23
	cmp	w2, #0
	b.gt	LBB0_11
	b	LBB0_22
LBB0_21:
Lloh24:
	adrp	x1, l_.str.2@PAGE
Lloh25:
	add	x1, x1, l_.str.2@PAGEOFF
	mov	x0, x19
	bl	_ath10k_warn
	ldr	w8, [x25]
	cbnz	w8, LBB0_7
LBB0_22:
Lloh26:
	adrp	x8, _ATH10K_DBG_BOOT@GOTPAGE
Lloh27:
	ldr	x8, [x8, _ATH10K_DBG_BOOT@GOTPAGEOFF]
Lloh28:
	ldr	w1, [x8]
Lloh29:
	adrp	x2, l_.str.6@PAGE
Lloh30:
	add	x2, x2, l_.str.6@PAGEOFF
	mov	x0, x19
	bl	_ath10k_dbg
	mov	w24, #0
	b	LBB0_8
LBB0_23:
	mov	x24, x0
Lloh31:
	adrp	x1, l_.str.5@PAGE
Lloh32:
	add	x1, x1, l_.str.5@PAGEOFF
	mov	x0, x19
	mov	x2, x24
	bl	_ath10k_warn
	b	LBB0_8
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpAdd	Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpAdd	Lloh22, Lloh23
	.loh AdrpAdd	Lloh20, Lloh21
	.loh AdrpLdrGot	Lloh18, Lloh19
	.loh AdrpAdd	Lloh16, Lloh17
	.loh AdrpAdd	Lloh24, Lloh25
	.loh AdrpAdd	Lloh29, Lloh30
	.loh AdrpLdrGotLdr	Lloh26, Lloh27, Lloh28
	.loh AdrpAdd	Lloh31, Lloh32
	.cfi_endproc
	.section	__TEXT,__const
lJTI0_0:
	.byte	(LBB0_14-LBB0_14)>>2
	.byte	(LBB0_22-LBB0_14)>>2
	.byte	(LBB0_18-LBB0_14)>>2
	.byte	(LBB0_14-LBB0_14)>>2
                                        ; -- End function
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_BMI_SGMTFILE_MAGIC_NUM,8,3     ; @BMI_SGMTFILE_MAGIC_NUM
	.comm	_ATH10K_DBG_BOOT,4,2            ; @ATH10K_DBG_BOOT
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Not a supported firmware, magic_num:0x%x\n"

l_.str.1:                               ; @.str.1
	.asciz	"Not a supported firmware, file_flags:0x%x\n"

l_.str.2:                               ; @.str.2
	.asciz	"firmware segment is truncated: %d\n"

l_.str.3:                               ; @.str.3
	.asciz	"firmware has unsupported segment:%d\n"

l_.str.4:                               ; @.str.4
	.asciz	"firmware has invalid segment length, %d > %d\n"

l_.str.5:                               ; @.str.5
	.asciz	"failed to download firmware via diag interface:%d\n"

l_.str.6:                               ; @.str.6
	.asciz	"boot firmware fast diag download successfully.\n"

.subsections_via_symbols
