#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*/ fzz_calculateOutput();
int /*<<< orphan*/ fzz_deinit();
double fzz_getOutput(int /*<<< orphan*/);
int /*<<< orphan*/ fzz_setInput(int, double);
int /*<<< orphan*/ printf(char *, ...);
void gettingOutputExample() {
  int i = 0;
  printf("\nSetting input to (0.2, 1.25)");
  fzz_setInput(0, 0.2);
  fzz_setInput(1, 1.25);
  printf(" ... completed\n");
  printf("\nCalculating output ...");
  fzz_calculateOutput();
  printf(" completed\n");
  printf("\nGetting output\n");
  printf("output%d: %f\n", i, fzz_getOutput(0));
  printf("... completed\n");
  fzz_deinit();
}


x86 assembly (clang, -O0):
<gettingOutputExample>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeaa(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
xor    %edi,%edi
movsd  0xe91(%rip),%xmm0
call   1030 <fzz_setInput@plt>
mov    $0x1,%edi
movsd  0xe77(%rip),%xmm0
call   1030 <fzz_setInput@plt>
lea    0xe99(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
lea    0xe9b(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    $0x0,%al
call   1050 <fzz_calculateOutput@plt>
lea    0xe7a(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
lea    0xe90(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    -0x4(%rbp),%eax
mov    %eax,-0x8(%rbp)
xor    %edi,%edi
call   1060 <fzz_getOutput@plt>
mov    -0x8(%rbp),%esi
lea    0xe83(%rip),%rdi
mov    $0x1,%al
call   1040 <printf@plt>
lea    0xe3d(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    $0x0,%al
call   1070 <fzz_deinit@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<gettingOutputExample>:
push   %rax
lea    0xea8(%rip),%rdi
xor    %eax,%eax
call   1050 <printf@plt>
movsd  0xe89(%rip),%xmm0
xor    %edi,%edi
call   1040 <fzz_setInput@plt>
movsd  0xe82(%rip),%xmm0
mov    $0x1,%edi
call   1040 <fzz_setInput@plt>
lea    0xebd(%rip),%rdi
call   1030 <puts@plt>
lea    0xe8b(%rip),%rdi
xor    %eax,%eax
call   1050 <printf@plt>
xor    %eax,%eax
call   1060 <fzz_calculateOutput@plt>
lea    0xea0(%rip),%rdi
call   1030 <puts@plt>
lea    0xe9f(%rip),%rdi
call   1030 <puts@plt>
xor    %edi,%edi
call   1070 <fzz_getOutput@plt>
lea    0xe6f(%rip),%rdi
xor    %esi,%esi
mov    $0x1,%al
call   1050 <printf@plt>
lea    0xe6e(%rip),%rdi
call   1030 <puts@plt>
xor    %eax,%eax
pop    %rcx
jmp    1080 <fzz_deinit@plt>

LLVM IR (-O0):
@.str = [30 x i8] c"\0ASetting input to (0.2, 1.25)\00"
@.str.1 = [16 x i8] c" ... completed\0A\00"
@.str.2 = [24 x i8] c"\0ACalculating output ...\00"
@.str.3 = [12 x i8] c" completed\0A\00"
@.str.4 = [17 x i8] c"\0AGetting output\0A\00"
@.str.5 = [14 x i8] c"output%d: %f\0A\00"
@.str.6 = [15 x i8] c"... completed\0A\00"
define void @gettingOutputExample() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str, i64 0, i64 0))
%3 = call i32 @fzz_setInput(i32 0, double 2.000000e-01)
%4 = call i32 @fzz_setInput(i32 1, double 1.250000e+00)
%5 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.1, i64 0, i64 0))
%6 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.2, i64 0, i64 0))
%7 = call i32 (...) @fzz_calculateOutput()
%8 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.3, i64 0, i64 0))
%9 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.4, i64 0, i64 0))
%10 = load i32, i32* %1
%11 = call double @fzz_getOutput(i32 0)
%12 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.5, i64 0, i64 0), i32 %10, double %11)
%13 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.6, i64 0, i64 0))
%14 = call i32 (...) @fzz_deinit()
ret void
}

LLVM IR (-O2):
@.str = [30 x i8] c"\0ASetting input to (0.2, 1.25)\00"
@.str.2 = [24 x i8] c"\0ACalculating output ...\00"
@.str.5 = [14 x i8] c"output%d: %f\0A\00"
@str = [15 x i8] c" ... completed\00"
@str.7 = [11 x i8] c" completed\00"
@str.8 = [16 x i8] c"\0AGetting output\00"
@str.9 = [14 x i8] c"... completed\00"
define void @gettingOutputExample() {
%1 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([30 x i8], [30 x i8]* @.str, i64 0, i64 0))
%2 = tail call i32 @fzz_setInput(i32 0, double 2.000000e-01)
%3 = tail call i32 @fzz_setInput(i32 1, double 1.250000e+00)
%4 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([15 x i8], [15 x i8]* @str, i64 0, i64 0))
%5 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([24 x i8], [24 x i8]* @.str.2, i64 0, i64 0))
%6 = tail call i32 (...) @fzz_calculateOutput()
%7 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([11 x i8], [11 x i8]* @str.7, i64 0, i64 0))
%8 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([16 x i8], [16 x i8]* @str.8, i64 0, i64 0))
%9 = tail call double @fzz_getOutput(i32 0)
%10 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([14 x i8], [14 x i8]* @.str.5, i64 0, i64 0), i32 0, double %9)
%11 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([14 x i8], [14 x i8]* @str.9, i64 0, i64 0))
%12 = tail call i32 (...) @fzz_deinit()
ret void
}