	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_nvm_set_chunk_meta             ## -- Begin function nvm_set_chunk_meta
	.p2align	4, 0x90
_nvm_set_chunk_meta:                    ## @nvm_set_chunk_meta
	.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
	subq	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%edx, %r13d
	movq	(%rdi), %r12
	movq	8(%r12), %rax
	movq	_NVM_OCSSD_SPEC_20@GOTPCREL(%rip), %rdx
	xorl	%ebx, %ebx
	cmpq	(%rdx), %rax
	je	LBB0_5
## %bb.1:
	movq	_NVM_MAX_VLBA@GOTPCREL(%rip), %rax
	cmpl	%r13d, (%rax)
	jge	LBB0_3
## %bb.2:
	leaq	L_.str(%rip), %rdi
	callq	_pr_err
	jmp	LBB0_4
LBB0_3:
	movq	%rsi, %r15
	movq	%rdi, %r14
	leaq	-48(%rbp), %rdi
	xorl	%ebx, %ebx
	xorl	%esi, %esi
	movl	$8, %edx
	movl	%ecx, -52(%rbp)                 ## 4-byte Spill
	callq	_memset
	movq	%r14, %rdi
	leaq	-48(%rbp), %rsi
	movq	%r15, %rdx
	movl	%r13d, %ecx
	callq	_nvm_set_rqd_ppalist
	movq	%r14, %rdi
	leaq	-48(%rbp), %r13
	movq	%r13, %rsi
	callq	_nvm_rq_tgt_to_dev
	movq	(%r12), %rax
	leaq	-44(%rbp), %rsi
	movl	-48(%rbp), %edx
	movq	%r12, %rdi
	movl	-52(%rbp), %ecx                 ## 4-byte Reload
	callq	*(%rax)
	movl	%eax, %r15d
	movq	%r14, %rdi
	movq	%r13, %rsi
	callq	_nvm_free_rqd_ppalist
	testl	%r15d, %r15d
	je	LBB0_5
LBB0_4:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
LBB0_5:
	movl	%ebx, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_NVM_OCSSD_SPEC_20,8,3          ## @NVM_OCSSD_SPEC_20
	.comm	_NVM_MAX_VLBA,4,2               ## @NVM_MAX_VLBA
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"unable to update all blocks atomically\n"

	.comm	_EINVAL,4,2                     ## @EINVAL
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_nvm_set_chunk_meta             ; -- Begin function nvm_set_chunk_meta
	.p2align	2
_nvm_set_chunk_meta:                    ; @nvm_set_chunk_meta
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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
	ldr	x21, [x0]
	ldr	x8, [x21, #8]
Lloh0:
	adrp	x9, _NVM_OCSSD_SPEC_20@GOTPAGE
Lloh1:
	ldr	x9, [x9, _NVM_OCSSD_SPEC_20@GOTPAGEOFF]
Lloh2:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_2
LBB0_1:
	mov	w0, #0
	b	LBB0_6
LBB0_2:
	mov	x22, x2
Lloh3:
	adrp	x8, _NVM_MAX_VLBA@GOTPAGE
Lloh4:
	ldr	x8, [x8, _NVM_MAX_VLBA@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	cmp	w8, w2
	b.ge	LBB0_4
; %bb.3:
Lloh6:
	adrp	x0, l_.str@PAGE
Lloh7:
	add	x0, x0, l_.str@PAGEOFF
	bl	_pr_err
	b	LBB0_5
LBB0_4:
	mov	x20, x3
	mov	x23, x1
	mov	x19, x0
	add	x24, sp, #8
	add	x0, sp, #8
	mov	w1, #0
	mov	w2, #8
	bl	_memset
	add	x1, sp, #8
	mov	x0, x19
	mov	x2, x23
	mov	x3, x22
	bl	_nvm_set_rqd_ppalist
	add	x1, sp, #8
	mov	x0, x19
	bl	_nvm_rq_tgt_to_dev
	ldr	x8, [x21]
	ldr	x8, [x8]
	orr	x1, x24, #0x4
	ldr	w2, [sp, #8]
	mov	x0, x21
	mov	x3, x20
	blr	x8
	mov	x20, x0
	add	x1, sp, #8
	mov	x0, x19
	bl	_nvm_free_rqd_ppalist
	cbz	w20, LBB0_1
LBB0_5:
Lloh8:
	adrp	x8, _EINVAL@GOTPAGE
Lloh9:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh10:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_6:
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #80
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.cfi_endproc
                                        ; -- End function
	.comm	_NVM_OCSSD_SPEC_20,8,3          ; @NVM_OCSSD_SPEC_20
	.comm	_NVM_MAX_VLBA,4,2               ; @NVM_MAX_VLBA
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"unable to update all blocks atomically\n"

	.comm	_EINVAL,4,2                     ; @EINVAL
.subsections_via_symbols
