	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function niu_init_hw
_niu_init_hw:                           ## @niu_init_hw
	.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, %r14
	movq	_ifup@GOTPCREL(%rip), %r15
	movl	(%r15), %esi
	movq	_KERN_DEBUG@GOTPCREL(%rip), %rbx
	movl	(%rbx), %edx
	movl	4(%rdi), %ecx
	leaq	L_.str(%rip), %r8
	callq	_netif_printk
	movq	%r14, %rdi
	movl	$1, %esi
	callq	_niu_txc_enable_port
	movq	%r14, %rdi
	movl	$1, %esi
	callq	_niu_txc_port_dma_enable
	movq	%r14, %rdi
	xorl	%esi, %esi
	callq	_niu_txc_set_imask
	movq	%r15, %r12
	movl	(%r15), %esi
	movl	(%rbx), %edx
	movl	4(%r14), %ecx
	leaq	L_.str.1(%rip), %r8
	movq	%r14, %rdi
	callq	_netif_printk
	cmpl	$0, (%r14)
	jle	LBB0_5
## %bb.1:
	xorl	%ebx, %ebx
	xorl	%r15d, %r15d
	.p2align	4, 0x90
LBB0_3:                                 ## =>This Inner Loop Header: Depth=1
	movq	8(%r14), %rsi
	addq	%rbx, %rsi
	movq	%r14, %rdi
	callq	_niu_init_one_tx_channel
	testl	%eax, %eax
	jne	LBB0_4
## %bb.2:                               ##   in Loop: Header=BB0_3 Depth=1
	incq	%r15
	movslq	(%r14), %rax
	addq	$4, %rbx
	cmpq	%rax, %r15
	jl	LBB0_3
LBB0_5:
	movl	(%r12), %esi
	movq	_KERN_DEBUG@GOTPCREL(%rip), %r15
	movl	(%r15), %edx
	movl	4(%r14), %ecx
	leaq	L_.str.2(%rip), %r8
	movq	%r14, %rdi
	callq	_netif_printk
	movq	%r14, %rdi
	callq	_niu_init_rx_channels
	movl	%eax, %r13d
	testl	%eax, %eax
	jne	LBB0_13
## %bb.6:
	movl	(%r12), %esi
	movl	(%r15), %edx
	movl	4(%r14), %ecx
	leaq	L_.str.3(%rip), %r8
	movq	%r14, %rdi
	callq	_netif_printk
	movq	%r14, %rdi
	callq	_niu_init_classifier_hw
	movl	%eax, %r13d
	testl	%eax, %eax
	jne	LBB0_12
## %bb.7:
	movl	(%r12), %esi
	movl	(%r15), %edx
	movl	4(%r14), %ecx
	leaq	L_.str.4(%rip), %r8
	movq	%r14, %rdi
	callq	_netif_printk
	movq	%r14, %rdi
	callq	_niu_init_zcp
	movl	%eax, %r13d
	testl	%eax, %eax
	jne	LBB0_12
## %bb.8:
	movl	(%r12), %esi
	movl	(%r15), %edx
	movl	4(%r14), %ecx
	leaq	L_.str.5(%rip), %r8
	movq	%r14, %rdi
	callq	_netif_printk
	movq	%r14, %rdi
	callq	_niu_init_ipp
	movl	%eax, %r13d
	testl	%eax, %eax
	jne	LBB0_12
## %bb.9:
	movl	(%r12), %esi
	movl	(%r15), %edx
	movl	4(%r14), %ecx
	leaq	L_.str.6(%rip), %r8
	movq	%r14, %rdi
	callq	_netif_printk
	movq	%r14, %rdi
	callq	_niu_init_mac
	testl	%eax, %eax
	je	LBB0_10
## %bb.11:
	movl	%eax, %r13d
	movl	(%r12), %esi
	movl	(%r15), %edx
	movl	4(%r14), %ecx
	leaq	L_.str.7(%rip), %r8
	movq	%r14, %rdi
	callq	_netif_printk
	movq	%r14, %rdi
	callq	_niu_disable_ipp
LBB0_12:
	movl	(%r12), %esi
	movl	(%r15), %edx
	movl	4(%r14), %ecx
	leaq	L_.str.8(%rip), %r8
	movq	%r14, %rdi
	callq	_netif_printk
	movq	%r14, %rdi
	callq	_niu_stop_rx_channels
	movq	%r14, %rdi
	callq	_niu_reset_rx_channels
LBB0_13:
	movl	(%r12), %esi
	movl	(%r15), %edx
	movl	4(%r14), %ecx
	leaq	L_.str.9(%rip), %r8
	movq	%r14, %rdi
	callq	_netif_printk
	movq	%r14, %rdi
	callq	_niu_stop_tx_channels
	movq	%r14, %rdi
	callq	_niu_reset_tx_channels
	jmp	LBB0_14
LBB0_4:
	movl	%eax, %r13d
LBB0_14:
	movl	%r13d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_10:
	xorl	%r13d, %r13d
	jmp	LBB0_14
	.cfi_endproc
                                        ## -- End function
	.comm	_ifup,4,2                       ## @ifup
	.comm	_KERN_DEBUG,4,2                 ## @KERN_DEBUG
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Initialize TXC\n"

L_.str.1:                               ## @.str.1
	.asciz	"Initialize TX channels\n"

L_.str.2:                               ## @.str.2
	.asciz	"Initialize RX channels\n"

L_.str.3:                               ## @.str.3
	.asciz	"Initialize classifier\n"

L_.str.4:                               ## @.str.4
	.asciz	"Initialize ZCP\n"

L_.str.5:                               ## @.str.5
	.asciz	"Initialize IPP\n"

L_.str.6:                               ## @.str.6
	.asciz	"Initialize MAC\n"

L_.str.7:                               ## @.str.7
	.asciz	"Uninit IPP\n"

L_.str.8:                               ## @.str.8
	.asciz	"Uninit RX channels\n"

L_.str.9:                               ## @.str.9
	.asciz	"Uninit TX channels\n"

	.no_dead_strip	_niu_init_hw
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function niu_init_hw
_niu_init_hw:                           ; @niu_init_hw
	.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, x0
Lloh0:
	adrp	x21, _ifup@GOTPAGE
Lloh1:
	ldr	x21, [x21, _ifup@GOTPAGEOFF]
	ldr	w1, [x21]
Lloh2:
	adrp	x22, _KERN_DEBUG@GOTPAGE
Lloh3:
	ldr	x22, [x22, _KERN_DEBUG@GOTPAGEOFF]
	ldr	w2, [x22]
	ldr	w3, [x0, #4]
Lloh4:
	adrp	x4, l_.str@PAGE
Lloh5:
	add	x4, x4, l_.str@PAGEOFF
	bl	_netif_printk
	mov	x0, x19
	mov	w1, #1
	bl	_niu_txc_enable_port
	mov	x0, x19
	mov	w1, #1
	bl	_niu_txc_port_dma_enable
	mov	x0, x19
	mov	w1, #0
	bl	_niu_txc_set_imask
	ldr	w1, [x21]
	ldr	w2, [x22]
	ldr	w3, [x19, #4]
Lloh6:
	adrp	x4, l_.str.1@PAGE
Lloh7:
	add	x4, x4, l_.str.1@PAGEOFF
	mov	x0, x19
	bl	_netif_printk
	ldr	w8, [x19]
	cmp	w8, #1
	b.lt	LBB0_4
; %bb.1:
	mov	x23, #0
	mov	x24, #0
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x19, #8]
	add	x1, x8, x23
	mov	x0, x19
	bl	_niu_init_one_tx_channel
	cbnz	w0, LBB0_12
; %bb.3:                                ;   in Loop: Header=BB0_2 Depth=1
	add	x24, x24, #1
	ldrsw	x8, [x19]
	add	x23, x23, #4
	cmp	x24, x8
	b.lt	LBB0_2
LBB0_4:
	ldr	w1, [x21]
	ldr	w2, [x22]
	ldr	w3, [x19, #4]
Lloh8:
	adrp	x4, l_.str.2@PAGE
Lloh9:
	add	x4, x4, l_.str.2@PAGEOFF
	mov	x0, x19
	bl	_netif_printk
	mov	x0, x19
	bl	_niu_init_rx_channels
	mov	x20, x0
	cbnz	w0, LBB0_11
; %bb.5:
	ldr	w1, [x21]
	ldr	w2, [x22]
	ldr	w3, [x19, #4]
Lloh10:
	adrp	x4, l_.str.3@PAGE
Lloh11:
	add	x4, x4, l_.str.3@PAGEOFF
	mov	x0, x19
	bl	_netif_printk
	mov	x0, x19
	bl	_niu_init_classifier_hw
	mov	x20, x0
	cbnz	w0, LBB0_10
; %bb.6:
	ldr	w1, [x21]
	ldr	w2, [x22]
	ldr	w3, [x19, #4]
Lloh12:
	adrp	x4, l_.str.4@PAGE
Lloh13:
	add	x4, x4, l_.str.4@PAGEOFF
	mov	x0, x19
	bl	_netif_printk
	mov	x0, x19
	bl	_niu_init_zcp
	mov	x20, x0
	cbnz	w0, LBB0_10
; %bb.7:
	ldr	w1, [x21]
	ldr	w2, [x22]
	ldr	w3, [x19, #4]
Lloh14:
	adrp	x4, l_.str.5@PAGE
Lloh15:
	add	x4, x4, l_.str.5@PAGEOFF
	mov	x0, x19
	bl	_netif_printk
	mov	x0, x19
	bl	_niu_init_ipp
	mov	x20, x0
	cbnz	w0, LBB0_10
; %bb.8:
	ldr	w1, [x21]
	ldr	w2, [x22]
	ldr	w3, [x19, #4]
Lloh16:
	adrp	x4, l_.str.6@PAGE
Lloh17:
	add	x4, x4, l_.str.6@PAGEOFF
	mov	x0, x19
	bl	_netif_printk
	mov	x0, x19
	bl	_niu_init_mac
	mov	x20, x0
	cbz	w0, LBB0_13
; %bb.9:
	ldr	w1, [x21]
	ldr	w2, [x22]
	ldr	w3, [x19, #4]
Lloh18:
	adrp	x4, l_.str.7@PAGE
Lloh19:
	add	x4, x4, l_.str.7@PAGEOFF
	mov	x0, x19
	bl	_netif_printk
	mov	x0, x19
	bl	_niu_disable_ipp
LBB0_10:
	ldr	w1, [x21]
	ldr	w2, [x22]
	ldr	w3, [x19, #4]
Lloh20:
	adrp	x4, l_.str.8@PAGE
Lloh21:
	add	x4, x4, l_.str.8@PAGEOFF
	mov	x0, x19
	bl	_netif_printk
	mov	x0, x19
	bl	_niu_stop_rx_channels
	mov	x0, x19
	bl	_niu_reset_rx_channels
LBB0_11:
	ldr	w1, [x21]
	ldr	w2, [x22]
	ldr	w3, [x19, #4]
Lloh22:
	adrp	x4, l_.str.9@PAGE
Lloh23:
	add	x4, x4, l_.str.9@PAGEOFF
	mov	x0, x19
	bl	_netif_printk
	mov	x0, x19
	bl	_niu_stop_tx_channels
	mov	x0, x19
	bl	_niu_reset_tx_channels
	b	LBB0_13
LBB0_12:
	mov	x20, x0
LBB0_13:
	mov	x0, x20
	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 AdrpAdd	Lloh6, Lloh7
	.loh AdrpAdd	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpAdd	Lloh10, Lloh11
	.loh AdrpAdd	Lloh12, Lloh13
	.loh AdrpAdd	Lloh14, Lloh15
	.loh AdrpAdd	Lloh16, Lloh17
	.loh AdrpAdd	Lloh18, Lloh19
	.loh AdrpAdd	Lloh20, Lloh21
	.loh AdrpAdd	Lloh22, Lloh23
	.cfi_endproc
                                        ; -- End function
	.comm	_ifup,4,2                       ; @ifup
	.comm	_KERN_DEBUG,4,2                 ; @KERN_DEBUG
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Initialize TXC\n"

l_.str.1:                               ; @.str.1
	.asciz	"Initialize TX channels\n"

l_.str.2:                               ; @.str.2
	.asciz	"Initialize RX channels\n"

l_.str.3:                               ; @.str.3
	.asciz	"Initialize classifier\n"

l_.str.4:                               ; @.str.4
	.asciz	"Initialize ZCP\n"

l_.str.5:                               ; @.str.5
	.asciz	"Initialize IPP\n"

l_.str.6:                               ; @.str.6
	.asciz	"Initialize MAC\n"

l_.str.7:                               ; @.str.7
	.asciz	"Uninit IPP\n"

l_.str.8:                               ; @.str.8
	.asciz	"Uninit RX channels\n"

l_.str.9:                               ; @.str.9
	.asciz	"Uninit TX channels\n"

	.no_dead_strip	_niu_init_hw
.subsections_via_symbols
