	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function oaktrail_backlight_init
_oaktrail_backlight_init:               ## @oaktrail_backlight_init
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r14
	pushq	%rbx
	subq	$16, %rsp
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	leaq	-24(%rbp), %rbx
	xorl	%r14d, %r14d
	movq	%rbx, %rdi
	xorl	%esi, %esi
	movl	$8, %edx
	callq	_memset
	movq	_BACKLIGHT_PLATFORM@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -20(%rbp)
	movq	_OT_EC_BL_BRIGHTNESS_MAX@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -24(%rbp)
	movq	_DRIVER_NAME@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	_oaktrail_device@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	movq	_oaktrail_bl_ops@GOTPCREL(%rip), %rcx
	xorl	%edx, %edx
	movq	%rbx, %r8
	callq	_backlight_device_register
	movq	%rax, %rbx
	movq	%rax, %rdi
	callq	_IS_ERR
	testq	%rax, %rax
	je	LBB0_2
## %bb.1:
	movq	_oaktrail_bl_device@GOTPCREL(%rip), %rax
	movq	$0, (%rax)
	leaq	L_.str(%rip), %rdi
	callq	_pr_warning
	movq	%rbx, %rdi
	callq	_PTR_ERR
	movl	%eax, %r14d
	jmp	LBB0_3
LBB0_2:
	movq	_oaktrail_bl_device@GOTPCREL(%rip), %rax
	movq	%rbx, (%rax)
	movq	%rbx, %rdi
	callq	_get_backlight_brightness
	movl	%eax, 4(%rbx)
	movq	_FB_BLANK_UNBLANK@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, (%rbx)
	movq	%rbx, %rdi
	callq	_backlight_update_status
LBB0_3:
	movl	%r14d, %eax
	addq	$16, %rsp
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_BACKLIGHT_PLATFORM,4,2         ## @BACKLIGHT_PLATFORM
	.comm	_OT_EC_BL_BRIGHTNESS_MAX,4,2    ## @OT_EC_BL_BRIGHTNESS_MAX
	.comm	_DRIVER_NAME,4,2                ## @DRIVER_NAME
	.comm	_oaktrail_device,8,3            ## @oaktrail_device
	.comm	_oaktrail_bl_ops,4,2            ## @oaktrail_bl_ops
	.comm	_oaktrail_bl_device,8,3         ## @oaktrail_bl_device
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Unable to register backlight device\n"

	.comm	_FB_BLANK_UNBLANK,4,2           ## @FB_BLANK_UNBLANK
	.no_dead_strip	_oaktrail_backlight_init
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function oaktrail_backlight_init
_oaktrail_backlight_init:               ; @oaktrail_backlight_init
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #48
	.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
	add	x0, sp, #8
	mov	w1, #0
	mov	w2, #8
	bl	_memset
Lloh0:
	adrp	x8, _BACKLIGHT_PLATFORM@GOTPAGE
Lloh1:
	ldr	x8, [x8, _BACKLIGHT_PLATFORM@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
Lloh3:
	adrp	x9, _OT_EC_BL_BRIGHTNESS_MAX@GOTPAGE
Lloh4:
	ldr	x9, [x9, _OT_EC_BL_BRIGHTNESS_MAX@GOTPAGEOFF]
Lloh5:
	ldr	w9, [x9]
	stp	w9, w8, [sp, #8]
Lloh6:
	adrp	x8, _DRIVER_NAME@GOTPAGE
Lloh7:
	ldr	x8, [x8, _DRIVER_NAME@GOTPAGEOFF]
Lloh8:
	ldr	w0, [x8]
Lloh9:
	adrp	x8, _oaktrail_device@GOTPAGE
Lloh10:
	ldr	x8, [x8, _oaktrail_device@GOTPAGEOFF]
Lloh11:
	ldr	x1, [x8]
Lloh12:
	adrp	x3, _oaktrail_bl_ops@GOTPAGE
Lloh13:
	ldr	x3, [x3, _oaktrail_bl_ops@GOTPAGEOFF]
	add	x4, sp, #8
	mov	x2, #0
	bl	_backlight_device_register
	mov	x19, x0
	bl	_IS_ERR
Lloh14:
	adrp	x8, _oaktrail_bl_device@GOTPAGE
Lloh15:
	ldr	x8, [x8, _oaktrail_bl_device@GOTPAGEOFF]
	cbz	x0, LBB0_2
; %bb.1:
	str	xzr, [x8]
Lloh16:
	adrp	x0, l_.str@PAGE
Lloh17:
	add	x0, x0, l_.str@PAGEOFF
	bl	_pr_warning
	mov	x0, x19
	bl	_PTR_ERR
	b	LBB0_3
LBB0_2:
	str	x19, [x8]
	mov	x0, x19
	bl	_get_backlight_brightness
Lloh18:
	adrp	x8, _FB_BLANK_UNBLANK@GOTPAGE
Lloh19:
	ldr	x8, [x8, _FB_BLANK_UNBLANK@GOTPAGEOFF]
Lloh20:
	ldr	w8, [x8]
	stp	w8, w0, [x19]
	mov	x0, x19
	bl	_backlight_update_status
	mov	w0, #0
LBB0_3:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #48
	ret
	.loh AdrpLdrGot	Lloh14, Lloh15
	.loh AdrpLdrGot	Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.cfi_endproc
                                        ; -- End function
	.comm	_BACKLIGHT_PLATFORM,4,2         ; @BACKLIGHT_PLATFORM
	.comm	_OT_EC_BL_BRIGHTNESS_MAX,4,2    ; @OT_EC_BL_BRIGHTNESS_MAX
	.comm	_DRIVER_NAME,4,2                ; @DRIVER_NAME
	.comm	_oaktrail_device,8,3            ; @oaktrail_device
	.comm	_oaktrail_bl_ops,4,2            ; @oaktrail_bl_ops
	.comm	_oaktrail_bl_device,8,3         ; @oaktrail_bl_device
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Unable to register backlight device\n"

	.comm	_FB_BLANK_UNBLANK,4,2           ; @FB_BLANK_UNBLANK
	.no_dead_strip	_oaktrail_backlight_init
.subsections_via_symbols
