	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function panfrost_drm_mm_color_adjust
_panfrost_drm_mm_color_adjust:          ## @panfrost_drm_mm_color_adjust
	.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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	_PANFROST_BO_NOEXEC@GOTPCREL(%rip), %rax
	testq	%rsi, (%rax)
	jne	LBB0_8
## %bb.1:
	movq	%rcx, %r14
	movq	%rdx, %rbx
	movq	(%rdx), %rdi
	movq	_PFN_4G_MASK@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rax
	testq	%rdi, %rax
	jne	LBB0_3
## %bb.2:
	incq	%rdi
	movq	%rdi, (%rbx)
	movq	(%rcx), %rax
LBB0_3:
	movq	(%r14), %rcx
	testq	%rcx, %rax
	jne	LBB0_5
## %bb.4:
	decq	%rcx
	movq	%rcx, (%r14)
	movq	(%rbx), %rdi
LBB0_5:
	movq	_PFN_4G@GOTPCREL(%rip), %r15
	movl	(%r15), %esi
	callq	_ALIGN
	movq	(%rbx), %rdi
	movq	%rax, %rcx
	subq	%rdi, %rcx
	movq	_PFN_16M@GOTPCREL(%rip), %rdx
	cmpq	(%rdx), %rcx
	jg	LBB0_7
## %bb.6:
	incq	%rax
	movq	%rax, (%rbx)
	movq	%rax, %rdi
LBB0_7:
	movq	(%r14), %rbx
	movl	(%r15), %esi
	callq	_ALIGN
	leaq	-1(%rax), %rsi
	movq	%rbx, %rdi
	callq	_min
	movq	%rax, (%r14)
LBB0_8:
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_PANFROST_BO_NOEXEC,8,3         ## @PANFROST_BO_NOEXEC
	.comm	_PFN_4G_MASK,8,3                ## @PFN_4G_MASK
	.comm	_PFN_4G,4,2                     ## @PFN_4G
	.comm	_PFN_16M,8,3                    ## @PFN_16M
	.no_dead_strip	_panfrost_drm_mm_color_adjust
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function panfrost_drm_mm_color_adjust
_panfrost_drm_mm_color_adjust:          ; @panfrost_drm_mm_color_adjust
	.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
Lloh0:
	adrp	x8, _PANFROST_BO_NOEXEC@GOTPAGE
Lloh1:
	ldr	x8, [x8, _PANFROST_BO_NOEXEC@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	tst	x8, x1
	b.ne	LBB0_8
; %bb.1:
	mov	x19, x3
	mov	x20, x2
	ldr	x0, [x2]
Lloh3:
	adrp	x9, _PFN_4G_MASK@GOTPAGE
Lloh4:
	ldr	x9, [x9, _PFN_4G_MASK@GOTPAGEOFF]
	ldr	x8, [x9]
	tst	x8, x0
	b.ne	LBB0_3
; %bb.2:
	add	x0, x0, #1
	str	x0, [x20]
	ldr	x8, [x9]
LBB0_3:
	ldr	x9, [x19]
	tst	x8, x9
	b.ne	LBB0_5
; %bb.4:
	sub	x8, x9, #1
	str	x8, [x19]
	ldr	x0, [x20]
LBB0_5:
Lloh5:
	adrp	x21, _PFN_4G@GOTPAGE
Lloh6:
	ldr	x21, [x21, _PFN_4G@GOTPAGEOFF]
	ldr	w1, [x21]
	bl	_ALIGN
	mov	x8, x0
	ldr	x0, [x20]
Lloh7:
	adrp	x9, _PFN_16M@GOTPAGE
Lloh8:
	ldr	x9, [x9, _PFN_16M@GOTPAGEOFF]
Lloh9:
	ldr	x9, [x9]
	sub	x10, x8, x0
	cmp	x10, x9
	b.gt	LBB0_7
; %bb.6:
	add	x0, x8, #1
	str	x0, [x20]
LBB0_7:
	ldr	x20, [x19]
	ldr	w1, [x21]
	bl	_ALIGN
	sub	x1, x0, #1
	mov	x0, x20
	bl	_min
	str	x0, [x19]
LBB0_8:
	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
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh5, Lloh6
	.cfi_endproc
                                        ; -- End function
	.comm	_PANFROST_BO_NOEXEC,8,3         ; @PANFROST_BO_NOEXEC
	.comm	_PFN_4G_MASK,8,3                ; @PFN_4G_MASK
	.comm	_PFN_4G,4,2                     ; @PFN_4G
	.comm	_PFN_16M,8,3                    ; @PFN_16M
	.no_dead_strip	_panfrost_drm_mm_color_adjust
.subsections_via_symbols
