int main() {
  char str[200000], temp;
  int m = 0, true = 0, left = 0, right;
  scanf("%s", str);
  right = strlen(str) - 1;
  while (m <= strlen(str) / 2) {
    temp = str[left];
    str[left] = str[right];
    str[right] = temp;
    left++, right--;
    m++;
  }
  printf("%s", str);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30d70,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0x30d58(%rbp)
movl   $0x0,-0x30d5c(%rbp)
movl   $0x0,-0x30d60(%rbp)
lea    -0x30d50(%rbp),%rsi
lea    0xe92(%rip),%rdi
mov    $0x0,%al
call   1050 <scanf@plt>
lea    -0x30d50(%rbp),%rdi
call   1030 <strlen@plt>
sub    $0x1,%rax
mov    %eax,-0x30d64(%rbp)
movslq -0x30d58(%rbp),%rax
mov    %rax,-0x30d70(%rbp)
lea    -0x30d50(%rbp),%rdi
call   1030 <strlen@plt>
mov    %rax,%rcx
mov    -0x30d70(%rbp),%rax
shr    $0x1,%rcx
cmp    %rcx,%rax
ja     1232 <main+0x102>
movslq -0x30d60(%rbp),%rax
mov    -0x30d50(%rbp,%rax,1),%al
mov    %al,-0x30d51(%rbp)
movslq -0x30d64(%rbp),%rax
mov    -0x30d50(%rbp,%rax,1),%cl
movslq -0x30d60(%rbp),%rax
mov    %cl,-0x30d50(%rbp,%rax,1)
mov    -0x30d51(%rbp),%cl
movslq -0x30d64(%rbp),%rax
mov    %cl,-0x30d50(%rbp,%rax,1)
mov    -0x30d60(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x30d60(%rbp)
mov    -0x30d64(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0x30d64(%rbp)
mov    -0x30d58(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x30d58(%rbp)
jmp    118b <main+0x5b>
lea    -0x30d50(%rbp),%rsi
lea    0xdc0(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x30d70,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r15
push   %r14
push   %rbx
sub    $0x30d40,%rsp
lea    0xebd(%rip),%rdi
mov    %rsp,%r14
mov    %r14,%rsi
xor    %eax,%eax
call   1050 <scanf@plt>
mov    %r14,%rdi
call   1030 <strlen@plt>
mov    %rax,%rbx
add    $0xffffffff,%ebx
mov    $0xffffffffffffffff,%r15
cs nopw 0x0(%rax,%rax,1)
nop
movzbl 0x1(%rsp,%r15,1),%eax
movslq %ebx,%rbx
movzbl (%rsp,%rbx,1),%ecx
mov    %cl,0x1(%rsp,%r15,1)
mov    %al,(%rsp,%rbx,1)
mov    %r14,%rdi
call   1030 <strlen@plt>
shr    %rax
add    $0x1,%r15
add    $0xffffffff,%ebx
cmp    %r15,%rax
ja     1170 <main+0x40>
lea    0xe5d(%rip),%rdi
mov    %rsp,%rsi
xor    %eax,%eax
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x30d40,%rsp
pop    %rbx
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
@.str = [3 x i8] c"%s\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca [200000 x i8]
%3 = alloca i8
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
store i32 0, i32* %1
store i32 0, i32* %4
store i32 0, i32* %5
store i32 0, i32* %6
%8 = getelementptr inbounds [200000 x i8], [200000 x i8]* %2, i64 0, i64 0
%9 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* %8)
%10 = getelementptr inbounds [200000 x i8], [200000 x i8]* %2, i64 0, i64 0
%11 = call i64 @strlen(i8* %10)
%12 = sub i64 %11, 1
%13 = trunc i64 %12 to i32
store i32 %13, i32* %7
br label %14
14: ; preds = %21, %0
%15 = load i32, i32* %4
%16 = sext i32 %15 to i64
%17 = getelementptr inbounds [200000 x i8], [200000 x i8]* %2, i64 0, i64 0
%18 = call i64 @strlen(i8* %17)
%19 = udiv i64 %18, 2
%20 = icmp ule i64 %16, %19
br i1 %20, label %21, label %43
21: ; preds = %14
%22 = load i32, i32* %6
%23 = sext i32 %22 to i64
%24 = getelementptr inbounds [200000 x i8], [200000 x i8]* %2, i64 0, i64 %23
%25 = load i8, i8* %24
store i8 %25, i8* %3
%26 = load i32, i32* %7
%27 = sext i32 %26 to i64
%28 = getelementptr inbounds [200000 x i8], [200000 x i8]* %2, i64 0, i64 %27
%29 = load i8, i8* %28
%30 = load i32, i32* %6
%31 = sext i32 %30 to i64
%32 = getelementptr inbounds [200000 x i8], [200000 x i8]* %2, i64 0, i64 %31
store i8 %29, i8* %32
%33 = load i8, i8* %3
%34 = load i32, i32* %7
%35 = sext i32 %34 to i64
%36 = getelementptr inbounds [200000 x i8], [200000 x i8]* %2, i64 0, i64 %35
store i8 %33, i8* %36
%37 = load i32, i32* %6
%38 = add nsw i32 %37, 1
store i32 %38, i32* %6
%39 = load i32, i32* %7
%40 = add nsw i32 %39, -1
store i32 %40, i32* %7
%41 = load i32, i32* %4
%42 = add nsw i32 %41, 1
store i32 %42, i32* %4
br label %14
43: ; preds = %14
%44 = getelementptr inbounds [200000 x i8], [200000 x i8]* %2, i64 0, i64 0
%45 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* %44)
ret i32 0
}

LLVM IR (-O2):
@.str = [3 x i8] c"%s\00"
define i32 @main() {
%1 = alloca [200000 x i8]
%2 = getelementptr inbounds [200000 x i8], [200000 x i8]* %1, i64 0, i64 0
%3 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* %2)
%4 = call i64 @strlen(i8* %2)
%5 = trunc i64 %4 to i32
br label %6
6: ; preds = %0, %6
%7 = phi i64 [ 0, %0 ], [ %15, %6 ]
%8 = phi i32 [ %5, %0 ], [ %9, %6 ]
%9 = add i32 %8, -1
%10 = getelementptr inbounds [200000 x i8], [200000 x i8]* %1, i64 0, i64 %7
%11 = load i8, i8* %10
%12 = sext i32 %9 to i64
%13 = getelementptr inbounds [200000 x i8], [200000 x i8]* %1, i64 0, i64 %12
%14 = load i8, i8* %13
store i8 %14, i8* %10
store i8 %11, i8* %13
%15 = add nuw nsw i64 %7, 1
%16 = call i64 @strlen(i8* %2)
%17 = lshr i64 %16, 1
%18 = icmp ugt i64 %17, %7
br i1 %18, label %6, label %19
19: ; preds = %6
%20 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* %2)
ret i32 0
}