#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 */
scalar_t__ EOF;
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ printf(char *, double);
scalar_t__ scanf(char *, double *, double *);
main() {
  double p, m;
  while (scanf("%d%d", &p, &m) != EOF) {
    printf("grade is ... %d\n", 100.0 * (0.4 * p / 60.0 + 0.6 * m / 100.0));
  }
  exit(0);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeda(%rip),%rdi
lea    -0x10(%rbp),%rsi
lea    -0x18(%rbp),%rdx
call   1040 <scanf@plt>
mov    0x2e8e(%rip),%rcx
cmp    (%rcx),%rax
je     11b6 <main+0x86>
movsd  0xead(%rip),%xmm1
mulsd  -0x10(%rbp),%xmm1
movsd  0xe98(%rip),%xmm0
divsd  %xmm0,%xmm1
movsd  0xe84(%rip),%xmm0
mulsd  -0x18(%rbp),%xmm0
movsd  0xe6f(%rip),%xmm2
divsd  %xmm2,%xmm0
addsd  %xmm0,%xmm1
movsd  0xe5f(%rip),%xmm0
mulsd  %xmm1,%xmm0
lea    0xe79(%rip),%rdi
call   1030 <printf@plt>
jmp    113f <main+0xf>
xor    %edi,%edi
call   1050 <exit@plt>

x86 assembly (clang, -O2):
<main>:
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x10,%rsp
lea    0xee4(%rip),%rdi
lea    0x8(%rsp),%rsi
mov    %rsp,%rdx
call   1040 <scanf@plt>
mov    0x2e90(%rip),%r13
cmp    0x0(%r13),%rax
je     11cb <main+0x9b>
lea    0xec8(%rip),%r14
lea    0xebc(%rip),%r15
lea    0x8(%rsp),%r12
mov    %rsp,%rbx
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
movsd  0x8(%rsp),%xmm1
movhpd (%rsp),%xmm1
mulpd  0xe6d(%rip),%xmm1
divpd  0xe75(%rip),%xmm1
movapd %xmm1,%xmm0
unpckhpd %xmm1,%xmm0
addsd  %xmm1,%xmm0
mulsd  0xe71(%rip),%xmm0
mov    %r14,%rdi
call   1030 <printf@plt>
mov    %r15,%rdi
mov    %r12,%rsi
mov    %rbx,%rdx
call   1040 <scanf@plt>
cmp    0x0(%r13),%rax
jne    1180 <main+0x50>
xor    %edi,%edi
call   1050 <exit@plt>

LLVM IR (-O0):
@.str = [5 x i8] c"%d%d\00"
@EOF = global i64 0
@.str.1 = [17 x i8] c"grade is ... %d\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca double
%3 = alloca double
store i32 0, i32* %1
br label %4
4: ; preds = %8, %0
%5 = call i64 @scanf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), double* %2, double* %3)
%6 = load i64, i64* @EOF
%7 = icmp ne i64 %5, %6
br i1 %7, label %8, label %18
8: ; preds = %4
%9 = load double, double* %2
%10 = fmul double 4.000000e-01, %9
%11 = fdiv double %10, 6.000000e+01
%12 = load double, double* %3
%13 = fmul double 6.000000e-01, %12
%14 = fdiv double %13, 1.000000e+02
%15 = fadd double %11, %14
%16 = fmul double 1.000000e+02, %15
%17 = call i32 @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.1, i64 0, i64 0), double %16)
br label %4
18: ; preds = %4
%19 = call i32 @exit(i32 0)
unreachable
}

LLVM IR (-O2):
@.str = [5 x i8] c"%d%d\00"
@EOF = global i64 0
@.str.1 = [17 x i8] c"grade is ... %d\0A\00"
define i32 @main() {
%1 = alloca double
%2 = alloca double
%3 = bitcast double* %1 to i8*
%4 = bitcast double* %2 to i8*
%5 = call i64 @scanf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), double* %1, double* %2)
%6 = load i64, i64* @EOF
%7 = icmp eq i64 %5, %6
br i1 %7, label %23, label %8
8: ; preds = %0, %8
%9 = load double, double* %1
%10 = load double, double* %2
%11 = insertelement <2 x double> poison, double %9, i64 0
%12 = insertelement <2 x double> %11, double %10, i64 1
%13 = fmul <2 x double> %12, <double 4.000000e-01, double 6.000000e-01>
%14 = fdiv <2 x double> %13, <double 6.000000e+01, double 1.000000e+02>
%15 = shufflevector <2 x double> %14, <2 x double> poison, <2 x i32> <i32 1, i32 undef>
%16 = fadd <2 x double> %14, %15
%17 = extractelement <2 x double> %16, i64 0
%18 = fmul double %17, 1.000000e+02
%19 = call i32 @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.1, i64 0, i64 0), double %18)
%20 = call i64 @scanf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), double* %1, double* %2)
%21 = load i64, i64* @EOF
%22 = icmp eq i64 %20, %21
br i1 %22, label %23, label %8
23: ; preds = %8, %0
%24 = call i32 @exit(i32 0)
unreachable
}