	.file	"673877.c"
	.intel_syntax noprefix
	.text
	.local	loggedin
	.comm	loggedin,1,1
	.globl	my_memset_s
	.type	my_memset_s, @function
my_memset_s:
.LFB6:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	mov	QWORD PTR -24[rbp], rdi
	mov	DWORD PTR -28[rbp], esi
	mov	QWORD PTR -40[rbp], rdx
	mov	rax, QWORD PTR -24[rbp]
	mov	QWORD PTR -8[rbp], rax
	jmp	.L2
.L3:
	mov	rax, QWORD PTR -8[rbp]
	lea	rdx, 1[rax]
	mov	QWORD PTR -8[rbp], rdx
	mov	edx, DWORD PTR -28[rbp]
	mov	BYTE PTR [rax], dl
.L2:
	mov	rax, QWORD PTR -40[rbp]
	lea	rdx, -1[rax]
	mov	QWORD PTR -40[rbp], rdx
	test	rax, rax
	jne	.L3
	mov	rax, QWORD PTR -24[rbp]
	pop	rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	my_memset_s, .-my_memset_s
	.section	.rodata
.LC0:
	.string	"\n"
	.text
	.globl	getpass_r
	.type	getpass_r, @function
getpass_r:
.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, 240
	mov	QWORD PTR -232[rbp], rdi
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	mov	QWORD PTR -80[rbp], 0
	mov	QWORD PTR -72[rbp], 0
	mov	QWORD PTR -64[rbp], 0
	mov	QWORD PTR -56[rbp], 0
	mov	QWORD PTR -48[rbp], 0
	mov	QWORD PTR -40[rbp], 0
	mov	QWORD PTR -32[rbp], 0
	mov	QWORD PTR -24[rbp], 0
	mov	QWORD PTR -216[rbp], 0
	mov	rax, QWORD PTR stdin[rip]
	mov	rdi, rax
	call	fileno@PLT
	mov	edx, eax
	lea	rax, -208[rbp]
	mov	rsi, rax
	mov	edi, edx
	call	tcgetattr@PLT
	test	eax, eax
	je	.L6
	mov	eax, 0
	jmp	.L11
.L6:
	mov	rax, QWORD PTR -208[rbp]
	mov	rdx, QWORD PTR -200[rbp]
	mov	QWORD PTR -144[rbp], rax
	mov	QWORD PTR -136[rbp], rdx
	mov	rax, QWORD PTR -192[rbp]
	mov	rdx, QWORD PTR -184[rbp]
	mov	QWORD PTR -128[rbp], rax
	mov	QWORD PTR -120[rbp], rdx
	mov	rax, QWORD PTR -176[rbp]
	mov	rdx, QWORD PTR -168[rbp]
	mov	QWORD PTR -112[rbp], rax
	mov	QWORD PTR -104[rbp], rdx
	mov	rax, QWORD PTR -160[rbp]
	mov	QWORD PTR -96[rbp], rax
	mov	eax, DWORD PTR -152[rbp]
	mov	DWORD PTR -88[rbp], eax
	mov	eax, DWORD PTR -132[rbp]
	and	eax, -9
	mov	DWORD PTR -132[rbp], eax
	mov	eax, DWORD PTR -132[rbp]
	or	eax, 64
	mov	DWORD PTR -132[rbp], eax
	mov	rax, QWORD PTR stdin[rip]
	mov	rdi, rax
	call	fileno@PLT
	mov	ecx, eax
	lea	rax, -144[rbp]
	mov	rdx, rax
	mov	esi, 2
	mov	edi, ecx
	call	tcsetattr@PLT
	test	eax, eax
	je	.L8
	mov	eax, 0
	jmp	.L11
.L8:
	mov	rdx, QWORD PTR stderr[rip]
	mov	rax, QWORD PTR -232[rbp]
	mov	rsi, rdx
	mov	rdi, rax
	call	fputs@PLT
	mov	rdx, QWORD PTR stdin[rip]
	lea	rax, -80[rbp]
	mov	esi, 64
	mov	rdi, rax
	call	fgets@PLT
	mov	QWORD PTR -216[rbp], rax
	mov	rax, QWORD PTR stdin[rip]
	mov	rdi, rax
	call	fileno@PLT
	mov	ecx, eax
	lea	rax, -208[rbp]
	mov	rdx, rax
	mov	esi, 2
	mov	edi, ecx
	call	tcsetattr@PLT
	test	eax, eax
	je	.L9
	lea	rax, -80[rbp]
	mov	edx, 64
	mov	esi, 0
	mov	rdi, rax
	call	my_memset_s
	mov	eax, 0
	jmp	.L11
.L9:
	cmp	QWORD PTR -216[rbp], 0
	je	.L10
	lea	rax, -80[rbp]
	lea	rsi, .LC0[rip]
	mov	rdi, rax
	call	strtok@PLT
	lea	rax, -80[rbp]
	mov	rdi, rax
	call	strdup@PLT
	mov	QWORD PTR -216[rbp], rax
	lea	rax, -80[rbp]
	mov	edx, 64
	mov	esi, 0
	mov	rdi, rax
	call	my_memset_s
.L10:
	mov	rax, QWORD PTR -216[rbp]
.L11:
	mov	rcx, QWORD PTR -8[rbp]
	sub	rcx, QWORD PTR fs:40
	je	.L12
	call	__stack_chk_fail@PLT
.L12:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.size	getpass_r, .-getpass_r
	.section	.rodata
.LC1:
	.string	"Password: "
.LC2:
	.string	"0xDEADBEEF"
.LC3:
	.string	"Logged in"
.LC4:
	.string	"Wrong password"
	.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, 32
	mov	DWORD PTR -20[rbp], edi
	mov	QWORD PTR -32[rbp], rsi
	mov	DWORD PTR -12[rbp], 0
	jmp	.L14
.L18:
	lea	rdi, .LC1[rip]
	call	getpass_r
	mov	QWORD PTR -8[rbp], rax
	cmp	QWORD PTR -8[rbp], 0
	je	.L14
	mov	rax, QWORD PTR -8[rbp]
	lea	rsi, .LC2[rip]
	mov	rdi, rax
	call	strcmp@PLT
	test	eax, eax
	jne	.L15
	mov	BYTE PTR loggedin[rip], 1
	lea	rdi, .LC3[rip]
	call	puts@PLT
	jmp	.L16
.L15:
	lea	rdi, .LC4[rip]
	call	puts@PLT
.L16:
	mov	rax, QWORD PTR -8[rbp]
	mov	rdi, rax
	call	strlen@PLT
	mov	rdx, rax
	mov	rax, QWORD PTR -8[rbp]
	mov	esi, 0
	mov	rdi, rax
	call	my_memset_s
	mov	rax, QWORD PTR -8[rbp]
	mov	rdi, rax
	call	free@PLT
.L14:
	mov	eax, DWORD PTR -12[rbp]
	lea	edx, 1[rax]
	mov	DWORD PTR -12[rbp], edx
	cmp	eax, 2
	jg	.L17
	movzx	eax, BYTE PTR loggedin[rip]
	xor	eax, 1
	test	al, al
	jne	.L18
.L17:
	mov	eax, 0
	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	"673877.c"
	.text
	.local	loggedin
	.comm	loggedin,1,1
	.align	2
	.global	my_memset_s
	.syntax unified
	.arm
	.fpu softvfp
	.type	my_memset_s, %function
my_memset_s:
	@ args = 0, pretend = 0, frame = 24
	@ frame_needed = 1, uses_anonymous_args = 0
	@ link register save eliminated.
	str	fp, [sp, #-4]!
	add	fp, sp, #0
	sub	sp, sp, #28
	str	r0, [fp, #-16]
	str	r1, [fp, #-20]
	str	r2, [fp, #-24]
	ldr	r3, [fp, #-16]
	str	r3, [fp, #-8]
	b	.L2
.L3:
	ldr	r3, [fp, #-8]
	add	r2, r3, #1
	str	r2, [fp, #-8]
	ldr	r2, [fp, #-20]
	and	r2, r2, #255
	strb	r2, [r3]
.L2:
	ldr	r3, [fp, #-24]
	sub	r2, r3, #1
	str	r2, [fp, #-24]
	cmp	r3, #0
	bne	.L3
	ldr	r3, [fp, #-16]
	mov	r0, r3
	add	sp, fp, #0
	@ sp needed
	ldr	fp, [sp], #4
	bx	lr
	.size	my_memset_s, .-my_memset_s
	.section	.rodata
	.align	2
.LC0:
	.ascii	"\012\000"
	.align	2
.LC1:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	getpass_r
	.syntax unified
	.arm
	.fpu softvfp
	.type	getpass_r, %function
getpass_r:
	@ args = 0, pretend = 0, frame = 200
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #200
	str	r0, [fp, #-200]
	ldr	r3, .L13
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	mov	r3, #0
	str	r3, [fp, #-72]
	sub	r3, fp, #68
	mov	r2, #60
	mov	r1, #0
	mov	r0, r3
	bl	memset
	mov	r3, #0
	str	r3, [fp, #-196]
	ldr	r3, .L13+4
	ldr	r3, [r3]
	mov	r0, r3
	bl	fileno
	mov	r2, r0
	sub	r3, fp, #192
	mov	r1, r3
	mov	r0, r2
	bl	tcgetattr
	mov	r3, r0
	cmp	r3, #0
	beq	.L6
	mov	r3, #0
	b	.L11
.L6:
	sub	ip, fp, #132
	sub	lr, fp, #192
	ldmia	lr!, {r0, r1, r2, r3}
	stmia	ip!, {r0, r1, r2, r3}
	ldmia	lr!, {r0, r1, r2, r3}
	stmia	ip!, {r0, r1, r2, r3}
	ldmia	lr!, {r0, r1, r2, r3}
	stmia	ip!, {r0, r1, r2, r3}
	ldm	lr, {r0, r1, r2}
	stm	ip, {r0, r1, r2}
	ldr	r3, [fp, #-120]
	bic	r3, r3, #8
	str	r3, [fp, #-120]
	ldr	r3, [fp, #-120]
	orr	r3, r3, #64
	str	r3, [fp, #-120]
	ldr	r3, .L13+4
	ldr	r3, [r3]
	mov	r0, r3
	bl	fileno
	sub	r3, fp, #132
	mov	r2, r3
	mov	r1, #2
	bl	tcsetattr
	mov	r3, r0
	cmp	r3, #0
	beq	.L8
	mov	r3, #0
	b	.L11
.L8:
	ldr	r3, .L13+8
	ldr	r3, [r3]
	mov	r1, r3
	ldr	r0, [fp, #-200]
	bl	fputs
	ldr	r3, .L13+4
	ldr	r2, [r3]
	sub	r3, fp, #72
	mov	r1, #64
	mov	r0, r3
	bl	fgets
	str	r0, [fp, #-196]
	ldr	r3, .L13+4
	ldr	r3, [r3]
	mov	r0, r3
	bl	fileno
	sub	r3, fp, #192
	mov	r2, r3
	mov	r1, #2
	bl	tcsetattr
	mov	r3, r0
	cmp	r3, #0
	beq	.L9
	sub	r3, fp, #72
	mov	r2, #64
	mov	r1, #0
	mov	r0, r3
	bl	my_memset_s
	mov	r3, #0
	b	.L11
.L9:
	ldr	r3, [fp, #-196]
	cmp	r3, #0
	beq	.L10
	sub	r3, fp, #72
	ldr	r1, .L13+12
	mov	r0, r3
	bl	strtok
	sub	r3, fp, #72
	mov	r0, r3
	bl	strdup
	mov	r3, r0
	str	r3, [fp, #-196]
	sub	r3, fp, #72
	mov	r2, #64
	mov	r1, #0
	mov	r0, r3
	bl	my_memset_s
.L10:
	ldr	r3, [fp, #-196]
.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	.LC1
	.word	stdin
	.word	stderr
	.word	.LC0
	.size	getpass_r, .-getpass_r
	.section	.rodata
	.align	2
.LC2:
	.ascii	"Password: \000"
	.align	2
.LC3:
	.ascii	"0xDEADBEEF\000"
	.align	2
.LC4:
	.ascii	"Logged in\000"
	.align	2
.LC5:
	.ascii	"Wrong password\000"
	.text
	.align	2
	.global	main
	.syntax unified
	.arm
	.fpu softvfp
	.type	main, %function
main:
	@ 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]
	str	r1, [fp, #-20]
	mov	r3, #0
	str	r3, [fp, #-12]
	b	.L16
.L20:
	ldr	r0, .L22
	bl	getpass_r
	str	r0, [fp, #-8]
	ldr	r3, [fp, #-8]
	cmp	r3, #0
	beq	.L16
	ldr	r1, .L22+4
	ldr	r0, [fp, #-8]
	bl	strcmp
	mov	r3, r0
	cmp	r3, #0
	bne	.L17
	ldr	r3, .L22+8
	mov	r2, #1
	strb	r2, [r3]
	ldr	r0, .L22+12
	bl	puts
	b	.L18
.L17:
	ldr	r0, .L22+16
	bl	puts
.L18:
	ldr	r0, [fp, #-8]
	bl	strlen
	mov	r3, r0
	mov	r2, r3
	mov	r1, #0
	ldr	r0, [fp, #-8]
	bl	my_memset_s
	ldr	r0, [fp, #-8]
	bl	free
.L16:
	ldr	r3, [fp, #-12]
	add	r2, r3, #1
	str	r2, [fp, #-12]
	cmp	r3, #2
	bgt	.L19
	ldr	r3, .L22+8
	ldrb	r3, [r3]	@ zero_extendqisi2
	eor	r3, r3, #1
	and	r3, r3, #255
	cmp	r3, #0
	bne	.L20
.L19:
	mov	r3, #0
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L23:
	.align	2
.L22:
	.word	.LC2
	.word	.LC3
	.word	loggedin
	.word	.LC4
	.word	.LC5
	.size	main, .-main
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
