	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function cdrom_ioctl_disc_status
_cdrom_ioctl_disc_status:               ## @cdrom_ioctl_disc_status
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%rbx
	subq	$40, %rsp
	.cfi_offset %rbx, -24
	movq	%rdi, %rbx
	movq	_CD_DO_IOCTL@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str(%rip), %rsi
	callq	_cdinfo
	leaq	-48(%rbp), %rsi
	movq	%rbx, %rdi
	callq	_cdrom_count_tracks
	movl	-48(%rbp), %eax
	testl	%eax, %eax
	jne	LBB0_15
## %bb.1:
	cmpq	$0, -40(%rbp)
	jle	LBB0_7
## %bb.2:
	cmpq	$0, -32(%rbp)
	jne	LBB0_6
## %bb.3:
	cmpq	$0, -24(%rbp)
	jne	LBB0_6
## %bb.4:
	cmpq	$0, -16(%rbp)
	jne	LBB0_6
## %bb.5:
	movq	_CDS_AUDIO@GOTPCREL(%rip), %rax
	jmp	LBB0_14
LBB0_7:
	cmpq	$0, -24(%rbp)
	jle	LBB0_9
## %bb.8:
	movq	_CDS_XA_2_2@GOTPCREL(%rip), %rax
	jmp	LBB0_14
LBB0_6:
	movq	_CDS_MIXED@GOTPCREL(%rip), %rax
	jmp	LBB0_14
LBB0_9:
	cmpq	$0, -16(%rbp)
	jle	LBB0_11
## %bb.10:
	movq	_CDS_XA_2_1@GOTPCREL(%rip), %rax
	jmp	LBB0_14
LBB0_11:
	cmpq	$0, -32(%rbp)
	jle	LBB0_13
## %bb.12:
	movq	_CDS_DATA_1@GOTPCREL(%rip), %rax
	jmp	LBB0_14
LBB0_13:
	movq	_CD_WARNING@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str.1(%rip), %rsi
	callq	_cdinfo
	movq	_CDS_NO_INFO@GOTPCREL(%rip), %rax
LBB0_14:
	movl	(%rax), %eax
LBB0_15:
	addq	$40, %rsp
	popq	%rbx
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_CD_DO_IOCTL,4,2                ## @CD_DO_IOCTL
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"entering CDROM_DISC_STATUS\n"

	.comm	_CDS_AUDIO,4,2                  ## @CDS_AUDIO
	.comm	_CDS_MIXED,4,2                  ## @CDS_MIXED
	.comm	_CDS_XA_2_2,4,2                 ## @CDS_XA_2_2
	.comm	_CDS_XA_2_1,4,2                 ## @CDS_XA_2_1
	.comm	_CDS_DATA_1,4,2                 ## @CDS_DATA_1
	.comm	_CD_WARNING,4,2                 ## @CD_WARNING
L_.str.1:                               ## @.str.1
	.asciz	"This disc doesn't have any tracks I recognize!\n"

	.comm	_CDS_NO_INFO,4,2                ## @CDS_NO_INFO
	.no_dead_strip	_cdrom_ioctl_disc_status
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function cdrom_ioctl_disc_status
_cdrom_ioctl_disc_status:               ; @cdrom_ioctl_disc_status
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.cfi_def_cfa_offset 80
	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
	mov	x19, x0
Lloh0:
	adrp	x8, _CD_DO_IOCTL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _CD_DO_IOCTL@GOTPAGEOFF]
Lloh2:
	ldr	w0, [x8]
Lloh3:
	adrp	x1, l_.str@PAGE
Lloh4:
	add	x1, x1, l_.str@PAGEOFF
	bl	_cdinfo
	add	x1, sp, #8
	mov	x0, x19
	bl	_cdrom_count_tracks
	ldr	w0, [sp, #8]
	cbnz	w0, LBB0_15
; %bb.1:
	ldr	x8, [sp, #16]
	cmp	x8, #1
	b.lt	LBB0_6
; %bb.2:
	ldr	x8, [sp, #24]
	cbnz	x8, LBB0_8
; %bb.3:
	ldr	x8, [sp, #32]
	cbnz	x8, LBB0_8
; %bb.4:
	ldr	x8, [sp, #40]
	cbnz	x8, LBB0_8
; %bb.5:
Lloh5:
	adrp	x8, _CDS_AUDIO@GOTPAGE
Lloh6:
	ldr	x8, [x8, _CDS_AUDIO@GOTPAGEOFF]
	b	LBB0_14
LBB0_6:
	ldr	x8, [sp, #32]
	cmp	x8, #1
	b.lt	LBB0_9
; %bb.7:
Lloh7:
	adrp	x8, _CDS_XA_2_2@GOTPAGE
Lloh8:
	ldr	x8, [x8, _CDS_XA_2_2@GOTPAGEOFF]
	b	LBB0_14
LBB0_8:
Lloh9:
	adrp	x8, _CDS_MIXED@GOTPAGE
Lloh10:
	ldr	x8, [x8, _CDS_MIXED@GOTPAGEOFF]
	b	LBB0_14
LBB0_9:
	ldr	x8, [sp, #40]
	cmp	x8, #1
	b.lt	LBB0_11
; %bb.10:
Lloh11:
	adrp	x8, _CDS_XA_2_1@GOTPAGE
Lloh12:
	ldr	x8, [x8, _CDS_XA_2_1@GOTPAGEOFF]
	b	LBB0_14
LBB0_11:
	ldr	x8, [sp, #24]
	cmp	x8, #1
	b.lt	LBB0_13
; %bb.12:
Lloh13:
	adrp	x8, _CDS_DATA_1@GOTPAGE
Lloh14:
	ldr	x8, [x8, _CDS_DATA_1@GOTPAGEOFF]
	b	LBB0_14
LBB0_13:
Lloh15:
	adrp	x8, _CD_WARNING@GOTPAGE
Lloh16:
	ldr	x8, [x8, _CD_WARNING@GOTPAGEOFF]
Lloh17:
	ldr	w0, [x8]
Lloh18:
	adrp	x1, l_.str.1@PAGE
Lloh19:
	add	x1, x1, l_.str.1@PAGEOFF
	bl	_cdinfo
Lloh20:
	adrp	x8, _CDS_NO_INFO@GOTPAGE
Lloh21:
	ldr	x8, [x8, _CDS_NO_INFO@GOTPAGEOFF]
LBB0_14:
	ldr	w0, [x8]
LBB0_15:
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	add	sp, sp, #80
	ret
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh11, Lloh12
	.loh AdrpLdrGot	Lloh13, Lloh14
	.loh AdrpLdrGot	Lloh20, Lloh21
	.loh AdrpAdd	Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.cfi_endproc
                                        ; -- End function
	.comm	_CD_DO_IOCTL,4,2                ; @CD_DO_IOCTL
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"entering CDROM_DISC_STATUS\n"

	.comm	_CDS_AUDIO,4,2                  ; @CDS_AUDIO
	.comm	_CDS_MIXED,4,2                  ; @CDS_MIXED
	.comm	_CDS_XA_2_2,4,2                 ; @CDS_XA_2_2
	.comm	_CDS_XA_2_1,4,2                 ; @CDS_XA_2_1
	.comm	_CDS_DATA_1,4,2                 ; @CDS_DATA_1
	.comm	_CD_WARNING,4,2                 ; @CD_WARNING
l_.str.1:                               ; @.str.1
	.asciz	"This disc doesn't have any tracks I recognize!\n"

	.comm	_CDS_NO_INFO,4,2                ; @CDS_NO_INFO
	.no_dead_strip	_cdrom_ioctl_disc_status
.subsections_via_symbols
