	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function advance_transaction
_advance_transaction:                   ## @advance_transaction
	.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
	movl	%esi, %r14d
	movq	%rdi, %rbx
	callq	_spin_lock_irqsave
	movq	8(%rbx), %rax
	testq	%rax, %rax
	je	LBB0_13
## %bb.1:
	movq	(%rax), %rdx
	movq	8(%rax), %rcx
	cmpq	%rcx, %rdx
	jle	LBB0_4
## %bb.2:
	movq	_ACPI_EC_FLAG_IBF@GOTPCREL(%rip), %rdx
	testl	%r14d, (%rdx)
	jne	LBB0_11
## %bb.3:
	movq	48(%rax), %rdx
	leaq	1(%rcx), %rsi
	movq	%rsi, 8(%rax)
	movl	(%rdx,%rcx,4), %esi
	movq	%rbx, %rdi
	callq	_acpi_ec_write_data
	jmp	LBB0_13
LBB0_4:
	movq	16(%rax), %rsi
	cmpq	24(%rax), %rsi
	jle	LBB0_8
## %bb.5:
	movq	_ACPI_EC_FLAG_OBF@GOTPCREL(%rip), %rax
	andl	(%rax), %r14d
	cmpl	$1, %r14d
	jne	LBB0_11
## %bb.6:
	movq	%rbx, %rdi
	callq	_acpi_ec_read_data
	movq	8(%rbx), %rcx
	movq	24(%rcx), %rdx
	movq	40(%rcx), %rsi
	leaq	1(%rdx), %rdi
	movq	%rdi, 24(%rcx)
	movl	%eax, (%rsi,%rdx,4)
	cmpq	%rdi, 16(%rcx)
	jne	LBB0_13
## %bb.7:
	movl	$1, 32(%rcx)
	jmp	LBB0_13
LBB0_11:
	xorl	%eax, %eax
	callq	_in_interrupt
	testq	%rax, %rax
	je	LBB0_13
## %bb.12:
	movq	8(%rbx), %rax
	incl	36(%rax)
	jmp	LBB0_13
LBB0_8:
	cmpq	%rcx, %rdx
	jne	LBB0_13
## %bb.9:
	movq	_ACPI_EC_FLAG_IBF@GOTPCREL(%rip), %rcx
	testl	%r14d, (%rcx)
	jne	LBB0_13
## %bb.10:
	movl	$1, 32(%rax)
LBB0_13:
	movq	%rbx, %rdi
	popq	%rbx
	popq	%r14
	popq	%rbp
	jmp	_spin_unlock_irqrestore         ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_ACPI_EC_FLAG_IBF,4,2           ## @ACPI_EC_FLAG_IBF
	.comm	_ACPI_EC_FLAG_OBF,4,2           ## @ACPI_EC_FLAG_OBF
	.no_dead_strip	_advance_transaction
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function advance_transaction
_advance_transaction:                   ; @advance_transaction
	.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
	bl	_spin_lock_irqsave
	ldr	x8, [x19, #8]
	cbz	x8, LBB0_12
; %bb.1:
	ldp	x10, x9, [x8]
	cmp	x10, x9
	b.le	LBB0_4
; %bb.2:
Lloh0:
	adrp	x10, _ACPI_EC_FLAG_IBF@GOTPAGE
Lloh1:
	ldr	x10, [x10, _ACPI_EC_FLAG_IBF@GOTPAGEOFF]
Lloh2:
	ldr	w10, [x10]
	tst	w10, w20
	b.ne	LBB0_7
; %bb.3:
	ldr	x10, [x8, #48]
	add	x11, x9, #1
	str	x11, [x8, #8]
	ldr	w1, [x10, x9, lsl #2]
	mov	x0, x19
	bl	_acpi_ec_write_data
	b	LBB0_12
LBB0_4:
	ldp	x11, x12, [x8, #16]
	cmp	x11, x12
	b.le	LBB0_9
; %bb.5:
Lloh3:
	adrp	x8, _ACPI_EC_FLAG_OBF@GOTPAGE
Lloh4:
	ldr	x8, [x8, _ACPI_EC_FLAG_OBF@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	and	w8, w8, w20
	cmp	w8, #1
	b.ne	LBB0_7
; %bb.6:
	mov	x0, x19
	bl	_acpi_ec_read_data
	ldr	x8, [x19, #8]
	ldr	x9, [x8, #40]
	ldp	x11, x10, [x8, #16]
	add	x12, x10, #1
	str	x12, [x8, #24]
	str	w0, [x9, x10, lsl #2]
	cmp	x11, x12
	b.eq	LBB0_11
	b	LBB0_12
LBB0_7:
	bl	_in_interrupt
	cbz	x0, LBB0_12
; %bb.8:
	ldr	x8, [x19, #8]
	ldr	w9, [x8, #36]
	add	w9, w9, #1
	str	w9, [x8, #36]
	b	LBB0_12
LBB0_9:
	cmp	x10, x9
	b.ne	LBB0_12
; %bb.10:
Lloh6:
	adrp	x9, _ACPI_EC_FLAG_IBF@GOTPAGE
Lloh7:
	ldr	x9, [x9, _ACPI_EC_FLAG_IBF@GOTPAGEOFF]
Lloh8:
	ldr	w9, [x9]
	tst	w9, w20
	b.ne	LBB0_12
LBB0_11:
	mov	w9, #1
	str	w9, [x8, #32]
LBB0_12:
	mov	x0, x19
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	b	_spin_unlock_irqrestore
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.cfi_endproc
                                        ; -- End function
	.comm	_ACPI_EC_FLAG_IBF,4,2           ; @ACPI_EC_FLAG_IBF
	.comm	_ACPI_EC_FLAG_OBF,4,2           ; @ACPI_EC_FLAG_OBF
	.no_dead_strip	_advance_transaction
.subsections_via_symbols
