	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_PBI_XLD_D1PutByte              ## -- Begin function PBI_XLD_D1PutByte
	.p2align	4, 0x90
_PBI_XLD_D1PutByte:                     ## @PBI_XLD_D1PutByte
	.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
	movl	%esi, %r15d
	movl	%edi, %eax
	andl	$-4, %eax
	cmpl	$53504, %eax                    ## imm = 0xD100
	je	LBB0_5
## %bb.1:
	movl	%edi, %esi
	cmpl	$53508, %eax                    ## imm = 0xD104
	jne	LBB0_14
## %bb.2:
	leaq	L_.str(%rip), %rdi
	xorl	%eax, %eax
	callq	_printf
	movl	%eax, %edi
	callq	_D
	movq	_VOTRAXSND_busy@GOTPCREL(%rip), %rax
	cmpq	$0, (%rax)
	je	LBB0_4
## %bb.3:
	movq	_TRUE@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_PBI_XLD_votrax_busy_callback
LBB0_4:
	movq	_votrax_latch@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	andl	$63, %edi
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_VOTRAXSND_PutByte              ## TAILCALL
LBB0_5:
	movq	_votrax_latch@GOTPCREL(%rip), %r14
	movl	$128, %eax
	andl	(%r14), %eax
	testb	$-128, %r15b
	je	LBB0_9
## %bb.6:
	testl	%eax, %eax
	jne	LBB0_9
## %bb.7:
	xorl	%eax, %eax
	callq	_Votrax_GetStatus
	testl	%eax, %eax
	je	LBB0_25
## %bb.8:
	movl	$128, %eax
	andl	(%r14), %eax
LBB0_9:
	testb	$-128, %r15b
	jne	LBB0_12
## %bb.10:
	testl	%eax, %eax
	je	LBB0_12
## %bb.11:
	movq	_VOICE_MASK@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	notl	%eax
	movq	_PBI_IRQ@GOTPCREL(%rip), %rcx
	andl	%eax, (%rcx)
	movq	_POKEY_OFFSET_IRQEN@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	_POKEY_IRQEN@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_POKEY_PutByte
	jmp	LBB0_12
LBB0_14:
	cmpl	$53512, %esi                    ## imm = 0xD108
	jne	LBB0_16
## %bb.15:
	movl	%r15d, %esi
	shrl	$7, %esi
	andl	$1, %esi
	movl	%r15d, %edx
	shrl	$6, %edx
	andl	$1, %edx
	movl	%r15d, %ecx
	shrl	$5, %ecx
	andl	$1, %ecx
	movl	%r15d, %r8d
	shrl	$4, %r8d
	andl	$1, %r8d
	movl	%r15d, %r9d
	shrl	$3, %r9d
	andl	$1, %r9d
	movl	%r15d, %r10d
	shrl	$2, %r10d
	andl	$1, %r10d
	movl	%r15d, %ebx
	shrl	%ebx
	andl	$1, %ebx
	movl	%r15d, %r11d
	andl	$1, %r11d
	subq	$8, %rsp
	leaq	L_.str.2(%rip), %rdi
	xorl	%eax, %eax
	pushq	%r11
	pushq	%rbx
	pushq	%r10
	callq	_printf
	addq	$32, %rsp
	movl	%eax, %edi
	callq	_D
	movq	_modem_latch@GOTPCREL(%rip), %rax
	movl	%r15d, (%rax)
	jmp	LBB0_13
LBB0_16:
	cmpl	$53520, %esi                    ## imm = 0xD110
	jne	LBB0_13
## %bb.17:
	movq	_xld_d_enabled@GOTPCREL(%rip), %rax
	cmpq	$0, (%rax)
	je	LBB0_13
## %bb.18:
	leaq	L_.str.3(%rip), %rdi
	movl	%r15d, %esi
	xorl	%eax, %eax
	callq	_printf
	movl	%eax, %edi
	callq	_D
	movq	_modem_latch@GOTPCREL(%rip), %rax
	testb	$-128, (%rax)
	jne	LBB0_19
## %bb.20:
	movq	_TransferStatus@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	_PIO_StatusRead@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	je	LBB0_22
## %bb.21:
	movq	_PIO_ReadFrame@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	je	LBB0_22
## %bb.24:
	movl	%r15d, %edi
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_PIO_PutByte                    ## TAILCALL
LBB0_25:
	leaq	L_.str.1(%rip), %rdi
	xorl	%eax, %eax
	callq	_printf
	movl	%eax, %edi
	callq	_D
	xorl	%eax, %eax
	callq	_CPU_GenerateIRQ
	movq	_VOICE_MASK@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movq	_PBI_IRQ@GOTPCREL(%rip), %rcx
	orl	%eax, (%rcx)
LBB0_12:
	movl	%r15d, (%r14)
LBB0_13:
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_19:
	movq	_CommandIndex@GOTPCREL(%rip), %rax
	movq	$0, (%rax)
	movq	_DataIndex@GOTPCREL(%rip), %rax
	movq	$0, (%rax)
	movq	_PIO_CommandFrame@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	_TransferStatus@GOTPCREL(%rip), %rcx
	movq	%rax, (%rcx)
	movq	_ExpectedBytes@GOTPCREL(%rip), %rax
	movl	$5, (%rax)
	leaq	L_.str.4(%rip), %rdi
	jmp	LBB0_23
LBB0_22:
	leaq	L_.str.5(%rip), %rdi
LBB0_23:
	xorl	%eax, %eax
	callq	_printf
	movl	%eax, %edi
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_D                              ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"votrax write:%4x\n"

	.comm	_VOTRAXSND_busy,8,3             ## @VOTRAXSND_busy
	.comm	_TRUE,4,2                       ## @TRUE
	.comm	_votrax_latch,4,2               ## @votrax_latch
L_.str.1:                               ## @.str.1
	.asciz	"votrax IRQ generated: IRQ enable changed and idle\n"

	.comm	_VOICE_MASK,4,2                 ## @VOICE_MASK
	.comm	_PBI_IRQ,4,2                    ## @PBI_IRQ
	.comm	_POKEY_OFFSET_IRQEN,4,2         ## @POKEY_OFFSET_IRQEN
	.comm	_POKEY_IRQEN,4,2                ## @POKEY_IRQEN
L_.str.2:                               ## @.str.2
	.asciz	"XLD 8040 T1:%d loop-back:%d modem+phone:%d offhook(modem relay):%d phaudio:%d DTMF:%d O/!A(originate/answer):%d SQT(squelch transmitter):%d\n"

	.comm	_modem_latch,4,2                ## @modem_latch
	.comm	_xld_d_enabled,8,3              ## @xld_d_enabled
L_.str.3:                               ## @.str.3
	.asciz	"d110: disk output byte:%2x\n"

	.comm	_CommandIndex,8,3               ## @CommandIndex
	.comm	_DataIndex,8,3                  ## @DataIndex
	.comm	_PIO_CommandFrame,8,3           ## @PIO_CommandFrame
	.comm	_TransferStatus,8,3             ## @TransferStatus
	.comm	_ExpectedBytes,4,2              ## @ExpectedBytes
L_.str.4:                               ## @.str.4
	.asciz	"command frame expected\n"

	.comm	_PIO_StatusRead,8,3             ## @PIO_StatusRead
	.comm	_PIO_ReadFrame,8,3              ## @PIO_ReadFrame
L_.str.5:                               ## @.str.5
	.asciz	"read ack strobe\n"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_PBI_XLD_D1PutByte              ; -- Begin function PBI_XLD_D1PutByte
	.p2align	2
_PBI_XLD_D1PutByte:                     ; @PBI_XLD_D1PutByte
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #96
	.cfi_def_cfa_offset 96
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	mov	x19, x1
                                        ; kill: def $w0 killed $w0 def $x0
	and	w8, w0, #0xfffffffc
	mov	w9, #53504
	cmp	w8, w9
	b.eq	LBB0_5
; %bb.1:
	mov	w9, #53508
	cmp	w8, w9
	b.ne	LBB0_12
; %bb.2:
	str	x0, [sp]
Lloh0:
	adrp	x0, l_.str@PAGE
Lloh1:
	add	x0, x0, l_.str@PAGEOFF
	bl	_printf
	bl	_D
Lloh2:
	adrp	x8, _VOTRAXSND_busy@GOTPAGE
Lloh3:
	ldr	x8, [x8, _VOTRAXSND_busy@GOTPAGEOFF]
Lloh4:
	ldr	x8, [x8]
	cbz	x8, LBB0_4
; %bb.3:
Lloh5:
	adrp	x8, _TRUE@GOTPAGE
Lloh6:
	ldr	x8, [x8, _TRUE@GOTPAGEOFF]
Lloh7:
	ldr	w0, [x8]
	bl	_PBI_XLD_votrax_busy_callback
LBB0_4:
Lloh8:
	adrp	x8, _votrax_latch@GOTPAGE
Lloh9:
	ldr	x8, [x8, _votrax_latch@GOTPAGEOFF]
Lloh10:
	ldr	w8, [x8]
	and	w0, w8, #0x3f
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	add	sp, sp, #96
	b	_VOTRAXSND_PutByte
LBB0_5:
Lloh11:
	adrp	x20, _votrax_latch@GOTPAGE
Lloh12:
	ldr	x20, [x20, _votrax_latch@GOTPAGEOFF]
	ldr	w8, [x20]
	and	w8, w8, #0x80
	tbz	w19, #7, LBB0_9
; %bb.6:
	cbnz	w8, LBB0_9
; %bb.7:
	bl	_Votrax_GetStatus
	cbz	w0, LBB0_19
; %bb.8:
	ldr	w8, [x20]
	and	w8, w8, #0x80
LBB0_9:
	tbnz	w19, #7, LBB0_20
; %bb.10:
	cbz	w8, LBB0_20
; %bb.11:
Lloh13:
	adrp	x8, _VOICE_MASK@GOTPAGE
Lloh14:
	ldr	x8, [x8, _VOICE_MASK@GOTPAGEOFF]
Lloh15:
	ldr	w8, [x8]
Lloh16:
	adrp	x9, _PBI_IRQ@GOTPAGE
Lloh17:
	ldr	x9, [x9, _PBI_IRQ@GOTPAGEOFF]
	ldr	w10, [x9]
	bic	w8, w10, w8
	str	w8, [x9]
Lloh18:
	adrp	x8, _POKEY_OFFSET_IRQEN@GOTPAGE
Lloh19:
	ldr	x8, [x8, _POKEY_OFFSET_IRQEN@GOTPAGEOFF]
Lloh20:
	ldr	w0, [x8]
Lloh21:
	adrp	x8, _POKEY_IRQEN@GOTPAGE
Lloh22:
	ldr	x8, [x8, _POKEY_IRQEN@GOTPAGEOFF]
Lloh23:
	ldr	w1, [x8]
	bl	_POKEY_PutByte
	b	LBB0_20
LBB0_12:
	mov	w8, #53512
	cmp	w0, w8
	b.ne	LBB0_14
; %bb.13:
	ubfx	w8, w19, #7, #1
	ubfx	w9, w19, #6, #1
	ubfx	w10, w19, #5, #1
	ubfx	w11, w19, #4, #1
	ubfx	w12, w19, #3, #1
	ubfx	w13, w19, #2, #1
	and	w14, w19, #0x1
	ubfx	w15, w19, #1, #1
	stp	x15, x14, [sp, #48]
	stp	x12, x13, [sp, #32]
	stp	x10, x11, [sp, #16]
Lloh24:
	adrp	x0, l_.str.2@PAGE
Lloh25:
	add	x0, x0, l_.str.2@PAGEOFF
	stp	x8, x9, [sp]
	bl	_printf
	bl	_D
Lloh26:
	adrp	x8, _modem_latch@GOTPAGE
Lloh27:
	ldr	x8, [x8, _modem_latch@GOTPAGEOFF]
Lloh28:
	str	w19, [x8]
	b	LBB0_21
LBB0_14:
	mov	w8, #53520
	cmp	w0, w8
	b.ne	LBB0_21
; %bb.15:
Lloh29:
	adrp	x8, _xld_d_enabled@GOTPAGE
Lloh30:
	ldr	x8, [x8, _xld_d_enabled@GOTPAGEOFF]
Lloh31:
	ldr	x8, [x8]
	cbz	x8, LBB0_21
; %bb.16:
	str	x19, [sp]
Lloh32:
	adrp	x0, l_.str.3@PAGE
Lloh33:
	add	x0, x0, l_.str.3@PAGEOFF
	bl	_printf
	bl	_D
Lloh34:
	adrp	x8, _modem_latch@GOTPAGE
Lloh35:
	ldr	x8, [x8, _modem_latch@GOTPAGEOFF]
	ldrb	w8, [x8]
	tbnz	w8, #7, LBB0_22
; %bb.17:
Lloh36:
	adrp	x8, _TransferStatus@GOTPAGE
Lloh37:
	ldr	x8, [x8, _TransferStatus@GOTPAGEOFF]
Lloh38:
	ldr	x8, [x8]
Lloh39:
	adrp	x9, _PIO_StatusRead@GOTPAGE
Lloh40:
	ldr	x9, [x9, _PIO_StatusRead@GOTPAGEOFF]
Lloh41:
	ldr	x9, [x9]
Lloh42:
	adrp	x10, _PIO_ReadFrame@GOTPAGE
Lloh43:
	ldr	x10, [x10, _PIO_ReadFrame@GOTPAGEOFF]
Lloh44:
	ldr	x10, [x10]
	cmp	x8, x9
	ccmp	x8, x10, #4, ne
	b.ne	LBB0_24
; %bb.18:
Lloh45:
	adrp	x0, l_.str.5@PAGE
Lloh46:
	add	x0, x0, l_.str.5@PAGEOFF
	b	LBB0_23
LBB0_19:
Lloh47:
	adrp	x0, l_.str.1@PAGE
Lloh48:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_printf
	bl	_D
	bl	_CPU_GenerateIRQ
Lloh49:
	adrp	x8, _VOICE_MASK@GOTPAGE
Lloh50:
	ldr	x8, [x8, _VOICE_MASK@GOTPAGEOFF]
Lloh51:
	ldr	w8, [x8]
Lloh52:
	adrp	x9, _PBI_IRQ@GOTPAGE
Lloh53:
	ldr	x9, [x9, _PBI_IRQ@GOTPAGEOFF]
	ldr	w10, [x9]
	orr	w8, w10, w8
	str	w8, [x9]
LBB0_20:
	str	w19, [x20]
LBB0_21:
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	add	sp, sp, #96
	ret
LBB0_22:
Lloh54:
	adrp	x8, _CommandIndex@GOTPAGE
Lloh55:
	ldr	x8, [x8, _CommandIndex@GOTPAGEOFF]
Lloh56:
	adrp	x9, _DataIndex@GOTPAGE
Lloh57:
	ldr	x9, [x9, _DataIndex@GOTPAGEOFF]
Lloh58:
	str	xzr, [x8]
Lloh59:
	str	xzr, [x9]
Lloh60:
	adrp	x8, _PIO_CommandFrame@GOTPAGE
Lloh61:
	ldr	x8, [x8, _PIO_CommandFrame@GOTPAGEOFF]
Lloh62:
	adrp	x9, _TransferStatus@GOTPAGE
Lloh63:
	ldr	x9, [x9, _TransferStatus@GOTPAGEOFF]
Lloh64:
	ldr	x8, [x8]
Lloh65:
	str	x8, [x9]
Lloh66:
	adrp	x8, _ExpectedBytes@GOTPAGE
Lloh67:
	ldr	x8, [x8, _ExpectedBytes@GOTPAGEOFF]
	mov	w9, #5
Lloh68:
	str	w9, [x8]
Lloh69:
	adrp	x0, l_.str.4@PAGE
Lloh70:
	add	x0, x0, l_.str.4@PAGEOFF
LBB0_23:
	bl	_printf
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	add	sp, sp, #96
	b	_D
LBB0_24:
	mov	x0, x19
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	add	sp, sp, #96
	b	_PIO_PutByte
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGot	Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGotStr	Lloh26, Lloh27, Lloh28
	.loh AdrpAdd	Lloh24, Lloh25
	.loh AdrpLdrGotLdr	Lloh29, Lloh30, Lloh31
	.loh AdrpLdrGot	Lloh34, Lloh35
	.loh AdrpAdd	Lloh32, Lloh33
	.loh AdrpLdrGotLdr	Lloh42, Lloh43, Lloh44
	.loh AdrpLdrGotLdr	Lloh39, Lloh40, Lloh41
	.loh AdrpLdrGotLdr	Lloh36, Lloh37, Lloh38
	.loh AdrpAdd	Lloh45, Lloh46
	.loh AdrpLdrGot	Lloh52, Lloh53
	.loh AdrpLdrGotLdr	Lloh49, Lloh50, Lloh51
	.loh AdrpAdd	Lloh47, Lloh48
	.loh AdrpAdd	Lloh69, Lloh70
	.loh AdrpLdrGotStr	Lloh66, Lloh67, Lloh68
	.loh AdrpLdrGotStr	Lloh62, Lloh63, Lloh65
	.loh AdrpLdrGotLdr	Lloh60, Lloh61, Lloh64
	.loh AdrpLdrGotStr	Lloh56, Lloh57, Lloh59
	.loh AdrpLdrGotStr	Lloh54, Lloh55, Lloh58
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"votrax write:%4x\n"

	.comm	_VOTRAXSND_busy,8,3             ; @VOTRAXSND_busy
	.comm	_TRUE,4,2                       ; @TRUE
	.comm	_votrax_latch,4,2               ; @votrax_latch
l_.str.1:                               ; @.str.1
	.asciz	"votrax IRQ generated: IRQ enable changed and idle\n"

	.comm	_VOICE_MASK,4,2                 ; @VOICE_MASK
	.comm	_PBI_IRQ,4,2                    ; @PBI_IRQ
	.comm	_POKEY_OFFSET_IRQEN,4,2         ; @POKEY_OFFSET_IRQEN
	.comm	_POKEY_IRQEN,4,2                ; @POKEY_IRQEN
l_.str.2:                               ; @.str.2
	.asciz	"XLD 8040 T1:%d loop-back:%d modem+phone:%d offhook(modem relay):%d phaudio:%d DTMF:%d O/!A(originate/answer):%d SQT(squelch transmitter):%d\n"

	.comm	_modem_latch,4,2                ; @modem_latch
	.comm	_xld_d_enabled,8,3              ; @xld_d_enabled
l_.str.3:                               ; @.str.3
	.asciz	"d110: disk output byte:%2x\n"

	.comm	_CommandIndex,8,3               ; @CommandIndex
	.comm	_DataIndex,8,3                  ; @DataIndex
	.comm	_PIO_CommandFrame,8,3           ; @PIO_CommandFrame
	.comm	_TransferStatus,8,3             ; @TransferStatus
	.comm	_ExpectedBytes,4,2              ; @ExpectedBytes
l_.str.4:                               ; @.str.4
	.asciz	"command frame expected\n"

	.comm	_PIO_StatusRead,8,3             ; @PIO_StatusRead
	.comm	_PIO_ReadFrame,8,3              ; @PIO_ReadFrame
l_.str.5:                               ; @.str.5
	.asciz	"read ack strobe\n"

.subsections_via_symbols
