	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function lance_open
_lance_open:                            ## @lance_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
	movq	16(%rdi), %r12
	callq	_netdev_priv
	movq	%rax, %r14
	movq	16(%rax), %rbx
	leaq	4(%rbx), %rdi
	movq	_LE_CSR0@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_writereg
	movq	_LE_C0_STOP@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	callq	_writereg
	movq	_mode@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	8(%r14), %edx
	movq	%r12, %rdi
	callq	_lib_ptr
	movq	$0, (%rax)
	movq	_filter@GOTPCREL(%rip), %rbx
	movq	(%rbx), %rax
	movl	(%rax), %esi
	movl	8(%r14), %edx
	movq	%r12, %rdi
	callq	_lib_ptr
	movq	$0, (%rax)
	movq	(%rbx), %rax
	movl	4(%rax), %esi
	movl	8(%r14), %edx
	movq	%r12, %rdi
	callq	_lib_ptr
	movq	$0, (%rax)
	movq	(%rbx), %rax
	movl	8(%rax), %esi
	movl	8(%r14), %edx
	movq	%r12, %rdi
	callq	_lib_ptr
	movq	$0, (%rax)
	movq	(%rbx), %rax
	movl	12(%rax), %esi
	movl	8(%r14), %edx
	movq	%r12, %rdi
	callq	_lib_ptr
	movq	$0, (%rax)
	movq	%r15, %rdi
	callq	_lance_init_ring
	movq	%r14, %rdi
	callq	_load_csrs
	movq	%r15, %rdi
	callq	_netif_start_queue
	movq	(%r15), %rdi
	movq	_lance_interrupt@GOTPCREL(%rip), %rsi
	leaq	L_.str(%rip), %rcx
	xorl	%ebx, %ebx
	xorl	%edx, %edx
	movq	%r15, %r8
	callq	_request_irq
	testq	%rax, %rax
	je	LBB0_3
## %bb.1:
	movl	8(%r15), %esi
	movq	(%r15), %rdx
	leaq	L_.str.1(%rip), %rdi
LBB0_2:
	callq	_printk
	movq	_EAGAIN@GOTPCREL(%rip), %rax
	subl	(%rax), %ebx
	movl	%ebx, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_3:
	movq	(%r14), %rdi
	testq	%rdi, %rdi
	js	LBB0_6
## %bb.4:
	movq	_lance_dma_merr_int@GOTPCREL(%rip), %rsi
	leaq	L_.str.2(%rip), %rcx
	xorl	%ebx, %ebx
	xorl	%edx, %edx
	movq	%r15, %r8
	callq	_request_irq
	testq	%rax, %rax
	je	LBB0_5
## %bb.7:
	movq	(%r15), %rdi
	movq	%r15, %rsi
	callq	_free_irq
	movl	8(%r15), %esi
	movq	(%r14), %rdx
	leaq	L_.str.3(%rip), %rdi
	jmp	LBB0_2
LBB0_5:
	movq	_ioasic_ssr_lock@GOTPCREL(%rip), %r15
	movq	%r15, %rdi
	callq	_spin_lock_irqsave
	xorl	%eax, %eax
	callq	_fast_mb
	movq	_IO_REG_SSR@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	movl	%ebx, %edi
	callq	_ioasic_read
	movq	_IO_SSR_LANCE_DMA_EN@GOTPCREL(%rip), %rcx
	orl	(%rcx), %eax
	movl	%ebx, %edi
	movl	%eax, %esi
	callq	_ioasic_write
	xorl	%eax, %eax
	callq	_fast_mb
	movq	%r15, %rdi
	callq	_spin_unlock_irqrestore
LBB0_6:
	movq	%r14, %rdi
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_init_restart_lance             ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_LE_CSR0,4,2                    ## @LE_CSR0
	.comm	_LE_C0_STOP,4,2                 ## @LE_C0_STOP
	.comm	_mode,4,2                       ## @mode
	.comm	_filter,8,3                     ## @filter
	.comm	_lance_interrupt,4,2            ## @lance_interrupt
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"lance"

L_.str.1:                               ## @.str.1
	.asciz	"%s: Can't get IRQ %d\n"

	.comm	_EAGAIN,4,2                     ## @EAGAIN
	.comm	_lance_dma_merr_int,4,2         ## @lance_dma_merr_int
L_.str.2:                               ## @.str.2
	.asciz	"lance error"

L_.str.3:                               ## @.str.3
	.asciz	"%s: Can't get DMA IRQ %d\n"

	.comm	_ioasic_ssr_lock,4,2            ## @ioasic_ssr_lock
	.comm	_IO_REG_SSR,4,2                 ## @IO_REG_SSR
	.comm	_IO_SSR_LANCE_DMA_EN,4,2        ## @IO_SSR_LANCE_DMA_EN
	.no_dead_strip	_lance_open
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function lance_open
_lance_open:                            ; @lance_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
	ldr	x21, [x0, #16]
	bl	_netdev_priv
	mov	x19, x0
	ldr	x22, [x0, #16]
	add	x0, x22, #4
Lloh0:
	adrp	x8, _LE_CSR0@GOTPAGE
Lloh1:
	ldr	x8, [x8, _LE_CSR0@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	bl	_writereg
Lloh3:
	adrp	x8, _LE_C0_STOP@GOTPAGE
Lloh4:
	ldr	x8, [x8, _LE_C0_STOP@GOTPAGEOFF]
Lloh5:
	ldr	w1, [x8]
	mov	x0, x22
	bl	_writereg
Lloh6:
	adrp	x8, _mode@GOTPAGE
Lloh7:
	ldr	x8, [x8, _mode@GOTPAGEOFF]
Lloh8:
	ldr	w1, [x8]
	ldr	w2, [x19, #8]
	mov	x0, x21
	bl	_lib_ptr
	str	xzr, [x0]
Lloh9:
	adrp	x22, _filter@GOTPAGE
Lloh10:
	ldr	x22, [x22, _filter@GOTPAGEOFF]
	ldr	x8, [x22]
	ldr	w1, [x8]
	ldr	w2, [x19, #8]
	mov	x0, x21
	bl	_lib_ptr
	str	xzr, [x0]
	ldr	x8, [x22]
	ldr	w1, [x8, #4]
	ldr	w2, [x19, #8]
	mov	x0, x21
	bl	_lib_ptr
	str	xzr, [x0]
	ldr	x8, [x22]
	ldr	w1, [x8, #8]
	ldr	w2, [x19, #8]
	mov	x0, x21
	bl	_lib_ptr
	str	xzr, [x0]
	ldr	x8, [x22]
	ldr	w1, [x8, #12]
	ldr	w2, [x19, #8]
	mov	x0, x21
	bl	_lib_ptr
	str	xzr, [x0]
	mov	x0, x20
	bl	_lance_init_ring
	mov	x0, x19
	bl	_load_csrs
	mov	x0, x20
	bl	_netif_start_queue
	ldr	x0, [x20]
Lloh11:
	adrp	x1, _lance_interrupt@GOTPAGE
Lloh12:
	ldr	x1, [x1, _lance_interrupt@GOTPAGEOFF]
Lloh13:
	adrp	x3, l_.str@PAGE
Lloh14:
	add	x3, x3, l_.str@PAGEOFF
	mov	w2, #0
	mov	x4, x20
	bl	_request_irq
	cbz	x0, LBB0_3
; %bb.1:
	ldr	w1, [x20, #8]
	ldr	x2, [x20]
Lloh15:
	adrp	x0, l_.str.1@PAGE
Lloh16:
	add	x0, x0, l_.str.1@PAGEOFF
LBB0_2:
	bl	_printk
Lloh17:
	adrp	x8, _EAGAIN@GOTPAGE
Lloh18:
	ldr	x8, [x8, _EAGAIN@GOTPAGEOFF]
Lloh19:
	ldr	w8, [x8]
	neg	w0, w8
	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_3:
	ldr	x0, [x19]
	tbnz	x0, #63, LBB0_7
; %bb.4:
Lloh20:
	adrp	x1, _lance_dma_merr_int@GOTPAGE
Lloh21:
	ldr	x1, [x1, _lance_dma_merr_int@GOTPAGEOFF]
Lloh22:
	adrp	x3, l_.str.2@PAGE
Lloh23:
	add	x3, x3, l_.str.2@PAGEOFF
	mov	w2, #0
	mov	x4, x20
	bl	_request_irq
	cbz	x0, LBB0_6
; %bb.5:
	ldr	x0, [x20]
	mov	x1, x20
	bl	_free_irq
	ldr	w1, [x20, #8]
	ldr	x2, [x19]
Lloh24:
	adrp	x0, l_.str.3@PAGE
Lloh25:
	add	x0, x0, l_.str.3@PAGEOFF
	b	LBB0_2
LBB0_6:
Lloh26:
	adrp	x20, _ioasic_ssr_lock@GOTPAGE
Lloh27:
	ldr	x20, [x20, _ioasic_ssr_lock@GOTPAGEOFF]
	mov	x0, x20
	bl	_spin_lock_irqsave
	bl	_fast_mb
Lloh28:
	adrp	x8, _IO_REG_SSR@GOTPAGE
Lloh29:
	ldr	x8, [x8, _IO_REG_SSR@GOTPAGEOFF]
Lloh30:
	ldr	w21, [x8]
	mov	x0, x21
	bl	_ioasic_read
Lloh31:
	adrp	x8, _IO_SSR_LANCE_DMA_EN@GOTPAGE
Lloh32:
	ldr	x8, [x8, _IO_SSR_LANCE_DMA_EN@GOTPAGEOFF]
Lloh33:
	ldr	w8, [x8]
	orr	w1, w8, w0
	mov	x0, x21
	bl	_ioasic_write
	bl	_fast_mb
	mov	x0, x20
	bl	_spin_unlock_irqrestore
LBB0_7:
	mov	x0, x19
	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
	b	_init_restart_lance
	.loh AdrpAdd	Lloh13, Lloh14
	.loh AdrpLdrGot	Lloh11, Lloh12
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpAdd	Lloh22, Lloh23
	.loh AdrpLdrGot	Lloh20, Lloh21
	.loh AdrpAdd	Lloh24, Lloh25
	.loh AdrpLdrGotLdr	Lloh31, Lloh32, Lloh33
	.loh AdrpLdrGotLdr	Lloh28, Lloh29, Lloh30
	.loh AdrpLdrGot	Lloh26, Lloh27
	.cfi_endproc
                                        ; -- End function
	.comm	_LE_CSR0,4,2                    ; @LE_CSR0
	.comm	_LE_C0_STOP,4,2                 ; @LE_C0_STOP
	.comm	_mode,4,2                       ; @mode
	.comm	_filter,8,3                     ; @filter
	.comm	_lance_interrupt,4,2            ; @lance_interrupt
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"lance"

l_.str.1:                               ; @.str.1
	.asciz	"%s: Can't get IRQ %d\n"

	.comm	_EAGAIN,4,2                     ; @EAGAIN
	.comm	_lance_dma_merr_int,4,2         ; @lance_dma_merr_int
l_.str.2:                               ; @.str.2
	.asciz	"lance error"

l_.str.3:                               ; @.str.3
	.asciz	"%s: Can't get DMA IRQ %d\n"

	.comm	_ioasic_ssr_lock,4,2            ; @ioasic_ssr_lock
	.comm	_IO_REG_SSR,4,2                 ; @IO_REG_SSR
	.comm	_IO_SSR_LANCE_DMA_EN,4,2        ; @IO_SSR_LANCE_DMA_EN
	.no_dead_strip	_lance_open
.subsections_via_symbols
