	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function gx_validate_speed
_gx_validate_speed:                     ## @gx_validate_speed
	.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	_stock_freq@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -44(%rbp)                 ## 4-byte Spill
	movq	%rdx, -72(%rbp)                 ## 8-byte Spill
	movl	$1, (%rdx)
	movq	%rsi, -64(%rbp)                 ## 8-byte Spill
	movl	$0, (%rsi)
	movq	_max_duration@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	testl	%ebx, %ebx
	je	LBB0_5
## %bb.1:
	movl	%edi, %r12d
	movl	%ebx, %r14d
	imull	%edi, %r14d
	movl	%edi, -48(%rbp)                 ## 4-byte Spill
	jmp	LBB0_2
	.p2align	4, 0x90
LBB0_4:                                 ##   in Loop: Header=BB0_2 Depth=1
	movl	-48(%rbp), %r12d                ## 4-byte Reload
	subl	%r12d, %r14d
	decl	%ebx
	je	LBB0_5
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	movq	_stock_freq@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movl	%r14d, %eax
	xorl	%edx, %edx
	divl	%ecx
	movzbl	%al, %r13d
	imull	%r13d, %ecx
	movl	%ecx, %eax
	xorl	%edx, %edx
	divl	%ebx
	movl	%eax, -52(%rbp)                 ## 4-byte Spill
	movl	%eax, %edi
	subl	%r12d, %edi
	callq	_abs
	movq	%rax, %r15
	movl	-44(%rbp), %edi                 ## 4-byte Reload
	subl	%r12d, %edi
	callq	_abs
	cmpq	%rax, %r15
	jg	LBB0_4
## %bb.3:                               ##   in Loop: Header=BB0_2 Depth=1
	movl	%ebx, %eax
	subl	%r13d, %eax
	movq	-64(%rbp), %rcx                 ## 8-byte Reload
	movl	%eax, (%rcx)
	movq	-72(%rbp), %rax                 ## 8-byte Reload
	movl	%r13d, (%rax)
	movl	-52(%rbp), %eax                 ## 4-byte Reload
	movl	%eax, -44(%rbp)                 ## 4-byte Spill
	jmp	LBB0_4
LBB0_5:
	movl	-44(%rbp), %eax                 ## 4-byte Reload
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_stock_freq,4,2                 ## @stock_freq
	.comm	_max_duration,4,2               ## @max_duration
	.no_dead_strip	_gx_validate_speed
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function gx_validate_speed
_gx_validate_speed:                     ; @gx_validate_speed
	.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
Lloh0:
	adrp	x24, _stock_freq@GOTPAGE
Lloh1:
	ldr	x24, [x24, _stock_freq@GOTPAGEOFF]
	ldr	w22, [x24]
	mov	w8, #1
	str	w8, [x2]
	str	wzr, [x1]
Lloh2:
	adrp	x8, _max_duration@GOTPAGE
Lloh3:
	ldr	x8, [x8, _max_duration@GOTPAGEOFF]
Lloh4:
	ldr	w25, [x8]
	cbz	w25, LBB0_5
; %bb.1:
	mov	x19, x2
	mov	x20, x1
	mov	x21, x0
	mul	w26, w25, w0
	b	LBB0_3
LBB0_2:                                 ;   in Loop: Header=BB0_3 Depth=1
	sub	w26, w26, w21
	sub	w25, w25, #1
	cbz	w25, LBB0_5
LBB0_3:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w8, [x24]
	udiv	w9, w26, w8
	and	w27, w9, #0xff
	mul	w8, w27, w8
	udiv	w28, w8, w25
	sub	w0, w28, w21
	bl	_abs
	mov	x23, x0
	sub	w0, w22, w21
	bl	_abs
	cmp	x23, x0
	b.gt	LBB0_2
; %bb.4:                                ;   in Loop: Header=BB0_3 Depth=1
	sub	w8, w25, w27
	str	w8, [x20]
	str	w27, [x19]
	mov	x22, x28
	b	LBB0_2
LBB0_5:
	mov	x0, x22
	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
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh0, Lloh1
	.cfi_endproc
                                        ; -- End function
	.comm	_stock_freq,4,2                 ; @stock_freq
	.comm	_max_duration,4,2               ; @max_duration
	.no_dead_strip	_gx_validate_speed
.subsections_via_symbols
