#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_unary() {
  char x = 2;
  short y = 2;
  int z = 2;
  fexpect("/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
          "2022-01-22/02-19-57/repos/8l/8cc/refs/heads/master/test/arith.c",
          81, -2, -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/arith.c",
          82, -2, -y);
  ;
  fexpect("/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
          "2022-01-22/02-19-57/repos/8l/8cc/refs/heads/master/test/arith.c",
          83, -2, -z);
  ;
}


x86 assembly (clang, -O0):
<test_unary>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movb   $0x2,-0x1(%rbp)
movw   $0x2,-0x4(%rbp)
movl   $0x2,-0x8(%rbp)
movsbl -0x1(%rbp),%eax
xor    %ecx,%ecx
sub    %eax,%ecx
lea    0xec8(%rip),%rdi
mov    $0x51,%esi
mov    $0xfffffffe,%edx
call   1030 <fexpect@plt>
movswl -0x4(%rbp),%eax
xor    %ecx,%ecx
sub    %eax,%ecx
lea    0xeaa(%rip),%rdi
mov    $0x52,%esi
mov    $0xfffffffe,%edx
call   1030 <fexpect@plt>
xor    %ecx,%ecx
sub    -0x8(%rbp),%ecx
lea    0xe8f(%rip),%rdi
mov    $0x53,%esi
mov    $0xfffffffe,%edx
call   1030 <fexpect@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_unary>:
push   %rbx
lea    0xee8(%rip),%rbx
mov    %rbx,%rdi
mov    $0x51,%esi
mov    $0xfffffffe,%edx
mov    $0xfffffffe,%ecx
call   1030 <fexpect@plt>
mov    %rbx,%rdi
mov    $0x52,%esi
mov    $0xfffffffe,%edx
mov    $0xfffffffe,%ecx
call   1030 <fexpect@plt>
mov    %rbx,%rdi
mov    $0x53,%esi
mov    $0xfffffffe,%edx
mov    $0xfffffffe,%ecx
pop    %rbx
jmp    1030 <fexpect@plt>

LLVM IR (-O0):
@.str = [128 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/arith.c\00"
define void @test_unary() {
%1 = alloca i8
%2 = alloca i16
%3 = alloca i32
store i8 2, i8* %1
store i16 2, i16* %2
store i32 2, i32* %3
%4 = load i8, i8* %1
%5 = sext i8 %4 to i32
%6 = sub nsw i32 0, %5
%7 = call i32 @fexpect(i8* getelementptr inbounds ([128 x i8], [128 x i8]* @.str, i64 0, i64 0), i32 81, i32 -2, i32 %6)
%8 = load i16, i16* %2
%9 = sext i16 %8 to i32
%10 = sub nsw i32 0, %9
%11 = call i32 @fexpect(i8* getelementptr inbounds ([128 x i8], [128 x i8]* @.str, i64 0, i64 0), i32 82, i32 -2, i32 %10)
%12 = load i32, i32* %3
%13 = sub nsw i32 0, %12
%14 = call i32 @fexpect(i8* getelementptr inbounds ([128 x i8], [128 x i8]* @.str, i64 0, i64 0), i32 83, i32 -2, i32 %13)
ret void
}

LLVM IR (-O2):
@.str = [128 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/arith.c\00"
define void @test_unary() {
%1 = tail call i32 @fexpect(i8* getelementptr inbounds ([128 x i8], [128 x i8]* @.str, i64 0, i64 0), i32 81, i32 -2, i32 -2)
%2 = tail call i32 @fexpect(i8* getelementptr inbounds ([128 x i8], [128 x i8]* @.str, i64 0, i64 0), i32 82, i32 -2, i32 -2)
%3 = tail call i32 @fexpect(i8* getelementptr inbounds ([128 x i8], [128 x i8]* @.str, i64 0, i64 0), i32 83, i32 -2, i32 -2)
ret void
}