	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function get_best_ratio
_get_best_ratio:                        ## @get_best_ratio
	.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
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%edx, %r8d
	movl	(%rdi), %eax
	movl	(%rsi), %r9d
	movabsq	$4294967296, %rdx               ## imm = 0x100000000
	movq	%rdx, -40(%rbp)
	movq	$1, -32(%rbp)
	testl	%r9d, %r9d
	je	LBB0_1
## %bb.2:
	movl	$1, %r10d
	xorl	%r11d, %r11d
	movl	$1, %r14d
	movl	$1, %ebx
	.p2align	4, 0x90
LBB0_3:                                 ## =>This Inner Loop Header: Depth=1
	cltd
	idivl	%r9d
	xorl	$1, %ebx
	imull	%eax, %r10d
	addl	-40(%rbp,%rbx,4), %r10d
	movl	%r10d, -40(%rbp,%rbx,4)
	imull	%eax, %r11d
	addl	-32(%rbp,%rbx,4), %r11d
	movl	%r11d, -32(%rbp,%rbx,4)
	movl	%r14d, %r15d
	cmpl	%r8d, %r10d
	jg	LBB0_6
## %bb.4:                               ##   in Loop: Header=BB0_3 Depth=1
	cmpl	%ecx, %r11d
	jg	LBB0_6
## %bb.5:                               ##   in Loop: Header=BB0_3 Depth=1
	movl	%ebx, %r14d
	movl	%r9d, %eax
	movl	%edx, %r9d
	movl	%ebx, %r15d
	testl	%edx, %edx
	jne	LBB0_3
LBB0_6:
	movl	%r15d, %ecx
	movl	-40(%rbp,%rcx,4), %eax
	movl	-32(%rbp,%rcx,4), %ecx
	jmp	LBB0_7
LBB0_1:
	movl	$1, %eax
	xorl	%ecx, %ecx
LBB0_7:
	movl	%eax, (%rdi)
	movl	%ecx, (%rsi)
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.no_dead_strip	_get_best_ratio
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function get_best_ratio
_get_best_ratio:                        ; @get_best_ratio
	.cfi_startproc
; %bb.0:
	ldr	w9, [x0]
	ldr	w8, [x1]
	mov	x11, #4294967296
	mov	w10, #1
	stp	x10, x11, [sp, #-16]!
	.cfi_def_cfa_offset 16
	cbz	w8, LBB0_5
; %bb.1:
	mov	w10, #0
	mov	w11, #1
	add	x12, sp, #8
	mov	x13, sp
	mov	w14, #1
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	eor	w15, w14, #0x1
	lsl	x17, x15, #2
	ldr	w4, [x12, x17]
	sdiv	w16, w9, w8
	madd	w11, w11, w16, w4
	str	w11, [x12, x17]
	ldr	w4, [x13, x17]
	madd	w10, w10, w16, w4
	str	w10, [x13, x17]
	cmp	w11, w2
	ccmp	w10, w3, #0, le
	b.gt	LBB0_4
; %bb.3:                                ;   in Loop: Header=BB0_2 Depth=1
	msub	w16, w16, w8, w9
	mov	x14, x15
	mov	x9, x8
	mov	x8, x16
	cbnz	w16, LBB0_2
LBB0_4:
	mov	w8, w14
	lsl	x8, x8, #2
	add	x9, sp, #8
	ldr	w10, [x9, x8]
	mov	x9, sp
	ldr	w8, [x9, x8]
LBB0_5:
	str	w10, [x0]
	str	w8, [x1]
	add	sp, sp, #16
	ret
	.cfi_endproc
                                        ; -- End function
	.no_dead_strip	_get_best_ratio
.subsections_via_symbols
