#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*/ LC_ALL;
int /*<<< orphan*/ printf(char *, ...);
int /*<<< orphan*/ scanf(char *, int *, int *);
int /*<<< orphan*/ setlocale(int /*<<< orphan*/, char *);
double sum(int, int);
int /*<<< orphan*/ system(char *);
int main(void) {
  setlocale(LC_ALL, "Portuguese");
  int x, y;
  x = 1;
  while (x != 0) {
    scanf("%d  %d", &x, &y);
    if (x == 0) {
      return 0;
    }
    printf("%.2f", sum(x, y));
  }
  printf("none arguments!!");
  system("pause");
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    0x2e7a(%rip),%rax
mov    (%rax),%edi
lea    0xe91(%rip),%rsi
call   1060 <setlocale@plt>
movl   $0x1,-0x8(%rbp)
cmpl   $0x0,-0x8(%rbp)
je     11cd <main+0x7d>
lea    0xe7f(%rip),%rdi
lea    -0x8(%rbp),%rsi
lea    -0xc(%rbp),%rdx
call   1070 <scanf@plt>
cmpl   $0x0,-0x8(%rbp)
jne    11af <main+0x5f>
movl   $0x0,-0x4(%rbp)
jmp    11ee <main+0x9e>
mov    -0x8(%rbp),%edi
mov    -0xc(%rbp),%esi
call   1050 <sum@plt>
lea    0xe51(%rip),%rdi
mov    $0x1,%al
call   1040 <printf@plt>
jmp    117b <main+0x2b>
lea    0xe43(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
lea    0xe46(%rip),%rdi
call   1030 <system@plt>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r15
push   %r14
push   %r12
push   %rbx
push   %rax
mov    0x2e81(%rip),%rax
mov    (%rax),%edi
lea    0xe98(%rip),%rsi
call   1060 <setlocale@plt>
movl   $0x1,(%rsp)
lea    0xe90(%rip),%r14
mov    %rsp,%r15
lea    0x4(%rsp),%rbx
lea    0xe88(%rip),%r12
nopw   0x0(%rax,%rax,1)
mov    %r14,%rdi
mov    %r15,%rsi
mov    %rbx,%rdx
call   1070 <scanf@plt>
mov    (%rsp),%edi
test   %edi,%edi
je     11d8 <main+0x88>
mov    0x4(%rsp),%esi
call   1050 <sum@plt>
mov    %r12,%rdi
mov    $0x1,%al
call   1040 <printf@plt>
cmpl   $0x0,(%rsp)
jne    1190 <main+0x40>
lea    0xe52(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xe55(%rip),%rdi
call   1030 <system@plt>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
@LC_ALL = global i32 0
@.str = [11 x i8] c"Portuguese\00"
@.str.1 = [7 x i8] c"%d %d\00"
@.str.2 = [5 x i8] c"%.2f\00"
@.str.3 = [17 x i8] c"none arguments!!\00"
@.str.4 = [6 x i8] c"pause\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
store i32 0, i32* %1
%4 = load i32, i32* @LC_ALL
%5 = call i32 @setlocale(i32 %4, i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0))
store i32 1, i32* %2
br label %6
6: ; preds = %14, %0
%7 = load i32, i32* %2
%8 = icmp ne i32 %7, 0
br i1 %8, label %9, label %19
9: ; preds = %6
%10 = call i32 @scanf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0), i32* %2, i32* %3)
%11 = load i32, i32* %2
%12 = icmp eq i32 %11, 0
br i1 %12, label %13, label %14
13: ; preds = %9
store i32 0, i32* %1
br label %22
14: ; preds = %9
%15 = load i32, i32* %2
%16 = load i32, i32* %3
%17 = call double @sum(i32 %15, i32 %16)
%18 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.2, i64 0, i64 0), double %17)
br label %6
19: ; preds = %6
%20 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.3, i64 0, i64 0))
%21 = call i32 @system(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.4, i64 0, i64 0))
store i32 0, i32* %1
br label %22
22: ; preds = %19, %13
%23 = load i32, i32* %1
ret i32 %23
}

LLVM IR (-O2):
@LC_ALL = global i32 0
@.str = [11 x i8] c"Portuguese\00"
@.str.1 = [7 x i8] c"%d %d\00"
@.str.2 = [5 x i8] c"%.2f\00"
@.str.3 = [17 x i8] c"none arguments!!\00"
@.str.4 = [6 x i8] c"pause\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = load i32, i32* @LC_ALL
%4 = tail call i32 @setlocale(i32 %3, i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0))
%5 = bitcast i32* %1 to i8*
%6 = bitcast i32* %2 to i8*
store i32 1, i32* %1
br label %7
7: ; preds = %0, %11
%8 = call i32 @scanf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0), i32* %1, i32* %2)
%9 = load i32, i32* %1
%10 = icmp eq i32 %9, 0
br i1 %10, label %20, label %11
11: ; preds = %7
%12 = load i32, i32* %2
%13 = call double @sum(i32 %9, i32 %12)
%14 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str.2, i64 0, i64 0), double %13)
%15 = load i32, i32* %1
%16 = icmp eq i32 %15, 0
br i1 %16, label %17, label %7
17: ; preds = %11
%18 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([17 x i8], [17 x i8]* @.str.3, i64 0, i64 0))
%19 = call i32 @system(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.4, i64 0, i64 0))
br label %20
20: ; preds = %7, %17
ret i32 0
}