	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function hns_mac_config_sds_loopback_acpi
_hns_mac_config_sds_loopback_acpi:      ## @hns_mac_config_sds_loopback_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	%r14
	pushq	%rbx
	subq	$80, %rsp
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	%rdi, %r14
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -24(%rbp)
	movq	_ACPI_TYPE_INTEGER@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -72(%rbp)
	movl	(%rdi), %ecx
	movl	%ecx, -80(%rbp)
	movq	%rax, -56(%rbp)
	xorl	%eax, %eax
	testl	%esi, %esi
	setne	%al
	movl	%eax, -64(%rbp)
	movl	$2, -96(%rbp)
	leaq	-80(%rbp), %rax
	movq	%rax, -88(%rbp)
	movq	8(%rdi), %rax
	movl	(%rax), %edi
	callq	_ACPI_HANDLE
	movq	_HNS_OP_SERDES_LP_FUNC@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	movq	_hns_dsaf_acpi_dsm_guid@GOTPCREL(%rip), %rsi
	xorl	%ebx, %ebx
	leaq	-96(%rbp), %r8
	movl	%eax, %edi
	xorl	%edx, %edx
	callq	_acpi_evaluate_dsm
	testq	%rax, %rax
	je	LBB0_1
## %bb.2:
	movq	%rax, %rdi
	callq	_ACPI_FREE
	jmp	LBB0_3
LBB0_1:
	movq	8(%r14), %rax
	movl	(%rax), %edi
	movl	(%r14), %edx
	leaq	L_.str(%rip), %rsi
	callq	_dev_warn
	movq	_ENOTSUPP@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
LBB0_3:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-24(%rbp), %rax
	jne	LBB0_5
## %bb.4:
	movl	%ebx, %eax
	addq	$80, %rsp
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
LBB0_5:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_ACPI_TYPE_INTEGER,8,3          ## @ACPI_TYPE_INTEGER
	.comm	_ACPI_TYPE_PACKAGE,4,2          ## @ACPI_TYPE_PACKAGE
	.comm	_hns_dsaf_acpi_dsm_guid,4,2     ## @hns_dsaf_acpi_dsm_guid
	.comm	_HNS_OP_SERDES_LP_FUNC,4,2      ## @HNS_OP_SERDES_LP_FUNC
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"set port%d serdes lp fail!"

	.comm	_ENOTSUPP,4,2                   ## @ENOTSUPP
	.no_dead_strip	_hns_mac_config_sds_loopback_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_config_sds_loopback_acpi
_hns_mac_config_sds_loopback_acpi:      ; @hns_mac_config_sds_loopback_acpi
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	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
	mov	x19, x0
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	stur	x8, [x29, #-24]
Lloh3:
	adrp	x8, _ACPI_TYPE_INTEGER@GOTPAGE
Lloh4:
	ldr	x8, [x8, _ACPI_TYPE_INTEGER@GOTPAGEOFF]
Lloh5:
	ldr	x8, [x8]
	str	x8, [sp, #32]
	ldr	w9, [x0]
	str	w9, [sp, #24]
	str	x8, [sp, #48]
	cmp	w1, #0
	cset	w8, ne
	str	w8, [sp, #40]
	mov	w8, #2
	str	w8, [sp, #8]
	add	x8, sp, #24
	str	x8, [sp, #16]
	ldr	x8, [x0, #8]
	ldr	w0, [x8]
	bl	_ACPI_HANDLE
Lloh6:
	adrp	x8, _HNS_OP_SERDES_LP_FUNC@GOTPAGE
Lloh7:
	ldr	x8, [x8, _HNS_OP_SERDES_LP_FUNC@GOTPAGEOFF]
Lloh8:
	ldr	w3, [x8]
Lloh9:
	adrp	x1, _hns_dsaf_acpi_dsm_guid@GOTPAGE
Lloh10:
	ldr	x1, [x1, _hns_dsaf_acpi_dsm_guid@GOTPAGEOFF]
	add	x4, sp, #8
	mov	w2, #0
	bl	_acpi_evaluate_dsm
	cbz	x0, LBB0_2
; %bb.1:
	bl	_ACPI_FREE
	mov	w0, #0
	b	LBB0_3
LBB0_2:
	ldr	x8, [x19, #8]
	ldr	w0, [x8]
	ldr	w2, [x19]
Lloh11:
	adrp	x1, l_.str@PAGE
Lloh12:
	add	x1, x1, l_.str@PAGEOFF
	bl	_dev_warn
Lloh13:
	adrp	x8, _ENOTSUPP@GOTPAGE
Lloh14:
	ldr	x8, [x8, _ENOTSUPP@GOTPAGEOFF]
Lloh15:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_3:
	ldur	x8, [x29, #-24]
Lloh16:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh17:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh18:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_5
; %bb.4:
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	add	sp, sp, #112
	ret
LBB0_5:
	bl	___stack_chk_fail
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpAdd	Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.cfi_endproc
                                        ; -- End function
	.comm	_ACPI_TYPE_INTEGER,8,3          ; @ACPI_TYPE_INTEGER
	.comm	_ACPI_TYPE_PACKAGE,4,2          ; @ACPI_TYPE_PACKAGE
	.comm	_hns_dsaf_acpi_dsm_guid,4,2     ; @hns_dsaf_acpi_dsm_guid
	.comm	_HNS_OP_SERDES_LP_FUNC,4,2      ; @HNS_OP_SERDES_LP_FUNC
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"set port%d serdes lp fail!"

	.comm	_ENOTSUPP,4,2                   ; @ENOTSUPP
	.no_dead_strip	_hns_mac_config_sds_loopback_acpi
.subsections_via_symbols
