#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 */
scalar_t__ CLOCKS_PER_SEC;
scalar_t__ clock();
void temporizador(float pausa) {
  if (pausa < 0.0)
    return;
  float tempoin = 0.0, tempofim = 0.0;
  tempoin = ((float)clock()) / ((float)CLOCKS_PER_SEC);
  while ((tempofim - tempoin) < pausa) {
    tempofim = ((float)clock()) / ((float)CLOCKS_PER_SEC);
  };
  return;
}


x86 assembly (clang, -O0):
<temporizador>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movss  %xmm0,-0x4(%rbp)
movss  -0x4(%rbp),%xmm0
cvtss2sd %xmm0,%xmm1
xorps  %xmm0,%xmm0
ucomisd %xmm1,%xmm0
jbe    1138 <temporizador+0x28>
jmp    11ac <temporizador+0x9c>
xorps  %xmm0,%xmm0
movss  %xmm0,-0x8(%rbp)
xorps  %xmm0,%xmm0
movss  %xmm0,-0xc(%rbp)
mov    $0x0,%al
call   1030 <clock@plt>
cvtsi2ss %rax,%xmm0
mov    0x2e8d(%rip),%rax
cvtsi2ssq (%rax),%xmm1
divss  %xmm1,%xmm0
movss  %xmm0,-0x8(%rbp)
movss  -0xc(%rbp),%xmm1
subss  -0x8(%rbp),%xmm1
movss  -0x4(%rbp),%xmm0
ucomiss %xmm1,%xmm0
jbe    11a7 <temporizador+0x97>
mov    $0x0,%al
call   1030 <clock@plt>
cvtsi2ss %rax,%xmm0
mov    0x2e54(%rip),%rax
cvtsi2ssq (%rax),%xmm1
divss  %xmm1,%xmm0
movss  %xmm0,-0xc(%rbp)
jmp    1169 <temporizador+0x59>
jmp    11ac <temporizador+0x9c>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<temporizador>:
push   %rbx
sub    $0x10,%rsp
xorps  %xmm1,%xmm1
ucomiss %xmm0,%xmm1
ja     1190 <temporizador+0x80>
xor    %eax,%eax
movss  %xmm0,0x8(%rsp)
call   1030 <clock@plt>
cvtsi2ss %rax,%xmm2
mov    0x2eb2(%rip),%rbx
xorps  %xmm0,%xmm0
cvtsi2ssq (%rbx),%xmm0
divss  %xmm0,%xmm2
xorps  %xmm1,%xmm1
subss  %xmm2,%xmm1
movss  0x8(%rsp),%xmm0
ucomiss %xmm1,%xmm0
jbe    1190 <temporizador+0x80>
movss  %xmm2,0xc(%rsp)
nopw   0x0(%rax,%rax,1)
xor    %eax,%eax
call   1030 <clock@plt>
movss  0xc(%rsp),%xmm2
xorps  %xmm0,%xmm0
cvtsi2ss %rax,%xmm0
xorps  %xmm1,%xmm1
cvtsi2ssq (%rbx),%xmm1
divss  %xmm1,%xmm0
subss  %xmm2,%xmm0
movss  0x8(%rsp),%xmm1
ucomiss %xmm0,%xmm1
ja     1160 <temporizador+0x50>
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@CLOCKS_PER_SEC = global i64 0
define void @temporizador(float %0) {
%2 = alloca float
%3 = alloca float
%4 = alloca float
store float %0, float* %2
%5 = load float, float* %2
%6 = fpext float %5 to double
%7 = fcmp olt double %6, 0.000000e+00
br i1 %7, label %8, label %9
8: ; preds = %1
br label %28
9: ; preds = %1
store float 0.000000e+00, float* %3
store float 0.000000e+00, float* %4
%10 = call i64 (...) @clock()
%11 = sitofp i64 %10 to float
%12 = load i64, i64* @CLOCKS_PER_SEC
%13 = sitofp i64 %12 to float
%14 = fdiv float %11, %13
store float %14, float* %3
br label %15
15: ; preds = %21, %9
%16 = load float, float* %4
%17 = load float, float* %3
%18 = fsub float %16, %17
%19 = load float, float* %2
%20 = fcmp olt float %18, %19
br i1 %20, label %21, label %27
21: ; preds = %15
%22 = call i64 (...) @clock()
%23 = sitofp i64 %22 to float
%24 = load i64, i64* @CLOCKS_PER_SEC
%25 = sitofp i64 %24 to float
%26 = fdiv float %23, %25
store float %26, float* %4
br label %15
27: ; preds = %15
br label %28
28: ; preds = %27, %8
ret void
}

LLVM IR (-O2):
@CLOCKS_PER_SEC = global i64 0
define void @temporizador(float %0) {
%2 = fcmp olt float %0, 0.000000e+00
br i1 %2, label %19, label %3
3: ; preds = %1
%4 = tail call i64 (...) @clock()
%5 = sitofp i64 %4 to float
%6 = load i64, i64* @CLOCKS_PER_SEC
%7 = sitofp i64 %6 to float
%8 = fdiv float %5, %7
%9 = fsub float 0.000000e+00, %8
%10 = fcmp olt float %9, %0
br i1 %10, label %11, label %19
11: ; preds = %3, %11
%12 = tail call i64 (...) @clock()
%13 = sitofp i64 %12 to float
%14 = load i64, i64* @CLOCKS_PER_SEC
%15 = sitofp i64 %14 to float
%16 = fdiv float %13, %15
%17 = fsub float %16, %8
%18 = fcmp olt float %17, %0
br i1 %18, label %11, label %19
19: ; preds = %11, %3, %1
ret void
}