	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function twl4030_led_set_value
_twl4030_led_set_value:                 ## @twl4030_led_set_value
	.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
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movl	%esi, %r14d
	movq	_LEDEN_LEDAON@GOTPCREL(%rip), %rax
	movq	_LEDEN_LEDAPWM@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ebx
	orl	(%rax), %ebx
	testl	%edi, %edi
	setne	%cl
	shll	%cl, %ebx
	movq	_gpio_lock@GOTPCREL(%rip), %rdi
	callq	_mutex_lock
	testl	%r14d, %r14d
	je	LBB0_2
## %bb.1:
	notl	%ebx
	movq	_cached_leden@GOTPCREL(%rip), %rax
	andl	(%rax), %ebx
	jmp	LBB0_3
LBB0_2:
	movq	_cached_leden@GOTPCREL(%rip), %rax
	orl	(%rax), %ebx
LBB0_3:
	movq	_cached_leden@GOTPCREL(%rip), %rax
	movl	%ebx, (%rax)
	movq	_TWL4030_MODULE_LED@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	_TWL4030_LED_LEDEN@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movl	%ebx, %esi
	callq	_twl4030_i2c_write_u8
	movq	_gpio_lock@GOTPCREL(%rip), %rdi
	popq	%rbx
	popq	%r14
	popq	%rbp
	jmp	_mutex_unlock                   ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_LEDEN_LEDAON,4,2               ## @LEDEN_LEDAON
	.comm	_LEDEN_LEDAPWM,4,2              ## @LEDEN_LEDAPWM
	.comm	_gpio_lock,4,2                  ## @gpio_lock
	.comm	_cached_leden,4,2               ## @cached_leden
	.comm	_TWL4030_MODULE_LED,4,2         ## @TWL4030_MODULE_LED
	.comm	_TWL4030_LED_LEDEN,4,2          ## @TWL4030_LED_LEDEN
	.no_dead_strip	_twl4030_led_set_value
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function twl4030_led_set_value
_twl4030_led_set_value:                 ; @twl4030_led_set_value
	.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
Lloh0:
	adrp	x8, _LEDEN_LEDAON@GOTPAGE
Lloh1:
	ldr	x8, [x8, _LEDEN_LEDAON@GOTPAGEOFF]
Lloh2:
	adrp	x9, _LEDEN_LEDAPWM@GOTPAGE
Lloh3:
	ldr	x9, [x9, _LEDEN_LEDAPWM@GOTPAGEOFF]
Lloh4:
	ldr	w8, [x8]
Lloh5:
	ldr	w9, [x9]
	orr	w8, w9, w8
	cmp	w0, #0
	cset	w9, ne
	lsl	w20, w8, w9
Lloh6:
	adrp	x0, _gpio_lock@GOTPAGE
Lloh7:
	ldr	x0, [x0, _gpio_lock@GOTPAGEOFF]
	bl	_mutex_lock
Lloh8:
	adrp	x8, _cached_leden@GOTPAGE
Lloh9:
	ldr	x8, [x8, _cached_leden@GOTPAGEOFF]
	cbz	w19, LBB0_2
; %bb.1:
	ldr	w9, [x8]
	bic	w1, w9, w20
	b	LBB0_3
LBB0_2:
	ldr	w9, [x8]
	orr	w1, w9, w20
LBB0_3:
	str	w1, [x8]
Lloh10:
	adrp	x8, _TWL4030_MODULE_LED@GOTPAGE
Lloh11:
	ldr	x8, [x8, _TWL4030_MODULE_LED@GOTPAGEOFF]
Lloh12:
	ldr	w0, [x8]
Lloh13:
	adrp	x8, _TWL4030_LED_LEDEN@GOTPAGE
Lloh14:
	ldr	x8, [x8, _TWL4030_LED_LEDEN@GOTPAGEOFF]
Lloh15:
	ldr	w2, [x8]
	bl	_twl4030_i2c_write_u8
Lloh16:
	adrp	x0, _gpio_lock@GOTPAGE
Lloh17:
	ldr	x0, [x0, _gpio_lock@GOTPAGEOFF]
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	b	_mutex_unlock
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh4
	.loh AdrpLdrGot	Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.cfi_endproc
                                        ; -- End function
	.comm	_LEDEN_LEDAON,4,2               ; @LEDEN_LEDAON
	.comm	_LEDEN_LEDAPWM,4,2              ; @LEDEN_LEDAPWM
	.comm	_gpio_lock,4,2                  ; @gpio_lock
	.comm	_cached_leden,4,2               ; @cached_leden
	.comm	_TWL4030_MODULE_LED,4,2         ; @TWL4030_MODULE_LED
	.comm	_TWL4030_LED_LEDEN,4,2          ; @TWL4030_LED_LEDEN
	.no_dead_strip	_twl4030_led_set_value
.subsections_via_symbols
