char mv_obstacle(char map[5][5]) {
  int i;
  int j;
  i = 0;
  j = 0;
  while (i < 5) {
    while (j < 5) {
      if (map[i][j] == 'H') {
        if (j - 1 != -1) {
          map[i][j - 1] = 'H';
          map[i][j] = ' ';
        } else
          map[i][j] = ' ';
      }
      j++;
    }
    j = 0;
    i++;
  }
  return (**map);
}


x86 assembly (clang, -O0):
<mv_obstacle>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
movl   $0x0,-0x10(%rbp)
cmpl   $0x5,-0xc(%rbp)
jge    11d5 <mv_obstacle+0xd5>
jmp    1125 <mv_obstacle+0x25>
cmpl   $0x5,-0x10(%rbp)
jge    11c0 <mv_obstacle+0xc0>
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
imul   $0x5,%rcx,%rcx
add    %rcx,%rax
movslq -0x10(%rbp),%rcx
movsbl (%rax,%rcx,1),%eax
cmp    $0x48,%eax
jne    11b2 <mv_obstacle+0xb2>
mov    -0x10(%rbp),%eax
sub    $0x1,%eax
cmp    $0xffffffff,%eax
je     1196 <mv_obstacle+0x96>
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
imul   $0x5,%rcx,%rcx
add    %rcx,%rax
mov    -0x10(%rbp),%ecx
sub    $0x1,%ecx
movslq %ecx,%rcx
movb   $0x48,(%rax,%rcx,1)
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
imul   $0x5,%rcx,%rcx
add    %rcx,%rax
movslq -0x10(%rbp),%rcx
movb   $0x20,(%rax,%rcx,1)
jmp    11ad <mv_obstacle+0xad>
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
imul   $0x5,%rcx,%rcx
add    %rcx,%rax
movslq -0x10(%rbp),%rcx
movb   $0x20,(%rax,%rcx,1)
jmp    11b2 <mv_obstacle+0xb2>
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    1125 <mv_obstacle+0x25>
movl   $0x0,-0x10(%rbp)
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1116 <mv_obstacle+0x16>
mov    -0x8(%rbp),%rax
movsbl (%rax),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<mv_obstacle>:
mov    $0x4,%eax
jmp    111a <mv_obstacle+0x1a>
nopw   0x0(%rax,%rax,1)
add    $0x5,%rax
cmp    $0x1d,%rax
je     117e <mv_obstacle+0x7e>
cmpb   $0x48,-0x4(%rdi,%rax,1)
je     1140 <mv_obstacle+0x40>
cmpb   $0x48,-0x3(%rdi,%rax,1)
je     114c <mv_obstacle+0x4c>
cmpb   $0x48,-0x2(%rdi,%rax,1)
je     115a <mv_obstacle+0x5a>
cmpb   $0x48,-0x1(%rdi,%rax,1)
je     1168 <mv_obstacle+0x68>
cmpb   $0x48,(%rdi,%rax,1)
jne    1110 <mv_obstacle+0x10>
jmp    1175 <mv_obstacle+0x75>
xchg   %ax,%ax
movb   $0x20,-0x4(%rdi,%rax,1)
cmpb   $0x48,-0x3(%rdi,%rax,1)
jne    1128 <mv_obstacle+0x28>
movw   $0x2048,-0x4(%rdi,%rax,1)
cmpb   $0x48,-0x2(%rdi,%rax,1)
jne    112f <mv_obstacle+0x2f>
movw   $0x2048,-0x3(%rdi,%rax,1)
cmpb   $0x48,-0x1(%rdi,%rax,1)
jne    1136 <mv_obstacle+0x36>
movw   $0x2048,-0x2(%rdi,%rax,1)
cmpb   $0x48,(%rdi,%rax,1)
jne    1110 <mv_obstacle+0x10>
movw   $0x2048,-0x1(%rdi,%rax,1)
jmp    1110 <mv_obstacle+0x10>
mov    (%rdi),%al
ret

LLVM IR (-O0):
define signext i8 @mv_obstacle([5 x i8]* %0) {
%2 = alloca [5 x i8]*
%3 = alloca i32
%4 = alloca i32
store [5 x i8]* %0, [5 x i8]** %2
store i32 0, i32* %3
store i32 0, i32* %4
br label %5
5: ; preds = %55, %1
%6 = load i32, i32* %3
%7 = icmp slt i32 %6, 5
br i1 %7, label %8, label %58
8: ; preds = %5
br label %9
9: ; preds = %52, %8
%10 = load i32, i32* %4
%11 = icmp slt i32 %10, 5
br i1 %11, label %12, label %55
12: ; preds = %9
%13 = load [5 x i8]*, [5 x i8]** %2
%14 = load i32, i32* %3
%15 = sext i32 %14 to i64
%16 = getelementptr inbounds [5 x i8], [5 x i8]* %13, i64 %15
%17 = load i32, i32* %4
%18 = sext i32 %17 to i64
%19 = getelementptr inbounds [5 x i8], [5 x i8]* %16, i64 0, i64 %18
%20 = load i8, i8* %19
%21 = sext i8 %20 to i32
%22 = icmp eq i32 %21, 72
br i1 %22, label %23, label %52
23: ; preds = %12
%24 = load i32, i32* %4
%25 = sub nsw i32 %24, 1
%26 = icmp ne i32 %25, -1
br i1 %26, label %27, label %43
27: ; preds = %23
%28 = load [5 x i8]*, [5 x i8]** %2
%29 = load i32, i32* %3
%30 = sext i32 %29 to i64
%31 = getelementptr inbounds [5 x i8], [5 x i8]* %28, i64 %30
%32 = load i32, i32* %4
%33 = sub nsw i32 %32, 1
%34 = sext i32 %33 to i64
%35 = getelementptr inbounds [5 x i8], [5 x i8]* %31, i64 0, i64 %34
store i8 72, i8* %35
%36 = load [5 x i8]*, [5 x i8]** %2
%37 = load i32, i32* %3
%38 = sext i32 %37 to i64
%39 = getelementptr inbounds [5 x i8], [5 x i8]* %36, i64 %38
%40 = load i32, i32* %4
%41 = sext i32 %40 to i64
%42 = getelementptr inbounds [5 x i8], [5 x i8]* %39, i64 0, i64 %41
store i8 32, i8* %42
br label %51
43: ; preds = %23
%44 = load [5 x i8]*, [5 x i8]** %2
%45 = load i32, i32* %3
%46 = sext i32 %45 to i64
%47 = getelementptr inbounds [5 x i8], [5 x i8]* %44, i64 %46
%48 = load i32, i32* %4
%49 = sext i32 %48 to i64
%50 = getelementptr inbounds [5 x i8], [5 x i8]* %47, i64 0, i64 %49
store i8 32, i8* %50
br label %51
51: ; preds = %43, %27
br label %52
52: ; preds = %51, %12
%53 = load i32, i32* %4
%54 = add nsw i32 %53, 1
store i32 %54, i32* %4
br label %9
55: ; preds = %9
store i32 0, i32* %4
%56 = load i32, i32* %3
%57 = add nsw i32 %56, 1
store i32 %57, i32* %3
br label %5
58: ; preds = %5
%59 = load [5 x i8]*, [5 x i8]** %2
%60 = getelementptr inbounds [5 x i8], [5 x i8]* %59, i64 0, i64 0
%61 = load i8, i8* %60
ret i8 %61
}

LLVM IR (-O2):
define signext i8 @mv_obstacle([5 x i8]* nocapture %0) {
br label %2
2: ; preds = %1, %28
%3 = phi i64 [ 0, %1 ], [ %29, %28 ]
%4 = getelementptr inbounds [5 x i8], [5 x i8]* %0, i64 %3, i64 0
%5 = load i8, i8* %4
%6 = icmp eq i8 %5, 72
br i1 %6, label %7, label %8
7: ; preds = %2
store i8 32, i8* %4
br label %8
8: ; preds = %7, %2
%9 = getelementptr inbounds [5 x i8], [5 x i8]* %0, i64 %3, i64 1
%10 = load i8, i8* %9
%11 = icmp eq i8 %10, 72
br i1 %11, label %12, label %13
12: ; preds = %8
store i8 72, i8* %4
store i8 32, i8* %9
br label %13
13: ; preds = %12, %8
%14 = getelementptr inbounds [5 x i8], [5 x i8]* %0, i64 %3, i64 2
%15 = load i8, i8* %14
%16 = icmp eq i8 %15, 72
br i1 %16, label %17, label %18
17: ; preds = %13
store i8 72, i8* %9
store i8 32, i8* %14
br label %18
18: ; preds = %17, %13
%19 = getelementptr inbounds [5 x i8], [5 x i8]* %0, i64 %3, i64 3
%20 = load i8, i8* %19
%21 = icmp eq i8 %20, 72
br i1 %21, label %22, label %23
22: ; preds = %18
store i8 72, i8* %14
store i8 32, i8* %19
br label %23
23: ; preds = %22, %18
%24 = getelementptr inbounds [5 x i8], [5 x i8]* %0, i64 %3, i64 4
%25 = load i8, i8* %24
%26 = icmp eq i8 %25, 72
br i1 %26, label %27, label %28
27: ; preds = %23
store i8 72, i8* %19
store i8 32, i8* %24
br label %28
28: ; preds = %27, %23
%29 = add nuw nsw i64 %3, 1
%30 = icmp eq i64 %29, 5
br i1 %30, label %31, label %2
31: ; preds = %28
%32 = getelementptr inbounds [5 x i8], [5 x i8]* %0, i64 0, i64 0
%33 = load i8, i8* %32
ret i8 %33
}