#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_question() {
  ZowiTone(10, 523.25, 100, 100);
  for (int i = 523.25; i < 783.99; i = i * 1.02) {
    ZowiTone(10, i, 12, 0);
  }
  delay(20);
  ZowiTone(10, 783.99, 100, 50);
  for (int i = 523.25; i > 523.25; i = i / 1.02) {
    ZowiTone(10, i, 12, 0);
  }
  delay(30);
  for (int i = 783.99; i > 392; i = i / 1.02) {
    ZowiTone(10, i, 12, 0);
  }
  delay(20);
  ZowiTone(10, 392, 100, 50);
  for (int i = 392; i < 783.99; i = i * 1.02) {
    ZowiTone(10, i, 10, 0);
  }
}


x86 assembly (clang, -O0):
<S_question>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0xa,%edi
mov    $0x20b,%esi
mov    $0x64,%ecx
mov    %ecx,%edx
call   1030 <ZowiTone@plt>
movl   $0x20b,-0x4(%rbp)
cvtsi2sdl -0x4(%rbp),%xmm1
movsd  0xeae(%rip),%xmm0
ucomisd %xmm1,%xmm0
jbe    118d <S_question+0x6d>
mov    -0x4(%rbp),%esi
mov    $0xa,%edi
mov    $0xc,%edx
xor    %ecx,%ecx
call   1030 <ZowiTone@plt>
cvtsi2sdl -0x4(%rbp),%xmm0
movsd  0xe93(%rip),%xmm1
mulsd  %xmm1,%xmm0
cvttsd2si %xmm0,%eax
mov    %eax,-0x4(%rbp)
jmp    1145 <S_question+0x25>
mov    $0x14,%edi
call   1040 <delay@plt>
mov    $0xa,%edi
mov    $0x30f,%esi
mov    $0x64,%edx
mov    $0x32,%ecx
call   1030 <ZowiTone@plt>
movl   $0x20b,-0x8(%rbp)
cvtsi2sdl -0x8(%rbp),%xmm0
movsd  0xe44(%rip),%xmm1
ucomisd %xmm1,%xmm0
jbe    11ff <S_question+0xdf>
mov    -0x8(%rbp),%esi
mov    $0xa,%edi
mov    $0xc,%edx
xor    %ecx,%ecx
call   1030 <ZowiTone@plt>
cvtsi2sdl -0x8(%rbp),%xmm0
movsd  0xe21(%rip),%xmm1
divsd  %xmm1,%xmm0
cvttsd2si %xmm0,%eax
mov    %eax,-0x8(%rbp)
jmp    11b7 <S_question+0x97>
mov    $0x1e,%edi
call   1040 <delay@plt>
movl   $0x30f,-0xc(%rbp)
cmpl   $0x188,-0xc(%rbp)
jle    124e <S_question+0x12e>
mov    -0xc(%rbp),%esi
mov    $0xa,%edi
mov    $0xc,%edx
xor    %ecx,%ecx
call   1030 <ZowiTone@plt>
cvtsi2sdl -0xc(%rbp),%xmm0
movsd  0xdd2(%rip),%xmm1
divsd  %xmm1,%xmm0
cvttsd2si %xmm0,%eax
mov    %eax,-0xc(%rbp)
jmp    1210 <S_question+0xf0>
mov    $0x14,%edi
call   1040 <delay@plt>
mov    $0xa,%edi
mov    $0x188,%esi
mov    $0x64,%edx
mov    $0x32,%ecx
call   1030 <ZowiTone@plt>
movl   $0x188,-0x10(%rbp)
cvtsi2sdl -0x10(%rbp),%xmm1
movsd  0xd7b(%rip),%xmm0
ucomisd %xmm1,%xmm0
jbe    12bd <S_question+0x19d>
mov    -0x10(%rbp),%esi
mov    $0xa,%edx
xor    %ecx,%ecx
mov    %edx,%edi
call   1030 <ZowiTone@plt>
cvtsi2sdl -0x10(%rbp),%xmm0
movsd  0xd63(%rip),%xmm1
mulsd  %xmm1,%xmm0
cvttsd2si %xmm0,%eax
mov    %eax,-0x10(%rbp)
jmp    1278 <S_question+0x158>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<S_question>:
push   %rbx
sub    $0x10,%rsp
mov    $0x20b,%ebx
mov    $0xa,%edi
mov    $0x20b,%esi
mov    $0x64,%edx
mov    $0x64,%ecx
call   1030 <ZowiTone@plt>
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
xorps  %xmm0,%xmm0
cvtsi2sd %ebx,%xmm0
movsd  %xmm0,0x8(%rsp)
mov    $0xa,%edi
mov    %ebx,%esi
mov    $0xc,%edx
xor    %ecx,%ecx
call   1030 <ZowiTone@plt>
movsd  0x8(%rsp),%xmm0
mulsd  0xe82(%rip),%xmm0
cvttsd2si %xmm0,%ebx
cmp    $0x310,%ebx
jl     1150 <S_question+0x30>
mov    $0x14,%edi
call   1040 <delay@plt>
mov    $0x30f,%ebx
mov    $0xa,%edi
mov    $0x30f,%esi
mov    $0x64,%edx
mov    $0x32,%ecx
call   1030 <ZowiTone@plt>
mov    $0x1e,%edi
call   1040 <delay@plt>
nopl   0x0(%rax)
mov    $0xa,%edi
mov    %ebx,%esi
mov    $0xc,%edx
xor    %ecx,%ecx
call   1030 <ZowiTone@plt>
xorps  %xmm0,%xmm0
cvtsi2sd %ebx,%xmm0
divsd  0xe1e(%rip),%xmm0
cvttsd2si %xmm0,%ebx
cmp    $0x188,%ebx
jg     11c0 <S_question+0xa0>
mov    $0x14,%edi
call   1040 <delay@plt>
mov    $0x188,%ebx
mov    $0xa,%edi
mov    $0x188,%esi
mov    $0x64,%edx
mov    $0x32,%ecx
call   1030 <ZowiTone@plt>
cs nopw 0x0(%rax,%rax,1)
xorps  %xmm0,%xmm0
cvtsi2sd %ebx,%xmm0
movsd  %xmm0,0x8(%rsp)
mov    $0xa,%edi
mov    %ebx,%esi
mov    $0xa,%edx
xor    %ecx,%ecx
call   1030 <ZowiTone@plt>
movsd  0x8(%rsp),%xmm0
mulsd  0xdb2(%rip),%xmm0
cvttsd2si %xmm0,%ebx
cmp    $0x310,%ebx
jl     1220 <S_question+0x100>
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
define void @S_question() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
%5 = call i32 @ZowiTone(i32 10, i32 523, i32 100, i32 100)
store i32 523, i32* %1
br label %6
6: ; preds = %13, %0
%7 = load i32, i32* %1
%8 = sitofp i32 %7 to double
%9 = fcmp olt double %8, 7.839900e+02
br i1 %9, label %10, label %18
10: ; preds = %6
%11 = load i32, i32* %1
%12 = call i32 @ZowiTone(i32 10, i32 %11, i32 12, i32 0)
br label %13
13: ; preds = %10
%14 = load i32, i32* %1
%15 = sitofp i32 %14 to double
%16 = fmul double %15, 1.020000e+00
%17 = fptosi double %16 to i32
store i32 %17, i32* %1
br label %6
18: ; preds = %6
%19 = call i32 @delay(i32 20)
%20 = call i32 @ZowiTone(i32 10, i32 783, i32 100, i32 50)
store i32 523, i32* %2
br label %21
21: ; preds = %28, %18
%22 = load i32, i32* %2
%23 = sitofp i32 %22 to double
%24 = fcmp ogt double %23, 5.232500e+02
br i1 %24, label %25, label %33
25: ; preds = %21
%26 = load i32, i32* %2
%27 = call i32 @ZowiTone(i32 10, i32 %26, i32 12, i32 0)
br label %28
28: ; preds = %25
%29 = load i32, i32* %2
%30 = sitofp i32 %29 to double
%31 = fdiv double %30, 1.020000e+00
%32 = fptosi double %31 to i32
store i32 %32, i32* %2
br label %21
33: ; preds = %21
%34 = call i32 @delay(i32 30)
store i32 783, i32* %3
br label %35
35: ; preds = %41, %33
%36 = load i32, i32* %3
%37 = icmp sgt i32 %36, 392
br i1 %37, label %38, label %46
38: ; preds = %35
%39 = load i32, i32* %3
%40 = call i32 @ZowiTone(i32 10, i32 %39, i32 12, i32 0)
br label %41
41: ; preds = %38
%42 = load i32, i32* %3
%43 = sitofp i32 %42 to double
%44 = fdiv double %43, 1.020000e+00
%45 = fptosi double %44 to i32
store i32 %45, i32* %3
br label %35
46: ; preds = %35
%47 = call i32 @delay(i32 20)
%48 = call i32 @ZowiTone(i32 10, i32 392, i32 100, i32 50)
store i32 392, i32* %4
br label %49
49: ; preds = %56, %46
%50 = load i32, i32* %4
%51 = sitofp i32 %50 to double
%52 = fcmp olt double %51, 7.839900e+02
br i1 %52, label %53, label %61
53: ; preds = %49
%54 = load i32, i32* %4
%55 = call i32 @ZowiTone(i32 10, i32 %54, i32 10, i32 0)
br label %56
56: ; preds = %53
%57 = load i32, i32* %4
%58 = sitofp i32 %57 to double
%59 = fmul double %58, 1.020000e+00
%60 = fptosi double %59 to i32
store i32 %60, i32* %4
br label %49
61: ; preds = %49
ret void
}

LLVM IR (-O2):
define void @S_question() {
%1 = tail call i32 @ZowiTone(i32 10, i32 523, i32 100, i32 100)
br label %6
2: ; preds = %6
%3 = tail call i32 @delay(i32 20)
%4 = tail call i32 @ZowiTone(i32 10, i32 783, i32 100, i32 50)
%5 = tail call i32 @delay(i32 30)
br label %16
6: ; preds = %0, %6
%7 = phi i32 [ 523, %0 ], [ %11, %6 ]
%8 = sitofp i32 %7 to double
%9 = tail call i32 @ZowiTone(i32 10, i32 %7, i32 12, i32 0)
%10 = fmul double %8, 1.020000e+00
%11 = fptosi double %10 to i32
%12 = icmp slt i32 %11, 784
br i1 %12, label %6, label %2
13: ; preds = %16
%14 = tail call i32 @delay(i32 20)
%15 = tail call i32 @ZowiTone(i32 10, i32 392, i32 100, i32 50)
br label %24
16: ; preds = %2, %16
%17 = phi i32 [ 783, %2 ], [ %21, %16 ]
%18 = tail call i32 @ZowiTone(i32 10, i32 %17, i32 12, i32 0)
%19 = sitofp i32 %17 to double
%20 = fdiv double %19, 1.020000e+00
%21 = fptosi double %20 to i32
%22 = icmp sgt i32 %21, 392
br i1 %22, label %16, label %13
23: ; preds = %24
ret void
24: ; preds = %13, %24
%25 = phi i32 [ 392, %13 ], [ %29, %24 ]
%26 = sitofp i32 %25 to double
%27 = tail call i32 @ZowiTone(i32 10, i32 %25, i32 10, i32 0)
%28 = fmul double %26, 1.020000e+00
%29 = fptosi double %28 to i32
%30 = icmp slt i32 %29, 784
br i1 %30, label %24, label %23
}