	.file	"extr_vmi_32.c_vmi_set_ldt.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.type	vmi_set_ldt, @function
vmi_set_ldt:
.LFB0:
	.cfi_startproc
	endbr64
	push	r14
	.cfi_def_cfa_offset 16
	.cfi_offset 14, -16
	push	r13
	.cfi_def_cfa_offset 24
	.cfi_offset 13, -24
	push	r12
	.cfi_def_cfa_offset 32
	.cfi_offset 12, -32
	mov	r12, rdi
	push	rbp
	.cfi_def_cfa_offset 40
	.cfi_offset 6, -40
	push	rbx
	.cfi_def_cfa_offset 48
	.cfi_offset 3, -48
	mov	ebx, esi
	sub	rsp, 16
	.cfi_def_cfa_offset 64
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR 8[rsp], rax
	xor	eax, eax
	lea	r13, 4[rsp]
	call	smp_processor_id@PLT
	mov	rsi, r12
	xor	r8d, r8d
	mov	rdi, r13
	mov	ecx, DWORD PTR DESC_LDT[rip]
	lea	edx, -1[0+rbx*4]
	mov	ebp, eax
	call	pack_descriptor@PLT
	mov	r14d, DWORD PTR DESC_LDT[rip]
	mov	r12d, DWORD PTR GDT_ENTRY_LDT[rip]
	mov	edi, ebp
	call	get_cpu_gdt_table@PLT
	mov	rdx, r13
	mov	edi, eax
	mov	ecx, r14d
	mov	esi, r12d
	call	write_gdt_entry@PLT
	mov	rax, QWORD PTR vmi_ops[rip]
	xor	edi, edi
	test	ebx, ebx
	je	.L2
	mov	ecx, DWORD PTR GDT_ENTRY_LDT[rip]
	lea	edi, 0[0+rcx*4]
.L2:
	call	rax
	mov	rax, QWORD PTR 8[rsp]
	xor	rax, QWORD PTR fs:40
	jne	.L9
	add	rsp, 16
	.cfi_remember_state
	.cfi_def_cfa_offset 48
	pop	rbx
	.cfi_def_cfa_offset 40
	pop	rbp
	.cfi_def_cfa_offset 32
	pop	r12
	.cfi_def_cfa_offset 24
	pop	r13
	.cfi_def_cfa_offset 16
	pop	r14
	.cfi_def_cfa_offset 8
	ret
.L9:
	.cfi_restore_state
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE0:
	.size	vmi_set_ldt, .-vmi_set_ldt
	.comm	vmi_ops,8,8
	.comm	GDT_ENTRY_LDT,4,4
	.comm	DESC_LDT,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",@progbits
	.section	.note.gnu.property,"a"
	.align 8
	.long	 1f - 0f
	.long	 4f - 1f
	.long	 5
0:
	.string	 "GNU"
1:
	.align 8
	.long	 0xc0000002
	.long	 3f - 2f
2:
	.long	 0x3
3:
	.align 8
4:

	.arch armv5t
	.eabi_attribute 20, 1
	.eabi_attribute 21, 1
	.eabi_attribute 23, 3
	.eabi_attribute 24, 1
	.eabi_attribute 25, 1
	.eabi_attribute 26, 2
	.eabi_attribute 30, 2
	.eabi_attribute 34, 0
	.eabi_attribute 18, 4
	.file	"extr_vmi_32.c_vmi_set_ldt.c"
	.text
	.section	.rodata.cst4,"aM",%progbits,4
	.align	2
.LC0:
	.word	__stack_chk_guard
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	vmi_set_ldt, %function
vmi_set_ldt:
	@ args = 0, pretend = 0, frame = 8
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, lr}
	ldr	r3, .L8
	sub	sp, sp, #20
	mov	r4, r1
	mov	r5, r0
	ldr	r3, [r3]
	str	r3, [sp, #12]
	mov	r3,#0
	bl	smp_processor_id
	mov	r3, #0
	mov	r1, r5
	mov	r5, r0
	ldr	r6, .L8+4
	lsl	r2, r4, #2
	sub	r2, r2, #1
	ldr	r7, .L8+8
	str	r3, [sp]
	add	r0, sp, #8
	ldr	r3, [r6]
	bl	pack_descriptor
	mov	r0, r5
	bl	get_cpu_gdt_table
	add	r2, sp, #8
	ldr	r3, [r6]
	ldr	r1, [r7]
	bl	write_gdt_entry
	cmp	r4, #0
	ldrne	r0, [r7]
	ldr	r3, .L8+12
	moveq	r0, r4
	ldr	r3, [r3]
	lslne	r0, r0, #2
	blx	r3
	ldr	r3, .L8
	ldr	r2, [r3]
	ldr	r3, [sp, #12]
	eors	r2, r3, r2
	mov	r3, #0
	bne	.L7
	add	sp, sp, #20
	@ sp needed
	pop	{r4, r5, r6, r7, pc}
.L7:
	bl	__stack_chk_fail
.L9:
	.align	2
.L8:
	.word	.LC0
	.word	DESC_LDT
	.word	GDT_ENTRY_LDT
	.word	vmi_ops
	.size	vmi_set_ldt, .-vmi_set_ldt
	.comm	vmi_ops,4,4
	.comm	GDT_ENTRY_LDT,4,4
	.comm	DESC_LDT,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
