#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*/ convert_frame_nums(int, int, int, int, int);
int /*<<< orphan*/ krad_system_init();
int /*<<< orphan*/ printk(char *);
int main(int argc, char *argv[]) {
  krad_system_init();
  convert_frame_nums(60, 24000, 1000, 30000, 1000);
  convert_frame_nums(60, 30000, 1000, 24000, 1000);
  convert_frame_nums(60, 24000, 1000, 60000, 1000);
  convert_frame_nums(60, 60000, 1000, 30000, 1000);
  printk("Clean Exit");
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    $0x0,%al
call   1050 <krad_system_init@plt>
mov    $0x3c,%edi
mov    $0x5dc0,%esi
mov    $0x3e8,%r8d
mov    $0x7530,%ecx
mov    %r8d,%edx
call   1040 <convert_frame_nums@plt>
mov    $0x3c,%edi
mov    $0x7530,%esi
mov    $0x3e8,%r8d
mov    $0x5dc0,%ecx
mov    %r8d,%edx
call   1040 <convert_frame_nums@plt>
mov    $0x3c,%edi
mov    $0x5dc0,%esi
mov    $0x3e8,%r8d
mov    $0xea60,%ecx
mov    %r8d,%edx
call   1040 <convert_frame_nums@plt>
mov    $0x3c,%edi
mov    $0xea60,%esi
mov    $0x3e8,%r8d
mov    $0x7530,%ecx
mov    %r8d,%edx
call   1040 <convert_frame_nums@plt>
lea    0xe38(%rip),%rdi
call   1030 <printk@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1050 <krad_system_init@plt>
mov    $0x3c,%edi
mov    $0x5dc0,%esi
mov    $0x3e8,%edx
mov    $0x7530,%ecx
mov    $0x3e8,%r8d
call   1040 <convert_frame_nums@plt>
mov    $0x3c,%edi
mov    $0x7530,%esi
mov    $0x3e8,%edx
mov    $0x5dc0,%ecx
mov    $0x3e8,%r8d
call   1040 <convert_frame_nums@plt>
mov    $0x3c,%edi
mov    $0x5dc0,%esi
mov    $0x3e8,%edx
mov    $0xea60,%ecx
mov    $0x3e8,%r8d
call   1040 <convert_frame_nums@plt>
mov    $0x3c,%edi
mov    $0xea60,%esi
mov    $0x3e8,%edx
mov    $0x7530,%ecx
mov    $0x3e8,%r8d
call   1040 <convert_frame_nums@plt>
lea    0xe45(%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**
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%6 = call i32 (...) @krad_system_init()
%7 = call i32 @convert_frame_nums(i32 60, i32 24000, i32 1000, i32 30000, i32 1000)
%8 = call i32 @convert_frame_nums(i32 60, i32 30000, i32 1000, i32 24000, i32 1000)
%9 = call i32 @convert_frame_nums(i32 60, i32 24000, i32 1000, i32 60000, i32 1000)
%10 = call i32 @convert_frame_nums(i32 60, i32 60000, i32 1000, i32 30000, i32 1000)
%11 = 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 @convert_frame_nums(i32 60, i32 24000, i32 1000, i32 30000, i32 1000)
%5 = tail call i32 @convert_frame_nums(i32 60, i32 30000, i32 1000, i32 24000, i32 1000)
%6 = tail call i32 @convert_frame_nums(i32 60, i32 24000, i32 1000, i32 60000, i32 1000)
%7 = tail call i32 @convert_frame_nums(i32 60, i32 60000, i32 1000, i32 30000, i32 1000)
%8 = tail call i32 @printk(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0))
ret i32 0
}