	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ktd2692_led_brightness_set
_ktd2692_led_brightness_set:            ## @ktd2692_led_brightness_set
	.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, %r15d
	callq	_lcdev_to_flcdev
	movq	%rax, %rdi
	callq	_fled_cdev_to_led
	movq	%rax, %rbx
	movq	%rax, %r14
	addq	$4, %r14
	movq	%r14, %rdi
	callq	_mutex_lock
	movq	_LED_OFF@GOTPCREL(%rip), %rax
	cmpl	%r15d, (%rax)
	jne	LBB0_2
## %bb.1:
	movq	_KTD2692_MODE_DISABLE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, (%rbx)
	movl	8(%rbx), %edi
	movq	_KTD2692_LOW@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_gpiod_direction_output
	movl	(%rbx), %esi
	jmp	LBB0_3
LBB0_2:
	movq	_KTD2692_REG_MOVIE_CURRENT_BASE@GOTPCREL(%rip), %rax
	orl	(%rax), %r15d
	movq	%rbx, %rdi
	movl	%r15d, %esi
	callq	_ktd2692_expresswire_write
	movq	_KTD2692_MODE_MOVIE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	%esi, (%rbx)
LBB0_3:
	movq	_KTD2692_REG_MODE_BASE@GOTPCREL(%rip), %rax
	orl	(%rax), %esi
	movq	%rbx, %rdi
	callq	_ktd2692_expresswire_write
	movq	%r14, %rdi
	callq	_mutex_unlock
	xorl	%eax, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_LED_OFF,4,2                    ## @LED_OFF
	.comm	_KTD2692_MODE_DISABLE,4,2       ## @KTD2692_MODE_DISABLE
	.comm	_KTD2692_LOW,4,2                ## @KTD2692_LOW
	.comm	_KTD2692_REG_MOVIE_CURRENT_BASE,4,2 ## @KTD2692_REG_MOVIE_CURRENT_BASE
	.comm	_KTD2692_MODE_MOVIE,4,2         ## @KTD2692_MODE_MOVIE
	.comm	_KTD2692_REG_MODE_BASE,4,2      ## @KTD2692_REG_MODE_BASE
	.no_dead_strip	_ktd2692_led_brightness_set
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ktd2692_led_brightness_set
_ktd2692_led_brightness_set:            ; @ktd2692_led_brightness_set
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w21, -40
	.cfi_offset w22, -48
	mov	x21, x1
	bl	_lcdev_to_flcdev
	bl	_fled_cdev_to_led
	mov	x20, x0
	add	x19, x0, #4
	mov	x0, x19
	bl	_mutex_lock
Lloh0:
	adrp	x8, _LED_OFF@GOTPAGE
Lloh1:
	ldr	x8, [x8, _LED_OFF@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	cmp	w8, w21
	b.ne	LBB0_2
; %bb.1:
Lloh3:
	adrp	x8, _KTD2692_MODE_DISABLE@GOTPAGE
Lloh4:
	ldr	x8, [x8, _KTD2692_MODE_DISABLE@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	str	w8, [x20]
	ldr	w0, [x20, #8]
Lloh6:
	adrp	x8, _KTD2692_LOW@GOTPAGE
Lloh7:
	ldr	x8, [x8, _KTD2692_LOW@GOTPAGEOFF]
Lloh8:
	ldr	w1, [x8]
	bl	_gpiod_direction_output
	ldr	w8, [x20]
	b	LBB0_3
LBB0_2:
Lloh9:
	adrp	x8, _KTD2692_REG_MOVIE_CURRENT_BASE@GOTPAGE
Lloh10:
	ldr	x8, [x8, _KTD2692_REG_MOVIE_CURRENT_BASE@GOTPAGEOFF]
Lloh11:
	ldr	w8, [x8]
	orr	w1, w8, w21
	mov	x0, x20
	bl	_ktd2692_expresswire_write
Lloh12:
	adrp	x8, _KTD2692_MODE_MOVIE@GOTPAGE
Lloh13:
	ldr	x8, [x8, _KTD2692_MODE_MOVIE@GOTPAGEOFF]
Lloh14:
	ldr	w8, [x8]
	str	w8, [x20]
LBB0_3:
Lloh15:
	adrp	x9, _KTD2692_REG_MODE_BASE@GOTPAGE
Lloh16:
	ldr	x9, [x9, _KTD2692_REG_MODE_BASE@GOTPAGEOFF]
Lloh17:
	ldr	w9, [x9]
	orr	w1, w9, w8
	mov	x0, x20
	bl	_ktd2692_expresswire_write
	mov	x0, x19
	bl	_mutex_unlock
	mov	w0, #0
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.cfi_endproc
                                        ; -- End function
	.comm	_LED_OFF,4,2                    ; @LED_OFF
	.comm	_KTD2692_MODE_DISABLE,4,2       ; @KTD2692_MODE_DISABLE
	.comm	_KTD2692_LOW,4,2                ; @KTD2692_LOW
	.comm	_KTD2692_REG_MOVIE_CURRENT_BASE,4,2 ; @KTD2692_REG_MOVIE_CURRENT_BASE
	.comm	_KTD2692_MODE_MOVIE,4,2         ; @KTD2692_MODE_MOVIE
	.comm	_KTD2692_REG_MODE_BASE,4,2      ; @KTD2692_REG_MODE_BASE
	.no_dead_strip	_ktd2692_led_brightness_set
.subsections_via_symbols
