	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_do_long_lock_transaction       ## -- Begin function do_long_lock_transaction
	.p2align	4, 0x90
_do_long_lock_transaction:              ## @do_long_lock_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	%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	%rcx, %r14
	movq	%rdx, %r15
	movl	%esi, %r12d
	movl	%edi, %r13d
	callq	_get_temp_transaction
	movq	%rax, %rbx
	movq	$0, (%r15)
	xorl	%eax, %eax
	testq	%rbx, %rbx
	je	LBB0_9
## %bb.1:
	movq	_MIN_LOCK_SECONDS@GOTPCREL(%rip), %rcx
	cmpl	%r12d, (%rcx)
	jg	LBB0_9
## %bb.2:
	movq	_MAX_LOCK_SECONDS@GOTPCREL(%rip), %rcx
	cmpl	%r12d, (%rcx)
	jl	LBB0_9
## %bb.3:
	movq	%rbx, %rdi
	callq	_check_transaction
	testl	%eax, %eax
	js	LBB0_9
## %bb.4:
	movq	(%rbx), %rcx
	movq	_trs_temp@GOTPCREL(%rip), %rax
	cmpq	(%rax), %rcx
	je	LBB0_6
## %bb.5:
	movq	_trs_temp_locked@GOTPCREL(%rip), %rdx
	movl	$-1, %eax
	cmpq	(%rdx), %rcx
	jne	LBB0_9
LBB0_6:
	cmpq	$0, 8(%rbx)
	jne	LBB0_8
## %bb.7:
	xorl	%eax, %eax
	callq	_get_next_transaction_id
	movq	%rax, 8(%rbx)
LBB0_8:
	movq	%rbx, %rdi
	callq	_do_declare_transaction
	xorl	%edi, %edi
	cmpl	$1, %eax
	sete	%dil
	callq	_assert
	movq	_LEV_MONEY_TRANS_LOCK@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movl	$24, %esi
	movl	%r13d, %edx
	callq	_alloc_log_event
	movq	%rax, %r13
	movl	16(%rbx), %eax
	movl	%eax, (%r13)
	movq	8(%rbx), %rax
	movq	%rax, 8(%r13)
	movl	%r12d, 16(%r13)
	xorl	%eax, %eax
	callq	_lrand48
	movq	_now@GOTPCREL(%rip), %rcx
	xorl	(%rcx), %eax
	xorl	16(%rbx), %eax
	andl	$2147483647, %eax               ## imm = 0x7FFFFFFF
	movl	$1, %ecx
	cmovnel	%eax, %ecx
	movl	%ecx, 20(%r13)
	movq	%r13, %rdi
	callq	_long_lock_transaction
	xorl	%edi, %edi
	cmpl	$1, %eax
	sete	%dil
	callq	_assert
	movq	%rbx, %rdi
	callq	_add_temp_transaction
	movq	8(%rbx), %rax
	movq	%rax, (%r15)
	movq	%rbx, %rdi
	movq	%r14, %rsi
	callq	_compute_lock_codes
	movl	$2, %eax
LBB0_9:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_MIN_LOCK_SECONDS,4,2           ## @MIN_LOCK_SECONDS
	.comm	_MAX_LOCK_SECONDS,4,2           ## @MAX_LOCK_SECONDS
	.comm	_trs_temp,8,3                   ## @trs_temp
	.comm	_trs_temp_locked,8,3            ## @trs_temp_locked
	.comm	_LEV_MONEY_TRANS_LOCK,4,2       ## @LEV_MONEY_TRANS_LOCK
	.comm	_now,4,2                        ## @now
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_do_long_lock_transaction       ; -- Begin function do_long_lock_transaction
	.p2align	2
_do_long_lock_transaction:              ; @do_long_lock_transaction
	.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, x3
	mov	x20, x2
	mov	x22, x1
	mov	x23, x0
	bl	_get_temp_transaction
	mov	x21, x0
	mov	w0, #0
	str	xzr, [x20]
	cbz	x21, LBB0_8
; %bb.1:
Lloh0:
	adrp	x8, _MIN_LOCK_SECONDS@GOTPAGE
Lloh1:
	ldr	x8, [x8, _MIN_LOCK_SECONDS@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
Lloh3:
	adrp	x9, _MAX_LOCK_SECONDS@GOTPAGE
Lloh4:
	ldr	x9, [x9, _MAX_LOCK_SECONDS@GOTPAGEOFF]
Lloh5:
	ldr	w9, [x9]
	cmp	w8, w22
	ccmp	w9, w22, #8, le
	b.lt	LBB0_8
; %bb.2:
	mov	x0, x21
	bl	_check_transaction
	tbnz	w0, #31, LBB0_8
; %bb.3:
	ldr	x8, [x21]
Lloh6:
	adrp	x9, _trs_temp@GOTPAGE
Lloh7:
	ldr	x9, [x9, _trs_temp@GOTPAGEOFF]
Lloh8:
	ldr	x9, [x9]
Lloh9:
	adrp	x10, _trs_temp_locked@GOTPAGE
Lloh10:
	ldr	x10, [x10, _trs_temp_locked@GOTPAGEOFF]
Lloh11:
	ldr	x10, [x10]
	cmp	x8, x9
	ccmp	x8, x10, #4, ne
	b.ne	LBB0_7
; %bb.4:
	ldr	x8, [x21, #8]
	cbnz	x8, LBB0_6
; %bb.5:
	bl	_get_next_transaction_id
	str	x0, [x21, #8]
LBB0_6:
	mov	x0, x21
	bl	_do_declare_transaction
	cmp	w0, #1
	cset	w0, eq
	bl	_assert
Lloh12:
	adrp	x8, _LEV_MONEY_TRANS_LOCK@GOTPAGE
Lloh13:
	ldr	x8, [x8, _LEV_MONEY_TRANS_LOCK@GOTPAGEOFF]
Lloh14:
	ldr	w0, [x8]
	mov	w1, #24
	mov	x2, x23
	bl	_alloc_log_event
	mov	x23, x0
	ldr	w8, [x21, #16]
	str	w8, [x0]
	ldr	x8, [x21, #8]
	str	x8, [x0, #8]
	str	w22, [x0, #16]
	bl	_lrand48
Lloh15:
	adrp	x8, _now@GOTPAGE
Lloh16:
	ldr	x8, [x8, _now@GOTPAGEOFF]
Lloh17:
	ldr	w8, [x8]
	eor	w8, w8, w0
	ldr	w9, [x21, #16]
	eor	w8, w8, w9
	ands	w8, w8, #0x7fffffff
	csinc	w8, w8, wzr, ne
	str	w8, [x23, #20]
	mov	x0, x23
	bl	_long_lock_transaction
	cmp	w0, #1
	cset	w0, eq
	bl	_assert
	mov	x0, x21
	bl	_add_temp_transaction
	ldr	x8, [x21, #8]
	str	x8, [x20]
	mov	x0, x21
	mov	x1, x19
	bl	_compute_lock_codes
	mov	w0, #2
	b	LBB0_8
LBB0_7:
	mov	w0, #-1
LBB0_8:
	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	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.cfi_endproc
                                        ; -- End function
	.comm	_MIN_LOCK_SECONDS,4,2           ; @MIN_LOCK_SECONDS
	.comm	_MAX_LOCK_SECONDS,4,2           ; @MAX_LOCK_SECONDS
	.comm	_trs_temp,8,3                   ; @trs_temp
	.comm	_trs_temp_locked,8,3            ; @trs_temp_locked
	.comm	_LEV_MONEY_TRANS_LOCK,4,2       ; @LEV_MONEY_TRANS_LOCK
	.comm	_now,4,2                        ; @now
.subsections_via_symbols
