	.file	"29200.c"
	.intel_syntax noprefix
	.text
	.globl	x
	.bss
	.align 4
	.type	x, @object
	.size	x, 4
x:
	.zero	4
	.globl	i
	.align 4
	.type	i, @object
	.size	i, 4
i:
	.zero	4
	.section	.rodata
.LC0:
	.string	"r"
.LC1:
	.string	"1.in"
.LC2:
	.string	"w"
.LC3:
	.string	"1.out"
.LC4:
	.string	"1.err"
.LC5:
	.string	"%d"
	.text
	.globl	main
	.type	main, @function
main:
.LFB0:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	mov	rax, QWORD PTR stdin[rip]
	mov	rdx, rax
	lea	rsi, .LC0[rip]
	lea	rdi, .LC1[rip]
	call	freopen@PLT
	mov	rax, QWORD PTR stdout[rip]
	mov	rdx, rax
	lea	rsi, .LC2[rip]
	lea	rdi, .LC3[rip]
	call	freopen@PLT
	mov	rax, QWORD PTR stderr[rip]
	mov	rdx, rax
	lea	rsi, .LC2[rip]
	lea	rdi, .LC4[rip]
	call	freopen@PLT
	lea	rsi, x[rip]
	lea	rdi, .LC5[rip]
	mov	eax, 0
	call	__isoc99_scanf@PLT
	mov	DWORD PTR i[rip], 0
	jmp	.L2
.L5:
	mov	eax, DWORD PTR x[rip]
	and	eax, 1
	test	eax, eax
	je	.L3
	mov	edx, DWORD PTR x[rip]
	mov	eax, edx
	add	eax, eax
	add	eax, edx
	add	eax, 1
	mov	DWORD PTR x[rip], eax
	jmp	.L4
.L3:
	mov	eax, DWORD PTR x[rip]
	mov	edx, eax
	shr	edx, 31
	add	eax, edx
	sar	eax
	mov	DWORD PTR x[rip], eax
.L4:
	mov	eax, DWORD PTR i[rip]
	add	eax, 1
	mov	DWORD PTR i[rip], eax
.L2:
	mov	eax, DWORD PTR x[rip]
	cmp	eax, 1
	jne	.L5
	mov	eax, DWORD PTR i[rip]
	mov	esi, eax
	lea	rdi, .LC5[rip]
	mov	eax, 0
	call	printf@PLT
	mov	rax, QWORD PTR stdin[rip]
	mov	rdi, rax
	call	fclose@PLT
	mov	rax, QWORD PTR stdout[rip]
	mov	rdi, rax
	call	fclose@PLT
	mov	rax, QWORD PTR stderr[rip]
	mov	rdi, rax
	call	fclose@PLT
	mov	eax, 0
	pop	rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.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	"29200.c"
	.text
	.comm	x,4,4
	.comm	i,4,4
	.section	.rodata
	.align	2
.LC0:
	.ascii	"r\000"
	.align	2
.LC1:
	.ascii	"1.in\000"
	.align	2
.LC2:
	.ascii	"w\000"
	.align	2
.LC3:
	.ascii	"1.out\000"
	.align	2
.LC4:
	.ascii	"1.err\000"
	.align	2
.LC5:
	.ascii	"%d\000"
	.text
	.align	2
	.global	main
	.syntax unified
	.arm
	.fpu softvfp
	.type	main, %function
main:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	ldr	r3, .L7
	ldr	r3, [r3]
	mov	r2, r3
	ldr	r1, .L7+4
	ldr	r0, .L7+8
	bl	freopen
	ldr	r3, .L7+12
	ldr	r3, [r3]
	mov	r2, r3
	ldr	r1, .L7+16
	ldr	r0, .L7+20
	bl	freopen
	ldr	r3, .L7+24
	ldr	r3, [r3]
	mov	r2, r3
	ldr	r1, .L7+16
	ldr	r0, .L7+28
	bl	freopen
	ldr	r1, .L7+32
	ldr	r0, .L7+36
	bl	__isoc99_scanf
	ldr	r3, .L7+40
	mov	r2, #0
	str	r2, [r3]
	b	.L2
.L5:
	ldr	r3, .L7+32
	ldr	r3, [r3]
	and	r3, r3, #1
	cmp	r3, #0
	beq	.L3
	ldr	r3, .L7+32
	ldr	r2, [r3]
	mov	r3, r2
	lsl	r3, r3, #1
	add	r3, r3, r2
	add	r3, r3, #1
	ldr	r2, .L7+32
	str	r3, [r2]
	b	.L4
.L3:
	ldr	r3, .L7+32
	ldr	r3, [r3]
	lsr	r2, r3, #31
	add	r3, r2, r3
	asr	r3, r3, #1
	mov	r2, r3
	ldr	r3, .L7+32
	str	r2, [r3]
.L4:
	ldr	r3, .L7+40
	ldr	r3, [r3]
	add	r3, r3, #1
	ldr	r2, .L7+40
	str	r3, [r2]
.L2:
	ldr	r3, .L7+32
	ldr	r3, [r3]
	cmp	r3, #1
	bne	.L5
	ldr	r3, .L7+40
	ldr	r3, [r3]
	mov	r1, r3
	ldr	r0, .L7+36
	bl	printf
	ldr	r3, .L7
	ldr	r3, [r3]
	mov	r0, r3
	bl	fclose
	ldr	r3, .L7+12
	ldr	r3, [r3]
	mov	r0, r3
	bl	fclose
	ldr	r3, .L7+24
	ldr	r3, [r3]
	mov	r0, r3
	bl	fclose
	mov	r3, #0
	mov	r0, r3
	pop	{fp, pc}
.L8:
	.align	2
.L7:
	.word	stdin
	.word	.LC0
	.word	.LC1
	.word	stdout
	.word	.LC2
	.word	.LC3
	.word	stderr
	.word	.LC4
	.word	x
	.word	.LC5
	.word	i
	.size	main, .-main
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
