	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function hmc5843_read_measurement
_hmc5843_read_measurement:              ## @hmc5843_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
	subq	$32, %rsp
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdx, %r14
	movl	%esi, %r15d
	movq	%rdi, %r12
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -40(%rbp)
	callq	_mutex_lock
	movq	%r12, %rdi
	callq	_hmc5843_wait_measurement
	testl	%eax, %eax
	js	LBB0_1
## %bb.2:
	movl	4(%r12), %edi
	movq	_HMC5843_DATA_OUT_MSB_REGS@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	-52(%rbp), %rdx
	movl	$12, %ecx
	callq	_regmap_bulk_read
	movl	%eax, %ebx
	movq	%r12, %rdi
	callq	_mutex_unlock
	testl	%ebx, %ebx
	js	LBB0_4
## %bb.3:
	movslq	%r15d, %rax
	movl	-52(%rbp,%rax,4), %edi
	callq	_be16_to_cpu
	movl	%eax, %edi
	movl	$15, %esi
	callq	_sign_extend32
	movl	%eax, (%r14)
	movq	_IIO_VAL_INT@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	jmp	LBB0_4
LBB0_1:
	movl	%eax, %ebx
	movq	%r12, %rdi
	callq	_mutex_unlock
LBB0_4:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-40(%rbp), %rax
	jne	LBB0_6
## %bb.5:
	movl	%ebx, %eax
	addq	$32, %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_6:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_HMC5843_DATA_OUT_MSB_REGS,4,2  ## @HMC5843_DATA_OUT_MSB_REGS
	.comm	_IIO_VAL_INT,4,2                ## @IIO_VAL_INT
	.no_dead_strip	_hmc5843_read_measurement
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function hmc5843_read_measurement
_hmc5843_read_measurement:              ; @hmc5843_read_measurement
	.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	x19, x2
	mov	x20, x1
	mov	x21, x0
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	str	x8, [sp, #24]
	bl	_mutex_lock
	mov	x0, x21
	bl	_hmc5843_wait_measurement
	tbnz	w0, #31, LBB0_3
; %bb.1:
	ldr	w0, [x21, #4]
Lloh3:
	adrp	x8, _HMC5843_DATA_OUT_MSB_REGS@GOTPAGE
Lloh4:
	ldr	x8, [x8, _HMC5843_DATA_OUT_MSB_REGS@GOTPAGEOFF]
Lloh5:
	ldr	w1, [x8]
	add	x23, sp, #12
	add	x2, sp, #12
	mov	w3, #12
	bl	_regmap_bulk_read
	mov	x22, x0
	mov	x0, x21
	bl	_mutex_unlock
	tbnz	w22, #31, LBB0_4
; %bb.2:
	ldr	w0, [x23, w20, sxtw #2]
	bl	_be16_to_cpu
	mov	w1, #15
	bl	_sign_extend32
	str	w0, [x19]
Lloh6:
	adrp	x8, _IIO_VAL_INT@GOTPAGE
Lloh7:
	ldr	x8, [x8, _IIO_VAL_INT@GOTPAGEOFF]
Lloh8:
	ldr	w22, [x8]
	b	LBB0_4
LBB0_3:
	mov	x22, x0
	mov	x0, x21
	bl	_mutex_unlock
LBB0_4:
	ldr	x8, [sp, #24]
Lloh9:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh10:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh11:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_6
; %bb.5:
	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_6:
	bl	___stack_chk_fail
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.cfi_endproc
                                        ; -- End function
	.comm	_HMC5843_DATA_OUT_MSB_REGS,4,2  ; @HMC5843_DATA_OUT_MSB_REGS
	.comm	_IIO_VAL_INT,4,2                ; @IIO_VAL_INT
	.no_dead_strip	_hmc5843_read_measurement
.subsections_via_symbols
