	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function phantom_status
_phantom_status:                        ## @phantom_status
	.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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %r14
	movq	%rdi, %rbx
	movq	(%rdi), %rsi
	leaq	L_.str(%rip), %rdi
	movq	%r14, %rdx
	callq	_pr_debug
	movq	(%rbx), %rcx
	movq	_PHB_RUNNING@GOTPCREL(%rip), %rax
	movq	(%rax), %rdx
	movq	%rdx, %rax
	andq	%r14, %rax
	testq	%rcx, %rdx
	jne	LBB0_3
## %bb.1:
	testq	%rax, %rax
	je	LBB0_3
## %bb.2:
	leaq	24(%rbx), %rdi
	xorl	%esi, %esi
	callq	_atomic_set
	movq	_PHN_CTL_IRQ@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	_PHN_CONTROL@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	addq	16(%rbx), %rsi
	callq	_iowrite32
	movl	$67, %edi
	jmp	LBB0_5
LBB0_3:
	testq	%rcx, %rdx
	je	LBB0_6
## %bb.4:
	xorl	%edi, %edi
	testq	%rax, %rax
	jne	LBB0_6
LBB0_5:
	movq	_PHN_IRQCTL@GOTPCREL(%rip), %r15
	movq	(%r15), %rsi
	addq	8(%rbx), %rsi
	callq	_iowrite32
	movq	(%r15), %rdi
	addq	8(%rbx), %rdi
	callq	_ioread32
LBB0_6:
	movq	%r14, (%rbx)
	xorl	%eax, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"phantom_status %lx %lx\n"

	.comm	_PHB_RUNNING,8,3                ## @PHB_RUNNING
	.comm	_PHN_CTL_IRQ,4,2                ## @PHN_CTL_IRQ
	.comm	_PHN_CONTROL,8,3                ## @PHN_CONTROL
	.comm	_PHN_IRQCTL,8,3                 ## @PHN_IRQCTL
	.no_dead_strip	_phantom_status
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function phantom_status
_phantom_status:                        ; @phantom_status
	.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
	ldr	x1, [x0]
Lloh0:
	adrp	x0, l_.str@PAGE
Lloh1:
	add	x0, x0, l_.str@PAGEOFF
	mov	x2, x19
	bl	_pr_debug
Lloh2:
	adrp	x8, _PHB_RUNNING@GOTPAGE
Lloh3:
	ldr	x8, [x8, _PHB_RUNNING@GOTPAGEOFF]
	ldr	x9, [x20]
Lloh4:
	ldr	x10, [x8]
	and	x8, x10, x9
	and	x9, x10, x19
	cmp	x8, #0
	ccmp	x9, #0, #4, eq
	b.ne	LBB0_3
; %bb.1:
	cmp	x8, #0
	ccmp	x9, #0, #0, ne
	b.ne	LBB0_5
; %bb.2:
	mov	w0, #0
	b	LBB0_4
LBB0_3:
	add	x0, x20, #24
	mov	w1, #0
	bl	_atomic_set
Lloh5:
	adrp	x8, _PHN_CTL_IRQ@GOTPAGE
Lloh6:
	ldr	x8, [x8, _PHN_CTL_IRQ@GOTPAGEOFF]
Lloh7:
	ldr	w0, [x8]
	ldr	x8, [x20, #16]
Lloh8:
	adrp	x9, _PHN_CONTROL@GOTPAGE
Lloh9:
	ldr	x9, [x9, _PHN_CONTROL@GOTPAGEOFF]
Lloh10:
	ldr	x9, [x9]
	add	x1, x9, x8
	bl	_iowrite32
	mov	w0, #67
LBB0_4:
	ldr	x8, [x20, #8]
Lloh11:
	adrp	x21, _PHN_IRQCTL@GOTPAGE
Lloh12:
	ldr	x21, [x21, _PHN_IRQCTL@GOTPAGEOFF]
	ldr	x9, [x21]
	add	x1, x9, x8
	bl	_iowrite32
	ldr	x8, [x20, #8]
	ldr	x9, [x21]
	add	x0, x9, x8
	bl	_ioread32
LBB0_5:
	str	x19, [x20]
	mov	w0, #0
	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
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh11, Lloh12
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"phantom_status %lx %lx\n"

	.comm	_PHB_RUNNING,8,3                ; @PHB_RUNNING
	.comm	_PHN_CTL_IRQ,4,2                ; @PHN_CTL_IRQ
	.comm	_PHN_CONTROL,8,3                ; @PHN_CONTROL
	.comm	_PHN_IRQCTL,8,3                 ; @PHN_IRQCTL
	.no_dead_strip	_phantom_status
.subsections_via_symbols
