#define NULL ((void *)0)
typedef unsigned long size_t; // Customize by platform.
typedef long intptr_t;
typedef unsigned long uintptr_t;
typedef long scalar_t__; // Either arithmetic or pointer type.
/* By default, we understand bool (as a convenience). */
typedef int bool;
#define false 0
#define true 1

/* Forward declarations */

/* Type definitions */

/* Variables and functions */
int atm_header_get_clp(unsigned char *);
int atm_header_get_pti(unsigned char *);
int atm_header_get_vci(unsigned char *);
int atm_header_get_vpi(unsigned char *);
void atm_header_read(unsigned char *cell, int *vpi, int *vci, int *pti,
                     int *clp) {
  *vpi = atm_header_get_vpi(cell);
  *vci = atm_header_get_vci(cell);
  *pti = atm_header_get_pti(cell);
  *clp = atm_header_get_clp(cell);
}


x86 assembly (clang, -O0):
<atm_header_read>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    %r8,-0x28(%rbp)
mov    -0x8(%rbp),%rdi
call   1050 <atm_header_get_vpi@plt>
mov    %eax,%ecx
mov    -0x10(%rbp),%rax
mov    %ecx,(%rax)
mov    -0x8(%rbp),%rdi
call   1060 <atm_header_get_vci@plt>
mov    %eax,%ecx
mov    -0x18(%rbp),%rax
mov    %ecx,(%rax)
mov    -0x8(%rbp),%rdi
call   1040 <atm_header_get_pti@plt>
mov    %eax,%ecx
mov    -0x20(%rbp),%rax
mov    %ecx,(%rax)
mov    -0x8(%rbp),%rdi
call   1030 <atm_header_get_clp@plt>
mov    %eax,%ecx
mov    -0x28(%rbp),%rax
mov    %ecx,(%rax)
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<atm_header_read>:
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
mov    %r8,%r14
mov    %rcx,%r15
mov    %rdx,%r12
mov    %rsi,%r13
mov    %rdi,%rbx
call   1050 <atm_header_get_vpi@plt>
mov    %eax,0x0(%r13)
mov    %rbx,%rdi
call   1060 <atm_header_get_vci@plt>
mov    %eax,(%r12)
mov    %rbx,%rdi
call   1040 <atm_header_get_pti@plt>
mov    %eax,(%r15)
mov    %rbx,%rdi
call   1030 <atm_header_get_clp@plt>
mov    %eax,(%r14)
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
define void @atm_header_read(i8* %0, i32* %1, i32* %2, i32* %3, i32* %4) {
%6 = alloca i8*
%7 = alloca i32*
%8 = alloca i32*
%9 = alloca i32*
%10 = alloca i32*
store i8* %0, i8** %6
store i32* %1, i32** %7
store i32* %2, i32** %8
store i32* %3, i32** %9
store i32* %4, i32** %10
%11 = load i8*, i8** %6
%12 = call i32 @atm_header_get_vpi(i8* %11)
%13 = load i32*, i32** %7
store i32 %12, i32* %13
%14 = load i8*, i8** %6
%15 = call i32 @atm_header_get_vci(i8* %14)
%16 = load i32*, i32** %8
store i32 %15, i32* %16
%17 = load i8*, i8** %6
%18 = call i32 @atm_header_get_pti(i8* %17)
%19 = load i32*, i32** %9
store i32 %18, i32* %19
%20 = load i8*, i8** %6
%21 = call i32 @atm_header_get_clp(i8* %20)
%22 = load i32*, i32** %10
store i32 %21, i32* %22
ret void
}

LLVM IR (-O2):
define void @atm_header_read(i8* %0, i32* nocapture writeonly %1, i32* nocapture writeonly %2, i32* nocapture writeonly %3, i32* nocapture writeonly %4) {
%6 = tail call i32 @atm_header_get_vpi(i8* %0)
store i32 %6, i32* %1
%7 = tail call i32 @atm_header_get_vci(i8* %0)
store i32 %7, i32* %2
%8 = tail call i32 @atm_header_get_pti(i8* %0)
store i32 %8, i32* %3
%9 = tail call i32 @atm_header_get_clp(i8* %0)
store i32 %9, i32* %4
ret void
}