#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 ArrowImage(char *source, char *dest, int size) {
  char Gif[1300];
  char temp[1300];
  int size2;
  if (!source || !dest || !size) {
    return (0);
  }
  strncpy(Gif,
          "R0lGODlhDwAPAPcAAAQCBPz+5Pz+/"
          "AAAAJWYoB7mMAASRQAAAJrjkB3q5wCQEgB8AAA06wDmhxUS"
          "1AAAdww4AAAA8AAA/"
          "QAAfwA4kAIA5wAAEgAAAADjMgGUiADU1AB3d6DVUOWy5xLUEgB3AHkA/wgG"
          "h4IG1HwAdwAgDAAAAAEAAAAAAFYKoAAGgwAFfgAAAKgStOQAgxIAfgACAG4AFAAAAAAA"
          "AAAAAMie"
          "AeUCABIAAAAAABgBAO4AAJAAAHwAAHAAAAUGAJEGAHwAAP8wEP+"
          "AAP9FAP8AAG0KAAUGAJEFAHwA"
          "ABUABwoAAIKZAHziAADjAACUABXUAAB3AGBJAANmAADWAAB3ALACAZAGABcFAAAAAHhO"
          "MWFvMBV0"
          "MAAgIABhJQAgIABmAABpAH5sJABl7AAAEsAAAAATlAAGBAD/1wD/d/+kCP/"
          "miP8S1P8Ad/8Q///g"
          "///U//93/wAA/"
          "wAGhwAG1AAAdwAgQwAAtwAA1AAAdwAKAAAGABUFAAAAAFcSoPMAMAAARQACANgB"
          "AuUABhIABQAAAC/"
          "sAA7mAIISAHwAANu+BwXfAILUAHx3AEAAAOUGAE8GAAAAAHggAGEAAAEAFQAA"
          "AGwKAAAGAAAFAAAAABRXAOXzABIAAAAAADTwAADmAAASAMAAAPiDAPcqABKCAAB8ABgA"
          "CO4AAJAA"
          "oXwAAHAAAAUAAJEAAHwAAP8AAP8AAP8AAP8AAG0ADQUBAJEAAHwAAErnDfYqAICCAHx8"
          "AAAUXADn"
          "8BUSEgAAAADC/wAq/wCC/wB8/"
          "3gAAGEAABUAAAAAAAAMHAEA6AChEgAAAAC+DgA+zwCCSwB8AFf/"
          "/Pb/54D/Enz/"
          "AAAYW+fo4hISTgAAAHj3MGE+6BWCEgB8ANG4vtzvPtROgncAfKAQqYMZ6H5PEgAA"
          "AAwA8QAB/wAA/wAAfwAUnADn6AASEgAAAOAADNwBANQAoXcAAAAWvgA/"
          "PgCCggB8fAwBDAAAAAAA"
          "oQAAABMAVwYA8/"
          "8wAP8AAAHNAACrAAC6AADcAAAAfgAAVQAARwAAACH5BAEAAAIALAAAAAAPAA8A"
          "BwhEAAEIGEiwYEEAAg0qFIAw4UKCAAIgfAgxgESHCyNanPhQ40aMBy2K5GjQ40iQDEWq"
          "JDnQ5EqM"
          "Ll9WVEmTY8yaAm/iDAgAOw==",
          1300);
  size2 = base64decode(temp, Gif);
  if (size2 < 1300) {
    size2 = 1300;
  }
  if (size2 > size) {
    return (0);
  }
  memcpy(dest, temp, size2);
  return (size2);
}


x86 assembly (clang, -O0):
<ArrowImage>:
push   %rbp
mov    %rsp,%rbp
sub    $0xa60,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    %edx,-0x1c(%rbp)
cmpq   $0x0,-0x10(%rbp)
je     1166 <ArrowImage+0x36>
cmpq   $0x0,-0x18(%rbp)
je     1166 <ArrowImage+0x36>
cmpl   $0x0,-0x1c(%rbp)
jne    1172 <ArrowImage+0x42>
movl   $0x0,-0x4(%rbp)
jmp    11f7 <ArrowImage+0xc7>
lea    -0x530(%rbp),%rdi
lea    0xe80(%rip),%rsi
mov    $0x514,%edx
call   1030 <strncpy@plt>
lea    -0xa50(%rbp),%rdi
lea    -0x530(%rbp),%rsi
call   1040 <base64decode@plt>
mov    %eax,-0xa54(%rbp)
cmpl   $0x514,-0xa54(%rbp)
jge    11bd <ArrowImage+0x8d>
movl   $0x514,-0xa54(%rbp)
mov    -0xa54(%rbp),%eax
cmp    -0x1c(%rbp),%eax
jle    11d8 <ArrowImage+0xa8>
movl   $0x0,-0x4(%rbp)
jmp    11f7 <ArrowImage+0xc7>
mov    -0x18(%rbp),%rdi
lea    -0xa50(%rbp),%rsi
mov    -0xa54(%rbp),%edx
call   1050 <memcpy@plt>
mov    -0xa54(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0xa60,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ArrowImage>:
push   %rbp
push   %r15
push   %r14
push   %r12
push   %rbx
sub    $0xa40,%rsp
xor    %r14d,%r14d
test   %rdi,%rdi
je     119d <ArrowImage+0x6d>
mov    %rsi,%r15
test   %rsi,%rsi
je     119d <ArrowImage+0x6d>
mov    %edx,%ebp
test   %edx,%edx
je     119d <ArrowImage+0x6d>
lea    0xea4(%rip),%rsi
lea    0x520(%rsp),%r12
mov    $0x514,%ebx
mov    %r12,%rdi
mov    $0x514,%edx
call   1030 <strncpy@plt>
mov    %rsp,%rdi
mov    %r12,%rsi
call   1040 <base64decode@plt>
cmp    $0x515,%eax
cmovge %eax,%ebx
cmp    %ebp,%ebx
jg     119d <ArrowImage+0x6d>
mov    %rsp,%rsi
mov    %r15,%rdi
mov    %ebx,%edx
call   1050 <memcpy@plt>
mov    %ebx,%r14d
mov    %r14d,%eax
add    $0xa40,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@.str = [1165 x i8] c"R0lGODlhDwAPAPcAAAQCBPz+5Pz+/AAAAJWYoB7mMAASRQAAAJrjkB3q5wCQEgB8AAA06wDmhxUS1AAAdww4AAAA8AAA/QAAfwA4kAIA5wAAEgAAAADjMgGUiADU1AB3d6DVUOWy5xLUEgB3AHkA/wgGh4IG1HwAdwAgDAAAAAEAAAAAAFYKoAAGgwAFfgAAAKgStOQAgxIAfgACAG4AFAAAAAAAAAAAAMieAeUCABIAAAAAABgBAO4AAJAAAHwAAHAAAAUGAJEGAHwAAP8wEP+AAP9FAP8AAG0KAAUGAJEFAHwAABUABwoAAIKZAHziAADjAACUABXUAAB3AGBJAANmAADWAAB3ALACAZAGABcFAAAAAHhOMWFvMBV0MAAgIABhJQAgIABmAABpAH5sJABl7AAAEsAAAAATlAAGBAD/1wD/d/+kCP/miP8S1P8Ad/8Q///g///U//93/wAA/wAGhwAG1AAAdwAgQwAAtwAA1AAAdwAKAAAGABUFAAAAAFcSoPMAMAAARQACANgBAuUABhIABQAAAC/sAA7mAIISAHwAANu+BwXfAILUAHx3AEAAAOUGAE8GAAAAAHggAGEAAAEAFQAAAGwKAAAGAAAFAAAAABRXAOXzABIAAAAAADTwAADmAAASAMAAAPiDAPcqABKCAAB8ABgACO4AAJAAoXwAAHAAAAUAAJEAAHwAAP8AAP8AAP8AAP8AAG0ADQUBAJEAAHwAAErnDfYqAICCAHx8AAAUXADn8BUSEgAAAADC/wAq/wCC/wB8/3gAAGEAABUAAAAAAAAMHAEA6AChEgAAAAC+DgA+zwCCSwB8AFf//Pb/54D/Enz/AAAYW+fo4hISTgAAAHj3MGE+6BWCEgB8ANG4vtzvPtROgncAfKAQqYMZ6H5PEgAAAAwA8QAB/wAA/wAAfwAUnADn6AASEgAAAOAADNwBANQAoXcAAAAWvgA/PgCCggB8fAwBDAAAAAAAoQAAABMAVwYA8/8wAP8AAAHNAACrAAC6AADcAAAAfgAAVQAARwAAACH5BAEAAAIALAAAAAAPAA8ABwhEAAEIGEiwYEEAAg0qFIAw4UKCAAIgfAgxgESHCyNanPhQ40aMBy2K5GjQ40iQDEWqJDnQ5EqMLl9WVEmTY8yaAm/iDAgAOw==\00"
define i32 @ArrowImage(i8* %0, i8* %1, i32 %2) {
%4 = alloca i32
%5 = alloca i8*
%6 = alloca i8*
%7 = alloca i32
%8 = alloca [1300 x i8]
%9 = alloca [1300 x i8]
%10 = alloca i32
store i8* %0, i8** %5
store i8* %1, i8** %6
store i32 %2, i32* %7
%11 = load i8*, i8** %5
%12 = icmp ne i8* %11, null
br i1 %12, label %13, label %19
13: ; preds = %3
%14 = load i8*, i8** %6
%15 = icmp ne i8* %14, null
br i1 %15, label %16, label %19
16: ; preds = %13
%17 = load i32, i32* %7
%18 = icmp ne i32 %17, 0
br i1 %18, label %20, label %19
19: ; preds = %16, %13, %3
store i32 0, i32* %4
br label %40
20: ; preds = %16
%21 = getelementptr inbounds [1300 x i8], [1300 x i8]* %8, i64 0, i64 0
%22 = call i32 @strncpy(i8* %21, i8* getelementptr inbounds ([1165 x i8], [1165 x i8]* @.str, i64 0, i64 0), i32 1300)
%23 = getelementptr inbounds [1300 x i8], [1300 x i8]* %9, i64 0, i64 0
%24 = getelementptr inbounds [1300 x i8], [1300 x i8]* %8, i64 0, i64 0
%25 = call i32 @base64decode(i8* %23, i8* %24)
store i32 %25, i32* %10
%26 = load i32, i32* %10
%27 = icmp slt i32 %26, 1300
br i1 %27, label %28, label %29
28: ; preds = %20
store i32 1300, i32* %10
br label %29
29: ; preds = %28, %20
%30 = load i32, i32* %10
%31 = load i32, i32* %7
%32 = icmp sgt i32 %30, %31
br i1 %32, label %33, label %34
33: ; preds = %29
store i32 0, i32* %4
br label %40
34: ; preds = %29
%35 = load i8*, i8** %6
%36 = getelementptr inbounds [1300 x i8], [1300 x i8]* %9, i64 0, i64 0
%37 = load i32, i32* %10
%38 = call i32 @memcpy(i8* %35, i8* %36, i32 %37)
%39 = load i32, i32* %10
store i32 %39, i32* %4
br label %40
40: ; preds = %34, %33, %19
%41 = load i32, i32* %4
ret i32 %41
}

LLVM IR (-O2):
@.str = [1165 x i8] c"R0lGODlhDwAPAPcAAAQCBPz+5Pz+/AAAAJWYoB7mMAASRQAAAJrjkB3q5wCQEgB8AAA06wDmhxUS1AAAdww4AAAA8AAA/QAAfwA4kAIA5wAAEgAAAADjMgGUiADU1AB3d6DVUOWy5xLUEgB3AHkA/wgGh4IG1HwAdwAgDAAAAAEAAAAAAFYKoAAGgwAFfgAAAKgStOQAgxIAfgACAG4AFAAAAAAAAAAAAMieAeUCABIAAAAAABgBAO4AAJAAAHwAAHAAAAUGAJEGAHwAAP8wEP+AAP9FAP8AAG0KAAUGAJEFAHwAABUABwoAAIKZAHziAADjAACUABXUAAB3AGBJAANmAADWAAB3ALACAZAGABcFAAAAAHhOMWFvMBV0MAAgIABhJQAgIABmAABpAH5sJABl7AAAEsAAAAATlAAGBAD/1wD/d/+kCP/miP8S1P8Ad/8Q///g///U//93/wAA/wAGhwAG1AAAdwAgQwAAtwAA1AAAdwAKAAAGABUFAAAAAFcSoPMAMAAARQACANgBAuUABhIABQAAAC/sAA7mAIISAHwAANu+BwXfAILUAHx3AEAAAOUGAE8GAAAAAHggAGEAAAEAFQAAAGwKAAAGAAAFAAAAABRXAOXzABIAAAAAADTwAADmAAASAMAAAPiDAPcqABKCAAB8ABgACO4AAJAAoXwAAHAAAAUAAJEAAHwAAP8AAP8AAP8AAP8AAG0ADQUBAJEAAHwAAErnDfYqAICCAHx8AAAUXADn8BUSEgAAAADC/wAq/wCC/wB8/3gAAGEAABUAAAAAAAAMHAEA6AChEgAAAAC+DgA+zwCCSwB8AFf//Pb/54D/Enz/AAAYW+fo4hISTgAAAHj3MGE+6BWCEgB8ANG4vtzvPtROgncAfKAQqYMZ6H5PEgAAAAwA8QAB/wAA/wAAfwAUnADn6AASEgAAAOAADNwBANQAoXcAAAAWvgA/PgCCggB8fAwBDAAAAAAAoQAAABMAVwYA8/8wAP8AAAHNAACrAAC6AADcAAAAfgAAVQAARwAAACH5BAEAAAIALAAAAAAPAA8ABwhEAAEIGEiwYEEAAg0qFIAw4UKCAAIgfAgxgESHCyNanPhQ40aMBy2K5GjQ40iQDEWqJDnQ5EqMLl9WVEmTY8yaAm/iDAgAOw==\00"
define i32 @ArrowImage(i8* readnone %0, i8* %1, i32 %2) {
%4 = alloca [1300 x i8]
%5 = alloca [1300 x i8]
%6 = getelementptr inbounds [1300 x i8], [1300 x i8]* %4, i64 0, i64 0
%7 = getelementptr inbounds [1300 x i8], [1300 x i8]* %5, i64 0, i64 0
%8 = icmp ne i8* %0, null
%9 = icmp ne i8* %1, null
%10 = and i1 %8, %9
%11 = icmp ne i32 %2, 0
%12 = and i1 %10, %11
br i1 %12, label %13, label %21
13: ; preds = %3
%14 = call i32 @strncpy(i8* %6, i8* getelementptr inbounds ([1165 x i8], [1165 x i8]* @.str, i64 0, i64 0), i32 1300)
%15 = call i32 @base64decode(i8* %7, i8* %6)
%16 = icmp sgt i32 %15, 1300
%17 = select i1 %16, i32 %15, i32 1300
%18 = icmp sgt i32 %17, %2
br i1 %18, label %21, label %19
19: ; preds = %13
%20 = call i32 @memcpy(i8* %1, i8* %7, i32 %17)
br label %21
21: ; preds = %13, %3, %19
%22 = phi i32 [ %17, %19 ], [ 0, %3 ], [ 0, %13 ]
ret i32 %22
}