#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 */
typedef unsigned char uint32_t;

/* Variables and functions */
int /*<<< orphan*/ memcpy(unsigned char *, unsigned char *, int);
int /*<<< orphan*/ sub_87568(unsigned char *, unsigned char *);
int /*<<< orphan*/ sub_8930C(unsigned char *);
int /*<<< orphan*/ sub_8B2F4(unsigned char *);
int /*<<< orphan*/ sub_8D114(unsigned char *);
int /*<<< orphan*/ sub_8F0B0(unsigned char *);
int /*<<< orphan*/ sub_910A8(unsigned char *);
int /*<<< orphan*/ sub_92E08(unsigned char *);
int /*<<< orphan*/ sub_94BDC(unsigned char *);
int /*<<< orphan*/ sub_96984(unsigned char *);
int /*<<< orphan*/ sub_985E0(unsigned char *);
int /*<<< orphan*/ sub_9A490(unsigned char *);
int /*<<< orphan*/ sub_9C42C(unsigned char *);
int /*<<< orphan*/ sub_9E1C4(unsigned char *, unsigned char *);
void sub_9E9D8(unsigned char *input, unsigned char *output) {
  uint32_t temp[0x32C / 4];
  uint32_t temp2[0x100 / 4];
  memcpy(temp2, input, 0x100);
  sub_87568((unsigned char *)temp, (unsigned char *)temp2);
  sub_8930C((unsigned char *)temp);
  sub_8B2F4((unsigned char *)temp);
  sub_8D114((unsigned char *)temp);
  sub_8F0B0((unsigned char *)temp);
  sub_910A8((unsigned char *)temp);
  sub_92E08((unsigned char *)temp);
  sub_94BDC((unsigned char *)temp);
  sub_96984((unsigned char *)temp);
  sub_985E0((unsigned char *)temp);
  sub_9A490((unsigned char *)temp);
  sub_9C42C((unsigned char *)temp);
  sub_9E1C4((unsigned char *)temp, (unsigned char *)temp2);
  memcpy(output, temp2, 0x100);
}


x86 assembly (clang, -O0):
<sub_9E9D8>:
push   %rbp
mov    %rsp,%rbp
sub    $0x120,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
lea    -0x120(%rbp),%rdi
mov    -0x8(%rbp),%rsi
mov    $0x100,%edx
call   10b0 <memcpy@plt>
lea    -0xe0(%rbp),%rdi
lea    -0x120(%rbp),%rsi
call   10f0 <sub_87568@plt>
lea    -0xe0(%rbp),%rdi
call   10c0 <sub_8930C@plt>
lea    -0xe0(%rbp),%rdi
call   1040 <sub_8B2F4@plt>
lea    -0xe0(%rbp),%rdi
call   10d0 <sub_8D114@plt>
lea    -0xe0(%rbp),%rdi
call   10a0 <sub_8F0B0@plt>
lea    -0xe0(%rbp),%rdi
call   1080 <sub_910A8@plt>
lea    -0xe0(%rbp),%rdi
call   1050 <sub_92E08@plt>
lea    -0xe0(%rbp),%rdi
call   1070 <sub_94BDC@plt>
lea    -0xe0(%rbp),%rdi
call   10e0 <sub_96984@plt>
lea    -0xe0(%rbp),%rdi
call   1060 <sub_985E0@plt>
lea    -0xe0(%rbp),%rdi
call   1030 <sub_9A490@plt>
lea    -0xe0(%rbp),%rdi
call   1090 <sub_9C42C@plt>
lea    -0xe0(%rbp),%rdi
lea    -0x120(%rbp),%rsi
call   1100 <sub_9E1C4@plt>
mov    -0x10(%rbp),%rdi
lea    -0x120(%rbp),%rsi
mov    $0x100,%edx
call   10b0 <memcpy@plt>
add    $0x120,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<sub_9E9D8>:
push   %r15
push   %r14
push   %rbx
sub    $0x110,%rsp
mov    %rsi,%r14
mov    %rdi,%rsi
mov    %rsp,%r15
mov    %r15,%rdi
mov    $0x100,%edx
call   10b0 <memcpy@plt>
lea    0x40(%rsp),%rbx
mov    %rbx,%rdi
mov    %r15,%rsi
call   10f0 <sub_87568@plt>
mov    %rbx,%rdi
call   10c0 <sub_8930C@plt>
mov    %rbx,%rdi
call   1040 <sub_8B2F4@plt>
mov    %rbx,%rdi
call   10d0 <sub_8D114@plt>
mov    %rbx,%rdi
call   10a0 <sub_8F0B0@plt>
mov    %rbx,%rdi
call   1080 <sub_910A8@plt>
mov    %rbx,%rdi
call   1050 <sub_92E08@plt>
mov    %rbx,%rdi
call   1070 <sub_94BDC@plt>
mov    %rbx,%rdi
call   10e0 <sub_96984@plt>
mov    %rbx,%rdi
call   1060 <sub_985E0@plt>
mov    %rbx,%rdi
call   1030 <sub_9A490@plt>
mov    %rbx,%rdi
call   1090 <sub_9C42C@plt>
mov    %rbx,%rdi
mov    %r15,%rsi
call   1100 <sub_9E1C4@plt>
mov    %r14,%rdi
mov    %r15,%rsi
mov    $0x100,%edx
call   10b0 <memcpy@plt>
add    $0x110,%rsp
pop    %rbx
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
define void @sub_9E9D8(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
%5 = alloca [203 x i8]
%6 = alloca [64 x i8]
store i8* %0, i8** %3
store i8* %1, i8** %4
%7 = getelementptr inbounds [64 x i8], [64 x i8]* %6, i64 0, i64 0
%8 = load i8*, i8** %3
%9 = call i32 @memcpy(i8* %7, i8* %8, i32 256)
%10 = getelementptr inbounds [203 x i8], [203 x i8]* %5, i64 0, i64 0
%11 = getelementptr inbounds [64 x i8], [64 x i8]* %6, i64 0, i64 0
%12 = call i32 @sub_87568(i8* %10, i8* %11)
%13 = getelementptr inbounds [203 x i8], [203 x i8]* %5, i64 0, i64 0
%14 = call i32 @sub_8930C(i8* %13)
%15 = getelementptr inbounds [203 x i8], [203 x i8]* %5, i64 0, i64 0
%16 = call i32 @sub_8B2F4(i8* %15)
%17 = getelementptr inbounds [203 x i8], [203 x i8]* %5, i64 0, i64 0
%18 = call i32 @sub_8D114(i8* %17)
%19 = getelementptr inbounds [203 x i8], [203 x i8]* %5, i64 0, i64 0
%20 = call i32 @sub_8F0B0(i8* %19)
%21 = getelementptr inbounds [203 x i8], [203 x i8]* %5, i64 0, i64 0
%22 = call i32 @sub_910A8(i8* %21)
%23 = getelementptr inbounds [203 x i8], [203 x i8]* %5, i64 0, i64 0
%24 = call i32 @sub_92E08(i8* %23)
%25 = getelementptr inbounds [203 x i8], [203 x i8]* %5, i64 0, i64 0
%26 = call i32 @sub_94BDC(i8* %25)
%27 = getelementptr inbounds [203 x i8], [203 x i8]* %5, i64 0, i64 0
%28 = call i32 @sub_96984(i8* %27)
%29 = getelementptr inbounds [203 x i8], [203 x i8]* %5, i64 0, i64 0
%30 = call i32 @sub_985E0(i8* %29)
%31 = getelementptr inbounds [203 x i8], [203 x i8]* %5, i64 0, i64 0
%32 = call i32 @sub_9A490(i8* %31)
%33 = getelementptr inbounds [203 x i8], [203 x i8]* %5, i64 0, i64 0
%34 = call i32 @sub_9C42C(i8* %33)
%35 = getelementptr inbounds [203 x i8], [203 x i8]* %5, i64 0, i64 0
%36 = getelementptr inbounds [64 x i8], [64 x i8]* %6, i64 0, i64 0
%37 = call i32 @sub_9E1C4(i8* %35, i8* %36)
%38 = load i8*, i8** %4
%39 = getelementptr inbounds [64 x i8], [64 x i8]* %6, i64 0, i64 0
%40 = call i32 @memcpy(i8* %38, i8* %39, i32 256)
ret void
}

LLVM IR (-O2):
define void @sub_9E9D8(i8* %0, i8* %1) {
%3 = alloca [203 x i8]
%4 = alloca [64 x i8]
%5 = getelementptr inbounds [203 x i8], [203 x i8]* %3, i64 0, i64 0
%6 = getelementptr inbounds [64 x i8], [64 x i8]* %4, i64 0, i64 0
%7 = call i32 @memcpy(i8* %6, i8* %0, i32 256)
%8 = call i32 @sub_87568(i8* %5, i8* %6)
%9 = call i32 @sub_8930C(i8* %5)
%10 = call i32 @sub_8B2F4(i8* %5)
%11 = call i32 @sub_8D114(i8* %5)
%12 = call i32 @sub_8F0B0(i8* %5)
%13 = call i32 @sub_910A8(i8* %5)
%14 = call i32 @sub_92E08(i8* %5)
%15 = call i32 @sub_94BDC(i8* %5)
%16 = call i32 @sub_96984(i8* %5)
%17 = call i32 @sub_985E0(i8* %5)
%18 = call i32 @sub_9A490(i8* %5)
%19 = call i32 @sub_9C42C(i8* %5)
%20 = call i32 @sub_9E1C4(i8* %5, i8* %6)
%21 = call i32 @memcpy(i8* %1, i8* %6, i32 256)
ret void
}