	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function gen_sub_bitmap
_gen_sub_bitmap:                        ## @gen_sub_bitmap
	.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	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%ecx, %r15d
	movq	%rdx, %r13
	movq	%rsi, %r14
	movl	(%rdx), %r12d
	movl	4(%rdx), %ebx
	movl	%r12d, %eax
	imull	%ecx, %eax
	movl	%ebx, %ecx
	imull	%r12d, %ecx
	cmpl	%ecx, %eax
	jge	LBB0_11
## %bb.1:
	movq	_BITMAP_CHAR_WIDTH@GOTPCREL(%rip), %rdx
	imull	(%rdx), %r12d
	subl	%r15d, %ebx
	movq	_BITMAP_CHAR_HEIGHT@GOTPCREL(%rip), %rdx
	imull	(%rdx), %ebx
	movq	24(%r13), %rdx
	movslq	%ecx, %rcx
	leaq	(%rdx,%rcx,8), %rcx
	cltq
	leaq	(%rdx,%rax,8), %rax
	movq	_VBI_TRANSPARENT_SPACE@GOTPCREL(%rip), %rdx
	movq	(%rdx), %rdx
	.p2align	4, 0x90
LBB0_3:                                 ## =>This Inner Loop Header: Depth=1
	cmpq	%rdx, (%rax)
	jne	LBB0_4
## %bb.2:                               ##   in Loop: Header=BB0_3 Depth=1
	addq	$8, %rax
	cmpq	%rcx, %rax
	jb	LBB0_3
LBB0_11:
	movq	_AV_LOG_DEBUG@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	16(%r13), %ecx
	leaq	L_.str(%rip), %rdx
	callq	_av_log
	movq	_SUBTITLE_NONE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 20(%r14)
LBB0_10:
	xorl	%eax, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_4:
	movq	%rdi, -56(%rbp)                 ## 8-byte Spill
	movl	%ebx, %edi
	imull	%r12d, %edi
	callq	_av_mallocz
	movq	24(%r14), %rcx
	movq	%rax, (%rcx)
	movq	(%r14), %rax
	movl	%r12d, (%rax)
	movq	24(%r14), %rax
	movq	(%rax), %rdx
	testq	%rdx, %rdx
	je	LBB0_13
## %bb.5:
	movq	_VBI_PIXFMT_PAL8@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	(%r13), %r10d
	movq	%r14, -48(%rbp)                 ## 8-byte Spill
	movl	4(%r13), %eax
	subl	%r15d, %eax
	movq	%r13, %rdi
	movl	%r12d, %ecx
	xorl	%r8d, %r8d
	movl	%r15d, %r9d
	pushq	$1
	pushq	$1
	pushq	%rax
	movq	-48(%rbp), %r14                 ## 8-byte Reload
	pushq	%r10
	callq	_vbi_draw_vt_page_region
	addq	$32, %rsp
	movq	%r13, %rdx
	movl	%r15d, %r13d
	movq	-56(%rbp), %r15                 ## 8-byte Reload
	movq	%r15, %rdi
	movq	%r14, %rsi
	movq	%rdx, -64(%rbp)                 ## 8-byte Spill
	movl	%r13d, %ecx
	movl	%r12d, %r8d
	movl	%ebx, %r9d
	callq	_fix_transparency
	movl	16(%r15), %eax
	movl	%eax, 40(%r14)
	movq	_BITMAP_CHAR_HEIGHT@GOTPCREL(%rip), %rax
	movslq	(%rax), %rax
	movslq	%r13d, %rcx
	imulq	%rax, %rcx
	addq	8(%r15), %rcx
	movq	%rcx, 32(%r14)
	movl	%r12d, 8(%r14)
	movl	%ebx, 12(%r14)
	movl	(%r15), %eax
	decl	%eax
	cmpl	$254, %eax
	setb	%cl
	movq	_VBI_NB_COLORS@GOTPCREL(%rip), %r12
	movl	(%r12), %eax
	shll	%cl, %eax
	movl	%eax, 16(%r14)
	movq	_AVPALETTE_SIZE@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_av_mallocz
	movq	24(%r14), %rcx
	movq	%rax, 8(%rcx)
	movq	24(%r14), %rdi
	cmpq	$0, 8(%rdi)
	je	LBB0_12
## %bb.6:
	cmpl	$0, (%r12)
	movq	-64(%rbp), %r13                 ## 8-byte Reload
	jle	LBB0_9
## %bb.7:
	xorl	%r15d, %r15d
	.p2align	4, 0x90
LBB0_8:                                 ## =>This Inner Loop Header: Depth=1
	movq	8(%r13), %rax
	movl	(%rax,%r15,4), %edi
	callq	_VBI_R
	movl	%eax, %r14d
	movq	8(%r13), %rax
	movl	(%rax,%r15,4), %edi
	callq	_VBI_G
	movl	%eax, %r12d
	movq	8(%r13), %rax
	movl	(%rax,%r15,4), %edi
	callq	_VBI_B
	movl	%eax, %ebx
	movq	8(%r13), %rax
	movl	(%rax,%r15,4), %edi
	callq	_VBI_A
	movl	%r14d, %edi
	movl	%r12d, %esi
	movl	%ebx, %edx
	movl	%eax, %ecx
	callq	_RGBA
	movq	-48(%rbp), %rcx                 ## 8-byte Reload
	movq	24(%rcx), %rcx
	movq	8(%rcx), %rcx
	movl	%eax, (%rcx,%r15,4)
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	movl	(%rax), %ecx
	movl	%r14d, %edi
	movl	%r12d, %esi
	movq	-48(%rbp), %r14                 ## 8-byte Reload
	movl	%ebx, %edx
	movq	_VBI_NB_COLORS@GOTPCREL(%rip), %r12
	movq	-56(%rbp), %rbx                 ## 8-byte Reload
	callq	_RGBA
	movq	24(%r14), %rcx
	movq	8(%rcx), %rcx
	movslq	(%r12), %rdx
	addq	%r15, %rdx
	movl	%eax, (%rcx,%rdx,4)
	movl	(%rcx,%r15,4), %edx
	movq	%rbx, %rdi
	leaq	L_.str.1(%rip), %rsi
	callq	_ff_dlog
	incq	%r15
	movslq	(%r12), %rax
	cmpq	%rax, %r15
	jl	LBB0_8
LBB0_9:
	xorl	%edi, %edi
	xorl	%esi, %esi
	xorl	%edx, %edx
	xorl	%ecx, %ecx
	callq	_RGBA
	movq	24(%r14), %rcx
	movq	8(%rcx), %rcx
	movq	%r14, %rbx
	movq	_VBI_TRANSPARENT_BLACK@GOTPCREL(%rip), %r14
	movq	(%r14), %rdx
	movl	%eax, (%rcx,%rdx,4)
	xorl	%edi, %edi
	xorl	%esi, %esi
	xorl	%edx, %edx
	xorl	%ecx, %ecx
	callq	_RGBA
	movq	24(%rbx), %rcx
	movq	8(%rcx), %rcx
	movslq	(%r12), %rdx
	addq	(%r14), %rdx
	movl	%eax, (%rcx,%rdx,4)
	movq	_SUBTITLE_BITMAP@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 20(%rbx)
	jmp	LBB0_10
LBB0_12:
	callq	_av_freep
LBB0_13:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_AVERROR                        ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_BITMAP_CHAR_WIDTH,4,2          ## @BITMAP_CHAR_WIDTH
	.comm	_BITMAP_CHAR_HEIGHT,4,2         ## @BITMAP_CHAR_HEIGHT
	.comm	_VBI_TRANSPARENT_SPACE,8,3      ## @VBI_TRANSPARENT_SPACE
	.comm	_AV_LOG_DEBUG,4,2               ## @AV_LOG_DEBUG
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"dropping empty page %3x\n"

	.comm	_SUBTITLE_NONE,4,2              ## @SUBTITLE_NONE
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_VBI_PIXFMT_PAL8,4,2            ## @VBI_PIXFMT_PAL8
	.comm	_VBI_NB_COLORS,4,2              ## @VBI_NB_COLORS
	.comm	_AVPALETTE_SIZE,4,2             ## @AVPALETTE_SIZE
L_.str.1:                               ## @.str.1
	.asciz	"palette %0x\n"

	.comm	_VBI_TRANSPARENT_BLACK,8,3      ## @VBI_TRANSPARENT_BLACK
	.comm	_SUBTITLE_BITMAP,4,2            ## @SUBTITLE_BITMAP
	.no_dead_strip	_gen_sub_bitmap
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function gen_sub_bitmap
_gen_sub_bitmap:                        ; @gen_sub_bitmap
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	stp	x28, x27, [sp, #16]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #32]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #48]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #64]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #80]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #96]             ; 16-byte Folded Spill
	add	x29, sp, #96
	.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	x19, x1
	mov	x20, x0
	ldp	w11, w10, [x2]
	mul	w9, w11, w3
	mul	w8, w10, w11
	cmp	w9, w8
	b.ge	LBB0_4
; %bb.1:
	mov	x22, x3
Lloh0:
	adrp	x12, _BITMAP_CHAR_WIDTH@GOTPAGE
Lloh1:
	ldr	x12, [x12, _BITMAP_CHAR_WIDTH@GOTPAGEOFF]
Lloh2:
	ldr	w12, [x12]
	mul	w23, w12, w11
	sub	w10, w10, w3
Lloh3:
	adrp	x25, _BITMAP_CHAR_HEIGHT@GOTPAGE
Lloh4:
	ldr	x25, [x25, _BITMAP_CHAR_HEIGHT@GOTPAGEOFF]
	ldr	w11, [x25]
	mul	w24, w10, w11
	ldr	x10, [x21, #24]
	add	x8, x10, w8, sxtw #3
	add	x9, x10, w9, sxtw #3
Lloh5:
	adrp	x10, _VBI_TRANSPARENT_SPACE@GOTPAGE
Lloh6:
	ldr	x10, [x10, _VBI_TRANSPARENT_SPACE@GOTPAGEOFF]
Lloh7:
	ldr	x10, [x10]
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x11, [x9]
	cmp	x11, x10
	b.ne	LBB0_6
; %bb.3:                                ;   in Loop: Header=BB0_2 Depth=1
	add	x9, x9, #8
	cmp	x9, x8
	b.lo	LBB0_2
LBB0_4:
Lloh8:
	adrp	x8, _AV_LOG_DEBUG@GOTPAGE
Lloh9:
	ldr	x8, [x8, _AV_LOG_DEBUG@GOTPAGEOFF]
Lloh10:
	ldr	w1, [x8]
	ldr	w3, [x21, #16]
Lloh11:
	adrp	x2, l_.str@PAGE
Lloh12:
	add	x2, x2, l_.str@PAGEOFF
	mov	x0, x20
	bl	_av_log
Lloh13:
	adrp	x8, _SUBTITLE_NONE@GOTPAGE
Lloh14:
	ldr	x8, [x8, _SUBTITLE_NONE@GOTPAGEOFF]
LBB0_5:
	ldr	w8, [x8]
	str	w8, [x19, #20]
	mov	w0, #0
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #64]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #48]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #32]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #112
	ret
LBB0_6:
	mul	w0, w24, w23
	bl	_av_mallocz
	ldr	x8, [x19, #24]
	str	x0, [x8]
	ldr	x8, [x19]
	str	w23, [x8]
	ldr	x8, [x19, #24]
	ldr	x2, [x8]
	cbz	x2, LBB0_13
; %bb.7:
Lloh15:
	adrp	x8, _VBI_PIXFMT_PAL8@GOTPAGE
Lloh16:
	ldr	x8, [x8, _VBI_PIXFMT_PAL8@GOTPAGEOFF]
Lloh17:
	ldr	w1, [x8]
	ldp	w6, w8, [x21]
	sub	w7, w8, w22
	mov	x8, #4294967297
	str	x8, [sp]
	mov	x0, x21
	mov	x3, x23
	mov	w4, #0
	mov	x5, x22
	bl	_vbi_draw_vt_page_region
	mov	x0, x20
	mov	x1, x19
	mov	x2, x21
	mov	x3, x22
	mov	x4, x23
	mov	x5, x24
	bl	_fix_transparency
	ldr	w8, [x20, #16]
	str	w8, [x19, #40]
	ldr	x8, [x20, #8]
	ldrsw	x9, [x25]
	sxtw	x10, w22
	madd	x8, x9, x10, x8
	str	x8, [x19, #32]
	stp	w23, w24, [x19, #8]
	ldr	w8, [x20]
	sub	w8, w8, #1
	cmp	w8, #254
	cset	w8, lo
Lloh18:
	adrp	x26, _VBI_NB_COLORS@GOTPAGE
Lloh19:
	ldr	x26, [x26, _VBI_NB_COLORS@GOTPAGEOFF]
	ldr	w9, [x26]
	lsl	w8, w9, w8
	str	w8, [x19, #16]
Lloh20:
	adrp	x8, _AVPALETTE_SIZE@GOTPAGE
Lloh21:
	ldr	x8, [x8, _AVPALETTE_SIZE@GOTPAGEOFF]
Lloh22:
	ldr	w0, [x8]
	bl	_av_mallocz
	ldr	x8, [x19, #24]
	str	x0, [x8, #8]
	ldr	x0, [x19, #24]
	ldr	x8, [x0, #8]
	cbz	x8, LBB0_12
; %bb.8:
	ldr	w8, [x26]
	cmp	w8, #1
	b.lt	LBB0_11
; %bb.9:
	mov	x27, #0
Lloh23:
	adrp	x22, l_.str.1@PAGE
Lloh24:
	add	x22, x22, l_.str.1@PAGEOFF
LBB0_10:                                ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x21, #8]
	lsl	x28, x27, #2
	ldr	w0, [x8, x28]
	bl	_VBI_R
	mov	x23, x0
	ldr	x8, [x21, #8]
	ldr	w0, [x8, x28]
	bl	_VBI_G
	mov	x24, x0
	ldr	x8, [x21, #8]
	ldr	w0, [x8, x28]
	bl	_VBI_B
	mov	x25, x0
	ldr	x8, [x21, #8]
	ldr	w0, [x8, x28]
	bl	_VBI_A
	mov	x3, x0
	mov	x0, x23
	mov	x1, x24
	mov	x2, x25
	bl	_RGBA
	ldr	x8, [x19, #24]
	ldr	x8, [x8, #8]
	str	w0, [x8, x28]
	ldr	w3, [x20]
	mov	x0, x23
	mov	x1, x24
	mov	x2, x25
	bl	_RGBA
	ldr	x8, [x19, #24]
	ldr	x8, [x8, #8]
	ldrsw	x9, [x26]
	add	x9, x27, x9
	str	w0, [x8, x9, lsl #2]
	ldr	w2, [x8, x28]
	mov	x0, x20
	mov	x1, x22
	bl	_ff_dlog
	add	x27, x27, #1
	ldrsw	x8, [x26]
	cmp	x27, x8
	b.lt	LBB0_10
LBB0_11:
	mov	w0, #0
	mov	w1, #0
	mov	w2, #0
	mov	w3, #0
	bl	_RGBA
	ldr	x8, [x19, #24]
	ldr	x8, [x8, #8]
Lloh25:
	adrp	x20, _VBI_TRANSPARENT_BLACK@GOTPAGE
Lloh26:
	ldr	x20, [x20, _VBI_TRANSPARENT_BLACK@GOTPAGEOFF]
	ldr	x9, [x20]
	str	w0, [x8, x9, lsl #2]
	mov	w0, #0
	mov	w1, #0
	mov	w2, #0
	mov	w3, #0
	bl	_RGBA
	ldr	x8, [x19, #24]
	ldr	x8, [x8, #8]
	ldr	x9, [x20]
	ldrsw	x10, [x26]
	add	x9, x9, x10
	str	w0, [x8, x9, lsl #2]
Lloh27:
	adrp	x8, _SUBTITLE_BITMAP@GOTPAGE
Lloh28:
	ldr	x8, [x8, _SUBTITLE_BITMAP@GOTPAGEOFF]
	b	LBB0_5
LBB0_12:
	bl	_av_freep
LBB0_13:
Lloh29:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh30:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh31:
	ldr	w0, [x8]
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #64]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #48]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #32]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #112
	b	_AVERROR
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh13, Lloh14
	.loh AdrpAdd	Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpLdrGot	Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpAdd	Lloh23, Lloh24
	.loh AdrpLdrGot	Lloh27, Lloh28
	.loh AdrpLdrGot	Lloh25, Lloh26
	.loh AdrpLdrGotLdr	Lloh29, Lloh30, Lloh31
	.cfi_endproc
                                        ; -- End function
	.comm	_BITMAP_CHAR_WIDTH,4,2          ; @BITMAP_CHAR_WIDTH
	.comm	_BITMAP_CHAR_HEIGHT,4,2         ; @BITMAP_CHAR_HEIGHT
	.comm	_VBI_TRANSPARENT_SPACE,8,3      ; @VBI_TRANSPARENT_SPACE
	.comm	_AV_LOG_DEBUG,4,2               ; @AV_LOG_DEBUG
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"dropping empty page %3x\n"

	.comm	_SUBTITLE_NONE,4,2              ; @SUBTITLE_NONE
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_VBI_PIXFMT_PAL8,4,2            ; @VBI_PIXFMT_PAL8
	.comm	_VBI_NB_COLORS,4,2              ; @VBI_NB_COLORS
	.comm	_AVPALETTE_SIZE,4,2             ; @AVPALETTE_SIZE
l_.str.1:                               ; @.str.1
	.asciz	"palette %0x\n"

	.comm	_VBI_TRANSPARENT_BLACK,8,3      ; @VBI_TRANSPARENT_BLACK
	.comm	_SUBTITLE_BITMAP,4,2            ; @SUBTITLE_BITMAP
	.no_dead_strip	_gen_sub_bitmap
.subsections_via_symbols
