	.file	"930079.c"
	.intel_syntax noprefix
	.text
	.section	.rodata
.LC0:
	.string	"fgets"
.LC1:
	.string	"pipe"
.LC2:
	.string	"fork"
.LC3:
	.string	"close"
.LC4:
	.string	"write"
.LC5:
	.string	"dup2"
.LC6:
	.string	"validate"
.LC7:
	.string	"./validate"
.LC8:
	.string	"exec"
.LC9:
	.string	"wait"
.LC10:
	.string	"should not be here"
.LC11:
	.string	"Password verified"
.LC12:
	.string	"Invalid password"
.LC13:
	.string	"No such user"
.LC14:
	.string	"Child returned an error\n"
	.text
	.globl	main
	.type	main, @function
main:
.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, 560
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	mov	rdx, QWORD PTR stdin[rip]
	lea	rax, -528[rbp]
	mov	esi, 256
	mov	rdi, rax
	call	fgets@PLT
	test	rax, rax
	jne	.L2
	lea	rdi, .LC0[rip]
	call	perror@PLT
	mov	edi, 1
	call	exit@PLT
.L2:
	mov	rdx, QWORD PTR stdin[rip]
	lea	rax, -272[rbp]
	mov	esi, 256
	mov	rdi, rax
	call	fgets@PLT
	test	rax, rax
	jne	.L3
	lea	rdi, .LC0[rip]
	call	perror@PLT
	mov	edi, 1
	call	exit@PLT
.L3:
	lea	rax, -536[rbp]
	mov	rdi, rax
	call	pipe@PLT
	cmp	eax, -1
	jne	.L4
	lea	rdi, .LC1[rip]
	call	perror@PLT
	mov	edi, 1
	call	exit@PLT
.L4:
	call	fork@PLT
	mov	DWORD PTR -548[rbp], eax
	cmp	DWORD PTR -548[rbp], 0
	jns	.L5
	lea	rdi, .LC2[rip]
	call	perror@PLT
	mov	edi, 1
	call	exit@PLT
.L5:
	cmp	DWORD PTR -548[rbp], 0
	jle	.L6
	mov	eax, DWORD PTR -536[rbp]
	mov	edi, eax
	call	close@PLT
	cmp	eax, -1
	jne	.L7
	lea	rdi, .LC3[rip]
	call	perror@PLT
	mov	edi, 1
	call	exit@PLT
.L7:
	mov	eax, DWORD PTR -532[rbp]
	lea	rcx, -528[rbp]
	mov	edx, 10
	mov	rsi, rcx
	mov	edi, eax
	call	write@PLT
	cmp	rax, -1
	jne	.L8
	lea	rdi, .LC4[rip]
	call	perror@PLT
	mov	edi, 1
	call	exit@PLT
.L8:
	mov	eax, DWORD PTR -532[rbp]
	lea	rcx, -272[rbp]
	mov	edx, 10
	mov	rsi, rcx
	mov	edi, eax
	call	write@PLT
	cmp	rax, -1
	jne	.L9
	lea	rdi, .LC4[rip]
	call	perror@PLT
	mov	edi, 1
	call	exit@PLT
.L9:
	mov	eax, DWORD PTR -532[rbp]
	mov	edi, eax
	call	close@PLT
	cmp	eax, -1
	jne	.L10
	lea	rdi, .LC3[rip]
	call	perror@PLT
	mov	edi, 1
	call	exit@PLT
.L6:
	mov	eax, DWORD PTR -532[rbp]
	mov	edi, eax
	call	close@PLT
	cmp	eax, -1
	jne	.L11
	lea	rdi, .LC3[rip]
	call	perror@PLT
	mov	edi, 1
	call	exit@PLT
.L11:
	mov	eax, DWORD PTR -536[rbp]
	mov	esi, 0
	mov	edi, eax
	call	dup2@PLT
	cmp	eax, -1
	jne	.L12
	lea	rdi, .LC5[rip]
	call	perror@PLT
	mov	edi, 1
	call	exit@PLT
.L12:
	mov	eax, DWORD PTR -536[rbp]
	mov	edi, eax
	call	close@PLT
	cmp	eax, -1
	jne	.L13
	lea	rdi, .LC3[rip]
	call	perror@PLT
	mov	edi, 1
	call	exit@PLT
.L13:
	mov	edx, 0
	lea	rsi, .LC6[rip]
	lea	rdi, .LC7[rip]
	mov	eax, 0
	call	execl@PLT
	lea	rdi, .LC8[rip]
	call	perror@PLT
	mov	edi, 1
	call	exit@PLT
.L10:
	lea	rax, -552[rbp]
	mov	rdi, rax
	call	wait@PLT
	mov	DWORD PTR -544[rbp], eax
	cmp	DWORD PTR -544[rbp], -1
	jne	.L14
	lea	rdi, .LC9[rip]
	call	perror@PLT
	mov	edi, 1
	call	exit@PLT
.L14:
	mov	eax, DWORD PTR -552[rbp]
	and	eax, 127
	test	eax, eax
	jne	.L15
	mov	eax, DWORD PTR -552[rbp]
	sar	eax, 8
	and	eax, 255
	mov	DWORD PTR -540[rbp], eax
	cmp	DWORD PTR -540[rbp], 0
	jne	.L17
	jmp	.L23
.L15:
	mov	rax, QWORD PTR stderr[rip]
	mov	rcx, rax
	mov	edx, 18
	mov	esi, 1
	lea	rdi, .LC10[rip]
	call	fwrite@PLT
	mov	edi, 1
	call	exit@PLT
.L23:
	lea	rdi, .LC11[rip]
	call	puts@PLT
	jmp	.L18
.L17:
	cmp	DWORD PTR -540[rbp], 2
	jne	.L19
	lea	rdi, .LC12[rip]
	call	puts@PLT
	jmp	.L18
.L19:
	cmp	DWORD PTR -540[rbp], 3
	jne	.L20
	lea	rdi, .LC13[rip]
	call	puts@PLT
	jmp	.L18
.L20:
	mov	rax, QWORD PTR stderr[rip]
	mov	rcx, rax
	mov	edx, 24
	mov	esi, 1
	lea	rdi, .LC14[rip]
	call	fwrite@PLT
.L18:
	mov	eax, 0
	mov	rcx, QWORD PTR -8[rbp]
	sub	rcx, QWORD PTR fs:40
	je	.L22
	call	__stack_chk_fail@PLT
.L22:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.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	"930079.c"
	.text
	.section	.rodata
	.align	2
.LC0:
	.ascii	"fgets\000"
	.align	2
.LC1:
	.ascii	"pipe\000"
	.align	2
.LC2:
	.ascii	"fork\000"
	.align	2
.LC3:
	.ascii	"close\000"
	.align	2
.LC4:
	.ascii	"write\000"
	.align	2
.LC5:
	.ascii	"dup2\000"
	.align	2
.LC6:
	.ascii	"validate\000"
	.align	2
.LC7:
	.ascii	"./validate\000"
	.align	2
.LC8:
	.ascii	"exec\000"
	.align	2
.LC9:
	.ascii	"wait\000"
	.align	2
.LC10:
	.ascii	"should not be here\000"
	.align	2
.LC11:
	.ascii	"Password verified\000"
	.align	2
.LC12:
	.ascii	"Invalid password\000"
	.align	2
.LC13:
	.ascii	"No such user\000"
	.align	2
.LC14:
	.ascii	"Child returned an error\012\000"
	.align	2
.LC15:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	main
	.syntax unified
	.arm
	.fpu softvfp
	.type	main, %function
main:
	@ args = 0, pretend = 0, frame = 544
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #544
	ldr	r3, .L24
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	ldr	r3, .L24+4
	ldr	r2, [r3]
	sub	r3, fp, #520
	mov	r1, #256
	mov	r0, r3
	bl	fgets
	mov	r3, r0
	cmp	r3, #0
	bne	.L2
	ldr	r0, .L24+8
	bl	perror
	mov	r0, #1
	bl	exit
.L2:
	ldr	r3, .L24+4
	ldr	r2, [r3]
	sub	r3, fp, #264
	mov	r1, #256
	mov	r0, r3
	bl	fgets
	mov	r3, r0
	cmp	r3, #0
	bne	.L3
	ldr	r0, .L24+8
	bl	perror
	mov	r0, #1
	bl	exit
.L3:
	sub	r3, fp, #528
	mov	r0, r3
	bl	pipe
	mov	r3, r0
	cmn	r3, #1
	bne	.L4
	ldr	r0, .L24+12
	bl	perror
	mov	r0, #1
	bl	exit
.L4:
	bl	fork
	mov	r3, r0
	str	r3, [fp, #-540]
	ldr	r3, [fp, #-540]
	cmp	r3, #0
	bge	.L5
	ldr	r0, .L24+16
	bl	perror
	mov	r0, #1
	bl	exit
.L5:
	ldr	r3, [fp, #-540]
	cmp	r3, #0
	ble	.L6
	ldr	r3, [fp, #-528]
	mov	r0, r3
	bl	close
	mov	r3, r0
	cmn	r3, #1
	bne	.L7
	ldr	r0, .L24+20
	bl	perror
	mov	r0, #1
	bl	exit
.L7:
	ldr	r3, [fp, #-524]
	sub	r1, fp, #520
	mov	r2, #10
	mov	r0, r3
	bl	write
	mov	r3, r0
	cmn	r3, #1
	bne	.L8
	ldr	r0, .L24+24
	bl	perror
	mov	r0, #1
	bl	exit
.L8:
	ldr	r3, [fp, #-524]
	sub	r1, fp, #264
	mov	r2, #10
	mov	r0, r3
	bl	write
	mov	r3, r0
	cmn	r3, #1
	bne	.L9
	ldr	r0, .L24+24
	bl	perror
	mov	r0, #1
	bl	exit
.L9:
	ldr	r3, [fp, #-524]
	mov	r0, r3
	bl	close
	mov	r3, r0
	cmn	r3, #1
	bne	.L10
	ldr	r0, .L24+20
	bl	perror
	mov	r0, #1
	bl	exit
.L6:
	ldr	r3, [fp, #-524]
	mov	r0, r3
	bl	close
	mov	r3, r0
	cmn	r3, #1
	bne	.L11
	ldr	r0, .L24+20
	bl	perror
	mov	r0, #1
	bl	exit
.L11:
	ldr	r3, [fp, #-528]
	mov	r1, #0
	mov	r0, r3
	bl	dup2
	mov	r3, r0
	cmn	r3, #1
	bne	.L12
	ldr	r0, .L24+28
	bl	perror
	mov	r0, #1
	bl	exit
.L12:
	ldr	r3, [fp, #-528]
	mov	r0, r3
	bl	close
	mov	r3, r0
	cmn	r3, #1
	bne	.L13
	ldr	r0, .L24+20
	bl	perror
	mov	r0, #1
	bl	exit
.L13:
	mov	r2, #0
	ldr	r1, .L24+32
	ldr	r0, .L24+36
	bl	execl
	ldr	r0, .L24+40
	bl	perror
	mov	r0, #1
	bl	exit
.L10:
	sub	r3, fp, #544
	mov	r0, r3
	bl	wait
	str	r0, [fp, #-536]
	ldr	r3, [fp, #-536]
	cmn	r3, #1
	bne	.L14
	ldr	r0, .L24+44
	bl	perror
	mov	r0, #1
	bl	exit
.L14:
	ldr	r3, [fp, #-544]
	and	r3, r3, #127
	cmp	r3, #0
	bne	.L15
	ldr	r3, [fp, #-544]
	asr	r3, r3, #8
	and	r3, r3, #255
	str	r3, [fp, #-532]
	ldr	r3, [fp, #-532]
	cmp	r3, #0
	bne	.L17
	b	.L23
.L15:
	ldr	r3, .L24+48
	ldr	r3, [r3]
	mov	r2, #18
	mov	r1, #1
	ldr	r0, .L24+52
	bl	fwrite
	mov	r0, #1
	bl	exit
.L23:
	ldr	r0, .L24+56
	bl	puts
	b	.L18
.L17:
	ldr	r3, [fp, #-532]
	cmp	r3, #2
	bne	.L19
	ldr	r0, .L24+60
	bl	puts
	b	.L18
.L19:
	ldr	r3, [fp, #-532]
	cmp	r3, #3
	bne	.L20
	ldr	r0, .L24+64
	bl	puts
	b	.L18
.L20:
	ldr	r3, .L24+48
	ldr	r3, [r3]
	mov	r2, #24
	mov	r1, #1
	ldr	r0, .L24+68
	bl	fwrite
.L18:
	mov	r3, #0
	ldr	r2, .L24
	ldr	r1, [r2]
	ldr	r2, [fp, #-8]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L22
	bl	__stack_chk_fail
.L22:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L25:
	.align	2
.L24:
	.word	.LC15
	.word	stdin
	.word	.LC0
	.word	.LC1
	.word	.LC2
	.word	.LC3
	.word	.LC4
	.word	.LC5
	.word	.LC6
	.word	.LC7
	.word	.LC8
	.word	.LC9
	.word	stderr
	.word	.LC10
	.word	.LC11
	.word	.LC12
	.word	.LC13
	.word	.LC14
	.size	main, .-main
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
