#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 /*<<< orphan*/ scanf(char *, ...);
int main() {
  int n, i;
  float x, y, d;
  scanf("%d", &n);
  for (i = 1; i <= n; i++) {
    scanf("%f%f", &x, &y);
    if (y == 0) {
      printf("divisao impossivel\n");
    } else if (y != 0) {
      d = x / y;
      printf("%0.1f\n", d);
    }
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeca(%rip),%rdi
lea    -0x8(%rbp),%rsi
mov    $0x0,%al
call   1040 <scanf@plt>
movl   $0x1,-0xc(%rbp)
mov    -0xc(%rbp),%eax
cmp    -0x8(%rbp),%eax
jg     11ee <main+0xce>
lea    0xea8(%rip),%rdi
lea    -0x10(%rbp),%rsi
lea    -0x14(%rbp),%rdx
mov    $0x0,%al
call   1040 <scanf@plt>
movss  -0x14(%rbp),%xmm0
xorps  %xmm1,%xmm1
ucomiss %xmm1,%xmm0
jne    1194 <main+0x74>
jp     1194 <main+0x74>
lea    0xe80(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    11db <main+0xbb>
movss  -0x14(%rbp),%xmm0
xorps  %xmm1,%xmm1
ucomiss %xmm1,%xmm0
jne    11b0 <main+0x90>
jp     11b0 <main+0x90>
jmp    11d6 <main+0xb6>
movss  -0x10(%rbp),%xmm0
divss  -0x14(%rbp),%xmm0
movss  %xmm0,-0x18(%rbp)
movss  -0x18(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
lea    0xe4d(%rip),%rdi
mov    $0x1,%al
call   1030 <printf@plt>
jmp    11db <main+0xbb>
jmp    11e0 <main+0xc0>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1148 <main+0x28>
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
lea    0xebf(%rip),%rdi
lea    0xc(%rsp),%rsi
xor    %eax,%eax
call   1050 <scanf@plt>
cmpl   $0x0,0xc(%rsp)
jle    11cf <main+0x9f>
lea    0xea8(%rip),%r14
lea    0x14(%rsp),%r15
lea    0x10(%rsp),%rbx
lea    0xea3(%rip),%r12
lea    0xe95(%rip),%r13
xor    %ebp,%ebp
jmp    11a4 <main+0x74>
nopl   0x0(%rax,%rax,1)
movss  0x14(%rsp),%xmm1
divss  %xmm0,%xmm1
xorps  %xmm0,%xmm0
cvtss2sd %xmm1,%xmm0
mov    %r13,%rdi
mov    $0x1,%al
call   1040 <printf@plt>
add    $0x1,%ebp
cmp    0xc(%rsp),%ebp
jge    11cf <main+0x9f>
mov    %r14,%rdi
mov    %r15,%rsi
mov    %rbx,%rdx
xor    %eax,%eax
call   1050 <scanf@plt>
movss  0x10(%rsp),%xmm0
ucomiss 0xe3f(%rip),%xmm0
jne    1180 <main+0x50>
jp     1180 <main+0x50>
mov    %r12,%rdi
call   1030 <puts@plt>
jmp    119b <main+0x6b>
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 = [5 x i8] c"%f%f\00"
@.str.2 = [20 x i8] c"divisao impossivel\0A\00"
@.str.3 = [7 x i8] c"%0.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
%7 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %2)
store i32 1, i32* %3
br label %8
8: ; preds = %30, %0
%9 = load i32, i32* %3
%10 = load i32, i32* %2
%11 = icmp sle i32 %9, %10
br i1 %11, label %12, label %33
12: ; preds = %8
%13 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0), float* %4, float* %5)
%14 = load float, float* %5
%15 = fcmp oeq float %14, 0.000000e+00
br i1 %15, label %16, label %18
16: ; preds = %12
%17 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.2, i64 0, i64 0))
br label %29
18: ; preds = %12
%19 = load float, float* %5
%20 = fcmp une float %19, 0.000000e+00
br i1 %20, label %21, label %28
21: ; preds = %18
%22 = load float, float* %4
%23 = load float, float* %5
%24 = fdiv float %22, %23
store float %24, float* %6
%25 = load float, float* %6
%26 = fpext float %25 to double
%27 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.3, i64 0, i64 0), double %26)
br label %28
28: ; preds = %21, %18
br label %29
29: ; preds = %28, %16
br label %30
30: ; preds = %29
%31 = load i32, i32* %3
%32 = add nsw i32 %31, 1
store i32 %32, i32* %3
br label %8
33: ; preds = %8
ret i32 0
}

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