#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 BANCO_GetRegister(int);
int /*<<< orphan*/ printf(char *, ...);
void imprimeRegistradores() {
  int i;
  printf("Registradores \n");
  for (i = 0; i < 31; i += 2) {
    printf("R%d = %d	R%d = %d\n", i, BANCO_GetRegister(i), i + 1,
           BANCO_GetRegister(i + 1));
  }
  printf("\n ------------------------------------------------\n");
}


x86 assembly (clang, -O0):
<imprimeRegistradores>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    0xed1(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movl   $0x0,-0x4(%rbp)
cmpl   $0x1f,-0x4(%rbp)
jge    1194 <imprimeRegistradores+0x74>
mov    -0x4(%rbp),%eax
mov    %eax,-0x10(%rbp)
mov    -0x4(%rbp),%edi
call   1040 <BANCO_GetRegister@plt>
mov    %eax,-0xc(%rbp)
mov    -0x4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
mov    -0x4(%rbp),%edi
add    $0x1,%edi
call   1040 <BANCO_GetRegister@plt>
mov    -0x10(%rbp),%esi
mov    -0xc(%rbp),%edx
mov    -0x8(%rbp),%ecx
mov    %eax,%r8d
lea    0xe91(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x4(%rbp),%eax
add    $0x2,%eax
mov    %eax,-0x4(%rbp)
jmp    113d <imprimeRegistradores+0x1d>
lea    0xe88(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<imprimeRegistradores>:
push   %rbp
push   %rbx
push   %rax
lea    0xed9(%rip),%rdi
call   1030 <puts@plt>
xor    %edi,%edi
call   1050 <BANCO_GetRegister@plt>
mov    %eax,%ebp
mov    $0x1,%edi
call   1050 <BANCO_GetRegister@plt>
lea    0xea7(%rip),%rbx
mov    %rbx,%rdi
xor    %esi,%esi
mov    %ebp,%edx
mov    $0x1,%ecx
mov    %eax,%r8d
xor    %eax,%eax
call   1040 <printf@plt>
mov    $0x2,%edi
call   1050 <BANCO_GetRegister@plt>
mov    %eax,%ebp
mov    $0x3,%edi
call   1050 <BANCO_GetRegister@plt>
mov    %rbx,%rdi
mov    $0x2,%esi
mov    %ebp,%edx
mov    $0x3,%ecx
mov    %eax,%r8d
xor    %eax,%eax
call   1040 <printf@plt>
mov    $0x4,%edi
call   1050 <BANCO_GetRegister@plt>
mov    %eax,%ebp
mov    $0x5,%edi
call   1050 <BANCO_GetRegister@plt>
mov    %rbx,%rdi
mov    $0x4,%esi
mov    %ebp,%edx
mov    $0x5,%ecx
mov    %eax,%r8d
xor    %eax,%eax
call   1040 <printf@plt>
mov    $0x6,%edi
call   1050 <BANCO_GetRegister@plt>
mov    %eax,%ebp
mov    $0x7,%edi
call   1050 <BANCO_GetRegister@plt>
mov    %rbx,%rdi
mov    $0x6,%esi
mov    %ebp,%edx
mov    $0x7,%ecx
mov    %eax,%r8d
xor    %eax,%eax
call   1040 <printf@plt>
mov    $0x8,%edi
call   1050 <BANCO_GetRegister@plt>
mov    %eax,%ebp
mov    $0x9,%edi
call   1050 <BANCO_GetRegister@plt>
mov    %rbx,%rdi
mov    $0x8,%esi
mov    %ebp,%edx
mov    $0x9,%ecx
mov    %eax,%r8d
xor    %eax,%eax
call   1040 <printf@plt>
mov    $0xa,%edi
call   1050 <BANCO_GetRegister@plt>
mov    %eax,%ebp
mov    $0xb,%edi
call   1050 <BANCO_GetRegister@plt>
mov    %rbx,%rdi
mov    $0xa,%esi
mov    %ebp,%edx
mov    $0xb,%ecx
mov    %eax,%r8d
xor    %eax,%eax
call   1040 <printf@plt>
mov    $0xc,%edi
call   1050 <BANCO_GetRegister@plt>
mov    %eax,%ebp
mov    $0xd,%edi
call   1050 <BANCO_GetRegister@plt>
mov    %rbx,%rdi
mov    $0xc,%esi
mov    %ebp,%edx
mov    $0xd,%ecx
mov    %eax,%r8d
xor    %eax,%eax
call   1040 <printf@plt>
mov    $0xe,%edi
call   1050 <BANCO_GetRegister@plt>
mov    %eax,%ebp
mov    $0xf,%edi
call   1050 <BANCO_GetRegister@plt>
mov    %rbx,%rdi
mov    $0xe,%esi
mov    %ebp,%edx
mov    $0xf,%ecx
mov    %eax,%r8d
xor    %eax,%eax
call   1040 <printf@plt>
mov    $0x10,%edi
call   1050 <BANCO_GetRegister@plt>
mov    %eax,%ebp
mov    $0x11,%edi
call   1050 <BANCO_GetRegister@plt>
mov    %rbx,%rdi
mov    $0x10,%esi
mov    %ebp,%edx
mov    $0x11,%ecx
mov    %eax,%r8d
xor    %eax,%eax
call   1040 <printf@plt>
mov    $0x12,%edi
call   1050 <BANCO_GetRegister@plt>
mov    %eax,%ebp
mov    $0x13,%edi
call   1050 <BANCO_GetRegister@plt>
mov    %rbx,%rdi
mov    $0x12,%esi
mov    %ebp,%edx
mov    $0x13,%ecx
mov    %eax,%r8d
xor    %eax,%eax
call   1040 <printf@plt>
mov    $0x14,%edi
call   1050 <BANCO_GetRegister@plt>
mov    %eax,%ebp
mov    $0x15,%edi
call   1050 <BANCO_GetRegister@plt>
mov    %rbx,%rdi
mov    $0x14,%esi
mov    %ebp,%edx
mov    $0x15,%ecx
mov    %eax,%r8d
xor    %eax,%eax
call   1040 <printf@plt>
mov    $0x16,%edi
call   1050 <BANCO_GetRegister@plt>
mov    %eax,%ebp
mov    $0x17,%edi
call   1050 <BANCO_GetRegister@plt>
mov    %rbx,%rdi
mov    $0x16,%esi
mov    %ebp,%edx
mov    $0x17,%ecx
mov    %eax,%r8d
xor    %eax,%eax
call   1040 <printf@plt>
mov    $0x18,%edi
call   1050 <BANCO_GetRegister@plt>
mov    %eax,%ebp
mov    $0x19,%edi
call   1050 <BANCO_GetRegister@plt>
mov    %rbx,%rdi
mov    $0x18,%esi
mov    %ebp,%edx
mov    $0x19,%ecx
mov    %eax,%r8d
xor    %eax,%eax
call   1040 <printf@plt>
mov    $0x1a,%edi
call   1050 <BANCO_GetRegister@plt>
mov    %eax,%ebp
mov    $0x1b,%edi
call   1050 <BANCO_GetRegister@plt>
mov    %rbx,%rdi
mov    $0x1a,%esi
mov    %ebp,%edx
mov    $0x1b,%ecx
mov    %eax,%r8d
xor    %eax,%eax
call   1040 <printf@plt>
mov    $0x1c,%edi
call   1050 <BANCO_GetRegister@plt>
mov    %eax,%ebp
mov    $0x1d,%edi
call   1050 <BANCO_GetRegister@plt>
mov    %rbx,%rdi
mov    $0x1c,%esi
mov    %ebp,%edx
mov    $0x1d,%ecx
mov    %eax,%r8d
xor    %eax,%eax
call   1040 <printf@plt>
mov    $0x1e,%edi
call   1050 <BANCO_GetRegister@plt>
mov    %eax,%ebp
mov    $0x1f,%edi
call   1050 <BANCO_GetRegister@plt>
mov    %rbx,%rdi
mov    $0x1e,%esi
mov    %ebp,%edx
mov    $0x1f,%ecx
mov    %eax,%r8d
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xbeb(%rip),%rdi
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    1030 <puts@plt>

LLVM IR (-O0):
@.str = [16 x i8] c"Registradores \0A\00"
@.str.1 = [19 x i8] c"R%d = %d\09R%d = %d\0A\00"
@.str.2 = [52 x i8] c"\0A ------------------------------------------------\0A\00"
define void @imprimeRegistradores() {
%1 = alloca i32
%2 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0))
store i32 0, i32* %1
br label %3
3: ; preds = %16, %0
%4 = load i32, i32* %1
%5 = icmp slt i32 %4, 31
br i1 %5, label %6, label %19
6: ; preds = %3
%7 = load i32, i32* %1
%8 = load i32, i32* %1
%9 = call i32 @BANCO_GetRegister(i32 %8)
%10 = load i32, i32* %1
%11 = add nsw i32 %10, 1
%12 = load i32, i32* %1
%13 = add nsw i32 %12, 1
%14 = call i32 @BANCO_GetRegister(i32 %13)
%15 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.1, i64 0, i64 0), i32 %7, i32 %9, i32 %11, i32 %14)
br label %16
16: ; preds = %6
%17 = load i32, i32* %1
%18 = add nsw i32 %17, 2
store i32 %18, i32* %1
br label %3
19: ; preds = %3
%20 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([52 x i8], [52 x i8]* @.str.2, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str.1 = [19 x i8] c"R%d = %d\09R%d = %d\0A\00"
@str = [15 x i8] c"Registradores \00"
@str.3 = [51 x i8] c"\0A ------------------------------------------------\00"
define void @imprimeRegistradores() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([15 x i8], [15 x i8]* @str, i64 0, i64 0))
%2 = tail call i32 @BANCO_GetRegister(i32 0)
%3 = tail call i32 @BANCO_GetRegister(i32 1)
%4 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([19 x i8], [19 x i8]* @.str.1, i64 0, i64 0), i32 0, i32 %2, i32 1, i32 %3)
%5 = tail call i32 @BANCO_GetRegister(i32 2)
%6 = tail call i32 @BANCO_GetRegister(i32 3)
%7 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([19 x i8], [19 x i8]* @.str.1, i64 0, i64 0), i32 2, i32 %5, i32 3, i32 %6)
%8 = tail call i32 @BANCO_GetRegister(i32 4)
%9 = tail call i32 @BANCO_GetRegister(i32 5)
%10 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([19 x i8], [19 x i8]* @.str.1, i64 0, i64 0), i32 4, i32 %8, i32 5, i32 %9)
%11 = tail call i32 @BANCO_GetRegister(i32 6)
%12 = tail call i32 @BANCO_GetRegister(i32 7)
%13 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([19 x i8], [19 x i8]* @.str.1, i64 0, i64 0), i32 6, i32 %11, i32 7, i32 %12)
%14 = tail call i32 @BANCO_GetRegister(i32 8)
%15 = tail call i32 @BANCO_GetRegister(i32 9)
%16 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([19 x i8], [19 x i8]* @.str.1, i64 0, i64 0), i32 8, i32 %14, i32 9, i32 %15)
%17 = tail call i32 @BANCO_GetRegister(i32 10)
%18 = tail call i32 @BANCO_GetRegister(i32 11)
%19 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([19 x i8], [19 x i8]* @.str.1, i64 0, i64 0), i32 10, i32 %17, i32 11, i32 %18)
%20 = tail call i32 @BANCO_GetRegister(i32 12)
%21 = tail call i32 @BANCO_GetRegister(i32 13)
%22 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([19 x i8], [19 x i8]* @.str.1, i64 0, i64 0), i32 12, i32 %20, i32 13, i32 %21)
%23 = tail call i32 @BANCO_GetRegister(i32 14)
%24 = tail call i32 @BANCO_GetRegister(i32 15)
%25 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([19 x i8], [19 x i8]* @.str.1, i64 0, i64 0), i32 14, i32 %23, i32 15, i32 %24)
%26 = tail call i32 @BANCO_GetRegister(i32 16)
%27 = tail call i32 @BANCO_GetRegister(i32 17)
%28 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([19 x i8], [19 x i8]* @.str.1, i64 0, i64 0), i32 16, i32 %26, i32 17, i32 %27)
%29 = tail call i32 @BANCO_GetRegister(i32 18)
%30 = tail call i32 @BANCO_GetRegister(i32 19)
%31 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([19 x i8], [19 x i8]* @.str.1, i64 0, i64 0), i32 18, i32 %29, i32 19, i32 %30)
%32 = tail call i32 @BANCO_GetRegister(i32 20)
%33 = tail call i32 @BANCO_GetRegister(i32 21)
%34 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([19 x i8], [19 x i8]* @.str.1, i64 0, i64 0), i32 20, i32 %32, i32 21, i32 %33)
%35 = tail call i32 @BANCO_GetRegister(i32 22)
%36 = tail call i32 @BANCO_GetRegister(i32 23)
%37 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([19 x i8], [19 x i8]* @.str.1, i64 0, i64 0), i32 22, i32 %35, i32 23, i32 %36)
%38 = tail call i32 @BANCO_GetRegister(i32 24)
%39 = tail call i32 @BANCO_GetRegister(i32 25)
%40 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([19 x i8], [19 x i8]* @.str.1, i64 0, i64 0), i32 24, i32 %38, i32 25, i32 %39)
%41 = tail call i32 @BANCO_GetRegister(i32 26)
%42 = tail call i32 @BANCO_GetRegister(i32 27)
%43 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([19 x i8], [19 x i8]* @.str.1, i64 0, i64 0), i32 26, i32 %41, i32 27, i32 %42)
%44 = tail call i32 @BANCO_GetRegister(i32 28)
%45 = tail call i32 @BANCO_GetRegister(i32 29)
%46 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([19 x i8], [19 x i8]* @.str.1, i64 0, i64 0), i32 28, i32 %44, i32 29, i32 %45)
%47 = tail call i32 @BANCO_GetRegister(i32 30)
%48 = tail call i32 @BANCO_GetRegister(i32 31)
%49 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([19 x i8], [19 x i8]* @.str.1, i64 0, i64 0), i32 30, i32 %47, i32 31, i32 %48)
%50 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([51 x i8], [51 x i8]* @str.3, i64 0, i64 0))
ret void
}