#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() {
  float a, b, c;
  int m, i = 0, j;
  scanf("%d", &m);
  for (j = 0; j < m; j++) {
    scanf("%f", &a);
    while (a > 1) {
      a = a / 2;
      i++;
    }
    printf("%d dias\n", i);
    i = 0;
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0x18(%rbp)
lea    0xecb(%rip),%rdi
lea    -0x14(%rbp),%rsi
mov    $0x0,%al
call   1040 <scanf@plt>
movl   $0x0,-0x1c(%rbp)
mov    -0x1c(%rbp),%eax
cmp    -0x14(%rbp),%eax
jge    11cb <main+0xab>
lea    0xea9(%rip),%rdi
lea    -0x8(%rbp),%rsi
mov    $0x0,%al
call   1040 <scanf@plt>
movss  -0x8(%rbp),%xmm0
movss  0xe86(%rip),%xmm1
ucomiss %xmm1,%xmm0
jbe    11a7 <main+0x87>
movss  -0x8(%rbp),%xmm0
movss  0xe74(%rip),%xmm1
divss  %xmm1,%xmm0
movss  %xmm0,-0x8(%rbp)
mov    -0x18(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x18(%rbp)
jmp    116d <main+0x4d>
mov    -0x18(%rbp),%esi
lea    0xe5d(%rip),%rdi
call   1030 <printf@plt>
movl   $0x0,-0x18(%rbp)
mov    -0x1c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x1c(%rbp)
jmp    114f <main+0x2f>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r12
push   %rbx
sub    $0x10,%rsp
lea    0xed5(%rip),%rdi
xor    %ebx,%ebx
lea    0x8(%rsp),%rsi
xor    %eax,%eax
call   1040 <scanf@plt>
cmpl   $0x0,0x8(%rsp)
jle    11b4 <main+0x94>
lea    0xebc(%rip),%r14
lea    0xc(%rsp),%r15
lea    0xeb3(%rip),%r12
jmp    1173 <main+0x53>
nopl   (%rax)
mov    %r12,%rdi
mov    %ebp,%esi
call   1030 <printf@plt>
add    $0x1,%ebx
cmp    0x8(%rsp),%ebx
jge    11b4 <main+0x94>
xor    %ebp,%ebp
mov    %r14,%rdi
mov    %r15,%rsi
xor    %eax,%eax
call   1040 <scanf@plt>
movss  0xc(%rsp),%xmm0
movss  0xe70(%rip),%xmm1
ucomiss %xmm1,%xmm0
jbe    1160 <main+0x40>
xor    %ebp,%ebp
movss  0xe65(%rip),%xmm2
nop
mulss  %xmm2,%xmm0
add    $0x1,%ebp
ucomiss %xmm1,%xmm0
ja     11a0 <main+0x80>
movss  %xmm0,0xc(%rsp)
jmp    1160 <main+0x40>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
pop    %rbp
ret

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

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