	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function com20020_config
_com20020_config:                       ## @com20020_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
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r13
	movq	24(%rdi), %rax
	movq	(%rax), %r15
	leaq	4(%rdi), %r14
	leaq	L_.str(%rip), %rsi
	movq	%r14, %rdi
	xorl	%eax, %eax
	callq	_dev_dbg
	leaq	L_.str.1(%rip), %rsi
	movq	%r14, %rdi
	xorl	%eax, %eax
	callq	_dev_dbg
	movq	16(%r13), %rax
	movq	(%rax), %rax
	movl	(%rax), %edx
	leaq	L_.str.2(%rip), %rsi
	movq	%r14, %rdi
	xorl	%eax, %eax
	callq	_dev_dbg
	movl	$16, (%r13)
	movq	16(%r13), %rax
	movq	(%rax), %rax
	cmpl	$0, (%rax)
	je	LBB0_1
## %bb.7:
	movq	%r13, %rdi
	callq	_pcmcia_request_io
	testl	%eax, %eax
	je	LBB0_5
LBB0_8:
	leaq	L_.str.3(%rip), %rsi
	jmp	LBB0_9
LBB0_1:
	movl	$256, (%rax)                    ## imm = 0x100
	movq	%r13, %rdi
	callq	_pcmcia_request_io
	testl	%eax, %eax
	je	LBB0_5
## %bb.2:
	movl	$272, %ebx                      ## imm = 0x110
	.p2align	4, 0x90
LBB0_3:                                 ## =>This Inner Loop Header: Depth=1
	leal	-16(%rbx), %eax
	cmpl	$1007, %eax                     ## imm = 0x3EF
	ja	LBB0_8
## %bb.4:                               ##   in Loop: Header=BB0_3 Depth=1
	movq	16(%r13), %rax
	movq	(%rax), %rax
	movl	%ebx, (%rax)
	movq	%r13, %rdi
	callq	_pcmcia_request_io
	addl	$16, %ebx
	testl	%eax, %eax
	jne	LBB0_3
LBB0_5:
	movq	16(%r13), %rax
	movq	(%rax), %rax
	movl	(%rax), %edx
	movl	%edx, (%r15)
	leaq	L_.str.4(%rip), %rsi
	movq	%r14, %rdi
	xorl	%eax, %eax
	callq	_dev_dbg
	movl	8(%r13), %edx
	leaq	L_.str.5(%rip), %rsi
	movq	%r14, %rdi
	xorl	%eax, %eax
	callq	_dev_dbg
	movl	8(%r13), %eax
	testl	%eax, %eax
	je	LBB0_6
## %bb.10:
	movl	%eax, 4(%r15)
	movq	%r13, %rdi
	callq	_pcmcia_enable_device
	testl	%eax, %eax
	jne	LBB0_15
## %bb.11:
	movq	%r15, %rdi
	callq	_com20020_check
	testq	%rax, %rax
	je	LBB0_13
## %bb.12:
	movq	%r15, %rdi
	callq	_regdump
	jmp	LBB0_15
LBB0_6:
	leaq	L_.str.6(%rip), %rsi
LBB0_9:
	movq	%r14, %rdi
	xorl	%eax, %eax
	callq	_dev_dbg
LBB0_15:
	leaq	L_.str.10(%rip), %rsi
	xorl	%r12d, %r12d
	movq	%r14, %rdi
	xorl	%eax, %eax
	callq	_dev_dbg
	movq	%r13, %rdi
	callq	_com20020_release
	movq	_ENODEV@GOTPCREL(%rip), %rax
	subl	(%rax), %r12d
LBB0_16:
	movl	%r12d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_13:
	movq	%r15, %rdi
	callq	_netdev_priv
	leaq	L_.str.7(%rip), %rcx
	movq	%rcx, (%rax)
	movq	_ARC_CAN_10MBIT@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	movl	%ecx, 8(%rax)
	movq	%r15, %rdi
	movq	%r14, %rsi
	callq	_SET_NETDEV_DEV
	xorl	%r12d, %r12d
	movq	%r15, %rdi
	xorl	%esi, %esi
	callq	_com20020_found
	testl	%eax, %eax
	je	LBB0_17
## %bb.14:
	leaq	L_.str.8(%rip), %rsi
	movq	%r14, %rdi
	callq	_dev_notice
	jmp	LBB0_15
LBB0_17:
	movl	(%r15), %edx
	movl	4(%r15), %ecx
	leaq	L_.str.9(%rip), %rsi
	movq	%r15, %rdi
	callq	_netdev_dbg
	jmp	LBB0_16
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"config...\n"

L_.str.1:                               ## @.str.1
	.asciz	"com20020_config\n"

L_.str.2:                               ## @.str.2
	.asciz	"baseport1 is %Xh\n"

	.comm	_ENODEV,4,2                     ## @ENODEV
L_.str.3:                               ## @.str.3
	.asciz	"requestIO failed totally!\n"

L_.str.4:                               ## @.str.4
	.asciz	"got ioaddr %Xh\n"

L_.str.5:                               ## @.str.5
	.asciz	"request IRQ %d\n"

L_.str.6:                               ## @.str.6
	.asciz	"requestIRQ failed totally!\n"

L_.str.7:                               ## @.str.7
	.asciz	"PCMCIA COM20020"

	.comm	_ARC_CAN_10MBIT,4,2             ## @ARC_CAN_10MBIT
L_.str.8:                               ## @.str.8
	.asciz	"com20020_found() failed\n"

L_.str.9:                               ## @.str.9
	.asciz	"port %#3lx, irq %d\n"

L_.str.10:                              ## @.str.10
	.asciz	"com20020_config failed...\n"

	.no_dead_strip	_com20020_config
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function com20020_config
_com20020_config:                       ; @com20020_config
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.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
	mov	x19, x0
	ldr	x8, [x0, #24]
	ldr	x21, [x8]
	add	x20, x0, #4
Lloh0:
	adrp	x1, l_.str@PAGE
Lloh1:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x20
	bl	_dev_dbg
Lloh2:
	adrp	x1, l_.str.1@PAGE
Lloh3:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x20
	bl	_dev_dbg
	ldr	x8, [x19, #16]
	ldr	x8, [x8]
	ldr	w8, [x8]
	str	x8, [sp]
Lloh4:
	adrp	x1, l_.str.2@PAGE
Lloh5:
	add	x1, x1, l_.str.2@PAGEOFF
	mov	x0, x20
	bl	_dev_dbg
	mov	w8, #16
	str	w8, [x19]
	ldr	x8, [x19, #16]
	ldr	x8, [x8]
	ldr	w9, [x8]
	cbz	w9, LBB0_3
; %bb.1:
	mov	x0, x19
	bl	_pcmcia_request_io
	cbz	w0, LBB0_7
LBB0_2:
Lloh6:
	adrp	x1, l_.str.3@PAGE
Lloh7:
	add	x1, x1, l_.str.3@PAGEOFF
	b	LBB0_12
LBB0_3:
	mov	w9, #256
	str	w9, [x8]
	mov	x0, x19
	bl	_pcmcia_request_io
	cbz	w0, LBB0_7
; %bb.4:
	mov	w22, #272
LBB0_5:                                 ; =>This Inner Loop Header: Depth=1
	sub	w8, w22, #16
	cmp	w8, #1007
	b.hi	LBB0_2
; %bb.6:                                ;   in Loop: Header=BB0_5 Depth=1
	ldr	x8, [x19, #16]
	ldr	x8, [x8]
	str	w22, [x8]
	mov	x0, x19
	bl	_pcmcia_request_io
	add	w22, w22, #16
	cbnz	w0, LBB0_5
LBB0_7:
	ldr	x8, [x19, #16]
	ldr	x8, [x8]
	ldr	w8, [x8]
	str	w8, [x21]
	str	x8, [sp]
Lloh8:
	adrp	x1, l_.str.4@PAGE
Lloh9:
	add	x1, x1, l_.str.4@PAGEOFF
	mov	x0, x20
	bl	_dev_dbg
	ldr	w8, [x19, #8]
	str	x8, [sp]
Lloh10:
	adrp	x1, l_.str.5@PAGE
Lloh11:
	add	x1, x1, l_.str.5@PAGEOFF
	mov	x0, x20
	bl	_dev_dbg
	ldr	w8, [x19, #8]
	cbz	w8, LBB0_11
; %bb.8:
	str	w8, [x21, #4]
	mov	x0, x19
	bl	_pcmcia_enable_device
	cbnz	w0, LBB0_13
; %bb.9:
	mov	x0, x21
	bl	_com20020_check
	cbz	x0, LBB0_15
; %bb.10:
	mov	x0, x21
	bl	_regdump
	b	LBB0_13
LBB0_11:
Lloh12:
	adrp	x1, l_.str.6@PAGE
Lloh13:
	add	x1, x1, l_.str.6@PAGEOFF
LBB0_12:
	mov	x0, x20
	bl	_dev_dbg
LBB0_13:
Lloh14:
	adrp	x1, l_.str.10@PAGE
Lloh15:
	add	x1, x1, l_.str.10@PAGEOFF
	mov	x0, x20
	bl	_dev_dbg
	mov	x0, x19
	bl	_com20020_release
Lloh16:
	adrp	x8, _ENODEV@GOTPAGE
Lloh17:
	ldr	x8, [x8, _ENODEV@GOTPAGEOFF]
Lloh18:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_14:
	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
	add	sp, sp, #64
	ret
LBB0_15:
	mov	x0, x21
	bl	_netdev_priv
Lloh19:
	adrp	x8, l_.str.7@PAGE
Lloh20:
	add	x8, x8, l_.str.7@PAGEOFF
	str	x8, [x0]
Lloh21:
	adrp	x8, _ARC_CAN_10MBIT@GOTPAGE
Lloh22:
	ldr	x8, [x8, _ARC_CAN_10MBIT@GOTPAGEOFF]
Lloh23:
	ldr	w8, [x8]
	str	w8, [x0, #8]
	mov	x0, x21
	mov	x1, x20
	bl	_SET_NETDEV_DEV
	mov	x0, x21
	mov	w1, #0
	bl	_com20020_found
	cbz	w0, LBB0_17
; %bb.16:
Lloh24:
	adrp	x1, l_.str.8@PAGE
Lloh25:
	add	x1, x1, l_.str.8@PAGEOFF
	mov	x0, x20
	bl	_dev_notice
	b	LBB0_13
LBB0_17:
	ldp	w2, w3, [x21]
Lloh26:
	adrp	x1, l_.str.9@PAGE
Lloh27:
	add	x1, x1, l_.str.9@PAGEOFF
	mov	x0, x21
	bl	_netdev_dbg
	mov	w0, #0
	b	LBB0_14
	.loh AdrpAdd	Lloh4, Lloh5
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpAdd	Lloh10, Lloh11
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpAdd	Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpAdd	Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpAdd	Lloh19, Lloh20
	.loh AdrpAdd	Lloh24, Lloh25
	.loh AdrpAdd	Lloh26, Lloh27
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"config...\n"

l_.str.1:                               ; @.str.1
	.asciz	"com20020_config\n"

l_.str.2:                               ; @.str.2
	.asciz	"baseport1 is %Xh\n"

	.comm	_ENODEV,4,2                     ; @ENODEV
l_.str.3:                               ; @.str.3
	.asciz	"requestIO failed totally!\n"

l_.str.4:                               ; @.str.4
	.asciz	"got ioaddr %Xh\n"

l_.str.5:                               ; @.str.5
	.asciz	"request IRQ %d\n"

l_.str.6:                               ; @.str.6
	.asciz	"requestIRQ failed totally!\n"

l_.str.7:                               ; @.str.7
	.asciz	"PCMCIA COM20020"

	.comm	_ARC_CAN_10MBIT,4,2             ; @ARC_CAN_10MBIT
l_.str.8:                               ; @.str.8
	.asciz	"com20020_found() failed\n"

l_.str.9:                               ; @.str.9
	.asciz	"port %#3lx, irq %d\n"

l_.str.10:                              ; @.str.10
	.asciz	"com20020_config failed...\n"

	.no_dead_strip	_com20020_config
.subsections_via_symbols
