	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function modify_irte
_modify_irte:                           ## @modify_irte
	.cfi_startproc
## %bb.0:
	testq	%rdi, %rdi
	je	LBB0_5
## %bb.1:
	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	%rdi, %rbx
	movq	_irq_2_ir_lock@GOTPCREL(%rip), %rdi
	movq	%rsi, %r15
	callq	_raw_spin_lock_irqsave
	movq	16(%rbx), %rcx
	movslq	(%rbx), %rax
	movq	%rbx, -56(%rbp)                 ## 8-byte Spill
	movslq	4(%rbx), %r12
	addq	%rax, %r12
	movq	(%rcx), %rax
	movq	%rcx, %rbx
	movq	(%rax), %r14
	leaq	(%r12,%r12,2), %r13
	leaq	(%r14,%r13,4), %rax
	movq	%rax, -48(%rbp)                 ## 8-byte Spill
	leaq	(%r14,%r13,4), %rdi
	addq	$8, %rdi
	movl	8(%r15), %esi
	callq	_set_64bit
	leaq	(%r14,%r13,4), %rdi
	addq	$4, %rdi
	movl	4(%r15), %esi
	callq	_set_64bit
	movq	%rbx, %rdi
	movq	-48(%rbp), %rsi                 ## 8-byte Reload
	movl	$12, %edx
	callq	___iommu_flush_cache
	movq	%rbx, %rdi
	movl	%r12d, %esi
	xorl	%edx, %edx
	callq	_qi_flush_iec
	movl	%eax, %ebx
	cmpl	$0, (%r14,%r13,4)
	jne	LBB0_2
## %bb.3:
	movq	_IRQ_REMAPPING@GOTPCREL(%rip), %rax
	jmp	LBB0_4
LBB0_5:
	movl	$-1, %eax
	retq
LBB0_2:
	movq	_IRQ_POSTING@GOTPCREL(%rip), %rax
LBB0_4:
	movl	(%rax), %eax
	movq	-56(%rbp), %rcx                 ## 8-byte Reload
	movl	%eax, 8(%rcx)
	movq	_irq_2_ir_lock@GOTPCREL(%rip), %rdi
	callq	_raw_spin_unlock_irqrestore
	movl	%ebx, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_irq_2_ir_lock,4,2              ## @irq_2_ir_lock
	.comm	_IRQ_POSTING,4,2                ## @IRQ_POSTING
	.comm	_IRQ_REMAPPING,4,2              ## @IRQ_REMAPPING
	.no_dead_strip	_modify_irte
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function modify_irte
_modify_irte:                           ; @modify_irte
	.cfi_startproc
; %bb.0:
	cbz	x0, LBB0_2
; %bb.1:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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	x20, x1
	mov	x19, x0
Lloh0:
	adrp	x21, _irq_2_ir_lock@GOTPAGE
Lloh1:
	ldr	x21, [x21, _irq_2_ir_lock@GOTPAGEOFF]
	mov	x0, x21
	bl	_raw_spin_lock_irqsave
	ldr	x22, [x19, #16]
	ldp	w8, w9, [x19]
	add	w23, w9, w8
	ldr	x8, [x22]
	ldr	x8, [x8]
	mov	w9, #12
	smaddl	x24, w23, w9, x8
	add	x0, x24, #8
	ldr	w1, [x20, #8]
	bl	_set_64bit
	add	x0, x24, #4
	ldr	w1, [x20, #4]
	bl	_set_64bit
	mov	x0, x22
	mov	x1, x24
	mov	w2, #12
	bl	___iommu_flush_cache
	mov	x0, x22
	mov	x1, x23
	mov	w2, #0
	bl	_qi_flush_iec
	mov	x20, x0
	ldr	w8, [x24]
Lloh2:
	adrp	x9, _IRQ_POSTING@GOTPAGE
Lloh3:
	ldr	x9, [x9, _IRQ_POSTING@GOTPAGEOFF]
Lloh4:
	adrp	x10, _IRQ_REMAPPING@GOTPAGE
Lloh5:
	ldr	x10, [x10, _IRQ_REMAPPING@GOTPAGEOFF]
	cmp	w8, #0
	csel	x8, x10, x9, eq
	ldr	w8, [x8]
	str	w8, [x19, #8]
	mov	x0, x21
	bl	_raw_spin_unlock_irqrestore
	mov	x0, x20
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
LBB0_2:
	.cfi_def_cfa wsp, 0
	.cfi_same_value w30
	.cfi_same_value w29
	.cfi_same_value w19
	.cfi_same_value w20
	.cfi_same_value w21
	.cfi_same_value w22
	.cfi_same_value w23
	.cfi_same_value w24
	mov	w0, #-1
	ret
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.cfi_endproc
                                        ; -- End function
	.comm	_irq_2_ir_lock,4,2              ; @irq_2_ir_lock
	.comm	_IRQ_POSTING,4,2                ; @IRQ_POSTING
	.comm	_IRQ_REMAPPING,4,2              ; @IRQ_REMAPPING
	.no_dead_strip	_modify_irte
.subsections_via_symbols
