#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*/ eci_cleanup();
int /*<<< orphan*/ eci_init();
scalar_t__ eci_ready();
int /*<<< orphan*/ printf(char *, char *, int, ...);
int eci_test_1(void) {
  do {
    printf("\n%s:%d - Test started\n",
           "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
           "2022-01-22/02-19-57/repos/jeremysalwen/Ecasound-LV2/refs/heads/LV2/"
           "libecasoundc/libecasoundc_tester.c",
           126);
  } while (0);
  eci_init();
  if (eci_ready() == 0)
    do {
      printf("\n%s:%d - Test failed: \"%s\"\n",
             "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
             "2022-01-22/02-19-57/repos/jeremysalwen/Ecasound-LV2/refs/heads/"
             "LV2/libecasoundc/libecasoundc_tester.c",
             129, "eci_init failed (1)");
      return 1;
    } while (0);
  eci_cleanup();
  eci_init();
  if (eci_ready() == 0)
    do {
      printf("\n%s:%d - Test failed: \"%s\"\n",
             "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
             "2022-01-22/02-19-57/repos/jeremysalwen/Ecasound-LV2/refs/heads/"
             "LV2/libecasoundc/libecasoundc_tester.c",
             132, "eci_init failed (2)");
      return 2;
    } while (0);
  eci_cleanup();
  do {
    printf("%s:%d - Test passed\n",
           "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
           "2022-01-22/02-19-57/repos/jeremysalwen/Ecasound-LV2/refs/heads/LV2/"
           "libecasoundc/libecasoundc_tester.c",
           135);
    return 0;
  } while (0);
}


x86 assembly (clang, -O0):
<eci_test_1>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    0xeb1(%rip),%rdi
lea    0xec1(%rip),%rsi
mov    $0x7e,%edx
mov    $0x0,%al
call   1060 <printf@plt>
mov    $0x0,%al
call   1030 <eci_init@plt>
mov    $0x0,%al
call   1040 <eci_ready@plt>
cmp    $0x0,%rax
jne    11ac <eci_test_1+0x6c>
jmp    117f <eci_test_1+0x3f>
lea    0xf37(%rip),%rdi
lea    0xe8a(%rip),%rsi
mov    $0x81,%edx
lea    0xf40(%rip),%rcx
mov    $0x0,%al
call   1060 <printf@plt>
movl   $0x1,-0x4(%rbp)
jmp    1225 <eci_test_1+0xe5>
mov    $0x0,%al
call   1050 <eci_cleanup@plt>
mov    $0x0,%al
call   1030 <eci_init@plt>
mov    $0x0,%al
call   1040 <eci_ready@plt>
cmp    $0x0,%rax
jne    11fd <eci_test_1+0xbd>
jmp    11d0 <eci_test_1+0x90>
lea    0xee6(%rip),%rdi
lea    0xe39(%rip),%rsi
mov    $0x84,%edx
lea    0xf03(%rip),%rcx
mov    $0x0,%al
call   1060 <printf@plt>
movl   $0x2,-0x4(%rbp)
jmp    1225 <eci_test_1+0xe5>
mov    $0x0,%al
call   1050 <eci_cleanup@plt>
lea    0xef6(%rip),%rdi
lea    0xe05(%rip),%rsi
mov    $0x87,%edx
mov    $0x0,%al
call   1060 <printf@plt>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<eci_test_1>:
push   %rbx
lea    0xeb8(%rip),%rdi
lea    0xec8(%rip),%rsi
mov    $0x7e,%edx
xor    %eax,%eax
call   1060 <printf@plt>
xor    %eax,%eax
call   1030 <eci_init@plt>
xor    %eax,%eax
call   1040 <eci_ready@plt>
test   %rax,%rax
je     11ad <eci_test_1+0x6d>
xor    %ebx,%ebx
xor    %eax,%eax
call   1050 <eci_cleanup@plt>
xor    %eax,%eax
call   1030 <eci_init@plt>
xor    %eax,%eax
call   1040 <eci_ready@plt>
test   %rax,%rax
je     11d5 <eci_test_1+0x95>
xor    %eax,%eax
call   1050 <eci_cleanup@plt>
lea    0xf69(%rip),%rdi
lea    0xe78(%rip),%rsi
mov    $0x87,%edx
xor    %eax,%eax
call   1060 <printf@plt>
jmp    11fb <eci_test_1+0xbb>
lea    0xf09(%rip),%rdi
lea    0xe5c(%rip),%rsi
lea    0xf17(%rip),%rcx
mov    $0x81,%edx
xor    %eax,%eax
call   1060 <printf@plt>
mov    $0x1,%ebx
jmp    11fb <eci_test_1+0xbb>
lea    0xee1(%rip),%rdi
lea    0xe34(%rip),%rsi
lea    0xf03(%rip),%rcx
mov    $0x84,%edx
xor    %eax,%eax
call   1060 <printf@plt>
mov    $0x2,%ebx
mov    %ebx,%eax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [23 x i8] c"\0A%s:%d - Test started\0A\00"
@.str.1 = [166 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/jeremysalwen/Ecasound-LV2/refs/heads/LV2/libecasoundc/libecasoundc_tester.c\00"
@.str.2 = [28 x i8] c"\0A%s:%d - Test failed: \22%s\22\0A\00"
@.str.3 = [20 x i8] c"eci_init failed (1)\00"
@.str.4 = [20 x i8] c"eci_init failed (2)\00"
@.str.5 = [21 x i8] c"%s:%d - Test passed\0A\00"
define i32 @eci_test_1() {
%1 = alloca i32
br label %2
2: ; preds = %0
%3 = call i32 (i8*, i8*, i32, ...) @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([166 x i8], [166 x i8]* @.str.1, i64 0, i64 0), i32 126)
br label %4
4: ; preds = %2
%5 = call i32 (...) @eci_init()
%6 = call i64 (...) @eci_ready()
%7 = icmp eq i64 %6, 0
br i1 %7, label %8, label %12
8: ; preds = %4
br label %9
9: ; preds = %8
%10 = call i32 (i8*, i8*, i32, ...) @printf(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([166 x i8], [166 x i8]* @.str.1, i64 0, i64 0), i32 129, i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.3, i64 0, i64 0))
store i32 1, i32* %1
br label %25
11: ; No predecessors!
br label %12
12: ; preds = %11, %4
%13 = call i32 (...) @eci_cleanup()
%14 = call i32 (...) @eci_init()
%15 = call i64 (...) @eci_ready()
%16 = icmp eq i64 %15, 0
br i1 %16, label %17, label %21
17: ; preds = %12
br label %18
18: ; preds = %17
%19 = call i32 (i8*, i8*, i32, ...) @printf(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([166 x i8], [166 x i8]* @.str.1, i64 0, i64 0), i32 132, i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.4, i64 0, i64 0))
store i32 2, i32* %1
br label %25
20: ; No predecessors!
br label %21
21: ; preds = %20, %12
%22 = call i32 (...) @eci_cleanup()
br label %23
23: ; preds = %21
%24 = call i32 (i8*, i8*, i32, ...) @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.5, i64 0, i64 0), i8* getelementptr inbounds ([166 x i8], [166 x i8]* @.str.1, i64 0, i64 0), i32 135)
store i32 0, i32* %1
br label %25
25: ; preds = %9, %18, %23
%26 = load i32, i32* %1
ret i32 %26
}

LLVM IR (-O2):
@.str = [23 x i8] c"\0A%s:%d - Test started\0A\00"
@.str.1 = [166 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/jeremysalwen/Ecasound-LV2/refs/heads/LV2/libecasoundc/libecasoundc_tester.c\00"
@.str.2 = [28 x i8] c"\0A%s:%d - Test failed: \22%s\22\0A\00"
@.str.3 = [20 x i8] c"eci_init failed (1)\00"
@.str.4 = [20 x i8] c"eci_init failed (2)\00"
@.str.5 = [21 x i8] c"%s:%d - Test passed\0A\00"
define i32 @eci_test_1() {
%1 = tail call i32 (i8*, i8*, i32, ...) @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([166 x i8], [166 x i8]* @.str.1, i64 0, i64 0), i32 126)
%2 = tail call i32 (...) @eci_init()
%3 = tail call i64 (...) @eci_ready()
%4 = icmp eq i64 %3, 0
br i1 %4, label %5, label %7
5: ; preds = %0
%6 = tail call i32 (i8*, i8*, i32, ...) @printf(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([166 x i8], [166 x i8]* @.str.1, i64 0, i64 0), i32 129, i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.3, i64 0, i64 0))
br label %17
7: ; preds = %0
%8 = tail call i32 (...) @eci_cleanup()
%9 = tail call i32 (...) @eci_init()
%10 = tail call i64 (...) @eci_ready()
%11 = icmp eq i64 %10, 0
br i1 %11, label %12, label %14
12: ; preds = %7
%13 = tail call i32 (i8*, i8*, i32, ...) @printf(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([166 x i8], [166 x i8]* @.str.1, i64 0, i64 0), i32 132, i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.4, i64 0, i64 0))
br label %17
14: ; preds = %7
%15 = tail call i32 (...) @eci_cleanup()
%16 = tail call i32 (i8*, i8*, i32, ...) @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.5, i64 0, i64 0), i8* getelementptr inbounds ([166 x i8], [166 x i8]* @.str.1, i64 0, i64 0), i32 135)
br label %17
17: ; preds = %5, %12, %14
%18 = phi i32 [ 1, %5 ], [ 2, %12 ], [ 0, %14 ]
ret i32 %18
}