	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.section	__TEXT,__literal16,16byte_literals
	.p2align	4                               ## -- Begin function xv_write_header
LCPI0_0:
	.space	16
	.section	__TEXT,__text,regular,pure_instructions
	.p2align	4, 0x90
_xv_write_header:                       ## @xv_write_header
	.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	%rdi, %r14
	movq	16(%rdi), %r13
	movl	$0, -44(%rbp)
	cmpl	$1, (%rdi)
	jg	LBB0_3
## %bb.1:
	movq	8(%r14), %rax
	movq	(%rax), %rax
	movq	(%rax), %r12
	movq	(%r12), %rax
	movq	_AVMEDIA_TYPE_VIDEO@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_3
## %bb.2:
	movq	8(%r12), %rax
	movq	_AV_CODEC_ID_RAWVIDEO@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_3
## %bb.5:
	movl	32(%r12), %edi
	callq	_xv_get_tag_from_format
	testl	%eax, %eax
	je	LBB0_6
## %bb.7:
	movl	%eax, %ebx
	movl	32(%r12), %eax
	movl	%eax, 116(%r13)
	movl	112(%r13), %edi
	callq	_XOpenDisplay
	movl	%eax, 20(%r13)
	testl	%eax, %eax
	je	LBB0_8
## %bb.9:
	movl	%ebx, -48(%rbp)                 ## 4-byte Spill
	movq	24(%r12), %rdi
	movq	%rdi, 64(%r13)
	movq	16(%r12), %rax
	movq	%rax, 56(%r13)
	cmpq	$0, 8(%r13)
	jne	LBB0_16
## %bb.10:
	cmpq	$0, (%r13)
	je	LBB0_11
LBB0_16:
	movq	80(%r13), %rax
	testq	%rax, %rax
	je	LBB0_17
## %bb.23:
	movq	%rax, 24(%r13)
	jmp	LBB0_24
LBB0_3:
	movq	_AV_LOG_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str(%rip), %rdx
	movq	%r14, %rdi
	xorl	%eax, %eax
	callq	_av_log
LBB0_4:
	movq	_EINVAL@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_6:
	movq	_AV_LOG_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	movl	32(%r12), %edi
	callq	_av_get_pix_fmt_name
	leaq	L_.str.1(%rip), %rdx
	movq	%r14, %rdi
	movl	%ebx, %esi
	movl	%eax, %ecx
	xorl	%eax, %eax
	callq	_av_log
	movq	_AVERROR_PATCHWELCOME@GOTPCREL(%rip), %rax
	movl	(%rax), %r15d
	jmp	LBB0_39
LBB0_8:
	movq	_AV_LOG_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	112(%r13), %ecx
	leaq	L_.str.2(%rip), %rdx
	movq	%r14, %rdi
	xorl	%eax, %eax
	callq	_av_log
	jmp	LBB0_4
LBB0_17:
	movl	20(%r13), %r15d
	movl	%r15d, %edi
	callq	_DefaultRootWindow
	movl	108(%r13), %edx
	movl	104(%r13), %ecx
	movq	(%r13), %r9
	movq	8(%r13), %r8
	subq	$8, %rsp
	movl	%r15d, %edi
	movl	%eax, %esi
	pushq	$0
	pushq	$0
	pushq	$0
	callq	_XCreateSimpleWindow
	addq	$32, %rsp
	movq	%rax, 24(%r13)
	movq	96(%r13), %rdx
	testq	%rdx, %rdx
	jne	LBB0_20
## %bb.18:
	movl	4(%r14), %edi
	callq	_av_strdup
	movq	%rax, 96(%r13)
	testq	%rax, %rax
	je	LBB0_21
## %bb.19:
	movq	%rax, %rdx
	movq	24(%r13), %rax
LBB0_20:
	movl	20(%r13), %edi
	movq	%rax, %rsi
	callq	_XStoreName
	movl	20(%r13), %edi
	movq	_False@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	leaq	L_.str.3(%rip), %rsi
	callq	_XInternAtom
	leaq	88(%r13), %rdx
	movl	%eax, 88(%r13)
	movl	20(%r13), %edi
	movq	24(%r13), %rsi
	movl	$1, %ecx
	callq	_XSetWMProtocols
	movl	20(%r13), %edi
	movq	24(%r13), %rsi
	callq	_XMapWindow
LBB0_24:
	movl	20(%r13), %r15d
	movl	%r15d, %edi
	callq	_DefaultRootWindow
	leaq	-60(%rbp), %rdx
	leaq	-72(%rbp), %rcx
	movl	%r15d, %edi
	movl	%eax, %esi
	callq	_XvQueryAdaptors
	movq	_Success@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_25
## %bb.27:
	cmpl	$0, -60(%rbp)
	je	LBB0_28
## %bb.29:
	movq	-72(%rbp), %rdi
	movl	(%rdi), %eax
	movl	%eax, 72(%r13)
	callq	_XvFreeAdaptorInfo
	movl	20(%r13), %edi
	movl	72(%r13), %esi
	leaq	-44(%rbp), %rdx
	callq	_XvListImageFormats
	testq	%rax, %rax
	je	LBB0_25
## %bb.30:
	movl	-44(%rbp), %ecx
	xorl	%ebx, %ebx
	testl	%ecx, %ecx
	jle	LBB0_31
## %bb.32:
	movl	-48(%rbp), %r15d                ## 4-byte Reload
LBB0_33:                                ## =>This Inner Loop Header: Depth=1
	cmpl	%r15d, (%rax,%rbx,4)
	je	LBB0_36
## %bb.34:                              ##   in Loop: Header=BB0_33 Depth=1
	incq	%rbx
	cmpq	%rbx, %rcx
	jne	LBB0_33
## %bb.35:
	movl	%ecx, %ebx
	jmp	LBB0_36
LBB0_25:
	movq	_AVERROR_EXTERNAL@GOTPCREL(%rip), %rax
	movl	(%rax), %r15d
LBB0_26:
	movq	%r14, %rdi
	callq	_xv_write_trailer
LBB0_39:
	movl	%r15d, %eax
	addq	$72, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_28:
	movq	_AV_LOG_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str.4(%rip), %rdx
	movq	%r14, %rdi
	xorl	%eax, %eax
	callq	_av_log
	movq	_ENODEV@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_AVERROR
	movl	%eax, %r15d
	jmp	LBB0_39
LBB0_11:
	movq	40(%r12), %r15
	movq	48(%r12), %rbx
	movq	%rdi, 8(%r13)
	movq	%rax, (%r13)
	testq	%r15, %r15
	je	LBB0_16
## %bb.12:
	cmpq	%rbx, %r15
	jle	LBB0_14
## %bb.13:
	movq	%r15, %rsi
	movq	%rbx, %rdx
	callq	_av_rescale
	movq	%rax, 8(%r13)
LBB0_14:
	cmpq	%rbx, %r15
	jge	LBB0_16
## %bb.15:
	movq	(%r13), %rdi
	movq	%rbx, %rsi
	movq	%r15, %rdx
	callq	_av_rescale
	movq	%rax, (%r13)
	jmp	LBB0_16
LBB0_31:
	movl	-48(%rbp), %r15d                ## 4-byte Reload
LBB0_36:
	movq	%rax, %rdi
	callq	_XFree
	cmpl	-44(%rbp), %ebx
	jge	LBB0_37
## %bb.38:
	movl	20(%r13), %edi
	movq	24(%r13), %rsi
	movl	%r15d, %ebx
	xorl	%r15d, %r15d
	xorl	%edx, %edx
	xorl	%ecx, %ecx
	callq	_XCreateGC
	movl	%eax, 16(%r13)
	movq	24(%r12), %r8
	movq	%r8, 64(%r13)
	movq	16(%r12), %r9
	movq	%r9, 56(%r13)
	movl	20(%r13), %edi
	movl	72(%r13), %esi
	leaq	32(%r13), %r12
	subq	$8, %rsp
	movl	%ebx, %edx
	xorl	%ecx, %ecx
	pushq	%r12
	callq	_XvShmCreateImage
	addq	$16, %rsp
	movq	%rax, 48(%r13)
	movq	_IPC_PRIVATE@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edi
	movl	8(%rax), %esi
	movq	_IPC_CREAT@GOTPCREL(%rip), %rax
	movl	$511, %edx                      ## imm = 0x1FF
	orl	(%rax), %edx
	callq	_shmget
	movl	%eax, 40(%r13)
	movl	%eax, %edi
	xorl	%esi, %esi
	xorl	%edx, %edx
	callq	_shmat
	movq	%rax, 32(%r13)
	movq	48(%r13), %rcx
	movq	%rax, (%rcx)
	movq	_False@GOTPCREL(%rip), %r14
	movl	(%r14), %eax
	movl	%eax, 44(%r13)
	movl	20(%r13), %edi
	movq	%r12, %rsi
	callq	_XShmAttach
	movl	20(%r13), %edi
	movl	(%r14), %esi
	callq	_XSync
	movl	40(%r13), %edi
	movq	_IPC_RMID@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	xorl	%edx, %edx
	callq	_shmctl
	movl	20(%r13), %edi
	movq	24(%r13), %rsi
	leaq	-56(%rbp), %rdx
	callq	_XGetWindowAttributes
	xorps	%xmm0, %xmm0
	movq	_DoRed@GOTPCREL(%rip), %rax
	movq	_DoGreen@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	orl	(%rax), %ecx
	movups	%xmm0, -96(%rbp)
	movq	_DoBlue@GOTPCREL(%rip), %rax
	orl	(%rax), %ecx
	movq	$0, -80(%rbp)
	movl	%ecx, -104(%rbp)
	movl	20(%r13), %edi
	movl	-56(%rbp), %esi
	leaq	-104(%rbp), %rdx
	callq	_XAllocColor
	movl	16(%r13), %esi
	movl	20(%r13), %edi
	movl	-100(%rbp), %edx
	callq	_XSetForeground
	xorps	%xmm0, %xmm0
	movups	%xmm0, (%r13)
	jmp	LBB0_39
LBB0_37:
	movq	_AV_LOG_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	movl	32(%r12), %edi
	callq	_av_get_pix_fmt_name
	leaq	L_.str.5(%rip), %rdx
	movq	%r14, %rdi
	movl	%ebx, %esi
	movl	%eax, %ecx
	xorl	%eax, %eax
	callq	_av_log
	movq	_EINVAL@GOTPCREL(%rip), %rax
	jmp	LBB0_22
LBB0_21:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
LBB0_22:
	movl	(%rax), %edi
	callq	_AVERROR
	movl	%eax, %r15d
	jmp	LBB0_26
	.cfi_endproc
                                        ## -- End function
	.comm	_AVMEDIA_TYPE_VIDEO,8,3         ## @AVMEDIA_TYPE_VIDEO
	.comm	_AV_CODEC_ID_RAWVIDEO,8,3       ## @AV_CODEC_ID_RAWVIDEO
	.comm	_AV_LOG_ERROR,4,2               ## @AV_LOG_ERROR
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Only supports one rawvideo stream\n"

	.comm	_EINVAL,4,2                     ## @EINVAL
L_.str.1:                               ## @.str.1
	.asciz	"Unsupported pixel format '%s', only yuv420p, uyvy422, yuyv422 are currently supported\n"

	.comm	_AVERROR_PATCHWELCOME,4,2       ## @AVERROR_PATCHWELCOME
L_.str.2:                               ## @.str.2
	.asciz	"Could not open the X11 display '%s'\n"

	.comm	_ENOMEM,4,2                     ## @ENOMEM
L_.str.3:                               ## @.str.3
	.asciz	"WM_DELETE_WINDOW"

	.comm	_False,4,2                      ## @False
	.comm	_Success,8,3                    ## @Success
	.comm	_AVERROR_EXTERNAL,4,2           ## @AVERROR_EXTERNAL
L_.str.4:                               ## @.str.4
	.asciz	"No X-Video adaptors present\n"

	.comm	_ENODEV,4,2                     ## @ENODEV
L_.str.5:                               ## @.str.5
	.asciz	"Device does not support pixel format %s, aborting\n"

	.comm	_IPC_PRIVATE,4,2                ## @IPC_PRIVATE
	.comm	_IPC_CREAT,4,2                  ## @IPC_CREAT
	.comm	_IPC_RMID,4,2                   ## @IPC_RMID
	.comm	_DoRed,4,2                      ## @DoRed
	.comm	_DoGreen,4,2                    ## @DoGreen
	.comm	_DoBlue,4,2                     ## @DoBlue
	.no_dead_strip	_xv_write_header
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function xv_write_header
_xv_write_header:                       ; @xv_write_header
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #144
	.cfi_def_cfa_offset 144
	stp	x24, x23, [sp, #80]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #96]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #112]            ; 16-byte Folded Spill
	stp	x29, x30, [sp, #128]            ; 16-byte Folded Spill
	add	x29, sp, #128
	.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
	mov	x19, x0
	ldr	x23, [x0, #16]
	str	wzr, [sp, #20]
	ldr	w8, [x0]
	cmp	w8, #1
	b.gt	LBB0_9
; %bb.1:
	ldr	x8, [x19, #8]
	ldr	x8, [x8]
	ldr	x24, [x8]
	ldr	x8, [x24]
Lloh0:
	adrp	x9, _AVMEDIA_TYPE_VIDEO@GOTPAGE
Lloh1:
	ldr	x9, [x9, _AVMEDIA_TYPE_VIDEO@GOTPAGEOFF]
Lloh2:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_9
; %bb.2:
	ldr	x8, [x24, #8]
Lloh3:
	adrp	x9, _AV_CODEC_ID_RAWVIDEO@GOTPAGE
Lloh4:
	ldr	x9, [x9, _AV_CODEC_ID_RAWVIDEO@GOTPAGEOFF]
Lloh5:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_9
; %bb.3:
	ldr	w0, [x24, #32]
	bl	_xv_get_tag_from_format
	cbz	w0, LBB0_11
; %bb.4:
	mov	x20, x0
	ldr	w8, [x24, #32]
	str	w8, [x23, #116]
	ldr	w0, [x23, #112]
	bl	_XOpenDisplay
	str	w0, [x23, #20]
	cbz	w0, LBB0_12
; %bb.5:
	ldr	x0, [x24, #24]
	str	x0, [x23, #64]
	ldr	x8, [x24, #16]
	str	x8, [x23, #56]
	ldr	x9, [x23, #8]
	cbnz	x9, LBB0_7
; %bb.6:
	ldr	x9, [x23]
	cbz	x9, LBB0_15
LBB0_7:
	ldr	x8, [x23, #80]
	cbz	x8, LBB0_13
; %bb.8:
	str	x8, [x23, #24]
	b	LBB0_23
LBB0_9:
Lloh6:
	adrp	x8, _AV_LOG_ERROR@GOTPAGE
Lloh7:
	ldr	x8, [x8, _AV_LOG_ERROR@GOTPAGEOFF]
Lloh8:
	ldr	w1, [x8]
Lloh9:
	adrp	x2, l_.str@PAGE
Lloh10:
	add	x2, x2, l_.str@PAGEOFF
LBB0_10:
	mov	x0, x19
	bl	_av_log
Lloh11:
	adrp	x8, _EINVAL@GOTPAGE
Lloh12:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh13:
	ldr	w0, [x8]
	ldp	x29, x30, [sp, #128]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #112]            ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #96]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #80]             ; 16-byte Folded Reload
	add	sp, sp, #144
	b	_AVERROR
LBB0_11:
Lloh14:
	adrp	x8, _AV_LOG_ERROR@GOTPAGE
Lloh15:
	ldr	x8, [x8, _AV_LOG_ERROR@GOTPAGEOFF]
Lloh16:
	ldr	w20, [x8]
	ldr	w0, [x24, #32]
	bl	_av_get_pix_fmt_name
                                        ; kill: def $w0 killed $w0 def $x0
	str	x0, [sp]
Lloh17:
	adrp	x2, l_.str.1@PAGE
Lloh18:
	add	x2, x2, l_.str.1@PAGEOFF
	mov	x0, x19
	mov	x1, x20
	bl	_av_log
Lloh19:
	adrp	x8, _AVERROR_PATCHWELCOME@GOTPAGE
Lloh20:
	ldr	x8, [x8, _AVERROR_PATCHWELCOME@GOTPAGEOFF]
Lloh21:
	ldr	w20, [x8]
	b	LBB0_33
LBB0_12:
Lloh22:
	adrp	x8, _AV_LOG_ERROR@GOTPAGE
Lloh23:
	ldr	x8, [x8, _AV_LOG_ERROR@GOTPAGEOFF]
Lloh24:
	ldr	w1, [x8]
	ldr	w8, [x23, #112]
	str	x8, [sp]
Lloh25:
	adrp	x2, l_.str.2@PAGE
Lloh26:
	add	x2, x2, l_.str.2@PAGEOFF
	b	LBB0_10
LBB0_13:
	ldr	w21, [x23, #20]
	mov	x0, x21
	bl	_DefaultRootWindow
	mov	x1, x0
	ldp	w3, w2, [x23, #104]
	ldp	x5, x4, [x23]
	str	wzr, [sp]
	mov	x0, x21
	mov	w6, #0
	mov	w7, #0
	bl	_XCreateSimpleWindow
	str	x0, [x23, #24]
	ldr	x2, [x23, #96]
	cbz	x2, LBB0_20
; %bb.14:
	mov	x1, x0
	b	LBB0_22
LBB0_15:
	ldp	x21, x22, [x24, #40]
	stp	x8, x0, [x23]
	cbz	x21, LBB0_7
; %bb.16:
	cmp	x21, x22
	b.le	LBB0_18
; %bb.17:
	mov	x1, x21
	mov	x2, x22
	bl	_av_rescale
	str	x0, [x23, #8]
LBB0_18:
	cmp	x21, x22
	b.ge	LBB0_7
; %bb.19:
	ldr	x0, [x23]
	mov	x1, x22
	mov	x2, x21
	bl	_av_rescale
	str	x0, [x23]
	b	LBB0_7
LBB0_20:
	ldr	w0, [x19, #4]
	bl	_av_strdup
	str	x0, [x23, #96]
	cbz	x0, LBB0_39
; %bb.21:
	mov	x2, x0
	ldr	x1, [x23, #24]
LBB0_22:
	ldr	w0, [x23, #20]
	bl	_XStoreName
	ldr	w0, [x23, #20]
Lloh27:
	adrp	x8, _False@GOTPAGE
Lloh28:
	ldr	x8, [x8, _False@GOTPAGEOFF]
Lloh29:
	ldr	w2, [x8]
Lloh30:
	adrp	x1, l_.str.3@PAGE
Lloh31:
	add	x1, x1, l_.str.3@PAGEOFF
	bl	_XInternAtom
	mov	x21, x23
	str	w0, [x21, #88]!
	ldr	w0, [x23, #20]
	ldur	x1, [x21, #-64]
	mov	x2, x21
	mov	w3, #1
	bl	_XSetWMProtocols
	ldr	w0, [x23, #20]
	ldur	x1, [x21, #-64]
	bl	_XMapWindow
LBB0_23:
	ldr	w21, [x23, #20]
	mov	x0, x21
	bl	_DefaultRootWindow
	mov	x1, x0
	sub	x2, x29, #52
	add	x3, sp, #64
	mov	x0, x21
	bl	_XvQueryAdaptors
Lloh32:
	adrp	x8, _Success@GOTPAGE
Lloh33:
	ldr	x8, [x8, _Success@GOTPAGEOFF]
Lloh34:
	ldr	x8, [x8]
	cmp	x0, x8
	b.ne	LBB0_31
; %bb.24:
	ldur	w8, [x29, #-52]
	cbz	w8, LBB0_34
; %bb.25:
	ldr	x0, [sp, #64]
	ldr	w8, [x0]
	str	w8, [x23, #72]
	bl	_XvFreeAdaptorInfo
	ldr	w0, [x23, #20]
	ldr	w1, [x23, #72]
	add	x2, sp, #20
	bl	_XvListImageFormats
	cbz	x0, LBB0_31
; %bb.26:
	ldr	w8, [sp, #20]
	cmp	w8, #1
	b.lt	LBB0_35
; %bb.27:
	mov	x21, #0
LBB0_28:                                ; =>This Inner Loop Header: Depth=1
	ldr	w9, [x0, x21, lsl #2]
	cmp	w9, w20
	b.eq	LBB0_36
; %bb.29:                               ;   in Loop: Header=BB0_28 Depth=1
	add	x21, x21, #1
	cmp	x8, x21
	b.ne	LBB0_28
; %bb.30:
	mov	x21, x8
	b	LBB0_36
LBB0_31:
Lloh35:
	adrp	x8, _AVERROR_EXTERNAL@GOTPAGE
Lloh36:
	ldr	x8, [x8, _AVERROR_EXTERNAL@GOTPAGEOFF]
Lloh37:
	ldr	w20, [x8]
LBB0_32:
	mov	x0, x19
	bl	_xv_write_trailer
LBB0_33:
	mov	x0, x20
	ldp	x29, x30, [sp, #128]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #112]            ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #96]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #80]             ; 16-byte Folded Reload
	add	sp, sp, #144
	ret
LBB0_34:
Lloh38:
	adrp	x8, _AV_LOG_ERROR@GOTPAGE
Lloh39:
	ldr	x8, [x8, _AV_LOG_ERROR@GOTPAGEOFF]
Lloh40:
	ldr	w1, [x8]
Lloh41:
	adrp	x2, l_.str.4@PAGE
Lloh42:
	add	x2, x2, l_.str.4@PAGEOFF
	mov	x0, x19
	bl	_av_log
Lloh43:
	adrp	x8, _ENODEV@GOTPAGE
Lloh44:
	ldr	x8, [x8, _ENODEV@GOTPAGEOFF]
Lloh45:
	ldr	w0, [x8]
	bl	_AVERROR
	mov	x20, x0
	b	LBB0_33
LBB0_35:
	mov	w21, #0
LBB0_36:
	bl	_XFree
	ldr	w8, [sp, #20]
	cmp	w21, w8
	b.ge	LBB0_38
; %bb.37:
	ldr	w0, [x23, #20]
	ldr	x1, [x23, #24]
	mov	w2, #0
	mov	w3, #0
	bl	_XCreateGC
	str	w0, [x23, #16]
	ldr	x4, [x24, #24]
	str	x4, [x23, #64]
	ldr	x5, [x24, #16]
	str	x5, [x23, #56]
	ldr	w0, [x23, #20]
	ldr	w1, [x23, #72]
	add	x19, x23, #32
	mov	x2, x20
	mov	w3, #0
	mov	x6, x19
	bl	_XvShmCreateImage
	str	x0, [x23, #48]
Lloh46:
	adrp	x8, _IPC_PRIVATE@GOTPAGE
Lloh47:
	ldr	x8, [x8, _IPC_PRIVATE@GOTPAGEOFF]
Lloh48:
	ldr	w8, [x8]
	ldr	w1, [x0, #8]
Lloh49:
	adrp	x9, _IPC_CREAT@GOTPAGE
Lloh50:
	ldr	x9, [x9, _IPC_CREAT@GOTPAGEOFF]
Lloh51:
	ldr	w9, [x9]
	orr	w2, w9, #0x1ff
	mov	x0, x8
	bl	_shmget
	str	w0, [x23, #40]
	mov	w1, #0
	mov	w2, #0
	bl	_shmat
	str	x0, [x23, #32]
	ldr	x8, [x23, #48]
	str	x0, [x8]
Lloh52:
	adrp	x20, _False@GOTPAGE
Lloh53:
	ldr	x20, [x20, _False@GOTPAGEOFF]
	ldr	w8, [x20]
	str	w8, [x23, #44]
	ldr	w0, [x23, #20]
	mov	x1, x19
	bl	_XShmAttach
	ldr	w0, [x23, #20]
	ldr	w1, [x20]
	bl	_XSync
	ldr	w0, [x23, #40]
Lloh54:
	adrp	x8, _IPC_RMID@GOTPAGE
Lloh55:
	ldr	x8, [x8, _IPC_RMID@GOTPAGEOFF]
Lloh56:
	ldr	w1, [x8]
	mov	w2, #0
	bl	_shmctl
	ldr	w0, [x23, #20]
	ldr	x1, [x23, #24]
	add	x2, sp, #24
	bl	_XGetWindowAttributes
	stp	xzr, xzr, [sp, #48]
	str	xzr, [sp, #40]
Lloh57:
	adrp	x8, _DoRed@GOTPAGE
Lloh58:
	ldr	x8, [x8, _DoRed@GOTPAGEOFF]
Lloh59:
	ldr	w8, [x8]
Lloh60:
	adrp	x9, _DoGreen@GOTPAGE
Lloh61:
	ldr	x9, [x9, _DoGreen@GOTPAGEOFF]
Lloh62:
	ldr	w9, [x9]
Lloh63:
	adrp	x10, _DoBlue@GOTPAGE
Lloh64:
	ldr	x10, [x10, _DoBlue@GOTPAGEOFF]
	orr	w8, w9, w8
Lloh65:
	ldr	w9, [x10]
	orr	w8, w8, w9
	str	w8, [sp, #32]
	ldr	w0, [x23, #20]
	ldr	w1, [sp, #24]
	add	x2, sp, #32
	bl	_XAllocColor
	ldp	w1, w0, [x23, #16]
	ldr	w2, [sp, #36]
	bl	_XSetForeground
	mov	w20, #0
	stp	xzr, xzr, [x23]
	b	LBB0_33
LBB0_38:
Lloh66:
	adrp	x8, _AV_LOG_ERROR@GOTPAGE
Lloh67:
	ldr	x8, [x8, _AV_LOG_ERROR@GOTPAGEOFF]
Lloh68:
	ldr	w20, [x8]
	ldr	w0, [x24, #32]
	bl	_av_get_pix_fmt_name
                                        ; kill: def $w0 killed $w0 def $x0
	str	x0, [sp]
Lloh69:
	adrp	x2, l_.str.5@PAGE
Lloh70:
	add	x2, x2, l_.str.5@PAGEOFF
	mov	x0, x19
	mov	x1, x20
	bl	_av_log
Lloh71:
	adrp	x8, _EINVAL@GOTPAGE
Lloh72:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
	b	LBB0_40
LBB0_39:
Lloh73:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh74:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
LBB0_40:
	ldr	w0, [x8]
	bl	_AVERROR
	mov	x20, x0
	b	LBB0_32
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpAdd	Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpAdd	Lloh25, Lloh26
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh24
	.loh AdrpAdd	Lloh30, Lloh31
	.loh AdrpLdrGotLdr	Lloh27, Lloh28, Lloh29
	.loh AdrpLdrGotLdr	Lloh32, Lloh33, Lloh34
	.loh AdrpLdrGotLdr	Lloh35, Lloh36, Lloh37
	.loh AdrpLdrGotLdr	Lloh43, Lloh44, Lloh45
	.loh AdrpAdd	Lloh41, Lloh42
	.loh AdrpLdrGotLdr	Lloh38, Lloh39, Lloh40
	.loh AdrpLdrGotLdr	Lloh63, Lloh64, Lloh65
	.loh AdrpLdrGotLdr	Lloh60, Lloh61, Lloh62
	.loh AdrpLdrGotLdr	Lloh57, Lloh58, Lloh59
	.loh AdrpLdrGotLdr	Lloh54, Lloh55, Lloh56
	.loh AdrpLdrGot	Lloh52, Lloh53
	.loh AdrpLdrGotLdr	Lloh49, Lloh50, Lloh51
	.loh AdrpLdrGotLdr	Lloh46, Lloh47, Lloh48
	.loh AdrpLdrGot	Lloh71, Lloh72
	.loh AdrpAdd	Lloh69, Lloh70
	.loh AdrpLdrGotLdr	Lloh66, Lloh67, Lloh68
	.loh AdrpLdrGot	Lloh73, Lloh74
	.cfi_endproc
                                        ; -- End function
	.comm	_AVMEDIA_TYPE_VIDEO,8,3         ; @AVMEDIA_TYPE_VIDEO
	.comm	_AV_CODEC_ID_RAWVIDEO,8,3       ; @AV_CODEC_ID_RAWVIDEO
	.comm	_AV_LOG_ERROR,4,2               ; @AV_LOG_ERROR
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Only supports one rawvideo stream\n"

	.comm	_EINVAL,4,2                     ; @EINVAL
l_.str.1:                               ; @.str.1
	.asciz	"Unsupported pixel format '%s', only yuv420p, uyvy422, yuyv422 are currently supported\n"

	.comm	_AVERROR_PATCHWELCOME,4,2       ; @AVERROR_PATCHWELCOME
l_.str.2:                               ; @.str.2
	.asciz	"Could not open the X11 display '%s'\n"

	.comm	_ENOMEM,4,2                     ; @ENOMEM
l_.str.3:                               ; @.str.3
	.asciz	"WM_DELETE_WINDOW"

	.comm	_False,4,2                      ; @False
	.comm	_Success,8,3                    ; @Success
	.comm	_AVERROR_EXTERNAL,4,2           ; @AVERROR_EXTERNAL
l_.str.4:                               ; @.str.4
	.asciz	"No X-Video adaptors present\n"

	.comm	_ENODEV,4,2                     ; @ENODEV
l_.str.5:                               ; @.str.5
	.asciz	"Device does not support pixel format %s, aborting\n"

	.comm	_IPC_PRIVATE,4,2                ; @IPC_PRIVATE
	.comm	_IPC_CREAT,4,2                  ; @IPC_CREAT
	.comm	_IPC_RMID,4,2                   ; @IPC_RMID
	.comm	_DoRed,4,2                      ; @DoRed
	.comm	_DoGreen,4,2                    ; @DoGreen
	.comm	_DoBlue,4,2                     ; @DoBlue
	.no_dead_strip	_xv_write_header
.subsections_via_symbols
