// File: /workspace/github_c_makefile_star2_O3/yahya-tamur[P]Visualising-Complex-Functions/gifenc.c
// Function: ge_add_frame
void ge_add_frame(ge_GIF *gif, uint16_t delay) {
    uint16_t w, h, x, y;
    uint8_t *tmp;

    if (delay)
        set_delay(gif, delay);
    w = gif->w;
    h = gif->h;
    x = y = 0;
    put_image(gif, w, h, x, y);
    gif->nframes++;
    tmp = gif->back;
    gif->back = gif->frame;
    gif->frame = tmp;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x58, %rsp
movq %rdi, %r13
testl %esi, %esi
je 0x25bb
movl %esi, %ebp
movl 0x8(%r13), %edi
movq %rsp, %rsi
movl $0x404f921, (%rsi)      # imm = 0x404F921
movl $0x4, %edx
callq 0x2080
movl 0x8(%r13), %edi
leaq 0x5(%rsp), %rsi
movw %bp, (%rsi)
movl $0x2, %edx
callq 0x2080
movl 0x8(%r13), %edi
leaq 0x1a6e(%rip), %rsi      # 0x401f
movl $0x2, %edx
callq 0x2080
movzwl (%r13), %r12d
movzwl 0x2(%r13), %ebp
movb 0x4(%r13), %cl
movl $0x1, %r14d
shll %cl, %r14d
movl 0x8(%r13), %edi
leaq 0x1a3c(%rip), %rsi      # 0x4019
movl $0x1, %edx
callq 0x2080
movl 0x8(%r13), %edi
xorl %ebx, %ebx
leaq 0x5(%rsp), %rsi
movw %bx, (%rsi)
movl $0x2, %edx
callq 0x2080
movl 0x8(%r13), %edi
leaq 0x36(%rsp), %rsi
movw %bx, (%rsi)
movl $0x2, %edx
callq 0x2080
movl 0x8(%r13), %edi
leaq 0x34(%rsp), %rsi
movq %r12, 0x18(%rsp)
movw %r12w, (%rsi)
movl $0x2, %edx
callq 0x2080
movl 0x8(%r13), %edi
leaq 0x32(%rsp), %rsi
movl %ebp, %r12d
movw %r12w, (%rsi)
movl $0x2, %edx
callq 0x2080
movl 0x8(%r13), %edi
leaq 0x30(%rsp), %rsi
movb $0x0, (%rsi)
movb 0x4(%r13), %al
movb %al, 0x1(%rsi)
movl $0x2, %edx
callq 0x2080
movq %rsp, %rsi
movl %r14d, %edi
callq 0x28ce
movq %rax, %rbx
movl 0x4(%r13), %edx
incl %edx
movzwl %r14w, %esi
movq %r13, %r15
movq %r13, %rdi
movl %esi, 0x28(%rsp)
movl %edx, %ebp
callq 0x2945
movl %r12d, 0x24(%rsp)
testl %r12d, %r12d
movq %r14, 0x38(%rsp)
movq %rbx, 0x8(%rsp)
je 0x27e4
leal -0x1(%r14), %eax
movslq %r14d, %rcx
leaq 0x8(,%rcx,8), %rcx
movq %rcx, 0x48(%rsp)
xorl %edx, %edx
movzbl %al, %esi
movq %rbx, %r12
movq 0x18(%rsp), %rcx
movq %r15, %r13
movq %r15, 0x50(%rsp)
movl %esi, 0x14(%rsp)
testq %rcx, %rcx
je 0x27cf
xorl %r15d, %r15d
movq %rdx, 0x40(%rsp)
movzwl (%r13), %eax
imulq %rdx, %rax
addq 0x18(%r13), %rax
movzbl (%r15,%rax), %r14d
andl %esi, %r14d
movq 0x8(%r12,%r14,8), %rax
testq %rax, %rax
jne 0x27be
movzwl (%r12), %esi
movq %r13, %rdi
movl %ebp, %edx
callq 0x2945
movl (%rsp), %ebx
cmpl $0xfff, %ebx            # imm = 0xFFF
jg 0x2777
movl $0x1, %eax
movl %ebp, 0x2c(%rsp)
movl %ebp, %ecx
shll %cl, %eax
xorl %r13d, %r13d
cmpl %eax, %ebx
sete %bpl
leal 0x1(%rbx), %eax
movl %eax, (%rsp)
movl $0x1, %edi
movq 0x48(%rsp), %rsi
callq 0x20f0
testq %rax, %rax
je 0x2757
movw %bx, (%rax)
movb %bpl, %r13b
movl 0x2c(%rsp), %ebp
addl %r13d, %ebp
movq %rax, 0x8(%r12,%r14,8)
movq 0x50(%rsp), %r13
movq 0x18(%rsp), %rcx
movq 0x8(%rsp), %rax
jmp 0x27ab
movq %r13, %rdi
movl 0x28(%rsp), %esi
movl %ebp, %edx
callq 0x2945
movq 0x8(%rsp), %rdi
movq 0x38(%rsp), %rbx
movl %ebx, %esi
callq 0x2a07
movl %ebx, %edi
movq %rsp, %rsi
callq 0x28ce
movl 0x4(%r13), %ebp
incl %ebp
movq 0x18(%rsp), %rcx
movq 0x40(%rsp), %rdx
movl 0x14(%rsp), %esi
movq %rax, 0x8(%rsp)
movq 0x8(%rax,%r14,8), %rax
incq %r15
movq %rax, %r12
cmpl %r15d, %ecx
jne 0x26e7
jmp 0x27d2
movq %r12, %rax
incq %rdx
movq %rax, %r12
cmpl 0x24(%rsp), %edx
jne 0x26d6
jmp 0x27ea
movq %rbx, %rax
movq %r15, %r13
movzwl (%rax), %esi
movq %r13, %rdi
movl %ebp, %edx
callq 0x2945
movq 0x38(%rsp), %rbx
leal 0x1(%rbx), %eax
movzwl %ax, %esi
movq %r13, %rdi
movl %ebp, %edx
callq 0x2945
movl 0xc(%r13), %eax
leal 0x7(%rax), %ebp
testl %eax, %eax
cmovnsl %eax, %ebp
sarl $0x3, %ebp
testb $0x7, %al
je 0x282d
movb 0x28(%r13), %al
movslq %ebp, %rcx
incl %ebp
movb %al, 0x2c(%r13,%rcx)
movq 0x8(%rsp), %r14
movl 0x8(%r13), %edi
leaq 0x7(%rsp), %rsi
movb %bpl, (%rsi)
movl $0x1, %edx
callq 0x2080
movl 0x8(%r13), %edi
leaq 0x2c(%r13), %rsi
movslq %ebp, %rdx
callq 0x2080
movl 0x8(%r13), %edi
leaq 0x17ba(%rip), %rsi      # 0x401d
movl $0x1, %edx
callq 0x2080
xorl %eax, %eax
movl %eax, 0x28(%r13)
movl %eax, 0xc(%r13)
movq %r14, %rdi
movl %ebx, %esi
callq 0x2a07
incl 0x10(%r13)
movdqu 0x18(%r13), %xmm0
pshufd $0x4e, %xmm0, %xmm0     # xmm0 = xmm0[2,3,0,1]
movdqu %xmm0, 0x18(%r13)
addq $0x58, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq