// File: /workspace/github_c_makefile_star2_O1/madler[P]pigz/pigz.c
// Function: load_read
local void load_read(void *dummy) {
    size_t len;
    ball_t err;                     // error information from throw()

    (void)dummy;

    Trace(("-- launched decompress read thread"));
    try {
        do {
            possess(g.load_state);
            wait_for(g.load_state, NOT_TO_BE, 0);
            if (peek_lock(g.load_state) > 1) {
                release(g.load_state);
                break;
            }
            g.in_len = len = readn(g.ind, g.in_which ? g.in_buf : g.in_buf2,
                                   BUF);
            Trace(("-- decompress read thread read %lu bytes", len));
            twist(g.load_state, TO, 0);
        } while (len == BUF);
    }
    catch (err) {
        THREADABORT(err);
    }
    Trace(("-- exited decompress read thread"));
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xf8, %rsp
movl $0x1, 0xc(%rsp)
xorl %eax, %eax
leaq 0x10(%rsp), %rbx
movq %rax, 0xc8(%rbx)
movl $0x0, 0xd0(%rbx)
movq %rax, 0xd8(%rbx)
callq 0xe508
leaq 0x3266c(%rip), %r14     # 0x3d674
movl (%r14), %edi
callq 0x3110
movq %rax, 0xe0(%rbx)
movl (%r14), %edi
movq %rbx, %rsi
callq 0x3600
testl %eax, %eax
jne 0xb18b
leaq 0x10(%rsp), %rdi
callq 0x32f0
testl %eax, %eax
jne 0xb105
leaq 0xa2bd(%rip), %rbx      # 0x15300
xorl %ebp, %ebp
movl %ebp, %r15d
movl $0x8000, %r14d          # imm = 0x8000
movl $0x9ef, %r12d           # imm = 0x9EF
movq 0x2247d(%rip), %rdi     # 0x2d4d8
movq %rbx, %rsi
movl $0x9e6, %edx            # imm = 0x9E6
callq 0xdf23
movq 0x22469(%rip), %rdi     # 0x2d4d8
movl $0x1, %esi
movq %r15, %rdx
movq %rbx, %rcx
movl $0x9e7, %r8d            # imm = 0x9E7
callq 0xdfde
movq 0x2244c(%rip), %rdi     # 0x2d4d8
callq 0xe09e
cmpq $0x2, %rax
jge 0xb0ed
cmpl $0x0, 0x22432(%rip)     # 0x2d4d0
movl 0x122ac(%rip), %edi     # 0x1d350
leaq 0x12391(%rip), %rsi     # 0x1d43c
leaq 0x1a3e6(%rip), %rax     # 0x25498
cmoveq %rax, %rsi
movq %r14, %rdx
callq 0xaf4f
movq %rax, %r13
movq %rax, 0x22400(%rip)     # 0x2d4c8
movq 0x22409(%rip), %rdi     # 0x2d4d8
movl %ebp, %edx
movl %ebp, %esi
movq %rbx, %rcx
movq %r12, %r8
callq 0xdf81
cmpq $0x8000, %r13           # imm = 0x8000
je 0xb054
jmp 0xb105
movq 0x223e4(%rip), %rdi     # 0x2d4d8
leaq 0xa205(%rip), %rsi      # 0x15300
movl $0x9e9, %edx            # imm = 0x9E9
callq 0xdf52
cmpl $0x0, 0xc(%rsp)
je 0xb132
leaq 0x32561(%rip), %rax     # 0x3d674
movl (%rax), %edi
movq 0xf0(%rsp), %rsi
callq 0x3600
testl %eax, %eax
jne 0xb1aa
movl $0x0, 0xc(%rsp)
movl 0xdc(%rsp), %ebp
testl %ebp, %ebp
jne 0xb14f
addq $0xf8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movl 0xe0(%rsp), %r14d
movq 0xe8(%rsp), %rbx
cmpl $0x20, %ebp
je 0xb175
leaq 0xa2a1(%rip), %rdi      # 0x1540c
xorl %eax, %eax
movq %rbx, %rsi
callq 0x476b
testl %r14d, %r14d
je 0xb182
movq %rbx, %rdi
callq 0x3050
movl %ebp, %edi
negl %edi
callq 0x4106
leaq 0xa13e(%rip), %rdi      # 0x152d0
leaq 0xa167(%rip), %rsi      # 0x15300
leaq 0xb347(%rip), %rcx      # 0x164e7
movl $0x9e4, %edx            # imm = 0x9E4
callq 0x3220
leaq 0xa11f(%rip), %rdi      # 0x152d0
leaq 0xa148(%rip), %rsi      # 0x15300
leaq 0xb328(%rip), %rcx      # 0x164e7
movl $0x9f2, %edx            # imm = 0x9F2
callq 0x3220