	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_fifolog_reader_seek            ## -- Begin function fifolog_reader_seek
	.p2align	4, 0x90
_fifolog_reader_seek:                   ## @fifolog_reader_seek
	.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	_FIFOLOG_READER_MAGIC@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_CHECK_OBJ_NOTNULL
	movl	$0, -48(%rbp)
	movq	(%rbx), %rdi
	leaq	-48(%rbp), %rsi
	callq	_fifolog_reader_findsync
	testl	%eax, %eax
	je	LBB0_1
## %bb.2:
	xorl	%edi, %edi
	cmpl	$1, %eax
	sete	%dil
	callq	_assert
	movq	(%rbx), %rax
	movq	(%rax), %rax
	movq	_FIFOLOG_FLG_SYNC@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edi
	andl	16(%rax), %edi
	callq	_assert
	movq	(%rbx), %rax
	movq	(%rax), %rdi
	callq	_be32dec
	movq	%rax, %r15
	movq	(%rbx), %rax
	movq	(%rax), %rdi
	addq	$20, %rdi
	callq	_be32dec
	cmpq	%r14, %rax
	jbe	LBB0_8
## %bb.3:
	movq	(%rbx), %rdi
	leaq	-44(%rbp), %rsi
	callq	_fifolog_int_findend
	testq	%rax, %rax
	je	LBB0_5
## %bb.4:
	leaq	L_.str(%rip), %rsi
	movl	$1, %edi
	movq	%rax, %rdx
	callq	_err
LBB0_5:
	incl	-44(%rbp)
	movq	(%rbx), %rdi
	leaq	-44(%rbp), %rsi
	callq	_fifolog_reader_findsync
	testl	%eax, %eax
	je	LBB0_15
## %bb.6:
	cmpl	$1, %eax
	jne	LBB0_8
## %bb.7:
	movl	-44(%rbp), %eax
	movl	%eax, -48(%rbp)
	movq	(%rbx), %rax
	movq	(%rax), %rdi
	callq	_be32dec
	movq	%rax, %r15
	movq	(%rbx), %rax
	movq	(%rax), %rdi
	addq	$20, %rdi
	callq	_be32dec
LBB0_8:
	movq	(%rbx), %rax
	movl	8(%rax), %eax
	subl	-48(%rbp), %eax
	movl	%eax, %r13d
	shrl	$31, %r13d
	addl	%eax, %r13d
	sarl	%r13d
	movl	%r13d, -44(%rbp)
	cmpl	$4, %eax
	jl	LBB0_14
## %bb.9:
	movl	%r13d, %eax
	jmp	LBB0_11
	.p2align	4, 0x90
LBB0_12:                                ##   in Loop: Header=BB0_11 Depth=1
	shrl	%eax
	movl	%eax, -44(%rbp)
	movl	%eax, %r13d
LBB0_13:                                ##   in Loop: Header=BB0_11 Depth=1
	movl	%r13d, %eax
	cmpl	$1, %r13d
	jle	LBB0_14
LBB0_11:                                ## =>This Inner Loop Header: Depth=1
	movl	-48(%rbp), %esi
	addl	%r13d, %esi
	movq	(%rbx), %rdi
	movl	8(%rdi), %ecx
	incl	%ecx
	cmpl	%ecx, %esi
	jg	LBB0_12
## %bb.16:                              ##   in Loop: Header=BB0_11 Depth=1
	callq	_fifolog_int_read
	testl	%eax, %eax
	jne	LBB0_17
## %bb.18:                              ##   in Loop: Header=BB0_11 Depth=1
	movq	(%rbx), %rax
	movq	(%rax), %rdi
	callq	_be32dec
	movq	%rax, %r12
	leal	(%r15,%r13), %eax
	cmpl	%r12d, %eax
	jne	LBB0_17
## %bb.19:                              ##   in Loop: Header=BB0_11 Depth=1
	movq	(%rbx), %rax
	movq	(%rax), %rdi
	movq	_FIFOLOG_FLG_SYNC@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, 16(%rdi)
	je	LBB0_20
## %bb.21:                              ##   in Loop: Header=BB0_11 Depth=1
	addq	$20, %rdi
	callq	_be32dec
	cmpq	%r14, %rax
	jb	LBB0_22
	.p2align	4, 0x90
LBB0_17:                                ##   in Loop: Header=BB0_11 Depth=1
	movl	-44(%rbp), %eax
	movl	%eax, %r13d
	shrl	$31, %r13d
	addl	%eax, %r13d
	sarl	%r13d
	movl	%r13d, -44(%rbp)
	jmp	LBB0_13
LBB0_20:                                ##   in Loop: Header=BB0_11 Depth=1
	incl	%r13d
	jmp	LBB0_10
LBB0_22:                                ##   in Loop: Header=BB0_11 Depth=1
	addl	%r13d, -48(%rbp)
	movl	%r12d, %r15d
LBB0_10:                                ##   in Loop: Header=BB0_11 Depth=1
	movl	-44(%rbp), %eax
	cmpl	$2, %eax
	jge	LBB0_11
LBB0_14:
	movq	_stderr@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	(%rbx), %rax
	movl	12(%rax), %edx
	imull	-48(%rbp), %edx
	leaq	L_.str.1(%rip), %rsi
	callq	_fprintf
	movl	-48(%rbp), %eax
	jmp	LBB0_15
LBB0_1:
	xorl	%eax, %eax
LBB0_15:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_FIFOLOG_READER_MAGIC,4,2       ## @FIFOLOG_READER_MAGIC
	.comm	_FIFOLOG_FLG_SYNC,4,2           ## @FIFOLOG_FLG_SYNC
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"%s"

	.comm	_stderr,4,2                     ## @stderr
L_.str.1:                               ## @.str.1
	.asciz	"Read from %jx\n"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_fifolog_reader_seek            ; -- Begin function fifolog_reader_seek
	.p2align	2
_fifolog_reader_seek:                   ; @fifolog_reader_seek
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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	x20, x1
	mov	x19, x0
Lloh0:
	adrp	x8, _FIFOLOG_READER_MAGIC@GOTPAGE
Lloh1:
	ldr	x8, [x8, _FIFOLOG_READER_MAGIC@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	bl	_CHECK_OBJ_NOTNULL
	str	wzr, [sp, #12]
	ldr	x0, [x19]
	add	x1, sp, #12
	bl	_fifolog_reader_findsync
	cbz	w0, LBB0_21
; %bb.1:
	cmp	w0, #1
	cset	w0, eq
	bl	_assert
	ldr	x8, [x19]
	ldr	x8, [x8]
	ldr	w8, [x8, #16]
Lloh3:
	adrp	x23, _FIFOLOG_FLG_SYNC@GOTPAGE
Lloh4:
	ldr	x23, [x23, _FIFOLOG_FLG_SYNC@GOTPAGEOFF]
	ldr	w9, [x23]
	and	w0, w9, w8
	bl	_assert
	ldr	x8, [x19]
	ldr	x0, [x8]
	bl	_be32dec
	mov	x21, x0
	ldr	x8, [x19]
	ldr	x8, [x8]
	add	x0, x8, #20
	bl	_be32dec
	cmp	x0, x20
	b.ls	LBB0_7
; %bb.2:
	ldr	x0, [x19]
	add	x1, sp, #8
	bl	_fifolog_int_findend
	cbz	x0, LBB0_4
; %bb.3:
	mov	x2, x0
Lloh5:
	adrp	x1, l_.str@PAGE
Lloh6:
	add	x1, x1, l_.str@PAGEOFF
	mov	w0, #1
	bl	_err
LBB0_4:
	ldr	w8, [sp, #8]
	add	w8, w8, #1
	str	w8, [sp, #8]
	ldr	x0, [x19]
	add	x1, sp, #8
	bl	_fifolog_reader_findsync
	cbz	w0, LBB0_21
; %bb.5:
	cmp	w0, #1
	b.ne	LBB0_7
; %bb.6:
	ldr	w8, [sp, #8]
	str	w8, [sp, #12]
	ldr	x8, [x19]
	ldr	x0, [x8]
	bl	_be32dec
	mov	x21, x0
	ldr	x8, [x19]
	ldr	x8, [x8]
	add	x0, x8, #20
	bl	_be32dec
LBB0_7:
	ldr	x8, [x19]
	ldr	w8, [x8, #8]
	ldr	w9, [sp, #12]
	sub	w8, w8, w9
	cmp	w8, #0
	cinc	w9, w8, lt
	asr	w24, w9, #1
	str	w24, [sp, #8]
	cmp	w8, #4
	b.lt	LBB0_20
; %bb.8:
	mov	x8, x24
	b	LBB0_11
LBB0_9:                                 ;   in Loop: Header=BB0_11 Depth=1
	lsr	w24, w8, #1
LBB0_10:                                ;   in Loop: Header=BB0_11 Depth=1
	str	w24, [sp, #8]
	mov	x8, x24
	cmp	w24, #1
	b.le	LBB0_20
LBB0_11:                                ; =>This Inner Loop Header: Depth=1
	ldr	w9, [sp, #12]
	ldr	x0, [x19]
	ldr	w10, [x0, #8]
	add	w10, w10, #1
	add	w1, w9, w24
	cmp	w1, w10
	b.gt	LBB0_9
; %bb.12:                               ;   in Loop: Header=BB0_11 Depth=1
	bl	_fifolog_int_read
	cbnz	w0, LBB0_16
; %bb.13:                               ;   in Loop: Header=BB0_11 Depth=1
	ldr	x8, [x19]
	ldr	x0, [x8]
	bl	_be32dec
	mov	x22, x0
	add	w8, w24, w21
	cmp	w8, w22
	b.ne	LBB0_16
; %bb.14:                               ;   in Loop: Header=BB0_11 Depth=1
	ldr	x8, [x19]
	ldr	x8, [x8]
	ldr	w9, [x8, #16]
	ldr	w10, [x23]
	tst	w10, w9
	b.eq	LBB0_17
; %bb.15:                               ;   in Loop: Header=BB0_11 Depth=1
	add	x0, x8, #20
	bl	_be32dec
	cmp	x0, x20
	b.lo	LBB0_18
LBB0_16:                                ;   in Loop: Header=BB0_11 Depth=1
	ldr	w8, [sp, #8]
	cmp	w8, #0
	cinc	w8, w8, lt
	asr	w24, w8, #1
	b	LBB0_10
LBB0_17:                                ;   in Loop: Header=BB0_11 Depth=1
	add	w24, w24, #1
	b	LBB0_19
LBB0_18:                                ;   in Loop: Header=BB0_11 Depth=1
	ldr	w8, [sp, #12]
	add	w8, w8, w24
	str	w8, [sp, #12]
	mov	x21, x22
LBB0_19:                                ;   in Loop: Header=BB0_11 Depth=1
	ldr	w8, [sp, #8]
	cmp	w8, #2
	b.ge	LBB0_11
LBB0_20:
Lloh7:
	adrp	x8, _stderr@GOTPAGE
Lloh8:
	ldr	x8, [x8, _stderr@GOTPAGEOFF]
Lloh9:
	ldr	w0, [x8]
	ldr	w8, [sp, #12]
	ldr	x9, [x19]
	ldr	w9, [x9, #12]
	mul	w2, w9, w8
Lloh10:
	adrp	x1, l_.str.1@PAGE
Lloh11:
	add	x1, x1, l_.str.1@PAGEOFF
	bl	_fprintf
	ldr	w0, [sp, #12]
LBB0_21:
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #80
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpAdd	Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.cfi_endproc
                                        ; -- End function
	.comm	_FIFOLOG_READER_MAGIC,4,2       ; @FIFOLOG_READER_MAGIC
	.comm	_FIFOLOG_FLG_SYNC,4,2           ; @FIFOLOG_FLG_SYNC
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"%s"

	.comm	_stderr,4,2                     ; @stderr
l_.str.1:                               ; @.str.1
	.asciz	"Read from %jx\n"

.subsections_via_symbols
