	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function mlx5_ib_mcg_attach
_mlx5_ib_mcg_attach:                    ## @mlx5_ib_mcg_attach
	.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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %r14
	movq	%rdi, %r12
	movl	16(%rdi), %edi
	callq	_to_mdev
	movq	%rax, %r15
	movq	%r12, %rdi
	callq	_to_mqp
	movq	%rax, %rbx
	movq	8(%r12), %rdi
	testq	%rdi, %rdi
	je	LBB0_1
## %bb.2:
	callq	_to_mpd
	movl	(%rax), %ecx
	jmp	LBB0_3
LBB0_1:
	xorl	%ecx, %ecx
LBB0_3:
	movq	_MLX5_IB_QP_UNDERLAY@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, (%rbx)
	je	LBB0_5
## %bb.4:
	leaq	L_.str(%rip), %rsi
	movq	%r15, %rdi
	callq	_mlx5_ib_dbg
	movq	_EOPNOTSUPP@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
	jmp	LBB0_8
LBB0_5:
	movl	(%r15), %edi
	movl	(%r12), %edx
	movq	%r14, %rsi
	callq	_mlx5_cmd_attach_mcg
	testl	%eax, %eax
	je	LBB0_6
## %bb.7:
	movl	%eax, %ebx
	movl	(%r12), %edx
	movl	(%r14), %ecx
	leaq	L_.str.1(%rip), %rsi
	movq	%r15, %rdi
	callq	_mlx5_ib_warn
	jmp	LBB0_8
LBB0_6:
	xorl	%ebx, %ebx
LBB0_8:
	movl	%ebx, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_MLX5_IB_QP_UNDERLAY,4,2        ## @MLX5_IB_QP_UNDERLAY
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Attaching a multi cast group to underlay QP is not supported\n"

	.comm	_EOPNOTSUPP,4,2                 ## @EOPNOTSUPP
L_.str.1:                               ## @.str.1
	.asciz	"failed attaching QPN 0x%x, MGID %pI6\n"

	.no_dead_strip	_mlx5_ib_mcg_attach
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function mlx5_ib_mcg_attach
_mlx5_ib_mcg_attach:                    ; @mlx5_ib_mcg_attach
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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, x1
	mov	x21, x0
	ldr	w0, [x0, #16]
	bl	_to_mdev
	mov	x20, x0
	mov	x0, x21
	bl	_to_mqp
	mov	x22, x0
	ldr	x0, [x21, #8]
	cbz	x0, LBB0_2
; %bb.1:
	bl	_to_mpd
	ldr	w3, [x0]
	b	LBB0_3
LBB0_2:
	mov	w3, #0
LBB0_3:
	ldr	w8, [x22]
Lloh0:
	adrp	x9, _MLX5_IB_QP_UNDERLAY@GOTPAGE
Lloh1:
	ldr	x9, [x9, _MLX5_IB_QP_UNDERLAY@GOTPAGEOFF]
Lloh2:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_5
; %bb.4:
Lloh3:
	adrp	x1, l_.str@PAGE
Lloh4:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x20
	bl	_mlx5_ib_dbg
Lloh5:
	adrp	x8, _EOPNOTSUPP@GOTPAGE
Lloh6:
	ldr	x8, [x8, _EOPNOTSUPP@GOTPAGEOFF]
Lloh7:
	ldr	w8, [x8]
	neg	w22, w8
	b	LBB0_7
LBB0_5:
	ldr	w0, [x20]
	ldr	w2, [x21]
	mov	x1, x19
	bl	_mlx5_cmd_attach_mcg
	mov	x22, x0
	cbz	w0, LBB0_7
; %bb.6:
	ldr	w2, [x21]
	ldr	w3, [x19]
Lloh8:
	adrp	x1, l_.str.1@PAGE
Lloh9:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x20
	bl	_mlx5_ib_warn
LBB0_7:
	mov	x0, x22
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpAdd	Lloh8, Lloh9
	.cfi_endproc
                                        ; -- End function
	.comm	_MLX5_IB_QP_UNDERLAY,4,2        ; @MLX5_IB_QP_UNDERLAY
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Attaching a multi cast group to underlay QP is not supported\n"

	.comm	_EOPNOTSUPP,4,2                 ; @EOPNOTSUPP
l_.str.1:                               ; @.str.1
	.asciz	"failed attaching QPN 0x%x, MGID %pI6\n"

	.no_dead_strip	_mlx5_ib_mcg_attach
.subsections_via_symbols
