	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ib_mad_post_receive_mads
_ib_mad_post_receive_mads:              ## @ib_mad_post_receive_mads
	.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	$104, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %rbx
	movq	%rdi, %r14
	leaq	16(%rdi), %rax
	movq	%rax, -96(%rbp)                 ## 8-byte Spill
	movq	(%rdi), %rax
	movq	8(%rax), %rax
	movl	(%rax), %eax
	movl	%eax, -48(%rbp)
	movq	$0, -104(%rbp)
	leaq	-56(%rbp), %rax
	movq	%rax, -112(%rbp)
	movl	$1, -128(%rbp)
	leaq	32(%rdi), %rax
	movq	%rax, -64(%rbp)                 ## 8-byte Spill
	leaq	36(%rdi), %rax
	movq	%rax, -88(%rbp)                 ## 8-byte Spill
	.p2align	4, 0x90
LBB0_1:                                 ## =>This Inner Loop Header: Depth=1
	testq	%rbx, %rbx
	jne	LBB0_3
## %bb.2:                               ##   in Loop: Header=BB0_1 Depth=1
	movq	(%r14), %rdi
	callq	_port_mad_size
	movq	_GFP_ATOMIC@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	movl	%eax, %edi
	callq	_alloc_mad_private
	movq	%rax, %rbx
	testq	%rax, %rax
	je	LBB0_8
LBB0_3:                                 ##   in Loop: Header=BB0_1 Depth=1
	movq	%rbx, %rdi
	callq	_mad_priv_dma_size
	movl	%eax, -52(%rbp)
	movq	(%r14), %rax
	movq	(%rax), %r12
	leaq	24(%rbx), %r13
	movq	%rbx, %rdi
	callq	_mad_priv_dma_size
	movq	_DMA_FROM_DEVICE@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	movq	%r12, %rdi
	movq	%r13, %rsi
	movl	%eax, %edx
	callq	_ib_dma_map_single
	movl	%eax, -56(%rbp)
	movq	(%r14), %rcx
	movq	(%rcx), %rdi
	movl	%eax, %esi
	callq	_ib_dma_mapping_error
	movl	%eax, %edi
	callq	_unlikely
	testq	%rax, %rax
	jne	LBB0_6
## %bb.4:                               ##   in Loop: Header=BB0_1 Depth=1
	movl	-56(%rbp), %eax
	movl	%eax, (%rbx)
	leaq	8(%rbx), %r12
	movq	-96(%rbp), %rax                 ## 8-byte Reload
	movq	%rax, 16(%rbx)
	movq	_ib_mad_recv_done@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	leaq	12(%rbx), %rcx
	movq	%rbx, -80(%rbp)                 ## 8-byte Spill
	movl	%eax, 12(%rbx)
	movq	%rcx, -120(%rbp)
	movq	-64(%rbp), %rbx                 ## 8-byte Reload
	movq	%rbx, %rdi
	callq	_spin_lock_irqsave
	movq	16(%r14), %r15
	movq	24(%r14), %r13
	incq	%r15
	movq	%r15, 16(%r14)
	movq	%r12, -72(%rbp)                 ## 8-byte Spill
	movq	%r12, %rdi
	movq	-88(%rbp), %rsi                 ## 8-byte Reload
	callq	_list_add_tail
	movq	%rbx, %rdi
	callq	_spin_unlock_irqrestore
	movq	%r14, %r12
	movl	8(%r14), %edi
	leaq	-128(%rbp), %rsi
	leaq	-136(%rbp), %rdx
	callq	_ib_post_recv
	testl	%eax, %eax
	jne	LBB0_7
## %bb.5:                               ##   in Loop: Header=BB0_1 Depth=1
	xorl	%ebx, %ebx
	cmpq	%r13, %r15
	movq	%r12, %r14
	jl	LBB0_1
	jmp	LBB0_10
LBB0_6:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	jmp	LBB0_9
LBB0_7:
	movq	-64(%rbp), %rbx                 ## 8-byte Reload
	movq	%rbx, %rdi
	movl	%eax, %r13d
	callq	_spin_lock_irqsave
	movq	-72(%rbp), %rdi                 ## 8-byte Reload
	callq	_list_del
	movq	%r12, %r14
	decq	16(%r12)
	movq	%rbx, %rdi
	callq	_spin_unlock_irqrestore
	movq	(%r12), %rax
	movq	(%rax), %r15
	movq	-80(%rbp), %rbx                 ## 8-byte Reload
	movl	(%rbx), %r12d
	movq	%rbx, %rdi
	callq	_mad_priv_dma_size
	movq	_DMA_FROM_DEVICE@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	movq	%r15, %rdi
	movl	%r12d, %esi
	movl	%eax, %edx
	callq	_ib_dma_unmap_single
	movq	%rbx, %rdi
	callq	_kfree
	movq	(%r14), %rax
	movq	(%rax), %rdi
	leaq	L_.str.1(%rip), %rsi
	movl	%r13d, %edx
	xorl	%eax, %eax
	callq	_dev_err
	movl	%r13d, %ebx
	jmp	LBB0_10
LBB0_8:
	movq	(%r14), %rax
	movq	(%rax), %rdi
	leaq	L_.str(%rip), %rsi
	xorl	%ebx, %ebx
	xorl	%eax, %eax
	callq	_dev_err
	movq	_ENOMEM@GOTPCREL(%rip), %rax
LBB0_9:
	subl	(%rax), %ebx
LBB0_10:
	movl	%ebx, %eax
	addq	$104, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_GFP_ATOMIC,4,2                 ## @GFP_ATOMIC
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"No memory for receive buffer\n"

	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_DMA_FROM_DEVICE,4,2            ## @DMA_FROM_DEVICE
	.comm	_ib_mad_recv_done,4,2           ## @ib_mad_recv_done
L_.str.1:                               ## @.str.1
	.asciz	"ib_post_recv failed: %d\n"

	.no_dead_strip	_ib_mad_post_receive_mads
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ib_mad_post_receive_mads
_ib_mad_post_receive_mads:              ; @ib_mad_post_receive_mads
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #160
	.cfi_def_cfa_offset 160
	stp	x28, x27, [sp, #64]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #80]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #96]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #112]            ; 16-byte Folded Spill
	stp	x20, x19, [sp, #128]            ; 16-byte Folded Spill
	stp	x29, x30, [sp, #144]            ; 16-byte Folded Spill
	add	x29, sp, #144
	.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
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	mov	x20, x1
	mov	x19, x0
	add	x26, x0, #16
	mov	x21, x0
	ldr	x8, [x21], #32
	ldr	x8, [x8, #8]
	ldr	w8, [x8]
	str	w8, [sp, #56]
	add	x8, sp, #48
	stp	x8, xzr, [sp, #32]
	mov	w8, #1
	str	w8, [sp, #16]
	add	x22, x0, #36
Lloh0:
	adrp	x28, _ib_mad_recv_done@GOTPAGE
Lloh1:
	ldr	x28, [x28, _ib_mad_recv_done@GOTPAGEOFF]
LBB0_1:                                 ; =>This Inner Loop Header: Depth=1
	cbnz	x20, LBB0_3
; %bb.2:                                ;   in Loop: Header=BB0_1 Depth=1
	ldr	x0, [x19]
	bl	_port_mad_size
Lloh2:
	adrp	x8, _GFP_ATOMIC@GOTPAGE
Lloh3:
	ldr	x8, [x8, _GFP_ATOMIC@GOTPAGEOFF]
Lloh4:
	ldr	w1, [x8]
	bl	_alloc_mad_private
	mov	x20, x0
	cbz	x0, LBB0_8
LBB0_3:                                 ;   in Loop: Header=BB0_1 Depth=1
	mov	x0, x20
	bl	_mad_priv_dma_size
	str	w0, [sp, #52]
	ldr	x8, [x19]
	ldr	x23, [x8]
	add	x24, x20, #24
	mov	x0, x20
	bl	_mad_priv_dma_size
	mov	x2, x0
Lloh5:
	adrp	x8, _DMA_FROM_DEVICE@GOTPAGE
Lloh6:
	ldr	x8, [x8, _DMA_FROM_DEVICE@GOTPAGEOFF]
Lloh7:
	ldr	w3, [x8]
	mov	x0, x23
	mov	x1, x24
	bl	_ib_dma_map_single
	mov	x1, x0
	str	w0, [sp, #48]
	ldr	x8, [x19]
	ldr	x0, [x8]
	bl	_ib_dma_mapping_error
	bl	_unlikely
	cbnz	x0, LBB0_9
; %bb.4:                                ;   in Loop: Header=BB0_1 Depth=1
	ldr	w8, [sp, #48]
	str	w8, [x20]
	ldr	w8, [x28]
	mov	x9, x20
	str	w8, [x9, #12]!
	sub	x24, x9, #4
	stur	x26, [x9, #4]
	str	x9, [sp, #24]
	mov	x0, x21
	bl	_spin_lock_irqsave
	ldp	x8, x27, [x19, #16]
	add	x25, x8, #1
	str	x25, [x19, #16]
	mov	x0, x24
	mov	x1, x22
	bl	_list_add_tail
	mov	x0, x21
	bl	_spin_unlock_irqrestore
	ldr	w0, [x19, #8]
	add	x1, sp, #16
	add	x2, sp, #8
	bl	_ib_post_recv
	cbnz	w0, LBB0_7
; %bb.5:                                ;   in Loop: Header=BB0_1 Depth=1
	mov	x20, #0
	cmp	x25, x27
	b.lt	LBB0_1
; %bb.6:
	mov	w23, #0
	b	LBB0_10
LBB0_7:
	mov	x23, x0
	mov	x0, x21
	bl	_spin_lock_irqsave
	mov	x0, x24
	bl	_list_del
	ldr	x8, [x19, #16]
	sub	x8, x8, #1
	str	x8, [x19, #16]
	mov	x0, x21
	bl	_spin_unlock_irqrestore
	ldr	x8, [x19]
	ldr	x21, [x8]
	ldr	w22, [x20]
	mov	x0, x20
	bl	_mad_priv_dma_size
	mov	x2, x0
Lloh8:
	adrp	x8, _DMA_FROM_DEVICE@GOTPAGE
Lloh9:
	ldr	x8, [x8, _DMA_FROM_DEVICE@GOTPAGEOFF]
Lloh10:
	ldr	w3, [x8]
	mov	x0, x21
	mov	x1, x22
	bl	_ib_dma_unmap_single
	mov	x0, x20
	bl	_kfree
	ldr	x8, [x19]
	ldr	x0, [x8]
	str	x23, [sp]
Lloh11:
	adrp	x1, l_.str.1@PAGE
Lloh12:
	add	x1, x1, l_.str.1@PAGEOFF
	bl	_dev_err
	b	LBB0_10
LBB0_8:
	ldr	x8, [x19]
	ldr	x0, [x8]
Lloh13:
	adrp	x1, l_.str@PAGE
Lloh14:
	add	x1, x1, l_.str@PAGEOFF
	bl	_dev_err
LBB0_9:
Lloh15:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh16:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh17:
	ldr	w8, [x8]
	neg	w23, w8
LBB0_10:
	mov	x0, x23
	ldp	x29, x30, [sp, #144]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #128]            ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #112]            ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #96]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #80]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #64]             ; 16-byte Folded Reload
	add	sp, sp, #160
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpAdd	Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpAdd	Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.cfi_endproc
                                        ; -- End function
	.comm	_GFP_ATOMIC,4,2                 ; @GFP_ATOMIC
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"No memory for receive buffer\n"

	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_DMA_FROM_DEVICE,4,2            ; @DMA_FROM_DEVICE
	.comm	_ib_mad_recv_done,4,2           ; @ib_mad_recv_done
l_.str.1:                               ; @.str.1
	.asciz	"ib_post_recv failed: %d\n"

	.no_dead_strip	_ib_mad_post_receive_mads
.subsections_via_symbols
