#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 */
typedef int int32_t;

/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, int, char *);
int numby_I4(int *, int, int *, int, int);
int /*<<< orphan*/ printf(char *, int, int);
int /*<<< orphan*/ stderr;
int main(void) {
  int status = 0;
  int nX = 105, nZ = 10;
  int32_t X[nX];
  int32_t Z[nZ];
  int start = 0;
  for (int i = 0; i < nX; i++) {
    X[i] = start++;
    if (start == nZ) {
      start = 0;
    }
  }
  for (int i = 0; i < nZ; i++) {
    Z[i] = 0;
  }
  status = numby_I4(X, nX, Z, nZ, true);
  {
    if (status < 0) {
      {
        {
          fprintf(stderr, "Line %3d of File %s \n", 43,
                  "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/"
                  "outputs/2022-01-22/02-19-57/repos/NerdWalletOSS/Q/refs/"
                  "heads/master/OPERATORS/GROUPBY/src/numby.c");
        };
        status = status;
        goto BYE;
      };
    }
  };
  for (int i = 0; i < nZ; i++) {
    printf("%d: %d \n", i, Z[i]);
  }
BYE:
  return status;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x50,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
movl   $0x69,-0xc(%rbp)
movl   $0xa,-0x10(%rbp)
mov    -0xc(%rbp),%eax
mov    %rsp,%rcx
mov    %rcx,-0x18(%rbp)
lea    0xf(,%rax,4),%rdx
and    $0xfffffffffffffff0,%rdx
mov    %rsp,%rcx
sub    %rdx,%rcx
mov    %rcx,-0x48(%rbp)
mov    %rcx,%rsp
mov    %rax,-0x20(%rbp)
mov    -0x10(%rbp),%eax
lea    0xf(,%rax,4),%rdx
and    $0xfffffffffffffff0,%rdx
mov    %rsp,%rcx
sub    %rdx,%rcx
mov    %rcx,-0x40(%rbp)
mov    %rcx,%rsp
mov    %rax,-0x28(%rbp)
movl   $0x0,-0x2c(%rbp)
movl   $0x0,-0x30(%rbp)
mov    -0x30(%rbp),%eax
cmp    -0xc(%rbp),%eax
jge    11f1 <main+0xc1>
mov    -0x48(%rbp),%rax
mov    -0x2c(%rbp),%edx
mov    %edx,%ecx
add    $0x1,%ecx
mov    %ecx,-0x2c(%rbp)
movslq -0x30(%rbp),%rcx
mov    %edx,(%rax,%rcx,4)
mov    -0x2c(%rbp),%eax
cmp    -0x10(%rbp),%eax
jne    11de <main+0xae>
movl   $0x0,-0x2c(%rbp)
jmp    11e3 <main+0xb3>
mov    -0x30(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x30(%rbp)
jmp    11a9 <main+0x79>
movl   $0x0,-0x34(%rbp)
mov    -0x34(%rbp),%eax
cmp    -0x10(%rbp),%eax
jge    1221 <main+0xf1>
mov    -0x40(%rbp),%rax
movslq -0x34(%rbp),%rcx
movl   $0x0,(%rax,%rcx,4)
mov    -0x34(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x34(%rbp)
jmp    11f8 <main+0xc8>
mov    -0x40(%rbp),%rdx
mov    -0x48(%rbp),%rdi
mov    -0xc(%rbp),%esi
mov    -0x10(%rbp),%ecx
mov    $0x1,%r8d
call   1050 <numby_I4@plt>
mov    %eax,-0x8(%rbp)
cmpl   $0x0,-0x8(%rbp)
jge    1273 <main+0x143>
mov    0x2d92(%rip),%rax
mov    (%rax),%edi
lea    0xda9(%rip),%rsi
mov    $0x2b,%edx
lea    0xdb3(%rip),%rcx
call   1040 <fprintf@plt>
mov    -0x8(%rbp),%eax
mov    %eax,-0x8(%rbp)
jmp    12b3 <main+0x183>
movl   $0x0,-0x38(%rbp)
mov    -0x38(%rbp),%eax
cmp    -0x10(%rbp),%eax
jge    12ae <main+0x17e>
mov    -0x40(%rbp),%rax
mov    -0x38(%rbp),%esi
movslq -0x38(%rbp),%rcx
mov    (%rax,%rcx,4),%edx
lea    0xe15(%rip),%rdi
call   1030 <printf@plt>
mov    -0x38(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x38(%rbp)
jmp    127a <main+0x14a>
jmp    12b3 <main+0x183>
mov    -0x8(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x18(%rbp),%rax
mov    %rax,%rsp
mov    -0x4(%rbp),%eax
mov    %rbp,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %rbx
sub    $0x1d8,%rsp
xor    %ecx,%ecx
mov    $0x2,%eax
jmp    115a <main+0x2a>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
add    $0x3,%rax
cmp    $0x6b,%rax
je     1195 <main+0x65>
mov    %ecx,0x28(%rsp,%rax,4)
add    $0x1,%ecx
mov    $0x0,%edx
cmp    $0xa,%ecx
je     116d <main+0x3d>
mov    %ecx,%edx
mov    %edx,0x2c(%rsp,%rax,4)
add    $0x1,%edx
mov    $0x0,%esi
cmp    $0xa,%edx
je     1180 <main+0x50>
mov    %edx,%esi
mov    %esi,0x30(%rsp,%rax,4)
add    $0x1,%esi
mov    $0x0,%ecx
cmp    $0xa,%esi
je     1150 <main+0x20>
mov    %esi,%ecx
jmp    1150 <main+0x20>
xorps  %xmm0,%xmm0
movaps %xmm0,0x10(%rsp)
movaps %xmm0,(%rsp)
movq   $0x0,0x20(%rsp)
lea    0x30(%rsp),%rdi
mov    %rsp,%rdx
mov    $0x69,%esi
mov    $0xa,%ecx
mov    $0x1,%r8d
call   1050 <numby_I4@plt>
mov    %eax,%ebp
test   %eax,%eax
js     1280 <main+0x150>
mov    (%rsp),%edx
lea    0xed5(%rip),%rbx
mov    %rbx,%rdi
xor    %esi,%esi
call   1030 <printf@plt>
mov    0x4(%rsp),%edx
mov    %rbx,%rdi
mov    $0x1,%esi
call   1030 <printf@plt>
mov    0x8(%rsp),%edx
mov    %rbx,%rdi
mov    $0x2,%esi
call   1030 <printf@plt>
mov    0xc(%rsp),%edx
mov    %rbx,%rdi
mov    $0x3,%esi
call   1030 <printf@plt>
mov    0x10(%rsp),%edx
mov    %rbx,%rdi
mov    $0x4,%esi
call   1030 <printf@plt>
mov    0x14(%rsp),%edx
mov    %rbx,%rdi
mov    $0x5,%esi
call   1030 <printf@plt>
mov    0x18(%rsp),%edx
mov    %rbx,%rdi
mov    $0x6,%esi
call   1030 <printf@plt>
mov    0x1c(%rsp),%edx
mov    %rbx,%rdi
mov    $0x7,%esi
call   1030 <printf@plt>
mov    0x20(%rsp),%edx
mov    %rbx,%rdi
mov    $0x8,%esi
call   1030 <printf@plt>
mov    0x24(%rsp),%edx
mov    %rbx,%rdi
mov    $0x9,%esi
call   1030 <printf@plt>
jmp    12a1 <main+0x171>
mov    0x2d59(%rip),%rax
mov    (%rax),%edi
lea    0xd70(%rip),%rsi
lea    0xd7f(%rip),%rcx
mov    $0x2b,%edx
call   1040 <fprintf@plt>
mov    %ebp,%eax
add    $0x1d8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
@stderr = global i32 0
@.str = [22 x i8] c"Line %3d of File %s \0A\00"
@.str.1 = [154 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/NerdWalletOSS/Q/refs/heads/master/OPERATORS/GROUPBY/src/numby.c\00"
@.str.2 = [9 x i8] c"%d: %d \0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8*
%6 = alloca i64
%7 = alloca i64
%8 = alloca i32
%9 = alloca i32
%10 = alloca i32
%11 = alloca i32
store i32 0, i32* %1
store i32 0, i32* %2
store i32 105, i32* %3
store i32 10, i32* %4
%12 = load i32, i32* %3
%13 = zext i32 %12 to i64
%14 = call i8* @llvm.stacksave()
store i8* %14, i8** %5
%15 = alloca i32, i64 %13
store i64 %13, i64* %6
%16 = load i32, i32* %4
%17 = zext i32 %16 to i64
%18 = alloca i32, i64 %17
store i64 %17, i64* %7
store i32 0, i32* %8
store i32 0, i32* %9
br label %19
19: ; preds = %34, %0
%20 = load i32, i32* %9
%21 = load i32, i32* %3
%22 = icmp slt i32 %20, %21
br i1 %22, label %23, label %37
23: ; preds = %19
%24 = load i32, i32* %8
%25 = add nsw i32 %24, 1
store i32 %25, i32* %8
%26 = load i32, i32* %9
%27 = sext i32 %26 to i64
%28 = getelementptr inbounds i32, i32* %15, i64 %27
store i32 %24, i32* %28
%29 = load i32, i32* %8
%30 = load i32, i32* %4
%31 = icmp eq i32 %29, %30
br i1 %31, label %32, label %33
32: ; preds = %23
store i32 0, i32* %8
br label %33
33: ; preds = %32, %23
br label %34
34: ; preds = %33
%35 = load i32, i32* %9
%36 = add nsw i32 %35, 1
store i32 %36, i32* %9
br label %19
37: ; preds = %19
store i32 0, i32* %10
br label %38
38: ; preds = %46, %37
%39 = load i32, i32* %10
%40 = load i32, i32* %4
%41 = icmp slt i32 %39, %40
br i1 %41, label %42, label %49
42: ; preds = %38
%43 = load i32, i32* %10
%44 = sext i32 %43 to i64
%45 = getelementptr inbounds i32, i32* %18, i64 %44
store i32 0, i32* %45
br label %46
46: ; preds = %42
%47 = load i32, i32* %10
%48 = add nsw i32 %47, 1
store i32 %48, i32* %10
br label %38
49: ; preds = %38
%50 = load i32, i32* %3
%51 = load i32, i32* %4
%52 = call i32 @numby_I4(i32* %15, i32 %50, i32* %18, i32 %51, i32 1)
store i32 %52, i32* %2
%53 = load i32, i32* %2
%54 = icmp slt i32 %53, 0
br i1 %54, label %55, label %59
55: ; preds = %49
%56 = load i32, i32* @stderr
%57 = call i32 @fprintf(i32 %56, i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0), i32 43, i8* getelementptr inbounds ([154 x i8], [154 x i8]* @.str.1, i64 0, i64 0))
%58 = load i32, i32* %2
store i32 %58, i32* %2
br label %75
59: ; preds = %49
store i32 0, i32* %11
br label %60
60: ; preds = %71, %59
%61 = load i32, i32* %11
%62 = load i32, i32* %4
%63 = icmp slt i32 %61, %62
br i1 %63, label %64, label %74
64: ; preds = %60
%65 = load i32, i32* %11
%66 = load i32, i32* %11
%67 = sext i32 %66 to i64
%68 = getelementptr inbounds i32, i32* %18, i64 %67
%69 = load i32, i32* %68
%70 = call i32 @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.2, i64 0, i64 0), i32 %65, i32 %69)
br label %71
71: ; preds = %64
%72 = load i32, i32* %11
%73 = add nsw i32 %72, 1
store i32 %73, i32* %11
br label %60
74: ; preds = %60
br label %75
75: ; preds = %74, %55
%76 = load i32, i32* %2
store i32 %76, i32* %1
%77 = load i8*, i8** %5
%78 = load i32, i32* %1
ret i32 %78
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [22 x i8] c"Line %3d of File %s \0A\00"
@.str.1 = [154 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/NerdWalletOSS/Q/refs/heads/master/OPERATORS/GROUPBY/src/numby.c\00"
@.str.2 = [9 x i8] c"%d: %d \0A\00"
define i32 @main() {
%1 = alloca [105 x i32]
%2 = alloca [10 x i32]
%3 = bitcast [10 x i32]* %2 to i8*
%4 = getelementptr inbounds [10 x i32], [10 x i32]* %2, i64 0, i64 0
br label %5
5: ; preds = %5, %0
%6 = phi i64 [ 0, %0 ], [ %22, %5 ]
%7 = phi i32 [ 0, %0 ], [ %21, %5 ]
%8 = add nsw i32 %7, 1
%9 = getelementptr inbounds [105 x i32], [105 x i32]* %1, i64 0, i64 %6
store i32 %7, i32* %9
%10 = icmp eq i32 %8, 10
%11 = select i1 %10, i32 0, i32 %8
%12 = add nuw nsw i64 %6, 1
%13 = add nsw i32 %11, 1
%14 = getelementptr inbounds [105 x i32], [105 x i32]* %1, i64 0, i64 %12
store i32 %11, i32* %14
%15 = icmp eq i32 %13, 10
%16 = select i1 %15, i32 0, i32 %13
%17 = add nuw nsw i64 %6, 2
%18 = add nsw i32 %16, 1
%19 = getelementptr inbounds [105 x i32], [105 x i32]* %1, i64 0, i64 %17
store i32 %16, i32* %19
%20 = icmp eq i32 %18, 10
%21 = select i1 %20, i32 0, i32 %18
%22 = add nuw nsw i64 %6, 3
%23 = icmp eq i64 %22, 105
br i1 %23, label %24, label %5
24: ; preds = %5
%25 = getelementptr inbounds [105 x i32], [105 x i32]* %1, i64 0, i64 0
%26 = call i32 @numby_I4(i32* %25, i32 105, i32* %4, i32 10, i32 1)
%27 = icmp slt i32 %26, 0
br i1 %27, label %58, label %28
28: ; preds = %24
%29 = load i32, i32* %4
%30 = call i32 @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.2, i64 0, i64 0), i32 0, i32 %29)
%31 = getelementptr inbounds [10 x i32], [10 x i32]* %2, i64 0, i64 1
%32 = load i32, i32* %31
%33 = call i32 @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.2, i64 0, i64 0), i32 1, i32 %32)
%34 = getelementptr inbounds [10 x i32], [10 x i32]* %2, i64 0, i64 2
%35 = load i32, i32* %34
%36 = call i32 @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.2, i64 0, i64 0), i32 2, i32 %35)
%37 = getelementptr inbounds [10 x i32], [10 x i32]* %2, i64 0, i64 3
%38 = load i32, i32* %37
%39 = call i32 @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.2, i64 0, i64 0), i32 3, i32 %38)
%40 = getelementptr inbounds [10 x i32], [10 x i32]* %2, i64 0, i64 4
%41 = load i32, i32* %40
%42 = call i32 @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.2, i64 0, i64 0), i32 4, i32 %41)
%43 = getelementptr inbounds [10 x i32], [10 x i32]* %2, i64 0, i64 5
%44 = load i32, i32* %43
%45 = call i32 @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.2, i64 0, i64 0), i32 5, i32 %44)
%46 = getelementptr inbounds [10 x i32], [10 x i32]* %2, i64 0, i64 6
%47 = load i32, i32* %46
%48 = call i32 @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.2, i64 0, i64 0), i32 6, i32 %47)
%49 = getelementptr inbounds [10 x i32], [10 x i32]* %2, i64 0, i64 7
%50 = load i32, i32* %49
%51 = call i32 @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.2, i64 0, i64 0), i32 7, i32 %50)
%52 = getelementptr inbounds [10 x i32], [10 x i32]* %2, i64 0, i64 8
%53 = load i32, i32* %52
%54 = call i32 @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.2, i64 0, i64 0), i32 8, i32 %53)
%55 = getelementptr inbounds [10 x i32], [10 x i32]* %2, i64 0, i64 9
%56 = load i32, i32* %55
%57 = call i32 @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.2, i64 0, i64 0), i32 9, i32 %56)
br label %61
58: ; preds = %24
%59 = load i32, i32* @stderr
%60 = call i32 @fprintf(i32 %59, i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0), i32 43, i8* getelementptr inbounds ([154 x i8], [154 x i8]* @.str.1, i64 0, i64 0))
br label %61
61: ; preds = %28, %58
ret i32 %26
}