	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function mmp_pdma_config_write
_mmp_pdma_config_write:                 ## @mmp_pdma_config_write
	.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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%edx, %r14d
	movq	%rsi, %r15
	movq	%rdi, %rbx
	callq	_to_mmp_pdma_chan
	testq	%rbx, %rbx
	je	LBB0_1
## %bb.2:
	movq	_DMA_DEV_TO_MEM@GOTPCREL(%rip), %rcx
	cmpl	%r14d, (%rcx)
	jne	LBB0_4
## %bb.3:
	movq	_DCMD_INCTRGADDR@GOTPCREL(%rip), %rcx
	movq	_DCMD_FLOWSRC@GOTPCREL(%rip), %rdx
	movl	(%rdx), %edx
	orl	(%rcx), %edx
	movl	%edx, (%rax)
	movl	(%r15), %edx
	movl	4(%r15), %esi
	movl	8(%r15), %ecx
	jmp	LBB0_7
LBB0_1:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	xorl	%ecx, %ecx
	subl	(%rax), %ecx
	jmp	LBB0_23
LBB0_4:
	movq	_DMA_MEM_TO_DEV@GOTPCREL(%rip), %rcx
	cmpl	%r14d, (%rcx)
	jne	LBB0_5
## %bb.6:
	movq	_DCMD_INCSRCADDR@GOTPCREL(%rip), %rcx
	movq	_DCMD_FLOWTRG@GOTPCREL(%rip), %rdx
	movl	(%rdx), %edx
	orl	(%rcx), %edx
	movl	%edx, (%rax)
	movl	12(%r15), %edx
	movl	16(%r15), %esi
	movl	20(%r15), %ecx
	jmp	LBB0_7
LBB0_5:
	movq	_DMA_SLAVE_BUSWIDTH_UNDEFINED@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	xorl	%edx, %edx
	xorl	%ecx, %ecx
LBB0_7:
	movq	_DMA_SLAVE_BUSWIDTH_1_BYTE@GOTPCREL(%rip), %rdi
	cmpl	(%rdi), %esi
	jne	LBB0_9
## %bb.8:
	movq	_DCMD_WIDTH1@GOTPCREL(%rip), %rsi
	jmp	LBB0_13
LBB0_9:
	movq	_DMA_SLAVE_BUSWIDTH_2_BYTES@GOTPCREL(%rip), %rdi
	cmpl	(%rdi), %esi
	jne	LBB0_11
## %bb.10:
	movq	_DCMD_WIDTH2@GOTPCREL(%rip), %rsi
	jmp	LBB0_13
LBB0_11:
	movq	_DMA_SLAVE_BUSWIDTH_4_BYTES@GOTPCREL(%rip), %rdi
	cmpl	(%rdi), %esi
	jne	LBB0_14
## %bb.12:
	movq	_DCMD_WIDTH4@GOTPCREL(%rip), %rsi
LBB0_13:
	movl	(%rsi), %esi
	orl	%esi, (%rax)
LBB0_14:
	cmpl	$8, %edx
	je	LBB0_15
## %bb.16:
	cmpl	$32, %edx
	je	LBB0_19
## %bb.17:
	cmpl	$16, %edx
	jne	LBB0_21
## %bb.18:
	movq	_DCMD_BURST16@GOTPCREL(%rip), %rdx
	jmp	LBB0_20
LBB0_15:
	movq	_DCMD_BURST8@GOTPCREL(%rip), %rdx
	jmp	LBB0_20
LBB0_19:
	movq	_DCMD_BURST32@GOTPCREL(%rip), %rdx
LBB0_20:
	movl	(%rdx), %edx
	orl	%edx, (%rax)
LBB0_21:
	movl	%r14d, 4(%rax)
	movl	%ecx, 8(%rax)
	movq	24(%r15), %rdx
	xorl	%ecx, %ecx
	testq	%rdx, %rdx
	je	LBB0_23
## %bb.22:
	movq	%rdx, 16(%rax)
LBB0_23:
	movl	%ecx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_DMA_SLAVE_BUSWIDTH_UNDEFINED,4,2 ## @DMA_SLAVE_BUSWIDTH_UNDEFINED
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_DMA_DEV_TO_MEM,4,2             ## @DMA_DEV_TO_MEM
	.comm	_DCMD_INCTRGADDR,4,2            ## @DCMD_INCTRGADDR
	.comm	_DCMD_FLOWSRC,4,2               ## @DCMD_FLOWSRC
	.comm	_DMA_MEM_TO_DEV,4,2             ## @DMA_MEM_TO_DEV
	.comm	_DCMD_INCSRCADDR,4,2            ## @DCMD_INCSRCADDR
	.comm	_DCMD_FLOWTRG,4,2               ## @DCMD_FLOWTRG
	.comm	_DMA_SLAVE_BUSWIDTH_1_BYTE,4,2  ## @DMA_SLAVE_BUSWIDTH_1_BYTE
	.comm	_DCMD_WIDTH1,4,2                ## @DCMD_WIDTH1
	.comm	_DMA_SLAVE_BUSWIDTH_2_BYTES,4,2 ## @DMA_SLAVE_BUSWIDTH_2_BYTES
	.comm	_DCMD_WIDTH2,4,2                ## @DCMD_WIDTH2
	.comm	_DMA_SLAVE_BUSWIDTH_4_BYTES,4,2 ## @DMA_SLAVE_BUSWIDTH_4_BYTES
	.comm	_DCMD_WIDTH4,4,2                ## @DCMD_WIDTH4
	.comm	_DCMD_BURST8,4,2                ## @DCMD_BURST8
	.comm	_DCMD_BURST16,4,2               ## @DCMD_BURST16
	.comm	_DCMD_BURST32,4,2               ## @DCMD_BURST32
	.no_dead_strip	_mmp_pdma_config_write
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function mmp_pdma_config_write
_mmp_pdma_config_write:                 ; @mmp_pdma_config_write
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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
	mov	x20, x2
	mov	x19, x1
	mov	x21, x0
	bl	_to_mmp_pdma_chan
	cbz	x21, LBB0_3
; %bb.1:
Lloh0:
	adrp	x8, _DMA_DEV_TO_MEM@GOTPAGE
Lloh1:
	ldr	x8, [x8, _DMA_DEV_TO_MEM@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	cmp	w8, w20
	b.ne	LBB0_4
; %bb.2:
Lloh3:
	adrp	x8, _DCMD_INCTRGADDR@GOTPAGE
Lloh4:
	ldr	x8, [x8, _DCMD_INCTRGADDR@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
Lloh6:
	adrp	x9, _DCMD_FLOWSRC@GOTPAGE
Lloh7:
	ldr	x9, [x9, _DCMD_FLOWSRC@GOTPAGEOFF]
Lloh8:
	ldr	w9, [x9]
	orr	w8, w9, w8
	str	w8, [x0]
	ldp	w9, w10, [x19]
	ldr	w8, [x19, #8]
	b	LBB0_7
LBB0_3:
Lloh9:
	adrp	x8, _EINVAL@GOTPAGE
Lloh10:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh11:
	ldr	w8, [x8]
	neg	w8, w8
	b	LBB0_24
LBB0_4:
Lloh12:
	adrp	x8, _DMA_MEM_TO_DEV@GOTPAGE
Lloh13:
	ldr	x8, [x8, _DMA_MEM_TO_DEV@GOTPAGEOFF]
Lloh14:
	ldr	w8, [x8]
	cmp	w8, w20
	b.ne	LBB0_6
; %bb.5:
Lloh15:
	adrp	x8, _DCMD_INCSRCADDR@GOTPAGE
Lloh16:
	ldr	x8, [x8, _DCMD_INCSRCADDR@GOTPAGEOFF]
Lloh17:
	ldr	w8, [x8]
Lloh18:
	adrp	x9, _DCMD_FLOWTRG@GOTPAGE
Lloh19:
	ldr	x9, [x9, _DCMD_FLOWTRG@GOTPAGEOFF]
Lloh20:
	ldr	w9, [x9]
	orr	w8, w9, w8
	str	w8, [x0]
	ldp	w9, w10, [x19, #12]
	ldr	w8, [x19, #20]
	b	LBB0_7
LBB0_6:
	mov	w9, #0
	mov	w8, #0
Lloh21:
	adrp	x10, _DMA_SLAVE_BUSWIDTH_UNDEFINED@GOTPAGE
Lloh22:
	ldr	x10, [x10, _DMA_SLAVE_BUSWIDTH_UNDEFINED@GOTPAGEOFF]
Lloh23:
	ldr	w10, [x10]
LBB0_7:
Lloh24:
	adrp	x11, _DMA_SLAVE_BUSWIDTH_1_BYTE@GOTPAGE
Lloh25:
	ldr	x11, [x11, _DMA_SLAVE_BUSWIDTH_1_BYTE@GOTPAGEOFF]
Lloh26:
	ldr	w11, [x11]
	cmp	w10, w11
	b.ne	LBB0_9
; %bb.8:
Lloh27:
	adrp	x10, _DCMD_WIDTH1@GOTPAGE
Lloh28:
	ldr	x10, [x10, _DCMD_WIDTH1@GOTPAGEOFF]
	b	LBB0_13
LBB0_9:
Lloh29:
	adrp	x11, _DMA_SLAVE_BUSWIDTH_2_BYTES@GOTPAGE
Lloh30:
	ldr	x11, [x11, _DMA_SLAVE_BUSWIDTH_2_BYTES@GOTPAGEOFF]
Lloh31:
	ldr	w11, [x11]
	cmp	w10, w11
	b.ne	LBB0_11
; %bb.10:
Lloh32:
	adrp	x10, _DCMD_WIDTH2@GOTPAGE
Lloh33:
	ldr	x10, [x10, _DCMD_WIDTH2@GOTPAGEOFF]
	b	LBB0_13
LBB0_11:
Lloh34:
	adrp	x11, _DMA_SLAVE_BUSWIDTH_4_BYTES@GOTPAGE
Lloh35:
	ldr	x11, [x11, _DMA_SLAVE_BUSWIDTH_4_BYTES@GOTPAGEOFF]
Lloh36:
	ldr	w11, [x11]
	cmp	w10, w11
	b.ne	LBB0_14
; %bb.12:
Lloh37:
	adrp	x10, _DCMD_WIDTH4@GOTPAGE
Lloh38:
	ldr	x10, [x10, _DCMD_WIDTH4@GOTPAGEOFF]
LBB0_13:
	ldr	w10, [x10]
	ldr	w11, [x0]
	orr	w10, w11, w10
	str	w10, [x0]
LBB0_14:
	cmp	w9, #8
	b.eq	LBB0_18
; %bb.15:
	cmp	w9, #32
	b.eq	LBB0_19
; %bb.16:
	cmp	w9, #16
	b.ne	LBB0_21
; %bb.17:
Lloh39:
	adrp	x9, _DCMD_BURST16@GOTPAGE
Lloh40:
	ldr	x9, [x9, _DCMD_BURST16@GOTPAGEOFF]
	b	LBB0_20
LBB0_18:
Lloh41:
	adrp	x9, _DCMD_BURST8@GOTPAGE
Lloh42:
	ldr	x9, [x9, _DCMD_BURST8@GOTPAGEOFF]
	b	LBB0_20
LBB0_19:
Lloh43:
	adrp	x9, _DCMD_BURST32@GOTPAGE
Lloh44:
	ldr	x9, [x9, _DCMD_BURST32@GOTPAGEOFF]
LBB0_20:
	ldr	w9, [x9]
	ldr	w10, [x0]
	orr	w9, w10, w9
	str	w9, [x0]
LBB0_21:
	stp	w20, w8, [x0, #4]
	ldr	x9, [x19, #24]
	cbz	x9, LBB0_23
; %bb.22:
	mov	w8, #0
	str	x9, [x0, #16]
	b	LBB0_24
LBB0_23:
	mov	w8, #0
LBB0_24:
	mov	x0, x8
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh24, Lloh25, Lloh26
	.loh AdrpLdrGot	Lloh27, Lloh28
	.loh AdrpLdrGotLdr	Lloh29, Lloh30, Lloh31
	.loh AdrpLdrGot	Lloh32, Lloh33
	.loh AdrpLdrGotLdr	Lloh34, Lloh35, Lloh36
	.loh AdrpLdrGot	Lloh37, Lloh38
	.loh AdrpLdrGot	Lloh39, Lloh40
	.loh AdrpLdrGot	Lloh41, Lloh42
	.loh AdrpLdrGot	Lloh43, Lloh44
	.cfi_endproc
                                        ; -- End function
	.comm	_DMA_SLAVE_BUSWIDTH_UNDEFINED,4,2 ; @DMA_SLAVE_BUSWIDTH_UNDEFINED
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_DMA_DEV_TO_MEM,4,2             ; @DMA_DEV_TO_MEM
	.comm	_DCMD_INCTRGADDR,4,2            ; @DCMD_INCTRGADDR
	.comm	_DCMD_FLOWSRC,4,2               ; @DCMD_FLOWSRC
	.comm	_DMA_MEM_TO_DEV,4,2             ; @DMA_MEM_TO_DEV
	.comm	_DCMD_INCSRCADDR,4,2            ; @DCMD_INCSRCADDR
	.comm	_DCMD_FLOWTRG,4,2               ; @DCMD_FLOWTRG
	.comm	_DMA_SLAVE_BUSWIDTH_1_BYTE,4,2  ; @DMA_SLAVE_BUSWIDTH_1_BYTE
	.comm	_DCMD_WIDTH1,4,2                ; @DCMD_WIDTH1
	.comm	_DMA_SLAVE_BUSWIDTH_2_BYTES,4,2 ; @DMA_SLAVE_BUSWIDTH_2_BYTES
	.comm	_DCMD_WIDTH2,4,2                ; @DCMD_WIDTH2
	.comm	_DMA_SLAVE_BUSWIDTH_4_BYTES,4,2 ; @DMA_SLAVE_BUSWIDTH_4_BYTES
	.comm	_DCMD_WIDTH4,4,2                ; @DCMD_WIDTH4
	.comm	_DCMD_BURST8,4,2                ; @DCMD_BURST8
	.comm	_DCMD_BURST16,4,2               ; @DCMD_BURST16
	.comm	_DCMD_BURST32,4,2               ; @DCMD_BURST32
	.no_dead_strip	_mmp_pdma_config_write
.subsections_via_symbols
