	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function hpel_motion_lowres
_hpel_motion_lowres:                    ## @hpel_motion_lowres
	.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	$56, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%r9d, %r15d
	movl	%r8d, -64(%rbp)                 ## 4-byte Spill
	movl	%ecx, -44(%rbp)                 ## 4-byte Spill
	movq	%rdx, -56(%rbp)                 ## 8-byte Spill
	movq	%rsi, -88(%rbp)                 ## 8-byte Spill
	movq	%rdi, %rbx
	movl	96(%rbp), %r12d
	movl	88(%rbp), %r13d
	movq	32(%rdi), %rax
	movl	(%rax), %r14d
	movl	%r14d, %edi
	movl	$3, %esi
	callq	_FFMIN
	movl	$2, %edx
	movl	%r14d, %ecx
	shll	%cl, %edx
	movl	%eax, -60(%rbp)                 ## 4-byte Spill
	decl	%edx
	movq	%rbx, -72(%rbp)                 ## 8-byte Spill
	cmpq	$0, 24(%rbx)
	je	LBB0_2
## %bb.1:
	movl	%r13d, %eax
	shrl	$31, %eax
	addl	%r13d, %eax
	sarl	%eax
	movl	%r12d, %ecx
	shrl	$31, %ecx
	addl	%r12d, %ecx
	sarl	%ecx
	movl	%eax, %r13d
	movl	%ecx, %r12d
LBB0_2:
	movq	%r14, -80(%rbp)                 ## 8-byte Spill
	leal	1(%r14), %ecx
	movl	%r13d, %r14d
	sarl	%cl, %r14d
	addl	%r15d, %r14d
	movl	%r12d, %r15d
	andl	%edx, %r15d
                                        ## kill: def $cl killed $cl killed $ecx
	sarl	%cl, %r12d
	addl	16(%rbp), %r12d
	movl	%r12d, %eax
	imull	40(%rbp), %eax
	addl	%r14d, %eax
	xorl	%ecx, %ecx
	andl	%edx, %r13d
	movl	72(%rbp), %ebx
	cltq
	movq	-56(%rbp), %rdx                 ## 8-byte Reload
	leaq	(%rdx,%rax,4), %rax
	movq	%rax, -56(%rbp)                 ## 8-byte Spill
	setne	%cl
	movl	48(%rbp), %eax
	movl	%eax, %edi
	subl	64(%rbp), %edi
	subl	%ecx, %edi
	xorl	%esi, %esi
	callq	_FFMAX
	cmpl	%eax, %r14d
	ja	LBB0_5
## %bb.3:
	movl	56(%rbp), %eax
	movl	%eax, %edi
	movl	-44(%rbp), %ecx                 ## 4-byte Reload
                                        ## kill: def $cl killed $cl killed $ecx
	sarl	%cl, %edi
	subl	%ebx, %edi
	cmpl	$1, %r15d
	adcl	$-1, %edi
	xorl	%esi, %esi
	callq	_FFMAX
	cmpl	%eax, %r12d
	jbe	LBB0_4
LBB0_5:
	movq	%rbx, %rax
	movq	-72(%rbp), %rbx                 ## 8-byte Reload
	movq	8(%rbx), %rdi
	movl	(%rbx), %edx
	leal	1(%rax), %r9d
	movl	-44(%rbp), %ecx                 ## 4-byte Reload
	shll	%cl, %r9d
	movl	64(%rbp), %r8d
	incl	%r8d
                                        ## kill: def $cl killed $cl killed $ecx
	shll	%cl, %r12d
	movq	-56(%rbp), %rsi                 ## 8-byte Reload
	movl	%edx, %ecx
	movl	56(%rbp), %eax
	pushq	%rax
	movl	48(%rbp), %eax
	pushq	%rax
	pushq	%r12
	pushq	%r14
	callq	*16(%rbx)
	addq	$32, %rsp
	movq	8(%rbx), %rsi
	movl	$1, %r14d
	jmp	LBB0_6
LBB0_4:
	movq	-56(%rbp), %rsi                 ## 8-byte Reload
	xorl	%r14d, %r14d
LBB0_6:
	movq	80(%rbp), %r10
	cmpl	$0, -64(%rbp)                   ## 4-byte Folded Reload
	movq	-80(%rbp), %rcx                 ## 8-byte Reload
	je	LBB0_8
## %bb.7:
	movq	-72(%rbp), %rax                 ## 8-byte Reload
	movslq	(%rax), %rax
	leaq	(%rsi,%rax,4), %rsi
LBB0_8:
	movl	72(%rbp), %ebx
	shll	$2, %r15d
	sarl	%cl, %r15d
	shll	$2, %r13d
                                        ## kill: def $cl killed $cl killed $rcx
	sarl	%cl, %r13d
	movslq	-60(%rbp), %rax                 ## 4-byte Folded Reload
	movq	-88(%rbp), %rdi                 ## 8-byte Reload
	movl	40(%rbp), %edx
	movl	%ebx, %ecx
	movl	%r13d, %r8d
	movl	%r15d, %r9d
	callq	*(%r10,%rax,8)
	movl	%r14d, %eax
	addq	$56, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.no_dead_strip	_hpel_motion_lowres
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function hpel_motion_lowres
_hpel_motion_lowres:                    ; @hpel_motion_lowres
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #160
	.cfi_def_cfa_offset 160
	stp	x28, x27, [sp, #64]             ; 16-byte Folded Spill
	stp	x26, x25, [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 w25, -72
	.cfi_offset w26, -80
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	stp	w4, w6, [sp, #32]               ; 8-byte Folded Spill
	mov	x27, x5
	str	w3, [sp, #20]                   ; 4-byte Folded Spill
	str	x2, [sp, #8]                    ; 8-byte Folded Spill
	str	x1, [sp, #48]                   ; 8-byte Folded Spill
	mov	x24, x0
	ldp	w28, w21, [x29, #48]
	ldr	x8, [x29, #40]
	str	x8, [sp, #40]                   ; 8-byte Folded Spill
	ldp	w19, w22, [x29, #32]
	ldp	w20, w25, [x29, #24]
	ldr	w26, [x29, #20]
	ldr	x8, [x0, #32]
	ldr	w23, [x8]
	mov	x0, x23
	mov	w1, #3
	bl	_FFMIN
	mov	w8, #2
	lsl	w8, w8, w23
	sub	w8, w8, #1
	ldr	x9, [x24, #24]
	cmp	w28, #0
	cinc	w10, w28, lt
	asr	w10, w10, #1
	cmp	w21, #0
	cinc	w11, w21, lt
	asr	w11, w11, #1
	cmp	x9, #0
	csel	w9, w28, w10, eq
	csel	w10, w21, w11, eq
	ands	w11, w9, w8
	stp	w11, w0, [sp, #24]              ; 8-byte Folded Spill
	and	w8, w10, w8
	str	w8, [sp, #60]                   ; 4-byte Folded Spill
	add	w8, w23, #1
	asr	w9, w9, w8
	add	w28, w9, w27
	asr	w8, w10, w8
	ldr	w9, [sp, #36]                   ; 4-byte Folded Reload
	add	w21, w8, w9
	str	w26, [sp, #36]                  ; 4-byte Folded Spill
	madd	w8, w21, w26, w28
	mov	x26, x25
	ldr	w25, [sp, #20]                  ; 4-byte Folded Reload
	ldr	x9, [sp, #8]                    ; 8-byte Folded Reload
	add	x27, x9, w8, sxtw #2
	cset	w8, ne
	str	w20, [sp, #8]                   ; 4-byte Folded Spill
	sub	w9, w20, w19
	mov	x20, x19
	sub	w0, w9, w8
	mov	w1, #0
	bl	_FFMAX
	cmp	w28, w0
	b.hi	LBB0_2
; %bb.1:
	asr	w8, w26, w25
	ldr	w9, [sp, #60]                   ; 4-byte Folded Reload
	cmp	w9, #0
	cset	w9, ne
	sub	w8, w8, w22
	sub	w0, w8, w9
	mov	w1, #0
	bl	_FFMAX
	cmp	w21, w0
	b.ls	LBB0_5
LBB0_2:
	ldp	x0, x8, [x24, #8]
	ldr	w2, [x24]
	add	w4, w20, #1
	add	w9, w22, #1
	lsl	w5, w9, w25
	lsl	w7, w21, w25
	ldr	w9, [sp, #8]                    ; 4-byte Folded Reload
	stp	w9, w26, [sp]
	mov	x1, x27
	mov	x3, x2
	mov	x6, x28
	blr	x8
	ldr	x27, [x24, #8]
	mov	w19, #1
	ldr	w8, [sp, #32]                   ; 4-byte Folded Reload
	cbz	w8, LBB0_4
LBB0_3:
	ldrsw	x8, [x24]
	add	x27, x27, x8, lsl #2
LBB0_4:
	ldr	w8, [sp, #60]                   ; 4-byte Folded Reload
	lsl	w8, w8, #2
	asr	w5, w8, w23
	ldp	w8, w9, [sp, #24]               ; 8-byte Folded Reload
	lsl	w8, w8, #2
	asr	w4, w8, w23
	ldp	x8, x0, [sp, #40]               ; 16-byte Folded Reload
	ldr	x8, [x8, w9, sxtw #3]
	mov	x1, x27
	ldr	w2, [sp, #36]                   ; 4-byte Folded Reload
	mov	x3, x22
	blr	x8
	mov	x0, x19
	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	x26, x25, [sp, #80]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #64]             ; 16-byte Folded Reload
	add	sp, sp, #160
	ret
LBB0_5:
	mov	w19, #0
	ldr	w8, [sp, #32]                   ; 4-byte Folded Reload
	cbnz	w8, LBB0_3
	b	LBB0_4
	.cfi_endproc
                                        ; -- End function
	.no_dead_strip	_hpel_motion_lowres
.subsections_via_symbols
