	.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, %r12d
	movl	%esi, -48(%rbp)                 ## 4-byte Spill
	movq	%rdi, %r14
	movq	_query_idr@GOTPCREL(%rip), %r13
	movq	_idr_lock@GOTPCREL(%rip), %r15
	.p2align	4, 0x90
LBB0_1:                                 ## =>This Inner Loop Header: Depth=1
	movq	%r13, %rdi
	movl	%r12d, %esi
	callq	_idr_pre_get
	testl	%eax, %eax
	je	LBB0_2
## %bb.3:                               ##   in Loop: Header=BB0_1 Depth=1
	movq	%r15, %rdi
	callq	_spin_lock_irqsave
	movq	%r13, %rdi
	movq	%r14, %rsi
	leaq	-44(%rbp), %rdx
	callq	_idr_get_new
	movl	%eax, %ebx
	movq	%r15, %rdi
	callq	_spin_unlock_irqrestore
	movq	_EAGAIN@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	addl	%ebx, %eax
	je	LBB0_1
## %bb.4:
	testl	%ebx, %ebx
	jne	LBB0_9
## %bb.5:
	movq	8(%r14), %rax
	movl	-48(%rbp), %ecx                 ## 4-byte Reload
	movl	%ecx, (%rax)
	movq	8(%rax), %rax
	movq	%r14, (%rax)
	movl	-44(%rbp), %eax
	movl	%eax, (%r14)
	movq	8(%r14), %rdi
	xorl	%esi, %esi
	callq	_ib_post_send_mad
	movl	%eax, %ebx
	testl	%eax, %eax
	je	LBB0_7
## %bb.6:
	movq	_idr_lock@GOTPCREL(%rip), %r14
	movq	%r14, %rdi
	callq	_spin_lock_irqsave
	movl	-44(%rbp), %esi
	movq	_query_idr@GOTPCREL(%rip), %rdi
	callq	_idr_remove
	movq	%r14, %rdi
	callq	_spin_unlock_irqrestore
LBB0_7:
	testl	%ebx, %ebx
	jne	LBB0_9
## %bb.8:
	movl	-44(%rbp), %ebx
	jmp	LBB0_9
LBB0_2:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
LBB0_9:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_query_idr,4,2                  ## @query_idr
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_idr_lock,4,2                   ## @idr_lock
	.comm	_EAGAIN,4,2                     ## @EAGAIN
	.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, #96
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	mov	x21, x2
	mov	x20, x1
	mov	x19, x0
Lloh0:
	adrp	x22, _query_idr@GOTPAGE
Lloh1:
	ldr	x22, [x22, _query_idr@GOTPAGEOFF]
Lloh2:
	adrp	x23, _idr_lock@GOTPAGE
Lloh3:
	ldr	x23, [x23, _idr_lock@GOTPAGEOFF]
Lloh4:
	adrp	x25, _EAGAIN@GOTPAGE
Lloh5:
	ldr	x25, [x25, _EAGAIN@GOTPAGEOFF]
LBB0_1:                                 ; =>This Inner Loop Header: Depth=1
	mov	x0, x22
	mov	x1, x21
	bl	_idr_pre_get
	cbz	w0, LBB0_7
; %bb.2:                                ;   in Loop: Header=BB0_1 Depth=1
	mov	x0, x23
	bl	_spin_lock_irqsave
	add	x2, sp, #12
	mov	x0, x22
	mov	x1, x19
	bl	_idr_get_new
	mov	x24, x0
	mov	x0, x23
	bl	_spin_unlock_irqrestore
	ldr	w8, [x25]
	cmn	w24, w8
	b.eq	LBB0_1
; %bb.3:
	cbnz	w24, LBB0_8
; %bb.4:
	ldr	x8, [x19, #8]
	str	w20, [x8]
	ldr	x8, [x8, #8]
	str	x19, [x8]
	ldr	w8, [sp, #12]
	str	w8, [x19]
	ldr	x0, [x19, #8]
	mov	x1, #0
	bl	_ib_post_send_mad
	mov	x19, x0
	cbz	w0, LBB0_6
; %bb.5:
Lloh6:
	adrp	x20, _idr_lock@GOTPAGE
Lloh7:
	ldr	x20, [x20, _idr_lock@GOTPAGEOFF]
	mov	x0, x20
	bl	_spin_lock_irqsave
	ldr	w1, [sp, #12]
Lloh8:
	adrp	x0, _query_idr@GOTPAGE
Lloh9:
	ldr	x0, [x0, _query_idr@GOTPAGEOFF]
	bl	_idr_remove
	mov	x0, x20
	bl	_spin_unlock_irqrestore
LBB0_6:
	ldr	w8, [sp, #12]
	cmp	w19, #0
	csel	w24, w8, w19, eq
	b	LBB0_8
LBB0_7:
Lloh10:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh11:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh12:
	ldr	w8, [x8]
	neg	w24, w8
LBB0_8:
	mov	x0, x24
	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
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #96
	ret
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.cfi_endproc
                                        ; -- End function
	.comm	_query_idr,4,2                  ; @query_idr
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_idr_lock,4,2                   ; @idr_lock
	.comm	_EAGAIN,4,2                     ; @EAGAIN
	.no_dead_strip	_send_mad
.subsections_via_symbols
