	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function hifn_setup_res_desc
_hifn_setup_res_desc:                   ## @hifn_setup_res_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
	movq	%rdi, %r14
	movq	_HIFN_USED_RESULT@GOTPCREL(%rip), %rax
	movq	_HIFN_D_VALID@GOTPCREL(%rip), %r12
	movl	(%r12), %edi
	orl	(%rax), %edi
	movq	8(%r14), %rbx
	movq	_HIFN_D_LAST@GOTPCREL(%rip), %r15
	orl	(%r15), %edi
	callq	___cpu_to_le32
	movq	(%rbx), %rcx
	movq	16(%rbx), %rdx
	movq	%rax, (%rdx,%rcx,8)
	incq	%rcx
	movq	%rcx, (%rbx)
	movq	_HIFN_D_RES_RSIZE@GOTPCREL(%rip), %r13
	cmpq	(%r13), %rcx
	jne	LBB0_2
## %bb.1:
	movq	_HIFN_D_JUMP@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	orl	(%r12), %edi
	movq	_HIFN_D_MASKDONEIRQ@GOTPCREL(%rip), %rax
	orl	(%rax), %edi
	orl	(%r15), %edi
	callq	___cpu_to_le32
	movq	16(%rbx), %rcx
	movq	(%r13), %rdx
	movq	%rax, (%rcx,%rdx,8)
	movq	$0, (%rbx)
LBB0_2:
	incl	8(%rbx)
	movq	_HIFN_FLAG_RES_BUSY@GOTPCREL(%rip), %rbx
	movl	(%rbx), %eax
	testl	%eax, (%r14)
	jne	LBB0_4
## %bb.3:
	movq	_HIFN_1_DMA_CSR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_HIFN_DMACSR_R_CTRL_ENA@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r14, %rdi
	callq	_hifn_write_1
	movl	(%rbx), %eax
	orl	%eax, (%r14)
LBB0_4:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_HIFN_USED_RESULT,4,2           ## @HIFN_USED_RESULT
	.comm	_HIFN_D_VALID,4,2               ## @HIFN_D_VALID
	.comm	_HIFN_D_LAST,4,2                ## @HIFN_D_LAST
	.comm	_HIFN_D_RES_RSIZE,8,3           ## @HIFN_D_RES_RSIZE
	.comm	_HIFN_D_JUMP,4,2                ## @HIFN_D_JUMP
	.comm	_HIFN_D_MASKDONEIRQ,4,2         ## @HIFN_D_MASKDONEIRQ
	.comm	_HIFN_FLAG_RES_BUSY,4,2         ## @HIFN_FLAG_RES_BUSY
	.comm	_HIFN_1_DMA_CSR,4,2             ## @HIFN_1_DMA_CSR
	.comm	_HIFN_DMACSR_R_CTRL_ENA,4,2     ## @HIFN_DMACSR_R_CTRL_ENA
	.no_dead_strip	_hifn_setup_res_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_res_desc
_hifn_setup_res_desc:                   ; @hifn_setup_res_desc
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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
	mov	x19, x0
	ldr	x20, [x0, #8]
Lloh0:
	adrp	x8, _HIFN_USED_RESULT@GOTPAGE
Lloh1:
	ldr	x8, [x8, _HIFN_USED_RESULT@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
Lloh3:
	adrp	x22, _HIFN_D_VALID@GOTPAGE
Lloh4:
	ldr	x22, [x22, _HIFN_D_VALID@GOTPAGEOFF]
	ldr	w9, [x22]
	orr	w8, w9, w8
Lloh5:
	adrp	x21, _HIFN_D_LAST@GOTPAGE
Lloh6:
	ldr	x21, [x21, _HIFN_D_LAST@GOTPAGEOFF]
	ldr	w9, [x21]
	orr	w0, w8, w9
	bl	___cpu_to_le32
	ldr	x8, [x20, #16]
	ldr	x9, [x20]
	str	x0, [x8, x9, lsl #3]
	add	x8, x9, #1
	str	x8, [x20]
Lloh7:
	adrp	x23, _HIFN_D_RES_RSIZE@GOTPAGE
Lloh8:
	ldr	x23, [x23, _HIFN_D_RES_RSIZE@GOTPAGEOFF]
	ldr	x9, [x23]
	cmp	x8, x9
	b.ne	LBB0_2
; %bb.1:
	ldr	w8, [x22]
Lloh9:
	adrp	x9, _HIFN_D_JUMP@GOTPAGE
Lloh10:
	ldr	x9, [x9, _HIFN_D_JUMP@GOTPAGEOFF]
Lloh11:
	ldr	w9, [x9]
	orr	w8, w9, w8
Lloh12:
	adrp	x9, _HIFN_D_MASKDONEIRQ@GOTPAGE
Lloh13:
	ldr	x9, [x9, _HIFN_D_MASKDONEIRQ@GOTPAGEOFF]
Lloh14:
	ldr	w9, [x9]
	orr	w8, w8, w9
	ldr	w9, [x21]
	orr	w0, w8, w9
	bl	___cpu_to_le32
	ldr	x8, [x20, #16]
	ldr	x9, [x23]
	str	x0, [x8, x9, lsl #3]
	str	xzr, [x20]
LBB0_2:
	ldr	w8, [x20, #8]
	add	w8, w8, #1
	str	w8, [x20, #8]
	ldr	w8, [x19]
Lloh15:
	adrp	x20, _HIFN_FLAG_RES_BUSY@GOTPAGE
Lloh16:
	ldr	x20, [x20, _HIFN_FLAG_RES_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_R_CTRL_ENA@GOTPAGE
Lloh21:
	ldr	x8, [x8, _HIFN_DMACSR_R_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, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.cfi_endproc
                                        ; -- End function
	.comm	_HIFN_USED_RESULT,4,2           ; @HIFN_USED_RESULT
	.comm	_HIFN_D_VALID,4,2               ; @HIFN_D_VALID
	.comm	_HIFN_D_LAST,4,2                ; @HIFN_D_LAST
	.comm	_HIFN_D_RES_RSIZE,8,3           ; @HIFN_D_RES_RSIZE
	.comm	_HIFN_D_JUMP,4,2                ; @HIFN_D_JUMP
	.comm	_HIFN_D_MASKDONEIRQ,4,2         ; @HIFN_D_MASKDONEIRQ
	.comm	_HIFN_FLAG_RES_BUSY,4,2         ; @HIFN_FLAG_RES_BUSY
	.comm	_HIFN_1_DMA_CSR,4,2             ; @HIFN_1_DMA_CSR
	.comm	_HIFN_DMACSR_R_CTRL_ENA,4,2     ; @HIFN_DMACSR_R_CTRL_ENA
	.no_dead_strip	_hifn_setup_res_desc
.subsections_via_symbols
