#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 standard_row_reduce_system(int);
int syscon_read_standard_system();
int syscon_write_standard_system();
int standard_reducer(void) {
  int fail, dim, i;
  fail = syscon_read_standard_system();
  if (fail == 0) {
    printf("\nThe system in the container : \n");
    fail = syscon_write_standard_system();
    fail = standard_row_reduce_system(1);
    printf("\nThe system after reduction : \n");
    fail = syscon_write_standard_system();
  }
  return fail;
}


x86 assembly (clang, -O0):
<standard_reducer>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1060 <syscon_read_standard_system@plt>
mov    %eax,-0x4(%rbp)
cmpl   $0x0,-0x4(%rbp)
jne    1195 <standard_reducer+0x55>
lea    0xe9d(%rip),%rdi
call   1030 <printf@plt>
mov    $0x0,%al
call   1040 <syscon_write_standard_system@plt>
mov    %eax,-0x4(%rbp)
mov    $0x1,%edi
call   1050 <standard_row_reduce_system@plt>
mov    %eax,-0x4(%rbp)
lea    0xe9b(%rip),%rdi
call   1030 <printf@plt>
mov    $0x0,%al
call   1040 <syscon_write_standard_system@plt>
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<standard_reducer>:
push   %rax
xor    %eax,%eax
call   1060 <syscon_read_standard_system@plt>
test   %eax,%eax
je     114e <standard_reducer+0xe>
pop    %rcx
ret
lea    0xeab(%rip),%rdi
call   1030 <puts@plt>
xor    %eax,%eax
call   1040 <syscon_write_standard_system@plt>
mov    $0x1,%edi
call   1050 <standard_row_reduce_system@plt>
lea    0xeae(%rip),%rdi
call   1030 <puts@plt>
xor    %eax,%eax
pop    %rcx
jmp    1040 <syscon_write_standard_system@plt>

LLVM IR (-O0):
@.str = [33 x i8] c"\0AThe system in the container : \0A\00"
@.str.1 = [32 x i8] c"\0AThe system after reduction : \0A\00"
define i32 @standard_reducer() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = call i32 (...) @syscon_read_standard_system()
store i32 %4, i32* %1
%5 = load i32, i32* %1
%6 = icmp eq i32 %5, 0
br i1 %6, label %7, label %13
7: ; preds = %0
%8 = call i32 @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* %1
%10 = call i32 @standard_row_reduce_system(i32 1)
store i32 %10, i32* %1
%11 = call i32 @printf(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str.1, i64 0, i64 0))
%12 = call i32 (...) @syscon_write_standard_system()
store i32 %12, i32* %1
br label %13
13: ; preds = %7, %0
%14 = load i32, i32* %1
ret i32 %14
}

LLVM IR (-O2):
@str = [32 x i8] c"\0AThe system in the container : \00"
@str.2 = [31 x i8] c"\0AThe system after reduction : \00"
define i32 @standard_reducer() {
%1 = tail call i32 (...) @syscon_read_standard_system()
%2 = icmp eq i32 %1, 0
br i1 %2, label %3, label %9
3: ; preds = %0
%4 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([32 x i8], [32 x i8]* @str, i64 0, i64 0))
%5 = tail call i32 (...) @syscon_write_standard_system()
%6 = tail call i32 @standard_row_reduce_system(i32 1)
%7 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([31 x i8], [31 x i8]* @str.2, i64 0, i64 0))
%8 = tail call i32 (...) @syscon_write_standard_system()
br label %9
9: ; preds = %3, %0
%10 = phi i32 [ %8, %3 ], [ %1, %0 ]
ret i32 %10
}