#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*/ computeFull3DesMac(char *, char *, char *);
int /*<<< orphan*/ strcat(char *, char *);
void computeHostCryptogram(char *hostChallenge, char *cardChallenge,
                           char *counter, char *s_encKey,
                           char *hostCryptogram) {
  char temp[24 * 2 + 1] = "";
  strcat(temp, counter);
  strcat(temp, cardChallenge);
  strcat(temp, hostChallenge);
  computeFull3DesMac(temp, s_encKey, hostCryptogram);
}


x86 assembly (clang, -O0):
<computeHostCryptogram>:
push   %rbp
mov    %rsp,%rbp
sub    $0x60,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    %r8,-0x28(%rbp)
lea    -0x60(%rbp),%rdi
xor    %esi,%esi
mov    $0x31,%edx
call   1040 <memset@plt>
lea    -0x60(%rbp),%rdi
mov    -0x18(%rbp),%rsi
call   1050 <strcat@plt>
lea    -0x60(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1050 <strcat@plt>
lea    -0x60(%rbp),%rdi
mov    -0x8(%rbp),%rsi
call   1050 <strcat@plt>
lea    -0x60(%rbp),%rdi
mov    -0x20(%rbp),%rsi
mov    -0x28(%rbp),%rdx
call   1030 <computeFull3DesMac@plt>
add    $0x60,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<computeHostCryptogram>:
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x40,%rsp
mov    %r8,%r14
mov    %rcx,%r15
mov    %rsi,%r13
mov    %rdi,%r12
xorps  %xmm0,%xmm0
movaps %xmm0,0x20(%rsp)
movaps %xmm0,0x10(%rsp)
movaps %xmm0,(%rsp)
movb   $0x0,0x30(%rsp)
mov    %rsp,%rbx
mov    %rbx,%rdi
mov    %rdx,%rsi
call   1040 <strcat@plt>
mov    %rbx,%rdi
mov    %r13,%rsi
call   1040 <strcat@plt>
mov    %rbx,%rdi
mov    %r12,%rsi
call   1040 <strcat@plt>
mov    %rbx,%rdi
mov    %r15,%rsi
mov    %r14,%rdx
call   1030 <computeFull3DesMac@plt>
add    $0x40,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
define void @computeHostCryptogram(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 [49 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 [49 x i8]* %11 to i8*
%13 = getelementptr inbounds [49 x i8], [49 x i8]* %11, i64 0, i64 0
%14 = load i8*, i8** %8
%15 = call i32 @strcat(i8* %13, i8* %14)
%16 = getelementptr inbounds [49 x i8], [49 x i8]* %11, i64 0, i64 0
%17 = load i8*, i8** %7
%18 = call i32 @strcat(i8* %16, i8* %17)
%19 = getelementptr inbounds [49 x i8], [49 x i8]* %11, i64 0, i64 0
%20 = load i8*, i8** %6
%21 = call i32 @strcat(i8* %19, i8* %20)
%22 = getelementptr inbounds [49 x i8], [49 x i8]* %11, i64 0, i64 0
%23 = load i8*, i8** %9
%24 = load i8*, i8** %10
%25 = call i32 @computeFull3DesMac(i8* %22, i8* %23, i8* %24)
ret void
}

LLVM IR (-O2):
define void @computeHostCryptogram(i8* %0, i8* %1, i8* %2, i8* %3, i8* %4) {
%6 = alloca [49 x i8]
%7 = getelementptr inbounds [49 x i8], [49 x i8]* %6, i64 0, i64 0
%8 = call i32 @strcat(i8* %7, i8* %2)
%9 = call i32 @strcat(i8* %7, i8* %1)
%10 = call i32 @strcat(i8* %7, i8* %0)
%11 = call i32 @computeFull3DesMac(i8* %7, i8* %3, i8* %4)
ret void
}