// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/modules/ilbm.c
// Function: my_preprocess_iff_chunk_fn
static int my_preprocess_iff_chunk_fn(struct de_iffctx *ictx)
{
	lctx *d = (lctx*)ictx->userdata;
	const char *name = NULL;

	// frctx will be set if we're in an "image" container, such as FORM:ILBM.
	// It is possible, e.g., for an ANIM file to contain FORM:8SVX containers
	// which contain BODY chunks that are not "image data".
	if(d->frctx) {
		switch(ictx->chunkctx->chunk4cc.id) {
		case CODE_ANHD: name="animation header"; break;
		case CODE_BMHD: name="bitmap header"; break;
		case CODE_BODY: name="image data"; break;
		case CODE_CAMG: name="Amiga viewport mode"; break;
		case CODE_CMAP: name="color map"; break;
		case CODE_CRNG: name="color register range info"; break;
		case CODE_DLTA: name="delta-compressed data"; break;
		case CODE_DPI : name="dots/inch"; break;
		case CODE_DRNG: name="color cycle"; break;
		case CODE_GRAB: name="hotspot"; break;
		case CODE_TINY: name="thumbnail"; break;
		}
	}

	if(name) {
		ictx->chunkctx->chunk_name = name;
	}
	return 1;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq 0x10(%rax), %rax
movq %rax, -0x10(%rbp)
movq $0x0, -0x18(%rbp)
movq -0x10(%rbp), %rax
cmpq $0x0, 0xb0(%rax)
je 0xb0061
movq -0x8(%rbp), %rax
movq 0x128(%rax), %rax
movl 0x4(%rax), %eax
movl %eax, -0x1c(%rbp)
subl $0x414e4844, %eax       # imm = 0x414E4844
je 0xaffcf
jmp 0xaff2c
movl -0x1c(%rbp), %eax
subl $0x424d4844, %eax       # imm = 0x424D4844
je 0xaffdf
jmp 0xaff3c
movl -0x1c(%rbp), %eax
subl $0x424f4459, %eax       # imm = 0x424F4459
je 0xaffec
jmp 0xaff4c
movl -0x1c(%rbp), %eax
subl $0x43414d47, %eax       # imm = 0x43414D47
je 0xafff9
jmp 0xaff5c
movl -0x1c(%rbp), %eax
subl $0x434d4150, %eax       # imm = 0x434D4150
je 0xb0006
jmp 0xaff6c
movl -0x1c(%rbp), %eax
subl $0x43524e47, %eax       # imm = 0x43524E47
je 0xb0013
jmp 0xaff7c
movl -0x1c(%rbp), %eax
subl $0x444c5441, %eax       # imm = 0x444C5441
je 0xb0020
jmp 0xaff8c
movl -0x1c(%rbp), %eax
subl $0x44504920, %eax       # imm = 0x44504920
je 0xb002d
jmp 0xaff9c
movl -0x1c(%rbp), %eax
subl $0x44524e47, %eax       # imm = 0x44524E47
je 0xb003a
jmp 0xaffac
movl -0x1c(%rbp), %eax
subl $0x47524142, %eax       # imm = 0x47524142
je 0xb0047
jmp 0xaffbc
movl -0x1c(%rbp), %eax
subl $0x54494e59, %eax       # imm = 0x54494E59
je 0xb0054
jmp 0xb005f
leaq 0x104de2(%rip), %rax    # 0x1b4db8
movq %rax, -0x18(%rbp)
jmp 0xb005f
leaq 0x104de3(%rip), %rax    # 0x1b4dc9
movq %rax, -0x18(%rbp)
jmp 0xb005f
leaq 0x1130ba(%rip), %rax    # 0x1c30ad
movq %rax, -0x18(%rbp)
jmp 0xb005f
leaq 0x104dd7(%rip), %rax    # 0x1b4dd7
movq %rax, -0x18(%rbp)
jmp 0xb005f
leaq 0x104dde(%rip), %rax    # 0x1b4deb
movq %rax, -0x18(%rbp)
jmp 0xb005f
leaq 0x104ddb(%rip), %rax    # 0x1b4df5
movq %rax, -0x18(%rbp)
jmp 0xb005f
leaq 0x104de8(%rip), %rax    # 0x1b4e0f
movq %rax, -0x18(%rbp)
jmp 0xb005f
leaq 0x104df1(%rip), %rax    # 0x1b4e25
movq %rax, -0x18(%rbp)
jmp 0xb005f
leaq 0x104dee(%rip), %rax    # 0x1b4e2f
movq %rax, -0x18(%rbp)
jmp 0xb005f
leaq 0x112fb8(%rip), %rax    # 0x1c3006
movq %rax, -0x18(%rbp)
jmp 0xb005f
leaq 0x105166(%rip), %rax    # 0x1b51c1
movq %rax, -0x18(%rbp)
jmp 0xb0061
cmpq $0x0, -0x18(%rbp)
je 0xb007b
movq -0x18(%rbp), %rcx
movq -0x8(%rbp), %rax
movq 0x128(%rax), %rax
movq %rcx, 0x58(%rax)
movl $0x1, %eax
popq %rbp
retq
nopw %cs:(%rax,%rax)