	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function do_read_onechip
_do_read_onechip:                       ## @do_read_onechip
	.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	%r13
	pushq	%r12
	pushq	%rbx
	subq	$40, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%r8, -64(%rbp)                  ## 8-byte Spill
	movq	%rcx, -72(%rbp)                 ## 8-byte Spill
	movl	%edx, %r15d
	movq	%rsi, %r13
	movq	%rdi, %rbx
	addl	16(%rsi), %r15d
	callq	_map_bankwidth
	negl	%eax
	andl	%r15d, %eax
	movslq	%eax, %r14
	leaq	8(%r13), %r12
	movq	%r12, %rdi
	callq	_mutex_lock
	movq	_FL_READY@GOTPCREL(%rip), %rax
	movq	(%rax), %rcx
	movq	%rbx, -56(%rbp)                 ## 8-byte Spill
	movq	%rbx, %rdi
	movq	%r13, %rsi
	movq	%r14, -48(%rbp)                 ## 8-byte Spill
	movq	%r14, %rdx
	callq	_get_chip
	movl	%eax, %r14d
	testl	%eax, %eax
	jne	LBB0_5
## %bb.1:
	movq	(%r13), %rax
	movq	_FL_POINT@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	movq	-56(%rbp), %rbx                 ## 8-byte Reload
	je	LBB0_4
## %bb.2:
	movq	_FL_READY@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	je	LBB0_4
## %bb.3:
	movl	$255, %edi
	callq	_CMD
	movq	%rbx, %rdi
	movl	%eax, %esi
	movq	-48(%rbp), %rdx                 ## 8-byte Reload
	callq	_map_write
	movq	_FL_READY@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, (%r13)
LBB0_4:
	movq	%rbx, %rdi
	movq	-64(%rbp), %rsi                 ## 8-byte Reload
	movl	%r15d, %edx
	movq	-72(%rbp), %rcx                 ## 8-byte Reload
	callq	_map_copy_from
	movq	%rbx, %rdi
	movq	%r13, %rsi
	movq	-48(%rbp), %rdx                 ## 8-byte Reload
	callq	_put_chip
LBB0_5:
	movq	%r12, %rdi
	callq	_mutex_unlock
	movl	%r14d, %eax
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_FL_READY,8,3                   ## @FL_READY
	.comm	_FL_POINT,8,3                   ## @FL_POINT
	.no_dead_strip	_do_read_onechip
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function do_read_onechip
_do_read_onechip:                       ; @do_read_onechip
	.cfi_startproc
; %bb.0:
	stp	x28, x27, [sp, #-96]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	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
	.cfi_offset w21, -40
	.cfi_offset w22, -48
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	mov	x22, x4
	mov	x21, x3
	mov	x19, x1
	mov	x20, x0
	ldr	w8, [x1, #16]
	add	w24, w8, w2
	bl	_map_bankwidth
	neg	w8, w0
	and	w8, w24, w8
	sxtw	x25, w8
	add	x23, x19, #8
	mov	x0, x23
	bl	_mutex_lock
Lloh0:
	adrp	x27, _FL_READY@GOTPAGE
Lloh1:
	ldr	x27, [x27, _FL_READY@GOTPAGEOFF]
	ldr	x3, [x27]
	mov	x0, x20
	mov	x1, x19
	mov	x2, x25
	bl	_get_chip
	mov	x26, x0
	cbnz	w0, LBB0_4
; %bb.1:
	ldr	x8, [x19]
Lloh2:
	adrp	x9, _FL_POINT@GOTPAGE
Lloh3:
	ldr	x9, [x9, _FL_POINT@GOTPAGEOFF]
Lloh4:
	ldr	x9, [x9]
	ldr	x10, [x27]
	cmp	x8, x9
	ccmp	x8, x10, #4, ne
	b.eq	LBB0_3
; %bb.2:
	mov	w0, #255
	bl	_CMD
	mov	x1, x0
	mov	x0, x20
	mov	x2, x25
	bl	_map_write
	ldr	x8, [x27]
	str	x8, [x19]
LBB0_3:
	mov	x0, x20
	mov	x1, x22
	mov	x2, x24
	mov	x3, x21
	bl	_map_copy_from
	mov	x0, x20
	mov	x1, x19
	mov	x2, x25
	bl	_put_chip
LBB0_4:
	mov	x0, x23
	bl	_mutex_unlock
	mov	x0, x26
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp], #96             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.cfi_endproc
                                        ; -- End function
	.comm	_FL_READY,8,3                   ; @FL_READY
	.comm	_FL_POINT,8,3                   ; @FL_POINT
	.no_dead_strip	_do_read_onechip
.subsections_via_symbols
