	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function nvkm_ioctl_new
_nvkm_ioctl_new:                        ## @nvkm_ioctl_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	$120, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdx, %r12
	movq	%rsi, %r15
	movq	%rdi, %r14
	movq	%rdx, -72(%rbp)
	movl	%ecx, -52(%rbp)
	movq	$0, -48(%rbp)
	movq	_ENOSYS@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
	leaq	L_.str(%rip), %rsi
	movq	%r15, %rdi
	movl	%ecx, %edx
	xorl	%eax, %eax
	callq	_nvif_ioctl
	movups	(%r12), %xmm0
	movups	16(%r12), %xmm1
	movups	%xmm1, 16(%rsp)
	movups	%xmm0, (%rsp)
	leaq	-72(%rbp), %rsi
	leaq	-52(%rbp), %rdx
	movl	%ebx, %edi
	xorl	%ecx, %ecx
	xorl	%r8d, %r8d
	movl	$1, %r9d
	callq	_nvif_unpack
	movl	%eax, %r13d
	testl	%eax, %eax
	je	LBB0_1
LBB0_16:
	movl	%r13d, %eax
	addq	$120, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_1:
	movl	24(%r12), %edx
	movl	20(%r12), %ecx
	movq	(%r12), %r8
	movl	16(%r12), %r9d
	movl	12(%r12), %eax
	movl	8(%r12), %esi
	movl	%esi, 8(%rsp)
	movl	%eax, (%rsp)
	leaq	L_.str.1(%rip), %rsi
	xorl	%ebx, %ebx
	movq	%r15, %rdi
	xorl	%eax, %eax
	callq	_nvif_ioctl
	movq	8(%r15), %rax
	cmpq	$0, (%rax)
	je	LBB0_17
## %bb.2:
	movq	%r14, -64(%rbp)                 ## 8-byte Spill
	leaq	-128(%rbp), %r14
	.p2align	4, 0x90
LBB0_3:                                 ## =>This Inner Loop Header: Depth=1
	movq	%r14, %rdi
	xorl	%esi, %esi
	movl	$56, %edx
	callq	_memset
	movups	8(%r12), %xmm0
	movups	%xmm0, -96(%rbp)
	movq	-64(%rbp), %rax                 ## 8-byte Reload
	movq	%rax, -104(%rbp)
	movq	%r15, -112(%rbp)
	movq	8(%r15), %rax
	movq	%r15, %rdi
	movl	%ebx, %esi
	movq	%r14, %rdx
	callq	*(%rax)
	testl	%eax, %eax
	jne	LBB0_4
## %bb.5:                               ##   in Loop: Header=BB0_3 Depth=1
	incl	%ebx
	movq	-80(%rbp), %rax
	cmpq	(%r12), %rax
	jne	LBB0_3
## %bb.6:
	movq	-120(%rbp), %rdi
	testq	%rdi, %rdi
	je	LBB0_9
## %bb.7:
	callq	_nvkm_engine_ref
	movq	%rax, -120(%rbp)
	movq	%rax, %rdi
	callq	_IS_ERR
	testq	%rax, %rax
	je	LBB0_9
## %bb.8:
	movq	-120(%rbp), %rdi
	callq	_PTR_ERR
	movl	%eax, %r13d
	jmp	LBB0_16
LBB0_17:
	leaq	L_.str.2(%rip), %rsi
	xorl	%r13d, %r13d
	movq	%r15, %rdi
	xorl	%eax, %eax
	callq	_nvif_ioctl
	movq	_EINVAL@GOTPCREL(%rip), %rax
	subl	(%rax), %r13d
	jmp	LBB0_16
LBB0_4:
	movl	%eax, %r13d
	jmp	LBB0_16
LBB0_9:
	leaq	-120(%rbp), %rbx
	movq	-72(%rbp), %rsi
	movl	-52(%rbp), %edx
	leaq	-128(%rbp), %rdi
	leaq	-48(%rbp), %rcx
	callq	*-128(%rbp)
	movl	%eax, %r13d
	movq	%rbx, %rdi
	callq	_nvkm_engine_unref
	testl	%r13d, %r13d
	jne	LBB0_15
## %bb.10:
	movq	-48(%rbp), %rdi
	callq	_nvkm_object_init
	movl	%eax, %r13d
	testl	%eax, %eax
	je	LBB0_11
LBB0_14:
	movq	-48(%rbp), %rdi
	xorl	%esi, %esi
	callq	_nvkm_object_fini
LBB0_15:
	leaq	-48(%rbp), %rdi
	callq	_nvkm_object_del
	jmp	LBB0_16
LBB0_11:
	movq	-48(%rbp), %rdi
	addq	$4, %rdi
	movq	%r15, %rsi
	callq	_list_add
	movq	-48(%rbp), %rdi
	callq	_nvkm_object_insert
	testq	%rax, %rax
	je	LBB0_13
## %bb.12:
	movq	-48(%rbp), %rax
	movq	-64(%rbp), %rcx                 ## 8-byte Reload
	movq	%rax, (%rcx)
	xorl	%r13d, %r13d
	jmp	LBB0_16
LBB0_13:
	movq	_EEXIST@GOTPCREL(%rip), %rax
	xorl	%r13d, %r13d
	subl	(%rax), %r13d
	jmp	LBB0_14
	.cfi_endproc
                                        ## -- End function
	.comm	_ENOSYS,4,2                     ## @ENOSYS
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"new size %d\n"

L_.str.1:                               ## @.str.1
	.asciz	"new vers %d handle %08x class %08x route %02x token %llx object %016llx\n"

L_.str.2:                               ## @.str.2
	.asciz	"cannot have children\n"

	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_EEXIST,4,2                     ## @EEXIST
	.no_dead_strip	_nvkm_ioctl_new
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function nvkm_ioctl_new
_nvkm_ioctl_new:                        ; @nvkm_ioctl_new
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #192
	.cfi_def_cfa_offset 192
	stp	x24, x23, [sp, #128]            ; 16-byte Folded Spill
	stp	x22, x21, [sp, #144]            ; 16-byte Folded Spill
	stp	x20, x19, [sp, #160]            ; 16-byte Folded Spill
	stp	x29, x30, [sp, #176]            ; 16-byte Folded Spill
	add	x29, sp, #176
	.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
                                        ; kill: def $w3 killed $w3 def $x3
	mov	x21, x2
	mov	x20, x1
	mov	x19, x0
	stur	x2, [x29, #-56]
	stur	w3, [x29, #-60]
	stur	xzr, [x29, #-72]
Lloh0:
	adrp	x8, _ENOSYS@GOTPAGE
Lloh1:
	ldr	x8, [x8, _ENOSYS@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	neg	w22, w8
	str	x3, [sp]
Lloh3:
	adrp	x1, l_.str@PAGE
Lloh4:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x20
	bl	_nvif_ioctl
	ldp	q0, q1, [x21]
	stp	q0, q1, [sp, #48]
	sub	x1, x29, #56
	sub	x2, x29, #60
	add	x3, sp, #48
	mov	x0, x22
	mov	w4, #0
	mov	w5, #0
	mov	w6, #1
	bl	_nvif_unpack
	mov	x22, x0
	cbz	w0, LBB0_2
LBB0_1:
	mov	x0, x22
	ldp	x29, x30, [sp, #176]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #160]            ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #144]            ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #128]            ; 16-byte Folded Reload
	add	sp, sp, #192
	ret
LBB0_2:
	ldr	x8, [x21]
	ldp	w10, w9, [x21, #20]
	ldp	w12, w11, [x21, #12]
	ldr	w13, [x21, #8]
	stp	x12, x13, [sp, #32]
	stp	x8, x11, [sp, #16]
	stp	x9, x10, [sp]
Lloh5:
	adrp	x1, l_.str.1@PAGE
Lloh6:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x20
	bl	_nvif_ioctl
	ldr	x8, [x20, #8]
	ldr	x8, [x8]
	cbz	x8, LBB0_9
; %bb.3:
	mov	w23, #0
LBB0_4:                                 ; =>This Inner Loop Header: Depth=1
	add	x0, sp, #48
	mov	w1, #0
	mov	w2, #56
	bl	_memset
	ldur	q0, [x21, #8]
	str	q0, [sp, #80]
	stp	x20, x19, [sp, #64]
	ldr	x8, [x20, #8]
	ldr	x8, [x8]
	add	x2, sp, #48
	mov	x0, x20
	mov	x1, x23
	blr	x8
	cbnz	w0, LBB0_10
; %bb.5:                                ;   in Loop: Header=BB0_4 Depth=1
	add	w23, w23, #1
	ldr	x8, [sp, #96]
	ldr	x9, [x21]
	cmp	x8, x9
	b.ne	LBB0_4
; %bb.6:
	ldr	x0, [sp, #56]
	cbz	x0, LBB0_11
; %bb.7:
	bl	_nvkm_engine_ref
	str	x0, [sp, #56]
	bl	_IS_ERR
	cbz	x0, LBB0_11
; %bb.8:
	ldr	x0, [sp, #56]
	bl	_PTR_ERR
	mov	x22, x0
	b	LBB0_1
LBB0_9:
Lloh7:
	adrp	x1, l_.str.2@PAGE
Lloh8:
	add	x1, x1, l_.str.2@PAGEOFF
	mov	x0, x20
	bl	_nvif_ioctl
Lloh9:
	adrp	x8, _EINVAL@GOTPAGE
Lloh10:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh11:
	ldr	w8, [x8]
	neg	w22, w8
	b	LBB0_1
LBB0_10:
	mov	x22, x0
	b	LBB0_1
LBB0_11:
	add	x8, sp, #48
	add	x21, x8, #8
	ldr	x8, [sp, #48]
	ldur	x1, [x29, #-56]
	ldur	w2, [x29, #-60]
	add	x0, sp, #48
	sub	x3, x29, #72
	blr	x8
	mov	x22, x0
	mov	x0, x21
	bl	_nvkm_engine_unref
	cbnz	w22, LBB0_14
; %bb.12:
	ldur	x0, [x29, #-72]
	bl	_nvkm_object_init
	mov	x22, x0
	cbz	w0, LBB0_15
LBB0_13:
	ldur	x0, [x29, #-72]
	mov	w1, #0
	bl	_nvkm_object_fini
LBB0_14:
	sub	x0, x29, #72
	bl	_nvkm_object_del
	b	LBB0_1
LBB0_15:
	ldur	x8, [x29, #-72]
	add	x0, x8, #4
	mov	x1, x20
	bl	_list_add
	ldur	x0, [x29, #-72]
	bl	_nvkm_object_insert
	cbz	x0, LBB0_17
; %bb.16:
	mov	w22, #0
	ldur	x8, [x29, #-72]
	str	x8, [x19]
	b	LBB0_1
LBB0_17:
Lloh12:
	adrp	x8, _EEXIST@GOTPAGE
Lloh13:
	ldr	x8, [x8, _EEXIST@GOTPAGEOFF]
Lloh14:
	ldr	w8, [x8]
	neg	w22, w8
	b	LBB0_13
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpAdd	Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.cfi_endproc
                                        ; -- End function
	.comm	_ENOSYS,4,2                     ; @ENOSYS
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"new size %d\n"

l_.str.1:                               ; @.str.1
	.asciz	"new vers %d handle %08x class %08x route %02x token %llx object %016llx\n"

l_.str.2:                               ; @.str.2
	.asciz	"cannot have children\n"

	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_EEXIST,4,2                     ; @EEXIST
	.no_dead_strip	_nvkm_ioctl_new
.subsections_via_symbols
