	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function sort_res2
_sort_res2:                             ## @sort_res2
	.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, %r14d
	movabsq	$-4294967296, %r15              ## imm = 0xFFFFFFFF00000000
	movabsq	$4294967296, %r13               ## imm = 0x100000000
	jmp	LBB0_2
	.p2align	4, 0x90
LBB0_10:                                ##   in Loop: Header=BB0_2 Depth=1
                                        ## kill: def $edi killed $edi killed $rdi
                                        ## kill: def $esi killed $esi killed $rsi
	callq	_sort_res2
	movl	%r12d, %edi
	cmpl	%r14d, %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	_R@GOTPCREL(%rip), %rax
	movq	(%rax), %r8
	leal	(%rdi,%r14), %eax
	andl	$-2, %eax
	cltq
	movl	(%r8,%rax,4), %r9d
	movl	%r14d, %esi
	movl	%edi, %r12d
	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
	movq	%r12, %r10
	shlq	$32, %r10
	addq	%r15, %r10
	leal	(%r12,%r12), %eax
	movl	%r12d, %ebx
	.p2align	4, 0x90
LBB0_4:                                 ##   Parent Loop BB0_2 Depth=1
                                        ##     Parent Loop BB0_3 Depth=2
                                        ## =>    This Inner Loop Header: Depth=3
	movslq	%eax, %rcx
	addq	%r13, %r10
	incl	%ebx
	leal	2(%rcx), %eax
	cmpl	%r9d, (%r8,%rcx,4)
	jl	LBB0_4
## %bb.5:                               ##   in Loop: Header=BB0_3 Depth=2
	leal	-1(%rbx), %r12d
	movq	%rsi, %rax
	shlq	$32, %rax
	addq	%r13, %rax
	leal	(%rsi,%rsi), %edx
	movl	%esi, %ecx
	.p2align	4, 0x90
LBB0_6:                                 ##   Parent Loop BB0_2 Depth=1
                                        ##     Parent Loop BB0_3 Depth=2
                                        ## =>    This Inner Loop Header: Depth=3
	movslq	%edx, %rsi
	addq	%r15, %rax
	decl	%ecx
	leal	-2(%rsi), %edx
	cmpl	%r9d, (%r8,%rsi,4)
	jg	LBB0_6
## %bb.7:                               ##   in Loop: Header=BB0_3 Depth=2
	leal	1(%rcx), %esi
	cmpl	%esi, %r12d
	jg	LBB0_9
## %bb.8:                               ##   in Loop: Header=BB0_3 Depth=2
	sarq	$29, %r10
	movq	(%r8,%r10), %rdx
	sarq	$29, %rax
	movq	(%r8,%rax), %rsi
	movq	%rsi, (%r8,%r10)
	movq	%rdx, (%r8,%rax)
	movl	%ecx, %esi
	movl	%ebx, %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_res2
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function sort_res2
_sort_res2:                             ; @sort_res2
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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
	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, #-4294967296
	mov	x22, #4294967296
	b	LBB0_3
LBB0_2:                                 ;   in Loop: Header=BB0_3 Depth=1
                                        ; kill: def $w1 killed $w1 killed $x1
	bl	_sort_res2
	mov	x0, x23
	cmp	w23, 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
	and	w9, w9, #0xfffffffe
	ldr	w9, [x8, w9, sxtw #2]
	mov	x1, x19
	mov	x23, x0
	b	LBB0_5
LBB0_4:                                 ;   in Loop: Header=BB0_5 Depth=2
	cmp	w23, 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
	lsl	w12, w23, #1
	mov	x10, x23
	add	x11, x21, x23, lsl #32
LBB0_6:                                 ;   Parent Loop BB0_3 Depth=1
                                        ;     Parent Loop BB0_5 Depth=2
                                        ; =>    This Inner Loop Header: Depth=3
	ldr	w13, [x8, w12, sxtw #2]
	add	x11, x11, x22
	add	w10, w10, #1
	add	w12, w12, #2
	cmp	w13, w9
	b.lt	LBB0_6
; %bb.7:                                ;   in Loop: Header=BB0_5 Depth=2
	sub	w23, w10, #1
	lsl	w14, w1, #1
	mov	x12, x1
	add	x13, x22, x1, lsl #32
LBB0_8:                                 ;   Parent Loop BB0_3 Depth=1
                                        ;     Parent Loop BB0_5 Depth=2
                                        ; =>    This Inner Loop Header: Depth=3
	ldr	w15, [x8, w14, sxtw #2]
	add	x13, x13, x21
	sub	w12, w12, #1
	sub	w14, w14, #2
	cmp	w15, w9
	b.gt	LBB0_8
; %bb.9:                                ;   in Loop: Header=BB0_5 Depth=2
	add	w1, w12, #1
	cmp	w23, w1
	b.gt	LBB0_4
; %bb.10:                               ;   in Loop: Header=BB0_5 Depth=2
	asr	x11, x11, #29
	ldr	x14, [x8, x11]
	asr	x13, x13, #29
	ldr	x15, [x8, x13]
	str	x15, [x8, x11]
	str	x14, [x8, x13]
	mov	x1, x12
	mov	x23, x10
	b	LBB0_4
LBB0_11:
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.cfi_endproc
                                        ; -- End function
	.comm	_R,8,3                          ; @R
	.no_dead_strip	_sort_res2
.subsections_via_symbols
