	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function parse_lfp_backlight
_parse_lfp_backlight:                   ## @parse_lfp_backlight
	.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, %r15
	movq	%rdi, %r14
	movslq	(%rdi), %r13
	movq	_BDB_LVDS_BACKLIGHT@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r15, %rdi
	callq	_find_section
	testq	%rax, %rax
	je	LBB0_10
## %bb.1:
	movq	%rax, %rbx
	movl	(%rax), %esi
	cmpl	$16, %esi
	jne	LBB0_2
## %bb.4:
	movq	24(%rbx), %rdx
	movq	%r13, %r12
	shlq	$4, %r12
	movl	12(%rdx,%r12), %esi
	movq	_BDB_BACKLIGHT_TYPE_PWM@GOTPCREL(%rip), %rax
	xorl	%ecx, %ecx
	cmpl	(%rax), %esi
	sete	%cl
	movl	%ecx, 4(%r14)
	jne	LBB0_5
## %bb.6:
	movq	_INTEL_BACKLIGHT_DISPLAY_DDI@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 24(%r14)
	cmpl	$191, (%r15)
	jl	LBB0_9
## %bb.7:
	movq	%rbx, %rdi
	movq	%rdx, %r15
	callq	_get_blocksize
	movq	%r15, %rdx
	cmpl	$32, %eax
	jb	LBB0_9
## %bb.8:
	movq	16(%rbx), %rax
	movl	4(%rax,%r13,8), %ecx
	movl	%ecx, 24(%r14)
	movl	(%rax,%r13,8), %eax
	movl	%eax, 8(%r14)
LBB0_9:
	movl	8(%rdx,%r12), %esi
	movl	%esi, 20(%r14)
	movl	4(%rdx,%r12), %eax
	movl	%eax, 16(%r14)
	movl	(%rdx,%r12), %ecx
	movl	%ecx, 12(%r14)
	testl	%eax, %eax
	leaq	L_.str.4(%rip), %rax
	leaq	L_.str.3(%rip), %rdx
	cmoveq	%rax, %rdx
	movq	8(%rbx), %rax
	movl	(%rax,%r13,4), %r8d
	movl	8(%r14), %r9d
	leaq	L_.str.2(%rip), %rdi
	xorl	%eax, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_DRM_DEBUG_KMS                  ## TAILCALL
LBB0_10:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_2:
	leaq	L_.str(%rip), %rdi
	jmp	LBB0_3
LBB0_5:
	leaq	L_.str.1(%rip), %rdi
LBB0_3:
	xorl	%eax, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_DRM_DEBUG_KMS                  ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_BDB_LVDS_BACKLIGHT,4,2         ## @BDB_LVDS_BACKLIGHT
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Unsupported backlight data entry size %u\n"

	.comm	_BDB_BACKLIGHT_TYPE_PWM,4,2     ## @BDB_BACKLIGHT_TYPE_PWM
L_.str.1:                               ## @.str.1
	.asciz	"PWM backlight not present in VBT (type %u)\n"

	.comm	_INTEL_BACKLIGHT_DISPLAY_DDI,4,2 ## @INTEL_BACKLIGHT_DISPLAY_DDI
L_.str.2:                               ## @.str.2
	.asciz	"VBT backlight PWM modulation frequency %u Hz, active %s, min brightness %u, level %u, controller %u\n"

L_.str.3:                               ## @.str.3
	.asciz	"low"

L_.str.4:                               ## @.str.4
	.asciz	"high"

	.no_dead_strip	_parse_lfp_backlight
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function parse_lfp_backlight
_parse_lfp_backlight:                   ; @parse_lfp_backlight
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #96
	.cfi_def_cfa_offset 96
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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	x21, x1
	mov	x19, x0
	ldrsw	x22, [x0]
Lloh0:
	adrp	x8, _BDB_LVDS_BACKLIGHT@GOTPAGE
Lloh1:
	ldr	x8, [x8, _BDB_LVDS_BACKLIGHT@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	mov	x0, x21
	bl	_find_section
	cbz	x0, LBB0_7
; %bb.1:
	mov	x20, x0
	ldr	w1, [x0]
	cmp	w1, #16
	b.ne	LBB0_8
; %bb.2:
	ldr	x23, [x20, #24]
	add	x8, x23, x22, lsl #4
	ldr	w1, [x8, #12]
Lloh3:
	adrp	x8, _BDB_BACKLIGHT_TYPE_PWM@GOTPAGE
Lloh4:
	ldr	x8, [x8, _BDB_BACKLIGHT_TYPE_PWM@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	cmp	w1, w8
	cset	w8, eq
	str	w8, [x19, #4]
	b.ne	LBB0_9
; %bb.3:
Lloh6:
	adrp	x8, _INTEL_BACKLIGHT_DISPLAY_DDI@GOTPAGE
Lloh7:
	ldr	x8, [x8, _INTEL_BACKLIGHT_DISPLAY_DDI@GOTPAGEOFF]
Lloh8:
	ldr	w8, [x8]
	str	w8, [x19, #24]
	ldr	w8, [x21]
	cmp	w8, #191
	b.lt	LBB0_6
; %bb.4:
	mov	x0, x20
	bl	_get_blocksize
	cmp	w0, #32
	b.lo	LBB0_6
; %bb.5:
	ldr	x8, [x20, #16]
	add	x8, x8, x22, lsl #3
	ldp	w8, w9, [x8]
	str	w9, [x19, #24]
	str	w8, [x19, #8]
LBB0_6:
	add	x8, x23, x22, lsl #4
	ldr	w1, [x8, #8]
	str	w1, [x19, #20]
	ldp	w8, w9, [x8]
	stp	w8, w9, [x19, #12]
Lloh9:
	adrp	x10, l_.str.3@PAGE
Lloh10:
	add	x10, x10, l_.str.3@PAGEOFF
Lloh11:
	adrp	x11, l_.str.4@PAGE
Lloh12:
	add	x11, x11, l_.str.4@PAGEOFF
	cmp	w9, #0
	csel	x9, x11, x10, eq
	ldr	x10, [x20, #8]
	ldr	w10, [x10, x22, lsl #2]
	ldr	w11, [x19, #8]
	stp	x10, x11, [sp, #16]
	stp	x9, x8, [sp]
Lloh13:
	adrp	x0, l_.str.2@PAGE
Lloh14:
	add	x0, x0, l_.str.2@PAGEOFF
	bl	_DRM_DEBUG_KMS
LBB0_7:
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #96
	ret
LBB0_8:
Lloh15:
	adrp	x0, l_.str@PAGE
Lloh16:
	add	x0, x0, l_.str@PAGEOFF
	b	LBB0_10
LBB0_9:
Lloh17:
	adrp	x0, l_.str.1@PAGE
Lloh18:
	add	x0, x0, l_.str.1@PAGEOFF
LBB0_10:
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #96
	b	_DRM_DEBUG_KMS
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpAdd	Lloh13, Lloh14
	.loh AdrpAdd	Lloh11, Lloh12
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpAdd	Lloh15, Lloh16
	.loh AdrpAdd	Lloh17, Lloh18
	.cfi_endproc
                                        ; -- End function
	.comm	_BDB_LVDS_BACKLIGHT,4,2         ; @BDB_LVDS_BACKLIGHT
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Unsupported backlight data entry size %u\n"

	.comm	_BDB_BACKLIGHT_TYPE_PWM,4,2     ; @BDB_BACKLIGHT_TYPE_PWM
l_.str.1:                               ; @.str.1
	.asciz	"PWM backlight not present in VBT (type %u)\n"

	.comm	_INTEL_BACKLIGHT_DISPLAY_DDI,4,2 ; @INTEL_BACKLIGHT_DISPLAY_DDI
l_.str.2:                               ; @.str.2
	.asciz	"VBT backlight PWM modulation frequency %u Hz, active %s, min brightness %u, level %u, controller %u\n"

l_.str.3:                               ; @.str.3
	.asciz	"low"

l_.str.4:                               ; @.str.4
	.asciz	"high"

	.no_dead_strip	_parse_lfp_backlight
.subsections_via_symbols
