	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function align_to_next_packet
_align_to_next_packet:                  ## @align_to_next_packet
	.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
	movq	%rdi, %r14
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	movq	_MAX_HOLE@GOTPCREL(%rip), %rax
	movl	(%rax), %r15d
	movq	%r15, %rax
	shlq	$2, %rax
	callq	____chkstk_darwin
	addq	$15, %rax
	andq	$-16, %rax
	subq	%rax, %rsp
	movq	%rsp, -56(%rbp)                 ## 8-byte Spill
	movl	4(%r14), %edi
	callq	_ftello
	movl	%eax, %r12d
	movl	%eax, %ebx
	subl	(%r14), %ebx
	jl	LBB0_2
## %bb.1:
	movl	4(%r14), %edi
	movq	_SEEK_SET@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movl	%ebx, %esi
	callq	_fseeko
	movl	%ebx, %r12d
LBB0_2:
	leal	(,%r15,4), %ebx
	movl	4(%r14), %ecx
	movq	-56(%rbp), %r15                 ## 8-byte Reload
	movq	%r15, %rdi
	movl	%ebx, %esi
	movl	$1, %edx
	callq	_fread
	cmpl	$1, %eax
	jne	LBB0_13
## %bb.3:
	leal	1(%rbx), %eax
	movl	%eax, -64(%rbp)                 ## 4-byte Spill
	movl	%r12d, %r13d
	movl	%r12d, -60(%rbp)                ## 4-byte Spill
	movq	%rbx, -72(%rbp)                 ## 8-byte Spill
LBB0_4:                                 ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_8 Depth 2
	movl	(%r14), %esi
	movq	%rbx, %rax
	leal	(,%rsi,8), %ebx
                                        ## kill: def $eax killed $eax killed $rax
	subl	%ebx, %eax
	testl	%eax, %eax
	jle	LBB0_5
## %bb.6:                               ##   in Loop: Header=BB0_4 Depth=1
	movq	%r15, %rdi
                                        ## kill: def $esi killed $esi killed $rsi
	movl	$8, %edx
	callq	_have_ts_sync
	testq	%rax, %rax
	jne	LBB0_10
## %bb.7:                               ##   in Loop: Header=BB0_4 Depth=1
	movl	-64(%rbp), %r12d                ## 4-byte Reload
	subl	%ebx, %r12d
	.p2align	4, 0x90
LBB0_8:                                 ##   Parent Loop BB0_4 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	decl	%r12d
	cmpl	$2, %r12d
	jl	LBB0_11
## %bb.9:                               ##   in Loop: Header=BB0_8 Depth=2
	addq	$4, %r15
	movl	(%r14), %esi
	movq	%r15, %rdi
	movl	$8, %edx
	callq	_have_ts_sync
	testq	%rax, %rax
	je	LBB0_8
	jmp	LBB0_10
	.p2align	4, 0x90
LBB0_5:                                 ##   in Loop: Header=BB0_4 Depth=1
	negl	%ebx
	jmp	LBB0_12
	.p2align	4, 0x90
LBB0_11:                                ##   in Loop: Header=BB0_4 Depth=1
	movl	(%r14), %ebx
	shll	$3, %ebx
	negl	%ebx
	movq	-56(%rbp), %r15                 ## 8-byte Reload
LBB0_12:                                ##   in Loop: Header=BB0_4 Depth=1
	movl	4(%r14), %edi
	movq	_SEEK_CUR@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movl	%ebx, %esi
	callq	_fseeko
	movl	4(%r14), %edi
	callq	_ftello
	movl	%eax, %r13d
	movl	4(%r14), %ecx
	movq	%r15, %rdi
	movq	-72(%rbp), %rbx                 ## 8-byte Reload
	movl	%ebx, %esi
	movl	$1, %edx
	callq	_fread
	cmpl	$1, %eax
	je	LBB0_4
LBB0_13:
	movl	4(%r14), %edi
	callq	_ferror
	xorl	%ebx, %ebx
	testl	%eax, %eax
	je	LBB0_15
## %bb.14:
	leaq	L_.str(%rip), %rdi
	movl	%eax, %esi
	callq	_hb_error
	movl	8(%r14), %edi
	movq	_HB_ERROR_READ@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_hb_set_work_error
	jmp	LBB0_15
LBB0_10:
	subq	-56(%rbp), %r15                 ## 8-byte Folded Reload
	shrq	$2, %r15
	subl	(%r14), %r15d
	movl	4(%r14), %edi
	leal	(%r15,%r13), %esi
	addl	$188, %esi
	movq	_SEEK_SET@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	callq	_fseeko
	subl	-60(%rbp), %r13d                ## 4-byte Folded Reload
	leal	(%r15,%r13), %ebx
	addl	$188, %ebx
LBB0_15:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-48(%rbp), %rax
	jne	LBB0_17
## %bb.16:
	movl	%ebx, %eax
	leaq	-40(%rbp), %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_17:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_MAX_HOLE,4,2                   ## @MAX_HOLE
	.comm	_SEEK_SET,4,2                   ## @SEEK_SET
	.comm	_SEEK_CUR,4,2                   ## @SEEK_CUR
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"align_to_next_packet: error (%d)"

	.comm	_HB_ERROR_READ,4,2              ## @HB_ERROR_READ
	.no_dead_strip	_align_to_next_packet
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function align_to_next_packet
_align_to_next_packet:                  ; @align_to_next_packet
	.cfi_startproc
; %bb.0:
	stp	x28, x27, [sp, #-96]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	sub	sp, sp, #16
	mov	x19, x0
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	stur	x8, [x29, #-88]
Lloh3:
	adrp	x8, _MAX_HOLE@GOTPAGE
Lloh4:
	ldr	x8, [x8, _MAX_HOLE@GOTPAGEOFF]
Lloh5:
	ldr	w23, [x8]
	lsl	x8, x23, #2
	mov	x9, x8
Lloh6:
	adrp	x16, ___chkstk_darwin@GOTPAGE
Lloh7:
	ldr	x16, [x16, ___chkstk_darwin@GOTPAGEOFF]
	blr	x16
	mov	x9, sp
	add	x8, x8, #15
	and	x8, x8, #0x7fffffff0
	sub	x20, x9, x8
	mov	sp, x20
	ldr	w0, [x0, #4]
	bl	_ftello
	mov	x21, x0
	ldr	w8, [x19]
	subs	w22, w0, w8
	b.lt	LBB0_2
; %bb.1:
	ldr	w0, [x19, #4]
Lloh8:
	adrp	x8, _SEEK_SET@GOTPAGE
Lloh9:
	ldr	x8, [x8, _SEEK_SET@GOTPAGEOFF]
Lloh10:
	ldr	w2, [x8]
	mov	x1, x22
	bl	_fseeko
	mov	x21, x22
LBB0_2:
	lsl	w22, w23, #2
	ldr	w3, [x19, #4]
	mov	x0, x20
	mov	x1, x22
	mov	w2, #1
	bl	_fread
	cmp	w0, #1
	b.ne	LBB0_12
; %bb.3:
	add	w25, w22, #1
Lloh11:
	adrp	x26, _SEEK_CUR@GOTPAGE
Lloh12:
	ldr	x26, [x26, _SEEK_CUR@GOTPAGEOFF]
	mov	x23, x21
LBB0_4:                                 ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_7 Depth 2
	ldr	w24, [x19]
	lsl	w8, w24, #3
	sub	w9, w22, w8
	cmp	w9, #1
	b.lt	LBB0_9
; %bb.5:                                ;   in Loop: Header=BB0_4 Depth=1
	mov	x0, x20
	mov	x1, x24
	mov	w2, #8
	bl	_have_ts_sync
	cbnz	x0, LBB0_14
; %bb.6:                                ;   in Loop: Header=BB0_4 Depth=1
	sub	w27, w25, w24, lsl #3
	mov	x24, x20
LBB0_7:                                 ;   Parent Loop BB0_4 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	sub	w27, w27, #1
	cmp	w27, #2
	b.lt	LBB0_10
; %bb.8:                                ;   in Loop: Header=BB0_7 Depth=2
	add	x24, x24, #4
	ldr	w1, [x19]
	mov	x0, x24
	mov	w2, #8
	bl	_have_ts_sync
	cbz	x0, LBB0_7
	b	LBB0_15
LBB0_9:                                 ;   in Loop: Header=BB0_4 Depth=1
	neg	w1, w8
	b	LBB0_11
LBB0_10:                                ;   in Loop: Header=BB0_4 Depth=1
	ldr	w8, [x19]
	neg	w1, w8, lsl #3
LBB0_11:                                ;   in Loop: Header=BB0_4 Depth=1
	ldr	w0, [x19, #4]
	ldr	w2, [x26]
	bl	_fseeko
	ldr	w0, [x19, #4]
	bl	_ftello
	mov	x23, x0
	ldr	w3, [x19, #4]
	mov	x0, x20
	mov	x1, x22
	mov	w2, #1
	bl	_fread
	cmp	w0, #1
	b.eq	LBB0_4
LBB0_12:
	ldr	w0, [x19, #4]
	bl	_ferror
	cbz	w0, LBB0_16
; %bb.13:
	mov	x1, x0
Lloh13:
	adrp	x0, l_.str@PAGE
Lloh14:
	add	x0, x0, l_.str@PAGEOFF
	bl	_hb_error
	ldr	w0, [x19, #8]
Lloh15:
	adrp	x8, _HB_ERROR_READ@GOTPAGE
Lloh16:
	ldr	x8, [x8, _HB_ERROR_READ@GOTPAGEOFF]
Lloh17:
	ldr	w1, [x8]
	bl	_hb_set_work_error
	mov	w0, #0
	b	LBB0_16
LBB0_14:
	mov	x24, x20
LBB0_15:
	sub	x8, x24, x20
	lsr	x8, x8, #2
	ldp	w9, w0, [x19]
	sub	w8, w8, w9
	add	w19, w8, #188
	add	w1, w19, w23
Lloh18:
	adrp	x8, _SEEK_SET@GOTPAGE
Lloh19:
	ldr	x8, [x8, _SEEK_SET@GOTPAGEOFF]
Lloh20:
	ldr	w2, [x8]
	bl	_fseeko
	sub	w8, w23, w21
	add	w0, w8, w19
LBB0_16:
	ldur	x8, [x29, #-88]
Lloh21:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh22:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh23:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_18
; %bb.17:
	sub	sp, x29, #80
	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
	ldp	x28, x27, [sp], #96             ; 16-byte Folded Reload
	ret
LBB0_18:
	bl	___stack_chk_fail
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpAdd	Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.cfi_endproc
                                        ; -- End function
	.comm	_MAX_HOLE,4,2                   ; @MAX_HOLE
	.comm	_SEEK_SET,4,2                   ; @SEEK_SET
	.comm	_SEEK_CUR,4,2                   ; @SEEK_CUR
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"align_to_next_packet: error (%d)"

	.comm	_HB_ERROR_READ,4,2              ; @HB_ERROR_READ
	.no_dead_strip	_align_to_next_packet
.subsections_via_symbols
