	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function store_res
_store_res:                             ## @store_res
	.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
	movq	%rdi, -48(%rbp)                 ## 8-byte Spill
	movq	_n_ranges@GOTPCREL(%rip), %rbx
	movl	(%rbx), %edx
	leaq	L_.str(%rip), %rsi
	movl	$3, %edi
	xorl	%eax, %eax
	callq	_vkprintf
	cmpl	$0, (%rbx)
	jle	LBB0_5
## %bb.1:
	movq	_Q_range@GOTPCREL(%rip), %r13
	movq	(%r13), %rax
	leaq	L_.str.1(%rip), %r15
	xorl	%r14d, %r14d
	xorl	%r12d, %r12d
	.p2align	4, 0x90
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	movl	8(%rax,%r14), %esi
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	callq	_get_rate_item
	movl	%eax, %ebx
	movq	(%r13), %rax
	movl	(%rax,%r14), %ecx
	movl	4(%rax,%r14), %r8d
	movl	$3, %edi
	movq	%r15, %rsi
	movl	%ebx, %edx
	xorl	%eax, %eax
	callq	_vkprintf
	movq	(%r13), %rax
	cmpl	(%rax,%r14), %ebx
	jl	LBB0_31
## %bb.3:                               ##   in Loop: Header=BB0_2 Depth=1
	cmpl	4(%rax,%r14), %ebx
	jg	LBB0_31
## %bb.4:                               ##   in Loop: Header=BB0_2 Depth=1
	incq	%r12
	movq	_n_ranges@GOTPCREL(%rip), %rcx
	movslq	(%rcx), %rcx
	addq	$12, %r14
	cmpq	%rcx, %r12
	jl	LBB0_2
LBB0_5:
	movq	_R_tot@GOTPCREL(%rip), %rax
	incl	(%rax)
	movq	_Q_limit@GOTPCREL(%rip), %rbx
	movq	(%rbx), %rax
	testq	%rax, %rax
	jle	LBB0_31
## %bb.6:
	movq	_Q_type@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	movq	_MAX_RATES@GOTPCREL(%rip), %rdx
	cmpq	(%rdx), %rcx
	jne	LBB0_12
## %bb.7:
	movq	_Q_order@GOTPCREL(%rip), %rsi
	movq	_FLAG_REVERSE_SEARCH@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edi
	movq	_R_cnt@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rdx
	testl	%edi, (%rsi)
	je	LBB0_10
## %bb.8:
	cmpq	%rax, %rdx
	jne	LBB0_10
## %bb.9:
	movq	$0, (%rcx)
	xorl	%edx, %edx
LBB0_10:
	cmpq	%rax, %rdx
	jge	LBB0_31
## %bb.11:
	movq	_R@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	leaq	1(%rdx), %rsi
	movq	%rsi, (%rcx)
	movq	-48(%rbp), %rcx                 ## 8-byte Reload
	movq	%rcx, (%rax,%rdx,8)
	jmp	LBB0_31
LBB0_12:
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	callq	_evaluate_rating
	movq	_Q_order@GOTPCREL(%rip), %rcx
	movq	_FLAG_REVERSE_SEARCH@GOTPCREL(%rip), %rdx
	movl	(%rdx), %edx
	andl	(%rcx), %edx
	xorl	%r10d, %r10d
	negl	%edx
	sbbl	%r10d, %r10d
	xorl	%eax, %r10d
	movq	_R_cnt@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rax
	cmpq	(%rbx), %rax
	jne	LBB0_21
## %bb.13:
	movq	_RV@GOTPCREL(%rip), %r9
	movq	(%r9), %rsi
	cmpl	%r10d, 4(%rsi)
	jle	LBB0_31
## %bb.14:
	movl	$1, %r14d
	cmpq	$2, %rax
	jl	LBB0_29
## %bb.15:
	movl	$1, %r11d
	movl	$2, %edi
	movl	$2, %ecx
	movq	_R@GOTPCREL(%rip), %r8
	.p2align	4, 0x90
LBB0_16:                                ## =>This Inner Loop Header: Depth=1
	cmpq	%rcx, %rax
	jle	LBB0_18
## %bb.17:                              ##   in Loop: Header=BB0_16 Depth=1
	movl	%edi, %r14d
	orl	$1, %r14d
	movslq	%r14d, %rdx
	movl	(%rsi,%rdx,4), %edx
	cmpl	(%rsi,%rcx,4), %edx
	jg	LBB0_19
LBB0_18:                                ##   in Loop: Header=BB0_16 Depth=1
	movl	%edi, %r14d
LBB0_19:                                ##   in Loop: Header=BB0_16 Depth=1
	movslq	%r14d, %rdi
	cmpl	%r10d, (%rsi,%rdi,4)
	jle	LBB0_28
## %bb.20:                              ##   in Loop: Header=BB0_16 Depth=1
	movq	(%r8), %rcx
	movq	(%rcx,%rdi,8), %rdx
	movslq	%r11d, %rbx
	movq	%rdx, (%rcx,%rbx,8)
	movq	(%r9), %rsi
	movl	(%rsi,%rdi,4), %ecx
	movl	%ecx, (%rsi,%rbx,4)
	addl	%edi, %edi
	movslq	%edi, %rcx
	movl	%r14d, %r11d
	cmpq	%rcx, %rax
	jge	LBB0_16
	jmp	LBB0_29
LBB0_21:
	incq	%rax
	movq	%rax, (%rcx)
	cmpl	$2, %eax
	jl	LBB0_26
## %bb.22:
	movq	_RV@GOTPCREL(%rip), %rsi
	movq	(%rsi), %rdi
	movq	_R@GOTPCREL(%rip), %r8
	movl	%eax, %edx
	.p2align	4, 0x90
LBB0_23:                                ## =>This Inner Loop Header: Depth=1
	shrl	%edx
	cmpl	%r10d, (%rdi,%rdx,4)
	jge	LBB0_26
## %bb.24:                              ##   in Loop: Header=BB0_23 Depth=1
	movq	(%r8), %rdi
	movq	(%rdi,%rdx,8), %rbx
	movl	%eax, %ecx
	movq	%rbx, (%rdi,%rcx,8)
	movq	(%rsi), %rdi
	movl	(%rdi,%rdx,4), %ebx
	movl	%ebx, (%rdi,%rcx,4)
	cmpl	$3, %eax
	movl	%edx, %eax
	ja	LBB0_23
	jmp	LBB0_27
LBB0_26:
	movl	%eax, %edx
LBB0_27:
	movq	_R@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movslq	%edx, %rcx
	movq	-48(%rbp), %rdx                 ## 8-byte Reload
	movq	%rdx, (%rax,%rcx,8)
	movq	_RV@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	jmp	LBB0_30
LBB0_28:
	movl	%r11d, %r14d
LBB0_29:
	movq	_R@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movslq	%r14d, %rcx
	movq	-48(%rbp), %rdx                 ## 8-byte Reload
	movq	%rdx, (%rax,%rcx,8)
	movq	(%r9), %rax
LBB0_30:
	movl	%r10d, (%rax,%rcx,4)
LBB0_31:
	movl	$1, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"store_res!!, n_ranges = %d\n"

	.comm	_n_ranges,4,2                   ## @n_ranges
	.comm	_Q_range,8,3                    ## @Q_range
L_.str.1:                               ## @.str.1
	.asciz	"ranges: r0 = %d, Q_range[i].minr = %d, Q_range[i].maxr = %d\n"

	.comm	_R_tot,4,2                      ## @R_tot
	.comm	_Q_limit,8,3                    ## @Q_limit
	.comm	_Q_type,8,3                     ## @Q_type
	.comm	_MAX_RATES,8,3                  ## @MAX_RATES
	.comm	_Q_order,4,2                    ## @Q_order
	.comm	_FLAG_REVERSE_SEARCH,4,2        ## @FLAG_REVERSE_SEARCH
	.comm	_R_cnt,8,3                      ## @R_cnt
	.comm	_R,8,3                          ## @R
	.comm	_RV,8,3                         ## @RV
	.no_dead_strip	_store_res
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function store_res
_store_res:                             ; @store_res
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #96
	.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
	mov	x19, x0
Lloh0:
	adrp	x22, _n_ranges@GOTPAGE
Lloh1:
	ldr	x22, [x22, _n_ranges@GOTPAGEOFF]
	ldr	w2, [x22]
Lloh2:
	adrp	x1, l_.str@PAGE
Lloh3:
	add	x1, x1, l_.str@PAGEOFF
	mov	w0, #3
	bl	_vkprintf
	ldr	w8, [x22]
	cmp	w8, #1
	b.lt	LBB0_5
; %bb.1:
	mov	x23, #0
	mov	x24, #0
Lloh4:
	adrp	x25, _Q_range@GOTPAGE
Lloh5:
	ldr	x25, [x25, _Q_range@GOTPAGEOFF]
	ldr	x8, [x25]
Lloh6:
	adrp	x20, l_.str.1@PAGE
Lloh7:
	add	x20, x20, l_.str.1@PAGEOFF
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	add	x8, x8, x23
	ldr	w1, [x8, #8]
	mov	x0, x19
	bl	_get_rate_item
	mov	x21, x0
	ldr	x8, [x25]
	add	x8, x8, x23
	ldp	w9, w8, [x8]
	stp	x9, x8, [sp]
	mov	w0, #3
	mov	x1, x20
	mov	x2, x21
	bl	_vkprintf
	ldr	x8, [x25]
	ldr	w9, [x8, x23]
	cmp	w21, w9
	b.lt	LBB0_29
; %bb.3:                                ;   in Loop: Header=BB0_2 Depth=1
	add	x9, x8, x23
	ldr	w9, [x9, #4]
	cmp	w21, w9
	b.gt	LBB0_29
; %bb.4:                                ;   in Loop: Header=BB0_2 Depth=1
	add	x24, x24, #1
	ldrsw	x9, [x22]
	add	x23, x23, #12
	cmp	x24, x9
	b.lt	LBB0_2
LBB0_5:
Lloh8:
	adrp	x8, _R_tot@GOTPAGE
Lloh9:
	ldr	x8, [x8, _R_tot@GOTPAGEOFF]
	ldr	w9, [x8]
	add	w9, w9, #1
	str	w9, [x8]
Lloh10:
	adrp	x20, _Q_limit@GOTPAGE
Lloh11:
	ldr	x20, [x20, _Q_limit@GOTPAGEOFF]
	ldr	x8, [x20]
	cmp	x8, #1
	b.lt	LBB0_29
; %bb.6:
Lloh12:
	adrp	x9, _Q_type@GOTPAGE
Lloh13:
	ldr	x9, [x9, _Q_type@GOTPAGEOFF]
Lloh14:
	ldr	x9, [x9]
Lloh15:
	adrp	x10, _MAX_RATES@GOTPAGE
Lloh16:
	ldr	x10, [x10, _MAX_RATES@GOTPAGEOFF]
Lloh17:
	ldr	x10, [x10]
	cmp	x9, x10
	b.ne	LBB0_11
; %bb.7:
Lloh18:
	adrp	x9, _Q_order@GOTPAGE
Lloh19:
	ldr	x9, [x9, _Q_order@GOTPAGEOFF]
Lloh20:
	ldr	w9, [x9]
Lloh21:
	adrp	x10, _FLAG_REVERSE_SEARCH@GOTPAGE
Lloh22:
	ldr	x10, [x10, _FLAG_REVERSE_SEARCH@GOTPAGEOFF]
Lloh23:
	ldr	w10, [x10]
	and	w11, w10, w9
Lloh24:
	adrp	x9, _R_cnt@GOTPAGE
Lloh25:
	ldr	x9, [x9, _R_cnt@GOTPAGEOFF]
	ldr	x10, [x9]
	cmp	w11, #0
	ccmp	x10, x8, #0, ne
	b.ne	LBB0_9
; %bb.8:
	mov	x10, #0
	str	xzr, [x9]
LBB0_9:
	cmp	x10, x8
	b.ge	LBB0_29
; %bb.10:
Lloh26:
	adrp	x8, _R@GOTPAGE
Lloh27:
	ldr	x8, [x8, _R@GOTPAGEOFF]
Lloh28:
	ldr	x8, [x8]
	add	x11, x10, #1
	str	x11, [x9]
	str	x19, [x8, x10, lsl #3]
	b	LBB0_29
LBB0_11:
	mov	x0, x19
	bl	_evaluate_rating
Lloh29:
	adrp	x8, _Q_order@GOTPAGE
Lloh30:
	ldr	x8, [x8, _Q_order@GOTPAGEOFF]
Lloh31:
	ldr	w8, [x8]
Lloh32:
	adrp	x9, _FLAG_REVERSE_SEARCH@GOTPAGE
Lloh33:
	ldr	x9, [x9, _FLAG_REVERSE_SEARCH@GOTPAGEOFF]
Lloh34:
	ldr	w9, [x9]
	tst	w9, w8
	cinv	w8, w0, ne
Lloh35:
	adrp	x9, _R_cnt@GOTPAGE
Lloh36:
	ldr	x9, [x9, _R_cnt@GOTPAGEOFF]
	ldr	x10, [x9]
	ldr	x11, [x20]
	cmp	x10, x11
	b.ne	LBB0_15
; %bb.12:
Lloh37:
	adrp	x9, _RV@GOTPAGE
Lloh38:
	ldr	x9, [x9, _RV@GOTPAGEOFF]
	ldr	x11, [x9]
	ldr	w12, [x11, #4]
	cmp	w12, w8
	b.le	LBB0_29
; %bb.13:
	cmp	x10, #2
	b.ge	LBB0_21
; %bb.14:
	mov	w14, #1
	b	LBB0_28
LBB0_15:
	add	x11, x10, #1
	str	x11, [x9]
Lloh39:
	adrp	x9, _RV@GOTPAGE
Lloh40:
	ldr	x9, [x9, _RV@GOTPAGEOFF]
Lloh41:
	adrp	x10, _R@GOTPAGE
Lloh42:
	ldr	x10, [x10, _R@GOTPAGEOFF]
	cmp	w11, #2
	b.lt	LBB0_19
; %bb.16:
	ldr	x13, [x9]
LBB0_17:                                ; =>This Inner Loop Header: Depth=1
	lsr	w12, w11, #1
	ldr	w13, [x13, w12, uxtw #2]
	cmp	w13, w8
	b.ge	LBB0_19
; %bb.18:                               ;   in Loop: Header=BB0_17 Depth=1
	ldr	x13, [x10]
	ldr	x14, [x13, x12, lsl #3]
	str	x14, [x13, w11, uxtw #3]
	ldr	x13, [x9]
	ldr	w14, [x13, x12, lsl #2]
	str	w14, [x13, w11, uxtw #2]
	cmp	w11, #3
	mov	x11, x12
	b.hi	LBB0_17
	b	LBB0_20
LBB0_19:
	mov	x12, x11
LBB0_20:
	ldr	x10, [x10]
	str	x19, [x10, w12, sxtw #3]
	ldr	x9, [x9]
	str	w8, [x9, w12, sxtw #2]
	b	LBB0_29
LBB0_21:
	mov	w13, #1
	mov	w16, #2
Lloh43:
	adrp	x12, _R@GOTPAGE
Lloh44:
	ldr	x12, [x12, _R@GOTPAGEOFF]
	mov	x15, x16
LBB0_22:                                ; =>This Inner Loop Header: Depth=1
	cmp	x10, x16
	b.le	LBB0_24
; %bb.23:                               ;   in Loop: Header=BB0_22 Depth=1
	orr	w14, w15, #0x1
	ldr	w17, [x11, w14, sxtw #2]
	ldr	w16, [x11, x16, lsl #2]
	cmp	w17, w16
	csel	w14, w14, w15, gt
	b	LBB0_25
LBB0_24:                                ;   in Loop: Header=BB0_22 Depth=1
	mov	x14, x15
LBB0_25:                                ;   in Loop: Header=BB0_22 Depth=1
	ldr	w11, [x11, w14, sxtw #2]
	cmp	w11, w8
	b.le	LBB0_27
; %bb.26:                               ;   in Loop: Header=BB0_22 Depth=1
	sxtw	x15, w14
	ldr	x11, [x12]
	ldr	x16, [x11, x15, lsl #3]
	str	x16, [x11, w13, sxtw #3]
	ldr	x11, [x9]
	ldr	w15, [x11, x15, lsl #2]
	str	w15, [x11, w13, sxtw #2]
	lsl	w15, w14, #1
	sxtw	x16, w15
	mov	x13, x14
	cmp	x10, x16
	b.ge	LBB0_22
	b	LBB0_28
LBB0_27:
	mov	x14, x13
LBB0_28:
Lloh45:
	adrp	x10, _R@GOTPAGE
Lloh46:
	ldr	x10, [x10, _R@GOTPAGEOFF]
Lloh47:
	ldr	x10, [x10]
	str	x19, [x10, w14, sxtw #3]
	ldr	x9, [x9]
	str	w8, [x9, w14, sxtw #2]
LBB0_29:
	mov	w0, #1
	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
	add	sp, sp, #96
	ret
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGot	Lloh24, Lloh25
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh26, Lloh27, Lloh28
	.loh AdrpLdrGot	Lloh35, Lloh36
	.loh AdrpLdrGotLdr	Lloh32, Lloh33, Lloh34
	.loh AdrpLdrGotLdr	Lloh29, Lloh30, Lloh31
	.loh AdrpLdrGot	Lloh37, Lloh38
	.loh AdrpLdrGot	Lloh41, Lloh42
	.loh AdrpLdrGot	Lloh39, Lloh40
	.loh AdrpLdrGot	Lloh43, Lloh44
	.loh AdrpLdrGotLdr	Lloh45, Lloh46, Lloh47
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"store_res!!, n_ranges = %d\n"

	.comm	_n_ranges,4,2                   ; @n_ranges
	.comm	_Q_range,8,3                    ; @Q_range
l_.str.1:                               ; @.str.1
	.asciz	"ranges: r0 = %d, Q_range[i].minr = %d, Q_range[i].maxr = %d\n"

	.comm	_R_tot,4,2                      ; @R_tot
	.comm	_Q_limit,8,3                    ; @Q_limit
	.comm	_Q_type,8,3                     ; @Q_type
	.comm	_MAX_RATES,8,3                  ; @MAX_RATES
	.comm	_Q_order,4,2                    ; @Q_order
	.comm	_FLAG_REVERSE_SEARCH,4,2        ; @FLAG_REVERSE_SEARCH
	.comm	_R_cnt,8,3                      ; @R_cnt
	.comm	_R,8,3                          ; @R
	.comm	_RV,8,3                         ; @RV
	.no_dead_strip	_store_res
.subsections_via_symbols
