	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function max30100_led_init
_max30100_led_init:                     ## @max30100_led_init
	.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
	movq	%rdi, %r14
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	movq	8(%rdi), %r15
	movq	(%r15), %rdi
	leaq	L_.str(%rip), %rsi
	leaq	-56(%rbp), %rdx
	movl	$2, %ecx
	callq	_of_property_read_u32_array
	testl	%eax, %eax
	je	LBB0_2
## %bb.1:
	movq	_MAX30100_REG_LED_CONFIG_24MA@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	movq	_MAX30100_REG_LED_CONFIG_RED_LED_SHIFT@GOTPCREL(%rip), %rax
	movb	(%rax), %cl
	shll	%cl, %ebx
	movq	_MAX30100_REG_LED_CONFIG_50MA@GOTPCREL(%rip), %rax
	orl	(%rax), %ebx
	leaq	L_.str.1(%rip), %rsi
	movq	%r15, %rdi
	callq	_dev_warn
	movl	(%r14), %edi
	movq	_MAX30100_REG_LED_CONFIG@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	%ebx, %edx
	callq	_regmap_write
LBB0_9:
	movl	%eax, %ebx
	jmp	LBB0_10
LBB0_2:
	movl	-56(%rbp), %edi
	leaq	-60(%rbp), %rsi
	callq	_max30100_get_current_idx
	testl	%eax, %eax
	je	LBB0_5
## %bb.3:
	movl	%eax, %ebx
	movl	-56(%rbp), %edx
	leaq	L_.str.2(%rip), %rsi
LBB0_4:
	movq	%r15, %rdi
	callq	_dev_err
	jmp	LBB0_10
LBB0_5:
	movl	(%r14), %edi
	movq	_MAX30100_REG_LED_CONFIG@GOTPCREL(%rip), %r12
	movl	(%r12), %esi
	movq	_MAX30100_REG_LED_CONFIG_LED_MASK@GOTPCREL(%rip), %r13
	movl	(%r13), %edx
	movq	_MAX30100_REG_LED_CONFIG_RED_LED_SHIFT@GOTPCREL(%rip), %rax
	movb	(%rax), %cl
	shll	%cl, %edx
	movl	-60(%rbp), %eax
	shll	%cl, %eax
	movl	%eax, %ecx
	callq	_regmap_update_bits
	movl	%eax, %ebx
	testl	%eax, %eax
	je	LBB0_6
LBB0_10:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-48(%rbp), %rax
	jne	LBB0_12
## %bb.11:
	movl	%ebx, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_6:
	movl	-52(%rbp), %edi
	leaq	-60(%rbp), %rsi
	callq	_max30100_get_current_idx
	testl	%eax, %eax
	je	LBB0_8
## %bb.7:
	movl	%eax, %ebx
	movl	-52(%rbp), %edx
	leaq	L_.str.3(%rip), %rsi
	jmp	LBB0_4
LBB0_8:
	movl	(%r14), %edi
	movl	(%r12), %esi
	movl	(%r13), %edx
	movl	-60(%rbp), %ecx
	callq	_regmap_update_bits
	jmp	LBB0_9
LBB0_12:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"maxim,led-current-microamp"

	.comm	_MAX30100_REG_LED_CONFIG_24MA,4,2 ## @MAX30100_REG_LED_CONFIG_24MA
	.comm	_MAX30100_REG_LED_CONFIG_RED_LED_SHIFT,4,2 ## @MAX30100_REG_LED_CONFIG_RED_LED_SHIFT
	.comm	_MAX30100_REG_LED_CONFIG_50MA,4,2 ## @MAX30100_REG_LED_CONFIG_50MA
L_.str.1:                               ## @.str.1
	.asciz	"no led-current-microamp set"

	.comm	_MAX30100_REG_LED_CONFIG,4,2    ## @MAX30100_REG_LED_CONFIG
L_.str.2:                               ## @.str.2
	.asciz	"invalid RED current setting %d"

	.comm	_MAX30100_REG_LED_CONFIG_LED_MASK,4,2 ## @MAX30100_REG_LED_CONFIG_LED_MASK
L_.str.3:                               ## @.str.3
	.asciz	"invalid IR current setting %d"

	.no_dead_strip	_max30100_led_init
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function max30100_led_init
_max30100_led_init:                     ; @max30100_led_init
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #96
	.cfi_def_cfa_offset 96
	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
	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, #24]
	ldr	x19, [x0, #8]
	ldr	x0, [x19]
Lloh3:
	adrp	x1, l_.str@PAGE
Lloh4:
	add	x1, x1, l_.str@PAGEOFF
	add	x2, sp, #16
	mov	w3, #2
	bl	_of_property_read_u32_array
	cbz	w0, LBB0_3
; %bb.1:
Lloh5:
	adrp	x8, _MAX30100_REG_LED_CONFIG_24MA@GOTPAGE
Lloh6:
	ldr	x8, [x8, _MAX30100_REG_LED_CONFIG_24MA@GOTPAGEOFF]
Lloh7:
	ldr	w8, [x8]
Lloh8:
	adrp	x9, _MAX30100_REG_LED_CONFIG_RED_LED_SHIFT@GOTPAGE
Lloh9:
	ldr	x9, [x9, _MAX30100_REG_LED_CONFIG_RED_LED_SHIFT@GOTPAGEOFF]
Lloh10:
	ldr	w9, [x9]
	lsl	w8, w8, w9
Lloh11:
	adrp	x9, _MAX30100_REG_LED_CONFIG_50MA@GOTPAGE
Lloh12:
	ldr	x9, [x9, _MAX30100_REG_LED_CONFIG_50MA@GOTPAGEOFF]
Lloh13:
	ldr	w9, [x9]
	orr	w21, w8, w9
Lloh14:
	adrp	x1, l_.str.1@PAGE
Lloh15:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x19
	bl	_dev_warn
	ldr	w0, [x20]
Lloh16:
	adrp	x8, _MAX30100_REG_LED_CONFIG@GOTPAGE
Lloh17:
	ldr	x8, [x8, _MAX30100_REG_LED_CONFIG@GOTPAGEOFF]
Lloh18:
	ldr	w1, [x8]
	mov	x2, x21
	bl	_regmap_write
LBB0_2:
	mov	x21, x0
	b	LBB0_7
LBB0_3:
	ldr	w0, [sp, #16]
	add	x1, sp, #12
	bl	_max30100_get_current_idx
	cbz	w0, LBB0_6
; %bb.4:
	mov	x21, x0
	ldr	w2, [sp, #16]
Lloh19:
	adrp	x1, l_.str.2@PAGE
Lloh20:
	add	x1, x1, l_.str.2@PAGEOFF
LBB0_5:
	mov	x0, x19
	bl	_dev_err
	b	LBB0_7
LBB0_6:
	ldr	w0, [x20]
Lloh21:
	adrp	x22, _MAX30100_REG_LED_CONFIG@GOTPAGE
Lloh22:
	ldr	x22, [x22, _MAX30100_REG_LED_CONFIG@GOTPAGEOFF]
	ldr	w1, [x22]
Lloh23:
	adrp	x23, _MAX30100_REG_LED_CONFIG_LED_MASK@GOTPAGE
Lloh24:
	ldr	x23, [x23, _MAX30100_REG_LED_CONFIG_LED_MASK@GOTPAGEOFF]
	ldr	w8, [x23]
Lloh25:
	adrp	x9, _MAX30100_REG_LED_CONFIG_RED_LED_SHIFT@GOTPAGE
Lloh26:
	ldr	x9, [x9, _MAX30100_REG_LED_CONFIG_RED_LED_SHIFT@GOTPAGEOFF]
Lloh27:
	ldr	w9, [x9]
	lsl	w2, w8, w9
	ldr	w8, [sp, #12]
	lsl	w3, w8, w9
	bl	_regmap_update_bits
	mov	x21, x0
	cbz	w0, LBB0_9
LBB0_7:
	ldr	x8, [sp, #24]
Lloh28:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh29:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh30:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_12
; %bb.8:
	mov	x0, 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
	add	sp, sp, #96
	ret
LBB0_9:
	ldr	w0, [sp, #20]
	add	x1, sp, #12
	bl	_max30100_get_current_idx
	cbz	w0, LBB0_11
; %bb.10:
	mov	x21, x0
	ldr	w2, [sp, #20]
Lloh31:
	adrp	x1, l_.str.3@PAGE
Lloh32:
	add	x1, x1, l_.str.3@PAGEOFF
	b	LBB0_5
LBB0_11:
	ldr	w0, [x20]
	ldr	w1, [x22]
	ldr	w2, [x23]
	ldr	w3, [sp, #12]
	bl	_regmap_update_bits
	b	LBB0_2
LBB0_12:
	bl	___stack_chk_fail
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpAdd	Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpAdd	Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh25, Lloh26, Lloh27
	.loh AdrpLdrGot	Lloh23, Lloh24
	.loh AdrpLdrGot	Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh28, Lloh29, Lloh30
	.loh AdrpAdd	Lloh31, Lloh32
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"maxim,led-current-microamp"

	.comm	_MAX30100_REG_LED_CONFIG_24MA,4,2 ; @MAX30100_REG_LED_CONFIG_24MA
	.comm	_MAX30100_REG_LED_CONFIG_RED_LED_SHIFT,4,2 ; @MAX30100_REG_LED_CONFIG_RED_LED_SHIFT
	.comm	_MAX30100_REG_LED_CONFIG_50MA,4,2 ; @MAX30100_REG_LED_CONFIG_50MA
l_.str.1:                               ; @.str.1
	.asciz	"no led-current-microamp set"

	.comm	_MAX30100_REG_LED_CONFIG,4,2    ; @MAX30100_REG_LED_CONFIG
l_.str.2:                               ; @.str.2
	.asciz	"invalid RED current setting %d"

	.comm	_MAX30100_REG_LED_CONFIG_LED_MASK,4,2 ; @MAX30100_REG_LED_CONFIG_LED_MASK
l_.str.3:                               ; @.str.3
	.asciz	"invalid IR current setting %d"

	.no_dead_strip	_max30100_led_init
.subsections_via_symbols
