	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function corkscrew_scan
_corkscrew_scan:                        ## @corkscrew_scan
	.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
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%edi, %r14d
	movl	$4, %edi
	callq	_alloc_etherdev
	testq	%rax, %rax
	je	LBB0_10
## %bb.1:
	movq	%rax, %r15
	testl	%r14d, %r14d
	js	LBB0_3
## %bb.2:
	movl	(%r15), %edi
	leaq	L_.str(%rip), %rsi
	movl	%r14d, %edx
	callq	_sprintf
	movq	%r15, %rdi
	callq	_netdev_boot_setup_check
LBB0_3:
	movl	$256, _corkscrew_scan.ioaddr(%rip) ## imm = 0x100
	movl	$256, %edi                      ## imm = 0x100
	movl	$8194, %r12d                    ## imm = 0x2002
	movl	$8192, %r13d                    ## imm = 0x2000
	leaq	L_.str.1(%rip), %r14
	jmp	LBB0_4
	.p2align	4, 0x90
LBB0_7:                                 ##   in Loop: Header=BB0_4 Depth=1
	movl	_corkscrew_scan.ioaddr(%rip), %eax
	leal	32(%rax), %edi
	movl	%edi, _corkscrew_scan.ioaddr(%rip)
	cmpl	$992, %eax                      ## imm = 0x3E0
	jge	LBB0_8
LBB0_4:                                 ## =>This Inner Loop Header: Depth=1
	callq	_check_device
	testl	%eax, %eax
	je	LBB0_7
## %bb.5:                               ##   in Loop: Header=BB0_4 Depth=1
	movl	_corkscrew_scan.ioaddr(%rip), %edi
	addl	%r12d, %edi
	callq	_inl
	movl	%eax, %ebx
	movl	_corkscrew_scan.ioaddr(%rip), %edi
	addl	%r13d, %edi
	callq	_inw
	movq	%r14, %rdi
	movl	%ebx, %esi
	movl	%eax, %edx
	callq	_pr_info
	movl	_corkscrew_scan.ioaddr(%rip), %esi
	movl	_corkscrew_scan.cards_found(%rip), %ecx
	leal	1(%rcx), %eax
	movl	%eax, _corkscrew_scan.cards_found(%rip)
	movq	%r15, %rdi
	xorl	%edx, %edx
                                        ## kill: def $ecx killed $ecx killed $rcx
	callq	_corkscrew_setup
	testl	%eax, %eax
	je	LBB0_9
## %bb.6:                               ##   in Loop: Header=BB0_4 Depth=1
	movq	%r15, %rdi
	callq	_cleanup_card
	jmp	LBB0_7
LBB0_10:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	xorl	%edi, %edi
	subl	(%rax), %edi
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_ERR_PTR                        ## TAILCALL
LBB0_8:
	movq	%r15, %rdi
	callq	_free_netdev
	xorl	%r15d, %r15d
LBB0_9:
	movq	%r15, %rax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
.zerofill __DATA,__bss,_corkscrew_scan.cards_found,4,2 ## @corkscrew_scan.cards_found
.zerofill __DATA,__bss,_corkscrew_scan.ioaddr,4,2 ## @corkscrew_scan.ioaddr
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"eth%d"

L_.str.1:                               ## @.str.1
	.asciz	"3c515 Resource configuration register %#4.4x, DCR %4.4x.\n"

	.comm	_corkscrew_debug,8,3            ## @corkscrew_debug
	.comm	_corkscrew_isapnp_adapters,8,3  ## @corkscrew_isapnp_adapters
	.comm	_nopnp,4,2                      ## @nopnp
	.no_dead_strip	_corkscrew_scan
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function corkscrew_scan
_corkscrew_scan:                        ; @corkscrew_scan
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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	x20, x0
	mov	w0, #4
	bl	_alloc_etherdev
	cbz	x0, LBB0_8
; %bb.1:
	mov	x19, x0
	tbnz	w20, #31, LBB0_3
; %bb.2:
	ldr	w0, [x19]
Lloh0:
	adrp	x1, l_.str@PAGE
Lloh1:
	add	x1, x1, l_.str@PAGEOFF
	mov	x2, x20
	bl	_sprintf
	mov	x0, x19
	bl	_netdev_boot_setup_check
LBB0_3:
	mov	w0, #256
	adrp	x22, _corkscrew_scan.ioaddr@PAGE
	str	w0, [x22, _corkscrew_scan.ioaddr@PAGEOFF]
	mov	w23, #8194
Lloh2:
	adrp	x20, l_.str.1@PAGE
Lloh3:
	add	x20, x20, l_.str.1@PAGEOFF
	adrp	x24, _corkscrew_scan.cards_found@PAGE
	b	LBB0_5
LBB0_4:                                 ;   in Loop: Header=BB0_5 Depth=1
	ldr	w8, [x22, _corkscrew_scan.ioaddr@PAGEOFF]
	add	w0, w8, #32
	str	w0, [x22, _corkscrew_scan.ioaddr@PAGEOFF]
	cmp	w8, #992
	b.ge	LBB0_9
LBB0_5:                                 ; =>This Inner Loop Header: Depth=1
	bl	_check_device
	cbz	w0, LBB0_4
; %bb.6:                                ;   in Loop: Header=BB0_5 Depth=1
	ldr	w8, [x22, _corkscrew_scan.ioaddr@PAGEOFF]
	add	w0, w8, w23
	bl	_inl
	mov	x21, x0
	ldr	w8, [x22, _corkscrew_scan.ioaddr@PAGEOFF]
	add	w0, w8, #2, lsl #12             ; =8192
	bl	_inw
	mov	x2, x0
	mov	x0, x20
	mov	x1, x21
	bl	_pr_info
	ldr	w1, [x22, _corkscrew_scan.ioaddr@PAGEOFF]
	ldr	w3, [x24, _corkscrew_scan.cards_found@PAGEOFF]
	add	w8, w3, #1
	str	w8, [x24, _corkscrew_scan.cards_found@PAGEOFF]
	mov	x0, x19
	mov	x2, #0
	bl	_corkscrew_setup
	cbz	w0, LBB0_10
; %bb.7:                                ;   in Loop: Header=BB0_5 Depth=1
	mov	x0, x19
	bl	_cleanup_card
	b	LBB0_4
LBB0_8:
Lloh4:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh5:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh6:
	ldr	w8, [x8]
	neg	w0, w8
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	b	_ERR_PTR
LBB0_9:
	mov	x0, x19
	bl	_free_netdev
	mov	x19, #0
LBB0_10:
	mov	x0, x19
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.cfi_endproc
                                        ; -- End function
.zerofill __DATA,__bss,_corkscrew_scan.cards_found,4,2 ; @corkscrew_scan.cards_found
.zerofill __DATA,__bss,_corkscrew_scan.ioaddr,4,2 ; @corkscrew_scan.ioaddr
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"eth%d"

l_.str.1:                               ; @.str.1
	.asciz	"3c515 Resource configuration register %#4.4x, DCR %4.4x.\n"

	.comm	_corkscrew_debug,8,3            ; @corkscrew_debug
	.comm	_corkscrew_isapnp_adapters,8,3  ; @corkscrew_isapnp_adapters
	.comm	_nopnp,4,2                      ; @nopnp
	.no_dead_strip	_corkscrew_scan
.subsections_via_symbols
