#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 *, float);
int /*<<< orphan*/ scanf(char *, ...);
int main() {
  int i, j;
  float a = 0, b = 0, c = 0;
  scanf("%d", &i);
  for (j = 0; j < i; j++) {
    scanf("%f%f%f", &a, &b, &c);
    printf("%.1f\n", ((a * 2 + b * 3 + c * 5) / 10));
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
xorps  %xmm0,%xmm0
movss  %xmm0,-0x10(%rbp)
xorps  %xmm0,%xmm0
movss  %xmm0,-0x14(%rbp)
xorps  %xmm0,%xmm0
movss  %xmm0,-0x18(%rbp)
lea    0xebe(%rip),%rdi
lea    -0x8(%rbp),%rsi
mov    $0x0,%al
call   1040 <scanf@plt>
movl   $0x0,-0xc(%rbp)
mov    -0xc(%rbp),%eax
cmp    -0x8(%rbp),%eax
jge    11db <main+0xbb>
lea    0xe9c(%rip),%rdi
lea    -0x10(%rbp),%rsi
lea    -0x14(%rbp),%rdx
lea    -0x18(%rbp),%rcx
mov    $0x0,%al
call   1040 <scanf@plt>
movss  -0x10(%rbp),%xmm1
movss  0xe75(%rip),%xmm0
mulss  -0x14(%rbp),%xmm0
addss  %xmm1,%xmm1
addss  %xmm0,%xmm1
movss  -0x18(%rbp),%xmm0
movss  0xe57(%rip),%xmm2
mulss  %xmm2,%xmm0
addss  %xmm1,%xmm0
movss  0xe43(%rip),%xmm1
divss  %xmm1,%xmm0
lea    0xe4e(%rip),%rdi
call   1030 <printf@plt>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1160 <main+0x40>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x18,%rsp
movl   $0x0,0x10(%rsp)
movl   $0x0,0xc(%rsp)
movl   $0x0,0x8(%rsp)
lea    0xebf(%rip),%rdi
lea    0x14(%rsp),%rsi
xor    %eax,%eax
call   1040 <scanf@plt>
cmpl   $0x0,0x14(%rsp)
jle    11da <main+0xba>
lea    0xea8(%rip),%r14
lea    0x10(%rsp),%r15
lea    0xc(%rsp),%r12
lea    0x8(%rsp),%r13
lea    0xe99(%rip),%rbx
xor    %ebp,%ebp
nop
mov    %r14,%rdi
mov    %r15,%rsi
mov    %r12,%rdx
mov    %r13,%rcx
xor    %eax,%eax
call   1040 <scanf@plt>
movss  0x10(%rsp),%xmm1
movss  0xc(%rsp),%xmm0
mulss  0xe59(%rip),%xmm0
addss  %xmm1,%xmm1
addss  %xmm0,%xmm1
movss  0x8(%rsp),%xmm0
mulss  0xe47(%rip),%xmm0
addss  %xmm1,%xmm0
divss  0xe3f(%rip),%xmm0
mov    %rbx,%rdi
call   1030 <printf@plt>
add    $0x1,%ebp
cmp    0x14(%rsp),%ebp
jl     1180 <main+0x60>
xor    %eax,%eax
add    $0x18,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

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

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