	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function tm2_low_res_block
_tm2_low_res_block:                     ## @tm2_low_res_block
	.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
	movl	%edx, %r14d
	movq	%rdi, %rbx
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	xorl	%eax, %eax
	callq	_TM2_INIT_POINTERS
	movq	_TM2_C_LO@GOTPCREL(%rip), %r12
	movl	(%r12), %esi
	movq	%rbx, %rdi
	callq	_GET_TOK
	movl	%eax, -112(%rbp)
	movl	$0, -100(%rbp)
	movq	$0, -108(%rbp)
	movq	_U@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	_Ustride@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_clast@GOTPCREL(%rip), %r13
	movq	(%r13), %rdx
	movq	8(%rbx), %rcx
	leaq	-112(%rbp), %r15
	movq	%r15, %r8
	movl	%r14d, %r9d
	callq	_tm2_low_chroma
	movl	(%r12), %esi
	movq	%rbx, %rdi
	callq	_GET_TOK
	movl	%eax, -112(%rbp)
	movl	$0, -100(%rbp)
	movq	$0, -108(%rbp)
	movq	_V@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	_Vstride@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	(%r13), %rdx
	addq	$2, %rdx
	movq	8(%rbx), %rcx
	addq	$2, %rcx
	movq	%r15, %r8
	movl	%r14d, %r9d
	callq	_tm2_low_chroma
	xorps	%xmm0, %xmm0
	movaps	%xmm0, -112(%rbp)
	movaps	%xmm0, -96(%rbp)
	movaps	%xmm0, -80(%rbp)
	movaps	%xmm0, -64(%rbp)
	movq	_TM2_L_LO@GOTPCREL(%rip), %r15
	movl	(%r15), %esi
	movq	%rbx, %rdi
	callq	_GET_TOK
	movl	%eax, -112(%rbp)
	movl	(%r15), %esi
	movq	%rbx, %rdi
	callq	_GET_TOK
	movl	%eax, -104(%rbp)
	movl	(%r15), %esi
	movq	%rbx, %rdi
	callq	_GET_TOK
	movl	%eax, -80(%rbp)
	movl	(%r15), %esi
	movq	%rbx, %rdi
	callq	_GET_TOK
	movl	%eax, -72(%rbp)
	movq	_last@GOTPCREL(%rip), %rax
	movq	(%rax), %r8
	testl	%r14d, %r14d
	jle	LBB0_2
## %bb.1:
	movq	(%rbx), %rax
	movdqu	(%rax), %xmm0
	movl	-4(%r8), %edx
	movl	4(%r8), %ecx
	pshufd	$238, %xmm0, %xmm1              ## xmm1 = xmm0[2,3,2,3]
	paddd	%xmm0, %xmm1
	pshufd	$85, %xmm1, %xmm0               ## xmm0 = xmm1[1,1,1,1]
	paddd	%xmm1, %xmm0
	movd	%xmm0, %esi
	subl	%esi, %edx
	addl	%ecx, %edx
	jmp	LBB0_3
LBB0_2:
	movl	4(%r8), %ecx
	movq	(%rbx), %rax
	movdqu	(%rax), %xmm0
	pshufd	$238, %xmm0, %xmm1              ## xmm1 = xmm0[2,3,2,3]
	paddd	%xmm0, %xmm1
	pshufd	$85, %xmm1, %xmm0               ## xmm0 = xmm1[1,1,1,1]
	paddd	%xmm1, %xmm0
	movd	%xmm0, %esi
	movl	%ecx, %edx
	subl	%esi, %edx
LBB0_3:
	sarl	%edx
	movl	%edx, (%r8)
	addl	12(%r8), %ecx
	sarl	%ecx
	movl	%ecx, 8(%r8)
	movl	4(%rax), %ecx
	movl	12(%rax), %edx
	addl	(%rax), %ecx
	movl	%ecx, %esi
	sarl	%esi
	movl	%esi, (%rax)
	subl	%esi, %ecx
	movl	%ecx, 4(%rax)
	addl	8(%rax), %edx
	movl	%edx, %ecx
	sarl	%ecx
	movl	%ecx, 8(%rax)
	subl	%ecx, %edx
	movl	%edx, 12(%rax)
	movq	_Y@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_Ystride@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	leaq	-112(%rbp), %rcx
	movq	%rbx, %rdi
	callq	_tm2_apply_deltas
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-48(%rbp), %rax
	jne	LBB0_5
## %bb.4:
	addq	$72, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_5:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_TM2_C_LO,4,2                   ## @TM2_C_LO
	.comm	_U,4,2                          ## @U
	.comm	_Ustride,4,2                    ## @Ustride
	.comm	_clast,8,3                      ## @clast
	.comm	_V,4,2                          ## @V
	.comm	_Vstride,4,2                    ## @Vstride
	.comm	_TM2_L_LO,4,2                   ## @TM2_L_LO
	.comm	_last,8,3                       ## @last
	.comm	_Y,4,2                          ## @Y
	.comm	_Ystride,4,2                    ## @Ystride
	.no_dead_strip	_tm2_low_res_block
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function tm2_low_res_block
_tm2_low_res_block:                     ; @tm2_low_res_block
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #128
	.cfi_def_cfa_offset 128
	stp	x22, x21, [sp, #80]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #96]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #112]            ; 16-byte Folded Spill
	add	x29, sp, #112
	.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, x2
	mov	x19, x0
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	stur	x8, [x29, #-40]
	bl	_TM2_INIT_POINTERS
Lloh3:
	adrp	x21, _TM2_C_LO@GOTPAGE
Lloh4:
	ldr	x21, [x21, _TM2_C_LO@GOTPAGEOFF]
	ldr	w1, [x21]
	mov	x0, x19
	bl	_GET_TOK
	str	w0, [sp]
	str	wzr, [sp, #12]
	movi.2d	v0, #0000000000000000
	stur	d0, [sp, #4]
Lloh5:
	adrp	x8, _U@GOTPAGE
Lloh6:
	ldr	x8, [x8, _U@GOTPAGEOFF]
Lloh7:
	adrp	x9, _Ustride@GOTPAGE
Lloh8:
	ldr	x9, [x9, _Ustride@GOTPAGEOFF]
Lloh9:
	ldr	w0, [x8]
Lloh10:
	ldr	w1, [x9]
Lloh11:
	adrp	x22, _clast@GOTPAGE
Lloh12:
	ldr	x22, [x22, _clast@GOTPAGEOFF]
	ldr	x2, [x22]
	ldr	x3, [x19, #8]
	mov	x4, sp
	mov	x5, x20
	bl	_tm2_low_chroma
	ldr	w1, [x21]
	mov	x0, x19
	bl	_GET_TOK
	str	w0, [sp]
	str	wzr, [sp, #12]
	movi.2d	v0, #0000000000000000
	stur	d0, [sp, #4]
Lloh13:
	adrp	x8, _V@GOTPAGE
Lloh14:
	ldr	x8, [x8, _V@GOTPAGEOFF]
Lloh15:
	adrp	x9, _Vstride@GOTPAGE
Lloh16:
	ldr	x9, [x9, _Vstride@GOTPAGEOFF]
Lloh17:
	ldr	w0, [x8]
Lloh18:
	ldr	w1, [x9]
	ldr	x8, [x22]
	add	x2, x8, #2
	ldr	x8, [x19, #8]
	add	x3, x8, #2
	mov	x4, sp
	mov	x5, x20
	bl	_tm2_low_chroma
	movi.2d	v0, #0000000000000000
	stp	q0, q0, [sp]
	stp	q0, q0, [sp, #32]
Lloh19:
	adrp	x21, _TM2_L_LO@GOTPAGE
Lloh20:
	ldr	x21, [x21, _TM2_L_LO@GOTPAGEOFF]
	ldr	w1, [x21]
	mov	x0, x19
	bl	_GET_TOK
	str	w0, [sp]
	ldr	w1, [x21]
	mov	x0, x19
	bl	_GET_TOK
	str	w0, [sp, #8]
	ldr	w1, [x21]
	mov	x0, x19
	bl	_GET_TOK
	str	w0, [sp, #32]
	ldr	w1, [x21]
	mov	x0, x19
	bl	_GET_TOK
	str	w0, [sp, #40]
Lloh21:
	adrp	x8, _last@GOTPAGE
Lloh22:
	ldr	x8, [x8, _last@GOTPAGEOFF]
Lloh23:
	ldr	x4, [x8]
	cmp	w20, #1
	b.lt	LBB0_2
; %bb.1:
	ldur	w10, [x4, #-4]
	ldr	x8, [x19]
	ldr	q0, [x8]
	ldr	w9, [x4, #4]
	addv.4s	s0, v0
	fmov	w11, s0
	sub	w10, w10, w11
	add	w10, w10, w9
	b	LBB0_3
LBB0_2:
	ldr	w9, [x4, #4]
	ldr	x8, [x19]
	ldr	q0, [x8]
	addv.4s	s0, v0
	fmov	w10, s0
	sub	w10, w9, w10
LBB0_3:
	asr	w10, w10, #1
	str	w10, [x4]
	ldr	w10, [x4, #12]
	add	w9, w10, w9
	asr	w9, w9, #1
	str	w9, [x4, #8]
	ldp	w9, w10, [x8]
	add	w9, w10, w9
	asr	w10, w9, #1
	sub	w9, w9, w10
	stp	w10, w9, [x8]
	ldp	w9, w10, [x8, #8]
	add	w9, w10, w9
	asr	w10, w9, #1
	sub	w9, w9, w10
	stp	w10, w9, [x8, #8]
Lloh24:
	adrp	x8, _Y@GOTPAGE
Lloh25:
	ldr	x8, [x8, _Y@GOTPAGEOFF]
Lloh26:
	ldr	w1, [x8]
Lloh27:
	adrp	x8, _Ystride@GOTPAGE
Lloh28:
	ldr	x8, [x8, _Ystride@GOTPAGEOFF]
Lloh29:
	ldr	w2, [x8]
	mov	x3, sp
	mov	x0, x19
	bl	_tm2_apply_deltas
	ldur	x8, [x29, #-40]
Lloh30:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh31:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh32:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_5
; %bb.4:
	ldp	x29, x30, [sp, #112]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #96]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #80]             ; 16-byte Folded Reload
	add	sp, sp, #128
	ret
LBB0_5:
	bl	___stack_chk_fail
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpLdrGot	Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh18
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh17
	.loh AdrpLdrGot	Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh10
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh9
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh30, Lloh31, Lloh32
	.loh AdrpLdrGotLdr	Lloh27, Lloh28, Lloh29
	.loh AdrpLdrGotLdr	Lloh24, Lloh25, Lloh26
	.cfi_endproc
                                        ; -- End function
	.comm	_TM2_C_LO,4,2                   ; @TM2_C_LO
	.comm	_U,4,2                          ; @U
	.comm	_Ustride,4,2                    ; @Ustride
	.comm	_clast,8,3                      ; @clast
	.comm	_V,4,2                          ; @V
	.comm	_Vstride,4,2                    ; @Vstride
	.comm	_TM2_L_LO,4,2                   ; @TM2_L_LO
	.comm	_last,8,3                       ; @last
	.comm	_Y,4,2                          ; @Y
	.comm	_Ystride,4,2                    ; @Ystride
	.no_dead_strip	_tm2_low_res_block
.subsections_via_symbols
