	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function output_byte
_output_byte:                           ## @output_byte
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r14
	pushq	%rbx
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movl	%edi, %r14d
	xorl	%eax, %eax
	callq	_wait_til_ready
	movl	$-1, %ebx
	testl	%eax, %eax
	js	LBB0_5
## %bb.1:
	movq	_STATUS_READY@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	movq	_STATUS_DIR@GOTPCREL(%rip), %rdx
	movl	(%rdx), %edx
	orl	%ecx, %edx
	movq	_STATUS_DMA@GOTPCREL(%rip), %rsi
	orl	(%rsi), %edx
	andl	%eax, %edx
	cmpl	%ecx, %edx
	jne	LBB0_3
## %bb.2:
	movq	_FD_DATA@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movsbl	%r14b, %edi
	callq	_fd_outb
	xorl	%ebx, %ebx
	jmp	LBB0_5
LBB0_3:
	movq	_FDCS@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	movl	$1, (%rcx)
	movq	_initialising@GOTPCREL(%rip), %rcx
	cmpl	$0, (%rcx)
	jne	LBB0_5
## %bb.4:
	movq	_fdc@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edx
	movsbl	%r14b, %esi
	leaq	L_.str(%rip), %rdi
	movl	%eax, %ecx
	callq	_DPRINT
	xorl	%eax, %eax
	callq	_show_floppy
LBB0_5:
	movl	%ebx, %eax
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_STATUS_READY,4,2               ## @STATUS_READY
	.comm	_STATUS_DIR,4,2                 ## @STATUS_DIR
	.comm	_STATUS_DMA,4,2                 ## @STATUS_DMA
	.comm	_FD_DATA,4,2                    ## @FD_DATA
	.comm	_FDCS,8,3                       ## @FDCS
	.comm	_initialising,4,2               ## @initialising
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Unable to send byte %x to FDC. Fdc=%x Status=%x\n"

	.comm	_fdc,4,2                        ## @fdc
	.comm	_OLOGSIZE,8,3                   ## @OLOGSIZE
	.comm	_jiffies,4,2                    ## @jiffies
	.comm	_output_log,8,3                 ## @output_log
	.comm	_output_log_pos,8,3             ## @output_log_pos
	.no_dead_strip	_output_byte
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function output_byte
_output_byte:                           ; @output_byte
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	mov	x19, x0
	bl	_wait_til_ready
	tbnz	w0, #31, LBB0_5
; %bb.1:
	mov	x3, x0
Lloh0:
	adrp	x8, _STATUS_READY@GOTPAGE
Lloh1:
	ldr	x8, [x8, _STATUS_READY@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
Lloh3:
	adrp	x9, _STATUS_DIR@GOTPAGE
Lloh4:
	ldr	x9, [x9, _STATUS_DIR@GOTPAGEOFF]
Lloh5:
	ldr	w9, [x9]
	orr	w9, w9, w8
Lloh6:
	adrp	x10, _STATUS_DMA@GOTPAGE
Lloh7:
	ldr	x10, [x10, _STATUS_DMA@GOTPAGEOFF]
Lloh8:
	ldr	w10, [x10]
	orr	w9, w9, w10
	and	w9, w9, w0
	cmp	w9, w8
	b.ne	LBB0_3
; %bb.2:
Lloh9:
	adrp	x8, _FD_DATA@GOTPAGE
Lloh10:
	ldr	x8, [x8, _FD_DATA@GOTPAGEOFF]
Lloh11:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_fd_outb
	mov	w0, #0
	b	LBB0_6
LBB0_3:
Lloh12:
	adrp	x8, _FDCS@GOTPAGE
Lloh13:
	ldr	x8, [x8, _FDCS@GOTPAGEOFF]
Lloh14:
	ldr	x8, [x8]
	mov	w9, #1
	str	w9, [x8]
Lloh15:
	adrp	x8, _initialising@GOTPAGE
Lloh16:
	ldr	x8, [x8, _initialising@GOTPAGEOFF]
Lloh17:
	ldr	w8, [x8]
	cbnz	w8, LBB0_5
; %bb.4:
Lloh18:
	adrp	x8, _fdc@GOTPAGE
Lloh19:
	ldr	x8, [x8, _fdc@GOTPAGEOFF]
Lloh20:
	ldr	w2, [x8]
Lloh21:
	adrp	x0, l_.str@PAGE
Lloh22:
	add	x0, x0, l_.str@PAGEOFF
	mov	x1, x19
	bl	_DPRINT
	bl	_show_floppy
LBB0_5:
	mov	w0, #-1
LBB0_6:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpAdd	Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.cfi_endproc
                                        ; -- End function
	.comm	_STATUS_READY,4,2               ; @STATUS_READY
	.comm	_STATUS_DIR,4,2                 ; @STATUS_DIR
	.comm	_STATUS_DMA,4,2                 ; @STATUS_DMA
	.comm	_FD_DATA,4,2                    ; @FD_DATA
	.comm	_FDCS,8,3                       ; @FDCS
	.comm	_initialising,4,2               ; @initialising
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Unable to send byte %x to FDC. Fdc=%x Status=%x\n"

	.comm	_fdc,4,2                        ; @fdc
	.comm	_OLOGSIZE,8,3                   ; @OLOGSIZE
	.comm	_jiffies,4,2                    ; @jiffies
	.comm	_output_log,8,3                 ; @output_log
	.comm	_output_log_pos,8,3             ; @output_log_pos
	.no_dead_strip	_output_byte
.subsections_via_symbols
