#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__ uint64_t;
typedef int /*<<< orphan*/ uint32_t;

/* Variables and functions */
int /*<<< orphan*/ __cpuid(int /*<<< orphan*/, int /*<<< orphan*/,
                           int /*<<< orphan*/, int /*<<< orphan*/,
                           int /*<<< orphan*/);
scalar_t__ _rdtsc();
unsigned int bit_div3(int);
unsigned int bit_div7(int);
unsigned int div3(int);
unsigned int div7(int);
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ leftshift();
int /*<<< orphan*/ mul();
int /*<<< orphan*/ printf(char *, ...);
int main(void) {
  int x = 0;
  uint32_t a = 0, b = 0, c = 0, d = 0;
  register uint64_t y = 0;
  x = 0;
  do {
    __cpuid(0, a, b, c, d);
    y = _rdtsc();
    leftshift();
    y = _rdtsc() - y;
  } while (++x < 2);
  printf("::: left shift: %s  %lld %s cicles\n", "\033[22;31m", y, "\033[0m");
  x = 0;
  do {
    __cpuid(0, a, b, c, d);
    y = _rdtsc();
    mul();
    y = _rdtsc() - y;
  } while (++x < 2);
  printf("::: mul: %s %lld %s cicles\n", "\033[22;31m", y, "\033[0m");
  unsigned int z = 0;
  x = 0;
  do {
    __cpuid(0, a, b, c, d);
    y = _rdtsc();
    z = div7(560000 * x);
    printf("result: %d\n", z);
    y = _rdtsc() - y;
  } while (++x < 2);
  printf("::: div7: %s %lld %s cicles\n", "\033[22;31m", y, "\033[0m");
  z = 0;
  x = 0;
  do {
    __cpuid(0, a, b, c, d);
    y = _rdtsc();
    z = bit_div7(560000 * x);
    printf("result: %d\n", z);
    y = _rdtsc() - y;
  } while (++x < 2);
  printf("::: bit_div7:  %s %lld %s cicles\n", "\033[22;31m", y, "\033[0m");
  x = 0;
  do {
    __cpuid(0, a, b, c, d);
    y = _rdtsc();
    z = div3(560000 * x);
    printf("result: %d\n", z);
    y = _rdtsc() - y;
  } while (++x < 2);
  printf("::: div3:  %s %lld %s cicles\n", "\033[22;31m", y, "\033[0m");
  z = 0;
  x = 0;
  do {
    __cpuid(0, a, b, c, d);
    y = _rdtsc();
    z = bit_div3(560000 * x);
    printf("result: %d\n", z);
    y = _rdtsc() - y;
  } while (++x < 2);
  printf("::: bit_div3:  %s %lld %s cicles\n", "\033[22;31m", y, "\033[0m");
  exit(0);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
movl   $0x0,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
movl   $0x0,-0x18(%rbp)
movq   $0x0,-0x20(%rbp)
movl   $0x0,-0x8(%rbp)
mov    -0xc(%rbp),%esi
mov    -0x10(%rbp),%edx
mov    -0x14(%rbp),%ecx
mov    -0x18(%rbp),%r8d
xor    %edi,%edi
call   1070 <__cpuid@plt>
mov    $0x0,%al
call   1090 <_rdtsc@plt>
mov    %rax,-0x20(%rbp)
mov    $0x0,%al
call   1030 <leftshift@plt>
mov    $0x0,%al
call   1090 <_rdtsc@plt>
sub    -0x20(%rbp),%rax
mov    %rax,-0x20(%rbp)
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
cmp    $0x2,%eax
jl     11e1 <main+0x41>
mov    -0x20(%rbp),%rdx
lea    0xdcd(%rip),%rdi
lea    0xdea(%rip),%rsi
lea    0xdec(%rip),%rcx
mov    $0x0,%al
call   1040 <printf@plt>
movl   $0x0,-0x8(%rbp)
mov    -0xc(%rbp),%esi
mov    -0x10(%rbp),%edx
mov    -0x14(%rbp),%ecx
mov    -0x18(%rbp),%r8d
xor    %edi,%edi
call   1070 <__cpuid@plt>
mov    $0x0,%al
call   1090 <_rdtsc@plt>
mov    %rax,-0x20(%rbp)
mov    $0x0,%al
call   10b0 <mul@plt>
mov    $0x0,%al
call   1090 <_rdtsc@plt>
sub    -0x20(%rbp),%rax
mov    %rax,-0x20(%rbp)
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
cmp    $0x2,%eax
jl     124f <main+0xaf>
mov    -0x20(%rbp),%rdx
lea    0xd91(%rip),%rdi
lea    0xd7c(%rip),%rsi
lea    0xd7e(%rip),%rcx
mov    $0x0,%al
call   1040 <printf@plt>
movl   $0x0,-0x24(%rbp)
movl   $0x0,-0x8(%rbp)
mov    -0xc(%rbp),%esi
mov    -0x10(%rbp),%edx
mov    -0x14(%rbp),%ecx
mov    -0x18(%rbp),%r8d
xor    %edi,%edi
call   1070 <__cpuid@plt>
mov    $0x0,%al
call   1090 <_rdtsc@plt>
mov    %rax,-0x20(%rbp)
imul   $0x88b80,-0x8(%rbp),%edi
call   1050 <div7@plt>
mov    %eax,-0x24(%rbp)
mov    -0x24(%rbp),%esi
lea    0xd52(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    $0x0,%al
call   1090 <_rdtsc@plt>
sub    -0x20(%rbp),%rax
mov    %rax,-0x20(%rbp)
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
cmp    $0x2,%eax
jl     12c4 <main+0x124>
mov    -0x20(%rbp),%rdx
lea    0xd2b(%rip),%rdi
lea    0xcee(%rip),%rsi
lea    0xcf0(%rip),%rcx
mov    $0x0,%al
call   1040 <printf@plt>
movl   $0x0,-0x24(%rbp)
movl   $0x0,-0x8(%rbp)
mov    -0xc(%rbp),%esi
mov    -0x10(%rbp),%edx
mov    -0x14(%rbp),%ecx
mov    -0x18(%rbp),%r8d
xor    %edi,%edi
call   1070 <__cpuid@plt>
mov    $0x0,%al
call   1090 <_rdtsc@plt>
mov    %rax,-0x20(%rbp)
imul   $0x88b80,-0x8(%rbp),%edi
call   1060 <bit_div7@plt>
mov    %eax,-0x24(%rbp)
mov    -0x24(%rbp),%esi
lea    0xcc4(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    $0x0,%al
call   1090 <_rdtsc@plt>
sub    -0x20(%rbp),%rax
mov    %rax,-0x20(%rbp)
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
cmp    $0x2,%eax
jl     1352 <main+0x1b2>
mov    -0x20(%rbp),%rdx
lea    0xcba(%rip),%rdi
lea    0xc60(%rip),%rsi
lea    0xc62(%rip),%rcx
mov    $0x0,%al
call   1040 <printf@plt>
movl   $0x0,-0x8(%rbp)
mov    -0xc(%rbp),%esi
mov    -0x10(%rbp),%edx
mov    -0x14(%rbp),%ecx
mov    -0x18(%rbp),%r8d
xor    %edi,%edi
call   1070 <__cpuid@plt>
mov    $0x0,%al
call   1090 <_rdtsc@plt>
mov    %rax,-0x20(%rbp)
imul   $0x88b80,-0x8(%rbp),%edi
call   10a0 <div3@plt>
mov    %eax,-0x24(%rbp)
mov    -0x24(%rbp),%esi
lea    0xc3d(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    $0x0,%al
call   1090 <_rdtsc@plt>
sub    -0x20(%rbp),%rax
mov    %rax,-0x20(%rbp)
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
cmp    $0x2,%eax
jl     13d9 <main+0x239>
mov    -0x20(%rbp),%rdx
lea    0xc55(%rip),%rdi
lea    0xbd9(%rip),%rsi
lea    0xbdb(%rip),%rcx
mov    $0x0,%al
call   1040 <printf@plt>
movl   $0x0,-0x24(%rbp)
movl   $0x0,-0x8(%rbp)
mov    -0xc(%rbp),%esi
mov    -0x10(%rbp),%edx
mov    -0x14(%rbp),%ecx
mov    -0x18(%rbp),%r8d
xor    %edi,%edi
call   1070 <__cpuid@plt>
mov    $0x0,%al
call   1090 <_rdtsc@plt>
mov    %rax,-0x20(%rbp)
imul   $0x88b80,-0x8(%rbp),%edi
call   1080 <bit_div3@plt>
mov    %eax,-0x24(%rbp)
mov    -0x24(%rbp),%esi
lea    0xbaf(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    $0x0,%al
call   1090 <_rdtsc@plt>
sub    -0x20(%rbp),%rax
mov    %rax,-0x20(%rbp)
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
cmp    $0x2,%eax
jl     1467 <main+0x2c7>
mov    -0x20(%rbp),%rdx
lea    0xbe5(%rip),%rdi
lea    0xb4b(%rip),%rsi
lea    0xb4d(%rip),%rcx
mov    $0x0,%al
call   1040 <printf@plt>
xor    %edi,%edi
call   10c0 <exit@plt>

x86 assembly (clang, -O2):
<main>:
push   %r15
push   %r14
push   %r12
push   %rbx
push   %rax
xor    %edi,%edi
xor    %esi,%esi
xor    %edx,%edx
xor    %ecx,%ecx
xor    %r8d,%r8d
call   1070 <__cpuid@plt>
xor    %eax,%eax
call   1090 <_rdtsc@plt>
xor    %eax,%eax
call   1030 <leftshift@plt>
xor    %eax,%eax
call   1090 <_rdtsc@plt>
xor    %edi,%edi
xor    %esi,%esi
xor    %edx,%edx
xor    %ecx,%ecx
xor    %r8d,%r8d
call   1070 <__cpuid@plt>
xor    %eax,%eax
call   1090 <_rdtsc@plt>
mov    %rax,%rbx
xor    %eax,%eax
call   1030 <leftshift@plt>
xor    %eax,%eax
call   1090 <_rdtsc@plt>
sub    %rbx,%rax
lea    0xe01(%rip),%rdi
lea    0xe1e(%rip),%r15
lea    0xe20(%rip),%r14
mov    %r15,%rsi
mov    %rax,%rdx
mov    %r14,%rcx
xor    %eax,%eax
call   1040 <printf@plt>
xor    %edi,%edi
xor    %esi,%esi
xor    %edx,%edx
xor    %ecx,%ecx
xor    %r8d,%r8d
call   1070 <__cpuid@plt>
xor    %eax,%eax
call   1090 <_rdtsc@plt>
xor    %eax,%eax
call   10b0 <mul@plt>
xor    %eax,%eax
call   1090 <_rdtsc@plt>
xor    %edi,%edi
xor    %esi,%esi
xor    %edx,%edx
xor    %ecx,%ecx
xor    %r8d,%r8d
call   1070 <__cpuid@plt>
xor    %eax,%eax
call   1090 <_rdtsc@plt>
mov    %rax,%rbx
xor    %eax,%eax
call   10b0 <mul@plt>
xor    %eax,%eax
call   1090 <_rdtsc@plt>
sub    %rbx,%rax
lea    0xdbe(%rip),%rdi
mov    %r15,%rsi
mov    %rax,%rdx
mov    %r14,%rcx
xor    %eax,%eax
call   1040 <printf@plt>
xor    %edi,%edi
xor    %esi,%esi
xor    %edx,%edx
xor    %ecx,%ecx
xor    %r8d,%r8d
call   1070 <__cpuid@plt>
xor    %eax,%eax
call   1090 <_rdtsc@plt>
xor    %edi,%edi
call   1050 <div7@plt>
lea    0xda5(%rip),%r12
mov    %r12,%rdi
mov    %eax,%esi
xor    %eax,%eax
call   1040 <printf@plt>
xor    %eax,%eax
call   1090 <_rdtsc@plt>
xor    %edi,%edi
xor    %esi,%esi
xor    %edx,%edx
xor    %ecx,%ecx
xor    %r8d,%r8d
call   1070 <__cpuid@plt>
xor    %eax,%eax
call   1090 <_rdtsc@plt>
mov    %rax,%rbx
mov    $0x88b80,%edi
call   1050 <div7@plt>
mov    %r12,%rdi
mov    %eax,%esi
xor    %eax,%eax
call   1040 <printf@plt>
xor    %eax,%eax
call   1090 <_rdtsc@plt>
sub    %rbx,%rax
lea    0xd5d(%rip),%rdi
mov    %r15,%rsi
mov    %rax,%rdx
mov    %r14,%rcx
xor    %eax,%eax
call   1040 <printf@plt>
xor    %edi,%edi
xor    %esi,%esi
xor    %edx,%edx
xor    %ecx,%ecx
xor    %r8d,%r8d
call   1070 <__cpuid@plt>
xor    %eax,%eax
call   1090 <_rdtsc@plt>
xor    %edi,%edi
call   1060 <bit_div7@plt>
mov    %r12,%rdi
mov    %eax,%esi
xor    %eax,%eax
call   1040 <printf@plt>
xor    %eax,%eax
call   1090 <_rdtsc@plt>
xor    %edi,%edi
xor    %esi,%esi
xor    %edx,%edx
xor    %ecx,%ecx
xor    %r8d,%r8d
call   1070 <__cpuid@plt>
xor    %eax,%eax
call   1090 <_rdtsc@plt>
mov    %rax,%rbx
mov    $0x88b80,%edi
call   1060 <bit_div7@plt>
mov    %r12,%rdi
mov    %eax,%esi
xor    %eax,%eax
call   1040 <printf@plt>
xor    %eax,%eax
call   1090 <_rdtsc@plt>
sub    %rbx,%rax
lea    0xcf8(%rip),%rdi
mov    %r15,%rsi
mov    %rax,%rdx
mov    %r14,%rcx
xor    %eax,%eax
call   1040 <printf@plt>
xor    %edi,%edi
xor    %esi,%esi
xor    %edx,%edx
xor    %ecx,%ecx
xor    %r8d,%r8d
call   1070 <__cpuid@plt>
xor    %eax,%eax
call   1090 <_rdtsc@plt>
xor    %edi,%edi
call   10a0 <div3@plt>
mov    %r12,%rdi
mov    %eax,%esi
xor    %eax,%eax
call   1040 <printf@plt>
xor    %eax,%eax
call   1090 <_rdtsc@plt>
xor    %edi,%edi
xor    %esi,%esi
xor    %edx,%edx
xor    %ecx,%ecx
xor    %r8d,%r8d
call   1070 <__cpuid@plt>
xor    %eax,%eax
call   1090 <_rdtsc@plt>
mov    %rax,%rbx
mov    $0x88b80,%edi
call   10a0 <div3@plt>
mov    %r12,%rdi
mov    %eax,%esi
xor    %eax,%eax
call   1040 <printf@plt>
xor    %eax,%eax
call   1090 <_rdtsc@plt>
sub    %rbx,%rax
lea    0xc98(%rip),%rdi
mov    %r15,%rsi
mov    %rax,%rdx
mov    %r14,%rcx
xor    %eax,%eax
call   1040 <printf@plt>
xor    %edi,%edi
xor    %esi,%esi
xor    %edx,%edx
xor    %ecx,%ecx
xor    %r8d,%r8d
call   1070 <__cpuid@plt>
xor    %eax,%eax
call   1090 <_rdtsc@plt>
xor    %edi,%edi
call   1080 <bit_div3@plt>
mov    %r12,%rdi
mov    %eax,%esi
xor    %eax,%eax
call   1040 <printf@plt>
xor    %eax,%eax
call   1090 <_rdtsc@plt>
xor    %edi,%edi
xor    %esi,%esi
xor    %edx,%edx
xor    %ecx,%ecx
xor    %r8d,%r8d
call   1070 <__cpuid@plt>
xor    %eax,%eax
call   1090 <_rdtsc@plt>
mov    %rax,%rbx
mov    $0x88b80,%edi
call   1080 <bit_div3@plt>
mov    %r12,%rdi
mov    %eax,%esi
xor    %eax,%eax
call   1040 <printf@plt>
xor    %eax,%eax
call   1090 <_rdtsc@plt>
sub    %rbx,%rax
lea    0xc34(%rip),%rdi
mov    %r15,%rsi
mov    %rax,%rdx
mov    %r14,%rcx
xor    %eax,%eax
call   1040 <printf@plt>
xor    %edi,%edi
call   10c0 <exit@plt>

LLVM IR (-O0):
@.str = [36 x i8] c"::: left shift: %s %lld %s cicles\0A\00"
@.str.1 = [9 x i8] c"\1B[22;31m\00"
@.str.2 = [5 x i8] c"\1B[0m\00"
@.str.3 = [28 x i8] c"::: mul: %s %lld %s cicles\0A\00"
@.str.4 = [12 x i8] c"result: %d\0A\00"
@.str.5 = [29 x i8] c"::: div7: %s %lld %s cicles\0A\00"
@.str.6 = [34 x i8] c"::: bit_div7: %s %lld %s cicles\0A\00"
@.str.7 = [30 x i8] c"::: div3: %s %lld %s cicles\0A\00"
@.str.8 = [34 x i8] c"::: bit_div3: %s %lld %s cicles\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
%7 = alloca i64
%8 = alloca i32
store i32 0, i32* %1
store i32 0, i32* %2
store i32 0, i32* %3
store i32 0, i32* %4
store i32 0, i32* %5
store i32 0, i32* %6
store i64 0, i64* %7
store i32 0, i32* %2
br label %9
9: ; preds = %20, %0
%10 = load i32, i32* %3
%11 = load i32, i32* %4
%12 = load i32, i32* %5
%13 = load i32, i32* %6
%14 = call i32 @__cpuid(i32 0, i32 %10, i32 %11, i32 %12, i32 %13)
%15 = call i64 (...) @_rdtsc()
store i64 %15, i64* %7
%16 = call i32 (...) @leftshift()
%17 = call i64 (...) @_rdtsc()
%18 = load i64, i64* %7
%19 = sub nsw i64 %17, %18
store i64 %19, i64* %7
br label %20
20: ; preds = %9
%21 = load i32, i32* %2
%22 = add nsw i32 %21, 1
store i32 %22, i32* %2
%23 = icmp slt i32 %22, 2
br i1 %23, label %9, label %24
24: ; preds = %20
%25 = load i64, i64* %7
%26 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.1, i64 0, i64 0), i64 %25, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.2, i64 0, i64 0))
store i32 0, i32* %2
br label %27
27: ; preds = %38, %24
%28 = load i32, i32* %3
%29 = load i32, i32* %4
%30 = load i32, i32* %5
%31 = load i32, i32* %6
%32 = call i32 @__cpuid(i32 0, i32 %28, i32 %29, i32 %30, i32 %31)
%33 = call i64 (...) @_rdtsc()
store i64 %33, i64* %7
%34 = call i32 (...) @mul()
%35 = call i64 (...) @_rdtsc()
%36 = load i64, i64* %7
%37 = sub nsw i64 %35, %36
store i64 %37, i64* %7
br label %38
38: ; preds = %27
%39 = load i32, i32* %2
%40 = add nsw i32 %39, 1
store i32 %40, i32* %2
%41 = icmp slt i32 %40, 2
br i1 %41, label %27, label %42
42: ; preds = %38
%43 = load i64, i64* %7
%44 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.3, i64 0, i64 0), i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.1, i64 0, i64 0), i64 %43, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.2, i64 0, i64 0))
store i32 0, i32* %8
store i32 0, i32* %2
br label %45
45: ; preds = %60, %42
%46 = load i32, i32* %3
%47 = load i32, i32* %4
%48 = load i32, i32* %5
%49 = load i32, i32* %6
%50 = call i32 @__cpuid(i32 0, i32 %46, i32 %47, i32 %48, i32 %49)
%51 = call i64 (...) @_rdtsc()
store i64 %51, i64* %7
%52 = load i32, i32* %2
%53 = mul nsw i32 560000, %52
%54 = call i32 @div7(i32 %53)
store i32 %54, i32* %8
%55 = load i32, i32* %8
%56 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.4, i64 0, i64 0), i32 %55)
%57 = call i64 (...) @_rdtsc()
%58 = load i64, i64* %7
%59 = sub nsw i64 %57, %58
store i64 %59, i64* %7
br label %60
60: ; preds = %45
%61 = load i32, i32* %2
%62 = add nsw i32 %61, 1
store i32 %62, i32* %2
%63 = icmp slt i32 %62, 2
br i1 %63, label %45, label %64
64: ; preds = %60
%65 = load i64, i64* %7
%66 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.5, i64 0, i64 0), i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.1, i64 0, i64 0), i64 %65, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.2, i64 0, i64 0))
store i32 0, i32* %8
store i32 0, i32* %2
br label %67
67: ; preds = %82, %64
%68 = load i32, i32* %3
%69 = load i32, i32* %4
%70 = load i32, i32* %5
%71 = load i32, i32* %6
%72 = call i32 @__cpuid(i32 0, i32 %68, i32 %69, i32 %70, i32 %71)
%73 = call i64 (...) @_rdtsc()
store i64 %73, i64* %7
%74 = load i32, i32* %2
%75 = mul nsw i32 560000, %74
%76 = call i32 @bit_div7(i32 %75)
store i32 %76, i32* %8
%77 = load i32, i32* %8
%78 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.4, i64 0, i64 0), i32 %77)
%79 = call i64 (...) @_rdtsc()
%80 = load i64, i64* %7
%81 = sub nsw i64 %79, %80
store i64 %81, i64* %7
br label %82
82: ; preds = %67
%83 = load i32, i32* %2
%84 = add nsw i32 %83, 1
store i32 %84, i32* %2
%85 = icmp slt i32 %84, 2
br i1 %85, label %67, label %86
86: ; preds = %82
%87 = load i64, i64* %7
%88 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str.6, i64 0, i64 0), i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.1, i64 0, i64 0), i64 %87, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.2, i64 0, i64 0))
store i32 0, i32* %2
br label %89
89: ; preds = %104, %86
%90 = load i32, i32* %3
%91 = load i32, i32* %4
%92 = load i32, i32* %5
%93 = load i32, i32* %6
%94 = call i32 @__cpuid(i32 0, i32 %90, i32 %91, i32 %92, i32 %93)
%95 = call i64 (...) @_rdtsc()
store i64 %95, i64* %7
%96 = load i32, i32* %2
%97 = mul nsw i32 560000, %96
%98 = call i32 @div3(i32 %97)
store i32 %98, i32* %8
%99 = load i32, i32* %8
%100 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.4, i64 0, i64 0), i32 %99)
%101 = call i64 (...) @_rdtsc()
%102 = load i64, i64* %7
%103 = sub nsw i64 %101, %102
store i64 %103, i64* %7
br label %104
104: ; preds = %89
%105 = load i32, i32* %2
%106 = add nsw i32 %105, 1
store i32 %106, i32* %2
%107 = icmp slt i32 %106, 2
br i1 %107, label %89, label %108
108: ; preds = %104
%109 = load i64, i64* %7
%110 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.7, i64 0, i64 0), i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.1, i64 0, i64 0), i64 %109, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.2, i64 0, i64 0))
store i32 0, i32* %8
store i32 0, i32* %2
br label %111
111: ; preds = %126, %108
%112 = load i32, i32* %3
%113 = load i32, i32* %4
%114 = load i32, i32* %5
%115 = load i32, i32* %6
%116 = call i32 @__cpuid(i32 0, i32 %112, i32 %113, i32 %114, i32 %115)
%117 = call i64 (...) @_rdtsc()
store i64 %117, i64* %7
%118 = load i32, i32* %2
%119 = mul nsw i32 560000, %118
%120 = call i32 @bit_div3(i32 %119)
store i32 %120, i32* %8
%121 = load i32, i32* %8
%122 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.4, i64 0, i64 0), i32 %121)
%123 = call i64 (...) @_rdtsc()
%124 = load i64, i64* %7
%125 = sub nsw i64 %123, %124
store i64 %125, i64* %7
br label %126
126: ; preds = %111
%127 = load i32, i32* %2
%128 = add nsw i32 %127, 1
store i32 %128, i32* %2
%129 = icmp slt i32 %128, 2
br i1 %129, label %111, label %130
130: ; preds = %126
%131 = load i64, i64* %7
%132 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str.8, i64 0, i64 0), i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.1, i64 0, i64 0), i64 %131, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.2, i64 0, i64 0))
%133 = call i32 @exit(i32 0)
unreachable
}

LLVM IR (-O2):
@.str = [36 x i8] c"::: left shift: %s %lld %s cicles\0A\00"
@.str.1 = [9 x i8] c"\1B[22;31m\00"
@.str.2 = [5 x i8] c"\1B[0m\00"
@.str.3 = [28 x i8] c"::: mul: %s %lld %s cicles\0A\00"
@.str.4 = [12 x i8] c"result: %d\0A\00"
@.str.5 = [29 x i8] c"::: div7: %s %lld %s cicles\0A\00"
@.str.6 = [34 x i8] c"::: bit_div7: %s %lld %s cicles\0A\00"
@.str.7 = [30 x i8] c"::: div3: %s %lld %s cicles\0A\00"
@.str.8 = [34 x i8] c"::: bit_div3: %s %lld %s cicles\0A\00"
define i32 @main() {
%1 = tail call i32 @__cpuid(i32 0, i32 0, i32 0, i32 0, i32 0)
%2 = tail call i64 (...) @_rdtsc()
%3 = tail call i32 (...) @leftshift()
%4 = tail call i64 (...) @_rdtsc()
%5 = tail call i32 @__cpuid(i32 0, i32 0, i32 0, i32 0, i32 0)
%6 = tail call i64 (...) @_rdtsc()
%7 = tail call i32 (...) @leftshift()
%8 = tail call i64 (...) @_rdtsc()
%9 = sub nsw i64 %8, %6
%10 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([36 x i8], [36 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.1, i64 0, i64 0), i64 %9, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.2, i64 0, i64 0))
%11 = tail call i32 @__cpuid(i32 0, i32 0, i32 0, i32 0, i32 0)
%12 = tail call i64 (...) @_rdtsc()
%13 = tail call i32 (...) @mul()
%14 = tail call i64 (...) @_rdtsc()
%15 = tail call i32 @__cpuid(i32 0, i32 0, i32 0, i32 0, i32 0)
%16 = tail call i64 (...) @_rdtsc()
%17 = tail call i32 (...) @mul()
%18 = tail call i64 (...) @_rdtsc()
%19 = sub nsw i64 %18, %16
%20 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([28 x i8], [28 x i8]* @.str.3, i64 0, i64 0), i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.1, i64 0, i64 0), i64 %19, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.2, i64 0, i64 0))
%21 = tail call i32 @__cpuid(i32 0, i32 0, i32 0, i32 0, i32 0)
%22 = tail call i64 (...) @_rdtsc()
%23 = tail call i32 @div7(i32 0)
%24 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([12 x i8], [12 x i8]* @.str.4, i64 0, i64 0), i32 %23)
%25 = tail call i64 (...) @_rdtsc()
%26 = tail call i32 @__cpuid(i32 0, i32 0, i32 0, i32 0, i32 0)
%27 = tail call i64 (...) @_rdtsc()
%28 = tail call i32 @div7(i32 560000)
%29 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([12 x i8], [12 x i8]* @.str.4, i64 0, i64 0), i32 %28)
%30 = tail call i64 (...) @_rdtsc()
%31 = sub nsw i64 %30, %27
%32 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([29 x i8], [29 x i8]* @.str.5, i64 0, i64 0), i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.1, i64 0, i64 0), i64 %31, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.2, i64 0, i64 0))
%33 = tail call i32 @__cpuid(i32 0, i32 0, i32 0, i32 0, i32 0)
%34 = tail call i64 (...) @_rdtsc()
%35 = tail call i32 @bit_div7(i32 0)
%36 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([12 x i8], [12 x i8]* @.str.4, i64 0, i64 0), i32 %35)
%37 = tail call i64 (...) @_rdtsc()
%38 = tail call i32 @__cpuid(i32 0, i32 0, i32 0, i32 0, i32 0)
%39 = tail call i64 (...) @_rdtsc()
%40 = tail call i32 @bit_div7(i32 560000)
%41 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([12 x i8], [12 x i8]* @.str.4, i64 0, i64 0), i32 %40)
%42 = tail call i64 (...) @_rdtsc()
%43 = sub nsw i64 %42, %39
%44 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([34 x i8], [34 x i8]* @.str.6, i64 0, i64 0), i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.1, i64 0, i64 0), i64 %43, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.2, i64 0, i64 0))
%45 = tail call i32 @__cpuid(i32 0, i32 0, i32 0, i32 0, i32 0)
%46 = tail call i64 (...) @_rdtsc()
%47 = tail call i32 @div3(i32 0)
%48 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([12 x i8], [12 x i8]* @.str.4, i64 0, i64 0), i32 %47)
%49 = tail call i64 (...) @_rdtsc()
%50 = tail call i32 @__cpuid(i32 0, i32 0, i32 0, i32 0, i32 0)
%51 = tail call i64 (...) @_rdtsc()
%52 = tail call i32 @div3(i32 560000)
%53 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([12 x i8], [12 x i8]* @.str.4, i64 0, i64 0), i32 %52)
%54 = tail call i64 (...) @_rdtsc()
%55 = sub nsw i64 %54, %51
%56 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([30 x i8], [30 x i8]* @.str.7, i64 0, i64 0), i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.1, i64 0, i64 0), i64 %55, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.2, i64 0, i64 0))
%57 = tail call i32 @__cpuid(i32 0, i32 0, i32 0, i32 0, i32 0)
%58 = tail call i64 (...) @_rdtsc()
%59 = tail call i32 @bit_div3(i32 0)
%60 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([12 x i8], [12 x i8]* @.str.4, i64 0, i64 0), i32 %59)
%61 = tail call i64 (...) @_rdtsc()
%62 = tail call i32 @__cpuid(i32 0, i32 0, i32 0, i32 0, i32 0)
%63 = tail call i64 (...) @_rdtsc()
%64 = tail call i32 @bit_div3(i32 560000)
%65 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([12 x i8], [12 x i8]* @.str.4, i64 0, i64 0), i32 %64)
%66 = tail call i64 (...) @_rdtsc()
%67 = sub nsw i64 %66, %63
%68 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([34 x i8], [34 x i8]* @.str.8, i64 0, i64 0), i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.1, i64 0, i64 0), i64 %67, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.2, i64 0, i64 0))
%69 = tail call i32 @exit(i32 0)
unreachable
}