	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function niu_try_msix
_niu_try_msix:                          ## @niu_try_msix
	.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	%rsi, %rbx
	movq	%rdi, %r12
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	movq	_NIU_NUM_LDG@GOTPCREL(%rip), %r15
	movl	(%r15), %r13d
	movq	%r13, %rax
	shlq	$4, %rax
	callq	____chkstk_darwin
	addq	$15, %rax
	andq	$-16, %rax
	subq	%rax, %rsp
	movq	%rsp, %r14
	movq	32(%r12), %rcx
	movq	24(%r12), %rax
	movq	%rax, -56(%rbp)                 ## 8-byte Spill
	movl	%r13d, %eax
	cltd
	idivl	(%rcx)
	movl	(%r12), %edx
	testl	%eax, %eax
	jle	LBB0_4
## %bb.1:
	imull	%eax, %edx
	movl	%edx, %esi
	xorl	%edi, %edi
	.p2align	4, 0x90
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	leal	(%rsi,%rdi), %eax
	movl	%eax, (%rbx,%rdi,4)
	incq	%rdi
	movl	(%r15), %eax
	cltd
	idivl	(%rcx)
	movslq	%eax, %rdx
	cmpq	%rdx, %rdi
	jl	LBB0_2
## %bb.3:
	movl	(%r12), %edx
LBB0_4:
	movslq	%edx, %rdx
	movq	8(%rcx), %rsi
	movq	16(%rcx), %rcx
	movl	(%rcx,%rdx,4), %ecx
	xorl	%edi, %edi
	testl	%edx, %edx
	sete	%dil
	addl	%edi, %edi
	addl	(%rsi,%rdx,4), %edi
	leal	(%rcx,%rdi), %ebx
	incl	%ebx
	xorl	%edi, %edi
	cmpl	%eax, %ebx
	setg	%dil
	callq	_BUG_ON
	testl	%ebx, %ebx
	jle	LBB0_11
## %bb.5:
	movl	%ebx, %eax
	cmpl	$1, %ebx
	jne	LBB0_7
## %bb.6:
	xorl	%ecx, %ecx
	jmp	LBB0_9
LBB0_7:
	movl	%eax, %edx
	andl	$-2, %edx
	leaq	24(%r14), %rsi
	xorl	%ecx, %ecx
	.p2align	4, 0x90
LBB0_8:                                 ## =>This Inner Loop Header: Depth=1
	movq	$0, -16(%rsi)
	movl	%ecx, -24(%rsi)
	movq	$0, (%rsi)
	leal	1(%rcx), %edi
	movl	%edi, -8(%rsi)
	addq	$2, %rcx
	addq	$32, %rsi
	cmpq	%rdx, %rcx
	jne	LBB0_8
LBB0_9:
	testb	$1, %al
	je	LBB0_11
## %bb.10:
	movq	%rcx, %rax
	shlq	$4, %rax
	movq	$0, 8(%r14,%rax)
	movl	%ecx, (%r14,%rax)
LBB0_11:
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	movq	%r14, %rsi
	movl	$1, %edx
	movl	%ebx, %ecx
	callq	_pci_enable_msix_range
	movq	_NIU_FLAGS_MSIX@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	testl	%eax, %eax
	js	LBB0_12
## %bb.13:
	orl	%ecx, 16(%r12)
	testl	%eax, %eax
	je	LBB0_20
## %bb.14:
	movq	8(%r12), %rcx
	movl	%eax, %edx
	cmpl	$5, %eax
	jae	LBB0_16
## %bb.15:
	xorl	%esi, %esi
	jmp	LBB0_18
LBB0_12:
	notl	%ecx
	andl	%ecx, 16(%r12)
	jmp	LBB0_21
LBB0_16:
	movl	%edx, %esi
	andl	$3, %esi
	testq	%rsi, %rsi
	movl	$4, %edi
	cmovneq	%rsi, %rdi
	movq	%rdx, %rsi
	subq	%rdi, %rsi
	leaq	40(%r14), %rdi
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_17:                                ## =>This Inner Loop Header: Depth=1
	movups	-32(%rdi), %xmm0
	movups	-16(%rdi), %xmm1
	movlhps	%xmm1, %xmm0                    ## xmm0 = xmm0[0],xmm1[0]
	movups	(%rdi), %xmm1
	movups	16(%rdi), %xmm2
	movlhps	%xmm2, %xmm1                    ## xmm1 = xmm1[0],xmm2[0]
	movups	%xmm0, (%rcx,%rbx,8)
	movups	%xmm1, 16(%rcx,%rbx,8)
	addq	$4, %rbx
	addq	$64, %rdi
	cmpq	%rbx, %rsi
	jne	LBB0_17
LBB0_18:
	movq	%rsi, %rdi
	shlq	$4, %rdi
	addq	%r14, %rdi
	addq	$8, %rdi
	.p2align	4, 0x90
LBB0_19:                                ## =>This Inner Loop Header: Depth=1
	movq	(%rdi), %rbx
	movq	%rbx, (%rcx,%rsi,8)
	incq	%rsi
	addq	$16, %rdi
	cmpq	%rsi, %rdx
	jne	LBB0_19
LBB0_20:
	movl	%eax, 4(%r12)
LBB0_21:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-48(%rbp), %rax
	jne	LBB0_23
## %bb.22:
	leaq	-40(%rbp), %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_23:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_NIU_NUM_LDG,4,2                ## @NIU_NUM_LDG
	.comm	_NIU_FLAGS_MSIX,4,2             ## @NIU_FLAGS_MSIX
	.no_dead_strip	_niu_try_msix
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function niu_try_msix
_niu_try_msix:                          ; @niu_try_msix
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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
	sub	sp, sp, #16
	mov	x19, x0
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	stur	x8, [x29, #-40]
Lloh3:
	adrp	x12, _NIU_NUM_LDG@GOTPAGE
Lloh4:
	ldr	x12, [x12, _NIU_NUM_LDG@GOTPAGEOFF]
	ldr	w13, [x12]
	lsl	x8, x13, #4
	mov	x9, x8
Lloh5:
	adrp	x16, ___chkstk_darwin@GOTPAGE
Lloh6:
	ldr	x16, [x16, ___chkstk_darwin@GOTPAGEOFF]
	blr	x16
	mov	x9, sp
	sub	x20, x9, x8
	mov	sp, x20
	ldp	x21, x8, [x0, #24]
	ldr	w9, [x8]
	sdiv	w9, w13, w9
	ldr	w10, [x0]
	cmp	w9, #1
	b.lt	LBB0_4
; %bb.1:
	mov	x11, #0
	mul	w10, w10, w9
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	add	w9, w10, w11
	str	w9, [x1, x11, lsl #2]
	add	x11, x11, #1
	ldr	w9, [x12]
	ldr	w13, [x8]
	sdiv	w9, w9, w13
	cmp	x11, w9, sxtw
	b.lt	LBB0_2
; %bb.3:
	ldr	w10, [x19]
LBB0_4:
	sbfiz	x11, x10, #2, #32
	ldp	x12, x8, [x8, #8]
	ldr	w12, [x12, x11]
	ldr	w8, [x8, x11]
	cmp	w10, #0
	add	w10, w12, #3
	csinc	w10, w10, w12, eq
	add	w22, w10, w8
	cmp	w22, w9
	cset	w0, gt
	bl	_BUG_ON
	cmp	w22, #1
	b.lt	LBB0_12
; %bb.5:
	cmp	w22, #4
	b.hs	LBB0_7
; %bb.6:
	mov	x8, #0
	b	LBB0_10
LBB0_7:
	mov	x9, #0
	and	x8, x22, #0xfffffffc
	add	x10, x20, #32
LBB0_8:                                 ; =>This Inner Loop Header: Depth=1
	add	w11, w9, #1
	stur	xzr, [x10, #-24]
	add	w12, w9, #2
	add	w13, w9, #3
	stur	xzr, [x10, #-8]
	str	xzr, [x10, #8]
	str	xzr, [x10, #24]
	stur	w9, [x10, #-32]
	stur	w11, [x10, #-16]
	add	x9, x9, #4
	str	w12, [x10]
	str	w13, [x10, #16]
	add	x10, x10, #64
	cmp	x8, x9
	b.ne	LBB0_8
; %bb.9:
	cmp	x8, x22
	b.eq	LBB0_12
LBB0_10:
	add	x9, x20, x8, lsl #4
	add	x9, x9, #8
LBB0_11:                                ; =>This Inner Loop Header: Depth=1
	str	xzr, [x9]
	stur	w8, [x9, #-8]
	add	x8, x8, #1
	add	x9, x9, #16
	cmp	x22, x8
	b.ne	LBB0_11
LBB0_12:
	mov	x0, x21
	mov	x1, x20
	mov	w2, #1
	mov	x3, x22
	bl	_pci_enable_msix_range
Lloh7:
	adrp	x8, _NIU_FLAGS_MSIX@GOTPAGE
Lloh8:
	ldr	x8, [x8, _NIU_FLAGS_MSIX@GOTPAGEOFF]
Lloh9:
	ldr	w8, [x8]
	tbnz	w0, #31, LBB0_16
; %bb.13:
	ldr	w9, [x19, #16]
	orr	w8, w9, w8
	str	w8, [x19, #16]
	cbz	w0, LBB0_21
; %bb.14:
	ldr	x9, [x19, #8]
	mov	w8, w0
	cmp	w0, #9
	b.hs	LBB0_17
; %bb.15:
	mov	x10, #0
	b	LBB0_19
LBB0_16:
	ldr	w9, [x19, #16]
	bic	w8, w9, w8
	str	w8, [x19, #16]
	b	LBB0_22
LBB0_17:
	ands	x10, x8, #0x7
	mov	w11, #8
	csel	x10, x11, x10, eq
	sub	x10, x8, x10
	add	x13, x20, #72
	add	x11, x9, #32
	mov	x12, x10
LBB0_18:                                ; =>This Inner Loop Header: Depth=1
	sub	x14, x13, #64
	ld2.2d	{ v0, v1 }, [x14]
	sub	x14, x13, #32
	ld2.2d	{ v2, v3 }, [x14]
	add	x14, x13, #128
	ld2.2d	{ v4, v5 }, [x13], #32
	ld2.2d	{ v6, v7 }, [x13]
	stp	q0, q2, [x11, #-32]
	stp	q4, q6, [x11], #64
	mov	x13, x14
	subs	x12, x12, #8
	b.ne	LBB0_18
LBB0_19:
	add	x11, x20, x10, lsl #4
	add	x11, x11, #8
	add	x9, x9, x10, lsl #3
	sub	x8, x8, x10
LBB0_20:                                ; =>This Inner Loop Header: Depth=1
	ldr	x10, [x11], #16
	str	x10, [x9], #8
	subs	x8, x8, #1
	b.ne	LBB0_20
LBB0_21:
	str	w0, [x19, #4]
LBB0_22:
	ldur	x8, [x29, #-40]
Lloh10:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh11:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh12:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_24
; %bb.23:
	sub	sp, x29, #32
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
LBB0_24:
	bl	___stack_chk_fail
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.cfi_endproc
                                        ; -- End function
	.comm	_NIU_NUM_LDG,4,2                ; @NIU_NUM_LDG
	.comm	_NIU_FLAGS_MSIX,4,2             ; @NIU_FLAGS_MSIX
	.no_dead_strip	_niu_try_msix
.subsections_via_symbols
