#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 copy_quaddobl_start_solutions_to_container();
int initialize_quaddobl_homotopy(int);
int initialize_quaddobl_solution(int);
int /*<<< orphan*/ printf(char *, ...);
int read_quaddobl_start_system();
int read_quaddobl_target_system();
int /*<<< orphan*/ scanf(char *, int *);
int solcon_number_of_quaddobl_solutions(int *);
int call_initialize_quaddobl_homotopy(int *index) {
  int fail, len, fixed;
  fail = read_quaddobl_target_system();
  fail = read_quaddobl_start_system();
  fail = copy_quaddobl_start_solutions_to_container();
  fail = solcon_number_of_quaddobl_solutions(&len);
  printf("Number of start solutions : %d\n", len);
  printf("-> give index of solution : ");
  scanf("%d", index);
  printf("Fixed gamma constant ? (1 = yes/0 = no) ");
  scanf("%d", &fixed);
  fail = initialize_quaddobl_homotopy(fixed);
  fail = initialize_quaddobl_solution(*index);
  return fail;
}


x86 assembly (clang, -O0):
<call_initialize_quaddobl_homotopy>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    $0x0,%al
call   1040 <read_quaddobl_target_system@plt>
mov    %eax,-0xc(%rbp)
mov    $0x0,%al
call   1030 <read_quaddobl_start_system@plt>
mov    %eax,-0xc(%rbp)
mov    $0x0,%al
call   1080 <copy_quaddobl_start_solutions_to_container@plt>
mov    %eax,-0xc(%rbp)
lea    -0x10(%rbp),%rdi
call   1050 <solcon_number_of_quaddobl_solutions@plt>
mov    %eax,-0xc(%rbp)
mov    -0x10(%rbp),%esi
lea    0xe40(%rip),%rdi
mov    $0x0,%al
call   1060 <printf@plt>
lea    0xe52(%rip),%rdi
mov    $0x0,%al
call   1060 <printf@plt>
mov    -0x8(%rbp),%rsi
lea    0xe5d(%rip),%rdi
call   1090 <scanf@plt>
lea    0xe54(%rip),%rdi
mov    $0x0,%al
call   1060 <printf@plt>
lea    0xe43(%rip),%rdi
lea    -0x14(%rbp),%rsi
call   1090 <scanf@plt>
mov    -0x14(%rbp),%edi
call   10a0 <initialize_quaddobl_homotopy@plt>
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%edi
call   1070 <initialize_quaddobl_solution@plt>
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<call_initialize_quaddobl_homotopy>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%r14
xor    %eax,%eax
call   1040 <read_quaddobl_target_system@plt>
xor    %eax,%eax
call   1030 <read_quaddobl_start_system@plt>
xor    %eax,%eax
call   1080 <copy_quaddobl_start_solutions_to_container@plt>
lea    0x4(%rsp),%rdi
call   1050 <solcon_number_of_quaddobl_solutions@plt>
mov    0x4(%rsp),%esi
lea    0xe4f(%rip),%rdi
xor    %eax,%eax
call   1060 <printf@plt>
lea    0xe61(%rip),%rdi
xor    %eax,%eax
call   1060 <printf@plt>
lea    0xe70(%rip),%rbx
mov    %rbx,%rdi
mov    %r14,%rsi
call   1090 <scanf@plt>
lea    0xe61(%rip),%rdi
xor    %eax,%eax
call   1060 <printf@plt>
mov    %rsp,%rsi
mov    %rbx,%rdi
call   1090 <scanf@plt>
mov    (%rsp),%edi
call   10a0 <initialize_quaddobl_homotopy@plt>
mov    (%r14),%edi
call   1070 <initialize_quaddobl_solution@plt>
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@.str = [32 x i8] c"Number of start solutions : %d\0A\00"
@.str.1 = [29 x i8] c"-> give index of solution : \00"
@.str.2 = [3 x i8] c"%d\00"
@.str.3 = [41 x i8] c"Fixed gamma constant ? (1 = yes/0 = no) \00"
define i32 @call_initialize_quaddobl_homotopy(i32* %0) {
%2 = alloca i32*
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
store i32* %0, i32** %2
%6 = call i32 (...) @read_quaddobl_target_system()
store i32 %6, i32* %3
%7 = call i32 (...) @read_quaddobl_start_system()
store i32 %7, i32* %3
%8 = call i32 (...) @copy_quaddobl_start_solutions_to_container()
store i32 %8, i32* %3
%9 = call i32 @solcon_number_of_quaddobl_solutions(i32* %4)
store i32 %9, i32* %3
%10 = load i32, i32* %4
%11 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str, i64 0, i64 0), i32 %10)
%12 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0))
%13 = load i32*, i32** %2
%14 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0), i32* %13)
%15 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([41 x i8], [41 x i8]* @.str.3, i64 0, i64 0))
%16 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0), i32* %5)
%17 = load i32, i32* %5
%18 = call i32 @initialize_quaddobl_homotopy(i32 %17)
store i32 %18, i32* %3
%19 = load i32*, i32** %2
%20 = load i32, i32* %19
%21 = call i32 @initialize_quaddobl_solution(i32 %20)
store i32 %21, i32* %3
%22 = load i32, i32* %3
ret i32 %22
}

LLVM IR (-O2):
@.str = [32 x i8] c"Number of start solutions : %d\0A\00"
@.str.1 = [29 x i8] c"-> give index of solution : \00"
@.str.2 = [3 x i8] c"%d\00"
@.str.3 = [41 x i8] c"Fixed gamma constant ? (1 = yes/0 = no) \00"
define i32 @call_initialize_quaddobl_homotopy(i32* %0) {
%2 = alloca i32
%3 = alloca i32
%4 = bitcast i32* %2 to i8*
%5 = bitcast i32* %3 to i8*
%6 = tail call i32 (...) @read_quaddobl_target_system()
%7 = tail call i32 (...) @read_quaddobl_start_system()
%8 = tail call i32 (...) @copy_quaddobl_start_solutions_to_container()
%9 = call i32 @solcon_number_of_quaddobl_solutions(i32* %2)
%10 = load i32, i32* %2
%11 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([32 x i8], [32 x i8]* @.str, i64 0, i64 0), i32 %10)
%12 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0))
%13 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0), i32* %0)
%14 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([41 x i8], [41 x i8]* @.str.3, i64 0, i64 0))
%15 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0), i32* %3)
%16 = load i32, i32* %3
%17 = call i32 @initialize_quaddobl_homotopy(i32 %16)
%18 = load i32, i32* %0
%19 = call i32 @initialize_quaddobl_solution(i32 %18)
ret i32 %19
}