	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function mcp3422_read
_mcp3422_read:                          ## @mcp3422_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	%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	%rdx, %r15
	movq	%rsi, %r14
	movq	%rdi, %rbx
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	movl	4(%rdi), %edi
	callq	_MCP3422_SAMPLE_RATE
	movl	%eax, %r13d
	xorps	%xmm0, %xmm0
	movaps	%xmm0, -64(%rbp)
	movq	_MCP3422_SRATE_3@GOTPCREL(%rip), %rax
	movl	(%rbx), %edi
	cmpl	(%rax), %r13d
	jne	LBB0_2
## %bb.1:
	leaq	-64(%rbp), %rsi
	movl	$4, %edx
	callq	_i2c_master_recv
	movl	%eax, %r12d
	movl	-64(%rbp), %eax
	movl	-60(%rbp), %edi
	shll	$16, %eax
	shll	$8, %edi
	orl	%eax, %edi
	orl	-56(%rbp), %edi
	movl	-52(%rbp), %eax
	jmp	LBB0_3
LBB0_2:
	leaq	-64(%rbp), %rsi
	movl	$3, %edx
	callq	_i2c_master_recv
	movl	%eax, %r12d
	movl	-64(%rbp), %edi
	movl	-56(%rbp), %eax
	shll	$8, %edi
	orl	-60(%rbp), %edi
LBB0_3:
	movl	%eax, (%r15)
	movq	_mcp3422_sign_extend@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movslq	%r13d, %rcx
	movl	(%rax,%rcx,4), %esi
	callq	_sign_extend32
	movl	%eax, (%r14)
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-48(%rbp), %rax
	jne	LBB0_5
## %bb.4:
	movl	%r12d, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_5:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_MCP3422_SRATE_3,4,2            ## @MCP3422_SRATE_3
	.comm	_mcp3422_sign_extend,8,3        ## @mcp3422_sign_extend
	.no_dead_strip	_mcp3422_read
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function mcp3422_read
_mcp3422_read:                          ; @mcp3422_read
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.cfi_def_cfa_offset 80
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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	x20, x2
	mov	x19, x1
	mov	x22, x0
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	str	x8, [sp, #24]
	ldr	w0, [x0, #4]
	bl	_MCP3422_SAMPLE_RATE
	mov	x21, x0
	stp	xzr, xzr, [sp, #8]
Lloh3:
	adrp	x8, _MCP3422_SRATE_3@GOTPAGE
Lloh4:
	ldr	x8, [x8, _MCP3422_SRATE_3@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	ldr	w0, [x22]
	add	x1, sp, #8
	cmp	w21, w8
	b.ne	LBB0_2
; %bb.1:
	mov	w2, #4
	bl	_i2c_master_recv
	mov	x22, x0
	ldp	w8, w9, [sp, #8]
	lsl	w9, w9, #8
	orr	w8, w9, w8, lsl #16
	mov	w9, #3
	mov	w10, #2
	b	LBB0_3
LBB0_2:
	mov	w2, #3
	bl	_i2c_master_recv
	mov	x22, x0
	ldr	w8, [sp, #8]
	lsl	w8, w8, #8
	mov	w9, #2
	mov	w10, #1
LBB0_3:
	add	x11, sp, #8
	ldr	w10, [x11, x10, lsl #2]
	orr	w0, w8, w10
	ldr	w8, [x11, x9, lsl #2]
	str	w8, [x20]
Lloh6:
	adrp	x8, _mcp3422_sign_extend@GOTPAGE
Lloh7:
	ldr	x8, [x8, _mcp3422_sign_extend@GOTPAGEOFF]
Lloh8:
	ldr	x8, [x8]
	ldr	w1, [x8, w21, sxtw #2]
	bl	_sign_extend32
	str	w0, [x19]
	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_5
; %bb.4:
	mov	x0, x22
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #80
	ret
LBB0_5:
	bl	___stack_chk_fail
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.cfi_endproc
                                        ; -- End function
	.comm	_MCP3422_SRATE_3,4,2            ; @MCP3422_SRATE_3
	.comm	_mcp3422_sign_extend,8,3        ; @mcp3422_sign_extend
	.no_dead_strip	_mcp3422_read
.subsections_via_symbols
