	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function mlx4_slave_special_qp_cap
_mlx4_slave_special_qp_cap:             ## @mlx4_slave_special_qp_cap
	.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	%rdi, %r12
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rbx
	movl	(%rbx), %esi
	movl	$8, %edi
	callq	_kzalloc
	movq	%rax, %r14
	movl	(%r12), %edi
	movl	(%rbx), %edx
	movl	$4, %esi
	callq	_kcalloc
	movq	%rax, 48(%r12)
	testq	%r14, %r14
	je	LBB0_10
## %bb.1:
	testq	%rax, %rax
	je	LBB0_10
## %bb.2:
	xorl	%r15d, %r15d
	cmpl	$0, (%r12)
	jle	LBB0_13
## %bb.3:
	movl	$1, %ebx
	.p2align	4, 0x90
LBB0_4:                                 ## =>This Inner Loop Header: Depth=1
	movq	%r12, %rdi
	movl	%ebx, %esi
	movq	%r14, %rdx
	callq	_mlx4_QUERY_FUNC_CAP
	testl	%eax, %eax
	jne	LBB0_5
## %bb.7:                               ##   in Loop: Header=BB0_4 Depth=1
	movl	4(%r14), %eax
	movq	48(%r12), %rcx
	movl	%eax, -4(%rcx,%rbx,4)
	leaq	(,%rbx,4), %rcx
	movq	32(%r12), %rax
	movq	40(%r12), %rdx
	movl	(%rax,%rbx,4), %eax
	movl	%eax, (%rdx,%rbx,4)
	movl	(%r14), %eax
	movq	24(%r12), %rdx
	movl	%eax, (%rdx,%rbx,4)
	movq	16(%r12), %rdx
	addq	%rcx, %rdx
	addq	8(%r12), %rcx
	movq	%r12, %rdi
	movl	%ebx, %esi
	callq	_mlx4_get_slave_pkey_gid_tbl_len
	testl	%eax, %eax
	jne	LBB0_8
## %bb.9:                               ##   in Loop: Header=BB0_4 Depth=1
	leaq	1(%rbx), %rax
	movslq	(%r12), %rcx
	cmpq	%rcx, %rbx
	movq	%rax, %rbx
	jl	LBB0_4
	jmp	LBB0_13
LBB0_10:
	leaq	L_.str(%rip), %rsi
	xorl	%r15d, %r15d
	movq	%r12, %rdi
	xorl	%eax, %eax
	callq	_mlx4_err
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, %eax
	je	LBB0_13
## %bb.11:
	negl	%eax
	movl	%eax, %r15d
	jmp	LBB0_12
LBB0_5:
	movl	%eax, %r13d
	leaq	L_.str.1(%rip), %rsi
	jmp	LBB0_6
LBB0_8:
	movl	%eax, %r13d
	leaq	L_.str.2(%rip), %rsi
LBB0_6:
	movq	%r12, %rdi
	movl	%ebx, %edx
	movl	%r13d, %ecx
	xorl	%eax, %eax
	callq	_mlx4_err
	movl	%r13d, %r15d
LBB0_12:
	movq	%r12, %rdi
	callq	_mlx4_slave_destroy_special_qp_cap
LBB0_13:
	movq	%r14, %rdi
	callq	_kfree
	movl	%r15d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Failed to allocate memory for special qps cap\n"

	.comm	_ENOMEM,4,2                     ## @ENOMEM
L_.str.1:                               ## @.str.1
	.asciz	"QUERY_FUNC_CAP port command failed for port %d, aborting (%d)\n"

L_.str.2:                               ## @.str.2
	.asciz	"QUERY_PORT command failed for port %d, aborting (%d)\n"

	.no_dead_strip	_mlx4_slave_special_qp_cap
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function mlx4_slave_special_qp_cap
_mlx4_slave_special_qp_cap:             ; @mlx4_slave_special_qp_cap
	.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	x20, x0
Lloh0:
	adrp	x21, _GFP_KERNEL@GOTPAGE
Lloh1:
	ldr	x21, [x21, _GFP_KERNEL@GOTPAGEOFF]
	ldr	w1, [x21]
	mov	w0, #8
	bl	_kzalloc
	mov	x19, x0
	ldr	w0, [x20]
	ldr	w2, [x21]
	mov	w1, #4
	bl	_kcalloc
	str	x0, [x20, #48]
	cmp	x19, #0
	ccmp	x0, #0, #4, ne
	b.ne	LBB0_3
; %bb.1:
Lloh2:
	adrp	x1, l_.str@PAGE
Lloh3:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x20
	bl	_mlx4_err
Lloh4:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh5:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh6:
	ldr	w8, [x8]
	cbz	w8, LBB0_8
; %bb.2:
	neg	w22, w8
	b	LBB0_11
LBB0_3:
	ldr	w8, [x20]
	cmp	w8, #1
	b.lt	LBB0_8
; %bb.4:
	mov	w21, #1
LBB0_5:                                 ; =>This Inner Loop Header: Depth=1
	mov	x0, x20
	mov	x1, x21
	mov	x2, x19
	bl	_mlx4_QUERY_FUNC_CAP
	cbnz	w0, LBB0_9
; %bb.6:                                ;   in Loop: Header=BB0_5 Depth=1
	ldr	w8, [x19, #4]
	lsl	x9, x21, #2
	ldp	x11, x10, [x20, #40]
	add	x10, x9, x10
	stur	w8, [x10, #-4]
	ldp	x10, x8, [x20, #24]
	ldr	w8, [x8, x9]
	str	w8, [x11, x9]
	ldr	w8, [x19]
	str	w8, [x10, x9]
	ldp	x10, x8, [x20, #8]
	add	x2, x8, x9
	add	x3, x10, x9
	mov	x0, x20
	mov	x1, x21
	bl	_mlx4_get_slave_pkey_gid_tbl_len
	cbnz	w0, LBB0_10
; %bb.7:                                ;   in Loop: Header=BB0_5 Depth=1
	add	x8, x21, #1
	ldrsw	x9, [x20]
	cmp	x21, x9
	mov	x21, x8
	b.lt	LBB0_5
LBB0_8:
	mov	w22, #0
	b	LBB0_12
LBB0_9:
	mov	x22, x0
	stp	x21, x22, [sp]
Lloh7:
	adrp	x1, l_.str.1@PAGE
Lloh8:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x20
	bl	_mlx4_err
	b	LBB0_11
LBB0_10:
	mov	x22, x0
	stp	x21, x22, [sp]
Lloh9:
	adrp	x1, l_.str.2@PAGE
Lloh10:
	add	x1, x1, l_.str.2@PAGEOFF
	mov	x0, x20
	bl	_mlx4_err
                                        ; kill: def $w22 killed $w22 killed $x22 def $x22
LBB0_11:
	mov	x0, x20
	bl	_mlx4_slave_destroy_special_qp_cap
LBB0_12:
	mov	x0, x19
	bl	_kfree
	mov	x0, x22
	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
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpAdd	Lloh7, Lloh8
	.loh AdrpAdd	Lloh9, Lloh10
	.cfi_endproc
                                        ; -- End function
	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Failed to allocate memory for special qps cap\n"

	.comm	_ENOMEM,4,2                     ; @ENOMEM
l_.str.1:                               ; @.str.1
	.asciz	"QUERY_FUNC_CAP port command failed for port %d, aborting (%d)\n"

l_.str.2:                               ; @.str.2
	.asciz	"QUERY_PORT command failed for port %d, aborting (%d)\n"

	.no_dead_strip	_mlx4_slave_special_qp_cap
.subsections_via_symbols
