	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function alloc_uld_rxqs
_alloc_uld_rxqs:                        ## @alloc_uld_rxqs
	.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	$56, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%edx, -60(%rbp)                 ## 4-byte Spill
	movl	(%rsi), %ecx
	movl	4(%rsi), %ebx
	addl	%ecx, %ebx
	xorl	%r13d, %r13d
	movl	%ecx, %eax
	xorl	%edx, %edx
	divl	24(%rdi)
	movl	%eax, -48(%rbp)                 ## 4-byte Spill
	movq	_CXGB4_USING_MSIX@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	$1, %r8d
	movq	%rdi, -56(%rbp)                 ## 8-byte Spill
	testl	%eax, (%rdi)
	jne	LBB0_2
## %bb.1:
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	movl	32(%rax), %r8d
	notl	%r8d
LBB0_2:
	testl	%ebx, %ebx
	je	LBB0_26
## %bb.3:
	movq	24(%rsi), %r15
	movq	8(%rsi), %rax
	movq	%rax, -96(%rbp)                 ## 8-byte Spill
	movl	%ebx, %eax
	decq	%rax
	movq	%rax, -88(%rbp)                 ## 8-byte Spill
	addq	$8, %r15
	xorl	%r12d, %r12d
	movl	$0, -44(%rbp)                   ## 4-byte Folded Spill
	xorl	%edi, %edi
	movq	-56(%rbp), %r14                 ## 8-byte Reload
	movq	%rsi, -80(%rbp)                 ## 8-byte Spill
	.p2align	4, 0x90
LBB0_4:                                 ## =>This Inner Loop Header: Depth=1
	movl	%ecx, %eax
	cmpq	%rax, %r12
	jne	LBB0_6
## %bb.5:                               ##   in Loop: Header=BB0_4 Depth=1
	movl	4(%rsi), %eax
	xorl	%edi, %edi
	xorl	%edx, %edx
	divl	24(%r14)
	movl	%eax, -48(%rbp)                 ## 4-byte Spill
LBB0_6:                                 ##   in Loop: Header=BB0_4 Depth=1
	testl	%r8d, %r8d
	js	LBB0_15
## %bb.7:                               ##   in Loop: Header=BB0_4 Depth=1
	movq	%r15, %r13
	movl	%edi, %r15d
	movq	%rsi, %rbx
	movq	%r14, %rdi
	callq	_get_msix_idx_from_bmap
	testl	%eax, %eax
	js	LBB0_8
## %bb.14:                              ##   in Loop: Header=BB0_4 Depth=1
	movq	16(%r14), %rdx
	movl	%eax, -44(%rbp)                 ## 4-byte Spill
	movl	%eax, %ecx
	movl	(%rdx,%rcx,4), %r8d
	movl	%r15d, %edi
	movq	%r13, %r15
LBB0_15:                                ##   in Loop: Header=BB0_4 Depth=1
	movl	%edi, -68(%rbp)                 ## 4-byte Spill
	movl	%edi, %eax
	xorl	%edx, %edx
	divl	-48(%rbp)                       ## 4-byte Folded Reload
                                        ## kill: def $eax killed $eax def $rax
	leaq	-8(%r15), %r9
	movq	-8(%r15), %rcx
	testq	%rcx, %rcx
	cmoveq	%rcx, %r9
	cmpl	$0, -60(%rbp)                   ## 4-byte Folded Reload
	je	LBB0_16
## %bb.17:                              ##   in Loop: Header=BB0_4 Depth=1
	movq	_uldrx_flush_handler@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rbx
	jmp	LBB0_18
	.p2align	4, 0x90
LBB0_16:                                ##   in Loop: Header=BB0_4 Depth=1
	xorl	%ebx, %ebx
LBB0_18:                                ##   in Loop: Header=BB0_4 Depth=1
	movq	8(%r14), %rcx
	movl	(%rcx,%rax,4), %ecx
	movq	_uldrx_handler@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	subq	$8, %rsp
	movq	%r14, %rdi
	movq	%r15, %rsi
	xorl	%edx, %edx
	movl	%r8d, %r14d
	pushq	$0
	pushq	%rbx
	pushq	%rax
	callq	_t4_sge_alloc_rxq
	addq	$32, %rsp
	testl	%eax, %eax
	jne	LBB0_19
## %bb.20:                              ##   in Loop: Header=BB0_4 Depth=1
	movl	%r14d, -64(%rbp)                ## 4-byte Spill
	testl	%r14d, %r14d
	movq	-80(%rbp), %rbx                 ## 8-byte Reload
	js	LBB0_22
## %bb.21:                              ##   in Loop: Header=BB0_4 Depth=1
	movq	16(%rbx), %rax
	movl	-44(%rbp), %ecx                 ## 4-byte Reload
	movl	%ecx, (%rax,%r12,4)
LBB0_22:                                ##   in Loop: Header=BB0_4 Depth=1
	leaq	16(%r15), %rdi
	xorl	%esi, %esi
	movl	$4, %edx
	callq	_memset
	movq	-96(%rbp), %rcx                 ## 8-byte Reload
	testq	%rcx, %rcx
	movq	-56(%rbp), %r14                 ## 8-byte Reload
	je	LBB0_24
## %bb.23:                              ##   in Loop: Header=BB0_4 Depth=1
	movzwl	(%r15), %eax
	movw	%ax, (%rcx,%r12,2)
LBB0_24:                                ##   in Loop: Header=BB0_4 Depth=1
	cmpq	%r12, -88(%rbp)                 ## 8-byte Folded Reload
	je	LBB0_25
## %bb.27:                              ##   in Loop: Header=BB0_4 Depth=1
	movq	%rbx, %rsi
	movl	-68(%rbp), %edi                 ## 4-byte Reload
	incl	%edi
	movl	(%rbx), %ecx
	addq	$32, %r15
	incq	%r12
	movl	-64(%rbp), %r8d                 ## 4-byte Reload
	jmp	LBB0_4
LBB0_19:
	movl	%eax, %r13d
	movq	-80(%rbp), %rbx                 ## 8-byte Reload
	testl	%r12d, %r12d
	jne	LBB0_10
	jmp	LBB0_26
LBB0_25:
	xorl	%r13d, %r13d
	jmp	LBB0_26
LBB0_8:
	movq	_ENOSPC@GOTPCREL(%rip), %rax
	xorl	%r13d, %r13d
	subl	(%rax), %r13d
	testl	%r12d, %r12d
	je	LBB0_26
LBB0_10:
	negq	%r12
	movq	24(%rbx), %rbx
	jmp	LBB0_11
	.p2align	4, 0x90
LBB0_13:                                ##   in Loop: Header=BB0_11 Depth=1
	addq	$32, %rbx
	incl	%r12d
	je	LBB0_26
LBB0_11:                                ## =>This Inner Loop Header: Depth=1
	cmpq	$0, 16(%rbx)
	je	LBB0_13
## %bb.12:                              ##   in Loop: Header=BB0_11 Depth=1
	leaq	8(%rbx), %rsi
	movq	(%rbx), %rdx
	testq	%rdx, %rdx
	cmovneq	%rbx, %rdx
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	callq	_free_rspq_fl
	jmp	LBB0_13
LBB0_26:
	movl	%r13d, %eax
	addq	$56, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_CXGB4_USING_MSIX,4,2           ## @CXGB4_USING_MSIX
	.comm	_ENOSPC,4,2                     ## @ENOSPC
	.comm	_uldrx_handler,4,2              ## @uldrx_handler
	.comm	_uldrx_flush_handler,8,3        ## @uldrx_flush_handler
	.no_dead_strip	_alloc_uld_rxqs
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function alloc_uld_rxqs
_alloc_uld_rxqs:                        ; @alloc_uld_rxqs
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #128
	.cfi_def_cfa_offset 128
	stp	x28, x27, [sp, #32]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #48]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #64]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #80]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #96]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #112]            ; 16-byte Folded Spill
	add	x29, sp, #112
	.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
	str	w2, [sp, #28]                   ; 4-byte Folded Spill
	mov	x20, x1
	mov	x19, x0
	ldp	w8, w9, [x1]
	add	w9, w9, w8
	ldr	w10, [x0]
Lloh0:
	adrp	x11, _CXGB4_USING_MSIX@GOTPAGE
Lloh1:
	ldr	x11, [x11, _CXGB4_USING_MSIX@GOTPAGEOFF]
Lloh2:
	ldr	w11, [x11]
	tst	w11, w10
	b.eq	LBB0_2
; %bb.1:
	mov	w22, #1
	cbnz	w9, LBB0_3
	b	LBB0_15
LBB0_2:
	ldr	w10, [x19, #32]
	mvn	w22, w10
	cbz	w9, LBB0_15
LBB0_3:
	mov	x26, #0
	mov	w23, #0
	mov	w27, #0
	ldr	w10, [x19, #24]
	ldr	x28, [x20, #8]
	ldr	x11, [x20, #24]
	sub	x9, x9, #1
	str	x9, [sp, #16]                   ; 8-byte Folded Spill
	add	x24, x11, #8
	udiv	w21, w8, w10
	cmp	x26, w8, uxtw
	b.ne	LBB0_5
LBB0_4:
	mov	w27, #0
	ldr	w8, [x20, #4]
	ldr	w9, [x19, #24]
	udiv	w21, w8, w9
LBB0_5:                                 ; =>This Inner Loop Header: Depth=1
	tbnz	w22, #31, LBB0_8
; %bb.6:                                ;   in Loop: Header=BB0_5 Depth=1
	mov	x0, x19
	bl	_get_msix_idx_from_bmap
	tbnz	w0, #31, LBB0_18
; %bb.7:                                ;   in Loop: Header=BB0_5 Depth=1
	mov	x23, x0
	ldr	x8, [x19, #16]
	ldr	w22, [x8, w0, uxtw #2]
LBB0_8:                                 ;   in Loop: Header=BB0_5 Depth=1
	ldr	x8, [x19, #8]
	udiv	w9, w27, w21
	ldr	w3, [x8, w9, uxtw #2]
	mov	x8, x24
	ldr	x9, [x8, #-8]!
	cmp	x9, #0
	csel	x5, xzr, x8, eq
Lloh3:
	adrp	x8, _uldrx_handler@GOTPAGE
Lloh4:
	ldr	x8, [x8, _uldrx_handler@GOTPAGEOFF]
Lloh5:
	ldr	w6, [x8]
Lloh6:
	adrp	x8, _uldrx_flush_handler@GOTPAGE
Lloh7:
	ldr	x8, [x8, _uldrx_flush_handler@GOTPAGEOFF]
Lloh8:
	ldr	x8, [x8]
	ldr	w9, [sp, #28]                   ; 4-byte Folded Reload
	cmp	w9, #0
	csel	x7, xzr, x8, eq
	str	wzr, [sp]
	mov	x0, x19
	mov	x1, x24
	mov	w2, #0
	mov	x4, x22
	bl	_t4_sge_alloc_rxq
	cbnz	w0, LBB0_17
; %bb.9:                                ;   in Loop: Header=BB0_5 Depth=1
	tbnz	w22, #31, LBB0_11
; %bb.10:                               ;   in Loop: Header=BB0_5 Depth=1
	ldr	x8, [x20, #16]
	str	w23, [x8, x26, lsl #2]
LBB0_11:                                ;   in Loop: Header=BB0_5 Depth=1
	add	x0, x24, #16
	mov	w1, #0
	mov	w2, #4
	bl	_memset
	cbz	x28, LBB0_13
; %bb.12:                               ;   in Loop: Header=BB0_5 Depth=1
	ldrh	w8, [x24]
	strh	w8, [x28, x26, lsl #1]
LBB0_13:                                ;   in Loop: Header=BB0_5 Depth=1
	ldr	x8, [sp, #16]                   ; 8-byte Folded Reload
	cmp	x8, x26
	b.eq	LBB0_15
; %bb.14:                               ;   in Loop: Header=BB0_5 Depth=1
	add	w27, w27, #1
	ldr	w8, [x20]
	add	x24, x24, #32
	add	x26, x26, #1
	cmp	x26, w8, uxtw
	b.eq	LBB0_4
	b	LBB0_5
LBB0_15:
	mov	w25, #0
LBB0_16:
	mov	x0, x25
	ldp	x29, x30, [sp, #112]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #96]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #80]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #64]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #48]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #128
	ret
LBB0_17:
	mov	x25, x0
	cbnz	w26, LBB0_19
	b	LBB0_16
LBB0_18:
Lloh9:
	adrp	x8, _ENOSPC@GOTPAGE
Lloh10:
	ldr	x8, [x8, _ENOSPC@GOTPAGEOFF]
Lloh11:
	ldr	w8, [x8]
	neg	w25, w8
	cbz	w26, LBB0_16
LBB0_19:
	neg	x21, x26
	ldr	x20, [x20, #24]
	b	LBB0_21
LBB0_20:                                ;   in Loop: Header=BB0_21 Depth=1
	add	x20, x20, #32
	adds	w21, w21, #1
	b.hs	LBB0_16
LBB0_21:                                ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x20, #16]
	cbz	x8, LBB0_20
; %bb.22:                               ;   in Loop: Header=BB0_21 Depth=1
	mov	x1, x20
	ldr	x8, [x1], #8
	cmp	x8, #0
	csel	x2, xzr, x20, eq
	mov	x0, x19
	bl	_free_rspq_fl
	b	LBB0_20
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.cfi_endproc
                                        ; -- End function
	.comm	_CXGB4_USING_MSIX,4,2           ; @CXGB4_USING_MSIX
	.comm	_ENOSPC,4,2                     ; @ENOSPC
	.comm	_uldrx_handler,4,2              ; @uldrx_handler
	.comm	_uldrx_flush_handler,8,3        ; @uldrx_flush_handler
	.no_dead_strip	_alloc_uld_rxqs
.subsections_via_symbols
