#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 EXIT_SUCCESS;
int /*<<< orphan*/ printf(char *);
scalar_t__ test_array();
scalar_t__ test_slist();
scalar_t__ test_slist_func();
int main(int argc, char const *argv[]) {
  bool result = true;
  result = test_array() && result;
  result = test_slist() && result;
  result = test_slist_func() && result;
  if (result) {
    printf("=== Tests réussis! ===\n");
  }
  return EXIT_SUCCESS;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x1,-0x14(%rbp)
mov    $0x0,%al
call   1050 <test_array@plt>
mov    %rax,%rcx
xor    %eax,%eax
cmp    $0x0,%rcx
mov    %al,-0x15(%rbp)
je     1180 <main+0x40>
cmpl   $0x0,-0x14(%rbp)
setne  %al
mov    %al,-0x15(%rbp)
mov    -0x15(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
mov    %eax,-0x14(%rbp)
mov    $0x0,%al
call   1030 <test_slist@plt>
mov    %rax,%rcx
xor    %eax,%eax
cmp    $0x0,%rcx
mov    %al,-0x16(%rbp)
je     11ae <main+0x6e>
cmpl   $0x0,-0x14(%rbp)
setne  %al
mov    %al,-0x16(%rbp)
mov    -0x16(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
mov    %eax,-0x14(%rbp)
mov    $0x0,%al
call   1060 <test_slist_func@plt>
mov    %rax,%rcx
xor    %eax,%eax
cmp    $0x0,%rcx
mov    %al,-0x17(%rbp)
je     11dc <main+0x9c>
cmpl   $0x0,-0x14(%rbp)
setne  %al
mov    %al,-0x17(%rbp)
mov    -0x17(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
mov    %eax,-0x14(%rbp)
cmpl   $0x0,-0x14(%rbp)
je     11fd <main+0xbd>
lea    0xe08(%rip),%rdi
call   1040 <printf@plt>
mov    0x2ddc(%rip),%rax
mov    (%rax),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r14
push   %rbx
push   %rax
xor    %eax,%eax
call   1050 <test_array@plt>
mov    %rax,%r14
xor    %eax,%eax
call   1040 <test_slist@plt>
mov    %rax,%rbx
xor    %eax,%eax
call   1060 <test_slist_func@plt>
test   %rax,%rax
je     117a <main+0x3a>
test   %rbx,%rbx
je     117a <main+0x3a>
test   %r14,%r14
je     117a <main+0x3a>
lea    0xe8b(%rip),%rdi
call   1030 <puts@plt>
mov    0x2e5f(%rip),%rax
mov    (%rax),%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@.str = [25 x i8] c"=== Tests r\C3\A9ussis! ===\0A\00"
@EXIT_SUCCESS = global i32 0
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i32
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
store i32 1, i32* %6
%7 = call i64 (...) @test_array()
%8 = icmp ne i64 %7, 0
br i1 %8, label %9, label %12
9: ; preds = %2
%10 = load i32, i32* %6
%11 = icmp ne i32 %10, 0
br label %12
12: ; preds = %9, %2
%13 = phi i1 [ false, %2 ], [ %11, %9 ]
%14 = zext i1 %13 to i32
store i32 %14, i32* %6
%15 = call i64 (...) @test_slist()
%16 = icmp ne i64 %15, 0
br i1 %16, label %17, label %20
17: ; preds = %12
%18 = load i32, i32* %6
%19 = icmp ne i32 %18, 0
br label %20
20: ; preds = %17, %12
%21 = phi i1 [ false, %12 ], [ %19, %17 ]
%22 = zext i1 %21 to i32
store i32 %22, i32* %6
%23 = call i64 (...) @test_slist_func()
%24 = icmp ne i64 %23, 0
br i1 %24, label %25, label %28
25: ; preds = %20
%26 = load i32, i32* %6
%27 = icmp ne i32 %26, 0
br label %28
28: ; preds = %25, %20
%29 = phi i1 [ false, %20 ], [ %27, %25 ]
%30 = zext i1 %29 to i32
store i32 %30, i32* %6
%31 = load i32, i32* %6
%32 = icmp ne i32 %31, 0
br i1 %32, label %33, label %35
33: ; preds = %28
%34 = call i32 @printf(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str, i64 0, i64 0))
br label %35
35: ; preds = %33, %28
%36 = load i32, i32* @EXIT_SUCCESS
ret i32 %36
}

LLVM IR (-O2):
@EXIT_SUCCESS = global i32 0
@str = [24 x i8] c"=== Tests r\C3\A9ussis! ===\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i64 (...) @test_array()
%4 = icmp ne i64 %3, 0
%5 = tail call i64 (...) @test_slist()
%6 = icmp ne i64 %5, 0
%7 = tail call i64 (...) @test_slist_func()
%8 = icmp ne i64 %7, 0
%9 = select i1 %8, i1 %6, i1 false
%10 = select i1 %9, i1 %4, i1 false
br i1 %10, label %11, label %13
11: ; preds = %2
%12 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([24 x i8], [24 x i8]* @str, i64 0, i64 0))
br label %13
13: ; preds = %11, %2
%14 = load i32, i32* @EXIT_SUCCESS
ret i32 %14
}