	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function niu_alloc_and_init
_niu_alloc_and_init:                    ## @niu_alloc_and_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	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%r8d, %r15d
	movq	%rcx, -56(%rbp)                 ## 8-byte Spill
	movq	%rdx, %r12
	movq	%rsi, %r14
	movq	%rdi, %r13
	movq	_NIU_NUM_TXCHAN@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	$56, %edi
	callq	_alloc_etherdev_mq
	movq	%rax, %rbx
	testq	%rax, %rax
	je	LBB0_2
## %bb.1:
	movq	%rbx, %rdi
	movq	%r13, %rsi
	callq	_SET_NETDEV_DEV
	movq	%rbx, %rdi
	callq	_netdev_priv
	movl	%r15d, -44(%rbp)                ## 4-byte Spill
	movq	%rax, %r15
	movq	%rbx, 48(%rax)
	movq	%r14, 40(%rax)
	movq	%r12, 32(%rax)
	movq	%r13, 24(%rax)
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	movq	%rax, 16(%r15)
	movq	_niu_debug@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 12(%r15)
	leaq	8(%r15), %rdi
	callq	_spin_lock_init
	leaq	4(%r15), %rdi
	movq	_niu_reset_task@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_INIT_WORK
	movl	-44(%rbp), %eax                 ## 4-byte Reload
	movl	%eax, (%r15)
LBB0_2:
	movq	%rbx, %rax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_NIU_NUM_TXCHAN,4,2             ## @NIU_NUM_TXCHAN
	.comm	_niu_debug,4,2                  ## @niu_debug
	.comm	_niu_reset_task,4,2             ## @niu_reset_task
	.no_dead_strip	_niu_alloc_and_init
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function niu_alloc_and_init
_niu_alloc_and_init:                    ; @niu_alloc_and_init
	.cfi_startproc
; %bb.0:
	stp	x26, x25, [sp, #-80]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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
	mov	x19, x4
	mov	x21, x3
	mov	x22, x2
	mov	x24, x1
	mov	x23, x0
Lloh0:
	adrp	x8, _NIU_NUM_TXCHAN@GOTPAGE
Lloh1:
	ldr	x8, [x8, _NIU_NUM_TXCHAN@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	mov	w0, #56
	bl	_alloc_etherdev_mq
	mov	x20, x0
	cbz	x0, LBB0_2
; %bb.1:
	mov	x0, x20
	mov	x1, x23
	bl	_SET_NETDEV_DEV
	mov	x0, x20
	bl	_netdev_priv
	mov	x25, x0
	stp	x24, x20, [x0, #40]
	stp	x23, x22, [x0, #24]
	str	x21, [x0, #16]
Lloh3:
	adrp	x8, _niu_debug@GOTPAGE
Lloh4:
	ldr	x8, [x8, _niu_debug@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	str	w8, [x0, #12]
	add	x0, x0, #8
	bl	_spin_lock_init
	add	x0, x25, #4
Lloh6:
	adrp	x8, _niu_reset_task@GOTPAGE
Lloh7:
	ldr	x8, [x8, _niu_reset_task@GOTPAGEOFF]
Lloh8:
	ldr	w1, [x8]
	bl	_INIT_WORK
	str	w19, [x25]
LBB0_2:
	mov	x0, x20
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.cfi_endproc
                                        ; -- End function
	.comm	_NIU_NUM_TXCHAN,4,2             ; @NIU_NUM_TXCHAN
	.comm	_niu_debug,4,2                  ; @niu_debug
	.comm	_niu_reset_task,4,2             ; @niu_reset_task
	.no_dead_strip	_niu_alloc_and_init
.subsections_via_symbols
