	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function acpi_ec_transaction_unlocked
_acpi_ec_transaction_unlocked:          ## @acpi_ec_transaction_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	%r14
	pushq	%rbx
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	%rsi, %r14
	movq	%rdi, %rbx
	movq	_EC_FLAGS_MSI@GOTPCREL(%rip), %rax
	cmpq	$0, (%rax)
	je	LBB0_2
## %bb.1:
	movq	_ACPI_EC_MSI_UDELAY@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_udelay
LBB0_2:
	movq	%rbx, %rdi
	callq	_spin_lock_irqsave
	movq	%r14, 8(%rbx)
	movq	%rbx, %rdi
	callq	_start_transaction
	movq	8(%rbx), %rax
	movq	(%rax), %rax
	movq	_ACPI_EC_COMMAND_QUERY@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_4
## %bb.3:
	movq	_EC_FLAGS_QUERY_PENDING@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	16(%rbx), %rsi
	callq	_clear_bit
LBB0_4:
	movq	%rbx, %rdi
	callq	_spin_unlock_irqrestore
	movq	%rbx, %rdi
	callq	_ec_poll
	movl	%eax, %r14d
	movq	%rbx, %rdi
	callq	_spin_lock_irqsave
	movq	$0, 8(%rbx)
	movq	%rbx, %rdi
	callq	_spin_unlock_irqrestore
	movl	%r14d, %eax
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_EC_FLAGS_MSI,8,3               ## @EC_FLAGS_MSI
	.comm	_ACPI_EC_MSI_UDELAY,4,2         ## @ACPI_EC_MSI_UDELAY
	.comm	_ACPI_EC_COMMAND_QUERY,8,3      ## @ACPI_EC_COMMAND_QUERY
	.comm	_EC_FLAGS_QUERY_PENDING,4,2     ## @EC_FLAGS_QUERY_PENDING
	.no_dead_strip	_acpi_ec_transaction_unlocked
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function acpi_ec_transaction_unlocked
_acpi_ec_transaction_unlocked:          ; @acpi_ec_transaction_unlocked
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	mov	x20, x1
	mov	x19, x0
Lloh0:
	adrp	x8, _EC_FLAGS_MSI@GOTPAGE
Lloh1:
	ldr	x8, [x8, _EC_FLAGS_MSI@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	cbz	x8, LBB0_2
; %bb.1:
Lloh3:
	adrp	x8, _ACPI_EC_MSI_UDELAY@GOTPAGE
Lloh4:
	ldr	x8, [x8, _ACPI_EC_MSI_UDELAY@GOTPAGEOFF]
Lloh5:
	ldr	w0, [x8]
	bl	_udelay
LBB0_2:
	mov	x0, x19
	bl	_spin_lock_irqsave
	str	x20, [x19, #8]
	mov	x0, x19
	bl	_start_transaction
	ldr	x8, [x19, #8]
	ldr	x8, [x8]
Lloh6:
	adrp	x9, _ACPI_EC_COMMAND_QUERY@GOTPAGE
Lloh7:
	ldr	x9, [x9, _ACPI_EC_COMMAND_QUERY@GOTPAGEOFF]
Lloh8:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_4
; %bb.3:
Lloh9:
	adrp	x8, _EC_FLAGS_QUERY_PENDING@GOTPAGE
Lloh10:
	ldr	x8, [x8, _EC_FLAGS_QUERY_PENDING@GOTPAGEOFF]
Lloh11:
	ldr	w0, [x8]
	add	x1, x19, #16
	bl	_clear_bit
LBB0_4:
	mov	x0, x19
	bl	_spin_unlock_irqrestore
	mov	x0, x19
	bl	_ec_poll
	mov	x20, x0
	mov	x0, x19
	bl	_spin_lock_irqsave
	str	xzr, [x19, #8]
	mov	x0, x19
	bl	_spin_unlock_irqrestore
	mov	x0, x20
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.cfi_endproc
                                        ; -- End function
	.comm	_EC_FLAGS_MSI,8,3               ; @EC_FLAGS_MSI
	.comm	_ACPI_EC_MSI_UDELAY,4,2         ; @ACPI_EC_MSI_UDELAY
	.comm	_ACPI_EC_COMMAND_QUERY,8,3      ; @ACPI_EC_COMMAND_QUERY
	.comm	_EC_FLAGS_QUERY_PENDING,4,2     ; @EC_FLAGS_QUERY_PENDING
	.no_dead_strip	_acpi_ec_transaction_unlocked
.subsections_via_symbols
