	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function qcaspi_tx_frame
_qcaspi_tx_frame:                       ## @qcaspi_tx_frame
	.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
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %r14
	movq	%rdi, %r15
	movq	(%rsi), %r12
	movq	_SPI_REG_BFR_SIZE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_wr_verify@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movq	%r12, %rdx
	callq	_qcaspi_write_register
	cmpq	$0, 8(%r15)
	je	LBB0_2
## %bb.1:
	movq	_QCA7K_SPI_WRITE@GOTPCREL(%rip), %rax
	movq	_QCA7K_SPI_EXTERNAL@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	orl	(%rax), %esi
	movq	%r15, %rdi
	callq	_qcaspi_tx_cmd
LBB0_2:
	testq	%r12, %r12
	je	LBB0_10
## %bb.3:
	xorl	%r13d, %r13d
	.p2align	4, 0x90
LBB0_4:                                 ## =>This Inner Loop Header: Depth=1
	movq	(%r15), %rbx
	cmpq	%rbx, %r12
	cmovlq	%r12, %rbx
	movq	8(%r14), %rsi
	addq	%r13, %rsi
	cmpq	$0, 8(%r15)
	je	LBB0_6
## %bb.5:                               ##   in Loop: Header=BB0_4 Depth=1
	movq	%r15, %rdi
	movq	%rbx, %rdx
	callq	_qcaspi_write_legacy
	cmpq	%rbx, %rax
	je	LBB0_9
	jmp	LBB0_8
	.p2align	4, 0x90
LBB0_6:                                 ##   in Loop: Header=BB0_4 Depth=1
	movq	%r15, %rdi
	movq	%rbx, %rdx
	callq	_qcaspi_write_burst
	cmpq	%rbx, %rax
	jne	LBB0_8
LBB0_9:                                 ##   in Loop: Header=BB0_4 Depth=1
	addq	%rbx, %r13
	subq	%rbx, %r12
	jne	LBB0_4
LBB0_10:
	xorl	%eax, %eax
	jmp	LBB0_11
LBB0_8:
	movl	$-1, %eax
LBB0_11:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_SPI_REG_BFR_SIZE,4,2           ## @SPI_REG_BFR_SIZE
	.comm	_wr_verify,4,2                  ## @wr_verify
	.comm	_QCA7K_SPI_WRITE,4,2            ## @QCA7K_SPI_WRITE
	.comm	_QCA7K_SPI_EXTERNAL,4,2         ## @QCA7K_SPI_EXTERNAL
	.no_dead_strip	_qcaspi_tx_frame
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function qcaspi_tx_frame
_qcaspi_tx_frame:                       ; @qcaspi_tx_frame
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	mov	x19, x1
	mov	x20, x0
	ldr	x21, [x1]
Lloh0:
	adrp	x8, _SPI_REG_BFR_SIZE@GOTPAGE
Lloh1:
	ldr	x8, [x8, _SPI_REG_BFR_SIZE@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
Lloh3:
	adrp	x8, _wr_verify@GOTPAGE
Lloh4:
	ldr	x8, [x8, _wr_verify@GOTPAGEOFF]
Lloh5:
	ldr	w3, [x8]
	mov	x2, x21
	bl	_qcaspi_write_register
	ldr	x8, [x20, #8]
	cbz	x8, LBB0_2
; %bb.1:
Lloh6:
	adrp	x8, _QCA7K_SPI_WRITE@GOTPAGE
Lloh7:
	ldr	x8, [x8, _QCA7K_SPI_WRITE@GOTPAGEOFF]
Lloh8:
	ldr	w8, [x8]
Lloh9:
	adrp	x9, _QCA7K_SPI_EXTERNAL@GOTPAGE
Lloh10:
	ldr	x9, [x9, _QCA7K_SPI_EXTERNAL@GOTPAGEOFF]
Lloh11:
	ldr	w9, [x9]
	orr	w1, w9, w8
	mov	x0, x20
	bl	_qcaspi_tx_cmd
LBB0_2:
	cbz	x21, LBB0_8
; %bb.3:
	mov	x23, #0
LBB0_4:                                 ; =>This Inner Loop Header: Depth=1
	ldp	x8, x9, [x20]
	cmp	x21, x8
	csel	x22, x21, x8, lt
	ldr	x8, [x19, #8]
	add	x1, x8, x23
	mov	x0, x20
	mov	x2, x22
	cbz	x9, LBB0_6
; %bb.5:                                ;   in Loop: Header=BB0_4 Depth=1
	bl	_qcaspi_write_legacy
	cmp	x0, x22
	b.eq	LBB0_7
	b	LBB0_9
LBB0_6:                                 ;   in Loop: Header=BB0_4 Depth=1
	bl	_qcaspi_write_burst
	cmp	x0, x22
	b.ne	LBB0_9
LBB0_7:                                 ;   in Loop: Header=BB0_4 Depth=1
	add	x23, x22, x23
	subs	x21, x21, x22
	b.ne	LBB0_4
LBB0_8:
	mov	w0, #0
	b	LBB0_10
LBB0_9:
	mov	w0, #-1
LBB0_10:
	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
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
	.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	_SPI_REG_BFR_SIZE,4,2           ; @SPI_REG_BFR_SIZE
	.comm	_wr_verify,4,2                  ; @wr_verify
	.comm	_QCA7K_SPI_WRITE,4,2            ; @QCA7K_SPI_WRITE
	.comm	_QCA7K_SPI_EXTERNAL,4,2         ; @QCA7K_SPI_EXTERNAL
	.no_dead_strip	_qcaspi_tx_frame
.subsections_via_symbols
