	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ib_send_mad                    ## -- Begin function ib_send_mad
	.p2align	4, 0x90
_ib_send_mad:                           ## @ib_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
	subq	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %rbx
	movq	64(%rdi), %rax
	movq	(%rax), %r15
	movq	%r15, 24(%rdi)
	movq	_ib_mad_send_done@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	leaq	20(%rdi), %rcx
	movl	%eax, 20(%rdi)
	movq	%rcx, 32(%rdi)
	movq	48(%rdi), %r12
	movq	56(%rdi), %r13
	movl	(%r12), %edi
	movl	40(%rbx), %esi
	movl	(%r13), %edx
	movq	_DMA_TO_DEVICE@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	callq	_ib_dma_map_single
	movq	%rax, 8(%r13)
	movl	(%r12), %edi
	movq	%rax, %rsi
	callq	_ib_dma_mapping_error
	movl	%eax, %edi
	callq	_unlikely
	testq	%rax, %rax
	jne	LBB0_1
## %bb.2:
	movq	8(%r13), %rax
	movq	%rax, 8(%rbx)
	movl	(%r12), %r14d
	movq	%rbx, %rdi
	callq	_ib_get_payload
	movl	16(%r13), %edx
	movq	_DMA_TO_DEVICE@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	movl	%r14d, %edi
	movl	%eax, %esi
	callq	_ib_dma_map_single
	movq	%rax, 24(%r13)
	movl	(%r12), %edi
	movq	%rax, %rsi
	callq	_ib_dma_mapping_error
	movl	%eax, %edi
	callq	_unlikely
	testq	%rax, %rax
	je	LBB0_4
## %bb.3:
	movl	(%r12), %edi
	movq	8(%rbx), %rsi
	movl	(%r13), %edx
	movq	_DMA_TO_DEVICE@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	callq	_ib_dma_unmap_single
LBB0_1:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	xorl	%r15d, %r15d
	subl	(%rax), %r15d
LBB0_10:
	movl	%r15d, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_4:
	movq	24(%r13), %rax
	movq	%rax, (%rbx)
	leaq	16(%r15), %r14
	movq	%r14, %rdi
	callq	_spin_lock_irqsave
	movq	(%r15), %rax
	cmpq	8(%r15), %rax
	jge	LBB0_5
## %bb.6:
	movq	%r15, -48(%rbp)                 ## 8-byte Spill
	leaq	32(%rbx), %rsi
	movl	4(%r12), %edi
	leaq	-56(%rbp), %rdx
	callq	_ib_post_send
	testl	%eax, %eax
	je	LBB0_7
## %bb.9:
	movl	%eax, %r15d
	movq	%r14, %rdi
	callq	_spin_unlock_irqrestore
	movl	(%r12), %edi
	movq	8(%rbx), %rsi
	movl	(%r13), %edx
	movq	_DMA_TO_DEVICE@GOTPCREL(%rip), %r14
	movl	(%r14), %ecx
	callq	_ib_dma_unmap_single
	movl	(%r12), %edi
	movq	(%rbx), %rsi
	movl	16(%r13), %edx
	movl	(%r14), %ecx
	callq	_ib_dma_unmap_single
	jmp	LBB0_10
LBB0_5:
	leaq	24(%r15), %rsi
	jmp	LBB0_8
LBB0_7:
	movq	-48(%rbp), %r15                 ## 8-byte Reload
	leaq	20(%r15), %rsi
	movq	(%r15), %rax
LBB0_8:
	incq	%rax
	movq	%rax, (%r15)
	addq	$16, %rbx
	movq	%rbx, %rdi
	callq	_list_add_tail
	movq	%r14, %rdi
	callq	_spin_unlock_irqrestore
	xorl	%r15d, %r15d
	jmp	LBB0_10
	.cfi_endproc
                                        ## -- End function
	.comm	_ib_mad_send_done,4,2           ## @ib_mad_send_done
	.comm	_DMA_TO_DEVICE,4,2              ## @DMA_TO_DEVICE
	.comm	_ENOMEM,4,2                     ## @ENOMEM
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ib_send_mad                    ; -- Begin function ib_send_mad
	.p2align	2
_ib_send_mad:                           ; @ib_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	x19, x0
Lloh0:
	adrp	x8, _ib_mad_send_done@GOTPAGE
Lloh1:
	ldr	x8, [x8, _ib_mad_send_done@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	mov	x9, x0
	str	w8, [x9, #20]!
	mov	x20, x0
	str	x9, [x20, #32]!
	ldp	x22, x8, [x20, #24]
	ldr	x23, [x8]
	stur	x23, [x20, #-8]
	ldr	x25, [x20, #16]
	ldr	w0, [x25]
	ldr	w1, [x20, #8]
	ldr	w2, [x22]
Lloh3:
	adrp	x24, _DMA_TO_DEVICE@GOTPAGE
Lloh4:
	ldr	x24, [x24, _DMA_TO_DEVICE@GOTPAGEOFF]
	ldr	w3, [x24]
	bl	_ib_dma_map_single
	mov	x1, x0
	str	x0, [x22, #8]
	ldr	w0, [x25]
	bl	_ib_dma_mapping_error
	bl	_unlikely
	cbnz	x0, LBB0_3
; %bb.1:
	ldr	x8, [x22, #8]
	str	x8, [x19, #8]
	ldr	w21, [x25]
	mov	x0, x19
	bl	_ib_get_payload
	mov	x1, x0
	ldr	w2, [x22, #16]
	ldr	w3, [x24]
	mov	x0, x21
	bl	_ib_dma_map_single
	mov	x1, x0
	str	x0, [x22, #24]
	ldr	w0, [x25]
	bl	_ib_dma_mapping_error
	bl	_unlikely
	cbz	x0, LBB0_5
; %bb.2:
	ldr	w0, [x25]
	ldr	x1, [x19, #8]
	ldr	w2, [x22]
	ldr	w3, [x24]
	bl	_ib_dma_unmap_single
LBB0_3:
Lloh5:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh6:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh7:
	ldr	w8, [x8]
	neg	w20, w8
LBB0_4:
	mov	x0, x20
	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
LBB0_5:
	ldr	x8, [x22, #24]
	str	x8, [x19]
	add	x21, x23, #16
	mov	x0, x21
	bl	_spin_lock_irqsave
	ldp	x8, x9, [x23]
	cmp	x8, x9
	b.ge	LBB0_8
; %bb.6:
	ldr	w0, [x25, #4]
	add	x2, sp, #8
	mov	x1, x20
	bl	_ib_post_send
	cbz	w0, LBB0_9
; %bb.7:
	mov	x20, x0
	mov	x0, x21
	bl	_spin_unlock_irqrestore
	ldr	w0, [x25]
	ldr	x1, [x19, #8]
	ldr	w2, [x22]
	ldr	w3, [x24]
	bl	_ib_dma_unmap_single
	ldr	w0, [x25]
	ldr	x1, [x19]
	ldr	w2, [x22, #16]
	ldr	w3, [x24]
	bl	_ib_dma_unmap_single
	b	LBB0_4
LBB0_8:
	add	x1, x23, #24
	b	LBB0_10
LBB0_9:
	mov	x1, x23
	ldr	x8, [x1], #20
LBB0_10:
	add	x8, x8, #1
	str	x8, [x23]
	add	x0, x19, #16
	bl	_list_add_tail
	mov	x0, x21
	bl	_spin_unlock_irqrestore
	mov	w20, #0
	b	LBB0_4
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.cfi_endproc
                                        ; -- End function
	.comm	_ib_mad_send_done,4,2           ; @ib_mad_send_done
	.comm	_DMA_TO_DEVICE,4,2              ; @DMA_TO_DEVICE
	.comm	_ENOMEM,4,2                     ; @ENOMEM
.subsections_via_symbols
