	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function go7007_motion_regions
_go7007_motion_regions:                 ## @go7007_motion_regions
	.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	$40, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %r14
	movq	%rdi, %r13
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	movq	(%rsi), %r15
	xorps	%xmm0, %xmm0
	movaps	%xmm0, -64(%rbp)
	movl	(%rdi), %eax
	addl	$7, %eax
	movl	%eax, -68(%rbp)                 ## 4-byte Spill
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_1:                                 ## =>This Inner Loop Header: Depth=1
	movq	8(%r13), %rax
	movl	(%rax,%rbx,4), %esi
	movq	%r14, %rdi
	callq	_store_byte
	incq	%rbx
	cmpq	$216, %rbx
	jne	LBB0_1
## %bb.2:
	movl	16(%r13), %eax
	leal	15(%rax), %r9d
	xorl	%edx, %edx
	cmpl	$31, %r9d
	jb	LBB0_11
## %bb.3:
	movq	%r15, -80(%rbp)                 ## 8-byte Spill
	sarl	$3, -68(%rbp)                   ## 4-byte Folded Spill
	testl	%eax, %eax
	cmovnsl	%eax, %r9d
	sarl	$4, %r9d
	movl	(%r13), %r10d
	leal	15(%r10), %r8d
	testl	%r10d, %r10d
	cmovsl	%r8d, %r10d
	sarl	$4, %r10d
	cmpl	$2, %r10d
	movl	$1, %eax
	movl	$1, %r12d
	cmovael	%r10d, %r12d
	cmpl	$2, %r9d
	cmovbl	%eax, %r9d
	xorl	%edi, %edi
	xorl	%r11d, %r11d
	jmp	LBB0_4
	.p2align	4, 0x90
LBB0_9:                                 ##   in Loop: Header=BB0_4 Depth=1
	incl	%r11d
	addq	%r10, %rdi
	cmpl	%r9d, %r11d
	je	LBB0_10
LBB0_4:                                 ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_6 Depth 2
	cmpl	$31, %r8d
	jb	LBB0_9
## %bb.5:                               ##   in Loop: Header=BB0_4 Depth=1
	movq	8(%r13), %rax
	movl	%r11d, %edx
	imull	-68(%rbp), %edx                 ## 4-byte Folded Reload
	xorl	%ecx, %ecx
	jmp	LBB0_6
	.p2align	4, 0x90
LBB0_8:                                 ##   in Loop: Header=BB0_6 Depth=2
	incq	%rcx
	cmpq	%rcx, %r12
	je	LBB0_9
LBB0_6:                                 ##   Parent Loop BB0_4 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movl	%ecx, %ebx
	shrl	$3, %ebx
	addl	%edx, %ebx
	movl	(%rax,%rbx,4), %ebx
	movl	%ecx, %r15d
	andb	$7, %r15b
	movzbl	%r15b, %esi
	btl	%esi, %ebx
	jae	LBB0_8
## %bb.7:                               ##   in Loop: Header=BB0_6 Depth=2
	movq	24(%r13), %rsi
	leal	(%rdi,%rcx), %ebx
	movq	(%rsi,%rbx,8), %rsi
	incl	-64(%rbp,%rsi,4)
	jmp	LBB0_8
LBB0_10:
	xorl	%eax, %eax
	cmpl	$0, -60(%rbp)
	setne	%al
	xorl	%ecx, %ecx
	cmpl	$0, -56(%rbp)
	setne	%cl
	xorl	%edx, %edx
	cmpl	$0, -52(%rbp)
	setne	%dl
	xorl	%esi, %esi
	cmpl	$0, -64(%rbp)
	setne	%sil
	leal	(%rsi,%rax,2), %eax
	leal	(%rax,%rcx,4), %eax
	leal	(%rax,%rdx,8), %edx
	movq	-80(%rbp), %r15                 ## 8-byte Reload
LBB0_11:
	addl	$-216, (%r15)
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-48(%rbp), %rax
	jne	LBB0_12
## %bb.13:
	movq	%r13, %rdi
	movq	%r14, %rsi
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_go7007_set_motion_regions      ## TAILCALL
LBB0_12:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.no_dead_strip	_go7007_motion_regions
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function go7007_motion_regions
_go7007_motion_regions:                 ; @go7007_motion_regions
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #96
	.cfi_def_cfa_offset 96
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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
	mov	x19, x1
	mov	x20, x0
	mov	x22, #0
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	str	x8, [sp, #24]
	ldr	x21, [x1]
	stp	xzr, xzr, [sp, #8]
	ldr	w8, [x0]
	add	w23, w8, #7
LBB0_1:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x20, #8]
	ldr	w1, [x8, x22]
	mov	x0, x19
	bl	_store_byte
	add	x22, x22, #4
	cmp	x22, #864
	b.ne	LBB0_1
; %bb.2:
	ldr	w11, [x20, #16]
	add	w12, w11, #15
	cmp	w12, #31
	b.hs	LBB0_4
; %bb.3:
	mov	w2, #0
	b	LBB0_12
LBB0_4:
	mov	x8, #0
	mov	w9, #0
	asr	w10, w23, #3
	cmp	w11, #0
	csel	w11, w12, w11, lt
	asr	w14, w11, #4
	ldr	w12, [x20]
	add	w11, w12, #15
	cmp	w12, #0
	csel	w12, w11, w12, lt
	asr	w12, w12, #4
	cmp	w12, #1
	csinc	w13, w12, wzr, hi
	cmp	w14, #1
	csinc	w14, w14, wzr, hi
	add	x15, sp, #8
	b	LBB0_6
LBB0_5:                                 ;   in Loop: Header=BB0_6 Depth=1
	add	w9, w9, #1
	add	x8, x8, x12
	cmp	w9, w14
	b.eq	LBB0_11
LBB0_6:                                 ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_9 Depth 2
	cmp	w11, #31
	b.lo	LBB0_5
; %bb.7:                                ;   in Loop: Header=BB0_6 Depth=1
	mov	x16, #0
	ldr	x17, [x20, #8]
	mul	w0, w9, w10
	b	LBB0_9
LBB0_8:                                 ;   in Loop: Header=BB0_9 Depth=2
	add	x16, x16, #1
	cmp	x13, x16
	b.eq	LBB0_5
LBB0_9:                                 ;   Parent Loop BB0_6 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	add	w1, w0, w16, lsr #3
	ldr	w1, [x17, w1, uxtw #2]
	and	w2, w16, #0x7
	lsr	w1, w1, w2
	tbz	w1, #0, LBB0_8
; %bb.10:                               ;   in Loop: Header=BB0_9 Depth=2
	ldr	x1, [x20, #24]
	add	w2, w8, w16
	ldr	x1, [x1, w2, uxtw #3]
	lsl	x1, x1, #2
	ldr	w2, [x15, x1]
	add	w2, w2, #1
	str	w2, [x15, x1]
	b	LBB0_8
LBB0_11:
	ldp	w8, w9, [sp, #8]
	cmp	w9, #0
	cset	w9, ne
	ldp	w10, w11, [sp, #16]
	cmp	w10, #0
	cset	w10, ne
	cmp	w11, #0
	cset	w11, ne
	cmp	w8, #0
	cset	w2, ne
	bfi	w2, w9, #1, #1
	bfi	w2, w10, #2, #1
	bfi	w2, w11, #3, #1
LBB0_12:
	ldr	w8, [x21]
	sub	w8, w8, #216
	str	w8, [x21]
	ldr	x8, [sp, #24]
Lloh3:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh4:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh5:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_14
; %bb.13:
	mov	x0, x20
	mov	x1, x19
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #96
	b	_go7007_set_motion_regions
LBB0_14:
	bl	___stack_chk_fail
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.cfi_endproc
                                        ; -- End function
	.no_dead_strip	_go7007_motion_regions
.subsections_via_symbols
