#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*/ funkcja(int);
int /*<<< orphan*/ printf(char *, ...);
int /*<<< orphan*/ scanf(char *, int *);
int main() {
  int powt;
  printf("Podaj liczbę powtórzeń: ");
  scanf("%d", &powt);
  printf("%d:\t%Lf\n", powt, funkcja(powt));
  printf("10:\t%Lf\n", funkcja(10));
  printf("100:\t%Lf\n", funkcja(100));
  printf("1000:\t%Lf\n", funkcja(1000));
  printf("1000000:%Lf\n", funkcja(1000000));
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    0xec1(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xecf(%rip),%rdi
lea    -0x4(%rbp),%rsi
call   1050 <scanf@plt>
mov    -0x4(%rbp),%eax
mov    %eax,-0x8(%rbp)
mov    -0x4(%rbp),%edi
call   1040 <funkcja@plt>
mov    -0x8(%rbp),%esi
mov    %eax,%edx
lea    0xeaf(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    $0xa,%edi
call   1040 <funkcja@plt>
mov    %eax,%esi
lea    0xe9e(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    $0x64,%edi
call   1040 <funkcja@plt>
mov    %eax,%esi
lea    0xe8d(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    $0x3e8,%edi
call   1040 <funkcja@plt>
mov    %eax,%esi
lea    0xe7d(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    $0xf4240,%edi
call   1040 <funkcja@plt>
mov    %eax,%esi
lea    0xe6e(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x10,%rsp
lea    0xec4(%rip),%rdi
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xed2(%rip),%rdi
lea    0xc(%rsp),%rsi
call   1050 <scanf@plt>
mov    0xc(%rsp),%ebx
mov    %ebx,%edi
call   1040 <funkcja@plt>
lea    0xeb9(%rip),%rdi
mov    %ebx,%esi
mov    %eax,%edx
xor    %eax,%eax
call   1030 <printf@plt>
mov    $0xa,%edi
call   1040 <funkcja@plt>
lea    0xea6(%rip),%rdi
mov    %eax,%esi
xor    %eax,%eax
call   1030 <printf@plt>
mov    $0x64,%edi
call   1040 <funkcja@plt>
lea    0xe95(%rip),%rdi
mov    %eax,%esi
xor    %eax,%eax
call   1030 <printf@plt>
mov    $0x3e8,%edi
call   1040 <funkcja@plt>
lea    0xe85(%rip),%rdi
mov    %eax,%esi
xor    %eax,%eax
call   1030 <printf@plt>
mov    $0xf4240,%edi
call   1040 <funkcja@plt>
lea    0xe76(%rip),%rdi
mov    %eax,%esi
xor    %eax,%eax
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@.str = [28 x i8] c"Podaj liczb\C4\99 powt\C3\B3rze\C5\84: \00"
@.str.1 = [3 x i8] c"%d\00"
@.str.2 = [9 x i8] c"%d:\09%Lf\0A\00"
@.str.3 = [9 x i8] c"10:\09%Lf\0A\00"
@.str.4 = [10 x i8] c"100:\09%Lf\0A\00"
@.str.5 = [11 x i8] c"1000:\09%Lf\0A\00"
@.str.6 = [13 x i8] c"1000000:%Lf\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str, i64 0, i64 0))
%3 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %1)
%4 = load i32, i32* %1
%5 = load i32, i32* %1
%6 = call i32 @funkcja(i32 %5)
%7 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.2, i64 0, i64 0), i32 %4, i32 %6)
%8 = call i32 @funkcja(i32 10)
%9 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.3, i64 0, i64 0), i32 %8)
%10 = call i32 @funkcja(i32 100)
%11 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.4, i64 0, i64 0), i32 %10)
%12 = call i32 @funkcja(i32 1000)
%13 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.5, i64 0, i64 0), i32 %12)
%14 = call i32 @funkcja(i32 1000000)
%15 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.6, i64 0, i64 0), i32 %14)
ret i32 0
}

LLVM IR (-O2):
@.str = [28 x i8] c"Podaj liczb\C4\99 powt\C3\B3rze\C5\84: \00"
@.str.1 = [3 x i8] c"%d\00"
@.str.2 = [9 x i8] c"%d:\09%Lf\0A\00"
@.str.3 = [9 x i8] c"10:\09%Lf\0A\00"
@.str.4 = [10 x i8] c"100:\09%Lf\0A\00"
@.str.5 = [11 x i8] c"1000:\09%Lf\0A\00"
@.str.6 = [13 x i8] c"1000000:%Lf\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
%3 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([28 x i8], [28 x i8]* @.str, i64 0, i64 0))
%4 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %1)
%5 = load i32, i32* %1
%6 = call i32 @funkcja(i32 %5)
%7 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([9 x i8], [9 x i8]* @.str.2, i64 0, i64 0), i32 %5, i32 %6)
%8 = call i32 @funkcja(i32 10)
%9 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([9 x i8], [9 x i8]* @.str.3, i64 0, i64 0), i32 %8)
%10 = call i32 @funkcja(i32 100)
%11 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([10 x i8], [10 x i8]* @.str.4, i64 0, i64 0), i32 %10)
%12 = call i32 @funkcja(i32 1000)
%13 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([11 x i8], [11 x i8]* @.str.5, i64 0, i64 0), i32 %12)
%14 = call i32 @funkcja(i32 1000000)
%15 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([13 x i8], [13 x i8]* @.str.6, i64 0, i64 0), i32 %14)
ret i32 0
}