	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_nouveau_object_new             ## -- Begin function nouveau_object_new
	.p2align	4, 0x90
_nouveau_object_new:                    ## @nouveau_object_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	$72, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%r9d, -60(%rbp)                 ## 4-byte Spill
	movq	%r8, -80(%rbp)                  ## 8-byte Spill
	movl	%ecx, %r13d
	movl	%edx, %r12d
	movl	%esi, %r14d
	movq	%rdi, %r15
	movq	$0, -72(%rbp)
	movq	$0, -56(%rbp)
	callq	_nouveau_handle_ref
	movq	%rax, -104(%rbp)
	testq	%rax, %rax
	je	LBB0_1
## %bb.2:
	movq	%rax, %rbx
	movq	_NV_PARENT_CLASS@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	callq	_nv_iclass
	testl	%eax, %eax
	je	LBB0_3
## %bb.4:
	movl	%r12d, %r15d
	leaq	-48(%rbp), %rdx
	leaq	-96(%rbp), %rcx
	movq	%rbx, %rdi
	movl	%r13d, %esi
	callq	_nouveau_parent_sclass
	testl	%eax, %eax
	je	LBB0_6
## %bb.5:
	movl	%eax, %r12d
	leaq	L_.str.2(%rip), %rsi
	movq	%rbx, %rdi
	movl	%r13d, %edx
	callq	_nv_debug
	jmp	LBB0_23
LBB0_1:
	leaq	L_.str(%rip), %rsi
	xorl	%r12d, %r12d
	movq	%r15, %rdi
	movl	%r14d, %edx
	xorl	%eax, %eax
	callq	_nv_error
	movq	_ENOENT@GOTPCREL(%rip), %rax
	subl	(%rax), %r12d
	jmp	LBB0_24
LBB0_3:
	leaq	L_.str.1(%rip), %rsi
	xorl	%r12d, %r12d
	movq	%rbx, %rdi
	xorl	%eax, %eax
	callq	_nv_error
	movq	_EINVAL@GOTPCREL(%rip), %rax
	subl	(%rax), %r12d
LBB0_23:
	leaq	-104(%rbp), %rsi
	xorl	%edi, %edi
	callq	_nouveau_object_ref
LBB0_24:
	movl	%r12d, %eax
	addq	$72, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_6:
	movq	-48(%rbp), %rdi
	testq	%rdi, %rdi
	je	LBB0_11
## %bb.7:
	callq	_nouveau_object_inc
	movl	%eax, %r12d
	testl	%eax, %eax
	jne	LBB0_23
## %bb.8:
	movq	-48(%rbp), %rdi
	testq	%rdi, %rdi
	je	LBB0_11
## %bb.9:
	callq	_nv_engine
	cmpq	$0, (%rax)
	je	LBB0_11
## %bb.10:
	movq	-48(%rbp), %r12
	movq	%r12, %rdi
	callq	_nv_engine
	movq	(%rax), %rdx
	leaq	-72(%rbp), %r9
	movq	%rbx, %rdi
	movq	%r12, %rsi
	movq	-80(%rbp), %rcx                 ## 8-byte Reload
	movl	-60(%rbp), %r8d                 ## 4-byte Reload
	callq	_nouveau_object_ctor
	movl	%eax, %r12d
	testl	%eax, %eax
	jne	LBB0_21
	jmp	LBB0_12
LBB0_11:
	leaq	-72(%rbp), %rsi
	movq	%rbx, %rdi
	callq	_nouveau_object_ref
LBB0_12:
	movq	16(%rbp), %r13
	movq	-72(%rbp), %rdi
	movq	-48(%rbp), %rsi
	movq	-96(%rbp), %rdx
	leaq	-56(%rbp), %r9
	movq	-80(%rbp), %rcx                 ## 8-byte Reload
	movl	-60(%rbp), %r8d                 ## 4-byte Reload
	callq	_nouveau_object_ctor
	movl	%eax, %r12d
	movq	-56(%rbp), %rdi
	movq	%rdi, (%r13)
	testl	%eax, %eax
	jne	LBB0_20
## %bb.13:
	callq	_nouveau_object_inc
	movl	%eax, %r12d
	testl	%eax, %eax
	jne	LBB0_19
## %bb.14:
	movq	-56(%rbp), %rcx
	leaq	-88(%rbp), %r8
	movq	%rbx, %rdi
	movl	%r14d, %esi
	movl	%r15d, %edx
	callq	_nouveau_handle_create
	movl	%eax, %r12d
	testl	%eax, %eax
	jne	LBB0_18
## %bb.15:
	movq	-88(%rbp), %rdi
	callq	_nouveau_handle_init
	testl	%eax, %eax
	je	LBB0_16
## %bb.17:
	movl	%eax, %r12d
	movq	-88(%rbp), %rdi
	callq	_nouveau_handle_destroy
	jmp	LBB0_18
LBB0_16:
	xorl	%r12d, %r12d
LBB0_18:
	movq	-56(%rbp), %rdi
	xorl	%esi, %esi
	callq	_nouveau_object_dec
LBB0_19:
	leaq	-56(%rbp), %rsi
	xorl	%edi, %edi
	callq	_nouveau_object_ref
LBB0_20:
	leaq	-72(%rbp), %rsi
	xorl	%edi, %edi
	callq	_nouveau_object_ref
LBB0_21:
	movq	-48(%rbp), %rdi
	testq	%rdi, %rdi
	je	LBB0_23
## %bb.22:
	xorl	%esi, %esi
	callq	_nouveau_object_dec
	jmp	LBB0_23
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"parent 0x%08x not found\n"

	.comm	_ENOENT,4,2                     ## @ENOENT
	.comm	_NV_PARENT_CLASS,4,2            ## @NV_PARENT_CLASS
L_.str.1:                               ## @.str.1
	.asciz	"cannot have children\n"

	.comm	_EINVAL,4,2                     ## @EINVAL
L_.str.2:                               ## @.str.2
	.asciz	"illegal class 0x%04x\n"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_nouveau_object_new             ; -- Begin function nouveau_object_new
	.p2align	2
_nouveau_object_new:                    ; @nouveau_object_new
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #144
	.cfi_def_cfa_offset 144
	stp	x26, x25, [sp, #64]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #80]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #96]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #112]            ; 16-byte Folded Spill
	stp	x29, x30, [sp, #128]            ; 16-byte Folded Spill
	add	x29, sp, #128
	.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	x22, x6
	mov	x24, x5
	mov	x25, x4
	mov	x26, x3
	mov	x20, x2
	mov	x19, x1
	mov	x23, x0
	stp	xzr, xzr, [sp, #40]
	bl	_nouveau_handle_ref
	str	x0, [sp, #56]
	cbz	x0, LBB0_4
; %bb.1:
	mov	x21, x0
Lloh0:
	adrp	x8, _NV_PARENT_CLASS@GOTPAGE
Lloh1:
	ldr	x8, [x8, _NV_PARENT_CLASS@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	bl	_nv_iclass
	cbz	w0, LBB0_5
; %bb.2:
	add	x2, sp, #32
	add	x3, sp, #24
	mov	x0, x21
	mov	x1, x26
	bl	_nouveau_parent_sclass
	cbz	w0, LBB0_8
; %bb.3:
	mov	x23, x0
Lloh3:
	adrp	x1, l_.str.2@PAGE
Lloh4:
	add	x1, x1, l_.str.2@PAGEOFF
	mov	x0, x21
	mov	x2, x26
	bl	_nv_debug
	b	LBB0_6
LBB0_4:
	str	x19, [sp]
Lloh5:
	adrp	x1, l_.str@PAGE
Lloh6:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x23
	bl	_nv_error
Lloh7:
	adrp	x8, _ENOENT@GOTPAGE
Lloh8:
	ldr	x8, [x8, _ENOENT@GOTPAGEOFF]
Lloh9:
	ldr	w8, [x8]
	neg	w23, w8
	b	LBB0_7
LBB0_5:
Lloh10:
	adrp	x1, l_.str.1@PAGE
Lloh11:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x21
	bl	_nv_error
Lloh12:
	adrp	x8, _EINVAL@GOTPAGE
Lloh13:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh14:
	ldr	w8, [x8]
	neg	w23, w8
LBB0_6:
	add	x1, sp, #56
	mov	x0, #0
	bl	_nouveau_object_ref
LBB0_7:
	mov	x0, x23
	ldp	x29, x30, [sp, #128]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #112]            ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #96]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #80]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #64]             ; 16-byte Folded Reload
	add	sp, sp, #144
	ret
LBB0_8:
	ldr	x0, [sp, #32]
	cbz	x0, LBB0_13
; %bb.9:
	bl	_nouveau_object_inc
	mov	x23, x0
	cbnz	w0, LBB0_6
; %bb.10:
	ldr	x0, [sp, #32]
	cbz	x0, LBB0_13
; %bb.11:
	bl	_nv_engine
	ldr	x8, [x0]
	cbz	x8, LBB0_13
; %bb.12:
	ldr	x23, [sp, #32]
	mov	x0, x23
	bl	_nv_engine
	ldr	x2, [x0]
	add	x5, sp, #48
	mov	x0, x21
	mov	x1, x23
	mov	x3, x25
	mov	x4, x24
	bl	_nouveau_object_ctor
	mov	x23, x0
	cbnz	w0, LBB0_22
	b	LBB0_14
LBB0_13:
	add	x1, sp, #48
	mov	x0, x21
	bl	_nouveau_object_ref
LBB0_14:
	ldr	x0, [sp, #48]
	ldp	x2, x1, [sp, #24]
	add	x5, sp, #40
	mov	x3, x25
	mov	x4, x24
	bl	_nouveau_object_ctor
	mov	x23, x0
	ldr	x0, [sp, #40]
	str	x0, [x22]
	cbnz	w23, LBB0_21
; %bb.15:
	bl	_nouveau_object_inc
	mov	x23, x0
	cbnz	w0, LBB0_20
; %bb.16:
	ldr	x3, [sp, #40]
	add	x4, sp, #16
	mov	x0, x21
	mov	x1, x19
	mov	x2, x20
	bl	_nouveau_handle_create
	mov	x23, x0
	cbnz	w0, LBB0_19
; %bb.17:
	ldr	x0, [sp, #16]
	bl	_nouveau_handle_init
	mov	x23, x0
	cbz	w0, LBB0_19
; %bb.18:
	ldr	x0, [sp, #16]
	bl	_nouveau_handle_destroy
LBB0_19:
	ldr	x0, [sp, #40]
	mov	w1, #0
	bl	_nouveau_object_dec
LBB0_20:
	add	x1, sp, #40
	mov	x0, #0
	bl	_nouveau_object_ref
LBB0_21:
	add	x1, sp, #48
	mov	x0, #0
	bl	_nouveau_object_ref
LBB0_22:
	ldr	x0, [sp, #32]
	cbz	x0, LBB0_6
; %bb.23:
	mov	w1, #0
	bl	_nouveau_object_dec
	b	LBB0_6
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpAdd	Lloh10, Lloh11
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"parent 0x%08x not found\n"

	.comm	_ENOENT,4,2                     ; @ENOENT
	.comm	_NV_PARENT_CLASS,4,2            ; @NV_PARENT_CLASS
l_.str.1:                               ; @.str.1
	.asciz	"cannot have children\n"

	.comm	_EINVAL,4,2                     ; @EINVAL
l_.str.2:                               ; @.str.2
	.asciz	"illegal class 0x%04x\n"

.subsections_via_symbols
