	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function its_vlpi_unmap
_its_vlpi_unmap:                        ## @its_vlpi_unmap
	.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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %rbx
	callq	_irq_data_get_irq_chip_data
	movq	%rax, %r14
	movq	%rbx, %rdi
	callq	_its_get_event_id
	movl	%eax, %r15d
	movq	%r14, %rdi
	callq	_mutex_lock
	cmpq	$0, 8(%r14)
	je	LBB0_2
## %bb.1:
	movq	%rbx, %rdi
	callq	_irqd_is_forwarded_to_vcpu
	testl	%eax, %eax
	je	LBB0_2
## %bb.3:
	movq	%r14, %rdi
	movl	%r15d, %esi
	callq	_its_send_discard
	movq	%rbx, %rdi
	callq	_irqd_clr_forwarded_to_vcpu
	movl	(%rbx), %esi
	movq	%r14, %rdi
	movl	%r15d, %edx
	callq	_its_send_mapti
	movq	_LPI_PROP_DEFAULT_PRIO@GOTPCREL(%rip), %rax
	movq	_LPI_PROP_ENABLED@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edx
	orl	(%rax), %edx
	movq	_LPI_PROP_GROUP1@GOTPCREL(%rip), %rax
	orl	(%rax), %edx
	movq	%rbx, %rdi
	movl	$255, %esi
	callq	_lpi_update_config
	movl	24(%r14), %edi
	movq	8(%r14), %rsi
	callq	_its_unmap_vm
	xorl	%ebx, %ebx
	decl	16(%r14)
	jne	LBB0_5
## %bb.4:
	movq	$0, 8(%r14)
	movl	4(%r14), %edi
	callq	_kfree
	jmp	LBB0_5
LBB0_2:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
LBB0_5:
	movq	%r14, %rdi
	callq	_mutex_unlock
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_LPI_PROP_DEFAULT_PRIO,4,2      ## @LPI_PROP_DEFAULT_PRIO
	.comm	_LPI_PROP_ENABLED,4,2           ## @LPI_PROP_ENABLED
	.comm	_LPI_PROP_GROUP1,4,2            ## @LPI_PROP_GROUP1
	.no_dead_strip	_its_vlpi_unmap
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function its_vlpi_unmap
_its_vlpi_unmap:                        ; @its_vlpi_unmap
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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
	mov	x20, x0
	bl	_irq_data_get_irq_chip_data
	mov	x19, x0
	mov	x0, x20
	bl	_its_get_event_id
	mov	x21, x0
	mov	x0, x19
	bl	_mutex_lock
	ldr	x8, [x19, #8]
	cbz	x8, LBB0_5
; %bb.1:
	mov	x0, x20
	bl	_irqd_is_forwarded_to_vcpu
	cbz	w0, LBB0_5
; %bb.2:
	mov	x0, x19
	mov	x1, x21
	bl	_its_send_discard
	mov	x0, x20
	bl	_irqd_clr_forwarded_to_vcpu
	ldr	w1, [x20]
	mov	x0, x19
	mov	x2, x21
	bl	_its_send_mapti
Lloh0:
	adrp	x8, _LPI_PROP_DEFAULT_PRIO@GOTPAGE
Lloh1:
	ldr	x8, [x8, _LPI_PROP_DEFAULT_PRIO@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
Lloh3:
	adrp	x9, _LPI_PROP_ENABLED@GOTPAGE
Lloh4:
	ldr	x9, [x9, _LPI_PROP_ENABLED@GOTPAGEOFF]
Lloh5:
	ldr	w9, [x9]
	orr	w8, w9, w8
Lloh6:
	adrp	x9, _LPI_PROP_GROUP1@GOTPAGE
Lloh7:
	ldr	x9, [x9, _LPI_PROP_GROUP1@GOTPAGEOFF]
Lloh8:
	ldr	w9, [x9]
	orr	w2, w8, w9
	mov	x0, x20
	mov	w1, #255
	bl	_lpi_update_config
	ldr	w0, [x19, #24]
	ldr	x1, [x19, #8]
	bl	_its_unmap_vm
	ldr	w8, [x19, #16]
	subs	w8, w8, #1
	str	w8, [x19, #16]
	b.ne	LBB0_4
; %bb.3:
	str	xzr, [x19, #8]
	ldr	w0, [x19, #4]
	bl	_kfree
LBB0_4:
	mov	w20, #0
	b	LBB0_6
LBB0_5:
Lloh9:
	adrp	x8, _EINVAL@GOTPAGE
Lloh10:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh11:
	ldr	w8, [x8]
	neg	w20, w8
LBB0_6:
	mov	x0, x19
	bl	_mutex_unlock
	mov	x0, x20
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.cfi_endproc
                                        ; -- End function
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_LPI_PROP_DEFAULT_PRIO,4,2      ; @LPI_PROP_DEFAULT_PRIO
	.comm	_LPI_PROP_ENABLED,4,2           ; @LPI_PROP_ENABLED
	.comm	_LPI_PROP_GROUP1,4,2            ; @LPI_PROP_GROUP1
	.no_dead_strip	_its_vlpi_unmap
.subsections_via_symbols
