	.file	"extr_mad.c_ib_register_mad_snoop.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.globl	ib_register_mad_snoop
	.type	ib_register_mad_snoop, @function
ib_register_mad_snoop:
.LFB0:
	.cfi_startproc
	endbr64
	push	r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	mov	r15, rdi
	mov	edi, ecx
	push	r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	mov	r14d, esi
	push	r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	push	r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	mov	r12, r8
	push	rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	mov	ebp, edx
	push	rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	mov	ebx, ecx
	sub	rsp, 40
	.cfi_def_cfa_offset 96
	mov	rax, QWORD PTR 96[rsp]
	mov	QWORD PTR 8[rsp], r9
	mov	QWORD PTR 16[rsp], rax
	call	is_snooping_sends@PLT
	test	r12, r12
	jne	.L2
	test	rax, rax
	jne	.L22
.L2:
	mov	edi, ebx
	call	is_snooping_recvs@PLT
	test	rax, rax
	je	.L10
	cmp	QWORD PTR 8[rsp], 0
	je	.L22
.L10:
	mov	edi, ebp
	call	get_spl_qp_index@PLT
	movsx	rbp, eax
	cmp	ebp, -1
	je	.L22
	mov	rdi, r15
	mov	esi, r14d
	call	ib_get_mad_port@PLT
	mov	edi, DWORD PTR ENODEV[rip]
	test	rax, rax
	je	.L21
	mov	esi, DWORD PTR GFP_KERNEL[rip]
	mov	edi, 72
	mov	QWORD PTR 24[rsp], rax
	call	kzalloc@PLT
	mov	rdx, QWORD PTR 24[rsp]
	test	rax, rax
	mov	r13, rax
	je	.L24
	mov	rax, QWORD PTR [rdx]
	mov	rcx, QWORD PTR 8[rsp]
	sal	rbp, 2
	mov	QWORD PTR 40[r13], r15
	mov	QWORD PTR 24[r13], r12
	lea	rdi, 56[r13]
	add	rax, rbp
	mov	QWORD PTR 32[r13], rcx
	mov	rcx, QWORD PTR 16[rsp]
	mov	QWORD PTR 64[r13], rax
	mov	eax, DWORD PTR [rax]
	mov	QWORD PTR 16[r13], rcx
	mov	DWORD PTR 12[r13], eax
	mov	DWORD PTR 8[r13], r14d
	mov	DWORD PTR 0[r13], ebx
	mov	QWORD PTR 24[rsp], rdx
	call	init_completion@PLT
	mov	rdx, QWORD PTR 24[rsp]
	mov	rdi, rbp
	mov	rsi, r13
	add	rdi, QWORD PTR [rdx]
	call	register_snoop_agent@PLT
	mov	DWORD PTR 52[r13], eax
	test	eax, eax
	js	.L25
	lea	rdi, 48[r13]
	mov	esi, 1
	lea	r12, 8[r13]
	call	atomic_set@PLT
.L1:
	add	rsp, 40
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	mov	rax, r12
	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
.L22:
	.cfi_restore_state
	mov	edi, DWORD PTR EINVAL[rip]
.L21:
	add	rsp, 40
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	neg	edi
	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
	jmp	ERR_PTR@PLT
	.p2align 4,,10
	.p2align 3
.L25:
	.cfi_restore_state
	mov	edi, eax
	call	ERR_PTR@PLT
	mov	rdi, r13
	mov	r12, rax
	call	kfree@PLT
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L24:
	mov	edi, DWORD PTR ENOMEM[rip]
	jmp	.L21
	.cfi_endproc
.LFE0:
	.size	ib_register_mad_snoop, .-ib_register_mad_snoop
	.comm	GFP_KERNEL,4,4
	.comm	ENOMEM,4,4
	.comm	ENODEV,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_mad.c_ib_register_mad_snoop.c"
	.text
	.align	2
	.global	ib_register_mad_snoop
	.syntax unified
	.arm
	.fpu softvfp
	.type	ib_register_mad_snoop, %function
ib_register_mad_snoop:
	@ args = 12, pretend = 0, frame = 8
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, r9, r10, fp, lr}
	sub	sp, sp, #12
	mov	r6, r0
	add	r8, sp, #48
	mov	r0, r3
	ldm	r8, {r8, r9, r10}
	mov	r4, r3
	mov	r5, r1
	mov	r7, r2
	bl	is_snooping_sends
	subs	ip, r0, #0
	movne	ip, #1
	cmp	r8, #0
	movne	ip, #0
	cmp	ip, #0
	bne	.L11
	mov	r0, r4
	bl	is_snooping_recvs
	clz	r3, r9
	cmp	r0, #0
	lsr	r3, r3, #5
	moveq	r3, #0
	cmp	r3, #0
	bne	.L11
	mov	r0, r7
	bl	get_spl_qp_index
	cmn	r0, #1
	mov	fp, r0
	beq	.L11
	mov	r1, r5
	mov	r0, r6
	bl	ib_get_mad_port
	subs	r3, r0, #0
	str	r3, [sp, #4]
	ldreq	r3, .L15
	beq	.L10
	ldr	r2, .L15+4
	mov	r0, #44
	ldr	r1, [r2]
	bl	kzalloc
	subs	r7, r0, #0
	beq	.L13
	mov	r0, r7
	ldr	r3, [sp, #4]
	ldr	r2, [r3]
	str	r6, [r7, #24]
	ldr	r1, [r2, fp, lsl #2]
	add	r2, r2, fp, lsl #2
	str	r1, [r7, #8]
	str	r2, [r7, #40]
	str	r9, [r7, #20]
	str	r8, [r7, #16]
	str	r10, [r7, #12]
	str	r5, [r7, #4]
	str	r4, [r0], #36
	bl	init_completion
	ldr	r3, [sp, #4]
	mov	r1, r7
	ldr	r0, [r3]
	lsl	r3, fp, #2
	add	r0, r0, r3
	bl	register_snoop_agent
	cmp	r0, #0
	str	r0, [r7, #32]
	blt	.L14
	add	r0, r7, #28
	mov	r1, #1
	bl	atomic_set
	add	r7, r7, #4
.L1:
	mov	r0, r7
	add	sp, sp, #12
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, r10, fp, pc}
.L11:
	ldr	r3, .L15+8
.L10:
	ldr	r0, [r3]
	rsb	r0, r0, #0
	add	sp, sp, #12
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, r10, fp, lr}
	b	ERR_PTR
.L14:
	bl	ERR_PTR
	mov	r3, r0
	mov	r0, r7
	mov	r7, r3
	bl	kfree
	b	.L1
.L13:
	ldr	r3, .L15+12
	b	.L10
.L16:
	.align	2
.L15:
	.word	ENODEV
	.word	GFP_KERNEL
	.word	EINVAL
	.word	ENOMEM
	.size	ib_register_mad_snoop, .-ib_register_mad_snoop
	.comm	GFP_KERNEL,4,4
	.comm	ENOMEM,4,4
	.comm	ENODEV,4,4
	.comm	EINVAL,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
