	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function max77693_set_torch_current
_max77693_set_torch_current:            ## @max77693_set_torch_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	%r13
	pushq	%r12
	pushq	%rbx
	subq	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%edx, %ecx
	movl	%esi, %r12d
	movq	%rdi, %r13
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	movq	24(%rdi), %r14
	movq	_TORCH@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movl	16(%rdi), %r8d
	leaq	-56(%rbp), %r9
	callq	_max77693_distribute_currents
	movq	_FLED1@GOTPCREL(%rip), %rax
	movslq	(%rax), %rax
	cmpl	%r12d, %eax
	je	LBB0_3
## %bb.1:
	cmpq	$0, 8(%r13)
	je	LBB0_2
LBB0_3:
	movl	-56(%rbp,%rax,4), %edi
	callq	_max77693_led_iout_to_reg
	movl	%eax, %r15d
	movq	_TORCH_IOUT2_SHIFT@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_TORCH_IOUT_MASK
	andl	%eax, (%r13)
LBB0_4:
	movq	_FLED2@GOTPCREL(%rip), %rax
	movslq	(%rax), %rax
	cmpl	%r12d, %eax
	je	LBB0_7
## %bb.5:
	cmpq	$0, 8(%r13)
	je	LBB0_6
LBB0_7:
	movl	-56(%rbp,%rax,4), %edi
	callq	_max77693_led_iout_to_reg
	movl	%eax, %ebx
	movq	_TORCH_IOUT1_SHIFT@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_TORCH_IOUT_MASK
	andl	(%r13), %eax
	movl	%eax, (%r13)
LBB0_8:
	movq	_TORCH_IOUT1_SHIFT@GOTPCREL(%rip), %rcx
	movb	(%rcx), %cl
	shll	%cl, %r15d
	orl	%eax, %r15d
	movq	_TORCH_IOUT2_SHIFT@GOTPCREL(%rip), %rax
	movb	(%rax), %cl
	shll	%cl, %ebx
	orl	%r15d, %ebx
	movl	%ebx, (%r13)
	movq	_MAX77693_LED_REG_ITORCH@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r14, %rdi
	movl	%ebx, %edx
	callq	_regmap_write
	movq	___stack_chk_guard@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	cmpq	-48(%rbp), %rcx
	jne	LBB0_10
## %bb.9:
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_2:
	xorl	%r15d, %r15d
	jmp	LBB0_4
LBB0_6:
	movl	(%r13), %eax
	xorl	%ebx, %ebx
	jmp	LBB0_8
LBB0_10:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_TORCH,4,2                      ## @TORCH
	.comm	_FLED1,4,2                      ## @FLED1
	.comm	_TORCH_IOUT2_SHIFT,4,2          ## @TORCH_IOUT2_SHIFT
	.comm	_FLED2,4,2                      ## @FLED2
	.comm	_TORCH_IOUT1_SHIFT,4,2          ## @TORCH_IOUT1_SHIFT
	.comm	_MAX77693_LED_REG_ITORCH,4,2    ## @MAX77693_LED_REG_ITORCH
	.no_dead_strip	_max77693_set_torch_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_torch_current
_max77693_set_torch_current:            ; @max77693_set_torch_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	x22, 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]
	ldr	x19, [x0, #24]
Lloh3:
	adrp	x8, _TORCH@GOTPAGE
Lloh4:
	ldr	x8, [x8, _TORCH@GOTPAGEOFF]
Lloh5:
	ldr	w2, [x8]
	ldr	w4, [x0, #16]
	mov	x21, sp
	mov	x5, sp
	bl	_max77693_distribute_currents
Lloh6:
	adrp	x8, _FLED1@GOTPAGE
Lloh7:
	ldr	x8, [x8, _FLED1@GOTPAGEOFF]
Lloh8:
	ldrsw	x8, [x8]
Lloh9:
	adrp	x23, _TORCH_IOUT2_SHIFT@GOTPAGE
Lloh10:
	ldr	x23, [x23, _TORCH_IOUT2_SHIFT@GOTPAGEOFF]
	cmp	w8, w22
	b.eq	LBB0_2
; %bb.1:
	ldr	x9, [x20, #8]
	cbz	x9, LBB0_8
LBB0_2:
	ldr	w0, [x21, x8, lsl #2]
	bl	_max77693_led_iout_to_reg
	mov	x21, x0
	ldr	w0, [x23]
	bl	_TORCH_IOUT_MASK
	ldr	w8, [x20]
	and	w8, w8, w0
	str	w8, [x20]
LBB0_3:
Lloh11:
	adrp	x8, _FLED2@GOTPAGE
Lloh12:
	ldr	x8, [x8, _FLED2@GOTPAGEOFF]
Lloh13:
	ldrsw	x8, [x8]
Lloh14:
	adrp	x24, _TORCH_IOUT1_SHIFT@GOTPAGE
Lloh15:
	ldr	x24, [x24, _TORCH_IOUT1_SHIFT@GOTPAGEOFF]
	cmp	w8, w22
	b.eq	LBB0_5
; %bb.4:
	ldr	x9, [x20, #8]
	cbz	x9, LBB0_9
LBB0_5:
	mov	x9, sp
	ldr	w0, [x9, x8, lsl #2]
	bl	_max77693_led_iout_to_reg
	mov	x22, x0
	ldr	w0, [x24]
	bl	_TORCH_IOUT_MASK
	ldr	w8, [x20]
	and	w8, w8, w0
	str	w8, [x20]
LBB0_6:
	ldr	w9, [x24]
	lsl	w9, w21, w9
	ldr	w10, [x23]
	lsl	w10, w22, w10
	orr	w9, w10, w9
	orr	w2, w9, w8
	str	w2, [x20]
Lloh16:
	adrp	x8, _MAX77693_LED_REG_ITORCH@GOTPAGE
Lloh17:
	ldr	x8, [x8, _MAX77693_LED_REG_ITORCH@GOTPAGEOFF]
Lloh18:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_regmap_write
	ldr	x8, [sp, #8]
Lloh19:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh20:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh21:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_10
; %bb.7:
	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_8:
	mov	w21, #0
	b	LBB0_3
LBB0_9:
	mov	w22, #0
	ldr	w8, [x20]
	b	LBB0_6
LBB0_10:
	bl	___stack_chk_fail
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.cfi_endproc
                                        ; -- End function
	.comm	_TORCH,4,2                      ; @TORCH
	.comm	_FLED1,4,2                      ; @FLED1
	.comm	_TORCH_IOUT2_SHIFT,4,2          ; @TORCH_IOUT2_SHIFT
	.comm	_FLED2,4,2                      ; @FLED2
	.comm	_TORCH_IOUT1_SHIFT,4,2          ; @TORCH_IOUT1_SHIFT
	.comm	_MAX77693_LED_REG_ITORCH,4,2    ; @MAX77693_LED_REG_ITORCH
	.no_dead_strip	_max77693_set_torch_current
.subsections_via_symbols
