	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function fifolog_reader_findsync
_fifolog_reader_findsync:               ## @fifolog_reader_findsync
	.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
	movq	%rsi, %r14
	movq	%rdi, %rbx
	movq	(%rsi), %rax
	xorl	%edi, %edi
	cmpq	(%rbx), %rax
	setl	%dil
	callq	_assert
	movq	(%r14), %rsi
	movq	%rbx, %rdi
	callq	_fifolog_int_read
	testl	%eax, %eax
	je	LBB0_2
## %bb.1:
	leaq	L_.str(%rip), %rsi
	movl	$1, %edi
	movl	%eax, %edx
	callq	_err
LBB0_2:
	movq	8(%rbx), %rdi
	callq	_be32dec
	movl	%eax, %r15d
	movq	(%r14), %rax
	testq	%rax, %rax
	jne	LBB0_4
## %bb.3:
	xorl	%r12d, %r12d
	testl	%r15d, %r15d
	je	LBB0_13
LBB0_4:
	movq	8(%rbx), %rcx
	movq	_FIFOLOG_FLG_SYNC@GOTPCREL(%rip), %r13
	movl	(%r13), %edx
	movl	$1, %r12d
	testl	%edx, 16(%rcx)
	je	LBB0_5
LBB0_13:
	movl	%r12d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_5:
	xorl	%edi, %edi
	cmpq	(%rbx), %rax
	setl	%dil
	callq	_assert
	movq	(%r14), %rsi
	incq	%rsi
	movq	%rsi, (%r14)
	movl	$2, %r12d
	cmpq	(%rbx), %rsi
	je	LBB0_13
	.p2align	4, 0x90
LBB0_7:                                 ## =>This Inner Loop Header: Depth=1
	incl	%r15d
	movq	%rbx, %rdi
	callq	_fifolog_int_read
	testl	%eax, %eax
	je	LBB0_9
## %bb.8:                               ##   in Loop: Header=BB0_7 Depth=1
	movl	$1, %edi
	leaq	L_.str(%rip), %rsi
	movl	%eax, %edx
	callq	_err
LBB0_9:                                 ##   in Loop: Header=BB0_7 Depth=1
	movq	8(%rbx), %rdi
	callq	_be32dec
	cmpl	%eax, %r15d
	jne	LBB0_10
## %bb.11:                              ##   in Loop: Header=BB0_7 Depth=1
	movq	8(%rbx), %rax
	movl	(%r13), %ecx
	testl	%ecx, 16(%rax)
	jne	LBB0_12
## %bb.14:                              ##   in Loop: Header=BB0_7 Depth=1
	movq	(%r14), %rax
	xorl	%edi, %edi
	cmpq	(%rbx), %rax
	setl	%dil
	callq	_assert
	movq	(%r14), %rsi
	incq	%rsi
	movq	%rsi, (%r14)
	cmpq	(%rbx), %rsi
	jne	LBB0_7
	jmp	LBB0_13
LBB0_10:
	movl	$3, %r12d
	jmp	LBB0_13
LBB0_12:
	movl	$1, %r12d
	jmp	LBB0_13
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Read error (%d) while looking for SYNC"

	.comm	_FIFOLOG_FLG_SYNC,4,2           ## @FIFOLOG_FLG_SYNC
	.no_dead_strip	_fifolog_reader_findsync
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function fifolog_reader_findsync
_fifolog_reader_findsync:               ; @fifolog_reader_findsync
	.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	x19, x1
	mov	x20, x0
	ldr	x8, [x1]
	ldr	x9, [x0]
	cmp	x8, x9
	cset	w0, lt
	bl	_assert
	ldr	x1, [x19]
	mov	x0, x20
	bl	_fifolog_int_read
	cbz	w0, LBB0_2
; %bb.1:
	mov	x2, x0
Lloh0:
	adrp	x1, l_.str@PAGE
Lloh1:
	add	x1, x1, l_.str@PAGEOFF
	mov	w0, #1
	bl	_err
LBB0_2:
	ldr	x0, [x20, #8]
	bl	_be32dec
	mov	x21, x0
	ldr	x8, [x19]
	cbnz	x8, LBB0_5
; %bb.3:
	cbnz	w21, LBB0_5
; %bb.4:
	mov	w0, #0
	b	LBB0_16
LBB0_5:
	ldr	x9, [x20, #8]
	ldr	w9, [x9, #16]
Lloh2:
	adrp	x23, _FIFOLOG_FLG_SYNC@GOTPAGE
Lloh3:
	ldr	x23, [x23, _FIFOLOG_FLG_SYNC@GOTPAGEOFF]
	ldr	w10, [x23]
	tst	w10, w9
	b.eq	LBB0_7
LBB0_6:
	mov	w0, #1
	b	LBB0_16
LBB0_7:
	ldr	x9, [x20]
	cmp	x8, x9
	cset	w0, lt
	bl	_assert
	ldr	x8, [x19]
	add	x1, x8, #1
	str	x1, [x19]
	ldr	x8, [x20]
	cmp	x1, x8
	b.eq	LBB0_14
; %bb.8:
Lloh4:
	adrp	x22, l_.str@PAGE
Lloh5:
	add	x22, x22, l_.str@PAGEOFF
LBB0_9:                                 ; =>This Inner Loop Header: Depth=1
	mov	x0, x20
	bl	_fifolog_int_read
	cbz	w0, LBB0_11
; %bb.10:                               ;   in Loop: Header=BB0_9 Depth=1
	mov	x2, x0
	mov	w0, #1
	mov	x1, x22
	bl	_err
LBB0_11:                                ;   in Loop: Header=BB0_9 Depth=1
	add	w21, w21, #1
	ldr	x0, [x20, #8]
	bl	_be32dec
	cmp	w21, w0
	b.ne	LBB0_15
; %bb.12:                               ;   in Loop: Header=BB0_9 Depth=1
	ldr	x8, [x20, #8]
	ldr	w8, [x8, #16]
	ldr	w9, [x23]
	tst	w9, w8
	b.ne	LBB0_6
; %bb.13:                               ;   in Loop: Header=BB0_9 Depth=1
	ldr	x8, [x19]
	ldr	x9, [x20]
	cmp	x8, x9
	cset	w0, lt
	bl	_assert
	ldr	x8, [x19]
	add	x1, x8, #1
	str	x1, [x19]
	ldr	x8, [x20]
	cmp	x1, x8
	b.ne	LBB0_9
LBB0_14:
	mov	w0, #2
	b	LBB0_16
LBB0_15:
	mov	w0, #3
LBB0_16:
	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 AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpAdd	Lloh4, Lloh5
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Read error (%d) while looking for SYNC"

	.comm	_FIFOLOG_FLG_SYNC,4,2           ; @FIFOLOG_FLG_SYNC
	.no_dead_strip	_fifolog_reader_findsync
.subsections_via_symbols
