	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function max77693_set_flash_current
_max77693_set_flash_current:            ## @max77693_set_flash_current
	.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	%r12
	pushq	%rbx
	subq	$16, %rsp
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%edx, %ecx
	movl	%esi, %r15d
	movq	%rdi, %r12
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -40(%rbp)
	movq	16(%rdi), %r14
	movq	_EINVAL@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	movq	_FLASH@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movl	8(%rdi), %r8d
	leaq	-48(%rbp), %r9
	callq	_max77693_distribute_currents
	movq	_FLED1@GOTPCREL(%rip), %rax
	movslq	(%rax), %rax
	cmpl	%r15d, %eax
	je	LBB0_3
## %bb.1:
	cmpq	$0, (%r12)
	je	LBB0_2
LBB0_3:
	movl	-48(%rbp,%rax,4), %edi
	callq	_max77693_led_iout_to_reg
	movq	_MAX77693_LED_REG_IFLASH1@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	movq	%r14, %rdi
	movl	%eax, %edx
	callq	_regmap_write
	movl	%eax, %ebx
	testl	%eax, %eax
	jns	LBB0_4
	jmp	LBB0_7
LBB0_2:
	negl	%ebx
LBB0_4:
	movq	_FLED2@GOTPCREL(%rip), %rax
	movslq	(%rax), %rax
	cmpl	%r15d, %eax
	je	LBB0_6
## %bb.5:
	cmpq	$0, (%r12)
	je	LBB0_7
LBB0_6:
	movl	-48(%rbp,%rax,4), %edi
	callq	_max77693_led_iout_to_reg
	movq	_MAX77693_LED_REG_IFLASH2@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	movq	%r14, %rdi
	movl	%eax, %edx
	callq	_regmap_write
	movl	%eax, %ebx
LBB0_7:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-40(%rbp), %rax
	jne	LBB0_9
## %bb.8:
	movl	%ebx, %eax
	addq	$16, %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_9:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_FLASH,4,2                      ## @FLASH
	.comm	_FLED1,4,2                      ## @FLED1
	.comm	_MAX77693_LED_REG_IFLASH1,4,2   ## @MAX77693_LED_REG_IFLASH1
	.comm	_FLED2,4,2                      ## @FLED2
	.comm	_MAX77693_LED_REG_IFLASH2,4,2   ## @MAX77693_LED_REG_IFLASH2
	.no_dead_strip	_max77693_set_flash_current
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function max77693_set_flash_current
_max77693_set_flash_current:            ; @max77693_set_flash_current
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	mov	x3, x2
	mov	x21, x1
	mov	x20, x0
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	str	x8, [sp, #8]
Lloh3:
	adrp	x8, _EINVAL@GOTPAGE
Lloh4:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
	ldr	x19, [x0, #16]
Lloh5:
	ldr	w22, [x8]
Lloh6:
	adrp	x8, _FLASH@GOTPAGE
Lloh7:
	ldr	x8, [x8, _FLASH@GOTPAGEOFF]
Lloh8:
	ldr	w2, [x8]
	ldr	w4, [x0, #8]
	mov	x23, sp
	mov	x5, sp
	bl	_max77693_distribute_currents
Lloh9:
	adrp	x8, _FLED1@GOTPAGE
Lloh10:
	ldr	x8, [x8, _FLED1@GOTPAGEOFF]
Lloh11:
	ldrsw	x8, [x8]
	cmp	w8, w21
	b.eq	LBB0_2
; %bb.1:
	ldr	x9, [x20]
	cbz	x9, LBB0_3
LBB0_2:
	ldr	w0, [x23, x8, lsl #2]
	bl	_max77693_led_iout_to_reg
	mov	x2, x0
Lloh12:
	adrp	x8, _MAX77693_LED_REG_IFLASH1@GOTPAGE
Lloh13:
	ldr	x8, [x8, _MAX77693_LED_REG_IFLASH1@GOTPAGEOFF]
Lloh14:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_regmap_write
	tbz	w0, #31, LBB0_4
	b	LBB0_7
LBB0_3:
	neg	w0, w22
LBB0_4:
Lloh15:
	adrp	x8, _FLED2@GOTPAGE
Lloh16:
	ldr	x8, [x8, _FLED2@GOTPAGEOFF]
Lloh17:
	ldrsw	x8, [x8]
	cmp	w8, w21
	b.eq	LBB0_6
; %bb.5:
	ldr	x9, [x20]
	cbz	x9, LBB0_7
LBB0_6:
	mov	x9, sp
	ldr	w0, [x9, x8, lsl #2]
	bl	_max77693_led_iout_to_reg
	mov	x2, x0
Lloh18:
	adrp	x8, _MAX77693_LED_REG_IFLASH2@GOTPAGE
Lloh19:
	ldr	x8, [x8, _MAX77693_LED_REG_IFLASH2@GOTPAGEOFF]
Lloh20:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_regmap_write
LBB0_7:
	ldr	x8, [sp, #8]
Lloh21:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh22:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh23:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_9
; %bb.8:
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #80
	ret
LBB0_9:
	bl	___stack_chk_fail
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.cfi_endproc
                                        ; -- End function
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_FLASH,4,2                      ; @FLASH
	.comm	_FLED1,4,2                      ; @FLED1
	.comm	_MAX77693_LED_REG_IFLASH1,4,2   ; @MAX77693_LED_REG_IFLASH1
	.comm	_FLED2,4,2                      ; @FLED2
	.comm	_MAX77693_LED_REG_IFLASH2,4,2   ; @MAX77693_LED_REG_IFLASH2
	.no_dead_strip	_max77693_set_flash_current
.subsections_via_symbols
