	.file	"105718.c"
	.intel_syntax noprefix
	.text
	.section	.rodata
.LC0:
	.string	"r"
.LC1:
	.string	"/etc/passwd"
	.text
	.globl	getpw
	.type	getpw, @function
getpw:
.LFB0:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	push	r14
	push	r13
	push	r12
	push	rbx
	sub	rsp, 16
	.cfi_offset 14, -24
	.cfi_offset 13, -32
	.cfi_offset 12, -40
	.cfi_offset 3, -48
	mov	DWORD PTR -36[rbp], edi
	mov	QWORD PTR -48[rbp], rsi
	lea	rsi, .LC0[rip]
	lea	rdi, .LC1[rip]
	call	fopen@PLT
	mov	r14, rax
	test	r14, r14
	jne	.L2
	mov	eax, 1
	jmp	.L3
.L2:
	mov	r12, QWORD PTR -48[rbp]
	jmp	.L4
.L6:
	cmp	ebx, -1
	jne	.L5
	mov	eax, 1
	jmp	.L3
.L5:
	mov	rax, r12
	lea	r12, 1[rax]
	mov	edx, ebx
	mov	BYTE PTR [rax], dl
.L4:
	mov	rdi, r14
	call	getc@PLT
	mov	ebx, eax
	cmp	ebx, 10
	jne	.L6
	mov	rax, r12
	lea	r12, 1[rax]
	mov	BYTE PTR [rax], 0
	mov	r12, QWORD PTR -48[rbp]
	mov	r13d, 2
	jmp	.L7
.L9:
	mov	ebx, 0
	test	ebx, ebx
	je	.L8
	mov	eax, 1
	jmp	.L3
.L8:
	mov	rax, r12
	lea	r12, 1[rax]
	movzx	eax, BYTE PTR [rax]
	movsx	ebx, al
	cmp	ebx, 58
	jne	.L9
	sub	r13d, 1
.L7:
	test	r13d, r13d
	jne	.L8
	mov	r13d, 0
	jmp	.L11
.L14:
	cmp	ebx, 47
	jle	.L12
	cmp	ebx, 57
	jle	.L13
.L12:
	mov	eax, 1
	jmp	.L3
.L13:
	mov	eax, r13d
	sal	eax, 2
	add	eax, r13d
	add	eax, eax
	mov	edx, eax
	lea	eax, -48[rbx]
	lea	r13d, [rdx+rax]
.L11:
	mov	rax, r12
	lea	r12, 1[rax]
	movzx	eax, BYTE PTR [rax]
	movsx	ebx, al
	cmp	ebx, 58
	jne	.L14
	cmp	r13d, DWORD PTR -36[rbp]
	jne	.L2
	mov	eax, 0
.L3:
	add	rsp, 16
	pop	rbx
	pop	r12
	pop	r13
	pop	r14
	pop	rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.size	getpw, .-getpw
	.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	"105718.c"
	.text
	.section	.rodata
	.align	2
.LC0:
	.ascii	"r\000"
	.align	2
.LC1:
	.ascii	"/etc/passwd\000"
	.text
	.align	2
	.global	getpw
	.syntax unified
	.arm
	.fpu softvfp
	.type	getpw, %function
getpw:
	@ args = 0, pretend = 0, frame = 8
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, fp, lr}
	add	fp, sp, #20
	sub	sp, sp, #8
	str	r0, [fp, #-24]
	str	r1, [fp, #-28]
	ldr	r1, .L16
	ldr	r0, .L16+4
	bl	fopen
	mov	r7, r0
	cmp	r7, #0
	bne	.L2
	mov	r3, #1
	b	.L3
.L2:
	ldr	r6, [fp, #-28]
	b	.L4
.L6:
	cmn	r4, #1
	bne	.L5
	mov	r3, #1
	b	.L3
.L5:
	mov	r3, r6
	add	r6, r3, #1
	and	r2, r4, #255
	strb	r2, [r3]
.L4:
	mov	r0, r7
	bl	getc
	mov	r4, r0
	cmp	r4, #10
	bne	.L6
	mov	r3, r6
	add	r6, r3, #1
	mov	r2, #0
	strb	r2, [r3]
	ldr	r6, [fp, #-28]
	mov	r5, #2
	b	.L7
.L9:
	mov	r4, #0
	cmp	r4, #0
	beq	.L8
	mov	r3, #1
	b	.L3
.L8:
	mov	r3, r6
	add	r6, r3, #1
	ldrb	r3, [r3]	@ zero_extendqisi2
	mov	r4, r3
	cmp	r4, #58
	bne	.L9
	sub	r5, r5, #1
.L7:
	cmp	r5, #0
	bne	.L8
	mov	r5, #0
	b	.L11
.L14:
	cmp	r4, #47
	ble	.L12
	cmp	r4, #57
	ble	.L13
.L12:
	mov	r3, #1
	b	.L3
.L13:
	mov	r3, r5
	lsl	r3, r3, #2
	add	r3, r3, r5
	lsl	r3, r3, #1
	mov	r2, r3
	sub	r3, r4, #48
	add	r5, r2, r3
.L11:
	mov	r3, r6
	add	r6, r3, #1
	ldrb	r3, [r3]	@ zero_extendqisi2
	mov	r4, r3
	cmp	r4, #58
	bne	.L14
	ldr	r3, [fp, #-24]
	cmp	r5, r3
	bne	.L2
	mov	r3, #0
.L3:
	mov	r0, r3
	sub	sp, fp, #20
	@ sp needed
	pop	{r4, r5, r6, r7, fp, pc}
.L17:
	.align	2
.L16:
	.word	.LC0
	.word	.LC1
	.size	getpw, .-getpw
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
