	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_load_guest_idt_entry           ## -- Begin function load_guest_idt_entry
	.p2align	4, 0x90
_load_guest_idt_entry:                  ## @load_guest_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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%ecx, %r14d
	movl	%edx, %r15d
	movl	%esi, %ebx
	movq	%rdi, %r12
	cmpl	$15, %esi
	ja	LBB0_2
## %bb.1:
	movl	$33028, %eax                    ## imm = 0x8104
	btl	%ebx, %eax
	jae	LBB0_2
LBB0_5:
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_2:
	movq	_LGUEST_TRAP_ENTRY@GOTPCREL(%rip), %rax
	cmpl	%ebx, (%rax)
	je	LBB0_5
## %bb.3:
	movq	_CHANGED_IDT@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	orl	%eax, 8(%r12)
	movq	(%r12), %rdi
	callq	_ARRAY_SIZE
	cmpl	%ebx, %eax
	jbe	LBB0_6
## %bb.4:
	movl	%ebx, %esi
	shlq	$2, %rsi
	addq	(%r12), %rsi
	movq	%r12, %rdi
	movl	%ebx, %edx
	movl	%r15d, %ecx
	movl	%r14d, %r8d
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_set_trap                       ## TAILCALL
LBB0_6:
	leaq	L_.str(%rip), %rsi
	movq	%r12, %rdi
	movl	%ebx, %edx
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_kill_guest                     ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_LGUEST_TRAP_ENTRY,4,2          ## @LGUEST_TRAP_ENTRY
	.comm	_CHANGED_IDT,4,2                ## @CHANGED_IDT
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Setting idt entry %u"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_load_guest_idt_entry           ; -- Begin function load_guest_idt_entry
	.p2align	2
_load_guest_idt_entry:                  ; @load_guest_idt_entry
	.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, x3
	mov	x21, x2
	mov	x19, x1
	mov	x22, x0
	cmp	w1, #15
	b.hi	LBB0_3
; %bb.1:
	mov	w8, #1
	lsl	w8, w8, w19
	mov	w9, #33028
	tst	w8, w9
	b.eq	LBB0_3
LBB0_2:
	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
LBB0_3:
Lloh0:
	adrp	x8, _LGUEST_TRAP_ENTRY@GOTPAGE
Lloh1:
	ldr	x8, [x8, _LGUEST_TRAP_ENTRY@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	cmp	w8, w19
	b.eq	LBB0_2
; %bb.4:
Lloh3:
	adrp	x8, _CHANGED_IDT@GOTPAGE
Lloh4:
	ldr	x8, [x8, _CHANGED_IDT@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	ldr	w9, [x22, #8]
	orr	w8, w9, w8
	str	w8, [x22, #8]
	ldr	x0, [x22]
	bl	_ARRAY_SIZE
	cmp	w0, w19
	b.ls	LBB0_6
; %bb.5:
	ldr	x8, [x22]
	add	x1, x8, w19, uxtw #2
	mov	x0, x22
	mov	x2, x19
	mov	x3, x21
	mov	x4, 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
	b	_set_trap
LBB0_6:
Lloh6:
	adrp	x1, l_.str@PAGE
Lloh7:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x22
	mov	x2, x19
	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
	b	_kill_guest
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpAdd	Lloh6, Lloh7
	.cfi_endproc
                                        ; -- End function
	.comm	_LGUEST_TRAP_ENTRY,4,2          ; @LGUEST_TRAP_ENTRY
	.comm	_CHANGED_IDT,4,2                ; @CHANGED_IDT
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Setting idt entry %u"

.subsections_via_symbols
