	.file	"503946.c"
	.intel_syntax noprefix
	.text
	.section	.rodata
.LC0:
	.string	"usage: %s <input file>\n"
.LC1:
	.string	"r"
	.align 8
.LC2:
	.string	"unable to open input file %s for reading: %s\n"
	.align 8
.LC3:
	.string	"failed to stat input file %s: %s\n"
	.align 8
.LC4:
	.string	"failed to allocate %ld bytes of memory: %s\n"
	.align 8
.LC5:
	.string	"failed to read %ld bytes from %s: %s\n"
.LC6:
	.string	"%.2x"
.LC7:
	.string	"w"
	.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, 208
	mov	DWORD PTR -196[rbp], edi
	mov	QWORD PTR -208[rbp], rsi
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	mov	rax, QWORD PTR -208[rbp]
	add	rax, 8
	mov	rax, QWORD PTR [rax]
	test	rax, rax
	jne	.L2
	mov	rax, QWORD PTR -208[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	eax, 1
	jmp	.L12
.L2:
	mov	rax, QWORD PTR -208[rbp]
	add	rax, 8
	mov	rax, QWORD PTR [rax]
	lea	rsi, .LC1[rip]
	mov	rdi, rax
	call	fopen@PLT
	mov	QWORD PTR -184[rbp], rax
	cmp	QWORD PTR -184[rbp], 0
	jne	.L4
	call	__errno_location@PLT
	mov	eax, DWORD PTR [rax]
	mov	edi, eax
	call	strerror@PLT
	mov	rcx, rax
	mov	rax, QWORD PTR -208[rbp]
	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	eax, 1
	jmp	.L12
.L4:
	mov	rax, QWORD PTR -208[rbp]
	add	rax, 8
	mov	rax, QWORD PTR [rax]
	lea	rdx, -160[rbp]
	mov	rsi, rdx
	mov	rdi, rax
	call	stat@PLT
	test	eax, eax
	jns	.L5
	call	__errno_location@PLT
	mov	eax, DWORD PTR [rax]
	mov	edi, eax
	call	strerror@PLT
	mov	rcx, rax
	mov	rax, QWORD PTR -208[rbp]
	mov	rdx, QWORD PTR [rax]
	mov	rax, QWORD PTR stderr[rip]
	lea	rsi, .LC3[rip]
	mov	rdi, rax
	mov	eax, 0
	call	fprintf@PLT
	mov	eax, 1
	jmp	.L12
.L5:
	mov	rax, QWORD PTR -112[rbp]
	mov	rdi, rax
	call	malloc@PLT
	mov	QWORD PTR -176[rbp], rax
	cmp	QWORD PTR -176[rbp], 0
	jne	.L6
	call	__errno_location@PLT
	mov	eax, DWORD PTR [rax]
	mov	edi, eax
	call	strerror@PLT
	mov	rcx, rax
	mov	rdx, QWORD PTR -112[rbp]
	mov	rax, QWORD PTR stderr[rip]
	lea	rsi, .LC4[rip]
	mov	rdi, rax
	mov	eax, 0
	call	fprintf@PLT
	mov	eax, 1
	jmp	.L12
.L6:
	mov	rax, QWORD PTR -112[rbp]
	mov	rsi, rax
	mov	rdx, QWORD PTR -184[rbp]
	mov	rax, QWORD PTR -176[rbp]
	mov	rcx, rdx
	mov	rdx, rsi
	mov	esi, 1
	mov	rdi, rax
	call	fread@PLT
	mov	rdx, QWORD PTR -112[rbp]
	cmp	rax, rdx
	je	.L7
	call	__errno_location@PLT
	mov	eax, DWORD PTR [rax]
	mov	edi, eax
	call	strerror@PLT
	mov	rsi, rax
	mov	rax, QWORD PTR -208[rbp]
	add	rax, 8
	mov	rcx, QWORD PTR [rax]
	mov	rdx, QWORD PTR -112[rbp]
	mov	rax, QWORD PTR stderr[rip]
	mov	r8, rsi
	lea	rsi, .LC5[rip]
	mov	rdi, rax
	mov	eax, 0
	call	fprintf@PLT
	mov	eax, 1
	jmp	.L12
.L7:
	mov	DWORD PTR -188[rbp], 0
	jmp	.L8
.L11:
	mov	edx, DWORD PTR -188[rbp]
	lea	rax, -10[rbp]
	lea	rsi, .LC6[rip]
	mov	rdi, rax
	mov	eax, 0
	call	sprintf@PLT
	lea	rax, -10[rbp]
	lea	rsi, .LC7[rip]
	mov	rdi, rax
	call	fopen@PLT
	mov	QWORD PTR -168[rbp], rax
	mov	DWORD PTR -192[rbp], 0
	jmp	.L9
.L10:
	mov	eax, DWORD PTR -192[rbp]
	movsx	rdx, eax
	mov	rax, QWORD PTR -176[rbp]
	add	rax, rdx
	movzx	eax, BYTE PTR [rax]
	movsx	eax, al
	xor	eax, DWORD PTR -188[rbp]
	mov	rdx, QWORD PTR -168[rbp]
	mov	rsi, rdx
	mov	edi, eax
	call	fputc@PLT
	add	DWORD PTR -192[rbp], 1
.L9:
	mov	eax, DWORD PTR -192[rbp]
	movsx	rdx, eax
	mov	rax, QWORD PTR -112[rbp]
	cmp	rdx, rax
	jl	.L10
	mov	rax, QWORD PTR -168[rbp]
	mov	rdi, rax
	call	fclose@PLT
	add	DWORD PTR -188[rbp], 1
.L8:
	cmp	DWORD PTR -188[rbp], 255
	jle	.L11
	mov	rax, QWORD PTR -184[rbp]
	mov	rdi, rax
	call	fclose@PLT
	mov	rax, QWORD PTR -176[rbp]
	mov	rdi, rax
	call	free@PLT
	mov	eax, 0
.L12:
	mov	rcx, QWORD PTR -8[rbp]
	sub	rcx, QWORD PTR fs:40
	je	.L13
	call	__stack_chk_fail@PLT
.L13:
	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	"503946.c"
	.text
	.section	.rodata
	.align	2
.LC0:
	.ascii	"usage: %s <input file>\012\000"
	.align	2
.LC1:
	.ascii	"r\000"
	.align	2
.LC2:
	.ascii	"unable to open input file %s for reading: %s\012\000"
	.align	2
.LC3:
	.ascii	"failed to stat input file %s: %s\012\000"
	.align	2
.LC4:
	.ascii	"failed to allocate %ld bytes of memory: %s\012\000"
	.align	2
.LC5:
	.ascii	"failed to read %ld bytes from %s: %s\012\000"
	.align	2
.LC6:
	.ascii	"%.2x\000"
	.align	2
.LC7:
	.ascii	"w\000"
	.align	2
.LC8:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	main
	.syntax unified
	.arm
	.fpu softvfp
	.type	main, %function
main:
	@ args = 0, pretend = 0, frame = 128
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{r4, r5, r6, fp, lr}
	add	fp, sp, #16
	sub	sp, sp, #140
	str	r0, [fp, #-144]
	str	r1, [fp, #-148]
	ldr	r3, .L14
	ldr	r3, [r3]
	str	r3, [fp, #-24]
	mov	r3,#0
	ldr	r3, [fp, #-148]
	add	r3, r3, #4
	ldr	r3, [r3]
	cmp	r3, #0
	bne	.L2
	ldr	r3, .L14+4
	ldr	r0, [r3]
	ldr	r3, [fp, #-148]
	ldr	r3, [r3]
	mov	r2, r3
	ldr	r1, .L14+8
	bl	fprintf
	mov	r3, #1
	b	.L12
.L2:
	ldr	r3, [fp, #-148]
	add	r3, r3, #4
	ldr	r3, [r3]
	ldr	r1, .L14+12
	mov	r0, r3
	bl	fopen
	str	r0, [fp, #-128]
	ldr	r3, [fp, #-128]
	cmp	r3, #0
	bne	.L4
	ldr	r3, .L14+4
	ldr	r4, [r3]
	ldr	r3, [fp, #-148]
	ldr	r5, [r3]
	bl	__errno_location
	mov	r3, r0
	ldr	r3, [r3]
	mov	r0, r3
	bl	strerror
	mov	r3, r0
	mov	r2, r5
	ldr	r1, .L14+16
	mov	r0, r4
	bl	fprintf
	mov	r3, #1
	b	.L12
.L4:
	ldr	r3, [fp, #-148]
	add	r3, r3, #4
	ldr	r3, [r3]
	sub	r2, fp, #116
	mov	r1, r2
	mov	r0, r3
	bl	stat
	mov	r3, r0
	cmp	r3, #0
	bge	.L5
	ldr	r3, .L14+4
	ldr	r4, [r3]
	ldr	r3, [fp, #-148]
	ldr	r5, [r3]
	bl	__errno_location
	mov	r3, r0
	ldr	r3, [r3]
	mov	r0, r3
	bl	strerror
	mov	r3, r0
	mov	r2, r5
	ldr	r1, .L14+20
	mov	r0, r4
	bl	fprintf
	mov	r3, #1
	b	.L12
.L5:
	ldr	r3, [fp, #-72]
	mov	r0, r3
	bl	malloc
	mov	r3, r0
	str	r3, [fp, #-124]
	ldr	r3, [fp, #-124]
	cmp	r3, #0
	bne	.L6
	ldr	r3, .L14+4
	ldr	r4, [r3]
	ldr	r5, [fp, #-72]
	bl	__errno_location
	mov	r3, r0
	ldr	r3, [r3]
	mov	r0, r3
	bl	strerror
	mov	r3, r0
	mov	r2, r5
	ldr	r1, .L14+24
	mov	r0, r4
	bl	fprintf
	mov	r3, #1
	b	.L12
.L6:
	ldr	r3, [fp, #-72]
	mov	r2, r3
	ldr	r3, [fp, #-128]
	mov	r1, #1
	ldr	r0, [fp, #-124]
	bl	fread
	mov	r3, r0
	ldr	r2, [fp, #-72]
	cmp	r3, r2
	beq	.L7
	ldr	r3, .L14+4
	ldr	r4, [r3]
	ldr	r5, [fp, #-72]
	ldr	r3, [fp, #-148]
	add	r3, r3, #4
	ldr	r6, [r3]
	bl	__errno_location
	mov	r3, r0
	ldr	r3, [r3]
	mov	r0, r3
	bl	strerror
	mov	r3, r0
	str	r3, [sp]
	mov	r3, r6
	mov	r2, r5
	ldr	r1, .L14+28
	mov	r0, r4
	bl	fprintf
	mov	r3, #1
	b	.L12
.L7:
	mov	r3, #0
	str	r3, [fp, #-132]
	b	.L8
.L11:
	sub	r3, fp, #28
	ldr	r2, [fp, #-132]
	ldr	r1, .L14+32
	mov	r0, r3
	bl	sprintf
	sub	r3, fp, #28
	ldr	r1, .L14+36
	mov	r0, r3
	bl	fopen
	str	r0, [fp, #-120]
	mov	r3, #0
	str	r3, [fp, #-136]
	b	.L9
.L10:
	ldr	r3, [fp, #-136]
	ldr	r2, [fp, #-124]
	add	r3, r2, r3
	ldrb	r3, [r3]	@ zero_extendqisi2
	mov	r2, r3
	ldr	r3, [fp, #-132]
	eor	r3, r3, r2
	ldr	r1, [fp, #-120]
	mov	r0, r3
	bl	fputc
	ldr	r3, [fp, #-136]
	add	r3, r3, #1
	str	r3, [fp, #-136]
.L9:
	ldr	r3, [fp, #-72]
	ldr	r2, [fp, #-136]
	cmp	r2, r3
	blt	.L10
	ldr	r0, [fp, #-120]
	bl	fclose
	ldr	r3, [fp, #-132]
	add	r3, r3, #1
	str	r3, [fp, #-132]
.L8:
	ldr	r3, [fp, #-132]
	cmp	r3, #255
	ble	.L11
	ldr	r0, [fp, #-128]
	bl	fclose
	ldr	r0, [fp, #-124]
	bl	free
	mov	r3, #0
.L12:
	ldr	r2, .L14
	ldr	r1, [r2]
	ldr	r2, [fp, #-24]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L13
	bl	__stack_chk_fail
.L13:
	mov	r0, r3
	sub	sp, fp, #16
	@ sp needed
	pop	{r4, r5, r6, fp, pc}
.L15:
	.align	2
.L14:
	.word	.LC8
	.word	stderr
	.word	.LC0
	.word	.LC1
	.word	.LC2
	.word	.LC3
	.word	.LC4
	.word	.LC5
	.word	.LC6
	.word	.LC7
	.size	main, .-main
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
