#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 */
typedef struct TYPE_2__ TYPE_1__;

/* Type definitions */
struct TYPE_2__ {
  int member_0;
  int member_1;
  int member_2;
};

/* Variables and functions */
int /*<<< orphan*/ printf(char *, int, ...);
int x(int *, int *, int);
void main_main() {
  int a[3] = {1, 2, 3};
  struct {
    int foo;
    int b[3];
  } b = {1927, {5, 4, 9}};
  printf("a= %d\n", a[2]);
  int count = 3;
  count = 3;
  int res;
  res = x(a, b.b, count);
  printf("x = %d bogomips %d\n", res, count);
}


x86 assembly (clang, -O0):
<main_main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    0xed1(%rip),%rax
mov    %rax,-0xc(%rbp)
mov    0xecf(%rip),%eax
mov    %eax,-0x4(%rbp)
mov    0xec9(%rip),%rax
mov    %rax,-0x20(%rbp)
mov    0xec6(%rip),%rax
mov    %rax,-0x18(%rbp)
mov    -0x4(%rbp),%esi
lea    0xec0(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
movl   $0x3,-0x24(%rbp)
movl   $0x3,-0x24(%rbp)
lea    -0xc(%rbp),%rdi
lea    -0x20(%rbp),%rsi
add    $0x4,%rsi
mov    -0x24(%rbp),%edx
call   1030 <x@plt>
mov    %eax,-0x28(%rbp)
mov    -0x28(%rbp),%esi
mov    -0x24(%rbp),%edx
lea    0xe8e(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main_main>:
sub    $0x28,%rsp
mov    0xede(%rip),%eax
mov    %eax,0x8(%rsp)
mov    0xecb(%rip),%rax
mov    %rax,(%rsp)
movups 0xecc(%rip),%xmm0
movaps %xmm0,0x10(%rsp)
lea    0xed0(%rip),%rdi
mov    $0x3,%esi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0x14(%rsp),%rsi
mov    %rsp,%rdi
mov    $0x3,%edx
call   1030 <x@plt>
lea    0xeb2(%rip),%rdi
mov    %eax,%esi
mov    $0x3,%edx
xor    %eax,%eax
call   1040 <printf@plt>
add    $0x28,%rsp
ret

LLVM IR (-O0):
%struct.anon = type { i32, [3 x i32] }
@__const.main_main.a = [3 x i32] [i32 1, i32 2, i32 3]
@__const.main_main.b = %struct.anon { i32 1927, [3 x i32] [i32 5, i32 4, i32 9] }
@.str = [7 x i8] c"a= %d\0A\00"
@.str.1 = [20 x i8] c"x = %d bogomips %d\0A\00"
define void @main_main() {
%1 = alloca [3 x i32]
%2 = alloca %struct.anon
%3 = alloca i32
%4 = alloca i32
%5 = bitcast [3 x i32]* %1 to i8*
%6 = bitcast %struct.anon* %2 to i8*
%7 = getelementptr inbounds [3 x i32], [3 x i32]* %1, i64 0, i64 2
%8 = load i32, i32* %7
%9 = call i32 (i8*, i32, ...) @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i32 %8)
store i32 3, i32* %3
store i32 3, i32* %3
%10 = getelementptr inbounds [3 x i32], [3 x i32]* %1, i64 0, i64 0
%11 = getelementptr inbounds %struct.anon, %struct.anon* %2, i32 0, i32 1
%12 = getelementptr inbounds [3 x i32], [3 x i32]* %11, i64 0, i64 0
%13 = load i32, i32* %3
%14 = call i32 @x(i32* %10, i32* %12, i32 %13)
store i32 %14, i32* %4
%15 = load i32, i32* %4
%16 = load i32, i32* %3
%17 = call i32 (i8*, i32, ...) @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.1, i64 0, i64 0), i32 %15, i32 %16)
ret void
}

LLVM IR (-O2):
%struct.anon = type { i32, [3 x i32] }
@__const.main_main.a = [3 x i32] [i32 1, i32 2, i32 3]
@__const.main_main.b = %struct.anon { i32 1927, [3 x i32] [i32 5, i32 4, i32 9] }
@.str = [7 x i8] c"a= %d\0A\00"
@.str.1 = [20 x i8] c"x = %d bogomips %d\0A\00"
define void @main_main() {
%1 = alloca [3 x i32]
%2 = alloca %struct.anon
%3 = bitcast [3 x i32]* %1 to i8*
%4 = bitcast %struct.anon* %2 to i8*
%5 = tail call i32 (i8*, i32, ...) @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i32 3)
%6 = getelementptr inbounds [3 x i32], [3 x i32]* %1, i64 0, i64 0
%7 = getelementptr inbounds %struct.anon, %struct.anon* %2, i64 0, i32 1, i64 0
%8 = call i32 @x(i32* %6, i32* %7, i32 3)
%9 = call i32 (i8*, i32, ...) @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.1, i64 0, i64 0), i32 %8, i32 3)
ret void
}