	.file	"extr_qib_mad.c_qib_send_trap.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.type	qib_send_trap, @function
qib_send_trap:
.LFB0:
	.cfi_startproc
	endbr64
	push	r14
	.cfi_def_cfa_offset 16
	.cfi_offset 14, -16
	push	r13
	.cfi_def_cfa_offset 24
	.cfi_offset 13, -24
	push	r12
	.cfi_def_cfa_offset 32
	.cfi_offset 12, -32
	push	rbp
	.cfi_def_cfa_offset 40
	.cfi_offset 6, -40
	push	rbx
	.cfi_def_cfa_offset 48
	.cfi_offset 3, -48
	mov	rbp, QWORD PTR 48[rdi]
	test	rbp, rbp
	je	.L1
	mov	rbx, rdi
	mov	r12, rsi
	mov	r13d, edx
	call	ppd_from_ibp@PLT
	mov	eax, DWORD PTR [rax]
	test	DWORD PTR QIBL_LINKACTIVE[rip], eax
	je	.L1
	mov	rsi, QWORD PTR 16[rbx]
	test	rsi, rsi
	je	.L7
	mov	rdi, QWORD PTR jiffies[rip]
	call	time_before@PLT
	test	rax, rax
	jne	.L1
.L7:
	mov	eax, DWORD PTR GFP_ATOMIC[rip]
	sub	rsp, 8
	.cfi_def_cfa_offset 56
	xor	ecx, ecx
	xor	edx, edx
	mov	r9d, DWORD PTR IB_MGMT_MAD_DATA[rip]
	mov	r8d, DWORD PTR IB_MGMT_MAD_HDR[rip]
	mov	rdi, rbp
	xor	esi, esi
	push	rax
	.cfi_def_cfa_offset 64
	call	ib_create_send_mad@PLT
	mov	rdi, rax
	mov	rbp, rax
	call	IS_ERR@PLT
	pop	rdx
	.cfi_def_cfa_offset 56
	pop	rcx
	.cfi_def_cfa_offset 48
	test	rax, rax
	je	.L20
.L1:
	pop	rbx
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	pop	rbp
	.cfi_def_cfa_offset 32
	pop	r12
	.cfi_def_cfa_offset 24
	pop	r13
	.cfi_def_cfa_offset 16
	pop	r14
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L20:
	.cfi_restore_state
	mov	r14, QWORD PTR 8[rbp]
	mov	eax, DWORD PTR IB_MGMT_BASE_VERSION[rip]
	mov	DWORD PTR 24[r14], eax
	mov	eax, DWORD PTR IB_MGMT_CLASS_SUBN_LID_ROUTED[rip]
	mov	DWORD PTR [r14], 1
	mov	DWORD PTR 20[r14], eax
	mov	eax, DWORD PTR IB_MGMT_METHOD_TRAP[rip]
	mov	DWORD PTR 16[r14], eax
	mov	eax, DWORD PTR 40[rbx]
	lea	edi, 1[rax]
	mov	DWORD PTR 40[rbx], edi
	call	cpu_to_be64@PLT
	mov	edi, DWORD PTR 4[r14]
	mov	rsi, r12
	mov	edx, r13d
	mov	DWORD PTR 12[r14], eax
	mov	eax, DWORD PTR IB_SMP_ATTR_NOTICE[rip]
	lea	r12, 24[rbx]
	mov	DWORD PTR 8[r14], eax
	call	memcpy@PLT
	xor	esi, esi
	mov	rdi, r12
	call	spin_lock_irqsave@PLT
	mov	rax, QWORD PTR 32[rbx]
	test	rax, rax
	je	.L21
	mov	QWORD PTR 0[rbp], rax
	xor	esi, esi
	mov	rdi, r12
	call	spin_unlock_irqrestore@PLT
.L12:
	xor	esi, esi
	mov	rdi, rbp
	call	ib_post_send_mad@PLT
	test	eax, eax
	jne	.L13
	mov	rcx, QWORD PTR 8[rbx]
	mov	edx, 4096
	movabs	rdi, 2361183241434822607
	sal	rdx, cl
	shr	rdx, 3
	mov	rax, rdx
	mul	rdi
	shr	rdx, 4
	mov	rdi, rdx
	call	usecs_to_jiffies@PLT
	add	rax, QWORD PTR jiffies[rip]
	mov	QWORD PTR 16[rbx], rax
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L21:
	mov	edi, DWORD PTR IB_LID_PERMISSIVE[rip]
	mov	r13, QWORD PTR [rbx]
	call	be16_to_cpu@PLT
	cmp	r13, rax
	je	.L9
	mov	rsi, QWORD PTR [rbx]
	mov	rdi, rbx
	call	qib_create_qp0_ah@PLT
	mov	rdi, rax
	mov	r13, rax
	call	IS_ERR@PLT
	test	rax, rax
	je	.L10
	mov	rdi, r13
	call	PTR_ERR@PLT
	mov	r13d, eax
.L11:
	xor	esi, esi
	mov	rdi, r12
	call	spin_unlock_irqrestore@PLT
	test	r13d, r13d
	je	.L12
.L13:
	mov	rdi, rbp
	call	ib_free_send_mad@PLT
	mov	QWORD PTR 16[rbx], 0
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L9:
	mov	r13d, DWORD PTR EINVAL[rip]
	neg	r13d
	jmp	.L11
.L10:
	mov	QWORD PTR 0[rbp], r13
	mov	rdi, r13
	call	to_iah@PLT
	xor	esi, esi
	mov	rdi, r12
	mov	QWORD PTR 32[rbx], rax
	call	spin_unlock_irqrestore@PLT
	jmp	.L12
	.cfi_endproc
.LFE0:
	.size	qib_send_trap, .-qib_send_trap
	.comm	jiffies,8,8
	.comm	QIBL_LINKACTIVE,4,4
	.comm	IB_SMP_ATTR_NOTICE,4,4
	.comm	IB_MGMT_METHOD_TRAP,4,4
	.comm	IB_MGMT_MAD_HDR,4,4
	.comm	IB_MGMT_MAD_DATA,4,4
	.comm	IB_MGMT_CLASS_SUBN_LID_ROUTED,4,4
	.comm	IB_MGMT_BASE_VERSION,4,4
	.comm	IB_LID_PERMISSIVE,4,4
	.comm	GFP_ATOMIC,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_qib_mad.c_qib_send_trap.c"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	qib_send_trap, %function
qib_send_trap:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, lr}
	ldr	r5, [r0, #24]
	sub	sp, sp, #16
	cmp	r5, #0
	beq	.L1
	mov	r6, r2
	mov	r4, r0
	mov	r7, r1
	bl	ppd_from_ibp
	ldr	r3, .L22
	ldr	r2, [r0]
	ldr	r3, [r3]
	tst	r2, r3
	beq	.L1
	ldr	r1, [r4, #8]
	cmp	r1, #0
	beq	.L7
	ldr	r3, .L22+4
	ldr	r0, [r3]
	bl	time_before
	cmp	r0, #0
	bne	.L1
.L7:
	mov	r3, #0
	ldr	r0, .L22+8
	ldr	r1, .L22+12
	ldr	r2, .L22+16
	ldr	ip, [r0]
	ldr	r1, [r1]
	ldr	r2, [r2]
	mov	r0, r5
	stmib	sp, {r1, ip}
	str	r2, [sp]
	mov	r1, r3
	mov	r2, r3
	bl	ib_create_send_mad
	mov	r5, r0
	bl	IS_ERR
	cmp	r0, #0
	beq	.L20
.L1:
	add	sp, sp, #16
	@ sp needed
	pop	{r4, r5, r6, r7, r8, pc}
.L20:
	mov	r2, #1
	ldr	r1, .L22+20
	ldr	r3, .L22+24
	ldr	r8, [r5, #4]
	ldr	r0, [r1]
	ldr	r1, [r3]
	ldr	r3, .L22+28
	str	r0, [r8, #24]
	ldr	r0, [r4, #20]
	ldr	r3, [r3]
	add	r0, r0, r2
	str	r1, [r8, #20]
	str	r2, [r8]
	str	r3, [r8, #16]
	str	r0, [r4, #20]
	bl	cpu_to_be64
	ldr	r3, .L22+32
	mov	r2, r6
	ldr	r3, [r3]
	mov	r1, r7
	str	r3, [r8, #8]
	str	r0, [r8, #12]
	add	r6, r4, #12
	ldr	r0, [r8, #4]
	bl	memcpy
	mov	r0, r6
	mov	r1, #0
	bl	spin_lock_irqsave
	ldr	r3, [r4, #16]
	cmp	r3, #0
	beq	.L21
	mov	r0, r6
	mov	r1, #0
	str	r3, [r5]
	bl	spin_unlock_irqrestore
.L12:
	mov	r1, #0
	mov	r0, r5
	bl	ib_post_send_mad
	cmp	r0, #0
	bne	.L13
	mov	r0, #4096
	ldr	r2, [r4, #4]
	ldr	r3, .L22+36
	lsl	r0, r0, r2
	umull	r2, r0, r3, r0
	lsr	r0, r0, #6
	bl	usecs_to_jiffies
	ldr	r3, .L22+4
	ldr	r3, [r3]
	add	r3, r3, r0
	str	r3, [r4, #8]
	b	.L1
.L21:
	ldr	r3, .L22+40
	ldr	r7, [r4]
	ldr	r0, [r3]
	bl	be16_to_cpu
	cmp	r7, r0
	beq	.L9
	ldr	r1, [r4]
	mov	r0, r4
	bl	qib_create_qp0_ah
	mov	r7, r0
	bl	IS_ERR
	cmp	r0, #0
	beq	.L10
	mov	r0, r7
	bl	PTR_ERR
	mov	r7, r0
.L11:
	mov	r0, r6
	mov	r1, #0
	bl	spin_unlock_irqrestore
	cmp	r7, #0
	beq	.L12
.L13:
	mov	r0, r5
	bl	ib_free_send_mad
	mov	r3, #0
	str	r3, [r4, #8]
	b	.L1
.L9:
	ldr	r3, .L22+44
	ldr	r7, [r3]
	rsb	r7, r7, #0
	b	.L11
.L10:
	mov	r0, r7
	str	r7, [r5]
	bl	to_iah
	mov	r1, #0
	str	r0, [r4, #16]
	mov	r0, r6
	bl	spin_unlock_irqrestore
	b	.L12
.L23:
	.align	2
.L22:
	.word	QIBL_LINKACTIVE
	.word	jiffies
	.word	GFP_ATOMIC
	.word	IB_MGMT_MAD_DATA
	.word	IB_MGMT_MAD_HDR
	.word	IB_MGMT_BASE_VERSION
	.word	IB_MGMT_CLASS_SUBN_LID_ROUTED
	.word	IB_MGMT_METHOD_TRAP
	.word	IB_SMP_ATTR_NOTICE
	.word	274877907
	.word	IB_LID_PERMISSIVE
	.word	EINVAL
	.size	qib_send_trap, .-qib_send_trap
	.comm	jiffies,4,4
	.comm	QIBL_LINKACTIVE,4,4
	.comm	IB_SMP_ATTR_NOTICE,4,4
	.comm	IB_MGMT_METHOD_TRAP,4,4
	.comm	IB_MGMT_MAD_HDR,4,4
	.comm	IB_MGMT_MAD_DATA,4,4
	.comm	IB_MGMT_CLASS_SUBN_LID_ROUTED,4,4
	.comm	IB_MGMT_BASE_VERSION,4,4
	.comm	IB_LID_PERMISSIVE,4,4
	.comm	GFP_ATOMIC,4,4
	.comm	EINVAL,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
