	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function led_set_status
_led_set_status:                        ## @led_set_status
	.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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%esi, %r14d
	movl	%edi, %r15d
	movq	_led_supported@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	cmpl	$128, %eax
	je	LBB0_6
## %bb.1:
	cmpl	$129, %eax
	je	LBB0_11
## %bb.2:
	cmpl	$130, %eax
	jne	LBB0_13
## %bb.3:
	xorl	%edi, %edi
	cmpl	$8, %r15d
	setae	%dil
	callq	_unlikely
	testl	%eax, %eax
	jne	LBB0_12
## %bb.4:
	movl	%r15d, %edi
	callq	_tpacpi_is_led_restricted
	movl	%eax, %edi
	callq	_unlikely
	testl	%eax, %eax
	jne	LBB0_15
## %bb.5:
	movq	_led_handle@GOTPCREL(%rip), %rax
	movl	$1, %r8d
	movl	%r15d, %ecx
	shll	%cl, %r8d
	movl	(%rax), %edi
	movl	%r14d, %eax
	leaq	_led_set_status.led_sled_arg1(%rip), %rcx
	movl	(%rcx,%rax,4), %r9d
	leaq	L_.str(%rip), %rcx
	xorl	%ebx, %ebx
	xorl	%esi, %esi
	xorl	%edx, %edx
	jmp	LBB0_20
LBB0_6:
	xorl	%edi, %edi
	cmpl	$8, %r15d
	setae	%dil
	callq	_unlikely
	testl	%eax, %eax
	jne	LBB0_12
## %bb.7:
	movl	%r15d, %edi
	callq	_tpacpi_is_led_restricted
	movl	%eax, %edi
	callq	_unlikely
	testl	%eax, %eax
	jne	LBB0_15
## %bb.8:
	movq	_TPACPI_LED_EC_HLMS@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movl	$1, %esi
	movl	%r15d, %ecx
	shll	%cl, %esi
	callq	_ec_write
	testl	%eax, %eax
	js	LBB0_24
## %bb.9:
	movq	_TPACPI_LED_EC_HLBL@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	_TPACPI_LED_BLINK@GOTPCREL(%rip), %rax
	xorl	%esi, %esi
	cmpl	%r14d, (%rax)
	sete	%sil
	movl	%r15d, %ecx
	shll	%cl, %esi
	callq	_ec_write
	testl	%eax, %eax
	js	LBB0_24
## %bb.10:
	movq	_TPACPI_LED_EC_HLCL@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	_TPACPI_LED_OFF@GOTPCREL(%rip), %rax
	xorl	%esi, %esi
	cmpl	%r14d, (%rax)
	setne	%sil
	movl	%r15d, %ecx
	shll	%cl, %esi
	callq	_ec_write
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_18
	jmp	LBB0_21
LBB0_11:
	movq	_TPACPI_LED_NUMLEDS@GOTPCREL(%rip), %rax
	xorl	%edi, %edi
	cmpl	%r15d, (%rax)
	setbe	%dil
	callq	_unlikely
	testl	%eax, %eax
	je	LBB0_14
LBB0_12:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	jmp	LBB0_16
LBB0_13:
	movq	_ENXIO@GOTPCREL(%rip), %rax
	jmp	LBB0_16
LBB0_14:
	movl	%r15d, %edi
	callq	_tpacpi_is_led_restricted
	movl	%eax, %edi
	callq	_unlikely
	testl	%eax, %eax
	je	LBB0_19
LBB0_15:
	movq	_EPERM@GOTPCREL(%rip), %rax
LBB0_16:
	xorl	%ebx, %ebx
LBB0_17:
	subl	(%rax), %ebx
LBB0_18:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_19:
	movq	_led_handle@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movl	%r14d, %eax
	leaq	_led_set_status.led_led_arg1(%rip), %rcx
	movl	(%rcx,%rax,4), %r9d
	leaq	L_.str(%rip), %rcx
	xorl	%ebx, %ebx
	xorl	%esi, %esi
	xorl	%edx, %edx
	movl	%r15d, %r8d
LBB0_20:
	callq	_acpi_evalf
	testl	%eax, %eax
	je	LBB0_22
LBB0_21:
	movq	_tpacpi_led_state_cache@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movl	%r15d, %ecx
	movl	%r14d, (%rax,%rcx,4)
	xorl	%ebx, %ebx
	jmp	LBB0_18
LBB0_22:
	movq	_EIO@GOTPCREL(%rip), %rax
	jmp	LBB0_17
LBB0_24:
	movl	%eax, %ebx
	jmp	LBB0_18
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__const
	.p2align	2                               ## @led_set_status.led_sled_arg1
_led_set_status.led_sled_arg1:
	.long	0                               ## 0x0
	.long	1                               ## 0x1
	.long	3                               ## 0x3

	.p2align	2                               ## @led_set_status.led_led_arg1
_led_set_status.led_led_arg1:
	.long	0                               ## 0x0
	.long	128                             ## 0x80
	.long	192                             ## 0xc0

	.comm	_led_supported,4,2              ## @led_supported
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_EPERM,4,2                      ## @EPERM
	.comm	_led_handle,4,2                 ## @led_handle
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"vdd"

	.comm	_EIO,4,2                        ## @EIO
	.comm	_TPACPI_LED_EC_HLMS,4,2         ## @TPACPI_LED_EC_HLMS
	.comm	_TPACPI_LED_EC_HLBL,4,2         ## @TPACPI_LED_EC_HLBL
	.comm	_TPACPI_LED_BLINK,4,2           ## @TPACPI_LED_BLINK
	.comm	_TPACPI_LED_EC_HLCL,4,2         ## @TPACPI_LED_EC_HLCL
	.comm	_TPACPI_LED_OFF,4,2             ## @TPACPI_LED_OFF
	.comm	_TPACPI_LED_NUMLEDS,4,2         ## @TPACPI_LED_NUMLEDS
	.comm	_ENXIO,4,2                      ## @ENXIO
	.comm	_tpacpi_led_state_cache,8,3     ## @tpacpi_led_state_cache
	.no_dead_strip	_led_set_status
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function led_set_status
_led_set_status:                        ; @led_set_status
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	mov	x19, x1
	mov	x20, x0
Lloh0:
	adrp	x8, _led_supported@GOTPAGE
Lloh1:
	ldr	x8, [x8, _led_supported@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	cmp	w8, #128
	b.eq	LBB0_6
; %bb.1:
	cmp	w8, #129
	b.eq	LBB0_11
; %bb.2:
	cmp	w8, #130
	b.ne	LBB0_13
; %bb.3:
	cmp	w20, #7
	cset	w0, hi
	bl	_unlikely
	cbnz	w0, LBB0_12
; %bb.4:
	mov	x0, x20
	bl	_tpacpi_is_led_restricted
	bl	_unlikely
	cbnz	w0, LBB0_15
; %bb.5:
Lloh3:
	adrp	x8, _led_handle@GOTPAGE
Lloh4:
	ldr	x8, [x8, _led_handle@GOTPAGEOFF]
Lloh5:
	ldr	w0, [x8]
	mov	w8, #1
	lsl	w4, w8, w20
Lloh6:
	adrp	x8, _led_set_status.led_sled_arg1@PAGE
Lloh7:
	add	x8, x8, _led_set_status.led_sled_arg1@PAGEOFF
	ldr	w5, [x8, w19, uxtw #2]
Lloh8:
	adrp	x3, l_.str@PAGE
Lloh9:
	add	x3, x3, l_.str@PAGEOFF
	mov	x1, #0
	mov	x2, #0
	bl	_acpi_evalf
	cbnz	w0, LBB0_19
	b	LBB0_20
LBB0_6:
	cmp	w20, #7
	cset	w0, hi
	bl	_unlikely
	cbnz	w0, LBB0_12
; %bb.7:
	mov	x0, x20
	bl	_tpacpi_is_led_restricted
	bl	_unlikely
	cbnz	w0, LBB0_15
; %bb.8:
Lloh10:
	adrp	x8, _TPACPI_LED_EC_HLMS@GOTPAGE
Lloh11:
	ldr	x8, [x8, _TPACPI_LED_EC_HLMS@GOTPAGEOFF]
Lloh12:
	ldr	w0, [x8]
	mov	w8, #1
	lsl	w1, w8, w20
	bl	_ec_write
	tbnz	w0, #31, LBB0_17
; %bb.9:
Lloh13:
	adrp	x8, _TPACPI_LED_EC_HLBL@GOTPAGE
Lloh14:
	ldr	x8, [x8, _TPACPI_LED_EC_HLBL@GOTPAGEOFF]
Lloh15:
	ldr	w0, [x8]
Lloh16:
	adrp	x8, _TPACPI_LED_BLINK@GOTPAGE
Lloh17:
	ldr	x8, [x8, _TPACPI_LED_BLINK@GOTPAGEOFF]
Lloh18:
	ldr	w8, [x8]
	cmp	w8, w19
	cset	w8, eq
	lsl	w1, w8, w20
	bl	_ec_write
	tbnz	w0, #31, LBB0_17
; %bb.10:
Lloh19:
	adrp	x8, _TPACPI_LED_EC_HLCL@GOTPAGE
Lloh20:
	ldr	x8, [x8, _TPACPI_LED_EC_HLCL@GOTPAGEOFF]
Lloh21:
	ldr	w0, [x8]
Lloh22:
	adrp	x8, _TPACPI_LED_OFF@GOTPAGE
Lloh23:
	ldr	x8, [x8, _TPACPI_LED_OFF@GOTPAGEOFF]
Lloh24:
	ldr	w8, [x8]
	cmp	w8, w19
	cset	w8, ne
	lsl	w1, w8, w20
	bl	_ec_write
	cbnz	w0, LBB0_17
	b	LBB0_19
LBB0_11:
Lloh25:
	adrp	x8, _TPACPI_LED_NUMLEDS@GOTPAGE
Lloh26:
	ldr	x8, [x8, _TPACPI_LED_NUMLEDS@GOTPAGEOFF]
Lloh27:
	ldr	w8, [x8]
	cmp	w8, w20
	cset	w0, ls
	bl	_unlikely
	cbz	w0, LBB0_14
LBB0_12:
Lloh28:
	adrp	x8, _EINVAL@GOTPAGE
Lloh29:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
	b	LBB0_16
LBB0_13:
Lloh30:
	adrp	x8, _ENXIO@GOTPAGE
Lloh31:
	ldr	x8, [x8, _ENXIO@GOTPAGEOFF]
	b	LBB0_16
LBB0_14:
	mov	x0, x20
	bl	_tpacpi_is_led_restricted
	bl	_unlikely
	cbz	w0, LBB0_18
LBB0_15:
Lloh32:
	adrp	x8, _EPERM@GOTPAGE
Lloh33:
	ldr	x8, [x8, _EPERM@GOTPAGEOFF]
LBB0_16:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_17:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
LBB0_18:
Lloh34:
	adrp	x8, _led_handle@GOTPAGE
Lloh35:
	ldr	x8, [x8, _led_handle@GOTPAGEOFF]
Lloh36:
	ldr	w0, [x8]
Lloh37:
	adrp	x8, _led_set_status.led_led_arg1@PAGE
Lloh38:
	add	x8, x8, _led_set_status.led_led_arg1@PAGEOFF
	ldr	w5, [x8, w19, uxtw #2]
Lloh39:
	adrp	x3, l_.str@PAGE
Lloh40:
	add	x3, x3, l_.str@PAGEOFF
	mov	x1, #0
	mov	x2, #0
	mov	x4, x20
	bl	_acpi_evalf
	cbz	w0, LBB0_20
LBB0_19:
	mov	w0, #0
Lloh41:
	adrp	x8, _tpacpi_led_state_cache@GOTPAGE
Lloh42:
	ldr	x8, [x8, _tpacpi_led_state_cache@GOTPAGEOFF]
Lloh43:
	ldr	x8, [x8]
	str	w19, [x8, w20, uxtw #2]
	b	LBB0_17
LBB0_20:
Lloh44:
	adrp	x8, _EIO@GOTPAGE
Lloh45:
	ldr	x8, [x8, _EIO@GOTPAGEOFF]
	b	LBB0_16
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh24
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh25, Lloh26, Lloh27
	.loh AdrpLdrGot	Lloh28, Lloh29
	.loh AdrpLdrGot	Lloh30, Lloh31
	.loh AdrpLdrGot	Lloh32, Lloh33
	.loh AdrpAdd	Lloh39, Lloh40
	.loh AdrpAdd	Lloh37, Lloh38
	.loh AdrpLdrGotLdr	Lloh34, Lloh35, Lloh36
	.loh AdrpLdrGotLdr	Lloh41, Lloh42, Lloh43
	.loh AdrpLdrGot	Lloh44, Lloh45
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__const
	.p2align	2                               ; @led_set_status.led_sled_arg1
_led_set_status.led_sled_arg1:
	.long	0                               ; 0x0
	.long	1                               ; 0x1
	.long	3                               ; 0x3

	.p2align	2                               ; @led_set_status.led_led_arg1
_led_set_status.led_led_arg1:
	.long	0                               ; 0x0
	.long	128                             ; 0x80
	.long	192                             ; 0xc0

	.comm	_led_supported,4,2              ; @led_supported
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_EPERM,4,2                      ; @EPERM
	.comm	_led_handle,4,2                 ; @led_handle
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"vdd"

	.comm	_EIO,4,2                        ; @EIO
	.comm	_TPACPI_LED_EC_HLMS,4,2         ; @TPACPI_LED_EC_HLMS
	.comm	_TPACPI_LED_EC_HLBL,4,2         ; @TPACPI_LED_EC_HLBL
	.comm	_TPACPI_LED_BLINK,4,2           ; @TPACPI_LED_BLINK
	.comm	_TPACPI_LED_EC_HLCL,4,2         ; @TPACPI_LED_EC_HLCL
	.comm	_TPACPI_LED_OFF,4,2             ; @TPACPI_LED_OFF
	.comm	_TPACPI_LED_NUMLEDS,4,2         ; @TPACPI_LED_NUMLEDS
	.comm	_ENXIO,4,2                      ; @ENXIO
	.comm	_tpacpi_led_state_cache,8,3     ; @tpacpi_led_state_cache
	.no_dead_strip	_led_set_status
.subsections_via_symbols
