// File: /workspace/github_c_makefile_star2_O2/aligrudi[P]gpss/gpss.c
// Function: gpss_greedymin_cont
static int gpss_greedymin_cont(int *S, int *P, int *ptmk)
{
	int i;
	int S_n = 0;
	for (i = 0; i < pt_n; i++) {
		int p = gpss_greedymin_next(P, ptmk);
		if (p < 0)
			break;
		ptmk[p] = 1;
		S[S_n++] = p;
	}
	return S_n;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x48, %rsp
movq %rdi, 0x30(%rsp)
movl 0x335c(%rip), %r9d      # 0x5070
movslq %r9d, %rdi
movq 0x3372(%rip), %rcx      # 0x5090
movq %rcx, 0x8(%rsp)
movq 0x335e(%rip), %r14      # 0x5088
movq 0x334f(%rip), %rbx      # 0x5080
testl %edi, %edi
movl $0x0, %eax
movq %rdi, 0x38(%rsp)
cmovgl %edi, %eax
movq 0x3331(%rip), %r12      # 0x5078
xorl %ecx, %ecx
movq %rdx, 0x10(%rsp)
movq %rsi, 0x40(%rsp)
movq %r9, 0x20(%rsp)
movq %rax, 0x28(%rsp)
cmpq %rax, %rcx
je 0x1f34
movq %rcx, 0x18(%rsp)
movslq 0x3302(%rip), %rdi      # 0x5074
pushq $0x4
popq %r13
movq %r13, %rsi
callq 0x1080
movq %rax, %r15
movq 0x38(%rsp), %rbp
movq %rbp, %rdi
movq %r13, %rsi
callq 0x1080
movq %rax, %r13
movq %rbp, %rdi
pushq $0x4
popq %rsi
callq 0x1080
movq 0x20(%rsp), %r9
movq 0x10(%rsp), %rdx
movq %rax, %rbp
xorl %eax, %eax
cmpq %r9, %rax
je 0x1de8
cmpl $0x0, (%rdx,%rax,4)
je 0x1de3
movq 0x8(%rsp), %rcx
movl (%rcx,%rax,4), %ecx
testl %ecx, %ecx
movl $0x0, %esi
cmovlel %esi, %ecx
xorl %edi, %edi
cmpq %rdi, %rcx
je 0x1de3
movq (%r14,%rax,8), %rsi
movslq (%rsi,%rdi,4), %rsi
incl (%r15,%rsi,4)
incq %rdi
jmp 0x1dcd
incq %rax
jmp 0x1dae
xorl %eax, %eax
movq 0x40(%rsp), %rsi
cmpq %r9, %rax
je 0x1e7d
movq 0x8(%rsp), %rcx
movl (%rcx,%rax,4), %ecx
testl %ecx, %ecx
movl $0x0, %edi
cmovlel %edi, %ecx
xorl %edi, %edi
cmpq %rdi, %rcx
je 0x1e2d
movq (%r14,%rax,8), %r8
movslq (%r8,%rdi,4), %r8
cmpl $0x2, (%r15,%r8,4)
jl 0x1e28
movl $0x1, (%rbp,%rax,4)
incq %rdi
jmp 0x1e0c
cmpl $0x0, (%rbp,%rax,4)
je 0x1e3e
incq %rax
movq 0x20(%rsp), %r9
jmp 0x1def
xorl %r10d, %r10d
cmpq %rcx, %r10
je 0x1e34
movq (%r14,%rax,8), %rdi
movslq (%rdi,%r10,4), %r11
movl (%rbx,%r11,4), %edi
testl %edi, %edi
movl $0x0, %r8d
cmovlel %r8d, %edi
xorl %r8d, %r8d
cmpq %r8, %rdi
je 0x1e78
movq (%r12,%r11,8), %r9
movslq (%r9,%r8,4), %r9
incl (%r13,%r9,4)
incq %r8
jmp 0x1e61
incq %r10
jmp 0x1e41
xorl %eax, %eax
pushq $-0x1
popq %r10
cmpq %rax, %r9
je 0x1eb7
movl (%rsi,%rax,4), %ecx
movslq %ecx, %rdi
cmpl $0x0, (%rdx,%rdi,4)
jne 0x1eb2
cmpl $0x0, (%rbp,%rdi,4)
jne 0x1eb2
testl %r10d, %r10d
js 0x1eaf
movl (%r13,%rdi,4), %edi
movl %r10d, %r8d
cmpl (%r13,%r8,4), %edi
jge 0x1eb2
movl %ecx, %r10d
incq %rax
jmp 0x1e83
xorl %eax, %eax
cmpq %rax, %r9
je 0x1ee2
movl (%rsi,%rax,4), %ecx
movslq %ecx, %rdi
cmpl $0x0, (%rdx,%rdi,4)
jne 0x1edd
cmpl $0x0, (%rbp,%rdi,4)
jne 0x1edd
movq 0x8(%rsp), %r8
cmpl $0x1, (%r8,%rdi,4)
je 0x1f05
incq %rax
jmp 0x1eb9
movq %r15, %rdi
movl %r10d, %r15d
callq 0x1030
movq %r13, %rdi
callq 0x1030
movq %rbp, %rdi
callq 0x1030
movq 0x10(%rsp), %rdx
movl %r15d, %ecx
testl %ecx, %ecx
js 0x1f2f
movl %ecx, %eax
movl $0x1, (%rdx,%rax,4)
movq 0x30(%rsp), %rax
movq 0x18(%rsp), %rdi
movl %ecx, (%rax,%rdi,4)
movq %rdi, %rcx
incq %rcx
movq 0x28(%rsp), %rax
jmp 0x1d5d
movq 0x18(%rsp), %rax
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq