#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*/ printf(char *);
int /*<<< orphan*/ solcon_write_dobldobl_solutions();
int /*<<< orphan*/ solcon_write_quaddobl_solutions();
int /*<<< orphan*/ solcon_write_standard_solutions();
int /*<<< orphan*/ syscon_write_dobldobl_system();
int /*<<< orphan*/ syscon_write_quaddobl_system();
int /*<<< orphan*/ syscon_write_standard_system();
void write_results(int prec) {
  if (prec == 0) {
    printf("THE SYSTEM SOLVED :\n");
    syscon_write_standard_system();
    printf("THE SOLUTIONS : \n");
    solcon_write_standard_solutions();
  }
  if (prec == 1) {
    printf("THE SYSTEM SOLVED :\n");
    syscon_write_dobldobl_system();
    printf("THE SOLUTIONS : \n");
    solcon_write_dobldobl_solutions();
  }
  if (prec == 2) {
    printf("THE SYSTEM SOLVED :\n");
    syscon_write_quaddobl_system();
    printf("THE SOLUTIONS : \n");
    solcon_write_quaddobl_solutions();
  }
}


x86 assembly (clang, -O0):
<write_results>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
cmpl   $0x0,-0x4(%rbp)
jne    11ab <write_results+0x3b>
lea    0xe74(%rip),%rdi
call   1050 <printf@plt>
mov    $0x0,%al
call   1090 <syscon_write_standard_system@plt>
lea    0xe76(%rip),%rdi
call   1050 <printf@plt>
mov    $0x0,%al
call   1080 <solcon_write_standard_solutions@plt>
cmpl   $0x1,-0x4(%rbp)
jne    11db <write_results+0x6b>
lea    0xe44(%rip),%rdi
call   1050 <printf@plt>
mov    $0x0,%al
call   1040 <syscon_write_dobldobl_system@plt>
lea    0xe46(%rip),%rdi
call   1050 <printf@plt>
mov    $0x0,%al
call   1060 <solcon_write_dobldobl_solutions@plt>
cmpl   $0x2,-0x4(%rbp)
jne    120b <write_results+0x9b>
lea    0xe14(%rip),%rdi
call   1050 <printf@plt>
mov    $0x0,%al
call   1070 <syscon_write_quaddobl_system@plt>
lea    0xe16(%rip),%rdi
call   1050 <printf@plt>
mov    $0x0,%al
call   1030 <solcon_write_quaddobl_solutions@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<write_results>:
push   %rax
cmp    $0x2,%edi
je     11a6 <write_results+0x36>
cmp    $0x1,%edi
je     11cd <write_results+0x5d>
test   %edi,%edi
jne    11f4 <write_results+0x84>
lea    0xe7a(%rip),%rdi
call   1050 <puts@plt>
xor    %eax,%eax
call   1090 <syscon_write_standard_system@plt>
lea    0xe7b(%rip),%rdi
call   1050 <puts@plt>
xor    %eax,%eax
pop    %rcx
jmp    1080 <solcon_write_standard_solutions@plt>
lea    0xe53(%rip),%rdi
call   1050 <puts@plt>
xor    %eax,%eax
call   1070 <syscon_write_quaddobl_system@plt>
lea    0xe54(%rip),%rdi
call   1050 <puts@plt>
xor    %eax,%eax
pop    %rcx
jmp    1030 <solcon_write_quaddobl_solutions@plt>
lea    0xe2c(%rip),%rdi
call   1050 <puts@plt>
xor    %eax,%eax
call   1040 <syscon_write_dobldobl_system@plt>
lea    0xe2d(%rip),%rdi
call   1050 <puts@plt>
xor    %eax,%eax
pop    %rcx
jmp    1060 <solcon_write_dobldobl_solutions@plt>
pop    %rax
ret

LLVM IR (-O0):
@.str = [21 x i8] c"THE SYSTEM SOLVED :\0A\00"
@.str.1 = [18 x i8] c"THE SOLUTIONS : \0A\00"
define void @write_results(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = icmp eq i32 %3, 0
br i1 %4, label %5, label %10
5: ; preds = %1
%6 = call i32 @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str, i64 0, i64 0))
%7 = call i32 (...) @syscon_write_standard_system()
%8 = call i32 @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.1, i64 0, i64 0))
%9 = call i32 (...) @solcon_write_standard_solutions()
br label %10
10: ; preds = %5, %1
%11 = load i32, i32* %2
%12 = icmp eq i32 %11, 1
br i1 %12, label %13, label %18
13: ; preds = %10
%14 = call i32 @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str, i64 0, i64 0))
%15 = call i32 (...) @syscon_write_dobldobl_system()
%16 = call i32 @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.1, i64 0, i64 0))
%17 = call i32 (...) @solcon_write_dobldobl_solutions()
br label %18
18: ; preds = %13, %10
%19 = load i32, i32* %2
%20 = icmp eq i32 %19, 2
br i1 %20, label %21, label %26
21: ; preds = %18
%22 = call i32 @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str, i64 0, i64 0))
%23 = call i32 (...) @syscon_write_quaddobl_system()
%24 = call i32 @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.1, i64 0, i64 0))
%25 = call i32 (...) @solcon_write_quaddobl_solutions()
br label %26
26: ; preds = %21, %18
ret void
}

LLVM IR (-O2):
@str.5 = [20 x i8] c"THE SYSTEM SOLVED :\00"
@str.6 = [17 x i8] c"THE SOLUTIONS : \00"
define void @write_results(i32 %0) {
switch i32 %0, label %17 [
i32 0, label %2
i32 1, label %7
i32 2, label %12
]
2: ; preds = %1
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([20 x i8], [20 x i8]* @str.5, i64 0, i64 0))
%4 = tail call i32 (...) @syscon_write_standard_system()
%5 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([17 x i8], [17 x i8]* @str.6, i64 0, i64 0))
%6 = tail call i32 (...) @solcon_write_standard_solutions()
br label %17
7: ; preds = %1
%8 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([20 x i8], [20 x i8]* @str.5, i64 0, i64 0))
%9 = tail call i32 (...) @syscon_write_dobldobl_system()
%10 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([17 x i8], [17 x i8]* @str.6, i64 0, i64 0))
%11 = tail call i32 (...) @solcon_write_dobldobl_solutions()
br label %17
12: ; preds = %1
%13 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([20 x i8], [20 x i8]* @str.5, i64 0, i64 0))
%14 = tail call i32 (...) @syscon_write_quaddobl_system()
%15 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([17 x i8], [17 x i8]* @str.6, i64 0, i64 0))
%16 = tail call i32 (...) @solcon_write_quaddobl_solutions()
br label %17
17: ; preds = %7, %2, %1, %12
ret void
}