	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function set_placement_range
_set_placement_range:                   ## @set_placement_range
	.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
	movl	%esi, %r14d
	movq	%rdi, %r15
	movl	16(%rdi), %edi
	callq	_nouveau_bdev
	movq	%rax, %rbx
	movl	(%rax), %edi
	callq	_nouveau_fb
	movl	(%rax), %r12d
	movq	_PAGE_SHIFT@GOTPCREL(%rip), %rax
	movb	(%rax), %cl
	sarl	%cl, %r12d
	movl	(%rbx), %edi
	callq	_nv_device
	movq	(%rax), %rax
	movq	_NV_10@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_8
## %bb.1:
	cmpq	$0, 24(%r15)
	je	LBB0_8
## %bb.2:
	movq	_TTM_PL_FLAG_VRAM@GOTPCREL(%rip), %rax
	testl	%r14d, (%rax)
	je	LBB0_8
## %bb.3:
	leal	3(%r12), %eax
	testl	%r12d, %r12d
	cmovnsl	%r12d, %eax
	sarl	$2, %eax
	cmpl	%eax, 12(%r15)
	jge	LBB0_8
## %bb.4:
	movq	_NOUVEAU_GEM_TILE_ZETA@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, (%r15)
	je	LBB0_6
## %bb.5:
	movl	%r12d, %eax
	shrl	$31, %eax
	addl	%r12d, %eax
	sarl	%eax
	movl	%eax, 4(%r15)
	movl	$-1, %eax
	jmp	LBB0_7
LBB0_6:
	movl	$0, 4(%r15)
	movl	%r12d, %eax
	shrl	$31, %eax
	addl	%r12d, %eax
	sarl	%eax
LBB0_7:
	movl	%eax, 8(%r15)
LBB0_8:
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_PAGE_SHIFT,4,2                 ## @PAGE_SHIFT
	.comm	_NV_10,8,3                      ## @NV_10
	.comm	_TTM_PL_FLAG_VRAM,4,2           ## @TTM_PL_FLAG_VRAM
	.comm	_NOUVEAU_GEM_TILE_ZETA,4,2      ## @NOUVEAU_GEM_TILE_ZETA
	.no_dead_strip	_set_placement_range
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function set_placement_range
_set_placement_range:                   ; @set_placement_range
	.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	x20, x1
	mov	x19, x0
	ldr	w0, [x0, #16]
	bl	_nouveau_bdev
	mov	x21, x0
	ldr	w0, [x0]
	bl	_nouveau_fb
	ldr	w22, [x0]
Lloh0:
	adrp	x8, _PAGE_SHIFT@GOTPAGE
Lloh1:
	ldr	x8, [x8, _PAGE_SHIFT@GOTPAGEOFF]
Lloh2:
	ldr	w23, [x8]
	ldr	w0, [x21]
	bl	_nv_device
	ldr	x8, [x0]
Lloh3:
	adrp	x9, _NV_10@GOTPAGE
Lloh4:
	ldr	x9, [x9, _NV_10@GOTPAGEOFF]
Lloh5:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_8
; %bb.1:
	ldr	x8, [x19, #24]
	cbz	x8, LBB0_8
; %bb.2:
Lloh6:
	adrp	x8, _TTM_PL_FLAG_VRAM@GOTPAGE
Lloh7:
	ldr	x8, [x8, _TTM_PL_FLAG_VRAM@GOTPAGEOFF]
Lloh8:
	ldr	w8, [x8]
	tst	w8, w20
	b.eq	LBB0_8
; %bb.3:
	asr	w8, w22, w23
	ldr	w9, [x19, #12]
	add	w10, w8, #3
	cmp	w8, #0
	csel	w10, w10, w8, lt
	cmp	w9, w10, asr #2
	b.ge	LBB0_8
; %bb.4:
	ldr	w9, [x19]
Lloh9:
	adrp	x10, _NOUVEAU_GEM_TILE_ZETA@GOTPAGE
Lloh10:
	ldr	x10, [x10, _NOUVEAU_GEM_TILE_ZETA@GOTPAGEOFF]
Lloh11:
	ldr	w10, [x10]
	tst	w10, w9
	b.eq	LBB0_6
; %bb.5:
	cmp	w8, #0
	cinc	w8, w8, lt
	asr	w8, w8, #1
	str	w8, [x19, #4]
	mov	w8, #-1
	b	LBB0_7
LBB0_6:
	str	wzr, [x19, #4]
	cmp	w8, #0
	cinc	w8, w8, lt
	asr	w8, w8, #1
LBB0_7:
	str	w8, [x19, #8]
LBB0_8:
	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 AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.cfi_endproc
                                        ; -- End function
	.comm	_PAGE_SHIFT,4,2                 ; @PAGE_SHIFT
	.comm	_NV_10,8,3                      ; @NV_10
	.comm	_TTM_PL_FLAG_VRAM,4,2           ; @TTM_PL_FLAG_VRAM
	.comm	_NOUVEAU_GEM_TILE_ZETA,4,2      ; @NOUVEAU_GEM_TILE_ZETA
	.no_dead_strip	_set_placement_range
.subsections_via_symbols
