	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function gen_yuv_shader
_gen_yuv_shader:                        ## @gen_yuv_shader
	.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
	subq	$16, %rsp
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %r15
	movq	%rdi, %r14
	cmpq	$0, 8(%rsi)
	je	LBB0_2
## %bb.1:
	leaq	L_.str(%rip), %rdi
	xorl	%eax, %eax
	callq	_FIXME
LBB0_2:
	leaq	-40(%rbp), %rdi
	callq	_string_buffer_init
	testl	%eax, %eax
	je	LBB0_8
## %bb.3:
	leaq	-44(%rbp), %rsi
	movl	$1, %edi
	callq	_glGenProgramsARB
	movl	%eax, %edi
	callq	_GL_EXTCALL
	leaq	L_.str.2(%rip), %rdi
	callq	_checkGLcall
	movq	_GL_FRAGMENT_PROGRAM_ARB@GOTPCREL(%rip), %r12
	movl	(%r12), %edi
	movl	-44(%rbp), %esi
	callq	_glBindProgramARB
	movl	%eax, %edi
	callq	_GL_EXTCALL
	leaq	L_.str.3(%rip), %rdi
	callq	_checkGLcall
	cmpl	$0, -44(%rbp)
	je	LBB0_12
## %bb.4:
	leaq	L_.str.4(%rip), %rsi
	leaq	-40(%rbp), %rbx
	movq	%rbx, %rdi
	xorl	%eax, %eax
	callq	_shader_addline
	leaq	L_.str.5(%rip), %rsi
	movq	%rbx, %rdi
	xorl	%eax, %eax
	callq	_shader_addline
	leaq	L_.str.6(%rip), %rsi
	movq	%rbx, %rdi
	xorl	%eax, %eax
	callq	_shader_addline
	leaq	L_.str.7(%rip), %rsi
	movq	%rbx, %rdi
	xorl	%eax, %eax
	callq	_shader_addline
	leaq	L_.str.8(%rip), %rsi
	movq	%rbx, %rdi
	xorl	%eax, %eax
	callq	_shader_addline
	leaq	L_.str.9(%rip), %rsi
	movq	%rbx, %rdi
	xorl	%eax, %eax
	callq	_shader_addline
	leaq	L_.str.10(%rip), %rsi
	movq	%rbx, %rdi
	xorl	%eax, %eax
	callq	_shader_addline
	leaq	L_.str.11(%rip), %rsi
	movq	%rbx, %rdi
	xorl	%eax, %eax
	callq	_shader_addline
	movq	_ARBFP_BLIT_PARAM_SIZE@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	leaq	L_.str.12(%rip), %rsi
	movq	%rbx, %rdi
	xorl	%eax, %eax
	callq	_shader_addline
	movl	(%r15), %esi
	leal	-129(%rsi), %eax
	cmpl	$2, %eax
	jb	LBB0_9
## %bb.5:
	cmpl	$128, %esi
	je	LBB0_11
## %bb.6:
	cmpl	$131, %esi
	jne	LBB0_15
## %bb.7:
	leaq	-40(%rbp), %rdi
	leaq	-33(%rbp), %rdx
	movq	%r15, %rsi
	callq	_gen_nv12_read
	testl	%eax, %eax
	jne	LBB0_10
LBB0_12:
	leaq	-40(%rbp), %rdi
	callq	_string_buffer_free
	jmp	LBB0_13
LBB0_8:
	leaq	L_.str.1(%rip), %rdi
	callq	_ERR
LBB0_13:
	xorl	%ebx, %ebx
	jmp	LBB0_14
LBB0_9:
	leaq	-40(%rbp), %rdi
	leaq	-33(%rbp), %rdx
	movq	%r15, %rsi
	callq	_gen_planar_yuv_read
	testl	%eax, %eax
	je	LBB0_12
LBB0_10:
	leaq	L_.str.14(%rip), %rsi
	leaq	-40(%rbp), %rbx
	movq	%rbx, %rdi
	xorl	%eax, %eax
	callq	_shader_addline
	movsbl	-33(%rbp), %edx
	leaq	L_.str.15(%rip), %rsi
	movq	%rbx, %rdi
	xorl	%eax, %eax
	callq	_shader_addline
	movsbl	-33(%rbp), %edx
	leaq	L_.str.16(%rip), %rsi
	movq	%rbx, %rdi
	xorl	%eax, %eax
	callq	_shader_addline
	leaq	L_.str.17(%rip), %rsi
	movq	%rbx, %rdi
	xorl	%eax, %eax
	callq	_shader_addline
	movsbl	-33(%rbp), %edx
	leaq	L_.str.18(%rip), %rsi
	movq	%rbx, %rdi
	xorl	%eax, %eax
	callq	_shader_addline
	leaq	L_.str.19(%rip), %rsi
	movq	%rbx, %rdi
	xorl	%eax, %eax
	callq	_shader_addline
	movl	(%r12), %esi
	movl	-40(%rbp), %edx
	movq	%r14, %rdi
	callq	_shader_arb_compile
	movq	%rbx, %rdi
	callq	_string_buffer_free
	movl	-44(%rbp), %ebx
	jmp	LBB0_14
LBB0_11:
	leaq	-40(%rbp), %rdi
	leaq	-33(%rbp), %rdx
	movq	%r15, %rsi
	callq	_gen_yv12_read
	testl	%eax, %eax
	jne	LBB0_10
	jmp	LBB0_12
LBB0_15:
	leaq	L_.str.13(%rip), %rdi
	xorl	%ebx, %ebx
                                        ## kill: def $esi killed $esi killed $rsi
	xorl	%eax, %eax
	callq	_FIXME
	leaq	-40(%rbp), %rdi
	callq	_string_buffer_free
LBB0_14:
	movl	%ebx, %eax
	addq	$16, %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Implement YUV color keying.\n"

L_.str.1:                               ## @.str.1
	.asciz	"Failed to initialize shader buffer.\n"

L_.str.2:                               ## @.str.2
	.asciz	"GL_EXTCALL(glGenProgramsARB(1, &shader))"

	.comm	_GL_FRAGMENT_PROGRAM_ARB,4,2    ## @GL_FRAGMENT_PROGRAM_ARB
L_.str.3:                               ## @.str.3
	.asciz	"glBindProgramARB(GL_FRAGMENT_PROGRAM_ARB, shader)"

L_.str.4:                               ## @.str.4
	.asciz	"!!ARBfp1.0\n"

L_.str.5:                               ## @.str.5
	.asciz	"TEMP luminance;\n"

L_.str.6:                               ## @.str.6
	.asciz	"TEMP temp;\n"

L_.str.7:                               ## @.str.7
	.asciz	"TEMP chroma;\n"

L_.str.8:                               ## @.str.8
	.asciz	"TEMP texcrd;\n"

L_.str.9:                               ## @.str.9
	.asciz	"TEMP texcrd2;\n"

L_.str.10:                              ## @.str.10
	.asciz	"PARAM coef = {1.0, 0.5, 2.0, 0.25};\n"

L_.str.11:                              ## @.str.11
	.asciz	"PARAM yuv_coef = {1.403, 0.344, 0.714, 1.770};\n"

L_.str.12:                              ## @.str.12
	.asciz	"PARAM size = program.local[%u];\n"

	.comm	_ARBFP_BLIT_PARAM_SIZE,4,2      ## @ARBFP_BLIT_PARAM_SIZE
L_.str.13:                              ## @.str.13
	.asciz	"Unsupported YUV fixup %#x\n"

L_.str.14:                              ## @.str.14
	.asciz	"SUB chroma.xy, chroma, coef.y;\n"

L_.str.15:                              ## @.str.15
	.asciz	"MAD result.color.x, chroma.x, yuv_coef.x, luminance.%c;\n"

L_.str.16:                              ## @.str.16
	.asciz	"MAD temp.x, -chroma.y, yuv_coef.y, luminance.%c;\n"

L_.str.17:                              ## @.str.17
	.asciz	"MAD result.color.y, -chroma.x, yuv_coef.z, temp.x;\n"

L_.str.18:                              ## @.str.18
	.asciz	"MAD result.color.z, chroma.y, yuv_coef.w, luminance.%c;\n"

L_.str.19:                              ## @.str.19
	.asciz	"END\n"

	.no_dead_strip	_gen_yuv_shader
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function gen_yuv_shader
_gen_yuv_shader:                        ; @gen_yuv_shader
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.cfi_def_cfa_offset 80
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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, x1
	mov	x19, x0
	ldr	x8, [x1, #8]
	cbz	x8, LBB0_2
; %bb.1:
Lloh0:
	adrp	x0, l_.str@PAGE
Lloh1:
	add	x0, x0, l_.str@PAGEOFF
	bl	_FIXME
LBB0_2:
	add	x0, sp, #24
	bl	_string_buffer_init
	cbz	w0, LBB0_8
; %bb.3:
	add	x1, sp, #28
	mov	w0, #1
	bl	_glGenProgramsARB
	bl	_GL_EXTCALL
Lloh2:
	adrp	x0, l_.str.2@PAGE
Lloh3:
	add	x0, x0, l_.str.2@PAGEOFF
	bl	_checkGLcall
Lloh4:
	adrp	x21, _GL_FRAGMENT_PROGRAM_ARB@GOTPAGE
Lloh5:
	ldr	x21, [x21, _GL_FRAGMENT_PROGRAM_ARB@GOTPAGEOFF]
	ldr	w0, [x21]
	ldr	w1, [sp, #28]
	bl	_glBindProgramARB
	bl	_GL_EXTCALL
Lloh6:
	adrp	x0, l_.str.3@PAGE
Lloh7:
	add	x0, x0, l_.str.3@PAGEOFF
	bl	_checkGLcall
	ldr	w8, [sp, #28]
	cbz	w8, LBB0_13
; %bb.4:
Lloh8:
	adrp	x1, l_.str.4@PAGE
Lloh9:
	add	x1, x1, l_.str.4@PAGEOFF
	add	x0, sp, #24
	bl	_shader_addline
Lloh10:
	adrp	x1, l_.str.5@PAGE
Lloh11:
	add	x1, x1, l_.str.5@PAGEOFF
	add	x0, sp, #24
	bl	_shader_addline
Lloh12:
	adrp	x1, l_.str.6@PAGE
Lloh13:
	add	x1, x1, l_.str.6@PAGEOFF
	add	x0, sp, #24
	bl	_shader_addline
Lloh14:
	adrp	x1, l_.str.7@PAGE
Lloh15:
	add	x1, x1, l_.str.7@PAGEOFF
	add	x0, sp, #24
	bl	_shader_addline
Lloh16:
	adrp	x1, l_.str.8@PAGE
Lloh17:
	add	x1, x1, l_.str.8@PAGEOFF
	add	x0, sp, #24
	bl	_shader_addline
Lloh18:
	adrp	x1, l_.str.9@PAGE
Lloh19:
	add	x1, x1, l_.str.9@PAGEOFF
	add	x0, sp, #24
	bl	_shader_addline
Lloh20:
	adrp	x1, l_.str.10@PAGE
Lloh21:
	add	x1, x1, l_.str.10@PAGEOFF
	add	x0, sp, #24
	bl	_shader_addline
Lloh22:
	adrp	x1, l_.str.11@PAGE
Lloh23:
	add	x1, x1, l_.str.11@PAGEOFF
	add	x0, sp, #24
	bl	_shader_addline
Lloh24:
	adrp	x8, _ARBFP_BLIT_PARAM_SIZE@GOTPAGE
Lloh25:
	ldr	x8, [x8, _ARBFP_BLIT_PARAM_SIZE@GOTPAGEOFF]
Lloh26:
	ldr	w8, [x8]
	str	x8, [sp]
Lloh27:
	adrp	x1, l_.str.12@PAGE
Lloh28:
	add	x1, x1, l_.str.12@PAGEOFF
	add	x0, sp, #24
	bl	_shader_addline
	ldr	w8, [x20]
	sub	w9, w8, #129
	cmp	w9, #2
	b.lo	LBB0_9
; %bb.5:
	cmp	w8, #128
	b.eq	LBB0_10
; %bb.6:
	cmp	w8, #131
	b.ne	LBB0_12
; %bb.7:
	add	x0, sp, #24
	add	x2, sp, #23
	mov	x1, x20
	bl	_gen_nv12_read
	cbnz	w0, LBB0_11
	b	LBB0_13
LBB0_8:
Lloh29:
	adrp	x0, l_.str.1@PAGE
Lloh30:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_ERR
	b	LBB0_14
LBB0_9:
	add	x0, sp, #24
	add	x2, sp, #23
	mov	x1, x20
	bl	_gen_planar_yuv_read
	cbnz	w0, LBB0_11
	b	LBB0_13
LBB0_10:
	add	x0, sp, #24
	add	x2, sp, #23
	mov	x1, x20
	bl	_gen_yv12_read
	cbz	w0, LBB0_13
LBB0_11:
Lloh31:
	adrp	x1, l_.str.14@PAGE
Lloh32:
	add	x1, x1, l_.str.14@PAGEOFF
	add	x0, sp, #24
	bl	_shader_addline
	ldrsb	x8, [sp, #23]
	str	x8, [sp]
Lloh33:
	adrp	x1, l_.str.15@PAGE
Lloh34:
	add	x1, x1, l_.str.15@PAGEOFF
	add	x0, sp, #24
	bl	_shader_addline
	ldrsb	x8, [sp, #23]
	str	x8, [sp]
Lloh35:
	adrp	x1, l_.str.16@PAGE
Lloh36:
	add	x1, x1, l_.str.16@PAGEOFF
	add	x0, sp, #24
	bl	_shader_addline
Lloh37:
	adrp	x1, l_.str.17@PAGE
Lloh38:
	add	x1, x1, l_.str.17@PAGEOFF
	add	x0, sp, #24
	bl	_shader_addline
	ldrsb	x8, [sp, #23]
	str	x8, [sp]
Lloh39:
	adrp	x1, l_.str.18@PAGE
Lloh40:
	add	x1, x1, l_.str.18@PAGEOFF
	add	x0, sp, #24
	bl	_shader_addline
Lloh41:
	adrp	x1, l_.str.19@PAGE
Lloh42:
	add	x1, x1, l_.str.19@PAGEOFF
	add	x0, sp, #24
	bl	_shader_addline
	ldr	w1, [x21]
	ldr	w2, [sp, #24]
	mov	x0, x19
	bl	_shader_arb_compile
	add	x0, sp, #24
	bl	_string_buffer_free
	ldr	w0, [sp, #28]
	b	LBB0_15
LBB0_12:
	str	x8, [sp]
Lloh43:
	adrp	x0, l_.str.13@PAGE
Lloh44:
	add	x0, x0, l_.str.13@PAGEOFF
	bl	_FIXME
LBB0_13:
	add	x0, sp, #24
	bl	_string_buffer_free
LBB0_14:
	mov	w0, #0
LBB0_15:
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #80
	ret
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpAdd	Lloh27, Lloh28
	.loh AdrpLdrGotLdr	Lloh24, Lloh25, Lloh26
	.loh AdrpAdd	Lloh22, Lloh23
	.loh AdrpAdd	Lloh20, Lloh21
	.loh AdrpAdd	Lloh18, Lloh19
	.loh AdrpAdd	Lloh16, Lloh17
	.loh AdrpAdd	Lloh14, Lloh15
	.loh AdrpAdd	Lloh12, Lloh13
	.loh AdrpAdd	Lloh10, Lloh11
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpAdd	Lloh29, Lloh30
	.loh AdrpAdd	Lloh41, Lloh42
	.loh AdrpAdd	Lloh39, Lloh40
	.loh AdrpAdd	Lloh37, Lloh38
	.loh AdrpAdd	Lloh35, Lloh36
	.loh AdrpAdd	Lloh33, Lloh34
	.loh AdrpAdd	Lloh31, Lloh32
	.loh AdrpAdd	Lloh43, Lloh44
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Implement YUV color keying.\n"

l_.str.1:                               ; @.str.1
	.asciz	"Failed to initialize shader buffer.\n"

l_.str.2:                               ; @.str.2
	.asciz	"GL_EXTCALL(glGenProgramsARB(1, &shader))"

	.comm	_GL_FRAGMENT_PROGRAM_ARB,4,2    ; @GL_FRAGMENT_PROGRAM_ARB
l_.str.3:                               ; @.str.3
	.asciz	"glBindProgramARB(GL_FRAGMENT_PROGRAM_ARB, shader)"

l_.str.4:                               ; @.str.4
	.asciz	"!!ARBfp1.0\n"

l_.str.5:                               ; @.str.5
	.asciz	"TEMP luminance;\n"

l_.str.6:                               ; @.str.6
	.asciz	"TEMP temp;\n"

l_.str.7:                               ; @.str.7
	.asciz	"TEMP chroma;\n"

l_.str.8:                               ; @.str.8
	.asciz	"TEMP texcrd;\n"

l_.str.9:                               ; @.str.9
	.asciz	"TEMP texcrd2;\n"

l_.str.10:                              ; @.str.10
	.asciz	"PARAM coef = {1.0, 0.5, 2.0, 0.25};\n"

l_.str.11:                              ; @.str.11
	.asciz	"PARAM yuv_coef = {1.403, 0.344, 0.714, 1.770};\n"

l_.str.12:                              ; @.str.12
	.asciz	"PARAM size = program.local[%u];\n"

	.comm	_ARBFP_BLIT_PARAM_SIZE,4,2      ; @ARBFP_BLIT_PARAM_SIZE
l_.str.13:                              ; @.str.13
	.asciz	"Unsupported YUV fixup %#x\n"

l_.str.14:                              ; @.str.14
	.asciz	"SUB chroma.xy, chroma, coef.y;\n"

l_.str.15:                              ; @.str.15
	.asciz	"MAD result.color.x, chroma.x, yuv_coef.x, luminance.%c;\n"

l_.str.16:                              ; @.str.16
	.asciz	"MAD temp.x, -chroma.y, yuv_coef.y, luminance.%c;\n"

l_.str.17:                              ; @.str.17
	.asciz	"MAD result.color.y, -chroma.x, yuv_coef.z, temp.x;\n"

l_.str.18:                              ; @.str.18
	.asciz	"MAD result.color.z, chroma.y, yuv_coef.w, luminance.%c;\n"

l_.str.19:                              ; @.str.19
	.asciz	"END\n"

	.no_dead_strip	_gen_yuv_shader
.subsections_via_symbols
