#define NULL ((void *)0)
typedef unsigned long size_t; // Customize by platform.
typedef long intptr_t;
typedef unsigned long uintptr_t;
typedef long scalar_t__; // Either arithmetic or pointer type.
/* By default, we understand bool (as a convenience). */
typedef int bool;
#define false 0
#define true 1

/* Forward declarations */

/* Type definitions */

/* Variables and functions */
scalar_t__ EOF;
int /*<<< orphan*/ change(char *, char *);
int /*<<< orphan*/ getchar();
int /*<<< orphan*/ printf(char *, char, char, char);
scalar_t__ scanf(char *, char *, char *, char *);
int main() {
  char a, b, c;
  while (scanf("%c%c%c", &a, &b, &c) != EOF) {
    char tmp;
    change(&a, &b);
    change(&a, &c);
    change(&b, &c);
    printf("%c %c %c\n", a, b, c);
    getchar();
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeaa(%rip),%rdi
lea    -0x5(%rbp),%rsi
lea    -0x6(%rbp),%rdx
lea    -0x7(%rbp),%rcx
call   1060 <scanf@plt>
mov    0x2e7a(%rip),%rcx
cmp    (%rcx),%rax
je     11c6 <main+0x86>
lea    -0x5(%rbp),%rdi
lea    -0x6(%rbp),%rsi
call   1030 <change@plt>
lea    -0x5(%rbp),%rdi
lea    -0x7(%rbp),%rsi
call   1030 <change@plt>
lea    -0x6(%rbp),%rdi
lea    -0x7(%rbp),%rsi
call   1030 <change@plt>
mov    -0x5(%rbp),%cl
mov    -0x6(%rbp),%al
lea    0xe5c(%rip),%rdi
movsbl %cl,%esi
movsbl %al,%edx
movsbl -0x7(%rbp),%ecx
call   1040 <printf@plt>
mov    $0x0,%al
call   1050 <getchar@plt>
jmp    114f <main+0xf>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
push   %rax
lea    0xeae(%rip),%rdi
lea    0x7(%rsp),%rsi
lea    0x6(%rsp),%rdx
lea    0x5(%rsp),%rcx
call   1060 <scanf@plt>
mov    0x2e7b(%rip),%rbp
cmp    0x0(%rbp),%rax
je     11e6 <main+0xa6>
lea    0x7(%rsp),%r14
lea    0x6(%rsp),%r15
lea    0x5(%rsp),%rbx
lea    0xe7e(%rip),%r12
lea    0xe70(%rip),%r13
mov    %r14,%rdi
mov    %r15,%rsi
call   1030 <change@plt>
mov    %r14,%rdi
mov    %rbx,%rsi
call   1030 <change@plt>
mov    %r15,%rdi
mov    %rbx,%rsi
call   1030 <change@plt>
movsbl 0x7(%rsp),%esi
movsbl 0x6(%rsp),%edx
movsbl 0x5(%rsp),%ecx
mov    %r12,%rdi
call   1040 <printf@plt>
xor    %eax,%eax
call   1050 <getchar@plt>
mov    %r13,%rdi
mov    %r14,%rsi
mov    %r15,%rdx
mov    %rbx,%rcx
call   1060 <scanf@plt>
cmp    0x0(%rbp),%rax
jne    1190 <main+0x50>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@.str = [7 x i8] c"%c%c%c\00"
@EOF = global i64 0
@.str.1 = [10 x i8] c"%c %c %c\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i8
%3 = alloca i8
%4 = alloca i8
%5 = alloca i8
store i32 0, i32* %1
br label %6
6: ; preds = %10, %0
%7 = call i64 @scanf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i8* %2, i8* %3, i8* %4)
%8 = load i64, i64* @EOF
%9 = icmp ne i64 %7, %8
br i1 %9, label %10, label %19
10: ; preds = %6
%11 = call i32 @change(i8* %2, i8* %3)
%12 = call i32 @change(i8* %2, i8* %4)
%13 = call i32 @change(i8* %3, i8* %4)
%14 = load i8, i8* %2
%15 = load i8, i8* %3
%16 = load i8, i8* %4
%17 = call i32 @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.1, i64 0, i64 0), i8 signext %14, i8 signext %15, i8 signext %16)
%18 = call i32 (...) @getchar()
br label %6
19: ; preds = %6
ret i32 0
}

LLVM IR (-O2):
@.str = [7 x i8] c"%c%c%c\00"
@EOF = global i64 0
@.str.1 = [10 x i8] c"%c %c %c\0A\00"
define i32 @main() {
%1 = alloca i8
%2 = alloca i8
%3 = alloca i8
%4 = call i64 @scanf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i8* %1, i8* %2, i8* %3)
%5 = load i64, i64* @EOF
%6 = icmp eq i64 %4, %5
br i1 %6, label %19, label %7
7: ; preds = %0, %7
%8 = call i32 @change(i8* %1, i8* %2)
%9 = call i32 @change(i8* %1, i8* %3)
%10 = call i32 @change(i8* %2, i8* %3)
%11 = load i8, i8* %1
%12 = load i8, i8* %2
%13 = load i8, i8* %3
%14 = call i32 @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.1, i64 0, i64 0), i8 signext %11, i8 signext %12, i8 signext %13)
%15 = call i32 (...) @getchar()
%16 = call i64 @scanf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i8* %1, i8* %2, i8* %3)
%17 = load i64, i64* @EOF
%18 = icmp eq i64 %16, %17
br i1 %18, label %19, label %7
19: ; preds = %7, %0
ret i32 0
}