#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);
int /*<<< orphan*/ delay(int);
void S_buttonPushed() {
  for (int i = 1318.51; i < 1567.98; i = i * 1.03) {
    ZowiTone(10, i, 20, 2);
  }
  delay(30);
  for (int i = 1318.51; i < 2349.32; i = i * 1.04) {
    ZowiTone(10, i, 10, 2);
  }
}


x86 assembly (clang, -O0):
<S_buttonPushed>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x526,-0x4(%rbp)
cvtsi2sdl -0x4(%rbp),%xmm1
movsd  0xec4(%rip),%xmm0
ucomisd %xmm1,%xmm0
jbe    117a <S_buttonPushed+0x5a>
mov    -0x4(%rbp),%esi
mov    $0xa,%edi
mov    $0x14,%edx
mov    $0x2,%ecx
call   1030 <ZowiTone@plt>
cvtsi2sdl -0x4(%rbp),%xmm0
movsd  0xeae(%rip),%xmm1
mulsd  %xmm1,%xmm0
cvttsd2si %xmm0,%eax
mov    %eax,-0x4(%rbp)
jmp    112f <S_buttonPushed+0xf>
mov    $0x1e,%edi
call   1040 <delay@plt>
movl   $0x526,-0x8(%rbp)
cvtsi2sdl -0x8(%rbp),%xmm1
movsd  0xe70(%rip),%xmm0
ucomisd %xmm1,%xmm0
jbe    11d3 <S_buttonPushed+0xb3>
mov    -0x8(%rbp),%esi
mov    $0xa,%edx
mov    $0x2,%ecx
mov    %edx,%edi
call   1030 <ZowiTone@plt>
cvtsi2sdl -0x8(%rbp),%xmm0
movsd  0xe4d(%rip),%xmm1
mulsd  %xmm1,%xmm0
cvttsd2si %xmm0,%eax
mov    %eax,-0x8(%rbp)
jmp    118b <S_buttonPushed+0x6b>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<S_buttonPushed>:
push   %rax
mov    $0xa,%edi
mov    $0x526,%esi
mov    $0x14,%edx
mov    $0x2,%ecx
call   1030 <ZowiTone@plt>
mov    $0xa,%edi
mov    $0x54d,%esi
mov    $0x14,%edx
mov    $0x2,%ecx
call   1030 <ZowiTone@plt>
mov    $0xa,%edi
mov    $0x575,%esi
mov    $0x14,%edx
mov    $0x2,%ecx
call   1030 <ZowiTone@plt>
mov    $0xa,%edi
mov    $0x59e,%esi
mov    $0x14,%edx
mov    $0x2,%ecx
call   1030 <ZowiTone@plt>
mov    $0xa,%edi
mov    $0x5c9,%esi
mov    $0x14,%edx
mov    $0x2,%ecx
call   1030 <ZowiTone@plt>
mov    $0xa,%edi
mov    $0x5f5,%esi
mov    $0x14,%edx
mov    $0x2,%ecx
call   1030 <ZowiTone@plt>
mov    $0x1e,%edi
call   1040 <delay@plt>
mov    $0xa,%edi
mov    $0x526,%esi
mov    $0xa,%edx
mov    $0x2,%ecx
call   1030 <ZowiTone@plt>
mov    $0xa,%edi
mov    $0x55a,%esi
mov    $0xa,%edx
mov    $0x2,%ecx
call   1030 <ZowiTone@plt>
mov    $0xa,%edi
mov    $0x590,%esi
mov    $0xa,%edx
mov    $0x2,%ecx
call   1030 <ZowiTone@plt>
mov    $0xa,%edi
mov    $0x5c8,%esi
mov    $0xa,%edx
mov    $0x2,%ecx
call   1030 <ZowiTone@plt>
mov    $0xa,%edi
mov    $0x603,%esi
mov    $0xa,%edx
mov    $0x2,%ecx
call   1030 <ZowiTone@plt>
mov    $0xa,%edi
mov    $0x640,%esi
mov    $0xa,%edx
mov    $0x2,%ecx
call   1030 <ZowiTone@plt>
mov    $0xa,%edi
mov    $0x680,%esi
mov    $0xa,%edx
mov    $0x2,%ecx
call   1030 <ZowiTone@plt>
mov    $0xa,%edi
mov    $0x6c2,%esi
mov    $0xa,%edx
mov    $0x2,%ecx
call   1030 <ZowiTone@plt>
mov    $0xa,%edi
mov    $0x707,%esi
mov    $0xa,%edx
mov    $0x2,%ecx
call   1030 <ZowiTone@plt>
mov    $0xa,%edi
mov    $0x74e,%esi
mov    $0xa,%edx
mov    $0x2,%ecx
call   1030 <ZowiTone@plt>
mov    $0xa,%edi
mov    $0x798,%esi
mov    $0xa,%edx
mov    $0x2,%ecx
call   1030 <ZowiTone@plt>
mov    $0xa,%edi
mov    $0x7e5,%esi
mov    $0xa,%edx
mov    $0x2,%ecx
call   1030 <ZowiTone@plt>
mov    $0xa,%edi
mov    $0x835,%esi
mov    $0xa,%edx
mov    $0x2,%ecx
call   1030 <ZowiTone@plt>
mov    $0xa,%edi
mov    $0x889,%esi
mov    $0xa,%edx
mov    $0x2,%ecx
call   1030 <ZowiTone@plt>
mov    $0xa,%edi
mov    $0x8e0,%esi
mov    $0xa,%edx
mov    $0x2,%ecx
pop    %rax
jmp    1030 <ZowiTone@plt>

LLVM IR (-O0):
define void @S_buttonPushed() {
%1 = alloca i32
%2 = alloca i32
store i32 1318, i32* %1
br label %3
3: ; preds = %10, %0
%4 = load i32, i32* %1
%5 = sitofp i32 %4 to double
%6 = fcmp olt double %5, 1.567980e+03
br i1 %6, label %7, label %15
7: ; preds = %3
%8 = load i32, i32* %1
%9 = call i32 @ZowiTone(i32 10, i32 %8, i32 20, i32 2)
br label %10
10: ; preds = %7
%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 30)
store i32 1318, i32* %2
br label %17
17: ; preds = %24, %15
%18 = load i32, i32* %2
%19 = sitofp i32 %18 to double
%20 = fcmp olt double %19, 2.349320e+03
br i1 %20, label %21, label %29
21: ; preds = %17
%22 = load i32, i32* %2
%23 = call i32 @ZowiTone(i32 10, i32 %22, i32 10, i32 2)
br label %24
24: ; preds = %21
%25 = load i32, i32* %2
%26 = sitofp i32 %25 to double
%27 = fmul double %26, 1.040000e+00
%28 = fptosi double %27 to i32
store i32 %28, i32* %2
br label %17
29: ; preds = %17
ret void
}

LLVM IR (-O2):
define void @S_buttonPushed() {
%1 = tail call i32 @ZowiTone(i32 10, i32 1318, i32 20, i32 2)
%2 = tail call i32 @ZowiTone(i32 10, i32 1357, i32 20, i32 2)
%3 = tail call i32 @ZowiTone(i32 10, i32 1397, i32 20, i32 2)
%4 = tail call i32 @ZowiTone(i32 10, i32 1438, i32 20, i32 2)
%5 = tail call i32 @ZowiTone(i32 10, i32 1481, i32 20, i32 2)
%6 = tail call i32 @ZowiTone(i32 10, i32 1525, i32 20, i32 2)
%7 = tail call i32 @delay(i32 30)
%8 = tail call i32 @ZowiTone(i32 10, i32 1318, i32 10, i32 2)
%9 = tail call i32 @ZowiTone(i32 10, i32 1370, i32 10, i32 2)
%10 = tail call i32 @ZowiTone(i32 10, i32 1424, i32 10, i32 2)
%11 = tail call i32 @ZowiTone(i32 10, i32 1480, i32 10, i32 2)
%12 = tail call i32 @ZowiTone(i32 10, i32 1539, i32 10, i32 2)
%13 = tail call i32 @ZowiTone(i32 10, i32 1600, i32 10, i32 2)
%14 = tail call i32 @ZowiTone(i32 10, i32 1664, i32 10, i32 2)
%15 = tail call i32 @ZowiTone(i32 10, i32 1730, i32 10, i32 2)
%16 = tail call i32 @ZowiTone(i32 10, i32 1799, i32 10, i32 2)
%17 = tail call i32 @ZowiTone(i32 10, i32 1870, i32 10, i32 2)
%18 = tail call i32 @ZowiTone(i32 10, i32 1944, i32 10, i32 2)
%19 = tail call i32 @ZowiTone(i32 10, i32 2021, i32 10, i32 2)
%20 = tail call i32 @ZowiTone(i32 10, i32 2101, i32 10, i32 2)
%21 = tail call i32 @ZowiTone(i32 10, i32 2185, i32 10, i32 2)
%22 = tail call i32 @ZowiTone(i32 10, i32 2272, i32 10, i32 2)
ret void
}