// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/modules/gif.c
// Function: do_application_extension
static void do_application_extension(deark *c, lctx *d, i64 pos)
{
	de_ucstring *s = NULL;
	u8 app_id[11];
	i64 n;

	n = (i64)de_getbyte(pos++);
	if(n<11) return;

	de_read(app_id, pos, 11);
	pos += n;

	s = ucstring_create(c);
	ucstring_append_bytes(s, app_id, 11, 0, DE_ENCODING_ASCII);
	de_dbg(c, "app id: \"%s\"", ucstring_getpsz(s));
	ucstring_destroy(s);

	if(!de_memcmp(app_id, "NETSCAPE2.0", 11) ||
		!de_memcmp(app_id, "ANIMEXTS1.0", 11))
	{
		do_animation_extension(c, d, pos);
	}
	else if(!de_memcmp(app_id, "XMP DataXMP", 11)) {
		do_xmp_extension(c, d, pos);
	}
	else if(!de_memcmp(app_id, "ICCRGBG1012", 11)) {
		do_iccprofile_extension(c, d, pos);
	}
	else if(!de_memcmp(app_id, "ImageMagick", 11)) {
		do_imagemagick_extension(c, d, pos);
	}
	else if(!de_memcmp(app_id, "MGK8BIM0000", 11)) {
		do_mgk8bim_extension(c, d, pos);
	}
	else if(!de_memcmp(app_id, "MGKIPTC0000", 11)) {
		do_mgkiptc_extension(c, d, pos);
	}
	else if(!de_memcmp(app_id, "GIFLITE    ", 11)) {
		do_giflite_extension(c, d, pos);
	}
	else {
		do_unknown_extension(c, d, pos);
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq $0x0, -0x20(%rbp)
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rdi
movq -0x18(%rbp), %rsi
movq %rsi, %rax
addq $0x1, %rax
movq %rax, -0x18(%rbp)
callq 0x165060
movzbl %al, %eax
movq %rax, -0x38(%rbp)
cmpq $0xb, -0x38(%rbp)
jge 0x739db
jmp 0x73bd5
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rdi
leaq -0x2b(%rbp), %rsi
movq -0x18(%rbp), %rdx
movl $0xb, %ecx
callq 0x164d10
movq -0x38(%rbp), %rax
addq -0x18(%rbp), %rax
movq %rax, -0x18(%rbp)
movq -0x8(%rbp), %rdi
callq 0x1711d0
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rdi
leaq -0x2b(%rbp), %rsi
movl $0xb, %edx
xorl %ecx, %ecx
movl $0x1, %r8d
callq 0x171fa0
movq -0x8(%rbp), %rax
movq %rax, -0x40(%rbp)
movq -0x20(%rbp), %rdi
callq 0x172500
movq -0x40(%rbp), %rdi
movq %rax, %rdx
leaq 0x137f4a(%rip), %rsi    # 0x1ab991
movb $0x0, %al
callq 0x15b0d0
movq -0x20(%rbp), %rdi
callq 0x171750
leaq -0x2b(%rbp), %rdi
leaq 0x137f3c(%rip), %rsi    # 0x1ab99e
movl $0xb, %edx
callq 0x19170
cmpl $0x0, %eax
je 0x73a8b
leaq -0x2b(%rbp), %rdi
leaq 0x137f2e(%rip), %rsi    # 0x1ab9aa
movl $0xb, %edx
callq 0x19170
cmpl $0x0, %eax
jne 0x73aa1
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
movq -0x18(%rbp), %rdx
callq 0x74750
jmp 0x73bd5
leaq -0x2b(%rbp), %rdi
leaq 0x137f0a(%rip), %rsi    # 0x1ab9b6
movl $0xb, %edx
callq 0x19170
cmpl $0x0, %eax
jne 0x73ad1
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
movq -0x18(%rbp), %rdx
callq 0x74870
jmp 0x73bd3
leaq -0x2b(%rbp), %rdi
leaq 0x137ee6(%rip), %rsi    # 0x1ab9c2
movl $0xb, %edx
callq 0x19170
cmpl $0x0, %eax
jne 0x73b01
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
movq -0x18(%rbp), %rdx
callq 0x748e0
jmp 0x73bd1
leaq -0x2b(%rbp), %rdi
leaq 0x137ec2(%rip), %rsi    # 0x1ab9ce
movl $0xb, %edx
callq 0x19170
cmpl $0x0, %eax
jne 0x73b31
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
movq -0x18(%rbp), %rdx
callq 0x74950
jmp 0x73bcf
leaq -0x2b(%rbp), %rdi
leaq 0x137e9e(%rip), %rsi    # 0x1ab9da
movl $0xb, %edx
callq 0x19170
cmpl $0x0, %eax
jne 0x73b5e
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
movq -0x18(%rbp), %rdx
callq 0x74a00
jmp 0x73bcd
leaq -0x2b(%rbp), %rdi
leaq 0x137e7d(%rip), %rsi    # 0x1ab9e6
movl $0xb, %edx
callq 0x19170
cmpl $0x0, %eax
jne 0x73b8b
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
movq -0x18(%rbp), %rdx
callq 0x74ab0
jmp 0x73bcb
leaq -0x2b(%rbp), %rdi
leaq 0x137e5c(%rip), %rsi    # 0x1ab9f2
movl $0xb, %edx
callq 0x19170
cmpl $0x0, %eax
jne 0x73bb8
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
movq -0x18(%rbp), %rdx
callq 0x74b60
jmp 0x73bc9
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
movq -0x18(%rbp), %rdx
callq 0x74c20
jmp 0x73bcb
jmp 0x73bcd
jmp 0x73bcf
jmp 0x73bd1
jmp 0x73bd3
jmp 0x73bd5
addq $0x40, %rsp
popq %rbp
retq
nopl (%rax,%rax)