	.file	"410152.c"
	.intel_syntax noprefix
	.text
	.section	.rodata
.LC0:
	.string	"Usage %s char file\n"
.LC1:
	.string	"r"
.LC2:
	.string	"Can't open file %s\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, 320
	mov	DWORD PTR -308[rbp], edi
	mov	QWORD PTR -320[rbp], rsi
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	cmp	DWORD PTR -308[rbp], 2
	jg	.L2
	mov	rax, QWORD PTR -320[rbp]
	mov	rdx, QWORD PTR [rax]
	mov	rax, QWORD PTR stderr[rip]
	lea	rsi, .LC0[rip]
	mov	rdi, rax
	mov	eax, 0
	call	fprintf@PLT
	mov	edi, 1
	call	exit@PLT
.L2:
	mov	rax, QWORD PTR -320[rbp]
	add	rax, 16
	mov	rax, QWORD PTR [rax]
	lea	rsi, .LC1[rip]
	mov	rdi, rax
	call	fopen@PLT
	mov	QWORD PTR -296[rbp], rax
	cmp	QWORD PTR -296[rbp], 0
	jne	.L4
	mov	rax, QWORD PTR -320[rbp]
	add	rax, 16
	mov	rdx, QWORD PTR [rax]
	mov	rax, QWORD PTR stderr[rip]
	lea	rsi, .LC2[rip]
	mov	rdi, rax
	mov	eax, 0
	call	fprintf@PLT
	mov	edi, 1
	call	exit@PLT
.L5:
	mov	rax, QWORD PTR -320[rbp]
	add	rax, 8
	mov	rax, QWORD PTR [rax]
	movzx	eax, BYTE PTR [rax]
	mov	BYTE PTR -297[rbp], al
	movsx	edx, BYTE PTR -297[rbp]
	mov	rax, QWORD PTR -288[rbp]
	mov	esi, edx
	mov	rdi, rax
	call	strchr@PLT
	mov	QWORD PTR -280[rbp], rax
	cmp	QWORD PTR -280[rbp], 0
	je	.L4
	mov	rax, QWORD PTR -288[rbp]
	mov	rdi, rax
	call	puts@PLT
.L4:
	mov	rcx, QWORD PTR -296[rbp]
	lea	rax, -272[rbp]
	mov	edx, 256
	mov	rsi, rcx
	mov	rdi, rax
	call	s_gets
	mov	QWORD PTR -288[rbp], rax
	cmp	QWORD PTR -288[rbp], 0
	jne	.L5
	mov	rax, QWORD PTR -296[rbp]
	mov	rdi, rax
	call	fclose@PLT
	mov	eax, 0
	mov	rcx, QWORD PTR -8[rbp]
	sub	rcx, QWORD PTR fs:40
	je	.L7
	call	__stack_chk_fail@PLT
.L7:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	main, .-main
	.globl	s_gets
	.type	s_gets, @function
s_gets:
.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, 48
	mov	QWORD PTR -24[rbp], rdi
	mov	QWORD PTR -32[rbp], rsi
	mov	DWORD PTR -36[rbp], edx
	mov	rdx, QWORD PTR -32[rbp]
	mov	ecx, DWORD PTR -36[rbp]
	mov	rax, QWORD PTR -24[rbp]
	mov	esi, ecx
	mov	rdi, rax
	call	fgets@PLT
	mov	QWORD PTR -16[rbp], rax
	cmp	QWORD PTR -16[rbp], 0
	je	.L9
	mov	rax, QWORD PTR -24[rbp]
	mov	esi, 10
	mov	rdi, rax
	call	strchr@PLT
	mov	QWORD PTR -8[rbp], rax
	cmp	QWORD PTR -8[rbp], 0
	je	.L9
	mov	rax, QWORD PTR -8[rbp]
	mov	BYTE PTR [rax], 0
.L9:
	mov	rax, QWORD PTR -16[rbp]
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.size	s_gets, .-s_gets
	.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	"410152.c"
	.text
	.section	.rodata
	.align	2
.LC0:
	.ascii	"Usage %s char file\012\000"
	.align	2
.LC1:
	.ascii	"r\000"
	.align	2
.LC2:
	.ascii	"Can't open file %s\012\000"
	.align	2
.LC3:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	main
	.syntax unified
	.arm
	.fpu softvfp
	.type	main, %function
main:
	@ args = 0, pretend = 0, frame = 288
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #288
	str	r0, [fp, #-288]
	str	r1, [fp, #-292]
	ldr	r3, .L8
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	ldr	r3, [fp, #-288]
	cmp	r3, #2
	bgt	.L2
	ldr	r3, .L8+4
	ldr	r0, [r3]
	ldr	r3, [fp, #-292]
	ldr	r3, [r3]
	mov	r2, r3
	ldr	r1, .L8+8
	bl	fprintf
	mov	r0, #1
	bl	exit
.L2:
	ldr	r3, [fp, #-292]
	add	r3, r3, #8
	ldr	r3, [r3]
	ldr	r1, .L8+12
	mov	r0, r3
	bl	fopen
	str	r0, [fp, #-276]
	ldr	r3, [fp, #-276]
	cmp	r3, #0
	bne	.L4
	ldr	r3, .L8+4
	ldr	r0, [r3]
	ldr	r3, [fp, #-292]
	add	r3, r3, #8
	ldr	r3, [r3]
	mov	r2, r3
	ldr	r1, .L8+16
	bl	fprintf
	mov	r0, #1
	bl	exit
.L5:
	ldr	r3, [fp, #-292]
	add	r3, r3, #4
	ldr	r3, [r3]
	ldrb	r3, [r3]
	strb	r3, [fp, #-277]
	ldrb	r3, [fp, #-277]	@ zero_extendqisi2
	mov	r1, r3
	ldr	r0, [fp, #-272]
	bl	strchr
	str	r0, [fp, #-268]
	ldr	r3, [fp, #-268]
	cmp	r3, #0
	beq	.L4
	ldr	r0, [fp, #-272]
	bl	puts
.L4:
	sub	r3, fp, #264
	mov	r2, #256
	ldr	r1, [fp, #-276]
	mov	r0, r3
	bl	s_gets
	str	r0, [fp, #-272]
	ldr	r3, [fp, #-272]
	cmp	r3, #0
	bne	.L5
	ldr	r0, [fp, #-276]
	bl	fclose
	mov	r3, #0
	ldr	r2, .L8
	ldr	r1, [r2]
	ldr	r2, [fp, #-8]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L7
	bl	__stack_chk_fail
.L7:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L9:
	.align	2
.L8:
	.word	.LC3
	.word	stderr
	.word	.LC0
	.word	.LC1
	.word	.LC2
	.size	main, .-main
	.align	2
	.global	s_gets
	.syntax unified
	.arm
	.fpu softvfp
	.type	s_gets, %function
s_gets:
	@ args = 0, pretend = 0, frame = 24
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #24
	str	r0, [fp, #-16]
	str	r1, [fp, #-20]
	str	r2, [fp, #-24]
	ldr	r2, [fp, #-20]
	ldr	r1, [fp, #-24]
	ldr	r0, [fp, #-16]
	bl	fgets
	str	r0, [fp, #-12]
	ldr	r3, [fp, #-12]
	cmp	r3, #0
	beq	.L11
	mov	r1, #10
	ldr	r0, [fp, #-16]
	bl	strchr
	str	r0, [fp, #-8]
	ldr	r3, [fp, #-8]
	cmp	r3, #0
	beq	.L11
	ldr	r3, [fp, #-8]
	mov	r2, #0
	strb	r2, [r3]
.L11:
	ldr	r3, [fp, #-12]
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
	.size	s_gets, .-s_gets
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
