// File: /workspace/github_c_makefile_star2_O0/snej[P]zdelta/deflate.c
// Function: zd_deflateParams
int ZEXPORT zd_deflateParams(strm, level, strategy)
    zd_streamp strm;
    int level;
    int strategy;
{
    deflate_state *s;
    compress_func func;
    int err = ZD_OK;

    if (strm == ZD_NULL || strm->state == ZD_NULL ||
	strm->refnum < 0 || strm->refnum > REFNUM) return ZD_STREAM_ERROR;
    s = strm->state;

    if (level == ZD_DEFAULT_COMPRESSION) {
	level = 7;
    }
    if (level < 0 || level > 9 || strategy < 0 || strategy > 8) {
	return ZD_STREAM_ERROR;
    }
    func = configuration_table[s->level].func;

    if (func != configuration_table[level].func && strm->total_in != 0) {
	/* Flush the last buffer: */
	err = zd_deflate(strm, Z_PARTIAL_FLUSH);
    }
    if (s->level != level) {
	s->level = level;
	s->max_lazy_match   = configuration_table[level].max_lazy;
	s->good_match       = configuration_table[level].good_length;
	s->nice_match       = configuration_table[level].nice_length;
	s->max_chain_length = configuration_table[level].max_chain;
    }
    s->strategy = strategy;
    return err;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movl %esi, -0x14(%rbp)
movl %edx, -0x18(%rbp)
movl $0x0, -0x2c(%rbp)
cmpq $0x0, -0x10(%rbp)
je 0x255f
movq -0x10(%rbp), %rax
cmpq $0x0, 0x58(%rax)
je 0x255f
movq -0x10(%rbp), %rax
cmpl $0x0, 0x48(%rax)
jl 0x255f
movq -0x10(%rbp), %rax
cmpl $0x1, 0x48(%rax)
jle 0x256b
movl $0xfffffffe, -0x4(%rbp) # imm = 0xFFFFFFFE
jmp 0x26b3
movq -0x10(%rbp), %rax
movq 0x58(%rax), %rax
movq %rax, -0x20(%rbp)
cmpl $-0x1, -0x14(%rbp)
jne 0x2584
movl $0x7, -0x14(%rbp)
cmpl $0x0, -0x14(%rbp)
jl 0x259c
cmpl $0x9, -0x14(%rbp)
jg 0x259c
cmpl $0x0, -0x18(%rbp)
jl 0x259c
cmpl $0x8, -0x18(%rbp)
jle 0x25a8
movl $0xfffffffe, -0x4(%rbp) # imm = 0xFFFFFFFE
jmp 0x26b3
movq -0x20(%rbp), %rax
movslq 0xf4(%rax), %rcx
leaq 0x11786(%rip), %rax     # 0x13d40
shlq $0x4, %rcx
addq %rcx, %rax
movq 0x8(%rax), %rax
movq %rax, -0x28(%rbp)
movq -0x28(%rbp), %rax
movslq -0x14(%rbp), %rdx
leaq 0x11768(%rip), %rcx     # 0x13d40
shlq $0x4, %rdx
addq %rdx, %rcx
cmpq 0x8(%rcx), %rax
je 0x2601
movq -0x10(%rbp), %rax
cmpq $0x0, 0x10(%rax)
je 0x2601
movq -0x10(%rbp), %rdi
movl $0x1, %esi
callq 0x26c0
movl %eax, -0x2c(%rbp)
movq -0x20(%rbp), %rax
movl 0xf4(%rax), %eax
cmpl -0x14(%rbp), %eax
je 0x26a0
movl -0x14(%rbp), %ecx
movq -0x20(%rbp), %rax
movl %ecx, 0xf4(%rax)
movslq -0x14(%rbp), %rcx
leaq 0x11714(%rip), %rax     # 0x13d40
shlq $0x4, %rcx
addq %rcx, %rax
movzwl 0x2(%rax), %ecx
movq -0x20(%rbp), %rax
movl %ecx, 0xf0(%rax)
movslq -0x14(%rbp), %rcx
leaq 0x116f4(%rip), %rax     # 0x13d40
shlq $0x4, %rcx
addq %rcx, %rax
movzwl (%rax), %ecx
movq -0x20(%rbp), %rax
movl %ecx, 0xfc(%rax)
movslq -0x14(%rbp), %rcx
leaq 0x116d5(%rip), %rax     # 0x13d40
shlq $0x4, %rcx
addq %rcx, %rax
movzwl 0x4(%rax), %ecx
movq -0x20(%rbp), %rax
movl %ecx, 0x100(%rax)
movslq -0x14(%rbp), %rcx
leaq 0x116b5(%rip), %rax     # 0x13d40
shlq $0x4, %rcx
addq %rcx, %rax
movzwl 0x6(%rax), %ecx
movq -0x20(%rbp), %rax
movl %ecx, 0xec(%rax)
movl -0x18(%rbp), %ecx
movq -0x20(%rbp), %rax
movl %ecx, 0xf8(%rax)
movl -0x2c(%rbp), %eax
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax)