	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function add_dirent
_add_dirent:                            ## @add_dirent
	.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
	movl	%edx, -48(%rbp)                 ## 4-byte Spill
	movl	%esi, -44(%rbp)                 ## 4-byte Spill
	movq	%rdi, %r13
	movq	_ofs@GOTPCREL(%rip), %r15
	movq	(%r15), %rbx
	movq	_erasesize@GOTPCREL(%rip), %rax
	movq	(%rax), %r14
	subq	%r14, %rbx
	callq	_strlen
	addq	$88, %rax
	cmpq	%rax, %rbx
	jae	LBB0_2
## %bb.1:
	movl	%r14d, %edi
	callq	_pad
LBB0_2:
	xorl	%eax, %eax
	callq	_prep_eraseblock
	movq	_last_ino@GOTPCREL(%rip), %rax
	incl	(%rax)
	movq	_buf@GOTPCREL(%rip), %rbx
	movq	(%r15), %rdi
	addq	(%rbx), %rdi
	xorl	%esi, %esi
	movl	$88, %edx
	callq	_memset
	movq	(%rbx), %r14
	movq	(%r15), %r12
	leaq	(%r12,%r14), %r15
	movq	_JFFS2_MAGIC_BITMASK@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 84(%r12,%r14)
	movq	_JFFS2_NODETYPE_DIRENT@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 80(%r12,%r14)
	movl	-44(%rbp), %eax                 ## 4-byte Reload
	movb	%al, (%r12,%r14)
	movq	%r13, %rdi
	callq	_strlen
	xorl	%edi, %edi
	movq	%r13, %rsi
	movl	%eax, %edx
	callq	_crc32
	movq	%rax, 72(%r12,%r14)
	movq	_last_ino@GOTPCREL(%rip), %rdx
	movl	(%rdx), %eax
	leal	1(%rax), %ecx
	movl	%ecx, (%rdx)
	movl	%eax, 4(%r12,%r14)
	movl	-48(%rbp), %eax                 ## 4-byte Reload
	movl	%eax, 8(%r12,%r14)
	movq	%r13, %rdi
	callq	_strlen
	addq	$88, %rax
	movq	%rax, 64(%r12,%r14)
	xorl	%edi, %edi
	movq	%r15, %rsi
	xorl	%edx, %edx
	callq	_crc32
	movq	%rax, 56(%r12,%r14)
	movq	_last_version@GOTPCREL(%rip), %rax
	movslq	(%rax), %rcx
	leal	1(%rcx), %edx
	movl	%edx, (%rax)
	movq	%rcx, 48(%r12,%r14)
	movq	$0, 40(%r12,%r14)
	movq	%r13, %rdi
	callq	_strlen
	movq	%rax, 16(%r12,%r14)
	xorl	%edi, %edi
	movq	%r15, %rsi
	movl	$80, %edx
	callq	_crc32
	movq	%rax, 32(%r12,%r14)
	movl	24(%r12,%r14), %ebx
	movq	%r13, %rdi
	callq	_strlen
	movl	%ebx, %edi
	movq	%r13, %rsi
	movq	%rax, %rdx
	callq	_memcpy
	movq	16(%r12,%r14), %rax
	movq	_ofs@GOTPCREL(%rip), %rdx
	movq	(%rdx), %rcx
	addq	%rcx, %rax
	addq	$88, %rax
	movq	%rax, (%rdx)
	movl	$4, %edi
	callq	_pad
	movl	4(%r12,%r14), %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_ofs,8,3                        ## @ofs
	.comm	_erasesize,8,3                  ## @erasesize
	.comm	_last_ino,4,2                   ## @last_ino
	.comm	_buf,8,3                        ## @buf
	.comm	_JFFS2_MAGIC_BITMASK,4,2        ## @JFFS2_MAGIC_BITMASK
	.comm	_JFFS2_NODETYPE_DIRENT,4,2      ## @JFFS2_NODETYPE_DIRENT
	.comm	_last_version,4,2               ## @last_version
	.no_dead_strip	_add_dirent
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function add_dirent
_add_dirent:                            ; @add_dirent
	.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	x22, x1
	mov	x19, x0
Lloh0:
	adrp	x23, _ofs@GOTPAGE
Lloh1:
	ldr	x23, [x23, _ofs@GOTPAGEOFF]
	ldr	x8, [x23]
Lloh2:
	adrp	x9, _erasesize@GOTPAGE
Lloh3:
	ldr	x9, [x9, _erasesize@GOTPAGEOFF]
Lloh4:
	ldr	x20, [x9]
	sub	x24, x8, x20
	bl	_strlen
	add	x8, x0, #88
	cmp	x24, x8
	b.hs	LBB0_2
; %bb.1:
	mov	x0, x20
	bl	_pad
LBB0_2:
	bl	_prep_eraseblock
Lloh5:
	adrp	x24, _last_ino@GOTPAGE
Lloh6:
	ldr	x24, [x24, _last_ino@GOTPAGEOFF]
	ldr	w8, [x24]
	add	w8, w8, #1
	str	w8, [x24]
Lloh7:
	adrp	x20, _buf@GOTPAGE
Lloh8:
	ldr	x20, [x20, _buf@GOTPAGEOFF]
	ldr	x8, [x20]
	ldr	x9, [x23]
	add	x0, x9, x8
	mov	w1, #0
	mov	w2, #88
	bl	_memset
	ldr	x8, [x20]
	ldr	x9, [x23]
	add	x20, x9, x8
Lloh9:
	adrp	x8, _JFFS2_MAGIC_BITMASK@GOTPAGE
Lloh10:
	ldr	x8, [x8, _JFFS2_MAGIC_BITMASK@GOTPAGEOFF]
Lloh11:
	ldr	w8, [x8]
Lloh12:
	adrp	x9, _JFFS2_NODETYPE_DIRENT@GOTPAGE
Lloh13:
	ldr	x9, [x9, _JFFS2_NODETYPE_DIRENT@GOTPAGEOFF]
Lloh14:
	ldr	w9, [x9]
	stp	w9, w8, [x20, #80]
	strb	w22, [x20]
	mov	x0, x19
	bl	_strlen
	mov	x2, x0
	mov	w0, #0
	mov	x1, x19
                                        ; kill: def $w2 killed $w2 killed $x2
	bl	_crc32
	str	x0, [x20, #72]
	ldr	w8, [x24]
	add	w9, w8, #1
	str	w9, [x24]
	stp	w8, w21, [x20, #4]
	mov	x0, x19
	bl	_strlen
	add	x8, x0, #88
	str	x8, [x20, #64]
	mov	w0, #0
	mov	x1, x20
	mov	w2, #0
	bl	_crc32
Lloh15:
	adrp	x8, _last_version@GOTPAGE
Lloh16:
	ldr	x8, [x8, _last_version@GOTPAGEOFF]
	ldrsw	x9, [x8]
	add	w10, w9, #1
	str	w10, [x8]
	stp	x9, x0, [x20, #48]
	str	xzr, [x20, #40]
	mov	x0, x19
	bl	_strlen
	str	x0, [x20, #16]
	mov	w0, #0
	mov	x1, x20
	mov	w2, #80
	bl	_crc32
	str	x0, [x20, #32]
	ldr	w21, [x20, #24]
	mov	x0, x19
	bl	_strlen
	mov	x2, x0
	mov	x0, x21
	mov	x1, x19
	bl	_memcpy
	ldr	x8, [x20, #16]
	ldr	x9, [x23]
	add	x8, x8, x9
	add	x8, x8, #88
	str	x8, [x23]
	mov	w0, #4
	bl	_pad
	ldr	w0, [x20, #4]
	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	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh5, Lloh6
	.cfi_endproc
                                        ; -- End function
	.comm	_ofs,8,3                        ; @ofs
	.comm	_erasesize,8,3                  ; @erasesize
	.comm	_last_ino,4,2                   ; @last_ino
	.comm	_buf,8,3                        ; @buf
	.comm	_JFFS2_MAGIC_BITMASK,4,2        ; @JFFS2_MAGIC_BITMASK
	.comm	_JFFS2_NODETYPE_DIRENT,4,2      ; @JFFS2_NODETYPE_DIRENT
	.comm	_last_version,4,2               ; @last_version
	.no_dead_strip	_add_dirent
.subsections_via_symbols
