	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function el3_isa_match
_el3_isa_match:                         ## @el3_isa_match
	.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, %r14
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	leaq	-60(%rbp), %rbx
	.p2align	4, 0x90
LBB0_1:                                 ## =>This Inner Loop Header: Depth=1
	movq	%rbx, %rdi
	callq	_el3_isa_id_sequence
	cmpl	$2, %eax
	je	LBB0_1
## %bb.2:
	cmpl	$1, %eax
	jne	LBB0_3
LBB0_9:
	xorl	%ebx, %ebx
	jmp	LBB0_14
LBB0_3:
	movl	$8, %edi
	callq	_id_read_eeprom
	movl	%eax, %ebx
	movq	_irq@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	_el3_cards@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	movl	(%rax,%rcx,4), %r12d
	leal	-2(%r12), %eax
	cmpl	$14, %eax
	jb	LBB0_5
## %bb.4:
	movl	$9, %edi
	callq	_id_read_eeprom
	movl	%eax, %r12d
	sarl	$12, %r12d
LBB0_5:
	movl	$4, %edi
	callq	_alloc_etherdev
	testq	%rax, %rax
	je	LBB0_6
## %bb.7:
	movq	%rax, %r13
	movl	%ebx, -64(%rbp)                 ## 4-byte Spill
                                        ## kill: def $ebx killed $ebx def $rbx
	andl	$31, %ebx
	shll	$4, %ebx
	leal	512(%rbx), %r15d
	movq	%rax, %rdi
	movq	%r14, %rsi
	callq	_SET_NETDEV_DEV
	movq	%r13, %rdi
	callq	_netdev_boot_setup_check
	movq	_EL3_IO_EXTENT@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str(%rip), %rdx
	movl	%r15d, %edi
	callq	_request_region
	testl	%eax, %eax
	je	LBB0_8
## %bb.10:
	movq	%r14, -72(%rbp)                 ## 8-byte Spill
	movq	_current_tag@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leal	1(%rdi), %ecx
	movl	%ecx, (%rax)
	addl	$209, %edi
	movq	_id_port@GOTPCREL(%rip), %r14
	movl	(%r14), %esi
                                        ## kill: def $edi killed $edi killed $rdi
	callq	_outb
	shrl	$4, %ebx
	orl	$224, %ebx
	movl	(%r14), %esi
	movl	%ebx, %edi
	callq	_outb
	xorl	%ebx, %ebx
	xorl	%edi, %edi
	callq	_EL3WINDOW
	movl	%r15d, %edi
	callq	_inw
	cmpl	$27984, %eax                    ## imm = 0x6D50
	jne	LBB0_11
## %bb.12:
	movl	-64(%rbp), %r14d                ## 4-byte Reload
	shrl	$14, %r14d
	movl	%r15d, %esi
	movq	_WN0_IRQ@GOTPCREL(%rip), %rax
	addq	(%rax), %rsi
	movl	$3840, %edi                     ## imm = 0xF00
	callq	_outw
	movq	_EL3_ISA@GOTPCREL(%rip), %rax
	movl	(%rax), %r9d
	leaq	-60(%rbp), %rsi
	movq	%r13, %rdi
	movl	%r15d, %edx
	movl	%r12d, %ecx
	movl	%r14d, %r8d
	callq	_el3_dev_fill
	movq	-72(%rbp), %rdi                 ## 8-byte Reload
	movq	%r13, %rsi
	callq	_dev_set_drvdata
	movq	%r13, %rdi
	callq	_el3_common_init
	testq	%rax, %rax
	je	LBB0_13
LBB0_11:
	movq	%r13, %rdi
	callq	_free_netdev
	jmp	LBB0_14
LBB0_6:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
LBB0_14:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-48(%rbp), %rax
	jne	LBB0_16
## %bb.15:
	movl	%ebx, %eax
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_8:
	movq	%r13, %rdi
	callq	_free_netdev
	jmp	LBB0_9
LBB0_13:
	movq	_el3_devs@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	_el3_cards@GOTPCREL(%rip), %rsi
	movq	(%rsi), %rcx
	leaq	1(%rcx), %rdx
	movq	%rdx, (%rsi)
	movq	%r13, (%rax,%rcx,8)
	movl	$1, %ebx
	jmp	LBB0_14
LBB0_16:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_irq,8,3                        ## @irq
	.comm	_el3_cards,8,3                  ## @el3_cards
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_EL3_IO_EXTENT,4,2              ## @EL3_IO_EXTENT
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"3c509-isa"

	.comm	_current_tag,4,2                ## @current_tag
	.comm	_id_port,4,2                    ## @id_port
	.comm	_WN0_IRQ,8,3                    ## @WN0_IRQ
	.comm	_EL3_ISA,4,2                    ## @EL3_ISA
	.comm	_el3_devs,8,3                   ## @el3_devs
	.no_dead_strip	_el3_isa_match
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function el3_isa_match
_el3_isa_match:                         ; @el3_isa_match
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	stp	x26, x25, [sp, #32]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #48]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #64]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #80]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #96]             ; 16-byte Folded Spill
	add	x29, sp, #96
	.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	x19, x0
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	str	x8, [sp, #24]
LBB0_1:                                 ; =>This Inner Loop Header: Depth=1
	add	x0, sp, #12
	bl	_el3_isa_id_sequence
	cmp	w0, #2
	b.eq	LBB0_1
; %bb.2:
	cmp	w0, #1
	b.eq	LBB0_10
; %bb.3:
	mov	w0, #8
	bl	_id_read_eeprom
	mov	x22, x0
Lloh3:
	adrp	x8, _irq@GOTPAGE
Lloh4:
	ldr	x8, [x8, _irq@GOTPAGEOFF]
Lloh5:
	adrp	x24, _el3_cards@GOTPAGE
Lloh6:
	ldr	x24, [x24, _el3_cards@GOTPAGEOFF]
Lloh7:
	ldr	x8, [x8]
	ldr	x9, [x24]
	ldr	w21, [x8, x9, lsl #2]
	sub	w8, w21, #2
	cmp	w8, #14
	b.lo	LBB0_5
; %bb.4:
	mov	w0, #9
	bl	_id_read_eeprom
	asr	w21, w0, #12
LBB0_5:
	mov	w0, #4
	bl	_alloc_etherdev
	cbz	x0, LBB0_13
; %bb.6:
	mov	x20, x0
	mov	w23, #512
	bfi	w23, w22, #4, #5
	mov	x1, x19
	bl	_SET_NETDEV_DEV
	mov	x0, x20
	bl	_netdev_boot_setup_check
Lloh8:
	adrp	x8, _EL3_IO_EXTENT@GOTPAGE
Lloh9:
	ldr	x8, [x8, _EL3_IO_EXTENT@GOTPAGEOFF]
Lloh10:
	ldr	w1, [x8]
Lloh11:
	adrp	x2, l_.str@PAGE
Lloh12:
	add	x2, x2, l_.str@PAGEOFF
	mov	x0, x23
	bl	_request_region
	cbz	w0, LBB0_9
; %bb.7:
	ubfiz	w25, w22, #4, #5
Lloh13:
	adrp	x8, _current_tag@GOTPAGE
Lloh14:
	ldr	x8, [x8, _current_tag@GOTPAGEOFF]
	ldr	w9, [x8]
	add	w10, w9, #1
	str	w10, [x8]
	add	w0, w9, #209
Lloh15:
	adrp	x26, _id_port@GOTPAGE
Lloh16:
	ldr	x26, [x26, _id_port@GOTPAGEOFF]
	ldr	w1, [x26]
	bl	_outb
	lsr	w8, w25, #4
	orr	w0, w8, #0xe0
	ldr	w1, [x26]
	bl	_outb
	mov	w0, #0
	bl	_EL3WINDOW
	mov	x0, x23
	bl	_inw
	mov	w8, #27984
	cmp	w0, w8
	b.ne	LBB0_9
; %bb.8:
	lsr	w22, w22, #14
Lloh17:
	adrp	x8, _WN0_IRQ@GOTPAGE
Lloh18:
	ldr	x8, [x8, _WN0_IRQ@GOTPAGEOFF]
Lloh19:
	ldr	x8, [x8]
	add	x1, x8, w23, uxtw
	mov	w0, #3840
	bl	_outw
Lloh20:
	adrp	x8, _EL3_ISA@GOTPAGE
Lloh21:
	ldr	x8, [x8, _EL3_ISA@GOTPAGEOFF]
Lloh22:
	ldr	w5, [x8]
	add	x1, sp, #12
	mov	x0, x20
	mov	x2, x23
	mov	x3, x21
	mov	x4, x22
	bl	_el3_dev_fill
	mov	x0, x19
	mov	x1, x20
	bl	_dev_set_drvdata
	mov	x0, x20
	bl	_el3_common_init
	cbz	x0, LBB0_14
LBB0_9:
	mov	x0, x20
	bl	_free_netdev
LBB0_10:
	mov	w0, #0
LBB0_11:
	ldr	x8, [sp, #24]
Lloh23:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh24:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh25:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_15
; %bb.12:
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #64]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #48]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #112
	ret
LBB0_13:
Lloh26:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh27:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh28:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_11
LBB0_14:
Lloh29:
	adrp	x8, _el3_devs@GOTPAGE
Lloh30:
	ldr	x8, [x8, _el3_devs@GOTPAGEOFF]
Lloh31:
	ldr	x8, [x8]
	ldr	x9, [x24]
	add	x10, x9, #1
	str	x10, [x24]
	str	x20, [x8, x9, lsl #3]
	mov	w0, #1
	b	LBB0_11
LBB0_15:
	bl	___stack_chk_fail
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh7
	.loh AdrpAdd	Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh15, Lloh16
	.loh AdrpLdrGot	Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.loh AdrpLdrGotLdr	Lloh26, Lloh27, Lloh28
	.loh AdrpLdrGotLdr	Lloh29, Lloh30, Lloh31
	.cfi_endproc
                                        ; -- End function
	.comm	_irq,8,3                        ; @irq
	.comm	_el3_cards,8,3                  ; @el3_cards
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_EL3_IO_EXTENT,4,2              ; @EL3_IO_EXTENT
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"3c509-isa"

	.comm	_current_tag,4,2                ; @current_tag
	.comm	_id_port,4,2                    ; @id_port
	.comm	_WN0_IRQ,8,3                    ; @WN0_IRQ
	.comm	_EL3_ISA,4,2                    ; @EL3_ISA
	.comm	_el3_devs,8,3                   ; @el3_devs
	.no_dead_strip	_el3_isa_match
.subsections_via_symbols
