	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function hns_mac_get_sfp_prsnt_acpi
_hns_mac_get_sfp_prsnt_acpi:            ## @hns_mac_get_sfp_prsnt_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	%rbx
	subq	$40, %rsp
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %r14
	movq	_ACPI_TYPE_INTEGER@GOTPCREL(%rip), %r15
	movq	(%r15), %rax
	movq	%rax, -48(%rbp)
	movl	(%rdi), %eax
	movl	%eax, -56(%rbp)
	movq	_ACPI_TYPE_PACKAGE@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -40(%rbp)
	movl	$1, -40(%rbp)
	leaq	-56(%rbp), %rax
	movq	%rax, -32(%rbp)
	movl	4(%rdi), %edi
	callq	_ACPI_HANDLE
	movq	_HNS_OP_GET_SFP_STAT_FUNC@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	movq	_hns_dsaf_acpi_dsm_guid@GOTPCREL(%rip), %rsi
	xorl	%ebx, %ebx
	leaq	-40(%rbp), %r8
	movl	%eax, %edi
	xorl	%edx, %edx
	callq	_acpi_evaluate_dsm
	testq	%rax, %rax
	je	LBB0_2
## %bb.1:
	movq	(%rax), %rcx
	cmpq	(%r15), %rcx
	jne	LBB0_2
## %bb.3:
	movl	%ecx, (%r14)
	movq	%rax, %rdi
	callq	_ACPI_FREE
	xorl	%ebx, %ebx
	jmp	LBB0_4
LBB0_2:
	movq	_ENODEV@GOTPCREL(%rip), %rax
	subl	(%rax), %ebx
LBB0_4:
	movl	%ebx, %eax
	addq	$40, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.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_SFP_STAT_FUNC,4,2   ## @HNS_OP_GET_SFP_STAT_FUNC
	.comm	_ENODEV,4,2                     ## @ENODEV
	.no_dead_strip	_hns_mac_get_sfp_prsnt_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_sfp_prsnt_acpi
_hns_mac_get_sfp_prsnt_acpi:            ; @hns_mac_get_sfp_prsnt_acpi
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.cfi_def_cfa_offset 64
	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
	mov	x19, x1
Lloh0:
	adrp	x20, _ACPI_TYPE_INTEGER@GOTPAGE
Lloh1:
	ldr	x20, [x20, _ACPI_TYPE_INTEGER@GOTPAGEOFF]
	ldr	x8, [x20]
	str	x8, [sp, #24]
	ldp	w8, w0, [x0]
	str	w8, [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
	stp	x8, x10, [sp]
	str	w9, [sp]
	bl	_ACPI_HANDLE
Lloh5:
	adrp	x8, _HNS_OP_GET_SFP_STAT_FUNC@GOTPAGE
Lloh6:
	ldr	x8, [x8, _HNS_OP_GET_SFP_STAT_FUNC@GOTPAGEOFF]
Lloh7:
	ldr	w3, [x8]
Lloh8:
	adrp	x1, _hns_dsaf_acpi_dsm_guid@GOTPAGE
Lloh9:
	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:
	ldr	x8, [x0]
	ldr	x9, [x20]
	cmp	x8, x9
	b.ne	LBB0_3
; %bb.2:
	str	w8, [x19]
	bl	_ACPI_FREE
	mov	w0, #0
	b	LBB0_4
LBB0_3:
Lloh10:
	adrp	x8, _ENODEV@GOTPAGE
Lloh11:
	ldr	x8, [x8, _ENODEV@GOTPAGEOFF]
Lloh12:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_4:
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #64
	ret
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.cfi_endproc
                                        ; -- End function
	.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_SFP_STAT_FUNC,4,2   ; @HNS_OP_GET_SFP_STAT_FUNC
	.comm	_ENODEV,4,2                     ; @ENODEV
	.no_dead_strip	_hns_mac_get_sfp_prsnt_acpi
.subsections_via_symbols
