int main() {
  int some_int = 20;
  int *p;
  p = (int[]){1, 2, 3, some_int};
  assert(p[0] == 1);
  assert(p[1] == 2);
  assert(p[2] == 3);
  assert(p[3] == 20);
  struct S {
    int x, y;
  } * q;
  q = &(struct S){.x = 1};
  assert(q->x == 1);
  assert(q->y == 0);
  const char *sptr = "asd";
  assert(sptr[0] == 'a');
  assert(sptr[1] == 's');
  assert(sptr[2] == 'd');
  assert(sptr[3] == 0);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
movl   $0x14,-0x4(%rbp)
movl   $0x1,-0x20(%rbp)
movl   $0x2,-0x1c(%rbp)
movl   $0x3,-0x18(%rbp)
mov    -0x4(%rbp),%eax
mov    %eax,-0x14(%rbp)
lea    -0x20(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
cmpl   $0x1,(%rax)
sete   %al
and    $0x1,%al
movzbl %al,%edi
mov    $0x0,%al
call   1030 <assert@plt>
mov    -0x10(%rbp),%rax
cmpl   $0x2,0x4(%rax)
sete   %al
and    $0x1,%al
movzbl %al,%edi
mov    $0x0,%al
call   1030 <assert@plt>
mov    -0x10(%rbp),%rax
cmpl   $0x3,0x8(%rax)
sete   %al
and    $0x1,%al
movzbl %al,%edi
mov    $0x0,%al
call   1030 <assert@plt>
mov    -0x10(%rbp),%rax
cmpl   $0x14,0xc(%rax)
sete   %al
and    $0x1,%al
movzbl %al,%edi
mov    $0x0,%al
call   1030 <assert@plt>
movl   $0x1,-0x30(%rbp)
movl   $0x0,-0x2c(%rbp)
lea    -0x30(%rbp),%rax
mov    %rax,-0x28(%rbp)
mov    -0x28(%rbp),%rax
cmpl   $0x1,(%rax)
sete   %al
and    $0x1,%al
movzbl %al,%edi
mov    $0x0,%al
call   1030 <assert@plt>
mov    -0x28(%rbp),%rax
cmpl   $0x0,0x4(%rax)
sete   %al
and    $0x1,%al
movzbl %al,%edi
mov    $0x0,%al
call   1030 <assert@plt>
lea    0xe19(%rip),%rax
mov    %rax,-0x38(%rbp)
mov    -0x38(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x61,%eax
sete   %al
and    $0x1,%al
movzbl %al,%edi
mov    $0x0,%al
call   1030 <assert@plt>
mov    -0x38(%rbp),%rax
movsbl 0x1(%rax),%eax
cmp    $0x73,%eax
sete   %al
and    $0x1,%al
movzbl %al,%edi
mov    $0x0,%al
call   1030 <assert@plt>
mov    -0x38(%rbp),%rax
movsbl 0x2(%rax),%eax
cmp    $0x64,%eax
sete   %al
and    $0x1,%al
movzbl %al,%edi
mov    $0x0,%al
call   1030 <assert@plt>
mov    -0x38(%rbp),%rax
movsbl 0x3(%rax),%eax
cmp    $0x0,%eax
sete   %al
and    $0x1,%al
movzbl %al,%edi
mov    $0x0,%al
call   1030 <assert@plt>
xor    %eax,%eax
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    $0x1,%edi
xor    %eax,%eax
call   1030 <assert@plt>
mov    $0x1,%edi
xor    %eax,%eax
call   1030 <assert@plt>
mov    $0x1,%edi
xor    %eax,%eax
call   1030 <assert@plt>
mov    $0x1,%edi
xor    %eax,%eax
call   1030 <assert@plt>
mov    $0x1,%edi
xor    %eax,%eax
call   1030 <assert@plt>
mov    $0x1,%edi
xor    %eax,%eax
call   1030 <assert@plt>
mov    $0x1,%edi
xor    %eax,%eax
call   1030 <assert@plt>
mov    $0x1,%edi
xor    %eax,%eax
call   1030 <assert@plt>
mov    $0x1,%edi
xor    %eax,%eax
call   1030 <assert@plt>
mov    $0x1,%edi
xor    %eax,%eax
call   1030 <assert@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
%struct.S = type { i32, i32 }
@.str = [4 x i8] c"asd\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32*
%3 = alloca [4 x i32]
%4 = alloca %struct.S*
%5 = alloca %struct.S
%6 = alloca i8*
store i32 20, i32* %1
%7 = getelementptr inbounds [4 x i32], [4 x i32]* %3, i64 0, i64 0
store i32 1, i32* %7
%8 = getelementptr inbounds i32, i32* %7, i64 1
store i32 2, i32* %8
%9 = getelementptr inbounds i32, i32* %8, i64 1
store i32 3, i32* %9
%10 = getelementptr inbounds i32, i32* %9, i64 1
%11 = load i32, i32* %1
store i32 %11, i32* %10
%12 = getelementptr inbounds [4 x i32], [4 x i32]* %3, i64 0, i64 0
store i32* %12, i32** %2
%13 = load i32*, i32** %2
%14 = getelementptr inbounds i32, i32* %13, i64 0
%15 = load i32, i32* %14
%16 = icmp eq i32 %15, 1
%17 = zext i1 %16 to i32
%18 = call i32 (i32, ...) bitcast (i32 (...)* @assert to i32 (i32, ...)*)(i32 %17)
%19 = load i32*, i32** %2
%20 = getelementptr inbounds i32, i32* %19, i64 1
%21 = load i32, i32* %20
%22 = icmp eq i32 %21, 2
%23 = zext i1 %22 to i32
%24 = call i32 (i32, ...) bitcast (i32 (...)* @assert to i32 (i32, ...)*)(i32 %23)
%25 = load i32*, i32** %2
%26 = getelementptr inbounds i32, i32* %25, i64 2
%27 = load i32, i32* %26
%28 = icmp eq i32 %27, 3
%29 = zext i1 %28 to i32
%30 = call i32 (i32, ...) bitcast (i32 (...)* @assert to i32 (i32, ...)*)(i32 %29)
%31 = load i32*, i32** %2
%32 = getelementptr inbounds i32, i32* %31, i64 3
%33 = load i32, i32* %32
%34 = icmp eq i32 %33, 20
%35 = zext i1 %34 to i32
%36 = call i32 (i32, ...) bitcast (i32 (...)* @assert to i32 (i32, ...)*)(i32 %35)
%37 = getelementptr inbounds %struct.S, %struct.S* %5, i32 0, i32 0
store i32 1, i32* %37
%38 = getelementptr inbounds %struct.S, %struct.S* %5, i32 0, i32 1
store i32 0, i32* %38
store %struct.S* %5, %struct.S** %4
%39 = load %struct.S*, %struct.S** %4
%40 = getelementptr inbounds %struct.S, %struct.S* %39, i32 0, i32 0
%41 = load i32, i32* %40
%42 = icmp eq i32 %41, 1
%43 = zext i1 %42 to i32
%44 = call i32 (i32, ...) bitcast (i32 (...)* @assert to i32 (i32, ...)*)(i32 %43)
%45 = load %struct.S*, %struct.S** %4
%46 = getelementptr inbounds %struct.S, %struct.S* %45, i32 0, i32 1
%47 = load i32, i32* %46
%48 = icmp eq i32 %47, 0
%49 = zext i1 %48 to i32
%50 = call i32 (i32, ...) bitcast (i32 (...)* @assert to i32 (i32, ...)*)(i32 %49)
store i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8** %6
%51 = load i8*, i8** %6
%52 = getelementptr inbounds i8, i8* %51, i64 0
%53 = load i8, i8* %52
%54 = sext i8 %53 to i32
%55 = icmp eq i32 %54, 97
%56 = zext i1 %55 to i32
%57 = call i32 (i32, ...) bitcast (i32 (...)* @assert to i32 (i32, ...)*)(i32 %56)
%58 = load i8*, i8** %6
%59 = getelementptr inbounds i8, i8* %58, i64 1
%60 = load i8, i8* %59
%61 = sext i8 %60 to i32
%62 = icmp eq i32 %61, 115
%63 = zext i1 %62 to i32
%64 = call i32 (i32, ...) bitcast (i32 (...)* @assert to i32 (i32, ...)*)(i32 %63)
%65 = load i8*, i8** %6
%66 = getelementptr inbounds i8, i8* %65, i64 2
%67 = load i8, i8* %66
%68 = sext i8 %67 to i32
%69 = icmp eq i32 %68, 100
%70 = zext i1 %69 to i32
%71 = call i32 (i32, ...) bitcast (i32 (...)* @assert to i32 (i32, ...)*)(i32 %70)
%72 = load i8*, i8** %6
%73 = getelementptr inbounds i8, i8* %72, i64 3
%74 = load i8, i8* %73
%75 = sext i8 %74 to i32
%76 = icmp eq i32 %75, 0
%77 = zext i1 %76 to i32
%78 = call i32 (i32, ...) bitcast (i32 (...)* @assert to i32 (i32, ...)*)(i32 %77)
ret i32 0
}

LLVM IR (-O2):
%struct.S = type { i32, i32 }
define i32 @main() {
%1 = tail call i32 (i32, ...) bitcast (i32 (...)* @assert to i32 (i32, ...)*)(i32 1)
%2 = tail call i32 (i32, ...) bitcast (i32 (...)* @assert to i32 (i32, ...)*)(i32 1)
%3 = tail call i32 (i32, ...) bitcast (i32 (...)* @assert to i32 (i32, ...)*)(i32 1)
%4 = tail call i32 (i32, ...) bitcast (i32 (...)* @assert to i32 (i32, ...)*)(i32 1)
%5 = tail call i32 (i32, ...) bitcast (i32 (...)* @assert to i32 (i32, ...)*)(i32 1)
%6 = tail call i32 (i32, ...) bitcast (i32 (...)* @assert to i32 (i32, ...)*)(i32 1)
%7 = tail call i32 (i32, ...) bitcast (i32 (...)* @assert to i32 (i32, ...)*)(i32 1)
%8 = tail call i32 (i32, ...) bitcast (i32 (...)* @assert to i32 (i32, ...)*)(i32 1)
%9 = tail call i32 (i32, ...) bitcast (i32 (...)* @assert to i32 (i32, ...)*)(i32 1)
%10 = tail call i32 (i32, ...) bitcast (i32 (...)* @assert to i32 (i32, ...)*)(i32 1)
ret i32 0
}