	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function atl2_open
_atl2_open:                             ## @atl2_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, %r12
	callq	_netdev_priv
	movq	%rax, %r14
	movq	___ATL2_TESTING@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	8(%r14), %r15
	movq	%r15, %rsi
	callq	_test_bit
	testq	%rax, %rax
	je	LBB0_2
## %bb.1:
	movq	_EBUSY@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
	jmp	LBB0_9
LBB0_2:
	movq	%r14, %rdi
	callq	_atl2_setup_ring_resources
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_9
## %bb.3:
	movq	%r14, %rdi
	callq	_atl2_init_hw
	testl	%eax, %eax
	jne	LBB0_4
## %bb.6:
	movq	%r12, %rdi
	callq	_atl2_set_multi
	movq	%r14, %rdi
	callq	_init_ring_ptrs
	movq	%r14, %rdi
	callq	_atl2_restore_vlan
	movq	%r14, %rdi
	callq	_atl2_configure
	testq	%rax, %rax
	je	LBB0_7
LBB0_4:
	movq	_EIO@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
LBB0_5:
	movq	%r14, %rdi
	callq	_atl2_free_ring_resources
	movq	%r14, %rdi
	callq	_atl2_reset_hw
LBB0_9:
	movl	%ebx, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_7:
	movq	%r14, %rdi
	callq	_atl2_request_irq
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_5
## %bb.8:
	movq	___ATL2_DOWN@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	%r15, %rsi
	callq	_clear_bit
	movq	%r14, %rbx
	addq	$4, %rbx
	movq	_jiffies@GOTPCREL(%rip), %rax
	movq	_HZ@GOTPCREL(%rip), %rcx
	movslq	(%rcx), %rdi
	shlq	$2, %rdi
	addq	(%rax), %rdi
	callq	_round_jiffies
	movq	%rbx, %rdi
	movl	%eax, %esi
	callq	_mod_timer
	movq	_REG_MASTER_CTRL@GOTPCREL(%rip), %rbx
	movl	(%rbx), %esi
	movq	%r14, %rdi
	callq	_ATL2_READ_REG
	movl	(%rbx), %esi
	movq	_MASTER_CTRL_MANUAL_INT@GOTPCREL(%rip), %rcx
	orl	(%rcx), %eax
	movq	%r14, %rdi
	movl	%eax, %edx
	callq	_ATL2_WRITE_REG
	movq	%r14, %rdi
	callq	_atl2_irq_enable
	xorl	%ebx, %ebx
	jmp	LBB0_9
	.cfi_endproc
                                        ## -- End function
	.comm	___ATL2_TESTING,4,2             ## @__ATL2_TESTING
	.comm	_EBUSY,4,2                      ## @EBUSY
	.comm	_EIO,4,2                        ## @EIO
	.comm	___ATL2_DOWN,4,2                ## @__ATL2_DOWN
	.comm	_jiffies,8,3                    ## @jiffies
	.comm	_HZ,4,2                         ## @HZ
	.comm	_REG_MASTER_CTRL,4,2            ## @REG_MASTER_CTRL
	.comm	_MASTER_CTRL_MANUAL_INT,4,2     ## @MASTER_CTRL_MANUAL_INT
	.no_dead_strip	_atl2_open
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function atl2_open
_atl2_open:                             ; @atl2_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	x21, x0
	bl	_netdev_priv
	mov	x19, x0
Lloh0:
	adrp	x8, ___ATL2_TESTING@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___ATL2_TESTING@GOTPAGEOFF]
Lloh2:
	ldr	w0, [x8]
	add	x20, x19, #8
	mov	x1, x20
	bl	_test_bit
	cbz	x0, LBB0_2
; %bb.1:
Lloh3:
	adrp	x8, _EBUSY@GOTPAGE
Lloh4:
	ldr	x8, [x8, _EBUSY@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	neg	w22, w8
	b	LBB0_7
LBB0_2:
	mov	x0, x19
	bl	_atl2_setup_ring_resources
	mov	x22, x0
	cbnz	w0, LBB0_7
; %bb.3:
	mov	x0, x19
	bl	_atl2_init_hw
	cbnz	w0, LBB0_5
; %bb.4:
	mov	x0, x21
	bl	_atl2_set_multi
	mov	x0, x19
	bl	_init_ring_ptrs
	mov	x0, x19
	bl	_atl2_restore_vlan
	mov	x0, x19
	bl	_atl2_configure
	cbz	x0, LBB0_8
LBB0_5:
Lloh6:
	adrp	x8, _EIO@GOTPAGE
Lloh7:
	ldr	x8, [x8, _EIO@GOTPAGEOFF]
Lloh8:
	ldr	w8, [x8]
	neg	w22, w8
LBB0_6:
	mov	x0, x19
	bl	_atl2_free_ring_resources
	mov	x0, x19
	bl	_atl2_reset_hw
LBB0_7:
	mov	x0, x22
	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_8:
	mov	x0, x19
	bl	_atl2_request_irq
	mov	x22, x0
	cbnz	w0, LBB0_6
; %bb.9:
Lloh9:
	adrp	x8, ___ATL2_DOWN@GOTPAGE
Lloh10:
	ldr	x8, [x8, ___ATL2_DOWN@GOTPAGEOFF]
Lloh11:
	ldr	w0, [x8]
	mov	x1, x20
	bl	_clear_bit
Lloh12:
	adrp	x8, _jiffies@GOTPAGE
Lloh13:
	ldr	x8, [x8, _jiffies@GOTPAGEOFF]
	add	x20, x19, #4
Lloh14:
	ldr	x8, [x8]
Lloh15:
	adrp	x9, _HZ@GOTPAGE
Lloh16:
	ldr	x9, [x9, _HZ@GOTPAGEOFF]
Lloh17:
	ldrsw	x9, [x9]
	add	x0, x8, x9, lsl #2
	bl	_round_jiffies
	mov	x1, x0
	mov	x0, x20
	bl	_mod_timer
Lloh18:
	adrp	x20, _REG_MASTER_CTRL@GOTPAGE
Lloh19:
	ldr	x20, [x20, _REG_MASTER_CTRL@GOTPAGEOFF]
	ldr	w1, [x20]
	mov	x0, x19
	bl	_ATL2_READ_REG
	ldr	w1, [x20]
Lloh20:
	adrp	x8, _MASTER_CTRL_MANUAL_INT@GOTPAGE
Lloh21:
	ldr	x8, [x8, _MASTER_CTRL_MANUAL_INT@GOTPAGEOFF]
Lloh22:
	ldr	w8, [x8]
	orr	w2, w8, w0
	mov	x0, x19
	bl	_ATL2_WRITE_REG
	mov	x0, x19
	bl	_atl2_irq_enable
	b	LBB0_7
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpLdrGot	Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.cfi_endproc
                                        ; -- End function
	.comm	___ATL2_TESTING,4,2             ; @__ATL2_TESTING
	.comm	_EBUSY,4,2                      ; @EBUSY
	.comm	_EIO,4,2                        ; @EIO
	.comm	___ATL2_DOWN,4,2                ; @__ATL2_DOWN
	.comm	_jiffies,8,3                    ; @jiffies
	.comm	_HZ,4,2                         ; @HZ
	.comm	_REG_MASTER_CTRL,4,2            ; @REG_MASTER_CTRL
	.comm	_MASTER_CTRL_MANUAL_INT,4,2     ; @MASTER_CTRL_MANUAL_INT
	.no_dead_strip	_atl2_open
.subsections_via_symbols
