#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 */
double atof(char *);
int /*<<< orphan*/ axuda(char *);
int /*<<< orphan*/ ereal(char *);
int /*<<< orphan*/ printf(char *, double, double, double);
int /*<<< orphan*/ system(char *);
main(int argc, char *argv[]) {
  system("title 49_Cascallar_Autran_Manuel");
  system("color 1F");
  system("cls");
  double primeiro, segundo;
  if (argc != 3)
    axuda(argv[0]);
  else if (!ereal(argv[1]) || !ereal(argv[2]))
    axuda(argv[0]);
  else {
    primeiro = atof(argv[1]);
    segundo = atof(argv[2]);
    printf("\n\n%.2f - %.2f = %.2f \n\n", primeiro, segundo,
           primeiro - segundo);
    system("pause");
  }
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
lea    0xe93(%rip),%rdi
call   1050 <system@plt>
lea    0xea8(%rip),%rdi
call   1050 <system@plt>
lea    0xea5(%rip),%rdi
call   1050 <system@plt>
cmpl   $0x3,-0x8(%rbp)
je     11a5 <main+0x55>
mov    -0x10(%rbp),%rax
mov    (%rax),%rdi
call   1040 <axuda@plt>
jmp    1237 <main+0xe7>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
call   1070 <ereal@plt>
cmp    $0x0,%eax
je     11d1 <main+0x81>
mov    -0x10(%rbp),%rax
mov    0x10(%rax),%rdi
call   1070 <ereal@plt>
cmp    $0x0,%eax
jne    11e2 <main+0x92>
mov    -0x10(%rbp),%rax
mov    (%rax),%rdi
call   1040 <axuda@plt>
jmp    1232 <main+0xe2>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
call   1030 <atof@plt>
movsd  %xmm0,-0x18(%rbp)
mov    -0x10(%rbp),%rax
mov    0x10(%rax),%rdi
call   1030 <atof@plt>
movsd  %xmm0,-0x20(%rbp)
movsd  -0x18(%rbp),%xmm0
movsd  -0x20(%rbp),%xmm1
movsd  -0x18(%rbp),%xmm2
subsd  -0x20(%rbp),%xmm2
lea    0xe0d(%rip),%rdi
call   1060 <printf@plt>
lea    0xe19(%rip),%rdi
call   1050 <system@plt>
jmp    1237 <main+0xe7>
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %rbx
push   %rax
mov    %rsi,%rbx
mov    %edi,%ebp
lea    0xea1(%rip),%rdi
call   1050 <system@plt>
lea    0xeb6(%rip),%rdi
call   1050 <system@plt>
lea    0xeb3(%rip),%rdi
call   1050 <system@plt>
cmp    $0x3,%ebp
jne    11dd <main+0x8d>
mov    0x8(%rbx),%rdi
call   1070 <ereal@plt>
test   %eax,%eax
je     11dd <main+0x8d>
mov    0x10(%rbx),%rdi
call   1070 <ereal@plt>
test   %eax,%eax
je     11dd <main+0x8d>
mov    0x8(%rbx),%rdi
call   1030 <atof@plt>
movsd  %xmm0,(%rsp)
mov    0x10(%rbx),%rdi
call   1030 <atof@plt>
movapd %xmm0,%xmm1
movsd  (%rsp),%xmm0
movapd %xmm0,%xmm2
subsd  %xmm1,%xmm2
lea    0xe64(%rip),%rdi
call   1060 <printf@plt>
lea    0xe70(%rip),%rdi
call   1050 <system@plt>
jmp    11e5 <main+0x95>
mov    (%rbx),%rdi
call   1040 <axuda@plt>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
@.str = [33 x i8] c"title 49_Cascallar_Autran_Manuel\00"
@.str.1 = [9 x i8] c"color 1F\00"
@.str.2 = [4 x i8] c"cls\00"
@.str.3 = [24 x i8] c"\0A\0A%.2f - %.2f = %.2f \0A\0A\00"
@.str.4 = [6 x i8] c"pause\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca double
%7 = alloca double
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%8 = call i32 @system(i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str, i64 0, i64 0))
%9 = call i32 @system(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.1, i64 0, i64 0))
%10 = call i32 @system(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0))
%11 = load i32, i32* %4
%12 = icmp ne i32 %11, 3
br i1 %12, label %13, label %18
13: ; preds = %2
%14 = load i8**, i8*** %5
%15 = getelementptr inbounds i8*, i8** %14, i64 0
%16 = load i8*, i8** %15
%17 = call i32 @axuda(i8* %16)
br label %52
18: ; preds = %2
%19 = load i8**, i8*** %5
%20 = getelementptr inbounds i8*, i8** %19, i64 1
%21 = load i8*, i8** %20
%22 = call i32 @ereal(i8* %21)
%23 = icmp ne i32 %22, 0
br i1 %23, label %24, label %30
24: ; preds = %18
%25 = load i8**, i8*** %5
%26 = getelementptr inbounds i8*, i8** %25, i64 2
%27 = load i8*, i8** %26
%28 = call i32 @ereal(i8* %27)
%29 = icmp ne i32 %28, 0
br i1 %29, label %35, label %30
30: ; preds = %24, %18
%31 = load i8**, i8*** %5
%32 = getelementptr inbounds i8*, i8** %31, i64 0
%33 = load i8*, i8** %32
%34 = call i32 @axuda(i8* %33)
br label %51
35: ; preds = %24
%36 = load i8**, i8*** %5
%37 = getelementptr inbounds i8*, i8** %36, i64 1
%38 = load i8*, i8** %37
%39 = call double @atof(i8* %38)
store double %39, double* %6
%40 = load i8**, i8*** %5
%41 = getelementptr inbounds i8*, i8** %40, i64 2
%42 = load i8*, i8** %41
%43 = call double @atof(i8* %42)
store double %43, double* %7
%44 = load double, double* %6
%45 = load double, double* %7
%46 = load double, double* %6
%47 = load double, double* %7
%48 = fsub double %46, %47
%49 = call i32 @printf(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.3, i64 0, i64 0), double %44, double %45, double %48)
%50 = call i32 @system(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.4, i64 0, i64 0))
br label %51
51: ; preds = %35, %30
br label %52
52: ; preds = %51, %13
%53 = load i32, i32* %3
ret i32 %53
}

LLVM IR (-O2):
@.str = [33 x i8] c"title 49_Cascallar_Autran_Manuel\00"
@.str.1 = [9 x i8] c"color 1F\00"
@.str.2 = [4 x i8] c"cls\00"
@.str.3 = [24 x i8] c"\0A\0A%.2f - %.2f = %.2f \0A\0A\00"
@.str.4 = [6 x i8] c"pause\00"
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = tail call i32 @system(i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str, i64 0, i64 0))
%4 = tail call i32 @system(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.1, i64 0, i64 0))
%5 = tail call i32 @system(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0))
%6 = icmp eq i32 %0, 3
br i1 %6, label %10, label %7
7: ; preds = %2
%8 = load i8*, i8** %1
%9 = tail call i32 @axuda(i8* %8)
br label %31
10: ; preds = %2
%11 = getelementptr inbounds i8*, i8** %1, i64 1
%12 = load i8*, i8** %11
%13 = tail call i32 @ereal(i8* %12)
%14 = icmp eq i32 %13, 0
br i1 %14, label %20, label %15
15: ; preds = %10
%16 = getelementptr inbounds i8*, i8** %1, i64 2
%17 = load i8*, i8** %16
%18 = tail call i32 @ereal(i8* %17)
%19 = icmp eq i32 %18, 0
br i1 %19, label %20, label %23
20: ; preds = %15, %10
%21 = load i8*, i8** %1
%22 = tail call i32 @axuda(i8* %21)
br label %31
23: ; preds = %15
%24 = load i8*, i8** %11
%25 = tail call double @atof(i8* %24)
%26 = load i8*, i8** %16
%27 = tail call double @atof(i8* %26)
%28 = fsub double %25, %27
%29 = tail call i32 @printf(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.3, i64 0, i64 0), double %25, double %27, double %28)
%30 = tail call i32 @system(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.4, i64 0, i64 0))
br label %31
31: ; preds = %20, %23, %7
ret i32 0
}