	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function journal_insertfile
_journal_insertfile:                    ## @journal_insertfile
	.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
	movl	%edi, %r15d
	movq	_UFS_ROOTINO@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	_disk@GOTPCREL(%rip), %rbx
	leaq	-48(%rbp), %rsi
	movq	%rbx, %rdi
	callq	_getinode
	testq	%rax, %rax
	je	LBB0_2
## %bb.1:
	movl	(%rbx), %esi
	leaq	L_.str(%rip), %rdi
	xorl	%eax, %eax
	callq	_warn
LBB0_11:
	xorl	%eax, %eax
	callq	_sbdirty
LBB0_15:
	movl	$-1, %ebx
LBB0_16:
	movl	%ebx, %eax
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_2:
	xorl	%eax, %eax
	callq	_journal_balloc
	movl	$-1, %ebx
	testq	%rax, %rax
	jle	LBB0_16
## %bb.3:
	movq	_sblock@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rdx
	movq	_FS_UFS1_MAGIC@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rdx
	movq	%rax, -72(%rbp)                 ## 8-byte Spill
	movq	-48(%rbp), %rax
	movq	16(%rax), %rsi
	movq	_sblock@GOTPCREL(%rip), %r13
	movq	%r13, %rdi
	callq	_lblkno
	movq	%rax, %r12
	movq	-48(%rbp), %rax
	movq	16(%rax), %rsi
	movq	%r13, %rdi
	callq	_blkoff
	movl	%eax, %r13d
	movq	-48(%rbp), %rax
	movq	%r12, %rcx
	shlq	$3, %rcx
	addq	(%rax), %rcx
	addq	$16, %rax
	movq	(%rcx), %r14
	movl	(%rax), %esi
	movq	_sblock@GOTPCREL(%rip), %rdi
	movq	%r12, %rdx
	callq	_sblksize
	movl	%eax, -52(%rbp)                 ## 4-byte Spill
	testl	%r13d, %r13d
	je	LBB0_5
## %bb.4:
	movq	%r14, -64(%rbp)                 ## 8-byte Spill
	movq	%r14, %rdi
	movq	-72(%rbp), %r14                 ## 8-byte Reload
	movq	%r14, %rsi
	movl	%r13d, %edx
	movl	%r15d, %ecx
	callq	_dir_extend
	cmpl	$-1, %eax
	jne	LBB0_7
	jmp	LBB0_16
LBB0_5:
	xorl	%eax, %eax
	movq	%rax, -64(%rbp)                 ## 8-byte Spill
	movq	-72(%rbp), %r14                 ## 8-byte Reload
	movq	%r14, %rdi
	xorl	%esi, %esi
	movl	%r15d, %edx
	callq	_dir_insert
	cmpl	$-1, %eax
	je	LBB0_16
LBB0_7:
	movq	_sblock@GOTPCREL(%rip), %rax
	movq	(%rax), %rcx
	movl	8(%rax), %eax
	movl	-52(%rbp), %r15d                ## 4-byte Reload
	subl	%r15d, %eax
	movq	_DEV_BSIZE@GOTPCREL(%rip), %rsi
	cltd
	idivl	(%rsi)
	movq	_FS_UFS1_MAGIC@GOTPCREL(%rip), %rdx
	cmpq	(%rdx), %rcx
	movq	-48(%rbp), %rcx
	addl	%eax, 8(%rcx)
	movq	(%rcx), %rax
	movq	%r14, (%rax,%r12,8)
	incq	%r12
	movq	_sblock@GOTPCREL(%rip), %rdi
	movq	%r12, %rsi
	callq	_lblktosize
	movq	-48(%rbp), %rcx
	movq	%rax, 16(%rcx)
	movq	_disk@GOTPCREL(%rip), %rbx
	movq	%rbx, %rdi
	callq	_putinode
	testq	%rax, %rax
	js	LBB0_8
## %bb.9:
	movq	_disk@GOTPCREL(%rip), %rdi
	callq	_cgwrite
	testq	%rax, %rax
	js	LBB0_10
## %bb.12:
	xorl	%ebx, %ebx
	movq	-64(%rbp), %rsi                 ## 8-byte Reload
	testq	%rsi, %rsi
	je	LBB0_16
## %bb.13:
	movq	_disk@GOTPCREL(%rip), %rdi
	movl	%r15d, %edx
	callq	_cgbfree
	testq	%rax, %rax
	jns	LBB0_16
## %bb.14:
	leaq	L_.str.3(%rip), %rdi
	xorl	%eax, %eax
	callq	_warn
	jmp	LBB0_15
LBB0_8:
	movl	(%rbx), %esi
	leaq	L_.str.1(%rip), %rdi
	xorl	%eax, %eax
	callq	_warn
	jmp	LBB0_15
LBB0_10:
	leaq	L_.str.2(%rip), %rdi
	xorl	%eax, %eax
	callq	_warn
	jmp	LBB0_11
	.cfi_endproc
                                        ## -- End function
	.comm	_disk,4,2                       ## @disk
	.comm	_UFS_ROOTINO,4,2                ## @UFS_ROOTINO
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Failed to get root inode: %s"

	.comm	_sblock,16,3                    ## @sblock
	.comm	_FS_UFS1_MAGIC,8,3              ## @FS_UFS1_MAGIC
	.comm	_DEV_BSIZE,4,2                  ## @DEV_BSIZE
L_.str.1:                               ## @.str.1
	.asciz	"Failed to write root inode: %s"

L_.str.2:                               ## @.str.2
	.asciz	"Failed to write updated cg"

L_.str.3:                               ## @.str.3
	.asciz	"Failed to write cg"

	.no_dead_strip	_journal_insertfile
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function journal_insertfile
_journal_insertfile:                    ; @journal_insertfile
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #96
	.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
	mov	x20, x0
Lloh0:
	adrp	x8, _UFS_ROOTINO@GOTPAGE
Lloh1:
	ldr	x8, [x8, _UFS_ROOTINO@GOTPAGEOFF]
Lloh2:
	ldr	w2, [x8]
Lloh3:
	adrp	x19, _disk@GOTPAGE
Lloh4:
	ldr	x19, [x19, _disk@GOTPAGEOFF]
	add	x1, sp, #8
	mov	x0, x19
	bl	_getinode
	cbz	x0, LBB0_5
; %bb.1:
	ldr	w8, [x19]
	str	x8, [sp]
Lloh5:
	adrp	x0, l_.str@PAGE
Lloh6:
	add	x0, x0, l_.str@PAGEOFF
LBB0_2:
	bl	_warn
	bl	_sbdirty
LBB0_3:
	mov	w0, #-1
LBB0_4:
	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
	add	sp, sp, #96
	ret
LBB0_5:
	bl	_journal_balloc
	cmp	x0, #1
	b.lt	LBB0_3
; %bb.6:
	mov	x19, x0
Lloh7:
	adrp	x8, _sblock@GOTPAGE
Lloh8:
	ldr	x8, [x8, _sblock@GOTPAGEOFF]
Lloh9:
	ldr	x8, [x8]
Lloh10:
	adrp	x26, _FS_UFS1_MAGIC@GOTPAGE
Lloh11:
	ldr	x26, [x26, _FS_UFS1_MAGIC@GOTPAGEOFF]
	ldr	x9, [x26]
	cmp	x8, x9
	ldr	x8, [sp, #8]
	ldr	x1, [x8, #16]
Lloh12:
	adrp	x22, _sblock@GOTPAGE
Lloh13:
	ldr	x22, [x22, _sblock@GOTPAGEOFF]
	mov	x0, x22
	bl	_lblkno
	mov	x21, x0
	ldr	x8, [sp, #8]
	ldr	x1, [x8, #16]
	mov	x0, x22
	bl	_blkoff
	mov	x24, x0
	ldr	x8, [sp, #8]
	ldr	x9, [x8], #16
	add	x9, x9, x21, lsl #3
	ldr	x23, [x9]
	ldr	w1, [x8]
Lloh14:
	adrp	x25, _sblock@GOTPAGE
Lloh15:
	ldr	x25, [x25, _sblock@GOTPAGEOFF]
	mov	x0, x25
	mov	x2, x21
	bl	_sblksize
	mov	x22, x0
	cbz	w24, LBB0_8
; %bb.7:
	mov	x0, x23
	mov	x1, x19
	mov	x2, x24
	mov	x3, x20
	bl	_dir_extend
	cmn	w0, #1
	b.ne	LBB0_10
	b	LBB0_4
LBB0_8:
	mov	x0, x19
	mov	w1, #0
	mov	x2, x20
	bl	_dir_insert
	cmn	w0, #1
	b.eq	LBB0_4
; %bb.9:
	mov	x23, #0
LBB0_10:
	ldr	x9, [x25]
	ldr	x10, [x26]
	ldr	w8, [x25, #8]
	sub	w8, w8, w22
Lloh16:
	adrp	x11, _DEV_BSIZE@GOTPAGE
Lloh17:
	ldr	x11, [x11, _DEV_BSIZE@GOTPAGEOFF]
Lloh18:
	ldr	w11, [x11]
	sdiv	w8, w8, w11
	cmp	x9, x10
	ldr	x9, [sp, #8]
	ldr	w10, [x9, #8]
	add	w8, w10, w8
	str	w8, [x9, #8]
	ldr	x8, [x9]
	str	x19, [x8, x21, lsl #3]
	add	x1, x21, #1
Lloh19:
	adrp	x0, _sblock@GOTPAGE
Lloh20:
	ldr	x0, [x0, _sblock@GOTPAGEOFF]
	bl	_lblktosize
	ldr	x8, [sp, #8]
	str	x0, [x8, #16]
Lloh21:
	adrp	x19, _disk@GOTPAGE
Lloh22:
	ldr	x19, [x19, _disk@GOTPAGEOFF]
	mov	x0, x19
	bl	_putinode
	tbnz	x0, #63, LBB0_15
; %bb.11:
Lloh23:
	adrp	x0, _disk@GOTPAGE
Lloh24:
	ldr	x0, [x0, _disk@GOTPAGEOFF]
	bl	_cgwrite
	tbnz	x0, #63, LBB0_17
; %bb.12:
	cbz	x23, LBB0_14
; %bb.13:
Lloh25:
	adrp	x0, _disk@GOTPAGE
Lloh26:
	ldr	x0, [x0, _disk@GOTPAGEOFF]
	mov	x1, x23
	mov	x2, x22
	bl	_cgbfree
	tbnz	x0, #63, LBB0_18
LBB0_14:
	mov	w0, #0
	b	LBB0_4
LBB0_15:
	ldr	w8, [x19]
	str	x8, [sp]
Lloh27:
	adrp	x0, l_.str.1@PAGE
Lloh28:
	add	x0, x0, l_.str.1@PAGEOFF
LBB0_16:
	bl	_warn
	b	LBB0_3
LBB0_17:
Lloh29:
	adrp	x0, l_.str.2@PAGE
Lloh30:
	add	x0, x0, l_.str.2@PAGEOFF
	b	LBB0_2
LBB0_18:
Lloh31:
	adrp	x0, l_.str.3@PAGE
Lloh32:
	add	x0, x0, l_.str.3@PAGEOFF
	b	LBB0_16
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh14, Lloh15
	.loh AdrpLdrGot	Lloh12, Lloh13
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh21, Lloh22
	.loh AdrpLdrGot	Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpLdrGot	Lloh23, Lloh24
	.loh AdrpLdrGot	Lloh25, Lloh26
	.loh AdrpAdd	Lloh27, Lloh28
	.loh AdrpAdd	Lloh29, Lloh30
	.loh AdrpAdd	Lloh31, Lloh32
	.cfi_endproc
                                        ; -- End function
	.comm	_disk,4,2                       ; @disk
	.comm	_UFS_ROOTINO,4,2                ; @UFS_ROOTINO
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Failed to get root inode: %s"

	.comm	_sblock,16,3                    ; @sblock
	.comm	_FS_UFS1_MAGIC,8,3              ; @FS_UFS1_MAGIC
	.comm	_DEV_BSIZE,4,2                  ; @DEV_BSIZE
l_.str.1:                               ; @.str.1
	.asciz	"Failed to write root inode: %s"

l_.str.2:                               ; @.str.2
	.asciz	"Failed to write updated cg"

l_.str.3:                               ; @.str.3
	.asciz	"Failed to write cg"

	.no_dead_strip	_journal_insertfile
.subsections_via_symbols
