	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function lio_irq_reallocate_irqs
_lio_irq_reallocate_irqs:               ## @lio_irq_reallocate_irqs
	.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
	xorl	%r14d, %r14d
	cmpq	$0, 64(%rdi)
	je	LBB0_23
## %bb.1:
	movl	%esi, %r12d
	movq	%rdi, %rbx
	movq	_OCTEON_ALL_INTR@GOTPCREL(%rip), %r15
	movl	(%r15), %esi
	callq	*16(%rdi)
	cmpq	$0, 64(%rbx)
	je	LBB0_18
## %bb.2:
	movq	%rbx, %rdi
	callq	_OCTEON_CN23XX_PF
	testq	%rax, %rax
	je	LBB0_4
## %bb.3:
	movl	(%rbx), %r13d
	decl	%r13d
	jmp	LBB0_6
LBB0_4:
	movq	%rbx, %rdi
	callq	_OCTEON_CN23XX_VF
	testq	%rax, %rax
	je	LBB0_13
## %bb.5:
	movl	(%rbx), %r13d
LBB0_6:
	movq	40(%rbx), %rdx
	testl	%r13d, %r13d
	movq	%rdx, -56(%rbp)                 ## 8-byte Spill
	jle	LBB0_14
## %bb.7:
	movl	%r12d, -44(%rbp)                ## 4-byte Spill
	movl	%r13d, %ecx
	movq	56(%rbx), %rax
	shlq	$3, %rcx
	leaq	(%rcx,%rcx,8), %r12
	xorl	%r15d, %r15d
	movq	%rdx, %r14
	jmp	LBB0_9
	.p2align	4, 0x90
LBB0_8:                                 ##   in Loop: Header=BB0_9 Depth=1
	addq	$72, %r15
	addq	$4, %r14
	cmpq	%r15, %r12
	je	LBB0_11
LBB0_9:                                 ## =>This Inner Loop Header: Depth=1
	cmpq	$0, 48(%rax,%r15)
	je	LBB0_8
## %bb.10:                              ##   in Loop: Header=BB0_9 Depth=1
	movl	(%r14), %edi
	xorl	%esi, %esi
	callq	_irq_set_affinity_hint
	movl	(%r14), %edi
	movq	56(%rbx), %rsi
	addq	%r15, %rsi
	callq	_free_irq
	movq	56(%rbx), %rax
	movq	$0, 48(%rax,%r15)
	jmp	LBB0_8
LBB0_11:
	xorl	%r14d, %r14d
	movq	_OCTEON_ALL_INTR@GOTPCREL(%rip), %r15
	movl	-44(%rbp), %r12d                ## 4-byte Reload
	jmp	LBB0_15
LBB0_13:
	movq	40(%rbx), %rax
	movq	%rax, -56(%rbp)                 ## 8-byte Spill
LBB0_14:
	xorl	%r13d, %r13d
LBB0_15:
	movq	%rbx, %rdi
	callq	_OCTEON_CN23XX_PF
	testq	%rax, %rax
	je	LBB0_17
## %bb.16:
	movl	%r13d, %eax
	movq	-56(%rbp), %rcx                 ## 8-byte Reload
	movl	(%rcx,%rax,4), %edi
	movq	%rbx, %rsi
	callq	_free_irq
LBB0_17:
	movq	24(%rbx), %rdi
	callq	_pci_disable_msix
	movq	40(%rbx), %rdi
	callq	_kfree
	movq	$0, 40(%rbx)
LBB0_18:
	movq	32(%rbx), %rdi
	callq	_kfree
	movq	$0, 32(%rbx)
	movq	%rbx, %rdi
	movl	%r12d, %esi
	callq	_octeon_allocate_ioq_vector
	testq	%rax, %rax
	je	LBB0_20
## %bb.19:
	movq	24(%rbx), %rdi
	leaq	L_.str(%rip), %rsi
	callq	_dev_err
	movl	$-1, %r14d
	jmp	LBB0_23
LBB0_20:
	movq	%rbx, %rdi
	movl	%r12d, %esi
	callq	_octeon_setup_interrupt
	testq	%rax, %rax
	je	LBB0_22
## %bb.21:
	movq	24(%rbx), %rdi
	leaq	L_.str.1(%rip), %rsi
	callq	_dev_info
	movl	$-1, %r14d
	jmp	LBB0_23
LBB0_22:
	movl	(%r15), %esi
	movq	%rbx, %rdi
	callq	*8(%rbx)
LBB0_23:
	movl	%r14d, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_OCTEON_ALL_INTR,4,2            ## @OCTEON_ALL_INTR
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"OCTEON: ioq vector allocation failed\n"

L_.str.1:                               ## @.str.1
	.asciz	"Setup interrupt failed\n"

	.no_dead_strip	_lio_irq_reallocate_irqs
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function lio_irq_reallocate_irqs
_lio_irq_reallocate_irqs:               ; @lio_irq_reallocate_irqs
	.cfi_startproc
; %bb.0:
	stp	x26, x25, [sp, #-80]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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
	ldr	x8, [x0, #64]
	cbz	x8, LBB0_21
; %bb.1:
	mov	x20, x1
	mov	x19, x0
	ldr	x8, [x0, #16]
Lloh0:
	adrp	x21, _OCTEON_ALL_INTR@GOTPAGE
Lloh1:
	ldr	x21, [x21, _OCTEON_ALL_INTR@GOTPAGEOFF]
	ldr	w1, [x21]
	blr	x8
	ldr	x8, [x19, #64]
	cbz	x8, LBB0_16
; %bb.2:
	mov	x0, x19
	bl	_OCTEON_CN23XX_PF
	cbz	x0, LBB0_4
; %bb.3:
	ldr	w8, [x19]
	sub	w22, w8, #1
	b	LBB0_6
LBB0_4:
	mov	x0, x19
	bl	_OCTEON_CN23XX_VF
	cbz	x0, LBB0_12
; %bb.5:
	ldr	w22, [x19]
LBB0_6:
	ldr	x23, [x19, #40]
	cmp	w22, #1
	b.lt	LBB0_11
; %bb.7:
	mov	x24, #0
	mov	w9, w22
	ldr	x8, [x19, #56]
	lsl	x25, x9, #2
	mov	w26, #48
	b	LBB0_9
LBB0_8:                                 ;   in Loop: Header=BB0_9 Depth=1
	add	x26, x26, #72
	add	x24, x24, #4
	cmp	x25, x24
	b.eq	LBB0_13
LBB0_9:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x9, [x8, x26]
	cbz	x9, LBB0_8
; %bb.10:                               ;   in Loop: Header=BB0_9 Depth=1
	ldr	w0, [x23, x24]
	mov	x1, #0
	bl	_irq_set_affinity_hint
	ldr	w0, [x23, x24]
	ldr	x8, [x19, #56]
	add	x8, x8, x26
	sub	x1, x8, #48
	bl	_free_irq
	ldr	x8, [x19, #56]
	str	xzr, [x8, x26]
	b	LBB0_8
LBB0_11:
	mov	w22, #0
	b	LBB0_13
LBB0_12:
	mov	w22, #0
	ldr	x23, [x19, #40]
LBB0_13:
	mov	x0, x19
	bl	_OCTEON_CN23XX_PF
	cbz	x0, LBB0_15
; %bb.14:
	ldr	w0, [x23, w22, uxtw #2]
	mov	x1, x19
	bl	_free_irq
LBB0_15:
	ldr	x0, [x19, #24]
	bl	_pci_disable_msix
	ldr	x0, [x19, #40]
	bl	_kfree
	str	xzr, [x19, #40]
LBB0_16:
	ldr	x0, [x19, #32]
	bl	_kfree
	str	xzr, [x19, #32]
	mov	x0, x19
	mov	x1, x20
	bl	_octeon_allocate_ioq_vector
	cbz	x0, LBB0_18
; %bb.17:
	ldr	x0, [x19, #24]
Lloh2:
	adrp	x1, l_.str@PAGE
Lloh3:
	add	x1, x1, l_.str@PAGEOFF
	bl	_dev_err
	mov	w0, #-1
	b	LBB0_22
LBB0_18:
	mov	x0, x19
	mov	x1, x20
	bl	_octeon_setup_interrupt
	cbz	x0, LBB0_20
; %bb.19:
	ldr	x0, [x19, #24]
Lloh4:
	adrp	x1, l_.str.1@PAGE
Lloh5:
	add	x1, x1, l_.str.1@PAGEOFF
	bl	_dev_info
	mov	w0, #-1
	b	LBB0_22
LBB0_20:
	ldr	x8, [x19, #8]
	ldr	w1, [x21]
	mov	x0, x19
	blr	x8
LBB0_21:
	mov	w0, #0
LBB0_22:
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpAdd	Lloh4, Lloh5
	.cfi_endproc
                                        ; -- End function
	.comm	_OCTEON_ALL_INTR,4,2            ; @OCTEON_ALL_INTR
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"OCTEON: ioq vector allocation failed\n"

l_.str.1:                               ; @.str.1
	.asciz	"Setup interrupt failed\n"

	.no_dead_strip	_lio_irq_reallocate_irqs
.subsections_via_symbols
