#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 base64decode(char *, char *);
int /*<<< orphan*/ memcpy(char *, char *, int);
int /*<<< orphan*/ strncpy(char *, char *, int);
int SearchImage(char *source, char *dest, int size) {
  char Gif[1400];
  char temp[1400];
  int size2;
  strncpy(Gif,
          "R0lGODlhEAAQAIcAAAAAACknJjY0Mj89O0NBPkpKSFBQT1ZVVFRXWVxaWF5bWF9eW19g"
          "YGNUVGVb"
          "V3RZVXhgWmNiYmVjY2ppaGpsbmxranVzcXl4eW92gnV/"
          "inuCj3qHl4E4KYc5KpA1J4tSO49RPJVN"
          "NLBjHJVeV4htbZd8fKdhW99uEO1qCfFrCoKAf/SONOq0RP/UOv/VPP/"
          "bPfLHTfPITPjHX4yLiIyL"
          "i4SHko6QmpGPi5aVkpmZn52cnp6en5CcpJifo5mdq5egqJikpqSjo6ClqKanqqqqqqmw"
          "tq6xta+x"
          "ta+zt7CwsLKysIms15ms1Ze666m+7ZTL/5jH95nM/5nN/5rN/57P/5/P/53T/6LR/"
          "6TS/6TY/6jT"
          "/6nV/6nX/6rW/6vW/6zX/7LA4rDF8rTI9LfP+bfQ4L7Q7bLX/7XW/7La/7Tb/7Td/"
          "7fc/7jb/rvf"
          "/7rg/7vg/7/g/8PDw8vLys3IyM/PztXV1cve58Lh/8Pi/8Xl/cfl/8fo/8jm/83n/"
          "8vo/8zo/87t"
          "/9Pl9NLp/9Pr/9Ts+tjp9djv/9jw/9nw/9ny/9vw/9vz/9v1/9/z//"
          "X0y+Ti4uji4ujk5Onk5Orm"
          "5uvm5uvr6+3p6eD0/+D3/+L1//Dr6/Dw7/f39/n5+fv7+/39/f///"
          "wAAAAAAAAAAAAAAAAAAAAAA"
          "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"
          "AAAAAAAA"
          "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"
          "AAAAAAAA"
          "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"
          "AAAAAAAA"
          "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"
          "AAAAAAAA"
          "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAMAAKAALAAA"
          "AAAQABAA"
          "AAjGAEGBooMjhw8bFmYIXLhQiQ4wYcQ4YVJDAUOBcnaMOSNI0SA2TTQsuHijzJU3eO7A"
          "cZNlyQEi"
          "DIOYeYJlixctVaxAwZCA4ZE1VKRImRJlChc1GwgwHOKnDZouW76k2ZMnwwCGKgIB+"
          "qNHD58+jMgg"
          "YMCQhpFFiQ4ZQoSJEI8Acy5WQFKoUaZLdn4AKWHiIqgJF4QU6UFBAAlHMkL4TSLBQIEI"
          "cUasaBED"
          "hF+/HlK4gPHh8sUOKF6wgOCZIYcTIhyUZvigAaiAADs=",
          1400);
  size2 = base64decode(temp, Gif);
  memcpy(dest, temp, size2);
  return (size2);
}


x86 assembly (clang, -O0):
<SearchImage>:
push   %rbp
mov    %rsp,%rbp
sub    $0xb20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
lea    -0x590(%rbp),%rdi
lea    0xeac(%rip),%rsi
mov    $0x578,%edx
call   1030 <strncpy@plt>
lea    -0xb10(%rbp),%rdi
lea    -0x590(%rbp),%rsi
call   1040 <base64decode@plt>
mov    %eax,-0xb14(%rbp)
mov    -0x10(%rbp),%rdi
lea    -0xb10(%rbp),%rsi
mov    -0xb14(%rbp),%edx
call   1050 <memcpy@plt>
mov    -0xb14(%rbp),%eax
add    $0xb20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<SearchImage>:
push   %rbp
push   %r15
push   %r14
push   %rbx
sub    $0xaf8,%rsp
mov    %rsi,%rbx
lea    0xeb9(%rip),%rsi
lea    0x580(%rsp),%r14
mov    %r14,%rdi
mov    $0x578,%edx
call   1030 <strncpy@plt>
mov    %rsp,%r15
mov    %r15,%rdi
mov    %r14,%rsi
call   1040 <base64decode@plt>
mov    %eax,%ebp
mov    %rbx,%rdi
mov    %r15,%rsi
mov    %eax,%edx
call   1050 <memcpy@plt>
mov    %ebp,%eax
add    $0xaf8,%rsp
pop    %rbx
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@.str = [1337 x i8] c"R0lGODlhEAAQAIcAAAAAACknJjY0Mj89O0NBPkpKSFBQT1ZVVFRXWVxaWF5bWF9eW19gYGNUVGVbV3RZVXhgWmNiYmVjY2ppaGpsbmxranVzcXl4eW92gnV/inuCj3qHl4E4KYc5KpA1J4tSO49RPJVNNLBjHJVeV4htbZd8fKdhW99uEO1qCfFrCoKAf/SONOq0RP/UOv/VPP/bPfLHTfPITPjHX4yLiIyLi4SHko6QmpGPi5aVkpmZn52cnp6en5CcpJifo5mdq5egqJikpqSjo6ClqKanqqqqqqmwtq6xta+xta+zt7CwsLKysIms15ms1Ze666m+7ZTL/5jH95nM/5nN/5rN/57P/5/P/53T/6LR/6TS/6TY/6jT/6nV/6nX/6rW/6vW/6zX/7LA4rDF8rTI9LfP+bfQ4L7Q7bLX/7XW/7La/7Tb/7Td/7fc/7jb/rvf/7rg/7vg/7/g/8PDw8vLys3IyM/PztXV1cve58Lh/8Pi/8Xl/cfl/8fo/8jm/83n/8vo/8zo/87t/9Pl9NLp/9Pr/9Ts+tjp9djv/9jw/9nw/9ny/9vw/9vz/9v1/9/z//X0y+Ti4uji4ujk5Onk5Orm5uvm5uvr6+3p6eD0/+D3/+L1//Dr6/Dw7/f39/n5+fv7+/39/f///wAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAMAAKAALAAAAAAQABAAAAjGAEGBooMjhw8bFmYIXLhQiQ4wYcQ4YVJDAUOBcnaMOSNI0SA2TTQsuHijzJU3eO7AcZNlyQEiDIOYeYJlixctVaxAwZCA4ZE1VKRImRJlChc1GwgwHOKnDZouW76k2ZMnwwCGKgIB+qNHD58+jMggYMCQhpFFiQ4ZQoSJEI8Acy5WQFKoUaZLdn4AKWHiIqgJF4QU6UFBAAlHMkL4TSLBQIEIcUasaBEDhF+/HlK4gPHh8sUOKF6wgOCZIYcTIhyUZvigAaiAADs=\00"
define i32 @SearchImage(i8* %0, i8* %1, i32 %2) {
%4 = alloca i8*
%5 = alloca i8*
%6 = alloca i32
%7 = alloca [1400 x i8]
%8 = alloca [1400 x i8]
%9 = alloca i32
store i8* %0, i8** %4
store i8* %1, i8** %5
store i32 %2, i32* %6
%10 = getelementptr inbounds [1400 x i8], [1400 x i8]* %7, i64 0, i64 0
%11 = call i32 @strncpy(i8* %10, i8* getelementptr inbounds ([1337 x i8], [1337 x i8]* @.str, i64 0, i64 0), i32 1400)
%12 = getelementptr inbounds [1400 x i8], [1400 x i8]* %8, i64 0, i64 0
%13 = getelementptr inbounds [1400 x i8], [1400 x i8]* %7, i64 0, i64 0
%14 = call i32 @base64decode(i8* %12, i8* %13)
store i32 %14, i32* %9
%15 = load i8*, i8** %5
%16 = getelementptr inbounds [1400 x i8], [1400 x i8]* %8, i64 0, i64 0
%17 = load i32, i32* %9
%18 = call i32 @memcpy(i8* %15, i8* %16, i32 %17)
%19 = load i32, i32* %9
ret i32 %19
}

LLVM IR (-O2):
@.str = [1337 x i8] c"R0lGODlhEAAQAIcAAAAAACknJjY0Mj89O0NBPkpKSFBQT1ZVVFRXWVxaWF5bWF9eW19gYGNUVGVbV3RZVXhgWmNiYmVjY2ppaGpsbmxranVzcXl4eW92gnV/inuCj3qHl4E4KYc5KpA1J4tSO49RPJVNNLBjHJVeV4htbZd8fKdhW99uEO1qCfFrCoKAf/SONOq0RP/UOv/VPP/bPfLHTfPITPjHX4yLiIyLi4SHko6QmpGPi5aVkpmZn52cnp6en5CcpJifo5mdq5egqJikpqSjo6ClqKanqqqqqqmwtq6xta+xta+zt7CwsLKysIms15ms1Ze666m+7ZTL/5jH95nM/5nN/5rN/57P/5/P/53T/6LR/6TS/6TY/6jT/6nV/6nX/6rW/6vW/6zX/7LA4rDF8rTI9LfP+bfQ4L7Q7bLX/7XW/7La/7Tb/7Td/7fc/7jb/rvf/7rg/7vg/7/g/8PDw8vLys3IyM/PztXV1cve58Lh/8Pi/8Xl/cfl/8fo/8jm/83n/8vo/8zo/87t/9Pl9NLp/9Pr/9Ts+tjp9djv/9jw/9nw/9ny/9vw/9vz/9v1/9/z//X0y+Ti4uji4ujk5Onk5Orm5uvm5uvr6+3p6eD0/+D3/+L1//Dr6/Dw7/f39/n5+fv7+/39/f///wAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAMAAKAALAAAAAAQABAAAAjGAEGBooMjhw8bFmYIXLhQiQ4wYcQ4YVJDAUOBcnaMOSNI0SA2TTQsuHijzJU3eO7AcZNlyQEiDIOYeYJlixctVaxAwZCA4ZE1VKRImRJlChc1GwgwHOKnDZouW76k2ZMnwwCGKgIB+qNHD58+jMggYMCQhpFFiQ4ZQoSJEI8Acy5WQFKoUaZLdn4AKWHiIqgJF4QU6UFBAAlHMkL4TSLBQIEIcUasaBEDhF+/HlK4gPHh8sUOKF6wgOCZIYcTIhyUZvigAaiAADs=\00"
define i32 @SearchImage(i8* nocapture readnone %0, i8* %1, i32 %2) {
%4 = alloca [1400 x i8]
%5 = alloca [1400 x i8]
%6 = getelementptr inbounds [1400 x i8], [1400 x i8]* %4, i64 0, i64 0
%7 = getelementptr inbounds [1400 x i8], [1400 x i8]* %5, i64 0, i64 0
%8 = call i32 @strncpy(i8* %6, i8* getelementptr inbounds ([1337 x i8], [1337 x i8]* @.str, i64 0, i64 0), i32 1400)
%9 = call i32 @base64decode(i8* %7, i8* %6)
%10 = call i32 @memcpy(i8* %1, i8* %7, i32 %9)
ret i32 %9
}