LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O2/svpv[P]rpmset/./base64pack.h
// Function: pack23x4c16e4
static inline void pack23x4c16e4(const uint32_t *v, char *s, unsigned e)
{
    s[ 0] = base64[(v[0] & Mask( 5)) <<  1 | (e & 1)];
    s[ 1] = base64[(v[0] & Mask(11)) >>  5];
    s[ 2] = base64[(v[0] & Mask(17)) >> 11];
    s[ 3] = base64[(v[0] & Mask(23)) >> 17];
    s[ 4] = base64[(v[1] & Mask( 5)) <<  1 | (e & 2) >> 1];
    s[ 5] = base64[(v[1] & Mask(11)) >>  5];
    s[ 6] = base64[(v[1] & Mask(17)) >> 11];
    s[ 7] = base64[(v[1] & Mask(23)) >> 17];
    s[ 8] = base64[(v[2] & Mask( 5)) <<  1 | (e & 4) >> 2];
    s[ 9] = base64[(v[2] & Mask(11)) >>  5];
    s[10] = base64[(v[2] & Mask(17)) >> 11];
    s[11] = base64[(v[2] & Mask(23)) >> 17];
    s[12] = base64[(v[3] & Mask( 5)) <<  1 | (e & 8) >> 3];
    s[13] = base64[(v[3] & Mask(11)) >>  5];
    s[14] = base64[(v[3] & Mask(17)) >> 11];
    s[15] = base64[(v[3] & Mask(23)) >> 17];
}

// Assembly:
movl (%rdi), %eax
andl $0x1f, %eax
movl %edx, %ecx
andl $0x1, %ecx
leal (%rcx,%rax,2), %ecx
leaq 0xf07(%rip), %rax       # 0x7010
movb (%rcx,%rax), %cl
movb %cl, (%rsi)
movl (%rdi), %ecx
shrl $0x5, %ecx
andl $0x3f, %ecx
movb (%rcx,%rax), %cl
movb %cl, 0x1(%rsi)
movl (%rdi), %ecx
shrl $0xb, %ecx
andl $0x3f, %ecx
movb (%rcx,%rax), %cl
movb %cl, 0x2(%rsi)
movl (%rdi), %ecx
shrl $0x11, %ecx
andl $0x3f, %ecx
movb (%rcx,%rax), %cl
movb %cl, 0x3(%rsi)
movl 0x4(%rdi), %ecx
andl $0x1f, %ecx
movl %edx, %r8d
shrl %r8d
andl $0x1, %r8d
leal (%r8,%rcx,2), %ecx
movb (%rcx,%rax), %cl
movb %cl, 0x4(%rsi)
movl 0x4(%rdi), %ecx
shrl $0x5, %ecx
andl $0x3f, %ecx
movb (%rcx,%rax), %cl
movb %cl, 0x5(%rsi)
movl 0x4(%rdi), %ecx
shrl $0xb, %ecx
andl $0x3f, %ecx
movb (%rcx,%rax), %cl
movb %cl, 0x6(%rsi)
movl 0x4(%rdi), %ecx
shrl $0x11, %ecx
andl $0x3f, %ecx
movb (%rcx,%rax), %cl
movb %cl, 0x7(%rsi)
movl 0x8(%rdi), %ecx
andl $0x1f, %ecx
movl %edx, %r8d
shrl $0x2, %r8d
andl $0x1, %r8d
leal (%r8,%rcx,2), %ecx
movb (%rcx,%rax), %cl
movb %cl, 0x8(%rsi)
movl 0x8(%rdi), %ecx
shrl $0x5, %ecx
andl $0x3f, %ecx
movb (%rcx,%rax), %cl
movb %cl, 0x9(%rsi)
movl 0x8(%rdi), %ecx
shrl $0xb, %ecx
andl $0x3f, %ecx
movb (%rcx,%rax), %cl
movb %cl, 0xa(%rsi)
movl 0x8(%rdi), %ecx
shrl $0x11, %ecx
andl $0x3f, %ecx
movb (%rcx,%rax), %cl
movb %cl, 0xb(%rsi)
movl 0xc(%rdi), %ecx
andl $0x1f, %ecx
shrl $0x3, %edx
andl $0x1, %edx
leal (%rdx,%rcx,2), %ecx
movb (%rcx,%rax), %cl
movb %cl, 0xc(%rsi)
movl 0xc(%rdi), %ecx
shrl $0x5, %ecx
andl $0x3f, %ecx
movb (%rcx,%rax), %cl
movb %cl, 0xd(%rsi)
movl 0xc(%rdi), %ecx
shrl $0xb, %ecx
andl $0x3f, %ecx
movb (%rcx,%rax), %cl
movb %cl, 0xe(%rsi)
movl 0xc(%rdi), %ecx
shrl $0x11, %ecx
andl $0x3f, %ecx
movb (%rcx,%rax), %al
movb %al, 0xf(%rsi)
retq
// File: /workspace/github_c_makefile_star2_O2/svpv[P]rpmset/./base64pack.h
// Function: pack24x4c16
static inline void pack24x4c16(const uint32_t *v, char *s, unsigned e)
{
    s[ 0] = base64[ v[0] & Mask( 6)];
    s[ 1] = base64[(v[0] & Mask(12)) >>  6];
    s[ 2] = base64[(v[0] & Mask(18)) >> 12];
    s[ 3] = base64[(v[0] & Mask(24)) >> 18];
    s[ 4] = base64[ v[1] & Mask( 6)];
    s[ 5] = base64[(v[1] & Mask(12)) >>  6];
    s[ 6] = base64[(v[1] & Mask(18)) >> 12];
    s[ 7] = base64[(v[1] & Mask(24)) >> 18];
    s[ 8] = base64[ v[2] & Mask( 6)];
    s[ 9] = base64[(v[2] & Mask(12)) >>  6];
    s[10] = base64[(v[2] & Mask(18)) >> 12];
    s[11] = base64[(v[2] & Mask(24)) >> 18];
    s[12] = base64[ v[3] & Mask( 6)];
    s[13] = base64[(v[3] & Mask(12)) >>  6];
    s[14] = base64[(v[3] & Mask(18)) >> 12];
    s[15] = base64[(v[3] & Mask(24)) >> 18];
    (void) e;
}

// Assembly:
movl (%rdi), %ecx
andl $0x3f, %ecx
leaq 0xdfa(%rip), %rax       # 0x7010
movb (%rcx,%rax), %cl
movb %cl, (%rsi)
movl (%rdi), %ecx
shrl $0x6, %ecx
andl $0x3f, %ecx
movb (%rcx,%rax), %cl
movb %cl, 0x1(%rsi)
movl (%rdi), %ecx
shrl $0xc, %ecx
andl $0x3f, %ecx
movb (%rcx,%rax), %cl
movb %cl, 0x2(%rsi)
movl (%rdi), %ecx
shrl $0x12, %ecx
andl $0x3f, %ecx
movb (%rcx,%rax), %cl
movb %cl, 0x3(%rsi)
movl 0x4(%rdi), %ecx
andl $0x3f, %ecx
movb (%rcx,%rax), %cl
movb %cl, 0x4(%rsi)
movl 0x4(%rdi), %ecx
shrl $0x6, %ecx
andl $0x3f, %ecx
movb (%rcx,%rax), %cl
movb %cl, 0x5(%rsi)
movl 0x4(%rdi), %ecx
shrl $0xc, %ecx
andl $0x3f, %ecx
movb (%rcx,%rax), %cl
movb %cl, 0x6(%rsi)
movl 0x4(%rdi), %ecx
shrl $0x12, %ecx
andl $0x3f, %ecx
movb (%rcx,%rax), %cl
movb %cl, 0x7(%rsi)
movl 0x8(%rdi), %ecx
andl $0x3f, %ecx
movb (%rcx,%rax), %cl
movb %cl, 0x8(%rsi)
movl 0x8(%rdi), %ecx
shrl $0x6, %ecx
andl $0x3f, %ecx
movb (%rcx,%rax), %cl
movb %cl, 0x9(%rsi)
movl 0x8(%rdi), %ecx
shrl $0xc, %ecx
andl $0x3f, %ecx
movb (%rcx,%rax), %cl
movb %cl, 0xa(%rsi)
movl 0x8(%rdi), %ecx
shrl $0x12, %ecx
andl $0x3f, %ecx
movb (%rcx,%rax), %cl
movb %cl, 0xb(%rsi)
movl 0xc(%rdi), %ecx
andl $0x3f, %ecx
movb (%rcx,%rax), %cl
movb %cl, 0xc(%rsi)
movl 0xc(%rdi), %ecx
shrl $0x6, %ecx
andl $0x3f, %ecx
movb (%rcx,%rax), %cl
movb %cl, 0xd(%rsi)
movl 0xc(%rdi), %ecx
shrl $0xc, %ecx
andl $0x3f, %ecx
movb (%rcx,%rax), %cl
movb %cl, 0xe(%rsi)
movl 0xc(%rdi), %ecx
shrl $0x12, %ecx
andl $0x3f, %ecx
movb (%rcx,%rax), %al
movb %al, 0xf(%rsi)
retq
// File: /workspace/github_c_makefile_star2_O2/svpv[P]rpmset/./base64pack.h
// Function: pack30x3c15
static inline void pack30x3c15(const uint32_t *v, char *s, unsigned e)
{
    s[ 0] = base64[ v[0] & Mask(6)];
    s[ 1] = base64[(v[0] & Mask(12)) >> 6];
    s[ 2] = base64[(v[0] & Mask(18)) >> 12];
    s[ 3] = base64[(v[0] & Mask(24)) >> 18];
    s[ 4] = base64[ v[1] & Mask(6)];
    s[ 5] = base64[(v[1] & Mask(12)) >> 6];
    s[ 6] = base64[(v[1] & Mask(18)) >> 12];
    s[ 7] = base64[(v[1] & Mask(24)) >> 18];
    s[ 8] = base64[ v[2] & Mask(6)];
    s[ 9] = base64[(v[2] & Mask(12)) >> 6];
    s[10] = base64[(v[2] & Mask(18)) >> 12];
    s[11] = base64[(v[2] & Mask(24)) >> 18];
    s[12] = base64[(v[0] & Mask(30)) >> 24];
    s[13] = base64[(v[1] & Mask(30)) >> 24];
    s[14] = base64[(v[2] & Mask(30)) >> 24];
    (void) e;
}

// Assembly:
movl (%rdi), %ecx
andl $0x3f, %ecx
leaq 0x4e1(%rip), %rax       # 0x7010
movb (%rcx,%rax), %cl
movb %cl, (%rsi)
movl (%rdi), %ecx
shrl $0x6, %ecx
andl $0x3f, %ecx
movb (%rcx,%rax), %cl
movb %cl, 0x1(%rsi)
movl (%rdi), %ecx
shrl $0xc, %ecx
andl $0x3f, %ecx
movb (%rcx,%rax), %cl
movb %cl, 0x2(%rsi)
movl (%rdi), %ecx
shrl $0x12, %ecx
andl $0x3f, %ecx
movb (%rcx,%rax), %cl
movb %cl, 0x3(%rsi)
movl 0x4(%rdi), %ecx
andl $0x3f, %ecx
movb (%rcx,%rax), %cl
movb %cl, 0x4(%rsi)
movl 0x4(%rdi), %ecx
shrl $0x6, %ecx
andl $0x3f, %ecx
movb (%rcx,%rax), %cl
movb %cl, 0x5(%rsi)
movl 0x4(%rdi), %ecx
shrl $0xc, %ecx
andl $0x3f, %ecx
movb (%rcx,%rax), %cl
movb %cl, 0x6(%rsi)
movl 0x4(%rdi), %ecx
shrl $0x12, %ecx
andl $0x3f, %ecx
movb (%rcx,%rax), %cl
movb %cl, 0x7(%rsi)
movl 0x8(%rdi), %ecx
andl $0x3f, %ecx
movb (%rcx,%rax), %cl
movb %cl, 0x8(%rsi)
movl 0x8(%rdi), %ecx
shrl $0x6, %ecx
andl $0x3f, %ecx
movb (%rcx,%rax), %cl
movb %cl, 0x9(%rsi)
movl 0x8(%rdi), %ecx
shrl $0xc, %ecx
andl $0x3f, %ecx
movb (%rcx,%rax), %cl
movb %cl, 0xa(%rsi)
movl 0x8(%rdi), %ecx
shrl $0x12, %ecx
andl $0x3f, %ecx
movb (%rcx,%rax), %cl
movb %cl, 0xb(%rsi)
movzbl 0x3(%rdi), %ecx
andl $0x3f, %ecx
movb (%rcx,%rax), %cl
movb %cl, 0xc(%rsi)
movzbl 0x7(%rdi), %ecx
andl $0x3f, %ecx
movb (%rcx,%rax), %cl
movb %cl, 0xd(%rsi)
movzbl 0xb(%rdi), %ecx
andl $0x3f, %ecx
movb (%rcx,%rax), %al
movb %al, 0xe(%rsi)
retq
// File: /workspace/github_c_makefile_star2_O2/svpv[P]rpmset/./base64unpack-simd.h
// Function: unpack24
static inline bool unpack24(const char *s, V32x4 *x)
{
    V32x4 lo, hi;
    *x = unpack6x(VLOAD(s), &lo, &hi);
    bool err = u6err(lo, hi);
    *x = glue12(*x);
    *x = glue24(*x);
    return !err;
}

// Assembly:
vmovdqu (%rdi), %xmm0
vpsrld $0x4, %xmm0, %xmm1
vpbroadcastb 0x18f8(%rip), %xmm2 # 0x8560
vpcmpeqb %xmm2, %xmm0, %xmm3
vpand 0x148c(%rip), %xmm1, %xmm1 # 0x8100
vpaddb %xmm3, %xmm1, %xmm3
vmovq 0x1490(%rip), %xmm4     # 0x8110
vpshufb %xmm3, %xmm4, %xmm3
vpand %xmm2, %xmm0, %xmm2
vmovdqa 0x148f(%rip), %xmm4     # 0x8120
vpshufb %xmm2, %xmm4, %xmm2
vmovdqa 0x1492(%rip), %xmm4     # 0x8130
vpshufb %xmm1, %xmm4, %xmm1
vptest %xmm1, %xmm2
vpaddb %xmm0, %xmm3, %xmm0
sete %al
vpmaddubsw 0x1298(%rip), %xmm0, %xmm0 # 0x7f50
vpmaddwd 0x12a0(%rip), %xmm0, %xmm0 # 0x7f60
vmovdqa %xmm0, (%rsi)
retq
// File: /workspace/github_c_makefile_star2_O2/dcat[P]mdphat/mdphat.c
// Function: i2c_set
__u8
i2c_set(__u8 reg, __u8 arg) {
	__u8 buf[2];

	buf[0] = reg;
	buf[1] = arg;

	return write(d, buf, 2) == 2;
}

// Assembly:
pushq %rax
leaq 0x6(%rsp), %rax
movb %dil, (%rax)
movb %sil, 0x1(%rax)
movl 0x139945(%rip), %edi    # 0x53b050
pushq $0x2
popq %rdx
movq %rax, %rsi
callq 0x448e20
cmpq $0x2, %rax
sete %al
popq %rcx
retq
// File: /workspace/github_c_makefile_star2_O2/dcat[P]mdphat/mdphat.c
// Function: i2c_get
__u8
i2c_get(__u8 reg, __u8 *ret, size_t n) {
	__u8 r;

	r = reg | 0xFF;

	if (write(d, &r, 1) <= 0)
		return 0;

	return read(d, ret, n) == n;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdx, %rbx
movq %rsi, %r14
leaq 0x7(%rsp), %rsi
movb $-0x1, (%rsi)
movl 0x139919(%rip), %edi    # 0x53b050
pushq $0x1
popq %rdx
callq 0x448e20
testq %rax, %rax
jle 0x40175d
movl 0x139906(%rip), %edi    # 0x53b050
movq %r14, %rsi
movq %rbx, %rdx
callq 0x448d80
cmpq %rbx, %rax
sete %al
jmp 0x40175f
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O2/dcat[P]mdphat/mdphat.c
// Function: printchar
void
printchar(int x, int chr) {
	int i, y, z;
	char buf[7], reg;

	reg = x % 2 ? CMD_MATRIX2 : CMD_MATRIX1;

	i2c_adr(MDH_ADR + x / 2);

	switch (chr) {
	case '\0':
	case '\n':
	case '\r':
		return;
	}

	if (x % 2) {
		/* flip */
		for (i = 0, y = 7; i < 7; i++, y--)
			buf[i] = 0;

		for (i = 0; i < 8; i++)
			for (y = 0; y < 7; y++)
				buf[i] |= font[chr][y] & (1 << i) ? 1 << y : 0;

		for (i = 0; i < 7; i++)
			i2c_set(reg + i, buf[i]);
	} else
		for (i = 0; i < 7; i++)
			i2c_set(reg + i, font[chr][i]);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x10, %rsp
movl %edi, %ebp
testb $0x1, %bpl
pushq $0x1
popq %r15
pushq $0xe
popq %r14
cmovel %r15d, %r14d
movl %esi, %ebx
pushq $0x2
popq %rcx
movl %edi, %eax
cltd
idivl %ecx
addb $0x61, %al
movzbl %al, %edi
callq 0x401767
cmpl $0xd, %ebx
ja 0x4017cc
movl $0x2401, %eax           # imm = 0x2401
btl %ebx, %eax
jae 0x4017cc
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
testb $0x1, %bpl
jne 0x401807
movslq %ebx, %rax
movzbl %r14b, %ebx
imulq $0x7, %rax, %r14
xorl %r15d, %r15d
leaq 0xc7909(%rip), %r12     # 0x4c90f0
cmpq $0x7, %r15
je 0x4017bf
leal (%rbx,%r15), %eax
leaq (%r14,%r15), %rcx
movzbl (%r12,%rcx), %esi
movzbl %al, %edi
callq 0x4016f8
incq %r15
jmp 0x4017e7
xorl %eax, %eax
cmpq $0x7, %rax
je 0x401819
movb $0x0, 0x9(%rsp,%rax)
incq %rax
jmp 0x401809
movslq %ebx, %rax
imulq $0x7, %rax, %rdx
xorl %eax, %eax
leaq 0xc78c7(%rip), %rsi     # 0x4c90f0
cmpq $0x8, %rax
je 0x401871
movl %r15d, %edi
movl %eax, %ecx
shll %cl, %edi
movb 0x9(%rsp,%rax), %r8b
xorl %ecx, %ecx
cmpq $0x7, %rcx
je 0x401867
leaq (%rdx,%rcx), %r9
movsbl (%rsi,%r9), %r9d
movl %r15d, %r10d
shll %cl, %r10d
andl %edi, %r9d
testl %r9d, %r9d
cmovel %r9d, %r10d
orb %r8b, %r10b
incq %rcx
movl %r10d, %r8d
jmp 0x40183d
movb %r8b, 0x9(%rsp,%rax)
incq %rax
jmp 0x401829
movzbl %r14b, %ebx
xorl %r14d, %r14d
cmpq $0x7, %r14
je 0x4017bf
leal (%rbx,%r14), %eax
movzbl 0x9(%rsp,%r14), %esi
movzbl %al, %edi
callq 0x4016f8
incq %r14
jmp 0x401878
// File: /workspace/github_c_makefile_star2_O2/dcat[P]mdphat/mdphat.c
// Function: printstring
void
printstring(char *str) {
	int x = 0;
	char *p = str;

	while (*p) {
		printchar(x++, *p++);

		if (x > 5)
			return;
	}
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
xorl %r14d, %r14d
movsbl (%rbx,%r14), %esi
testl %esi, %esi
je 0x4018bd
movl %r14d, %edi
callq 0x40177e
incq %r14
cmpl $0x6, %r14d
jne 0x4018a3
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O2/dcat[P]mdphat/mdphat.c
// Function: i2c_set_all
void
i2c_set_all(__u8 reg, __u8 val) {
	int i;

	for (i = 0; i < 3; i++) {
		i2c_adr(MDH_ADR + i);
		i2c_set(reg, val);
	}
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
pushq $-0x3
popq %r14
movzbl %dil, %ebx
movzbl %sil, %ebp
testl %r14d, %r14d
je 0x4018f4
leal 0x64(%r14), %eax
movzbl %al, %edi
callq 0x401767
movl %ebx, %edi
movl %ebp, %esi
callq 0x4016f8
incl %r14d
jmp 0x4018d5
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/dcat[P]mdphat/mdphat.c
// Function: main
int
main(int argc, char **argv) {
	int i;
	int rflag = 0;
	int hflag = 0;
	int iflag = 0;
	char *argv0;
	char line[8];

	d = open(I2C_DEV, O_RDWR);
	if (d < 0)
		err(1, "open '%s'", I2C_DEV);

	reset();
	i2c_set_all(CMD_MODE, DEFAULT_MODE);

	ARGBEGIN {
	case 'r':
		rflag = 1;
		break;
	case 'h':
		hflag = 1;
		break;
	case 'i':
		iflag = 1;
		break;
	case 'b':
		brightness(atoi(ARGF()));
		break;
	} ARGEND

	if (!iflag) {
		while (*argv)
			printstring(*argv++);
	} else {
		while (fgets(line, 8, stdin)) {
			clear();
			printstring(line);
			update();
		}
	}

	update();

	if (hflag) {
		getchar();
		rflag = 1;
	}

	if (rflag)
		reset();

	close(d);
	return 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rsi, %rbx
leaq 0x976b0(%rip), %rdi     # 0x499004
pushq $0x2
popq %rsi
xorl %eax, %eax
callq 0x448c50
movl %eax, 0x1396ec(%rip)    # 0x53b050
testl %eax, %eax
js 0x401afb
movl $0x0, 0xc(%rsp)
callq 0x401903
pushq $0x18
popq %rsi
xorl %edi, %edi
callq 0x4018c5
pushq $0x8
popq %r15
pushq $0x1
popq %r13
movl $0x0, 0x8(%rsp)
xorl %ebp, %ebp
leaq 0x8(%rbx), %r14
movq 0x8(%rbx), %rdi
testq %rdi, %rdi
je 0x401a6c
movb 0x1(%rdi), %al
testb %al, %al
je 0x401a6c
cmpb $0x2d, (%rdi)
jne 0x401a6c
cmpb $0x2d, %al
jne 0x4019c8
cmpb $0x0, 0x2(%rdi)
je 0x401a65
incq %rdi
movq %rdi, 0x8(%rbx)
xorl %r14d, %r14d
movq %r15, %r12
leaq (%rbx,%r12), %rax
movb (%rdi), %dl
movzbl %dl, %ecx
cmpq $0x8, %r12
jne 0x401a5d
testl %r14d, %r14d
jne 0x401a5d
testb %dl, %dl
je 0x401a5d
cmpl $0x62, %ecx
je 0x401a25
xorl %r14d, %r14d
cmpl $0x68, %ecx
je 0x401a0b
cmpl $0x69, %ecx
je 0x401a12
cmpl $0x72, %ecx
jne 0x401a15
movl %r13d, 0xc(%rsp)
jmp 0x401a15
movl %r13d, 0x8(%rsp)
jmp 0x401a15
movl %r13d, %ebp
movq %r15, %r12
movq (%rbx,%r12), %rdi
incq %rdi
movq %rdi, (%rbx,%r12)
jmp 0x4019d5
cmpb $0x0, 0x1(%rdi)
je 0x401a33
incq %rdi
movq %r15, %r12
jmp 0x401a42
cmpq $0x0, 0x8(%rax)
je 0x401a53
movq 0x10(%rbx), %rdi
pushq $0x10
popq %r12
movl %r13d, %r14d
callq 0x40a2f0
movl %eax, %edi
callq 0x401930
jmp 0x401a18
xorl %r14d, %r14d
movq %r15, %r12
xorl %edi, %edi
jmp 0x401a45
movq %rax, %rbx
jmp 0x401995
addq $0x10, %rbx
movq %rbx, %r14
testl %ebp, %ebp
je 0x401aaa
movq $0x539458, %r14         # imm = 0x539458
leaq 0x10(%rsp), %rbx
pushq $0x8
popq %rbp
movl 0x8(%rsp), %r15d
movq (%r14), %rdx
movq %rbx, %rdi
movl %ebp, %esi
callq 0x40c840
testq %rax, %rax
je 0x401ac2
callq 0x40190f
movq %rbx, %rdi
callq 0x401899
callq 0x4018f9
jmp 0x401a84
movl 0x8(%rsp), %r15d
movq (%r14), %rdi
testq %rdi, %rdi
je 0x401ac2
addq $0x8, %r14
callq 0x401899
jmp 0x401aaf
callq 0x4018f9
testl %r15d, %r15d
je 0x401ad3
callq 0x40ed00
jmp 0x401ada
cmpl $0x0, 0xc(%rsp)
je 0x401adf
callq 0x401903
movl 0x13956b(%rip), %edi    # 0x53b050
callq 0x448ef0
xorl %eax, %eax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x9750d(%rip), %rsi     # 0x49900f
leaq 0x974fb(%rip), %rdx     # 0x499004
pushq $0x1
popq %rdi
xorl %eax, %eax
callq 0x44b1e0
nopw %cs:(%rax,%rax)
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O2/giometti[P]mastering_UNIX_programming/chapter_09/setjmp2.c
// Function: main
int main(int argc, char *argv[])
{
	jmp_buf env;
	int ret;

	ret = func1("foo", env);
	if (ret)
		return -1;

	func2(3, env);

	return 0;
}

// Assembly:
subq $0xc8, %rsp
leaq 0xe52(%rip), %rdi       # 0x2049
movq %rsp, %rsi
callq 0x116c
testl %eax, %eax
je 0x120e
pushq $-0x1
popq %rax
addq $0xc8, %rsp
retq
pushq $0x3
popq %rdi
movq %rsp, %rsi
callq 0x11bb
// File: /workspace/github_c_makefile_star2_O2/pipde[P]deos-songlib/utils/reverb2/reverb2.c
// Function: getCombs
static int
getCombs(int in)
    {
    int i;
    int middle = 0;
    for (i = 0; i < COMBS; ++i)
        middle += getLPC(early[i],in);
    return middle;
    }

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movl %edi, %ebx
xorl %r15d, %r15d
leaq 0xbd30(%rip), %r12      # 0xe4e0
xorl %r14d, %r14d
cmpq $0x30, %r15
je 0x27cd
movq (%r15,%r12), %rdi
movl %ebx, %esi
callq 0x8561
addl %eax, %r14d
addq $0x8, %r15
jmp 0x27b3
movl %r14d, %eax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O2/pipde[P]deos-songlib/lib/songlib.c
// Function: interp2
int
interp2(int *data,int length,double t)
    {
    int x;
    double mu;
    double mu2;

    if (t >= length) return data[length - 1];

    x = (int) t;
    mu = t - x;
    mu2 = (1-cos(mu*3.14159))/2;
    return(data[x]*(1-mu2)+data[x+1]*mu2);
    }

// Assembly:
pushq %rbp
pushq %rbx
pushq %rax
movq %rdi, %rbx
cvtsi2sd %esi, %xmm1
ucomisd %xmm1, %xmm0
jae 0x287c
cvttsd2si %xmm0, %ebp
cvttpd2dq %xmm0, %xmm1
cvtdq2pd %xmm1, %xmm1
subsd %xmm1, %xmm0
mulsd 0x6a1d(%rip), %xmm0     # 0x9258
callq 0x2170
movsd 0x6a18(%rip), %xmm1     # 0x9260
movapd %xmm1, %xmm2
subsd %xmm0, %xmm2
mulsd 0x6a10(%rip), %xmm2     # 0x9268
movslq %ebp, %rax
cvtsi2sdl (%rbx,%rax,4), %xmm0
subsd %xmm2, %xmm1
mulsd %xmm0, %xmm1
cvtsi2sdl 0x4(%rbx,%rax,4), %xmm0
mulsd %xmm2, %xmm0
addsd %xmm1, %xmm0
cvttsd2si %xmm0, %eax
jmp 0x2883
movslq %esi, %rax
movl -0x4(%rbx,%rax,4), %eax
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/pipde[P]deos-songlib/lib/songlib.c
// Function: openOutput
void
openOutput(char *fn,int sr,int bps)
    {
    if (closed == 0)
        Fatal("attempt to open output wave when "
                "previous has not yet been closed\n");

    if (sr > 0) SampleRate = sr;
    if (bps > 0) bitsPerSample = bps;

    fprintf(stderr,"sampleRate is %d\n",SampleRate);
    fprintf(stderr,"bits per sample is %d\n",bitsPerSample);

    outputName = fn;
    output = newRRA(SampleRate,bitsPerSample,1,OUTPUT_LENGTH);

    clearRRAData(output);

    location = 0;
    maxLocation = 0;

    closed = 0;
    }

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movl %edx, %ebp
movl %esi, %r14d
movq %rdi, %rbx
cmpl $0x0, 0xbb97(%rip)      # 0xe434
jne 0x28ad
leaq 0x6aa4(%rip), %rdi      # 0x934a
xorl %eax, %eax
callq 0x6378
testl %r14d, %r14d
jle 0x28b9
movl %r14d, 0xbb77(%rip)     # 0xe430
testl %ebp, %ebp
jle 0x28c3
movl %ebp, 0xbb75(%rip)      # 0xe438
movq 0xb72e(%rip), %r14      # 0xdff8
movq (%r14), %rdi
movl 0xbb5d(%rip), %edx      # 0xe430
leaq 0x6ab3(%rip), %rsi      # 0x938d
xorl %eax, %eax
callq 0x21d0
movq (%r14), %rdi
movl 0xbb4e(%rip), %edx      # 0xe438
leaq 0x6aae(%rip), %rsi      # 0x939f
xorl %eax, %eax
callq 0x21d0
movq %rbx, 0x1b3f9(%rip)     # 0x1dcf8
movl 0xbb2b(%rip), %edi      # 0xe430
movl 0xbb2d(%rip), %esi      # 0xe438
pushq $0x1
popq %rdx
movl $0x186a0, %ecx          # imm = 0x186A0
callq 0x6670
movq %rax, 0x1b3e1(%rip)     # 0x1dd00
movq %rax, %rdi
callq 0x6727
andq $0x0, 0x1b3d9(%rip)     # 0x1dd08
andl $0x0, 0x1b3da(%rip)     # 0x1dd10
andl $0x0, 0xbaf7(%rip)      # 0xe434
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/pipde[P]deos-songlib/lib/songlib.c
// Function: readScale
int
readScale(char *dirName,char *baseName)
    {
    int inst = InstrumentCount;

    ++InstrumentCount;

    if (InstrumentCount >= INSTRUMENTS)
        Fatal("readScale: too many instruments, the max is %d\n",INSTRUMENTS);

    InstrumentDir[inst] = strdup(dirName);
    InstrumentBase[inst] = strdup(baseName);

    pitchShift[inst] = 0;

    return inst;
    }

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rsi, %r14
movq %rdi, %r15
movslq 0x1b3c0(%rip), %rbx     # 0x1dd14
leal 0x1(%rbx), %eax
movl %eax, 0x1b3b7(%rip)     # 0x1dd14
cmpq $0x27, %rbx
jl 0x2974
leaq 0x6a4c(%rip), %rdi      # 0x93b6
pushq $0x28
popq %rsi
xorl %eax, %eax
callq 0x6378
movq %r15, %rdi
callq 0x22d0
leaq 0x1b39d(%rip), %rcx     # 0x1dd20
movq %rax, (%rcx,%rbx,8)
movq %r14, %rdi
callq 0x22d0
leaq 0x1b4ca(%rip), %rcx     # 0x1de60
movq %rax, (%rcx,%rbx,8)
leaq 0x1b5ff(%rip), %rax     # 0x1dfa0
andl $0x0, (%rax,%rbx,4)
movl %ebx, %eax
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/pipde[P]deos-songlib/lib/songlib.c
// Function: readStrings
int *
readStrings(char *dirName, char *baseName, int strings)
    {
    int i = 0;
    int *result = malloc((strings+1)*sizeof(int));
    if (result == 0)
        {
        fprintf(stderr, "Out of memory\n");
        exit(1);
        }
    for (i = 0; i < (strings + 1); ++i)
        {
        char newBase[512];
        snprintf(newBase, sizeof(newBase), "%s%d_", baseName, i);
        result[i] = readScale(dirName, newBase);
        }
    return result;
    }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x208, %rsp            # imm = 0x208
movq %rsi, %rbx
movq %rdi, %r14
movslq %edx, %r12
leaq 0x4(,%r12,4), %rdi
callq 0x2220
testq %rax, %rax
je 0x2a2b
movq %rax, %r15
movq %rsp, %r13
xorl %ebp, %ebp
cmpq %r12, %rbp
jg 0x2a16
movl $0x200, %esi            # imm = 0x200
movq %r13, %rdi
leaq 0x6a00(%rip), %rdx      # 0x93f5
movq %rbx, %rcx
movl %ebp, %r8d
xorl %eax, %eax
callq 0x2100
movq %r14, %rdi
movq %r13, %rsi
callq 0x2942
movl %eax, (%r15,%rbp,4)
incq %rbp
jmp 0x29e1
movq %r15, %rax
addq $0x208, %rsp            # imm = 0x208
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq 0xb5c6(%rip), %rax      # 0xdff8
movq (%rax), %rcx
leaq 0x69aa(%rip), %rdi      # 0x93e6
pushq $0xe
popq %rsi
pushq $0x1
popq %rdx
callq 0x22c0
pushq $0x1
popq %rdi
callq 0x22b0
// File: /workspace/github_c_makefile_star2_O2/pipde[P]deos-songlib/lib/songlib.c
// Function: rdrone
void
rdrone(double beats,RRA *h,double length)
    {
    dTrace("entering\n");

    while (beats > 1.5 * length)
        {
        dplay(1.5 * length,h->data[0],h->samples,h->bitsPerSample);
        //attack = 1 - sustain;
        backwards(length / 2);
        beats = beats - length;
        }

    dplay(beats,h->data[0],h->samples,h->bitsPerSample);
    }

// Assembly:
pushq %rbx
subq $0x20, %rsp
movq %rdi, %rbx
movsd 0x67b2(%rip), %xmm2     # 0x9270
mulsd %xmm1, %xmm2
movsd 0x679e(%rip), %xmm3     # 0x9268
movsd %xmm1, 0x10(%rsp)
mulsd %xmm1, %xmm3
movsd %xmm3, (%rsp)
movsd %xmm2, 0x8(%rsp)
ucomisd %xmm2, %xmm0
movq 0x18(%rbx), %rax
movq (%rax), %rdi
movl 0x8(%rbx), %edx
movl 0xc(%rbx), %esi
jbe 0x2b1f
movsd %xmm0, 0x18(%rsp)
movapd %xmm2, %xmm0
callq 0x2e63
movsd (%rsp), %xmm0
callq 0x32ff
movsd 0x8(%rsp), %xmm2
movsd 0x18(%rsp), %xmm0
subsd 0x10(%rsp), %xmm0
jmp 0x2adf
addq $0x20, %rsp
popq %rbx
jmp 0x2e63
// File: /workspace/github_c_makefile_star2_O2/pipde[P]deos-songlib/lib/songlib.c
// Function: snplay
void
snplay(double beats,int inst,int offset)
    {
    RRA *h;
    int spot;

    dTrace("entering\n");

    h = getNumberedNote(inst,offset);

    spot = getLocation();
    dplay(samplesToBeats(h->samples),h->data[0],h->samples,h->bitsPerSample);
    setLocation(spot + beatsToSamples(beats));
    }

// Assembly:
subq $0x28, %rsp
movsd %xmm0, 0x8(%rsp)
callq 0x2c35
movl 0xc(%rax), %esi
cvtsi2sd %esi, %xmm0
cvtsi2sdl 0xb8d5(%rip), %xmm1 # 0xe430
divsd %xmm1, %xmm0
divsd 0x6711(%rip), %xmm0     # 0x9278
mulsd 0xb941(%rip), %xmm0     # 0xe4b0
movl 0x8(%rax), %edx
movq 0x18(%rax), %rax
movq (%rax), %rdi
movsd 0x1b187(%rip), %xmm1    # 0x1dd08
movaps %xmm1, 0x10(%rsp)
callq 0x2e63
cvttpd2dq 0x10(%rsp), %xmm0
cvtdq2pd %xmm0, %xmm0
movsd 0x8(%rsp), %xmm1
mulsd 0x66d5(%rip), %xmm1     # 0x9278
divsd 0xb905(%rip), %xmm1     # 0xe4b0
movapd %xmm1, %xmm2
cvtsi2sdl 0xb879(%rip), %xmm1 # 0xe430
mulsd %xmm2, %xmm1
addsd %xmm0, %xmm1
cvttsd2si %xmm1, %edi
addq $0x28, %rsp
jmp 0x3331
// File: /workspace/github_c_makefile_star2_O2/pipde[P]deos-songlib/lib/songlib.c
// Function: nplay
void
_nplay(double beats,int inst,int offset)
    {
    RRA *h;
 
    dTrace("entering\n");

    // if style is SWING,
    //swing beats are pulled longer and shorter, alternately

    if (style == SWING && swingBeat == beats)
        {
        if (swingDown) beats = beats * 4 / 3;
        else beats = beats *2 / 3;
        swingDown = !swingDown;
        }

    h = getNumberedNote(inst,offset);
    dplay(beats,h->data[0],h->samples,h->bitsPerSample);
    }

// Assembly:
pushq %rax
cmpl $0x1, 0xb970(%rip)      # 0xe544
jne 0x2c13
movsd 0xb832(%rip), %xmm1     # 0xe410
ucomisd %xmm0, %xmm1
jne 0x2c13
jp 0x2c13
xorl %eax, %eax
cmpl $0x0, 0xb829(%rip)      # 0xe418
sete %al
leaq 0x6707(%rip), %rcx      # 0x9300
mulsd (%rcx,%rax,8), %xmm0
divsd 0x667a(%rip), %xmm0     # 0x9280
movsd %xmm0, (%rsp)
movl %eax, 0xb807(%rip)      # 0xe418
jmp 0x2c18
movsd %xmm0, (%rsp)
callq 0x2c35
movq 0x18(%rax), %rcx
movq (%rcx), %rdi
movl 0x8(%rax), %edx
movl 0xc(%rax), %esi
movsd (%rsp), %xmm0
popq %rax
jmp 0x2e63
// File: /workspace/github_c_makefile_star2_O2/pipde[P]deos-songlib/lib/songlib.c
// Function: setLocation
int
setLocation(int future)
    {
    int old = location;

    location = future;

    if (location > maxLocation)
        {
        while (location >= output->samples)
            growOutput();
        maxLocation = location;
        }

    if (location < 0)
        {
        //printf("attempt to rewind to a negative index, "
        //       "setting index to zero\n");
        location = 0;
        }

    return old;
    }

// Assembly:
movsd 0x1a9cf(%rip), %xmm2    # 0x1dd08
cvtsi2sd %edi, %xmm0
movsd %xmm0, 0x1a9c3(%rip)    # 0x1dd08
cvtsi2sdl 0x1a9c3(%rip), %xmm1 # 0x1dd10
ucomisd %xmm1, %xmm0
jbe 0x338d
pushq %rax
movsd %xmm2, (%rsp)
movq 0x1a9a0(%rip), %rax     # 0x1dd00
cvtsi2sdl 0xc(%rax), %xmm1
ucomisd %xmm1, %xmm0
jb 0x337a
callq 0x34f7
movsd 0x1a990(%rip), %xmm0    # 0x1dd08
jmp 0x3359
cvttsd2si %xmm0, %eax
movl %eax, 0x1a98c(%rip)     # 0x1dd10
movsd (%rsp), %xmm2
addq $0x8, %rsp
xorpd %xmm1, %xmm1
ucomisd %xmm0, %xmm1
jbe 0x339f
andq $0x0, 0x1a969(%rip)     # 0x1dd08
cvttsd2si %xmm2, %eax
retq
// File: /workspace/github_c_makefile_star2_O2/pipde[P]deos-songlib/lib/songlib.c
// Function: oneshot
void
oneshot(int *data,int length, int bps)
    {
    int i;
    double  bpsFactor;

    dTrace("entering\n");
    //printf("playing oneshot note at %f\n",location - spaces);

    bpsFactor = pow(2,bitsPerSample) / pow(2,bps);

    if (length <= 0) return;

    while (location + length >= output->samples)
        growOutput();

    /* write out all the data */

    for (i = 0; i < length; ++i)
        {
        output->data[0][(int)location] +=
            data[i] * amplitude * bpsFactor;
        location += 1;
        }

    if (location > maxLocation) maxLocation = location;
    }

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
subq $0x10, %rsp
movl %edx, %r14d
movl %esi, %ebp
movq %rdi, %rbx
cvtsi2sdl 0xb04a(%rip), %xmm0 # 0xe438
callq 0x2030
movsd %xmm0, (%rsp)
movsd 0x5e60(%rip), %xmm0     # 0x9260
movl %r14d, %edi
callq 0x2060
testl %ebp, %ebp
jle 0x34c5
movsd (%rsp), %xmm4
divsd %xmm0, %xmm4
cvtsi2sd %ebp, %xmm0
movsd %xmm0, 0x8(%rsp)
movsd %xmm4, (%rsp)
movsd 0x1a8d8(%rip), %xmm0    # 0x1dd08
movapd %xmm0, %xmm1
addsd 0x8(%rsp), %xmm1
movq 0x1a8bf(%rip), %rcx     # 0x1dd00
cvtsi2sdl 0xc(%rcx), %xmm2
ucomisd %xmm2, %xmm1
jb 0x3458
callq 0x34f7
movsd (%rsp), %xmm4
jmp 0x3428
movsd 0xb008(%rip), %xmm1     # 0xe468
movl %ebp, %eax
movq 0x18(%rcx), %rcx
movq (%rcx), %rcx
xorl %edx, %edx
movsd 0x5ded(%rip), %xmm5     # 0x9260
cmpq %rdx, %rax
je 0x34a5
cvtsi2sdl (%rbx,%rdx,4), %xmm2
cvttsd2si %xmm0, %esi
mulsd %xmm1, %xmm2
movslq %esi, %rsi
cvtsi2sdl (%rcx,%rsi,4), %xmm3
mulsd %xmm4, %xmm2
addsd %xmm2, %xmm3
cvttsd2si %xmm3, %edi
movl %edi, (%rcx,%rsi,4)
addsd %xmm5, %xmm0
incq %rdx
jmp 0x3473
movsd %xmm0, 0x1a85b(%rip)    # 0x1dd08
cvtsi2sdl 0x1a85b(%rip), %xmm1 # 0x1dd10
ucomisd %xmm1, %xmm0
jbe 0x34c5
cvttsd2si %xmm0, %eax
movl %eax, 0x1a84b(%rip)     # 0x1dd10
addq $0x10, %rsp
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/pipde[P]deos-songlib/lib/songlib.c
// Function: samplesToMeasures
double
samplesToBeats(double samples)
    {
    return samples
           / (double) SampleRate
           / 60.0
           * beatsPerMinute;
    }

// Assembly:
cvtsi2sdl 0xaf5a(%rip), %xmm1 # 0xe430
divsd %xmm1, %xmm0
divsd 0x5d96(%rip), %xmm0     # 0x9278
mulsd 0xafc6(%rip), %xmm0     # 0xe4b0
cvtsi2sdl 0xaf5e(%rip), %xmm1 # 0xe450
divsd %xmm1, %xmm0
retq
// File: /workspace/github_c_makefile_star2_O2/pipde[P]deos-songlib/lib/songlib.c
// Function: growOutput
static void
growOutput()
    {
    int i;
    int samples = output->samples;

    growRRA(output);

    for (i = samples; i < output->samples; ++i)
        output->data[0][i] = 0;
    }

// Assembly:
pushq %rbx
movq 0x1a801(%rip), %rdi     # 0x1dd00
movslq 0xc(%rdi), %rbx
callq 0x73a1
movq 0x1a7f1(%rip), %rax     # 0x1dd00
movslq 0xc(%rax), %rcx
cmpq %rcx, %rbx
jge 0x3528
movq 0x18(%rax), %rcx
movq (%rcx), %rcx
andl $0x0, (%rcx,%rbx,4)
incq %rbx
jmp 0x350f
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O2/pipde[P]deos-songlib/lib/songlib.c
// Function: chord
void
chord(double beats,int inst,int octave,int pitch,...)
    {
    int offset;
    int noteCount = 0;
    int notes[CHORD_LENGTH];
    va_list ap;

    dTrace("entering\n");;
    /* store the first absolute note */

    notes[noteCount++] = octave * 12 + pitch;

    /* extract the following pitch deltas */

    va_start(ap, pitch);

    offset = va_arg(ap,int);
    while (offset != 0)
        {
        if (offset < - OCTAVES * NOTES || offset >= OCTAVES * NOTES)
            Fatal("chord: bad offset: %d (missing zero terminator?)\n",offset);
        if (noteCount >= sizeof(notes) / sizeof(int))
            Fatal("chord: too many notes\n");
        notes[noteCount++] = notes[0]+offset;
        offset = va_arg(ap,int);
        }
    va_end(ap);

    anchord(beats,inst,notes,noteCount);
    }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x8d8, %rsp            # imm = 0x8D8
movl %edi, %ebx
movsd %xmm0, 0x18(%rsp)
leaq 0x20(%rsp), %rdi
movq %rcx, 0x18(%rdi)
movq %r8, 0x20(%rdi)
movq %r9, 0x28(%rdi)
testb %al, %al
je 0x35ac
movaps %xmm1, 0x60(%rsp)
movaps %xmm2, 0x70(%rsp)
movaps %xmm3, 0x80(%rsp)
movaps %xmm4, 0x90(%rsp)
movaps %xmm5, 0xa0(%rsp)
movaps %xmm6, 0xb0(%rsp)
movaps %xmm7, 0xc0(%rsp)
imull $0xc, %esi, %ebp
addl %edx, %ebp
movl %ebp, 0xd0(%rsp)
movabsq $0x4000000018, %rax     # imm = 0x4000000018
movq %rax, (%rsp)
leaq 0x910(%rsp), %rax
movq %rax, 0x8(%rsp)
movq %rdi, 0x10(%rsp)
pushq $0x18
popq %rcx
cmpq $0x28, %rcx
ja 0x35f1
movq %rcx, %rax
addq 0x10(%rsp), %rax
addl $0x8, %ecx
movl %ecx, (%rsp)
jmp 0x35ff
movq 0x8(%rsp), %rax
leaq 0x8(%rax), %rcx
movq %rcx, 0x8(%rsp)
pushq $0x1
popq %r14
leaq 0x5df1(%rip), %r15      # 0x93fb
leaq 0x5e1d(%rip), %r12      # 0x942e
movl (%rax), %r13d
testl %r13d, %r13d
je 0x367e
leal -0x84(%r13), %eax
cmpl $0xfffffef7, %eax       # imm = 0xFFFFFEF7
ja 0x3634
movq %r15, %rdi
movl %r13d, %esi
xorl %eax, %eax
callq 0x6378
cmpq $0x200, %r14            # imm = 0x200
jb 0x3647
movq %r12, %rdi
xorl %eax, %eax
callq 0x6378
addl %ebp, %r13d
movl %r13d, 0xd0(%rsp,%r14,4)
movl (%rsp), %ecx
cmpq $0x28, %rcx
ja 0x366b
movq %rcx, %rax
addq 0x10(%rsp), %rax
addl $0x8, %ecx
movl %ecx, (%rsp)
jmp 0x3679
movq 0x8(%rsp), %rax
leaq 0x8(%rax), %rcx
movq %rcx, 0x8(%rsp)
incq %r14
jmp 0x3611
leaq 0xd0(%rsp), %rsi
movsd 0x18(%rsp), %xmm0
movl %ebx, %edi
movl %r14d, %edx
callq 0x36a8
addq $0x8d8, %rsp            # imm = 0x8D8
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/pipde[P]deos-songlib/lib/songlib.c
// Function: achord
void
achord(double beats,int inst,int octave,int pitch,int *offsets,int length)
    {
    int i;
    int notes[CHORD_LENGTH];

    for (i = 0; i < length; ++i)
        {
        if (i >= sizeof(notes) / sizeof(int))
            Fatal("achord: too many notes\n");
        notes[i] = octave * 12 + pitch + offsets[i];
        }

    anchord(beats,inst,notes,length);
    }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x818, %rsp            # imm = 0x818
movl %r8d, %ebx
movq %rcx, %r14
movl %edi, 0x4(%rsp)
movsd %xmm0, 0x8(%rsp)
imull $0xc, %esi, %r12d
addl %edx, %r12d
testl %r8d, %r8d
movl $0x0, %r13d
cmovgl %r8d, %r13d
leaq 0x588c(%rip), %r15      # 0x942d
xorl %ebp, %ebp
cmpq %rbp, %r13
je 0x3bcb
cmpq $0x200, %rbp            # imm = 0x200
jb 0x3bbb
movq %r15, %rdi
xorl %eax, %eax
callq 0x6378
movl (%r14,%rbp,4), %eax
addl %r12d, %eax
movl %eax, 0x10(%rsp,%rbp,4)
incq %rbp
jmp 0x3ba3
leaq 0x10(%rsp), %rsi
movsd 0x8(%rsp), %xmm0
movl 0x4(%rsp), %edi
movl %ebx, %edx
callq 0x36a8
addq $0x818, %rsp            # imm = 0x818
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/pipde[P]deos-songlib/lib/songlib.c
// Function: rchord
void
rchord(double beats,...)
    {
    int noteCount;
    RRA *note;
    va_list ap;

    if (style == SWING && swingBeat == beats)
        {
        if (swingDown) beats = beats * 4 / 3;
        else beats = beats * 2 / 3;
        swingDown = !swingDown;
        }

    /* extract the arguments */

    va_start(ap, beats);

    noteCount = 0;
    note = va_arg(ap,RRA *);
    while (note != 0)
        {
        if (noteCount > 0) backwards(beats-stride);

        dplay(beats,note->data[0],note->samples,note->bitsPerSample);

        note = va_arg(ap,RRA *);

        ++noteCount;
        }

    va_end(ap);

    backwards((noteCount - 1) * stride);
    }

// Assembly:
pushq %r14
pushq %rbx
subq $0xd8, %rsp
movq %rdi, 0x20(%rsp)
movq %rsi, 0x28(%rsp)
movq %rdx, 0x30(%rsp)
movq %rcx, 0x38(%rsp)
movq %r8, 0x40(%rsp)
movq %r9, 0x48(%rsp)
testb %al, %al
je 0x3c52
movapd %xmm1, 0x60(%rsp)
movaps %xmm2, 0x70(%rsp)
movaps %xmm3, 0x80(%rsp)
movaps %xmm4, 0x90(%rsp)
movaps %xmm5, 0xa0(%rsp)
movaps %xmm6, 0xb0(%rsp)
movaps %xmm7, 0xc0(%rsp)
cmpl $0x1, 0xa8eb(%rip)      # 0xe544
jne 0x3c91
movsd 0xa7ad(%rip), %xmm1     # 0xe410
ucomisd %xmm0, %xmm1
jne 0x3c91
jp 0x3c91
xorl %eax, %eax
cmpl $0x0, 0xa7a4(%rip)      # 0xe418
sete %al
leaq 0x5682(%rip), %rcx      # 0x9300
mulsd (%rcx,%rax,8), %xmm0
divsd 0x55f5(%rip), %xmm0     # 0x9280
movl %eax, 0xa787(%rip)      # 0xe418
leaq 0x20(%rsp), %rax
movq %rax, 0x10(%rsp)
leaq 0xf0(%rsp), %rax
movq %rax, 0x8(%rsp)
movabsq $0x4000000000, %rax     # imm = 0x4000000000
movq %rax, (%rsp)
pushq $0x28
popq %rax
negq %rax
ja 0x3ccc
movq 0x10(%rsp), %rax
movl $0x8, (%rsp)
jmp 0x3cda
movq 0x8(%rsp), %rax
leaq 0x8(%rax), %rcx
movq %rcx, 0x8(%rsp)
pushq $0x1
popq %rbx
movsd %xmm0, 0x18(%rsp)
movq (%rax), %r14
testq %r14, %r14
je 0x3d48
cmpl $0x1, %ebx
je 0x3d03
subsd 0xa860(%rip), %xmm0     # 0xe558
callq 0x32ff
movsd 0x18(%rsp), %xmm0
movq 0x18(%r14), %rax
movq (%rax), %rdi
movl 0x8(%r14), %edx
movl 0xc(%r14), %esi
callq 0x2e63
movl (%rsp), %ecx
cmpq $0x28, %rcx
ja 0x3d30
movq %rcx, %rax
addq 0x10(%rsp), %rax
addl $0x8, %ecx
movl %ecx, (%rsp)
jmp 0x3d3e
movq 0x8(%rsp), %rax
leaq 0x8(%rax), %rcx
movq %rcx, 0x8(%rsp)
decl %ebx
movsd 0x18(%rsp), %xmm0
jmp 0x3ce3
negl %ebx
cvtsi2sd %ebx, %xmm0
mulsd 0xa802(%rip), %xmm0     # 0xe558
callq 0x32ff
addq $0xd8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O2/pipde[P]deos-songlib/lib/songlib.c
// Function: softer
void
softer(double factor)
    {
    if (factor == 0.0)
        {
        setAmplitude(getAmplitude() * softLoud);
        softLoud = popAmplitudeFactor();
        }
    else
        {
        setAmplitude(getAmplitude() / factor);
        softLoud = factor;
        pushAmplitudeFactor(factor);
        }
    }

// Assembly:
xorpd %xmm1, %xmm1
ucomisd %xmm1, %xmm0
movsd 0xa054(%rip), %xmm1     # 0xe468
jne 0x443b
jp 0x443b
pushq %rax
mulsd 0x9fff(%rip), %xmm1     # 0xe420
movsd %xmm1, 0xa03f(%rip)     # 0xe468
callq 0x54f7
movsd %xmm0, 0x9fea(%rip)     # 0xe420
addq $0x8, %rsp
retq
divsd %xmm0, %xmm1
movsd %xmm1, 0xa021(%rip)     # 0xe468
movsd %xmm0, 0x9fd1(%rip)     # 0xe420
movl 0x1a47b(%rip), %eax     # 0x1e8d0
cmpq $0x1fe, %rax            # imm = 0x1FE
ja 0x4472
leal 0x1(%rax), %ecx
movl %ecx, 0x1a46a(%rip)     # 0x1e8d0
leaq 0x1a473(%rip), %rcx     # 0x1e8e0
movsd %xmm0, (%rcx,%rax,8)
retq
// File: /workspace/github_c_makefile_star2_O2/pipde[P]deos-songlib/lib/songlib.c
// Function: draw
void
draw(double beats,int inst,int octave,int pitch,double length,...)
    {
    int i;
    int octaves[CHORD_LENGTH],pitches[CHORD_LENGTH];
    double lengths[CHORD_LENGTH];

    dTrace("entering\n");;

    octaves[0] = octave;
    pitches[0] = pitch;
    lengths[0] = length;

    /* extract the remaining arguments */

    va_list ap;

    va_start(ap, length);

    octave = va_arg(ap,int);
    i = 1;
    while (octave != (int) 0 && i < sizeof(octaves)/sizeof(int))
        {
        pitch = va_arg(ap,int);
        length = va_arg(ap,double);

        octaves[i] = octave;
        pitches[i] = pitch;
        lengths[i] = length;

        ++i;

        octave = va_arg(ap,int);
        }

    va_end(ap);

    adraw(beats,inst,i,octaves,pitches,lengths);
    }

// Assembly:
subq $0x20d8, %rsp           # imm = 0x20D8
leaq 0x20(%rsp), %r10
movq %rcx, 0x18(%r10)
movq %r8, 0x20(%r10)
movq %r9, 0x28(%r10)
testb %al, %al
je 0x452b
movaps %xmm2, 0x70(%rsp)
movaps %xmm3, 0x80(%rsp)
movaps %xmm4, 0x90(%rsp)
movaps %xmm5, 0xa0(%rsp)
movaps %xmm6, 0xb0(%rsp)
movaps %xmm7, 0xc0(%rsp)
movl %esi, 0x8d0(%rsp)
movl %edx, 0xd0(%rsp)
movsd %xmm1, 0x10d0(%rsp)
movq %r10, 0x10(%rsp)
leaq 0x20e0(%rsp), %rax
movq %rax, 0x8(%rsp)
movabsq $0x5000000018, %rax     # imm = 0x5000000018
movq %rax, (%rsp)
pushq $0x18
popq %rax
pushq $0x18
popq %r8
cmpq $0x28, %r8
ja 0x4584
movq 0x8(%rsp), %r9
movq 0x10(%rsp), %rcx
addq %rcx, %r8
addl $0x8, %eax
movl %eax, (%rsp)
jmp 0x4597
movq 0x8(%rsp), %r8
movq 0x10(%rsp), %rcx
leaq 0x8(%r8), %r9
movq %r9, 0x8(%rsp)
pushq $0x1
popq %rsi
movl 0x4(%rsp), %edx
movl (%r8), %r10d
testl %r10d, %r10d
je 0x4641
cmpq $0x1ff, %rsi            # imm = 0x1FF
ja 0x4641
cmpl $0x28, %eax
ja 0x45cd
movq %r9, %r11
movl %eax, %r9d
addq %rcx, %r9
addl $0x8, %eax
movl %eax, (%rsp)
jmp 0x45d6
leaq 0x8(%r9), %r11
movq %r11, 0x8(%rsp)
movl (%r9), %r9d
cmpl $0xa0, %edx
ja 0x45f3
movq %r11, %r8
movl %edx, %r11d
addq %rcx, %r11
addl $0x10, %edx
movl %edx, 0x4(%rsp)
jmp 0x45fc
leaq 0x8(%r11), %r8
movq %r8, 0x8(%rsp)
movsd (%r11), %xmm1
movl %r10d, 0x8d0(%rsp,%rsi,4)
movl %r9d, 0xd0(%rsp,%rsi,4)
movsd %xmm1, 0x10d0(%rsp,%rsi,8)
cmpl $0x28, %eax
ja 0x4630
movq %r8, %r9
movl %eax, %r8d
addq %rcx, %r8
addl $0x8, %eax
movl %eax, (%rsp)
jmp 0x4639
leaq 0x8(%r8), %r9
movq %r9, 0x8(%rsp)
incq %rsi
jmp 0x459e
leaq 0x8d0(%rsp), %rdx
leaq 0xd0(%rsp), %rcx
leaq 0x10d0(%rsp), %r8
callq 0x3d66
addq $0x20d8, %rsp           # imm = 0x20D8
retq
// File: /workspace/github_c_makefile_star2_O2/pipde[P]deos-songlib/lib/songlib.c
// Function: ndraw
void
ndraw(double beats,int inst,int note,double length,...)
    {
    int i;
    int octaves[CHORD_LENGTH],pitches[CHORD_LENGTH];
    double lengths[CHORD_LENGTH];

    dTrace("entering\n");;

    octaves[0] = note / NOTES;
    pitches[0] = note % NOTES;
    lengths[0] = length;

    /* extract the remaining arguments */

    va_list ap;

    va_start(ap, length);

    note = va_arg(ap,int);
    i = 1;
    while (note != (int) 0 && i < sizeof(octaves)/sizeof(int))
        {
        length = va_arg(ap,double);

        octaves[i] = note / NOTES;
        pitches[i] = note % NOTES;
        lengths[i] = length;

        ++i;

        note = va_arg(ap,int);
        }

    va_end(ap);

    adraw(beats,inst,i,octaves,pitches,lengths);
    }

// Assembly:
pushq %rbx
subq $0x20d0, %rsp           # imm = 0x20D0
leaq 0x20(%rsp), %r10
movq %rdx, 0x10(%r10)
movq %rcx, 0x18(%r10)
movq %r8, 0x20(%r10)
movq %r9, 0x28(%r10)
testb %al, %al
je 0x46b4
movaps %xmm2, 0x70(%rsp)
movaps %xmm3, 0x80(%rsp)
movaps %xmm4, 0x90(%rsp)
movaps %xmm5, 0xa0(%rsp)
movaps %xmm6, 0xb0(%rsp)
movaps %xmm7, 0xc0(%rsp)
pushq $0xc
popq %rcx
movl %esi, %eax
cltd
idivl %ecx
movl %eax, 0x8d0(%rsp)
movl %edx, 0xd0(%rsp)
movsd %xmm1, 0x10d0(%rsp)
movq %r10, 0x10(%rsp)
leaq 0x20e0(%rsp), %rax
movq %rax, 0x8(%rsp)
movabsq $0x5000000010, %rax     # imm = 0x5000000010
movq %rax, (%rsp)
pushq $0x10
popq %r8
pushq $0x10
popq %rax
cmpq $0x28, %rax
ja 0x4717
movq 0x8(%rsp), %r10
movq 0x10(%rsp), %r9
addq %r9, %rax
addl $0x8, %r8d
movl %r8d, (%rsp)
jmp 0x472a
movq 0x8(%rsp), %rax
movq 0x10(%rsp), %r9
leaq 0x8(%rax), %r10
movq %r10, 0x8(%rsp)
pushq $0x1
popq %rsi
movl 0x4(%rsp), %r11d
movq %r10, %rbx
movq %rax, %r10
movl (%r10), %eax
testl %eax, %eax
je 0x47b6
cmpq $0x1ff, %rsi            # imm = 0x1FF
ja 0x47b6
cmpl $0xa0, %r11d
ja 0x4765
movq %rbx, %r10
movl %r11d, %ebx
addq %r9, %rbx
addl $0x10, %r11d
movl %r11d, 0x4(%rsp)
jmp 0x476e
leaq 0x8(%rbx), %r10
movq %r10, 0x8(%rsp)
cltd
idivl %ecx
movsd (%rbx), %xmm1
movl %eax, 0x8d0(%rsp,%rsi,4)
movl %edx, 0xd0(%rsp,%rsi,4)
movsd %xmm1, 0x10d0(%rsp,%rsi,8)
cmpl $0x28, %r8d
jbe 0x47a0
leaq 0x8(%r10), %rbx
movq %rbx, 0x8(%rsp)
incq %rsi
jmp 0x4738
movl %r8d, %eax
addq %r9, %rax
addl $0x8, %r8d
movl %r8d, (%rsp)
incq %rsi
jmp 0x4732
leaq 0x8d0(%rsp), %rdx
leaq 0xd0(%rsp), %rcx
leaq 0x10d0(%rsp), %r8
callq 0x3d66
addq $0x20d0, %rsp           # imm = 0x20D0
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O2/pipde[P]deos-songlib/lib/songlib.c
// Function: dtrill
void
dtrill(double beats,int inst1,int inst2,int octave,int pitch,int offset,
    double initial,double tlength,int count)
    {
    int i,j;
    int octaves[CHORD_LENGTH];
    int pitches[CHORD_LENGTH];
    double lengths[CHORD_LENGTH];

    octaves[0] = octave;
    pitches[0] = pitch;
    lengths[0] = initial;

    j = 1;
    for (i = 0; j < sizeof(octaves)/sizeof(int) && i < count; ++i)
        {
        octaves[j] = octave;
        pitches[j] = pitch + offset;
        lengths[j] = tlength;
        ++j;
        octaves[j] = octave;
        pitches[j] = pitch;
        lengths[j] = tlength;
        ++j;
        }

    /*
    for (i = 0; i < 2*count+1; ++i)
        printf("[%d,%d,%f]\n",octaves[i],pitches[i],lengths[i]);
    */

    adraw(beats,inst1,2*count+1,octaves,pitches,lengths);

    backwards(beats);

    softer(2);
    play(initial,inst2,octave,pitch);

    for (i = 0; i < count-1; ++i)
        {
        play(tlength,inst2,octave,pitch+offset);
        play(tlength,inst2,octave,pitch);
        }

    play(tlength,inst2,octave,pitch+offset);
    play(beats-initial-2*tlength*(count-1)-tlength,inst2,octave,pitch);

    louder(2);
    }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x2028, %rsp           # imm = 0x2028
movl %r9d, %r15d
movl %r8d, %r12d
movl %ecx, %ebx
movl %edx, %ebp
movl %esi, %r14d
movsd %xmm0, 0x8(%rsp)
leaq 0x820(%rsp), %rdx
leaq 0x20(%rsp), %rcx
leaq 0x1020(%rsp), %r8
movl %ebp, (%rdx)
movl %ebx, (%rcx)
movsd %xmm1, 0x18(%rsp)
movsd %xmm1, (%r8)
addl %ebx, %r12d
xorl %eax, %eax
pushq $0x1
popq %rsi
cmpq $0x1ff, %rsi            # imm = 0x1FF
ja 0x48b2
cmpl %r15d, %eax
jge 0x48b2
movl %ebp, 0x820(%rsp,%rsi,4)
movl %r12d, 0x20(%rsp,%rsi,4)
movsd %xmm2, 0x1020(%rsp,%rsi,8)
movl %ebp, 0x824(%rsp,%rsi,4)
movl %ebx, 0x24(%rsp,%rsi,4)
movsd %xmm2, 0x1028(%rsp,%rsi,8)
addq $0x2, %rsi
incl %eax
jmp 0x4873
leal 0x1(,%r15,2), %esi
movsd 0x8(%rsp), %xmm0
movsd %xmm2, 0x10(%rsp)
callq 0x3d66
movsd 0x8(%rsp), %xmm0
callq 0x32ff
movsd 0x49fa(%rip), %xmm0     # 0x92d8
callq 0x4404
movsd 0x18(%rsp), %xmm0
movl %r14d, %edi
movl %ebp, %esi
movl %ebx, %edx
callq *0x9b52(%rip)           # 0xe448
decl %r15d
xorl %r13d, %r13d
testl %r15d, %r15d
cmovgl %r15d, %r13d
movsd 0x10(%rsp), %xmm0
movl %r14d, %edi
movl %ebp, %esi
movl %r12d, %edx
callq *0x9b31(%rip)           # 0xe448
movq 0x9b2a(%rip), %rax      # 0xe448
subl $0x1, %r13d
jb 0x4935
movsd 0x10(%rsp), %xmm0
movl %r14d, %edi
movl %ebp, %esi
movl %ebx, %edx
callq *%rax
jmp 0x4903
movsd 0x8(%rsp), %xmm2
subsd 0x18(%rsp), %xmm2
cvtsi2sd %r15d, %xmm1
movsd 0x4992(%rip), %xmm0     # 0x92e0
movsd 0x10(%rsp), %xmm3
mulsd %xmm3, %xmm0
mulsd %xmm1, %xmm0
addsd %xmm2, %xmm0
subsd %xmm3, %xmm0
movl %r14d, %edi
movl %ebp, %esi
movl %ebx, %edx
callq *%rax
movsd 0x4963(%rip), %xmm0     # 0x92d8
addq $0x2028, %rsp           # imm = 0x2028
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x4473
// File: /workspace/github_c_makefile_star2_O2/pipde[P]deos-songlib/lib/songlib.c
// Function: trill
void
trill(double beats,int instrument,int octave,int pitch,int offset,
    double initial,double tlength,int count)
    {
    int i,j;
    int octaves[CHORD_LENGTH];
    int pitches[CHORD_LENGTH];
    double lengths[CHORD_LENGTH];

    octaves[0] = octave;
    pitches[0] = pitch;
    lengths[0] = initial;

    j = 1;
    for (i = 0; j < sizeof(octaves)/sizeof(int) && i < count; ++i)
        {
        octaves[j] = octave;
        pitches[j] = pitch + offset;
        lengths[j] = tlength;
        ++j;
        octaves[j] = octave;
        pitches[j] = pitch;
        lengths[j] = tlength;
        ++j;
        }

    /*
    for (i = 0; i < 2*count+1; ++i)
        printf("[%d,%d,%f]\n",octaves[i],pitches[i],lengths[i]);
    */

    adraw(beats,instrument,2*count+1,octaves,pitches,lengths);
    }

// Assembly:
pushq %rbx
subq $0x2000, %rsp           # imm = 0x2000
movl %ecx, %r9d
movl %edx, %r10d
leaq 0x800(%rsp), %rdx
movq %rsp, %rcx
leaq 0x1000(%rsp), %rax
movl %esi, (%rdx)
movl %r10d, (%rcx)
movsd %xmm1, (%rax)
addl %r10d, %r9d
xorl %r11d, %r11d
pushq $0x1
popq %rbx
cmpq $0x1ff, %rbx            # imm = 0x1FF
ja 0x49fe
cmpl %r8d, %r11d
jge 0x49fe
movl %esi, 0x800(%rsp,%rbx,4)
movl %r9d, (%rsp,%rbx,4)
movsd %xmm2, 0x1000(%rsp,%rbx,8)
movl %esi, 0x804(%rsp,%rbx,4)
movl %r10d, 0x4(%rsp,%rbx,4)
movsd %xmm2, 0x1008(%rsp,%rbx,8)
addq $0x2, %rbx
incl %r11d
jmp 0x49be
leal 0x1(,%r8,2), %esi
movq %rax, %r8
callq 0x3d66
addq $0x2000, %rsp           # imm = 0x2000
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O2/pipde[P]deos-songlib/lib/songlib.c
// Function: bend
void
bend(double beats,int inst,int octave,int pitch,int offset,
    double bendLength)
    {
    setDrawRamp(getDrawRamp() * bendLength);
    resolve(beats,inst,octave,pitch+offset,0,octave,pitch);
    //rbend(beats,getNote(inst,octave,pitch),start,startLength,bendLength);
    setDrawRamp(-1); // reset to previous draw ramp
    }

// Assembly:
movl %edx, %eax
movl %esi, %edx
movl %edi, %esi
movsd 0x9a57(%rip), %xmm2     # 0xe490
mulsd %xmm2, %xmm1
xorpd %xmm3, %xmm3
ucomisd %xmm1, %xmm3
jbe 0x4a51
movsd 0x19641(%rip), %xmm1    # 0x1e090
jmp 0x4a59
movsd %xmm2, 0x19637(%rip)    # 0x1e090
pushq %rax
movsd %xmm1, 0x9a2e(%rip)     # 0xe490
cvttsd2si %xmm0, %edi
addl %eax, %ecx
cvtsi2sd %ecx, %xmm0
cvtsi2sd %eax, %xmm1
xorl %ecx, %ecx
movl %edx, %r8d
callq 0x47dc
movsd 0x1960e(%rip), %xmm0    # 0x1e090
movsd %xmm0, 0x9a06(%rip)     # 0xe490
popq %rax
retq