xunge/DecIR huggingface dataset:
/* Variables and functions */
int ig_indirect_table_set(unsigned int, int, unsigned int, int, unsigned int *);
int ig_sc_table_set(unsigned int dev_id, unsigned int index,
                    unsigned int *pentry) {
  if ((index < 0) || (index > 31)) {
    return -1;
  }
  return ig_indirect_table_set(dev_id, 3, index, 4, pentry);
}


x86 assembly (clang, -O0):
<ig_sc_table_set>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %rdx,-0x18(%rbp)
cmpl   $0x0,-0xc(%rbp)
jb     1136 <ig_sc_table_set+0x26>
cmpl   $0x1f,-0xc(%rbp)
jbe    1142 <ig_sc_table_set+0x32>
movl   $0xffffffff,-0x4(%rbp)
jmp    115e <ig_sc_table_set+0x4e>
mov    -0x8(%rbp),%edi
mov    -0xc(%rbp),%edx
mov    -0x18(%rbp),%r8
mov    $0x3,%esi
mov    $0x4,%ecx
call   1030 <ig_indirect_table_set@plt>
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ig_sc_table_set>:
cmp    $0x1f,%esi
jbe    111b <ig_sc_table_set+0xb>
mov    $0xffffffff,%eax
ret
mov    %rdx,%r8
mov    %esi,%edx
mov    $0x3,%esi
mov    $0x4,%ecx
jmp    1030 <ig_indirect_table_set@plt>

LLVM IR (-O0):
define i32 @ig_sc_table_set(i32 %0, i32 %1, i32* %2) {
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32*
store i32 %0, i32* %5
store i32 %1, i32* %6
store i32* %2, i32** %7
%8 = load i32, i32* %6
%9 = icmp ult i32 %8, 0
br i1 %9, label %13, label %10
10: ; preds = %3
%11 = load i32, i32* %6
%12 = icmp ugt i32 %11, 31
br i1 %12, label %13, label %14
13: ; preds = %10, %3
store i32 -1, i32* %4
br label %19
14: ; preds = %10
%15 = load i32, i32* %5
%16 = load i32, i32* %6
%17 = load i32*, i32** %7
%18 = call i32 @ig_indirect_table_set(i32 %15, i32 3, i32 %16, i32 4, i32* %17)
store i32 %18, i32* %4
br label %19
19: ; preds = %14, %13
%20 = load i32, i32* %4
ret i32 %20
}

LLVM IR (-O2):
define i32 @ig_sc_table_set(i32 %0, i32 %1, i32* %2) {
%4 = icmp ugt i32 %1, 31
br i1 %4, label %7, label %5
5: ; preds = %3
%6 = tail call i32 @ig_indirect_table_set(i32 %0, i32 3, i32 %1, i32 4, i32* %2)
br label %7
7: ; preds = %3, %5
%8 = phi i32 [ %6, %5 ], [ -1, %3 ]
ret i32 %8
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
void sumar(int a, int b) { printf("La suma es: %d", a + b); }


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

x86 assembly (clang, -O2):
<sumar>:
add    %edi,%esi
lea    0xee7(%rip),%rdi
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [15 x i8] c"La suma es: %d\00"
define void @sumar(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%5 = load i32, i32* %3
%6 = load i32, i32* %4
%7 = add nsw i32 %5, %6
%8 = call i32 @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0), i32 %7)
ret void
}

LLVM IR (-O2):
@.str = [15 x i8] c"La suma es: %d\00"
define void @sumar(i32 %0, i32 %1) {
%3 = add nsw i32 %1, %0
%4 = tail call i32 @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0), i32 %3)
ret void
}
int do_212() { return 212; }


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

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

LLVM IR (-O0):
define i32 @do_212() {
ret i32 212
}

LLVM IR (-O2):
define i32 @do_212() {
ret i32 212
}
/* Variables and functions */
char *dupstr(char const *);
int eval(char *, int);
int strlen(char *);
int eval_hex(const char *s) {
  char *p;
  p = dupstr(s);
  p[strlen(p) - 1] = '\0';
  return eval(p, 16);
}


x86 assembly (clang, -O0):
<eval_hex>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1050 <dupstr@plt>
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x10(%rbp),%rdi
call   1030 <strlen@plt>
mov    %eax,%ecx
mov    -0x18(%rbp),%rax
sub    $0x1,%ecx
movslq %ecx,%rcx
movb   $0x0,(%rax,%rcx,1)
mov    -0x10(%rbp),%rdi
mov    $0x10,%esi
call   1040 <eval@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<eval_hex>:
push   %rbx
call   1050 <dupstr@plt>
mov    %rax,%rbx
mov    %rax,%rdi
call   1030 <strlen@plt>
cltq
movb   $0x0,-0x1(%rax,%rbx,1)
mov    %rbx,%rdi
mov    $0x10,%esi
pop    %rbx
jmp    1040 <eval@plt>

LLVM IR (-O0):
define i32 @eval_hex(i8* %0) {
%2 = alloca i8*
%3 = alloca i8*
store i8* %0, i8** %2
%4 = load i8*, i8** %2
%5 = call i8* @dupstr(i8* %4)
store i8* %5, i8** %3
%6 = load i8*, i8** %3
%7 = load i8*, i8** %3
%8 = call i32 @strlen(i8* %7)
%9 = sub nsw i32 %8, 1
%10 = sext i32 %9 to i64
%11 = getelementptr inbounds i8, i8* %6, i64 %10
store i8 0, i8* %11
%12 = load i8*, i8** %3
%13 = call i32 @eval(i8* %12, i32 16)
ret i32 %13
}

LLVM IR (-O2):
define i32 @eval_hex(i8* %0) {
%2 = tail call i8* @dupstr(i8* %0)
%3 = tail call i32 @strlen(i8* %2)
%4 = add nsw i32 %3, -1
%5 = sext i32 %4 to i64
%6 = getelementptr inbounds i8, i8* %2, i64 %5
store i8 0, i8* %6
%7 = tail call i32 @eval(i8* %2, i32 16)
ret i32 %7
}
int qread_(val)
short *val;
{ return (qread(val)); }


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

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

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

LLVM IR (-O2):
define i32 @qread_(i16* %0) {
%2 = tail call i32 (i16*, ...) bitcast (i32 (...)* @qread to i32 (i16*, ...)*)(i16* %0)
ret i32 %2
}
/* Variables and functions */
int /*<<< orphan*/ f(int);
int init_emit_regs(int mode) { f(mode == 4 || mode == 13); }


x86 assembly (clang, -O0):
<init_emit_regs>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
mov    $0x1,%al
cmpl   $0x4,-0x8(%rbp)
mov    %al,-0x9(%rbp)
je     1134 <init_emit_regs+0x24>
cmpl   $0xd,-0x8(%rbp)
sete   %al
mov    %al,-0x9(%rbp)
mov    -0x9(%rbp),%al
and    $0x1,%al
movzbl %al,%edi
call   1030 <f@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<init_emit_regs>:
cmp    $0x4,%edi
sete   %al
cmp    $0xd,%edi
sete   %cl
or     %al,%cl
movzbl %cl,%edi
jmp    1030 <f@plt>

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

LLVM IR (-O2):
define i32 @init_emit_regs(i32 %0) {
%2 = icmp eq i32 %0, 4
%3 = icmp eq i32 %0, 13
%4 = or i1 %2, %3
%5 = zext i1 %4 to i32
%6 = tail call i32 @f(i32 %5)
ret i32 undef
}
int main() {
  char mychar[10];
  int *intlocation = 3632;
  mychar[5] = intlocation;
  printf("%d\n", *(&mychar[5]));
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    $0xe30,%eax
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rax
mov    %al,-0x5(%rbp)
movsbl -0x5(%rbp),%esi
lea    0xecd(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
@.str = [4 x i8] c"%d\0A\00"
define i32 @main() {
%1 = alloca [10 x i8]
%2 = alloca i32*
store i32* inttoptr (i64 3632 to i32*), i32** %2
%3 = load i32*, i32** %2
%4 = ptrtoint i32* %3 to i8
%5 = getelementptr inbounds [10 x i8], [10 x i8]* %1, i64 0, i64 5
store i8 %4, i8* %5
%6 = getelementptr inbounds [10 x i8], [10 x i8]* %1, i64 0, i64 5
%7 = load i8, i8* %6
%8 = sext i8 %7 to i32
%9 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %8)
ret i32 0
}

LLVM IR (-O2):
@.str = [4 x i8] c"%d\0A\00"
define i32 @main() {
%1 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 48)
ret i32 0
}
/* Variables and functions */
int mkostemps(char *, int /*<<< orphan*/, int /*<<< orphan*/);
int mkstemp(char *template) { return mkostemps(template, 0, 0); }


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

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

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

LLVM IR (-O2):
define i32 @mkstemp(i8* %0) {
%2 = tail call i32 @mkostemps(i8* %0, i32 0, i32 0)
ret i32 %2
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ test_getgateways();
int /*<<< orphan*/ test_sa_len();
int main(void) {
  ;
  printf("Testing get gateways:\n");
  test_getgateways();
  printf("Testing SA_LEN  \n");
  test_sa_len();
  ;
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeba(%rip),%rdi
call   1030 <printf@plt>
mov    $0x0,%al
call   1050 <test_getgateways@plt>
lea    0xebe(%rip),%rdi
call   1030 <printf@plt>
mov    $0x0,%al
call   1040 <test_sa_len@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xec8(%rip),%rdi
call   1030 <puts@plt>
xor    %eax,%eax
call   1050 <test_getgateways@plt>
lea    0xecb(%rip),%rdi
call   1030 <puts@plt>
xor    %eax,%eax
call   1040 <test_sa_len@plt>
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
@str = [22 x i8] c"Testing get gateways:\00"
@str.2 = [17 x i8] c"Testing SA_LEN \00"
define i32 @main() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([22 x i8], [22 x i8]* @str, i64 0, i64 0))
%2 = tail call i32 (...) @test_getgateways()
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([17 x i8], [17 x i8]* @str.2, i64 0, i64 0))
%4 = tail call i32 (...) @test_sa_len()
ret i32 0
}
/* Type definitions */
typedef int /*<<< orphan*/ uid_t;

/* Variables and functions */
int setresuid(int /*<<< orphan*/, int /*<<< orphan*/, int /*<<< orphan*/);
int pthread_setresuid_np(uid_t ruid, uid_t euid, uid_t suid) {
  return setresuid(ruid, euid, suid);
}


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

x86 assembly (clang, -O2):
<pthread_setresuid_np>:
jmp    1030 <setresuid@plt>

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

LLVM IR (-O2):
define i32 @pthread_setresuid_np(i32 %0, i32 %1, i32 %2) {
%4 = tail call i32 @setresuid(i32 %0, i32 %1, i32 %2)
ret i32 %4
}
/* Variables and functions */
char *strchr(char *, char);
int /*<<< orphan*/ strcpy(char *, char *);
void path_next(char *path, char *dest) {
  if (!path) {
    dest[0] = '\0';
    return;
  }
  char *delpos = strchr(path, ('.'));
  if (delpos)
    strcpy(dest, delpos + 1);
  else
    dest[0] = '\0';
}


x86 assembly (clang, -O0):
<path_next>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
cmpq   $0x0,-0x8(%rbp)
jne    1147 <path_next+0x27>
mov    -0x10(%rbp),%rax
movb   $0x0,(%rax)
jmp    1181 <path_next+0x61>
mov    -0x8(%rbp),%rdi
mov    $0x2e,%esi
call   1040 <strchr@plt>
mov    %rax,-0x18(%rbp)
cmpq   $0x0,-0x18(%rbp)
je     117a <path_next+0x5a>
mov    -0x10(%rbp),%rdi
mov    -0x18(%rbp),%rsi
add    $0x1,%rsi
call   1030 <strcpy@plt>
jmp    1181 <path_next+0x61>
mov    -0x10(%rbp),%rax
movb   $0x0,(%rax)
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<path_next>:
push   %rbx
mov    %rsi,%rbx
test   %rdi,%rdi
je     1148 <path_next+0x28>
mov    $0x2e,%esi
call   1040 <strchr@plt>
test   %rax,%rax
je     1148 <path_next+0x28>
add    $0x1,%rax
mov    %rbx,%rdi
mov    %rax,%rsi
pop    %rbx
jmp    1030 <strcpy@plt>
movb   $0x0,(%rbx)
pop    %rbx
ret

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

LLVM IR (-O2):
define void @path_next(i8* %0, i8* %1) {
%3 = icmp eq i8* %0, null
br i1 %3, label %4, label %5
4: ; preds = %2
store i8 0, i8* %1
br label %12
5: ; preds = %2
%6 = tail call i8* @strchr(i8* %0, i8 signext 46)
%7 = icmp eq i8* %6, null
br i1 %7, label %11, label %8
8: ; preds = %5
%9 = getelementptr inbounds i8, i8* %6, i64 1
%10 = tail call i32 @strcpy(i8* %1, i8* %9)
br label %12
11: ; preds = %5
store i8 0, i8* %1
br label %12
12: ; preds = %8, %11, %4
ret void
}
void av_downmix_info_update_side_data() {}


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

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

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

LLVM IR (-O2):
define void @av_downmix_info_update_side_data() {
ret void
}
/* Variables and functions */
int numDistinct(char *, char *);
int /*<<< orphan*/ printf(char *, int);
int main(int argc, char **argv) {
  printf("%d\n", numDistinct(argv[1], argv[2]));
  return (0);
}


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

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    0x8(%rsi),%rdi
mov    0x10(%rsi),%rsi
call   1040 <numDistinct@plt>
lea    0xecb(%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"
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 = load i8**, i8*** %5
%7 = getelementptr inbounds i8*, i8** %6, i64 1
%8 = load i8*, i8** %7
%9 = load i8**, i8*** %5
%10 = getelementptr inbounds i8*, i8** %9, i64 2
%11 = load i8*, i8** %10
%12 = call i32 @numDistinct(i8* %8, i8* %11)
%13 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %12)
ret i32 0
}

LLVM IR (-O2):
@.str = [4 x i8] c"%d\0A\00"
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = getelementptr inbounds i8*, i8** %1, i64 1
%4 = load i8*, i8** %3
%5 = getelementptr inbounds i8*, i8** %1, i64 2
%6 = load i8*, i8** %5
%7 = tail call i32 @numDistinct(i8* %4, i8* %6)
%8 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %7)
ret i32 0
}
int main(void) {
  int x = 0;
  return ++x + x;
}


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

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

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

LLVM IR (-O2):
define i32 @main() {
ret i32 2
}
void gtk_menu_attach_to_widget() {}


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

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

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

LLVM IR (-O2):
define void @gtk_menu_attach_to_widget() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ close(int);
int dupfd(int, int);
int dup2(int fd, int desired_fd) {
  if (fd == desired_fd)
    return fd;
  close(desired_fd);
  return dupfd(fd, desired_fd);
}


x86 assembly (clang, -O0):
<dup2>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%eax
cmp    -0xc(%rbp),%eax
jne    1145 <dup2+0x25>
mov    -0x8(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    115b <dup2+0x3b>
mov    -0xc(%rbp),%edi
call   1040 <close@plt>
mov    -0x8(%rbp),%edi
mov    -0xc(%rbp),%esi
call   1030 <dupfd@plt>
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<dup2>:
push   %rbp
push   %rbx
push   %rax
mov    %edi,%ebp
cmp    %esi,%edi
jne    1132 <dup2+0x12>
mov    %ebp,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret
mov    %esi,%ebx
mov    %esi,%edi
call   1040 <close@plt>
mov    %ebp,%edi
mov    %ebx,%esi
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    1030 <dupfd@plt>

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

LLVM IR (-O2):
define i32 @dup2(i32 %0, i32 %1) {
%3 = icmp eq i32 %0, %1
br i1 %3, label %7, label %4
4: ; preds = %2
%5 = tail call i32 @close(i32 %1)
%6 = tail call i32 @dupfd(i32 %0, i32 %1)
br label %7
7: ; preds = %2, %4
%8 = phi i32 [ %6, %4 ], [ %0, %2 ]
ret i32 %8
}
int isEmpty(int *stack, int top) {
  if (top == -1)
    return 1;
  return 0;
}


x86 assembly (clang, -O0):
<isEmpty>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    %esi,-0x14(%rbp)
cmpl   $0xffffffff,-0x14(%rbp)
jne    1121 <isEmpty+0x21>
movl   $0x1,-0x4(%rbp)
jmp    1128 <isEmpty+0x28>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<isEmpty>:
xor    %eax,%eax
cmp    $0xffffffff,%esi
sete   %al
ret

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

LLVM IR (-O2):
define i32 @isEmpty(i32* nocapture readnone %0, i32 %1) {
%3 = icmp eq i32 %1, -1
%4 = zext i1 %3 to i32
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ _IO(char, int);
int ioctl(int, int /*<<< orphan*/, int /*<<< orphan*/);
int msvd_disable_irq(int fd) { return ioctl(fd, _IO('m', 1), 0); }


x86 assembly (clang, -O0):
<msvd_disable_irq>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
mov    %eax,-0x8(%rbp)
mov    $0x6d,%edi
mov    $0x1,%esi
call   1030 <_IO@plt>
mov    -0x8(%rbp),%edi
mov    %eax,%esi
xor    %edx,%edx
call   1040 <ioctl@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<msvd_disable_irq>:
push   %rbx
mov    %edi,%ebx
mov    $0x6d,%edi
mov    $0x1,%esi
call   1030 <_IO@plt>
mov    %ebx,%edi
mov    %eax,%esi
xor    %edx,%edx
pop    %rbx
jmp    1040 <ioctl@plt>

LLVM IR (-O0):
define i32 @msvd_disable_irq(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = call i32 @_IO(i8 signext 109, i32 1)
%5 = call i32 @ioctl(i32 %3, i32 %4, i32 0)
ret i32 %5
}

LLVM IR (-O2):
define i32 @msvd_disable_irq(i32 %0) {
%2 = tail call i32 @_IO(i8 signext 109, i32 1)
%3 = tail call i32 @ioctl(i32 %0, i32 %2, i32 0)
ret i32 %3
}
void resetLetterNum(int *letters) {
  letters[0] = 0;
  letters[1] = 0;
  letters[2] = 0;
  letters[3] = 0;
}


x86 assembly (clang, -O0):
<resetLetterNum>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movl   $0x0,(%rax)
mov    -0x8(%rbp),%rax
movl   $0x0,0x4(%rax)
mov    -0x8(%rbp),%rax
movl   $0x0,0x8(%rax)
mov    -0x8(%rbp),%rax
movl   $0x0,0xc(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<resetLetterNum>:
xorps  %xmm0,%xmm0
movups %xmm0,(%rdi)
ret

LLVM IR (-O0):
define void @resetLetterNum(i32* %0) {
%2 = alloca i32*
store i32* %0, i32** %2
%3 = load i32*, i32** %2
%4 = getelementptr inbounds i32, i32* %3, i64 0
store i32 0, i32* %4
%5 = load i32*, i32** %2
%6 = getelementptr inbounds i32, i32* %5, i64 1
store i32 0, i32* %6
%7 = load i32*, i32** %2
%8 = getelementptr inbounds i32, i32* %7, i64 2
store i32 0, i32* %8
%9 = load i32*, i32** %2
%10 = getelementptr inbounds i32, i32* %9, i64 3
store i32 0, i32* %10
ret void
}

LLVM IR (-O2):
define void @resetLetterNum(i32* nocapture writeonly %0) {
%2 = bitcast i32* %0 to i8*
ret void
}
/* Variables and functions */
int /*<<< orphan*/ tasks_short_foo1();
void *tasks_short_parFun_a0b0b(void *voidArgs) {
  tasks_short_foo1();
  return 0;
}


x86 assembly (clang, -O0):
<tasks_short_parFun_a0b0b>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    $0x0,%al
call   1030 <tasks_short_foo1@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
define i8* @tasks_short_parFun_a0b0b(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = call i32 (...) @tasks_short_foo1()
ret i8* null
}

LLVM IR (-O2):
define noalias i8* @tasks_short_parFun_a0b0b(i8* nocapture readnone %0) {
%2 = tail call i32 (...) @tasks_short_foo1()
ret i8* null
}
int serial_ischar(void) {
  unsigned char c, *cp;
  unsigned count;
  cp = (unsigned char *)0xbd000020;
  count = 0;
  while (count != 100) {
    if (*(cp + 0x14) & 0x01) {
      c = (volatile unsigned char)*cp;
      return c;
    }
    cp++;
    cp--;
    count++;
  }
  return 0;
}


x86 assembly (clang, -O0):
<serial_ischar>:
push   %rbp
mov    %rsp,%rbp
mov    $0xbd000020,%eax
mov    %rax,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
cmpl   $0x64,-0x14(%rbp)
je     116d <serial_ischar+0x6d>
mov    -0x10(%rbp),%rax
movzbl 0x14(%rax),%eax
and    $0x1,%eax
cmp    $0x0,%eax
je     1147 <serial_ischar+0x47>
mov    -0x10(%rbp),%rax
mov    (%rax),%al
mov    %al,-0x5(%rbp)
movzbl -0x5(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    1174 <serial_ischar+0x74>
mov    -0x10(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
add    $0xffffffffffffffff,%rax
mov    %rax,-0x10(%rbp)
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    1114 <serial_ischar+0x14>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<serial_ischar>:
mov    $0xbd000020,%ecx
xor    %eax,%eax
testb  $0x1,0x14(%rcx)
je     1110 <serial_ischar+0x10>
movzbl (%rcx),%eax
ret

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

LLVM IR (-O2):
define i32 @serial_ischar() {
%1 = load i8, i8* inttoptr (i64 3170893876 to i8*)
%2 = and i8 %1, 1
%3 = icmp eq i8 %2, 0
br i1 %3, label %7, label %4
4: ; preds = %0
%5 = load i8, i8* inttoptr (i64 3170893856 to i8*)
%6 = zext i8 %5 to i32
br label %7
7: ; preds = %0, %4
%8 = phi i32 [ %6, %4 ], [ 0, %0 ]
ret i32 %8
}
int bsdsock_flush(void *data) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @bsdsock_flush(i8* nocapture readnone %0) {
ret i32 0
}
int lib_func02() { return 2; }


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

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

LLVM IR (-O0):
define i32 @lib_func02() {
ret i32 2
}

LLVM IR (-O2):
define i32 @lib_func02() {
ret i32 2
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
int /*<<< orphan*/ stderr;
void no_kinect_quit(void) {
  fprintf(stderr, "Error: Kinect not connected?\n");
  exit(1);
}


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

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

LLVM IR (-O0):
@stderr = global i32 0
@.str = [30 x i8] c"Error: Kinect not connected?\0A\00"
define void @no_kinect_quit() {
%1 = load i32, i32* @stderr
%2 = call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str, i64 0, i64 0))
%3 = call i32 @exit(i32 1)
unreachable
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [30 x i8] c"Error: Kinect not connected?\0A\00"
define void @no_kinect_quit() {
%1 = load i32, i32* @stderr
%2 = tail call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str, i64 0, i64 0))
%3 = tail call i32 @exit(i32 1)
unreachable
}
/* Variables and functions */
int /*<<< orphan*/ abort();
char acc_a(long);
int /*<<< orphan*/ exit(int /*<<< orphan*/);
main() {
  if (acc_a(2000000000L) != 'd')
    abort();
  exit(0);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x77359400,%edi
call   1040 <acc_a@plt>
movsbl %al,%eax
cmp    $0x64,%eax
je     115c <main+0x2c>
mov    $0x0,%al
call   1030 <abort@plt>
xor    %edi,%edi
call   1050 <exit@plt>

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    $0x77359400,%edi
call   1040 <acc_a@plt>
cmp    $0x64,%al
jne    1146 <main+0x16>
xor    %edi,%edi
call   1050 <exit@plt>
xor    %eax,%eax
call   1030 <abort@plt>

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call signext i8 @acc_a(i64 2000000000)
%3 = sext i8 %2 to i32
%4 = icmp ne i32 %3, 100
br i1 %4, label %5, label %7
5: ; preds = %0
%6 = call i32 (...) @abort()
unreachable
7: ; preds = %0
%8 = call i32 @exit(i32 0)
unreachable
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call signext i8 @acc_a(i64 2000000000)
%2 = icmp eq i8 %1, 100
br i1 %2, label %5, label %3
3: ; preds = %0
%4 = tail call i32 (...) @abort()
unreachable
5: ; preds = %0
%6 = tail call i32 @exit(i32 0)
unreachable
}
void ft_foreach(int *tab, int length, void (*f)(int)) {
  int i;
  i = -1;
  while (++i < length)
    f(tab[i]);
}


x86 assembly (clang, -O0):
<ft_foreach>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %rdx,-0x18(%rbp)
movl   $0xffffffff,-0x1c(%rbp)
mov    -0x1c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x1c(%rbp)
cmp    -0xc(%rbp),%eax
jge    1142 <ft_foreach+0x42>
mov    -0x18(%rbp),%rax
mov    -0x8(%rbp),%rcx
movslq -0x1c(%rbp),%rdx
mov    (%rcx,%rdx,4),%edi
call   *%rax
jmp    111a <ft_foreach+0x1a>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ft_foreach>:
push   %r15
push   %r14
push   %r12
push   %rbx
push   %rax
test   %esi,%esi
jle    1130 <ft_foreach+0x30>
mov    %rdx,%r14
mov    %rdi,%r15
mov    %esi,%r12d
xor    %ebx,%ebx
nopw   0x0(%rax,%rax,1)
mov    (%r15,%rbx,4),%edi
call   *%r14
add    $0x1,%rbx
cmp    %rbx,%r12
jne    1120 <ft_foreach+0x20>
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
ret

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

LLVM IR (-O2):
define void @ft_foreach(i32* nocapture %0, i32 %1, void (i32)* nocapture %2) {
%4 = icmp sgt i32 %1, 0
br i1 %4, label %5, label %13
5: ; preds = %3
%6 = zext i32 %1 to i64
br label %7
7: ; preds = %5, %7
%8 = phi i64 [ 0, %5 ], [ %11, %7 ]
%9 = getelementptr inbounds i32, i32* %0, i64 %8
%10 = load i32, i32* %9
tail call void %2(i32 %10)
%11 = add nuw nsw i64 %8, 1
%12 = icmp eq i64 %11, %6
br i1 %12, label %13, label %7
13: ; preds = %7, %3
ret void
}
/* Type definitions */
typedef int uint32_t;

/* Variables and functions */
uint32_t op_shl(uint32_t a, uint32_t b) { return a << b; }


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

x86 assembly (clang, -O2):
<op_shl>:
mov    %esi,%ecx
mov    %edi,%eax
shl    %cl,%eax
ret

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

LLVM IR (-O2):
define i32 @op_shl(i32 %0, i32 %1) {
%3 = shl i32 %0, %1
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ good1();
void CWE226_Sensitive_Information_Uncleared_Before_Release__w32_char_alloca_01_good() {
  good1();
}


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

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

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

LLVM IR (-O2):
define void @CWE226_Sensitive_Information_Uncleared_Before_Release__w32_char_alloca_01_good() {
%1 = tail call i32 (...) @good1()
ret void
}
void re_encode(font) char *font;
{ printf("/%s /%s ISO Re-encode\n", font, font); }


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

x86 assembly (clang, -O2):
<re_encode>:
mov    %rdi,%rdx
lea    0xee6(%rip),%rdi
mov    %rdx,%rsi
xor    %eax,%eax
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [23 x i8] c"/%s /%s ISO Re-encode\0A\00"
define void @re_encode(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = load i8*, i8** %2
%5 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str, i64 0, i64 0), i8* %3, i8* %4)
ret void
}

LLVM IR (-O2):
@.str = [23 x i8] c"/%s /%s ISO Re-encode\0A\00"
define void @re_encode(i8* %0) {
%2 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([23 x i8], [23 x i8]* @.str, i64 0, i64 0), i8* %0, i8* %0)
ret void
}
int test_imm_2Dint64_highword_mem(long long *val) {
  return ((*val >> 32) & (0x2D << 0)) ? -20 : -40;
}


x86 assembly (clang, -O0):
<test_imm_2Dint64_highword_mem>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%rdx
sar    $0x20,%rdx
and    $0x2d,%rdx
mov    $0xffffffd8,%eax
mov    $0xffffffec,%ecx
cmp    $0x0,%rdx
cmovne %ecx,%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @test_imm_2Dint64_highword_mem(i64* nocapture %0) {
%2 = load i64, i64* %0
%3 = and i64 %2, 193273528320
%4 = icmp eq i64 %3, 0
%5 = select i1 %4, i32 -40, i32 -20
ret i32 %5
}
int __test() {
  int x = 0;
  int z = 3;
  int z1 = 3;
  x += z + z1;
  {
    int z = 4;
    x += z;
    {
      int z = 5;
      x += z;
    }
  }
  {
    int z = 1;
    x += z;
  }
  return x;
}


x86 assembly (clang, -O0):
<__test>:
push   %rbp
mov    %rsp,%rbp
movl   $0x0,-0x4(%rbp)
movl   $0x3,-0x8(%rbp)
movl   $0x3,-0xc(%rbp)
mov    -0x8(%rbp),%eax
add    -0xc(%rbp),%eax
add    -0x4(%rbp),%eax
mov    %eax,-0x4(%rbp)
movl   $0x4,-0x10(%rbp)
mov    -0x10(%rbp),%eax
add    -0x4(%rbp),%eax
mov    %eax,-0x4(%rbp)
movl   $0x5,-0x14(%rbp)
mov    -0x14(%rbp),%eax
add    -0x4(%rbp),%eax
mov    %eax,-0x4(%rbp)
movl   $0x1,-0x18(%rbp)
mov    -0x18(%rbp),%eax
add    -0x4(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @__test() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
store i32 0, i32* %1
store i32 3, i32* %2
store i32 3, i32* %3
%7 = load i32, i32* %2
%8 = load i32, i32* %3
%9 = add nsw i32 %7, %8
%10 = load i32, i32* %1
%11 = add nsw i32 %10, %9
store i32 %11, i32* %1
store i32 4, i32* %4
%12 = load i32, i32* %4
%13 = load i32, i32* %1
%14 = add nsw i32 %13, %12
store i32 %14, i32* %1
store i32 5, i32* %5
%15 = load i32, i32* %5
%16 = load i32, i32* %1
%17 = add nsw i32 %16, %15
store i32 %17, i32* %1
store i32 1, i32* %6
%18 = load i32, i32* %6
%19 = load i32, i32* %1
%20 = add nsw i32 %19, %18
store i32 %20, i32* %1
%21 = load i32, i32* %1
ret i32 %21
}

LLVM IR (-O2):
define i32 @__test() {
ret i32 16
}
/* Type definitions */
typedef int /*<<< orphan*/ gid_t;

/* Variables and functions */
int /*<<< orphan*/ __syscall(int);
gid_t getgid(void) { return __syscall(47); }


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

x86 assembly (clang, -O2):
<getgid>:
mov    $0x2f,%edi
jmp    1030 <__syscall@plt>

LLVM IR (-O0):
define i32 @getgid() {
%1 = call i32 @__syscall(i32 47)
ret i32 %1
}

LLVM IR (-O2):
define i32 @getgid() {
%1 = tail call i32 @__syscall(i32 47)
ret i32 %1
}
int gpio_is_valid(int number) { return number >= 0; }


x86 assembly (clang, -O0):
<gpio_is_valid>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
cmpl   $0x0,-0x4(%rbp)
setge  %al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<gpio_is_valid>:
mov    %edi,%eax
not    %eax
shr    $0x1f,%eax
ret

LLVM IR (-O0):
define i32 @gpio_is_valid(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = icmp sge i32 %3, 0
%5 = zext i1 %4 to i32
ret i32 %5
}

LLVM IR (-O2):
define i32 @gpio_is_valid(i32 %0) {
%2 = xor i32 %0, -1
%3 = lshr i32 %2, 31
ret i32 %3
}
/* Variables and functions */
scalar_t__ get_line(char *);
int /*<<< orphan*/ printf(char *, char *);
char *reverse(char *);
int main() {
  char s[100];
  while (get_line(s))
    printf("%s\n", reverse(s));
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x70,%rsp
movl   $0x0,-0x4(%rbp)
lea    -0x70(%rbp),%rdi
call   1040 <get_line@plt>
cmp    $0x0,%rax
je     116f <main+0x3f>
lea    -0x70(%rbp),%rdi
call   1030 <reverse@plt>
mov    %rax,%rsi
lea    0xe9b(%rip),%rdi
call   1050 <printf@plt>
jmp    113f <main+0xf>
xor    %eax,%eax
add    $0x70,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r14
push   %rbx
sub    $0x68,%rsp
mov    %rsp,%rdi
call   1040 <get_line@plt>
test   %rax,%rax
je     1170 <main+0x40>
mov    %rsp,%rbx
lea    0xeb2(%rip),%r14
xchg   %ax,%ax
mov    %rbx,%rdi
call   1030 <reverse@plt>
mov    %r14,%rdi
mov    %rax,%rsi
call   1050 <printf@plt>
mov    %rbx,%rdi
call   1040 <get_line@plt>
test   %rax,%rax
jne    1150 <main+0x20>
xor    %eax,%eax
add    $0x68,%rsp
pop    %rbx
pop    %r14
ret

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

LLVM IR (-O2):
@.str = [4 x i8] c"%s\0A\00"
define i32 @main() {
%1 = alloca [100 x i8]
%2 = getelementptr inbounds [100 x i8], [100 x i8]* %1, i64 0, i64 0
%3 = call i64 @get_line(i8* %2)
%4 = icmp eq i64 %3, 0
br i1 %4, label %10, label %5
5: ; preds = %0, %5
%6 = call i8* @reverse(i8* %2)
%7 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %6)
%8 = call i64 @get_line(i8* %2)
%9 = icmp eq i64 %8, 0
br i1 %9, label %10, label %5
10: ; preds = %5, %0
ret i32 0
}
/* Variables and functions */
int is_prime(int);
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ scanf(char *, int *);
int main() {
  int n, prime;
  scanf("%d", &n);
  prime = is_prime(n);
  if (prime == 1) {
    printf("1");
  } else {
    printf("0");
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeba(%rip),%rdi
lea    -0x8(%rbp),%rsi
call   1050 <scanf@plt>
mov    -0x8(%rbp),%edi
call   1040 <is_prime@plt>
mov    %eax,-0xc(%rbp)
cmpl   $0x1,-0xc(%rbp)
jne    1175 <main+0x45>
lea    0xe98(%rip),%rdi
call   1030 <printf@plt>
jmp    1181 <main+0x51>
lea    0xe89(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xec8(%rip),%rdi
lea    0x4(%rsp),%rsi
call   1050 <scanf@plt>
mov    0x4(%rsp),%edi
call   1040 <is_prime@plt>
xor    %edi,%edi
cmp    $0x1,%eax
sete   %dil
or     $0x30,%edi
call   1030 <putchar@plt>
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
@.str = [3 x i8] c"%d\00"
define i32 @main() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
%3 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %1)
%4 = load i32, i32* %1
%5 = call i32 @is_prime(i32 %4)
%6 = icmp eq i32 %5, 1
%7 = select i1 %6, i32 49, i32 48
%8 = call i32 @putchar(i32 %7)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ isgraph(int);
void t_isgraph_0xdc() {
  Assert_real((isgraph(220) == 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_isgraph.c",
              1105, ("isgraph should be 0 for 0xdc"));
}


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

x86 assembly (clang, -O2):
<t_isgraph_0xdc>:
push   %rax
mov    $0xdc,%edi
call   1040 <isgraph@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf66(%rip),%rcx
mov    $0x451,%edx
pop    %rax
jmp    1030 <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_isgraph.c\00"
@.str.1 = [29 x i8] c"isgraph should be 0 for 0xdc\00"
define void @t_isgraph_0xdc() {
%1 = call i64 @isgraph(i32 220)
%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 1105, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [168 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/ctype/test_isgraph.c\00"
@.str.1 = [29 x i8] c"isgraph should be 0 for 0xdc\00"
define void @t_isgraph_0xdc() {
%1 = tail call i64 @isgraph(i32 220)
%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 1105, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0))
ret void
}
void reverse(void *list, int start, int end,
             void (*swapFunc)(void *list, int i, int j)) {
  while (start < end) {
    swapFunc(list, start, end);
    start++;
    end--;
  }
}


x86 assembly (clang, -O0):
<reverse>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    %rcx,-0x18(%rbp)
mov    -0xc(%rbp),%eax
cmp    -0x10(%rbp),%eax
jge    1149 <reverse+0x49>
mov    -0x18(%rbp),%rax
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
mov    -0x10(%rbp),%edx
call   *%rax
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
mov    -0x10(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0x10(%rbp)
jmp    1116 <reverse+0x16>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<reverse>:
push   %rbp
push   %r15
push   %r14
push   %rbx
push   %rax
cmp    %edx,%esi
jge    1134 <reverse+0x34>
mov    %rcx,%r14
mov    %edx,%ebp
mov    %esi,%ebx
mov    %rdi,%r15
cs nopw 0x0(%rax,%rax,1)
nop
mov    %r15,%rdi
mov    %ebx,%esi
mov    %ebp,%edx
call   *%r14
add    $0x1,%ebx
add    $0xffffffff,%ebp
cmp    %ebp,%ebx
jl     1120 <reverse+0x20>
add    $0x8,%rsp
pop    %rbx
pop    %r14
pop    %r15
pop    %rbp
ret

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

LLVM IR (-O2):
define void @reverse(i8* %0, i32 %1, i32 %2, void (i8*, i32, i32)* nocapture %3) {
%5 = icmp slt i32 %1, %2
br i1 %5, label %6, label %12
6: ; preds = %4, %6
%7 = phi i32 [ %9, %6 ], [ %1, %4 ]
%8 = phi i32 [ %10, %6 ], [ %2, %4 ]
tail call void %3(i8* %0, i32 %7, i32 %8)
%9 = add nsw i32 %7, 1
%10 = add nsw i32 %8, -1
%11 = icmp slt i32 %9, %10
br i1 %11, label %6, label %12
12: ; preds = %6, %4
ret void
}