	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function mthca_enable_msi_x
_mthca_enable_msi_x:                    ## @mthca_enable_msi_x
	.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	%rbx
	subq	$40, %rsp
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r14
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -32(%rbp)
	movl	$0, -64(%rbp)
	movl	$1, -56(%rbp)
	movl	$2, -48(%rbp)
	movl	8(%rdi), %ebx
	leaq	-64(%rbp), %r15
	movq	%r15, %rdi
	callq	_ARRAY_SIZE
	movl	%ebx, %edi
	movq	%r15, %rsi
	movl	%eax, %edx
	callq	_pci_enable_msix
	movl	%eax, %ebx
	testl	%eax, %eax
	je	LBB0_3
## %bb.1:
	jle	LBB0_4
## %bb.2:
	leaq	L_.str(%rip), %rsi
	movq	%r14, %rdi
	movl	%ebx, %edx
	callq	_mthca_info
	jmp	LBB0_4
LBB0_3:
	movl	-60(%rbp), %eax
	movq	(%r14), %rcx
	movq	_MTHCA_EQ_COMP@GOTPCREL(%rip), %rdx
	movq	(%rdx), %rdx
	movl	%eax, (%rcx,%rdx,4)
	movl	-52(%rbp), %eax
	movq	_MTHCA_EQ_ASYNC@GOTPCREL(%rip), %rdx
	movq	(%rdx), %rdx
	movl	%eax, (%rcx,%rdx,4)
	movl	-44(%rbp), %eax
	movq	_MTHCA_EQ_CMD@GOTPCREL(%rip), %rdx
	movq	(%rdx), %rdx
	movl	%eax, (%rcx,%rdx,4)
LBB0_4:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-32(%rbp), %rax
	jne	LBB0_6
## %bb.5:
	movl	%ebx, %eax
	addq	$40, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_6:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Only %d MSI-X vectors available, not using MSI-X\n"

	.comm	_MTHCA_EQ_COMP,8,3              ## @MTHCA_EQ_COMP
	.comm	_MTHCA_EQ_ASYNC,8,3             ## @MTHCA_EQ_ASYNC
	.comm	_MTHCA_EQ_CMD,8,3               ## @MTHCA_EQ_CMD
	.no_dead_strip	_mthca_enable_msi_x
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function mthca_enable_msi_x
_mthca_enable_msi_x:                    ; @mthca_enable_msi_x
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.cfi_def_cfa_offset 64
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	mov	x20, x0
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	str	x8, [sp, #24]
	mov	w8, #1
	str	wzr, [sp]
	str	w8, [sp, #8]
	mov	w8, #2
	str	w8, [sp, #16]
	ldr	w19, [x0, #8]
	mov	x0, sp
	bl	_ARRAY_SIZE
	mov	x2, x0
	mov	x1, sp
	mov	x0, x19
	bl	_pci_enable_msix
	mov	x19, x0
	cbz	w0, LBB0_3
; %bb.1:
	cmp	w19, #1
	b.lt	LBB0_4
; %bb.2:
Lloh3:
	adrp	x1, l_.str@PAGE
Lloh4:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x20
	mov	x2, x19
	bl	_mthca_info
	b	LBB0_4
LBB0_3:
	ldr	w8, [sp, #4]
	ldr	x9, [x20]
Lloh5:
	adrp	x10, _MTHCA_EQ_COMP@GOTPAGE
Lloh6:
	ldr	x10, [x10, _MTHCA_EQ_COMP@GOTPAGEOFF]
Lloh7:
	ldr	x10, [x10]
	str	w8, [x9, x10, lsl #2]
	ldr	w8, [sp, #12]
Lloh8:
	adrp	x10, _MTHCA_EQ_ASYNC@GOTPAGE
Lloh9:
	ldr	x10, [x10, _MTHCA_EQ_ASYNC@GOTPAGEOFF]
Lloh10:
	ldr	x10, [x10]
	str	w8, [x9, x10, lsl #2]
	ldr	w8, [sp, #20]
Lloh11:
	adrp	x10, _MTHCA_EQ_CMD@GOTPAGE
Lloh12:
	ldr	x10, [x10, _MTHCA_EQ_CMD@GOTPAGEOFF]
Lloh13:
	ldr	x10, [x10]
	str	w8, [x9, x10, lsl #2]
LBB0_4:
	ldr	x8, [sp, #24]
Lloh14:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh15:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh16:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_6
; %bb.5:
	mov	x0, x19
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #64
	ret
LBB0_6:
	bl	___stack_chk_fail
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Only %d MSI-X vectors available, not using MSI-X\n"

	.comm	_MTHCA_EQ_COMP,8,3              ; @MTHCA_EQ_COMP
	.comm	_MTHCA_EQ_ASYNC,8,3             ; @MTHCA_EQ_ASYNC
	.comm	_MTHCA_EQ_CMD,8,3               ; @MTHCA_EQ_CMD
	.no_dead_strip	_mthca_enable_msi_x
.subsections_via_symbols
