	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function max30102_read_measurement
_max30102_read_measurement:             ## @max30102_read_measurement
	.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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%esi, %ebx
	movl	(%rdi), %eax
	leaq	4(%rdi), %rcx
	movq	_MAX30102_REG_FIFO_DATA@GOTPCREL(%rip), %rdx
	movl	(%rdx), %esi
	movq	_MAX30102_REG_FIFO_DATA_BYTES@GOTPCREL(%rip), %r15
	movl	(%r15), %edx
	imull	%ebx, %edx
	movl	%eax, %edi
	callq	_i2c_smbus_read_i2c_block_data
	movl	%eax, %r14d
	cmpl	$1, %ebx
	je	LBB0_5
## %bb.1:
	cmpl	$2, %ebx
	je	LBB0_4
## %bb.2:
	cmpl	$3, %ebx
	jne	LBB0_6
## %bb.3:
	movl	$2, %edi
	callq	_MAX30102_COPY_DATA
LBB0_4:
	movl	$1, %edi
	callq	_MAX30102_COPY_DATA
LBB0_5:
	xorl	%r12d, %r12d
	xorl	%edi, %edi
	callq	_MAX30102_COPY_DATA
	imull	(%r15), %ebx
	movq	_EINVAL@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
	cmpl	%ebx, %r14d
	cmovel	%r12d, %eax
	jmp	LBB0_7
LBB0_6:
	movq	_EINVAL@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
LBB0_7:
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_MAX30102_REG_FIFO_DATA,4,2     ## @MAX30102_REG_FIFO_DATA
	.comm	_MAX30102_REG_FIFO_DATA_BYTES,4,2 ## @MAX30102_REG_FIFO_DATA_BYTES
	.comm	_EINVAL,4,2                     ## @EINVAL
	.no_dead_strip	_max30102_read_measurement
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function max30102_read_measurement
_max30102_read_measurement:             ; @max30102_read_measurement
	.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	x19, x1
	mov	x3, x0
	ldr	w0, [x3], #4
Lloh0:
	adrp	x8, _MAX30102_REG_FIFO_DATA@GOTPAGE
Lloh1:
	ldr	x8, [x8, _MAX30102_REG_FIFO_DATA@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
Lloh3:
	adrp	x21, _MAX30102_REG_FIFO_DATA_BYTES@GOTPAGE
Lloh4:
	ldr	x21, [x21, _MAX30102_REG_FIFO_DATA_BYTES@GOTPAGEOFF]
	ldr	w8, [x21]
	mul	w2, w8, w19
	bl	_i2c_smbus_read_i2c_block_data
	mov	x20, x0
	cmp	w19, #1
	b.eq	LBB0_5
; %bb.1:
	cmp	w19, #2
	b.eq	LBB0_4
; %bb.2:
	cmp	w19, #3
	b.ne	LBB0_6
; %bb.3:
	mov	w0, #2
	bl	_MAX30102_COPY_DATA
LBB0_4:
	mov	w0, #1
	bl	_MAX30102_COPY_DATA
LBB0_5:
	mov	w0, #0
	bl	_MAX30102_COPY_DATA
	ldr	w8, [x21]
	mul	w8, w8, w19
Lloh5:
	adrp	x9, _EINVAL@GOTPAGE
Lloh6:
	ldr	x9, [x9, _EINVAL@GOTPAGEOFF]
Lloh7:
	ldr	w9, [x9]
	cmp	w20, w8
	csneg	w0, wzr, w9, eq
	b	LBB0_7
LBB0_6:
Lloh8:
	adrp	x8, _EINVAL@GOTPAGE
Lloh9:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh10:
	ldr	w8, [x8]
	neg	w0, w8
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 AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.cfi_endproc
                                        ; -- End function
	.comm	_MAX30102_REG_FIFO_DATA,4,2     ; @MAX30102_REG_FIFO_DATA
	.comm	_MAX30102_REG_FIFO_DATA_BYTES,4,2 ; @MAX30102_REG_FIFO_DATA_BYTES
	.comm	_EINVAL,4,2                     ; @EINVAL
	.no_dead_strip	_max30102_read_measurement
.subsections_via_symbols
