	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_nv40_fb_tile_comp              ## -- Begin function nv40_fb_tile_comp
	.p2align	4, 0x90
_nv40_fb_tile_comp:                     ## @nv40_fb_tile_comp
	.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
	subq	$16, %rsp
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%r8, %r14
	movl	%ecx, %r12d
	movq	%rdi, %r15
	movl	%edx, %edi
	movl	$128, %esi
	callq	_DIV_ROUND_UP
	movq	8(%r15), %rcx
	cltd
	idivl	(%rcx)
	movl	%eax, %edi
	movl	$256, %esi                      ## imm = 0x100
	callq	_round_up
	testb	$2, %r12b
	je	LBB0_3
## %bb.1:
	movl	%eax, %ebx
	leaq	8(%r14), %rax
	movq	%rax, (%rsp)
	movq	%r15, %rdi
	xorl	%esi, %esi
	movl	$1, %edx
	movl	%ebx, %ecx
	movl	%ebx, %r8d
	movl	$1, %r9d
	callq	_nvkm_mm_head
	testl	%eax, %eax
	jne	LBB0_3
## %bb.2:
	movq	8(%r14), %rax
	movl	(%rax), %eax
	addl	%eax, %ebx
	sarl	$8, %eax
	shll	$5, %ebx
	addl	$-32, %ebx
	andl	$-671096832, %ebx               ## imm = 0xD7FFE000
	orl	%eax, %ebx
	orl	$671088640, %ebx                ## imm = 0x28000000
	movl	%ebx, (%r14)
LBB0_3:
	addq	$16, %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_nv40_fb_tile_comp              ; -- Begin function nv40_fb_tile_comp
	.p2align	2
_nv40_fb_tile_comp:                     ; @nv40_fb_tile_comp
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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
	mov	x19, x4
	mov	x22, x3
	mov	x20, x0
	mov	x0, x2
	mov	w1, #128
	bl	_DIV_ROUND_UP
	ldr	x8, [x20, #8]
	ldr	w8, [x8]
	sdiv	w0, w0, w8
	mov	w1, #256
	bl	_round_up
	tbz	w22, #1, LBB0_3
; %bb.1:
	mov	x21, x0
	add	x6, x19, #8
	mov	x0, x20
	mov	w1, #0
	mov	w2, #1
	mov	x3, x21
	mov	x4, x21
	mov	w5, #1
	bl	_nvkm_mm_head
	cbnz	w0, LBB0_3
; %bb.2:
	ldr	x8, [x19, #8]
	ldr	w8, [x8]
	add	w9, w8, w21
	lsl	w9, w9, #5
	sub	w9, w9, #32
	and	w9, w9, #0xffffe01f
	orr	w8, w9, w8, asr #8
	mov	w9, #671088640
	orr	w8, w8, w9
	str	w8, [x19]
LBB0_3:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
	.cfi_endproc
                                        ; -- End function
.subsections_via_symbols
