	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function send_mad_to_slave
_send_mad_to_slave:                     ## @send_mad_to_slave
	.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	%r12
	pushq	%rbx
	subq	$64, %rsp
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	8(%rsi), %r12
	movq	16(%r12), %rcx
	movslq	(%rsi), %rax
	movq	-8(%rcx,%rax,8), %rcx
	cmpq	$0, 8(%rcx)
	je	LBB0_1
## %bb.3:
	movq	%rdx, %r15
	movq	%rsi, %rbx
	movl	%edi, %r14d
	movq	8(%r12), %rcx
	movl	-4(%rcx,%rax,4), %edi
	leaq	-40(%rbp), %rsi
	callq	_rdma_query_ah
	movl	(%rbx), %esi
	movq	_IB_DEFAULT_PKEY_FULL@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	leaq	-48(%rbp), %rcx
	movq	%r12, %rdi
	callq	_ib_find_cached_pkey
	testq	%rax, %rax
	je	LBB0_5
## %bb.4:
	movq	_EINVAL@GOTPCREL(%rip), %rcx
	jmp	LBB0_2
LBB0_1:
	movq	_EAGAIN@GOTPCREL(%rip), %rcx
LBB0_2:
	xorl	%eax, %eax
	subl	(%rcx), %eax
	jmp	LBB0_6
LBB0_5:
	xorps	%xmm0, %xmm0
	movups	%xmm0, -64(%rbp)
	movl	(%rbx), %eax
	movl	%eax, -80(%rbp)
	leaq	-40(%rbp), %rdi
	callq	_rdma_ah_get_dlid
	movl	%eax, -72(%rbp)
	movl	$1, -76(%rbp)
	movl	(%rbx), %edx
	movq	_IB_QPT_GSI@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movq	%r15, (%rsp)
	leaq	-80(%rbp), %r8
	movq	%r12, %rdi
	movl	%r14d, %esi
	xorl	%r9d, %r9d
	callq	_mlx4_ib_send_to_slave
LBB0_6:
	addq	$64, %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_EAGAIN,4,2                     ## @EAGAIN
	.comm	_IB_DEFAULT_PKEY_FULL,4,2       ## @IB_DEFAULT_PKEY_FULL
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_IB_QPT_GSI,4,2                 ## @IB_QPT_GSI
	.no_dead_strip	_send_mad_to_slave
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function send_mad_to_slave
_send_mad_to_slave:                     ; @send_mad_to_slave
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #96
	.cfi_def_cfa_offset 96
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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
	ldr	x21, [x1, #8]
	ldr	x9, [x21, #16]
	ldrsw	x8, [x1]
	sub	x8, x8, #1
	ldr	x9, [x9, x8, lsl #3]
	ldr	x9, [x9, #8]
	cbz	x9, LBB0_3
; %bb.1:
	mov	x19, x2
	mov	x22, x1
	mov	x20, x0
	ldr	x9, [x21, #8]
	ldr	w0, [x9, x8, lsl #2]
	mov	x1, sp
	bl	_rdma_query_ah
	ldr	w1, [x22]
Lloh0:
	adrp	x8, _IB_DEFAULT_PKEY_FULL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _IB_DEFAULT_PKEY_FULL@GOTPAGEOFF]
Lloh2:
	ldr	w2, [x8]
	add	x8, sp, #8
	add	x3, x8, #32
	mov	x0, x21
	bl	_ib_find_cached_pkey
	cbz	x0, LBB0_5
; %bb.2:
Lloh3:
	adrp	x8, _EINVAL@GOTPAGE
Lloh4:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
	b	LBB0_4
LBB0_3:
Lloh5:
	adrp	x8, _EAGAIN@GOTPAGE
Lloh6:
	ldr	x8, [x8, _EAGAIN@GOTPAGEOFF]
LBB0_4:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_6
LBB0_5:
	stp	xzr, xzr, [sp, #24]
	ldr	w8, [x22]
	str	w8, [sp, #8]
	mov	x0, sp
	bl	_rdma_ah_get_dlid
	mov	w8, #1
	stp	w8, w0, [sp, #12]
	ldr	w2, [x22]
Lloh7:
	adrp	x8, _IB_QPT_GSI@GOTPAGE
Lloh8:
	ldr	x8, [x8, _IB_QPT_GSI@GOTPAGEOFF]
Lloh9:
	ldr	w3, [x8]
	add	x4, sp, #8
	mov	x0, x21
	mov	x1, x20
	mov	x5, #0
	mov	x6, x19
	bl	_mlx4_ib_send_to_slave
LBB0_6:
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	add	sp, sp, #96
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.cfi_endproc
                                        ; -- End function
	.comm	_EAGAIN,4,2                     ; @EAGAIN
	.comm	_IB_DEFAULT_PKEY_FULL,4,2       ; @IB_DEFAULT_PKEY_FULL
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_IB_QPT_GSI,4,2                 ; @IB_QPT_GSI
	.no_dead_strip	_send_mad_to_slave
.subsections_via_symbols
