int main(argc, argv, envp)
int argc;
char *argv[], **envp;
{
  int i;
  unsigned long myparms[10];
  begin();
  for (i = 0; i < sizeof(myparms) / sizeof(myparms[0]); i++)
    myparms[i] = i;
  gdb_c_test(&myparms[0]);
  end();
  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)
mov    %rdx,-0x18(%rbp)
mov    $0x0,%al
call   1050 <begin@plt>
movl   $0x0,-0x1c(%rbp)
movslq -0x1c(%rbp),%rax
cmp    $0xa,%rax
jae    1181 <main+0x51>
movslq -0x1c(%rbp),%rcx
movslq -0x1c(%rbp),%rax
mov    %rcx,-0x70(%rbp,%rax,8)
mov    -0x1c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x1c(%rbp)
jmp    1158 <main+0x28>
lea    -0x70(%rbp),%rdi
mov    $0x0,%al
call   1040 <gdb_c_test@plt>
mov    $0x0,%al
call   1030 <end@plt>
xor    %eax,%eax
add    $0x70,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
sub    $0x58,%rsp
xor    %eax,%eax
call   1050 <begin@plt>
movaps 0xebe(%rip),%xmm0
movaps %xmm0,(%rsp)
movaps 0xec3(%rip),%xmm0
movaps %xmm0,0x10(%rsp)
movaps 0xec7(%rip),%xmm0
movaps %xmm0,0x20(%rsp)
movaps 0xecb(%rip),%xmm0
movaps %xmm0,0x30(%rsp)
movaps 0xecf(%rip),%xmm0
movaps %xmm0,0x40(%rsp)
mov    %rsp,%rdi
xor    %eax,%eax
call   1040 <gdb_c_test@plt>
xor    %eax,%eax
call   1030 <end@plt>
xor    %eax,%eax
add    $0x58,%rsp
ret

LLVM IR (-O0):
define i32 @main(i32 %0, i8** %1, i8** %2) {
%4 = alloca i32
%5 = alloca i32
%6 = alloca i8**
%7 = alloca i8**
%8 = alloca i32
%9 = alloca [10 x i64]
store i32 0, i32* %4
store i32 %0, i32* %5
store i8** %1, i8*** %6
store i8** %2, i8*** %7
%10 = call i32 (...) @begin()
store i32 0, i32* %8
br label %11
11: ; preds = %21, %3
%12 = load i32, i32* %8
%13 = sext i32 %12 to i64
%14 = icmp ult i64 %13, 10
br i1 %14, label %15, label %24
15: ; preds = %11
%16 = load i32, i32* %8
%17 = sext i32 %16 to i64
%18 = load i32, i32* %8
%19 = sext i32 %18 to i64
%20 = getelementptr inbounds [10 x i64], [10 x i64]* %9, i64 0, i64 %19
store i64 %17, i64* %20
br label %21
21: ; preds = %15
%22 = load i32, i32* %8
%23 = add nsw i32 %22, 1
store i32 %23, i32* %8
br label %11
24: ; preds = %11
%25 = getelementptr inbounds [10 x i64], [10 x i64]* %9, i64 0, i64 0
%26 = call i32 (i64*, ...) bitcast (i32 (...)* @gdb_c_test to i32 (i64*, ...)*)(i64* %25)
%27 = call i32 (...) @end()
ret i32 0
}

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture readnone %1, i8** nocapture readnone %2) {
%4 = alloca [10 x i64]
%5 = bitcast [10 x i64]* %4 to i8*
%6 = tail call i32 (...) @begin()
%7 = getelementptr inbounds [10 x i64], [10 x i64]* %4, i64 0, i64 0
%8 = bitcast [10 x i64]* %4 to <2 x i64>*
store <2 x i64> <i64 0, i64 1>, <2 x i64>* %8
%9 = getelementptr inbounds [10 x i64], [10 x i64]* %4, i64 0, i64 2
%10 = bitcast i64* %9 to <2 x i64>*
store <2 x i64> <i64 2, i64 3>, <2 x i64>* %10
%11 = getelementptr inbounds [10 x i64], [10 x i64]* %4, i64 0, i64 4
%12 = bitcast i64* %11 to <2 x i64>*
store <2 x i64> <i64 4, i64 5>, <2 x i64>* %12
%13 = getelementptr inbounds [10 x i64], [10 x i64]* %4, i64 0, i64 6
%14 = bitcast i64* %13 to <2 x i64>*
store <2 x i64> <i64 6, i64 7>, <2 x i64>* %14
%15 = getelementptr inbounds [10 x i64], [10 x i64]* %4, i64 0, i64 8
%16 = bitcast i64* %15 to <2 x i64>*
store <2 x i64> <i64 8, i64 9>, <2 x i64>* %16
%17 = call i32 (i64*, ...) bitcast (i32 (...)* @gdb_c_test to i32 (i64*, ...)*)(i64* %7)
%18 = call i32 (...) @end()
ret i32 0
}