// File: /workspace/github_c_makefile_star2_O0/snow1eo[P]IPsec_IKEv2/ike.c
// Function: parse_buff
int parse_buff (void)
{
    uint32_t offset = char2ike_hdr (buff, &HDR_recv);
    uint8_t next_payload = HDR_recv.next_payload;
    while (next_payload != NO_NEXT_PL)
    {
        if (next_payload == PL_SA)
        {
            offset += char2sa_pl (buff + offset, &SA_recv);
            next_payload = SA_recv.header.next_payload;
        }
        else if (next_payload == PL_KE)
        {
            offset += char2ke_pl (buff + offset, &KE_recv);
            next_payload = KE_recv.header.next_payload;
        }
        else if (next_payload == PL_IDi)
        {
            offset += char2id_pl (buff + offset, &IDi_recv);
            next_payload = IDi_recv.header.next_payload;
        }
        else if (next_payload == PL_IDr)
        {
            offset += char2id_pl (buff + offset, &IDr_recv);
            next_payload = IDr_recv.header.next_payload;
        }
        else if (next_payload == PL_CERT)
        {
        }
        else if (next_payload == PL_CERTREQ)
        {
        }
        else if (next_payload == PL_AUTH)
        {
            offset += char2auth_pl (buff + offset, &AUTH_recv);
            next_payload = AUTH_recv.header.next_payload;
        }
        else if (next_payload == PL_NONCE)
        {
            offset += char2nonce_pl (buff + offset, &NONCE_recv);
            next_payload = NONCE_recv.header.next_payload;
        }
        else if (next_payload == PL_NOTIFY)
        {
        }
        else if (next_payload == PL_DELETE)
        {
        }
        else if (next_payload == PL_VID)
        {
        }
        else if (next_payload == PL_TSi)
        {
            offset += char2ts_pl (buff + offset, &TSi_recv);
            next_payload = TSi_recv.header.next_payload;
        }
        else if (next_payload == PL_TSr)
        {
            offset += char2ts_pl (buff + offset, &TSr_recv);
            next_payload = TSr_recv.header.next_payload;
        }
        else if (next_payload == PL_SK)
        {
            offset += char2enc_pl (buff + offset, &SK_recv,
                                   iv_len, integ_key_len);
            if (check_icv () == INVALID)
                return -1;
            return parse_SK ();
        }
        else if (next_payload == PL_CP)
        {
        }
        else if (next_payload == PL_EAP)
        {
        }
        else
        {
            printf ("%d\n", next_payload);
            return -1;
        }
    }
    return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq 0xac81(%rip), %rdi      # 0x125a0
leaq 0xacaa(%rip), %rsi      # 0x125d0
callq 0x3240
movl %eax, -0x8(%rbp)
movb 0xacac(%rip), %al       # 0x125e0
movb %al, -0x9(%rbp)
movzbl -0x9(%rbp), %eax
cmpl $0x0, %eax
je 0x7be1
movzbl -0x9(%rbp), %eax
cmpl $0x21, %eax
jne 0x797a
movq 0xac4c(%rip), %rdi      # 0x125a0
movl -0x8(%rbp), %eax
addq %rax, %rdi
leaq 0xabab(%rip), %rsi      # 0x1250c
callq 0x3450
addl -0x8(%rbp), %eax
movl %eax, -0x8(%rbp)
movb 0xab9a(%rip), %al       # 0x1250c
movb %al, -0x9(%rbp)
jmp 0x7bdc
movzbl -0x9(%rbp), %eax
cmpl $0x22, %eax
jne 0x79b0
movq 0xac16(%rip), %rdi      # 0x125a0
movl -0x8(%rbp), %eax
addq %rax, %rdi
leaq 0xac29(%rip), %rsi      # 0x125c0
callq 0x3120
addl -0x8(%rbp), %eax
movl %eax, -0x8(%rbp)
movb 0xac18(%rip), %al       # 0x125c0
movb %al, -0x9(%rbp)
jmp 0x7bda
movzbl -0x9(%rbp), %eax
cmpl $0x23, %eax
jne 0x79e6
movq 0xabe0(%rip), %rdi      # 0x125a0
movl -0x8(%rbp), %eax
addq %rax, %rdi
leaq 0xab4b(%rip), %rsi      # 0x12518
callq 0x3440
addl -0x8(%rbp), %eax
movl %eax, -0x8(%rbp)
movb 0xab3a(%rip), %al       # 0x12518
movb %al, -0x9(%rbp)
jmp 0x7bd8
movzbl -0x9(%rbp), %eax
cmpl $0x24, %eax
jne 0x7a1c
movq 0xabaa(%rip), %rdi      # 0x125a0
movl -0x8(%rbp), %eax
addq %rax, %rdi
leaq 0xab25(%rip), %rsi      # 0x12528
callq 0x3440
addl -0x8(%rbp), %eax
movl %eax, -0x8(%rbp)
movb 0xab14(%rip), %al       # 0x12528
movb %al, -0x9(%rbp)
jmp 0x7bd6
movzbl -0x9(%rbp), %eax
cmpl $0x25, %eax
jne 0x7a2a
jmp 0x7bd4
movzbl -0x9(%rbp), %eax
cmpl $0x26, %eax
jne 0x7a38
jmp 0x7bd2
movzbl -0x9(%rbp), %eax
cmpl $0x27, %eax
jne 0x7a6e
movq 0xab58(%rip), %rdi      # 0x125a0
movl -0x8(%rbp), %eax
addq %rax, %rdi
leaq 0xaae3(%rip), %rsi      # 0x12538
callq 0x3360
addl -0x8(%rbp), %eax
movl %eax, -0x8(%rbp)
movb 0xaad2(%rip), %al       # 0x12538
movb %al, -0x9(%rbp)
jmp 0x7bd0
movzbl -0x9(%rbp), %eax
cmpl $0x28, %eax
jne 0x7aa4
movq 0xab22(%rip), %rdi      # 0x125a0
movl -0x8(%rbp), %eax
addq %rax, %rdi
leaq 0xab25(%rip), %rsi      # 0x125b0
callq 0x3130
addl -0x8(%rbp), %eax
movl %eax, -0x8(%rbp)
movb 0xab14(%rip), %al       # 0x125b0
movb %al, -0x9(%rbp)
jmp 0x7bce
movzbl -0x9(%rbp), %eax
cmpl $0x29, %eax
jne 0x7ab2
jmp 0x7bcc
movzbl -0x9(%rbp), %eax
cmpl $0x2a, %eax
jne 0x7ac0
jmp 0x7bca
movzbl -0x9(%rbp), %eax
cmpl $0x2b, %eax
jne 0x7ace
jmp 0x7bc8
movzbl -0x9(%rbp), %eax
cmpl $0x2c, %eax
jne 0x7b04
movq 0xaac2(%rip), %rdi      # 0x125a0
movl -0x8(%rbp), %eax
addq %rax, %rdi
leaq 0xaa5d(%rip), %rsi      # 0x12548
callq 0x31b0
addl -0x8(%rbp), %eax
movl %eax, -0x8(%rbp)
movb 0xaa4c(%rip), %al       # 0x12548
movb %al, -0x9(%rbp)
jmp 0x7bc6
movzbl -0x9(%rbp), %eax
cmpl $0x2d, %eax
jne 0x7b3a
movq 0xaa8c(%rip), %rdi      # 0x125a0
movl -0x8(%rbp), %eax
addq %rax, %rdi
leaq 0xaa37(%rip), %rsi      # 0x12558
callq 0x31b0
addl -0x8(%rbp), %eax
movl %eax, -0x8(%rbp)
movb 0xaa26(%rip), %al       # 0x12558
movb %al, -0x9(%rbp)
jmp 0x7bc4
movzbl -0x9(%rbp), %eax
cmpl $0x2e, %eax
jne 0x7b8d
movq 0xaa56(%rip), %rdi      # 0x125a0
movl -0x8(%rbp), %eax
addq %rax, %rdi
movzwl 0xaabb(%rip), %edx      # 0x12612
movzwl 0xaaa2(%rip), %ecx      # 0x12600
leaq 0xaa03(%rip), %rsi      # 0x12568
callq 0x34d0
addl -0x8(%rbp), %eax
movl %eax, -0x8(%rbp)
callq 0x32a0
cmpl $0x0, %eax
jne 0x7b83
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x7be8
callq 0x35f0
movl %eax, -0x4(%rbp)
jmp 0x7be8
movzbl -0x9(%rbp), %eax
cmpl $0x2f, %eax
jne 0x7b98
jmp 0x7bc0
movzbl -0x9(%rbp), %eax
cmpl $0x30, %eax
jne 0x7ba3
jmp 0x7bbe
movzbl -0x9(%rbp), %esi
leaq 0x7546(%rip), %rdi      # 0xf0f4
movb $0x0, %al
callq 0x3180
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x7be8
jmp 0x7bc0
jmp 0x7bc2
jmp 0x7bc4
jmp 0x7bc6
jmp 0x7bc8
jmp 0x7bca
jmp 0x7bcc
jmp 0x7bce
jmp 0x7bd0
jmp 0x7bd2
jmp 0x7bd4
jmp 0x7bd6
jmp 0x7bd8
jmp 0x7bda
jmp 0x7bdc
jmp 0x7937
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x10, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)