	.file	"959194.c"
	.intel_syntax noprefix
	.text
	.section	.rodata
.LC0:
	.string	"r"
	.align 8
.LC1:
	.string	"/home/tripathy/Documents/CTF_Problems/Binaries/Infinite_Campus/flag.txt"
.LC2:
	.string	"Student name: "
.LC3:
	.string	"%s"
.LC4:
	.string	"Student grade: "
.LC5:
	.string	"%d"
	.align 8
.LC6:
	.string	"Invalid grade. You must not be the teacher."
	.align 8
.LC7:
	.string	"Wow. This student is so good. Give them this flag: %s"
	.text
	.globl	accept_grades
	.type	accept_grades, @function
accept_grades:
.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, 432
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	lea	rsi, .LC0[rip]
	lea	rdi, .LC1[rip]
	call	fopen@PLT
	mov	QWORD PTR -424[rbp], rax
	mov	rdx, QWORD PTR -424[rbp]
	lea	rax, -20[rbp]
	mov	esi, 12
	mov	rdi, rax
	call	fgets@PLT
	mov	DWORD PTR -428[rbp], 0
	jmp	.L2
.L3:
	mov	eax, DWORD PTR -428[rbp]
	movsx	rdx, eax
	mov	rax, rdx
	add	rax, rax
	add	rax, rdx
	sal	rax, 2
	add	rax, rbp
	sub	rax, 416
	mov	BYTE PTR [rax], 116
	mov	eax, DWORD PTR -428[rbp]
	movsx	rdx, eax
	mov	rax, rdx
	add	rax, rax
	add	rax, rdx
	sal	rax, 2
	add	rax, rbp
	sub	rax, 415
	mov	BYTE PTR [rax], 101
	mov	eax, DWORD PTR -428[rbp]
	movsx	rdx, eax
	mov	rax, rdx
	add	rax, rax
	add	rax, rdx
	sal	rax, 2
	add	rax, rbp
	sub	rax, 414
	mov	BYTE PTR [rax], 109
	mov	eax, DWORD PTR -428[rbp]
	movsx	rdx, eax
	mov	rax, rdx
	add	rax, rax
	add	rax, rdx
	sal	rax, 2
	add	rax, rbp
	sub	rax, 413
	mov	BYTE PTR [rax], 112
	mov	eax, DWORD PTR -428[rbp]
	movsx	rdx, eax
	mov	rax, rdx
	add	rax, rax
	add	rax, rdx
	sal	rax, 2
	add	rax, rbp
	sub	rax, 408
	mov	DWORD PTR [rax], 0
	add	DWORD PTR -428[rbp], 1
.L2:
	cmp	DWORD PTR -428[rbp], 31
	jle	.L3
	mov	DWORD PTR -428[rbp], 0
	jmp	.L4
.L9:
	lea	rdi, .LC2[rip]
	mov	eax, 0
	call	printf@PLT
	lea	rax, -28[rbp]
	mov	rsi, rax
	lea	rdi, .LC3[rip]
	mov	eax, 0
	call	__isoc99_scanf@PLT
	lea	rdi, .LC4[rip]
	mov	eax, 0
	call	printf@PLT
	lea	rax, -432[rbp]
	mov	rsi, rax
	lea	rdi, .LC5[rip]
	mov	eax, 0
	call	__isoc99_scanf@PLT
	mov	eax, DWORD PTR -432[rbp]
	test	eax, eax
	js	.L5
	mov	eax, DWORD PTR -432[rbp]
	cmp	eax, 100
	jle	.L6
.L5:
	lea	rdi, .LC6[rip]
	call	puts@PLT
	jmp	.L1
.L6:
	lea	rcx, -416[rbp]
	mov	eax, DWORD PTR -428[rbp]
	movsx	rdx, eax
	mov	rax, rdx
	add	rax, rax
	add	rax, rdx
	sal	rax, 2
	lea	rdx, [rcx+rax]
	lea	rax, -28[rbp]
	mov	rsi, rax
	mov	rdi, rdx
	call	strcpy@PLT
	mov	edx, DWORD PTR -432[rbp]
	mov	eax, DWORD PTR -428[rbp]
	movsx	rcx, eax
	mov	rax, rcx
	add	rax, rax
	add	rax, rcx
	sal	rax, 2
	add	rax, rbp
	sub	rax, 408
	mov	DWORD PTR [rax], edx
	mov	eax, DWORD PTR -428[rbp]
	movsx	rdx, eax
	mov	rax, rdx
	add	rax, rax
	add	rax, rdx
	sal	rax, 2
	add	rax, rbp
	sub	rax, 408
	mov	eax, DWORD PTR [rax]
	cmp	eax, 100
	jle	.L8
	lea	rax, -20[rbp]
	mov	rsi, rax
	lea	rdi, .LC7[rip]
	mov	eax, 0
	call	printf@PLT
.L8:
	add	DWORD PTR -428[rbp], 1
.L4:
	cmp	DWORD PTR -428[rbp], 31
	jle	.L9
.L1:
	mov	rax, QWORD PTR -8[rbp]
	sub	rax, QWORD PTR fs:40
	je	.L10
	call	__stack_chk_fail@PLT
.L10:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	accept_grades, .-accept_grades
	.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, 16
	mov	DWORD PTR -4[rbp], edi
	mov	QWORD PTR -16[rbp], rsi
	mov	eax, 0
	call	accept_grades
	mov	eax, 0
	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	"959194.c"
	.text
	.section	.rodata
	.align	2
.LC0:
	.ascii	"r\000"
	.align	2
.LC1:
	.ascii	"/home/tripathy/Documents/CTF_Problems/Binaries/Infi"
	.ascii	"nite_Campus/flag.txt\000"
	.align	2
.LC2:
	.ascii	"Student name: \000"
	.align	2
.LC3:
	.ascii	"%s\000"
	.align	2
.LC4:
	.ascii	"Student grade: \000"
	.align	2
.LC5:
	.ascii	"%d\000"
	.align	2
.LC6:
	.ascii	"Invalid grade. You must not be the teacher.\000"
	.align	2
.LC7:
	.ascii	"Wow. This student is so good. Give them this flag: "
	.ascii	"%s\000"
	.align	2
.LC8:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	accept_grades
	.syntax unified
	.arm
	.fpu softvfp
	.type	accept_grades, %function
accept_grades:
	@ args = 0, pretend = 0, frame = 424
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #424
	ldr	r3, .L11
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	ldr	r1, .L11+4
	ldr	r0, .L11+8
	bl	fopen
	str	r0, [fp, #-416]
	sub	r3, fp, #20
	ldr	r2, [fp, #-416]
	mov	r1, #12
	mov	r0, r3
	bl	fgets
	mov	r3, #0
	str	r3, [fp, #-420]
	b	.L2
.L3:
	ldr	r2, [fp, #-420]
	mov	r3, r2
	lsl	r3, r3, #1
	add	r3, r3, r2
	lsl	r3, r3, #2
	sub	r2, fp, #4
	add	r3, r2, r3
	sub	r3, r3, #408
	mov	r2, #116
	strb	r2, [r3]
	ldr	r2, [fp, #-420]
	mov	r3, r2
	lsl	r3, r3, #1
	add	r3, r3, r2
	lsl	r3, r3, #2
	sub	r2, fp, #4
	add	r3, r2, r3
	sub	r3, r3, #404
	sub	r3, r3, #3
	mov	r2, #101
	strb	r2, [r3]
	ldr	r2, [fp, #-420]
	mov	r3, r2
	lsl	r3, r3, #1
	add	r3, r3, r2
	lsl	r3, r3, #2
	sub	r2, fp, #4
	add	r3, r2, r3
	sub	r3, r3, #404
	sub	r3, r3, #2
	mov	r2, #109
	strb	r2, [r3]
	ldr	r2, [fp, #-420]
	mov	r3, r2
	lsl	r3, r3, #1
	add	r3, r3, r2
	lsl	r3, r3, #2
	sub	r2, fp, #4
	add	r3, r2, r3
	sub	r3, r3, #404
	sub	r3, r3, #1
	mov	r2, #112
	strb	r2, [r3]
	ldr	r2, [fp, #-420]
	mov	r3, r2
	lsl	r3, r3, #1
	add	r3, r3, r2
	lsl	r3, r3, #2
	sub	r2, fp, #4
	add	r3, r2, r3
	sub	r3, r3, #400
	mov	r2, #0
	str	r2, [r3]
	ldr	r3, [fp, #-420]
	add	r3, r3, #1
	str	r3, [fp, #-420]
.L2:
	ldr	r3, [fp, #-420]
	cmp	r3, #31
	ble	.L3
	mov	r3, #0
	str	r3, [fp, #-420]
	b	.L4
.L9:
	ldr	r0, .L11+12
	bl	printf
	sub	r3, fp, #28
	mov	r1, r3
	ldr	r0, .L11+16
	bl	__isoc99_scanf
	ldr	r0, .L11+20
	bl	printf
	sub	r3, fp, #424
	mov	r1, r3
	ldr	r0, .L11+24
	bl	__isoc99_scanf
	ldr	r3, [fp, #-424]
	cmp	r3, #0
	blt	.L5
	ldr	r3, [fp, #-424]
	cmp	r3, #100
	ble	.L6
.L5:
	ldr	r0, .L11+28
	bl	puts
	b	.L1
.L6:
	sub	r1, fp, #412
	ldr	r2, [fp, #-420]
	mov	r3, r2
	lsl	r3, r3, #1
	add	r3, r3, r2
	lsl	r3, r3, #2
	add	r3, r1, r3
	sub	r2, fp, #28
	mov	r1, r2
	mov	r0, r3
	bl	strcpy
	ldr	r1, [fp, #-424]
	ldr	r2, [fp, #-420]
	mov	r3, r2
	lsl	r3, r3, #1
	add	r3, r3, r2
	lsl	r3, r3, #2
	sub	r2, fp, #4
	add	r3, r2, r3
	sub	r3, r3, #400
	str	r1, [r3]
	ldr	r2, [fp, #-420]
	mov	r3, r2
	lsl	r3, r3, #1
	add	r3, r3, r2
	lsl	r3, r3, #2
	sub	r2, fp, #4
	add	r3, r2, r3
	sub	r3, r3, #400
	ldr	r3, [r3]
	cmp	r3, #100
	ble	.L8
	sub	r3, fp, #20
	mov	r1, r3
	ldr	r0, .L11+32
	bl	printf
.L8:
	ldr	r3, [fp, #-420]
	add	r3, r3, #1
	str	r3, [fp, #-420]
.L4:
	ldr	r3, [fp, #-420]
	cmp	r3, #31
	ble	.L9
.L1:
	ldr	r3, .L11
	ldr	r2, [r3]
	ldr	r3, [fp, #-8]
	eors	r2, r3, r2
	mov	r3, #0
	beq	.L10
	bl	__stack_chk_fail
.L10:
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L12:
	.align	2
.L11:
	.word	.LC8
	.word	.LC0
	.word	.LC1
	.word	.LC2
	.word	.LC3
	.word	.LC4
	.word	.LC5
	.word	.LC6
	.word	.LC7
	.size	accept_grades, .-accept_grades
	.align	2
	.global	main
	.syntax unified
	.arm
	.fpu softvfp
	.type	main, %function
main:
	@ args = 0, pretend = 0, frame = 8
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #8
	str	r0, [fp, #-8]
	str	r1, [fp, #-12]
	bl	accept_grades
	mov	r3, #0
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
	.size	main, .-main
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
