	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function emulate_syscall
_emulate_syscall:                       ## @emulate_syscall
	.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
	subq	$64, %rsp
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	(%rdi), %rax
	movq	_X86EMUL_MODE_REAL@GOTPCREL(%rip), %rcx
	movq	_X86EMUL_UNHANDLEABLE@GOTPCREL(%rip), %rbx
	cmpq	(%rcx), %rax
	je	LBB0_9
## %bb.1:
	movq	_X86EMUL_MODE_VM86@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	je	LBB0_9
## %bb.2:
	movq	%rdi, %r12
	callq	_em_syscall_is_enabled
	testl	%eax, %eax
	je	LBB0_3
## %bb.4:
	leaq	-64(%rbp), %rsi
	leaq	-88(%rbp), %rdx
	movq	%r12, %rdi
	callq	_setup_syscalls_segments
	movq	_kvm_x86_ops@GOTPCREL(%rip), %r14
	movq	(%r14), %rax
	movl	12(%r12), %edi
	movq	_MSR_EFER@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	leaq	-40(%rbp), %rdx
	callq	*(%rax)
	movq	_EFER_SCE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, -40(%rbp)
	je	LBB0_3
## %bb.5:
	movq	(%r14), %rax
	movl	12(%r12), %edi
	movq	_MSR_STAR@GOTPCREL(%rip), %r15
	movl	(%r15), %esi
	leaq	-36(%rbp), %rdx
	callq	*(%rax)
	movslq	-36(%rbp), %rax
	addq	$8, %rax
	movq	%rax, -72(%rbp)
	movl	12(%r12), %edi
	callq	_is_long_mode
	testq	%rax, %rax
	je	LBB0_7
## %bb.6:
	movq	$0, -56(%rbp)
	movl	$1, -64(%rbp)
LBB0_7:
	movq	(%r14), %rax
	movl	12(%r12), %edi
	movq	_VCPU_SREG_CS@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edx
	leaq	-64(%rbp), %rsi
	callq	*8(%rax)
	movq	(%r14), %rax
	movl	12(%r12), %edi
	movq	_VCPU_SREG_SS@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edx
	leaq	-88(%rbp), %rsi
	callq	*8(%rax)
	movl	24(%r12), %eax
	movq	16(%r12), %rcx
	movq	_VCPU_REGS_RCX@GOTPCREL(%rip), %rdx
	movq	(%rdx), %rdx
	movl	%eax, (%rcx,%rdx,4)
	movl	12(%r12), %edi
	callq	_is_long_mode
	movq	_X86EMUL_CONTINUE@GOTPCREL(%rip), %rbx
	testq	%rax, %rax
	jne	LBB0_9
## %bb.8:
	movq	(%r14), %rax
	movl	12(%r12), %edi
	movl	(%r15), %esi
	leaq	-36(%rbp), %rdx
	callq	*(%rax)
	movl	-36(%rbp), %eax
	movl	%eax, 24(%r12)
	movq	_EFLG_VM@GOTPCREL(%rip), %rax
	movq	_EFLG_IF@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	orl	(%rax), %ecx
	movq	_EFLG_RF@GOTPCREL(%rip), %rax
	orl	(%rax), %ecx
	notl	%ecx
	andl	%ecx, 8(%r12)
	jmp	LBB0_9
LBB0_3:
	movl	12(%r12), %edi
	movq	_UD_VECTOR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_kvm_queue_exception
	movq	_X86EMUL_PROPAGATE_FAULT@GOTPCREL(%rip), %rbx
LBB0_9:
	movl	(%rbx), %eax
	addq	$64, %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_X86EMUL_MODE_REAL,8,3          ## @X86EMUL_MODE_REAL
	.comm	_X86EMUL_MODE_VM86,8,3          ## @X86EMUL_MODE_VM86
	.comm	_X86EMUL_UNHANDLEABLE,4,2       ## @X86EMUL_UNHANDLEABLE
	.comm	_UD_VECTOR,4,2                  ## @UD_VECTOR
	.comm	_X86EMUL_PROPAGATE_FAULT,4,2    ## @X86EMUL_PROPAGATE_FAULT
	.comm	_kvm_x86_ops,8,3                ## @kvm_x86_ops
	.comm	_MSR_EFER,4,2                   ## @MSR_EFER
	.comm	_EFER_SCE,4,2                   ## @EFER_SCE
	.comm	_MSR_STAR,4,2                   ## @MSR_STAR
	.comm	_VCPU_SREG_CS,4,2               ## @VCPU_SREG_CS
	.comm	_VCPU_SREG_SS,4,2               ## @VCPU_SREG_SS
	.comm	_VCPU_REGS_RCX,8,3              ## @VCPU_REGS_RCX
	.comm	_EFLG_VM,4,2                    ## @EFLG_VM
	.comm	_EFLG_IF,4,2                    ## @EFLG_IF
	.comm	_EFLG_RF,4,2                    ## @EFLG_RF
	.comm	_X86EMUL_CONTINUE,4,2           ## @X86EMUL_CONTINUE
	.comm	_MSR_CSTAR,4,2                  ## @MSR_CSTAR
	.comm	_MSR_LSTAR,4,2                  ## @MSR_LSTAR
	.comm	_MSR_SYSCALL_MASK,4,2           ## @MSR_SYSCALL_MASK
	.comm	_VCPU_REGS_R11,8,3              ## @VCPU_REGS_R11
	.comm	_X86EMUL_MODE_PROT64,8,3        ## @X86EMUL_MODE_PROT64
	.no_dead_strip	_emulate_syscall
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function emulate_syscall
_emulate_syscall:                       ; @emulate_syscall
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	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
	ldr	x8, [x0]
Lloh0:
	adrp	x9, _X86EMUL_MODE_REAL@GOTPAGE
Lloh1:
	ldr	x9, [x9, _X86EMUL_MODE_REAL@GOTPAGEOFF]
Lloh2:
	ldr	x9, [x9]
Lloh3:
	adrp	x10, _X86EMUL_MODE_VM86@GOTPAGE
Lloh4:
	ldr	x10, [x10, _X86EMUL_MODE_VM86@GOTPAGEOFF]
Lloh5:
	ldr	x10, [x10]
	cmp	x8, x9
	ccmp	x8, x10, #4, ne
	b.ne	LBB0_2
; %bb.1:
Lloh6:
	adrp	x8, _X86EMUL_UNHANDLEABLE@GOTPAGE
Lloh7:
	ldr	x8, [x8, _X86EMUL_UNHANDLEABLE@GOTPAGEOFF]
	b	LBB0_10
LBB0_2:
	mov	x19, x0
	bl	_em_syscall_is_enabled
	cbz	w0, LBB0_9
; %bb.3:
	add	x1, sp, #40
	add	x2, sp, #16
	mov	x0, x19
	bl	_setup_syscalls_segments
Lloh8:
	adrp	x20, _kvm_x86_ops@GOTPAGE
Lloh9:
	ldr	x20, [x20, _kvm_x86_ops@GOTPAGEOFF]
	ldr	x8, [x20]
	ldr	x8, [x8]
	ldr	w0, [x19, #12]
Lloh10:
	adrp	x9, _MSR_EFER@GOTPAGE
Lloh11:
	ldr	x9, [x9, _MSR_EFER@GOTPAGEOFF]
Lloh12:
	ldr	w1, [x9]
	add	x2, sp, #8
	blr	x8
	ldr	w8, [sp, #8]
Lloh13:
	adrp	x9, _EFER_SCE@GOTPAGE
Lloh14:
	ldr	x9, [x9, _EFER_SCE@GOTPAGEOFF]
Lloh15:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_9
; %bb.4:
	ldr	x8, [x20]
	ldr	x8, [x8]
	ldr	w0, [x19, #12]
Lloh16:
	adrp	x21, _MSR_STAR@GOTPAGE
Lloh17:
	ldr	x21, [x21, _MSR_STAR@GOTPAGEOFF]
	ldr	w1, [x21]
	add	x2, sp, #12
	blr	x8
	ldrsw	x8, [sp, #12]
	add	x8, x8, #8
	str	x8, [sp, #32]
	ldr	w0, [x19, #12]
	bl	_is_long_mode
	cbz	x0, LBB0_6
; %bb.5:
	str	xzr, [sp, #48]
	mov	w8, #1
	str	w8, [sp, #40]
LBB0_6:
	ldr	x8, [x20]
	ldr	x8, [x8, #8]
	ldr	w0, [x19, #12]
Lloh18:
	adrp	x9, _VCPU_SREG_CS@GOTPAGE
Lloh19:
	ldr	x9, [x9, _VCPU_SREG_CS@GOTPAGEOFF]
Lloh20:
	ldr	w2, [x9]
	add	x1, sp, #40
	blr	x8
	ldr	x8, [x20]
	ldr	x8, [x8, #8]
	ldr	w0, [x19, #12]
Lloh21:
	adrp	x9, _VCPU_SREG_SS@GOTPAGE
Lloh22:
	ldr	x9, [x9, _VCPU_SREG_SS@GOTPAGEOFF]
Lloh23:
	ldr	w2, [x9]
	add	x1, sp, #16
	blr	x8
	ldr	w8, [x19, #24]
	ldr	x9, [x19, #16]
Lloh24:
	adrp	x10, _VCPU_REGS_RCX@GOTPAGE
Lloh25:
	ldr	x10, [x10, _VCPU_REGS_RCX@GOTPAGEOFF]
Lloh26:
	ldr	x10, [x10]
	str	w8, [x9, x10, lsl #2]
	ldr	w0, [x19, #12]
	bl	_is_long_mode
	cbnz	x0, LBB0_8
; %bb.7:
	ldr	x8, [x20]
	ldr	x8, [x8]
	ldr	w0, [x19, #12]
	ldr	w1, [x21]
	add	x2, sp, #12
	blr	x8
	ldr	w8, [sp, #12]
	str	w8, [x19, #24]
Lloh27:
	adrp	x8, _EFLG_VM@GOTPAGE
Lloh28:
	ldr	x8, [x8, _EFLG_VM@GOTPAGEOFF]
Lloh29:
	adrp	x9, _EFLG_IF@GOTPAGE
Lloh30:
	ldr	x9, [x9, _EFLG_IF@GOTPAGEOFF]
Lloh31:
	ldr	w8, [x8]
Lloh32:
	ldr	w9, [x9]
	orr	w8, w9, w8
Lloh33:
	adrp	x9, _EFLG_RF@GOTPAGE
Lloh34:
	ldr	x9, [x9, _EFLG_RF@GOTPAGEOFF]
Lloh35:
	ldr	w9, [x9]
	orr	w8, w8, w9
	ldr	w9, [x19, #8]
	bic	w8, w9, w8
	str	w8, [x19, #8]
LBB0_8:
Lloh36:
	adrp	x8, _X86EMUL_CONTINUE@GOTPAGE
Lloh37:
	ldr	x8, [x8, _X86EMUL_CONTINUE@GOTPAGEOFF]
	b	LBB0_10
LBB0_9:
	ldr	w0, [x19, #12]
Lloh38:
	adrp	x8, _UD_VECTOR@GOTPAGE
Lloh39:
	ldr	x8, [x8, _UD_VECTOR@GOTPAGEOFF]
Lloh40:
	ldr	w1, [x8]
	bl	_kvm_queue_exception
Lloh41:
	adrp	x8, _X86EMUL_PROPAGATE_FAULT@GOTPAGE
Lloh42:
	ldr	x8, [x8, _X86EMUL_PROPAGATE_FAULT@GOTPAGEOFF]
LBB0_10:
	ldr	w0, [x8]
	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
	add	sp, sp, #112
	ret
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh24, Lloh25, Lloh26
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh33, Lloh34, Lloh35
	.loh AdrpLdrGotLdr	Lloh29, Lloh30, Lloh32
	.loh AdrpLdrGotLdr	Lloh27, Lloh28, Lloh31
	.loh AdrpLdrGot	Lloh36, Lloh37
	.loh AdrpLdrGot	Lloh41, Lloh42
	.loh AdrpLdrGotLdr	Lloh38, Lloh39, Lloh40
	.cfi_endproc
                                        ; -- End function
	.comm	_X86EMUL_MODE_REAL,8,3          ; @X86EMUL_MODE_REAL
	.comm	_X86EMUL_MODE_VM86,8,3          ; @X86EMUL_MODE_VM86
	.comm	_X86EMUL_UNHANDLEABLE,4,2       ; @X86EMUL_UNHANDLEABLE
	.comm	_UD_VECTOR,4,2                  ; @UD_VECTOR
	.comm	_X86EMUL_PROPAGATE_FAULT,4,2    ; @X86EMUL_PROPAGATE_FAULT
	.comm	_kvm_x86_ops,8,3                ; @kvm_x86_ops
	.comm	_MSR_EFER,4,2                   ; @MSR_EFER
	.comm	_EFER_SCE,4,2                   ; @EFER_SCE
	.comm	_MSR_STAR,4,2                   ; @MSR_STAR
	.comm	_VCPU_SREG_CS,4,2               ; @VCPU_SREG_CS
	.comm	_VCPU_SREG_SS,4,2               ; @VCPU_SREG_SS
	.comm	_VCPU_REGS_RCX,8,3              ; @VCPU_REGS_RCX
	.comm	_EFLG_VM,4,2                    ; @EFLG_VM
	.comm	_EFLG_IF,4,2                    ; @EFLG_IF
	.comm	_EFLG_RF,4,2                    ; @EFLG_RF
	.comm	_X86EMUL_CONTINUE,4,2           ; @X86EMUL_CONTINUE
	.comm	_MSR_CSTAR,4,2                  ; @MSR_CSTAR
	.comm	_MSR_LSTAR,4,2                  ; @MSR_LSTAR
	.comm	_MSR_SYSCALL_MASK,4,2           ; @MSR_SYSCALL_MASK
	.comm	_VCPU_REGS_R11,8,3              ; @VCPU_REGS_R11
	.comm	_X86EMUL_MODE_PROT64,8,3        ; @X86EMUL_MODE_PROT64
	.no_dead_strip	_emulate_syscall
.subsections_via_symbols
