	.file	"20384.c"
	.intel_syntax noprefix
	.text
	.globl	ReverseStringInPlace
	.type	ReverseStringInPlace, @function
ReverseStringInPlace:
.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, 48
	mov	QWORD PTR -40[rbp], rdi
	mov	QWORD PTR -48[rbp], rsi
	cmp	QWORD PTR -40[rbp], 0
	je	.L2
	cmp	QWORD PTR -48[rbp], 0
	jne	.L3
.L2:
	call	__errno_location@PLT
	mov	DWORD PTR [rax], 22
	mov	eax, 0
	jmp	.L4
.L3:
	mov	BYTE PTR -17[rbp], 0
	mov	QWORD PTR -16[rbp], 0
	mov	rax, QWORD PTR -48[rbp]
	sub	rax, 1
	mov	QWORD PTR -8[rbp], rax
	jmp	.L5
.L6:
	mov	rdx, QWORD PTR -40[rbp]
	mov	rax, QWORD PTR -16[rbp]
	add	rax, rdx
	movzx	eax, BYTE PTR [rax]
	mov	BYTE PTR -17[rbp], al
	mov	rdx, QWORD PTR -40[rbp]
	mov	rax, QWORD PTR -8[rbp]
	add	rax, rdx
	mov	rcx, QWORD PTR -40[rbp]
	mov	rdx, QWORD PTR -16[rbp]
	add	rdx, rcx
	movzx	eax, BYTE PTR [rax]
	mov	BYTE PTR [rdx], al
	mov	rdx, QWORD PTR -40[rbp]
	mov	rax, QWORD PTR -8[rbp]
	add	rdx, rax
	movzx	eax, BYTE PTR -17[rbp]
	mov	BYTE PTR [rdx], al
	add	QWORD PTR -16[rbp], 1
	sub	QWORD PTR -8[rbp], 1
.L5:
	mov	rax, QWORD PTR -16[rbp]
	cmp	rax, QWORD PTR -8[rbp]
	jb	.L6
	mov	rax, QWORD PTR -40[rbp]
.L4:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	ReverseStringInPlace, .-ReverseStringInPlace
	.section	.rodata
.LC0:
	.string	">>> "
	.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, 48
	mov	DWORD PTR -36[rbp], edi
	mov	QWORD PTR -48[rbp], rsi
	mov	QWORD PTR -24[rbp], 128
	mov	edi, 128
	call	malloc@PLT
	mov	QWORD PTR -16[rbp], rax
	cmp	QWORD PTR -16[rbp], 0
	jne	.L8
	call	__errno_location@PLT
	mov	DWORD PTR [rax], 12
	mov	eax, 1
	jmp	.L9
.L8:
	mov	QWORD PTR -8[rbp], 0
	mov	BYTE PTR -25[rbp], 0
.L15:
	mov	QWORD PTR -8[rbp], 0
	lea	rdi, .LC0[rip]
	mov	eax, 0
	call	printf@PLT
	jmp	.L10
.L14:
	mov	rax, QWORD PTR -24[rbp]
	sub	rax, 1
	cmp	QWORD PTR -8[rbp], rax
	jb	.L11
	cmp	QWORD PTR -24[rbp], 0
	je	.L12
	mov	rax, QWORD PTR -24[rbp]
	add	rax, rax
	jmp	.L13
.L12:
	mov	eax, 128
.L13:
	mov	QWORD PTR -24[rbp], rax
	mov	rdx, QWORD PTR -24[rbp]
	mov	rax, QWORD PTR -16[rbp]
	mov	rsi, rdx
	mov	rdi, rax
	call	realloc@PLT
	mov	QWORD PTR -16[rbp], rax
	cmp	QWORD PTR -16[rbp], 0
	jne	.L11
	call	__errno_location@PLT
	mov	DWORD PTR [rax], 12
	mov	eax, 1
	jmp	.L9
.L11:
	mov	rdx, QWORD PTR -16[rbp]
	mov	rax, QWORD PTR -8[rbp]
	add	rdx, rax
	movzx	eax, BYTE PTR -25[rbp]
	mov	BYTE PTR [rdx], al
	add	QWORD PTR -8[rbp], 1
.L10:
	call	getchar@PLT
	mov	BYTE PTR -25[rbp], al
	cmp	BYTE PTR -25[rbp], 10
	jne	.L14
	mov	rdx, QWORD PTR -16[rbp]
	mov	rax, QWORD PTR -8[rbp]
	add	rax, rdx
	mov	BYTE PTR [rax], 0
	mov	rax, QWORD PTR -16[rbp]
	mov	rdi, rax
	call	strlen@PLT
	mov	rdx, rax
	mov	rax, QWORD PTR -16[rbp]
	mov	rsi, rdx
	mov	rdi, rax
	call	ReverseStringInPlace
	mov	rax, QWORD PTR -16[rbp]
	mov	rdi, rax
	call	puts@PLT
	jmp	.L15
.L9:
	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	"20384.c"
	.text
	.align	2
	.global	ReverseStringInPlace
	.syntax unified
	.arm
	.fpu softvfp
	.type	ReverseStringInPlace, %function
ReverseStringInPlace:
	@ 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, #-24]
	str	r1, [fp, #-28]
	ldr	r3, [fp, #-24]
	cmp	r3, #0
	beq	.L2
	ldr	r3, [fp, #-28]
	cmp	r3, #0
	bne	.L3
.L2:
	bl	__errno_location
	mov	r3, r0
	mov	r2, #22
	str	r2, [r3]
	mov	r3, #0
	b	.L4
.L3:
	mov	r3, #0
	strb	r3, [fp, #-13]
	mov	r3, #0
	str	r3, [fp, #-12]
	ldr	r3, [fp, #-28]
	sub	r3, r3, #1
	str	r3, [fp, #-8]
	b	.L5
.L6:
	ldr	r2, [fp, #-24]
	ldr	r3, [fp, #-12]
	add	r3, r2, r3
	ldrb	r3, [r3]
	strb	r3, [fp, #-13]
	ldr	r2, [fp, #-24]
	ldr	r3, [fp, #-8]
	add	r2, r2, r3
	ldr	r1, [fp, #-24]
	ldr	r3, [fp, #-12]
	add	r3, r1, r3
	ldrb	r2, [r2]	@ zero_extendqisi2
	strb	r2, [r3]
	ldr	r2, [fp, #-24]
	ldr	r3, [fp, #-8]
	add	r3, r2, r3
	ldrb	r2, [fp, #-13]
	strb	r2, [r3]
	ldr	r3, [fp, #-12]
	add	r3, r3, #1
	str	r3, [fp, #-12]
	ldr	r3, [fp, #-8]
	sub	r3, r3, #1
	str	r3, [fp, #-8]
.L5:
	ldr	r2, [fp, #-12]
	ldr	r3, [fp, #-8]
	cmp	r2, r3
	bcc	.L6
	ldr	r3, [fp, #-24]
.L4:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
	.size	ReverseStringInPlace, .-ReverseStringInPlace
	.section	.rodata
	.align	2
.LC0:
	.ascii	">>> \000"
	.text
	.align	2
	.global	main
	.syntax unified
	.arm
	.fpu softvfp
	.type	main, %function
main:
	@ 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, #-24]
	str	r1, [fp, #-28]
	mov	r3, #128
	str	r3, [fp, #-16]
	mov	r0, #128
	bl	malloc
	mov	r3, r0
	str	r3, [fp, #-12]
	ldr	r3, [fp, #-12]
	cmp	r3, #0
	bne	.L8
	bl	__errno_location
	mov	r3, r0
	mov	r2, #12
	str	r2, [r3]
	mov	r3, #1
	b	.L9
.L8:
	mov	r3, #0
	str	r3, [fp, #-8]
	mov	r3, #0
	strb	r3, [fp, #-17]
.L15:
	mov	r3, #0
	str	r3, [fp, #-8]
	ldr	r0, .L16
	bl	printf
	b	.L10
.L14:
	ldr	r3, [fp, #-16]
	sub	r3, r3, #1
	ldr	r2, [fp, #-8]
	cmp	r2, r3
	bcc	.L11
	ldr	r3, [fp, #-16]
	cmp	r3, #0
	beq	.L12
	ldr	r3, [fp, #-16]
	lsl	r3, r3, #1
	b	.L13
.L12:
	mov	r3, #128
.L13:
	str	r3, [fp, #-16]
	ldr	r1, [fp, #-16]
	ldr	r0, [fp, #-12]
	bl	realloc
	str	r0, [fp, #-12]
	ldr	r3, [fp, #-12]
	cmp	r3, #0
	bne	.L11
	bl	__errno_location
	mov	r3, r0
	mov	r2, #12
	str	r2, [r3]
	mov	r3, #1
	b	.L9
.L11:
	ldr	r2, [fp, #-12]
	ldr	r3, [fp, #-8]
	add	r3, r2, r3
	ldrb	r2, [fp, #-17]
	strb	r2, [r3]
	ldr	r3, [fp, #-8]
	add	r3, r3, #1
	str	r3, [fp, #-8]
.L10:
	bl	getchar
	mov	r3, r0
	strb	r3, [fp, #-17]
	ldrb	r3, [fp, #-17]	@ zero_extendqisi2
	cmp	r3, #10
	bne	.L14
	ldr	r2, [fp, #-12]
	ldr	r3, [fp, #-8]
	add	r3, r2, r3
	mov	r2, #0
	strb	r2, [r3]
	ldr	r0, [fp, #-12]
	bl	strlen
	mov	r3, r0
	mov	r1, r3
	ldr	r0, [fp, #-12]
	bl	ReverseStringInPlace
	ldr	r0, [fp, #-12]
	bl	puts
	b	.L15
.L9:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L17:
	.align	2
.L16:
	.word	.LC0
	.size	main, .-main
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
