	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function qcaspi_spi_thread
_qcaspi_spi_thread:                     ## @qcaspi_spi_thread
	.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	%rdi, %rbx
	movl	$0, -44(%rbp)
	movl	24(%rdi), %edi
	leaq	L_.str(%rip), %rsi
	callq	_netdev_info
	xorl	%eax, %eax
	callq	_kthread_should_stop
	testl	%eax, %eax
	je	LBB0_1
LBB0_16:
	movq	_TASK_RUNNING@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_set_current_state
	movl	24(%rbx), %edi
	leaq	L_.str.5(%rip), %rsi
	callq	_netdev_info
	xorl	%eax, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_1:
	movq	_QCASPI_SYNC_READY@GOTPCREL(%rip), %r15
	movq	_TASK_RUNNING@GOTPCREL(%rip), %r12
	leaq	L_.str.1(%rip), %r14
	movq	_QCASPI_EVENT_UPDATE@GOTPCREL(%rip), %r13
	jmp	LBB0_2
	.p2align	4, 0x90
LBB0_12:                                ##   in Loop: Header=BB0_2 Depth=1
	movq	_SPI_INT_RDBUF_ERR@GOTPCREL(%rip), %rax
	testl	%esi, (%rax)
	je	LBB0_17
## %bb.13:                              ##   in Loop: Header=BB0_2 Depth=1
	movl	24(%rbx), %edi
	leaq	L_.str.3(%rip), %rsi
	xorl	%eax, %eax
	callq	_netdev_dbg
	incl	32(%rbx)
LBB0_14:                                ##   in Loop: Header=BB0_2 Depth=1
	movq	_QCASPI_SYNC_UNKNOWN@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, 16(%rbx)
LBB0_15:                                ##   in Loop: Header=BB0_2 Depth=1
	xorl	%eax, %eax
	callq	_kthread_should_stop
	testl	%eax, %eax
	jne	LBB0_16
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	movq	_TASK_INTERRUPTIBLE@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_set_current_state
	movq	(%rbx), %rax
	cmpq	8(%rbx), %rax
	jne	LBB0_6
## %bb.3:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	40(%rbx), %rax
	movq	48(%rbx), %rcx
	cmpq	$0, (%rcx,%rax,8)
	jne	LBB0_6
## %bb.4:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	16(%rbx), %rax
	cmpq	(%r15), %rax
	jne	LBB0_6
## %bb.5:                               ##   in Loop: Header=BB0_2 Depth=1
	xorl	%eax, %eax
	callq	_schedule
	.p2align	4, 0x90
LBB0_6:                                 ##   in Loop: Header=BB0_2 Depth=1
	movl	(%r12), %edi
	callq	_set_current_state
	movq	(%rbx), %rdx
	subq	8(%rbx), %rdx
	movl	24(%rbx), %edi
	movq	48(%rbx), %rax
	movq	40(%rbx), %rcx
	movq	(%rax,%rcx,8), %rcx
	movq	%r14, %rsi
	xorl	%eax, %eax
	callq	_netdev_dbg
	movl	(%r13), %esi
	movq	%rbx, %rdi
	callq	_qcaspi_qca7k_sync
	movq	16(%rbx), %rdx
	cmpq	(%r15), %rdx
	je	LBB0_8
## %bb.7:                               ##   in Loop: Header=BB0_2 Depth=1
	movl	24(%rbx), %edi
	leaq	L_.str.2(%rip), %rsi
                                        ## kill: def $edx killed $edx killed $rdx
	xorl	%eax, %eax
	callq	_netdev_dbg
	movl	24(%rbx), %edi
	callq	_netif_stop_queue
	movl	24(%rbx), %edi
	callq	_netif_carrier_off
	movq	%rbx, %rdi
	callq	_qcaspi_flush_tx_ring
	movq	_QCASPI_QCA7K_REBOOT_TIME_MS@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_msleep
LBB0_8:                                 ##   in Loop: Header=BB0_2 Depth=1
	movq	(%rbx), %rax
	cmpq	%rax, 8(%rbx)
	jne	LBB0_9
LBB0_23:                                ##   in Loop: Header=BB0_2 Depth=1
	movq	16(%rbx), %rax
	cmpq	(%r15), %rax
	jne	LBB0_15
## %bb.24:                              ##   in Loop: Header=BB0_2 Depth=1
	movq	%rbx, %rdi
	callq	_qcaspi_transmit
	jmp	LBB0_15
	.p2align	4, 0x90
LBB0_9:                                 ##   in Loop: Header=BB0_2 Depth=1
	movq	%rax, 8(%rbx)
	movq	%rbx, %rdi
	leaq	-44(%rbp), %rsi
	callq	_start_spi_intr_handling
	movl	-44(%rbp), %esi
	movq	_SPI_INT_CPU_ON@GOTPCREL(%rip), %rax
	testl	%esi, (%rax)
	je	LBB0_12
## %bb.10:                              ##   in Loop: Header=BB0_2 Depth=1
	movq	_QCASPI_EVENT_CPUON@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	callq	_qcaspi_qca7k_sync
	movq	16(%rbx), %rax
	cmpq	(%r15), %rax
	jne	LBB0_15
## %bb.11:                              ##   in Loop: Header=BB0_2 Depth=1
	incl	36(%rbx)
	movl	24(%rbx), %edi
	callq	_netif_wake_queue
	movl	24(%rbx), %edi
	callq	_netif_carrier_on
	movl	-44(%rbp), %esi
	jmp	LBB0_12
LBB0_17:                                ##   in Loop: Header=BB0_2 Depth=1
	movq	_SPI_INT_WRBUF_ERR@GOTPCREL(%rip), %rax
	testl	%esi, (%rax)
	je	LBB0_19
## %bb.18:                              ##   in Loop: Header=BB0_2 Depth=1
	movl	24(%rbx), %edi
	leaq	L_.str.4(%rip), %rsi
	xorl	%eax, %eax
	callq	_netdev_dbg
	incl	28(%rbx)
	jmp	LBB0_14
LBB0_19:                                ##   in Loop: Header=BB0_2 Depth=1
	movq	16(%rbx), %rax
	cmpq	(%r15), %rax
	jne	LBB0_22
## %bb.20:                              ##   in Loop: Header=BB0_2 Depth=1
	movq	_SPI_INT_PKT_AVLBL@GOTPCREL(%rip), %rax
	testl	%esi, (%rax)
	je	LBB0_22
## %bb.21:                              ##   in Loop: Header=BB0_2 Depth=1
	movq	%rbx, %rdi
	callq	_qcaspi_receive
	movl	-44(%rbp), %esi
LBB0_22:                                ##   in Loop: Header=BB0_2 Depth=1
	movq	%rbx, %rdi
	callq	_end_spi_intr_handling
	jmp	LBB0_23
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"SPI thread created\n"

	.comm	_TASK_INTERRUPTIBLE,4,2         ## @TASK_INTERRUPTIBLE
	.comm	_QCASPI_SYNC_READY,8,3          ## @QCASPI_SYNC_READY
	.comm	_TASK_RUNNING,4,2               ## @TASK_RUNNING
L_.str.1:                               ## @.str.1
	.asciz	"have work to do. int: %d, tx_skb: %p\n"

	.comm	_QCASPI_EVENT_UPDATE,4,2        ## @QCASPI_EVENT_UPDATE
L_.str.2:                               ## @.str.2
	.asciz	"sync: not ready %u, turn off carrier and flush\n"

	.comm	_QCASPI_QCA7K_REBOOT_TIME_MS,4,2 ## @QCASPI_QCA7K_REBOOT_TIME_MS
	.comm	_SPI_INT_CPU_ON,4,2             ## @SPI_INT_CPU_ON
	.comm	_QCASPI_EVENT_CPUON,4,2         ## @QCASPI_EVENT_CPUON
	.comm	_SPI_INT_RDBUF_ERR,4,2          ## @SPI_INT_RDBUF_ERR
L_.str.3:                               ## @.str.3
	.asciz	"===> rdbuf error!\n"

	.comm	_QCASPI_SYNC_UNKNOWN,8,3        ## @QCASPI_SYNC_UNKNOWN
	.comm	_SPI_INT_WRBUF_ERR,4,2          ## @SPI_INT_WRBUF_ERR
L_.str.4:                               ## @.str.4
	.asciz	"===> wrbuf error!\n"

	.comm	_SPI_INT_PKT_AVLBL,4,2          ## @SPI_INT_PKT_AVLBL
L_.str.5:                               ## @.str.5
	.asciz	"SPI thread exit\n"

	.no_dead_strip	_qcaspi_spi_thread
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function qcaspi_spi_thread
_qcaspi_spi_thread:                     ; @qcaspi_spi_thread
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #128
	.cfi_def_cfa_offset 128
	stp	x28, x27, [sp, #32]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #48]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #64]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #80]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #96]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #112]            ; 16-byte Folded Spill
	add	x29, sp, #112
	.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
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	mov	x19, x0
	str	wzr, [sp, #28]
	ldr	w0, [x0, #24]
Lloh0:
	adrp	x1, l_.str@PAGE
Lloh1:
	add	x1, x1, l_.str@PAGEOFF
	bl	_netdev_info
	bl	_kthread_should_stop
Lloh2:
	adrp	x24, _TASK_RUNNING@GOTPAGE
Lloh3:
	ldr	x24, [x24, _TASK_RUNNING@GOTPAGEOFF]
	cbz	w0, LBB0_2
LBB0_1:
	ldr	w0, [x24]
	bl	_set_current_state
	ldr	w0, [x19, #24]
Lloh4:
	adrp	x1, l_.str.5@PAGE
Lloh5:
	add	x1, x1, l_.str.5@PAGEOFF
	bl	_netdev_info
	mov	w0, #0
	ldp	x29, x30, [sp, #112]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #96]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #80]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #64]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #48]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #128
	ret
LBB0_2:
Lloh6:
	adrp	x25, _TASK_INTERRUPTIBLE@GOTPAGE
Lloh7:
	ldr	x25, [x25, _TASK_INTERRUPTIBLE@GOTPAGEOFF]
Lloh8:
	adrp	x26, _QCASPI_SYNC_READY@GOTPAGE
Lloh9:
	ldr	x26, [x26, _QCASPI_SYNC_READY@GOTPAGEOFF]
Lloh10:
	adrp	x20, l_.str.1@PAGE
Lloh11:
	add	x20, x20, l_.str.1@PAGEOFF
Lloh12:
	adrp	x27, _QCASPI_EVENT_UPDATE@GOTPAGE
Lloh13:
	ldr	x27, [x27, _QCASPI_EVENT_UPDATE@GOTPAGEOFF]
Lloh14:
	adrp	x28, _SPI_INT_CPU_ON@GOTPAGE
Lloh15:
	ldr	x28, [x28, _SPI_INT_CPU_ON@GOTPAGEOFF]
Lloh16:
	adrp	x21, _SPI_INT_RDBUF_ERR@GOTPAGE
Lloh17:
	ldr	x21, [x21, _SPI_INT_RDBUF_ERR@GOTPAGEOFF]
Lloh18:
	adrp	x23, l_.str.2@PAGE
Lloh19:
	add	x23, x23, l_.str.2@PAGEOFF
Lloh20:
	adrp	x22, _QCASPI_QCA7K_REBOOT_TIME_MS@GOTPAGE
Lloh21:
	ldr	x22, [x22, _QCASPI_QCA7K_REBOOT_TIME_MS@GOTPAGEOFF]
	b	LBB0_7
LBB0_3:                                 ;   in Loop: Header=BB0_7 Depth=1
	ldr	w8, [x21]
	tst	w8, w1
	b.eq	LBB0_19
; %bb.4:                                ;   in Loop: Header=BB0_7 Depth=1
	ldr	w0, [x19, #24]
Lloh22:
	adrp	x1, l_.str.3@PAGE
Lloh23:
	add	x1, x1, l_.str.3@PAGEOFF
	bl	_netdev_dbg
	ldr	w8, [x19, #32]
	add	w8, w8, #1
	str	w8, [x19, #32]
LBB0_5:                                 ;   in Loop: Header=BB0_7 Depth=1
Lloh24:
	adrp	x8, _QCASPI_SYNC_UNKNOWN@GOTPAGE
Lloh25:
	ldr	x8, [x8, _QCASPI_SYNC_UNKNOWN@GOTPAGEOFF]
Lloh26:
	ldr	x8, [x8]
	str	x8, [x19, #16]
LBB0_6:                                 ;   in Loop: Header=BB0_7 Depth=1
	bl	_kthread_should_stop
	cbnz	w0, LBB0_1
LBB0_7:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w0, [x25]
	bl	_set_current_state
	ldp	x8, x9, [x19]
	cmp	x8, x9
	b.ne	LBB0_11
; %bb.8:                                ;   in Loop: Header=BB0_7 Depth=1
	ldp	x9, x8, [x19, #40]
	ldr	x8, [x8, x9, lsl #3]
	cbnz	x8, LBB0_11
; %bb.9:                                ;   in Loop: Header=BB0_7 Depth=1
	ldr	x8, [x19, #16]
	ldr	x9, [x26]
	cmp	x8, x9
	b.ne	LBB0_11
; %bb.10:                               ;   in Loop: Header=BB0_7 Depth=1
	bl	_schedule
LBB0_11:                                ;   in Loop: Header=BB0_7 Depth=1
	ldr	w0, [x24]
	bl	_set_current_state
	ldr	w0, [x19, #24]
	ldp	x8, x9, [x19]
	sub	x8, x8, x9
	ldp	x10, x9, [x19, #40]
	ldr	x9, [x9, x10, lsl #3]
	stp	x8, x9, [sp]
	mov	x1, x20
	bl	_netdev_dbg
	ldr	w1, [x27]
	mov	x0, x19
	bl	_qcaspi_qca7k_sync
	ldr	x8, [x19, #16]
	ldr	x9, [x26]
	cmp	x8, x9
	b.eq	LBB0_13
; %bb.12:                               ;   in Loop: Header=BB0_7 Depth=1
	ldr	w0, [x19, #24]
	str	x8, [sp]
	mov	x1, x23
	bl	_netdev_dbg
	ldr	w0, [x19, #24]
	bl	_netif_stop_queue
	ldr	w0, [x19, #24]
	bl	_netif_carrier_off
	mov	x0, x19
	bl	_qcaspi_flush_tx_ring
	ldr	w0, [x22]
	bl	_msleep
LBB0_13:                                ;   in Loop: Header=BB0_7 Depth=1
	ldp	x8, x9, [x19]
	cmp	x9, x8
	b.ne	LBB0_16
LBB0_14:                                ;   in Loop: Header=BB0_7 Depth=1
	ldr	x8, [x19, #16]
	ldr	x9, [x26]
	cmp	x8, x9
	b.ne	LBB0_6
; %bb.15:                               ;   in Loop: Header=BB0_7 Depth=1
	mov	x0, x19
	bl	_qcaspi_transmit
	b	LBB0_6
LBB0_16:                                ;   in Loop: Header=BB0_7 Depth=1
	str	x8, [x19, #8]
	add	x1, sp, #28
	mov	x0, x19
	bl	_start_spi_intr_handling
	ldr	w1, [sp, #28]
	ldr	w8, [x28]
	tst	w8, w1
	b.eq	LBB0_3
; %bb.17:                               ;   in Loop: Header=BB0_7 Depth=1
Lloh27:
	adrp	x8, _QCASPI_EVENT_CPUON@GOTPAGE
Lloh28:
	ldr	x8, [x8, _QCASPI_EVENT_CPUON@GOTPAGEOFF]
Lloh29:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_qcaspi_qca7k_sync
	ldr	x8, [x19, #16]
	ldr	x9, [x26]
	cmp	x8, x9
	b.ne	LBB0_6
; %bb.18:                               ;   in Loop: Header=BB0_7 Depth=1
	ldr	w8, [x19, #36]
	add	w8, w8, #1
	str	w8, [x19, #36]
	ldr	w0, [x19, #24]
	bl	_netif_wake_queue
	ldr	w0, [x19, #24]
	bl	_netif_carrier_on
	ldr	w1, [sp, #28]
	b	LBB0_3
LBB0_19:                                ;   in Loop: Header=BB0_7 Depth=1
Lloh30:
	adrp	x8, _SPI_INT_WRBUF_ERR@GOTPAGE
Lloh31:
	ldr	x8, [x8, _SPI_INT_WRBUF_ERR@GOTPAGEOFF]
Lloh32:
	ldr	w8, [x8]
	tst	w8, w1
	b.eq	LBB0_21
; %bb.20:                               ;   in Loop: Header=BB0_7 Depth=1
	ldr	w0, [x19, #24]
Lloh33:
	adrp	x1, l_.str.4@PAGE
Lloh34:
	add	x1, x1, l_.str.4@PAGEOFF
	bl	_netdev_dbg
	ldr	w8, [x19, #28]
	add	w8, w8, #1
	str	w8, [x19, #28]
	b	LBB0_5
LBB0_21:                                ;   in Loop: Header=BB0_7 Depth=1
	ldr	x8, [x19, #16]
	ldr	x9, [x26]
	cmp	x8, x9
	b.ne	LBB0_24
; %bb.22:                               ;   in Loop: Header=BB0_7 Depth=1
Lloh35:
	adrp	x8, _SPI_INT_PKT_AVLBL@GOTPAGE
Lloh36:
	ldr	x8, [x8, _SPI_INT_PKT_AVLBL@GOTPAGEOFF]
Lloh37:
	ldr	w8, [x8]
	tst	w8, w1
	b.eq	LBB0_24
; %bb.23:                               ;   in Loop: Header=BB0_7 Depth=1
	mov	x0, x19
	bl	_qcaspi_receive
	ldr	w1, [sp, #28]
LBB0_24:                                ;   in Loop: Header=BB0_7 Depth=1
	mov	x0, x19
	bl	_end_spi_intr_handling
	b	LBB0_14
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpAdd	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh20, Lloh21
	.loh AdrpAdd	Lloh18, Lloh19
	.loh AdrpLdrGot	Lloh16, Lloh17
	.loh AdrpLdrGot	Lloh14, Lloh15
	.loh AdrpLdrGot	Lloh12, Lloh13
	.loh AdrpAdd	Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpAdd	Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh24, Lloh25, Lloh26
	.loh AdrpLdrGotLdr	Lloh27, Lloh28, Lloh29
	.loh AdrpLdrGotLdr	Lloh30, Lloh31, Lloh32
	.loh AdrpAdd	Lloh33, Lloh34
	.loh AdrpLdrGotLdr	Lloh35, Lloh36, Lloh37
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"SPI thread created\n"

	.comm	_TASK_INTERRUPTIBLE,4,2         ; @TASK_INTERRUPTIBLE
	.comm	_QCASPI_SYNC_READY,8,3          ; @QCASPI_SYNC_READY
	.comm	_TASK_RUNNING,4,2               ; @TASK_RUNNING
l_.str.1:                               ; @.str.1
	.asciz	"have work to do. int: %d, tx_skb: %p\n"

	.comm	_QCASPI_EVENT_UPDATE,4,2        ; @QCASPI_EVENT_UPDATE
l_.str.2:                               ; @.str.2
	.asciz	"sync: not ready %u, turn off carrier and flush\n"

	.comm	_QCASPI_QCA7K_REBOOT_TIME_MS,4,2 ; @QCASPI_QCA7K_REBOOT_TIME_MS
	.comm	_SPI_INT_CPU_ON,4,2             ; @SPI_INT_CPU_ON
	.comm	_QCASPI_EVENT_CPUON,4,2         ; @QCASPI_EVENT_CPUON
	.comm	_SPI_INT_RDBUF_ERR,4,2          ; @SPI_INT_RDBUF_ERR
l_.str.3:                               ; @.str.3
	.asciz	"===> rdbuf error!\n"

	.comm	_QCASPI_SYNC_UNKNOWN,8,3        ; @QCASPI_SYNC_UNKNOWN
	.comm	_SPI_INT_WRBUF_ERR,4,2          ; @SPI_INT_WRBUF_ERR
l_.str.4:                               ; @.str.4
	.asciz	"===> wrbuf error!\n"

	.comm	_SPI_INT_PKT_AVLBL,4,2          ; @SPI_INT_PKT_AVLBL
l_.str.5:                               ; @.str.5
	.asciz	"SPI thread exit\n"

	.no_dead_strip	_qcaspi_spi_thread
.subsections_via_symbols
