	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_of_get_phy_mode                ## -- Begin function of_get_phy_mode
	.p2align	4, 0x90
_of_get_phy_mode:                       ## @of_get_phy_mode
	.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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %rbx
	leaq	L_.str(%rip), %rsi
	leaq	-32(%rbp), %rdx
	callq	_of_property_read_string
	testl	%eax, %eax
	jns	LBB0_3
## %bb.1:
	leaq	L_.str.1(%rip), %rsi
	leaq	-32(%rbp), %rdx
	movq	%rbx, %rdi
	callq	_of_property_read_string
	testl	%eax, %eax
	js	LBB0_2
LBB0_3:
	movq	_PHY_INTERFACE_MODE_MAX@GOTPCREL(%rip), %r15
	cmpl	$0, (%r15)
	jle	LBB0_7
## %bb.4:
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_5:                                 ## =>This Inner Loop Header: Depth=1
	movq	-32(%rbp), %r14
	movl	%ebx, %edi
	callq	_phy_modes
	movq	%r14, %rdi
	movl	%eax, %esi
	callq	_strcasecmp
	testl	%eax, %eax
	je	LBB0_8
## %bb.6:                               ##   in Loop: Header=BB0_5 Depth=1
	incl	%ebx
	cmpl	(%r15), %ebx
	jl	LBB0_5
LBB0_7:
	movq	_ENODEV@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
	jmp	LBB0_8
LBB0_2:
	movl	%eax, %ebx
LBB0_8:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"phy-mode"

L_.str.1:                               ## @.str.1
	.asciz	"phy-connection-type"

	.comm	_PHY_INTERFACE_MODE_MAX,4,2     ## @PHY_INTERFACE_MODE_MAX
	.comm	_ENODEV,4,2                     ## @ENODEV
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_of_get_phy_mode                ; -- Begin function of_get_phy_mode
	.p2align	2
_of_get_phy_mode:                       ; @of_get_phy_mode
	.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
Lloh0:
	adrp	x1, l_.str@PAGE
Lloh1:
	add	x1, x1, l_.str@PAGEOFF
	add	x2, sp, #8
	bl	_of_property_read_string
	tbz	w0, #31, LBB0_2
; %bb.1:
Lloh2:
	adrp	x1, l_.str.1@PAGE
Lloh3:
	add	x1, x1, l_.str.1@PAGEOFF
	add	x2, sp, #8
	mov	x0, x19
	bl	_of_property_read_string
	tbnz	w0, #31, LBB0_7
LBB0_2:
Lloh4:
	adrp	x21, _PHY_INTERFACE_MODE_MAX@GOTPAGE
Lloh5:
	ldr	x21, [x21, _PHY_INTERFACE_MODE_MAX@GOTPAGEOFF]
	ldr	w8, [x21]
	cmp	w8, #1
	b.lt	LBB0_6
; %bb.3:
	mov	w19, #0
LBB0_4:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x20, [sp, #8]
	mov	x0, x19
	bl	_phy_modes
	mov	x1, x0
	mov	x0, x20
	bl	_strcasecmp
	cbz	w0, LBB0_8
; %bb.5:                                ;   in Loop: Header=BB0_4 Depth=1
	add	w19, w19, #1
	ldr	w8, [x21]
	cmp	w19, w8
	b.lt	LBB0_4
LBB0_6:
Lloh6:
	adrp	x8, _ENODEV@GOTPAGE
Lloh7:
	ldr	x8, [x8, _ENODEV@GOTPAGEOFF]
Lloh8:
	ldr	w8, [x8]
	neg	w19, w8
	b	LBB0_8
LBB0_7:
	mov	x19, x0
LBB0_8:
	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
	add	sp, sp, #64
	ret
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"phy-mode"

l_.str.1:                               ; @.str.1
	.asciz	"phy-connection-type"

	.comm	_PHY_INTERFACE_MODE_MAX,4,2     ; @PHY_INTERFACE_MODE_MAX
	.comm	_ENODEV,4,2                     ; @ENODEV
.subsections_via_symbols
