#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 StatusImage(char *source, char *dest, int size) {
  char Gif[1400];
  char temp[1400];
  int size2;
  if (!source || !dest || !size) {
    return (0);
  }
  strncpy(Gif,
          "R0lGODlhEAAQAIcAAAAAAAQfmgYcmA0alAgfmgYinA4mnQ4qnxMjlxInmhcrmwAupgkq"
          "pQA0rgA7"
          "pQA9rAA+rAA/"
          "rgA1shMzoxMzqQNBrQBBsgVGuQZHugZHuw1AtwtMvQxMvQ1PvxtArB1CqhJGuxNP"
          "ux9ItB9JuylNqyhMrCZRrS1VryRQsyVStChRtCtVsitWsitWtDZlvwBDwwBIyw1LxgBH"
          "0ARSzg1S"
          "wgpQyQBR0gBU2BBRyhVWzxlSyBtcyRtd0QBV4gFZ4B9hzhBg3g9i4SBYxyFczyNdzyRf"
          "0yBa2CRh"
          "zCNs3C1t1DBo1TNv1j1x1jpw2SRy7C135Sd++Ct/9DNw4DJ97T164T9/"
          "801Qp05Rp1VerVlgrmJ0"
          "uWR2unh4uHx8ukJvyUNyzU50yUB620x+30x/"
          "3kyA31KD3FSD2E2C4E6C4FWR9Vic+WmBwGqCwWGM"
          "3G+c3nGZ3nid32qY52+b4G+"
          "c4Wyb6mqe8nKd53ed4HOg63Om93mm8Hqq8oePxYmQxYmSxoyVyZin"
          "0pin04Kl4oCk5ISn4oir54+x54a09Iy1956+65G495a68pC6+pK+/"
          "Je++pTA+qPN+aPM+q7S/7jI"
          "577N6bHW/7ba/"
          "8PD38XF4cvN5c3P5tHW6tLW6tLc69Pf7tXc7dTd7tTe7dfc7dbg6tvi6/X17/v5"
          "7/H09fP29fb38fP0+PX1+vT2+Pf48vv7/f7+/v///"
          "wAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"
          "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"
          "AAAAAAAA"
          "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"
          "AAAAAAAA"
          "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"
          "AAAAAAAA"
          "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAMAALAALAAA"
          "AAAQABAA"
          "AAjaAGEJHEiwoME1J1qoKKHFoEBALNw8OrQnDxkPfgoGcgGp0iJKk+"
          "zUSTOiD8EVkSQxMsRK1Rs0"
          "Z6pQ0CSQjRxLjhDREQRnjBgmUoxgEWhCTSNFeAoNulOmiZIhPBQITAHFiZ44hE6halOE"
          "SAYaBwSi"
          "iNIDCJUwoFqZiXEhQgcDAklM8XFDRo5Qqb5IsACBAwKBW5YEsQEDR6dSXho8qKDBysAP"
          "T2a80EHK"
          "FJgFDjYQwDTwjwgkNeZ4GpUoBAYGXQrymSAkyY8dR0AI4OIwU5YEBQIMuHLJoe+"
          "CAQEAOw==",
          1400);
  size2 = base64decode(temp, Gif);
  if (size2 < 1400) {
    size2 = 1400;
  }
  if (size2 > size) {
    return (0);
  }
  memcpy(dest, temp, size2);
  return (size2);
}


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

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

LLVM IR (-O0):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AAAAjaAGEJHEiwoME1J1qoKKHFoEBALNw8OrQnDxkPfgoGcgGp0iJKk+zUSTOiD8EVkSQxMsRK1Rs0Z6pQ0CSQjRxLjhDREQRnjBgmUoxgEWhCTSNFeAoNulOmiZIhPBQITAHFiZ44hE6halOESAYaBwSiiNIDCJUwoFqZiXEhQgcDAklM8XFDRo5Qqb5IsACBAwKBW5YEsQEDR6dSXho8qKDBysAPT2a80EHKFJgFDjYQwDTwjwgkNeZ4GpUoBAYGXQrymSAkyY8dR0AI4OIwU5YEBQIMuHLJoe+CAQEAOw==\00"
define i32 @StatusImage(i8* %0, i8* %1, i32 %2) {
%4 = alloca i32
%5 = alloca i8*
%6 = alloca i8*
%7 = alloca i32
%8 = alloca [1400 x i8]
%9 = alloca [1400 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 [1400 x i8], [1400 x i8]* %8, i64 0, i64 0
%22 = call i32 @strncpy(i8* %21, i8* getelementptr inbounds ([1365 x i8], [1365 x i8]* @.str, i64 0, i64 0), i32 1400)
%23 = getelementptr inbounds [1400 x i8], [1400 x i8]* %9, i64 0, i64 0
%24 = getelementptr inbounds [1400 x i8], [1400 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, 1400
br i1 %27, label %28, label %29
28: ; preds = %20
store i32 1400, 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 [1400 x i8], [1400 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 = [1365 x i8] c"R0lGODlhEAAQAIcAAAAAAAQfmgYcmA0alAgfmgYinA4mnQ4qnxMjlxInmhcrmwAupgkqpQA0rgA7pQA9rAA+rAA/rgA1shMzoxMzqQNBrQBBsgVGuQZHugZHuw1AtwtMvQxMvQ1PvxtArB1CqhJGuxNPux9ItB9JuylNqyhMrCZRrS1VryRQsyVStChRtCtVsitWsitWtDZlvwBDwwBIyw1LxgBH0ARSzg1SwgpQyQBR0gBU2BBRyhVWzxlSyBtcyRtd0QBV4gFZ4B9hzhBg3g9i4SBYxyFczyNdzyRf0yBa2CRhzCNs3C1t1DBo1TNv1j1x1jpw2SRy7C135Sd++Ct/9DNw4DJ97T164T9/801Qp05Rp1VerVlgrmJ0uWR2unh4uHx8ukJvyUNyzU50yUB620x+30x/3kyA31KD3FSD2E2C4E6C4FWR9Vic+WmBwGqCwWGM3G+c3nGZ3nid32qY52+b4G+c4Wyb6mqe8nKd53ed4HOg63Om93mm8Hqq8oePxYmQxYmSxoyVyZin0pin04Kl4oCk5ISn4oir54+x54a09Iy1956+65G495a68pC6+pK+/Je++pTA+qPN+aPM+q7S/7jI577N6bHW/7ba/8PD38XF4cvN5c3P5tHW6tLW6tLc69Pf7tXc7dTd7tTe7dfc7dbg6tvi6/X17/v57/H09fP29fb38fP0+PX1+vT2+Pf48vv7/f7+/v///wAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAMAALAALAAAAAAQABAAAAjaAGEJHEiwoME1J1qoKKHFoEBALNw8OrQnDxkPfgoGcgGp0iJKk+zUSTOiD8EVkSQxMsRK1Rs0Z6pQ0CSQjRxLjhDREQRnjBgmUoxgEWhCTSNFeAoNulOmiZIhPBQITAHFiZ44hE6halOESAYaBwSiiNIDCJUwoFqZiXEhQgcDAklM8XFDRo5Qqb5IsACBAwKBW5YEsQEDR6dSXho8qKDBysAPT2a80EHKFJgFDjYQwDTwjwgkNeZ4GpUoBAYGXQrymSAkyY8dR0AI4OIwU5YEBQIMuHLJoe+CAQEAOw==\00"
define i32 @StatusImage(i8* 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 = 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 ([1365 x i8], [1365 x i8]* @.str, i64 0, i64 0), i32 1400)
%15 = call i32 @base64decode(i8* %7, i8* %6)
%16 = icmp sgt i32 %15, 1400
%17 = select i1 %16, i32 %15, i32 1400
%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
}