	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function _apl_rd_reg
__apl_rd_reg:                           ## @_apl_rd_reg
	.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	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rcx, -56(%rbp)                 ## 8-byte Spill
	movl	%edx, %r15d
	movl	%esi, %r12d
	movl	%edi, %ebx
	movq	_byte@GOTPCREL(%rip), %r13
	movl	(%r13), %edi
	movq	_P2SB_HIDE_OFF@GOTPCREL(%rip), %r14
	movl	(%r14), %esi
	leaq	-44(%rbp), %rdx
	callq	_P2SB_READ
	cmpl	$0, -44(%rbp)
	je	LBB0_2
## %bb.1:
	movl	(%r13), %edi
	movl	(%r14), %esi
	xorl	%edx, %edx
	callq	_P2SB_WRITE
LBB0_2:
	leaq	-48(%rbp), %rdi
	callq	_p2sb_is_busy
	testq	%rax, %rax
	je	LBB0_4
## %bb.3:
	movq	_EAGAIN@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
	jmp	LBB0_10
LBB0_4:
	movq	_dword@GOTPCREL(%rip), %r13
	movl	(%r13), %edi
	movq	_P2SB_ADDR_OFF@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	shll	$24, %ebx
	orl	%r12d, %ebx
	movl	%ebx, %edx
	callq	_P2SB_WRITE
	movl	(%r13), %edi
	movq	_P2SB_DATA_OFF@GOTPCREL(%rip), %r12
	movl	(%r12), %esi
	xorl	%edx, %edx
	callq	_P2SB_WRITE
	movl	(%r13), %edi
	movq	_P2SB_EADD_OFF@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	xorl	%edx, %edx
	callq	_P2SB_WRITE
	movq	_word@GOTPCREL(%rip), %rbx
	movl	(%rbx), %edi
	movq	_P2SB_ROUT_OFF@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	xorl	%edx, %edx
	callq	_P2SB_WRITE
	movl	(%rbx), %edi
	movq	_P2SB_STAT_OFF@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	shll	$8, %r15d
	movq	_P2SB_BUSY@GOTPCREL(%rip), %rax
	orl	(%rax), %r15d
	movl	%r15d, %edx
	callq	_P2SB_WRITE
	movl	$-256, %ebx
	leaq	-48(%rbp), %r15
	.p2align	4, 0x90
LBB0_5:                                 ## =>This Inner Loop Header: Depth=1
	movq	%r15, %rdi
	callq	_p2sb_is_busy
	testq	%rax, %rax
	je	LBB0_8
## %bb.6:                               ##   in Loop: Header=BB0_5 Depth=1
	incl	%ebx
	jne	LBB0_5
## %bb.7:
	movq	_EBUSY@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
	jmp	LBB0_9
LBB0_8:
	movq	_dword@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movl	(%r12), %esi
	movq	-56(%rbp), %rdx                 ## 8-byte Reload
	callq	_P2SB_READ
	movl	-48(%rbp), %ebx
	shrl	%ebx
	andl	$3, %ebx
LBB0_9:
	movq	_byte@GOTPCREL(%rip), %r13
LBB0_10:
	movl	-44(%rbp), %edx
	testl	%edx, %edx
	je	LBB0_12
## %bb.11:
	movl	(%r13), %edi
	movl	(%r14), %esi
	callq	_P2SB_WRITE
LBB0_12:
	movl	%ebx, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_byte,4,2                       ## @byte
	.comm	_P2SB_HIDE_OFF,4,2              ## @P2SB_HIDE_OFF
	.comm	_EAGAIN,4,2                     ## @EAGAIN
	.comm	_dword,4,2                      ## @dword
	.comm	_P2SB_ADDR_OFF,4,2              ## @P2SB_ADDR_OFF
	.comm	_P2SB_DATA_OFF,4,2              ## @P2SB_DATA_OFF
	.comm	_P2SB_EADD_OFF,4,2              ## @P2SB_EADD_OFF
	.comm	_word,4,2                       ## @word
	.comm	_P2SB_ROUT_OFF,4,2              ## @P2SB_ROUT_OFF
	.comm	_P2SB_STAT_OFF,4,2              ## @P2SB_STAT_OFF
	.comm	_P2SB_BUSY,4,2                  ## @P2SB_BUSY
	.comm	_EBUSY,4,2                      ## @EBUSY
	.no_dead_strip	__apl_rd_reg
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function _apl_rd_reg
__apl_rd_reg:                           ; @_apl_rd_reg
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #96
	.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
	mov	x19, x3
	mov	x20, x2
	mov	x21, x1
	mov	x22, x0
Lloh0:
	adrp	x23, _byte@GOTPAGE
Lloh1:
	ldr	x23, [x23, _byte@GOTPAGEOFF]
	ldr	w0, [x23]
Lloh2:
	adrp	x24, _P2SB_HIDE_OFF@GOTPAGE
Lloh3:
	ldr	x24, [x24, _P2SB_HIDE_OFF@GOTPAGEOFF]
	ldr	w1, [x24]
	add	x2, sp, #8
	bl	_P2SB_READ
	ldr	w8, [sp, #8]
	cbz	w8, LBB0_2
; %bb.1:
	ldr	w0, [x23]
	ldr	w1, [x24]
	mov	w2, #0
	bl	_P2SB_WRITE
LBB0_2:
	add	x0, sp, #12
	bl	_p2sb_is_busy
	cbz	x0, LBB0_4
; %bb.3:
Lloh4:
	adrp	x8, _EAGAIN@GOTPAGE
Lloh5:
	ldr	x8, [x8, _EAGAIN@GOTPAGEOFF]
	b	LBB0_8
LBB0_4:
Lloh6:
	adrp	x25, _dword@GOTPAGE
Lloh7:
	ldr	x25, [x25, _dword@GOTPAGEOFF]
	ldr	w0, [x25]
Lloh8:
	adrp	x8, _P2SB_ADDR_OFF@GOTPAGE
Lloh9:
	ldr	x8, [x8, _P2SB_ADDR_OFF@GOTPAGEOFF]
Lloh10:
	ldr	w1, [x8]
	orr	w2, w21, w22, lsl #24
	bl	_P2SB_WRITE
	ldr	w0, [x25]
Lloh11:
	adrp	x21, _P2SB_DATA_OFF@GOTPAGE
Lloh12:
	ldr	x21, [x21, _P2SB_DATA_OFF@GOTPAGEOFF]
	ldr	w1, [x21]
	mov	w2, #0
	bl	_P2SB_WRITE
	ldr	w0, [x25]
Lloh13:
	adrp	x8, _P2SB_EADD_OFF@GOTPAGE
Lloh14:
	ldr	x8, [x8, _P2SB_EADD_OFF@GOTPAGEOFF]
Lloh15:
	ldr	w1, [x8]
	mov	w2, #0
	bl	_P2SB_WRITE
Lloh16:
	adrp	x22, _word@GOTPAGE
Lloh17:
	ldr	x22, [x22, _word@GOTPAGEOFF]
	ldr	w0, [x22]
Lloh18:
	adrp	x8, _P2SB_ROUT_OFF@GOTPAGE
Lloh19:
	ldr	x8, [x8, _P2SB_ROUT_OFF@GOTPAGEOFF]
Lloh20:
	ldr	w1, [x8]
	mov	w2, #0
	bl	_P2SB_WRITE
Lloh21:
	adrp	x8, _P2SB_STAT_OFF@GOTPAGE
Lloh22:
	ldr	x8, [x8, _P2SB_STAT_OFF@GOTPAGEOFF]
	ldr	w0, [x22]
Lloh23:
	ldr	w1, [x8]
Lloh24:
	adrp	x8, _P2SB_BUSY@GOTPAGE
Lloh25:
	ldr	x8, [x8, _P2SB_BUSY@GOTPAGEOFF]
Lloh26:
	ldr	w8, [x8]
	orr	w2, w8, w20, lsl #8
	bl	_P2SB_WRITE
	mov	w20, #-256
LBB0_5:                                 ; =>This Inner Loop Header: Depth=1
	add	x0, sp, #12
	bl	_p2sb_is_busy
	cbz	x0, LBB0_11
; %bb.6:                                ;   in Loop: Header=BB0_5 Depth=1
	adds	w20, w20, #1
	b.lo	LBB0_5
; %bb.7:
Lloh27:
	adrp	x8, _EBUSY@GOTPAGE
Lloh28:
	ldr	x8, [x8, _EBUSY@GOTPAGEOFF]
LBB0_8:
	ldr	w8, [x8]
	neg	w19, w8
	ldr	w2, [sp, #8]
	cbz	w2, LBB0_10
LBB0_9:
	ldr	w0, [x23]
	ldr	w1, [x24]
	bl	_P2SB_WRITE
LBB0_10:
	mov	x0, x19
	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
	add	sp, sp, #96
	ret
LBB0_11:
	ldr	w0, [x25]
	ldr	w1, [x21]
	mov	x2, x19
	bl	_P2SB_READ
	ldr	w8, [sp, #12]
	ubfx	w19, w8, #1, #2
	ldr	w2, [sp, #8]
	cbnz	w2, LBB0_9
	b	LBB0_10
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh24, Lloh25, Lloh26
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGot	Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGot	Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh27, Lloh28
	.cfi_endproc
                                        ; -- End function
	.comm	_byte,4,2                       ; @byte
	.comm	_P2SB_HIDE_OFF,4,2              ; @P2SB_HIDE_OFF
	.comm	_EAGAIN,4,2                     ; @EAGAIN
	.comm	_dword,4,2                      ; @dword
	.comm	_P2SB_ADDR_OFF,4,2              ; @P2SB_ADDR_OFF
	.comm	_P2SB_DATA_OFF,4,2              ; @P2SB_DATA_OFF
	.comm	_P2SB_EADD_OFF,4,2              ; @P2SB_EADD_OFF
	.comm	_word,4,2                       ; @word
	.comm	_P2SB_ROUT_OFF,4,2              ; @P2SB_ROUT_OFF
	.comm	_P2SB_STAT_OFF,4,2              ; @P2SB_STAT_OFF
	.comm	_P2SB_BUSY,4,2                  ; @P2SB_BUSY
	.comm	_EBUSY,4,2                      ; @EBUSY
	.no_dead_strip	__apl_rd_reg
.subsections_via_symbols
