#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 *, ...);
int strlen(char *);
int main(void) {
  int A[5] = {0, 1, 2, 3, 4};
  float B[5] = {10.1, 10.2, 10.3, 10.4, 10.5};
  float C[5];
  int *A_p = A;
  float *B_p = B;
  float *C_p;
  int i;
  printf("A[5] = ");
  for (i = 0; i < 5; i++)
    printf("% 5d\t", *A_p++);
  printf("\n");
  printf("B[5] = ");
  for (i = 0; i < 5; i++)
    printf("%2.2f\t", *B_p++);
  printf("\n");
  for (i = 0, C_p = C, A_p = A, B_p = B; i < 5; i++)
    C_p[i] = A_p[i] * B_p[i];
  char cadena[] = "the quick brown fox jumps over the lazy dog";
  char *cadena_a_p, *cadena_b_p;
  char temp;
  printf("cadena inicial: %s\n", cadena);
  for (cadena_a_p = cadena, cadena_b_p = cadena + strlen(cadena) - 1;
       cadena_a_p != cadena_b_p; cadena_a_p++, cadena_b_p--) {
    temp = (char)(*cadena_b_p);
    printf("cambio %c por %c\n", temp, (char)(*cadena_a_p));
    *cadena_b_p = (char)(*cadena_a_p);
    *cadena_a_p = temp;
  }
  printf("cadena invertida: %s\n", cadena);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0xd0,%rsp
movl   $0x0,-0x4(%rbp)
mov    0xeb7(%rip),%rax
mov    %rax,-0x20(%rbp)
mov    0xeb4(%rip),%rax
mov    %rax,-0x18(%rbp)
mov    0xeb2(%rip),%eax
mov    %eax,-0x10(%rbp)
mov    0xeb8(%rip),%rax
mov    %rax,-0x40(%rbp)
mov    0xeb5(%rip),%rax
mov    %rax,-0x38(%rbp)
mov    0xeb3(%rip),%eax
mov    %eax,-0x30(%rbp)
lea    -0x20(%rbp),%rax
mov    %rax,-0x68(%rbp)
lea    -0x40(%rbp),%rax
mov    %rax,-0x70(%rbp)
lea    0xe9d(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
movl   $0x0,-0x7c(%rbp)
cmpl   $0x5,-0x7c(%rbp)
jge    11dc <main+0xac>
mov    -0x68(%rbp),%rax
mov    %rax,%rcx
add    $0x4,%rcx
mov    %rcx,-0x68(%rbp)
mov    (%rax),%esi
lea    0xe75(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    -0x7c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x7c(%rbp)
jmp    11a5 <main+0x75>
lea    0xe92(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
lea    0xe51(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
movl   $0x0,-0x7c(%rbp)
cmpl   $0x5,-0x7c(%rbp)
jge    123c <main+0x10c>
mov    -0x70(%rbp),%rax
mov    %rax,%rcx
add    $0x4,%rcx
mov    %rcx,-0x70(%rbp)
movss  (%rax),%xmm0
cvtss2sd %xmm0,%xmm0
lea    0xe23(%rip),%rdi
mov    $0x1,%al
call   1040 <printf@plt>
mov    -0x7c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x7c(%rbp)
jmp    11ff <main+0xcf>
lea    0xe32(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
movl   $0x0,-0x7c(%rbp)
lea    -0x60(%rbp),%rax
mov    %rax,-0x78(%rbp)
lea    -0x20(%rbp),%rax
mov    %rax,-0x68(%rbp)
lea    -0x40(%rbp),%rax
mov    %rax,-0x70(%rbp)
cmpl   $0x5,-0x7c(%rbp)
jge    12a8 <main+0x178>
mov    -0x68(%rbp),%rax
movslq -0x7c(%rbp),%rcx
cvtsi2ssl (%rax,%rcx,4),%xmm0
mov    -0x70(%rbp),%rax
movslq -0x7c(%rbp),%rcx
mulss  (%rax,%rcx,4),%xmm0
mov    -0x78(%rbp),%rax
movslq -0x7c(%rbp),%rcx
movss  %xmm0,(%rax,%rcx,4)
mov    -0x7c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x7c(%rbp)
jmp    1269 <main+0x139>
lea    -0xb0(%rbp),%rdi
lea    0xdda(%rip),%rsi
mov    $0x2c,%edx
call   1050 <memcpy@plt>
lea    -0xb0(%rbp),%rsi
lea    0xd83(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
lea    -0xb0(%rbp),%rax
mov    %rax,-0xb8(%rbp)
lea    -0xb0(%rbp),%rax
mov    %rax,-0xd0(%rbp)
lea    -0xb0(%rbp),%rdi
call   1030 <strlen@plt>
mov    %eax,%ecx
mov    -0xd0(%rbp),%rax
movslq %ecx,%rcx
add    %rcx,%rax
add    $0xffffffffffffffff,%rax
mov    %rax,-0xc0(%rbp)
mov    -0xb8(%rbp),%rax
cmp    -0xc0(%rbp),%rax
je     13a3 <main+0x273>
mov    -0xc0(%rbp),%rax
mov    (%rax),%al
mov    %al,-0xc1(%rbp)
movsbl -0xc1(%rbp),%esi
mov    -0xb8(%rbp),%rax
movsbl (%rax),%edx
lea    0xd13(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    -0xb8(%rbp),%rax
mov    (%rax),%cl
mov    -0xc0(%rbp),%rax
mov    %cl,(%rax)
mov    -0xc1(%rbp),%cl
mov    -0xb8(%rbp),%rax
mov    %cl,(%rax)
mov    -0xb8(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0xb8(%rbp)
mov    -0xc0(%rbp),%rax
add    $0xffffffffffffffff,%rax
mov    %rax,-0xc0(%rbp)
jmp    1317 <main+0x1e7>
lea    -0xb0(%rbp),%rsi
lea    0xcc6(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
xor    %eax,%eax
add    $0xd0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %rbx
sub    $0x38,%rsp
lea    0xee7(%rip),%rdi
xor    %eax,%eax
call   1050 <printf@plt>
lea    0xee1(%rip),%rbx
mov    %rbx,%rdi
xor    %esi,%esi
xor    %eax,%eax
call   1050 <printf@plt>
mov    %rbx,%rdi
mov    $0x1,%esi
xor    %eax,%eax
call   1050 <printf@plt>
mov    %rbx,%rdi
mov    $0x2,%esi
xor    %eax,%eax
call   1050 <printf@plt>
mov    %rbx,%rdi
mov    $0x3,%esi
xor    %eax,%eax
call   1050 <printf@plt>
mov    %rbx,%rdi
mov    $0x4,%esi
xor    %eax,%eax
call   1050 <printf@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
lea    0xe8e(%rip),%rdi
xor    %eax,%eax
call   1050 <printf@plt>
lea    0xe88(%rip),%rbx
movsd  0xe42(%rip),%xmm0
mov    %rbx,%rdi
mov    $0x1,%al
call   1050 <printf@plt>
movsd  0xe38(%rip),%xmm0
mov    %rbx,%rdi
mov    $0x1,%al
call   1050 <printf@plt>
movsd  0xe2e(%rip),%xmm0
mov    %rbx,%rdi
mov    $0x1,%al
call   1050 <printf@plt>
movsd  0xe24(%rip),%xmm0
mov    %rbx,%rdi
mov    $0x1,%al
call   1050 <printf@plt>
movsd  0xe1a(%rip),%xmm0
mov    %rbx,%rdi
mov    $0x1,%al
call   1050 <printf@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
movups 0xe8b(%rip),%xmm0
movups %xmm0,0x1c(%rsp)
movaps 0xe73(%rip),%xmm0
movaps %xmm0,0x10(%rsp)
movaps 0xe57(%rip),%xmm0
movaps %xmm0,(%rsp)
lea    0xe01(%rip),%rdi
mov    %rsp,%rbp
mov    %rbp,%rsi
xor    %eax,%eax
call   1050 <printf@plt>
mov    %rbp,%rdi
call   1040 <strlen@plt>
cltq
lea    (%rsp,%rax,1),%rbx
add    $0xffffffffffffffff,%rbx
cmp    %rbx,%rbp
je     12af <main+0x17f>
lea    0x1(%rsp),%rbp
lea    0xde5(%rip),%r14
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
movsbl (%rbx),%r15d
movsbl -0x1(%rbp),%edx
mov    %r14,%rdi
mov    %r15d,%esi
xor    %eax,%eax
call   1050 <printf@plt>
movzbl -0x1(%rbp),%eax
mov    %al,(%rbx)
mov    %r15b,-0x1(%rbp)
add    $0xffffffffffffffff,%rbx
lea    0x1(%rbp),%rax
cmp    %rbx,%rbp
mov    %rax,%rbp
jne    1280 <main+0x150>
lea    0xdb5(%rip),%rdi
mov    %rsp,%rsi
xor    %eax,%eax
call   1050 <printf@plt>
xor    %eax,%eax
add    $0x38,%rsp
pop    %rbx
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@__const.main.A = [5 x i32] [i32 0, i32 1, i32 2, i32 3, i32 4]
@__const.main.B = [5 x float] [float 0x4024333340000000, float 0x4024666660000000, float 0x40249999A0000000, float 0x4024CCCCC0000000, float 1.050000e+01]
@.str = [8 x i8] c"A[5] = \00"
@.str.1 = [6 x i8] c"% 5d\09\00"
@.str.2 = [2 x i8] c"\0A\00"
@.str.3 = [8 x i8] c"B[5] = \00"
@.str.4 = [7 x i8] c"%2.2f\09\00"
@__const.main.cadena = [44 x i8] c"the quick brown fox jumps over the lazy dog\00"
@.str.5 = [20 x i8] c"cadena inicial: %s\0A\00"
@.str.6 = [18 x i8] c"cambio %c por %c\0A\00"
@.str.7 = [22 x i8] c"cadena invertida: %s\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca [5 x i32]
%3 = alloca [5 x float]
%4 = alloca [5 x float]
%5 = alloca i32*
%6 = alloca float*
%7 = alloca float*
%8 = alloca i32
%9 = alloca [44 x i8]
%10 = alloca i8*
%11 = alloca i8*
%12 = alloca i8
store i32 0, i32* %1
%13 = bitcast [5 x i32]* %2 to i8*
%14 = bitcast [5 x float]* %3 to i8*
%15 = getelementptr inbounds [5 x i32], [5 x i32]* %2, i64 0, i64 0
store i32* %15, i32** %5
%16 = getelementptr inbounds [5 x float], [5 x float]* %3, i64 0, i64 0
store float* %16, float** %6
%17 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0))
store i32 0, i32* %8
br label %18
18: ; preds = %26, %0
%19 = load i32, i32* %8
%20 = icmp slt i32 %19, 5
br i1 %20, label %21, label %29
21: ; preds = %18
%22 = load i32*, i32** %5
%23 = getelementptr inbounds i32, i32* %22, i32 1
store i32* %23, i32** %5
%24 = load i32, i32* %22
%25 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), i32 %24)
br label %26
26: ; preds = %21
%27 = load i32, i32* %8
%28 = add nsw i32 %27, 1
store i32 %28, i32* %8
br label %18
29: ; preds = %18
%30 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0))
%31 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.3, i64 0, i64 0))
store i32 0, i32* %8
br label %32
32: ; preds = %41, %29
%33 = load i32, i32* %8
%34 = icmp slt i32 %33, 5
br i1 %34, label %35, label %44
35: ; preds = %32
%36 = load float*, float** %6
%37 = getelementptr inbounds float, float* %36, i32 1
store float* %37, float** %6
%38 = load float, float* %36
%39 = fpext float %38 to double
%40 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.4, i64 0, i64 0), double %39)
br label %41
41: ; preds = %35
%42 = load i32, i32* %8
%43 = add nsw i32 %42, 1
store i32 %43, i32* %8
br label %32
44: ; preds = %32
%45 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0))
store i32 0, i32* %8
%46 = getelementptr inbounds [5 x float], [5 x float]* %4, i64 0, i64 0
store float* %46, float** %7
%47 = getelementptr inbounds [5 x i32], [5 x i32]* %2, i64 0, i64 0
store i32* %47, i32** %5
%48 = getelementptr inbounds [5 x float], [5 x float]* %3, i64 0, i64 0
store float* %48, float** %6
br label %49
49: ; preds = %69, %44
%50 = load i32, i32* %8
%51 = icmp slt i32 %50, 5
br i1 %51, label %52, label %72
52: ; preds = %49
%53 = load i32*, i32** %5
%54 = load i32, i32* %8
%55 = sext i32 %54 to i64
%56 = getelementptr inbounds i32, i32* %53, i64 %55
%57 = load i32, i32* %56
%58 = sitofp i32 %57 to float
%59 = load float*, float** %6
%60 = load i32, i32* %8
%61 = sext i32 %60 to i64
%62 = getelementptr inbounds float, float* %59, i64 %61
%63 = load float, float* %62
%64 = fmul float %58, %63
%65 = load float*, float** %7
%66 = load i32, i32* %8
%67 = sext i32 %66 to i64
%68 = getelementptr inbounds float, float* %65, i64 %67
store float %64, float* %68
br label %69
69: ; preds = %52
%70 = load i32, i32* %8
%71 = add nsw i32 %70, 1
store i32 %71, i32* %8
br label %49
72: ; preds = %49
%73 = bitcast [44 x i8]* %9 to i8*
%74 = getelementptr inbounds [44 x i8], [44 x i8]* %9, i64 0, i64 0
%75 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.5, i64 0, i64 0), i8* %74)
%76 = getelementptr inbounds [44 x i8], [44 x i8]* %9, i64 0, i64 0
store i8* %76, i8** %10
%77 = getelementptr inbounds [44 x i8], [44 x i8]* %9, i64 0, i64 0
%78 = getelementptr inbounds [44 x i8], [44 x i8]* %9, i64 0, i64 0
%79 = call i32 @strlen(i8* %78)
%80 = sext i32 %79 to i64
%81 = getelementptr inbounds i8, i8* %77, i64 %80
%82 = getelementptr inbounds i8, i8* %81, i64 -1
store i8* %82, i8** %11
br label %83
83: ; preds = %101, %72
%84 = load i8*, i8** %10
%85 = load i8*, i8** %11
%86 = icmp ne i8* %84, %85
br i1 %86, label %87, label %106
87: ; preds = %83
%88 = load i8*, i8** %11
%89 = load i8, i8* %88
store i8 %89, i8* %12
%90 = load i8, i8* %12
%91 = sext i8 %90 to i32
%92 = load i8*, i8** %10
%93 = load i8, i8* %92
%94 = sext i8 %93 to i32
%95 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.6, i64 0, i64 0), i32 %91, i32 %94)
%96 = load i8*, i8** %10
%97 = load i8, i8* %96
%98 = load i8*, i8** %11
store i8 %97, i8* %98
%99 = load i8, i8* %12
%100 = load i8*, i8** %10
store i8 %99, i8* %100
br label %101
101: ; preds = %87
%102 = load i8*, i8** %10
%103 = getelementptr inbounds i8, i8* %102, i32 1
store i8* %103, i8** %10
%104 = load i8*, i8** %11
%105 = getelementptr inbounds i8, i8* %104, i32 -1
store i8* %105, i8** %11
br label %83
106: ; preds = %83
%107 = getelementptr inbounds [44 x i8], [44 x i8]* %9, i64 0, i64 0
%108 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.7, i64 0, i64 0), i8* %107)
ret i32 0
}

LLVM IR (-O2):
@.str = [8 x i8] c"A[5] = \00"
@.str.1 = [6 x i8] c"% 5d\09\00"
@.str.3 = [8 x i8] c"B[5] = \00"
@.str.4 = [7 x i8] c"%2.2f\09\00"
@__const.main.cadena = [44 x i8] c"the quick brown fox jumps over the lazy dog\00"
@.str.5 = [20 x i8] c"cadena inicial: %s\0A\00"
@.str.6 = [18 x i8] c"cambio %c por %c\0A\00"
@.str.7 = [22 x i8] c"cadena invertida: %s\0A\00"
define i32 @main() {
%1 = alloca [44 x i8]
%2 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0))
%3 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), i32 0)
%4 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), i32 1)
%5 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), i32 2)
%6 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), i32 3)
%7 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), i32 4)
%8 = tail call i32 @putchar(i32 10)
%9 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([8 x i8], [8 x i8]* @.str.3, i64 0, i64 0))
%10 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @.str.4, i64 0, i64 0), double 0x4024333340000000)
%11 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @.str.4, i64 0, i64 0), double 0x4024666660000000)
%12 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @.str.4, i64 0, i64 0), double 0x40249999A0000000)
%13 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @.str.4, i64 0, i64 0), double 0x4024CCCCC0000000)
%14 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @.str.4, i64 0, i64 0), double 1.050000e+01)
%15 = tail call i32 @putchar(i32 10)
%16 = getelementptr inbounds [44 x i8], [44 x i8]* %1, i64 0, i64 0
%17 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([20 x i8], [20 x i8]* @.str.5, i64 0, i64 0), i8* %16)
%18 = call i32 @strlen(i8* %16)
%19 = sext i32 %18 to i64
%20 = getelementptr inbounds [44 x i8], [44 x i8]* %1, i64 0, i64 %19
%21 = getelementptr inbounds i8, i8* %20, i64 -1
%22 = icmp eq i8* %16, %21
br i1 %22, label %35, label %23
23: ; preds = %0, %23
%24 = phi i8* [ %33, %23 ], [ %21, %0 ]
%25 = phi i8* [ %32, %23 ], [ %16, %0 ]
%26 = load i8, i8* %24
%27 = sext i8 %26 to i32
%28 = load i8, i8* %25
%29 = sext i8 %28 to i32
%30 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([18 x i8], [18 x i8]* @.str.6, i64 0, i64 0), i32 %27, i32 %29)
%31 = load i8, i8* %25
store i8 %31, i8* %24
store i8 %26, i8* %25
%32 = getelementptr inbounds i8, i8* %25, i64 1
%33 = getelementptr inbounds i8, i8* %24, i64 -1
%34 = icmp eq i8* %32, %33
br i1 %34, label %35, label %23
35: ; preds = %23, %0
%36 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([22 x i8], [22 x i8]* @.str.7, i64 0, i64 0), i8* %16)
ret i32 0
}