	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function sort_res
_sort_res:                              ## @sort_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
                                        ## kill: def $edi killed $edi def $rdi
	cmpl	%esi, %edi
	jge	LBB0_11
## %bb.1:
	movl	%esi, %r15d
	movq	_R@GOTPCREL(%rip), %r14
	movl	%edi, %r12d
	jmp	LBB0_2
	.p2align	4, 0x90
LBB0_10:                                ##   in Loop: Header=BB0_2 Depth=1
                                        ## kill: def $edi killed $edi killed $rdi
	callq	_sort_res
	movl	%r12d, %edi
	cmpl	%r15d, %r12d
	jge	LBB0_11
LBB0_2:                                 ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_3 Depth 2
                                        ##       Child Loop BB0_4 Depth 3
                                        ##       Child Loop BB0_6 Depth 3
	movq	(%r14), %r8
	leal	(%rdi,%r15), %eax
	sarl	%eax
	cltq
	movl	(%r8,%rax,4), %r10d
	leaq	4(%r8), %r9
	movl	%r15d, %esi
	jmp	LBB0_3
	.p2align	4, 0x90
LBB0_9:                                 ##   in Loop: Header=BB0_3 Depth=2
	cmpl	%esi, %r12d
	jg	LBB0_10
LBB0_3:                                 ##   Parent Loop BB0_2 Depth=1
                                        ## =>  This Loop Header: Depth=2
                                        ##       Child Loop BB0_4 Depth 3
                                        ##       Child Loop BB0_6 Depth 3
	movslq	%r12d, %rax
	leaq	(%r8,%rax,4), %rdx
	movl	%r12d, %r13d
	.p2align	4, 0x90
LBB0_4:                                 ##   Parent Loop BB0_2 Depth=1
                                        ##     Parent Loop BB0_3 Depth=2
                                        ## =>    This Inner Loop Header: Depth=3
	movl	(%rdx), %r11d
	incl	%r13d
	addq	$4, %rdx
	cmpl	%r10d, %r11d
	jl	LBB0_4
## %bb.5:                               ##   in Loop: Header=BB0_3 Depth=2
	leal	-1(%r13), %r12d
	movslq	%esi, %rax
	leaq	(%r9,%rax,4), %rcx
	movl	%esi, %ebx
	.p2align	4, 0x90
LBB0_6:                                 ##   Parent Loop BB0_2 Depth=1
                                        ##     Parent Loop BB0_3 Depth=2
                                        ## =>    This Inner Loop Header: Depth=3
	movl	-4(%rcx), %eax
	addq	$-4, %rcx
	decl	%ebx
	cmpl	%r10d, %eax
	jg	LBB0_6
## %bb.7:                               ##   in Loop: Header=BB0_3 Depth=2
	leal	1(%rbx), %esi
	cmpl	%esi, %r12d
	jg	LBB0_9
## %bb.8:                               ##   in Loop: Header=BB0_3 Depth=2
	movl	%eax, -4(%rdx)
	movl	%r11d, (%rcx)
	movl	%ebx, %esi
	movl	%r13d, %r12d
	jmp	LBB0_9
LBB0_11:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_R,8,3                          ## @R
	.no_dead_strip	_sort_res
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function sort_res
_sort_res:                              ; @sort_res
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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
	cmp	w0, w1
	b.ge	LBB0_11
; %bb.1:
	mov	x19, x1
Lloh0:
	adrp	x20, _R@GOTPAGE
Lloh1:
	ldr	x20, [x20, _R@GOTPAGEOFF]
	mov	x21, x0
	b	LBB0_3
LBB0_2:                                 ;   in Loop: Header=BB0_3 Depth=1
	bl	_sort_res
	mov	x0, x21
	cmp	w21, w19
	b.ge	LBB0_11
LBB0_3:                                 ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_5 Depth 2
                                        ;       Child Loop BB0_6 Depth 3
                                        ;       Child Loop BB0_8 Depth 3
	ldr	x8, [x20]
	add	w9, w0, w19
	asr	w9, w9, #1
	ldr	w9, [x8, w9, sxtw #2]
	add	x10, x8, #4
	mov	x1, x19
	b	LBB0_5
LBB0_4:                                 ;   in Loop: Header=BB0_5 Depth=2
	cmp	w21, w1
	b.gt	LBB0_2
LBB0_5:                                 ;   Parent Loop BB0_3 Depth=1
                                        ; =>  This Loop Header: Depth=2
                                        ;       Child Loop BB0_6 Depth 3
                                        ;       Child Loop BB0_8 Depth 3
	add	x11, x8, w21, sxtw #2
	mov	x12, x21
LBB0_6:                                 ;   Parent Loop BB0_3 Depth=1
                                        ;     Parent Loop BB0_5 Depth=2
                                        ; =>    This Inner Loop Header: Depth=3
	ldr	w13, [x11], #4
	add	w12, w12, #1
	cmp	w13, w9
	b.lt	LBB0_6
; %bb.7:                                ;   in Loop: Header=BB0_5 Depth=2
	sub	w21, w12, #1
	add	x14, x10, w1, sxtw #2
	mov	x15, x1
LBB0_8:                                 ;   Parent Loop BB0_3 Depth=1
                                        ;     Parent Loop BB0_5 Depth=2
                                        ; =>    This Inner Loop Header: Depth=3
	ldr	w16, [x14, #-4]!
	sub	w15, w15, #1
	cmp	w16, w9
	b.gt	LBB0_8
; %bb.9:                                ;   in Loop: Header=BB0_5 Depth=2
	add	w1, w15, #1
	cmp	w21, w1
	b.gt	LBB0_4
; %bb.10:                               ;   in Loop: Header=BB0_5 Depth=2
	stur	w16, [x11, #-4]
	str	w13, [x14]
	mov	x1, x15
	mov	x21, x12
	b	LBB0_4
LBB0_11:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.cfi_endproc
                                        ; -- End function
	.comm	_R,8,3                          ; @R
	.no_dead_strip	_sort_res
.subsections_via_symbols
