	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function malidp_write_gamma_table
_malidp_write_gamma_table:              ## @malidp_write_gamma_table
	.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	%r13
	pushq	%r12
	pushq	%rbx
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %r14
	movq	%rdi, %r12
	movl	$18, %edi
	movl	$16, %esi
	callq	_GENMASK
	movq	(%r12), %rcx
	movq	_MALIDP_COEF_TABLE_ADDR@GOTPCREL(%rip), %rdx
	movq	(%rdx), %rdx
	addq	(%rcx), %rdx
	movq	%r12, %rdi
	movl	%eax, %esi
	callq	_malidp_hw_write
	movq	_MALIDP_COEFFTAB_NUM_COEFFS@GOTPCREL(%rip), %r15
	cmpl	$0, (%r15)
	jle	LBB0_3
## %bb.1:
	xorl	%ebx, %ebx
	movq	_MALIDP_COEF_TABLE_DATA@GOTPCREL(%rip), %r13
	.p2align	4, 0x90
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	movl	(%r14,%rbx,4), %esi
	movq	(%r12), %rax
	movq	(%r13), %rdx
	addq	(%rax), %rdx
	movq	%r12, %rdi
	callq	_malidp_hw_write
	incq	%rbx
	movslq	(%r15), %rax
	cmpq	%rax, %rbx
	jl	LBB0_2
LBB0_3:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_MALIDP_COEFFTAB_NUM_COEFFS,4,2 ## @MALIDP_COEFFTAB_NUM_COEFFS
	.comm	_MALIDP_COEF_TABLE_ADDR,8,3     ## @MALIDP_COEF_TABLE_ADDR
	.comm	_MALIDP_COEF_TABLE_DATA,8,3     ## @MALIDP_COEF_TABLE_DATA
	.no_dead_strip	_malidp_write_gamma_table
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function malidp_write_gamma_table
_malidp_write_gamma_table:              ; @malidp_write_gamma_table
	.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, x1
	mov	x20, x0
	mov	w0, #18
	mov	w1, #16
	bl	_GENMASK
	mov	x1, x0
	ldr	x8, [x20]
	ldr	x8, [x8]
Lloh0:
	adrp	x9, _MALIDP_COEF_TABLE_ADDR@GOTPAGE
Lloh1:
	ldr	x9, [x9, _MALIDP_COEF_TABLE_ADDR@GOTPAGEOFF]
Lloh2:
	ldr	x9, [x9]
	add	x2, x9, x8
	mov	x0, x20
	bl	_malidp_hw_write
Lloh3:
	adrp	x21, _MALIDP_COEFFTAB_NUM_COEFFS@GOTPAGE
Lloh4:
	ldr	x21, [x21, _MALIDP_COEFFTAB_NUM_COEFFS@GOTPAGEOFF]
	ldr	w8, [x21]
	cmp	w8, #1
	b.lt	LBB0_3
; %bb.1:
	mov	x22, #0
Lloh5:
	adrp	x23, _MALIDP_COEF_TABLE_DATA@GOTPAGE
Lloh6:
	ldr	x23, [x23, _MALIDP_COEF_TABLE_DATA@GOTPAGEOFF]
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w1, [x19, x22, lsl #2]
	ldr	x8, [x20]
	ldr	x8, [x8]
	ldr	x9, [x23]
	add	x2, x9, x8
	mov	x0, x20
	bl	_malidp_hw_write
	add	x22, x22, #1
	ldrsw	x8, [x21]
	cmp	x22, x8
	b.lt	LBB0_2
LBB0_3:
	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	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh5, Lloh6
	.cfi_endproc
                                        ; -- End function
	.comm	_MALIDP_COEFFTAB_NUM_COEFFS,4,2 ; @MALIDP_COEFFTAB_NUM_COEFFS
	.comm	_MALIDP_COEF_TABLE_ADDR,8,3     ; @MALIDP_COEF_TABLE_ADDR
	.comm	_MALIDP_COEF_TABLE_DATA,8,3     ; @MALIDP_COEF_TABLE_DATA
	.no_dead_strip	_malidp_write_gamma_table
.subsections_via_symbols
