	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function read_sensor
_read_sensor:                           ## @read_sensor
	.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	%r9, -64(%rbp)                  ## 8-byte Spill
	movl	%r8d, -52(%rbp)                 ## 4-byte Spill
	movl	%ecx, %ebx
	movl	%edx, %r13d
	movl	%esi, %r14d
	movq	%rdi, %r15
	callq	_dev_get_drvdata
	movq	8(%rax), %r12
	movq	%rax, -48(%rbp)                 ## 8-byte Spill
	movq	%rax, %rdi
	callq	_mutex_lock
	movq	%r12, %rdi
	movl	%r14d, %esi
	movl	%r13d, %edx
	movl	%ebx, %ecx
	callq	_do_measurement
	testl	%eax, %eax
	js	LBB0_1
## %bb.2:
	leaq	-56(%rbp), %rdx
	movq	%r12, %rdi
	movl	%r14d, %esi
	callq	_request_data
	movl	%eax, %ebx
	testl	%eax, %eax
	js	LBB0_3
## %bb.5:
	movl	-56(%rbp), %edi
	movl	-52(%rbp), %esi                 ## 4-byte Reload
	callq	_float_to_long
	movq	-64(%rbp), %rcx                 ## 8-byte Reload
	movq	%rax, (%rcx)
	jmp	LBB0_6
LBB0_1:
	movl	%eax, %ebx
	leaq	L_.str(%rip), %rsi
	jmp	LBB0_4
LBB0_3:
	leaq	L_.str.1(%rip), %rsi
LBB0_4:
	movq	%r15, %rdi
	movl	%ebx, %edx
	callq	_dev_err
LBB0_6:
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	callq	_mutex_unlock
	movl	%ebx, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Failed to perform measurement: %d\n"

L_.str.1:                               ## @.str.1
	.asciz	"Failed to read measurement: %d\n"

	.no_dead_strip	_read_sensor
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function read_sensor
_read_sensor:                           ; @read_sensor
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #96
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	mov	x20, x5
	mov	x22, x4
	mov	x21, x3
	mov	x26, x2
	mov	x24, x1
	mov	x23, x0
	bl	_dev_get_drvdata
	mov	x19, x0
	ldr	x25, [x0, #8]
	bl	_mutex_lock
	mov	x0, x25
	mov	x1, x24
	mov	x2, x26
	mov	x3, x21
	bl	_do_measurement
	tbnz	w0, #31, LBB0_3
; %bb.1:
	add	x2, sp, #12
	mov	x0, x25
	mov	x1, x24
	bl	_request_data
	mov	x21, x0
	tbnz	w0, #31, LBB0_4
; %bb.2:
	ldr	w0, [sp, #12]
	mov	x1, x22
	bl	_float_to_long
	str	x0, [x20]
	b	LBB0_6
LBB0_3:
	mov	x21, x0
Lloh0:
	adrp	x1, l_.str@PAGE
Lloh1:
	add	x1, x1, l_.str@PAGEOFF
	b	LBB0_5
LBB0_4:
Lloh2:
	adrp	x1, l_.str.1@PAGE
Lloh3:
	add	x1, x1, l_.str.1@PAGEOFF
LBB0_5:
	mov	x0, x23
	mov	x2, x21
	bl	_dev_err
LBB0_6:
	mov	x0, x19
	bl	_mutex_unlock
	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
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #96
	ret
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpAdd	Lloh2, Lloh3
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Failed to perform measurement: %d\n"

l_.str.1:                               ; @.str.1
	.asciz	"Failed to read measurement: %d\n"

	.no_dead_strip	_read_sensor
.subsections_via_symbols
