	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function long_lock_transaction
_long_lock_transaction:                 ## @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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r14
	movq	24(%rdi), %rdi
	callq	_get_transaction
	movq	%rax, %rbx
	cmpq	$0, 24(%r14)
	setne	%al
	testq	%rbx, %rbx
	setne	%cl
	andb	%al, %cl
	movzbl	%cl, %edi
	callq	_assert
	movq	(%r14), %rax
	xorl	%r15d, %r15d
	movl	$0, %edi
	testq	%rax, %rax
	je	LBB0_3
## %bb.1:
	movl	$0, %edi
	cmpq	(%rbx), %rax
	jne	LBB0_3
## %bb.2:
	movq	%rax, %rdi
	callq	_get_temp_transaction
	xorl	%edi, %edi
	cmpq	%rax, %rbx
	sete	%dil
LBB0_3:
	callq	_assert
	movq	8(%rbx), %rax
	movq	_trs_declared@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	sete	%cl
	movq	_trs_declared_locked@GOTPCREL(%rip), %r12
	cmpq	(%r12), %rax
	sete	%al
	orb	%cl, %al
	movzbl	%al, %edi
	callq	_assert
	cmpq	$0, 16(%rbx)
	jne	LBB0_5
## %bb.4:
	xorl	%r15d, %r15d
	cmpl	$0, 40(%rbx)
	sete	%r15b
LBB0_5:
	movl	%r15d, %edi
	callq	_assert
	movq	8(%r14), %rax
	movq	_MIN_LOCK_SECONDS@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	setge	%cl
	movq	_MAX_LOCK_SECONDS@GOTPCREL(%rip), %rdx
	cmpq	(%rdx), %rax
	setle	%al
	andb	%cl, %al
	movzbl	%al, %edi
	callq	_assert
	movq	%rbx, %rdi
	callq	_check_transaction
	shrq	$63, %rax
	xorl	$1, %eax
	movl	%eax, %edi
	callq	_assert
	movq	%rbx, %rdi
	callq	_lock_transaction
	movq	8(%rbx), %rax
	xorl	%edi, %edi
	cmpq	(%r12), %rax
	sete	%dil
	callq	_assert
	movq	_trs_long_locked@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, 8(%rbx)
	movq	%rbx, %rdi
	callq	_remove_temp_transaction
	movq	_now@GOTPCREL(%rip), %rax
	movq	8(%r14), %rcx
	addq	(%rax), %rcx
	movq	%rcx, 16(%rbx)
	movq	$0, 32(%rbx)
	movl	16(%r14), %eax
	movl	%eax, 24(%rbx)
	movq	%rbx, %rdi
	callq	_put_into_lock_heap
	movl	$1, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_trs_declared,8,3               ## @trs_declared
	.comm	_trs_declared_locked,8,3        ## @trs_declared_locked
	.comm	_MIN_LOCK_SECONDS,8,3           ## @MIN_LOCK_SECONDS
	.comm	_MAX_LOCK_SECONDS,8,3           ## @MAX_LOCK_SECONDS
	.comm	_trs_long_locked,8,3            ## @trs_long_locked
	.comm	_now,8,3                        ## @now
	.no_dead_strip	_long_lock_transaction
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function long_lock_transaction
_long_lock_transaction:                 ; @long_lock_transaction
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w21, -40
	.cfi_offset w22, -48
	mov	x19, x0
	ldr	x0, [x0, #24]
	bl	_get_transaction
	mov	x20, x0
	ldr	x8, [x19, #24]
	cmp	x8, #0
	ccmp	x0, #0, #4, ne
	cset	w0, ne
	bl	_assert
	ldr	x0, [x19]
	ldr	x8, [x20]
	cmp	x0, #0
	ccmp	x0, x8, #0, ne
	b.eq	LBB0_2
; %bb.1:
	mov	w0, #0
	b	LBB0_3
LBB0_2:
	bl	_get_temp_transaction
	cmp	x20, x0
	cset	w0, eq
LBB0_3:
	bl	_assert
	ldr	x8, [x20, #8]
Lloh0:
	adrp	x9, _trs_declared@GOTPAGE
Lloh1:
	ldr	x9, [x9, _trs_declared@GOTPAGEOFF]
Lloh2:
	ldr	x9, [x9]
	cmp	x8, x9
Lloh3:
	adrp	x21, _trs_declared_locked@GOTPAGE
Lloh4:
	ldr	x21, [x21, _trs_declared_locked@GOTPAGEOFF]
	ldr	x9, [x21]
	ccmp	x8, x9, #4, ne
	cset	w0, eq
	bl	_assert
	ldr	x8, [x20, #16]
	cbz	x8, LBB0_5
; %bb.4:
	mov	w0, #0
	b	LBB0_6
LBB0_5:
	ldr	w8, [x20, #40]
	cmp	w8, #0
	cset	w0, eq
LBB0_6:
	bl	_assert
	ldr	x8, [x19, #8]
Lloh5:
	adrp	x9, _MIN_LOCK_SECONDS@GOTPAGE
Lloh6:
	ldr	x9, [x9, _MIN_LOCK_SECONDS@GOTPAGEOFF]
Lloh7:
	ldr	x9, [x9]
	cmp	x8, x9
Lloh8:
	adrp	x9, _MAX_LOCK_SECONDS@GOTPAGE
Lloh9:
	ldr	x9, [x9, _MAX_LOCK_SECONDS@GOTPAGEOFF]
Lloh10:
	ldr	x9, [x9]
	ccmp	x8, x9, #0, ge
	cset	w0, le
	bl	_assert
	mov	x0, x20
	bl	_check_transaction
	lsr	x8, x0, #63
	eor	w0, w8, #0x1
	bl	_assert
	mov	x0, x20
	bl	_lock_transaction
	ldr	x8, [x20, #8]
	ldr	x9, [x21]
	cmp	x8, x9
	cset	w0, eq
	bl	_assert
Lloh11:
	adrp	x8, _trs_long_locked@GOTPAGE
Lloh12:
	ldr	x8, [x8, _trs_long_locked@GOTPAGEOFF]
Lloh13:
	ldr	x8, [x8]
	str	x8, [x20, #8]
	mov	x0, x20
	bl	_remove_temp_transaction
Lloh14:
	adrp	x8, _now@GOTPAGE
Lloh15:
	ldr	x8, [x8, _now@GOTPAGEOFF]
Lloh16:
	ldr	x8, [x8]
	ldr	x9, [x19, #8]
	add	x8, x9, x8
	str	x8, [x20, #16]
	str	xzr, [x20, #32]
	ldr	w8, [x19, #16]
	str	w8, [x20, #24]
	mov	x0, x20
	bl	_put_into_lock_heap
	mov	w0, #1
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.cfi_endproc
                                        ; -- End function
	.comm	_trs_declared,8,3               ; @trs_declared
	.comm	_trs_declared_locked,8,3        ; @trs_declared_locked
	.comm	_MIN_LOCK_SECONDS,8,3           ; @MIN_LOCK_SECONDS
	.comm	_MAX_LOCK_SECONDS,8,3           ; @MAX_LOCK_SECONDS
	.comm	_trs_long_locked,8,3            ; @trs_long_locked
	.comm	_now,8,3                        ; @now
	.no_dead_strip	_long_lock_transaction
.subsections_via_symbols
