	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function mlx4_ib_mcg_attach
_mlx4_ib_mcg_attach:                    ## @mlx4_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	%r13
	pushq	%r12
	pushq	%rbx
	subq	$72, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %r15
	movq	%rdi, %r14
	movl	(%rdi), %edi
	callq	_to_mdev
	movq	%rax, %rbx
	movq	(%rax), %rax
	movq	%rax, -104(%rbp)                ## 8-byte Spill
	movq	%r14, %rdi
	callq	_to_mqp
	movq	%rax, %r13
	movq	_MLX4_PROT_IB_IPV6@GOTPCREL(%rip), %rax
	movl	(%rax), %r12d
	movq	(%rbx), %rdi
	movq	(%rdi), %rax
	movq	_MLX4_STEERING_MODE_DEVICE_MANAGED@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_1
## %bb.2:
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	$32, %edi
	callq	_kmalloc
	testq	%rax, %rax
	je	LBB0_15
## %bb.3:
	movq	%r14, -72(%rbp)                 ## 8-byte Spill
	movq	%rax, -56(%rbp)                 ## 8-byte Spill
	movq	%rbx, -80(%rbp)                 ## 8-byte Spill
	movq	(%rbx), %rdi
	jmp	LBB0_4
LBB0_1:
	movq	%rbx, -80(%rbp)                 ## 8-byte Spill
	movq	%r14, -72(%rbp)                 ## 8-byte Spill
	xorl	%eax, %eax
	movq	%rax, -56(%rbp)                 ## 8-byte Spill
LBB0_4:
	leaq	8(%r13), %r14
	movl	(%r15), %edx
	movl	(%r13), %ecx
	movq	_MLX4_IB_QP_BLOCK_MULTICAST_LOOPBACK@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	xorl	%r8d, %r8d
	andl	4(%r13), %eax
	setne	%r8b
	leaq	-88(%rbp), %rax
	movq	%rax, (%rsp)
	movq	%r14, %rsi
	movl	%r12d, %r9d
	callq	_mlx4_multicast_attach
	testl	%eax, %eax
	je	LBB0_6
## %bb.5:
	movl	%eax, %r15d
	leaq	L_.str(%rip), %rdi
	movl	%eax, %esi
	callq	_pr_err
	jmp	LBB0_13
LBB0_6:
	movq	%r13, %rcx
	movq	%r15, %r13
	movq	_MLX4_IB_QP_BLOCK_MULTICAST_LOOPBACK@GOTPCREL(%rip), %r15
	movq	%r14, -64(%rbp)                 ## 8-byte Spill
	movl	%r12d, -44(%rbp)                ## 4-byte Spill
	movq	$0, -96(%rbp)
	movq	-104(%rbp), %rdi                ## 8-byte Reload
	movq	%rcx, %rbx
	callq	_mlx4_is_bonded
	testq	%rax, %rax
	movq	-80(%rbp), %r14                 ## 8-byte Reload
	movq	%r13, %r12
	movq	%rbx, %r13
	je	LBB0_8
## %bb.7:
	movq	(%r14), %rdi
	xorl	%ecx, %ecx
	cmpl	$1, (%r13)
	movl	(%r12), %edx
	sete	%cl
	incl	%ecx
	movl	(%r15), %eax
	xorl	%r8d, %r8d
	andl	4(%r13), %eax
	setne	%r8b
	leaq	-96(%rbp), %rax
	movq	%rax, (%rsp)
	movq	-64(%rbp), %rsi                 ## 8-byte Reload
	movl	-44(%rbp), %r9d                 ## 4-byte Reload
	callq	_mlx4_multicast_attach
	movl	%eax, %r15d
	testl	%eax, %eax
	jne	LBB0_11
LBB0_8:
	movq	-72(%rbp), %rdi                 ## 8-byte Reload
	movq	%r12, %rsi
	callq	_add_gid_entry
	movl	%eax, %r15d
	testl	%eax, %eax
	je	LBB0_9
LBB0_11:
	movq	(%r14), %rdi
	movl	(%r12), %edx
	movq	-88(%rbp), %r8
	movq	%r14, %r13
	movq	-64(%rbp), %r14                 ## 8-byte Reload
	movq	%r14, %rsi
	movl	-44(%rbp), %ebx                 ## 4-byte Reload
	movl	%ebx, %ecx
	callq	_mlx4_multicast_detach
	movq	-96(%rbp), %r8
	testq	%r8, %r8
	je	LBB0_13
## %bb.12:
	movq	(%r13), %rdi
	movl	(%r12), %edx
	movq	%r14, %rsi
	movl	%ebx, %ecx
	callq	_mlx4_multicast_detach
LBB0_13:
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	callq	_kfree
	jmp	LBB0_14
LBB0_15:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	xorl	%r15d, %r15d
	subl	(%rax), %r15d
LBB0_14:
	movl	%r15d, %eax
	addq	$72, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_9:
	movq	%r12, %rax
	xorl	%r15d, %r15d
	movq	-56(%rbp), %r12                 ## 8-byte Reload
	testq	%r12, %r12
	je	LBB0_14
## %bb.10:
	movl	24(%r12), %edi
	movl	(%rax), %esi
	movl	$16, %edx
	callq	_memcpy
	movups	-96(%rbp), %xmm0
	movups	%xmm0, 8(%r12)
	leaq	12(%r13), %r14
	movq	%r14, %rdi
	callq	_mutex_lock
	addq	$16, %r13
	movq	%r12, %rdi
	movq	%r13, %rsi
	callq	_list_add
	movq	%r14, %rdi
	callq	_mutex_unlock
	jmp	LBB0_14
	.cfi_endproc
                                        ## -- End function
	.comm	_MLX4_PROT_IB_IPV6,4,2          ## @MLX4_PROT_IB_IPV6
	.comm	_MLX4_STEERING_MODE_DEVICE_MANAGED,8,3 ## @MLX4_STEERING_MODE_DEVICE_MANAGED
	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_MLX4_IB_QP_BLOCK_MULTICAST_LOOPBACK,4,2 ## @MLX4_IB_QP_BLOCK_MULTICAST_LOOPBACK
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"multicast attach op failed, err %d\n"

	.no_dead_strip	_mlx4_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 mlx4_ib_mcg_attach
_mlx4_ib_mcg_attach:                    ; @mlx4_ib_mcg_attach
	.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	x20, x1
	mov	x24, x0
	ldr	w0, [x0]
	bl	_to_mdev
	mov	x21, x0
	ldr	x26, [x0]
	mov	x0, x24
	bl	_to_mqp
	mov	x23, x0
Lloh0:
	adrp	x8, _MLX4_PROT_IB_IPV6@GOTPAGE
Lloh1:
	ldr	x8, [x8, _MLX4_PROT_IB_IPV6@GOTPAGEOFF]
Lloh2:
	ldr	w22, [x8]
	ldr	x0, [x21]
	ldr	x8, [x0]
Lloh3:
	adrp	x9, _MLX4_STEERING_MODE_DEVICE_MANAGED@GOTPAGE
Lloh4:
	ldr	x9, [x9, _MLX4_STEERING_MODE_DEVICE_MANAGED@GOTPAGEOFF]
Lloh5:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_3
; %bb.1:
Lloh6:
	adrp	x8, _GFP_KERNEL@GOTPAGE
Lloh7:
	ldr	x8, [x8, _GFP_KERNEL@GOTPAGEOFF]
Lloh8:
	ldr	w1, [x8]
	mov	w0, #32
	bl	_kmalloc
	cbz	x0, LBB0_12
; %bb.2:
	mov	x19, x0
	ldr	x0, [x21]
	b	LBB0_4
LBB0_3:
	mov	x19, #0
LBB0_4:
	add	x25, x23, #8
	ldr	w2, [x20]
Lloh9:
	adrp	x28, _MLX4_IB_QP_BLOCK_MULTICAST_LOOPBACK@GOTPAGE
Lloh10:
	ldr	x28, [x28, _MLX4_IB_QP_BLOCK_MULTICAST_LOOPBACK@GOTPAGEOFF]
	ldp	w3, w8, [x23]
	ldr	w9, [x28]
	tst	w9, w8
	cset	w4, ne
	mov	x8, sp
	add	x6, x8, #8
	mov	x1, x25
	mov	x5, x22
	bl	_mlx4_multicast_attach
	cbz	w0, LBB0_6
; %bb.5:
	mov	x27, x0
Lloh11:
	adrp	x0, l_.str@PAGE
Lloh12:
	add	x0, x0, l_.str@PAGEOFF
	mov	x1, x27
	bl	_pr_err
	b	LBB0_11
LBB0_6:
	str	xzr, [sp]
	mov	x0, x26
	bl	_mlx4_is_bonded
	cbz	x0, LBB0_8
; %bb.7:
	ldr	x0, [x21]
	ldr	w2, [x20]
	ldp	w8, w9, [x23]
	cmp	w8, #1
	mov	w8, #1
	cinc	w3, w8, eq
	ldr	w8, [x28]
	tst	w8, w9
	cset	w4, ne
	mov	x6, sp
	mov	x1, x25
	mov	x5, x22
	bl	_mlx4_multicast_attach
	mov	x27, x0
	cbnz	w0, LBB0_9
LBB0_8:
	mov	x0, x24
	mov	x1, x20
	bl	_add_gid_entry
	mov	x27, x0
	cbz	w0, LBB0_13
LBB0_9:
	ldr	x0, [x21]
	ldr	w2, [x20]
	ldr	x4, [sp, #8]
	mov	x1, x25
	mov	x3, x22
	bl	_mlx4_multicast_detach
	ldr	x4, [sp]
	cbz	x4, LBB0_11
; %bb.10:
	ldr	x0, [x21]
	ldr	w2, [x20]
	mov	x1, x25
	mov	x3, x22
	bl	_mlx4_multicast_detach
LBB0_11:
	mov	x0, x19
	bl	_kfree
	b	LBB0_16
LBB0_12:
Lloh13:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh14:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh15:
	ldr	w8, [x8]
	neg	w27, w8
	b	LBB0_16
LBB0_13:
	cbz	x19, LBB0_15
; %bb.14:
	ldr	w0, [x19, #24]
	ldr	w1, [x20]
	mov	w2, #16
	bl	_memcpy
	ldr	q0, [sp]
	stur	q0, [x19, #8]
	add	x20, x23, #12
	mov	x0, x20
	bl	_mutex_lock
	add	x1, x23, #16
	mov	x0, x19
	bl	_list_add
	mov	x0, x20
	bl	_mutex_unlock
LBB0_15:
	mov	w27, #0
LBB0_16:
	mov	x0, x27
	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
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpAdd	Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.cfi_endproc
                                        ; -- End function
	.comm	_MLX4_PROT_IB_IPV6,4,2          ; @MLX4_PROT_IB_IPV6
	.comm	_MLX4_STEERING_MODE_DEVICE_MANAGED,8,3 ; @MLX4_STEERING_MODE_DEVICE_MANAGED
	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_MLX4_IB_QP_BLOCK_MULTICAST_LOOPBACK,4,2 ; @MLX4_IB_QP_BLOCK_MULTICAST_LOOPBACK
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"multicast attach op failed, err %d\n"

	.no_dead_strip	_mlx4_ib_mcg_attach
.subsections_via_symbols
