#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 celcon_dimension_of_points(int *);
int celcon_number_of_cells(int *);
int mixed_volume(int *);
int /*<<< orphan*/ printf(char *, ...);
int show_mixture(int, int *);
int syscon_read_standard_system();
int syscon_write_standard_system();
int compute_mixed_volume(void) {
  int fail, mv, len, dim, r;
  fail = syscon_read_standard_system();
  printf("\nThe system in the container : \n");
  fail = syscon_write_standard_system();
  fail = mixed_volume(&mv);
  printf("\nThe mixed volume : %d\n", mv);
  fail = celcon_number_of_cells(&len);
  printf("\nnumber of mixed cells : %d\n", len);
  fail = celcon_dimension_of_points(&dim);
  printf("dimension of the lifted points : %d\n", dim);
  fail = show_mixture(dim, &r);
}


x86 assembly (clang, -O0):
<compute_mixed_volume>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    $0x0,%al
call   1080 <syscon_read_standard_system@plt>
mov    %eax,-0x8(%rbp)
lea    0xe77(%rip),%rdi
mov    $0x0,%al
call   1060 <printf@plt>
mov    $0x0,%al
call   1070 <syscon_write_standard_system@plt>
mov    %eax,-0x8(%rbp)
lea    -0xc(%rbp),%rdi
call   1050 <mixed_volume@plt>
mov    %eax,-0x8(%rbp)
mov    -0xc(%rbp),%esi
lea    0xe71(%rip),%rdi
mov    $0x0,%al
call   1060 <printf@plt>
lea    -0x10(%rbp),%rdi
call   1040 <celcon_number_of_cells@plt>
mov    %eax,-0x8(%rbp)
mov    -0x10(%rbp),%esi
lea    0xe6c(%rip),%rdi
mov    $0x0,%al
call   1060 <printf@plt>
lea    -0x14(%rbp),%rdi
call   1090 <celcon_dimension_of_points@plt>
mov    %eax,-0x8(%rbp)
mov    -0x14(%rbp),%esi
lea    0xe6c(%rip),%rdi
mov    $0x0,%al
call   1060 <printf@plt>
mov    -0x14(%rbp),%edi
lea    -0x18(%rbp),%rsi
call   1030 <show_mixture@plt>
mov    %eax,-0x8(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<compute_mixed_volume>:
sub    $0x18,%rsp
xor    %eax,%eax
call   1090 <syscon_read_standard_system@plt>
lea    0xec8(%rip),%rdi
call   1040 <puts@plt>
xor    %eax,%eax
call   1080 <syscon_write_standard_system@plt>
lea    0x10(%rsp),%rdi
call   1060 <mixed_volume@plt>
mov    0x10(%rsp),%esi
lea    0xe4d(%rip),%rdi
xor    %eax,%eax
call   1070 <printf@plt>
lea    0xc(%rsp),%rdi
call   1050 <celcon_number_of_cells@plt>
mov    0xc(%rsp),%esi
lea    0xe49(%rip),%rdi
xor    %eax,%eax
call   1070 <printf@plt>
lea    0x8(%rsp),%rdi
call   10a0 <celcon_dimension_of_points@plt>
mov    0x8(%rsp),%esi
lea    0xe4a(%rip),%rdi
xor    %eax,%eax
call   1070 <printf@plt>
mov    0x8(%rsp),%edi
lea    0x14(%rsp),%rsi
call   1030 <show_mixture@plt>
add    $0x18,%rsp
ret

LLVM IR (-O0):
@.str = [33 x i8] c"\0AThe system in the container : \0A\00"
@.str.1 = [24 x i8] c"\0AThe mixed volume : %d\0A\00"
@.str.2 = [29 x i8] c"\0Anumber of mixed cells : %d\0A\00"
@.str.3 = [37 x i8] c"dimension of the lifted points : %d\0A\00"
define i32 @compute_mixed_volume() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
%7 = call i32 (...) @syscon_read_standard_system()
store i32 %7, i32* %2
%8 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str, i64 0, i64 0))
%9 = call i32 (...) @syscon_write_standard_system()
store i32 %9, i32* %2
%10 = call i32 @mixed_volume(i32* %3)
store i32 %10, i32* %2
%11 = load i32, i32* %3
%12 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.1, i64 0, i64 0), i32 %11)
%13 = call i32 @celcon_number_of_cells(i32* %4)
store i32 %13, i32* %2
%14 = load i32, i32* %4
%15 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.2, i64 0, i64 0), i32 %14)
%16 = call i32 @celcon_dimension_of_points(i32* %5)
store i32 %16, i32* %2
%17 = load i32, i32* %5
%18 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([37 x i8], [37 x i8]* @.str.3, i64 0, i64 0), i32 %17)
%19 = load i32, i32* %5
%20 = call i32 @show_mixture(i32 %19, i32* %6)
store i32 %20, i32* %2
%21 = load i32, i32* %1
ret i32 %21
}

LLVM IR (-O2):
@.str.1 = [24 x i8] c"\0AThe mixed volume : %d\0A\00"
@.str.2 = [29 x i8] c"\0Anumber of mixed cells : %d\0A\00"
@.str.3 = [37 x i8] c"dimension of the lifted points : %d\0A\00"
@str = [32 x i8] c"\0AThe system in the container : \00"
define i32 @compute_mixed_volume() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
%5 = bitcast i32* %1 to i8*
%6 = bitcast i32* %2 to i8*
%7 = bitcast i32* %3 to i8*
%8 = bitcast i32* %4 to i8*
%9 = tail call i32 (...) @syscon_read_standard_system()
%10 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([32 x i8], [32 x i8]* @str, i64 0, i64 0))
%11 = tail call i32 (...) @syscon_write_standard_system()
%12 = call i32 @mixed_volume(i32* %1)
%13 = load i32, i32* %1
%14 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([24 x i8], [24 x i8]* @.str.1, i64 0, i64 0), i32 %13)
%15 = call i32 @celcon_number_of_cells(i32* %2)
%16 = load i32, i32* %2
%17 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([29 x i8], [29 x i8]* @.str.2, i64 0, i64 0), i32 %16)
%18 = call i32 @celcon_dimension_of_points(i32* %3)
%19 = load i32, i32* %3
%20 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([37 x i8], [37 x i8]* @.str.3, i64 0, i64 0), i32 %19)
%21 = load i32, i32* %3
%22 = call i32 @show_mixture(i32 %21, i32* %4)
ret i32 undef
}