	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function yuv420p_uploadTexture
_yuv420p_uploadTexture:                 ## @yuv420p_uploadTexture
	.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	$88, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	testq	%rdi, %rdi
	je	LBB0_9
## %bb.1:
	testq	%rsi, %rsi
	je	LBB0_9
## %bb.2:
	movq	%rdi, %r15
	movq	(%rsi), %rax
	movl	(%rax), %r14d
	movl	%r14d, -60(%rbp)
	movl	4(%rax), %ecx
	movl	%ecx, -56(%rbp)
	movl	8(%rax), %eax
	movl	%eax, -52(%rbp)
	movl	8(%rsi), %ebx
	movl	%ebx, -72(%rbp)
	movl	%ebx, %eax
	shrl	$31, %eax
	addl	%ebx, %eax
	sarl	%eax
	movl	%eax, -68(%rbp)
	movl	%eax, -64(%rbp)
	movq	16(%rsi), %rax
	movups	(%rax), %xmm0
	movaps	%xmm0, -96(%rbp)
	movq	16(%rax), %rax
	movq	%rax, -80(%rbp)
	movl	12(%rsi), %esi
	cmpl	$129, %esi
	je	LBB0_6
## %bb.3:
	cmpl	$128, %esi
	jne	LBB0_8
## %bb.4:
	movaps	%xmm0, -128(%rbp)               ## 16-byte Spill
	movl	$1, %eax
	movq	%rax, -104(%rbp)                ## 8-byte Spill
	movl	$2, %r12d
	jmp	LBB0_7
LBB0_6:
	movaps	%xmm0, -128(%rbp)               ## 16-byte Spill
	movl	$2, %eax
	movq	%rax, -104(%rbp)                ## 8-byte Spill
	movl	$1, %r12d
LBB0_7:
	movq	_GL_TEXTURE_2D@GOTPCREL(%rip), %r13
	movl	(%r13), %edi
	movq	(%r15), %rax
	movl	(%rax), %esi
	callq	_glBindTexture
	movl	(%r13), %edi
	movq	_GL_LUMINANCE@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	_GL_UNSIGNED_BYTE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	subq	$32, %rsp
	movaps	-128(%rbp), %xmm0               ## 16-byte Reload
	movlps	%xmm0, 16(%rsp)
	movl	%eax, 8(%rsp)
	movl	%edx, (%rsp)
	xorl	%esi, %esi
	movl	%r14d, %ecx
	movl	%ebx, %r8d
	xorl	%r9d, %r9d
	callq	_glTexImage2D
	addq	$32, %rsp
	movl	(%r13), %edi
	movq	(%r15), %rax
	movl	4(%rax), %esi
	callq	_glBindTexture
	movl	(%r13), %edi
	movq	_GL_LUMINANCE@GOTPCREL(%rip), %rbx
	movl	(%rbx), %edx
	movl	-60(%rbp,%r12,4), %ecx
	movl	-72(%rbp,%r12,4), %r8d
	movq	_GL_UNSIGNED_BYTE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	subq	$8, %rsp
	xorl	%esi, %esi
	xorl	%r9d, %r9d
	pushq	-96(%rbp,%r12,8)
	pushq	%rax
	pushq	%rdx
	callq	_glTexImage2D
	addq	$32, %rsp
	movl	(%r13), %edi
	movq	(%r15), %rax
	movl	8(%rax), %esi
	callq	_glBindTexture
	movl	(%r13), %edi
	movl	(%rbx), %edx
	movq	-104(%rbp), %rbx                ## 8-byte Reload
	movl	-60(%rbp,%rbx,4), %ecx
	movl	-72(%rbp,%rbx,4), %r8d
	movq	_GL_UNSIGNED_BYTE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	subq	$8, %rsp
	xorl	%esi, %esi
	xorl	%r9d, %r9d
	pushq	-96(%rbp,%rbx,8)
	pushq	%rax
	pushq	%rdx
	callq	_glTexImage2D
	addq	$32, %rsp
	movq	_GL_TRUE@GOTPCREL(%rip), %rax
	jmp	LBB0_10
LBB0_8:
	leaq	L_.str(%rip), %rdi
	callq	_ALOGE
LBB0_9:
	movq	_GL_FALSE@GOTPCREL(%rip), %rax
LBB0_10:
	movl	(%rax), %eax
	movq	___stack_chk_guard@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	cmpq	-48(%rbp), %rcx
	jne	LBB0_12
## %bb.11:
	addq	$88, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_12:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_GL_FALSE,4,2                   ## @GL_FALSE
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"[yuv420p] unexpected format %x\n"

	.comm	_GL_TEXTURE_2D,4,2              ## @GL_TEXTURE_2D
	.comm	_GL_LUMINANCE,4,2               ## @GL_LUMINANCE
	.comm	_GL_UNSIGNED_BYTE,4,2           ## @GL_UNSIGNED_BYTE
	.comm	_GL_TRUE,4,2                    ## @GL_TRUE
	.no_dead_strip	_yuv420p_uploadTexture
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function yuv420p_uploadTexture
_yuv420p_uploadTexture:                 ; @yuv420p_uploadTexture
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #192
	.cfi_def_cfa_offset 192
	stp	x28, x27, [sp, #96]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #112]            ; 16-byte Folded Spill
	stp	x24, x23, [sp, #128]            ; 16-byte Folded Spill
	stp	x22, x21, [sp, #144]            ; 16-byte Folded Spill
	stp	x20, x19, [sp, #160]            ; 16-byte Folded Spill
	stp	x29, x30, [sp, #176]            ; 16-byte Folded Spill
	add	x29, sp, #176
	.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
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	str	x8, [sp, #88]
	cbz	x0, LBB0_8
; %bb.1:
	cbz	x1, LBB0_8
; %bb.2:
	mov	x19, x0
	ldr	x8, [x1]
	ldr	d0, [x8]
	str	d0, [sp, #72]
	ldr	w8, [x8, #8]
	str	w8, [sp, #80]
	ldp	w20, w8, [x1, #8]
	cmp	w20, #0
	cinc	w9, w20, lt
	asr	w9, w9, #1
	stp	w20, w9, [sp, #60]
	str	w9, [sp, #68]
	ldr	x9, [x1, #16]
	ldp	x26, x10, [x9]
	stp	x26, x10, [sp, #32]
	ldr	x9, [x9, #16]
	str	x9, [sp, #48]
	cmp	w8, #129
	b.eq	LBB0_5
; %bb.3:
	cmp	w8, #128
	b.ne	LBB0_7
; %bb.4:
	str	q0, [sp, #16]                   ; 16-byte Folded Spill
	mov	w21, #1
	mov	w25, #2
	b	LBB0_6
LBB0_5:
	str	q0, [sp, #16]                   ; 16-byte Folded Spill
	mov	w21, #2
	mov	w25, #1
LBB0_6:
Lloh3:
	adrp	x22, _GL_TEXTURE_2D@GOTPAGE
Lloh4:
	ldr	x22, [x22, _GL_TEXTURE_2D@GOTPAGEOFF]
	ldr	w0, [x22]
	ldr	x8, [x19]
	ldr	w1, [x8]
	bl	_glBindTexture
Lloh5:
	adrp	x23, _GL_LUMINANCE@GOTPAGE
Lloh6:
	ldr	x23, [x23, _GL_LUMINANCE@GOTPAGEOFF]
	ldr	w0, [x22]
	ldr	w2, [x23]
Lloh7:
	adrp	x24, _GL_UNSIGNED_BYTE@GOTPAGE
Lloh8:
	ldr	x24, [x24, _GL_UNSIGNED_BYTE@GOTPAGEOFF]
	ldr	w7, [x24]
	ldr	q0, [sp, #16]                   ; 16-byte Folded Reload
	fmov	w3, s0
	str	x26, [sp]
	mov	w1, #0
	mov	x4, x20
	mov	w5, #0
	mov	x6, x2
	bl	_glTexImage2D
	ldr	w0, [x22]
	ldr	x8, [x19]
	ldr	w1, [x8, #4]
	bl	_glBindTexture
	ldr	w0, [x22]
	ldr	w2, [x23]
	lsl	x8, x25, #2
	add	x20, sp, #72
	ldr	w3, [x20, x8]
	add	x26, sp, #60
	ldr	w4, [x26, x8]
	add	x27, sp, #32
	ldr	w7, [x24]
	ldr	x8, [x27, x25, lsl #3]
	str	x8, [sp]
	mov	w1, #0
	mov	w5, #0
	mov	x6, x2
	bl	_glTexImage2D
	ldr	w0, [x22]
	ldr	x8, [x19]
	ldr	w1, [x8, #8]
	bl	_glBindTexture
	ldr	w0, [x22]
	lsl	x8, x21, #2
	ldr	w3, [x20, x8]
	ldr	w2, [x23]
	ldr	w4, [x26, x8]
	ldr	w7, [x24]
	ldr	x8, [x27, x21, lsl #3]
	str	x8, [sp]
	mov	w1, #0
	mov	w5, #0
	mov	x6, x2
	bl	_glTexImage2D
Lloh9:
	adrp	x8, _GL_TRUE@GOTPAGE
Lloh10:
	ldr	x8, [x8, _GL_TRUE@GOTPAGEOFF]
	b	LBB0_9
LBB0_7:
Lloh11:
	adrp	x0, l_.str@PAGE
Lloh12:
	add	x0, x0, l_.str@PAGEOFF
	mov	x1, x8
	bl	_ALOGE
LBB0_8:
Lloh13:
	adrp	x8, _GL_FALSE@GOTPAGE
Lloh14:
	ldr	x8, [x8, _GL_FALSE@GOTPAGEOFF]
LBB0_9:
	ldr	w0, [x8]
	ldr	x8, [sp, #88]
Lloh15:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh16:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh17:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_11
; %bb.10:
	ldp	x29, x30, [sp, #176]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #160]            ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #144]            ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #128]            ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #112]            ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #96]             ; 16-byte Folded Reload
	add	sp, sp, #192
	ret
LBB0_11:
	bl	___stack_chk_fail
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpAdd	Lloh11, Lloh12
	.loh AdrpLdrGot	Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.cfi_endproc
                                        ; -- End function
	.comm	_GL_FALSE,4,2                   ; @GL_FALSE
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"[yuv420p] unexpected format %x\n"

	.comm	_GL_TEXTURE_2D,4,2              ; @GL_TEXTURE_2D
	.comm	_GL_LUMINANCE,4,2               ; @GL_LUMINANCE
	.comm	_GL_UNSIGNED_BYTE,4,2           ; @GL_UNSIGNED_BYTE
	.comm	_GL_TRUE,4,2                    ; @GL_TRUE
	.no_dead_strip	_yuv420p_uploadTexture
.subsections_via_symbols
