	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function heap_sort_res
_heap_sort_res:                         ## @heap_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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	_R_cnt@GOTPCREL(%rip), %rax
	movl	(%rax), %r8d
	cmpl	$2, %r8d
	jl	LBB0_7
## %bb.1:
	movq	_RR@GOTPCREL(%rip), %r10
	movq	(%r10), %rax
	movq	_R@GOTPCREL(%rip), %r11
	movq	%r8, %r15
	jmp	LBB0_2
	.p2align	4, 0x90
LBB0_13:                                ##   in Loop: Header=BB0_2 Depth=1
	movl	%ecx, %edx
LBB0_15:                                ##   in Loop: Header=BB0_2 Depth=1
	movq	(%r11), %rax
	movslq	%edx, %rcx
	movq	%r9, (%rax,%rcx,8)
	movq	(%r10), %rax
	movsd	%xmm0, (%rax,%rcx,8)
	cmpq	$2, %r15
	movq	%r14, %r15
	jbe	LBB0_7
LBB0_2:                                 ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_4 Depth 2
	movq	(%r11), %rcx
	movq	(%rcx,%r15,8), %r9
	movsd	(%rax,%r15,8), %xmm0            ## xmm0 = mem[0],zero
	movq	8(%rcx), %rax
	movq	%rax, (%rcx,%r15,8)
	movq	(%r10), %rdi
	movsd	8(%rdi), %xmm1                  ## xmm1 = mem[0],zero
	movsd	%xmm1, (%rdi,%r15,8)
	cmpq	$3, %r15
	jb	LBB0_6
## %bb.3:                               ##   in Loop: Header=BB0_2 Depth=1
	leaq	-1(%r15), %r14
	movl	$1, %ecx
	movl	$2, %ebx
	.p2align	4, 0x90
LBB0_4:                                 ##   Parent Loop BB0_2 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	cmpl	%r14d, %ebx
	jge	LBB0_5
## %bb.10:                              ##   in Loop: Header=BB0_4 Depth=2
	movl	%ebx, %esi
	orl	$1, %esi
	movslq	%esi, %r12
	movsd	(%rdi,%r12,8), %xmm1            ## xmm1 = mem[0],zero
	movslq	%ebx, %rax
	ucomisd	(%rdi,%rax,8), %xmm1
	movl	%ebx, %edx
	jbe	LBB0_12
## %bb.11:                              ##   in Loop: Header=BB0_4 Depth=2
	movq	%r12, %rax
	movl	%esi, %edx
	jmp	LBB0_12
	.p2align	4, 0x90
LBB0_5:                                 ##   in Loop: Header=BB0_4 Depth=2
	movslq	%ebx, %rax
	movl	%ebx, %edx
LBB0_12:                                ##   in Loop: Header=BB0_4 Depth=2
	ucomisd	(%rdi,%rax,8), %xmm0
	jae	LBB0_13
## %bb.14:                              ##   in Loop: Header=BB0_4 Depth=2
	movq	(%r11), %rsi
	movq	(%rsi,%rax,8), %rdi
	movslq	%ecx, %rcx
	movq	%rdi, (%rsi,%rcx,8)
	movq	(%r10), %rdi
	movsd	(%rdi,%rax,8), %xmm1            ## xmm1 = mem[0],zero
	movsd	%xmm1, (%rdi,%rcx,8)
	leal	(%rdx,%rdx), %ebx
	movslq	%ebx, %rax
	movl	%edx, %ecx
	cmpq	%rax, %r15
	jg	LBB0_4
	jmp	LBB0_15
LBB0_6:
	movq	(%r11), %rax
	movq	%r9, 8(%rax)
	movq	(%r10), %rax
	movsd	%xmm0, 8(%rax)
LBB0_7:
	testl	%r8d, %r8d
	jle	LBB0_20
## %bb.8:
	cmpl	$1, %r8d
	jne	LBB0_16
## %bb.9:
	xorl	%ecx, %ecx
	jmp	LBB0_18
LBB0_16:
	movl	%r8d, %r9d
	andl	$-2, %r9d
	xorl	%esi, %esi
	movq	_R@GOTPCREL(%rip), %rdx
	movq	_RR@GOTPCREL(%rip), %rdi
	.p2align	4, 0x90
LBB0_17:                                ## =>This Inner Loop Header: Depth=1
	movq	(%rdx), %rcx
	movq	8(%rcx,%rsi,8), %rbx
	movq	%rbx, (%rcx,%rsi,8)
	movq	(%rdi), %rcx
	movsd	8(%rcx,%rsi,8), %xmm0           ## xmm0 = mem[0],zero
	movsd	%xmm0, (%rcx,%rsi,8)
	movq	(%rdx), %rbx
	leaq	2(%rsi), %rcx
	movq	16(%rbx,%rsi,8), %rax
	movq	%rax, 8(%rbx,%rsi,8)
	movq	(%rdi), %rax
	movsd	16(%rax,%rsi,8), %xmm0          ## xmm0 = mem[0],zero
	movsd	%xmm0, 8(%rax,%rsi,8)
	movq	%rcx, %rsi
	cmpq	%rcx, %r9
	jne	LBB0_17
LBB0_18:
	testb	$1, %r8b
	je	LBB0_20
## %bb.19:
	movq	_R@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	8(%rax,%rcx,8), %rdx
	movq	%rdx, (%rax,%rcx,8)
	movq	_RR@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movsd	8(%rax,%rcx,8), %xmm0           ## xmm0 = mem[0],zero
	movsd	%xmm0, (%rax,%rcx,8)
LBB0_20:
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_R_cnt,4,2                      ## @R_cnt
	.comm	_R,8,3                          ## @R
	.comm	_RR,8,3                         ## @RR
	.no_dead_strip	_heap_sort_res
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function heap_sort_res
_heap_sort_res:                         ; @heap_sort_res
	.cfi_startproc
; %bb.0:
Lloh0:
	adrp	x8, _R_cnt@GOTPAGE
Lloh1:
	ldr	x8, [x8, _R_cnt@GOTPAGEOFF]
Lloh2:
	ldr	w10, [x8]
Lloh3:
	adrp	x8, _RR@GOTPAGE
Lloh4:
	ldr	x8, [x8, _RR@GOTPAGEOFF]
Lloh5:
	adrp	x9, _R@GOTPAGE
Lloh6:
	ldr	x9, [x9, _R@GOTPAGEOFF]
	cmp	w10, #1
	b.le	LBB0_13
; %bb.1:
	ldr	x14, [x8]
	mov	x11, x10
	b	LBB0_4
LBB0_2:                                 ;   in Loop: Header=BB0_4 Depth=1
	mov	x16, x15
LBB0_3:                                 ;   in Loop: Header=BB0_4 Depth=1
	ldr	x14, [x9]
	sbfiz	x15, x16, #3, #32
	str	x12, [x14, x15]
	ldr	x14, [x8]
	str	d0, [x14, x15]
	cmp	x11, #2
	mov	x11, x13
	b.ls	LBB0_13
LBB0_4:                                 ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_6 Depth 2
	ldr	x13, [x9]
	lsl	x15, x11, #3
	ldr	x12, [x13, x15]
	ldr	d0, [x14, x15]
	ldr	x14, [x13, #8]
	str	x14, [x13, x15]
	ldr	x14, [x8]
	ldr	d1, [x14, #8]
	str	d1, [x14, x15]
	cmp	x11, #3
	b.lo	LBB0_12
; %bb.5:                                ;   in Loop: Header=BB0_4 Depth=1
	sub	x13, x11, #1
	mov	w15, #1
	mov	w17, #2
LBB0_6:                                 ;   Parent Loop BB0_4 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	cmp	w17, w13
	b.ge	LBB0_9
; %bb.7:                                ;   in Loop: Header=BB0_6 Depth=2
	sxtw	x0, w17
	orr	x1, x0, #0x1
	ldr	d1, [x14, x1, lsl #3]
	ldr	d2, [x14, w17, sxtw #3]
	fcmp	d1, d2
	mov	x16, x17
	b.le	LBB0_10
; %bb.8:                                ;   in Loop: Header=BB0_6 Depth=2
	mov	x0, x1
	mov	x16, x1
	b	LBB0_10
LBB0_9:                                 ;   in Loop: Header=BB0_6 Depth=2
	mov	x16, x17
	sxtw	x0, w16
LBB0_10:                                ;   in Loop: Header=BB0_6 Depth=2
	ldr	d1, [x14, x0, lsl #3]
	fcmp	d0, d1
	b.ge	LBB0_2
; %bb.11:                               ;   in Loop: Header=BB0_6 Depth=2
	ldr	x14, [x9]
	lsl	x17, x0, #3
	ldr	x0, [x14, x17]
	sbfiz	x15, x15, #3, #32
	str	x0, [x14, x15]
	ldr	x14, [x8]
	ldr	d1, [x14, x17]
	str	d1, [x14, x15]
	lsl	w17, w16, #1
	cmp	x11, w17, sxtw
	mov	x15, x16
	b.gt	LBB0_6
	b	LBB0_3
LBB0_12:
	ldr	x11, [x9]
	str	x12, [x11, #8]
	ldr	x11, [x8]
	str	d0, [x11, #8]
LBB0_13:
	cmp	w10, #1
	b.lt	LBB0_16
; %bb.14:
	mov	x11, #0
	lsl	x10, x10, #3
LBB0_15:                                ; =>This Inner Loop Header: Depth=1
	ldr	x12, [x9]
	add	x12, x12, x11
	ldr	x13, [x12, #8]
	str	x13, [x12]
	ldr	x12, [x8]
	add	x12, x12, x11
	ldr	d0, [x12, #8]
	str	d0, [x12]
	add	x11, x11, #8
	cmp	x10, x11
	b.ne	LBB0_15
LBB0_16:
	ret
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_R_cnt,4,2                      ; @R_cnt
	.comm	_R,8,3                          ; @R
	.comm	_RR,8,3                         ; @RR
	.no_dead_strip	_heap_sort_res
.subsections_via_symbols
