	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function cpia_read_nibble
_cpia_read_nibble:                      ## @cpia_read_nibble
	.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	%rdi, %r14
	addq	%rdx, %rdx
	movq	%rdx, -48(%rbp)                 ## 8-byte Spill
	je	LBB0_1
## %bb.2:
	movq	%rsi, -64(%rbp)                 ## 8-byte Spill
	xorl	%ecx, %ecx
	movq	_PARPORT_CONTROL_AUTOFD@GOTPCREL(%rip), %r15
	movq	_PARPORT_STATUS_ACK@GOTPCREL(%rip), %r12
	xorl	%eax, %eax
	jmp	LBB0_3
	.p2align	4, 0x90
LBB0_13:                                ##   in Loop: Header=BB0_3 Depth=1
	andb	$15, %bl
LBB0_14:                                ##   in Loop: Header=BB0_3 Depth=1
	movl	%ebx, %eax
	movq	%r13, %r12
	incq	%rcx
	cmpq	%rcx, -48(%rbp)                 ## 8-byte Folded Reload
	je	LBB0_15
LBB0_3:                                 ## =>This Inner Loop Header: Depth=1
	movq	%rax, -72(%rbp)                 ## 8-byte Spill
	movq	%rcx, -56(%rbp)                 ## 8-byte Spill
	testq	%rcx, %rcx
	jne	LBB0_5
## %bb.4:                               ##   in Loop: Header=BB0_3 Depth=1
	movq	%r14, %rdi
	callq	_parport_read_status
	movq	_PARPORT_STATUS_ERROR@GOTPCREL(%rip), %rcx
	testl	%eax, (%rcx)
	jne	LBB0_17
LBB0_5:                                 ##   in Loop: Header=BB0_3 Depth=1
	movl	(%r15), %edx
	movq	%r14, %rdi
	movl	%edx, %esi
	callq	_parport_frob_control
	movq	_IEEE1284_PH_REV_DATA@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 12(%r14)
	movl	(%r12), %esi
	movq	%r14, %rdi
	xorl	%edx, %edx
	callq	_parport_wait_peripheral
	testq	%rax, %rax
	jne	LBB0_6
## %bb.10:                              ##   in Loop: Header=BB0_3 Depth=1
	movq	%r14, %rdi
	callq	_parport_read_status
	movl	%eax, %ebx
	movl	(%r15), %esi
	movq	%r14, %rdi
	xorl	%edx, %edx
	callq	_parport_frob_control
	movq	%r14, %rdi
	movq	%r12, %r13
	movl	(%r12), %edx
	movl	%edx, %esi
	callq	_parport_wait_peripheral
	testq	%rax, %rax
	jne	LBB0_11
## %bb.12:                              ##   in Loop: Header=BB0_3 Depth=1
	movl	%ebx, %eax
	shrl	$3, %eax
	andb	$-9, %al
	shrb	$4, %bl
	andb	$8, %bl
	orb	%al, %bl
	xorb	$8, %bl
	movq	-56(%rbp), %rcx                 ## 8-byte Reload
	testb	$1, %cl
	je	LBB0_13
## %bb.16:                              ##   in Loop: Header=BB0_3 Depth=1
	shlb	$4, %bl
	orb	-72(%rbp), %bl                  ## 1-byte Folded Reload
	movq	-64(%rbp), %rax                 ## 8-byte Reload
	movb	%bl, (%rax)
	incq	%rax
	movq	%rax, -64(%rbp)                 ## 8-byte Spill
	jmp	LBB0_14
LBB0_1:
	xorl	%r13d, %r13d
	jmp	LBB0_7
LBB0_6:
	movl	8(%r14), %esi
	movq	-56(%rbp), %r13                 ## 8-byte Reload
	movl	%r13d, %edx
	shrl	%edx
	leaq	L_.str.1(%rip), %rdi
	xorl	%eax, %eax
	callq	_DBG
	movl	(%r15), %esi
	movq	%r14, %rdi
	xorl	%edx, %edx
	callq	_parport_frob_control
	jmp	LBB0_7
LBB0_11:
	movl	8(%r14), %esi
	leaq	L_.str.2(%rip), %rdi
	xorl	%eax, %eax
	callq	_DBG
	movq	-56(%rbp), %r13                 ## 8-byte Reload
	jmp	LBB0_7
LBB0_15:
	movq	-48(%rbp), %r13                 ## 8-byte Reload
                                        ## kill: def $r13d killed $r13d killed $r13 def $r13
LBB0_7:
	movl	%r13d, %eax
	cmpq	%rax, -48(%rbp)                 ## 8-byte Folded Reload
	jne	LBB0_20
## %bb.8:
	movq	%r14, %rdi
	callq	_parport_read_status
	movq	_PARPORT_STATUS_ERROR@GOTPCREL(%rip), %rcx
	testl	%eax, (%rcx)
	jne	LBB0_18
## %bb.9:
	movq	_IEEE1284_PH_HBUSY_DAVAIL@GOTPCREL(%rip), %rax
	jmp	LBB0_19
LBB0_17:
	movl	8(%r14), %esi
	leaq	L_.str(%rip), %rdi
	xorl	%r13d, %r13d
	xorl	%edx, %edx
	xorl	%eax, %eax
	callq	_DBG
LBB0_18:
	movq	_PARPORT_CONTROL_AUTOFD@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r14, %rdi
	movl	%edx, %esi
	callq	_parport_frob_control
	movq	_IEEE1284_PH_REV_IDLE@GOTPCREL(%rip), %rax
LBB0_19:
	movl	(%rax), %eax
	movq	(%r14), %rcx
	movl	%eax, (%rcx)
LBB0_20:
	shrl	%r13d
	movq	%r13, %rax
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_PARPORT_STATUS_ERROR,4,2       ## @PARPORT_STATUS_ERROR
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"%s: No more nibble data (%d bytes)\n"

	.comm	_PARPORT_CONTROL_AUTOFD,4,2     ## @PARPORT_CONTROL_AUTOFD
	.comm	_IEEE1284_PH_REV_DATA,4,2       ## @IEEE1284_PH_REV_DATA
	.comm	_PARPORT_STATUS_ACK,4,2         ## @PARPORT_STATUS_ACK
L_.str.1:                               ## @.str.1
	.asciz	"%s: Nibble timeout at event 9 (%d bytes)\n"

L_.str.2:                               ## @.str.2
	.asciz	"%s: Nibble timeout at event 11\n"

	.comm	_IEEE1284_PH_REV_IDLE,4,2       ## @IEEE1284_PH_REV_IDLE
	.comm	_IEEE1284_PH_HBUSY_DAVAIL,4,2   ## @IEEE1284_PH_HBUSY_DAVAIL
	.no_dead_strip	_cpia_read_nibble
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function cpia_read_nibble
_cpia_read_nibble:                      ; @cpia_read_nibble
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	stp	x28, x27, [sp, #16]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #32]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #48]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #64]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #80]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #96]             ; 16-byte Folded Spill
	add	x29, sp, #96
	.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	x19, x0
	lsl	x24, x2, #1
Lloh0:
	adrp	x23, _PARPORT_STATUS_ERROR@GOTPAGE
Lloh1:
	ldr	x23, [x23, _PARPORT_STATUS_ERROR@GOTPAGEOFF]
	cbz	x24, LBB0_10
; %bb.1:
	mov	x20, x1
	mov	x22, #0
	mov	w26, #0
Lloh2:
	adrp	x25, _PARPORT_CONTROL_AUTOFD@GOTPAGE
Lloh3:
	ldr	x25, [x25, _PARPORT_CONTROL_AUTOFD@GOTPAGEOFF]
Lloh4:
	adrp	x27, _IEEE1284_PH_REV_DATA@GOTPAGE
Lloh5:
	ldr	x27, [x27, _IEEE1284_PH_REV_DATA@GOTPAGEOFF]
Lloh6:
	adrp	x28, _PARPORT_STATUS_ACK@GOTPAGE
Lloh7:
	ldr	x28, [x28, _PARPORT_STATUS_ACK@GOTPAGEOFF]
	b	LBB0_4
LBB0_2:                                 ;   in Loop: Header=BB0_4 Depth=1
	orr	w26, w26, w8, lsl #4
	strb	w26, [x20], #1
LBB0_3:                                 ;   in Loop: Header=BB0_4 Depth=1
	add	x22, x22, #1
	cmp	x24, x22
	b.eq	LBB0_13
LBB0_4:                                 ; =>This Inner Loop Header: Depth=1
	cbnz	x22, LBB0_6
; %bb.5:                                ;   in Loop: Header=BB0_4 Depth=1
	mov	x0, x19
	bl	_parport_read_status
	ldr	w8, [x23]
	tst	w8, w0
	b.ne	LBB0_16
LBB0_6:                                 ;   in Loop: Header=BB0_4 Depth=1
	ldr	w1, [x25]
	mov	x0, x19
	mov	x2, x1
	bl	_parport_frob_control
	ldr	w8, [x27]
	str	w8, [x19, #12]
	ldr	w1, [x28]
	mov	x0, x19
	mov	w2, #0
	bl	_parport_wait_peripheral
	cbnz	x0, LBB0_11
; %bb.7:                                ;   in Loop: Header=BB0_4 Depth=1
	mov	x0, x19
	bl	_parport_read_status
	mov	x21, x0
	ldr	w1, [x25]
	mov	x0, x19
	mov	w2, #0
	bl	_parport_frob_control
	ldr	w1, [x28]
	mov	x0, x19
	mov	x2, x1
	bl	_parport_wait_peripheral
	cbnz	x0, LBB0_12
; %bb.8:                                ;   in Loop: Header=BB0_4 Depth=1
	lsr	w8, w21, #3
	and	w8, w8, #0xfffffff7
	lsr	w9, w21, #4
	and	w9, w9, #0x8
	orr	w8, w9, w8
	eor	w8, w8, #0x8
	tbnz	w22, #0, LBB0_2
; %bb.9:                                ;   in Loop: Header=BB0_4 Depth=1
	and	w26, w8, #0xf
	b	LBB0_3
LBB0_10:
	mov	w22, #0
	cmp	x24, w22, uxtw
	b.eq	LBB0_14
	b	LBB0_19
LBB0_11:
	ldr	w1, [x19, #8]
	ubfx	x8, x22, #1, #31
                                        ; kill: def $w8 killed $w8 killed $x8 def $x8
	str	x8, [sp]
Lloh8:
	adrp	x0, l_.str.1@PAGE
Lloh9:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_DBG
	ldr	w1, [x25]
	mov	x0, x19
	mov	w2, #0
	bl	_parport_frob_control
	cmp	x24, w22, uxtw
	b.eq	LBB0_14
	b	LBB0_19
LBB0_12:
	ldr	w1, [x19, #8]
Lloh10:
	adrp	x0, l_.str.2@PAGE
Lloh11:
	add	x0, x0, l_.str.2@PAGEOFF
	bl	_DBG
	cmp	x24, w22, uxtw
	b.eq	LBB0_14
	b	LBB0_19
LBB0_13:
	mov	x22, x24
	cmp	x24, w22, uxtw
	b.ne	LBB0_19
LBB0_14:
	mov	x0, x19
	bl	_parport_read_status
	ldr	w8, [x23]
	tst	w8, w0
	b.ne	LBB0_17
; %bb.15:
Lloh12:
	adrp	x8, _IEEE1284_PH_HBUSY_DAVAIL@GOTPAGE
Lloh13:
	ldr	x8, [x8, _IEEE1284_PH_HBUSY_DAVAIL@GOTPAGEOFF]
	b	LBB0_18
LBB0_16:
	ldr	w1, [x19, #8]
	str	xzr, [sp]
Lloh14:
	adrp	x0, l_.str@PAGE
Lloh15:
	add	x0, x0, l_.str@PAGEOFF
	bl	_DBG
	mov	w22, #0
LBB0_17:
Lloh16:
	adrp	x8, _PARPORT_CONTROL_AUTOFD@GOTPAGE
Lloh17:
	ldr	x8, [x8, _PARPORT_CONTROL_AUTOFD@GOTPAGEOFF]
Lloh18:
	ldr	w1, [x8]
	mov	x0, x19
	mov	x2, x1
	bl	_parport_frob_control
Lloh19:
	adrp	x8, _IEEE1284_PH_REV_IDLE@GOTPAGE
Lloh20:
	ldr	x8, [x8, _IEEE1284_PH_REV_IDLE@GOTPAGEOFF]
LBB0_18:
	ldr	w8, [x8]
	ldr	x9, [x19]
	str	w8, [x9]
LBB0_19:
	lsr	w0, w22, #1
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #64]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #48]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #32]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #112
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpAdd	Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh12, Lloh13
	.loh AdrpAdd	Lloh14, Lloh15
	.loh AdrpLdrGot	Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.cfi_endproc
                                        ; -- End function
	.comm	_PARPORT_STATUS_ERROR,4,2       ; @PARPORT_STATUS_ERROR
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"%s: No more nibble data (%d bytes)\n"

	.comm	_PARPORT_CONTROL_AUTOFD,4,2     ; @PARPORT_CONTROL_AUTOFD
	.comm	_IEEE1284_PH_REV_DATA,4,2       ; @IEEE1284_PH_REV_DATA
	.comm	_PARPORT_STATUS_ACK,4,2         ; @PARPORT_STATUS_ACK
l_.str.1:                               ; @.str.1
	.asciz	"%s: Nibble timeout at event 9 (%d bytes)\n"

l_.str.2:                               ; @.str.2
	.asciz	"%s: Nibble timeout at event 11\n"

	.comm	_IEEE1284_PH_REV_IDLE,4,2       ; @IEEE1284_PH_REV_IDLE
	.comm	_IEEE1284_PH_HBUSY_DAVAIL,4,2   ; @IEEE1284_PH_HBUSY_DAVAIL
	.no_dead_strip	_cpia_read_nibble
.subsections_via_symbols
