#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 *, ...);
void RotateSentences(char (*string)[100], int row, int column) {
  for (int i = 0; i < column; i++) {
    for (int j = row - 1; j >= 0; j--) {
      if (string[j][i])
        printf("%c", string[j][i]);
    }
    printf("\n");
  }
}


x86 assembly (clang, -O0):
<RotateSentences>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
mov    -0x14(%rbp),%eax
cmp    -0x10(%rbp),%eax
jge    11b9 <RotateSentences+0xa9>
mov    -0xc(%rbp),%eax
sub    $0x1,%eax
mov    %eax,-0x18(%rbp)
cmpl   $0x0,-0x18(%rbp)
jl     119d <RotateSentences+0x8d>
mov    -0x8(%rbp),%rax
movslq -0x18(%rbp),%rcx
imul   $0x64,%rcx,%rcx
add    %rcx,%rax
movslq -0x14(%rbp),%rcx
cmpb   $0x0,(%rax,%rcx,1)
je     118a <RotateSentences+0x7a>
mov    -0x8(%rbp),%rax
movslq -0x18(%rbp),%rcx
imul   $0x64,%rcx,%rcx
add    %rcx,%rax
movslq -0x14(%rbp),%rcx
movsbl (%rax,%rcx,1),%esi
lea    0xe7d(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    118f <RotateSentences+0x7f>
mov    -0x18(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0x18(%rbp)
jmp    113e <RotateSentences+0x2e>
lea    0xe5f(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    1129 <RotateSentences+0x19>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<RotateSentences>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
push   %rax
test   %edx,%edx
jle    1184 <RotateSentences+0x74>
mov    %esi,%r14d
mov    %rdi,%r13
mov    %esi,%r12d
mov    %edx,%r15d
add    $0x1,%r12
xor    %ebp,%ebp
jmp    1153 <RotateSentences+0x43>
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
mov    $0xa,%edi
call   1030 <putchar@plt>
add    $0x1,%rbp
cmp    %r15,%rbp
je     1184 <RotateSentences+0x74>
mov    %r12,%rbx
test   %r14d,%r14d
jg     116a <RotateSentences+0x5a>
jmp    1140 <RotateSentences+0x30>
nopl   (%rax)
add    $0xffffffffffffffff,%rbx
cmp    $0x1,%rbx
jle    1140 <RotateSentences+0x30>
lea    -0x2(%rbx),%eax
imul   $0x64,%rax,%rax
add    %r13,%rax
movsbl 0x0(%rbp,%rax,1),%edi
test   %edi,%edi
je     1160 <RotateSentences+0x50>
call   1030 <putchar@plt>
jmp    1160 <RotateSentences+0x50>
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

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

LLVM IR (-O2):
define void @RotateSentences([100 x i8]* nocapture %0, i32 %1, i32 %2) {
%4 = icmp sgt i32 %2, 0
br i1 %4, label %5, label %11
5: ; preds = %3
%6 = icmp sgt i32 %1, 0
%7 = zext i32 %1 to i64
%8 = zext i32 %2 to i64
br label %9
9: ; preds = %5, %12
%10 = phi i64 [ 0, %5 ], [ %14, %12 ]
br i1 %6, label %16, label %12
11: ; preds = %12, %3
ret void
12: ; preds = %26, %9
%13 = tail call i32 @putchar(i32 10)
%14 = add nuw nsw i64 %10, 1
%15 = icmp eq i64 %14, %8
br i1 %15, label %11, label %9
16: ; preds = %9, %26
%17 = phi i64 [ %18, %26 ], [ %7, %9 ]
%18 = add nsw i64 %17, -1
%19 = and i64 %18, 4294967295
%20 = getelementptr inbounds [100 x i8], [100 x i8]* %0, i64 %19, i64 %10
%21 = load i8, i8* %20
%22 = icmp eq i8 %21, 0
br i1 %22, label %26, label %23
23: ; preds = %16
%24 = sext i8 %21 to i32
%25 = tail call i32 @putchar(i32 %24)
br label %26
26: ; preds = %16, %23
%27 = icmp sgt i64 %17, 1
br i1 %27, label %16, label %12
}