	.file	"568121.c"
	.intel_syntax noprefix
	.text
	.section	.rodata
.LC0:
	.string	"-"
.LC1:
	.string	"cat: open"
.LC2:
	.string	"cat: fstat"
	.align 8
.LC3:
	.string	"cat: warning: st_blksize is 0\n"
.LC4:
	.string	"cat: malloc"
.LC5:
	.string	"cat: read"
	.text
	.type	cat_file, @function
cat_file:
.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	QWORD PTR -200[rbp], rdi
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	mov	rax, QWORD PTR -200[rbp]
	lea	rsi, .LC0[rip]
	mov	rdi, rax
	call	strcmp@PLT
	test	eax, eax
	jne	.L2
	mov	DWORD PTR -180[rbp], 0
	jmp	.L3
.L2:
	mov	rax, QWORD PTR -200[rbp]
	mov	esi, 0
	mov	rdi, rax
	mov	eax, 0
	call	open@PLT
	mov	DWORD PTR -180[rbp], eax
	cmp	DWORD PTR -180[rbp], 0
	jns	.L3
	lea	rdi, .LC1[rip]
	call	perror@PLT
	mov	eax, 0
	jmp	.L12
.L3:
	lea	rdx, -160[rbp]
	mov	eax, DWORD PTR -180[rbp]
	mov	rsi, rdx
	mov	edi, eax
	call	fstat@PLT
	test	eax, eax
	je	.L5
	lea	rdi, .LC2[rip]
	call	perror@PLT
	mov	eax, DWORD PTR -180[rbp]
	mov	edi, eax
	call	close@PLT
	mov	eax, 0
	jmp	.L12
.L5:
	mov	rax, QWORD PTR -104[rbp]
	test	rax, rax
	jne	.L6
	mov	rax, QWORD PTR stderr[rip]
	mov	rcx, rax
	mov	edx, 30
	mov	esi, 1
	lea	rdi, .LC3[rip]
	call	fwrite@PLT
	mov	QWORD PTR -104[rbp], 1
.L6:
	mov	rax, QWORD PTR -104[rbp]
	mov	rdi, rax
	call	malloc@PLT
	mov	QWORD PTR -176[rbp], rax
	cmp	QWORD PTR -176[rbp], 0
	jne	.L7
	lea	rdi, .LC4[rip]
	call	perror@PLT
	mov	eax, DWORD PTR -180[rbp]
	mov	edi, eax
	call	close@PLT
	mov	eax, 0
	jmp	.L12
.L7:
	mov	BYTE PTR -181[rbp], 1
.L11:
	mov	rax, QWORD PTR -104[rbp]
	mov	rdx, rax
	mov	rcx, QWORD PTR -176[rbp]
	mov	eax, DWORD PTR -180[rbp]
	mov	rsi, rcx
	mov	edi, eax
	call	read@PLT
	mov	QWORD PTR -168[rbp], rax
	cmp	QWORD PTR -168[rbp], 0
	jns	.L8
	lea	rdi, .LC5[rip]
	call	perror@PLT
	mov	BYTE PTR -181[rbp], 0
	jmp	.L9
.L8:
	cmp	QWORD PTR -168[rbp], 0
	je	.L14
	mov	rdx, QWORD PTR stdout[rip]
	mov	rsi, QWORD PTR -168[rbp]
	mov	rax, QWORD PTR -176[rbp]
	mov	rcx, rdx
	mov	edx, 1
	mov	rdi, rax
	call	fwrite@PLT
	jmp	.L11
.L14:
	nop
.L9:
	mov	rax, QWORD PTR -176[rbp]
	mov	rdi, rax
	call	free@PLT
	mov	eax, DWORD PTR -180[rbp]
	mov	edi, eax
	call	close@PLT
	movzx	eax, BYTE PTR -181[rbp]
.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	cat_file, .-cat_file
	.section	.rodata
.LC6:
	.string	"--help"
.LC7:
	.string	"Usage: cat file..."
	.text
	.globl	main
	.type	main, @function
main:
.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, 32
	mov	DWORD PTR -20[rbp], edi
	mov	QWORD PTR -32[rbp], rsi
	cmp	DWORD PTR -20[rbp], 1
	jle	.L16
	mov	rax, QWORD PTR -32[rbp]
	add	rax, 8
	mov	rax, QWORD PTR [rax]
	lea	rsi, .LC6[rip]
	mov	rdi, rax
	call	strcmp@PLT
	test	eax, eax
	jne	.L16
	lea	rdi, .LC7[rip]
	call	puts@PLT
	mov	eax, 0
	jmp	.L17
.L16:
	mov	DWORD PTR -8[rbp], 0
	cmp	DWORD PTR -20[rbp], 1
	jg	.L18
	lea	rdi, .LC0[rip]
	call	cat_file
	xor	eax, 1
	test	al, al
	je	.L19
	mov	DWORD PTR -8[rbp], 1
	jmp	.L19
.L18:
	mov	DWORD PTR -4[rbp], 1
	jmp	.L20
.L22:
	mov	eax, DWORD PTR -4[rbp]
	cdqe
	lea	rdx, 0[0+rax*8]
	mov	rax, QWORD PTR -32[rbp]
	add	rax, rdx
	mov	rax, QWORD PTR [rax]
	mov	rdi, rax
	call	cat_file
	xor	eax, 1
	test	al, al
	je	.L21
	mov	DWORD PTR -8[rbp], 1
.L21:
	add	DWORD PTR -4[rbp], 1
.L20:
	mov	eax, DWORD PTR -4[rbp]
	cmp	eax, DWORD PTR -20[rbp]
	jl	.L22
.L19:
	mov	eax, DWORD PTR -8[rbp]
.L17:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.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	"568121.c"
	.text
	.section	.rodata
	.align	2
.LC0:
	.ascii	"-\000"
	.align	2
.LC1:
	.ascii	"cat: open\000"
	.align	2
.LC2:
	.ascii	"cat: fstat\000"
	.align	2
.LC3:
	.ascii	"cat: warning: st_blksize is 0\012\000"
	.align	2
.LC4:
	.ascii	"cat: malloc\000"
	.align	2
.LC5:
	.ascii	"cat: read\000"
	.align	2
.LC6:
	.word	__stack_chk_guard
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	cat_file, %function
cat_file:
	@ args = 0, pretend = 0, frame = 120
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #120
	str	r0, [fp, #-120]
	ldr	r3, .L15
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	ldr	r1, .L15+4
	ldr	r0, [fp, #-120]
	bl	strcmp
	mov	r3, r0
	cmp	r3, #0
	bne	.L2
	mov	r3, #0
	str	r3, [fp, #-112]
	b	.L3
.L2:
	mov	r1, #0
	ldr	r0, [fp, #-120]
	bl	open
	str	r0, [fp, #-112]
	ldr	r3, [fp, #-112]
	cmp	r3, #0
	bge	.L3
	ldr	r0, .L15+8
	bl	perror
	mov	r3, #0
	b	.L12
.L3:
	sub	r3, fp, #100
	mov	r1, r3
	ldr	r0, [fp, #-112]
	bl	fstat
	mov	r3, r0
	cmp	r3, #0
	beq	.L5
	ldr	r0, .L15+12
	bl	perror
	ldr	r0, [fp, #-112]
	bl	close
	mov	r3, #0
	b	.L12
.L5:
	ldr	r3, [fp, #-52]
	cmp	r3, #0
	bne	.L6
	ldr	r3, .L15+16
	ldr	r3, [r3]
	mov	r2, #30
	mov	r1, #1
	ldr	r0, .L15+20
	bl	fwrite
	mov	r3, #1
	str	r3, [fp, #-52]
.L6:
	ldr	r3, [fp, #-52]
	mov	r0, r3
	bl	malloc
	mov	r3, r0
	str	r3, [fp, #-108]
	ldr	r3, [fp, #-108]
	cmp	r3, #0
	bne	.L7
	ldr	r0, .L15+24
	bl	perror
	ldr	r0, [fp, #-112]
	bl	close
	mov	r3, #0
	b	.L12
.L7:
	mov	r3, #1
	strb	r3, [fp, #-113]
.L11:
	ldr	r3, [fp, #-52]
	mov	r2, r3
	ldr	r1, [fp, #-108]
	ldr	r0, [fp, #-112]
	bl	read
	str	r0, [fp, #-104]
	ldr	r3, [fp, #-104]
	cmp	r3, #0
	bge	.L8
	ldr	r0, .L15+28
	bl	perror
	mov	r3, #0
	strb	r3, [fp, #-113]
	b	.L9
.L8:
	ldr	r3, [fp, #-104]
	cmp	r3, #0
	beq	.L14
	ldr	r1, [fp, #-104]
	ldr	r3, .L15+32
	ldr	r3, [r3]
	mov	r2, #1
	ldr	r0, [fp, #-108]
	bl	fwrite
	b	.L11
.L14:
	nop
.L9:
	ldr	r0, [fp, #-108]
	bl	free
	ldr	r0, [fp, #-112]
	bl	close
	ldrb	r3, [fp, #-113]	@ zero_extendqisi2
.L12:
	ldr	r2, .L15
	ldr	r1, [r2]
	ldr	r2, [fp, #-8]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L13
	bl	__stack_chk_fail
.L13:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L16:
	.align	2
.L15:
	.word	.LC6
	.word	.LC0
	.word	.LC1
	.word	.LC2
	.word	stderr
	.word	.LC3
	.word	.LC4
	.word	.LC5
	.word	stdout
	.size	cat_file, .-cat_file
	.section	.rodata
	.align	2
.LC7:
	.ascii	"--help\000"
	.align	2
.LC8:
	.ascii	"Usage: cat file...\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]
	ldr	r3, [fp, #-16]
	cmp	r3, #1
	ble	.L18
	ldr	r3, [fp, #-20]
	add	r3, r3, #4
	ldr	r3, [r3]
	ldr	r1, .L25
	mov	r0, r3
	bl	strcmp
	mov	r3, r0
	cmp	r3, #0
	bne	.L18
	ldr	r0, .L25+4
	bl	puts
	mov	r3, #0
	b	.L19
.L18:
	mov	r3, #0
	str	r3, [fp, #-12]
	ldr	r3, [fp, #-16]
	cmp	r3, #1
	bgt	.L20
	ldr	r0, .L25+8
	bl	cat_file
	mov	r3, r0
	eor	r3, r3, #1
	and	r3, r3, #255
	cmp	r3, #0
	beq	.L21
	mov	r3, #1
	str	r3, [fp, #-12]
	b	.L21
.L20:
	mov	r3, #1
	str	r3, [fp, #-8]
	b	.L22
.L24:
	ldr	r3, [fp, #-8]
	lsl	r3, r3, #2
	ldr	r2, [fp, #-20]
	add	r3, r2, r3
	ldr	r3, [r3]
	mov	r0, r3
	bl	cat_file
	mov	r3, r0
	eor	r3, r3, #1
	and	r3, r3, #255
	cmp	r3, #0
	beq	.L23
	mov	r3, #1
	str	r3, [fp, #-12]
.L23:
	ldr	r3, [fp, #-8]
	add	r3, r3, #1
	str	r3, [fp, #-8]
.L22:
	ldr	r2, [fp, #-8]
	ldr	r3, [fp, #-16]
	cmp	r2, r3
	blt	.L24
.L21:
	ldr	r3, [fp, #-12]
.L19:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L26:
	.align	2
.L25:
	.word	.LC7
	.word	.LC8
	.word	.LC0
	.size	main, .-main
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
