	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function vsc7385_read
_vsc7385_read:                          ## @vsc7385_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	$152, %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, %r13
	movq	%rsi, %r14
	movq	%rdi, %r12
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	movq	%rsi, %rdi
	movq	%rdx, %rsi
	callq	_vsc7385_is_addr_valid
	testl	%eax, %eax
	je	LBB0_1
## %bb.2:
	movq	%rbx, -168(%rbp)                ## 8-byte Spill
	leaq	-184(%rbp), %rbx
	movq	%rbx, %rdi
	callq	_spi_message_init
	movq	%r15, -176(%rbp)                ## 8-byte Spill
	leaq	-160(%rbp), %r15
	movq	%r15, %rdi
	xorl	%esi, %esi
	movl	$48, %edx
	callq	_memset
	leaq	-80(%rbp), %rax
	movq	%rax, -144(%rbp)
	movl	$32, -160(%rbp)
	movq	%r15, %rdi
	movq	%rbx, %rsi
	callq	_spi_message_add_tail
	leaq	-136(%rbp), %rdi
	leaq	-112(%rbp), %rax
	movq	%rax, -128(%rbp)
	movl	$32, -136(%rbp)
	movq	%rbx, %rsi
	callq	_spi_message_add_tail
	movq	_VSC73XX_CMD_MODE_READ@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	%r14, %rsi
	movq	%r13, %rdx
	callq	_vsc7385_make_addr
	movq	%rax, -80(%rbp)
	movq	-176(%rbp), %rax                ## 8-byte Reload
	movq	%rax, -72(%rbp)
	xorps	%xmm0, %xmm0
	movaps	%xmm0, -64(%rbp)
	movq	%r12, %rdi
	callq	_mutex_lock
	movl	4(%r12), %edi
	movq	%rbx, %rsi
	callq	_spi_sync
	movl	%eax, %ebx
	movq	%r12, %rdi
	callq	_mutex_unlock
	testl	%ebx, %ebx
	jne	LBB0_4
## %bb.3:
	movl	-112(%rbp), %eax
	movl	-104(%rbp), %ecx
	shll	$24, %eax
	shll	$16, %ecx
	orl	%eax, %ecx
	movl	-96(%rbp), %eax
	shll	$8, %eax
	orl	%ecx, %eax
	orl	-88(%rbp), %eax
	movq	-168(%rbp), %rcx                ## 8-byte Reload
	movl	%eax, (%rcx)
	xorl	%ebx, %ebx
	jmp	LBB0_4
LBB0_1:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
LBB0_4:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-48(%rbp), %rax
	jne	LBB0_6
## %bb.5:
	movl	%ebx, %eax
	addq	$152, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_6:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_VSC73XX_CMD_MODE_READ,4,2      ## @VSC73XX_CMD_MODE_READ
	.no_dead_strip	_vsc7385_read
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function vsc7385_read
_vsc7385_read:                          ; @vsc7385_read
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #208
	.cfi_def_cfa_offset 208
	stp	x26, x25, [sp, #128]            ; 16-byte Folded Spill
	stp	x24, x23, [sp, #144]            ; 16-byte Folded Spill
	stp	x22, x21, [sp, #160]            ; 16-byte Folded Spill
	stp	x20, x19, [sp, #176]            ; 16-byte Folded Spill
	stp	x29, x30, [sp, #192]            ; 16-byte Folded Spill
	add	x29, sp, #192
	.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	x19, x4
	mov	x21, x3
	mov	x22, x2
	mov	x23, x1
	mov	x20, x0
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	stur	x8, [x29, #-72]
	mov	x0, x1
	mov	x1, x2
	bl	_vsc7385_is_addr_valid
	cbz	w0, LBB0_3
; %bb.1:
	mov	x0, sp
	bl	_spi_message_init
	add	x24, sp, #8
	add	x0, sp, #8
	mov	w1, #0
	mov	w2, #48
	bl	_memset
	add	x8, sp, #88
	str	x8, [sp, #24]
	mov	w25, #32
	str	w25, [sp, #8]
	add	x0, sp, #8
	mov	x1, sp
	bl	_spi_message_add_tail
	add	x0, x24, #24
	add	x8, sp, #56
	str	x8, [sp, #40]
	str	w25, [sp, #32]
	mov	x1, sp
	bl	_spi_message_add_tail
Lloh3:
	adrp	x8, _VSC73XX_CMD_MODE_READ@GOTPAGE
Lloh4:
	ldr	x8, [x8, _VSC73XX_CMD_MODE_READ@GOTPAGEOFF]
Lloh5:
	ldr	w0, [x8]
	mov	x1, x23
	mov	x2, x22
	bl	_vsc7385_make_addr
	stp	x0, x21, [sp, #88]
	stp	xzr, xzr, [sp, #104]
	mov	x0, x20
	bl	_mutex_lock
	ldr	w0, [x20, #4]
	mov	x1, sp
	bl	_spi_sync
	mov	x21, x0
	mov	x0, x20
	bl	_mutex_unlock
	cbnz	w21, LBB0_4
; %bb.2:
	ldr	w8, [sp, #56]
	ldr	w9, [sp, #64]
	lsl	w9, w9, #16
	orr	w8, w9, w8, lsl #24
	ldr	w9, [sp, #72]
	ldr	w10, [sp, #80]
	orr	w8, w8, w9, lsl #8
	orr	w8, w8, w10
	str	w8, [x19]
	b	LBB0_4
LBB0_3:
Lloh6:
	adrp	x8, _EINVAL@GOTPAGE
Lloh7:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh8:
	ldr	w8, [x8]
	neg	w21, w8
LBB0_4:
	ldur	x8, [x29, #-72]
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, x21
	ldp	x29, x30, [sp, #192]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #176]            ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #160]            ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #144]            ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #128]            ; 16-byte Folded Reload
	add	sp, sp, #208
	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	_EINVAL,4,2                     ; @EINVAL
	.comm	_VSC73XX_CMD_MODE_READ,4,2      ; @VSC73XX_CMD_MODE_READ
	.no_dead_strip	_vsc7385_read
.subsections_via_symbols
