	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function pp_check_ntb
_pp_check_ntb:                          ## @pp_check_ntb
	.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	%rdi, %rbx
	callq	_ntb_db_is_unsafe
	testq	%rax, %rax
	je	LBB0_2
## %bb.1:
	leaq	L_.str(%rip), %rsi
	movq	%rbx, %rdi
	callq	_dev_dbg
	movq	_unsafe@GOTPCREL(%rip), %rax
	cmpl	$0, (%rax)
	je	LBB0_13
LBB0_2:
	movq	%rbx, %rdi
	callq	_ntb_spad_is_unsafe
	testq	%rax, %rax
	je	LBB0_4
## %bb.3:
	leaq	L_.str.1(%rip), %rsi
	movq	%rbx, %rdi
	callq	_dev_dbg
	movq	_unsafe@GOTPCREL(%rip), %rax
	cmpl	$0, (%rax)
	je	LBB0_13
LBB0_4:
	movq	%rbx, %rdi
	callq	_ntb_peer_port_count
	xorl	%r14d, %r14d
	movl	%eax, %edi
	xorl	%esi, %esi
	callq	_GENMASK_ULL
	movl	%eax, %r15d
	movq	%rbx, %rdi
	callq	_ntb_db_valid_mask
	notl	%eax
	testl	%eax, %r15d
	jne	LBB0_10
## %bb.5:
	movq	%rbx, %rdi
	callq	_ntb_spad_count
	testl	%eax, %eax
	jg	LBB0_7
## %bb.6:
	movq	%rbx, %rdi
	callq	_ntb_msg_count
	testl	%eax, %eax
	jle	LBB0_12
LBB0_7:
	movq	%rbx, %rdi
	callq	_ntb_spad_count
	testl	%eax, %eax
	jle	LBB0_11
## %bb.8:
	movq	%rbx, %rdi
	callq	_ntb_msg_count
	xorl	%r14d, %r14d
	testl	%eax, %eax
	jg	LBB0_15
## %bb.9:
	leaq	L_.str.5(%rip), %rsi
	movq	%rbx, %rdi
	callq	_dev_dbg
	jmp	LBB0_15
LBB0_10:
	leaq	L_.str.2(%rip), %rsi
	movq	%rbx, %rdi
	callq	_dev_err
	movq	_EINVAL@GOTPCREL(%rip), %rax
	jmp	LBB0_14
LBB0_11:
	leaq	L_.str.4(%rip), %rsi
	movq	%rbx, %rdi
	callq	_dev_dbg
	xorl	%r14d, %r14d
	jmp	LBB0_15
LBB0_12:
	leaq	L_.str.3(%rip), %rsi
	movq	%rbx, %rdi
	callq	_dev_err
LBB0_13:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	xorl	%r14d, %r14d
LBB0_14:
	subl	(%rax), %r14d
LBB0_15:
	movl	%r14d, %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	"Doorbell is unsafe\n"

	.comm	_unsafe,4,2                     ## @unsafe
	.comm	_EINVAL,4,2                     ## @EINVAL
L_.str.1:                               ## @.str.1
	.asciz	"Scratchpad is unsafe\n"

L_.str.2:                               ## @.str.2
	.asciz	"Unsupported DB configuration\n"

L_.str.3:                               ## @.str.3
	.asciz	"Scratchpads and messages unsupported\n"

L_.str.4:                               ## @.str.4
	.asciz	"Scratchpads unsupported\n"

L_.str.5:                               ## @.str.5
	.asciz	"Messages unsupported\n"

	.no_dead_strip	_pp_check_ntb
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function pp_check_ntb
_pp_check_ntb:                          ; @pp_check_ntb
	.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
	mov	x19, x0
	bl	_ntb_db_is_unsafe
Lloh0:
	adrp	x20, _unsafe@GOTPAGE
Lloh1:
	ldr	x20, [x20, _unsafe@GOTPAGEOFF]
	cbz	x0, LBB0_2
; %bb.1:
Lloh2:
	adrp	x1, l_.str@PAGE
Lloh3:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x19
	bl	_dev_dbg
	ldr	w8, [x20]
	cbz	w8, LBB0_12
LBB0_2:
	mov	x0, x19
	bl	_ntb_spad_is_unsafe
	cbz	x0, LBB0_4
; %bb.3:
Lloh4:
	adrp	x1, l_.str.1@PAGE
Lloh5:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x19
	bl	_dev_dbg
	ldr	w8, [x20]
	cbz	w8, LBB0_12
LBB0_4:
	mov	x0, x19
	bl	_ntb_peer_port_count
	mov	w1, #0
	bl	_GENMASK_ULL
	mov	x20, x0
	mov	x0, x19
	bl	_ntb_db_valid_mask
	bics	wzr, w20, w0
	b.ne	LBB0_10
; %bb.5:
	mov	x0, x19
	bl	_ntb_spad_count
	cmp	w0, #0
	b.gt	LBB0_7
; %bb.6:
	mov	x0, x19
	bl	_ntb_msg_count
	cmp	w0, #0
	b.le	LBB0_17
LBB0_7:
	mov	x0, x19
	bl	_ntb_spad_count
	cmp	w0, #0
	b.le	LBB0_13
; %bb.8:
	mov	x0, x19
	bl	_ntb_msg_count
	cmp	w0, #0
	b.gt	LBB0_15
; %bb.9:
Lloh6:
	adrp	x1, l_.str.5@PAGE
Lloh7:
	add	x1, x1, l_.str.5@PAGEOFF
	b	LBB0_14
LBB0_10:
Lloh8:
	adrp	x1, l_.str.2@PAGE
Lloh9:
	add	x1, x1, l_.str.2@PAGEOFF
LBB0_11:
	mov	x0, x19
	bl	_dev_err
LBB0_12:
Lloh10:
	adrp	x8, _EINVAL@GOTPAGE
Lloh11:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh12:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_16
LBB0_13:
Lloh13:
	adrp	x1, l_.str.4@PAGE
Lloh14:
	add	x1, x1, l_.str.4@PAGEOFF
LBB0_14:
	mov	x0, x19
	bl	_dev_dbg
LBB0_15:
	mov	w0, #0
LBB0_16:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
LBB0_17:
Lloh15:
	adrp	x1, l_.str.3@PAGE
Lloh16:
	add	x1, x1, l_.str.3@PAGEOFF
	b	LBB0_11
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpAdd	Lloh4, Lloh5
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpAdd	Lloh13, Lloh14
	.loh AdrpAdd	Lloh15, Lloh16
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Doorbell is unsafe\n"

	.comm	_unsafe,4,2                     ; @unsafe
	.comm	_EINVAL,4,2                     ; @EINVAL
l_.str.1:                               ; @.str.1
	.asciz	"Scratchpad is unsafe\n"

l_.str.2:                               ; @.str.2
	.asciz	"Unsupported DB configuration\n"

l_.str.3:                               ; @.str.3
	.asciz	"Scratchpads and messages unsupported\n"

l_.str.4:                               ; @.str.4
	.asciz	"Scratchpads unsupported\n"

l_.str.5:                               ; @.str.5
	.asciz	"Messages unsupported\n"

	.no_dead_strip	_pp_check_ntb
.subsections_via_symbols
