#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*/ ZowiTone(int, int, int, int);
void S_mode2() {
  for (int i = 1567.98; i < 2349.32; i = i * 1.04) {
    ZowiTone(10, i, 20, 10);
  }
}


x86 assembly (clang, -O0):
<S_mode2>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x61f,-0x4(%rbp)
cvtsi2sdl -0x4(%rbp),%xmm1
movsd  0xed4(%rip),%xmm0
ucomisd %xmm1,%xmm0
jbe    1167 <S_mode2+0x57>
mov    -0x4(%rbp),%esi
mov    $0xa,%ecx
mov    $0x14,%edx
mov    %ecx,%edi
call   1030 <ZowiTone@plt>
cvtsi2sdl -0x4(%rbp),%xmm0
movsd  0xeb1(%rip),%xmm1
mulsd  %xmm1,%xmm0
cvttsd2si %xmm0,%eax
mov    %eax,-0x4(%rbp)
jmp    111f <S_mode2+0xf>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<S_mode2>:
push   %rax
mov    $0xa,%edi
mov    $0x61f,%esi
mov    $0x14,%edx
mov    $0xa,%ecx
call   1030 <ZowiTone@plt>
mov    $0xa,%edi
mov    $0x65d,%esi
mov    $0x14,%edx
mov    $0xa,%ecx
call   1030 <ZowiTone@plt>
mov    $0xa,%edi
mov    $0x69e,%esi
mov    $0x14,%edx
mov    $0xa,%ecx
call   1030 <ZowiTone@plt>
mov    $0xa,%edi
mov    $0x6e1,%esi
mov    $0x14,%edx
mov    $0xa,%ecx
call   1030 <ZowiTone@plt>
mov    $0xa,%edi
mov    $0x727,%esi
mov    $0x14,%edx
mov    $0xa,%ecx
call   1030 <ZowiTone@plt>
mov    $0xa,%edi
mov    $0x770,%esi
mov    $0x14,%edx
mov    $0xa,%ecx
call   1030 <ZowiTone@plt>
mov    $0xa,%edi
mov    $0x7bc,%esi
mov    $0x14,%edx
mov    $0xa,%ecx
call   1030 <ZowiTone@plt>
mov    $0xa,%edi
mov    $0x80b,%esi
mov    $0x14,%edx
mov    $0xa,%ecx
call   1030 <ZowiTone@plt>
mov    $0xa,%edi
mov    $0x85d,%esi
mov    $0x14,%edx
mov    $0xa,%ecx
call   1030 <ZowiTone@plt>
mov    $0xa,%edi
mov    $0x8b2,%esi
mov    $0x14,%edx
mov    $0xa,%ecx
call   1030 <ZowiTone@plt>
mov    $0xa,%edi
mov    $0x90b,%esi
mov    $0x14,%edx
mov    $0xa,%ecx
pop    %rax
jmp    1030 <ZowiTone@plt>

LLVM IR (-O0):
define void @S_mode2() {
%1 = alloca i32
store i32 1567, i32* %1
br label %2
2: ; preds = %9, %0
%3 = load i32, i32* %1
%4 = sitofp i32 %3 to double
%5 = fcmp olt double %4, 2.349320e+03
br i1 %5, label %6, label %14
6: ; preds = %2
%7 = load i32, i32* %1
%8 = call i32 @ZowiTone(i32 10, i32 %7, i32 20, i32 10)
br label %9
9: ; preds = %6
%10 = load i32, i32* %1
%11 = sitofp i32 %10 to double
%12 = fmul double %11, 1.040000e+00
%13 = fptosi double %12 to i32
store i32 %13, i32* %1
br label %2
14: ; preds = %2
ret void
}

LLVM IR (-O2):
define void @S_mode2() {
%1 = tail call i32 @ZowiTone(i32 10, i32 1567, i32 20, i32 10)
%2 = tail call i32 @ZowiTone(i32 10, i32 1629, i32 20, i32 10)
%3 = tail call i32 @ZowiTone(i32 10, i32 1694, i32 20, i32 10)
%4 = tail call i32 @ZowiTone(i32 10, i32 1761, i32 20, i32 10)
%5 = tail call i32 @ZowiTone(i32 10, i32 1831, i32 20, i32 10)
%6 = tail call i32 @ZowiTone(i32 10, i32 1904, i32 20, i32 10)
%7 = tail call i32 @ZowiTone(i32 10, i32 1980, i32 20, i32 10)
%8 = tail call i32 @ZowiTone(i32 10, i32 2059, i32 20, i32 10)
%9 = tail call i32 @ZowiTone(i32 10, i32 2141, i32 20, i32 10)
%10 = tail call i32 @ZowiTone(i32 10, i32 2226, i32 20, i32 10)
%11 = tail call i32 @ZowiTone(i32 10, i32 2315, i32 20, i32 10)
ret void
}