	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function find_plane_mid
_find_plane_mid:                        ## @find_plane_mid
	.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	%esi, %r12d
	movq	%rdi, %r14
	movl	(%rdi), %ebx
	movl	4(%rdi), %r15d
	movl	%ebx, %r13d
	shrl	$31, %r13d
	addl	%ebx, %r13d
	sarl	%r13d
	movl	%r15d, %edx
	shrl	$31, %edx
	addl	%r15d, %edx
	sarl	%edx
	movq	8(%rdi), %rax
	movq	%rax, -64(%rbp)                 ## 8-byte Spill
	movl	%r13d, %esi
	movq	%rdx, -72(%rbp)                 ## 8-byte Spill
                                        ## kill: def $edx killed $edx killed $rdx
	movl	%r12d, %ecx
	callq	_good_xy_ring
	testq	%rax, %rax
	je	LBB0_2
## %bb.1:
	movq	-72(%rbp), %rcx                 ## 8-byte Reload
LBB0_7:
	movq	-64(%rbp), %rdx                 ## 8-byte Reload
	movslq	%r13d, %rax
	movq	(%rdx,%rax,8), %rax
	movslq	%ecx, %rcx
	movq	(%rax,%rcx,8), %rax
	movslq	%r12d, %rcx
	movq	(%rax,%rcx,8), %rax
LBB0_8:
	movq	%rax, -56(%rbp)                 ## 8-byte Spill
LBB0_13:
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	addq	$56, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_2:
	xorl	%eax, %eax
	cmpl	$2, %ebx
	jl	LBB0_8
## %bb.3:
	movq	%rax, -56(%rbp)                 ## 8-byte Spill
	movl	%r12d, -44(%rbp)                ## 4-byte Spill
	cmpl	$2, %r15d
	movq	-72(%rbp), %r12                 ## 8-byte Reload
	jl	LBB0_13
## %bb.4:
	movq	%r14, %r15
	movl	$1, %ecx
	movl	$-1, %ebx
	xorl	%eax, %eax
	movq	%rax, -56(%rbp)                 ## 8-byte Spill
	movq	%r13, -80(%rbp)                 ## 8-byte Spill
	.p2align	4, 0x90
LBB0_5:                                 ## =>This Inner Loop Header: Depth=1
	movq	%rcx, -96(%rbp)                 ## 8-byte Spill
	leal	(%rbx,%r13), %edi
	movl	(%r15), %esi
	callq	_canonicalize
	movl	%eax, %r13d
	movq	%rbx, -88(%rbp)                 ## 8-byte Spill
	leal	(%r12,%rbx), %edi
	movl	4(%r15), %esi
	callq	_canonicalize
	movq	%r12, %r14
	movl	%eax, %ebx
	movq	%r15, %rdi
	movl	%r13d, %esi
	movl	%eax, %edx
	movl	-44(%rbp), %r12d                ## 4-byte Reload
	movl	%r12d, %ecx
	callq	_good_xy_ring
	testq	%rax, %rax
	jne	LBB0_6
## %bb.9:                               ##   in Loop: Header=BB0_5 Depth=1
	movq	-96(%rbp), %rbx                 ## 8-byte Reload
	movq	-80(%rbp), %rax                 ## 8-byte Reload
	leal	(%rax,%rbx), %edi
	movl	(%r15), %esi
	callq	_canonicalize
	movl	%eax, %r13d
	leal	(%r14,%rbx), %edi
	movq	%rbx, %r14
	movl	4(%r15), %esi
	callq	_canonicalize
	movl	%eax, %ebx
	movq	%r15, %rdi
	movl	%r13d, %esi
	movl	%eax, %edx
	movl	%r12d, %ecx
	callq	_good_xy_ring
	testq	%rax, %rax
	jne	LBB0_10
## %bb.11:                              ##   in Loop: Header=BB0_5 Depth=1
	movq	-80(%rbp), %r13                 ## 8-byte Reload
	cmpl	%r14d, %r13d
	jle	LBB0_13
## %bb.12:                              ##   in Loop: Header=BB0_5 Depth=1
	leal	1(%r14), %eax
	movq	-88(%rbp), %rbx                 ## 8-byte Reload
	decl	%ebx
	movq	-72(%rbp), %r12                 ## 8-byte Reload
	cmpl	%r14d, %r12d
	movl	%eax, %ecx
	jg	LBB0_5
	jmp	LBB0_13
LBB0_6:
                                        ## kill: def $r13d killed $r13d def $r13
	movl	%ebx, %ecx
	jmp	LBB0_7
LBB0_10:
                                        ## kill: def $r13d killed $r13d def $r13
	movl	%ebx, %ecx
	movl	-44(%rbp), %r12d                ## 4-byte Reload
	jmp	LBB0_7
	.cfi_endproc
                                        ## -- End function
	.no_dead_strip	_find_plane_mid
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function find_plane_mid
_find_plane_mid:                        ; @find_plane_mid
	.cfi_startproc
; %bb.0:
	stp	x28, x27, [sp, #-96]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	mov	x19, x1
	mov	x22, x0
	ldp	w23, w24, [x0]
	cmp	w23, #0
	cinc	w8, w23, lt
	asr	w20, w8, #1
	cmp	w24, #0
	cinc	w8, w24, lt
	asr	w21, w8, #1
	ldr	x25, [x0, #8]
	mov	x1, x20
	mov	x2, x21
	mov	x3, x19
	bl	_good_xy_ring
	cbz	x0, LBB0_3
LBB0_1:
	ldr	x8, [x25, w20, sxtw #3]
	ldr	x8, [x8, w21, sxtw #3]
	ldr	x0, [x8, w19, sxtw #3]
LBB0_2:
	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
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp], #96             ; 16-byte Folded Reload
	ret
LBB0_3:
	cmp	w23, #2
	ccmp	w24, #2, #8, ge
	b.ge	LBB0_5
; %bb.4:
	mov	x0, #0
	b	LBB0_2
LBB0_5:
	mov	w27, #1
	mov	w26, #-1
LBB0_6:                                 ; =>This Inner Loop Header: Depth=1
	add	w0, w20, w26
	ldr	w1, [x22]
	bl	_canonicalize
	mov	x23, x0
	add	w0, w21, w26
	ldr	w1, [x22, #4]
	bl	_canonicalize
	mov	x24, x0
	mov	x0, x22
	mov	x1, x23
	mov	x2, x24
	mov	x3, x19
	bl	_good_xy_ring
	cbnz	x0, LBB0_10
; %bb.7:                                ;   in Loop: Header=BB0_6 Depth=1
	add	w0, w20, w27
	ldr	w1, [x22]
	bl	_canonicalize
	mov	x23, x0
	add	w0, w21, w27
	ldr	w1, [x22, #4]
	bl	_canonicalize
	mov	x24, x0
	mov	x0, x22
	mov	x1, x23
	mov	x2, x24
	mov	x3, x19
	bl	_good_xy_ring
	cbnz	x0, LBB0_10
; %bb.8:                                ;   in Loop: Header=BB0_6 Depth=1
	cmp	w20, w27
	b.le	LBB0_2
; %bb.9:                                ;   in Loop: Header=BB0_6 Depth=1
	add	w8, w27, #1
	sub	w26, w26, #1
	cmp	w21, w27
	mov	x27, x8
	b.gt	LBB0_6
	b	LBB0_2
LBB0_10:
	mov	x20, x23
	mov	x21, x24
	b	LBB0_1
	.cfi_endproc
                                        ; -- End function
	.no_dead_strip	_find_plane_mid
.subsections_via_symbols
