	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function dfx_hw_dma_cmd_req
_dfx_hw_dma_cmd_req:                    ## @dfx_hw_dma_cmd_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	%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
	movq	%rdi, %r13
	callq	_dfx_hw_adap_state_rd
	movq	_PI_STATE_K_RESET@GOTPCREL(%rip), %rcx
	movq	_DFX_K_OUTSTATE@GOTPCREL(%rip), %r12
	cmpl	(%rcx), %eax
	je	LBB0_11
## %bb.1:
	movq	_PI_STATE_K_HALTED@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %eax
	je	LBB0_11
## %bb.2:
	movq	_PI_STATE_K_DMA_UNAVAIL@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %eax
	je	LBB0_11
## %bb.3:
	movq	_PI_STATE_K_UPGRADE@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %eax
	je	LBB0_11
## %bb.4:
	movq	_PI_CMD_RSP_K_SIZE_MAX@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movq	_PI_ALIGN_K_CMD_RSP_BUFF@GOTPCREL(%rip), %rcx
	cltd
	idivl	(%rcx)
	movq	_PI_RCV_DESCR_V_SEG_LEN@GOTPCREL(%rip), %rcx
	movb	(%rcx), %cl
	shll	%cl, %eax
	movq	_PI_RCV_DESCR_M_SOP@GOTPCREL(%rip), %rcx
	orl	(%rcx), %eax
	cltq
	movq	8(%r13), %rcx
	movq	64(%r13), %rdx
	movq	8(%rdx), %rdx
	movq	%rcx, %rsi
	shlq	$4, %rsi
	movq	%rax, 8(%rdx,%rsi)
	movl	72(%r13), %eax
	movl	%eax, (%rdx,%rsi)
	incq	%rcx
	movq	_PI_CMD_RSP_K_NUM_ENTRIES@GOTPCREL(%rip), %rax
	movslq	(%rax), %rax
	decq	%rax
	andq	%rcx, %rax
	movq	%rax, 8(%r13)
	movq	_PI_PDQ_K_REG_CMD_RSP_PROD@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	(%r13), %edx
	movq	%r13, %rdi
	callq	_dfx_port_write_long
	movq	_PI_XMT_DESCR_M_SOP@GOTPCREL(%rip), %rax
	movq	_PI_XMT_DESCR_M_EOP@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edx
	movq	_PI_CMD_REQ_K_SIZE_MAX@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	movq	_PI_XMT_DESCR_V_SEG_LEN@GOTPCREL(%rip), %rcx
	movb	(%rcx), %cl
	shll	%cl, %esi
	orl	(%rax), %edx
	orl	%edx, %esi
	movslq	%esi, %rax
	movq	40(%r13), %rcx
	movq	64(%r13), %rdx
	movq	(%rdx), %rdx
	movq	%rcx, %rsi
	shlq	$4, %rsi
	movq	%rax, 8(%rdx,%rsi)
	movl	56(%r13), %eax
	movl	%eax, (%rdx,%rsi)
	incq	%rcx
	movq	_PI_CMD_REQ_K_NUM_ENTRIES@GOTPCREL(%rip), %rbx
	movslq	(%rbx), %rax
	decq	%rax
	andq	%rcx, %rax
	movq	%rax, 40(%r13)
	movq	_PI_PDQ_K_REG_CMD_REQ_PROD@GOTPCREL(%rip), %r14
	movl	(%r14), %esi
	movl	32(%r13), %edx
	movq	%r13, %rdi
	callq	_dfx_port_write_long
	movl	$20001, %r15d                   ## imm = 0x4E21
	movq	_DFX_K_HW_TIMEOUT@GOTPCREL(%rip), %r12
	.p2align	4, 0x90
LBB0_5:                                 ## =>This Inner Loop Header: Depth=1
	movq	24(%r13), %rax
	movslq	8(%rax), %rax
	cmpq	%rax, 40(%r13)
	je	LBB0_7
## %bb.6:                               ##   in Loop: Header=BB0_5 Depth=1
	movl	$100, %edi
	callq	_udelay
	decl	%r15d
	cmpl	$1, %r15d
	ja	LBB0_5
	jmp	LBB0_11
LBB0_7:
	movl	32(%r13), %edx
	movl	48(%r13), %eax
	incl	%eax
	movl	(%rbx), %ecx
	decl	%ecx
	andl	%eax, %ecx
	movl	%ecx, 48(%r13)
	movl	(%r14), %esi
	movq	%r13, %rdi
	callq	_dfx_port_write_long
	movl	$20001, %ebx                    ## imm = 0x4E21
	.p2align	4, 0x90
LBB0_8:                                 ## =>This Inner Loop Header: Depth=1
	movq	24(%r13), %rax
	movslq	(%rax), %rax
	cmpq	%rax, 8(%r13)
	je	LBB0_10
## %bb.9:                               ##   in Loop: Header=BB0_8 Depth=1
	movl	$100, %edi
	callq	_udelay
	decl	%ebx
	cmpl	$1, %ebx
	ja	LBB0_8
	jmp	LBB0_11
LBB0_10:
	movl	(%r13), %edx
	movl	16(%r13), %eax
	incl	%eax
	movq	_PI_CMD_RSP_K_NUM_ENTRIES@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	decl	%ecx
	andl	%eax, %ecx
	movl	%ecx, 16(%r13)
	movq	_PI_PDQ_K_REG_CMD_RSP_PROD@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r13, %rdi
	callq	_dfx_port_write_long
	movq	_DFX_K_SUCCESS@GOTPCREL(%rip), %r12
LBB0_11:
	movl	(%r12), %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_PI_STATE_K_RESET,4,2           ## @PI_STATE_K_RESET
	.comm	_PI_STATE_K_HALTED,4,2          ## @PI_STATE_K_HALTED
	.comm	_PI_STATE_K_DMA_UNAVAIL,4,2     ## @PI_STATE_K_DMA_UNAVAIL
	.comm	_PI_STATE_K_UPGRADE,4,2         ## @PI_STATE_K_UPGRADE
	.comm	_DFX_K_OUTSTATE,4,2             ## @DFX_K_OUTSTATE
	.comm	_PI_RCV_DESCR_M_SOP,4,2         ## @PI_RCV_DESCR_M_SOP
	.comm	_PI_CMD_RSP_K_SIZE_MAX,4,2      ## @PI_CMD_RSP_K_SIZE_MAX
	.comm	_PI_ALIGN_K_CMD_RSP_BUFF,4,2    ## @PI_ALIGN_K_CMD_RSP_BUFF
	.comm	_PI_RCV_DESCR_V_SEG_LEN,4,2     ## @PI_RCV_DESCR_V_SEG_LEN
	.comm	_PI_CMD_RSP_K_NUM_ENTRIES,4,2   ## @PI_CMD_RSP_K_NUM_ENTRIES
	.comm	_PI_PDQ_K_REG_CMD_RSP_PROD,4,2  ## @PI_PDQ_K_REG_CMD_RSP_PROD
	.comm	_PI_XMT_DESCR_M_SOP,4,2         ## @PI_XMT_DESCR_M_SOP
	.comm	_PI_XMT_DESCR_M_EOP,4,2         ## @PI_XMT_DESCR_M_EOP
	.comm	_PI_CMD_REQ_K_SIZE_MAX,4,2      ## @PI_CMD_REQ_K_SIZE_MAX
	.comm	_PI_XMT_DESCR_V_SEG_LEN,4,2     ## @PI_XMT_DESCR_V_SEG_LEN
	.comm	_PI_CMD_REQ_K_NUM_ENTRIES,4,2   ## @PI_CMD_REQ_K_NUM_ENTRIES
	.comm	_PI_PDQ_K_REG_CMD_REQ_PROD,4,2  ## @PI_PDQ_K_REG_CMD_REQ_PROD
	.comm	_DFX_K_HW_TIMEOUT,4,2           ## @DFX_K_HW_TIMEOUT
	.comm	_DFX_K_SUCCESS,4,2              ## @DFX_K_SUCCESS
	.no_dead_strip	_dfx_hw_dma_cmd_req
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function dfx_hw_dma_cmd_req
_dfx_hw_dma_cmd_req:                    ; @dfx_hw_dma_cmd_req
	.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	x19, x0
	bl	_dfx_hw_adap_state_rd
Lloh0:
	adrp	x8, _PI_STATE_K_RESET@GOTPAGE
Lloh1:
	ldr	x8, [x8, _PI_STATE_K_RESET@GOTPAGEOFF]
Lloh2:
	adrp	x9, _PI_STATE_K_HALTED@GOTPAGE
Lloh3:
	ldr	x9, [x9, _PI_STATE_K_HALTED@GOTPAGEOFF]
Lloh4:
	ldr	w8, [x8]
Lloh5:
	ldr	w9, [x9]
Lloh6:
	adrp	x10, _PI_STATE_K_DMA_UNAVAIL@GOTPAGE
Lloh7:
	ldr	x10, [x10, _PI_STATE_K_DMA_UNAVAIL@GOTPAGEOFF]
Lloh8:
	adrp	x11, _PI_STATE_K_UPGRADE@GOTPAGE
Lloh9:
	ldr	x11, [x11, _PI_STATE_K_UPGRADE@GOTPAGEOFF]
Lloh10:
	ldr	w10, [x10]
Lloh11:
	ldr	w11, [x11]
	cmp	w0, w8
	ccmp	w0, w9, #4, ne
	ccmp	w0, w10, #4, ne
	ccmp	w0, w11, #4, ne
	b.ne	LBB0_2
; %bb.1:
Lloh12:
	adrp	x22, _DFX_K_OUTSTATE@GOTPAGE
Lloh13:
	ldr	x22, [x22, _DFX_K_OUTSTATE@GOTPAGEOFF]
	b	LBB0_9
LBB0_2:
Lloh14:
	adrp	x8, _PI_RCV_DESCR_M_SOP@GOTPAGE
Lloh15:
	ldr	x8, [x8, _PI_RCV_DESCR_M_SOP@GOTPAGEOFF]
Lloh16:
	adrp	x9, _PI_CMD_RSP_K_SIZE_MAX@GOTPAGE
Lloh17:
	ldr	x9, [x9, _PI_CMD_RSP_K_SIZE_MAX@GOTPAGEOFF]
Lloh18:
	ldr	w8, [x8]
Lloh19:
	ldr	w9, [x9]
Lloh20:
	adrp	x10, _PI_ALIGN_K_CMD_RSP_BUFF@GOTPAGE
Lloh21:
	ldr	x10, [x10, _PI_ALIGN_K_CMD_RSP_BUFF@GOTPAGEOFF]
Lloh22:
	ldr	w10, [x10]
	sdiv	w9, w9, w10
Lloh23:
	adrp	x10, _PI_RCV_DESCR_V_SEG_LEN@GOTPAGE
Lloh24:
	ldr	x10, [x10, _PI_RCV_DESCR_V_SEG_LEN@GOTPAGEOFF]
Lloh25:
	ldr	w10, [x10]
	lsl	w9, w9, w10
	orr	w8, w9, w8
	sxtw	x8, w8
	ldr	x9, [x19, #64]
	ldr	x9, [x9, #8]
	ldr	x10, [x19, #8]
	add	x9, x9, x10, lsl #4
	str	x8, [x9, #8]
	ldr	w8, [x19, #72]
	str	w8, [x9]
	add	x8, x10, #1
Lloh26:
	adrp	x20, _PI_CMD_RSP_K_NUM_ENTRIES@GOTPAGE
Lloh27:
	ldr	x20, [x20, _PI_CMD_RSP_K_NUM_ENTRIES@GOTPAGEOFF]
	ldrsw	x9, [x20]
	sub	x9, x9, #1
	and	x8, x8, x9
	str	x8, [x19, #8]
Lloh28:
	adrp	x21, _PI_PDQ_K_REG_CMD_RSP_PROD@GOTPAGE
Lloh29:
	ldr	x21, [x21, _PI_PDQ_K_REG_CMD_RSP_PROD@GOTPAGEOFF]
	ldr	w1, [x21]
	ldr	w2, [x19]
	mov	x0, x19
	bl	_dfx_port_write_long
Lloh30:
	adrp	x8, _PI_XMT_DESCR_M_SOP@GOTPAGE
Lloh31:
	ldr	x8, [x8, _PI_XMT_DESCR_M_SOP@GOTPAGEOFF]
Lloh32:
	adrp	x9, _PI_XMT_DESCR_M_EOP@GOTPAGE
Lloh33:
	ldr	x9, [x9, _PI_XMT_DESCR_M_EOP@GOTPAGEOFF]
Lloh34:
	ldr	w8, [x8]
Lloh35:
	ldr	w9, [x9]
	orr	w8, w9, w8
Lloh36:
	adrp	x9, _PI_CMD_REQ_K_SIZE_MAX@GOTPAGE
Lloh37:
	ldr	x9, [x9, _PI_CMD_REQ_K_SIZE_MAX@GOTPAGEOFF]
Lloh38:
	ldr	w9, [x9]
Lloh39:
	adrp	x10, _PI_XMT_DESCR_V_SEG_LEN@GOTPAGE
Lloh40:
	ldr	x10, [x10, _PI_XMT_DESCR_V_SEG_LEN@GOTPAGEOFF]
Lloh41:
	ldr	w10, [x10]
	lsl	w9, w9, w10
	orr	w8, w8, w9
	sxtw	x8, w8
	ldr	x9, [x19, #64]
	ldr	x9, [x9]
	ldr	x10, [x19, #40]
	add	x9, x9, x10, lsl #4
	str	x8, [x9, #8]
	ldr	w8, [x19, #56]
	str	w8, [x9]
	add	x8, x10, #1
Lloh42:
	adrp	x23, _PI_CMD_REQ_K_NUM_ENTRIES@GOTPAGE
Lloh43:
	ldr	x23, [x23, _PI_CMD_REQ_K_NUM_ENTRIES@GOTPAGEOFF]
	ldrsw	x9, [x23]
	sub	x9, x9, #1
	and	x8, x8, x9
	str	x8, [x19, #40]
Lloh44:
	adrp	x24, _PI_PDQ_K_REG_CMD_REQ_PROD@GOTPAGE
Lloh45:
	ldr	x24, [x24, _PI_PDQ_K_REG_CMD_REQ_PROD@GOTPAGEOFF]
	ldr	w1, [x24]
	ldr	w2, [x19, #32]
	mov	x0, x19
	bl	_dfx_port_write_long
	mov	w25, #20001
Lloh46:
	adrp	x22, _DFX_K_HW_TIMEOUT@GOTPAGE
Lloh47:
	ldr	x22, [x22, _DFX_K_HW_TIMEOUT@GOTPAGEOFF]
LBB0_3:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x19, #40]
	ldr	x9, [x19, #24]
	ldrsw	x9, [x9, #8]
	cmp	x8, x9
	b.eq	LBB0_5
; %bb.4:                                ;   in Loop: Header=BB0_3 Depth=1
	mov	w0, #100
	bl	_udelay
	sub	w25, w25, #1
	cmp	w25, #1
	b.hi	LBB0_3
	b	LBB0_9
LBB0_5:
	ldr	w8, [x19, #48]
	add	w8, w8, #1
	ldr	w9, [x23]
	sub	w9, w9, #1
	and	w8, w9, w8
	str	w8, [x19, #48]
	ldr	w1, [x24]
	ldr	w2, [x19, #32]
	mov	x0, x19
	bl	_dfx_port_write_long
	mov	w23, #20001
Lloh48:
	adrp	x22, _DFX_K_HW_TIMEOUT@GOTPAGE
Lloh49:
	ldr	x22, [x22, _DFX_K_HW_TIMEOUT@GOTPAGEOFF]
LBB0_6:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x19, #8]
	ldr	x9, [x19, #24]
	ldrsw	x9, [x9]
	cmp	x8, x9
	b.eq	LBB0_8
; %bb.7:                                ;   in Loop: Header=BB0_6 Depth=1
	mov	w0, #100
	bl	_udelay
	sub	w23, w23, #1
	cmp	w23, #1
	b.hi	LBB0_6
	b	LBB0_9
LBB0_8:
	ldr	w8, [x19, #16]
	add	w8, w8, #1
	ldr	w9, [x20]
	sub	w9, w9, #1
	and	w8, w9, w8
	str	w8, [x19, #16]
	ldr	w1, [x21]
	ldr	w2, [x19]
	mov	x0, x19
	bl	_dfx_port_write_long
Lloh50:
	adrp	x22, _DFX_K_SUCCESS@GOTPAGE
Lloh51:
	ldr	x22, [x22, _DFX_K_SUCCESS@GOTPAGEOFF]
LBB0_9:
	ldr	w0, [x22]
	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
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh10
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh4
	.loh AdrpLdrGot	Lloh12, Lloh13
	.loh AdrpLdrGot	Lloh46, Lloh47
	.loh AdrpLdrGot	Lloh44, Lloh45
	.loh AdrpLdrGot	Lloh42, Lloh43
	.loh AdrpLdrGotLdr	Lloh39, Lloh40, Lloh41
	.loh AdrpLdrGotLdr	Lloh36, Lloh37, Lloh38
	.loh AdrpLdrGotLdr	Lloh32, Lloh33, Lloh35
	.loh AdrpLdrGotLdr	Lloh30, Lloh31, Lloh34
	.loh AdrpLdrGot	Lloh28, Lloh29
	.loh AdrpLdrGot	Lloh26, Lloh27
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh19
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh18
	.loh AdrpLdrGot	Lloh48, Lloh49
	.loh AdrpLdrGot	Lloh50, Lloh51
	.cfi_endproc
                                        ; -- End function
	.comm	_PI_STATE_K_RESET,4,2           ; @PI_STATE_K_RESET
	.comm	_PI_STATE_K_HALTED,4,2          ; @PI_STATE_K_HALTED
	.comm	_PI_STATE_K_DMA_UNAVAIL,4,2     ; @PI_STATE_K_DMA_UNAVAIL
	.comm	_PI_STATE_K_UPGRADE,4,2         ; @PI_STATE_K_UPGRADE
	.comm	_DFX_K_OUTSTATE,4,2             ; @DFX_K_OUTSTATE
	.comm	_PI_RCV_DESCR_M_SOP,4,2         ; @PI_RCV_DESCR_M_SOP
	.comm	_PI_CMD_RSP_K_SIZE_MAX,4,2      ; @PI_CMD_RSP_K_SIZE_MAX
	.comm	_PI_ALIGN_K_CMD_RSP_BUFF,4,2    ; @PI_ALIGN_K_CMD_RSP_BUFF
	.comm	_PI_RCV_DESCR_V_SEG_LEN,4,2     ; @PI_RCV_DESCR_V_SEG_LEN
	.comm	_PI_CMD_RSP_K_NUM_ENTRIES,4,2   ; @PI_CMD_RSP_K_NUM_ENTRIES
	.comm	_PI_PDQ_K_REG_CMD_RSP_PROD,4,2  ; @PI_PDQ_K_REG_CMD_RSP_PROD
	.comm	_PI_XMT_DESCR_M_SOP,4,2         ; @PI_XMT_DESCR_M_SOP
	.comm	_PI_XMT_DESCR_M_EOP,4,2         ; @PI_XMT_DESCR_M_EOP
	.comm	_PI_CMD_REQ_K_SIZE_MAX,4,2      ; @PI_CMD_REQ_K_SIZE_MAX
	.comm	_PI_XMT_DESCR_V_SEG_LEN,4,2     ; @PI_XMT_DESCR_V_SEG_LEN
	.comm	_PI_CMD_REQ_K_NUM_ENTRIES,4,2   ; @PI_CMD_REQ_K_NUM_ENTRIES
	.comm	_PI_PDQ_K_REG_CMD_REQ_PROD,4,2  ; @PI_PDQ_K_REG_CMD_REQ_PROD
	.comm	_DFX_K_HW_TIMEOUT,4,2           ; @DFX_K_HW_TIMEOUT
	.comm	_DFX_K_SUCCESS,4,2              ; @DFX_K_SUCCESS
	.no_dead_strip	_dfx_hw_dma_cmd_req
.subsections_via_symbols
