xunge/DecIR huggingface dataset:
int rf(int *rnx) { return (rnx); }


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

x86 assembly (clang, -O2):
<rf>:
mov    %rdi,%rax
ret

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

LLVM IR (-O2):
define i32 @rf(i32* %0) {
%2 = ptrtoint i32* %0 to i64
%3 = trunc i64 %2 to i32
ret i32 %3
}
int testLib4lib(void) { return 0; }


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

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

LLVM IR (-O0):
define i32 @testLib4lib() {
ret i32 0
}

LLVM IR (-O2):
define i32 @testLib4lib() {
ret i32 0
}
void PyDTrace_IMPORT_FIND_LOAD_START(const char *arg0) {}


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

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

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

LLVM IR (-O2):
define void @PyDTrace_IMPORT_FIND_LOAD_START(i8* nocapture %0) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ IFF_UP;
int net_clr_flag(char *, int /*<<< orphan*/);
int net_nic_down(char *ifname) { return net_clr_flag(ifname, IFF_UP); }


x86 assembly (clang, -O0):
<net_nic_down>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
mov    0x2ec1(%rip),%rax
mov    (%rax),%esi
call   1030 <net_clr_flag@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<net_nic_down>:
mov    0x2ed1(%rip),%rax
mov    (%rax),%esi
jmp    1030 <net_clr_flag@plt>

LLVM IR (-O0):
@IFF_UP = global i32 0
define i32 @net_nic_down(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = load i32, i32* @IFF_UP
%5 = call i32 @net_clr_flag(i8* %3, i32 %4)
ret i32 %5
}

LLVM IR (-O2):
@IFF_UP = global i32 0
define i32 @net_nic_down(i8* %0) {
%2 = load i32, i32* @IFF_UP
%3 = tail call i32 @net_clr_flag(i8* %0, i32 %2)
ret i32 %3
}
/* Type definitions */
typedef void uint8_t;
typedef void *b;
typedef void *a;

/* Variables and functions */
int cpy8(void *, void *);
void cpy16(void *a, const void *b) {
  cpy8(a, b), cpy8((uint8_t *)a + 8, (uint8_t *)b + 8);
}


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

x86 assembly (clang, -O2):
<cpy16>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%r14
mov    %rdi,%rbx
call   1030 <cpy8@plt>
add    $0x8,%rbx
add    $0x8,%r14
mov    %rbx,%rdi
mov    %r14,%rsi
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1030 <cpy8@plt>

LLVM IR (-O0):
define void @cpy16(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
store i8* %0, i8** %3
store i8* %1, i8** %4
%5 = load i8*, i8** %3
%6 = load i8*, i8** %4
%7 = call i32 @cpy8(i8* %5, i8* %6)
%8 = load i8*, i8** %3
%9 = getelementptr i8, i8* %8, i64 8
%10 = load i8*, i8** %4
%11 = getelementptr i8, i8* %10, i64 8
%12 = call i32 @cpy8(i8* %9, i8* %11)
ret void
}

LLVM IR (-O2):
define void @cpy16(i8* %0, i8* %1) {
%3 = tail call i32 @cpy8(i8* %0, i8* %1)
%4 = getelementptr i8, i8* %0, i64 8
%5 = getelementptr i8, i8* %1, i64 8
%6 = tail call i32 @cpy8(i8* %4, i8* %5)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ initialize_Calibration();
int /*<<< orphan*/ initialize_SimpleCmd();
int /*<<< orphan*/ initialize_Surge();
int /*<<< orphan*/ initialize_XMesh();
int /*<<< orphan*/ initialize_XSensor();
void xapps_initialize() {
  initialize_XSensor();
  initialize_XMesh();
  initialize_Surge();
  initialize_SimpleCmd();
  initialize_Calibration();
}


x86 assembly (clang, -O0):
<xapps_initialize>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1060 <initialize_XSensor@plt>
mov    $0x0,%al
call   1070 <initialize_XMesh@plt>
mov    $0x0,%al
call   1030 <initialize_Surge@plt>
mov    $0x0,%al
call   1040 <initialize_SimpleCmd@plt>
mov    $0x0,%al
call   1050 <initialize_Calibration@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<xapps_initialize>:
push   %rax
xor    %eax,%eax
call   1060 <initialize_XSensor@plt>
xor    %eax,%eax
call   1070 <initialize_XMesh@plt>
xor    %eax,%eax
call   1030 <initialize_Surge@plt>
xor    %eax,%eax
call   1040 <initialize_SimpleCmd@plt>
xor    %eax,%eax
pop    %rcx
jmp    1050 <initialize_Calibration@plt>

LLVM IR (-O0):
define void @xapps_initialize() {
%1 = call i32 (...) @initialize_XSensor()
%2 = call i32 (...) @initialize_XMesh()
%3 = call i32 (...) @initialize_Surge()
%4 = call i32 (...) @initialize_SimpleCmd()
%5 = call i32 (...) @initialize_Calibration()
ret void
}

LLVM IR (-O2):
define void @xapps_initialize() {
%1 = tail call i32 (...) @initialize_XSensor()
%2 = tail call i32 (...) @initialize_XMesh()
%3 = tail call i32 (...) @initialize_Surge()
%4 = tail call i32 (...) @initialize_SimpleCmd()
%5 = tail call i32 (...) @initialize_Calibration()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ debug(char *, ...);
int M212_f(char *s) {
  debug("M212_f(const char *s) is not yet implemented!\n");
  debug("%s\n", s);
  return 1;
}


x86 assembly (clang, -O0):
<M212_f>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
lea    0xedd(%rip),%rdi
mov    $0x0,%al
call   1030 <debug@plt>
mov    -0x8(%rbp),%rsi
lea    0xefa(%rip),%rdi
mov    $0x0,%al
call   1030 <debug@plt>
mov    $0x1,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<M212_f>:
push   %rbx
mov    %rdi,%rbx
lea    0xee5(%rip),%rdi
xor    %eax,%eax
call   1030 <debug@plt>
lea    0xf06(%rip),%rdi
mov    %rbx,%rsi
xor    %eax,%eax
call   1030 <debug@plt>
mov    $0x1,%eax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [47 x i8] c"M212_f(const char *s) is not yet implemented!\0A\00"
@.str.1 = [4 x i8] c"%s\0A\00"
define i32 @M212_f(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = call i32 (i8*, ...) @debug(i8* getelementptr inbounds ([47 x i8], [47 x i8]* @.str, i64 0, i64 0))
%4 = load i8*, i8** %2
%5 = call i32 (i8*, ...) @debug(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i8* %4)
ret i32 1
}

LLVM IR (-O2):
@.str = [47 x i8] c"M212_f(const char *s) is not yet implemented!\0A\00"
@.str.1 = [4 x i8] c"%s\0A\00"
define i32 @M212_f(i8* %0) {
%2 = tail call i32 (i8*, ...) @debug(i8* getelementptr inbounds ([47 x i8], [47 x i8]* @.str, i64 0, i64 0))
%3 = tail call i32 (i8*, ...) @debug(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i8* %0)
ret i32 1
}
/* Variables and functions */
int /*<<< orphan*/ test_parser_sourcefile(char *, char *);
int /*<<< orphan*/ test_parser_verify_parse(int /*<<< orphan*/, char *, char *,
                                            char *, int /*<<< orphan*/);
void test_python_comment() {
  test_parser_verify_parse(test_parser_sourcefile("python", " #comment"),
                           "python", "", "#comment", 0);
}


x86 assembly (clang, -O0):
<test_python_comment>:
push   %rbp
mov    %rsp,%rbp
lea    0xed5(%rip),%rdi
lea    0xed5(%rip),%rsi
call   1030 <test_parser_sourcefile@plt>
mov    %eax,%edi
lea    0xec0(%rip),%rsi
lea    0xebf(%rip),%rdx
lea    0xeba(%rip),%rcx
xor    %r8d,%r8d
call   1040 <test_parser_verify_parse@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_python_comment>:
push   %rbx
lea    0xed8(%rip),%rbx
lea    0xed8(%rip),%rsi
mov    %rbx,%rdi
call   1030 <test_parser_sourcefile@plt>
lea    0xec8(%rip),%rdx
lea    0xec3(%rip),%rcx
mov    %eax,%edi
mov    %rbx,%rsi
xor    %r8d,%r8d
pop    %rbx
jmp    1040 <test_parser_verify_parse@plt>

LLVM IR (-O0):
@.str = [7 x i8] c"python\00"
@.str.1 = [10 x i8] c" #comment\00"
@.str.2 = [1 x i8] zeroinitializer
@.str.3 = [9 x i8] c"#comment\00"
define void @test_python_comment() {
%1 = call i32 @test_parser_sourcefile(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.1, i64 0, i64 0))
%2 = call i32 @test_parser_verify_parse(i32 %1, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.3, i64 0, i64 0), i32 0)
ret void
}

LLVM IR (-O2):
@.str = [7 x i8] c"python\00"
@.str.1 = [10 x i8] c" #comment\00"
@.str.2 = [1 x i8] zeroinitializer
@.str.3 = [9 x i8] c"#comment\00"
define void @test_python_comment() {
%1 = tail call i32 @test_parser_sourcefile(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.1, i64 0, i64 0))
%2 = tail call i32 @test_parser_verify_parse(i32 %1, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.3, i64 0, i64 0), i32 0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ isxdigit(int);
void t_isxdigit_0xf8() {
  Assert_real((isxdigit(248) == 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_isxdigit.c",
              1245, ("isxdigit should be 0 for 0xf8"));
}


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

x86 assembly (clang, -O2):
<t_isxdigit_0xf8>:
push   %rax
mov    $0xf8,%edi
call   1030 <isxdigit@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf67(%rip),%rcx
mov    $0x4dd,%edx
pop    %rax
jmp    1040 <Assert_real@plt>

LLVM IR (-O0):
@.str = [169 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_isxdigit.c\00"
@.str.1 = [30 x i8] c"isxdigit should be 0 for 0xf8\00"
define void @t_isxdigit_0xf8() {
%1 = call i64 @isxdigit(i32 248)
%2 = icmp eq i64 %1, 0
%3 = zext i1 %2 to i32
%4 = call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([169 x i8], [169 x i8]* @.str, i64 0, i64 0), i32 1245, i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [169 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_isxdigit.c\00"
@.str.1 = [30 x i8] c"isxdigit should be 0 for 0xf8\00"
define void @t_isxdigit_0xf8() {
%1 = tail call i64 @isxdigit(i32 248)
%2 = icmp eq i64 %1, 0
%3 = zext i1 %2 to i32
%4 = tail call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([169 x i8], [169 x i8]* @.str, i64 0, i64 0), i32 1245, i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ assert(int *);
scalar_t__ malloc(int);
int *ivector(int minx, int maxx) {
  int *m;
  m = (int *)malloc((maxx - minx + 1) * sizeof(int));
  assert(m);
  m -= minx;
  return m;
}


x86 assembly (clang, -O0):
<ivector>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x8(%rbp),%eax
sub    -0x4(%rbp),%eax
add    $0x1,%eax
cltq
shl    $0x2,%rax
mov    %eax,%edi
call   1040 <malloc@plt>
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
call   1030 <assert@plt>
mov    -0x4(%rbp),%ecx
mov    -0x10(%rbp),%rax
movslq %ecx,%rdx
xor    %ecx,%ecx
sub    %rdx,%rcx
shl    $0x2,%rcx
add    %rcx,%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ivector>:
push   %rbp
push   %rbx
push   %rax
mov    %edi,%ebp
sub    %edi,%esi
lea    0x4(,%rsi,4),%edi
call   1040 <malloc@plt>
mov    %rax,%rbx
mov    %rax,%rdi
call   1030 <assert@plt>
movslq %ebp,%rax
shl    $0x2,%rax
sub    %rax,%rbx
mov    %rbx,%rax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
define i32* @ivector(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32*
store i32 %0, i32* %3
store i32 %1, i32* %4
%6 = load i32, i32* %4
%7 = load i32, i32* %3
%8 = sub nsw i32 %6, %7
%9 = add nsw i32 %8, 1
%10 = sext i32 %9 to i64
%11 = mul i64 %10, 4
%12 = trunc i64 %11 to i32
%13 = call i64 @malloc(i32 %12)
%14 = inttoptr i64 %13 to i32*
store i32* %14, i32** %5
%15 = load i32*, i32** %5
%16 = call i32 @assert(i32* %15)
%17 = load i32, i32* %3
%18 = load i32*, i32** %5
%19 = sext i32 %17 to i64
%20 = sub i64 0, %19
%21 = getelementptr inbounds i32, i32* %18, i64 %20
store i32* %21, i32** %5
%22 = load i32*, i32** %5
ret i32* %22
}

LLVM IR (-O2):
define i32* @ivector(i32 %0, i32 %1) {
%3 = sub nsw i32 %1, %0
%4 = shl i32 %3, 2
%5 = add i32 %4, 4
%6 = tail call i64 @malloc(i32 %5)
%7 = inttoptr i64 %6 to i32*
%8 = tail call i32 @assert(i32* %7)
%9 = sext i32 %0 to i64
%10 = sub nsw i64 0, %9
%11 = getelementptr inbounds i32, i32* %7, i64 %10
ret i32* %11
}
/* Variables and functions */
int O_CREAT;
int O_EXCL;
int /*<<< orphan*/ exit(int);
int open(char *, int, int);
int /*<<< orphan*/ perror(char *);
int main() {
  int fol;
  fol = open("file.txt", O_CREAT | O_EXCL, 00750);
  if (fol == -1) {
    perror("file open fail\n");
    exit(1);
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    0x2eb2(%rip),%rax
mov    (%rax),%esi
mov    0x2e89(%rip),%rax
or     (%rax),%esi
lea    0xea8(%rip),%rdi
mov    $0x1e8,%edx
call   1030 <open@plt>
mov    %eax,-0x8(%rbp)
cmpl   $0xffffffff,-0x8(%rbp)
jne    1185 <main+0x55>
lea    0xe93(%rip),%rdi
call   1040 <perror@plt>
mov    $0x1,%edi
call   1050 <exit@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    0x2ec0(%rip),%rax
mov    0x2e99(%rip),%rcx
mov    (%rcx),%esi
or     (%rax),%esi
lea    0xeb6(%rip),%rdi
mov    $0x1e8,%edx
call   1030 <open@plt>
cmp    $0xffffffff,%eax
je     115d <main+0x2d>
xor    %eax,%eax
pop    %rcx
ret
lea    0xea5(%rip),%rdi
call   1040 <perror@plt>
mov    $0x1,%edi
call   1050 <exit@plt>

LLVM IR (-O0):
@.str = [9 x i8] c"file.txt\00"
@O_CREAT = global i32 0
@O_EXCL = global i32 0
@.str.1 = [16 x i8] c"file open fail\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
store i32 0, i32* %1
%3 = load i32, i32* @O_CREAT
%4 = load i32, i32* @O_EXCL
%5 = or i32 %3, %4
%6 = call i32 @open(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), i32 %5, i32 488)
store i32 %6, i32* %2
%7 = load i32, i32* %2
%8 = icmp eq i32 %7, -1
br i1 %8, label %9, label %12
9: ; preds = %0
%10 = call i32 @perror(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.1, i64 0, i64 0))
%11 = call i32 @exit(i32 1)
unreachable
12: ; preds = %0
ret i32 0
}

LLVM IR (-O2):
@.str = [9 x i8] c"file.txt\00"
@O_CREAT = global i32 0
@O_EXCL = global i32 0
@.str.1 = [16 x i8] c"file open fail\0A\00"
define i32 @main() {
%1 = load i32, i32* @O_CREAT
%2 = load i32, i32* @O_EXCL
%3 = or i32 %2, %1
%4 = tail call i32 @open(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), i32 %3, i32 488)
%5 = icmp eq i32 %4, -1
br i1 %5, label %6, label %9
6: ; preds = %0
%7 = tail call i32 @perror(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.1, i64 0, i64 0))
%8 = tail call i32 @exit(i32 1)
unreachable
9: ; preds = %0
ret i32 0
}
void flag_update_keyboard_button(int *b, int *quick_b) {
  if (*b >= 2)
    *b = 1;
  if (*quick_b) {
    *b = *quick_b == 1 ? 2 : 0;
    *quick_b = 0;
  }
}


x86 assembly (clang, -O0):
<flag_update_keyboard_button>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
cmpl   $0x2,(%rax)
jl     1123 <flag_update_keyboard_button+0x23>
mov    -0x8(%rbp),%rax
movl   $0x1,(%rax)
mov    -0x10(%rbp),%rax
cmpl   $0x0,(%rax)
je     1153 <flag_update_keyboard_button+0x53>
mov    -0x10(%rbp),%rax
mov    (%rax),%edx
xor    %ecx,%ecx
mov    $0x2,%eax
cmp    $0x1,%edx
cmove  %eax,%ecx
mov    -0x8(%rbp),%rax
mov    %ecx,(%rax)
mov    -0x10(%rbp),%rax
movl   $0x0,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<flag_update_keyboard_button>:
cmpl   $0x2,(%rdi)
jl     110b <flag_update_keyboard_button+0xb>
movl   $0x1,(%rdi)
mov    (%rsi),%eax
test   %eax,%eax
je     1123 <flag_update_keyboard_button+0x23>
xor    %ecx,%ecx
cmp    $0x1,%eax
sete   %cl
add    %ecx,%ecx
mov    %ecx,(%rdi)
movl   $0x0,(%rsi)
ret

LLVM IR (-O0):
define void @flag_update_keyboard_button(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* %5
%7 = icmp sge i32 %6, 2
br i1 %7, label %8, label %10
8: ; preds = %2
%9 = load i32*, i32** %3
store i32 1, i32* %9
br label %10
10: ; preds = %8, %2
%11 = load i32*, i32** %4
%12 = load i32, i32* %11
%13 = icmp ne i32 %12, 0
br i1 %13, label %14, label %22
14: ; preds = %10
%15 = load i32*, i32** %4
%16 = load i32, i32* %15
%17 = icmp eq i32 %16, 1
%18 = zext i1 %17 to i64
%19 = select i1 %17, i32 2, i32 0
%20 = load i32*, i32** %3
store i32 %19, i32* %20
%21 = load i32*, i32** %4
store i32 0, i32* %21
br label %22
22: ; preds = %14, %10
ret void
}

LLVM IR (-O2):
define void @flag_update_keyboard_button(i32* nocapture %0, i32* nocapture %1) {
%3 = load i32, i32* %0
%4 = icmp sgt i32 %3, 1
br i1 %4, label %5, label %6
5: ; preds = %2
store i32 1, i32* %0
br label %6
6: ; preds = %5, %2
%7 = load i32, i32* %1
%8 = icmp eq i32 %7, 0
br i1 %8, label %12, label %9
9: ; preds = %6
%10 = icmp eq i32 %7, 1
%11 = select i1 %10, i32 2, i32 0
store i32 %11, i32* %0
store i32 0, i32* %1
br label %12
12: ; preds = %9, %6
ret void
}
/* Variables and functions */
int /*<<< orphan*/ assem_debug(char *, int);
int /*<<< orphan*/ assert(int /*<<< orphan*/);
int /*<<< orphan*/ output_byte(int);
int /*<<< orphan*/ output_w32(int);
void emit_pushimm(int imm) {
  assert(0);
  assem_debug("push $%x", imm);
  output_byte(0x68);
  output_w32(imm);
}


x86 assembly (clang, -O0):
<emit_pushimm>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
xor    %edi,%edi
call   1060 <assert@plt>
mov    -0x4(%rbp),%esi
lea    0xea4(%rip),%rdi
call   1030 <assem_debug@plt>
mov    $0x68,%edi
call   1050 <output_byte@plt>
mov    -0x4(%rbp),%edi
call   1040 <output_w32@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<emit_pushimm>:
push   %rbx
mov    %edi,%ebx
xor    %edi,%edi
call   1060 <assert@plt>
lea    0xeaf(%rip),%rdi
mov    %ebx,%esi
call   1030 <assem_debug@plt>
mov    $0x68,%edi
call   1050 <output_byte@plt>
mov    %ebx,%edi
pop    %rbx
jmp    1040 <output_w32@plt>

LLVM IR (-O0):
@.str = [9 x i8] c"push $%x\00"
define void @emit_pushimm(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = call i32 @assert(i32 0)
%4 = load i32, i32* %2
%5 = call i32 @assem_debug(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), i32 %4)
%6 = call i32 @output_byte(i32 104)
%7 = load i32, i32* %2
%8 = call i32 @output_w32(i32 %7)
ret void
}

LLVM IR (-O2):
@.str = [9 x i8] c"push $%x\00"
define void @emit_pushimm(i32 %0) {
%2 = tail call i32 @assert(i32 0)
%3 = tail call i32 @assem_debug(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), i32 %0)
%4 = tail call i32 @output_byte(i32 104)
%5 = tail call i32 @output_w32(i32 %0)
ret void
}
/* Variables and functions */
int cpu_clock_speed();
float get_cpu_clock_speed(void) {
  static float speed = 0;
  if (speed == 0)
    speed = cpu_clock_speed() * 1000;
  return speed;
}


x86 assembly (clang, -O0):
<get_cpu_clock_speed>:
push   %rbp
mov    %rsp,%rbp
movss  0x2f10(%rip),%xmm0
xorps  %xmm1,%xmm1
ucomiss %xmm1,%xmm0
jne    1147 <get_cpu_clock_speed+0x37>
jp     1147 <get_cpu_clock_speed+0x37>
mov    $0x0,%al
call   1030 <cpu_clock_speed@plt>
imul   $0x3e8,%eax,%eax
cvtsi2ss %eax,%xmm0
movss  %xmm0,0x2ee5(%rip)
movss  0x2edd(%rip),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_cpu_clock_speed>:
push   %rax
movss  0x2f13(%rip),%xmm0
xorps  %xmm1,%xmm1
ucomiss %xmm1,%xmm0
jne    113f <get_cpu_clock_speed+0x2f>
jp     113f <get_cpu_clock_speed+0x2f>
xor    %eax,%eax
call   1030 <cpu_clock_speed@plt>
imul   $0x3e8,%eax,%eax
xorps  %xmm0,%xmm0
cvtsi2ss %eax,%xmm0
movss  %xmm0,0x2eed(%rip)
pop    %rax
ret

LLVM IR (-O0):
@get_cpu_clock_speed.speed = internal global float 0.000000e+00
define float @get_cpu_clock_speed() {
%1 = load float, float* @get_cpu_clock_speed.speed
%2 = fcmp oeq float %1, 0.000000e+00
br i1 %2, label %3, label %7
3: ; preds = %0
%4 = call i32 (...) @cpu_clock_speed()
%5 = mul nsw i32 %4, 1000
%6 = sitofp i32 %5 to float
store float %6, float* @get_cpu_clock_speed.speed
br label %7
7: ; preds = %3, %0
%8 = load float, float* @get_cpu_clock_speed.speed
ret float %8
}

LLVM IR (-O2):
@get_cpu_clock_speed.speed = internal unnamed_addr global float 0.000000e+00
define float @get_cpu_clock_speed() {
%1 = load float, float* @get_cpu_clock_speed.speed
%2 = fcmp oeq float %1, 0.000000e+00
br i1 %2, label %3, label %7
3: ; preds = %0
%4 = tail call i32 (...) @cpu_clock_speed()
%5 = mul nsw i32 %4, 1000
%6 = sitofp i32 %5 to float
store float %6, float* @get_cpu_clock_speed.speed
br label %7
7: ; preds = %3, %0
%8 = phi float [ %6, %3 ], [ %1, %0 ]
ret float %8
}
/* Variables and functions */
int /*<<< orphan*/ do_csi(char *, char const *);
void sm(const char *ps) { do_csi("%sh", ps); }


x86 assembly (clang, -O0):
<sm>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rsi
lea    0xed9(%rip),%rdi
call   1030 <do_csi@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<sm>:
mov    %rdi,%rsi
lea    0xee6(%rip),%rdi
jmp    1030 <do_csi@plt>

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

LLVM IR (-O2):
@.str = [4 x i8] c"%sh\00"
define void @sm(i8* %0) {
%2 = tail call i32 @do_csi(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %0)
ret void
}
/* Type definitions */
struct redfish_dirp {
  int dummy;
};
typedef int /*<<< orphan*/ DIR;

/* Variables and functions */
int errno;
int /*<<< orphan*/ *opendir(char const *);
int do_opendir(const char *name, struct redfish_dirp **dp) {
  DIR *rdp = opendir(name);
  if (!rdp)
    return -errno;
  *dp = (struct redfish_dirp *)rdp;
  return 0;
}


x86 assembly (clang, -O0):
<do_opendir>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    -0x10(%rbp),%rdi
call   1030 <opendir@plt>
mov    %rax,-0x20(%rbp)
cmpq   $0x0,-0x20(%rbp)
jne    114b <do_opendir+0x3b>
xor    %eax,%eax
mov    0x2e9f(%rip),%rcx
sub    (%rcx),%eax
mov    %eax,-0x4(%rbp)
jmp    115d <do_opendir+0x4d>
mov    -0x20(%rbp),%rcx
mov    -0x18(%rbp),%rax
mov    %rcx,(%rax)
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<do_opendir>:
push   %rbx
mov    %rsi,%rbx
call   1030 <opendir@plt>
test   %rax,%rax
je     1125 <do_opendir+0x15>
mov    %rax,(%rbx)
xor    %eax,%eax
pop    %rbx
ret
mov    0x2eb4(%rip),%rcx
xor    %eax,%eax
sub    (%rcx),%eax
pop    %rbx
ret

LLVM IR (-O0):
%struct.redfish_dirp = type { i32 }
@errno = global i32 0
define i32 @do_opendir(i8* %0, %struct.redfish_dirp** %1) {
%3 = alloca i32
%4 = alloca i8*
%5 = alloca %struct.redfish_dirp**
%6 = alloca i32*
store i8* %0, i8** %4
store %struct.redfish_dirp** %1, %struct.redfish_dirp*** %5
%7 = load i8*, i8** %4
%8 = call i32* @opendir(i8* %7)
store i32* %8, i32** %6
%9 = load i32*, i32** %6
%10 = icmp ne i32* %9, null
br i1 %10, label %14, label %11
11: ; preds = %2
%12 = load i32, i32* @errno
%13 = sub nsw i32 0, %12
store i32 %13, i32* %3
br label %18
14: ; preds = %2
%15 = load i32*, i32** %6
%16 = bitcast i32* %15 to %struct.redfish_dirp*
%17 = load %struct.redfish_dirp**, %struct.redfish_dirp*** %5
store %struct.redfish_dirp* %16, %struct.redfish_dirp** %17
store i32 0, i32* %3
br label %18
18: ; preds = %14, %11
%19 = load i32, i32* %3
ret i32 %19
}

LLVM IR (-O2):
%struct.redfish_dirp = type { i32 }
@errno = global i32 0
define i32 @do_opendir(i8* nocapture %0, %struct.redfish_dirp** nocapture writeonly %1) {
%3 = tail call i32* @opendir(i8* %0)
%4 = icmp eq i32* %3, null
br i1 %4, label %5, label %8
5: ; preds = %2
%6 = load i32, i32* @errno
%7 = sub nsw i32 0, %6
br label %10
8: ; preds = %2
%9 = bitcast %struct.redfish_dirp** %1 to i32**
store i32* %3, i32** %9
br label %10
10: ; preds = %8, %5
%11 = phi i32 [ 0, %8 ], [ %7, %5 ]
ret i32 %11
}
/* Variables and functions */
float cosf(float);
float gb_cos(float radians) { return cosf(radians); }


x86 assembly (clang, -O0):
<gb_cos>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movss  %xmm0,-0x4(%rbp)
movss  -0x4(%rbp),%xmm0
call   1030 <cosf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<gb_cos>:
jmp    1030 <cosf@plt>

LLVM IR (-O0):
define float @gb_cos(float %0) {
%2 = alloca float
store float %0, float* %2
%3 = load float, float* %2
%4 = call float @cosf(float %3)
ret float %4
}

LLVM IR (-O2):
define float @gb_cos(float %0) {
%2 = tail call float @cosf(float %0)
ret float %2
}
void disable_cache() {
  unsigned long *ptr;
  static unsigned long CACHE_shadow_iccr = 0;
  static unsigned long CACHE_shadow_dccr = 0;
  ;
  ptr = (unsigned long *)(0xc0000000 | 0x00000000);
  CACHE_shadow_iccr = CACHE_shadow_iccr & 0xfffffffe;
  *ptr = CACHE_shadow_iccr;
  ptr = (unsigned long *)(0xc8000000 | 0x00000000);
  CACHE_shadow_dccr = CACHE_shadow_dccr & 0xfffffffe;
  *ptr = CACHE_shadow_dccr;
  ;
}


x86 assembly (clang, -O0):
<disable_cache>:
push   %rbp
mov    %rsp,%rbp
mov    $0xc0000000,%eax
mov    %rax,-0x8(%rbp)
movabs $0xfffffffe,%rax
and    0x2f0a(%rip),%rax
mov    %rax,0x2f03(%rip)
mov    0x2efc(%rip),%rcx
mov    -0x8(%rbp),%rax
mov    %rcx,(%rax)
mov    $0xc8000000,%eax
mov    %rax,-0x8(%rbp)
movabs $0xfffffffe,%rax
and    0x2ee3(%rip),%rax
mov    %rax,0x2edc(%rip)
mov    0x2ed5(%rip),%rcx
mov    -0x8(%rbp),%rax
mov    %rcx,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<disable_cache>:
mov    $0xc0000000,%eax
movq   $0x0,(%rax)
movq   $0x0,0x8000000(%rax)
ret

LLVM IR (-O0):
@disable_cache.CACHE_shadow_iccr = internal global i64 0
@disable_cache.CACHE_shadow_dccr = internal global i64 0
define void @disable_cache() {
%1 = alloca i64*
store i64* inttoptr (i64 3221225472 to i64*), i64** %1
%2 = load i64, i64* @disable_cache.CACHE_shadow_iccr
%3 = and i64 %2, 4294967294
store i64 %3, i64* @disable_cache.CACHE_shadow_iccr
%4 = load i64, i64* @disable_cache.CACHE_shadow_iccr
%5 = load i64*, i64** %1
store i64 %4, i64* %5
store i64* inttoptr (i64 3355443200 to i64*), i64** %1
%6 = load i64, i64* @disable_cache.CACHE_shadow_dccr
%7 = and i64 %6, 4294967294
store i64 %7, i64* @disable_cache.CACHE_shadow_dccr
%8 = load i64, i64* @disable_cache.CACHE_shadow_dccr
%9 = load i64*, i64** %1
store i64 %8, i64* %9
ret void
}

LLVM IR (-O2):
define void @disable_cache() {
store i64 0, i64* inttoptr (i64 3221225472 to i64*)
store i64 0, i64* inttoptr (i64 3355443200 to i64*)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char const *);
void logCallback(void *user, const char *str) {
  printf("libssp_player :: %s", str);
}


x86 assembly (clang, -O0):
<logCallback>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rsi
lea    0xed5(%rip),%rdi
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
@.str = [20 x i8] c"libssp_player :: %s\00"
define void @logCallback(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
store i8* %0, i8** %3
store i8* %1, i8** %4
%5 = load i8*, i8** %4
%6 = call i32 @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0), i8* %5)
ret void
}

LLVM IR (-O2):
@.str = [20 x i8] c"libssp_player :: %s\00"
define void @logCallback(i8* nocapture readnone %0, i8* %1) {
%3 = tail call i32 @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0), i8* %1)
ret void
}
void g_queue_delete_link() {}


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

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

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

LLVM IR (-O2):
define void @g_queue_delete_link() {
ret void
}
/* Variables and functions */
int countZeros(int);
int /*<<< orphan*/ printf(char *, int);
int main(void) {
  printf("%d\n", countZeros(123000));
  printf("%d\n", countZeros(102030));
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
mov    $0x1e078,%edi
call   1040 <countZeros@plt>
mov    %eax,%esi
lea    0xec9(%rip),%rdi
call   1030 <printf@plt>
mov    $0x18e8e,%edi
call   1040 <countZeros@plt>
mov    %eax,%esi
lea    0xeb1(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
mov    $0x1e078,%edi
call   1040 <countZeros@plt>
lea    0xece(%rip),%rbx
mov    %rbx,%rdi
mov    %eax,%esi
call   1030 <printf@plt>
mov    $0x18e8e,%edi
call   1040 <countZeros@plt>
mov    %rbx,%rdi
mov    %eax,%esi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [4 x i8] c"%d\0A\00"
define i32 @main() {
%1 = call i32 @countZeros(i32 123000)
%2 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %1)
%3 = call i32 @countZeros(i32 102030)
%4 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %3)
ret i32 0
}

LLVM IR (-O2):
@.str = [4 x i8] c"%d\0A\00"
define i32 @main() {
%1 = tail call i32 @countZeros(i32 123000)
%2 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %1)
%3 = tail call i32 @countZeros(i32 102030)
%4 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %3)
ret i32 0
}
int getreg(const char *s) {
  if (s[0] == 'r' && s[2] == '\0') {
    int n = s[1] - '0';
    if (n < 8)
      return n;
  }
  return -1;
}


x86 assembly (clang, -O0):
<getreg>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x72,%eax
jne    1151 <getreg+0x51>
mov    -0x10(%rbp),%rax
movsbl 0x2(%rax),%eax
cmp    $0x0,%eax
jne    1151 <getreg+0x51>
mov    -0x10(%rbp),%rax
movsbl 0x1(%rax),%eax
sub    $0x30,%eax
mov    %eax,-0x14(%rbp)
cmpl   $0x8,-0x14(%rbp)
jge    114c <getreg+0x4c>
mov    -0x14(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    1158 <getreg+0x58>
jmp    1151 <getreg+0x51>
movl   $0xffffffff,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<getreg>:
cmpb   $0x72,(%rdi)
jne    1114 <getreg+0x14>
cmpb   $0x0,0x2(%rdi)
jne    1114 <getreg+0x14>
movsbl 0x1(%rdi),%eax
cmp    $0x38,%eax
jl     111a <getreg+0x1a>
mov    $0xffffffff,%eax
ret
add    $0xffffffd0,%eax
ret

LLVM IR (-O0):
define i32 @getreg(i8* %0) {
%2 = alloca i32
%3 = alloca i8*
%4 = alloca i32
store i8* %0, i8** %3
%5 = load i8*, i8** %3
%6 = getelementptr inbounds i8, i8* %5, i64 0
%7 = load i8, i8* %6
%8 = sext i8 %7 to i32
%9 = icmp eq i32 %8, 114
br i1 %9, label %10, label %27
10: ; preds = %1
%11 = load i8*, i8** %3
%12 = getelementptr inbounds i8, i8* %11, i64 2
%13 = load i8, i8* %12
%14 = sext i8 %13 to i32
%15 = icmp eq i32 %14, 0
br i1 %15, label %16, label %27
16: ; preds = %10
%17 = load i8*, i8** %3
%18 = getelementptr inbounds i8, i8* %17, i64 1
%19 = load i8, i8* %18
%20 = sext i8 %19 to i32
%21 = sub nsw i32 %20, 48
store i32 %21, i32* %4
%22 = load i32, i32* %4
%23 = icmp slt i32 %22, 8
br i1 %23, label %24, label %26
24: ; preds = %16
%25 = load i32, i32* %4
store i32 %25, i32* %2
br label %28
26: ; preds = %16
br label %27
27: ; preds = %26, %10, %1
store i32 -1, i32* %2
br label %28
28: ; preds = %27, %24
%29 = load i32, i32* %2
ret i32 %29
}

LLVM IR (-O2):
define i32 @getreg(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = icmp eq i8 %2, 114
br i1 %3, label %4, label %14
4: ; preds = %1
%5 = getelementptr inbounds i8, i8* %0, i64 2
%6 = load i8, i8* %5
%7 = icmp eq i8 %6, 0
br i1 %7, label %8, label %14
8: ; preds = %4
%9 = getelementptr inbounds i8, i8* %0, i64 1
%10 = load i8, i8* %9
%11 = sext i8 %10 to i32
%12 = add nsw i32 %11, -48
%13 = icmp sgt i8 %10, 55
br i1 %13, label %14, label %15
14: ; preds = %8, %4, %1
br label %15
15: ; preds = %8, %14
%16 = phi i32 [ %12, %8 ], [ -1, %14 ]
ret i32 %16
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ isascii(int);
void t_isascii_0xad() {
  Assert_real((isascii(173) == 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_isascii.c",
              870, ("isascii should be 0 for 0xad"));
}


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

x86 assembly (clang, -O2):
<t_isascii_0xad>:
push   %rax
mov    $0xad,%edi
call   1030 <isascii@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf66(%rip),%rcx
mov    $0x366,%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_isascii.c\00"
@.str.1 = [29 x i8] c"isascii should be 0 for 0xad\00"
define void @t_isascii_0xad() {
%1 = call i64 @isascii(i32 173)
%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 870, 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_isascii.c\00"
@.str.1 = [29 x i8] c"isascii should be 0 for 0xad\00"
define void @t_isascii_0xad() {
%1 = tail call i64 @isascii(i32 173)
%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 870, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Variables and functions */
int _ada_use_c2phc(int, int *, int *, double *);
int syscon_quaddobl_drop_variable_by_index(int k) {
  int fail, *b;
  double *c;
  fail = _ada_use_c2phc(308, &k, b, c);
  return fail;
}


x86 assembly (clang, -O0):
<syscon_quaddobl_drop_variable_by_index>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x10(%rbp),%rdx
mov    -0x18(%rbp),%rcx
mov    $0x134,%edi
lea    -0x4(%rbp),%rsi
call   1030 <_ada_use_c2phc@plt>
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<syscon_quaddobl_drop_variable_by_index>:
push   %rax
mov    %edi,0x4(%rsp)
lea    0x4(%rsp),%rsi
mov    $0x134,%edi
call   1030 <_ada_use_c2phc@plt>
pop    %rcx
ret

LLVM IR (-O0):
define i32 @syscon_quaddobl_drop_variable_by_index(i32 %0) {
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32*
%5 = alloca double*
store i32 %0, i32* %2
%6 = load i32*, i32** %4
%7 = load double*, double** %5
%8 = call i32 @_ada_use_c2phc(i32 308, i32* %2, i32* %6, double* %7)
store i32 %8, i32* %3
%9 = load i32, i32* %3
ret i32 %9
}

LLVM IR (-O2):
define i32 @syscon_quaddobl_drop_variable_by_index(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = call i32 @_ada_use_c2phc(i32 308, i32* %2, i32* undef, double* undef)
ret i32 %3
}
int _isatty_r(struct _reent *r, int file) { return -1; }


x86 assembly (clang, -O0):
<_isatty_r>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    $0xffffffff,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<_isatty_r>:
mov    $0xffffffff,%eax
ret

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

LLVM IR (-O2):
%struct._reent = type opaque
define i32 @_isatty_r(%struct._reent* nocapture readnone %0, i32 %1) {
ret i32 -1
}
/* Variables and functions */
int /*<<< orphan*/ load_dwell_table(char *);
int /*<<< orphan*/ load_ignition_table(char *);
int /*<<< orphan*/ setup_MAP();
int /*<<< orphan*/ setup_V();
int setup_ignition() {
  setup_MAP();
  setup_V();
  load_ignition_table("ST_240B");
  load_dwell_table("LS1.csv");
  return 0;
}


x86 assembly (clang, -O0):
<setup_ignition>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1030 <setup_MAP@plt>
mov    $0x0,%al
call   1060 <setup_V@plt>
lea    0xea7(%rip),%rdi
call   1040 <load_ignition_table@plt>
lea    0xea3(%rip),%rdi
call   1050 <load_dwell_table@plt>
xor    %eax,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<setup_ignition>:
push   %rax
xor    %eax,%eax
call   1030 <setup_MAP@plt>
xor    %eax,%eax
call   1060 <setup_V@plt>
lea    0xeaa(%rip),%rdi
call   1040 <load_ignition_table@plt>
lea    0xea6(%rip),%rdi
call   1050 <load_dwell_table@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [8 x i8] c"ST_240B\00"
@.str.1 = [8 x i8] c"LS1.csv\00"
define i32 @setup_ignition() {
%1 = call i32 (...) @setup_MAP()
%2 = call i32 (...) @setup_V()
%3 = call i32 @load_ignition_table(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0))
%4 = call i32 @load_dwell_table(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.1, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@.str = [8 x i8] c"ST_240B\00"
@.str.1 = [8 x i8] c"LS1.csv\00"
define i32 @setup_ignition() {
%1 = tail call i32 (...) @setup_MAP()
%2 = tail call i32 (...) @setup_V()
%3 = tail call i32 @load_ignition_table(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0))
%4 = tail call i32 @load_dwell_table(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.1, i64 0, i64 0))
ret i32 0
}
/* Variables and functions */
int natstrcompare(char const *, char const *, int);
int natstrcasecmp(const char *str1, const char *str2) {
  return natstrcompare(str1, str2, 1);
}


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

x86 assembly (clang, -O2):
<natstrcasecmp>:
mov    $0x1,%edx
jmp    1030 <natstrcompare@plt>

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

LLVM IR (-O2):
define i32 @natstrcasecmp(i8* %0, i8* %1) {
%3 = tail call i32 @natstrcompare(i8* %0, i8* %1, i32 1)
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ assert(void *);
void *calloc(size_t, size_t);
void *CALLOC(size_t num, size_t size) {
  void *temp = calloc(num, size);
  assert(temp);
  return temp;
}


x86 assembly (clang, -O0):
<CALLOC>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1030 <calloc@plt>
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rdi
call   1040 <assert@plt>
mov    -0x18(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<CALLOC>:
push   %rbx
call   1030 <calloc@plt>
mov    %rax,%rbx
mov    %rax,%rdi
call   1040 <assert@plt>
mov    %rbx,%rax
pop    %rbx
ret

LLVM IR (-O0):
define i8* @CALLOC(i64 %0, i64 %1) {
%3 = alloca i64
%4 = alloca i64
%5 = alloca i8*
store i64 %0, i64* %3
store i64 %1, i64* %4
%6 = load i64, i64* %3
%7 = load i64, i64* %4
%8 = call i8* @calloc(i64 %6, i64 %7)
store i8* %8, i8** %5
%9 = load i8*, i8** %5
%10 = call i32 @assert(i8* %9)
%11 = load i8*, i8** %5
ret i8* %11
}

LLVM IR (-O2):
define i8* @CALLOC(i64 %0, i64 %1) {
%3 = tail call i8* @calloc(i64 %0, i64 %1)
%4 = tail call i32 @assert(i8* %3)
ret i8* %3
}
/* Variables and functions */
int /*<<< orphan*/ R_OK;
scalar_t__ access(char *, int /*<<< orphan*/);
int errno;
int read_permission_p(char *filename) {
  if (access(filename, R_OK) == 0)
    return (0);
  return (errno);
}


x86 assembly (clang, -O0):
<read_permission_p>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
mov    0x2eb1(%rip),%rax
mov    (%rax),%esi
call   1030 <access@plt>
cmp    $0x0,%rax
jne    1144 <read_permission_p+0x34>
movl   $0x0,-0x4(%rbp)
jmp    1150 <read_permission_p+0x40>
mov    0x2e95(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<read_permission_p>:
push   %rax
mov    0x2ec0(%rip),%rax
mov    (%rax),%esi
call   1030 <access@plt>
mov    %rax,%rcx
xor    %eax,%eax
test   %rcx,%rcx
je     1132 <read_permission_p+0x22>
mov    0x2eb0(%rip),%rax
mov    (%rax),%eax
pop    %rcx
ret

LLVM IR (-O0):
@R_OK = global i32 0
@errno = global i32 0
define i32 @read_permission_p(i8* %0) {
%2 = alloca i32
%3 = alloca i8*
store i8* %0, i8** %3
%4 = load i8*, i8** %3
%5 = load i32, i32* @R_OK
%6 = call i64 @access(i8* %4, i32 %5)
%7 = icmp eq i64 %6, 0
br i1 %7, label %8, label %9
8: ; preds = %1
store i32 0, i32* %2
br label %11
9: ; preds = %1
%10 = load i32, i32* @errno
store i32 %10, i32* %2
br label %11
11: ; preds = %9, %8
%12 = load i32, i32* %2
ret i32 %12
}

LLVM IR (-O2):
@R_OK = global i32 0
@errno = global i32 0
define i32 @read_permission_p(i8* nocapture %0) {
%2 = load i32, i32* @R_OK
%3 = tail call i64 @access(i8* %0, i32 %2)
%4 = icmp eq i64 %3, 0
%5 = load i32, i32* @errno
%6 = select i1 %4, i32 0, i32 %5
ret i32 %6
}
void ve_rpc_data_init(void) {}


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

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

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

LLVM IR (-O2):
define void @ve_rpc_data_init() {
ret void
}
void ScaleARGBRowDownEven_Any_NEON() {}


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

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

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

LLVM IR (-O2):
define void @ScaleARGBRowDownEven_Any_NEON() {
ret void
}
unused1(addr, start, count, store_at) { should_inline1(addr, start, count); }


x86 assembly (clang, -O0):
<unused1>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    %ecx,-0x14(%rbp)
mov    -0x8(%rbp),%edi
mov    -0xc(%rbp),%esi
mov    -0x10(%rbp),%edx
mov    $0x0,%al
call   1030 <should_inline1@plt>
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @unused1(i32 %0, i32 %1, i32 %2, i32 %3) {
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32
store i32 %0, i32* %6
store i32 %1, i32* %7
store i32 %2, i32* %8
store i32 %3, i32* %9
%10 = load i32, i32* %6
%11 = load i32, i32* %7
%12 = load i32, i32* %8
%13 = call i32 (i32, i32, i32, ...) bitcast (i32 (...)* @should_inline1 to i32 (i32, i32, i32, ...)*)(i32 %10, i32 %11, i32 %12)
%14 = load i32, i32* %5
ret i32 %14
}

LLVM IR (-O2):
define i32 @unused1(i32 %0, i32 %1, i32 %2, i32 %3) {
%5 = tail call i32 (i32, i32, i32, ...) bitcast (i32 (...)* @should_inline1 to i32 (i32, i32, i32, ...)*)(i32 %0, i32 %1, i32 %2)
ret i32 undef
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
int /*<<< orphan*/ stderr;
void Usage() {
  fprintf(stderr, "Usage: ./a.out -n mq_name [-m maxmsg] [-z msgszie] [-e]\n");
  exit(-1);
}


x86 assembly (clang, -O0):
<Usage>:
push   %rbp
mov    %rsp,%rbp
mov    0x2eb5(%rip),%rax
mov    (%rax),%edi
lea    0xecc(%rip),%rsi
call   1030 <fprintf@plt>
mov    $0xffffffff,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<Usage>:
push   %rax
mov    0x2eb8(%rip),%rax
mov    (%rax),%edi
lea    0xecf(%rip),%rsi
call   1030 <fprintf@plt>
mov    $0xffffffff,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [57 x i8] c"Usage: ./a.out -n mq_name [-m maxmsg] [-z msgszie] [-e]\0A\00"
define void @Usage() {
%1 = load i32, i32* @stderr
%2 = call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([57 x i8], [57 x i8]* @.str, i64 0, i64 0))
%3 = call i32 @exit(i32 -1)
unreachable
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [57 x i8] c"Usage: ./a.out -n mq_name [-m maxmsg] [-z msgszie] [-e]\0A\00"
define void @Usage() {
%1 = load i32, i32* @stderr
%2 = tail call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([57 x i8], [57 x i8]* @.str, i64 0, i64 0))
%3 = tail call i32 @exit(i32 -1)
unreachable
}
/* Type definitions */
typedef int uint32_t;

/* Variables and functions */
void EPINonBlockingReadConfigure(uint32_t ui32Base, uint32_t ui32Channel,
                                 uint32_t ui32DataSize, uint32_t ui32Address) {
  uint32_t ui32Offset;
  ;
  ;
  ;
  ;
  ui32Offset = ui32Channel * (0x00000030 - 0x00000020);
  (*((volatile uint32_t *)(ui32Base + 0x00000020 + ui32Offset))) = ui32DataSize;
  (*((volatile uint32_t *)(ui32Base + 0x00000024 + ui32Offset))) = ui32Address;
}


x86 assembly (clang, -O0):
<EPINonBlockingReadConfigure>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    %ecx,-0x10(%rbp)
mov    -0x8(%rbp),%eax
shl    $0x4,%eax
mov    %eax,-0x14(%rbp)
mov    -0xc(%rbp),%ecx
mov    -0x4(%rbp),%eax
add    $0x20,%eax
add    -0x14(%rbp),%eax
cltq
mov    %ecx,(%rax)
mov    -0x10(%rbp),%ecx
mov    -0x4(%rbp),%eax
add    $0x24,%eax
add    -0x14(%rbp),%eax
cltq
mov    %ecx,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<EPINonBlockingReadConfigure>:
shl    $0x4,%esi
lea    (%rsi,%rdi,1),%eax
add    $0x20,%eax
cltq
mov    %edx,(%rax)
lea    (%rsi,%rdi,1),%eax
add    $0x24,%eax
cltq
mov    %ecx,(%rax)
ret

LLVM IR (-O0):
define void @EPINonBlockingReadConfigure(i32 %0, i32 %1, i32 %2, i32 %3) {
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32
store i32 %0, i32* %5
store i32 %1, i32* %6
store i32 %2, i32* %7
store i32 %3, i32* %8
%10 = load i32, i32* %6
%11 = mul nsw i32 %10, 16
store i32 %11, i32* %9
%12 = load i32, i32* %7
%13 = load i32, i32* %5
%14 = add nsw i32 %13, 32
%15 = load i32, i32* %9
%16 = add nsw i32 %14, %15
%17 = sext i32 %16 to i64
%18 = inttoptr i64 %17 to i32*
store volatile i32 %12, i32* %18
%19 = load i32, i32* %8
%20 = load i32, i32* %5
%21 = add nsw i32 %20, 36
%22 = load i32, i32* %9
%23 = add nsw i32 %21, %22
%24 = sext i32 %23 to i64
%25 = inttoptr i64 %24 to i32*
store volatile i32 %19, i32* %25
ret void
}

LLVM IR (-O2):
define void @EPINonBlockingReadConfigure(i32 %0, i32 %1, i32 %2, i32 %3) {
%5 = shl nsw i32 %1, 4
%6 = add i32 %5, %0
%7 = add i32 %6, 32
%8 = sext i32 %7 to i64
%9 = inttoptr i64 %8 to i32*
store volatile i32 %2, i32* %9
%10 = add i32 %6, 36
%11 = sext i32 %10 to i64
%12 = inttoptr i64 %11 to i32*
store volatile i32 %3, i32* %12
ret void
}
void Sys_LowFPPrecision(void) {}


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

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

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

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