	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function sis190_get_mac_addr_from_apc
_sis190_get_mac_addr_from_apc:          ## @sis190_get_mac_addr_from_apc
	.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	%rsi, -64(%rbp)                 ## 8-byte Spill
	movq	%rsi, %rdi
	callq	_netdev_priv
	movq	%rax, -56(%rbp)                 ## 8-byte Spill
	movq	%rax, %rdi
	callq	_netif_msg_probe
	testq	%rax, %rax
	je	LBB0_2
## %bb.1:
	movq	%rbx, %rdi
	callq	_pci_name
	leaq	L_.str(%rip), %rdi
	movl	%eax, %esi
	callq	_pr_info
LBB0_2:
	movq	%rbx, -72(%rbp)                 ## 8-byte Spill
	leaq	_sis190_get_mac_addr_from_apc.ids(%rip), %rbx
	movq	%rbx, %rdi
	callq	_ARRAY_SIZE
	testl	%eax, %eax
	je	LBB0_10
## %bb.3:
	xorl	%r14d, %r14d
	movq	_PCI_VENDOR_ID_SI@GOTPCREL(%rip), %r12
	movq	%rbx, %r13
	.p2align	4, 0x90
LBB0_5:                                 ## =>This Inner Loop Header: Depth=1
	movl	(%r12), %edi
	movl	(%r13), %esi
	xorl	%edx, %edx
	callq	_pci_get_device
	testq	%rax, %rax
	jne	LBB0_6
## %bb.4:                               ##   in Loop: Header=BB0_5 Depth=1
	incq	%r14
	movq	%rbx, %rdi
	callq	_ARRAY_SIZE
	movl	%eax, %eax
	addq	$4, %r13
	cmpq	%rax, %r14
	jb	LBB0_5
LBB0_10:
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	callq	_netif_msg_probe
	testq	%rax, %rax
	je	LBB0_12
## %bb.11:
	movq	-72(%rbp), %rdi                 ## 8-byte Reload
	callq	_pci_name
	leaq	L_.str.1(%rip), %rdi
	movl	%eax, %esi
	callq	_pr_info
LBB0_12:
	movq	_EIO@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
	jmp	LBB0_13
LBB0_6:
	movq	%rax, %r15
	leaq	-44(%rbp), %rdx
	movq	%rax, %rdi
	movl	$72, %esi
	callq	_pci_read_config_byte
	movl	-44(%rbp), %edx
	andl	$-3, %edx
	movl	%edx, -48(%rbp)
	movq	%r15, %rdi
	movl	$72, %esi
	callq	_pci_write_config_byte
	movl	$50, %edi
	callq	_udelay
	leaq	-48(%rbp), %rdx
	movq	%r15, %rdi
	movl	$72, %esi
	callq	_pci_read_config_byte
	movq	_ETH_ALEN@GOTPCREL(%rip), %r14
	cmpl	$0, (%r14)
	movq	-64(%rbp), %r12                 ## 8-byte Reload
	je	LBB0_9
## %bb.7:
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_8:                                 ## =>This Inner Loop Header: Depth=1
	leal	9(%rbx), %edi
	movl	$120, %esi
	callq	_outb
	movl	$121, %edi
	callq	_inb
	movq	(%r12), %rcx
	movq	%rax, (%rcx,%rbx,8)
	incq	%rbx
	movl	(%r14), %eax
	cmpq	%rax, %rbx
	jb	LBB0_8
LBB0_9:
	movl	$18, %edi
	movl	$120, %esi
	callq	_outb
	movl	$121, %edi
	callq	_inb
	movl	%eax, -48(%rbp)
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	movl	%eax, %esi
	callq	_sis190_set_rgmii
	movl	-44(%rbp), %edx
	movq	%r15, %rdi
	movl	$72, %esi
	callq	_pci_write_config_byte
	movq	%r15, %rdi
	callq	_pci_dev_put
	xorl	%eax, %eax
LBB0_13:
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__const
	.p2align	2                               ## @sis190_get_mac_addr_from_apc.ids
_sis190_get_mac_addr_from_apc.ids:
	.long	2405                            ## 0x965
	.long	2406                            ## 0x966
	.long	2408                            ## 0x968

	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"%s: Read MAC address from APC\n"

	.comm	_PCI_VENDOR_ID_SI,4,2           ## @PCI_VENDOR_ID_SI
L_.str.1:                               ## @.str.1
	.asciz	"%s: Can not find ISA bridge\n"

	.comm	_EIO,4,2                        ## @EIO
	.comm	_ETH_ALEN,4,2                   ## @ETH_ALEN
	.no_dead_strip	_sis190_get_mac_addr_from_apc
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function sis190_get_mac_addr_from_apc
_sis190_get_mac_addr_from_apc:          ; @sis190_get_mac_addr_from_apc
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #96
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	mov	x20, x1
	mov	x22, x0
	mov	x0, x1
	bl	_netdev_priv
	mov	x19, x0
	bl	_netif_msg_probe
	cbz	x0, LBB0_2
; %bb.1:
	mov	x0, x22
	bl	_pci_name
	mov	x1, x0
Lloh0:
	adrp	x0, l_.str@PAGE
Lloh1:
	add	x0, x0, l_.str@PAGEOFF
	bl	_pr_info
LBB0_2:
Lloh2:
	adrp	x23, _sis190_get_mac_addr_from_apc.ids@PAGE
Lloh3:
	add	x23, x23, _sis190_get_mac_addr_from_apc.ids@PAGEOFF
	mov	x0, x23
	bl	_ARRAY_SIZE
	cbz	w0, LBB0_6
; %bb.3:
	mov	x24, #0
Lloh4:
	adrp	x25, _PCI_VENDOR_ID_SI@GOTPAGE
Lloh5:
	ldr	x25, [x25, _PCI_VENDOR_ID_SI@GOTPAGEOFF]
LBB0_4:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w0, [x25]
	ldr	w1, [x23, x24, lsl #2]
	mov	x2, #0
	bl	_pci_get_device
	cbnz	x0, LBB0_9
; %bb.5:                                ;   in Loop: Header=BB0_4 Depth=1
	add	x24, x24, #1
	mov	x0, x23
	bl	_ARRAY_SIZE
	cmp	x24, w0, uxtw
	b.lo	LBB0_4
LBB0_6:
	mov	x0, x19
	bl	_netif_msg_probe
	cbz	x0, LBB0_8
; %bb.7:
	mov	x0, x22
	bl	_pci_name
	mov	x1, x0
Lloh6:
	adrp	x0, l_.str.1@PAGE
Lloh7:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_pr_info
LBB0_8:
Lloh8:
	adrp	x8, _EIO@GOTPAGE
Lloh9:
	ldr	x8, [x8, _EIO@GOTPAGEOFF]
Lloh10:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_13
LBB0_9:
	mov	x21, x0
	add	x2, sp, #8
	mov	w1, #72
	bl	_pci_read_config_byte
	ldr	w8, [sp, #8]
	and	w2, w8, #0xfffffffd
	str	w2, [sp, #12]
	mov	x0, x21
	mov	w1, #72
	bl	_pci_write_config_byte
	mov	w0, #50
	bl	_udelay
	add	x2, sp, #12
	mov	x0, x21
	mov	w1, #72
	bl	_pci_read_config_byte
Lloh11:
	adrp	x22, _ETH_ALEN@GOTPAGE
Lloh12:
	ldr	x22, [x22, _ETH_ALEN@GOTPAGEOFF]
	ldr	w8, [x22]
	cbz	w8, LBB0_12
; %bb.10:
	mov	x23, #0
LBB0_11:                                ; =>This Inner Loop Header: Depth=1
	add	w0, w23, #9
	mov	w1, #120
	bl	_outb
	mov	w0, #121
	bl	_inb
	ldr	x8, [x20]
	str	x0, [x8, x23, lsl #3]
	add	x23, x23, #1
	ldr	w8, [x22]
	cmp	x23, x8
	b.lo	LBB0_11
LBB0_12:
	mov	w0, #18
	mov	w1, #120
	bl	_outb
	mov	w0, #121
	bl	_inb
	mov	x1, x0
	str	w1, [sp, #12]
	mov	x0, x19
                                        ; kill: def $w1 killed $w1 killed $x1
	bl	_sis190_set_rgmii
	ldr	w2, [sp, #8]
	mov	x0, x21
	mov	w1, #72
	bl	_pci_write_config_byte
	mov	x0, x21
	bl	_pci_dev_put
	mov	w0, #0
LBB0_13:
	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
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #96
	ret
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh11, Lloh12
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__const
	.p2align	2                               ; @sis190_get_mac_addr_from_apc.ids
_sis190_get_mac_addr_from_apc.ids:
	.long	2405                            ; 0x965
	.long	2406                            ; 0x966
	.long	2408                            ; 0x968

	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"%s: Read MAC address from APC\n"

	.comm	_PCI_VENDOR_ID_SI,4,2           ; @PCI_VENDOR_ID_SI
l_.str.1:                               ; @.str.1
	.asciz	"%s: Can not find ISA bridge\n"

	.comm	_EIO,4,2                        ; @EIO
	.comm	_ETH_ALEN,4,2                   ; @ETH_ALEN
	.no_dead_strip	_sis190_get_mac_addr_from_apc
.subsections_via_symbols
