	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function myri10ge_request_irq
_myri10ge_request_irq:                  ## @myri10ge_request_irq
	.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, %r12
	movq	24(%rdi), %rax
	movq	%rax, -48(%rbp)                 ## 8-byte Spill
	movq	40(%rdi), %rbx
	movq	$0, (%rdi)
	movq	_myri10ge_msi@GOTPCREL(%rip), %rax
	cmpq	$0, (%rax)
	je	LBB0_14
## %bb.1:
	movl	8(%r12), %ecx
	cmpl	$2, %ecx
	jl	LBB0_4
## %bb.2:
	movq	32(%r12), %rsi
	movq	%rbx, %rdi
	movl	%ecx, %edx
	callq	_pci_enable_msix_range
	testl	%eax, %eax
	js	LBB0_11
## %bb.3:
	movl	$1, 4(%r12)
	jmp	LBB0_6
LBB0_4:
	movq	%rbx, %rdi
	callq	_pci_enable_msi
	testl	%eax, %eax
	je	LBB0_12
## %bb.5:
	leaq	L_.str.1(%rip), %rsi
	movq	%rbx, %rdi
	movl	%eax, %edx
	movl	%eax, %r14d
	xorl	%eax, %eax
	callq	_dev_err
	movl	%r14d, %eax
	cmpl	$0, 4(%r12)
	je	LBB0_13
LBB0_6:
	cmpl	$0, 8(%r12)
	jle	LBB0_23
## %bb.7:
	movq	%rbx, -64(%rbp)                 ## 8-byte Spill
	movq	$-1, %r13
	xorl	%r14d, %r14d
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_8:                                 ## =>This Inner Loop Header: Depth=1
	movq	16(%r12), %r15
	leaq	(%r15,%r14), %rax
	movq	%rax, -56(%rbp)                 ## 8-byte Spill
	movq	(%r15,%r14), %rdi
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	movq	(%rax), %rcx
	movl	$8, %esi
	leaq	L_.str.2(%rip), %rdx
	movl	%ebx, %r8d
	callq	_snprintf
	movq	32(%r12), %rax
	movl	(%rax,%rbx,4), %edi
	movq	_myri10ge_intr@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	(%r15,%r14), %rcx
	xorl	%edx, %edx
	movq	-56(%rbp), %r8                  ## 8-byte Reload
	callq	_request_irq
	testl	%eax, %eax
	jne	LBB0_19
## %bb.9:                               ##   in Loop: Header=BB0_8 Depth=1
	incq	%rbx
	movslq	8(%r12), %rax
	addq	$8, %r14
	decq	%r13
	cmpq	%rax, %rbx
	jl	LBB0_8
	jmp	LBB0_18
LBB0_11:
	leaq	L_.str(%rip), %rsi
	movq	%rbx, %rdi
	movl	%eax, %edx
	movl	%eax, %ebx
	xorl	%eax, %eax
	callq	_dev_err
	movl	%ebx, %eax
	jmp	LBB0_23
LBB0_12:
	movl	$1, (%r12)
	cmpl	$0, 4(%r12)
	jne	LBB0_6
LBB0_13:
	movq	24(%r12), %rax
	movq	%rax, -48(%rbp)                 ## 8-byte Spill
LBB0_14:
	movl	4(%rbx), %edi
	movq	_myri10ge_intr@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_IRQF_SHARED@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	movq	(%rax), %rcx
	movq	16(%r12), %r8
	callq	_request_irq
	testl	%eax, %eax
	je	LBB0_18
## %bb.15:
	movl	%eax, %r14d
	leaq	L_.str.4(%rip), %rsi
	movq	%rbx, %rdi
	xorl	%eax, %eax
	callq	_dev_err
	cmpl	$0, (%r12)
	je	LBB0_17
## %bb.16:
	movq	%rbx, %rdi
	callq	_pci_disable_msi
LBB0_17:
	movl	%r14d, %eax
	jmp	LBB0_23
LBB0_18:
	xorl	%eax, %eax
	jmp	LBB0_23
LBB0_19:
	movl	%eax, -56(%rbp)                 ## 4-byte Spill
	leaq	L_.str.3(%rip), %rsi
	movq	-64(%rbp), %r15                 ## 8-byte Reload
	movq	%r15, %rdi
	movl	%ebx, %edx
	xorl	%eax, %eax
	callq	_dev_err
	cmpl	$-1, %r13d
	je	LBB0_22
## %bb.20:
	addq	$-8, %r14
	negq	%r13
	.p2align	4, 0x90
LBB0_21:                                ## =>This Inner Loop Header: Depth=1
	movq	32(%r12), %rax
	movl	-8(%rax,%r13,4), %edi
	movq	16(%r12), %rsi
	addq	%r14, %rsi
	callq	_free_irq
	decq	%r13
	addq	$-8, %r14
	cmpq	$1, %r13
	jg	LBB0_21
LBB0_22:
	movq	%r15, %rdi
	callq	_pci_disable_msix
	movl	-56(%rbp), %eax                 ## 4-byte Reload
LBB0_23:
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_myri10ge_msi,8,3               ## @myri10ge_msi
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Error %d setting up MSI-X\n"

L_.str.1:                               ## @.str.1
	.asciz	"Error %d setting up MSI; falling back to xPIC\n"

L_.str.2:                               ## @.str.2
	.asciz	"%s:slice-%d"

	.comm	_myri10ge_intr,4,2              ## @myri10ge_intr
L_.str.3:                               ## @.str.3
	.asciz	"slice %d failed to allocate IRQ\n"

	.comm	_IRQF_SHARED,4,2                ## @IRQF_SHARED
L_.str.4:                               ## @.str.4
	.asciz	"failed to allocate IRQ\n"

	.no_dead_strip	_myri10ge_request_irq
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function myri10ge_request_irq
_myri10ge_request_irq:                  ; @myri10ge_request_irq
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	stp	x28, x27, [sp, #16]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #32]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #48]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #64]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #80]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #96]             ; 16-byte Folded Spill
	add	x29, sp, #96
	.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, x0
	ldr	x19, [x0, #40]
	ldr	x23, [x0, #24]
	str	xzr, [x0]
Lloh0:
	adrp	x8, _myri10ge_msi@GOTPAGE
Lloh1:
	ldr	x8, [x8, _myri10ge_msi@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	cbz	x8, LBB0_14
; %bb.1:
	ldr	w2, [x20, #8]
	cmp	w2, #2
	b.lt	LBB0_4
; %bb.2:
	ldr	x1, [x20, #32]
	mov	x0, x19
	mov	x3, x2
	bl	_pci_enable_msix_range
	mov	x21, x0
	tbnz	w0, #31, LBB0_11
; %bb.3:
	mov	w8, #1
	str	w8, [x20, #4]
	b	LBB0_6
LBB0_4:
	mov	x0, x19
	bl	_pci_enable_msi
	mov	x21, x0
	cbz	w0, LBB0_12
; %bb.5:
	mov	x8, x21
	str	x8, [sp]
Lloh3:
	adrp	x1, l_.str.1@PAGE
Lloh4:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x19
	bl	_dev_err
	ldr	w8, [x20, #4]
	cbz	w8, LBB0_13
LBB0_6:
	ldr	w8, [x20, #8]
	cmp	w8, #1
	b.lt	LBB0_21
; %bb.7:
	mov	x25, #0
	mov	x26, #0
	mov	x24, #-1
Lloh5:
	adrp	x27, _myri10ge_intr@GOTPAGE
Lloh6:
	ldr	x27, [x27, _myri10ge_intr@GOTPAGEOFF]
Lloh7:
	adrp	x22, l_.str.2@PAGE
Lloh8:
	add	x22, x22, l_.str.2@PAGEOFF
LBB0_8:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x20, #16]
	add	x21, x8, x25
	ldr	x0, [x21]
	ldr	x3, [x23]
	add	w4, w24, #1
	mov	w1, #8
	mov	x2, x22
	bl	_snprintf
	ldr	x8, [x20, #32]
	ldr	w0, [x8, x26, lsl #2]
	ldr	w1, [x27]
	ldr	x3, [x21]
	mov	w2, #0
	mov	x4, x21
	bl	_request_irq
	cbnz	w0, LBB0_17
; %bb.9:                                ;   in Loop: Header=BB0_8 Depth=1
	add	x26, x26, #1
	ldrsw	x8, [x20, #8]
	add	x24, x24, #1
	add	x25, x25, #8
	cmp	x26, x8
	b.lt	LBB0_8
; %bb.10:
	mov	w21, #0
	b	LBB0_21
LBB0_11:
	str	x21, [sp]
Lloh9:
	adrp	x1, l_.str@PAGE
Lloh10:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x19
	bl	_dev_err
	b	LBB0_21
LBB0_12:
	mov	w8, #1
	str	w8, [x20]
	ldr	w8, [x20, #4]
	cbnz	w8, LBB0_6
LBB0_13:
	ldr	x23, [x20, #24]
LBB0_14:
	ldr	w0, [x19, #4]
Lloh11:
	adrp	x8, _myri10ge_intr@GOTPAGE
Lloh12:
	ldr	x8, [x8, _myri10ge_intr@GOTPAGEOFF]
Lloh13:
	ldr	w1, [x8]
Lloh14:
	adrp	x8, _IRQF_SHARED@GOTPAGE
Lloh15:
	ldr	x8, [x8, _IRQF_SHARED@GOTPAGEOFF]
Lloh16:
	ldr	w2, [x8]
	ldr	x3, [x23]
	ldr	x4, [x20, #16]
	bl	_request_irq
	mov	x21, x0
	cbz	w0, LBB0_21
; %bb.15:
Lloh17:
	adrp	x1, l_.str.4@PAGE
Lloh18:
	add	x1, x1, l_.str.4@PAGEOFF
	mov	x0, x19
	bl	_dev_err
	ldr	w8, [x20]
	cbz	w8, LBB0_21
; %bb.16:
	mov	x0, x19
	bl	_pci_disable_msi
	b	LBB0_21
LBB0_17:
	mov	x21, x0
	add	x8, x24, #1
	str	x8, [sp]
Lloh19:
	adrp	x1, l_.str.3@PAGE
Lloh20:
	add	x1, x1, l_.str.3@PAGEOFF
	mov	x0, x19
	bl	_dev_err
	cmn	w24, #1
	b.eq	LBB0_20
; %bb.18:
	sub	x22, x25, #8
LBB0_19:                                ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x20, #32]
	ldr	w0, [x8, x24, lsl #2]
	ldr	x8, [x20, #16]
	add	x1, x8, x22
	bl	_free_irq
	add	x8, x24, #1
	sub	x24, x24, #1
	sub	x22, x22, #8
	cmp	x8, #1
	b.gt	LBB0_19
LBB0_20:
	mov	x0, x19
	bl	_pci_disable_msix
LBB0_21:
	mov	x0, x21
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #64]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #48]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #32]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #112
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpAdd	Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpAdd	Lloh17, Lloh18
	.loh AdrpAdd	Lloh19, Lloh20
	.cfi_endproc
                                        ; -- End function
	.comm	_myri10ge_msi,8,3               ; @myri10ge_msi
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Error %d setting up MSI-X\n"

l_.str.1:                               ; @.str.1
	.asciz	"Error %d setting up MSI; falling back to xPIC\n"

l_.str.2:                               ; @.str.2
	.asciz	"%s:slice-%d"

	.comm	_myri10ge_intr,4,2              ; @myri10ge_intr
l_.str.3:                               ; @.str.3
	.asciz	"slice %d failed to allocate IRQ\n"

	.comm	_IRQF_SHARED,4,2                ; @IRQF_SHARED
l_.str.4:                               ; @.str.4
	.asciz	"failed to allocate IRQ\n"

	.no_dead_strip	_myri10ge_request_irq
.subsections_via_symbols
