xunge/DecIR huggingface dataset:
/* Variables and functions */
scalar_t__ get_part_name_by_dsname(char *, char **);
char *fdasd_partition_type(char *dsname) {
  char *name = NULL;
  if (get_part_name_by_dsname(dsname, &name))
    name = "unknown";
  return name;
}


x86 assembly (clang, -O0):
<fdasd_partition_type>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
movq   $0x0,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
lea    -0x10(%rbp),%rsi
call   1030 <get_part_name_by_dsname@plt>
cmp    $0x0,%rax
je     1146 <fdasd_partition_type+0x36>
lea    0xebe(%rip),%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fdasd_partition_type>:
push   %rax
movq   $0x0,(%rsp)
mov    %rsp,%rsi
call   1030 <get_part_name_by_dsname@plt>
test   %rax,%rax
jne    112c <fdasd_partition_type+0x1c>
mov    (%rsp),%rax
pop    %rcx
ret
lea    0xecd(%rip),%rax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [8 x i8] c"unknown\00"
define i8* @fdasd_partition_type(i8* %0) {
%2 = alloca i8*
%3 = alloca i8*
store i8* %0, i8** %2
store i8* null, i8** %3
%4 = load i8*, i8** %2
%5 = call i64 @get_part_name_by_dsname(i8* %4, i8** %3)
%6 = icmp ne i64 %5, 0
br i1 %6, label %7, label %8
7: ; preds = %1
store i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i8** %3
br label %8
8: ; preds = %7, %1
%9 = load i8*, i8** %3
ret i8* %9
}

LLVM IR (-O2):
@.str = [8 x i8] c"unknown\00"
define i8* @fdasd_partition_type(i8* %0) {
%2 = alloca i8*
%3 = bitcast i8** %2 to i8*
store i8* null, i8** %2
%4 = call i64 @get_part_name_by_dsname(i8* %0, i8** %2)
%5 = icmp eq i64 %4, 0
%6 = load i8*, i8** %2
%7 = select i1 %5, i8* %6, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0)
ret i8* %7
}
/* Variables and functions */
int genrand_int32();
int /*<<< orphan*/ init_genrand(int);
int /*<<< orphan*/ printf(char *, int);
int main(void) {
  init_genrand(123456);
  int i;
  for (i = 0; i < 1000; ++i) {
    printf("%u\n", genrand_int32());
  }
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x1e240,%edi
call   1050 <init_genrand@plt>
movl   $0x0,-0x8(%rbp)
cmpl   $0x3e8,-0x8(%rbp)
jge    1180 <main+0x50>
mov    $0x0,%al
call   1030 <genrand_int32@plt>
mov    %eax,%esi
lea    0xe93(%rip),%rdi
call   1040 <printf@plt>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1150 <main+0x20>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %rbx
push   %rax
mov    $0x1e240,%edi
call   1050 <init_genrand@plt>
mov    $0x3e8,%ebp
lea    0xeb7(%rip),%rbx
nopl   0x0(%rax)
xor    %eax,%eax
call   1030 <genrand_int32@plt>
mov    %rbx,%rdi
mov    %eax,%esi
call   1040 <printf@plt>
add    $0xffffffff,%ebp
jne    1150 <main+0x20>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
@.str = [4 x i8] c"%u\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
store i32 0, i32* %1
%3 = call i32 @init_genrand(i32 123456)
store i32 0, i32* %2
br label %4
4: ; preds = %10, %0
%5 = load i32, i32* %2
%6 = icmp slt i32 %5, 1000
br i1 %6, label %7, label %13
7: ; preds = %4
%8 = call i32 (...) @genrand_int32()
%9 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %8)
br label %10
10: ; preds = %7
%11 = load i32, i32* %2
%12 = add nsw i32 %11, 1
store i32 %12, i32* %2
br label %4
13: ; preds = %4
%14 = load i32, i32* %1
ret i32 %14
}

LLVM IR (-O2):
@.str = [4 x i8] c"%u\0A\00"
define i32 @main() {
%1 = tail call i32 @init_genrand(i32 123456)
br label %2
2: ; preds = %0, %2
%3 = phi i32 [ 0, %0 ], [ %6, %2 ]
%4 = tail call i32 (...) @genrand_int32()
%5 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %4)
%6 = add nuw nsw i32 %3, 1
%7 = icmp eq i32 %6, 1000
br i1 %7, label %8, label %2
8: ; preds = %2
ret i32 0
}
int http_trace(int connection, const char *host) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @http_trace(i32 %0, i8* nocapture readnone %1) {
ret i32 0
}
int security_task_setrlimit(unsigned int resource, struct rlimit *new_rlim) {
  return 0;
}


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

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

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

LLVM IR (-O2):
%struct.rlimit = type opaque
define i32 @security_task_setrlimit(i32 %0, %struct.rlimit* nocapture readnone %1) {
ret i32 0
}
/* Variables and functions */
int EXIT_SUCCESS;
int /*<<< orphan*/ init_locale();
int /*<<< orphan*/ pair_roundrobin();
int /*<<< orphan*/ parse_args(int, char **);
int main(int argc, char **argv) {
  init_locale();
  parse_args(argc, argv);
  pair_roundrobin();
  return EXIT_SUCCESS;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    $0x0,%al
call   1050 <init_locale@plt>
mov    -0x8(%rbp),%edi
mov    -0x10(%rbp),%rsi
call   1030 <parse_args@plt>
mov    $0x0,%al
call   1040 <pair_roundrobin@plt>
mov    0x2e79(%rip),%rax
mov    (%rax),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %rbx
push   %rax
mov    %rsi,%rbx
mov    %edi,%ebp
xor    %eax,%eax
call   1050 <init_locale@plt>
mov    %ebp,%edi
mov    %rbx,%rsi
call   1030 <parse_args@plt>
xor    %eax,%eax
call   1040 <pair_roundrobin@plt>
mov    0x2e89(%rip),%rax
mov    (%rax),%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
@EXIT_SUCCESS = global i32 0
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%6 = call i32 (...) @init_locale()
%7 = load i32, i32* %4
%8 = load i8**, i8*** %5
%9 = call i32 @parse_args(i32 %7, i8** %8)
%10 = call i32 (...) @pair_roundrobin()
%11 = load i32, i32* @EXIT_SUCCESS
ret i32 %11
}

LLVM IR (-O2):
@EXIT_SUCCESS = global i32 0
define i32 @main(i32 %0, i8** %1) {
%3 = tail call i32 (...) @init_locale()
%4 = tail call i32 @parse_args(i32 %0, i8** %1)
%5 = tail call i32 (...) @pair_roundrobin()
%6 = load i32, i32* @EXIT_SUCCESS
ret i32 %6
}
void vde_chain_nm3_incref(void) {}


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

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

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

LLVM IR (-O2):
define void @vde_chain_nm3_incref() {
ret void
}
int test_imm_D0uint16_reg(unsigned short val) {
  return ((val) & (-0xD0 << 0)) ? -20 : -40;
}


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

x86 assembly (clang, -O2):
<test_imm_D0uint16_reg>:
test   $0xff30,%edi
mov    $0xffffffd8,%ecx
mov    $0xffffffec,%eax
cmove  %ecx,%eax
ret

LLVM IR (-O0):
define i32 @test_imm_D0uint16_reg(i16 zeroext %0) {
%2 = alloca i16
store i16 %0, i16* %2
%3 = load i16, i16* %2
%4 = zext i16 %3 to i32
%5 = and i32 %4, -208
%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_D0uint16_reg(i16 zeroext %0) {
%2 = and i16 %0, -208
%3 = icmp eq i16 %2, 0
%4 = select i1 %3, i32 -40, i32 -20
ret i32 %4
}
/* Type definitions */
struct pipeline {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ closePipeline(struct pipeline *);
int groupLeaderWait(struct pipeline *);
int pipelineWait(struct pipeline *pl) {
  closePipeline(pl);
  return groupLeaderWait(pl);
}


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

x86 assembly (clang, -O2):
<pipelineWait>:
push   %rbx
mov    %rdi,%rbx
call   1030 <closePipeline@plt>
mov    %rbx,%rdi
pop    %rbx
jmp    1040 <groupLeaderWait@plt>

LLVM IR (-O0):
%struct.pipeline = type { i32 }
define i32 @pipelineWait(%struct.pipeline* %0) {
%2 = alloca %struct.pipeline*
store %struct.pipeline* %0, %struct.pipeline** %2
%3 = load %struct.pipeline*, %struct.pipeline** %2
%4 = call i32 @closePipeline(%struct.pipeline* %3)
%5 = load %struct.pipeline*, %struct.pipeline** %2
%6 = call i32 @groupLeaderWait(%struct.pipeline* %5)
ret i32 %6
}

LLVM IR (-O2):
%struct.pipeline = type { i32 }
define i32 @pipelineWait(%struct.pipeline* %0) {
%2 = tail call i32 @closePipeline(%struct.pipeline* %0)
%3 = tail call i32 @groupLeaderWait(%struct.pipeline* %0)
ret i32 %3
}
/* Type definitions */
typedef char *uint32_t;

/* Variables and functions */
uint32_t ByteReverse(uint32_t value) {
  __asm__("bswap %0" : "=r"(value) : "0"(value));
  return value;
}


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

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

LLVM IR (-O0):
define i8* @ByteReverse(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i8* asm "bswap $0", "=r,0,~{dirflag},~{fpsr},~{flags}"(i8* %3)
store i8* %4, i8** %2
%5 = load i8*, i8** %2
ret i8* %5
}

LLVM IR (-O2):
define i8* @ByteReverse(i8* readnone %0) {
%2 = tail call i8* asm "bswap $0", "=r,0,~{dirflag},~{fpsr},~{flags}"(i8* %0)
ret i8* %2
}
char *firstwhite(s)
char *s;
{
  char *s1, *s2;
  s1 = strchr(s, ' ');
  s2 = strchr(s, '\t');
  if (s1) {
    if (s2)
      return (s1 < s2) ? s1 : s2;
    else
      return s1;
  } else
    return s2;
}


x86 assembly (clang, -O0):
<firstwhite>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
mov    $0x20,%esi
call   1030 <strchr@plt>
mov    %rax,-0x18(%rbp)
mov    -0x10(%rbp),%rdi
mov    $0x9,%esi
call   1030 <strchr@plt>
mov    %rax,-0x20(%rbp)
cmpq   $0x0,-0x18(%rbp)
je     1193 <firstwhite+0x83>
cmpq   $0x0,-0x20(%rbp)
je     1186 <firstwhite+0x76>
mov    -0x18(%rbp),%rax
cmp    -0x20(%rbp),%rax
jae    1171 <firstwhite+0x61>
mov    -0x18(%rbp),%rax
mov    %rax,-0x28(%rbp)
jmp    1179 <firstwhite+0x69>
mov    -0x20(%rbp),%rax
mov    %rax,-0x28(%rbp)
mov    -0x28(%rbp),%rax
mov    %rax,-0x8(%rbp)
jmp    119b <firstwhite+0x8b>
mov    -0x18(%rbp),%rax
mov    %rax,-0x8(%rbp)
jmp    119b <firstwhite+0x8b>
mov    -0x20(%rbp),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<firstwhite>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%rbx
mov    $0x20,%esi
call   1030 <strchr@plt>
mov    %rax,%r14
mov    %rbx,%rdi
mov    $0x9,%esi
call   1030 <strchr@plt>
test   %r14,%r14
je     1147 <firstwhite+0x37>
test   %rax,%rax
je     1144 <firstwhite+0x34>
cmp    %rax,%r14
cmovb  %r14,%rax
jmp    1147 <firstwhite+0x37>
mov    %r14,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define i8* @firstwhite(i8* %0) {
%2 = alloca i8*
%3 = alloca i8*
%4 = alloca i8*
%5 = alloca i8*
store i8* %0, i8** %3
%6 = load i8*, i8** %3
%7 = call i8* @strchr(i8* %6, i32 32)
store i8* %7, i8** %4
%8 = load i8*, i8** %3
%9 = call i8* @strchr(i8* %8, i32 9)
store i8* %9, i8** %5
%10 = load i8*, i8** %4
%11 = icmp ne i8* %10, null
br i1 %11, label %12, label %27
12: ; preds = %1
%13 = load i8*, i8** %5
%14 = icmp ne i8* %13, null
br i1 %14, label %15, label %25
15: ; preds = %12
%16 = load i8*, i8** %4
%17 = load i8*, i8** %5
%18 = icmp ult i8* %16, %17
br i1 %18, label %19, label %21
19: ; preds = %15
%20 = load i8*, i8** %4
br label %23
21: ; preds = %15
%22 = load i8*, i8** %5
br label %23
23: ; preds = %21, %19
%24 = phi i8* [ %20, %19 ], [ %22, %21 ]
store i8* %24, i8** %2
br label %29
25: ; preds = %12
%26 = load i8*, i8** %4
store i8* %26, i8** %2
br label %29
27: ; preds = %1
%28 = load i8*, i8** %5
store i8* %28, i8** %2
br label %29
29: ; preds = %27, %25, %23
%30 = load i8*, i8** %2
ret i8* %30
}

LLVM IR (-O2):
define i8* @firstwhite(i8* %0) {
%2 = tail call i8* @strchr(i8* dereferenceable(1) %0, i32 32)
%3 = tail call i8* @strchr(i8* dereferenceable(1) %0, i32 9)
%4 = icmp eq i8* %2, null
br i1 %4, label %10, label %5
5: ; preds = %1
%6 = icmp eq i8* %3, null
br i1 %6, label %10, label %7
7: ; preds = %5
%8 = icmp ult i8* %2, %3
%9 = select i1 %8, i8* %2, i8* %3
br label %10
10: ; preds = %1, %5, %7
%11 = phi i8* [ %9, %7 ], [ %2, %5 ], [ %3, %1 ]
ret i8* %11
}
unsigned int my_strlen(char *String, int length) {
  int temp = 0;
  for (temp = 0; temp < length; temp++) {
    if (*(String + temp) == '\0') {
      break;
    }
  }
  return temp;
}


x86 assembly (clang, -O0):
<my_strlen>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
movl   $0x0,-0x10(%rbp)
movl   $0x0,-0x10(%rbp)
mov    -0x10(%rbp),%eax
cmp    -0xc(%rbp),%eax
jge    1152 <my_strlen+0x52>
mov    -0x8(%rbp),%rax
movslq -0x10(%rbp),%rcx
movsbl (%rax,%rcx,1),%eax
cmp    $0x0,%eax
jne    113f <my_strlen+0x3f>
jmp    1152 <my_strlen+0x52>
jmp    1144 <my_strlen+0x44>
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    1119 <my_strlen+0x19>
mov    -0x10(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<my_strlen>:
test   %esi,%esi
jle    1122 <my_strlen+0x22>
mov    %esi,%ecx
xor    %eax,%eax
nopl   0x0(%rax,%rax,1)
cmpb   $0x0,(%rdi,%rax,1)
je     1121 <my_strlen+0x21>
add    $0x1,%rax
cmp    %rax,%rcx
jne    1110 <my_strlen+0x10>
mov    %ecx,%eax
ret
xor    %eax,%eax
ret

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

LLVM IR (-O2):
define i32 @my_strlen(i8* nocapture %0, i32 %1) {
%3 = icmp sgt i32 %1, 0
br i1 %3, label %4, label %16
4: ; preds = %2
%5 = zext i32 %1 to i64
br label %6
6: ; preds = %4, %11
%7 = phi i64 [ 0, %4 ], [ %12, %11 ]
%8 = getelementptr inbounds i8, i8* %0, i64 %7
%9 = load i8, i8* %8
%10 = icmp eq i8 %9, 0
br i1 %10, label %14, label %11
11: ; preds = %6
%12 = add nuw nsw i64 %7, 1
%13 = icmp eq i64 %12, %5
br i1 %13, label %16, label %6
14: ; preds = %6
%15 = trunc i64 %7 to i32
br label %16
16: ; preds = %11, %14, %2
%17 = phi i32 [ 0, %2 ], [ %15, %14 ], [ %1, %11 ]
ret i32 %17
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ isbdigit(int);
void t_isbdigit_0x62() {
  Assert_real((isbdigit(98) == 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_isbdigit.c",
              495, ("isbdigit should be 0 for b"));
}


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

x86 assembly (clang, -O2):
<t_isbdigit_0x62>:
push   %rax
mov    $0x62,%edi
call   1040 <isbdigit@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf67(%rip),%rcx
mov    $0x1ef,%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_isbdigit.c\00"
@.str.1 = [27 x i8] c"isbdigit should be 0 for b\00"
define void @t_isbdigit_0x62() {
%1 = call i64 @isbdigit(i32 98)
%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 495, i8* getelementptr inbounds ([27 x i8], [27 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_isbdigit.c\00"
@.str.1 = [27 x i8] c"isbdigit should be 0 for b\00"
define void @t_isbdigit_0x62() {
%1 = tail call i64 @isbdigit(i32 98)
%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 495, i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Type definitions */
typedef void (*fn_ptr)(void *);

/* Variables and functions */
int __cxa_atexit(void (*)(void *), int /*<<< orphan*/ *, int /*<<< orphan*/ *);
int atexit(void (*f)(void)) {
  typedef void (*fn_ptr)(void *);
  return __cxa_atexit((fn_ptr)f, NULL, NULL);
}


x86 assembly (clang, -O0):
<atexit>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
xor    %eax,%eax
mov    %eax,%edx
mov    %rdx,%rsi
call   1030 <__cxa_atexit@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<atexit>:
xor    %esi,%esi
xor    %edx,%edx
jmp    1030 <__cxa_atexit@plt>

LLVM IR (-O0):
define i32 @atexit(void ()* %0) {
%2 = alloca void ()*
store void ()* %0, void ()** %2
%3 = load void ()*, void ()** %2
%4 = bitcast void ()* %3 to void (i8*)*
%5 = call i32 @__cxa_atexit(void (i8*)* %4, i32* null, i32* null)
ret i32 %5
}

LLVM IR (-O2):
define i32 @atexit(void ()* %0) {
%2 = bitcast void ()* %0 to void (i8*)*
%3 = tail call i32 @__cxa_atexit(void (i8*)* %2, i32* null, i32* null)
ret i32 %3
}
/* Variables and functions */
int chroot(char *);
int fchdir(int);
int chroot_fd(int fd) {
  if (fchdir(fd) == -1)
    return -1;
  return chroot(".");
}


x86 assembly (clang, -O0):
<chroot_fd>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
mov    -0x8(%rbp),%edi
call   1040 <fchdir@plt>
cmp    $0xffffffff,%eax
jne    1148 <chroot_fd+0x28>
movl   $0xffffffff,-0x4(%rbp)
jmp    1157 <chroot_fd+0x37>
lea    0xeb1(%rip),%rdi
call   1030 <chroot@plt>
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<chroot_fd>:
push   %rax
call   1040 <fchdir@plt>
cmp    $0xffffffff,%eax
je     1138 <chroot_fd+0x18>
lea    0xece(%rip),%rdi
pop    %rax
jmp    1030 <chroot@plt>
mov    $0xffffffff,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
@.str = [2 x i8] c".\00"
define i32 @chroot_fd(i32 %0) {
%2 = tail call i32 @fchdir(i32 %0)
%3 = icmp eq i32 %2, -1
br i1 %3, label %6, label %4
4: ; preds = %1
%5 = tail call i32 @chroot(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
br label %6
6: ; preds = %1, %4
%7 = phi i32 [ %5, %4 ], [ -1, %1 ]
ret i32 %7
}
/* Variables and functions */
scalar_t__ rand();
double drand48(void) { return (double)rand(); }


x86 assembly (clang, -O0):
<drand48>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1030 <rand@plt>
cvtsi2sd %rax,%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<drand48>:
push   %rax
xor    %eax,%eax
call   1030 <rand@plt>
cvtsi2sd %rax,%xmm0
pop    %rax
ret

LLVM IR (-O0):
define double @drand48() {
%1 = call i64 (...) @rand()
%2 = sitofp i64 %1 to double
ret double %2
}

LLVM IR (-O2):
define double @drand48() {
%1 = tail call i64 (...) @rand()
%2 = sitofp i64 %1 to double
ret double %2
}
/* Variables and functions */
int /*<<< orphan*/ heap_initialize(void *, int, size_t,
                                   int (*)(void const *, void const *));
int /*<<< orphan*/ heap_sort(void *, int, size_t,
                             int (*)(void const *, void const *));
void hsort(void *array, int count, size_t size,
           int (*compar)(const void *elt1, const void *elt2)) {
  void *heap = (char *)array - size;
  heap_initialize(heap, count, size, compar);
  heap_sort(heap, count, size, compar);
}


x86 assembly (clang, -O0):
<hsort>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    -0x8(%rbp),%rax
xor    %ecx,%ecx
sub    -0x18(%rbp),%rcx
add    %rcx,%rax
mov    %rax,-0x28(%rbp)
mov    -0x28(%rbp),%rdi
mov    -0xc(%rbp),%esi
mov    -0x18(%rbp),%rdx
mov    -0x20(%rbp),%rcx
call   1040 <heap_initialize@plt>
mov    -0x28(%rbp),%rdi
mov    -0xc(%rbp),%esi
mov    -0x18(%rbp),%rdx
mov    -0x20(%rbp),%rcx
call   1030 <heap_sort@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<hsort>:
push   %rbp
push   %r15
push   %r14
push   %rbx
push   %rax
mov    %rcx,%r14
mov    %rdx,%rbx
mov    %esi,%r15d
mov    %rdi,%rbp
sub    %rdx,%rbp
mov    %rbp,%rdi
call   1040 <heap_initialize@plt>
mov    %rbp,%rdi
mov    %r15d,%esi
mov    %rbx,%rdx
mov    %r14,%rcx
add    $0x8,%rsp
pop    %rbx
pop    %r14
pop    %r15
pop    %rbp
jmp    1030 <heap_sort@plt>

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

LLVM IR (-O2):
define void @hsort(i8* %0, i32 %1, i64 %2, i32 (i8*, i8*)* %3) {
%5 = sub i64 0, %2
%6 = getelementptr inbounds i8, i8* %0, i64 %5
%7 = tail call i32 @heap_initialize(i8* %6, i32 %1, i64 %2, i32 (i8*, i8*)* %3)
%8 = tail call i32 @heap_sort(i8* %6, i32 %1, i64 %2, i32 (i8*, i8*)* %3)
ret void
}
__attribute__((weak)) void midi_clock_ext_tempo_changed(void) {}


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

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

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

LLVM IR (-O2):
define weak void @midi_clock_ext_tempo_changed() {
ret void
}
int do_823() { return 823; }


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

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

LLVM IR (-O0):
define i32 @do_823() {
ret i32 823
}

LLVM IR (-O2):
define i32 @do_823() {
ret i32 823
}
void Drv_GPIO_Init(void) {}


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

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

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

LLVM IR (-O2):
define void @Drv_GPIO_Init() {
ret void
}
/* Type definitions */
struct katcp_dispatch {
  int dummy;
};

/* Variables and functions */
int run_config_server_katcp(struct katcp_dispatch *, int /*<<< orphan*/ *, int,
                            char *, int);
int run_server_katcp(struct katcp_dispatch *d, char *host, int port) {
  return run_config_server_katcp(d, NULL, 1, host, port);
}


x86 assembly (clang, -O0):
<run_server_katcp>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rcx
mov    -0x14(%rbp),%r8d
xor    %eax,%eax
mov    %eax,%esi
mov    $0x1,%edx
call   1030 <run_config_server_katcp@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<run_server_katcp>:
mov    %edx,%r8d
mov    %rsi,%rcx
xor    %esi,%esi
mov    $0x1,%edx
jmp    1030 <run_config_server_katcp@plt>

LLVM IR (-O0):
%struct.katcp_dispatch = type { i32 }
define i32 @run_server_katcp(%struct.katcp_dispatch* %0, i8* %1, i32 %2) {
%4 = alloca %struct.katcp_dispatch*
%5 = alloca i8*
%6 = alloca i32
store %struct.katcp_dispatch* %0, %struct.katcp_dispatch** %4
store i8* %1, i8** %5
store i32 %2, i32* %6
%7 = load %struct.katcp_dispatch*, %struct.katcp_dispatch** %4
%8 = load i8*, i8** %5
%9 = load i32, i32* %6
%10 = call i32 @run_config_server_katcp(%struct.katcp_dispatch* %7, i32* null, i32 1, i8* %8, i32 %9)
ret i32 %10
}

LLVM IR (-O2):
%struct.katcp_dispatch = type { i32 }
define i32 @run_server_katcp(%struct.katcp_dispatch* %0, i8* %1, i32 %2) {
%4 = tail call i32 @run_config_server_katcp(%struct.katcp_dispatch* %0, i32* null, i32 1, i8* %1, i32 %2)
ret i32 %4
}
void INT_Excep_MTU3_TGID3(void) {}


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

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

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

LLVM IR (-O2):
define void @INT_Excep_MTU3_TGID3() {
ret void
}
/* Variables and functions */
int t1_3d_init_ctxno_mag(unsigned int, int);
int t1_3d_getctxno_mag(unsigned int f, int fsvr) {
  return t1_3d_init_ctxno_mag(
      (f & ((0x00004000 | 0x00000400 | 0x00008000 | 0x00000800 | 0x00010000 |
             0x00001000 | 0x00020000 | 0x00002000 | 0x00000100) |
            (0x00400000 | 0x00040000 | 0x00800000 | 0x00080000 | 0x01000000 |
             0x00100000 | 0x02000000 | 0x00200000 | 0x00000200) |
            (0x00000010 | 0x00000001 | 0x00000020 | 0x00000002 | 0x00000040 |
             0x00000004 | 0x00000080 | 0x00000008))),
      fsvr);
}


x86 assembly (clang, -O0):
<t1_3d_getctxno_mag>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%edi
and    $0x3ffffff,%edi
mov    -0x8(%rbp),%esi
call   1030 <t1_3d_init_ctxno_mag@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<t1_3d_getctxno_mag>:
and    $0x3ffffff,%edi
jmp    1030 <t1_3d_init_ctxno_mag@plt>

LLVM IR (-O0):
define i32 @t1_3d_getctxno_mag(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 = and i32 %5, 67108863
%7 = load i32, i32* %4
%8 = call i32 @t1_3d_init_ctxno_mag(i32 %6, i32 %7)
ret i32 %8
}

LLVM IR (-O2):
define i32 @t1_3d_getctxno_mag(i32 %0, i32 %1) {
%3 = and i32 %0, 67108863
%4 = tail call i32 @t1_3d_init_ctxno_mag(i32 %3, i32 %1)
ret i32 %4
}
int fun282() { return 282; }


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

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

LLVM IR (-O0):
define i32 @fun282() {
ret i32 282
}

LLVM IR (-O2):
define i32 @fun282() {
ret i32 282
}
/* Variables and functions */
int /*<<< orphan*/ strchr(char const *, char);
char *xtrbrk(char *s, const char *tok) {
  for (; *s && !strchr(tok, *s); ++s)
    ;
  return s;
}


x86 assembly (clang, -O0):
<xtrbrk>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
movsbl (%rax),%ecx
xor    %eax,%eax
cmp    $0x0,%ecx
mov    %al,-0x11(%rbp)
je     1150 <xtrbrk+0x40>
mov    -0x10(%rbp),%rdi
mov    -0x8(%rbp),%rax
movsbl (%rax),%esi
call   1030 <strchr@plt>
cmp    $0x0,%eax
setne  %al
xor    $0xff,%al
mov    %al,-0x11(%rbp)
mov    -0x11(%rbp),%al
test   $0x1,%al
jne    1160 <xtrbrk+0x50>
jmp    1176 <xtrbrk+0x66>
jmp    1165 <xtrbrk+0x55>
mov    -0x8(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x8(%rbp)
jmp    1120 <xtrbrk+0x10>
mov    -0x8(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<xtrbrk>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%rbx
mov    (%rdi),%al
test   %al,%al
je     113b <xtrbrk+0x2b>
mov    %rsi,%r14
movsbl %al,%esi
mov    %r14,%rdi
call   1030 <strchr@plt>
test   %eax,%eax
jne    113b <xtrbrk+0x2b>
movzbl 0x1(%rbx),%eax
add    $0x1,%rbx
test   %al,%al
jne    1120 <xtrbrk+0x10>
mov    %rbx,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define i8* @xtrbrk(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
store i8* %0, i8** %3
store i8* %1, i8** %4
br label %5
5: ; preds = %20, %2
%6 = load i8*, i8** %3
%7 = load i8, i8* %6
%8 = sext i8 %7 to i32
%9 = icmp ne i32 %8, 0
br i1 %9, label %10, label %17
10: ; preds = %5
%11 = load i8*, i8** %4
%12 = load i8*, i8** %3
%13 = load i8, i8* %12
%14 = call i32 @strchr(i8* %11, i8 signext %13)
%15 = icmp ne i32 %14, 0
%16 = xor i1 %15, true
br label %17
17: ; preds = %10, %5
%18 = phi i1 [ false, %5 ], [ %16, %10 ]
br i1 %18, label %19, label %23
19: ; preds = %17
br label %20
20: ; preds = %19
%21 = load i8*, i8** %3
%22 = getelementptr inbounds i8, i8* %21, i32 1
store i8* %22, i8** %3
br label %5
23: ; preds = %17
%24 = load i8*, i8** %3
ret i8* %24
}

LLVM IR (-O2):
define i8* @xtrbrk(i8* %0, i8* %1) {
%3 = load i8, i8* %0
%4 = icmp eq i8 %3, 0
br i1 %4, label %14, label %5
5: ; preds = %2, %10
%6 = phi i8 [ %12, %10 ], [ %3, %2 ]
%7 = phi i8* [ %11, %10 ], [ %0, %2 ]
%8 = tail call i32 @strchr(i8* %1, i8 signext %6)
%9 = icmp eq i32 %8, 0
br i1 %9, label %10, label %14
10: ; preds = %5
%11 = getelementptr inbounds i8, i8* %7, i64 1
%12 = load i8, i8* %11
%13 = icmp eq i8 %12, 0
br i1 %13, label %14, label %5
14: ; preds = %5, %10, %2
%15 = phi i8* [ %0, %2 ], [ %11, %10 ], [ %7, %5 ]
ret i8* %15
}
/* Variables and functions */
int /*<<< orphan*/ assert(int);
int main() {
  unsigned long long x = 1;
  x += 1099511627776;
  assert(x == 1099511627777);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movq   $0x1,-0x10(%rbp)
movabs $0x10000000000,%rax
add    -0x10(%rbp),%rax
mov    %rax,-0x10(%rbp)
movabs $0x10000000001,%rax
cmp    %rax,-0x10(%rbp)
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <assert@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca i64
store i32 0, i32* %1
store i64 1, i64* %2
%3 = load i64, i64* %2
%4 = add i64 %3, 1099511627776
store i64 %4, i64* %2
%5 = load i64, i64* %2
%6 = icmp eq i64 %5, 1099511627777
%7 = zext i1 %6 to i32
%8 = call i32 @assert(i32 %7)
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 @assert(i32 1)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ box(int, int /*<<< orphan*/, int);
void main() { box(12, 0, 5); }


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
mov    $0xc,%edi
xor    %esi,%esi
mov    $0x5,%edx
call   1030 <box@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
mov    $0xc,%edi
xor    %esi,%esi
mov    $0x5,%edx
jmp    1030 <box@plt>

LLVM IR (-O0):
define void @main() {
%1 = call i32 @box(i32 12, i32 0, i32 5)
ret void
}

LLVM IR (-O2):
define void @main() {
%1 = tail call i32 @box(i32 12, i32 0, i32 5)
ret void
}
void set_array(char array[], int length) {
  for (int i = 0; i < length; i++) {
    array[i] = ' ';
  }
}


x86 assembly (clang, -O0):
<set_array>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
movl   $0x0,-0x10(%rbp)
mov    -0x10(%rbp),%eax
cmp    -0xc(%rbp),%eax
jge    1138 <set_array+0x38>
mov    -0x8(%rbp),%rax
movslq -0x10(%rbp),%rcx
movb   $0x20,(%rax,%rcx,1)
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    1112 <set_array+0x12>
pop    %rbp
ret

x86 assembly (clang, -O2):
<set_array>:
test   %esi,%esi
jle    1125 <set_array+0x15>
push   %rax
mov    %esi,%edx
mov    $0x20,%esi
call   1030 <memset@plt>
add    $0x8,%rsp
ret

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

LLVM IR (-O2):
define void @set_array(i8* nocapture writeonly %0, i32 %1) {
%3 = icmp sgt i32 %1, 0
br i1 %3, label %4, label %6
4: ; preds = %2
%5 = zext i32 %1 to i64
br label %6
6: ; preds = %4, %2
ret void
}
/* Variables and functions */
int /*<<< orphan*/ _SC_PAGESIZE;
int /*<<< orphan*/ printf(char *, int);
scalar_t__ sysconf(int /*<<< orphan*/);
int hlp_pagesize(void) {
  printf("%d\n", (int)sysconf(_SC_PAGESIZE));
  return 0;
}


x86 assembly (clang, -O0):
<hlp_pagesize>:
push   %rbp
mov    %rsp,%rbp
mov    0x2ebd(%rip),%rax
mov    (%rax),%edi
call   1040 <sysconf@plt>
mov    %eax,%esi
lea    0xec5(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<hlp_pagesize>:
push   %rax
mov    0x2ec0(%rip),%rax
mov    (%rax),%edi
call   1040 <sysconf@plt>
lea    0xeca(%rip),%rdi
mov    %eax,%esi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [4 x i8] c"%d\0A\00"
@_SC_PAGESIZE = global i32 0
define i32 @hlp_pagesize() {
%1 = load i32, i32* @_SC_PAGESIZE
%2 = call i64 @sysconf(i32 %1)
%3 = trunc i64 %2 to i32
%4 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %3)
ret i32 0
}

LLVM IR (-O2):
@.str = [4 x i8] c"%d\0A\00"
@_SC_PAGESIZE = global i32 0
define i32 @hlp_pagesize() {
%1 = load i32, i32* @_SC_PAGESIZE
%2 = tail call i64 @sysconf(i32 %1)
%3 = trunc i64 %2 to i32
%4 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %3)
ret i32 0
}
void goodSuffixPreprocess() {}


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

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

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

LLVM IR (-O2):
define void @goodSuffixPreprocess() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char *);
char *str_dup(char *);
int main(void) {
  char *name = str_dup("Henrik");
  printf("name: %s\n", name);
  return 0;
}


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

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

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

LLVM IR (-O2):
@.str = [7 x i8] c"Henrik\00"
@.str.1 = [10 x i8] c"name: %s\0A\00"
define i32 @main() {
%1 = tail call i8* @str_dup(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0))
%2 = tail call i32 @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.1, i64 0, i64 0), i8* %1)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ ulz_printf(char *);
void syntax(void) {
  ulz_printf("syntax: filename1 filename2\n");
  exit(1);
}


x86 assembly (clang, -O0):
<syntax>:
push   %rbp
mov    %rsp,%rbp
lea    0xed5(%rip),%rdi
call   1030 <ulz_printf@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<syntax>:
push   %rax
lea    0xed8(%rip),%rdi
call   1030 <ulz_printf@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@.str = [29 x i8] c"syntax: filename1 filename2\0A\00"
define void @syntax() {
%1 = call i32 @ulz_printf(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str, i64 0, i64 0))
%2 = call i32 @exit(i32 1)
unreachable
}

LLVM IR (-O2):
@.str = [29 x i8] c"syntax: filename1 filename2\0A\00"
define void @syntax() {
%1 = tail call i32 @ulz_printf(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str, i64 0, i64 0))
%2 = tail call i32 @exit(i32 1)
unreachable
}
int isspace(int c) { return (8 < c && c < 14) || (c == 32); }


x86 assembly (clang, -O0):
<isspace>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    $0x8,%eax
cmp    -0x4(%rbp),%eax
jge    1124 <isspace+0x24>
mov    $0x1,%al
cmpl   $0xe,-0x4(%rbp)
mov    %al,-0x5(%rbp)
jl     112e <isspace+0x2e>
cmpl   $0x20,-0x4(%rbp)
sete   %al
mov    %al,-0x5(%rbp)
mov    -0x5(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<isspace>:
lea    -0x9(%rdi),%eax
cmp    $0x5,%eax
setb   %al
cmp    $0x20,%edi
sete   %cl
or     %al,%cl
movzbl %cl,%eax
ret

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

LLVM IR (-O2):
define i32 @isspace(i32 %0) {
%2 = add i32 %0, -9
%3 = icmp ult i32 %2, 5
%4 = icmp eq i32 %0, 32
%5 = or i1 %4, %3
%6 = zext i1 %5 to i32
ret i32 %6
}
/* Variables and functions */
int /*<<< orphan*/ fprint_uhex(int, int /*<<< orphan*/);
int /*<<< orphan*/ stdout;
void print_uhex(int hex) { fprint_uhex(hex, stdout); }


x86 assembly (clang, -O0):
<print_uhex>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
mov    0x2ebb(%rip),%rax
mov    (%rax),%esi
call   1030 <fprint_uhex@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<print_uhex>:
mov    0x2ec9(%rip),%rax
mov    (%rax),%esi
jmp    1030 <fprint_uhex@plt>

LLVM IR (-O0):
@stdout = global i32 0
define void @print_uhex(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = load i32, i32* @stdout
%5 = call i32 @fprint_uhex(i32 %3, i32 %4)
ret void
}

LLVM IR (-O2):
@stdout = global i32 0
define void @print_uhex(i32 %0) {
%2 = load i32, i32* @stdout
%3 = tail call i32 @fprint_uhex(i32 %0, i32 %2)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ Msp430GpioC__6__GeneralIO__set();
void CC2420ControlP__VREN__set(void) { Msp430GpioC__6__GeneralIO__set(); }


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

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

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

LLVM IR (-O2):
define void @CC2420ControlP__VREN__set() {
%1 = tail call i32 (...) @Msp430GpioC__6__GeneralIO__set()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ __ESBMC_assert(int /*<<< orphan*/, char *);
void baz(unsigned short ignore) { __ESBMC_assert(0, "KABOOM"); }


x86 assembly (clang, -O0):
<baz>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %di,%ax
mov    %ax,-0x2(%rbp)
xor    %edi,%edi
lea    0xed8(%rip),%rsi
call   1030 <__ESBMC_assert@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<baz>:
lea    0xee9(%rip),%rsi
xor    %edi,%edi
jmp    1030 <__ESBMC_assert@plt>

LLVM IR (-O0):
@.str = [7 x i8] c"KABOOM\00"
define void @baz(i16 zeroext %0) {
%2 = alloca i16
store i16 %0, i16* %2
%3 = call i32 @__ESBMC_assert(i32 0, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [7 x i8] c"KABOOM\00"
define void @baz(i16 zeroext %0) {
%2 = tail call i32 @__ESBMC_assert(i32 0, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0))
ret void
}
int do_990() { return 990; }


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

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

LLVM IR (-O0):
define i32 @do_990() {
ret i32 990
}

LLVM IR (-O2):
define i32 @do_990() {
ret i32 990
}
int init_pkg_mallocs(void) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @init_pkg_mallocs() {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char *);
int /*<<< orphan*/ stderr;
void error(char *error) { fprintf(stderr, "%s\n", error); }


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

x86 assembly (clang, -O2):
<error>:
mov    %rdi,%rdx
mov    0x2ec6(%rip),%rax
mov    (%rax),%edi
lea    0xedd(%rip),%rsi
jmp    1030 <fprintf@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [4 x i8] c"%s\0A\00"
define void @error(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i32, i32* @stderr
%4 = load i8*, i8** %2
%5 = call i32 @fprintf(i32 %3, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %4)
ret void
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [4 x i8] c"%s\0A\00"
define void @error(i8* %0) {
%2 = load i32, i32* @stderr
%3 = tail call i32 @fprintf(i32 %2, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %0)
ret void
}
/* Type definitions */
struct timespec {
  scalar_t__ tv_sec;
  scalar_t__ tv_nsec;
};

/* Variables and functions */
int sancus_time_is_gt_zero(const struct timespec *a) {
  return (a->tv_sec > 0) && (a->tv_nsec > 0);
}


x86 assembly (clang, -O0):
<sancus_time_is_gt_zero>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rcx
xor    %eax,%eax
cmpq   $0x0,(%rcx)
mov    %al,-0x9(%rbp)
jle    112a <sancus_time_is_gt_zero+0x2a>
mov    -0x8(%rbp),%rax
cmpq   $0x0,0x8(%rax)
setg   %al
mov    %al,-0x9(%rbp)
mov    -0x9(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<sancus_time_is_gt_zero>:
cmpq   $0x0,(%rdi)
jle    1111 <sancus_time_is_gt_zero+0x11>
xor    %eax,%eax
cmpq   $0x0,0x8(%rdi)
setg   %al
ret
xor    %eax,%eax
ret

LLVM IR (-O0):
%struct.timespec = type { i64, i64 }
define i32 @sancus_time_is_gt_zero(%struct.timespec* %0) {
%2 = alloca %struct.timespec*
store %struct.timespec* %0, %struct.timespec** %2
%3 = load %struct.timespec*, %struct.timespec** %2
%4 = getelementptr inbounds %struct.timespec, %struct.timespec* %3, i32 0, i32 0
%5 = load i64, i64* %4
%6 = icmp sgt i64 %5, 0
br i1 %6, label %7, label %12
7: ; preds = %1
%8 = load %struct.timespec*, %struct.timespec** %2
%9 = getelementptr inbounds %struct.timespec, %struct.timespec* %8, i32 0, i32 1
%10 = load i64, i64* %9
%11 = icmp sgt i64 %10, 0
br label %12
12: ; preds = %7, %1
%13 = phi i1 [ false, %1 ], [ %11, %7 ]
%14 = zext i1 %13 to i32
ret i32 %14
}

LLVM IR (-O2):
%struct.timespec = type { i64, i64 }
define i32 @sancus_time_is_gt_zero(%struct.timespec* nocapture %0) {
%2 = getelementptr inbounds %struct.timespec, %struct.timespec* %0, i64 0, i32 0
%3 = load i64, i64* %2
%4 = icmp sgt i64 %3, 0
br i1 %4, label %5, label %10
5: ; preds = %1
%6 = getelementptr inbounds %struct.timespec, %struct.timespec* %0, i64 0, i32 1
%7 = load i64, i64* %6
%8 = icmp sgt i64 %7, 0
%9 = zext i1 %8 to i32
br label %10
10: ; preds = %5, %1
%11 = phi i32 [ 0, %1 ], [ %9, %5 ]
ret i32 %11
}
/* Variables and functions */
int /*<<< orphan*/ init_mask();
int /*<<< orphan*/ init_pawns();
void init_bitboard(void) {
  init_mask();
  init_pawns();
}


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

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

LLVM IR (-O0):
define void @init_bitboard() {
%1 = call i32 (...) @init_mask()
%2 = call i32 (...) @init_pawns()
ret void
}

LLVM IR (-O2):
define void @init_bitboard() {
%1 = tail call i32 (...) @init_mask()
%2 = tail call i32 (...) @init_pawns()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ assert(int);
void foo(int *pb) {
  int b = *pb;
  assert(4 <= b);
  assert(b <= 5);
}


x86 assembly (clang, -O0):
<foo>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%eax
mov    %eax,-0xc(%rbp)
mov    $0x4,%eax
cmp    -0xc(%rbp),%eax
setle  %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <assert@plt>
cmpl   $0x5,-0xc(%rbp)
setle  %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <assert@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<foo>:
push   %rbx
mov    (%rdi),%ebx
xor    %edi,%edi
cmp    $0x4,%ebx
setge  %dil
call   1030 <assert@plt>
xor    %edi,%edi
cmp    $0x6,%ebx
setl   %dil
pop    %rbx
jmp    1030 <assert@plt>

LLVM IR (-O0):
define void @foo(i32* %0) {
%2 = alloca i32*
%3 = alloca i32
store i32* %0, i32** %2
%4 = load i32*, i32** %2
%5 = load i32, i32* %4
store i32 %5, i32* %3
%6 = load i32, i32* %3
%7 = icmp sle i32 4, %6
%8 = zext i1 %7 to i32
%9 = call i32 @assert(i32 %8)
%10 = load i32, i32* %3
%11 = icmp sle i32 %10, 5
%12 = zext i1 %11 to i32
%13 = call i32 @assert(i32 %12)
ret void
}

LLVM IR (-O2):
define void @foo(i32* nocapture %0) {
%2 = load i32, i32* %0
%3 = icmp sgt i32 %2, 3
%4 = zext i1 %3 to i32
%5 = tail call i32 @assert(i32 %4)
%6 = icmp slt i32 %2, 6
%7 = zext i1 %6 to i32
%8 = tail call i32 @assert(i32 %7)
ret void
}
__attribute__((always_, unused)) void outb(unsigned short port,
                                           unsigned char value) {
  asm volatile("outb %1, %0" ::"Nd"(port), "a"(value));
}


x86 assembly (clang, -O0):
<outb>:
push   %rbp
mov    %rsp,%rbp
mov    %sil,%al
mov    %di,%cx
mov    %cx,-0x2(%rbp)
mov    %al,-0x3(%rbp)
mov    -0x2(%rbp),%dx
mov    -0x3(%rbp),%al
out    %al,(%dx)
pop    %rbp
ret

x86 assembly (clang, -O2):
<outb>:
mov    %esi,%eax
mov    %edi,%edx
out    %al,(%dx)
ret

LLVM IR (-O0):
define void @outb(i16 zeroext %0, i8 zeroext %1) {
%3 = alloca i16
%4 = alloca i8
store i16 %0, i16* %3
store i8 %1, i8* %4
%5 = load i16, i16* %3
%6 = load i8, i8* %4
ret void
}

LLVM IR (-O2):
define void @outb(i16 zeroext %0, i8 zeroext %1) {
tail call void asm sideeffect "outb $1, $0", "N{dx},{ax},~{dirflag},~{fpsr},~{flags}"(i16 %0, i8 %1)
ret void
}