	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function vc4_crtc_lut_load
_vc4_crtc_lut_load:                     ## @vc4_crtc_lut_load
	.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	%rdi, %r14
	movq	8(%rdi), %rdi
	callq	_to_vc4_dev
	movq	%r14, %rdi
	callq	_to_vc4_crtc
	movq	%rax, %r12
	movq	_SCALER_GAMADDR@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movl	(%r12), %eax
	imull	(%r14), %eax
	movq	_SCALER_GAMADDR_AUTOINC@GOTPCREL(%rip), %rcx
	leal	(%rax,%rax,2), %esi
	orl	(%rcx), %esi
	callq	_HVS_WRITE
	cmpl	$0, (%r14)
	je	LBB0_9
## %bb.1:
	xorl	%ebx, %ebx
	movq	_SCALER_GAMDATA@GOTPCREL(%rip), %r15
	.p2align	4, 0x90
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	movl	(%r15), %edi
	movq	8(%r12), %rax
	movl	(%rax,%rbx,4), %esi
	callq	_HVS_WRITE
	incq	%rbx
	movslq	(%r14), %rax
	cmpq	%rax, %rbx
	jb	LBB0_2
## %bb.3:
	testl	%eax, %eax
	je	LBB0_9
## %bb.4:
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_5:                                 ## =>This Inner Loop Header: Depth=1
	movl	(%r15), %edi
	movq	16(%r12), %rax
	movl	(%rax,%rbx,4), %esi
	callq	_HVS_WRITE
	incq	%rbx
	movslq	(%r14), %rax
	cmpq	%rax, %rbx
	jb	LBB0_5
## %bb.6:
	testl	%eax, %eax
	je	LBB0_9
## %bb.7:
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_8:                                 ## =>This Inner Loop Header: Depth=1
	movl	(%r15), %edi
	movq	24(%r12), %rax
	movl	(%rax,%rbx,4), %esi
	callq	_HVS_WRITE
	incq	%rbx
	movslq	(%r14), %rax
	cmpq	%rax, %rbx
	jb	LBB0_8
LBB0_9:
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_SCALER_GAMADDR,4,2             ## @SCALER_GAMADDR
	.comm	_SCALER_GAMADDR_AUTOINC,4,2     ## @SCALER_GAMADDR_AUTOINC
	.comm	_SCALER_GAMDATA,4,2             ## @SCALER_GAMDATA
	.no_dead_strip	_vc4_crtc_lut_load
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function vc4_crtc_lut_load
_vc4_crtc_lut_load:                     ; @vc4_crtc_lut_load
	.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, x0
	ldr	x0, [x0, #8]
	bl	_to_vc4_dev
	mov	x0, x19
	bl	_to_vc4_crtc
	mov	x20, x0
Lloh0:
	adrp	x8, _SCALER_GAMADDR@GOTPAGE
Lloh1:
	ldr	x8, [x8, _SCALER_GAMADDR@GOTPAGEOFF]
Lloh2:
	ldr	w0, [x8]
Lloh3:
	adrp	x8, _SCALER_GAMADDR_AUTOINC@GOTPAGE
Lloh4:
	ldr	x8, [x8, _SCALER_GAMADDR_AUTOINC@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	ldr	w9, [x20]
	ldr	w10, [x19]
	mul	w9, w9, w10
	add	w9, w9, w9, lsl #1
	orr	w1, w9, w8
	bl	_HVS_WRITE
	ldr	w8, [x19]
	cbz	w8, LBB0_9
; %bb.1:
	mov	x22, #0
Lloh6:
	adrp	x21, _SCALER_GAMDATA@GOTPAGE
Lloh7:
	ldr	x21, [x21, _SCALER_GAMDATA@GOTPAGEOFF]
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w0, [x21]
	ldr	x8, [x20, #8]
	ldr	w1, [x8, x22, lsl #2]
	bl	_HVS_WRITE
	add	x22, x22, #1
	ldrsw	x8, [x19]
	cmp	x22, x8
	b.lo	LBB0_2
; %bb.3:
	cbz	w8, LBB0_9
; %bb.4:
	mov	x22, #0
LBB0_5:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w0, [x21]
	ldr	x8, [x20, #16]
	ldr	w1, [x8, x22, lsl #2]
	bl	_HVS_WRITE
	add	x22, x22, #1
	ldrsw	x8, [x19]
	cmp	x22, x8
	b.lo	LBB0_5
; %bb.6:
	cbz	w8, LBB0_9
; %bb.7:
	mov	x22, #0
LBB0_8:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w0, [x21]
	ldr	x8, [x20, #24]
	ldr	w1, [x8, x22, lsl #2]
	bl	_HVS_WRITE
	add	x22, x22, #1
	ldrsw	x8, [x19]
	cmp	x22, x8
	b.lo	LBB0_8
LBB0_9:
	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	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh6, Lloh7
	.cfi_endproc
                                        ; -- End function
	.comm	_SCALER_GAMADDR,4,2             ; @SCALER_GAMADDR
	.comm	_SCALER_GAMADDR_AUTOINC,4,2     ; @SCALER_GAMADDR_AUTOINC
	.comm	_SCALER_GAMDATA,4,2             ; @SCALER_GAMDATA
	.no_dead_strip	_vc4_crtc_lut_load
.subsections_via_symbols
