	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_mlx5dr_send_ring_alloc         ## -- Begin function mlx5dr_send_ring_alloc
	.p2align	4, 0x90
_mlx5dr_send_ring_alloc:                ## @mlx5dr_send_ring_alloc
	.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	%rbx
	subq	$24, %rsp
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %rbx
	xorps	%xmm0, %xmm0
	movaps	%xmm0, -48(%rbp)
	movq	_GFP_KERNEL@GOTPCREL(%rip), %r15
	movl	(%r15), %esi
	movl	$64, %edi
	callq	_kzalloc
	movq	%rax, (%rbx)
	testq	%rax, %rax
	je	LBB0_1
## %bb.2:
	movq	_QUEUE_SIZE@GOTPCREL(%rip), %r14
	movl	(%r14), %edx
	incl	%edx
	movl	8(%rbx), %edi
	movl	24(%rbx), %esi
	callq	_dr_create_cq
	movq	(%rbx), %rdi
	movq	%rax, 16(%rdi)
	testq	%rax, %rax
	je	LBB0_3
## %bb.4:
	movl	8(%rax), %eax
	movl	%eax, -36(%rbp)
	movl	12(%rbx), %eax
	movl	%eax, -40(%rbp)
	movl	24(%rbx), %eax
	movl	%eax, -44(%rbp)
	movl	(%r14), %eax
	movl	%eax, -48(%rbp)
	movl	8(%rbx), %edi
	leaq	-48(%rbp), %rsi
	callq	_dr_create_rc_qp
	movq	(%rbx), %rcx
	movq	%rax, 24(%rcx)
	testq	%rax, %rax
	je	LBB0_5
## %bb.6:
	movq	16(%rcx), %rcx
	movq	%rax, (%rcx)
	movl	(%r14), %ecx
	movl	%ecx, 16(%rbx)
	movl	(%rax), %edi
	movq	_DR_STE_SIZE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_min
	movl	%eax, 20(%rbx)
	movl	16(%rbx), %eax
	movq	_SIGNAL_PER_DIV_QUEUE@GOTPCREL(%rip), %rcx
	cltd
	idivl	(%rcx)
	movq	(%rbx), %rcx
	movl	%eax, (%rcx)
	movq	%rbx, %rdi
	callq	_dr_prepare_qp_to_rts
	movl	%eax, %r14d
	testl	%eax, %eax
	je	LBB0_7
LBB0_14:
	movl	8(%rbx), %edi
	movq	(%rbx), %rax
	movq	24(%rax), %rsi
	callq	_dr_destroy_qp
	movq	(%rbx), %rcx
	jmp	LBB0_15
LBB0_1:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	xorl	%r14d, %r14d
	subl	(%rax), %r14d
	jmp	LBB0_17
LBB0_3:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	xorl	%r14d, %r14d
	subl	(%rax), %r14d
	jmp	LBB0_16
LBB0_5:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	xorl	%r14d, %r14d
	subl	(%rax), %r14d
LBB0_15:
	movl	8(%rbx), %edi
	movq	16(%rcx), %rsi
	callq	_dr_destroy_cq
	movq	(%rbx), %rdi
LBB0_16:
	callq	_kfree
LBB0_17:
	movl	%r14d, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_7:
	movq	_DR_CHUNK_SIZE_1K@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	_DR_ICM_TYPE_STE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_mlx5dr_icm_pool_chunk_size_to_byte
	movl	%eax, %r14d
	movq	(%rbx), %rax
	movl	%r14d, 4(%rax)
	imull	(%rax), %r14d
	movl	(%r15), %esi
	movl	%r14d, %edi
	callq	_kzalloc
	movq	(%rbx), %rcx
	movq	%rax, 32(%rcx)
	testq	%rax, %rax
	je	LBB0_8
## %bb.9:
	movl	%r14d, 8(%rcx)
	movl	8(%rbx), %edi
	movl	12(%rbx), %esi
	movq	%rax, %rdx
	movl	%r14d, %ecx
	callq	_dr_reg_mr
	movq	(%rbx), %rcx
	movq	%rax, 40(%rcx)
	testq	%rax, %rax
	je	LBB0_10
## %bb.11:
	movl	8(%rbx), %edi
	movl	12(%rbx), %esi
	movq	56(%rcx), %rdx
	movq	_MIN_READ_SYNC@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	callq	_dr_reg_mr
	movq	(%rbx), %rcx
	movq	%rax, 48(%rcx)
	xorl	%r14d, %r14d
	testq	%rax, %rax
	jne	LBB0_17
## %bb.12:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	movl	(%rax), %r14d
	movl	8(%rbx), %edi
	movq	40(%rcx), %rsi
	callq	_dr_dereg_mr
	movq	(%rbx), %rcx
	jmp	LBB0_13
LBB0_8:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	xorl	%r14d, %r14d
	subl	(%rax), %r14d
	jmp	LBB0_14
LBB0_10:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	movl	(%rax), %r14d
LBB0_13:
	negl	%r14d
	movq	32(%rcx), %rdi
	callq	_kfree
	jmp	LBB0_14
	.cfi_endproc
                                        ## -- End function
	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_QUEUE_SIZE,4,2                 ## @QUEUE_SIZE
	.comm	_DR_STE_SIZE,4,2                ## @DR_STE_SIZE
	.comm	_SIGNAL_PER_DIV_QUEUE,4,2       ## @SIGNAL_PER_DIV_QUEUE
	.comm	_DR_CHUNK_SIZE_1K,4,2           ## @DR_CHUNK_SIZE_1K
	.comm	_DR_ICM_TYPE_STE,4,2            ## @DR_ICM_TYPE_STE
	.comm	_MIN_READ_SYNC,4,2              ## @MIN_READ_SYNC
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_mlx5dr_send_ring_alloc         ; -- Begin function mlx5dr_send_ring_alloc
	.p2align	2
_mlx5dr_send_ring_alloc:                ; @mlx5dr_send_ring_alloc
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.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
	mov	x19, x0
	stp	xzr, xzr, [sp]
Lloh0:
	adrp	x21, _GFP_KERNEL@GOTPAGE
Lloh1:
	ldr	x21, [x21, _GFP_KERNEL@GOTPAGEOFF]
	ldr	w1, [x21]
	mov	w0, #64
	bl	_kzalloc
	str	x0, [x19]
	cbz	x0, LBB0_5
; %bb.1:
Lloh2:
	adrp	x20, _QUEUE_SIZE@GOTPAGE
Lloh3:
	ldr	x20, [x20, _QUEUE_SIZE@GOTPAGEOFF]
	ldr	w8, [x20]
	add	w2, w8, #1
	ldr	w0, [x19, #8]
	ldr	w1, [x19, #24]
	bl	_dr_create_cq
	mov	x8, x0
	ldr	x0, [x19]
	str	x8, [x0, #16]
	cbz	x8, LBB0_6
; %bb.2:
	ldr	w8, [x8, #8]
	ldp	w0, w9, [x19, #8]
	stp	w9, w8, [sp, #8]
	ldr	w8, [x19, #24]
	ldr	w9, [x20]
	stp	w9, w8, [sp]
	mov	x1, sp
	bl	_dr_create_rc_qp
	ldr	x8, [x19]
	str	x0, [x8, #24]
	cbz	x0, LBB0_7
; %bb.3:
	ldr	x8, [x8, #16]
	str	x0, [x8]
	ldr	w8, [x20]
	str	w8, [x19, #16]
	ldr	w0, [x0]
Lloh4:
	adrp	x8, _DR_STE_SIZE@GOTPAGE
Lloh5:
	ldr	x8, [x8, _DR_STE_SIZE@GOTPAGEOFF]
Lloh6:
	ldr	w1, [x8]
	bl	_min
	str	w0, [x19, #20]
	ldr	w8, [x19, #16]
Lloh7:
	adrp	x9, _SIGNAL_PER_DIV_QUEUE@GOTPAGE
Lloh8:
	ldr	x9, [x9, _SIGNAL_PER_DIV_QUEUE@GOTPAGEOFF]
Lloh9:
	ldr	w9, [x9]
	sdiv	w8, w8, w9
	ldr	x9, [x19]
	str	w8, [x9]
	mov	x0, x19
	bl	_dr_prepare_qp_to_rts
	mov	x20, x0
	cbz	w0, LBB0_11
LBB0_4:
	ldr	w0, [x19, #8]
	ldr	x8, [x19]
	ldr	x1, [x8, #24]
	bl	_dr_destroy_qp
	ldr	x8, [x19]
	b	LBB0_8
LBB0_5:
Lloh10:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh11:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh12:
	ldr	w8, [x8]
	neg	w20, w8
	b	LBB0_10
LBB0_6:
Lloh13:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh14:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh15:
	ldr	w8, [x8]
	neg	w20, w8
	b	LBB0_9
LBB0_7:
Lloh16:
	adrp	x9, _ENOMEM@GOTPAGE
Lloh17:
	ldr	x9, [x9, _ENOMEM@GOTPAGEOFF]
Lloh18:
	ldr	w9, [x9]
	neg	w20, w9
LBB0_8:
	ldr	w0, [x19, #8]
	ldr	x1, [x8, #16]
	bl	_dr_destroy_cq
	ldr	x0, [x19]
LBB0_9:
	bl	_kfree
LBB0_10:
	mov	x0, x20
	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
	add	sp, sp, #64
	ret
LBB0_11:
Lloh19:
	adrp	x8, _DR_CHUNK_SIZE_1K@GOTPAGE
Lloh20:
	ldr	x8, [x8, _DR_CHUNK_SIZE_1K@GOTPAGEOFF]
Lloh21:
	ldr	w0, [x8]
Lloh22:
	adrp	x8, _DR_ICM_TYPE_STE@GOTPAGE
Lloh23:
	ldr	x8, [x8, _DR_ICM_TYPE_STE@GOTPAGEOFF]
Lloh24:
	ldr	w1, [x8]
	bl	_mlx5dr_icm_pool_chunk_size_to_byte
	ldr	x8, [x19]
	str	w0, [x8, #4]
	ldr	w8, [x8]
	mul	w20, w8, w0
	ldr	w1, [x21]
	mov	x0, x20
	bl	_kzalloc
	ldr	x8, [x19]
	str	x0, [x8, #32]
	cbz	x0, LBB0_15
; %bb.12:
	mov	x2, x0
	str	w20, [x8, #8]
	ldp	w0, w1, [x19, #8]
	mov	x3, x20
	bl	_dr_reg_mr
	ldr	x8, [x19]
	str	x0, [x8, #40]
	cbz	x0, LBB0_16
; %bb.13:
	ldp	w0, w1, [x19, #8]
	ldr	x2, [x8, #56]
Lloh25:
	adrp	x8, _MIN_READ_SYNC@GOTPAGE
Lloh26:
	ldr	x8, [x8, _MIN_READ_SYNC@GOTPAGEOFF]
Lloh27:
	ldr	w3, [x8]
	bl	_dr_reg_mr
	ldr	x8, [x19]
	str	x0, [x8, #48]
	cbz	x0, LBB0_17
; %bb.14:
	mov	w20, #0
	b	LBB0_10
LBB0_15:
Lloh28:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh29:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh30:
	ldr	w8, [x8]
	neg	w20, w8
	b	LBB0_4
LBB0_16:
Lloh31:
	adrp	x9, _ENOMEM@GOTPAGE
Lloh32:
	ldr	x9, [x9, _ENOMEM@GOTPAGEOFF]
Lloh33:
	ldr	w20, [x9]
	b	LBB0_18
LBB0_17:
Lloh34:
	adrp	x9, _ENOMEM@GOTPAGE
Lloh35:
	ldr	x9, [x9, _ENOMEM@GOTPAGEOFF]
Lloh36:
	ldr	w20, [x9]
	ldr	w0, [x19, #8]
	ldr	x1, [x8, #40]
	bl	_dr_dereg_mr
	ldr	x8, [x19]
LBB0_18:
	neg	w20, w20
	ldr	x0, [x8, #32]
	bl	_kfree
	b	LBB0_4
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh24
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh25, Lloh26, Lloh27
	.loh AdrpLdrGotLdr	Lloh28, Lloh29, Lloh30
	.loh AdrpLdrGotLdr	Lloh31, Lloh32, Lloh33
	.loh AdrpLdrGotLdr	Lloh34, Lloh35, Lloh36
	.cfi_endproc
                                        ; -- End function
	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_QUEUE_SIZE,4,2                 ; @QUEUE_SIZE
	.comm	_DR_STE_SIZE,4,2                ; @DR_STE_SIZE
	.comm	_SIGNAL_PER_DIV_QUEUE,4,2       ; @SIGNAL_PER_DIV_QUEUE
	.comm	_DR_CHUNK_SIZE_1K,4,2           ; @DR_CHUNK_SIZE_1K
	.comm	_DR_ICM_TYPE_STE,4,2            ; @DR_ICM_TYPE_STE
	.comm	_MIN_READ_SYNC,4,2              ; @MIN_READ_SYNC
.subsections_via_symbols
