	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function xen_write_idt_entry
_xen_write_idt_entry:                   ## @xen_write_idt_entry
	.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	$40, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdx, -80(%rbp)                 ## 8-byte Spill
	movq	%rdi, %rbx
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	movl	%esi, -68(%rbp)                 ## 4-byte Spill
	movslq	%esi, %r14
	leaq	(%rdi,%r14,4), %r15
	xorl	%eax, %eax
	callq	_preempt_disable
	movq	_idt_desc@GOTPCREL(%rip), %r13
	movl	(%r13), %edi
	callq	___get_cpu_var
	movq	%rax, %r12
	movl	(%r13), %edi
	callq	___get_cpu_var
	movq	%rdx, %r13
	xorl	%eax, %eax
	callq	_xen_mc_flush
	movq	%rbx, %rdi
	movq	-80(%rbp), %rbx                 ## 8-byte Reload
	movl	%r14d, %esi
	movq	%rbx, %rdx
	callq	_native_write_idt_entry
	cmpq	%r15, %r12
	ja	LBB0_5
## %bb.1:
	leaq	(%r12,%r13), %rax
	incq	%rax
	addq	$8, %r15
	cmpq	%rax, %r15
	ja	LBB0_5
## %bb.2:
	movq	$0, -56(%rbp)
	leaq	-64(%rbp), %rdx
	movl	-68(%rbp), %edi                 ## 4-byte Reload
	movq	%rbx, %rsi
	callq	_cvt_gate_to_trap
	testq	%rax, %rax
	je	LBB0_5
## %bb.3:
	leaq	-64(%rbp), %rdi
	callq	_HYPERVISOR_set_trap_table
	testq	%rax, %rax
	je	LBB0_5
## %bb.4:
	xorl	%eax, %eax
	callq	_BUG
LBB0_5:
	xorl	%eax, %eax
	callq	_preempt_enable
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-48(%rbp), %rax
	jne	LBB0_7
## %bb.6:
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_7:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_idt_desc,4,2                   ## @idt_desc
	.no_dead_strip	_xen_write_idt_entry
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function xen_write_idt_entry
_xen_write_idt_entry:                   ; @xen_write_idt_entry
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #96
	.cfi_def_cfa_offset 96
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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	x19, x2
	mov	x20, x1
	mov	x21, x0
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	str	x8, [sp, #24]
	add	x24, x0, w1, sxtw #2
	bl	_preempt_disable
Lloh3:
	adrp	x23, _idt_desc@GOTPAGE
Lloh4:
	ldr	x23, [x23, _idt_desc@GOTPAGEOFF]
	ldr	w0, [x23]
	bl	___get_cpu_var
	mov	x22, x0
	ldr	w0, [x23]
	bl	___get_cpu_var
	mov	x23, x1
	bl	_xen_mc_flush
	mov	x0, x21
	mov	x1, x20
	mov	x2, x19
	bl	_native_write_idt_entry
	cmp	x22, x24
	add	x8, x22, x23
	add	x8, x8, #1
	add	x9, x24, #8
	ccmp	x9, x8, #2, ls
	b.ls	LBB0_3
LBB0_1:
	bl	_preempt_enable
	ldr	x8, [sp, #24]
Lloh5:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh6:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh7:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_6
; %bb.2:
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #96
	ret
LBB0_3:
	str	xzr, [sp, #16]
	add	x2, sp, #8
	mov	x0, x20
	mov	x1, x19
	bl	_cvt_gate_to_trap
	cbz	x0, LBB0_1
; %bb.4:
	add	x0, sp, #8
	bl	_HYPERVISOR_set_trap_table
	cbz	x0, LBB0_1
; %bb.5:
	bl	_BUG
	b	LBB0_1
LBB0_6:
	bl	___stack_chk_fail
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.cfi_endproc
                                        ; -- End function
	.comm	_idt_desc,4,2                   ; @idt_desc
	.no_dead_strip	_xen_write_idt_entry
.subsections_via_symbols
