	.file	"extr_mthca_mcg.c_mthca_multicast_detach.c"
	.intel_syntax noprefix
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"QP %06x not found in MGM\n"
.LC1:
	.string	"MGID %pI6 not found\n"
.LC2:
	.string	"WRITE_MGM returned %d\n"
.LC3:
	.string	"READ_MGM returned %d\n"
	.text
	.p2align 4
	.globl	mthca_multicast_detach
	.type	mthca_multicast_detach, @function
mthca_multicast_detach:
.LFB0:
	.cfi_startproc
	endbr64
	push	r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	push	r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	push	r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	push	r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	mov	r12, rdi
	push	rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	push	rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	mov	rbx, rsi
	sub	rsp, 56
	.cfi_def_cfa_offset 112
	mov	edi, DWORD PTR 4[rdi]
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR 40[rsp], rax
	xor	eax, eax
	call	to_mdev@PLT
	mov	esi, DWORD PTR GFP_KERNEL[rip]
	mov	rdi, rax
	mov	r13, rax
	call	mthca_alloc_mailbox@PLT
	mov	rdi, rax
	mov	QWORD PTR 8[rsp], rax
	call	IS_ERR@PLT
	test	rax, rax
	jne	.L38
	mov	r15, QWORD PTR 8[rsp]
	mov	rdi, r13
	mov	rbp, QWORD PTR [r15]
	call	mutex_lock@PLT
	mov	esi, DWORD PTR [rbx]
	lea	rcx, 28[rsp]
	mov	rdx, r15
	lea	r9, 36[rsp]
	lea	r8, 32[rsp]
	mov	rdi, r13
	call	find_mgm@PLT
	mov	r14d, eax
	test	eax, eax
	jne	.L4
	cmp	DWORD PTR 36[rsp], -1
	je	.L5
	mov	eax, DWORD PTR MTHCA_QP_PER_MGM[rip]
	mov	DWORD PTR 4[rsp], -1
	xor	ebx, ebx
	test	eax, eax
	jg	.L6
	jmp	.L9
	.p2align 4,,10
	.p2align 3
.L39:
	add	r15d, 1
	add	rbx, 1
	cmp	DWORD PTR MTHCA_QP_PER_MGM[rip], ebx
	jle	.L8
.L6:
	mov	rax, QWORD PTR 0[rbp]
	mov	edi, DWORD PTR [r12]
	mov	r15d, ebx
	mov	r14d, DWORD PTR [rax+rbx*4]
	or	edi, -2147483648
	call	cpu_to_be32@PLT
	mov	edi, -2147483648
	cmp	r14d, eax
	mov	eax, DWORD PTR 4[rsp]
	cmove	eax, ebx
	mov	DWORD PTR 4[rsp], eax
	mov	rax, QWORD PTR 0[rbp]
	mov	r14d, DWORD PTR [rax+rbx*4]
	call	cpu_to_be32@PLT
	test	r14d, eax
	jne	.L39
.L8:
	mov	ecx, DWORD PTR 4[rsp]
	cmp	ecx, -1
	je	.L9
	mov	rdx, QWORD PTR 0[rbp]
	movsx	rax, r15d
	movsx	rbx, ecx
	mov	rdi, r13
	lea	rax, -4[rdx+rax*4]
	mov	esi, DWORD PTR [rax]
	mov	DWORD PTR [rdx+rbx*4], esi
	mov	rdx, QWORD PTR 8[rsp]
	mov	DWORD PTR [rax], 0
	mov	esi, DWORD PTR 36[rsp]
	call	mthca_WRITE_MGM@PLT
	mov	r14d, eax
	test	eax, eax
	jne	.L36
	cmp	r15d, 1
	je	.L40
	.p2align 4,,10
	.p2align 3
.L4:
	mov	rdi, r13
	call	mutex_unlock@PLT
	mov	rsi, QWORD PTR 8[rsp]
	mov	rdi, r13
	call	mthca_free_mailbox@PLT
.L1:
	mov	rax, QWORD PTR 40[rsp]
	xor	rax, QWORD PTR fs:40
	jne	.L41
	add	rsp, 56
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	mov	eax, r14d
	pop	rbx
	.cfi_def_cfa_offset 48
	pop	rbp
	.cfi_def_cfa_offset 40
	pop	r12
	.cfi_def_cfa_offset 32
	pop	r13
	.cfi_def_cfa_offset 24
	pop	r14
	.cfi_def_cfa_offset 16
	pop	r15
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L38:
	.cfi_restore_state
	mov	rdi, QWORD PTR 8[rsp]
	call	PTR_ERR@PLT
	mov	r14d, eax
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L40:
	cmp	DWORD PTR 32[rsp], -1
	mov	edi, DWORD PTR 8[rbp]
	je	.L42
	call	be32_to_cpu@PLT
	mov	rdx, QWORD PTR 8[rsp]
	mov	esi, DWORD PTR 32[rsp]
	mov	rdi, r13
	mov	ebx, eax
	call	mthca_READ_MGM@PLT
	mov	r14d, eax
	test	eax, eax
	jne	.L35
	and	ebx, -64
	mov	edi, ebx
	call	cpu_to_be32@PLT
	mov	rdx, QWORD PTR 8[rsp]
	mov	esi, DWORD PTR 32[rsp]
	mov	rdi, r13
	mov	DWORD PTR 8[rbp], eax
	call	mthca_WRITE_MGM@PLT
	mov	r14d, eax
	test	eax, eax
	jne	.L36
	mov	eax, DWORD PTR 36[rsp]
	xor	edi, edi
	cmp	DWORD PTR 8[r13], eax
	setg	dil
	call	BUG_ON@PLT
	mov	esi, DWORD PTR 36[rsp]
	lea	rdi, 4[r13]
	call	mthca_free@PLT
	jmp	.L4
.L13:
	mov	edi, DWORD PTR 12[rbp]
	xor	esi, esi
	mov	edx, 16
	call	memset@PLT
	mov	rdx, QWORD PTR 8[rsp]
	mov	esi, DWORD PTR 36[rsp]
	mov	rdi, r13
	call	mthca_WRITE_MGM@PLT
	test	eax, eax
	je	.L4
	mov	r14d, eax
	.p2align 4,,10
	.p2align 3
.L36:
	mov	edx, r14d
	lea	rsi, .LC2[rip]
	mov	rdi, r13
	call	mthca_err@PLT
	jmp	.L4
	.p2align 4,,10
	.p2align 3
.L9:
	mov	edx, DWORD PTR [r12]
	lea	rsi, .LC0[rip]
	mov	rdi, r13
	call	mthca_err@PLT
	mov	r14d, DWORD PTR EINVAL[rip]
	neg	r14d
	jmp	.L4
	.p2align 4,,10
	.p2align 3
.L5:
	mov	edx, DWORD PTR [rbx]
	lea	rsi, .LC1[rip]
	mov	rdi, r13
	call	mthca_err@PLT
	mov	r14d, DWORD PTR EINVAL[rip]
	neg	r14d
	jmp	.L4
	.p2align 4,,10
	.p2align 3
.L42:
	call	be32_to_cpu@PLT
	sar	eax, 6
	mov	r12d, eax
	je	.L13
	mov	rdx, QWORD PTR 8[rsp]
	mov	esi, eax
	mov	rdi, r13
	call	mthca_READ_MGM@PLT
	mov	r14d, eax
	test	eax, eax
	jne	.L35
	mov	rdx, QWORD PTR 8[rsp]
	mov	esi, DWORD PTR 36[rsp]
	mov	rdi, r13
	call	mthca_WRITE_MGM@PLT
	mov	r14d, eax
	test	eax, eax
	jne	.L36
	xor	edi, edi
	cmp	DWORD PTR 8[r13], r12d
	setg	dil
	call	BUG_ON@PLT
	lea	rdi, 4[r13]
	mov	esi, r12d
	call	mthca_free@PLT
	jmp	.L4
.L35:
	mov	edx, r14d
	lea	rsi, .LC3[rip]
	mov	rdi, r13
	call	mthca_err@PLT
	jmp	.L4
.L41:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE0:
	.size	mthca_multicast_detach, .-mthca_multicast_detach
	.comm	MTHCA_QP_PER_MGM,4,4
	.comm	GFP_KERNEL,4,4
	.comm	EINVAL,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",@progbits
	.section	.note.gnu.property,"a"
	.align 8
	.long	 1f - 0f
	.long	 4f - 1f
	.long	 5
0:
	.string	 "GNU"
1:
	.align 8
	.long	 0xc0000002
	.long	 3f - 2f
2:
	.long	 0x3
3:
	.align 8
4:

	.arch armv5t
	.eabi_attribute 20, 1
	.eabi_attribute 21, 1
	.eabi_attribute 23, 3
	.eabi_attribute 24, 1
	.eabi_attribute 25, 1
	.eabi_attribute 26, 2
	.eabi_attribute 30, 2
	.eabi_attribute 34, 0
	.eabi_attribute 18, 4
	.file	"extr_mthca_mcg.c_mthca_multicast_detach.c"
	.text
	.section	.rodata.str1.4,"aMS",%progbits,1
	.align	2
.LC0:
	.ascii	"QP %06x not found in MGM\012\000"
	.align	2
.LC1:
	.ascii	"MGID %pI6 not found\012\000"
	.align	2
.LC2:
	.ascii	"WRITE_MGM returned %d\012\000"
	.align	2
.LC3:
	.ascii	"READ_MGM returned %d\012\000"
	.section	.rodata.cst4,"aM",%progbits,4
	.align	2
.LC4:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	mthca_multicast_detach
	.syntax unified
	.arm
	.fpu softvfp
	.type	mthca_multicast_detach, %function
mthca_multicast_detach:
	@ args = 0, pretend = 0, frame = 16
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, r9, r10, fp, lr}
	ldr	r3, .L43
	sub	sp, sp, #28
	mov	r7, r0
	ldr	r0, [r0, #4]
	mov	r6, r1
	ldr	r3, [r3]
	str	r3, [sp, #20]
	mov	r3,#0
	bl	to_mdev
	ldr	r3, .L43+4
	mov	r9, r0
	ldr	r1, [r3]
	bl	mthca_alloc_mailbox
	mov	r10, r0
	bl	IS_ERR
	cmp	r0, #0
	bne	.L38
	mov	r0, r9
	ldr	r5, [r10]
	bl	mutex_lock
	add	r2, sp, #16
	add	r3, sp, #12
	str	r2, [sp, #4]
	str	r3, [sp]
	mov	r2, r10
	mov	r0, r9
	ldr	r1, [r6]
	add	r3, sp, #8
	bl	find_mgm
	subs	r4, r0, #0
	bne	.L4
	ldr	r3, [sp, #16]
	cmn	r3, #1
	beq	.L5
	ldr	fp, .L43+8
	ldr	r3, [fp]
	cmp	r3, #0
	mvngt	r6, #0
	bgt	.L6
	b	.L9
.L39:
	ldr	r3, [fp]
	add	r4, r4, #1
	cmp	r3, r4
	ble	.L8
.L6:
	ldr	r0, [r7]
	ldr	r3, [r5]
	orr	r0, r0, #-2147483648
	ldr	r8, [r3, r4, lsl #2]
	bl	cpu_to_be32
	mov	r2, r0
	ldr	r3, [r5]
	cmp	r8, r2
	mov	r0, #-2147483648
	moveq	r6, r4
	ldr	r8, [r3, r4, lsl #2]
	bl	cpu_to_be32
	tst	r8, r0
	bne	.L39
.L8:
	cmn	r6, #1
	beq	.L9
	mov	r1, #0
	ldr	r3, [r5]
	sub	r2, r4, #-1073741823
	ldr	r0, [r3, r2, lsl #2]
	str	r0, [r3, r6, lsl #2]
	str	r1, [r3, r2, lsl #2]
	mov	r0, r9
	mov	r2, r10
	ldr	r1, [sp, #16]
	bl	mthca_WRITE_MGM
	subs	r2, r0, #0
	bne	.L40
	cmp	r4, #1
	bne	.L15
	ldr	r3, [sp, #12]
	ldr	r0, [r5, #4]
	cmn	r3, #1
	beq	.L41
	bl	be32_to_cpu
	mov	r2, r10
	mov	r6, r0
	ldr	r1, [sp, #12]
	mov	r0, r9
	bl	mthca_READ_MGM
	subs	r4, r0, #0
	bne	.L35
	bic	r0, r6, #63
	bl	cpu_to_be32
	mov	r2, r10
	str	r0, [r5, #4]
	ldr	r1, [sp, #12]
	mov	r0, r9
	bl	mthca_WRITE_MGM
	subs	r4, r0, #0
	bne	.L36
	ldr	r0, [r9, #8]
	ldr	r3, [sp, #16]
	cmp	r0, r3
	movle	r0, #0
	movgt	r0, #1
	bl	BUG_ON
	ldr	r1, [sp, #16]
	add	r0, r9, #4
	bl	mthca_free
.L4:
	mov	r0, r9
	bl	mutex_unlock
	mov	r1, r10
	mov	r0, r9
	bl	mthca_free_mailbox
.L1:
	ldr	r3, .L43
	ldr	r2, [r3]
	ldr	r3, [sp, #20]
	eors	r2, r3, r2
	mov	r3, #0
	bne	.L42
	mov	r0, r4
	add	sp, sp, #28
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, r10, fp, pc}
.L38:
	mov	r0, r10
	bl	PTR_ERR
	mov	r4, r0
	b	.L1
.L13:
	mov	r1, r6
	mov	r2, #16
	ldr	r0, [r5, #8]
	bl	memset
	mov	r2, r10
	mov	r0, r9
	ldr	r1, [sp, #16]
	bl	mthca_WRITE_MGM
	subs	r4, r0, #0
	bne	.L36
.L15:
	mov	r4, #0
	b	.L4
.L9:
	ldr	r2, [r7]
	ldr	r1, .L43+12
.L34:
	mov	r0, r9
	bl	mthca_err
	ldr	r3, .L43+16
	ldr	r4, [r3]
	rsb	r4, r4, #0
	b	.L4
.L40:
	mov	r0, r9
	ldr	r1, .L43+20
	mov	r4, r2
	bl	mthca_err
	b	.L4
.L5:
	ldr	r2, [r6]
	ldr	r1, .L43+24
	b	.L34
.L36:
	mov	r2, r4
	mov	r0, r9
	ldr	r1, .L43+20
	bl	mthca_err
	b	.L4
.L41:
	bl	be32_to_cpu
	asrs	r6, r0, #6
	beq	.L13
	mov	r2, r10
	mov	r1, r6
	mov	r0, r9
	bl	mthca_READ_MGM
	subs	r4, r0, #0
	bne	.L35
	mov	r2, r10
	mov	r0, r9
	ldr	r1, [sp, #16]
	bl	mthca_WRITE_MGM
	subs	r4, r0, #0
	bne	.L36
	ldr	r0, [r9, #8]
	cmp	r0, r6
	movle	r0, #0
	movgt	r0, #1
	bl	BUG_ON
	mov	r1, r6
	add	r0, r9, #4
	bl	mthca_free
	b	.L4
.L35:
	mov	r2, r4
	mov	r0, r9
	ldr	r1, .L43+28
	bl	mthca_err
	b	.L4
.L42:
	bl	__stack_chk_fail
.L44:
	.align	2
.L43:
	.word	.LC4
	.word	GFP_KERNEL
	.word	MTHCA_QP_PER_MGM
	.word	.LC0
	.word	EINVAL
	.word	.LC2
	.word	.LC1
	.word	.LC3
	.size	mthca_multicast_detach, .-mthca_multicast_detach
	.comm	MTHCA_QP_PER_MGM,4,4
	.comm	GFP_KERNEL,4,4
	.comm	EINVAL,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
