	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function doc_block_isbad
_doc_block_isbad:                       ## @doc_block_isbad
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r14
	pushq	%rbx
	subq	$16, %rsp
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movl	%esi, %ebx
	movq	(%rdi), %r14
	movl	16(%r14), %r9d
	leaq	-24(%rbp), %rsi
	leaq	-20(%rbp), %rdx
	leaq	-32(%rbp), %rcx
	leaq	-28(%rbp), %r8
	movl	%ebx, %edi
	callq	_calc_block_sector
	movl	-24(%rbp), %edx
	movl	-20(%rbp), %ecx
	movl	-32(%rbp), %r8d
	movl	-28(%rbp), %r9d
	leaq	L_.str(%rip), %rdi
	movl	%ebx, %esi
	callq	_doc_dbg
	movl	-24(%rbp), %ecx
	movq	_DOC_LAYOUT_BLOCK_FIRST_DATA@GOTPCREL(%rip), %rdx
	xorl	%eax, %eax
	cmpl	(%rdx), %ecx
	jl	LBB0_4
## %bb.1:
	movl	-20(%rbp), %eax
	cmpl	(%r14), %eax
	jle	LBB0_3
## %bb.2:
	movq	_EINVAL@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
	jmp	LBB0_4
LBB0_3:
	movq	8(%r14), %rax
	movl	%ecx, %edx
	sarl	$3, %edx
	movslq	%edx, %rdx
	movl	(%rax,%rdx,4), %edx
	andb	$7, %cl
	movzbl	%cl, %ecx
	xorl	%eax, %eax
	btl	%ecx, %edx
	setae	%al
LBB0_4:
	addq	$16, %rsp
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"doc_block_isbad(from=%lld) => block=(%d,%d), page=%d, ofs=%d\n"

	.comm	_DOC_LAYOUT_BLOCK_FIRST_DATA,4,2 ## @DOC_LAYOUT_BLOCK_FIRST_DATA
	.comm	_EINVAL,4,2                     ## @EINVAL
	.no_dead_strip	_doc_block_isbad
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function doc_block_isbad
_doc_block_isbad:                       ; @doc_block_isbad
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #48
	.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
	mov	x19, x1
	ldr	x20, [x0]
	ldr	w5, [x20, #16]
	add	x1, sp, #12
	add	x2, sp, #8
	add	x3, sp, #4
	mov	x4, sp
	mov	x0, x19
	bl	_calc_block_sector
	ldp	w3, w2, [sp, #8]
	ldp	w5, w4, [sp]
Lloh0:
	adrp	x0, l_.str@PAGE
Lloh1:
	add	x0, x0, l_.str@PAGEOFF
	mov	x1, x19
	bl	_doc_dbg
	ldr	w8, [sp, #12]
Lloh2:
	adrp	x9, _DOC_LAYOUT_BLOCK_FIRST_DATA@GOTPAGE
Lloh3:
	ldr	x9, [x9, _DOC_LAYOUT_BLOCK_FIRST_DATA@GOTPAGEOFF]
Lloh4:
	ldr	w9, [x9]
	cmp	w8, w9
	b.ge	LBB0_2
; %bb.1:
	mov	w0, #0
	b	LBB0_5
LBB0_2:
	ldr	w9, [sp, #8]
	ldr	w10, [x20]
	cmp	w9, w10
	b.le	LBB0_4
; %bb.3:
Lloh5:
	adrp	x8, _EINVAL@GOTPAGE
Lloh6:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh7:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_5
LBB0_4:
	ldr	x9, [x20, #8]
	asr	w10, w8, #3
	ldr	w9, [x9, w10, sxtw #2]
	and	w8, w8, #0x7
	mvn	w9, w9
	lsr	w8, w9, w8
	and	w0, w8, #0x1
LBB0_5:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #48
	ret
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"doc_block_isbad(from=%lld) => block=(%d,%d), page=%d, ofs=%d\n"

	.comm	_DOC_LAYOUT_BLOCK_FIRST_DATA,4,2 ; @DOC_LAYOUT_BLOCK_FIRST_DATA
	.comm	_EINVAL,4,2                     ; @EINVAL
	.no_dead_strip	_doc_block_isbad
.subsections_via_symbols
