#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*/ memcpy(char *, char *, unsigned int);
char *xsi_get_transient_memory(unsigned int);
char *ieee_p_3499444699_sub_17241452391813765596_3536714472(char *t1, char *t2,
                                                            char *t3,
                                                            char *t4) {
  char t6[24];
  char *t0;
  char *t7;
  unsigned char t8;
  char *t9;
  char *t10;
  unsigned int t11;
  char *t12;
  int t13;
  char *t14;
  int t15;
  char *t16;
  int t17;
  char *t18;
  char *t19;
  int t20;
  unsigned int t21;
LAB0:
  t7 = (t6 + 4U);
  t8 = (t3 != 0);
  if (t8 == 1)
    goto LAB3;
LAB2:
  t9 = (t6 + 12U);
  *((char **)t9) = t4;
  t10 = (t4 + 12U);
  t11 = *((unsigned int *)t10);
  t11 = (t11 * 1U);
  t0 = xsi_get_transient_memory(t11);
  memcpy(t0, t3, t11);
  t12 = (t4 + 0U);
  t13 = *((int *)t12);
  t14 = (t4 + 4U);
  t15 = *((int *)t14);
  t16 = (t4 + 8U);
  t17 = *((int *)t16);
  t18 = (t2 + 0U);
  t19 = (t18 + 0U);
  *((int *)t19) = t13;
  t19 = (t18 + 4U);
  *((int *)t19) = t15;
  t19 = (t18 + 8U);
  *((int *)t19) = t17;
  t20 = (t15 - t13);
  t21 = (t20 * t17);
  t21 = (t21 + 1);
  t19 = (t18 + 12U);
  *((unsigned int *)t19) = t21;
LAB1:
  return t0;
LAB3:
  *((char **)t7) = t3;
  goto LAB2;
LAB4:;
}


x86 assembly (clang, -O0):
<ieee_p_3499444699_sub_17241452391813765596_3536714472>:
push   %rbp
mov    %rsp,%rbp
sub    $0xc0,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    %rdx,-0x20(%rbp)
mov    %rcx,-0x28(%rbp)
lea    -0x40(%rbp),%rax
add    $0x4,%rax
mov    %rax,-0x50(%rbp)
cmpq   $0x0,-0x20(%rbp)
setne  %al
and    $0x1,%al
movzbl %al,%eax
mov    %al,-0x51(%rbp)
movzbl -0x51(%rbp),%eax
cmp    $0x1,%eax
jne    1169 <ieee_p_3499444699_sub_17241452391813765596_3536714472+0x49>
jmp    12d2 <ieee_p_3499444699_sub_17241452391813765596_3536714472+0x1b2>
jmp    116e <ieee_p_3499444699_sub_17241452391813765596_3536714472+0x4e>
lea    -0x40(%rbp),%rax
add    $0xc,%rax
mov    %rax,-0x60(%rbp)
mov    -0x28(%rbp),%rcx
mov    -0x60(%rbp),%rax
mov    %rcx,(%rax)
mov    -0x28(%rbp),%rax
add    $0xc,%rax
mov    %rax,-0x68(%rbp)
mov    -0x68(%rbp),%rax
mov    (%rax),%eax
mov    %eax,-0x6c(%rbp)
mov    -0x6c(%rbp),%eax
shl    $0x0,%eax
mov    %eax,-0x6c(%rbp)
mov    -0x6c(%rbp),%edi
call   1040 <xsi_get_transient_memory@plt>
mov    %rax,-0x48(%rbp)
mov    -0x48(%rbp),%rdi
mov    -0x20(%rbp),%rsi
mov    -0x6c(%rbp),%edx
call   1030 <memcpy@plt>
mov    -0x28(%rbp),%rax
mov    %rax,-0x78(%rbp)
mov    -0x78(%rbp),%rax
mov    (%rax),%eax
mov    %eax,-0x7c(%rbp)
mov    -0x28(%rbp),%rax
add    $0x4,%rax
mov    %rax,-0x88(%rbp)
mov    -0x88(%rbp),%rax
mov    (%rax),%eax
mov    %eax,-0x8c(%rbp)
mov    -0x28(%rbp),%rax
add    $0x8,%rax
mov    %rax,-0x98(%rbp)
mov    -0x98(%rbp),%rax
mov    (%rax),%eax
mov    %eax,-0x9c(%rbp)
mov    -0x18(%rbp),%rax
mov    %rax,-0xa8(%rbp)
mov    -0xa8(%rbp),%rax
mov    %rax,-0xb0(%rbp)
mov    -0x7c(%rbp),%ecx
mov    -0xb0(%rbp),%rax
mov    %ecx,(%rax)
mov    -0xa8(%rbp),%rax
add    $0x4,%rax
mov    %rax,-0xb0(%rbp)
mov    -0x8c(%rbp),%ecx
mov    -0xb0(%rbp),%rax
mov    %ecx,(%rax)
mov    -0xa8(%rbp),%rax
add    $0x8,%rax
mov    %rax,-0xb0(%rbp)
mov    -0x9c(%rbp),%ecx
mov    -0xb0(%rbp),%rax
mov    %ecx,(%rax)
mov    -0x8c(%rbp),%eax
sub    -0x7c(%rbp),%eax
mov    %eax,-0xb4(%rbp)
mov    -0xb4(%rbp),%eax
imul   -0x9c(%rbp),%eax
mov    %eax,-0xb8(%rbp)
mov    -0xb8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xb8(%rbp)
mov    -0xa8(%rbp),%rax
add    $0xc,%rax
mov    %rax,-0xb0(%rbp)
mov    -0xb8(%rbp),%ecx
mov    -0xb0(%rbp),%rax
mov    %ecx,(%rax)
mov    -0x48(%rbp),%rax
mov    %rax,-0x8(%rbp)
jmp    12e2 <ieee_p_3499444699_sub_17241452391813765596_3536714472+0x1c2>
mov    -0x20(%rbp),%rcx
mov    -0x50(%rbp),%rax
mov    %rcx,(%rax)
jmp    116e <ieee_p_3499444699_sub_17241452391813765596_3536714472+0x4e>
mov    -0x8(%rbp),%rax
add    $0xc0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ieee_p_3499444699_sub_17241452391813765596_3536714472>:
push   %rbp
push   %r15
push   %r14
push   %r12
push   %rbx
mov    %rcx,%rbx
mov    %rdx,%r14
mov    %rsi,%r15
mov    0xc(%rcx),%ebp
mov    %ebp,%edi
call   1040 <xsi_get_transient_memory@plt>
mov    %rax,%r12
mov    %rax,%rdi
mov    %r14,%rsi
mov    %ebp,%edx
call   1030 <memcpy@plt>
mov    (%rbx),%eax
mov    0x4(%rbx),%ecx
mov    0x8(%rbx),%edx
mov    %eax,(%r15)
mov    %ecx,0x4(%r15)
mov    %edx,0x8(%r15)
sub    %eax,%ecx
imul   %edx,%ecx
add    $0x1,%ecx
mov    %ecx,0xc(%r15)
mov    %r12,%rax
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
define i8* @ieee_p_3499444699_sub_17241452391813765596_3536714472(i8* %0, i8* %1, i8* %2, i8* %3) {
%5 = alloca i8*
%6 = alloca i8*
%7 = alloca i8*
%8 = alloca i8*
%9 = alloca i8*
%10 = alloca [24 x i8]
%11 = alloca i8*
%12 = alloca i8*
%13 = alloca i8
%14 = alloca i8*
%15 = alloca i8*
%16 = alloca i32
%17 = alloca i8*
%18 = alloca i32
%19 = alloca i8*
%20 = alloca i32
%21 = alloca i8*
%22 = alloca i32
%23 = alloca i8*
%24 = alloca i8*
%25 = alloca i32
%26 = alloca i32
store i8* %0, i8** %6
store i8* %1, i8** %7
store i8* %2, i8** %8
store i8* %3, i8** %9
br label %27
27: ; preds = %4
%28 = getelementptr inbounds [24 x i8], [24 x i8]* %10, i64 0, i64 0
%29 = getelementptr inbounds i8, i8* %28, i64 4
store i8* %29, i8** %12
%30 = load i8*, i8** %8
%31 = icmp ne i8* %30, null
%32 = zext i1 %31 to i32
%33 = trunc i32 %32 to i8
store i8 %33, i8* %13
%34 = load i8, i8* %13
%35 = zext i8 %34 to i32
%36 = icmp eq i32 %35, 1
br i1 %36, label %37, label %38
37: ; preds = %27
br label %105
38: ; preds = %27
br label %39
39: ; preds = %105, %38
%40 = getelementptr inbounds [24 x i8], [24 x i8]* %10, i64 0, i64 0
%41 = getelementptr inbounds i8, i8* %40, i64 12
store i8* %41, i8** %14
%42 = load i8*, i8** %9
%43 = load i8*, i8** %14
%44 = bitcast i8* %43 to i8**
store i8* %42, i8** %44
%45 = load i8*, i8** %9
%46 = getelementptr inbounds i8, i8* %45, i64 12
store i8* %46, i8** %15
%47 = load i8*, i8** %15
%48 = bitcast i8* %47 to i32*
%49 = load i32, i32* %48
store i32 %49, i32* %16
%50 = load i32, i32* %16
%51 = mul i32 %50, 1
store i32 %51, i32* %16
%52 = load i32, i32* %16
%53 = call i8* @xsi_get_transient_memory(i32 %52)
store i8* %53, i8** %11
%54 = load i8*, i8** %11
%55 = load i8*, i8** %8
%56 = load i32, i32* %16
%57 = call i32 @memcpy(i8* %54, i8* %55, i32 %56)
%58 = load i8*, i8** %9
%59 = getelementptr inbounds i8, i8* %58, i64 0
store i8* %59, i8** %17
%60 = load i8*, i8** %17
%61 = bitcast i8* %60 to i32*
%62 = load i32, i32* %61
store i32 %62, i32* %18
%63 = load i8*, i8** %9
%64 = getelementptr inbounds i8, i8* %63, i64 4
store i8* %64, i8** %19
%65 = load i8*, i8** %19
%66 = bitcast i8* %65 to i32*
%67 = load i32, i32* %66
store i32 %67, i32* %20
%68 = load i8*, i8** %9
%69 = getelementptr inbounds i8, i8* %68, i64 8
store i8* %69, i8** %21
%70 = load i8*, i8** %21
%71 = bitcast i8* %70 to i32*
%72 = load i32, i32* %71
store i32 %72, i32* %22
%73 = load i8*, i8** %7
%74 = getelementptr inbounds i8, i8* %73, i64 0
store i8* %74, i8** %23
%75 = load i8*, i8** %23
%76 = getelementptr inbounds i8, i8* %75, i64 0
store i8* %76, i8** %24
%77 = load i32, i32* %18
%78 = load i8*, i8** %24
%79 = bitcast i8* %78 to i32*
store i32 %77, i32* %79
%80 = load i8*, i8** %23
%81 = getelementptr inbounds i8, i8* %80, i64 4
store i8* %81, i8** %24
%82 = load i32, i32* %20
%83 = load i8*, i8** %24
%84 = bitcast i8* %83 to i32*
store i32 %82, i32* %84
%85 = load i8*, i8** %23
%86 = getelementptr inbounds i8, i8* %85, i64 8
store i8* %86, i8** %24
%87 = load i32, i32* %22
%88 = load i8*, i8** %24
%89 = bitcast i8* %88 to i32*
store i32 %87, i32* %89
%90 = load i32, i32* %20
%91 = load i32, i32* %18
%92 = sub nsw i32 %90, %91
store i32 %92, i32* %25
%93 = load i32, i32* %25
%94 = load i32, i32* %22
%95 = mul nsw i32 %93, %94
store i32 %95, i32* %26
%96 = load i32, i32* %26
%97 = add i32 %96, 1
store i32 %97, i32* %26
%98 = load i8*, i8** %23
%99 = getelementptr inbounds i8, i8* %98, i64 12
store i8* %99, i8** %24
%100 = load i32, i32* %26
%101 = load i8*, i8** %24
%102 = bitcast i8* %101 to i32*
store i32 %100, i32* %102
br label %103
103: ; preds = %39
%104 = load i8*, i8** %11
store i8* %104, i8** %5
br label %110
105: ; preds = %37
%106 = load i8*, i8** %8
%107 = load i8*, i8** %12
%108 = bitcast i8* %107 to i8**
store i8* %106, i8** %108
br label %39
109: ; No predecessors!
br label %110
110: ; preds = %109, %103
%111 = load i8*, i8** %5
ret i8* %111
}

LLVM IR (-O2):
define i8* @ieee_p_3499444699_sub_17241452391813765596_3536714472(i8* nocapture readnone %0, i8* nocapture writeonly %1, i8* %2, i8* nocapture %3) {
%5 = getelementptr inbounds i8, i8* %3, i64 12
%6 = bitcast i8* %5 to i32*
%7 = load i32, i32* %6
%8 = tail call i8* @xsi_get_transient_memory(i32 %7)
%9 = tail call i32 @memcpy(i8* %8, i8* %2, i32 %7)
%10 = bitcast i8* %3 to i32*
%11 = load i32, i32* %10
%12 = getelementptr inbounds i8, i8* %3, i64 4
%13 = bitcast i8* %12 to i32*
%14 = load i32, i32* %13
%15 = getelementptr inbounds i8, i8* %3, i64 8
%16 = bitcast i8* %15 to i32*
%17 = load i32, i32* %16
%18 = bitcast i8* %1 to i32*
store i32 %11, i32* %18
%19 = getelementptr inbounds i8, i8* %1, i64 4
%20 = bitcast i8* %19 to i32*
store i32 %14, i32* %20
%21 = getelementptr inbounds i8, i8* %1, i64 8
%22 = bitcast i8* %21 to i32*
store i32 %17, i32* %22
%23 = sub nsw i32 %14, %11
%24 = mul nsw i32 %23, %17
%25 = add i32 %24, 1
%26 = getelementptr inbounds i8, i8* %1, i64 12
%27 = bitcast i8* %26 to i32*
store i32 %25, i32* %27
ret i8* %8
}