	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function doc_backup_oob
_doc_backup_oob:                        ## @doc_backup_oob
	.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
	movl	(%rdx), %eax
	movq	_DOC_LAYOUT_OOB_SIZE@GOTPCREL(%rip), %r12
	cmpl	(%r12), %eax
	jne	LBB0_1
## %bb.2:
	movq	%rdx, %rbx
	movl	%esi, %r15d
	movq	%rdi, %r14
	movq	%rdx, %rdi
	callq	_doc_guess_autoecc
	testl	%eax, %eax
	js	LBB0_7
## %bb.3:
	movl	%r15d, 8(%r14)
	movl	%eax, (%r14)
	movq	8(%rbx), %rax
	movq	_MTD_OPS_AUTO_OOB@GOTPCREL(%rip), %rcx
	movl	4(%r14), %edi
	movl	20(%rbx), %esi
	cmpq	(%rcx), %rax
	jne	LBB0_5
## %bb.4:
	callq	_doc_fill_autooob
	movl	$8, 16(%rbx)
	jmp	LBB0_6
LBB0_1:
	movq	_EINVAL@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
	jmp	LBB0_7
LBB0_5:
	movl	(%r12), %edx
	callq	_memcpy
	movl	(%r12), %eax
	movl	%eax, 16(%rbx)
LBB0_6:
	xorl	%eax, %eax
LBB0_7:
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_DOC_LAYOUT_OOB_SIZE,4,2        ## @DOC_LAYOUT_OOB_SIZE
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_MTD_OPS_AUTO_OOB,8,3           ## @MTD_OPS_AUTO_OOB
	.no_dead_strip	_doc_backup_oob
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function doc_backup_oob
_doc_backup_oob:                        ; @doc_backup_oob
	.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	w8, [x2]
Lloh0:
	adrp	x22, _DOC_LAYOUT_OOB_SIZE@GOTPAGE
Lloh1:
	ldr	x22, [x22, _DOC_LAYOUT_OOB_SIZE@GOTPAGEOFF]
	ldr	w9, [x22]
	cmp	w8, w9
	b.ne	LBB0_4
; %bb.1:
	mov	x19, x2
	mov	x21, x1
	mov	x20, x0
	mov	x0, x2
	bl	_doc_guess_autoecc
	tbnz	w0, #31, LBB0_7
; %bb.2:
	str	w21, [x20, #8]
	str	w0, [x20]
	ldr	x8, [x19, #8]
Lloh2:
	adrp	x9, _MTD_OPS_AUTO_OOB@GOTPAGE
Lloh3:
	ldr	x9, [x9, _MTD_OPS_AUTO_OOB@GOTPAGEOFF]
Lloh4:
	ldr	x9, [x9]
	ldr	w0, [x20, #4]
	ldr	w1, [x19, #20]
	cmp	x8, x9
	b.ne	LBB0_5
; %bb.3:
	bl	_doc_fill_autooob
	mov	w0, #0
	mov	w8, #8
	b	LBB0_6
LBB0_4:
Lloh5:
	adrp	x8, _EINVAL@GOTPAGE
Lloh6:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh7:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_7
LBB0_5:
	ldr	w2, [x22]
	bl	_memcpy
	mov	w0, #0
	ldr	w8, [x22]
LBB0_6:
	str	w8, [x19, #16]
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 AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.cfi_endproc
                                        ; -- End function
	.comm	_DOC_LAYOUT_OOB_SIZE,4,2        ; @DOC_LAYOUT_OOB_SIZE
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_MTD_OPS_AUTO_OOB,8,3           ; @MTD_OPS_AUTO_OOB
	.no_dead_strip	_doc_backup_oob
.subsections_via_symbols
