// File: /workspace/github_cpp_makefile_star2_O3/cloudinary[P]fuif/./import/read_gif.h
// Function: gd_get_frame(gd_GIF*)
int
gd_get_frame(gd_GIF *gif)
{
    char sep;

    dispose(gif);
    read(gif->fd, &sep, 1);
    while (sep != ',') {
        if (sep == ';')
            return 0;
        if (sep == '!')
            read_ext(gif);
        else return -1;
        read(gif->fd, &sep, 1);
    }
    if (read_image(gif) == -1)
        return -1;
    return 1;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x58, %rsp
movq %rdi, %rbx
movzbl 0x1b(%rdi), %eax
cmpl $0x3, %eax
je 0x1d81b
cmpl $0x2, %eax
jne 0x1d80c
movzwl 0x656(%rbx), %esi
testw %si, %si
je 0x1d81b
movq 0x28(%rbx), %rax
movzbl 0x658(%rbx), %ecx
leaq (%rcx,%rcx,2), %rcx
addq %rcx, %rax
addq $0x4, %rax
movzwl 0x10(%rbx), %edi
movzwl 0x652(%rbx), %edx
imull %edi, %edx
movzwl 0x650(%rbx), %ecx
addl %edx, %ecx
movzwl 0x654(%rbx), %r8d
xorl %edx, %edx
testw %r8w, %r8w
je 0x1d7f1
movl %ecx, %esi
shlq $0x2, %rsi
xorl %edi, %edi
movq 0x660(%rbx), %r8
addq %rsi, %r8
movb 0x2(%rax), %r9b
movb %r9b, 0x2(%r8,%rdi,4)
movzwl (%rax), %r9d
movw %r9w, (%r8,%rdi,4)
cmpl $0x0, 0x20(%rbx)
je 0x1d7c2
movb 0x658(%rbx), %r8b
cmpb 0x1a(%rbx), %r8b
setne %r8b
negb %r8b
jmp 0x1d7c5
movb $-0x1, %r8b
movq 0x660(%rbx), %r9
addq %rsi, %r9
movb %r8b, 0x3(%r9,%rdi,4)
incq %rdi
movzwl 0x654(%rbx), %r8d
cmpq %r8, %rdi
jb 0x1d78c
movzwl 0x10(%rbx), %edi
movzwl 0x656(%rbx), %esi
jmp 0x1d7f4
xorl %r8d, %r8d
movzwl %di, %r9d
addl %r9d, %ecx
incl %edx
movzwl %si, %r9d
cmpl %r9d, %edx
jb 0x1d77e
jmp 0x1d81b
movq 0x660(%rbx), %rsi
movq %rbx, %rdi
callq 0x1e0a9
movl (%rbx), %edi
leaq 0xd(%rsp), %r15
movl $0x1, %edx
movq %r15, %rsi
callq 0x3410
leaq 0x1a(%rbx), %rax
movq %rax, 0x28(%rsp)
leaq 0xf(%rsp), %r13
leaq 0x10(%rsp), %rbp
leaq 0x19(%rsp), %r12
movzbl 0xd(%rsp), %eax
cmpl $0x21, %eax
jne 0x1db6f
movl (%rbx), %edi
movl $0x1, %edx
movq %r13, %rsi
callq 0x3410
movzbl 0xf(%rsp), %edx
cmpl $0xfd, %edx
jg 0x1d906
cmpl $0x1, %edx
je 0x1d995
cmpl $0xf9, %edx
jne 0x1db55
movl (%rbx), %edi
movl $0x1, %esi
movl $0x1, %edx
callq 0x35b0
movl (%rbx), %edi
movl $0x1, %edx
movq %r12, %rsi
callq 0x3410
movzbl 0x19(%rsp), %eax
movd %eax, %xmm0
shrb $0x2, %al
andb $0x3, %al
movb %al, 0x1b(%rbx)
punpcklbw %xmm0, %xmm0    # xmm0 = xmm0[0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7]
pand 0x9629(%rip), %xmm0     # 0x26ef0
pxor %xmm1, %xmm1
punpcklbw %xmm1, %xmm0    # xmm0 = xmm0[0],xmm1[0],xmm0[1],xmm1[1],xmm0[2],xmm1[2],xmm0[3],xmm1[3],xmm0[4],xmm1[4],xmm0[5],xmm1[5],xmm0[6],xmm1[6],xmm0[7],xmm1[7]
punpcklwd %xmm1, %xmm0    # xmm0 = xmm0[0],xmm1[0],xmm0[1],xmm1[1],xmm0[2],xmm1[2],xmm0[3],xmm1[3]
movq %xmm0, 0x1c(%rbx)
movl (%rbx), %edi
movl $0x2, %edx
movq %rbp, %rsi
callq 0x3410
movzwl 0x10(%rsp), %eax
movw %ax, 0x18(%rbx)
movl (%rbx), %edi
movl $0x1, %edx
movq 0x28(%rsp), %rsi
callq 0x3410
jmp 0x1db22
cmpl $0xfe, %edx
je 0x1dabd
cmpl $0xff, %edx
jne 0x1db55
movl (%rbx), %edi
movl $0x1, %esi
movl $0x1, %edx
callq 0x35b0
movl (%rbx), %edi
movl $0x8, %edx
movq %rbp, %rsi
callq 0x3410
movl (%rbx), %edi
movl $0x3, %edx
movq %r12, %rsi
callq 0x3410
movabsq $0x455041435354454e, %rax # imm = 0x455041435354454E
cmpq %rax, 0x10(%rsp)
je 0x1daf7
cmpq $0x0, 0x648(%rbx)
je 0x1daed
movl (%rbx), %edi
xorl %esi, %esi
movl $0x1, %edx
callq 0x35b0
movq %rax, %r14
movq %rbx, %rdi
movq %rbp, %rsi
movq %r12, %rdx
callq *0x648(%rbx)
jmp 0x1dae1
cmpq $0x0, 0x638(%rbx)
je 0x1db47
movl (%rbx), %edi
movl $0x1, %esi
movl $0x1, %edx
callq 0x35b0
movl (%rbx), %edi
movl $0x2, %edx
movq %rbp, %rsi
callq 0x3410
movzwl 0x10(%rsp), %r15d
movl (%rbx), %edi
movl $0x2, %edx
movq %rbp, %rsi
callq 0x3410
movzwl 0x10(%rsp), %eax
movl %eax, 0x24(%rsp)
movl (%rbx), %edi
movl $0x2, %edx
movq %rbp, %rsi
callq 0x3410
movzwl 0x10(%rsp), %eax
movl %eax, 0x20(%rsp)
movl (%rbx), %edi
movl $0x2, %edx
movq %rbp, %rsi
callq 0x3410
movzwl 0x10(%rsp), %eax
movl %eax, 0x1c(%rsp)
movl (%rbx), %edi
movl $0x1, %edx
movq %rbp, %rsi
callq 0x3410
movl (%rbx), %edi
movl $0x1, %edx
movq %r12, %rsi
callq 0x3410
movl (%rbx), %edi
movl $0x1, %edx
leaq 0xa(%rsp), %rsi
callq 0x3410
movl (%rbx), %edi
movl $0x1, %edx
leaq 0xe(%rsp), %rsi
callq 0x3410
movl (%rbx), %edi
xorl %esi, %esi
movl $0x1, %edx
callq 0x35b0
movq %r12, %r14
movq %rbp, %r12
movq %r13, %rbp
movq %rax, %r13
movzbl 0x10(%rsp), %r9d
movzbl 0x19(%rsp), %eax
movzbl 0xa(%rsp), %r10d
movzbl 0xe(%rsp), %r11d
subq $0x8, %rsp
movq %rbx, %rdi
movl %r15d, %esi
leaq 0x15(%rsp), %r15
movl 0x2c(%rsp), %edx
movl 0x28(%rsp), %ecx
movl 0x24(%rsp), %r8d
pushq %r11
pushq %r10
pushq %rax
callq *0x638(%rbx)
addq $0x20, %rsp
movl (%rbx), %edi
movq %r13, %rsi
movq %rbp, %r13
movq %r12, %rbp
movq %r14, %r12
jmp 0x1dae6
cmpq $0x0, 0x640(%rbx)
je 0x1daed
movl (%rbx), %edi
xorl %esi, %esi
movl $0x1, %edx
callq 0x35b0
movq %rax, %r14
movq %rbx, %rdi
callq *0x640(%rbx)
movl (%rbx), %edi
movq %r14, %rsi
xorl %edx, %edx
callq 0x35b0
movq %rbx, %rdi
callq 0x23bbb
jmp 0x1db33
movl (%rbx), %edi
movl $0x2, %esi
movl $0x1, %edx
callq 0x35b0
movl (%rbx), %edi
movl $0x2, %edx
leaq 0xa(%rsp), %rsi
callq 0x3410
movzwl 0xa(%rsp), %eax
movw %ax, 0x16(%rbx)
movl (%rbx), %edi
movl $0x1, %esi
movl $0x1, %edx
callq 0x35b0
movl (%rbx), %edi
movl $0x1, %edx
movq %r15, %rsi
callq 0x3410
jmp 0x1d847
movl (%rbx), %edi
movl $0xd, %esi
movl $0x1, %edx
jmp 0x1dae8
movq 0x1247c(%rip), %rax     # 0x2ffd8
movq (%rax), %rdi
leaq 0xae0b(%rip), %rsi      # 0x28971
xorl %eax, %eax
callq 0x33f0
jmp 0x1db33
cmpl $0x2c, %eax
je 0x1db84
cmpl $0x3b, %eax
jne 0x1df4a
xorl %eax, %eax
jmp 0x1df4f
movl (%rbx), %edi
leaq 0x10(%rsp), %r14
movl $0x2, %edx
movq %r14, %rsi
callq 0x3410
movzwl (%r14), %eax
movw %ax, 0x650(%rbx)
movl (%rbx), %edi
leaq 0x10(%rsp), %r14
movl $0x2, %edx
movq %r14, %rsi
callq 0x3410
movzwl (%r14), %eax
movw %ax, 0x652(%rbx)
movl (%rbx), %edi
leaq 0x10(%rsp), %r14
movl $0x2, %edx
movq %r14, %rsi
callq 0x3410
movzwl (%r14), %eax
movw %ax, 0x654(%rbx)
movl (%rbx), %edi
leaq 0x10(%rsp), %r14
movl $0x2, %edx
movq %r14, %rsi
callq 0x3410
movzwl (%r14), %eax
movw %ax, 0x656(%rbx)
movl (%rbx), %edi
leaq 0xe(%rsp), %r14
movl $0x1, %edx
movq %r14, %rsi
callq 0x3410
movzbl (%r14), %eax
testb %al, %al
movq %rax, 0x50(%rsp)
js 0x1dc2a
leaq 0x334(%rbx), %r14
jmp 0x1dc50
movl %eax, %ecx
andb $0x7, %cl
movl $0x2, %eax
shll %cl, %eax
leaq 0x30(%rbx), %r14
movl %eax, 0x30(%rbx)
movl (%rbx), %edi
leaq 0x34(%rbx), %rsi
movl $0x6, %edx
shlq %cl, %rdx
callq 0x3410
movq %r14, 0x28(%rbx)
movl (%rbx), %edi
leaq 0xa(%rsp), %r14
movl $0x1, %edx
movq %r14, %rsi
callq 0x3410
movzbl (%r14), %r13d
movl (%rbx), %edi
movl $0x1, %r12d
xorl %esi, %esi
movl $0x1, %edx
callq 0x35b0
movq %rax, %r14
movq %rbx, %rdi
callq 0x23bbb
movl (%rbx), %edi
xorl %esi, %esi
movl $0x1, %edx
callq 0x35b0
movq %rax, 0x48(%rsp)
movl (%rbx), %edi
movq %r14, %rsi
xorl %edx, %edx
callq 0x35b0
movl %r13d, %ecx
shll %cl, %r12d
movl $0x2, %eax
shll %cl, %eax
cmpl $0x101, %eax            # imm = 0x101
movl $0x100, %r14d           # imm = 0x100
cmovgel %eax, %r14d
leaq (%r14,%r14,2), %rax
leaq 0x10(,%rax,2), %rdi
callq 0x33c0
movq %rax, %r15
testq %rax, %rax
je 0x1dd31
movl %r14d, (%r15)
leal 0x2(%r12), %eax
movl %eax, 0x20(%rsp)
movl %eax, 0x4(%r15)
movq %r15, %rax
addq $0x10, %rax
movq %rax, 0x8(%r15)
cmpl $0x1f, %r13d
je 0x1dd3a
cmpl $0x2, %r12d
movl $0x1, %eax
cmovgel %r12d, %eax
movl $0x4, %ecx
xorl %edx, %edx
movq 0x8(%r15), %rsi
movl $0xfff0001, -0x4(%rsi,%rcx) # imm = 0xFFF0001
movb %dl, (%rsi,%rcx)
incq %rdx
addq $0x6, %rcx
cmpq %rdx, %rax
jne 0x1dd14
jmp 0x1dd3a
leal 0x2(%r12), %eax
movl %eax, 0x20(%rsp)
incl %r13d
xorl %eax, %eax
leaq 0x19(%rsp), %rcx
movb %al, (%rcx)
leaq 0x10(%rsp), %rdx
movq $0x0, 0x38(%rsp)
movb %al, (%rdx)
leaq 0xa(%rsp), %r8
movq %rbx, %rdi
movl %r13d, %esi
callq 0x23bff
movl %eax, %ecx
movl %r12d, %eax
incl %eax
movl %eax, 0x44(%rsp)
movl %eax, 0x1c(%rsp)
movl $0x0, 0x34(%rsp)
movl %r13d, 0x24(%rsp)
incl 0x1c(%rsp)
movl %ecx, %ebp
cmpw %r12w, %bp
jne 0x1dda7
movl 0x20(%rsp), %eax
movl %eax, 0x4(%r15)
movl $0x0, 0x28(%rsp)
movl 0x24(%rsp), %esi
jmp 0x1de42
cmpl $0x0, 0x28(%rsp)
je 0x1ddb6
movl %r13d, %esi
jmp 0x1de42
movl 0x4(%r15), %ecx
cmpl (%r15), %ecx
jne 0x1ddf7
movslq %ecx, %rax
addl %ecx, %ecx
movl %ecx, (%r15)
leaq (%rax,%rax,2), %rax
leaq 0x10(,%rax,4), %rsi
movq %r15, %rdi
callq 0x3520
testq %rax, %rax
je 0x1df42
movq %rax, %rdx
addq $0x10, %rdx
movq %rdx, 0x8(%rax)
movl 0x4(%rax), %ecx
movq %rax, %r15
jmp 0x1ddfb
movq 0x8(%r15), %rdx
movl %r13d, %esi
movslq %ecx, %rax
leaq (%rax,%rax,2), %rax
movl 0x1c(%rsp), %ecx
movw %cx, (%rdx,%rax,2)
movw %bp, 0x2(%rdx,%rax,2)
movb %r14b, 0x4(%rdx,%rax,2)
movl 0x4(%r15), %eax
leal 0x1(%rax), %ecx
movl %ecx, 0x4(%r15)
andl %ecx, %eax
sete %al
xorl %edx, %edx
cmpl $0x1000, %ecx           # imm = 0x1000
setne %cl
sete %dl
movl %edx, 0x28(%rsp)
andb %al, %cl
movzbl %cl, %eax
movl %eax, 0x34(%rsp)
movq %rbx, %rdi
movl %esi, %r13d
leaq 0x10(%rsp), %rdx
leaq 0x19(%rsp), %rcx
leaq 0xa(%rsp), %r8
callq 0x23bff
movl %r12d, %ebp
cmpw %r12w, %ax
je 0x1dd88
movl %eax, %ecx
cmpw 0x44(%rsp), %ax
je 0x1df5e
movzwl %cx, %esi
movq 0x8(%r15), %rax
leaq (%rsi,%rsi,2), %rdx
leaq (%rax,%rdx,2), %r9
movzwl (%r9), %edx
movzwl %dx, %edi
movq 0x38(%rsp), %rax
leal -0x1(%rax), %r8d
movl %edx, 0x1c(%rsp)
movl %edx, %eax
movzwl 0x2(%r9), %r10d
movzwl %ax, %eax
addl %r8d, %eax
movzwl 0x652(%rbx), %r11d
movzwl 0x654(%rbx), %ebp
cltd
idivl %ebp
addl %r11d, %eax
movzwl 0x10(%rbx), %r11d
imull %eax, %r11d
movzwl 0x650(%rbx), %eax
addl %edx, %eax
addl %r11d, %eax
movb 0x4(%r9), %r14b
movq 0x668(%rbx), %rdx
cltq
movb %r14b, (%rdx,%rax)
cmpq $0xfff, %r10            # imm = 0xFFF
je 0x1defc
movq 0x8(%r15), %rax
leaq (%r10,%r10,2), %rdx
leaq (%rax,%rdx,2), %r9
movzwl (%r9), %eax
jmp 0x1de9b
xorl %eax, %eax
cmpl $0x1, 0x34(%rsp)
sete %al
addl %eax, %r13d
movq 0x38(%rsp), %rax
addl %edi, %eax
movq %rax, 0x38(%rsp)
movl 0x4(%r15), %eax
decl %eax
cmpl %esi, %eax
jle 0x1dd82
cmpl $0x0, 0x28(%rsp)
jne 0x1dd82
movq 0x8(%r15), %rdx
movl %eax, %eax
leaq (%rax,%rax,2), %rax
movb %r14b, 0x4(%rdx,%rax,2)
jmp 0x1dd82
movq %r15, %rdi
callq 0x3380
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
addq $0x58, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %r15, %rdi
callq 0x3380
movl (%rbx), %edi
leaq 0x10(%rsp), %rsi
movl $0x1, %edx
callq 0x3410
movl (%rbx), %edi
movq 0x48(%rsp), %rsi
xorl %edx, %edx
callq 0x35b0
testb $0x40, 0x50(%rsp)
je 0x1e055
movzwl 0x10(%rbx), %eax
movzwl 0x12(%rbx), %r15d
imulq %rax, %r15
movq %r15, %rdi
callq 0x33c0
movq %rax, %r14
movq 0x668(%rbx), %rsi
movq %rax, %rdi
movq %r15, %rdx
callq 0x3260
cmpw $0x0, 0x656(%rbx)
je 0x1e04d
movl $0x8, %ebp
xorl %r15d, %r15d
xorl %r12d, %r12d
xorl %eax, %eax
movzwl 0x652(%rbx), %esi
movslq %eax, %r13
leaq (%rsi,%r13), %rax
movzwl 0x10(%rbx), %ecx
movq %rcx, %rdx
imulq %rax, %rdx
movzwl 0x650(%rbx), %eax
leaq (%rax,%rdx), %rdi
addq 0x668(%rbx), %rdi
addl %r15d, %esi
imull %ecx, %esi
addl %eax, %esi
addq %r14, %rsi
movzwl 0x654(%rbx), %edx
callq 0x3260
addl %ebp, %r13d
leal 0x1(%r12), %ecx
movl $0x10, %edx
shrl %cl, %edx
movl $0x8, %eax
shrl %cl, %eax
movzwl 0x656(%rbx), %esi
cmpl %esi, %r13d
cmovll %r13d, %eax
cmovll %r12d, %ecx
cmovgel %edx, %ebp
incl %r15d
movl %ecx, %r12d
cmpl %esi, %r15d
jb 0x1dfd5
movq %r14, %rdi
callq 0x3380
movl $0x1, %eax
jmp 0x1df4f