void drawField(char campo[25][50]) {
  int i, j;
  for (i = 0; i < 25; i++) {
    for (j = 0; j < 50; j++) {
      if (i == 0 || i == 25 - 1)
        campo[i][j] = '-';
      else if (j == 0 || j == 50 - 1)
        campo[i][j] = '|';
      else
        campo[i][j] = ' ';
    }
  }
  campo[0][0] = '+';
  campo[0][50 - 1] = '+';
  campo[25 - 1][0] = '+';
  campo[25 - 1][50 - 1] = '+';
}


x86 assembly (clang, -O0):
<drawField>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
cmpl   $0x19,-0xc(%rbp)
jge    11cc <drawField+0xcc>
movl   $0x0,-0x10(%rbp)
cmpl   $0x32,-0x10(%rbp)
jge    11b9 <drawField+0xb9>
cmpl   $0x0,-0xc(%rbp)
je     113e <drawField+0x3e>
cmpl   $0x18,-0xc(%rbp)
jne    115a <drawField+0x5a>
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
imul   $0x32,%rcx,%rcx
add    %rcx,%rax
movslq -0x10(%rbp),%rcx
movb   $0x2d,(%rax,%rcx,1)
jmp    11a6 <drawField+0xa6>
cmpl   $0x0,-0x10(%rbp)
je     116e <drawField+0x6e>
cmpl   $0x31,-0x10(%rbp)
jne    118a <drawField+0x8a>
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
imul   $0x32,%rcx,%rcx
add    %rcx,%rax
movslq -0x10(%rbp),%rcx
movb   $0x7c,(%rax,%rcx,1)
jmp    11a1 <drawField+0xa1>
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
imul   $0x32,%rcx,%rcx
add    %rcx,%rax
movslq -0x10(%rbp),%rcx
movb   $0x20,(%rax,%rcx,1)
jmp    11a6 <drawField+0xa6>
jmp    11ab <drawField+0xab>
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    1120 <drawField+0x20>
jmp    11be <drawField+0xbe>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    110f <drawField+0xf>
mov    -0x8(%rbp),%rax
movb   $0x2b,(%rax)
mov    -0x8(%rbp),%rax
movb   $0x2b,0x31(%rax)
mov    -0x8(%rbp),%rax
movb   $0x2b,0x4b0(%rax)
mov    -0x8(%rbp),%rax
movb   $0x2b,0x4e1(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<drawField>:
lea    0x1(%rdi),%r9
xor    %ecx,%ecx
mov    $0x7c,%r8d
jmp    111e <drawField+0x1e>
xchg   %ax,%ax
add    $0x1,%rcx
add    $0x32,%r9
cmp    $0x19,%rcx
je     1176 <drawField+0x76>
xor    %esi,%esi
jmp    113e <drawField+0x3e>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
mov    %dl,(%r9,%rsi,1)
add    $0x2,%rsi
cmp    $0x32,%rsi
je     1110 <drawField+0x10>
mov    $0x2d,%dl
mov    $0x2d,%al
test   %ecx,%ecx
je     1159 <drawField+0x59>
mov    $0x2d,%al
cmp    $0x18,%ecx
je     1159 <drawField+0x59>
test   %rsi,%rsi
mov    $0x20,%eax
cmove  %r8d,%eax
mov    %al,-0x1(%r9,%rsi,1)
test   %ecx,%ecx
je     1130 <drawField+0x30>
cmp    $0x18,%ecx
je     1130 <drawField+0x30>
cmp    $0x30,%rsi
mov    $0x20,%edx
cmove  %r8d,%edx
jmp    1130 <drawField+0x30>
movb   $0x2b,(%rdi)
movb   $0x2b,0x31(%rdi)
movb   $0x2b,0x4b0(%rdi)
movb   $0x2b,0x4e1(%rdi)
ret

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

LLVM IR (-O2):
define void @drawField([50 x i8]* nocapture writeonly %0) {
br label %2
2: ; preds = %1, %22
%3 = phi i64 [ 0, %1 ], [ %23, %22 ]
%4 = trunc i64 %3 to i32
br label %5
5: ; preds = %17, %2
%6 = phi i64 [ 0, %2 ], [ %20, %17 ]
switch i32 %4, label %7 [
i32 24, label %10
i32 0, label %10
]
7: ; preds = %5
%8 = icmp eq i64 %6, 0
%9 = select i1 %8, i8 124, i8 32
br label %10
10: ; preds = %7, %5, %5
%11 = phi i8 [ 45, %5 ], [ 45, %5 ], [ %9, %7 ]
%12 = getelementptr inbounds [50 x i8], [50 x i8]* %0, i64 %3, i64 %6
store i8 %11, i8* %12
%13 = or i64 %6, 1
switch i32 %4, label %14 [
i32 24, label %17
i32 0, label %17
]
14: ; preds = %10
%15 = icmp eq i64 %13, 49
%16 = select i1 %15, i8 124, i8 32
br label %17
17: ; preds = %14, %10, %10
%18 = phi i8 [ 45, %10 ], [ 45, %10 ], [ %16, %14 ]
%19 = getelementptr inbounds [50 x i8], [50 x i8]* %0, i64 %3, i64 %13
store i8 %18, i8* %19
%20 = add nuw nsw i64 %6, 2
%21 = icmp eq i64 %20, 50
br i1 %21, label %22, label %5
22: ; preds = %17
%23 = add nuw nsw i64 %3, 1
%24 = icmp eq i64 %23, 25
br i1 %24, label %25, label %2
25: ; preds = %22
%26 = getelementptr inbounds [50 x i8], [50 x i8]* %0, i64 0, i64 0
store i8 43, i8* %26
%27 = getelementptr inbounds [50 x i8], [50 x i8]* %0, i64 0, i64 49
store i8 43, i8* %27
%28 = getelementptr inbounds [50 x i8], [50 x i8]* %0, i64 24, i64 0
store i8 43, i8* %28
%29 = getelementptr inbounds [50 x i8], [50 x i8]* %0, i64 24, i64 49
store i8 43, i8* %29
ret void
}