	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function niu_open
_niu_open:                              ## @niu_open
	.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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r15
	callq	_netdev_priv
	movq	%rax, %r14
	movq	%r15, %rdi
	callq	_netif_carrier_off
	movq	%r14, %rdi
	callq	_niu_alloc_channels
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_11
## %bb.1:
	movq	%r14, %rdi
	xorl	%esi, %esi
	callq	_niu_enable_interrupts
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_7
## %bb.2:
	movq	%r14, %rdi
	callq	_niu_request_irq
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_7
## %bb.3:
	movq	%r14, %rdi
	callq	_niu_enable_napi
	movq	%r14, %r12
	addq	$16, %r12
	movq	%r12, %rdi
	callq	_spin_lock_irq
	movq	%r14, %rdi
	callq	_niu_init_hw
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_6
## %bb.4:
	movq	_niu_timer@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r14, %rdi
	xorl	%edx, %edx
	callq	_timer_setup
	movq	_jiffies@GOTPCREL(%rip), %rax
	movq	_HZ@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	addq	(%rax), %rcx
	movq	%rcx, (%r14)
	movq	%r14, %rdi
	movl	$1, %esi
	callq	_niu_enable_interrupts
	testl	%eax, %eax
	je	LBB0_8
## %bb.5:
	movl	%eax, %ebx
	movq	%r14, %rdi
	callq	_niu_stop_hw
LBB0_6:
	movq	%r12, %rdi
	callq	_spin_unlock_irq
	movq	%r14, %rdi
	callq	_niu_disable_napi
	movq	%r14, %rdi
	callq	_niu_free_irq
LBB0_7:
	movq	%r14, %rdi
	callq	_niu_free_channels
LBB0_11:
	movl	%ebx, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_8:
	movq	%r12, %rdi
	callq	_spin_unlock_irq
	movq	%r15, %rdi
	callq	_netif_tx_start_all_queues
	movq	8(%r14), %rax
	movq	_LOOPBACK_DISABLED@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	je	LBB0_10
## %bb.9:
	movq	%r15, %rdi
	callq	_netif_carrier_on
LBB0_10:
	movq	%r14, %rdi
	callq	_add_timer
	xorl	%ebx, %ebx
	jmp	LBB0_11
	.cfi_endproc
                                        ## -- End function
	.comm	_niu_timer,4,2                  ## @niu_timer
	.comm	_jiffies,8,3                    ## @jiffies
	.comm	_HZ,8,3                         ## @HZ
	.comm	_LOOPBACK_DISABLED,8,3          ## @LOOPBACK_DISABLED
	.no_dead_strip	_niu_open
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function niu_open
_niu_open:                              ; @niu_open
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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
	mov	x20, x0
	bl	_netdev_priv
	mov	x19, x0
	mov	x0, x20
	bl	_netif_carrier_off
	mov	x0, x19
	bl	_niu_alloc_channels
	mov	x21, x0
	cbnz	w0, LBB0_8
; %bb.1:
	mov	x0, x19
	mov	w1, #0
	bl	_niu_enable_interrupts
	mov	x21, x0
	cbnz	w0, LBB0_7
; %bb.2:
	mov	x0, x19
	bl	_niu_request_irq
	mov	x21, x0
	cbnz	w0, LBB0_7
; %bb.3:
	mov	x0, x19
	bl	_niu_enable_napi
	add	x22, x19, #16
	mov	x0, x22
	bl	_spin_lock_irq
	mov	x0, x19
	bl	_niu_init_hw
	mov	x21, x0
	cbnz	w0, LBB0_6
; %bb.4:
Lloh0:
	adrp	x8, _niu_timer@GOTPAGE
Lloh1:
	ldr	x8, [x8, _niu_timer@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	mov	x0, x19
	mov	w2, #0
	bl	_timer_setup
Lloh3:
	adrp	x8, _jiffies@GOTPAGE
Lloh4:
	ldr	x8, [x8, _jiffies@GOTPAGEOFF]
Lloh5:
	ldr	x8, [x8]
Lloh6:
	adrp	x9, _HZ@GOTPAGE
Lloh7:
	ldr	x9, [x9, _HZ@GOTPAGEOFF]
Lloh8:
	ldr	x9, [x9]
	add	x8, x9, x8
	str	x8, [x19]
	mov	x0, x19
	mov	w1, #1
	bl	_niu_enable_interrupts
	cbz	w0, LBB0_9
; %bb.5:
	mov	x21, x0
	mov	x0, x19
	bl	_niu_stop_hw
LBB0_6:
	mov	x0, x22
	bl	_spin_unlock_irq
	mov	x0, x19
	bl	_niu_disable_napi
	mov	x0, x19
	bl	_niu_free_irq
LBB0_7:
	mov	x0, x19
	bl	_niu_free_channels
LBB0_8:
	mov	x0, x21
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
LBB0_9:
	mov	x0, x22
	bl	_spin_unlock_irq
	mov	x0, x20
	bl	_netif_tx_start_all_queues
	ldr	x8, [x19, #8]
Lloh9:
	adrp	x9, _LOOPBACK_DISABLED@GOTPAGE
Lloh10:
	ldr	x9, [x9, _LOOPBACK_DISABLED@GOTPAGEOFF]
Lloh11:
	ldr	x9, [x9]
	cmp	x8, x9
	b.eq	LBB0_11
; %bb.10:
	mov	x0, x20
	bl	_netif_carrier_on
LBB0_11:
	mov	x0, x19
	bl	_add_timer
	mov	w21, #0
	b	LBB0_8
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.cfi_endproc
                                        ; -- End function
	.comm	_niu_timer,4,2                  ; @niu_timer
	.comm	_jiffies,8,3                    ; @jiffies
	.comm	_HZ,8,3                         ; @HZ
	.comm	_LOOPBACK_DISABLED,8,3          ; @LOOPBACK_DISABLED
	.no_dead_strip	_niu_open
.subsections_via_symbols
