	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ctb_read
_ctb_read:                              ## @ctb_read
	.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	$72, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %r12
	movq	(%rdi), %rax
	movq	%rax, -96(%rbp)                 ## 8-byte Spill
	movq	8(%rdi), %rbx
	movq	(%rbx), %xmm0                   ## xmm0 = mem[0],zero
	movdqa	%xmm0, %xmm1
	psrad	$31, %xmm1
	psrld	$30, %xmm1
	paddd	%xmm0, %xmm1
	psrad	$2, %xmm1
	pextrd	$1, %xmm1, %r13d
	movl	8(%rbx), %edi
	leal	3(%rdi), %eax
	testl	%edi, %edi
	cmovnsl	%edi, %eax
	movdqa	%xmm1, -64(%rbp)                ## 16-byte Spill
	movd	%xmm1, %r14d
	movl	%eax, %r15d
	sarl	$2, %r15d
	andl	$-4, %eax
	subl	%eax, %edi
                                        ## kill: def $edi killed $edi killed $rdi
	callq	_GEM_BUG_ON
	movl	(%rbx), %edi
	leal	3(%rdi), %eax
	testl	%edi, %edi
	cmovnsl	%edi, %eax
	andl	$-4, %eax
	subl	%eax, %edi
                                        ## kill: def $edi killed $edi killed $rdi
	callq	_GEM_BUG_ON
	movl	4(%rbx), %edi
	leal	3(%rdi), %eax
	testl	%edi, %edi
	cmovnsl	%edi, %eax
	andl	$-4, %eax
	subl	%eax, %edi
                                        ## kill: def $edi killed $edi killed $rdi
	callq	_GEM_BUG_ON
	xorl	%edi, %edi
	cmpl	%r15d, %r13d
	setae	%dil
	callq	_GEM_BUG_ON
	xorl	%edi, %edi
	cmpl	%r15d, %r14d
	setae	%dil
	callq	_GEM_BUG_ON
	xorl	%edi, %edi
	cmpl	%r14d, %r13d
	sete	%dil
	callq	_unlikely
	testq	%rax, %rax
	je	LBB0_2
## %bb.1:
	movq	_ENODATA@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
	jmp	LBB0_24
LBB0_2:
	movq	%rbx, -80(%rbp)                 ## 8-byte Spill
	movslq	%r15d, %r14
	pmovsxdq	-64(%rbp), %xmm0                ## 16-byte Folded Reload
	movq	%xmm0, %rbx
	pextrq	$1, %xmm0, %r13
	movq	%r13, -88(%rbp)                 ## 8-byte Spill
	subq	%rbx, %r13
	xorl	%edi, %edi
	callq	_unlikely
	movq	%r12, -64(%rbp)                 ## 8-byte Spill
	movq	%rax, %r12
	testq	%rax, %rax
	cmovneq	%r14, %r12
	addq	%r13, %r12
	leaq	L_.str(%rip), %rdi
	movl	%r12d, %esi
	movq	%rbx, %rdx
	movq	-88(%rbp), %rcx                 ## 8-byte Reload
	xorl	%eax, %eax
	callq	_CT_DEBUG_DRIVER
	xorl	%edi, %edi
	callq	_GEM_BUG_ON
	movq	%r14, %rcx
	movq	-96(%rbp), %r14                 ## 8-byte Reload
	movq	(%r14,%rbx,8), %rdi
	movq	-64(%rbp), %rax                 ## 8-byte Reload
	movq	%rdi, (%rax)
	incq	%rbx
	movq	%rbx, %rax
	orq	%rcx, %rax
	shrq	$32, %rax
	movl	%r15d, -44(%rbp)                ## 4-byte Spill
	movq	%rcx, -72(%rbp)                 ## 8-byte Spill
	je	LBB0_3
## %bb.4:
	movq	%rbx, %rax
	xorl	%edx, %edx
	divq	%rcx
	movq	%rdx, %r13
	jmp	LBB0_5
LBB0_3:
	movl	%ebx, %eax
	xorl	%edx, %edx
	divl	%r15d
	movl	%edx, %r13d
LBB0_5:
	callq	_ct_header_get_len
	movl	%eax, %r15d
	incl	%r15d
	xorl	%edi, %edi
	cmpq	%r15, %r12
	setb	%dil
	callq	_unlikely
	testq	%rax, %rax
	je	LBB0_6
## %bb.10:
	leaq	(%r12,%r13), %r9
	leaq	(%r12,%r13), %rax
	decq	%rax
	movl	-44(%rbp), %edx                 ## 4-byte Reload
	movl	%edx, %ecx
	subl	%r13d, %ecx
	decl	%r12d
	notl	%edx
	addl	%edx, %r9d
	shll	$2, %r9d
	xorl	%ebx, %ebx
	cmpq	-72(%rbp), %rax                 ## 8-byte Folded Reload
	cmoval	%ecx, %r12d
	leaq	(%r14,%r13,8), %r8
	cmovbel	%ebx, %r9d
	shll	$2, %r12d
	movq	%r14, (%rsp)
	leaq	L_.str.1(%rip), %rdi
	movl	$4, %esi
	movq	-64(%rbp), %rdx                 ## 8-byte Reload
	movl	%r12d, %ecx
                                        ## kill: def $r9d killed $r9d killed $r9
	callq	_DRM_ERROR
	movq	_EPROTO@GOTPCREL(%rip), %rax
	subl	(%rax), %ebx
	jmp	LBB0_24
LBB0_6:
	cmpl	$2, %r15d
	movq	-72(%rbp), %rdi                 ## 8-byte Reload
	jb	LBB0_7
## %bb.8:
	leaq	-1(%r15), %r8
	cmpl	$2, %r15d
	jne	LBB0_11
## %bb.9:
	movl	$1, %esi
	movq	-64(%rbp), %rcx                 ## 8-byte Reload
	movq	%r14, %rbx
	movl	-44(%rbp), %r9d                 ## 4-byte Reload
LBB0_19:
	testb	$1, %r8b
	je	LBB0_23
## %bb.20:
	movq	(%rbx,%r13,8), %rax
	movq	%rax, (%rcx,%rsi,8)
	incq	%r13
	movq	%r13, %rax
	orq	%rdi, %rax
	shrq	$32, %rax
	je	LBB0_21
## %bb.22:
	movq	%r13, %rax
	xorl	%edx, %edx
	divq	%rdi
	movq	%rdx, %r13
	jmp	LBB0_23
LBB0_7:
	movq	-64(%rbp), %rcx                 ## 8-byte Reload
LBB0_23:
	shll	$2, %r15d
	leaq	L_.str.2(%rip), %rdi
	xorl	%ebx, %ebx
	movl	%r15d, %esi
	movq	%rcx, %rdx
	xorl	%eax, %eax
	callq	_CT_DEBUG_DRIVER
	shll	$2, %r13d
	movq	-80(%rbp), %rax                 ## 8-byte Reload
	movl	%r13d, (%rax)
LBB0_24:
	movl	%ebx, %eax
	addq	$72, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_11:
	movq	%r8, %r10
	andq	$-2, %r10
	negq	%r10
	movl	$1, %esi
	movq	-64(%rbp), %rcx                 ## 8-byte Reload
	movq	%r14, %rbx
	movl	-44(%rbp), %r9d                 ## 4-byte Reload
	jmp	LBB0_12
	.p2align	4, 0x90
LBB0_17:                                ##   in Loop: Header=BB0_12 Depth=1
	xorl	%edx, %edx
	divq	%rdi
	movq	%rdx, %r13
LBB0_18:                                ##   in Loop: Header=BB0_12 Depth=1
	leaq	(%r10,%rsi), %rax
	addq	$2, %rax
	addq	$2, %rsi
	cmpq	$1, %rax
	je	LBB0_19
LBB0_12:                                ## =>This Inner Loop Header: Depth=1
	movq	(%rbx,%r13,8), %rax
	movq	%rax, (%rcx,%rsi,8)
	incq	%r13
	movq	%r13, %rax
	orq	%rdi, %rax
	shrq	$32, %rax
	je	LBB0_13
## %bb.14:                              ##   in Loop: Header=BB0_12 Depth=1
	movq	%r13, %rax
	xorl	%edx, %edx
	divq	%rdi
	movq	%rdx, %rax
	jmp	LBB0_15
	.p2align	4, 0x90
LBB0_13:                                ##   in Loop: Header=BB0_12 Depth=1
	movl	%r13d, %eax
	xorl	%edx, %edx
	divl	%r9d
	movl	%edx, %eax
LBB0_15:                                ##   in Loop: Header=BB0_12 Depth=1
	movq	(%rbx,%rax,8), %rdx
	movq	%rdx, 8(%rcx,%rsi,8)
	incq	%rax
	movq	%rax, %rdx
	orq	%rdi, %rdx
	shrq	$32, %rdx
	jne	LBB0_17
## %bb.16:                              ##   in Loop: Header=BB0_12 Depth=1
                                        ## kill: def $eax killed $eax killed $rax
	xorl	%edx, %edx
	divl	%r9d
	movl	%edx, %r13d
	jmp	LBB0_18
LBB0_21:
	movl	%r13d, %eax
	xorl	%edx, %edx
	divl	%r9d
	movl	%edx, %r13d
	jmp	LBB0_23
	.cfi_endproc
                                        ## -- End function
	.comm	_ENODATA,4,2                    ## @ENODATA
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"CT: available %d (%u:%u)\n"

L_.str.1:                               ## @.str.1
	.asciz	"CT: incomplete message %*ph %*ph %*ph\n"

	.comm	_EPROTO,4,2                     ## @EPROTO
L_.str.2:                               ## @.str.2
	.asciz	"CT: received %*ph\n"

	.no_dead_strip	_ctb_read
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ctb_read
_ctb_read:                              ; @ctb_read
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #96
	.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
	mov	x19, x1
	ldp	x20, x22, [x0]
	ldp	w8, w9, [x22]
	add	w10, w8, #3
	cmp	w8, #0
	csel	w8, w10, w8, lt
	asr	w24, w8, #2
	add	w8, w9, #3
	cmp	w9, #0
	csel	w8, w8, w9, lt
	asr	w21, w8, #2
	ldr	w8, [x22, #8]
	add	w9, w8, #3
	cmp	w8, #0
	csel	w23, w9, w8, lt
	asr	w25, w23, #2
	and	w9, w23, #0xfffffffc
	sub	w0, w8, w9
	bl	_GEM_BUG_ON
	ldr	w8, [x22]
	negs	w9, w8
	and	w9, w9, #0x3
	and	w8, w8, #0x3
	csneg	w0, w8, w9, mi
	bl	_GEM_BUG_ON
	ldr	w8, [x22, #4]
	negs	w9, w8
	and	w9, w9, #0x3
	and	w8, w8, #0x3
	csneg	w0, w8, w9, mi
	bl	_GEM_BUG_ON
	cmp	w21, w25
	cset	w0, hs
	bl	_GEM_BUG_ON
	cmp	w24, w25
	cset	w0, hs
	bl	_GEM_BUG_ON
	cmp	w21, w24
	cset	w0, eq
	bl	_unlikely
	cbz	x0, LBB0_2
; %bb.1:
Lloh0:
	adrp	x8, _ENODATA@GOTPAGE
Lloh1:
	ldr	x8, [x8, _ENODATA@GOTPAGEOFF]
	b	LBB0_4
LBB0_2:
	sbfx	x23, x23, #2, #30
	sxtw	x25, w24
	sxtw	x26, w21
	sub	x21, x26, x25
	bl	_unlikely
	cmp	x0, #0
	csel	x8, xzr, x23, eq
	add	x21, x8, x21
	stp	x25, x26, [sp]
Lloh2:
	adrp	x0, l_.str@PAGE
Lloh3:
	add	x0, x0, l_.str@PAGEOFF
	mov	x1, x21
	bl	_CT_DEBUG_DRIVER
	mov	w0, #0
	bl	_GEM_BUG_ON
	ldr	x0, [x20, w24, sxtw #3]
	str	x0, [x19]
	add	x8, x25, #1
	udiv	x9, x8, x23
	msub	x24, x9, x23, x8
	bl	_ct_header_get_len
	add	w25, w0, #1
	cmp	x21, x25
	cset	w0, lo
	bl	_unlikely
	cbz	x0, LBB0_6
; %bb.3:
	mvn	w8, w23
	add	x9, x24, x21
	add	w8, w9, w8
	sub	x9, x9, #1
	sub	w10, w23, w24
	sub	w11, w21, #1
	cmp	x9, x23
	csel	w9, w10, w11, hi
	lsl	w3, w9, #2
	add	x4, x20, x24, lsl #3
	lsl	w8, w8, #2
	csel	w5, w8, wzr, hi
Lloh4:
	adrp	x0, l_.str.1@PAGE
Lloh5:
	add	x0, x0, l_.str.1@PAGEOFF
	mov	w1, #4
	mov	x2, x19
	mov	x6, x20
	bl	_DRM_ERROR
Lloh6:
	adrp	x8, _EPROTO@GOTPAGE
Lloh7:
	ldr	x8, [x8, _EPROTO@GOTPAGEOFF]
LBB0_4:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_5:
	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
	add	sp, sp, #96
	ret
LBB0_6:
	cmp	w25, #2
	b.lo	LBB0_9
; %bb.7:
	add	x8, x19, #8
	sub	x9, x25, #1
LBB0_8:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x10, [x20, x24, lsl #3]
	str	x10, [x8], #8
	add	x10, x24, #1
	udiv	x11, x10, x23
	msub	x24, x11, x23, x10
	subs	x9, x9, #1
	b.ne	LBB0_8
LBB0_9:
	lsl	w1, w25, #2
	str	x19, [sp]
Lloh8:
	adrp	x0, l_.str.2@PAGE
Lloh9:
	add	x0, x0, l_.str.2@PAGEOFF
	bl	_CT_DEBUG_DRIVER
	mov	w0, #0
	lsl	w8, w24, #2
	str	w8, [x22]
	b	LBB0_5
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpAdd	Lloh4, Lloh5
	.loh AdrpAdd	Lloh8, Lloh9
	.cfi_endproc
                                        ; -- End function
	.comm	_ENODATA,4,2                    ; @ENODATA
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"CT: available %d (%u:%u)\n"

l_.str.1:                               ; @.str.1
	.asciz	"CT: incomplete message %*ph %*ph %*ph\n"

	.comm	_EPROTO,4,2                     ; @EPROTO
l_.str.2:                               ; @.str.2
	.asciz	"CT: received %*ph\n"

	.no_dead_strip	_ctb_read
.subsections_via_symbols
