#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*/ codeln(char *);
int /*<<< orphan*/ popIndent();
int /*<<< orphan*/ pushIndent();
void cfg_quadratic() {
  codeln("void cfg_quadratic (float threshold) {");
  pushIndent();
  codeln("q_Ts  = 1.0 - threshold;");
  codeln("q_Tsi = 1.0 / q_Ts;");
  codeln("q_Ta  = 1.0 + threshold;");
  codeln("q_Tn  = 0.5 * q_Ta;");
  codeln("q_Tni = 1.0 / q_Tn;");
  codeln("q_Th  = threshold;");
  codeln("printf (\"\\rTHR=%10.4f\", threshold);");
  codeln("fflush (stdout);");
  popIndent();
  codeln("}");
}


x86 assembly (clang, -O0):
<cfg_quadratic>:
push   %rbp
mov    %rsp,%rbp
lea    0xec5(%rip),%rdi
call   1040 <codeln@plt>
mov    $0x0,%al
call   1030 <pushIndent@plt>
lea    0xed9(%rip),%rdi
call   1040 <codeln@plt>
lea    0xee6(%rip),%rdi
call   1040 <codeln@plt>
lea    0xeee(%rip),%rdi
call   1040 <codeln@plt>
lea    0xefb(%rip),%rdi
call   1040 <codeln@plt>
lea    0xf03(%rip),%rdi
call   1040 <codeln@plt>
lea    0xf0b(%rip),%rdi
call   1040 <codeln@plt>
lea    0xf12(%rip),%rdi
call   1040 <codeln@plt>
lea    0xf2a(%rip),%rdi
call   1040 <codeln@plt>
mov    $0x0,%al
call   1050 <popIndent@plt>
lea    0xf28(%rip),%rdi
call   1040 <codeln@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<cfg_quadratic>:
push   %rax
lea    0xec8(%rip),%rdi
call   1040 <codeln@plt>
xor    %eax,%eax
call   1030 <pushIndent@plt>
lea    0xedc(%rip),%rdi
call   1040 <codeln@plt>
lea    0xee9(%rip),%rdi
call   1040 <codeln@plt>
lea    0xef1(%rip),%rdi
call   1040 <codeln@plt>
lea    0xefe(%rip),%rdi
call   1040 <codeln@plt>
lea    0xf06(%rip),%rdi
call   1040 <codeln@plt>
lea    0xf0e(%rip),%rdi
call   1040 <codeln@plt>
lea    0xf15(%rip),%rdi
call   1040 <codeln@plt>
lea    0xf2d(%rip),%rdi
call   1040 <codeln@plt>
xor    %eax,%eax
call   1050 <popIndent@plt>
lea    0xf2b(%rip),%rdi
pop    %rax
jmp    1040 <codeln@plt>

LLVM IR (-O0):
@.str = [39 x i8] c"void cfg_quadratic (float threshold) {\00"
@.str.1 = [25 x i8] c"q_Ts = 1.0 - threshold;\00"
@.str.2 = [20 x i8] c"q_Tsi = 1.0 / q_Ts;\00"
@.str.3 = [25 x i8] c"q_Ta = 1.0 + threshold;\00"
@.str.4 = [20 x i8] c"q_Tn = 0.5 * q_Ta;\00"
@.str.5 = [20 x i8] c"q_Tni = 1.0 / q_Tn;\00"
@.str.6 = [19 x i8] c"q_Th = threshold;\00"
@.str.7 = [36 x i8] c"printf (\22\\rTHR=%10.4f\22, threshold);\00"
@.str.8 = [17 x i8] c"fflush (stdout);\00"
@.str.9 = [2 x i8] c"}\00"
define void @cfg_quadratic() {
%1 = call i32 @codeln(i8* getelementptr inbounds ([39 x i8], [39 x i8]* @.str, i64 0, i64 0))
%2 = call i32 (...) @pushIndent()
%3 = call i32 @codeln(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.1, i64 0, i64 0))
%4 = call i32 @codeln(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.2, i64 0, i64 0))
%5 = call i32 @codeln(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.3, i64 0, i64 0))
%6 = call i32 @codeln(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.4, i64 0, i64 0))
%7 = call i32 @codeln(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.5, i64 0, i64 0))
%8 = call i32 @codeln(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.6, i64 0, i64 0))
%9 = call i32 @codeln(i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str.7, i64 0, i64 0))
%10 = call i32 @codeln(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.8, i64 0, i64 0))
%11 = call i32 (...) @popIndent()
%12 = call i32 @codeln(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.9, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [39 x i8] c"void cfg_quadratic (float threshold) {\00"
@.str.1 = [25 x i8] c"q_Ts = 1.0 - threshold;\00"
@.str.2 = [20 x i8] c"q_Tsi = 1.0 / q_Ts;\00"
@.str.3 = [25 x i8] c"q_Ta = 1.0 + threshold;\00"
@.str.4 = [20 x i8] c"q_Tn = 0.5 * q_Ta;\00"
@.str.5 = [20 x i8] c"q_Tni = 1.0 / q_Tn;\00"
@.str.6 = [19 x i8] c"q_Th = threshold;\00"
@.str.7 = [36 x i8] c"printf (\22\\rTHR=%10.4f\22, threshold);\00"
@.str.8 = [17 x i8] c"fflush (stdout);\00"
@.str.9 = [2 x i8] c"}\00"
define void @cfg_quadratic() {
%1 = tail call i32 @codeln(i8* getelementptr inbounds ([39 x i8], [39 x i8]* @.str, i64 0, i64 0))
%2 = tail call i32 (...) @pushIndent()
%3 = tail call i32 @codeln(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.1, i64 0, i64 0))
%4 = tail call i32 @codeln(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.2, i64 0, i64 0))
%5 = tail call i32 @codeln(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.3, i64 0, i64 0))
%6 = tail call i32 @codeln(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.4, i64 0, i64 0))
%7 = tail call i32 @codeln(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.5, i64 0, i64 0))
%8 = tail call i32 @codeln(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.6, i64 0, i64 0))
%9 = tail call i32 @codeln(i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str.7, i64 0, i64 0))
%10 = tail call i32 @codeln(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.8, i64 0, i64 0))
%11 = tail call i32 (...) @popIndent()
%12 = tail call i32 @codeln(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.9, i64 0, i64 0))
ret void
}