	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_gf100_dmaobj_new               ## -- Begin function gf100_dmaobj_new
	.p2align	4, 0x90
_gf100_dmaobj_new:                      ## @gf100_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	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%r8, %r15
	movq	%rsi, %r12
	movq	%rdi, %rbx
	movq	%rdx, -56(%rbp)
	movl	%ecx, -44(%rbp)
	movq	8(%rsi), %r14
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	$16, %edi
	callq	_kzalloc
	testq	%rax, %rax
	je	LBB0_1
## %bb.3:
	movq	%rax, -64(%rbp)                 ## 8-byte Spill
	leaq	8(%rax), %r13
	movq	%r13, (%r15)
	movq	_gf100_dmaobj_func@GOTPCREL(%rip), %rdi
	leaq	-56(%rbp), %rcx
	leaq	-44(%rbp), %r8
	movq	%rbx, %rsi
	movq	%r12, %rdx
	movq	%r13, %r9
	callq	_nvkm_dmaobj_ctor
	testl	%eax, %eax
	jne	LBB0_21
## %bb.4:
	movq	_ENOSYS@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
	movq	-56(%rbp), %r15
	movl	-44(%rbp), %edx
	leaq	L_.str(%rip), %rsi
	movq	%r14, %rdi
	xorl	%eax, %eax
	callq	_nvif_ioctl
	movq	(%r15), %rcx
	movl	8(%r15), %r8d
	leaq	-56(%rbp), %rsi
	leaq	-44(%rbp), %rdx
	movl	%ebx, %edi
	xorl	%r9d, %r9d
	pushq	$0
	pushq	$0
	callq	_nvif_unpack
	addq	$16, %rsp
	testl	%eax, %eax
	je	LBB0_5
## %bb.6:
	cmpl	$0, -44(%rbp)
	jne	LBB0_21
## %bb.7:
	xorl	%edx, %edx
	cmpl	$129, (%r13)
	setne	%dl
	movq	_GF100_DMA_V0_PRIV_US@GOTPCREL(%rip), %r15
	cmoveq	_GF100_DMA_V0_PRIV_VM@GOTPCREL(%rip), %r15
	movq	_GF100_DMA_V0_KIND_PITCH@GOTPCREL(%rip), %rbx
	cmoveq	_GF100_DMA_V0_KIND_VM@GOTPCREL(%rip), %rbx
	shll	$17, %edx
	jmp	LBB0_8
LBB0_1:
	movq	_ENOMEM@GOTPCREL(%rip), %rcx
LBB0_2:
	xorl	%eax, %eax
	subl	(%rcx), %eax
LBB0_21:
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_5:
	movl	8(%r15), %edx
	leaq	4(%r15), %rbx
	movl	(%r15), %ecx
	movl	4(%r15), %r8d
	leaq	L_.str.1(%rip), %rsi
	movq	%r14, %rdi
	xorl	%eax, %eax
	callq	_nvif_ioctl
	xorl	%edx, %edx
LBB0_8:
	movq	-64(%rbp), %rdi                 ## 8-byte Reload
	movl	(%r15), %ecx
	cmpl	$3, %ecx
	jl	LBB0_10
LBB0_9:
	movq	_EINVAL@GOTPCREL(%rip), %rcx
	jmp	LBB0_2
LBB0_10:
	movl	(%rbx), %eax
	shll	$22, %eax
	shll	$20, %ecx
	orl	%eax, %ecx
	orl	(%r12), %ecx
	orl	(%rdi), %ecx
	movl	%ecx, (%rdi)
	orl	%edx, 4(%rdi)
	movl	8(%rdi), %edx
	addl	$-128, %edx
	cmpl	$3, %edx
	ja	LBB0_9
## %bb.11:
	movl	$65536, %eax                    ## imm = 0x10000
	leaq	LJTI0_0(%rip), %rsi
	movslq	(%rsi,%rdx,4), %rdx
	addq	%rsi, %rdx
	jmpq	*%rdx
LBB0_12:
	movl	$196608, %eax                   ## imm = 0x30000
	jmp	LBB0_14
LBB0_13:
	movl	$131072, %eax                   ## imm = 0x20000
LBB0_14:
	orl	%eax, %ecx
	movl	%ecx, (%rdi)
LBB0_15:
	movl	12(%rdi), %edx
	xorl	%eax, %eax
	cmpl	$132, %edx
	je	LBB0_19
## %bb.16:
	cmpl	$134, %edx
	je	LBB0_19
## %bb.17:
	cmpl	$135, %edx
	jne	LBB0_21
## %bb.18:
	orl	$262144, %ecx                   ## imm = 0x40000
	jmp	LBB0_20
LBB0_19:
	orl	$524288, %ecx                   ## imm = 0x80000
LBB0_20:
	movl	%ecx, (%rdi)
	jmp	LBB0_21
	.cfi_endproc
	.p2align	2, 0x90
	.data_region jt32
.set L0_0_set_14, LBB0_14-LJTI0_0
.set L0_0_set_15, LBB0_15-LJTI0_0
.set L0_0_set_12, LBB0_12-LJTI0_0
.set L0_0_set_13, LBB0_13-LJTI0_0
LJTI0_0:
	.long	L0_0_set_14
	.long	L0_0_set_15
	.long	L0_0_set_12
	.long	L0_0_set_13
	.end_data_region
                                        ## -- End function
	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_gf100_dmaobj_func,4,2          ## @gf100_dmaobj_func
	.comm	_ENOSYS,4,2                     ## @ENOSYS
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"create gf100 dma size %d\n"

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

	.comm	_GF100_DMA_V0_KIND_PITCH,4,2    ## @GF100_DMA_V0_KIND_PITCH
	.comm	_GF100_DMA_V0_PRIV_US,4,2       ## @GF100_DMA_V0_PRIV_US
	.comm	_GF100_DMA_V0_KIND_VM,4,2       ## @GF100_DMA_V0_KIND_VM
	.comm	_GF100_DMA_V0_PRIV_VM,4,2       ## @GF100_DMA_V0_PRIV_VM
	.comm	_EINVAL,4,2                     ## @EINVAL
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_gf100_dmaobj_new               ; -- Begin function gf100_dmaobj_new
	.p2align	2
_gf100_dmaobj_new:                      ; @gf100_dmaobj_new
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #96
	.cfi_def_cfa_offset 96
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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	x24, x4
	mov	x20, x1
	mov	x23, x0
	str	x2, [sp, #24]
	str	w3, [sp, #20]
	ldr	x21, [x1, #8]
Lloh0:
	adrp	x8, _GFP_KERNEL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _GFP_KERNEL@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	mov	w0, #16
	bl	_kzalloc
	cbz	x0, LBB0_5
; %bb.1:
	mov	x19, x0
	add	x22, x0, #8
	str	x22, [x24]
Lloh3:
	adrp	x0, _gf100_dmaobj_func@GOTPAGE
Lloh4:
	ldr	x0, [x0, _gf100_dmaobj_func@GOTPAGEOFF]
	add	x3, sp, #24
	add	x4, sp, #20
	mov	x1, x23
	mov	x2, x20
	mov	x5, x22
	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	w23, w8
	ldr	x24, [sp, #24]
	ldr	w2, [sp, #20]
Lloh8:
	adrp	x1, l_.str@PAGE
Lloh9:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x21
	bl	_nvif_ioctl
	ldr	x3, [x24]
	ldr	w4, [x24, #8]
	add	x1, sp, #24
	add	x2, sp, #20
	mov	x0, x23
	mov	w5, #0
	mov	w6, #0
	mov	w7, #0
	bl	_nvif_unpack
	cbz	w0, LBB0_8
; %bb.3:
	ldr	w8, [sp, #20]
	cbnz	w8, LBB0_7
; %bb.4:
	ldr	w8, [x22]
	cmp	w8, #129
	cset	w8, ne
Lloh10:
	adrp	x9, _GF100_DMA_V0_KIND_PITCH@GOTPAGE
Lloh11:
	ldr	x9, [x9, _GF100_DMA_V0_KIND_PITCH@GOTPAGEOFF]
Lloh12:
	adrp	x10, _GF100_DMA_V0_KIND_VM@GOTPAGE
Lloh13:
	ldr	x10, [x10, _GF100_DMA_V0_KIND_VM@GOTPAGEOFF]
	csel	x22, x10, x9, eq
Lloh14:
	adrp	x9, _GF100_DMA_V0_PRIV_US@GOTPAGE
Lloh15:
	ldr	x9, [x9, _GF100_DMA_V0_PRIV_US@GOTPAGEOFF]
Lloh16:
	adrp	x10, _GF100_DMA_V0_PRIV_VM@GOTPAGE
Lloh17:
	ldr	x10, [x10, _GF100_DMA_V0_PRIV_VM@GOTPAGEOFF]
	csel	x24, x10, x9, eq
	lsl	w9, w8, #17
	b	LBB0_9
LBB0_5:
Lloh18:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh19:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
LBB0_6:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_7:
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #96
	ret
LBB0_8:
	ldr	w2, [x24, #8]
	mov	x22, x24
	ldr	w8, [x22, #4]!
	ldr	w9, [x24]
	stp	x9, x8, [sp]
Lloh20:
	adrp	x1, l_.str.1@PAGE
Lloh21:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x21
	bl	_nvif_ioctl
	mov	w9, #0
LBB0_9:
	ldr	w8, [x24]
	cmp	w8, #3
	b.lt	LBB0_11
LBB0_10:
Lloh22:
	adrp	x8, _EINVAL@GOTPAGE
Lloh23:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
	b	LBB0_6
LBB0_11:
	ldr	w10, [x22]
	lsl	w10, w10, #22
	orr	w8, w10, w8, lsl #20
	ldr	w10, [x20]
	orr	w8, w8, w10
	ldp	w10, w11, [x19]
	orr	w8, w8, w10
	orr	w9, w11, w9
	stp	w8, w9, [x19]
	ldr	w9, [x19, #8]
	sub	w10, w9, #128
	cmp	w10, #3
	b.hi	LBB0_10
; %bb.12:
	mov	w9, #65536
Lloh24:
	adrp	x11, lJTI0_0@PAGE
Lloh25:
	add	x11, x11, lJTI0_0@PAGEOFF
	adr	x12, LBB0_13
	ldrb	w13, [x11, x10]
	add	x12, x12, x13, lsl #2
	br	x12
LBB0_13:
	mov	w9, #196608
	b	LBB0_15
LBB0_14:
	mov	w9, #131072
LBB0_15:
	orr	w8, w8, w9
	str	w8, [x19]
LBB0_16:
	ldr	w9, [x19, #12]
	cmp	w9, #132
	b.eq	LBB0_20
; %bb.17:
	cmp	w9, #134
	b.eq	LBB0_20
; %bb.18:
	cmp	w9, #135
	b.ne	LBB0_22
; %bb.19:
	mov	w0, #0
	orr	w8, w8, #0x40000
	b	LBB0_21
LBB0_20:
	mov	w0, #0
	orr	w8, w8, #0x80000
LBB0_21:
	str	w8, [x19]
	b	LBB0_7
LBB0_22:
	mov	w0, #0
	b	LBB0_7
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh16, Lloh17
	.loh AdrpLdrGot	Lloh14, Lloh15
	.loh AdrpLdrGot	Lloh12, Lloh13
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh18, Lloh19
	.loh AdrpAdd	Lloh20, Lloh21
	.loh AdrpLdrGot	Lloh22, Lloh23
	.loh AdrpAdd	Lloh24, Lloh25
	.cfi_endproc
	.section	__TEXT,__const
lJTI0_0:
	.byte	(LBB0_15-LBB0_13)>>2
	.byte	(LBB0_16-LBB0_13)>>2
	.byte	(LBB0_13-LBB0_13)>>2
	.byte	(LBB0_14-LBB0_13)>>2
                                        ; -- End function
	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_gf100_dmaobj_func,4,2          ; @gf100_dmaobj_func
	.comm	_ENOSYS,4,2                     ; @ENOSYS
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"create gf100 dma size %d\n"

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

	.comm	_GF100_DMA_V0_KIND_PITCH,4,2    ; @GF100_DMA_V0_KIND_PITCH
	.comm	_GF100_DMA_V0_PRIV_US,4,2       ; @GF100_DMA_V0_PRIV_US
	.comm	_GF100_DMA_V0_KIND_VM,4,2       ; @GF100_DMA_V0_KIND_VM
	.comm	_GF100_DMA_V0_PRIV_VM,4,2       ; @GF100_DMA_V0_PRIV_VM
	.comm	_EINVAL,4,2                     ; @EINVAL
.subsections_via_symbols
