	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_store_res_group_mode           ## -- Begin function store_res_group_mode
	.p2align	4, 0x90
_store_res_group_mode:                  ## @store_res_group_mode
	.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	%esi, %ebx
	movq	%rdi, %r14
	movq	_R_tot@GOTPCREL(%rip), %rax
	cmpl	$1, (%rax)
	jne	LBB0_2
## %bb.1:
	movq	_Q_limit@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	addl	%eax, %eax
	cmpl	$601, %eax                      ## imm = 0x259
	movl	$600, %esi                      ## imm = 0x258
	cmovgel	%eax, %esi
	movq	_hm@GOTPCREL(%rip), %rdi
	callq	_hashmap_ll_int_init
	testl	%eax, %eax
	je	LBB0_28
LBB0_2:
	movq	%r14, %rdi
	callq	_extract_hash_item
	movq	%rax, %r13
	testq	%rax, %rax
	jne	LBB0_4
## %bb.3:
	movq	_R_tot_undef_hash@GOTPCREL(%rip), %rax
	incl	(%rax)
LBB0_4:
	movq	%r14, %rdi
	movl	%ebx, %esi
	callq	_evaluate_rating
	movl	%eax, %r15d
	movl	%eax, -64(%rbp)
	movq	_order@GOTPCREL(%rip), %rax
	cmpl	$2, (%rax)
	jne	LBB0_6
## %bb.5:
	notl	%r15d
	movl	%r15d, -64(%rbp)
LBB0_6:
	movq	_R_cnt@GOTPCREL(%rip), %rdi
	movl	(%rdi), %esi
	movq	_Q_limit@GOTPCREL(%rip), %rbx
	movl	(%rbx), %eax
	cmpl	%eax, %esi
	jne	LBB0_8
## %bb.7:
	movslq	%r15d, %rcx
	movq	_RV@GOTPCREL(%rip), %rdx
	movq	(%rdx), %rdx
	cmpq	%rcx, 8(%rdx)
	jle	LBB0_27
LBB0_8:
	movq	_hm@GOTPCREL(%rip), %r12
	movl	(%r12), %ecx
	movl	%ecx, -44(%rbp)
	movq	%r14, -56(%rbp)
	testq	%r13, %r13
	je	LBB0_16
## %bb.9:
	movq	_hm@GOTPCREL(%rip), %r12
	leaq	-44(%rbp), %rdx
	movq	%r12, %rdi
	movq	%r13, %rsi
	callq	_hashmap_ll_int_get
	testq	%rax, %rax
	je	LBB0_13
## %bb.10:
	movq	24(%r12), %rax
	movslq	-44(%rbp), %rcx
	shlq	$4, %rcx
	movslq	(%rax,%rcx), %rbx
	cmpq	$-1, %rbx
	movq	_R_cnt@GOTPCREL(%rip), %rcx
	je	LBB0_19
## %bb.11:
	testl	%ebx, %ebx
	setg	%al
	cmpl	(%rcx), %ebx
	setle	%cl
	andb	%al, %cl
	movzbl	%cl, %edi
	callq	_assert
	movslq	%r15d, %rax
	movq	_RV@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	cmpq	%rax, (%rcx,%rbx,8)
	jle	LBB0_27
## %bb.12:
	movl	-44(%rbp), %edx
	leaq	-64(%rbp), %rdi
	movl	%ebx, %esi
	callq	_heapify_front
	jmp	LBB0_27
LBB0_16:
	movq	_R_tot_groups@GOTPCREL(%rip), %rdx
	incl	(%rdx)
	cmpl	%eax, %esi
	jne	LBB0_20
LBB0_18:
	movq	24(%r12), %rax
LBB0_19:
	movq	_RS@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	movq	8(%rcx), %rcx
	shlq	$4, %rcx
	movl	$-1, (%rax,%rcx)
	movl	-44(%rbp), %edx
	leaq	-64(%rbp), %rdi
	movl	$1, %esi
	callq	_heapify_front
	jmp	LBB0_27
LBB0_13:
	movq	_R_tot_groups@GOTPCREL(%rip), %rax
	incl	(%rax)
	movq	8(%r12), %rax
	cmpq	16(%r12), %rax
	jl	LBB0_15
## %bb.14:
	xorl	%eax, %eax
	callq	_rebuild_hashmap
	leaq	-44(%rbp), %rdx
	movq	%r12, %rdi
	movq	%r13, %rsi
	callq	_hashmap_ll_int_get
	movq	8(%r12), %rax
LBB0_15:
	incq	%rax
	movq	%rax, 8(%r12)
	movq	24(%r12), %rax
	movslq	-44(%rbp), %rcx
	movq	%rcx, %rdx
	shlq	$4, %rdx
	movq	%r13, 8(%rax,%rdx)
	movq	_R_cnt@GOTPCREL(%rip), %rdi
	movl	(%rdi), %esi
	movl	(%rbx), %eax
	movq	_hm@GOTPCREL(%rip), %r12
	cmpl	%eax, %esi
	je	LBB0_18
LBB0_20:
	leal	1(%rsi), %edx
	movl	%edx, (%rdi)
	movslq	%r15d, %r11
	testl	%esi, %esi
	jle	LBB0_26
## %bb.21:
	movq	_RV@GOTPCREL(%rip), %r10
	movq	(%r10), %rdi
	movq	_R@GOTPCREL(%rip), %r8
	movq	_RS@GOTPCREL(%rip), %r9
	movl	%edx, %esi
	.p2align	4, 0x90
LBB0_22:                                ## =>This Inner Loop Header: Depth=1
	shrl	%esi
	cmpq	%r11, (%rdi,%rsi,8)
	jge	LBB0_23
## %bb.24:                              ##   in Loop: Header=BB0_22 Depth=1
	movq	(%r8), %rdi
	movq	(%rdi,%rsi,8), %rbx
	movl	%edx, %ecx
	movq	%rbx, (%rdi,%rcx,8)
	movq	(%r10), %rdi
	movq	(%rdi,%rsi,8), %rbx
	movq	%rbx, (%rdi,%rcx,8)
	movq	24(%r12), %r14
	movq	(%r9), %rax
	movq	(%rax,%rsi,8), %rbx
	movq	%rbx, (%rax,%rcx,8)
	shlq	$4, %rbx
	movl	%edx, (%r14,%rbx)
	cmpl	$3, %edx
	movl	%esi, %edx
	ja	LBB0_22
	jmp	LBB0_25
LBB0_23:
	movl	%edx, %esi
LBB0_25:
	movq	-56(%rbp), %r14
	movl	-44(%rbp), %ecx
	movl	%esi, %edx
LBB0_26:
	movq	_R@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movslq	%edx, %rdx
	movq	%r14, (%rax,%rdx,8)
	movq	_RV@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%r11, (%rax,%rdx,8)
	movq	24(%r12), %rax
	movslq	%ecx, %rcx
	movq	_RS@GOTPCREL(%rip), %rsi
	movq	(%rsi), %rsi
	movq	%rcx, (%rsi,%rdx,8)
	shlq	$4, %rcx
	movl	%edx, (%rax,%rcx)
LBB0_27:
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_28:
	movq	_stderr@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str(%rip), %rsi
	callq	_fprintf
	movl	$2, %edi
	callq	_exit
	.cfi_endproc
                                        ## -- End function
	.comm	_R_tot,4,2                      ## @R_tot
	.comm	_Q_limit,4,2                    ## @Q_limit
	.comm	_hm,32,3                        ## @hm
	.comm	_stderr,4,2                     ## @stderr
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Not enough memory for allocate hash table\n"

	.comm	_R_tot_undef_hash,4,2           ## @R_tot_undef_hash
	.comm	_order,4,2                      ## @order
	.comm	_R_cnt,4,2                      ## @R_cnt
	.comm	_RV,8,3                         ## @RV
	.comm	_RS,8,3                         ## @RS
	.comm	_R_tot_groups,4,2               ## @R_tot_groups
	.comm	_R,8,3                          ## @R
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_store_res_group_mode           ; -- Begin function store_res_group_mode
	.p2align	2
_store_res_group_mode:                  ; @store_res_group_mode
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	stp	x26, x25, [sp, #32]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #48]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #64]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #80]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #96]             ; 16-byte Folded Spill
	add	x29, sp, #96
	.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	x20, x1
	mov	x19, x0
Lloh0:
	adrp	x8, _R_tot@GOTPAGE
Lloh1:
	ldr	x8, [x8, _R_tot@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
Lloh3:
	adrp	x24, _Q_limit@GOTPAGE
Lloh4:
	ldr	x24, [x24, _Q_limit@GOTPAGEOFF]
	cmp	w8, #1
	b.ne	LBB0_2
; %bb.1:
	ldr	w8, [x24]
	lsl	w8, w8, #1
	mov	w9, #600
	cmp	w8, #600
	csel	w1, w8, w9, gt
Lloh5:
	adrp	x0, _hm@GOTPAGE
Lloh6:
	ldr	x0, [x0, _hm@GOTPAGEOFF]
	bl	_hashmap_ll_int_init
	cbz	w0, LBB0_27
LBB0_2:
	mov	x0, x19
	bl	_extract_hash_item
	mov	x21, x0
	cbnz	x0, LBB0_4
; %bb.3:
Lloh7:
	adrp	x8, _R_tot_undef_hash@GOTPAGE
Lloh8:
	ldr	x8, [x8, _R_tot_undef_hash@GOTPAGEOFF]
	ldr	w9, [x8]
	add	w9, w9, #1
	str	w9, [x8]
LBB0_4:
	mov	x0, x19
	mov	x1, x20
	bl	_evaluate_rating
	mov	x20, x0
	str	w0, [sp, #16]
Lloh9:
	adrp	x8, _order@GOTPAGE
Lloh10:
	ldr	x8, [x8, _order@GOTPAGEOFF]
Lloh11:
	ldr	w8, [x8]
	cmp	w8, #2
	b.ne	LBB0_6
; %bb.5:
	mvn	w20, w20
	str	w20, [sp, #16]
LBB0_6:
Lloh12:
	adrp	x25, _R_cnt@GOTPAGE
Lloh13:
	ldr	x25, [x25, _R_cnt@GOTPAGEOFF]
	ldr	w12, [x25]
	ldr	w8, [x24]
	cmp	w12, w8
	b.ne	LBB0_8
; %bb.7:
Lloh14:
	adrp	x9, _RV@GOTPAGE
Lloh15:
	ldr	x9, [x9, _RV@GOTPAGEOFF]
Lloh16:
	ldr	x9, [x9]
	ldr	x9, [x9, #8]
	cmp	x9, w20, sxtw
	b.le	LBB0_26
LBB0_8:
Lloh17:
	adrp	x23, _hm@GOTPAGE
Lloh18:
	ldr	x23, [x23, _hm@GOTPAGEOFF]
	ldr	w10, [x23]
	str	w10, [sp, #12]
	str	x19, [sp, #24]
	cbz	x21, LBB0_13
; %bb.9:
Lloh19:
	adrp	x22, _hm@GOTPAGE
Lloh20:
	ldr	x22, [x22, _hm@GOTPAGEOFF]
	add	x2, sp, #12
	mov	x0, x22
	mov	x1, x21
	bl	_hashmap_ll_int_get
	cbz	x0, LBB0_16
; %bb.10:
	ldr	x8, [x22, #24]
	ldrsw	x9, [sp, #12]
	lsl	x9, x9, #4
	ldrsw	x19, [x8, x9]
	cmn	w19, #1
	b.eq	LBB0_15
; %bb.11:
	cmp	w19, #0
	ldr	w8, [x25]
	ccmp	w19, w8, #0, gt
	cset	w0, le
	bl	_assert
Lloh21:
	adrp	x8, _RV@GOTPAGE
Lloh22:
	ldr	x8, [x8, _RV@GOTPAGEOFF]
Lloh23:
	ldr	x8, [x8]
	ldr	x8, [x8, x19, lsl #3]
	cmp	x8, w20, sxtw
	b.le	LBB0_26
; %bb.12:
	ldr	w2, [sp, #12]
	add	x0, sp, #16
	mov	x1, x19
	bl	_heapify_front
	b	LBB0_26
LBB0_13:
Lloh24:
	adrp	x9, _R_tot_groups@GOTPAGE
Lloh25:
	ldr	x9, [x9, _R_tot_groups@GOTPAGEOFF]
	ldr	w11, [x9]
	add	w11, w11, #1
	str	w11, [x9]
	cmp	w12, w8
	b.ne	LBB0_19
LBB0_14:
	ldr	x8, [x23, #24]
LBB0_15:
Lloh26:
	adrp	x9, _RS@GOTPAGE
Lloh27:
	ldr	x9, [x9, _RS@GOTPAGEOFF]
Lloh28:
	ldr	x9, [x9]
	ldr	x9, [x9, #8]
	lsl	x9, x9, #4
	mov	w10, #-1
	str	w10, [x8, x9]
	ldr	w2, [sp, #12]
	add	x0, sp, #16
	mov	w1, #1
	bl	_heapify_front
	b	LBB0_26
LBB0_16:
Lloh29:
	adrp	x8, _R_tot_groups@GOTPAGE
Lloh30:
	ldr	x8, [x8, _R_tot_groups@GOTPAGEOFF]
	ldr	w9, [x8]
	add	w9, w9, #1
	str	w9, [x8]
	ldp	x8, x9, [x22, #8]
	cmp	x8, x9
	b.lt	LBB0_18
; %bb.17:
	bl	_rebuild_hashmap
	add	x2, sp, #12
	mov	x0, x22
	mov	x1, x21
	bl	_hashmap_ll_int_get
	ldr	x8, [x22, #8]
LBB0_18:
	add	x8, x8, #1
	str	x8, [x22, #8]
	ldr	x8, [x22, #24]
	ldrsw	x10, [sp, #12]
	add	x8, x8, x10, lsl #4
	str	x21, [x8, #8]
	ldr	w12, [x25]
	ldr	w8, [x24]
	cmp	w12, w8
	b.eq	LBB0_14
LBB0_19:
	add	w9, w12, #1
	str	w9, [x25]
	sxtw	x8, w20
Lloh31:
	adrp	x11, _R@GOTPAGE
Lloh32:
	ldr	x11, [x11, _R@GOTPAGEOFF]
	cmp	w12, #1
	b.lt	LBB0_25
; %bb.20:
Lloh33:
	adrp	x10, _RV@GOTPAGE
Lloh34:
	ldr	x10, [x10, _RV@GOTPAGEOFF]
	ldr	x14, [x10]
Lloh35:
	adrp	x13, _RS@GOTPAGE
Lloh36:
	ldr	x13, [x13, _RS@GOTPAGEOFF]
LBB0_21:                                ; =>This Inner Loop Header: Depth=1
	lsr	w12, w9, #1
	ldr	x14, [x14, w12, uxtw #3]
	cmp	x14, x8
	b.ge	LBB0_23
; %bb.22:                               ;   in Loop: Header=BB0_21 Depth=1
	ldr	x14, [x11]
	lsl	x15, x12, #3
	ldr	x16, [x14, x15]
	mov	w17, w9
	lsl	x17, x17, #3
	str	x16, [x14, x17]
	ldr	x14, [x10]
	ldr	x16, [x14, x15]
	str	x16, [x14, x17]
	ldr	x16, [x23, #24]
	ldr	x0, [x13]
	ldr	x15, [x0, x15]
	str	x15, [x0, x17]
	lsl	x15, x15, #4
	str	w9, [x16, x15]
	cmp	w9, #3
	mov	x9, x12
	b.hi	LBB0_21
	b	LBB0_24
LBB0_23:
	mov	x12, x9
LBB0_24:
	ldr	x19, [sp, #24]
	ldr	w10, [sp, #12]
	mov	x9, x12
LBB0_25:
	ldr	x11, [x11]
	sbfiz	x12, x9, #3, #32
	str	x19, [x11, x12]
Lloh37:
	adrp	x11, _RV@GOTPAGE
Lloh38:
	ldr	x11, [x11, _RV@GOTPAGEOFF]
Lloh39:
	ldr	x11, [x11]
	str	x8, [x11, x12]
	ldr	x8, [x23, #24]
                                        ; kill: def $w10 killed $w10 killed $x10 def $x10
	sxtw	x11, w10
Lloh40:
	adrp	x13, _RS@GOTPAGE
Lloh41:
	ldr	x13, [x13, _RS@GOTPAGEOFF]
Lloh42:
	ldr	x13, [x13]
	str	x11, [x13, x12]
	sbfiz	x10, x10, #4, #32
	str	w9, [x8, x10]
LBB0_26:
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #64]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #48]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #112
	ret
LBB0_27:
Lloh43:
	adrp	x8, _stderr@GOTPAGE
Lloh44:
	ldr	x8, [x8, _stderr@GOTPAGEOFF]
Lloh45:
	ldr	w0, [x8]
Lloh46:
	adrp	x1, l_.str@PAGE
Lloh47:
	add	x1, x1, l_.str@PAGEOFF
	bl	_fprintf
	mov	w0, #2
	bl	_exit
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGot	Lloh17, Lloh18
	.loh AdrpLdrGot	Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpLdrGot	Lloh24, Lloh25
	.loh AdrpLdrGotLdr	Lloh26, Lloh27, Lloh28
	.loh AdrpLdrGot	Lloh29, Lloh30
	.loh AdrpLdrGot	Lloh31, Lloh32
	.loh AdrpLdrGot	Lloh35, Lloh36
	.loh AdrpLdrGot	Lloh33, Lloh34
	.loh AdrpLdrGotLdr	Lloh40, Lloh41, Lloh42
	.loh AdrpLdrGotLdr	Lloh37, Lloh38, Lloh39
	.loh AdrpAdd	Lloh46, Lloh47
	.loh AdrpLdrGotLdr	Lloh43, Lloh44, Lloh45
	.cfi_endproc
                                        ; -- End function
	.comm	_R_tot,4,2                      ; @R_tot
	.comm	_Q_limit,4,2                    ; @Q_limit
	.comm	_hm,32,3                        ; @hm
	.comm	_stderr,4,2                     ; @stderr
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Not enough memory for allocate hash table\n"

	.comm	_R_tot_undef_hash,4,2           ; @R_tot_undef_hash
	.comm	_order,4,2                      ; @order
	.comm	_R_cnt,4,2                      ; @R_cnt
	.comm	_RV,8,3                         ; @RV
	.comm	_RS,8,3                         ; @RS
	.comm	_R_tot_groups,4,2               ; @R_tot_groups
	.comm	_R,8,3                          ; @R
.subsections_via_symbols
