	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ath6kl_hif_submit_scat_req     ## -- Begin function ath6kl_hif_submit_scat_req
	.p2align	4, 0x90
_ath6kl_hif_submit_scat_req:            ## @ath6kl_hif_submit_scat_req
	.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
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %rbx
	movq	%rdi, %r14
	testl	%edx, %edx
	je	LBB0_1
## %bb.5:
	movq	_HIF_RD_SYNC_BLOCK_FIX@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 40(%rbx)
	movq	(%r14), %rax
	movl	4(%rax), %r8d
	movl	%r8d, 32(%rbx)
	movq	(%rbx), %rcx
	movq	_ATH6KL_DBG_HIF@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movl	36(%rbx), %edx
	leaq	L_.str.3(%rip), %rax
	movq	%rax, (%rsp)
	leaq	L_.str(%rip), %rsi
	leaq	L_.str.2(%rip), %r9
	callq	_ath6kl_dbg
	movq	(%r14), %rdi
	movq	%rbx, %rsi
	callq	_ath6kl_hif_scat_req_rw
	movl	%eax, %r15d
	movl	%eax, 8(%rbx)
	testl	%eax, %eax
	jne	LBB0_8
## %bb.6:
	xorl	%r15d, %r15d
	cmpq	$0, 16(%rbx)
	je	LBB0_8
## %bb.7:
	movq	%rbx, %rdi
	movl	$1, %esi
	callq	_ath6kl_hif_cp_scat_dma_buf
	movl	%eax, 8(%rbx)
	jmp	LBB0_8
LBB0_1:
	movq	_HIF_WR_ASYNC_BLOCK_INC@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 40(%rbx)
	movq	(%rbx), %rcx
	movq	_HIF_MBOX_WIDTH@GOTPCREL(%rip), %rax
	xorl	%edx, %edx
	cmpq	(%rax), %rcx
	setg	%dl
	movq	(%r14), %rax
	movl	4(%rax,%rdx,4), %r8d
	movl	%r8d, 32(%rbx)
	movq	_ATH6KL_DBG_HIF@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movl	36(%rbx), %edx
	leaq	L_.str.4(%rip), %rax
	movq	%rax, (%rsp)
	leaq	L_.str(%rip), %rsi
	leaq	L_.str.1(%rip), %r9
	callq	_ath6kl_dbg
	cmpq	$0, 16(%rbx)
	je	LBB0_4
## %bb.2:
	xorl	%r15d, %r15d
	movq	%rbx, %rdi
	xorl	%esi, %esi
	callq	_ath6kl_hif_cp_scat_dma_buf
	testl	%eax, %eax
	je	LBB0_4
## %bb.3:
	movl	%eax, 8(%rbx)
	movq	(%r14), %rax
	movl	(%rax), %edi
	movq	%rbx, %rsi
	callq	*24(%rbx)
LBB0_8:
	movl	%r15d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_4:
	movq	(%r14), %rdi
	movq	%rbx, %rsi
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_ath6kl_hif_scat_req_rw         ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_HIF_RD_SYNC_BLOCK_FIX,4,2      ## @HIF_RD_SYNC_BLOCK_FIX
	.comm	_HIF_WR_ASYNC_BLOCK_INC,4,2     ## @HIF_WR_ASYNC_BLOCK_INC
	.comm	_HIF_MBOX_WIDTH,8,3             ## @HIF_MBOX_WIDTH
	.comm	_ATH6KL_DBG_HIF,4,2             ## @ATH6KL_DBG_HIF
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"hif submit scatter request entries %d len %d mbox 0x%x %s %s\n"

L_.str.1:                               ## @.str.1
	.asciz	"async"

L_.str.2:                               ## @.str.2
	.asciz	"sync"

L_.str.3:                               ## @.str.3
	.asciz	"rd"

L_.str.4:                               ## @.str.4
	.asciz	"wr"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ath6kl_hif_submit_scat_req     ; -- Begin function ath6kl_hif_submit_scat_req
	.p2align	2
_ath6kl_hif_submit_scat_req:            ; @ath6kl_hif_submit_scat_req
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	mov	x19, x1
	mov	x20, x0
	cbz	w2, LBB0_4
; %bb.1:
Lloh0:
	adrp	x8, _HIF_RD_SYNC_BLOCK_FIX@GOTPAGE
Lloh1:
	ldr	x8, [x8, _HIF_RD_SYNC_BLOCK_FIX@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	str	w8, [x19, #40]
	ldr	x8, [x20]
	ldr	w4, [x8, #4]
	str	w4, [x19, #32]
	ldr	x3, [x19]
Lloh3:
	adrp	x8, _ATH6KL_DBG_HIF@GOTPAGE
Lloh4:
	ldr	x8, [x8, _ATH6KL_DBG_HIF@GOTPAGEOFF]
Lloh5:
	ldr	w0, [x8]
	ldr	w2, [x19, #36]
Lloh6:
	adrp	x1, l_.str@PAGE
Lloh7:
	add	x1, x1, l_.str@PAGEOFF
Lloh8:
	adrp	x5, l_.str.2@PAGE
Lloh9:
	add	x5, x5, l_.str.2@PAGEOFF
Lloh10:
	adrp	x6, l_.str.3@PAGE
Lloh11:
	add	x6, x6, l_.str.3@PAGEOFF
	bl	_ath6kl_dbg
	ldr	x0, [x20]
	mov	x1, x19
	bl	_ath6kl_hif_scat_req_rw
	str	w0, [x19, #8]
	cbnz	w0, LBB0_8
; %bb.2:
	ldr	x8, [x19, #16]
	cbz	x8, LBB0_7
; %bb.3:
	mov	x0, x19
	mov	w1, #1
	bl	_ath6kl_hif_cp_scat_dma_buf
	mov	x8, x0
	mov	w0, #0
	str	w8, [x19, #8]
	b	LBB0_8
LBB0_4:
Lloh12:
	adrp	x8, _HIF_WR_ASYNC_BLOCK_INC@GOTPAGE
Lloh13:
	ldr	x8, [x8, _HIF_WR_ASYNC_BLOCK_INC@GOTPAGEOFF]
Lloh14:
	ldr	w8, [x8]
	str	w8, [x19, #40]
	ldr	x3, [x19]
Lloh15:
	adrp	x8, _HIF_MBOX_WIDTH@GOTPAGE
Lloh16:
	ldr	x8, [x8, _HIF_MBOX_WIDTH@GOTPAGEOFF]
Lloh17:
	ldr	x8, [x8]
	ldr	x9, [x20]
	mov	w10, #4
	mov	w11, #8
	cmp	x3, x8
	csel	x8, x11, x10, gt
	ldr	w4, [x9, x8]
	str	w4, [x19, #32]
Lloh18:
	adrp	x8, _ATH6KL_DBG_HIF@GOTPAGE
Lloh19:
	ldr	x8, [x8, _ATH6KL_DBG_HIF@GOTPAGEOFF]
Lloh20:
	ldr	w0, [x8]
	ldr	w2, [x19, #36]
Lloh21:
	adrp	x1, l_.str@PAGE
Lloh22:
	add	x1, x1, l_.str@PAGEOFF
Lloh23:
	adrp	x5, l_.str.1@PAGE
Lloh24:
	add	x5, x5, l_.str.1@PAGEOFF
Lloh25:
	adrp	x6, l_.str.4@PAGE
Lloh26:
	add	x6, x6, l_.str.4@PAGEOFF
	bl	_ath6kl_dbg
	ldr	x8, [x19, #16]
	cbz	x8, LBB0_9
; %bb.5:
	mov	x0, x19
	mov	w1, #0
	bl	_ath6kl_hif_cp_scat_dma_buf
	cbz	w0, LBB0_9
; %bb.6:
	str	w0, [x19, #8]
	ldr	x8, [x19, #24]
	ldr	x9, [x20]
	ldr	w0, [x9]
	mov	x1, x19
	blr	x8
LBB0_7:
	mov	w0, #0
LBB0_8:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
LBB0_9:
	ldr	x0, [x20]
	mov	x1, x19
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	b	_ath6kl_hif_scat_req_rw
	.loh AdrpAdd	Lloh10, Lloh11
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh25, Lloh26
	.loh AdrpAdd	Lloh23, Lloh24
	.loh AdrpAdd	Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.cfi_endproc
                                        ; -- End function
	.comm	_HIF_RD_SYNC_BLOCK_FIX,4,2      ; @HIF_RD_SYNC_BLOCK_FIX
	.comm	_HIF_WR_ASYNC_BLOCK_INC,4,2     ; @HIF_WR_ASYNC_BLOCK_INC
	.comm	_HIF_MBOX_WIDTH,8,3             ; @HIF_MBOX_WIDTH
	.comm	_ATH6KL_DBG_HIF,4,2             ; @ATH6KL_DBG_HIF
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"hif submit scatter request entries %d len %d mbox 0x%x %s %s\n"

l_.str.1:                               ; @.str.1
	.asciz	"async"

l_.str.2:                               ; @.str.2
	.asciz	"sync"

l_.str.3:                               ; @.str.3
	.asciz	"rd"

l_.str.4:                               ; @.str.4
	.asciz	"wr"

.subsections_via_symbols
