	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_mlx4_QP_ATTACH_wrapper         ## -- Begin function mlx4_QP_ATTACH_wrapper
	.p2align	4, 0x90
_mlx4_QP_ATTACH_wrapper:                ## @mlx4_QP_ATTACH_wrapper
	.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	$56, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%esi, %r13d
	movq	%rdi, %r14
	movq	(%rcx), %r15
	movl	(%rdx), %ebx
	movl	$0, -48(%rbp)
	movl	4(%rdx), %eax
	movl	%eax, -56(%rbp)                 ## 4-byte Spill
	movl	28(%r15), %r12d
	movl	%ebx, -44(%rbp)                 ## 4-byte Spill
	andl	$16777215, %ebx                 ## imm = 0xFFFFFF
	movq	_RES_QP@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	leaq	-80(%rbp), %r8
	movl	%ebx, %edx
	callq	_get_res
	testl	%eax, %eax
	jne	LBB0_14
## %bb.1:
	movq	%r15, %r9
	movl	-44(%rbp), %r8d                 ## 4-byte Reload
	movl	%r8d, %r15d
	shrl	$28, %r15d
	andl	$7, %r15d
	shrl	%r12d
	andl	$1, %r12d
	movl	%ebx, -64(%rbp)
	cmpl	$0, -56(%rbp)                   ## 4-byte Folded Reload
	je	LBB0_6
## %bb.2:
	movl	%ebx, -56(%rbp)                 ## 4-byte Spill
	sarl	$31, %r8d
	leaq	-48(%rbp), %rax
	movq	%rax, 8(%rsp)
	movl	%r12d, (%rsp)
	leaq	-64(%rbp), %rdx
	movq	%r14, %rdi
	movl	%r13d, %esi
	movl	%r12d, %ebx
	movq	%r9, %r12
	movq	%r9, %rcx
	movl	%r15d, %r9d
	callq	_qp_attach
	testl	%eax, %eax
	je	LBB0_4
## %bb.3:
	movl	%eax, %r15d
	leaq	L_.str(%rip), %rdi
	movl	-56(%rbp), %ebx                 ## 4-byte Reload
	movl	%ebx, %esi
	xorl	%eax, %eax
	callq	_pr_err
	movq	%r14, %rdi
	movq	_RES_QP@GOTPCREL(%rip), %r14
	jmp	LBB0_13
LBB0_6:
	movq	%r14, %rdi
	movl	%r13d, %esi
	movq	%r9, %rdx
	movq	%r9, -56(%rbp)                  ## 8-byte Spill
	movl	%r15d, -44(%rbp)                ## 4-byte Spill
	movl	%r15d, %ecx
	callq	_mlx4_adjust_port
	movq	%r14, %rdi
	movl	%eax, %r15d
	testl	%eax, %eax
	movq	_RES_QP@GOTPCREL(%rip), %r14
	jne	LBB0_13
## %bb.7:
	movq	-80(%rbp), %rdx
	leaq	-48(%rbp), %rax
	movq	%rax, (%rsp)
	movq	%rdi, -72(%rbp)                 ## 8-byte Spill
	movq	-72(%rbp), %rdi                 ## 8-byte Reload
	movl	%r13d, %esi
	movq	-56(%rbp), %rcx                 ## 8-byte Reload
	movl	-44(%rbp), %r8d                 ## 4-byte Reload
	movl	%r12d, %r9d
	callq	_rem_mcg_res
	movq	-72(%rbp), %rdi                 ## 8-byte Reload
	movl	%eax, %r15d
	testl	%eax, %eax
	jne	LBB0_13
## %bb.8:
	movl	-48(%rbp), %r9d
	leaq	-64(%rbp), %rsi
	movq	-56(%rbp), %rdx                 ## 8-byte Reload
	movl	-44(%rbp), %ecx                 ## 4-byte Reload
	movl	%r12d, %r8d
	callq	_qp_detach
	testl	%eax, %eax
	je	LBB0_9
## %bb.10:
	movl	%eax, %r15d
	movl	-48(%rbp), %edx
	leaq	L_.str.1(%rip), %rdi
	movl	%ebx, %esi
	xorl	%eax, %eax
	callq	_pr_err
	movq	-72(%rbp), %rdi                 ## 8-byte Reload
	jmp	LBB0_13
LBB0_4:
	movq	-80(%rbp), %rdx
	movl	-48(%rbp), %eax
	movl	%eax, (%rsp)
	movq	%r14, %rdi
	movl	%r13d, %esi
	movq	%r12, %rcx
	movl	%r15d, -44(%rbp)                ## 4-byte Spill
	movl	%r15d, %r8d
	movl	%ebx, %r9d
	callq	_add_mcg_res
	testl	%eax, %eax
	movq	%r14, %rdi
	je	LBB0_5
## %bb.11:
	movl	%eax, %r15d
	movl	-48(%rbp), %r9d
	leaq	-64(%rbp), %rsi
	movq	%rdi, %r14
	movq	%r12, %rdx
	movl	-44(%rbp), %ecx                 ## 4-byte Reload
	movl	%ebx, %r8d
	callq	_qp_detach
	movq	%r14, %rdi
	jmp	LBB0_12
LBB0_5:
	xorl	%r15d, %r15d
LBB0_12:
	movq	_RES_QP@GOTPCREL(%rip), %r14
	movl	-56(%rbp), %ebx                 ## 4-byte Reload
LBB0_13:
	movl	(%r14), %ecx
	movl	%r13d, %esi
	movl	%ebx, %edx
	callq	_put_res
	movl	%r15d, %eax
LBB0_14:
	addq	$56, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_9:
	xorl	%r15d, %r15d
	movq	-72(%rbp), %rdi                 ## 8-byte Reload
	jmp	LBB0_13
	.cfi_endproc
                                        ## -- End function
	.comm	_RES_QP,4,2                     ## @RES_QP
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Fail to attach rule to qp 0x%x\n"

L_.str.1:                               ## @.str.1
	.asciz	"Fail to detach rule from qp 0x%x reg_id = 0x%llx\n"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_mlx4_QP_ATTACH_wrapper         ; -- Begin function mlx4_QP_ATTACH_wrapper
	.p2align	2
_mlx4_QP_ATTACH_wrapper:                ; @mlx4_QP_ATTACH_wrapper
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #128
	.cfi_def_cfa_offset 128
	stp	x28, x27, [sp, #32]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #48]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #64]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #80]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #96]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #112]            ; 16-byte Folded Spill
	add	x29, sp, #112
	.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, x1
	mov	x20, x0
	ldr	x22, [x3]
	str	wzr, [sp, #12]
	ldp	w27, w28, [x2]
	ldr	w24, [x22, #28]
	and	w21, w27, #0xffffff
Lloh0:
	adrp	x26, _RES_QP@GOTPAGE
Lloh1:
	ldr	x26, [x26, _RES_QP@GOTPAGEOFF]
	ldr	w3, [x26]
	add	x4, sp, #16
	mov	x2, x21
	bl	_get_res
	mov	x25, x0
	cbnz	w0, LBB0_12
; %bb.1:
	ubfx	w23, w27, #28, #3
	ubfx	w24, w24, #1, #1
	str	w21, [sp, #24]
	cbz	w28, LBB0_5
; %bb.2:
	asr	w4, w27, #31
	add	x2, sp, #24
	add	x7, sp, #12
	mov	x0, x20
	mov	x1, x19
	mov	x3, x22
	mov	x5, x23
	mov	x6, x24
	bl	_qp_attach
	cbz	w0, LBB0_9
; %bb.3:
	mov	x25, x0
Lloh2:
	adrp	x0, l_.str@PAGE
Lloh3:
	add	x0, x0, l_.str@PAGEOFF
LBB0_4:
	mov	x1, x21
	bl	_pr_err
	b	LBB0_11
LBB0_5:
	mov	x0, x20
	mov	x1, x19
	mov	x2, x22
	mov	x3, x23
	bl	_mlx4_adjust_port
	mov	x25, x0
	cbnz	w0, LBB0_11
; %bb.6:
	ldr	x2, [sp, #16]
	add	x6, sp, #12
	mov	x0, x20
	mov	x1, x19
	mov	x3, x22
	mov	x4, x23
	mov	x5, x24
	bl	_rem_mcg_res
	mov	x25, x0
	cbnz	w0, LBB0_11
; %bb.7:
	ldr	w5, [sp, #12]
	add	x1, sp, #24
	mov	x0, x20
	mov	x2, x22
	mov	x3, x23
	mov	x4, x24
	bl	_qp_detach
	mov	x25, x0
	cbz	w0, LBB0_11
; %bb.8:
	ldr	w8, [sp, #12]
	str	x8, [sp]
Lloh4:
	adrp	x0, l_.str.1@PAGE
Lloh5:
	add	x0, x0, l_.str.1@PAGEOFF
	b	LBB0_4
LBB0_9:
	ldr	x2, [sp, #16]
	ldr	w6, [sp, #12]
	mov	x0, x20
	mov	x1, x19
	mov	x3, x22
	mov	x4, x23
	mov	x5, x24
	bl	_add_mcg_res
	mov	x25, x0
	cbz	w0, LBB0_11
; %bb.10:
	ldr	w5, [sp, #12]
	add	x1, sp, #24
	mov	x0, x20
	mov	x2, x22
	mov	x3, x23
	mov	x4, x24
	bl	_qp_detach
LBB0_11:
	ldr	w3, [x26]
	mov	x0, x20
	mov	x1, x19
	mov	x2, x21
	bl	_put_res
LBB0_12:
	mov	x0, x25
	ldp	x29, x30, [sp, #112]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #96]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #80]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #64]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #48]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #128
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpAdd	Lloh4, Lloh5
	.cfi_endproc
                                        ; -- End function
	.comm	_RES_QP,4,2                     ; @RES_QP
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Fail to attach rule to qp 0x%x\n"

l_.str.1:                               ; @.str.1
	.asciz	"Fail to detach rule from qp 0x%x reg_id = 0x%llx\n"

.subsections_via_symbols
