	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function xicp_dispatch
_xicp_dispatch:                         ## @xicp_dispatch
	.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
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %r14
	callq	_device_get_softc
	movq	%rax, %r13
	movq	_H_XIRR@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	-48(%rbp), %r12
	leaq	-44(%rbp), %r9
	xorl	%esi, %esi
	xorl	%edx, %edx
	xorl	%ecx, %ecx
	xorl	%r8d, %r8d
	pushq	%r12
	pushq	%r12
	callq	_phyp_pft_hcall
	addq	$16, %rsp
	movl	$16777215, %ecx                 ## imm = 0xFFFFFF
	movl	-44(%rbp), %eax
	andl	%ecx, %eax
	movl	%eax, -44(%rbp)
	je	LBB0_15
## %bb.1:
	leaq	-44(%rbp), %r15
	jmp	LBB0_2
	.p2align	4, 0x90
LBB0_8:                                 ##   in Loop: Header=BB0_2 Depth=1
	movq	_MAX_XICP_IRQS@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -44(%rbp)
	movq	_H_IPI@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	movq	_hwref@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_PCPU_GET
	movl	%ebx, %edi
	movl	%eax, %esi
	movl	$255, %edx
	callq	_phyp_hcall
	movl	(%r13), %ebx
LBB0_14:                                ##   in Loop: Header=BB0_2 Depth=1
	movq	8(%r13), %rax
	movslq	%ebx, %rcx
	movl	4(%rax,%rcx,8), %edi
	movq	%r14, %rsi
	callq	_powerpc_dispatch_intr
	movq	_H_XIRR@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	xorl	%esi, %esi
	xorl	%edx, %edx
	xorl	%ecx, %ecx
	xorl	%r8d, %r8d
	movq	%r15, %r9
	pushq	%r12
	pushq	%r12
	callq	_phyp_pft_hcall
	addq	$16, %rsp
	movl	-44(%rbp), %eax
	movl	$16777215, %ecx                 ## imm = 0xFFFFFF
	andl	%ecx, %eax
	movl	%eax, -44(%rbp)
	je	LBB0_15
LBB0_2:                                 ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_10 Depth 2
	movq	_XICP_IPI@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %eax
	je	LBB0_8
## %bb.3:                               ##   in Loop: Header=BB0_2 Depth=1
	movl	4(%r13), %ebx
	testl	%ebx, %ebx
	jle	LBB0_4
## %bb.5:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	8(%r13), %rcx
	cmpl	%eax, (%rcx)
	jne	LBB0_7
## %bb.6:                               ##   in Loop: Header=BB0_2 Depth=1
	movb	$1, %al
	xorl	%ebx, %ebx
	jmp	LBB0_13
LBB0_4:                                 ##   in Loop: Header=BB0_2 Depth=1
	xorl	%ebx, %ebx
	xorl	%eax, %eax
	jmp	LBB0_13
LBB0_7:                                 ##   in Loop: Header=BB0_2 Depth=1
	movl	$1, %edx
	.p2align	4, 0x90
LBB0_10:                                ##   Parent Loop BB0_2 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	cmpq	%rdx, %rbx
	je	LBB0_11
## %bb.9:                               ##   in Loop: Header=BB0_10 Depth=2
	leaq	1(%rdx), %rsi
	cmpl	%eax, (%rcx,%rdx,8)
	movq	%rsi, %rdx
	jne	LBB0_10
## %bb.12:                              ##   in Loop: Header=BB0_2 Depth=1
	decq	%rsi
	cmpq	%rbx, %rsi
	setb	%al
	movq	%rsi, %rbx
	jmp	LBB0_13
LBB0_11:                                ##   in Loop: Header=BB0_2 Depth=1
	seta	%al
	.p2align	4, 0x90
LBB0_13:                                ##   in Loop: Header=BB0_2 Depth=1
	movzbl	%al, %edi
	leaq	L_.str(%rip), %rsi
	callq	_KASSERT
	jmp	LBB0_14
LBB0_15:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_H_XIRR,4,2                     ## @H_XIRR
	.comm	_XICP_IPI,4,2                   ## @XICP_IPI
	.comm	_MAX_XICP_IRQS,4,2              ## @MAX_XICP_IRQS
	.comm	_H_IPI,4,2                      ## @H_IPI
	.comm	_hwref,4,2                      ## @hwref
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Unmapped XIRR"

	.comm	_OPAL_INT_GET_XIRR,4,2          ## @OPAL_INT_GET_XIRR
	.comm	_OPAL_INT_SET_MFRR,4,2          ## @OPAL_INT_SET_MFRR
	.comm	_PSL_HV,4,2                     ## @PSL_HV
	.comm	_cpu_xirr,8,3                   ## @cpu_xirr
	.comm	_cpuid,4,2                      ## @cpuid
	.no_dead_strip	_xicp_dispatch
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function xicp_dispatch
_xicp_dispatch:                         ; @xicp_dispatch
	.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	x19, x1
	bl	_device_get_softc
	mov	x20, x0
Lloh0:
	adrp	x23, _H_XIRR@GOTPAGE
Lloh1:
	ldr	x23, [x23, _H_XIRR@GOTPAGEOFF]
	ldr	w0, [x23]
	add	x5, sp, #12
	add	x6, sp, #8
	add	x7, sp, #8
	mov	w1, #0
	mov	w2, #0
	mov	w3, #0
	mov	w4, #0
	bl	_phyp_pft_hcall
	ldr	w8, [sp, #12]
	ands	w8, w8, #0xffffff
	str	w8, [sp, #12]
	b.eq	LBB0_16
; %bb.1:
Lloh2:
	adrp	x24, _XICP_IPI@GOTPAGE
Lloh3:
	ldr	x24, [x24, _XICP_IPI@GOTPAGEOFF]
Lloh4:
	adrp	x25, _MAX_XICP_IRQS@GOTPAGE
Lloh5:
	ldr	x25, [x25, _MAX_XICP_IRQS@GOTPAGEOFF]
Lloh6:
	adrp	x26, _H_IPI@GOTPAGE
Lloh7:
	ldr	x26, [x26, _H_IPI@GOTPAGEOFF]
Lloh8:
	adrp	x21, l_.str@PAGE
Lloh9:
	add	x21, x21, l_.str@PAGEOFF
Lloh10:
	adrp	x27, _hwref@GOTPAGE
Lloh11:
	ldr	x27, [x27, _hwref@GOTPAGEOFF]
	b	LBB0_4
LBB0_2:                                 ;   in Loop: Header=BB0_4 Depth=1
	ldr	w8, [x25]
	str	w8, [sp, #12]
	ldr	w22, [x26]
	ldr	w0, [x27]
	bl	_PCPU_GET
	mov	x1, x0
	mov	x0, x22
                                        ; kill: def $w1 killed $w1 killed $x1
	mov	w2, #255
	bl	_phyp_hcall
	ldr	w22, [x20]
LBB0_3:                                 ;   in Loop: Header=BB0_4 Depth=1
	ldr	x8, [x20, #8]
	add	x8, x8, w22, sxtw #3
	ldr	w0, [x8, #4]
	mov	x1, x19
	bl	_powerpc_dispatch_intr
	ldr	w0, [x23]
	add	x5, sp, #12
	add	x6, sp, #8
	add	x7, sp, #8
	mov	w1, #0
	mov	w2, #0
	mov	w3, #0
	mov	w4, #0
	bl	_phyp_pft_hcall
	ldr	w8, [sp, #12]
	ands	w8, w8, #0xffffff
	str	w8, [sp, #12]
	b.eq	LBB0_16
LBB0_4:                                 ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_10 Depth 2
	ldr	w9, [x24]
	cmp	w8, w9
	b.eq	LBB0_2
; %bb.5:                                ;   in Loop: Header=BB0_4 Depth=1
	ldr	w22, [x20, #4]
	cmp	w22, #1
	b.lt	LBB0_8
; %bb.6:                                ;   in Loop: Header=BB0_4 Depth=1
	ldr	x9, [x20, #8]
	ldr	w10, [x9]
	cmp	w10, w8
	b.ne	LBB0_9
; %bb.7:                                ;   in Loop: Header=BB0_4 Depth=1
	mov	x8, #0
	mov	w0, #1
	b	LBB0_13
LBB0_8:                                 ;   in Loop: Header=BB0_4 Depth=1
	mov	w22, #0
	mov	w0, #0
	b	LBB0_15
LBB0_9:                                 ;   in Loop: Header=BB0_4 Depth=1
	add	x9, x9, #8
	mov	w10, #1
LBB0_10:                                ;   Parent Loop BB0_4 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	cmp	x22, x10
	b.eq	LBB0_14
; %bb.11:                               ;   in Loop: Header=BB0_10 Depth=2
	ldr	w11, [x9], #8
	add	x10, x10, #1
	cmp	w11, w8
	b.ne	LBB0_10
; %bb.12:                               ;   in Loop: Header=BB0_4 Depth=1
	sub	x8, x10, #1
	cmp	x8, x22
	cset	w0, lo
LBB0_13:                                ;   in Loop: Header=BB0_4 Depth=1
	mov	x22, x8
	b	LBB0_15
LBB0_14:                                ;   in Loop: Header=BB0_4 Depth=1
	cmp	x10, x22
	cset	w0, lo
LBB0_15:                                ;   in Loop: Header=BB0_4 Depth=1
	mov	x1, x21
	bl	_KASSERT
	b	LBB0_3
LBB0_16:
	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 AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh2, Lloh3
	.cfi_endproc
                                        ; -- End function
	.comm	_H_XIRR,4,2                     ; @H_XIRR
	.comm	_XICP_IPI,4,2                   ; @XICP_IPI
	.comm	_MAX_XICP_IRQS,4,2              ; @MAX_XICP_IRQS
	.comm	_H_IPI,4,2                      ; @H_IPI
	.comm	_hwref,4,2                      ; @hwref
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Unmapped XIRR"

	.comm	_OPAL_INT_GET_XIRR,4,2          ; @OPAL_INT_GET_XIRR
	.comm	_OPAL_INT_SET_MFRR,4,2          ; @OPAL_INT_SET_MFRR
	.comm	_PSL_HV,4,2                     ; @PSL_HV
	.comm	_cpu_xirr,8,3                   ; @cpu_xirr
	.comm	_cpuid,4,2                      ; @cpuid
	.no_dead_strip	_xicp_dispatch
.subsections_via_symbols
