	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function packed_transaction_prepare
_packed_transaction_prepare:            ## @packed_transaction_prepare
	.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
	subq	$40, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	_REF_STORE_READ@GOTPCREL(%rip), %rcx
	movq	_REF_STORE_WRITE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	orl	(%rcx), %eax
	movq	%rdx, -72(%rbp)                 ## 8-byte Spill
	movq	%rsi, %rbx
	movq	_REF_STORE_ODB@GOTPCREL(%rip), %rcx
	orl	(%rcx), %eax
	leaq	L_.str(%rip), %rdx
	movq	%rdi, -56(%rbp)                 ## 8-byte Spill
	movl	%eax, %esi
	callq	_packed_downcast
	movq	%rax, -64(%rbp)                 ## 8-byte Spill
	movq	_TRANSACTION_GENERIC_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -44(%rbp)                 ## 4-byte Spill
	movl	$1, %edi
	movl	$8, %esi
	callq	_xcalloc
	movq	%rax, %r15
	leaq	4(%rax), %r14
	movq	%r14, %rdi
	xorl	%esi, %esi
	callq	_string_list_init
	movq	%r15, 24(%rbx)
	cmpq	$0, (%rbx)
	je	LBB0_3
## %bb.1:
	xorl	%r13d, %r13d
	.p2align	4, 0x90
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	movq	16(%rbx), %rax
	movq	(%rax,%r13,8), %r12
	movl	(%r12), %esi
	movq	%r14, %rdi
	callq	_string_list_append
	movq	%r12, (%rax)
	incq	%r13
	cmpq	(%rbx), %r13
	jb	LBB0_2
LBB0_3:
	movq	%r14, %rdi
	callq	_string_list_sort
	movq	%r14, %rdi
	movq	-72(%rbp), %r12                 ## 8-byte Reload
	movq	%r12, %rsi
	callq	_ref_update_reject_duplicates
	testq	%rax, %rax
	movq	-64(%rbp), %r13                 ## 8-byte Reload
	jne	LBB0_9
## %bb.4:
	movq	%r13, %rdi
	callq	_is_lock_file_locked
	testl	%eax, %eax
	je	LBB0_5
LBB0_7:
	movq	%r13, %rdi
	movq	%r14, %rsi
	movq	%r12, %rdx
	callq	_write_with_updates
	testq	%rax, %rax
	jne	LBB0_9
## %bb.8:
	movq	_REF_TRANSACTION_PREPARED@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 8(%rbx)
	xorl	%eax, %eax
	jmp	LBB0_10
LBB0_5:
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	xorl	%esi, %esi
	movq	%r12, %rdx
	callq	_packed_refs_lock
	testq	%rax, %rax
	je	LBB0_6
LBB0_9:
	movq	%r13, %rdi
	movq	%rbx, %rsi
	callq	_packed_transaction_cleanup
	movl	-44(%rbp), %eax                 ## 4-byte Reload
LBB0_10:
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_6:
	movl	$1, (%r15)
	jmp	LBB0_7
	.cfi_endproc
                                        ## -- End function
	.comm	_REF_STORE_READ,4,2             ## @REF_STORE_READ
	.comm	_REF_STORE_WRITE,4,2            ## @REF_STORE_WRITE
	.comm	_REF_STORE_ODB,4,2              ## @REF_STORE_ODB
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"ref_transaction_prepare"

	.comm	_TRANSACTION_GENERIC_ERROR,4,2  ## @TRANSACTION_GENERIC_ERROR
	.comm	_REF_TRANSACTION_PREPARED,4,2   ## @REF_TRANSACTION_PREPARED
	.no_dead_strip	_packed_transaction_prepare
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function packed_transaction_prepare
_packed_transaction_prepare:            ; @packed_transaction_prepare
	.cfi_startproc
; %bb.0:
	stp	x28, x27, [sp, #-96]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	mov	x21, x2
	mov	x19, x1
	mov	x23, x0
Lloh0:
	adrp	x8, _REF_STORE_READ@GOTPAGE
Lloh1:
	ldr	x8, [x8, _REF_STORE_READ@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
Lloh3:
	adrp	x9, _REF_STORE_WRITE@GOTPAGE
Lloh4:
	ldr	x9, [x9, _REF_STORE_WRITE@GOTPAGEOFF]
Lloh5:
	ldr	w9, [x9]
	orr	w8, w9, w8
Lloh6:
	adrp	x9, _REF_STORE_ODB@GOTPAGE
Lloh7:
	ldr	x9, [x9, _REF_STORE_ODB@GOTPAGEOFF]
Lloh8:
	ldr	w9, [x9]
	orr	w1, w8, w9
Lloh9:
	adrp	x2, l_.str@PAGE
Lloh10:
	add	x2, x2, l_.str@PAGEOFF
	bl	_packed_downcast
	mov	x22, x0
Lloh11:
	adrp	x8, _TRANSACTION_GENERIC_ERROR@GOTPAGE
Lloh12:
	ldr	x8, [x8, _TRANSACTION_GENERIC_ERROR@GOTPAGEOFF]
Lloh13:
	ldr	w20, [x8]
	mov	w0, #1
	mov	w1, #8
	bl	_xcalloc
	mov	x25, x0
	add	x24, x0, #4
	mov	x0, x24
	mov	w1, #0
	bl	_string_list_init
	str	x25, [x19, #24]
	ldr	x8, [x19]
	cbz	x8, LBB0_3
; %bb.1:
	mov	x26, #0
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x19, #16]
	ldr	x27, [x8, x26, lsl #3]
	ldr	w1, [x27]
	mov	x0, x24
	bl	_string_list_append
	str	x27, [x0]
	add	x26, x26, #1
	ldr	x8, [x19]
	cmp	x26, x8
	b.lo	LBB0_2
LBB0_3:
	mov	x0, x24
	bl	_string_list_sort
	mov	x0, x24
	mov	x1, x21
	bl	_ref_update_reject_duplicates
	cbnz	x0, LBB0_8
; %bb.4:
	mov	x0, x22
	bl	_is_lock_file_locked
	cbz	w0, LBB0_7
LBB0_5:
	mov	x0, x22
	mov	x1, x24
	mov	x2, x21
	bl	_write_with_updates
	cbnz	x0, LBB0_8
; %bb.6:
	mov	w20, #0
Lloh14:
	adrp	x8, _REF_TRANSACTION_PREPARED@GOTPAGE
Lloh15:
	ldr	x8, [x8, _REF_TRANSACTION_PREPARED@GOTPAGEOFF]
Lloh16:
	ldr	w8, [x8]
	str	w8, [x19, #8]
	b	LBB0_9
LBB0_7:
	mov	x0, x23
	mov	w1, #0
	mov	x2, x21
	bl	_packed_refs_lock
	cbz	x0, LBB0_10
LBB0_8:
	mov	x0, x22
	mov	x1, x19
	bl	_packed_transaction_cleanup
LBB0_9:
	mov	x0, x20
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp], #96             ; 16-byte Folded Reload
	ret
LBB0_10:
	mov	w8, #1
	str	w8, [x25]
	b	LBB0_5
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.cfi_endproc
                                        ; -- End function
	.comm	_REF_STORE_READ,4,2             ; @REF_STORE_READ
	.comm	_REF_STORE_WRITE,4,2            ; @REF_STORE_WRITE
	.comm	_REF_STORE_ODB,4,2              ; @REF_STORE_ODB
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"ref_transaction_prepare"

	.comm	_TRANSACTION_GENERIC_ERROR,4,2  ; @TRANSACTION_GENERIC_ERROR
	.comm	_REF_TRANSACTION_PREPARED,4,2   ; @REF_TRANSACTION_PREPARED
	.no_dead_strip	_packed_transaction_prepare
.subsections_via_symbols
