xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ assert(int);
int setbits(int, int, int, int);
int main(void) {
  assert(setbits(21, 4, 3, 28) == 17);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x15,%edi
mov    $0x4,%esi
mov    $0x3,%edx
mov    $0x1c,%ecx
call   1040 <setbits@plt>
cmp    $0x11,%eax
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <assert@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    $0x15,%edi
mov    $0x4,%esi
mov    $0x3,%edx
mov    $0x1c,%ecx
call   1040 <setbits@plt>
xor    %edi,%edi
cmp    $0x11,%eax
sete   %dil
call   1030 <assert@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 @setbits(i32 21, i32 4, i32 3, i32 28)
%3 = icmp eq i32 %2, 17
%4 = zext i1 %3 to i32
%5 = call i32 @assert(i32 %4)
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 @setbits(i32 21, i32 4, i32 3, i32 28)
%2 = icmp eq i32 %1, 17
%3 = zext i1 %2 to i32
%4 = tail call i32 @assert(i32 %3)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void foo() { printf("123"); }


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

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

LLVM IR (-O0):
@.str = [4 x i8] c"123\00"
define void @foo() {
%1 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [4 x i8] c"123\00"
define void @foo() {
%1 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0))
ret void
}
void gdk_gc_set_fill() {}


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

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

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

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

/* Variables and functions */
scalar_t__ var_set_create_from_array(struct variable *const *, size_t);
struct const_var_set *
const_var_set_create_from_array(const struct variable *const *var, size_t s) {
  return (struct const_var_set *)var_set_create_from_array(
      (struct variable *const *)var, s);
}


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

x86 assembly (clang, -O2):
<const_var_set_create_from_array>:
jmp    1030 <var_set_create_from_array@plt>

LLVM IR (-O0):
%struct.const_var_set = type { i32 }
%struct.variable = type { i32 }
define %struct.const_var_set* @const_var_set_create_from_array(%struct.variable** %0, i64 %1) {
%3 = alloca %struct.variable**
%4 = alloca i64
store %struct.variable** %0, %struct.variable*** %3
store i64 %1, i64* %4
%5 = load %struct.variable**, %struct.variable*** %3
%6 = load i64, i64* %4
%7 = call i64 @var_set_create_from_array(%struct.variable** %5, i64 %6)
%8 = inttoptr i64 %7 to %struct.const_var_set*
ret %struct.const_var_set* %8
}

LLVM IR (-O2):
%struct.const_var_set = type { i32 }
%struct.variable = type { i32 }
define %struct.const_var_set* @const_var_set_create_from_array(%struct.variable** %0, i64 %1) {
%3 = tail call i64 @var_set_create_from_array(%struct.variable** %0, i64 %1)
%4 = inttoptr i64 %3 to %struct.const_var_set*
ret %struct.const_var_set* %4
}
void gfx_clear_display(void) {}


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

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

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

LLVM IR (-O2):
define void @gfx_clear_display() {
ret void
}
char peekb(int segment, int offset) { return 0; }


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

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

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

LLVM IR (-O2):
define signext i8 @peekb(i32 %0, i32 %1) {
ret i8 0
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ printf(char *);
void TERMhandler(int sig) {
  printf("Killed!\n");
  exit(1);
}


x86 assembly (clang, -O0):
<TERMhandler>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
lea    0xece(%rip),%rdi
call   1030 <printf@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

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

LLVM IR (-O0):
@.str = [9 x i8] c"Killed!\0A\00"
define void @TERMhandler(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = call i32 @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0))
%4 = call i32 @exit(i32 1)
unreachable
}

LLVM IR (-O2):
@str = [8 x i8] c"Killed!\00"
define void @TERMhandler(i32 %0) {
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([8 x i8], [8 x i8]* @str, i64 0, i64 0))
%3 = tail call i32 @exit(i32 1)
unreachable
}
/* Variables and functions */
scalar_t__ xislower(int);
scalar_t__ xisupper(int);
int xisalpha(int c) { return (xislower(c) || xisupper(c)); }


x86 assembly (clang, -O0):
<xisalpha>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
call   1040 <xislower@plt>
mov    %rax,%rcx
mov    $0x1,%al
cmp    $0x0,%rcx
mov    %al,-0x5(%rbp)
jne    1157 <xisalpha+0x37>
mov    -0x4(%rbp),%edi
call   1030 <xisupper@plt>
cmp    $0x0,%rax
setne  %al
mov    %al,-0x5(%rbp)
mov    -0x5(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<xisalpha>:
push   %rbx
mov    %edi,%ebx
call   1040 <xislower@plt>
mov    %rax,%rcx
mov    $0x1,%eax
test   %rcx,%rcx
je     1137 <xisalpha+0x17>
pop    %rbx
ret
mov    %ebx,%edi
call   1030 <xisupper@plt>
mov    %rax,%rcx
xor    %eax,%eax
test   %rcx,%rcx
setne  %al
pop    %rbx
ret

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

LLVM IR (-O2):
define i32 @xisalpha(i32 %0) {
%2 = tail call i64 @xislower(i32 %0)
%3 = icmp eq i64 %2, 0
br i1 %3, label %4, label %8
4: ; preds = %1
%5 = tail call i64 @xisupper(i32 %0)
%6 = icmp ne i64 %5, 0
%7 = zext i1 %6 to i32
br label %8
8: ; preds = %4, %1
%9 = phi i32 [ 1, %1 ], [ %7, %4 ]
ret i32 %9
}
/* Type definitions */
typedef int uint8_t;
typedef int /*<<< orphan*/ uint16_t;

/* Variables and functions */
int /*<<< orphan*/ chr1setBank7(int);
void vrc7setParamsD010(uint16_t addr, uint8_t val) {
  (void)addr;
  chr1setBank7(val << 10);
}


x86 assembly (clang, -O0):
<vrc7setParamsD010>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x8(%rbp),%edi
shl    $0xa,%edi
call   1030 <chr1setBank7@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<vrc7setParamsD010>:
mov    %esi,%edi
shl    $0xa,%edi
jmp    1030 <chr1setBank7@plt>

LLVM IR (-O0):
define void @vrc7setParamsD010(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 %6, 10
%8 = call i32 @chr1setBank7(i32 %7)
ret void
}

LLVM IR (-O2):
define void @vrc7setParamsD010(i32 %0, i32 %1) {
%3 = shl i32 %1, 10
%4 = tail call i32 @chr1setBank7(i32 %3)
ret void
}
/* Variables and functions */
scalar_t__ folder(char *, int);
int /*<<< orphan*/ printf(char *, char *);
int main(void) {
  char line[1000];
  while (folder(line, 1000) > 0)
    printf("%s", line);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x3f0,%rsp
movl   $0x0,-0x4(%rbp)
lea    -0x3f0(%rbp),%rdi
mov    $0x3e8,%esi
call   1040 <folder@plt>
cmp    $0x0,%rax
jle    1165 <main+0x45>
lea    -0x3f0(%rbp),%rsi
lea    0xea5(%rip),%rdi
call   1030 <printf@plt>
jmp    1132 <main+0x12>
xor    %eax,%eax
add    $0x3f0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r14
push   %rbx
sub    $0x3e8,%rsp
mov    %rsp,%rdi
mov    $0x3e8,%esi
call   1040 <folder@plt>
test   %rax,%rax
jle    116d <main+0x4d>
lea    0xebd(%rip),%r14
mov    %rsp,%rbx
cs nopw 0x0(%rax,%rax,1)
mov    %r14,%rdi
mov    %rbx,%rsi
call   1030 <printf@plt>
mov    %rbx,%rdi
mov    $0x3e8,%esi
call   1040 <folder@plt>
test   %rax,%rax
jg     1150 <main+0x30>
xor    %eax,%eax
add    $0x3e8,%rsp
pop    %rbx
pop    %r14
ret

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

LLVM IR (-O2):
@.str = [3 x i8] c"%s\00"
define i32 @main() {
%1 = alloca [1000 x i8]
%2 = getelementptr inbounds [1000 x i8], [1000 x i8]* %1, i64 0, i64 0
%3 = call i64 @folder(i8* %2, i32 1000)
%4 = icmp sgt i64 %3, 0
br i1 %4, label %5, label %9
5: ; preds = %0, %5
%6 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* %2)
%7 = call i64 @folder(i8* %2, i32 1000)
%8 = icmp sgt i64 %7, 0
br i1 %8, label %5, label %9
9: ; preds = %5, %0
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ endwin();
void doneconio(void) { endwin(); }


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

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

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

LLVM IR (-O2):
define void @doneconio() {
%1 = tail call i32 (...) @endwin()
ret void
}
/* Variables and functions */
int f();
int main(void) {
  f();
  f();
  f();
  return f();
}


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

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

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

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @f()
%2 = tail call i32 (...) @f()
%3 = tail call i32 (...) @f()
%4 = tail call i32 (...) @f()
ret i32 %4
}
/* Variables and functions */
int EXIT_SUCCESS;
int /*<<< orphan*/ puts(char *);
int main(void) {
  puts("Hello, Wandbox!");
  return EXIT_SUCCESS;
}


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

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

LLVM IR (-O0):
@.str = [16 x i8] c"Hello, Wandbox!\00"
@EXIT_SUCCESS = global i32 0
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 @puts(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0))
%3 = load i32, i32* @EXIT_SUCCESS
ret i32 %3
}

LLVM IR (-O2):
@.str = [16 x i8] c"Hello, Wandbox!\00"
@EXIT_SUCCESS = global i32 0
define i32 @main() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0))
%2 = load i32, i32* @EXIT_SUCCESS
ret i32 %2
}
/* Type definitions */
typedef int uint32_t;

/* Variables and functions */
int read_eflags();
bool interrupts_enabled() {
  uint32_t eflags = read_eflags();
  return eflags & (1 << 9);
}


x86 assembly (clang, -O0):
<interrupts_enabled>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1030 <read_eflags@plt>
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
and    $0x200,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<interrupts_enabled>:
push   %rax
xor    %eax,%eax
call   1030 <read_eflags@plt>
and    $0x200,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @interrupts_enabled() {
%1 = alloca i32
%2 = call i32 (...) @read_eflags()
store i32 %2, i32* %1
%3 = load i32, i32* %1
%4 = and i32 %3, 512
ret i32 %4
}

LLVM IR (-O2):
define i32 @interrupts_enabled() {
%1 = tail call i32 (...) @read_eflags()
%2 = and i32 %1, 512
ret i32 %2
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/ *, char *, char *);
void pr_POA(FILE *fp, bool POA) {
  fprintf(fp, "CC:Position offset applied:%s\n", ((POA) ? "Yes" : "No"));
}


x86 assembly (clang, -O0):
<pr_POA>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%ecx
lea    0xef6(%rip),%rdx
lea    0xeeb(%rip),%rax
cmp    $0x0,%ecx
cmovne %rax,%rdx
lea    0xebe(%rip),%rsi
call   1030 <fprintf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<pr_POA>:
test   %esi,%esi
lea    0xf0a(%rip),%rax
lea    0xeff(%rip),%rdx
cmove  %rax,%rdx
lea    0xed5(%rip),%rsi
jmp    1030 <fprintf@plt>

LLVM IR (-O0):
@.str = [31 x i8] c"CC:Position offset applied:%s\0A\00"
@.str.1 = [4 x i8] c"Yes\00"
@.str.2 = [3 x i8] c"No\00"
define void @pr_POA(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 = icmp ne i32 %6, 0
%8 = zext i1 %7 to i64
%9 = select i1 %7, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0)
%10 = call i32 @fprintf(i32* %5, i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str, i64 0, i64 0), i8* %9)
ret void
}

LLVM IR (-O2):
@.str = [31 x i8] c"CC:Position offset applied:%s\0A\00"
@.str.1 = [4 x i8] c"Yes\00"
@.str.2 = [3 x i8] c"No\00"
define void @pr_POA(i32* nocapture %0, i32 %1) {
%3 = icmp eq i32 %1, 0
%4 = select i1 %3, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0)
%5 = tail call i32 @fprintf(i32* %0, i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str, i64 0, i64 0), i8* %4)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
int main() {
  int i;
  for (i = 1; i <= 30000; i++) {
    if (i % 21 == 0) {
      printf("%d\n", i);
    }
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x1,-0x8(%rbp)
cmpl   $0x7530,-0x8(%rbp)
jg     1169 <main+0x59>
mov    -0x8(%rbp),%eax
mov    $0x15,%ecx
cltd
idiv   %ecx
cmp    $0x0,%edx
jne    1156 <main+0x46>
mov    -0x8(%rbp),%esi
lea    0xeaf(%rip),%rdi
call   1030 <printf@plt>
jmp    115b <main+0x4b>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1126 <main+0x16>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r14
push   %rbx
push   %rax
mov    $0x1,%ebx
lea    0xee0(%rip),%r14
jmp    113b <main+0x2b>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
add    $0x1,%ebx
cmp    $0x7531,%ebx
je     116c <main+0x5c>
movzwl %bx,%eax
imul   $0x8619,%eax,%ecx
shr    $0x10,%ecx
mov    %ebx,%edx
sub    %ecx,%edx
movzwl %dx,%edx
shr    %edx
add    %ecx,%edx
movzwl %dx,%ecx
shr    $0x4,%ecx
imul   $0xffffffeb,%ecx,%ecx
add    %cx,%ax
jne    1130 <main+0x20>
mov    %r14,%rdi
mov    %ebx,%esi
call   1030 <printf@plt>
jmp    1130 <main+0x20>
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
store i32 0, i32* %1
store i32 1, i32* %2
br label %3
3: ; preds = %14, %0
%4 = load i32, i32* %2
%5 = icmp sle i32 %4, 30000
br i1 %5, label %6, label %17
6: ; preds = %3
%7 = load i32, i32* %2
%8 = srem i32 %7, 21
%9 = icmp eq i32 %8, 0
br i1 %9, label %10, label %13
10: ; preds = %6
%11 = load i32, i32* %2
%12 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %11)
br label %13
13: ; preds = %10, %6
br label %14
14: ; preds = %13
%15 = load i32, i32* %2
%16 = add nsw i32 %15, 1
store i32 %16, i32* %2
br label %3
17: ; preds = %3
ret i32 0
}

LLVM IR (-O2):
@.str = [4 x i8] c"%d\0A\00"
define i32 @main() {
br label %1
1: ; preds = %0, %8
%2 = phi i32 [ 1, %0 ], [ %9, %8 ]
%3 = trunc i32 %2 to i16
%4 = urem i16 %3, 21
%5 = icmp eq i16 %4, 0
br i1 %5, label %6, label %8
6: ; preds = %1
%7 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %2)
br label %8
8: ; preds = %1, %6
%9 = add nuw nsw i32 %2, 1
%10 = icmp eq i32 %9, 30001
br i1 %10, label %11, label %1
11: ; preds = %8
ret i32 0
}
int emac2_etherstatspkts256to511octets_set(
    unsigned int dev_id, union emac2_etherstatspkts256to511octets_u *value) {
  return 1;
}


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

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

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

LLVM IR (-O2):
%union.emac2_etherstatspkts256to511octets_u = type opaque
define i32 @emac2_etherstatspkts256to511octets_set(i32 %0, %union.emac2_etherstatspkts256to511octets_u* nocapture readnone %1) {
ret i32 1
}
void nand_select() { *((volatile unsigned long *)0x70200004) &= ~(1 << 1); }


x86 assembly (clang, -O0):
<nand_select>:
push   %rbp
mov    %rsp,%rbp
mov    $0x70200004,%eax
mov    (%rax),%rcx
and    $0xfffffffffffffffd,%rcx
mov    $0x70200004,%eax
mov    %rcx,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<nand_select>:
andq   $0xfffffffffffffffd,0x70200004
70 fd
ret

LLVM IR (-O0):
define void @nand_select() {
%1 = load volatile i64, i64* inttoptr (i64 1881145348 to i64*)
%2 = and i64 %1, -3
store volatile i64 %2, i64* inttoptr (i64 1881145348 to i64*)
ret void
}

LLVM IR (-O2):
define void @nand_select() {
%1 = load volatile i64, i64* inttoptr (i64 1881145348 to i64*)
%2 = and i64 %1, -3
store volatile i64 %2, i64* inttoptr (i64 1881145348 to i64*)
ret void
}
int Media_SetVideoRect(int srcx, int srcy, int srcwidth, int srcheight,
                       int dstx, int dsty, int dstwidth, int dstheight) {
  return 0;
}


x86 assembly (clang, -O0):
<Media_SetVideoRect>:
push   %rbp
mov    %rsp,%rbp
mov    0x18(%rbp),%eax
mov    0x10(%rbp),%eax
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    %ecx,-0x10(%rbp)
mov    %r8d,-0x14(%rbp)
mov    %r9d,-0x18(%rbp)
xor    %eax,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @Media_SetVideoRect(i32 %0, i32 %1, i32 %2, i32 %3, i32 %4, i32 %5, i32 %6, i32 %7) {
%9 = alloca i32
%10 = alloca i32
%11 = alloca i32
%12 = alloca i32
%13 = alloca i32
%14 = alloca i32
%15 = alloca i32
%16 = alloca i32
store i32 %0, i32* %9
store i32 %1, i32* %10
store i32 %2, i32* %11
store i32 %3, i32* %12
store i32 %4, i32* %13
store i32 %5, i32* %14
store i32 %6, i32* %15
store i32 %7, i32* %16
ret i32 0
}

LLVM IR (-O2):
define i32 @Media_SetVideoRect(i32 %0, i32 %1, i32 %2, i32 %3, i32 %4, i32 %5, i32 %6, i32 %7) {
ret i32 0
}
/* Type definitions */
struct tdb_context {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ F_SETLK;
int /*<<< orphan*/ F_WRLCK;
int _tdb_lockall(struct tdb_context *, int /*<<< orphan*/, int /*<<< orphan*/);
int ext2fs_tdb_lockall_nonblock(struct tdb_context *tdb) {
  return _tdb_lockall(tdb, F_WRLCK, F_SETLK);
}


x86 assembly (clang, -O0):
<ext2fs_tdb_lockall_nonblock>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
mov    0x2eb1(%rip),%rax
mov    (%rax),%esi
mov    0x2eb8(%rip),%rax
mov    (%rax),%edx
call   1030 <_tdb_lockall@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ext2fs_tdb_lockall_nonblock>:
mov    0x2ec1(%rip),%rax
mov    (%rax),%esi
mov    0x2ec8(%rip),%rax
mov    (%rax),%edx
jmp    1030 <_tdb_lockall@plt>

LLVM IR (-O0):
%struct.tdb_context = type { i32 }
@F_WRLCK = global i32 0
@F_SETLK = global i32 0
define i32 @ext2fs_tdb_lockall_nonblock(%struct.tdb_context* %0) {
%2 = alloca %struct.tdb_context*
store %struct.tdb_context* %0, %struct.tdb_context** %2
%3 = load %struct.tdb_context*, %struct.tdb_context** %2
%4 = load i32, i32* @F_WRLCK
%5 = load i32, i32* @F_SETLK
%6 = call i32 @_tdb_lockall(%struct.tdb_context* %3, i32 %4, i32 %5)
ret i32 %6
}

LLVM IR (-O2):
%struct.tdb_context = type { i32 }
@F_WRLCK = global i32 0
@F_SETLK = global i32 0
define i32 @ext2fs_tdb_lockall_nonblock(%struct.tdb_context* %0) {
%2 = load i32, i32* @F_WRLCK
%3 = load i32, i32* @F_SETLK
%4 = tail call i32 @_tdb_lockall(%struct.tdb_context* %0, i32 %2, i32 %3)
ret i32 %4
}
unsigned invert(unsigned x, int p, int n) {
  return x ^ (~(~0 << n) << (p + 1 - n));
}


x86 assembly (clang, -O0):
<invert>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    -0x4(%rbp),%eax
mov    -0xc(%rbp),%ecx
mov    $0xffffffff,%edx
shl    %cl,%edx
xor    $0xffffffff,%edx
mov    -0x8(%rbp),%ecx
add    $0x1,%ecx
sub    -0xc(%rbp),%ecx
shl    %cl,%edx
mov    %edx,%ecx
xor    %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<invert>:
mov    %edx,%ecx
mov    $0xffffffff,%eax
shl    %cl,%eax
not    %eax
sub    %edx,%esi
lea    0x1(%rsi),%ecx
shl    %cl,%eax
xor    %edi,%eax
ret

LLVM IR (-O0):
define i32 @invert(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* %6
%9 = shl i32 -1, %8
%10 = xor i32 %9, -1
%11 = load i32, i32* %5
%12 = add nsw i32 %11, 1
%13 = load i32, i32* %6
%14 = sub nsw i32 %12, %13
%15 = shl i32 %10, %14
%16 = xor i32 %7, %15
ret i32 %16
}

LLVM IR (-O2):
define i32 @invert(i32 %0, i32 %1, i32 %2) {
%4 = shl nsw i32 -1, %2
%5 = xor i32 %4, -1
%6 = add nsw i32 %1, 1
%7 = sub i32 %6, %2
%8 = shl i32 %5, %7
%9 = xor i32 %8, %0
ret i32 %9
}
/* Variables and functions */
int /*<<< orphan*/ clang_analyzer_eval(int);
scalar_t__ strcasecmp(char *, char *);
void strcasecmp_diff_length_1() {
  char *x = "abc";
  char *y = "aBdef";
  clang_analyzer_eval(strcasecmp(x, y) < 0);
}


x86 assembly (clang, -O0):
<strcasecmp_diff_length_1>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    0xed1(%rip),%rax
mov    %rax,-0x8(%rbp)
lea    0xeca(%rip),%rax
mov    %rax,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1030 <strcasecmp@plt>
cmp    $0x0,%rax
setl   %al
and    $0x1,%al
movzbl %al,%edi
call   1040 <clang_analyzer_eval@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<strcasecmp_diff_length_1>:
push   %rax
lea    0xed8(%rip),%rdi
lea    0xed5(%rip),%rsi
call   1030 <strcasecmp@plt>
shr    $0x3f,%rax
mov    %eax,%edi
pop    %rax
jmp    1040 <clang_analyzer_eval@plt>

LLVM IR (-O0):
@.str = [4 x i8] c"abc\00"
@.str.1 = [6 x i8] c"aBdef\00"
define void @strcasecmp_diff_length_1() {
%1 = alloca i8*
%2 = alloca i8*
store i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8** %1
store i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), i8** %2
%3 = load i8*, i8** %1
%4 = load i8*, i8** %2
%5 = call i64 @strcasecmp(i8* %3, i8* %4)
%6 = icmp slt i64 %5, 0
%7 = zext i1 %6 to i32
%8 = call i32 @clang_analyzer_eval(i32 %7)
ret void
}

LLVM IR (-O2):
@.str = [4 x i8] c"abc\00"
@.str.1 = [6 x i8] c"aBdef\00"
define void @strcasecmp_diff_length_1() {
%1 = tail call i64 @strcasecmp(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0))
%2 = lshr i64 %1, 63
%3 = trunc i64 %2 to i32
%4 = tail call i32 @clang_analyzer_eval(i32 %3)
ret void
}
/* Type definitions */
struct list_head {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ __list_splice(struct list_head *, struct list_head *);
int /*<<< orphan*/ list_empty(struct list_head *);
void list_splice(struct list_head *list, struct list_head *at) {
  if (!list_empty(list))
    __list_splice(list, at);
}


x86 assembly (clang, -O0):
<list_splice>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <list_empty@plt>
cmp    $0x0,%eax
jne    114f <list_splice+0x2f>
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1030 <__list_splice@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<list_splice>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%r14
mov    %rdi,%rbx
call   1040 <list_empty@plt>
test   %eax,%eax
je     113b <list_splice+0x1b>
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret
mov    %rbx,%rdi
mov    %r14,%rsi
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1030 <__list_splice@plt>

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

LLVM IR (-O2):
%struct.list_head = type { i32 }
define void @list_splice(%struct.list_head* %0, %struct.list_head* %1) {
%3 = tail call i32 @list_empty(%struct.list_head* %0)
%4 = icmp eq i32 %3, 0
br i1 %4, label %5, label %7
5: ; preds = %2
%6 = tail call i32 @__list_splice(%struct.list_head* %0, %struct.list_head* %1)
br label %7
7: ; preds = %5, %2
ret void
}
void fd82(int n) {
P0A:
  goto P0A;
  {
    typedef int(*b)[n];
  P01A:
    goto P01A;
    {
      typedef int(*c)[n];
    P012A:
      goto P012A;
      0;
    }
  P01B:
    goto P01B;
    {
      typedef int(*d)[n];
    p013A:
      goto p013A;
      goto a;
    P013A:
      goto P013A;
      0;
    }
  P01C:
    goto P01C;
    ;
    typedef int(*e)[n];
  P014A:
    goto P014A;
    0;
  };
P0B:
  goto P0B;
  {
    typedef int(*f)[n];
  P02A:
    goto P02A;
    {
      typedef int(*g)[n];
    P024A:
      goto P024A;
      0;
    };
  P02B:
    goto P02B;
    {
      typedef int(*h)[n];
    P025A:
      goto P025A;
      0;
    };
  P02C:
    goto P02C;
    ;
    typedef int(*i)[n];
  P026A:
    goto P026A;
    0;
  };
a:;
  typedef int(*j)[n];
P03A:
  goto P03A;
  0;
P03B:
  goto P03B;
}


x86 assembly (clang, -O0):
<fd82>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
jmp    1107 <fd82+0x7>

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

LLVM IR (-O0):
define void @fd82(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
br label %3
3: ; preds = %3, %1
br label %3
4: ; No predecessors!
%5 = load i32, i32* %2
%6 = zext i32 %5 to i64
br label %7
7: ; preds = %7, %4
br label %7
8: ; No predecessors!
%9 = load i32, i32* %2
%10 = zext i32 %9 to i64
br label %11
11: ; preds = %11, %8
br label %11
12: ; preds = %12
br label %12
13: ; No predecessors!
%14 = load i32, i32* %2
%15 = zext i32 %14 to i64
br label %16
16: ; preds = %16, %13
br label %16
17: ; preds = %17
br label %17
18: ; preds = %18
br label %18
19: ; No predecessors!
%20 = load i32, i32* %2
%21 = zext i32 %20 to i64
br label %22
22: ; preds = %22, %19
br label %22
23: ; preds = %23
br label %23
24: ; No predecessors!
%25 = load i32, i32* %2
%26 = zext i32 %25 to i64
br label %27
27: ; preds = %27, %24
br label %27
28: ; No predecessors!
%29 = load i32, i32* %2
%30 = zext i32 %29 to i64
br label %31
31: ; preds = %31, %28
br label %31
32: ; preds = %32
br label %32
33: ; No predecessors!
%34 = load i32, i32* %2
%35 = zext i32 %34 to i64
br label %36
36: ; preds = %36, %33
br label %36
37: ; preds = %37
br label %37
38: ; No predecessors!
%39 = load i32, i32* %2
%40 = zext i32 %39 to i64
br label %41
41: ; preds = %41, %38
br label %41
42: ; No predecessors!
%43 = load i32, i32* %2
%44 = zext i32 %43 to i64
br label %45
45: ; preds = %45, %42
br label %45
46: ; preds = %46
br label %46
}

LLVM IR (-O2):
define void @fd82(i32 %0) {
br label %2
2: ; preds = %2, %1
br label %2
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char *, char *, char *);
int /*<<< orphan*/ stderr;
void usage(char *pname, char *msg) {
  fprintf(stderr,
          "%s: %s\nUsage: %s [ --id N ] [ --name NAME ] [ --password PASSWORD "
          "] [ --server ADDR ]\n  [ strategy options ]\n",
          pname, msg, pname);
  exit(1);
}


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

x86 assembly (clang, -O2):
<usage>:
push   %rax
mov    %rsi,%rcx
mov    %rdi,%rdx
mov    0x2eb2(%rip),%rax
mov    (%rax),%edi
lea    0xec9(%rip),%rsi
mov    %rdx,%r8
call   1030 <fprintf@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [110 x i8] c"%s: %s\0AUsage: %s [ --id N ] [ --name NAME ] [ --password PASSWORD ] [ --server ADDR ]\0A [ strategy options ]\0A\00"
define void @usage(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
store i8* %0, i8** %3
store i8* %1, i8** %4
%5 = load i32, i32* @stderr
%6 = load i8*, i8** %3
%7 = load i8*, i8** %4
%8 = load i8*, i8** %3
%9 = call i32 @fprintf(i32 %5, i8* getelementptr inbounds ([110 x i8], [110 x i8]* @.str, i64 0, i64 0), i8* %6, i8* %7, i8* %8)
%10 = call i32 @exit(i32 1)
unreachable
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [110 x i8] c"%s: %s\0AUsage: %s [ --id N ] [ --name NAME ] [ --password PASSWORD ] [ --server ADDR ]\0A [ strategy options ]\0A\00"
define void @usage(i8* %0, i8* %1) {
%3 = load i32, i32* @stderr
%4 = tail call i32 @fprintf(i32 %3, i8* getelementptr inbounds ([110 x i8], [110 x i8]* @.str, i64 0, i64 0), i8* %0, i8* %1, i8* %0)
%5 = tail call i32 @exit(i32 1)
unreachable
}
/* Variables and functions */
int trap1(int, unsigned long, int);
int _read(int file, char *ptr, int len) {
  return trap1(file, (unsigned long)ptr, 1);
}


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

x86 assembly (clang, -O2):
<_read>:
mov    $0x1,%edx
jmp    1030 <trap1@plt>

LLVM IR (-O0):
define i32 @_read(i32 %0, i8* %1, i32 %2) {
%4 = alloca i32
%5 = alloca i8*
%6 = alloca i32
store i32 %0, i32* %4
store i8* %1, i8** %5
store i32 %2, i32* %6
%7 = load i32, i32* %4
%8 = load i8*, i8** %5
%9 = ptrtoint i8* %8 to i64
%10 = call i32 @trap1(i32 %7, i64 %9, i32 1)
ret i32 %10
}

LLVM IR (-O2):
define i32 @_read(i32 %0, i8* %1, i32 %2) {
%4 = ptrtoint i8* %1 to i64
%5 = tail call i32 @trap1(i32 %0, i64 %4, i32 1)
ret i32 %5
}
void analogWriteDummy(struct wiringPiNodeStruct *node, int pin, int value) {
  return;
}


x86 assembly (clang, -O0):
<analogWriteDummy>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
pop    %rbp
ret

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

LLVM IR (-O0):
%struct.wiringPiNodeStruct = type opaque
define void @analogWriteDummy(%struct.wiringPiNodeStruct* %0, i32 %1, i32 %2) {
%4 = alloca %struct.wiringPiNodeStruct*
%5 = alloca i32
%6 = alloca i32
store %struct.wiringPiNodeStruct* %0, %struct.wiringPiNodeStruct** %4
store i32 %1, i32* %5
store i32 %2, i32* %6
ret void
}

LLVM IR (-O2):
%struct.wiringPiNodeStruct = type opaque
define void @analogWriteDummy(%struct.wiringPiNodeStruct* nocapture %0, i32 %1, i32 %2) {
ret void
}
int ft_isdigit(int c) {
  int retour;
  retour = 0;
  if (c >= '0' && c <= '9')
    retour = 1;
  return (retour);
}


x86 assembly (clang, -O0):
<ft_isdigit>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
cmpl   $0x30,-0x4(%rbp)
jl     1129 <ft_isdigit+0x29>
cmpl   $0x39,-0x4(%rbp)
jg     1129 <ft_isdigit+0x29>
movl   $0x1,-0x8(%rbp)
mov    -0x8(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<ft_isdigit>:
add    $0xffffffd0,%edi
xor    %eax,%eax
cmp    $0xa,%edi
setb   %al
ret

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

LLVM IR (-O2):
define i32 @ft_isdigit(i32 %0) {
%2 = add i32 %0, -48
%3 = icmp ult i32 %2, 10
%4 = zext i1 %3 to i32
ret i32 %4
}
/* Type definitions */
typedef int /*<<< orphan*/ uint32_t;
struct iscsi_context {
  int dummy;
};

/* Variables and functions */
int _iscsi_ids_get(struct iscsi_context *, int /*<<< orphan*/ **,
                   int /*<<< orphan*/ *, char *, char *);
int _iscsi_hids_get(struct iscsi_context *ctx, uint32_t **hids,
                    uint32_t *hid_count) {
  return _iscsi_ids_get(ctx, hids, hid_count, "/sys/class/iscsi_host", "host");
}


x86 assembly (clang, -O0):
<_iscsi_hids_get>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
lea    0xec9(%rip),%rcx
lea    0xed3(%rip),%r8
call   1030 <_iscsi_ids_get@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<_iscsi_hids_get>:
lea    0xee9(%rip),%rcx
lea    0xef3(%rip),%r8
jmp    1030 <_iscsi_ids_get@plt>

LLVM IR (-O0):
%struct.iscsi_context = type { i32 }
@.str = [22 x i8] c"/sys/class/iscsi_host\00"
@.str.1 = [5 x i8] c"host\00"
define i32 @_iscsi_hids_get(%struct.iscsi_context* %0, i32** %1, i32* %2) {
%4 = alloca %struct.iscsi_context*
%5 = alloca i32**
%6 = alloca i32*
store %struct.iscsi_context* %0, %struct.iscsi_context** %4
store i32** %1, i32*** %5
store i32* %2, i32** %6
%7 = load %struct.iscsi_context*, %struct.iscsi_context** %4
%8 = load i32**, i32*** %5
%9 = load i32*, i32** %6
%10 = call i32 @_iscsi_ids_get(%struct.iscsi_context* %7, i32** %8, i32* %9, i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0))
ret i32 %10
}

LLVM IR (-O2):
%struct.iscsi_context = type { i32 }
@.str = [22 x i8] c"/sys/class/iscsi_host\00"
@.str.1 = [5 x i8] c"host\00"
define i32 @_iscsi_hids_get(%struct.iscsi_context* %0, i32** %1, i32* %2) {
%4 = tail call i32 @_iscsi_ids_get(%struct.iscsi_context* %0, i32** %1, i32* %2, i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0))
ret i32 %4
}
/* Variables and functions */
void __aeabi_unwind_cpp_pr1(void) {}


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

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

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

LLVM IR (-O2):
define void @__aeabi_unwind_cpp_pr1() {
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ time_t;

/* Variables and functions */
double __infer_nondet_double();
double difftime(time_t time1, time_t time0) { return __infer_nondet_double(); }


x86 assembly (clang, -O0):
<difftime>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    $0x0,%al
call   1030 <__infer_nondet_double@plt>
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
define double @difftime(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%5 = call double (...) @__infer_nondet_double()
ret double %5
}

LLVM IR (-O2):
define double @difftime(i32 %0, i32 %1) {
%3 = tail call double (...) @__infer_nondet_double()
ret double %3
}
/* Variables and functions */
int /*<<< orphan*/ newUserFileCreator(char *);
int /*<<< orphan*/ newUserNameClashDetector(char *);
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ scanf(char *, char *);
void newUserRegistrationFunction() {
  char userName[20];
  printf("Enter the following details\n");
  printf("Username : ");
  scanf("%s", userName);
  newUserNameClashDetector(userName);
  newUserFileCreator(userName);
}


x86 assembly (clang, -O0):
<newUserRegistrationFunction>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
lea    0xeb1(%rip),%rdi
call   1030 <printf@plt>
lea    0xec2(%rip),%rdi
call   1030 <printf@plt>
lea    -0x20(%rbp),%rsi
lea    0xebe(%rip),%rdi
call   1060 <scanf@plt>
lea    -0x20(%rbp),%rdi
call   1040 <newUserNameClashDetector@plt>
lea    -0x20(%rbp),%rdi
call   1050 <newUserFileCreator@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<newUserRegistrationFunction>:
push   %rbx
sub    $0x20,%rsp
lea    0xeb3(%rip),%rdi
call   1030 <puts@plt>
lea    0xe98(%rip),%rdi
call   1040 <printf@plt>
lea    0xe98(%rip),%rdi
mov    %rsp,%rbx
mov    %rbx,%rsi
call   1070 <scanf@plt>
mov    %rbx,%rdi
call   1050 <newUserNameClashDetector@plt>
mov    %rbx,%rdi
call   1060 <newUserFileCreator@plt>
add    $0x20,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@.str = [29 x i8] c"Enter the following details\0A\00"
@.str.1 = [12 x i8] c"Username : \00"
@.str.2 = [3 x i8] c"%s\00"
define void @newUserRegistrationFunction() {
%1 = alloca [20 x i8]
%2 = call i32 @printf(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str, i64 0, i64 0))
%3 = call i32 @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.1, i64 0, i64 0))
%4 = getelementptr inbounds [20 x i8], [20 x i8]* %1, i64 0, i64 0
%5 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0), i8* %4)
%6 = getelementptr inbounds [20 x i8], [20 x i8]* %1, i64 0, i64 0
%7 = call i32 @newUserNameClashDetector(i8* %6)
%8 = getelementptr inbounds [20 x i8], [20 x i8]* %1, i64 0, i64 0
%9 = call i32 @newUserFileCreator(i8* %8)
ret void
}

LLVM IR (-O2):
@.str.1 = [12 x i8] c"Username : \00"
@.str.2 = [3 x i8] c"%s\00"
@str = [28 x i8] c"Enter the following details\00"
define void @newUserRegistrationFunction() {
%1 = alloca [20 x i8]
%2 = getelementptr inbounds [20 x i8], [20 x i8]* %1, i64 0, i64 0
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([28 x i8], [28 x i8]* @str, i64 0, i64 0))
%4 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([12 x i8], [12 x i8]* @.str.1, i64 0, i64 0))
%5 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0), i8* %2)
%6 = call i32 @newUserNameClashDetector(i8* %2)
%7 = call i32 @newUserFileCreator(i8* %2)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ randombytes(unsigned char *, int);
int random() {
  int out;
  randombytes((unsigned char *)&out, sizeof(int));
  return out;
}


x86 assembly (clang, -O0):
<random>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    -0x4(%rbp),%rdi
mov    $0x4,%esi
call   1030 <randombytes@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<random>:
push   %rax
lea    0x4(%rsp),%rdi
mov    $0x4,%esi
call   1030 <randombytes@plt>
mov    0x4(%rsp),%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @random() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
%3 = call i32 @randombytes(i8* %2, i32 4)
%4 = load i32, i32* %1
ret i32 %4
}

LLVM IR (-O2):
define i32 @random() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
%3 = call i32 @randombytes(i8* %2, i32 4)
%4 = load i32, i32* %1
ret i32 %4
}
/* Variables and functions */
char *strdup(char *);
char *cow_strdup(char *str) { return (strdup(str)); }


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

x86 assembly (clang, -O2):
<cow_strdup>:
jmp    1030 <strdup@plt>

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

LLVM IR (-O2):
define noalias i8* @cow_strdup(i8* nocapture %0) {
%2 = tail call i8* @strdup(i8* %0)
ret i8* %2
}
/* Variables and functions */
long double powl(long double, long double);
long double srgb_sample_to_linear_reference(long double in_f) {
  long double tmp;
  if (in_f <= 0.0404482362771082L) {
    return in_f / 12.92L;
  } else {
    tmp = ((in_f + 0.055L) / 1.055L);
    return powl(tmp, 2.4L);
  }
}


x86 assembly (clang, -O0):
<srgb_sample_to_linear_reference>:
push   %rbp
mov    %rsp,%rbp
sub    $0x50,%rsp
fldt   0x10(%rbp)
fstpt  -0x20(%rbp)
fldt   -0x20(%rbp)
fldt   0xed9(%rip)
fucomip %st(1),%st
fstp   %st(0)
jb     1149 <srgb_sample_to_linear_reference+0x39>
jmp    1136 <srgb_sample_to_linear_reference+0x26>
fldt   -0x20(%rbp)
fldt   0xf01(%rip)
fdivrp %st,%st(1)
fstpt  -0x10(%rbp)
jmp    1178 <srgb_sample_to_linear_reference+0x68>
fldt   -0x20(%rbp)
fldt   0xebe(%rip)
faddp  %st,%st(1)
fldt   0xec6(%rip)
fdivrp %st,%st(1)
fstpt  -0x30(%rbp)
fldt   -0x30(%rbp)
mov    %rsp,%rax
fldt   0xec5(%rip)
fstpt  0x10(%rax)
fstpt  (%rax)
call   1030 <powl@plt>
fstpt  -0x10(%rbp)
fldt   -0x10(%rbp)
add    $0x50,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<srgb_sample_to_linear_reference>:
sub    $0x28,%rsp
fldt   0x30(%rsp)
fldt   0xee2(%rip)
fucomip %st(1),%st
jae    1149 <srgb_sample_to_linear_reference+0x39>
fldt   0xef8(%rip)
faddp  %st,%st(1)
fldt   0xf00(%rip)
fdivrp %st,%st(1)
fldt   0xf08(%rip)
fstpt  0x10(%rsp)
fstpt  (%rsp)
call   1030 <powl@plt>
add    $0x28,%rsp
ret
fldt   0xec1(%rip)
fdivrp %st,%st(1)
add    $0x28,%rsp
ret

LLVM IR (-O0):
define x86_fp80 @srgb_sample_to_linear_reference(x86_fp80 %0) {
%2 = alloca x86_fp80
%3 = alloca x86_fp80
%4 = alloca x86_fp80
store x86_fp80 %0, x86_fp80* %3
%5 = load x86_fp80, x86_fp80* %3
%6 = fcmp ole x86_fp80 %5, 0xK3FFAA5AD0CBFDB624496
br i1 %6, label %7, label %10
7: ; preds = %1
%8 = load x86_fp80, x86_fp80* %3
%9 = fdiv x86_fp80 %8, 0xK4002CEB851EB851EB852
store x86_fp80 %9, x86_fp80* %2
br label %16
10: ; preds = %1
%11 = load x86_fp80, x86_fp80* %3
%12 = fadd x86_fp80 %11, 0xK3FFAE147AE147AE147AE
%13 = fdiv x86_fp80 %12, 0xK3FFF870A3D70A3D70A3D
store x86_fp80 %13, x86_fp80* %4
%14 = load x86_fp80, x86_fp80* %4
%15 = call x86_fp80 @powl(x86_fp80 %14, x86_fp80 0xK4000999999999999999A)
store x86_fp80 %15, x86_fp80* %2
br label %16
16: ; preds = %10, %7
%17 = load x86_fp80, x86_fp80* %2
ret x86_fp80 %17
}

LLVM IR (-O2):
define x86_fp80 @srgb_sample_to_linear_reference(x86_fp80 %0) {
%2 = fcmp ugt x86_fp80 %0, 0xK3FFAA5AD0CBFDB624496
br i1 %2, label %5, label %3
3: ; preds = %1
%4 = fdiv x86_fp80 %0, 0xK4002CEB851EB851EB852
br label %9
5: ; preds = %1
%6 = fadd x86_fp80 %0, 0xK3FFAE147AE147AE147AE
%7 = fdiv x86_fp80 %6, 0xK3FFF870A3D70A3D70A3D
%8 = tail call x86_fp80 @powl(x86_fp80 %7, x86_fp80 0xK4000999999999999999A)
br label %9
9: ; preds = %5, %3
%10 = phi x86_fp80 [ %4, %3 ], [ %8, %5 ]
ret x86_fp80 %10
}
unsigned int McASPDITChanStatRead(unsigned int baseAddr,
                                  unsigned int chStatBits,
                                  unsigned int channel) {
  unsigned int retVal = 0;
  if ((0x000000F0) == channel) {
    retVal =
        (*((volatile unsigned int *)(baseAddr + (0x100 + (chStatBits * 4)))));
  }
  if ((0x0000000F) == channel) {
    retVal =
        (*((volatile unsigned int *)(baseAddr + (0x118 + (chStatBits * 4)))));
  }
  return retVal;
}


x86 assembly (clang, -O0):
<McASPDITChanStatRead>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
movl   $0x0,-0x10(%rbp)
mov    $0xf0,%eax
cmp    -0xc(%rbp),%eax
jne    113a <McASPDITChanStatRead+0x3a>
mov    -0x4(%rbp),%eax
mov    -0x8(%rbp),%ecx
shl    $0x2,%ecx
add    $0x100,%ecx
add    %ecx,%eax
mov    %eax,%eax
mov    (%rax),%eax
mov    %eax,-0x10(%rbp)
mov    $0xf,%eax
cmp    -0xc(%rbp),%eax
jne    1160 <McASPDITChanStatRead+0x60>
mov    -0x4(%rbp),%eax
mov    -0x8(%rbp),%ecx
shl    $0x2,%ecx
add    $0x118,%ecx
add    %ecx,%eax
mov    %eax,%eax
mov    (%rax),%eax
mov    %eax,-0x10(%rbp)
mov    -0x10(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<McASPDITChanStatRead>:
cmp    $0xf0,%edx
je     1116 <McASPDITChanStatRead+0x16>
xor    %eax,%eax
cmp    $0xf,%edx
jne    1122 <McASPDITChanStatRead+0x22>
mov    $0x118,%eax
jmp    111b <McASPDITChanStatRead+0x1b>
mov    $0x100,%eax
add    %edi,%eax
lea    (%rax,%rsi,4),%eax
mov    (%rax),%eax
ret

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

LLVM IR (-O2):
define i32 @McASPDITChanStatRead(i32 %0, i32 %1, i32 %2) {
switch i32 %2, label %13 [
i32 240, label %5
i32 15, label %4
]
4: ; preds = %3
br label %5
5: ; preds = %3, %4
%6 = phi i32 [ 280, %4 ], [ 256, %3 ]
%7 = shl i32 %1, 2
%8 = add i32 %6, %0
%9 = add i32 %8, %7
%10 = zext i32 %9 to i64
%11 = inttoptr i64 %10 to i32*
%12 = load volatile i32, i32* %11
br label %13
13: ; preds = %5, %3
%14 = phi i32 [ 0, %3 ], [ %12, %5 ]
ret i32 %14
}