#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_p_1242562249_sub_17126692536656888728_1035706684(char *, char *, int,
                                                            unsigned int);
char *ieee_p_1242562249_sub_3525738511873186323_1035706684(char *, char *,
                                                           char *, char *,
                                                           char *, char *);
int /*<<< orphan*/ memcpy(char *, char *, unsigned int);
char *xsi_get_transient_memory(unsigned int);
char *ieee_p_1242562249_sub_800139796931496790_1035706684(char *t1, char *t2,
                                                          char *t3, char *t4,
                                                          int t5) {
  char t7[24];
  char t12[16];
  char t13[16];
  char *t0;
  char *t8;
  unsigned char t9;
  char *t10;
  char *t11;
  char *t14;
  unsigned int t15;
  char *t16;
  char *t17;
  char *t18;
  unsigned int t19;
  unsigned int t20;
  char *t21;
  int t22;
  char *t23;
  int t24;
  char *t25;
  int t26;
  char *t27;
  char *t28;
  int t29;
  unsigned int t30;
LAB0:
  t8 = (t7 + 4U);
  t9 = (t3 != 0);
  if (t9 == 1)
    goto LAB3;
LAB2:
  t10 = (t7 + 12U);
  *((char **)t10) = t4;
  t11 = (t7 + 20U);
  *((int *)t11) = t5;
  t14 = (t4 + 12U);
  t15 = *((unsigned int *)t14);
  t16 = ieee_p_1242562249_sub_17126692536656888728_1035706684(t1, t13, t5,
                                                              ((t15)));
  t17 = ieee_p_1242562249_sub_3525738511873186323_1035706684(t1, t12, t3, t4,
                                                             t16, t13);
  t18 = (t12 + 12U);
  t19 = *((unsigned int *)t18);
  t20 = (1U * t19);
  t0 = xsi_get_transient_memory(t20);
  memcpy(t0, t17, t20);
  t21 = (t12 + 0U);
  t22 = *((int *)t21);
  t23 = (t12 + 4U);
  t24 = *((int *)t23);
  t25 = (t12 + 8U);
  t26 = *((int *)t25);
  t27 = (t2 + 0U);
  t28 = (t27 + 0U);
  *((int *)t28) = t22;
  t28 = (t27 + 4U);
  *((int *)t28) = t24;
  t28 = (t27 + 8U);
  *((int *)t28) = t26;
  t29 = (t24 - t22);
  t30 = (t29 * t26);
  t30 = (t30 + 1);
  t28 = (t27 + 12U);
  *((unsigned int *)t28) = t30;
LAB1:
  return t0;
LAB3:
  *((char **)t8) = t3;
  goto LAB2;
LAB4:;
}


x86 assembly (clang, -O0):
push   %rbp
mov    %rsp,%rbp
sub    $0x110,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    %rdx,-0x20(%rbp)
mov    %rcx,-0x28(%rbp)
mov    %r8d,-0x2c(%rbp)
lea    -0x50(%rbp),%rax
add    $0x4,%rax
mov    %rax,-0x80(%rbp)
cmpq   $0x0,-0x20(%rbp)
setne  %al
and    $0x1,%al
movzbl %al,%eax
mov    %al,-0x81(%rbp)
movzbl -0x81(%rbp),%eax
cmp    $0x1,%eax
jne    1193 <ieee_p_1242562249_sub_800139796931496790_1035706684+0x53>
jmp    13a6 <ieee_p_1242562249_sub_800139796931496790_1035706684+0x266>
jmp    1198 <ieee_p_1242562249_sub_800139796931496790_1035706684+0x58>
lea    -0x50(%rbp),%rax
add    $0xc,%rax
mov    %rax,-0x90(%rbp)
mov    -0x28(%rbp),%rcx
mov    -0x90(%rbp),%rax
mov    %rcx,(%rax)
lea    -0x50(%rbp),%rax
add    $0x14,%rax
mov    %rax,-0x98(%rbp)
mov    -0x2c(%rbp),%ecx
mov    -0x98(%rbp),%rax
mov    %ecx,(%rax)
mov    -0x28(%rbp),%rax
add    $0xc,%rax
mov    %rax,-0xa0(%rbp)
mov    -0xa0(%rbp),%rax
mov    (%rax),%eax
mov    %eax,-0xa4(%rbp)
mov    -0x10(%rbp),%rdi
lea    -0x70(%rbp),%rsi
mov    -0x2c(%rbp),%edx
mov    -0xa4(%rbp),%ecx
call   1050 <ieee_p_1242562249_sub_17126692536656888728_1035706684@plt>
mov    %rax,-0xb0(%rbp)
mov    -0x10(%rbp),%rdi
lea    -0x60(%rbp),%rsi
mov    -0x20(%rbp),%rdx
mov    -0x28(%rbp),%rcx
mov    -0xb0(%rbp),%r8
lea    -0x70(%rbp),%r9
call   1030 <ieee_p_1242562249_sub_3525738511873186323_1035706684@plt>
mov    %rax,-0xb8(%rbp)
lea    -0x60(%rbp),%rax
add    $0xc,%rax
mov    %rax,-0xc0(%rbp)
mov    -0xc0(%rbp),%rax
mov    (%rax),%eax
mov    %eax,-0xc4(%rbp)
mov    -0xc4(%rbp),%eax
shl    $0x0,%eax
mov    %eax,-0xc8(%rbp)
mov    -0xc8(%rbp),%edi
call   1060 <xsi_get_transient_memory@plt>
mov    %rax,-0x78(%rbp)
mov    -0x78(%rbp),%rdi
mov    -0xb8(%rbp),%rsi
mov    -0xc8(%rbp),%edx
call   1040 <memcpy@plt>
lea    -0x60(%rbp),%rax
mov    %rax,-0xd0(%rbp)
mov    -0xd0(%rbp),%rax
mov    (%rax),%eax
mov    %eax,-0xd4(%rbp)
lea    -0x60(%rbp),%rax
add    $0x4,%rax
mov    %rax,-0xe0(%rbp)
mov    -0xe0(%rbp),%rax
mov    (%rax),%eax
mov    %eax,-0xe4(%rbp)
lea    -0x60(%rbp),%rax
add    $0x8,%rax
mov    %rax,-0xf0(%rbp)
mov    -0xf0(%rbp),%rax
mov    (%rax),%eax
mov    %eax,-0xf4(%rbp)
mov    -0x18(%rbp),%rax
mov    %rax,-0x100(%rbp)
mov    -0x100(%rbp),%rax
mov    %rax,-0x108(%rbp)
mov    -0xd4(%rbp),%ecx
mov    -0x108(%rbp),%rax
mov    %ecx,(%rax)
mov    -0x100(%rbp),%rax
add    $0x4,%rax
mov    %rax,-0x108(%rbp)
mov    -0xe4(%rbp),%ecx
mov    -0x108(%rbp),%rax
mov    %ecx,(%rax)
mov    -0x100(%rbp),%rax
add    $0x8,%rax
mov    %rax,-0x108(%rbp)
mov    -0xf4(%rbp),%ecx
mov    -0x108(%rbp),%rax
mov    %ecx,(%rax)
mov    -0xe4(%rbp),%eax
sub    -0xd4(%rbp),%eax
mov    %eax,-0x10c(%rbp)
mov    -0x10c(%rbp),%eax
imul   -0xf4(%rbp),%eax
mov    %eax,-0x110(%rbp)
mov    -0x110(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x110(%rbp)
mov    -0x100(%rbp),%rax
add    $0xc,%rax
mov    %rax,-0x108(%rbp)
mov    -0x110(%rbp),%ecx
mov    -0x108(%rbp),%rax
mov    %ecx,(%rax)
mov    -0x78(%rbp),%rax
mov    %rax,-0x8(%rbp)
jmp    13b6 <ieee_p_1242562249_sub_800139796931496790_1035706684+0x276>
mov    -0x20(%rbp),%rcx
mov    -0x80(%rbp),%rax
mov    %rcx,(%rax)
jmp    1198 <ieee_p_1242562249_sub_800139796931496790_1035706684+0x58>
mov    -0x8(%rbp),%rax
add    $0x110,%rsp
pop    %rbp
ret

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

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

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