#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*/ fexpect(char *, int, int, int);
void test_typedef() {
  typedef int integer;
  integer a = 5;
  fexpect("/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
          "2022-01-22/02-19-57/repos/8l/8cc/refs/heads/master/test/input/8cc/"
          "type.c",
          71, 5, a);
  ;
  typedef int array[3];
  array b = {1, 2, 3};
  fexpect("/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
          "2022-01-22/02-19-57/repos/8l/8cc/refs/heads/master/test/input/8cc/"
          "type.c",
          75, 2, b[1]);
  ;
  typedef struct tag {
    int x;
  } strtype;
  strtype c;
  c.x = 5;
  fexpect("/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
          "2022-01-22/02-19-57/repos/8l/8cc/refs/heads/master/test/input/8cc/"
          "type.c",
          80, 5, c.x);
  ;
  typedef char x;
  {
    int x = 3;
    fexpect("/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
            "2022-01-22/02-19-57/repos/8l/8cc/refs/heads/master/test/input/8cc/"
            "type.c",
            85, 3, x);
    ;
  }
  {
    int a = sizeof(x), x = 5, c = sizeof(x);
    fexpect("/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
            "2022-01-22/02-19-57/repos/8l/8cc/refs/heads/master/test/input/8cc/"
            "type.c",
            89, 1, a);
    ;
    fexpect("/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
            "2022-01-22/02-19-57/repos/8l/8cc/refs/heads/master/test/input/8cc/"
            "type.c",
            90, 5, x);
    ;
    fexpect("/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
            "2022-01-22/02-19-57/repos/8l/8cc/refs/heads/master/test/input/8cc/"
            "type.c",
            91, 4, c);
    ;
  }
}


x86 assembly (clang, -O0):
<test_typedef>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movl   $0x5,-0x4(%rbp)
mov    -0x4(%rbp),%ecx
lea    0xed7(%rip),%rdi
mov    $0x47,%esi
mov    $0x5,%edx
call   1030 <fexpect@plt>
mov    0xf4d(%rip),%rax
mov    %rax,-0x10(%rbp)
mov    0xf4b(%rip),%eax
mov    %eax,-0x8(%rbp)
mov    -0xc(%rbp),%ecx
lea    0xeaa(%rip),%rdi
mov    $0x4b,%esi
mov    $0x2,%edx
call   1030 <fexpect@plt>
movl   $0x5,-0x18(%rbp)
mov    -0x18(%rbp),%ecx
lea    0xe8a(%rip),%rdi
mov    $0x50,%esi
mov    $0x5,%edx
call   1030 <fexpect@plt>
movl   $0x3,-0x1c(%rbp)
mov    -0x1c(%rbp),%ecx
lea    0xe6a(%rip),%rdi
mov    $0x55,%esi
mov    $0x3,%edx
call   1030 <fexpect@plt>
movl   $0x1,-0x20(%rbp)
movl   $0x5,-0x24(%rbp)
movl   $0x4,-0x28(%rbp)
mov    -0x20(%rbp),%ecx
lea    0xe3c(%rip),%rdi
mov    $0x59,%esi
mov    $0x1,%edx
call   1030 <fexpect@plt>
mov    -0x24(%rbp),%ecx
lea    0xe23(%rip),%rdi
mov    $0x5a,%esi
mov    $0x5,%edx
call   1030 <fexpect@plt>
mov    -0x28(%rbp),%ecx
lea    0xe0a(%rip),%rdi
mov    $0x5b,%esi
mov    $0x4,%edx
call   1030 <fexpect@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_typedef>:
push   %rbx
lea    0xee8(%rip),%rbx
mov    %rbx,%rdi
mov    $0x47,%esi
mov    $0x5,%edx
mov    $0x5,%ecx
call   1030 <fexpect@plt>
mov    %rbx,%rdi
mov    $0x4b,%esi
mov    $0x2,%edx
mov    $0x2,%ecx
call   1030 <fexpect@plt>
mov    %rbx,%rdi
mov    $0x50,%esi
mov    $0x5,%edx
mov    $0x5,%ecx
call   1030 <fexpect@plt>
mov    %rbx,%rdi
mov    $0x55,%esi
mov    $0x3,%edx
mov    $0x3,%ecx
call   1030 <fexpect@plt>
mov    %rbx,%rdi
mov    $0x59,%esi
mov    $0x1,%edx
mov    $0x1,%ecx
call   1030 <fexpect@plt>
mov    %rbx,%rdi
mov    $0x5a,%esi
mov    $0x5,%edx
mov    $0x5,%ecx
call   1030 <fexpect@plt>
mov    %rbx,%rdi
mov    $0x5b,%esi
mov    $0x4,%edx
mov    $0x4,%ecx
pop    %rbx
jmp    1030 <fexpect@plt>

LLVM IR (-O0):
%struct.tag = type { i32 }
@.str = [137 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/8l/8cc/refs/heads/master/test/input/8cc/type.c\00"
@__const.test_typedef.b = [3 x i32] [i32 1, i32 2, i32 3]
define void @test_typedef() {
%1 = alloca i32
%2 = alloca [3 x i32]
%3 = alloca %struct.tag
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
store i32 5, i32* %1
%8 = load i32, i32* %1
%9 = call i32 @fexpect(i8* getelementptr inbounds ([137 x i8], [137 x i8]* @.str, i64 0, i64 0), i32 71, i32 5, i32 %8)
%10 = bitcast [3 x i32]* %2 to i8*
%11 = getelementptr inbounds [3 x i32], [3 x i32]* %2, i64 0, i64 1
%12 = load i32, i32* %11
%13 = call i32 @fexpect(i8* getelementptr inbounds ([137 x i8], [137 x i8]* @.str, i64 0, i64 0), i32 75, i32 2, i32 %12)
%14 = getelementptr inbounds %struct.tag, %struct.tag* %3, i32 0, i32 0
store i32 5, i32* %14
%15 = getelementptr inbounds %struct.tag, %struct.tag* %3, i32 0, i32 0
%16 = load i32, i32* %15
%17 = call i32 @fexpect(i8* getelementptr inbounds ([137 x i8], [137 x i8]* @.str, i64 0, i64 0), i32 80, i32 5, i32 %16)
store i32 3, i32* %4
%18 = load i32, i32* %4
%19 = call i32 @fexpect(i8* getelementptr inbounds ([137 x i8], [137 x i8]* @.str, i64 0, i64 0), i32 85, i32 3, i32 %18)
store i32 1, i32* %5
store i32 5, i32* %6
store i32 4, i32* %7
%20 = load i32, i32* %5
%21 = call i32 @fexpect(i8* getelementptr inbounds ([137 x i8], [137 x i8]* @.str, i64 0, i64 0), i32 89, i32 1, i32 %20)
%22 = load i32, i32* %6
%23 = call i32 @fexpect(i8* getelementptr inbounds ([137 x i8], [137 x i8]* @.str, i64 0, i64 0), i32 90, i32 5, i32 %22)
%24 = load i32, i32* %7
%25 = call i32 @fexpect(i8* getelementptr inbounds ([137 x i8], [137 x i8]* @.str, i64 0, i64 0), i32 91, i32 4, i32 %24)
ret void
}

LLVM IR (-O2):
@.str = [137 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/8l/8cc/refs/heads/master/test/input/8cc/type.c\00"
define void @test_typedef() {
%1 = tail call i32 @fexpect(i8* getelementptr inbounds ([137 x i8], [137 x i8]* @.str, i64 0, i64 0), i32 71, i32 5, i32 5)
%2 = tail call i32 @fexpect(i8* getelementptr inbounds ([137 x i8], [137 x i8]* @.str, i64 0, i64 0), i32 75, i32 2, i32 2)
%3 = tail call i32 @fexpect(i8* getelementptr inbounds ([137 x i8], [137 x i8]* @.str, i64 0, i64 0), i32 80, i32 5, i32 5)
%4 = tail call i32 @fexpect(i8* getelementptr inbounds ([137 x i8], [137 x i8]* @.str, i64 0, i64 0), i32 85, i32 3, i32 3)
%5 = tail call i32 @fexpect(i8* getelementptr inbounds ([137 x i8], [137 x i8]* @.str, i64 0, i64 0), i32 89, i32 1, i32 1)
%6 = tail call i32 @fexpect(i8* getelementptr inbounds ([137 x i8], [137 x i8]* @.str, i64 0, i64 0), i32 90, i32 5, i32 5)
%7 = tail call i32 @fexpect(i8* getelementptr inbounds ([137 x i8], [137 x i8]* @.str, i64 0, i64 0), i32 91, i32 4, i32 4)
ret void
}