#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 *, double);
int /*<<< orphan*/ scanf(char *, ...);
int main() {
  char sellerName[100];
  double fixedSalary, saleAmount;
  scanf("%s", sellerName);
  scanf("%lf %lf", &fixedSalary, &saleAmount);
  double totalSalary = fixedSalary + ((15 * saleAmount) / 100);
  printf("TOTAL = R$ %.2lf\n", totalSalary);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x90,%rsp
movl   $0x0,-0x4(%rbp)
lea    -0x70(%rbp),%rsi
lea    0xed3(%rip),%rdi
mov    $0x0,%al
call   1040 <scanf@plt>
lea    0xec8(%rip),%rdi
lea    -0x78(%rbp),%rsi
lea    -0x80(%rbp),%rdx
mov    $0x0,%al
call   1040 <scanf@plt>
movsd  -0x78(%rbp),%xmm0
movsd  0xea1(%rip),%xmm1
mulsd  -0x80(%rbp),%xmm1
movsd  0xe8c(%rip),%xmm2
divsd  %xmm2,%xmm1
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x88(%rbp)
ff
movsd  -0x88(%rbp),%xmm0
ff
lea    0xe88(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x90,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
sub    $0x78,%rsp
lea    0xee5(%rip),%rdi
lea    0x10(%rsp),%rsi
xor    %eax,%eax
call   1040 <scanf@plt>
lea    0xed5(%rip),%rdi
lea    0x8(%rsp),%rsi
mov    %rsp,%rdx
xor    %eax,%eax
call   1040 <scanf@plt>
movsd  (%rsp),%xmm0
mulsd  0xea6(%rip),%xmm0
divsd  0xea6(%rip),%xmm0
addsd  0x8(%rsp),%xmm0
lea    0xeac(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x78,%rsp
ret

LLVM IR (-O0):
@.str = [3 x i8] c"%s\00"
@.str.1 = [8 x i8] c"%lf %lf\00"
@.str.2 = [18 x i8] c"TOTAL = R$ %.2lf\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca [100 x i8]
%3 = alloca double
%4 = alloca double
%5 = alloca double
store i32 0, i32* %1
%6 = getelementptr inbounds [100 x i8], [100 x i8]* %2, i64 0, i64 0
%7 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* %6)
%8 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.1, i64 0, i64 0), double* %3, double* %4)
%9 = load double, double* %3
%10 = load double, double* %4
%11 = fmul double 1.500000e+01, %10
%12 = fdiv double %11, 1.000000e+02
%13 = fadd double %9, %12
store double %13, double* %5
%14 = load double, double* %5
%15 = call i32 @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.2, i64 0, i64 0), double %14)
ret i32 0
}

LLVM IR (-O2):
@.str = [3 x i8] c"%s\00"
@.str.1 = [8 x i8] c"%lf %lf\00"
@.str.2 = [18 x i8] c"TOTAL = R$ %.2lf\0A\00"
define i32 @main() {
%1 = alloca [100 x i8]
%2 = alloca double
%3 = alloca double
%4 = getelementptr inbounds [100 x i8], [100 x i8]* %1, i64 0, i64 0
%5 = bitcast double* %2 to i8*
%6 = bitcast double* %3 to i8*
%7 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* %4)
%8 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.1, i64 0, i64 0), double* %2, double* %3)
%9 = load double, double* %2
%10 = load double, double* %3
%11 = fmul double %10, 1.500000e+01
%12 = fdiv double %11, 1.000000e+02
%13 = fadd double %9, %12
%14 = call i32 @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.2, i64 0, i64 0), double %13)
ret i32 0
}