	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function max77693_set_mode_reg
_max77693_set_mode_reg:                 ## @max77693_set_mode_reg
	.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
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%esi, %r15d
	movq	(%rdi), %rax
	movq	%rax, -48(%rbp)                 ## 8-byte Spill
	movq	_FLED1@GOTPCREL(%rip), %rax
	movl	(%rax), %r14d
	movq	_FLED2@GOTPCREL(%rip), %rax
	xorl	%r12d, %r12d
	cmpl	(%rax), %r14d
	jg	LBB0_11
## %bb.1:
	xorl	%r12d, %r12d
	jmp	LBB0_2
	.p2align	4, 0x90
LBB0_5:                                 ##   in Loop: Header=BB0_2 Depth=1
	movq	_FLASH_EN_ON@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	movl	%r14d, %edi
	callq	_FLASH_EN_SHIFT
	movl	%eax, %ecx
	shll	%cl, %ebx
LBB0_8:                                 ##   in Loop: Header=BB0_2 Depth=1
	orl	%ebx, %r12d
LBB0_9:                                 ##   in Loop: Header=BB0_2 Depth=1
	leal	1(%r14), %eax
	movq	_FLED2@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %r14d
	movl	%eax, %r14d
	jge	LBB0_10
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	movl	%r14d, %edi
	callq	_MODE_TORCH
	testl	%r15d, %eax
	je	LBB0_4
## %bb.3:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	_FLASH_EN_ON@GOTPCREL(%rip), %rax
	movl	(%rax), %r13d
	movl	%r14d, %edi
	callq	_TORCH_EN_SHIFT
	movl	%eax, %ecx
	shll	%cl, %r13d
	orl	%r13d, %r12d
LBB0_4:                                 ##   in Loop: Header=BB0_2 Depth=1
	movl	%r14d, %edi
	callq	_MODE_FLASH
	testl	%r15d, %eax
	jne	LBB0_5
## %bb.6:                               ##   in Loop: Header=BB0_2 Depth=1
	movl	%r14d, %edi
	callq	_MODE_FLASH_EXTERNAL
	testl	%r15d, %eax
	je	LBB0_9
## %bb.7:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	_FLASH_EN_FLASH@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	movl	%r14d, %edi
	callq	_FLASH_EN_SHIFT
	movl	%eax, %ecx
	shll	%cl, %ebx
	orl	%r12d, %ebx
	movq	_FLASH_EN_TORCH@GOTPCREL(%rip), %rax
	movl	(%rax), %r12d
	movl	%r14d, %edi
	callq	_TORCH_EN_SHIFT
	movl	%eax, %ecx
	shll	%cl, %r12d
	jmp	LBB0_8
LBB0_10:
	movq	_FLED1@GOTPCREL(%rip), %rax
	movl	(%rax), %r14d
LBB0_11:
	movl	%r14d, %edi
	callq	_MODE_TORCH
	movl	%eax, %ebx
	movq	_FLED2@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_MODE_TORCH
	orl	%ebx, %eax
	notl	%eax
	testl	%r15d, %eax
	movq	-48(%rbp), %rbx                 ## 8-byte Reload
	je	LBB0_14
## %bb.12:
	movq	_MAX77693_LED_REG_FLASH_EN@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	xorl	%edx, %edx
	callq	_regmap_write
	testl	%eax, %eax
	js	LBB0_13
LBB0_14:
	movq	_MAX77693_LED_REG_FLASH_EN@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	movl	%r12d, %edx
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_regmap_write                   ## TAILCALL
LBB0_13:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_FLED1,4,2                      ## @FLED1
	.comm	_FLED2,4,2                      ## @FLED2
	.comm	_FLASH_EN_ON,4,2                ## @FLASH_EN_ON
	.comm	_FLASH_EN_FLASH,4,2             ## @FLASH_EN_FLASH
	.comm	_FLASH_EN_TORCH,4,2             ## @FLASH_EN_TORCH
	.comm	_MAX77693_LED_REG_FLASH_EN,4,2  ## @MAX77693_LED_REG_FLASH_EN
	.no_dead_strip	_max77693_set_mode_reg
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function max77693_set_mode_reg
_max77693_set_mode_reg:                 ; @max77693_set_mode_reg
	.cfi_startproc
; %bb.0:
	stp	x28, x27, [sp, #-96]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	mov	x20, x1
Lloh0:
	adrp	x24, _FLED1@GOTPAGE
Lloh1:
	ldr	x24, [x24, _FLED1@GOTPAGEOFF]
	ldr	x19, [x0]
	ldr	w22, [x24]
Lloh2:
	adrp	x23, _FLED2@GOTPAGE
Lloh3:
	ldr	x23, [x23, _FLED2@GOTPAGEOFF]
	ldr	w8, [x23]
	cmp	w22, w8
	b.le	LBB0_2
; %bb.1:
	mov	w21, #0
	b	LBB0_11
LBB0_2:
	mov	w21, #0
Lloh4:
	adrp	x25, _FLASH_EN_FLASH@GOTPAGE
Lloh5:
	ldr	x25, [x25, _FLASH_EN_FLASH@GOTPAGEOFF]
Lloh6:
	adrp	x26, _FLASH_EN_TORCH@GOTPAGE
Lloh7:
	ldr	x26, [x26, _FLASH_EN_TORCH@GOTPAGEOFF]
Lloh8:
	adrp	x27, _FLASH_EN_ON@GOTPAGE
Lloh9:
	ldr	x27, [x27, _FLASH_EN_ON@GOTPAGEOFF]
	b	LBB0_5
LBB0_3:                                 ;   in Loop: Header=BB0_5 Depth=1
	ldr	w28, [x27]
	mov	x0, x22
	bl	_FLASH_EN_SHIFT
	lsl	w8, w28, w0
	orr	w21, w8, w21
LBB0_4:                                 ;   in Loop: Header=BB0_5 Depth=1
	add	w8, w22, #1
	ldr	w9, [x23]
	cmp	w22, w9
	mov	x22, x8
	b.ge	LBB0_10
LBB0_5:                                 ; =>This Inner Loop Header: Depth=1
	mov	x0, x22
	bl	_MODE_TORCH
	tst	w0, w20
	b.eq	LBB0_7
; %bb.6:                                ;   in Loop: Header=BB0_5 Depth=1
	ldr	w28, [x27]
	mov	x0, x22
	bl	_TORCH_EN_SHIFT
	lsl	w8, w28, w0
	orr	w21, w8, w21
LBB0_7:                                 ;   in Loop: Header=BB0_5 Depth=1
	mov	x0, x22
	bl	_MODE_FLASH
	tst	w0, w20
	b.ne	LBB0_3
; %bb.8:                                ;   in Loop: Header=BB0_5 Depth=1
	mov	x0, x22
	bl	_MODE_FLASH_EXTERNAL
	tst	w0, w20
	b.eq	LBB0_4
; %bb.9:                                ;   in Loop: Header=BB0_5 Depth=1
	ldr	w28, [x25]
	mov	x0, x22
	bl	_FLASH_EN_SHIFT
	lsl	w8, w28, w0
	orr	w21, w8, w21
	ldr	w28, [x26]
	mov	x0, x22
	bl	_TORCH_EN_SHIFT
	lsl	w8, w28, w0
	orr	w21, w21, w8
	b	LBB0_4
LBB0_10:
	ldr	w22, [x24]
LBB0_11:
	mov	x0, x22
	bl	_MODE_TORCH
	mov	x22, x0
	ldr	w0, [x23]
	bl	_MODE_TORCH
	orr	w8, w0, w22
Lloh10:
	adrp	x22, _MAX77693_LED_REG_FLASH_EN@GOTPAGE
Lloh11:
	ldr	x22, [x22, _MAX77693_LED_REG_FLASH_EN@GOTPAGEOFF]
	bics	wzr, w20, w8
	b.eq	LBB0_13
; %bb.12:
	ldr	w1, [x22]
	mov	x0, x19
	mov	w2, #0
	bl	_regmap_write
	tbnz	w0, #31, LBB0_14
LBB0_13:
	ldr	w1, [x22]
	mov	x0, x19
	mov	x2, x21
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp], #96             ; 16-byte Folded Reload
	b	_regmap_write
LBB0_14:
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp], #96             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh10, Lloh11
	.cfi_endproc
                                        ; -- End function
	.comm	_FLED1,4,2                      ; @FLED1
	.comm	_FLED2,4,2                      ; @FLED2
	.comm	_FLASH_EN_ON,4,2                ; @FLASH_EN_ON
	.comm	_FLASH_EN_FLASH,4,2             ; @FLASH_EN_FLASH
	.comm	_FLASH_EN_TORCH,4,2             ; @FLASH_EN_TORCH
	.comm	_MAX77693_LED_REG_FLASH_EN,4,2  ; @MAX77693_LED_REG_FLASH_EN
	.no_dead_strip	_max77693_set_mode_reg
.subsections_via_symbols
