#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*/ strcat(char *, char *);
int /*<<< orphan*/ strcpy(char *, char *);
void initializeUpdate(char *keysetId, char *hostChallenge, char *init_up_apdu) {
  strcpy(init_up_apdu, "");
  strcat(init_up_apdu, "8050");
  strcat(init_up_apdu, keysetId);
  strcat(init_up_apdu, "0008");
  strcat(init_up_apdu, hostChallenge);
}


x86 assembly (clang, -O0):
<initializeUpdate>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x18(%rbp),%rdi
lea    0xec5(%rip),%rsi
call   1030 <strcpy@plt>
mov    -0x18(%rbp),%rdi
lea    0xeb1(%rip),%rsi
call   1040 <strcat@plt>
mov    -0x18(%rbp),%rdi
mov    -0x8(%rbp),%rsi
call   1040 <strcat@plt>
mov    -0x18(%rbp),%rdi
lea    0xe99(%rip),%rsi
call   1040 <strcat@plt>
mov    -0x18(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1040 <strcat@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<initializeUpdate>:
push   %r15
push   %r14
push   %rbx
mov    %rdx,%rbx
mov    %rsi,%r14
mov    %rdi,%r15
lea    0xecf(%rip),%rsi
mov    %rdx,%rdi
call   1030 <strcpy@plt>
lea    0xebc(%rip),%rsi
mov    %rbx,%rdi
call   1040 <strcat@plt>
mov    %rbx,%rdi
mov    %r15,%rsi
call   1040 <strcat@plt>
lea    0xea7(%rip),%rsi
mov    %rbx,%rdi
call   1040 <strcat@plt>
mov    %rbx,%rdi
mov    %r14,%rsi
pop    %rbx
pop    %r14
pop    %r15
jmp    1040 <strcat@plt>

LLVM IR (-O0):
@.str = [1 x i8] zeroinitializer
@.str.1 = [5 x i8] c"8050\00"
@.str.2 = [5 x i8] c"0008\00"
define void @initializeUpdate(i8* %0, i8* %1, i8* %2) {
%4 = alloca i8*
%5 = alloca i8*
%6 = alloca i8*
store i8* %0, i8** %4
store i8* %1, i8** %5
store i8* %2, i8** %6
%7 = load i8*, i8** %6
%8 = call i32 @strcpy(i8* %7, i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str, i64 0, i64 0))
%9 = load i8*, i8** %6
%10 = call i32 @strcat(i8* %9, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0))
%11 = load i8*, i8** %6
%12 = load i8*, i8** %4
%13 = call i32 @strcat(i8* %11, i8* %12)
%14 = load i8*, i8** %6
%15 = call i32 @strcat(i8* %14, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.2, i64 0, i64 0))
%16 = load i8*, i8** %6
%17 = load i8*, i8** %5
%18 = call i32 @strcat(i8* %16, i8* %17)
ret void
}

LLVM IR (-O2):
@.str = [1 x i8] zeroinitializer
@.str.1 = [5 x i8] c"8050\00"
@.str.2 = [5 x i8] c"0008\00"
define void @initializeUpdate(i8* %0, i8* %1, i8* %2) {
%4 = tail call i32 @strcpy(i8* %2, i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str, i64 0, i64 0))
%5 = tail call i32 @strcat(i8* %2, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0))
%6 = tail call i32 @strcat(i8* %2, i8* %0)
%7 = tail call i32 @strcat(i8* %2, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.2, i64 0, i64 0))
%8 = tail call i32 @strcat(i8* %2, i8* %1)
ret void
}