	.file	"extr_niu.c_niu_init_hw.c"
	.intel_syntax noprefix
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%s: Initialize TXC\n"
.LC1:
	.string	"%s: Initialize TX channels\n"
.LC2:
	.string	"%s: Initialize RX channels\n"
.LC3:
	.string	"%s: Initialize classifier\n"
.LC4:
	.string	"%s: Initialize ZCP\n"
.LC5:
	.string	"%s: Initialize IPP\n"
.LC6:
	.string	"%s: Initialize MAC\n"
.LC7:
	.string	"%s: Uninit IPP\n"
.LC8:
	.string	"%s: Uninit RX channels\n"
.LC9:
	.string	"%s: Uninit TX channels\n"
	.text
	.p2align 4
	.type	niu_init_hw, @function
niu_init_hw:
.LFB0:
	.cfi_startproc
	endbr64
	push	r12
	.cfi_def_cfa_offset 16
	.cfi_offset 12, -16
	lea	rsi, .LC0[rip]
	push	rbp
	.cfi_def_cfa_offset 24
	.cfi_offset 6, -24
	mov	rbp, rdi
	push	rbx
	.cfi_def_cfa_offset 32
	.cfi_offset 3, -32
	mov	rax, QWORD PTR 8[rdi]
	mov	edi, DWORD PTR IFUP[rip]
	mov	edx, DWORD PTR [rax]
	call	niudbg@PLT
	mov	esi, 1
	mov	rdi, rbp
	call	niu_txc_enable_port@PLT
	mov	esi, 1
	mov	rdi, rbp
	call	niu_txc_port_dma_enable@PLT
	xor	esi, esi
	mov	rdi, rbp
	call	niu_txc_set_imask@PLT
	mov	rax, QWORD PTR 8[rbp]
	mov	edi, DWORD PTR IFUP[rip]
	lea	rsi, .LC1[rip]
	mov	edx, DWORD PTR [rax]
	call	niudbg@PLT
	mov	eax, DWORD PTR 0[rbp]
	test	eax, eax
	jle	.L2
	xor	ebx, ebx
	jmp	.L4
	.p2align 4,,10
	.p2align 3
.L13:
	add	rbx, 1
	cmp	DWORD PTR 0[rbp], ebx
	jle	.L2
.L4:
	mov	rax, QWORD PTR 16[rbp]
	mov	rdi, rbp
	lea	rsi, [rax+rbx*4]
	call	niu_init_one_tx_channel@PLT
	mov	r12d, eax
	test	eax, eax
	je	.L13
.L1:
	mov	eax, r12d
	pop	rbx
	.cfi_remember_state
	.cfi_def_cfa_offset 24
	pop	rbp
	.cfi_def_cfa_offset 16
	pop	r12
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L2:
	.cfi_restore_state
	mov	rax, QWORD PTR 8[rbp]
	mov	edi, DWORD PTR IFUP[rip]
	lea	rsi, .LC2[rip]
	mov	edx, DWORD PTR [rax]
	call	niudbg@PLT
	mov	rdi, rbp
	call	niu_init_rx_channels@PLT
	mov	r12d, eax
	test	eax, eax
	je	.L14
.L5:
	mov	rax, QWORD PTR 8[rbp]
	mov	edi, DWORD PTR IFUP[rip]
	lea	rsi, .LC9[rip]
	mov	edx, DWORD PTR [rax]
	call	niudbg@PLT
	mov	rdi, rbp
	call	niu_stop_tx_channels@PLT
	mov	rdi, rbp
	call	niu_reset_tx_channels@PLT
	mov	eax, r12d
	pop	rbx
	.cfi_remember_state
	.cfi_def_cfa_offset 24
	pop	rbp
	.cfi_def_cfa_offset 16
	pop	r12
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L14:
	.cfi_restore_state
	mov	rax, QWORD PTR 8[rbp]
	mov	edi, DWORD PTR IFUP[rip]
	lea	rsi, .LC3[rip]
	mov	edx, DWORD PTR [rax]
	call	niudbg@PLT
	mov	rdi, rbp
	call	niu_init_classifier_hw@PLT
	mov	r12d, eax
	test	eax, eax
	je	.L15
.L6:
	mov	rax, QWORD PTR 8[rbp]
	mov	edi, DWORD PTR IFUP[rip]
	lea	rsi, .LC8[rip]
	mov	edx, DWORD PTR [rax]
	call	niudbg@PLT
	mov	rdi, rbp
	call	niu_stop_rx_channels@PLT
	mov	rdi, rbp
	call	niu_reset_rx_channels@PLT
	jmp	.L5
	.p2align 4,,10
	.p2align 3
.L15:
	mov	rax, QWORD PTR 8[rbp]
	mov	edi, DWORD PTR IFUP[rip]
	lea	rsi, .LC4[rip]
	mov	edx, DWORD PTR [rax]
	call	niudbg@PLT
	mov	rdi, rbp
	call	niu_init_zcp@PLT
	mov	r12d, eax
	test	eax, eax
	jne	.L6
	mov	rax, QWORD PTR 8[rbp]
	mov	edi, DWORD PTR IFUP[rip]
	lea	rsi, .LC5[rip]
	mov	edx, DWORD PTR [rax]
	call	niudbg@PLT
	mov	rdi, rbp
	call	niu_init_ipp@PLT
	mov	r12d, eax
	test	eax, eax
	jne	.L6
	mov	rax, QWORD PTR 8[rbp]
	mov	edi, DWORD PTR IFUP[rip]
	lea	rsi, .LC6[rip]
	mov	edx, DWORD PTR [rax]
	call	niudbg@PLT
	mov	rdi, rbp
	call	niu_init_mac@PLT
	mov	r12d, eax
	test	eax, eax
	je	.L1
	mov	rax, QWORD PTR 8[rbp]
	mov	edi, DWORD PTR IFUP[rip]
	lea	rsi, .LC7[rip]
	mov	edx, DWORD PTR [rax]
	call	niudbg@PLT
	mov	rdi, rbp
	call	niu_disable_ipp@PLT
	jmp	.L6
	.cfi_endproc
.LFE0:
	.size	niu_init_hw, .-niu_init_hw
	.comm	IFUP,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",@progbits
	.section	.note.gnu.property,"a"
	.align 8
	.long	 1f - 0f
	.long	 4f - 1f
	.long	 5
0:
	.string	 "GNU"
1:
	.align 8
	.long	 0xc0000002
	.long	 3f - 2f
2:
	.long	 0x3
3:
	.align 8
4:

	.arch armv5t
	.eabi_attribute 20, 1
	.eabi_attribute 21, 1
	.eabi_attribute 23, 3
	.eabi_attribute 24, 1
	.eabi_attribute 25, 1
	.eabi_attribute 26, 2
	.eabi_attribute 30, 2
	.eabi_attribute 34, 0
	.eabi_attribute 18, 4
	.file	"extr_niu.c_niu_init_hw.c"
	.text
	.section	.rodata.str1.4,"aMS",%progbits,1
	.align	2
.LC0:
	.ascii	"%s: Initialize TXC\012\000"
	.align	2
.LC1:
	.ascii	"%s: Initialize TX channels\012\000"
	.align	2
.LC2:
	.ascii	"%s: Initialize RX channels\012\000"
	.align	2
.LC3:
	.ascii	"%s: Initialize classifier\012\000"
	.align	2
.LC4:
	.ascii	"%s: Initialize ZCP\012\000"
	.align	2
.LC5:
	.ascii	"%s: Initialize IPP\012\000"
	.align	2
.LC6:
	.ascii	"%s: Initialize MAC\012\000"
	.align	2
.LC7:
	.ascii	"%s: Uninit IPP\012\000"
	.align	2
.LC8:
	.ascii	"%s: Uninit RX channels\012\000"
	.align	2
.LC9:
	.ascii	"%s: Uninit TX channels\012\000"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	niu_init_hw, %function
niu_init_hw:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, lr}
	mov	r6, r0
	ldr	r3, [r0, #4]
	ldr	r5, .L16
	ldr	r2, [r3]
	ldr	r1, .L16+4
	ldr	r0, [r5]
	bl	niudbg
	mov	r1, #1
	mov	r0, r6
	bl	niu_txc_enable_port
	mov	r1, #1
	mov	r0, r6
	bl	niu_txc_port_dma_enable
	mov	r1, #0
	mov	r0, r6
	bl	niu_txc_set_imask
	ldr	r3, [r6, #4]
	ldr	r0, [r5]
	ldr	r2, [r3]
	ldr	r1, .L16+8
	bl	niudbg
	ldr	r3, [r6]
	cmp	r3, #0
	ble	.L2
	mov	r7, #0
	b	.L4
.L13:
	ldr	r3, [r6]
	cmp	r3, r7
	ble	.L2
.L4:
	ldr	r1, [r6, #8]
	mov	r0, r6
	add	r1, r1, r7, lsl #2
	bl	niu_init_one_tx_channel
	subs	r4, r0, #0
	add	r7, r7, #1
	beq	.L13
.L1:
	mov	r0, r4
	pop	{r4, r5, r6, r7, r8, pc}
.L2:
	ldr	r3, [r6, #4]
	ldr	r1, .L16+12
	ldr	r2, [r3]
	ldr	r0, [r5]
	bl	niudbg
	mov	r0, r6
	bl	niu_init_rx_channels
	subs	r4, r0, #0
	beq	.L14
.L5:
	ldr	r3, [r6, #4]
	ldr	r1, .L16+16
	ldr	r2, [r3]
	ldr	r0, [r5]
	bl	niudbg
	mov	r0, r6
	bl	niu_stop_tx_channels
	mov	r0, r6
	bl	niu_reset_tx_channels
	mov	r0, r4
	pop	{r4, r5, r6, r7, r8, pc}
.L14:
	ldr	r3, [r6, #4]
	ldr	r1, .L16+20
	ldr	r2, [r3]
	ldr	r0, [r5]
	bl	niudbg
	mov	r0, r6
	bl	niu_init_classifier_hw
	subs	r4, r0, #0
	beq	.L15
.L6:
	ldr	r3, [r6, #4]
	ldr	r1, .L16+24
	ldr	r2, [r3]
	ldr	r0, [r5]
	bl	niudbg
	mov	r0, r6
	bl	niu_stop_rx_channels
	mov	r0, r6
	bl	niu_reset_rx_channels
	b	.L5
.L15:
	ldr	r3, [r6, #4]
	ldr	r1, .L16+28
	ldr	r2, [r3]
	ldr	r0, [r5]
	bl	niudbg
	mov	r0, r6
	bl	niu_init_zcp
	subs	r4, r0, #0
	bne	.L6
	ldr	r3, [r6, #4]
	ldr	r1, .L16+32
	ldr	r2, [r3]
	ldr	r0, [r5]
	bl	niudbg
	mov	r0, r6
	bl	niu_init_ipp
	subs	r4, r0, #0
	bne	.L6
	ldr	r3, [r6, #4]
	ldr	r1, .L16+36
	ldr	r2, [r3]
	ldr	r0, [r5]
	bl	niudbg
	mov	r0, r6
	bl	niu_init_mac
	subs	r4, r0, #0
	beq	.L1
	ldr	r3, [r6, #4]
	ldr	r1, .L16+40
	ldr	r2, [r3]
	ldr	r0, [r5]
	bl	niudbg
	mov	r0, r6
	bl	niu_disable_ipp
	b	.L6
.L17:
	.align	2
.L16:
	.word	IFUP
	.word	.LC0
	.word	.LC1
	.word	.LC2
	.word	.LC9
	.word	.LC3
	.word	.LC8
	.word	.LC4
	.word	.LC5
	.word	.LC6
	.word	.LC7
	.size	niu_init_hw, .-niu_init_hw
	.comm	IFUP,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
