	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function fill_backlight_transform_table
_fill_backlight_transform_table:        ## @fill_backlight_transform_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
	subq	$56, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %r12
                                        ## kill: def $edi killed $edi def $rdi
	movq	_NUM_BL_CURVE_SEGS@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	movq	(%rdx), %rax
	movl	$0, (%rax)
	movq	(%rsi), %rax
	movq	8(%rdx), %rcx
	movq	%rax, (%rcx)
	movq	(%rdx), %rax
	leal	-1(%rbx), %esi
	movl	$65535, (%rax,%rsi,4)           ## imm = 0xFFFF
	movq	%rdi, -56(%rbp)                 ## 8-byte Spill
	movslq	%edi, %rax
	movq	-8(%r12,%rax,8), %rax
	movq	8(%rdx), %rcx
	movq	%rax, (%rcx,%rsi,8)
	movq	%rbx, -80(%rbp)                 ## 8-byte Spill
	cmpl	$3, %ebx
	jb	LBB0_3
## %bb.1:
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	leal	-1(%rax), %r15d
	movl	$1, %r13d
	movl	$65536, %ebx                    ## imm = 0x10000
	movl	%r15d, -44(%rbp)                ## 4-byte Spill
	movq	%rdx, -64(%rbp)                 ## 8-byte Spill
	movq	%rsi, -72(%rbp)                 ## 8-byte Spill
	.p2align	4, 0x90
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	leaq	1(%r13), %rax
	movq	%rax, -88(%rbp)                 ## 8-byte Spill
	movl	%r15d, %eax
	xorl	%edx, %edx
	divl	%esi
	movl	%eax, %r14d
	xorl	%edi, %edi
	cmpl	-56(%rbp), %eax                 ## 4-byte Folded Reload
	setb	%dil
	callq	_ASSERT
	movl	%ebx, %edi
	movq	-80(%rbp), %rsi                 ## 8-byte Reload
                                        ## kill: def $esi killed $esi killed $rsi
	callq	_DIV_ROUNDUP
	movq	%rax, %rdi
	callq	_cpu_to_be16
	movq	-64(%rbp), %rcx                 ## 8-byte Reload
	movq	(%rcx), %rcx
	movl	%eax, (%rcx,%r13,4)
	movq	(%r12,%r14,8), %rdi
	callq	_cpu_to_be16
	movq	-72(%rbp), %rsi                 ## 8-byte Reload
	movq	-64(%rbp), %rdx                 ## 8-byte Reload
	movq	8(%rdx), %rcx
	movq	%rax, (%rcx,%r13,8)
	addl	$65536, %ebx                    ## imm = 0x10000
	addl	-44(%rbp), %r15d                ## 4-byte Folded Reload
	movq	-88(%rbp), %rax                 ## 8-byte Reload
	movq	%rax, %r13
	cmpq	%rax, %rsi
	jne	LBB0_2
LBB0_3:
	addq	$56, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_NUM_BL_CURVE_SEGS,4,2          ## @NUM_BL_CURVE_SEGS
	.no_dead_strip	_fill_backlight_transform_table
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function fill_backlight_transform_table
_fill_backlight_transform_table:        ; @fill_backlight_transform_table
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	stp	x28, x27, [sp, #16]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #32]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #48]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #64]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #80]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #96]             ; 16-byte Folded Spill
	add	x29, sp, #96
	.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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	mov	x20, x0
Lloh0:
	adrp	x8, _NUM_BL_CURVE_SEGS@GOTPAGE
Lloh1:
	ldr	x8, [x8, _NUM_BL_CURVE_SEGS@GOTPAGEOFF]
Lloh2:
	ldr	w11, [x8]
	ldp	x8, x9, [x2]
	str	wzr, [x8]
	ldr	x8, [x1]
	str	x8, [x9]
	sub	w24, w11, #1
	mov	w8, #65535
	ldp	x9, x10, [x2]
	str	w8, [x9, w24, uxtw #2]
	sub	w25, w20, #1
	ldr	x8, [x1, w25, sxtw #3]
	str	x8, [x10, w24, uxtw #3]
	str	w11, [sp, #12]                  ; 4-byte Folded Spill
	cmp	w11, #3
	b.lo	LBB0_3
; %bb.1:
	mov	x19, x2
	mov	x22, x1
	mov	w23, #65536
	mov	w27, #1
	mov	x26, x25
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	add	x28, x27, #1
	udiv	w21, w26, w24
	cmp	w21, w20
	cset	w0, lo
	bl	_ASSERT
	mov	x0, x23
	ldr	w1, [sp, #12]                   ; 4-byte Folded Reload
	bl	_DIV_ROUNDUP
	bl	_cpu_to_be16
	ldr	x8, [x19]
	str	w0, [x8, x27, lsl #2]
	ldr	x0, [x22, w21, uxtw #3]
	bl	_cpu_to_be16
	ldr	x8, [x19, #8]
	str	x0, [x8, x27, lsl #3]
	add	w23, w23, #16, lsl #12          ; =65536
	add	w26, w26, w25
	mov	x27, x28
	cmp	x24, x28
	b.ne	LBB0_2
LBB0_3:
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #64]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #48]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #32]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #112
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_NUM_BL_CURVE_SEGS,4,2          ; @NUM_BL_CURVE_SEGS
	.no_dead_strip	_fill_backlight_transform_table
.subsections_via_symbols
