	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_acpi_ut_validate_resource      ## -- Begin function acpi_ut_validate_resource
	.p2align	4, 0x90
_acpi_ut_validate_resource:             ## @acpi_ut_validate_resource
	.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
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %r14
	movq	%rdi, %r15
	xorl	%eax, %eax
	callq	_ACPI_FUNCTION_ENTRY
	movq	%r15, %rdi
	callq	_ACPI_GET8
	movl	%eax, %ebx
	movq	_ACPI_RESOURCE_NAME_LARGE@GOTPCREL(%rip), %rax
	testl	%ebx, (%rax)
	je	LBB0_3
## %bb.1:
	movq	_ACPI_RESOURCE_NAME_LARGE_MAX@GOTPCREL(%rip), %rax
	cmpl	(%rax), %ebx
	jle	LBB0_4
## %bb.2:
	movq	_AE_AML_INVALID_RESOURCE_TYPE@GOTPCREL(%rip), %r12
	jmp	LBB0_17
LBB0_3:
	movq	%r14, -48(%rbp)                 ## 8-byte Spill
	movq	_ACPI_RESOURCE_NAME_SMALL_MASK@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	andl	%ebx, %eax
	sarl	$3, %eax
	movl	%eax, %ebx
	jmp	LBB0_5
LBB0_4:
	movq	%r14, -48(%rbp)                 ## 8-byte Spill
	addl	$-112, %ebx
LBB0_5:
	movq	_acpi_gbl_resource_types@GOTPCREL(%rip), %r13
	movq	(%r13), %rax
	movslq	%ebx, %r14
	movq	_AE_AML_INVALID_RESOURCE_TYPE@GOTPCREL(%rip), %r12
	cmpl	$0, (%rax,%r14,4)
	je	LBB0_17
## %bb.6:
	movq	%r15, %rdi
	callq	_acpi_ut_get_resource_length
	movq	_acpi_gbl_resource_aml_sizes@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	movl	(%rcx,%r14,4), %ecx
	movq	(%r13), %rdx
	movl	(%rdx,%r14,4), %edx
	cmpl	$128, %edx
	je	LBB0_11
## %bb.7:
	cmpl	$129, %edx
	je	LBB0_13
## %bb.8:
	cmpl	$130, %edx
	jne	LBB0_17
## %bb.9:
	cmpl	%ecx, %eax
	je	LBB0_15
	jmp	LBB0_10
LBB0_11:
	cmpl	%ecx, %eax
	jge	LBB0_15
LBB0_10:
	movq	_AE_AML_BAD_RESOURCE_LENGTH@GOTPCREL(%rip), %r12
	jmp	LBB0_17
LBB0_13:
	movq	_AE_AML_BAD_RESOURCE_LENGTH@GOTPCREL(%rip), %r12
	cmpl	%ecx, %eax
	jg	LBB0_17
## %bb.14:
	decl	%ecx
	cmpl	%ecx, %eax
	jl	LBB0_17
LBB0_15:
	movq	_AE_OK@GOTPCREL(%rip), %r12
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	testq	%rax, %rax
	je	LBB0_17
## %bb.16:
	movl	%ebx, (%rax)
LBB0_17:
	movl	(%r12), %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_ACPI_RESOURCE_NAME_LARGE,4,2   ## @ACPI_RESOURCE_NAME_LARGE
	.comm	_ACPI_RESOURCE_NAME_LARGE_MAX,4,2 ## @ACPI_RESOURCE_NAME_LARGE_MAX
	.comm	_AE_AML_INVALID_RESOURCE_TYPE,4,2 ## @AE_AML_INVALID_RESOURCE_TYPE
	.comm	_ACPI_RESOURCE_NAME_SMALL_MASK,4,2 ## @ACPI_RESOURCE_NAME_SMALL_MASK
	.comm	_acpi_gbl_resource_types,8,3    ## @acpi_gbl_resource_types
	.comm	_acpi_gbl_resource_aml_sizes,8,3 ## @acpi_gbl_resource_aml_sizes
	.comm	_AE_AML_BAD_RESOURCE_LENGTH,4,2 ## @AE_AML_BAD_RESOURCE_LENGTH
	.comm	_AE_OK,4,2                      ## @AE_OK
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_acpi_ut_validate_resource      ; -- Begin function acpi_ut_validate_resource
	.p2align	2
_acpi_ut_validate_resource:             ; @acpi_ut_validate_resource
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	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
	.cfi_offset w21, -40
	.cfi_offset w22, -48
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	mov	x19, x1
	mov	x20, x0
	bl	_ACPI_FUNCTION_ENTRY
	mov	x0, x20
	bl	_ACPI_GET8
Lloh0:
	adrp	x8, _ACPI_RESOURCE_NAME_LARGE@GOTPAGE
Lloh1:
	ldr	x8, [x8, _ACPI_RESOURCE_NAME_LARGE@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	tst	w8, w0
	b.eq	LBB0_3
; %bb.1:
Lloh3:
	adrp	x8, _ACPI_RESOURCE_NAME_LARGE_MAX@GOTPAGE
Lloh4:
	ldr	x8, [x8, _ACPI_RESOURCE_NAME_LARGE_MAX@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	cmp	w0, w8
	b.gt	LBB0_9
; %bb.2:
	sub	w21, w0, #112
	b	LBB0_4
LBB0_3:
Lloh6:
	adrp	x8, _ACPI_RESOURCE_NAME_SMALL_MASK@GOTPAGE
Lloh7:
	ldr	x8, [x8, _ACPI_RESOURCE_NAME_SMALL_MASK@GOTPAGEOFF]
Lloh8:
	ldr	w8, [x8]
	and	w8, w8, w0
	asr	w21, w8, #3
LBB0_4:
Lloh9:
	adrp	x22, _acpi_gbl_resource_types@GOTPAGE
Lloh10:
	ldr	x22, [x22, _acpi_gbl_resource_types@GOTPAGEOFF]
	ldr	x8, [x22]
	ldr	w8, [x8, w21, sxtw #2]
	cbz	w8, LBB0_9
; %bb.5:
	sxtw	x23, w21
	mov	x0, x20
	bl	_acpi_ut_get_resource_length
Lloh11:
	adrp	x8, _acpi_gbl_resource_aml_sizes@GOTPAGE
Lloh12:
	ldr	x8, [x8, _acpi_gbl_resource_aml_sizes@GOTPAGEOFF]
Lloh13:
	ldr	x8, [x8]
	lsl	x9, x23, #2
	ldr	w8, [x8, x9]
	ldr	x10, [x22]
	ldr	w9, [x10, x9]
	cmp	w9, #128
	b.eq	LBB0_10
; %bb.6:
	cmp	w9, #129
	b.eq	LBB0_12
; %bb.7:
	cmp	w9, #130
	b.ne	LBB0_9
; %bb.8:
	cmp	w0, w8
	b.eq	LBB0_13
	b	LBB0_11
LBB0_9:
Lloh14:
	adrp	x8, _AE_AML_INVALID_RESOURCE_TYPE@GOTPAGE
Lloh15:
	ldr	x8, [x8, _AE_AML_INVALID_RESOURCE_TYPE@GOTPAGEOFF]
	b	LBB0_16
LBB0_10:
	cmp	w0, w8
	b.ge	LBB0_13
LBB0_11:
Lloh16:
	adrp	x8, _AE_AML_BAD_RESOURCE_LENGTH@GOTPAGE
Lloh17:
	ldr	x8, [x8, _AE_AML_BAD_RESOURCE_LENGTH@GOTPAGEOFF]
	b	LBB0_16
LBB0_12:
	sub	w9, w8, #1
	cmp	w0, w8
	ccmp	w0, w9, #8, le
	b.lt	LBB0_11
LBB0_13:
	cbz	x19, LBB0_15
; %bb.14:
	str	w21, [x19]
LBB0_15:
Lloh18:
	adrp	x8, _AE_OK@GOTPAGE
Lloh19:
	ldr	x8, [x8, _AE_OK@GOTPAGEOFF]
LBB0_16:
	ldr	w0, [x8]
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGot	Lloh14, Lloh15
	.loh AdrpLdrGot	Lloh16, Lloh17
	.loh AdrpLdrGot	Lloh18, Lloh19
	.cfi_endproc
                                        ; -- End function
	.comm	_ACPI_RESOURCE_NAME_LARGE,4,2   ; @ACPI_RESOURCE_NAME_LARGE
	.comm	_ACPI_RESOURCE_NAME_LARGE_MAX,4,2 ; @ACPI_RESOURCE_NAME_LARGE_MAX
	.comm	_AE_AML_INVALID_RESOURCE_TYPE,4,2 ; @AE_AML_INVALID_RESOURCE_TYPE
	.comm	_ACPI_RESOURCE_NAME_SMALL_MASK,4,2 ; @ACPI_RESOURCE_NAME_SMALL_MASK
	.comm	_acpi_gbl_resource_types,8,3    ; @acpi_gbl_resource_types
	.comm	_acpi_gbl_resource_aml_sizes,8,3 ; @acpi_gbl_resource_aml_sizes
	.comm	_AE_AML_BAD_RESOURCE_LENGTH,4,2 ; @AE_AML_BAD_RESOURCE_LENGTH
	.comm	_AE_OK,4,2                      ; @AE_OK
.subsections_via_symbols
