	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_nv40_mpeg_mthd_dma             ## -- Begin function nv40_mpeg_mthd_dma
	.p2align	4, 0x90
_nv40_mpeg_mthd_dma:                    ## @nv40_mpeg_mthd_dma
	.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	%edx, %ebx
	movl	%esi, -44(%rbp)                 ## 4-byte Spill
	movq	%rdi, %r15
	movq	8(%rdi), %r13
	movl	(%rdi), %edi
	callq	_nv31_mpeg
	movq	%rax, -56(%rbp)                 ## 8-byte Spill
	shll	$4, %ebx
	movq	%r13, %rdi
	movl	%ebx, %esi
	callq	_nvkm_instmem_rd32
	movl	%eax, %r12d
	leal	4(%rbx), %esi
	movq	%r13, %rdi
	callq	_nvkm_instmem_rd32
	movl	%eax, %r14d
	leal	8(%rbx), %esi
	movq	%r13, %rdi
	callq	_nvkm_instmem_rd32
	testl	$8192, %r12d                    ## imm = 0x2000
	jne	LBB0_2
## %bb.1:
	leaq	L_.str(%rip), %rsi
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	movl	%ebx, %edx
	movl	%r12d, %ecx
	movl	%r14d, %r8d
	movl	%eax, %r9d
	callq	_nvkm_error
	xorl	%eax, %eax
	jmp	LBB0_9
LBB0_2:
	andl	$-4096, %eax                    ## imm = 0xF000
	movl	%r12d, %ebx
	sarl	$20, %ebx
	orl	%eax, %ebx
	incl	%r14d
	movl	-44(%rbp), %eax                 ## 4-byte Reload
	cmpl	$416, %eax                      ## imm = 0x1A0
	je	LBB0_5
## %bb.3:
	cmpl	$400, %eax                      ## imm = 0x190
	jne	LBB0_6
## %bb.4:
	andl	$196608, %r12d                  ## imm = 0x30000
	movq	%r15, %rdi
	movl	$45824, %esi                    ## imm = 0xB300
	movl	$196608, %edx                   ## imm = 0x30000
	movl	%r12d, %ecx
	callq	_nvkm_mask
	movq	%r15, %rdi
	movl	$45876, %esi                    ## imm = 0xB334
	movl	%ebx, %edx
	callq	_nvkm_wr32
	movq	%r15, %rdi
	movl	$45860, %esi                    ## imm = 0xB324
	jmp	LBB0_8
LBB0_5:
	shll	$2, %r12d
	andl	$786432, %r12d                  ## imm = 0xC0000
	movq	%r15, %rdi
	movl	$45824, %esi                    ## imm = 0xB300
	movl	$786432, %edx                   ## imm = 0xC0000
	movl	%r12d, %ecx
	callq	_nvkm_mask
	movq	%r15, %rdi
	movl	$45920, %esi                    ## imm = 0xB360
	movl	%ebx, %edx
	callq	_nvkm_wr32
	movq	%r15, %rdi
	movl	$45924, %esi                    ## imm = 0xB364
	jmp	LBB0_8
LBB0_6:
	xorl	%eax, %eax
	testl	$196608, %r12d                  ## imm = 0x30000
	jne	LBB0_9
## %bb.7:
	movq	%r15, %rdi
	movl	$45936, %esi                    ## imm = 0xB370
	movl	%ebx, %edx
	callq	_nvkm_wr32
	movq	%r15, %rdi
	movl	$45940, %esi                    ## imm = 0xB374
LBB0_8:
	movl	%r14d, %edx
	callq	_nvkm_wr32
	movl	$1, %eax
LBB0_9:
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"inst %08x dma0 %08x dma1 %08x dma2 %08x\n"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_nv40_mpeg_mthd_dma             ; -- Begin function nv40_mpeg_mthd_dma
	.p2align	2
_nv40_mpeg_mthd_dma:                    ; @nv40_mpeg_mthd_dma
	.cfi_startproc
; %bb.0:
	stp	x26, x25, [sp, #-80]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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
	mov	x25, x2
	mov	x23, x1
	mov	x19, x0
	ldr	x26, [x0, #8]
	ldr	w0, [x0]
	bl	_nv31_mpeg
	mov	x21, x0
	lsl	w20, w25, #4
	mov	x0, x26
	mov	x1, x20
	bl	_nvkm_instmem_rd32
	mov	x22, x0
	mov	w1, #4
	bfi	w1, w25, #4, #28
	mov	x0, x26
	bl	_nvkm_instmem_rd32
	mov	x24, x0
	mov	w1, #8
	bfi	w1, w25, #4, #28
	mov	x0, x26
	bl	_nvkm_instmem_rd32
	mov	x5, x0
	tbnz	w22, #13, LBB0_2
; %bb.1:
Lloh0:
	adrp	x1, l_.str@PAGE
Lloh1:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x21
	mov	x2, x20
	mov	x3, x22
	mov	x4, x24
	bl	_nvkm_error
	mov	w0, #0
	b	LBB0_10
LBB0_2:
	and	w8, w5, #0xfffff000
	orr	w21, w8, w22, asr #20
	add	w20, w24, #1
	cmp	w23, #416
	b.eq	LBB0_5
; %bb.3:
	cmp	w23, #400
	b.ne	LBB0_6
; %bb.4:
	and	w3, w22, #0x30000
	mov	x0, x19
	mov	w1, #45824
	mov	w2, #196608
	bl	_nvkm_mask
	mov	x0, x19
	mov	w1, #45876
	mov	x2, x21
	bl	_nvkm_wr32
	mov	x0, x19
	mov	w1, #45860
	b	LBB0_9
LBB0_5:
	lsl	w8, w22, #2
	and	w3, w8, #0xc0000
	mov	x0, x19
	mov	w1, #45824
	mov	w2, #786432
	bl	_nvkm_mask
	mov	x0, x19
	mov	w1, #45920
	mov	x2, x21
	bl	_nvkm_wr32
	mov	x0, x19
	mov	w1, #45924
	b	LBB0_9
LBB0_6:
	tst	w22, #0x30000
	b.eq	LBB0_8
; %bb.7:
	mov	w0, #0
	b	LBB0_10
LBB0_8:
	mov	x0, x19
	mov	w1, #45936
	mov	x2, x21
	bl	_nvkm_wr32
	mov	x0, x19
	mov	w1, #45940
LBB0_9:
	mov	x2, x20
	bl	_nvkm_wr32
	mov	w0, #1
LBB0_10:
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	ret
	.loh AdrpAdd	Lloh0, Lloh1
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"inst %08x dma0 %08x dma1 %08x dma2 %08x\n"

.subsections_via_symbols
