	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.section	__TEXT,__literal8,8byte_literals
	.p2align	3                               ## -- Begin function GetYUVFromExternal
LCPI0_0:
	.quad	0xbfe0000000000000              ## double -0.5
LCPI0_1:
	.quad	0x3ff0000000000000              ## double 1
LCPI0_2:
	.quad	0x406fe00000000000              ## double 255
LCPI0_4:
	.quad	0x3fe0000000000000              ## double 0.5
LCPI0_5:
	.quad	0x0000000000000000              ## double 0
	.section	__TEXT,__literal16,16byte_literals
	.p2align	4
LCPI0_3:
	.quad	0x8000000000000000              ## double -0
	.quad	0x8000000000000000              ## double -0
	.section	__TEXT,__text,regular,pure_instructions
	.p2align	4, 0x90
_GetYUVFromExternal:                    ## @GetYUVFromExternal
	.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	%rdi, %rbx
	movq	_COLOURS_PAL_setup@GOTPCREL(%rip), %r13
	movsd	(%r13), %xmm1                   ## xmm1 = mem[0],zero
	mulsd	LCPI0_0(%rip), %xmm1
	movsd	8(%r13), %xmm0                  ## xmm0 = mem[0],zero
	addsd	LCPI0_1(%rip), %xmm1
	movsd	%xmm1, -48(%rbp)                ## 8-byte Spill
	movq	_COLOURS_PAL_external@GOTPCREL(%rip), %rax
	movq	(%rax), %r14
	movq	_M_PI@GOTPCREL(%rip), %rax
	mulsd	(%rax), %xmm0
	callq	___sincos_stret
	movapd	%xmm1, %xmm2
	unpcklpd	%xmm0, %xmm2                    ## xmm2 = xmm2[0],xmm0[0]
	movapd	%xmm2, -96(%rbp)                ## 16-byte Spill
	unpcklpd	%xmm1, %xmm0                    ## xmm0 = xmm0[0],xmm1[0]
	movapd	%xmm0, -112(%rbp)               ## 16-byte Spill
	xorl	%r15d, %r15d
	leaq	-56(%rbp), %r12
	jmp	LBB0_1
	.p2align	4, 0x90
LBB0_5:                                 ##   in Loop: Header=BB0_1 Depth=1
	movsd	32(%r13), %xmm1                 ## xmm1 = mem[0],zero
	addsd	LCPI0_1(%rip), %xmm1
	movddup	%xmm1, %xmm1                    ## xmm1 = xmm1[0,0]
	movapd	-128(%rbp), %xmm2               ## 16-byte Reload
	mulpd	%xmm1, %xmm2
LBB0_6:                                 ##   in Loop: Header=BB0_1 Depth=1
	movsd	%xmm0, (%rbx)
	movlpd	%xmm2, 8(%rbx)
	movupd	%xmm2, 16(%rbx)
	movhpd	%xmm2, 32(%rbx)
	addq	$3, %r15
	addq	$40, %rbx
	cmpl	$768, %r15d                     ## imm = 0x300
	je	LBB0_7
LBB0_1:                                 ## =>This Inner Loop Header: Depth=1
	movzbl	(%r14,%r15), %eax
	xorps	%xmm0, %xmm0
	cvtsi2sd	%eax, %xmm0
	movsd	LCPI0_2(%rip), %xmm3            ## xmm3 = mem[0],zero
	divsd	%xmm3, %xmm0
	movzbl	1(%r14,%r15), %eax
	xorps	%xmm1, %xmm1
	cvtsi2sd	%eax, %xmm1
	divsd	%xmm3, %xmm1
	movzbl	2(%r14,%r15), %eax
	xorps	%xmm2, %xmm2
	cvtsi2sd	%eax, %xmm2
	divsd	%xmm3, %xmm2
	leaq	-72(%rbp), %rdi
	leaq	-64(%rbp), %rsi
	movq	%r12, %rdx
	callq	_Colours_RGB2YUV
	movsd	-56(%rbp), %xmm0                ## xmm0 = mem[0],zero
	movapd	%xmm0, %xmm1
	xorpd	LCPI0_3(%rip), %xmm1
	unpcklpd	%xmm0, %xmm1                    ## xmm1 = xmm1[0],xmm0[0]
	mulpd	-112(%rbp), %xmm1               ## 16-byte Folded Reload
	movddup	-64(%rbp), %xmm2                ## xmm2 = mem[0,0]
	mulpd	-96(%rbp), %xmm2                ## 16-byte Folded Reload
	addpd	%xmm1, %xmm2
	movq	_COLOURS_PAL_external@GOTPCREL(%rip), %rax
	cmpq	$0, 8(%rax)
	movsd	-72(%rbp), %xmm0                ## xmm0 = mem[0],zero
	je	LBB0_6
## %bb.2:                               ##   in Loop: Header=BB0_1 Depth=1
	movapd	%xmm2, -128(%rbp)               ## 16-byte Spill
	movsd	-48(%rbp), %xmm1                ## 8-byte Reload
                                        ## xmm1 = mem[0],zero
	callq	_pow
	movsd	16(%r13), %xmm2                 ## xmm2 = mem[0],zero
	movsd	LCPI0_4(%rip), %xmm3            ## xmm3 = mem[0],zero
	mulsd	%xmm3, %xmm2
	movsd	LCPI0_1(%rip), %xmm4            ## xmm4 = mem[0],zero
	addsd	%xmm4, %xmm2
	mulsd	%xmm0, %xmm2
	movsd	24(%r13), %xmm1                 ## xmm1 = mem[0],zero
	mulsd	%xmm3, %xmm1
	addsd	%xmm2, %xmm1
	ucomisd	%xmm4, %xmm1
	movapd	%xmm4, %xmm0
	ja	LBB0_5
## %bb.3:                               ##   in Loop: Header=BB0_1 Depth=1
	xorpd	%xmm0, %xmm0
	ucomisd	%xmm1, %xmm0
	movapd	%xmm1, %xmm0
	jbe	LBB0_5
## %bb.4:                               ##   in Loop: Header=BB0_1 Depth=1
	xorpd	%xmm0, %xmm0
	jmp	LBB0_5
LBB0_7:
	addq	$88, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_COLOURS_PAL_setup,40,3         ## @COLOURS_PAL_setup
	.comm	_COLOURS_PAL_external,16,3      ## @COLOURS_PAL_external
	.comm	_M_PI,8,3                       ## @M_PI
	.no_dead_strip	_GetYUVFromExternal
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function GetYUVFromExternal
_GetYUVFromExternal:                    ; @GetYUVFromExternal
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #160
	.cfi_def_cfa_offset 160
	stp	d15, d14, [sp, #32]             ; 16-byte Folded Spill
	stp	d13, d12, [sp, #48]             ; 16-byte Folded Spill
	stp	d11, d10, [sp, #64]             ; 16-byte Folded Spill
	stp	d9, d8, [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 b8, -72
	.cfi_offset b9, -80
	.cfi_offset b10, -88
	.cfi_offset b11, -96
	.cfi_offset b12, -104
	.cfi_offset b13, -112
	.cfi_offset b14, -120
	.cfi_offset b15, -128
	mov	x19, x0
Lloh0:
	adrp	x20, _COLOURS_PAL_setup@GOTPAGE
Lloh1:
	ldr	x20, [x20, _COLOURS_PAL_setup@GOTPAGEOFF]
	fmov	d0, #-0.50000000
	ldp	d1, d2, [x20]
	fmul	d0, d1, d0
	fmov	d11, #1.00000000
Lloh2:
	adrp	x21, _COLOURS_PAL_external@GOTPAGE
Lloh3:
	ldr	x21, [x21, _COLOURS_PAL_external@GOTPAGEOFF]
	fadd	d8, d0, d11
	ldr	x22, [x21]
Lloh4:
	adrp	x8, _M_PI@GOTPAGE
Lloh5:
	ldr	x8, [x8, _M_PI@GOTPAGEOFF]
Lloh6:
	ldr	d0, [x8]
	fmul	d0, d2, d0
	bl	___sincos_stret
	fmov	d9, d0
	fmov	d10, d1
	mov	x23, #0
	mov	x24, #246290604621824
	movk	x24, #16495, lsl #48
	fmov	d12, #0.50000000
	b	LBB0_3
LBB0_1:                                 ;   in Loop: Header=BB0_3 Depth=1
	ldr	d1, [x20, #32]
	fadd	d1, d1, d11
	fmul	d14, d14, d1
	fmul	d13, d13, d1
LBB0_2:                                 ;   in Loop: Header=BB0_3 Depth=1
	stp	d0, d14, [x19]
	stp	d14, d13, [x19, #16]
	add	x23, x23, #3
	str	d13, [x19, #32]
	add	x19, x19, #40
	cmp	w23, #768
	b.eq	LBB0_7
LBB0_3:                                 ; =>This Inner Loop Header: Depth=1
	add	x8, x22, x23
	ldr	b0, [x8]
	ucvtf	d0, d0
	fmov	d2, x24
	fdiv	d0, d0, d2
	ldr	b1, [x8, #1]
	ucvtf	d1, d1
	fdiv	d1, d1, d2
	ldr	b3, [x8, #2]
	ucvtf	d3, d3
	fdiv	d2, d3, d2
	add	x0, sp, #24
	add	x1, sp, #16
	add	x2, sp, #8
	bl	_Colours_RGB2YUV
	ldp	d1, d0, [sp, #8]
	fneg	d2, d1
	fmul	d2, d9, d2
	fmadd	d14, d0, d10, d2
	fmul	d1, d10, d1
	fmadd	d13, d0, d9, d1
	ldr	x8, [x21, #8]
	ldr	d0, [sp, #24]
	cbz	x8, LBB0_2
; %bb.4:                                ;   in Loop: Header=BB0_3 Depth=1
	fmov	d1, d8
	bl	_pow
	fmov	d1, d0
	fmov	d0, #1.00000000
	ldp	d2, d3, [x20, #16]
	fmadd	d2, d2, d12, d0
	fmul	d1, d1, d2
	fmadd	d1, d3, d12, d1
	fcmp	d1, d0
	b.gt	LBB0_1
; %bb.5:                                ;   in Loop: Header=BB0_3 Depth=1
	fcmp	d1, #0.0
	fmov	d0, d1
	b.pl	LBB0_1
; %bb.6:                                ;   in Loop: Header=BB0_3 Depth=1
	movi	d0, #0000000000000000
	b	LBB0_1
LBB0_7:
	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	d9, d8, [sp, #80]               ; 16-byte Folded Reload
	ldp	d11, d10, [sp, #64]             ; 16-byte Folded Reload
	ldp	d13, d12, [sp, #48]             ; 16-byte Folded Reload
	ldp	d15, d14, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #160
	ret
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.cfi_endproc
                                        ; -- End function
	.comm	_COLOURS_PAL_setup,40,3         ; @COLOURS_PAL_setup
	.comm	_COLOURS_PAL_external,16,3      ; @COLOURS_PAL_external
	.comm	_M_PI,8,3                       ; @M_PI
	.no_dead_strip	_GetYUVFromExternal
.subsections_via_symbols
