	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function nvme_set_host_mem
_nvme_set_host_mem:                     ## @nvme_set_host_mem
	.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	$56, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%esi, %r14d
	movq	%rdi, %r13
	movl	20(%rdi), %r12d
	leaq	-96(%rbp), %r15
	movq	%r15, %rdi
	xorl	%esi, %esi
	movl	$56, %edx
	callq	_memset
	movq	_nvme_admin_set_features@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -48(%rbp)
	movq	_NVME_FEAT_HOST_MEM_BUF@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_cpu_to_le32
	movq	%rax, -56(%rbp)
	movl	%r14d, %edi
	callq	_cpu_to_le32
	movq	%rax, -64(%rbp)
	movl	(%r13), %ebx
	movl	16(%r13), %edi
	callq	_ilog2
	movl	%eax, %ecx
	sarl	%cl, %ebx
	movl	%ebx, %edi
	callq	_cpu_to_le32
	movq	%rax, -72(%rbp)
	movl	%r12d, %edi
	callq	_lower_32_bits
	movl	%eax, %edi
	callq	_cpu_to_le32
	movq	%rax, -80(%rbp)
	movl	%r12d, %edi
	callq	_upper_32_bits
	movl	%eax, %edi
	callq	_cpu_to_le32
	movq	%rax, -88(%rbp)
	movl	4(%r13), %edi
	callq	_cpu_to_le32
	movq	%rax, -96(%rbp)
	movl	12(%r13), %edi
	movq	%r15, %rsi
	xorl	%edx, %edx
	xorl	%ecx, %ecx
	callq	_nvme_submit_sync_cmd
	movl	%eax, %ebx
	testl	%eax, %eax
	je	LBB0_2
## %bb.1:
	movl	8(%r13), %edi
	leaq	L_.str(%rip), %rsi
	movl	%ebx, %edx
	movl	%r14d, %ecx
	callq	_dev_warn
LBB0_2:
	movl	%ebx, %eax
	addq	$56, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_nvme_admin_set_features,4,2    ## @nvme_admin_set_features
	.comm	_NVME_FEAT_HOST_MEM_BUF,4,2     ## @NVME_FEAT_HOST_MEM_BUF
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"failed to set host mem (err %d, flags %#x).\n"

	.no_dead_strip	_nvme_set_host_mem
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function nvme_set_host_mem
_nvme_set_host_mem:                     ; @nvme_set_host_mem
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	stp	x22, x21, [sp, #64]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #80]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #96]             ; 16-byte Folded Spill
	add	x29, sp, #96
	.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
	mov	x19, x1
	mov	x20, x0
	ldr	w21, [x0, #20]
	add	x0, sp, #8
	mov	w1, #0
	mov	w2, #56
	bl	_memset
Lloh0:
	adrp	x8, _nvme_admin_set_features@GOTPAGE
Lloh1:
	ldr	x8, [x8, _nvme_admin_set_features@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	str	w8, [sp, #56]
Lloh3:
	adrp	x8, _NVME_FEAT_HOST_MEM_BUF@GOTPAGE
Lloh4:
	ldr	x8, [x8, _NVME_FEAT_HOST_MEM_BUF@GOTPAGEOFF]
Lloh5:
	ldr	w0, [x8]
	bl	_cpu_to_le32
	str	x0, [sp, #48]
	mov	x0, x19
	bl	_cpu_to_le32
	str	x0, [sp, #40]
	ldr	w22, [x20]
	ldr	w0, [x20, #16]
	bl	_ilog2
	asr	w0, w22, w0
	bl	_cpu_to_le32
	str	x0, [sp, #32]
	mov	x0, x21
	bl	_lower_32_bits
	bl	_cpu_to_le32
	str	x0, [sp, #24]
	mov	x0, x21
	bl	_upper_32_bits
	bl	_cpu_to_le32
	str	x0, [sp, #16]
	ldr	w0, [x20, #4]
	bl	_cpu_to_le32
	str	x0, [sp, #8]
	ldr	w0, [x20, #12]
	add	x1, sp, #8
	mov	x2, #0
	mov	w3, #0
	bl	_nvme_submit_sync_cmd
	mov	x21, x0
	cbz	w0, LBB0_2
; %bb.1:
	ldr	w0, [x20, #8]
Lloh6:
	adrp	x1, l_.str@PAGE
Lloh7:
	add	x1, x1, l_.str@PAGEOFF
	mov	x2, x21
	mov	x3, x19
	bl	_dev_warn
LBB0_2:
	mov	x0, x21
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #64]             ; 16-byte Folded Reload
	add	sp, sp, #112
	ret
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh6, Lloh7
	.cfi_endproc
                                        ; -- End function
	.comm	_nvme_admin_set_features,4,2    ; @nvme_admin_set_features
	.comm	_NVME_FEAT_HOST_MEM_BUF,4,2     ; @NVME_FEAT_HOST_MEM_BUF
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"failed to set host mem (err %d, flags %#x).\n"

	.no_dead_strip	_nvme_set_host_mem
.subsections_via_symbols
