	.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	$40, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %r12
	movq	%rdi, %r14
	movl	(%rdi), %edi
	callq	_to_mdev
	movq	%rax, %rbx
	movq	%r14, %rdi
	callq	_to_mqp
	movq	%rax, %r13
	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	$12, %edi
	callq	_kmalloc
	testq	%rax, %rax
	je	LBB0_11
## %bb.3:
	movq	%rax, -56(%rbp)                 ## 8-byte Spill
	movq	%rbx, -64(%rbp)                 ## 8-byte Spill
	movq	(%rbx), %rdi
	jmp	LBB0_4
LBB0_1:
	movq	%rbx, -64(%rbp)                 ## 8-byte Spill
	xorl	%eax, %eax
	movq	%rax, -56(%rbp)                 ## 8-byte Spill
LBB0_4:
	leaq	4(%r13), %rbx
	movl	(%r12), %edx
	movq	_MLX4_IB_QP_BLOCK_MULTICAST_LOOPBACK@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	xorl	%r8d, %r8d
	andl	(%r13), %eax
	movl	16(%r13), %ecx
	setne	%r8b
	movq	_MLX4_PROT_IB_IPV6@GOTPCREL(%rip), %rax
	movl	(%rax), %r9d
	leaq	-44(%rbp), %rax
	movq	%rax, (%rsp)
	movq	%rbx, %rsi
	callq	_mlx4_multicast_attach
	movl	%eax, %r15d
	testl	%eax, %eax
	jne	LBB0_9
## %bb.5:
	movq	%r14, %rdi
	movq	%r12, %rsi
	callq	_add_gid_entry
	testl	%eax, %eax
	je	LBB0_6
## %bb.8:
	movl	%eax, %r15d
	movq	-64(%rbp), %rax                 ## 8-byte Reload
	movq	(%rax), %rdi
	movl	(%r12), %edx
	movq	_MLX4_PROT_IB_IPV6@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movl	-44(%rbp), %r8d
	movq	%rbx, %rsi
	callq	_mlx4_multicast_detach
LBB0_9:
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	callq	_kfree
	jmp	LBB0_10
LBB0_11:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	xorl	%r15d, %r15d
	subl	(%rax), %r15d
	jmp	LBB0_10
LBB0_6:
	xorl	%r15d, %r15d
	movq	-56(%rbp), %rbx                 ## 8-byte Reload
	testq	%rbx, %rbx
	je	LBB0_10
## %bb.7:
	movl	8(%rbx), %edi
	movl	(%r12), %esi
	movl	$16, %edx
	callq	_memcpy
	movl	-44(%rbp), %eax
	movl	%eax, 4(%rbx)
	leaq	8(%r13), %r14
	movq	%r14, %rdi
	callq	_mutex_lock
	addq	$12, %r13
	movq	%rbx, %rdi
	movq	%r13, %rsi
	callq	_list_add
	movq	%r14, %rdi
	callq	_mutex_unlock
LBB0_10:
	movl	%r15d, %eax
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.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
	.comm	_MLX4_PROT_IB_IPV6,4,2          ## @MLX4_PROT_IB_IPV6
	.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, #96
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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
	mov	x19, x1
	mov	x23, x0
	ldr	w0, [x0]
	bl	_to_mdev
	mov	x22, x0
	mov	x0, x23
	bl	_to_mqp
	mov	x21, x0
	ldr	x0, [x22]
	ldr	x8, [x0]
Lloh0:
	adrp	x9, _MLX4_STEERING_MODE_DEVICE_MANAGED@GOTPAGE
Lloh1:
	ldr	x9, [x9, _MLX4_STEERING_MODE_DEVICE_MANAGED@GOTPAGEOFF]
Lloh2:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_3
; %bb.1:
Lloh3:
	adrp	x8, _GFP_KERNEL@GOTPAGE
Lloh4:
	ldr	x8, [x8, _GFP_KERNEL@GOTPAGEOFF]
Lloh5:
	ldr	w1, [x8]
	mov	w0, #12
	bl	_kmalloc
	cbz	x0, LBB0_8
; %bb.2:
	mov	x20, x0
	ldr	x0, [x22]
	b	LBB0_4
LBB0_3:
	mov	x20, #0
LBB0_4:
	add	x24, x21, #4
	ldr	w2, [x19]
	ldr	w3, [x21, #16]
	ldr	w8, [x21]
Lloh6:
	adrp	x9, _MLX4_IB_QP_BLOCK_MULTICAST_LOOPBACK@GOTPAGE
Lloh7:
	ldr	x9, [x9, _MLX4_IB_QP_BLOCK_MULTICAST_LOOPBACK@GOTPAGEOFF]
Lloh8:
	ldr	w9, [x9]
	tst	w9, w8
	cset	w4, ne
Lloh9:
	adrp	x26, _MLX4_PROT_IB_IPV6@GOTPAGE
Lloh10:
	ldr	x26, [x26, _MLX4_PROT_IB_IPV6@GOTPAGEOFF]
	ldr	w5, [x26]
	add	x6, sp, #12
	mov	x1, x24
	bl	_mlx4_multicast_attach
	mov	x25, x0
	cbnz	w0, LBB0_7
; %bb.5:
	mov	x0, x23
	mov	x1, x19
	bl	_add_gid_entry
	cbz	w0, LBB0_9
; %bb.6:
	mov	x25, x0
	ldr	x0, [x22]
	ldr	w2, [x19]
	ldr	w3, [x26]
	ldr	w4, [sp, #12]
	mov	x1, x24
	bl	_mlx4_multicast_detach
LBB0_7:
	mov	x0, x20
	bl	_kfree
	b	LBB0_12
LBB0_8:
Lloh11:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh12:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh13:
	ldr	w8, [x8]
	neg	w25, w8
	b	LBB0_12
LBB0_9:
	cbz	x20, LBB0_11
; %bb.10:
	ldr	w0, [x20, #8]
	ldr	w1, [x19]
	mov	w2, #16
	bl	_memcpy
	ldr	w8, [sp, #12]
	str	w8, [x20, #4]
	add	x19, x21, #8
	mov	x0, x19
	bl	_mutex_lock
	add	x1, x21, #12
	mov	x0, x20
	bl	_list_add
	mov	x0, x19
	bl	_mutex_unlock
LBB0_11:
	mov	w25, #0
LBB0_12:
	mov	x0, x25
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #96
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.cfi_endproc
                                        ; -- End function
	.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
	.comm	_MLX4_PROT_IB_IPV6,4,2          ; @MLX4_PROT_IB_IPV6
	.no_dead_strip	_mlx4_ib_mcg_attach
.subsections_via_symbols
