	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function tc589_config
_tc589_config:                          ## @tc589_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	$40, %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	40(%rdi), %r14
	leaq	20(%rdi), %r15
	leaq	L_.str.4(%rip), %rsi
	movq	%r15, %rdi
	callq	_dev_dbg
	movq	%r14, %r12
	movq	8(%r14), %rax
	movq	%rax, -56(%rbp)                 ## 8-byte Spill
	movq	(%rbx), %rax
	movq	_MANFID_3COM@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	je	LBB0_2
## %bb.1:
	leaq	L_.str.5(%rip), %rsi
	movq	%r15, %rdi
	callq	_dev_info
LBB0_2:
	movq	8(%rbx), %rcx
	movq	_PRODID_3COM_3C562@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rcx, -72(%rbp)                 ## 8-byte Spill
	movq	%rax, -64(%rbp)                 ## 8-byte Spill
	cmpq	%rax, %rcx
	setne	%r14b
	movl	$16, 16(%rbx)
	xorl	%eax, %eax
	movl	$-16, %r13d
	jmp	LBB0_3
	.p2align	4, 0x90
LBB0_5:                                 ##   in Loop: Header=BB0_3 Depth=1
	cmpl	$1008, %r13d                    ## imm = 0x3F0
	jae	LBB0_6
LBB0_3:                                 ## =>This Inner Loop Header: Depth=1
	addl	$16, %r13d
	testb	$-128, %r13b
	sete	%cl
	orb	%r14b, %cl
	cmpb	$1, %cl
	jne	LBB0_5
## %bb.4:                               ##   in Loop: Header=BB0_3 Depth=1
	movl	%r13d, %eax
	xorl	$768, %eax                      ## imm = 0x300
	movq	24(%rbx), %rcx
	movq	(%rcx), %rcx
	movl	%eax, (%rcx)
	movq	%rbx, %rdi
	callq	_pcmcia_request_io
	testl	%eax, %eax
	jne	LBB0_5
	jmp	LBB0_7
LBB0_6:
	testl	%eax, %eax
	jne	LBB0_19
LBB0_7:
	movq	_el3_interrupt@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	callq	_pcmcia_request_irq
	testl	%eax, %eax
	jne	LBB0_19
## %bb.8:
	movq	%rbx, %rdi
	callq	_pcmcia_enable_device
	testl	%eax, %eax
	jne	LBB0_19
## %bb.9:
	movl	32(%rbx), %eax
	movq	%r12, %r13
	movl	%eax, 16(%r12)
	movq	24(%rbx), %rax
	movq	(%rax), %rax
	movl	(%rax), %r12d
	movl	%r12d, (%r13)
	xorl	%edi, %edi
	callq	_EL3WINDOW
	leaq	-48(%rbp), %rdx
	movq	%rbx, %rdi
	movl	$136, %esi
	callq	_pcmcia_get_tuple
	movq	-48(%rbp), %rdi
	testq	%rdi, %rdi
	je	LBB0_14
## %bb.10:
	cmpq	$6, %rax
	jb	LBB0_14
## %bb.11:
	movl	(%rdi), %edi
	callq	_le16_to_cpu
	movl	%eax, %edi
	callq	_htons
	movq	-56(%rbp), %r14                 ## 8-byte Reload
	movl	%eax, (%r14)
	movq	-48(%rbp), %rax
	movl	8(%rax), %edi
	callq	_le16_to_cpu
	movl	%eax, %edi
	callq	_htons
	movl	%eax, 4(%r14)
	movq	-48(%rbp), %rax
	movl	16(%rax), %edi
	callq	_le16_to_cpu
	movl	%eax, %edi
	callq	_htons
	movl	%eax, 8(%r14)
	movq	-48(%rbp), %rdi
	callq	_kfree
	jmp	LBB0_12
LBB0_14:
	callq	_kfree
	movl	%r12d, %edi
	xorl	%esi, %esi
	callq	_read_eeprom
	movl	%eax, %edi
	callq	_htons
	movq	-56(%rbp), %r14                 ## 8-byte Reload
	movl	%eax, (%r14)
	movl	%r12d, %edi
	movl	$1, %esi
	callq	_read_eeprom
	movl	%eax, %edi
	callq	_htons
	movl	%eax, 4(%r14)
	movl	%r12d, %edi
	movl	$2, %esi
	callq	_read_eeprom
	movl	%eax, %edi
	callq	_htons
	movl	%eax, 8(%r14)
	movl	(%r14), %r14d
	movl	$24672, %edi                    ## imm = 0x6060
	callq	_htons
	cmpl	%eax, %r14d
	jne	LBB0_12
## %bb.15:
	movl	(%r13), %edx
	leal	15(%rdx), %ecx
	leaq	L_.str.6(%rip), %rsi
	movq	%r15, %rdi
                                        ## kill: def $edx killed $edx killed $rdx
	xorl	%eax, %eax
	callq	_dev_err
	jmp	LBB0_19
LBB0_12:
	leal	8(%r12), %esi
	movl	$16128, %edi                    ## imm = 0x3F00
	callq	_outw
	movl	%r12d, %edi
	callq	_inl
	movl	%eax, %r14d
	movq	_if_port@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	cmpl	$3, %eax
	ja	LBB0_16
## %bb.13:
	movl	%eax, 4(%r13)
	jmp	LBB0_17
LBB0_16:
	leaq	L_.str.7(%rip), %rsi
	movq	%r15, %rdi
	xorl	%eax, %eax
	callq	_dev_err
LBB0_17:
	movq	%r13, %rdi
	movq	%r15, %rsi
	callq	_SET_NETDEV_DEV
	movq	%r13, %rdi
	callq	_register_netdev
	testq	%rax, %rax
	je	LBB0_21
## %bb.18:
	leaq	L_.str.8(%rip), %rsi
	movq	%r15, %rdi
	xorl	%eax, %eax
	callq	_dev_err
LBB0_19:
	movq	%rbx, %rdi
	callq	_tc589_release
	movq	_ENODEV@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
LBB0_20:
	movl	%ebx, %eax
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_21:
	movq	-64(%rbp), %rax                 ## 8-byte Reload
	cmpq	%rax, -72(%rbp)                 ## 8-byte Folded Reload
	leaq	L_.str.10(%rip), %rax
	leaq	L_.str.11(%rip), %rdx
	cmoveq	%rax, %rdx
	movl	(%r13), %ecx
	movl	16(%r13), %r8d
	movq	8(%r13), %r9
	leaq	L_.str.9(%rip), %rsi
	xorl	%ebx, %ebx
	movq	%r13, %rdi
	xorl	%eax, %eax
	callq	_netdev_info
	testb	$7, %r14b
	movl	$8, %eax
	movl	$32, %edx
	cmovel	%eax, %edx
	shrl	$16, %r14d
	andl	$3, %r14d
	leaq	_reltable.tc589_config(%rip), %rax
	movslq	(%rax,%r14,4), %rcx
	addq	%rax, %rcx
	movq	_if_names@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movslq	4(%r13), %rsi
	movl	(%rax,%rsi,4), %r8d
	leaq	L_.str.12(%rip), %rsi
	movq	%r13, %rdi
	xorl	%eax, %eax
	callq	_netdev_info
	jmp	LBB0_20
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__const
	.p2align	2                               ## @reltable.tc589_config
_reltable.tc589_config:
	.long	L_.str-_reltable.tc589_config
	.long	L_.str.1-_reltable.tc589_config
	.long	L_.str.2-_reltable.tc589_config
	.long	L_.str.3-_reltable.tc589_config

	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"5:3"

L_.str.1:                               ## @.str.1
	.asciz	"3:1"

L_.str.2:                               ## @.str.2
	.asciz	"1:1"

L_.str.3:                               ## @.str.3
	.asciz	"3:5"

L_.str.4:                               ## @.str.4
	.asciz	"3c589_config\n"

	.comm	_MANFID_3COM,8,3                ## @MANFID_3COM
L_.str.5:                               ## @.str.5
	.asciz	"hmmm, is this really a 3Com card??\n"

	.comm	_PRODID_3COM_3C562,8,3          ## @PRODID_3COM_3C562
	.comm	_el3_interrupt,4,2              ## @el3_interrupt
L_.str.6:                               ## @.str.6
	.asciz	"IO port conflict at 0x%03lx-0x%03lx\n"

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

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

L_.str.9:                               ## @.str.9
	.asciz	"3Com 3c%s, io %#3lx, irq %d, hw_addr %pM\n"

L_.str.10:                              ## @.str.10
	.asciz	"562"

L_.str.11:                              ## @.str.11
	.asciz	"589"

L_.str.12:                              ## @.str.12
	.asciz	"  %dK FIFO split %s Rx:Tx, %s xcvr\n"

	.comm	_if_names,8,3                   ## @if_names
	.comm	_ENODEV,4,2                     ## @ENODEV
	.no_dead_strip	_tc589_config
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function tc589_config
_tc589_config:                          ; @tc589_config
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #128
	.cfi_def_cfa_offset 128
	stp	x26, x25, [sp, #48]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #64]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #80]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #96]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #112]            ; 16-byte Folded Spill
	add	x29, sp, #112
	.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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	mov	x20, x0
	ldr	x19, [x0, #40]
	add	x21, x0, #20
Lloh0:
	adrp	x1, l_.str.4@PAGE
Lloh1:
	add	x1, x1, l_.str.4@PAGEOFF
	mov	x0, x21
	bl	_dev_dbg
	ldr	x25, [x19, #8]
	ldr	x8, [x20]
Lloh2:
	adrp	x9, _MANFID_3COM@GOTPAGE
Lloh3:
	ldr	x9, [x9, _MANFID_3COM@GOTPAGEOFF]
Lloh4:
	ldr	x9, [x9]
	cmp	x8, x9
	b.eq	LBB0_2
; %bb.1:
Lloh5:
	adrp	x1, l_.str.5@PAGE
Lloh6:
	add	x1, x1, l_.str.5@PAGEOFF
	mov	x0, x21
	bl	_dev_info
LBB0_2:
	mov	w0, #0
	ldr	x23, [x20, #8]
Lloh7:
	adrp	x8, _PRODID_3COM_3C562@GOTPAGE
Lloh8:
	ldr	x8, [x8, _PRODID_3COM_3C562@GOTPAGEOFF]
Lloh9:
	ldr	x24, [x8]
	cmp	x23, x24
	cset	w22, ne
	mov	w8, #16
	str	w8, [x20, #16]
	mov	w26, #-16
	b	LBB0_4
LBB0_3:                                 ;   in Loop: Header=BB0_4 Depth=1
	cmp	w26, #1008
	b.hs	LBB0_6
LBB0_4:                                 ; =>This Inner Loop Header: Depth=1
	add	w26, w26, #16
	tst	w26, #0x80
	cset	w8, eq
	orr	w8, w22, w8
	cmp	w8, #1
	b.ne	LBB0_3
; %bb.5:                                ;   in Loop: Header=BB0_4 Depth=1
	eor	w8, w26, #0x300
	ldr	x9, [x20, #24]
	ldr	x9, [x9]
	str	w8, [x9]
	mov	x0, x20
	bl	_pcmcia_request_io
	cbnz	w0, LBB0_3
	b	LBB0_7
LBB0_6:
	cbnz	w0, LBB0_20
LBB0_7:
Lloh10:
	adrp	x8, _el3_interrupt@GOTPAGE
Lloh11:
	ldr	x8, [x8, _el3_interrupt@GOTPAGEOFF]
Lloh12:
	ldr	w1, [x8]
	mov	x0, x20
	bl	_pcmcia_request_irq
	cbnz	w0, LBB0_20
; %bb.8:
	mov	x0, x20
	bl	_pcmcia_enable_device
	cbnz	w0, LBB0_20
; %bb.9:
	ldr	w8, [x20, #32]
	str	w8, [x19, #16]
	ldr	x8, [x20, #24]
	ldr	x8, [x8]
	ldr	w22, [x8]
	str	w22, [x19]
	bl	_EL3WINDOW
	add	x2, sp, #40
	mov	x0, x20
	mov	w1, #136
	bl	_pcmcia_get_tuple
	mov	x8, x0
	ldr	x0, [sp, #40]
	cbz	x0, LBB0_12
; %bb.10:
	cmp	x8, #6
	b.lo	LBB0_12
; %bb.11:
	ldr	w0, [x0]
	bl	_le16_to_cpu
	bl	_htons
	str	w0, [x25]
	ldr	x8, [sp, #40]
	ldr	w0, [x8, #8]
	bl	_le16_to_cpu
	bl	_htons
	str	w0, [x25, #4]
	ldr	x8, [sp, #40]
	ldr	w0, [x8, #16]
	bl	_le16_to_cpu
	bl	_htons
	str	w0, [x25, #8]
	ldr	x0, [sp, #40]
	bl	_kfree
	b	LBB0_14
LBB0_12:
	bl	_kfree
	mov	x0, x22
	mov	w1, #0
	bl	_read_eeprom
	bl	_htons
	str	w0, [x25]
	mov	x0, x22
	mov	w1, #1
	bl	_read_eeprom
	bl	_htons
	str	w0, [x25, #4]
	mov	x0, x22
	mov	w1, #2
	bl	_read_eeprom
	bl	_htons
	str	w0, [x25, #8]
	ldr	w25, [x25]
	mov	w0, #24672
	bl	_htons
	cmp	w25, w0
	b.ne	LBB0_14
; %bb.13:
	ldr	w8, [x19]
	add	w9, w8, #15
	stp	x8, x9, [sp]
Lloh13:
	adrp	x1, l_.str.6@PAGE
Lloh14:
	add	x1, x1, l_.str.6@PAGEOFF
	b	LBB0_19
LBB0_14:
	add	w1, w22, #8
	mov	w0, #16128
	bl	_outw
	mov	x0, x22
	bl	_inl
	mov	x22, x0
Lloh15:
	adrp	x8, _if_port@GOTPAGE
Lloh16:
	ldr	x8, [x8, _if_port@GOTPAGEOFF]
Lloh17:
	ldr	w8, [x8]
	cmp	w8, #3
	b.hi	LBB0_16
; %bb.15:
	str	w8, [x19, #4]
	b	LBB0_17
LBB0_16:
Lloh18:
	adrp	x1, l_.str.7@PAGE
Lloh19:
	add	x1, x1, l_.str.7@PAGEOFF
	mov	x0, x21
	bl	_dev_err
LBB0_17:
	mov	x0, x19
	mov	x1, x21
	bl	_SET_NETDEV_DEV
	mov	x0, x19
	bl	_register_netdev
	cbz	x0, LBB0_22
; %bb.18:
Lloh20:
	adrp	x1, l_.str.8@PAGE
Lloh21:
	add	x1, x1, l_.str.8@PAGEOFF
LBB0_19:
	mov	x0, x21
	bl	_dev_err
LBB0_20:
	mov	x0, x20
	bl	_tc589_release
Lloh22:
	adrp	x8, _ENODEV@GOTPAGE
Lloh23:
	ldr	x8, [x8, _ENODEV@GOTPAGEOFF]
Lloh24:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_21:
	ldp	x29, x30, [sp, #112]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #96]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #80]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #64]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #48]             ; 16-byte Folded Reload
	add	sp, sp, #128
	ret
LBB0_22:
Lloh25:
	adrp	x8, l_.str.11@PAGE
Lloh26:
	add	x8, x8, l_.str.11@PAGEOFF
Lloh27:
	adrp	x9, l_.str.10@PAGE
Lloh28:
	add	x9, x9, l_.str.10@PAGEOFF
	cmp	x23, x24
	csel	x8, x9, x8, eq
	ldr	x9, [x19, #8]
	ldr	w10, [x19]
	ldr	w11, [x19, #16]
	stp	x11, x9, [sp, #16]
	stp	x8, x10, [sp]
Lloh29:
	adrp	x1, l_.str.9@PAGE
Lloh30:
	add	x1, x1, l_.str.9@PAGEOFF
	mov	x0, x19
	bl	_netdev_info
	ubfx	w8, w22, #16, #2
Lloh31:
	adrp	x9, _tc589_config.ram_split@PAGE
Lloh32:
	add	x9, x9, _tc589_config.ram_split@PAGEOFF
	ldr	x8, [x9, w8, uxtw #3]
Lloh33:
	adrp	x9, _if_names@GOTPAGE
Lloh34:
	ldr	x9, [x9, _if_names@GOTPAGEOFF]
Lloh35:
	ldr	x9, [x9]
	ldrsw	x10, [x19, #4]
	ldr	w9, [x9, x10, lsl #2]
	stp	x8, x9, [sp, #8]
	tst	w22, #0x7
	mov	w9, #32
	mov	w10, #8
	csel	x9, x10, x9, eq
	str	x9, [sp]
Lloh36:
	adrp	x1, l_.str.12@PAGE
Lloh37:
	add	x1, x1, l_.str.12@PAGEOFF
	mov	x0, x19
	bl	_netdev_info
	mov	w0, #0
	b	LBB0_21
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpAdd	Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpAdd	Lloh18, Lloh19
	.loh AdrpAdd	Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh24
	.loh AdrpAdd	Lloh36, Lloh37
	.loh AdrpLdrGotLdr	Lloh33, Lloh34, Lloh35
	.loh AdrpAdd	Lloh31, Lloh32
	.loh AdrpAdd	Lloh29, Lloh30
	.loh AdrpAdd	Lloh27, Lloh28
	.loh AdrpAdd	Lloh25, Lloh26
	.cfi_endproc
                                        ; -- End function
	.section	__DATA,__const
	.p2align	3                               ; @tc589_config.ram_split
_tc589_config.ram_split:
	.quad	l_.str
	.quad	l_.str.1
	.quad	l_.str.2
	.quad	l_.str.3

	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"5:3"

l_.str.1:                               ; @.str.1
	.asciz	"3:1"

l_.str.2:                               ; @.str.2
	.asciz	"1:1"

l_.str.3:                               ; @.str.3
	.asciz	"3:5"

l_.str.4:                               ; @.str.4
	.asciz	"3c589_config\n"

	.comm	_MANFID_3COM,8,3                ; @MANFID_3COM
l_.str.5:                               ; @.str.5
	.asciz	"hmmm, is this really a 3Com card??\n"

	.comm	_PRODID_3COM_3C562,8,3          ; @PRODID_3COM_3C562
	.comm	_el3_interrupt,4,2              ; @el3_interrupt
l_.str.6:                               ; @.str.6
	.asciz	"IO port conflict at 0x%03lx-0x%03lx\n"

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

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

l_.str.9:                               ; @.str.9
	.asciz	"3Com 3c%s, io %#3lx, irq %d, hw_addr %pM\n"

l_.str.10:                              ; @.str.10
	.asciz	"562"

l_.str.11:                              ; @.str.11
	.asciz	"589"

l_.str.12:                              ; @.str.12
	.asciz	"  %dK FIFO split %s Rx:Tx, %s xcvr\n"

	.comm	_if_names,8,3                   ; @if_names
	.comm	_ENODEV,4,2                     ; @ENODEV
	.no_dead_strip	_tc589_config
.subsections_via_symbols
