	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function wait_transaction
_wait_transaction:                      ## @wait_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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -24
	testl	%edi, %edi
	jle	LBB0_1
## %bb.2:
	movl	%edi, %ebx
	movq	_transactions@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	cmpl	%edi, %edx
	jge	LBB0_4
## %bb.3:
	incl	%edx
	leaq	L_.str.1(%rip), %rdi
	movl	%ebx, %esi
	xorl	%eax, %eax
	callq	_kprintf
	movl	$-2, %eax
	jmp	LBB0_5
LBB0_1:
	leaq	L_.str(%rip), %rdi
	xorl	%eax, %eax
	callq	_kprintf
	movl	$-1, %eax
	jmp	LBB0_5
LBB0_4:
	movq	_LEV_COPYEXEC_AUX_TRANSACTION_CMD_WAIT@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_T@GOTPCREL(%rip), %rdi
	movl	$4, %edx
	callq	_tb_alloc_logevent
	movl	%ebx, (%rax)
	xorl	%eax, %eax
LBB0_5:
	addq	$8, %rsp
	popq	%rbx
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"wait_transaction: X < 1\n"

	.comm	_transactions,4,2               ## @transactions
L_.str.1:                               ## @.str.1
	.asciz	"wait_transaction: X >= current transaction id (X = %d, transaction_id = %d)\n"

	.comm	_T,4,2                          ## @T
	.comm	_LEV_COPYEXEC_AUX_TRANSACTION_CMD_WAIT,4,2 ## @LEV_COPYEXEC_AUX_TRANSACTION_CMD_WAIT
	.no_dead_strip	_wait_transaction
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function wait_transaction
_wait_transaction:                      ; @wait_transaction
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #48
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	cmp	w0, #0
	b.le	LBB0_3
; %bb.1:
	mov	x19, x0
Lloh0:
	adrp	x8, _transactions@GOTPAGE
Lloh1:
	ldr	x8, [x8, _transactions@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	cmp	w8, w0
	b.ge	LBB0_4
; %bb.2:
	add	w8, w8, #1
	stp	x19, x8, [sp]
Lloh3:
	adrp	x0, l_.str.1@PAGE
Lloh4:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_kprintf
	mov	w0, #-2
	b	LBB0_5
LBB0_3:
Lloh5:
	adrp	x0, l_.str@PAGE
Lloh6:
	add	x0, x0, l_.str@PAGEOFF
	bl	_kprintf
	mov	w0, #-1
	b	LBB0_5
LBB0_4:
Lloh7:
	adrp	x8, _LEV_COPYEXEC_AUX_TRANSACTION_CMD_WAIT@GOTPAGE
Lloh8:
	ldr	x8, [x8, _LEV_COPYEXEC_AUX_TRANSACTION_CMD_WAIT@GOTPAGEOFF]
Lloh9:
	ldr	w1, [x8]
Lloh10:
	adrp	x0, _T@GOTPAGE
Lloh11:
	ldr	x0, [x0, _T@GOTPAGEOFF]
	mov	w2, #4
	bl	_tb_alloc_logevent
	mov	x8, x0
	mov	w0, #0
	str	w19, [x8]
LBB0_5:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #48
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"wait_transaction: X < 1\n"

	.comm	_transactions,4,2               ; @transactions
l_.str.1:                               ; @.str.1
	.asciz	"wait_transaction: X >= current transaction id (X = %d, transaction_id = %d)\n"

	.comm	_T,4,2                          ; @T
	.comm	_LEV_COPYEXEC_AUX_TRANSACTION_CMD_WAIT,4,2 ; @LEV_COPYEXEC_AUX_TRANSACTION_CMD_WAIT
	.no_dead_strip	_wait_transaction
.subsections_via_symbols
