	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function adp1653_update_hw
_adp1653_update_hw:                     ## @adp1653_update_hw
	.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
	movq	%rdi, %rbx
	addq	$32, %rdi
	callq	_v4l2_get_subdevdata
	movq	%rax, %r14
	movq	24(%rbx), %rax
	movl	(%rax), %edi
	callq	_ADP1653_INDICATOR_INTENSITY_uA_TO_REG
	movl	%eax, %r12d
	movq	_ADP1653_REG_OUT_SEL_ILED_SHIFT@GOTPCREL(%rip), %rax
	movb	(%rax), %cl
	shll	%cl, %r12d
	movq	16(%rbx), %rax
	movl	(%rax), %eax
	xorl	%r15d, %r15d
	cmpl	$128, %eax
	je	LBB0_3
## %bb.1:
	cmpl	$130, %eax
	jne	LBB0_4
## %bb.2:
	movq	_ADP1653_REG_CONFIG_TMR_CFG@GOTPCREL(%rip), %rax
	movl	(%rax), %r13d
	movq	8(%rbx), %rax
	movl	(%rax), %edi
	callq	_TIMEOUT_US_TO_CODE
	movl	%eax, %r15d
	movq	_ADP1653_REG_CONFIG_TMR_SET_SHIFT@GOTPCREL(%rip), %rax
	movb	(%rax), %cl
	shll	%cl, %r15d
	orl	%r13d, %r15d
	jmp	LBB0_4
LBB0_3:
	movq	(%rbx), %rax
	movl	(%rax), %edi
	callq	_ADP1653_FLASH_INTENSITY_mA_TO_REG
	movq	_ADP1653_REG_OUT_SEL_HPLED_SHIFT@GOTPCREL(%rip), %rcx
	movb	(%rcx), %cl
	shll	%cl, %eax
	orl	%eax, %r12d
LBB0_4:
	movq	_ADP1653_REG_OUT_SEL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r14, %rdi
	movl	%r12d, %edx
	callq	_i2c_smbus_write_byte_data
	testl	%eax, %eax
	js	LBB0_6
## %bb.5:
	movq	_ADP1653_REG_CONFIG@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r14, %rdi
	movl	%r15d, %edx
	callq	_i2c_smbus_write_byte_data
	movl	%eax, %ecx
	sarl	$31, %ecx
	andl	%ecx, %eax
LBB0_6:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_ADP1653_REG_OUT_SEL_ILED_SHIFT,4,2 ## @ADP1653_REG_OUT_SEL_ILED_SHIFT
	.comm	_ADP1653_REG_CONFIG_TMR_CFG,4,2 ## @ADP1653_REG_CONFIG_TMR_CFG
	.comm	_ADP1653_REG_CONFIG_TMR_SET_SHIFT,4,2 ## @ADP1653_REG_CONFIG_TMR_SET_SHIFT
	.comm	_ADP1653_REG_OUT_SEL_HPLED_SHIFT,4,2 ## @ADP1653_REG_OUT_SEL_HPLED_SHIFT
	.comm	_ADP1653_REG_OUT_SEL,4,2        ## @ADP1653_REG_OUT_SEL
	.comm	_ADP1653_REG_CONFIG,4,2         ## @ADP1653_REG_CONFIG
	.no_dead_strip	_adp1653_update_hw
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function adp1653_update_hw
_adp1653_update_hw:                     ; @adp1653_update_hw
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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
	mov	x21, x0
	add	x0, x0, #32
	bl	_v4l2_get_subdevdata
	mov	x19, x0
	ldr	x8, [x21, #24]
	ldr	w0, [x8]
	bl	_ADP1653_INDICATOR_INTENSITY_uA_TO_REG
Lloh0:
	adrp	x8, _ADP1653_REG_OUT_SEL_ILED_SHIFT@GOTPAGE
Lloh1:
	ldr	x8, [x8, _ADP1653_REG_OUT_SEL_ILED_SHIFT@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	lsl	w20, w0, w8
	ldr	x8, [x21, #16]
	ldr	w8, [x8]
	cmp	w8, #128
	b.eq	LBB0_3
; %bb.1:
	cmp	w8, #130
	b.ne	LBB0_4
; %bb.2:
Lloh3:
	adrp	x8, _ADP1653_REG_CONFIG_TMR_CFG@GOTPAGE
Lloh4:
	ldr	x8, [x8, _ADP1653_REG_CONFIG_TMR_CFG@GOTPAGEOFF]
Lloh5:
	ldr	w22, [x8]
	ldr	x8, [x21, #8]
	ldr	w0, [x8]
	bl	_TIMEOUT_US_TO_CODE
Lloh6:
	adrp	x8, _ADP1653_REG_CONFIG_TMR_SET_SHIFT@GOTPAGE
Lloh7:
	ldr	x8, [x8, _ADP1653_REG_CONFIG_TMR_SET_SHIFT@GOTPAGEOFF]
Lloh8:
	ldr	w8, [x8]
	lsl	w8, w0, w8
	orr	w21, w8, w22
	b	LBB0_5
LBB0_3:
	ldr	x8, [x21]
	ldr	w0, [x8]
	bl	_ADP1653_FLASH_INTENSITY_mA_TO_REG
	mov	w21, #0
Lloh9:
	adrp	x8, _ADP1653_REG_OUT_SEL_HPLED_SHIFT@GOTPAGE
Lloh10:
	ldr	x8, [x8, _ADP1653_REG_OUT_SEL_HPLED_SHIFT@GOTPAGEOFF]
Lloh11:
	ldr	w8, [x8]
	lsl	w8, w0, w8
	orr	w20, w8, w20
	b	LBB0_5
LBB0_4:
	mov	w21, #0
LBB0_5:
Lloh12:
	adrp	x8, _ADP1653_REG_OUT_SEL@GOTPAGE
Lloh13:
	ldr	x8, [x8, _ADP1653_REG_OUT_SEL@GOTPAGEOFF]
Lloh14:
	ldr	w1, [x8]
	mov	x0, x19
	mov	x2, x20
	bl	_i2c_smbus_write_byte_data
	tbnz	w0, #31, LBB0_7
; %bb.6:
Lloh15:
	adrp	x8, _ADP1653_REG_CONFIG@GOTPAGE
Lloh16:
	ldr	x8, [x8, _ADP1653_REG_CONFIG@GOTPAGEOFF]
Lloh17:
	ldr	w1, [x8]
	mov	x0, x19
	mov	x2, x21
	bl	_i2c_smbus_write_byte_data
	cmp	w0, #0
	csel	w0, w0, wzr, lt
LBB0_7:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.cfi_endproc
                                        ; -- End function
	.comm	_ADP1653_REG_OUT_SEL_ILED_SHIFT,4,2 ; @ADP1653_REG_OUT_SEL_ILED_SHIFT
	.comm	_ADP1653_REG_CONFIG_TMR_CFG,4,2 ; @ADP1653_REG_CONFIG_TMR_CFG
	.comm	_ADP1653_REG_CONFIG_TMR_SET_SHIFT,4,2 ; @ADP1653_REG_CONFIG_TMR_SET_SHIFT
	.comm	_ADP1653_REG_OUT_SEL_HPLED_SHIFT,4,2 ; @ADP1653_REG_OUT_SEL_HPLED_SHIFT
	.comm	_ADP1653_REG_OUT_SEL,4,2        ; @ADP1653_REG_OUT_SEL
	.comm	_ADP1653_REG_CONFIG,4,2         ; @ADP1653_REG_CONFIG
	.no_dead_strip	_adp1653_update_hw
.subsections_via_symbols
