	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function nvme_nvm_setup_12
_nvme_nvm_setup_12:                     ## @nvme_nvm_setup_12
	.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
	cmpl	$1, (%rdi)
	jne	LBB0_1
## %bb.2:
	movq	%rdi, %r14
	cmpq	$0, 24(%rdi)
	je	LBB0_4
## %bb.3:
	leaq	L_.str(%rip), %rdi
	callq	_pr_err
LBB0_1:
	movq	_EINVAL@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
LBB0_10:
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_4:
	movq	%rsi, %rbx
	movl	20(%r14), %eax
	movl	%eax, 188(%rsi)
	movl	$2, (%rsi)
	movq	_NVM_OCSSD_SPEC_12@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 184(%rsi)
	movl	32(%r14), %eax
	movl	%eax, 4(%rsi)
	movl	36(%r14), %ecx
	movl	%ecx, 8(%rsi)
	imull	%eax, %ecx
	movl	%ecx, 12(%rsi)
	movl	100(%r14), %edi
	callq	_le16_to_cpu
	movl	%eax, 16(%rbx)
	movl	96(%r14), %edi
	callq	_le16_to_cpu
	movl	%eax, 20(%rbx)
	movl	92(%r14), %edi
	callq	_le16_to_cpu
	movl	%eax, 24(%rbx)
	movl	48(%r14), %edi
	callq	_le16_to_cpu
	movl	%eax, %r15d
	movl	44(%r14), %edi
	callq	_le16_to_cpu
	cltd
	idivl	20(%rbx)
	imull	%eax, %r15d
	imull	40(%r14), %r15d
	movl	%r15d, 28(%rbx)
	movl	16(%rbx), %ecx
	movl	12(%rbx), %edx
	imull	%ecx, %edx
	movl	%edx, 32(%rbx)
	imull	%edx, %r15d
	movl	%r15d, 36(%rbx)
	movl	%eax, 40(%rbx)
	movl	%eax, 44(%rbx)
	shll	$3, %eax
	movl	%eax, 48(%rbx)
	movl	%edx, 52(%rbx)
	movl	%ecx, 56(%rbx)
	movl	88(%r14), %edi
	callq	_le32_to_cpu
	movq	%rax, 176(%rbx)
	movl	84(%r14), %edi
	callq	_le32_to_cpu
	movq	%rax, 168(%rbx)
	movl	80(%r14), %edi
	callq	_le32_to_cpu
	movq	%rax, 160(%rbx)
	movl	76(%r14), %edi
	callq	_le32_to_cpu
	movq	%rax, 152(%rbx)
	movl	72(%r14), %edi
	callq	_le32_to_cpu
	movq	%rax, 144(%rbx)
	movl	68(%r14), %edi
	callq	_le32_to_cpu
	movq	%rax, 136(%rbx)
	movl	64(%r14), %edi
	callq	_le32_to_cpu
	movq	%rax, 128(%rbx)
	movl	16(%r14), %eax
	movl	%eax, 120(%rbx)
	movl	12(%r14), %edi
	callq	_le32_to_cpu
	movq	%rax, 112(%rbx)
	movl	8(%r14), %edi
	callq	_le32_to_cpu
	movq	%rax, 104(%rbx)
	movq	24(%r14), %rax
	movq	%rax, 64(%rbx)
	movl	60(%r14), %eax
	movl	%eax, 100(%rbx)
	movl	56(%r14), %edi
	callq	_le16_to_cpu
	movl	%eax, 72(%rbx)
	movl	52(%r14), %edi
	callq	_le32_to_cpu
	movl	%eax, 76(%rbx)
	movq	_NVM_PLANE_SINGLE@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	movl	%ecx, 96(%rbx)
	testl	$131586, %eax                   ## imm = 0x20202
	je	LBB0_6
## %bb.5:
	movl	$1, %ecx
	movq	_NVM_PLANE_DOUBLE@GOTPCREL(%rip), %rax
	jmp	LBB0_8
LBB0_6:
	testl	$263172, %eax                   ## imm = 0x40404
	je	LBB0_9
## %bb.7:
	movl	$2, %ecx
	movq	_NVM_PLANE_QUAD@GOTPCREL(%rip), %rax
LBB0_8:
	movl	(%rax), %eax
	movl	%eax, 96(%rbx)
                                        ## kill: def $cl killed $cl killed $ecx
	shll	%cl, 44(%rbx)
LBB0_9:
	movl	40(%r14), %eax
	movl	%eax, 80(%rbx)
	movl	48(%r14), %edi
	callq	_le16_to_cpu
	movl	%eax, 84(%rbx)
	movl	44(%r14), %edi
	callq	_le16_to_cpu
	movl	%eax, 88(%rbx)
	addq	$92, %rbx
	addq	$4, %r14
	movq	%rbx, %rdi
	movq	%r14, %rsi
	callq	_nvme_nvm_set_addr_12
	xorl	%eax, %eax
	jmp	LBB0_10
	.cfi_endproc
                                        ## -- End function
	.comm	_EINVAL,4,2                     ## @EINVAL
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"nvm: memory type not supported\n"

	.comm	_NVM_OCSSD_SPEC_12,4,2          ## @NVM_OCSSD_SPEC_12
	.comm	_NVM_PLANE_SINGLE,4,2           ## @NVM_PLANE_SINGLE
	.comm	_NVM_PLANE_DOUBLE,4,2           ## @NVM_PLANE_DOUBLE
	.comm	_NVM_PLANE_QUAD,4,2             ## @NVM_PLANE_QUAD
	.no_dead_strip	_nvme_nvm_setup_12
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function nvme_nvm_setup_12
_nvme_nvm_setup_12:                     ; @nvme_nvm_setup_12
	.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, [x0]
	cmp	w8, #1
	b.ne	LBB0_3
; %bb.1:
	mov	x19, x0
	ldr	x8, [x0, #24]
	cbz	x8, LBB0_5
; %bb.2:
Lloh0:
	adrp	x0, l_.str@PAGE
Lloh1:
	add	x0, x0, l_.str@PAGEOFF
	bl	_pr_err
LBB0_3:
Lloh2:
	adrp	x8, _EINVAL@GOTPAGE
Lloh3:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh4:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_4:
	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
LBB0_5:
	mov	x20, x1
	ldr	w8, [x19, #20]
	mov	w9, #2
	ldp	w10, w11, [x19, #32]
	str	w9, [x1]
Lloh5:
	adrp	x9, _NVM_OCSSD_SPEC_12@GOTPAGE
Lloh6:
	ldr	x9, [x9, _NVM_OCSSD_SPEC_12@GOTPAGEOFF]
Lloh7:
	ldr	w9, [x9]
	stp	w9, w8, [x1, #184]
	stp	w10, w11, [x1, #4]
	mul	w8, w11, w10
	str	w8, [x1, #12]
	ldr	w0, [x19, #100]
	bl	_le16_to_cpu
	str	w0, [x20, #16]
	ldr	w0, [x19, #96]
	bl	_le16_to_cpu
	str	w0, [x20, #20]
	ldr	w0, [x19, #92]
	bl	_le16_to_cpu
	str	w0, [x20, #24]
	ldr	w0, [x19, #48]
	bl	_le16_to_cpu
	mov	x21, x0
	ldr	w0, [x19, #44]
	bl	_le16_to_cpu
	ldp	w11, w8, [x20, #16]
	sdiv	w8, w0, w8
	ldr	w9, [x19, #40]
	mul	w10, w8, w21
	mul	w9, w10, w9
	ldr	w10, [x20, #12]
	mul	w10, w11, w10
	stp	w9, w10, [x20, #28]
	mul	w9, w10, w9
	stp	w9, w8, [x20, #36]
	lsl	w9, w8, #3
	stp	w8, w9, [x20, #44]
	stp	w10, w11, [x20, #52]
	ldr	w0, [x19, #88]
	bl	_le32_to_cpu
	str	x0, [x20, #176]
	ldr	w0, [x19, #84]
	bl	_le32_to_cpu
	str	x0, [x20, #168]
	ldr	w0, [x19, #80]
	bl	_le32_to_cpu
	str	x0, [x20, #160]
	ldr	w0, [x19, #76]
	bl	_le32_to_cpu
	str	x0, [x20, #152]
	ldr	w0, [x19, #72]
	bl	_le32_to_cpu
	str	x0, [x20, #144]
	ldr	w0, [x19, #68]
	bl	_le32_to_cpu
	str	x0, [x20, #136]
	ldr	w0, [x19, #64]
	bl	_le32_to_cpu
	str	x0, [x20, #128]
	ldp	w0, w8, [x19, #12]
	str	w8, [x20, #120]
	bl	_le32_to_cpu
	str	x0, [x20, #112]
	ldr	w0, [x19, #8]
	bl	_le32_to_cpu
	str	x0, [x20, #104]
	ldr	x8, [x19, #24]
	str	x8, [x20, #64]
	ldp	w0, w8, [x19, #56]
	str	w8, [x20, #100]
	bl	_le16_to_cpu
	str	w0, [x20, #72]
	ldr	w0, [x19, #52]
	bl	_le32_to_cpu
	str	w0, [x20, #76]
Lloh8:
	adrp	x8, _NVM_PLANE_SINGLE@GOTPAGE
Lloh9:
	ldr	x8, [x8, _NVM_PLANE_SINGLE@GOTPAGEOFF]
Lloh10:
	ldr	w8, [x8]
	str	w8, [x20, #96]
	mov	w8, #514
	movk	w8, #2, lsl #16
	tst	w0, w8
	b.eq	LBB0_7
; %bb.6:
	mov	w8, #1
Lloh11:
	adrp	x9, _NVM_PLANE_DOUBLE@GOTPAGE
Lloh12:
	ldr	x9, [x9, _NVM_PLANE_DOUBLE@GOTPAGEOFF]
	b	LBB0_9
LBB0_7:
	mov	w8, #1028
	movk	w8, #4, lsl #16
	tst	w0, w8
	b.eq	LBB0_10
; %bb.8:
	mov	w8, #2
Lloh13:
	adrp	x9, _NVM_PLANE_QUAD@GOTPAGE
Lloh14:
	ldr	x9, [x9, _NVM_PLANE_QUAD@GOTPAGEOFF]
LBB0_9:
	ldr	w9, [x9]
	str	w9, [x20, #96]
	ldr	w9, [x20, #44]
	lsl	w8, w9, w8
	str	w8, [x20, #44]
LBB0_10:
	ldr	w8, [x19, #40]
	str	w8, [x20, #80]
	ldr	w0, [x19, #48]
	bl	_le16_to_cpu
	str	w0, [x20, #84]
	ldr	w0, [x19, #44]
	bl	_le16_to_cpu
	str	w0, [x20, #88]
	add	x0, x20, #92
	add	x1, x19, #4
	bl	_nvme_nvm_set_addr_12
	mov	w0, #0
	b	LBB0_4
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh11, Lloh12
	.loh AdrpLdrGot	Lloh13, Lloh14
	.cfi_endproc
                                        ; -- End function
	.comm	_EINVAL,4,2                     ; @EINVAL
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"nvm: memory type not supported\n"

	.comm	_NVM_OCSSD_SPEC_12,4,2          ; @NVM_OCSSD_SPEC_12
	.comm	_NVM_PLANE_SINGLE,4,2           ; @NVM_PLANE_SINGLE
	.comm	_NVM_PLANE_DOUBLE,4,2           ; @NVM_PLANE_DOUBLE
	.comm	_NVM_PLANE_QUAD,4,2             ; @NVM_PLANE_QUAD
	.no_dead_strip	_nvme_nvm_setup_12
.subsections_via_symbols
