	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_mod_get_index_from_period      ## -- Begin function mod_get_index_from_period
	.p2align	4, 0x90
_mod_get_index_from_period:             ## @mod_get_index_from_period
	.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
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	testq	%rdi, %rdi
	jle	LBB0_1
## %bb.2:
	movl	%ecx, %r14d
	movl	%edx, %r15d
	movl	%esi, %r12d
	movq	%rdi, %r13
	movq	_mod_period@GOTPCREL(%rip), %rbx
	movq	(%rbx), %r9
	cmpl	$4, %ecx
	je	LBB0_5
## %bb.3:
	cmpq	%r13, 568(%r9)
	jle	LBB0_5
## %bb.4:
	leaq	L_.str(%rip), %rdi
	movl	%r12d, %esi
	movl	%r15d, %edx
	movl	%r14d, %ecx
	callq	_printf
	movq	(%rbx), %r9
LBB0_5:
	cmpl	$4, %r14d
	je	LBB0_8
## %bb.6:
	cmpq	%r13, (%r9)
	jge	LBB0_8
## %bb.7:
	leaq	L_.str.1(%rip), %rdi
	movl	%r12d, %esi
	movl	%r15d, %edx
	movl	%r14d, %ecx
	callq	_printf
	movq	(%rbx), %r9
LBB0_8:
	movl	$5, %eax
	.p2align	4, 0x90
LBB0_9:                                 ## =>This Inner Loop Header: Depth=1
	cmpq	%r13, -40(%r9,%rax,8)
	je	LBB0_18
## %bb.10:                              ##   in Loop: Header=BB0_9 Depth=1
	cmpq	%r13, -32(%r9,%rax,8)
	je	LBB0_22
## %bb.11:                              ##   in Loop: Header=BB0_9 Depth=1
	cmpq	%r13, -24(%r9,%rax,8)
	je	LBB0_19
## %bb.12:                              ##   in Loop: Header=BB0_9 Depth=1
	cmpq	%r13, -16(%r9,%rax,8)
	je	LBB0_20
## %bb.13:                              ##   in Loop: Header=BB0_9 Depth=1
	cmpq	%r13, -8(%r9,%rax,8)
	je	LBB0_21
## %bb.14:                              ##   in Loop: Header=BB0_9 Depth=1
	cmpq	%r13, (%r9,%rax,8)
	je	LBB0_23
## %bb.15:                              ##   in Loop: Header=BB0_9 Depth=1
	addq	$6, %rax
	cmpq	$77, %rax
	jne	LBB0_9
## %bb.16:
	movl	$65535, %edx                    ## imm = 0xFFFF
	xorl	%esi, %esi
	xorl	%eax, %eax
	.p2align	4, 0x90
LBB0_17:                                ## =>This Inner Loop Header: Depth=1
	movq	(%r9,%rsi,8), %r10
	movq	8(%r9,%rsi,8), %r8
	movl	%r13d, %ecx
	subl	%r10d, %ecx
	movl	%ecx, %ebx
	negl	%ebx
	cmovsl	%ecx, %ebx
	movl	%r13d, %edi
	subl	%edx, %edi
	movl	%edi, %ecx
	negl	%ecx
	cmovsl	%edi, %ecx
	cmpl	%ecx, %ebx
	cmovbq	%r10, %rdx
	cmovbl	%esi, %eax
	movl	%r13d, %ecx
	subl	%r8d, %ecx
	movl	%ecx, %edi
	negl	%edi
	cmovsl	%ecx, %edi
	movl	%r13d, %ebx
	subl	%edx, %ebx
	movl	%ebx, %ecx
	negl	%ecx
	cmovsl	%ebx, %ecx
	leal	1(%rsi), %ebx
	cmpl	%ecx, %edi
	cmovbq	%r8, %rdx
	cmovbl	%ebx, %eax
	addq	$2, %rsi
	cmpq	$72, %rsi
	jne	LBB0_17
	jmp	LBB0_23
LBB0_1:
	movl	$-1, %eax
	jmp	LBB0_23
LBB0_18:
	addq	$-5, %rax
	jmp	LBB0_23
LBB0_22:
	addq	$-4, %rax
	jmp	LBB0_23
LBB0_19:
	addq	$-3, %rax
	jmp	LBB0_23
LBB0_20:
	addq	$-2, %rax
	jmp	LBB0_23
LBB0_21:
	decq	%rax
LBB0_23:
                                        ## kill: def $eax killed $eax killed $rax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_mod_period,8,3                 ## @mod_period
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"\nPattern %d, Step %d, Channel %d. Note too high!\n"

L_.str.1:                               ## @.str.1
	.asciz	"\nPattern %d, Step %d, Channel %d. Note too low!\n"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_mod_get_index_from_period      ; -- Begin function mod_get_index_from_period
	.p2align	2
_mod_get_index_from_period:             ; @mod_get_index_from_period
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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
	cmp	x0, #1
	b.lt	LBB0_12
; %bb.1:
	mov	x20, x3
	mov	x21, x2
	mov	x22, x1
	mov	x19, x0
Lloh0:
	adrp	x23, _mod_period@GOTPAGE
Lloh1:
	ldr	x23, [x23, _mod_period@GOTPAGEOFF]
	ldr	x8, [x23]
	cmp	w3, #4
	b.eq	LBB0_4
; %bb.2:
	ldr	x9, [x8, #568]
	cmp	x9, x19
	b.le	LBB0_4
; %bb.3:
Lloh2:
	adrp	x0, l_.str@PAGE
Lloh3:
	add	x0, x0, l_.str@PAGEOFF
	mov	x1, x22
	mov	x2, x21
	mov	x3, x20
	bl	_printf
	ldr	x8, [x23]
LBB0_4:
	cmp	w20, #4
	b.eq	LBB0_7
; %bb.5:
	ldr	x9, [x8]
	cmp	x9, x19
	b.ge	LBB0_7
; %bb.6:
Lloh4:
	adrp	x0, l_.str.1@PAGE
Lloh5:
	add	x0, x0, l_.str.1@PAGEOFF
	mov	x1, x22
	mov	x2, x21
	mov	x3, x20
	bl	_printf
	ldr	x8, [x23]
LBB0_7:
	mov	x0, #0
LBB0_8:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x9, [x8, x0, lsl #3]
	cmp	x9, x19
	b.eq	LBB0_13
; %bb.9:                                ;   in Loop: Header=BB0_8 Depth=1
	add	x0, x0, #1
	cmp	x0, #72
	b.ne	LBB0_8
; %bb.10:
	mov	x9, #0
	mov	w0, #0
	mov	w10, #65535
LBB0_11:                                ; =>This Inner Loop Header: Depth=1
	ldr	x11, [x8, x9, lsl #3]
	subs	w12, w19, w11
	cneg	w12, w12, mi
	subs	w13, w19, w10
	cneg	w13, w13, mi
	cmp	w12, w13
	csel	w0, w9, w0, lo
	csel	x10, x11, x10, lo
	add	x9, x9, #1
	cmp	x9, #72
	b.ne	LBB0_11
	b	LBB0_13
LBB0_12:
	mov	w0, #-1
LBB0_13:
                                        ; kill: def $w0 killed $w0 killed $x0
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpAdd	Lloh4, Lloh5
	.cfi_endproc
                                        ; -- End function
	.comm	_mod_period,8,3                 ; @mod_period
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"\nPattern %d, Step %d, Channel %d. Note too high!\n"

l_.str.1:                               ; @.str.1
	.asciz	"\nPattern %d, Step %d, Channel %d. Note too low!\n"

.subsections_via_symbols
