	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function set_backlight_brightness
_set_backlight_brightness:              ## @set_backlight_brightness
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	movslq	(%rdi), %rsi
	testq	%rsi, %rsi
	js	LBB0_2
## %bb.1:
	movq	_OT_EC_BL_BRIGHTNESS_MAX@GOTPCREL(%rip), %rax
	cmpq	%rsi, (%rax)
	jl	LBB0_2
## %bb.3:
	movq	_OT_EC_BL_BRIGHTNESS_ADDRESS@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_ec_write
	movq	_OT_EC_BL_CONTROL_ADDRESS@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	_OT_EC_BL_CONTROL_ON_DATA@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	callq	_ec_write
	xorl	%eax, %eax
	popq	%rbp
	retq
LBB0_2:
	movq	_EINVAL@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_OT_EC_BL_BRIGHTNESS_MAX,8,3    ## @OT_EC_BL_BRIGHTNESS_MAX
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_OT_EC_BL_BRIGHTNESS_ADDRESS,4,2 ## @OT_EC_BL_BRIGHTNESS_ADDRESS
	.comm	_OT_EC_BL_CONTROL_ADDRESS,4,2   ## @OT_EC_BL_CONTROL_ADDRESS
	.comm	_OT_EC_BL_CONTROL_ON_DATA,8,3   ## @OT_EC_BL_CONTROL_ON_DATA
	.no_dead_strip	_set_backlight_brightness
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function set_backlight_brightness
_set_backlight_brightness:              ; @set_backlight_brightness
	.cfi_startproc
; %bb.0:
	stp	x29, x30, [sp, #-16]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 16
	mov	x29, sp
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	ldrsw	x1, [x0]
	tbnz	w1, #31, LBB0_3
; %bb.1:
Lloh0:
	adrp	x8, _OT_EC_BL_BRIGHTNESS_MAX@GOTPAGE
Lloh1:
	ldr	x8, [x8, _OT_EC_BL_BRIGHTNESS_MAX@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	cmp	x8, x1
	b.lt	LBB0_3
; %bb.2:
Lloh3:
	adrp	x8, _OT_EC_BL_BRIGHTNESS_ADDRESS@GOTPAGE
Lloh4:
	ldr	x8, [x8, _OT_EC_BL_BRIGHTNESS_ADDRESS@GOTPAGEOFF]
Lloh5:
	ldr	w0, [x8]
	bl	_ec_write
Lloh6:
	adrp	x8, _OT_EC_BL_CONTROL_ADDRESS@GOTPAGE
Lloh7:
	ldr	x8, [x8, _OT_EC_BL_CONTROL_ADDRESS@GOTPAGEOFF]
Lloh8:
	ldr	w0, [x8]
Lloh9:
	adrp	x8, _OT_EC_BL_CONTROL_ON_DATA@GOTPAGE
Lloh10:
	ldr	x8, [x8, _OT_EC_BL_CONTROL_ON_DATA@GOTPAGEOFF]
Lloh11:
	ldr	x1, [x8]
	bl	_ec_write
	mov	w0, #0
	ldp	x29, x30, [sp], #16             ; 16-byte Folded Reload
	ret
LBB0_3:
Lloh12:
	adrp	x8, _EINVAL@GOTPAGE
Lloh13:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh14:
	ldr	w8, [x8]
	neg	w0, w8
	ldp	x29, x30, [sp], #16             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.cfi_endproc
                                        ; -- End function
	.comm	_OT_EC_BL_BRIGHTNESS_MAX,8,3    ; @OT_EC_BL_BRIGHTNESS_MAX
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_OT_EC_BL_BRIGHTNESS_ADDRESS,4,2 ; @OT_EC_BL_BRIGHTNESS_ADDRESS
	.comm	_OT_EC_BL_CONTROL_ADDRESS,4,2   ; @OT_EC_BL_CONTROL_ADDRESS
	.comm	_OT_EC_BL_CONTROL_ON_DATA,8,3   ; @OT_EC_BL_CONTROL_ON_DATA
	.no_dead_strip	_set_backlight_brightness
.subsections_via_symbols
