	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function edit_todo_file
_edit_todo_file:                        ## @edit_todo_file
	.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
	subq	$32, %rsp
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%edi, %r14d
	xorl	%eax, %eax
	callq	_rebase_path_todo
	movq	%rax, %r15
	movq	_TODO_LIST_INIT@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -48(%rbp)
	movl	%eax, -40(%rbp)
	leaq	-48(%rbp), %rdi
	movq	%r15, %rsi
	xorl	%edx, %edx
	callq	_strbuf_read_file
	testq	%rax, %rax
	js	LBB0_1
## %bb.2:
	leaq	-48(%rbp), %rbx
	movq	%rbx, %rdi
	movl	$1, %esi
	callq	_strbuf_stripspace
	movq	_the_repository@GOTPCREL(%rip), %r12
	movl	(%r12), %edi
	leaq	-40(%rbp), %rdx
	movq	%rbx, %rsi
	xorl	%ecx, %ecx
	xorl	%r8d, %r8d
	movl	%r14d, %r9d
	callq	_edit_todo_list
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_5
## %bb.3:
	movl	(%r12), %edi
	movq	_TODO_LIST_SHORTEN_IDS@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	notl	%eax
	andl	%r14d, %eax
	movl	%eax, (%rsp)
	leaq	-40(%rbp), %rsi
	movq	%r15, %rdx
	xorl	%ecx, %ecx
	xorl	%r8d, %r8d
	movl	$-1, %r9d
	callq	_todo_list_write_to_file
	movl	$0, %ebx
	testq	%rax, %rax
	je	LBB0_5
## %bb.4:
	leaq	L_.str.1(%rip), %rdi
	callq	__
	movl	%eax, %edi
	movq	%r15, %rsi
	callq	_error_errno
	movl	%eax, %ebx
LBB0_5:
	leaq	-48(%rbp), %rdi
	callq	_todo_list_release
	leaq	-40(%rbp), %rdi
	callq	_todo_list_release
	jmp	LBB0_6
LBB0_1:
	leaq	L_.str(%rip), %rdi
	callq	__
	movl	%eax, %edi
	movq	%r15, %rsi
	callq	_error_errno
	movl	%eax, %ebx
LBB0_6:
	movl	%ebx, %eax
	addq	$32, %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_TODO_LIST_INIT,4,2             ## @TODO_LIST_INIT
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"could not read '%s'."

	.comm	_the_repository,4,2             ## @the_repository
	.comm	_TODO_LIST_SHORTEN_IDS,4,2      ## @TODO_LIST_SHORTEN_IDS
L_.str.1:                               ## @.str.1
	.asciz	"could not write '%s'"

	.no_dead_strip	_edit_todo_file
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function edit_todo_file
_edit_todo_file:                        ; @edit_todo_file
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.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
	mov	x20, x0
	bl	_rebase_path_todo
	mov	x19, x0
Lloh0:
	adrp	x8, _TODO_LIST_INIT@GOTPAGE
Lloh1:
	ldr	x8, [x8, _TODO_LIST_INIT@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	str	w8, [sp, #8]
	str	w8, [sp]
	add	x0, sp, #8
	mov	x1, x19
	mov	w2, #0
	bl	_strbuf_read_file
	tbnz	x0, #63, LBB0_4
; %bb.1:
	add	x0, sp, #8
	mov	w1, #1
	bl	_strbuf_stripspace
Lloh3:
	adrp	x22, _the_repository@GOTPAGE
Lloh4:
	ldr	x22, [x22, _the_repository@GOTPAGEOFF]
	ldr	w0, [x22]
	add	x1, sp, #8
	mov	x2, sp
	mov	x3, #0
	mov	x4, #0
	mov	x5, x20
	bl	_edit_todo_list
	mov	x21, x0
	cbnz	w0, LBB0_6
; %bb.2:
	ldr	w0, [x22]
Lloh5:
	adrp	x8, _TODO_LIST_SHORTEN_IDS@GOTPAGE
Lloh6:
	ldr	x8, [x8, _TODO_LIST_SHORTEN_IDS@GOTPAGEOFF]
Lloh7:
	ldr	w8, [x8]
	bic	w6, w20, w8
	mov	x1, sp
	mov	x2, x19
	mov	x3, #0
	mov	x4, #0
	mov	w5, #-1
	bl	_todo_list_write_to_file
	cbz	x0, LBB0_5
; %bb.3:
Lloh8:
	adrp	x0, l_.str.1@PAGE
Lloh9:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	__
	mov	x1, x19
	bl	_error_errno
	mov	x21, x0
	b	LBB0_6
LBB0_4:
Lloh10:
	adrp	x0, l_.str@PAGE
Lloh11:
	add	x0, x0, l_.str@PAGEOFF
	bl	__
	mov	x1, x19
	bl	_error_errno
	mov	x21, x0
	b	LBB0_7
LBB0_5:
	mov	w21, #0
LBB0_6:
	add	x0, sp, #8
	bl	_todo_list_release
	mov	x0, sp
	bl	_todo_list_release
LBB0_7:
	mov	x0, x21
	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
	add	sp, sp, #64
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpAdd	Lloh10, Lloh11
	.cfi_endproc
                                        ; -- End function
	.comm	_TODO_LIST_INIT,4,2             ; @TODO_LIST_INIT
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"could not read '%s'."

	.comm	_the_repository,4,2             ; @the_repository
	.comm	_TODO_LIST_SHORTEN_IDS,4,2      ; @TODO_LIST_SHORTEN_IDS
l_.str.1:                               ; @.str.1
	.asciz	"could not write '%s'"

	.no_dead_strip	_edit_todo_file
.subsections_via_symbols
