xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ CStrings__check_len(int);
void CStrings__truncate(char *str, int len) {
  if ((len < 0) || (len > 8 * 1024)) {
    CStrings__check_len(len);
    str[0] = 0;
  } else
    str[len] = 0;
}


x86 assembly (clang, -O0):
<CStrings__truncate>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
cmpl   $0x0,-0xc(%rbp)
jl     1136 <CStrings__truncate+0x26>
cmpl   $0x2000,-0xc(%rbp)
jle    114a <CStrings__truncate+0x3a>
mov    -0xc(%rbp),%edi
call   1030 <CStrings__check_len@plt>
mov    -0x8(%rbp),%rax
movb   $0x0,(%rax)
jmp    1156 <CStrings__truncate+0x46>
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
movb   $0x0,(%rax,%rcx,1)
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<CStrings__truncate>:
push   %rbx
mov    %rdi,%rbx
cmp    $0x2001,%esi
jb     1125 <CStrings__truncate+0x15>
mov    %esi,%edi
call   1030 <CStrings__check_len@plt>
jmp    112a <CStrings__truncate+0x1a>
mov    %esi,%eax
add    %rax,%rbx
movb   $0x0,(%rbx)
pop    %rbx
ret

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

LLVM IR (-O2):
define void @CStrings__truncate(i8* nocapture writeonly %0, i32 %1) {
%3 = icmp ugt i32 %1, 8192
br i1 %3, label %4, label %6
4: ; preds = %2
%5 = tail call i32 @CStrings__check_len(i32 %1)
br label %9
6: ; preds = %2
%7 = zext i32 %1 to i64
%8 = getelementptr inbounds i8, i8* %0, i64 %7
br label %9
9: ; preds = %6, %4
%10 = phi i8* [ %8, %6 ], [ %0, %4 ]
store i8 0, i8* %10
ret void
}
void av_grow_packet() {}


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

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

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

LLVM IR (-O2):
define void @av_grow_packet() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ sleep(int);
void tarea_uno() { sleep(2); }


x86 assembly (clang, -O0):
<tarea_uno>:
push   %rbp
mov    %rsp,%rbp
mov    $0x2,%edi
call   1030 <sleep@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<tarea_uno>:
mov    $0x2,%edi
jmp    1030 <sleep@plt>

LLVM IR (-O0):
define void @tarea_uno() {
%1 = call i32 @sleep(i32 2)
ret void
}

LLVM IR (-O2):
define void @tarea_uno() {
%1 = tail call i32 @sleep(i32 2)
ret void
}
line(x0, y0, x1, y1) int x0, y0, x1, y1;
{
  move(x0, y0);
  cont(x1, y1);
}


x86 assembly (clang, -O0):
<line>:
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    $0x0,%al
call   1040 <move@plt>
mov    -0x10(%rbp),%edi
mov    -0x14(%rbp),%esi
mov    $0x0,%al
call   1030 <cont@plt>
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<line>:
push   %rbp
push   %rbx
push   %rax
mov    %ecx,%ebx
mov    %edx,%ebp
xor    %eax,%eax
call   1040 <move@plt>
mov    %ebp,%edi
mov    %ebx,%esi
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    1030 <cont@plt>

LLVM IR (-O0):
define i32 @line(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 = call i32 (i32, i32, ...) bitcast (i32 (...)* @move to i32 (i32, i32, ...)*)(i32 %10, i32 %11)
%13 = load i32, i32* %8
%14 = load i32, i32* %9
%15 = call i32 (i32, i32, ...) bitcast (i32 (...)* @cont to i32 (i32, i32, ...)*)(i32 %13, i32 %14)
%16 = load i32, i32* %5
ret i32 %16
}

LLVM IR (-O2):
define i32 @line(i32 %0, i32 %1, i32 %2, i32 %3) {
%5 = tail call i32 (i32, i32, ...) bitcast (i32 (...)* @move to i32 (i32, i32, ...)*)(i32 %0, i32 %1)
%6 = tail call i32 (i32, i32, ...) bitcast (i32 (...)* @cont to i32 (i32, i32, ...)*)(i32 %2, i32 %3)
ret i32 undef
}
/* Type definitions */
struct NamedFIFO {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ CallBack1(int, struct NamedFIFO **);
int /*<<< orphan*/ CheckRunningInMainThread(char *);
void MarkFIFOUpdated(struct NamedFIFO **fifo) {
  if (!CheckRunningInMainThread("MarkFIFOUpdated"))
    return;
  CallBack1(68, fifo);
}


x86 assembly (clang, -O0):
<MarkFIFOUpdated>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
lea    0xecd(%rip),%rdi
call   1040 <CheckRunningInMainThread@plt>
cmp    $0x0,%eax
jne    1146 <MarkFIFOUpdated+0x26>
jmp    1154 <MarkFIFOUpdated+0x34>
mov    -0x8(%rbp),%rsi
mov    $0x44,%edi
call   1030 <CallBack1@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<MarkFIFOUpdated>:
push   %rbx
mov    %rdi,%rbx
lea    0xed5(%rip),%rdi
call   1040 <CheckRunningInMainThread@plt>
test   %eax,%eax
je     1142 <MarkFIFOUpdated+0x22>
mov    $0x44,%edi
mov    %rbx,%rsi
pop    %rbx
jmp    1030 <CallBack1@plt>
pop    %rbx
ret

LLVM IR (-O0):
%struct.NamedFIFO = type { i32 }
@.str = [16 x i8] c"MarkFIFOUpdated\00"
define void @MarkFIFOUpdated(%struct.NamedFIFO** %0) {
%2 = alloca %struct.NamedFIFO**
store %struct.NamedFIFO** %0, %struct.NamedFIFO*** %2
%3 = call i32 @CheckRunningInMainThread(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0))
%4 = icmp ne i32 %3, 0
br i1 %4, label %6, label %5
5: ; preds = %1
br label %9
6: ; preds = %1
%7 = load %struct.NamedFIFO**, %struct.NamedFIFO*** %2
%8 = call i32 @CallBack1(i32 68, %struct.NamedFIFO** %7)
br label %9
9: ; preds = %6, %5
ret void
}

LLVM IR (-O2):
%struct.NamedFIFO = type { i32 }
@.str = [16 x i8] c"MarkFIFOUpdated\00"
define void @MarkFIFOUpdated(%struct.NamedFIFO** %0) {
%2 = tail call i32 @CheckRunningInMainThread(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0))
%3 = icmp eq i32 %2, 0
br i1 %3, label %6, label %4
4: ; preds = %1
%5 = tail call i32 @CallBack1(i32 68, %struct.NamedFIFO** %0)
br label %6
6: ; preds = %1, %4
ret void
}
/* Variables and functions */
int /*<<< orphan*/ VIM_SIF_I2cReadByte(unsigned char, unsigned char *);
void SensorGetReg_OM6802(unsigned char uAddr, unsigned short *uVal) {
  VIM_SIF_I2cReadByte((unsigned char)uAddr, (unsigned char *)uVal);
}


x86 assembly (clang, -O0):
<SensorGetReg_OM6802>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %dil,%al
mov    %al,-0x1(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x1(%rbp),%al
mov    -0x10(%rbp),%rsi
movzbl %al,%edi
call   1030 <VIM_SIF_I2cReadByte@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<SensorGetReg_OM6802>:
jmp    1030 <VIM_SIF_I2cReadByte@plt>

LLVM IR (-O0):
define void @SensorGetReg_OM6802(i8 zeroext %0, i16* %1) {
%3 = alloca i8
%4 = alloca i16*
store i8 %0, i8* %3
store i16* %1, i16** %4
%5 = load i8, i8* %3
%6 = load i16*, i16** %4
%7 = bitcast i16* %6 to i8*
%8 = call i32 @VIM_SIF_I2cReadByte(i8 zeroext %5, i8* %7)
ret void
}

LLVM IR (-O2):
define void @SensorGetReg_OM6802(i8 zeroext %0, i16* %1) {
%3 = bitcast i16* %1 to i8*
%4 = tail call i32 @VIM_SIF_I2cReadByte(i8 zeroext %0, i8* %3)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ test_population_copy();
int /*<<< orphan*/ test_population_create();
int /*<<< orphan*/ test_population_next_generation();
void run_population_tests() {
  test_population_create();
  test_population_copy();
  test_population_next_generation();
}


x86 assembly (clang, -O0):
<run_population_tests>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1040 <test_population_create@plt>
mov    $0x0,%al
call   1030 <test_population_copy@plt>
mov    $0x0,%al
call   1050 <test_population_next_generation@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<run_population_tests>:
push   %rax
xor    %eax,%eax
call   1040 <test_population_create@plt>
xor    %eax,%eax
call   1030 <test_population_copy@plt>
xor    %eax,%eax
pop    %rcx
jmp    1050 <test_population_next_generation@plt>

LLVM IR (-O0):
define void @run_population_tests() {
%1 = call i32 (...) @test_population_create()
%2 = call i32 (...) @test_population_copy()
%3 = call i32 (...) @test_population_next_generation()
ret void
}

LLVM IR (-O2):
define void @run_population_tests() {
%1 = tail call i32 (...) @test_population_create()
%2 = tail call i32 (...) @test_population_copy()
%3 = tail call i32 (...) @test_population_next_generation()
ret void
}
long long int Lsub(long long int x, long long int y) { return x - y; }


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

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

LLVM IR (-O0):
define i64 @Lsub(i64 %0, i64 %1) {
%3 = alloca i64
%4 = alloca i64
store i64 %0, i64* %3
store i64 %1, i64* %4
%5 = load i64, i64* %3
%6 = load i64, i64* %4
%7 = sub nsw i64 %5, %6
ret i64 %7
}

LLVM IR (-O2):
define i64 @Lsub(i64 %0, i64 %1) {
%3 = sub nsw i64 %0, %1
ret i64 %3
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char);
int /*<<< orphan*/ scanf(char *, char *);
int main(int argc, char *argv[]) {
  char a;
  scanf("%c", &a);
  printf("%c", a - 32);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
lea    0xec3(%rip),%rdi
lea    -0x11(%rbp),%rsi
call   1040 <scanf@plt>
movsbl -0x11(%rbp),%eax
sub    $0x20,%eax
lea    0xeac(%rip),%rdi
movsbl %al,%esi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x10,%rsp
lea    0xed4(%rip),%rbx
lea    0xf(%rsp),%rsi
mov    %rbx,%rdi
call   1040 <scanf@plt>
mov    0xf(%rsp),%al
add    $0xe0,%al
movsbl %al,%esi
mov    %rbx,%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@.str = [3 x i8] c"%c\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i8
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%7 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* %6)
%8 = load i8, i8* %6
%9 = sext i8 %8 to i32
%10 = sub nsw i32 %9, 32
%11 = trunc i32 %10 to i8
%12 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8 signext %11)
ret i32 0
}

LLVM IR (-O2):
@.str = [3 x i8] c"%c\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = alloca i8
%4 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* %3)
%5 = load i8, i8* %3
%6 = add i8 %5, -32
%7 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8 signext %6)
ret i32 0
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int psi_get_uint32_be(unsigned char *, int /*<<< orphan*/);
scalar_t__ psi_read_ofs(int /*<<< orphan*/ *, int /*<<< orphan*/,
                        unsigned char *, int);
int psi_probe_psi_fp(FILE *fp) {
  unsigned char buf[4];
  if (psi_read_ofs(fp, 0, buf, 4)) {
    return (0);
  }
  if (psi_get_uint32_be(buf, 0) != 0x50534920) {
    return (0);
  }
  return (1);
}


x86 assembly (clang, -O0):
<psi_probe_psi_fp>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
lea    -0x14(%rbp),%rdx
xor    %esi,%esi
mov    $0x4,%ecx
call   1030 <psi_read_ofs@plt>
cmp    $0x0,%rax
je     1156 <psi_probe_psi_fp+0x36>
movl   $0x0,-0x4(%rbp)
jmp    117f <psi_probe_psi_fp+0x5f>
lea    -0x14(%rbp),%rdi
xor    %esi,%esi
call   1040 <psi_get_uint32_be@plt>
cmp    $0x50534920,%eax
je     1178 <psi_probe_psi_fp+0x58>
movl   $0x0,-0x4(%rbp)
jmp    117f <psi_probe_psi_fp+0x5f>
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<psi_probe_psi_fp>:
push   %rbx
sub    $0x10,%rsp
xor    %ebx,%ebx
lea    0xc(%rsp),%rdx
xor    %esi,%esi
mov    $0x4,%ecx
call   1030 <psi_read_ofs@plt>
test   %rax,%rax
jne    1153 <psi_probe_psi_fp+0x33>
lea    0xc(%rsp),%rdi
xor    %esi,%esi
call   1040 <psi_get_uint32_be@plt>
xor    %ebx,%ebx
cmp    $0x50534920,%eax
sete   %bl
mov    %ebx,%eax
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
define i32 @psi_probe_psi_fp(i32* %0) {
%2 = alloca i32
%3 = alloca i32*
%4 = alloca [4 x i8]
store i32* %0, i32** %3
%5 = load i32*, i32** %3
%6 = getelementptr inbounds [4 x i8], [4 x i8]* %4, i64 0, i64 0
%7 = call i64 @psi_read_ofs(i32* %5, i32 0, i8* %6, i32 4)
%8 = icmp ne i64 %7, 0
br i1 %8, label %9, label %10
9: ; preds = %1
store i32 0, i32* %2
br label %16
10: ; preds = %1
%11 = getelementptr inbounds [4 x i8], [4 x i8]* %4, i64 0, i64 0
%12 = call i32 @psi_get_uint32_be(i8* %11, i32 0)
%13 = icmp ne i32 %12, 1347635488
br i1 %13, label %14, label %15
14: ; preds = %10
store i32 0, i32* %2
br label %16
15: ; preds = %10
store i32 1, i32* %2
br label %16
16: ; preds = %15, %14, %9
%17 = load i32, i32* %2
ret i32 %17
}

LLVM IR (-O2):
define i32 @psi_probe_psi_fp(i32* %0) {
%2 = alloca [4 x i8]
%3 = getelementptr inbounds [4 x i8], [4 x i8]* %2, i64 0, i64 0
%4 = call i64 @psi_read_ofs(i32* %0, i32 0, i8* %3, i32 4)
%5 = icmp eq i64 %4, 0
br i1 %5, label %6, label %10
6: ; preds = %1
%7 = call i32 @psi_get_uint32_be(i8* %3, i32 0)
%8 = icmp eq i32 %7, 1347635488
%9 = zext i1 %8 to i32
br label %10
10: ; preds = %6, %1
%11 = phi i32 [ 0, %1 ], [ %9, %6 ]
ret i32 %11
}
void f(int n, int v[n][n]) { f(n - 1, v); }


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

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

LLVM IR (-O0):
define void @f(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 = zext i32 %5 to i64
%7 = load i32, i32* %3
%8 = zext i32 %7 to i64
%9 = load i32, i32* %3
%10 = sub nsw i32 %9, 1
%11 = load i32*, i32** %4
ret void
}

LLVM IR (-O2):
define void @f(i32 %0, i32* nocapture %1) {
br label %3
3: ; preds = %3, %2
br label %3
}
void dialog_render() {}


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

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

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

LLVM IR (-O2):
define void @dialog_render() {
ret void
}
void dbg_dump_lpt_info(struct ubifs_info *c) { return; }


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

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

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

LLVM IR (-O2):
%struct.ubifs_info = type opaque
define void @dbg_dump_lpt_info(%struct.ubifs_info* nocapture %0) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
int main() {
  printf("%d\n", 23);
  return 23;
}


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

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

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

LLVM IR (-O2):
@.str = [4 x i8] c"%d\0A\00"
define i32 @main() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 23)
ret i32 23
}
/* Variables and functions */
scalar_t__ is_in(int, char *);
scalar_t__ isalpha(int);
int is_initial(int c) { return isalpha(c) || is_in(c, "!$%&*/:<=>?^_~"); }


x86 assembly (clang, -O0):
<is_initial>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
call   1040 <isalpha@plt>
mov    %rax,%rcx
mov    $0x1,%al
cmp    $0x0,%rcx
mov    %al,-0x5(%rbp)
jne    115e <is_initial+0x3e>
mov    -0x4(%rbp),%edi
lea    0xeb1(%rip),%rsi
call   1030 <is_in@plt>
cmp    $0x0,%rax
setne  %al
mov    %al,-0x5(%rbp)
mov    -0x5(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<is_initial>:
push   %rbx
mov    %edi,%ebx
call   1040 <isalpha@plt>
mov    %rax,%rcx
mov    $0x1,%eax
test   %rcx,%rcx
je     1137 <is_initial+0x17>
pop    %rbx
ret
lea    0xec2(%rip),%rsi
mov    %ebx,%edi
call   1030 <is_in@plt>
mov    %rax,%rcx
xor    %eax,%eax
test   %rcx,%rcx
setne  %al
pop    %rbx
ret

LLVM IR (-O0):
@.str = [15 x i8] c"!$%&*/:<=>?^_~\00"
define i32 @is_initial(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = call i64 @isalpha(i32 %3)
%5 = icmp ne i64 %4, 0
br i1 %5, label %10, label %6
6: ; preds = %1
%7 = load i32, i32* %2
%8 = call i64 @is_in(i32 %7, i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0))
%9 = icmp ne i64 %8, 0
br label %10
10: ; preds = %6, %1
%11 = phi i1 [ true, %1 ], [ %9, %6 ]
%12 = zext i1 %11 to i32
ret i32 %12
}

LLVM IR (-O2):
@.str = [15 x i8] c"!$%&*/:<=>?^_~\00"
define i32 @is_initial(i32 %0) {
%2 = tail call i64 @isalpha(i32 %0)
%3 = icmp eq i64 %2, 0
br i1 %3, label %4, label %8
4: ; preds = %1
%5 = tail call i64 @is_in(i32 %0, i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0))
%6 = icmp ne i64 %5, 0
%7 = zext i1 %6 to i32
br label %8
8: ; preds = %4, %1
%9 = phi i32 [ 1, %1 ], [ %7, %4 ]
ret i32 %9
}
/* Variables and functions */
int inner_weak_a(int);
int outer_weak(int a) { return inner_weak_a(a); }


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

x86 assembly (clang, -O2):
<outer_weak>:
jmp    1030 <inner_weak_a@plt>

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

LLVM IR (-O2):
define i32 @outer_weak(i32 %0) {
%2 = tail call i32 @inner_weak_a(i32 %0)
ret i32 %2
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ ispunct(int);
void t_ispunct_0x64() {
  Assert_real((ispunct(100) == 0),
              "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
              "2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/"
              "dg/z88dk/test/suites/ctype/test_ispunct.c",
              505, ("ispunct should be 0 for d"));
}


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

x86 assembly (clang, -O2):
<t_ispunct_0x64>:
push   %rax
mov    $0x64,%edi
call   1030 <ispunct@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf66(%rip),%rcx
mov    $0x1f9,%edx
pop    %rax
jmp    1040 <Assert_real@plt>

LLVM IR (-O0):
@.str = [168 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/ctype/test_ispunct.c\00"
@.str.1 = [26 x i8] c"ispunct should be 0 for d\00"
define void @t_ispunct_0x64() {
%1 = call i64 @ispunct(i32 100)
%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 505, 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_ispunct.c\00"
@.str.1 = [26 x i8] c"ispunct should be 0 for d\00"
define void @t_ispunct_0x64() {
%1 = tail call i64 @ispunct(i32 100)
%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 505, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Variables and functions */
scalar_t__ get_line(char *, int /*<<< orphan*/);
int /*<<< orphan*/ printf(char *, char *);
int /*<<< orphan*/ stdin;
main() {
  char buffer[100][100];
  while (get_line(buffer[99], stdin))
    printf("%s\n", buffer[99]);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x2720,%rsp
movl   $0x0,-0x4(%rbp)
lea    -0x2720(%rbp),%rdi
add    $0x26ac,%rdi
mov    0x2ea1(%rip),%rax
mov    (%rax),%esi
call   1030 <get_line@plt>
cmp    $0x0,%rax
je     1177 <main+0x57>
lea    -0x2720(%rbp),%rsi
add    $0x26ac,%rsi
lea    0xe93(%rip),%rdi
call   1040 <printf@plt>
jmp    1132 <main+0x12>
xor    %eax,%eax
add    $0x2720,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r15
push   %r14
push   %rbx
sub    $0x2710,%rsp
lea    0x26ac(%rsp),%rbx
mov    0x2ead(%rip),%r15
mov    (%r15),%esi
mov    %rbx,%rdi
call   1030 <get_line@plt>
test   %rax,%rax
je     117b <main+0x5b>
lea    0xeae(%rip),%r14
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
mov    %r14,%rdi
mov    %rbx,%rsi
call   1040 <printf@plt>
mov    (%r15),%esi
mov    %rbx,%rdi
call   1030 <get_line@plt>
test   %rax,%rax
jne    1160 <main+0x40>
xor    %eax,%eax
add    $0x2710,%rsp
pop    %rbx
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
@stdin = global i32 0
@.str = [4 x i8] c"%s\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca [100 x [100 x i8]]
store i32 0, i32* %1
br label %3
3: ; preds = %9, %0
%4 = getelementptr inbounds [100 x [100 x i8]], [100 x [100 x i8]]* %2, i64 0, i64 99
%5 = getelementptr inbounds [100 x i8], [100 x i8]* %4, i64 0, i64 0
%6 = load i32, i32* @stdin
%7 = call i64 @get_line(i8* %5, i32 %6)
%8 = icmp ne i64 %7, 0
br i1 %8, label %9, label %13
9: ; preds = %3
%10 = getelementptr inbounds [100 x [100 x i8]], [100 x [100 x i8]]* %2, i64 0, i64 99
%11 = getelementptr inbounds [100 x i8], [100 x i8]* %10, i64 0, i64 0
%12 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %11)
br label %3
13: ; preds = %3
ret i32 0
}

LLVM IR (-O2):
@stdin = global i32 0
@.str = [4 x i8] c"%s\0A\00"
define i32 @main() {
%1 = alloca [100 x [100 x i8]]
%2 = getelementptr inbounds [100 x [100 x i8]], [100 x [100 x i8]]* %1, i64 0, i64 0, i64 0
%3 = getelementptr inbounds [100 x [100 x i8]], [100 x [100 x i8]]* %1, i64 0, i64 99, i64 0
%4 = load i32, i32* @stdin
%5 = call i64 @get_line(i8* %3, i32 %4)
%6 = icmp eq i64 %5, 0
br i1 %6, label %12, label %7
7: ; preds = %0, %7
%8 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %3)
%9 = load i32, i32* @stdin
%10 = call i64 @get_line(i8* %3, i32 %9)
%11 = icmp eq i64 %10, 0
br i1 %11, label %12, label %7
12: ; preds = %7, %0
ret i32 0
}
/* Variables and functions */
unsigned long ULONG_MAX;
unsigned isqrt(unsigned long n) {
  unsigned long x;
  if (n < ULONG_MAX)
    x = n;
  else
    x = n - 1;
  for (;;) {
    unsigned long y = (x + n / x) / 2;
    if (y >= x)
      return x;
    x = y;
  }
}


x86 assembly (clang, -O0):
<isqrt>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    0x2ec5(%rip),%rcx
cmp    (%rcx),%rax
jae    1129 <isqrt+0x29>
mov    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
jmp    1135 <isqrt+0x35>
mov    -0x8(%rbp),%rax
sub    $0x1,%rax
mov    %rax,-0x10(%rbp)
jmp    113a <isqrt+0x3a>
mov    -0x10(%rbp),%rax
mov    %rax,-0x20(%rbp)
mov    -0x8(%rbp),%rax
xor    %ecx,%ecx
mov    %ecx,%edx
divq   -0x10(%rbp)
mov    %rax,%rcx
mov    -0x20(%rbp),%rax
add    %rcx,%rax
shr    $0x1,%rax
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rax
cmp    -0x10(%rbp),%rax
jb     1174 <isqrt+0x74>
mov    -0x10(%rbp),%rax
pop    %rbp
ret
mov    -0x18(%rbp),%rax
mov    %rax,-0x10(%rbp)
jmp    113a <isqrt+0x3a>

x86 assembly (clang, -O2):
<isqrt>:
mov    0x2ed1(%rip),%rax
cmp    (%rax),%rdi
mov    %rdi,%rax
adc    $0xffffffffffffffff,%rax
jmp    1133 <isqrt+0x33>
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
mov    %rdi,%rax
xor    %edx,%edx
div    %rcx
add    %rcx,%rax
shr    %rax
cmp    %rcx,%rax
jae    114a <isqrt+0x4a>
mov    %rax,%rcx
mov    %rdi,%rax
or     %rcx,%rax
shr    $0x20,%rax
jne    1120 <isqrt+0x20>
mov    %edi,%eax
xor    %edx,%edx
div    %ecx
jmp    1128 <isqrt+0x28>
mov    %ecx,%eax
ret

LLVM IR (-O0):
@ULONG_MAX = global i64 0
define i32 @isqrt(i64 %0) {
%2 = alloca i64
%3 = alloca i64
%4 = alloca i64
store i64 %0, i64* %2
%5 = load i64, i64* %2
%6 = load i64, i64* @ULONG_MAX
%7 = icmp ult i64 %5, %6
br i1 %7, label %8, label %10
8: ; preds = %1
%9 = load i64, i64* %2
store i64 %9, i64* %3
br label %13
10: ; preds = %1
%11 = load i64, i64* %2
%12 = sub i64 %11, 1
store i64 %12, i64* %3
br label %13
13: ; preds = %10, %8
br label %14
14: ; preds = %27, %13
%15 = load i64, i64* %3
%16 = load i64, i64* %2
%17 = load i64, i64* %3
%18 = udiv i64 %16, %17
%19 = add i64 %15, %18
%20 = udiv i64 %19, 2
store i64 %20, i64* %4
%21 = load i64, i64* %4
%22 = load i64, i64* %3
%23 = icmp uge i64 %21, %22
br i1 %23, label %24, label %27
24: ; preds = %14
%25 = load i64, i64* %3
%26 = trunc i64 %25 to i32
ret i32 %26
27: ; preds = %14
%28 = load i64, i64* %4
store i64 %28, i64* %3
br label %14
}

LLVM IR (-O2):
@ULONG_MAX = global i64 0
define i32 @isqrt(i64 %0) {
%2 = load i64, i64* @ULONG_MAX
%3 = icmp ule i64 %2, %0
%4 = sext i1 %3 to i64
%5 = add i64 %4, %0
br label %6
6: ; preds = %6, %1
%7 = phi i64 [ %5, %1 ], [ %10, %6 ]
%8 = udiv i64 %0, %7
%9 = add i64 %8, %7
%10 = lshr i64 %9, 1
%11 = icmp ult i64 %10, %7
br i1 %11, label %6, label %12
12: ; preds = %6
%13 = trunc i64 %7 to i32
ret i32 %13
}
unsigned int IntPriorityThresholdGet(void) {
  return ((*((volatile unsigned int *)((0x48200000) + (0x68)))) &
          (0x000000FFu));
}


x86 assembly (clang, -O0):
<IntPriorityThresholdGet>:
push   %rbp
mov    %rsp,%rbp
mov    $0x48200068,%eax
mov    (%rax),%eax
and    $0xff,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<IntPriorityThresholdGet>:
mov    0x48200068,%eax
movzbl %al,%eax
ret

LLVM IR (-O0):
define i32 @IntPriorityThresholdGet() {
%1 = load volatile i32, i32* inttoptr (i64 1210056808 to i32*)
%2 = and i32 %1, 255
ret i32 %2
}

LLVM IR (-O2):
define i32 @IntPriorityThresholdGet() {
%1 = load volatile i32, i32* inttoptr (i64 1210056808 to i32*)
%2 = and i32 %1, 255
ret i32 %2
}
/* Variables and functions */
int __VERIFIER_nondet_int();
int main() {
  int x, y;
  x = __VERIFIER_nondet_int();
  y = __VERIFIER_nondet_int();
  if (x > 0) {
    while (x > y) {
      y = y + x;
    }
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x0,%al
call   1030 <__VERIFIER_nondet_int@plt>
mov    %eax,-0x8(%rbp)
mov    $0x0,%al
call   1030 <__VERIFIER_nondet_int@plt>
mov    %eax,-0xc(%rbp)
cmpl   $0x0,-0x8(%rbp)
jle    1161 <main+0x51>
jmp    1142 <main+0x32>
mov    -0x8(%rbp),%eax
cmp    -0xc(%rbp),%eax
jle    115c <main+0x4c>
mov    -0xc(%rbp),%eax
add    -0x8(%rbp),%eax
mov    %eax,-0xc(%rbp)
jmp    1142 <main+0x32>
jmp    1161 <main+0x51>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
store i32 0, i32* %1
%4 = call i32 (...) @__VERIFIER_nondet_int()
store i32 %4, i32* %2
%5 = call i32 (...) @__VERIFIER_nondet_int()
store i32 %5, i32* %3
%6 = load i32, i32* %2
%7 = icmp sgt i32 %6, 0
br i1 %7, label %8, label %18
8: ; preds = %0
br label %9
9: ; preds = %13, %8
%10 = load i32, i32* %2
%11 = load i32, i32* %3
%12 = icmp sgt i32 %10, %11
br i1 %12, label %13, label %17
13: ; preds = %9
%14 = load i32, i32* %3
%15 = load i32, i32* %2
%16 = add nsw i32 %14, %15
store i32 %16, i32* %3
br label %9
17: ; preds = %9
br label %18
18: ; preds = %17, %0
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @__VERIFIER_nondet_int()
%2 = tail call i32 (...) @__VERIFIER_nondet_int()
ret i32 0
}
void init_rcu_head_on_stack(struct rcu_head *head) {}


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

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

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

LLVM IR (-O2):
%struct.rcu_head = type opaque
define void @init_rcu_head_on_stack(%struct.rcu_head* nocapture %0) {
ret void
}
unsigned int ltq_lxfreq_getfreq_khz(unsigned int cpu) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @ltq_lxfreq_getfreq_khz(i32 %0) {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ *PHYSFS_getRealDir(char const *);
int PHYSFS_exists(const char *fname) {
  return (PHYSFS_getRealDir(fname) != NULL);
}


x86 assembly (clang, -O0):
<PHYSFS_exists>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <PHYSFS_getRealDir@plt>
cmp    $0x0,%rax
setne  %al
and    $0x1,%al
movzbl %al,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<PHYSFS_exists>:
push   %rax
call   1030 <PHYSFS_getRealDir@plt>
xor    %ecx,%ecx
test   %rax,%rax
setne  %cl
mov    %ecx,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @PHYSFS_exists(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32* @PHYSFS_getRealDir(i8* %3)
%5 = icmp ne i32* %4, null
%6 = zext i1 %5 to i32
ret i32 %6
}

LLVM IR (-O2):
define i32 @PHYSFS_exists(i8* %0) {
%2 = tail call i32* @PHYSFS_getRealDir(i8* %0)
%3 = icmp ne i32* %2, null
%4 = zext i1 %3 to i32
ret i32 %4
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ cspace(int /*<<< orphan*/ *);
void wspace(FILE *out) { cspace(out); }


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

x86 assembly (clang, -O2):
<wspace>:
jmp    1030 <cspace@plt>

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

LLVM IR (-O2):
define void @wspace(i32* %0) {
%2 = tail call i32 @cspace(i32* %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
int /*<<< orphan*/ stderr;
char *bundle_get_contents(char *path) {
  fprintf(stderr, "WARN: no bundled sources, need to run script/bundle-c\n");
  return NULL;
}


x86 assembly (clang, -O0):
<bundle_get_contents>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    0x2ebd(%rip),%rax
mov    (%rax),%edi
lea    0xed4(%rip),%rsi
call   1030 <fprintf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<bundle_get_contents>:
push   %rax
mov    0x2ec8(%rip),%rax
mov    (%rax),%edi
lea    0xedf(%rip),%rsi
call   1030 <fprintf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@stderr = global i32 0
@.str = [55 x i8] c"WARN: no bundled sources, need to run script/bundle-c\0A\00"
define i8* @bundle_get_contents(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i32, i32* @stderr
%4 = call i32 @fprintf(i32 %3, i8* getelementptr inbounds ([55 x i8], [55 x i8]* @.str, i64 0, i64 0))
ret i8* null
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [55 x i8] c"WARN: no bundled sources, need to run script/bundle-c\0A\00"
define noalias i8* @bundle_get_contents(i8* nocapture readnone %0) {
%2 = load i32, i32* @stderr
%3 = tail call i32 @fprintf(i32 %2, i8* getelementptr inbounds ([55 x i8], [55 x i8]* @.str, i64 0, i64 0))
ret i8* null
}
/* Type definitions */
typedef int /*<<< orphan*/ in_addr_t;

/* Variables and functions */
in_addr_t get_gateway() {
  in_addr_t gateway = 0;
  return gateway;
}


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

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

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

LLVM IR (-O2):
define i32 @get_gateway() {
ret i32 0
}
int test_imm_50int8_reg(signed char val) {
  return ((val) & (-0x50 << 0)) ? -20 : -40;
}


x86 assembly (clang, -O0):
<test_imm_50int8_reg>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movsbl -0x1(%rbp),%edx
and    $0xffffffb0,%edx
mov    $0xffffffd8,%eax
mov    $0xffffffec,%ecx
cmp    $0x0,%edx
cmovne %ecx,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @test_imm_50int8_reg(i8 signext %0) {
%2 = alloca i8
store i8 %0, i8* %2
%3 = load i8, i8* %2
%4 = sext i8 %3 to i32
%5 = and i32 %4, -80
%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_50int8_reg(i8 signext %0) {
%2 = and i8 %0, -80
%3 = icmp eq i8 %2, 0
%4 = select i1 %3, i32 -40, i32 -20
ret i32 %4
}
int main(void) {
  int x = 0;
  int *p = &x;
  5 % *p;
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
lea    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
xor    %eax,%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @main() {
ret i32 0
}
void delet(int *a, unsigned *n, unsigned pos) {
  unsigned i;
  --pos;
  for (i = pos; i < *n; ++i)
    a[i] = a[i + 1];
  --*n;
}


x86 assembly (clang, -O0):
<delet>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    -0x14(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
mov    %eax,-0x18(%rbp)
mov    -0x18(%rbp),%eax
mov    -0x10(%rbp),%rcx
cmp    (%rcx),%eax
jae    1154 <delet+0x54>
mov    -0x8(%rbp),%rax
mov    -0x18(%rbp),%ecx
add    $0x1,%ecx
mov    %ecx,%ecx
mov    (%rax,%rcx,4),%edx
mov    -0x8(%rbp),%rax
mov    -0x18(%rbp),%ecx
mov    %edx,(%rax,%rcx,4)
mov    -0x18(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x18(%rbp)
jmp    111e <delet+0x1e>
mov    -0x10(%rbp),%rax
mov    (%rax),%ecx
add    $0xffffffff,%ecx
mov    %ecx,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<delet>:
add    $0xffffffff,%edx
mov    (%rsi),%eax
cmp    %eax,%edx
jae    1125 <delet+0x25>
mov    %edx,%ecx
nopl   0x0(%rax,%rax,1)
mov    0x4(%rdi,%rcx,4),%eax
mov    %eax,(%rdi,%rcx,4)
lea    0x1(%rcx),%rdx
mov    (%rsi),%eax
mov    %rdx,%rcx
cmp    %rax,%rdx
jb     1110 <delet+0x10>
add    $0xffffffff,%eax
mov    %eax,(%rsi)
ret

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

LLVM IR (-O2):
define void @delet(i32* nocapture %0, i32* nocapture %1, i32 %2) {
%4 = add i32 %2, -1
%5 = load i32, i32* %1
%6 = icmp ult i32 %4, %5
br i1 %6, label %7, label %18
7: ; preds = %3
%8 = zext i32 %4 to i64
br label %9
9: ; preds = %7, %9
%10 = phi i64 [ %8, %7 ], [ %11, %9 ]
%11 = add nuw nsw i64 %10, 1
%12 = getelementptr inbounds i32, i32* %0, i64 %11
%13 = load i32, i32* %12
%14 = getelementptr inbounds i32, i32* %0, i64 %10
store i32 %13, i32* %14
%15 = load i32, i32* %1
%16 = zext i32 %15 to i64
%17 = icmp ult i64 %11, %16
br i1 %17, label %9, label %18
18: ; preds = %9, %3
%19 = phi i32 [ %5, %3 ], [ %15, %9 ]
%20 = add i32 %19, -1
store i32 %20, i32* %1
ret void
}
/* Variables and functions */
int /*<<< orphan*/ _glp_lib_free_env();
void glp_free_env(void) {
  _glp_lib_free_env();
  return;
}


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

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

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

LLVM IR (-O2):
define void @glp_free_env() {
%1 = tail call i32 (...) @_glp_lib_free_env()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ memset(char *, char, int);
void dessert(char *buffer) {
  memset(buffer, ' ', 80 * 24);
  buffer[80 * 24] = '\0';
}


x86 assembly (clang, -O0):
<dessert>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
mov    $0x20,%esi
mov    $0x780,%edx
call   1030 <memset@plt>
mov    -0x8(%rbp),%rax
movb   $0x0,0x780(%rax)
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<dessert>:
push   %rbx
mov    %rdi,%rbx
mov    $0x20,%esi
mov    $0x780,%edx
call   1030 <memset@plt>
movb   $0x0,0x780(%rbx)
pop    %rbx
ret

LLVM IR (-O0):
define void @dessert(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 @memset(i8* %3, i8 signext 32, i32 1920)
%5 = load i8*, i8** %2
%6 = getelementptr inbounds i8, i8* %5, i64 1920
store i8 0, i8* %6
ret void
}

LLVM IR (-O2):
define void @dessert(i8* %0) {
%2 = tail call i32 @memset(i8* %0, i8 signext 32, i32 1920)
%3 = getelementptr inbounds i8, i8* %0, i64 1920
store i8 0, i8* %3
ret void
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ isxdigit(int);
void t_isxdigit_0xc9() {
  Assert_real((isxdigit(201) == 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",
              1010, ("isxdigit should be 0 for 0xc9"));
}


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

x86 assembly (clang, -O2):
<t_isxdigit_0xc9>:
push   %rax
mov    $0xc9,%edi
call   1030 <isxdigit@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf67(%rip),%rcx
mov    $0x3f2,%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 0xc9\00"
define void @t_isxdigit_0xc9() {
%1 = call i64 @isxdigit(i32 201)
%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 1010, 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 0xc9\00"
define void @t_isxdigit_0xc9() {
%1 = tail call i64 @isxdigit(i32 201)
%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 1010, i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ islower(int);
void t_islower_0x3e() {
  Assert_real((islower(62) == 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_islower.c",
              315, ("islower should be 0 for >"));
}


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

x86 assembly (clang, -O2):
<t_islower_0x3e>:
push   %rax
mov    $0x3e,%edi
call   1030 <islower@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf66(%rip),%rcx
mov    $0x13b,%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_islower.c\00"
@.str.1 = [26 x i8] c"islower should be 0 for >\00"
define void @t_islower_0x3e() {
%1 = call i64 @islower(i32 62)
%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 315, 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_islower.c\00"
@.str.1 = [26 x i8] c"islower should be 0 for >\00"
define void @t_islower_0x3e() {
%1 = tail call i64 @islower(i32 62)
%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 315, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.1, i64 0, i64 0))
ret void
}
__attribute__((no, noclone)) signed char fn5(long int x, long int y, int *ovf) {
  signed char res;
  x = (x & 63) + (0x7f / 4);
  y = (y & 3) + 5;
  *ovf = __builtin_mul_overflow(x, y, &res);
  return res;
}


x86 assembly (clang, -O0):
<fn5>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x8(%rbp),%rax
and    $0x3f,%rax
add    $0x1f,%rax
mov    %rax,-0x8(%rbp)
mov    -0x10(%rbp),%rax
and    $0x3,%rax
add    $0x5,%rax
mov    %rax,-0x10(%rbp)
mov    -0x8(%rbp),%rdx
imul   -0x10(%rbp),%rdx
seto   %al
mov    %dl,%cl
movsbq %cl,%rsi
cmp    %rsi,%rdx
setne  %dl
or     %dl,%al
mov    %cl,-0x19(%rbp)
and    $0x1,%al
movzbl %al,%ecx
mov    -0x18(%rbp),%rax
mov    %ecx,(%rax)
movsbl -0x19(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<fn5>:
and    $0x3f,%edi
lea    0x1f(%rdi),%ecx
and    $0x3,%esi
lea    0x5(%rsi),%eax
imul   %ecx,%eax
movl   $0x1,(%rdx)
ret

LLVM IR (-O0):
define signext i8 @fn5(i64 %0, i64 %1, i32* %2) {
%4 = alloca i64
%5 = alloca i64
%6 = alloca i32*
%7 = alloca i8
store i64 %0, i64* %4
store i64 %1, i64* %5
store i32* %2, i32** %6
%8 = load i64, i64* %4
%9 = and i64 %8, 63
%10 = add nsw i64 %9, 31
store i64 %10, i64* %4
%11 = load i64, i64* %5
%12 = and i64 %11, 3
%13 = add nsw i64 %12, 5
store i64 %13, i64* %5
%14 = load i64, i64* %4
%15 = load i64, i64* %5
%16 = call { i64, i1 } @llvm.smul.with.overflow.i64(i64 %14, i64 %15)
%17 = extractvalue { i64, i1 } %16, 1
%18 = extractvalue { i64, i1 } %16, 0
%19 = trunc i64 %18 to i8
%20 = sext i8 %19 to i64
%21 = icmp ne i64 %18, %20
%22 = or i1 %17, %21
store i8 %19, i8* %7
%23 = zext i1 %22 to i32
%24 = load i32*, i32** %6
store i32 %23, i32* %24
%25 = load i8, i8* %7
ret i8 %25
}

LLVM IR (-O2):
define signext i8 @fn5(i64 %0, i64 %1, i32* nocapture writeonly %2) {
%4 = and i64 %0, 63
%5 = add nuw nsw i64 %4, 31
%6 = and i64 %1, 3
%7 = add nuw nsw i64 %6, 5
%8 = mul nuw nsw i64 %7, %5
%9 = trunc i64 %8 to i8
store i32 1, i32* %2
ret i8 %9
}
void setBinaryIO() {}


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

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

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

LLVM IR (-O2):
define void @setBinaryIO() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char *);
int /*<<< orphan*/ stdout;
void evalerror(char *msg) {
  fprintf(stdout, "Error: Symbolic evaluation error: %s\n", msg);
  exit(1);
}


x86 assembly (clang, -O0):
<evalerror>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    0x2ead(%rip),%rax
mov    (%rax),%edi
mov    -0x8(%rbp),%rdx
lea    0xec0(%rip),%rsi
call   1030 <fprintf@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<evalerror>:
push   %rax
mov    %rdi,%rdx
mov    0x2eb5(%rip),%rax
mov    (%rax),%edi
lea    0xecc(%rip),%rsi
call   1030 <fprintf@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@stdout = global i32 0
@.str = [38 x i8] c"Error: Symbolic evaluation error: %s\0A\00"
define void @evalerror(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i32, i32* @stdout
%4 = load i8*, i8** %2
%5 = call i32 @fprintf(i32 %3, i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str, i64 0, i64 0), i8* %4)
%6 = call i32 @exit(i32 1)
unreachable
}

LLVM IR (-O2):
@stdout = global i32 0
@.str = [38 x i8] c"Error: Symbolic evaluation error: %s\0A\00"
define void @evalerror(i8* %0) {
%2 = load i32, i32* @stdout
%3 = tail call i32 @fprintf(i32 %2, i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str, i64 0, i64 0), i8* %0)
%4 = tail call i32 @exit(i32 1)
unreachable
}
unsigned long f5(unsigned long x, unsigned int y) {
  return x & ((1UL << y) - 1);
}


x86 assembly (clang, -O0):
<f5>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rax
mov    -0xc(%rbp),%ecx
mov    $0x1,%edx
shl    %cl,%rdx
mov    %rdx,%rcx
sub    $0x1,%rcx
and    %rcx,%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<f5>:
mov    %esi,%ecx
mov    $0xffffffffffffffff,%rax
shl    %cl,%rax
not    %rax
and    %rdi,%rax
ret

LLVM IR (-O0):
define i64 @f5(i64 %0, i32 %1) {
%3 = alloca i64
%4 = alloca i32
store i64 %0, i64* %3
store i32 %1, i32* %4
%5 = load i64, i64* %3
%6 = load i32, i32* %4
%7 = zext i32 %6 to i64
%8 = shl i64 1, %7
%9 = sub i64 %8, 1
%10 = and i64 %5, %9
ret i64 %10
}

LLVM IR (-O2):
define i64 @f5(i64 %0, i32 %1) {
%3 = zext i32 %1 to i64
%4 = shl nsw i64 -1, %3
%5 = xor i64 %4, -1
%6 = and i64 %5, %0
ret i64 %6
}