xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ ft_putchar(char);
void ft_ech_edl(char **arg, void (*f)(const char *)) {
  while (*(arg)) {
    (void)f(*arg++);
    (void)ft_putchar(' ');
  }
  (void)ft_putchar('\n');
  return;
}


x86 assembly (clang, -O0):
<ft_ech_edl>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
cmpq   $0x0,(%rax)
je     1155 <ft_ech_edl+0x45>
mov    -0x10(%rbp),%rax
mov    -0x8(%rbp),%rcx
mov    %rcx,%rdx
add    $0x8,%rdx
mov    %rdx,-0x8(%rbp)
mov    (%rcx),%rdi
call   *%rax
mov    $0x20,%edi
call   1030 <ft_putchar@plt>
jmp    1120 <ft_ech_edl+0x10>
mov    $0xa,%edi
call   1030 <ft_putchar@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ft_ech_edl>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%rbx
mov    (%rdi),%rdi
test   %rdi,%rdi
je     1149 <ft_ech_edl+0x39>
mov    %rsi,%r14
add    $0x8,%rbx
cs nopw 0x0(%rax,%rax,1)
call   *%r14
mov    $0x20,%edi
call   1030 <ft_putchar@plt>
mov    (%rbx),%rdi
add    $0x8,%rbx
test   %rdi,%rdi
jne    1130 <ft_ech_edl+0x20>
mov    $0xa,%edi
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1030 <ft_putchar@plt>

LLVM IR (-O0):
define void @ft_ech_edl(i8** %0, void (i8*)* %1) {
%3 = alloca i8**
%4 = alloca void (i8*)*
store i8** %0, i8*** %3
store void (i8*)* %1, void (i8*)** %4
br label %5
5: ; preds = %9, %2
%6 = load i8**, i8*** %3
%7 = load i8*, i8** %6
%8 = icmp ne i8* %7, null
br i1 %8, label %9, label %15
9: ; preds = %5
%10 = load void (i8*)*, void (i8*)** %4
%11 = load i8**, i8*** %3
%12 = getelementptr inbounds i8*, i8** %11, i32 1
store i8** %12, i8*** %3
%13 = load i8*, i8** %11
%14 = call i32 @ft_putchar(i8 signext 32)
br label %5
15: ; preds = %5
%16 = call i32 @ft_putchar(i8 signext 10)
ret void
}

LLVM IR (-O2):
define void @ft_ech_edl(i8** nocapture %0, void (i8*)* nocapture %1) {
%3 = load i8*, i8** %0
%4 = icmp eq i8* %3, null
br i1 %4, label %12, label %5
5: ; preds = %2, %5
%6 = phi i8* [ %10, %5 ], [ %3, %2 ]
%7 = phi i8** [ %8, %5 ], [ %0, %2 ]
%8 = getelementptr inbounds i8*, i8** %7, i64 1
tail call void %1(i8* %6)
%9 = tail call i32 @ft_putchar(i8 signext 32)
%10 = load i8*, i8** %8
%11 = icmp eq i8* %10, null
br i1 %11, label %12, label %5
12: ; preds = %5, %2
%13 = tail call i32 @ft_putchar(i8 signext 10)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ PrintErrorCode();
int /*<<< orphan*/ dxl_write_word(int, int, int);
void changeGoalPos(int Id, int Pos) {
  if (Id == 254) {
    Id = (254);
  }
  dxl_write_word(Id, 30, Pos);
  PrintErrorCode();
}


x86 assembly (clang, -O0):
<changeGoalPos>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
cmpl   $0xfe,-0x4(%rbp)
jne    1142 <changeGoalPos+0x22>
movl   $0xfe,-0x4(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x8(%rbp),%edx
mov    $0x1e,%esi
call   1040 <dxl_write_word@plt>
mov    $0x0,%al
call   1030 <PrintErrorCode@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<changeGoalPos>:
push   %rax
mov    %esi,%edx
mov    $0x1e,%esi
call   1040 <dxl_write_word@plt>
xor    %eax,%eax
pop    %rcx
jmp    1030 <PrintErrorCode@plt>

LLVM IR (-O0):
define void @changeGoalPos(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 = icmp eq i32 %5, 254
br i1 %6, label %7, label %8
7: ; preds = %2
store i32 254, i32* %3
br label %8
8: ; preds = %7, %2
%9 = load i32, i32* %3
%10 = load i32, i32* %4
%11 = call i32 @dxl_write_word(i32 %9, i32 30, i32 %10)
%12 = call i32 (...) @PrintErrorCode()
ret void
}

LLVM IR (-O2):
define void @changeGoalPos(i32 %0, i32 %1) {
%3 = tail call i32 @dxl_write_word(i32 %0, i32 30, i32 %1)
%4 = tail call i32 (...) @PrintErrorCode()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ dir_destroy_all();
int /*<<< orphan*/ file_destroy_all();
void cleanup(void) {
  file_destroy_all();
  dir_destroy_all();
}


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

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

LLVM IR (-O0):
define void @cleanup() {
%1 = call i32 (...) @file_destroy_all()
%2 = call i32 (...) @dir_destroy_all()
ret void
}

LLVM IR (-O2):
define void @cleanup() {
%1 = tail call i32 (...) @file_destroy_all()
%2 = tail call i32 (...) @dir_destroy_all()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ isascii(int);
void t_isascii_0x8c() {
  Assert_real((isascii(140) == 0),
              "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
              "2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/"
              "dg/z88dk/test/suites/ctype/test_isascii.c",
              705, ("isascii should be 0 for 0x8c"));
}


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

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

LLVM IR (-O0):
@.str = [168 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/ctype/test_isascii.c\00"
@.str.1 = [29 x i8] c"isascii should be 0 for 0x8c\00"
define void @t_isascii_0x8c() {
%1 = call i64 @isascii(i32 140)
%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 705, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [168 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/ctype/test_isascii.c\00"
@.str.1 = [29 x i8] c"isascii should be 0 for 0x8c\00"
define void @t_isascii_0x8c() {
%1 = tail call i64 @isascii(i32 140)
%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 705, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Variables and functions */
int TestLargeVector();
int TestStreamConsistency();
int TestVectors();
bool TestAesOfb(void) {
  bool totalSuccess = true;
  bool success;
  success = TestVectors();
  if (!success) {
    totalSuccess = false;
  }
  success = TestLargeVector();
  if (!success) {
    totalSuccess = false;
  }
  success = TestStreamConsistency();
  if (!success) {
    totalSuccess = false;
  }
  return totalSuccess;
}


x86 assembly (clang, -O0):
<TestAesOfb>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x1,-0x4(%rbp)
mov    $0x0,%al
call   1030 <TestVectors@plt>
mov    %eax,-0x8(%rbp)
cmpl   $0x0,-0x8(%rbp)
jne    115a <TestAesOfb+0x2a>
movl   $0x0,-0x4(%rbp)
mov    $0x0,%al
call   1050 <TestLargeVector@plt>
mov    %eax,-0x8(%rbp)
cmpl   $0x0,-0x8(%rbp)
jne    1175 <TestAesOfb+0x45>
movl   $0x0,-0x4(%rbp)
mov    $0x0,%al
call   1040 <TestStreamConsistency@plt>
mov    %eax,-0x8(%rbp)
cmpl   $0x0,-0x8(%rbp)
jne    1190 <TestAesOfb+0x60>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<TestAesOfb>:
push   %rbp
push   %rbx
push   %rax
xor    %eax,%eax
call   1030 <TestVectors@plt>
test   %eax,%eax
setne  %bpl
xor    %eax,%eax
call   1050 <TestLargeVector@plt>
test   %eax,%eax
setne  %bl
xor    %eax,%eax
call   1040 <TestStreamConsistency@plt>
test   %eax,%eax
setne  %al
and    %bl,%al
and    %bpl,%al
movzbl %al,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

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

LLVM IR (-O2):
define i32 @TestAesOfb() {
%1 = tail call i32 (...) @TestVectors()
%2 = icmp ne i32 %1, 0
%3 = tail call i32 (...) @TestLargeVector()
%4 = icmp ne i32 %3, 0
%5 = tail call i32 (...) @TestStreamConsistency()
%6 = icmp ne i32 %5, 0
%7 = select i1 %6, i1 %4, i1 false
%8 = select i1 %7, i1 %2, i1 false
%9 = zext i1 %8 to i32
ret i32 %9
}
/* Type definitions */
struct Value {
  int dummy;
};
struct ParseState {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ nninit_network();
void Cnninit(struct ParseState *Parser, struct Value *ReturnValue,
             struct Value **Param, int NumArgs) {
  nninit_network();
}


x86 assembly (clang, -O0):
<Cnninit>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %ecx,-0x1c(%rbp)
mov    $0x0,%al
call   1030 <nninit_network@plt>
add    $0x20,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
%struct.ParseState = type { i32 }
%struct.Value = type { i32 }
define void @Cnninit(%struct.ParseState* %0, %struct.Value* %1, %struct.Value** %2, i32 %3) {
%5 = alloca %struct.ParseState*
%6 = alloca %struct.Value*
%7 = alloca %struct.Value**
%8 = alloca i32
store %struct.ParseState* %0, %struct.ParseState** %5
store %struct.Value* %1, %struct.Value** %6
store %struct.Value** %2, %struct.Value*** %7
store i32 %3, i32* %8
%9 = call i32 (...) @nninit_network()
ret void
}

LLVM IR (-O2):
%struct.ParseState = type { i32 }
%struct.Value = type { i32 }
define void @Cnninit(%struct.ParseState* nocapture readnone %0, %struct.Value* nocapture readnone %1, %struct.Value** nocapture readnone %2, i32 %3) {
%5 = tail call i32 (...) @nninit_network()
ret void
}
/* Variables and functions */
int do_guest(char *, char *);
int do_start(char *username) {
  static char path[] = "/etc"
                       "/"
                       "ponyguests"
                       "/ponyguests-make-guest";
  return do_guest(path, username);
}


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

x86 assembly (clang, -O2):
<do_start>:
mov    %rdi,%rsi
lea    0x2f16(%rip),%rdi
jmp    1030 <do_guest@plt>

LLVM IR (-O0):
@do_start.path = internal global [38 x i8] c"/etc/ponyguests/ponyguests-make-guest\00"
define i32 @do_start(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 @do_guest(i8* getelementptr inbounds ([38 x i8], [38 x i8]* @do_start.path, i64 0, i64 0), i8* %3)
ret i32 %4
}

LLVM IR (-O2):
@do_start.path = internal global [38 x i8] c"/etc/ponyguests/ponyguests-make-guest\00"
define i32 @do_start(i8* %0) {
%2 = tail call i32 @do_guest(i8* getelementptr inbounds ([38 x i8], [38 x i8]* @do_start.path, i64 0, i64 0), i8* %0)
ret i32 %2
}
/* Variables and functions */
int EXIT_SUCCESS;
int /*<<< orphan*/ STDIN_FILENO;
int /*<<< orphan*/ STDOUT_FILENO;
scalar_t__ read(int /*<<< orphan*/, char *, int);
int /*<<< orphan*/ write(int /*<<< orphan*/, char *, int);
int main(int argc, char *argv[]) {
  char c;
  while (read(STDIN_FILENO, &c, 1) != 0) {
    write(STDOUT_FILENO, &c, 1);
  }
  return EXIT_SUCCESS;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    0x2e93(%rip),%rax
mov    (%rax),%edi
lea    -0x11(%rbp),%rsi
mov    $0x1,%edx
call   1040 <read@plt>
cmp    $0x0,%rax
je     1173 <main+0x53>
mov    0x2e92(%rip),%rax
mov    (%rax),%edi
lea    -0x11(%rbp),%rsi
mov    $0x1,%edx
call   1030 <write@plt>
jmp    1136 <main+0x16>
mov    0x2e5e(%rip),%rax
mov    (%rax),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r15
push   %r14
push   %rbx
sub    $0x10,%rsp
mov    0x2ea0(%rip),%r14
mov    (%r14),%edi
lea    0xf(%rsp),%rsi
mov    $0x1,%edx
call   1040 <read@plt>
test   %rax,%rax
je     1185 <main+0x65>
mov    0x2ea2(%rip),%r15
lea    0xf(%rsp),%rbx
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
mov    (%r15),%edi
mov    %rbx,%rsi
mov    $0x1,%edx
call   1030 <write@plt>
mov    (%r14),%edi
mov    %rbx,%rsi
mov    $0x1,%edx
call   1040 <read@plt>
test   %rax,%rax
jne    1160 <main+0x40>
mov    0x2e4c(%rip),%rax
mov    (%rax),%eax
add    $0x10,%rsp
pop    %rbx
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
@STDIN_FILENO = global i32 0
@STDOUT_FILENO = global i32 0
@EXIT_SUCCESS = global i32 0
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i8
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
br label %7
7: ; preds = %11, %2
%8 = load i32, i32* @STDIN_FILENO
%9 = call i64 @read(i32 %8, i8* %6, i32 1)
%10 = icmp ne i64 %9, 0
br i1 %10, label %11, label %14
11: ; preds = %7
%12 = load i32, i32* @STDOUT_FILENO
%13 = call i32 @write(i32 %12, i8* %6, i32 1)
br label %7
14: ; preds = %7
%15 = load i32, i32* @EXIT_SUCCESS
ret i32 %15
}

LLVM IR (-O2):
@STDIN_FILENO = global i32 0
@STDOUT_FILENO = global i32 0
@EXIT_SUCCESS = global i32 0
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = alloca i8
%4 = load i32, i32* @STDIN_FILENO
%5 = call i64 @read(i32 %4, i8* %3, i32 1)
%6 = icmp eq i64 %5, 0
br i1 %6, label %13, label %7
7: ; preds = %2, %7
%8 = load i32, i32* @STDOUT_FILENO
%9 = call i32 @write(i32 %8, i8* %3, i32 1)
%10 = load i32, i32* @STDIN_FILENO
%11 = call i64 @read(i32 %10, i8* %3, i32 1)
%12 = icmp eq i64 %11, 0
br i1 %12, label %13, label %7
13: ; preds = %7, %2
%14 = load i32, i32* @EXIT_SUCCESS
ret i32 %14
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, ...);
void print_test(int x, int y) {
  printf("printf:\n\tx + y = [%d]\n", x + y);
  (printf("PrintExpr:\n\t%s = [%d]\n", "x + y", (x + y)));
}


x86 assembly (clang, -O0):
<print_test>:
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
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x4(%rbp),%edx
add    -0x8(%rbp),%edx
lea    0xed8(%rip),%rdi
lea    0xee8(%rip),%rsi
mov    $0x0,%al
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<print_test>:
push   %rbx
lea    (%rsi,%rdi,1),%ebx
lea    0xee5(%rip),%rdi
mov    %ebx,%esi
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xeec(%rip),%rdi
lea    0xefc(%rip),%rsi
mov    %ebx,%edx
xor    %eax,%eax
pop    %rbx
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [23 x i8] c"printf:\0A\09x + y = [%d]\0A\00"
@.str.1 = [23 x i8] c"PrintExpr:\0A\09%s = [%d]\0A\00"
@.str.2 = [6 x i8] c"x + y\00"
define void @print_test(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 (i8*, ...) @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str, i64 0, i64 0), i32 %7)
%9 = load i32, i32* %3
%10 = load i32, i32* %4
%11 = add nsw i32 %9, %10
%12 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.2, i64 0, i64 0), i32 %11)
ret void
}

LLVM IR (-O2):
@.str = [23 x i8] c"printf:\0A\09x + y = [%d]\0A\00"
@.str.1 = [23 x i8] c"PrintExpr:\0A\09%s = [%d]\0A\00"
@.str.2 = [6 x i8] c"x + y\00"
define void @print_test(i32 %0, i32 %1) {
%3 = add nsw i32 %1, %0
%4 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([23 x i8], [23 x i8]* @.str, i64 0, i64 0), i32 %3)
%5 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([23 x i8], [23 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.2, i64 0, i64 0), i32 %3)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ uint8_t;

/* Variables and functions */
int /*<<< orphan*/ yescrypt_bsty(int /*<<< orphan*/ const *, int,
                                 int /*<<< orphan*/ const *, int, int, int, int,
                                 int /*<<< orphan*/ *, int);
void yescrypt_hash(const unsigned char *input, unsigned char *output) {
  yescrypt_bsty((const uint8_t *)input, 80, (const uint8_t *)input, 80, 2048, 8,
                1, (uint8_t *)output, 32);
}


x86 assembly (clang, -O0):
<yescrypt_hash>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x8(%rbp),%rdx
mov    -0x10(%rbp),%rax
mov    $0x50,%ecx
mov    $0x800,%r8d
mov    $0x8,%r9d
mov    %ecx,%esi
movl   $0x1,(%rsp)
mov    %rax,0x8(%rsp)
movl   $0x20,0x10(%rsp)
call   1030 <yescrypt_bsty@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<yescrypt_hash>:
push   %rax
mov    %rsi,%rax
sub    $0x8,%rsp
mov    $0x50,%esi
mov    %rdi,%rdx
mov    $0x50,%ecx
mov    $0x800,%r8d
mov    $0x8,%r9d
push   $0x20
push   %rax
push   $0x1
call   1030 <yescrypt_bsty@plt>
add    $0x20,%rsp
pop    %rax
ret

LLVM IR (-O0):
define void @yescrypt_hash(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
store i8* %0, i8** %3
store i8* %1, i8** %4
%5 = load i8*, i8** %3
%6 = bitcast i8* %5 to i32*
%7 = load i8*, i8** %3
%8 = bitcast i8* %7 to i32*
%9 = load i8*, i8** %4
%10 = bitcast i8* %9 to i32*
%11 = call i32 @yescrypt_bsty(i32* %6, i32 80, i32* %8, i32 80, i32 2048, i32 8, i32 1, i32* %10, i32 32)
ret void
}

LLVM IR (-O2):
define void @yescrypt_hash(i8* %0, i8* %1) {
%3 = bitcast i8* %0 to i32*
%4 = bitcast i8* %1 to i32*
%5 = tail call i32 @yescrypt_bsty(i32* %3, i32 80, i32* %3, i32 80, i32 2048, i32 8, i32 1, i32* %4, i32 32)
ret void
}
int fB() { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @fB() {
ret i32 0
}
void launch(void) {}


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

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

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

LLVM IR (-O2):
define void @launch() {
ret void
}
/* Variables and functions */
int sleep(unsigned int);
int mx_sleep(unsigned int seconds) {
  if (seconds)
    return sleep(seconds);
  return 0;
}


x86 assembly (clang, -O0):
<mx_sleep>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
cmpl   $0x0,-0x8(%rbp)
je     1135 <mx_sleep+0x25>
mov    -0x8(%rbp),%edi
call   1030 <sleep@plt>
mov    %eax,-0x4(%rbp)
jmp    113c <mx_sleep+0x2c>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<mx_sleep>:
test   %edi,%edi
je     1119 <mx_sleep+0x9>
jmp    1030 <sleep@plt>
xor    %eax,%eax
ret

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

LLVM IR (-O2):
define i32 @mx_sleep(i32 %0) {
%2 = icmp eq i32 %0, 0
br i1 %2, label %5, label %3
3: ; preds = %1
%4 = tail call i32 @sleep(i32 %0)
br label %5
5: ; preds = %1, %3
%6 = phi i32 [ %4, %3 ], [ 0, %1 ]
ret i32 %6
}
void TMR3TimerDestroy(void) {}


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

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

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

LLVM IR (-O2):
define void @TMR3TimerDestroy() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ dimms_read(unsigned int);
unsigned char pcibios_read_config_byte(int /*<<< orphan*/, scalar_t__, int);
int /*<<< orphan*/ set_ram_command(int);
void sdram_set_mode_register(void) {
  unsigned char byte;
  unsigned cas_mode;
  set_ram_command(0x3);
  byte = pcibios_read_config_byte(0, ((0x00 << 3) + 0), 0x76);
  cas_mode = byte & 0x4;
  cas_mode ^= 4;
  cas_mode <<= 2;
  cas_mode |= 0x2a;
  cas_mode <<= 3;
  dimms_read(cas_mode);
}


x86 assembly (clang, -O0):
<sdram_set_mode_register>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x3,%edi
call   1050 <set_ram_command@plt>
xor    %edi,%edi
xor    %eax,%eax
mov    %eax,%esi
mov    $0x76,%edx
call   1040 <pcibios_read_config_byte@plt>
mov    %al,-0x1(%rbp)
movzbl -0x1(%rbp),%eax
and    $0x4,%eax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
xor    $0x4,%eax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
shl    $0x2,%eax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
or     $0x2a,%eax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
shl    $0x3,%eax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%edi
call   1030 <dimms_read@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<sdram_set_mode_register>:
push   %rax
mov    $0x3,%edi
call   1050 <set_ram_command@plt>
xor    %edi,%edi
xor    %esi,%esi
mov    $0x76,%edx
call   1040 <pcibios_read_config_byte@plt>
shl    $0x2,%al
and    $0x10,%al
xor    $0x3a,%al
movzbl %al,%edi
shl    $0x3,%edi
pop    %rax
jmp    1030 <dimms_read@plt>

LLVM IR (-O0):
define void @sdram_set_mode_register() {
%1 = alloca i8
%2 = alloca i32
%3 = call i32 @set_ram_command(i32 3)
%4 = call zeroext i8 @pcibios_read_config_byte(i32 0, i64 0, i32 118)
store i8 %4, i8* %1
%5 = load i8, i8* %1
%6 = zext i8 %5 to i32
%7 = and i32 %6, 4
store i32 %7, i32* %2
%8 = load i32, i32* %2
%9 = xor i32 %8, 4
store i32 %9, i32* %2
%10 = load i32, i32* %2
%11 = shl i32 %10, 2
store i32 %11, i32* %2
%12 = load i32, i32* %2
%13 = or i32 %12, 42
store i32 %13, i32* %2
%14 = load i32, i32* %2
%15 = shl i32 %14, 3
store i32 %15, i32* %2
%16 = load i32, i32* %2
%17 = call i32 @dimms_read(i32 %16)
ret void
}

LLVM IR (-O2):
define void @sdram_set_mode_register() {
%1 = tail call i32 @set_ram_command(i32 3)
%2 = tail call zeroext i8 @pcibios_read_config_byte(i32 0, i64 0, i32 118)
%3 = shl i8 %2, 2
%4 = and i8 %3, 16
%5 = xor i8 %4, 58
%6 = zext i8 %5 to i32
%7 = shl nuw nsw i32 %6, 3
%8 = tail call i32 @dimms_read(i32 %7)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ glipKillImageWin(int);
int glutGetWindow();
int /*<<< orphan*/ glutHideWindow();
void _glipDefaultMenu(int sel) {
  int win;
  win = glutGetWindow();
  switch (sel) {
  case 9:
    glutHideWindow();
    break;
  case 10:
    glipKillImageWin(win);
    break;
  default:
    break;
  }
}


x86 assembly (clang, -O0):
<_glipDefaultMenu>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
xor    %eax,%eax
call   1030 <glutGetWindow@plt>
mov    %eax,-0x8(%rbp)
mov    -0x4(%rbp),%eax
mov    %eax,-0xc(%rbp)
sub    $0x9,%eax
je     116a <_glipDefaultMenu+0x3a>
jmp    1159 <_glipDefaultMenu+0x29>
mov    -0xc(%rbp),%eax
sub    $0xa,%eax
je     1176 <_glipDefaultMenu+0x46>
jmp    1183 <_glipDefaultMenu+0x53>
mov    $0x0,%al
call   1040 <glutHideWindow@plt>
jmp    1188 <_glipDefaultMenu+0x58>
mov    -0x8(%rbp),%edi
call   1050 <glipKillImageWin@plt>
jmp    1188 <_glipDefaultMenu+0x58>
jmp    1188 <_glipDefaultMenu+0x58>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<_glipDefaultMenu>:
push   %rbx
mov    %edi,%ebx
xor    %eax,%eax
call   1030 <glutGetWindow@plt>
cmp    $0xa,%ebx
je     114c <_glipDefaultMenu+0x1c>
cmp    $0x9,%ebx
jne    1154 <_glipDefaultMenu+0x24>
xor    %eax,%eax
pop    %rbx
jmp    1040 <glutHideWindow@plt>
mov    %eax,%edi
pop    %rbx
jmp    1050 <glipKillImageWin@plt>
pop    %rbx
ret

LLVM IR (-O0):
define void @_glipDefaultMenu(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %2
%4 = call i32 (...) @glutGetWindow()
store i32 %4, i32* %3
%5 = load i32, i32* %2
switch i32 %5, label %11 [
i32 9, label %6
i32 10, label %8
]
6: ; preds = %1
%7 = call i32 (...) @glutHideWindow()
br label %12
8: ; preds = %1
%9 = load i32, i32* %3
%10 = call i32 @glipKillImageWin(i32 %9)
br label %12
11: ; preds = %1
br label %12
12: ; preds = %11, %8, %6
ret void
}

LLVM IR (-O2):
define void @_glipDefaultMenu(i32 %0) {
%2 = tail call i32 (...) @glutGetWindow()
switch i32 %0, label %7 [
i32 9, label %3
i32 10, label %5
]
3: ; preds = %1
%4 = tail call i32 (...) @glutHideWindow()
br label %7
5: ; preds = %1
%6 = tail call i32 @glipKillImageWin(i32 %2)
br label %7
7: ; preds = %1, %5, %3
ret void
}
AR0A1(r0, r1, x0, x1, p0, p1) signed char r0, r1;
signed char *p0, *p1;
{
  if ((p0[10000000]) <= (*((signed char *)11111111)))
    return 1;
  else
    return 0;
}


x86 assembly (clang, -O0):
<AR0A1>:
push   %rbp
mov    %rsp,%rbp
mov    %esi,%eax
mov    %dil,%sil
mov    %sil,-0x5(%rbp)
mov    %al,-0x6(%rbp)
mov    %edx,-0xc(%rbp)
mov    %ecx,-0x10(%rbp)
mov    %r8,-0x18(%rbp)
mov    %r9,-0x20(%rbp)
mov    -0x18(%rbp),%rax
movsbl 0x989680(%rax),%eax
mov    $0xa98ac7,%ecx
movsbl (%rcx),%ecx
cmp    %ecx,%eax
jg     1145 <AR0A1+0x45>
movl   $0x1,-0x4(%rbp)
jmp    114c <AR0A1+0x4c>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<AR0A1>:
mov    0x989680(%r8),%cl
xor    %eax,%eax
cmp    0xa98ac7,%cl
setle  %al
ret

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

LLVM IR (-O2):
define i32 @AR0A1(i32 %0, i32 %1, i32 %2, i32 %3, i8* nocapture %4, i8* nocapture readnone %5) {
%7 = getelementptr inbounds i8, i8* %4, i64 10000000
%8 = load i8, i8* %7
%9 = load i8, i8* inttoptr (i64 11111111 to i8*)
%10 = icmp sle i8 %8, %9
%11 = zext i1 %10 to i32
ret i32 %11
}
/* Type definitions */
typedef int /*<<< orphan*/ GLint;
typedef int /*<<< orphan*/ GLenum;

/* Variables and functions */
int /*<<< orphan*/ __glGet_size(int /*<<< orphan*/);
GLint __glGetBooleanv_size(GLenum sq) { return __glGet_size(sq); }


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

x86 assembly (clang, -O2):
<__glGetBooleanv_size>:
jmp    1030 <__glGet_size@plt>

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

LLVM IR (-O2):
define i32 @__glGetBooleanv_size(i32 %0) {
%2 = tail call i32 @__glGet_size(i32 %0)
ret i32 %2
}
/* Variables and functions */
double sqrt(double);
double tosReal_sqrt(double x) { return sqrt(x); }


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

x86 assembly (clang, -O2):
<tosReal_sqrt>:
xorpd  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jb     111f <tosReal_sqrt+0xf>
sqrtsd %xmm0,%xmm0
ret
jmp    1030 <sqrt@plt>

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

LLVM IR (-O2):
define double @tosReal_sqrt(double %0) {
%2 = tail call double @sqrt(double %0)
ret double %2
}
unsigned hashatom(const void *x) { return (unsigned long)x >> 2; }


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

x86 assembly (clang, -O2):
<hashatom>:
mov    %rdi,%rax
shr    $0x2,%rax
ret

LLVM IR (-O0):
define i32 @hashatom(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = ptrtoint i8* %3 to i64
%5 = lshr i64 %4, 2
%6 = trunc i64 %5 to i32
ret i32 %6
}

LLVM IR (-O2):
define i32 @hashatom(i8* %0) {
%2 = ptrtoint i8* %0 to i64
%3 = lshr i64 %2, 2
%4 = trunc i64 %3 to i32
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ panic(char *);
int pipe2(int *, int);
void pipe_or_die(int pipefd[2], int flags) {
  int ret = pipe2(pipefd, flags);
  if (ret < 0)
    panic("Cannot create pipe2 event fd!\n");
}


x86 assembly (clang, -O0):
<pipe_or_die>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
call   1040 <pipe2@plt>
mov    %eax,-0x10(%rbp)
cmpl   $0x0,-0x10(%rbp)
jge    1154 <pipe_or_die+0x34>
lea    0xeb1(%rip),%rdi
call   1030 <panic@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<pipe_or_die>:
push   %rax
call   1040 <pipe2@plt>
test   %eax,%eax
js     112c <pipe_or_die+0xc>
pop    %rax
ret
lea    0xecd(%rip),%rdi
pop    %rax
jmp    1030 <panic@plt>

LLVM IR (-O0):
@.str = [31 x i8] c"Cannot create pipe2 event fd!\0A\00"
define void @pipe_or_die(i32* %0, i32 %1) {
%3 = alloca i32*
%4 = alloca i32
%5 = alloca i32
store i32* %0, i32** %3
store i32 %1, i32* %4
%6 = load i32*, i32** %3
%7 = load i32, i32* %4
%8 = call i32 @pipe2(i32* %6, i32 %7)
store i32 %8, i32* %5
%9 = load i32, i32* %5
%10 = icmp slt i32 %9, 0
br i1 %10, label %11, label %13
11: ; preds = %2
%12 = call i32 @panic(i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str, i64 0, i64 0))
br label %13
13: ; preds = %11, %2
ret void
}

LLVM IR (-O2):
@.str = [31 x i8] c"Cannot create pipe2 event fd!\0A\00"
define void @pipe_or_die(i32* %0, i32 %1) {
%3 = tail call i32 @pipe2(i32* %0, i32 %1)
%4 = icmp slt i32 %3, 0
br i1 %4, label %5, label %7
5: ; preds = %2
%6 = tail call i32 @panic(i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str, i64 0, i64 0))
br label %7
7: ; preds = %5, %2
ret void
}
/* Type definitions */
struct input_event {
  int type;
};

/* Variables and functions */
#define EV_MSC 129
#define EV_SYN 128
int filter_key_event(struct input_event *ev) {
  switch (ev->type) {
  case EV_SYN:
  case EV_MSC:
    return 0;
  default:
    return 1;
  }
}


x86 assembly (clang, -O0):
<filter_key_event>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    (%rax),%eax
add    $0xffffff80,%eax
sub    $0x1,%eax
ja     112b <filter_key_event+0x2b>
jmp    111f <filter_key_event+0x1f>
movl   $0x0,-0x4(%rbp)
jmp    1132 <filter_key_event+0x32>
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<filter_key_event>:
mov    (%rdi),%ecx
and    $0xfffffffe,%ecx
xor    %eax,%eax
cmp    $0x80,%ecx
setne  %al
ret

LLVM IR (-O0):
%struct.input_event = type { i32 }
define i32 @filter_key_event(%struct.input_event* %0) {
%2 = alloca i32
%3 = alloca %struct.input_event*
store %struct.input_event* %0, %struct.input_event** %3
%4 = load %struct.input_event*, %struct.input_event** %3
%5 = getelementptr inbounds %struct.input_event, %struct.input_event* %4, i32 0, i32 0
%6 = load i32, i32* %5
switch i32 %6, label %8 [
i32 128, label %7
i32 129, label %7
]
7: ; preds = %1, %1
store i32 0, i32* %2
br label %9
8: ; preds = %1
store i32 1, i32* %2
br label %9
9: ; preds = %8, %7
%10 = load i32, i32* %2
ret i32 %10
}

LLVM IR (-O2):
%struct.input_event = type { i32 }
define i32 @filter_key_event(%struct.input_event* nocapture %0) {
%2 = getelementptr inbounds %struct.input_event, %struct.input_event* %0, i64 0, i32 0
%3 = load i32, i32* %2
%4 = and i32 %3, -2
%5 = icmp ne i32 %4, 128
%6 = zext i1 %5 to i32
ret i32 %6
}
float floatSub(float a, float b) { return a - b; }


x86 assembly (clang, -O0):
<floatSub>:
push   %rbp
mov    %rsp,%rbp
movss  %xmm0,-0x4(%rbp)
movss  %xmm1,-0x8(%rbp)
movss  -0x4(%rbp),%xmm0
subss  -0x8(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<floatSub>:
subss  %xmm1,%xmm0
ret

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

LLVM IR (-O2):
define float @floatSub(float %0, float %1) {
%3 = fsub float %0, %1
ret float %3
}
/* Type definitions */
struct resist_config_t {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ resist_config_init(struct resist_config_t **, double, double,
                                      double, double, double, double, int);
void resist_config_init_default(struct resist_config_t **cfg) {
  resist_config_init(cfg, 3000.0, 10000.0, 10.0, 0.3, 60.0, 0.1, 32);
}


x86 assembly (clang, -O0):
<resist_config_init_default>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
movsd  0xed8(%rip),%xmm0
movsd  0xed8(%rip),%xmm1
movsd  0xed8(%rip),%xmm2
movsd  0xed8(%rip),%xmm3
movsd  0xed8(%rip),%xmm4
movsd  0xed8(%rip),%xmm5
mov    $0x20,%esi
call   1030 <resist_config_init@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<resist_config_init_default>:
movsd  0xee8(%rip),%xmm0
movsd  0xee8(%rip),%xmm1
movsd  0xee8(%rip),%xmm2
movsd  0xee8(%rip),%xmm3
movsd  0xee8(%rip),%xmm4
movsd  0xee8(%rip),%xmm5
mov    $0x20,%esi
jmp    1030 <resist_config_init@plt>

LLVM IR (-O0):
%struct.resist_config_t = type { i32 }
define void @resist_config_init_default(%struct.resist_config_t** %0) {
%2 = alloca %struct.resist_config_t**
store %struct.resist_config_t** %0, %struct.resist_config_t*** %2
%3 = load %struct.resist_config_t**, %struct.resist_config_t*** %2
%4 = call i32 @resist_config_init(%struct.resist_config_t** %3, double 3.000000e+03, double 1.000000e+04, double 1.000000e+01, double 3.000000e-01, double 6.000000e+01, double 1.000000e-01, i32 32)
ret void
}

LLVM IR (-O2):
%struct.resist_config_t = type { i32 }
define void @resist_config_init_default(%struct.resist_config_t** %0) {
%2 = tail call i32 @resist_config_init(%struct.resist_config_t** %0, double 3.000000e+03, double 1.000000e+04, double 1.000000e+01, double 3.000000e-01, double 6.000000e+01, double 1.000000e-01, i32 32)
ret void
}
/* Variables and functions */
char *strncpy(char *dest, const char *src, size_t count) {
  char *tmp = dest;
  while (count-- && (*dest++ = *src++) != '\0')
    ;
  return tmp;
}


x86 assembly (clang, -O0):
<strncpy>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x20(%rbp)
mov    -0x18(%rbp),%rcx
mov    %rcx,%rax
add    $0xffffffffffffffff,%rax
mov    %rax,-0x18(%rbp)
xor    %eax,%eax
cmp    $0x0,%rcx
mov    %al,-0x21(%rbp)
je     1164 <strncpy+0x64>
mov    -0x10(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x10(%rbp)
mov    (%rax),%al
mov    -0x8(%rbp),%rcx
mov    %rcx,%rdx
add    $0x1,%rdx
mov    %rdx,-0x8(%rbp)
mov    %al,(%rcx)
movsbl %al,%eax
cmp    $0x0,%eax
setne  %al
mov    %al,-0x21(%rbp)
mov    -0x21(%rbp),%al
test   $0x1,%al
jne    1174 <strncpy+0x74>
jmp    1179 <strncpy+0x79>
jmp    1118 <strncpy+0x18>
mov    -0x20(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<strncpy>:
mov    %rdi,%rax
xor    %ecx,%ecx
cs nopw 0x0(%rax,%rax,1)
nop
cmp    %rcx,%rdx
je     1126 <strncpy+0x26>
movzbl (%rsi,%rcx,1),%edi
mov    %dil,(%rax,%rcx,1)
add    $0x1,%rcx
test   %dil,%dil
jne    1110 <strncpy+0x10>
ret

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

LLVM IR (-O2):
define i8* @strncpy(i8* returned writeonly %0, i8* nocapture %1, i64 %2) {
br label %4
4: ; preds = %9, %3
%5 = phi i8* [ %1, %3 ], [ %11, %9 ]
%6 = phi i64 [ %2, %3 ], [ %10, %9 ]
%7 = phi i8* [ %0, %3 ], [ %13, %9 ]
%8 = icmp eq i64 %6, 0
br i1 %8, label %15, label %9
9: ; preds = %4
%10 = add i64 %6, -1
%11 = getelementptr inbounds i8, i8* %5, i64 1
%12 = load i8, i8* %5
%13 = getelementptr inbounds i8, i8* %7, i64 1
store i8 %12, i8* %7
%14 = icmp eq i8 %12, 0
br i1 %14, label %15, label %4
15: ; preds = %4, %9
ret i8* %0
}
/* Variables and functions */
int /*<<< orphan*/ rodaContador();
int /*<<< orphan*/ setup();
int main() {
  setup();
  rodaContador();
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x0,%al
call   1040 <setup@plt>
mov    $0x0,%al
call   1030 <rodaContador@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 (...) @setup()
%3 = call i32 (...) @rodaContador()
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @setup()
%2 = tail call i32 (...) @rodaContador()
ret i32 0
}
/* Type definitions */
typedef int /*<<< orphan*/ pthread_t;
typedef int /*<<< orphan*/ cpu_set_t;

/* Variables and functions */
int /*<<< orphan*/ CPU_SET(int /*<<< orphan*/, int /*<<< orphan*/ *);
int /*<<< orphan*/ CPU_ZERO(int /*<<< orphan*/ *);
int /*<<< orphan*/ printf(char *, int);
int /*<<< orphan*/ pthread_self();
int pthread_setaffinity_np(int /*<<< orphan*/, int, int /*<<< orphan*/ *);
int main() {
  pthread_t t = pthread_self();
  cpu_set_t cpuset;
  CPU_ZERO(&cpuset);
  CPU_SET(0, &cpuset);
  int rc = pthread_setaffinity_np(t, sizeof(cpu_set_t), &cpuset);
  printf("%d\n", rc);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1060 <pthread_self@plt>
mov    %eax,-0x4(%rbp)
lea    -0x8(%rbp),%rdi
call   1050 <CPU_ZERO@plt>
xor    %edi,%edi
lea    -0x8(%rbp),%rsi
call   1070 <CPU_SET@plt>
mov    -0x4(%rbp),%edi
mov    $0x4,%esi
lea    -0x8(%rbp),%rdx
call   1030 <pthread_setaffinity_np@plt>
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%esi
lea    0xe6c(%rip),%rdi
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r14
push   %rbx
push   %rax
xor    %eax,%eax
call   1060 <pthread_self@plt>
mov    %eax,%ebx
lea    0x4(%rsp),%r14
mov    %r14,%rdi
call   1050 <CPU_ZERO@plt>
xor    %edi,%edi
mov    %r14,%rsi
call   1070 <CPU_SET@plt>
mov    %ebx,%edi
mov    $0x4,%esi
mov    %r14,%rdx
call   1030 <pthread_setaffinity_np@plt>
lea    0xe76(%rip),%rdi
mov    %eax,%esi
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

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

LLVM IR (-O2):
@.str = [4 x i8] c"%d\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = tail call i32 (...) @pthread_self()
%3 = bitcast i32* %1 to i8*
%4 = call i32 @CPU_ZERO(i32* %1)
%5 = call i32 @CPU_SET(i32 0, i32* %1)
%6 = call i32 @pthread_setaffinity_np(i32 %2, i32 4, i32* %1)
%7 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %6)
ret i32 0
}
/* Variables and functions */
int strlen(char const *);
const char *pbu_ext(const char *path) {
  const char *p = path + strlen(path);
  while (path < p && '.' != p[-1])
    --p;
  return p;
}


x86 assembly (clang, -O0):
<pbu_ext>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <strlen@plt>
mov    %eax,%ecx
mov    -0x18(%rbp),%rax
movslq %ecx,%rcx
add    %rcx,%rax
mov    %rax,-0x10(%rbp)
mov    -0x8(%rbp),%rcx
xor    %eax,%eax
cmp    -0x10(%rbp),%rcx
mov    %al,-0x19(%rbp)
jae    1165 <pbu_ext+0x55>
mov    -0x10(%rbp),%rax
movsbl -0x1(%rax),%ecx
mov    $0x2e,%eax
cmp    %ecx,%eax
setne  %al
mov    %al,-0x19(%rbp)
mov    -0x19(%rbp),%al
test   $0x1,%al
jne    1175 <pbu_ext+0x65>
jmp    1186 <pbu_ext+0x76>
mov    -0x10(%rbp),%rax
add    $0xffffffffffffffff,%rax
mov    %rax,-0x10(%rbp)
jmp    113d <pbu_ext+0x2d>
mov    -0x10(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<pbu_ext>:
push   %rbx
mov    %rdi,%rbx
call   1030 <strlen@plt>
movslq %eax,%rcx
add    %rbx,%rcx
nop
mov    %rcx,%rax
cmp    %rbx,%rcx
jbe    1132 <pbu_ext+0x22>
lea    -0x1(%rax),%rcx
cmpb   $0x2e,-0x1(%rax)
jne    1120 <pbu_ext+0x10>
pop    %rbx
ret

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

LLVM IR (-O2):
define i8* @pbu_ext(i8* %0) {
%2 = tail call i32 @strlen(i8* %0)
%3 = sext i32 %2 to i64
%4 = getelementptr inbounds i8, i8* %0, i64 %3
br label %5
5: ; preds = %8, %1
%6 = phi i8* [ %4, %1 ], [ %9, %8 ]
%7 = icmp ugt i8* %6, %0
br i1 %7, label %8, label %12
8: ; preds = %5
%9 = getelementptr inbounds i8, i8* %6, i64 -1
%10 = load i8, i8* %9
%11 = icmp eq i8 %10, 46
br i1 %11, label %12, label %5
12: ; preds = %5, %8
ret i8* %6
}
/* Variables and functions */
int /*<<< orphan*/ assert(int);
int main() {
  int j;
  int k;
  int n;
  if (!((j == 0) && (k == n) && (n > 0)))
    return 0;
  while (j < n && n > 0) {
    j++;
    k--;
  }
  assert((k == 0));
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
cmpl   $0x0,-0x8(%rbp)
jne    113f <main+0x2f>
mov    -0xc(%rbp),%eax
cmp    -0x10(%rbp),%eax
jne    113f <main+0x2f>
cmpl   $0x0,-0x10(%rbp)
jg     114b <main+0x3b>
movl   $0x0,-0x4(%rbp)
jmp    11aa <main+0x9a>
jmp    1150 <main+0x40>
mov    -0x8(%rbp),%ecx
xor    %eax,%eax
cmp    -0x10(%rbp),%ecx
mov    %al,-0x11(%rbp)
jge    116b <main+0x5b>
cmpl   $0x0,-0x10(%rbp)
setg   %al
mov    %al,-0x11(%rbp)
mov    -0x11(%rbp),%al
test   $0x1,%al
jne    117b <main+0x6b>
jmp    1192 <main+0x82>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
mov    -0xc(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0xc(%rbp)
jmp    1150 <main+0x40>
cmpl   $0x0,-0xc(%rbp)
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <assert@plt>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
store i32 0, i32* %1
%5 = load i32, i32* %2
%6 = icmp eq i32 %5, 0
br i1 %6, label %7, label %14
7: ; preds = %0
%8 = load i32, i32* %3
%9 = load i32, i32* %4
%10 = icmp eq i32 %8, %9
br i1 %10, label %11, label %14
11: ; preds = %7
%12 = load i32, i32* %4
%13 = icmp sgt i32 %12, 0
br i1 %13, label %15, label %14
14: ; preds = %11, %7, %0
store i32 0, i32* %1
br label %35
15: ; preds = %11
br label %16
16: ; preds = %25, %15
%17 = load i32, i32* %2
%18 = load i32, i32* %4
%19 = icmp slt i32 %17, %18
br i1 %19, label %20, label %23
20: ; preds = %16
%21 = load i32, i32* %4
%22 = icmp sgt i32 %21, 0
br label %23
23: ; preds = %20, %16
%24 = phi i1 [ false, %16 ], [ %22, %20 ]
br i1 %24, label %25, label %30
25: ; preds = %23
%26 = load i32, i32* %2
%27 = add nsw i32 %26, 1
store i32 %27, i32* %2
%28 = load i32, i32* %3
%29 = add nsw i32 %28, -1
store i32 %29, i32* %3
br label %16
30: ; preds = %23
%31 = load i32, i32* %3
%32 = icmp eq i32 %31, 0
%33 = zext i1 %32 to i32
%34 = call i32 @assert(i32 %33)
store i32 0, i32* %1
br label %35
35: ; preds = %30, %14
%36 = load i32, i32* %1
ret i32 %36
}

LLVM IR (-O2):
define i32 @main() {
ret i32 0
}
void my_freevect(char **vect) {
  int i;
  for (i = 0; vect[i]; ++i)
    free(vect[i]);
  free(vect);
}


x86 assembly (clang, -O0):
<my_freevect>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
cmpq   $0x0,(%rax,%rcx,8)
je     1155 <my_freevect+0x45>
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
mov    (%rax,%rcx,8),%rdi
call   1030 <free@plt>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1123 <my_freevect+0x13>
mov    -0x8(%rbp),%rdi
call   1030 <free@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<my_freevect>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%r14
mov    (%rdi),%rdi
test   %rdi,%rdi
je     1141 <my_freevect+0x31>
lea    0x8(%r14),%rbx
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
call   1030 <free@plt>
mov    (%rbx),%rdi
add    $0x8,%rbx
test   %rdi,%rdi
jne    1130 <my_freevect+0x20>
mov    %r14,%rdi
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1030 <free@plt>

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

LLVM IR (-O2):
define void @my_freevect(i8** nocapture %0) {
%2 = load i8*, i8** %0
%3 = icmp eq i8* %2, null
br i1 %3, label %11, label %4
4: ; preds = %1, %4
%5 = phi i64 [ %7, %4 ], [ 0, %1 ]
%6 = phi i8* [ %9, %4 ], [ %2, %1 ]
tail call void @free(i8* %6)
%7 = add nuw nsw i64 %5, 1
%8 = getelementptr inbounds i8*, i8** %0, i64 %7
%9 = load i8*, i8** %8
%10 = icmp eq i8* %9, null
br i1 %10, label %11, label %4
11: ; preds = %4, %1
%12 = bitcast i8** %0 to i8*
tail call void @free(i8* %12)
ret void
}