	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function next_prev
_next_prev:                             ## @next_prev
	.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
	subq	$32, %rsp
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r14
	movq	_CMD_NEXT@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	cmpl	%esi, (%rax)
	sete	%r12b
	movq	_fd@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	_CDIOREADTOCHEADER@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	-48(%rbp), %rdx
	callq	_ioctl
	testl	%eax, %eax
	js	LBB0_9
## %bb.1:
	movl	-48(%rbp), %r15d
	subl	-44(%rbp), %r15d
	leaq	-36(%rbp), %rdi
	leaq	-56(%rbp), %rcx
	movq	%rcx, %rsi
	movq	%rcx, %rdx
	callq	_status
	testl	%eax, %eax
	js	LBB0_2
## %bb.3:
	movb	%r12b, %bl
	addl	%ebx, %ebx
	decl	%ebx
	testq	%r14, %r14
	je	LBB0_8
## %bb.4:
	cmpb	$0, (%r14)
	je	LBB0_8
## %bb.5:
	leaq	L_.str(%rip), %rsi
	leaq	-52(%rbp), %rdx
	movq	%r14, %rdi
	callq	_sscanf
	cmpl	$1, %eax
	jne	LBB0_6
## %bb.7:
	imull	-52(%rbp), %ebx
LBB0_8:
	addl	-36(%rbp), %ebx
	incl	%r15d
	cmpl	-48(%rbp), %ebx
	movl	$1, %eax
	cmovgl	%eax, %ebx
	movl	%ebx, -36(%rbp)
	movl	%ebx, %edi
	movl	$1, %esi
	movl	%r15d, %edx
	movl	$1, %ecx
	callq	_play_track
	jmp	LBB0_9
LBB0_2:
	movl	$-1, %eax
	jmp	LBB0_9
LBB0_6:
	leaq	L_.str.1(%rip), %rdi
	callq	_warnx
	xorl	%eax, %eax
LBB0_9:
	addq	$32, %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_CMD_NEXT,4,2                   ## @CMD_NEXT
	.comm	_fd,4,2                         ## @fd
	.comm	_CDIOREADTOCHEADER,4,2          ## @CDIOREADTOCHEADER
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"%u"

L_.str.1:                               ## @.str.1
	.asciz	"invalid command argument"

	.no_dead_strip	_next_prev
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function next_prev
_next_prev:                             ; @next_prev
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.cfi_def_cfa_offset 80
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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
	mov	x19, x0
Lloh0:
	adrp	x8, _CMD_NEXT@GOTPAGE
Lloh1:
	ldr	x8, [x8, _CMD_NEXT@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	cmp	w8, w1
	mov	w8, #1
	cneg	w20, w8, ne
Lloh3:
	adrp	x8, _fd@GOTPAGE
Lloh4:
	ldr	x8, [x8, _fd@GOTPAGEOFF]
Lloh5:
	ldr	w0, [x8]
Lloh6:
	adrp	x8, _CDIOREADTOCHEADER@GOTPAGE
Lloh7:
	ldr	x8, [x8, _CDIOREADTOCHEADER@GOTPAGEOFF]
Lloh8:
	ldr	w1, [x8]
	add	x2, sp, #24
	bl	_ioctl
	tbnz	w0, #31, LBB0_10
; %bb.1:
	ldp	w21, w22, [sp, #24]
	add	x0, sp, #12
	add	x1, sp, #20
	add	x2, sp, #20
	add	x3, sp, #20
	bl	_status
	tbnz	w0, #31, LBB0_6
; %bb.2:
	cbz	x19, LBB0_7
; %bb.3:
	ldrb	w8, [x19]
	cbz	w8, LBB0_7
; %bb.4:
Lloh9:
	adrp	x1, l_.str@PAGE
Lloh10:
	add	x1, x1, l_.str@PAGEOFF
	add	x2, sp, #16
	mov	x0, x19
	bl	_sscanf
	cmp	w0, #1
	b.ne	LBB0_9
; %bb.5:
	ldp	w9, w8, [sp, #12]
	madd	w8, w8, w20, w9
	b	LBB0_8
LBB0_6:
	mov	w0, #-1
	b	LBB0_10
LBB0_7:
	ldr	w8, [sp, #12]
	add	w8, w8, w20
LBB0_8:
	sub	w9, w21, w22
	add	w2, w9, #1
	ldr	w9, [sp, #24]
	cmp	w8, w9
	csinc	w0, w8, wzr, le
	str	w0, [sp, #12]
	mov	w1, #1
	mov	w3, #1
	bl	_play_track
	b	LBB0_10
LBB0_9:
Lloh11:
	adrp	x0, l_.str.1@PAGE
Lloh12:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_warnx
	mov	w0, #0
LBB0_10:
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #80
	ret
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpAdd	Lloh11, Lloh12
	.cfi_endproc
                                        ; -- End function
	.comm	_CMD_NEXT,4,2                   ; @CMD_NEXT
	.comm	_fd,4,2                         ; @fd
	.comm	_CDIOREADTOCHEADER,4,2          ; @CDIOREADTOCHEADER
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"%u"

l_.str.1:                               ; @.str.1
	.asciz	"invalid command argument"

	.no_dead_strip	_next_prev
.subsections_via_symbols
