#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*/ expects(int, short);
int /*<<< orphan*/ fexpectl(char *, int, int, int);
int /*<<< orphan*/ print(char *);
void testmain() {
  print("long");
  short a = 10;
  short int b = 15;
  expects(25, a + b);
  expects(20, a + 10);
  long x = 67;
  long int y = 69;
  fexpectl(
      "/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/int.c",
      23, 67, x);
  ;
  fexpectl(
      "/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/int.c",
      24, 136, x + y);
  ;
  fexpectl(
      "/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/int.c",
      25, 10L, 10L);
  ;
  fexpectl(
      "/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/int.c",
      26, 4294967295L, 4294967295);
  ;
  fexpectl(
      "/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/int.c",
      27, 1152921504606846976, 1152921504606846976);
  ;
  fexpectl(
      "/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/int.c",
      28, 1152921504606846977, 1152921504606846976 + 1);
  ;
}


x86 assembly (clang, -O0):
<testmain>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
lea    0xec1(%rip),%rdi
call   1030 <print@plt>
movw   $0xa,-0x2(%rbp)
movw   $0xf,-0x4(%rbp)
movswl -0x2(%rbp),%eax
movswl -0x4(%rbp),%ecx
add    %ecx,%eax
mov    $0x19,%edi
movswl %ax,%esi
call   1040 <expects@plt>
movswl -0x2(%rbp),%eax
add    $0xa,%eax
mov    $0x14,%edi
movswl %ax,%esi
call   1040 <expects@plt>
movq   $0x43,-0x10(%rbp)
movq   $0x45,-0x18(%rbp)
mov    -0x10(%rbp),%rax
mov    %eax,%ecx
lea    0xe6d(%rip),%rdi
mov    $0x17,%esi
mov    $0x43,%edx
call   1050 <fexpectl@plt>
mov    -0x10(%rbp),%rax
add    -0x18(%rbp),%rax
mov    %eax,%ecx
lea    0xe4d(%rip),%rdi
mov    $0x18,%esi
mov    $0x88,%edx
call   1050 <fexpectl@plt>
lea    0xe37(%rip),%rdi
mov    $0x19,%esi
mov    $0xa,%ecx
mov    %ecx,%edx
call   1050 <fexpectl@plt>
lea    0xe1f(%rip),%rdi
mov    $0x1a,%esi
mov    $0xffffffff,%ecx
mov    %ecx,%edx
call   1050 <fexpectl@plt>
lea    0xe07(%rip),%rdi
mov    $0x1b,%esi
xor    %ecx,%ecx
mov    %ecx,%edx
call   1050 <fexpectl@plt>
lea    0xdf2(%rip),%rdi
mov    $0x1c,%esi
mov    $0x1,%ecx
mov    %ecx,%edx
call   1050 <fexpectl@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<testmain>:
push   %rbx
lea    0xec8(%rip),%rdi
call   1030 <print@plt>
mov    $0x19,%edi
mov    $0x19,%esi
call   1040 <expects@plt>
mov    $0x14,%edi
mov    $0x14,%esi
call   1040 <expects@plt>
lea    0xea3(%rip),%rbx
mov    %rbx,%rdi
mov    $0x17,%esi
mov    $0x43,%edx
mov    $0x43,%ecx
call   1050 <fexpectl@plt>
mov    %rbx,%rdi
mov    $0x18,%esi
mov    $0x88,%edx
mov    $0x88,%ecx
call   1050 <fexpectl@plt>
mov    %rbx,%rdi
mov    $0x19,%esi
mov    $0xa,%edx
mov    $0xa,%ecx
call   1050 <fexpectl@plt>
mov    %rbx,%rdi
mov    $0x1a,%esi
mov    $0xffffffff,%edx
mov    $0xffffffff,%ecx
call   1050 <fexpectl@plt>
mov    %rbx,%rdi
mov    $0x1b,%esi
xor    %edx,%edx
xor    %ecx,%ecx
call   1050 <fexpectl@plt>
mov    %rbx,%rdi
mov    $0x1c,%esi
mov    $0x1,%edx
mov    $0x1,%ecx
pop    %rbx
jmp    1050 <fexpectl@plt>

LLVM IR (-O0):
@.str = [5 x i8] c"long\00"
@.str.1 = [136 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/int.c\00"
define void @testmain() {
%1 = alloca i16
%2 = alloca i16
%3 = alloca i64
%4 = alloca i64
%5 = call i32 @print(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0))
store i16 10, i16* %1
store i16 15, i16* %2
%6 = load i16, i16* %1
%7 = sext i16 %6 to i32
%8 = load i16, i16* %2
%9 = sext i16 %8 to i32
%10 = add nsw i32 %7, %9
%11 = trunc i32 %10 to i16
%12 = call i32 @expects(i32 25, i16 signext %11)
%13 = load i16, i16* %1
%14 = sext i16 %13 to i32
%15 = add nsw i32 %14, 10
%16 = trunc i32 %15 to i16
%17 = call i32 @expects(i32 20, i16 signext %16)
store i64 67, i64* %3
store i64 69, i64* %4
%18 = load i64, i64* %3
%19 = trunc i64 %18 to i32
%20 = call i32 @fexpectl(i8* getelementptr inbounds ([136 x i8], [136 x i8]* @.str.1, i64 0, i64 0), i32 23, i32 67, i32 %19)
%21 = load i64, i64* %3
%22 = load i64, i64* %4
%23 = add nsw i64 %21, %22
%24 = trunc i64 %23 to i32
%25 = call i32 @fexpectl(i8* getelementptr inbounds ([136 x i8], [136 x i8]* @.str.1, i64 0, i64 0), i32 24, i32 136, i32 %24)
%26 = call i32 @fexpectl(i8* getelementptr inbounds ([136 x i8], [136 x i8]* @.str.1, i64 0, i64 0), i32 25, i32 10, i32 10)
%27 = call i32 @fexpectl(i8* getelementptr inbounds ([136 x i8], [136 x i8]* @.str.1, i64 0, i64 0), i32 26, i32 -1, i32 -1)
%28 = call i32 @fexpectl(i8* getelementptr inbounds ([136 x i8], [136 x i8]* @.str.1, i64 0, i64 0), i32 27, i32 0, i32 0)
%29 = call i32 @fexpectl(i8* getelementptr inbounds ([136 x i8], [136 x i8]* @.str.1, i64 0, i64 0), i32 28, i32 1, i32 1)
ret void
}

LLVM IR (-O2):
@.str = [5 x i8] c"long\00"
@.str.1 = [136 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/int.c\00"
define void @testmain() {
%1 = tail call i32 @print(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0))
%2 = tail call i32 @expects(i32 25, i16 signext 25)
%3 = tail call i32 @expects(i32 20, i16 signext 20)
%4 = tail call i32 @fexpectl(i8* getelementptr inbounds ([136 x i8], [136 x i8]* @.str.1, i64 0, i64 0), i32 23, i32 67, i32 67)
%5 = tail call i32 @fexpectl(i8* getelementptr inbounds ([136 x i8], [136 x i8]* @.str.1, i64 0, i64 0), i32 24, i32 136, i32 136)
%6 = tail call i32 @fexpectl(i8* getelementptr inbounds ([136 x i8], [136 x i8]* @.str.1, i64 0, i64 0), i32 25, i32 10, i32 10)
%7 = tail call i32 @fexpectl(i8* getelementptr inbounds ([136 x i8], [136 x i8]* @.str.1, i64 0, i64 0), i32 26, i32 -1, i32 -1)
%8 = tail call i32 @fexpectl(i8* getelementptr inbounds ([136 x i8], [136 x i8]* @.str.1, i64 0, i64 0), i32 27, i32 0, i32 0)
%9 = tail call i32 @fexpectl(i8* getelementptr inbounds ([136 x i8], [136 x i8]* @.str.1, i64 0, i64 0), i32 28, i32 1, i32 1)
ret void
}