	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function hifn_setup_dst_desc
_hifn_setup_dst_desc:                   ## @hifn_setup_dst_desc
	.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
	movl	%r8d, %r15d
	movl	%ecx, %ebx
	movq	8(%rdi), %r12
	movq	%rdi, -48(%rbp)                 ## 8-byte Spill
	movl	4(%rdi), %edi
	movq	_PCI_DMA_FROMDEVICE@GOTPCREL(%rip), %rax
	movl	(%rax), %r8d
	callq	_pci_map_page
	movslq	(%r12), %r14
	movl	%eax, %edi
	callq	___cpu_to_le32
	movq	8(%r12), %rcx
	movq	%r14, %r13
	shlq	$4, %r13
	movq	%rax, 8(%rcx,%r13)
	movq	_HIFN_D_VALID@GOTPCREL(%rip), %rax
	orl	(%rax), %ebx
	movq	_HIFN_D_MASKDONEIRQ@GOTPCREL(%rip), %rax
	orl	(%rax), %ebx
	movq	_HIFN_D_LAST@GOTPCREL(%rip), %rcx
	movl	%r15d, %eax
	testl	%r15d, %r15d
	je	LBB0_2
## %bb.1:
	movl	(%rcx), %eax
LBB0_2:
	orl	%eax, %ebx
	movl	%ebx, %edi
	callq	___cpu_to_le32
	movq	8(%r12), %rcx
	movq	%rax, (%rcx,%r13)
	incq	%r14
	movq	_HIFN_D_DST_RSIZE@GOTPCREL(%rip), %rax
	cmpl	(%rax), %r14d
	jne	LBB0_6
## %bb.3:
	movq	_HIFN_D_JUMP@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	_HIFN_D_VALID@GOTPCREL(%rip), %rax
	orl	(%rax), %edi
	movq	_HIFN_D_MASKDONEIRQ@GOTPCREL(%rip), %rax
	orl	(%rax), %edi
	testl	%r15d, %r15d
	je	LBB0_5
## %bb.4:
	movq	_HIFN_D_LAST@GOTPCREL(%rip), %rax
	movl	(%rax), %r15d
LBB0_5:
	orl	%r15d, %edi
	callq	___cpu_to_le32
	movq	8(%r12), %rcx
	shlq	$4, %r14
	movq	%rax, (%rcx,%r14)
	xorl	%r14d, %r14d
LBB0_6:
	movl	%r14d, (%r12)
	incl	4(%r12)
	movq	_HIFN_FLAG_DST_BUSY@GOTPCREL(%rip), %r14
	movl	(%r14), %eax
	movq	-48(%rbp), %rbx                 ## 8-byte Reload
	testl	%eax, (%rbx)
	jne	LBB0_8
## %bb.7:
	movq	_HIFN_1_DMA_CSR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_HIFN_DMACSR_D_CTRL_ENA@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%rbx, %rdi
	callq	_hifn_write_1
	movl	(%r14), %eax
	orl	%eax, (%rbx)
LBB0_8:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_PCI_DMA_FROMDEVICE,4,2         ## @PCI_DMA_FROMDEVICE
	.comm	_HIFN_D_VALID,4,2               ## @HIFN_D_VALID
	.comm	_HIFN_D_MASKDONEIRQ,4,2         ## @HIFN_D_MASKDONEIRQ
	.comm	_HIFN_D_LAST,4,2                ## @HIFN_D_LAST
	.comm	_HIFN_D_DST_RSIZE,4,2           ## @HIFN_D_DST_RSIZE
	.comm	_HIFN_D_JUMP,4,2                ## @HIFN_D_JUMP
	.comm	_HIFN_FLAG_DST_BUSY,4,2         ## @HIFN_FLAG_DST_BUSY
	.comm	_HIFN_1_DMA_CSR,4,2             ## @HIFN_1_DMA_CSR
	.comm	_HIFN_DMACSR_D_CTRL_ENA,4,2     ## @HIFN_DMACSR_D_CTRL_ENA
	.no_dead_strip	_hifn_setup_dst_desc
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function hifn_setup_dst_desc
_hifn_setup_dst_desc:                   ; @hifn_setup_dst_desc
	.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	x20, x4
	mov	x21, x3
	mov	x19, x0
	ldr	x22, [x0, #8]
	ldr	w0, [x0, #4]
Lloh0:
	adrp	x8, _PCI_DMA_FROMDEVICE@GOTPAGE
Lloh1:
	ldr	x8, [x8, _PCI_DMA_FROMDEVICE@GOTPAGEOFF]
Lloh2:
	ldr	w4, [x8]
	bl	_pci_map_page
	ldrsw	x23, [x22]
	bl	___cpu_to_le32
	ldr	x8, [x22, #8]
	lsl	x26, x23, #4
	add	x8, x8, x26
	str	x0, [x8, #8]
Lloh3:
	adrp	x24, _HIFN_D_VALID@GOTPAGE
Lloh4:
	ldr	x24, [x24, _HIFN_D_VALID@GOTPAGEOFF]
	ldr	w8, [x24]
	orr	w8, w8, w21
Lloh5:
	adrp	x21, _HIFN_D_MASKDONEIRQ@GOTPAGE
Lloh6:
	ldr	x21, [x21, _HIFN_D_MASKDONEIRQ@GOTPAGEOFF]
	ldr	w9, [x21]
	orr	w8, w8, w9
Lloh7:
	adrp	x25, _HIFN_D_LAST@GOTPAGE
Lloh8:
	ldr	x25, [x25, _HIFN_D_LAST@GOTPAGEOFF]
	ldr	w9, [x25]
	cmp	w20, #0
	csel	w9, wzr, w9, eq
	orr	w0, w8, w9
	bl	___cpu_to_le32
	ldr	x8, [x22, #8]
	str	x0, [x8, x26]
	add	x23, x23, #1
Lloh9:
	adrp	x8, _HIFN_D_DST_RSIZE@GOTPAGE
Lloh10:
	ldr	x8, [x8, _HIFN_D_DST_RSIZE@GOTPAGEOFF]
Lloh11:
	ldr	w8, [x8]
	cmp	w23, w8
	b.ne	LBB0_2
; %bb.1:
	ldr	w8, [x24]
Lloh12:
	adrp	x9, _HIFN_D_JUMP@GOTPAGE
Lloh13:
	ldr	x9, [x9, _HIFN_D_JUMP@GOTPAGEOFF]
Lloh14:
	ldr	w9, [x9]
	orr	w8, w9, w8
	ldr	w9, [x21]
	orr	w8, w8, w9
	ldr	w9, [x25]
	cmp	w20, #0
	csel	w9, wzr, w9, eq
	orr	w0, w8, w9
	bl	___cpu_to_le32
	ldr	x8, [x22, #8]
	lsl	x9, x23, #4
	str	x0, [x8, x9]
	mov	w23, #0
LBB0_2:
	ldr	w8, [x22, #4]
	add	w8, w8, #1
	stp	w23, w8, [x22]
	ldr	w8, [x19]
Lloh15:
	adrp	x20, _HIFN_FLAG_DST_BUSY@GOTPAGE
Lloh16:
	ldr	x20, [x20, _HIFN_FLAG_DST_BUSY@GOTPAGEOFF]
	ldr	w9, [x20]
	tst	w9, w8
	b.ne	LBB0_4
; %bb.3:
Lloh17:
	adrp	x8, _HIFN_1_DMA_CSR@GOTPAGE
Lloh18:
	ldr	x8, [x8, _HIFN_1_DMA_CSR@GOTPAGEOFF]
Lloh19:
	ldr	w1, [x8]
Lloh20:
	adrp	x8, _HIFN_DMACSR_D_CTRL_ENA@GOTPAGE
Lloh21:
	ldr	x8, [x8, _HIFN_DMACSR_D_CTRL_ENA@GOTPAGEOFF]
Lloh22:
	ldr	w2, [x8]
	mov	x0, x19
	bl	_hifn_write_1
	ldr	w8, [x20]
	ldr	w9, [x19]
	orr	w8, w9, w8
	str	w8, [x19]
LBB0_4:
	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	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGot	Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.cfi_endproc
                                        ; -- End function
	.comm	_PCI_DMA_FROMDEVICE,4,2         ; @PCI_DMA_FROMDEVICE
	.comm	_HIFN_D_VALID,4,2               ; @HIFN_D_VALID
	.comm	_HIFN_D_MASKDONEIRQ,4,2         ; @HIFN_D_MASKDONEIRQ
	.comm	_HIFN_D_LAST,4,2                ; @HIFN_D_LAST
	.comm	_HIFN_D_DST_RSIZE,4,2           ; @HIFN_D_DST_RSIZE
	.comm	_HIFN_D_JUMP,4,2                ; @HIFN_D_JUMP
	.comm	_HIFN_FLAG_DST_BUSY,4,2         ; @HIFN_FLAG_DST_BUSY
	.comm	_HIFN_1_DMA_CSR,4,2             ; @HIFN_1_DMA_CSR
	.comm	_HIFN_DMACSR_D_CTRL_ENA,4,2     ; @HIFN_DMACSR_D_CTRL_ENA
	.no_dead_strip	_hifn_setup_dst_desc
.subsections_via_symbols
