	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ide_cdrom_get_capabilities     ## -- Begin function ide_cdrom_get_capabilities
	.p2align	4, 0x90
_ide_cdrom_get_capabilities:            ## @ide_cdrom_get_capabilities
	.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	%r13
	pushq	%r12
	pushq	%rbx
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %r14
	movq	%rdi, %r15
	movq	8(%rdi), %r13
	movq	_ATAPI_CAPABILITIES_PAGE_SIZE@GOTPCREL(%rip), %rax
	movl	(%rax), %r12d
	movq	_IDE_DBG_FUNC@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str(%rip), %rsi
	callq	_ide_debug_log
	movq	_IDE_AFLAG_FULL_CAPS_PAGE@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	xorl	%eax, %eax
	andl	(%r15), %ecx
	jne	LBB0_2
## %bb.1:
	movq	_ATAPI_CAPABILITIES_PAGE_PAD_SIZE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
LBB0_2:
	subl	%eax, %r12d
	movq	_CGC_DATA_UNKNOWN@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	leaq	-48(%rbp), %r15
	movq	%r15, %rdi
	movq	%r14, %rsi
	movl	%r12d, %edx
	callq	_init_cdrom_command
	movl	$-2, %ebx
	movq	_GPMODE_CAPABILITIES_PAGE@GOTPCREL(%rip), %r14
	.p2align	4, 0x90
LBB0_3:                                 ## =>This Inner Loop Header: Depth=1
	movl	(%r14), %edx
	movq	%r13, %rdi
	movq	%r15, %rsi
	xorl	%ecx, %ecx
	callq	_cdrom_mode_sense
	testl	%eax, %eax
	je	LBB0_5
## %bb.4:                               ##   in Loop: Header=BB0_3 Depth=1
	leal	1(%rbx), %ecx
	testl	%ebx, %ebx
	movl	%ecx, %ebx
	jne	LBB0_3
LBB0_5:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_ATAPI_CAPABILITIES_PAGE_SIZE,4,2 ## @ATAPI_CAPABILITIES_PAGE_SIZE
	.comm	_IDE_DBG_FUNC,4,2               ## @IDE_DBG_FUNC
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"enter"

	.comm	_IDE_AFLAG_FULL_CAPS_PAGE,4,2   ## @IDE_AFLAG_FULL_CAPS_PAGE
	.comm	_ATAPI_CAPABILITIES_PAGE_PAD_SIZE,8,3 ## @ATAPI_CAPABILITIES_PAGE_PAD_SIZE
	.comm	_CGC_DATA_UNKNOWN,4,2           ## @CGC_DATA_UNKNOWN
	.comm	_GPMODE_CAPABILITIES_PAGE,4,2   ## @GPMODE_CAPABILITIES_PAGE
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ide_cdrom_get_capabilities     ; -- Begin function ide_cdrom_get_capabilities
	.p2align	2
_ide_cdrom_get_capabilities:            ; @ide_cdrom_get_capabilities
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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	x20, x1
	mov	x21, x0
	ldr	x19, [x0, #8]
Lloh0:
	adrp	x8, _ATAPI_CAPABILITIES_PAGE_SIZE@GOTPAGE
Lloh1:
	ldr	x8, [x8, _ATAPI_CAPABILITIES_PAGE_SIZE@GOTPAGEOFF]
Lloh2:
	ldr	w22, [x8]
Lloh3:
	adrp	x8, _IDE_DBG_FUNC@GOTPAGE
Lloh4:
	ldr	x8, [x8, _IDE_DBG_FUNC@GOTPAGEOFF]
Lloh5:
	ldr	w0, [x8]
Lloh6:
	adrp	x1, l_.str@PAGE
Lloh7:
	add	x1, x1, l_.str@PAGEOFF
	bl	_ide_debug_log
	ldr	w8, [x21]
Lloh8:
	adrp	x9, _IDE_AFLAG_FULL_CAPS_PAGE@GOTPAGE
Lloh9:
	ldr	x9, [x9, _IDE_AFLAG_FULL_CAPS_PAGE@GOTPAGEOFF]
Lloh10:
	ldr	w9, [x9]
Lloh11:
	adrp	x10, _ATAPI_CAPABILITIES_PAGE_PAD_SIZE@GOTPAGE
Lloh12:
	ldr	x10, [x10, _ATAPI_CAPABILITIES_PAGE_PAD_SIZE@GOTPAGEOFF]
Lloh13:
	ldr	w10, [x10]
	tst	w9, w8
	csel	w8, w10, wzr, eq
	sub	w2, w22, w8
Lloh14:
	adrp	x8, _CGC_DATA_UNKNOWN@GOTPAGE
Lloh15:
	ldr	x8, [x8, _CGC_DATA_UNKNOWN@GOTPAGEOFF]
Lloh16:
	ldr	w3, [x8]
	add	x0, sp, #8
	mov	x1, x20
	bl	_init_cdrom_command
Lloh17:
	adrp	x20, _GPMODE_CAPABILITIES_PAGE@GOTPAGE
Lloh18:
	ldr	x20, [x20, _GPMODE_CAPABILITIES_PAGE@GOTPAGEOFF]
	ldr	w2, [x20]
	add	x1, sp, #8
	mov	x0, x19
	mov	w3, #0
	bl	_cdrom_mode_sense
	cbz	w0, LBB0_3
; %bb.1:
	ldr	w2, [x20]
	add	x1, sp, #8
	mov	x0, x19
	mov	w3, #0
	bl	_cdrom_mode_sense
	cbz	w0, LBB0_3
; %bb.2:
	ldr	w2, [x20]
	add	x1, sp, #8
	mov	x0, x19
	mov	w3, #0
	bl	_cdrom_mode_sense
LBB0_3:
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #64
	ret
	.loh AdrpLdrGot	Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_ATAPI_CAPABILITIES_PAGE_SIZE,4,2 ; @ATAPI_CAPABILITIES_PAGE_SIZE
	.comm	_IDE_DBG_FUNC,4,2               ; @IDE_DBG_FUNC
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"enter"

	.comm	_IDE_AFLAG_FULL_CAPS_PAGE,4,2   ; @IDE_AFLAG_FULL_CAPS_PAGE
	.comm	_ATAPI_CAPABILITIES_PAGE_PAD_SIZE,8,3 ; @ATAPI_CAPABILITIES_PAGE_PAD_SIZE
	.comm	_CGC_DATA_UNKNOWN,4,2           ; @CGC_DATA_UNKNOWN
	.comm	_GPMODE_CAPABILITIES_PAGE,4,2   ; @GPMODE_CAPABILITIES_PAGE
.subsections_via_symbols
