	.file	"245207.c"
	.intel_syntax noprefix
	.text
	.globl	creds
	.section	.rodata
.LC0:
	.string	"guest"
.LC1:
	.string	"password"
	.section	.data.rel.local,"aw"
	.align 32
	.type	creds, @object
	.size	creds, 32
creds:
	.quad	.LC0
	.quad	.LC1
	.quad	0
	.zero	8
	.section	.rodata
.LC2:
	.string	"could not read input\n"
	.text
	.type	readline, @function
readline:
.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	QWORD PTR -8[rbp], rdi
	mov	QWORD PTR -16[rbp], rsi
	mov	rdx, QWORD PTR stdin[rip]
	mov	rax, QWORD PTR -16[rbp]
	mov	ecx, eax
	mov	rax, QWORD PTR -8[rbp]
	mov	esi, ecx
	mov	rdi, rax
	call	fgets@PLT
	test	rax, rax
	jne	.L2
	mov	rax, QWORD PTR stderr[rip]
	mov	rcx, rax
	mov	edx, 21
	mov	esi, 1
	lea	rdi, .LC2[rip]
	call	fwrite@PLT
	mov	edi, 1
	call	exit@PLT
.L2:
	mov	rax, QWORD PTR -8[rbp]
	mov	rdi, rax
	call	strlen@PLT
	lea	rdx, -1[rax]
	mov	rax, QWORD PTR -8[rbp]
	add	rax, rdx
	mov	BYTE PTR [rax], 0
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	readline, .-readline
	.section	.rodata
.LC3:
	.string	"passwd: "
	.align 8
.LC4:
	.string	"user <%s>: mismatched password\n"
.LC5:
	.string	"user <%s> does not exist\n"
	.text
	.globl	login
	.type	login, @function
login:
.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, 1072
	mov	QWORD PTR -1064[rbp], rdi
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	lea	rax, creds[rip]
	mov	QWORD PTR -1048[rbp], rax
	jmp	.L4
.L8:
	mov	rax, QWORD PTR -1048[rbp]
	mov	rax, QWORD PTR [rax]
	mov	rdx, QWORD PTR -1064[rbp]
	mov	rsi, rdx
	mov	rdi, rax
	call	strcmp@PLT
	test	eax, eax
	jne	.L5
	lea	rdi, .LC3[rip]
	mov	eax, 0
	call	printf@PLT
	lea	rax, -1040[rbp]
	mov	esi, 1024
	mov	rdi, rax
	call	readline
	mov	rax, QWORD PTR -1048[rbp]
	mov	rax, QWORD PTR 8[rax]
	lea	rdx, -1040[rbp]
	mov	rsi, rdx
	mov	rdi, rax
	call	strcmp@PLT
	test	eax, eax
	jne	.L6
	mov	eax, 1
	jmp	.L9
.L6:
	mov	rax, QWORD PTR -1064[rbp]
	mov	rsi, rax
	lea	rdi, .LC4[rip]
	mov	eax, 0
	call	printf@PLT
	mov	eax, 0
	jmp	.L9
.L5:
	add	QWORD PTR -1048[rbp], 16
.L4:
	mov	rax, QWORD PTR -1048[rbp]
	mov	rax, QWORD PTR [rax]
	test	rax, rax
	jne	.L8
	mov	rax, QWORD PTR -1064[rbp]
	mov	rsi, rax
	lea	rdi, .LC5[rip]
	mov	eax, 0
	call	printf@PLT
	mov	eax, 0
.L9:
	mov	rcx, QWORD PTR -8[rbp]
	sub	rcx, QWORD PTR fs:40
	je	.L10
	call	__stack_chk_fail@PLT
.L10:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.size	login, .-login
	.section	.rodata
.LC6:
	.string	"user: "
.LC7:
	.string	"successful login: <%s>\n"
.LC8:
	.string	"login failed for: <%s>\n"
	.text
	.globl	main
	.type	main, @function
main:
.LFB8:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	sub	rsp, 1040
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	lea	rdi, .LC6[rip]
	mov	eax, 0
	call	printf@PLT
	lea	rax, -1040[rbp]
	mov	esi, 1024
	mov	rdi, rax
	call	readline
	lea	rax, -1040[rbp]
	mov	rdi, rax
	call	login
	test	eax, eax
	je	.L12
	lea	rax, -1040[rbp]
	mov	rsi, rax
	lea	rdi, .LC7[rip]
	mov	eax, 0
	call	printf@PLT
	mov	eax, 0
	jmp	.L14
.L12:
	lea	rax, -1040[rbp]
	mov	rsi, rax
	lea	rdi, .LC8[rip]
	mov	eax, 0
	call	printf@PLT
	mov	eax, 1
.L14:
	mov	rdx, QWORD PTR -8[rbp]
	sub	rdx, QWORD PTR fs:40
	je	.L15
	call	__stack_chk_fail@PLT
.L15:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE8:
	.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	"245207.c"
	.text
	.global	creds
	.section	.rodata
	.align	2
.LC0:
	.ascii	"guest\000"
	.align	2
.LC1:
	.ascii	"password\000"
	.data
	.align	2
	.type	creds, %object
	.size	creds, 16
creds:
	.word	.LC0
	.word	.LC1
	.word	0
	.space	4
	.section	.rodata
	.align	2
.LC2:
	.ascii	"could not read input\012\000"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	readline, %function
readline:
	@ 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]
	ldr	r3, [fp, #-12]
	ldr	r2, .L3
	ldr	r2, [r2]
	mov	r1, r3
	ldr	r0, [fp, #-8]
	bl	fgets
	mov	r3, r0
	cmp	r3, #0
	bne	.L2
	ldr	r3, .L3+4
	ldr	r3, [r3]
	mov	r2, #21
	mov	r1, #1
	ldr	r0, .L3+8
	bl	fwrite
	mov	r0, #1
	bl	exit
.L2:
	ldr	r0, [fp, #-8]
	bl	strlen
	mov	r3, r0
	sub	r3, r3, #1
	ldr	r2, [fp, #-8]
	add	r3, r2, r3
	mov	r2, #0
	strb	r2, [r3]
	nop
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L4:
	.align	2
.L3:
	.word	stdin
	.word	stderr
	.word	.LC2
	.size	readline, .-readline
	.section	.rodata
	.align	2
.LC3:
	.ascii	"passwd: \000"
	.align	2
.LC4:
	.ascii	"user <%s>: mismatched password\012\000"
	.align	2
.LC5:
	.ascii	"user <%s> does not exist\012\000"
	.align	2
.LC6:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	login
	.syntax unified
	.arm
	.fpu softvfp
	.type	login, %function
login:
	@ args = 0, pretend = 0, frame = 1040
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #1040
	str	r0, [fp, #-1040]
	ldr	r3, .L13
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	ldr	r3, .L13+4
	str	r3, [fp, #-1036]
	b	.L6
.L10:
	ldr	r3, [fp, #-1036]
	ldr	r3, [r3]
	ldr	r1, [fp, #-1040]
	mov	r0, r3
	bl	strcmp
	mov	r3, r0
	cmp	r3, #0
	bne	.L7
	ldr	r0, .L13+8
	bl	printf
	sub	r3, fp, #1024
	sub	r3, r3, #4
	sub	r3, r3, #4
	mov	r1, #1024
	mov	r0, r3
	bl	readline
	ldr	r3, [fp, #-1036]
	ldr	r2, [r3, #4]
	sub	r3, fp, #1024
	sub	r3, r3, #4
	sub	r3, r3, #4
	mov	r1, r3
	mov	r0, r2
	bl	strcmp
	mov	r3, r0
	cmp	r3, #0
	bne	.L8
	mov	r3, #1
	b	.L11
.L8:
	ldr	r1, [fp, #-1040]
	ldr	r0, .L13+12
	bl	printf
	mov	r3, #0
	b	.L11
.L7:
	ldr	r3, [fp, #-1036]
	add	r3, r3, #8
	str	r3, [fp, #-1036]
.L6:
	ldr	r3, [fp, #-1036]
	ldr	r3, [r3]
	cmp	r3, #0
	bne	.L10
	ldr	r1, [fp, #-1040]
	ldr	r0, .L13+16
	bl	printf
	mov	r3, #0
.L11:
	ldr	r2, .L13
	ldr	r1, [r2]
	ldr	r2, [fp, #-8]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L12
	bl	__stack_chk_fail
.L12:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L14:
	.align	2
.L13:
	.word	.LC6
	.word	creds
	.word	.LC3
	.word	.LC4
	.word	.LC5
	.size	login, .-login
	.section	.rodata
	.align	2
.LC7:
	.ascii	"user: \000"
	.align	2
.LC8:
	.ascii	"successful login: <%s>\012\000"
	.align	2
.LC9:
	.ascii	"login failed for: <%s>\012\000"
	.align	2
.LC10:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	main
	.syntax unified
	.arm
	.fpu softvfp
	.type	main, %function
main:
	@ args = 0, pretend = 0, frame = 1032
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #1024
	sub	sp, sp, #8
	ldr	r3, .L20
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	ldr	r0, .L20+4
	bl	printf
	sub	r3, fp, #1024
	sub	r3, r3, #4
	sub	r3, r3, #4
	mov	r1, #1024
	mov	r0, r3
	bl	readline
	sub	r3, fp, #1024
	sub	r3, r3, #4
	sub	r3, r3, #4
	mov	r0, r3
	bl	login
	mov	r3, r0
	cmp	r3, #0
	beq	.L16
	sub	r3, fp, #1024
	sub	r3, r3, #4
	sub	r3, r3, #4
	mov	r1, r3
	ldr	r0, .L20+8
	bl	printf
	mov	r3, #0
	b	.L18
.L16:
	sub	r3, fp, #1024
	sub	r3, r3, #4
	sub	r3, r3, #4
	mov	r1, r3
	ldr	r0, .L20+12
	bl	printf
	mov	r3, #1
.L18:
	ldr	r2, .L20
	ldr	r1, [r2]
	ldr	r2, [fp, #-8]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L19
	bl	__stack_chk_fail
.L19:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L21:
	.align	2
.L20:
	.word	.LC10
	.word	.LC7
	.word	.LC8
	.word	.LC9
	.size	main, .-main
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
