// File: /workspace/github_cpp_makefile_star2_O2/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 $0x48, %rsp
movq %rdi, %rbx
movzbl 0x1b(%rdi), %eax
cmpl $0x3, %eax
je 0x172e4
cmpl $0x2, %eax
jne 0x172d5
movq 0x28(%rbx), %rax
movzbl 0x658(%rbx), %ecx
leaq (%rcx,%rcx,2), %rcx
addq %rcx, %rax
addq $0x4, %rax
movzwl 0x652(%rbx), %ecx
movzwl 0x10(%rbx), %edx
imull %ecx, %edx
movzwl 0x650(%rbx), %ecx
addl %edx, %ecx
xorl %edx, %edx
movzwl 0x656(%rbx), %esi
cmpl %esi, %edx
jae 0x172e4
movl %ecx, %esi
xorl %edi, %edi
movzwl 0x654(%rbx), %r8d
cmpq %r8, %rdi
jae 0x172cb
movq 0x660(%rbx), %r8
movb 0x2(%rax), %r9b
movb %r9b, 0x2(%r8,%rsi,4)
movzwl (%rax), %r9d
movw %r9w, (%r8,%rsi,4)
cmpl $0x0, 0x20(%rbx)
je 0x172b4
movb 0x658(%rbx), %r8b
cmpb 0x1a(%rbx), %r8b
setne %r8b
negb %r8b
jmp 0x172b7
movb $-0x1, %r8b
movq 0x660(%rbx), %r9
movb %r8b, 0x3(%r9,%rsi,4)
incq %rdi
incq %rsi
jmp 0x17274
movzwl 0x10(%rbx), %esi
addl %esi, %ecx
incl %edx
jmp 0x17265
movq 0x660(%rbx), %rsi
movq %rbx, %rdi
callq 0x17ab2
movl (%rbx), %edi
leaq 0x8(%rsp), %r12
pushq $0x1
popq %r15
movq %r12, %rsi
movq %r15, %rdx
callq 0x3450
leaq 0x1a(%rbx), %r13
leaq 0x5(%rsp), %r14
pushq $0x1
popq %rbp
movzbl 0x8(%rsp), %eax
cmpl $0x21, %eax
jne 0x175af
movl (%rbx), %edi
movq %r14, %rsi
movq %r15, %rdx
callq 0x3450
movzbl 0x5(%rsp), %edx
cmpl $0xff, %edx
je 0x1746c
cmpl $0xf9, %edx
je 0x174f4
cmpl $0xfe, %edx
je 0x17445
cmpl $0x1, %edx
jne 0x17595
cmpq $0x0, 0x638(%rbx)
je 0x17557
movl (%rbx), %edi
movq %r15, %rsi
movl %ebp, %edx
callq 0x35f0
movl (%rbx), %edi
callq 0x17a94
movw %ax, 0x20(%rsp)
movl (%rbx), %edi
callq 0x17a94
movw %ax, 0x10(%rsp)
movl (%rbx), %edi
callq 0x17a94
movw %ax, 0x14(%rsp)
movl (%rbx), %edi
callq 0x17a94
movw %ax, 0xc(%rsp)
movl (%rbx), %edi
leaq 0x18(%rsp), %rsi
movq %r15, %rdx
callq 0x3450
movl (%rbx), %edi
leaq 0x9(%rsp), %rsi
movq %r15, %rdx
callq 0x3450
movl (%rbx), %edi
leaq 0x6(%rsp), %rsi
movq %r15, %rdx
callq 0x3450
movl (%rbx), %edi
leaq 0x7(%rsp), %rsi
movq %r15, %rdx
callq 0x3450
movl (%rbx), %edi
xorl %esi, %esi
movl %ebp, %edx
callq 0x35f0
movq %r13, %r14
movq %r12, %r13
movl %ebp, %r12d
movq %rax, %rbp
movzbl 0x18(%rsp), %r9d
movzbl 0x9(%rsp), %eax
movzbl 0x6(%rsp), %r10d
movzbl 0x7(%rsp), %r11d
subq $0x8, %rsp
movzwl 0x28(%rsp), %esi
movzwl 0x18(%rsp), %edx
movzwl 0x1c(%rsp), %ecx
movzwl 0x14(%rsp), %r8d
movq %rbx, %rdi
pushq %r11
pushq %r10
pushq %rax
callq *0x638(%rbx)
addq $0x20, %rsp
movl (%rbx), %edi
movq %rbp, %rsi
movl %r12d, %ebp
movq %r13, %r12
movq %r14, %r13
jmp 0x174db
cmpq $0x0, 0x640(%rbx)
je 0x174e7
movl (%rbx), %edi
xorl %esi, %esi
movl %ebp, %edx
callq 0x35f0
movq %rax, %r14
movq %rbx, %rdi
callq *0x640(%rbx)
jmp 0x174d6
movl (%rbx), %edi
movq %r15, %rsi
movl %ebp, %edx
callq 0x35f0
movl (%rbx), %edi
leaq 0x18(%rsp), %rsi
pushq $0x8
popq %rdx
callq 0x3450
movl (%rbx), %edi
leaq 0x9(%rsp), %rsi
pushq $0x3
popq %rdx
callq 0x3450
movabsq $0x455041435354454e, %rax # imm = 0x455041435354454E
cmpq %rax, 0x18(%rsp)
je 0x17560
cmpq $0x0, 0x648(%rbx)
je 0x174e7
movl (%rbx), %edi
xorl %esi, %esi
movl %ebp, %edx
callq 0x35f0
movq %rax, %r14
movq %rbx, %rdi
leaq 0x18(%rsp), %rsi
leaq 0x9(%rsp), %rdx
callq *0x648(%rbx)
movl (%rbx), %edi
movq %r14, %rsi
leaq 0x5(%rsp), %r14
xorl %edx, %edx
callq 0x35f0
movq %rbx, %rdi
callq 0x1c4b7
jmp 0x17583
movl (%rbx), %edi
movq %r15, %rsi
movl %ebp, %edx
callq 0x35f0
movl (%rbx), %edi
leaq 0x18(%rsp), %rsi
movq %r15, %rdx
callq 0x3450
movzbl 0x18(%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 0x7974(%rip), %xmm0     # 0x1eea0
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
callq 0x17a94
movw %ax, 0x18(%rbx)
movl (%rbx), %edi
movq %r13, %rsi
movq %r15, %rdx
callq 0x3450
jmp 0x17577
movl (%rbx), %edi
pushq $0xd
popq %rsi
movl %ebp, %edx
jmp 0x174e2
movl (%rbx), %edi
pushq $0x2
popq %rsi
movl %ebp, %edx
callq 0x35f0
movl (%rbx), %edi
callq 0x17a94
movw %ax, 0x16(%rbx)
movl (%rbx), %edi
movq %r15, %rsi
movl %ebp, %edx
callq 0x35f0
movl (%rbx), %edi
movq %r12, %rsi
movq %r15, %rdx
callq 0x3450
jmp 0x17306
movq 0x14a3c(%rip), %rax     # 0x2bfd8
movq (%rax), %rdi
leaq 0x937b(%rip), %rsi      # 0x20921
xorl %eax, %eax
callq 0x3430
jmp 0x17583
cmpl $0x2c, %eax
je 0x175c4
cmpl $0x3b, %eax
jne 0x1793d
xorl %eax, %eax
jmp 0x17940
movl (%rbx), %edi
callq 0x17a94
movw %ax, 0x650(%rbx)
movl (%rbx), %edi
callq 0x17a94
movw %ax, 0x652(%rbx)
movl (%rbx), %edi
callq 0x17a94
movw %ax, 0x654(%rbx)
movl (%rbx), %edi
callq 0x17a94
movw %ax, 0x656(%rbx)
movl (%rbx), %edi
leaq 0x7(%rsp), %r14
pushq $0x1
popq %rdx
movq %r14, %rsi
callq 0x3450
movzbl (%r14), %eax
pushq $0x2
popq %rbp
testb %al, %al
movq %rax, 0x40(%rsp)
js 0x17627
leaq 0x334(%rbx), %r14
jmp 0x17648
movl %eax, %ecx
andb $0x7, %cl
movl %ebp, %eax
shll %cl, %eax
leaq 0x30(%rbx), %r14
movl %eax, 0x30(%rbx)
movl (%rbx), %edi
leaq 0x34(%rbx), %rsi
pushq $0x6
popq %rdx
shlq %cl, %rdx
callq 0x3450
movq %r14, 0x28(%rbx)
movl (%rbx), %edi
leaq 0x6(%rsp), %r14
pushq $0x1
popq %rdx
movq %r14, %rsi
callq 0x3450
movzbl (%r14), %r14d
movl (%rbx), %edi
xorl %r15d, %r15d
xorl %esi, %esi
pushq $0x1
popq %r12
movl %r12d, %edx
callq 0x35f0
movq %rax, %r13
movq %rbx, %rdi
callq 0x1c4b7
movl (%rbx), %edi
xorl %esi, %esi
movl %r12d, %edx
callq 0x35f0
movq %rax, 0x38(%rsp)
movl (%rbx), %edi
movq %r13, %rsi
xorl %edx, %edx
callq 0x35f0
movl %r12d, %r13d
movl %r14d, %ecx
shll %cl, %r13d
movl %r14d, 0x10(%rsp)
shll %cl, %ebp
cmpl $0x101, %ebp            # imm = 0x101
movl $0x100, %r14d           # imm = 0x100
cmovgel %ebp, %r14d
imulq $0x6, %r14, %rdi
addq $0x10, %rdi
callq 0x33f0
movq %rax, %r12
testq %rax, %rax
je 0x1771d
movl %r14d, (%r12)
leal 0x2(%r13), %eax
movl %eax, 0x14(%rsp)
movl %eax, 0x4(%r12)
movq %r12, %rax
addq $0x10, %rax
movq %rax, 0x8(%r12)
testl %r13d, %r13d
movl $0x0, %eax
cmovgl %r13d, %eax
pushq $0x4
popq %rcx
cmpq %r15, %rax
je 0x17725
movq 0x8(%r12), %rdx
movl $0xfff0001, -0x4(%rdx,%rcx) # imm = 0xFFF0001
movb %r15b, (%rdx,%rcx)
incq %r15
addq $0x6, %rcx
jmp 0x176fe
leal 0x2(%r13), %eax
movl %eax, 0x14(%rsp)
movl 0x10(%rsp), %r15d
incl %r15d
xorl %eax, %eax
leaq 0x9(%rsp), %rcx
movb %al, (%rcx)
leaq 0x18(%rsp), %rdx
movq $0x0, 0x30(%rsp)
movb %al, (%rdx)
leaq 0x6(%rsp), %r8
movq %rbx, %rdi
movl %r15d, %esi
callq 0x1c503
movl %eax, %ecx
movl %r13d, %eax
incl %eax
movl %eax, 0x2c(%rsp)
movl %eax, 0xc(%rsp)
movl $0x0, 0x28(%rsp)
movl %r15d, 0x10(%rsp)
incl 0xc(%rsp)
movl %ecx, %r14d
cmpw %r13w, %r14w
jne 0x17799
movl 0x14(%rsp), %eax
movl %eax, 0x4(%r12)
movl $0x0, 0x20(%rsp)
movl 0x10(%rsp), %esi
jmp 0x17837
cmpl $0x0, 0x20(%rsp)
je 0x177a8
movl %r15d, %esi
jmp 0x17837
movl 0x4(%r12), %ecx
cmpl (%r12), %ecx
jne 0x177e8
movslq %ecx, %rax
addl %ecx, %ecx
movl %ecx, (%r12)
imulq $0xc, %rax, %rsi
addq $0x10, %rsi
movq %r12, %rdi
callq 0x3560
testq %rax, %rax
je 0x17935
movq %rax, %rdx
addq $0x10, %rdx
movq %rdx, 0x8(%rax)
movl 0x4(%rax), %ecx
movq %rax, %r12
jmp 0x177ed
movq 0x8(%r12), %rdx
movl %r15d, %esi
movslq %ecx, %rax
imulq $0x6, %rax, %rax
movl 0xc(%rsp), %ecx
movw %cx, (%rdx,%rax)
movw %r14w, 0x2(%rdx,%rax)
movb %bpl, 0x4(%rdx,%rax)
movl 0x4(%r12), %eax
leal 0x1(%rax), %ecx
movl %ecx, 0x4(%r12)
andl %ecx, %eax
sete %al
xorl %edx, %edx
cmpl $0x1000, %ecx           # imm = 0x1000
setne %cl
sete %dl
movl %edx, 0x20(%rsp)
andb %al, %cl
movzbl %cl, %eax
movl %eax, 0x28(%rsp)
movq %rbx, %rdi
movl %esi, %r15d
leaq 0x18(%rsp), %rdx
leaq 0x9(%rsp), %rcx
leaq 0x6(%rsp), %r8
callq 0x1c503
movl %r13d, %r14d
cmpw %r13w, %ax
je 0x17779
movl %eax, %ecx
cmpw 0x2c(%rsp), %ax
je 0x1794f
movzwl %cx, %esi
movq 0x8(%r12), %rax
imulq $0x6, %rsi, %rdx
leaq (%rax,%rdx), %r9
movzwl (%rax,%rdx), %eax
movzwl %ax, %edi
movq 0x30(%rsp), %r14
leal -0x1(%r14), %r8d
movl %eax, 0xc(%rsp)
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), %bpl
movq 0x668(%rbx), %rdx
cltq
movb %bpl, (%rdx,%rax)
cmpq $0xfff, %r10            # imm = 0xFFF
je 0x178f1
movq 0x8(%r12), %rax
imulq $0x6, %r10, %rdx
leaq (%rax,%rdx), %r9
movzwl (%rax,%rdx), %eax
jmp 0x1788f
xorl %eax, %eax
cmpl $0x1, 0x28(%rsp)
sete %al
addl %eax, %r15d
addl %edi, %r14d
movq %r14, 0x30(%rsp)
movl 0x4(%r12), %eax
decl %eax
cmpl %esi, %eax
jle 0x17772
cmpl $0x0, 0x20(%rsp)
jne 0x17772
movq 0x8(%r12), %rdx
movl %eax, %eax
imulq $0x6, %rax, %rax
movb %bpl, 0x4(%rdx,%rax)
jmp 0x17772
movq %r12, %rdi
callq 0x33b0
pushq $-0x1
popq %rax
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %r12, %rdi
callq 0x33b0
movl (%rbx), %edi
leaq 0x18(%rsp), %rsi
pushq $0x1
popq %rdx
callq 0x3450
movl (%rbx), %edi
xorl %ebp, %ebp
movq 0x38(%rsp), %rsi
xorl %edx, %edx
callq 0x35f0
testb $0x40, 0x40(%rsp)
je 0x17a43
movzwl 0x10(%rbx), %eax
movzwl 0x12(%rbx), %r15d
imulq %rax, %r15
movq %r15, %rdi
callq 0x33f0
movq 0x668(%rbx), %rsi
movq %rax, 0x20(%rsp)
movq %rax, %rdi
movq %r15, %rdx
callq 0x3280
movzwl 0x656(%rbx), %eax
pushq $0x8
popq %r12
xorl %r15d, %r15d
xorl %r13d, %r13d
movzwl %ax, %eax
cmpl %eax, %r13d
jae 0x17a39
movzwl 0x652(%rbx), %esi
movslq %ebp, %r14
leaq (%r14,%rsi), %rax
movzwl 0x10(%rbx), %ecx
movq %rcx, %rdx
imulq %rax, %rdx
movzwl 0x650(%rbx), %eax
leaq (%rax,%rdx), %rdi
addq 0x668(%rbx), %rdi
addl %r13d, %esi
imull %ecx, %esi
addl %eax, %esi
addq 0x20(%rsp), %rsi
movzwl 0x654(%rbx), %edx
callq 0x3280
leal 0x1(%r15), %ecx
pushq $0x10
popq %rdx
shrl %cl, %edx
addl %r12d, %r14d
movzwl 0x656(%rbx), %eax
pushq $0x8
popq %rbp
shrl %cl, %ebp
cmpl %eax, %r14d
cmovll %r14d, %ebp
cmovll %r15d, %ecx
cmovgel %edx, %r12d
incl %r13d
movl %ecx, %r15d
jmp 0x179be
movq 0x20(%rsp), %rdi
callq 0x33b0
pushq $0x1
jmp 0x1793f