#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 EXIT_SUCCESS;
double dwumian(double, double, unsigned int);
int /*<<< orphan*/ printf(char *, ...);
int /*<<< orphan*/ scanf(char *, ...);
int main(int argc, char *argv[]) {
  unsigned n;
  double a, b;
  printf("Podaj n: ");
  scanf("%u", &n);
  printf("Podaj a: ");
  scanf("%lf", &a);
  printf("Podaj b: ");
  scanf("%lf", &b);
  printf("( %f + %f ) ^ %u = %f\n", a, b, n, dwumian(a, b, n));
  return EXIT_SUCCESS;
}


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)
lea    0xeb3(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
lea    0xeaf(%rip),%rdi
lea    -0x14(%rbp),%rsi
mov    $0x0,%al
call   1050 <scanf@plt>
lea    0xea0(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
lea    0xe9c(%rip),%rdi
lea    -0x20(%rbp),%rsi
mov    $0x0,%al
call   1050 <scanf@plt>
lea    0xe8e(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
lea    0xe7c(%rip),%rdi
lea    -0x28(%rbp),%rsi
mov    $0x0,%al
call   1050 <scanf@plt>
movsd  -0x20(%rbp),%xmm0
movsd  %xmm0,-0x30(%rbp)
movsd  -0x28(%rbp),%xmm0
movsd  %xmm0,-0x40(%rbp)
mov    -0x14(%rbp),%eax
mov    %eax,-0x34(%rbp)
movsd  -0x20(%rbp),%xmm0
movsd  -0x28(%rbp),%xmm1
mov    -0x14(%rbp),%edi
call   1030 <dwumian@plt>
movsd  -0x40(%rbp),%xmm1
mov    -0x34(%rbp),%esi
movaps %xmm0,%xmm2
movsd  -0x30(%rbp),%xmm0
lea    0xe3c(%rip),%rdi
mov    $0x3,%al
call   1040 <printf@plt>
mov    0x2de9(%rip),%rax
mov    (%rax),%eax
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x30,%rsp
lea    0xec4(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xec0(%rip),%rdi
lea    0xc(%rsp),%rsi
xor    %eax,%eax
call   1050 <scanf@plt>
lea    0xeb0(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xeac(%rip),%rbx
lea    0x28(%rsp),%rsi
mov    %rbx,%rdi
xor    %eax,%eax
call   1050 <scanf@plt>
lea    0xe9a(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0x20(%rsp),%rsi
mov    %rbx,%rdi
xor    %eax,%eax
call   1050 <scanf@plt>
movsd  0x28(%rsp),%xmm0
movsd  %xmm0,0x18(%rsp)
movsd  0x20(%rsp),%xmm1
movsd  %xmm1,0x10(%rsp)
mov    0xc(%rsp),%ebx
mov    %ebx,%edi
call   1030 <dwumian@plt>
movaps %xmm0,%xmm2
lea    0xe61(%rip),%rdi
movsd  0x18(%rsp),%xmm0
movsd  0x10(%rsp),%xmm1
mov    %ebx,%esi
mov    $0x3,%al
call   1040 <printf@plt>
mov    0x2e00(%rip),%rax
mov    (%rax),%eax
add    $0x30,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@.str = [10 x i8] c"Podaj n: \00"
@.str.1 = [3 x i8] c"%u\00"
@.str.2 = [10 x i8] c"Podaj a: \00"
@.str.3 = [4 x i8] c"%lf\00"
@.str.4 = [10 x i8] c"Podaj b: \00"
@.str.5 = [23 x i8] c"( %f + %f ) ^ %u = %f\0A\00"
@EXIT_SUCCESS = global i32 0
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i32
%7 = alloca double
%8 = alloca double
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%9 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0))
%10 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %6)
%11 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.2, i64 0, i64 0))
%12 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.3, i64 0, i64 0), double* %7)
%13 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.4, i64 0, i64 0))
%14 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.3, i64 0, i64 0), double* %8)
%15 = load double, double* %7
%16 = load double, double* %8
%17 = load i32, i32* %6
%18 = load double, double* %7
%19 = load double, double* %8
%20 = load i32, i32* %6
%21 = call double @dwumian(double %18, double %19, i32 %20)
%22 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.5, i64 0, i64 0), double %15, double %16, i32 %17, double %21)
%23 = load i32, i32* @EXIT_SUCCESS
ret i32 %23
}

LLVM IR (-O2):
@.str = [10 x i8] c"Podaj n: \00"
@.str.1 = [3 x i8] c"%u\00"
@.str.2 = [10 x i8] c"Podaj a: \00"
@.str.3 = [4 x i8] c"%lf\00"
@.str.4 = [10 x i8] c"Podaj b: \00"
@.str.5 = [23 x i8] c"( %f + %f ) ^ %u = %f\0A\00"
@EXIT_SUCCESS = global i32 0
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = alloca i32
%4 = alloca double
%5 = alloca double
%6 = bitcast i32* %3 to i8*
%7 = bitcast double* %4 to i8*
%8 = bitcast double* %5 to i8*
%9 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0))
%10 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %3)
%11 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([10 x i8], [10 x i8]* @.str.2, i64 0, i64 0))
%12 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.3, i64 0, i64 0), double* %4)
%13 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([10 x i8], [10 x i8]* @.str.4, i64 0, i64 0))
%14 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.3, i64 0, i64 0), double* %5)
%15 = load double, double* %4
%16 = load double, double* %5
%17 = load i32, i32* %3
%18 = call double @dwumian(double %15, double %16, i32 %17)
%19 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([23 x i8], [23 x i8]* @.str.5, i64 0, i64 0), double %15, double %16, i32 %17, double %18)
%20 = load i32, i32* @EXIT_SUCCESS
ret i32 %20
}