	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function hfi1_process_opa_mad
_hfi1_process_opa_mad:                  ## @hfi1_process_opa_mad
	.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	%r9, %r14
	movl	%esi, -52(%rbp)                 ## 4-byte Spill
	movq	32(%rbp), %rbx
	movq	%rcx, %r12
	movl	(%rcx), %eax
	addl	$-4, %eax
	movl	%eax, -44(%rbp)
	movq	%rdi, -64(%rbp)                 ## 8-byte Spill
	movl	%edx, -48(%rbp)                 ## 4-byte Spill
	movl	%edx, %esi
	callq	_to_iport
	movq	%rax, %r13
	movq	_LIM_MGMT_P_KEY@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r13, %rdi
	callq	_hfi1_lookup_pkey_idx
	movl	%eax, %r15d
	testl	%eax, %eax
	jns	LBB0_2
## %bb.1:
	movl	$1, %r15d
	movq	%r13, %rdi
	movl	$1, %esi
	callq	_hfi1_get_pkey
	leaq	L_.str(%rip), %rdi
	movl	%eax, %esi
	callq	_pr_warn
LBB0_2:
	movq	16(%rbp), %rdx
	movl	%r15d, %eax
	movq	%rax, (%rbx)
	movl	(%r14), %eax
	leal	-128(%rax), %ecx
	cmpl	$2, %ecx
	jae	LBB0_6
## %bb.3:
	movq	%r13, %rdi
	movq	%r14, %rsi
	movq	%r12, %rdx
	callq	_is_local_mad
	movl	%eax, %ebx
	testl	%eax, %eax
	je	LBB0_5
## %bb.4:
	movq	%r13, %rdi
	movq	%r12, %rsi
	callq	_opa_local_smp_check
	testl	%eax, %eax
	jne	LBB0_8
LBB0_5:
	movl	%ebx, (%rsp)
	leaq	-44(%rbp), %r9
	movq	-64(%rbp), %rdi                 ## 8-byte Reload
	movl	-52(%rbp), %esi                 ## 4-byte Reload
	movl	-48(%rbp), %edx                 ## 4-byte Reload
	movq	%r14, %rcx
	movq	16(%rbp), %r8
	callq	_process_subn_opa
	jmp	LBB0_11
LBB0_6:
	cmpl	$130, %eax
	jne	LBB0_9
## %bb.7:
	movq	%rdx, %rbx
	movq	%r13, %rdi
	movq	%r14, %rsi
	movq	%r12, %rdx
	callq	_hfi1_pkey_validation_pma
	testl	%eax, %eax
	je	LBB0_10
LBB0_8:
	movq	_IB_MAD_RESULT_FAILURE@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	jmp	LBB0_17
LBB0_9:
	movq	_IB_MAD_RESULT_SUCCESS@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	jmp	LBB0_12
LBB0_10:
	leaq	-44(%rbp), %r8
	movq	-64(%rbp), %rdi                 ## 8-byte Reload
	movl	-48(%rbp), %esi                 ## 4-byte Reload
	movq	%r14, %rdx
	movq	%rbx, %rcx
	callq	_process_perf_opa
LBB0_11:
	movl	%eax, %ebx
LBB0_12:
	movq	24(%rbp), %r14
	movq	_IB_MAD_RESULT_REPLY@GOTPCREL(%rip), %rax
	testl	%ebx, (%rax)
	je	LBB0_14
## %bb.13:
	movl	-44(%rbp), %edi
	movl	$8, %esi
	callq	_round_up
	jmp	LBB0_16
LBB0_14:
	movq	_IB_MAD_RESULT_SUCCESS@GOTPCREL(%rip), %rax
	testl	%ebx, (%rax)
	je	LBB0_17
## %bb.15:
	movslq	(%r12), %rax
	addq	$-4, %rax
LBB0_16:
	movq	%rax, (%r14)
LBB0_17:
	movl	%ebx, %eax
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_LIM_MGMT_P_KEY,4,2             ## @LIM_MGMT_P_KEY
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"failed to find limited mgmt pkey, defaulting 0x%x\n"

	.comm	_IB_MAD_RESULT_FAILURE,4,2      ## @IB_MAD_RESULT_FAILURE
	.comm	_IB_MAD_RESULT_SUCCESS,4,2      ## @IB_MAD_RESULT_SUCCESS
	.comm	_IB_MAD_RESULT_REPLY,4,2        ## @IB_MAD_RESULT_REPLY
	.no_dead_strip	_hfi1_process_opa_mad
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function hfi1_process_opa_mad
_hfi1_process_opa_mad:                  ; @hfi1_process_opa_mad
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	stp	x28, x27, [sp, #16]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #32]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #48]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #64]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #80]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #96]             ; 16-byte Folded Spill
	add	x29, sp, #96
	.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
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	mov	x19, x7
	mov	x21, x6
	mov	x22, x5
	mov	x20, x3
	mov	x23, x2
	mov	x25, x1
	mov	x24, x0
	ldr	x28, [x29, #16]
	ldr	w8, [x3]
	sub	w8, w8, #4
	str	w8, [sp, #12]
	mov	x1, x2
	bl	_to_iport
	mov	x26, x0
Lloh0:
	adrp	x8, _LIM_MGMT_P_KEY@GOTPAGE
Lloh1:
	ldr	x8, [x8, _LIM_MGMT_P_KEY@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	bl	_hfi1_lookup_pkey_idx
	mov	x27, x0
	tbz	w0, #31, LBB0_2
; %bb.1:
	mov	w27, #1
	mov	x0, x26
	mov	w1, #1
	bl	_hfi1_get_pkey
	mov	x1, x0
Lloh3:
	adrp	x0, l_.str@PAGE
Lloh4:
	add	x0, x0, l_.str@PAGEOFF
	bl	_pr_warn
LBB0_2:
	mov	w8, w27
	str	x8, [x28]
	ldr	w8, [x22]
	sub	w9, w8, #128
	cmp	w9, #2
	b.hs	LBB0_6
; %bb.3:
	mov	x0, x26
	mov	x1, x22
	mov	x2, x20
	bl	_is_local_mad
	mov	x27, x0
	cbz	w0, LBB0_5
; %bb.4:
	mov	x0, x26
	mov	x1, x20
	bl	_opa_local_smp_check
	cbnz	w0, LBB0_8
LBB0_5:
	add	x5, sp, #12
	mov	x0, x24
	mov	x1, x25
	mov	x2, x23
	mov	x3, x22
	mov	x4, x21
	mov	x6, x27
	bl	_process_subn_opa
	b	LBB0_11
LBB0_6:
	cmp	w8, #130
	b.ne	LBB0_9
; %bb.7:
	mov	x0, x26
	mov	x1, x22
	mov	x2, x20
	bl	_hfi1_pkey_validation_pma
	cbz	w0, LBB0_10
LBB0_8:
Lloh5:
	adrp	x8, _IB_MAD_RESULT_FAILURE@GOTPAGE
Lloh6:
	ldr	x8, [x8, _IB_MAD_RESULT_FAILURE@GOTPAGEOFF]
Lloh7:
	ldr	w21, [x8]
	b	LBB0_16
LBB0_9:
Lloh8:
	adrp	x8, _IB_MAD_RESULT_SUCCESS@GOTPAGE
Lloh9:
	ldr	x8, [x8, _IB_MAD_RESULT_SUCCESS@GOTPAGEOFF]
Lloh10:
	ldr	w21, [x8]
	b	LBB0_12
LBB0_10:
	add	x4, sp, #12
	mov	x0, x24
	mov	x1, x23
	mov	x2, x22
	mov	x3, x21
	bl	_process_perf_opa
LBB0_11:
	mov	x21, x0
LBB0_12:
Lloh11:
	adrp	x8, _IB_MAD_RESULT_REPLY@GOTPAGE
Lloh12:
	ldr	x8, [x8, _IB_MAD_RESULT_REPLY@GOTPAGEOFF]
Lloh13:
	ldr	w8, [x8]
	tst	w8, w21
	b.eq	LBB0_14
; %bb.13:
	ldr	w0, [sp, #12]
	mov	w1, #8
	bl	_round_up
	str	x0, [x19]
	b	LBB0_16
LBB0_14:
Lloh14:
	adrp	x8, _IB_MAD_RESULT_SUCCESS@GOTPAGE
Lloh15:
	ldr	x8, [x8, _IB_MAD_RESULT_SUCCESS@GOTPAGEOFF]
Lloh16:
	ldr	w8, [x8]
	tst	w8, w21
	b.eq	LBB0_16
; %bb.15:
	ldrsw	x8, [x20]
	sub	x8, x8, #4
	str	x8, [x19]
LBB0_16:
	mov	x0, x21
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #64]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #48]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #32]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #112
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.cfi_endproc
                                        ; -- End function
	.comm	_LIM_MGMT_P_KEY,4,2             ; @LIM_MGMT_P_KEY
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"failed to find limited mgmt pkey, defaulting 0x%x\n"

	.comm	_IB_MAD_RESULT_FAILURE,4,2      ; @IB_MAD_RESULT_FAILURE
	.comm	_IB_MAD_RESULT_SUCCESS,4,2      ; @IB_MAD_RESULT_SUCCESS
	.comm	_IB_MAD_RESULT_REPLY,4,2        ; @IB_MAD_RESULT_REPLY
	.no_dead_strip	_hfi1_process_opa_mad
.subsections_via_symbols
