#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*/ _throw_arraybounds_fn(char *, int);
void *_check_known_sudirript_notnull(void *ptr, unsigned bound, unsigned elt_sz,
                                     unsigned index) {
  if (index >= bound)
    (_throw_arraybounds_fn(
        "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
        "2022-01-22/02-19-57/repos/pippijn/cyclone/refs/heads/master/old/bin/"
        "cyc-lib/vc_cyc_include.h",
        134));
  return (void *)((char *)ptr + elt_sz * index);
}


x86 assembly (clang, -O0):
<_check_known_sudirript_notnull>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    %ecx,-0x14(%rbp)
mov    -0x14(%rbp),%eax
cmp    -0xc(%rbp),%eax
jb     1142 <_check_known_sudirript_notnull+0x32>
lea    0xec8(%rip),%rdi
mov    $0x86,%esi
call   1030 <_throw_arraybounds_fn@plt>
mov    -0x8(%rbp),%rax
mov    -0x10(%rbp),%ecx
imul   -0x14(%rbp),%ecx
mov    %ecx,%ecx
add    %rcx,%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<_check_known_sudirript_notnull>:
push   %rbp
push   %r14
push   %rbx
mov    %ecx,%ebx
mov    %edx,%ebp
mov    %rdi,%r14
cmp    %esi,%ecx
jb     1130 <_check_known_sudirript_notnull+0x20>
lea    0xeda(%rip),%rdi
mov    $0x86,%esi
call   1030 <_throw_arraybounds_fn@plt>
imul   %ebp,%ebx
add    %rbx,%r14
mov    %r14,%rax
pop    %rbx
pop    %r14
pop    %rbp
ret

LLVM IR (-O0):
@.str = [157 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/pippijn/cyclone/refs/heads/master/old/bin/cyc-lib/vc_cyc_include.h\00"
define i8* @_check_known_sudirript_notnull(i8* %0, i32 %1, i32 %2, i32 %3) {
%5 = alloca i8*
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
store i8* %0, i8** %5
store i32 %1, i32* %6
store i32 %2, i32* %7
store i32 %3, i32* %8
%9 = load i32, i32* %8
%10 = load i32, i32* %6
%11 = icmp uge i32 %9, %10
br i1 %11, label %12, label %14
12: ; preds = %4
%13 = call i32 @_throw_arraybounds_fn(i8* getelementptr inbounds ([157 x i8], [157 x i8]* @.str, i64 0, i64 0), i32 134)
br label %14
14: ; preds = %12, %4
%15 = load i8*, i8** %5
%16 = load i32, i32* %7
%17 = load i32, i32* %8
%18 = mul i32 %16, %17
%19 = zext i32 %18 to i64
%20 = getelementptr inbounds i8, i8* %15, i64 %19
ret i8* %20
}

LLVM IR (-O2):
@.str = [157 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/pippijn/cyclone/refs/heads/master/old/bin/cyc-lib/vc_cyc_include.h\00"
define i8* @_check_known_sudirript_notnull(i8* readnone %0, i32 %1, i32 %2, i32 %3) {
%5 = icmp ult i32 %3, %1
br i1 %5, label %8, label %6
6: ; preds = %4
%7 = tail call i32 @_throw_arraybounds_fn(i8* getelementptr inbounds ([157 x i8], [157 x i8]* @.str, i64 0, i64 0), i32 134)
br label %8
8: ; preds = %6, %4
%9 = mul i32 %3, %2
%10 = zext i32 %9 to i64
%11 = getelementptr inbounds i8, i8* %0, i64 %10
ret i8* %11
}