#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 const *, unsigned int);
int /*<<< orphan*/ _throw_null_fn(char const *, unsigned int);
long double *_zero_arr_plus_longdouble_fn(long double *orig_x,
                                          unsigned int orig_sz, int orig_i,
                                          const char *filename,
                                          unsigned lineno) {
  unsigned int _czs_temp;
  if ((orig_x) == 0)
    _throw_null_fn(filename, lineno);
  if (orig_i < 0 || orig_sz == 0)
    _throw_arraybounds_fn(filename, lineno);
  for (_czs_temp = orig_sz - 1; _czs_temp < orig_i; _czs_temp++)
    if (orig_x[_czs_temp] == 0)
      _throw_arraybounds_fn(filename, lineno);
  return orig_x + orig_i;
}


x86 assembly (clang, -O0):
<_zero_arr_plus_longdouble_fn>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    %rcx,-0x18(%rbp)
mov    %r8d,-0x1c(%rbp)
cmpq   $0x0,-0x8(%rbp)
jne    1151 <_zero_arr_plus_longdouble_fn+0x31>
mov    -0x18(%rbp),%rdi
mov    -0x1c(%rbp),%esi
call   1030 <_throw_null_fn@plt>
cmpl   $0x0,-0x10(%rbp)
jl     1165 <_zero_arr_plus_longdouble_fn+0x45>
cmpl   $0x0,-0xc(%rbp)
jne    1171 <_zero_arr_plus_longdouble_fn+0x51>
mov    -0x18(%rbp),%rdi
mov    -0x1c(%rbp),%esi
call   1040 <_throw_arraybounds_fn@plt>
mov    -0xc(%rbp),%eax
sub    $0x1,%eax
mov    %eax,-0x20(%rbp)
mov    -0x20(%rbp),%eax
cmp    -0x10(%rbp),%eax
jae    11cc <_zero_arr_plus_longdouble_fn+0xac>
mov    -0x8(%rbp),%rax
mov    -0x20(%rbp),%ecx
shl    $0x4,%rcx
fldt   (%rax,%rcx,1)
fldz
fxch   %st(1)
fucomip %st(1),%st
fstp   %st(0)
jne    11b9 <_zero_arr_plus_longdouble_fn+0x99>
jp     11b9 <_zero_arr_plus_longdouble_fn+0x99>
jmp    11ad <_zero_arr_plus_longdouble_fn+0x8d>
mov    -0x18(%rbp),%rdi
mov    -0x1c(%rbp),%esi
call   1040 <_throw_arraybounds_fn@plt>
jmp    11be <_zero_arr_plus_longdouble_fn+0x9e>
mov    -0x20(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x20(%rbp)
jmp    117a <_zero_arr_plus_longdouble_fn+0x5a>
mov    -0x8(%rbp),%rax
movslq -0x10(%rbp),%rcx
shl    $0x4,%rcx
add    %rcx,%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<_zero_arr_plus_longdouble_fn>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x18,%rsp
mov    %r8d,%r13d
mov    %rcx,%rbx
mov    %edx,%ebp
mov    %esi,%r12d
mov    %rdi,%r15
test   %rdi,%rdi
je     1148 <_zero_arr_plus_longdouble_fn+0x28>
test   %r12d,%r12d
jne    1158 <_zero_arr_plus_longdouble_fn+0x38>
jmp    115c <_zero_arr_plus_longdouble_fn+0x3c>
mov    %rbx,%rdi
mov    %r13d,%esi
call   1030 <_throw_null_fn@plt>
test   %r12d,%r12d
je     115c <_zero_arr_plus_longdouble_fn+0x3c>
test   %ebp,%ebp
jns    1167 <_zero_arr_plus_longdouble_fn+0x47>
mov    %rbx,%rdi
mov    %r13d,%esi
call   1040 <_throw_arraybounds_fn@plt>
lea    -0x1(%r12),%eax
mov    %ebp,0x8(%rsp)
cmp    %ebp,%eax
jae    11c8 <_zero_arr_plus_longdouble_fn+0xa8>
mov    %eax,%ebp
shl    $0x4,%rbp
add    %r15,%rbp
mov    0x8(%rsp),%r14d
sub    %r12d,%r14d
add    $0x1,%r14d
fldz
fstpt  0xc(%rsp)
jmp    11aa <_zero_arr_plus_longdouble_fn+0x8a>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
add    $0x10,%rbp
add    $0xffffffff,%r14d
je     11c8 <_zero_arr_plus_longdouble_fn+0xa8>
fldt   0x0(%rbp)
fldt   0xc(%rsp)
fxch   %st(1)
fucomip %st(1),%st
fstp   %st(0)
jne    11a0 <_zero_arr_plus_longdouble_fn+0x80>
jp     11a0 <_zero_arr_plus_longdouble_fn+0x80>
mov    %rbx,%rdi
mov    %r13d,%esi
call   1040 <_throw_arraybounds_fn@plt>
jmp    11a0 <_zero_arr_plus_longdouble_fn+0x80>
movslq 0x8(%rsp),%rax
shl    $0x4,%rax
add    %rax,%r15
mov    %r15,%rax
add    $0x18,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
define x86_fp80* @_zero_arr_plus_longdouble_fn(x86_fp80* %0, i32 %1, i32 %2, i8* %3, i32 %4) {
%6 = alloca x86_fp80*
%7 = alloca i32
%8 = alloca i32
%9 = alloca i8*
%10 = alloca i32
%11 = alloca i32
store x86_fp80* %0, x86_fp80** %6
store i32 %1, i32* %7
store i32 %2, i32* %8
store i8* %3, i8** %9
store i32 %4, i32* %10
%12 = load x86_fp80*, x86_fp80** %6
%13 = icmp eq x86_fp80* %12, null
br i1 %13, label %14, label %18
14: ; preds = %5
%15 = load i8*, i8** %9
%16 = load i32, i32* %10
%17 = call i32 @_throw_null_fn(i8* %15, i32 %16)
br label %18
18: ; preds = %14, %5
%19 = load i32, i32* %8
%20 = icmp slt i32 %19, 0
br i1 %20, label %24, label %21
21: ; preds = %18
%22 = load i32, i32* %7
%23 = icmp eq i32 %22, 0
br i1 %23, label %24, label %28
24: ; preds = %21, %18
%25 = load i8*, i8** %9
%26 = load i32, i32* %10
%27 = call i32 @_throw_arraybounds_fn(i8* %25, i32 %26)
br label %28
28: ; preds = %24, %21
%29 = load i32, i32* %7
%30 = sub i32 %29, 1
store i32 %30, i32* %11
br label %31
31: ; preds = %47, %28
%32 = load i32, i32* %11
%33 = load i32, i32* %8
%34 = icmp ult i32 %32, %33
br i1 %34, label %35, label %50
35: ; preds = %31
%36 = load x86_fp80*, x86_fp80** %6
%37 = load i32, i32* %11
%38 = zext i32 %37 to i64
%39 = getelementptr inbounds x86_fp80, x86_fp80* %36, i64 %38
%40 = load x86_fp80, x86_fp80* %39
%41 = fcmp oeq x86_fp80 %40, 0xK00000000000000000000
br i1 %41, label %42, label %46
42: ; preds = %35
%43 = load i8*, i8** %9
%44 = load i32, i32* %10
%45 = call i32 @_throw_arraybounds_fn(i8* %43, i32 %44)
br label %46
46: ; preds = %42, %35
br label %47
47: ; preds = %46
%48 = load i32, i32* %11
%49 = add i32 %48, 1
store i32 %49, i32* %11
br label %31
50: ; preds = %31
%51 = load x86_fp80*, x86_fp80** %6
%52 = load i32, i32* %8
%53 = sext i32 %52 to i64
%54 = getelementptr inbounds x86_fp80, x86_fp80* %51, i64 %53
ret x86_fp80* %54
}

LLVM IR (-O2):
define x86_fp80* @_zero_arr_plus_longdouble_fn(x86_fp80* %0, i32 %1, i32 %2, i8* %3, i32 %4) {
%6 = icmp eq x86_fp80* %0, null
br i1 %6, label %7, label %9
7: ; preds = %5
%8 = tail call i32 @_throw_null_fn(i8* %3, i32 %4)
br label %9
9: ; preds = %7, %5
%10 = icmp slt i32 %2, 0
%11 = icmp eq i32 %1, 0
%12 = or i1 %11, %10
br i1 %12, label %13, label %15
13: ; preds = %9
%14 = tail call i32 @_throw_arraybounds_fn(i8* %3, i32 %4)
br label %15
15: ; preds = %9, %13
%16 = add i32 %1, -1
%17 = icmp ult i32 %16, %2
br i1 %17, label %18, label %31
18: ; preds = %15
%19 = zext i32 %16 to i64
br label %20
20: ; preds = %18, %27
%21 = phi i64 [ %19, %18 ], [ %28, %27 ]
%22 = getelementptr inbounds x86_fp80, x86_fp80* %0, i64 %21
%23 = load x86_fp80, x86_fp80* %22
%24 = fcmp oeq x86_fp80 %23, 0xK00000000000000000000
br i1 %24, label %25, label %27
25: ; preds = %20
%26 = tail call i32 @_throw_arraybounds_fn(i8* %3, i32 %4)
br label %27
27: ; preds = %20, %25
%28 = add nuw nsw i64 %21, 1
%29 = trunc i64 %28 to i32
%30 = icmp eq i32 %29, %2
br i1 %30, label %31, label %20
31: ; preds = %27, %15
%32 = sext i32 %2 to i64
%33 = getelementptr inbounds x86_fp80, x86_fp80* %0, i64 %32
ret x86_fp80* %33
}