	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function send_mad
_send_mad:                              ## @send_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
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%edx, %r14d
	movq	%rsi, %r12
	movq	%rdi, %r15
	movq	_queries@GOTPCREL(%rip), %r13
	movq	%r13, %rdi
	callq	_xa_lock_irqsave
	movq	_xa_limit_32b@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	leaq	-44(%rbp), %rsi
	movq	%r13, %rdi
	movq	%r15, %rdx
	movl	%r14d, %r8d
	callq	___xa_alloc
	movl	%eax, %ebx
	movq	%r13, %rdi
	callq	_xa_unlock_irqrestore
	testl	%ebx, %ebx
	js	LBB0_10
## %bb.1:
	movq	8(%r15), %rax
	movq	%r12, (%rax)
	movq	8(%rax), %rax
	movq	%r15, (%rax)
	movl	-44(%rbp), %eax
	movl	%eax, (%r15)
	movl	4(%r15), %eax
	movq	_IB_SA_ENABLE_LOCAL_SERVICE@GOTPCREL(%rip), %rcx
	testl	%eax, (%rcx)
	je	LBB0_6
## %bb.2:
	movq	_IB_SA_QUERY_OPA@GOTPCREL(%rip), %rcx
	testl	%eax, (%rcx)
	jne	LBB0_6
## %bb.3:
	movq	_RDMA_NL_GROUP_LS@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_rdma_nl_chk_listeners
	testq	%rax, %rax
	je	LBB0_5
## %bb.4:
	movq	%r15, %rdi
	movl	%r14d, %esi
	callq	_ib_nl_make_request
	testl	%eax, %eax
	je	LBB0_9
LBB0_5:
	movq	%r15, %rdi
	callq	_ib_sa_disable_local_svc
LBB0_6:
	movq	8(%r15), %rdi
	xorl	%esi, %esi
	callq	_ib_post_send_mad
	movl	%eax, %ebx
	testl	%eax, %eax
	je	LBB0_8
## %bb.7:
	movq	_queries@GOTPCREL(%rip), %r14
	movq	%r14, %rdi
	callq	_xa_lock_irqsave
	movl	-44(%rbp), %esi
	movq	%r14, %rdi
	callq	___xa_erase
	movq	%r14, %rdi
	callq	_xa_unlock_irqrestore
LBB0_8:
	testl	%ebx, %ebx
	jne	LBB0_10
LBB0_9:
	movl	-44(%rbp), %ebx
LBB0_10:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_queries,4,2                    ## @queries
	.comm	_xa_limit_32b,4,2               ## @xa_limit_32b
	.comm	_IB_SA_ENABLE_LOCAL_SERVICE,4,2 ## @IB_SA_ENABLE_LOCAL_SERVICE
	.comm	_IB_SA_QUERY_OPA,4,2            ## @IB_SA_QUERY_OPA
	.comm	_RDMA_NL_GROUP_LS,4,2           ## @RDMA_NL_GROUP_LS
	.no_dead_strip	_send_mad
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function send_mad
_send_mad:                              ; @send_mad
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	mov	x20, x2
	mov	x21, x1
	mov	x19, x0
Lloh0:
	adrp	x23, _queries@GOTPAGE
Lloh1:
	ldr	x23, [x23, _queries@GOTPAGEOFF]
	mov	x0, x23
	bl	_xa_lock_irqsave
Lloh2:
	adrp	x8, _xa_limit_32b@GOTPAGE
Lloh3:
	ldr	x8, [x8, _xa_limit_32b@GOTPAGEOFF]
Lloh4:
	ldr	w3, [x8]
	add	x1, sp, #12
	mov	x0, x23
	mov	x2, x19
	mov	x4, x20
	bl	___xa_alloc
	mov	x22, x0
	mov	x0, x23
	bl	_xa_unlock_irqrestore
	tbnz	w22, #31, LBB0_9
; %bb.1:
	ldr	x8, [x19, #8]
	str	x21, [x8]
	ldr	x8, [x8, #8]
	str	x19, [x8]
	ldr	w8, [sp, #12]
	str	w8, [x19]
	ldr	w8, [x19, #4]
Lloh5:
	adrp	x9, _IB_SA_ENABLE_LOCAL_SERVICE@GOTPAGE
Lloh6:
	ldr	x9, [x9, _IB_SA_ENABLE_LOCAL_SERVICE@GOTPAGEOFF]
Lloh7:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_6
; %bb.2:
Lloh8:
	adrp	x9, _IB_SA_QUERY_OPA@GOTPAGE
Lloh9:
	ldr	x9, [x9, _IB_SA_QUERY_OPA@GOTPAGEOFF]
Lloh10:
	ldr	w9, [x9]
	tst	w9, w8
	b.ne	LBB0_6
; %bb.3:
Lloh11:
	adrp	x8, _RDMA_NL_GROUP_LS@GOTPAGE
Lloh12:
	ldr	x8, [x8, _RDMA_NL_GROUP_LS@GOTPAGEOFF]
Lloh13:
	ldr	w0, [x8]
	bl	_rdma_nl_chk_listeners
	cbz	x0, LBB0_5
; %bb.4:
	mov	x0, x19
	mov	x1, x20
	bl	_ib_nl_make_request
	cbz	w0, LBB0_10
LBB0_5:
	mov	x0, x19
	bl	_ib_sa_disable_local_svc
LBB0_6:
	ldr	x0, [x19, #8]
	mov	x1, #0
	bl	_ib_post_send_mad
	mov	x19, x0
	cbz	w0, LBB0_8
; %bb.7:
Lloh14:
	adrp	x20, _queries@GOTPAGE
Lloh15:
	ldr	x20, [x20, _queries@GOTPAGEOFF]
	mov	x0, x20
	bl	_xa_lock_irqsave
	ldr	w1, [sp, #12]
	mov	x0, x20
	bl	___xa_erase
	mov	x0, x20
	bl	_xa_unlock_irqrestore
LBB0_8:
	ldr	w8, [sp, #12]
	cmp	w19, #0
	csel	w22, w8, w19, eq
LBB0_9:
	mov	x0, x22
	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
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #80
	ret
LBB0_10:
	ldr	w22, [sp, #12]
	b	LBB0_9
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGot	Lloh14, Lloh15
	.cfi_endproc
                                        ; -- End function
	.comm	_queries,4,2                    ; @queries
	.comm	_xa_limit_32b,4,2               ; @xa_limit_32b
	.comm	_IB_SA_ENABLE_LOCAL_SERVICE,4,2 ; @IB_SA_ENABLE_LOCAL_SERVICE
	.comm	_IB_SA_QUERY_OPA,4,2            ; @IB_SA_QUERY_OPA
	.comm	_RDMA_NL_GROUP_LS,4,2           ; @RDMA_NL_GROUP_LS
	.no_dead_strip	_send_mad
.subsections_via_symbols
