#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 */
char *ieee_std_logic_arith_conv_signed_signext(char *, char *, char *, char *,
                                               unsigned int);
char *ieee_std_logic_arith_mult_signed(char *, char *, char *, char *, char *,
                                       char *);
int /*<<< orphan*/ memcpy(char *, char *, unsigned int);
char *xsi_get_transient_memory(unsigned int);
char *ieee_p_3499444699_sub_16838785007133763776_3536714472(char *t1, char *t2,
                                                            char *t3, char *t4,
                                                            char *t5,
                                                            char *t6) {
  char t8[40];
  char t15[16];
  char t16[16];
  char t20[16];
  char *t0;
  char *t9;
  unsigned char t10;
  char *t11;
  char *t12;
  unsigned char t13;
  char *t14;
  char *t17;
  unsigned int t18;
  char *t19;
  char *t21;
  unsigned int t22;
  char *t23;
  char *t24;
  char *t25;
  unsigned int t26;
  char *t27;
  int t28;
  char *t29;
  int t30;
  char *t31;
  int t32;
  char *t33;
  char *t34;
  int t35;
  unsigned int t36;
LAB0:
  t9 = (t8 + 4U);
  t10 = (t3 != 0);
  if (t10 == 1)
    goto LAB3;
LAB2:
  t11 = (t8 + 12U);
  *((char **)t11) = t4;
  t12 = (t8 + 20U);
  t13 = (t5 != 0);
  if (t13 == 1)
    goto LAB5;
LAB4:
  t14 = (t8 + 28U);
  *((char **)t14) = t6;
  t17 = (t4 + 12U);
  t18 = *((unsigned int *)t17);
  t19 = ieee_std_logic_arith_conv_signed_signext(t1, t16, t3, t4, ((t18)));
  t21 = (t6 + 12U);
  t22 = *((unsigned int *)t21);
  t23 = ieee_std_logic_arith_conv_signed_signext(t1, t20, t5, t6, ((t22)));
  t24 = ieee_std_logic_arith_mult_signed(t1, t15, t19, t16, t23, t20);
  t25 = (t15 + 12U);
  t26 = *((unsigned int *)t25);
  t26 = (t26 * 1U);
  t0 = xsi_get_transient_memory(t26);
  memcpy(t0, t24, t26);
  t27 = (t15 + 0U);
  t28 = *((int *)t27);
  t29 = (t15 + 4U);
  t30 = *((int *)t29);
  t31 = (t15 + 8U);
  t32 = *((int *)t31);
  t33 = (t2 + 0U);
  t34 = (t33 + 0U);
  *((int *)t34) = t28;
  t34 = (t33 + 4U);
  *((int *)t34) = t30;
  t34 = (t33 + 8U);
  *((int *)t34) = t32;
  t35 = (t30 - t28);
  t36 = (t35 * t32);
  t36 = (t36 + 1);
  t34 = (t33 + 12U);
  *((unsigned int *)t34) = t36;
LAB1:
  return t0;
LAB3:
  *((char **)t9) = t3;
  goto LAB2;
LAB5:
  *((char **)t12) = t5;
  goto LAB4;
LAB6:;
}


x86 assembly (clang, -O0):
push   %rbp
mov    %rsp,%rbp
sub    $0x160,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    %rdx,-0x20(%rbp)
mov    %rcx,-0x28(%rbp)
mov    %r8,-0x30(%rbp)
mov    %r9,-0x38(%rbp)
lea    -0x60(%rbp),%rax
add    $0x4,%rax
mov    %rax,-0xa0(%rbp)
cmpq   $0x0,-0x20(%rbp)
setne  %al
and    $0x1,%al
movzbl %al,%eax
mov    %al,-0xa1(%rbp)
movzbl -0xa1(%rbp),%eax
cmp    $0x1,%eax
jne    119a <ieee_p_3499444699_sub_16838785007133763776_3536714472+0x5a>
jmp    1444 <ieee_p_3499444699_sub_16838785007133763776_3536714472+0x304>
jmp    119f <ieee_p_3499444699_sub_16838785007133763776_3536714472+0x5f>
lea    -0x60(%rbp),%rax
add    $0xc,%rax
mov    %rax,-0xb0(%rbp)
mov    -0x28(%rbp),%rcx
mov    -0xb0(%rbp),%rax
mov    %rcx,(%rax)
lea    -0x60(%rbp),%rax
add    $0x14,%rax
mov    %rax,-0xb8(%rbp)
cmpq   $0x0,-0x30(%rbp)
setne  %al
and    $0x1,%al
movzbl %al,%eax
mov    %al,-0xb9(%rbp)
movzbl -0xb9(%rbp),%eax
cmp    $0x1,%eax
jne    11f3 <ieee_p_3499444699_sub_16838785007133763776_3536714472+0xb3>
jmp    1457 <ieee_p_3499444699_sub_16838785007133763776_3536714472+0x317>
jmp    11f8 <ieee_p_3499444699_sub_16838785007133763776_3536714472+0xb8>
lea    -0x60(%rbp),%rax
add    $0x1c,%rax
mov    %rax,-0xc8(%rbp)
mov    -0x38(%rbp),%rcx
mov    -0xc8(%rbp),%rax
mov    %rcx,(%rax)
mov    -0x28(%rbp),%rax
add    $0xc,%rax
mov    %rax,-0xd0(%rbp)
mov    -0xd0(%rbp),%rax
mov    (%rax),%eax
mov    %eax,-0xd4(%rbp)
mov    -0x10(%rbp),%rdi
lea    -0x80(%rbp),%rsi
mov    -0x20(%rbp),%rdx
mov    -0x28(%rbp),%rcx
mov    -0xd4(%rbp),%r8d
call   1060 <ieee_std_logic_arith_conv_signed_signext@plt>
mov    %rax,-0xe0(%rbp)
mov    -0x38(%rbp),%rax
add    $0xc,%rax
mov    %rax,-0xe8(%rbp)
mov    -0xe8(%rbp),%rax
mov    (%rax),%eax
mov    %eax,-0xec(%rbp)
mov    -0x10(%rbp),%rdi
lea    -0x90(%rbp),%rsi
mov    -0x30(%rbp),%rdx
mov    -0x38(%rbp),%rcx
mov    -0xec(%rbp),%r8d
call   1060 <ieee_std_logic_arith_conv_signed_signext@plt>
mov    %rax,-0xf8(%rbp)
mov    -0x10(%rbp),%rdi
lea    -0x70(%rbp),%rsi
mov    -0xe0(%rbp),%rdx
lea    -0x80(%rbp),%rcx
mov    -0xf8(%rbp),%r8
lea    -0x90(%rbp),%r9
call   1040 <ieee_std_logic_arith_mult_signed@plt>
mov    %rax,-0x100(%rbp)
lea    -0x70(%rbp),%rax
add    $0xc,%rax
mov    %rax,-0x108(%rbp)
mov    -0x108(%rbp),%rax
mov    (%rax),%eax
mov    %eax,-0x10c(%rbp)
mov    -0x10c(%rbp),%eax
shl    $0x0,%eax
mov    %eax,-0x10c(%rbp)
mov    -0x10c(%rbp),%edi
call   1050 <xsi_get_transient_memory@plt>
mov    %rax,-0x98(%rbp)
mov    -0x98(%rbp),%rdi
mov    -0x100(%rbp),%rsi
mov    -0x10c(%rbp),%edx
call   1030 <memcpy@plt>
lea    -0x70(%rbp),%rax
mov    %rax,-0x118(%rbp)
mov    -0x118(%rbp),%rax
mov    (%rax),%eax
mov    %eax,-0x11c(%rbp)
lea    -0x70(%rbp),%rax
add    $0x4,%rax
mov    %rax,-0x128(%rbp)
mov    -0x128(%rbp),%rax
mov    (%rax),%eax
mov    %eax,-0x12c(%rbp)
lea    -0x70(%rbp),%rax
add    $0x8,%rax
mov    %rax,-0x138(%rbp)
mov    -0x138(%rbp),%rax
mov    (%rax),%eax
mov    %eax,-0x13c(%rbp)
mov    -0x18(%rbp),%rax
mov    %rax,-0x148(%rbp)
mov    -0x148(%rbp),%rax
mov    %rax,-0x150(%rbp)
mov    -0x11c(%rbp),%ecx
mov    -0x150(%rbp),%rax
mov    %ecx,(%rax)
mov    -0x148(%rbp),%rax
add    $0x4,%rax
mov    %rax,-0x150(%rbp)
mov    -0x12c(%rbp),%ecx
mov    -0x150(%rbp),%rax
mov    %ecx,(%rax)
mov    -0x148(%rbp),%rax
add    $0x8,%rax
mov    %rax,-0x150(%rbp)
mov    -0x13c(%rbp),%ecx
mov    -0x150(%rbp),%rax
mov    %ecx,(%rax)
mov    -0x12c(%rbp),%eax
sub    -0x11c(%rbp),%eax
mov    %eax,-0x154(%rbp)
mov    -0x154(%rbp),%eax
imul   -0x13c(%rbp),%eax
mov    %eax,-0x158(%rbp)
mov    -0x158(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x158(%rbp)
mov    -0x148(%rbp),%rax
add    $0xc,%rax
mov    %rax,-0x150(%rbp)
mov    -0x158(%rbp),%ecx
mov    -0x150(%rbp),%rax
mov    %ecx,(%rax)
mov    -0x98(%rbp),%rax
mov    %rax,-0x8(%rbp)
jmp    146a <ieee_p_3499444699_sub_16838785007133763776_3536714472+0x32a>
mov    -0x20(%rbp),%rcx
mov    -0xa0(%rbp),%rax
mov    %rcx,(%rax)
jmp    119f <ieee_p_3499444699_sub_16838785007133763776_3536714472+0x5f>
mov    -0x30(%rbp),%rcx
mov    -0xb8(%rbp),%rax
mov    %rcx,(%rax)
jmp    11f8 <ieee_p_3499444699_sub_16838785007133763776_3536714472+0xb8>
mov    -0x8(%rbp),%rax
add    $0x160,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x38,%rsp
mov    %r9,%r12
mov    %r8,%r15
mov    %rsi,%r14
mov    %rdi,%rbx
mov    0xc(%rcx),%r8d
lea    0x10(%rsp),%rsi
call   1060 <ieee_std_logic_arith_conv_signed_signext@plt>
mov    %rax,%rbp
mov    0xc(%r12),%r8d
lea    0x20(%rsp),%r13
mov    %rbx,%rdi
mov    %r13,%rsi
mov    %r15,%rdx
mov    %r12,%rcx
call   1060 <ieee_std_logic_arith_conv_signed_signext@plt>
mov    %rsp,%rsi
mov    %rbx,%rdi
mov    %rbp,%rdx
lea    0x10(%rsp),%rcx
mov    %rax,%r8
mov    %r13,%r9
call   1040 <ieee_std_logic_arith_mult_signed@plt>
mov    %rax,%r15
mov    0xc(%rsp),%ebp
mov    %ebp,%edi
call   1050 <xsi_get_transient_memory@plt>
mov    %rax,%rbx
mov    %rax,%rdi
mov    %r15,%rsi
mov    %ebp,%edx
call   1030 <memcpy@plt>
mov    (%rsp),%eax
mov    0x4(%rsp),%ecx
mov    0x8(%rsp),%edx
mov    %eax,(%r14)
mov    %ecx,0x4(%r14)
mov    %edx,0x8(%r14)
sub    %eax,%ecx
imul   %edx,%ecx
add    $0x1,%ecx
mov    %ecx,0xc(%r14)
mov    %rbx,%rax
add    $0x38,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
define i8* @ieee_p_3499444699_sub_16838785007133763776_3536714472(i8* %0, i8* %1, i8* %2, i8* %3, i8* %4, i8* %5) {
%7 = alloca i8*
%8 = alloca i8*
%9 = alloca i8*
%10 = alloca i8*
%11 = alloca i8*
%12 = alloca i8*
%13 = alloca i8*
%14 = alloca [40 x i8]
%15 = alloca [16 x i8]
%16 = alloca [16 x i8]
%17 = alloca [16 x i8]
%18 = alloca i8*
%19 = alloca i8*
%20 = alloca i8
%21 = alloca i8*
%22 = alloca i8*
%23 = alloca i8
%24 = alloca i8*
%25 = alloca i8*
%26 = alloca i32
%27 = alloca i8*
%28 = alloca i8*
%29 = alloca i32
%30 = alloca i8*
%31 = alloca i8*
%32 = alloca i8*
%33 = alloca i32
%34 = alloca i8*
%35 = alloca i32
%36 = alloca i8*
%37 = alloca i32
%38 = alloca i8*
%39 = alloca i32
%40 = alloca i8*
%41 = alloca i8*
%42 = alloca i32
%43 = alloca i32
store i8* %0, i8** %8
store i8* %1, i8** %9
store i8* %2, i8** %10
store i8* %3, i8** %11
store i8* %4, i8** %12
store i8* %5, i8** %13
br label %44
44: ; preds = %6
%45 = getelementptr inbounds [40 x i8], [40 x i8]* %14, i64 0, i64 0
%46 = getelementptr inbounds i8, i8* %45, i64 4
store i8* %46, i8** %19
%47 = load i8*, i8** %10
%48 = icmp ne i8* %47, null
%49 = zext i1 %48 to i32
%50 = trunc i32 %49 to i8
store i8 %50, i8* %20
%51 = load i8, i8* %20
%52 = zext i8 %51 to i32
%53 = icmp eq i32 %52, 1
br i1 %53, label %54, label %55
54: ; preds = %44
br label %168
55: ; preds = %44
br label %56
56: ; preds = %168, %55
%57 = getelementptr inbounds [40 x i8], [40 x i8]* %14, i64 0, i64 0
%58 = getelementptr inbounds i8, i8* %57, i64 12
store i8* %58, i8** %21
%59 = load i8*, i8** %11
%60 = load i8*, i8** %21
%61 = bitcast i8* %60 to i8**
store i8* %59, i8** %61
%62 = getelementptr inbounds [40 x i8], [40 x i8]* %14, i64 0, i64 0
%63 = getelementptr inbounds i8, i8* %62, i64 20
store i8* %63, i8** %22
%64 = load i8*, i8** %12
%65 = icmp ne i8* %64, null
%66 = zext i1 %65 to i32
%67 = trunc i32 %66 to i8
store i8 %67, i8* %23
%68 = load i8, i8* %23
%69 = zext i8 %68 to i32
%70 = icmp eq i32 %69, 1
br i1 %70, label %71, label %72
71: ; preds = %56
br label %172
72: ; preds = %56
br label %73
73: ; preds = %172, %72
%74 = getelementptr inbounds [40 x i8], [40 x i8]* %14, i64 0, i64 0
%75 = getelementptr inbounds i8, i8* %74, i64 28
store i8* %75, i8** %24
%76 = load i8*, i8** %13
%77 = load i8*, i8** %24
%78 = bitcast i8* %77 to i8**
store i8* %76, i8** %78
%79 = load i8*, i8** %11
%80 = getelementptr inbounds i8, i8* %79, i64 12
store i8* %80, i8** %25
%81 = load i8*, i8** %25
%82 = bitcast i8* %81 to i32*
%83 = load i32, i32* %82
store i32 %83, i32* %26
%84 = load i8*, i8** %8
%85 = getelementptr inbounds [16 x i8], [16 x i8]* %16, i64 0, i64 0
%86 = load i8*, i8** %10
%87 = load i8*, i8** %11
%88 = load i32, i32* %26
%89 = call i8* @ieee_std_logic_arith_conv_signed_signext(i8* %84, i8* %85, i8* %86, i8* %87, i32 %88)
store i8* %89, i8** %27
%90 = load i8*, i8** %13
%91 = getelementptr inbounds i8, i8* %90, i64 12
store i8* %91, i8** %28
%92 = load i8*, i8** %28
%93 = bitcast i8* %92 to i32*
%94 = load i32, i32* %93
store i32 %94, i32* %29
%95 = load i8*, i8** %8
%96 = getelementptr inbounds [16 x i8], [16 x i8]* %17, i64 0, i64 0
%97 = load i8*, i8** %12
%98 = load i8*, i8** %13
%99 = load i32, i32* %29
%100 = call i8* @ieee_std_logic_arith_conv_signed_signext(i8* %95, i8* %96, i8* %97, i8* %98, i32 %99)
store i8* %100, i8** %30
%101 = load i8*, i8** %8
%102 = getelementptr inbounds [16 x i8], [16 x i8]* %15, i64 0, i64 0
%103 = load i8*, i8** %27
%104 = getelementptr inbounds [16 x i8], [16 x i8]* %16, i64 0, i64 0
%105 = load i8*, i8** %30
%106 = getelementptr inbounds [16 x i8], [16 x i8]* %17, i64 0, i64 0
%107 = call i8* @ieee_std_logic_arith_mult_signed(i8* %101, i8* %102, i8* %103, i8* %104, i8* %105, i8* %106)
store i8* %107, i8** %31
%108 = getelementptr inbounds [16 x i8], [16 x i8]* %15, i64 0, i64 0
%109 = getelementptr inbounds i8, i8* %108, i64 12
store i8* %109, i8** %32
%110 = load i8*, i8** %32
%111 = bitcast i8* %110 to i32*
%112 = load i32, i32* %111
store i32 %112, i32* %33
%113 = load i32, i32* %33
%114 = mul i32 %113, 1
store i32 %114, i32* %33
%115 = load i32, i32* %33
%116 = call i8* @xsi_get_transient_memory(i32 %115)
store i8* %116, i8** %18
%117 = load i8*, i8** %18
%118 = load i8*, i8** %31
%119 = load i32, i32* %33
%120 = call i32 @memcpy(i8* %117, i8* %118, i32 %119)
%121 = getelementptr inbounds [16 x i8], [16 x i8]* %15, i64 0, i64 0
%122 = getelementptr inbounds i8, i8* %121, i64 0
store i8* %122, i8** %34
%123 = load i8*, i8** %34
%124 = bitcast i8* %123 to i32*
%125 = load i32, i32* %124
store i32 %125, i32* %35
%126 = getelementptr inbounds [16 x i8], [16 x i8]* %15, i64 0, i64 0
%127 = getelementptr inbounds i8, i8* %126, i64 4
store i8* %127, i8** %36
%128 = load i8*, i8** %36
%129 = bitcast i8* %128 to i32*
%130 = load i32, i32* %129
store i32 %130, i32* %37
%131 = getelementptr inbounds [16 x i8], [16 x i8]* %15, i64 0, i64 0
%132 = getelementptr inbounds i8, i8* %131, i64 8
store i8* %132, i8** %38
%133 = load i8*, i8** %38
%134 = bitcast i8* %133 to i32*
%135 = load i32, i32* %134
store i32 %135, i32* %39
%136 = load i8*, i8** %9
%137 = getelementptr inbounds i8, i8* %136, i64 0
store i8* %137, i8** %40
%138 = load i8*, i8** %40
%139 = getelementptr inbounds i8, i8* %138, i64 0
store i8* %139, i8** %41
%140 = load i32, i32* %35
%141 = load i8*, i8** %41
%142 = bitcast i8* %141 to i32*
store i32 %140, i32* %142
%143 = load i8*, i8** %40
%144 = getelementptr inbounds i8, i8* %143, i64 4
store i8* %144, i8** %41
%145 = load i32, i32* %37
%146 = load i8*, i8** %41
%147 = bitcast i8* %146 to i32*
store i32 %145, i32* %147
%148 = load i8*, i8** %40
%149 = getelementptr inbounds i8, i8* %148, i64 8
store i8* %149, i8** %41
%150 = load i32, i32* %39
%151 = load i8*, i8** %41
%152 = bitcast i8* %151 to i32*
store i32 %150, i32* %152
%153 = load i32, i32* %37
%154 = load i32, i32* %35
%155 = sub nsw i32 %153, %154
store i32 %155, i32* %42
%156 = load i32, i32* %42
%157 = load i32, i32* %39
%158 = mul nsw i32 %156, %157
store i32 %158, i32* %43
%159 = load i32, i32* %43
%160 = add i32 %159, 1
store i32 %160, i32* %43
%161 = load i8*, i8** %40
%162 = getelementptr inbounds i8, i8* %161, i64 12
store i8* %162, i8** %41
%163 = load i32, i32* %43
%164 = load i8*, i8** %41
%165 = bitcast i8* %164 to i32*
store i32 %163, i32* %165
br label %166
166: ; preds = %73
%167 = load i8*, i8** %18
store i8* %167, i8** %7
br label %177
168: ; preds = %54
%169 = load i8*, i8** %10
%170 = load i8*, i8** %19
%171 = bitcast i8* %170 to i8**
store i8* %169, i8** %171
br label %56
172: ; preds = %71
%173 = load i8*, i8** %12
%174 = load i8*, i8** %22
%175 = bitcast i8* %174 to i8**
store i8* %173, i8** %175
br label %73
176: ; No predecessors!
br label %177
177: ; preds = %176, %166
%178 = load i8*, i8** %7
ret i8* %178
}

LLVM IR (-O2):
define i8* @ieee_p_3499444699_sub_16838785007133763776_3536714472(i8* %0, i8* nocapture writeonly %1, i8* %2, i8* %3, i8* %4, i8* %5) {
%7 = alloca [16 x i8]
%8 = alloca [16 x i8]
%9 = alloca [16 x i8]
%10 = getelementptr inbounds [16 x i8], [16 x i8]* %7, i64 0, i64 0
%11 = getelementptr inbounds [16 x i8], [16 x i8]* %8, i64 0, i64 0
%12 = getelementptr inbounds [16 x i8], [16 x i8]* %9, i64 0, i64 0
%13 = getelementptr inbounds i8, i8* %3, i64 12
%14 = bitcast i8* %13 to i32*
%15 = load i32, i32* %14
%16 = call i8* @ieee_std_logic_arith_conv_signed_signext(i8* %0, i8* %11, i8* %2, i8* %3, i32 %15)
%17 = getelementptr inbounds i8, i8* %5, i64 12
%18 = bitcast i8* %17 to i32*
%19 = load i32, i32* %18
%20 = call i8* @ieee_std_logic_arith_conv_signed_signext(i8* %0, i8* %12, i8* %4, i8* %5, i32 %19)
%21 = call i8* @ieee_std_logic_arith_mult_signed(i8* %0, i8* %10, i8* %16, i8* %11, i8* %20, i8* %12)
%22 = getelementptr inbounds [16 x i8], [16 x i8]* %7, i64 0, i64 12
%23 = bitcast i8* %22 to i32*
%24 = load i32, i32* %23
%25 = call i8* @xsi_get_transient_memory(i32 %24)
%26 = call i32 @memcpy(i8* %25, i8* %21, i32 %24)
%27 = bitcast [16 x i8]* %7 to i32*
%28 = load i32, i32* %27
%29 = getelementptr inbounds [16 x i8], [16 x i8]* %7, i64 0, i64 4
%30 = bitcast i8* %29 to i32*
%31 = load i32, i32* %30
%32 = getelementptr inbounds [16 x i8], [16 x i8]* %7, i64 0, i64 8
%33 = bitcast i8* %32 to i32*
%34 = load i32, i32* %33
%35 = bitcast i8* %1 to i32*
store i32 %28, i32* %35
%36 = getelementptr inbounds i8, i8* %1, i64 4
%37 = bitcast i8* %36 to i32*
store i32 %31, i32* %37
%38 = getelementptr inbounds i8, i8* %1, i64 8
%39 = bitcast i8* %38 to i32*
store i32 %34, i32* %39
%40 = sub nsw i32 %31, %28
%41 = mul nsw i32 %40, %34
%42 = add i32 %41, 1
%43 = getelementptr inbounds i8, i8* %1, i64 12
%44 = bitcast i8* %43 to i32*
store i32 %42, i32* %44
ret i8* %25
}