#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*/ __ivtv_api_dec_speed(int, int, int /*<<< orphan*/, int, int,
                                        int, int, int, int, int);
int ivtv_api_dec_speed(int ivtvfd, int direction, float fps) {
  int _speed = (int)fps;
  int b_per_gop = 1;
  int aud_mute = 0;
  int fr_field = 0;
  int mute = 0;
  int i_frames = 1;
  int ip_frames = 3;
  int ipb_frames = 7;
  if (direction > 1)
    direction = 1;
  else if (direction < 0)
    direction = 0;
  if (_speed < 0)
    _speed = fps = 30;
  if (direction == 0) {
    if (fps < 30) {
      _speed = 30 / fps;
      __ivtv_api_dec_speed(ivtvfd, _speed, 0, 0, direction, ipb_frames, 0,
                           aud_mute, fr_field, mute);
    } else if (fps == 30) {
      __ivtv_api_dec_speed(ivtvfd, 0, 0, 0, direction, ipb_frames, 0, aud_mute,
                           fr_field, mute);
    } else if (fps == (1.5 * 30)) {
      _speed = 1;
      __ivtv_api_dec_speed(ivtvfd, _speed, 0, 1, direction, ipb_frames, 0,
                           aud_mute, fr_field, mute);
    } else if (fps > (2 * 30)) {
      __ivtv_api_dec_speed(ivtvfd, 0, 0, 0, direction, i_frames, 0, aud_mute,
                           fr_field, mute);
    } else {
      _speed = 2;
      __ivtv_api_dec_speed(ivtvfd, _speed, 0, 1, direction, ipb_frames, 0,
                           aud_mute, fr_field, mute);
    }
  } else {
    if (fps < 30) {
      _speed = 30 / fps;
      __ivtv_api_dec_speed(ivtvfd, _speed, 0, 0, direction, ip_frames,
                           b_per_gop, aud_mute, fr_field, mute);
    } else if (fps == 30) {
      __ivtv_api_dec_speed(ivtvfd, 0, 0, 0, direction, ip_frames, b_per_gop,
                           aud_mute, fr_field, mute);
    } else if (fps == (1.5 * 30)) {
      _speed = 1;
      __ivtv_api_dec_speed(ivtvfd, _speed, 0, 1, direction, ip_frames,
                           b_per_gop, aud_mute, fr_field, mute);
    } else if (fps > (2 * 30)) {
      __ivtv_api_dec_speed(ivtvfd, 0, 0, 0, direction, i_frames, b_per_gop,
                           aud_mute, fr_field, mute);
    } else {
      _speed = 2;
      __ivtv_api_dec_speed(ivtvfd, _speed, 0, 1, direction, ipb_frames,
                           b_per_gop, aud_mute, fr_field, mute);
    }
  }
  return 0;
}


x86 assembly (clang, -O0):
<ivtv_api_dec_speed>:
push   %rbp
mov    %rsp,%rbp
push   %rbx
sub    $0x58,%rsp
mov    %edi,-0xc(%rbp)
mov    %esi,-0x10(%rbp)
movss  %xmm0,-0x14(%rbp)
cvttss2si -0x14(%rbp),%eax
mov    %eax,-0x18(%rbp)
movl   $0x1,-0x1c(%rbp)
movl   $0x0,-0x20(%rbp)
movl   $0x0,-0x24(%rbp)
movl   $0x0,-0x28(%rbp)
movl   $0x1,-0x2c(%rbp)
movl   $0x3,-0x30(%rbp)
movl   $0x7,-0x34(%rbp)
cmpl   $0x1,-0x10(%rbp)
jle    1173 <ivtv_api_dec_speed+0x63>
movl   $0x1,-0x10(%rbp)
jmp    1189 <ivtv_api_dec_speed+0x79>
cmpl   $0x0,-0x10(%rbp)
jge    1184 <ivtv_api_dec_speed+0x74>
movl   $0x0,-0x10(%rbp)
jmp    1189 <ivtv_api_dec_speed+0x79>
cmpl   $0x0,-0x18(%rbp)
jge    11a7 <ivtv_api_dec_speed+0x97>
movss  0xe65(%rip),%xmm0
movss  %xmm0,-0x14(%rbp)
movl   $0x1e,-0x18(%rbp)
cmpl   $0x0,-0x10(%rbp)
jne    1377 <ivtv_api_dec_speed+0x267>
movss  0xe47(%rip),%xmm0
ucomiss -0x14(%rbp),%xmm0
jbe    1213 <ivtv_api_dec_speed+0x103>
movss  0xe35(%rip),%xmm0
divss  -0x14(%rbp),%xmm0
cvttss2si %xmm0,%eax
mov    %eax,-0x18(%rbp)
mov    -0xc(%rbp),%edi
mov    -0x18(%rbp),%esi
mov    -0x10(%rbp),%r8d
mov    -0x34(%rbp),%r9d
mov    -0x20(%rbp),%r11d
mov    -0x24(%rbp),%r10d
mov    -0x28(%rbp),%eax
xor    %ecx,%ecx
mov    %ecx,%edx
movl   $0x0,(%rsp)
mov    %r11d,0x8(%rsp)
mov    %r10d,0x10(%rsp)
mov    %eax,0x18(%rsp)
call   1030 <__ivtv_api_dec_speed@plt>
jmp    1372 <ivtv_api_dec_speed+0x262>
movss  -0x14(%rbp),%xmm0
movss  0xde0(%rip),%xmm1
ucomiss %xmm1,%xmm0
jne    126a <ivtv_api_dec_speed+0x15a>
jp     126a <ivtv_api_dec_speed+0x15a>
mov    -0xc(%rbp),%edi
mov    -0x10(%rbp),%r8d
mov    -0x34(%rbp),%r9d
mov    -0x20(%rbp),%r11d
mov    -0x24(%rbp),%r10d
mov    -0x28(%rbp),%eax
xor    %ecx,%ecx
mov    %ecx,%esi
mov    %ecx,%edx
movl   $0x0,(%rsp)
mov    %r11d,0x8(%rsp)
mov    %r10d,0x10(%rsp)
mov    %eax,0x18(%rsp)
call   1030 <__ivtv_api_dec_speed@plt>
jmp    136d <ivtv_api_dec_speed+0x25d>
movss  -0x14(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
movsd  0xd8d(%rip),%xmm1
ucomisd %xmm1,%xmm0
jne    12d1 <ivtv_api_dec_speed+0x1c1>
jp     12d1 <ivtv_api_dec_speed+0x1c1>
movl   $0x1,-0x18(%rbp)
mov    -0xc(%rbp),%edi
mov    -0x18(%rbp),%esi
mov    -0x10(%rbp),%r8d
mov    -0x34(%rbp),%r9d
mov    -0x20(%rbp),%r11d
mov    -0x24(%rbp),%r10d
mov    -0x28(%rbp),%eax
xor    %edx,%edx
mov    $0x1,%ecx
movl   $0x0,(%rsp)
mov    %r11d,0x8(%rsp)
mov    %r10d,0x10(%rsp)
mov    %eax,0x18(%rsp)
call   1030 <__ivtv_api_dec_speed@plt>
jmp    1368 <ivtv_api_dec_speed+0x258>
movss  -0x14(%rbp),%xmm0
movss  0xd26(%rip),%xmm1
ucomiss %xmm1,%xmm0
jbe    1322 <ivtv_api_dec_speed+0x212>
mov    -0xc(%rbp),%edi
mov    -0x10(%rbp),%r8d
mov    -0x2c(%rbp),%r9d
mov    -0x20(%rbp),%r11d
mov    -0x24(%rbp),%r10d
mov    -0x28(%rbp),%eax
xor    %ecx,%ecx
mov    %ecx,%esi
mov    %ecx,%edx
movl   $0x0,(%rsp)
mov    %r11d,0x8(%rsp)
mov    %r10d,0x10(%rsp)
mov    %eax,0x18(%rsp)
call   1030 <__ivtv_api_dec_speed@plt>
jmp    1363 <ivtv_api_dec_speed+0x253>
movl   $0x2,-0x18(%rbp)
mov    -0xc(%rbp),%edi
mov    -0x18(%rbp),%esi
mov    -0x10(%rbp),%r8d
mov    -0x34(%rbp),%r9d
mov    -0x20(%rbp),%r11d
mov    -0x24(%rbp),%r10d
mov    -0x28(%rbp),%eax
xor    %edx,%edx
mov    $0x1,%ecx
movl   $0x0,(%rsp)
mov    %r11d,0x8(%rsp)
mov    %r10d,0x10(%rsp)
mov    %eax,0x18(%rsp)
call   1030 <__ivtv_api_dec_speed@plt>
jmp    1368 <ivtv_api_dec_speed+0x258>
jmp    136d <ivtv_api_dec_speed+0x25d>
jmp    1372 <ivtv_api_dec_speed+0x262>
jmp    1538 <ivtv_api_dec_speed+0x428>
movss  0xc81(%rip),%xmm0
ucomiss -0x14(%rbp),%xmm0
jbe    13d8 <ivtv_api_dec_speed+0x2c8>
movss  0xc6f(%rip),%xmm0
divss  -0x14(%rbp),%xmm0
cvttss2si %xmm0,%eax
mov    %eax,-0x18(%rbp)
mov    -0xc(%rbp),%edi
mov    -0x18(%rbp),%esi
mov    -0x10(%rbp),%r8d
mov    -0x30(%rbp),%r9d
mov    -0x1c(%rbp),%ebx
mov    -0x20(%rbp),%r11d
mov    -0x24(%rbp),%r10d
mov    -0x28(%rbp),%eax
xor    %ecx,%ecx
mov    %ecx,%edx
mov    %ebx,(%rsp)
mov    %r11d,0x8(%rsp)
mov    %r10d,0x10(%rsp)
mov    %eax,0x18(%rsp)
call   1030 <__ivtv_api_dec_speed@plt>
jmp    1533 <ivtv_api_dec_speed+0x423>
movss  -0x14(%rbp),%xmm0
movss  0xc1b(%rip),%xmm1
ucomiss %xmm1,%xmm0
jne    142e <ivtv_api_dec_speed+0x31e>
jp     142e <ivtv_api_dec_speed+0x31e>
mov    -0xc(%rbp),%edi
mov    -0x10(%rbp),%r8d
mov    -0x30(%rbp),%r9d
mov    -0x1c(%rbp),%ebx
mov    -0x20(%rbp),%r11d
mov    -0x24(%rbp),%r10d
mov    -0x28(%rbp),%eax
xor    %ecx,%ecx
mov    %ecx,%esi
mov    %ecx,%edx
mov    %ebx,(%rsp)
mov    %r11d,0x8(%rsp)
mov    %r10d,0x10(%rsp)
mov    %eax,0x18(%rsp)
call   1030 <__ivtv_api_dec_speed@plt>
jmp    152e <ivtv_api_dec_speed+0x41e>
movss  -0x14(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
movsd  0xbc9(%rip),%xmm1
ucomisd %xmm1,%xmm0
jne    1494 <ivtv_api_dec_speed+0x384>
jp     1494 <ivtv_api_dec_speed+0x384>
movl   $0x1,-0x18(%rbp)
mov    -0xc(%rbp),%edi
mov    -0x18(%rbp),%esi
mov    -0x10(%rbp),%r8d
mov    -0x30(%rbp),%r9d
mov    -0x1c(%rbp),%ebx
mov    -0x20(%rbp),%r11d
mov    -0x24(%rbp),%r10d
mov    -0x28(%rbp),%eax
xor    %edx,%edx
mov    $0x1,%ecx
mov    %ebx,(%rsp)
mov    %r11d,0x8(%rsp)
mov    %r10d,0x10(%rsp)
mov    %eax,0x18(%rsp)
call   1030 <__ivtv_api_dec_speed@plt>
jmp    1529 <ivtv_api_dec_speed+0x419>
movss  -0x14(%rbp),%xmm0
movss  0xb63(%rip),%xmm1
ucomiss %xmm1,%xmm0
jbe    14e4 <ivtv_api_dec_speed+0x3d4>
mov    -0xc(%rbp),%edi
mov    -0x10(%rbp),%r8d
mov    -0x2c(%rbp),%r9d
mov    -0x1c(%rbp),%ebx
mov    -0x20(%rbp),%r11d
mov    -0x24(%rbp),%r10d
mov    -0x28(%rbp),%eax
xor    %ecx,%ecx
mov    %ecx,%esi
mov    %ecx,%edx
mov    %ebx,(%rsp)
mov    %r11d,0x8(%rsp)
mov    %r10d,0x10(%rsp)
mov    %eax,0x18(%rsp)
call   1030 <__ivtv_api_dec_speed@plt>
jmp    1524 <ivtv_api_dec_speed+0x414>
movl   $0x2,-0x18(%rbp)
mov    -0xc(%rbp),%edi
mov    -0x18(%rbp),%esi
mov    -0x10(%rbp),%r8d
mov    -0x34(%rbp),%r9d
mov    -0x1c(%rbp),%ebx
mov    -0x20(%rbp),%r11d
mov    -0x24(%rbp),%r10d
mov    -0x28(%rbp),%eax
xor    %edx,%edx
mov    $0x1,%ecx
mov    %ebx,(%rsp)
mov    %r11d,0x8(%rsp)
mov    %r10d,0x10(%rsp)
mov    %eax,0x18(%rsp)
call   1030 <__ivtv_api_dec_speed@plt>
jmp    1529 <ivtv_api_dec_speed+0x419>
jmp    152e <ivtv_api_dec_speed+0x41e>
jmp    1533 <ivtv_api_dec_speed+0x423>
jmp    1538 <ivtv_api_dec_speed+0x428>
xor    %eax,%eax
add    $0x58,%rsp
pop    %rbx
pop    %rbp
ret

x86 assembly (clang, -O2):
<ivtv_api_dec_speed>:
push   %rax
cvttss2si %xmm0,%eax
xor    %ecx,%ecx
test   %esi,%esi
cmovns %esi,%ecx
test   %ecx,%ecx
mov    $0x1,%r8d
cmove  %ecx,%r8d
test   %eax,%eax
jns    1134 <ivtv_api_dec_speed+0x24>
movss  0xecc(%rip),%xmm0
movss  0xec4(%rip),%xmm1
test   %r8d,%r8d
je     1150 <ivtv_api_dec_speed+0x40>
ucomiss %xmm0,%xmm1
jbe    115f <ivtv_api_dec_speed+0x4f>
divss  %xmm0,%xmm1
cvttss2si %xmm1,%esi
jmp    116c <ivtv_api_dec_speed+0x5c>
ucomiss %xmm0,%xmm1
jbe    1180 <ivtv_api_dec_speed+0x70>
divss  %xmm0,%xmm1
cvttss2si %xmm1,%esi
jmp    118d <ivtv_api_dec_speed+0x7d>
ucomiss 0xe9a(%rip),%xmm0
jne    11af <ivtv_api_dec_speed+0x9f>
jp     11af <ivtv_api_dec_speed+0x9f>
xor    %esi,%esi
xor    %edx,%edx
xor    %ecx,%ecx
mov    $0x3,%r9d
push   $0x0
push   $0x0
push   $0x0
push   $0x1
jmp    11a2 <ivtv_api_dec_speed+0x92>
ucomiss 0xe79(%rip),%xmm0
jne    11c8 <ivtv_api_dec_speed+0xb8>
jp     11c8 <ivtv_api_dec_speed+0xb8>
xor    %esi,%esi
xor    %edx,%edx
xor    %ecx,%ecx
xor    %r8d,%r8d
mov    $0x7,%r9d
push   $0x0
push   $0x0
push   $0x0
push   $0x0
call   1030 <__ivtv_api_dec_speed@plt>
add    $0x20,%rsp
xor    %eax,%eax
pop    %rcx
ret
ucomiss 0xe4e(%rip),%xmm0
jne    11da <ivtv_api_dec_speed+0xca>
jp     11da <ivtv_api_dec_speed+0xca>
mov    $0x1,%esi
xor    %edx,%edx
mov    $0x1,%ecx
jmp    1170 <ivtv_api_dec_speed+0x60>
ucomiss 0xe35(%rip),%xmm0
jne    11f1 <ivtv_api_dec_speed+0xe1>
jp     11f1 <ivtv_api_dec_speed+0xe1>
mov    $0x1,%esi
jmp    1227 <ivtv_api_dec_speed+0x117>
ucomiss 0xe27(%rip),%xmm0
jbe    120b <ivtv_api_dec_speed+0xfb>
xor    %esi,%esi
xor    %edx,%edx
xor    %ecx,%ecx
mov    $0x1,%r9d
jmp    1176 <ivtv_api_dec_speed+0x66>
ucomiss 0xe10(%rip),%xmm0
jbe    1222 <ivtv_api_dec_speed+0x112>
xor    %esi,%esi
xor    %edx,%edx
xor    %ecx,%ecx
xor    %r8d,%r8d
mov    $0x1,%r9d
jmp    119a <ivtv_api_dec_speed+0x8a>
mov    $0x2,%esi
xor    %edx,%edx
mov    $0x1,%ecx
mov    $0x7,%r9d
jmp    1176 <ivtv_api_dec_speed+0x66>
mov    $0x2,%esi
xor    %edx,%edx
mov    $0x1,%ecx
jmp    1191 <ivtv_api_dec_speed+0x81>

LLVM IR (-O0):
define i32 @ivtv_api_dec_speed(i32 %0, i32 %1, float %2) {
%4 = alloca i32
%5 = alloca i32
%6 = alloca float
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32
%10 = alloca i32
%11 = alloca i32
%12 = alloca i32
%13 = alloca i32
%14 = alloca i32
store i32 %0, i32* %4
store i32 %1, i32* %5
store float %2, float* %6
%15 = load float, float* %6
%16 = fptosi float %15 to i32
store i32 %16, i32* %7
store i32 1, i32* %8
store i32 0, i32* %9
store i32 0, i32* %10
store i32 0, i32* %11
store i32 1, i32* %12
store i32 3, i32* %13
store i32 7, i32* %14
%17 = load i32, i32* %5
%18 = icmp sgt i32 %17, 1
br i1 %18, label %19, label %20
19: ; preds = %3
store i32 1, i32* %5
br label %25
20: ; preds = %3
%21 = load i32, i32* %5
%22 = icmp slt i32 %21, 0
br i1 %22, label %23, label %24
23: ; preds = %20
store i32 0, i32* %5
br label %24
24: ; preds = %23, %20
br label %25
25: ; preds = %24, %19
%26 = load i32, i32* %7
%27 = icmp slt i32 %26, 0
br i1 %27, label %28, label %29
28: ; preds = %25
store float 3.000000e+01, float* %6
store i32 30, i32* %7
br label %29
29: ; preds = %28, %25
%30 = load i32, i32* %5
%31 = icmp eq i32 %30, 0
br i1 %31, label %32, label %95
32: ; preds = %29
%33 = load float, float* %6
%34 = fcmp olt float %33, 3.000000e+01
br i1 %34, label %35, label %47
35: ; preds = %32
%36 = load float, float* %6
%37 = fdiv float 3.000000e+01, %36
%38 = fptosi float %37 to i32
store i32 %38, i32* %7
%39 = load i32, i32* %4
%40 = load i32, i32* %7
%41 = load i32, i32* %5
%42 = load i32, i32* %14
%43 = load i32, i32* %9
%44 = load i32, i32* %10
%45 = load i32, i32* %11
%46 = call i32 @__ivtv_api_dec_speed(i32 %39, i32 %40, i32 0, i32 0, i32 %41, i32 %42, i32 0, i32 %43, i32 %44, i32 %45)
br label %94
47: ; preds = %32
%48 = load float, float* %6
%49 = fcmp oeq float %48, 3.000000e+01
br i1 %49, label %50, label %58
50: ; preds = %47
%51 = load i32, i32* %4
%52 = load i32, i32* %5
%53 = load i32, i32* %14
%54 = load i32, i32* %9
%55 = load i32, i32* %10
%56 = load i32, i32* %11
%57 = call i32 @__ivtv_api_dec_speed(i32 %51, i32 0, i32 0, i32 0, i32 %52, i32 %53, i32 0, i32 %54, i32 %55, i32 %56)
br label %93
58: ; preds = %47
%59 = load float, float* %6
%60 = fpext float %59 to double
%61 = fcmp oeq double %60, 4.500000e+01
br i1 %61, label %62, label %71
62: ; preds = %58
store i32 1, i32* %7
%63 = load i32, i32* %4
%64 = load i32, i32* %7
%65 = load i32, i32* %5
%66 = load i32, i32* %14
%67 = load i32, i32* %9
%68 = load i32, i32* %10
%69 = load i32, i32* %11
%70 = call i32 @__ivtv_api_dec_speed(i32 %63, i32 %64, i32 0, i32 1, i32 %65, i32 %66, i32 0, i32 %67, i32 %68, i32 %69)
br label %92
71: ; preds = %58
%72 = load float, float* %6
%73 = fcmp ogt float %72, 6.000000e+01
br i1 %73, label %74, label %82
74: ; preds = %71
%75 = load i32, i32* %4
%76 = load i32, i32* %5
%77 = load i32, i32* %12
%78 = load i32, i32* %9
%79 = load i32, i32* %10
%80 = load i32, i32* %11
%81 = call i32 @__ivtv_api_dec_speed(i32 %75, i32 0, i32 0, i32 0, i32 %76, i32 %77, i32 0, i32 %78, i32 %79, i32 %80)
br label %91
82: ; preds = %71
store i32 2, i32* %7
%83 = load i32, i32* %4
%84 = load i32, i32* %7
%85 = load i32, i32* %5
%86 = load i32, i32* %14
%87 = load i32, i32* %9
%88 = load i32, i32* %10
%89 = load i32, i32* %11
%90 = call i32 @__ivtv_api_dec_speed(i32 %83, i32 %84, i32 0, i32 1, i32 %85, i32 %86, i32 0, i32 %87, i32 %88, i32 %89)
br label %91
91: ; preds = %82, %74
br label %92
92: ; preds = %91, %62
br label %93
93: ; preds = %92, %50
br label %94
94: ; preds = %93, %35
br label %163
95: ; preds = %29
%96 = load float, float* %6
%97 = fcmp olt float %96, 3.000000e+01
br i1 %97, label %98, label %111
98: ; preds = %95
%99 = load float, float* %6
%100 = fdiv float 3.000000e+01, %99
%101 = fptosi float %100 to i32
store i32 %101, i32* %7
%102 = load i32, i32* %4
%103 = load i32, i32* %7
%104 = load i32, i32* %5
%105 = load i32, i32* %13
%106 = load i32, i32* %8
%107 = load i32, i32* %9
%108 = load i32, i32* %10
%109 = load i32, i32* %11
%110 = call i32 @__ivtv_api_dec_speed(i32 %102, i32 %103, i32 0, i32 0, i32 %104, i32 %105, i32 %106, i32 %107, i32 %108, i32 %109)
br label %162
111: ; preds = %95
%112 = load float, float* %6
%113 = fcmp oeq float %112, 3.000000e+01
br i1 %113, label %114, label %123
114: ; preds = %111
%115 = load i32, i32* %4
%116 = load i32, i32* %5
%117 = load i32, i32* %13
%118 = load i32, i32* %8
%119 = load i32, i32* %9
%120 = load i32, i32* %10
%121 = load i32, i32* %11
%122 = call i32 @__ivtv_api_dec_speed(i32 %115, i32 0, i32 0, i32 0, i32 %116, i32 %117, i32 %118, i32 %119, i32 %120, i32 %121)
br label %161
123: ; preds = %111
%124 = load float, float* %6
%125 = fpext float %124 to double
%126 = fcmp oeq double %125, 4.500000e+01
br i1 %126, label %127, label %137
127: ; preds = %123
store i32 1, i32* %7
%128 = load i32, i32* %4
%129 = load i32, i32* %7
%130 = load i32, i32* %5
%131 = load i32, i32* %13
%132 = load i32, i32* %8
%133 = load i32, i32* %9
%134 = load i32, i32* %10
%135 = load i32, i32* %11
%136 = call i32 @__ivtv_api_dec_speed(i32 %128, i32 %129, i32 0, i32 1, i32 %130, i32 %131, i32 %132, i32 %133, i32 %134, i32 %135)
br label %160
137: ; preds = %123
%138 = load float, float* %6
%139 = fcmp ogt float %138, 6.000000e+01
br i1 %139, label %140, label %149
140: ; preds = %137
%141 = load i32, i32* %4
%142 = load i32, i32* %5
%143 = load i32, i32* %12
%144 = load i32, i32* %8
%145 = load i32, i32* %9
%146 = load i32, i32* %10
%147 = load i32, i32* %11
%148 = call i32 @__ivtv_api_dec_speed(i32 %141, i32 0, i32 0, i32 0, i32 %142, i32 %143, i32 %144, i32 %145, i32 %146, i32 %147)
br label %159
149: ; preds = %137
store i32 2, i32* %7
%150 = load i32, i32* %4
%151 = load i32, i32* %7
%152 = load i32, i32* %5
%153 = load i32, i32* %14
%154 = load i32, i32* %8
%155 = load i32, i32* %9
%156 = load i32, i32* %10
%157 = load i32, i32* %11
%158 = call i32 @__ivtv_api_dec_speed(i32 %150, i32 %151, i32 0, i32 1, i32 %152, i32 %153, i32 %154, i32 %155, i32 %156, i32 %157)
br label %159
159: ; preds = %149, %140
br label %160
160: ; preds = %159, %127
br label %161
161: ; preds = %160, %114
br label %162
162: ; preds = %161, %98
br label %163
163: ; preds = %162, %94
ret i32 0
}

LLVM IR (-O2):
define i32 @ivtv_api_dec_speed(i32 %0, i32 %1, float %2) {
%4 = fptosi float %2 to i32
%5 = icmp sgt i32 %1, 0
%6 = select i1 %5, i32 %1, i32 0
%7 = icmp ult i32 %6, 1
%8 = select i1 %7, i32 %6, i32 1
%9 = icmp slt i32 %4, 0
%10 = select i1 %9, float 3.000000e+01, float %2
%11 = icmp eq i32 %8, 0
%12 = fcmp olt float %10, 3.000000e+01
br i1 %11, label %13, label %32
13: ; preds = %3
br i1 %12, label %14, label %18
14: ; preds = %13
%15 = fdiv float 3.000000e+01, %10
%16 = fptosi float %15 to i32
%17 = tail call i32 @__ivtv_api_dec_speed(i32 %0, i32 %16, i32 0, i32 0, i32 0, i32 7, i32 0, i32 0, i32 0, i32 0)
br label %51
18: ; preds = %13
%19 = fcmp oeq float %10, 3.000000e+01
br i1 %19, label %20, label %22
20: ; preds = %18
%21 = tail call i32 @__ivtv_api_dec_speed(i32 %0, i32 0, i32 0, i32 0, i32 0, i32 7, i32 0, i32 0, i32 0, i32 0)
br label %51
22: ; preds = %18
%23 = fcmp oeq float %10, 4.500000e+01
br i1 %23, label %24, label %26
24: ; preds = %22
%25 = tail call i32 @__ivtv_api_dec_speed(i32 %0, i32 1, i32 0, i32 1, i32 0, i32 7, i32 0, i32 0, i32 0, i32 0)
br label %51
26: ; preds = %22
%27 = fcmp ogt float %10, 6.000000e+01
br i1 %27, label %28, label %30
28: ; preds = %26
%29 = tail call i32 @__ivtv_api_dec_speed(i32 %0, i32 0, i32 0, i32 0, i32 0, i32 1, i32 0, i32 0, i32 0, i32 0)
br label %51
30: ; preds = %26
%31 = tail call i32 @__ivtv_api_dec_speed(i32 %0, i32 2, i32 0, i32 1, i32 0, i32 7, i32 0, i32 0, i32 0, i32 0)
br label %51
32: ; preds = %3
br i1 %12, label %33, label %37
33: ; preds = %32
%34 = fdiv float 3.000000e+01, %10
%35 = fptosi float %34 to i32
%36 = tail call i32 @__ivtv_api_dec_speed(i32 %0, i32 %35, i32 0, i32 0, i32 %8, i32 3, i32 1, i32 0, i32 0, i32 0)
br label %51
37: ; preds = %32
%38 = fcmp oeq float %10, 3.000000e+01
br i1 %38, label %39, label %41
39: ; preds = %37
%40 = tail call i32 @__ivtv_api_dec_speed(i32 %0, i32 0, i32 0, i32 0, i32 %8, i32 3, i32 1, i32 0, i32 0, i32 0)
br label %51
41: ; preds = %37
%42 = fcmp oeq float %10, 4.500000e+01
br i1 %42, label %43, label %45
43: ; preds = %41
%44 = tail call i32 @__ivtv_api_dec_speed(i32 %0, i32 1, i32 0, i32 1, i32 %8, i32 3, i32 1, i32 0, i32 0, i32 0)
br label %51
45: ; preds = %41
%46 = fcmp ogt float %10, 6.000000e+01
br i1 %46, label %47, label %49
47: ; preds = %45
%48 = tail call i32 @__ivtv_api_dec_speed(i32 %0, i32 0, i32 0, i32 0, i32 %8, i32 1, i32 1, i32 0, i32 0, i32 0)
br label %51
49: ; preds = %45
%50 = tail call i32 @__ivtv_api_dec_speed(i32 %0, i32 2, i32 0, i32 1, i32 %8, i32 7, i32 1, i32 0, i32 0, i32 0)
br label %51
51: ; preds = %33, %43, %49, %47, %39, %14, %24, %30, %28, %20
ret i32 0
}