	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function hns_dsaf_acpi_ledctrl_by_port
_hns_dsaf_acpi_ledctrl_by_port:         ## @hns_dsaf_acpi_ledctrl_by_port
	.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	$72, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%r8, %r14
	movq	%rcx, %r15
	movq	%rdx, %r12
	movl	%esi, %r13d
	movq	%rdi, %rbx
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	movq	_ACPI_TYPE_INTEGER@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -88(%rbp)
	movq	%rdx, -96(%rbp)
	movq	%rax, -72(%rbp)
	movq	%rcx, -80(%rbp)
	movq	%rax, -56(%rbp)
	movq	%r8, -64(%rbp)
	movl	$3, -112(%rbp)
	leaq	-96(%rbp), %rax
	movq	%rax, -104(%rbp)
	movl	(%rdi), %edi
	callq	_ACPI_HANDLE
	movq	_hns_dsaf_acpi_dsm_guid@GOTPCREL(%rip), %rsi
	leaq	-112(%rbp), %r8
	movl	%eax, %edi
	xorl	%edx, %edx
	movl	%r13d, %ecx
	callq	_acpi_evaluate_dsm
	testq	%rax, %rax
	je	LBB0_1
## %bb.2:
	movq	%rax, %rdi
	callq	_ACPI_FREE
	jmp	LBB0_3
LBB0_1:
	movl	(%rbx), %edi
	leaq	L_.str(%rip), %rsi
	movq	%r12, %rdx
	movq	%r15, %rcx
	movq	%r14, %r8
	callq	_dev_warn
LBB0_3:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-48(%rbp), %rax
	jne	LBB0_5
## %bb.4:
	addq	$72, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	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
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"ledctrl fail, link:%d port:%d act:%d!\n"

	.no_dead_strip	_hns_dsaf_acpi_ledctrl_by_port
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function hns_dsaf_acpi_ledctrl_by_port
_hns_dsaf_acpi_ledctrl_by_port:         ; @hns_dsaf_acpi_ledctrl_by_port
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #144
	.cfi_def_cfa_offset 144
	stp	x24, x23, [sp, #80]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #96]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #112]            ; 16-byte Folded Spill
	stp	x29, x30, [sp, #128]            ; 16-byte Folded Spill
	add	x29, sp, #128
	.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
	mov	x19, x4
	mov	x20, x3
	mov	x21, x2
	mov	x23, x1
	mov	x22, x0
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	stur	x8, [x29, #-56]
Lloh3:
	adrp	x8, _ACPI_TYPE_INTEGER@GOTPAGE
Lloh4:
	ldr	x8, [x8, _ACPI_TYPE_INTEGER@GOTPAGEOFF]
Lloh5:
	ldr	x8, [x8]
	stp	x2, x8, [sp, #24]
	stp	x3, x8, [sp, #40]
	stp	x4, x8, [sp, #56]
	mov	w8, #3
	str	w8, [sp, #8]
	add	x8, sp, #24
	str	x8, [sp, #16]
	ldr	w0, [x0]
	bl	_ACPI_HANDLE
Lloh6:
	adrp	x1, _hns_dsaf_acpi_dsm_guid@GOTPAGE
Lloh7:
	ldr	x1, [x1, _hns_dsaf_acpi_dsm_guid@GOTPAGEOFF]
	add	x4, sp, #8
	mov	w2, #0
	mov	x3, x23
	bl	_acpi_evaluate_dsm
	cbz	x0, LBB0_2
; %bb.1:
	bl	_ACPI_FREE
	b	LBB0_3
LBB0_2:
	ldr	w0, [x22]
Lloh8:
	adrp	x1, l_.str@PAGE
Lloh9:
	add	x1, x1, l_.str@PAGEOFF
	mov	x2, x21
	mov	x3, x20
	mov	x4, x19
	bl	_dev_warn
LBB0_3:
	ldur	x8, [x29, #-56]
Lloh10:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh11:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh12:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_5
; %bb.4:
	ldp	x29, x30, [sp, #128]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #112]            ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #96]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #80]             ; 16-byte Folded Reload
	add	sp, sp, #144
	ret
LBB0_5:
	bl	___stack_chk_fail
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.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
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"ledctrl fail, link:%d port:%d act:%d!\n"

	.no_dead_strip	_hns_dsaf_acpi_ledctrl_by_port
.subsections_via_symbols
