	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function Devices_B_Write
_Devices_B_Write:                       ## @Devices_B_Write
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%rbx
	pushq	%rax
	.cfi_offset %rbx, -24
	movq	_CPU_regA@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	movq	_devbug@GOTPCREL(%rip), %rax
	cmpq	$0, (%rax)
	je	LBB0_2
## %bb.1:
	movq	_dev_b_status@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str(%rip), %rdi
	movl	%ebx, %edx
	movl	%ebx, %ecx
	callq	_Log_print
LBB0_2:
	movq	_dev_b_status@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movl	$135, %edx
	cmpq	$6, %rcx
	ja	LBB0_4
## %bb.3:
	xorl	%edx, %edx
	cmpl	$155, %ebx
	cmovnel	%ebx, %edx
	movq	8(%rax), %rsi
	leal	1(%rcx), %edi
	movl	%edi, (%rax)
	movl	%edx, (%rsi,%rcx,4)
	movl	$1, %edx
LBB0_4:
	movq	_CPU_regY@GOTPCREL(%rip), %rax
	movl	%edx, (%rax)
	addq	$8, %rsp
	popq	%rbx
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_CPU_regA,4,2                   ## @CPU_regA
	.comm	_devbug,8,3                     ## @devbug
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"B: WRITE ([%d] %02X, '%c')"

	.comm	_dev_b_status,16,3              ## @dev_b_status
	.comm	_CPU_regY,4,2                   ## @CPU_regY
	.comm	_CPU_SetN,4,2                   ## @CPU_SetN
	.comm	_CPU_ClrN,4,2                   ## @CPU_ClrN
	.no_dead_strip	_Devices_B_Write
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function Devices_B_Write
_Devices_B_Write:                       ; @Devices_B_Write
	.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
Lloh0:
	adrp	x8, _CPU_regA@GOTPAGE
Lloh1:
	ldr	x8, [x8, _CPU_regA@GOTPAGEOFF]
Lloh2:
	ldr	w19, [x8]
Lloh3:
	adrp	x8, _devbug@GOTPAGE
Lloh4:
	ldr	x8, [x8, _devbug@GOTPAGEOFF]
Lloh5:
	ldr	x8, [x8]
Lloh6:
	adrp	x20, _dev_b_status@GOTPAGE
Lloh7:
	ldr	x20, [x20, _dev_b_status@GOTPAGEOFF]
	cbz	x8, LBB0_2
; %bb.1:
	ldr	w1, [x20]
Lloh8:
	adrp	x0, l_.str@PAGE
Lloh9:
	add	x0, x0, l_.str@PAGEOFF
	mov	x2, x19
	mov	x3, x19
	bl	_Log_print
LBB0_2:
	ldr	w8, [x20]
	cmp	w8, #6
	b.ls	LBB0_4
; %bb.3:
	mov	w8, #135
	b	LBB0_5
LBB0_4:
	cmp	w19, #155
	csel	w9, wzr, w19, eq
	ldr	x10, [x20, #8]
	add	w11, w8, #1
	str	w11, [x20]
	str	w9, [x10, x8, lsl #2]
	mov	w8, #1
LBB0_5:
Lloh10:
	adrp	x9, _CPU_regY@GOTPAGE
Lloh11:
	ldr	x9, [x9, _CPU_regY@GOTPAGEOFF]
Lloh12:
	str	w8, [x9]
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpLdrGotStr	Lloh10, Lloh11, Lloh12
	.cfi_endproc
                                        ; -- End function
	.comm	_CPU_regA,4,2                   ; @CPU_regA
	.comm	_devbug,8,3                     ; @devbug
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"B: WRITE ([%d] %02X, '%c')"

	.comm	_dev_b_status,16,3              ; @dev_b_status
	.comm	_CPU_regY,4,2                   ; @CPU_regY
	.comm	_CPU_SetN,4,2                   ; @CPU_SetN
	.comm	_CPU_ClrN,4,2                   ; @CPU_ClrN
	.no_dead_strip	_Devices_B_Write
.subsections_via_symbols
