	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function hls_decode_neighbour
_hls_decode_neighbour:                  ## @hls_decode_neighbour
	.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	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%ecx, %r10d
	movl	%edx, -44(%rbp)                 ## 4-byte Spill
	movq	%rdi, %r15
	movq	32(%rdi), %r12
	movq	(%rdi), %rdx
	movq	8(%rdi), %r9
	movl	(%r9), %ecx
	movl	$1, %edi
	shll	%cl, %edi
	movq	16(%r15), %rax
	movq	(%rax), %rbx
	movslq	%r10d, %r14
	movslq	(%rbx,%r14,4), %rbx
	movslq	24(%r15), %r8
	movq	%r8, (%rdx,%rbx,8)
	movl	%ebx, %r13d
	cmpq	$0, 48(%rax)
	movq	%rbx, -56(%rbp)                 ## 8-byte Spill
	je	LBB0_5
## %bb.1:
	testl	%esi, %esi
	jne	LBB0_4
## %bb.2:
	leal	-1(%rdi), %eax
	testl	%eax, -44(%rbp)                 ## 4-byte Folded Reload
	jne	LBB0_4
## %bb.3:
	movl	$1, (%r12)
	jmp	LBB0_4
LBB0_5:
	cmpq	$0, 40(%rax)
	je	LBB0_4
## %bb.6:
	testl	%r10d, %r10d
	je	LBB0_9
## %bb.7:
	movq	8(%rax), %rbx
	movq	(%rbx,%r14,8), %rdx
	cmpq	-8(%rbx,%r14,8), %rdx
	je	LBB0_9
## %bb.8:
	movl	%esi, %edx
	sarl	%cl, %edx
	movslq	%edx, %rbx
	movq	16(%rax), %rdx
	movq	24(%rax), %r10
	movslq	(%rdx,%rbx,4), %rax
	movl	(%r10,%rax,4), %eax
                                        ## kill: def $cl killed $cl killed $ecx
	shll	%cl, %eax
	addl	%esi, %eax
	movl	%eax, 4(%r12)
	movl	$1, (%r12)
	jmp	LBB0_9
LBB0_4:
	movl	4(%r9), %eax
	movl	%eax, 4(%r12)
LBB0_9:
	movl	%esi, %ebx
	subl	%r8d, %r13d
	addl	-44(%rbp), %edi                 ## 4-byte Folded Reload
	movl	12(%r9), %esi
                                        ## kill: def $edi killed $edi killed $rdi
	callq	_FFMIN
	movl	%eax, 28(%r12)
	movl	$0, 8(%r12)
	movq	16(%r15), %r8
	cmpq	$0, 40(%r8)
	je	LBB0_20
## %bb.10:
	movl	%ebx, %r9d
	testl	%ebx, %ebx
	jle	LBB0_11
## %bb.12:
	movq	8(%r8), %rsi
	movq	32(%r8), %rcx
	movq	(%rsi,%r14,8), %rdi
	movq	-56(%rbp), %r11                 ## 8-byte Reload
	leaq	-1(%r11), %rdx
	movq	-8(%rcx,%r11,8), %rbx
	xorl	%ecx, %ecx
	cmpq	(%rsi,%rbx,8), %rdi
	je	LBB0_14
## %bb.13:
	movq	_BOUNDARY_LEFT_TILE@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	movl	%ecx, 8(%r12)
LBB0_14:
	movq	(%r15), %rsi
	movq	(%rsi,%r11,8), %rdi
	cmpq	(%rsi,%rdx,8), %rdi
	je	LBB0_16
## %bb.15:
	movq	_BOUNDARY_LEFT_SLICE@GOTPCREL(%rip), %rdx
	orl	(%rdx), %ecx
	movl	%ecx, 8(%r12)
LBB0_16:
	cmpl	$0, -44(%rbp)                   ## 4-byte Folded Reload
	jg	LBB0_17
	jmp	LBB0_24
LBB0_20:
	xorl	%ecx, %ecx
	testl	%r13d, %r13d
	jg	LBB0_22
## %bb.21:
	movq	_BOUNDARY_LEFT_SLICE@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movl	%ecx, 8(%r12)
LBB0_22:
	movq	8(%r15), %rax
	cmpl	8(%rax), %r13d
	movl	%ebx, %r9d
	movq	-56(%rbp), %r11                 ## 8-byte Reload
	jl	LBB0_23
	jmp	LBB0_24
LBB0_11:
	xorl	%ecx, %ecx
	movq	-56(%rbp), %r11                 ## 8-byte Reload
	cmpl	$0, -44(%rbp)                   ## 4-byte Folded Reload
	jle	LBB0_24
LBB0_17:
	movq	8(%r8), %rsi
	movq	32(%r8), %rdi
	movq	(%rsi,%r14,8), %rbx
	movq	8(%r15), %rdx
	movslq	8(%rdx), %rax
	movq	%r11, %rdx
	subq	%rax, %rdx
	movq	(%rdi,%rdx,8), %rax
	cmpq	(%rsi,%rax,8), %rbx
	je	LBB0_19
## %bb.18:
	movq	_BOUNDARY_UPPER_TILE@GOTPCREL(%rip), %rax
	orl	(%rax), %ecx
	movl	%ecx, 8(%r12)
LBB0_19:
	movq	(%r15), %rax
	movq	(%rax,%r11,8), %rsi
	cmpq	(%rax,%rdx,8), %rsi
	je	LBB0_24
LBB0_23:
	movq	_BOUNDARY_UPPER_SLICE@GOTPCREL(%rip), %rax
	orl	(%rax), %ecx
	movl	%ecx, 8(%r12)
LBB0_24:
	testl	%r9d, %r9d
	setg	%al
	testl	%r13d, %r13d
	setg	%dl
	movq	_BOUNDARY_LEFT_TILE@GOTPCREL(%rip), %rsi
	movl	(%rsi), %esi
	andl	%ecx, %esi
	sete	%bl
	andb	%al, %bl
	andb	%dl, %bl
	movzbl	%bl, %eax
	movl	%eax, 12(%r12)
	cmpl	$0, -44(%rbp)                   ## 4-byte Folded Reload
	jle	LBB0_31
## %bb.25:
	movq	8(%r15), %rax
	movl	8(%rax), %edx
	cmpl	%edx, %r13d
	setge	%al
	movq	_BOUNDARY_UPPER_TILE@GOTPCREL(%rip), %rsi
	andl	(%rsi), %ecx
	sete	%cl
	andb	%al, %cl
	movzbl	%cl, %eax
	movl	%eax, 16(%r12)
	leal	1(%r13), %eax
	xorl	%ecx, %ecx
	movl	$0, %esi
	cmpl	%edx, %eax
	jl	LBB0_27
## %bb.26:
	movq	8(%r8), %rax
	movq	32(%r8), %rsi
	movq	(%rax,%r14,8), %rdi
	movl	%r11d, %ebx
	subl	%edx, %ebx
	incl	%ebx
	movslq	%ebx, %rbx
	movq	(%rsi,%rbx,8), %rbx
	xorl	%esi, %esi
	cmpq	(%rax,%rbx,8), %rdi
	sete	%sil
LBB0_27:
	movl	%esi, 20(%r12)
	testl	%r9d, %r9d
	jle	LBB0_30
## %bb.28:
	cmpl	%edx, %r13d
	jle	LBB0_30
## %bb.29:
	movq	8(%r8), %rax
	movq	32(%r8), %rcx
	movq	(%rax,%r14,8), %rsi
	notl	%edx
	addl	%r11d, %edx
	movslq	%edx, %rdx
	movq	(%rcx,%rdx,8), %rdx
	xorl	%ecx, %ecx
	cmpq	(%rax,%rdx,8), %rsi
	sete	%cl
	jmp	LBB0_30
LBB0_31:
	movq	$0, 16(%r12)
	xorl	%ecx, %ecx
LBB0_30:
	movl	%ecx, 24(%r12)
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_BOUNDARY_LEFT_TILE,4,2         ## @BOUNDARY_LEFT_TILE
	.comm	_BOUNDARY_LEFT_SLICE,4,2        ## @BOUNDARY_LEFT_SLICE
	.comm	_BOUNDARY_UPPER_TILE,4,2        ## @BOUNDARY_UPPER_TILE
	.comm	_BOUNDARY_UPPER_SLICE,4,2       ## @BOUNDARY_UPPER_SLICE
	.no_dead_strip	_hls_decode_neighbour
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function hls_decode_neighbour
_hls_decode_neighbour:                  ; @hls_decode_neighbour
	.cfi_startproc
; %bb.0:
	stp	x26, x25, [sp, #-80]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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
                                        ; kill: def $w3 killed $w3 def $x3
	mov	x21, x2
	mov	x19, x1
	mov	x20, x0
	ldr	x22, [x0, #32]
	ldp	x13, x8, [x0]
	ldr	w11, [x8]
	mov	w9, #1
	lsl	w9, w9, w11
	ldr	x12, [x0, #16]
	ldr	x10, [x12]
	sxtw	x24, w3
	ldrsw	x23, [x10, w3, sxtw #2]
	ldrsw	x10, [x0, #24]
	str	x10, [x13, x23, lsl #3]
	ldr	x13, [x12, #48]
	cbz	x13, LBB0_4
; %bb.1:
	cbnz	w19, LBB0_8
; %bb.2:
	sub	w11, w9, #1
	tst	w11, w21
	b.ne	LBB0_8
; %bb.3:
	mov	w11, #1
	str	w11, [x22]
	b	LBB0_8
LBB0_4:
	ldr	x13, [x12, #40]
	cbz	x13, LBB0_8
; %bb.5:
	cbz	w3, LBB0_9
; %bb.6:
	ldr	x13, [x12, #8]
	add	x13, x13, x24, lsl #3
	ldp	x13, x14, [x13, #-8]
	cmp	x14, x13
	b.eq	LBB0_9
; %bb.7:
	asr	w13, w19, w11
	ldp	x14, x12, [x12, #16]
	ldrsw	x13, [x14, w13, sxtw #2]
	ldr	w12, [x12, x13, lsl #2]
	lsl	w11, w12, w11
	add	w11, w11, w19
	mov	w12, #1
	stp	w12, w11, [x22]
	b	LBB0_9
LBB0_8:
	ldr	w11, [x8, #4]
	str	w11, [x22, #4]
LBB0_9:
	sub	w25, w23, w10
	add	w0, w9, w21
	ldr	w1, [x8, #12]
	bl	_FFMIN
	str	w0, [x22, #28]
	str	wzr, [x22, #8]
	ldr	x8, [x20, #16]
	ldr	x10, [x8, #40]
Lloh0:
	adrp	x9, _BOUNDARY_LEFT_TILE@GOTPAGE
Lloh1:
	ldr	x9, [x9, _BOUNDARY_LEFT_TILE@GOTPAGEOFF]
	cbz	x10, LBB0_13
; %bb.10:
	cmp	w19, #1
	b.lt	LBB0_15
; %bb.11:
	ldr	x10, [x8, #8]
	ldr	x12, [x10, x24, lsl #3]
	ldr	x13, [x8, #32]
	sub	w14, w23, #1
	sxtw	x11, w14
	ldr	x13, [x13, w14, sxtw #3]
	ldr	x10, [x10, x13, lsl #3]
	cmp	x12, x10
	b.ne	LBB0_16
; %bb.12:
	mov	w10, #0
	b	LBB0_17
LBB0_13:
	cmp	w25, #0
	b.le	LBB0_33
; %bb.14:
	mov	w10, #0
	b	LBB0_34
LBB0_15:
	mov	w10, #0
	b	LBB0_19
LBB0_16:
	ldr	w10, [x9]
	str	w10, [x22, #8]
LBB0_17:
	ldr	x12, [x20]
	ldr	x13, [x12, x23, lsl #3]
	ldr	x11, [x12, x11, lsl #3]
	cmp	x13, x11
	b.eq	LBB0_19
; %bb.18:
Lloh2:
	adrp	x11, _BOUNDARY_LEFT_SLICE@GOTPAGE
Lloh3:
	ldr	x11, [x11, _BOUNDARY_LEFT_SLICE@GOTPAGEOFF]
Lloh4:
	ldr	w11, [x11]
	orr	w10, w10, w11
	str	w10, [x22, #8]
LBB0_19:
	cmp	w21, #1
	b.lt	LBB0_24
; %bb.20:
	ldr	x12, [x8, #8]
	ldr	x13, [x12, x24, lsl #3]
	ldr	x14, [x8, #32]
	ldr	x11, [x20, #8]
	ldr	w11, [x11, #8]
	sub	w15, w23, w11
	sxtw	x11, w15
	ldr	x14, [x14, w15, sxtw #3]
	ldr	x12, [x12, x14, lsl #3]
	cmp	x13, x12
	b.eq	LBB0_22
; %bb.21:
Lloh5:
	adrp	x12, _BOUNDARY_UPPER_TILE@GOTPAGE
Lloh6:
	ldr	x12, [x12, _BOUNDARY_UPPER_TILE@GOTPAGEOFF]
Lloh7:
	ldr	w12, [x12]
	orr	w10, w10, w12
	str	w10, [x22, #8]
LBB0_22:
	ldr	x12, [x20]
	ldr	x13, [x12, x23, lsl #3]
	ldr	x11, [x12, x11, lsl #3]
	cmp	x13, x11
	b.eq	LBB0_24
LBB0_23:
Lloh8:
	adrp	x11, _BOUNDARY_UPPER_SLICE@GOTPAGE
Lloh9:
	ldr	x11, [x11, _BOUNDARY_UPPER_SLICE@GOTPAGEOFF]
Lloh10:
	ldr	w11, [x11]
	orr	w10, w10, w11
	str	w10, [x22, #8]
LBB0_24:
	cmp	w19, #0
	ccmp	w25, #0, #4, gt
	cset	w11, gt
	ldr	w9, [x9]
	tst	w9, w10
	cset	w9, eq
	and	w9, w11, w9
	str	w9, [x22, #12]
	cmp	w21, #1
	b.lt	LBB0_27
; %bb.25:
	ldr	x9, [x20, #8]
	ldr	w9, [x9, #8]
Lloh11:
	adrp	x11, _BOUNDARY_UPPER_TILE@GOTPAGE
Lloh12:
	ldr	x11, [x11, _BOUNDARY_UPPER_TILE@GOTPAGEOFF]
Lloh13:
	ldr	w11, [x11]
	tst	w11, w10
	ccmp	w25, w9, #8, eq
	cset	w10, ge
	str	w10, [x22, #16]
	add	w10, w25, #1
	cmp	w10, w9
	b.ge	LBB0_28
; %bb.26:
	mov	w11, #0
	b	LBB0_29
LBB0_27:
	mov	w10, #0
	str	xzr, [x22, #16]
	b	LBB0_32
LBB0_28:
	ldr	x10, [x8, #8]
	ldr	x11, [x10, x24, lsl #3]
	ldr	x12, [x8, #32]
	sub	w13, w23, w9
	add	w13, w13, #1
	ldr	x12, [x12, w13, sxtw #3]
	ldr	x10, [x10, x12, lsl #3]
	cmp	x11, x10
	cset	w11, eq
LBB0_29:
	mov	w10, #0
	str	w11, [x22, #20]
	cmp	w19, #1
	b.lt	LBB0_32
; %bb.30:
	cmp	w25, w9
	b.le	LBB0_32
; %bb.31:
	ldr	x10, [x8, #8]
	ldr	x11, [x10, x24, lsl #3]
	ldr	x8, [x8, #32]
	mvn	w9, w9
	add	w9, w23, w9
	ldr	x8, [x8, w9, sxtw #3]
	ldr	x8, [x10, x8, lsl #3]
	cmp	x11, x8
	cset	w10, eq
LBB0_32:
	str	w10, [x22, #24]
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	ret
LBB0_33:
Lloh14:
	adrp	x10, _BOUNDARY_LEFT_SLICE@GOTPAGE
Lloh15:
	ldr	x10, [x10, _BOUNDARY_LEFT_SLICE@GOTPAGEOFF]
Lloh16:
	ldr	w10, [x10]
	str	w10, [x22, #8]
LBB0_34:
	ldr	x11, [x20, #8]
	ldr	w11, [x11, #8]
	cmp	w25, w11
	b.lt	LBB0_23
	b	LBB0_24
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.cfi_endproc
                                        ; -- End function
	.comm	_BOUNDARY_LEFT_TILE,4,2         ; @BOUNDARY_LEFT_TILE
	.comm	_BOUNDARY_LEFT_SLICE,4,2        ; @BOUNDARY_LEFT_SLICE
	.comm	_BOUNDARY_UPPER_TILE,4,2        ; @BOUNDARY_UPPER_TILE
	.comm	_BOUNDARY_UPPER_SLICE,4,2       ; @BOUNDARY_UPPER_SLICE
	.no_dead_strip	_hls_decode_neighbour
.subsections_via_symbols
