	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function xive_enable
_xive_enable:                           ## @xive_enable
	.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	%rdx, %r12
	movq	_MAX_XIVE_IRQS@GOTPCREL(%rip), %rax
	cmpq	%rsi, (%rax)
	jne	LBB0_4
## %bb.1:
	movq	_xive_ipi_vector@GOTPCREL(%rip), %rax
	cmpl	$-1, (%rax)
	jne	LBB0_3
## %bb.2:
	movl	%r12d, (%rax)
LBB0_3:
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_4:
	movq	%rcx, %rbx
	movq	%rsi, %r13
	movl	%edi, -44(%rbp)                 ## 4-byte Spill
	movq	(%rcx), %r15
	testq	%r15, %r15
	jne	LBB0_6
## %bb.5:
	movq	%r13, %rdi
	callq	_xive_configure_irq
	movq	%rax, %r15
	movq	%rax, (%rbx)
LBB0_6:
	movq	%rbx, -56(%rbp)                 ## 8-byte Spill
	movq	_hwref@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_PCPU_GET
	movq	%rax, %rbx
	movq	%r12, (%r15)
	movq	_OPAL_XIVE_SET_IRQ_CONFIG@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	_XIVE_PRIORITY@GOTPCREL(%rip), %r14
	movl	(%r14), %ecx
	movq	%r13, %rsi
	movq	%rbx, %rdx
	movq	%r12, %r8
	callq	_opal_call
	movq	_OPAL_BUSY@GOTPCREL(%rip), %r15
	cmpq	(%r15), %rax
	jne	LBB0_9
	.p2align	4, 0x90
LBB0_7:                                 ## =>This Inner Loop Header: Depth=1
	movl	$10, %edi
	callq	_DELAY
	movq	_OPAL_XIVE_SET_IRQ_CONFIG@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movl	(%r14), %ecx
	movq	%r13, %rsi
	movq	%rbx, %rdx
	movq	%r12, %r8
	callq	_opal_call
	cmpq	(%r15), %rax
	je	LBB0_7
LBB0_9:
	testq	%rax, %rax
	je	LBB0_11
## %bb.10:
	leaq	L_.str(%rip), %rdi
	movq	%r13, %rsi
	movq	%rbx, %rdx
	movq	%rax, %rcx
	callq	_panic
LBB0_11:
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	movq	(%rax), %rdx
	movl	-44(%rbp), %edi                 ## 4-byte Reload
	movq	%r13, %rsi
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_xive_unmask                    ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_MAX_XIVE_IRQS,8,3              ## @MAX_XIVE_IRQS
	.comm	_xive_ipi_vector,4,2            ## @xive_ipi_vector
	.comm	_hwref,4,2                      ## @hwref
	.comm	_OPAL_XIVE_SET_IRQ_CONFIG,4,2   ## @OPAL_XIVE_SET_IRQ_CONFIG
	.comm	_XIVE_PRIORITY,4,2              ## @XIVE_PRIORITY
	.comm	_OPAL_BUSY,8,3                  ## @OPAL_BUSY
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"OPAL_SET_XIVE IRQ %d -> cpu %d failed: %d"

	.no_dead_strip	_xive_enable
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function xive_enable
_xive_enable:                           ; @xive_enable
	.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
	mov	x22, x2
Lloh0:
	adrp	x8, _MAX_XIVE_IRQS@GOTPAGE
Lloh1:
	ldr	x8, [x8, _MAX_XIVE_IRQS@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	cmp	x8, x1
	b.ne	LBB0_4
; %bb.1:
Lloh3:
	adrp	x8, _xive_ipi_vector@GOTPAGE
Lloh4:
	ldr	x8, [x8, _xive_ipi_vector@GOTPAGEOFF]
	ldr	w9, [x8]
	cmn	w9, #1
	b.ne	LBB0_3
; %bb.2:
	str	w22, [x8]
LBB0_3:
	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
LBB0_4:
	mov	x20, x3
	mov	x19, x1
	mov	x21, x0
	ldr	x24, [x3]
	cbnz	x24, LBB0_6
; %bb.5:
	mov	x0, x19
	bl	_xive_configure_irq
	mov	x24, x0
	str	x0, [x20]
LBB0_6:
Lloh5:
	adrp	x8, _hwref@GOTPAGE
Lloh6:
	ldr	x8, [x8, _hwref@GOTPAGEOFF]
Lloh7:
	ldr	w0, [x8]
	bl	_PCPU_GET
	mov	x23, x0
	str	x22, [x24]
Lloh8:
	adrp	x24, _OPAL_XIVE_SET_IRQ_CONFIG@GOTPAGE
Lloh9:
	ldr	x24, [x24, _OPAL_XIVE_SET_IRQ_CONFIG@GOTPAGEOFF]
	ldr	w0, [x24]
Lloh10:
	adrp	x25, _XIVE_PRIORITY@GOTPAGE
Lloh11:
	ldr	x25, [x25, _XIVE_PRIORITY@GOTPAGEOFF]
	ldr	w3, [x25]
	mov	x1, x19
	mov	x2, x23
	mov	x4, x22
	bl	_opal_call
	mov	x3, x0
Lloh12:
	adrp	x26, _OPAL_BUSY@GOTPAGE
Lloh13:
	ldr	x26, [x26, _OPAL_BUSY@GOTPAGEOFF]
	ldr	x8, [x26]
	cmp	x0, x8
	b.ne	LBB0_9
LBB0_7:                                 ; =>This Inner Loop Header: Depth=1
	mov	w0, #10
	bl	_DELAY
	ldr	w0, [x24]
	ldr	w3, [x25]
	mov	x1, x19
	mov	x2, x23
	mov	x4, x22
	bl	_opal_call
	ldr	x8, [x26]
	cmp	x0, x8
	b.eq	LBB0_7
; %bb.8:
	mov	x3, x0
LBB0_9:
	cbz	x3, LBB0_11
; %bb.10:
Lloh14:
	adrp	x0, l_.str@PAGE
Lloh15:
	add	x0, x0, l_.str@PAGEOFF
	mov	x1, x19
	mov	x2, x23
	bl	_panic
LBB0_11:
	ldr	x2, [x20]
	mov	x0, x21
	mov	x1, x19
	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
	b	_xive_unmask
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh12, Lloh13
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpAdd	Lloh14, Lloh15
	.cfi_endproc
                                        ; -- End function
	.comm	_MAX_XIVE_IRQS,8,3              ; @MAX_XIVE_IRQS
	.comm	_xive_ipi_vector,4,2            ; @xive_ipi_vector
	.comm	_hwref,4,2                      ; @hwref
	.comm	_OPAL_XIVE_SET_IRQ_CONFIG,4,2   ; @OPAL_XIVE_SET_IRQ_CONFIG
	.comm	_XIVE_PRIORITY,4,2              ; @XIVE_PRIORITY
	.comm	_OPAL_BUSY,8,3                  ; @OPAL_BUSY
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"OPAL_SET_XIVE IRQ %d -> cpu %d failed: %d"

	.no_dead_strip	_xive_enable
.subsections_via_symbols
