	.file	"extr_ldt_gdt.c_install_valid_mode.c"
	.intel_syntax noprefix
	.text
	.section	.rodata.str1.8,"aMS",@progbits,1
	.align 8
.LC0:
	.string	"[OK]\tmodify_ldt returned -ENOSYS"
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC1:
	.string	"modify_ldt"
	.section	.rodata.str1.8
	.align 8
.LC2:
	.string	"[FAIL]\tUnexpected %s failure %d\n"
	.align 8
.LC3:
	.string	"[OK]\t%s rejected 16 bit segment\n"
	.text
	.p2align 4
	.type	install_valid_mode, @function
install_valid_mode:
.LFB0:
	.cfi_startproc
	endbr64
	push	r12
	.cfi_def_cfa_offset 16
	.cfi_offset 12, -16
	push	rbp
	.cfi_def_cfa_offset 24
	.cfi_offset 6, -24
	sub	rsp, 56
	.cfi_def_cfa_offset 80
	movdqu	xmm0, XMMWORD PTR [rdi]
	movdqu	xmm1, XMMWORD PTR 16[rdi]
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR 40[rsp], rax
	xor	eax, eax
	movaps	XMMWORD PTR [rsp], xmm0
	movaps	XMMWORD PTR 16[rsp], xmm1
	test	ecx, ecx
	je	.L1
	cmp	edx, 1
	mov	r12d, esi
	mov	edi, DWORD PTR SYS_modify_ldt[rip]
	mov	ebp, ecx
	sbb	esi, esi
	mov	rdx, rsp
	mov	ecx, 32
	and	esi, 16
	add	esi, 1
	call	syscall@PLT
	cmp	eax, -1
	jl	.L16
	test	eax, eax
	jne	.L17
	cmp	QWORD PTR 24[rsp], 0
	mov	ecx, DWORD PTR [rsp]
	je	.L8
	sal	ecx, 12
	add	ecx, 4095
.L8:
	mov	rdi, QWORD PTR 16[rsp]
	mov	r8d, 1
	mov	edx, r12d
	mov	esi, ebp
	call	check_valid_segment@PLT
	mov	eax, 1
.L1:
	mov	rcx, QWORD PTR 40[rsp]
	xor	rcx, QWORD PTR fs:40
	jne	.L18
	add	rsp, 56
	.cfi_remember_state
	.cfi_def_cfa_offset 24
	pop	rbp
	.cfi_def_cfa_offset 16
	pop	r12
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L16:
	.cfi_restore_state
	neg	eax
	mov	DWORD PTR errno[rip], eax
	mov	edx, eax
.L5:
	cmp	DWORD PTR ENOSYS[rip], edx
	je	.L19
	cmp	QWORD PTR 8[rsp], 0
	lea	rsi, .LC1[rip]
	je	.L9
	lea	rdi, .LC2[rip]
	xor	eax, eax
	call	printf@PLT
	add	DWORD PTR nerrs[rip], 1
	xor	eax, eax
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L9:
	lea	rdi, .LC3[rip]
	xor	eax, eax
	call	printf@PLT
	xor	eax, eax
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L17:
	mov	edx, DWORD PTR errno[rip]
	jmp	.L5
	.p2align 4,,10
	.p2align 3
.L19:
	lea	rdi, .LC0[rip]
	call	puts@PLT
	xor	eax, eax
	jmp	.L1
.L18:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE0:
	.size	install_valid_mode, .-install_valid_mode
	.comm	nerrs,4,4
	.comm	gdt_entry_num,8,8
	.comm	errno,4,4
	.comm	SYS_set_thread_area,4,4
	.comm	SYS_modify_ldt,4,4
	.comm	ENOSYS,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_ldt_gdt.c_install_valid_mode.c"
	.text
	.section	.rodata.str1.4,"aMS",%progbits,1
	.align	2
.LC0:
	.ascii	"[OK]\011modify_ldt returned -ENOSYS\000"
	.align	2
.LC1:
	.ascii	"modify_ldt\000"
	.align	2
.LC2:
	.ascii	"[FAIL]\011Unexpected %s failure %d\012\000"
	.align	2
.LC3:
	.ascii	"[OK]\011%s rejected 16 bit segment\012\000"
	.section	.rodata.cst4,"aM",%progbits,4
	.align	2
.LC4:
	.word	__stack_chk_guard
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	install_valid_mode, %function
install_valid_mode:
	@ args = 0, pretend = 0, frame = 24
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, lr}
	mov	r4, r3
	sub	sp, sp, #36
	ldr	r6, .L22
	add	ip, sp, #12
	cmp	r4, #0
	mov	r5, r1
	mov	lr, r2
	ldm	r0, {r0, r1, r2, r3}
	ldr	r6, [r6]
	str	r6, [sp, #28]
	mov	r6,#0
	stm	ip, {r0, r1, r2, r3}
	beq	.L1
	ldr	r3, .L22+4
	cmp	lr, #0
	movne	r1, #1
	moveq	r1, #17
	ldr	r0, [r3]
	mov	r2, ip
	mov	r3, #16
	bl	syscall
	cmn	r0, #1
	blt	.L18
	cmp	r0, #0
	bne	.L19
	mov	ip, #1
	ldr	r2, [sp, #24]
	ldr	r3, [sp, #12]
	cmp	r2, #0
	lslne	r3, r3, #12
	addne	r3, r3, #4080
	mov	r1, r4
	mov	r2, r5
	ldr	r0, [sp, #20]
	addne	r3, r3, #15
	str	ip, [sp]
	mov	r4, ip
	bl	check_valid_segment
.L1:
	ldr	r3, .L22
	ldr	r2, [r3]
	ldr	r3, [sp, #28]
	eors	r2, r3, r2
	mov	r3, #0
	bne	.L20
	mov	r0, r4
	add	sp, sp, #36
	@ sp needed
	pop	{r4, r5, r6, r7, pc}
.L18:
	ldr	r3, .L22+8
	rsb	r2, r0, #0
	str	r2, [r3]
.L5:
	ldr	r3, .L22+12
	ldr	r3, [r3]
	cmp	r3, r2
	beq	.L21
	ldr	r4, [sp, #16]
	ldr	r1, .L22+16
	cmp	r4, #0
	beq	.L9
	ldr	r0, .L22+20
	bl	printf
	ldr	r2, .L22+24
	mov	r4, #0
	ldr	r3, [r2]
	add	r3, r3, #1
	str	r3, [r2]
	b	.L1
.L9:
	ldr	r0, .L22+28
	bl	printf
	b	.L1
.L19:
	ldr	r3, .L22+8
	ldr	r2, [r3]
	b	.L5
.L21:
	ldr	r0, .L22+32
	bl	puts
	mov	r4, #0
	b	.L1
.L20:
	bl	__stack_chk_fail
.L23:
	.align	2
.L22:
	.word	.LC4
	.word	SYS_modify_ldt
	.word	errno
	.word	ENOSYS
	.word	.LC1
	.word	.LC2
	.word	nerrs
	.word	.LC3
	.word	.LC0
	.size	install_valid_mode, .-install_valid_mode
	.comm	nerrs,4,4
	.comm	gdt_entry_num,4,4
	.comm	errno,4,4
	.comm	SYS_set_thread_area,4,4
	.comm	SYS_modify_ldt,4,4
	.comm	ENOSYS,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
