	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function parse_ts2_chunk
_parse_ts2_chunk:                       ## @parse_ts2_chunk
	.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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%edx, %r14d
	movl	(%rsi), %edx
	testl	%edx, %edx
	je	LBB0_1
## %bb.2:
	movl	%ecx, %r15d
	movq	%rdi, %rbx
	addq	$12, %rdi
	movl	4(%rsi), %esi
	callq	_init_get_bits8
	movl	$-1, %r12d
	testq	%rax, %rax
	js	LBB0_9
## %bb.3:
	movq	%rbx, %rdi
	movl	%r14d, %esi
	movl	%r15d, %edx
	movl	$1, %ecx
	movl	$3, %r8d
	xorl	%r9d, %r9d
	callq	_parse_grid_2
	testq	%rax, %rax
	js	LBB0_9
## %bb.4:
	movl	8(%rbx), %r8d
	movq	%rbx, %rdi
	movl	%r14d, %esi
	movl	%r15d, %edx
	movl	$6, %ecx
	xorl	%r9d, %r9d
	callq	_parse_ts
	testq	%rax, %rax
	js	LBB0_9
## %bb.5:
	cmpl	%r15d, %r14d
	je	LBB0_8
## %bb.6:
	movq	%rbx, %rdi
	movl	%r15d, %esi
	callq	_parse_grid_1_sec_ch
	testq	%rax, %rax
	js	LBB0_9
## %bb.7:
	movq	%rbx, %rdi
	movl	%r14d, %esi
	movl	%r15d, %edx
	xorl	%ecx, %ecx
	movl	$3, %r8d
	movl	$1, %r9d
	callq	_parse_grid_2
	testq	%rax, %rax
	js	LBB0_9
LBB0_8:
	movl	(%rbx), %ecx
	movl	4(%rbx), %r8d
	movq	%rbx, %rdi
	movl	%r14d, %esi
	movl	%r15d, %edx
	movl	$1, %r9d
	callq	_parse_ts
	movq	%rax, %r12
	sarq	$63, %r12
	jmp	LBB0_9
LBB0_1:
	xorl	%r12d, %r12d
LBB0_9:
	movl	%r12d, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.no_dead_strip	_parse_ts2_chunk
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function parse_ts2_chunk
_parse_ts2_chunk:                       ; @parse_ts2_chunk
	.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	x20, x2
	ldr	w2, [x1]
	cbz	w2, LBB0_9
; %bb.1:
	mov	x19, x3
	mov	x21, x0
	add	x0, x0, #12
	ldr	w1, [x1, #4]
	bl	_init_get_bits8
	tbnz	x0, #63, LBB0_8
; %bb.2:
	mov	x0, x21
	mov	x1, x20
	mov	x2, x19
	mov	w3, #1
	mov	w4, #3
	mov	w5, #0
	bl	_parse_grid_2
	tbnz	x0, #63, LBB0_8
; %bb.3:
	ldr	w4, [x21, #8]
	mov	x0, x21
	mov	x1, x20
	mov	x2, x19
	mov	w3, #6
	mov	w5, #0
	bl	_parse_ts
	tbnz	x0, #63, LBB0_8
; %bb.4:
	cmp	w20, w19
	b.eq	LBB0_7
; %bb.5:
	mov	x0, x21
	mov	x1, x19
	bl	_parse_grid_1_sec_ch
	tbnz	x0, #63, LBB0_8
; %bb.6:
	mov	x0, x21
	mov	x1, x20
	mov	x2, x19
	mov	w3, #0
	mov	w4, #3
	mov	w5, #1
	bl	_parse_grid_2
	tbnz	x0, #63, LBB0_8
LBB0_7:
	ldp	w3, w4, [x21]
	mov	x0, x21
	mov	x1, x20
	mov	x2, x19
	mov	w5, #1
	bl	_parse_ts
	asr	x0, x0, #63
	b	LBB0_10
LBB0_8:
	mov	w0, #-1
	b	LBB0_10
LBB0_9:
	mov	w0, #0
LBB0_10:
                                        ; kill: def $w0 killed $w0 killed $x0
	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
	.cfi_endproc
                                        ; -- End function
	.no_dead_strip	_parse_ts2_chunk
.subsections_via_symbols
