#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 */
double calculateDistance(int *, int *, int *, int *);
scalar_t__ malloc(int);
int /*<<< orphan*/ moveChar(char, int *, int *);
int /*<<< orphan*/ printf(char *, ...);
int rand();
int /*<<< orphan*/ scanf(char *, char *);
int /*<<< orphan*/ srand(int /*<<< orphan*/);
int /*<<< orphan*/ time(int /*<<< orphan*/ *);
int main() {
  srand(time(NULL));
  int *charX, *charY;
  charX = (int *)malloc(sizeof(int));
  charY = (int *)malloc(sizeof(int));
  *charX = 5;
  *charY = 5;
  int *goldX, *goldY;
  goldX = (int *)malloc(sizeof(int));
  goldY = (int *)malloc(sizeof(int));
  *goldX = rand() % 11;
  *goldY = rand() % 11;
  char *dir;
  dir = (char *)malloc(sizeof(char));
  int n = 0;
  double oldDist, newDist;
  printf(
      "Welcome to the maze game! Your starting location is (5,5), try to find "
      "the pot of gold that is randomly placed within this 10 x 10 board!\n");
  while ((*charX != *goldX) || (*charY != *goldY)) {
    oldDist = calculateDistance(goldX, goldY, charX, charY);
    printf("Please enter a direction (n, s, w, e - case-sensitive): ");
    scanf(" %c", dir);
    printf("\n");
    moveChar(*dir, charX, charY);
    newDist = calculateDistance(goldX, goldY, charX, charY);
    if (oldDist >= newDist) {
      printf("Old dist: %g\n", oldDist);
      printf("new dist: %g\n", newDist);
      printf("CharX: %d\n", *charX);
      printf("CharY: %d\n", *charY);
      printf("goldX: %d\n", *goldX);
      printf("goldY: %d\n", *goldY);
      printf("Getting warmer!\n");
    } else {
      printf("Old dist: %g\n", oldDist);
      printf("new dist: %g\n", newDist);
      printf("CharX: %d\n", *charX);
      printf("CharY: %d\n", *charY);
      printf("goldX: %d\n", *goldX);
      printf("goldY: %d\n", *goldY);
      printf("Getting colder!\n");
    }
    printf("\n");
    n++;
  }
  printf("Hooray! you found the pot of gold!\n");
  printf("moves used: %d\n", n);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x50,%rsp
movl   $0x0,-0x4(%rbp)
xor    %eax,%eax
mov    %eax,%edi
call   1050 <time@plt>
mov    %eax,%edi
call   1040 <srand@plt>
mov    $0x4,%edi
call   1060 <malloc@plt>
mov    %rax,-0x10(%rbp)
mov    $0x4,%edi
call   1060 <malloc@plt>
mov    %rax,-0x18(%rbp)
mov    -0x10(%rbp),%rax
movl   $0x5,(%rax)
mov    -0x18(%rbp),%rax
movl   $0x5,(%rax)
mov    $0x4,%edi
call   1060 <malloc@plt>
mov    %rax,-0x20(%rbp)
mov    $0x4,%edi
call   1060 <malloc@plt>
mov    %rax,-0x28(%rbp)
mov    $0x0,%al
call   10a0 <rand@plt>
mov    $0xb,%ecx
cltd
idiv   %ecx
mov    -0x20(%rbp),%rax
mov    %edx,(%rax)
mov    $0x0,%al
call   10a0 <rand@plt>
mov    $0xb,%ecx
cltd
idiv   %ecx
mov    -0x28(%rbp),%rax
mov    %edx,(%rax)
mov    $0x1,%edi
call   1060 <malloc@plt>
mov    %rax,-0x30(%rbp)
movl   $0x0,-0x34(%rbp)
lea    0xdcf(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x10(%rbp),%rax
mov    (%rax),%ecx
mov    -0x20(%rbp),%rdx
mov    $0x1,%al
cmp    (%rdx),%ecx
mov    %al,-0x49(%rbp)
jne    1261 <main+0xe1>
mov    -0x18(%rbp),%rax
mov    (%rax),%eax
mov    -0x28(%rbp),%rcx
cmp    (%rcx),%eax
setne  %al
mov    %al,-0x49(%rbp)
mov    -0x49(%rbp),%al
test   $0x1,%al
jne    1271 <main+0xf1>
jmp    1420 <main+0x2a0>
mov    -0x20(%rbp),%rdi
mov    -0x28(%rbp),%rsi
mov    -0x10(%rbp),%rdx
mov    -0x18(%rbp),%rcx
call   1080 <calculateDistance@plt>
movsd  %xmm0,-0x40(%rbp)
lea    0xdf9(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x30(%rbp),%rsi
lea    0xe20(%rip),%rdi
call   1070 <scanf@plt>
lea    0xea4(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x30(%rbp),%rax
mov    (%rax),%al
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
movsbl %al,%edi
call   1090 <moveChar@plt>
mov    -0x20(%rbp),%rdi
mov    -0x28(%rbp),%rsi
mov    -0x10(%rbp),%rdx
mov    -0x18(%rbp),%rcx
call   1080 <calculateDistance@plt>
movsd  %xmm0,-0x48(%rbp)
movsd  -0x40(%rbp),%xmm0
ucomisd -0x48(%rbp),%xmm0
jb     1380 <main+0x200>
movsd  -0x40(%rbp),%xmm0
lea    0xdc5(%rip),%rdi
mov    $0x1,%al
call   1030 <printf@plt>
movsd  -0x48(%rbp),%xmm0
lea    0xdc0(%rip),%rdi
mov    $0x1,%al
call   1030 <printf@plt>
mov    -0x10(%rbp),%rax
mov    (%rax),%esi
lea    0xdba(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x18(%rbp),%rax
mov    (%rax),%esi
lea    0xdb1(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x20(%rbp),%rax
mov    (%rax),%esi
lea    0xda8(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x28(%rbp),%rax
mov    (%rax),%esi
lea    0xd9f(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xd9c(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    1404 <main+0x284>
movsd  -0x40(%rbp),%xmm0
lea    0xd3c(%rip),%rdi
mov    $0x1,%al
call   1030 <printf@plt>
movsd  -0x48(%rbp),%xmm0
lea    0xd37(%rip),%rdi
mov    $0x1,%al
call   1030 <printf@plt>
mov    -0x10(%rbp),%rax
mov    (%rax),%esi
lea    0xd31(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x18(%rbp),%rax
mov    (%rax),%esi
lea    0xd28(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x20(%rbp),%rax
mov    (%rax),%esi
lea    0xd1f(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x28(%rbp),%rax
mov    (%rax),%esi
lea    0xd16(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xd24(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xd49(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x34(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x34(%rbp)
jmp    1238 <main+0xb8>
lea    0xd0b(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x34(%rbp),%esi
lea    0xd1e(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x4(%rbp),%eax
add    $0x50,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x18,%rsp
xor    %edi,%edi
call   1070 <time@plt>
mov    %eax,%edi
call   1060 <srand@plt>
mov    $0x4,%edi
call   1080 <malloc@plt>
mov    %rax,%rbx
mov    $0x4,%edi
call   1080 <malloc@plt>
mov    %rax,%r14
movl   $0x5,(%rbx)
movl   $0x5,(%rax)
mov    $0x4,%edi
call   1080 <malloc@plt>
mov    %rax,%r15
mov    $0x4,%edi
call   1080 <malloc@plt>
mov    %rax,%r12
xor    %eax,%eax
call   10c0 <rand@plt>
cltq
imul   $0x2e8ba2e9,%rax,%rcx
mov    %rcx,%rdx
shr    $0x3f,%rdx
sar    $0x21,%rcx
add    %edx,%ecx
lea    (%rcx,%rcx,4),%edx
lea    (%rcx,%rdx,2),%ecx
sub    %ecx,%eax
mov    %eax,(%r15)
xor    %eax,%eax
call   10c0 <rand@plt>
cltq
imul   $0x2e8ba2e9,%rax,%rcx
mov    %rcx,%rdx
shr    $0x3f,%rdx
sar    $0x21,%rcx
add    %edx,%ecx
lea    (%rcx,%rcx,4),%edx
lea    (%rcx,%rdx,2),%ecx
sub    %ecx,%eax
mov    %eax,(%r12)
mov    $0x1,%edi
call   1080 <malloc@plt>
mov    %rax,%r13
lea    0xe34(%rip),%rdi
call   1040 <puts@plt>
xor    %ebp,%ebp
jmp    1371 <main+0x1d1>
nopl   (%rax)
mov    %r15,%rdi
mov    %r12,%rsi
mov    %rbx,%rdx
mov    %r14,%rcx
call   10a0 <calculateDistance@plt>
movsd  %xmm0,0x10(%rsp)
lea    0xd72(%rip),%rdi
xor    %eax,%eax
call   1050 <printf@plt>
lea    0xd9d(%rip),%rdi
mov    %r13,%rsi
call   1090 <scanf@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
movsbl 0x0(%r13),%edi
mov    %rbx,%rsi
mov    %r14,%rdx
call   10b0 <moveChar@plt>
mov    %r15,%rdi
mov    %r12,%rsi
mov    %rbx,%rdx
mov    %r14,%rcx
call   10a0 <calculateDistance@plt>
movsd  %xmm0,0x8(%rsp)
lea    0xd61(%rip),%rdi
movsd  0x10(%rsp),%xmm0
mov    $0x1,%al
call   1050 <printf@plt>
lea    0xd5b(%rip),%rdi
movsd  0x8(%rsp),%xmm0
mov    $0x1,%al
call   1050 <printf@plt>
mov    (%rbx),%esi
lea    0xd53(%rip),%rdi
xor    %eax,%eax
call   1050 <printf@plt>
mov    (%r14),%esi
lea    0xd4d(%rip),%rdi
xor    %eax,%eax
call   1050 <printf@plt>
mov    (%r15),%esi
lea    0xd47(%rip),%rdi
xor    %eax,%eax
call   1050 <printf@plt>
mov    (%r12),%esi
lea    0xd40(%rip),%rdi
xor    %eax,%eax
call   1050 <printf@plt>
movsd  0x10(%rsp),%xmm0
ucomisd 0x8(%rsp),%xmm0
lea    0xdfe(%rip),%rdi
lea    0xde7(%rip),%rax
cmovb  %rax,%rdi
call   1040 <puts@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
add    $0x1,%ebp
mov    (%rbx),%eax
cmp    (%r15),%eax
jne    1270 <main+0xd0>
mov    (%r14),%eax
cmp    (%r12),%eax
jne    1270 <main+0xd0>
lea    0xd8f(%rip),%rdi
call   1040 <puts@plt>
lea    0xce9(%rip),%rdi
mov    %ebp,%esi
xor    %eax,%eax
call   1050 <printf@plt>
xor    %eax,%eax
add    $0x18,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@.str = [139 x i8] c"Welcome to the maze game! Your starting location is (5,5), try to find the pot of gold that is randomly placed within this 10 x 10 board!\0A\00"
@.str.1 = [57 x i8] c"Please enter a direction (n, s, w, e - case-sensitive): \00"
@.str.2 = [4 x i8] c" %c\00"
@.str.3 = [2 x i8] c"\0A\00"
@.str.4 = [14 x i8] c"Old dist: %g\0A\00"
@.str.5 = [14 x i8] c"new dist: %g\0A\00"
@.str.6 = [11 x i8] c"CharX: %d\0A\00"
@.str.7 = [11 x i8] c"CharY: %d\0A\00"
@.str.8 = [11 x i8] c"goldX: %d\0A\00"
@.str.9 = [11 x i8] c"goldY: %d\0A\00"
@.str.10 = [17 x i8] c"Getting warmer!\0A\00"
@.str.11 = [17 x i8] c"Getting colder!\0A\00"
@.str.12 = [36 x i8] c"Hooray! you found the pot of gold!\0A\00"
@.str.13 = [16 x i8] c"moves used: %d\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32*
%3 = alloca i32*
%4 = alloca i32*
%5 = alloca i32*
%6 = alloca i8*
%7 = alloca i32
%8 = alloca double
%9 = alloca double
store i32 0, i32* %1
%10 = call i32 @time(i32* null)
%11 = call i32 @srand(i32 %10)
%12 = call i64 @malloc(i32 4)
%13 = inttoptr i64 %12 to i32*
store i32* %13, i32** %2
%14 = call i64 @malloc(i32 4)
%15 = inttoptr i64 %14 to i32*
store i32* %15, i32** %3
%16 = load i32*, i32** %2
store i32 5, i32* %16
%17 = load i32*, i32** %3
store i32 5, i32* %17
%18 = call i64 @malloc(i32 4)
%19 = inttoptr i64 %18 to i32*
store i32* %19, i32** %4
%20 = call i64 @malloc(i32 4)
%21 = inttoptr i64 %20 to i32*
store i32* %21, i32** %5
%22 = call i32 (...) @rand()
%23 = srem i32 %22, 11
%24 = load i32*, i32** %4
store i32 %23, i32* %24
%25 = call i32 (...) @rand()
%26 = srem i32 %25, 11
%27 = load i32*, i32** %5
store i32 %26, i32* %27
%28 = call i64 @malloc(i32 1)
%29 = inttoptr i64 %28 to i8*
store i8* %29, i8** %6
store i32 0, i32* %7
%30 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([139 x i8], [139 x i8]* @.str, i64 0, i64 0))
br label %31
31: ; preds = %104, %0
%32 = load i32*, i32** %2
%33 = load i32, i32* %32
%34 = load i32*, i32** %4
%35 = load i32, i32* %34
%36 = icmp ne i32 %33, %35
br i1 %36, label %43, label %37
37: ; preds = %31
%38 = load i32*, i32** %3
%39 = load i32, i32* %38
%40 = load i32*, i32** %5
%41 = load i32, i32* %40
%42 = icmp ne i32 %39, %41
br label %43
43: ; preds = %37, %31
%44 = phi i1 [ true, %31 ], [ %42, %37 ]
br i1 %44, label %45, label %108
45: ; preds = %43
%46 = load i32*, i32** %4
%47 = load i32*, i32** %5
%48 = load i32*, i32** %2
%49 = load i32*, i32** %3
%50 = call double @calculateDistance(i32* %46, i32* %47, i32* %48, i32* %49)
store double %50, double* %8
%51 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([57 x i8], [57 x i8]* @.str.1, i64 0, i64 0))
%52 = load i8*, i8** %6
%53 = call i32 @scanf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0), i8* %52)
%54 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.3, i64 0, i64 0))
%55 = load i8*, i8** %6
%56 = load i8, i8* %55
%57 = load i32*, i32** %2
%58 = load i32*, i32** %3
%59 = call i32 @moveChar(i8 signext %56, i32* %57, i32* %58)
%60 = load i32*, i32** %4
%61 = load i32*, i32** %5
%62 = load i32*, i32** %2
%63 = load i32*, i32** %3
%64 = call double @calculateDistance(i32* %60, i32* %61, i32* %62, i32* %63)
store double %64, double* %9
%65 = load double, double* %8
%66 = load double, double* %9
%67 = fcmp oge double %65, %66
br i1 %67, label %68, label %86
68: ; preds = %45
%69 = load double, double* %8
%70 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.4, i64 0, i64 0), double %69)
%71 = load double, double* %9
%72 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.5, i64 0, i64 0), double %71)
%73 = load i32*, i32** %2
%74 = load i32, i32* %73
%75 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.6, i64 0, i64 0), i32 %74)
%76 = load i32*, i32** %3
%77 = load i32, i32* %76
%78 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.7, i64 0, i64 0), i32 %77)
%79 = load i32*, i32** %4
%80 = load i32, i32* %79
%81 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.8, i64 0, i64 0), i32 %80)
%82 = load i32*, i32** %5
%83 = load i32, i32* %82
%84 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.9, i64 0, i64 0), i32 %83)
%85 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.10, i64 0, i64 0))
br label %104
86: ; preds = %45
%87 = load double, double* %8
%88 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.4, i64 0, i64 0), double %87)
%89 = load double, double* %9
%90 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.5, i64 0, i64 0), double %89)
%91 = load i32*, i32** %2
%92 = load i32, i32* %91
%93 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.6, i64 0, i64 0), i32 %92)
%94 = load i32*, i32** %3
%95 = load i32, i32* %94
%96 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.7, i64 0, i64 0), i32 %95)
%97 = load i32*, i32** %4
%98 = load i32, i32* %97
%99 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.8, i64 0, i64 0), i32 %98)
%100 = load i32*, i32** %5
%101 = load i32, i32* %100
%102 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.9, i64 0, i64 0), i32 %101)
%103 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.11, i64 0, i64 0))
br label %104
104: ; preds = %86, %68
%105 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.3, i64 0, i64 0))
%106 = load i32, i32* %7
%107 = add nsw i32 %106, 1
store i32 %107, i32* %7
br label %31
108: ; preds = %43
%109 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str.12, i64 0, i64 0))
%110 = load i32, i32* %7
%111 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.13, i64 0, i64 0), i32 %110)
%112 = load i32, i32* %1
ret i32 %112
}

LLVM IR (-O2):
@.str.1 = [57 x i8] c"Please enter a direction (n, s, w, e - case-sensitive): \00"
@.str.2 = [4 x i8] c" %c\00"
@.str.4 = [14 x i8] c"Old dist: %g\0A\00"
@.str.5 = [14 x i8] c"new dist: %g\0A\00"
@.str.6 = [11 x i8] c"CharX: %d\0A\00"
@.str.7 = [11 x i8] c"CharY: %d\0A\00"
@.str.8 = [11 x i8] c"goldX: %d\0A\00"
@.str.9 = [11 x i8] c"goldY: %d\0A\00"
@.str.13 = [16 x i8] c"moves used: %d\0A\00"
@str = [138 x i8] c"Welcome to the maze game! Your starting location is (5,5), try to find the pot of gold that is randomly placed within this 10 x 10 board!\00"
@str.14 = [35 x i8] c"Hooray! you found the pot of gold!\00"
@str.15 = [16 x i8] c"Getting colder!\00"
@str.16 = [16 x i8] c"Getting warmer!\00"
define i32 @main() {
%1 = tail call i32 @time(i32* null)
%2 = tail call i32 @srand(i32 %1)
%3 = tail call i64 @malloc(i32 4)
%4 = inttoptr i64 %3 to i32*
%5 = tail call i64 @malloc(i32 4)
%6 = inttoptr i64 %5 to i32*
store i32 5, i32* %4
store i32 5, i32* %6
%7 = tail call i64 @malloc(i32 4)
%8 = inttoptr i64 %7 to i32*
%9 = tail call i64 @malloc(i32 4)
%10 = inttoptr i64 %9 to i32*
%11 = tail call i32 (...) @rand()
%12 = srem i32 %11, 11
store i32 %12, i32* %8
%13 = tail call i32 (...) @rand()
%14 = srem i32 %13, 11
store i32 %14, i32* %10
%15 = tail call i64 @malloc(i32 1)
%16 = inttoptr i64 %15 to i8*
%17 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([138 x i8], [138 x i8]* @str, i64 0, i64 0))
br label %18
18: ; preds = %27, %0
%19 = phi i32 [ 0, %0 ], [ %49, %27 ]
%20 = load i32, i32* %4
%21 = load i32, i32* %8
%22 = icmp eq i32 %20, %21
br i1 %22, label %23, label %27
23: ; preds = %18
%24 = load i32, i32* %6
%25 = load i32, i32* %10
%26 = icmp eq i32 %24, %25
br i1 %26, label %50, label %27
27: ; preds = %18, %23
%28 = tail call double @calculateDistance(i32* %8, i32* %10, i32* %4, i32* %6)
%29 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([57 x i8], [57 x i8]* @.str.1, i64 0, i64 0))
%30 = tail call i32 @scanf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0), i8* %16)
%31 = tail call i32 @putchar(i32 10)
%32 = load i8, i8* %16
%33 = tail call i32 @moveChar(i8 signext %32, i32* %4, i32* %6)
%34 = tail call double @calculateDistance(i32* %8, i32* %10, i32* %4, i32* %6)
%35 = fcmp ult double %28, %34
%36 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([14 x i8], [14 x i8]* @.str.4, i64 0, i64 0), double %28)
%37 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([14 x i8], [14 x i8]* @.str.5, i64 0, i64 0), double %34)
%38 = load i32, i32* %4
%39 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([11 x i8], [11 x i8]* @.str.6, i64 0, i64 0), i32 %38)
%40 = load i32, i32* %6
%41 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([11 x i8], [11 x i8]* @.str.7, i64 0, i64 0), i32 %40)
%42 = load i32, i32* %8
%43 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([11 x i8], [11 x i8]* @.str.8, i64 0, i64 0), i32 %42)
%44 = load i32, i32* %10
%45 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([11 x i8], [11 x i8]* @.str.9, i64 0, i64 0), i32 %44)
%46 = select i1 %35, i8* getelementptr inbounds ([16 x i8], [16 x i8]* @str.15, i64 0, i64 0), i8* getelementptr inbounds ([16 x i8], [16 x i8]* @str.16, i64 0, i64 0)
%47 = tail call i32 @puts(i8* dereferenceable(1) %46)
%48 = tail call i32 @putchar(i32 10)
%49 = add nuw nsw i32 %19, 1
br label %18
50: ; preds = %23
%51 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([35 x i8], [35 x i8]* @str.14, i64 0, i64 0))
%52 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([16 x i8], [16 x i8]* @.str.13, i64 0, i64 0), i32 %19)
ret i32 0
}