	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_content_save_state             ## -- Begin function content_save_state
	.p2align	4, 0x90
_content_save_state:                    ## @content_save_state
	.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	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%edx, %r12d
	movl	%esi, %r13d
	movq	%rdi, %r15
	leaq	-48(%rbp), %rdi
	callq	_core_serialize_size
	movq	-48(%rbp), %rsi
	xorl	%ebx, %ebx
	testq	%rsi, %rsi
	je	LBB0_20
## %bb.1:
	movq	_save_state_in_background@GOTPCREL(%rip), %rax
	cmpl	$0, (%rax)
	je	LBB0_4
## %bb.2:
	testl	%r13d, %r13d
	je	LBB0_10
## %bb.3:
	xorl	%r14d, %r14d
	jmp	LBB0_6
LBB0_4:
	movq	_MSG_SAVING_STATE@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_msg_hash_to_str
	leaq	L_.str(%rip), %rdi
	xorl	%ebx, %ebx
	movl	%eax, %esi
	movq	%r15, %rdx
	xorl	%eax, %eax
	callq	_RARCH_LOG
	movq	-48(%rbp), %rsi
	movq	%r15, %rdi
	callq	_get_serialized_data
	testq	%rax, %rax
	je	LBB0_16
## %bb.5:
	movq	%rax, %r14
	movq	_MSG_STATE_SIZE@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_msg_hash_to_str
	movl	%eax, %ebx
	movl	-48(%rbp), %eax
	movl	%eax, -52(%rbp)                 ## 4-byte Spill
	movq	_MSG_BYTES@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_msg_hash_to_str
	leaq	L_.str.2(%rip), %rdi
	movl	%ebx, %esi
	movl	-52(%rbp), %edx                 ## 4-byte Reload
	movl	%eax, %ecx
	xorl	%eax, %eax
	callq	_RARCH_LOG
	testl	%r13d, %r13d
	je	LBB0_11
LBB0_6:
	movq	%r15, %rdi
	callq	_path_is_valid
	testl	%r12d, %r12d
	jne	LBB0_9
## %bb.7:
	testq	%rax, %rax
	je	LBB0_9
## %bb.8:
	movq	_MSG_FILE_ALREADY_EXISTS_SAVING_TO_BACKUP_BUFFER@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_msg_hash_to_str
	leaq	L_.str.3(%rip), %rdi
	movl	%eax, %esi
	xorl	%eax, %eax
	callq	_RARCH_LOG
	movq	-48(%rbp), %rdx
	movl	$1, %ebx
	movq	%r15, %rdi
	movq	%r14, %rsi
	movl	$1, %ecx
	xorl	%r8d, %r8d
	callq	_task_push_load_and_save_state
	jmp	LBB0_20
LBB0_9:
	movq	-48(%rbp), %rdx
	movq	%r15, %rdi
	movq	%r14, %rsi
	movl	%r12d, %ecx
	callq	_task_push_save_state
	jmp	LBB0_15
LBB0_10:
	movq	%r15, %rdi
	callq	_get_serialized_data
	movq	%rax, %r14
	testq	%rax, %rax
	je	LBB0_17
LBB0_11:
	movq	_undo_load_buf@GOTPCREL(%rip), %r12
	movq	(%r12), %rdi
	testq	%rdi, %rdi
	je	LBB0_13
## %bb.12:
	callq	_free
LBB0_13:
	movq	-48(%rbp), %rbx
	movq	%rbx, %rdi
	callq	_malloc
	movq	%rax, (%r12)
	testq	%rax, %rax
	je	LBB0_18
## %bb.14:
	movq	%rax, %rdi
	movq	%r14, %rsi
	movq	%rbx, %rdx
	callq	_memcpy
	movq	%r14, %rdi
	callq	_free
	movq	-48(%rbp), %rax
	movq	%rax, 8(%r12)
	movl	16(%r12), %edi
	movq	%r15, %rsi
	movl	$4, %edx
	callq	_strlcpy
LBB0_15:
	movl	$1, %ebx
	jmp	LBB0_20
LBB0_16:
	movq	_MSG_FAILED_TO_SAVE_STATE_TO@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_msg_hash_to_str
	leaq	L_.str.1(%rip), %rdi
	movl	%eax, %esi
	movq	%r15, %rdx
	callq	_RARCH_ERR
	jmp	LBB0_20
LBB0_17:
	movq	_MSG_FAILED_TO_SAVE_STATE_TO@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_msg_hash_to_str
	leaq	L_.str.1(%rip), %rdi
	movl	%eax, %esi
	movq	%r15, %rdx
	callq	_RARCH_ERR
	jmp	LBB0_19
LBB0_18:
	movq	%r14, %rdi
	callq	_free
LBB0_19:
	xorl	%ebx, %ebx
LBB0_20:
	movl	%ebx, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_save_state_in_background,4,2   ## @save_state_in_background
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"%s: \"%s\".\n"

	.comm	_MSG_SAVING_STATE,4,2           ## @MSG_SAVING_STATE
L_.str.1:                               ## @.str.1
	.asciz	"%s \"%s\".\n"

	.comm	_MSG_FAILED_TO_SAVE_STATE_TO,4,2 ## @MSG_FAILED_TO_SAVE_STATE_TO
L_.str.2:                               ## @.str.2
	.asciz	"%s: %d %s.\n"

	.comm	_MSG_STATE_SIZE,4,2             ## @MSG_STATE_SIZE
	.comm	_MSG_BYTES,4,2                  ## @MSG_BYTES
L_.str.3:                               ## @.str.3
	.asciz	"%s ...\n"

	.comm	_MSG_FILE_ALREADY_EXISTS_SAVING_TO_BACKUP_BUFFER,4,2 ## @MSG_FILE_ALREADY_EXISTS_SAVING_TO_BACKUP_BUFFER
	.comm	_undo_load_buf,24,3             ## @undo_load_buf
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_content_save_state             ; -- Begin function content_save_state
	.p2align	2
_content_save_state:                    ; @content_save_state
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #96
	.cfi_def_cfa_offset 96
	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
	mov	x21, x2
	mov	x22, x1
	mov	x19, x0
	add	x0, sp, #24
	bl	_core_serialize_size
	ldr	x1, [sp, #24]
	cbz	x1, LBB0_18
; %bb.1:
Lloh0:
	adrp	x8, _save_state_in_background@GOTPAGE
Lloh1:
	ldr	x8, [x8, _save_state_in_background@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	cbz	w8, LBB0_4
; %bb.2:
	cbz	w22, LBB0_10
; %bb.3:
	mov	x20, #0
	b	LBB0_6
LBB0_4:
Lloh3:
	adrp	x8, _MSG_SAVING_STATE@GOTPAGE
Lloh4:
	ldr	x8, [x8, _MSG_SAVING_STATE@GOTPAGEOFF]
Lloh5:
	ldr	w0, [x8]
	bl	_msg_hash_to_str
	mov	x1, x0
	str	x19, [sp]
Lloh6:
	adrp	x0, l_.str@PAGE
Lloh7:
	add	x0, x0, l_.str@PAGEOFF
	bl	_RARCH_LOG
	ldr	x1, [sp, #24]
	mov	x0, x19
	bl	_get_serialized_data
	cbz	x0, LBB0_16
; %bb.5:
	mov	x20, x0
Lloh8:
	adrp	x8, _MSG_STATE_SIZE@GOTPAGE
Lloh9:
	ldr	x8, [x8, _MSG_STATE_SIZE@GOTPAGEOFF]
Lloh10:
	ldr	w0, [x8]
	bl	_msg_hash_to_str
	mov	x23, x0
	ldr	x24, [sp, #24]
Lloh11:
	adrp	x8, _MSG_BYTES@GOTPAGE
Lloh12:
	ldr	x8, [x8, _MSG_BYTES@GOTPAGEOFF]
Lloh13:
	ldr	w0, [x8]
	bl	_msg_hash_to_str
                                        ; kill: def $w0 killed $w0 def $x0
	stp	x24, x0, [sp]
Lloh14:
	adrp	x0, l_.str.2@PAGE
Lloh15:
	add	x0, x0, l_.str.2@PAGEOFF
	mov	x1, x23
	bl	_RARCH_LOG
	cbz	w22, LBB0_11
LBB0_6:
	mov	x0, x19
	bl	_path_is_valid
	cbnz	w21, LBB0_9
; %bb.7:
	cbz	x0, LBB0_9
; %bb.8:
Lloh16:
	adrp	x8, _MSG_FILE_ALREADY_EXISTS_SAVING_TO_BACKUP_BUFFER@GOTPAGE
Lloh17:
	ldr	x8, [x8, _MSG_FILE_ALREADY_EXISTS_SAVING_TO_BACKUP_BUFFER@GOTPAGEOFF]
Lloh18:
	ldr	w0, [x8]
	bl	_msg_hash_to_str
	mov	x1, x0
Lloh19:
	adrp	x0, l_.str.3@PAGE
Lloh20:
	add	x0, x0, l_.str.3@PAGEOFF
	bl	_RARCH_LOG
	ldr	x2, [sp, #24]
	mov	w21, #1
	mov	x0, x19
	mov	x1, x20
	mov	w3, #1
	mov	w4, #0
	bl	_task_push_load_and_save_state
	b	LBB0_19
LBB0_9:
	ldr	x2, [sp, #24]
	mov	x0, x19
	mov	x1, x20
	mov	x3, x21
	bl	_task_push_save_state
	b	LBB0_15
LBB0_10:
	mov	x0, x19
	bl	_get_serialized_data
	mov	x20, x0
	cbz	x0, LBB0_16
LBB0_11:
Lloh21:
	adrp	x22, _undo_load_buf@GOTPAGE
Lloh22:
	ldr	x22, [x22, _undo_load_buf@GOTPAGEOFF]
	ldr	x0, [x22]
	cbz	x0, LBB0_13
; %bb.12:
	bl	_free
LBB0_13:
	ldr	x21, [sp, #24]
	mov	x0, x21
	bl	_malloc
	str	x0, [x22]
	cbz	x0, LBB0_17
; %bb.14:
	mov	x1, x20
	mov	x2, x21
	bl	_memcpy
	mov	x0, x20
	bl	_free
	ldr	x8, [sp, #24]
	str	x8, [x22, #8]
	ldr	w0, [x22, #16]
	mov	x1, x19
	mov	w2, #4
	bl	_strlcpy
LBB0_15:
	mov	w21, #1
	b	LBB0_19
LBB0_16:
Lloh23:
	adrp	x8, _MSG_FAILED_TO_SAVE_STATE_TO@GOTPAGE
Lloh24:
	ldr	x8, [x8, _MSG_FAILED_TO_SAVE_STATE_TO@GOTPAGEOFF]
Lloh25:
	ldr	w0, [x8]
	bl	_msg_hash_to_str
	mov	x1, x0
Lloh26:
	adrp	x0, l_.str.1@PAGE
Lloh27:
	add	x0, x0, l_.str.1@PAGEOFF
	mov	x2, x19
	bl	_RARCH_ERR
	b	LBB0_18
LBB0_17:
	mov	x0, x20
	bl	_free
LBB0_18:
	mov	w21, #0
LBB0_19:
	mov	x0, x21
	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
	add	sp, sp, #96
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpAdd	Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpAdd	Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpLdrGot	Lloh21, Lloh22
	.loh AdrpAdd	Lloh26, Lloh27
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.cfi_endproc
                                        ; -- End function
	.comm	_save_state_in_background,4,2   ; @save_state_in_background
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"%s: \"%s\".\n"

	.comm	_MSG_SAVING_STATE,4,2           ; @MSG_SAVING_STATE
l_.str.1:                               ; @.str.1
	.asciz	"%s \"%s\".\n"

	.comm	_MSG_FAILED_TO_SAVE_STATE_TO,4,2 ; @MSG_FAILED_TO_SAVE_STATE_TO
l_.str.2:                               ; @.str.2
	.asciz	"%s: %d %s.\n"

	.comm	_MSG_STATE_SIZE,4,2             ; @MSG_STATE_SIZE
	.comm	_MSG_BYTES,4,2                  ; @MSG_BYTES
l_.str.3:                               ; @.str.3
	.asciz	"%s ...\n"

	.comm	_MSG_FILE_ALREADY_EXISTS_SAVING_TO_BACKUP_BUFFER,4,2 ; @MSG_FILE_ALREADY_EXISTS_SAVING_TO_BACKUP_BUFFER
	.comm	_undo_load_buf,24,3             ; @undo_load_buf
.subsections_via_symbols
