	.file	"133442.c"
	.intel_syntax noprefix
	.text
	.globl	user
	.bss
	.align 8
	.type	user, @object
	.size	user, 8
user:
	.zero	8
	.section	.rodata
.LC0:
	.string	"r"
.LC1:
	.string	"flag"
.LC2:
	.string	"Flag file not found"
	.text
	.globl	get_flag
	.type	get_flag, @function
get_flag:
.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, 80
	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 -72[rbp], rax
	cmp	QWORD PTR -72[rbp], 0
	jne	.L2
	lea	rdi, .LC2[rip]
	call	puts@PLT
	mov	edi, -1
	call	exit@PLT
.L2:
	mov	rdx, QWORD PTR -72[rbp]
	lea	rax, -64[rbp]
	mov	esi, 48
	mov	rdi, rax
	call	fgets@PLT
	lea	rax, -64[rbp]
	mov	rdi, rax
	call	puts@PLT
	mov	rax, QWORD PTR -72[rbp]
	mov	rdi, rax
	call	fclose@PLT
	nop
	mov	rax, QWORD PTR -8[rbp]
	sub	rax, QWORD PTR fs:40
	je	.L3
	call	__stack_chk_fail@PLT
.L3:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	get_flag, .-get_flag
	.section	.rodata
.LC3:
	.string	"Not logged in."
	.text
	.globl	logged_in
	.type	logged_in, @function
logged_in:
.LFB7:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	mov	rax, QWORD PTR user[rip]
	test	rax, rax
	jne	.L5
	lea	rdi, .LC3[rip]
	call	puts@PLT
	mov	eax, 0
	jmp	.L6
.L5:
	mov	eax, 1
.L6:
	pop	rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.size	logged_in, .-logged_in
	.section	.rodata
.LC4:
	.string	"Available commands:"
	.align 8
.LC5:
	.string	"\tuser - shows current user info"
.LC6:
	.string	"\tlogin user - Login to user"
	.align 8
.LC7:
	.string	"\tsudo level - Set authorization level (must be < 9)"
	.align 8
.LC8:
	.string	"\tgetflag - Prints flag (requires auth level 9)"
	.align 8
.LC9:
	.string	"\tlogout - log out and reset auth"
.LC10:
	.string	"\tquit"
	.text
	.globl	menu
	.type	menu, @function
menu:
.LFB8:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	lea	rdi, .LC4[rip]
	call	puts@PLT
	lea	rdi, .LC5[rip]
	call	puts@PLT
	lea	rdi, .LC6[rip]
	call	puts@PLT
	lea	rdi, .LC7[rip]
	call	puts@PLT
	lea	rdi, .LC8[rip]
	call	puts@PLT
	lea	rdi, .LC9[rip]
	call	puts@PLT
	lea	rdi, .LC10[rip]
	call	puts@PLT
	nop
	pop	rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE8:
	.size	menu, .-menu
	.section	.rodata
.LC11:
	.string	"Logged in %s [%u]\n"
	.text
	.globl	user_info
	.type	user_info, @function
user_info:
.LFB9:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	mov	eax, 0
	call	logged_in
	test	eax, eax
	je	.L10
	mov	rax, QWORD PTR user[rip]
	mov	edx, DWORD PTR 8[rax]
	mov	rax, QWORD PTR user[rip]
	mov	rax, QWORD PTR [rax]
	mov	rsi, rax
	lea	rdi, .LC11[rip]
	mov	eax, 0
	call	printf@PLT
.L10:
	nop
	pop	rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE9:
	.size	user_info, .-user_info
	.section	.rodata
	.align 8
.LC12:
	.string	"Already logged in. logout first"
.LC13:
	.string	"\n"
.LC14:
	.string	"Invalid command"
.LC15:
	.string	"Malloc failed"
.LC16:
	.string	"Logged in as \"%s\"\n"
	.text
	.globl	login
	.type	login, @function
login:
.LFB10:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	push	rbx
	sub	rsp, 40
	.cfi_offset 3, -24
	mov	QWORD PTR -40[rbp], rdi
	mov	rax, QWORD PTR user[rip]
	test	rax, rax
	je	.L12
	lea	rdi, .LC12[rip]
	call	puts@PLT
	jmp	.L11
.L12:
	mov	rax, QWORD PTR -40[rbp]
	add	rax, 6
	lea	rsi, .LC13[rip]
	mov	rdi, rax
	call	strtok@PLT
	mov	QWORD PTR -24[rbp], rax
	cmp	QWORD PTR -24[rbp], 0
	jne	.L14
	lea	rdi, .LC14[rip]
	call	puts@PLT
	jmp	.L11
.L14:
	mov	edi, 16
	call	malloc@PLT
	mov	QWORD PTR user[rip], rax
	mov	rax, QWORD PTR user[rip]
	test	rax, rax
	jne	.L15
	lea	rdi, .LC15[rip]
	call	puts@PLT
	mov	edi, -1
	call	exit@PLT
.L15:
	mov	rbx, QWORD PTR user[rip]
	mov	rax, QWORD PTR -24[rbp]
	mov	rdi, rax
	call	strdup@PLT
	mov	QWORD PTR [rbx], rax
	mov	rax, QWORD PTR -24[rbp]
	mov	rsi, rax
	lea	rdi, .LC16[rip]
	mov	eax, 0
	call	printf@PLT
.L11:
	mov	rbx, QWORD PTR -8[rbp]
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE10:
	.size	login, .-login
	.section	.rodata
.LC17:
	.string	"Can only set below 9"
.LC18:
	.string	"Set auth level to %u\n"
	.text
	.globl	sudo
	.type	sudo, @function
sudo:
.LFB11:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	sub	rsp, 32
	mov	QWORD PTR -24[rbp], rdi
	mov	eax, 0
	call	logged_in
	test	eax, eax
	je	.L21
	mov	rax, QWORD PTR -24[rbp]
	add	rax, 5
	lea	rsi, .LC13[rip]
	mov	rdi, rax
	call	strtok@PLT
	mov	QWORD PTR -8[rbp], rax
	cmp	QWORD PTR -8[rbp], 0
	jne	.L19
	lea	rdi, .LC14[rip]
	call	puts@PLT
	jmp	.L16
.L19:
	mov	rax, QWORD PTR -8[rbp]
	mov	rdi, rax
	call	atoi@PLT
	mov	DWORD PTR -12[rbp], eax
	cmp	DWORD PTR -12[rbp], 8
	jle	.L20
	lea	rdi, .LC17[rip]
	call	puts@PLT
	jmp	.L16
.L20:
	mov	rax, QWORD PTR user[rip]
	mov	edx, DWORD PTR -12[rbp]
	mov	DWORD PTR 8[rax], edx
	mov	eax, DWORD PTR -12[rbp]
	mov	esi, eax
	lea	rdi, .LC18[rip]
	mov	eax, 0
	call	printf@PLT
	jmp	.L16
.L21:
	nop
.L16:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE11:
	.size	sudo, .-sudo
	.section	.rodata
.LC19:
	.string	"Unauthorized"
	.text
	.globl	print_flag
	.type	print_flag, @function
print_flag:
.LFB12:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	mov	eax, 0
	call	logged_in
	test	eax, eax
	je	.L26
	mov	rax, QWORD PTR user[rip]
	mov	eax, DWORD PTR 8[rax]
	cmp	eax, 9
	je	.L25
	lea	rdi, .LC19[rip]
	call	puts@PLT
	jmp	.L22
.L25:
	mov	eax, 0
	call	get_flag
	jmp	.L22
.L26:
	nop
.L22:
	pop	rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE12:
	.size	print_flag, .-print_flag
	.section	.rodata
.LC20:
	.string	"Logged out"
	.text
	.globl	logout
	.type	logout, @function
logout:
.LFB13:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	mov	eax, 0
	call	logged_in
	test	eax, eax
	je	.L30
	mov	rax, QWORD PTR user[rip]
	mov	rax, QWORD PTR [rax]
	mov	rdi, rax
	call	free@PLT
	mov	QWORD PTR user[rip], 0
	lea	rdi, .LC20[rip]
	call	puts@PLT
	jmp	.L27
.L30:
	nop
.L27:
	pop	rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE13:
	.size	logout, .-logout
	.section	.rodata
.LC21:
	.string	"Enter cmd: "
.LC22:
	.string	"user"
.LC23:
	.string	"login"
.LC24:
	.string	"sudo"
.LC25:
	.string	"getflag"
.LC26:
	.string	"logout"
.LC27:
	.string	"What?"
	.text
	.globl	main
	.type	main, @function
main:
.LFB14:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	sub	rsp, 560
	mov	DWORD PTR -532[rbp], edi
	mov	QWORD PTR -544[rbp], rsi
	mov	QWORD PTR -552[rbp], rdx
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	mov	rax, QWORD PTR stdout[rip]
	mov	esi, 0
	mov	rdi, rax
	call	setbuf@PLT
	mov	eax, 0
	call	menu
.L40:
	lea	rdi, .LC21[rip]
	call	puts@PLT
	mov	edi, 62
	call	putchar@PLT
	mov	edi, 32
	call	putchar@PLT
	mov	rdx, QWORD PTR stdin[rip]
	lea	rax, -528[rbp]
	mov	esi, 512
	mov	rdi, rax
	call	fgets@PLT
	test	rax, rax
	jne	.L32
	mov	eax, 0
	jmp	.L33
.L32:
	lea	rax, -528[rbp]
	mov	edx, 4
	lea	rsi, .LC22[rip]
	mov	rdi, rax
	call	strncmp@PLT
	test	eax, eax
	jne	.L34
	mov	eax, 0
	call	user_info
	jmp	.L40
.L34:
	lea	rax, -528[rbp]
	mov	edx, 5
	lea	rsi, .LC23[rip]
	mov	rdi, rax
	call	strncmp@PLT
	test	eax, eax
	jne	.L36
	lea	rax, -528[rbp]
	mov	rdi, rax
	call	login
	jmp	.L40
.L36:
	lea	rax, -528[rbp]
	mov	edx, 4
	lea	rsi, .LC24[rip]
	mov	rdi, rax
	call	strncmp@PLT
	test	eax, eax
	jne	.L37
	lea	rax, -528[rbp]
	mov	rdi, rax
	call	sudo
	jmp	.L40
.L37:
	lea	rax, -528[rbp]
	mov	edx, 7
	lea	rsi, .LC25[rip]
	mov	rdi, rax
	call	strncmp@PLT
	test	eax, eax
	jne	.L38
	mov	eax, 0
	call	print_flag
	jmp	.L40
.L38:
	lea	rax, -528[rbp]
	mov	edx, 6
	lea	rsi, .LC26[rip]
	mov	rdi, rax
	call	strncmp@PLT
	test	eax, eax
	jne	.L39
	mov	eax, 0
	call	logout
	jmp	.L40
.L39:
	lea	rdi, .LC27[rip]
	call	puts@PLT
	mov	eax, 0
.L33:
	mov	rcx, QWORD PTR -8[rbp]
	sub	rcx, QWORD PTR fs:40
	je	.L41
	call	__stack_chk_fail@PLT
.L41:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE14:
	.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	"133442.c"
	.text
	.global	user
	.bss
	.align	2
	.type	user, %object
	.size	user, 4
user:
	.space	4
	.section	.rodata
	.align	2
.LC0:
	.ascii	"r\000"
	.align	2
.LC1:
	.ascii	"flag\000"
	.align	2
.LC2:
	.ascii	"Flag file not found\000"
	.align	2
.LC3:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	get_flag
	.syntax unified
	.arm
	.fpu softvfp
	.type	get_flag, %function
get_flag:
	@ args = 0, pretend = 0, frame = 56
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #56
	ldr	r3, .L4
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	ldr	r1, .L4+4
	ldr	r0, .L4+8
	bl	fopen
	str	r0, [fp, #-60]
	ldr	r3, [fp, #-60]
	cmp	r3, #0
	bne	.L2
	ldr	r0, .L4+12
	bl	puts
	mvn	r0, #0
	bl	exit
.L2:
	sub	r3, fp, #56
	ldr	r2, [fp, #-60]
	mov	r1, #48
	mov	r0, r3
	bl	fgets
	sub	r3, fp, #56
	mov	r0, r3
	bl	puts
	ldr	r0, [fp, #-60]
	bl	fclose
	nop
	ldr	r3, .L4
	ldr	r2, [r3]
	ldr	r3, [fp, #-8]
	eors	r2, r3, r2
	mov	r3, #0
	beq	.L3
	bl	__stack_chk_fail
.L3:
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L5:
	.align	2
.L4:
	.word	.LC3
	.word	.LC0
	.word	.LC1
	.word	.LC2
	.size	get_flag, .-get_flag
	.section	.rodata
	.align	2
.LC4:
	.ascii	"Not logged in.\000"
	.text
	.align	2
	.global	logged_in
	.syntax unified
	.arm
	.fpu softvfp
	.type	logged_in, %function
logged_in:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	ldr	r3, .L9
	ldr	r3, [r3]
	cmp	r3, #0
	bne	.L7
	ldr	r0, .L9+4
	bl	puts
	mov	r3, #0
	b	.L8
.L7:
	mov	r3, #1
.L8:
	mov	r0, r3
	pop	{fp, pc}
.L10:
	.align	2
.L9:
	.word	user
	.word	.LC4
	.size	logged_in, .-logged_in
	.section	.rodata
	.align	2
.LC5:
	.ascii	"Available commands:\000"
	.align	2
.LC6:
	.ascii	"\011user - shows current user info\000"
	.align	2
.LC7:
	.ascii	"\011login user - Login to user\000"
	.align	2
.LC8:
	.ascii	"\011sudo level - Set authorization level (must be <"
	.ascii	" 9)\000"
	.align	2
.LC9:
	.ascii	"\011getflag - Prints flag (requires auth level 9)\000"
	.align	2
.LC10:
	.ascii	"\011logout - log out and reset auth\000"
	.align	2
.LC11:
	.ascii	"\011quit\000"
	.text
	.align	2
	.global	menu
	.syntax unified
	.arm
	.fpu softvfp
	.type	menu, %function
menu:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	ldr	r0, .L12
	bl	puts
	ldr	r0, .L12+4
	bl	puts
	ldr	r0, .L12+8
	bl	puts
	ldr	r0, .L12+12
	bl	puts
	ldr	r0, .L12+16
	bl	puts
	ldr	r0, .L12+20
	bl	puts
	ldr	r0, .L12+24
	bl	puts
	nop
	pop	{fp, pc}
.L13:
	.align	2
.L12:
	.word	.LC5
	.word	.LC6
	.word	.LC7
	.word	.LC8
	.word	.LC9
	.word	.LC10
	.word	.LC11
	.size	menu, .-menu
	.section	.rodata
	.align	2
.LC12:
	.ascii	"Logged in %s [%u]\012\000"
	.text
	.align	2
	.global	user_info
	.syntax unified
	.arm
	.fpu softvfp
	.type	user_info, %function
user_info:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	bl	logged_in
	mov	r3, r0
	cmp	r3, #0
	beq	.L16
	ldr	r3, .L17
	ldr	r3, [r3]
	ldr	r1, [r3]
	ldr	r3, .L17
	ldr	r3, [r3]
	ldr	r3, [r3, #4]
	mov	r2, r3
	ldr	r0, .L17+4
	bl	printf
.L16:
	nop
	pop	{fp, pc}
.L18:
	.align	2
.L17:
	.word	user
	.word	.LC12
	.size	user_info, .-user_info
	.section	.rodata
	.align	2
.LC13:
	.ascii	"Already logged in. logout first\000"
	.align	2
.LC14:
	.ascii	"\012\000"
	.align	2
.LC15:
	.ascii	"Invalid command\000"
	.align	2
.LC16:
	.ascii	"Malloc failed\000"
	.align	2
.LC17:
	.ascii	"Logged in as \"%s\"\012\000"
	.text
	.align	2
	.global	login
	.syntax unified
	.arm
	.fpu softvfp
	.type	login, %function
login:
	@ args = 0, pretend = 0, frame = 16
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{r4, fp, lr}
	add	fp, sp, #8
	sub	sp, sp, #20
	str	r0, [fp, #-24]
	ldr	r3, .L24
	ldr	r3, [r3]
	cmp	r3, #0
	beq	.L20
	ldr	r0, .L24+4
	bl	puts
	b	.L19
.L20:
	ldr	r3, [fp, #-24]
	add	r3, r3, #6
	ldr	r1, .L24+8
	mov	r0, r3
	bl	strtok
	str	r0, [fp, #-16]
	ldr	r3, [fp, #-16]
	cmp	r3, #0
	bne	.L22
	ldr	r0, .L24+12
	bl	puts
	b	.L19
.L22:
	mov	r0, #8
	bl	malloc
	mov	r3, r0
	mov	r2, r3
	ldr	r3, .L24
	str	r2, [r3]
	ldr	r3, .L24
	ldr	r3, [r3]
	cmp	r3, #0
	bne	.L23
	ldr	r0, .L24+16
	bl	puts
	mvn	r0, #0
	bl	exit
.L23:
	ldr	r3, .L24
	ldr	r4, [r3]
	ldr	r0, [fp, #-16]
	bl	strdup
	mov	r3, r0
	str	r3, [r4]
	ldr	r1, [fp, #-16]
	ldr	r0, .L24+20
	bl	printf
.L19:
	sub	sp, fp, #8
	@ sp needed
	pop	{r4, fp, pc}
.L25:
	.align	2
.L24:
	.word	user
	.word	.LC13
	.word	.LC14
	.word	.LC15
	.word	.LC16
	.word	.LC17
	.size	login, .-login
	.section	.rodata
	.align	2
.LC18:
	.ascii	"Can only set below 9\000"
	.align	2
.LC19:
	.ascii	"Set auth level to %u\012\000"
	.text
	.align	2
	.global	sudo
	.syntax unified
	.arm
	.fpu softvfp
	.type	sudo, %function
sudo:
	@ args = 0, pretend = 0, frame = 16
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #16
	str	r0, [fp, #-16]
	bl	logged_in
	mov	r3, r0
	cmp	r3, #0
	beq	.L31
	ldr	r3, [fp, #-16]
	add	r3, r3, #5
	ldr	r1, .L32
	mov	r0, r3
	bl	strtok
	str	r0, [fp, #-12]
	ldr	r3, [fp, #-12]
	cmp	r3, #0
	bne	.L29
	ldr	r0, .L32+4
	bl	puts
	b	.L26
.L29:
	ldr	r0, [fp, #-12]
	bl	atoi
	str	r0, [fp, #-8]
	ldr	r3, [fp, #-8]
	cmp	r3, #8
	ble	.L30
	ldr	r0, .L32+8
	bl	puts
	b	.L26
.L30:
	ldr	r3, .L32+12
	ldr	r3, [r3]
	ldr	r2, [fp, #-8]
	str	r2, [r3, #4]
	ldr	r1, [fp, #-8]
	ldr	r0, .L32+16
	bl	printf
	b	.L26
.L31:
	nop
.L26:
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L33:
	.align	2
.L32:
	.word	.LC14
	.word	.LC15
	.word	.LC18
	.word	user
	.word	.LC19
	.size	sudo, .-sudo
	.section	.rodata
	.align	2
.LC20:
	.ascii	"Unauthorized\000"
	.text
	.align	2
	.global	print_flag
	.syntax unified
	.arm
	.fpu softvfp
	.type	print_flag, %function
print_flag:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	bl	logged_in
	mov	r3, r0
	cmp	r3, #0
	beq	.L38
	ldr	r3, .L39
	ldr	r3, [r3]
	ldr	r3, [r3, #4]
	cmp	r3, #9
	beq	.L37
	ldr	r0, .L39+4
	bl	puts
	pop	{fp, pc}
.L37:
	bl	get_flag
	pop	{fp, pc}
.L38:
	nop
	pop	{fp, pc}
.L40:
	.align	2
.L39:
	.word	user
	.word	.LC20
	.size	print_flag, .-print_flag
	.section	.rodata
	.align	2
.LC21:
	.ascii	"Logged out\000"
	.text
	.align	2
	.global	logout
	.syntax unified
	.arm
	.fpu softvfp
	.type	logout, %function
logout:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	bl	logged_in
	mov	r3, r0
	cmp	r3, #0
	beq	.L44
	ldr	r3, .L45
	ldr	r3, [r3]
	ldr	r3, [r3]
	mov	r0, r3
	bl	free
	ldr	r3, .L45
	mov	r2, #0
	str	r2, [r3]
	ldr	r0, .L45+4
	bl	puts
	pop	{fp, pc}
.L44:
	nop
	pop	{fp, pc}
.L46:
	.align	2
.L45:
	.word	user
	.word	.LC21
	.size	logout, .-logout
	.section	.rodata
	.align	2
.LC22:
	.ascii	"Enter cmd: \000"
	.align	2
.LC23:
	.ascii	"user\000"
	.align	2
.LC24:
	.ascii	"login\000"
	.align	2
.LC25:
	.ascii	"sudo\000"
	.align	2
.LC26:
	.ascii	"getflag\000"
	.align	2
.LC27:
	.ascii	"logout\000"
	.align	2
.LC28:
	.ascii	"What?\000"
	.align	2
.LC29:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	main
	.syntax unified
	.arm
	.fpu softvfp
	.type	main, %function
main:
	@ args = 0, pretend = 0, frame = 536
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #536
	str	r0, [fp, #-528]
	str	r1, [fp, #-532]
	str	r2, [fp, #-536]
	ldr	r3, .L58
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	ldr	r3, .L58+4
	ldr	r3, [r3]
	mov	r1, #0
	mov	r0, r3
	bl	setbuf
	bl	menu
.L56:
	ldr	r0, .L58+8
	bl	puts
	mov	r0, #62
	bl	putchar
	mov	r0, #32
	bl	putchar
	ldr	r3, .L58+12
	ldr	r2, [r3]
	sub	r3, fp, #520
	mov	r1, #512
	mov	r0, r3
	bl	fgets
	mov	r3, r0
	cmp	r3, #0
	bne	.L48
	mov	r3, #0
	b	.L49
.L48:
	sub	r3, fp, #520
	mov	r2, #4
	ldr	r1, .L58+16
	mov	r0, r3
	bl	strncmp
	mov	r3, r0
	cmp	r3, #0
	bne	.L50
	bl	user_info
	b	.L56
.L50:
	sub	r3, fp, #520
	mov	r2, #5
	ldr	r1, .L58+20
	mov	r0, r3
	bl	strncmp
	mov	r3, r0
	cmp	r3, #0
	bne	.L52
	sub	r3, fp, #520
	mov	r0, r3
	bl	login
	b	.L56
.L52:
	sub	r3, fp, #520
	mov	r2, #4
	ldr	r1, .L58+24
	mov	r0, r3
	bl	strncmp
	mov	r3, r0
	cmp	r3, #0
	bne	.L53
	sub	r3, fp, #520
	mov	r0, r3
	bl	sudo
	b	.L56
.L53:
	sub	r3, fp, #520
	mov	r2, #7
	ldr	r1, .L58+28
	mov	r0, r3
	bl	strncmp
	mov	r3, r0
	cmp	r3, #0
	bne	.L54
	bl	print_flag
	b	.L56
.L54:
	sub	r3, fp, #520
	mov	r2, #6
	ldr	r1, .L58+32
	mov	r0, r3
	bl	strncmp
	mov	r3, r0
	cmp	r3, #0
	bne	.L55
	bl	logout
	b	.L56
.L55:
	ldr	r0, .L58+36
	bl	puts
	mov	r3, #0
.L49:
	ldr	r2, .L58
	ldr	r1, [r2]
	ldr	r2, [fp, #-8]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L57
	bl	__stack_chk_fail
.L57:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L59:
	.align	2
.L58:
	.word	.LC29
	.word	stdout
	.word	.LC22
	.word	stdin
	.word	.LC23
	.word	.LC24
	.word	.LC25
	.word	.LC26
	.word	.LC27
	.word	.LC28
	.size	main, .-main
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
