	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function dvbsub_parse_clut_segment
_dvbsub_parse_clut_segment:             ## @dvbsub_parse_clut_segment
	.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
	movl	%edx, %ebx
	movq	%rsi, %r14
	movq	%rdi, %r12
	movq	8(%rdi), %rax
	movq	%rax, -56(%rbp)                 ## 8-byte Spill
	leaq	L_.str(%rip), %rsi
	xorl	%eax, %eax
	callq	_ff_dlog
	movl	%ebx, -48(%rbp)                 ## 4-byte Spill
	testl	%ebx, %ebx
	movq	%r12, -64(%rbp)                 ## 8-byte Spill
	jle	LBB0_7
## %bb.1:
	movl	-48(%rbp), %ebx                 ## 4-byte Reload
	leaq	L_.str.1(%rip), %r13
	leaq	L_.str.2(%rip), %r15
	xorl	%r12d, %r12d
	jmp	LBB0_2
	.p2align	4, 0x90
LBB0_4:                                 ##   in Loop: Header=BB0_2 Depth=1
	incq	%r12
	cmpq	%r12, %rbx
	je	LBB0_5
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	movl	(%r14,%r12,4), %edx
	movq	-64(%rbp), %rdi                 ## 8-byte Reload
	movq	%r13, %rsi
	xorl	%eax, %eax
	callq	_ff_dlog
	movl	%r12d, %eax
	notl	%eax
	testb	$15, %al
	jne	LBB0_4
## %bb.3:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	-64(%rbp), %rdi                 ## 8-byte Reload
	movq	%r15, %rsi
	xorl	%eax, %eax
	callq	_ff_dlog
	jmp	LBB0_4
LBB0_5:
	testb	$15, -48(%rbp)                  ## 1-byte Folded Reload
	movq	-64(%rbp), %r12                 ## 8-byte Reload
	je	LBB0_7
## %bb.6:
	leaq	L_.str.2(%rip), %rsi
	movq	%r12, %rdi
	xorl	%eax, %eax
	callq	_ff_dlog
LBB0_7:
	movl	(%r14), %r15d
	movl	4(%r14), %r13d
	shrl	$4, %r13d
	andl	$15, %r13d
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	movl	%r15d, %esi
	callq	_get_clut
	testq	%rax, %rax
	je	LBB0_8
## %bb.10:
	movq	%rax, %rbx
	xorl	%eax, %eax
	cmpl	%r13d, 4(%rbx)
	jne	LBB0_11
	jmp	LBB0_28
LBB0_8:
	movl	$40, %edi
	callq	_av_malloc
	testq	%rax, %rax
	je	LBB0_29
## %bb.9:
	movq	%rax, %rbx
	movq	_default_clut@GOTPCREL(%rip), %rsi
	movq	%rax, %rdi
	movl	$40, %edx
	callq	_memcpy
	movl	%r15d, (%rbx)
	movl	$-1, 4(%rbx)
	movq	-56(%rbp), %rcx                 ## 8-byte Reload
	movq	(%rcx), %rax
	movq	%rax, 32(%rbx)
	movq	%rbx, (%rcx)
LBB0_11:
	movl	%r13d, 4(%rbx)
	xorl	%eax, %eax
	cmpl	$7, -48(%rbp)                   ## 4-byte Folded Reload
	jl	LBB0_28
## %bb.12:
	movslq	-48(%rbp), %rax                 ## 4-byte Folded Reload
	leaq	(%r14,%rax,4), %rax
	movq	%rax, -104(%rbp)                ## 8-byte Spill
	leaq	8(%r14), %r15
	addq	$24, %r14
	leaq	8(%rbx), %rax
	movq	%rax, -88(%rbp)                 ## 8-byte Spill
	leaq	16(%rbx), %rax
	movq	%rax, -80(%rbp)                 ## 8-byte Spill
	addq	$24, %rbx
	movq	%rbx, -96(%rbp)                 ## 8-byte Spill
	jmp	LBB0_13
	.p2align	4, 0x90
LBB0_25:                                ##   in Loop: Header=BB0_13 Depth=1
	movl	$255, %ecx
	subl	-56(%rbp), %ecx                 ## 4-byte Folded Reload
	callq	_RGBA
	movq	(%rbx), %rcx
	movq	-48(%rbp), %rdx                 ## 8-byte Reload
	movq	%rax, (%rcx,%rdx,8)
LBB0_26:                                ##   in Loop: Header=BB0_13 Depth=1
	leaq	16(%r15), %r14
	cmpq	-104(%rbp), %r14                ## 8-byte Folded Reload
	jae	LBB0_27
LBB0_13:                                ## =>This Inner Loop Header: Depth=1
	movslq	(%r15), %rax
	movq	%rax, -48(%rbp)                 ## 8-byte Spill
	movl	4(%r15), %r13d
	movl	%r13d, %ecx
	movl	%r13d, %eax
	andl	$224, %ecx
	movl	%ecx, -68(%rbp)                 ## 4-byte Spill
	je	LBB0_14
## %bb.15:                              ##   in Loop: Header=BB0_13 Depth=1
	testb	$1, %al
	jne	LBB0_16
LBB0_17:                                ##   in Loop: Header=BB0_13 Depth=1
	movl	8(%r15), %eax
	movl	12(%r15), %ecx
	movl	%eax, %r12d
	andl	$252, %r12d
	andl	$3, %eax
	movl	%ecx, %edx
	shrl	$6, %edx
	andl	$3, %edx
	leal	(%rdx,%rax,4), %esi
	shll	$4, %esi
	movl	%ecx, %edi
	andl	$60, %edi
	shll	$2, %edi
	shll	$6, %ecx
	movzbl	%cl, %ebx
	movq	%r14, %r15
	jmp	LBB0_18
	.p2align	4, 0x90
LBB0_14:                                ##   in Loop: Header=BB0_13 Depth=1
	movq	_AV_LOG_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r12, %rdi
	leaq	L_.str.3(%rip), %rdx
	movl	%r13d, %ecx
	callq	_av_log
	movl	4(%r15), %eax
	testb	$1, %al
	je	LBB0_17
LBB0_16:                                ##   in Loop: Header=BB0_13 Depth=1
	movl	8(%r15), %r12d
	movl	12(%r15), %esi
	movl	(%r14), %edi
	movl	20(%r15), %ebx
	addq	$24, %r15
LBB0_18:                                ##   in Loop: Header=BB0_13 Depth=1
	testl	%r12d, %r12d
	movl	$255, %eax
	cmovel	%eax, %ebx
	callq	_YUV_TO_RGB1_CCIR
	movl	%r12d, %ecx
	callq	_YUV_TO_RGB2_CCIR
	movl	%ebx, -56(%rbp)                 ## 4-byte Spill
	movl	%ebx, (%rsp)
	movq	-64(%rbp), %r12                 ## 8-byte Reload
	movq	%r12, %rdi
	leaq	L_.str.4(%rip), %rsi
	movq	-48(%rbp), %rdx                 ## 8-byte Reload
                                        ## kill: def $edx killed $edx killed $rdx
	xorl	%eax, %eax
	callq	_ff_dlog
	movl	%r13d, %ebx
	andl	$128, %ebx
	movl	%ebx, %eax
	shrl	$7, %eax
	movl	%r13d, %r14d
	andl	$64, %r14d
	movl	%r14d, %ecx
	shrl	$6, %ecx
	addl	%eax, %ecx
	andl	$32, %r13d
	movl	%r13d, %eax
	shrl	$5, %eax
	addl	%ecx, %eax
	cmpl	$2, %eax
	jb	LBB0_21
## %bb.19:                              ##   in Loop: Header=BB0_13 Depth=1
	movq	%r12, %rdi
	leaq	L_.str.5(%rip), %rsi
	movl	-68(%rbp), %edx                 ## 4-byte Reload
	xorl	%eax, %eax
	callq	_ff_dlog
	movq	(%r12), %rax
	movq	_FF_COMPLIANCE_NORMAL@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jg	LBB0_20
LBB0_21:                                ##   in Loop: Header=BB0_13 Depth=1
	testl	%ebx, %ebx
	je	LBB0_23
## %bb.22:                              ##   in Loop: Header=BB0_13 Depth=1
	movq	-96(%rbp), %rbx                 ## 8-byte Reload
	cmpl	$4, -48(%rbp)                   ## 4-byte Folded Reload
	jl	LBB0_25
LBB0_23:                                ##   in Loop: Header=BB0_13 Depth=1
	testl	%r14d, %r14d
	setne	%al
	cmpl	$16, -48(%rbp)                  ## 4-byte Folded Reload
	setl	%cl
	movq	-88(%rbp), %rbx                 ## 8-byte Reload
	testb	%cl, %al
	cmovneq	-80(%rbp), %rbx                 ## 8-byte Folded Reload
	jne	LBB0_25
## %bb.24:                              ##   in Loop: Header=BB0_13 Depth=1
	testl	%r13d, %r13d
	je	LBB0_26
	jmp	LBB0_25
LBB0_27:
	xorl	%eax, %eax
	jmp	LBB0_28
LBB0_29:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	addq	$72, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_AVERROR                        ## TAILCALL
LBB0_20:
	movq	_AVERROR_INVALIDDATA@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
LBB0_28:
	addq	$72, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"DVB clut packet:\n"

L_.str.1:                               ## @.str.1
	.asciz	"%02x "

L_.str.2:                               ## @.str.2
	.asciz	"\n"

	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_default_clut,4,2               ## @default_clut
	.comm	_AV_LOG_ERROR,4,2               ## @AV_LOG_ERROR
L_.str.3:                               ## @.str.3
	.asciz	"Invalid clut depth 0x%x!\n"

L_.str.4:                               ## @.str.4
	.asciz	"clut %d := (%d,%d,%d,%d)\n"

L_.str.5:                               ## @.str.5
	.asciz	"More than one bit level marked: %x\n"

	.comm	_FF_COMPLIANCE_NORMAL,8,3       ## @FF_COMPLIANCE_NORMAL
	.comm	_AVERROR_INVALIDDATA,4,2        ## @AVERROR_INVALIDDATA
	.no_dead_strip	_dvbsub_parse_clut_segment
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function dvbsub_parse_clut_segment
_dvbsub_parse_clut_segment:             ; @dvbsub_parse_clut_segment
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #160
	.cfi_def_cfa_offset 160
	stp	x28, x27, [sp, #64]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #80]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #96]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #112]            ; 16-byte Folded Spill
	stp	x20, x19, [sp, #128]            ; 16-byte Folded Spill
	stp	x29, x30, [sp, #144]            ; 16-byte Folded Spill
	add	x29, sp, #144
	.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
	mov	x21, x2
	mov	x20, x1
	mov	x19, x0
	ldr	x22, [x0, #8]
Lloh0:
	adrp	x1, l_.str@PAGE
Lloh1:
	add	x1, x1, l_.str@PAGEOFF
	bl	_ff_dlog
	cmp	w21, #1
	b.lt	LBB0_7
; %bb.1:
	mov	x25, #0
	mov	w26, w21
Lloh2:
	adrp	x23, l_.str.1@PAGE
Lloh3:
	add	x23, x23, l_.str.1@PAGEOFF
Lloh4:
	adrp	x24, l_.str.2@PAGE
Lloh5:
	add	x24, x24, l_.str.2@PAGEOFF
	b	LBB0_3
LBB0_2:                                 ;   in Loop: Header=BB0_3 Depth=1
	add	x25, x25, #1
	cmp	x26, x25
	b.eq	LBB0_5
LBB0_3:                                 ; =>This Inner Loop Header: Depth=1
	mvn	w27, w25
	ldr	w8, [x20, x25, lsl #2]
	str	x8, [sp]
	mov	x0, x19
	mov	x1, x23
	bl	_ff_dlog
	tst	x27, #0xf
	b.ne	LBB0_2
; %bb.4:                                ;   in Loop: Header=BB0_3 Depth=1
	mov	x0, x19
	mov	x1, x24
	bl	_ff_dlog
	b	LBB0_2
LBB0_5:
	tst	w21, #0xf
	b.eq	LBB0_7
; %bb.6:
Lloh6:
	adrp	x1, l_.str.2@PAGE
Lloh7:
	add	x1, x1, l_.str.2@PAGEOFF
	mov	x0, x19
	bl	_ff_dlog
LBB0_7:
	ldp	w24, w8, [x20]
	ubfx	w25, w8, #4, #4
	mov	x0, x22
	mov	x1, x24
	bl	_get_clut
	cbz	x0, LBB0_9
; %bb.8:
	mov	x23, x0
	ldr	w8, [x0, #4]
	cmp	w8, w25
	b.ne	LBB0_11
	b	LBB0_26
LBB0_9:
	mov	w0, #40
	bl	_av_malloc
	cbz	x0, LBB0_28
; %bb.10:
	mov	x23, x0
Lloh8:
	adrp	x1, _default_clut@GOTPAGE
Lloh9:
	ldr	x1, [x1, _default_clut@GOTPAGEOFF]
	mov	w2, #40
	bl	_memcpy
	mov	w8, #-1
	stp	w24, w8, [x23]
	ldr	x8, [x22]
	str	x8, [x23, #32]
	str	x23, [x22]
LBB0_11:
	str	w25, [x23, #4]
	cmp	w21, #7
	b.lt	LBB0_26
; %bb.12:
	add	x25, x20, w21, sxtw #2
	add	x21, x20, #8
	add	x22, x20, #24
	add	x9, x23, #8
	add	x8, x23, #16
	stp	x8, x9, [sp, #40]               ; 16-byte Folded Spill
	add	x8, x23, #24
	str	x8, [sp, #56]                   ; 8-byte Folded Spill
	mov	w20, #255
	b	LBB0_15
LBB0_13:                                ;   in Loop: Header=BB0_15 Depth=1
	sub	w3, w20, w22
	bl	_RGBA
	ldr	x8, [x23]
	str	x0, [x8, x26, lsl #3]
LBB0_14:                                ;   in Loop: Header=BB0_15 Depth=1
	add	x22, x21, #16
	cmp	x22, x25
	b.hs	LBB0_26
LBB0_15:                                ; =>This Inner Loop Header: Depth=1
	ldp	w26, w23, [x21]
                                        ; kill: def $w26 killed $w26 def $x26
	sxtw	x26, w26
	ands	w27, w23, #0xe0
	b.eq	LBB0_18
; %bb.16:                               ;   in Loop: Header=BB0_15 Depth=1
	mov	x8, x23
	tbnz	w8, #0, LBB0_19
LBB0_17:                                ;   in Loop: Header=BB0_15 Depth=1
	ldp	w8, w9, [x21, #8]
	ubfiz	w10, w8, #2, #2
	and	w24, w8, #0xfc
	bfxil	w10, w9, #6, #2
	lsl	w1, w10, #4
	lsl	w8, w9, #2
	and	w0, w8, #0xf0
	ubfiz	w8, w9, #6, #2
	mov	x21, x22
	b	LBB0_20
LBB0_18:                                ;   in Loop: Header=BB0_15 Depth=1
Lloh10:
	adrp	x8, _AV_LOG_ERROR@GOTPAGE
Lloh11:
	ldr	x8, [x8, _AV_LOG_ERROR@GOTPAGEOFF]
Lloh12:
	ldr	w1, [x8]
	mov	x0, x19
Lloh13:
	adrp	x2, l_.str.3@PAGE
Lloh14:
	add	x2, x2, l_.str.3@PAGEOFF
	mov	x3, x23
	bl	_av_log
	ldr	w8, [x21, #4]
	tbz	w8, #0, LBB0_17
LBB0_19:                                ;   in Loop: Header=BB0_15 Depth=1
	ldp	w24, w1, [x21, #8]
	ldr	w0, [x22]
	ldr	w8, [x21, #20]
	add	x21, x21, #24
LBB0_20:                                ;   in Loop: Header=BB0_15 Depth=1
	cmp	w24, #0
	csel	w22, w20, w8, eq
	bl	_YUV_TO_RGB1_CCIR
	mov	x3, x24
	bl	_YUV_TO_RGB2_CCIR
	str	x22, [sp, #32]
	str	x26, [sp]
	mov	x0, x19
Lloh15:
	adrp	x1, l_.str.4@PAGE
Lloh16:
	add	x1, x1, l_.str.4@PAGEOFF
	bl	_ff_dlog
	ubfx	w8, w23, #7, #1
	and	w28, w23, #0x40
	add	w8, w8, w28, lsr #6
	and	w24, w23, #0x20
	add	w8, w8, w24, lsr #5
	cmp	w8, #2
	b.lo	LBB0_22
; %bb.21:                               ;   in Loop: Header=BB0_15 Depth=1
	str	x27, [sp]
	mov	x0, x19
Lloh17:
	adrp	x1, l_.str.5@PAGE
Lloh18:
	add	x1, x1, l_.str.5@PAGEOFF
	bl	_ff_dlog
	ldr	x8, [x19]
Lloh19:
	adrp	x9, _FF_COMPLIANCE_NORMAL@GOTPAGE
Lloh20:
	ldr	x9, [x9, _FF_COMPLIANCE_NORMAL@GOTPAGEOFF]
Lloh21:
	ldr	x9, [x9]
	cmp	x8, x9
	b.gt	LBB0_29
LBB0_22:                                ;   in Loop: Header=BB0_15 Depth=1
	tbz	w23, #7, LBB0_24
; %bb.23:                               ;   in Loop: Header=BB0_15 Depth=1
	ldr	x23, [sp, #56]                  ; 8-byte Folded Reload
	cmp	w26, #4
	b.lt	LBB0_13
LBB0_24:                                ;   in Loop: Header=BB0_15 Depth=1
	cmp	w28, #0
	cset	w8, ne
	cmp	w26, #16
	cset	w9, lt
	ands	w8, w8, w9
	ldp	x10, x9, [sp, #40]              ; 16-byte Folded Reload
	csel	x23, x10, x9, ne
	tbnz	w8, #0, LBB0_13
; %bb.25:                               ;   in Loop: Header=BB0_15 Depth=1
	cbz	w24, LBB0_14
	b	LBB0_13
LBB0_26:
	mov	w0, #0
LBB0_27:
	ldp	x29, x30, [sp, #144]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #128]            ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #112]            ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #96]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #80]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #64]             ; 16-byte Folded Reload
	add	sp, sp, #160
	ret
LBB0_28:
Lloh22:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh23:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh24:
	ldr	w0, [x8]
	ldp	x29, x30, [sp, #144]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #128]            ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #112]            ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #96]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #80]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #64]             ; 16-byte Folded Reload
	add	sp, sp, #160
	b	_AVERROR
LBB0_29:
Lloh25:
	adrp	x8, _AVERROR_INVALIDDATA@GOTPAGE
Lloh26:
	ldr	x8, [x8, _AVERROR_INVALIDDATA@GOTPAGEOFF]
Lloh27:
	ldr	w0, [x8]
	b	LBB0_27
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpAdd	Lloh4, Lloh5
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpAdd	Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpAdd	Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpAdd	Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh24
	.loh AdrpLdrGotLdr	Lloh25, Lloh26, Lloh27
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"DVB clut packet:\n"

l_.str.1:                               ; @.str.1
	.asciz	"%02x "

l_.str.2:                               ; @.str.2
	.asciz	"\n"

	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_default_clut,4,2               ; @default_clut
	.comm	_AV_LOG_ERROR,4,2               ; @AV_LOG_ERROR
l_.str.3:                               ; @.str.3
	.asciz	"Invalid clut depth 0x%x!\n"

l_.str.4:                               ; @.str.4
	.asciz	"clut %d := (%d,%d,%d,%d)\n"

l_.str.5:                               ; @.str.5
	.asciz	"More than one bit level marked: %x\n"

	.comm	_FF_COMPLIANCE_NORMAL,8,3       ; @FF_COMPLIANCE_NORMAL
	.comm	_AVERROR_INVALIDDATA,4,2        ; @AVERROR_INVALIDDATA
	.no_dead_strip	_dvbsub_parse_clut_segment
.subsections_via_symbols
