#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*/ fun(char *, char *);
int /*<<< orphan*/ getchar();
int /*<<< orphan*/ puts(char *);
int main() {
  char a[100] = "13579", b[] = "82460";
  fun(a, b);
  puts(a);
  getchar();
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x80,%rsp
movl   $0x0,-0x4(%rbp)
lea    -0x70(%rbp),%rdi
xor    %esi,%esi
mov    $0x64,%edx
call   1050 <memset@plt>
movb   $0x31,-0x70(%rbp)
movb   $0x33,-0x6f(%rbp)
movb   $0x35,-0x6e(%rbp)
movb   $0x37,-0x6d(%rbp)
movb   $0x39,-0x6c(%rbp)
mov    0xe84(%rip),%eax
mov    %eax,-0x76(%rbp)
mov    0xe7e(%rip),%ax
mov    %ax,-0x72(%rbp)
lea    -0x70(%rbp),%rdi
lea    -0x76(%rbp),%rsi
call   1040 <fun@plt>
lea    -0x70(%rbp),%rdi
call   1030 <puts@plt>
mov    $0x0,%al
call   1060 <getchar@plt>
xor    %eax,%eax
add    $0x80,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x80,%rsp
xorps  %xmm0,%xmm0
movaps %xmm0,0x10(%rsp)
movaps %xmm0,0x60(%rsp)
movaps %xmm0,0x50(%rsp)
movaps %xmm0,0x40(%rsp)
movaps %xmm0,0x30(%rsp)
movaps %xmm0,0x20(%rsp)
movl   $0x0,0x70(%rsp)
movl   $0x37353331,0x10(%rsp)
37
movb   $0x39,0x14(%rsp)
movw   $0x30,0xc(%rsp)
movl   $0x36343238,0x8(%rsp)
36
lea    0x10(%rsp),%rbx
lea    0x8(%rsp),%rsi
mov    %rbx,%rdi
call   1040 <fun@plt>
mov    %rbx,%rdi
call   1030 <puts@plt>
xor    %eax,%eax
call   1050 <getchar@plt>
xor    %eax,%eax
add    $0x80,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@__const.main.b = [6 x i8] c"82460\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca [100 x i8]
%3 = alloca [6 x i8]
store i32 0, i32* %1
%4 = bitcast [100 x i8]* %2 to i8*
%5 = bitcast i8* %4 to [100 x i8]*
%6 = getelementptr inbounds [100 x i8], [100 x i8]* %5, i32 0, i32 0
store i8 49, i8* %6
%7 = getelementptr inbounds [100 x i8], [100 x i8]* %5, i32 0, i32 1
store i8 51, i8* %7
%8 = getelementptr inbounds [100 x i8], [100 x i8]* %5, i32 0, i32 2
store i8 53, i8* %8
%9 = getelementptr inbounds [100 x i8], [100 x i8]* %5, i32 0, i32 3
store i8 55, i8* %9
%10 = getelementptr inbounds [100 x i8], [100 x i8]* %5, i32 0, i32 4
store i8 57, i8* %10
%11 = bitcast [6 x i8]* %3 to i8*
%12 = getelementptr inbounds [100 x i8], [100 x i8]* %2, i64 0, i64 0
%13 = getelementptr inbounds [6 x i8], [6 x i8]* %3, i64 0, i64 0
%14 = call i32 @fun(i8* %12, i8* %13)
%15 = getelementptr inbounds [100 x i8], [100 x i8]* %2, i64 0, i64 0
%16 = call i32 @puts(i8* %15)
%17 = call i32 (...) @getchar()
ret i32 0
}

LLVM IR (-O2):
@__const.main.b = [6 x i8] c"82460\00"
define i32 @main() {
%1 = alloca [100 x i8]
%2 = alloca [6 x i8]
%3 = getelementptr inbounds [100 x i8], [100 x i8]* %1, i64 0, i64 0
store i8 49, i8* %3
%4 = getelementptr inbounds [100 x i8], [100 x i8]* %1, i64 0, i64 1
store i8 51, i8* %4
%5 = getelementptr inbounds [100 x i8], [100 x i8]* %1, i64 0, i64 2
store i8 53, i8* %5
%6 = getelementptr inbounds [100 x i8], [100 x i8]* %1, i64 0, i64 3
store i8 55, i8* %6
%7 = getelementptr inbounds [100 x i8], [100 x i8]* %1, i64 0, i64 4
store i8 57, i8* %7
%8 = getelementptr inbounds [6 x i8], [6 x i8]* %2, i64 0, i64 0
%9 = call i32 @fun(i8* %3, i8* %8)
%10 = call i32 @puts(i8* %3)
%11 = call i32 (...) @getchar()
ret i32 0
}