#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*/ computeRetailMac(char *, char *, char *, char *);
int /*<<< orphan*/ modifyCdeForMac(char *, char *);
int /*<<< orphan*/ strcat(char *, char *);
int /*<<< orphan*/ strcpy(char *, char *);
void macedCommand(char *cde, char *cmacKey, char *lastMac, char *currentMac,
                  char *macedCde) {
  char mod_cde[260 * 2 + 1] = "";
  strcpy(macedCde, "");
  modifyCdeForMac(cde, mod_cde);
  computeRetailMac(mod_cde, cmacKey, lastMac, currentMac);
  strcat(macedCde, mod_cde);
  strcat(macedCde, currentMac);
}


x86 assembly (clang, -O0):
<macedCommand>:
push   %rbp
mov    %rsp,%rbp
sub    $0x240,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    %r8,-0x28(%rbp)
lea    -0x240(%rbp),%rdi
xor    %esi,%esi
mov    $0x209,%edx
call   1040 <memset@plt>
mov    -0x28(%rbp),%rdi
lea    0xe73(%rip),%rsi
call   1030 <strcpy@plt>
mov    -0x8(%rbp),%rdi
lea    -0x240(%rbp),%rsi
call   1050 <modifyCdeForMac@plt>
lea    -0x240(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
mov    -0x20(%rbp),%rcx
call   1060 <computeRetailMac@plt>
mov    -0x28(%rbp),%rdi
lea    -0x240(%rbp),%rsi
call   1070 <strcat@plt>
mov    -0x28(%rbp),%rdi
mov    -0x20(%rbp),%rsi
call   1070 <strcat@plt>
add    $0x240,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<macedCommand>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x218,%rsp
mov    %r8,%rbx
mov    %rcx,%r14
mov    %rdx,%r15
mov    %rsi,%r12
mov    %rdi,%r13
mov    %rsp,%rbp
mov    $0x209,%edx
mov    %rbp,%rdi
xor    %esi,%esi
call   1040 <memset@plt>
lea    0xe77(%rip),%rsi
mov    %rbx,%rdi
call   1030 <strcpy@plt>
mov    %r13,%rdi
mov    %rbp,%rsi
call   1050 <modifyCdeForMac@plt>
mov    %rbp,%rdi
mov    %r12,%rsi
mov    %r15,%rdx
mov    %r14,%rcx
call   1060 <computeRetailMac@plt>
mov    %rbx,%rdi
mov    %rbp,%rsi
call   1070 <strcat@plt>
mov    %rbx,%rdi
mov    %r14,%rsi
call   1070 <strcat@plt>
add    $0x218,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@.str = [1 x i8] zeroinitializer
define void @macedCommand(i8* %0, i8* %1, i8* %2, i8* %3, i8* %4) {
%6 = alloca i8*
%7 = alloca i8*
%8 = alloca i8*
%9 = alloca i8*
%10 = alloca i8*
%11 = alloca [521 x i8]
store i8* %0, i8** %6
store i8* %1, i8** %7
store i8* %2, i8** %8
store i8* %3, i8** %9
store i8* %4, i8** %10
%12 = bitcast [521 x i8]* %11 to i8*
%13 = load i8*, i8** %10
%14 = call i32 @strcpy(i8* %13, i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str, i64 0, i64 0))
%15 = load i8*, i8** %6
%16 = getelementptr inbounds [521 x i8], [521 x i8]* %11, i64 0, i64 0
%17 = call i32 @modifyCdeForMac(i8* %15, i8* %16)
%18 = getelementptr inbounds [521 x i8], [521 x i8]* %11, i64 0, i64 0
%19 = load i8*, i8** %7
%20 = load i8*, i8** %8
%21 = load i8*, i8** %9
%22 = call i32 @computeRetailMac(i8* %18, i8* %19, i8* %20, i8* %21)
%23 = load i8*, i8** %10
%24 = getelementptr inbounds [521 x i8], [521 x i8]* %11, i64 0, i64 0
%25 = call i32 @strcat(i8* %23, i8* %24)
%26 = load i8*, i8** %10
%27 = load i8*, i8** %9
%28 = call i32 @strcat(i8* %26, i8* %27)
ret void
}

LLVM IR (-O2):
@.str = [1 x i8] zeroinitializer
define void @macedCommand(i8* %0, i8* %1, i8* %2, i8* %3, i8* %4) {
%6 = alloca [521 x i8]
%7 = getelementptr inbounds [521 x i8], [521 x i8]* %6, i64 0, i64 0
%8 = tail call i32 @strcpy(i8* %4, i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str, i64 0, i64 0))
%9 = call i32 @modifyCdeForMac(i8* %0, i8* %7)
%10 = call i32 @computeRetailMac(i8* %7, i8* %1, i8* %2, i8* %3)
%11 = call i32 @strcat(i8* %4, i8* %7)
%12 = call i32 @strcat(i8* %4, i8* %3)
ret void
}