// File: /workspace/github_c_makefile_star2_O0/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
movq %rsp, %rbp
subq $0x120, %rsp            # imm = 0x120
movq %rdi, -0x8(%rbp)
movl $0x1, -0x114(%rbp)
movl $0x0, -0x48(%rbp)
movl $0x0, -0x44(%rbp)
movl $0x0, -0x40(%rbp)
movq $0x0, -0x38(%rbp)
callq 0x12220
leaq 0x36a32(%rip), %rax     # 0x43ab4
movl (%rax), %edi
callq 0x3110
movq %rax, -0x30(%rbp)
leaq 0x36a20(%rip), %rax     # 0x43ab4
movl (%rax), %edi
leaq -0x110(%rbp), %rsi
callq 0x35f0
movl %eax, -0x118(%rbp)
cmpl $0x0, -0x118(%rbp)
jne 0xd0bb
movb $0x1, %al
testb $0x1, %al
jne 0xd0b9
jmp 0xd0bb
jmp 0xd0da
leaq 0xf158(%rip), %rdi      # 0x1c21a
leaq 0xf181(%rip), %rsi      # 0x1c24a
movl $0x9e4, %edx            # imm = 0x9E4
leaq 0x10374(%rip), %rcx     # 0x1d449
callq 0x3220
jmp 0xd0dc
leaq -0x110(%rbp), %rdi
callq 0x32f0
cmpl $0x0, %eax
jne 0xd1cb
jmp 0xd0f3
jmp 0xd0f5
movq 0x2681c(%rip), %rdi     # 0x33918
leaq 0xf147(%rip), %rsi      # 0x1c24a
movl $0x9e6, %edx            # imm = 0x9E6
callq 0x11900
movq 0x26804(%rip), %rdi     # 0x33918
movl $0x1, %esi
xorl %eax, %eax
movl %eax, %edx
leaq 0xf126(%rip), %rcx      # 0x1c24a
movl $0x9e7, %r8d            # imm = 0x9E7
callq 0x11a50
movq 0x267e2(%rip), %rdi     # 0x33918
callq 0x11be0
cmpq $0x1, %rax
jle 0xd15b
movq 0x267d0(%rip), %rdi     # 0x33918
leaq 0xf0fb(%rip), %rsi      # 0x1c24a
movl $0x9e9, %edx            # imm = 0x9E9
callq 0x11950
jmp 0xd1c7
movl 0x1662f(%rip), %edi     # 0x23790
movl 0x267a9(%rip), %ecx     # 0x33910
leaq 0x16612(%rip), %rax     # 0x23780
movq %rax, %rsi
addq $0x8158, %rsi           # imm = 0x8158
addq $0xfc, %rax
cmpl $0x0, %ecx
cmovneq %rax, %rsi
movl $0x8000, %edx           # imm = 0x8000
callq 0xcf80
movq %rax, -0x10(%rbp)
movq %rax, 0x2676e(%rip)     # 0x33908
movq 0x26777(%rip), %rdi     # 0x33918
xorl %esi, %esi
xorl %eax, %eax
movl %eax, %edx
leaq 0xf09c(%rip), %rcx      # 0x1c24a
movl $0x9ef, %r8d            # imm = 0x9EF
callq 0x119a0
cmpq $0x8000, -0x10(%rbp)    # imm = 0x8000
je 0xd0f5
jmp 0xd1c9
jmp 0xd1cb
movl -0x114(%rbp), %eax
cmpl $0x0, %eax
je 0xd22e
jmp 0xd1d8
leaq 0x368d5(%rip), %rax     # 0x43ab4
movl (%rax), %edi
movq -0x30(%rbp), %rsi
callq 0x35f0
movl %eax, -0x11c(%rbp)
cmpl $0x0, -0x11c(%rbp)
jne 0xd203
movb $0x1, %al
testb $0x1, %al
jne 0xd201
jmp 0xd203
jmp 0xd222
leaq 0xf010(%rip), %rdi      # 0x1c21a
leaq 0xf039(%rip), %rsi      # 0x1c24a
movl $0x9f2, %edx            # imm = 0x9F2
leaq 0x1022c(%rip), %rcx     # 0x1d449
callq 0x3220
jmp 0xd224
movl $0x0, -0x114(%rbp)
movq -0x48(%rbp), %rax
movq %rax, -0x28(%rbp)
movq -0x40(%rbp), %rax
movq %rax, -0x20(%rbp)
movq -0x38(%rbp), %rax
movq %rax, -0x18(%rbp)
cmpl $0x0, -0x24(%rbp)
je 0xd294
jmp 0xd24e
cmpl $0x20, -0x24(%rbp)
je 0xd266
movq -0x18(%rbp), %rsi
leaq 0xf0f7(%rip), %rdi      # 0x1c356
movb $0x0, %al
callq 0x49e0
jmp 0xd268
cmpl $0x0, -0x20(%rbp)
je 0xd286
movq -0x18(%rbp), %rdi
callq 0x3050
movl $0x0, -0x20(%rbp)
movq $0x0, -0x18(%rbp)
jmp 0xd288
xorl %edi, %edi
subl -0x24(%rbp), %edi
callq 0x3f20
jmp 0xd294
addq $0x120, %rsp            # imm = 0x120
popq %rbp
retq
nopl (%rax)