#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 /*<<< orphan*/ emsEload(char *, int *, char *, int *, int *);
int /*<<< orphan*/ star_strellcpy(char *, char *, int);
int strlen(char *);
void errLoad(char *param, int param_length, int *parlen, char *opstr,
             int opstr_length, int *oplen, int *status) {
  char partemp[15 + 1];
  char optemp[200 + 1];
  int partlen;
  int optlen;
  emsEload(partemp, &partlen, optemp, &optlen, status);
  star_strellcpy(param, partemp, param_length);
  star_strellcpy(opstr, optemp, opstr_length);
  *oplen = strlen(opstr);
  *parlen = strlen(param);
}


x86 assembly (clang, -O0):
<errLoad>:
push   %rbp
mov    %rsp,%rbp
sub    $0x120,%rsp
mov    0x10(%rbp),%rax
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    %r8d,-0x24(%rbp)
mov    %r9,-0x30(%rbp)
lea    -0x40(%rbp),%rdi
lea    -0x110(%rbp),%rdx
mov    0x10(%rbp),%r8
lea    -0x114(%rbp),%rsi
lea    -0x118(%rbp),%rcx
call   1050 <emsEload@plt>
mov    -0x8(%rbp),%rdi
lea    -0x40(%rbp),%rsi
mov    -0xc(%rbp),%edx
call   1030 <star_strellcpy@plt>
mov    -0x20(%rbp),%rdi
lea    -0x110(%rbp),%rsi
mov    -0x24(%rbp),%edx
call   1030 <star_strellcpy@plt>
mov    -0x20(%rbp),%rdi
call   1040 <strlen@plt>
mov    %eax,%ecx
mov    -0x30(%rbp),%rax
mov    %ecx,(%rax)
mov    -0x8(%rbp),%rdi
call   1040 <strlen@plt>
mov    %eax,%ecx
mov    -0x18(%rbp),%rax
mov    %ecx,(%rax)
add    $0x120,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<errLoad>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x108,%rsp
mov    %r9,0x8(%rsp)
mov    %r8d,%r12d
mov    %rcx,%rbp
mov    %rdx,0x10(%rsp)
mov    %esi,%r13d
mov    %rdi,%rbx
mov    0x140(%rsp),%r8
lea    0x20(%rsp),%r14
lea    0x1c(%rsp),%rsi
lea    0x30(%rsp),%r15
lea    0x18(%rsp),%rcx
mov    %r14,%rdi
mov    %r15,%rdx
call   1050 <emsEload@plt>
mov    %rbx,%rdi
mov    %r14,%rsi
mov    %r13d,%edx
call   1030 <star_strellcpy@plt>
mov    %rbp,%rdi
mov    %r15,%rsi
mov    %r12d,%edx
call   1030 <star_strellcpy@plt>
mov    %rbp,%rdi
call   1040 <strlen@plt>
mov    0x8(%rsp),%rcx
mov    %eax,(%rcx)
mov    %rbx,%rdi
call   1040 <strlen@plt>
mov    0x10(%rsp),%rcx
mov    %eax,(%rcx)
add    $0x108,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
define void @errLoad(i8* %0, i32 %1, i32* %2, i8* %3, i32 %4, i32* %5, i32* %6) {
%8 = alloca i8*
%9 = alloca i32
%10 = alloca i32*
%11 = alloca i8*
%12 = alloca i32
%13 = alloca i32*
%14 = alloca i32*
%15 = alloca [16 x i8]
%16 = alloca [201 x i8]
%17 = alloca i32
%18 = alloca i32
store i8* %0, i8** %8
store i32 %1, i32* %9
store i32* %2, i32** %10
store i8* %3, i8** %11
store i32 %4, i32* %12
store i32* %5, i32** %13
store i32* %6, i32** %14
%19 = getelementptr inbounds [16 x i8], [16 x i8]* %15, i64 0, i64 0
%20 = getelementptr inbounds [201 x i8], [201 x i8]* %16, i64 0, i64 0
%21 = load i32*, i32** %14
%22 = call i32 @emsEload(i8* %19, i32* %17, i8* %20, i32* %18, i32* %21)
%23 = load i8*, i8** %8
%24 = getelementptr inbounds [16 x i8], [16 x i8]* %15, i64 0, i64 0
%25 = load i32, i32* %9
%26 = call i32 @star_strellcpy(i8* %23, i8* %24, i32 %25)
%27 = load i8*, i8** %11
%28 = getelementptr inbounds [201 x i8], [201 x i8]* %16, i64 0, i64 0
%29 = load i32, i32* %12
%30 = call i32 @star_strellcpy(i8* %27, i8* %28, i32 %29)
%31 = load i8*, i8** %11
%32 = call i32 @strlen(i8* %31)
%33 = load i32*, i32** %13
store i32 %32, i32* %33
%34 = load i8*, i8** %8
%35 = call i32 @strlen(i8* %34)
%36 = load i32*, i32** %10
store i32 %35, i32* %36
ret void
}

LLVM IR (-O2):
define void @errLoad(i8* %0, i32 %1, i32* nocapture writeonly %2, i8* %3, i32 %4, i32* nocapture writeonly %5, i32* %6) {
%8 = alloca [16 x i8]
%9 = alloca [201 x i8]
%10 = alloca i32
%11 = alloca i32
%12 = getelementptr inbounds [16 x i8], [16 x i8]* %8, i64 0, i64 0
%13 = getelementptr inbounds [201 x i8], [201 x i8]* %9, i64 0, i64 0
%14 = bitcast i32* %10 to i8*
%15 = bitcast i32* %11 to i8*
%16 = call i32 @emsEload(i8* %12, i32* %10, i8* %13, i32* %11, i32* %6)
%17 = call i32 @star_strellcpy(i8* %0, i8* %12, i32 %1)
%18 = call i32 @star_strellcpy(i8* %3, i8* %13, i32 %4)
%19 = call i32 @strlen(i8* %3)
store i32 %19, i32* %5
%20 = call i32 @strlen(i8* %0)
store i32 %20, i32* %2
ret void
}