// File: /workspace/github_c_makefile_star2_O1/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 $0x38, %rsp
movq %rdi, 0x28(%rsp)
movslq 0x32f3(%rip), %r12      # 0x5070
testq %r12, %r12
jle 0x1f8f
movq 0x3303(%rip), %rax      # 0x5090
movq %rax, 0x10(%rsp)
movq 0x32ef(%rip), %rax      # 0x5088
movq %rax, 0x8(%rsp)
movq 0x32db(%rip), %r14      # 0x5080
movq 0x32cc(%rip), %rbx      # 0x5078
xorl %eax, %eax
movl $0x0, 0x4(%rsp)
movq %rdx, 0x18(%rsp)
movq %rsi, 0x30(%rsp)
movq %rax, 0x20(%rsp)
movslq 0x32a8(%rip), %rdi      # 0x5074
movl $0x4, %esi
callq 0x1080
movq %rax, %r13
movl $0x4, %esi
movq %r12, %rdi
callq 0x1080
movq %rax, %r15
movl $0x4, %esi
movq %r12, %rdi
callq 0x1080
movq 0x18(%rsp), %rdx
movq %rax, %rbp
xorl %eax, %eax
cmpl $0x0, (%rdx,%rax,4)
je 0x1e30
movq 0x10(%rsp), %rcx
movslq (%rcx,%rax,4), %rcx
testq %rcx, %rcx
jle 0x1e30
movq 0x8(%rsp), %rsi
movq (%rsi,%rax,8), %r8
xorl %esi, %esi
movslq (%r8,%rsi,4), %rdi
incl (%r13,%rdi,4)
incq %rsi
cmpq %rsi, %rcx
jne 0x1e1f
incq %rax
cmpq %r12, %rax
jne 0x1e00
xorl %eax, %eax
movq 0x10(%rsp), %rcx
movslq (%rcx,%rax,4), %rcx
testq %rcx, %rcx
jle 0x1e6f
movq 0x8(%rsp), %rsi
movq (%rsi,%rax,8), %r8
xorl %esi, %esi
movslq (%r8,%rsi,4), %rdi
cmpl $0x2, (%r13,%rdi,4)
jl 0x1e67
movl $0x1, (%rbp,%rax,4)
incq %rsi
cmpq %rsi, %rcx
jne 0x1e53
testl %ecx, %ecx
jle 0x1eb1
cmpl $0x0, (%rbp,%rax,4)
jne 0x1eb1
movq 0x8(%rsp), %rsi
movq (%rsi,%rax,8), %r11
xorl %esi, %esi
movslq (%r11,%rsi,4), %r8
movslq (%r14,%r8,4), %rdi
testq %rdi, %rdi
jle 0x1ea9
movq (%rbx,%r8,8), %r8
xorl %r9d, %r9d
movslq (%r8,%r9,4), %r10
incl (%r15,%r10,4)
incq %r9
cmpq %r9, %rdi
jne 0x1e99
incq %rsi
cmpq %rcx, %rsi
jne 0x1e85
incq %rax
cmpq %r12, %rax
jne 0x1e3a
movl $0xffffffff, %r10d      # imm = 0xFFFFFFFF
xorl %eax, %eax
movq 0x30(%rsp), %rsi
movl (%rsi,%rax,4), %ecx
movslq %ecx, %rdi
cmpl $0x0, (%rdx,%rdi,4)
jne 0x1eee
cmpl $0x0, (%rbp,%rdi,4)
jne 0x1eee
testl %r10d, %r10d
js 0x1eeb
movl (%r15,%rdi,4), %edi
movl %r10d, %r8d
cmpl (%r15,%r8,4), %edi
jge 0x1eee
movl %ecx, %r10d
incq %rax
cmpq %rax, %r12
jne 0x1ec6
xorl %eax, %eax
movl (%rsi,%rax,4), %edi
movslq %edi, %r8
cmpl $0x0, (%rdx,%r8,4)
jne 0x1f20
cmpl $0x0, (%rbp,%r8,4)
jne 0x1f20
movq 0x10(%rsp), %r9
cmpl $0x1, (%r9,%r8,4)
jne 0x1f20
xorl %r8d, %r8d
movl %edi, %ecx
jmp 0x1f23
movb $0x1, %r8b
testb %r8b, %r8b
je 0x1f55
incq %rax
cmpq %rax, %r12
jne 0x1ef8
movq %r13, %rdi
movl %r10d, %r13d
callq 0x1030
movq %r15, %rdi
callq 0x1030
movq %rbp, %rdi
callq 0x1030
movl %r13d, %edi
movq 0x18(%rsp), %rdx
jmp 0x1f57
movl %ecx, %edi
testl %edi, %edi
js 0x1f79
movl %edi, %eax
movl $0x1, (%rdx,%rax,4)
movl 0x4(%rsp), %ecx
movslq %ecx, %rax
incl %ecx
movl %ecx, 0x4(%rsp)
movq 0x28(%rsp), %rcx
movl %edi, (%rcx,%rax,4)
movq 0x20(%rsp), %rax
testl %edi, %edi
js 0x1f97
incl %eax
cmpl %r12d, %eax
jne 0x1dc0
jmp 0x1f97
movl $0x0, 0x4(%rsp)
movl 0x4(%rsp), %eax
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq