	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function hns_mac_get_phy_if_acpi
_hns_mac_get_phy_if_acpi:               ## @hns_mac_get_phy_if_acpi
	.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	%r12
	pushq	%rbx
	subq	$32, %rsp
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r15
	movq	_PHY_INTERFACE_MODE_NA@GOTPCREL(%rip), %rax
	movl	(%rax), %r14d
	movq	_ACPI_TYPE_INTEGER@GOTPCREL(%rip), %r12
	movq	(%r12), %rax
	movq	%rax, -56(%rbp)
	movq	(%rdi), %rax
	movq	%rax, -64(%rbp)
	movq	_ACPI_TYPE_PACKAGE@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	movl	$1, -48(%rbp)
	leaq	-64(%rbp), %rax
	movq	%rax, -40(%rbp)
	movl	8(%rdi), %edi
	callq	_ACPI_HANDLE
	movq	_HNS_OP_GET_PORT_TYPE_FUNC@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	movq	_hns_dsaf_acpi_dsm_guid@GOTPCREL(%rip), %rsi
	leaq	-48(%rbp), %r8
	movl	%eax, %edi
	xorl	%edx, %edx
	callq	_acpi_evaluate_dsm
	testq	%rax, %rax
	je	LBB0_6
## %bb.1:
	movq	%rax, %rbx
	movq	(%rax), %rax
	cmpq	(%r12), %rax
	jne	LBB0_6
## %bb.2:
	testq	%rax, %rax
	jne	LBB0_3
## %bb.4:
	movq	_PHY_INTERFACE_MODE_SGMII@GOTPCREL(%rip), %rax
	jmp	LBB0_5
LBB0_3:
	movq	_PHY_INTERFACE_MODE_XGMII@GOTPCREL(%rip), %rax
LBB0_5:
	movl	(%rax), %r14d
	movl	8(%r15), %edi
	movq	(%r15), %rdx
	leaq	L_.str(%rip), %rsi
	movl	%r14d, %ecx
	callq	_dev_dbg
	movq	%rbx, %rdi
	callq	_ACPI_FREE
LBB0_6:
	movl	%r14d, %eax
	addq	$32, %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_PHY_INTERFACE_MODE_NA,4,2      ## @PHY_INTERFACE_MODE_NA
	.comm	_ACPI_TYPE_INTEGER,8,3          ## @ACPI_TYPE_INTEGER
	.comm	_ACPI_TYPE_PACKAGE,8,3          ## @ACPI_TYPE_PACKAGE
	.comm	_hns_dsaf_acpi_dsm_guid,4,2     ## @hns_dsaf_acpi_dsm_guid
	.comm	_HNS_OP_GET_PORT_TYPE_FUNC,4,2  ## @HNS_OP_GET_PORT_TYPE_FUNC
	.comm	_PHY_INTERFACE_MODE_XGMII,4,2   ## @PHY_INTERFACE_MODE_XGMII
	.comm	_PHY_INTERFACE_MODE_SGMII,4,2   ## @PHY_INTERFACE_MODE_SGMII
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"mac_id=%d, phy_if=%d\n"

	.no_dead_strip	_hns_mac_get_phy_if_acpi
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function hns_mac_get_phy_if_acpi
_hns_mac_get_phy_if_acpi:               ; @hns_mac_get_phy_if_acpi
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.cfi_def_cfa_offset 80
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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	x22, _ACPI_TYPE_INTEGER@GOTPAGE
Lloh1:
	ldr	x22, [x22, _ACPI_TYPE_INTEGER@GOTPAGEOFF]
	ldr	x8, [x22]
	ldr	x9, [x0]
	stp	x9, x8, [sp, #16]
Lloh2:
	adrp	x8, _ACPI_TYPE_PACKAGE@GOTPAGE
Lloh3:
	ldr	x8, [x8, _ACPI_TYPE_PACKAGE@GOTPAGEOFF]
Lloh4:
	ldr	x8, [x8]
	mov	w9, #1
	add	x10, sp, #16
	str	x8, [sp]
	str	w9, [sp]
Lloh5:
	adrp	x8, _PHY_INTERFACE_MODE_NA@GOTPAGE
Lloh6:
	ldr	x8, [x8, _PHY_INTERFACE_MODE_NA@GOTPAGEOFF]
Lloh7:
	ldr	w20, [x8]
	str	x10, [sp, #8]
	ldr	w0, [x0, #8]
	bl	_ACPI_HANDLE
Lloh8:
	adrp	x8, _HNS_OP_GET_PORT_TYPE_FUNC@GOTPAGE
Lloh9:
	ldr	x8, [x8, _HNS_OP_GET_PORT_TYPE_FUNC@GOTPAGEOFF]
Lloh10:
	ldr	w3, [x8]
Lloh11:
	adrp	x1, _hns_dsaf_acpi_dsm_guid@GOTPAGE
Lloh12:
	ldr	x1, [x1, _hns_dsaf_acpi_dsm_guid@GOTPAGEOFF]
	mov	x4, sp
	mov	w2, #0
	bl	_acpi_evaluate_dsm
	cbz	x0, LBB0_3
; %bb.1:
	mov	x21, x0
	ldr	x8, [x0]
	ldr	x9, [x22]
	cmp	x8, x9
	b.ne	LBB0_3
; %bb.2:
Lloh13:
	adrp	x9, _PHY_INTERFACE_MODE_XGMII@GOTPAGE
Lloh14:
	ldr	x9, [x9, _PHY_INTERFACE_MODE_XGMII@GOTPAGEOFF]
Lloh15:
	adrp	x10, _PHY_INTERFACE_MODE_SGMII@GOTPAGE
Lloh16:
	ldr	x10, [x10, _PHY_INTERFACE_MODE_SGMII@GOTPAGEOFF]
	cmp	x8, #0
	csel	x8, x10, x9, eq
	ldr	w20, [x8]
	ldr	w0, [x19, #8]
	ldr	x2, [x19]
Lloh17:
	adrp	x1, l_.str@PAGE
Lloh18:
	add	x1, x1, l_.str@PAGEOFF
	mov	x3, x20
	bl	_dev_dbg
	mov	x0, x21
	bl	_ACPI_FREE
LBB0_3:
	mov	x0, x20
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #80
	ret
	.loh AdrpLdrGot	Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh17, Lloh18
	.loh AdrpLdrGot	Lloh15, Lloh16
	.loh AdrpLdrGot	Lloh13, Lloh14
	.cfi_endproc
                                        ; -- End function
	.comm	_PHY_INTERFACE_MODE_NA,4,2      ; @PHY_INTERFACE_MODE_NA
	.comm	_ACPI_TYPE_INTEGER,8,3          ; @ACPI_TYPE_INTEGER
	.comm	_ACPI_TYPE_PACKAGE,8,3          ; @ACPI_TYPE_PACKAGE
	.comm	_hns_dsaf_acpi_dsm_guid,4,2     ; @hns_dsaf_acpi_dsm_guid
	.comm	_HNS_OP_GET_PORT_TYPE_FUNC,4,2  ; @HNS_OP_GET_PORT_TYPE_FUNC
	.comm	_PHY_INTERFACE_MODE_XGMII,4,2   ; @PHY_INTERFACE_MODE_XGMII
	.comm	_PHY_INTERFACE_MODE_SGMII,4,2   ; @PHY_INTERFACE_MODE_SGMII
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"mac_id=%d, phy_if=%d\n"

	.no_dead_strip	_hns_mac_get_phy_if_acpi
.subsections_via_symbols
