#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*/ _test_cycle(size_t *, size_t);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char *, int);
int /*<<< orphan*/ stdout;
void test_cycle() {
  do {
    fprintf(stdout,
            "[%s:%i] "
            "Testing array cycle left/right..."
            "\n",
            "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
            "2022-01-22/02-19-57/repos/noporpoise/carrays/refs/heads/master/"
            "runtests.c",
            140);
  } while (0);
  size_t n, arr[100];
  for (n = 0; n < 100; n++)
    _test_cycle(arr, n);
}


x86 assembly (clang, -O0):
<test_cycle>:
push   %rbp
mov    %rsp,%rbp
sub    $0x330,%rsp
mov    0x2eae(%rip),%rax
mov    (%rax),%edi
lea    0xec5(%rip),%rsi
lea    0xee9(%rip),%rdx
mov    $0x8c,%ecx
call   1030 <fprintf@plt>
movq   $0x0,-0x8(%rbp)
cmpq   $0x64,-0x8(%rbp)
jae    1180 <test_cycle+0x60>
lea    -0x330(%rbp),%rdi
mov    -0x8(%rbp),%rsi
call   1040 <_test_cycle@plt>
mov    -0x8(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x8(%rbp)
jmp    1154 <test_cycle+0x34>
add    $0x330,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_cycle>:
push   %r14
push   %rbx
sub    $0x328,%rsp
mov    0x2eaf(%rip),%rax
mov    (%rax),%edi
lea    0xec6(%rip),%rsi
lea    0xeea(%rip),%rdx
mov    $0x8c,%ecx
call   1030 <fprintf@plt>
xor    %ebx,%ebx
mov    %rsp,%r14
mov    %r14,%rdi
mov    %rbx,%rsi
call   1040 <_test_cycle@plt>
add    $0x1,%rbx
cmp    $0x64,%rbx
jne    1150 <test_cycle+0x30>
add    $0x328,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@stdout = global i32 0
@.str = [43 x i8] c"[%s:%i] Testing array cycle left/right...\0A\00"
@.str.1 = [138 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/noporpoise/carrays/refs/heads/master/runtests.c\00"
define void @test_cycle() {
%1 = alloca i64
%2 = alloca [100 x i64]
br label %3
3: ; preds = %0
%4 = load i32, i32* @stdout
%5 = call i32 @fprintf(i32 %4, i8* getelementptr inbounds ([43 x i8], [43 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([138 x i8], [138 x i8]* @.str.1, i64 0, i64 0), i32 140)
br label %6
6: ; preds = %3
store i64 0, i64* %1
br label %7
7: ; preds = %14, %6
%8 = load i64, i64* %1
%9 = icmp ult i64 %8, 100
br i1 %9, label %10, label %17
10: ; preds = %7
%11 = getelementptr inbounds [100 x i64], [100 x i64]* %2, i64 0, i64 0
%12 = load i64, i64* %1
%13 = call i32 @_test_cycle(i64* %11, i64 %12)
br label %14
14: ; preds = %10
%15 = load i64, i64* %1
%16 = add i64 %15, 1
store i64 %16, i64* %1
br label %7
17: ; preds = %7
ret void
}

LLVM IR (-O2):
@stdout = global i32 0
@.str = [43 x i8] c"[%s:%i] Testing array cycle left/right...\0A\00"
@.str.1 = [138 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/noporpoise/carrays/refs/heads/master/runtests.c\00"
define void @test_cycle() {
%1 = alloca [100 x i64]
%2 = load i32, i32* @stdout
%3 = tail call i32 @fprintf(i32 %2, i8* getelementptr inbounds ([43 x i8], [43 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([138 x i8], [138 x i8]* @.str.1, i64 0, i64 0), i32 140)
%4 = bitcast [100 x i64]* %1 to i8*
%5 = getelementptr inbounds [100 x i64], [100 x i64]* %1, i64 0, i64 0
br label %6
6: ; preds = %0, %6
%7 = phi i64 [ 0, %0 ], [ %9, %6 ]
%8 = call i32 @_test_cycle(i64* %5, i64 %7)
%9 = add nuw nsw i64 %7, 1
%10 = icmp eq i64 %9, 100
br i1 %10, label %11, label %6
11: ; preds = %6
ret void
}