	.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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	testq	%rdi, %rdi
	jle	LBB0_1
## %bb.2:
	movq	%rdi, %r15
	movq	_mod_period@GOTPCREL(%rip), %r14
	movq	(%r14), %rax
	cmpq	%rdi, 568(%rax)
	jle	LBB0_5
## %bb.3:
	cmpl	$4, %ecx
	je	LBB0_9
## %bb.4:
	leaq	L_.str(%rip), %rdi
	jmp	LBB0_8
LBB0_1:
	movl	$-1, %eax
	jmp	LBB0_24
LBB0_5:
	cmpl	$4, %ecx
	je	LBB0_9
## %bb.6:
	cmpq	%r15, (%rax)
	jge	LBB0_9
## %bb.7:
	leaq	L_.str.1(%rip), %rdi
LBB0_8:
	callq	_printf
LBB0_9:
	movq	(%r14), %r10
	movl	$5, %eax
	.p2align	4, 0x90
LBB0_10:                                ## =>This Inner Loop Header: Depth=1
	cmpq	%r15, -40(%r10,%rax,8)
	je	LBB0_19
## %bb.11:                              ##   in Loop: Header=BB0_10 Depth=1
	cmpq	%r15, -32(%r10,%rax,8)
	je	LBB0_23
## %bb.12:                              ##   in Loop: Header=BB0_10 Depth=1
	cmpq	%r15, -24(%r10,%rax,8)
	je	LBB0_20
## %bb.13:                              ##   in Loop: Header=BB0_10 Depth=1
	cmpq	%r15, -16(%r10,%rax,8)
	je	LBB0_21
## %bb.14:                              ##   in Loop: Header=BB0_10 Depth=1
	cmpq	%r15, -8(%r10,%rax,8)
	je	LBB0_22
## %bb.15:                              ##   in Loop: Header=BB0_10 Depth=1
	cmpq	%r15, (%r10,%rax,8)
	je	LBB0_24
## %bb.16:                              ##   in Loop: Header=BB0_10 Depth=1
	addq	$6, %rax
	cmpq	$77, %rax
	jne	LBB0_10
## %bb.17:
	movl	$65535, %edx                    ## imm = 0xFFFF
	xorl	%esi, %esi
	xorl	%eax, %eax
	.p2align	4, 0x90
LBB0_18:                                ## =>This Inner Loop Header: Depth=1
	movq	(%r10,%rsi,8), %r9
	movq	8(%r10,%rsi,8), %r8
	movl	%r15d, %edi
	subl	%r9d, %edi
	movl	%edi, %ecx
	negl	%ecx
	cmovsl	%edi, %ecx
	movl	%r15d, %ebx
	subl	%edx, %ebx
	movl	%ebx, %edi
	negl	%edi
	cmovsl	%ebx, %edi
	cmpl	%edi, %ecx
	cmovbq	%r9, %rdx
	cmovbl	%esi, %eax
	movl	%r15d, %ecx
	subl	%r8d, %ecx
	movl	%ecx, %edi
	negl	%edi
	cmovsl	%ecx, %edi
	movl	%r15d, %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_18
	jmp	LBB0_24
LBB0_19:
	addq	$-5, %rax
	jmp	LBB0_24
LBB0_23:
	addq	$-4, %rax
	jmp	LBB0_24
LBB0_20:
	addq	$-3, %rax
	jmp	LBB0_24
LBB0_21:
	addq	$-2, %rax
	jmp	LBB0_24
LBB0_22:
	decq	%rax
LBB0_24:
                                        ## kill: def $eax killed $eax killed $rax
	addq	$8, %rsp
	popq	%rbx
	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	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	cmp	x0, #1
	b.lt	LBB0_4
; %bb.1:
	mov	x19, x0
Lloh0:
	adrp	x20, _mod_period@GOTPAGE
Lloh1:
	ldr	x20, [x20, _mod_period@GOTPAGEOFF]
	ldr	x8, [x20]
	ldr	x9, [x8, #568]
	cmp	x9, x0
	b.le	LBB0_5
; %bb.2:
	cmp	w3, #4
	b.eq	LBB0_9
; %bb.3:
Lloh2:
	adrp	x0, l_.str@PAGE
Lloh3:
	add	x0, x0, l_.str@PAGEOFF
	b	LBB0_8
LBB0_4:
	mov	w0, #-1
	b	LBB0_14
LBB0_5:
	cmp	w3, #4
	b.eq	LBB0_9
; %bb.6:
	ldr	x8, [x8]
	cmp	x8, x19
	b.ge	LBB0_9
; %bb.7:
Lloh4:
	adrp	x0, l_.str.1@PAGE
Lloh5:
	add	x0, x0, l_.str.1@PAGEOFF
LBB0_8:
	bl	_printf
LBB0_9:
	mov	x0, #0
	ldr	x8, [x20]
LBB0_10:                                ; =>This Inner Loop Header: Depth=1
	ldr	x9, [x8, x0, lsl #3]
	cmp	x9, x19
	b.eq	LBB0_14
; %bb.11:                               ;   in Loop: Header=BB0_10 Depth=1
	add	x0, x0, #1
	cmp	x0, #72
	b.ne	LBB0_10
; %bb.12:
	mov	x9, #0
	mov	w0, #0
	mov	w10, #65535
LBB0_13:                                ; =>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_13
LBB0_14:
                                        ; kill: def $w0 killed $w0 killed $x0
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 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
