	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_mthca_alloc_qp                 ## -- Begin function mthca_alloc_qp
	.p2align	4, 0x90
_mthca_alloc_qp:                        ## @mthca_alloc_qp
	.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	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	addl	$-128, %r8d
	cmpl	$3, %r8d
	jae	LBB0_1
## %bb.3:
	movq	%rcx, %r12
	movq	%rdx, %r13
	movq	%rsi, %r14
	movq	%rdi, %rbx
	movl	%r9d, -44(%rbp)                 ## 4-byte Spill
	movq	24(%rbp), %rcx
	movq	16(%rbp), %rsi
	movslq	%r8d, %rax
	leaq	l_switch.table.mthca_alloc_qp(%rip), %rdx
	movq	(%rdx,%rax,8), %rax
	movl	(%rax), %eax
	movl	%eax, 16(%rcx)
	movq	%r14, %rdx
	callq	_mthca_set_qp_size
	movl	%eax, %r15d
	testl	%eax, %eax
	jne	LBB0_9
## %bb.4:
	leaq	8(%rbx), %r15
	movq	%r15, %rdi
	callq	_mthca_alloc
	movq	24(%rbp), %rcx
	movl	%eax, (%rcx)
	cmpl	$-1, %eax
	je	LBB0_5
## %bb.6:
	movq	%r15, -56(%rbp)                 ## 8-byte Spill
	movq	32(%rbp), %rax
	movq	24(%rbp), %r9
	movq	$0, 8(%r9)
	movq	%rax, (%rsp)
	movq	%rbx, %rdi
	movq	%r14, %rsi
	movq	%r13, %rdx
	movq	%r12, %rcx
	movl	-44(%rbp), %r8d                 ## 4-byte Reload
	callq	_mthca_alloc_qp_common
	testl	%eax, %eax
	je	LBB0_8
## %bb.7:
	movl	%eax, %r15d
	movq	24(%rbp), %rax
	movl	(%rax), %esi
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	callq	_mthca_free
	jmp	LBB0_9
LBB0_1:
	movq	_EINVAL@GOTPCREL(%rip), %rax
LBB0_2:
	xorl	%r15d, %r15d
	subl	(%rax), %r15d
LBB0_9:
	movl	%r15d, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_5:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	jmp	LBB0_2
LBB0_8:
	movq	%rbx, %rdi
	callq	_spin_lock_irq
	leaq	4(%rbx), %rdi
	movl	12(%rbx), %esi
	decl	%esi
	movq	24(%rbp), %rdx
	andl	(%rdx), %esi
	callq	_mthca_array_set
	movq	%rbx, %rdi
	callq	_spin_unlock_irq
	xorl	%r15d, %r15d
	jmp	LBB0_9
	.cfi_endproc
                                        ## -- End function
	.comm	_RC,4,2                         ## @RC
	.comm	_UC,4,2                         ## @UC
	.comm	_UD,4,2                         ## @UD
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.section	__DATA,__const
	.p2align	3                               ## @switch.table.mthca_alloc_qp
l_switch.table.mthca_alloc_qp:
	.quad	_UD
	.quad	_UC
	.quad	_RC

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_mthca_alloc_qp                 ; -- Begin function mthca_alloc_qp
	.p2align	2
_mthca_alloc_qp:                        ; @mthca_alloc_qp
	.cfi_startproc
; %bb.0:
	stp	x26, x25, [sp, #-80]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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
	sub	w8, w4, #128
	cmp	w8, #3
	b.hs	LBB0_5
; %bb.1:
	mov	x19, x7
	mov	x21, x5
	mov	x22, x3
	mov	x23, x2
	mov	x24, x1
	mov	x20, x0
Lloh0:
	adrp	x9, l_switch.table.mthca_alloc_qp@PAGE
Lloh1:
	add	x9, x9, l_switch.table.mthca_alloc_qp@PAGEOFF
	ldr	x8, [x9, w8, sxtw #3]
	ldr	w8, [x8]
	str	w8, [x7, #16]
	mov	x1, x6
	mov	x2, x24
	mov	x3, x7
	bl	_mthca_set_qp_size
	mov	x26, x0
	cbnz	w0, LBB0_7
; %bb.2:
	add	x25, x20, #8
	mov	x0, x25
	bl	_mthca_alloc
	str	w0, [x19]
	cmn	w0, #1
	b.eq	LBB0_8
; %bb.3:
	ldr	x6, [x29, #16]
	str	xzr, [x19, #8]
	mov	x0, x20
	mov	x1, x24
	mov	x2, x23
	mov	x3, x22
	mov	x4, x21
	mov	x5, x19
	bl	_mthca_alloc_qp_common
	mov	x26, x0
	cbz	w0, LBB0_9
; %bb.4:
	ldr	w1, [x19]
	mov	x0, x25
	bl	_mthca_free
	b	LBB0_7
LBB0_5:
Lloh2:
	adrp	x8, _EINVAL@GOTPAGE
Lloh3:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
LBB0_6:
	ldr	w8, [x8]
	neg	w26, w8
LBB0_7:
	mov	x0, x26
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	ret
LBB0_8:
Lloh4:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh5:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
	b	LBB0_6
LBB0_9:
	mov	x0, x20
	bl	_spin_lock_irq
	add	x0, x20, #4
	ldr	w8, [x19]
	ldr	w9, [x20, #12]
	sub	w9, w9, #1
	and	w1, w9, w8
	mov	x2, x19
	bl	_mthca_array_set
	mov	x0, x20
	bl	_spin_unlock_irq
	b	LBB0_7
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh4, Lloh5
	.cfi_endproc
                                        ; -- End function
	.comm	_RC,4,2                         ; @RC
	.comm	_UC,4,2                         ; @UC
	.comm	_UD,4,2                         ; @UD
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.section	__DATA,__const
	.p2align	3                               ; @switch.table.mthca_alloc_qp
l_switch.table.mthca_alloc_qp:
	.quad	_UD
	.quad	_UC
	.quad	_RC

.subsections_via_symbols
