	.file	"617686.c"
	.intel_syntax noprefix
	.text
	.section	.rodata
.LC0:
	.string	"write"
	.text
	.globl	handleChar
	.type	handleChar, @function
handleChar:
.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, 32
	mov	eax, edi
	mov	DWORD PTR -24[rbp], esi
	mov	BYTE PTR -20[rbp], al
	movsx	eax, BYTE PTR -20[rbp]
	cmp	eax, 10
	je	.L2
	cmp	eax, 10
	jg	.L3
	cmp	eax, -1
	je	.L4
	cmp	eax, 9
	jne	.L3
	mov	eax, DWORD PTR pos.1[rip]
	cmp	eax, 503
	jle	.L5
	mov	eax, DWORD PTR pos.1[rip]
	movsx	rdx, eax
	mov	eax, DWORD PTR -24[rbp]
	lea	rsi, buff.0[rip]
	mov	edi, eax
	call	write@PLT
	test	rax, rax
	jns	.L6
	lea	rdi, .LC0[rip]
	call	perror@PLT
.L6:
	mov	DWORD PTR pos.1[rip], 0
.L5:
	mov	eax, DWORD PTR pos.1[rip]
	mov	DWORD PTR -4[rbp], eax
	jmp	.L7
.L8:
	mov	eax, DWORD PTR -4[rbp]
	cdqe
	lea	rdx, buff.0[rip]
	mov	BYTE PTR [rax+rdx], 32
	add	DWORD PTR -4[rbp], 1
.L7:
	mov	eax, DWORD PTR pos.1[rip]
	add	eax, 7
	cmp	DWORD PTR -4[rbp], eax
	jle	.L8
	mov	eax, DWORD PTR -4[rbp]
	mov	DWORD PTR pos.1[rip], eax
	jmp	.L9
.L4:
	mov	eax, DWORD PTR pos.1[rip]
	movsx	rdx, eax
	mov	eax, DWORD PTR -24[rbp]
	lea	rsi, buff.0[rip]
	mov	edi, eax
	call	write@PLT
	test	rax, rax
	jns	.L13
	lea	rdi, .LC0[rip]
	call	perror@PLT
	jmp	.L13
.L2:
	mov	eax, DWORD PTR pos.1[rip]
	cdqe
	lea	rcx, buff.0[rip]
	movzx	edx, BYTE PTR -20[rbp]
	mov	BYTE PTR [rax+rcx], dl
	mov	eax, DWORD PTR pos.1[rip]
	add	eax, 1
	movsx	rdx, eax
	mov	eax, DWORD PTR -24[rbp]
	lea	rsi, buff.0[rip]
	mov	edi, eax
	call	write@PLT
	test	rax, rax
	jns	.L11
	lea	rdi, .LC0[rip]
	call	perror@PLT
.L11:
	mov	DWORD PTR pos.1[rip], 0
	jmp	.L9
.L3:
	mov	eax, DWORD PTR pos.1[rip]
	lea	edx, 1[rax]
	mov	DWORD PTR pos.1[rip], edx
	cdqe
	lea	rcx, buff.0[rip]
	movzx	edx, BYTE PTR -20[rbp]
	mov	BYTE PTR [rax+rcx], dl
	jmp	.L9
.L13:
	nop
.L9:
	mov	eax, 0
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	handleChar, .-handleChar
	.section	.rodata
.LC1:
	.string	"Usage: %s <file name>\n"
.LC2:
	.string	"-h"
.LC3:
	.string	"Contert tab to 8 spaces.\n"
.LC4:
	.string	"open"
.LC5:
	.string	"_convert.tmp"
.LC6:
	.string	"read"
.LC7:
	.string	"%s.bak"
	.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, 192
	mov	DWORD PTR -180[rbp], edi
	mov	QWORD PTR -192[rbp], rsi
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	cmp	DWORD PTR -180[rbp], 1
	jg	.L15
	mov	rax, QWORD PTR -192[rbp]
	mov	rdx, QWORD PTR [rax]
	mov	rax, QWORD PTR stderr[rip]
	lea	rsi, .LC1[rip]
	mov	rdi, rax
	mov	eax, 0
	call	fprintf@PLT
	mov	edi, 1
	call	exit@PLT
.L15:
	mov	rax, QWORD PTR -192[rbp]
	add	rax, 8
	mov	rax, QWORD PTR [rax]
	lea	rsi, .LC2[rip]
	mov	rdi, rax
	call	strcmp@PLT
	test	eax, eax
	jne	.L16
	mov	rax, QWORD PTR stdout[rip]
	mov	rcx, rax
	mov	edx, 25
	mov	esi, 1
	lea	rdi, .LC3[rip]
	call	fwrite@PLT
	mov	rax, QWORD PTR -192[rbp]
	mov	rdx, QWORD PTR [rax]
	mov	rax, QWORD PTR stdout[rip]
	lea	rsi, .LC1[rip]
	mov	rdi, rax
	mov	eax, 0
	call	fprintf@PLT
.L16:
	mov	DWORD PTR -160[rbp], 0
	mov	rax, QWORD PTR -192[rbp]
	add	rax, 8
	mov	rax, QWORD PTR [rax]
	mov	esi, 0
	mov	rdi, rax
	mov	eax, 0
	call	open@PLT
	mov	DWORD PTR -160[rbp], eax
	cmp	DWORD PTR -160[rbp], 0
	jns	.L17
	lea	rdi, .LC4[rip]
	call	perror@PLT
	mov	edi, 1
	call	exit@PLT
.L17:
	mov	DWORD PTR -156[rbp], 0
	mov	DWORD PTR -152[rbp], 420
	mov	eax, DWORD PTR -152[rbp]
	mov	edx, eax
	mov	esi, 578
	lea	rdi, .LC5[rip]
	mov	eax, 0
	call	open@PLT
	mov	DWORD PTR -156[rbp], eax
	cmp	DWORD PTR -156[rbp], 0
	jns	.L19
	lea	rdi, .LC4[rip]
	call	perror@PLT
	mov	edi, 1
	call	exit@PLT
.L20:
	movzx	eax, BYTE PTR -161[rbp]
	movsx	eax, al
	mov	edx, DWORD PTR -156[rbp]
	mov	esi, edx
	mov	edi, eax
	call	handleChar
.L19:
	lea	rcx, -161[rbp]
	mov	eax, DWORD PTR -160[rbp]
	mov	edx, 1
	mov	rsi, rcx
	mov	edi, eax
	call	read@PLT
	mov	DWORD PTR -148[rbp], eax
	cmp	DWORD PTR -148[rbp], 0
	jg	.L20
	cmp	DWORD PTR -148[rbp], 0
	jne	.L21
	mov	eax, DWORD PTR -156[rbp]
	mov	esi, eax
	mov	edi, -1
	call	handleChar
	jmp	.L22
.L21:
	cmp	DWORD PTR -148[rbp], 0
	jns	.L22
	lea	rdi, .LC6[rip]
	call	perror@PLT
	mov	edi, 1
	call	exit@PLT
.L22:
	mov	rax, QWORD PTR -192[rbp]
	add	rax, 8
	mov	rdx, QWORD PTR [rax]
	lea	rax, -144[rbp]
	mov	rcx, rdx
	lea	rdx, .LC7[rip]
	mov	esi, 128
	mov	rdi, rax
	mov	eax, 0
	call	snprintf@PLT
	mov	rax, QWORD PTR -192[rbp]
	add	rax, 8
	mov	rax, QWORD PTR [rax]
	lea	rdx, -144[rbp]
	mov	rsi, rdx
	mov	rdi, rax
	call	rename@PLT
	mov	rax, QWORD PTR -192[rbp]
	add	rax, 8
	mov	rax, QWORD PTR [rax]
	mov	rsi, rax
	lea	rdi, .LC5[rip]
	call	rename@PLT
	mov	eax, 0
	mov	rcx, QWORD PTR -8[rbp]
	sub	rcx, QWORD PTR fs:40
	je	.L24
	call	__stack_chk_fail@PLT
.L24:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.size	main, .-main
	.local	pos.1
	.comm	pos.1,4,4
	.local	buff.0
	.comm	buff.0,512,32
	.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	"617686.c"
	.text
	.section	.rodata
	.align	2
.LC0:
	.ascii	"write\000"
	.text
	.align	2
	.global	handleChar
	.syntax unified
	.arm
	.fpu softvfp
	.type	handleChar, %function
handleChar:
	@ args = 0, pretend = 0, frame = 16
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #16
	mov	r3, r0
	str	r1, [fp, #-20]
	strb	r3, [fp, #-13]
	ldrb	r3, [fp, #-13]	@ zero_extendqisi2
	cmp	r3, #9
	beq	.L2
	cmp	r3, #10
	beq	.L3
	b	.L12
.L2:
	ldr	r3, .L13
	ldr	r3, [r3]
	cmp	r3, #504
	blt	.L5
	ldr	r3, .L13
	ldr	r3, [r3]
	mov	r2, r3
	ldr	r1, .L13+4
	ldr	r0, [fp, #-20]
	bl	write
	mov	r3, r0
	cmp	r3, #0
	bge	.L6
	ldr	r0, .L13+8
	bl	perror
.L6:
	ldr	r3, .L13
	mov	r2, #0
	str	r2, [r3]
.L5:
	ldr	r3, .L13
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	b	.L7
.L8:
	ldr	r2, .L13+4
	ldr	r3, [fp, #-8]
	add	r3, r2, r3
	mov	r2, #32
	strb	r2, [r3]
	ldr	r3, [fp, #-8]
	add	r3, r3, #1
	str	r3, [fp, #-8]
.L7:
	ldr	r3, .L13
	ldr	r3, [r3]
	add	r3, r3, #7
	ldr	r2, [fp, #-8]
	cmp	r2, r3
	ble	.L8
	ldr	r2, .L13
	ldr	r3, [fp, #-8]
	str	r3, [r2]
	b	.L9
.L3:
	ldr	r3, .L13
	ldr	r3, [r3]
	ldr	r1, .L13+4
	ldrb	r2, [fp, #-13]
	strb	r2, [r1, r3]
	ldr	r3, .L13
	ldr	r3, [r3]
	add	r3, r3, #1
	mov	r2, r3
	ldr	r1, .L13+4
	ldr	r0, [fp, #-20]
	bl	write
	mov	r3, r0
	cmp	r3, #0
	bge	.L10
	ldr	r0, .L13+8
	bl	perror
.L10:
	ldr	r3, .L13
	mov	r2, #0
	str	r2, [r3]
	b	.L9
.L12:
	ldr	r3, .L13
	ldr	r3, [r3]
	add	r2, r3, #1
	ldr	r1, .L13
	str	r2, [r1]
	ldr	r1, .L13+4
	ldrb	r2, [fp, #-13]
	strb	r2, [r1, r3]
	nop
.L9:
	mov	r3, #0
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L14:
	.align	2
.L13:
	.word	pos.5954
	.word	buff.5953
	.word	.LC0
	.size	handleChar, .-handleChar
	.section	.rodata
	.align	2
.LC1:
	.ascii	"Usage: %s <file name>\012\000"
	.align	2
.LC2:
	.ascii	"-h\000"
	.align	2
.LC3:
	.ascii	"Contert tab to 8 spaces.\012\000"
	.align	2
.LC4:
	.ascii	"open\000"
	.align	2
.LC5:
	.ascii	"_convert.tmp\000"
	.align	2
.LC6:
	.ascii	"read\000"
	.align	2
.LC7:
	.ascii	"%s.bak\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 = 160
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #160
	str	r0, [fp, #-160]
	str	r1, [fp, #-164]
	ldr	r3, .L26
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	ldr	r3, [fp, #-160]
	cmp	r3, #1
	bgt	.L16
	ldr	r3, .L26+4
	ldr	r0, [r3]
	ldr	r3, [fp, #-164]
	ldr	r3, [r3]
	mov	r2, r3
	ldr	r1, .L26+8
	bl	fprintf
	mov	r0, #1
	bl	exit
.L16:
	ldr	r3, [fp, #-164]
	add	r3, r3, #4
	ldr	r3, [r3]
	ldr	r1, .L26+12
	mov	r0, r3
	bl	strcmp
	mov	r3, r0
	cmp	r3, #0
	bne	.L17
	ldr	r3, .L26+16
	ldr	r3, [r3]
	mov	r2, #25
	mov	r1, #1
	ldr	r0, .L26+20
	bl	fwrite
	ldr	r3, .L26+16
	ldr	r0, [r3]
	ldr	r3, [fp, #-164]
	ldr	r3, [r3]
	mov	r2, r3
	ldr	r1, .L26+8
	bl	fprintf
.L17:
	mov	r3, #0
	str	r3, [fp, #-152]
	ldr	r3, [fp, #-164]
	add	r3, r3, #4
	ldr	r3, [r3]
	mov	r1, #0
	mov	r0, r3
	bl	open
	str	r0, [fp, #-152]
	ldr	r3, [fp, #-152]
	cmp	r3, #0
	bge	.L18
	ldr	r0, .L26+24
	bl	perror
	mov	r0, #1
	bl	exit
.L18:
	mov	r3, #0
	str	r3, [fp, #-148]
	mov	r3, #420
	str	r3, [fp, #-144]
	ldr	r2, [fp, #-144]
	ldr	r1, .L26+28
	ldr	r0, .L26+32
	bl	open
	str	r0, [fp, #-148]
	ldr	r3, [fp, #-148]
	cmp	r3, #0
	bge	.L20
	ldr	r0, .L26+24
	bl	perror
	mov	r0, #1
	bl	exit
.L21:
	ldrb	r3, [fp, #-153]	@ zero_extendqisi2
	ldr	r1, [fp, #-148]
	mov	r0, r3
	bl	handleChar
.L20:
	sub	r3, fp, #153
	mov	r2, #1
	mov	r1, r3
	ldr	r0, [fp, #-152]
	bl	read
	str	r0, [fp, #-140]
	ldr	r3, [fp, #-140]
	cmp	r3, #0
	bgt	.L21
	ldr	r3, [fp, #-140]
	cmp	r3, #0
	bne	.L22
	ldr	r1, [fp, #-148]
	mov	r0, #255
	bl	handleChar
	b	.L23
.L22:
	ldr	r3, [fp, #-140]
	cmp	r3, #0
	bge	.L23
	ldr	r0, .L26+36
	bl	perror
	mov	r0, #1
	bl	exit
.L23:
	ldr	r3, [fp, #-164]
	add	r3, r3, #4
	ldr	r3, [r3]
	sub	r0, fp, #136
	ldr	r2, .L26+40
	mov	r1, #128
	bl	snprintf
	ldr	r3, [fp, #-164]
	add	r3, r3, #4
	ldr	r3, [r3]
	sub	r2, fp, #136
	mov	r1, r2
	mov	r0, r3
	bl	rename
	ldr	r3, [fp, #-164]
	add	r3, r3, #4
	ldr	r3, [r3]
	mov	r1, r3
	ldr	r0, .L26+32
	bl	rename
	mov	r3, #0
	ldr	r2, .L26
	ldr	r1, [r2]
	ldr	r2, [fp, #-8]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L25
	bl	__stack_chk_fail
.L25:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L27:
	.align	2
.L26:
	.word	.LC8
	.word	stderr
	.word	.LC1
	.word	.LC2
	.word	stdout
	.word	.LC3
	.word	.LC4
	.word	578
	.word	.LC5
	.word	.LC6
	.word	.LC7
	.size	main, .-main
	.local	pos.5954
	.comm	pos.5954,4,4
	.local	buff.5953
	.comm	buff.5953,512,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
