	.file	"368887.c"
	.intel_syntax noprefix
	.text
	.section	.rodata
.LC0:
	.string	"/bin/sh -i"
	.text
	.globl	give_shell
	.type	give_shell, @function
give_shell:
.LFB6:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	sub	rsp, 16
	mov	eax, 0
	call	getegid@PLT
	mov	DWORD PTR -4[rbp], eax
	mov	edx, DWORD PTR -4[rbp]
	mov	ecx, DWORD PTR -4[rbp]
	mov	eax, DWORD PTR -4[rbp]
	mov	esi, ecx
	mov	edi, eax
	mov	eax, 0
	call	setresgid@PLT
	lea	rdi, .LC0[rip]
	call	system@PLT
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	give_shell, .-give_shell
	.section	.rodata
	.align 8
.LC1:
	.string	"Welcome to the circular buffer manager:\n"
.LC2:
	.string	"How many bytes? "
.LC3:
	.string	"%u"
.LC4:
	.string	"Enter your data: "
	.text
	.globl	main
	.type	main, @function
main:
.LFB7:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	sub	rsp, 304
	mov	DWORD PTR -292[rbp], edi
	mov	QWORD PTR -304[rbp], rsi
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	mov	DWORD PTR -276[rbp], 0
	lea	rdi, .LC1[rip]
	call	puts@PLT
.L7:
	lea	rdi, .LC2[rip]
	mov	eax, 0
	call	printf@PLT
	mov	rax, QWORD PTR stdout[rip]
	mov	rdi, rax
	call	fflush@PLT
	lea	rax, -280[rbp]
	mov	rsi, rax
	lea	rdi, .LC3[rip]
	mov	eax, 0
	call	__isoc99_scanf@PLT
	mov	rdx, QWORD PTR stdin[rip]
	lea	rax, -272[rbp]
	mov	esi, 2
	mov	rdi, rax
	call	fgets@PLT
	mov	eax, DWORD PTR -280[rbp]
	test	eax, eax
	jne	.L3
	mov	eax, 0
	mov	rsi, QWORD PTR -8[rbp]
	sub	rsi, QWORD PTR fs:40
	je	.L8
	jmp	.L9
.L3:
	lea	rdi, .LC4[rip]
	mov	eax, 0
	call	printf@PLT
	mov	rax, QWORD PTR stdout[rip]
	mov	rdi, rax
	call	fflush@PLT
	mov	eax, 256
	sub	eax, DWORD PTR -276[rbp]
	mov	edx, eax
	mov	eax, DWORD PTR -280[rbp]
	cmp	edx, eax
	jle	.L5
	mov	rdx, QWORD PTR stdin[rip]
	mov	eax, DWORD PTR -280[rbp]
	lea	rsi, -272[rbp]
	mov	ecx, DWORD PTR -276[rbp]
	movsx	rcx, ecx
	add	rcx, rsi
	mov	esi, eax
	mov	rdi, rcx
	call	fgets@PLT
	mov	eax, DWORD PTR -280[rbp]
	add	DWORD PTR -276[rbp], eax
	jmp	.L6
.L5:
	mov	rdx, QWORD PTR stdin[rip]
	mov	eax, 256
	sub	eax, DWORD PTR -276[rbp]
	lea	rsi, -272[rbp]
	mov	ecx, DWORD PTR -276[rbp]
	movsx	rcx, ecx
	add	rcx, rsi
	mov	esi, eax
	mov	rdi, rcx
	call	fgets@PLT
	mov	eax, DWORD PTR -280[rbp]
	mov	edx, 256
	sub	edx, DWORD PTR -276[rbp]
	sub	eax, edx
	mov	DWORD PTR -280[rbp], eax
	mov	DWORD PTR -276[rbp], 0
	mov	rdx, QWORD PTR stdin[rip]
	mov	ecx, DWORD PTR -280[rbp]
	lea	rax, -272[rbp]
	mov	esi, ecx
	mov	rdi, rax
	call	fgets@PLT
	mov	eax, DWORD PTR -280[rbp]
	add	DWORD PTR -276[rbp], eax
.L6:
	mov	edi, 10
	call	putchar@PLT
	jmp	.L7
.L9:
	call	__stack_chk_fail@PLT
.L8:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.size	main, .-main
	.ident	"GCC: (Ubuntu 10.5.0-1ubuntu1~20.04) 10.5.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, 6
	.eabi_attribute 34, 0
	.eabi_attribute 18, 4
	.file	"368887.c"
	.text
	.section	.rodata
	.align	2
.LC0:
	.ascii	"/bin/sh -i\000"
	.text
	.align	2
	.global	give_shell
	.syntax unified
	.arm
	.fpu softvfp
	.type	give_shell, %function
give_shell:
	@ args = 0, pretend = 0, frame = 8
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #8
	bl	getegid
	mov	r3, r0
	str	r3, [fp, #-8]
	ldr	r2, [fp, #-8]
	ldr	r1, [fp, #-8]
	ldr	r0, [fp, #-8]
	bl	setresgid
	ldr	r0, .L2
	bl	system
	nop
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L3:
	.align	2
.L2:
	.word	.LC0
	.size	give_shell, .-give_shell
	.section	.rodata
	.align	2
.LC1:
	.ascii	"Welcome to the circular buffer manager:\012\000"
	.align	2
.LC2:
	.ascii	"How many bytes? \000"
	.align	2
.LC3:
	.ascii	"%u\000"
	.align	2
.LC4:
	.ascii	"Enter your data: \000"
	.align	2
.LC5:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	main
	.syntax unified
	.arm
	.fpu softvfp
	.type	main, %function
main:
	@ args = 0, pretend = 0, frame = 280
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #280
	str	r0, [fp, #-280]
	str	r1, [fp, #-284]
	ldr	r3, .L12
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	mov	r3, #0
	str	r3, [fp, #-268]
	ldr	r0, .L12+4
	bl	puts
.L9:
	ldr	r0, .L12+8
	bl	printf
	ldr	r3, .L12+12
	ldr	r3, [r3]
	mov	r0, r3
	bl	fflush
	sub	r3, fp, #272
	mov	r1, r3
	ldr	r0, .L12+16
	bl	__isoc99_scanf
	ldr	r3, .L12+20
	ldr	r2, [r3]
	sub	r3, fp, #264
	mov	r1, #2
	mov	r0, r3
	bl	fgets
	ldr	r3, [fp, #-272]
	cmp	r3, #0
	bne	.L5
	mov	r3, #0
	ldr	r2, .L12
	ldr	r1, [r2]
	ldr	r2, [fp, #-8]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L10
	b	.L11
.L5:
	ldr	r0, .L12+24
	bl	printf
	ldr	r3, .L12+12
	ldr	r3, [r3]
	mov	r0, r3
	bl	fflush
	ldr	r3, [fp, #-268]
	rsb	r2, r3, #256
	ldr	r3, [fp, #-272]
	cmp	r2, r3
	ble	.L7
	sub	r2, fp, #264
	ldr	r3, [fp, #-268]
	add	r3, r2, r3
	ldr	r1, [fp, #-272]
	ldr	r2, .L12+20
	ldr	r2, [r2]
	mov	r0, r3
	bl	fgets
	ldr	r3, [fp, #-272]
	ldr	r2, [fp, #-268]
	add	r3, r2, r3
	str	r3, [fp, #-268]
	b	.L8
.L7:
	sub	r2, fp, #264
	ldr	r3, [fp, #-268]
	add	r0, r2, r3
	ldr	r3, [fp, #-268]
	rsb	r3, r3, #256
	ldr	r2, .L12+20
	ldr	r2, [r2]
	mov	r1, r3
	bl	fgets
	ldr	r2, [fp, #-272]
	ldr	r3, [fp, #-268]
	rsb	r3, r3, #256
	sub	r3, r2, r3
	str	r3, [fp, #-272]
	mov	r3, #0
	str	r3, [fp, #-268]
	ldr	r1, [fp, #-272]
	ldr	r3, .L12+20
	ldr	r2, [r3]
	sub	r3, fp, #264
	mov	r0, r3
	bl	fgets
	ldr	r3, [fp, #-272]
	ldr	r2, [fp, #-268]
	add	r3, r2, r3
	str	r3, [fp, #-268]
.L8:
	mov	r0, #10
	bl	putchar
	b	.L9
.L11:
	bl	__stack_chk_fail
.L10:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L13:
	.align	2
.L12:
	.word	.LC5
	.word	.LC1
	.word	.LC2
	.word	stdout
	.word	.LC3
	.word	stdin
	.word	.LC4
	.size	main, .-main
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
