#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, double, int, int);
int /*<<< orphan*/ delay(int);
void S_OhOoh2() {
  for (int i = 1880; i < 3000; i = i * 1.03) {
    ZowiTone(10, i, 8, 3);
  }
  delay(200);
  for (int i = 1880; i < 3000; i = i * 1.03) {
    ZowiTone(10, 1046.5, 10, 10);
  }
}


x86 assembly (clang, -O0):
<S_OhOoh2>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x758,-0x4(%rbp)
cmpl   $0xbb8,-0x4(%rbp)
jge    1172 <S_OhOoh2+0x52>
cvtsi2sdl -0x4(%rbp),%xmm0
mov    $0xa,%edi
mov    $0x8,%esi
mov    $0x3,%edx
call   1030 <ZowiTone@plt>
cvtsi2sdl -0x4(%rbp),%xmm0
movsd  0xea6(%rip),%xmm1
mulsd  %xmm1,%xmm0
cvttsd2si %xmm0,%eax
mov    %eax,-0x4(%rbp)
jmp    112f <S_OhOoh2+0xf>
mov    $0xc8,%edi
call   1040 <delay@plt>
movl   $0x758,-0x8(%rbp)
cmpl   $0xbb8,-0x8(%rbp)
jge    11c3 <S_OhOoh2+0xa3>
mov    $0xa,%edx
movsd  0xe63(%rip),%xmm0
mov    %edx,%edi
mov    %edx,%esi
call   1030 <ZowiTone@plt>
cvtsi2sdl -0x8(%rbp),%xmm0
movsd  0xe55(%rip),%xmm1
mulsd  %xmm1,%xmm0
cvttsd2si %xmm0,%eax
mov    %eax,-0x8(%rbp)
jmp    1183 <S_OhOoh2+0x63>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<S_OhOoh2>:
push   %rax
movsd  0xed7(%rip),%xmm0
mov    $0xa,%edi
mov    $0x8,%esi
mov    $0x3,%edx
call   1030 <ZowiTone@plt>
movsd  0xec3(%rip),%xmm0
mov    $0xa,%edi
mov    $0x8,%esi
mov    $0x3,%edx
call   1030 <ZowiTone@plt>
movsd  0xeaf(%rip),%xmm0
mov    $0xa,%edi
mov    $0x8,%esi
mov    $0x3,%edx
call   1030 <ZowiTone@plt>
movsd  0xe9b(%rip),%xmm0
mov    $0xa,%edi
mov    $0x8,%esi
mov    $0x3,%edx
call   1030 <ZowiTone@plt>
movsd  0xe87(%rip),%xmm0
mov    $0xa,%edi
mov    $0x8,%esi
mov    $0x3,%edx
call   1030 <ZowiTone@plt>
movsd  0xe73(%rip),%xmm0
mov    $0xa,%edi
mov    $0x8,%esi
mov    $0x3,%edx
call   1030 <ZowiTone@plt>
movsd  0xe5f(%rip),%xmm0
mov    $0xa,%edi
mov    $0x8,%esi
mov    $0x3,%edx
call   1030 <ZowiTone@plt>
movsd  0xe4b(%rip),%xmm0
mov    $0xa,%edi
mov    $0x8,%esi
mov    $0x3,%edx
call   1030 <ZowiTone@plt>
movsd  0xe37(%rip),%xmm0
mov    $0xa,%edi
mov    $0x8,%esi
mov    $0x3,%edx
call   1030 <ZowiTone@plt>
movsd  0xe23(%rip),%xmm0
mov    $0xa,%edi
mov    $0x8,%esi
mov    $0x3,%edx
call   1030 <ZowiTone@plt>
movsd  0xe0f(%rip),%xmm0
mov    $0xa,%edi
mov    $0x8,%esi
mov    $0x3,%edx
call   1030 <ZowiTone@plt>
movsd  0xdfb(%rip),%xmm0
mov    $0xa,%edi
mov    $0x8,%esi
mov    $0x3,%edx
call   1030 <ZowiTone@plt>
movsd  0xde7(%rip),%xmm0
mov    $0xa,%edi
mov    $0x8,%esi
mov    $0x3,%edx
call   1030 <ZowiTone@plt>
movsd  0xdd3(%rip),%xmm0
mov    $0xa,%edi
mov    $0x8,%esi
mov    $0x3,%edx
call   1030 <ZowiTone@plt>
movsd  0xdbf(%rip),%xmm0
mov    $0xa,%edi
mov    $0x8,%esi
mov    $0x3,%edx
call   1030 <ZowiTone@plt>
movsd  0xdab(%rip),%xmm0
mov    $0xa,%edi
mov    $0x8,%esi
mov    $0x3,%edx
call   1030 <ZowiTone@plt>
mov    $0xc8,%edi
call   1040 <delay@plt>
movsd  0xd8d(%rip),%xmm0
mov    $0xa,%edi
mov    $0xa,%esi
mov    $0xa,%edx
call   1030 <ZowiTone@plt>
mov    $0xa,%edi
movsd  0xd6c(%rip),%xmm0
mov    $0xa,%esi
mov    $0xa,%edx
call   1030 <ZowiTone@plt>
mov    $0xa,%edi
movsd  0xd50(%rip),%xmm0
mov    $0xa,%esi
mov    $0xa,%edx
call   1030 <ZowiTone@plt>
mov    $0xa,%edi
movsd  0xd34(%rip),%xmm0
mov    $0xa,%esi
mov    $0xa,%edx
call   1030 <ZowiTone@plt>
mov    $0xa,%edi
movsd  0xd18(%rip),%xmm0
mov    $0xa,%esi
mov    $0xa,%edx
call   1030 <ZowiTone@plt>
mov    $0xa,%edi
movsd  0xcfc(%rip),%xmm0
mov    $0xa,%esi
mov    $0xa,%edx
call   1030 <ZowiTone@plt>
mov    $0xa,%edi
movsd  0xce0(%rip),%xmm0
mov    $0xa,%esi
mov    $0xa,%edx
call   1030 <ZowiTone@plt>
mov    $0xa,%edi
movsd  0xcc4(%rip),%xmm0
mov    $0xa,%esi
mov    $0xa,%edx
call   1030 <ZowiTone@plt>
mov    $0xa,%edi
movsd  0xca8(%rip),%xmm0
mov    $0xa,%esi
mov    $0xa,%edx
call   1030 <ZowiTone@plt>
mov    $0xa,%edi
movsd  0xc8c(%rip),%xmm0
mov    $0xa,%esi
mov    $0xa,%edx
call   1030 <ZowiTone@plt>
mov    $0xa,%edi
movsd  0xc70(%rip),%xmm0
mov    $0xa,%esi
mov    $0xa,%edx
call   1030 <ZowiTone@plt>
mov    $0xa,%edi
movsd  0xc54(%rip),%xmm0
mov    $0xa,%esi
mov    $0xa,%edx
call   1030 <ZowiTone@plt>
mov    $0xa,%edi
movsd  0xc38(%rip),%xmm0
mov    $0xa,%esi
mov    $0xa,%edx
call   1030 <ZowiTone@plt>
mov    $0xa,%edi
movsd  0xc1c(%rip),%xmm0
mov    $0xa,%esi
mov    $0xa,%edx
call   1030 <ZowiTone@plt>
mov    $0xa,%edi
movsd  0xc00(%rip),%xmm0
mov    $0xa,%esi
mov    $0xa,%edx
call   1030 <ZowiTone@plt>
mov    $0xa,%edi
movsd  0xbe4(%rip),%xmm0
mov    $0xa,%esi
mov    $0xa,%edx
pop    %rax
jmp    1030 <ZowiTone@plt>

LLVM IR (-O0):
define void @S_OhOoh2() {
%1 = alloca i32
%2 = alloca i32
store i32 1880, i32* %1
br label %3
3: ; preds = %10, %0
%4 = load i32, i32* %1
%5 = icmp slt i32 %4, 3000
br i1 %5, label %6, label %15
6: ; preds = %3
%7 = load i32, i32* %1
%8 = sitofp i32 %7 to double
%9 = call i32 @ZowiTone(i32 10, double %8, i32 8, i32 3)
br label %10
10: ; preds = %6
%11 = load i32, i32* %1
%12 = sitofp i32 %11 to double
%13 = fmul double %12, 1.030000e+00
%14 = fptosi double %13 to i32
store i32 %14, i32* %1
br label %3
15: ; preds = %3
%16 = call i32 @delay(i32 200)
store i32 1880, i32* %2
br label %17
17: ; preds = %22, %15
%18 = load i32, i32* %2
%19 = icmp slt i32 %18, 3000
br i1 %19, label %20, label %27
20: ; preds = %17
%21 = call i32 @ZowiTone(i32 10, double 1.046500e+03, i32 10, i32 10)
br label %22
22: ; preds = %20
%23 = load i32, i32* %2
%24 = sitofp i32 %23 to double
%25 = fmul double %24, 1.030000e+00
%26 = fptosi double %25 to i32
store i32 %26, i32* %2
br label %17
27: ; preds = %17
ret void
}

LLVM IR (-O2):
define void @S_OhOoh2() {
%1 = tail call i32 @ZowiTone(i32 10, double 1.880000e+03, i32 8, i32 3)
%2 = tail call i32 @ZowiTone(i32 10, double 1.936000e+03, i32 8, i32 3)
%3 = tail call i32 @ZowiTone(i32 10, double 1.994000e+03, i32 8, i32 3)
%4 = tail call i32 @ZowiTone(i32 10, double 2.053000e+03, i32 8, i32 3)
%5 = tail call i32 @ZowiTone(i32 10, double 2.114000e+03, i32 8, i32 3)
%6 = tail call i32 @ZowiTone(i32 10, double 2.177000e+03, i32 8, i32 3)
%7 = tail call i32 @ZowiTone(i32 10, double 2.242000e+03, i32 8, i32 3)
%8 = tail call i32 @ZowiTone(i32 10, double 2.309000e+03, i32 8, i32 3)
%9 = tail call i32 @ZowiTone(i32 10, double 2.378000e+03, i32 8, i32 3)
%10 = tail call i32 @ZowiTone(i32 10, double 2.449000e+03, i32 8, i32 3)
%11 = tail call i32 @ZowiTone(i32 10, double 2.522000e+03, i32 8, i32 3)
%12 = tail call i32 @ZowiTone(i32 10, double 2.597000e+03, i32 8, i32 3)
%13 = tail call i32 @ZowiTone(i32 10, double 2.674000e+03, i32 8, i32 3)
%14 = tail call i32 @ZowiTone(i32 10, double 2.754000e+03, i32 8, i32 3)
%15 = tail call i32 @ZowiTone(i32 10, double 2.836000e+03, i32 8, i32 3)
%16 = tail call i32 @ZowiTone(i32 10, double 2.921000e+03, i32 8, i32 3)
%17 = tail call i32 @delay(i32 200)
%18 = tail call i32 @ZowiTone(i32 10, double 1.046500e+03, i32 10, i32 10)
%19 = tail call i32 @ZowiTone(i32 10, double 1.046500e+03, i32 10, i32 10)
%20 = tail call i32 @ZowiTone(i32 10, double 1.046500e+03, i32 10, i32 10)
%21 = tail call i32 @ZowiTone(i32 10, double 1.046500e+03, i32 10, i32 10)
%22 = tail call i32 @ZowiTone(i32 10, double 1.046500e+03, i32 10, i32 10)
%23 = tail call i32 @ZowiTone(i32 10, double 1.046500e+03, i32 10, i32 10)
%24 = tail call i32 @ZowiTone(i32 10, double 1.046500e+03, i32 10, i32 10)
%25 = tail call i32 @ZowiTone(i32 10, double 1.046500e+03, i32 10, i32 10)
%26 = tail call i32 @ZowiTone(i32 10, double 1.046500e+03, i32 10, i32 10)
%27 = tail call i32 @ZowiTone(i32 10, double 1.046500e+03, i32 10, i32 10)
%28 = tail call i32 @ZowiTone(i32 10, double 1.046500e+03, i32 10, i32 10)
%29 = tail call i32 @ZowiTone(i32 10, double 1.046500e+03, i32 10, i32 10)
%30 = tail call i32 @ZowiTone(i32 10, double 1.046500e+03, i32 10, i32 10)
%31 = tail call i32 @ZowiTone(i32 10, double 1.046500e+03, i32 10, i32 10)
%32 = tail call i32 @ZowiTone(i32 10, double 1.046500e+03, i32 10, i32 10)
%33 = tail call i32 @ZowiTone(i32 10, double 1.046500e+03, i32 10, i32 10)
ret void
}