	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.section	__TEXT,__literal4,4byte_literals
	.p2align	2                               ## -- Begin function element_apply_orientation
LCPI0_0:
	.long	0x3f800000                      ## float 1
	.section	__TEXT,__text,regular,pure_instructions
	.globl	_element_apply_orientation
	.p2align	4, 0x90
_element_apply_orientation:             ## @element_apply_orientation
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	movl	(%rdi), %ecx
	testq	%rcx, %rcx
	je	LBB0_9
## %bb.1:
	movq	8(%rdi), %rax
	shlq	$2, %rcx
	leaq	(%rcx,%rcx,4), %rcx
	xorl	%edx, %edx
	movq	_VIDEO_LAYOUT_SWAP_XY@GOTPCREL(%rip), %r8
	movq	_VIDEO_LAYOUT_FLIP_X@GOTPCREL(%rip), %r9
	movq	_VIDEO_LAYOUT_FLIP_Y@GOTPCREL(%rip), %rdi
	movss	LCPI0_0(%rip), %xmm0            ## xmm0 = mem[0],zero,zero,zero
	jmp	LBB0_2
	.p2align	4, 0x90
LBB0_8:                                 ##   in Loop: Header=BB0_2 Depth=1
	addq	$20, %rdx
	cmpq	%rdx, %rcx
	je	LBB0_9
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	xorl	%esi, (%rax,%rdx)
	testl	%esi, (%r8)
	je	LBB0_4
## %bb.3:                               ##   in Loop: Header=BB0_2 Depth=1
	movups	4(%rax,%rdx), %xmm1
	shufps	$177, %xmm1, %xmm1              ## xmm1 = xmm1[1,0,3,2]
	movups	%xmm1, 4(%rax,%rdx)
LBB0_4:                                 ##   in Loop: Header=BB0_2 Depth=1
	testl	%esi, (%r9)
	je	LBB0_6
## %bb.5:                               ##   in Loop: Header=BB0_2 Depth=1
	movaps	%xmm0, %xmm1
	subss	4(%rax,%rdx), %xmm1
	subss	12(%rax,%rdx), %xmm1
	movss	%xmm1, 4(%rax,%rdx)
LBB0_6:                                 ##   in Loop: Header=BB0_2 Depth=1
	testl	%esi, (%rdi)
	je	LBB0_8
## %bb.7:                               ##   in Loop: Header=BB0_2 Depth=1
	movaps	%xmm0, %xmm1
	subss	8(%rax,%rdx), %xmm1
	subss	16(%rax,%rdx), %xmm1
	movss	%xmm1, 8(%rax,%rdx)
	jmp	LBB0_8
LBB0_9:
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_VIDEO_LAYOUT_SWAP_XY,4,2       ## @VIDEO_LAYOUT_SWAP_XY
	.comm	_VIDEO_LAYOUT_FLIP_X,4,2        ## @VIDEO_LAYOUT_FLIP_X
	.comm	_VIDEO_LAYOUT_FLIP_Y,4,2        ## @VIDEO_LAYOUT_FLIP_Y
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_element_apply_orientation      ; -- Begin function element_apply_orientation
	.p2align	2
_element_apply_orientation:             ; @element_apply_orientation
	.cfi_startproc
; %bb.0:
	ldr	w8, [x0]
	cbz	w8, LBB0_9
; %bb.1:
	ldr	x10, [x0, #8]
Lloh0:
	adrp	x9, _VIDEO_LAYOUT_SWAP_XY@GOTPAGE
Lloh1:
	ldr	x9, [x9, _VIDEO_LAYOUT_SWAP_XY@GOTPAGEOFF]
	add	x10, x10, #8
Lloh2:
	adrp	x11, _VIDEO_LAYOUT_FLIP_X@GOTPAGE
Lloh3:
	ldr	x11, [x11, _VIDEO_LAYOUT_FLIP_X@GOTPAGEOFF]
Lloh4:
	adrp	x12, _VIDEO_LAYOUT_FLIP_Y@GOTPAGE
Lloh5:
	ldr	x12, [x12, _VIDEO_LAYOUT_FLIP_Y@GOTPAGEOFF]
	fmov	s0, #1.00000000
	b	LBB0_3
LBB0_2:                                 ;   in Loop: Header=BB0_3 Depth=1
	add	x10, x10, #20
	subs	x8, x8, #1
	b.eq	LBB0_9
LBB0_3:                                 ; =>This Inner Loop Header: Depth=1
	ldur	w13, [x10, #-8]
	eor	w13, w13, w1
	stur	w13, [x10, #-8]
	ldr	w13, [x9]
	tst	w13, w1
	b.eq	LBB0_5
; %bb.4:                                ;   in Loop: Header=BB0_3 Depth=1
	ldur	q1, [x10, #-4]
	rev64.4s	v1, v1
	stur	q1, [x10, #-4]
LBB0_5:                                 ;   in Loop: Header=BB0_3 Depth=1
	ldr	w13, [x11]
	tst	w13, w1
	b.eq	LBB0_7
; %bb.6:                                ;   in Loop: Header=BB0_3 Depth=1
	ldur	s1, [x10, #-4]
	fsub	s1, s0, s1
	ldr	s2, [x10, #4]
	fsub	s1, s1, s2
	stur	s1, [x10, #-4]
LBB0_7:                                 ;   in Loop: Header=BB0_3 Depth=1
	ldr	w13, [x12]
	tst	w13, w1
	b.eq	LBB0_2
; %bb.8:                                ;   in Loop: Header=BB0_3 Depth=1
	ldr	s1, [x10]
	fsub	s1, s0, s1
	ldr	s2, [x10, #8]
	fsub	s1, s1, s2
	str	s1, [x10]
	b	LBB0_2
LBB0_9:
	ret
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.cfi_endproc
                                        ; -- End function
	.comm	_VIDEO_LAYOUT_SWAP_XY,4,2       ; @VIDEO_LAYOUT_SWAP_XY
	.comm	_VIDEO_LAYOUT_FLIP_X,4,2        ; @VIDEO_LAYOUT_FLIP_X
	.comm	_VIDEO_LAYOUT_FLIP_Y,4,2        ; @VIDEO_LAYOUT_FLIP_Y
.subsections_via_symbols
