#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 *, int);
int /*<<< orphan*/ scanf(char *, ...);
int main() {
  int i, j, c, len, num, temp, t, res, t1, t2;
  float T1, T2, comm;
  scanf("%d", &t);
  while (t--) {
    scanf("%f %f %d %d", &T1, &T2, &t1, &t2);
    T1++;
    T2++;
    printf("%f\n", 1 / (T1 * T2));
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xed7(%rip),%rdi
lea    -0x20(%rbp),%rsi
mov    $0x0,%al
call   1040 <scanf@plt>
mov    -0x20(%rbp),%eax
mov    %eax,%ecx
add    $0xffffffff,%ecx
mov    %ecx,-0x20(%rbp)
cmp    $0x0,%eax
je     11c2 <main+0xa2>
lea    0xea8(%rip),%rdi
lea    -0x30(%rbp),%rsi
lea    -0x34(%rbp),%rdx
lea    -0x28(%rbp),%rcx
lea    -0x2c(%rbp),%r8
mov    $0x0,%al
call   1040 <scanf@plt>
movss  0xe85(%rip),%xmm0
addss  -0x30(%rbp),%xmm0
movss  %xmm0,-0x30(%rbp)
movss  0xe73(%rip),%xmm0
addss  -0x34(%rbp),%xmm0
movss  %xmm0,-0x34(%rbp)
movss  -0x30(%rbp),%xmm1
mulss  -0x34(%rbp),%xmm1
movss  0xe57(%rip),%xmm0
divss  %xmm1,%xmm0
cvttss2si %xmm0,%esi
lea    0xe58(%rip),%rdi
call   1030 <printf@plt>
jmp    1141 <main+0x21>
xor    %eax,%eax
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x18,%rsp
lea    0xed8(%rip),%rdi
lea    0xc(%rsp),%rsi
xor    %eax,%eax
call   1040 <scanf@plt>
subl   $0x1,0xc(%rsp)
jb     11cc <main+0xac>
lea    0xeb1(%rip),%r14
lea    0x8(%rsp),%r15
lea    0x4(%rsp),%r12
lea    0x14(%rsp),%r13
lea    0x10(%rsp),%rbx
lea    0xea2(%rip),%rbp
xchg   %ax,%ax
mov    %r14,%rdi
mov    %r15,%rsi
mov    %r12,%rdx
mov    %r13,%rcx
mov    %rbx,%r8
xor    %eax,%eax
call   1040 <scanf@plt>
movss  0x8(%rsp),%xmm0
movss  0xe6c(%rip),%xmm2
addss  %xmm2,%xmm0
movss  %xmm0,0x8(%rsp)
movss  0x4(%rsp),%xmm1
addss  %xmm2,%xmm1
movss  %xmm1,0x4(%rsp)
mulss  %xmm0,%xmm1
movaps %xmm2,%xmm0
divss  %xmm1,%xmm0
cvttss2si %xmm0,%esi
mov    %rbp,%rdi
call   1030 <printf@plt>
subl   $0x1,0xc(%rsp)
jae    1170 <main+0x50>
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 = [12 x i8] c"%f %f %d %d\00"
@.str.2 = [4 x i8] c"%f\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32
%10 = alloca i32
%11 = alloca i32
%12 = alloca float
%13 = alloca float
%14 = alloca float
store i32 0, i32* %1
%15 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %8)
br label %16
16: ; preds = %20, %0
%17 = load i32, i32* %8
%18 = add nsw i32 %17, -1
store i32 %18, i32* %8
%19 = icmp ne i32 %17, 0
br i1 %19, label %20, label %32
20: ; preds = %16
%21 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.1, i64 0, i64 0), float* %12, float* %13, i32* %10, i32* %11)
%22 = load float, float* %12
%23 = fadd float %22, 1.000000e+00
store float %23, float* %12
%24 = load float, float* %13
%25 = fadd float %24, 1.000000e+00
store float %25, float* %13
%26 = load float, float* %12
%27 = load float, float* %13
%28 = fmul float %26, %27
%29 = fdiv float 1.000000e+00, %28
%30 = fptosi float %29 to i32
%31 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0), i32 %30)
br label %16
32: ; preds = %16
ret i32 0
}

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