#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 */
float floatToFix(float, float, int, int, int /*<<< orphan*/);
int main(void) {
  int i;
  int Na = 3;
  int Nb = 3;
  int k = 2;
  int l = 5;
  float delta = 0.03125;
  float a[Na];
  float b[Nb];
  a[0] = 1.0000;
  a[1] = -0.375;
  a[2] = 0.1875;
  b[0] = 0.21875;
  b[1] = 0.40625;
  b[2] = 0.21875;
  for (i = 0; i < Na; ++i) {
    a[i] = floatToFix(a[i], delta, k, l, 0);
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x3,-0xc(%rbp)
movl   $0x3,-0x10(%rbp)
movl   $0x2,-0x14(%rbp)
movl   $0x5,-0x18(%rbp)
movl   $0x3d000000,-0x1c(%rbp)
mov    -0xc(%rbp),%eax
mov    %rsp,%rcx
mov    %rcx,-0x28(%rbp)
lea    0xf(,%rax,4),%rdx
and    $0xfffffffffffffff0,%rdx
mov    %rsp,%rcx
sub    %rdx,%rcx
mov    %rcx,-0x40(%rbp)
mov    %rcx,%rsp
mov    %rax,-0x30(%rbp)
mov    -0x10(%rbp),%eax
mov    %eax,%edx
lea    0xf(,%rdx,4),%rsi
and    $0xfffffffffffffff0,%rsi
mov    %rsp,%rax
sub    %rsi,%rax
mov    %rax,%rsp
mov    %rdx,-0x38(%rbp)
movss  0xe81(%rip),%xmm0
movss  %xmm0,(%rcx)
movss  0xe71(%rip),%xmm0
movss  %xmm0,0x4(%rcx)
movss  0xe60(%rip),%xmm0
movss  %xmm0,0x8(%rcx)
movss  0xe4b(%rip),%xmm0
movss  %xmm0,(%rax)
movss  0xe43(%rip),%xmm0
movss  %xmm0,0x4(%rax)
movss  0xe32(%rip),%xmm0
movss  %xmm0,0x8(%rax)
movl   $0x0,-0x8(%rbp)
mov    -0x8(%rbp),%eax
cmp    -0xc(%rbp),%eax
jge    1220 <main+0x110>
mov    -0x40(%rbp),%rax
movslq -0x8(%rbp),%rcx
movss  (%rax,%rcx,4),%xmm0
movss  -0x1c(%rbp),%xmm1
mov    -0x14(%rbp),%edi
mov    -0x18(%rbp),%esi
xor    %edx,%edx
call   1030 <floatToFix@plt>
mov    -0x40(%rbp),%rax
movslq -0x8(%rbp),%rcx
movss  %xmm0,(%rax,%rcx,4)
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    11da <main+0xca>
movl   $0x0,-0x4(%rbp)
mov    -0x28(%rbp),%rax
mov    %rax,%rsp
mov    -0x4(%rbp),%eax
mov    %rbp,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
movss  0xee7(%rip),%xmm0
movss  0xee3(%rip),%xmm1
mov    $0x2,%edi
mov    $0x5,%esi
xor    %edx,%edx
call   1030 <floatToFix@plt>
movss  0xece(%rip),%xmm0
movss  0xec2(%rip),%xmm1
mov    $0x2,%edi
mov    $0x5,%esi
xor    %edx,%edx
call   1030 <floatToFix@plt>
movss  0xeb1(%rip),%xmm0
movss  0xea1(%rip),%xmm1
mov    $0x2,%edi
mov    $0x5,%esi
xor    %edx,%edx
call   1030 <floatToFix@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
%7 = alloca float
%8 = alloca i8*
%9 = alloca i64
%10 = alloca i64
store i32 0, i32* %1
store i32 3, i32* %3
store i32 3, i32* %4
store i32 2, i32* %5
store i32 5, i32* %6
store float 3.125000e-02, float* %7
%11 = load i32, i32* %3
%12 = zext i32 %11 to i64
%13 = call i8* @llvm.stacksave()
store i8* %13, i8** %8
%14 = alloca float, i64 %12
store i64 %12, i64* %9
%15 = load i32, i32* %4
%16 = zext i32 %15 to i64
%17 = alloca float, i64 %16
store i64 %16, i64* %10
%18 = getelementptr inbounds float, float* %14, i64 0
store float 1.000000e+00, float* %18
%19 = getelementptr inbounds float, float* %14, i64 1
store float -3.750000e-01, float* %19
%20 = getelementptr inbounds float, float* %14, i64 2
store float 1.875000e-01, float* %20
%21 = getelementptr inbounds float, float* %17, i64 0
store float 2.187500e-01, float* %21
%22 = getelementptr inbounds float, float* %17, i64 1
store float 4.062500e-01, float* %22
%23 = getelementptr inbounds float, float* %17, i64 2
store float 2.187500e-01, float* %23
store i32 0, i32* %2
br label %24
24: ; preds = %40, %0
%25 = load i32, i32* %2
%26 = load i32, i32* %3
%27 = icmp slt i32 %25, %26
br i1 %27, label %28, label %43
28: ; preds = %24
%29 = load i32, i32* %2
%30 = sext i32 %29 to i64
%31 = getelementptr inbounds float, float* %14, i64 %30
%32 = load float, float* %31
%33 = load float, float* %7
%34 = load i32, i32* %5
%35 = load i32, i32* %6
%36 = call float @floatToFix(float %32, float %33, i32 %34, i32 %35, i32 0)
%37 = load i32, i32* %2
%38 = sext i32 %37 to i64
%39 = getelementptr inbounds float, float* %14, i64 %38
store float %36, float* %39
br label %40
40: ; preds = %28
%41 = load i32, i32* %2
%42 = add nsw i32 %41, 1
store i32 %42, i32* %2
br label %24
43: ; preds = %24
store i32 0, i32* %1
%44 = load i8*, i8** %8
%45 = load i32, i32* %1
ret i32 %45
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call float @floatToFix(float 1.000000e+00, float 3.125000e-02, i32 2, i32 5, i32 0)
%2 = tail call float @floatToFix(float -3.750000e-01, float 3.125000e-02, i32 2, i32 5, i32 0)
%3 = tail call float @floatToFix(float 1.875000e-01, float 3.125000e-02, i32 2, i32 5, i32 0)
ret i32 0
}