	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function acpi_ec_query_unlocked
_acpi_ec_query_unlocked:                ## @acpi_ec_query_unlocked
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%rbx
	subq	$40, %rsp
	.cfi_offset %rbx, -24
	movq	$1, -48(%rbp)
	leaq	-16(%rbp), %rax
	movq	%rax, -40(%rbp)
	movq	$0, -32(%rbp)
	movq	_ACPI_EC_COMMAND_QUERY@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -24(%rbp)
	testq	%rdi, %rdi
	je	LBB0_2
## %bb.1:
	movq	%rsi, %rbx
	testq	%rsi, %rsi
	je	LBB0_2
## %bb.4:
	leaq	-48(%rbp), %rsi
	callq	_acpi_ec_transaction_unlocked
	testl	%eax, %eax
	jne	LBB0_8
## %bb.5:
	movq	-16(%rbp), %rax
	testq	%rax, %rax
	je	LBB0_6
## %bb.7:
	movq	%rax, (%rbx)
	xorl	%eax, %eax
	jmp	LBB0_8
LBB0_2:
	movq	_EINVAL@GOTPCREL(%rip), %rcx
LBB0_3:
	xorl	%eax, %eax
	subl	(%rcx), %eax
LBB0_8:
	addq	$40, %rsp
	popq	%rbx
	popq	%rbp
	retq
LBB0_6:
	movq	_ENODATA@GOTPCREL(%rip), %rcx
	jmp	LBB0_3
	.cfi_endproc
                                        ## -- End function
	.comm	_ACPI_EC_COMMAND_QUERY,4,2      ## @ACPI_EC_COMMAND_QUERY
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_ENODATA,4,2                    ## @ENODATA
	.no_dead_strip	_acpi_ec_query_unlocked
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.section	__TEXT,__literal8,8byte_literals
	.p2align	3                               ; -- Begin function acpi_ec_query_unlocked
lCPI0_0:
	.long	1                               ; 0x1
	.long	0                               ; 0x0
	.section	__TEXT,__text,regular,pure_instructions
	.p2align	2
_acpi_ec_query_unlocked:                ; @acpi_ec_query_unlocked
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.cfi_def_cfa_offset 80
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
Lloh0:
	adrp	x8, lCPI0_0@PAGE
Lloh1:
	ldr	d0, [x8, lCPI0_0@PAGEOFF]
	str	d0, [sp, #8]
	sub	x8, x29, #24
	stp	x8, xzr, [sp, #16]
Lloh2:
	adrp	x8, _ACPI_EC_COMMAND_QUERY@GOTPAGE
Lloh3:
	ldr	x8, [x8, _ACPI_EC_COMMAND_QUERY@GOTPAGEOFF]
Lloh4:
	ldr	w8, [x8]
	str	w8, [sp, #32]
	cbz	x0, LBB0_5
; %bb.1:
	mov	x19, x1
	cbz	x1, LBB0_5
; %bb.2:
	add	x1, sp, #8
	bl	_acpi_ec_transaction_unlocked
	cbnz	w0, LBB0_7
; %bb.3:
	ldur	x8, [x29, #-24]
	cbz	x8, LBB0_8
; %bb.4:
	mov	w0, #0
	str	x8, [x19]
	b	LBB0_7
LBB0_5:
Lloh5:
	adrp	x8, _EINVAL@GOTPAGE
Lloh6:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
LBB0_6:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_7:
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	add	sp, sp, #80
	ret
LBB0_8:
Lloh7:
	adrp	x8, _ENODATA@GOTPAGE
Lloh8:
	ldr	x8, [x8, _ENODATA@GOTPAGEOFF]
	b	LBB0_6
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdr	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh7, Lloh8
	.cfi_endproc
                                        ; -- End function
	.comm	_ACPI_EC_COMMAND_QUERY,4,2      ; @ACPI_EC_COMMAND_QUERY
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_ENODATA,4,2                    ; @ENODATA
	.no_dead_strip	_acpi_ec_query_unlocked
.subsections_via_symbols
