LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_cpp_makefile_star2_O3/wangyu-[P]pwdgen/lib/md5.cpp
// Function: md5_hmac_starts(md5_context*, unsigned char const*, unsigned long)
void md5_hmac_starts( md5_context *ctx, const unsigned char *key,
                      size_t keylen )
{
    size_t i;
    unsigned char sum[16];

    if( keylen > 64 )
    {
        md5( key, keylen, sum );
        keylen = 16;
        key = sum;
    }

    memset( ctx->ipad, 0x36, 64 );
    memset( ctx->opad, 0x5C, 64 );

    for( i = 0; i < keylen; i++ )
    {
        ctx->ipad[i] = (unsigned char)( ctx->ipad[i] ^ key[i] );
        ctx->opad[i] = (unsigned char)( ctx->opad[i] ^ key[i] );
    }

    md5_starts( ctx );
    md5_update( ctx, ctx->ipad, 64 );

    polarssl_zeroize( sum, sizeof( sum ) );
}

// Assembly:
pushq %r14
pushq %rbx
subq $0x18, %rsp
movq %rsi, %rax
movq %rdi, %rbx
cmpq $0x41, %rdx
jb 0x403255
movq %rsp, %r14
movq %rax, %rdi
movq %rdx, %rsi
movq %r14, %rdx
callq 0x40316d
leaq 0x58(%rbx), %rsi
movaps 0xd139b(%rip), %xmm0    # 0x4d45b0
movups %xmm0, 0x88(%rbx)
movups %xmm0, 0x78(%rbx)
movups %xmm0, 0x68(%rbx)
movups %xmm0, 0x58(%rbx)
movaps 0xd1391(%rip), %xmm0    # 0x4d45c0
movups %xmm0, 0x98(%rbx)
movups %xmm0, 0xa8(%rbx)
movups %xmm0, 0xb8(%rbx)
movups %xmm0, 0xc8(%rbx)
movl $0x10, %edx
movq %r14, %rax
jmp 0x40329b
leaq 0x58(%rbx), %rsi
movaps 0xd1350(%rip), %xmm0    # 0x4d45b0
movups %xmm0, 0x88(%rbx)
movups %xmm0, 0x78(%rbx)
movups %xmm0, 0x68(%rbx)
movups %xmm0, 0x58(%rbx)
movaps 0xd1346(%rip), %xmm0    # 0x4d45c0
movups %xmm0, 0x98(%rbx)
movups %xmm0, 0xa8(%rbx)
movups %xmm0, 0xb8(%rbx)
movups %xmm0, 0xc8(%rbx)
testq %rdx, %rdx
je 0x4032ba
xorl %ecx, %ecx
movb (%rax,%rcx), %dil
xorb %dil, 0x58(%rbx,%rcx)
movb (%rax,%rcx), %dil
xorb %dil, 0x98(%rbx,%rcx)
incq %rcx
cmpq %rcx, %rdx
jne 0x40329d
movaps 0xd12cf(%rip), %xmm0    # 0x4d4590
movups %xmm0, (%rbx)
movabsq $0x1032547698badcfe, %rax # imm = 0x1032547698BADCFE
movq %rax, 0x10(%rbx)
movl $0x40, %edx
movq %rbx, %rdi
callq 0x402fb1
xorl %eax, %eax
movb $0x0, (%rsp,%rax)
incq %rax
cmpq $0x10, %rax
jne 0x4032e1
addq $0x18, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_cpp_makefile_star2_O3/wangyu-[P]pwdgen/lib/md5.cpp
// Function: md5_hmac_finish(md5_context*, unsigned char*)
void md5_hmac_finish( md5_context *ctx, unsigned char output[16] )
{
    unsigned char tmpbuf[16];

    md5_finish( ctx, tmpbuf );
    md5_starts( ctx );
    md5_update( ctx, ctx->opad, 64 );
    md5_update( ctx, tmpbuf, 16 );
    md5_finish( ctx, output );

    polarssl_zeroize( tmpbuf, sizeof( tmpbuf ) );
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x10, %rsp
movq %rsi, %rbx
movq %rdi, %r14
movq %rsp, %r15
movq %r15, %rsi
callq 0x40306b
movaps 0xd1274(%rip), %xmm0    # 0x4d4590
movups %xmm0, (%r14)
movabsq $0x1032547698badcfe, %rax # imm = 0x1032547698BADCFE
movq %rax, 0x10(%r14)
leaq 0x98(%r14), %rsi
movl $0x40, %edx
movq %r14, %rdi
callq 0x402fb1
movl $0x10, %edx
movq %r14, %rdi
movq %r15, %rsi
callq 0x402fb1
movq %r14, %rdi
movq %rbx, %rsi
callq 0x40306b
xorl %eax, %eax
movb $0x0, (%rsp,%rax)
incq %rax
cmpq $0x10, %rax
jne 0x40335f
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O3/wangyu-[P]pwdgen/lib/md5.cpp
// Function: md5_hmac(unsigned char const*, unsigned long, unsigned char const*, unsigned long, unsigned char*)
void md5_hmac( const unsigned char *key, size_t keylen,
               const unsigned char *input, size_t ilen,
               unsigned char output[16] )
{
    md5_context ctx;

    md5_init( &ctx );
    md5_hmac_starts( &ctx, key, keylen );
    md5_hmac_update( &ctx, input, ilen );
    md5_hmac_finish( &ctx, output );
    md5_free( &ctx );
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xe8, %rsp
movq %r8, 0x8(%rsp)
movq %rcx, %r14
movq %rdx, %r15
movq %rsi, %r12
movq %rdi, %r13
leaq 0x10(%rsp), %rbp
xorl %ebx, %ebx
movl $0xd8, %edx
movq %rbp, %rdi
xorl %esi, %esi
callq 0x401098
movq %rbp, %rdi
movq %r13, %rsi
movq %r12, %rdx
callq 0x4031e6
movq %rbp, %rdi
movq %r15, %rsi
movq %r14, %rdx
callq 0x402fb1
movq %rbp, %rdi
movq 0x8(%rsp), %rsi
callq 0x4032fb
movb $0x0, 0x10(%rsp,%rbx)
incq %rbx
cmpq $0xd8, %rbx
jne 0x4033fd
addq $0xe8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/wangyu-[P]pwdgen/lib/pbkdf2-sha1.cpp
// Function: sha1_update(sha1_context*, unsigned char const*, int)
void sha1_update(sha1_context * ctx, const unsigned char *input, int ilen)
{
	int fill;
	unsigned long left;

	if (ilen <= 0)
		return;

	left = ctx->total[0] & 0x3F;
	fill = 64 - left;

	ctx->total[0] += (unsigned long) ilen;
	ctx->total[0] &= 0xFFFFFFFF;

	if (ctx->total[0] < (unsigned long) ilen)
		ctx->total[1]++;

	if (left && ilen >= fill) {
		memcpy((void *) (ctx->buffer + left), (void *) input, fill);
		sha1_process(ctx, ctx->buffer);
		input += fill;
		ilen -= fill;
		left = 0;
	}

	while (ilen >= 64) {
		sha1_process(ctx, input);
		input += 64;
		ilen -= 64;
	}

	if (ilen > 0) {
		memcpy((void *) (ctx->buffer + left), (void *) input, ilen);
	}
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
testl %edx, %edx
jle 0x40350d
movq %rsi, %rbx
movq %rdi, %r14
movq (%rdi), %rcx
movl %ecx, %eax
andl $0x3f, %eax
movl %edx, %esi
addl %edx, %ecx
movq %rcx, (%rdi)
cmpq %rsi, %rcx
jae 0x403484
incq 0x8(%r14)
testq %rax, %rax
je 0x4034c2
movl $0x40, %ecx
subl %eax, %ecx
movl %edx, %r13d
subl %ecx, %r13d
jb 0x4034f2
leaq 0x38(%r14), %r15
leaq (%r14,%rax), %rdi
addq $0x38, %rdi
movl %ecx, %r12d
movq %rbx, %rsi
movq %r12, %rdx
callq 0x401040
movq %r14, %rdi
movq %r15, %rsi
callq 0x403517
addq %r12, %rbx
jmp 0x4034c5
movl %edx, %r13d
cmpl $0x40, %r13d
jl 0x4034e9
movq %r14, %rdi
movq %rbx, %rsi
callq 0x403517
addq $0x40, %rbx
leal -0x40(%r13), %edx
cmpl $0x7f, %r13d
movl %edx, %r13d
ja 0x4034cb
jmp 0x4034ec
movl %r13d, %edx
testl %edx, %edx
jle 0x40350d
xorl %eax, %eax
leaq (%r14,%rax), %rdi
addq $0x38, %rdi
movl %edx, %edx
movq %rbx, %rsi
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
jmp 0x401040
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O3/wangyu-[P]pwdgen/lib/pbkdf2-sha1.cpp
// Function: sha1_hmac_starts(sha1_context*, unsigned char const*, int)
void sha1_hmac_starts(sha1_context * ctx, const unsigned char *key, int keylen)
{
	int i;
	unsigned char sum[20];

	if (keylen > 64) {
		sha1(key, keylen, sum);
		keylen = 20;
		key = sum;
	}

	memset(ctx->ipad, 0x36, 64);
	memset(ctx->opad, 0x5C, 64);

	for (i = 0; i < keylen; i++) {
		ctx->ipad[i] = (unsigned char) (ctx->ipad[i] ^ key[i]);
		ctx->opad[i] = (unsigned char) (ctx->opad[i] ^ key[i]);
	}

	sha1_starts(ctx);
	sha1_update(ctx, ctx->ipad, 64);

}

// Assembly:
pushq %r14
pushq %rbx
subq $0x18, %rsp
movq %rsi, %rax
movq %rdi, %rbx
cmpl $0x41, %edx
jl 0x4052c0
movq %rsp, %r14
movq %rax, %rdi
movl %edx, %esi
movq %r14, %rdx
callq 0x4051e5
leaq 0x78(%rbx), %rsi
movaps 0xcf336(%rip), %xmm0    # 0x4d45b0
movups %xmm0, 0xa8(%rbx)
movups %xmm0, 0x98(%rbx)
movups %xmm0, 0x88(%rbx)
movups %xmm0, 0x78(%rbx)
movaps 0xcf326(%rip), %xmm0    # 0x4d45c0
movups %xmm0, 0xb8(%rbx)
movups %xmm0, 0xc8(%rbx)
movups %xmm0, 0xd8(%rbx)
movups %xmm0, 0xe8(%rbx)
movl $0x14, %edx
movq %r14, %rax
jmp 0x40530b
leaq 0x78(%rbx), %rsi
movaps 0xcf2e5(%rip), %xmm0    # 0x4d45b0
movups %xmm0, 0xa8(%rbx)
movups %xmm0, 0x98(%rbx)
movups %xmm0, 0x88(%rbx)
movups %xmm0, 0x78(%rbx)
movaps 0xcf2d5(%rip), %xmm0    # 0x4d45c0
movups %xmm0, 0xb8(%rbx)
movups %xmm0, 0xc8(%rbx)
movups %xmm0, 0xd8(%rbx)
movups %xmm0, 0xe8(%rbx)
testl %edx, %edx
jle 0x40532c
movl %edx, %ecx
xorl %edx, %edx
movb (%rax,%rdx), %dil
xorb %dil, 0x78(%rbx,%rdx)
movb (%rax,%rdx), %dil
xorb %dil, 0xb8(%rbx,%rdx)
incq %rdx
cmpq %rdx, %rcx
jne 0x40530f
xorps %xmm0, %xmm0
movups %xmm0, (%rbx)
movq $0x67452301, 0x10(%rbx) # imm = 0x67452301
movl $0x98badcfe, %eax       # imm = 0x98BADCFE
leaq 0x5712ce8b(%rax), %rcx
movq %rcx, 0x18(%rbx)
movq %rax, 0x20(%rbx)
movq $0x10325476, 0x28(%rbx) # imm = 0x10325476
addq $0x2b1804f2, %rax       # imm = 0x2B1804F2
movq %rax, 0x30(%rbx)
movq %rbx, %rdi
movl $0x40, %edx
addq $0x18, %rsp
popq %rbx
popq %r14
jmp 0x403455
// File: /workspace/github_cpp_makefile_star2_O3/wangyu-[P]pwdgen/lib/pbkdf2-sha1.cpp
// Function: sha1_hmac_finish(sha1_context*, unsigned char*)
void sha1_hmac_finish(sha1_context * ctx, unsigned char output[20])
{
	unsigned char tmpbuf[20];

	sha1_finish(ctx, tmpbuf);
	sha1_starts(ctx);
	sha1_update(ctx, ctx->opad, 64);
	sha1_update(ctx, tmpbuf, 20);
	sha1_finish(ctx, output);

}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x20, %rsp
movq %rsi, %rbx
movq %rdi, %r14
movq %rsp, %r15
movq %r15, %rsi
callq 0x4050b8
xorps %xmm0, %xmm0
movups %xmm0, (%r14)
movq $0x67452301, 0x10(%r14) # imm = 0x67452301
movl $0x98badcfe, %eax       # imm = 0x98BADCFE
leaq 0x5712ce8b(%rax), %rcx
movq %rcx, 0x18(%r14)
movq %rax, 0x20(%r14)
movq $0x10325476, 0x28(%r14) # imm = 0x10325476
addq $0x2b1804f2, %rax       # imm = 0x2B1804F2
movq %rax, 0x30(%r14)
leaq 0xb8(%r14), %rsi
movq %r14, %rdi
movl $0x40, %edx
callq 0x403455
movq %r14, %rdi
movq %r15, %rsi
movl $0x14, %edx
callq 0x403455
movq %r14, %rdi
movq %rbx, %rsi
callq 0x4050b8
addq $0x20, %rsp
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O3/wangyu-[P]pwdgen/lib/pbkdf2-sha256.cpp
// Function: sha2_update(sha2_context*, unsigned char const*, unsigned long)
void sha2_update( sha2_context *ctx, const unsigned char *input, size_t ilen )
{
    size_t fill;
    unsigned long left;

    if( ilen <= 0 )
        return;

    left = ctx->total[0] & 0x3F;
    fill = 64 - left;

    ctx->total[0] += (unsigned long) ilen;
    ctx->total[0] &= 0xFFFFFFFF;

    if( ctx->total[0] < (unsigned long) ilen )
        ctx->total[1]++;

    if( left && ilen >= fill )
    {
        memcpy( (void *) (ctx->buffer + left),
                (void *) input, fill );
        sha2_process( ctx, ctx->buffer );
        input += fill;
        ilen  -= fill;
        left = 0;
    }

    while( ilen >= 64 )
    {
        sha2_process( ctx, input );
        input += 64;
        ilen  -= 64;
    }

    if( ilen > 0 )
    {
        memcpy( (void *) (ctx->buffer + left),
                (void *) input, ilen );
    }
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
testq %rdx, %rdx
je 0x40574b
movq %rsi, %rbx
movq %rdi, %r14
movq (%rdi), %rax
leal (%rdx,%rax), %ecx
andl $0x3f, %eax
movq %rcx, (%rdi)
cmpq %rdx, %rcx
jae 0x4056c4
incq 0x8(%r14)
testq %rax, %rax
je 0x4056df
movl $0x40, %r12d
subq %rax, %r12
movq %rdx, %r15
subq %r12, %r15
jae 0x4056e4
movq %rdx, %r15
jmp 0x40572f
movq %rdx, %r15
jmp 0x405709
leaq 0x50(%r14), %r13
leaq (%r14,%rax), %rdi
addq $0x50, %rdi
movq %rbx, %rsi
movq %r12, %rdx
callq 0x401040
movq %r14, %rdi
movq %r13, %rsi
callq 0x405755
addq %r12, %rbx
cmpq $0x40, %r15
jb 0x405728
movq %r14, %rdi
movq %rbx, %rsi
callq 0x405755
addq $0x40, %rbx
addq $-0x40, %r15
cmpq $0x3f, %r15
ja 0x40570f
testq %r15, %r15
je 0x40574b
xorl %eax, %eax
leaq (%r14,%rax), %rdi
addq $0x50, %rdi
movq %rbx, %rsi
movq %r15, %rdx
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
jmp 0x401040
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O3/wangyu-[P]pwdgen/lib/pbkdf2-sha256.cpp
// Function: sha2(unsigned char const*, unsigned long, unsigned char*, int)
void sha2( const unsigned char *input, size_t ilen,
           unsigned char output[32], int is224 )
{
    sha2_context ctx;

    sha2_starts( &ctx, is224 );
    sha2_update( &ctx, input, ilen );
    sha2_finish( &ctx, output );

    memset( &ctx, 0, sizeof( sha2_context ) );
}

// Assembly:
pushq %r14
pushq %rbx
subq $0x118, %rsp            # imm = 0x118
movq %rdx, %rbx
movq %rsi, %rdx
movq %rdi, %rsi
xorps %xmm0, %xmm0
movaps %xmm0, (%rsp)
testl %ecx, %ecx
je 0x409f17
movaps 0xca790(%rip), %xmm0    # 0x4d4690
movaps 0xca799(%rip), %xmm1    # 0x4d46a0
movaps 0xca7a2(%rip), %xmm2    # 0x4d46b0
movaps 0xca7ab(%rip), %xmm3    # 0x4d46c0
jmp 0x409f33
movaps 0xca732(%rip), %xmm0    # 0x4d4650
movaps 0xca73b(%rip), %xmm1    # 0x4d4660
movaps 0xca744(%rip), %xmm2    # 0x4d4670
movaps 0xca74d(%rip), %xmm3    # 0x4d4680
movq %rsp, %r14
movaps %xmm3, 0x10(%r14)
movaps %xmm2, 0x20(%r14)
movaps %xmm1, 0x30(%r14)
movaps %xmm0, 0x40(%r14)
movl %ecx, 0x110(%r14)
movq %r14, %rdi
callq 0x405697
movq %r14, %rdi
movq %rbx, %rsi
callq 0x409d4e
addq $0x118, %rsp            # imm = 0x118
popq %rbx
popq %r14
retq
// File: /workspace/github_cpp_makefile_star2_O3/wangyu-[P]pwdgen/lib/pbkdf2-sha256.cpp
// Function: sha2_hmac_starts(sha2_context*, unsigned char const*, unsigned long, int)
void sha2_hmac_starts( sha2_context *ctx, const unsigned char *key, size_t keylen,
                       int is224 )
{
    size_t i;
    unsigned char sum[32];

    if( keylen > 64 )
    {
        sha2( key, keylen, sum, is224 );
        keylen = ( is224 ) ? 28 : 32;
        key = sum;
    }

    memset( ctx->ipad, 0x36, 64 );
    memset( ctx->opad, 0x5C, 64 );

    for( i = 0; i < keylen; i++ )
    {
        ctx->ipad[i] = (unsigned char)( ctx->ipad[i] ^ key[i] );
        ctx->opad[i] = (unsigned char)( ctx->opad[i] ^ key[i] );
    }

    sha2_starts( ctx, is224 );
    sha2_update( ctx, ctx->ipad, 64 );

    memset( sum, 0, sizeof( sum ) );
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
subq $0x20, %rsp
movl %ecx, %ebp
movq %rsi, %rax
movq %rdi, %rbx
cmpq $0x41, %rdx
jb 0x409ff9
movq %rsp, %r14
movq %rax, %rdi
movq %rdx, %rsi
movq %r14, %rdx
movl %ebp, %ecx
callq 0x409edb
xorl %eax, %eax
testl %ebp, %ebp
sete %al
leaq 0x1c(,%rax,4), %rdx
leaq 0x90(%rbx), %rsi
movaps 0xca5fb(%rip), %xmm0    # 0x4d45b0
movups %xmm0, 0xc0(%rbx)
movups %xmm0, 0xb0(%rbx)
movups %xmm0, 0xa0(%rbx)
movups %xmm0, 0x90(%rbx)
movaps 0xca5e8(%rip), %xmm0    # 0x4d45c0
movups %xmm0, 0xd0(%rbx)
movups %xmm0, 0xe0(%rbx)
movups %xmm0, 0xf0(%rbx)
movups %xmm0, 0x100(%rbx)
movq %r14, %rax
jmp 0x40a04b
leaq 0x90(%rbx), %rsi
movaps 0xca5a9(%rip), %xmm0    # 0x4d45b0
movups %xmm0, 0xc0(%rbx)
movups %xmm0, 0xb0(%rbx)
movups %xmm0, 0xa0(%rbx)
movups %xmm0, 0x90(%rbx)
movaps 0xca596(%rip), %xmm0    # 0x4d45c0
movups %xmm0, 0xd0(%rbx)
movups %xmm0, 0xe0(%rbx)
movups %xmm0, 0xf0(%rbx)
movups %xmm0, 0x100(%rbx)
testq %rdx, %rdx
je 0x40a06d
xorl %ecx, %ecx
movb (%rax,%rcx), %dil
xorb %dil, 0x90(%rbx,%rcx)
movb (%rax,%rcx), %dil
xorb %dil, 0xd0(%rbx,%rcx)
incq %rcx
cmpq %rcx, %rdx
jne 0x40a04d
xorps %xmm0, %xmm0
movups %xmm0, (%rbx)
testl %ebp, %ebp
je 0x40a095
movaps 0xca612(%rip), %xmm0    # 0x4d4690
movaps 0xca61b(%rip), %xmm1    # 0x4d46a0
movaps 0xca624(%rip), %xmm2    # 0x4d46b0
movaps 0xca62d(%rip), %xmm3    # 0x4d46c0
jmp 0x40a0b1
movaps 0xca5b4(%rip), %xmm0    # 0x4d4650
movaps 0xca5bd(%rip), %xmm1    # 0x4d4660
movaps 0xca5c6(%rip), %xmm2    # 0x4d4670
movaps 0xca5cf(%rip), %xmm3    # 0x4d4680
movups %xmm3, 0x10(%rbx)
movups %xmm2, 0x20(%rbx)
movups %xmm1, 0x30(%rbx)
movups %xmm0, 0x40(%rbx)
movl %ebp, 0x110(%rbx)
movl $0x40, %edx
movq %rbx, %rdi
addq $0x20, %rsp
popq %rbx
popq %r14
popq %rbp
jmp 0x405697
// File: /workspace/github_cpp_makefile_star2_O3/wangyu-[P]pwdgen/lib/pbkdf2-sha256.cpp
// Function: sha2_hmac_finish(sha2_context*, unsigned char*)
void sha2_hmac_finish( sha2_context *ctx, unsigned char output[32] )
{
    int is224, hlen;
    unsigned char tmpbuf[32];

    is224 = ctx->is224;
    hlen = ( is224 == 0 ) ? 32 : 28;

    sha2_finish( ctx, tmpbuf );
    sha2_starts( ctx, is224 );
    sha2_update( ctx, ctx->opad, 64 );
    sha2_update( ctx, tmpbuf, hlen );
    sha2_finish( ctx, output );

    memset( tmpbuf, 0, sizeof( tmpbuf ) );
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x28, %rsp
movq %rsi, %rbx
movq %rdi, %r14
movl 0x110(%rdi), %ebp
movq %rsp, %rsi
callq 0x409d4e
xorps %xmm0, %xmm0
movups %xmm0, (%r14)
testl %ebp, %ebp
je 0x40a12e
movaps 0xca57f(%rip), %xmm0    # 0x4d4690
movaps 0xca588(%rip), %xmm1    # 0x4d46a0
movaps 0xca591(%rip), %xmm2    # 0x4d46b0
movaps 0xca59a(%rip), %xmm3    # 0x4d46c0
movl $0x1c, %r15d
jmp 0x40a150
movaps 0xca51b(%rip), %xmm0    # 0x4d4650
movaps 0xca524(%rip), %xmm1    # 0x4d4660
movaps 0xca52d(%rip), %xmm2    # 0x4d4670
movaps 0xca536(%rip), %xmm3    # 0x4d4680
movl $0x20, %r15d
movups %xmm3, 0x10(%r14)
movups %xmm2, 0x20(%r14)
movups %xmm1, 0x30(%r14)
movups %xmm0, 0x40(%r14)
movl %ebp, 0x110(%r14)
leaq 0xd0(%r14), %rsi
movl $0x40, %edx
movq %r14, %rdi
callq 0x405697
movq %rsp, %rsi
movq %r14, %rdi
movq %r15, %rdx
callq 0x405697
movq %r14, %rdi
movq %rbx, %rsi
callq 0x409d4e
addq $0x28, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/wangyu-[P]pwdgen/lib/pbkdf2-sha256.cpp
// Function: hkdf_sha256(unsigned char const*, unsigned long, unsigned char const*, unsigned long, unsigned char const*, unsigned long, unsigned char*, unsigned long)
int hkdf_sha256( const unsigned char *salt,
                  size_t salt_len, const unsigned char *ikm, size_t ikm_len,
                  const unsigned char *info, size_t info_len,
                  unsigned char *okm, size_t okm_len )
{
    int ret;
    unsigned char prk[MBEDTLS_MD_MAX_SIZE];

    ret = hkdf_sha256_extract( salt, salt_len, ikm, ikm_len, prk );

    if( ret == 0 )
    {
        ret = hkdf_sha256_expand( prk, sha256_len,
                                   info, info_len, okm, okm_len );
    }

    mbedtls_platform_zeroize( prk, sizeof( prk ) );

    return( ret );
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x80, %rsp
movq %r9, %rbx
movq %r8, %r14
movq 0xb0(%rsp), %r15
movq 0xb8(%rsp), %r12
xorps %xmm0, %xmm0
leaq 0x40(%rsp), %rax
movaps %xmm0, 0x30(%rax)
movaps %xmm0, 0x20(%rax)
movaps %xmm0, 0x10(%rax)
movaps %xmm0, (%rax)
testq %rdi, %rdi
movl $0x20, %r8d
cmoveq %r8, %rsi
cmoveq %rax, %rdi
movq %rsp, %r13
movq %r13, %r8
xorl %r9d, %r9d
callq 0x40a20d
movl $0x20, %esi
movq %r13, %rdi
movq %r14, %rdx
movq %rbx, %rcx
movq %r15, %r8
movq %r12, %r9
callq 0x40a492
movl %eax, %ebx
movq 0x103d6f(%rip), %rax    # 0x50e418
movl $0x40, %edx
movq %r13, %rdi
xorl %esi, %esi
callq *%rax
movl %ebx, %eax
addq $0x80, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
nopl (%rax,%rax)
// File: /workspace/github_cpp_makefile_star2_O3/fredericmarchand[P]TexasHoldem/Player.cpp
// Function: Player::printHand()
void Player::printHand()
{
    if (hand[0] == NULL || hand[1] == NULL)
    {
        cout << "Something is null" << endl;
        return;
    }
    printCardArray(hand, 2);
    cout << "chips: " << chips << endl;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
cmpq $0x0, (%rdi)
je 0x2aad
movq %rdi, %rbx
cmpq $0x0, 0x8(%rdi)
je 0x2aad
movq %rbx, %rdi
movl $0x2, %esi
callq 0x2af3
movq 0x7547(%rip), %r14      # 0x9fd0
leaq 0x464a(%rip), %rsi      # 0x70da
movl $0x7, %edx
movq %r14, %rdi
callq 0x2150
movl 0x10(%rbx), %esi
movq %r14, %rdi
callq 0x21b0
movq %rax, %rbx
jmp 0x2ac8
movq 0x751c(%rip), %rbx      # 0x9fd0
leaq 0x460d(%rip), %rsi      # 0x70c8
movl $0x11, %edx
movq %rbx, %rdi
callq 0x2150
movq (%rbx), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x2120
movsbl %al, %esi
movq %rbx, %rdi
callq 0x2040
movq %rax, %rdi
popq %rbx
popq %r14
popq %rbp
jmp 0x2090
// File: /workspace/github_cpp_makefile_star2_O3/fredericmarchand[P]TexasHoldem/Player.cpp
// Function: Player::bet(int)
bool Player::bet(int value)
{
    bool allIn = false;

    if ((chips - value) <= 0) {
        allIn =  true;
        chips = 0;
        setState(BET, state.bet + chips);
    }
    else
    {
        chips -= value;
        setState(BET, state.bet + value);
    }

    return allIn;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movl 0x10(%rdi), %eax
subl %esi, %eax
jle 0x2f7a
addl %esi, 0x1c(%rdi)
movl %eax, %ecx
jmp 0x2f7c
xorl %ecx, %ecx
testl %eax, %eax
setle %al
movl %ecx, 0x10(%rdi)
movl $0x2, 0x18(%rdi)
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/fredericmarchand[P]TexasHoldem/./CardUtil.h
// Function: sortCardArray(Card**, int, int)
static void sortCardArray(Card *cards[], int left, int right)
{
    int i = left, j = right;
    Card *tmp;
    Card *pivot = cards[(left + right) / 2];

    while (i <= j) 
    {
        while (cards[i]->getCardValue() < pivot->getCardValue())
        {
            i++;
        }
        while (cards[j]->getCardValue() > pivot->getCardValue())
        {
            j--;
        }
        if (i <= j) 
        {
            tmp = cards[i];
            cards[i] = cards[j];
            cards[j] = tmp;
            i++;
            j--;
        }
    }

    if (left < j)
    {
        sortCardArray(cards, left, j);
    }
    if (i < right)
    {
        sortCardArray(cards, i, right);
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rdi, %r13
movq %rdx, -0x38(%rbp)
movq %rdi, -0x48(%rbp)
movl %edx, %r12d
movl %esi, %ebx
movq %rsi, -0x40(%rbp)
cmpl %edx, %esi
jg 0x359f
movq -0x38(%rbp), %rdx
movq -0x40(%rbp), %rsi
leal (%rsi,%rdx), %eax
movl %eax, %ecx
shrl $0x1f, %ecx
addl %eax, %ecx
sarl %ecx
movslq %ecx, %rax
movq (%r13,%rax,8), %rax
movl %esi, %ebx
movl %edx, %r12d
movq %rax, -0x50(%rbp)
movslq %ebx, %r15
decq %r15
movl %ebx, %r14d
movq 0x8(%r13,%r15,8), %rdi
callq 0x24b6
movl %eax, %ebx
movq -0x50(%rbp), %rdi
callq 0x24b6
incq %r15
incl %r14d
cmpl %eax, %ebx
jl 0x351a
leal -0x1(%r14), %eax
movl %eax, -0x2c(%rbp)
movslq %r12d, %r13
incq %r13
movq -0x48(%rbp), %rax
movq -0x8(%rax,%r13,8), %rdi
callq 0x24b6
movl %eax, %ebx
movq -0x50(%rbp), %rdi
callq 0x24b6
decq %r13
decl %r12d
cmpl %eax, %ebx
jg 0x3546
movq -0x48(%rbp), %rax
cmpq %r13, %r15
jle 0x357d
incl %r12d
movq %rax, %r13
movl -0x2c(%rbp), %ebx
jmp 0x3596
movq %rax, %rdx
movq (%rax,%r15,8), %rax
movq (%rdx,%r13,8), %rcx
movq %rcx, (%rdx,%r15,8)
movq %rax, (%rdx,%r13,8)
movq %rdx, %r13
movl %r14d, %ebx
cmpl %r12d, %ebx
jle 0x3511
movq -0x40(%rbp), %rsi
cmpl %esi, %r12d
jle 0x35b3
movq %r13, %rdi
movl %r12d, %edx
callq 0x34bf
movl %ebx, %esi
movq -0x38(%rbp), %rdx
cmpl %edx, %ebx
jl 0x34db
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/fredericmarchand[P]TexasHoldem/Game.cpp
// Function: Game::Game(int)
Game::Game(int numPlayers)
{
    this->numPlayers = numPlayers;
    players = new Player*[numPlayers];
    for (int i = 0; i < numPlayers; ++i)
    {
        players[i] = new Player(100000, true);
    }

    deckPointer = 0;

    int index = 0;
    int suit = HEARTS;
    for (; suit <= DIAMONDS; ++suit)
    {
        int value = TWO;
        for (; value <= ACE; ++value)
        {
            deck[index++] = new Card((Suit)suit, (CardValue)value);
        }
    }
    resetDeck();
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %esi, %r14d
movq %rdi, %rbx
movl %esi, 0x8(%rdi)
movl %esi, %r15d
leaq (,%r15,8), %rax
testl %esi, %esi
movq $-0x1, %rdi
cmovnsq %rax, %rdi
callq 0x2030
movq %rax, (%rbx)
testl %r14d, %r14d
jle 0x3a7d
xorl %r12d, %r12d
movl $0x28, %edi
callq 0x2130
movq %rax, %r14
movq %rax, %rdi
movl $0x186a0, %esi          # imm = 0x186A0
movl $0x1, %edx
callq 0x2996
movq (%rbx), %rax
movq %r14, (%rax,%r12,8)
incq %r12
cmpq %r12, %r15
jne 0x3a4f
movl $0x0, 0x38(%rbx)
movq %rbx, -0x30(%rbp)
leaq 0x40(%rbx), %r13
xorl %r14d, %r14d
xorl %ebx, %ebx
leal 0x2(%rbx), %r12d
movl $0x8, %edi
callq 0x2130
movq %rax, %r15
movq %rax, %rdi
movl %r14d, %esi
movl %r12d, %edx
callq 0x248c
movq %r15, (%r13,%rbx,8)
incq %rbx
cmpl $0xd, %ebx
jne 0x3a91
incl %r14d
addq $0x68, %r13
cmpl $0x4, %r14d
jne 0x3a8f
xorps %xmm0, %xmm0
movq -0x30(%rbp), %rax
movups %xmm0, 0x2c(%rax)
movups %xmm0, 0x20(%rax)
movups %xmm0, 0x10(%rax)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
movl $0x28, %esi
movq %r14, %rdi
jmp 0x3b04
movq %rax, %rbx
movl $0x8, %esi
movq %r15, %rdi
callq 0x2140
movq %rbx, %rdi
callq 0x21c0
nop
// File: /workspace/github_cpp_makefile_star2_O3/fredericmarchand[P]TexasHoldem/Game.cpp
// Function: Game::Game(Game*)
Game::Game(Game *game)
{
    numPlayers = game->getPlayerCount();
    players = new Player*[numPlayers];
    for (int i = 0; i < numPlayers; ++i)
    {
        players[i] = new Player(game->getPlayers()[i]);
    }
    
    deckPointer = 0;

    for (int i = 0; i < TOTAL_CARDS; ++i)
    {
        deck[i] = new Card(game->deck[i]);
    }

    flop[0] = getCard(game->flop[0]);
    flop[1] = getCard(game->flop[1]);
    flop[2] = getCard(game->flop[2]);
    turn = getCard(game->turn);
    river = getCard(game->river);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rsi, %r14
movq %rdi, %rbx
movslq 0x8(%rsi), %r15
leaq (,%r15,8), %rax
testq %r15, %r15
movl %r15d, 0x8(%rdi)
movq $-0x1, %rdi
cmovnsq %rax, %rdi
callq 0x2030
movq %rax, (%rbx)
testq %r15, %r15
jle 0x3b96
xorl %r12d, %r12d
movl $0x28, %edi
callq 0x2130
movq %rax, %r15
movq (%r14), %rax
movq (%rax,%r12,8), %rsi
movq %r15, %rdi
callq 0x29bc
movq (%rbx), %rax
movq %r15, (%rax,%r12,8)
incq %r12
movslq 0x8(%rbx), %rax
cmpq %rax, %r12
jl 0x3b67
movl $0x0, 0x38(%rbx)
movl $0x8, %r12d
movl $0x8, %edi
callq 0x2130
movq %rax, %r15
movq (%r14,%r12,8), %rsi
movq %rax, %rdi
callq 0x2498
movq %r15, (%rbx,%r12,8)
incq %r12
cmpq $0x3c, %r12
jne 0x3ba3
movq 0x10(%r14), %rsi
movq %rbx, %rdi
callq 0x3c58
movq %rax, 0x10(%rbx)
movq 0x18(%r14), %rsi
movq %rbx, %rdi
callq 0x3c58
movq %rax, 0x18(%rbx)
movq 0x20(%r14), %rsi
movq %rbx, %rdi
callq 0x3c58
movq %rax, 0x20(%rbx)
movq 0x28(%r14), %rsi
movq %rbx, %rdi
callq 0x3c58
movq %rax, 0x28(%rbx)
movq 0x30(%r14), %rsi
movq %rbx, %rdi
callq 0x3c58
movq %rax, 0x30(%rbx)
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
movl $0x28, %esi
jmp 0x3c34
movq %rax, %rbx
movl $0x8, %esi
movq %r15, %rdi
callq 0x2140
movq %rbx, %rdi
callq 0x21c0
// File: /workspace/github_cpp_makefile_star2_O3/fredericmarchand[P]TexasHoldem/Game.cpp
// Function: Game::getCard(Card*)
Card* Game::getCard(Card *card)
{
    if (card == NULL)
    {
        return NULL;
    }

    for (int i = 0; i < TOTAL_CARDS; ++i)
    {
        if (deck[i] == NULL)
            cout << "FUCK" << endl;
        if (card->getSuit() == deck[i]->getSuit() && card->getCardValue() == deck[i]->getCardValue())
        {
            return deck[i];
        }
    }
    //never happens
    return NULL;
}

// Assembly:
testq %rsi, %rsi
je 0x3d00
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %r15
movq %rdi, %r14
movl $0x8, %r13d
movq 0x634e(%rip), %r12      # 0x9fd0
cmpq $0x0, (%r14,%r13,8)
jne 0x3cc5
movl $0x4, %edx
movq %r12, %rdi
leaq 0x34ba(%rip), %rsi      # 0x7152
callq 0x2150
movq (%r12), %rax
movq -0x18(%rax), %rdi
addq %r12, %rdi
movl $0xa, %esi
callq 0x2120
movsbl %al, %esi
movq %r12, %rdi
callq 0x2040
movq %rax, %rdi
callq 0x2090
movq %r15, %rdi
callq 0x24ae
movl %eax, %ebx
movq (%r14,%r13,8), %rdi
callq 0x24ae
cmpl %eax, %ebx
jne 0x3cf3
movq %r15, %rdi
callq 0x24b6
movl %eax, %ebx
movq (%r14,%r13,8), %rdi
callq 0x24b6
cmpl %eax, %ebx
je 0x3d03
incq %r13
cmpq $0x3c, %r13
jne 0x3c82
xorl %eax, %eax
jmp 0x3d07
xorl %eax, %eax
retq
movq (%r14,%r13,8), %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/fredericmarchand[P]TexasHoldem/Game.cpp
// Function: Game::~Game()
Game::~Game()
{
    for (int i = 0; i < numPlayers; ++i)
    {
        delete players[i];
    }
    delete [] players;

    for (int i = 0; i < TOTAL_CARDS; ++i)
    {
        delete deck[i];
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
cmpl $0x0, 0x8(%rdi)
jle 0x3d59
xorl %r15d, %r15d
movq (%rbx), %rax
movq (%rax,%r15,8), %r14
testq %r14, %r14
je 0x3d40
movq %r14, %rdi
callq 0x29f4
movl $0x28, %esi
movq %r14, %rdi
callq 0x2140
incq %r15
movslq 0x8(%rbx), %rax
cmpq %rax, %r15
jl 0x3d2c
movq (%rbx), %rdi
testq %rdi, %rdi
je 0x3d66
callq 0x2170
movl $0x8, %r15d
movq (%rbx,%r15,8), %r14
testq %r14, %r14
je 0x3d7d
movq %r14, %rdi
callq 0x24a8
movl $0x8, %esi
movq %r14, %rdi
callq 0x2140
incq %r15
cmpq $0x3c, %r15
jne 0x3d6c
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/fredericmarchand[P]TexasHoldem/Game.cpp
// Function: Game::rotateDealerChip()
void Game::rotateDealerChip()
{
    int dealer;
    for (int i = 0; i < numPlayers; ++i)
    {
        if (players[i]->isDealer())
        {
           dealer = i;
           break;
        }
    }
    players[dealer]->setDealer(false);
    if (dealer == 0)
    {
        players[numPlayers-1]->setDealer(true);
    }
    else
    {
        players[dealer-1]->setDealer(true);
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
cmpl $0x0, 0x8(%rdi)
jle 0x3ddc
xorl %r14d, %r14d
movq (%rbx), %rax
movq (%rax,%r14,8), %rdi
callq 0x2a36
testb %al, %al
jne 0x3ddf
incq %r14
movslq 0x8(%rbx), %rax
cmpq %rax, %r14
jl 0x3dbe
jmp 0x3ddf
xorl %r14d, %r14d
movq (%rbx), %rax
movl %r14d, %r15d
movq (%rax,%r15,8), %rdi
xorl %esi, %esi
callq 0x2a54
testl %r14d, %r14d
movslq 0x8(%rbx), %rax
cmovneq %r15, %rax
movq (%rbx), %rcx
movq -0x8(%rcx,%rax,8), %rdi
movl $0x1, %esi
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0x2a54
nop
// File: /workspace/github_cpp_makefile_star2_O3/fredericmarchand[P]TexasHoldem/Game.cpp
// Function: Game::getDealer()
Player* Game::getDealer()
{
    for (int i = 0; i < numPlayers; ++i)
    {
        if (players[i]->isDealer())
        {
           return players[i];
        }
    }
    //never happens
    return NULL;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
cmpl $0x0, 0x8(%rdi)
jle 0x3e4e
movq %rdi, %r14
xorl %ebx, %ebx
xorl %r15d, %r15d
movq (%r14), %rax
movq (%rax,%r15,8), %rdi
callq 0x2a36
testb %al, %al
jne 0x3e52
incq %r15
movslq 0x8(%r14), %rax
cmpq %rax, %r15
jl 0x3e30
jmp 0x3e59
xorl %ebx, %ebx
jmp 0x3e59
movq (%r14), %rax
movq (%rax,%r15,8), %rbx
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/fredericmarchand[P]TexasHoldem/Game.cpp
// Function: Game::getBigBlindPlayer()
Player* Game::getBigBlindPlayer()
{
    int dealer;
    for (int i = 0; i < numPlayers; ++i)
    {
        if (players[i]->isDealer())
        {
           dealer = i;
           break;
        }
    }
    if (dealer == 0) 
    {
        return players[numPlayers-2];
    }
    
    if (numPlayers == 2)
    {
        return players[dealer];
    }
    return players[dealer-2];
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movq %rdi, %rbx
cmpl $0x0, 0x8(%rdi)
jle 0x3ebb
xorl %r14d, %r14d
movq (%rbx), %rax
movq (%rax,%r14,8), %rdi
callq 0x2a36
testb %al, %al
jne 0x3e97
incq %r14
movslq 0x8(%rbx), %rax
cmpq %rax, %r14
jl 0x3e7b
testl %r14d, %r14d
je 0x3ebb
xorl %eax, %eax
cmpl $0x2, 0x8(%rbx)
sete %al
movl %r14d, %ecx
shlq $0x3, %rcx
addq (%rbx), %rcx
shll $0x4, %eax
addq %rcx, %rax
addq $-0x10, %rax
jmp 0x3eca
movq (%rbx), %rax
movslq 0x8(%rbx), %rcx
leaq (%rax,%rcx,8), %rax
addq $-0x10, %rax
movq (%rax), %rax
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/fredericmarchand[P]TexasHoldem/Game.cpp
// Function: Game::getSmallBlindPlayer()
Player* Game::getSmallBlindPlayer()
{
    int dealer;
    for (int i = 0; i < numPlayers; ++i)
    {
        if (players[i]->isDealer())
        {
           dealer = i;
           break;
        }
    }
    if (dealer == 0) 
    {
        return players[numPlayers-1];
    }
    return players[dealer-1];
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movq %rdi, %rbx
movslq 0x8(%rdi), %rcx
testq %rcx, %rcx
jle 0x3f0e
xorl %r14d, %r14d
movq (%rbx), %rax
movq (%rax,%r14,8), %rdi
callq 0x2a36
movslq 0x8(%rbx), %rcx
testb %al, %al
jne 0x3f04
incq %r14
cmpq %rcx, %r14
jl 0x3ee8
movl %r14d, %eax
testq %rax, %rax
cmovneq %rax, %rcx
movq (%rbx), %rax
movq -0x8(%rax,%rcx,8), %rax
popq %rbx
popq %r14
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/fredericmarchand[P]TexasHoldem/Game.cpp
// Function: Game::getNextPlayer(Player*)
Player* Game::getNextPlayer(Player *player)
{
    int index = 0;
    for (int i = 0; i < numPlayers; ++i)
    {
        if (player == players[i])
        {
            index = i;
            break;
        }
    }
    if (index == 0)
    {
        return players[numPlayers-1];
    }
    return players[index-1];
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movslq 0x8(%rdi), %rcx
movq (%rdi), %rax
testq %rcx, %rcx
jle 0x3f47
movl %ecx, %edx
xorl %edi, %edi
cmpq %rsi, (%rax,%rdi,8)
je 0x3f3f
incq %rdi
cmpl %edi, %edx
jne 0x3f30
jmp 0x3f47
testl %edi, %edi
cmovnel %edi, %edx
movq %rdx, %rcx
movq -0x8(%rax,%rcx,8), %rax
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/fredericmarchand[P]TexasHoldem/Game.cpp
// Function: Game::getPreviousPlayer(Player*)
Player* Game::getPreviousPlayer(Player *player)
{
    int index = 0;
    for (int i = 0; i < numPlayers; ++i)
    {
        if (player == players[i])
        {
            index = i;
            break;
        }
    }
    do {
        index++;
        if (index == numPlayers)
        {
            index = 0;
        }
    }
    while (players[index]->getState().move == FOLD);
    return players[index];
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movslq 0x8(%rdi), %rax
testq %rax, %rax
jle 0x3f77
movq (%rbx), %rdx
xorl %ecx, %ecx
cmpq %rsi, (%rdx,%rcx,8)
je 0x3f79
incq %rcx
cmpq %rcx, %rax
jne 0x3f69
xorl %ecx, %ecx
incl %ecx
xorl %r14d, %r14d
cmpl 0x8(%rbx), %ecx
je 0x3f86
movl %ecx, %r14d
movq (%rbx), %rax
movslq %r14d, %r15
movq (%rax,%r15,8), %rdi
callq 0x2f52
movl %r14d, %ecx
testl %eax, %eax
je 0x3f79
movq (%rbx), %rax
movq (%rax,%r15,8), %rax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/fredericmarchand[P]TexasHoldem/Game.cpp
// Function: Game::flipTurn(bool)
void Game::flipTurn(bool verbose)
{
    discardNextCard();
    turn = flipNextCard();
    if (verbose)
        turn->printCard();
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, %rax
movslq 0x38(%rdi), %rcx
movq 0x48(%rdi,%rcx,8), %rdi
addl $0x2, %ecx
movl %ecx, 0x38(%rax)
movq %rdi, 0x28(%rax)
testl %esi, %esi
je 0x4340
popq %rbp
jmp 0x2644
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/fredericmarchand[P]TexasHoldem/Game.cpp
// Function: Game::flipRiver(bool)
void Game::flipRiver(bool verbose)
{
    discardNextCard();
    river = flipNextCard();
    if (verbose)
        river->printCard();
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, %rax
movslq 0x38(%rdi), %rcx
movq 0x48(%rdi,%rcx,8), %rdi
addl $0x2, %ecx
movl %ecx, 0x38(%rax)
movq %rdi, 0x30(%rax)
testl %esi, %esi
je 0x4366
popq %rbp
jmp 0x2644
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/fredericmarchand[P]TexasHoldem/Game.cpp
// Function: Game::shuffleDeck(int)
void Game::shuffleDeck(int start)
{
    // Use a different seed value so that we don't get same
    // result each time we run this program
    srand (time(NULL));
 
    // Start from the last element and swap one by one. We don't
    // need to run for the first element that's why i > 0
    for (int i = TOTAL_CARDS-1; i >= start; i--)
    {
        // Pick a random index from 0 to i
        int j = rand() % (i+1);
 
        // Swap arr[i] with the element at random index
        swap(&deck[i], &deck[j]);
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movl %esi, %r14d
movq %rdi, %rbx
xorl %edi, %edi
callq 0x2100
movl %eax, %edi
callq 0x2110
cmpl $0x33, %r14d
jg 0x4433
movslq %r14d, %r14
movl $0x34, %r15d
callq 0x2050
cltd
idivl %r15d
movslq %edx, %rax
movq 0x38(%rbx,%r15,8), %rcx
movq 0x40(%rbx,%rax,8), %rdx
movq %rdx, 0x38(%rbx,%r15,8)
movq %rcx, 0x40(%rbx,%rax,8)
decq %r15
cmpq %r14, %r15
jg 0x440b
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/fredericmarchand[P]TexasHoldem/Game.cpp
// Function: Game::determineWinner()
int Game::determineWinner()
{
    //Check if everyone folded but one person
    for (int i = 0; i < numPlayers; ++i)
    {
        if (checkLastPlayerRemaining(players[i]) == true)
        {
            givePotToWinner(players[i]);
            return i;
        }
    }
    
    int equalHands = 0;
    Hand hands[numPlayers];
    Hand best = NOTHING;
    int playerIndex = 0;
    for (int i = 0; i < numPlayers; ++i) 
    {
        hands[i] = players[i]->bestHand(flop, turn, river, true);
        if (hands[i] > best)
        {
            best = hands[i];
            playerIndex = i;
            equalHands = 0;
        }
        else if (hands[i] == best)
        {
            equalHands = 1;
        }        
    }

    if (equalHands == 1)
    {
        splitPot();
        return SPLIT;
    }
    else
    {
        givePotToWinner(players[playerIndex]);
    }

    return playerIndex;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rdi, %r14
cmpl $0x0, 0x8(%rdi)
jle 0x447d
xorl %ebx, %ebx
movq (%r14), %rax
movq (%rax,%rbx,8), %rsi
movq %r14, %rdi
callq 0x453c
testb %al, %al
jne 0x4502
incq %rbx
movslq 0x8(%r14), %rax
cmpq %rax, %rbx
jl 0x445a
movq %rsp, %r15
cmpl $0x0, 0x8(%r14)
jle 0x4513
movq %r15, -0x30(%rbp)
leaq 0x10(%r14), %rax
movq %rax, -0x38(%rbp)
xorl %r13d, %r13d
xorl %ebx, %ebx
xorl %r15d, %r15d
xorl %r12d, %r12d
movq (%r14), %rax
movq 0x28(%r14), %rdx
movq (%rax,%r13,8), %rdi
movq 0x30(%r14), %rcx
movq -0x38(%rbp), %rsi
movl $0x1, %r8d
callq 0x35d0
cmpl %r15d, %eax
movl $0x1, %ecx
cmovel %ecx, %r12d
movl $0x0, %ecx
cmovgl %ecx, %r12d
cmovgl %eax, %r15d
cmovgl %r13d, %ebx
incq %r13
movslq 0x8(%r14), %rax
cmpq %rax, %r13
jl 0x44a2
cmpl $0x1, %r12d
movq -0x30(%rbp), %r15
jne 0x4515
movq %r14, %rdi
callq 0x46e6
movl $0xffffffff, %ebx       # imm = 0xFFFFFFFF
jmp 0x4527
movq (%r14), %rax
movq (%rax,%rbx,8), %rsi
movq %r14, %rdi
callq 0x45a4
jmp 0x452a
xorl %ebx, %ebx
movq (%r14), %rax
movslq %ebx, %rcx
movq (%rax,%rcx,8), %rsi
movq %r14, %rdi
callq 0x45a4
movq %r15, %rsp
movl %ebx, %eax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/fredericmarchand[P]TexasHoldem/Game.cpp
// Function: Game::checkLastPlayerRemaining(Player*)
bool Game::checkLastPlayerRemaining(Player *player)
{
    bool ret = true;
    if (player->getState().move == FOLD)
        return false;

    for (int i = 0; i < numPlayers; ++i)
    {
        if (players[i] != player)
        {
            ret &= (players[i]->getState().move == FOLD);
        }
    }
    return ret;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rsi, %rbx
movq %rdi, %r15
movq %rsi, %rdi
callq 0x2f52
testl %eax, %eax
je 0x4591
movl 0x8(%r15), %eax
movb $0x1, %r14b
testl %eax, %eax
jle 0x4594
xorl %r12d, %r12d
movq (%r15), %rcx
movq (%rcx,%r12,8), %rdi
cmpq %rbx, %rdi
je 0x4584
callq 0x2f52
testl %eax, %eax
sete %al
andb %al, %r14b
movl 0x8(%r15), %eax
incq %r12
movslq %eax, %rcx
cmpq %rcx, %r12
jl 0x4567
jmp 0x4594
xorl %r14d, %r14d
andb $0x1, %r14b
movl %r14d, %eax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/fredericmarchand[P]TexasHoldem/Game.cpp
// Function: Game::givePotToWinner(Player*)
void Game::givePotToWinner(Player *winner)
{
    winner->addChips(pot);
    cout << "Winner: Player " << getPlayerIndex(winner) << endl;
    for (int i = 0; i < numPlayers; ++i)
    {
        cout << "Player " << i << ": $" << players[i]->getChipCount() << endl;
    }
    pot = 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %rbx
movl 0xc(%rdi), %esi
movq %r14, %rdi
callq 0x2a22
movq 0x5a06(%rip), %rdi      # 0x9fd0
leaq 0x2b3c(%rip), %rsi      # 0x710d
movl $0xf, %edx
callq 0x2150
movslq 0x8(%rbx), %rax
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
testq %rax, %rax
jle 0x4600
movq (%rbx), %rdx
xorl %ecx, %ecx
cmpq %r14, (%rdx,%rcx,8)
je 0x45fe
incq %rcx
cmpq %rcx, %rax
jne 0x45ee
jmp 0x4600
movl %ecx, %esi
movq 0x59c9(%rip), %rdi      # 0x9fd0
callq 0x21b0
movq %rax, %r14
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %r14, %rdi
movl $0xa, %esi
callq 0x2120
movsbl %al, %esi
movq %r14, %rdi
callq 0x2040
movq %rax, %rdi
callq 0x2090
cmpl $0x0, 0x8(%rbx)
jle 0x46cf
xorl %r14d, %r14d
movq 0x5986(%rip), %r15      # 0x9fd0
leaq 0x2b9e(%rip), %r13      # 0x71ef
movl $0x7, %edx
movq %r15, %rdi
leaq 0x2baa(%rip), %rsi      # 0x720a
callq 0x2150
movq %r15, %rdi
movl %r14d, %esi
callq 0x21b0
movq %rax, %r12
movl $0x3, %edx
movq %rax, %rdi
movq %r13, %rsi
callq 0x2150
movq (%rbx), %rax
movq (%rax,%r14,8), %rdi
callq 0x2a0e
movq %r12, %rdi
movl %eax, %esi
callq 0x21b0
movq %rax, %r12
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %r12, %rdi
movl $0xa, %esi
callq 0x2120
movsbl %al, %esi
movq %r12, %rdi
callq 0x2040
movq %rax, %rdi
callq 0x2090
incq %r14
movslq 0x8(%rbx), %rax
cmpq %rax, %r14
jl 0x4651
movl $0x0, 0xc(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/fredericmarchand[P]TexasHoldem/Game.cpp
// Function: Game::splitPot()
void Game::splitPot()
{
    cout << "Split pot" << endl;
    for (int i = 0; i < numPlayers; ++i)
    {
        players[i]->addChips((int)(pot/numPlayers));
        cout << "Player " << i << ": $" << players[i]->getChipCount() << endl;
    }
    pot = 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq 0x58d2(%rip), %r14      # 0x9fd0
leaq 0x29fe(%rip), %rsi      # 0x7103
movl $0x9, %edx
movq %r14, %rdi
callq 0x2150
movq (%r14), %rax
movq -0x18(%rax), %rdi
addq %r14, %rdi
movl $0xa, %esi
callq 0x2120
movsbl %al, %esi
movq %r14, %rdi
callq 0x2040
movq %rax, %rdi
callq 0x2090
movl 0x8(%rbx), %ecx
testl %ecx, %ecx
jle 0x47eb
xorl %r14d, %r14d
movq 0x5882(%rip), %r15      # 0x9fd0
leaq 0x2a9a(%rip), %r13      # 0x71ef
movq (%rbx), %rax
movq (%rax,%r14,8), %rdi
movl 0xc(%rbx), %eax
cltd
idivl %ecx
movl %eax, %esi
callq 0x2a22
movl $0x7, %edx
movq %r15, %rdi
leaq 0x2a92(%rip), %rsi      # 0x720a
callq 0x2150
movq %r15, %rdi
movl %r14d, %esi
callq 0x21b0
movq %rax, %r12
movl $0x3, %edx
movq %rax, %rdi
movq %r13, %rsi
callq 0x2150
movq (%rbx), %rax
movq (%rax,%r14,8), %rdi
callq 0x2a0e
movq %r12, %rdi
movl %eax, %esi
callq 0x21b0
movq %rax, %r12
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %r12, %rdi
movl $0xa, %esi
callq 0x2120
movsbl %al, %esi
movq %r12, %rdi
callq 0x2040
movq %rax, %rdi
callq 0x2090
incq %r14
movslq 0x8(%rbx), %rcx
cmpq %rcx, %r14
jl 0x4755
movl $0x0, 0xc(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/fredericmarchand[P]TexasHoldem/Game.cpp
// Function: Game::printPot()
void Game::printPot()
{
    cout << endl;
    for (int i = 0; i < numPlayers; ++i)
    {
        cout << "Player " << i << ": $" << players[i]->getChipCount() << endl;
    }
    cout << "Pot: $" << pot << endl;
    cin.ignore();
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq 0x57b6(%rip), %r14      # 0x9fd0
movq (%r14), %rax
movq -0x18(%rax), %rdi
addq %r14, %rdi
movl $0xa, %esi
callq 0x2120
movsbl %al, %esi
movq %r14, %rdi
callq 0x2040
movq %rax, %rdi
callq 0x2090
cmpl $0x0, 0x8(%rbx)
jle 0x48da
xorl %r14d, %r14d
movq 0x577b(%rip), %r15      # 0x9fd0
leaq 0x2993(%rip), %r13      # 0x71ef
movl $0x7, %edx
movq %r15, %rdi
leaq 0x299f(%rip), %rsi      # 0x720a
callq 0x2150
movq %r15, %rdi
movl %r14d, %esi
callq 0x21b0
movq %rax, %r12
movl $0x3, %edx
movq %rax, %rdi
movq %r13, %rsi
callq 0x2150
movq (%rbx), %rax
movq (%rax,%r14,8), %rdi
callq 0x2a0e
movq %r12, %rdi
movl %eax, %esi
callq 0x21b0
movq %rax, %r12
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %r12, %rdi
movl $0xa, %esi
callq 0x2120
movsbl %al, %esi
movq %r12, %rdi
callq 0x2040
movq %rax, %rdi
callq 0x2090
incq %r14
movslq 0x8(%rbx), %rax
cmpq %rax, %r14
jl 0x485c
movq 0x56ef(%rip), %r14      # 0x9fd0
leaq 0x2835(%rip), %rsi      # 0x711d
movl $0x6, %edx
movq %r14, %rdi
callq 0x2150
movl 0xc(%rbx), %esi
movq %r14, %rdi
callq 0x21b0
movq %rax, %rbx
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x2120
movsbl %al, %esi
movq %rbx, %rdi
callq 0x2040
movq %rax, %rdi
callq 0x2090
movq 0x56af(%rip), %rdi      # 0x9fe0
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x21e0
// File: /workspace/github_cpp_makefile_star2_O3/fredericmarchand[P]TexasHoldem/Game.cpp
// Function: Game::getMove()
Move Game::getMove()
{
    Move move;
    string moveStr = "";

    while (moveStr.compare("c") != 0 && moveStr.compare("b") != 0 && moveStr.compare("f") != 0)
    {
        cout << "Check/Call (c), Bet/Raise (b), Fold (f)" << endl;
        cin >> moveStr;
    }
    if (moveStr.compare("c") == 0)
    {
        move = CHECK;
    }
    if (moveStr.compare("b") == 0)
    {
        move = BET;
    }
    if (moveStr.compare("f") == 0)
    {
        move = FOLD;
    }

    return move;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
leaq -0x38(%rbp), %rax
movq %rax, -0x10(%rax)
leaq 0x21fd(%rip), %rdx      # 0x709d
leaq -0x48(%rbp), %rbx
movq %rbx, %rdi
movq %rdx, %rsi
callq 0x28cc
leaq 0x226e(%rip), %r14      # 0x7124
leaq 0x2269(%rip), %r15      # 0x7126
movq 0x510c(%rip), %r13      # 0x9fd0
movq 0x5115(%rip), %r12      # 0x9fe0
movq %rbx, %rdi
movq %r14, %rsi
callq 0x2060
testl %eax, %eax
je 0x4f45
movq %rbx, %rdi
movq %r15, %rsi
callq 0x2060
testl %eax, %eax
je 0x4f45
movq %rbx, %rdi
leaq 0x2235(%rip), %rsi      # 0x7128
callq 0x2060
testl %eax, %eax
je 0x4f45
movl $0x27, %edx
movq %r13, %rdi
leaq 0x221f(%rip), %rsi      # 0x712a
callq 0x2150
movq (%r13), %rax
movq -0x18(%rax), %rdi
addq %r13, %rdi
movl $0xa, %esi
callq 0x2120
movsbl %al, %esi
movq %r13, %rdi
callq 0x2040
movq %rax, %rdi
callq 0x2090
movq %r12, %rdi
movq %rbx, %rsi
callq 0x2160
jmp 0x4ecb
leaq 0x21d8(%rip), %rsi      # 0x7124
leaq -0x48(%rbp), %r15
movq %r15, %rdi
callq 0x2060
leaq 0x21c7(%rip), %rsi      # 0x7126
movq %r15, %rdi
callq 0x2060
movl %eax, %ebx
leaq 0x21b8(%rip), %rsi      # 0x7128
movq %r15, %rdi
callq 0x2060
movl %eax, %r14d
movq (%r15), %rdi
leaq -0x38(%rbp), %rax
cmpq %rax, %rdi
je 0x4f93
movq -0x38(%rbp), %rsi
incq %rsi
callq 0x2140
xorl %eax, %eax
cmpl $0x1, %ebx
adcl $0x1, %eax
testl %r14d, %r14d
cmovel %r14d, %eax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
movq -0x48(%rbp), %rdi
leaq -0x38(%rbp), %rax
cmpq %rax, %rdi
je 0x4fcd
movq -0x38(%rbp), %rsi
incq %rsi
callq 0x2140
movq %rbx, %rdi
callq 0x21c0
nop