// File: /workspace/github_c_makefile_star2_O3/jsummers[P]deark/modules/iptc.c
// Function: de_run_iptc
static void de_run_iptc(deark *c, de_module_params *mparams)
{
	lctx *d = NULL;
	i64 pos;
	i64 bytes_consumed;
	i64 ds_count;

	d = de_malloc(c, sizeof(lctx));
	d->charset = DE_ENCODING_UNKNOWN;

	pos = 0;
	ds_count = 0;
	while(1) {
		if(pos>=c->infile->len) break;
		if(!do_dataset(c, d, ds_count, pos, &bytes_consumed)) break;
		if(bytes_consumed<=0) break;
		ds_count++;
		pos += bytes_consumed;
	}

	de_free(c, d);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x68, %rsp
movq %rdi, %r15
movl $0x4, %esi
callq 0xe8b2b
movq %rax, %r13
movl $0x0, (%rax)
movq 0x18(%r15), %rdi
cmpq $0x0, 0x18(%rdi)
jle 0x7f12f
xorl %r14d, %r14d
xorl %ebp, %ebp
movq %r15, 0x38(%rsp)
movq %r13, 0x30(%rsp)
movq %rbp, %rsi
callq 0xeead3
cmpb $0x1c, %al
jne 0x7f149
movq %r14, 0x40(%rsp)
leaq 0x1(%rbp), %rsi
movq 0x18(%r15), %rdi
leaq 0x2(%rbp), %rbx
callq 0xeead3
movl %eax, %r12d
movq 0x18(%r15), %rdi
leaq 0x3(%rbp), %rax
movq %rax, 0x50(%rsp)
movq %rbx, %rsi
callq 0xeead3
movl %eax, %r14d
xorps %xmm0, %xmm0
movaps %xmm0, 0x10(%rsp)
movq $0x0, 0x20(%rsp)
movl $0x1, %eax
leaq 0x1042cc(%rip), %rdx    # 0x183230
cmpb %r12b, -0x1(%rax,%rdx)
jne 0x7ef71
cmpb %r14b, (%rax,%rdx)
je 0x7ef9d
addq $0x18, %rax
cmpq $0x739, %rax            # imm = 0x739
jne 0x7ef64
movb %r12b, 0x10(%rsp)
movb %r14b, 0x11(%rsp)
leaq 0xad1c3(%rip), %rax     # 0x12c151
movq %rax, 0x18(%rsp)
movl $0x0, 0xc(%rsp)
jmp 0x7efb7
movq 0xf(%rax,%rdx), %rcx
movq %rcx, 0x20(%rsp)
movups -0x1(%rax,%rdx), %xmm0
movaps %xmm0, 0x10(%rsp)
movb $0x1, %al
movl %eax, 0xc(%rsp)
movq 0x18(%r15), %rdi
movq %rdi, 0x60(%rsp)
movq 0x50(%rsp), %rsi
callq 0xeeb67
movq %rax, %rbx
movl $0x2, %eax
movq %rax, 0x48(%rsp)
cmpq $0x8000, %rbx           # imm = 0x8000
jl 0x7f04b
jne 0x7efe6
xorl %ebx, %ebx
jmp 0x7f04b
leaq -0x7ffe(%rbx), %rax
movq %rax, 0x48(%rsp)
movq %rbp, 0x58(%rsp)
leaq 0x5(%rbp), %r15
addq $-0x8000, %rbx          # imm = 0x8000
movq %rbx, %r13
xorl %ebx, %ebx
movq %rbx, %rbp
shlq $0x8, %rbp
movq 0x60(%rsp), %rdi
movq %r15, %rsi
callq 0xeead3
movzbl %al, %ebx
orq %rbp, %rbx
movabsq $0x1000000000000, %rax  # imm = 0x1000000000000
cmpq %rax, %rbx
jge 0x7f114
incq %r15
decq %r13
jne 0x7f007
movq 0x38(%rsp), %r15
movq 0x30(%rsp), %r13
movq 0x58(%rsp), %rbp
movq 0x48(%rsp), %rax
addq 0x50(%rsp), %rax
movzbl %r12b, %edx
movq %rax, %r12
movzbl %r14b, %ecx
movq 0x18(%rsp), %r8
movq %rbx, (%rsp)
movq %r15, %rdi
leaq 0xaad30(%rip), %rsi     # 0x129da3
movq %rax, %r9
xorl %eax, %eax
callq 0xe8617
movq %r15, %rdi
movl $0x1, %esi
callq 0xe8a15
movq 0x20(%rsp), %rax
testq %rax, %rax
je 0x7f0ae
movq %r15, %rdi
movq %r13, %rsi
leaq 0x10(%rsp), %rdx
movq %r12, %rcx
movq %rbx, %r8
callq *%rax
movq 0x40(%rsp), %r14
jmp 0x7f0e0
testb $0x1, 0x14(%rsp)
movq 0x40(%rsp), %r14
jne 0x7f0ca
cmpb $0x2, 0x10(%rsp)
setne %al
movl 0xc(%rsp), %ecx
orb %al, %cl
jne 0x7f0e0
movq %r15, %rdi
movq %r13, %rsi
leaq 0x10(%rsp), %rdx
movq %r12, %rcx
movq %rbx, %r8
callq 0x7f1f3
movq %r15, %rdi
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
callq 0xe8a15
movq %rbx, %rax
subq %rbp, %rax
addq %r12, %rax
testq %rax, %rax
jle 0x7f12f
incq %r14
addq %rbx, %r12
movq 0x18(%r15), %rdi
movq %r12, %rbp
cmpq 0x18(%rdi), %r12
jl 0x7ef06
jmp 0x7f12f
leaq 0xab1a1(%rip), %rsi     # 0x12a2bc
movq 0x38(%rsp), %r15
movq %r15, %rdi
xorl %eax, %eax
callq 0xe9295
movq 0x30(%rsp), %r13
movq %r15, %rdi
movq %r13, %rsi
callq 0xe8be2
addq $0x68, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
testq %r14, %r14
je 0x7f176
testb %al, %al
jne 0x7f176
movq 0x18(%r15), %rax
movq 0x18(%rax), %rdx
leaq -0x1(%rdx), %rax
cmpq %rbp, %rax
jne 0x7f18e
leaq 0xaabb4(%rip), %rsi     # 0x129d1e
movq %r15, %rdi
xorl %eax, %eax
callq 0xe8617
jmp 0x7f12f
movzbl %al, %edx
leaq 0xaac00(%rip), %rsi     # 0x129d80
movq %r15, %rdi
movl %ebp, %ecx
xorl %eax, %eax
callq 0xe9295
jmp 0x7f12f
leaq 0xaabb7(%rip), %rsi     # 0x129d4c
movq %r15, %rdi
movq %rbp, %rcx
xorl %eax, %eax
callq 0xe8faa
jmp 0x7f12f