	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function gdrom_identifydevice
_gdrom_identifydevice:                  ## @gdrom_identifydevice
	.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
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r14
	xorl	%eax, %eax
	callq	_gdrom_wait_clrbusy
	testl	%eax, %eax
	je	LBB0_5
## %bb.1:
	movq	_GDROM_COM_IDDEV@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	_GDROM_STATUSCOMMAND_REG@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_ctrl_outb
	xorl	%eax, %eax
	callq	_gdrom_wait_busy_sleeps
	testl	%eax, %eax
	je	LBB0_5
## %bb.2:
	xorl	%ebx, %ebx
	movq	_GDROM_DATA_REG@GOTPCREL(%rip), %r15
	.p2align	4, 0x90
LBB0_3:                                 ## =>This Inner Loop Header: Depth=1
	movl	(%r15), %edi
	callq	_ctrl_inw
	movw	%ax, (%r14,%rbx,2)
	incq	%rbx
	cmpq	$40, %rbx
	jne	LBB0_3
## %bb.4:
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_5:
	xorl	%edi, %edi
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_gdrom_getsense                 ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_GDROM_COM_IDDEV,4,2            ## @GDROM_COM_IDDEV
	.comm	_GDROM_STATUSCOMMAND_REG,4,2    ## @GDROM_STATUSCOMMAND_REG
	.comm	_GDROM_DATA_REG,4,2             ## @GDROM_DATA_REG
	.no_dead_strip	_gdrom_identifydevice
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function gdrom_identifydevice
_gdrom_identifydevice:                  ; @gdrom_identifydevice
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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
	bl	_gdrom_wait_clrbusy
	cbz	w0, LBB0_5
; %bb.1:
Lloh0:
	adrp	x8, _GDROM_COM_IDDEV@GOTPAGE
Lloh1:
	ldr	x8, [x8, _GDROM_COM_IDDEV@GOTPAGEOFF]
Lloh2:
	ldr	w0, [x8]
Lloh3:
	adrp	x8, _GDROM_STATUSCOMMAND_REG@GOTPAGE
Lloh4:
	ldr	x8, [x8, _GDROM_STATUSCOMMAND_REG@GOTPAGEOFF]
Lloh5:
	ldr	w1, [x8]
	bl	_ctrl_outb
	bl	_gdrom_wait_busy_sleeps
	cbz	w0, LBB0_5
; %bb.2:
	mov	x20, #0
Lloh6:
	adrp	x21, _GDROM_DATA_REG@GOTPAGE
Lloh7:
	ldr	x21, [x21, _GDROM_DATA_REG@GOTPAGEOFF]
LBB0_3:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w0, [x21]
	bl	_ctrl_inw
	strh	w0, [x19, x20]
	add	x20, x20, #2
	cmp	x20, #80
	b.ne	LBB0_3
; %bb.4:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
LBB0_5:
	mov	x0, #0
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	b	_gdrom_getsense
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh6, Lloh7
	.cfi_endproc
                                        ; -- End function
	.comm	_GDROM_COM_IDDEV,4,2            ; @GDROM_COM_IDDEV
	.comm	_GDROM_STATUSCOMMAND_REG,4,2    ; @GDROM_STATUSCOMMAND_REG
	.comm	_GDROM_DATA_REG,4,2             ; @GDROM_DATA_REG
	.no_dead_strip	_gdrom_identifydevice
.subsections_via_symbols
