	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_cpci_hp_unregister_controller  ## -- Begin function cpci_hp_unregister_controller
	.p2align	4, 0x90
_cpci_hp_unregister_controller:         ## @cpci_hp_unregister_controller
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%rbx
	pushq	%rax
	.cfi_offset %rbx, -24
	movq	_controller@GOTPCREL(%rip), %rbx
	movq	(%rbx), %rax
	testq	%rax, %rax
	je	LBB0_6
## %bb.1:
	movq	_thread_finished@GOTPCREL(%rip), %rcx
	cmpl	$0, (%rcx)
	jne	LBB0_3
## %bb.2:
	xorl	%eax, %eax
	callq	_cpci_stop_thread
	movq	(%rbx), %rax
LBB0_3:
	movq	8(%rax), %rdi
	testq	%rdi, %rdi
	je	LBB0_5
## %bb.4:
	movl	(%rax), %esi
	callq	_free_irq
LBB0_5:
	movq	$0, (%rbx)
	xorl	%ebx, %ebx
	xorl	%eax, %eax
	callq	_cleanup_slots
	jmp	LBB0_7
LBB0_6:
	movq	_ENODEV@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
LBB0_7:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_controller,8,3                 ## @controller
	.comm	_thread_finished,4,2            ## @thread_finished
	.comm	_ENODEV,4,2                     ## @ENODEV
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_cpci_hp_unregister_controller  ; -- Begin function cpci_hp_unregister_controller
	.p2align	2
_cpci_hp_unregister_controller:         ; @cpci_hp_unregister_controller
	.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
Lloh0:
	adrp	x19, _controller@GOTPAGE
Lloh1:
	ldr	x19, [x19, _controller@GOTPAGEOFF]
	ldr	x8, [x19]
	cbz	x8, LBB0_5
; %bb.1:
Lloh2:
	adrp	x9, _thread_finished@GOTPAGE
Lloh3:
	ldr	x9, [x9, _thread_finished@GOTPAGEOFF]
Lloh4:
	ldr	w9, [x9]
	cbz	w9, LBB0_7
; %bb.2:
	ldr	x0, [x8, #8]
	cbz	x0, LBB0_4
LBB0_3:
	ldr	w1, [x8]
	bl	_free_irq
LBB0_4:
	str	xzr, [x19]
	bl	_cleanup_slots
	mov	w0, #0
	b	LBB0_6
LBB0_5:
Lloh5:
	adrp	x8, _ENODEV@GOTPAGE
Lloh6:
	ldr	x8, [x8, _ENODEV@GOTPAGEOFF]
Lloh7:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_6:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
LBB0_7:
	bl	_cpci_stop_thread
	ldr	x8, [x19]
	ldr	x0, [x8, #8]
	cbnz	x0, LBB0_3
	b	LBB0_4
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.cfi_endproc
                                        ; -- End function
	.comm	_controller,8,3                 ; @controller
	.comm	_thread_finished,4,2            ; @thread_finished
	.comm	_ENODEV,4,2                     ; @ENODEV
.subsections_via_symbols
