	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_gv100_dmaobj_new               ## -- Begin function gv100_dmaobj_new
	.p2align	4, 0x90
_gv100_dmaobj_new:                      ## @gv100_dmaobj_new
	.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	$40, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%r8, %r13
	movq	%rsi, %rbx
	movq	%rdi, %r12
	movq	%rdx, -56(%rbp)
	movl	%ecx, -44(%rbp)
	movq	(%rsi), %r14
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	$8, %edi
	callq	_kzalloc
	testq	%rax, %rax
	je	LBB0_1
## %bb.2:
	movq	%rax, %r15
	leaq	4(%rax), %r9
	movq	%r9, (%r13)
	movq	_gv100_dmaobj_func@GOTPCREL(%rip), %rdi
	leaq	-56(%rbp), %rcx
	leaq	-44(%rbp), %r8
	movq	%r12, %rsi
	movq	%rbx, %rdx
	callq	_nvkm_dmaobj_ctor
	testl	%eax, %eax
	jne	LBB0_17
## %bb.3:
	movq	_ENOSYS@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
	movq	-56(%rbp), %r12
	movl	-44(%rbp), %edx
	leaq	L_.str(%rip), %rsi
	movq	%r14, %rdi
	xorl	%eax, %eax
	callq	_nvif_ioctl
	movq	16(%r12), %rax
	movq	%rax, 16(%rsp)
	movups	(%r12), %xmm0
	movups	%xmm0, (%rsp)
	leaq	-56(%rbp), %rsi
	leaq	-44(%rbp), %rdx
	movl	%ebx, %edi
	xorl	%ecx, %ecx
	xorl	%r8d, %r8d
	xorl	%r9d, %r9d
	callq	_nvif_unpack
	testl	%eax, %eax
	je	LBB0_6
## %bb.4:
	cmpl	$0, -44(%rbp)
	jne	LBB0_17
## %bb.5:
	movq	_GF119_DMA_V0_PAGE_SP@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	jmp	LBB0_8
LBB0_1:
	movq	_ENOMEM@GOTPCREL(%rip), %rcx
LBB0_16:
	xorl	%eax, %eax
	subl	(%rcx), %eax
	jmp	LBB0_17
LBB0_6:
	movl	16(%r12), %edx
	movq	(%r12), %rcx
	movq	8(%r12), %r8
	leaq	L_.str.1(%rip), %rsi
	movq	%r14, %rdi
	xorl	%eax, %eax
	callq	_nvif_ioctl
	xorl	%ecx, %ecx
	cmpq	$0, (%r12)
	setne	%cl
	cmpq	$0, 8(%r12)
	je	LBB0_8
## %bb.7:
	orb	$16, 2(%r15)
LBB0_8:
	movl	(%r15), %edx
	movl	%edx, %eax
	orl	$64, %eax
	testl	%ecx, %ecx
	cmovel	%edx, %eax
	movl	4(%r15), %ecx
	movl	%eax, %edx
	orl	$4, %edx
	movl	%edx, (%r15)
	cmpl	$130, %ecx
	je	LBB0_13
## %bb.9:
	cmpl	$129, %ecx
	je	LBB0_14
## %bb.10:
	cmpl	$128, %ecx
	jne	LBB0_15
## %bb.11:
	orl	$5, %eax
	jmp	LBB0_12
LBB0_13:
	orl	$6, %eax
	jmp	LBB0_12
LBB0_14:
	orl	$7, %eax
LBB0_12:
	movl	%eax, (%r15)
	xorl	%eax, %eax
LBB0_17:
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_15:
	movq	_EINVAL@GOTPCREL(%rip), %rcx
	jmp	LBB0_16
	.cfi_endproc
                                        ## -- End function
	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_gv100_dmaobj_func,4,2          ## @gv100_dmaobj_func
	.comm	_ENOSYS,4,2                     ## @ENOSYS
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"create gv100 dma size %d\n"

L_.str.1:                               ## @.str.1
	.asciz	"create gv100 dma vers %d page %d kind %02x\n"

	.comm	_GF119_DMA_V0_PAGE_SP,4,2       ## @GF119_DMA_V0_PAGE_SP
	.comm	_EINVAL,4,2                     ## @EINVAL
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_gv100_dmaobj_new               ; -- Begin function gv100_dmaobj_new
	.p2align	2
_gv100_dmaobj_new:                      ; @gv100_dmaobj_new
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #128
	.cfi_def_cfa_offset 128
	stp	x24, x23, [sp, #64]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #80]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #96]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #112]            ; 16-byte Folded Spill
	add	x29, sp, #112
	.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	x23, x4
	mov	x21, x1
	mov	x22, x0
	str	x2, [sp, #56]
	str	w3, [sp, #52]
	ldr	x20, [x1]
Lloh0:
	adrp	x8, _GFP_KERNEL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _GFP_KERNEL@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	mov	w0, #8
	bl	_kzalloc
	cbz	x0, LBB0_5
; %bb.1:
	mov	x19, x0
	add	x5, x0, #4
	str	x5, [x23]
Lloh3:
	adrp	x0, _gv100_dmaobj_func@GOTPAGE
Lloh4:
	ldr	x0, [x0, _gv100_dmaobj_func@GOTPAGEOFF]
	add	x3, sp, #56
	add	x4, sp, #52
	mov	x1, x22
	mov	x2, x21
	bl	_nvkm_dmaobj_ctor
	cbnz	w0, LBB0_7
; %bb.2:
Lloh5:
	adrp	x8, _ENOSYS@GOTPAGE
Lloh6:
	ldr	x8, [x8, _ENOSYS@GOTPAGEOFF]
Lloh7:
	ldr	w8, [x8]
	neg	w21, w8
	ldr	x22, [sp, #56]
	ldr	w2, [sp, #52]
Lloh8:
	adrp	x1, l_.str@PAGE
Lloh9:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x20
	bl	_nvif_ioctl
	ldr	q0, [x22]
	ldr	x8, [x22, #16]
	str	x8, [sp, #32]
	str	q0, [sp, #16]
	add	x1, sp, #56
	add	x2, sp, #52
	add	x3, sp, #16
	mov	x0, x21
	mov	w4, #0
	mov	w5, #0
	mov	w6, #0
	bl	_nvif_unpack
	cbz	w0, LBB0_8
; %bb.3:
	ldr	w8, [sp, #52]
	cbnz	w8, LBB0_7
; %bb.4:
Lloh10:
	adrp	x8, _GF119_DMA_V0_PAGE_SP@GOTPAGE
Lloh11:
	ldr	x8, [x8, _GF119_DMA_V0_PAGE_SP@GOTPAGEOFF]
Lloh12:
	ldr	w8, [x8]
	b	LBB0_10
LBB0_5:
Lloh13:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh14:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
LBB0_6:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_7:
	ldp	x29, x30, [sp, #112]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #96]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #80]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #64]             ; 16-byte Folded Reload
	add	sp, sp, #128
	ret
LBB0_8:
	ldr	w2, [x22, #16]
	ldp	x8, x9, [x22]
	stp	x8, x9, [sp]
Lloh15:
	adrp	x1, l_.str.1@PAGE
Lloh16:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x20
	bl	_nvif_ioctl
	ldp	x8, x9, [x22]
	cmp	x8, #0
	cset	w8, ne
	cbz	x9, LBB0_10
; %bb.9:
	ldr	w9, [x19]
	orr	w9, w9, #0x100000
	str	w9, [x19]
LBB0_10:
	ldp	w10, w9, [x19]
	orr	w11, w10, #0x40
	cmp	w8, #0
	csel	w8, w10, w11, eq
	orr	w10, w8, #0x4
	str	w10, [x19]
	cmp	w9, #130
	b.eq	LBB0_14
; %bb.11:
	cmp	w9, #129
	b.eq	LBB0_15
; %bb.12:
	cmp	w9, #128
	b.ne	LBB0_16
; %bb.13:
	mov	w0, #0
	mov	w9, #5
	orr	w8, w8, w9
	str	w8, [x19]
	b	LBB0_7
LBB0_14:
	mov	w0, #0
	orr	w8, w8, #0x6
	str	w8, [x19]
	b	LBB0_7
LBB0_15:
	mov	w0, #0
	orr	w8, w8, #0x7
	str	w8, [x19]
	b	LBB0_7
LBB0_16:
Lloh17:
	adrp	x8, _EINVAL@GOTPAGE
Lloh18:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
	b	LBB0_6
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGot	Lloh13, Lloh14
	.loh AdrpAdd	Lloh15, Lloh16
	.loh AdrpLdrGot	Lloh17, Lloh18
	.cfi_endproc
                                        ; -- End function
	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_gv100_dmaobj_func,4,2          ; @gv100_dmaobj_func
	.comm	_ENOSYS,4,2                     ; @ENOSYS
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"create gv100 dma size %d\n"

l_.str.1:                               ; @.str.1
	.asciz	"create gv100 dma vers %d page %d kind %02x\n"

	.comm	_GF119_DMA_V0_PAGE_SP,4,2       ; @GF119_DMA_V0_PAGE_SP
	.comm	_EINVAL,4,2                     ; @EINVAL
.subsections_via_symbols
