	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function selectnewtape
_selectnewtape:                         ## @selectnewtape
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	movq	(%rdi), %r9
	movq	8(%rdi), %r8
	movl	(%r9,%r8,4), %eax
	cmpl	4(%r9,%r8,4), %eax
	jge	LBB0_2
## %bb.1:
	incq	%r8
	jmp	LBB0_8
LBB0_2:
	testl	%eax, %eax
	je	LBB0_4
LBB0_7:
	xorl	%r8d, %r8d
	jmp	LBB0_8
LBB0_4:
	incl	28(%rdi)
	cmpl	$0, 24(%rdi)
	jle	LBB0_7
## %bb.5:
	movq	16(%rdi), %r11
	movl	(%r11), %r10d
	xorl	%r8d, %r8d
	movl	%r10d, %esi
	xorl	%ecx, %ecx
	.p2align	4, 0x90
LBB0_6:                                 ## =>This Inner Loop Header: Depth=1
	movl	4(%r11,%rcx,4), %eax
	addl	%r10d, %eax
	subl	%esi, %eax
	movl	%eax, (%r9,%rcx,4)
	movl	4(%r11,%rcx,4), %esi
	leal	(%rsi,%r10), %eax
	movl	%eax, (%r11,%rcx,4)
	leaq	1(%rcx), %rax
	movslq	24(%rdi), %rdx
	movq	%rax, %rcx
	cmpq	%rdx, %rax
	jl	LBB0_6
LBB0_8:
	movq	%r8, 8(%rdi)
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.no_dead_strip	_selectnewtape
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function selectnewtape
_selectnewtape:                         ; @selectnewtape
	.cfi_startproc
; %bb.0:
	ldp	x8, x9, [x0]
	ldr	w10, [x8, x9, lsl #2]
	add	x9, x9, #1
	ldr	w11, [x8, x9, lsl #2]
	cmp	w10, w11
	b.lt	LBB0_6
; %bb.1:
	cbnz	w10, LBB0_5
; %bb.2:
	ldp	w10, w9, [x0, #24]
	add	w9, w9, #1
	str	w9, [x0, #28]
	cmp	w10, #1
	b.lt	LBB0_5
; %bb.3:
	mov	x12, #0
	ldr	x9, [x0, #16]
	ldr	w10, [x9]
	mov	x11, x10
LBB0_4:                                 ; =>This Inner Loop Header: Depth=1
	lsl	x13, x12, #2
	add	x14, x12, #1
	add	x12, x9, x13
	ldr	w15, [x12, #4]
	add	w15, w15, w10
	sub	w11, w15, w11
	str	w11, [x8, x13]
	ldr	w11, [x12, #4]
	add	w13, w11, w10
	str	w13, [x12]
	ldrsw	x13, [x0, #24]
	mov	x12, x14
	cmp	x14, x13
	b.lt	LBB0_4
LBB0_5:
	mov	x9, #0
LBB0_6:
	str	x9, [x0, #8]
	ret
	.cfi_endproc
                                        ; -- End function
	.no_dead_strip	_selectnewtape
.subsections_via_symbols
