	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function hifn_setup_src_desc
_hifn_setup_src_desc:                   ## @hifn_setup_src_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
	subq	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%r8d, %r12d
	movl	%ecx, %r15d
	movq	8(%rdi), %r13
	movq	%rdi, -56(%rbp)                 ## 8-byte Spill
	movl	4(%rdi), %edi
	movq	_PCI_DMA_TODEVICE@GOTPCREL(%rip), %rax
	movl	(%rax), %r8d
	callq	_pci_map_page
	movslq	(%r13), %r14
	movl	%eax, %edi
	callq	___cpu_to_le32
	movq	8(%r13), %rcx
	movq	%r14, %rbx
	shlq	$4, %rbx
	movq	%rax, 8(%rcx,%rbx)
	movq	_HIFN_D_VALID@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movl	%r15d, -44(%rbp)                ## 4-byte Spill
	orl	%r15d, %edi
	movq	_HIFN_D_MASKDONEIRQ@GOTPCREL(%rip), %rax
	orl	(%rax), %edi
	movq	_HIFN_D_LAST@GOTPCREL(%rip), %r15
	movl	%r12d, %eax
	testl	%r12d, %r12d
	je	LBB0_2
## %bb.1:
	movl	(%r15), %eax
LBB0_2:
	orl	%eax, %edi
	callq	___cpu_to_le32
	movq	8(%r13), %rcx
	movq	%rax, (%rcx,%rbx)
	incq	%r14
	movq	_HIFN_D_SRC_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	%r12d, %r12d
	je	LBB0_5
## %bb.4:
	movl	(%r15), %r12d
LBB0_5:
	orl	%r12d, %edi
	callq	___cpu_to_le32
	movq	8(%r13), %rcx
	shlq	$4, %r14
	movq	%rax, (%rcx,%r14)
	xorl	%r14d, %r14d
LBB0_6:
	movl	%r14d, (%r13)
	incl	4(%r13)
	movq	_HIFN_FLAG_SRC_BUSY@GOTPCREL(%rip), %r14
	movl	(%r14), %eax
	movq	-56(%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_S_CTRL_ENA@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%rbx, %rdi
	callq	_hifn_write_1
	movl	(%r14), %eax
	orl	%eax, (%rbx)
LBB0_8:
	movl	-44(%rbp), %eax                 ## 4-byte Reload
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_PCI_DMA_TODEVICE,4,2           ## @PCI_DMA_TODEVICE
	.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_SRC_RSIZE,4,2           ## @HIFN_D_SRC_RSIZE
	.comm	_HIFN_D_JUMP,4,2                ## @HIFN_D_JUMP
	.comm	_HIFN_FLAG_SRC_BUSY,4,2         ## @HIFN_FLAG_SRC_BUSY
	.comm	_HIFN_1_DMA_CSR,4,2             ## @HIFN_1_DMA_CSR
	.comm	_HIFN_DMACSR_S_CTRL_ENA,4,2     ## @HIFN_DMACSR_S_CTRL_ENA
	.no_dead_strip	_hifn_setup_src_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_src_desc
_hifn_setup_src_desc:                   ; @hifn_setup_src_desc
	.cfi_startproc
; %bb.0:
	stp	x28, x27, [sp, #-96]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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
	mov	x21, x4
	mov	x19, x3
	mov	x20, x0
	ldr	x22, [x0, #8]
	ldr	w0, [x0, #4]
Lloh0:
	adrp	x8, _PCI_DMA_TODEVICE@GOTPAGE
Lloh1:
	ldr	x8, [x8, _PCI_DMA_TODEVICE@GOTPAGEOFF]
Lloh2:
	ldr	w4, [x8]
	bl	_pci_map_page
	ldrsw	x24, [x22]
	bl	___cpu_to_le32
	ldr	x8, [x22, #8]
	lsl	x27, x24, #4
	add	x8, x8, x27
	str	x0, [x8, #8]
Lloh3:
	adrp	x25, _HIFN_D_VALID@GOTPAGE
Lloh4:
	ldr	x25, [x25, _HIFN_D_VALID@GOTPAGEOFF]
	ldr	w8, [x25]
	orr	w8, w8, w19
Lloh5:
	adrp	x23, _HIFN_D_MASKDONEIRQ@GOTPAGE
Lloh6:
	ldr	x23, [x23, _HIFN_D_MASKDONEIRQ@GOTPAGEOFF]
	ldr	w9, [x23]
	orr	w8, w8, w9
Lloh7:
	adrp	x26, _HIFN_D_LAST@GOTPAGE
Lloh8:
	ldr	x26, [x26, _HIFN_D_LAST@GOTPAGEOFF]
	ldr	w9, [x26]
	cmp	w21, #0
	csel	w9, wzr, w9, eq
	orr	w0, w8, w9
	bl	___cpu_to_le32
	ldr	x8, [x22, #8]
	str	x0, [x8, x27]
	add	x24, x24, #1
Lloh9:
	adrp	x8, _HIFN_D_SRC_RSIZE@GOTPAGE
Lloh10:
	ldr	x8, [x8, _HIFN_D_SRC_RSIZE@GOTPAGEOFF]
Lloh11:
	ldr	w8, [x8]
	cmp	w24, w8
	b.ne	LBB0_2
; %bb.1:
	ldr	w8, [x25]
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, [x23]
	orr	w8, w8, w9
	ldr	w9, [x26]
	cmp	w21, #0
	csel	w9, wzr, w9, eq
	orr	w0, w8, w9
	bl	___cpu_to_le32
	ldr	x8, [x22, #8]
	lsl	x9, x24, #4
	str	x0, [x8, x9]
	mov	w24, #0
LBB0_2:
	ldr	w8, [x22, #4]
	add	w8, w8, #1
	stp	w24, w8, [x22]
	ldr	w8, [x20]
Lloh15:
	adrp	x21, _HIFN_FLAG_SRC_BUSY@GOTPAGE
Lloh16:
	ldr	x21, [x21, _HIFN_FLAG_SRC_BUSY@GOTPAGEOFF]
	ldr	w9, [x21]
	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_S_CTRL_ENA@GOTPAGE
Lloh21:
	ldr	x8, [x8, _HIFN_DMACSR_S_CTRL_ENA@GOTPAGEOFF]
Lloh22:
	ldr	w2, [x8]
	mov	x0, x20
	bl	_hifn_write_1
	ldr	w8, [x21]
	ldr	w9, [x20]
	orr	w8, w9, w8
	str	w8, [x20]
LBB0_4:
	mov	x0, x19
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp], #96             ; 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_TODEVICE,4,2           ; @PCI_DMA_TODEVICE
	.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_SRC_RSIZE,4,2           ; @HIFN_D_SRC_RSIZE
	.comm	_HIFN_D_JUMP,4,2                ; @HIFN_D_JUMP
	.comm	_HIFN_FLAG_SRC_BUSY,4,2         ; @HIFN_FLAG_SRC_BUSY
	.comm	_HIFN_1_DMA_CSR,4,2             ; @HIFN_1_DMA_CSR
	.comm	_HIFN_DMACSR_S_CTRL_ENA,4,2     ; @HIFN_DMACSR_S_CTRL_ENA
	.no_dead_strip	_hifn_setup_src_desc
.subsections_via_symbols
