	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function niu_zcp_read
_niu_zcp_read:                          ## @niu_zcp_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
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdx, %r12
	movq	%rdi, %r15
	movq	_ZCP_RAM_ACC@GOTPCREL(%rip), %r13
	movl	(%r13), %esi
	movq	_ZCP_RAM_ACC_BUSY@GOTPCREL(%rip), %r14
	movl	(%r14), %edx
	movl	$1000, %ecx                     ## imm = 0x3E8
	movl	$100, %r8d
	callq	_niu_wait_bits_clear
	testl	%eax, %eax
	je	LBB0_3
## %bb.1:
	movl	%eax, %ebx
	movl	(%r15), %r14d
	movl	(%r13), %edi
	callq	_nr64
	leaq	L_.str(%rip), %rsi
	jmp	LBB0_2
LBB0_3:
	movq	%r12, -48(%rbp)                 ## 8-byte Spill
	movl	(%r13), %r12d
	movq	_ZCP_RAM_ACC_READ@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	movl	4(%r15), %edi
	callq	_ZCP_RAM_SEL_CFIFO
	movq	_ZCP_RAM_ACC_RAM_SEL_SHIFT@GOTPCREL(%rip), %rcx
	movb	(%rcx), %cl
	shll	%cl, %eax
	orl	%eax, %ebx
	movl	%r12d, %edi
	movl	%ebx, %esi
	callq	_nw64
	movl	(%r13), %esi
	movl	(%r14), %edx
	movq	%r15, %rdi
	movl	$1000, %ecx                     ## imm = 0x3E8
	movl	$100, %r8d
	callq	_niu_wait_bits_clear
	testl	%eax, %eax
	je	LBB0_5
## %bb.4:
	movl	%eax, %ebx
	movl	(%r15), %r14d
	movl	(%r13), %edi
	callq	_nr64
	leaq	L_.str.1(%rip), %rsi
LBB0_2:
	movl	%r14d, %edi
	movq	%rax, %rdx
	callq	_netdev_err
LBB0_6:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_5:
	movq	_ZCP_RAM_DATA0@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_nr64
	movq	-48(%rbp), %rbx                 ## 8-byte Reload
	movq	%rax, (%rbx)
	movq	_ZCP_RAM_DATA1@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_nr64
	movq	%rax, 8(%rbx)
	movq	_ZCP_RAM_DATA2@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_nr64
	movq	%rax, 16(%rbx)
	movq	_ZCP_RAM_DATA3@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_nr64
	movq	%rax, 24(%rbx)
	movq	_ZCP_RAM_DATA4@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_nr64
	movq	%rax, 32(%rbx)
	xorl	%ebx, %ebx
	jmp	LBB0_6
	.cfi_endproc
                                        ## -- End function
	.comm	_ZCP_RAM_ACC,4,2                ## @ZCP_RAM_ACC
	.comm	_ZCP_RAM_ACC_BUSY,4,2           ## @ZCP_RAM_ACC_BUSY
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"ZCP read busy won't clear, ZCP_RAM_ACC[%llx]\n"

	.comm	_ZCP_RAM_ACC_READ,4,2           ## @ZCP_RAM_ACC_READ
	.comm	_ZCP_RAM_ACC_ZFCID_SHIFT,4,2    ## @ZCP_RAM_ACC_ZFCID_SHIFT
	.comm	_ZCP_RAM_ACC_RAM_SEL_SHIFT,4,2  ## @ZCP_RAM_ACC_RAM_SEL_SHIFT
L_.str.1:                               ## @.str.1
	.asciz	"ZCP read busy2 won't clear, ZCP_RAM_ACC[%llx]\n"

	.comm	_ZCP_RAM_DATA0,4,2              ## @ZCP_RAM_DATA0
	.comm	_ZCP_RAM_DATA1,4,2              ## @ZCP_RAM_DATA1
	.comm	_ZCP_RAM_DATA2,4,2              ## @ZCP_RAM_DATA2
	.comm	_ZCP_RAM_DATA3,4,2              ## @ZCP_RAM_DATA3
	.comm	_ZCP_RAM_DATA4,4,2              ## @ZCP_RAM_DATA4
	.no_dead_strip	_niu_zcp_read
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function niu_zcp_read
_niu_zcp_read:                          ; @niu_zcp_read
	.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, x2
	mov	x20, x0
Lloh0:
	adrp	x22, _ZCP_RAM_ACC@GOTPAGE
Lloh1:
	ldr	x22, [x22, _ZCP_RAM_ACC@GOTPAGEOFF]
	ldr	w1, [x22]
Lloh2:
	adrp	x23, _ZCP_RAM_ACC_BUSY@GOTPAGE
Lloh3:
	ldr	x23, [x23, _ZCP_RAM_ACC_BUSY@GOTPAGEOFF]
	ldr	w2, [x23]
	mov	w3, #1000
	mov	w4, #100
	bl	_niu_wait_bits_clear
	cbz	w0, LBB0_2
; %bb.1:
	mov	x21, x0
	ldr	w19, [x20]
	ldr	w0, [x22]
	bl	_nr64
	mov	x2, x0
Lloh4:
	adrp	x1, l_.str@PAGE
Lloh5:
	add	x1, x1, l_.str@PAGEOFF
	b	LBB0_4
LBB0_2:
	ldr	w21, [x22]
Lloh6:
	adrp	x8, _ZCP_RAM_ACC_READ@GOTPAGE
Lloh7:
	ldr	x8, [x8, _ZCP_RAM_ACC_READ@GOTPAGEOFF]
Lloh8:
	ldr	w24, [x8]
	ldr	w0, [x20, #4]
	bl	_ZCP_RAM_SEL_CFIFO
Lloh9:
	adrp	x8, _ZCP_RAM_ACC_RAM_SEL_SHIFT@GOTPAGE
Lloh10:
	ldr	x8, [x8, _ZCP_RAM_ACC_RAM_SEL_SHIFT@GOTPAGEOFF]
Lloh11:
	ldr	w8, [x8]
	lsl	w8, w0, w8
	orr	w1, w8, w24
	mov	x0, x21
	bl	_nw64
	ldr	w1, [x22]
	ldr	w2, [x23]
	mov	x0, x20
	mov	w3, #1000
	mov	w4, #100
	bl	_niu_wait_bits_clear
	mov	x21, x0
	cbz	w0, LBB0_6
; %bb.3:
	ldr	w19, [x20]
	ldr	w0, [x22]
	bl	_nr64
	mov	x2, x0
Lloh12:
	adrp	x1, l_.str.1@PAGE
Lloh13:
	add	x1, x1, l_.str.1@PAGEOFF
LBB0_4:
	mov	x0, x19
	bl	_netdev_err
LBB0_5:
	mov	x0, x21
	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
LBB0_6:
Lloh14:
	adrp	x8, _ZCP_RAM_DATA0@GOTPAGE
Lloh15:
	ldr	x8, [x8, _ZCP_RAM_DATA0@GOTPAGEOFF]
Lloh16:
	ldr	w0, [x8]
	bl	_nr64
	str	x0, [x19]
Lloh17:
	adrp	x8, _ZCP_RAM_DATA1@GOTPAGE
Lloh18:
	ldr	x8, [x8, _ZCP_RAM_DATA1@GOTPAGEOFF]
Lloh19:
	ldr	w0, [x8]
	bl	_nr64
	str	x0, [x19, #8]
Lloh20:
	adrp	x8, _ZCP_RAM_DATA2@GOTPAGE
Lloh21:
	ldr	x8, [x8, _ZCP_RAM_DATA2@GOTPAGEOFF]
Lloh22:
	ldr	w0, [x8]
	bl	_nr64
	str	x0, [x19, #16]
Lloh23:
	adrp	x8, _ZCP_RAM_DATA3@GOTPAGE
Lloh24:
	ldr	x8, [x8, _ZCP_RAM_DATA3@GOTPAGEOFF]
Lloh25:
	ldr	w0, [x8]
	bl	_nr64
	str	x0, [x19, #24]
Lloh26:
	adrp	x8, _ZCP_RAM_DATA4@GOTPAGE
Lloh27:
	ldr	x8, [x8, _ZCP_RAM_DATA4@GOTPAGEOFF]
Lloh28:
	ldr	w0, [x8]
	bl	_nr64
	str	x0, [x19, #32]
	b	LBB0_5
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpAdd	Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh26, Lloh27, Lloh28
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.cfi_endproc
                                        ; -- End function
	.comm	_ZCP_RAM_ACC,4,2                ; @ZCP_RAM_ACC
	.comm	_ZCP_RAM_ACC_BUSY,4,2           ; @ZCP_RAM_ACC_BUSY
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"ZCP read busy won't clear, ZCP_RAM_ACC[%llx]\n"

	.comm	_ZCP_RAM_ACC_READ,4,2           ; @ZCP_RAM_ACC_READ
	.comm	_ZCP_RAM_ACC_ZFCID_SHIFT,4,2    ; @ZCP_RAM_ACC_ZFCID_SHIFT
	.comm	_ZCP_RAM_ACC_RAM_SEL_SHIFT,4,2  ; @ZCP_RAM_ACC_RAM_SEL_SHIFT
l_.str.1:                               ; @.str.1
	.asciz	"ZCP read busy2 won't clear, ZCP_RAM_ACC[%llx]\n"

	.comm	_ZCP_RAM_DATA0,4,2              ; @ZCP_RAM_DATA0
	.comm	_ZCP_RAM_DATA1,4,2              ; @ZCP_RAM_DATA1
	.comm	_ZCP_RAM_DATA2,4,2              ; @ZCP_RAM_DATA2
	.comm	_ZCP_RAM_DATA3,4,2              ; @ZCP_RAM_DATA3
	.comm	_ZCP_RAM_DATA4,4,2              ; @ZCP_RAM_DATA4
	.no_dead_strip	_niu_zcp_read
.subsections_via_symbols
