	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function mlx5_alloc_rwq_buf
_mlx5_alloc_rwq_buf:                    ## @mlx5_alloc_rwq_buf
	.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, %r15
	movq	_MLX5_ALLOC_TYPE_PREFER_CONTIG@GOTPCREL(%rip), %rax
	movl	(%rax), %r14d
	movl	(%rsi), %edi
	shll	$2, %edi
	callq	_malloc
	movl	%eax, 4(%rbx)
	testl	%eax, %eax
	je	LBB0_4
## %bb.1:
	movq	%r15, %rdi
	callq	_to_mctx
	movl	%eax, %r12d
	leaq	12(%rbx), %r13
	movl	%r14d, -44(%rbp)                ## 4-byte Spill
	movl	8(%rbx), %r14d
	movl	(%r15), %edi
	callq	_to_mdev
	movl	(%rax), %esi
	movl	%r14d, %edi
	callq	_align
	movl	%eax, %r14d
	movl	(%r15), %edi
	callq	_to_mdev
	movl	(%rax), %ecx
	movq	_MLX5_RWQ_PREFIX@GOTPCREL(%rip), %rax
	movl	(%rax), %r9d
	movl	%r12d, %edi
	movq	%r13, %rsi
	movl	%r14d, %edx
	movl	-44(%rbp), %r8d                 ## 4-byte Reload
	callq	_mlx5_alloc_prefered_buf
	testl	%eax, %eax
	je	LBB0_2
## %bb.3:
	movl	4(%rbx), %edi
	callq	_free
LBB0_4:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movq	_errno@GOTPCREL(%rip), %rcx
	movl	%eax, (%rcx)
	movl	$-1, %eax
	jmp	LBB0_5
LBB0_2:
	xorl	%eax, %eax
LBB0_5:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_MLX5_ALLOC_TYPE_PREFER_CONTIG,4,2 ## @MLX5_ALLOC_TYPE_PREFER_CONTIG
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_errno,4,2                      ## @errno
	.comm	_MLX5_RWQ_PREFIX,4,2            ## @MLX5_RWQ_PREFIX
	.no_dead_strip	_mlx5_alloc_rwq_buf
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function mlx5_alloc_rwq_buf
_mlx5_alloc_rwq_buf:                    ; @mlx5_alloc_rwq_buf
	.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
	mov	x21, x0
Lloh0:
	adrp	x8, _MLX5_ALLOC_TYPE_PREFER_CONTIG@GOTPAGE
Lloh1:
	ldr	x8, [x8, _MLX5_ALLOC_TYPE_PREFER_CONTIG@GOTPAGEOFF]
Lloh2:
	ldr	w20, [x8]
	ldr	w8, [x1]
	lsl	w0, w8, #2
	bl	_malloc
	str	w0, [x19, #4]
	cbz	w0, LBB0_3
; %bb.1:
	mov	x0, x21
	bl	_to_mctx
	mov	x22, x0
	add	x23, x19, #12
	ldr	w24, [x19, #8]
	ldr	w0, [x21]
	bl	_to_mdev
	ldr	w1, [x0]
	mov	x0, x24
	bl	_align
	mov	x24, x0
	ldr	w0, [x21]
	bl	_to_mdev
	ldr	w3, [x0]
Lloh3:
	adrp	x8, _MLX5_RWQ_PREFIX@GOTPAGE
Lloh4:
	ldr	x8, [x8, _MLX5_RWQ_PREFIX@GOTPAGEOFF]
Lloh5:
	ldr	w5, [x8]
	mov	x0, x22
	mov	x1, x23
	mov	x2, x24
	mov	x4, x20
	bl	_mlx5_alloc_prefered_buf
	cbz	w0, LBB0_4
; %bb.2:
	ldr	w0, [x19, #4]
	bl	_free
LBB0_3:
Lloh6:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh7:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh8:
	ldr	w8, [x8]
Lloh9:
	adrp	x9, _errno@GOTPAGE
Lloh10:
	ldr	x9, [x9, _errno@GOTPAGEOFF]
Lloh11:
	str	w8, [x9]
	mov	w0, #-1
LBB0_4:
	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 AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotStr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.cfi_endproc
                                        ; -- End function
	.comm	_MLX5_ALLOC_TYPE_PREFER_CONTIG,4,2 ; @MLX5_ALLOC_TYPE_PREFER_CONTIG
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_errno,4,2                      ; @errno
	.comm	_MLX5_RWQ_PREFIX,4,2            ; @MLX5_RWQ_PREFIX
	.no_dead_strip	_mlx5_alloc_rwq_buf
.subsections_via_symbols
