	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function cpia_pp_open
_cpia_pp_open:                          ## @cpia_pp_open
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r14
	pushq	%rbx
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	testq	%rdi, %rdi
	je	LBB0_1
## %bb.3:
	movq	%rdi, %rbx
	movq	(%rdi), %rax
	testq	%rax, %rax
	je	LBB0_4
LBB0_7:
	incq	%rax
	movq	%rax, (%rbx)
	xorl	%eax, %eax
	jmp	LBB0_8
LBB0_1:
	movq	_EINVAL@GOTPCREL(%rip), %rcx
	jmp	LBB0_2
LBB0_4:
	movl	12(%rbx), %edi
	callq	_parport_claim
	testq	%rax, %rax
	je	LBB0_6
## %bb.5:
	leaq	L_.str(%rip), %rdi
	callq	_DBG
	movq	_EBUSY@GOTPCREL(%rip), %rcx
LBB0_2:
	xorl	%eax, %eax
	subl	(%rcx), %eax
LBB0_8:
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
LBB0_6:
	movl	8(%rbx), %edi
	movq	_IEEE1284_MODE_COMPAT@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_parport_negotiate
	movl	8(%rbx), %edi
	callq	_parport_data_forward
	movl	8(%rbx), %edi
	movq	_PARPORT_CONTROL_SELECT@GOTPCREL(%rip), %r14
	movl	(%r14), %esi
	callq	_parport_write_control
	movl	$50, %edi
	callq	_udelay
	movl	8(%rbx), %edi
	movq	_PARPORT_CONTROL_INIT@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	orl	(%r14), %esi
	callq	_parport_write_control
	movq	(%rbx), %rax
	jmp	LBB0_7
	.cfi_endproc
                                        ## -- End function
	.comm	_EINVAL,4,2                     ## @EINVAL
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"failed to claim the port\n"

	.comm	_EBUSY,4,2                      ## @EBUSY
	.comm	_IEEE1284_MODE_COMPAT,4,2       ## @IEEE1284_MODE_COMPAT
	.comm	_PARPORT_CONTROL_SELECT,4,2     ## @PARPORT_CONTROL_SELECT
	.comm	_PARPORT_CONTROL_INIT,4,2       ## @PARPORT_CONTROL_INIT
	.no_dead_strip	_cpia_pp_open
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function cpia_pp_open
_cpia_pp_open:                          ; @cpia_pp_open
	.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
	cbz	x0, LBB0_3
; %bb.1:
	mov	x19, x0
	ldr	x8, [x0]
	cbz	x8, LBB0_4
LBB0_2:
	mov	w0, #0
	add	x8, x8, #1
	str	x8, [x19]
	b	LBB0_7
LBB0_3:
Lloh0:
	adrp	x8, _EINVAL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
	b	LBB0_6
LBB0_4:
	ldr	w0, [x19, #12]
	bl	_parport_claim
	cbz	x0, LBB0_8
; %bb.5:
Lloh2:
	adrp	x0, l_.str@PAGE
Lloh3:
	add	x0, x0, l_.str@PAGEOFF
	bl	_DBG
Lloh4:
	adrp	x8, _EBUSY@GOTPAGE
Lloh5:
	ldr	x8, [x8, _EBUSY@GOTPAGEOFF]
LBB0_6:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_7:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
LBB0_8:
	ldr	w0, [x19, #8]
Lloh6:
	adrp	x8, _IEEE1284_MODE_COMPAT@GOTPAGE
Lloh7:
	ldr	x8, [x8, _IEEE1284_MODE_COMPAT@GOTPAGEOFF]
Lloh8:
	ldr	w1, [x8]
	bl	_parport_negotiate
	ldr	w0, [x19, #8]
	bl	_parport_data_forward
	ldr	w0, [x19, #8]
Lloh9:
	adrp	x20, _PARPORT_CONTROL_SELECT@GOTPAGE
Lloh10:
	ldr	x20, [x20, _PARPORT_CONTROL_SELECT@GOTPAGEOFF]
	ldr	w1, [x20]
	bl	_parport_write_control
	mov	w0, #50
	bl	_udelay
	ldr	w0, [x19, #8]
	ldr	w8, [x20]
Lloh11:
	adrp	x9, _PARPORT_CONTROL_INIT@GOTPAGE
Lloh12:
	ldr	x9, [x9, _PARPORT_CONTROL_INIT@GOTPAGEOFF]
Lloh13:
	ldr	w9, [x9]
	orr	w1, w9, w8
	bl	_parport_write_control
	ldr	x8, [x19]
	b	LBB0_2
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.cfi_endproc
                                        ; -- End function
	.comm	_EINVAL,4,2                     ; @EINVAL
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"failed to claim the port\n"

	.comm	_EBUSY,4,2                      ; @EBUSY
	.comm	_IEEE1284_MODE_COMPAT,4,2       ; @IEEE1284_MODE_COMPAT
	.comm	_PARPORT_CONTROL_SELECT,4,2     ; @PARPORT_CONTROL_SELECT
	.comm	_PARPORT_CONTROL_INIT,4,2       ; @PARPORT_CONTROL_INIT
	.no_dead_strip	_cpia_pp_open
.subsections_via_symbols
