	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_hidma_ll_setup                 ## -- Begin function hidma_ll_setup
	.p2align	4, 0x90
_hidma_ll_setup:                        ## @hidma_ll_setup
	.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, %rbx
	movl	(%rdi), %r14d
	addq	$72, %rdi
	xorl	%esi, %esi
	callq	_atomic_set
	xorps	%xmm0, %xmm0
	movups	%xmm0, 48(%rbx)
	movq	$0, 64(%rbx)
	movq	_HIDMA_EVCA_IRQ_EN_REG@GOTPCREL(%rip), %r15
	movq	(%r15), %rsi
	addq	16(%rbx), %rsi
	xorl	%edi, %edi
	callq	_writel
	movq	_HIDMA_EVCA_IRQ_STAT_REG@GOTPCREL(%rip), %r12
	movq	(%r12), %rdi
	addq	16(%rbx), %rdi
	callq	_readl
	movq	_HIDMA_EVCA_IRQ_CLR_REG@GOTPCREL(%rip), %r13
	movq	(%r13), %rsi
	addq	16(%rbx), %rsi
	movl	%eax, %edi
	callq	_writel
	movq	%rbx, %rdi
	callq	_hidma_ll_reset
	testl	%eax, %eax
	je	LBB0_2
## %bb.1:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_2:
	movq	(%r12), %rdi
	addq	16(%rbx), %rdi
	callq	_readl
	movq	(%r13), %rsi
	addq	16(%rbx), %rsi
	movl	%eax, %edi
	callq	_writel
	movq	(%r15), %rsi
	addq	16(%rbx), %rsi
	xorl	%edi, %edi
	callq	_writel
	movl	40(%rbx), %r15d
	movl	%r15d, %edi
	callq	_lower_32_bits
	movq	_HIDMA_TRCA_RING_LOW_REG@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rsi
	addq	32(%rbx), %rsi
	movl	%eax, %edi
	callq	_writel
	movl	%r15d, %edi
	callq	_upper_32_bits
	movq	_HIDMA_TRCA_RING_HIGH_REG@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rsi
	addq	32(%rbx), %rsi
	movl	%eax, %edi
	callq	_writel
	movl	4(%rbx), %edi
	movq	_HIDMA_TRCA_RING_LEN_REG@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	addq	32(%rbx), %rsi
	callq	_writel
	movl	24(%rbx), %r15d
	movl	%r15d, %edi
	callq	_lower_32_bits
	movq	_HIDMA_EVCA_RING_LOW_REG@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rsi
	addq	16(%rbx), %rsi
	movl	%eax, %edi
	callq	_writel
	movl	%r15d, %edi
	callq	_upper_32_bits
	movq	_HIDMA_EVCA_RING_HIGH_REG@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rsi
	addq	16(%rbx), %rsi
	movl	%eax, %edi
	callq	_writel
	movq	_HIDMA_EVRE_SIZE@GOTPCREL(%rip), %rax
	imull	(%rax), %r14d
	movq	_HIDMA_EVCA_RING_LEN_REG@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	addq	16(%rbx), %rsi
	movl	%r14d, %edi
	callq	_writel
	movl	8(%rbx), %esi
	movq	%rbx, %rdi
	callq	_hidma_ll_setup_irq
	movq	%rbx, %rdi
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_hidma_ll_enable                ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_HIDMA_EVCA_IRQ_EN_REG,8,3      ## @HIDMA_EVCA_IRQ_EN_REG
	.comm	_HIDMA_EVCA_IRQ_STAT_REG,8,3    ## @HIDMA_EVCA_IRQ_STAT_REG
	.comm	_HIDMA_EVCA_IRQ_CLR_REG,8,3     ## @HIDMA_EVCA_IRQ_CLR_REG
	.comm	_HIDMA_TRCA_RING_LOW_REG,8,3    ## @HIDMA_TRCA_RING_LOW_REG
	.comm	_HIDMA_TRCA_RING_HIGH_REG,8,3   ## @HIDMA_TRCA_RING_HIGH_REG
	.comm	_HIDMA_TRCA_RING_LEN_REG,8,3    ## @HIDMA_TRCA_RING_LEN_REG
	.comm	_HIDMA_EVCA_RING_LOW_REG,8,3    ## @HIDMA_EVCA_RING_LOW_REG
	.comm	_HIDMA_EVCA_RING_HIGH_REG,8,3   ## @HIDMA_EVCA_RING_HIGH_REG
	.comm	_HIDMA_EVRE_SIZE,4,2            ## @HIDMA_EVRE_SIZE
	.comm	_HIDMA_EVCA_RING_LEN_REG,8,3    ## @HIDMA_EVCA_RING_LEN_REG
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_hidma_ll_setup                 ; -- Begin function hidma_ll_setup
	.p2align	2
_hidma_ll_setup:                        ; @hidma_ll_setup
	.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	w21, [x0], #72
	mov	w1, #0
	bl	_atomic_set
	stp	xzr, xzr, [x19, #56]
	str	xzr, [x19, #48]
	ldr	x8, [x19, #16]
Lloh0:
	adrp	x20, _HIDMA_EVCA_IRQ_EN_REG@GOTPAGE
Lloh1:
	ldr	x20, [x20, _HIDMA_EVCA_IRQ_EN_REG@GOTPAGEOFF]
	ldr	x9, [x20]
	add	x1, x9, x8
	mov	w0, #0
	bl	_writel
	ldr	x8, [x19, #16]
Lloh2:
	adrp	x22, _HIDMA_EVCA_IRQ_STAT_REG@GOTPAGE
Lloh3:
	ldr	x22, [x22, _HIDMA_EVCA_IRQ_STAT_REG@GOTPAGEOFF]
	ldr	x9, [x22]
	add	x0, x9, x8
	bl	_readl
	ldr	x8, [x19, #16]
Lloh4:
	adrp	x23, _HIDMA_EVCA_IRQ_CLR_REG@GOTPAGE
Lloh5:
	ldr	x23, [x23, _HIDMA_EVCA_IRQ_CLR_REG@GOTPAGEOFF]
	ldr	x9, [x23]
	add	x1, x9, x8
	bl	_writel
	mov	x0, x19
	bl	_hidma_ll_reset
	cbz	w0, LBB0_2
; %bb.1:
	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
LBB0_2:
	ldr	x8, [x19, #16]
	ldr	x9, [x22]
	add	x0, x9, x8
	bl	_readl
	ldr	x8, [x19, #16]
	ldr	x9, [x23]
	add	x1, x9, x8
	bl	_writel
	ldr	x8, [x19, #16]
	ldr	x9, [x20]
	add	x1, x9, x8
	mov	w0, #0
	bl	_writel
	ldr	w20, [x19, #40]
	mov	x0, x20
	bl	_lower_32_bits
	ldr	x8, [x19, #32]
Lloh6:
	adrp	x9, _HIDMA_TRCA_RING_LOW_REG@GOTPAGE
Lloh7:
	ldr	x9, [x9, _HIDMA_TRCA_RING_LOW_REG@GOTPAGEOFF]
Lloh8:
	ldr	x9, [x9]
	add	x1, x9, x8
	bl	_writel
	mov	x0, x20
	bl	_upper_32_bits
	ldr	x8, [x19, #32]
Lloh9:
	adrp	x9, _HIDMA_TRCA_RING_HIGH_REG@GOTPAGE
Lloh10:
	ldr	x9, [x9, _HIDMA_TRCA_RING_HIGH_REG@GOTPAGEOFF]
Lloh11:
	ldr	x9, [x9]
	add	x1, x9, x8
	bl	_writel
	ldr	w0, [x19, #4]
	ldr	x8, [x19, #32]
Lloh12:
	adrp	x9, _HIDMA_TRCA_RING_LEN_REG@GOTPAGE
Lloh13:
	ldr	x9, [x9, _HIDMA_TRCA_RING_LEN_REG@GOTPAGEOFF]
Lloh14:
	ldr	x9, [x9]
	add	x1, x9, x8
	bl	_writel
	ldr	w20, [x19, #24]
	mov	x0, x20
	bl	_lower_32_bits
	ldr	x8, [x19, #16]
Lloh15:
	adrp	x9, _HIDMA_EVCA_RING_LOW_REG@GOTPAGE
Lloh16:
	ldr	x9, [x9, _HIDMA_EVCA_RING_LOW_REG@GOTPAGEOFF]
Lloh17:
	ldr	x9, [x9]
	add	x1, x9, x8
	bl	_writel
	mov	x0, x20
	bl	_upper_32_bits
	ldr	x8, [x19, #16]
Lloh18:
	adrp	x9, _HIDMA_EVCA_RING_HIGH_REG@GOTPAGE
Lloh19:
	ldr	x9, [x9, _HIDMA_EVCA_RING_HIGH_REG@GOTPAGEOFF]
Lloh20:
	ldr	x9, [x9]
	add	x1, x9, x8
	bl	_writel
Lloh21:
	adrp	x8, _HIDMA_EVRE_SIZE@GOTPAGE
Lloh22:
	ldr	x8, [x8, _HIDMA_EVRE_SIZE@GOTPAGEOFF]
Lloh23:
	ldr	w8, [x8]
	mul	w0, w8, w21
	ldr	x8, [x19, #16]
Lloh24:
	adrp	x9, _HIDMA_EVCA_RING_LEN_REG@GOTPAGE
Lloh25:
	ldr	x9, [x9, _HIDMA_EVCA_RING_LEN_REG@GOTPAGEOFF]
Lloh26:
	ldr	x9, [x9]
	add	x1, x9, x8
	bl	_writel
	ldr	w1, [x19, #8]
	mov	x0, x19
	bl	_hidma_ll_setup_irq
	mov	x0, x19
	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
	b	_hidma_ll_enable
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh24, Lloh25, Lloh26
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.cfi_endproc
                                        ; -- End function
	.comm	_HIDMA_EVCA_IRQ_EN_REG,8,3      ; @HIDMA_EVCA_IRQ_EN_REG
	.comm	_HIDMA_EVCA_IRQ_STAT_REG,8,3    ; @HIDMA_EVCA_IRQ_STAT_REG
	.comm	_HIDMA_EVCA_IRQ_CLR_REG,8,3     ; @HIDMA_EVCA_IRQ_CLR_REG
	.comm	_HIDMA_TRCA_RING_LOW_REG,8,3    ; @HIDMA_TRCA_RING_LOW_REG
	.comm	_HIDMA_TRCA_RING_HIGH_REG,8,3   ; @HIDMA_TRCA_RING_HIGH_REG
	.comm	_HIDMA_TRCA_RING_LEN_REG,8,3    ; @HIDMA_TRCA_RING_LEN_REG
	.comm	_HIDMA_EVCA_RING_LOW_REG,8,3    ; @HIDMA_EVCA_RING_LOW_REG
	.comm	_HIDMA_EVCA_RING_HIGH_REG,8,3   ; @HIDMA_EVCA_RING_HIGH_REG
	.comm	_HIDMA_EVRE_SIZE,4,2            ; @HIDMA_EVRE_SIZE
	.comm	_HIDMA_EVCA_RING_LEN_REG,8,3    ; @HIDMA_EVCA_RING_LEN_REG
.subsections_via_symbols
