	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ath10k_hw_diag_segment_msb_download
_ath10k_hw_diag_segment_msb_download:   ## @ath10k_hw_diag_segment_msb_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
	subq	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rcx, %r15
	movq	%rdx, %r12
	movq	%rsi, -48(%rbp)                 ## 8-byte Spill
	movq	%rdi, %r14
	movq	_REGION_ACCESS_SIZE_MASK@GOTPCREL(%rip), %rax
	movq	(%rax), %rbx
	andq	%rdx, %rbx
	movq	%rdx, %rdi
	callq	_CPU_ADDR_MSB_REGION_VAL
	movq	%r14, %rdi
	movq	%rax, %rsi
	callq	_ath10k_hw_map_target_mem
	leaq	(%rbx,%r15), %rax
	movq	_REGION_ACCESS_SIZE_LIMIT@GOTPCREL(%rip), %rcx
	movq	(%rcx), %r13
	cmpq	%r13, %rax
	jle	LBB0_3
## %bb.1:
	subq	%rbx, %r13
	movslq	%r13d, %rcx
	movq	%r14, %rdi
	movq	%r12, %rsi
	movq	-48(%rbp), %rdx                 ## 8-byte Reload
	movq	%rcx, -56(%rbp)                 ## 8-byte Spill
	callq	_ath10k_hif_diag_write
	testl	%eax, %eax
	je	LBB0_7
## %bb.2:
	movl	%eax, %ebx
	leaq	L_.str(%rip), %rsi
	movq	%r14, %rdi
	movq	-56(%rbp), %rdx                 ## 8-byte Reload
	jmp	LBB0_5
LBB0_3:
	movq	%r14, %rdi
	movq	%r12, %rsi
	movq	-48(%rbp), %rdx                 ## 8-byte Reload
	movq	%r15, %rcx
	callq	_ath10k_hif_diag_write
	testl	%eax, %eax
	je	LBB0_10
## %bb.4:
	movl	%eax, %ebx
	leaq	L_.str.2(%rip), %rsi
	movq	%r14, %rdi
	movq	%r15, %rdx
LBB0_5:
	movq	%r12, %rcx
LBB0_6:
	movl	%ebx, %r8d
	callq	_ath10k_warn
	jmp	LBB0_11
LBB0_7:
	subl	%r13d, %r15d
	movq	%r12, %rdi
	callq	_CPU_ADDR_MSB_REGION_VAL
	leaq	1(%rax), %rsi
	movq	%r14, %rdi
	callq	_ath10k_hw_map_target_mem
	movq	-48(%rbp), %rdx                 ## 8-byte Reload
	addq	-56(%rbp), %rdx                 ## 8-byte Folded Reload
	movq	_REGION_ACCESS_SIZE_MASK@GOTPCREL(%rip), %r13
	movq	(%r13), %rsi
	notq	%rsi
	andq	%r12, %rsi
	movslq	%r15d, %r15
	movq	%r14, %rdi
	movq	%r15, %rcx
	callq	_ath10k_hif_diag_write
	testl	%eax, %eax
	je	LBB0_10
## %bb.8:
	movl	%eax, %ebx
	movq	(%r13), %rcx
	notq	%rcx
	andq	%r12, %rcx
	leaq	L_.str.1(%rip), %rsi
	movq	%r14, %rdi
	movq	%r15, %rdx
	jmp	LBB0_6
LBB0_10:
	xorl	%ebx, %ebx
LBB0_11:
	movq	_DRAM_BASE_ADDRESS@GOTPCREL(%rip), %rax
	movq	(%rax), %rdi
	callq	_CPU_ADDR_MSB_REGION_VAL
	movq	%r14, %rdi
	movq	%rax, %rsi
	callq	_ath10k_hw_map_target_mem
	movl	%ebx, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_REGION_ACCESS_SIZE_MASK,8,3    ## @REGION_ACCESS_SIZE_MASK
	.comm	_REGION_ACCESS_SIZE_LIMIT,8,3   ## @REGION_ACCESS_SIZE_LIMIT
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"failed to download the first %d bytes segment to address:0x%x: %d\n"

L_.str.1:                               ## @.str.1
	.asciz	"failed to download the second %d bytes segment to address:0x%x: %d\n"

L_.str.2:                               ## @.str.2
	.asciz	"failed to download the only %d bytes segment to address:0x%x: %d\n"

	.comm	_DRAM_BASE_ADDRESS,8,3          ## @DRAM_BASE_ADDRESS
	.no_dead_strip	_ath10k_hw_diag_segment_msb_download
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ath10k_hw_diag_segment_msb_download
_ath10k_hw_diag_segment_msb_download:   ; @ath10k_hw_diag_segment_msb_download
	.cfi_startproc
; %bb.0:
	stp	x26, x25, [sp, #-80]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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
	mov	x22, x3
	mov	x20, x2
	mov	x23, x1
	mov	x19, x0
Lloh0:
	adrp	x25, _REGION_ACCESS_SIZE_MASK@GOTPAGE
Lloh1:
	ldr	x25, [x25, _REGION_ACCESS_SIZE_MASK@GOTPAGEOFF]
	ldr	x8, [x25]
	and	x21, x8, x2
	mov	x0, x2
	bl	_CPU_ADDR_MSB_REGION_VAL
	mov	x1, x0
	mov	x0, x19
	bl	_ath10k_hw_map_target_mem
Lloh2:
	adrp	x8, _REGION_ACCESS_SIZE_LIMIT@GOTPAGE
Lloh3:
	ldr	x8, [x8, _REGION_ACCESS_SIZE_LIMIT@GOTPAGEOFF]
Lloh4:
	ldr	x8, [x8]
	add	x9, x21, x22
	cmp	x9, x8
	b.le	LBB0_3
; %bb.1:
	sub	x26, x8, x21
	sxtw	x24, w26
	mov	x0, x19
	mov	x1, x20
	mov	x2, x23
	mov	x3, x24
	bl	_ath10k_hif_diag_write
	cbz	w0, LBB0_8
; %bb.2:
	mov	x21, x0
Lloh5:
	adrp	x1, l_.str@PAGE
Lloh6:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x19
	mov	x2, x24
	b	LBB0_5
LBB0_3:
	mov	x0, x19
	mov	x1, x20
	mov	x2, x23
	mov	x3, x22
	bl	_ath10k_hif_diag_write
	mov	x21, x0
	cbz	w0, LBB0_7
; %bb.4:
Lloh7:
	adrp	x1, l_.str.2@PAGE
Lloh8:
	add	x1, x1, l_.str.2@PAGEOFF
	mov	x0, x19
	mov	x2, x22
LBB0_5:
	mov	x3, x20
LBB0_6:
	mov	x4, x21
	bl	_ath10k_warn
LBB0_7:
Lloh9:
	adrp	x8, _DRAM_BASE_ADDRESS@GOTPAGE
Lloh10:
	ldr	x8, [x8, _DRAM_BASE_ADDRESS@GOTPAGEOFF]
Lloh11:
	ldr	x0, [x8]
	bl	_CPU_ADDR_MSB_REGION_VAL
	mov	x1, x0
	mov	x0, x19
	bl	_ath10k_hw_map_target_mem
	mov	x0, x21
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	ret
LBB0_8:
	sub	w21, w22, w26
	mov	x0, x20
	bl	_CPU_ADDR_MSB_REGION_VAL
	add	x1, x0, #1
	mov	x0, x19
	bl	_ath10k_hw_map_target_mem
	add	x2, x23, x24
	ldr	x8, [x25]
	bic	x1, x20, x8
	sxtw	x22, w21
	mov	x0, x19
	mov	x3, x22
	bl	_ath10k_hif_diag_write
	mov	x21, x0
	cbz	w0, LBB0_7
; %bb.9:
	ldr	x8, [x25]
	bic	x3, x20, x8
Lloh12:
	adrp	x1, l_.str.1@PAGE
Lloh13:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x19
	mov	x2, x22
	b	LBB0_6
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpAdd	Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpAdd	Lloh12, Lloh13
	.cfi_endproc
                                        ; -- End function
	.comm	_REGION_ACCESS_SIZE_MASK,8,3    ; @REGION_ACCESS_SIZE_MASK
	.comm	_REGION_ACCESS_SIZE_LIMIT,8,3   ; @REGION_ACCESS_SIZE_LIMIT
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"failed to download the first %d bytes segment to address:0x%x: %d\n"

l_.str.1:                               ; @.str.1
	.asciz	"failed to download the second %d bytes segment to address:0x%x: %d\n"

l_.str.2:                               ; @.str.2
	.asciz	"failed to download the only %d bytes segment to address:0x%x: %d\n"

	.comm	_DRAM_BASE_ADDRESS,8,3          ; @DRAM_BASE_ADDRESS
	.no_dead_strip	_ath10k_hw_diag_segment_msb_download
.subsections_via_symbols
