	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function max8997_led_set_mode
_max8997_led_set_mode:                  ## @max8997_led_set_mode
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r14
	pushq	%rbx
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movl	%esi, %r14d
	movq	%rdi, %rbx
	leal	-128(%r14), %ecx
	cmpl	$3, %ecx
	ja	LBB0_11
## %bb.1:
	movq	8(%rbx), %rax
	leaq	LJTI0_0(%rip), %rdx
	movslq	(%rdx,%rcx,4), %rcx
	addq	%rdx, %rcx
	jmpq	*%rcx
LBB0_10:
	movq	_MAX8997_LED1_MOVIE_PIN_MASK@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edx
	movq	_MAX8997_LED0_MOVIE_PIN_MASK@GOTPCREL(%rip), %rcx
	jmp	LBB0_5
LBB0_11:
	movq	_MAX8997_LED_NONE_MAX_BRIGHTNESS@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, 16(%rbx)
	jmp	LBB0_12
LBB0_4:
	movq	_MAX8997_LED1_MOVIE_MASK@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edx
	movq	_MAX8997_LED0_MOVIE_MASK@GOTPCREL(%rip), %rcx
LBB0_5:
	movl	(%rcx), %esi
	movl	%esi, %ecx
	orl	%edx, %ecx
	cmpl	$0, 24(%rbx)
	cmovel	%esi, %edx
	movq	_MAX8997_LED_MOVIE_MAX_BRIGHTNESS@GOTPCREL(%rip), %rsi
	jmp	LBB0_6
LBB0_9:
	movq	_MAX8997_LED1_FLASH_PIN_MASK@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edx
	movq	_MAX8997_LED0_FLASH_PIN_MASK@GOTPCREL(%rip), %rcx
	jmp	LBB0_3
LBB0_2:
	movq	_MAX8997_LED1_FLASH_MASK@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edx
	movq	_MAX8997_LED0_FLASH_MASK@GOTPCREL(%rip), %rcx
LBB0_3:
	movl	(%rcx), %esi
	movl	%esi, %ecx
	orl	%edx, %ecx
	cmpl	$0, 24(%rbx)
	cmovel	%esi, %edx
	movq	_MAX8997_LED_FLASH_MAX_BRIGHTNESS@GOTPCREL(%rip), %rsi
LBB0_6:
	movq	8(%rax), %rdi
	movq	(%rsi), %rax
	movq	%rax, 16(%rbx)
	testl	%ecx, %ecx
	je	LBB0_12
## %bb.7:
	movq	_MAX8997_REG_LEN_CNTL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_max8997_update_reg
	testl	%eax, %eax
	je	LBB0_12
## %bb.8:
	movq	8(%rbx), %rcx
	movl	(%rcx), %edi
	leaq	L_.str(%rip), %rsi
	movl	%eax, %edx
	callq	_dev_err
LBB0_12:
	movl	%r14d, (%rbx)
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
	.p2align	2, 0x90
	.data_region jt32
.set L0_0_set_10, LBB0_10-LJTI0_0
.set L0_0_set_4, LBB0_4-LJTI0_0
.set L0_0_set_9, LBB0_9-LJTI0_0
.set L0_0_set_2, LBB0_2-LJTI0_0
LJTI0_0:
	.long	L0_0_set_10
	.long	L0_0_set_4
	.long	L0_0_set_9
	.long	L0_0_set_2
	.end_data_region
                                        ## -- End function
	.comm	_MAX8997_LED1_FLASH_MASK,4,2    ## @MAX8997_LED1_FLASH_MASK
	.comm	_MAX8997_LED0_FLASH_MASK,4,2    ## @MAX8997_LED0_FLASH_MASK
	.comm	_MAX8997_LED_FLASH_MAX_BRIGHTNESS,8,3 ## @MAX8997_LED_FLASH_MAX_BRIGHTNESS
	.comm	_MAX8997_LED1_MOVIE_MASK,4,2    ## @MAX8997_LED1_MOVIE_MASK
	.comm	_MAX8997_LED0_MOVIE_MASK,4,2    ## @MAX8997_LED0_MOVIE_MASK
	.comm	_MAX8997_LED_MOVIE_MAX_BRIGHTNESS,8,3 ## @MAX8997_LED_MOVIE_MAX_BRIGHTNESS
	.comm	_MAX8997_LED1_FLASH_PIN_MASK,4,2 ## @MAX8997_LED1_FLASH_PIN_MASK
	.comm	_MAX8997_LED0_FLASH_PIN_MASK,4,2 ## @MAX8997_LED0_FLASH_PIN_MASK
	.comm	_MAX8997_LED1_MOVIE_PIN_MASK,4,2 ## @MAX8997_LED1_MOVIE_PIN_MASK
	.comm	_MAX8997_LED0_MOVIE_PIN_MASK,4,2 ## @MAX8997_LED0_MOVIE_PIN_MASK
	.comm	_MAX8997_LED_NONE_MAX_BRIGHTNESS,8,3 ## @MAX8997_LED_NONE_MAX_BRIGHTNESS
	.comm	_MAX8997_REG_LEN_CNTL,4,2       ## @MAX8997_REG_LEN_CNTL
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"failed to update register(%d)\n"

	.no_dead_strip	_max8997_led_set_mode
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function max8997_led_set_mode
_max8997_led_set_mode:                  ; @max8997_led_set_mode
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	mov	x19, x1
	mov	x20, x0
	sub	w9, w1, #128
	cmp	w9, #3
	b.hi	LBB0_3
; %bb.1:
	ldr	x8, [x20, #8]
Lloh0:
	adrp	x10, lJTI0_0@PAGE
Lloh1:
	add	x10, x10, lJTI0_0@PAGEOFF
	adr	x11, LBB0_2
	ldrb	w12, [x10, x9]
	add	x11, x11, x12, lsl #2
	br	x11
LBB0_2:
Lloh2:
	adrp	x9, _MAX8997_LED1_MOVIE_PIN_MASK@GOTPAGE
Lloh3:
	ldr	x9, [x9, _MAX8997_LED1_MOVIE_PIN_MASK@GOTPAGEOFF]
Lloh4:
	ldr	w9, [x9]
Lloh5:
	adrp	x10, _MAX8997_LED0_MOVIE_PIN_MASK@GOTPAGE
Lloh6:
	ldr	x10, [x10, _MAX8997_LED0_MOVIE_PIN_MASK@GOTPAGEOFF]
	b	LBB0_5
LBB0_3:
Lloh7:
	adrp	x8, _MAX8997_LED_NONE_MAX_BRIGHTNESS@GOTPAGE
Lloh8:
	ldr	x8, [x8, _MAX8997_LED_NONE_MAX_BRIGHTNESS@GOTPAGEOFF]
Lloh9:
	ldr	x8, [x8]
	str	x8, [x20, #16]
	b	LBB0_12
LBB0_4:
Lloh10:
	adrp	x9, _MAX8997_LED1_MOVIE_MASK@GOTPAGE
Lloh11:
	ldr	x9, [x9, _MAX8997_LED1_MOVIE_MASK@GOTPAGEOFF]
Lloh12:
	ldr	w9, [x9]
Lloh13:
	adrp	x10, _MAX8997_LED0_MOVIE_MASK@GOTPAGE
Lloh14:
	ldr	x10, [x10, _MAX8997_LED0_MOVIE_MASK@GOTPAGEOFF]
LBB0_5:
	ldr	w10, [x10]
	orr	w3, w10, w9
	ldr	w11, [x20, #24]
	cmp	w11, #0
	csel	w2, w10, w9, eq
Lloh15:
	adrp	x9, _MAX8997_LED_MOVIE_MAX_BRIGHTNESS@GOTPAGE
Lloh16:
	ldr	x9, [x9, _MAX8997_LED_MOVIE_MAX_BRIGHTNESS@GOTPAGEOFF]
	b	LBB0_9
LBB0_6:
Lloh17:
	adrp	x9, _MAX8997_LED1_FLASH_PIN_MASK@GOTPAGE
Lloh18:
	ldr	x9, [x9, _MAX8997_LED1_FLASH_PIN_MASK@GOTPAGEOFF]
Lloh19:
	ldr	w9, [x9]
Lloh20:
	adrp	x10, _MAX8997_LED0_FLASH_PIN_MASK@GOTPAGE
Lloh21:
	ldr	x10, [x10, _MAX8997_LED0_FLASH_PIN_MASK@GOTPAGEOFF]
	b	LBB0_8
LBB0_7:
Lloh22:
	adrp	x9, _MAX8997_LED1_FLASH_MASK@GOTPAGE
Lloh23:
	ldr	x9, [x9, _MAX8997_LED1_FLASH_MASK@GOTPAGEOFF]
Lloh24:
	ldr	w9, [x9]
Lloh25:
	adrp	x10, _MAX8997_LED0_FLASH_MASK@GOTPAGE
Lloh26:
	ldr	x10, [x10, _MAX8997_LED0_FLASH_MASK@GOTPAGEOFF]
LBB0_8:
	ldr	w10, [x10]
	orr	w3, w10, w9
	ldr	w11, [x20, #24]
	cmp	w11, #0
	csel	w2, w10, w9, eq
Lloh27:
	adrp	x9, _MAX8997_LED_FLASH_MAX_BRIGHTNESS@GOTPAGE
Lloh28:
	ldr	x9, [x9, _MAX8997_LED_FLASH_MAX_BRIGHTNESS@GOTPAGEOFF]
LBB0_9:
	ldr	x0, [x8, #8]
	ldr	x8, [x9]
	str	x8, [x20, #16]
	cbz	w3, LBB0_12
; %bb.10:
Lloh29:
	adrp	x8, _MAX8997_REG_LEN_CNTL@GOTPAGE
Lloh30:
	ldr	x8, [x8, _MAX8997_REG_LEN_CNTL@GOTPAGEOFF]
Lloh31:
	ldr	w1, [x8]
	bl	_max8997_update_reg
	cbz	w0, LBB0_12
; %bb.11:
	mov	x2, x0
	ldr	x8, [x20, #8]
	ldr	w0, [x8]
Lloh32:
	adrp	x1, l_.str@PAGE
Lloh33:
	add	x1, x1, l_.str@PAGEOFF
	bl	_dev_err
LBB0_12:
	str	w19, [x20]
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGot	Lloh15, Lloh16
	.loh AdrpLdrGot	Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGot	Lloh25, Lloh26
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh24
	.loh AdrpLdrGot	Lloh27, Lloh28
	.loh AdrpLdrGotLdr	Lloh29, Lloh30, Lloh31
	.loh AdrpAdd	Lloh32, Lloh33
	.cfi_endproc
	.section	__TEXT,__const
lJTI0_0:
	.byte	(LBB0_2-LBB0_2)>>2
	.byte	(LBB0_4-LBB0_2)>>2
	.byte	(LBB0_6-LBB0_2)>>2
	.byte	(LBB0_7-LBB0_2)>>2
                                        ; -- End function
	.comm	_MAX8997_LED1_FLASH_MASK,4,2    ; @MAX8997_LED1_FLASH_MASK
	.comm	_MAX8997_LED0_FLASH_MASK,4,2    ; @MAX8997_LED0_FLASH_MASK
	.comm	_MAX8997_LED_FLASH_MAX_BRIGHTNESS,8,3 ; @MAX8997_LED_FLASH_MAX_BRIGHTNESS
	.comm	_MAX8997_LED1_MOVIE_MASK,4,2    ; @MAX8997_LED1_MOVIE_MASK
	.comm	_MAX8997_LED0_MOVIE_MASK,4,2    ; @MAX8997_LED0_MOVIE_MASK
	.comm	_MAX8997_LED_MOVIE_MAX_BRIGHTNESS,8,3 ; @MAX8997_LED_MOVIE_MAX_BRIGHTNESS
	.comm	_MAX8997_LED1_FLASH_PIN_MASK,4,2 ; @MAX8997_LED1_FLASH_PIN_MASK
	.comm	_MAX8997_LED0_FLASH_PIN_MASK,4,2 ; @MAX8997_LED0_FLASH_PIN_MASK
	.comm	_MAX8997_LED1_MOVIE_PIN_MASK,4,2 ; @MAX8997_LED1_MOVIE_PIN_MASK
	.comm	_MAX8997_LED0_MOVIE_PIN_MASK,4,2 ; @MAX8997_LED0_MOVIE_PIN_MASK
	.comm	_MAX8997_LED_NONE_MAX_BRIGHTNESS,8,3 ; @MAX8997_LED_NONE_MAX_BRIGHTNESS
	.comm	_MAX8997_REG_LEN_CNTL,4,2       ; @MAX8997_REG_LEN_CNTL
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"failed to update register(%d)\n"

	.no_dead_strip	_max8997_led_set_mode
.subsections_via_symbols
