xunge/DecIR huggingface dataset:
/* Type definitions */
typedef int uint32_t;

/* Variables and functions */
void bitops_setl(uint32_t *a, uint32_t sh, uint32_t l, uint32_t v) {
  *a &= ~(((1 << (l)) - 1) << sh);
  *a |= (v << sh);
}


x86 assembly (clang, -O0):
<bitops_setl>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    %ecx,-0x14(%rbp)
mov    -0x10(%rbp),%ecx
mov    $0x1,%eax
shl    %cl,%eax
sub    $0x1,%eax
mov    -0xc(%rbp),%ecx
shl    %cl,%eax
mov    %eax,%ecx
xor    $0xffffffff,%ecx
mov    -0x8(%rbp),%rax
and    (%rax),%ecx
mov    %ecx,(%rax)
mov    -0x14(%rbp),%eax
mov    -0xc(%rbp),%ecx
shl    %cl,%eax
mov    %eax,%ecx
mov    -0x8(%rbp),%rax
or     (%rax),%ecx
mov    %ecx,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<bitops_setl>:
mov    %ecx,%eax
mov    %edx,%ecx
mov    $0xffffffff,%edx
shl    %cl,%edx
not    %edx
mov    %esi,%ecx
shl    %cl,%edx
not    %edx
shl    %cl,%eax
and    (%rdi),%edx
or     %edx,%eax
mov    %eax,(%rdi)
ret

LLVM IR (-O0):
define void @bitops_setl(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* %7
%10 = shl i32 1, %9
%11 = sub nsw i32 %10, 1
%12 = load i32, i32* %6
%13 = shl i32 %11, %12
%14 = xor i32 %13, -1
%15 = load i32*, i32** %5
%16 = load i32, i32* %15
%17 = and i32 %16, %14
store i32 %17, i32* %15
%18 = load i32, i32* %8
%19 = load i32, i32* %6
%20 = shl i32 %18, %19
%21 = load i32*, i32** %5
%22 = load i32, i32* %21
%23 = or i32 %22, %20
store i32 %23, i32* %21
ret void
}

LLVM IR (-O2):
define void @bitops_setl(i32* nocapture %0, i32 %1, i32 %2, i32 %3) {
%5 = shl nsw i32 -1, %2
%6 = xor i32 %5, -1
%7 = shl i32 %6, %1
%8 = xor i32 %7, -1
%9 = load i32, i32* %0
%10 = and i32 %9, %8
%11 = shl i32 %3, %1
%12 = or i32 %10, %11
store i32 %12, i32* %0
ret void
}
/* Variables and functions */
int /*<<< orphan*/ pushNumber(int /*<<< orphan*/);
int /*<<< orphan*/ yscreenrect();
void basYScreenRect() { pushNumber(yscreenrect()); }


x86 assembly (clang, -O0):
<basYScreenRect>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1040 <yscreenrect@plt>
mov    %eax,%edi
call   1030 <pushNumber@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<basYScreenRect>:
push   %rax
xor    %eax,%eax
call   1040 <yscreenrect@plt>
mov    %eax,%edi
pop    %rax
jmp    1030 <pushNumber@plt>

LLVM IR (-O0):
define void @basYScreenRect() {
%1 = call i32 (...) @yscreenrect()
%2 = call i32 @pushNumber(i32 %1)
ret void
}

LLVM IR (-O2):
define void @basYScreenRect() {
%1 = tail call i32 (...) @yscreenrect()
%2 = tail call i32 @pushNumber(i32 %1)
ret void
}
/* Variables and functions */
int ez_net_tcp_connect_ex(char const *, int, int /*<<< orphan*/);
int ez_net_tcp_connect(const char *addr, int port) {
  return ez_net_tcp_connect_ex(addr, port, 0);
}


x86 assembly (clang, -O0):
<ez_net_tcp_connect>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
xor    %edx,%edx
call   1030 <ez_net_tcp_connect_ex@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ez_net_tcp_connect>:
xor    %edx,%edx
jmp    1030 <ez_net_tcp_connect_ex@plt>

LLVM IR (-O0):
define i32 @ez_net_tcp_connect(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i32
store i8* %0, i8** %3
store i32 %1, i32* %4
%5 = load i8*, i8** %3
%6 = load i32, i32* %4
%7 = call i32 @ez_net_tcp_connect_ex(i8* %5, i32 %6, i32 0)
ret i32 %7
}

LLVM IR (-O2):
define i32 @ez_net_tcp_connect(i8* %0, i32 %1) {
%3 = tail call i32 @ez_net_tcp_connect_ex(i8* %0, i32 %1, i32 0)
ret i32 %3
}
void test_fixit_replace(void) {}


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

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

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

LLVM IR (-O2):
define void @test_fixit_replace() {
ret void
}
/* Type definitions */
typedef char uint8_t;

/* Variables and functions */
int /*<<< orphan*/ memcpy(char *, char *, unsigned int);
void get_string(uint8_t **srcp, uint8_t *dest, unsigned int len) {
  memcpy(dest, *srcp, len);
  dest[len - 1] = '\0';
  *srcp += len;
}


x86 assembly (clang, -O0):
<get_string>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x8(%rbp),%rax
mov    (%rax),%rsi
mov    -0x14(%rbp),%edx
call   1030 <memcpy@plt>
mov    -0x10(%rbp),%rax
mov    -0x14(%rbp),%ecx
sub    $0x1,%ecx
mov    %ecx,%ecx
movb   $0x0,(%rax,%rcx,1)
mov    -0x14(%rbp),%edx
mov    -0x8(%rbp),%rax
mov    (%rax),%rcx
mov    %edx,%edx
add    %rdx,%rcx
mov    %rcx,(%rax)
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_string>:
push   %r15
push   %r14
push   %rbx
mov    %edx,%ebx
mov    %rsi,%r14
mov    %rdi,%r15
mov    (%rdi),%rsi
mov    %r14,%rdi
call   1030 <memcpy@plt>
lea    -0x1(%rbx),%eax
movb   $0x0,(%r14,%rax,1)
mov    %ebx,%eax
add    %rax,(%r15)
pop    %rbx
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
define void @get_string(i8** %0, i8* %1, i32 %2) {
%4 = alloca i8**
%5 = alloca i8*
%6 = alloca i32
store i8** %0, i8*** %4
store i8* %1, i8** %5
store i32 %2, i32* %6
%7 = load i8*, i8** %5
%8 = load i8**, i8*** %4
%9 = load i8*, i8** %8
%10 = load i32, i32* %6
%11 = call i32 @memcpy(i8* %7, i8* %9, i32 %10)
%12 = load i8*, i8** %5
%13 = load i32, i32* %6
%14 = sub i32 %13, 1
%15 = zext i32 %14 to i64
%16 = getelementptr inbounds i8, i8* %12, i64 %15
store i8 0, i8* %16
%17 = load i32, i32* %6
%18 = load i8**, i8*** %4
%19 = load i8*, i8** %18
%20 = zext i32 %17 to i64
%21 = getelementptr inbounds i8, i8* %19, i64 %20
store i8* %21, i8** %18
ret void
}

LLVM IR (-O2):
define void @get_string(i8** nocapture %0, i8* %1, i32 %2) {
%4 = load i8*, i8** %0
%5 = tail call i32 @memcpy(i8* %1, i8* %4, i32 %2)
%6 = add i32 %2, -1
%7 = zext i32 %6 to i64
%8 = getelementptr inbounds i8, i8* %1, i64 %7
store i8 0, i8* %8
%9 = load i8*, i8** %0
%10 = zext i32 %2 to i64
%11 = getelementptr inbounds i8, i8* %9, i64 %10
store i8* %11, i8** %0
ret void
}
int bitXor(int x, int y) { return ~(~x & ~y) & ~(x & y); }


x86 assembly (clang, -O0):
<bitXor>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
xor    $0xffffffff,%eax
mov    -0x8(%rbp),%ecx
xor    $0xffffffff,%ecx
and    %ecx,%eax
xor    $0xffffffff,%eax
mov    -0x4(%rbp),%ecx
and    -0x8(%rbp),%ecx
xor    $0xffffffff,%ecx
and    %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<bitXor>:
mov    %edi,%eax
xor    %esi,%eax
ret

LLVM IR (-O0):
define i32 @bitXor(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 = xor i32 %5, -1
%7 = load i32, i32* %4
%8 = xor i32 %7, -1
%9 = and i32 %6, %8
%10 = xor i32 %9, -1
%11 = load i32, i32* %3
%12 = load i32, i32* %4
%13 = and i32 %11, %12
%14 = xor i32 %13, -1
%15 = and i32 %10, %14
ret i32 %15
}

LLVM IR (-O2):
define i32 @bitXor(i32 %0, i32 %1) {
%3 = xor i32 %1, %0
ret i32 %3
}
void abc4defghijklmnopqrstuvwxzy() {}


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

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

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

LLVM IR (-O2):
define void @abc4defghijklmnopqrstuvwxzy() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ handle_43(int /*<<< orphan*/);
int gen_43() {
  handle_43(0);
  return 0;
}


x86 assembly (clang, -O0):
<gen_43>:
push   %rbp
mov    %rsp,%rbp
xor    %edi,%edi
call   1030 <handle_43@plt>
xor    %eax,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<gen_43>:
push   %rax
xor    %edi,%edi
call   1030 <handle_43@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @gen_43() {
%1 = call i32 @handle_43(i32 0)
ret i32 0
}

LLVM IR (-O2):
define i32 @gen_43() {
%1 = tail call i32 @handle_43(i32 0)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void printLine(int lastLine) {
  printf("----------------------------------------------------\n");
  if (lastLine == 1) {
    printf("\n\n");
  }
}


x86 assembly (clang, -O0):
<printLine>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
lea    0xede(%rip),%rdi
call   1030 <printf@plt>
cmpl   $0x1,-0x4(%rbp)
jne    113d <printLine+0x2d>
lea    0xefe(%rip),%rdi
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<printLine>:
push   %rbx
mov    %edi,%ebx
lea    0xee6(%rip),%rdi
call   1030 <puts@plt>
cmp    $0x1,%ebx
jne    1131 <printLine+0x21>
lea    0xf0a(%rip),%rdi
pop    %rbx
jmp    1030 <puts@plt>
pop    %rbx
ret

LLVM IR (-O0):
@.str = [54 x i8] c"----------------------------------------------------\0A\00"
@.str.1 = [3 x i8] c"\0A\0A\00"
define void @printLine(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = call i32 @printf(i8* getelementptr inbounds ([54 x i8], [54 x i8]* @.str, i64 0, i64 0))
%4 = load i32, i32* %2
%5 = icmp eq i32 %4, 1
br i1 %5, label %6, label %8
6: ; preds = %1
%7 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0))
br label %8
8: ; preds = %6, %1
ret void
}

LLVM IR (-O2):
@str = [53 x i8] c"----------------------------------------------------\00"
@str.2 = [2 x i8] c"\0A\00"
define void @printLine(i32 %0) {
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([53 x i8], [53 x i8]* @str, i64 0, i64 0))
%3 = icmp eq i32 %0, 1
br i1 %3, label %4, label %6
4: ; preds = %1
%5 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([2 x i8], [2 x i8]* @str.2, i64 0, i64 0))
br label %6
6: ; preds = %4, %1
ret void
}
/* Variables and functions */
int add(int /*<<< orphan*/, int /*<<< orphan*/, int /*<<< orphan*/,
        int /*<<< orphan*/, int /*<<< orphan*/, int /*<<< orphan*/, int);
int /*<<< orphan*/ push(int /*<<< orphan*/, int /*<<< orphan*/,
                        int /*<<< orphan*/, int /*<<< orphan*/,
                        int /*<<< orphan*/, int /*<<< orphan*/, int);
int main() {
  push(0, 0, 0, 0, 0, 0, 42);
  return add(0, 0, 0, 0, 0, 0, 21);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
xor    %r9d,%r9d
mov    %r9d,%edi
mov    %r9d,%esi
mov    %r9d,%edx
mov    %r9d,%ecx
mov    %r9d,%r8d
movl   $0x2a,(%rsp)
call   1040 <push@plt>
xor    %r9d,%r9d
mov    %r9d,%edi
mov    %r9d,%esi
mov    %r9d,%edx
mov    %r9d,%ecx
mov    %r9d,%r8d
movl   $0x15,(%rsp)
call   1030 <add@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
movl   $0x2a,(%rsp)
xor    %edi,%edi
xor    %esi,%esi
xor    %edx,%edx
xor    %ecx,%ecx
xor    %r8d,%r8d
xor    %r9d,%r9d
call   1040 <push@plt>
movl   $0x15,(%rsp)
xor    %edi,%edi
xor    %esi,%esi
xor    %edx,%edx
xor    %ecx,%ecx
xor    %r8d,%r8d
xor    %r9d,%r9d
call   1030 <add@plt>
pop    %rcx
ret

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 @push(i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 42)
%3 = call i32 @add(i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 21)
ret i32 %3
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 @push(i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 42)
%2 = tail call i32 @add(i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 21)
ret i32 %2
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int /*<<< orphan*/, char *, int, char *);
int /*<<< orphan*/ isprint(int);
void t_isprint_0x5d() {
  Assert_real((isprint(93)),
              "/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_isprint.c",
              470, ("isprint should be 1 for ]"));
}


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

x86 assembly (clang, -O2):
<t_isprint_0x5d>:
push   %rax
mov    $0x5d,%edi
call   1030 <isprint@plt>
lea    0xece(%rip),%rsi
lea    0xf6f(%rip),%rcx
mov    %eax,%edi
mov    $0x1d6,%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_isprint.c\00"
@.str.1 = [26 x i8] c"isprint should be 1 for ]\00"
define void @t_isprint_0x5d() {
%1 = call i32 @isprint(i32 93)
%2 = call i32 @Assert_real(i32 %1, i8* getelementptr inbounds ([168 x i8], [168 x i8]* @.str, i64 0, i64 0), i32 470, 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_isprint.c\00"
@.str.1 = [26 x i8] c"isprint should be 1 for ]\00"
define void @t_isprint_0x5d() {
%1 = tail call i32 @isprint(i32 93)
%2 = tail call i32 @Assert_real(i32 %1, i8* getelementptr inbounds ([168 x i8], [168 x i8]* @.str, i64 0, i64 0), i32 470, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.1, i64 0, i64 0))
ret void
}
int foo(int i) { return (i < 4 && i >= 0) ? i : 4; }


x86 assembly (clang, -O0):
<foo>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
cmpl   $0x4,-0x4(%rbp)
jge    1126 <foo+0x26>
cmpl   $0x0,-0x4(%rbp)
jl     1126 <foo+0x26>
mov    -0x4(%rbp),%eax
mov    %eax,-0x8(%rbp)
jmp    1133 <foo+0x33>
mov    $0x4,%eax
mov    %eax,-0x8(%rbp)
jmp    1133 <foo+0x33>
mov    -0x8(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<foo>:
cmp    $0x4,%edi
mov    $0x4,%eax
cmovb  %edi,%eax
ret

LLVM IR (-O0):
define i32 @foo(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = icmp slt i32 %3, 4
br i1 %4, label %5, label %10
5: ; preds = %1
%6 = load i32, i32* %2
%7 = icmp sge i32 %6, 0
br i1 %7, label %8, label %10
8: ; preds = %5
%9 = load i32, i32* %2
br label %11
10: ; preds = %5, %1
br label %11
11: ; preds = %10, %8
%12 = phi i32 [ %9, %8 ], [ 4, %10 ]
ret i32 %12
}

LLVM IR (-O2):
define i32 @foo(i32 %0) {
%2 = icmp ult i32 %0, 4
%3 = select i1 %2, i32 %0, i32 4
ret i32 %3
}
void foo(signed char x) {
  signed char a = (x + 1) ^ 128;
  x &= !!a;
  if (x != 0)
    for (;;)
      ;
}


x86 assembly (clang, -O0):
<foo>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movsbl -0x1(%rbp),%eax
add    $0x1,%eax
xor    $0x80,%eax
mov    %al,-0x2(%rbp)
cmpb   $0x0,-0x2(%rbp)
setne  %al
xor    $0xff,%al
xor    $0xff,%al
and    $0x1,%al
movzbl %al,%ecx
movsbl -0x1(%rbp),%eax
and    %ecx,%eax
mov    %al,-0x1(%rbp)
movsbl -0x1(%rbp),%eax
cmp    $0x0,%eax
je     1149 <foo+0x49>
jmp    1144 <foo+0x44>
jmp    1144 <foo+0x44>
pop    %rbp
ret

x86 assembly (clang, -O2):
<foo>:
cmp    $0x7f,%dil
setne  %al
test   %dil,%al
je     1112 <foo+0x12>
nopl   0x0(%rax)
jmp    1110 <foo+0x10>
ret

LLVM IR (-O0):
define void @foo(i8 signext %0) {
%2 = alloca i8
%3 = alloca i8
store i8 %0, i8* %2
%4 = load i8, i8* %2
%5 = sext i8 %4 to i32
%6 = add nsw i32 %5, 1
%7 = xor i32 %6, 128
%8 = trunc i32 %7 to i8
store i8 %8, i8* %3
%9 = load i8, i8* %3
%10 = icmp ne i8 %9, 0
%11 = xor i1 %10, true
%12 = xor i1 %11, true
%13 = zext i1 %12 to i32
%14 = load i8, i8* %2
%15 = sext i8 %14 to i32
%16 = and i32 %15, %13
%17 = trunc i32 %16 to i8
store i8 %17, i8* %2
%18 = load i8, i8* %2
%19 = sext i8 %18 to i32
%20 = icmp ne i32 %19, 0
br i1 %20, label %21, label %23
21: ; preds = %1
br label %22
22: ; preds = %22, %21
br label %22
23: ; preds = %1
ret void
}

LLVM IR (-O2):
define void @foo(i8 signext %0) {
%2 = icmp ne i8 %0, 127
%3 = zext i1 %2 to i8
%4 = and i8 %3, %0
%5 = icmp eq i8 %4, 0
br i1 %5, label %7, label %6
6: ; preds = %1, %6
br label %6
7: ; preds = %1
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ scanf(char *, int *);
int menu() {
  int option;
  printf("----------------------------\n"
         "| 1 - Insert element       |\n"
         "| 2 - Show Stack A         |\n"
         "| 3 - Show Stack B         |\n"
         "| 4 - Sort the stack       |\n"
         "| 5 - Exit                 |\n"
         "----------------------------\n"
         "$ ");
  scanf("%d", &option);
  return option;
}


x86 assembly (clang, -O0):
<menu>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    0xed1(%rip),%rdi
call   1030 <printf@plt>
lea    0xf93(%rip),%rdi
lea    -0x4(%rbp),%rsi
call   1040 <scanf@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<menu>:
push   %rax
lea    0xed8(%rip),%rdi
call   1030 <printf@plt>
lea    0xf9a(%rip),%rdi
lea    0x4(%rsp),%rsi
call   1040 <scanf@plt>
mov    0x4(%rsp),%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [206 x i8] c"----------------------------\0A| 1 - Insert element |\0A| 2 - Show Stack A |\0A| 3 - Show Stack B |\0A| 4 - Sort the stack |\0A| 5 - Exit |\0A----------------------------\0A$ \00"
@.str.1 = [3 x i8] c"%d\00"
define i32 @menu() {
%1 = alloca i32
%2 = call i32 @printf(i8* getelementptr inbounds ([206 x i8], [206 x i8]* @.str, i64 0, i64 0))
%3 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %1)
%4 = load i32, i32* %1
ret i32 %4
}

LLVM IR (-O2):
@.str = [206 x i8] c"----------------------------\0A| 1 - Insert element |\0A| 2 - Show Stack A |\0A| 3 - Show Stack B |\0A| 4 - Sort the stack |\0A| 5 - Exit |\0A----------------------------\0A$ \00"
@.str.1 = [3 x i8] c"%d\00"
define i32 @menu() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
%3 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([206 x i8], [206 x i8]* @.str, i64 0, i64 0))
%4 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %1)
%5 = load i32, i32* %1
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ Ax25_Send_Byte(char const);
void Ax25_Send_String(const char *string) {
  int i;
  for (i = 0; string[i]; i++) {
    Ax25_Send_Byte(string[i]);
  }
}


x86 assembly (clang, -O0):
<Ax25_Send_String>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
cmpb   $0x0,(%rax,%rcx,1)
je     1154 <Ax25_Send_String+0x44>
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
movsbl (%rax,%rcx,1),%edi
call   1030 <Ax25_Send_Byte@plt>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1123 <Ax25_Send_String+0x13>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Ax25_Send_String>:
push   %rbx
mov    (%rdi),%al
test   %al,%al
je     1133 <Ax25_Send_String+0x23>
mov    %rdi,%rbx
add    $0x1,%rbx
xchg   %ax,%ax
movsbl %al,%edi
call   1030 <Ax25_Send_Byte@plt>
movzbl (%rbx),%eax
add    $0x1,%rbx
test   %al,%al
jne    1120 <Ax25_Send_String+0x10>
pop    %rbx
ret

LLVM IR (-O0):
define void @Ax25_Send_String(i8* %0) {
%2 = alloca i8*
%3 = alloca i32
store i8* %0, i8** %2
store i32 0, i32* %3
br label %4
4: ; preds = %18, %1
%5 = load i8*, i8** %2
%6 = load i32, i32* %3
%7 = sext i32 %6 to i64
%8 = getelementptr inbounds i8, i8* %5, i64 %7
%9 = load i8, i8* %8
%10 = icmp ne i8 %9, 0
br i1 %10, label %11, label %21
11: ; preds = %4
%12 = load i8*, i8** %2
%13 = load i32, i32* %3
%14 = sext i32 %13 to i64
%15 = getelementptr inbounds i8, i8* %12, i64 %14
%16 = load i8, i8* %15
%17 = call i32 @Ax25_Send_Byte(i8 signext %16)
br label %18
18: ; preds = %11
%19 = load i32, i32* %3
%20 = add nsw i32 %19, 1
store i32 %20, i32* %3
br label %4
21: ; preds = %4
ret void
}

LLVM IR (-O2):
define void @Ax25_Send_String(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = icmp eq i8 %2, 0
br i1 %3, label %12, label %4
4: ; preds = %1, %4
%5 = phi i64 [ %8, %4 ], [ 0, %1 ]
%6 = phi i8 [ %10, %4 ], [ %2, %1 ]
%7 = tail call i32 @Ax25_Send_Byte(i8 signext %6)
%8 = add nuw i64 %5, 1
%9 = getelementptr inbounds i8, i8* %0, i64 %8
%10 = load i8, i8* %9
%11 = icmp eq i8 %10, 0
br i1 %11, label %12, label %4
12: ; preds = %4, %1
ret void
}
/* Variables and functions */
int /*<<< orphan*/ assert_int_equal(int, int /*<<< orphan*/);
int /*<<< orphan*/ b_half_open_files(int, int);
void b_half_open_files_test(void **state) {
  assert_int_equal(
      0x1010101010101010ul | 0x4040404040404040ul,
      b_half_open_files(0x000000000000FF00ul, 0x00AF000000000000ul));
}


x86 assembly (clang, -O0):
<b_half_open_files_test>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    $0xff00,%edi
xor    %esi,%esi
call   1030 <b_half_open_files@plt>
mov    %eax,%esi
mov    $0x50505050,%edi
call   1040 <assert_int_equal@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<b_half_open_files_test>:
push   %rax
mov    $0xff00,%edi
xor    %esi,%esi
call   1030 <b_half_open_files@plt>
mov    $0x50505050,%edi
mov    %eax,%esi
pop    %rax
jmp    1040 <assert_int_equal@plt>

LLVM IR (-O0):
define void @b_half_open_files_test(i8** %0) {
%2 = alloca i8**
store i8** %0, i8*** %2
%3 = call i32 @b_half_open_files(i32 65280, i32 0)
%4 = call i32 @assert_int_equal(i32 1347440720, i32 %3)
ret void
}

LLVM IR (-O2):
define void @b_half_open_files_test(i8** nocapture readnone %0) {
%2 = tail call i32 @b_half_open_files(i32 65280, i32 0)
%3 = tail call i32 @assert_int_equal(i32 1347440720, i32 %2)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ SEEK_END;
int /*<<< orphan*/ SEEK_SET;
int /*<<< orphan*/ fseek(int /*<<< orphan*/ *, int, int /*<<< orphan*/);
int ftell(int /*<<< orphan*/ *);
int fsize(FILE *fp) {
  int p, size;
  p = ftell(fp);
  fseek(fp, 0L, SEEK_END);
  size = ftell(fp);
  fseek(fp, p, SEEK_SET);
  return size;
}


x86 assembly (clang, -O0):
<fsize>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <ftell@plt>
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%rdi
mov    0x2ea5(%rip),%rax
mov    (%rax),%edx
xor    %esi,%esi
call   1040 <fseek@plt>
mov    -0x8(%rbp),%rdi
call   1030 <ftell@plt>
mov    %eax,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
mov    0x2e72(%rip),%rax
mov    (%rax),%edx
call   1040 <fseek@plt>
mov    -0x10(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fsize>:
push   %rbp
push   %r14
push   %rbx
mov    %rdi,%rbx
call   1030 <ftell@plt>
mov    %eax,%r14d
mov    0x2eb2(%rip),%rax
mov    (%rax),%edx
mov    %rbx,%rdi
xor    %esi,%esi
call   1040 <fseek@plt>
mov    %rbx,%rdi
call   1030 <ftell@plt>
mov    %eax,%ebp
mov    0x2e85(%rip),%rax
mov    (%rax),%edx
mov    %rbx,%rdi
mov    %r14d,%esi
call   1040 <fseek@plt>
mov    %ebp,%eax
pop    %rbx
pop    %r14
pop    %rbp
ret

LLVM IR (-O0):
@SEEK_END = global i32 0
@SEEK_SET = global i32 0
define i32 @fsize(i32* %0) {
%2 = alloca i32*
%3 = alloca i32
%4 = alloca i32
store i32* %0, i32** %2
%5 = load i32*, i32** %2
%6 = call i32 @ftell(i32* %5)
store i32 %6, i32* %3
%7 = load i32*, i32** %2
%8 = load i32, i32* @SEEK_END
%9 = call i32 @fseek(i32* %7, i32 0, i32 %8)
%10 = load i32*, i32** %2
%11 = call i32 @ftell(i32* %10)
store i32 %11, i32* %4
%12 = load i32*, i32** %2
%13 = load i32, i32* %3
%14 = load i32, i32* @SEEK_SET
%15 = call i32 @fseek(i32* %12, i32 %13, i32 %14)
%16 = load i32, i32* %4
ret i32 %16
}

LLVM IR (-O2):
@SEEK_END = global i32 0
@SEEK_SET = global i32 0
define i32 @fsize(i32* nocapture %0) {
%2 = tail call i32 @ftell(i32* %0)
%3 = load i32, i32* @SEEK_END
%4 = tail call i32 @fseek(i32* %0, i32 0, i32 %3)
%5 = tail call i32 @ftell(i32* %0)
%6 = load i32, i32* @SEEK_SET
%7 = tail call i32 @fseek(i32* %0, i32 %2, i32 %6)
ret i32 %5
}
void XDeleteContext() {}


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

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

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

LLVM IR (-O2):
define void @XDeleteContext() {
ret void
}
int message_compress(struct message *m) { return 0; }


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

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

LLVM IR (-O0):
%struct.message = type opaque
define i32 @message_compress(%struct.message* %0) {
%2 = alloca %struct.message*
store %struct.message* %0, %struct.message** %2
ret i32 0
}

LLVM IR (-O2):
%struct.message = type opaque
define i32 @message_compress(%struct.message* nocapture readnone %0) {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ terminal_error(char const *);
void barf(const char *msg) { terminal_error(msg); }


x86 assembly (clang, -O0):
<barf>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <terminal_error@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<barf>:
jmp    1030 <terminal_error@plt>

LLVM IR (-O0):
define void @barf(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 @terminal_error(i8* %3)
ret void
}

LLVM IR (-O2):
define void @barf(i8* %0) {
%2 = tail call i32 @terminal_error(i8* %0)
ret void
}
float obdConvert_42(unsigned int A, unsigned int B, unsigned int C,
                    unsigned int D) {
  return ((float)A * 256.0f + (float)B) / 1000.0f;
}


x86 assembly (clang, -O0):
<obdConvert_42>:
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  0xedc(%rip),%xmm2
mulss  %xmm2,%xmm0
addss  %xmm1,%xmm0
movss  0xec8(%rip),%xmm1
divss  %xmm1,%xmm0
pop    %rbp
ret

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

LLVM IR (-O0):
define float @obdConvert_42(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)
%14 = fdiv float %13, 1.000000e+03
ret float %14
}

LLVM IR (-O2):
define float @obdConvert_42(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)
%8 = fdiv float %7, 1.000000e+03
ret float %8
}
setgid(u) { return setregid(u, u); }


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

x86 assembly (clang, -O2):
<setgid>:
mov    %edi,%esi
xor    %eax,%eax
jmp    1030 <setregid@plt>

LLVM IR (-O0):
define i32 @setgid(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = load i32, i32* %2
%5 = call i32 (i32, i32, ...) bitcast (i32 (...)* @setregid to i32 (i32, i32, ...)*)(i32 %3, i32 %4)
ret i32 %5
}

LLVM IR (-O2):
define i32 @setgid(i32 %0) {
%2 = tail call i32 (i32, i32, ...) bitcast (i32 (...)* @setregid to i32 (i32, i32, ...)*)(i32 %0, i32 %0)
ret i32 %2
}
/* Variables and functions */
double arcsin(int);
double arccsc(double n) { return arcsin(1 / n); }


x86 assembly (clang, -O0):
<arccsc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  0xedb(%rip),%xmm0
divsd  -0x8(%rbp),%xmm0
cvttsd2si %xmm0,%edi
call   1030 <arcsin@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<arccsc>:
movsd  0xee8(%rip),%xmm1
divsd  %xmm0,%xmm1
cvttsd2si %xmm1,%edi
jmp    1030 <arcsin@plt>

LLVM IR (-O0):
define double @arccsc(double %0) {
%2 = alloca double
store double %0, double* %2
%3 = load double, double* %2
%4 = fdiv double 1.000000e+00, %3
%5 = fptosi double %4 to i32
%6 = call double @arcsin(i32 %5)
ret double %6
}

LLVM IR (-O2):
define double @arccsc(double %0) {
%2 = fdiv double 1.000000e+00, %0
%3 = fptosi double %2 to i32
%4 = tail call double @arcsin(i32 %3)
ret double %4
}
/* Variables and functions */
int /*<<< orphan*/ emailClient(int);
int /*<<< orphan*/ inicialitzaClientsExemple(int);
void main() {
  inicialitzaClientsExemple(1);
  emailClient(1);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
mov    $0x1,%edi
call   1040 <inicialitzaClientsExemple@plt>
mov    $0x1,%edi
call   1030 <emailClient@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    $0x1,%edi
call   1040 <inicialitzaClientsExemple@plt>
mov    $0x1,%edi
pop    %rax
jmp    1030 <emailClient@plt>

LLVM IR (-O0):
define void @main() {
%1 = call i32 @inicialitzaClientsExemple(i32 1)
%2 = call i32 @emailClient(i32 1)
ret void
}

LLVM IR (-O2):
define void @main() {
%1 = tail call i32 @inicialitzaClientsExemple(i32 1)
%2 = tail call i32 @emailClient(i32 1)
ret void
}
/* Type definitions */
typedef unsigned long uint32_t;

/* Variables and functions */
void GPIO_clearEventMultiDio(uint32_t dioMask) {
  ;
  (*((volatile unsigned long *)(0x40022000 + 0x000000E0))) = dioMask;
}


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

x86 assembly (clang, -O2):
<GPIO_clearEventMultiDio>:
mov    %rdi,0x400220e0
40
ret

LLVM IR (-O0):
define void @GPIO_clearEventMultiDio(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = load i64, i64* %2
store volatile i64 %3, i64* inttoptr (i64 1073881312 to i64*)
ret void
}

LLVM IR (-O2):
define void @GPIO_clearEventMultiDio(i64 %0) {
store volatile i64 %0, i64* inttoptr (i64 1073881312 to i64*)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ hello();
int main(int argc, char *argv[]) {
  hello();
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    $0x0,%al
call   1030 <hello@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1030 <hello@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%6 = call i32 (...) @hello()
ret i32 0
}

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 (...) @hello()
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ mps_lib_assert_handler(char const *, unsigned int,
                                          char const *);
void mps_lib_assert_fail(const char *file, unsigned line,
                         const char *condition) {
  mps_lib_assert_handler(file, line, condition);
}


x86 assembly (clang, -O0):
<mps_lib_assert_fail>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
mov    -0x18(%rbp),%rdx
call   1030 <mps_lib_assert_handler@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<mps_lib_assert_fail>:
jmp    1030 <mps_lib_assert_handler@plt>

LLVM IR (-O0):
define void @mps_lib_assert_fail(i8* %0, i32 %1, i8* %2) {
%4 = alloca i8*
%5 = alloca i32
%6 = alloca i8*
store i8* %0, i8** %4
store i32 %1, i32* %5
store i8* %2, i8** %6
%7 = load i8*, i8** %4
%8 = load i32, i32* %5
%9 = load i8*, i8** %6
%10 = call i32 @mps_lib_assert_handler(i8* %7, i32 %8, i8* %9)
ret void
}

LLVM IR (-O2):
define void @mps_lib_assert_fail(i8* %0, i32 %1, i8* %2) {
%4 = tail call i32 @mps_lib_assert_handler(i8* %0, i32 %1, i8* %2)
ret void
}
void foo457() {}


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

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

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

LLVM IR (-O2):
define void @foo457() {
ret void
}
struct Value *handle_setenv_command(args)
char *args;
{
  return newint_fl(do_set(args, 1, 0),
                   "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/"
                   "outputs/2022-01-22/02-19-57/repos/gary9872/tf40s1/refs/"
                   "heads/master/src/command.c",
                   279);
}


x86 assembly (clang, -O0):
<handle_setenv_command>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
mov    $0x1,%esi
xor    %edx,%edx
mov    $0x0,%al
call   1040 <do_set@plt>
mov    %eax,%edi
lea    0xeb9(%rip),%rsi
mov    $0x117,%edx
mov    $0x0,%al
call   1030 <newint_fl@plt>
cltq
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<handle_setenv_command>:
push   %rax
mov    $0x1,%esi
xor    %edx,%edx
xor    %eax,%eax
call   1040 <do_set@plt>
lea    0xeca(%rip),%rsi
mov    %eax,%edi
mov    $0x117,%edx
xor    %eax,%eax
call   1030 <newint_fl@plt>
cltq
pop    %rcx
ret

LLVM IR (-O0):
%struct.Value = type opaque
@.str = [138 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/gary9872/tf40s1/refs/heads/master/src/command.c\00"
define %struct.Value* @handle_setenv_command(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 (i8*, i32, i32, ...) bitcast (i32 (...)* @do_set to i32 (i8*, i32, i32, ...)*)(i8* %3, i32 1, i32 0)
%5 = call i32 (i32, i8*, i32, ...) bitcast (i32 (...)* @newint_fl to i32 (i32, i8*, i32, ...)*)(i32 %4, i8* getelementptr inbounds ([138 x i8], [138 x i8]* @.str, i64 0, i64 0), i32 279)
%6 = sext i32 %5 to i64
%7 = inttoptr i64 %6 to %struct.Value*
ret %struct.Value* %7
}

LLVM IR (-O2):
%struct.Value = type opaque
@.str = [138 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/gary9872/tf40s1/refs/heads/master/src/command.c\00"
define %struct.Value* @handle_setenv_command(i8* %0) {
%2 = tail call i32 (i8*, i32, i32, ...) bitcast (i32 (...)* @do_set to i32 (i8*, i32, i32, ...)*)(i8* %0, i32 1, i32 0)
%3 = tail call i32 (i32, i8*, i32, ...) bitcast (i32 (...)* @newint_fl to i32 (i32, i8*, i32, ...)*)(i32 %2, i8* getelementptr inbounds ([138 x i8], [138 x i8]* @.str, i64 0, i64 0), i32 279)
%4 = sext i32 %3 to i64
%5 = inttoptr i64 %4 to %struct.Value*
ret %struct.Value* %5
}
/* Variables and functions */
int EXIT_SUCCESS;
int /*<<< orphan*/ checkIntInput(int *, int *);
int get_max(int, int);
int /*<<< orphan*/ printf(char *, ...);
int main() {
  int x, y;
  printf("Enter 2 numbers: ");
  checkIntInput(&x, &y);
  int largest;
  largest = get_max(x, y);
  printf("Largest: %d", largest);
  return (EXIT_SUCCESS);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeba(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
lea    -0x8(%rbp),%rdi
lea    -0xc(%rbp),%rsi
call   1030 <checkIntInput@plt>
mov    -0x8(%rbp),%edi
mov    -0xc(%rbp),%esi
call   1050 <get_max@plt>
mov    %eax,-0x10(%rbp)
mov    -0x10(%rbp),%esi
lea    0xea0(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    0x2e60(%rip),%rax
mov    (%rax),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xec8(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0x4(%rsp),%rdi
mov    %rsp,%rsi
call   1030 <checkIntInput@plt>
mov    0x4(%rsp),%edi
mov    (%rsp),%esi
call   1050 <get_max@plt>
lea    0xeb3(%rip),%rdi
mov    %eax,%esi
xor    %eax,%eax
call   1040 <printf@plt>
mov    0x2e71(%rip),%rax
mov    (%rax),%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [18 x i8] c"Enter 2 numbers: \00"
@.str.1 = [12 x i8] c"Largest: %d\00"
@EXIT_SUCCESS = global i32 0
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
store i32 0, i32* %1
%5 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0))
%6 = call i32 @checkIntInput(i32* %2, i32* %3)
%7 = load i32, i32* %2
%8 = load i32, i32* %3
%9 = call i32 @get_max(i32 %7, i32 %8)
store i32 %9, i32* %4
%10 = load i32, i32* %4
%11 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.1, i64 0, i64 0), i32 %10)
%12 = load i32, i32* @EXIT_SUCCESS
ret i32 %12
}

LLVM IR (-O2):
@.str = [18 x i8] c"Enter 2 numbers: \00"
@.str.1 = [12 x i8] c"Largest: %d\00"
@EXIT_SUCCESS = global i32 0
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = bitcast i32* %1 to i8*
%4 = bitcast i32* %2 to i8*
%5 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0))
%6 = call i32 @checkIntInput(i32* %1, i32* %2)
%7 = load i32, i32* %1
%8 = load i32, i32* %2
%9 = call i32 @get_max(i32 %7, i32 %8)
%10 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([12 x i8], [12 x i8]* @.str.1, i64 0, i64 0), i32 %9)
%11 = load i32, i32* @EXIT_SUCCESS
ret i32 %11
}
/* Type definitions */
typedef int /*<<< orphan*/ uint64_t;
typedef int /*<<< orphan*/ uint32_t;

/* Variables and functions */
uint64_t cl_key_from_ipv4(uint32_t ip) { return ip; }


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

x86 assembly (clang, -O2):
<cl_key_from_ipv4>:
mov    %edi,%eax
ret

LLVM IR (-O0):
define i32 @cl_key_from_ipv4(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
ret i32 %3
}

LLVM IR (-O2):
define i32 @cl_key_from_ipv4(i32 returned %0) {
ret i32 %0
}
void sliceReverse(int array[], int lo, int hi) {
  for (; lo < hi; lo++, hi--) {
    int temporary = array[hi];
    array[hi] = array[lo];
    array[lo] = temporary;
  }
}


x86 assembly (clang, -O0):
<sliceReverse>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    -0xc(%rbp),%eax
cmp    -0x10(%rbp),%eax
jge    1163 <sliceReverse+0x63>
mov    -0x8(%rbp),%rax
movslq -0x10(%rbp),%rcx
mov    (%rax,%rcx,4),%eax
mov    %eax,-0x14(%rbp)
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
mov    (%rax,%rcx,4),%edx
mov    -0x8(%rbp),%rax
movslq -0x10(%rbp),%rcx
mov    %edx,(%rax,%rcx,4)
mov    -0x14(%rbp),%edx
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
mov    %edx,(%rax,%rcx,4)
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
mov    -0x10(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0x10(%rbp)
jmp    110e <sliceReverse+0xe>
pop    %rbp
ret

x86 assembly (clang, -O2):
<sliceReverse>:
cmp    %edx,%esi
jge    112e <sliceReverse+0x2e>
movslq %esi,%rax
movslq %edx,%rcx
add    $0x1,%rax
xchg   %ax,%ax
mov    (%rdi,%rcx,4),%edx
mov    -0x4(%rdi,%rax,4),%esi
mov    %esi,(%rdi,%rcx,4)
mov    %edx,-0x4(%rdi,%rax,4)
add    $0xffffffffffffffff,%rcx
lea    0x1(%rax),%rdx
cmp    %rcx,%rax
mov    %rdx,%rax
jl     1110 <sliceReverse+0x10>
ret

LLVM IR (-O0):
define void @sliceReverse(i32* %0, i32 %1, i32 %2) {
%4 = alloca i32*
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
store i32* %0, i32** %4
store i32 %1, i32* %5
store i32 %2, i32* %6
br label %8
8: ; preds = %32, %3
%9 = load i32, i32* %5
%10 = load i32, i32* %6
%11 = icmp slt i32 %9, %10
br i1 %11, label %12, label %37
12: ; preds = %8
%13 = load i32*, i32** %4
%14 = load i32, i32* %6
%15 = sext i32 %14 to i64
%16 = getelementptr inbounds i32, i32* %13, i64 %15
%17 = load i32, i32* %16
store i32 %17, i32* %7
%18 = load i32*, i32** %4
%19 = load i32, i32* %5
%20 = sext i32 %19 to i64
%21 = getelementptr inbounds i32, i32* %18, i64 %20
%22 = load i32, i32* %21
%23 = load i32*, i32** %4
%24 = load i32, i32* %6
%25 = sext i32 %24 to i64
%26 = getelementptr inbounds i32, i32* %23, i64 %25
store i32 %22, i32* %26
%27 = load i32, i32* %7
%28 = load i32*, i32** %4
%29 = load i32, i32* %5
%30 = sext i32 %29 to i64
%31 = getelementptr inbounds i32, i32* %28, i64 %30
store i32 %27, i32* %31
br label %32
32: ; preds = %12
%33 = load i32, i32* %5
%34 = add nsw i32 %33, 1
store i32 %34, i32* %5
%35 = load i32, i32* %6
%36 = add nsw i32 %35, -1
store i32 %36, i32* %6
br label %8
37: ; preds = %8
ret void
}

LLVM IR (-O2):
define void @sliceReverse(i32* nocapture %0, i32 %1, i32 %2) {
%4 = icmp slt i32 %1, %2
br i1 %4, label %5, label %18
5: ; preds = %3
%6 = sext i32 %1 to i64
%7 = sext i32 %2 to i64
br label %8
8: ; preds = %5, %8
%9 = phi i64 [ %7, %5 ], [ %16, %8 ]
%10 = phi i64 [ %6, %5 ], [ %15, %8 ]
%11 = getelementptr inbounds i32, i32* %0, i64 %9
%12 = load i32, i32* %11
%13 = getelementptr inbounds i32, i32* %0, i64 %10
%14 = load i32, i32* %13
store i32 %14, i32* %11
store i32 %12, i32* %13
%15 = add nsw i64 %10, 1
%16 = add nsw i64 %9, -1
%17 = icmp slt i64 %15, %16
br i1 %17, label %8, label %18
18: ; preds = %8, %3
ret void
}
void EC_POINT_set_compressed_coordinates_GF2m(void) {}


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

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

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

LLVM IR (-O2):
define void @EC_POINT_set_compressed_coordinates_GF2m() {
ret void
}
/* Variables and functions */
int isonum_731(char *);
int isonum_733(char *p) { return (isonum_731(p)); }


x86 assembly (clang, -O0):
<isonum_733>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <isonum_731@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<isonum_733>:
jmp    1030 <isonum_731@plt>

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

LLVM IR (-O2):
define i32 @isonum_733(i8* %0) {
%2 = tail call i32 @isonum_731(i8* %0)
ret i32 %2
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ ispunct(int);
void t_ispunct_0xb8() {
  Assert_real((ispunct(184) == 0),
              "/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_ispunct.c",
              925, ("ispunct should be 0 for 0xb8"));
}


x86 assembly (clang, -O0):
<t_ispunct_0xb8>:
push   %rbp
mov    %rsp,%rbp
mov    $0xb8,%edi
call   1030 <ispunct@plt>
cmp    $0x0,%rax
sete   %al
and    $0x1,%al
movzbl %al,%edi
lea    0xebf(%rip),%rsi
mov    $0x39d,%edx
lea    0xf5b(%rip),%rcx
call   1040 <Assert_real@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<t_ispunct_0xb8>:
push   %rax
mov    $0xb8,%edi
call   1030 <ispunct@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf66(%rip),%rcx
mov    $0x39d,%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_ispunct.c\00"
@.str.1 = [29 x i8] c"ispunct should be 0 for 0xb8\00"
define void @t_ispunct_0xb8() {
%1 = call i64 @ispunct(i32 184)
%2 = icmp eq i64 %1, 0
%3 = zext i1 %2 to i32
%4 = call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([168 x i8], [168 x i8]* @.str, i64 0, i64 0), i32 925, i8* getelementptr inbounds ([29 x i8], [29 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_ispunct.c\00"
@.str.1 = [29 x i8] c"ispunct should be 0 for 0xb8\00"
define void @t_ispunct_0xb8() {
%1 = tail call i64 @ispunct(i32 184)
%2 = icmp eq i64 %1, 0
%3 = zext i1 %2 to i32
%4 = tail call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([168 x i8], [168 x i8]* @.str, i64 0, i64 0), i32 925, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ null_pruning_symbols(int, int);
void call_null_pruning_symbols_1_Good() { null_pruning_symbols(10, 20); }


x86 assembly (clang, -O0):
<call_null_pruning_symbols_1_Good>:
push   %rbp
mov    %rsp,%rbp
mov    $0xa,%edi
mov    $0x14,%esi
call   1030 <null_pruning_symbols@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<call_null_pruning_symbols_1_Good>:
mov    $0xa,%edi
mov    $0x14,%esi
jmp    1030 <null_pruning_symbols@plt>

LLVM IR (-O0):
define void @call_null_pruning_symbols_1_Good() {
%1 = call i32 @null_pruning_symbols(i32 10, i32 20)
ret void
}

LLVM IR (-O2):
define void @call_null_pruning_symbols_1_Good() {
%1 = tail call i32 @null_pruning_symbols(i32 10, i32 20)
ret void
}
void f_omp_parallel(void) {
#pragma omp parallel
  {
#pragma omp parallel
    ;
#pragma omp target
    ;
#pragma omp target data
    ;
#pragma omp target update to(i)
#pragma omp target data
    {
#pragma omp parallel
      ;
#pragma omp target
      ;
#pragma omp target data
      ;
#pragma omp target update to(i)
    }
  }
}


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

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

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

LLVM IR (-O2):
define void @f_omp_parallel() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ multstore(int, int, long *);
int /*<<< orphan*/ printf(char *, long);
int main() {
  long d;
  multstore(2, 3, &d);
  printf("2 * 3 --> %ld\n", d);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x2,%edi
mov    $0x3,%esi
lea    -0x10(%rbp),%rdx
call   1040 <multstore@plt>
mov    -0x10(%rbp),%rsi
lea    0xeb3(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    %rsp,%rdx
mov    $0x2,%edi
mov    $0x3,%esi
call   1040 <multstore@plt>
mov    (%rsp),%rsi
lea    0xec2(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
@.str = [15 x i8] c"2 * 3 --> %ld\0A\00"
define i32 @main() {
%1 = alloca i64
%2 = bitcast i64* %1 to i8*
%3 = call i32 @multstore(i32 2, i32 3, i64* %1)
%4 = load i64, i64* %1
%5 = call i32 @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0), i64 %4)
ret i32 0
}