	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_mlx4_srq_alloc                 ## -- Begin function mlx4_srq_alloc
	.p2align	4, 0x90
_mlx4_srq_alloc:                        ## @mlx4_srq_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	%r13
	pushq	%r12
	pushq	%rbx
	subq	$40, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%r9d, -56(%rbp)                 ## 4-byte Spill
	movq	%r8, -72(%rbp)                  ## 8-byte Spill
	movl	%ecx, -48(%rbp)                 ## 4-byte Spill
	movl	%edx, -52(%rbp)                 ## 4-byte Spill
	movl	%esi, %r14d
	movq	%rdi, %r12
	movq	16(%rbp), %rbx
	callq	_mlx4_priv
	movq	%rax, %r15
	movq	%r12, %rdi
	movq	%rbx, %rsi
	callq	_mlx4_srq_alloc_icm
	movl	%eax, %r13d
	testl	%eax, %eax
	jne	LBB0_8
## %bb.1:
	movl	%r14d, -44(%rbp)                ## 4-byte Spill
	movq	%r15, %rdi
	callq	_spin_lock_irq
	movq	%r15, %r14
	addq	$4, %r14
	movq	16(%rbp), %rbx
	movl	(%rbx), %esi
	movq	%r14, %rdi
	movq	%rbx, %rdx
	callq	_radix_tree_insert
	movl	%eax, %r13d
	movq	%r15, %rdi
	callq	_spin_unlock_irq
	testl	%r13d, %r13d
	movq	%r15, %rax
	movq	%rbx, %r15
	jne	LBB0_5
## %bb.2:
	movq	%rax, -64(%rbp)                 ## 8-byte Spill
	movq	%r12, %rdi
	callq	_mlx4_alloc_cmd_mailbox
	movq	%rax, %rbx
	movq	%rax, %rdi
	callq	_IS_ERR
	testq	%rax, %rax
	je	LBB0_6
## %bb.3:
	movq	%rbx, %rdi
	callq	_PTR_ERR
	movl	%eax, %r13d
	jmp	LBB0_4
LBB0_6:
	movq	(%rbx), %r13
	movl	24(%r15), %edi
	callq	_ilog2
	shll	$24, %eax
	orl	(%r15), %eax
	movl	%eax, %edi
	callq	_cpu_to_be32
	movq	%rax, 56(%r13)
	movq	16(%r15), %rax
	addq	$-4, %rax
	movq	%rax, 48(%r13)
	movl	-48(%rbp), %edi                 ## 4-byte Reload
	callq	_cpu_to_be16
	movl	%eax, 40(%r13)
	movl	-52(%rbp), %edi                 ## 4-byte Reload
	andl	$16777215, %edi                 ## imm = 0xFFFFFF
	callq	_cpu_to_be32
	movq	%rax, 32(%r13)
	movq	-72(%rbp), %rsi                 ## 8-byte Reload
	movq	(%rsi), %rax
	movq	_MLX4_ICM_PAGE_SHIFT@GOTPCREL(%rip), %rcx
	subq	(%rcx), %rax
	movq	%rax, 24(%r13)
	movq	%r12, %rdi
	callq	_mlx4_mtt_addr
	movl	%eax, %edi
	callq	_cpu_to_be32
	movq	%rax, 16(%r13)
	movl	-44(%rbp), %edi                 ## 4-byte Reload
	callq	_cpu_to_be32
	movq	%rax, 8(%r13)
	movl	-56(%rbp), %edi                 ## 4-byte Reload
	callq	_cpu_to_be64
	movl	%eax, 4(%r13)
	movl	(%r15), %edx
	movq	%r12, %rdi
	movq	%rbx, %rsi
	callq	_mlx4_SW2HW_SRQ
	movl	%eax, %r13d
	movq	%r12, %rdi
	movq	%rbx, %rsi
	callq	_mlx4_free_cmd_mailbox
	testl	%r13d, %r13d
	je	LBB0_7
LBB0_4:
	movq	-64(%rbp), %rbx                 ## 8-byte Reload
	movq	%rbx, %rdi
	callq	_spin_lock_irq
	movl	(%r15), %esi
	movq	%r14, %rdi
	callq	_radix_tree_delete
	movq	%rbx, %rdi
	callq	_spin_unlock_irq
LBB0_5:
	movl	(%r15), %esi
	movq	%r12, %rdi
	callq	_mlx4_srq_free_icm
LBB0_8:
	movl	%r13d, %eax
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_7:
	leaq	8(%r15), %rdi
	movl	$1, %esi
	callq	_refcount_set
	addq	$4, %r15
	movq	%r15, %rdi
	callq	_init_completion
	xorl	%r13d, %r13d
	jmp	LBB0_8
	.cfi_endproc
                                        ## -- End function
	.comm	_MLX4_ICM_PAGE_SHIFT,8,3        ## @MLX4_ICM_PAGE_SHIFT
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_mlx4_srq_alloc                 ; -- Begin function mlx4_srq_alloc
	.p2align	2
_mlx4_srq_alloc:                        ; @mlx4_srq_alloc
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	stp	x28, x27, [sp, #16]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #32]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #48]             ; 16-byte Folded Spill
	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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	mov	x19, x6
	mov	x23, x5
	mov	x25, x4
	mov	x28, x3
	mov	x27, x2
	mov	x24, x1
	mov	x20, x0
	bl	_mlx4_priv
	mov	x21, x0
	mov	x0, x20
	mov	x1, x19
	bl	_mlx4_srq_alloc_icm
	mov	x26, x0
	cbnz	w0, LBB0_7
; %bb.1:
	mov	x0, x21
	bl	_spin_lock_irq
	add	x22, x21, #4
	ldr	w1, [x19]
	mov	x0, x22
	mov	x2, x19
	bl	_radix_tree_insert
	mov	x26, x0
	mov	x0, x21
	bl	_spin_unlock_irq
	cbnz	w26, LBB0_6
; %bb.2:
	mov	x0, x20
	bl	_mlx4_alloc_cmd_mailbox
	mov	x26, x0
	bl	_IS_ERR
	cbz	x0, LBB0_4
; %bb.3:
	mov	x0, x26
	bl	_PTR_ERR
	mov	x26, x0
	b	LBB0_5
LBB0_4:
	str	x26, [sp, #8]                   ; 8-byte Folded Spill
	ldr	x26, [x26]
	ldr	w0, [x19, #24]
	bl	_ilog2
	ldr	w8, [x19]
	orr	w0, w8, w0, lsl #24
	bl	_cpu_to_be32
	ldr	x8, [x19, #16]
	sub	x8, x8, #4
	stp	x8, x0, [x26, #48]
	mov	x0, x28
	bl	_cpu_to_be16
	str	w0, [x26, #40]
	and	w0, w27, #0xffffff
	bl	_cpu_to_be32
	ldr	x8, [x25]
Lloh0:
	adrp	x9, _MLX4_ICM_PAGE_SHIFT@GOTPAGE
Lloh1:
	ldr	x9, [x9, _MLX4_ICM_PAGE_SHIFT@GOTPAGEOFF]
Lloh2:
	ldr	x9, [x9]
	sub	x8, x8, x9
	stp	x8, x0, [x26, #24]
	mov	x0, x20
	mov	x1, x25
	bl	_mlx4_mtt_addr
	bl	_cpu_to_be32
	str	x0, [x26, #16]
	mov	x0, x24
	bl	_cpu_to_be32
	str	x0, [x26, #8]
	mov	x0, x23
	bl	_cpu_to_be64
	str	w0, [x26, #4]
	ldr	w2, [x19]
	mov	x0, x20
	ldr	x23, [sp, #8]                   ; 8-byte Folded Reload
	mov	x1, x23
	bl	_mlx4_SW2HW_SRQ
	mov	x26, x0
	mov	x0, x20
	mov	x1, x23
	bl	_mlx4_free_cmd_mailbox
	cbz	w26, LBB0_8
LBB0_5:
	mov	x0, x21
	bl	_spin_lock_irq
	ldr	w1, [x19]
	mov	x0, x22
	bl	_radix_tree_delete
	mov	x0, x21
	bl	_spin_unlock_irq
LBB0_6:
	ldr	w1, [x19]
	mov	x0, x20
	bl	_mlx4_srq_free_icm
LBB0_7:
	mov	x0, x26
	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
	ldp	x24, x23, [sp, #48]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #32]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #112
	ret
LBB0_8:
	add	x0, x19, #8
	mov	w1, #1
	bl	_refcount_set
	add	x0, x19, #4
	bl	_init_completion
	b	LBB0_7
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_MLX4_ICM_PAGE_SHIFT,8,3        ; @MLX4_ICM_PAGE_SHIFT
.subsections_via_symbols
