	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ppc440spe_chan_is_busy
_ppc440spe_chan_is_busy:                ## @ppc440spe_chan_is_busy
	.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
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	(%rdi), %rax
	movl	(%rax), %ecx
	xorl	%ebx, %ebx
	leal	-129(%rcx), %edx
	cmpl	$2, %edx
	jae	LBB0_1
## %bb.3:
	movq	16(%rax), %r14
	leaq	8(%r14), %rdi
	callq	_ioread16
	movl	%eax, %r12d
	leaq	4(%r14), %r15
	movq	%r15, %rdi
	callq	_ioread16
	cmpl	%eax, %r12d
	jne	LBB0_5
## %bb.4:
	movq	%r15, %rdi
	callq	_ioread16
	movl	%eax, %r15d
	movq	%r14, %rdi
	callq	_ioread16
	cmpl	%eax, %r15d
	je	LBB0_6
LBB0_5:
	movl	$1, %ebx
	jmp	LBB0_6
LBB0_1:
	cmpl	$128, %ecx
	jne	LBB0_6
## %bb.2:
	movq	8(%rax), %rdi
	callq	_ioread32be
	movq	_XOR_SR_XCP_BIT@GOTPCREL(%rip), %rcx
	xorl	%ebx, %ebx
	testl	%eax, (%rcx)
	setne	%bl
LBB0_6:
	movl	%ebx, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_XOR_SR_XCP_BIT,4,2             ## @XOR_SR_XCP_BIT
	.no_dead_strip	_ppc440spe_chan_is_busy
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ppc440spe_chan_is_busy
_ppc440spe_chan_is_busy:                ; @ppc440spe_chan_is_busy
	.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
	ldr	x8, [x0]
	ldr	w9, [x8]
	sub	w10, w9, #129
	cmp	w10, #2
	b.hs	LBB0_4
; %bb.1:
	ldr	x19, [x8, #16]
	add	x0, x19, #8
	bl	_ioread16
	mov	x21, x0
	add	x20, x19, #4
	mov	x0, x20
	bl	_ioread16
	cmp	w21, w0
	b.ne	LBB0_3
; %bb.2:
	mov	x0, x20
	bl	_ioread16
	mov	x20, x0
	mov	x0, x19
	bl	_ioread16
	cmp	w20, w0
	b.eq	LBB0_6
LBB0_3:
	mov	w0, #1
	b	LBB0_7
LBB0_4:
	cmp	w9, #128
	b.ne	LBB0_6
; %bb.5:
	ldr	x0, [x8, #8]
	bl	_ioread32be
Lloh0:
	adrp	x8, _XOR_SR_XCP_BIT@GOTPAGE
Lloh1:
	ldr	x8, [x8, _XOR_SR_XCP_BIT@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	tst	w8, w0
	cset	w0, ne
	b	LBB0_7
LBB0_6:
	mov	w0, #0
LBB0_7:
	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	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_XOR_SR_XCP_BIT,4,2             ; @XOR_SR_XCP_BIT
	.no_dead_strip	_ppc440spe_chan_is_busy
.subsections_via_symbols
