#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 omp_get_num_threads();
int omp_get_thread_num();
int /*<<< orphan*/ printf(char *, float, ...);
int main(int argc, char *argv[]) {
  int i, nthreads, tid, programmers, managers, accountants, ceos, num_workers;
  float accounterFee, programmerSalary, managerSalary, ceoSalary, totalSalary;
  programmers = 10;
  managers = 3;
  ceos = 1;
  accounterFee = 500.0;
  programmerSalary = 4000.0;
  managerSalary = 6000.0;
  ceoSalary = 9000.0;
  totalSalary = 0.0;
#pragma omp parallel private(nthreads, tid)
  {
    tid = omp_get_thread_num();
    printf("\nAccounter %d ready to calculate total salary.\n", tid);
    if (tid == 0) {
      nthreads = omp_get_num_threads();
      accountants = nthreads;
      printf("\n%d Accountants were hired to calculate total salary, therefor "
             "they are included in the calculations.\n",
             accountants);
    }
  }
#pragma omp parallel for reduction(+ : totalSalary)
  for (i = 0; i < programmers; i++) {
    printf("\nAccounter %d calculating in loop 2.\n", omp_get_thread_num());
    totalSalary = totalSalary + programmerSalary;
  }
#pragma omp parallel for reduction(+ : totalSalary)
  for (i = 0; i < managers; i++) {
    printf("\nAccounter %d calculating in loop 3.\n", omp_get_thread_num());
    totalSalary = totalSalary + managerSalary;
  }
#pragma omp parallel for reduction(+ : totalSalary)
  for (i = 0; i < ceos; i++) {
    printf("\nAccounter %d calculating in loop 4.\n", omp_get_thread_num());
    totalSalary = totalSalary + ceoSalary;
  }
  num_workers = programmers + managers + ceos;
#pragma omp parallel for num_threads(num_workers) private(tid)
  for (i = 0; i < num_workers; i++) {
    tid = omp_get_thread_num();
    printf("I'm employee #%d and I do exist\n", tid);
  }
#pragma omp parallel for reduction(+ : totalSalary)
  for (i = 0; i < accountants; i++) {
    printf("\nAccounter %d calculating in loop 1.\n", omp_get_thread_num());
    totalSalary = totalSalary + accounterFee;
  }
  printf("\nA company has to pay $%f total salary for the current month. The "
         "company consists of %d programmers ($%f a month), %d managers ($%f a "
         "month), %d ceos ($%f a month) and additionally, %d accountants were "
         "hired to calculate the total salary and they charged $%f each for "
         "their work.\n\n",
         totalSalary, programmers, programmerSalary, managers, managerSalary,
         ceos, ceoSalary, accountants, accounterFee);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x50,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0xa,-0x20(%rbp)
movl   $0x3,-0x24(%rbp)
movl   $0x1,-0x2c(%rbp)
movss  0xea9(%rip),%xmm0
movss  %xmm0,-0x34(%rbp)
movss  0xe98(%rip),%xmm0
movss  %xmm0,-0x38(%rbp)
movss  0xe87(%rip),%xmm0
movss  %xmm0,-0x3c(%rbp)
movss  0xe76(%rip),%xmm0
movss  %xmm0,-0x40(%rbp)
xorps  %xmm0,%xmm0
movss  %xmm0,-0x44(%rbp)
mov    $0x0,%al
call   1030 <omp_get_thread_num@plt>
mov    %eax,-0x1c(%rbp)
cvtsi2ssl -0x1c(%rbp),%xmm0
lea    0xe63(%rip),%rdi
mov    $0x1,%al
call   1040 <printf@plt>
cmpl   $0x0,-0x1c(%rbp)
jne    11e1 <main+0xb1>
mov    $0x0,%al
call   1050 <omp_get_num_threads@plt>
mov    %eax,-0x18(%rbp)
mov    -0x18(%rbp),%eax
mov    %eax,-0x28(%rbp)
cvtsi2ssl -0x28(%rbp),%xmm0
lea    0xe66(%rip),%rdi
mov    $0x1,%al
call   1040 <printf@plt>
movl   $0x0,-0x14(%rbp)
mov    -0x14(%rbp),%eax
cmp    -0x20(%rbp),%eax
jge    122a <main+0xfa>
mov    $0x0,%al
call   1030 <omp_get_thread_num@plt>
cvtsi2ss %eax,%xmm0
lea    0xea1(%rip),%rdi
mov    $0x1,%al
call   1040 <printf@plt>
movss  -0x44(%rbp),%xmm0
addss  -0x38(%rbp),%xmm0
movss  %xmm0,-0x44(%rbp)
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    11e8 <main+0xb8>
movl   $0x0,-0x14(%rbp)
mov    -0x14(%rbp),%eax
cmp    -0x24(%rbp),%eax
jge    1273 <main+0x143>
mov    $0x0,%al
call   1030 <omp_get_thread_num@plt>
cvtsi2ss %eax,%xmm0
lea    0xe7e(%rip),%rdi
mov    $0x1,%al
call   1040 <printf@plt>
movss  -0x44(%rbp),%xmm0
addss  -0x3c(%rbp),%xmm0
movss  %xmm0,-0x44(%rbp)
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    1231 <main+0x101>
movl   $0x0,-0x14(%rbp)
mov    -0x14(%rbp),%eax
cmp    -0x2c(%rbp),%eax
jge    12bc <main+0x18c>
mov    $0x0,%al
call   1030 <omp_get_thread_num@plt>
cvtsi2ss %eax,%xmm0
lea    0xe5b(%rip),%rdi
mov    $0x1,%al
call   1040 <printf@plt>
movss  -0x44(%rbp),%xmm0
addss  -0x40(%rbp),%xmm0
movss  %xmm0,-0x44(%rbp)
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    127a <main+0x14a>
mov    -0x20(%rbp),%eax
add    -0x24(%rbp),%eax
add    -0x2c(%rbp),%eax
mov    %eax,-0x30(%rbp)
movl   $0x0,-0x14(%rbp)
mov    -0x14(%rbp),%eax
cmp    -0x30(%rbp),%eax
jge    1306 <main+0x1d6>
mov    $0x0,%al
call   1030 <omp_get_thread_num@plt>
mov    %eax,-0x1c(%rbp)
cvtsi2ssl -0x1c(%rbp),%xmm0
lea    0xe28(%rip),%rdi
mov    $0x1,%al
call   1040 <printf@plt>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    12cf <main+0x19f>
movl   $0x0,-0x14(%rbp)
mov    -0x14(%rbp),%eax
cmp    -0x28(%rbp),%eax
jge    134f <main+0x21f>
mov    $0x0,%al
call   1030 <omp_get_thread_num@plt>
cvtsi2ss %eax,%xmm0
lea    0xe0f(%rip),%rdi
mov    $0x1,%al
call   1040 <printf@plt>
movss  -0x44(%rbp),%xmm0
addss  -0x34(%rbp),%xmm0
movss  %xmm0,-0x44(%rbp)
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    130d <main+0x1dd>
movss  -0x44(%rbp),%xmm0
mov    -0x20(%rbp),%esi
movss  -0x38(%rbp),%xmm1
cvtss2sd %xmm1,%xmm1
mov    -0x24(%rbp),%edx
movss  -0x3c(%rbp),%xmm2
cvtss2sd %xmm2,%xmm2
mov    -0x2c(%rbp),%ecx
movss  -0x40(%rbp),%xmm3
cvtss2sd %xmm3,%xmm3
mov    -0x28(%rbp),%r8d
movss  -0x34(%rbp),%xmm4
cvtss2sd %xmm4,%xmm4
lea    0xdd4(%rip),%rdi
mov    $0x5,%al
call   1040 <printf@plt>
mov    -0x4(%rbp),%eax
add    $0x50,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r14
push   %rbx
sub    $0x10,%rsp
xor    %eax,%eax
call   1030 <omp_get_thread_num@plt>
mov    %eax,%ebx
cvtsi2ss %eax,%xmm0
lea    0xedc(%rip),%rdi
mov    $0x1,%al
call   1040 <printf@plt>
test   %ebx,%ebx
jne    1176 <main+0x46>
xor    %eax,%eax
call   1050 <omp_get_num_threads@plt>
mov    %eax,%r14d
xorps  %xmm0,%xmm0
cvtsi2ss %eax,%xmm0
lea    0xee9(%rip),%rdi
mov    $0x1,%al
call   1040 <printf@plt>
xor    %eax,%eax
call   1030 <omp_get_thread_num@plt>
xorps  %xmm0,%xmm0
cvtsi2ss %eax,%xmm0
lea    0xf34(%rip),%rbx
mov    %rbx,%rdi
mov    $0x1,%al
call   1040 <printf@plt>
xor    %eax,%eax
call   1030 <omp_get_thread_num@plt>
xorps  %xmm0,%xmm0
cvtsi2ss %eax,%xmm0
mov    %rbx,%rdi
mov    $0x1,%al
call   1040 <printf@plt>
xor    %eax,%eax
call   1030 <omp_get_thread_num@plt>
xorps  %xmm0,%xmm0
cvtsi2ss %eax,%xmm0
mov    %rbx,%rdi
mov    $0x1,%al
call   1040 <printf@plt>
xor    %eax,%eax
call   1030 <omp_get_thread_num@plt>
xorps  %xmm0,%xmm0
cvtsi2ss %eax,%xmm0
mov    %rbx,%rdi
mov    $0x1,%al
call   1040 <printf@plt>
xor    %eax,%eax
call   1030 <omp_get_thread_num@plt>
xorps  %xmm0,%xmm0
cvtsi2ss %eax,%xmm0
mov    %rbx,%rdi
mov    $0x1,%al
call   1040 <printf@plt>
xor    %eax,%eax
call   1030 <omp_get_thread_num@plt>
xorps  %xmm0,%xmm0
cvtsi2ss %eax,%xmm0
mov    %rbx,%rdi
mov    $0x1,%al
call   1040 <printf@plt>
xor    %eax,%eax
call   1030 <omp_get_thread_num@plt>
xorps  %xmm0,%xmm0
cvtsi2ss %eax,%xmm0
mov    %rbx,%rdi
mov    $0x1,%al
call   1040 <printf@plt>
xor    %eax,%eax
call   1030 <omp_get_thread_num@plt>
xorps  %xmm0,%xmm0
cvtsi2ss %eax,%xmm0
mov    %rbx,%rdi
mov    $0x1,%al
call   1040 <printf@plt>
xor    %eax,%eax
call   1030 <omp_get_thread_num@plt>
xorps  %xmm0,%xmm0
cvtsi2ss %eax,%xmm0
mov    %rbx,%rdi
mov    $0x1,%al
call   1040 <printf@plt>
xor    %eax,%eax
call   1030 <omp_get_thread_num@plt>
xorps  %xmm0,%xmm0
cvtsi2ss %eax,%xmm0
mov    %rbx,%rdi
mov    $0x1,%al
call   1040 <printf@plt>
xor    %eax,%eax
call   1030 <omp_get_thread_num@plt>
xorps  %xmm0,%xmm0
cvtsi2ss %eax,%xmm0
lea    0xe63(%rip),%rbx
mov    %rbx,%rdi
mov    $0x1,%al
call   1040 <printf@plt>
xor    %eax,%eax
call   1030 <omp_get_thread_num@plt>
xorps  %xmm0,%xmm0
cvtsi2ss %eax,%xmm0
mov    %rbx,%rdi
mov    $0x1,%al
call   1040 <printf@plt>
xor    %eax,%eax
call   1030 <omp_get_thread_num@plt>
xorps  %xmm0,%xmm0
cvtsi2ss %eax,%xmm0
mov    %rbx,%rdi
mov    $0x1,%al
call   1040 <printf@plt>
xor    %eax,%eax
call   1030 <omp_get_thread_num@plt>
xorps  %xmm0,%xmm0
cvtsi2ss %eax,%xmm0
lea    0xe3a(%rip),%rdi
mov    $0x1,%al
call   1040 <printf@plt>
xor    %eax,%eax
call   1030 <omp_get_thread_num@plt>
xorps  %xmm0,%xmm0
cvtsi2ss %eax,%xmm0
lea    0xe44(%rip),%rbx
mov    %rbx,%rdi
mov    $0x1,%al
call   1040 <printf@plt>
xor    %eax,%eax
call   1030 <omp_get_thread_num@plt>
xorps  %xmm0,%xmm0
cvtsi2ss %eax,%xmm0
mov    %rbx,%rdi
mov    $0x1,%al
call   1040 <printf@plt>
xor    %eax,%eax
call   1030 <omp_get_thread_num@plt>
xorps  %xmm0,%xmm0
cvtsi2ss %eax,%xmm0
mov    %rbx,%rdi
mov    $0x1,%al
call   1040 <printf@plt>
xor    %eax,%eax
call   1030 <omp_get_thread_num@plt>
xorps  %xmm0,%xmm0
cvtsi2ss %eax,%xmm0
mov    %rbx,%rdi
mov    $0x1,%al
call   1040 <printf@plt>
xor    %eax,%eax
call   1030 <omp_get_thread_num@plt>
xorps  %xmm0,%xmm0
cvtsi2ss %eax,%xmm0
mov    %rbx,%rdi
mov    $0x1,%al
call   1040 <printf@plt>
xor    %eax,%eax
call   1030 <omp_get_thread_num@plt>
xorps  %xmm0,%xmm0
cvtsi2ss %eax,%xmm0
mov    %rbx,%rdi
mov    $0x1,%al
call   1040 <printf@plt>
xor    %eax,%eax
call   1030 <omp_get_thread_num@plt>
xorps  %xmm0,%xmm0
cvtsi2ss %eax,%xmm0
mov    %rbx,%rdi
mov    $0x1,%al
call   1040 <printf@plt>
xor    %eax,%eax
call   1030 <omp_get_thread_num@plt>
xorps  %xmm0,%xmm0
cvtsi2ss %eax,%xmm0
mov    %rbx,%rdi
mov    $0x1,%al
call   1040 <printf@plt>
xor    %eax,%eax
call   1030 <omp_get_thread_num@plt>
xorps  %xmm0,%xmm0
cvtsi2ss %eax,%xmm0
mov    %rbx,%rdi
mov    $0x1,%al
call   1040 <printf@plt>
xor    %eax,%eax
call   1030 <omp_get_thread_num@plt>
xorps  %xmm0,%xmm0
cvtsi2ss %eax,%xmm0
mov    %rbx,%rdi
mov    $0x1,%al
call   1040 <printf@plt>
xor    %eax,%eax
call   1030 <omp_get_thread_num@plt>
xorps  %xmm0,%xmm0
cvtsi2ss %eax,%xmm0
mov    %rbx,%rdi
mov    $0x1,%al
call   1040 <printf@plt>
xor    %eax,%eax
call   1030 <omp_get_thread_num@plt>
xorps  %xmm0,%xmm0
cvtsi2ss %eax,%xmm0
mov    %rbx,%rdi
mov    $0x1,%al
call   1040 <printf@plt>
xor    %eax,%eax
call   1030 <omp_get_thread_num@plt>
xorps  %xmm0,%xmm0
cvtsi2ss %eax,%xmm0
mov    %rbx,%rdi
mov    $0x1,%al
call   1040 <printf@plt>
xor    %eax,%eax
call   1030 <omp_get_thread_num@plt>
xorps  %xmm0,%xmm0
cvtsi2ss %eax,%xmm0
mov    %rbx,%rdi
mov    $0x1,%al
call   1040 <printf@plt>
movss  0xbc9(%rip),%xmm0
test   %r14d,%r14d
jle    1481 <main+0x351>
lea    0xd0f(%rip),%rbx
mov    %r14d,%ebp
cs nopw 0x0(%rax,%rax,1)
movss  %xmm0,0xc(%rsp)
xor    %eax,%eax
call   1030 <omp_get_thread_num@plt>
xorps  %xmm0,%xmm0
cvtsi2ss %eax,%xmm0
mov    %rbx,%rdi
mov    $0x1,%al
call   1040 <printf@plt>
movss  0xc(%rsp),%xmm0
addss  0xb88(%rip),%xmm0
add    $0xffffffff,%ebp
jne    1450 <main+0x320>
lea    0xcf0(%rip),%rdi
movsd  0xb78(%rip),%xmm1
movsd  0xb78(%rip),%xmm2
movsd  0xb78(%rip),%xmm3
movsd  0xb78(%rip),%xmm4
mov    $0xa,%esi
mov    $0x3,%edx
mov    $0x1,%ecx
mov    %r14d,%r8d
mov    $0x5,%al
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbx
pop    %r14
pop    %rbp
ret

LLVM IR (-O0):
@.str = [48 x i8] c"\0AAccounter %d ready to calculate total salary.\0A\00"
@.str.1 = [103 x i8] c"\0A%d Accountants were hired to calculate total salary, therefor they are included in the calculations.\0A\00"
@.str.2 = [38 x i8] c"\0AAccounter %d calculating in loop 2.\0A\00"
@.str.3 = [38 x i8] c"\0AAccounter %d calculating in loop 3.\0A\00"
@.str.4 = [38 x i8] c"\0AAccounter %d calculating in loop 4.\0A\00"
@.str.5 = [33 x i8] c"I'm employee #%d and I do exist\0A\00"
@.str.6 = [38 x i8] c"\0AAccounter %d calculating in loop 1.\0A\00"
@.str.7 = [283 x i8] c"\0AA company has to pay $%f total salary for the current month. The company consists of %d programmers ($%f a month), %d managers ($%f a month), %d ceos ($%f a month) and additionally, %d accountants were hired to calculate the total salary and they charged $%f each for their work.\0A\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32
%10 = alloca i32
%11 = alloca i32
%12 = alloca i32
%13 = alloca i32
%14 = alloca float
%15 = alloca float
%16 = alloca float
%17 = alloca float
%18 = alloca float
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
store i32 10, i32* %9
store i32 3, i32* %10
store i32 1, i32* %12
store float 5.000000e+02, float* %14
store float 4.000000e+03, float* %15
store float 6.000000e+03, float* %16
store float 9.000000e+03, float* %17
store float 0.000000e+00, float* %18
%19 = call i32 (...) @omp_get_thread_num()
store i32 %19, i32* %8
%20 = load i32, i32* %8
%21 = sitofp i32 %20 to float
%22 = call i32 (i8*, float, ...) @printf(i8* getelementptr inbounds ([48 x i8], [48 x i8]* @.str, i64 0, i64 0), float %21)
%23 = load i32, i32* %8
%24 = icmp eq i32 %23, 0
br i1 %24, label %25, label %31
25: ; preds = %2
%26 = call i32 (...) @omp_get_num_threads()
store i32 %26, i32* %7
%27 = load i32, i32* %7
store i32 %27, i32* %11
%28 = load i32, i32* %11
%29 = sitofp i32 %28 to float
%30 = call i32 (i8*, float, ...) @printf(i8* getelementptr inbounds ([103 x i8], [103 x i8]* @.str.1, i64 0, i64 0), float %29)
br label %31
31: ; preds = %25, %2
store i32 0, i32* %6
br label %32
32: ; preds = %43, %31
%33 = load i32, i32* %6
%34 = load i32, i32* %9
%35 = icmp slt i32 %33, %34
br i1 %35, label %36, label %46
36: ; preds = %32
%37 = call i32 (...) @omp_get_thread_num()
%38 = sitofp i32 %37 to float
%39 = call i32 (i8*, float, ...) @printf(i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str.2, i64 0, i64 0), float %38)
%40 = load float, float* %18
%41 = load float, float* %15
%42 = fadd float %40, %41
store float %42, float* %18
br label %43
43: ; preds = %36
%44 = load i32, i32* %6
%45 = add nsw i32 %44, 1
store i32 %45, i32* %6
br label %32
46: ; preds = %32
store i32 0, i32* %6
br label %47
47: ; preds = %58, %46
%48 = load i32, i32* %6
%49 = load i32, i32* %10
%50 = icmp slt i32 %48, %49
br i1 %50, label %51, label %61
51: ; preds = %47
%52 = call i32 (...) @omp_get_thread_num()
%53 = sitofp i32 %52 to float
%54 = call i32 (i8*, float, ...) @printf(i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str.3, i64 0, i64 0), float %53)
%55 = load float, float* %18
%56 = load float, float* %16
%57 = fadd float %55, %56
store float %57, float* %18
br label %58
58: ; preds = %51
%59 = load i32, i32* %6
%60 = add nsw i32 %59, 1
store i32 %60, i32* %6
br label %47
61: ; preds = %47
store i32 0, i32* %6
br label %62
62: ; preds = %73, %61
%63 = load i32, i32* %6
%64 = load i32, i32* %12
%65 = icmp slt i32 %63, %64
br i1 %65, label %66, label %76
66: ; preds = %62
%67 = call i32 (...) @omp_get_thread_num()
%68 = sitofp i32 %67 to float
%69 = call i32 (i8*, float, ...) @printf(i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str.4, i64 0, i64 0), float %68)
%70 = load float, float* %18
%71 = load float, float* %17
%72 = fadd float %70, %71
store float %72, float* %18
br label %73
73: ; preds = %66
%74 = load i32, i32* %6
%75 = add nsw i32 %74, 1
store i32 %75, i32* %6
br label %62
76: ; preds = %62
%77 = load i32, i32* %9
%78 = load i32, i32* %10
%79 = add nsw i32 %77, %78
%80 = load i32, i32* %12
%81 = add nsw i32 %79, %80
store i32 %81, i32* %13
store i32 0, i32* %6
br label %82
82: ; preds = %91, %76
%83 = load i32, i32* %6
%84 = load i32, i32* %13
%85 = icmp slt i32 %83, %84
br i1 %85, label %86, label %94
86: ; preds = %82
%87 = call i32 (...) @omp_get_thread_num()
store i32 %87, i32* %8
%88 = load i32, i32* %8
%89 = sitofp i32 %88 to float
%90 = call i32 (i8*, float, ...) @printf(i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str.5, i64 0, i64 0), float %89)
br label %91
91: ; preds = %86
%92 = load i32, i32* %6
%93 = add nsw i32 %92, 1
store i32 %93, i32* %6
br label %82
94: ; preds = %82
store i32 0, i32* %6
br label %95
95: ; preds = %106, %94
%96 = load i32, i32* %6
%97 = load i32, i32* %11
%98 = icmp slt i32 %96, %97
br i1 %98, label %99, label %109
99: ; preds = %95
%100 = call i32 (...) @omp_get_thread_num()
%101 = sitofp i32 %100 to float
%102 = call i32 (i8*, float, ...) @printf(i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str.6, i64 0, i64 0), float %101)
%103 = load float, float* %18
%104 = load float, float* %14
%105 = fadd float %103, %104
store float %105, float* %18
br label %106
106: ; preds = %99
%107 = load i32, i32* %6
%108 = add nsw i32 %107, 1
store i32 %108, i32* %6
br label %95
109: ; preds = %95
%110 = load float, float* %18
%111 = load i32, i32* %9
%112 = load float, float* %15
%113 = fpext float %112 to double
%114 = load i32, i32* %10
%115 = load float, float* %16
%116 = fpext float %115 to double
%117 = load i32, i32* %12
%118 = load float, float* %17
%119 = fpext float %118 to double
%120 = load i32, i32* %11
%121 = load float, float* %14
%122 = fpext float %121 to double
%123 = call i32 (i8*, float, ...) @printf(i8* getelementptr inbounds ([283 x i8], [283 x i8]* @.str.7, i64 0, i64 0), float %110, i32 %111, double %113, i32 %114, double %116, i32 %117, double %119, i32 %120, double %122)
%124 = load i32, i32* %3
ret i32 %124
}

LLVM IR (-O2):
@.str = [48 x i8] c"\0AAccounter %d ready to calculate total salary.\0A\00"
@.str.1 = [103 x i8] c"\0A%d Accountants were hired to calculate total salary, therefor they are included in the calculations.\0A\00"
@.str.2 = [38 x i8] c"\0AAccounter %d calculating in loop 2.\0A\00"
@.str.3 = [38 x i8] c"\0AAccounter %d calculating in loop 3.\0A\00"
@.str.4 = [38 x i8] c"\0AAccounter %d calculating in loop 4.\0A\00"
@.str.5 = [33 x i8] c"I'm employee #%d and I do exist\0A\00"
@.str.6 = [38 x i8] c"\0AAccounter %d calculating in loop 1.\0A\00"
@.str.7 = [283 x i8] c"\0AA company has to pay $%f total salary for the current month. The company consists of %d programmers ($%f a month), %d managers ($%f a month), %d ceos ($%f a month) and additionally, %d accountants were hired to calculate the total salary and they charged $%f each for their work.\0A\0A\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 (...) @omp_get_thread_num()
%4 = sitofp i32 %3 to float
%5 = tail call i32 (i8*, float, ...) @printf(i8* getelementptr inbounds ([48 x i8], [48 x i8]* @.str, i64 0, i64 0), float %4)
%6 = icmp eq i32 %3, 0
br i1 %6, label %7, label %11
7: ; preds = %2
%8 = tail call i32 (...) @omp_get_num_threads()
%9 = sitofp i32 %8 to float
%10 = tail call i32 (i8*, float, ...) @printf(i8* getelementptr inbounds ([103 x i8], [103 x i8]* @.str.1, i64 0, i64 0), float %9)
br label %11
11: ; preds = %7, %2
%12 = phi i32 [ %8, %7 ], [ undef, %2 ]
%13 = tail call i32 (...) @omp_get_thread_num()
%14 = sitofp i32 %13 to float
%15 = tail call i32 (i8*, float, ...) @printf(i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str.2, i64 0, i64 0), float %14)
%16 = tail call i32 (...) @omp_get_thread_num()
%17 = sitofp i32 %16 to float
%18 = tail call i32 (i8*, float, ...) @printf(i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str.2, i64 0, i64 0), float %17)
%19 = tail call i32 (...) @omp_get_thread_num()
%20 = sitofp i32 %19 to float
%21 = tail call i32 (i8*, float, ...) @printf(i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str.2, i64 0, i64 0), float %20)
%22 = tail call i32 (...) @omp_get_thread_num()
%23 = sitofp i32 %22 to float
%24 = tail call i32 (i8*, float, ...) @printf(i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str.2, i64 0, i64 0), float %23)
%25 = tail call i32 (...) @omp_get_thread_num()
%26 = sitofp i32 %25 to float
%27 = tail call i32 (i8*, float, ...) @printf(i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str.2, i64 0, i64 0), float %26)
%28 = tail call i32 (...) @omp_get_thread_num()
%29 = sitofp i32 %28 to float
%30 = tail call i32 (i8*, float, ...) @printf(i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str.2, i64 0, i64 0), float %29)
%31 = tail call i32 (...) @omp_get_thread_num()
%32 = sitofp i32 %31 to float
%33 = tail call i32 (i8*, float, ...) @printf(i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str.2, i64 0, i64 0), float %32)
%34 = tail call i32 (...) @omp_get_thread_num()
%35 = sitofp i32 %34 to float
%36 = tail call i32 (i8*, float, ...) @printf(i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str.2, i64 0, i64 0), float %35)
%37 = tail call i32 (...) @omp_get_thread_num()
%38 = sitofp i32 %37 to float
%39 = tail call i32 (i8*, float, ...) @printf(i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str.2, i64 0, i64 0), float %38)
%40 = tail call i32 (...) @omp_get_thread_num()
%41 = sitofp i32 %40 to float
%42 = tail call i32 (i8*, float, ...) @printf(i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str.2, i64 0, i64 0), float %41)
%43 = tail call i32 (...) @omp_get_thread_num()
%44 = sitofp i32 %43 to float
%45 = tail call i32 (i8*, float, ...) @printf(i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str.3, i64 0, i64 0), float %44)
%46 = tail call i32 (...) @omp_get_thread_num()
%47 = sitofp i32 %46 to float
%48 = tail call i32 (i8*, float, ...) @printf(i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str.3, i64 0, i64 0), float %47)
%49 = tail call i32 (...) @omp_get_thread_num()
%50 = sitofp i32 %49 to float
%51 = tail call i32 (i8*, float, ...) @printf(i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str.3, i64 0, i64 0), float %50)
%52 = tail call i32 (...) @omp_get_thread_num()
%53 = sitofp i32 %52 to float
%54 = tail call i32 (i8*, float, ...) @printf(i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str.4, i64 0, i64 0), float %53)
%55 = tail call i32 (...) @omp_get_thread_num()
%56 = sitofp i32 %55 to float
%57 = tail call i32 (i8*, float, ...) @printf(i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str.5, i64 0, i64 0), float %56)
%58 = tail call i32 (...) @omp_get_thread_num()
%59 = sitofp i32 %58 to float
%60 = tail call i32 (i8*, float, ...) @printf(i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str.5, i64 0, i64 0), float %59)
%61 = tail call i32 (...) @omp_get_thread_num()
%62 = sitofp i32 %61 to float
%63 = tail call i32 (i8*, float, ...) @printf(i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str.5, i64 0, i64 0), float %62)
%64 = tail call i32 (...) @omp_get_thread_num()
%65 = sitofp i32 %64 to float
%66 = tail call i32 (i8*, float, ...) @printf(i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str.5, i64 0, i64 0), float %65)
%67 = tail call i32 (...) @omp_get_thread_num()
%68 = sitofp i32 %67 to float
%69 = tail call i32 (i8*, float, ...) @printf(i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str.5, i64 0, i64 0), float %68)
%70 = tail call i32 (...) @omp_get_thread_num()
%71 = sitofp i32 %70 to float
%72 = tail call i32 (i8*, float, ...) @printf(i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str.5, i64 0, i64 0), float %71)
%73 = tail call i32 (...) @omp_get_thread_num()
%74 = sitofp i32 %73 to float
%75 = tail call i32 (i8*, float, ...) @printf(i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str.5, i64 0, i64 0), float %74)
%76 = tail call i32 (...) @omp_get_thread_num()
%77 = sitofp i32 %76 to float
%78 = tail call i32 (i8*, float, ...) @printf(i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str.5, i64 0, i64 0), float %77)
%79 = tail call i32 (...) @omp_get_thread_num()
%80 = sitofp i32 %79 to float
%81 = tail call i32 (i8*, float, ...) @printf(i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str.5, i64 0, i64 0), float %80)
%82 = tail call i32 (...) @omp_get_thread_num()
%83 = sitofp i32 %82 to float
%84 = tail call i32 (i8*, float, ...) @printf(i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str.5, i64 0, i64 0), float %83)
%85 = tail call i32 (...) @omp_get_thread_num()
%86 = sitofp i32 %85 to float
%87 = tail call i32 (i8*, float, ...) @printf(i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str.5, i64 0, i64 0), float %86)
%88 = tail call i32 (...) @omp_get_thread_num()
%89 = sitofp i32 %88 to float
%90 = tail call i32 (i8*, float, ...) @printf(i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str.5, i64 0, i64 0), float %89)
%91 = tail call i32 (...) @omp_get_thread_num()
%92 = sitofp i32 %91 to float
%93 = tail call i32 (i8*, float, ...) @printf(i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str.5, i64 0, i64 0), float %92)
%94 = tail call i32 (...) @omp_get_thread_num()
%95 = sitofp i32 %94 to float
%96 = tail call i32 (i8*, float, ...) @printf(i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str.5, i64 0, i64 0), float %95)
%97 = icmp sgt i32 %12, 0
br i1 %97, label %98, label %107
98: ; preds = %11, %98
%99 = phi float [ %104, %98 ], [ 6.700000e+04, %11 ]
%100 = phi i32 [ %105, %98 ], [ 0, %11 ]
%101 = tail call i32 (...) @omp_get_thread_num()
%102 = sitofp i32 %101 to float
%103 = tail call i32 (i8*, float, ...) @printf(i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str.6, i64 0, i64 0), float %102)
%104 = fadd float %99, 5.000000e+02
%105 = add nuw nsw i32 %100, 1
%106 = icmp eq i32 %105, %12
br i1 %106, label %107, label %98
107: ; preds = %98, %11
%108 = phi float [ 6.700000e+04, %11 ], [ %104, %98 ]
%109 = tail call i32 (i8*, float, ...) @printf(i8* getelementptr inbounds ([283 x i8], [283 x i8]* @.str.7, i64 0, i64 0), float %108, i32 10, double 4.000000e+03, i32 3, double 6.000000e+03, i32 1, double 9.000000e+03, i32 %12, double 5.000000e+02)
ret i32 0
}