	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function mac8390_rsrc_init
_mac8390_rsrc_init:                     ## @mac8390_rsrc_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	%r12
	pushq	%rbx
	subq	$16, %rsp
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%edx, %r15d
	movq	%rsi, %rbx
	movq	%rdi, %r14
	movq	(%rsi), %r12
	movl	(%r12), %edi
	callq	_SLOT2IRQ
	movl	%eax, 24(%r14)
	movl	(%r12), %eax
	andl	$15, %eax
	shll	$20, %eax
	orl	4(%r12), %eax
	movl	%eax, (%r14)
	leaq	-48(%rbp), %rsi
	movq	%rbx, %rdi
	callq	_nubus_get_func_dir
	cmpl	$-1, %eax
	je	LBB0_1
## %bb.2:
	movq	_NUBUS_RESID_MAC_ADDRESS@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	-48(%rbp), %rdi
	leaq	-40(%rbp), %rdx
	callq	_nubus_find_rsrc
	cmpl	$-1, %eax
	je	LBB0_3
## %bb.4:
	movq	8(%r14), %rdi
	leaq	-40(%rbp), %rsi
	movl	$6, %edx
	callq	_nubus_get_rsrc_mem
	movq	_useresources@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movl	%r15d, %ecx
	cmpl	$1, (%rax,%rcx,4)
	jne	LBB0_12
## %bb.5:
	leaq	-48(%rbp), %rbx
	movq	%rbx, %rdi
	callq	_nubus_rewinddir
	movq	_NUBUS_RESID_MINOR_BASEOS@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	-40(%rbp), %rdx
	movq	%rbx, %rdi
	callq	_nubus_find_rsrc
	cmpl	$-1, %eax
	je	LBB0_6
## %bb.7:
	leaq	-44(%rbp), %rdi
	leaq	-40(%rbp), %r15
	movq	%r15, %rsi
	movl	$4, %edx
	callq	_nubus_get_rsrc_mem
	movl	(%r14), %eax
	movl	-44(%rbp), %ecx
	leal	(%rcx,%rax), %edx
	movl	%edx, 16(%r14)
	leal	65536(%rcx,%rax), %eax
	movl	%eax, (%r14)
	leaq	-48(%rbp), %rbx
	movq	%rbx, %rdi
	callq	_nubus_rewinddir
	movq	_NUBUS_RESID_MINOR_LENGTH@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	movq	%r15, %rdx
	callq	_nubus_find_rsrc
	cmpl	$-1, %eax
	je	LBB0_8
## %bb.9:
	leaq	-44(%rbp), %rdi
	leaq	-40(%rbp), %rsi
	movl	$4, %edx
	callq	_nubus_get_rsrc_mem
	movl	-44(%rbp), %eax
	jmp	LBB0_10
LBB0_1:
	addq	$8, %r12
	leaq	L_.str(%rip), %rsi
LBB0_20:
	movq	%r12, %rdi
	callq	_dev_err
	jmp	LBB0_21
LBB0_3:
	addq	$8, %r12
	leaq	L_.str.1(%rip), %rsi
	movq	%r12, %rdi
	callq	_dev_info
LBB0_21:
	xorl	%eax, %eax
	jmp	LBB0_22
LBB0_12:
	addl	$-128, %r15d
	cmpl	$3, %r15d
	ja	LBB0_19
## %bb.13:
	leaq	LJTI0_0(%rip), %rax
	movslq	(%rax,%r15,4), %rcx
	addq	%rax, %rcx
	jmpq	*%rcx
LBB0_14:
	movl	4(%r12), %ebx
	movq	_DAYNA_8390_BASE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	addl	%ebx, %eax
	movl	%eax, (%r14)
	movq	_DAYNA_8390_MEM@GOTPCREL(%rip), %rax
	jmp	LBB0_15
LBB0_6:
	addq	$8, %r12
	leaq	L_.str.2(%rip), %rsi
	jmp	LBB0_20
LBB0_8:
	addq	$8, %r12
	leaq	L_.str.3(%rip), %rsi
	movq	%r12, %rdi
	callq	_dev_info
	movl	16(%r14), %edi
	callq	_mac8390_memsize
	movl	%eax, -44(%rbp)
LBB0_10:
	addl	16(%r14), %eax
	jmp	LBB0_11
LBB0_19:
	addq	$8, %r12
	leaq	L_.str.4(%rip), %rsi
	jmp	LBB0_20
LBB0_17:
	movl	4(%r12), %ebx
	movq	_INTERLAN_8390_BASE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	addl	%ebx, %eax
	movl	%eax, (%r14)
	movq	_INTERLAN_8390_MEM@GOTPCREL(%rip), %rax
LBB0_15:
	addl	(%rax), %ebx
	movl	%ebx, 16(%r14)
	jmp	LBB0_16
LBB0_18:
	movslq	4(%r12), %rax
	movq	_CABLETRON_8390_BASE@GOTPCREL(%rip), %rcx
	movslq	(%rcx), %rcx
	leaq	(%rcx,%rax), %rdx
	movl	%edx, (%r14)
	movq	_CABLETRON_8390_MEM@GOTPCREL(%rip), %rdx
	movl	(%rdx), %ebx
	addl	%eax, %ebx
	movl	%ebx, 16(%r14)
	movw	$33, (%rcx,%rax)
LBB0_16:
	movl	%ebx, %edi
	callq	_mac8390_memsize
	addl	%ebx, %eax
LBB0_11:
	movl	%eax, 20(%r14)
	movl	$1, %eax
LBB0_22:
	addq	$16, %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
	.p2align	2, 0x90
	.data_region jt32
.set L0_0_set_14, LBB0_14-LJTI0_0
.set L0_0_set_17, LBB0_17-LJTI0_0
.set L0_0_set_18, LBB0_18-LJTI0_0
LJTI0_0:
	.long	L0_0_set_14
	.long	L0_0_set_17
	.long	L0_0_set_14
	.long	L0_0_set_18
	.end_data_region
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Unable to get Nubus functional directory\n"

	.comm	_NUBUS_RESID_MAC_ADDRESS,4,2    ## @NUBUS_RESID_MAC_ADDRESS
L_.str.1:                               ## @.str.1
	.asciz	"MAC address resource not found\n"

	.comm	_useresources,8,3               ## @useresources
	.comm	_NUBUS_RESID_MINOR_BASEOS,4,2   ## @NUBUS_RESID_MINOR_BASEOS
L_.str.2:                               ## @.str.2
	.asciz	"Memory offset resource not found\n"

	.comm	_NUBUS_RESID_MINOR_LENGTH,4,2   ## @NUBUS_RESID_MINOR_LENGTH
L_.str.3:                               ## @.str.3
	.asciz	"Memory length resource not found, probing\n"

	.comm	_DAYNA_8390_BASE,4,2            ## @DAYNA_8390_BASE
	.comm	_DAYNA_8390_MEM,4,2             ## @DAYNA_8390_MEM
	.comm	_INTERLAN_8390_BASE,4,2         ## @INTERLAN_8390_BASE
	.comm	_INTERLAN_8390_MEM,4,2          ## @INTERLAN_8390_MEM
	.comm	_CABLETRON_8390_BASE,4,2        ## @CABLETRON_8390_BASE
	.comm	_CABLETRON_8390_MEM,4,2         ## @CABLETRON_8390_MEM
L_.str.4:                               ## @.str.4
	.asciz	"No known base address for card type\n"

	.no_dead_strip	_mac8390_rsrc_init
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function mac8390_rsrc_init
_mac8390_rsrc_init:                     ; @mac8390_rsrc_init
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.cfi_def_cfa_offset 80
	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
	mov	x20, x2
	mov	x21, x1
	mov	x19, x0
	ldr	x22, [x1]
	ldr	w0, [x22]
	bl	_SLOT2IRQ
	str	w0, [x19, #24]
	ldp	w9, w8, [x22]
	ubfiz	w9, w9, #20, #4
	orr	w8, w9, w8
	str	w8, [x19]
	add	x1, sp, #24
	mov	x0, x21
	bl	_nubus_get_func_dir
	cmn	w0, #1
	b.eq	LBB0_6
; %bb.1:
Lloh0:
	adrp	x8, _NUBUS_RESID_MAC_ADDRESS@GOTPAGE
Lloh1:
	ldr	x8, [x8, _NUBUS_RESID_MAC_ADDRESS@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	add	x0, sp, #24
	add	x2, sp, #16
	bl	_nubus_find_rsrc
	cmn	w0, #1
	b.eq	LBB0_8
; %bb.2:
	ldr	x0, [x19, #8]
	add	x1, sp, #16
	mov	w2, #6
	bl	_nubus_get_rsrc_mem
Lloh3:
	adrp	x8, _useresources@GOTPAGE
Lloh4:
	ldr	x8, [x8, _useresources@GOTPAGEOFF]
Lloh5:
	ldr	x8, [x8]
	ldr	w8, [x8, w20, uxtw #2]
	cmp	w8, #1
	b.ne	LBB0_10
; %bb.3:
	add	x0, sp, #24
	bl	_nubus_rewinddir
Lloh6:
	adrp	x8, _NUBUS_RESID_MINOR_BASEOS@GOTPAGE
Lloh7:
	ldr	x8, [x8, _NUBUS_RESID_MINOR_BASEOS@GOTPAGEOFF]
Lloh8:
	ldr	w1, [x8]
	add	x0, sp, #24
	add	x2, sp, #16
	bl	_nubus_find_rsrc
	cmn	w0, #1
	b.eq	LBB0_13
; %bb.4:
	add	x0, sp, #12
	add	x1, sp, #16
	mov	w2, #4
	bl	_nubus_get_rsrc_mem
	ldr	w8, [x19]
	ldr	w9, [sp, #12]
	add	w8, w9, w8
	str	w8, [x19, #16]
	add	w8, w8, #16, lsl #12            ; =65536
	str	w8, [x19]
	add	x0, sp, #24
	bl	_nubus_rewinddir
Lloh9:
	adrp	x8, _NUBUS_RESID_MINOR_LENGTH@GOTPAGE
Lloh10:
	ldr	x8, [x8, _NUBUS_RESID_MINOR_LENGTH@GOTPAGEOFF]
Lloh11:
	ldr	w1, [x8]
	add	x0, sp, #24
	add	x2, sp, #16
	bl	_nubus_find_rsrc
	cmn	w0, #1
	b.eq	LBB0_14
; %bb.5:
	add	x0, sp, #12
	add	x1, sp, #16
	mov	w2, #4
	bl	_nubus_get_rsrc_mem
	ldr	w0, [sp, #12]
	b	LBB0_15
LBB0_6:
	add	x0, x22, #8
Lloh12:
	adrp	x1, l_.str@PAGE
Lloh13:
	add	x1, x1, l_.str@PAGEOFF
LBB0_7:
	bl	_dev_err
	b	LBB0_9
LBB0_8:
	add	x0, x22, #8
Lloh14:
	adrp	x1, l_.str.1@PAGE
Lloh15:
	add	x1, x1, l_.str.1@PAGEOFF
	bl	_dev_info
LBB0_9:
	mov	w0, #0
	b	LBB0_22
LBB0_10:
	sub	w8, w20, #128
	cmp	w8, #3
	b.hi	LBB0_16
; %bb.11:
Lloh16:
	adrp	x9, lJTI0_0@PAGE
Lloh17:
	add	x9, x9, lJTI0_0@PAGEOFF
	adr	x10, LBB0_12
	ldrb	w11, [x9, x8]
	add	x10, x10, x11, lsl #2
	br	x10
LBB0_12:
	ldr	w8, [x22, #4]
Lloh18:
	adrp	x9, _DAYNA_8390_BASE@GOTPAGE
Lloh19:
	ldr	x9, [x9, _DAYNA_8390_BASE@GOTPAGEOFF]
Lloh20:
	ldr	w9, [x9]
	add	w9, w9, w8
	str	w9, [x19]
Lloh21:
	adrp	x9, _DAYNA_8390_MEM@GOTPAGE
Lloh22:
	ldr	x9, [x9, _DAYNA_8390_MEM@GOTPAGEOFF]
	b	LBB0_18
LBB0_13:
	add	x0, x22, #8
Lloh23:
	adrp	x1, l_.str.2@PAGE
Lloh24:
	add	x1, x1, l_.str.2@PAGEOFF
	b	LBB0_7
LBB0_14:
	add	x0, x22, #8
Lloh25:
	adrp	x1, l_.str.3@PAGE
Lloh26:
	add	x1, x1, l_.str.3@PAGEOFF
	bl	_dev_info
	ldr	w0, [x19, #16]
	bl	_mac8390_memsize
	str	w0, [sp, #12]
LBB0_15:
	ldr	w8, [x19, #16]
	add	w8, w0, w8
	b	LBB0_21
LBB0_16:
	add	x0, x22, #8
Lloh27:
	adrp	x1, l_.str.4@PAGE
Lloh28:
	add	x1, x1, l_.str.4@PAGEOFF
	b	LBB0_7
LBB0_17:
	ldr	w8, [x22, #4]
Lloh29:
	adrp	x9, _INTERLAN_8390_BASE@GOTPAGE
Lloh30:
	ldr	x9, [x9, _INTERLAN_8390_BASE@GOTPAGEOFF]
Lloh31:
	ldr	w9, [x9]
	add	w9, w9, w8
	str	w9, [x19]
Lloh32:
	adrp	x9, _INTERLAN_8390_MEM@GOTPAGE
Lloh33:
	ldr	x9, [x9, _INTERLAN_8390_MEM@GOTPAGEOFF]
LBB0_18:
	ldr	w9, [x9]
	add	w20, w9, w8
	str	w20, [x19, #16]
	b	LBB0_20
LBB0_19:
	ldrsw	x8, [x22, #4]
Lloh34:
	adrp	x9, _CABLETRON_8390_BASE@GOTPAGE
Lloh35:
	ldr	x9, [x9, _CABLETRON_8390_BASE@GOTPAGEOFF]
Lloh36:
	ldrsw	x9, [x9]
	add	x9, x9, x8
Lloh37:
	adrp	x10, _CABLETRON_8390_MEM@GOTPAGE
Lloh38:
	ldr	x10, [x10, _CABLETRON_8390_MEM@GOTPAGEOFF]
	str	w9, [x19]
Lloh39:
	ldr	w10, [x10]
	add	w20, w10, w8
	str	w20, [x19, #16]
	mov	w8, #33
	strh	w8, [x9]
LBB0_20:
	mov	x0, x20
	bl	_mac8390_memsize
	add	w8, w0, w20
LBB0_21:
	str	w8, [x19, #20]
	mov	w0, #1
LBB0_22:
	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
	add	sp, sp, #80
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpAdd	Lloh12, Lloh13
	.loh AdrpAdd	Lloh14, Lloh15
	.loh AdrpAdd	Lloh16, Lloh17
	.loh AdrpLdrGot	Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpAdd	Lloh23, Lloh24
	.loh AdrpAdd	Lloh25, Lloh26
	.loh AdrpAdd	Lloh27, Lloh28
	.loh AdrpLdrGot	Lloh32, Lloh33
	.loh AdrpLdrGotLdr	Lloh29, Lloh30, Lloh31
	.loh AdrpLdrGotLdr	Lloh37, Lloh38, Lloh39
	.loh AdrpLdrGotLdr	Lloh34, Lloh35, Lloh36
	.cfi_endproc
	.section	__TEXT,__const
lJTI0_0:
	.byte	(LBB0_12-LBB0_12)>>2
	.byte	(LBB0_17-LBB0_12)>>2
	.byte	(LBB0_12-LBB0_12)>>2
	.byte	(LBB0_19-LBB0_12)>>2
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Unable to get Nubus functional directory\n"

	.comm	_NUBUS_RESID_MAC_ADDRESS,4,2    ; @NUBUS_RESID_MAC_ADDRESS
l_.str.1:                               ; @.str.1
	.asciz	"MAC address resource not found\n"

	.comm	_useresources,8,3               ; @useresources
	.comm	_NUBUS_RESID_MINOR_BASEOS,4,2   ; @NUBUS_RESID_MINOR_BASEOS
l_.str.2:                               ; @.str.2
	.asciz	"Memory offset resource not found\n"

	.comm	_NUBUS_RESID_MINOR_LENGTH,4,2   ; @NUBUS_RESID_MINOR_LENGTH
l_.str.3:                               ; @.str.3
	.asciz	"Memory length resource not found, probing\n"

	.comm	_DAYNA_8390_BASE,4,2            ; @DAYNA_8390_BASE
	.comm	_DAYNA_8390_MEM,4,2             ; @DAYNA_8390_MEM
	.comm	_INTERLAN_8390_BASE,4,2         ; @INTERLAN_8390_BASE
	.comm	_INTERLAN_8390_MEM,4,2          ; @INTERLAN_8390_MEM
	.comm	_CABLETRON_8390_BASE,4,2        ; @CABLETRON_8390_BASE
	.comm	_CABLETRON_8390_MEM,4,2         ; @CABLETRON_8390_MEM
l_.str.4:                               ; @.str.4
	.asciz	"No known base address for card type\n"

	.no_dead_strip	_mac8390_rsrc_init
.subsections_via_symbols
