	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_nouveau_gpuobj_destroy         ## -- Begin function nouveau_gpuobj_destroy
	.p2align	4, 0x90
_nouveau_gpuobj_destroy:                ## @nouveau_gpuobj_destroy
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r14
	pushq	%rbx
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	%rdi, %r14
	movq	_NVOBJ_FLAG_ZERO_FREE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, (%rdi)
	je	LBB0_4
## %bb.1:
	cmpl	$0, 4(%r14)
	jle	LBB0_4
## %bb.2:
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_3:                                 ## =>This Inner Loop Header: Depth=1
	movq	%r14, %rdi
	movl	%ebx, %esi
	xorl	%edx, %edx
	callq	_nv_wo32
	addl	$4, %ebx
	cmpl	4(%r14), %ebx
	jl	LBB0_3
LBB0_4:
	cmpq	$0, 24(%r14)
	je	LBB0_6
## %bb.5:
	leaq	24(%r14), %rbx
	movl	32(%r14), %edi
	callq	_nv_gpuobj
	movq	%rax, %rdi
	movq	%rbx, %rsi
	callq	_nouveau_mm_free
LBB0_6:
	cmpq	$0, 16(%r14)
	je	LBB0_8
## %bb.7:
	leaq	16(%r14), %rdi
	callq	_nouveau_mm_fini
LBB0_8:
	addq	$8, %r14
	movq	%r14, %rdi
	popq	%rbx
	popq	%r14
	popq	%rbp
	jmp	_nouveau_object_destroy         ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_NVOBJ_FLAG_ZERO_FREE,4,2       ## @NVOBJ_FLAG_ZERO_FREE
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_nouveau_gpuobj_destroy         ; -- Begin function nouveau_gpuobj_destroy
	.p2align	2
_nouveau_gpuobj_destroy:                ; @nouveau_gpuobj_destroy
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	mov	x19, x0
	ldr	w8, [x0]
Lloh0:
	adrp	x9, _NVOBJ_FLAG_ZERO_FREE@GOTPAGE
Lloh1:
	ldr	x9, [x9, _NVOBJ_FLAG_ZERO_FREE@GOTPAGEOFF]
Lloh2:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_4
; %bb.1:
	ldr	w8, [x19, #4]
	cmp	w8, #1
	b.lt	LBB0_4
; %bb.2:
	mov	w20, #0
LBB0_3:                                 ; =>This Inner Loop Header: Depth=1
	mov	x0, x19
	mov	x1, x20
	mov	w2, #0
	bl	_nv_wo32
	add	w20, w20, #4
	ldr	w8, [x19, #4]
	cmp	w20, w8
	b.lt	LBB0_3
LBB0_4:
	mov	x20, x19
	ldr	x8, [x20, #24]!
	cbz	x8, LBB0_6
; %bb.5:
	ldr	w0, [x19, #32]
	bl	_nv_gpuobj
	mov	x1, x20
	bl	_nouveau_mm_free
LBB0_6:
	mov	x0, x19
	ldr	x8, [x0, #16]!
	cbz	x8, LBB0_8
; %bb.7:
	bl	_nouveau_mm_fini
LBB0_8:
	add	x0, x19, #8
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	b	_nouveau_object_destroy
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_NVOBJ_FLAG_ZERO_FREE,4,2       ; @NVOBJ_FLAG_ZERO_FREE
.subsections_via_symbols
