	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function trail_find
_trail_find:                            ## @trail_find
	.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	%rdi, %r14
	movq	(%rdi), %rax
	movq	_TRAIL_MAGIC@GOTPCREL(%rip), %rcx
	xorl	%edi, %edi
	cmpq	(%rcx), %rax
	sete	%dil
	callq	_PJDLOG_ASSERT
	movl	8(%r14), %edi
	callq	_trail_is_not_terminated
	movl	%eax, %edi
	callq	_PJDLOG_ASSERT
	movl	12(%r14), %edi
	callq	_rewinddir
	movq	_HALF_LEN@GOTPCREL(%rip), %r15
	.p2align	4, 0x90
LBB0_1:                                 ## =>This Inner Loop Header: Depth=1
	movl	12(%r14), %edi
	callq	_readdir
	testq	%rax, %rax
	je	LBB0_2
## %bb.3:                               ##   in Loop: Header=BB0_1 Depth=1
	movq	%rax, %rbx
	movl	(%rax), %edi
	movl	8(%r14), %esi
	movq	(%r15), %rdx
	incq	%rdx
	callq	_strncmp
	testq	%rax, %rax
	jne	LBB0_1
## %bb.4:
	movl	8(%r14), %edi
	movl	(%rbx), %esi
	movl	$4, %edx
	callq	_strlcpy
	xorl	%edi, %edi
	cmpl	$4, %eax
	setb	%dil
	callq	_PJDLOG_VERIFY
	movl	$1, %eax
	jmp	LBB0_5
LBB0_2:
	xorl	%eax, %eax
LBB0_5:
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_TRAIL_MAGIC,8,3                ## @TRAIL_MAGIC
	.comm	_HALF_LEN,8,3                   ## @HALF_LEN
	.no_dead_strip	_trail_find
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function trail_find
_trail_find:                            ; @trail_find
	.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, x0
	ldr	x8, [x0]
Lloh0:
	adrp	x9, _TRAIL_MAGIC@GOTPAGE
Lloh1:
	ldr	x9, [x9, _TRAIL_MAGIC@GOTPAGEOFF]
Lloh2:
	ldr	x9, [x9]
	cmp	x8, x9
	cset	w0, eq
	bl	_PJDLOG_ASSERT
	ldr	w0, [x19, #8]
	bl	_trail_is_not_terminated
	bl	_PJDLOG_ASSERT
	ldr	w0, [x19, #12]
	bl	_rewinddir
Lloh3:
	adrp	x21, _HALF_LEN@GOTPAGE
Lloh4:
	ldr	x21, [x21, _HALF_LEN@GOTPAGEOFF]
LBB0_1:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w0, [x19, #12]
	bl	_readdir
	cbz	x0, LBB0_4
; %bb.2:                                ;   in Loop: Header=BB0_1 Depth=1
	mov	x20, x0
	ldr	w0, [x0]
	ldr	w1, [x19, #8]
	ldr	x8, [x21]
	add	x2, x8, #1
	bl	_strncmp
	cbnz	x0, LBB0_1
; %bb.3:
	ldr	w0, [x19, #8]
	ldr	w1, [x20]
	mov	w2, #4
	bl	_strlcpy
	cmp	w0, #4
	cset	w0, lo
	bl	_PJDLOG_VERIFY
	mov	w0, #1
LBB0_4:
	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
	ret
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_TRAIL_MAGIC,8,3                ; @TRAIL_MAGIC
	.comm	_HALF_LEN,8,3                   ; @HALF_LEN
	.no_dead_strip	_trail_find
.subsections_via_symbols
