	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function packed_transaction_finish
_packed_transaction_finish:             ## @packed_transaction_finish
	.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	_REF_STORE_READ@GOTPCREL(%rip), %rcx
	movq	_REF_STORE_WRITE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	orl	(%rcx), %eax
	movq	%rdx, %r12
	movq	%rsi, %r14
	movq	_REF_STORE_ODB@GOTPCREL(%rip), %rcx
	orl	(%rcx), %eax
	leaq	L_.str(%rip), %rdx
	movl	%eax, %esi
	callq	_packed_downcast
	movq	%rax, %rbx
	movq	_TRANSACTION_GENERIC_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %r15d
	movq	%rbx, %rdi
	callq	_clear_snapshot
	leaq	8(%rbx), %rdi
	callq	_get_locked_file_path
	movq	%rax, %r13
	movq	%rbx, %rdi
	addq	$4, %rdi
	movq	%rax, %rsi
	callq	_rename_tempfile
	testq	%rax, %rax
	je	LBB0_1
## %bb.2:
	movl	%r15d, -44(%rbp)                ## 4-byte Spill
	movq	%r14, %r15
	movl	(%rbx), %r14d
	movq	_errno@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_strerror
	leaq	L_.str.1(%rip), %rsi
	movq	%r12, %rdi
	movl	%r14d, %edx
	movq	%r15, %r14
	movl	-44(%rbp), %r15d                ## 4-byte Reload
	movl	%eax, %ecx
	callq	_strbuf_addf
	jmp	LBB0_3
LBB0_1:
	xorl	%r15d, %r15d
LBB0_3:
	movq	%r13, %rdi
	callq	_free
	movq	%rbx, %rdi
	movq	%r14, %rsi
	callq	_packed_transaction_cleanup
	movl	%r15d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.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_finish"

	.comm	_TRANSACTION_GENERIC_ERROR,4,2  ## @TRANSACTION_GENERIC_ERROR
L_.str.1:                               ## @.str.1
	.asciz	"error replacing %s: %s"

	.comm	_errno,4,2                      ## @errno
	.no_dead_strip	_packed_transaction_finish
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function packed_transaction_finish
_packed_transaction_finish:             ; @packed_transaction_finish
	.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	x21, x2
	mov	x19, x1
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	x20, x0
Lloh11:
	adrp	x8, _TRANSACTION_GENERIC_ERROR@GOTPAGE
Lloh12:
	ldr	x8, [x8, _TRANSACTION_GENERIC_ERROR@GOTPAGEOFF]
Lloh13:
	ldr	w22, [x8]
	bl	_clear_snapshot
	add	x0, x20, #8
	bl	_get_locked_file_path
	mov	x23, x0
	add	x0, x20, #4
	mov	x1, x23
	bl	_rename_tempfile
	cbz	x0, LBB0_2
; %bb.1:
	ldr	w24, [x20]
Lloh14:
	adrp	x8, _errno@GOTPAGE
Lloh15:
	ldr	x8, [x8, _errno@GOTPAGEOFF]
Lloh16:
	ldr	w0, [x8]
	bl	_strerror
	mov	x3, x0
Lloh17:
	adrp	x1, l_.str.1@PAGE
Lloh18:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x21
	mov	x2, x24
	bl	_strbuf_addf
	b	LBB0_3
LBB0_2:
	mov	w22, #0
LBB0_3:
	mov	x0, x23
	bl	_free
	mov	x0, x20
	mov	x1, x19
	bl	_packed_transaction_cleanup
	mov	x0, x22
	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	Lloh11, Lloh12, Lloh13
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh17, Lloh18
	.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_finish"

	.comm	_TRANSACTION_GENERIC_ERROR,4,2  ; @TRANSACTION_GENERIC_ERROR
l_.str.1:                               ; @.str.1
	.asciz	"error replacing %s: %s"

	.comm	_errno,4,2                      ; @errno
	.no_dead_strip	_packed_transaction_finish
.subsections_via_symbols
