	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function send_mad_to_wire
_send_mad_to_wire:                      ## @send_mad_to_wire
	.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
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %r14
	movq	%rdi, %r12
	movq	8(%rdi), %rbx
	leaq	4(%rbx), %r13
	movq	%r13, %rdi
	callq	_spin_lock_irqsave
	movq	8(%rbx), %rax
	movslq	(%r12), %rcx
	movl	-4(%rax,%rcx,4), %edi
	testl	%edi, %edi
	je	LBB0_1
## %bb.2:
	leaq	-48(%rbp), %r15
	movq	%r15, %rsi
	callq	_mlx4_ib_query_ah
	movq	%r13, %rdi
	callq	_spin_unlock_irqrestore
	movl	(%rbx), %edi
	callq	_mlx4_master_func_num
	movl	(%r12), %edx
	movq	_IB_QPT_GSI@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	movq	_IB_QP1_QKEY@GOTPCREL(%rip), %rsi
	movl	(%rsi), %r10d
	subq	$8, %rsp
	movq	%rbx, %rdi
	movl	%eax, %esi
	xorl	%r8d, %r8d
	movl	$1, %r9d
	pushq	%r14
	pushq	$65535                          ## imm = 0xFFFF
	pushq	$0
	pushq	%r15
	pushq	%r10
	callq	_mlx4_ib_send_to_wire
	addq	$48, %rsp
	jmp	LBB0_3
LBB0_1:
	movq	%r13, %rdi
	callq	_spin_unlock_irqrestore
	movq	_EAGAIN@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
LBB0_3:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_EAGAIN,4,2                     ## @EAGAIN
	.comm	_IB_QPT_GSI,4,2                 ## @IB_QPT_GSI
	.comm	_IB_QP1_QKEY,4,2                ## @IB_QP1_QKEY
	.no_dead_strip	_send_mad_to_wire
.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_wire
_send_mad_to_wire:                      ; @send_mad_to_wire
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.cfi_def_cfa_offset 80
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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
	mov	x20, x1
	mov	x21, x0
	ldr	x19, [x0, #8]
	add	x22, x19, #4
	mov	x0, x22
	bl	_spin_lock_irqsave
	ldr	x8, [x19, #8]
	ldrsw	x9, [x21]
	add	x8, x8, x9, lsl #2
	ldur	w0, [x8, #-4]
	cbz	w0, LBB0_2
; %bb.1:
	add	x1, sp, #24
	bl	_mlx4_ib_query_ah
	mov	x0, x22
	bl	_spin_unlock_irqrestore
	ldr	w0, [x19]
	bl	_mlx4_master_func_num
	mov	x1, x0
	ldr	w2, [x21]
Lloh0:
	adrp	x8, _IB_QPT_GSI@GOTPAGE
Lloh1:
	ldr	x8, [x8, _IB_QPT_GSI@GOTPAGEOFF]
Lloh2:
	ldr	w3, [x8]
Lloh3:
	adrp	x8, _IB_QP1_QKEY@GOTPAGE
Lloh4:
	ldr	x8, [x8, _IB_QP1_QKEY@GOTPAGEOFF]
Lloh5:
	ldr	w6, [x8]
	str	x20, [sp, #16]
	mov	w8, #65535
	str	w8, [sp, #8]
	str	xzr, [sp]
	add	x7, sp, #24
	mov	x0, x19
	mov	w4, #0
	mov	w5, #1
	bl	_mlx4_ib_send_to_wire
	b	LBB0_3
LBB0_2:
	mov	x0, x22
	bl	_spin_unlock_irqrestore
Lloh6:
	adrp	x8, _EAGAIN@GOTPAGE
Lloh7:
	ldr	x8, [x8, _EAGAIN@GOTPAGEOFF]
Lloh8:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_3:
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #80
	ret
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.cfi_endproc
                                        ; -- End function
	.comm	_EAGAIN,4,2                     ; @EAGAIN
	.comm	_IB_QPT_GSI,4,2                 ; @IB_QPT_GSI
	.comm	_IB_QP1_QKEY,4,2                ; @IB_QP1_QKEY
	.no_dead_strip	_send_mad_to_wire
.subsections_via_symbols
