	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function DoC_GetDataOffset
_DoC_GetDataOffset:                     ## @DoC_GetDataOffset
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	movq	(%rdi), %rax
	cmpq	$0, (%rax)
	movl	(%rsi), %ecx
	je	LBB0_7
## %bb.1:
	movl	%ecx, %edx
	andl	$1023, %edx                     ## imm = 0x3FF
	cmpl	$511, %edx                      ## imm = 0x1FF
	ja	LBB0_3
## %bb.2:
	movl	%ecx, %edx
	andl	$511, %edx                      ## imm = 0x1FF
	movq	_NAND_CMD_READ0@GOTPCREL(%rip), %rax
	jmp	LBB0_6
LBB0_7:
	testl	$256, %ecx                      ## imm = 0x100
	jne	LBB0_8
## %bb.9:
	movq	_NAND_CMD_READ0@GOTPCREL(%rip), %rax
	jmp	LBB0_10
LBB0_3:
	cmpl	$1013, %edx                     ## imm = 0x3F5
	ja	LBB0_5
## %bb.4:
	movl	%ecx, %edx
	andl	$511, %edx                      ## imm = 0x1FF
	addl	$10, %edx
	movq	_NAND_CMD_READ1@GOTPCREL(%rip), %rax
	jmp	LBB0_6
LBB0_8:
	movq	_NAND_CMD_READ1@GOTPCREL(%rip), %rax
LBB0_10:
	movl	(%rax), %eax
	popq	%rbp
	retq
LBB0_5:
	addl	$-1014, %edx                    ## imm = 0xFC0A
	movq	_NAND_CMD_READOOB@GOTPCREL(%rip), %rax
LBB0_6:
	movl	(%rax), %eax
	andl	$-1024, %ecx                    ## imm = 0xFC00
	orl	%edx, %ecx
	movl	%ecx, (%rsi)
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_NAND_CMD_READ0,4,2             ## @NAND_CMD_READ0
	.comm	_NAND_CMD_READ1,4,2             ## @NAND_CMD_READ1
	.comm	_NAND_CMD_READOOB,4,2           ## @NAND_CMD_READOOB
	.no_dead_strip	_DoC_GetDataOffset
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function DoC_GetDataOffset
_DoC_GetDataOffset:                     ; @DoC_GetDataOffset
	.cfi_startproc
; %bb.0:
	ldr	x8, [x0]
	ldr	x9, [x8]
	ldr	w8, [x1]
	cbz	x9, LBB0_2
; %bb.1:
	and	w9, w8, #0x3ff
	sub	w10, w9, #1014
Lloh0:
	adrp	x11, _NAND_CMD_READOOB@GOTPAGE
Lloh1:
	ldr	x11, [x11, _NAND_CMD_READOOB@GOTPAGEOFF]
	and	w12, w8, #0x1ff
	add	w13, w12, #10
Lloh2:
	adrp	x14, _NAND_CMD_READ1@GOTPAGE
Lloh3:
	ldr	x14, [x14, _NAND_CMD_READ1@GOTPAGEOFF]
	cmp	w9, #1013
	csel	w10, w10, w13, hi
	csel	x11, x11, x14, hi
Lloh4:
	adrp	x13, _NAND_CMD_READ0@GOTPAGE
Lloh5:
	ldr	x13, [x13, _NAND_CMD_READ0@GOTPAGEOFF]
	cmp	w9, #511
	csel	w9, w10, w12, hi
	csel	x10, x11, x13, hi
	ldr	w0, [x10]
	and	w8, w8, #0xfffffc00
	orr	w8, w9, w8
	str	w8, [x1]
	ret
LBB0_2:
	tbnz	w8, #8, LBB0_4
; %bb.3:
Lloh6:
	adrp	x8, _NAND_CMD_READ0@GOTPAGE
Lloh7:
	ldr	x8, [x8, _NAND_CMD_READ0@GOTPAGEOFF]
Lloh8:
	ldr	w0, [x8]
	ret
LBB0_4:
Lloh9:
	adrp	x8, _NAND_CMD_READ1@GOTPAGE
Lloh10:
	ldr	x8, [x8, _NAND_CMD_READ1@GOTPAGEOFF]
Lloh11:
	ldr	w0, [x8]
	ret
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.cfi_endproc
                                        ; -- End function
	.comm	_NAND_CMD_READ0,4,2             ; @NAND_CMD_READ0
	.comm	_NAND_CMD_READ1,4,2             ; @NAND_CMD_READ1
	.comm	_NAND_CMD_READOOB,4,2           ; @NAND_CMD_READOOB
	.no_dead_strip	_DoC_GetDataOffset
.subsections_via_symbols
