	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function __qcaspi_write_register
___qcaspi_write_register:               ## @__qcaspi_write_register
	.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	$72, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%edx, %r12d
	movl	%esi, %ebx
	movq	%rdi, %r13
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	leaq	-96(%rbp), %r14
	movq	%r14, %rdi
	xorl	%esi, %esi
	movl	$32, %edx
	callq	_memset
	leaq	-104(%rbp), %r15
	movq	%r15, %rdi
	callq	_spi_message_init
	movq	_QCA7K_SPI_WRITE@GOTPCREL(%rip), %rax
	movq	_QCA7K_SPI_INTERNAL@GOTPCREL(%rip), %rcx
	orl	(%rax), %ebx
	orl	(%rcx), %ebx
	movl	%ebx, %edi
	callq	_cpu_to_be16
	movl	%eax, -56(%rbp)
	movl	%r12d, %edi
	callq	_cpu_to_be16
	leaq	-52(%rbp), %rcx
	movl	%eax, -52(%rbp)
	leaq	-56(%rbp), %rax
	movq	%rax, -88(%rbp)
	movq	_QCASPI_CMD_LEN@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -96(%rbp)
	leaq	-80(%rbp), %r12
	movq	%rcx, -72(%rbp)
	movq	%rax, -80(%rbp)
	movq	%r14, %rdi
	movq	%r15, %rsi
	callq	_spi_message_add_tail
	cmpq	$0, 8(%r13)
	je	LBB0_2
## %bb.1:
	movl	(%r13), %edi
	leaq	-104(%rbp), %rbx
	movq	%rbx, %rsi
	callq	_spi_sync
	movq	%rbx, %rdi
	callq	_spi_message_init
LBB0_2:
	leaq	-104(%rbp), %rbx
	movq	%r12, %rdi
	movq	%rbx, %rsi
	callq	_spi_message_add_tail
	movl	(%r13), %edi
	movq	%rbx, %rsi
	callq	_spi_sync
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_4
## %bb.3:
	movl	-104(%rbp), %ebx
LBB0_4:
	testl	%ebx, %ebx
	je	LBB0_6
## %bb.5:
	movq	%r13, %rdi
	callq	_qcaspi_spi_error
LBB0_6:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-48(%rbp), %rax
	jne	LBB0_8
## %bb.7:
	movl	%ebx, %eax
	addq	$72, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_8:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_QCA7K_SPI_WRITE,4,2            ## @QCA7K_SPI_WRITE
	.comm	_QCA7K_SPI_INTERNAL,4,2         ## @QCA7K_SPI_INTERNAL
	.comm	_QCASPI_CMD_LEN,8,3             ## @QCASPI_CMD_LEN
	.no_dead_strip	___qcaspi_write_register
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function __qcaspi_write_register
___qcaspi_write_register:               ; @__qcaspi_write_register
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	stp	x22, x21, [sp, #64]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #80]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #96]             ; 16-byte Folded Spill
	add	x29, sp, #96
	.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	x21, 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, #-40]
	add	x22, sp, #16
	add	x0, sp, #16
	mov	w1, #0
	mov	w2, #32
	bl	_memset
	add	x0, sp, #8
	bl	_spi_message_init
Lloh3:
	adrp	x8, _QCA7K_SPI_WRITE@GOTPAGE
Lloh4:
	ldr	x8, [x8, _QCA7K_SPI_WRITE@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
Lloh6:
	adrp	x9, _QCA7K_SPI_INTERNAL@GOTPAGE
Lloh7:
	ldr	x9, [x9, _QCA7K_SPI_INTERNAL@GOTPAGEOFF]
Lloh8:
	ldr	w9, [x9]
	orr	w8, w8, w21
	orr	w0, w8, w9
	bl	_cpu_to_be16
	str	w0, [sp, #48]
	mov	x0, x20
	bl	_cpu_to_be16
	add	x8, sp, #48
	add	x9, x8, #4
	str	w0, [sp, #52]
Lloh9:
	adrp	x10, _QCASPI_CMD_LEN@GOTPAGE
Lloh10:
	ldr	x10, [x10, _QCASPI_CMD_LEN@GOTPAGEOFF]
Lloh11:
	ldr	x10, [x10]
	stp	x10, x8, [sp, #16]
	add	x20, x22, #16
	stp	x10, x9, [sp, #32]
	add	x0, sp, #16
	add	x1, sp, #8
	bl	_spi_message_add_tail
	ldr	x8, [x19, #8]
	cbz	x8, LBB0_2
; %bb.1:
	ldr	w0, [x19]
	add	x1, sp, #8
	bl	_spi_sync
	add	x0, sp, #8
	bl	_spi_message_init
LBB0_2:
	add	x1, sp, #8
	mov	x0, x20
	bl	_spi_message_add_tail
	ldr	w0, [x19]
	add	x1, sp, #8
	bl	_spi_sync
	ldr	w8, [sp, #8]
	cmp	w0, #0
	csel	w20, w8, w0, eq
	cbz	w20, LBB0_4
; %bb.3:
	mov	x0, x19
	bl	_qcaspi_spi_error
LBB0_4:
	ldur	x8, [x29, #-40]
Lloh12:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh13:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh14:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_6
; %bb.5:
	mov	x0, x20
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #64]             ; 16-byte Folded Reload
	add	sp, sp, #112
	ret
LBB0_6:
	bl	___stack_chk_fail
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.cfi_endproc
                                        ; -- End function
	.comm	_QCA7K_SPI_WRITE,4,2            ; @QCA7K_SPI_WRITE
	.comm	_QCA7K_SPI_INTERNAL,4,2         ; @QCA7K_SPI_INTERNAL
	.comm	_QCASPI_CMD_LEN,8,3             ; @QCASPI_CMD_LEN
	.no_dead_strip	___qcaspi_write_register
.subsections_via_symbols
