	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function check_slot
_check_slot:                            ## @check_slot
	.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
	movl	%edi, %r15d
	movq	_ACPI_ALLOCATE_BUFFER@GOTPCREL(%rip), %rax
	movslq	(%rax), %rax
	movq	%rax, -48(%rbp)
	movq	$0, -40(%rbp)
	movl	$0, -32(%rbp)
	movq	_ACPI_FULL_PATHNAME@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	-48(%rbp), %rdx
	callq	_acpi_get_name
	movq	-48(%rbp), %rsi
	leaq	L_.str(%rip), %rdi
	xorl	%eax, %eax
	callq	_dbg
	movq	_check_sta_before_sun@GOTPCREL(%rip), %rax
	cmpq	$0, (%rax)
	je	LBB0_3
## %bb.1:
	leaq	L_.str.1(%rip), %rsi
	leaq	-56(%rbp), %rcx
	movl	%r15d, %edi
	xorl	%edx, %edx
	callq	_acpi_evaluate_integer
	movl	%eax, %edi
	callq	_ACPI_SUCCESS
	testq	%rax, %rax
	je	LBB0_3
## %bb.2:
	movq	_ACPI_STA_DEVICE_PRESENT@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	testq	%rax, -56(%rbp)
	je	LBB0_8
LBB0_3:
	leaq	L_.str.2(%rip), %rsi
	leaq	-64(%rbp), %rcx
	movl	%r15d, %edi
	xorl	%edx, %edx
	callq	_acpi_evaluate_integer
	movl	%eax, %ebx
	movl	%eax, %edi
	callq	_ACPI_FAILURE
	testq	%rax, %rax
	je	LBB0_5
## %bb.4:
	movslq	%ebx, %rsi
	movq	-48(%rbp), %rdx
	leaq	L_.str.3(%rip), %rdi
	jmp	LBB0_7
LBB0_5:
	leaq	L_.str.4(%rip), %rsi
	movl	%r15d, %edi
	xorl	%edx, %edx
	movq	%r14, %rcx
	callq	_acpi_evaluate_integer
	movl	%eax, %ebx
	movl	%eax, %edi
	callq	_ACPI_FAILURE
	testq	%rax, %rax
	je	LBB0_11
## %bb.6:
	movslq	%ebx, %rsi
	movq	-48(%rbp), %rdx
	leaq	L_.str.5(%rip), %rdi
LBB0_7:
	xorl	%eax, %eax
	callq	_dbg
LBB0_8:
	movl	$-1, %ebx
LBB0_9:
	movq	-48(%rbp), %rdi
	callq	_kfree
	movl	%ebx, %eax
	addq	$40, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_11:
	movzwl	-62(%rbp), %ebx
	jmp	LBB0_9
	.cfi_endproc
                                        ## -- End function
	.comm	_ACPI_ALLOCATE_BUFFER,4,2       ## @ACPI_ALLOCATE_BUFFER
	.comm	_ACPI_FULL_PATHNAME,4,2         ## @ACPI_FULL_PATHNAME
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Checking slot on path: %s\n"

	.comm	_check_sta_before_sun,8,3       ## @check_sta_before_sun
L_.str.1:                               ## @.str.1
	.asciz	"_STA"

	.comm	_ACPI_STA_DEVICE_PRESENT,8,3    ## @ACPI_STA_DEVICE_PRESENT
L_.str.2:                               ## @.str.2
	.asciz	"_ADR"

L_.str.3:                               ## @.str.3
	.asciz	"_ADR returned %d on %s\n"

L_.str.4:                               ## @.str.4
	.asciz	"_SUN"

L_.str.5:                               ## @.str.5
	.asciz	"_SUN returned %d on %s\n"

	.no_dead_strip	_check_slot
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function check_slot
_check_slot:                            ; @check_slot
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #96
	.cfi_def_cfa_offset 96
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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, x1
	mov	x20, x0
Lloh0:
	adrp	x8, _ACPI_ALLOCATE_BUFFER@GOTPAGE
Lloh1:
	ldr	x8, [x8, _ACPI_ALLOCATE_BUFFER@GOTPAGEOFF]
Lloh2:
	ldrsw	x8, [x8]
	stp	x8, xzr, [sp, #8]
	str	wzr, [sp, #24]
Lloh3:
	adrp	x8, _ACPI_FULL_PATHNAME@GOTPAGE
Lloh4:
	ldr	x8, [x8, _ACPI_FULL_PATHNAME@GOTPAGEOFF]
Lloh5:
	ldr	w1, [x8]
	add	x2, sp, #8
	bl	_acpi_get_name
	ldr	x1, [sp, #8]
Lloh6:
	adrp	x0, l_.str@PAGE
Lloh7:
	add	x0, x0, l_.str@PAGEOFF
	bl	_dbg
Lloh8:
	adrp	x8, _check_sta_before_sun@GOTPAGE
Lloh9:
	ldr	x8, [x8, _check_sta_before_sun@GOTPAGEOFF]
Lloh10:
	ldr	x8, [x8]
	cbz	x8, LBB0_3
; %bb.1:
Lloh11:
	adrp	x1, l_.str.1@PAGE
Lloh12:
	add	x1, x1, l_.str.1@PAGEOFF
	add	x3, sp, #32
	mov	x0, x20
	mov	x2, #0
	bl	_acpi_evaluate_integer
	bl	_ACPI_SUCCESS
	cbz	x0, LBB0_3
; %bb.2:
	ldr	x8, [sp, #32]
Lloh13:
	adrp	x9, _ACPI_STA_DEVICE_PRESENT@GOTPAGE
Lloh14:
	ldr	x9, [x9, _ACPI_STA_DEVICE_PRESENT@GOTPAGEOFF]
Lloh15:
	ldr	x9, [x9]
	tst	x9, x8
	b.eq	LBB0_8
LBB0_3:
Lloh16:
	adrp	x1, l_.str.2@PAGE
Lloh17:
	add	x1, x1, l_.str.2@PAGEOFF
	add	x3, sp, #40
	mov	x0, x20
	mov	x2, #0
	bl	_acpi_evaluate_integer
	mov	x21, x0
	bl	_ACPI_FAILURE
	cbz	x0, LBB0_5
; %bb.4:
	sxtw	x1, w21
	ldr	x8, [sp, #8]
	str	x8, [sp]
Lloh18:
	adrp	x0, l_.str.3@PAGE
Lloh19:
	add	x0, x0, l_.str.3@PAGEOFF
	b	LBB0_7
LBB0_5:
Lloh20:
	adrp	x1, l_.str.4@PAGE
Lloh21:
	add	x1, x1, l_.str.4@PAGEOFF
	mov	x0, x20
	mov	x2, #0
	mov	x3, x19
	bl	_acpi_evaluate_integer
	mov	x19, x0
	bl	_ACPI_FAILURE
	cbz	x0, LBB0_10
; %bb.6:
	sxtw	x1, w19
	ldr	x8, [sp, #8]
	str	x8, [sp]
Lloh22:
	adrp	x0, l_.str.5@PAGE
Lloh23:
	add	x0, x0, l_.str.5@PAGEOFF
LBB0_7:
	bl	_dbg
LBB0_8:
	mov	w19, #-1
LBB0_9:
	ldr	x0, [sp, #8]
	bl	_kfree
	mov	x0, x19
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	add	sp, sp, #96
	ret
LBB0_10:
	ldrh	w19, [sp, #42]
	b	LBB0_9
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpAdd	Lloh16, Lloh17
	.loh AdrpAdd	Lloh18, Lloh19
	.loh AdrpAdd	Lloh20, Lloh21
	.loh AdrpAdd	Lloh22, Lloh23
	.cfi_endproc
                                        ; -- End function
	.comm	_ACPI_ALLOCATE_BUFFER,4,2       ; @ACPI_ALLOCATE_BUFFER
	.comm	_ACPI_FULL_PATHNAME,4,2         ; @ACPI_FULL_PATHNAME
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Checking slot on path: %s\n"

	.comm	_check_sta_before_sun,8,3       ; @check_sta_before_sun
l_.str.1:                               ; @.str.1
	.asciz	"_STA"

	.comm	_ACPI_STA_DEVICE_PRESENT,8,3    ; @ACPI_STA_DEVICE_PRESENT
l_.str.2:                               ; @.str.2
	.asciz	"_ADR"

l_.str.3:                               ; @.str.3
	.asciz	"_ADR returned %d on %s\n"

l_.str.4:                               ; @.str.4
	.asciz	"_SUN"

l_.str.5:                               ; @.str.5
	.asciz	"_SUN returned %d on %s\n"

	.no_dead_strip	_check_slot
.subsections_via_symbols
