	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function m88rs2000_read_ber
_m88rs2000_read_ber:                    ## @m88rs2000_read_ber
	.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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %r15
	movq	(%rdi), %rbx
	movq	%rbx, %rdi
	movl	$154, %esi
	movl	$48, %edx
	callq	_m88rs2000_writereg
	movq	%rbx, %rdi
	movl	$216, %esi
	callq	_m88rs2000_readreg
	movl	%eax, %r14d
	testb	$16, %r14b
	jne	LBB0_1
## %bb.2:
	movq	%rbx, %rdi
	movl	$215, %esi
	callq	_m88rs2000_readreg
	movl	%eax, %r12d
	shll	$8, %r12d
	movq	%rbx, %rdi
	movl	$214, %esi
	callq	_m88rs2000_readreg
	orl	%r12d, %eax
	movl	%eax, (%r15)
	movq	%rbx, %rdi
	movl	$217, %esi
	callq	_m88rs2000_readreg
                                        ## kill: def $eax killed $eax def $rax
	andl	$-8, %eax
	leal	4(%rax), %edx
	movq	%rbx, %rdi
	movl	$217, %esi
	callq	_m88rs2000_writereg
	andl	$-57, %r14d
	orl	$48, %r14d
	movq	%rbx, %rdi
	movl	$216, %esi
	movl	%r14d, %edx
	callq	_m88rs2000_writereg
	movq	%rbx, %rdi
	movl	$216, %esi
	movl	%r14d, %edx
	callq	_m88rs2000_writereg
	movq	%rbx, %rdi
	movl	$154, %esi
	movl	$176, %edx
	callq	_m88rs2000_writereg
	jmp	LBB0_3
LBB0_1:
	movq	%rbx, %rdi
	movl	$154, %esi
	movl	$176, %edx
	callq	_m88rs2000_writereg
	movl	$-1, (%r15)
LBB0_3:
	xorl	%eax, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.no_dead_strip	_m88rs2000_read_ber
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function m88rs2000_read_ber
_m88rs2000_read_ber:                    ; @m88rs2000_read_ber
	.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	x20, x1
	ldr	x19, [x0]
	mov	x0, x19
	mov	w1, #154
	mov	w2, #48
	bl	_m88rs2000_writereg
	mov	x0, x19
	mov	w1, #216
	bl	_m88rs2000_readreg
	tbnz	w0, #4, LBB0_2
; %bb.1:
	mov	x21, x0
	mov	x0, x19
	mov	w1, #215
	bl	_m88rs2000_readreg
	mov	x22, x0
	mov	x0, x19
	mov	w1, #214
	bl	_m88rs2000_readreg
	orr	w8, w0, w22, lsl #8
	str	w8, [x20]
	mov	x0, x19
	mov	w1, #217
	bl	_m88rs2000_readreg
	and	w8, w0, #0xfffffff8
	orr	w2, w8, #0x4
	mov	x0, x19
	mov	w1, #217
	bl	_m88rs2000_writereg
	and	w8, w21, #0xffffffc7
	orr	w20, w8, #0x30
	mov	x0, x19
	mov	w1, #216
	mov	x2, x20
	bl	_m88rs2000_writereg
	mov	x0, x19
	mov	w1, #216
	mov	x2, x20
	bl	_m88rs2000_writereg
	mov	x0, x19
	mov	w1, #154
	mov	w2, #176
	bl	_m88rs2000_writereg
	b	LBB0_3
LBB0_2:
	mov	x0, x19
	mov	w1, #154
	mov	w2, #176
	bl	_m88rs2000_writereg
	mov	w8, #-1
	str	w8, [x20]
LBB0_3:
	mov	w0, #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
	ret
	.cfi_endproc
                                        ; -- End function
	.no_dead_strip	_m88rs2000_read_ber
.subsections_via_symbols
