#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 */
typedef int /*<<< orphan*/ data;
typedef int /*<<< orphan*/ d;
typedef int /*<<< orphan*/ c;
typedef int /*<<< orphan*/ b;
typedef int /*<<< orphan*/ array;
typedef int /*<<< orphan*/ a;

/* Variables and functions */
int /*<<< orphan*/ expecti(int, int);
void test() {
  char a;
  short b;
  int c;
  long d;
  expecti(1, sizeof(a));
  expecti(1, sizeof a);
  expecti(1, sizeof(char));
  expecti(2, sizeof(b));
  expecti(2, sizeof b);
  expecti(2, sizeof(short));
  expecti(4, sizeof(c));
  expecti(4, sizeof c);
  expecti(4, sizeof(int));
  expecti(8, sizeof(d));
  expecti(8, sizeof d);
  expecti(8, sizeof(long));
  int array[4];
  expecti(4 * 4, sizeof(array));
  struct {
    int a;
    int b;
  } data;
  expecti(8, sizeof(data));
}


x86 assembly (clang, -O0):
<test>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    $0x1,%esi
mov    %esi,%edi
call   1030 <expecti@plt>
mov    $0x1,%esi
mov    %esi,%edi
call   1030 <expecti@plt>
mov    $0x1,%esi
mov    %esi,%edi
call   1030 <expecti@plt>
mov    $0x2,%esi
mov    %esi,%edi
call   1030 <expecti@plt>
mov    $0x2,%esi
mov    %esi,%edi
call   1030 <expecti@plt>
mov    $0x2,%esi
mov    %esi,%edi
call   1030 <expecti@plt>
mov    $0x4,%esi
mov    %esi,%edi
call   1030 <expecti@plt>
mov    $0x4,%esi
mov    %esi,%edi
call   1030 <expecti@plt>
mov    $0x4,%esi
mov    %esi,%edi
call   1030 <expecti@plt>
mov    $0x8,%esi
mov    %esi,%edi
call   1030 <expecti@plt>
mov    $0x8,%esi
mov    %esi,%edi
call   1030 <expecti@plt>
mov    $0x8,%esi
mov    %esi,%edi
call   1030 <expecti@plt>
mov    $0x10,%esi
mov    %esi,%edi
call   1030 <expecti@plt>
mov    $0x8,%esi
mov    %esi,%edi
call   1030 <expecti@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test>:
push   %rax
mov    $0x1,%edi
mov    $0x1,%esi
call   1030 <expecti@plt>
mov    $0x1,%edi
mov    $0x1,%esi
call   1030 <expecti@plt>
mov    $0x1,%edi
mov    $0x1,%esi
call   1030 <expecti@plt>
mov    $0x2,%edi
mov    $0x2,%esi
call   1030 <expecti@plt>
mov    $0x2,%edi
mov    $0x2,%esi
call   1030 <expecti@plt>
mov    $0x2,%edi
mov    $0x2,%esi
call   1030 <expecti@plt>
mov    $0x4,%edi
mov    $0x4,%esi
call   1030 <expecti@plt>
mov    $0x4,%edi
mov    $0x4,%esi
call   1030 <expecti@plt>
mov    $0x4,%edi
mov    $0x4,%esi
call   1030 <expecti@plt>
mov    $0x8,%edi
mov    $0x8,%esi
call   1030 <expecti@plt>
mov    $0x8,%edi
mov    $0x8,%esi
call   1030 <expecti@plt>
mov    $0x8,%edi
mov    $0x8,%esi
call   1030 <expecti@plt>
mov    $0x10,%edi
mov    $0x10,%esi
call   1030 <expecti@plt>
mov    $0x8,%edi
mov    $0x8,%esi
pop    %rax
jmp    1030 <expecti@plt>

LLVM IR (-O0):
%struct.anon = type { i32, i32 }
define void @test() {
%1 = alloca i8
%2 = alloca i16
%3 = alloca i32
%4 = alloca i64
%5 = alloca [4 x i32]
%6 = alloca %struct.anon
%7 = call i32 @expecti(i32 1, i32 1)
%8 = call i32 @expecti(i32 1, i32 1)
%9 = call i32 @expecti(i32 1, i32 1)
%10 = call i32 @expecti(i32 2, i32 2)
%11 = call i32 @expecti(i32 2, i32 2)
%12 = call i32 @expecti(i32 2, i32 2)
%13 = call i32 @expecti(i32 4, i32 4)
%14 = call i32 @expecti(i32 4, i32 4)
%15 = call i32 @expecti(i32 4, i32 4)
%16 = call i32 @expecti(i32 8, i32 8)
%17 = call i32 @expecti(i32 8, i32 8)
%18 = call i32 @expecti(i32 8, i32 8)
%19 = call i32 @expecti(i32 16, i32 16)
%20 = call i32 @expecti(i32 8, i32 8)
ret void
}

LLVM IR (-O2):
%struct.anon = type { i32, i32 }
define void @test() {
%1 = tail call i32 @expecti(i32 1, i32 1)
%2 = tail call i32 @expecti(i32 1, i32 1)
%3 = tail call i32 @expecti(i32 1, i32 1)
%4 = tail call i32 @expecti(i32 2, i32 2)
%5 = tail call i32 @expecti(i32 2, i32 2)
%6 = tail call i32 @expecti(i32 2, i32 2)
%7 = tail call i32 @expecti(i32 4, i32 4)
%8 = tail call i32 @expecti(i32 4, i32 4)
%9 = tail call i32 @expecti(i32 4, i32 4)
%10 = tail call i32 @expecti(i32 8, i32 8)
%11 = tail call i32 @expecti(i32 8, i32 8)
%12 = tail call i32 @expecti(i32 8, i32 8)
%13 = tail call i32 @expecti(i32 16, i32 16)
%14 = tail call i32 @expecti(i32 8, i32 8)
ret void
}