	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function lm3601x_flash_brightness_set
_lm3601x_flash_brightness_set:          ## @lm3601x_flash_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, %r14d
	callq	_fled_cdev_to_led
	movq	%rax, %r15
	movq	%rax, %rdi
	callq	_mutex_lock
	movq	%r15, %rdi
	callq	_lm3601x_read_faults
	testl	%eax, %eax
	js	LBB0_4
## %bb.1:
	movq	_LED_OFF@GOTPCREL(%rip), %rax
	cmpl	%r14d, (%rax)
	jne	LBB0_3
## %bb.2:
	movl	4(%r15), %edi
	movq	_LM3601X_ENABLE_REG@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_LM3601X_MODE_STROBE@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movl	%r14d, %ecx
	callq	_regmap_update_bits
	jmp	LBB0_4
LBB0_3:
	movq	_LM3601X_STROBE_REG_DIV@GOTPCREL(%rip), %rcx
	movl	%r14d, %eax
	cltd
	idivl	(%rcx)
	movl	4(%r15), %edi
	movq	_LM3601X_LED_FLASH_REG@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	movl	%eax, %edx
	callq	_regmap_write
LBB0_4:
	movl	%eax, %ebx
	movq	%r15, %rdi
	callq	_mutex_unlock
	movl	%ebx, %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	_LM3601X_ENABLE_REG,4,2         ## @LM3601X_ENABLE_REG
	.comm	_LM3601X_MODE_STROBE,4,2        ## @LM3601X_MODE_STROBE
	.comm	_LM3601X_STROBE_REG_DIV,4,2     ## @LM3601X_STROBE_REG_DIV
	.comm	_LM3601X_LED_FLASH_REG,4,2      ## @LM3601X_LED_FLASH_REG
	.no_dead_strip	_lm3601x_flash_brightness_set
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function lm3601x_flash_brightness_set
_lm3601x_flash_brightness_set:          ; @lm3601x_flash_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	x20, x1
	bl	_fled_cdev_to_led
	mov	x19, x0
	bl	_mutex_lock
	mov	x0, x19
	bl	_lm3601x_read_faults
	tbnz	w0, #31, LBB0_4
; %bb.1:
Lloh0:
	adrp	x8, _LED_OFF@GOTPAGE
Lloh1:
	ldr	x8, [x8, _LED_OFF@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	cmp	w8, w20
	b.ne	LBB0_3
; %bb.2:
	ldr	w0, [x19, #4]
Lloh3:
	adrp	x8, _LM3601X_ENABLE_REG@GOTPAGE
Lloh4:
	ldr	x8, [x8, _LM3601X_ENABLE_REG@GOTPAGEOFF]
Lloh5:
	ldr	w1, [x8]
Lloh6:
	adrp	x8, _LM3601X_MODE_STROBE@GOTPAGE
Lloh7:
	ldr	x8, [x8, _LM3601X_MODE_STROBE@GOTPAGEOFF]
Lloh8:
	ldr	w2, [x8]
	mov	x3, x20
	bl	_regmap_update_bits
	b	LBB0_4
LBB0_3:
Lloh9:
	adrp	x8, _LM3601X_STROBE_REG_DIV@GOTPAGE
Lloh10:
	ldr	x8, [x8, _LM3601X_STROBE_REG_DIV@GOTPAGEOFF]
Lloh11:
	ldr	w8, [x8]
	sdiv	w2, w20, w8
	ldr	w0, [x19, #4]
Lloh12:
	adrp	x8, _LM3601X_LED_FLASH_REG@GOTPAGE
Lloh13:
	ldr	x8, [x8, _LM3601X_LED_FLASH_REG@GOTPAGEOFF]
Lloh14:
	ldr	w1, [x8]
	bl	_regmap_write
LBB0_4:
	mov	x21, x0
	mov	x0, x19
	bl	_mutex_unlock
	mov	x0, x21
	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
	.cfi_endproc
                                        ; -- End function
	.comm	_LED_OFF,4,2                    ; @LED_OFF
	.comm	_LM3601X_ENABLE_REG,4,2         ; @LM3601X_ENABLE_REG
	.comm	_LM3601X_MODE_STROBE,4,2        ; @LM3601X_MODE_STROBE
	.comm	_LM3601X_STROBE_REG_DIV,4,2     ; @LM3601X_STROBE_REG_DIV
	.comm	_LM3601X_LED_FLASH_REG,4,2      ; @LM3601X_LED_FLASH_REG
	.no_dead_strip	_lm3601x_flash_brightness_set
.subsections_via_symbols
