	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function xicp_enable
_xicp_enable:                           ## @xicp_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	%rcx, %rbx
	movq	%rdx, %r14
	movq	%rsi, %r15
	movl	%edi, -44(%rbp)                 ## 4-byte Spill
	callq	_device_get_softc
	movq	%rax, %r12
	movq	_hwref@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_PCPU_GET
	movl	%eax, %r13d
	movq	%r12, %rdi
	movq	%r15, %rsi
	movq	%rbx, %rdx
	callq	_xicp_setup_priv
	movq	%rax, %rbx
	movq	%r15, 16(%rax)
	movq	%r14, 8(%rax)
	movl	%r13d, (%rax)
	xorl	%eax, %eax
	callq	_mb
	movq	_MAX_XICP_IRQS@GOTPCREL(%rip), %rax
	cmpq	%r15, (%rax)
	je	LBB0_1
## %bb.2:
	xorl	%eax, %eax
	callq	_rtas_exists
	testq	%rax, %rax
	je	LBB0_4
## %bb.3:
	movl	4(%r12), %edi
	movq	_XICP_PRIORITY@GOTPCREL(%rip), %rax
	movl	(%rax), %r9d
	leaq	-48(%rbp), %rax
	movq	%rax, (%rsp)
	movl	$3, %esi
	movl	$1, %edx
	movq	%r15, %rcx
	movl	%r13d, %r8d
	callq	_rtas_call_method
	movl	-44(%rbp), %edi                 ## 4-byte Reload
	movq	%r15, %rsi
	movq	%rbx, %rdx
	callq	_xicp_unmask
	jmp	LBB0_4
LBB0_1:
	movslq	(%r12), %rax
	negq	%rax
	leaq	(%rax,%rax,2), %rax
	leaq	(%rbx,%rax,8), %rax
	movq	%rax, 8(%r12)
LBB0_4:
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_hwref,4,2                      ## @hwref
	.comm	_MAX_XICP_IRQS,8,3              ## @MAX_XICP_IRQS
	.comm	_XICP_PRIORITY,4,2              ## @XICP_PRIORITY
	.comm	_OPAL_SET_XIVE,4,2              ## @OPAL_SET_XIVE
	.no_dead_strip	_xicp_enable
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function xicp_enable
_xicp_enable:                           ; @xicp_enable
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.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
	mov	x21, x3
	mov	x24, x2
	mov	x19, x1
	mov	x20, x0
	bl	_device_get_softc
	mov	x23, x0
Lloh0:
	adrp	x8, _hwref@GOTPAGE
Lloh1:
	ldr	x8, [x8, _hwref@GOTPAGEOFF]
Lloh2:
	ldr	w0, [x8]
	bl	_PCPU_GET
	mov	x22, x0
	mov	x0, x23
	mov	x1, x19
	mov	x2, x21
	bl	_xicp_setup_priv
	mov	x21, x0
	stp	x24, x19, [x0, #8]
	str	w22, [x0]
	bl	_mb
Lloh3:
	adrp	x8, _MAX_XICP_IRQS@GOTPAGE
Lloh4:
	ldr	x8, [x8, _MAX_XICP_IRQS@GOTPAGEOFF]
Lloh5:
	ldr	x8, [x8]
	cmp	x8, x19
	b.eq	LBB0_3
; %bb.1:
	bl	_rtas_exists
	cbz	x0, LBB0_4
; %bb.2:
	ldr	w0, [x23, #4]
Lloh6:
	adrp	x8, _XICP_PRIORITY@GOTPAGE
Lloh7:
	ldr	x8, [x8, _XICP_PRIORITY@GOTPAGEOFF]
Lloh8:
	ldr	w5, [x8]
	add	x6, sp, #12
	mov	w1, #3
	mov	w2, #1
	mov	x3, x19
	mov	x4, x22
	bl	_rtas_call_method
	mov	x0, x20
	mov	x1, x19
	mov	x2, x21
	bl	_xicp_unmask
	b	LBB0_4
LBB0_3:
	ldrsw	x8, [x23]
	mov	w9, #24
	mneg	x8, x8, x9
	add	x8, x21, x8
	str	x8, [x23, #8]
LBB0_4:
	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
	add	sp, sp, #80
	ret
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.cfi_endproc
                                        ; -- End function
	.comm	_hwref,4,2                      ; @hwref
	.comm	_MAX_XICP_IRQS,8,3              ; @MAX_XICP_IRQS
	.comm	_XICP_PRIORITY,4,2              ; @XICP_PRIORITY
	.comm	_OPAL_SET_XIVE,4,2              ; @OPAL_SET_XIVE
	.no_dead_strip	_xicp_enable
.subsections_via_symbols
