	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function nvme_alloc_sq_cmds
_nvme_alloc_sq_cmds:                    ## @nvme_alloc_sq_cmds
	.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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%edx, %ebx
	movq	%rsi, %r14
	movq	%rdi, %r12
	movl	4(%rdi), %edi
	callq	_to_pci_dev
	testl	%ebx, %ebx
	je	LBB0_7
## %bb.1:
	cmpq	$0, 8(%r12)
	je	LBB0_7
## %bb.2:
	movq	%rax, %r15
	movq	_NVME_CMBSZ_SQS@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, (%r12)
	je	LBB0_7
## %bb.3:
	movq	%r14, %rdi
	callq	_SQ_SIZE
	movq	%r15, %rdi
	movl	%eax, %esi
	callq	_pci_alloc_p2pmem
	movl	%eax, (%r14)
	testl	%eax, %eax
	je	LBB0_7
## %bb.4:
	movq	%r15, %rdi
	movl	%eax, %esi
	callq	_pci_p2pmem_virt_to_bus
	movl	%eax, 4(%r14)
	testl	%eax, %eax
	je	LBB0_6
## %bb.5:
	movq	_NVMEQ_SQ_CMB@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	addq	$8, %r14
	movq	%r14, %rsi
	callq	_set_bit
	xorl	%eax, %eax
	jmp	LBB0_9
LBB0_6:
	movl	(%r14), %ebx
	movq	%r14, %rdi
	callq	_SQ_SIZE
	movq	%r15, %rdi
	movl	%ebx, %esi
	movl	%eax, %edx
	callq	_pci_free_p2pmem
LBB0_7:
	movl	4(%r12), %ebx
	movq	%r14, %rdi
	callq	_SQ_SIZE
	leaq	4(%r14), %rdx
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	movl	%ebx, %edi
	movl	%eax, %esi
	callq	_dma_alloc_coherent
	movl	%eax, %ecx
	movl	%eax, (%r14)
	xorl	%eax, %eax
	testl	%ecx, %ecx
	jne	LBB0_9
## %bb.8:
	movq	_ENOMEM@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
LBB0_9:
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_NVME_CMBSZ_SQS,4,2             ## @NVME_CMBSZ_SQS
	.comm	_NVMEQ_SQ_CMB,4,2               ## @NVMEQ_SQ_CMB
	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.no_dead_strip	_nvme_alloc_sq_cmds
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function nvme_alloc_sq_cmds
_nvme_alloc_sq_cmds:                    ; @nvme_alloc_sq_cmds
	.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
	mov	x22, x2
	mov	x19, x1
	mov	x20, x0
	ldr	w0, [x0, #4]
	bl	_to_pci_dev
	cbz	w22, LBB0_7
; %bb.1:
	ldr	x8, [x20, #8]
	cbz	x8, LBB0_7
; %bb.2:
	ldr	w8, [x20]
Lloh0:
	adrp	x9, _NVME_CMBSZ_SQS@GOTPAGE
Lloh1:
	ldr	x9, [x9, _NVME_CMBSZ_SQS@GOTPAGEOFF]
Lloh2:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_7
; %bb.3:
	mov	x21, x0
	mov	x0, x19
	bl	_SQ_SIZE
	mov	x1, x0
	mov	x0, x21
	bl	_pci_alloc_p2pmem
	str	w0, [x19]
	cbz	w0, LBB0_7
; %bb.4:
	mov	x1, x0
	mov	x0, x21
	bl	_pci_p2pmem_virt_to_bus
	str	w0, [x19, #4]
	cbz	w0, LBB0_6
; %bb.5:
Lloh3:
	adrp	x8, _NVMEQ_SQ_CMB@GOTPAGE
Lloh4:
	ldr	x8, [x8, _NVMEQ_SQ_CMB@GOTPAGEOFF]
Lloh5:
	ldr	w0, [x8]
	add	x1, x19, #8
	bl	_set_bit
	mov	w0, #0
	b	LBB0_10
LBB0_6:
	ldr	w22, [x19]
	mov	x0, x19
	bl	_SQ_SIZE
	mov	x2, x0
	mov	x0, x21
	mov	x1, x22
	bl	_pci_free_p2pmem
LBB0_7:
	ldr	w20, [x20, #4]
	mov	x0, x19
	bl	_SQ_SIZE
	mov	x1, x0
	add	x2, x19, #4
Lloh6:
	adrp	x8, _GFP_KERNEL@GOTPAGE
Lloh7:
	ldr	x8, [x8, _GFP_KERNEL@GOTPAGEOFF]
Lloh8:
	ldr	w3, [x8]
	mov	x0, x20
	bl	_dma_alloc_coherent
	str	w0, [x19]
	cbz	w0, LBB0_9
; %bb.8:
	mov	w0, #0
	b	LBB0_10
LBB0_9:
Lloh9:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh10:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh11:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_10:
	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
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.cfi_endproc
                                        ; -- End function
	.comm	_NVME_CMBSZ_SQS,4,2             ; @NVME_CMBSZ_SQS
	.comm	_NVMEQ_SQ_CMB,4,2               ; @NVMEQ_SQ_CMB
	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.no_dead_strip	_nvme_alloc_sq_cmds
.subsections_via_symbols
