#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 desNormalizada(int x[]) {
  int i, y;
  if (x[0] == 1)
    printf("-");
  for (i = 9, y = 1; i < 32; i++, y++) {
    if (x[i] == 1) {
      printf("2^-%d ", y);
      if (i < 32)
        printf("+");
    }
  }
  if (x[0] == 1)
    printf("* 2^⁻126\n");
}


x86 assembly (clang, -O0):
<desNormalizada>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
cmpl   $0x1,(%rax)
jne    1137 <desNormalizada+0x27>
lea    0xed0(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movl   $0x9,-0xc(%rbp)
movl   $0x1,-0x10(%rbp)
cmpl   $0x20,-0xc(%rbp)
jge    11ab <desNormalizada+0x9b>
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
cmpl   $0x1,(%rax,%rcx,4)
jne    118f <desNormalizada+0x7f>
mov    -0x10(%rbp),%esi
lea    0xe97(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
cmpl   $0x20,-0xc(%rbp)
jge    118a <desNormalizada+0x7a>
lea    0xe86(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    118f <desNormalizada+0x7f>
jmp    1194 <desNormalizada+0x84>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    1145 <desNormalizada+0x35>
mov    -0x8(%rbp),%rax
cmpl   $0x1,(%rax)
jne    11c6 <desNormalizada+0xb6>
lea    0xe4c(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<desNormalizada>:
push   %r15
push   %r14
push   %rbx
mov    %rdi,%r15
cmpl   $0x1,(%rdi)
jne    1147 <desNormalizada+0x17>
mov    $0x2d,%edi
call   1030 <putchar@plt>
mov    $0x9,%ebx
lea    0xead(%rip),%r14
jmp    116a <desNormalizada+0x3a>
cs nopw 0x0(%rax,%rax,1)
nop
add    $0x1,%rbx
cmp    $0x20,%rbx
je     118b <desNormalizada+0x5b>
cmpl   $0x1,(%r15,%rbx,4)
jne    1160 <desNormalizada+0x30>
lea    -0x8(%rbx),%rsi
mov    %r14,%rdi
xor    %eax,%eax
call   1050 <printf@plt>
mov    $0x2b,%edi
call   1030 <putchar@plt>
jmp    1160 <desNormalizada+0x30>
cmpl   $0x1,(%r15)
jne    11a2 <desNormalizada+0x72>
lea    0xe6f(%rip),%rdi
pop    %rbx
pop    %r14
pop    %r15
jmp    1040 <puts@plt>
pop    %rbx
pop    %r14
pop    %r15
ret

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

LLVM IR (-O2):
@.str.1 = [7 x i8] c"2^-%d \00"
@str = [11 x i8] c"* 2^\E2\81\BB126\00"
define void @desNormalizada(i32* nocapture %0) {
%2 = load i32, i32* %0
%3 = icmp eq i32 %2, 1
br i1 %3, label %4, label %6
4: ; preds = %1
%5 = tail call i32 @putchar(i32 45)
br label %6
6: ; preds = %4, %1
br label %7
7: ; preds = %6, %16
%8 = phi i64 [ %17, %16 ], [ 9, %6 ]
%9 = phi i32 [ %18, %16 ], [ 1, %6 ]
%10 = getelementptr inbounds i32, i32* %0, i64 %8
%11 = load i32, i32* %10
%12 = icmp eq i32 %11, 1
br i1 %12, label %13, label %16
13: ; preds = %7
%14 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0), i32 %9)
%15 = tail call i32 @putchar(i32 43)
br label %16
16: ; preds = %7, %13
%17 = add nuw nsw i64 %8, 1
%18 = add nuw nsw i32 %9, 1
%19 = icmp eq i64 %17, 32
br i1 %19, label %20, label %7
20: ; preds = %16
%21 = load i32, i32* %0
%22 = icmp eq i32 %21, 1
br i1 %22, label %23, label %25
23: ; preds = %20
%24 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([11 x i8], [11 x i8]* @str, i64 0, i64 0))
br label %25
25: ; preds = %23, %20
ret void
}