// File: /workspace/github_c_makefile_star2_O0/jogolden[P]ps4flashtool/southbridge.c
// Function: init_eap_keys
void init_eap_keys() {
    int i;

    mersenne_init(random_seeds,
        eap_keys[7][0] + eap_keys[3][0] + eap_keys[6][0]
        + 2 * (eap_keys[7][1] + eap_keys[3][1] + eap_keys[6][1])
        + 3 * (eap_keys[7][2] + eap_keys[3][2] + eap_keys[6][2])
        + 4 * (eap_keys[7][3] + eap_keys[3][3] + eap_keys[6][3]
    ));

    for(i = 0; i < 4; i++) {
        eap_keys[3][i] ^= mersenne_twister(random_seeds);
        eap_keys[7][i] ^= mersenne_twister(random_seeds);
    }

    mersenne_init(random_seeds,
        eap_keys[4][0] + eap_keys[5][0] + eap_keys[6][0]
        + 2 * (eap_keys[6][1] + eap_keys[5][1] + eap_keys[4][1])
        + 3 * (eap_keys[5][2] + eap_keys[4][2] + eap_keys[6][2])
        + 4 * (eap_keys[4][3] + eap_keys[5][3] + eap_keys[6][3])
    );

    for(i = 0; i < 4; i++) {
        eap_keys[4][i] ^= mersenne_twister(random_seeds);
        eap_keys[5][i] ^= mersenne_twister(random_seeds);
    }

    mersenne_init(random_seeds,
        eap_keys[0][0] + eap_keys[1][0] + eap_keys[2][0]
        + 2 * (eap_keys[1][1] + eap_keys[2][1] + eap_keys[0][1])
        + 3 * (eap_keys[1][2] + eap_keys[2][2] + eap_keys[0][2])
        + 4 * (eap_keys[2][3] + eap_keys[1][3] + eap_keys[0][3])
    );

    for(i = 0; i < 4; i++) {
        eap_keys[1][i] ^= mersenne_twister(random_seeds);
        eap_keys[2][i] ^= mersenne_twister(random_seeds);
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movl 0x5722(%rip), %esi      # 0x103f0
addl 0x56dc(%rip), %esi      # 0x103b0
addl 0x5706(%rip), %esi      # 0x103e0
movl 0x5714(%rip), %eax      # 0x103f4
addl 0x56ce(%rip), %eax      # 0x103b4
addl 0x56f8(%rip), %eax      # 0x103e4
shll %eax
addl %eax, %esi
movl 0x5702(%rip), %eax      # 0x103f8
addl 0x56bc(%rip), %eax      # 0x103b8
addl 0x56e6(%rip), %eax      # 0x103e8
imull $0x3, %eax, %eax
addl %eax, %esi
movl 0x56ef(%rip), %eax      # 0x103fc
addl 0x56a9(%rip), %eax      # 0x103bc
addl 0x56d3(%rip), %eax      # 0x103ec
shll $0x2, %eax
addl %eax, %esi
leaq 0x56db(%rip), %rdi      # 0x10400
callq 0xabf0
movl $0x0, -0x4(%rbp)
cmpl $0x4, -0x4(%rbp)
jge 0xad92
leaq 0x56c2(%rip), %rdi      # 0x10400
callq 0xaaa0
movl %eax, %edx
movslq -0x4(%rbp), %rcx
leaq 0x5630(%rip), %rax      # 0x10380
xorl 0x30(%rax,%rcx,4), %edx
leaq 0x5625(%rip), %rax      # 0x10380
movl %edx, 0x30(%rax,%rcx,4)
leaq 0x569a(%rip), %rdi      # 0x10400
callq 0xaaa0
movl %eax, %edx
movslq -0x4(%rbp), %rcx
leaq 0x5608(%rip), %rax      # 0x10380
xorl 0x70(%rax,%rcx,4), %edx
leaq 0x55fd(%rip), %rax      # 0x10380
movl %edx, 0x70(%rax,%rcx,4)
movl -0x4(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x4(%rbp)
jmp 0xad31
movl 0x5628(%rip), %esi      # 0x103c0
addl 0x5632(%rip), %esi      # 0x103d0
addl 0x563c(%rip), %esi      # 0x103e0
movl 0x563a(%rip), %eax      # 0x103e4
addl 0x5624(%rip), %eax      # 0x103d4
addl 0x560e(%rip), %eax      # 0x103c4
shll %eax
addl %eax, %esi
movl 0x5618(%rip), %eax      # 0x103d8
addl 0x5602(%rip), %eax      # 0x103c8
addl 0x561c(%rip), %eax      # 0x103e8
imull $0x3, %eax, %eax
addl %eax, %esi
movl 0x55f5(%rip), %eax      # 0x103cc
addl 0x55ff(%rip), %eax      # 0x103dc
addl 0x5609(%rip), %eax      # 0x103ec
shll $0x2, %eax
addl %eax, %esi
leaq 0x5611(%rip), %rdi      # 0x10400
callq 0xabf0
movl $0x0, -0x4(%rbp)
cmpl $0x4, -0x4(%rbp)
jge 0xae5c
leaq 0x55f8(%rip), %rdi      # 0x10400
callq 0xaaa0
movl %eax, %edx
movslq -0x4(%rbp), %rcx
leaq 0x5566(%rip), %rax      # 0x10380
xorl 0x40(%rax,%rcx,4), %edx
leaq 0x555b(%rip), %rax      # 0x10380
movl %edx, 0x40(%rax,%rcx,4)
leaq 0x55d0(%rip), %rdi      # 0x10400
callq 0xaaa0
movl %eax, %edx
movslq -0x4(%rbp), %rcx
leaq 0x553e(%rip), %rax      # 0x10380
xorl 0x50(%rax,%rcx,4), %edx
leaq 0x5533(%rip), %rax      # 0x10380
movl %edx, 0x50(%rax,%rcx,4)
movl -0x4(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x4(%rbp)
jmp 0xadfb
movl 0x551e(%rip), %esi      # 0x10380
addl 0x5528(%rip), %esi      # 0x10390
addl 0x5532(%rip), %esi      # 0x103a0
movl 0x5520(%rip), %eax      # 0x10394
addl 0x552a(%rip), %eax      # 0x103a4
addl 0x5504(%rip), %eax      # 0x10384
shll %eax
addl %eax, %esi
movl 0x550e(%rip), %eax      # 0x10398
addl 0x5518(%rip), %eax      # 0x103a8
addl 0x54f2(%rip), %eax      # 0x10388
imull $0x3, %eax, %eax
addl %eax, %esi
movl 0x550b(%rip), %eax      # 0x103ac
addl 0x54f5(%rip), %eax      # 0x1039c
addl 0x54df(%rip), %eax      # 0x1038c
shll $0x2, %eax
addl %eax, %esi
leaq 0x5547(%rip), %rdi      # 0x10400
callq 0xabf0
movl $0x0, -0x4(%rbp)
cmpl $0x4, -0x4(%rbp)
jge 0xaf26
leaq 0x552e(%rip), %rdi      # 0x10400
callq 0xaaa0
movl %eax, %edx
movslq -0x4(%rbp), %rcx
leaq 0x549c(%rip), %rax      # 0x10380
xorl 0x10(%rax,%rcx,4), %edx
leaq 0x5491(%rip), %rax      # 0x10380
movl %edx, 0x10(%rax,%rcx,4)
leaq 0x5506(%rip), %rdi      # 0x10400
callq 0xaaa0
movl %eax, %edx
movslq -0x4(%rbp), %rcx
leaq 0x5474(%rip), %rax      # 0x10380
xorl 0x20(%rax,%rcx,4), %edx
leaq 0x5469(%rip), %rax      # 0x10380
movl %edx, 0x20(%rax,%rcx,4)
movl -0x4(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x4(%rbp)
jmp 0xaec5
addq $0x10, %rsp
popq %rbp
retq
nopl (%rax)