	.file	"extr_mad.c_hfi1_process_opa_mad.c"
	.intel_syntax noprefix
	.text
	.section	.rodata.str1.8,"aMS",@progbits,1
	.align 8
.LC0:
	.string	"failed to find limited mgmt pkey, defaulting 0x%x\n"
	.text
	.p2align 4
	.type	hfi1_process_opa_mad, @function
hfi1_process_opa_mad:
.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
	mov	r13d, edx
	push	r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	mov	r12, r9
	push	rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	mov	rbp, rdi
	push	rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	mov	rbx, rcx
	sub	rsp, 56
	.cfi_def_cfa_offset 112
	mov	rax, QWORD PTR 112[rsp]
	mov	DWORD PTR 28[rsp], esi
	mov	esi, edx
	mov	r14, QWORD PTR 128[rsp]
	mov	QWORD PTR 16[rsp], rax
	mov	rax, QWORD PTR 120[rsp]
	mov	QWORD PTR 8[rsp], rax
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR 40[rsp], rax
	xor	eax, eax
	mov	eax, DWORD PTR [rcx]
	sub	eax, 4
	mov	DWORD PTR 36[rsp], eax
	call	to_iport@PLT
	mov	esi, DWORD PTR LIM_MGMT_P_KEY[rip]
	mov	rdi, rax
	mov	r15, rax
	call	hfi1_lookup_pkey_idx@PLT
	test	eax, eax
	js	.L2
	cdqe
.L3:
	mov	QWORD PTR [r14], rax
	mov	eax, DWORD PTR [r12]
	cmp	eax, 129
	jle	.L26
	cmp	eax, 130
	jne	.L6
	mov	rdx, rbx
	mov	rsi, r12
	mov	rdi, r15
	call	hfi1_pkey_validation_pma@PLT
	test	eax, eax
	je	.L11
.L24:
	mov	r12d, DWORD PTR IB_MAD_RESULT_FAILURE[rip]
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L26:
	cmp	eax, 127
	jg	.L27
.L6:
.L10:
	endbr64
	mov	r12d, DWORD PTR IB_MAD_RESULT_SUCCESS[rip]
	test	DWORD PTR IB_MAD_RESULT_REPLY[rip], r12d
	jne	.L28
.L12:
	test	DWORD PTR IB_MAD_RESULT_SUCCESS[rip], r12d
	je	.L1
	movsx	rax, DWORD PTR [rbx]
	mov	rbx, QWORD PTR 8[rsp]
	sub	rax, 4
	mov	QWORD PTR [rbx], rax
.L1:
	mov	rax, QWORD PTR 40[rsp]
	xor	rax, QWORD PTR fs:40
	jne	.L29
	add	rsp, 56
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	mov	eax, r12d
	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
.L28:
	.cfi_restore_state
	mov	edi, DWORD PTR 36[rsp]
	mov	esi, 8
	call	round_up@PLT
	mov	rcx, QWORD PTR 8[rsp]
	mov	QWORD PTR [rcx], rax
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L27:
	mov	rdx, rbx
	mov	rsi, r12
	mov	rdi, r15
	call	is_local_mad@PLT
	mov	r14d, eax
	test	eax, eax
	je	.L8
	mov	rsi, rbx
	mov	rdi, r15
	call	opa_local_smp_check@PLT
	test	eax, eax
	jne	.L24
.L8:
	sub	rsp, 8
	.cfi_def_cfa_offset 120
	mov	rcx, r12
	mov	edx, r13d
	mov	rdi, rbp
	push	r14
	.cfi_def_cfa_offset 128
	mov	r8, QWORD PTR 32[rsp]
	mov	esi, DWORD PTR 44[rsp]
	lea	r9, 52[rsp]
	call	process_subn_opa@PLT
	mov	r12d, eax
	pop	rax
	.cfi_def_cfa_offset 120
	pop	rdx
	.cfi_def_cfa_offset 112
	test	DWORD PTR IB_MAD_RESULT_REPLY[rip], r12d
	je	.L12
	jmp	.L28
	.p2align 4,,10
	.p2align 3
.L2:
	mov	esi, 1
	mov	rdi, r15
	call	hfi1_get_pkey@PLT
	lea	rdi, .LC0[rip]
	mov	esi, eax
	call	pr_warn@PLT
	mov	eax, 1
	jmp	.L3
	.p2align 4,,10
	.p2align 3
.L11:
	mov	rcx, QWORD PTR 16[rsp]
	mov	rdx, r12
	lea	r8, 36[rsp]
	mov	esi, r13d
	mov	rdi, rbp
	call	process_perf_opa@PLT
	mov	r12d, eax
	test	DWORD PTR IB_MAD_RESULT_REPLY[rip], r12d
	je	.L12
	jmp	.L28
.L29:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE0:
	.size	hfi1_process_opa_mad, .-hfi1_process_opa_mad
	.comm	LIM_MGMT_P_KEY,4,4
	.comm	IB_MAD_RESULT_SUCCESS,4,4
	.comm	IB_MAD_RESULT_REPLY,4,4
	.comm	IB_MAD_RESULT_FAILURE,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_hfi1_process_opa_mad.c"
	.text
	.section	.rodata.str1.4,"aMS",%progbits,1
	.align	2
.LC0:
	.ascii	"failed to find limited mgmt pkey, defaulting 0x%x\012"
	.ascii	"\000"
	.section	.rodata.cst4,"aM",%progbits,4
	.align	2
.LC1:
	.word	__stack_chk_guard
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	hfi1_process_opa_mad, %function
hfi1_process_opa_mad:
	@ args = 20, pretend = 0, frame = 16
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, r9, r10, fp, lr}
	mov	r4, r3
	ldr	r3, [r3]
	mov	r5, r2
	mov	r8, r1
	mov	r1, r2
	ldr	r2, .L30
	sub	sp, sp, #36
	sub	r3, r3, #4
	ldr	r2, [r2]
	str	r2, [sp, #28]
	mov	r2,#0
	str	r3, [sp, #24]
	ldr	r3, [sp, #80]
	mov	r7, r0
	str	r3, [sp, #20]
	ldr	r9, [sp, #76]
	ldr	fp, [sp, #84]
	ldr	r10, [sp, #88]
	bl	to_iport
	ldr	r3, .L30+4
	mov	r6, r0
	ldr	r1, [r3]
	bl	hfi1_lookup_pkey_idx
	cmp	r0, #0
	blt	.L25
.L2:
	ldr	r3, [r9]
	str	r0, [r10]
	cmp	r3, #129
	ble	.L26
	cmp	r3, #130
	bne	.L5
	mov	r0, r6
	mov	r2, r4
	mov	r1, r9
	bl	hfi1_pkey_validation_pma
	cmp	r0, #0
	beq	.L10
.L23:
	ldr	r3, .L30+8
	ldr	r5, [r3]
	b	.L1
.L26:
	cmp	r3, #127
	bgt	.L27
.L5:
.L9:
	ldr	r3, .L30+12
	ldr	r5, [r3]
	ldr	r3, .L30+16
	ldr	r3, [r3]
	tst	r5, r3
	bne	.L28
.L11:
	ldr	r3, .L30+12
	ldr	r3, [r3]
	tst	r5, r3
	ldrne	r3, [r4]
	subne	r3, r3, #4
	strne	r3, [fp]
.L1:
	ldr	r3, .L30
	ldr	r2, [r3]
	ldr	r3, [sp, #28]
	eors	r2, r3, r2
	mov	r3, #0
	bne	.L29
	mov	r0, r5
	add	sp, sp, #36
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, r10, fp, pc}
.L28:
	mov	r1, #8
	ldr	r0, [sp, #24]
	bl	round_up
	str	r0, [fp]
	b	.L1
.L27:
	mov	r2, r4
	mov	r1, r9
	mov	r0, r6
	bl	is_local_mad
	subs	r10, r0, #0
	beq	.L7
	mov	r0, r6
	mov	r1, r4
	bl	opa_local_smp_check
	cmp	r0, #0
	bne	.L23
.L7:
	ldr	r3, [sp, #20]
	add	ip, sp, #24
	mov	r2, r5
	str	r3, [sp]
	mov	r1, r8
	mov	r3, r9
	mov	r0, r7
	str	r10, [sp, #8]
	str	ip, [sp, #4]
	bl	process_subn_opa
	mov	r5, r0
	ldr	r3, .L30+16
	ldr	r3, [r3]
	tst	r5, r3
	beq	.L11
	b	.L28
.L25:
	mov	r1, #1
	mov	r0, r6
	bl	hfi1_get_pkey
	mov	r1, r0
	ldr	r0, .L30+20
	bl	pr_warn
	mov	r0, #1
	b	.L2
.L10:
	add	ip, sp, #24
	mov	r1, r5
	ldr	r3, [sp, #20]
	mov	r2, r9
	mov	r0, r7
	str	ip, [sp]
	bl	process_perf_opa
	mov	r5, r0
	ldr	r3, .L30+16
	ldr	r3, [r3]
	tst	r5, r3
	beq	.L11
	b	.L28
.L29:
	bl	__stack_chk_fail
.L31:
	.align	2
.L30:
	.word	.LC1
	.word	LIM_MGMT_P_KEY
	.word	IB_MAD_RESULT_FAILURE
	.word	IB_MAD_RESULT_SUCCESS
	.word	IB_MAD_RESULT_REPLY
	.word	.LC0
	.size	hfi1_process_opa_mad, .-hfi1_process_opa_mad
	.comm	LIM_MGMT_P_KEY,4,4
	.comm	IB_MAD_RESULT_SUCCESS,4,4
	.comm	IB_MAD_RESULT_REPLY,4,4
	.comm	IB_MAD_RESULT_FAILURE,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
