	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function mmc35240_read_raw
_mmc35240_read_raw:                     ## @mmc35240_read_raw
	.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	%r8, %rbx
	movq	%rcx, %r15
	movq	%rdx, %r14
	movq	%rsi, %r13
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	callq	_iio_priv
	cmpq	$128, %rbx
	je	LBB0_6
## %bb.1:
	movq	%rax, %r12
	cmpq	$129, %rbx
	je	LBB0_8
## %bb.2:
	cmpq	$130, %rbx
	jne	LBB0_12
## %bb.3:
	movq	%r12, %rdi
	callq	_mutex_lock
	leaq	-60(%rbp), %rsi
	movq	%r12, %rdi
	callq	_mmc35240_read_measurement
	movl	%eax, %ebx
	movq	%r12, %rdi
	callq	_mutex_unlock
	testl	%ebx, %ebx
	js	LBB0_13
## %bb.4:
	movl	(%r13), %esi
	leaq	-60(%rbp), %rdx
	movq	%r12, %rdi
	movq	%r14, %rcx
	callq	_mmc35240_raw_to_mgauss
	movl	%eax, %ebx
	testl	%eax, %eax
	js	LBB0_13
## %bb.5:
	movq	_IIO_VAL_INT@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	jmp	LBB0_13
LBB0_6:
	movl	$0, (%r14)
	movl	$1000, (%r15)                   ## imm = 0x3E8
LBB0_7:
	movq	_IIO_VAL_INT_PLUS_MICRO@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	jmp	LBB0_13
LBB0_8:
	movq	%r12, %rdi
	callq	_mutex_lock
	movl	4(%r12), %edi
	movq	_MMC35240_REG_CTRL1@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	-60(%rbp), %rdx
	callq	_regmap_read
	movl	%eax, %ebx
	movq	%r12, %rdi
	callq	_mutex_unlock
	testl	%ebx, %ebx
	js	LBB0_13
## %bb.9:
	movq	_MMC35240_CTRL1_BW_MASK@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	andl	-60(%rbp), %ebx
	movq	_MMC35240_CTRL1_BW_SHIFT@GOTPCREL(%rip), %rax
	movb	(%rax), %cl
	shrq	%cl, %rbx
	testl	%ebx, %ebx
	js	LBB0_12
## %bb.10:
	movq	_mmc35240_samp_freq@GOTPCREL(%rip), %r12
	movq	(%r12), %rdi
	callq	_ARRAY_SIZE
	cmpl	%eax, %ebx
	jge	LBB0_12
## %bb.11:
	movq	(%r12), %rax
	movl	(%rax,%rbx,8), %ecx
	movl	%ecx, (%r14)
	movl	4(%rax,%rbx,8), %eax
	movl	%eax, (%r15)
	jmp	LBB0_7
LBB0_12:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
LBB0_13:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-48(%rbp), %rax
	jne	LBB0_15
## %bb.14:
	movl	%ebx, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_15:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_IIO_VAL_INT,4,2                ## @IIO_VAL_INT
	.comm	_IIO_VAL_INT_PLUS_MICRO,4,2     ## @IIO_VAL_INT_PLUS_MICRO
	.comm	_MMC35240_REG_CTRL1,4,2         ## @MMC35240_REG_CTRL1
	.comm	_MMC35240_CTRL1_BW_MASK,4,2     ## @MMC35240_CTRL1_BW_MASK
	.comm	_MMC35240_CTRL1_BW_SHIFT,4,2    ## @MMC35240_CTRL1_BW_SHIFT
	.comm	_mmc35240_samp_freq,8,3         ## @mmc35240_samp_freq
	.comm	_EINVAL,4,2                     ## @EINVAL
	.no_dead_strip	_mmc35240_read_raw
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function mmc35240_read_raw
_mmc35240_read_raw:                     ; @mmc35240_read_raw
	.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	x22, x4
	mov	x20, x3
	mov	x19, x2
	mov	x23, x1
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	str	x8, [sp, #24]
	bl	_iio_priv
	cmp	x22, #128
	b.eq	LBB0_5
; %bb.1:
	mov	x21, x0
	cmp	x22, #129
	b.eq	LBB0_7
; %bb.2:
	cmp	x22, #130
	b.ne	LBB0_11
; %bb.3:
	mov	x0, x21
	bl	_mutex_lock
	add	x1, sp, #12
	mov	x0, x21
	bl	_mmc35240_read_measurement
	mov	x22, x0
	mov	x0, x21
	bl	_mutex_unlock
	tbnz	w22, #31, LBB0_12
; %bb.4:
	ldr	w1, [x23]
	add	x2, sp, #12
	mov	x0, x21
	mov	x3, x19
	bl	_mmc35240_raw_to_mgauss
Lloh3:
	adrp	x8, _IIO_VAL_INT@GOTPAGE
Lloh4:
	ldr	x8, [x8, _IIO_VAL_INT@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	cmp	w0, #0
	csel	w22, w0, w8, lt
	b	LBB0_12
LBB0_5:
	str	wzr, [x19]
	mov	w8, #1000
LBB0_6:
	str	w8, [x20]
Lloh6:
	adrp	x8, _IIO_VAL_INT_PLUS_MICRO@GOTPAGE
Lloh7:
	ldr	x8, [x8, _IIO_VAL_INT_PLUS_MICRO@GOTPAGEOFF]
Lloh8:
	ldr	w22, [x8]
	b	LBB0_12
LBB0_7:
	mov	x0, x21
	bl	_mutex_lock
	ldr	w0, [x21, #4]
Lloh9:
	adrp	x8, _MMC35240_REG_CTRL1@GOTPAGE
Lloh10:
	ldr	x8, [x8, _MMC35240_REG_CTRL1@GOTPAGEOFF]
Lloh11:
	ldr	w1, [x8]
	add	x2, sp, #12
	bl	_regmap_read
	mov	x22, x0
	mov	x0, x21
	bl	_mutex_unlock
	tbnz	w22, #31, LBB0_12
; %bb.8:
	ldr	w8, [sp, #12]
Lloh12:
	adrp	x9, _MMC35240_CTRL1_BW_MASK@GOTPAGE
Lloh13:
	ldr	x9, [x9, _MMC35240_CTRL1_BW_MASK@GOTPAGEOFF]
Lloh14:
	ldr	w9, [x9]
	and	w8, w9, w8
Lloh15:
	adrp	x9, _MMC35240_CTRL1_BW_SHIFT@GOTPAGE
Lloh16:
	ldr	x9, [x9, _MMC35240_CTRL1_BW_SHIFT@GOTPAGEOFF]
Lloh17:
	ldr	w9, [x9]
	lsr	x21, x8, x9
	tbnz	w21, #31, LBB0_11
; %bb.9:
Lloh18:
	adrp	x22, _mmc35240_samp_freq@GOTPAGE
Lloh19:
	ldr	x22, [x22, _mmc35240_samp_freq@GOTPAGEOFF]
	ldr	x0, [x22]
	bl	_ARRAY_SIZE
	cmp	w21, w0
	b.ge	LBB0_11
; %bb.10:
	ldr	x8, [x22]
	add	x8, x8, x21, lsl #3
	ldr	w9, [x8]
	str	w9, [x19]
	ldr	w8, [x8, #4]
	b	LBB0_6
LBB0_11:
Lloh20:
	adrp	x8, _EINVAL@GOTPAGE
Lloh21:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh22:
	ldr	w8, [x8]
	neg	w22, w8
LBB0_12:
	ldr	x8, [sp, #24]
Lloh23:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh24:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh25:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_14
; %bb.13:
	mov	x0, x22
	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_14:
	bl	___stack_chk_fail
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGot	Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.cfi_endproc
                                        ; -- End function
	.comm	_IIO_VAL_INT,4,2                ; @IIO_VAL_INT
	.comm	_IIO_VAL_INT_PLUS_MICRO,4,2     ; @IIO_VAL_INT_PLUS_MICRO
	.comm	_MMC35240_REG_CTRL1,4,2         ; @MMC35240_REG_CTRL1
	.comm	_MMC35240_CTRL1_BW_MASK,4,2     ; @MMC35240_CTRL1_BW_MASK
	.comm	_MMC35240_CTRL1_BW_SHIFT,4,2    ; @MMC35240_CTRL1_BW_SHIFT
	.comm	_mmc35240_samp_freq,8,3         ; @mmc35240_samp_freq
	.comm	_EINVAL,4,2                     ; @EINVAL
	.no_dead_strip	_mmc35240_read_raw
.subsections_via_symbols
