#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 */
float atof(char *);
int /*<<< orphan*/ printf(char *, int, float const, int, float const, int,
                          float const, int, float const, int);
int main(int argc, char *argv[]) {
  const float postkarte = 0.45;
  const float brief = 0.55;
  const float grossBrief = 1.45;
  const float maxiBrief = 2.20;
  const float zielPorto = atof(argv[1]);
  int i, j, k, l;
  for (i = 0; i < 10; i++) {
    for (j = 0; j < 10; j++) {
      for (k = 0; k < 10; k++) {
        for (l = 0; l < 10; l++) {
          printf("Zielporto = %i * %.2f + %i * %.2f + %i * %.2f  + %i * %.2f = "
                 "%.2f EUR\n",
                 i, postkarte, j, brief, k, grossBrief, l, maxiBrief,
                 (i * postkarte + j * brief + k * grossBrief + l * maxiBrief));
        }
      }
    }
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movss  0xece(%rip),%xmm0
movss  %xmm0,-0x14(%rbp)
movss  0xebd(%rip),%xmm0
movss  %xmm0,-0x18(%rbp)
movss  0xeac(%rip),%xmm0
movss  %xmm0,-0x1c(%rbp)
movss  0xe9b(%rip),%xmm0
movss  %xmm0,-0x20(%rbp)
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
call   1030 <atof@plt>
movss  %xmm0,-0x24(%rbp)
movl   $0x0,-0x28(%rbp)
cmpl   $0xa,-0x28(%rbp)
jge    1295 <main+0x175>
movl   $0x0,-0x2c(%rbp)
cmpl   $0xa,-0x2c(%rbp)
jge    1282 <main+0x162>
movl   $0x0,-0x30(%rbp)
cmpl   $0xa,-0x30(%rbp)
jge    126f <main+0x14f>
movl   $0x0,-0x34(%rbp)
cmpl   $0xa,-0x34(%rbp)
jge    125c <main+0x13c>
mov    -0x28(%rbp),%esi
mov    -0x2c(%rbp),%edx
mov    -0x30(%rbp),%ecx
mov    -0x34(%rbp),%r8d
cvtsi2ssl -0x28(%rbp),%xmm0
cvtsi2ssl -0x2c(%rbp),%xmm1
movss  0xe29(%rip),%xmm2
mulss  %xmm2,%xmm1
movss  0xe21(%rip),%xmm2
mulss  %xmm2,%xmm0
addss  %xmm1,%xmm0
cvtsi2ssl -0x30(%rbp),%xmm1
movss  0xe04(%rip),%xmm2
mulss  %xmm2,%xmm1
addss  %xmm0,%xmm1
cvtsi2ssl -0x34(%rbp),%xmm0
movss  0xdeb(%rip),%xmm2
mulss  %xmm2,%xmm0
addss  %xmm1,%xmm0
cvttss2si %xmm0,%r9d
lea    0xde7(%rip),%rdi
movss  0xddb(%rip),%xmm0
movss  0xdcf(%rip),%xmm1
movss  0xdc3(%rip),%xmm2
movss  0xdb7(%rip),%xmm3
call   1040 <printf@plt>
mov    -0x34(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x34(%rbp)
jmp    11b6 <main+0x96>
jmp    1261 <main+0x141>
mov    -0x30(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x30(%rbp)
jmp    11a5 <main+0x85>
jmp    1274 <main+0x154>
mov    -0x2c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x2c(%rbp)
jmp    1194 <main+0x74>
jmp    1287 <main+0x167>
mov    -0x28(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x28(%rbp)
jmp    1183 <main+0x63>
xor    %eax,%eax
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r12
push   %rbx
sub    $0x10,%rsp
xor    %r15d,%r15d
movss  0xed9(%rip),%xmm1
movss  0xed5(%rip),%xmm0
movss  0xed1(%rip),%xmm2
movss  0xecd(%rip),%xmm3
lea    0xeca(%rip),%r14
cs nopw 0x0(%rax,%rax,1)
xorps  %xmm4,%xmm4
cvtsi2ss %r15d,%xmm4
movss  %xmm4,0x4(%rsp)
xor    %r12d,%r12d
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
xorps  %xmm4,%xmm4
cvtsi2ss %r12d,%xmm4
mulss  %xmm1,%xmm4
movss  0x4(%rsp),%xmm1
mulss  %xmm0,%xmm1
addss  %xmm4,%xmm1
movss  %xmm1,0x8(%rsp)
xor    %ebx,%ebx
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
xorps  %xmm1,%xmm1
cvtsi2ss %ebx,%xmm1
mulss  %xmm2,%xmm1
addss  0x8(%rsp),%xmm1
movss  %xmm1,0xc(%rsp)
xor    %ebp,%ebp
nopl   0x0(%rax)
xorps  %xmm1,%xmm1
cvtsi2ss %ebp,%xmm1
mulss  %xmm3,%xmm1
addss  0xc(%rsp),%xmm1
cvttss2si %xmm1,%r9d
mov    %r14,%rdi
mov    %r15d,%esi
mov    %r12d,%edx
movss  0xe19(%rip),%xmm1
mov    %ebx,%ecx
mov    %ebp,%r8d
call   1030 <printf@plt>
movss  0xe13(%rip),%xmm3
movss  0xe07(%rip),%xmm2
movss  0xdfb(%rip),%xmm0
movss  0xdef(%rip),%xmm1
add    $0x1,%ebp
cmp    $0xa,%ebp
jne    11c0 <main+0xb0>
add    $0x1,%ebx
cmp    $0xa,%ebx
jne    11a0 <main+0x90>
add    $0x1,%r12d
cmp    $0xa,%r12d
jne    1170 <main+0x60>
add    $0x1,%r15d
cmp    $0xa,%r15d
jne    1150 <main+0x40>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@.str = [71 x i8] c"Zielporto = %i * %.2f + %i * %.2f + %i * %.2f + %i * %.2f = %.2f EUR\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca float
%7 = alloca float
%8 = alloca float
%9 = alloca float
%10 = alloca float
%11 = alloca i32
%12 = alloca i32
%13 = alloca i32
%14 = alloca i32
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
store float 0x3FDCCCCCC0000000, float* %6
store float 0x3FE19999A0000000, float* %7
store float 0x3FF7333340000000, float* %8
store float 0x40019999A0000000, float* %9
%15 = load i8**, i8*** %5
%16 = getelementptr inbounds i8*, i8** %15, i64 1
%17 = load i8*, i8** %16
%18 = call float @atof(i8* %17)
store float %18, float* %10
store i32 0, i32* %11
br label %19
19: ; preds = %65, %2
%20 = load i32, i32* %11
%21 = icmp slt i32 %20, 10
br i1 %21, label %22, label %68
22: ; preds = %19
store i32 0, i32* %12
br label %23
23: ; preds = %61, %22
%24 = load i32, i32* %12
%25 = icmp slt i32 %24, 10
br i1 %25, label %26, label %64
26: ; preds = %23
store i32 0, i32* %13
br label %27
27: ; preds = %57, %26
%28 = load i32, i32* %13
%29 = icmp slt i32 %28, 10
br i1 %29, label %30, label %60
30: ; preds = %27
store i32 0, i32* %14
br label %31
31: ; preds = %53, %30
%32 = load i32, i32* %14
%33 = icmp slt i32 %32, 10
br i1 %33, label %34, label %56
34: ; preds = %31
%35 = load i32, i32* %11
%36 = load i32, i32* %12
%37 = load i32, i32* %13
%38 = load i32, i32* %14
%39 = load i32, i32* %11
%40 = sitofp i32 %39 to float
%41 = load i32, i32* %12
%42 = sitofp i32 %41 to float
%43 = fmul float %42, 0x3FE19999A0000000
%44 = call float @llvm.fmuladd.f32(float %40, float 0x3FDCCCCCC0000000, float %43)
%45 = load i32, i32* %13
%46 = sitofp i32 %45 to float
%47 = call float @llvm.fmuladd.f32(float %46, float 0x3FF7333340000000, float %44)
%48 = load i32, i32* %14
%49 = sitofp i32 %48 to float
%50 = call float @llvm.fmuladd.f32(float %49, float 0x40019999A0000000, float %47)
%51 = fptosi float %50 to i32
%52 = call i32 @printf(i8* getelementptr inbounds ([71 x i8], [71 x i8]* @.str, i64 0, i64 0), i32 %35, float 0x3FDCCCCCC0000000, i32 %36, float 0x3FE19999A0000000, i32 %37, float 0x3FF7333340000000, i32 %38, float 0x40019999A0000000, i32 %51)
br label %53
53: ; preds = %34
%54 = load i32, i32* %14
%55 = add nsw i32 %54, 1
store i32 %55, i32* %14
br label %31
56: ; preds = %31
br label %57
57: ; preds = %56
%58 = load i32, i32* %13
%59 = add nsw i32 %58, 1
store i32 %59, i32* %13
br label %27
60: ; preds = %27
br label %61
61: ; preds = %60
%62 = load i32, i32* %12
%63 = add nsw i32 %62, 1
store i32 %63, i32* %12
br label %23
64: ; preds = %23
br label %65
65: ; preds = %64
%66 = load i32, i32* %11
%67 = add nsw i32 %66, 1
store i32 %67, i32* %11
br label %19
68: ; preds = %19
ret i32 0
}

LLVM IR (-O2):
@.str = [71 x i8] c"Zielporto = %i * %.2f + %i * %.2f + %i * %.2f + %i * %.2f = %.2f EUR\0A\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
br label %3
3: ; preds = %2, %29
%4 = phi i32 [ 0, %2 ], [ %30, %29 ]
%5 = sitofp i32 %4 to float
br label %6
6: ; preds = %3, %26
%7 = phi i32 [ 0, %3 ], [ %27, %26 ]
%8 = sitofp i32 %7 to float
%9 = fmul float %8, 0x3FE19999A0000000
%10 = tail call float @llvm.fmuladd.f32(float %5, float 0x3FDCCCCCC0000000, float %9)
br label %11
11: ; preds = %6, %23
%12 = phi i32 [ 0, %6 ], [ %24, %23 ]
%13 = sitofp i32 %12 to float
%14 = tail call float @llvm.fmuladd.f32(float %13, float 0x3FF7333340000000, float %10)
br label %15
15: ; preds = %11, %15
%16 = phi i32 [ 0, %11 ], [ %21, %15 ]
%17 = sitofp i32 %16 to float
%18 = tail call float @llvm.fmuladd.f32(float %17, float 0x40019999A0000000, float %14)
%19 = fptosi float %18 to i32
%20 = tail call i32 @printf(i8* getelementptr inbounds ([71 x i8], [71 x i8]* @.str, i64 0, i64 0), i32 %4, float 0x3FDCCCCCC0000000, i32 %7, float 0x3FE19999A0000000, i32 %12, float 0x3FF7333340000000, i32 %16, float 0x40019999A0000000, i32 %19)
%21 = add nuw nsw i32 %16, 1
%22 = icmp eq i32 %21, 10
br i1 %22, label %23, label %15
23: ; preds = %15
%24 = add nuw nsw i32 %12, 1
%25 = icmp eq i32 %24, 10
br i1 %25, label %26, label %11
26: ; preds = %23
%27 = add nuw nsw i32 %7, 1
%28 = icmp eq i32 %27, 10
br i1 %28, label %29, label %6
29: ; preds = %26
%30 = add nuw nsw i32 %4, 1
%31 = icmp eq i32 %30, 10
br i1 %31, label %32, label %3
32: ; preds = %29
ret i32 0
}