	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function nouveau_gem_info
_nouveau_gem_info:                      ## @nouveau_gem_info
	.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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdx, %r14
	movq	%rsi, %rbx
	callq	_nouveau_cli
	movq	%rax, %r15
	movq	%rbx, %rdi
	callq	_nouveau_gem_object
	movq	%rax, %rbx
	leaq	24(%r15), %r12
	cmpl	$0, 32(%r15)
	leaq	8(%r15), %rax
	cmoveq	%rax, %r12
	movl	64(%rbx), %edi
	callq	_is_power_of_2
	testq	%rax, %rax
	je	LBB0_2
## %bb.1:
	leaq	64(%rbx), %rax
	jmp	LBB0_5
LBB0_2:
	movq	40(%rbx), %rax
	movq	_TTM_PL_TT@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_4
## %bb.3:
	movq	_NOUVEAU_GEM_DOMAIN_GART@GOTPCREL(%rip), %rax
	jmp	LBB0_5
LBB0_4:
	movq	_NOUVEAU_GEM_DOMAIN_VRAM@GOTPCREL(%rip), %rax
LBB0_5:
	movl	(%rax), %eax
	movl	%eax, 20(%r14)
	movl	56(%rbx), %eax
	movl	%eax, 16(%r14)
	movq	(%r12), %rax
	movq	_NVIF_CLASS_VMM_NV50@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jl	LBB0_8
## %bb.6:
	movq	%rbx, %rdi
	movq	%r12, %rsi
	callq	_nouveau_vma_find
	testq	%rax, %rax
	je	LBB0_14
## %bb.7:
	movl	(%rax), %eax
	movl	%eax, 16(%r14)
LBB0_8:
	movq	%rbx, %rdi
	addq	$32, %rdi
	movl	48(%rbx), %eax
	movq	_PAGE_SHIFT@GOTPCREL(%rip), %rcx
	movb	(%rcx), %cl
	shll	%cl, %eax
	movl	%eax, (%r14)
	callq	_drm_vma_node_offset_addr
	movl	%eax, 12(%r14)
	movl	24(%rbx), %eax
	movl	%eax, 8(%r14)
	xorl	%eax, %eax
	cmpq	$0, 16(%rbx)
	jne	LBB0_10
## %bb.9:
	movq	_NOUVEAU_GEM_TILE_NONCONTIG@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
LBB0_10:
	movq	(%r15), %rcx
	movq	_NV_DEVICE_INFO_V0_FERMI@GOTPCREL(%rip), %rdx
	cmpq	(%rdx), %rcx
	jge	LBB0_13
## %bb.11:
	movq	_NV_DEVICE_INFO_V0_TESLA@GOTPCREL(%rip), %rdx
	cmpq	(%rdx), %rcx
	jge	LBB0_15
## %bb.12:
	orl	8(%rbx), %eax
	movl	%eax, 4(%r14)
	jmp	LBB0_17
LBB0_13:
	movl	(%rbx), %ecx
	shll	$8, %ecx
	orl	%eax, %ecx
	jmp	LBB0_16
LBB0_14:
	movq	_EINVAL@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
	jmp	LBB0_18
LBB0_15:
	movl	(%rbx), %ecx
	movl	4(%rbx), %edx
	shll	$8, %ecx
	shll	$16, %edx
	orl	%eax, %ecx
	orl	%edx, %ecx
LBB0_16:
	movl	%ecx, 4(%r14)
LBB0_17:
	xorl	%eax, %eax
LBB0_18:
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_TTM_PL_TT,8,3                  ## @TTM_PL_TT
	.comm	_NOUVEAU_GEM_DOMAIN_GART,4,2    ## @NOUVEAU_GEM_DOMAIN_GART
	.comm	_NOUVEAU_GEM_DOMAIN_VRAM,4,2    ## @NOUVEAU_GEM_DOMAIN_VRAM
	.comm	_NVIF_CLASS_VMM_NV50,8,3        ## @NVIF_CLASS_VMM_NV50
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_PAGE_SHIFT,4,2                 ## @PAGE_SHIFT
	.comm	_NOUVEAU_GEM_TILE_NONCONTIG,4,2 ## @NOUVEAU_GEM_TILE_NONCONTIG
	.comm	_NV_DEVICE_INFO_V0_FERMI,8,3    ## @NV_DEVICE_INFO_V0_FERMI
	.comm	_NV_DEVICE_INFO_V0_TESLA,8,3    ## @NV_DEVICE_INFO_V0_TESLA
	.no_dead_strip	_nouveau_gem_info
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function nouveau_gem_info
_nouveau_gem_info:                      ; @nouveau_gem_info
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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	x19, x2
	mov	x20, x1
	bl	_nouveau_cli
	mov	x21, x0
	mov	x0, x20
	bl	_nouveau_gem_object
	mov	x20, x0
	add	x8, x21, #24
	ldr	w9, [x21, #32]
	add	x10, x21, #8
	cmp	w9, #0
	csel	x22, x10, x8, eq
	mov	x23, x0
	ldr	w0, [x23, #64]!
	bl	_is_power_of_2
	cbnz	x0, LBB0_2
; %bb.1:
	ldr	x8, [x20, #40]
Lloh0:
	adrp	x9, _TTM_PL_TT@GOTPAGE
Lloh1:
	ldr	x9, [x9, _TTM_PL_TT@GOTPAGEOFF]
Lloh2:
	ldr	x9, [x9]
Lloh3:
	adrp	x10, _NOUVEAU_GEM_DOMAIN_VRAM@GOTPAGE
Lloh4:
	ldr	x10, [x10, _NOUVEAU_GEM_DOMAIN_VRAM@GOTPAGEOFF]
Lloh5:
	adrp	x11, _NOUVEAU_GEM_DOMAIN_GART@GOTPAGE
Lloh6:
	ldr	x11, [x11, _NOUVEAU_GEM_DOMAIN_GART@GOTPAGEOFF]
	cmp	x8, x9
	csel	x23, x11, x10, eq
LBB0_2:
	ldr	w8, [x23]
	ldr	w9, [x20, #56]
	stp	w9, w8, [x19, #16]
	ldr	x8, [x22]
Lloh7:
	adrp	x9, _NVIF_CLASS_VMM_NV50@GOTPAGE
Lloh8:
	ldr	x9, [x9, _NVIF_CLASS_VMM_NV50@GOTPAGEOFF]
Lloh9:
	ldr	x9, [x9]
	cmp	x8, x9
	b.lt	LBB0_5
; %bb.3:
	mov	x0, x20
	mov	x1, x22
	bl	_nouveau_vma_find
	cbz	x0, LBB0_9
; %bb.4:
	ldr	w8, [x0]
	str	w8, [x19, #16]
LBB0_5:
	add	x0, x20, #32
	ldr	w8, [x20, #48]
Lloh10:
	adrp	x9, _PAGE_SHIFT@GOTPAGE
Lloh11:
	ldr	x9, [x9, _PAGE_SHIFT@GOTPAGEOFF]
Lloh12:
	ldr	w9, [x9]
	lsl	w8, w8, w9
	str	w8, [x19]
	bl	_drm_vma_node_offset_addr
	ldr	w8, [x20, #24]
	stp	w8, w0, [x19, #8]
	ldr	x8, [x20, #16]
Lloh13:
	adrp	x9, _NOUVEAU_GEM_TILE_NONCONTIG@GOTPAGE
Lloh14:
	ldr	x9, [x9, _NOUVEAU_GEM_TILE_NONCONTIG@GOTPAGEOFF]
Lloh15:
	ldr	w9, [x9]
	cmp	x8, #0
	csel	w8, w9, wzr, eq
	ldr	x9, [x21]
Lloh16:
	adrp	x10, _NV_DEVICE_INFO_V0_FERMI@GOTPAGE
Lloh17:
	ldr	x10, [x10, _NV_DEVICE_INFO_V0_FERMI@GOTPAGEOFF]
Lloh18:
	ldr	x10, [x10]
	cmp	x9, x10
	b.ge	LBB0_8
; %bb.6:
Lloh19:
	adrp	x10, _NV_DEVICE_INFO_V0_TESLA@GOTPAGE
Lloh20:
	ldr	x10, [x10, _NV_DEVICE_INFO_V0_TESLA@GOTPAGEOFF]
Lloh21:
	ldr	x10, [x10]
	cmp	x9, x10
	b.ge	LBB0_10
; %bb.7:
	mov	w0, #0
	ldr	w9, [x20, #8]
	orr	w8, w9, w8
	b	LBB0_11
LBB0_8:
	mov	w0, #0
	ldr	w9, [x20]
	orr	w8, w8, w9, lsl #8
	b	LBB0_11
LBB0_9:
Lloh22:
	adrp	x8, _EINVAL@GOTPAGE
Lloh23:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh24:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_12
LBB0_10:
	mov	w0, #0
	ldp	w9, w10, [x20]
	orr	w8, w8, w9, lsl #8
	orr	w8, w8, w10, lsl #16
LBB0_11:
	str	w8, [x19, #4]
LBB0_12:
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh24
	.cfi_endproc
                                        ; -- End function
	.comm	_TTM_PL_TT,8,3                  ; @TTM_PL_TT
	.comm	_NOUVEAU_GEM_DOMAIN_GART,4,2    ; @NOUVEAU_GEM_DOMAIN_GART
	.comm	_NOUVEAU_GEM_DOMAIN_VRAM,4,2    ; @NOUVEAU_GEM_DOMAIN_VRAM
	.comm	_NVIF_CLASS_VMM_NV50,8,3        ; @NVIF_CLASS_VMM_NV50
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_PAGE_SHIFT,4,2                 ; @PAGE_SHIFT
	.comm	_NOUVEAU_GEM_TILE_NONCONTIG,4,2 ; @NOUVEAU_GEM_TILE_NONCONTIG
	.comm	_NV_DEVICE_INFO_V0_FERMI,8,3    ; @NV_DEVICE_INFO_V0_FERMI
	.comm	_NV_DEVICE_INFO_V0_TESLA,8,3    ; @NV_DEVICE_INFO_V0_TESLA
	.no_dead_strip	_nouveau_gem_info
.subsections_via_symbols
