#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_dobldobl_start_solutions_to_container();
int initialize_dobldobl_homotopy(int);
int initialize_dobldobl_solution(int);
int /*<<< orphan*/ printf(char *, ...);
int read_dobldobl_start_system();
int read_dobldobl_target_system();
int /*<<< orphan*/ scanf(char *, int *);
int solcon_number_of_dobldobl_solutions(int *);
int call_initialize_dobldobl_homotopy(int *index) {
  int fail, len, fixed;
  fail = read_dobldobl_target_system();
  fail = read_dobldobl_start_system();
  fail = copy_dobldobl_start_solutions_to_container();
  fail = solcon_number_of_dobldobl_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_dobldobl_homotopy(fixed);
  fail = initialize_dobldobl_solution(*index);
  return fail;
}


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

x86 assembly (clang, -O2):
<call_initialize_dobldobl_homotopy>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%r14
xor    %eax,%eax
call   1030 <read_dobldobl_target_system@plt>
xor    %eax,%eax
call   10a0 <read_dobldobl_start_system@plt>
xor    %eax,%eax
call   1040 <copy_dobldobl_start_solutions_to_container@plt>
lea    0x4(%rsp),%rdi
call   1060 <solcon_number_of_dobldobl_solutions@plt>
mov    0x4(%rsp),%esi
lea    0xe4f(%rip),%rdi
xor    %eax,%eax
call   1050 <printf@plt>
lea    0xe61(%rip),%rdi
xor    %eax,%eax
call   1050 <printf@plt>
lea    0xe70(%rip),%rbx
mov    %rbx,%rdi
mov    %r14,%rsi
call   1070 <scanf@plt>
lea    0xe61(%rip),%rdi
xor    %eax,%eax
call   1050 <printf@plt>
mov    %rsp,%rsi
mov    %rbx,%rdi
call   1070 <scanf@plt>
mov    (%rsp),%edi
call   1090 <initialize_dobldobl_homotopy@plt>
mov    (%r14),%edi
call   1080 <initialize_dobldobl_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_dobldobl_homotopy(i32* %0) {
%2 = alloca i32*
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
store i32* %0, i32** %2
%6 = call i32 (...) @read_dobldobl_target_system()
store i32 %6, i32* %3
%7 = call i32 (...) @read_dobldobl_start_system()
store i32 %7, i32* %3
%8 = call i32 (...) @copy_dobldobl_start_solutions_to_container()
store i32 %8, i32* %3
%9 = call i32 @solcon_number_of_dobldobl_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_dobldobl_homotopy(i32 %17)
store i32 %18, i32* %3
%19 = load i32*, i32** %2
%20 = load i32, i32* %19
%21 = call i32 @initialize_dobldobl_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_dobldobl_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_dobldobl_target_system()
%7 = tail call i32 (...) @read_dobldobl_start_system()
%8 = tail call i32 (...) @copy_dobldobl_start_solutions_to_container()
%9 = call i32 @solcon_number_of_dobldobl_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_dobldobl_homotopy(i32 %16)
%18 = load i32, i32* %0
%19 = call i32 @initialize_dobldobl_solution(i32 %18)
ret i32 %19
}