	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function gdrom_execute_diagnostic
_gdrom_execute_diagnostic:              ## @gdrom_execute_diagnostic
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	movq	_gd@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_gdrom_hardreset
	xorl	%eax, %eax
	callq	_gdrom_wait_clrbusy
	testl	%eax, %eax
	je	LBB0_2
## %bb.1:
	movq	_GDROM_COM_EXECDIAG@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_2
## %bb.3:
	movq	_GDROM_ERROR_REG@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	popq	%rbp
	jmp	_ctrl_inb                       ## TAILCALL
LBB0_2:
	xorl	%eax, %eax
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_gd,4,2                         ## @gd
	.comm	_GDROM_COM_EXECDIAG,4,2         ## @GDROM_COM_EXECDIAG
	.comm	_GDROM_STATUSCOMMAND_REG,4,2    ## @GDROM_STATUSCOMMAND_REG
	.comm	_GDROM_ERROR_REG,4,2            ## @GDROM_ERROR_REG
	.no_dead_strip	_gdrom_execute_diagnostic
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function gdrom_execute_diagnostic
_gdrom_execute_diagnostic:              ; @gdrom_execute_diagnostic
	.cfi_startproc
; %bb.0:
	stp	x29, x30, [sp, #-16]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 16
	mov	x29, sp
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
Lloh0:
	adrp	x8, _gd@GOTPAGE
Lloh1:
	ldr	x8, [x8, _gd@GOTPAGEOFF]
Lloh2:
	ldr	w0, [x8]
	bl	_gdrom_hardreset
	bl	_gdrom_wait_clrbusy
	cbz	w0, LBB0_3
; %bb.1:
Lloh3:
	adrp	x8, _GDROM_COM_EXECDIAG@GOTPAGE
Lloh4:
	ldr	x8, [x8, _GDROM_COM_EXECDIAG@GOTPAGEOFF]
Lloh5:
	ldr	w0, [x8]
Lloh6:
	adrp	x8, _GDROM_STATUSCOMMAND_REG@GOTPAGE
Lloh7:
	ldr	x8, [x8, _GDROM_STATUSCOMMAND_REG@GOTPAGEOFF]
Lloh8:
	ldr	w1, [x8]
	bl	_ctrl_outb
	bl	_gdrom_wait_busy_sleeps
	cbz	w0, LBB0_3
; %bb.2:
Lloh9:
	adrp	x8, _GDROM_ERROR_REG@GOTPAGE
Lloh10:
	ldr	x8, [x8, _GDROM_ERROR_REG@GOTPAGEOFF]
Lloh11:
	ldr	w0, [x8]
	ldp	x29, x30, [sp], #16             ; 16-byte Folded Reload
	b	_ctrl_inb
LBB0_3:
	mov	w0, #0
	ldp	x29, x30, [sp], #16             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.cfi_endproc
                                        ; -- End function
	.comm	_gd,4,2                         ; @gd
	.comm	_GDROM_COM_EXECDIAG,4,2         ; @GDROM_COM_EXECDIAG
	.comm	_GDROM_STATUSCOMMAND_REG,4,2    ; @GDROM_STATUSCOMMAND_REG
	.comm	_GDROM_ERROR_REG,4,2            ; @GDROM_ERROR_REG
	.no_dead_strip	_gdrom_execute_diagnostic
.subsections_via_symbols
