	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_parport_open                   ## -- Begin function parport_open
	.p2align	4, 0x90
_parport_open:                          ## @parport_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	%r15
	pushq	%r14
	pushq	%r12
	pushq	%rbx
	subq	$16, %rsp
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %r15
	movl	%edi, %r14d
	movq	_topology@GOTPCREL(%rip), %rax
	movq	(%rax), %rbx
	movq	_topology_lock@GOTPCREL(%rip), %rdi
	callq	_spin_lock
	testq	%rbx, %rbx
	je	LBB0_3
	.p2align	4, 0x90
LBB0_1:                                 ## =>This Inner Loop Header: Depth=1
	cmpl	%r14d, (%rbx)
	je	LBB0_6
## %bb.2:                               ##   in Loop: Header=BB0_1 Depth=1
	movq	16(%rbx), %rbx
	testq	%rbx, %rbx
	jne	LBB0_1
LBB0_3:
	movq	_topology_lock@GOTPCREL(%rip), %rdi
	callq	_spin_unlock
LBB0_4:
	xorl	%ebx, %ebx
LBB0_5:
	movq	%rbx, %rax
	addq	$16, %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_6:
	movl	4(%rbx), %r12d
	movl	8(%rbx), %edi
	callq	_parport_get_port
	movq	%rax, %r14
	movq	_topology_lock@GOTPCREL(%rip), %rdi
	callq	_spin_unlock
	movq	$0, (%rsp)
	xorl	%ebx, %ebx
	movq	%r14, %rdi
	movq	%r15, %rsi
	xorl	%edx, %edx
	xorl	%ecx, %ecx
	xorl	%r8d, %r8d
	xorl	%r9d, %r9d
	callq	_parport_register_device
	movq	%rax, %r15
	movq	%r14, %rdi
	callq	_parport_put_port
	testq	%r15, %r15
	je	LBB0_5
## %bb.7:
	movl	%r12d, (%r15)
	testl	%r12d, %r12d
	js	LBB0_10
## %bb.8:
	movq	%r15, %rdi
	callq	_parport_claim_or_block
	movl	(%r14), %ebx
	movq	%r15, %rdi
	callq	_parport_release
	cmpl	%r12d, %ebx
	jne	LBB0_11
LBB0_10:
	movq	%r15, %rbx
	jmp	LBB0_5
LBB0_11:
	movq	%r15, %rdi
	callq	_parport_unregister_device
	jmp	LBB0_4
	.cfi_endproc
                                        ## -- End function
	.comm	_topology,8,3                   ## @topology
	.comm	_topology_lock,4,2              ## @topology_lock
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_parport_open                   ; -- Begin function parport_open
	.p2align	2
_parport_open:                          ; @parport_open
	.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	x19, x1
	mov	x20, x0
Lloh0:
	adrp	x8, _topology@GOTPAGE
Lloh1:
	ldr	x8, [x8, _topology@GOTPAGEOFF]
Lloh2:
	ldr	x22, [x8]
Lloh3:
	adrp	x0, _topology_lock@GOTPAGE
Lloh4:
	ldr	x0, [x0, _topology_lock@GOTPAGEOFF]
	bl	_spin_lock
	cbz	x22, LBB0_3
LBB0_1:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w8, [x22]
	cmp	w8, w20
	b.eq	LBB0_6
; %bb.2:                                ;   in Loop: Header=BB0_1 Depth=1
	ldr	x22, [x22, #16]
	cbnz	x22, LBB0_1
LBB0_3:
Lloh5:
	adrp	x0, _topology_lock@GOTPAGE
Lloh6:
	ldr	x0, [x0, _topology_lock@GOTPAGEOFF]
	bl	_spin_unlock
LBB0_4:
	mov	x19, #0
LBB0_5:
	mov	x0, x19
	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
LBB0_6:
	ldp	w21, w0, [x22, #4]
	bl	_parport_get_port
	mov	x20, x0
Lloh7:
	adrp	x0, _topology_lock@GOTPAGE
Lloh8:
	ldr	x0, [x0, _topology_lock@GOTPAGEOFF]
	bl	_spin_unlock
	mov	x0, x20
	mov	x1, x19
	mov	x2, #0
	mov	x3, #0
	mov	x4, #0
	mov	w5, #0
	mov	x6, #0
	bl	_parport_register_device
	mov	x19, x0
	mov	x0, x20
	bl	_parport_put_port
	cbz	x19, LBB0_5
; %bb.7:
	str	w21, [x19]
	tbnz	w21, #31, LBB0_5
; %bb.8:
	mov	x0, x19
	bl	_parport_claim_or_block
	ldr	w20, [x20]
	mov	x0, x19
	bl	_parport_release
	cmp	w20, w21
	b.eq	LBB0_5
; %bb.9:
	mov	x0, x19
	bl	_parport_unregister_device
	b	LBB0_4
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh7, Lloh8
	.cfi_endproc
                                        ; -- End function
	.comm	_topology,8,3                   ; @topology
	.comm	_topology_lock,4,2              ; @topology_lock
.subsections_via_symbols
