	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function get_phy_c45_ids
_get_phy_c45_ids:                       ## @get_phy_c45_ids
	.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	$56, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdx, -56(%rbp)                 ## 8-byte Spill
	movl	%esi, -44(%rbp)                 ## 4-byte Spill
	movq	%rdi, %r13
	movq	%rcx, -64(%rbp)                 ## 8-byte Spill
	movq	(%rcx), %rdi
	callq	_ARRAY_SIZE
	cmpl	$2, %eax
	jl	LBB0_15
## %bb.1:
	movl	%eax, %r14d
	movq	-64(%rbp), %rax                 ## 8-byte Reload
	leaq	8(%rax), %r12
	movl	(%r12), %eax
	movl	$1, %r15d
	movl	-44(%rbp), %ebx                 ## 4-byte Reload
	.p2align	4, 0x90
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	testl	%eax, %eax
	jne	LBB0_9
## %bb.3:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	%r13, %rdi
	movl	%ebx, %esi
	movl	%r15d, %edx
	movq	%r12, %rcx
	callq	_get_phy_c45_devs_in_pkg
	testl	%eax, %eax
	js	LBB0_17
## %bb.4:                               ##   in Loop: Header=BB0_2 Depth=1
	movl	(%r12), %eax
	movl	%eax, %ecx
	notl	%ecx
	testl	$536870911, %ecx                ## imm = 0x1FFFFFFF
	je	LBB0_6
## %bb.5:                               ##   in Loop: Header=BB0_2 Depth=1
	incl	%r15d
	cmpl	%r15d, %r14d
	jne	LBB0_2
	jmp	LBB0_9
LBB0_6:
	xorl	%r15d, %r15d
	movq	%r13, %rdi
	movl	%ebx, %esi
	xorl	%edx, %edx
	movq	%r12, %rcx
	callq	_get_phy_c45_devs_in_pkg
	testl	%eax, %eax
	js	LBB0_20
## %bb.7:
	movl	(%r12), %eax
	notl	%eax
	testl	$536870911, %eax                ## imm = 0x1FFFFFFF
	jne	LBB0_9
## %bb.8:
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	movl	$-1, (%rax)
	jmp	LBB0_16
LBB0_9:
	movl	%r14d, %eax
	movq	%rax, -88(%rbp)                 ## 8-byte Spill
	movl	$1, %ebx
	movl	$65536, %r15d                   ## imm = 0x10000
	movq	_MII_ADDR_C45@GOTPCREL(%rip), %r14
	movq	%r13, -80(%rbp)                 ## 8-byte Spill
	movq	%r12, -72(%rbp)                 ## 8-byte Spill
	jmp	LBB0_11
	.p2align	4, 0x90
LBB0_10:                                ##   in Loop: Header=BB0_11 Depth=1
	incq	%rbx
	addl	$65536, %r15d                   ## imm = 0x10000
	cmpq	%rbx, -88(%rbp)                 ## 8-byte Folded Reload
	je	LBB0_15
LBB0_11:                                ## =>This Inner Loop Header: Depth=1
	movl	(%r12), %eax
	btl	%ebx, %eax
	jae	LBB0_10
## %bb.12:                              ##   in Loop: Header=BB0_11 Depth=1
	movl	(%r14), %edx
	orl	%r15d, %edx
	movq	_MII_PHYSID1@GOTPCREL(%rip), %rax
	orl	(%rax), %edx
	movq	%r13, %rdi
	movl	-44(%rbp), %r12d                ## 4-byte Reload
	movl	%r12d, %esi
	callq	_mdiobus_read
	testl	%eax, %eax
	js	LBB0_17
## %bb.13:                              ##   in Loop: Header=BB0_11 Depth=1
	shll	$16, %eax
	movq	%r14, %rdx
	movq	-64(%rbp), %r14                 ## 8-byte Reload
	movq	(%r14), %rcx
	movl	%eax, (%rcx,%rbx,4)
	movl	(%rdx), %edx
	orl	%r15d, %edx
	movq	_MII_PHYSID2@GOTPCREL(%rip), %rax
	orl	(%rax), %edx
	movq	%r13, %rdi
	movl	%r12d, %esi
	callq	_mdiobus_read
	testl	%eax, %eax
	js	LBB0_17
## %bb.14:                              ##   in Loop: Header=BB0_11 Depth=1
	movq	(%r14), %rcx
	orl	%eax, (%rcx,%rbx,4)
	movq	-80(%rbp), %r13                 ## 8-byte Reload
	movq	-72(%rbp), %r12                 ## 8-byte Reload
	movq	_MII_ADDR_C45@GOTPCREL(%rip), %r14
	jmp	LBB0_10
LBB0_15:
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	movl	$0, (%rax)
LBB0_16:
	xorl	%r15d, %r15d
	jmp	LBB0_19
LBB0_17:
	movq	_EIO@GOTPCREL(%rip), %rax
	xorl	%r15d, %r15d
LBB0_18:
	subl	(%rax), %r15d
LBB0_19:
	movl	%r15d, %eax
	addq	$56, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_20:
	movq	_EIO@GOTPCREL(%rip), %rax
	jmp	LBB0_18
	.cfi_endproc
                                        ## -- End function
	.comm	_EIO,4,2                        ## @EIO
	.comm	_MII_ADDR_C45,4,2               ## @MII_ADDR_C45
	.comm	_MII_PHYSID1,4,2                ## @MII_PHYSID1
	.comm	_MII_PHYSID2,4,2                ## @MII_PHYSID2
	.no_dead_strip	_get_phy_c45_ids
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function get_phy_c45_ids
_get_phy_c45_ids:                       ; @get_phy_c45_ids
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	stp	x28, x27, [sp, #16]             ; 16-byte Folded Spill
	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
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	mov	x20, x3
	str	x2, [sp, #8]                    ; 8-byte Folded Spill
	mov	x21, x1
	mov	x22, x0
	mov	x23, x3
	ldr	x0, [x23], #8
	bl	_ARRAY_SIZE
	cmp	w0, #2
	b.lt	LBB0_15
; %bb.1:
	mov	x24, x0
	ldr	w8, [x23]
	mov	w25, #1
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	cbnz	w8, LBB0_9
; %bb.3:                                ;   in Loop: Header=BB0_2 Depth=1
	mov	x0, x22
	mov	x1, x21
	mov	x2, x25
	mov	x3, x23
	bl	_get_phy_c45_devs_in_pkg
	tbnz	w0, #31, LBB0_16
; %bb.4:                                ;   in Loop: Header=BB0_2 Depth=1
	ldr	w8, [x23]
	mvn	w9, w8
	tst	w9, #0x1fffffff
	b.eq	LBB0_6
; %bb.5:                                ;   in Loop: Header=BB0_2 Depth=1
	add	w25, w25, #1
	cmp	w24, w25
	b.ne	LBB0_2
	b	LBB0_9
LBB0_6:
	mov	x0, x22
	mov	x1, x21
	mov	w2, #0
	mov	x3, x23
	bl	_get_phy_c45_devs_in_pkg
	tbnz	w0, #31, LBB0_16
; %bb.7:
	ldr	w8, [x23]
	mvn	w8, w8
	tst	w8, #0x1fffffff
	b.ne	LBB0_9
; %bb.8:
	mov	w0, #0
	mov	w8, #-1
	ldr	x9, [sp, #8]                    ; 8-byte Folded Reload
	str	w8, [x9]
	b	LBB0_17
LBB0_9:
	mov	w25, #65536
Lloh0:
	adrp	x26, _MII_ADDR_C45@GOTPAGE
Lloh1:
	ldr	x26, [x26, _MII_ADDR_C45@GOTPAGEOFF]
	mov	w27, #1
Lloh2:
	adrp	x28, _MII_PHYSID1@GOTPAGE
Lloh3:
	ldr	x28, [x28, _MII_PHYSID1@GOTPAGEOFF]
Lloh4:
	adrp	x19, _MII_PHYSID2@GOTPAGE
Lloh5:
	ldr	x19, [x19, _MII_PHYSID2@GOTPAGEOFF]
	mov	w24, w24
	b	LBB0_11
LBB0_10:                                ;   in Loop: Header=BB0_11 Depth=1
	add	x27, x27, #1
	add	w25, w25, #16, lsl #12          ; =65536
	cmp	x24, x27
	b.eq	LBB0_15
LBB0_11:                                ; =>This Inner Loop Header: Depth=1
	ldr	w8, [x23]
	lsr	w8, w8, w27
	tbz	w8, #0, LBB0_10
; %bb.12:                               ;   in Loop: Header=BB0_11 Depth=1
	ldr	w8, [x26]
	orr	w8, w8, w25
	ldr	w9, [x28]
	orr	w2, w8, w9
	mov	x0, x22
	mov	x1, x21
	bl	_mdiobus_read
	tbnz	w0, #31, LBB0_16
; %bb.13:                               ;   in Loop: Header=BB0_11 Depth=1
	lsl	w8, w0, #16
	ldr	x9, [x20]
	str	w8, [x9, x27, lsl #2]
	ldr	w8, [x26]
	orr	w8, w8, w25
	ldr	w9, [x19]
	orr	w2, w8, w9
	mov	x0, x22
	mov	x1, x21
	bl	_mdiobus_read
	tbnz	w0, #31, LBB0_16
; %bb.14:                               ;   in Loop: Header=BB0_11 Depth=1
	ldr	x8, [x20]
	lsl	x9, x27, #2
	ldr	w10, [x8, x9]
	orr	w10, w10, w0
	str	w10, [x8, x9]
	b	LBB0_10
LBB0_15:
	mov	w0, #0
	ldr	x8, [sp, #8]                    ; 8-byte Folded Reload
	str	wzr, [x8]
	b	LBB0_17
LBB0_16:
Lloh6:
	adrp	x8, _EIO@GOTPAGE
Lloh7:
	ldr	x8, [x8, _EIO@GOTPAGEOFF]
Lloh8:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_17:
	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
	ldp	x28, x27, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #112
	ret
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.cfi_endproc
                                        ; -- End function
	.comm	_EIO,4,2                        ; @EIO
	.comm	_MII_ADDR_C45,4,2               ; @MII_ADDR_C45
	.comm	_MII_PHYSID1,4,2                ; @MII_PHYSID1
	.comm	_MII_PHYSID2,4,2                ; @MII_PHYSID2
	.no_dead_strip	_get_phy_c45_ids
.subsections_via_symbols
