LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O2/azhai[P]mlite/mlite.c
// Function: add_primitives
void add_primitives(char *name, PRIM *p) {
	cell	v, n, new;
	int	i;

	if (name) {
		n = symbol_ref(name);
		set(box_value(S_extensions), node(n, box_value(S_extensions)));
	}
	for (i=0; p && p && p[i].name; i++) {
		if (Callcc_magic < 0 && !strcmp(p[i].name, "call/cc"))
			Callcc_magic = Last_prim;
		v = symbol_ref(p[i].name);
		n = new_atom(Last_prim, NIL);
		n = new_atom(T_PRIMITIVE, n);
		if (Last_prim >= Max_prims)
			grow_primitives();
		memcpy(&Primitives[Last_prim], &p[i], sizeof(PRIM));
		Last_prim++;
		Environment = extend(v, n, Environment);
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %rbx
testq %rdi, %rdi
je 0x12db8
callq 0x69ff
movq 0x982f(%rip), %rcx      # 0x1c5c0
movq 0x9e68(%rip), %rdx      # 0x1cc00
movq (%rcx,%rdx,8), %rsi
movq %rax, %rdi
xorl %edx, %edx
callq 0x3613
movq 0x9813(%rip), %rcx      # 0x1c5c0
movq 0x9e4c(%rip), %rdx      # 0x1cc00
movq %rax, (%rcx,%rdx,8)
testq %rbx, %rbx
je 0x12e96
pushq $0x1
popq %r12
movq (%rbx), %r14
testq %r14, %r14
je 0x12e96
cmpq $0x0, 0x9e0f(%rip)      # 0x1cbe8
jns 0x12dfc
movq %r14, %rdi
leaq 0x21f1(%rip), %rsi      # 0x14fd6
callq 0x3110
testl %eax, %eax
jne 0x12dfc
movslq 0x9e1b(%rip), %rax      # 0x1cc10
movq %rax, 0x9dec(%rip)      # 0x1cbe8
movq %r14, %rdi
callq 0x69ff
movq %rax, %r14
movslq 0x9e02(%rip), %rdi      # 0x1cc10
pushq $-0x1
popq %rsi
movl %r12d, %edx
callq 0x3613
pushq $-0x1d
popq %rdi
movq %rax, %rsi
movl %r12d, %edx
callq 0x3613
movq %rax, %r15
movl 0x9de0(%rip), %eax      # 0x1cc10
cmpl 0x9dde(%rip), %eax      # 0x1cc14
jl 0x12e43
callq 0x12d2e
movl 0x9dcd(%rip), %eax      # 0x1cc10
movq 0x987e(%rip), %rcx      # 0x1c6c8
cltq
imulq $0x28, %rax, %rdx
movq 0x20(%rbx), %rsi
movq %rsi, 0x20(%rcx,%rdx)
movups (%rbx), %xmm0
movups 0x10(%rbx), %xmm1
movups %xmm1, 0x10(%rcx,%rdx)
movups %xmm0, (%rcx,%rdx)
incl %eax
movl %eax, 0x9d9f(%rip)      # 0x1cc10
movq 0x9290(%rip), %r13      # 0x1c108
movq %r14, %rdi
movq %r15, %rsi
movq %r13, %rdx
callq 0xc8ad
movq %r13, 0x927b(%rip)      # 0x1c108
addq $0x28, %rbx
jmp 0x12dc5
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/azhai[P]mlite/mlite.c
// Function: make_initial_env
void make_initial_env(void) {
	cell	new;

	Environment = node(NIL, NIL);
	Environment = extend(symbol_ref("it"), NIL, Environment);
	S_it = cadr(Environment);
	Environment = extend(symbol_ref("*extensions*"), NIL, Environment);
	S_extensions = cadr(Environment);
	Environment = extend(symbol_ref("*library-path*"), NIL, Environment);
	S_library_path = cadr(Environment);
	set(box_value(S_library_path), get_library_path());
	Environment = extend(symbol_ref("*loading*"), FALSE, Environment);
	S_loading = cadr(Environment);
	Callcc_magic = -1;
	Last_prim = 0;
	Max_prims = 0;
	grow_primitives();
	add_primitives(NULL, Core_primitives);
	Environment = node(Environment, NIL);
	Program = TRUE; /* or rehash() will not work */
	rehash(car(Environment));
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
pushq $-0x1
popq %rbx
movq %rbx, %rdi
movq %rbx, %rsi
xorl %edx, %edx
callq 0x3613
movq %rax, 0x9245(%rip)      # 0x1c108
leaq 0x137e(%rip), %rdi      # 0x14248
callq 0x69ff
movq 0x9232(%rip), %r14      # 0x1c108
movq %rax, %rdi
movq %rbx, %rsi
movq %r14, %rdx
callq 0xc8ad
movq %r14, 0x921d(%rip)      # 0x1c108
movq 0x927e(%rip), %rax      # 0x1c170
movq 0x96c7(%rip), %rcx      # 0x1c5c0
movq (%rcx,%r14,8), %rcx
movq (%rax,%rcx,8), %rax
movq %rax, 0x9ce8(%rip)      # 0x1cbf0
leaq 0x2531(%rip), %rdi      # 0x15440
callq 0x69ff
movq 0x91ed(%rip), %r14      # 0x1c108
movq %rax, %rdi
movq %rbx, %rsi
movq %r14, %rdx
callq 0xc8ad
movq %r14, 0x91d8(%rip)      # 0x1c108
movq 0x9239(%rip), %rax      # 0x1c170
movq 0x9682(%rip), %rcx      # 0x1c5c0
movq (%rcx,%r14,8), %rcx
movq (%rax,%rcx,8), %rax
movq %rax, 0x9cb3(%rip)      # 0x1cc00
leaq 0x24f9(%rip), %rdi      # 0x1544d
callq 0x69ff
movq 0x91a8(%rip), %r14      # 0x1c108
movq %rax, %rdi
movq %rbx, %rsi
movq %r14, %rdx
callq 0xc8ad
movq %r14, 0x9193(%rip)      # 0x1c108
movq 0x91f4(%rip), %rax      # 0x1c170
movq 0x963d(%rip), %rcx      # 0x1c5c0
movq (%rcx,%r14,8), %rcx
movq (%rax,%rcx,8), %rax
movq %rax, 0x9c76(%rip)      # 0x1cc08
callq 0x12a8a
movq 0x9622(%rip), %rcx      # 0x1c5c0
movq 0x9c63(%rip), %rdx      # 0x1cc08
movq %rax, (%rcx,%rdx,8)
leaq 0x24ac(%rip), %rdi      # 0x1545c
callq 0x69ff
movq 0x914c(%rip), %r14      # 0x1c108
pushq $-0x3
popq %rsi
movq %rax, %rdi
movq %r14, %rdx
callq 0xc8ad
movq %r14, 0x9137(%rip)      # 0x1c108
movq 0x9198(%rip), %rax      # 0x1c170
movq 0x95e1(%rip), %rcx      # 0x1c5c0
movq (%rcx,%r14,8), %rcx
movq (%rax,%rcx,8), %rax
orq $-0x1, 0x9bf9(%rip)     # 0x1cbe8
andl $0x0, 0x9c1a(%rip)      # 0x1cc10
movq %rax, 0x95cb(%rip)      # 0x1c5c8
andl $0x0, 0x9c10(%rip)      # 0x1cc14
callq 0x12d2e
leaq 0x8300(%rip), %rsi      # 0x1b310
xorl %edi, %edi
callq 0x12d6f
movq 0x90ea(%rip), %rdi      # 0x1c108
movq %rbx, %rsi
xorl %edx, %edx
callq 0x3613
movq %rax, 0x90d9(%rip)      # 0x1c108
movq $-0x2, 0x90be(%rip) # 0x1c0f8
movq 0x912f(%rip), %rcx      # 0x1c170
movq (%rcx,%rax,8), %rdi
popq %rbx
popq %r14
popq %rbp
jmp 0xc7c6
// File: /workspace/github_c_makefile_star2_O2/azhai[P]mlite/mlite.c
// Function: init_extensions
void init_extensions(void) {
	cell	e, n;
	char	initproc[TOKEN_LENGTH+2];
	char	*s;
	char	*mlite = "mlite";

	e = box_value(S_extensions);
	while (mlite || e != NIL) {
		s = mlite? mlite: string(car(e));
		if (strlen(s)*2+1 >= TOKEN_LENGTH)
			fatal("init_extension(): procedure name too long");
		sprintf(initproc, "%s:%s", s, s);
		n = find_symbol(initproc);
		if (n != NIL) {
			n = node(n, NIL);
			eval(n);
		}
		e = mlite? e: cdr(e);
		mlite = NULL;
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x408, %rsp            # imm = 0x408
movq 0x9718(%rip), %r13      # 0x1cc00
shlq $0x3, %r13
addq 0x90cd(%rip), %r13      # 0x1c5c0
leaq 0x1eba(%rip), %r12      # 0x153b4
movb $0x1, %r15b
leaq 0x1fec(%rip), %rbx      # 0x154f0
leaq -0x430(%rbp), %r14
movq (%r13), %r13
testb $0x1, %r15b
jne 0x1351f
cmpq $-0x1, %r13
je 0x135bc
testb $0x1, %r15b
jne 0x13546
movq 0x9094(%rip), %rax      # 0x1c5c0
movq 0x8c3d(%rip), %rcx      # 0x1c170
movq (%rcx,%r13,8), %rcx
movq (%rax,%rcx,8), %r12
shlq $0x3, %r12
addq 0x90a2(%rip), %r12      # 0x1c5e8
movq %r12, %rdi
callq 0x30a0
movabsq $0x7ffffffffffffe00, %rcx # imm = 0x7FFFFFFFFFFFFE00
testq %rcx, %rax
jne 0x135ce
movq %r14, %rdi
movq %rbx, %rsi
movq %r12, %rdx
movq %r12, %rcx
xorl %eax, %eax
callq 0x31f0
movq %r14, %rdi
callq 0x6955
cmpq $-0x1, %rax
je 0x13593
movq %rax, %rdi
pushq $-0x1
popq %rsi
xorl %edx, %edx
callq 0x3613
movq %rax, %rdi
callq 0x10278
xorl %r12d, %r12d
testb $0x1, %r15b
movl $0x0, %r15d
jne 0x1350f
shlq $0x3, %r13
addq 0x900f(%rip), %r13      # 0x1c5c0
xorl %r15d, %r15d
xorl %r12d, %r12d
jmp 0x1350b
addq $0x408, %rsp            # imm = 0x408
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x1ef1(%rip), %rdi      # 0x154c6
callq 0x39b6
// File: /workspace/github_c_makefile_star2_O2/azhai[P]mlite/mlite.c
// Function: usage
void usage(int quit) {
	pr("Usage: mlite [-h?] [-i name] [-gqv] [-f prog [args]] ");
	pr("[-m size[m]]");
	nl();
	pr("             [-l prog] [-t count] [-d image] [-- [args]]");
	nl();
	if (quit) bye(1);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movl %edi, %ebx
leaq 0x1f0c(%rip), %rdi      # 0x154f6
callq 0x3873
leaq 0x1f36(%rip), %rdi      # 0x1552c
callq 0x3873
leaq 0x22d5(%rip), %r14      # 0x158d7
movq %r14, %rdi
callq 0x3873
leaq 0x1f28(%rip), %rdi      # 0x15539
callq 0x3873
movq %r14, %rdi
callq 0x3873
testl %ebx, %ebx
jne 0x13627
popq %rbx
popq %r14
popq %rbp
retq
pushq $0x1
popq %rdi
callq 0x3200
// File: /workspace/github_c_makefile_star2_O2/azhai[P]mlite/mlite.c
// Function: long_usage
void long_usage() {
	nl();
	usage(0);
	nl();
	pr("-h              display this summary (also -?)"); nl();
	pr("-i name         base name of image file (must be first option!)");
	nl();
	pr("-i -            ignore image, load mlite.m instead"); nl();
	pr("-d file         dump heap image to file and exit"); nl();
	pr("-f file [args]  run program and exit (implies -q)"); nl();
	pr("-g              print GC summaries (-gg = more)"); nl();
	pr("-l file         load program (may be repeated)"); nl();
	pr("-m n[m]         set memory limit to nK (or nM) nodes"); nl();
	pr("-q              be quiet (no banner, no prompt, exit on errors)");
	nl();
	pr("-t n            list up to N procedures in call traces"); nl();
	pr("-v              print version and exit"); nl();
	pr("-- [args]       pass subsequent arguments to program"); nl();
	nl();
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
leaq 0x229b(%rip), %rbx      # 0x158d7
movq %rbx, %rdi
callq 0x3873
xorl %edi, %edi
callq 0x135da
movq %rbx, %rdi
callq 0x3873
leaq 0x1f18(%rip), %rdi      # 0x15572
callq 0x3873
movq %rbx, %rdi
callq 0x3873
leaq 0x1f33(%rip), %rdi      # 0x155a1
callq 0x3873
movq %rbx, %rdi
callq 0x3873
leaq 0x1f5f(%rip), %rdi      # 0x155e1
callq 0x3873
movq %rbx, %rdi
callq 0x3873
leaq 0x1f7e(%rip), %rdi      # 0x15614
callq 0x3873
movq %rbx, %rdi
callq 0x3873
leaq 0x1f9b(%rip), %rdi      # 0x15645
callq 0x3873
movq %rbx, %rdi
callq 0x3873
leaq 0x1fb9(%rip), %rdi      # 0x15677
callq 0x3873
movq %rbx, %rdi
callq 0x3873
leaq 0x1fd5(%rip), %rdi      # 0x156a7
callq 0x3873
movq %rbx, %rdi
callq 0x3873
leaq 0x1ff0(%rip), %rdi      # 0x156d6
callq 0x3873
movq %rbx, %rdi
callq 0x3873
leaq 0x2011(%rip), %rdi      # 0x1570b
callq 0x3873
movq %rbx, %rdi
callq 0x3873
leaq 0x203d(%rip), %rdi      # 0x1574b
callq 0x3873
movq %rbx, %rdi
callq 0x3873
leaq 0x2060(%rip), %rdi      # 0x15782
callq 0x3873
movq %rbx, %rdi
callq 0x3873
leaq 0x2073(%rip), %rdi      # 0x157a9
callq 0x3873
movq %rbx, %rdi
callq 0x3873
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %rbp
jmp 0x3873
// File: /workspace/github_c_makefile_star2_O2/azhai[P]mlite/mlite.c
// Function: get_size_k
long get_size_k(char *s) {
	int	c;
	long	n;

	c = s[strlen(s)-1];
	n = atol(s);
	if (isdigit(c))
		;
	else if (c == 'M' || c == 'm')
		n *= 1024L;
	else
		usage(1);
	return n * 1024;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movq %rdi, %rbx
callq 0x30a0
movsbq -0x1(%rbx,%rax), %r14
movq %rbx, %rdi
callq 0x31b0
movq %rax, %rbx
callq 0x3230
movq (%rax), %rax
testb $0x8, 0x1(%rax,%r14,2)
jne 0x139e2
andb $-0x21, %r14b
cmpb $0x4d, %r14b
jne 0x139da
shlq $0xa, %rbx
jmp 0x139e2
pushq $0x1
popq %rdi
callq 0x135da
shlq $0xa, %rbx
movq %rbx, %rax
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/sguerrini97[P]ps3linux-ps3vuart-tools/ps3sm/dev.c
// Function: dev_read
int
dev_read(void *buf, size_t len)
{
	char tmp[4096];
	struct ps3sm_header *hdr;
	int ret;

	if (fd < 0)
		return (-1);

	hdr = (struct ps3sm_header *) tmp;

	while (1) {
		ret = read(fd, hdr, sizeof(*hdr));
		if (ret < 0) {
			if (errno != EAGAIN)
				return (-1);
		} else if (ret > 0) {
			break;
		}
	}

	while (1) {
		ret = read(fd, hdr + 1, hdr->payload_length);
		if (ret < 0) {
			if (errno != EAGAIN)
				return (-1);
		} else if (ret > 0) {
			break;
		}
	}

	if (len > (sizeof(*hdr) + hdr->payload_length))
		len = sizeof(*hdr) + hdr->payload_length;

	memcpy(buf, tmp, len);

	return (len);
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x1000, %rsp           # imm = 0x1000
movq %rdi, %r14
movl 0x2d8e(%rip), %edi      # 0x41b0
pushq $-0x1
popq %rbx
testl %edi, %edi
js 0x149f
movq %rsi, %r15
movq %rsp, %r12
pushq $0x10
popq %r13
movq %r12, %rsi
movq %r13, %rdx
callq 0x1090
testl %eax, %eax
js 0x1446
je 0x1450
jmp 0x1458
callq 0x1030
cmpl $0xb, (%rax)
jne 0x149f
movl 0x2d5a(%rip), %edi      # 0x41b0
jmp 0x1433
leaq 0x10(%rsp), %r12
movl 0x2d4d(%rip), %edi      # 0x41b0
movl 0x4(%rsp), %edx
movq %r12, %rsi
callq 0x1090
testl %eax, %eax
js 0x1477
je 0x145d
jmp 0x1483
callq 0x1030
cmpl $0xb, (%rax)
je 0x145d
jmp 0x149f
movq %rsp, %rsi
movl 0x4(%rsi), %ebx
addq $0x10, %rbx
cmpq %r15, %rbx
cmovaeq %r15, %rbx
movq %r14, %rdi
movq %rbx, %rdx
callq 0x10c0
movl %ebx, %eax
addq $0x1000, %rsp           # imm = 0x1000
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
nop
// File: /workspace/github_c_makefile_star2_O2/sguerrini97[P]ps3linux-ps3vuart-tools/ps3sm/cmd/cmd_ctl_led.c
// Function: cmd_ctl_led_exec
int
cmd_ctl_led_exec(int cmdc, struct cmd **cmdv, int argc, char **argv)
{
	struct ps3sm_ctl_led ctl_led;
	uint32_t arg1, arg2, arg3, arg4;
	char *endptr;
	int ret;

	arg1 = strtoul(argv[0], &endptr, 0);
	if (*endptr != '\0' || arg1 > 0xff)
		return (CMD_EINVAL);

	arg2 = strtoul(argv[1], &endptr, 0);
	if (*endptr != '\0' || arg2 > 0xff)
		return (CMD_EINVAL);

	arg3 = strtoul(argv[2], &endptr, 0);
	if (*endptr != '\0' || arg3 > 0xff)
		return (CMD_EINVAL);

	arg4 = strtoul(argv[3], &endptr, 0);
	if (*endptr != '\0' || arg4 > 0xff)
		return (CMD_EINVAL);

	ps3sm_init_header(PS3SM_HDR(&ctl_led),
	    sizeof(ctl_led) - sizeof(struct ps3sm_header),
	    PS3SM_SID_CTL_LED, 0);

	ctl_led.version = PS3SM_CTL_LED_VERSION;
	ctl_led.arg1 = arg1;
	ctl_led.arg2 = arg2;
	ctl_led.arg3 = arg3;
	ctl_led.arg4 = arg4;

	ret = dev_write(&ctl_led, sizeof(ctl_led));
	if (ret != sizeof(ctl_led))
		return (CMD_EIO);

	return (CMD_EOK);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rcx, %r15
movq (%rcx), %rdi
leaq 0x8(%rsp), %r14
movq %r14, %rsi
xorl %edx, %edx
callq 0x10f0
movq %rax, %rbx
movq (%r14), %rax
cmpb $0x0, (%rax)
setne %al
testl $0xffffff00, %ebx       # imm = 0xFFFFFF00
setne %cl
orb %al, %cl
pushq $0x2
popq %rbp
jne 0x15bf
movq 0x8(%r15), %rdi
leaq 0x8(%rsp), %r12
movq %r12, %rsi
xorl %edx, %edx
callq 0x10f0
movq %rax, %r14
movq (%r12), %rax
cmpb $0x0, (%rax)
setne %al
testl $0xffffff00, %r14d      # imm = 0xFFFFFF00
setne %cl
orb %al, %cl
jne 0x15bf
movq 0x10(%r15), %rdi
leaq 0x8(%rsp), %r13
movq %r13, %rsi
xorl %edx, %edx
callq 0x10f0
movq %rax, %r12
movq (%r13), %rax
cmpb $0x0, (%rax)
setne %al
testl $0xffffff00, %r12d      # imm = 0xFFFFFF00
setne %cl
orb %al, %cl
jne 0x15bf
movq 0x18(%r15), %rdi
leaq 0x8(%rsp), %r15
movq %r15, %rsi
xorl %edx, %edx
callq 0x10f0
movq (%r15), %rcx
cmpb $0x0, (%rcx)
setne %cl
testl $0xffffff00, %eax       # imm = 0xFFFFFF00
setne %dl
orb %cl, %dl
jne 0x15bf
leaq 0x10(%rsp), %rdi
movw $0x1001, (%rdi)         # imm = 0x1001
movl $0x8, 0x4(%rdi)
movw $0xc, 0x8(%rdi)
andl $0x0, 0xc(%rdi)
movb $0x1, 0x10(%rdi)
movb %bl, 0x11(%rdi)
movb %r14b, 0x12(%rdi)
movb %r12b, 0x14(%rdi)
movb %al, 0x15(%rdi)
pushq $0x18
popq %rsi
callq 0x13ea
xorl %ecx, %ecx
cmpl $0x18, %eax
setne %cl
leal (%rcx,%rcx,2), %ebp
movl %ebp, %eax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/sguerrini97[P]ps3linux-ps3vuart-tools/ps3sm/cmd/cmd_get_inter_lpar_param.c
// Function: cmd_get_inter_lpar_param_exec
int
cmd_get_inter_lpar_param_exec(int cmdc, struct cmd **cmdv, int argc, char **argv)
{
	struct ps3sm_get_inter_lpar_param get_inter_lpar_param;
	struct ps3sm_get_inter_lpar_param_reply get_inter_lpar_param_reply;
	uint32_t arg;
	char *endptr;
	int ret;

	arg = strtoul(argv[0], &endptr, 0);
	if (*endptr != '\0' || arg < 1 || arg > 2)
		return (CMD_EINVAL);

	ps3sm_init_header(PS3SM_HDR(&get_inter_lpar_param),
	    sizeof(get_inter_lpar_param) - sizeof(struct ps3sm_header),
	    PS3SM_SID_GET_INTER_LPAR_PARAM, 0);

	get_inter_lpar_param.version = PS3SM_GET_INTER_LPAR_PARAM_VERSION;
	get_inter_lpar_param.arg = arg;

	ret = dev_write(&get_inter_lpar_param, sizeof(get_inter_lpar_param));
	if (ret != sizeof(get_inter_lpar_param))
		return (CMD_EIO);

	ret = dev_read(&get_inter_lpar_param_reply, sizeof(get_inter_lpar_param_reply));
	if (ret < 0)
		return (CMD_EIO);

	if (arg == 1)
		hex_fprintf(stdout, (char *) get_inter_lpar_param_reply.u.arg1.data,
		    sizeof(PS3SM_HDR(&get_inter_lpar_param_reply)->payload_length));
	else
		fprintf(stdout, "%02x %02x %02x %02x %08x %016llx\n",
		    get_inter_lpar_param_reply.u.arg2.val1,
		    get_inter_lpar_param_reply.u.arg2.val2,
		    get_inter_lpar_param_reply.u.arg2.val3,
		    get_inter_lpar_param_reply.u.arg2.val4,
		    get_inter_lpar_param_reply.u.arg2.val5,
		    get_inter_lpar_param_reply.u.arg2.val6);

	return (CMD_EOK);
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
subq $0x630, %rsp            # imm = 0x630
movq (%rcx), %rdi
movq %rsp, %r14
movq %r14, %rsi
xorl %edx, %edx
callq 0x10f0
movq %rax, %rbx
movq (%r14), %rax
cmpb $0x0, (%rax)
setne %al
leal -0x3(%rbx), %ecx
cmpl $-0x2, %ecx
setb %cl
orb %al, %cl
je 0x160c
pushq $0x2
popq %rbp
jmp 0x16a4
leaq 0x8(%rsp), %rdi
movw $0x1001, (%rdi)         # imm = 0x1001
movl $0x8, 0x4(%rdi)
movw $0x9, 0x8(%rdi)
andl $0x0, 0xc(%rdi)
movb $0x1, 0x10(%rdi)
movb %bl, 0x11(%rdi)
pushq $0x18
popq %rsi
callq 0x13ea
pushq $0x3
popq %rbp
cmpl $0x18, %eax
jne 0x16a4
leaq 0x20(%rsp), %rdi
movl $0x610, %esi            # imm = 0x610
callq 0x1409
testl %eax, %eax
js 0x16a4
movq 0x2970(%rip), %rax      # 0x3fc8
movq (%rax), %rdi
cmpl $0x1, %ebx
jne 0x1671
leaq 0x30(%rsp), %rsi
pushq $0x4
popq %rdx
callq 0x1c24
xorl %ebp, %ebp
jmp 0x16a4
movzbl 0x30(%rsp), %edx
movzbl 0x31(%rsp), %ecx
movzbl 0x32(%rsp), %r8d
movzbl 0x33(%rsp), %r9d
movl 0x34(%rsp), %r10d
leaq 0xaad(%rip), %rsi       # 0x2140
xorl %ebp, %ebp
xorl %eax, %eax
pushq 0x38(%rsp)
pushq %r10
callq 0x10b0
popq %rcx
popq %rdx
movl %ebp, %eax
addq $0x630, %rsp            # imm = 0x630
popq %rbx
popq %r14
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O2/sguerrini97[P]ps3linux-ps3vuart-tools/ps3sm/cmd/cmd_get_temperature.c
// Function: cmd_get_temperature_exec
int
cmd_get_temperature_exec(int cmdc, struct cmd **cmdv, int argc, char **argv)
{
	struct ps3sm_get_temperature get_temperature;
	struct ps3sm_get_temperature_reply get_temperature_reply;

	uint8_t cell_rsx;
	char *endptr;
	int ret;

	cell_rsx = strtoul(argv[0], &endptr, 0);
	if (*endptr != '\0' || cell_rsx > 1)
		return (CMD_EINVAL);


	ps3sm_init_header(PS3SM_HDR(&get_temperature),
	    sizeof(get_temperature) - sizeof(struct ps3sm_header),
	    PS3SM_SID_GET_TEMPERATURE, 0);

	get_temperature.version = PS3SM_GET_TEMPERATURE_VERSION;
	get_temperature.arg = cell_rsx;

	ret = dev_write(&get_temperature, sizeof(get_temperature));
	if (ret != sizeof(get_temperature))
		return (CMD_EIO);
	
	ret = dev_read(&get_temperature_reply, sizeof(get_temperature_reply));
	if (ret < 0)
		return (CMD_EIO);
	
	fprintf(stdout, "%02d.%02d\n", get_temperature_reply.temp_0, ((get_temperature_reply.temp_1*0x64) >> 8));

	return (CMD_EOK);
}

// Assembly:
pushq %rbx
subq $0x40, %rsp
movq (%rcx), %rdi
leaq 0x8(%rsp), %rbx
movq %rbx, %rsi
xorl %edx, %edx
callq 0x10f0
movq (%rbx), %rcx
cmpb $0x0, (%rcx)
setne %cl
testb $-0x2, %al
setne %dl
orb %cl, %dl
je 0x16e2
pushq $0x2
popq %rbx
jmp 0x174f
leaq 0x2c(%rsp), %rdi
movw $0x1001, (%rdi)         # imm = 0x1001
movl $0x4, 0x4(%rdi)
movw $0xd, 0x8(%rdi)
andl $0x0, 0xc(%rdi)
movb $0x1, 0x10(%rdi)
movb %al, 0x11(%rdi)
pushq $0x14
popq %rsi
callq 0x13ea
pushq $0x3
popq %rbx
cmpl $0x14, %eax
jne 0x174f
leaq 0x14(%rsp), %rdi
pushq $0x18
popq %rsi
callq 0x1409
testl %eax, %eax
js 0x174f
movq 0x289c(%rip), %rax      # 0x3fc8
movq (%rax), %rdi
movzbl 0x28(%rsp), %edx
movzbl 0x29(%rsp), %eax
imull $0x64, %eax, %ecx
shrl $0x8, %ecx
leaq 0xa65(%rip), %rsi       # 0x21ab
xorl %ebx, %ebx
xorl %eax, %eax
callq 0x10b0
movl %ebx, %eax
addq $0x40, %rsp
popq %rbx
retq
nop
// File: /workspace/github_c_makefile_star2_O2/sguerrini97[P]ps3linux-ps3vuart-tools/ps3sm/cmd/cmd_ring_buzzer.c
// Function: cmd_ring_buzzer_exec
int
cmd_ring_buzzer_exec(int cmdc, struct cmd **cmdv, int argc, char **argv)
{
	struct ps3sm_ring_buzzer ring_buzzer;
	uint32_t arg1, arg2, arg3;
	char *endptr;
	int ret;

	arg1 = strtoul(argv[0], &endptr, 0);
	if (*endptr != '\0' || arg1 > 0xff)
		return (CMD_EINVAL);

	arg2 = strtoul(argv[1], &endptr, 0);
	if (*endptr != '\0' || arg2 > 0xff)
		return (CMD_EINVAL);

	arg3 = strtoul(argv[2], &endptr, 0);
	if (*endptr != '\0')
		return (CMD_EINVAL);

	ps3sm_init_header(PS3SM_HDR(&ring_buzzer),
	    sizeof(ring_buzzer) - sizeof(struct ps3sm_header),
	    PS3SM_SID_RING_BUZZER, 0);

	ring_buzzer.version = PS3SM_RING_BUZZER_VERSION;
	ring_buzzer.arg1 = arg1;
	ring_buzzer.arg2 = arg2;
	ring_buzzer.arg3 = arg3;

	ret = dev_write(&ring_buzzer, sizeof(ring_buzzer));
	if (ret != sizeof(ring_buzzer))
		return (CMD_EIO);

	return (CMD_EOK);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x20, %rsp
movq %rcx, %r14
movq (%rcx), %rdi
movq %rsp, %r15
movq %r15, %rsi
xorl %edx, %edx
callq 0x10f0
movq %rax, %rbx
movq (%r15), %rax
cmpb $0x0, (%rax)
setne %al
testl $0xffffff00, %ebx       # imm = 0xFFFFFF00
setne %cl
orb %al, %cl
pushq $0x2
popq %rbp
jne 0x1818
movq 0x8(%r14), %rdi
movq %rsp, %r12
movq %r12, %rsi
xorl %edx, %edx
callq 0x10f0
movq %rax, %r15
movq (%r12), %rax
cmpb $0x0, (%rax)
setne %al
testl $0xffffff00, %r15d      # imm = 0xFFFFFF00
setne %cl
orb %al, %cl
jne 0x1818
movq 0x10(%r14), %rdi
movq %rsp, %r14
movq %r14, %rsi
xorl %edx, %edx
callq 0x10f0
movq (%r14), %rcx
cmpb $0x0, (%rcx)
jne 0x1818
leaq 0x8(%rsp), %rdi
movw $0x1001, (%rdi)         # imm = 0x1001
movl $0x8, 0x4(%rdi)
movw $0x15, 0x8(%rdi)
andl $0x0, 0xc(%rdi)
movb $0x1, 0x10(%rdi)
movb %bl, 0x11(%rdi)
movb %r15b, 0x12(%rdi)
movl %eax, 0x14(%rdi)
pushq $0x18
popq %rsi
callq 0x13ea
xorl %ecx, %ecx
cmpl $0x18, %eax
setne %cl
leal (%rcx,%rcx,2), %ebp
movl %ebp, %eax
addq $0x20, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O2/sguerrini97[P]ps3linux-ps3vuart-tools/ps3sm/cmd/cmd_set_attr.c
// Function: cmd_set_attr_exec
int
cmd_set_attr_exec(int cmdc, struct cmd **cmdv, int argc, char **argv)
{
	struct ps3sm_set_attr set_attr;
	uint32_t attrs;
	char *endptr;
	int ret;

	attrs = strtoul(argv[0], &endptr, 0);
	if (*endptr != '\0')
		return (CMD_EINVAL);

	ps3sm_init_header(PS3SM_HDR(&set_attr),
	    sizeof(set_attr) - sizeof(struct ps3sm_header),
	    PS3SM_SID_SET_ATTR, 0);

	set_attr.version = PS3SM_SET_ATTR_VERSION;
	set_attr.attrs = attrs;

	ret = dev_write(&set_attr, sizeof(set_attr));
	if (ret != sizeof(set_attr))
		return (CMD_EIO);

	return (CMD_EOK);
}

// Assembly:
pushq %rbx
subq $0x20, %rsp
movq (%rcx), %rdi
movq %rsp, %rbx
movq %rbx, %rsi
xorl %edx, %edx
callq 0x10f0
movq (%rbx), %rcx
cmpb $0x0, (%rcx)
je 0x184a
pushq $0x2
popq %rax
jmp 0x187f
leaq 0x8(%rsp), %rdi
movw $0x1001, (%rdi)         # imm = 0x1001
movl $0x8, 0x4(%rdi)
movw $0x8, 0x8(%rdi)
andl $0x0, 0xc(%rdi)
movb $0x1, 0x10(%rdi)
movl %eax, 0x14(%rdi)
pushq $0x18
popq %rsi
callq 0x13ea
xorl %ecx, %ecx
cmpl $0x18, %eax
setne %cl
leal (%rcx,%rcx,2), %eax
addq $0x20, %rsp
popq %rbx
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O2/sguerrini97[P]ps3linux-ps3vuart-tools/ps3sm/cmd/cmd_set_fan_policy.c
// Function: cmd_set_fan_policy_exec
int
cmd_set_fan_policy_exec(int cmdc, struct cmd **cmdv, int argc, char **argv)
{
	struct ps3sm_set_fan_policy set_fan_policy;

	uint8_t arg1, arg2, arg3;

	char *endptr1, *endptr2, *endptr3;
	int ret;

	arg1 = strtoul(argv[0], &endptr1, 0);
	arg2 = strtoul(argv[1], &endptr2, 0);
	arg3 = strtoul(argv[2], &endptr3, 0);

	if (*endptr1 != '\0' || *endptr2 != '\0' || *endptr3 != '\0')
		return (CMD_EINVAL);

	if (arg2 == 2 && (arg3 < 0x33 || arg3 > 0xfc))
	{
		fprintf(stderr, "Dangerous fan speed, aborting\n");
		return (CMD_EINVAL);
	}

	ps3sm_init_header(PS3SM_HDR(&set_fan_policy),
    	sizeof(set_fan_policy) - sizeof(struct ps3sm_header),
    	PS3SM_SID_FAN_POLICY_1, 0);

	set_fan_policy.version = PS3SM_SET_FAN_POLICY_VERSION;
	set_fan_policy.arg1 = arg1;
	set_fan_policy.arg2 = arg2;
	set_fan_policy.arg3 = arg3;

	ret = dev_write(&set_fan_policy, sizeof(set_fan_policy));
	if (ret != sizeof(set_fan_policy))
		return (CMD_EIO);

	return (CMD_EOK);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x30, %rsp
movq %rcx, %r15
movq (%rcx), %rdi
leaq 0x10(%rsp), %r12
movq %r12, %rsi
xorl %edx, %edx
callq 0x10f0
movq %rax, %rbx
movq 0x8(%r15), %rdi
leaq 0x8(%rsp), %rsi
xorl %edx, %edx
callq 0x10f0
movq %rax, %r14
movq 0x10(%r15), %rdi
movq %rsp, %rsi
xorl %edx, %edx
callq 0x10f0
movq (%r12), %rcx
pushq $0x2
popq %rbp
cmpb $0x0, (%rcx)
jne 0x193f
movq 0x8(%rsp), %rcx
cmpb $0x0, (%rcx)
jne 0x193f
movq (%rsp), %rcx
cmpb $0x0, (%rcx)
jne 0x193f
cmpb $0x2, %r14b
jne 0x1903
movzbl %al, %ecx
addl $0xffffff03, %ecx       # imm = 0xFFFFFF03
cmpl $0xffffff35, %ecx       # imm = 0xFFFFFF35
jbe 0x194e
leaq 0x18(%rsp), %rdi
movw $0x1001, (%rdi)         # imm = 0x1001
movl $0x8, 0x4(%rdi)
movw $0x19, 0x8(%rdi)
andl $0x0, 0xc(%rdi)
movb $0x1, 0x10(%rdi)
movb %bl, 0x11(%rdi)
movb %r14b, 0x12(%rdi)
movb %al, 0x13(%rdi)
pushq $0x18
popq %rsi
callq 0x13ea
xorl %ecx, %ecx
cmpl $0x18, %eax
setne %cl
leal (%rcx,%rcx,2), %ebp
movl %ebp, %eax
addq $0x30, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
movq 0x26a3(%rip), %rax      # 0x3ff8
movq (%rax), %rcx
leaq 0x8ef(%rip), %rdi       # 0x224e
pushq $0x1e
popq %rsi
pushq $0x1
popq %rdx
callq 0x1110
jmp 0x193f
// File: /workspace/github_c_makefile_star2_O2/dlbeer[P]dhara/tests/error.c
// Function: main
int main(void)
{
	dhara_error_t err;

	for (err = DHARA_E_NONE; err < DHARA_E_MAX; err++) {
		const char *msg = dhara_strerror(err);

		assert(msg != NULL);
		printf("%4d: %s\n", err, msg);
	}

	return 0;
}

// Assembly:
pushq %rbp
pushq %rbx
pushq %rax
leaq 0xf85(%rip), %rbx       # 0x2103
xorl %ebp, %ebp
cmpl $0x9, %ebp
je 0x11a4
movl %ebp, %edi
callq 0x114c
testq %rax, %rax
je 0x11ad
movq %rbx, %rdi
movl %ebp, %esi
movq %rax, %rdx
xorl %eax, %eax
callq 0x1030
incl %ebp
jmp 0x1180
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
leaq 0xf26(%rip), %rdi       # 0x20da
leaq 0xf2b(%rip), %rsi       # 0x20e6
leaq 0xf32(%rip), %rcx       # 0x20f4
pushq $0x1c
popq %rdx
callq 0x1040
// File: /workspace/github_c_makefile_star2_O2/0x3f00[P]PhotonCpp/./PhotonLayer.h
// Function: PhotonLayer::PhotonLayer(int, int)
PhotonLayer(int width, int height) {
        width_ = width;
        height_ = height;

		for (int h = 0; h < height; h++)
			iArray.push_back({});

		for (int h = 0; h < height; h++)
			iArray[h].resize(width);

        pixels.resize(height);
        rowIslands.resize(height);
        rowUnsupported.resize(height);
        rowSupported.resize(height);
    }

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x48, %rsp
movl %esi, %r15d
andl $0x0, 0x8(%rdi)
leaq 0x10(%rdi), %rbx
leaq 0x28(%rdi), %rax
movq %rax, -0x50(%rbp)
leaq 0x40(%rdi), %rax
movq %rax, -0x48(%rbp)
leaq 0x58(%rdi), %rax
movq %rax, -0x40(%rbp)
leaq 0x70(%rdi), %rax
movq %rax, -0x38(%rbp)
xorps %xmm0, %xmm0
movups %xmm0, 0x10(%rdi)
movups %xmm0, 0x20(%rdi)
movups %xmm0, 0x30(%rdi)
movups %xmm0, 0x40(%rdi)
movups %xmm0, 0x50(%rdi)
movups %xmm0, 0x60(%rdi)
movups %xmm0, 0x70(%rdi)
andq $0x0, 0x80(%rdi)
movl %esi, (%rdi)
movl %edx, 0x4(%rdi)
xorl %r14d, %r14d
testl %edx, %edx
movl %edx, -0x2c(%rbp)
cmovgl %edx, %r14d
leaq -0x70(%rbp), %r12
movl %r14d, %r13d
subl $0x1, %r13d
jb 0x7e98
xorps %xmm0, %xmm0
movaps %xmm0, -0x70(%rbp)
andq $0x0, -0x60(%rbp)
movq %rbx, %rdi
movq %r12, %rsi
callq 0x8e34
movq %r12, %rdi
callq 0x9062
jmp 0x7e71
movslq %r15d, %r15
movl %r14d, %eax
imulq $0x18, %rax, %r12
xorl %r13d, %r13d
cmpq %r13, %r12
je 0x7ebe
movq (%rbx), %rdi
addq %r13, %rdi
movq %r15, %rsi
callq 0x8d9e
addq $0x18, %r13
jmp 0x7ea5
movslq -0x2c(%rbp), %r14
movq -0x50(%rbp), %rdi
movq %r14, %rsi
callq 0x8dd0
movq -0x48(%rbp), %rdi
movq %r14, %rsi
callq 0x8dd0
movq -0x40(%rbp), %rdi
movq %r14, %rsi
callq 0x8dd0
movq -0x38(%rbp), %rdi
movq %r14, %rsi
callq 0x8dd0
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x7f03
movq %rax, %r14
jmp 0x7f14
movq %rax, %r14
leaq -0x70(%rbp), %rdi
callq 0x9062
movq -0x38(%rbp), %rdi
callq 0x9398
movq -0x40(%rbp), %rdi
callq 0x9398
movq -0x48(%rbp), %rdi
callq 0x9398
movq -0x50(%rbp), %rdi
callq 0x9398
movq %rbx, %rdi
callq 0x8e08
movq %r14, %rdi
callq 0x33f0
// File: /workspace/github_c_makefile_star2_O2/0x3f00[P]PhotonCpp/./PhotonFilePreview.h
// Function: PhotonFilePreview::PhotonFilePreview(int, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)
PhotonFilePreview(int previewAddress, const std::string & fileContent) {
        std::string data(fileContent.begin() + previewAddress, fileContent.begin() + previewAddress + 32);
		std::stringstream ss(data);
        PhotonInputStream ds(ss);

        resolutionX_ = ds.readInt();
        resolutionY_ = ds.readInt();
        imageAddress_ = ds.readInt();
        dataSize_ = ds.readInt();
        p1_ = ds.readInt();
        p2_ = ds.readInt();
        p3_ = ds.readInt();
        p4_ = ds.readInt();

        rawImageData_.assign(fileContent.begin() + imageAddress_, fileContent.begin() + imageAddress_ + dataSize_);

        decodeImageData();
    }

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x1b0, %rsp            # imm = 0x1B0
movq %rdx, %r15
movq %rdi, %r14
leaq 0x10(%rdi), %rbx
xorps %xmm0, %xmm0
movups %xmm0, 0x30(%rdi)
movups %xmm0, 0x20(%rdi)
movups %xmm0, 0x10(%rdi)
movq (%rdx), %rax
movslq %esi, %rcx
leaq (%rax,%rcx), %rsi
leaq 0x20(%rax,%rcx), %rdx
leaq -0x38(%rbp), %rax
movq %rax, -0x10(%rax)
leaq -0x48(%rbp), %rdi
callq 0x997a
leaq -0x1d0(%rbp), %r12
leaq -0x48(%rbp), %rsi
pushq $0x18
popq %rdx
movq %r12, %rdi
callq 0x3380
leaq -0x28(%rbp), %rdi
movq %r12, (%rdi)
callq 0x9736
movl %eax, (%r14)
leaq -0x28(%rbp), %rdi
callq 0x9736
movl %eax, 0x4(%r14)
leaq -0x28(%rbp), %rdi
callq 0x9736
movl %eax, 0x8(%r14)
leaq -0x28(%rbp), %rdi
callq 0x9736
movl %eax, 0xc(%r14)
leaq -0x28(%rbp), %rdi
callq 0x9736
movl %eax, 0x40(%r14)
leaq -0x28(%rbp), %rdi
callq 0x9736
movl %eax, 0x44(%r14)
leaq -0x28(%rbp), %rdi
callq 0x9736
movl %eax, 0x48(%r14)
leaq -0x28(%rbp), %rdi
callq 0x9736
movl %eax, 0x4c(%r14)
movslq 0x8(%r14), %rsi
addq (%r15), %rsi
movslq 0xc(%r14), %rdx
addq %rsi, %rdx
movq %rbx, %rdi
callq 0x99fc
movq %r14, %rdi
callq 0x98bc
leaq -0x1d0(%rbp), %rdi
callq 0x3170
leaq -0x48(%rbp), %rdi
callq 0x30f0
addq $0x1b0, %rsp            # imm = 0x1B0
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
jmp 0x846e
movq %rax, %r15
jmp 0x847d
movq %rax, %r15
jmp 0x8486
movq %rax, %r15
leaq -0x1d0(%rbp), %rdi
callq 0x3170
leaq -0x48(%rbp), %rdi
callq 0x30f0
addq $0x28, %r14
movq %r14, %rdi
callq 0x9398
movq %rbx, %rdi
callq 0x9062
movq %r15, %rdi
callq 0x33f0
// File: /workspace/github_c_makefile_star2_O2/0x3f00[P]PhotonCpp/./PhotonFilePrintParameters.h
// Function: PhotonFilePrintParameters::PhotonFilePrintParameters(int, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)
PhotonFilePrintParameters(int parametersPos, const std::string & fileContent) {
        std::string data(fileContent.begin() + parametersPos, fileContent.begin() + parametersPos + getByteSize());
		std::stringstream ss(data);
        PhotonInputStream ds(ss);

        bottomLiftDistance_ = ds.readFloat();
        bottomLiftSpeed_ = ds.readFloat();

        liftingDistance_ = ds.readFloat();
        liftingSpeed_ = ds.readFloat();
        retractSpeed_ = ds.readFloat();

        volumeMl_ = ds.readFloat();
        weightG_ = ds.readFloat();
        costDollars_ = ds.readFloat();

        bottomLightOffDelay_ = ds.readFloat();
        lightOffDelay_ = ds.readFloat();
        bottomLayerCount_ = ds.readInt();

        p1_ = ds.readInt();
        p2_ = ds.readInt();
        p3_ = ds.readInt();
        p4_ = ds.readInt();
    }

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x1b8, %rsp            # imm = 0x1B8
movq %rdi, %rbx
movaps 0x3b64(%rip), %xmm0     # 0xc020
movups %xmm0, (%rdi)
movl $0x43960000, 0x10(%rdi) # imm = 0x43960000
andl $0x0, 0x24(%rdi)
xorps %xmm0, %xmm0
movups %xmm0, 0x14(%rdi)
movq (%rdx), %rax
movslq %esi, %rcx
leaq (%rax,%rcx), %rsi
leaq 0x3c(%rax,%rcx), %rdx
leaq -0x30(%rbp), %rax
movq %rax, -0x10(%rax)
leaq -0x40(%rbp), %r15
movq %r15, %rdi
callq 0x997a
leaq -0x1c8(%rbp), %r14
pushq $0x18
popq %rdx
movq %r14, %rdi
movq %r15, %rsi
callq 0x3380
leaq -0x20(%rbp), %rdi
movq %r14, (%rdi)
callq 0x9736
movl %eax, (%rbx)
leaq -0x20(%rbp), %rdi
callq 0x9736
movl %eax, 0x4(%rbx)
leaq -0x20(%rbp), %rdi
callq 0x9736
movl %eax, 0x8(%rbx)
leaq -0x20(%rbp), %rdi
callq 0x9736
movl %eax, 0xc(%rbx)
leaq -0x20(%rbp), %rdi
callq 0x9736
movl %eax, 0x10(%rbx)
leaq -0x20(%rbp), %rdi
callq 0x9736
leaq 0x14(%rbx), %rcx
movl %eax, (%rcx)
leaq -0x20(%rbp), %rdi
callq 0x9736
movl %eax, 0x18(%rbx)
leaq -0x20(%rbp), %rdi
callq 0x9736
movl %eax, 0x1c(%rbx)
leaq -0x20(%rbp), %rdi
callq 0x9736
movl %eax, 0x20(%rbx)
leaq -0x20(%rbp), %rdi
callq 0x9736
movl %eax, 0x24(%rbx)
leaq -0x20(%rbp), %rdi
callq 0x9736
movl %eax, 0x28(%rbx)
leaq -0x20(%rbp), %rdi
callq 0x9736
movl %eax, 0x2c(%rbx)
leaq -0x20(%rbp), %rdi
callq 0x9736
movl %eax, 0x30(%rbx)
leaq -0x20(%rbp), %rdi
callq 0x9736
movl %eax, 0x34(%rbx)
leaq -0x20(%rbp), %rdi
callq 0x9736
movl %eax, 0x38(%rbx)
leaq -0x1c8(%rbp), %rdi
callq 0x3170
leaq -0x40(%rbp), %rdi
callq 0x30f0
addq $0x1b8, %rsp            # imm = 0x1B8
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
jmp 0x85f9
movq %rax, %rbx
leaq -0x1c8(%rbp), %rdi
callq 0x3170
leaq -0x40(%rbp), %rdi
callq 0x30f0
movq %rbx, %rdi
callq 0x33f0
// File: /workspace/github_c_makefile_star2_O2/0x3f00[P]PhotonCpp/./PhotonFileLayer.h
// Function: PhotonFileLayer::saveLayer(PhotonLayer&)
void saveLayer(PhotonLayer & photonLayer) {
        packedLayerImage_ = photonLayer.packLayerImage();
        imageData_ = photonLayer.packImageData();
        dataSize_ = imageData_.size();
        islandRows_.clear();
        isLandsCount_ = photonLayer.setIslands(islandRows_);
    }

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x28, %rsp
movq %rsi, %r14
movq %rdi, %rbx
leaq -0x38(%rbp), %r15
movq %r15, %rdi
callq 0xb10e
leaq 0x48(%rbx), %rdi
movq %r15, %rsi
callq 0x3250
movq %r15, %rdi
callq 0x30f0
movq %r15, %rdi
movq %r14, %rsi
callq 0xb22e
leaq 0x28(%rbx), %rdi
movq %r15, %rsi
callq 0x3250
movq %r15, %rdi
callq 0x30f0
movl 0x30(%rbx), %eax
movl %eax, 0x10(%rbx)
leaq 0x68(%rbx), %r15
movq %r15, %rdi
callq 0xb35a
movq %r14, %rdi
movq %r15, %rsi
callq 0xb368
movl %eax, 0x80(%rbx)
addq $0x28, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/0x3f00[P]PhotonCpp/./PhotonFilePreview.h
// Function: PhotonFilePreview::save(PhotonOutputStream, int)
void save(PhotonOutputStream os, int startAddress) {
        os.writeInt(resolutionX_);
        os.writeInt(resolutionY_);
        os.writeInt(startAddress + 4+4+4+4 + 4+4+4+4);
        os.writeInt(dataSize_);
        os.writeInt(p1_);
        os.writeInt(p2_);
        os.writeInt(p3_);
        os.writeInt(p4_);
        os.write(rawImageData_, 0, dataSize_);
    }

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x28, %rsp
movl %edx, %r15d
movq %rdi, %r14
leaq -0x38(%rbp), %rbx
movq %rsi, (%rbx)
movl (%rdi), %esi
movq %rbx, %rdi
callq 0xb870
movl 0x4(%r14), %esi
movq %rbx, %rdi
callq 0xb870
addl $0x20, %r15d
movq %rbx, %rdi
movl %r15d, %esi
callq 0xb870
movl 0xc(%r14), %esi
movq %rbx, %rdi
callq 0xb870
movl 0x40(%r14), %esi
movq %rbx, %rdi
callq 0xb870
movl 0x44(%r14), %esi
movq %rbx, %rdi
callq 0xb870
movl 0x48(%r14), %esi
movq %rbx, %rdi
callq 0xb870
movl 0x4c(%r14), %esi
movq %rbx, %rdi
callq 0xb870
leaq 0x10(%r14), %rsi
leaq -0x30(%rbp), %r15
movq %r15, %rdi
callq 0x95ee
movl 0xc(%r14), %ecx
movq %rbx, %rdi
movq %r15, %rsi
xorl %edx, %edx
callq 0xb8e2
leaq -0x30(%rbp), %rdi
callq 0x9062
addq $0x28, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
leaq -0x30(%rbp), %rdi
callq 0x9062
movq %rbx, %rdi
callq 0x33f0
// File: /workspace/github_c_makefile_star2_O2/0x3f00[P]PhotonCpp/./PhotonFilePrintParameters.h
// Function: PhotonFilePrintParameters::save(PhotonOutputStream&)
void save(PhotonOutputStream & os) {
        os.writeFloat(bottomLiftDistance_);
        os.writeFloat(bottomLiftSpeed_);

        os.writeFloat(liftingDistance_);
        os.writeFloat(liftingSpeed_);
        os.writeFloat(retractSpeed_);

        os.writeFloat(volumeMl_);
        os.writeFloat(weightG_);
        os.writeFloat(costDollars_);

        os.writeFloat(bottomLightOffDelay_);
        os.writeFloat(lightOffDelay_);
        os.writeInt(bottomLayerCount_);

        os.writeInt(p1_);
        os.writeInt(p2_);
        os.writeInt(p3_);
        os.writeInt(p4_);
    }

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movq %rsi, %rbx
movq %rdi, %r14
movl (%rdi), %esi
movq %rbx, %rdi
callq 0xb870
movl 0x4(%r14), %esi
movq %rbx, %rdi
callq 0xb870
movl 0x8(%r14), %esi
movq %rbx, %rdi
callq 0xb870
movl 0xc(%r14), %esi
movq %rbx, %rdi
callq 0xb870
movl 0x10(%r14), %esi
movq %rbx, %rdi
callq 0xb870
movl 0x14(%r14), %esi
movq %rbx, %rdi
callq 0xb870
movl 0x18(%r14), %esi
movq %rbx, %rdi
callq 0xb870
movl 0x1c(%r14), %esi
movq %rbx, %rdi
callq 0xb870
movl 0x20(%r14), %esi
movq %rbx, %rdi
callq 0xb870
movl 0x24(%r14), %esi
movq %rbx, %rdi
callq 0xb870
movl 0x28(%r14), %esi
movq %rbx, %rdi
callq 0xb870
movl 0x2c(%r14), %esi
movq %rbx, %rdi
callq 0xb870
movl 0x30(%r14), %esi
movq %rbx, %rdi
callq 0xb870
movl 0x34(%r14), %esi
movq %rbx, %rdi
callq 0xb870
movl 0x38(%r14), %esi
movq %rbx, %rdi
popq %rbx
popq %r14
popq %rbp
jmp 0xb870
nop
// File: /workspace/github_c_makefile_star2_O2/0x3f00[P]PhotonCpp/./PhotonFileLayer.h
// Function: PhotonFileLayer::save(PhotonOutputStream&)
void save(PhotonOutputStream & os) {
        os.writeFloat(layerPositionZ_);
        os.writeFloat(layerExposure_);
        os.writeFloat(layerOffTimeSeconds_);

        os.writeInt(dataAddress_);
        os.writeInt(dataSize_);

        os.writeInt(unknown1_);
        os.writeInt(unknown2_);
        os.writeInt(unknown3_);
        os.writeInt(unknown4_);
    }

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movq %rsi, %rbx
movq %rdi, %r14
movl (%rdi), %esi
movq %rbx, %rdi
callq 0xb870
movl 0x4(%r14), %esi
movq %rbx, %rdi
callq 0xb870
movl 0x8(%r14), %esi
movq %rbx, %rdi
callq 0xb870
movl 0xc(%r14), %esi
movq %rbx, %rdi
callq 0xb870
movl 0x10(%r14), %esi
movq %rbx, %rdi
callq 0xb870
movl 0x14(%r14), %esi
movq %rbx, %rdi
callq 0xb870
movl 0x18(%r14), %esi
movq %rbx, %rdi
callq 0xb870
movl 0x1c(%r14), %esi
movq %rbx, %rdi
callq 0xb870
movl 0x20(%r14), %esi
movq %rbx, %rdi
popq %rbx
popq %r14
popq %rbp
jmp 0xb870
nop
// File: /workspace/github_c_makefile_star2_O2/0x3f00[P]PhotonCpp/./PhotonInputStream.h
// Function: PhotonInputStream::readInt()
uint32_t readInt() {
		std::vector<char> buf;
		buf.resize(4);
        readFully(buf);
        return (buf[3]) << 24 | (buf[2] & 0xff) << 16 |
                (buf[1] & 0xff) << 8 | (buf[0] & 0xff);
    }

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
subq $0x18, %rsp
movq %rdi, %rbx
xorps %xmm0, %xmm0
leaq -0x20(%rbp), %rdi
movaps %xmm0, (%rdi)
andq $0x0, 0x10(%rdi)
pushq $0x4
popq %rsi
callq 0x8d9e
leaq -0x20(%rbp), %rsi
movq %rbx, %rdi
callq 0x97f2
leaq -0x20(%rbp), %rdi
movq (%rdi), %rax
movl (%rax), %ebx
callq 0x9062
movl %ebx, %eax
addq $0x18, %rsp
popq %rbx
popq %rbp
retq
movq %rax, %rbx
leaq -0x20(%rbp), %rdi
callq 0x9062
movq %rbx, %rdi
callq 0x33f0
// File: /workspace/github_c_makefile_star2_O2/0x3f00[P]PhotonCpp/./PhotonFilePreview.h
// Function: PhotonFilePreview::decodeImageData()
void decodeImageData() {
        imageData_.resize(resolutionX_ * resolutionY_);
        int d = 0;
        for (int i = 0; i < dataSize_; i++) {
			int32_t dot = (rawImageData_[i] & 0xFF) | ((rawImageData_[i+1] & 0xFF) << 8);
			i++;

			int32_t color =   ((dot & 0xF800) << 8) | ((dot & 0x07C0) << 5) | ((dot & 0x001F) << 3);

//            int red = ((dot >> 11) & 0x1F) << 3;
//            int green = ((dot >> 6) & 0x1F) << 3;
//            int blue = (dot & 0x1F) << 3;
//            color = red<<16 | green<<8 | blue;

            int repeat = 1;
            if ((dot & 0x0020) == 0x0020) {
                repeat += (rawImageData_[i+1] & 0xFF) | ((rawImageData_[i+2] & 0x0F) << 8);
				i += 2;
            }

            while (repeat > 0) {
                imageData_[d++] = color;
                repeat--;
            }
        }

    }

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movq %rdi, %rbx
addq $0x28, %rdi
movslq (%rbx), %rax
movslq 0x4(%rbx), %rsi
imulq %rax, %rsi
callq 0x8dd0
movq 0x10(%rbx), %rax
movq 0x28(%rbx), %rcx
xorl %edi, %edi
pushq $0x1
popq %rdx
xorl %esi, %esi
cmpl 0xc(%rbx), %edi
jge 0x9972
movslq %edi, %r9
movzbl (%rax,%r9), %r8d
testb $0x20, %r8b
jne 0x9908
leaq 0x1(%r9), %rdi
movl %edx, %r10d
jmp 0x9926
movzbl 0x2(%rax,%r9), %r10d
leaq 0x3(%r9), %rdi
movzbl 0x3(%rax,%r9), %r11d
andl $0xf, %r11d
shll $0x8, %r11d
addl %r11d, %r10d
incl %r10d
movzbl 0x1(%rax,%r9), %r11d
movl %r11d, %r9d
shll $0x10, %r9d
leal (%r9,%r8,8), %r9d
shll $0xd, %r11d
shll $0x5, %r8d
orl %r11d, %r8d
andl $0xf800, %r8d           # imm = 0xF800
andl $0xf800f8, %r9d         # imm = 0xF800F8
orl %r8d, %r9d
movslq %esi, %r8
leal (%r8,%r10), %esi
movslq %esi, %r10
cmpq %r8, %r10
je 0x996b
movl %r9d, (%rcx,%r8,4)
incq %r8
jmp 0x995d
incl %edi
jmp 0x98e8
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O2/0x3f00[P]PhotonCpp/./PhotonFileLayer.h
// Function: PhotonFileLayer::PhotonFileLayer(PhotonInputStream&, int, int)
PhotonFileLayer(PhotonInputStream & ds, int32_t width, int32_t height) {
		width_ = width;
		height_ = height;
		layerPositionZ_ = ds.readFloat();
        layerExposure_ = ds.readFloat();
        layerOffTimeSeconds_ = ds.readFloat();

        dataAddress_ = ds.readInt();
        dataSize_ = ds.readInt();

        unknown1_ = ds.readInt();
        unknown2_ = ds.readInt();
        unknown3_ = ds.readInt();
        unknown4_ = ds.readInt();
    }

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %r14
leaq 0x38(%rdi), %rax
movq %rax, 0x28(%rdi)
andq $0x0, 0x30(%rdi)
movq %rsi, %r13
xorl %eax, %eax
movb %al, 0x38(%rdi)
leaq 0x58(%rdi), %rsi
movq %rsi, 0x48(%rdi)
andq $0x0, 0x50(%rdi)
leaq 0x28(%rdi), %rsi
movq %rsi, -0x30(%rbp)
leaq 0x48(%rdi), %r15
movb %al, 0x58(%rdi)
leaq 0x68(%rdi), %r12
xorps %xmm0, %xmm0
andq $0x0, 0x78(%rdi)
movups %xmm0, 0x68(%rdi)
andq $0x0, 0xa0(%rdi)
leaq 0x90(%rdi), %rbx
movups %xmm0, 0x90(%rdi)
movl %edx, 0xac(%rdi)
movl %ecx, 0xb0(%rdi)
movq %r13, %rdi
callq 0x9736
movl %eax, (%r14)
movq %r13, %rdi
callq 0x9736
movl %eax, 0x4(%r14)
movq %r13, %rdi
callq 0x9736
movl %eax, 0x8(%r14)
movq %r13, %rdi
callq 0x9736
movl %eax, 0xc(%r14)
movq %r13, %rdi
callq 0x9736
movl %eax, 0x10(%r14)
movq %r13, %rdi
callq 0x9736
movl %eax, 0x14(%r14)
movq %r13, %rdi
callq 0x9736
movl %eax, 0x18(%r14)
movq %r13, %rdi
callq 0x9736
movl %eax, 0x1c(%r14)
movq %r13, %rdi
callq 0x9736
movl %eax, 0x20(%r14)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %r14
movq %rbx, %rdi
callq 0x8d4e
movq %r12, %rdi
callq 0x9dea
movq %r15, %rdi
callq 0x30f0
movq -0x30(%rbp), %rdi
callq 0x30f0
movq %r14, %rdi
callq 0x33f0
// File: /workspace/github_c_makefile_star2_O2/0x3f00[P]PhotonCpp/./PhotonLayer.h
// Function: PhotonLayer::unLink()
void unLink() {
        iArray.clear();
        pixels.clear();
        rowIslands.clear();
        rowUnsupported.clear();
        rowSupported.clear();
    }

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movq %rdi, %rbx
addq $0x10, %rdi
callq 0xb0d0
movq 0x28(%rbx), %rax
cmpq %rax, 0x30(%rbx)
je 0x9db8
movq %rax, 0x30(%rbx)
movq 0x40(%rbx), %rax
cmpq %rax, 0x48(%rbx)
je 0x9dc6
movq %rax, 0x48(%rbx)
movq 0x58(%rbx), %rax
cmpq %rax, 0x60(%rbx)
je 0x9dd4
movq %rax, 0x60(%rbx)
movq 0x70(%rbx), %rax
cmpq %rax, 0x78(%rbx)
je 0x9de2
movq %rax, 0x78(%rbx)
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O2/0x3f00[P]PhotonCpp/./PhotonLayer.h
// Function: PhotonLayer::packLayerImage[abi:cxx11]()
std::string packLayerImage() {
		std::stringstream baos;

		{
            for (int y = 0; y < height_; y++) {
                if (pixels[y] == 0) {
                    add(baos, PhotonDot::OFF, width_);
                } else {
                    char current = PhotonDot::OFF;
                    int length = 0;
                    for (int x = 0; x < width_; x++) {
						char next = iArray[y][x];
                        if (next != current) {
                            if (length > 0) {
                                add(baos, current, length);
                            }
                            current = next;
                            length = 1;
                        } else {
                            length++;
                        }
                    }
                    if (length > 0) {
                        add(baos, current, length);
                    }
                }
            }

			return baos.str();
        }
    }

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x198, %rsp            # imm = 0x198
movq %rsi, %r14
movq %rdi, -0x30(%rbp)
leaq -0x1c0(%rbp), %rdi
callq 0x3160
xorl %r15d, %r15d
pushq $0x1
popq %r13
movslq 0x4(%r14), %rax
cmpq %rax, %r15
jge 0xb1dd
movq 0x28(%r14), %rax
cmpl $0x0, (%rax,%r15,4)
je 0xb1c1
xorl %ebx, %ebx
movq %r15, -0x38(%rbp)
imulq $0x18, %r15, %r15
xorl %eax, %eax
xorl %ecx, %ecx
movslq (%r14), %rsi
movsbl %al, %edx
cmpq %rsi, %rbx
jge 0xb1a8
movq 0x10(%r14), %rsi
movq (%rsi,%r15), %rsi
movb (%rsi,%rbx), %r12b
cmpb %al, %r12b
jne 0xb185
incl %ecx
movl %eax, %r12d
jmp 0xb1a0
testl %ecx, %ecx
jle 0xb19d
movq %r14, %rdi
leaq -0x1b0(%rbp), %rsi
callq 0xb43a
movl %r13d, %ecx
jmp 0xb1a0
movl %r13d, %ecx
incq %rbx
movl %r12d, %eax
jmp 0xb162
testl %ecx, %ecx
movq -0x38(%rbp), %r15
jle 0xb1d5
movq %r14, %rdi
leaq -0x1b0(%rbp), %rsi
callq 0xb43a
jmp 0xb1d5
movl (%r14), %ecx
movq %r14, %rdi
leaq -0x1b0(%rbp), %rsi
xorl %edx, %edx
callq 0xb43a
incq %r15
jmp 0xb13c
leaq -0x1a8(%rbp), %rsi
movq -0x30(%rbp), %rbx
movq %rbx, %rdi
callq 0x3370
leaq -0x1c0(%rbp), %rdi
callq 0x3170
movq %rbx, %rax
addq $0x198, %rsp            # imm = 0x198
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0xb217
jmp 0xb217
jmp 0xb217
movq %rax, %rbx
leaq -0x1c0(%rbp), %rdi
callq 0x3170
movq %rbx, %rdi
callq 0x33f0