	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function mcp3911_read
_mcp3911_read:                          ## @mcp3911_read
	.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	$16, %rsp
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%ecx, %ebx
	movq	%rdx, %r15
	movl	%esi, %eax
	movq	%rdi, %r14
	movl	8(%rdi), %esi
	movl	%eax, %edi
	callq	_MCP3911_REG_READ
	movl	%eax, -36(%rbp)
	movq	(%r14), %rdi
	leaq	-36(%rbp), %rsi
	movl	$1, %edx
	movq	%r15, %rcx
	movl	%ebx, %r8d
	callq	_spi_write_then_read
	movl	%eax, %r12d
	testl	%eax, %eax
	js	LBB0_2
## %bb.1:
	movq	%r15, %rdi
	callq	_be32_to_cpus
	shll	$3, %ebx
	movl	(%r15), %edx
	negb	%bl
	movl	%ebx, %ecx
	sarl	%cl, %edx
	movl	%edx, (%r15)
	movq	(%r14), %rdi
	movl	-36(%rbp), %ecx
	sarl	%ecx
	leaq	L_.str(%rip), %rsi
	callq	_dev_dbg
LBB0_2:
	movl	%r12d, %eax
	addq	$16, %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"reading 0x%x from register 0x%x\n"

	.no_dead_strip	_mcp3911_read
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function mcp3911_read
_mcp3911_read:                          ; @mcp3911_read
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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	x21, x3
	mov	x19, x2
	mov	x8, x1
	mov	x20, x0
	ldr	w1, [x0, #8]
	mov	x0, x8
	bl	_MCP3911_REG_READ
	str	w0, [sp, #12]
	ldr	x0, [x20]
	add	x1, sp, #12
	mov	w2, #1
	mov	x3, x19
	mov	x4, x21
	bl	_spi_write_then_read
	mov	x22, x0
	tbnz	w0, #31, LBB0_2
; %bb.1:
	mov	x0, x19
	bl	_be32_to_cpus
	lsl	w8, w21, #3
	ldr	w9, [x19]
	neg	w8, w8
	asr	w2, w9, w8
	str	w2, [x19]
	ldr	x0, [x20]
	ldr	w8, [sp, #12]
	asr	w3, w8, #1
Lloh0:
	adrp	x1, l_.str@PAGE
Lloh1:
	add	x1, x1, l_.str@PAGEOFF
	bl	_dev_dbg
LBB0_2:
	mov	x0, x22
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #64
	ret
	.loh AdrpAdd	Lloh0, Lloh1
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"reading 0x%x from register 0x%x\n"

	.no_dead_strip	_mcp3911_read
.subsections_via_symbols
