#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() {
  double n1, n2, n3;
  int N;
  scanf(" %d", &N);
  while (N > 0) {
    scanf(" %lf %lf %lf", &n1, &n2, &n3);
    printf("%0.1lf\n", ((n1 * 2) + (n2 * 3) + (n3 * 5)) / 10);
    N--;
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xee2(%rip),%rdi
lea    -0x24(%rbp),%rsi
mov    $0x0,%al
call   1040 <scanf@plt>
cmpl   $0x0,-0x24(%rbp)
jle    11ba <main+0x9a>
lea    0xeca(%rip),%rdi
lea    -0x10(%rbp),%rsi
lea    -0x18(%rbp),%rdx
lea    -0x20(%rbp),%rcx
mov    $0x0,%al
call   1040 <scanf@plt>
movsd  -0x10(%rbp),%xmm1
movsd  0xe9e(%rip),%xmm0
mulsd  -0x18(%rbp),%xmm0
addsd  %xmm1,%xmm1
addsd  %xmm0,%xmm1
movsd  -0x20(%rbp),%xmm0
movsd  0xe7c(%rip),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  0xe64(%rip),%xmm1
divsd  %xmm1,%xmm0
lea    0xe82(%rip),%rdi
call   1030 <printf@plt>
mov    -0x24(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0x24(%rbp)
jmp    1141 <main+0x21>
xor    %eax,%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x20,%rsp
lea    0xee4(%rip),%rdi
lea    0x4(%rsp),%rsi
xor    %eax,%eax
call   1040 <scanf@plt>
cmpl   $0x0,0x4(%rsp)
jle    11d1 <main+0xb1>
lea    0xeca(%rip),%r14
lea    0x18(%rsp),%r15
lea    0x10(%rsp),%r12
lea    0x8(%rsp),%r13
lea    0xec1(%rip),%rbx
nopl   0x0(%rax,%rax,1)
mov    %r14,%rdi
mov    %r15,%rsi
mov    %r12,%rdx
mov    %r13,%rcx
xor    %eax,%eax
call   1040 <scanf@plt>
movsd  0x18(%rsp),%xmm1
movsd  0x10(%rsp),%xmm0
mulsd  0xe69(%rip),%xmm0
addsd  %xmm1,%xmm1
addsd  %xmm0,%xmm1
movsd  0x8(%rsp),%xmm0
mulsd  0xe5b(%rip),%xmm0
addsd  %xmm1,%xmm0
divsd  0xe57(%rip),%xmm0
mov    %rbx,%rdi
call   1030 <printf@plt>
mov    0x4(%rsp),%eax
lea    -0x1(%rax),%ecx
mov    %ecx,0x4(%rsp)
cmp    $0x1,%eax
jg     1170 <main+0x50>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
@.str = [4 x i8] c" %d\00"
@.str.1 = [13 x i8] c" %lf %lf %lf\00"
@.str.2 = [8 x i8] c"%0.1lf\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca double
%3 = alloca double
%4 = alloca double
%5 = alloca i32
store i32 0, i32* %1
%6 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32* %5)
br label %7
7: ; preds = %10, %0
%8 = load i32, i32* %5
%9 = icmp sgt i32 %8, 0
br i1 %9, label %10, label %22
10: ; preds = %7
%11 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.1, i64 0, i64 0), double* %2, double* %3, double* %4)
%12 = load double, double* %2
%13 = load double, double* %3
%14 = fmul double %13, 3.000000e+00
%15 = call double @llvm.fmuladd.f64(double %12, double 2.000000e+00, double %14)
%16 = load double, double* %4
%17 = call double @llvm.fmuladd.f64(double %16, double 5.000000e+00, double %15)
%18 = fdiv double %17, 1.000000e+01
%19 = call i32 @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.2, i64 0, i64 0), double %18)
%20 = load i32, i32* %5
%21 = add nsw i32 %20, -1
store i32 %21, i32* %5
br label %7
22: ; preds = %7
ret i32 0
}

LLVM IR (-O2):
@.str = [4 x i8] c" %d\00"
@.str.1 = [13 x i8] c" %lf %lf %lf\00"
@.str.2 = [8 x i8] c"%0.1lf\0A\00"
define i32 @main() {
%1 = alloca double
%2 = alloca double
%3 = alloca double
%4 = alloca i32
%5 = bitcast double* %1 to i8*
%6 = bitcast double* %2 to i8*
%7 = bitcast double* %3 to i8*
%8 = bitcast i32* %4 to i8*
%9 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32* %4)
%10 = load i32, i32* %4
%11 = icmp sgt i32 %10, 0
br i1 %11, label %12, label %25
12: ; preds = %0, %12
%13 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.1, i64 0, i64 0), double* %1, double* %2, double* %3)
%14 = load double, double* %1
%15 = load double, double* %2
%16 = fmul double %15, 3.000000e+00
%17 = call double @llvm.fmuladd.f64(double %14, double 2.000000e+00, double %16)
%18 = load double, double* %3
%19 = call double @llvm.fmuladd.f64(double %18, double 5.000000e+00, double %17)
%20 = fdiv double %19, 1.000000e+01
%21 = call i32 @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.2, i64 0, i64 0), double %20)
%22 = load i32, i32* %4
%23 = add nsw i32 %22, -1
store i32 %23, i32* %4
%24 = icmp sgt i32 %22, 1
br i1 %24, label %12, label %25
25: ; preds = %12, %0
ret i32 0
}