#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 /*<<< orphan*/ scanf(char *, ...);
int main(void) {
  int n_conta = 0;
  float saldo = 0.0, encargos = 0.0, limite_creditos = 0.0,
        total_creditos = 0.0;
  while (n_conta != -1) {
    printf("informe o numero da conta:(-1 para terminar a) \n");
    scanf("%d", &n_conta);
    if (n_conta != -1) {
      printf("informe o saldo inicial: \n");
      scanf("%f", &saldo);
      printf("informe o total de encargos: \n");
      scanf("%f", &encargos);
      printf("informe o total de creditos: \n");
      scanf("%f", &total_creditos);
      printf("informe o limite de creditos: \n");
      scanf("%f", &limite_creditos);
      printf("\v\n");
    }
    if (((saldo + encargos - total_creditos) > limite_creditos) &&
        (n_conta != -1)) {
      printf("conta: %.2d \n\vLimite de credito: %.2f \n", n_conta,
             limite_creditos);
      printf("saldo: %.2f \n", saldo + encargos - total_creditos);
      printf("limite de credito ultrapassado: \n\v");
    }
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
xorps  %xmm0,%xmm0
movss  %xmm0,-0xc(%rbp)
xorps  %xmm0,%xmm0
movss  %xmm0,-0x10(%rbp)
xorps  %xmm0,%xmm0
movss  %xmm0,-0x14(%rbp)
xorps  %xmm0,%xmm0
movss  %xmm0,-0x18(%rbp)
cmpl   $0xffffffff,-0x8(%rbp)
je     1289 <main+0x169>
lea    0xe99(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xebc(%rip),%rdi
lea    -0x8(%rbp),%rsi
mov    $0x0,%al
call   1040 <scanf@plt>
cmpl   $0xffffffff,-0x8(%rbp)
je     1218 <main+0xf8>
lea    0xea3(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xeb0(%rip),%rdi
lea    -0xc(%rbp),%rsi
mov    $0x0,%al
call   1040 <scanf@plt>
lea    0xea1(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xe90(%rip),%rdi
lea    -0x10(%rbp),%rsi
mov    $0x0,%al
call   1040 <scanf@plt>
lea    0xea0(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xe70(%rip),%rdi
lea    -0x18(%rbp),%rsi
mov    $0x0,%al
call   1040 <scanf@plt>
lea    0xe9f(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xe50(%rip),%rdi
lea    -0x14(%rbp),%rsi
mov    $0x0,%al
call   1040 <scanf@plt>
lea    0xe9f(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movss  -0xc(%rbp),%xmm0
addss  -0x10(%rbp),%xmm0
subss  -0x18(%rbp),%xmm0
ucomiss -0x14(%rbp),%xmm0
jbe    1284 <main+0x164>
cmpl   $0xffffffff,-0x8(%rbp)
je     1284 <main+0x164>
mov    -0x8(%rbp),%esi
movss  -0x14(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
lea    0xe65(%rip),%rdi
mov    $0x1,%al
call   1030 <printf@plt>
movss  -0xc(%rbp),%xmm0
addss  -0x10(%rbp),%xmm0
subss  -0x18(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
lea    0xe6c(%rip),%rdi
mov    $0x1,%al
call   1030 <printf@plt>
lea    0xe6c(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    1156 <main+0x36>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x18,%rsp
movl   $0x0,0x4(%rsp)
movl   $0x0,0x10(%rsp)
movl   $0x0,0xc(%rsp)
movl   $0x0,0x14(%rsp)
movl   $0x0,0x8(%rsp)
lea    0xef2(%rip),%r14
lea    0xe8c(%rip),%r15
lea    0x4(%rsp),%rbx
lea    0xe83(%rip),%r13
lea    0x14(%rsp),%rbp
lea    0xed1(%rip),%r12
jmp    1199 <main+0x69>
xchg   %ax,%ax
cmp    $0xffffffff,%esi
je     12ac <main+0x17c>
mov    %r14,%rdi
call   1030 <puts@plt>
mov    %r15,%rdi
mov    %rbx,%rsi
xor    %eax,%eax
call   1050 <scanf@plt>
cmpl   $0xffffffff,0x4(%rsp)
je     1230 <main+0x100>
lea    0xed3(%rip),%rdi
call   1030 <puts@plt>
mov    %r13,%rdi
lea    0x10(%rsp),%rsi
xor    %eax,%eax
call   1050 <scanf@plt>
lea    0xed2(%rip),%rdi
call   1030 <puts@plt>
mov    %r13,%rdi
lea    0xc(%rsp),%rsi
xor    %eax,%eax
call   1050 <scanf@plt>
lea    0xed5(%rip),%rdi
call   1030 <puts@plt>
mov    %r13,%rdi
lea    0x8(%rsp),%rsi
xor    %eax,%eax
call   1050 <scanf@plt>
lea    0xed8(%rip),%rdi
call   1030 <puts@plt>
mov    %r13,%rdi
mov    %rbp,%rsi
xor    %eax,%eax
call   1050 <scanf@plt>
mov    %r12,%rdi
call   1030 <puts@plt>
mov    0x4(%rsp),%esi
jmp    1235 <main+0x105>
nopl   (%rax)
mov    $0xffffffff,%esi
movss  0x10(%rsp),%xmm1
addss  0xc(%rsp),%xmm1
subss  0x8(%rsp),%xmm1
movss  0x14(%rsp),%xmm0
ucomiss %xmm0,%xmm1
jbe    1190 <main+0x60>
cmp    $0xffffffff,%esi
je     1190 <main+0x60>
cvtss2sd %xmm0,%xmm0
lea    0xd9c(%rip),%rdi
mov    $0x1,%al
call   1040 <printf@plt>
movss  0x10(%rsp),%xmm0
addss  0xc(%rsp),%xmm0
subss  0x8(%rsp),%xmm0
cvtss2sd %xmm0,%xmm0
lea    0xda0(%rip),%rdi
mov    $0x1,%al
call   1040 <printf@plt>
lea    0xda0(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
mov    0x4(%rsp),%esi
jmp    1190 <main+0x60>
xor    %eax,%eax
add    $0x18,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@.str = [49 x i8] c"informe o numero da conta:(-1 para terminar a) \0A\00"
@.str.1 = [3 x i8] c"%d\00"
@.str.2 = [27 x i8] c"informe o saldo inicial: \0A\00"
@.str.3 = [3 x i8] c"%f\00"
@.str.4 = [31 x i8] c"informe o total de encargos: \0A\00"
@.str.5 = [31 x i8] c"informe o total de creditos: \0A\00"
@.str.6 = [32 x i8] c"informe o limite de creditos: \0A\00"
@.str.7 = [3 x i8] c"\0B\0A\00"
@.str.8 = [40 x i8] c"conta: %.2d \0A\0BLimite de credito: %.2f \0A\00"
@.str.9 = [14 x i8] c"saldo: %.2f \0A\00"
@.str.10 = [35 x i8] c"limite de credito ultrapassado: \0A\0B\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca float
%4 = alloca float
%5 = alloca float
%6 = alloca float
store i32 0, i32* %1
store i32 0, i32* %2
store float 0.000000e+00, float* %3
store float 0.000000e+00, float* %4
store float 0.000000e+00, float* %5
store float 0.000000e+00, float* %6
br label %7
7: ; preds = %49, %0
%8 = load i32, i32* %2
%9 = icmp ne i32 %8, -1
br i1 %9, label %10, label %50
10: ; preds = %7
%11 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([49 x i8], [49 x i8]* @.str, i64 0, i64 0))
%12 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %2)
%13 = load i32, i32* %2
%14 = icmp ne i32 %13, -1
br i1 %14, label %15, label %25
15: ; preds = %10
%16 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.2, i64 0, i64 0))
%17 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.3, i64 0, i64 0), float* %3)
%18 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str.4, i64 0, i64 0))
%19 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.3, i64 0, i64 0), float* %4)
%20 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str.5, i64 0, i64 0))
%21 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.3, i64 0, i64 0), float* %6)
%22 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str.6, i64 0, i64 0))
%23 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.3, i64 0, i64 0), float* %5)
%24 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.7, i64 0, i64 0))
br label %25
25: ; preds = %15, %10
%26 = load float, float* %3
%27 = load float, float* %4
%28 = fadd float %26, %27
%29 = load float, float* %6
%30 = fsub float %28, %29
%31 = load float, float* %5
%32 = fcmp ogt float %30, %31
br i1 %32, label %33, label %49
33: ; preds = %25
%34 = load i32, i32* %2
%35 = icmp ne i32 %34, -1
br i1 %35, label %36, label %49
36: ; preds = %33
%37 = load i32, i32* %2
%38 = load float, float* %5
%39 = fpext float %38 to double
%40 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str.8, i64 0, i64 0), i32 %37, double %39)
%41 = load float, float* %3
%42 = load float, float* %4
%43 = fadd float %41, %42
%44 = load float, float* %6
%45 = fsub float %43, %44
%46 = fpext float %45 to double
%47 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.9, i64 0, i64 0), double %46)
%48 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str.10, i64 0, i64 0))
br label %49
49: ; preds = %36, %33, %25
br label %7
50: ; preds = %7
ret i32 0
}

LLVM IR (-O2):
@.str.1 = [3 x i8] c"%d\00"
@.str.3 = [3 x i8] c"%f\00"
@.str.8 = [40 x i8] c"conta: %.2d \0A\0BLimite de credito: %.2f \0A\00"
@.str.9 = [14 x i8] c"saldo: %.2f \0A\00"
@.str.10 = [35 x i8] c"limite de credito ultrapassado: \0A\0B\00"
@str = [48 x i8] c"informe o numero da conta:(-1 para terminar a) \00"
@str.11 = [26 x i8] c"informe o saldo inicial: \00"
@str.12 = [30 x i8] c"informe o total de encargos: \00"
@str.13 = [30 x i8] c"informe o total de creditos: \00"
@str.14 = [31 x i8] c"informe o limite de creditos: \00"
@str.15 = [2 x i8] c"\0B\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca float
%3 = alloca float
%4 = alloca float
%5 = alloca float
%6 = bitcast i32* %1 to i8*
store i32 0, i32* %1
%7 = bitcast float* %2 to i8*
store float 0.000000e+00, float* %2
%8 = bitcast float* %3 to i8*
store float 0.000000e+00, float* %3
%9 = bitcast float* %4 to i8*
store float 0.000000e+00, float* %4
%10 = bitcast float* %5 to i8*
store float 0.000000e+00, float* %5
br label %11
11: ; preds = %0, %50
%12 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([48 x i8], [48 x i8]* @str, i64 0, i64 0))
%13 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %1)
%14 = load i32, i32* %1
%15 = icmp eq i32 %14, -1
br i1 %15, label %27, label %16
16: ; preds = %11
%17 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([26 x i8], [26 x i8]* @str.11, i64 0, i64 0))
%18 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.3, i64 0, i64 0), float* %2)
%19 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([30 x i8], [30 x i8]* @str.12, i64 0, i64 0))
%20 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.3, i64 0, i64 0), float* %3)
%21 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([30 x i8], [30 x i8]* @str.13, i64 0, i64 0))
%22 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.3, i64 0, i64 0), float* %5)
%23 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([31 x i8], [31 x i8]* @str.14, i64 0, i64 0))
%24 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.3, i64 0, i64 0), float* %4)
%25 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([2 x i8], [2 x i8]* @str.15, i64 0, i64 0))
%26 = load i32, i32* %1
br label %27
27: ; preds = %16, %11
%28 = phi i32 [ %26, %16 ], [ -1, %11 ]
%29 = load float, float* %2
%30 = load float, float* %3
%31 = fadd float %29, %30
%32 = load float, float* %5
%33 = fsub float %31, %32
%34 = load float, float* %4
%35 = fcmp ogt float %33, %34
%36 = icmp ne i32 %28, -1
%37 = select i1 %35, i1 %36, i1 false
br i1 %37, label %38, label %50
38: ; preds = %27
%39 = fpext float %34 to double
%40 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([40 x i8], [40 x i8]* @.str.8, i64 0, i64 0), i32 %28, double %39)
%41 = load float, float* %2
%42 = load float, float* %3
%43 = fadd float %41, %42
%44 = load float, float* %5
%45 = fsub float %43, %44
%46 = fpext float %45 to double
%47 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([14 x i8], [14 x i8]* @.str.9, i64 0, i64 0), double %46)
%48 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([35 x i8], [35 x i8]* @.str.10, i64 0, i64 0))
%49 = load i32, i32* %1
br label %50
50: ; preds = %38, %27
%51 = phi i32 [ %49, %38 ], [ %28, %27 ]
%52 = icmp eq i32 %51, -1
br i1 %52, label %53, label %11
53: ; preds = %50
ret i32 0
}