	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function nmclan_config
_nmclan_config:                         ## @nmclan_config
	.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
	movq	%rdi, %rbx
	movq	24(%rdi), %r15
	movq	%r15, %rdi
	callq	_netdev_priv
	movq	%rax, %r13
	leaq	4(%rbx), %r12
	leaq	L_.str(%rip), %rsi
	xorl	%r14d, %r14d
	movq	%r12, %rdi
	xorl	%eax, %eax
	callq	_dev_dbg
	movl	$5, (%rbx)
	movq	%rbx, %rdi
	callq	_pcmcia_request_io
	testl	%eax, %eax
	jne	LBB0_15
## %bb.1:
	movq	_mace_interrupt@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	callq	_pcmcia_request_irq
	testl	%eax, %eax
	jne	LBB0_15
## %bb.2:
	movq	%rbx, %rdi
	callq	_pcmcia_enable_device
	testl	%eax, %eax
	jne	LBB0_15
## %bb.3:
	movl	16(%rbx), %eax
	movl	%eax, 12(%r15)
	movq	8(%rbx), %rax
	movq	(%rax), %rax
	movl	(%rax), %eax
	movl	%eax, -48(%rbp)                 ## 4-byte Spill
	movl	%eax, (%r15)
	leaq	-56(%rbp), %rdx
	movq	%rbx, %rdi
	movl	$128, %esi
	callq	_pcmcia_get_tuple
	movq	-56(%rbp), %rsi
	testq	%rsi, %rsi
	je	LBB0_5
## %bb.4:
	movq	_ETH_ALEN@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rdx
	cmpq	%rdx, %rax
	jae	LBB0_6
LBB0_5:
	movq	%rsi, %rdi
	callq	_kfree
LBB0_15:
	movq	%rbx, %rdi
	callq	_nmclan_release
LBB0_16:
	movq	_ENODEV@GOTPCREL(%rip), %rax
	subl	(%rax), %r14d
LBB0_17:
	movl	%r14d, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_6:
	movl	8(%r15), %edi
	callq	_memcpy
	movq	-56(%rbp), %rdi
	callq	_kfree
	movq	_MACE_CHIPIDL@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r13, %rdi
	movl	-48(%rbp), %esi                 ## 4-byte Reload
	callq	_mace_read
	movb	%al, -41(%rbp)                  ## 1-byte Spill
	movq	_MACE_CHIPIDH@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r13, %rdi
	movl	-48(%rbp), %esi                 ## 4-byte Reload
	callq	_mace_read
	movb	-41(%rbp), %dl                  ## 1-byte Reload
	movsbl	%al, %ecx
	cmpb	$64, %dl
	jne	LBB0_8
## %bb.7:
	movl	%ecx, %eax
	andl	$15, %eax
	cmpl	$9, %eax
	jne	LBB0_8
## %bb.9:
	leaq	L_.str.1(%rip), %rsi
	movq	%r12, %rdi
	movl	$64, %edx
	xorl	%eax, %eax
	callq	_dev_dbg
	movl	8(%r15), %edx
	movq	%r13, %rdi
	movl	-48(%rbp), %esi                 ## 4-byte Reload
	callq	_mace_init
	cmpl	$-1, %eax
	je	LBB0_15
## %bb.10:
	movq	_if_port@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	cmpl	$2, %eax
	jg	LBB0_12
## %bb.11:
	movl	%eax, 4(%r15)
	jmp	LBB0_13
LBB0_8:
	movsbl	%dl, %esi
	leaq	L_.str.2(%rip), %rdi
	xorl	%r14d, %r14d
	movl	%ecx, %edx
	xorl	%eax, %eax
	callq	_pr_notice
	jmp	LBB0_16
LBB0_12:
	leaq	L_.str.3(%rip), %rdi
	xorl	%eax, %eax
	callq	_pr_notice
LBB0_13:
	movq	%r15, %rdi
	movq	%r12, %rsi
	callq	_SET_NETDEV_DEV
	movq	%r15, %rdi
	callq	_register_netdev
	testl	%eax, %eax
	je	LBB0_18
## %bb.14:
	leaq	L_.str.4(%rip), %rdi
	xorl	%eax, %eax
	callq	_pr_notice
	jmp	LBB0_15
LBB0_18:
	movl	12(%r15), %ecx
	movq	_if_names@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movslq	4(%r15), %rdx
	movl	(%rax,%rdx,4), %r8d
	movl	(%r15), %edx
	movl	8(%r15), %r9d
	leaq	L_.str.5(%rip), %rsi
	movq	%r15, %rdi
	callq	_netdev_info
	xorl	%r14d, %r14d
	jmp	LBB0_17
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"nmclan_config\n"

	.comm	_mace_interrupt,4,2             ## @mace_interrupt
	.comm	_ETH_ALEN,8,3                   ## @ETH_ALEN
	.comm	_MACE_CHIPIDL,4,2               ## @MACE_CHIPIDL
	.comm	_MACE_CHIPIDH,4,2               ## @MACE_CHIPIDH
L_.str.1:                               ## @.str.1
	.asciz	"nmclan_cs configured: mace id=%x %x\n"

L_.str.2:                               ## @.str.2
	.asciz	"mace id not found: %x %x should be 0x40 0x?9\n"

	.comm	_ENODEV,4,2                     ## @ENODEV
	.comm	_if_port,4,2                    ## @if_port
L_.str.3:                               ## @.str.3
	.asciz	"invalid if_port requested\n"

L_.str.4:                               ## @.str.4
	.asciz	"register_netdev() failed\n"

L_.str.5:                               ## @.str.5
	.asciz	"nmclan: port %#3lx, irq %d, %s port, hw_addr %pM\n"

	.comm	_if_names,8,3                   ## @if_names
	.no_dead_strip	_nmclan_config
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function nmclan_config
_nmclan_config:                         ; @nmclan_config
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #96
	.cfi_def_cfa_offset 96
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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
	mov	x19, x0
	ldr	x20, [x0, #24]
	mov	x0, x20
	bl	_netdev_priv
	mov	x22, x0
	add	x21, x19, #4
Lloh0:
	adrp	x1, l_.str@PAGE
Lloh1:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x21
	bl	_dev_dbg
	mov	w8, #5
	str	w8, [x19]
	mov	x0, x19
	bl	_pcmcia_request_io
	cbnz	w0, LBB0_6
; %bb.1:
Lloh2:
	adrp	x8, _mace_interrupt@GOTPAGE
Lloh3:
	ldr	x8, [x8, _mace_interrupt@GOTPAGEOFF]
Lloh4:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_pcmcia_request_irq
	cbnz	w0, LBB0_6
; %bb.2:
	mov	x0, x19
	bl	_pcmcia_enable_device
	cbnz	w0, LBB0_6
; %bb.3:
	ldr	w8, [x19, #16]
	str	w8, [x20, #12]
	ldr	x8, [x19, #8]
	ldr	x8, [x8]
	ldr	w23, [x8]
	str	w23, [x20]
	add	x2, sp, #24
	mov	x0, x19
	mov	w1, #128
	bl	_pcmcia_get_tuple
	ldr	x1, [sp, #24]
	cbz	x1, LBB0_5
; %bb.4:
Lloh5:
	adrp	x8, _ETH_ALEN@GOTPAGE
Lloh6:
	ldr	x8, [x8, _ETH_ALEN@GOTPAGEOFF]
Lloh7:
	ldr	x2, [x8]
	cmp	x0, x2
	b.hs	LBB0_9
LBB0_5:
	mov	x0, x1
	bl	_kfree
LBB0_6:
	mov	x0, x19
	bl	_nmclan_release
LBB0_7:
Lloh8:
	adrp	x8, _ENODEV@GOTPAGE
Lloh9:
	ldr	x8, [x8, _ENODEV@GOTPAGEOFF]
Lloh10:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_8:
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #96
	ret
LBB0_9:
	ldr	w0, [x20, #8]
	bl	_memcpy
	ldr	x0, [sp, #24]
	bl	_kfree
Lloh11:
	adrp	x8, _MACE_CHIPIDL@GOTPAGE
Lloh12:
	ldr	x8, [x8, _MACE_CHIPIDL@GOTPAGEOFF]
Lloh13:
	ldr	w2, [x8]
	mov	x0, x22
	mov	x1, x23
	bl	_mace_read
	mov	x24, x0
Lloh14:
	adrp	x8, _MACE_CHIPIDH@GOTPAGE
Lloh15:
	ldr	x8, [x8, _MACE_CHIPIDH@GOTPAGEOFF]
Lloh16:
	ldr	w2, [x8]
	mov	x0, x22
	mov	x1, x23
	bl	_mace_read
                                        ; kill: def $w0 killed $w0 def $x0
	and	w8, w0, #0xf
	cmp	w24, #64
	ccmp	w8, #9, #0, eq
	b.eq	LBB0_11
; %bb.10:
                                        ; kill: def $w0 killed $w0 killed $x0 def $x0
	sxtw	x8, w24
	stp	x8, x0, [sp]
Lloh17:
	adrp	x0, l_.str.2@PAGE
Lloh18:
	add	x0, x0, l_.str.2@PAGEOFF
	bl	_pr_notice
	b	LBB0_7
LBB0_11:
	mov	w8, #64
	stp	x8, x0, [sp]
Lloh19:
	adrp	x1, l_.str.1@PAGE
Lloh20:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x21
	bl	_dev_dbg
	ldr	w2, [x20, #8]
	mov	x0, x22
	mov	x1, x23
	bl	_mace_init
	cmn	w0, #1
	b.eq	LBB0_6
; %bb.12:
Lloh21:
	adrp	x8, _if_port@GOTPAGE
Lloh22:
	ldr	x8, [x8, _if_port@GOTPAGEOFF]
Lloh23:
	ldr	w8, [x8]
	cmp	w8, #2
	b.gt	LBB0_14
; %bb.13:
	str	w8, [x20, #4]
	b	LBB0_15
LBB0_14:
Lloh24:
	adrp	x0, l_.str.3@PAGE
Lloh25:
	add	x0, x0, l_.str.3@PAGEOFF
	bl	_pr_notice
LBB0_15:
	mov	x0, x20
	mov	x1, x21
	bl	_SET_NETDEV_DEV
	mov	x0, x20
	bl	_register_netdev
	cbz	w0, LBB0_17
; %bb.16:
Lloh26:
	adrp	x0, l_.str.4@PAGE
Lloh27:
	add	x0, x0, l_.str.4@PAGEOFF
	bl	_pr_notice
	b	LBB0_6
LBB0_17:
Lloh28:
	adrp	x8, _if_names@GOTPAGE
Lloh29:
	ldr	x8, [x8, _if_names@GOTPAGEOFF]
Lloh30:
	ldr	x8, [x8]
	ldp	w2, w9, [x20]
                                        ; kill: def $w9 killed $w9 def $x9
	sxtw	x9, w9
	ldr	w4, [x8, x9, lsl #2]
	ldp	w5, w3, [x20, #8]
Lloh31:
	adrp	x1, l_.str.5@PAGE
Lloh32:
	add	x1, x1, l_.str.5@PAGEOFF
	mov	x0, x20
	bl	_netdev_info
	mov	w0, #0
	b	LBB0_8
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpAdd	Lloh17, Lloh18
	.loh AdrpAdd	Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpAdd	Lloh24, Lloh25
	.loh AdrpAdd	Lloh26, Lloh27
	.loh AdrpAdd	Lloh31, Lloh32
	.loh AdrpLdrGotLdr	Lloh28, Lloh29, Lloh30
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"nmclan_config\n"

	.comm	_mace_interrupt,4,2             ; @mace_interrupt
	.comm	_ETH_ALEN,8,3                   ; @ETH_ALEN
	.comm	_MACE_CHIPIDL,4,2               ; @MACE_CHIPIDL
	.comm	_MACE_CHIPIDH,4,2               ; @MACE_CHIPIDH
l_.str.1:                               ; @.str.1
	.asciz	"nmclan_cs configured: mace id=%x %x\n"

l_.str.2:                               ; @.str.2
	.asciz	"mace id not found: %x %x should be 0x40 0x?9\n"

	.comm	_ENODEV,4,2                     ; @ENODEV
	.comm	_if_port,4,2                    ; @if_port
l_.str.3:                               ; @.str.3
	.asciz	"invalid if_port requested\n"

l_.str.4:                               ; @.str.4
	.asciz	"register_netdev() failed\n"

l_.str.5:                               ; @.str.5
	.asciz	"nmclan: port %#3lx, irq %d, %s port, hw_addr %pM\n"

	.comm	_if_names,8,3                   ; @if_names
	.no_dead_strip	_nmclan_config
.subsections_via_symbols
