#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*/ merge(int *, int, int *, int);
int /*<<< orphan*/ printf(char *, ...);
int main(int argc, const char *argv[]) {
  printf("Hello, World!\n");
  int num1[10] = {1, 2, 5, 7, 9};
  int num2[5] = {2, 4, 6, 8, 10};
  merge(num1, 5, num2, 5);
  for (int i = 0; i < 10; i++) {
    printf("当前的值:%d\n", *(num1 + i));
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x70,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
lea    0xeb3(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    -0x40(%rbp),%rdi
xor    %esi,%esi
mov    $0x28,%edx
call   1040 <memset@plt>
movl   $0x1,-0x40(%rbp)
movl   $0x2,-0x3c(%rbp)
movl   $0x5,-0x38(%rbp)
movl   $0x7,-0x34(%rbp)
movl   $0x9,-0x30(%rbp)
mov    0xe92(%rip),%rax
mov    %rax,-0x60(%rbp)
mov    0xe8f(%rip),%rax
mov    %rax,-0x58(%rbp)
mov    0xe8d(%rip),%eax
mov    %eax,-0x50(%rbp)
lea    -0x40(%rbp),%rdi
lea    -0x60(%rbp),%rdx
mov    $0x5,%ecx
mov    %ecx,%esi
call   1050 <merge@plt>
movl   $0x0,-0x64(%rbp)
cmpl   $0xa,-0x64(%rbp)
jge    11ef <main+0xbf>
movslq -0x64(%rbp),%rax
mov    -0x40(%rbp,%rax,4),%esi
lea    0xe35(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x64(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x64(%rbp)
jmp    11c1 <main+0x91>
xor    %eax,%eax
add    $0x70,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x50,%rsp
lea    0xef9(%rip),%rdi
call   1030 <puts@plt>
xorps  %xmm0,%xmm0
movaps %xmm0,0x10(%rsp)
movq   $0x0,0x20(%rsp)
movaps 0xea7(%rip),%xmm0
movaps %xmm0,(%rsp)
movl   $0x9,0x10(%rsp)
mov    0xeb5(%rip),%eax
mov    %eax,0x40(%rsp)
movaps 0xe9a(%rip),%xmm0
movaps %xmm0,0x30(%rsp)
mov    %rsp,%rdi
lea    0x30(%rsp),%rdx
mov    $0x5,%esi
mov    $0x5,%ecx
call   1050 <merge@plt>
mov    (%rsp),%esi
lea    0xe88(%rip),%rbx
mov    %rbx,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
mov    0x4(%rsp),%esi
mov    %rbx,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
mov    0x8(%rsp),%esi
mov    %rbx,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
mov    0xc(%rsp),%esi
mov    %rbx,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
mov    0x10(%rsp),%esi
mov    %rbx,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
mov    0x14(%rsp),%esi
mov    %rbx,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
mov    0x18(%rsp),%esi
mov    %rbx,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
mov    0x1c(%rsp),%esi
mov    %rbx,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
mov    0x20(%rsp),%esi
mov    %rbx,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
mov    0x24(%rsp),%esi
mov    %rbx,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x50,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@.str = [15 x i8] c"Hello, World!\0A\00"
@__const.main.num2 = [5 x i32] [i32 2, i32 4, i32 6, i32 8, i32 10]
@.str.1 = [17 x i8] c"\E5\BD\93\E5\89\8D\E7\9A\84\E5\80\BC:%d\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca [10 x i32]
%7 = alloca [5 x i32]
%8 = alloca i32
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%9 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0))
%10 = bitcast [10 x i32]* %6 to i8*
%11 = bitcast i8* %10 to [10 x i32]*
%12 = getelementptr inbounds [10 x i32], [10 x i32]* %11, i32 0, i32 0
store i32 1, i32* %12
%13 = getelementptr inbounds [10 x i32], [10 x i32]* %11, i32 0, i32 1
store i32 2, i32* %13
%14 = getelementptr inbounds [10 x i32], [10 x i32]* %11, i32 0, i32 2
store i32 5, i32* %14
%15 = getelementptr inbounds [10 x i32], [10 x i32]* %11, i32 0, i32 3
store i32 7, i32* %15
%16 = getelementptr inbounds [10 x i32], [10 x i32]* %11, i32 0, i32 4
store i32 9, i32* %16
%17 = bitcast [5 x i32]* %7 to i8*
%18 = getelementptr inbounds [10 x i32], [10 x i32]* %6, i64 0, i64 0
%19 = getelementptr inbounds [5 x i32], [5 x i32]* %7, i64 0, i64 0
%20 = call i32 @merge(i32* %18, i32 5, i32* %19, i32 5)
store i32 0, i32* %8
br label %21
21: ; preds = %31, %2
%22 = load i32, i32* %8
%23 = icmp slt i32 %22, 10
br i1 %23, label %24, label %34
24: ; preds = %21
%25 = getelementptr inbounds [10 x i32], [10 x i32]* %6, i64 0, i64 0
%26 = load i32, i32* %8
%27 = sext i32 %26 to i64
%28 = getelementptr inbounds i32, i32* %25, i64 %27
%29 = load i32, i32* %28
%30 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.1, i64 0, i64 0), i32 %29)
br label %31
31: ; preds = %24
%32 = load i32, i32* %8
%33 = add nsw i32 %32, 1
store i32 %33, i32* %8
br label %21
34: ; preds = %21
ret i32 0
}

LLVM IR (-O2):
@__const.main.num2 = [5 x i32] [i32 2, i32 4, i32 6, i32 8, i32 10]
@.str.1 = [17 x i8] c"\E5\BD\93\E5\89\8D\E7\9A\84\E5\80\BC:%d\0A\00"
@str = [14 x i8] c"Hello, World!\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = alloca [10 x i32]
%4 = alloca [5 x i32]
%5 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([14 x i8], [14 x i8]* @str, i64 0, i64 0))
%6 = bitcast [10 x i32]* %3 to i8*
%7 = getelementptr inbounds [10 x i32], [10 x i32]* %3, i64 0, i64 4
%8 = bitcast i32* %7 to i8*
%9 = getelementptr inbounds [10 x i32], [10 x i32]* %3, i64 0, i64 0
%10 = getelementptr inbounds [10 x i32], [10 x i32]* %3, i64 0, i64 1
%11 = getelementptr inbounds [10 x i32], [10 x i32]* %3, i64 0, i64 2
%12 = getelementptr inbounds [10 x i32], [10 x i32]* %3, i64 0, i64 3
%13 = bitcast [10 x i32]* %3 to <4 x i32>*
store <4 x i32> <i32 1, i32 2, i32 5, i32 7>, <4 x i32>* %13
%14 = getelementptr inbounds [10 x i32], [10 x i32]* %3, i64 0, i64 4
store i32 9, i32* %14
%15 = bitcast [5 x i32]* %4 to i8*
%16 = getelementptr inbounds [5 x i32], [5 x i32]* %4, i64 0, i64 0
%17 = call i32 @merge(i32* %9, i32 5, i32* %16, i32 5)
%18 = load i32, i32* %9
%19 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([17 x i8], [17 x i8]* @.str.1, i64 0, i64 0), i32 %18)
%20 = load i32, i32* %10
%21 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([17 x i8], [17 x i8]* @.str.1, i64 0, i64 0), i32 %20)
%22 = load i32, i32* %11
%23 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([17 x i8], [17 x i8]* @.str.1, i64 0, i64 0), i32 %22)
%24 = load i32, i32* %12
%25 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([17 x i8], [17 x i8]* @.str.1, i64 0, i64 0), i32 %24)
%26 = load i32, i32* %14
%27 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([17 x i8], [17 x i8]* @.str.1, i64 0, i64 0), i32 %26)
%28 = getelementptr inbounds [10 x i32], [10 x i32]* %3, i64 0, i64 5
%29 = load i32, i32* %28
%30 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([17 x i8], [17 x i8]* @.str.1, i64 0, i64 0), i32 %29)
%31 = getelementptr inbounds [10 x i32], [10 x i32]* %3, i64 0, i64 6
%32 = load i32, i32* %31
%33 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([17 x i8], [17 x i8]* @.str.1, i64 0, i64 0), i32 %32)
%34 = getelementptr inbounds [10 x i32], [10 x i32]* %3, i64 0, i64 7
%35 = load i32, i32* %34
%36 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([17 x i8], [17 x i8]* @.str.1, i64 0, i64 0), i32 %35)
%37 = getelementptr inbounds [10 x i32], [10 x i32]* %3, i64 0, i64 8
%38 = load i32, i32* %37
%39 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([17 x i8], [17 x i8]* @.str.1, i64 0, i64 0), i32 %38)
%40 = getelementptr inbounds [10 x i32], [10 x i32]* %3, i64 0, i64 9
%41 = load i32, i32* %40
%42 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([17 x i8], [17 x i8]* @.str.1, i64 0, i64 0), i32 %41)
ret i32 0
}