#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 */
typedef scalar_t__ clock_t;

/* Variables and functions */
float CLOCKS_PER_SEC;
scalar_t__ clock();
int /*<<< orphan*/ countTimeThreadRun(int, unsigned long long);
int /*<<< orphan*/ printf(char *, float);
int /*<<< orphan*/ sscanf(char *, char *, ...);
int main(int argc, char **argv) {
  char buff[100];
  int numThread = 0;
  unsigned long long numRound = 0;
  sscanf(argv[1], "%d", &numThread);
  sscanf(argv[2], "%ld", &numRound);
  clock_t ckc = clock();
  countTimeThreadRun(numThread, numRound);
  ckc = clock() - ckc;
  printf("time : %f \n", ((float)ckc) / CLOCKS_PER_SEC);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0xa0,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x0,-0x84(%rbp)
movq   $0x0,-0x90(%rbp)
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
lea    0xe83(%rip),%rsi
lea    -0x84(%rbp),%rdx
mov    $0x0,%al
call   1060 <sscanf@plt>
mov    -0x10(%rbp),%rax
mov    0x10(%rax),%rdi
lea    0xe69(%rip),%rsi
lea    -0x90(%rbp),%rdx
mov    $0x0,%al
call   1060 <sscanf@plt>
mov    $0x0,%al
call   1030 <clock@plt>
mov    %rax,-0x98(%rbp)
mov    -0x84(%rbp),%edi
mov    -0x90(%rbp),%rsi
call   1050 <countTimeThreadRun@plt>
mov    $0x0,%al
call   1030 <clock@plt>
sub    -0x98(%rbp),%rax
mov    %rax,-0x98(%rbp)
cvtsi2ssq -0x98(%rbp),%xmm0
ff ff
mov    0x2dfb(%rip),%rax
divss  (%rax),%xmm0
lea    0xe0f(%rip),%rdi
call   1040 <printf@plt>
xor    %eax,%eax
add    $0xa0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x10,%rsp
mov    %rsi,%rbx
movl   $0x0,0x4(%rsp)
movq   $0x0,0x8(%rsp)
mov    0x8(%rsi),%rdi
lea    0xe9c(%rip),%rsi
lea    0x4(%rsp),%rdx
xor    %eax,%eax
call   1060 <sscanf@plt>
mov    0x10(%rbx),%rdi
lea    0xe88(%rip),%rsi
lea    0x8(%rsp),%rdx
xor    %eax,%eax
call   1060 <sscanf@plt>
xor    %eax,%eax
call   1030 <clock@plt>
mov    %rax,%rbx
mov    0x4(%rsp),%edi
mov    0x8(%rsp),%rsi
call   1050 <countTimeThreadRun@plt>
xor    %eax,%eax
call   1030 <clock@plt>
sub    %rbx,%rax
cvtsi2ss %rax,%xmm0
mov    0x2e33(%rip),%rax
divss  (%rax),%xmm0
lea    0xe47(%rip),%rdi
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@.str = [3 x i8] c"%d\00"
@.str.1 = [4 x i8] c"%ld\00"
@.str.2 = [12 x i8] c"time : %f \0A\00"
@CLOCKS_PER_SEC = global float 0.000000e+00
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca [100 x i8]
%7 = alloca i32
%8 = alloca i64
%9 = alloca i64
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
store i32 0, i32* %7
store i64 0, i64* %8
%10 = load i8**, i8*** %5
%11 = getelementptr inbounds i8*, i8** %10, i64 1
%12 = load i8*, i8** %11
%13 = call i32 (i8*, i8*, ...) @sscanf(i8* %12, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %7)
%14 = load i8**, i8*** %5
%15 = getelementptr inbounds i8*, i8** %14, i64 2
%16 = load i8*, i8** %15
%17 = call i32 (i8*, i8*, ...) @sscanf(i8* %16, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i64* %8)
%18 = call i64 (...) @clock()
store i64 %18, i64* %9
%19 = load i32, i32* %7
%20 = load i64, i64* %8
%21 = call i32 @countTimeThreadRun(i32 %19, i64 %20)
%22 = call i64 (...) @clock()
%23 = load i64, i64* %9
%24 = sub nsw i64 %22, %23
store i64 %24, i64* %9
%25 = load i64, i64* %9
%26 = sitofp i64 %25 to float
%27 = load float, float* @CLOCKS_PER_SEC
%28 = fdiv float %26, %27
%29 = call i32 @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.2, i64 0, i64 0), float %28)
ret i32 0
}

LLVM IR (-O2):
@.str = [3 x i8] c"%d\00"
@.str.1 = [4 x i8] c"%ld\00"
@.str.2 = [12 x i8] c"time : %f \0A\00"
@CLOCKS_PER_SEC = global float 0.000000e+00
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = alloca i32
%4 = alloca i64
%5 = bitcast i32* %3 to i8*
store i32 0, i32* %3
%6 = bitcast i64* %4 to i8*
store i64 0, i64* %4
%7 = getelementptr inbounds i8*, i8** %1, i64 1
%8 = load i8*, i8** %7
%9 = call i32 (i8*, i8*, ...) @sscanf(i8* %8, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %3)
%10 = getelementptr inbounds i8*, i8** %1, i64 2
%11 = load i8*, i8** %10
%12 = call i32 (i8*, i8*, ...) @sscanf(i8* %11, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i64* %4)
%13 = call i64 (...) @clock()
%14 = load i32, i32* %3
%15 = load i64, i64* %4
%16 = call i32 @countTimeThreadRun(i32 %14, i64 %15)
%17 = call i64 (...) @clock()
%18 = sub nsw i64 %17, %13
%19 = sitofp i64 %18 to float
%20 = load float, float* @CLOCKS_PER_SEC
%21 = fdiv float %19, %20
%22 = call i32 @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.2, i64 0, i64 0), float %21)
ret i32 0
}