LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O1/ZombiesYard[P]MPU6050-DMP-raspberry-pi/libs/I2Cdev/I2Cdev.c
// Function: readBitW(unsigned char, unsigned char, unsigned char, unsigned short*)
int8_t readBitW(uint8_t devAddr, uint8_t regAddr, uint8_t bitNum, uint16_t *data) {
    uint16_t b;
    uint8_t count = readWord(devAddr, regAddr, &b);
    *data = b & (1 << bitNum);
    return count;
}

// Assembly:
pushq %rbx
movq %rcx, %rbx
leaq 0x255c(%rip), %rdi      # 0x72a6
callq 0x1110
movw $0x0, (%rbx)
xorl %eax, %eax
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O1/ZombiesYard[P]MPU6050-DMP-raspberry-pi/libs/I2Cdev/I2Cdev.c
// Function: readBits(unsigned char, unsigned char, unsigned char, unsigned char, unsigned char*)
int8_t readBits(uint8_t devAddr, uint8_t regAddr, uint8_t bitStart, uint8_t length, uint8_t *data) {
    // 01101001 read byte
    // 76543210 bit numbers
    //    xxx   args: bitStart=4, length=3
    //    010   masked
    //   -> 010 shifted
    uint8_t count, b;
    if ((count = readByte(devAddr, regAddr, &b)) != 0) {
        uint8_t mask = ((1 << length) - 1) << (bitStart - length + 1);
        b &= mask;
        b >>= (bitStart - length + 1);
        *data = b;
    }
    return count;
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
subq $0x10, %rsp
movq %r8, %rbx
movl %ecx, %r14d
movl %edx, %ebp
leaq 0xf(%rsp), %rcx
movl $0x1, %edx
callq 0x4dda
testb %al, %al
je 0x4dc0
movzbl %r14b, %ecx
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
shll %cl, %esi
notl %esi
movzbl %bpl, %edx
subl %ecx, %edx
incb %dl
movl %edx, %ecx
shll %cl, %esi
andb 0xf(%rsp), %sil
movzbl %sil, %esi
shrl %cl, %esi
movb %sil, 0xf(%rsp)
movb %sil, (%rbx)
addq $0x10, %rsp
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/ZombiesYard[P]MPU6050-DMP-raspberry-pi/libs/I2Cdev/I2Cdev.c
// Function: readBytes(unsigned char, unsigned char, unsigned char, unsigned char*)
int8_t readBytes(uint8_t devAddr, uint8_t regAddr, uint8_t length, uint8_t *data) {
    int8_t count = 0;
#ifdef DEBUG
    printf("read %#x %#x %u\n",devAddr,regAddr,length);
#endif
    int fd = open("/dev/i2c-1", O_RDWR);

    if (fd < 0) {
        fprintf(stderr, "Failed to open device: %s\n", strerror(errno));
        return(-1);
    }
    if (ioctl(fd, I2C_SLAVE, devAddr) < 0) {
        fprintf(stderr, "Failed to select device: %s\n", strerror(errno));
        close(fd);
        return(-1);
    }
    if (write(fd, &regAddr, 1) != 1) {
        fprintf(stderr, "Failed to write reg: %s\n", strerror(errno));
        close(fd);
        return(-1);
    }
    count = read(fd, data, length);
    if (count < 0) {
        fprintf(stderr, "Failed to read device(%d): %s\n", count, strerror(errno));
        close(fd);
        return(-1);
    } else if (count != length) {
        fprintf(stderr, "Short read  from device, expected %d, got %d\n", length, count);
        close(fd);
        return(-1);
    }
    close(fd);

    return count;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rcx, %r14
movl %edx, %ebp
movl %edi, %r15d
movb %sil, 0x7(%rsp)
leaq 0x2383(%rip), %rdi      # 0x7178
movl $0x2, %esi
xorl %eax, %eax
callq 0x1070
testl %eax, %eax
js 0x4e5f
movl %eax, %ebx
movzbl %r15b, %edx
movl $0x703, %esi            # imm = 0x703
movl %eax, %edi
xorl %eax, %eax
callq 0x10d0
testl %eax, %eax
js 0x4e66
leaq 0x7(%rsp), %rsi
movl $0x1, %edx
movl %ebx, %edi
callq 0x1060
cmpq $0x1, %rax
jne 0x4e6f
movzbl %bpl, %r15d
movl %ebx, %edi
movq %r14, %rsi
movq %r15, %rdx
callq 0x1100
movq %rax, %r14
movsbl %r14b, %ecx
testb %r14b, %r14b
js 0x4e78
cmpl %r15d, %ecx
jne 0x4e83
movl %ebx, %edi
callq 0x1130
jmp 0x4ea8
callq 0x120b
jmp 0x4ea5
movl %ebx, %edi
callq 0x11cd
jmp 0x4ea5
movl %ebx, %edi
callq 0x1150
jmp 0x4ea5
movl %ecx, %edi
movl %ebx, %esi
callq 0x118e
jmp 0x4ea5
movq 0x5156(%rip), %rax      # 0x9fe0
movq (%rax), %rdi
leaq 0x235f(%rip), %rsi      # 0x71f3
movl %r15d, %edx
xorl %eax, %eax
callq 0x10f0
movl %ebx, %edi
callq 0x1130
movb $-0x1, %r14b
movl %r14d, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/ZombiesYard[P]MPU6050-DMP-raspberry-pi/libs/I2Cdev/I2Cdev.c
// Function: readWords(unsigned char, unsigned char, unsigned char, unsigned short*)
int8_t readWords(uint8_t devAddr, uint8_t regAddr, uint8_t length, uint16_t *data) {
    int8_t count = 0;

    printf("ReadWords() not implemented\n");
    // Use readBytes() and potential byteswap
    *data = 0; // keep the compiler quiet

    return count;
}

// Assembly:
pushq %rbx
movq %rcx, %rbx
leaq 0x23e5(%rip), %rdi      # 0x72a6
callq 0x1110
movw $0x0, (%rbx)
xorl %eax, %eax
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O1/ZombiesYard[P]MPU6050-DMP-raspberry-pi/libs/I2Cdev/I2Cdev.c
// Function: writeBit(unsigned char, unsigned char, unsigned char, unsigned char)
int writeBit(uint8_t devAddr, uint8_t regAddr, uint8_t bitNum, uint8_t data) {
    uint8_t b;
    readByte(devAddr, regAddr, &b);
    b = (data != 0) ? (b | (1 << bitNum)) : (b & ~(1 << bitNum));
    return writeByte(devAddr, regAddr, b);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x10, %rsp
movl %ecx, %ebx
movl %edx, %ebp
movl %esi, %r14d
movl %edi, %r15d
leaq 0xe(%rsp), %r12
movl $0x1, %edx
movq %r12, %rcx
callq 0x4dda
movzbl (%r12), %eax
movl %eax, %ecx
btsl %ebp, %ecx
btrl %ebp, %eax
testl %ebx, %ebx
cmovnel %ecx, %eax
movb %al, (%r12)
leaq 0xf(%rsp), %rcx
movb %al, (%rcx)
movl %r15d, %edi
movl %r14d, %esi
movl $0x1, %edx
callq 0x5044
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/ZombiesYard[P]MPU6050-DMP-raspberry-pi/libs/I2Cdev/I2Cdev.c
// Function: writeBitW(unsigned char, unsigned char, unsigned char, unsigned short)
int writeBitW(uint8_t devAddr, uint8_t regAddr, uint8_t bitNum, uint16_t data) {
    uint16_t w;
    readWord(devAddr, regAddr, &w);
    w = (data != 0) ? (w | (1 << bitNum)) : (w & ~(1 << bitNum));
    return writeWord(devAddr, regAddr, w);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movl %ecx, %ebx
movl %edx, %ebp
movl %esi, %r14d
movl %edi, %r15d
leaq 0x2349(%rip), %rdi      # 0x72a6
callq 0x1110
movl $0x1, %eax
movl %ebp, %ecx
shll %cl, %eax
testl %ebx, %ebx
cmovel %ebx, %eax
leaq 0x6(%rsp), %rcx
movw %ax, (%rcx)
movl %r15d, %edi
movl %r14d, %esi
movl $0x1, %edx
callq 0x5137
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/ZombiesYard[P]MPU6050-DMP-raspberry-pi/libs/I2Cdev/I2Cdev.c
// Function: writeBits(unsigned char, unsigned char, unsigned char, unsigned char, unsigned char)
int writeBits(uint8_t devAddr, uint8_t regAddr, uint8_t bitStart, uint8_t length, uint8_t data) {
    //      010 value to write
    // 76543210 bit numbers
    //    xxx   args: bitStart=4, length=3
    // 00011100 mask byte
    // 10101111 original value (sample)
    // 10100011 original & ~mask
    // 10101011 masked | value
    uint8_t b;
    if (readByte(devAddr, regAddr, &b) != 0) {
        uint8_t mask = ((1 << length) - 1) << (bitStart - length + 1);
        data <<= (bitStart - length + 1); // shift data into correct position
        data &= mask; // zero all non-important bits in data
        b &= ~(mask); // zero all important bits in existing byte
        b |= data; // combine data with existing byte
        return writeByte(devAddr, regAddr, b);
    } else {
        return -1;
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x10, %rsp
movl %r8d, %r14d
movl %ecx, %r12d
movl %edx, %r15d
movl %esi, %ebx
movl %edi, %ebp
leaq 0xe(%rsp), %rcx
movl $0x1, %edx
callq 0x4dda
testb %al, %al
je 0x501e
movzbl %r12b, %ecx
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
shll %cl, %edx
notl %edx
movzbl %r15b, %eax
subl %ecx, %eax
incb %al
movzbl %r14b, %esi
andl %edx, %esi
movl %eax, %ecx
shll %cl, %edx
shll %cl, %esi
notb %dl
andb 0xe(%rsp), %dl
orb %dl, %sil
movb %sil, 0xe(%rsp)
leaq 0xf(%rsp), %rcx
movb %sil, (%rcx)
movzbl %bpl, %edi
movzbl %bl, %esi
movl $0x1, %edx
callq 0x5044
jmp 0x5023
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/ZombiesYard[P]MPU6050-DMP-raspberry-pi/libs/I2Cdev/I2Cdev.c
// Function: writeBytes(unsigned char, unsigned char, unsigned char, unsigned char*)
int writeBytes(uint8_t devAddr, uint8_t regAddr, uint8_t length, uint8_t* data) {
    int8_t count = 0;
    uint8_t buf[128];
    int fd;

#ifdef DEBUG
    printf("write %#x %#x\n",devAddr,regAddr);
#endif
    if (length > 127) {
        fprintf(stderr, "Byte write count (%d) > 127\n", length);
        return -1;
    }

    fd = open("/dev/i2c-1", O_RDWR);
    if (fd < 0) {
        fprintf(stderr, "Failed to open device: %s\n", strerror(errno));
        return -1;
    }
    if (ioctl(fd, I2C_SLAVE, devAddr) < 0) {
        fprintf(stderr, "Failed to select device: %s\n", strerror(errno));
        close(fd);
        return -1;
    }
    buf[0] = regAddr;
    memcpy(buf+1,data,length);
    count = write(fd, buf, length+1);
    if (count < 0) {
        fprintf(stderr, "Failed to write device(%d): %s\n", count, strerror(errno));
        close(fd);
        return -1;
    } else if (count != length+1) {
        fprintf(stderr, "Short write to device, expected %d, got %d\n", length+1, count);
        close(fd);
        return -1;
    }
    close(fd);

    return 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x80, %rsp
movl %edx, %ebx
testb %bl, %bl
js 0x50ca
movq %rcx, %r14
movl %esi, %r15d
movl %edi, %r12d
leaq 0x210f(%rip), %rdi      # 0x7178
movl $0x2, %esi
xorl %eax, %eax
callq 0x1070
testl %eax, %eax
js 0x50e6
movl %eax, %ebp
movzbl %r12b, %edx
movl $0x703, %esi            # imm = 0x703
movl %eax, %edi
xorl %eax, %eax
callq 0x10d0
testl %eax, %eax
js 0x50ed
leaq 0x1(%rsp), %rdi
movb %r15b, -0x1(%rdi)
movzbl %bl, %edx
movq %r14, %rsi
callq 0x1080
incl %ebx
movq %rsp, %rsi
movl %ebp, %edi
movq %rbx, %rdx
callq 0x1060
movsbl %al, %ecx
testl %ecx, %ecx
js 0x50f6
cmpl %ebx, %ecx
jne 0x5101
movl %ebp, %edi
callq 0x1130
xorl %eax, %eax
jmp 0x5127
movq 0x4f0f(%rip), %rax      # 0x9fe0
movq (%rax), %rdi
leaq 0x2146(%rip), %rsi      # 0x7221
movl %ebx, %edx
xorl %eax, %eax
callq 0x10f0
jmp 0x5122
callq 0x12b4
jmp 0x5122
movl %ebp, %edi
callq 0x1276
jmp 0x5122
movl %ecx, %edi
movl %ebp, %esi
callq 0x1237
jmp 0x5122
movq 0x4ed8(%rip), %rax      # 0x9fe0
movq (%rax), %rdi
leaq 0x214c(%rip), %rsi      # 0x725e
movl %ebx, %edx
xorl %eax, %eax
callq 0x10f0
movl %ebp, %edi
callq 0x1130
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
addq $0x80, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/ZombiesYard[P]MPU6050-DMP-raspberry-pi/libs/I2Cdev/I2Cdev.c
// Function: writeWords(unsigned char, unsigned char, unsigned char, unsigned short*)
int writeWords(uint8_t devAddr, uint8_t regAddr, uint8_t length, uint16_t* data) {
    int8_t count = 0;
    uint8_t buf[128];
    int i, fd;

    // Should do potential byteswap and call writeBytes() really, but that
    // messes with the callers buffer

    if (length > 63) {
        fprintf(stderr, "Word write count (%d) > 63\n", length);
        return -1;
    }

    fd = open("/dev/i2c-1", O_RDWR);
    if (fd < 0) {
        fprintf(stderr, "Failed to open device: %s\n", strerror(errno));
        return -1;
    }
    if (ioctl(fd, I2C_SLAVE, devAddr) < 0) {
        fprintf(stderr, "Failed to select device: %s\n", strerror(errno));
        close(fd);
        return -1;
    }
    buf[0] = regAddr;
    for (i = 0; i < length; i++) {
        buf[i*2+1] = data[i] >> 8;
        buf[i*2+2] = data[i];
    }
    count = write(fd, buf, length*2+1);
    if (count < 0) {
        fprintf(stderr, "Failed to write device(%d): %s\n", count, strerror(errno));
        close(fd);
        return -1;
    } else if (count != length*2+1) {
        fprintf(stderr, "Short write to device, expected %d, got %d\n", length+1, count);
        close(fd);
        return -1;
    }
    close(fd);
    return 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x80, %rsp
movl %edx, %ebx
cmpb $0x40, %bl
jae 0x51dc
movq %rcx, %r14
movl %esi, %r15d
movl %edi, %r12d
leaq 0x2017(%rip), %rdi      # 0x7178
movl $0x2, %esi
xorl %eax, %eax
callq 0x1070
testl %eax, %eax
js 0x51f8
movl %eax, %ebp
movzbl %r12b, %edx
movl $0x703, %esi            # imm = 0x703
movl %eax, %edi
xorl %eax, %eax
callq 0x10d0
testl %eax, %eax
js 0x51ff
movb %r15b, (%rsp)
testb %bl, %bl
je 0x51b0
movzbl %bl, %eax
xorl %ecx, %ecx
movzwl (%r14,%rcx,2), %edx
rolw $0x8, %dx
movw %dx, 0x1(%rsp,%rcx,2)
incq %rcx
cmpq %rcx, %rax
jne 0x519a
leal 0x1(,%rbx,2), %r14d
movq %rsp, %rsi
movl %ebp, %edi
movq %r14, %rdx
callq 0x1060
movsbl %al, %ecx
testl %ecx, %ecx
js 0x5208
cmpl %r14d, %ecx
jne 0x5213
movl %ebp, %edi
callq 0x1130
xorl %eax, %eax
jmp 0x523b
movq 0x4dfd(%rip), %rax      # 0x9fe0
movq (%rax), %rdi
leaq 0x209d(%rip), %rsi      # 0x728a
movl %ebx, %edx
xorl %eax, %eax
callq 0x10f0
jmp 0x5236
callq 0x135d
jmp 0x5236
movl %ebp, %edi
callq 0x131f
jmp 0x5236
movl %ecx, %edi
movl %ebp, %esi
callq 0x12e0
jmp 0x5236
movq 0x4dc6(%rip), %rax      # 0x9fe0
movq (%rax), %rdi
incl %ebx
leaq 0x2038(%rip), %rsi      # 0x725e
movl %ebx, %edx
xorl %eax, %eax
callq 0x10f0
movl %ebp, %edi
callq 0x1130
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
addq $0x80, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/antonblanchard[P]will-it-scale/main.c
// Function: new_task
void new_task(void *(func)(void *), void *arg)
{
	int pid;

	parent_pid = getpid();

	pid = fork();
	if (pid < 0) {
		perror("fork");
		exit(1);
	}

	if (!pid) {
		struct sigaction sa;

		memset(&sa, 0, sizeof(sa));
		sa.sa_handler = watchdog;
		sa.sa_flags = SA_RESTART;
		sigaction(SIGALRM, &sa, NULL);
		alarm(1);

		func(arg);
	}

	pids[nr_pids++] = pid;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x98, %rsp
movq %rsi, %r14
movq %rdi, %rbx
callq 0x20e0
movl %eax, 0x2da4(%rip)      # 0x51b0
callq 0x22b0
testl %eax, %eax
js 0x2486
movl %eax, %ebp
jne 0x245e
movq %rsp, %r15
movl $0x98, %edx
movq %r15, %rdi
xorl %esi, %esi
callq 0x2150
leaq 0x59(%rip), %rax        # 0x248b
movq %rax, (%r15)
movl $0x10000000, 0x88(%r15) # imm = 0x10000000
movl $0xe, %edi
movq %r15, %rsi
xorl %edx, %edx
callq 0x20b0
movl $0x1, %edi
callq 0x2160
movq %r14, %rdi
callq *%rbx
movslq 0x6d5b(%rip), %rax      # 0x91c0
leal 0x1(%rax), %ecx
movl %ecx, 0x6d52(%rip)      # 0x91c0
leaq 0x2d4b(%rip), %rcx      # 0x51c0
movl %ebp, (%rcx,%rax,4)
addq $0x98, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
callq 0x22d0
// File: /workspace/github_c_makefile_star2_O1/antonblanchard[P]will-it-scale/main.c
// Function: new_task_affinity
void new_task_affinity(struct args *args)
{
	int pid;

	parent_pid = getpid();

	pid = fork();
	if (pid < 0) {
		perror("fork");
		exit(1);
	}

	if (!pid) {
		struct sigaction sa;

		memset(&sa, 0, sizeof(sa));
		sa.sa_handler = watchdog;
		sa.sa_flags = SA_RESTART;
		sigaction(SIGALRM, &sa, NULL);
		alarm(1);

		testcase_trampoline(args);
	}

	pids[nr_pids++] = pid;
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
subq $0xa0, %rsp
movq %rdi, %rbx
callq 0x20e0
movl %eax, 0x2ce7(%rip)      # 0x51b0
callq 0x22b0
testl %eax, %eax
js 0x257e
movl %eax, %ebp
jne 0x2558
leaq 0x8(%rsp), %r14
movl $0x98, %edx
movq %r14, %rdi
xorl %esi, %esi
callq 0x2150
leaq -0x6a(%rip), %rax       # 0x248b
movq %rax, (%r14)
movl $0x10000000, 0x88(%r14) # imm = 0x10000000
movl $0xe, %edi
movq %r14, %rsi
xorl %edx, %edx
callq 0x20b0
movl $0x1, %edi
callq 0x2160
movl 0x18(%rbx), %eax
movq %rsp, %r14
movl %eax, (%r14)
movl $0x1, 0x4(%r14)
movl $0x1, %esi
movq %r14, %rdi
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
callq 0x2210
cmpl $-0x1, %eax
jne 0x254e
callq 0x2070
cmpl $0x4, (%rax)
je 0x252d
movq 0x8(%rbx), %rdi
movq 0x10(%rbx), %rsi
callq *(%rbx)
movslq 0x6c61(%rip), %rax      # 0x91c0
leal 0x1(%rax), %ecx
movl %ecx, 0x6c58(%rip)      # 0x91c0
leaq 0x2c51(%rip), %rcx      # 0x51c0
movl %ebp, (%rcx,%rax,4)
addq $0xa0, %rsp
popq %rbx
popq %r14
popq %rbp
retq
callq 0x22e5
// File: /workspace/github_c_makefile_star2_O1/antonblanchard[P]will-it-scale/main.c
// Function: kill_tasks
static void kill_tasks(void)
{
	int i;

	for (i = 0; i < nr_pids; i++)
		kill(pids[i], SIGTERM);
	for (i = 0; i < nr_pids; i++)
		waitpid(pids[i], NULL, 0);
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
cmpl $0x0, 0x65a4(%rip)      # 0x91c0
jle 0x2c47
leaq 0x259b(%rip), %rbx      # 0x51c0
xorl %r14d, %r14d
movl (%rbx), %edi
movl $0xf, %esi
callq 0x21b0
incq %r14
movslq 0x6582(%rip), %rax      # 0x91c0
addq $0x4, %rbx
cmpq %rax, %r14
jl 0x2c28
cmpl $0x0, 0x6572(%rip)      # 0x91c0
jle 0x2c78
leaq 0x2569(%rip), %rbx      # 0x51c0
xorl %r14d, %r14d
movl (%rbx), %edi
xorl %esi, %esi
xorl %edx, %edx
callq 0x2220
incq %r14
movslq 0x6551(%rip), %rax      # 0x91c0
addq $0x4, %rbx
cmpq %rax, %r14
jl 0x2c5a
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O1/antonblanchard[P]will-it-scale/tests/writeseek2.c
// Function: testcase
void testcase(unsigned long long *iterations, unsigned long nr)
{
	char buf[BUFLEN];
	int fd = open(tmpfile, O_RDWR);

	assert(fd >= 0);

	while (1) {
		lseek(fd, 0, SEEK_SET);
		assert(write(fd, buf, BUFLEN) == BUFLEN);

		(*iterations)++;
	}
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
subq $0x1000, %rsp           # imm = 0x1000
movq %rdi, %rbx
leaq 0x245e(%rip), %rdi      # 0x5180
movl $0x2, %esi
xorl %eax, %eax
callq 0x2230
testl %eax, %eax
js 0x2d9d
movl %eax, %ebp
movl %eax, %edi
xorl %esi, %esi
xorl %edx, %edx
callq 0x2130
movq %rsp, %rsi
movl $0x1000, %edx           # imm = 0x1000
movl %ebp, %edi
callq 0x20d0
cmpq $0x1000, %rax           # imm = 0x1000
jne 0x2d7e
movq %rsp, %r14
incq (%rbx)
movl %ebp, %edi
xorl %esi, %esi
xorl %edx, %edx
callq 0x2130
movl $0x1000, %edx           # imm = 0x1000
movl %ebp, %edi
movq %r14, %rsi
callq 0x20d0
cmpq $0x1000, %rax           # imm = 0x1000
je 0x2d59
leaq 0x594(%rip), %rdi       # 0x3319
leaq 0x4f7(%rip), %rsi       # 0x3283
leaq 0x553(%rip), %rcx       # 0x32e6
movl $0x21, %edx
callq 0x2140
leaq 0x4d7(%rip), %rdi       # 0x327b
leaq 0x4d8(%rip), %rsi       # 0x3283
leaq 0x534(%rip), %rcx       # 0x32e6
movl $0x1d, %edx
callq 0x2140
// File: /workspace/github_c_makefile_star2_O1/ikbenlike[P]nngutils/src/unlink.c
// Function: main
int main(int argc, char **argv){
    if(argc > 2){
        fprintf(stderr, "%s: extra operand '%s'\n", argv[0], argv[2]);
        return 1;
    }
    else if(argc < 2){
        fprintf(stderr, "%s: missing operand\n", argv[0]);
        return 1;
    }
    else {
        if(unlink(argv[1]) == -1){
            fprintf(stderr, "%s: %s\n", argv[0], strerror(errno));
            return 1;
        }
    }
    return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movq %rsi, %rbx
cmpl $0x3, %edi
jge 0x1228
cmpl $0x2, %edi
jne 0x1232
movq 0x8(%rbx), %rdi
callq 0x1040
movl %eax, %ecx
xorl %eax, %eax
cmpl $-0x1, %ecx
je 0x123c
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
movq %rbx, %rdi
callq 0x10de
jmp 0x1244
movq %rbx, %rdi
callq 0x1080
jmp 0x1244
movq %rbx, %rdi
callq 0x10a3
movl $0x1, %eax
jmp 0x1221
// File: /workspace/github_c_makefile_star2_O1/dxwc[P]sfeed/sfeed.c
// Function: main
int
main(int argc, char *argv[])
{
	if (pledge("stdio", NULL) == -1)
		err(1, "pledge");

	if (argc > 1)
		baseurl = argv[1];

	parser.xmlattr = xmlattr;
	parser.xmlattrend = xmlattrend;
	parser.xmlattrstart = xmlattrstart;
	parser.xmlcdata = xmlcdata;
	parser.xmldata = xmldata;
	parser.xmldataentity = xmldataentity;
	parser.xmltagend = xmltagend;
	parser.xmltagstart = xmltagstart;
	parser.xmltagstartparsed = xmltagstartparsed;

	/* NOTE: getnext is defined in xml.h for inline optimization */
	xml_parse(&parser);

	return 0;
}

// Assembly:
cmpl $0x2, %edi
jl 0x22f7
movq 0x8(%rsi), %rax
movq %rax, 0x4e09(%rip)      # 0x7100
pushq %rax
leaq 0x87(%rip), %rax        # 0x2386
movq %rax, 0x4ffa(%rip)      # 0x7300
leaq 0x4ff3(%rip), %rdi      # 0x7300
leaq 0x378(%rip), %rax       # 0x268c
movq %rax, 0x4fed(%rip)      # 0x7308
leaq 0x3a6(%rip), %rax       # 0x26c8
movq %rax, 0x4fe7(%rip)      # 0x7310
leaq 0x409(%rip), %rax       # 0x2739
movq %rax, 0x4ff1(%rip)      # 0x7328
leaq 0x40c(%rip), %rax       # 0x274a
movq %rax, 0x500b(%rip)      # 0x7350
leaq 0x458(%rip), %rax       # 0x27a4
movq %rax, 0x500d(%rip)      # 0x7360
leaq 0x49c(%rip), %rax       # 0x27f6
movq %rax, 0x500f(%rip)      # 0x7370
leaq 0x6c5(%rip), %rax       # 0x2a2d
movq %rax, 0x5009(%rip)      # 0x7378
leaq 0x884(%rip), %rax       # 0x2bfa
movq %rax, 0x5003(%rip)      # 0x7380
callq 0x4065
xorl %eax, %eax
popq %rcx
retq
// File: /workspace/github_c_makefile_star2_O1/dxwc[P]sfeed/sfeed.c
// Function: xmlattrstart
static void
xmlattrstart(XMLParser *p, const char *t, size_t tl, const char *n, size_t nl)
{
	if (!ISINCONTENT(ctx) || ctx.contenttype != ContentTypeHTML)
		return;

	/* handles transforming inline XML to data */
	if (!ctx.attrcount)
		xmldata(p, " ", 1);
	ctx.attrcount++;
	xmldata(p, n, nl);
	xmldata(p, "=\"", 2);
}

// Assembly:
cmpl $0x0, 0x75b5(%rip)      # 0x9c84
je 0x2738
cmpl $0x0, 0x75b0(%rip)      # 0x9c88
jne 0x2738
cmpl $0x2, 0x75ab(%rip)      # 0x9c8c
jne 0x2738
pushq %r15
pushq %r14
pushq %rbx
movq %r8, %r14
movq %rcx, %r15
movq %rdi, %rbx
cmpl $0x0, 0x759c(%rip)      # 0x9c94
jne 0x270e
leaq 0x2967(%rip), %rsi      # 0x5068
movl $0x1, %edx
movq %rbx, %rdi
callq 0x274a
incl 0x7580(%rip)            # 0x9c94
movq %rbx, %rdi
movq %r15, %rsi
movq %r14, %rdx
callq 0x274a
leaq 0x2941(%rip), %rsi      # 0x506a
movl $0x2, %edx
movq %rbx, %rdi
popq %rbx
popq %r14
popq %r15
jmp 0x274a
retq
// File: /workspace/github_c_makefile_star2_O1/dxwc[P]sfeed/sfeed.c
// Function: xmldata
static void
xmldata(XMLParser *p, const char *s, size_t len)
{
	if (!ctx.field)
		return;

	/* add only data from <name> inside <author> tag
	 * or any other non-<author> tag */
	if (ctx.tagid != AtomTagAuthor || istag(p->tag, p->taglen, STRP("name")))
		string_append(ctx.field, s, len);
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq 0x7442(%rip), %r15      # 0x9b98
testq %r15, %r15
je 0x278b
movq %rdx, %rbx
movq %rsi, %r14
cmpl $0x16, 0x7518(%rip)     # 0x9c80
jne 0x2791
cmpq $0x4, 0x488(%rdi)
jne 0x278b
addq $0x88, %rdi
leaq 0x28eb(%rip), %rsi      # 0x506d
callq 0x2040
testl %eax, %eax
je 0x2791
popq %rbx
popq %r14
popq %r15
retq
movq %r15, %rdi
movq %r14, %rsi
movq %rbx, %rdx
popq %rbx
popq %r14
popq %r15
jmp 0x2c5b
// File: /workspace/github_c_makefile_star2_O1/dxwc[P]sfeed/sfeed.c
// Function: xmldataentity
static void
xmldataentity(XMLParser *p, const char *data, size_t datalen)
{
	char buf[16];
	ssize_t len;

	if (!ctx.field)
		return;

	/* try to translate entity, else just pass as data to
	 * xml_data_handler. */
	if ((len = xml_entitytostr(data, buf, sizeof(buf))) > 0)
		xmldata(p, buf, (size_t)len);
	else
		xmldata(p, data, datalen);
}

// Assembly:
cmpq $0x0, 0x73ec(%rip)      # 0x9b98
je 0x27f5
pushq %r15
pushq %r14
pushq %rbx
subq $0x10, %rsp
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, %rbx
movq %rsp, %rsi
movl $0x10, %edx
movq %r15, %rdi
callq 0x3ec4
testl %eax, %eax
jle 0x27de
movl %eax, %edx
movq %rsp, %rsi
movq %rbx, %rdi
jmp 0x27e7
movq %rbx, %rdi
movq %r15, %rsi
movq %r14, %rdx
callq 0x274a
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/dxwc[P]sfeed/sfeed.c
// Function: string_append
static void
string_append(String *s, const char *data, size_t len)
{
	if (!len)
		return;
	/* check if allocation is necesary, don't shrink buffer,
	 * should be more than bufsiz ofcourse. */
	if (s->len + len >= s->bufsiz)
		string_buffer_realloc(s, s->len + len + 1);
	memcpy(s->data + s->len, data, len);
	s->len += len;
	s->data[s->len] = '\0';
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
testq %rdx, %rdx
je 0x2cc9
movq %rdx, %rbx
movq %rsi, %r15
movq %rdi, %r14
movq 0x8(%rdi), %rax
addq %rdx, %rax
cmpq 0x10(%rdi), %rax
jb 0x2ca8
incq %rax
movl $0x40, %ecx
movq %rcx, %r12
addq %rcx, %rcx
cmpq %rax, %r12
jbe 0x2c86
movq (%r14), %rdi
movq %r12, %rsi
callq 0x2190
movq %rax, (%r14)
testq %rax, %rax
je 0x2cd5
movq %r12, 0x10(%r14)
movq (%r14), %rdi
addq 0x8(%r14), %rdi
movq %r15, %rsi
movq %rbx, %rdx
callq 0x2150
addq 0x8(%r14), %rbx
movq %rbx, 0x8(%r14)
movq (%r14), %rax
movb $0x0, (%rax,%rbx)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
leaq 0x2384(%rip), %rsi      # 0x5060
movl $0x1, %edi
xorl %eax, %eax
callq 0x2170
// File: /workspace/github_c_makefile_star2_O1/dxwc[P]sfeed/sfeed.c
// Function: gettag
static enum TagId
gettag(enum FeedType feedtype, const char *name, size_t namelen)
{
	FeedTag f, *r = NULL;

	f.name = (char *)name;

	switch (feedtype) {
	case FeedTypeRSS:
		r = bsearch(&f, rsstags, sizeof(rsstags) / sizeof(rsstags[0]),
		        sizeof(rsstags[0]), tagcmp);
		break;
	case FeedTypeAtom:
		r = bsearch(&f, atomtags, sizeof(atomtags) / sizeof(atomtags[0]),
		        sizeof(atomtags[0]), tagcmp);
		break;
	default:
		break;
	}

	return r ? r->id : TagUnknown;
}

// Assembly:
subq $0x18, %rsp
movq %rsi, (%rsp)
cmpl $0x2, %edi
je 0x2d12
cmpl $0x1, %edi
jne 0x2d34
leaq 0x440f(%rip), %rsi      # 0x7110
leaq -0xa2c(%rip), %r8       # 0x22dc
movq %rsp, %rdi
movl $0xb, %edx
jmp 0x2d28
leaq 0x4507(%rip), %rsi      # 0x7220
leaq -0xa44(%rip), %r8       # 0x22dc
movq %rsp, %rdi
movl $0x9, %edx
movl $0x18, %ecx
callq 0x21c0
jmp 0x2d36
xorl %eax, %eax
testq %rax, %rax
je 0x2d40
movl 0x10(%rax), %eax
jmp 0x2d42
xorl %eax, %eax
addq $0x18, %rsp
retq
// File: /workspace/github_c_makefile_star2_O1/dxwc[P]sfeed/sfeed.c
// Function: string_print_trimmed
static void
string_print_trimmed(String *s)
{
	char *p, *e;

	if (!s->data || !s->len)
		return;

	p = ltrim(s->data);
	e = rtrim(p);

	for (; *p && p != e; p++) {
		if (isspace((unsigned char)*p))
			putchar(' '); /* any whitespace to space */
		else if (!iscntrl((unsigned char)*p))
			/* ignore other control chars */
			putchar(*p);
	}
}

// Assembly:
movq %rdi, %rax
movq (%rdi), %rdi
testq %rdi, %rdi
je 0x361d
cmpq $0x0, 0x8(%rax)
je 0x361d
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
callq 0x3691
movq %rax, %rbx
movq %rax, %rdi
callq 0x36c8
movq %rax, %r14
movb (%rbx), %bpl
testb %bpl, %bpl
setne %al
cmpq %r14, %rbx
setne %cl
andb %al, %cl
cmpb $0x1, %cl
jne 0x3613
callq 0x21d0
movq %rax, %r15
incq %rbx
movq (%r15), %rax
movzbl %bpl, %ecx
movzwl (%rax,%rcx,2), %eax
movl $0x20, %edi
btl $0xd, %eax
jb 0x35fa
testb $0x2, %al
jne 0x35ff
movsbl %bpl, %edi
callq 0x2030
movb (%rbx), %bpl
testb %bpl, %bpl
je 0x3613
leaq 0x1(%rbx), %rax
cmpq %r14, %rbx
movq %rax, %rbx
jne 0x35dc
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/dxwc[P]sfeed/sfeed.c
// Function: string_print_uri
void
string_print_uri(String *s)
{
	char link[4096], *p, *e;
	int c;

	if (!s->data || !s->len)
		return;

	p = ltrim(s->data);
	e = rtrim(p);
	c = *e;
	*e = '\0';
	if (absuri(link, sizeof(link), p, baseurl) != -1)
		fputs(link, stdout);
	*e = c; /* restore */
}

// Assembly:
movq %rdi, %rax
movq (%rdi), %rdi
testq %rdi, %rdi
je 0x3690
cmpq $0x0, 0x8(%rax)
je 0x3690
pushq %rbp
pushq %r14
pushq %rbx
subq $0x1000, %rsp           # imm = 0x1000
callq 0x3691
movq %rax, %r14
movq %rax, %rdi
callq 0x36c8
movq %rax, %rbx
movb (%rax), %bpl
movb $0x0, (%rax)
movq 0x3aa5(%rip), %rcx      # 0x7100
movq %rsp, %rdi
movl $0x1000, %esi           # imm = 0x1000
movq %r14, %rdx
callq 0x39a2
cmpl $-0x1, %eax
je 0x3682
movq 0x3969(%rip), %rax      # 0x6fe0
movq (%rax), %rsi
movq %rsp, %rdi
callq 0x20c0
movb %bpl, (%rbx)
addq $0x1000, %rsp           # imm = 0x1000
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/dxwc[P]sfeed/xml.c
// Function: xml_entitytostr
int
xml_entitytostr(const char *e, char *buf, size_t bufsiz)
{
	/* doesn't start with & */
	if (e[0] != '&')
		return 0;
	/* numeric entity */
	if (e[1] == '#')
		return numericentitytostr(e + 2, buf, bufsiz);
	else /* named entity */
		return namedentitytostr(e + 1, buf, bufsiz);
}

// Assembly:
cmpb $0x26, (%rdi)
jne 0x3f16
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
cmpb $0x23, 0x1(%rdi)
jne 0x3f1d
movl $0xffffffff, %ecx       # imm = 0xFFFFFFFF
cmpq $0x5, %rdx
jb 0x4057
leaq 0x2(%r14), %r12
callq 0x2050
movq %rax, %r15
movl $0x0, (%rax)
cmpb $0x78, (%r12)
jne 0x3f75
addq $0x3, %r14
movq %rsp, %rsi
movq %r14, %rdi
movl $0x10, %edx
jmp 0x3f80
xorl %ecx, %ecx
jmp 0x4062
movl $0xffffffff, %ecx       # imm = 0xFFFFFFFF
cmpq $0x2, %rdx
jb 0x4057
incq %r14
movl $0x8, %r15d
leaq 0x2e14(%rip), %r12      # 0x6d50
movq -0x8(%r15,%r12), %rsi
movq %r14, %rdi
callq 0x2100
testl %eax, %eax
je 0x3f61
addq $0x10, %r15
cmpq $0xa8, %r15
jne 0x3f3c
xorl %ecx, %ecx
jmp 0x4057
movb (%r15,%r12), %al
movb %al, (%rbx)
movb $0x0, 0x1(%rbx)
movl $0x1, %ecx
jmp 0x4057
movq %rsp, %rsi
movq %r12, %rdi
movl $0xa, %edx
callq 0x21a0
xorl %ecx, %ecx
cmpl $0x0, (%r15)
jne 0x4057
movq (%rsp), %rdx
cmpb $0x3b, (%rdx)
setne %dl
cmpq $0x110000, %rax         # imm = 0x110000
setge %sil
orb %dl, %sil
jne 0x4057
testq %rax, %rax
je 0x3fc5
cmpq $0x7f, %rax
jg 0x3fcc
movb %al, (%rbx)
movl $0x1, %ecx
jmp 0x4051
xorl %ecx, %ecx
jmp 0x4051
movl %eax, %ecx
cmpq $0x7ff, %rax            # imm = 0x7FF
jg 0x3fef
shrl $0x6, %ecx
andb $0x1f, %cl
orb $-0x40, %cl
movb %cl, (%rbx)
andb $0x3f, %al
orb $-0x80, %al
movb %al, 0x1(%rbx)
movl $0x2, %ecx
jmp 0x4051
cmpq $0xffff, %rax           # imm = 0xFFFF
jg 0x401e
shrl $0xc, %ecx
andb $0xf, %cl
orb $-0x20, %cl
movb %cl, (%rbx)
movl %eax, %ecx
shrl $0x6, %ecx
andb $0x3f, %cl
orb $-0x80, %cl
movb %cl, 0x1(%rbx)
andb $0x3f, %al
orb $-0x80, %al
movb %al, 0x2(%rbx)
movl $0x3, %ecx
jmp 0x4051
shrl $0x12, %ecx
andb $0x7, %cl
orb $-0x10, %cl
movb %cl, (%rbx)
movl %eax, %ecx
shrl $0xc, %ecx
andb $0x3f, %cl
orb $-0x80, %cl
movb %cl, 0x1(%rbx)
movl %eax, %ecx
shrl $0x6, %ecx
andb $0x3f, %cl
orb $-0x80, %cl
movb %cl, 0x2(%rbx)
andb $0x3f, %al
orb $-0x80, %al
movb %al, 0x3(%rbx)
movl $0x4, %ecx
movl %ecx, %eax
movb $0x0, (%rbx,%rax)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
movl %ecx, %eax
retq
// File: /workspace/github_c_makefile_star2_O1/zhiyb[P]png2tlg/./stb_image.h
// Function: stbi_load
STBIDEF stbi_uc *stbi_load(char const *filename, int *x, int *y, int *comp, int req_comp)
{
   FILE *f = stbi__fopen(filename, "rb");
   unsigned char *result;
   if (!f) return stbi__errpuc("can't fopen", "Unable to open file");
   result = stbi_load_from_file(f,x,y,comp,req_comp);
   fclose(f);
   return result;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movl %r8d, %ebx
movq %rcx, %r14
movq %rdx, %r15
movq %rsi, %r12
leaq 0x15494(%rip), %rsi     # 0x17920
callq 0x21d0
testq %rax, %rax
je 0x24bd
movq %rax, %r13
movq %rax, %rdi
movq %r12, %rsi
movq %r15, %rdx
movq %r14, %rcx
movl %ebx, %r8d
callq 0x24d7
movq %rax, %rbx
movq %r13, %rdi
callq 0x2180
movq %rbx, %rax
jmp 0x24cd
leaq 0x1545f(%rip), %rax     # 0x17923
movq %rax, 0x19d5d(%rip)     # 0x1c228
xorl %eax, %eax
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/zhiyb[P]png2tlg/./stb_image.h
// Function: stbi_load_from_file
STBIDEF stbi_uc *stbi_load_from_file(FILE *f, int *x, int *y, int *comp, int req_comp)
{
   unsigned char *result;
   stbi__context s;
   stbi__start_file(&s,f);
   result = stbi__load_and_postprocess_8bit(&s,x,y,comp,req_comp);
   if (result) {
      // need to 'unget' all the characters in the IO buffer
      fseek(f, - (int) (s.img_buffer_end - s.img_buffer), SEEK_CUR);
   }
   return result;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xd8, %rsp
movl %r8d, %ebp
movq %rcx, %r14
movq %rdx, %r15
movq %rsi, %r12
movq %rdi, %rbx
leaq 0x19cc2(%rip), %rsi     # 0x1c1c0
movq %rsp, %r13
movq %r13, %rdi
movq %rbx, %rdx
callq 0x291b
movq %r13, %rdi
movq %r12, %rsi
movq %r15, %rdx
movq %r14, %rcx
movl %ebp, %r8d
callq 0x255b
movq %rax, %r14
testq %rax, %rax
je 0x2546
movl 0xb8(%rsp), %eax
subl 0xc0(%rsp), %eax
movslq %eax, %rsi
movq %rbx, %rdi
movl $0x1, %edx
callq 0x21b0
movq %r14, %rax
addq $0xd8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/zhiyb[P]png2tlg/./stb_image.h
// Function: stbi__load_and_postprocess_8bit(stbi__context*, int*, int*, int*, int)
static unsigned char *stbi__load_and_postprocess_8bit(stbi__context *s, int *x, int *y, int *comp, int req_comp)
{
   stbi__result_info ri;
   void *result = stbi__load_main(s, x, y, comp, req_comp, &ri, 8);

   if (result == NULL)
      return NULL;

   if (ri.bits_per_channel != 8) {
      STBI_ASSERT(ri.bits_per_channel == 16);
      result = stbi__convert_16_to_8((stbi__uint16 *) result, *x, *y, req_comp == 0 ? *comp : req_comp);
      ri.bits_per_channel = 8;
   }

   // @TODO: move stbi__convert_format to here

   if (stbi__vertically_flip_on_load) {
      int channels = req_comp ? req_comp : *comp;
      stbi__vertical_flip(result, *x, *y, channels * sizeof(stbi_uc));
   }

   return (unsigned char *) result;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movl %r8d, %ebx
movq %rcx, %rbp
movq %rdx, %r14
movq %rsi, %r15
movl $0x8, (%rsp)
leaq 0x1c(%rsp), %r9
callq 0x67df
testq %rax, %rax
je 0x25f1
movq %rax, %r13
movl 0x1c(%rsp), %eax
cmpl $0x8, %eax
je 0x2616
cmpl $0x10, %eax
jne 0x2648
movl (%r15), %eax
movl (%r14), %r12d
movl %ebx, %ecx
testl %ebx, %ebx
jne 0x25af
movl (%rbp), %ecx
movq %rbp, 0x10(%rsp)
imull %eax, %r12d
imull %ecx, %r12d
movslq %r12d, %rdi
callq 0x2210
testq %rax, %rax
je 0x25f6
movq %rax, %rbp
testl %r12d, %r12d
jle 0x25e7
movl %r12d, %eax
xorl %ecx, %ecx
movb 0x1(%r13,%rcx,2), %dl
movb %dl, (%rbp,%rcx)
incq %rcx
cmpq %rcx, %rax
jne 0x25d6
movq %r13, %rdi
callq 0x21e0
jmp 0x2606
xorl %r13d, %r13d
jmp 0x2636
leaq 0x154fc(%rip), %rax     # 0x17af9
movq %rax, 0x19c24(%rip)     # 0x1c228
xorl %ebp, %ebp
movl $0x8, 0x1c(%rsp)
movq %rbp, %r13
movq 0x10(%rsp), %rbp
cmpl $0x0, 0x19c13(%rip)     # 0x1c230
je 0x2636
testl %ebx, %ebx
jne 0x2626
movl (%rbp), %ebx
movl (%r15), %esi
movl (%r14), %edx
movq %r13, %rdi
movl %ebx, %ecx
callq 0x9ef5
movq %r13, %rax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x1531d(%rip), %rdi     # 0x1796c
leaq 0x15330(%rip), %rsi     # 0x17986
leaq 0x15337(%rip), %rcx     # 0x17994
movl $0x468, %edx            # imm = 0x468
callq 0x2100
// File: /workspace/github_c_makefile_star2_O1/zhiyb[P]png2tlg/./stb_image.h
// Function: stbi_load_from_file_16
STBIDEF stbi__uint16 *stbi_load_from_file_16(FILE *f, int *x, int *y, int *comp, int req_comp)
{
   stbi__uint16 *result;
   stbi__context s;
   stbi__start_file(&s,f);
   result = stbi__load_and_postprocess_16bit(&s,x,y,comp,req_comp);
   if (result) {
      // need to 'unget' all the characters in the IO buffer
      fseek(f, - (int) (s.img_buffer_end - s.img_buffer), SEEK_CUR);
   }
   return result;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xd8, %rsp
movl %r8d, %ebp
movq %rcx, %r14
movq %rdx, %r15
movq %rsi, %r12
movq %rdi, %rbx
leaq 0x19b32(%rip), %rsi     # 0x1c1c0
movq %rsp, %r13
movq %r13, %rdi
movq %rbx, %rdx
callq 0x291b
movq %r13, %rdi
movq %r12, %rsi
movq %r15, %rdx
movq %r14, %rcx
movl %ebp, %r8d
callq 0x26eb
movq %rax, %r14
testq %rax, %rax
je 0x26d6
movl 0xb8(%rsp), %eax
subl 0xc0(%rsp), %eax
movslq %eax, %rsi
movq %rbx, %rdi
movl $0x1, %edx
callq 0x21b0
movq %r14, %rax
addq $0xd8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/zhiyb[P]png2tlg/./stb_image.h
// Function: stbi__load_and_postprocess_16bit(stbi__context*, int*, int*, int*, int)
static stbi__uint16 *stbi__load_and_postprocess_16bit(stbi__context *s, int *x, int *y, int *comp, int req_comp)
{
   stbi__result_info ri;
   void *result = stbi__load_main(s, x, y, comp, req_comp, &ri, 16);

   if (result == NULL)
      return NULL;

   if (ri.bits_per_channel != 16) {
      STBI_ASSERT(ri.bits_per_channel == 8);
      result = stbi__convert_8_to_16((stbi_uc *) result, *x, *y, req_comp == 0 ? *comp : req_comp);
      ri.bits_per_channel = 16;
   }

   // @TODO: move stbi__convert_format16 to here
   // @TODO: special case RGB-to-Y (and RGBA-to-YA) for 8-bit-to-16-bit case to keep more precision

   if (stbi__vertically_flip_on_load) {
      int channels = req_comp ? req_comp : *comp;
      stbi__vertical_flip(result, *x, *y, channels * sizeof(stbi__uint16));
   }

   return (stbi__uint16 *) result;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movl %r8d, %ebx
movq %rcx, %rbp
movq %rdx, %r14
movq %rsi, %r15
movl $0x10, (%rsp)
leaq 0x1c(%rsp), %r9
callq 0x67df
testq %rax, %rax
je 0x274f
movq %rax, %r13
movl 0x1c(%rsp), %eax
cmpl $0x8, %eax
je 0x2757
cmpl $0x10, %eax
je 0x27d5
leaq 0x15b71(%rip), %rdi     # 0x182a8
leaq 0x15248(%rip), %rsi     # 0x17986
leaq 0x15b7c(%rip), %rcx     # 0x182c1
movl $0x480, %edx            # imm = 0x480
callq 0x2100
xorl %r13d, %r13d
jmp 0x27f7
movl (%r15), %eax
movl (%r14), %r12d
movl %ebx, %ecx
testl %ebx, %ebx
jne 0x2766
movl (%rbp), %ecx
movq %rbp, 0x10(%rsp)
imull %eax, %r12d
imull %ecx, %r12d
leal (%r12,%r12), %eax
movslq %eax, %rdi
callq 0x2210
testq %rax, %rax
je 0x27b5
movq %rax, %rbp
testl %r12d, %r12d
jle 0x27ab
movl %r12d, %eax
xorl %ecx, %ecx
movzbl (%r13,%rcx), %edx
movl %edx, %esi
shll $0x8, %esi
orl %edx, %esi
movw %si, (%rbp,%rcx,2)
incq %rcx
cmpq %rcx, %rax
jne 0x2791
movq %r13, %rdi
callq 0x21e0
jmp 0x27c5
leaq 0x1533d(%rip), %rax     # 0x17af9
movq %rax, 0x19a65(%rip)     # 0x1c228
xorl %ebp, %ebp
movl $0x10, 0x1c(%rsp)
movq %rbp, %r13
movq 0x10(%rsp), %rbp
cmpl $0x0, 0x19a54(%rip)     # 0x1c230
je 0x27f7
testl %ebx, %ebx
jne 0x27e5
movl (%rbp), %ebx
movl (%r15), %esi
movl (%r14), %edx
addl %ebx, %ebx
movq %r13, %rdi
movl %ebx, %ecx
callq 0x9ef5
movq %r13, %rax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/zhiyb[P]png2tlg/./stb_image.h
// Function: stbi_load_16
STBIDEF stbi_us *stbi_load_16(char const *filename, int *x, int *y, int *comp, int req_comp)
{
   FILE *f = stbi__fopen(filename, "rb");
   stbi__uint16 *result;
   if (!f) return (stbi_us *) stbi__errpuc("can't fopen", "Unable to open file");
   result = stbi_load_from_file_16(f,x,y,comp,req_comp);
   fclose(f);
   return result;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movl %r8d, %ebx
movq %rcx, %r14
movq %rdx, %r15
movq %rsi, %r12
leaq 0x150fb(%rip), %rsi     # 0x17920
callq 0x21d0
testq %rax, %rax
je 0x2856
movq %rax, %r13
movq %rax, %rdi
movq %r12, %rsi
movq %r15, %rdx
movq %r14, %rcx
movl %ebx, %r8d
callq 0x2667
movq %rax, %rbx
movq %r13, %rdi
callq 0x2180
movq %rbx, %rax
jmp 0x2866
leaq 0x150c6(%rip), %rax     # 0x17923
movq %rax, 0x199c4(%rip)     # 0x1c228
xorl %eax, %eax
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/zhiyb[P]png2tlg/./stb_image.h
// Function: stbi__start_callbacks(stbi__context*, stbi_io_callbacks*, void*)
static void stbi__start_callbacks(stbi__context *s, stbi_io_callbacks *c, void *user)
{
   s->io = *c;
   s->io_user_data = user;
   s->buflen = sizeof(s->buffer_start);
   s->read_from_callbacks = 1;
   s->img_buffer_original = s->buffer_start;
   stbi__refill_buffer(s);
   s->img_buffer_original_end = s->img_buffer_end;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq 0x10(%rsi), %rax
movq %rax, 0x20(%rdi)
movups (%rsi), %xmm0
movups %xmm0, 0x10(%rdi)
movq %rdx, 0x28(%rdi)
movabsq $0x8000000001, %rax     # imm = 0x8000000001
movq %rax, 0x30(%rdi)
leaq 0x38(%rdi), %r14
movq %r14, 0xc8(%rdi)
movq %rdx, %rdi
movq %r14, %rsi
movl $0x80, %edx
callq *0x10(%rbx)
testl %eax, %eax
je 0x2975
movq %r14, 0xb8(%rbx)
cltq
addq %r14, %rax
movq %rax, 0xc0(%rbx)
jmp 0x2992
movl $0x0, 0x30(%rbx)
movq %r14, 0xb8(%rbx)
leaq 0x39(%rbx), %rax
movq %rax, 0xc0(%rbx)
movb $0x0, 0x38(%rbx)
movq 0xc0(%rbx), %rax
movq %rax, 0xd0(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O1/zhiyb[P]png2tlg/./stb_image.h
// Function: stbi__loadf_main(stbi__context*, int*, int*, int*, int)
static float *stbi__loadf_main(stbi__context *s, int *x, int *y, int *comp, int req_comp)
{
   unsigned char *data;
   #ifndef STBI_NO_HDR
   if (stbi__hdr_test(s)) {
      stbi__result_info ri;
      float *hdr_data = stbi__hdr_load(s,x,y,comp,req_comp, &ri);
      if (hdr_data)
         stbi__float_postprocess(hdr_data,x,y,comp,req_comp);
      return hdr_data;
   }
   #endif
   data = stbi__load_and_postprocess_8bit(s, x, y, comp, req_comp);
   if (data)
      return stbi__ldr_to_hdr(data, *x, *y, req_comp ? req_comp : *comp);
   return stbi__errpf("unknown image type", "Image not of any known type, or corrupt");
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movl %r8d, %ebx
movq %rcx, %r12
movq %rdx, %r13
movq %rsi, %rbp
movq %rdi, %r14
callq 0x30f5
movq %r14, %rdi
movq %rbp, %rsi
movq %r13, %rdx
movq %r12, %rcx
movl %ebx, %r8d
testl %eax, %eax
je 0x2dfe
callq 0xb88d
movq %rax, %r14
testq %rax, %rax
je 0x2f60
cmpl $0x0, 0x19459(%rip)     # 0x1c230
je 0x2f60
testl %ebx, %ebx
jne 0x2de5
movl (%r12), %ebx
movl (%rbp), %esi
movl (%r13), %edx
shll $0x2, %ebx
movq %r14, %rdi
movl %ebx, %ecx
callq 0x9ef5
jmp 0x2f60
callq 0x255b
testq %rax, %rax
je 0x2f3e
movq %rax, %r14
movl (%rbp), %ebp
movl (%r13), %r15d
testl %ebx, %ebx
jne 0x2e1e
movl (%r12), %ebx
movl %ebp, %edi
movl %r15d, %esi
movl %ebx, %edx
callq 0x15254
testq %rax, %rax
je 0x2f47
movq %r14, 0x18(%rsp)
movq %rax, 0x20(%rsp)
movl %ebx, %eax
andl $0x1, %eax
cmpl $0x1, %eax
movl %ebx, %eax
sbbl $0x0, %eax
movl %eax, 0xc(%rsp)
imull %ebp, %r15d
movl %ebx, 0x14(%rsp)
movslq %ebx, %rdx
movl %r15d, %ebp
movl %r15d, 0x10(%rsp)
testl %r15d, %r15d
jle 0x2ef0
movl 0xc(%rsp), %r13d
leaq (,%rdx,4), %rax
movq %rax, 0x28(%rsp)
xorl %r14d, %r14d
movss 0x1417d(%rip), %xmm1    # 0x17004
movq 0x18(%rsp), %rbx
movq 0x20(%rsp), %r15
movq %rdx, 0x30(%rsp)
cmpl $0x0, 0xc(%rsp)
jle 0x2edb
xorl %r12d, %r12d
movzbl (%rbx,%r12), %eax
xorps %xmm0, %xmm0
cvtsi2ss %eax, %xmm0
divss %xmm1, %xmm0
movss 0x192f8(%rip), %xmm1    # 0x1c1b0
callq 0x2290
movss 0x1413f(%rip), %xmm1    # 0x17004
mulss 0x192e7(%rip), %xmm0    # 0x1c1b4
movss %xmm0, (%r15,%r12,4)
incq %r12
cmpq %r12, %r13
jne 0x2ea0
incq %r14
addq 0x28(%rsp), %r15
movq 0x30(%rsp), %rdx
addq %rdx, %rbx
cmpq %rbp, %r14
jne 0x2e96
cmpl $0x0, 0x10(%rsp)
setle %al
movl 0x14(%rsp), %ecx
orb %al, %cl
testb $0x1, %cl
movq 0x20(%rsp), %r14
movq 0x18(%rsp), %rdi
jne 0x2f37
movslq 0xc(%rsp), %rax
movss 0x140ea(%rip), %xmm0    # 0x17004
movzbl (%rdi,%rax), %ecx
xorps %xmm1, %xmm1
cvtsi2ss %ecx, %xmm1
divss %xmm0, %xmm1
movss %xmm1, (%r14,%rax,4)
addq %rdx, %rax
decq %rbp
jne 0x2f1a
callq 0x21e0
jmp 0x2f60
leaq 0x14aa9(%rip), %rax     # 0x179ee
jmp 0x2f56
movq %r14, %rdi
callq 0x21e0
leaq 0x14ba3(%rip), %rax     # 0x17af9
movq %rax, 0x192cb(%rip)     # 0x1c228
xorl %r14d, %r14d
movq %r14, %rax
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/zhiyb[P]png2tlg/./stb_image.h
// Function: stbi_loadf
STBIDEF float *stbi_loadf(char const *filename, int *x, int *y, int *comp, int req_comp)
{
   float *result;
   FILE *f = stbi__fopen(filename, "rb");
   if (!f) return stbi__errpf("can't fopen", "Unable to open file");
   result = stbi_loadf_from_file(f,x,y,comp,req_comp);
   fclose(f);
   return result;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xd8, %rsp
movl %r8d, %ebx
movq %rcx, %r14
movq %rdx, %r15
movq %rsi, %r13
leaq 0x14936(%rip), %rsi     # 0x17920
callq 0x21d0
testq %rax, %rax
je 0x302d
movq %rax, %r12
leaq 0x191c2(%rip), %rsi     # 0x1c1c0
movq %rsp, %rbp
movq %rbp, %rdi
movq %rax, %rdx
callq 0x291b
movq %rbp, %rdi
movq %r13, %rsi
movq %r15, %rdx
movq %r14, %rcx
movl %ebx, %r8d
callq 0x2d8a
movq %rax, %rbx
movq %r12, %rdi
callq 0x2180
jmp 0x303d
leaq 0x148ef(%rip), %rax     # 0x17923
movq %rax, 0x191ed(%rip)     # 0x1c228
xorl %ebx, %ebx
movq %rbx, %rax
addq $0xd8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/zhiyb[P]png2tlg/./stb_image.h
// Function: stbi_is_hdr_from_memory
STBIDEF int stbi_is_hdr_from_memory(stbi_uc const *buffer, int len)
{
   #ifndef STBI_NO_HDR
   stbi__context s;
   stbi__start_mem(&s,buffer,len);
   return stbi__hdr_test(&s);
   #else
   STBI_NOTUSED(buffer);
   STBI_NOTUSED(len);
   return 0;
   #endif
}

// Assembly:
subq $0xd8, %rsp
movq %rsp, %rax
movq $0x0, 0x10(%rax)
movl $0x0, 0x30(%rax)
movq %rdi, 0xc8(%rax)
movq %rdi, 0xb8(%rax)
movslq %esi, %rcx
addq %rdi, %rcx
movq %rcx, 0xd0(%rax)
movq %rcx, 0xc0(%rax)
movq %rax, %rdi
callq 0x30f5
addq $0xd8, %rsp
retq
// File: /workspace/github_c_makefile_star2_O1/zhiyb[P]png2tlg/./stb_image.h
// Function: stbi__hdr_test(stbi__context*)
static int stbi__hdr_test(stbi__context* s)
{
   int r = stbi__hdr_test_core(s, "#?RADIANCE\n");
   stbi__rewind(s);
   if(!r) {
       r = stbi__hdr_test_core(s, "#?RGBE\n");
       stbi__rewind(s);
   }
   return r;
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
leaq 0x1536c(%rip), %rsi     # 0x1846c
callq 0x1566e
movups 0xc8(%rbx), %xmm0
movups %xmm0, 0xb8(%rbx)
testl %eax, %eax
jne 0x3134
leaq 0x1535a(%rip), %rsi     # 0x18478
movq %rbx, %rdi
callq 0x1566e
movups 0xc8(%rbx), %xmm0
movups %xmm0, 0xb8(%rbx)
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O1/zhiyb[P]png2tlg/./stb_image.h
// Function: stbi_is_hdr
STBIDEF int      stbi_is_hdr          (char const *filename)
{
   FILE *f = stbi__fopen(filename, "rb");
   int result=0;
   if (f) {
      result = stbi_is_hdr_from_file(f);
      fclose(f);
   }
   return result;
}

// Assembly:
pushq %rbp
pushq %rbx
pushq %rax
leaq 0x147e0(%rip), %rsi     # 0x17920
callq 0x21d0
testq %rax, %rax
je 0x3163
movq %rax, %rbx
movq %rax, %rdi
callq 0x316c
movl %eax, %ebp
movq %rbx, %rdi
callq 0x2180
movl %ebp, %eax
jmp 0x3165
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/zhiyb[P]png2tlg/./stb_image.h
// Function: stbi_is_hdr_from_file
STBIDEF int stbi_is_hdr_from_file(FILE *f)
{
   #ifndef STBI_NO_HDR
   long pos = ftell(f);
   int res;
   stbi__context s;
   stbi__start_file(&s,f);
   res = stbi__hdr_test(&s);
   fseek(f, pos, SEEK_SET);
   return res;
   #else
   STBI_NOTUSED(f);
   return 0;
   #endif
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0xd8, %rsp
movq %rdi, %rbx
callq 0x2030
movq %rax, %r14
leaq 0x19035(%rip), %rsi     # 0x1c1c0
movq %rsp, %r15
movq %r15, %rdi
movq %rbx, %rdx
callq 0x291b
movq %r15, %rdi
callq 0x30f5
movl %eax, %ebp
movq %rbx, %rdi
movq %r14, %rsi
xorl %edx, %edx
callq 0x21b0
movl %ebp, %eax
addq $0xd8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/zhiyb[P]png2tlg/./stb_image.h
// Function: stbi_zlib_decode_malloc_guesssize
STBIDEF char *stbi_zlib_decode_malloc_guesssize(const char *buffer, int len, int initial_size, int *outlen)
{
   stbi__zbuf a;
   char *p = (char *) stbi__malloc(initial_size);
   if (p == NULL) return NULL;
   a.zbuffer = (stbi_uc *) buffer;
   a.zbuffer_end = (stbi_uc *) buffer + len;
   if (stbi__do_zlib(&a, p, initial_size, 1, 1)) {
      if (outlen) *outlen = (int) (a.zout - a.zout_start);
      return a.zout_start;
   } else {
      STBI_FREE(a.zout_start);
      return NULL;
   }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x1008, %rsp           # imm = 0x1008
movq %rcx, %rbx
movl %edx, %ebp
movl %esi, %r15d
movq %rdi, %r14
movslq %edx, %rdi
callq 0x2210
testq %rax, %rax
je 0x3298
leaq 0x8(%rsp), %rdi
movq %r14, (%rdi)
movslq %r15d, %rcx
addq %r14, %rcx
movq %rcx, 0x8(%rdi)
movq %rax, %rsi
movl %ebp, %edx
movl $0x1, %ecx
movl $0x1, %r8d
callq 0x32a8
testl %eax, %eax
je 0x328e
testq %rbx, %rbx
je 0x3287
movl 0x20(%rsp), %eax
subl 0x28(%rsp), %eax
movl %eax, (%rbx)
movq 0x28(%rsp), %rax
jmp 0x329a
movq 0x28(%rsp), %rdi
callq 0x21e0
xorl %eax, %eax
addq $0x1008, %rsp           # imm = 0x1008
popq %rbx
popq %r14
popq %r15
popq %rbp
retq