#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*/ outraFuncao(char *);
int /*<<< orphan*/ printf(char *, char *);
int /*<<< orphan*/ strcpy(char *, char *);
int main() {
  char tempA[100] = "1111";
  outraFuncao(tempA);
  printf("tempTest = %s\n", tempA);
  strcpy(tempA, "22");
  printf("tempTest = %s\n", tempA);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x70,%rsp
lea    -0x70(%rbp),%rdi
xor    %esi,%esi
mov    $0x64,%edx
call   1050 <memset@plt>
movb   $0x31,-0x70(%rbp)
movb   $0x31,-0x6f(%rbp)
movb   $0x31,-0x6e(%rbp)
movb   $0x31,-0x6d(%rbp)
lea    -0x70(%rbp),%rdi
call   1060 <outraFuncao@plt>
lea    -0x70(%rbp),%rsi
lea    0xe84(%rip),%rdi
call   1040 <printf@plt>
lea    -0x70(%rbp),%rdi
lea    0xe83(%rip),%rsi
call   1030 <strcpy@plt>
lea    -0x70(%rbp),%rsi
lea    0xe64(%rip),%rdi
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x70,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r14
push   %rbx
sub    $0x68,%rsp
xorps  %xmm0,%xmm0
movaps %xmm0,(%rsp)
movaps %xmm0,0x50(%rsp)
movaps %xmm0,0x40(%rsp)
movaps %xmm0,0x30(%rsp)
movaps %xmm0,0x20(%rsp)
movaps %xmm0,0x10(%rsp)
movl   $0x0,0x60(%rsp)
movl   $0x31313131,(%rsp)
mov    %rsp,%rbx
mov    %rbx,%rdi
call   1050 <outraFuncao@plt>
lea    0xe88(%rip),%r14
mov    %r14,%rdi
mov    %rbx,%rsi
call   1040 <printf@plt>
lea    0xe85(%rip),%rsi
mov    %rbx,%rdi
call   1030 <strcpy@plt>
mov    %r14,%rdi
mov    %rbx,%rsi
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x68,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@.str = [15 x i8] c"tempTest = %s\0A\00"
@.str.1 = [3 x i8] c"22\00"
define i32 @main() {
%1 = alloca [100 x i8]
%2 = bitcast [100 x i8]* %1 to i8*
%3 = bitcast i8* %2 to [100 x i8]*
%4 = getelementptr inbounds [100 x i8], [100 x i8]* %3, i32 0, i32 0
store i8 49, i8* %4
%5 = getelementptr inbounds [100 x i8], [100 x i8]* %3, i32 0, i32 1
store i8 49, i8* %5
%6 = getelementptr inbounds [100 x i8], [100 x i8]* %3, i32 0, i32 2
store i8 49, i8* %6
%7 = getelementptr inbounds [100 x i8], [100 x i8]* %3, i32 0, i32 3
store i8 49, i8* %7
%8 = getelementptr inbounds [100 x i8], [100 x i8]* %1, i64 0, i64 0
%9 = call i32 @outraFuncao(i8* %8)
%10 = getelementptr inbounds [100 x i8], [100 x i8]* %1, i64 0, i64 0
%11 = call i32 @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0), i8* %10)
%12 = getelementptr inbounds [100 x i8], [100 x i8]* %1, i64 0, i64 0
%13 = call i32 @strcpy(i8* %12, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0))
%14 = getelementptr inbounds [100 x i8], [100 x i8]* %1, i64 0, i64 0
%15 = call i32 @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0), i8* %14)
ret i32 0
}

LLVM IR (-O2):
@.str = [15 x i8] c"tempTest = %s\0A\00"
@.str.1 = [3 x i8] c"22\00"
define i32 @main() {
%1 = alloca [100 x i8]
%2 = getelementptr inbounds [100 x i8], [100 x i8]* %1, i64 0, i64 0
%3 = bitcast [100 x i8]* %1 to i32*
store i32 825307441, i32* %3
%4 = call i32 @outraFuncao(i8* %2)
%5 = call i32 @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0), i8* %2)
%6 = call i32 @strcpy(i8* %2, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0))
%7 = call i32 @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0), i8* %2)
ret i32 0
}