	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function niu_ldg_init
_niu_ldg_init:                          ## @niu_ldg_init
	.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	$56, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r14
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	movq	8(%rdi), %rbx
	movq	_NIU_NUM_LDG@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	shlq	$2, %rax
	callq	____chkstk_darwin
	addq	$15, %rax
	andq	$-16, %rax
	subq	%rax, %rsp
	movq	%rsp, %r15
	movl	$1, (%r14)
	movq	16(%r14), %rax
	movq	24(%r14), %rcx
	movl	(%rax), %eax
	movl	%eax, 20(%rcx)
	movq	%rbx, -56(%rbp)                 ## 8-byte Spill
	movq	(%rbx), %rax
	movq	_PLAT_TYPE_NIU@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_4
## %bb.1:
	movq	%r14, %rdi
	movq	%r15, %rsi
	callq	_niu_n2_irq_init
	testl	%eax, %eax
	jne	LBB0_2
	jmp	LBB0_5
LBB0_4:
	movq	%r14, %rdi
	movq	%r15, %rsi
	callq	_niu_try_msix
LBB0_5:
	movq	%r15, -64(%rbp)                 ## 8-byte Spill
	movslq	4(%r14), %rcx
	movq	%rcx, %rax
	movq	%rcx, -72(%rbp)                 ## 8-byte Spill
	movl	%ecx, %eax
	movq	%rax, -80(%rbp)                 ## 8-byte Spill
	cmpl	$0, (%r14)
	jle	LBB0_10
## %bb.6:
	movl	$16, %ebx
	xorl	%r12d, %r12d
	movq	_niu_poll@GOTPCREL(%rip), %r13
	jmp	LBB0_7
	.p2align	4, 0x90
LBB0_9:                                 ##   in Loop: Header=BB0_7 Depth=1
	incq	%r12
	movslq	(%r14), %rax
	addq	$24, %rbx
	cmpq	%rax, %r12
	jge	LBB0_10
LBB0_7:                                 ## =>This Inner Loop Header: Depth=1
	movq	16(%r14), %rdi
	movq	24(%r14), %r15
	leaq	(%r15,%rbx), %rsi
	movl	(%r13), %edx
	movl	$64, %ecx
	callq	_netif_napi_add
	movq	%r14, -8(%r15,%rbx)
	movq	-64(%rbp), %rax                 ## 8-byte Reload
	movl	(%rax,%r12,4), %esi
	movl	%esi, -16(%r15,%rbx)
	movl	$2, -12(%r15,%rbx)
	movq	8(%r14), %rax
	movq	(%rax), %rax
	movq	_PLAT_TYPE_NIU@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	je	LBB0_9
## %bb.8:                               ##   in Loop: Header=BB0_7 Depth=1
	movq	%r14, %rdi
	movq	-80(%rbp), %rdx                 ## 8-byte Reload
                                        ## kill: def $edx killed $edx killed $rdx
	movl	%r12d, %ecx
	callq	_niu_set_ldg_sid
	testl	%eax, %eax
	je	LBB0_9
	jmp	LBB0_2
LBB0_10:
	movq	-64(%rbp), %r15                 ## 8-byte Reload
	movl	(%r15), %ebx
	movq	-72(%rbp), %rdi                 ## 8-byte Reload
                                        ## kill: def $edi killed $edi killed $rdi
	callq	_LDN_MAC
	movq	%r14, %rdi
	movq	-56(%rbp), %rsi                 ## 8-byte Reload
	movl	%ebx, %edx
	movl	%eax, %ecx
	callq	_niu_ldg_assign_ldn
	testl	%eax, %eax
	je	LBB0_11
LBB0_2:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	cmpq	-48(%rbp), %rcx
	jne	LBB0_3
## %bb.54:
	leaq	-40(%rbp), %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_11:
	movl	(%r14), %r12d
	xorl	%edx, %edx
	cmpl	$1, %r12d
	setne	%al
	movq	-80(%rbp), %rbx                 ## 8-byte Reload
	testq	%rbx, %rbx
	je	LBB0_12
## %bb.15:
	movb	%al, %dl
	testl	%ebx, %ebx
	jle	LBB0_16
## %bb.17:
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	movq	8(%rax), %rax
	cmpl	$8, %ebx
	jae	LBB0_19
## %bb.18:
	xorl	%ecx, %ecx
	xorl	%r12d, %r12d
	jmp	LBB0_27
LBB0_12:
	xorl	%eax, %eax
	cmpl	$1, %r12d
	setne	%al
	movl	(%r15,%rax,4), %edx
	movq	_LDN_MIF@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movq	%r14, %rdi
	movq	-56(%rbp), %rsi                 ## 8-byte Reload
	callq	_niu_ldg_assign_ldn
	testl	%eax, %eax
	jne	LBB0_2
## %bb.13:
	xorl	%ebx, %ebx
	cmpl	$1, %r12d
	setne	%bl
	incl	%ebx
	xorl	%r12d, %r12d
	cmpl	(%r14), %ebx
	cmovel	%r12d, %ebx
	movl	(%r15,%rbx,4), %edx
	movq	_LDN_DEVICE_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movq	%r14, %rdi
	movq	-56(%rbp), %rsi                 ## 8-byte Reload
	callq	_niu_ldg_assign_ldn
	testl	%eax, %eax
	jne	LBB0_2
## %bb.14:
	incl	%ebx
	cmpl	(%r14), %ebx
	cmovel	%r12d, %ebx
	movq	%rbx, %rdx
LBB0_16:
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	movq	8(%rax), %rax
	xorl	%esi, %esi
	xorl	%r12d, %r12d
	jmp	LBB0_29
LBB0_19:
	movl	%ebx, %ecx
	andl	$-8, %ecx
	leaq	-8(%rcx), %rsi
	movq	%rsi, %rdi
	shrq	$3, %rdi
	incq	%rdi
	movl	%edi, %r8d
	andl	$3, %r8d
	cmpq	$24, %rsi
	jae	LBB0_21
## %bb.20:
	pxor	%xmm0, %xmm0
	xorl	%esi, %esi
	pxor	%xmm1, %xmm1
	jmp	LBB0_23
LBB0_21:
	andq	$-4, %rdi
	pxor	%xmm0, %xmm0
	xorl	%esi, %esi
	pxor	%xmm1, %xmm1
	.p2align	4, 0x90
LBB0_22:                                ## =>This Inner Loop Header: Depth=1
	movdqu	(%rax,%rsi,4), %xmm2
	paddd	%xmm0, %xmm2
	movdqu	16(%rax,%rsi,4), %xmm0
	paddd	%xmm1, %xmm0
	movdqu	32(%rax,%rsi,4), %xmm1
	movdqu	48(%rax,%rsi,4), %xmm3
	movdqu	64(%rax,%rsi,4), %xmm4
	paddd	%xmm1, %xmm4
	paddd	%xmm2, %xmm4
	movdqu	80(%rax,%rsi,4), %xmm2
	paddd	%xmm3, %xmm2
	paddd	%xmm0, %xmm2
	movdqu	96(%rax,%rsi,4), %xmm0
	paddd	%xmm4, %xmm0
	movdqu	112(%rax,%rsi,4), %xmm1
	paddd	%xmm2, %xmm1
	addq	$32, %rsi
	addq	$-4, %rdi
	jne	LBB0_22
LBB0_23:
	testq	%r8, %r8
	je	LBB0_26
## %bb.24:
	leaq	(%rax,%rsi,4), %rsi
	addq	$16, %rsi
	shlq	$5, %r8
	xorl	%edi, %edi
	.p2align	4, 0x90
LBB0_25:                                ## =>This Inner Loop Header: Depth=1
	movdqu	-16(%rsi,%rdi), %xmm2
	paddd	%xmm2, %xmm0
	movdqu	(%rsi,%rdi), %xmm2
	paddd	%xmm2, %xmm1
	addq	$32, %rdi
	cmpq	%rdi, %r8
	jne	LBB0_25
LBB0_26:
	paddd	%xmm1, %xmm0
	pshufd	$238, %xmm0, %xmm1              ## xmm1 = xmm0[2,3,2,3]
	paddd	%xmm0, %xmm1
	pshufd	$85, %xmm1, %xmm0               ## xmm0 = xmm1[1,1,1,1]
	paddd	%xmm1, %xmm0
	movd	%xmm0, %r12d
	movb	$1, %sil
	cmpq	%rbx, %rcx
	je	LBB0_29
	.p2align	4, 0x90
LBB0_27:                                ## =>This Inner Loop Header: Depth=1
	addl	(%rax,%rcx,4), %r12d
	incq	%rcx
	cmpq	%rcx, %rbx
	jne	LBB0_27
## %bb.28:
	movb	$1, %sil
LBB0_29:
	movl	%esi, -84(%rbp)                 ## 4-byte Spill
	movq	-72(%rbp), %rcx                 ## 8-byte Reload
	movl	(%rax,%rcx,4), %r13d
	testl	%r13d, %r13d
	jle	LBB0_30
## %bb.49:
	addl	%r12d, %r13d
	jmp	LBB0_50
	.p2align	4, 0x90
LBB0_53:                                ##   in Loop: Header=BB0_50 Depth=1
	incl	%r12d
	movl	%ecx, %edx
	cmpl	%r13d, %r12d
	jge	LBB0_31
LBB0_50:                                ## =>This Inner Loop Header: Depth=1
	movslq	%edx, %rax
	movq	-64(%rbp), %rcx                 ## 8-byte Reload
	movl	(%rcx,%rax,4), %ebx
	movl	%r12d, %edi
	movq	%rdx, %r15
	callq	_LDN_RXDMA
	movq	%r14, %rdi
	movq	-56(%rbp), %rsi                 ## 8-byte Reload
	movl	%ebx, %edx
	movl	%eax, %ecx
	callq	_niu_ldg_assign_ldn
	testl	%eax, %eax
	jne	LBB0_2
## %bb.51:                              ##   in Loop: Header=BB0_50 Depth=1
	incl	%r15d
	xorl	%ecx, %ecx
	cmpl	(%r14), %r15d
	je	LBB0_53
## %bb.52:                              ##   in Loop: Header=BB0_50 Depth=1
	movl	%r15d, %ecx
	jmp	LBB0_53
LBB0_30:
	movl	%edx, %ecx
LBB0_31:
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	movq	16(%rax), %r10
	xorl	%eax, %eax
	movl	$0, %r15d
	cmpb	$0, -84(%rbp)                   ## 1-byte Folded Reload
	movq	-64(%rbp), %r8                  ## 8-byte Reload
	movq	-80(%rbp), %r9                  ## 8-byte Reload
	je	LBB0_43
## %bb.32:
	cmpl	$8, -72(%rbp)                   ## 4-byte Folded Reload
	jae	LBB0_34
## %bb.33:
	xorl	%edx, %edx
	xorl	%r15d, %r15d
	jmp	LBB0_42
LBB0_34:
	movl	%r9d, %edx
	andl	$-8, %edx
	leaq	-8(%rdx), %rdi
	movq	%rdi, %rsi
	shrq	$3, %rsi
	incq	%rsi
	movl	%esi, %ebx
	andl	$3, %ebx
	cmpq	$24, %rdi
	jae	LBB0_36
## %bb.35:
	pxor	%xmm0, %xmm0
	xorl	%edi, %edi
	pxor	%xmm1, %xmm1
	jmp	LBB0_38
LBB0_36:
	andq	$-4, %rsi
	pxor	%xmm0, %xmm0
	xorl	%edi, %edi
	pxor	%xmm1, %xmm1
	.p2align	4, 0x90
LBB0_37:                                ## =>This Inner Loop Header: Depth=1
	movdqu	(%r10,%rdi,4), %xmm2
	paddd	%xmm0, %xmm2
	movdqu	16(%r10,%rdi,4), %xmm0
	paddd	%xmm1, %xmm0
	movdqu	32(%r10,%rdi,4), %xmm1
	movdqu	48(%r10,%rdi,4), %xmm3
	movdqu	64(%r10,%rdi,4), %xmm4
	paddd	%xmm1, %xmm4
	paddd	%xmm2, %xmm4
	movdqu	80(%r10,%rdi,4), %xmm2
	paddd	%xmm3, %xmm2
	paddd	%xmm0, %xmm2
	movdqu	96(%r10,%rdi,4), %xmm0
	paddd	%xmm4, %xmm0
	movdqu	112(%r10,%rdi,4), %xmm1
	paddd	%xmm2, %xmm1
	addq	$32, %rdi
	addq	$-4, %rsi
	jne	LBB0_37
LBB0_38:
	testq	%rbx, %rbx
	je	LBB0_41
## %bb.39:
	leaq	(%r10,%rdi,4), %rsi
	addq	$16, %rsi
	shlq	$5, %rbx
	xorl	%edi, %edi
	.p2align	4, 0x90
LBB0_40:                                ## =>This Inner Loop Header: Depth=1
	movdqu	-16(%rsi,%rdi), %xmm2
	paddd	%xmm2, %xmm0
	movdqu	(%rsi,%rdi), %xmm2
	paddd	%xmm2, %xmm1
	addq	$32, %rdi
	cmpq	%rdi, %rbx
	jne	LBB0_40
LBB0_41:
	paddd	%xmm1, %xmm0
	pshufd	$238, %xmm0, %xmm1              ## xmm1 = xmm0[2,3,2,3]
	paddd	%xmm0, %xmm1
	pshufd	$85, %xmm1, %xmm0               ## xmm0 = xmm1[1,1,1,1]
	paddd	%xmm1, %xmm0
	movd	%xmm0, %r15d
	cmpq	%r9, %rdx
	je	LBB0_43
	.p2align	4, 0x90
LBB0_42:                                ## =>This Inner Loop Header: Depth=1
	addl	(%r10,%rdx,4), %r15d
	incq	%rdx
	cmpq	%rdx, %r9
	jne	LBB0_42
LBB0_43:
	movq	-72(%rbp), %rdx                 ## 8-byte Reload
	movl	(%r10,%rdx,4), %r13d
	testl	%r13d, %r13d
	jle	LBB0_2
## %bb.44:
	addl	%r15d, %r13d
	jmp	LBB0_45
	.p2align	4, 0x90
LBB0_48:                                ##   in Loop: Header=BB0_45 Depth=1
	incl	%r15d
	cmpl	%r13d, %r15d
	movq	-64(%rbp), %r8                  ## 8-byte Reload
	jge	LBB0_2
LBB0_45:                                ## =>This Inner Loop Header: Depth=1
	movslq	%ecx, %rax
	movl	(%r8,%rax,4), %r12d
	movl	%r15d, %edi
	movl	%ecx, %ebx
	callq	_LDN_TXDMA
	movq	%r14, %rdi
	movq	-56(%rbp), %rsi                 ## 8-byte Reload
	movl	%r12d, %edx
	movl	%eax, %ecx
	callq	_niu_ldg_assign_ldn
	testl	%eax, %eax
	jne	LBB0_2
## %bb.46:                              ##   in Loop: Header=BB0_45 Depth=1
	incl	%ebx
	xorl	%eax, %eax
	movl	$0, %ecx
	cmpl	(%r14), %ebx
	je	LBB0_48
## %bb.47:                              ##   in Loop: Header=BB0_45 Depth=1
	movl	%ebx, %ecx
	jmp	LBB0_48
LBB0_3:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_NIU_NUM_LDG,4,2                ## @NIU_NUM_LDG
	.comm	_PLAT_TYPE_NIU,8,3              ## @PLAT_TYPE_NIU
	.comm	_niu_poll,4,2                   ## @niu_poll
	.comm	_LDN_MIF,4,2                    ## @LDN_MIF
	.comm	_LDN_DEVICE_ERROR,4,2           ## @LDN_DEVICE_ERROR
	.no_dead_strip	_niu_ldg_init
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function niu_ldg_init
_niu_ldg_init:                          ; @niu_ldg_init
	.cfi_startproc
; %bb.0:
	stp	x28, x27, [sp, #-96]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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
	sub	sp, sp, #16
	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, #-88]
	ldr	x20, [x0, #8]
Lloh3:
	adrp	x8, _NIU_NUM_LDG@GOTPAGE
Lloh4:
	ldr	x8, [x8, _NIU_NUM_LDG@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	lsl	x8, x8, #2
	mov	x9, x8
Lloh6:
	adrp	x16, ___chkstk_darwin@GOTPAGE
Lloh7:
	ldr	x16, [x16, ___chkstk_darwin@GOTPAGEOFF]
	blr	x16
	mov	x9, sp
	add	x8, x8, #15
	and	x8, x8, #0x7fffffff0
	sub	x21, x9, x8
	mov	sp, x21
	mov	w8, #1
	str	w8, [x0]
	ldp	x8, x9, [x0, #16]
	ldr	w8, [x8]
	str	w8, [x9, #20]
	ldr	x8, [x20]
Lloh8:
	adrp	x25, _PLAT_TYPE_NIU@GOTPAGE
Lloh9:
	ldr	x25, [x25, _PLAT_TYPE_NIU@GOTPAGEOFF]
	ldr	x9, [x25]
	mov	x1, x21
	cmp	x8, x9
	b.ne	LBB0_2
; %bb.1:
	bl	_niu_n2_irq_init
	cbnz	w0, LBB0_9
	b	LBB0_3
LBB0_2:
	bl	_niu_try_msix
LBB0_3:
	stur	x20, [x29, #-96]                ; 8-byte Folded Spill
	ldp	w8, w9, [x19]
                                        ; kill: def $w9 killed $w9 def $x9
	sxtw	x9, w9
	mov	x20, x9
	and	x23, x9, #0xffffffff
	cmp	w8, #1
	b.lt	LBB0_8
; %bb.4:
	mov	x26, #0
	mov	x24, #0
Lloh10:
	adrp	x27, _niu_poll@GOTPAGE
Lloh11:
	ldr	x27, [x27, _niu_poll@GOTPAGEOFF]
	mov	w28, #2
	b	LBB0_6
LBB0_5:                                 ;   in Loop: Header=BB0_6 Depth=1
	add	x24, x24, #1
	ldrsw	x8, [x19]
	add	x26, x26, #24
	cmp	x24, x8
	b.ge	LBB0_8
LBB0_6:                                 ; =>This Inner Loop Header: Depth=1
	ldp	x0, x8, [x19, #16]
	add	x22, x8, x26
	add	x1, x22, #16
	ldr	w2, [x27]
	mov	w3, #64
	bl	_netif_napi_add
	str	x19, [x22, #8]
	ldr	w1, [x21, x24, lsl #2]
	stp	w1, w28, [x22]
	ldr	x8, [x19, #8]
	ldr	x8, [x8]
	ldr	x9, [x25]
	cmp	x8, x9
	b.eq	LBB0_5
; %bb.7:                                ;   in Loop: Header=BB0_6 Depth=1
	mov	x0, x19
	mov	x2, x23
	mov	x3, x24
	bl	_niu_set_ldg_sid
	cbz	w0, LBB0_5
	b	LBB0_9
LBB0_8:
	ldr	w24, [x21]
	mov	x22, x20
	mov	x0, x22
	bl	_LDN_MAC
	mov	x3, x0
	mov	x0, x19
	ldur	x20, [x29, #-96]                ; 8-byte Folded Reload
	mov	x1, x20
	mov	x2, x24
	bl	_niu_ldg_assign_ldn
	cbz	w0, LBB0_11
LBB0_9:
	ldur	x8, [x29, #-88]
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_42
; %bb.10:
	sub	sp, x29, #80
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp], #96             ; 16-byte Folded Reload
	ret
LBB0_11:
	ldr	w24, [x19]
	cmp	w24, #1
	cset	w26, ne
	cbz	w23, LBB0_15
; %bb.12:
	cmp	w23, #0
	b.le	LBB0_18
; %bb.13:
	ldr	x8, [x20, #8]
	cmp	w23, #16
	b.hs	LBB0_19
; %bb.14:
	mov	x9, #0
	mov	w24, #0
	b	LBB0_22
LBB0_15:
	ldr	w2, [x21, w26, uxtw #2]
Lloh15:
	adrp	x8, _LDN_MIF@GOTPAGE
Lloh16:
	ldr	x8, [x8, _LDN_MIF@GOTPAGEOFF]
Lloh17:
	ldr	w3, [x8]
	mov	x0, x19
	mov	x1, x20
	bl	_niu_ldg_assign_ldn
	cbnz	w0, LBB0_9
; %bb.16:
	cmp	w24, #1
	mov	w8, #1
	cinc	w8, w8, ne
	ldr	w9, [x19]
	cmp	w8, w9
	csel	w24, wzr, w8, eq
	ldr	w2, [x21, w24, uxtw #2]
Lloh18:
	adrp	x8, _LDN_DEVICE_ERROR@GOTPAGE
Lloh19:
	ldr	x8, [x8, _LDN_DEVICE_ERROR@GOTPAGEOFF]
Lloh20:
	ldr	w3, [x8]
	mov	x0, x19
	mov	x1, x20
	bl	_niu_ldg_assign_ldn
	cbnz	w0, LBB0_9
; %bb.17:
	add	w8, w24, #1
	ldr	w9, [x19]
	cmp	w8, w9
	csinc	w26, wzr, w24, eq
LBB0_18:
	mov	w27, #0
	mov	w24, #0
	ldr	x8, [x20, #8]
	b	LBB0_24
LBB0_19:
	mov	x10, #0
	and	x9, x23, #0xfffffff0
	lsl	x11, x23, #2
	and	x11, x11, #0x3ffffffc0
	movi.2d	v0, #0000000000000000
	movi.2d	v1, #0000000000000000
	movi.2d	v2, #0000000000000000
	movi.2d	v3, #0000000000000000
LBB0_20:                                ; =>This Inner Loop Header: Depth=1
	add	x12, x8, x10
	ldp	q4, q5, [x12]
	ldp	q6, q7, [x12, #32]
	add.4s	v0, v4, v0
	add.4s	v1, v5, v1
	add.4s	v2, v6, v2
	add.4s	v3, v7, v3
	add	x10, x10, #64
	cmp	x11, x10
	b.ne	LBB0_20
; %bb.21:
	add.4s	v0, v1, v0
	add.4s	v0, v2, v0
	add.4s	v0, v3, v0
	addv.4s	s0, v0
	fmov	w24, s0
	cmp	x9, x23
	b.eq	LBB0_23
LBB0_22:                                ; =>This Inner Loop Header: Depth=1
	ldr	w10, [x8, x9, lsl #2]
	add	w24, w10, w24
	add	x9, x9, #1
	cmp	x23, x9
	b.ne	LBB0_22
LBB0_23:
	mov	w27, #1
LBB0_24:
	ldr	w8, [x8, x22, lsl #2]
	cmp	w8, #1
	b.lt	LBB0_28
; %bb.25:
	add	w28, w8, w24
LBB0_26:                                ; =>This Inner Loop Header: Depth=1
	ldr	w25, [x21, w26, sxtw #2]
	mov	x0, x24
	bl	_LDN_RXDMA
	mov	x3, x0
	mov	x0, x19
	mov	x1, x20
	mov	x2, x25
	bl	_niu_ldg_assign_ldn
	cbnz	w0, LBB0_9
; %bb.27:                               ;   in Loop: Header=BB0_26 Depth=1
	add	w8, w26, #1
	ldr	w9, [x19]
	cmp	w8, w9
	csinc	w26, wzr, w26, eq
	add	w24, w24, #1
	cmp	w24, w28
	b.lt	LBB0_26
LBB0_28:
	ldr	x8, [x20, #16]
	cbz	w27, LBB0_31
; %bb.29:
	cmp	w22, #16
	b.hs	LBB0_32
; %bb.30:
	mov	x9, #0
	mov	w24, #0
	b	LBB0_35
LBB0_31:
	mov	w24, #0
	b	LBB0_37
LBB0_32:
	and	x9, x23, #0xfffffff0
	add	x10, x8, #32
	movi.2d	v0, #0000000000000000
	mov	x11, x9
	movi.2d	v1, #0000000000000000
	movi.2d	v2, #0000000000000000
	movi.2d	v3, #0000000000000000
LBB0_33:                                ; =>This Inner Loop Header: Depth=1
	ldp	q4, q5, [x10, #-32]
	ldp	q6, q7, [x10], #64
	add.4s	v0, v4, v0
	add.4s	v1, v5, v1
	add.4s	v2, v6, v2
	add.4s	v3, v7, v3
	subs	x11, x11, #16
	b.ne	LBB0_33
; %bb.34:
	add.4s	v0, v1, v0
	add.4s	v0, v2, v0
	add.4s	v0, v3, v0
	addv.4s	s0, v0
	fmov	w24, s0
	cmp	x9, x23
	b.eq	LBB0_37
LBB0_35:
	add	x10, x8, x9, lsl #2
	sub	x9, x23, x9
LBB0_36:                                ; =>This Inner Loop Header: Depth=1
	ldr	w11, [x10], #4
	add	w24, w11, w24
	subs	x9, x9, #1
	b.ne	LBB0_36
LBB0_37:
	ldr	w8, [x8, x22, lsl #2]
	cmp	w8, #1
	b.lt	LBB0_41
; %bb.38:
	add	w23, w8, w24
LBB0_39:                                ; =>This Inner Loop Header: Depth=1
	ldr	w22, [x21, w26, sxtw #2]
	mov	x0, x24
	bl	_LDN_TXDMA
	mov	x3, x0
	mov	x0, x19
	mov	x1, x20
	mov	x2, x22
	bl	_niu_ldg_assign_ldn
	cbnz	w0, LBB0_9
; %bb.40:                               ;   in Loop: Header=BB0_39 Depth=1
	add	w8, w26, #1
	ldr	w9, [x19]
	cmp	w8, w9
	csinc	w26, wzr, w26, eq
	add	w24, w24, #1
	cmp	w24, w23
	b.lt	LBB0_39
	b	LBB0_9
LBB0_41:
	mov	w0, #0
	b	LBB0_9
LBB0_42:
	bl	___stack_chk_fail
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.cfi_endproc
                                        ; -- End function
	.comm	_NIU_NUM_LDG,4,2                ; @NIU_NUM_LDG
	.comm	_PLAT_TYPE_NIU,8,3              ; @PLAT_TYPE_NIU
	.comm	_niu_poll,4,2                   ; @niu_poll
	.comm	_LDN_MIF,4,2                    ; @LDN_MIF
	.comm	_LDN_DEVICE_ERROR,4,2           ; @LDN_DEVICE_ERROR
	.no_dead_strip	_niu_ldg_init
.subsections_via_symbols
