	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_nd_btt_version                 ## -- Begin function nd_btt_version
	.p2align	4, 0x90
_nd_btt_version:                        ## @nd_btt_version
	.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
	movq	%rdx, %r14
	movq	%rsi, %rax
	movq	%rdi, %r15
	movq	(%rsi), %rcx
	movq	_NVDIMM_CCLASS_BTT2@GOTPCREL(%rip), %rdx
	cmpq	(%rdx), %rcx
	jne	LBB0_7
## %bb.1:
	movq	$0, 8(%r15)
	movq	$2, (%r15)
	xorl	%ebx, %ebx
	movq	%rax, %rdi
	xorl	%esi, %esi
	movq	%r14, %rdx
	movl	$8, %ecx
	xorl	%r8d, %r8d
	callq	_nvdimm_read_bytes
	testq	%rax, %rax
	jne	LBB0_2
## %bb.3:
	movq	%r15, %rdi
	movq	%r14, %rsi
	callq	_nd_btt_arena_is_valid
	testl	%eax, %eax
	je	LBB0_11
## %bb.4:
	movl	4(%r14), %edi
	callq	_le16_to_cpu
	cmpl	$2, %eax
	jne	LBB0_11
## %bb.5:
	movl	(%r14), %edi
	callq	_le16_to_cpu
	testl	%eax, %eax
	jne	LBB0_11
## %bb.6:
	xorl	%ebx, %ebx
	jmp	LBB0_13
LBB0_7:
	movq	_SZ_4K@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rsi
	movq	%rsi, 8(%r15)
	movabsq	$4294967297, %rcx               ## imm = 0x100000001
	movq	%rcx, (%r15)
	xorl	%ebx, %ebx
	movq	%rax, %rdi
	movq	%r14, %rdx
	movl	$8, %ecx
	xorl	%r8d, %r8d
	callq	_nvdimm_read_bytes
	testq	%rax, %rax
	je	LBB0_8
LBB0_2:
	movq	_ENXIO@GOTPCREL(%rip), %rax
	jmp	LBB0_12
LBB0_8:
	movq	%r15, %rdi
	movq	%r14, %rsi
	callq	_nd_btt_arena_is_valid
	testl	%eax, %eax
	je	LBB0_11
## %bb.9:
	movl	4(%r14), %edi
	callq	_le16_to_cpu
	cmpl	$1, %eax
	jne	LBB0_11
## %bb.10:
	movl	(%r14), %edi
	callq	_le16_to_cpu
	xorl	%ebx, %ebx
	cmpl	$1, %eax
	je	LBB0_13
LBB0_11:
	movq	_ENODEV@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
LBB0_12:
	subl	(%rax), %ebx
LBB0_13:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_NVDIMM_CCLASS_BTT2,8,3         ## @NVDIMM_CCLASS_BTT2
	.comm	_ENXIO,4,2                      ## @ENXIO
	.comm	_ENODEV,4,2                     ## @ENODEV
	.comm	_SZ_4K,8,3                      ## @SZ_4K
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.section	__TEXT,__literal8,8byte_literals
	.p2align	3                               ; -- Begin function nd_btt_version
lCPI0_0:
	.long	2                               ; 0x2
	.long	0                               ; 0x0
	.section	__TEXT,__text,regular,pure_instructions
	.globl	_nd_btt_version
	.p2align	2
_nd_btt_version:                        ; @nd_btt_version
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	mov	x19, x2
	mov	x8, x1
	mov	x20, x0
	ldr	x9, [x1]
Lloh0:
	adrp	x10, _NVDIMM_CCLASS_BTT2@GOTPAGE
Lloh1:
	ldr	x10, [x10, _NVDIMM_CCLASS_BTT2@GOTPAGEOFF]
Lloh2:
	ldr	x10, [x10]
	cmp	x9, x10
	b.ne	LBB0_5
; %bb.1:
	str	xzr, [x20, #8]
Lloh3:
	adrp	x9, lCPI0_0@PAGE
Lloh4:
	ldr	d0, [x9, lCPI0_0@PAGEOFF]
	str	d0, [x20]
	mov	x0, x8
	mov	x1, #0
	mov	x2, x19
	mov	w3, #8
	mov	w4, #0
	bl	_nvdimm_read_bytes
	cbnz	x0, LBB0_6
; %bb.2:
	mov	x0, x20
	mov	x1, x19
	bl	_nd_btt_arena_is_valid
	cbz	w0, LBB0_11
; %bb.3:
	ldr	w0, [x19, #4]
	bl	_le16_to_cpu
	cmp	w0, #2
	b.ne	LBB0_11
; %bb.4:
	ldr	w0, [x19]
	bl	_le16_to_cpu
	cbnz	w0, LBB0_11
	b	LBB0_13
LBB0_5:
Lloh5:
	adrp	x9, _SZ_4K@GOTPAGE
Lloh6:
	ldr	x9, [x9, _SZ_4K@GOTPAGEOFF]
Lloh7:
	ldr	x1, [x9]
	str	x1, [x20, #8]
	movi.2s	v0, #1
	str	d0, [x20]
	mov	x0, x8
	mov	x2, x19
	mov	w3, #8
	mov	w4, #0
	bl	_nvdimm_read_bytes
	cbz	x0, LBB0_7
LBB0_6:
Lloh8:
	adrp	x8, _ENXIO@GOTPAGE
Lloh9:
	ldr	x8, [x8, _ENXIO@GOTPAGEOFF]
	b	LBB0_12
LBB0_7:
	mov	x0, x20
	mov	x1, x19
	bl	_nd_btt_arena_is_valid
	cbz	w0, LBB0_11
; %bb.8:
	ldr	w0, [x19, #4]
	bl	_le16_to_cpu
	cmp	w0, #1
	b.ne	LBB0_11
; %bb.9:
	ldr	w0, [x19]
	bl	_le16_to_cpu
	cmp	w0, #1
	b.ne	LBB0_11
; %bb.10:
	mov	w0, #0
	b	LBB0_13
LBB0_11:
Lloh10:
	adrp	x8, _ENODEV@GOTPAGE
Lloh11:
	ldr	x8, [x8, _ENODEV@GOTPAGEOFF]
LBB0_12:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_13:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdr	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh10, Lloh11
	.cfi_endproc
                                        ; -- End function
	.comm	_NVDIMM_CCLASS_BTT2,8,3         ; @NVDIMM_CCLASS_BTT2
	.comm	_ENXIO,4,2                      ; @ENXIO
	.comm	_ENODEV,4,2                     ; @ENODEV
	.comm	_SZ_4K,8,3                      ; @SZ_4K
.subsections_via_symbols
