	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function vsc7385_write
_vsc7385_write:                         ## @vsc7385_write
	.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	$88, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%r8d, %ebx
	movl	%ecx, %r14d
	movl	%edx, %r13d
	movl	%esi, %r15d
	movq	%rdi, %r12
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	movl	%esi, %edi
	movl	%edx, %esi
	callq	_vsc7385_is_addr_valid
	testl	%eax, %eax
	je	LBB0_1
## %bb.2:
	leaq	-120(%rbp), %rdi
	callq	_spi_message_init
	movl	%r14d, -124(%rbp)               ## 4-byte Spill
	leaq	-112(%rbp), %r14
	movq	%r14, %rdi
	xorl	%esi, %esi
	movl	$32, %edx
	callq	_memset
	leaq	-56(%rbp), %rax
	movq	%rax, -112(%rbp)
	movl	$8, -104(%rbp)
	movq	%r14, %rdi
	leaq	-120(%rbp), %rsi
	callq	_spi_message_add_tail
	leaq	-96(%rbp), %rdi
	leaq	-80(%rbp), %rax
	movq	%rax, -96(%rbp)
	movl	$16, -88(%rbp)
	leaq	-120(%rbp), %rsi
	movq	%rsi, %r14
	callq	_spi_message_add_tail
	movq	_VSC73XX_CMD_MODE_WRITE@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movl	%r15d, %esi
	movl	%r13d, %edx
	callq	_vsc7385_make_addr
	movl	%eax, -56(%rbp)
	movl	-124(%rbp), %eax                ## 4-byte Reload
	movl	%eax, -52(%rbp)
	movl	%ebx, %eax
	shrl	$24, %eax
	movl	%eax, -80(%rbp)
	movl	%ebx, %eax
	shrl	$16, %eax
	movzbl	%al, %eax
	movl	%eax, -76(%rbp)
	movzbl	%bh, %eax
	movl	%eax, -72(%rbp)
	movzbl	%bl, %eax
	movl	%eax, -68(%rbp)
	movq	%r12, %rdi
	callq	_mutex_lock
	movl	4(%r12), %edi
	movq	%r14, %rsi
	callq	_spi_sync
	movl	%eax, %ebx
	movq	%r12, %rdi
	callq	_mutex_unlock
	jmp	LBB0_3
LBB0_1:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
LBB0_3:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-48(%rbp), %rax
	jne	LBB0_5
## %bb.4:
	movl	%ebx, %eax
	addq	$88, %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	_EINVAL,4,2                     ## @EINVAL
	.comm	_VSC73XX_CMD_MODE_WRITE,4,2     ## @VSC73XX_CMD_MODE_WRITE
	.no_dead_strip	_vsc7385_write
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.section	__TEXT,__literal8,8byte_literals
	.p2align	3                               ; -- Begin function vsc7385_write
lCPI0_0:
	.long	4294967280                      ; 0xfffffff0
	.long	4294967288                      ; 0xfffffff8
	.section	__TEXT,__text,regular,pure_instructions
	.p2align	2
_vsc7385_write:                         ; @vsc7385_write
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #144
	.cfi_def_cfa_offset 144
	stp	x24, x23, [sp, #80]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #96]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #112]            ; 16-byte Folded Spill
	stp	x29, x30, [sp, #128]            ; 16-byte Folded Spill
	add	x29, sp, #128
	.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	x20, x4
	mov	x21, x3
	mov	x22, x2
	mov	x23, x1
	mov	x19, x0
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	stur	x8, [x29, #-56]
	mov	x0, x1
	mov	x1, x2
	bl	_vsc7385_is_addr_valid
	cbz	w0, LBB0_2
; %bb.1:
	add	x0, sp, #8
	bl	_spi_message_init
	add	x24, sp, #16
	add	x0, sp, #16
	mov	w1, #0
	mov	w2, #32
	bl	_memset
	add	x8, sp, #64
	str	x8, [sp, #16]
	mov	w8, #8
	str	w8, [sp, #24]
	add	x0, sp, #16
	add	x1, sp, #8
	bl	_spi_message_add_tail
	add	x0, x24, #16
	add	x8, sp, #48
	str	x8, [sp, #32]
	mov	w8, #16
	str	w8, [sp, #40]
	add	x1, sp, #8
	bl	_spi_message_add_tail
Lloh3:
	adrp	x8, _VSC73XX_CMD_MODE_WRITE@GOTPAGE
Lloh4:
	ldr	x8, [x8, _VSC73XX_CMD_MODE_WRITE@GOTPAGEOFF]
Lloh5:
	ldr	w0, [x8]
	mov	x1, x23
	mov	x2, x22
	bl	_vsc7385_make_addr
	stp	w0, w21, [sp, #64]
	lsr	w8, w20, #24
	str	w8, [sp, #48]
	dup.2s	v0, w20
Lloh6:
	adrp	x8, lCPI0_0@PAGE
Lloh7:
	ldr	d1, [x8, lCPI0_0@PAGEOFF]
	ushl.2s	v0, v0, v1
	movi	d1, #0x0000ff000000ff
	and.8b	v0, v0, v1
	stur	d0, [sp, #52]
	and	w8, w20, #0xff
	str	w8, [sp, #60]
	mov	x0, x19
	bl	_mutex_lock
	ldr	w0, [x19, #4]
	add	x1, sp, #8
	bl	_spi_sync
	mov	x20, x0
	mov	x0, x19
	bl	_mutex_unlock
	b	LBB0_3
LBB0_2:
Lloh8:
	adrp	x8, _EINVAL@GOTPAGE
Lloh9:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh10:
	ldr	w8, [x8]
	neg	w20, w8
LBB0_3:
	ldur	x8, [x29, #-56]
Lloh11:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh12:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh13:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_5
; %bb.4:
	mov	x0, x20
	ldp	x29, x30, [sp, #128]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #112]            ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #96]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #80]             ; 16-byte Folded Reload
	add	sp, sp, #144
	ret
LBB0_5:
	bl	___stack_chk_fail
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdr	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.cfi_endproc
                                        ; -- End function
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_VSC73XX_CMD_MODE_WRITE,4,2     ; @VSC73XX_CMD_MODE_WRITE
	.no_dead_strip	_vsc7385_write
.subsections_via_symbols
