#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 */
int /*<<< orphan*/ printf(char *, char, char, char, char, char, char);
int printLineWithTransformedMove(char *line, char *transformedMove) {
  printf("%c%c%c%c%c%c\n", line[0], line[1], line[2], transformedMove[0],
         transformedMove[1], line[5]);
}


x86 assembly (clang, -O0):
<printLineWithTransformedMove>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    -0x10(%rbp),%rax
mov    (%rax),%sil
mov    -0x10(%rbp),%rax
mov    0x1(%rax),%dl
mov    -0x10(%rbp),%rax
mov    0x2(%rax),%cl
mov    -0x18(%rbp),%rax
mov    (%rax),%r8b
mov    -0x18(%rbp),%rax
mov    0x1(%rax),%r9b
mov    -0x10(%rbp),%rax
lea    0xeb1(%rip),%rdi
movsbl %sil,%esi
movsbl %dl,%edx
movsbl %cl,%ecx
movsbl %r8b,%r8d
movsbl %r9b,%r9d
movsbl 0x5(%rax),%eax
mov    %eax,(%rsp)
call   1030 <printf@plt>
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<printLineWithTransformedMove>:
push   %rax
movsbl (%rdi),%eax
movsbl 0x1(%rdi),%edx
movsbl 0x2(%rdi),%ecx
movsbl (%rsi),%r8d
movsbl 0x1(%rsi),%r9d
movsbl 0x5(%rdi),%esi
mov    %esi,(%rsp)
lea    0xecd(%rip),%rdi
mov    %eax,%esi
call   1030 <printf@plt>
pop    %rcx
ret

LLVM IR (-O0):
@.str = [14 x i8] c"%c%c%c%c%c%c\0A\00"
define i32 @printLineWithTransformedMove(i8* %0, i8* %1) {
%3 = alloca i32
%4 = alloca i8*
%5 = alloca i8*
store i8* %0, i8** %4
store i8* %1, i8** %5
%6 = load i8*, i8** %4
%7 = getelementptr inbounds i8, i8* %6, i64 0
%8 = load i8, i8* %7
%9 = load i8*, i8** %4
%10 = getelementptr inbounds i8, i8* %9, i64 1
%11 = load i8, i8* %10
%12 = load i8*, i8** %4
%13 = getelementptr inbounds i8, i8* %12, i64 2
%14 = load i8, i8* %13
%15 = load i8*, i8** %5
%16 = getelementptr inbounds i8, i8* %15, i64 0
%17 = load i8, i8* %16
%18 = load i8*, i8** %5
%19 = getelementptr inbounds i8, i8* %18, i64 1
%20 = load i8, i8* %19
%21 = load i8*, i8** %4
%22 = getelementptr inbounds i8, i8* %21, i64 5
%23 = load i8, i8* %22
%24 = call i32 @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0), i8 signext %8, i8 signext %11, i8 signext %14, i8 signext %17, i8 signext %20, i8 signext %23)
%25 = load i32, i32* %3
ret i32 %25
}

LLVM IR (-O2):
@.str = [14 x i8] c"%c%c%c%c%c%c\0A\00"
define i32 @printLineWithTransformedMove(i8* nocapture %0, i8* nocapture %1) {
%3 = load i8, i8* %0
%4 = getelementptr inbounds i8, i8* %0, i64 1
%5 = load i8, i8* %4
%6 = getelementptr inbounds i8, i8* %0, i64 2
%7 = load i8, i8* %6
%8 = load i8, i8* %1
%9 = getelementptr inbounds i8, i8* %1, i64 1
%10 = load i8, i8* %9
%11 = getelementptr inbounds i8, i8* %0, i64 5
%12 = load i8, i8* %11
%13 = tail call i32 @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0), i8 signext %3, i8 signext %5, i8 signext %7, i8 signext %8, i8 signext %10, i8 signext %12)
ret i32 undef
}