xunge/DecIR huggingface dataset:
/* Variables and functions */
scalar_t__ strcmp(char *, char *);
int canwrite(char *fname) { return strcmp(fname, "/dev/cons") == 0; }


x86 assembly (clang, -O0):
<canwrite>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
lea    0xed9(%rip),%rsi
call   1030 <strcmp@plt>
cmp    $0x0,%rax
sete   %al
and    $0x1,%al
movzbl %al,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<canwrite>:
push   %rax
lea    0xee8(%rip),%rsi
call   1030 <strcmp@plt>
xor    %ecx,%ecx
test   %rax,%rax
sete   %cl
mov    %ecx,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [10 x i8] c"/dev/cons\00"
define i32 @canwrite(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i64 @strcmp(i8* %3, i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0))
%5 = icmp eq i64 %4, 0
%6 = zext i1 %5 to i32
ret i32 %6
}

LLVM IR (-O2):
@.str = [10 x i8] c"/dev/cons\00"
define i32 @canwrite(i8* %0) {
%2 = tail call i64 @strcmp(i8* %0, i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0))
%3 = icmp eq i64 %2, 0
%4 = zext i1 %3 to i32
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ strlen(char *);
int write_serial_port(char *, int /*<<< orphan*/);
int puts_serial_port(char *data) {
  return write_serial_port(data, strlen(data));
}


x86 assembly (clang, -O0):
<puts_serial_port>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <strlen@plt>
mov    -0x10(%rbp),%rdi
mov    %eax,%esi
call   1030 <write_serial_port@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<puts_serial_port>:
push   %rbx
mov    %rdi,%rbx
call   1040 <strlen@plt>
mov    %rbx,%rdi
mov    %eax,%esi
pop    %rbx
jmp    1030 <write_serial_port@plt>

LLVM IR (-O0):
define i32 @puts_serial_port(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = load i8*, i8** %2
%5 = call i32 @strlen(i8* %4)
%6 = call i32 @write_serial_port(i8* %3, i32 %5)
ret i32 %6
}

LLVM IR (-O2):
define i32 @puts_serial_port(i8* %0) {
%2 = tail call i32 @strlen(i8* %0)
%3 = tail call i32 @write_serial_port(i8* %0, i32 %2)
ret i32 %3
}
/* Type definitions */
typedef int wint_t;

/* Variables and functions */
int iswalpha(wint_t wc) {
  return (wc >= 0 && wc < 128 ? (wc & ~0x20) >= 'A' && (wc & ~0x20) <= 'Z' : 0);
}


x86 assembly (clang, -O0):
<iswalpha>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
cmpl   $0x0,-0x4(%rbp)
jl     1151 <iswalpha+0x51>
cmpl   $0x80,-0x4(%rbp)
jge    1151 <iswalpha+0x51>
mov    -0x4(%rbp),%ecx
and    $0xffffffdf,%ecx
xor    %eax,%eax
cmp    $0x41,%ecx
mov    %al,-0x5(%rbp)
jl     1141 <iswalpha+0x41>
mov    -0x4(%rbp),%eax
and    $0xffffffdf,%eax
cmp    $0x5a,%eax
setle  %al
mov    %al,-0x5(%rbp)
mov    -0x5(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
mov    %eax,-0xc(%rbp)
jmp    115b <iswalpha+0x5b>
xor    %eax,%eax
mov    %eax,-0xc(%rbp)
jmp    115b <iswalpha+0x5b>
mov    -0xc(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<iswalpha>:
cmp    $0x80,%edi
setb   %al
and    $0xffffffdf,%edi
add    $0xffffffbf,%edi
cmp    $0x1a,%edi
setb   %cl
and    %al,%cl
movzbl %cl,%eax
ret

LLVM IR (-O0):
define i32 @iswalpha(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = icmp sge i32 %3, 0
br i1 %4, label %5, label %19
5: ; preds = %1
%6 = load i32, i32* %2
%7 = icmp slt i32 %6, 128
br i1 %7, label %8, label %19
8: ; preds = %5
%9 = load i32, i32* %2
%10 = and i32 %9, -33
%11 = icmp sge i32 %10, 65
br i1 %11, label %12, label %16
12: ; preds = %8
%13 = load i32, i32* %2
%14 = and i32 %13, -33
%15 = icmp sle i32 %14, 90
br label %16
16: ; preds = %12, %8
%17 = phi i1 [ false, %8 ], [ %15, %12 ]
%18 = zext i1 %17 to i32
br label %20
19: ; preds = %5, %1
br label %20
20: ; preds = %19, %16
%21 = phi i32 [ %18, %16 ], [ 0, %19 ]
ret i32 %21
}

LLVM IR (-O2):
define i32 @iswalpha(i32 %0) {
%2 = icmp ult i32 %0, 128
%3 = and i32 %0, -33
%4 = add i32 %3, -65
%5 = icmp ult i32 %4, 26
%6 = and i1 %2, %5
%7 = zext i1 %6 to i32
ret i32 %7
}
/* Variables and functions */
int /*<<< orphan*/ free(void *const);
void fetx_dealloc(void *const ptr) { free(ptr); }


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

x86 assembly (clang, -O2):
<fetx_dealloc>:
jmp    1030 <free@plt>

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

LLVM IR (-O2):
define void @fetx_dealloc(i8* nocapture %0) {
%2 = tail call i32 @free(i8* %0)
ret void
}
const char *str_stmt_break() { return "break"; }


x86 assembly (clang, -O0):
<str_stmt_break>:
push   %rbp
mov    %rsp,%rbp
lea    0xef5(%rip),%rax
pop    %rbp
ret

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

LLVM IR (-O0):
@.str = [6 x i8] c"break\00"
define i8* @str_stmt_break() {
ret i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0)
}

LLVM IR (-O2):
@.str = [6 x i8] c"break\00"
define i8* @str_stmt_break() {
ret i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0)
}
/* Variables and functions */
int /*<<< orphan*/ _expect_never(char *, char *, int);
void can_declare_function_never_called() {
  _expect_never("sample_mock",
                "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/"
                "outputs/2022-01-22/02-19-57/repos/jedediah/gospel/refs/heads/"
                "master/cgreen/tests/mocks_tests.c",
                160);
}


x86 assembly (clang, -O0):
<can_declare_function_never_called>:
push   %rbp
mov    %rsp,%rbp
lea    0xee5(%rip),%rdi
lea    0xeea(%rip),%rsi
mov    $0xa0,%edx
call   1030 <_expect_never@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<can_declare_function_never_called>:
lea    0xee9(%rip),%rdi
lea    0xeee(%rip),%rsi
mov    $0xa0,%edx
jmp    1030 <_expect_never@plt>

LLVM IR (-O0):
@.str = [12 x i8] c"sample_mock\00"
@.str.1 = [151 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/jedediah/gospel/refs/heads/master/cgreen/tests/mocks_tests.c\00"
define void @can_declare_function_never_called() {
%1 = call i32 @_expect_never(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([151 x i8], [151 x i8]* @.str.1, i64 0, i64 0), i32 160)
ret void
}

LLVM IR (-O2):
@.str = [12 x i8] c"sample_mock\00"
@.str.1 = [151 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/jedediah/gospel/refs/heads/master/cgreen/tests/mocks_tests.c\00"
define void @can_declare_function_never_called() {
%1 = tail call i32 @_expect_never(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([151 x i8], [151 x i8]* @.str.1, i64 0, i64 0), i32 160)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int drv_NULL_list(void) {
  printf("NULL driver for testing purposes");
  return 0;
}


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

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

LLVM IR (-O0):
@.str = [33 x i8] c"NULL driver for testing purposes\00"
define i32 @drv_NULL_list() {
%1 = call i32 @printf(i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@.str = [33 x i8] c"NULL driver for testing purposes\00"
define i32 @drv_NULL_list() {
%1 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([33 x i8], [33 x i8]* @.str, i64 0, i64 0))
ret i32 0
}
int is_harshad_numbers(const int number1, const int number2) {}


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

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

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

LLVM IR (-O2):
define i32 @is_harshad_numbers(i32 %0, i32 %1) {
ret i32 undef
}
/* Type definitions */
typedef int /*<<< orphan*/ uint8_t;

/* Variables and functions */
uint8_t evpd_page_code(uint8_t *data) { return data[1]; }


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

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

LLVM IR (-O0):
define i32 @evpd_page_code(i32* %0) {
%2 = alloca i32*
store i32* %0, i32** %2
%3 = load i32*, i32** %2
%4 = getelementptr inbounds i32, i32* %3, i64 1
%5 = load i32, i32* %4
ret i32 %5
}

LLVM IR (-O2):
define i32 @evpd_page_code(i32* nocapture %0) {
%2 = getelementptr inbounds i32, i32* %0, i64 1
%3 = load i32, i32* %2
ret i32 %3
}
/* Type definitions */
typedef int /*<<< orphan*/ XEvent;
typedef int Bool;

/* Variables and functions */
Bool button_click(XEvent *ev) { return (1); }


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

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

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

LLVM IR (-O2):
define i32 @button_click(i32* nocapture readnone %0) {
ret i32 1
}
/* Variables and functions */
int /*<<< orphan*/ test_int_no1(int, int);
int main(int argc, char *argv[]) { test_int_no1(1, 2); }


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    $0x1,%edi
mov    $0x2,%esi
call   1030 <test_int_no1@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @test_int_no1(i32 1, i32 2)
ret i32 0
}
void LoadPacked(int skip, int gz_size, int gz_crc) {}


x86 assembly (clang, -O0):
<LoadPacked>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
pop    %rbp
ret

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

LLVM IR (-O0):
define void @LoadPacked(i32 %0, i32 %1, i32 %2) {
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
store i32 %0, i32* %4
store i32 %1, i32* %5
store i32 %2, i32* %6
ret void
}

LLVM IR (-O2):
define void @LoadPacked(i32 %0, i32 %1, i32 %2) {
ret void
}
/* Variables and functions */
int U_WMRCORENONE_get(char *);
int U_WMR68_get(void) { return U_WMRCORENONE_get("U_WMR68"); }


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

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

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

LLVM IR (-O2):
@.str = [8 x i8] c"U_WMR68\00"
define i32 @U_WMR68_get() {
%1 = tail call i32 @U_WMRCORENONE_get(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0))
ret i32 %1
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ isdigit(int);
void t_isdigit_0x84() {
  Assert_real((isdigit(132) == 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_isdigit.c",
              665, ("isdigit should be 0 for 0x84"));
}


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

x86 assembly (clang, -O2):
<t_isdigit_0x84>:
push   %rax
mov    $0x84,%edi
call   1030 <isdigit@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf66(%rip),%rcx
mov    $0x299,%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_isdigit.c\00"
@.str.1 = [29 x i8] c"isdigit should be 0 for 0x84\00"
define void @t_isdigit_0x84() {
%1 = call i64 @isdigit(i32 132)
%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 665, 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_isdigit.c\00"
@.str.1 = [29 x i8] c"isdigit should be 0 for 0x84\00"
define void @t_isdigit_0x84() {
%1 = tail call i64 @isdigit(i32 132)
%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 665, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ mfatal(char *, unsigned int);
void *realloc(void *, unsigned int);
void *erealloc(void *ptr, unsigned int size) {
  void *ret = realloc(ptr, size);
  if (!ret)
    mfatal("realloc", size);
  return ret;
}


x86 assembly (clang, -O0):
<erealloc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
call   1030 <realloc@plt>
mov    %rax,-0x18(%rbp)
cmpq   $0x0,-0x18(%rbp)
jne    1159 <erealloc+0x39>
mov    -0xc(%rbp),%esi
lea    0xeac(%rip),%rdi
call   1040 <mfatal@plt>
mov    -0x18(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<erealloc>:
push   %rbp
push   %rbx
push   %rax
mov    %esi,%ebp
call   1030 <realloc@plt>
mov    %rax,%rbx
test   %rax,%rax
jne    1140 <erealloc+0x20>
lea    0xec7(%rip),%rdi
mov    %ebp,%esi
call   1040 <mfatal@plt>
mov    %rbx,%rax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
@.str = [8 x i8] c"realloc\00"
define i8* @erealloc(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i32
%5 = alloca i8*
store i8* %0, i8** %3
store i32 %1, i32* %4
%6 = load i8*, i8** %3
%7 = load i32, i32* %4
%8 = call i8* @realloc(i8* %6, i32 %7)
store i8* %8, i8** %5
%9 = load i8*, i8** %5
%10 = icmp ne i8* %9, null
br i1 %10, label %14, label %11
11: ; preds = %2
%12 = load i32, i32* %4
%13 = call i32 @mfatal(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i32 %12)
br label %14
14: ; preds = %11, %2
%15 = load i8*, i8** %5
ret i8* %15
}

LLVM IR (-O2):
@.str = [8 x i8] c"realloc\00"
define i8* @erealloc(i8* %0, i32 %1) {
%3 = tail call i8* @realloc(i8* %0, i32 %1)
%4 = icmp eq i8* %3, null
br i1 %4, label %5, label %7
5: ; preds = %2
%6 = tail call i32 @mfatal(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i32 %1)
br label %7
7: ; preds = %5, %2
ret i8* %3
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ isodigit(int);
void t_isodigit_0xea() {
  Assert_real((isodigit(234) == 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_isodigit.c",
              1175, ("isodigit should be 0 for 0xea"));
}


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

x86 assembly (clang, -O2):
<t_isodigit_0xea>:
push   %rax
mov    $0xea,%edi
call   1040 <isodigit@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf67(%rip),%rcx
mov    $0x497,%edx
pop    %rax
jmp    1030 <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_isodigit.c\00"
@.str.1 = [30 x i8] c"isodigit should be 0 for 0xea\00"
define void @t_isodigit_0xea() {
%1 = call i64 @isodigit(i32 234)
%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 1175, 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_isodigit.c\00"
@.str.1 = [30 x i8] c"isodigit should be 0 for 0xea\00"
define void @t_isodigit_0xea() {
%1 = tail call i64 @isodigit(i32 234)
%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 1175, i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.1, i64 0, i64 0))
ret void
}
const char *Class0__method_name(void) { return "Class0"; }


x86 assembly (clang, -O0):
<Class0__method_name>:
push   %rbp
mov    %rsp,%rbp
lea    0xef5(%rip),%rax
pop    %rbp
ret

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

LLVM IR (-O0):
@.str = [7 x i8] c"Class0\00"
define i8* @Class0__method_name() {
ret i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0)
}

LLVM IR (-O2):
@.str = [7 x i8] c"Class0\00"
define i8* @Class0__method_name() {
ret i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0)
}
/* Type definitions */
typedef int /*<<< orphan*/ table;

/* Variables and functions */
int /*<<< orphan*/ FIFOadd(int);
int main() {
  int table[] = {0, 1, 2, 3, 4, 5};
  int length = sizeof(table) / sizeof(int);
  for (int i = 0; i < length; i++) {
    FIFOadd(table[i]);
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movl   $0x0,-0x4(%rbp)
mov    0xeda(%rip),%rax
mov    %rax,-0x20(%rbp)
mov    0xed7(%rip),%rax
mov    %rax,-0x18(%rbp)
mov    0xed4(%rip),%rax
mov    %rax,-0x10(%rbp)
movl   $0x6,-0x24(%rbp)
movl   $0x0,-0x28(%rbp)
mov    -0x28(%rbp),%eax
cmp    -0x24(%rbp),%eax
jge    1175 <main+0x65>
movslq -0x28(%rbp),%rax
mov    -0x20(%rbp,%rax,4),%edi
call   1030 <FIFOadd@plt>
mov    -0x28(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x28(%rbp)
jmp    114e <main+0x3e>
xor    %eax,%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %edi,%edi
call   1030 <FIFOadd@plt>
mov    $0x1,%edi
call   1030 <FIFOadd@plt>
mov    $0x2,%edi
call   1030 <FIFOadd@plt>
mov    $0x3,%edi
call   1030 <FIFOadd@plt>
mov    $0x4,%edi
call   1030 <FIFOadd@plt>
mov    $0x5,%edi
call   1030 <FIFOadd@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@__const.main.table = [6 x i32] [i32 0, i32 1, i32 2, i32 3, i32 4, i32 5]
define i32 @main() {
%1 = alloca i32
%2 = alloca [6 x i32]
%3 = alloca i32
%4 = alloca i32
store i32 0, i32* %1
%5 = bitcast [6 x i32]* %2 to i8*
store i32 6, i32* %3
store i32 0, i32* %4
br label %6
6: ; preds = %16, %0
%7 = load i32, i32* %4
%8 = load i32, i32* %3
%9 = icmp slt i32 %7, %8
br i1 %9, label %10, label %19
10: ; preds = %6
%11 = load i32, i32* %4
%12 = sext i32 %11 to i64
%13 = getelementptr inbounds [6 x i32], [6 x i32]* %2, i64 0, i64 %12
%14 = load i32, i32* %13
%15 = call i32 @FIFOadd(i32 %14)
br label %16
16: ; preds = %10
%17 = load i32, i32* %4
%18 = add nsw i32 %17, 1
store i32 %18, i32* %4
br label %6
19: ; preds = %6
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 @FIFOadd(i32 0)
%2 = tail call i32 @FIFOadd(i32 1)
%3 = tail call i32 @FIFOadd(i32 2)
%4 = tail call i32 @FIFOadd(i32 3)
%5 = tail call i32 @FIFOadd(i32 4)
%6 = tail call i32 @FIFOadd(i32 5)
ret i32 0
}
/* Type definitions */
typedef int /*<<< orphan*/ uint8_t;

/* Variables and functions */
void bswap64(uint8_t *buf) { (void)buf; }


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

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

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

LLVM IR (-O2):
define void @bswap64(i32* nocapture %0) {
ret void
}
const char *help(int argc, char *argv[]) {
  return "Available commands:\n"
         "\n"
         "help\n"
         "set <option> <value> ...\n"
         "subset <section> <option> <value>\n"
         "create <section>\n"
         "destroy <section>\n"
         "dump [mod|modified]\n"
         "quit\n"
         "\n"
         "<option> is one of 'bool', 'int' 'string' and 'float'.\n";
}


x86 assembly (clang, -O0):
<help>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
lea    0xeee(%rip),%rax
pop    %rbp
ret

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

LLVM IR (-O0):
@.str = [202 x i8] c"Available commands:\0A\0Ahelp\0Aset <option> <value> ...\0Asubset <section> <option> <value>\0Acreate <section>\0Adestroy <section>\0Adump [mod|modified]\0Aquit\0A\0A<option> is one of 'bool', 'int' 'string' and 'float'.\0A\00"
define i8* @help(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i8**
store i32 %0, i32* %3
store i8** %1, i8*** %4
ret i8* getelementptr inbounds ([202 x i8], [202 x i8]* @.str, i64 0, i64 0)
}

LLVM IR (-O2):
@.str = [202 x i8] c"Available commands:\0A\0Ahelp\0Aset <option> <value> ...\0Asubset <section> <option> <value>\0Acreate <section>\0Adestroy <section>\0Adump [mod|modified]\0Aquit\0A\0A<option> is one of 'bool', 'int' 'string' and 'float'.\0A\00"
define i8* @help(i32 %0, i8** nocapture readnone %1) {
ret i8* getelementptr inbounds ([202 x i8], [202 x i8]* @.str, i64 0, i64 0)
}
float constrainf(float amt, float low, float high) {
  if (amt < low)
    return low;
  else if (amt > high)
    return high;
  else
    return amt;
}


x86 assembly (clang, -O0):
<constrainf>:
push   %rbp
mov    %rsp,%rbp
movss  %xmm0,-0x8(%rbp)
movss  %xmm1,-0xc(%rbp)
movss  %xmm2,-0x10(%rbp)
movss  -0x8(%rbp),%xmm1
movss  -0xc(%rbp),%xmm0
ucomiss %xmm1,%xmm0
jbe    1135 <constrainf+0x35>
movss  -0xc(%rbp),%xmm0
movss  %xmm0,-0x4(%rbp)
jmp    115d <constrainf+0x5d>
movss  -0x8(%rbp),%xmm0
ucomiss -0x10(%rbp),%xmm0
jbe    1153 <constrainf+0x53>
movss  -0x10(%rbp),%xmm0
movss  %xmm0,-0x4(%rbp)
jmp    115d <constrainf+0x5d>
movss  -0x8(%rbp),%xmm0
movss  %xmm0,-0x4(%rbp)
movss  -0x4(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<constrainf>:
minss  %xmm0,%xmm2
cmpltss %xmm1,%xmm0
movaps %xmm0,%xmm3
andnps %xmm2,%xmm3
andps  %xmm1,%xmm0
orps   %xmm3,%xmm0
ret

LLVM IR (-O0):
define float @constrainf(float %0, float %1, float %2) {
%4 = alloca float
%5 = alloca float
%6 = alloca float
%7 = alloca float
store float %0, float* %5
store float %1, float* %6
store float %2, float* %7
%8 = load float, float* %5
%9 = load float, float* %6
%10 = fcmp olt float %8, %9
br i1 %10, label %11, label %13
11: ; preds = %3
%12 = load float, float* %6
store float %12, float* %4
br label %21
13: ; preds = %3
%14 = load float, float* %5
%15 = load float, float* %7
%16 = fcmp ogt float %14, %15
br i1 %16, label %17, label %19
17: ; preds = %13
%18 = load float, float* %7
store float %18, float* %4
br label %21
19: ; preds = %13
%20 = load float, float* %5
store float %20, float* %4
br label %21
21: ; preds = %19, %17, %11
%22 = load float, float* %4
ret float %22
}

LLVM IR (-O2):
define float @constrainf(float %0, float %1, float %2) {
%4 = fcmp olt float %0, %1
%5 = fcmp ogt float %0, %2
%6 = select i1 %5, float %2, float %0
%7 = select i1 %4, float %1, float %6
ret float %7
}
/* Variables and functions */
int rand();
int ProducirDato(int x) {
  int n;
  n = rand() % x;
  return n;
}


x86 assembly (clang, -O0):
<ProducirDato>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    $0x0,%al
call   1030 <rand@plt>
cltd
idivl  -0x4(%rbp)
mov    %edx,-0x8(%rbp)
mov    -0x8(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ProducirDato>:
push   %rbx
mov    %edi,%ebx
xor    %eax,%eax
call   1030 <rand@plt>
cltd
idiv   %ebx
mov    %edx,%eax
pop    %rbx
ret

LLVM IR (-O0):
define i32 @ProducirDato(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %2
%4 = call i32 (...) @rand()
%5 = load i32, i32* %2
%6 = srem i32 %4, %5
store i32 %6, i32* %3
%7 = load i32, i32* %3
ret i32 %7
}

LLVM IR (-O2):
define i32 @ProducirDato(i32 %0) {
%2 = tail call i32 (...) @rand()
%3 = srem i32 %2, %0
ret i32 %3
}
/* Variables and functions */
char **softc_private_get_storage_drivers();
char **softc_get_storage_drivers() {
  return softc_private_get_storage_drivers();
}


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

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

LLVM IR (-O0):
define i8** @softc_get_storage_drivers() {
%1 = call i8** (...) @softc_private_get_storage_drivers()
ret i8** %1
}

LLVM IR (-O2):
define i8** @softc_get_storage_drivers() {
%1 = tail call i8** (...) @softc_private_get_storage_drivers()
ret i8** %1
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ iscntrl(int);
void t_iscntrl_0x54() {
  Assert_real((iscntrl(84) == 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_iscntrl.c",
              425, ("iscntrl should be 0 for T"));
}


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

x86 assembly (clang, -O2):
<t_iscntrl_0x54>:
push   %rax
mov    $0x54,%edi
call   1030 <iscntrl@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf66(%rip),%rcx
mov    $0x1a9,%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_iscntrl.c\00"
@.str.1 = [26 x i8] c"iscntrl should be 0 for T\00"
define void @t_iscntrl_0x54() {
%1 = call i64 @iscntrl(i32 84)
%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 425, 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_iscntrl.c\00"
@.str.1 = [26 x i8] c"iscntrl should be 0 for T\00"
define void @t_iscntrl_0x54() {
%1 = tail call i64 @iscntrl(i32 84)
%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 425, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Variables and functions */
long simple_strtoul_patch(char const *, char **, unsigned int);
long simple_strtol_patch(const char *cp, char **endp, unsigned int base) {
  if (*cp == '-')
    return -simple_strtoul_patch(cp + 1, endp, base);
  return simple_strtoul_patch(cp, endp, base);
}


x86 assembly (clang, -O0):
<simple_strtol_patch>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    %edx,-0x1c(%rbp)
mov    -0x10(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x2d,%eax
jne    1158 <simple_strtol_patch+0x48>
mov    -0x10(%rbp),%rdi
add    $0x1,%rdi
mov    -0x18(%rbp),%rsi
mov    -0x1c(%rbp),%edx
call   1030 <simple_strtoul_patch@plt>
mov    %rax,%rcx
xor    %eax,%eax
sub    %rcx,%rax
mov    %rax,-0x8(%rbp)
jmp    116c <simple_strtol_patch+0x5c>
mov    -0x10(%rbp),%rdi
mov    -0x18(%rbp),%rsi
mov    -0x1c(%rbp),%edx
call   1030 <simple_strtoul_patch@plt>
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<simple_strtol_patch>:
push   %rax
cmpb   $0x2d,(%rdi)
jne    1124 <simple_strtol_patch+0x14>
add    $0x1,%rdi
call   1030 <simple_strtoul_patch@plt>
neg    %rax
pop    %rcx
ret
pop    %rax
jmp    1030 <simple_strtoul_patch@plt>

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

LLVM IR (-O2):
define i64 @simple_strtol_patch(i8* %0, i8** %1, i32 %2) {
%4 = load i8, i8* %0
%5 = icmp eq i8 %4, 45
br i1 %5, label %6, label %10
6: ; preds = %3
%7 = getelementptr inbounds i8, i8* %0, i64 1
%8 = tail call i64 @simple_strtoul_patch(i8* %7, i8** %1, i32 %2)
%9 = sub nsw i64 0, %8
br label %12
10: ; preds = %3
%11 = tail call i64 @simple_strtoul_patch(i8* %0, i8** %1, i32 %2)
br label %12
12: ; preds = %10, %6
%13 = phi i64 [ %9, %6 ], [ %11, %10 ]
ret i64 %13
}
/* Variables and functions */
scalar_t__ _src_iter_eof(char const *, char const *);
char _src_iter_char_or_eof(const char *current, const char *end) {
  return _src_iter_eof(current, end) ? '\0' : *current;
}


x86 assembly (clang, -O0):
<_src_iter_char_or_eof>:
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 <_src_iter_eof@plt>
cmp    $0x0,%rax
je     1141 <_src_iter_char_or_eof+0x31>
xor    %eax,%eax
mov    %eax,-0x14(%rbp)
jmp    114b <_src_iter_char_or_eof+0x3b>
mov    -0x8(%rbp),%rax
movsbl (%rax),%eax
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
movsbl %al,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<_src_iter_char_or_eof>:
push   %rbx
mov    %rdi,%rbx
call   1030 <_src_iter_eof@plt>
test   %rax,%rax
je     1122 <_src_iter_char_or_eof+0x12>
xor    %eax,%eax
pop    %rbx
ret
mov    (%rbx),%al
pop    %rbx
ret

LLVM IR (-O0):
define signext i8 @_src_iter_char_or_eof(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 i64 @_src_iter_eof(i8* %5, i8* %6)
%8 = icmp ne i64 %7, 0
br i1 %8, label %9, label %10
9: ; preds = %2
br label %14
10: ; preds = %2
%11 = load i8*, i8** %3
%12 = load i8, i8* %11
%13 = sext i8 %12 to i32
br label %14
14: ; preds = %10, %9
%15 = phi i32 [ 0, %9 ], [ %13, %10 ]
%16 = trunc i32 %15 to i8
ret i8 %16
}

LLVM IR (-O2):
define signext i8 @_src_iter_char_or_eof(i8* %0, i8* %1) {
%3 = tail call i64 @_src_iter_eof(i8* %0, i8* %1)
%4 = icmp eq i64 %3, 0
br i1 %4, label %5, label %7
5: ; preds = %2
%6 = load i8, i8* %0
br label %7
7: ; preds = %2, %5
%8 = phi i8 [ %6, %5 ], [ 0, %2 ]
ret i8 %8
}
void avio_rb16() {}


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

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

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

LLVM IR (-O2):
define void @avio_rb16() {
ret void
}
int myfunc(int val) { return val + 10; }


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

x86 assembly (clang, -O2):
<myfunc>:
lea    0xa(%rdi),%eax
ret

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

LLVM IR (-O2):
define i32 @myfunc(i32 %0) {
%2 = add nsw i32 %0, 10
ret i32 %2
}
/* Variables and functions */
int yahoo_M1Common(unsigned int, int);
int yahoo_f01_2e(int Salt, int Parameter) {
  unsigned b = Salt ^ 0xFE07D38;
  return yahoo_M1Common(b, Parameter);
}


x86 assembly (clang, -O0):
<yahoo_f01_2e>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
xor    $0xfe07d38,%eax
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%edi
mov    -0x8(%rbp),%esi
call   1030 <yahoo_M1Common@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<yahoo_f01_2e>:
xor    $0xfe07d38,%edi
jmp    1030 <yahoo_M1Common@plt>

LLVM IR (-O0):
define i32 @yahoo_f01_2e(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* %3
%7 = xor i32 %6, 266370360
store i32 %7, i32* %5
%8 = load i32, i32* %5
%9 = load i32, i32* %4
%10 = call i32 @yahoo_M1Common(i32 %8, i32 %9)
ret i32 %10
}

LLVM IR (-O2):
define i32 @yahoo_f01_2e(i32 %0, i32 %1) {
%3 = xor i32 %0, 266370360
%4 = tail call i32 @yahoo_M1Common(i32 %3, i32 %1)
ret i32 %4
}
void omap_dsp_reserve_sdram_memblock(void) {}


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

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

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

LLVM IR (-O2):
define void @omap_dsp_reserve_sdram_memblock() {
ret void
}
int setup_MAP() { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @setup_MAP() {
ret i32 0
}
/* Type definitions */
struct xarray_header {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ free(struct xarray_header *);
struct xarray_header *xarray_header(void *);
void xarray_free(void *a) {
  struct xarray_header *ah;
  if (!(ah = xarray_header(a))) {
    return;
  }
  free(ah);
}


x86 assembly (clang, -O0):
<xarray_free>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <xarray_header@plt>
mov    %rax,-0x10(%rbp)
cmp    $0x0,%rax
jne    1148 <xarray_free+0x28>
jmp    1151 <xarray_free+0x31>
mov    -0x10(%rbp),%rdi
call   1030 <free@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<xarray_free>:
push   %rax
call   1040 <xarray_header@plt>
test   %rax,%rax
je     1134 <xarray_free+0x14>
mov    %rax,%rdi
pop    %rax
jmp    1030 <free@plt>
pop    %rax
ret

LLVM IR (-O0):
%struct.xarray_header = type { i32 }
define void @xarray_free(i8* %0) {
%2 = alloca i8*
%3 = alloca %struct.xarray_header*
store i8* %0, i8** %2
%4 = load i8*, i8** %2
%5 = call %struct.xarray_header* @xarray_header(i8* %4)
store %struct.xarray_header* %5, %struct.xarray_header** %3
%6 = icmp ne %struct.xarray_header* %5, null
br i1 %6, label %8, label %7
7: ; preds = %1
br label %11
8: ; preds = %1
%9 = load %struct.xarray_header*, %struct.xarray_header** %3
%10 = call i32 @free(%struct.xarray_header* %9)
br label %11
11: ; preds = %8, %7
ret void
}

LLVM IR (-O2):
%struct.xarray_header = type { i32 }
define void @xarray_free(i8* %0) {
%2 = tail call %struct.xarray_header* @xarray_header(i8* %0)
%3 = icmp eq %struct.xarray_header* %2, null
br i1 %3, label %6, label %4
4: ; preds = %1
%5 = tail call i32 @free(%struct.xarray_header* %2)
br label %6
6: ; preds = %1, %4
ret void
}
int test_imm_24int32_mem(int *val) {
  return ((*val) & (0x24 << 0)) ? -20 : -40;
}


x86 assembly (clang, -O0):
<test_imm_24int32_mem>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%edx
and    $0x24,%edx
mov    $0xffffffd8,%eax
mov    $0xffffffec,%ecx
cmp    $0x0,%edx
cmovne %ecx,%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @test_imm_24int32_mem(i32* nocapture %0) {
%2 = load i32, i32* %0
%3 = and i32 %2, 36
%4 = icmp eq i32 %3, 0
%5 = select i1 %4, i32 -40, i32 -20
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ _exit(int /*<<< orphan*/);
void doquit(int sig) { _exit(0); }


x86 assembly (clang, -O0):
<doquit>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
xor    %edi,%edi
call   1030 <_exit@plt>

x86 assembly (clang, -O2):
<doquit>:
push   %rax
xor    %edi,%edi
call   1030 <_exit@plt>

LLVM IR (-O0):
define void @doquit(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = call i32 @_exit(i32 0)
unreachable
}

LLVM IR (-O2):
define void @doquit(i32 %0) {
%2 = tail call i32 @_exit(i32 0)
unreachable
}
void TA2_N_IRQHandler(void) {
  while (1) {
  }
}


x86 assembly (clang, -O0):
<TA2_N_IRQHandler>:
push   %rbp
mov    %rsp,%rbp
jmp    1109 <TA2_N_IRQHandler+0x9>
jmp    1109 <TA2_N_IRQHandler+0x9>

x86 assembly (clang, -O2):
<TA2_N_IRQHandler>:
jmp    1100 <TA2_N_IRQHandler>

LLVM IR (-O0):
define void @TA2_N_IRQHandler() {
br label %1
1: ; preds = %0, %1
br label %1
}

LLVM IR (-O2):
define void @TA2_N_IRQHandler() {
br label %1
1: ; preds = %0, %1
br label %1
}
/* Variables and functions */
int S_IWGRP;
int S_IWOTH;
int mkstemp(char *);
int /*<<< orphan*/ umask(int);
int ltr_int_open_tmp_file(char *fname) {
  umask(S_IWGRP | S_IWOTH);
  return mkstemp(fname);
}


x86 assembly (clang, -O0):
<ltr_int_open_tmp_file>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    0x2eb5(%rip),%rax
mov    (%rax),%edi
mov    0x2e94(%rip),%rax
or     (%rax),%edi
call   1030 <umask@plt>
mov    -0x8(%rbp),%rdi
call   1040 <mkstemp@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ltr_int_open_tmp_file>:
push   %rbx
mov    %rdi,%rbx
mov    0x2ebd(%rip),%rax
mov    0x2e9e(%rip),%rcx
mov    (%rcx),%edi
or     (%rax),%edi
call   1030 <umask@plt>
mov    %rbx,%rdi
pop    %rbx
jmp    1040 <mkstemp@plt>

LLVM IR (-O0):
@S_IWGRP = global i32 0
@S_IWOTH = global i32 0
define i32 @ltr_int_open_tmp_file(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i32, i32* @S_IWGRP
%4 = load i32, i32* @S_IWOTH
%5 = or i32 %3, %4
%6 = call i32 @umask(i32 %5)
%7 = load i8*, i8** %2
%8 = call i32 @mkstemp(i8* %7)
ret i32 %8
}

LLVM IR (-O2):
@S_IWGRP = global i32 0
@S_IWOTH = global i32 0
define i32 @ltr_int_open_tmp_file(i8* %0) {
%2 = load i32, i32* @S_IWGRP
%3 = load i32, i32* @S_IWOTH
%4 = or i32 %3, %2
%5 = tail call i32 @umask(i32 %4)
%6 = tail call i32 @mkstemp(i8* %0)
ret i32 %6
}
int test_imm_F7int8_mem(signed char *val) {
  return ((*val) & (0xF7 << 0)) ? -20 : -40;
}


x86 assembly (clang, -O0):
<test_imm_F7int8_mem>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movsbl (%rax),%edx
and    $0xf7,%edx
mov    $0xffffffd8,%eax
mov    $0xffffffec,%ecx
cmp    $0x0,%edx
cmovne %ecx,%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @test_imm_F7int8_mem(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = and i8 %2, -9
%4 = icmp eq i8 %3, 0
%5 = select i1 %4, i32 -40, i32 -20
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ assert(int);
int pv_size(void **);
void *ptr_vector_last(void **v) {
  assert(v != NULL && pv_size(v) > 0);
  return v[pv_size(v) - 1];
}


x86 assembly (clang, -O0):
<ptr_vector_last>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
xor    %eax,%eax
cmpq   $0x0,-0x8(%rbp)
mov    %al,-0x9(%rbp)
je     114e <ptr_vector_last+0x2e>
mov    -0x8(%rbp),%rdi
call   1030 <pv_size@plt>
cmp    $0x0,%eax
setg   %al
mov    %al,-0x9(%rbp)
mov    -0x9(%rbp),%al
and    $0x1,%al
movzbl %al,%edi
call   1040 <assert@plt>
mov    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <pv_size@plt>
mov    %eax,%ecx
mov    -0x18(%rbp),%rax
sub    $0x1,%ecx
movslq %ecx,%rcx
mov    (%rax,%rcx,8),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ptr_vector_last>:
push   %rbx
mov    %rdi,%rbx
test   %rdi,%rdi
je     113b <ptr_vector_last+0x1b>
mov    %rbx,%rdi
call   1030 <pv_size@plt>
xor    %edi,%edi
test   %eax,%eax
setg   %dil
jmp    113d <ptr_vector_last+0x1d>
xor    %edi,%edi
call   1040 <assert@plt>
mov    %rbx,%rdi
call   1030 <pv_size@plt>
cltq
mov    -0x8(%rbx,%rax,8),%rax
pop    %rbx
ret

LLVM IR (-O0):
define i8* @ptr_vector_last(i8** %0) {
%2 = alloca i8**
store i8** %0, i8*** %2
%3 = load i8**, i8*** %2
%4 = icmp ne i8** %3, null
br i1 %4, label %5, label %9
5: ; preds = %1
%6 = load i8**, i8*** %2
%7 = call i32 @pv_size(i8** %6)
%8 = icmp sgt i32 %7, 0
br label %9
9: ; preds = %5, %1
%10 = phi i1 [ false, %1 ], [ %8, %5 ]
%11 = zext i1 %10 to i32
%12 = call i32 @assert(i32 %11)
%13 = load i8**, i8*** %2
%14 = load i8**, i8*** %2
%15 = call i32 @pv_size(i8** %14)
%16 = sub nsw i32 %15, 1
%17 = sext i32 %16 to i64
%18 = getelementptr inbounds i8*, i8** %13, i64 %17
%19 = load i8*, i8** %18
ret i8* %19
}

LLVM IR (-O2):
define i8* @ptr_vector_last(i8** %0) {
%2 = icmp eq i8** %0, null
br i1 %2, label %7, label %3
3: ; preds = %1
%4 = tail call i32 @pv_size(i8** %0)
%5 = icmp sgt i32 %4, 0
%6 = zext i1 %5 to i32
br label %7
7: ; preds = %3, %1
%8 = phi i32 [ 0, %1 ], [ %6, %3 ]
%9 = tail call i32 @assert(i32 %8)
%10 = tail call i32 @pv_size(i8** %0)
%11 = add nsw i32 %10, -1
%12 = sext i32 %11 to i64
%13 = getelementptr inbounds i8*, i8** %0, i64 %12
%14 = load i8*, i8** %13
ret i8* %14
}
/* Variables and functions */
float _log1pf(float);
float log1pf(float x) { return _log1pf(x); }


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

x86 assembly (clang, -O2):
<log1pf>:
jmp    1030 <_log1pf@plt>

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

LLVM IR (-O2):
define float @log1pf(float %0) {
%2 = tail call float @_log1pf(float %0)
ret float %2
}
int member(int *t, int size, int x) {
  for (int i = 0; i < size; i++) {
    if (t[i] == x)
      return 1;
  }
  return 0;
}


x86 assembly (clang, -O0):
<member>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    %esi,-0x14(%rbp)
mov    %edx,-0x18(%rbp)
movl   $0x0,-0x1c(%rbp)
mov    -0x1c(%rbp),%eax
cmp    -0x14(%rbp),%eax
jge    1154 <member+0x54>
mov    -0x10(%rbp),%rax
movslq -0x1c(%rbp),%rcx
mov    (%rax,%rcx,4),%eax
cmp    -0x18(%rbp),%eax
jne    1141 <member+0x41>
movl   $0x1,-0x4(%rbp)
jmp    115b <member+0x5b>
jmp    1146 <member+0x46>
mov    -0x1c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x1c(%rbp)
jmp    1115 <member+0x15>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<member>:
test   %esi,%esi
jle    113a <member+0x3a>
mov    $0x1,%eax
cmp    %edx,(%rdi)
je     1139 <member+0x39>
mov    %esi,%ecx
mov    $0x1,%eax
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
mov    %rax,%rsi
cmp    %rax,%rcx
je     1131 <member+0x31>
lea    0x1(%rsi),%rax
cmp    %edx,(%rdi,%rsi,4)
jne    1120 <member+0x20>
xor    %eax,%eax
cmp    %rcx,%rsi
setb   %al
ret
xor    %eax,%eax
ret

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

LLVM IR (-O2):
define i32 @member(i32* nocapture %0, i32 %1, i32 %2) {
%4 = icmp sgt i32 %1, 0
br i1 %4, label %5, label %21
5: ; preds = %3
%6 = zext i32 %1 to i64
%7 = zext i32 %1 to i64
%8 = load i32, i32* %0
%9 = icmp eq i32 %8, %2
br i1 %9, label %21, label %10
10: ; preds = %5, %13
%11 = phi i64 [ %17, %13 ], [ 1, %5 ]
%12 = icmp eq i64 %11, %7
br i1 %12, label %18, label %13
13: ; preds = %10
%14 = getelementptr inbounds i32, i32* %0, i64 %11
%15 = load i32, i32* %14
%16 = icmp eq i32 %15, %2
%17 = add nuw nsw i64 %11, 1
br i1 %16, label %18, label %10
18: ; preds = %10, %13
%19 = icmp ult i64 %11, %6
%20 = zext i1 %19 to i32
br label %21
21: ; preds = %18, %5, %3
%22 = phi i32 [ 0, %3 ], [ 1, %5 ], [ %20, %18 ]
ret i32 %22
}
int test_imm_66int16_reg(short val) {
  return ((val) & (0x66 << 0)) ? -20 : -40;
}


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

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

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

LLVM IR (-O2):
define i32 @test_imm_66int16_reg(i16 signext %0) {
%2 = and i16 %0, 102
%3 = icmp eq i16 %2, 0
%4 = select i1 %3, i32 -40, i32 -20
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ ChooseYourCat_chooseForPlayer(int);
void p1_confirm() { ChooseYourCat_chooseForPlayer(false); }


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

x86 assembly (clang, -O2):
<p1_confirm>:
xor    %edi,%edi
jmp    1030 <ChooseYourCat_chooseForPlayer@plt>

LLVM IR (-O0):
define void @p1_confirm() {
%1 = call i32 @ChooseYourCat_chooseForPlayer(i32 0)
ret void
}

LLVM IR (-O2):
define void @p1_confirm() {
%1 = tail call i32 @ChooseYourCat_chooseForPlayer(i32 0)
ret void
}