	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function do_get_rate
_do_get_rate:                           ## @do_get_rate
	.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	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%ecx, %r15d
	movq	%rsi, %r13
	movq	%rdi, %r14
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	leaq	1(%rsi), %rbx
	leaq	L_.str(%rip), %rsi
	leaq	-64(%rbp), %rdx
	leaq	-60(%rbp), %rcx
	movq	%rbx, %rdi
	xorl	%eax, %eax
	callq	_sscanf
	cmpl	$2, %eax
	jne	LBB0_4
## %bb.1:
	movl	-64(%rbp), %eax
	testq	%rax, %rax
	je	LBB0_11
## %bb.2:
	movl	-60(%rbp), %r12d
	testl	%r12d, %r12d
	jle	LBB0_11
## %bb.3:
	shlq	$32, %r12
	orq	%rax, %r12
	jmp	LBB0_7
LBB0_4:
	leaq	L_.str.1(%rip), %rsi
	leaq	-60(%rbp), %rdx
	movq	%rbx, %rdi
	xorl	%eax, %eax
	callq	_sscanf
	cmpl	$1, %eax
	jne	LBB0_11
## %bb.5:
	movl	-60(%rbp), %eax
	testl	%eax, %eax
	jle	LBB0_11
## %bb.6:
	movslq	%eax, %r12
LBB0_7:
	movsbl	(%r13), %edi
	callq	_get_sorting_mode
	movl	%eax, %ebx
	movsbl	(%r13), %ecx
	leaq	L_.str.2(%rip), %rsi
	movl	$4, %edi
	movl	%eax, %edx
	callq	_vkprintf
	testl	%ebx, %ebx
	js	LBB0_11
## %bb.8:
	movq	_MAX_RATES@GOTPCREL(%rip), %rax
	cmpl	(%rax), %ebx
	jge	LBB0_11
## %bb.9:
	leaq	-56(%rbp), %rdi
	movq	%r12, %rsi
	movl	%ebx, %edx
	callq	_get_single_rate
	testq	%rax, %rax
	je	LBB0_11
## %bb.10:
	movslq	%r15d, %rax
	subq	%rax, %r13
	movl	-56(%rbp), %edx
	leaq	_do_get_rate.value(%rip), %rbx
	leaq	L_.str.3(%rip), %rsi
	movq	%rbx, %rdi
	xorl	%eax, %eax
	callq	_sprintf
	jmp	LBB0_20
LBB0_11:
	leaq	L_.str.4(%rip), %rsi
	xorl	%r12d, %r12d
	leaq	-64(%rbp), %rdx
	leaq	-60(%rbp), %rcx
	movq	%r13, %rdi
	xorl	%eax, %eax
	callq	_sscanf
	cmpl	$2, %eax
	jne	LBB0_15
## %bb.12:
	movl	-64(%rbp), %eax
	testq	%rax, %rax
	je	LBB0_21
## %bb.13:
	movl	-60(%rbp), %esi
	testl	%esi, %esi
	jle	LBB0_21
## %bb.14:
	shlq	$32, %rsi
	orq	%rax, %rsi
	jmp	LBB0_18
LBB0_15:
	leaq	L_.str.5(%rip), %rsi
	leaq	-60(%rbp), %rdx
	movq	%r13, %rdi
	xorl	%eax, %eax
	callq	_sscanf
	cmpl	$1, %eax
	jne	LBB0_21
## %bb.16:
	movl	-60(%rbp), %eax
	testl	%eax, %eax
	jle	LBB0_21
## %bb.17:
	movslq	%eax, %rsi
LBB0_18:
	leaq	-56(%rbp), %rdi
	callq	_get_rates
	testq	%rax, %rax
	je	LBB0_21
## %bb.19:
	movslq	%r15d, %rax
	subq	%rax, %r13
	movl	-56(%rbp), %edx
	movl	-52(%rbp), %ecx
	leaq	_do_get_rate.value(%rip), %rbx
	leaq	L_.str.6(%rip), %rsi
	movq	%rbx, %rdi
	xorl	%eax, %eax
	callq	_sprintf
LBB0_20:
	movq	%r14, %rdi
	movq	%r13, %rsi
	movq	%rbx, %rdx
	movl	%eax, %ecx
	callq	_return_one_key
	movl	%eax, %r12d
LBB0_21:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-48(%rbp), %rax
	jne	LBB0_23
## %bb.22:
	movl	%r12d, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_23:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
.zerofill __DATA,__bss,_do_get_rate.value,32,4 ## @do_get_rate.value
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"ate%d_%d "

L_.str.1:                               ## @.str.1
	.asciz	"ate%d "

L_.str.2:                               ## @.str.2
	.asciz	"p = %d, *key = %c\n"

	.comm	_MAX_RATES,4,2                  ## @MAX_RATES
L_.str.3:                               ## @.str.3
	.asciz	"%d"

L_.str.4:                               ## @.str.4
	.asciz	"rates%d_%d "

L_.str.5:                               ## @.str.5
	.asciz	"rates%d "

L_.str.6:                               ## @.str.6
	.asciz	"%d,%d"

	.no_dead_strip	_do_get_rate
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function do_get_rate
_do_get_rate:                           ; @do_get_rate
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #96
	.cfi_def_cfa_offset 96
	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
	mov	x20, x3
	mov	x21, x1
	mov	x19, x0
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	str	x8, [sp, #24]
	add	x22, x1, #1
	add	x8, sp, #8
	str	x8, [sp]
Lloh3:
	adrp	x1, l_.str@PAGE
Lloh4:
	add	x1, x1, l_.str@PAGEOFF
	add	x2, sp, #12
	mov	x0, x22
	bl	_sscanf
	cmp	w0, #2
	b.ne	LBB0_3
; %bb.1:
	ldp	w8, w22, [sp, #8]
	cmp	w22, #0
	ccmp	w8, #1, #8, ne
	b.lt	LBB0_10
; %bb.2:
	bfi	x22, x8, #32, #32
	b	LBB0_6
LBB0_3:
Lloh5:
	adrp	x1, l_.str.1@PAGE
Lloh6:
	add	x1, x1, l_.str.1@PAGEOFF
	add	x2, sp, #8
	mov	x0, x22
	bl	_sscanf
	cmp	w0, #1
	b.ne	LBB0_10
; %bb.4:
	ldr	w8, [sp, #8]
	cmp	w8, #1
	b.lt	LBB0_10
; %bb.5:
	sxtw	x22, w8
LBB0_6:
	ldrsb	w0, [x21]
	bl	_get_sorting_mode
	mov	x23, x0
	ldrsb	w3, [x21]
Lloh7:
	adrp	x1, l_.str.2@PAGE
Lloh8:
	add	x1, x1, l_.str.2@PAGEOFF
	mov	w0, #4
	mov	x2, x23
	bl	_vkprintf
	tbnz	w23, #31, LBB0_10
; %bb.7:
Lloh9:
	adrp	x8, _MAX_RATES@GOTPAGE
Lloh10:
	ldr	x8, [x8, _MAX_RATES@GOTPAGEOFF]
Lloh11:
	ldr	w8, [x8]
	cmp	w23, w8
	b.ge	LBB0_10
; %bb.8:
	add	x0, sp, #16
	mov	x1, x22
	mov	x2, x23
	bl	_get_single_rate
	cbz	x0, LBB0_10
; %bb.9:
	sub	x20, x21, w20, sxtw
	ldr	w2, [sp, #16]
Lloh12:
	adrp	x21, _do_get_rate.value@PAGE
Lloh13:
	add	x21, x21, _do_get_rate.value@PAGEOFF
Lloh14:
	adrp	x1, l_.str.3@PAGE
Lloh15:
	add	x1, x1, l_.str.3@PAGEOFF
	b	LBB0_19
LBB0_10:
	add	x8, sp, #8
	str	x8, [sp]
Lloh16:
	adrp	x1, l_.str.4@PAGE
Lloh17:
	add	x1, x1, l_.str.4@PAGEOFF
	add	x2, sp, #12
	mov	x0, x21
	bl	_sscanf
	cmp	w0, #2
	b.ne	LBB0_14
; %bb.11:
	mov	w0, #0
	ldr	w1, [sp, #12]
	cbz	w1, LBB0_20
; %bb.12:
	ldr	w8, [sp, #8]
	cmp	w8, #1
	b.lt	LBB0_20
; %bb.13:
	bfi	x1, x8, #32, #32
	b	LBB0_17
LBB0_14:
Lloh18:
	adrp	x1, l_.str.5@PAGE
Lloh19:
	add	x1, x1, l_.str.5@PAGEOFF
	add	x2, sp, #8
	mov	x0, x21
	bl	_sscanf
	mov	x8, x0
	mov	w0, #0
	cmp	w8, #1
	b.ne	LBB0_20
; %bb.15:
	ldr	w8, [sp, #8]
	cmp	w8, #1
	b.lt	LBB0_20
; %bb.16:
	sxtw	x1, w8
LBB0_17:
	add	x0, sp, #16
	bl	_get_rates
	cbz	x0, LBB0_20
; %bb.18:
	sub	x20, x21, w20, sxtw
	ldp	w2, w8, [sp, #16]
Lloh20:
	adrp	x21, _do_get_rate.value@PAGE
Lloh21:
	add	x21, x21, _do_get_rate.value@PAGEOFF
	str	x8, [sp]
Lloh22:
	adrp	x1, l_.str.6@PAGE
Lloh23:
	add	x1, x1, l_.str.6@PAGEOFF
LBB0_19:
	mov	x0, x21
	bl	_sprintf
	mov	x3, x0
	mov	x0, x19
	mov	x1, x20
	mov	x2, x21
	bl	_return_one_key
LBB0_20:
	ldr	x8, [sp, #24]
Lloh24:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh25:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh26:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_22
; %bb.21:
	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
	add	sp, sp, #96
	ret
LBB0_22:
	bl	___stack_chk_fail
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpAdd	Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpAdd	Lloh14, Lloh15
	.loh AdrpAdd	Lloh12, Lloh13
	.loh AdrpAdd	Lloh16, Lloh17
	.loh AdrpAdd	Lloh18, Lloh19
	.loh AdrpAdd	Lloh22, Lloh23
	.loh AdrpAdd	Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh24, Lloh25, Lloh26
	.cfi_endproc
                                        ; -- End function
.zerofill __DATA,__bss,_do_get_rate.value,32,0 ; @do_get_rate.value
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"ate%d_%d "

l_.str.1:                               ; @.str.1
	.asciz	"ate%d "

l_.str.2:                               ; @.str.2
	.asciz	"p = %d, *key = %c\n"

	.comm	_MAX_RATES,4,2                  ; @MAX_RATES
l_.str.3:                               ; @.str.3
	.asciz	"%d"

l_.str.4:                               ; @.str.4
	.asciz	"rates%d_%d "

l_.str.5:                               ; @.str.5
	.asciz	"rates%d "

l_.str.6:                               ; @.str.6
	.asciz	"%d,%d"

	.no_dead_strip	_do_get_rate
.subsections_via_symbols
