	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_btcx_sort_clips                ## -- Begin function btcx_sort_clips
	.p2align	4, 0x90
_btcx_sort_clips:                       ## @btcx_sort_clips
	.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	%rbx
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
                                        ## kill: def $esi killed $esi def $rsi
	movl	%esi, %r8d
	addl	$-2, %r8d
	js	LBB0_17
## %bb.1:
	leal	-1(%rsi), %r9d
	xorl	%r10d, %r10d
	.p2align	4, 0x90
LBB0_2:                                 ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_5 Depth 2
	movl	%r10d, %r11d
	notl	%r11d
	addl	%esi, %r11d
	movq	(%rdi), %rcx
	cmpl	$1, %r11d
	jne	LBB0_4
## %bb.3:                               ##   in Loop: Header=BB0_2 Depth=1
	xorl	%edx, %edx
	xorl	%r15d, %r15d
LBB0_12:                                ##   in Loop: Header=BB0_2 Depth=1
	testb	$1, %r11b
	je	LBB0_15
## %bb.13:                              ##   in Loop: Header=BB0_2 Depth=1
	movq	8(%rdi,%rdx,8), %rax
	cmpq	%rax, %rcx
	jle	LBB0_15
## %bb.14:                              ##   in Loop: Header=BB0_2 Depth=1
	movq	%rax, (%rdi,%rdx,8)
	movq	%rcx, 8(%rdi,%rdx,8)
	incl	%r15d
LBB0_15:                                ##   in Loop: Header=BB0_2 Depth=1
	testl	%r15d, %r15d
	je	LBB0_17
## %bb.16:                              ##   in Loop: Header=BB0_2 Depth=1
	leal	-1(%r8), %eax
	incl	%r10d
	decl	%r9d
	testl	%r8d, %r8d
	movl	%eax, %r8d
	jg	LBB0_2
	jmp	LBB0_17
	.p2align	4, 0x90
LBB0_4:                                 ##   in Loop: Header=BB0_2 Depth=1
	movl	%r9d, %r14d
	andl	$-2, %r14d
	xorl	%ebx, %ebx
	xorl	%r15d, %r15d
	jmp	LBB0_5
	.p2align	4, 0x90
LBB0_10:                                ##   in Loop: Header=BB0_5 Depth=2
	movq	%rax, 8(%rdi,%rbx,8)
	movq	%rcx, 16(%rdi,%rbx,8)
	incl	%r15d
LBB0_11:                                ##   in Loop: Header=BB0_5 Depth=2
	movq	%rdx, %rbx
	cmpq	%rdx, %r14
	je	LBB0_12
LBB0_5:                                 ##   Parent Loop BB0_2 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movq	8(%rdi,%rbx,8), %rdx
	cmpq	%rdx, %rcx
	jle	LBB0_6
## %bb.7:                               ##   in Loop: Header=BB0_5 Depth=2
	movq	%rdx, (%rdi,%rbx,8)
	movq	%rcx, 8(%rdi,%rbx,8)
	incl	%r15d
	jmp	LBB0_8
	.p2align	4, 0x90
LBB0_6:                                 ##   in Loop: Header=BB0_5 Depth=2
	movq	%rdx, %rcx
LBB0_8:                                 ##   in Loop: Header=BB0_5 Depth=2
	leaq	2(%rbx), %rdx
	movq	16(%rdi,%rbx,8), %rax
	cmpq	%rax, %rcx
	jg	LBB0_10
## %bb.9:                               ##   in Loop: Header=BB0_5 Depth=2
	movq	%rax, %rcx
	jmp	LBB0_11
LBB0_17:
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_btcx_sort_clips                ; -- Begin function btcx_sort_clips
	.p2align	2
_btcx_sort_clips:                       ; @btcx_sort_clips
	.cfi_startproc
; %bb.0:
	subs	w8, w1, #2
	b.mi	LBB0_9
; %bb.1:
	add	x9, x0, #8
	sub	w10, w1, #1
LBB0_2:                                 ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_5 Depth 2
	mov	w11, #0
	mov	w10, w10
	ldr	x12, [x0]
	mov	x13, x10
	mov	x14, x9
	b	LBB0_5
LBB0_3:                                 ;   in Loop: Header=BB0_5 Depth=2
	stp	x15, x12, [x14, #-8]
	add	w11, w11, #1
LBB0_4:                                 ;   in Loop: Header=BB0_5 Depth=2
	add	x14, x14, #8
	subs	x13, x13, #1
	b.eq	LBB0_7
LBB0_5:                                 ;   Parent Loop BB0_2 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	ldr	x15, [x14]
	cmp	x12, x15
	b.gt	LBB0_3
; %bb.6:                                ;   in Loop: Header=BB0_5 Depth=2
	mov	x12, x15
	b	LBB0_4
LBB0_7:                                 ;   in Loop: Header=BB0_2 Depth=1
	cbz	w11, LBB0_9
; %bb.8:                                ;   in Loop: Header=BB0_2 Depth=1
	sub	w11, w8, #1
	sub	w10, w10, #1
	cmp	w8, #0
	mov	x8, x11
	b.gt	LBB0_2
LBB0_9:
	ret
	.cfi_endproc
                                        ; -- End function
.subsections_via_symbols
