	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function gpmi_bch_layout_std
_gpmi_bch_layout_std:                   ## @gpmi_bch_layout_std
	.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	%r13
	pushq	%r12
	pushq	%rbx
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r13
	movl	8(%rdi), %r12d
	movl	12(%rdi), %r15d
	movl	%r15d, -48(%rbp)                ## 4-byte Spill
	sarl	%r12d
	movl	16(%rdi), %eax
	movl	%eax, -44(%rbp)                 ## 4-byte Spill
	movq	32(%rdi), %rdi
	decq	%rdi
	callq	_BF_BCH_FLASH0LAYOUT0_NBLOCKS
	movl	%eax, %ebx
	movl	24(%r13), %edi
	callq	_BF_BCH_FLASH0LAYOUT0_META_SIZE
	movl	%eax, %r14d
	orl	%ebx, %r14d
	movl	%r12d, %edi
	movq	%r13, %rsi
	callq	_BF_BCH_FLASH0LAYOUT0_ECC0
	movl	%eax, %ebx
	movl	%r15d, %edi
	movq	%r13, %rsi
	callq	_BF_BCH_FLASH0LAYOUT0_GF
	movl	%eax, %r15d
	orl	%ebx, %r15d
	orl	%r14d, %r15d
	movl	-44(%rbp), %edi                 ## 4-byte Reload
	movq	%r13, %rsi
	callq	_BF_BCH_FLASH0LAYOUT0_DATA0_SIZE
	orl	%r15d, %eax
	movl	%eax, (%r13)
	movl	20(%r13), %edi
	callq	_BF_BCH_FLASH0LAYOUT1_PAGE_SIZE
	movl	%eax, %r14d
	movl	%r12d, %edi
	movq	%r13, %rsi
	callq	_BF_BCH_FLASH0LAYOUT1_ECCN
	movl	%eax, %r15d
	movl	-48(%rbp), %edi                 ## 4-byte Reload
	movq	%r13, %rsi
	callq	_BF_BCH_FLASH0LAYOUT1_GF
	movl	%eax, %ebx
	orl	%r14d, %ebx
	orl	%r15d, %ebx
	movl	-44(%rbp), %edi                 ## 4-byte Reload
	movq	%r13, %rsi
	callq	_BF_BCH_FLASH0LAYOUT1_DATAN_SIZE
	orl	%ebx, %eax
	movl	%eax, 4(%r13)
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.no_dead_strip	_gpmi_bch_layout_std
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function gpmi_bch_layout_std
_gpmi_bch_layout_std:                   ; @gpmi_bch_layout_std
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	mov	x19, x0
	ldp	w8, w20, [x0, #8]
	asr	w21, w8, #1
	ldr	w22, [x0, #16]
	ldr	x8, [x0, #32]
	sub	x0, x8, #1
	bl	_BF_BCH_FLASH0LAYOUT0_NBLOCKS
	mov	x23, x0
	ldr	w0, [x19, #24]
	bl	_BF_BCH_FLASH0LAYOUT0_META_SIZE
	orr	w23, w0, w23
	mov	x0, x21
	mov	x1, x19
	bl	_BF_BCH_FLASH0LAYOUT0_ECC0
	orr	w23, w23, w0
	mov	x0, x20
	mov	x1, x19
	bl	_BF_BCH_FLASH0LAYOUT0_GF
	orr	w23, w23, w0
	mov	x0, x22
	mov	x1, x19
	bl	_BF_BCH_FLASH0LAYOUT0_DATA0_SIZE
	orr	w8, w23, w0
	str	w8, [x19]
	ldr	w0, [x19, #20]
	bl	_BF_BCH_FLASH0LAYOUT1_PAGE_SIZE
	mov	x23, x0
	mov	x0, x21
	mov	x1, x19
	bl	_BF_BCH_FLASH0LAYOUT1_ECCN
	orr	w21, w0, w23
	mov	x0, x20
	mov	x1, x19
	bl	_BF_BCH_FLASH0LAYOUT1_GF
	orr	w20, w21, w0
	mov	x0, x22
	mov	x1, x19
	bl	_BF_BCH_FLASH0LAYOUT1_DATAN_SIZE
	orr	w8, w20, w0
	str	w8, [x19, #4]
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
	.cfi_endproc
                                        ; -- End function
	.no_dead_strip	_gpmi_bch_layout_std
.subsections_via_symbols
