	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_kvm_arch_vcpu_ioctl_get_sregs  ## -- Begin function kvm_arch_vcpu_ioctl_get_sregs
	.p2align	4, 0x90
_kvm_arch_vcpu_ioctl_get_sregs:         ## @kvm_arch_vcpu_ioctl_get_sregs
	.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	$16, %rsp
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %rbx
	movq	%rdi, %r14
	callq	_vcpu_load
	leaq	80(%rbx), %rsi
	movq	_VCPU_SREG_CS@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r14, %rdi
	callq	_kvm_get_segment
	leaq	76(%rbx), %rsi
	movq	_VCPU_SREG_DS@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r14, %rdi
	callq	_kvm_get_segment
	leaq	72(%rbx), %rsi
	movq	_VCPU_SREG_ES@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r14, %rdi
	callq	_kvm_get_segment
	leaq	68(%rbx), %rsi
	movq	_VCPU_SREG_FS@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r14, %rdi
	callq	_kvm_get_segment
	leaq	64(%rbx), %rsi
	movq	_VCPU_SREG_GS@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r14, %rdi
	callq	_kvm_get_segment
	leaq	60(%rbx), %rsi
	movq	_VCPU_SREG_SS@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r14, %rdi
	callq	_kvm_get_segment
	leaq	56(%rbx), %rsi
	movq	_VCPU_SREG_TR@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r14, %rdi
	callq	_kvm_get_segment
	leaq	52(%rbx), %rsi
	movq	_VCPU_SREG_LDTR@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r14, %rdi
	callq	_kvm_get_segment
	movq	_kvm_x86_ops@GOTPCREL(%rip), %r12
	movq	(%r12), %rax
	leaq	-40(%rbp), %r15
	movq	%r14, %rdi
	movq	%r15, %rsi
	callq	*8(%rax)
	movl	-36(%rbp), %eax
	movl	%eax, 48(%rbx)
	movl	-40(%rbp), %eax
	movl	%eax, 44(%rbx)
	movq	(%r12), %rax
	movq	%r14, %rdi
	movq	%r15, %rsi
	callq	*(%rax)
	movl	-36(%rbp), %eax
	movl	%eax, 40(%rbx)
	movl	-40(%rbp), %eax
	movl	%eax, 36(%rbx)
	movq	%r14, %rdi
	callq	_kvm_read_cr0
	movl	%eax, 32(%rbx)
	movl	24(%r14), %eax
	movl	%eax, 28(%rbx)
	movl	20(%r14), %eax
	movl	%eax, 24(%rbx)
	movq	%r14, %rdi
	callq	_kvm_read_cr4
	movl	%eax, 20(%rbx)
	movq	%r14, %rdi
	callq	_kvm_get_cr8
	movl	%eax, 16(%rbx)
	movl	16(%r14), %eax
	movl	%eax, 12(%rbx)
	movq	%r14, %rdi
	callq	_kvm_get_apic_base
	movl	%eax, 8(%rbx)
	movq	(%rbx), %rdi
	xorl	%esi, %esi
	movl	$8, %edx
	callq	_memset
	cmpq	$0, 8(%r14)
	je	LBB0_3
## %bb.1:
	cmpl	$0, 4(%r14)
	jne	LBB0_3
## %bb.2:
	movl	(%r14), %edi
	movq	(%rbx), %rsi
	callq	_set_bit
LBB0_3:
	movq	%r14, %rdi
	callq	_vcpu_put
	xorl	%eax, %eax
	addq	$16, %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_VCPU_SREG_CS,4,2               ## @VCPU_SREG_CS
	.comm	_VCPU_SREG_DS,4,2               ## @VCPU_SREG_DS
	.comm	_VCPU_SREG_ES,4,2               ## @VCPU_SREG_ES
	.comm	_VCPU_SREG_FS,4,2               ## @VCPU_SREG_FS
	.comm	_VCPU_SREG_GS,4,2               ## @VCPU_SREG_GS
	.comm	_VCPU_SREG_SS,4,2               ## @VCPU_SREG_SS
	.comm	_VCPU_SREG_TR,4,2               ## @VCPU_SREG_TR
	.comm	_VCPU_SREG_LDTR,4,2             ## @VCPU_SREG_LDTR
	.comm	_kvm_x86_ops,8,3                ## @kvm_x86_ops
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_kvm_arch_vcpu_ioctl_get_sregs  ; -- Begin function kvm_arch_vcpu_ioctl_get_sregs
	.p2align	2
_kvm_arch_vcpu_ioctl_get_sregs:         ; @kvm_arch_vcpu_ioctl_get_sregs
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.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
	mov	x20, x1
	mov	x19, x0
	bl	_vcpu_load
	add	x1, x20, #80
Lloh0:
	adrp	x8, _VCPU_SREG_CS@GOTPAGE
Lloh1:
	ldr	x8, [x8, _VCPU_SREG_CS@GOTPAGEOFF]
Lloh2:
	ldr	w2, [x8]
	mov	x0, x19
	bl	_kvm_get_segment
	add	x1, x20, #76
Lloh3:
	adrp	x8, _VCPU_SREG_DS@GOTPAGE
Lloh4:
	ldr	x8, [x8, _VCPU_SREG_DS@GOTPAGEOFF]
Lloh5:
	ldr	w2, [x8]
	mov	x0, x19
	bl	_kvm_get_segment
	add	x1, x20, #72
Lloh6:
	adrp	x8, _VCPU_SREG_ES@GOTPAGE
Lloh7:
	ldr	x8, [x8, _VCPU_SREG_ES@GOTPAGEOFF]
Lloh8:
	ldr	w2, [x8]
	mov	x0, x19
	bl	_kvm_get_segment
	add	x1, x20, #68
Lloh9:
	adrp	x8, _VCPU_SREG_FS@GOTPAGE
Lloh10:
	ldr	x8, [x8, _VCPU_SREG_FS@GOTPAGEOFF]
Lloh11:
	ldr	w2, [x8]
	mov	x0, x19
	bl	_kvm_get_segment
	add	x1, x20, #64
Lloh12:
	adrp	x8, _VCPU_SREG_GS@GOTPAGE
Lloh13:
	ldr	x8, [x8, _VCPU_SREG_GS@GOTPAGEOFF]
Lloh14:
	ldr	w2, [x8]
	mov	x0, x19
	bl	_kvm_get_segment
	add	x1, x20, #60
Lloh15:
	adrp	x8, _VCPU_SREG_SS@GOTPAGE
Lloh16:
	ldr	x8, [x8, _VCPU_SREG_SS@GOTPAGEOFF]
Lloh17:
	ldr	w2, [x8]
	mov	x0, x19
	bl	_kvm_get_segment
	add	x1, x20, #56
Lloh18:
	adrp	x8, _VCPU_SREG_TR@GOTPAGE
Lloh19:
	ldr	x8, [x8, _VCPU_SREG_TR@GOTPAGEOFF]
Lloh20:
	ldr	w2, [x8]
	mov	x0, x19
	bl	_kvm_get_segment
	add	x1, x20, #52
Lloh21:
	adrp	x8, _VCPU_SREG_LDTR@GOTPAGE
Lloh22:
	ldr	x8, [x8, _VCPU_SREG_LDTR@GOTPAGEOFF]
Lloh23:
	ldr	w2, [x8]
	mov	x0, x19
	bl	_kvm_get_segment
Lloh24:
	adrp	x21, _kvm_x86_ops@GOTPAGE
Lloh25:
	ldr	x21, [x21, _kvm_x86_ops@GOTPAGEOFF]
	ldr	x8, [x21]
	ldr	x8, [x8, #8]
	add	x1, sp, #8
	mov	x0, x19
	blr	x8
	ldr	d0, [sp, #8]
	stur	d0, [x20, #44]
	ldr	x8, [x21]
	ldr	x8, [x8]
	add	x1, sp, #8
	mov	x0, x19
	blr	x8
	ldr	d0, [sp, #8]
	stur	d0, [x20, #36]
	mov	x0, x19
	bl	_kvm_read_cr0
	str	w0, [x20, #32]
	ldur	d0, [x19, #20]
	str	d0, [x20, #24]
	mov	x0, x19
	bl	_kvm_read_cr4
	str	w0, [x20, #20]
	mov	x0, x19
	bl	_kvm_get_cr8
	ldr	w8, [x19, #16]
	stp	w8, w0, [x20, #12]
	mov	x0, x19
	bl	_kvm_get_apic_base
	str	w0, [x20, #8]
	ldr	x0, [x20]
	mov	w1, #0
	mov	w2, #8
	bl	_memset
	ldr	x8, [x19, #8]
	cbz	x8, LBB0_3
; %bb.1:
	ldr	w8, [x19, #4]
	cbnz	w8, LBB0_3
; %bb.2:
	ldr	w0, [x19]
	ldr	x1, [x20]
	bl	_set_bit
LBB0_3:
	mov	x0, x19
	bl	_vcpu_put
	mov	w0, #0
	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
	add	sp, sp, #64
	ret
	.loh AdrpLdrGot	Lloh24, Lloh25
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_VCPU_SREG_CS,4,2               ; @VCPU_SREG_CS
	.comm	_VCPU_SREG_DS,4,2               ; @VCPU_SREG_DS
	.comm	_VCPU_SREG_ES,4,2               ; @VCPU_SREG_ES
	.comm	_VCPU_SREG_FS,4,2               ; @VCPU_SREG_FS
	.comm	_VCPU_SREG_GS,4,2               ; @VCPU_SREG_GS
	.comm	_VCPU_SREG_SS,4,2               ; @VCPU_SREG_SS
	.comm	_VCPU_SREG_TR,4,2               ; @VCPU_SREG_TR
	.comm	_VCPU_SREG_LDTR,4,2             ; @VCPU_SREG_LDTR
	.comm	_kvm_x86_ops,8,3                ; @kvm_x86_ops
.subsections_via_symbols
