	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function max8997_led_set_current
_max8997_led_set_current:               ## @max8997_led_set_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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -24
	movl	%esi, %edx
	movq	%rdi, %rbx
	movq	8(%rdi), %rax
	movq	8(%rax), %rdi
	movl	(%rbx), %eax
	leal	-128(%rax), %ecx
	cmpl	$2, %ecx
	jb	LBB0_6
## %bb.1:
	addl	$-130, %eax
	cmpl	$1, %eax
	ja	LBB0_9
## %bb.2:
	cmpl	$0, 16(%rbx)
	jne	LBB0_3
## %bb.4:
	movq	_MAX8997_REG_FLASH1_CUR@GOTPCREL(%rip), %rax
	jmp	LBB0_5
LBB0_6:
	movq	_MAX8997_REG_MOVIE_CUR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_MAX8997_LED_MOVIE_CUR_MASK@GOTPCREL(%rip), %rax
	movq	_MAX8997_LED_MOVIE_SHIFT@GOTPCREL(%rip), %rcx
	jmp	LBB0_7
LBB0_3:
	movq	_MAX8997_REG_FLASH2_CUR@GOTPCREL(%rip), %rax
LBB0_5:
	movl	(%rax), %esi
	movq	_MAX8997_LED_FLASH_CUR_MASK@GOTPCREL(%rip), %rax
	movq	_MAX8997_LED_FLASH_SHIFT@GOTPCREL(%rip), %rcx
LBB0_7:
	movl	(%rax), %eax
	testl	%eax, %eax
	je	LBB0_9
## %bb.8:
	movb	(%rcx), %cl
	shll	%cl, %edx
	movl	%eax, %ecx
	callq	_max8997_update_reg
	testl	%eax, %eax
	je	LBB0_9
## %bb.10:
	movq	8(%rbx), %rcx
	movl	(%rcx), %edi
	leaq	L_.str(%rip), %rsi
	movl	%eax, %edx
	addq	$8, %rsp
	popq	%rbx
	popq	%rbp
	jmp	_dev_err                        ## TAILCALL
LBB0_9:
	addq	$8, %rsp
	popq	%rbx
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_MAX8997_LED_FLASH_SHIFT,4,2    ## @MAX8997_LED_FLASH_SHIFT
	.comm	_MAX8997_LED_FLASH_CUR_MASK,4,2 ## @MAX8997_LED_FLASH_CUR_MASK
	.comm	_MAX8997_REG_FLASH2_CUR,4,2     ## @MAX8997_REG_FLASH2_CUR
	.comm	_MAX8997_REG_FLASH1_CUR,4,2     ## @MAX8997_REG_FLASH1_CUR
	.comm	_MAX8997_LED_MOVIE_SHIFT,4,2    ## @MAX8997_LED_MOVIE_SHIFT
	.comm	_MAX8997_LED_MOVIE_CUR_MASK,4,2 ## @MAX8997_LED_MOVIE_CUR_MASK
	.comm	_MAX8997_REG_MOVIE_CUR,4,2      ## @MAX8997_REG_MOVIE_CUR
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"failed to update register(%d)\n"

	.no_dead_strip	_max8997_led_set_current
.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_current
_max8997_led_set_current:               ; @max8997_led_set_current
	.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, x0
	ldr	x8, [x0, #8]
	ldr	x0, [x8, #8]
	ldr	w8, [x19]
	sub	w9, w8, #128
	cmp	w9, #2
	b.lo	LBB0_3
; %bb.1:
	sub	w8, w8, #130
	cmp	w8, #1
	b.hi	LBB0_6
; %bb.2:
	ldr	w8, [x19, #16]
Lloh0:
	adrp	x9, _MAX8997_REG_FLASH2_CUR@GOTPAGE
Lloh1:
	ldr	x9, [x9, _MAX8997_REG_FLASH2_CUR@GOTPAGEOFF]
Lloh2:
	adrp	x10, _MAX8997_REG_FLASH1_CUR@GOTPAGE
Lloh3:
	ldr	x10, [x10, _MAX8997_REG_FLASH1_CUR@GOTPAGEOFF]
	cmp	w8, #0
	csel	x8, x10, x9, eq
	ldr	w8, [x8]
Lloh4:
	adrp	x10, _MAX8997_LED_FLASH_CUR_MASK@GOTPAGE
Lloh5:
	ldr	x10, [x10, _MAX8997_LED_FLASH_CUR_MASK@GOTPAGEOFF]
Lloh6:
	adrp	x9, _MAX8997_LED_FLASH_SHIFT@GOTPAGE
Lloh7:
	ldr	x9, [x9, _MAX8997_LED_FLASH_SHIFT@GOTPAGEOFF]
Lloh8:
	ldr	w3, [x10]
	cbnz	w3, LBB0_4
	b	LBB0_6
LBB0_3:
Lloh9:
	adrp	x8, _MAX8997_REG_MOVIE_CUR@GOTPAGE
Lloh10:
	ldr	x8, [x8, _MAX8997_REG_MOVIE_CUR@GOTPAGEOFF]
Lloh11:
	ldr	w8, [x8]
Lloh12:
	adrp	x10, _MAX8997_LED_MOVIE_CUR_MASK@GOTPAGE
Lloh13:
	ldr	x10, [x10, _MAX8997_LED_MOVIE_CUR_MASK@GOTPAGEOFF]
Lloh14:
	adrp	x9, _MAX8997_LED_MOVIE_SHIFT@GOTPAGE
Lloh15:
	ldr	x9, [x9, _MAX8997_LED_MOVIE_SHIFT@GOTPAGEOFF]
Lloh16:
	ldr	w3, [x10]
	cbz	w3, LBB0_6
LBB0_4:
	ldr	w9, [x9]
	lsl	w2, w1, w9
	mov	x1, x8
	bl	_max8997_update_reg
	cbz	w0, LBB0_6
; %bb.5:
	mov	x2, x0
	ldr	x8, [x19, #8]
	ldr	w0, [x8]
Lloh17:
	adrp	x1, l_.str@PAGE
Lloh18:
	add	x1, x1, l_.str@PAGEOFF
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	b	_dev_err
LBB0_6:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh8
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh16
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpAdd	Lloh17, Lloh18
	.cfi_endproc
                                        ; -- End function
	.comm	_MAX8997_LED_FLASH_SHIFT,4,2    ; @MAX8997_LED_FLASH_SHIFT
	.comm	_MAX8997_LED_FLASH_CUR_MASK,4,2 ; @MAX8997_LED_FLASH_CUR_MASK
	.comm	_MAX8997_REG_FLASH2_CUR,4,2     ; @MAX8997_REG_FLASH2_CUR
	.comm	_MAX8997_REG_FLASH1_CUR,4,2     ; @MAX8997_REG_FLASH1_CUR
	.comm	_MAX8997_LED_MOVIE_SHIFT,4,2    ; @MAX8997_LED_MOVIE_SHIFT
	.comm	_MAX8997_LED_MOVIE_CUR_MASK,4,2 ; @MAX8997_LED_MOVIE_CUR_MASK
	.comm	_MAX8997_REG_MOVIE_CUR,4,2      ; @MAX8997_REG_MOVIE_CUR
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"failed to update register(%d)\n"

	.no_dead_strip	_max8997_led_set_current
.subsections_via_symbols
