#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*/ krad_system_init();
int /*<<< orphan*/ krad_ticker_test(int, int, int);
int /*<<< orphan*/ printk(char *);
int main(int argc, char *argv[]) {
  int count;
  count = 300;
  krad_system_init();
  krad_ticker_test(count, 30000, 1000);
  krad_ticker_test(count, 44100, 512);
  krad_ticker_test(count, 44100, 1024);
  krad_ticker_test(count, 48000, 1024);
  krad_ticker_test(count, 60000, 1000);
  printk("Clean Exit");
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x12c,-0x14(%rbp)
mov    $0x0,%al
call   1050 <krad_system_init@plt>
mov    -0x14(%rbp),%edi
mov    $0x7530,%esi
mov    $0x3e8,%edx
call   1040 <krad_ticker_test@plt>
mov    -0x14(%rbp),%edi
mov    $0xac44,%esi
mov    $0x200,%edx
call   1040 <krad_ticker_test@plt>
mov    -0x14(%rbp),%edi
mov    $0xac44,%esi
mov    $0x400,%edx
call   1040 <krad_ticker_test@plt>
mov    -0x14(%rbp),%edi
mov    $0xbb80,%esi
mov    $0x400,%edx
call   1040 <krad_ticker_test@plt>
mov    -0x14(%rbp),%edi
mov    $0xea60,%esi
mov    $0x3e8,%edx
call   1040 <krad_ticker_test@plt>
lea    0xe4b(%rip),%rdi
call   1030 <printk@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1050 <krad_system_init@plt>
mov    $0x12c,%edi
mov    $0x7530,%esi
mov    $0x3e8,%edx
call   1040 <krad_ticker_test@plt>
mov    $0x12c,%edi
mov    $0xac44,%esi
mov    $0x200,%edx
call   1040 <krad_ticker_test@plt>
mov    $0x12c,%edi
mov    $0xac44,%esi
mov    $0x400,%edx
call   1040 <krad_ticker_test@plt>
mov    $0x12c,%edi
mov    $0xbb80,%esi
mov    $0x400,%edx
call   1040 <krad_ticker_test@plt>
mov    $0x12c,%edi
mov    $0xea60,%esi
mov    $0x3e8,%edx
call   1040 <krad_ticker_test@plt>
lea    0xe5d(%rip),%rdi
call   1030 <printk@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [11 x i8] c"Clean Exit\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i32
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
store i32 300, i32* %6
%7 = call i32 (...) @krad_system_init()
%8 = load i32, i32* %6
%9 = call i32 @krad_ticker_test(i32 %8, i32 30000, i32 1000)
%10 = load i32, i32* %6
%11 = call i32 @krad_ticker_test(i32 %10, i32 44100, i32 512)
%12 = load i32, i32* %6
%13 = call i32 @krad_ticker_test(i32 %12, i32 44100, i32 1024)
%14 = load i32, i32* %6
%15 = call i32 @krad_ticker_test(i32 %14, i32 48000, i32 1024)
%16 = load i32, i32* %6
%17 = call i32 @krad_ticker_test(i32 %16, i32 60000, i32 1000)
%18 = call i32 @printk(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@.str = [11 x i8] c"Clean Exit\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 (...) @krad_system_init()
%4 = tail call i32 @krad_ticker_test(i32 300, i32 30000, i32 1000)
%5 = tail call i32 @krad_ticker_test(i32 300, i32 44100, i32 512)
%6 = tail call i32 @krad_ticker_test(i32 300, i32 44100, i32 1024)
%7 = tail call i32 @krad_ticker_test(i32 300, i32 48000, i32 1024)
%8 = tail call i32 @krad_ticker_test(i32 300, i32 60000, i32 1000)
%9 = tail call i32 @printk(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0))
ret i32 0
}