xunge/DecIR huggingface dataset:
/* Variables and functions */
int test2();
int test3(void) { return test2(); }


x86 assembly (clang, -O0):
<test3>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1030 <test2@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<test3>:
xor    %eax,%eax
jmp    1030 <test2@plt>

LLVM IR (-O0):
define i32 @test3() {
%1 = call i32 (...) @test2()
ret i32 %1
}

LLVM IR (-O2):
define i32 @test3() {
%1 = tail call i32 (...) @test2()
ret i32 %1
}
int test_imm_2Bint16_reg(short val) {
  return ((val) & (0x2B << 0)) ? -20 : -40;
}


x86 assembly (clang, -O0):
<test_imm_2Bint16_reg>:
push   %rbp
mov    %rsp,%rbp
mov    %di,%ax
mov    %ax,-0x2(%rbp)
movswl -0x2(%rbp),%edx
and    $0x2b,%edx
mov    $0xffffffd8,%eax
mov    $0xffffffec,%ecx
cmp    $0x0,%edx
cmovne %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_imm_2Bint16_reg>:
test   $0x2b,%dil
mov    $0xffffffd8,%ecx
mov    $0xffffffec,%eax
cmove  %ecx,%eax
ret

LLVM IR (-O0):
define i32 @test_imm_2Bint16_reg(i16 signext %0) {
%2 = alloca i16
store i16 %0, i16* %2
%3 = load i16, i16* %2
%4 = sext i16 %3 to i32
%5 = and i32 %4, 43
%6 = icmp ne i32 %5, 0
%7 = zext i1 %6 to i64
%8 = select i1 %6, i32 -20, i32 -40
ret i32 %8
}

LLVM IR (-O2):
define i32 @test_imm_2Bint16_reg(i16 signext %0) {
%2 = and i16 %0, 43
%3 = icmp eq i16 %2, 0
%4 = select i1 %3, i32 -40, i32 -20
ret i32 %4
}
int test_imm_E3int64_highword_mem(long long *val) {
  return ((*val >> 32) & (0xE3 << 0)) ? -20 : -40;
}


x86 assembly (clang, -O0):
<test_imm_E3int64_highword_mem>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%rdx
sar    $0x20,%rdx
and    $0xe3,%rdx
mov    $0xffffffd8,%eax
mov    $0xffffffec,%ecx
cmp    $0x0,%rdx
cmovne %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_imm_E3int64_highword_mem>:
testb  $0xe3,0x4(%rdi)
mov    $0xffffffd8,%ecx
mov    $0xffffffec,%eax
cmove  %ecx,%eax
ret

LLVM IR (-O0):
define i32 @test_imm_E3int64_highword_mem(i64* %0) {
%2 = alloca i64*
store i64* %0, i64** %2
%3 = load i64*, i64** %2
%4 = load i64, i64* %3
%5 = ashr i64 %4, 32
%6 = and i64 %5, 227
%7 = icmp ne i64 %6, 0
%8 = zext i1 %7 to i64
%9 = select i1 %7, i32 -20, i32 -40
ret i32 %9
}

LLVM IR (-O2):
define i32 @test_imm_E3int64_highword_mem(i64* nocapture %0) {
%2 = load i64, i64* %0
%3 = and i64 %2, 974957576192
%4 = icmp eq i64 %3, 0
%5 = select i1 %4, i32 -40, i32 -20
ret i32 %5
}
/* Type definitions */
typedef int uint8_t;

/* Variables and functions */
void h265nal_set_temporalid1(uint8_t *p_h265nal, uint8_t i_temporalid1) {
  p_h265nal[4] &= ~0x7;
  p_h265nal[4] |= i_temporalid1 & 0x7;
}


x86 assembly (clang, -O0):
<h265nal_set_temporalid1>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rax
mov    0x10(%rax),%ecx
and    $0xfffffff8,%ecx
mov    %ecx,0x10(%rax)
mov    -0xc(%rbp),%ecx
and    $0x7,%ecx
mov    -0x8(%rbp),%rax
or     0x10(%rax),%ecx
mov    %ecx,0x10(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<h265nal_set_temporalid1>:
mov    0x10(%rdi),%eax
and    $0xfffffff8,%eax
and    $0x7,%esi
or     %eax,%esi
mov    %esi,0x10(%rdi)
ret

LLVM IR (-O0):
define void @h265nal_set_temporalid1(i32* %0, i32 %1) {
%3 = alloca i32*
%4 = alloca i32
store i32* %0, i32** %3
store i32 %1, i32* %4
%5 = load i32*, i32** %3
%6 = getelementptr inbounds i32, i32* %5, i64 4
%7 = load i32, i32* %6
%8 = and i32 %7, -8
store i32 %8, i32* %6
%9 = load i32, i32* %4
%10 = and i32 %9, 7
%11 = load i32*, i32** %3
%12 = getelementptr inbounds i32, i32* %11, i64 4
%13 = load i32, i32* %12
%14 = or i32 %13, %10
store i32 %14, i32* %12
ret void
}

LLVM IR (-O2):
define void @h265nal_set_temporalid1(i32* nocapture %0, i32 %1) {
%3 = getelementptr inbounds i32, i32* %0, i64 4
%4 = load i32, i32* %3
%5 = and i32 %4, -8
%6 = and i32 %1, 7
%7 = or i32 %5, %6
store i32 %7, i32* %3
ret void
}
char **currentboard_1_svc(void *argp, struct svc_req *rqstp) {
  static char *result;
  return &result;
}


x86 assembly (clang, -O0):
<currentboard_1_svc>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
lea    0x2f15(%rip),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<currentboard_1_svc>:
lea    0x2f21(%rip),%rax
ret

LLVM IR (-O0):
%struct.svc_req = type opaque
@currentboard_1_svc.result = internal global i8* null
define i8** @currentboard_1_svc(i8* %0, %struct.svc_req* %1) {
%3 = alloca i8*
%4 = alloca %struct.svc_req*
store i8* %0, i8** %3
store %struct.svc_req* %1, %struct.svc_req** %4
ret i8** @currentboard_1_svc.result
}

LLVM IR (-O2):
%struct.svc_req = type opaque
@currentboard_1_svc.result = internal global i8* null
define i8** @currentboard_1_svc(i8* nocapture readnone %0, %struct.svc_req* nocapture readnone %1) {
ret i8** @currentboard_1_svc.result
}
/* Variables and functions */
int /*<<< orphan*/ scanf(char *, char *);
scalar_t__ strcmp(char *, char *);
int check_pass() {
  char buff[80];
  scanf("%s", buff);
  if (strcmp(buff, "hi") == 0)
    return 1;
  else
    return 0;
}


x86 assembly (clang, -O0):
<check_pass>:
push   %rbp
mov    %rsp,%rbp
sub    $0x60,%rsp
lea    -0x60(%rbp),%rsi
lea    0xecd(%rip),%rdi
call   1040 <scanf@plt>
lea    -0x60(%rbp),%rdi
lea    0xec0(%rip),%rsi
call   1030 <strcmp@plt>
cmp    $0x0,%rax
jne    115e <check_pass+0x3e>
movl   $0x1,-0x4(%rbp)
jmp    1165 <check_pass+0x45>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x60,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<check_pass>:
push   %rbx
sub    $0x50,%rsp
lea    0xed4(%rip),%rdi
mov    %rsp,%rbx
mov    %rbx,%rsi
call   1040 <scanf@plt>
lea    0xec5(%rip),%rsi
mov    %rbx,%rdi
call   1030 <strcmp@plt>
xor    %ecx,%ecx
test   %rax,%rax
sete   %cl
mov    %ecx,%eax
add    $0x50,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@.str = [3 x i8] c"%s\00"
@.str.1 = [3 x i8] c"hi\00"
define i32 @check_pass() {
%1 = alloca i32
%2 = alloca [80 x i8]
%3 = getelementptr inbounds [80 x i8], [80 x i8]* %2, i64 0, i64 0
%4 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* %3)
%5 = getelementptr inbounds [80 x i8], [80 x i8]* %2, i64 0, i64 0
%6 = call i64 @strcmp(i8* %5, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0))
%7 = icmp eq i64 %6, 0
br i1 %7, label %8, label %9
8: ; preds = %0
store i32 1, i32* %1
br label %10
9: ; preds = %0
store i32 0, i32* %1
br label %10
10: ; preds = %9, %8
%11 = load i32, i32* %1
ret i32 %11
}

LLVM IR (-O2):
@.str = [3 x i8] c"%s\00"
@.str.1 = [3 x i8] c"hi\00"
define i32 @check_pass() {
%1 = alloca [80 x i8]
%2 = getelementptr inbounds [80 x i8], [80 x i8]* %1, i64 0, i64 0
%3 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* %2)
%4 = call i64 @strcmp(i8* %2, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0))
%5 = icmp eq i64 %4, 0
%6 = zext i1 %5 to i32
ret i32 %6
}
int func3() {}


x86 assembly (clang, -O0):
<func3>:
push   %rbp
mov    %rsp,%rbp
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<func3>:
ret

LLVM IR (-O0):
define i32 @func3() {
%1 = alloca i32
%2 = load i32, i32* %1
ret i32 %2
}

LLVM IR (-O2):
define i32 @func3() {
ret i32 undef
}
int test_uninit_2(void) {
  int result;
  result += 3;
  return result;
}


x86 assembly (clang, -O0):
<test_uninit_2>:
push   %rbp
mov    %rsp,%rbp
mov    -0x4(%rbp),%eax
add    $0x3,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_uninit_2>:
ret

LLVM IR (-O0):
define i32 @test_uninit_2() {
%1 = alloca i32
%2 = load i32, i32* %1
%3 = add nsw i32 %2, 3
store i32 %3, i32* %1
%4 = load i32, i32* %1
ret i32 %4
}

LLVM IR (-O2):
define i32 @test_uninit_2() {
ret i32 undef
}
void inicializace(void) {}


x86 assembly (clang, -O0):
<inicializace>:
push   %rbp
mov    %rsp,%rbp
pop    %rbp
ret

x86 assembly (clang, -O2):
<inicializace>:
ret

LLVM IR (-O0):
define void @inicializace() {
ret void
}

LLVM IR (-O2):
define void @inicializace() {
ret void
}
/* Type definitions */
struct stat {
  int st_size;
};

/* Variables and functions */
int myls_get_size(struct stat *filename_stat) { return filename_stat->st_size; }


x86 assembly (clang, -O0):
<myls_get_size>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<myls_get_size>:
mov    (%rdi),%eax
ret

LLVM IR (-O0):
%struct.stat = type { i32 }
define i32 @myls_get_size(%struct.stat* %0) {
%2 = alloca %struct.stat*
store %struct.stat* %0, %struct.stat** %2
%3 = load %struct.stat*, %struct.stat** %2
%4 = getelementptr inbounds %struct.stat, %struct.stat* %3, i32 0, i32 0
%5 = load i32, i32* %4
ret i32 %5
}

LLVM IR (-O2):
%struct.stat = type { i32 }
define i32 @myls_get_size(%struct.stat* nocapture %0) {
%2 = getelementptr inbounds %struct.stat, %struct.stat* %0, i64 0, i32 0
%3 = load i32, i32* %2
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ syscall(int, int, int /*<<< orphan*/, int /*<<< orphan*/,
                           int /*<<< orphan*/, int /*<<< orphan*/);
void exit(int code) {
  syscall(93, code, 0, 0, 0, 0);
  for (;;) {
  }
}


x86 assembly (clang, -O0):
<exit>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%esi
mov    $0x5d,%edi
xor    %r9d,%r9d
mov    %r9d,%edx
mov    %r9d,%ecx
mov    %r9d,%r8d
call   1030 <syscall@plt>
jmp    1134 <exit+0x24>

x86 assembly (clang, -O2):
<exit>:
push   %rax
mov    %edi,%esi
mov    $0x5d,%edi
xor    %edx,%edx
xor    %ecx,%ecx
xor    %r8d,%r8d
xor    %r9d,%r9d
call   1030 <syscall@plt>
nopw   0x0(%rax,%rax,1)
jmp    1130 <exit+0x20>

LLVM IR (-O0):
define void @exit(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = call i32 @syscall(i32 93, i32 %3, i32 0, i32 0, i32 0, i32 0)
br label %5
5: ; preds = %5, %1
br label %5
}

LLVM IR (-O2):
define void @exit(i32 %0) {
%2 = tail call i32 @syscall(i32 93, i32 %0, i32 0, i32 0, i32 0, i32 0)
br label %3
3: ; preds = %3, %1
br label %3
}
/* Variables and functions */
int /*<<< orphan*/ FerMem_Free(float **, char *, int);
void dynmem_free_ptr_array_(float ***mr_ptrs_ptr) {
  FerMem_Free(*mr_ptrs_ptr,
              "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
              "2022-01-22/02-19-57/repos/NOAA-PMEL/Ferret/refs/heads/master/"
              "fer/ccr/dynmemUtil.c",
              105);
  *mr_ptrs_ptr = NULL;
}


x86 assembly (clang, -O0):
<dynmem_free_ptr_array_>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%rdi
lea    0xed6(%rip),%rsi
mov    $0x69,%edx
call   1030 <FerMem_Free@plt>
mov    -0x8(%rbp),%rax
movq   $0x0,(%rax)
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<dynmem_free_ptr_array_>:
push   %rbx
mov    %rdi,%rbx
mov    (%rdi),%rdi
lea    0xee2(%rip),%rsi
mov    $0x69,%edx
call   1030 <FerMem_Free@plt>
movq   $0x0,(%rbx)
pop    %rbx
ret

LLVM IR (-O0):
@.str = [146 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/NOAA-PMEL/Ferret/refs/heads/master/fer/ccr/dynmemUtil.c\00"
define void @dynmem_free_ptr_array_(float*** %0) {
%2 = alloca float***
store float*** %0, float**** %2
%3 = load float***, float**** %2
%4 = load float**, float*** %3
%5 = call i32 @FerMem_Free(float** %4, i8* getelementptr inbounds ([146 x i8], [146 x i8]* @.str, i64 0, i64 0), i32 105)
%6 = load float***, float**** %2
store float** null, float*** %6
ret void
}

LLVM IR (-O2):
@.str = [146 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/NOAA-PMEL/Ferret/refs/heads/master/fer/ccr/dynmemUtil.c\00"
define void @dynmem_free_ptr_array_(float*** nocapture %0) {
%2 = load float**, float*** %0
%3 = tail call i32 @FerMem_Free(float** %2, i8* getelementptr inbounds ([146 x i8], [146 x i8]* @.str, i64 0, i64 0), i32 105)
store float** null, float*** %0
ret void
}
unsigned long _f_getlong(void *ptr) {
  unsigned char *sptr = (unsigned char *)ptr;
  unsigned long ret;
  ret = (unsigned long)(sptr[3] & 0xff);
  ret <<= 8;
  ret |= (sptr[2] & 0xff);
  ret <<= 8;
  ret |= (sptr[1] & 0xff);
  ret <<= 8;
  ret |= (sptr[0] & 0xff);
  return ret;
}


x86 assembly (clang, -O0):
<_f_getlong>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
movzbl 0x3(%rax),%eax
and    $0xff,%eax
cltq
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rax
shl    $0x8,%rax
mov    %rax,-0x18(%rbp)
mov    -0x10(%rbp),%rax
movzbl 0x2(%rax),%eax
and    $0xff,%eax
cltq
or     -0x18(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rax
shl    $0x8,%rax
mov    %rax,-0x18(%rbp)
mov    -0x10(%rbp),%rax
movzbl 0x1(%rax),%eax
and    $0xff,%eax
cltq
or     -0x18(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rax
shl    $0x8,%rax
mov    %rax,-0x18(%rbp)
mov    -0x10(%rbp),%rax
movzbl (%rax),%eax
and    $0xff,%eax
cltq
or     -0x18(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<_f_getlong>:
mov    (%rdi),%eax
ret

LLVM IR (-O0):
define i64 @_f_getlong(i8* %0) {
%2 = alloca i8*
%3 = alloca i8*
%4 = alloca i64
store i8* %0, i8** %2
%5 = load i8*, i8** %2
store i8* %5, i8** %3
%6 = load i8*, i8** %3
%7 = getelementptr inbounds i8, i8* %6, i64 3
%8 = load i8, i8* %7
%9 = zext i8 %8 to i32
%10 = and i32 %9, 255
%11 = sext i32 %10 to i64
store i64 %11, i64* %4
%12 = load i64, i64* %4
%13 = shl i64 %12, 8
store i64 %13, i64* %4
%14 = load i8*, i8** %3
%15 = getelementptr inbounds i8, i8* %14, i64 2
%16 = load i8, i8* %15
%17 = zext i8 %16 to i32
%18 = and i32 %17, 255
%19 = sext i32 %18 to i64
%20 = load i64, i64* %4
%21 = or i64 %20, %19
store i64 %21, i64* %4
%22 = load i64, i64* %4
%23 = shl i64 %22, 8
store i64 %23, i64* %4
%24 = load i8*, i8** %3
%25 = getelementptr inbounds i8, i8* %24, i64 1
%26 = load i8, i8* %25
%27 = zext i8 %26 to i32
%28 = and i32 %27, 255
%29 = sext i32 %28 to i64
%30 = load i64, i64* %4
%31 = or i64 %30, %29
store i64 %31, i64* %4
%32 = load i64, i64* %4
%33 = shl i64 %32, 8
store i64 %33, i64* %4
%34 = load i8*, i8** %3
%35 = getelementptr inbounds i8, i8* %34, i64 0
%36 = load i8, i8* %35
%37 = zext i8 %36 to i32
%38 = and i32 %37, 255
%39 = sext i32 %38 to i64
%40 = load i64, i64* %4
%41 = or i64 %40, %39
store i64 %41, i64* %4
%42 = load i64, i64* %4
ret i64 %42
}

LLVM IR (-O2):
define i64 @_f_getlong(i8* nocapture %0) {
%2 = getelementptr inbounds i8, i8* %0, i64 3
%3 = load i8, i8* %2
%4 = zext i8 %3 to i64
%5 = getelementptr inbounds i8, i8* %0, i64 2
%6 = load i8, i8* %5
%7 = zext i8 %6 to i64
%8 = shl nuw nsw i64 %4, 16
%9 = shl nuw nsw i64 %7, 8
%10 = or i64 %9, %8
%11 = getelementptr inbounds i8, i8* %0, i64 1
%12 = load i8, i8* %11
%13 = zext i8 %12 to i64
%14 = or i64 %10, %13
%15 = shl nuw nsw i64 %14, 8
%16 = load i8, i8* %0
%17 = zext i8 %16 to i64
%18 = or i64 %15, %17
ret i64 %18
}
/* Type definitions */
struct bgp_node {
  int dummy;
};

/* Variables and functions */
struct bgp_node *bgp_node_from_rnode(int /*<<< orphan*/);
int /*<<< orphan*/ bgp_node_to_rnode(struct bgp_node *);
int /*<<< orphan*/ route_next(int /*<<< orphan*/);
struct bgp_node *bgp_route_next(struct bgp_node *node) {
  return bgp_node_from_rnode(route_next(bgp_node_to_rnode(node)));
}


x86 assembly (clang, -O0):
<bgp_route_next>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <bgp_node_to_rnode@plt>
mov    %eax,%edi
call   1040 <route_next@plt>
mov    %eax,%edi
call   1050 <bgp_node_from_rnode@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<bgp_route_next>:
push   %rax
call   1030 <bgp_node_to_rnode@plt>
mov    %eax,%edi
call   1040 <route_next@plt>
mov    %eax,%edi
pop    %rax
jmp    1050 <bgp_node_from_rnode@plt>

LLVM IR (-O0):
%struct.bgp_node = type { i32 }
define %struct.bgp_node* @bgp_route_next(%struct.bgp_node* %0) {
%2 = alloca %struct.bgp_node*
store %struct.bgp_node* %0, %struct.bgp_node** %2
%3 = load %struct.bgp_node*, %struct.bgp_node** %2
%4 = call i32 @bgp_node_to_rnode(%struct.bgp_node* %3)
%5 = call i32 @route_next(i32 %4)
%6 = call %struct.bgp_node* @bgp_node_from_rnode(i32 %5)
ret %struct.bgp_node* %6
}

LLVM IR (-O2):
%struct.bgp_node = type { i32 }
define %struct.bgp_node* @bgp_route_next(%struct.bgp_node* %0) {
%2 = tail call i32 @bgp_node_to_rnode(%struct.bgp_node* %0)
%3 = tail call i32 @route_next(i32 %2)
%4 = tail call %struct.bgp_node* @bgp_node_from_rnode(i32 %3)
ret %struct.bgp_node* %4
}
/* Variables and functions */
int /*<<< orphan*/ putchar(char);
main() {
  char c;
  int i;
  i = 10;
  char j;
  c = 'A';
  j = c;
  putchar(j);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0xa,-0x8(%rbp)
movb   $0x41,-0x1(%rbp)
mov    -0x1(%rbp),%al
mov    %al,-0x9(%rbp)
movsbl -0x9(%rbp),%edi
call   1030 <putchar@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i8
%2 = alloca i32
%3 = alloca i8
store i32 10, i32* %2
store i8 65, i8* %1
%4 = load i8, i8* %1
store i8 %4, i8* %3
%5 = load i8, i8* %3
%6 = call i32 @putchar(i8 signext %5)
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 @putchar(i8 signext 65)
ret i32 0
}
/* Variables and functions */
int hDoubleToLongBits(double);
int hIsZero(double d) {
  return (hDoubleToLongBits(d) & 0x7fffffffffffffffll) == 0ll;
}


x86 assembly (clang, -O0):
<hIsZero>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
call   1030 <hDoubleToLongBits@plt>
cltq
movabs $0x7fffffffffffffff,%rcx
ff ff 7f
and    %rcx,%rax
cmp    $0x0,%rax
sete   %al
and    $0x1,%al
movzbl %al,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<hIsZero>:
push   %rax
call   1030 <hDoubleToLongBits@plt>
movslq %eax,%rcx
shl    $0x1,%rcx
xor    %eax,%eax
test   %rcx,%rcx
sete   %al
pop    %rcx
ret

LLVM IR (-O0):
define i32 @hIsZero(double %0) {
%2 = alloca double
store double %0, double* %2
%3 = load double, double* %2
%4 = call i32 @hDoubleToLongBits(double %3)
%5 = sext i32 %4 to i64
%6 = and i64 %5, 9223372036854775807
%7 = icmp eq i64 %6, 0
%8 = zext i1 %7 to i32
ret i32 %8
}

LLVM IR (-O2):
define i32 @hIsZero(double %0) {
%2 = tail call i32 @hDoubleToLongBits(double %0)
%3 = sext i32 %2 to i64
%4 = and i64 %3, 9223372036854775807
%5 = icmp eq i64 %4, 0
%6 = zext i1 %5 to i32
ret i32 %6
}
int test_imm_B1uint64_highword_reg(unsigned long long val) {
  return ((val >> 32) & (0xB1 << 0)) ? -20 : -40;
}


x86 assembly (clang, -O0):
<test_imm_B1uint64_highword_reg>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdx
shr    $0x20,%rdx
and    $0xb1,%rdx
mov    $0xffffffd8,%eax
mov    $0xffffffec,%ecx
cmp    $0x0,%rdx
cmovne %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_imm_B1uint64_highword_reg>:
movabs $0xb100000000,%rax
test   %rax,%rdi
mov    $0xffffffd8,%ecx
mov    $0xffffffec,%eax
cmove  %ecx,%eax
ret

LLVM IR (-O0):
define i32 @test_imm_B1uint64_highword_reg(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = load i64, i64* %2
%4 = lshr i64 %3, 32
%5 = and i64 %4, 177
%6 = icmp ne i64 %5, 0
%7 = zext i1 %6 to i64
%8 = select i1 %6, i32 -20, i32 -40
ret i32 %8
}

LLVM IR (-O2):
define i32 @test_imm_B1uint64_highword_reg(i64 %0) {
%2 = and i64 %0, 760209211392
%3 = icmp eq i64 %2, 0
%4 = select i1 %3, i32 -40, i32 -20
ret i32 %4
}
void __libc_check_standard_fds(void) { ; }


x86 assembly (clang, -O0):
<__libc_check_standard_fds>:
push   %rbp
mov    %rsp,%rbp
pop    %rbp
ret

x86 assembly (clang, -O2):
<__libc_check_standard_fds>:
ret

LLVM IR (-O0):
define void @__libc_check_standard_fds() {
ret void
}

LLVM IR (-O2):
define void @__libc_check_standard_fds() {
ret void
}
float obdConvert_4C(unsigned int A, unsigned int B, unsigned int C,
                    unsigned int D) {
  return (float)A * 100.0f / 255.0f;
}


x86 assembly (clang, -O0):
<obdConvert_4C>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    %ecx,-0x10(%rbp)
mov    -0x4(%rbp),%eax
cvtsi2ss %rax,%xmm0
movss  0xee4(%rip),%xmm1
mulss  %xmm1,%xmm0
movss  0xed4(%rip),%xmm1
divss  %xmm1,%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<obdConvert_4C>:
mov    %edi,%eax
cvtsi2ss %rax,%xmm0
mulss  0xef1(%rip),%xmm0
divss  0xeed(%rip),%xmm0
ret

LLVM IR (-O0):
define float @obdConvert_4C(i32 %0, i32 %1, i32 %2, i32 %3) {
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
store i32 %0, i32* %5
store i32 %1, i32* %6
store i32 %2, i32* %7
store i32 %3, i32* %8
%9 = load i32, i32* %5
%10 = uitofp i32 %9 to float
%11 = fmul float %10, 1.000000e+02
%12 = fdiv float %11, 2.550000e+02
ret float %12
}

LLVM IR (-O2):
define float @obdConvert_4C(i32 %0, i32 %1, i32 %2, i32 %3) {
%5 = uitofp i32 %0 to float
%6 = fmul float %5, 1.000000e+02
%7 = fdiv float %6, 2.550000e+02
ret float %7
}
float obdConvert_4E(unsigned int A, unsigned int B, unsigned int C,
                    unsigned int D) {
  return (float)A * 256.0f + (float)B;
}


x86 assembly (clang, -O0):
<obdConvert_4E>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    %ecx,-0x10(%rbp)
mov    -0x4(%rbp),%eax
cvtsi2ss %rax,%xmm0
mov    -0x8(%rbp),%eax
cvtsi2ss %rax,%xmm1
movss  0xed8(%rip),%xmm2
mulss  %xmm2,%xmm0
addss  %xmm1,%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<obdConvert_4E>:
mov    %edi,%eax
cvtsi2ss %rax,%xmm0
mov    %esi,%eax
cvtsi2ss %rax,%xmm1
mulss  0xeea(%rip),%xmm0
addss  %xmm1,%xmm0
ret

LLVM IR (-O0):
define float @obdConvert_4E(i32 %0, i32 %1, i32 %2, i32 %3) {
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
store i32 %0, i32* %5
store i32 %1, i32* %6
store i32 %2, i32* %7
store i32 %3, i32* %8
%9 = load i32, i32* %5
%10 = uitofp i32 %9 to float
%11 = load i32, i32* %6
%12 = uitofp i32 %11 to float
%13 = call float @llvm.fmuladd.f32(float %10, float 2.560000e+02, float %12)
ret float %13
}

LLVM IR (-O2):
define float @obdConvert_4E(i32 %0, i32 %1, i32 %2, i32 %3) {
%5 = uitofp i32 %0 to float
%6 = uitofp i32 %1 to float
%7 = tail call float @llvm.fmuladd.f32(float %5, float 2.560000e+02, float %6)
ret float %7
}
/* Variables and functions */
int /*<<< orphan*/ RegReadA_lc898122_sharp(int, unsigned char *);
void AccWit_lc898122_sharp(unsigned char UcTrgDat) {
  unsigned char UcFlgVal;
  UcFlgVal = 1;
  while (UcFlgVal) {
    RegReadA_lc898122_sharp(0x0282, &UcFlgVal);
    UcFlgVal &= UcTrgDat;
  };
}


x86 assembly (clang, -O0):
<AccWit_lc898122_sharp>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movb   $0x1,-0x2(%rbp)
cmpb   $0x0,-0x2(%rbp)
je     114c <AccWit_lc898122_sharp+0x3c>
mov    $0x282,%edi
lea    -0x2(%rbp),%rsi
call   1030 <RegReadA_lc898122_sharp@plt>
movzbl -0x1(%rbp),%ecx
movzbl -0x2(%rbp),%eax
and    %ecx,%eax
mov    %al,-0x2(%rbp)
jmp    1122 <AccWit_lc898122_sharp+0x12>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<AccWit_lc898122_sharp>:
push   %r14
push   %rbx
push   %rax
mov    %edi,%ebx
movb   $0x1,0x7(%rsp)
lea    0x7(%rsp),%r14
mov    $0x282,%edi
mov    %r14,%rsi
call   1030 <RegReadA_lc898122_sharp@plt>
and    %bl,0x7(%rsp)
jne    1120 <AccWit_lc898122_sharp+0x10>
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define void @AccWit_lc898122_sharp(i8 zeroext %0) {
%2 = alloca i8
%3 = alloca i8
store i8 %0, i8* %2
store i8 1, i8* %3
br label %4
4: ; preds = %7, %1
%5 = load i8, i8* %3
%6 = icmp ne i8 %5, 0
br i1 %6, label %7, label %15
7: ; preds = %4
%8 = call i32 @RegReadA_lc898122_sharp(i32 642, i8* %3)
%9 = load i8, i8* %2
%10 = zext i8 %9 to i32
%11 = load i8, i8* %3
%12 = zext i8 %11 to i32
%13 = and i32 %12, %10
%14 = trunc i32 %13 to i8
store i8 %14, i8* %3
br label %4
15: ; preds = %4
ret void
}

LLVM IR (-O2):
define void @AccWit_lc898122_sharp(i8 zeroext %0) {
%2 = alloca i8
store i8 1, i8* %2
br label %3
3: ; preds = %1, %3
%4 = call i32 @RegReadA_lc898122_sharp(i32 642, i8* %2)
%5 = load i8, i8* %2
%6 = and i8 %5, %0
store i8 %6, i8* %2
%7 = icmp eq i8 %6, 0
br i1 %7, label %8, label %3
8: ; preds = %3
ret void
}
/* Variables and functions */
void *start(void *arg) { return NULL; }


x86 assembly (clang, -O0):
<start>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
xor    %eax,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<start>:
xor    %eax,%eax
ret

LLVM IR (-O0):
define i8* @start(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
ret i8* null
}

LLVM IR (-O2):
define noalias i8* @start(i8* nocapture readnone %0) {
ret i8* null
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int /*<<< orphan*/, char *, int, char *);
int /*<<< orphan*/ isalnum(int);
void t_isalnum_0x77() {
  Assert_real((isalnum(119)),
              "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
              "2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/"
              "dg/z88dk/test/suites/ctype/test_isalnum.c",
              600, ("isalnum should be 1 for w"));
}


x86 assembly (clang, -O0):
<t_isalnum_0x77>:
push   %rbp
mov    %rsp,%rbp
mov    $0x77,%edi
call   1030 <isalnum@plt>
mov    %eax,%edi
lea    0xec9(%rip),%rsi
mov    $0x258,%edx
lea    0xf65(%rip),%rcx
call   1040 <Assert_real@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<t_isalnum_0x77>:
push   %rax
mov    $0x77,%edi
call   1030 <isalnum@plt>
lea    0xece(%rip),%rsi
lea    0xf6f(%rip),%rcx
mov    %eax,%edi
mov    $0x258,%edx
pop    %rax
jmp    1040 <Assert_real@plt>

LLVM IR (-O0):
@.str = [168 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/ctype/test_isalnum.c\00"
@.str.1 = [26 x i8] c"isalnum should be 1 for w\00"
define void @t_isalnum_0x77() {
%1 = call i32 @isalnum(i32 119)
%2 = call i32 @Assert_real(i32 %1, i8* getelementptr inbounds ([168 x i8], [168 x i8]* @.str, i64 0, i64 0), i32 600, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [168 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/ctype/test_isalnum.c\00"
@.str.1 = [26 x i8] c"isalnum should be 1 for w\00"
define void @t_isalnum_0x77() {
%1 = tail call i32 @isalnum(i32 119)
%2 = tail call i32 @Assert_real(i32 %1, i8* getelementptr inbounds ([168 x i8], [168 x i8]* @.str, i64 0, i64 0), i32 600, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int main() {
  printf("Hello");
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeda(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xee8(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [6 x i8] c"Hello\00"
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@.str = [6 x i8] c"Hello\00"
define i32 @main() {
%1 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0))
ret i32 0
}
/* Type definitions */
struct sqlConnection {
  int dummy;
};
typedef int /*<<< orphan*/ query;

/* Variables and functions */
char *sqlQuickString(struct sqlConnection *, char *);
int /*<<< orphan*/ sqlSafef(char *, int, char *, int);
char *visiGeneSex(struct sqlConnection *conn, int id) {
  char query[256];
  sqlSafef(query, sizeof(query),
           "select sex.name from image,specimen,sex "
           "where image.id = %d "
           "and image.specimen = specimen.id "
           "and specimen.sex = sex.id",
           id);
  return sqlQuickString(conn, query);
}


x86 assembly (clang, -O0):
<visiGeneSex>:
push   %rbp
mov    %rsp,%rbp
sub    $0x110,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
lea    -0x110(%rbp),%rdi
mov    -0xc(%rbp),%ecx
mov    $0x100,%esi
lea    0xeb8(%rip),%rdx
call   1040 <sqlSafef@plt>
mov    -0x8(%rbp),%rdi
lea    -0x110(%rbp),%rsi
call   1030 <sqlQuickString@plt>
add    $0x110,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<visiGeneSex>:
push   %r14
push   %rbx
sub    $0x108,%rsp
mov    %esi,%ecx
mov    %rdi,%rbx
lea    0xeca(%rip),%rdx
mov    %rsp,%r14
mov    %r14,%rdi
mov    $0x100,%esi
call   1040 <sqlSafef@plt>
mov    %rbx,%rdi
mov    %r14,%rsi
call   1030 <sqlQuickString@plt>
add    $0x108,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
%struct.sqlConnection = type { i32 }
@.str = [119 x i8] c"select sex.name from image,specimen,sex where image.id = %d and image.specimen = specimen.id and specimen.sex = sex.id\00"
define i8* @visiGeneSex(%struct.sqlConnection* %0, i32 %1) {
%3 = alloca %struct.sqlConnection*
%4 = alloca i32
%5 = alloca [256 x i8]
store %struct.sqlConnection* %0, %struct.sqlConnection** %3
store i32 %1, i32* %4
%6 = getelementptr inbounds [256 x i8], [256 x i8]* %5, i64 0, i64 0
%7 = load i32, i32* %4
%8 = call i32 @sqlSafef(i8* %6, i32 256, i8* getelementptr inbounds ([119 x i8], [119 x i8]* @.str, i64 0, i64 0), i32 %7)
%9 = load %struct.sqlConnection*, %struct.sqlConnection** %3
%10 = getelementptr inbounds [256 x i8], [256 x i8]* %5, i64 0, i64 0
%11 = call i8* @sqlQuickString(%struct.sqlConnection* %9, i8* %10)
ret i8* %11
}

LLVM IR (-O2):
%struct.sqlConnection = type { i32 }
@.str = [119 x i8] c"select sex.name from image,specimen,sex where image.id = %d and image.specimen = specimen.id and specimen.sex = sex.id\00"
define i8* @visiGeneSex(%struct.sqlConnection* %0, i32 %1) {
%3 = alloca [256 x i8]
%4 = getelementptr inbounds [256 x i8], [256 x i8]* %3, i64 0, i64 0
%5 = call i32 @sqlSafef(i8* %4, i32 256, i8* getelementptr inbounds ([119 x i8], [119 x i8]* @.str, i64 0, i64 0), i32 %1)
%6 = call i8* @sqlQuickString(%struct.sqlConnection* %0, i8* %4)
ret i8* %6
}
/* Type definitions */
typedef int pid_t;

/* Variables and functions */
int /*<<< orphan*/ sprintf(char *, char *, int);
char *fifo_get_spool_filename(pid_t pid) {
  static char spool_filename[128];
  sprintf(spool_filename, "/tmp/fifo_spool_%d", pid);
  return spool_filename;
}


x86 assembly (clang, -O0):
<fifo_get_spool_filename>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edx
lea    0x2f1b(%rip),%rdi
lea    0xed4(%rip),%rsi
call   1030 <sprintf@plt>
lea    0x2f08(%rip),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fifo_get_spool_filename>:
push   %rbx
mov    %edi,%edx
lea    0x2f26(%rip),%rbx
lea    0xedf(%rip),%rsi
mov    %rbx,%rdi
call   1030 <sprintf@plt>
mov    %rbx,%rax
pop    %rbx
ret

LLVM IR (-O0):
@fifo_get_spool_filename.spool_filename = internal global [128 x i8] zeroinitializer
@.str = [19 x i8] c"/tmp/fifo_spool_%d\00"
define i8* @fifo_get_spool_filename(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = call i32 @sprintf(i8* getelementptr inbounds ([128 x i8], [128 x i8]* @fifo_get_spool_filename.spool_filename, i64 0, i64 0), i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0), i32 %3)
ret i8* getelementptr inbounds ([128 x i8], [128 x i8]* @fifo_get_spool_filename.spool_filename, i64 0, i64 0)
}

LLVM IR (-O2):
@fifo_get_spool_filename.spool_filename = internal global [128 x i8] zeroinitializer
@.str = [19 x i8] c"/tmp/fifo_spool_%d\00"
define i8* @fifo_get_spool_filename(i32 %0) {
%2 = tail call i32 @sprintf(i8* dereferenceable(1) getelementptr inbounds ([128 x i8], [128 x i8]* @fifo_get_spool_filename.spool_filename, i64 0, i64 0), i8* dereferenceable(1) getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0), i32 %0)
ret i8* getelementptr inbounds ([128 x i8], [128 x i8]* @fifo_get_spool_filename.spool_filename, i64 0, i64 0)
}
/* Variables and functions */
int /*<<< orphan*/ wDev_ProcessFiq();
void call_wdev(void) { wDev_ProcessFiq(); }


x86 assembly (clang, -O0):
<call_wdev>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1030 <wDev_ProcessFiq@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<call_wdev>:
xor    %eax,%eax
jmp    1030 <wDev_ProcessFiq@plt>

LLVM IR (-O0):
define void @call_wdev() {
%1 = call i32 (...) @wDev_ProcessFiq()
ret void
}

LLVM IR (-O2):
define void @call_wdev() {
%1 = tail call i32 (...) @wDev_ProcessFiq()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ blinkdash();
int /*<<< orphan*/ blinkdot();
int /*<<< orphan*/ sleep(double);
int blinkL() {
  blinkdot();
  blinkdash();
  blinkdot();
  blinkdot();
  sleep(1.5);
  return 0;
}


x86 assembly (clang, -O0):
<blinkL>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1030 <blinkdot@plt>
mov    $0x0,%al
call   1040 <blinkdash@plt>
mov    $0x0,%al
call   1030 <blinkdot@plt>
mov    $0x0,%al
call   1030 <blinkdot@plt>
movsd  0xea8(%rip),%xmm0
call   1050 <sleep@plt>
xor    %eax,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<blinkL>:
push   %rax
xor    %eax,%eax
call   1030 <blinkdot@plt>
xor    %eax,%eax
call   1040 <blinkdash@plt>
xor    %eax,%eax
call   1030 <blinkdot@plt>
xor    %eax,%eax
call   1030 <blinkdot@plt>
movsd  0xeab(%rip),%xmm0
call   1050 <sleep@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @blinkL() {
%1 = call i32 (...) @blinkdot()
%2 = call i32 (...) @blinkdash()
%3 = call i32 (...) @blinkdot()
%4 = call i32 (...) @blinkdot()
%5 = call i32 @sleep(double 1.500000e+00)
ret i32 0
}

LLVM IR (-O2):
define i32 @blinkL() {
%1 = tail call i32 (...) @blinkdot()
%2 = tail call i32 (...) @blinkdash()
%3 = tail call i32 (...) @blinkdot()
%4 = tail call i32 (...) @blinkdot()
%5 = tail call i32 @sleep(double 1.500000e+00)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
void signHandler(int isigno) { printf("signal:%d\n", isigno); }


x86 assembly (clang, -O0):
<signHandler>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%esi
lea    0xedb(%rip),%rdi
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<signHandler>:
mov    %edi,%esi
lea    0xee7(%rip),%rdi
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [11 x i8] c"signal:%d\0A\00"
define void @signHandler(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = call i32 @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), i32 %3)
ret void
}

LLVM IR (-O2):
@.str = [11 x i8] c"signal:%d\0A\00"
define void @signHandler(i32 %0) {
%2 = tail call i32 @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), i32 %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ abms_system(char *);
int /*<<< orphan*/ sprintf(char *, char *, char *, char *, char *);
void abms_rm(char *dst) {
  char lcmd[255];
  sprintf(lcmd, "%s%s -rf %s", "/app/os/sys/bin/", "rm", dst);
  abms_system(lcmd);
}


x86 assembly (clang, -O0):
<abms_rm>:
push   %rbp
mov    %rsp,%rbp
sub    $0x110,%rsp
mov    %rdi,-0x8(%rbp)
lea    -0x110(%rbp),%rdi
mov    -0x8(%rbp),%r8
lea    0xebf(%rip),%rsi
lea    0xec4(%rip),%rdx
lea    0xece(%rip),%rcx
call   1040 <sprintf@plt>
lea    -0x110(%rbp),%rdi
call   1030 <abms_system@plt>
add    $0x110,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<abms_rm>:
push   %rbx
sub    $0x100,%rsp
mov    %rdi,%r8
lea    0xece(%rip),%rsi
lea    0xed3(%rip),%rdx
lea    0xedd(%rip),%rcx
mov    %rsp,%rbx
mov    %rbx,%rdi
call   1040 <sprintf@plt>
mov    %rbx,%rdi
call   1030 <abms_system@plt>
add    $0x100,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@.str = [12 x i8] c"%s%s -rf %s\00"
@.str.1 = [17 x i8] c"/app/os/sys/bin/\00"
@.str.2 = [3 x i8] c"rm\00"
define void @abms_rm(i8* %0) {
%2 = alloca i8*
%3 = alloca [255 x i8]
store i8* %0, i8** %2
%4 = getelementptr inbounds [255 x i8], [255 x i8]* %3, i64 0, i64 0
%5 = load i8*, i8** %2
%6 = call i32 @sprintf(i8* %4, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0), i8* %5)
%7 = getelementptr inbounds [255 x i8], [255 x i8]* %3, i64 0, i64 0
%8 = call i32 @abms_system(i8* %7)
ret void
}

LLVM IR (-O2):
@.str = [12 x i8] c"%s%s -rf %s\00"
@.str.1 = [17 x i8] c"/app/os/sys/bin/\00"
@.str.2 = [3 x i8] c"rm\00"
define void @abms_rm(i8* %0) {
%2 = alloca [255 x i8]
%3 = getelementptr inbounds [255 x i8], [255 x i8]* %2, i64 0, i64 0
%4 = call i32 @sprintf(i8* %3, i8* dereferenceable(1) getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0), i8* %0)
%5 = call i32 @abms_system(i8* %3)
ret void
}
void g_queue_push_nth() {}


x86 assembly (clang, -O0):
<g_queue_push_nth>:
push   %rbp
mov    %rsp,%rbp
pop    %rbp
ret

x86 assembly (clang, -O2):
<g_queue_push_nth>:
ret

LLVM IR (-O0):
define void @g_queue_push_nth() {
ret void
}

LLVM IR (-O2):
define void @g_queue_push_nth() {
ret void
}
void g_main_loop_quit() {}


x86 assembly (clang, -O0):
<g_main_loop_quit>:
push   %rbp
mov    %rsp,%rbp
pop    %rbp
ret

x86 assembly (clang, -O2):
<g_main_loop_quit>:
ret

LLVM IR (-O0):
define void @g_main_loop_quit() {
ret void
}

LLVM IR (-O2):
define void @g_main_loop_quit() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, unsigned int volatile);
int main() {
  volatile unsigned a = 150, b = -1;
  printf("%d\n", a & b);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x96,-0x8(%rbp)
movl   $0xffffffff,-0xc(%rbp)
mov    -0x8(%rbp),%esi
mov    -0xc(%rbp),%eax
and    %eax,%esi
lea    0xec4(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
movl   $0x96,0x4(%rsp)
movl   $0xffffffff,(%rsp)
mov    0x4(%rsp),%esi
and    (%rsp),%esi
lea    0xed2(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [4 x i8] c"%d\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
store i32 0, i32* %1
store volatile i32 150, i32* %2
store volatile i32 -1, i32* %3
%4 = load volatile i32, i32* %2
%5 = load volatile i32, i32* %3
%6 = and i32 %4, %5
%7 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %6)
ret i32 0
}

LLVM IR (-O2):
@.str = [4 x i8] c"%d\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = bitcast i32* %1 to i8*
store volatile i32 150, i32* %1
%4 = bitcast i32* %2 to i8*
store volatile i32 -1, i32* %2
%5 = load volatile i32, i32* %1
%6 = load volatile i32, i32* %2
%7 = and i32 %6, %5
%8 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %7)
ret i32 0
}
int main() { struct X *x; }


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
xor    %eax,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
xor    %eax,%eax
ret

LLVM IR (-O0):
%struct.X = type opaque
define i32 @main() {
%1 = alloca %struct.X*
ret i32 0
}

LLVM IR (-O2):
%struct.X = type opaque
define i32 @main() {
ret i32 0
}
/* Variables and functions */
char *derp_version();
int /*<<< orphan*/ printf(char *, ...);
void greet(char *p_name) {
  printf("====================================================\n");
  printf("%s Version: %s\n", p_name, derp_version());
  printf("====================================================\n");
}


x86 assembly (clang, -O0):
<greet>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
lea    0xecd(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    $0x0,%al
call   1040 <derp_version@plt>
mov    -0x10(%rbp),%rsi
mov    %rax,%rdx
lea    0xedf(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xe9b(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<greet>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%rbx
lea    0xed2(%rip),%r14
mov    %r14,%rdi
call   1030 <puts@plt>
xor    %eax,%eax
call   1050 <derp_version@plt>
lea    0xeac(%rip),%rdi
mov    %rbx,%rsi
mov    %rax,%rdx
xor    %eax,%eax
call   1040 <printf@plt>
mov    %r14,%rdi
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1030 <puts@plt>

LLVM IR (-O0):
@.str = [54 x i8] c"====================================================\0A\00"
@.str.1 = [16 x i8] c"%s Version: %s\0A\00"
define void @greet(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([54 x i8], [54 x i8]* @.str, i64 0, i64 0))
%4 = load i8*, i8** %2
%5 = call i8* (...) @derp_version()
%6 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.1, i64 0, i64 0), i8* %4, i8* %5)
%7 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([54 x i8], [54 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str.1 = [16 x i8] c"%s Version: %s\0A\00"
@str.2 = [53 x i8] c"====================================================\00"
define void @greet(i8* %0) {
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([53 x i8], [53 x i8]* @str.2, i64 0, i64 0))
%3 = tail call i8* (...) @derp_version()
%4 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([16 x i8], [16 x i8]* @.str.1, i64 0, i64 0), i8* %0, i8* %3)
%5 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([53 x i8], [53 x i8]* @str.2, i64 0, i64 0))
ret void
}
/* Variables and functions */
char *U_WMRCORENONE_set(char *);
char *U_WMRD8_set(void) { return U_WMRCORENONE_set("U_WMRD8"); }


x86 assembly (clang, -O0):
<U_WMRD8_set>:
push   %rbp
mov    %rsp,%rbp
lea    0xee5(%rip),%rdi
call   1030 <U_WMRCORENONE_set@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<U_WMRD8_set>:
lea    0xee9(%rip),%rdi
jmp    1030 <U_WMRCORENONE_set@plt>

LLVM IR (-O0):
@.str = [8 x i8] c"U_WMRD8\00"
define i8* @U_WMRD8_set() {
%1 = call i8* @U_WMRCORENONE_set(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0))
ret i8* %1
}

LLVM IR (-O2):
@.str = [8 x i8] c"U_WMRD8\00"
define i8* @U_WMRD8_set() {
%1 = tail call i8* @U_WMRCORENONE_set(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0))
ret i8* %1
}
/* Variables and functions */
int bswap32(int /*<<< orphan*/);
int /*<<< orphan*/ ldl_he_p(void const *);
int ldl_be_p(const void *ptr) { return bswap32(ldl_he_p(ptr)); }


x86 assembly (clang, -O0):
<ldl_be_p>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <ldl_he_p@plt>
mov    %eax,%edi
call   1030 <bswap32@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ldl_be_p>:
push   %rax
call   1040 <ldl_he_p@plt>
mov    %eax,%edi
pop    %rax
jmp    1030 <bswap32@plt>

LLVM IR (-O0):
define i32 @ldl_be_p(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 @ldl_he_p(i8* %3)
%5 = call i32 @bswap32(i32 %4)
ret i32 %5
}

LLVM IR (-O2):
define i32 @ldl_be_p(i8* %0) {
%2 = tail call i32 @ldl_he_p(i8* %0)
%3 = tail call i32 @bswap32(i32 %2)
ret i32 %3
}
/* Variables and functions */
int atan(int);
double deg2rad(double deg) { return ((4 * atan(1)) * deg / 180.0); }


x86 assembly (clang, -O0):
<deg2rad>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movsd  %xmm0,-0x8(%rbp)
mov    $0x1,%edi
call   1030 <atan@plt>
shl    $0x2,%eax
cvtsi2sd %eax,%xmm0
mulsd  -0x8(%rbp),%xmm0
movsd  0xec5(%rip),%xmm1
divsd  %xmm1,%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<deg2rad>:
push   %rax
movsd  %xmm0,(%rsp)
mov    $0x1,%edi
call   1030 <atan@plt>
shl    $0x2,%eax
xorps  %xmm0,%xmm0
cvtsi2sd %eax,%xmm0
mulsd  (%rsp),%xmm0
divsd  0xec9(%rip),%xmm0
pop    %rax
ret

LLVM IR (-O0):
define double @deg2rad(double %0) {
%2 = alloca double
store double %0, double* %2
%3 = call i32 @atan(i32 1)
%4 = mul nsw i32 4, %3
%5 = sitofp i32 %4 to double
%6 = load double, double* %2
%7 = fmul double %5, %6
%8 = fdiv double %7, 1.800000e+02
ret double %8
}

LLVM IR (-O2):
define double @deg2rad(double %0) {
%2 = tail call i32 @atan(i32 1)
%3 = shl nsw i32 %2, 2
%4 = sitofp i32 %3 to double
%5 = fmul double %4, %0
%6 = fdiv double %5, 1.800000e+02
ret double %6
}
/* Type definitions */
typedef int /*<<< orphan*/ uint8_t;
typedef int /*<<< orphan*/ uint16_t;

/* Variables and functions */
int /*<<< orphan*/ __setCHRBank7High(int /*<<< orphan*/, int /*<<< orphan*/);
int /*<<< orphan*/ vrc2_4_SetChrROMBank7();
void vrc2_4_setParamsEXX3(uint16_t addr, uint8_t val) {
  __setCHRBank7High(addr, val);
  vrc2_4_SetChrROMBank7();
}


x86 assembly (clang, -O0):
<vrc2_4_setParamsEXX3>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x8(%rbp),%esi
call   1040 <__setCHRBank7High@plt>
mov    $0x0,%al
call   1030 <vrc2_4_SetChrROMBank7@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<vrc2_4_setParamsEXX3>:
push   %rax
call   1040 <__setCHRBank7High@plt>
xor    %eax,%eax
pop    %rcx
jmp    1030 <vrc2_4_SetChrROMBank7@plt>

LLVM IR (-O0):
define void @vrc2_4_setParamsEXX3(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%5 = load i32, i32* %3
%6 = load i32, i32* %4
%7 = call i32 @__setCHRBank7High(i32 %5, i32 %6)
%8 = call i32 (...) @vrc2_4_SetChrROMBank7()
ret void
}

LLVM IR (-O2):
define void @vrc2_4_setParamsEXX3(i32 %0, i32 %1) {
%3 = tail call i32 @__setCHRBank7High(i32 %0, i32 %1)
%4 = tail call i32 (...) @vrc2_4_SetChrROMBank7()
ret void
}
void gtk_spin_button_set_increments() {}


x86 assembly (clang, -O0):
<gtk_spin_button_set_increments>:
push   %rbp
mov    %rsp,%rbp
pop    %rbp
ret

x86 assembly (clang, -O2):
<gtk_spin_button_set_increments>:
ret

LLVM IR (-O0):
define void @gtk_spin_button_set_increments() {
ret void
}

LLVM IR (-O2):
define void @gtk_spin_button_set_increments() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ puts(int /*<<< orphan*/);
int /*<<< orphan*/ strcat(char *, char *);
int main() {
  puts(strcat("DecodeWidth", "CPU0/d"));
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeca(%rip),%rdi
lea    0xecf(%rip),%rsi
call   1040 <strcat@plt>
mov    %eax,%edi
call   1030 <puts@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xed8(%rip),%rdi
lea    0xedd(%rip),%rsi
call   1040 <strcat@plt>
mov    %eax,%edi
call   1030 <puts@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [12 x i8] c"DecodeWidth\00"
@.str.1 = [7 x i8] c"CPU0/d\00"
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 @strcat(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0))
%3 = call i32 @puts(i32 %2)
ret i32 0
}

LLVM IR (-O2):
@.str = [12 x i8] c"DecodeWidth\00"
@.str.1 = [7 x i8] c"CPU0/d\00"
define i32 @main() {
%1 = tail call i32 @strcat(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0))
%2 = tail call i32 @puts(i32 %1)
ret i32 0
}
void read_policy(int pid, struct proc_info *proc) {}


x86 assembly (clang, -O0):
<read_policy>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
pop    %rbp
ret

x86 assembly (clang, -O2):
<read_policy>:
ret

LLVM IR (-O0):
%struct.proc_info = type opaque
define void @read_policy(i32 %0, %struct.proc_info* %1) {
%3 = alloca i32
%4 = alloca %struct.proc_info*
store i32 %0, i32* %3
store %struct.proc_info* %1, %struct.proc_info** %4
ret void
}

LLVM IR (-O2):
%struct.proc_info = type opaque
define void @read_policy(i32 %0, %struct.proc_info* nocapture %1) {
ret void
}