	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function task_save_handler_finished
_task_save_handler_finished:            ## @task_save_handler_finished
	.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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %r15
	movq	%rdi, %r14
	movl	$1, %esi
	callq	_task_set_finished
	movq	16(%r15), %rdi
	callq	_intfstream_close
	movq	16(%r15), %rdi
	callq	_free
	movq	%r14, %rdi
	callq	_task_get_error
	testl	%eax, %eax
	jne	LBB0_3
## %bb.1:
	movq	%r14, %rdi
	callq	_task_get_cancelled
	testq	%rax, %rax
	je	LBB0_3
## %bb.2:
	leaq	L_.str(%rip), %rdi
	callq	_strdup
	movq	%r14, %rdi
	movl	%eax, %esi
	callq	_task_set_error
LBB0_3:
	movl	$1, %edi
	movl	$24, %esi
	callq	_calloc
	movq	%rax, %rbx
	movq	%rax, %rdi
	movq	%r15, %rsi
	movl	$24, %edx
	callq	_memcpy
	movq	%r14, %rdi
	movq	%rbx, %rsi
	callq	_task_set_data
	movq	(%r15), %rdi
	testq	%rdi, %rdi
	je	LBB0_8
## %bb.4:
	cmpq	$0, 8(%r15)
	je	LBB0_7
## %bb.5:
	movq	_undo_save_buf@GOTPCREL(%rip), %rax
	cmpq	(%rax), %rdi
	jne	LBB0_7
## %bb.6:
	movq	$0, (%rax)
LBB0_7:
	callq	_free
	movq	$0, (%r15)
LBB0_8:
	movq	%r15, %rdi
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_free                           ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Task canceled"

	.comm	_undo_save_buf,8,3              ## @undo_save_buf
	.no_dead_strip	_task_save_handler_finished
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function task_save_handler_finished
_task_save_handler_finished:            ; @task_save_handler_finished
	.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, x1
	mov	x20, x0
	mov	w1, #1
	bl	_task_set_finished
	ldr	x0, [x19, #16]
	bl	_intfstream_close
	ldr	x0, [x19, #16]
	bl	_free
	mov	x0, x20
	bl	_task_get_error
	cbnz	w0, LBB0_3
; %bb.1:
	mov	x0, x20
	bl	_task_get_cancelled
	cbz	x0, LBB0_3
; %bb.2:
Lloh0:
	adrp	x0, l_.str@PAGE
Lloh1:
	add	x0, x0, l_.str@PAGEOFF
	bl	_strdup
	mov	x1, x0
	mov	x0, x20
	bl	_task_set_error
LBB0_3:
	mov	w0, #1
	mov	w1, #24
	bl	_calloc
	mov	x21, x0
	mov	x1, x19
	mov	w2, #24
	bl	_memcpy
	mov	x0, x20
	mov	x1, x21
	bl	_task_set_data
	ldr	x0, [x19]
	cbz	x0, LBB0_8
; %bb.4:
	ldr	x8, [x19, #8]
	cbz	x8, LBB0_7
; %bb.5:
Lloh2:
	adrp	x8, _undo_save_buf@GOTPAGE
Lloh3:
	ldr	x8, [x8, _undo_save_buf@GOTPAGEOFF]
	ldr	x9, [x8]
	cmp	x0, x9
	b.ne	LBB0_7
; %bb.6:
	str	xzr, [x8]
LBB0_7:
	bl	_free
	str	xzr, [x19]
LBB0_8:
	mov	x0, x19
	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
	b	_free
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh2, Lloh3
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Task canceled"

	.comm	_undo_save_buf,8,3              ; @undo_save_buf
	.no_dead_strip	_task_save_handler_finished
.subsections_via_symbols
