	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function alloc_cmd_page
_alloc_cmd_page:                        ## @alloc_cmd_page
	.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
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %rbx
	movq	(%rdi), %r14
	movq	_MLX5_ADAPTER_PAGE_SIZE@GOTPCREL(%rip), %r12
	movl	(%r12), %esi
	leaq	4(%rbx), %r15
	movq	_GFP_KERNEL@GOTPCREL(%rip), %r13
	movl	(%r13), %ecx
	movq	%r14, %rdi
	movq	%r15, %rdx
	callq	_dma_alloc_coherent
	movq	%rax, 16(%rbx)
	testq	%rax, %rax
	je	LBB0_1
## %bb.2:
	movslq	(%r12), %rsi
	movq	%rsi, %rcx
	decq	%rcx
	testq	%rax, %rcx
	je	LBB0_3
## %bb.4:
	movl	4(%rbx), %ecx
	movq	%r14, %rdi
                                        ## kill: def $esi killed $esi killed $rsi
	movq	%rax, %rdx
	callq	_dma_free_coherent
	movl	(%r12), %eax
	leal	(%rax,%rax), %esi
	decl	%esi
	movl	(%r13), %ecx
	movq	%r14, %rdi
	movq	%r15, %rdx
	callq	_dma_alloc_coherent
	movq	%rax, 16(%rbx)
	testq	%rax, %rax
	je	LBB0_1
## %bb.5:
	movl	(%r12), %esi
	movq	%rax, %rdi
	callq	_PTR_ALIGN
	movq	%rax, 24(%rbx)
	movl	4(%rbx), %edi
	movl	(%r12), %esi
	callq	_ALIGN
	movl	%eax, 8(%rbx)
	movl	(%r12), %eax
	addl	%eax, %eax
	decl	%eax
	movl	%eax, (%rbx)
	jmp	LBB0_6
LBB0_1:
	movq	_ENOMEM@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
	jmp	LBB0_7
LBB0_3:
	movq	%rax, 24(%rbx)
	movl	4(%rbx), %eax
	movl	%eax, 8(%rbx)
	movl	%esi, (%rbx)
LBB0_6:
	xorl	%eax, %eax
LBB0_7:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_MLX5_ADAPTER_PAGE_SIZE,4,2     ## @MLX5_ADAPTER_PAGE_SIZE
	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.no_dead_strip	_alloc_cmd_page
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function alloc_cmd_page
_alloc_cmd_page:                        ; @alloc_cmd_page
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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
	mov	x19, x1
Lloh0:
	adrp	x22, _MLX5_ADAPTER_PAGE_SIZE@GOTPAGE
Lloh1:
	ldr	x22, [x22, _MLX5_ADAPTER_PAGE_SIZE@GOTPAGEOFF]
	ldr	x21, [x0]
	ldr	w1, [x22]
	add	x20, x19, #4
Lloh2:
	adrp	x23, _GFP_KERNEL@GOTPAGE
Lloh3:
	ldr	x23, [x23, _GFP_KERNEL@GOTPAGEOFF]
	ldr	w3, [x23]
	mov	x0, x21
	mov	x2, x20
	bl	_dma_alloc_coherent
	str	x0, [x19, #16]
	cbz	x0, LBB0_4
; %bb.1:
	mov	x2, x0
	ldrsw	x1, [x22]
	sub	x8, x1, #1
	tst	x8, x0
	b.eq	LBB0_5
; %bb.2:
	ldr	w3, [x19, #4]
	mov	x0, x21
                                        ; kill: def $w1 killed $w1 killed $x1
	bl	_dma_free_coherent
	ldr	w8, [x22]
	lsl	w8, w8, #1
	sub	w1, w8, #1
	ldr	w3, [x23]
	mov	x0, x21
	mov	x2, x20
	bl	_dma_alloc_coherent
	str	x0, [x19, #16]
	cbz	x0, LBB0_4
; %bb.3:
	ldr	w1, [x22]
	bl	_PTR_ALIGN
	str	x0, [x19, #24]
	ldr	w0, [x19, #4]
	ldr	w1, [x22]
	bl	_ALIGN
	mov	x8, x0
	mov	w0, #0
	str	w8, [x19, #8]
	ldr	w8, [x22]
	lsl	w8, w8, #1
	sub	w8, w8, #1
	str	w8, [x19]
	b	LBB0_6
LBB0_4:
Lloh4:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh5:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh6:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_6
LBB0_5:
	mov	w0, #0
	str	x2, [x19, #24]
	ldr	w8, [x19, #4]
	str	w8, [x19, #8]
	str	w1, [x19]
LBB0_6:
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.cfi_endproc
                                        ; -- End function
	.comm	_MLX5_ADAPTER_PAGE_SIZE,4,2     ; @MLX5_ADAPTER_PAGE_SIZE
	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.no_dead_strip	_alloc_cmd_page
.subsections_via_symbols
