	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function goya_init_dma_ch
_goya_init_dma_ch:                      ## @goya_init_dma_ch
	.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	%esi, %r14d
	movq	_mmDMA_CH_1_CFG1@GOTPCREL(%rip), %rax
	movl	(%rax), %r13d
	movq	_mmDMA_CH_0_CFG1@GOTPCREL(%rip), %rax
	subl	(%rax), %r13d
	imull	%esi, %r13d
	movq	_CFG_BASE@GOTPCREL(%rip), %rbx
	movq	_mmGIC_DISTRIBUTOR__5_GICD_SETSPI_NSR@GOTPCREL(%rip), %r12
	movq	(%r12), %rdi
	addq	(%rbx), %rdi
	callq	_lower_32_bits
	movl	%eax, %r15d
	movq	(%r12), %rdi
	addq	(%rbx), %rdi
	callq	_upper_32_bits
	movl	%eax, %r12d
	movq	_mmDMA_CH_0_ERRMSG_ADDR_LO@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	addl	%r13d, %edi
	movl	%r15d, %esi
	callq	_WREG32
	movq	_mmDMA_CH_0_ERRMSG_ADDR_HI@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	addl	%r13d, %edi
	movl	%r12d, %esi
	callq	_WREG32
	movq	_mmDMA_CH_0_ERRMSG_WDATA@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	addl	%r13d, %edi
	movq	_GOYA_ASYNC_EVENT_ID_DMA0_CH@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	addl	%r14d, %esi
	callq	_WREG32
	movq	(%rbx), %rdi
	testl	%r14d, %r14d
	je	LBB0_2
## %bb.1:
	movq	_mmSYNC_MNGR_SOB_OBJ_1000@GOTPCREL(%rip), %rax
	leal	-4(,%r14,4), %ecx
	movslq	%ecx, %rcx
	addq	%rcx, %rdi
	jmp	LBB0_3
LBB0_2:
	movq	_mmSYNC_MNGR_SOB_OBJ_1007@GOTPCREL(%rip), %rax
LBB0_3:
	addq	(%rax), %rdi
	movq	_mmDMA_CH_0_WR_COMP_ADDR_HI@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	addl	%r13d, %ebx
	callq	_upper_32_bits
	movl	%ebx, %edi
	movl	%eax, %esi
	callq	_WREG32
	movq	_mmDMA_CH_0_WR_COMP_WDATA@GOTPCREL(%rip), %rax
	addl	(%rax), %r13d
	movl	%r13d, %edi
	movl	$-2147483647, %esi              ## imm = 0x80000001
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_WREG32                         ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_mmDMA_CH_1_CFG1,4,2            ## @mmDMA_CH_1_CFG1
	.comm	_mmDMA_CH_0_CFG1,4,2            ## @mmDMA_CH_0_CFG1
	.comm	_CFG_BASE,8,3                   ## @CFG_BASE
	.comm	_mmGIC_DISTRIBUTOR__5_GICD_SETSPI_NSR,8,3 ## @mmGIC_DISTRIBUTOR__5_GICD_SETSPI_NSR
	.comm	_mmDMA_CH_0_ERRMSG_ADDR_LO,4,2  ## @mmDMA_CH_0_ERRMSG_ADDR_LO
	.comm	_mmDMA_CH_0_ERRMSG_ADDR_HI,4,2  ## @mmDMA_CH_0_ERRMSG_ADDR_HI
	.comm	_mmDMA_CH_0_ERRMSG_WDATA,4,2    ## @mmDMA_CH_0_ERRMSG_WDATA
	.comm	_GOYA_ASYNC_EVENT_ID_DMA0_CH,4,2 ## @GOYA_ASYNC_EVENT_ID_DMA0_CH
	.comm	_mmSYNC_MNGR_SOB_OBJ_1000,8,3   ## @mmSYNC_MNGR_SOB_OBJ_1000
	.comm	_mmSYNC_MNGR_SOB_OBJ_1007,8,3   ## @mmSYNC_MNGR_SOB_OBJ_1007
	.comm	_mmDMA_CH_0_WR_COMP_ADDR_HI,4,2 ## @mmDMA_CH_0_WR_COMP_ADDR_HI
	.comm	_mmDMA_CH_0_WR_COMP_WDATA,4,2   ## @mmDMA_CH_0_WR_COMP_WDATA
	.no_dead_strip	_goya_init_dma_ch
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function goya_init_dma_ch
_goya_init_dma_ch:                      ; @goya_init_dma_ch
	.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, x1
Lloh0:
	adrp	x8, _mmDMA_CH_1_CFG1@GOTPAGE
Lloh1:
	ldr	x8, [x8, _mmDMA_CH_1_CFG1@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
Lloh3:
	adrp	x9, _mmDMA_CH_0_CFG1@GOTPAGE
Lloh4:
	ldr	x9, [x9, _mmDMA_CH_0_CFG1@GOTPAGEOFF]
Lloh5:
	ldr	w9, [x9]
	sub	w8, w8, w9
Lloh6:
	adrp	x23, _CFG_BASE@GOTPAGE
Lloh7:
	ldr	x23, [x23, _CFG_BASE@GOTPAGEOFF]
	mul	w22, w8, w1
	ldr	x8, [x23]
Lloh8:
	adrp	x21, _mmGIC_DISTRIBUTOR__5_GICD_SETSPI_NSR@GOTPAGE
Lloh9:
	ldr	x21, [x21, _mmGIC_DISTRIBUTOR__5_GICD_SETSPI_NSR@GOTPAGEOFF]
	ldr	x9, [x21]
	add	x0, x9, x8
	bl	_lower_32_bits
	mov	x20, x0
	ldr	x8, [x23]
	ldr	x9, [x21]
	add	x0, x9, x8
	bl	_upper_32_bits
	mov	x21, x0
Lloh10:
	adrp	x8, _mmDMA_CH_0_ERRMSG_ADDR_LO@GOTPAGE
Lloh11:
	ldr	x8, [x8, _mmDMA_CH_0_ERRMSG_ADDR_LO@GOTPAGEOFF]
Lloh12:
	ldr	w8, [x8]
	add	w0, w8, w22
	mov	x1, x20
	bl	_WREG32
Lloh13:
	adrp	x8, _mmDMA_CH_0_ERRMSG_ADDR_HI@GOTPAGE
Lloh14:
	ldr	x8, [x8, _mmDMA_CH_0_ERRMSG_ADDR_HI@GOTPAGEOFF]
Lloh15:
	ldr	w8, [x8]
	add	w0, w8, w22
	mov	x1, x21
	bl	_WREG32
Lloh16:
	adrp	x8, _mmDMA_CH_0_ERRMSG_WDATA@GOTPAGE
Lloh17:
	ldr	x8, [x8, _mmDMA_CH_0_ERRMSG_WDATA@GOTPAGEOFF]
Lloh18:
	ldr	w8, [x8]
	add	w0, w8, w22
Lloh19:
	adrp	x8, _GOYA_ASYNC_EVENT_ID_DMA0_CH@GOTPAGE
Lloh20:
	ldr	x8, [x8, _GOYA_ASYNC_EVENT_ID_DMA0_CH@GOTPAGEOFF]
Lloh21:
	ldr	w8, [x8]
	add	w1, w8, w19
	bl	_WREG32
	ldr	x8, [x23]
	cbz	w19, LBB0_2
; %bb.1:
Lloh22:
	adrp	x9, _mmSYNC_MNGR_SOB_OBJ_1000@GOTPAGE
Lloh23:
	ldr	x9, [x9, _mmSYNC_MNGR_SOB_OBJ_1000@GOTPAGEOFF]
Lloh24:
	ldr	x9, [x9]
	lsl	w10, w19, #2
	sub	w10, w10, #4
	add	x8, x8, w10, sxtw
	add	x0, x8, x9
	b	LBB0_3
LBB0_2:
Lloh25:
	adrp	x9, _mmSYNC_MNGR_SOB_OBJ_1007@GOTPAGE
Lloh26:
	ldr	x9, [x9, _mmSYNC_MNGR_SOB_OBJ_1007@GOTPAGEOFF]
Lloh27:
	ldr	x9, [x9]
	add	x0, x9, x8
LBB0_3:
Lloh28:
	adrp	x8, _mmDMA_CH_0_WR_COMP_ADDR_HI@GOTPAGE
Lloh29:
	ldr	x8, [x8, _mmDMA_CH_0_WR_COMP_ADDR_HI@GOTPAGEOFF]
Lloh30:
	ldr	w8, [x8]
	add	w19, w8, w22
	bl	_upper_32_bits
	mov	x1, x0
	mov	x0, x19
	bl	_WREG32
Lloh31:
	adrp	x8, _mmDMA_CH_0_WR_COMP_WDATA@GOTPAGE
Lloh32:
	ldr	x8, [x8, _mmDMA_CH_0_WR_COMP_WDATA@GOTPAGEOFF]
Lloh33:
	ldr	w8, [x8]
	add	w0, w8, w22
	mov	w1, #-2147483647
	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	_WREG32
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh24
	.loh AdrpLdrGotLdr	Lloh25, Lloh26, Lloh27
	.loh AdrpLdrGotLdr	Lloh31, Lloh32, Lloh33
	.loh AdrpLdrGotLdr	Lloh28, Lloh29, Lloh30
	.cfi_endproc
                                        ; -- End function
	.comm	_mmDMA_CH_1_CFG1,4,2            ; @mmDMA_CH_1_CFG1
	.comm	_mmDMA_CH_0_CFG1,4,2            ; @mmDMA_CH_0_CFG1
	.comm	_CFG_BASE,8,3                   ; @CFG_BASE
	.comm	_mmGIC_DISTRIBUTOR__5_GICD_SETSPI_NSR,8,3 ; @mmGIC_DISTRIBUTOR__5_GICD_SETSPI_NSR
	.comm	_mmDMA_CH_0_ERRMSG_ADDR_LO,4,2  ; @mmDMA_CH_0_ERRMSG_ADDR_LO
	.comm	_mmDMA_CH_0_ERRMSG_ADDR_HI,4,2  ; @mmDMA_CH_0_ERRMSG_ADDR_HI
	.comm	_mmDMA_CH_0_ERRMSG_WDATA,4,2    ; @mmDMA_CH_0_ERRMSG_WDATA
	.comm	_GOYA_ASYNC_EVENT_ID_DMA0_CH,4,2 ; @GOYA_ASYNC_EVENT_ID_DMA0_CH
	.comm	_mmSYNC_MNGR_SOB_OBJ_1000,8,3   ; @mmSYNC_MNGR_SOB_OBJ_1000
	.comm	_mmSYNC_MNGR_SOB_OBJ_1007,8,3   ; @mmSYNC_MNGR_SOB_OBJ_1007
	.comm	_mmDMA_CH_0_WR_COMP_ADDR_HI,4,2 ; @mmDMA_CH_0_WR_COMP_ADDR_HI
	.comm	_mmDMA_CH_0_WR_COMP_WDATA,4,2   ; @mmDMA_CH_0_WR_COMP_WDATA
	.no_dead_strip	_goya_init_dma_ch
.subsections_via_symbols
