xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ gen(char *);
void cgior(void) { gen("orq\t%rcx,%rax"); }


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

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

LLVM IR (-O0):
@.str = [14 x i8] c"orq\09%rcx,%rax\00"
define void @cgior() {
%1 = call i32 @gen(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [14 x i8] c"orq\09%rcx,%rax\00"
define void @cgior() {
%1 = tail call i32 @gen(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0))
ret void
}
/* Variables and functions */
scalar_t__ mock(char *);
char *cf_s_spooldir(char *s) { return (char *)mock(s); }


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

x86 assembly (clang, -O2):
<cf_s_spooldir>:
jmp    1030 <mock@plt>

LLVM IR (-O0):
define i8* @cf_s_spooldir(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i64 @mock(i8* %3)
%5 = inttoptr i64 %4 to i8*
ret i8* %5
}

LLVM IR (-O2):
define i8* @cf_s_spooldir(i8* %0) {
%2 = tail call i64 @mock(i8* %0)
%3 = inttoptr i64 %2 to i8*
ret i8* %3
}
/* Variables and functions */
int /*<<< orphan*/ free(void *);
void luaI_free(void *block) {
  *((int *)block) = -1;
  free(block);
}


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

x86 assembly (clang, -O2):
<luaI_free>:
movl   $0xffffffff,(%rdi)
jmp    1030 <free@plt>

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

LLVM IR (-O2):
define void @luaI_free(i8* nocapture %0) {
%2 = bitcast i8* %0 to i32*
store i32 -1, i32* %2
%3 = tail call i32 @free(i8* %0)
ret void
}
void display_post_error(void) {}


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

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

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

LLVM IR (-O2):
define void @display_post_error() {
ret void
}
int string_empty(const char *str) { return str[0] != 0; }


x86 assembly (clang, -O0):
<string_empty>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x0,%eax
setne  %al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<string_empty>:
xor    %eax,%eax
cmpb   $0x0,(%rdi)
setne  %al
ret

LLVM IR (-O0):
define i32 @string_empty(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = getelementptr inbounds i8, i8* %3, i64 0
%5 = load i8, i8* %4
%6 = sext i8 %5 to i32
%7 = icmp ne i32 %6, 0
%8 = zext i1 %7 to i32
ret i32 %8
}

LLVM IR (-O2):
define i32 @string_empty(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = icmp ne i8 %2, 0
%4 = zext i1 %3 to i32
ret i32 %4
}
void f1() {}


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

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

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

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

/* Variables and functions */
int O_CREAT;
int O_NOFOLLOW;
int O_WRONLY;
int /*<<< orphan*/ file_new(char const *, int, struct flow *, void *);
void file_append_new(const char *path, struct flow *flow, void *passthrough) {
  file_new(path, O_WRONLY | O_CREAT | O_NOFOLLOW, flow, passthrough);
}


x86 assembly (clang, -O0):
<file_append_new>:
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    0x2e99(%rip),%rax
mov    (%rax),%esi
mov    0x2ec0(%rip),%rax
or     (%rax),%esi
mov    0x2eaf(%rip),%rax
or     (%rax),%esi
mov    -0x10(%rbp),%rdx
mov    -0x18(%rbp),%rcx
call   1030 <file_new@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<file_append_new>:
mov    0x2eb1(%rip),%rcx
mov    0x2eda(%rip),%rax
mov    (%rax),%eax
or     (%rcx),%eax
mov    %rdx,%rcx
mov    %rsi,%rdx
mov    0x2ec1(%rip),%rsi
or     (%rsi),%eax
mov    %eax,%esi
jmp    1030 <file_new@plt>

LLVM IR (-O0):
%struct.flow = type { i32 }
@O_WRONLY = global i32 0
@O_CREAT = global i32 0
@O_NOFOLLOW = global i32 0
define void @file_append_new(i8* %0, %struct.flow* %1, i8* %2) {
%4 = alloca i8*
%5 = alloca %struct.flow*
%6 = alloca i8*
store i8* %0, i8** %4
store %struct.flow* %1, %struct.flow** %5
store i8* %2, i8** %6
%7 = load i8*, i8** %4
%8 = load i32, i32* @O_WRONLY
%9 = load i32, i32* @O_CREAT
%10 = or i32 %8, %9
%11 = load i32, i32* @O_NOFOLLOW
%12 = or i32 %10, %11
%13 = load %struct.flow*, %struct.flow** %5
%14 = load i8*, i8** %6
%15 = call i32 @file_new(i8* %7, i32 %12, %struct.flow* %13, i8* %14)
ret void
}

LLVM IR (-O2):
%struct.flow = type { i32 }
@O_WRONLY = global i32 0
@O_CREAT = global i32 0
@O_NOFOLLOW = global i32 0
define void @file_append_new(i8* %0, %struct.flow* %1, i8* %2) {
%4 = load i32, i32* @O_WRONLY
%5 = load i32, i32* @O_CREAT
%6 = or i32 %5, %4
%7 = load i32, i32* @O_NOFOLLOW
%8 = or i32 %6, %7
%9 = tail call i32 @file_new(i8* %0, i32 %8, %struct.flow* %1, i8* %2)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ showmat(int, size_t, double *);
void srv(size_t length, double *v) { showmat(1, length, v); }


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

x86 assembly (clang, -O2):
<srv>:
mov    %rsi,%rdx
mov    %rdi,%rsi
mov    $0x1,%edi
jmp    1030 <showmat@plt>

LLVM IR (-O0):
define void @srv(i64 %0, double* %1) {
%3 = alloca i64
%4 = alloca double*
store i64 %0, i64* %3
store double* %1, double** %4
%5 = load i64, i64* %3
%6 = load double*, double** %4
%7 = call i32 @showmat(i32 1, i64 %5, double* %6)
ret void
}

LLVM IR (-O2):
define void @srv(i64 %0, double* %1) {
%3 = tail call i32 @showmat(i32 1, i64 %0, double* %1)
ret void
}
/* Variables and functions */
unsigned char hex_digits_index(char);
unsigned char number_from_hex_digits(char ch1, char ch2) {
  unsigned char b;
  b = hex_digits_index(ch1) << 4;
  b += hex_digits_index(ch2);
  return b;
}


x86 assembly (clang, -O0):
<number_from_hex_digits>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %sil,%al
mov    %dil,%cl
mov    %cl,-0x1(%rbp)
mov    %al,-0x2(%rbp)
movsbl -0x1(%rbp),%edi
call   1030 <hex_digits_index@plt>
movzbl %al,%eax
shl    $0x4,%eax
mov    %al,-0x3(%rbp)
movsbl -0x2(%rbp),%edi
call   1030 <hex_digits_index@plt>
movzbl %al,%ecx
movzbl -0x3(%rbp),%eax
add    %ecx,%eax
mov    %al,-0x3(%rbp)
movzbl -0x3(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<number_from_hex_digits>:
push   %rbp
push   %rbx
push   %rax
mov    %esi,%ebp
call   1030 <hex_digits_index@plt>
mov    %eax,%ebx
shl    $0x4,%bl
mov    %ebp,%edi
call   1030 <hex_digits_index@plt>
add    %bl,%al
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
define zeroext i8 @number_from_hex_digits(i8 signext %0, i8 signext %1) {
%3 = alloca i8
%4 = alloca i8
%5 = alloca i8
store i8 %0, i8* %3
store i8 %1, i8* %4
%6 = load i8, i8* %3
%7 = call zeroext i8 @hex_digits_index(i8 signext %6)
%8 = zext i8 %7 to i32
%9 = shl i32 %8, 4
%10 = trunc i32 %9 to i8
store i8 %10, i8* %5
%11 = load i8, i8* %4
%12 = call zeroext i8 @hex_digits_index(i8 signext %11)
%13 = zext i8 %12 to i32
%14 = load i8, i8* %5
%15 = zext i8 %14 to i32
%16 = add nsw i32 %15, %13
%17 = trunc i32 %16 to i8
store i8 %17, i8* %5
%18 = load i8, i8* %5
ret i8 %18
}

LLVM IR (-O2):
define zeroext i8 @number_from_hex_digits(i8 signext %0, i8 signext %1) {
%3 = tail call zeroext i8 @hex_digits_index(i8 signext %0)
%4 = shl i8 %3, 4
%5 = tail call zeroext i8 @hex_digits_index(i8 signext %1)
%6 = add i8 %4, %5
ret i8 %6
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
int yield();
int main() {
  int i;
  for (i = 0; i < 5; i++) {
    printf("%d\n", yield());
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
cmpl   $0x5,-0x8(%rbp)
jge    1163 <main+0x43>
mov    $0x0,%al
call   1030 <yield@plt>
mov    %eax,%esi
lea    0xeb0(%rip),%rdi
call   1040 <printf@plt>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1136 <main+0x16>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
xor    %eax,%eax
call   1030 <yield@plt>
lea    0xed1(%rip),%rbx
mov    %rbx,%rdi
mov    %eax,%esi
call   1040 <printf@plt>
xor    %eax,%eax
call   1030 <yield@plt>
mov    %rbx,%rdi
mov    %eax,%esi
call   1040 <printf@plt>
xor    %eax,%eax
call   1030 <yield@plt>
mov    %rbx,%rdi
mov    %eax,%esi
call   1040 <printf@plt>
xor    %eax,%eax
call   1030 <yield@plt>
mov    %rbx,%rdi
mov    %eax,%esi
call   1040 <printf@plt>
xor    %eax,%eax
call   1030 <yield@plt>
mov    %rbx,%rdi
mov    %eax,%esi
call   1040 <printf@plt>
xor    %eax,%eax
pop    %rbx
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 0, i32* %2
br label %3
3: ; preds = %9, %0
%4 = load i32, i32* %2
%5 = icmp slt i32 %4, 5
br i1 %5, label %6, label %12
6: ; preds = %3
%7 = call i32 (...) @yield()
%8 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %7)
br label %9
9: ; preds = %6
%10 = load i32, i32* %2
%11 = add nsw i32 %10, 1
store i32 %11, i32* %2
br label %3
12: ; preds = %3
ret i32 0
}

LLVM IR (-O2):
@.str = [4 x i8] c"%d\0A\00"
define i32 @main() {
%1 = tail call i32 (...) @yield()
%2 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %1)
%3 = tail call i32 (...) @yield()
%4 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %3)
%5 = tail call i32 (...) @yield()
%6 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %5)
%7 = tail call i32 (...) @yield()
%8 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %7)
%9 = tail call i32 (...) @yield()
%10 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %9)
ret i32 0
}
/* Type definitions */
struct color_state {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ set_color(struct color_state *, double, double, double);
void set_black(struct color_state *cstate) { set_color(cstate, 0.0, 0.0, 0.0); }


x86 assembly (clang, -O0):
<set_black>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
xorps  %xmm2,%xmm2
movaps %xmm2,%xmm0
movaps %xmm2,%xmm1
call   1030 <set_color@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<set_black>:
xorps  %xmm0,%xmm0
xorps  %xmm1,%xmm1
xorps  %xmm2,%xmm2
jmp    1030 <set_color@plt>

LLVM IR (-O0):
%struct.color_state = type { i32 }
define void @set_black(%struct.color_state* %0) {
%2 = alloca %struct.color_state*
store %struct.color_state* %0, %struct.color_state** %2
%3 = load %struct.color_state*, %struct.color_state** %2
%4 = call i32 @set_color(%struct.color_state* %3, double 0.000000e+00, double 0.000000e+00, double 0.000000e+00)
ret void
}

LLVM IR (-O2):
%struct.color_state = type { i32 }
define void @set_black(%struct.color_state* %0) {
%2 = tail call i32 @set_color(%struct.color_state* %0, double 0.000000e+00, double 0.000000e+00, double 0.000000e+00)
ret void
}
void dump_scan(struct pci_access *__attribute__((unused)) a) {}


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

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

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

LLVM IR (-O2):
%struct.pci_access = type opaque
define void @dump_scan(%struct.pci_access* nocapture %0) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char *);
void Usage(char *f) { printf("Usage: %s <file> <file>\n", f); }


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

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

LLVM IR (-O0):
@.str = [25 x i8] c"Usage: %s <file> <file>\0A\00"
define void @Usage(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 @printf(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str, i64 0, i64 0), i8* %3)
ret void
}

LLVM IR (-O2):
@.str = [25 x i8] c"Usage: %s <file> <file>\0A\00"
define void @Usage(i8* %0) {
%2 = tail call i32 @printf(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str, i64 0, i64 0), i8* %0)
ret void
}
main() {
  int i = 0;
  do
    printf(i);
  while (i >= 0);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
movslq -0x8(%rbp),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
cmpl   $0x0,-0x8(%rbp)
jge    1126 <main+0x16>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
xor    %edi,%edi
xor    %eax,%eax
call   1030 <printf@plt>
jmp    1120 <main+0x10>

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
store i32 0, i32* %1
store i32 0, i32* %2
br label %3
3: ; preds = %8, %0
%4 = load i32, i32* %2
%5 = sext i32 %4 to i64
%6 = inttoptr i64 %5 to i8*
%7 = call i32 (i8*, ...) @printf(i8* %6)
br label %8
8: ; preds = %3
%9 = load i32, i32* %2
%10 = icmp sge i32 %9, 0
br i1 %10, label %3, label %11
11: ; preds = %8
%12 = load i32, i32* %1
ret i32 %12
}

LLVM IR (-O2):
define i32 @main() {
br label %1
1: ; preds = %1, %0
%2 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) null)
br label %1
}
/* Type definitions */
typedef int /*<<< orphan*/ Display;
typedef int /*<<< orphan*/ Bool;

/* Variables and functions */
int /*<<< orphan*/ XNVCTRLQueryTargetAttribute(int /*<<< orphan*/ *,
                                               int /*<<< orphan*/, int,
                                               unsigned int, unsigned int,
                                               int *);
Bool XNVCTRLQueryAttribute(Display *dpy, int screen, unsigned int display_mask,
                           unsigned int attribute, int *value) {
  return XNVCTRLQueryTargetAttribute(dpy, 0, screen, display_mask, attribute,
                                     value);
}


x86 assembly (clang, -O0):
<XNVCTRLQueryAttribute>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    %ecx,-0x14(%rbp)
mov    %r8,-0x20(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%edx
mov    -0x10(%rbp),%ecx
mov    -0x14(%rbp),%r8d
mov    -0x20(%rbp),%r9
xor    %esi,%esi
call   1030 <XNVCTRLQueryTargetAttribute@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<XNVCTRLQueryAttribute>:
mov    %r8,%r9
mov    %ecx,%r8d
mov    %edx,%ecx
mov    %esi,%edx
xor    %esi,%esi
jmp    1030 <XNVCTRLQueryTargetAttribute@plt>

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

LLVM IR (-O2):
define i32 @XNVCTRLQueryAttribute(i32* %0, i32 %1, i32 %2, i32 %3, i32* %4) {
%6 = tail call i32 @XNVCTRLQueryTargetAttribute(i32* %0, i32 0, i32 %1, i32 %2, i32 %3, i32* %4)
ret i32 %6
}
/* Variables and functions */
int /*<<< orphan*/ dump_config(int /*<<< orphan*/);
int /*<<< orphan*/ parse_args(int, char **);
int /*<<< orphan*/ stderr;
int main(int argc, char **argv) {
  parse_args(argc, argv);
  dump_config(stderr);
  return 0;
}


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

x86 assembly (clang, -O2):
<main>:
push   %rax
call   1030 <parse_args@plt>
mov    0x2eb3(%rip),%rax
mov    (%rax),%edi
call   1040 <dump_config@plt>
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
@stderr = global i32 0
define i32 @main(i32 %0, i8** %1) {
%3 = tail call i32 @parse_args(i32 %0, i8** %1)
%4 = load i32, i32* @stderr
%5 = tail call i32 @dump_config(i32 %4)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ __VERIFIER_error();
int fibo(int);
int main() {
  int x = 5;
  int result = fibo(x);
  if (result == 5) {
    __VERIFIER_error();
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x5,-0x8(%rbp)
mov    -0x8(%rbp),%edi
call   1040 <fibo@plt>
mov    %eax,-0xc(%rbp)
cmpl   $0x5,-0xc(%rbp)
jne    1152 <main+0x32>
mov    $0x0,%al
call   1030 <__VERIFIER_error@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    $0x5,%edi
call   1040 <fibo@plt>
cmp    $0x5,%eax
jne    1137 <main+0x17>
xor    %eax,%eax
call   1030 <__VERIFIER_error@plt>
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 @fibo(i32 5)
%2 = icmp eq i32 %1, 5
br i1 %2, label %3, label %5
3: ; preds = %0
%4 = tail call i32 (...) @__VERIFIER_error()
br label %5
5: ; preds = %3, %0
ret i32 0
}
/* Type definitions */
struct bfdsessiondata {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ bfdtx_onoff(struct bfdsessiondata *);
int /*<<< orphan*/ bfdtx_update_enable(struct bfdsessiondata *);
int /*<<< orphan*/ bfdtx_update_interval(struct bfdsessiondata *);
void bfdtx_update(struct bfdsessiondata *pb) {
  bfdtx_update_interval(pb);
  bfdtx_update_enable(pb);
  bfdtx_onoff(pb);
}


x86 assembly (clang, -O0):
<bfdtx_update>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1050 <bfdtx_update_interval@plt>
mov    -0x8(%rbp),%rdi
call   1030 <bfdtx_update_enable@plt>
mov    -0x8(%rbp),%rdi
call   1040 <bfdtx_onoff@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<bfdtx_update>:
push   %rbx
mov    %rdi,%rbx
call   1050 <bfdtx_update_interval@plt>
mov    %rbx,%rdi
call   1030 <bfdtx_update_enable@plt>
mov    %rbx,%rdi
pop    %rbx
jmp    1040 <bfdtx_onoff@plt>

LLVM IR (-O0):
%struct.bfdsessiondata = type { i32 }
define void @bfdtx_update(%struct.bfdsessiondata* %0) {
%2 = alloca %struct.bfdsessiondata*
store %struct.bfdsessiondata* %0, %struct.bfdsessiondata** %2
%3 = load %struct.bfdsessiondata*, %struct.bfdsessiondata** %2
%4 = call i32 @bfdtx_update_interval(%struct.bfdsessiondata* %3)
%5 = load %struct.bfdsessiondata*, %struct.bfdsessiondata** %2
%6 = call i32 @bfdtx_update_enable(%struct.bfdsessiondata* %5)
%7 = load %struct.bfdsessiondata*, %struct.bfdsessiondata** %2
%8 = call i32 @bfdtx_onoff(%struct.bfdsessiondata* %7)
ret void
}

LLVM IR (-O2):
%struct.bfdsessiondata = type { i32 }
define void @bfdtx_update(%struct.bfdsessiondata* %0) {
%2 = tail call i32 @bfdtx_update_interval(%struct.bfdsessiondata* %0)
%3 = tail call i32 @bfdtx_update_enable(%struct.bfdsessiondata* %0)
%4 = tail call i32 @bfdtx_onoff(%struct.bfdsessiondata* %0)
ret void
}
void wifi_rsp_tcpip_udp_connect(
    const struct wifi_msg_tcpip_udp_connect_rsp_t *msg) {}


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

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

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

LLVM IR (-O2):
%struct.wifi_msg_tcpip_udp_connect_rsp_t = type opaque
define void @wifi_rsp_tcpip_udp_connect(%struct.wifi_msg_tcpip_udp_connect_rsp_t* nocapture %0) {
ret void
}
int main() { int A[] = {1, 9, 2, 8, 3, 7, 4, 5}; }


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
mov    0xef5(%rip),%rax
mov    %rax,-0x20(%rbp)
mov    0xef2(%rip),%rax
mov    %rax,-0x18(%rbp)
mov    0xeef(%rip),%rax
mov    %rax,-0x10(%rbp)
mov    0xeec(%rip),%rax
mov    %rax,-0x8(%rbp)
xor    %eax,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
@__const.main.A = [8 x i32] [i32 1, i32 9, i32 2, i32 8, i32 3, i32 7, i32 4, i32 5]
define i32 @main() {
%1 = alloca [8 x i32]
%2 = bitcast [8 x i32]* %1 to i8*
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
ret i32 0
}
float vec2_distance_squared(float *a, float *b) {
  return (a[0] - b[0]) * (a[0] - b[0]) + (a[1] - b[1]) * (a[1] - b[1]);
}


x86 assembly (clang, -O0):
<vec2_distance_squared>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
movss  (%rax),%xmm0
mov    -0x10(%rbp),%rax
subss  (%rax),%xmm0
mov    -0x8(%rbp),%rax
movss  (%rax),%xmm2
mov    -0x10(%rbp),%rax
subss  (%rax),%xmm2
mov    -0x8(%rbp),%rax
movss  0x4(%rax),%xmm1
mov    -0x10(%rbp),%rax
subss  0x4(%rax),%xmm1
mov    -0x8(%rbp),%rax
movss  0x4(%rax),%xmm3
mov    -0x10(%rbp),%rax
subss  0x4(%rax),%xmm3
mulss  %xmm3,%xmm1
mulss  %xmm2,%xmm0
addss  %xmm1,%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<vec2_distance_squared>:
movss  (%rdi),%xmm0
movss  0x4(%rdi),%xmm1
subss  (%rsi),%xmm0
subss  0x4(%rsi),%xmm1
mulss  %xmm1,%xmm1
mulss  %xmm0,%xmm0
addss  %xmm1,%xmm0
ret

LLVM IR (-O0):
define float @vec2_distance_squared(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 = getelementptr inbounds float, float* %5, i64 0
%7 = load float, float* %6
%8 = load float*, float** %4
%9 = getelementptr inbounds float, float* %8, i64 0
%10 = load float, float* %9
%11 = fsub float %7, %10
%12 = load float*, float** %3
%13 = getelementptr inbounds float, float* %12, i64 0
%14 = load float, float* %13
%15 = load float*, float** %4
%16 = getelementptr inbounds float, float* %15, i64 0
%17 = load float, float* %16
%18 = fsub float %14, %17
%19 = load float*, float** %3
%20 = getelementptr inbounds float, float* %19, i64 1
%21 = load float, float* %20
%22 = load float*, float** %4
%23 = getelementptr inbounds float, float* %22, i64 1
%24 = load float, float* %23
%25 = fsub float %21, %24
%26 = load float*, float** %3
%27 = getelementptr inbounds float, float* %26, i64 1
%28 = load float, float* %27
%29 = load float*, float** %4
%30 = getelementptr inbounds float, float* %29, i64 1
%31 = load float, float* %30
%32 = fsub float %28, %31
%33 = fmul float %25, %32
%34 = call float @llvm.fmuladd.f32(float %11, float %18, float %33)
ret float %34
}

LLVM IR (-O2):
define float @vec2_distance_squared(float* nocapture %0, float* nocapture %1) {
%3 = load float, float* %0
%4 = load float, float* %1
%5 = fsub float %3, %4
%6 = getelementptr inbounds float, float* %0, i64 1
%7 = load float, float* %6
%8 = getelementptr inbounds float, float* %1, i64 1
%9 = load float, float* %8
%10 = fsub float %7, %9
%11 = fmul float %10, %10
%12 = tail call float @llvm.fmuladd.f32(float %5, float %5, float %11)
ret float %12
}
/* Variables and functions */
scalar_t__ nrfx_usbd_errata_type_52840_eng_a();
bool nrfx_usbd_errata_200(void) {
  return (1 && nrfx_usbd_errata_type_52840_eng_a());
}


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

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

LLVM IR (-O0):
define i32 @nrfx_usbd_errata_200() {
%1 = call i64 (...) @nrfx_usbd_errata_type_52840_eng_a()
%2 = icmp ne i64 %1, 0
%3 = zext i1 %2 to i32
ret i32 %3
}

LLVM IR (-O2):
define i32 @nrfx_usbd_errata_200() {
%1 = tail call i64 (...) @nrfx_usbd_errata_type_52840_eng_a()
%2 = icmp ne i64 %1, 0
%3 = zext i1 %2 to i32
ret i32 %3
}
float CG_OpFuncAdd(const float a, const float b) { return a + b; }


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

x86 assembly (clang, -O2):
<CG_OpFuncAdd>:
addss  %xmm1,%xmm0
ret

LLVM IR (-O0):
define float @CG_OpFuncAdd(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 = fadd float %5, %6
ret float %7
}

LLVM IR (-O2):
define float @CG_OpFuncAdd(float %0, float %1) {
%3 = fadd float %0, %1
ret float %3
}
/* Variables and functions */
scalar_t__ _errno(char *);
int main(int argc, char *argv[]) {
  int ret = 0;
  (void)argc;
  ret += _errno(argv[0]);
  return (ret == 0) ? 0 : 2;
}


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)
movl   $0x0,-0x14(%rbp)
mov    -0x10(%rbp),%rax
mov    (%rax),%rdi
call   1030 <_errno@plt>
mov    %rax,%rcx
movslq -0x14(%rbp),%rax
add    %rcx,%rax
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%edx
mov    $0x2,%eax
xor    %ecx,%ecx
cmp    $0x0,%edx
cmove  %ecx,%eax
add    $0x20,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i32
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
store i32 0, i32* %6
%7 = load i32, i32* %4
%8 = load i8**, i8*** %5
%9 = getelementptr inbounds i8*, i8** %8, i64 0
%10 = load i8*, i8** %9
%11 = call i64 @_errno(i8* %10)
%12 = load i32, i32* %6
%13 = sext i32 %12 to i64
%14 = add nsw i64 %13, %11
%15 = trunc i64 %14 to i32
store i32 %15, i32* %6
%16 = load i32, i32* %6
%17 = icmp eq i32 %16, 0
%18 = zext i1 %17 to i64
%19 = select i1 %17, i32 0, i32 2
ret i32 %19
}

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = load i8*, i8** %1
%4 = tail call i64 @_errno(i8* %3)
%5 = trunc i64 %4 to i32
%6 = icmp eq i32 %5, 0
%7 = select i1 %6, i32 0, i32 2
ret i32 %7
}
/* Variables and functions */
scalar_t__ getmem(size_t, int);
double *dgetmem(const int leng) {
  return ((double *)getmem((size_t)leng, sizeof(double)));
}


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

x86 assembly (clang, -O2):
<dgetmem>:
movslq %edi,%rdi
mov    $0x8,%esi
jmp    1030 <getmem@plt>

LLVM IR (-O0):
define double* @dgetmem(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = sext i32 %3 to i64
%5 = call i64 @getmem(i64 %4, i32 8)
%6 = inttoptr i64 %5 to double*
ret double* %6
}

LLVM IR (-O2):
define double* @dgetmem(i32 %0) {
%2 = sext i32 %0 to i64
%3 = tail call i64 @getmem(i64 %2, i32 8)
%4 = inttoptr i64 %3 to double*
ret double* %4
}
int calculate(int value) { return value * value; }


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

x86 assembly (clang, -O2):
<calculate>:
mov    %edi,%eax
imul   %edi,%eax
ret

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

LLVM IR (-O2):
define i32 @calculate(i32 %0) {
%2 = mul nsw i32 %0, %0
ret i32 %2
}
/* Variables and functions */
int /*<<< orphan*/ log_f(char *);
void joystickb_none_done(void) {
  log_f("joystickb:none: joystickb_none_done()\n");
}


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

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

LLVM IR (-O0):
@.str = [39 x i8] c"joystickb:none: joystickb_none_done()\0A\00"
define void @joystickb_none_done() {
%1 = call i32 @log_f(i8* getelementptr inbounds ([39 x i8], [39 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [39 x i8] c"joystickb:none: joystickb_none_done()\0A\00"
define void @joystickb_none_done() {
%1 = tail call i32 @log_f(i8* getelementptr inbounds ([39 x i8], [39 x i8]* @.str, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ sort16(unsigned long *);
void nibble_sort_koorogi2(unsigned long *buf) {
  for (int i = 0; i < 1024; i += 16)
    sort16(buf + i);
}


x86 assembly (clang, -O0):
<nibble_sort_koorogi2>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
cmpl   $0x400,-0xc(%rbp)
jge    1152 <nibble_sort_koorogi2+0x42>
mov    -0x8(%rbp),%rdi
movslq -0xc(%rbp),%rax
shl    $0x3,%rax
add    %rax,%rdi
call   1030 <sort16@plt>
mov    -0xc(%rbp),%eax
add    $0x10,%eax
mov    %eax,-0xc(%rbp)
jmp    1123 <nibble_sort_koorogi2+0x13>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<nibble_sort_koorogi2>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%r14
mov    $0xfffffffffffffff0,%rbx
xchg   %ax,%ax
mov    %r14,%rdi
call   1030 <sort16@plt>
add    $0x10,%rbx
sub    $0xffffffffffffff80,%r14
cmp    $0x3f0,%rbx
jb     1120 <nibble_sort_koorogi2+0x10>
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

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

LLVM IR (-O2):
define void @nibble_sort_koorogi2(i64* %0) {
br label %3
2: ; preds = %3
ret void
3: ; preds = %1, %3
%4 = phi i64 [ 0, %1 ], [ %7, %3 ]
%5 = getelementptr inbounds i64, i64* %0, i64 %4
%6 = tail call i32 @sort16(i64* %5)
%7 = add nuw nsw i64 %4, 16
%8 = icmp ult i64 %4, 1008
br i1 %8, label %3, label %2
}
/* Variables and functions */
int /*<<< orphan*/ checked_free(char *);
char *checked_malloc(int);
int /*<<< orphan*/ sprintf(char *, char *, unsigned int);
char *i_to_a(unsigned int i) {
  static char *a = NULL;
  checked_free(a);
  if (i > 2147483647)
    i = 2147483647;
  a = checked_malloc(10 + 1);
  sprintf(a, "%d", i);
  return a;
}


x86 assembly (clang, -O0):
<i_to_a>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    0x2efe(%rip),%rdi
call   1040 <checked_free@plt>
cmpl   $0x7fffffff,-0x4(%rbp)
jbe    115b <i_to_a+0x2b>
movl   $0x7fffffff,-0x4(%rbp)
mov    $0xb,%edi
call   1030 <checked_malloc@plt>
mov    %rax,0x2ed4(%rip)
mov    0x2ecd(%rip),%rdi
mov    -0x4(%rbp),%edx
lea    0xe83(%rip),%rsi
call   1050 <sprintf@plt>
mov    0x2eb7(%rip),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<i_to_a>:
push   %rbp
push   %rbx
push   %rax
mov    %edi,%ebx
mov    0x2f04(%rip),%rdi
call   1040 <checked_free@plt>
cmp    $0x7fffffff,%ebx
mov    $0x7fffffff,%ebp
cmovb  %ebx,%ebp
mov    $0xb,%edi
call   1030 <checked_malloc@plt>
mov    %rax,0x2ee0(%rip)
lea    0xe99(%rip),%rsi
mov    %rax,%rdi
mov    %ebp,%edx
call   1050 <sprintf@plt>
mov    0x2ec8(%rip),%rax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
@i_to_a.a = internal global i8* null
@.str = [3 x i8] c"%d\00"
define i8* @i_to_a(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i8*, i8** @i_to_a.a
%4 = call i32 @checked_free(i8* %3)
%5 = load i32, i32* %2
%6 = icmp ugt i32 %5, 2147483647
br i1 %6, label %7, label %8
7: ; preds = %1
store i32 2147483647, i32* %2
br label %8
8: ; preds = %7, %1
%9 = call i8* @checked_malloc(i32 11)
store i8* %9, i8** @i_to_a.a
%10 = load i8*, i8** @i_to_a.a
%11 = load i32, i32* %2
%12 = call i32 @sprintf(i8* %10, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 %11)
%13 = load i8*, i8** @i_to_a.a
ret i8* %13
}

LLVM IR (-O2):
@i_to_a.a = internal unnamed_addr global i8* null
@.str = [3 x i8] c"%d\00"
define i8* @i_to_a(i32 %0) {
%2 = load i8*, i8** @i_to_a.a
%3 = tail call i32 @checked_free(i8* %2)
%4 = icmp ult i32 %0, 2147483647
%5 = select i1 %4, i32 %0, i32 2147483647
%6 = tail call i8* @checked_malloc(i32 11)
store i8* %6, i8** @i_to_a.a
%7 = tail call i32 @sprintf(i8* dereferenceable(1) %6, i8* dereferenceable(1) getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 %5)
%8 = load i8*, i8** @i_to_a.a
ret i8* %8
}
int d_ge_rr2(double a1, double a2) { return !(((a1) >= (a2))); }


x86 assembly (clang, -O0):
<d_ge_rr2>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  -0x8(%rbp),%xmm0
ucomisd -0x10(%rbp),%xmm0
setae  %al
xor    $0xff,%al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<d_ge_rr2>:
xor    %eax,%eax
ucomisd %xmm1,%xmm0
setb   %al
ret

LLVM IR (-O0):
define i32 @d_ge_rr2(double %0, double %1) {
%3 = alloca double
%4 = alloca double
store double %0, double* %3
store double %1, double* %4
%5 = load double, double* %3
%6 = load double, double* %4
%7 = fcmp oge double %5, %6
%8 = xor i1 %7, true
%9 = zext i1 %8 to i32
ret i32 %9
}

LLVM IR (-O2):
define i32 @d_ge_rr2(double %0, double %1) {
%3 = fcmp ult double %0, %1
%4 = zext i1 %3 to i32
ret i32 %4
}
/* Variables and functions */
scalar_t__ EOF;
scalar_t__ getchar();
int /*<<< orphan*/ printf(char *, unsigned long);
main() {
  unsigned long int characters = 0;
  while (getchar() != EOF)
    characters++;
  printf("%d\n", characters);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movq   $0x0,-0x10(%rbp)
mov    $0x0,%al
call   1040 <getchar@plt>
mov    0x2ea3(%rip),%rcx
cmp    (%rcx),%rax
je     115f <main+0x3f>
mov    -0x10(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x10(%rbp)
jmp    1137 <main+0x17>
mov    -0x10(%rbp),%rsi
lea    0xe96(%rip),%rdi
call   1030 <printf@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r14
push   %rbx
push   %rax
mov    $0xffffffffffffffff,%rbx
mov    0x2eb6(%rip),%r14
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
xor    %eax,%eax
call   1040 <getchar@plt>
add    $0x1,%rbx
cmp    (%r14),%rax
jne    1140 <main+0x20>
lea    0xea9(%rip),%rdi
mov    %rbx,%rsi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

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

LLVM IR (-O2):
@EOF = global i64 0
@.str = [4 x i8] c"%d\0A\00"
define i32 @main() {
br label %1
1: ; preds = %1, %0
%2 = phi i64 [ 0, %0 ], [ %6, %1 ]
%3 = tail call i64 (...) @getchar()
%4 = load i64, i64* @EOF
%5 = icmp eq i64 %3, %4
%6 = add i64 %2, 1
br i1 %5, label %7, label %1
7: ; preds = %1
%8 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i64 %2)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ printf(char *, char *);
void help(void) {
  char *helpText =
      "Usage: bin2hex [-p <pad lenght>] [-b (Big Endian)] <input> <output>\n";
  printf("%s\n", helpText);
  exit(1);
}


x86 assembly (clang, -O0):
<help>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    0xed1(%rip),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rsi
lea    0xf07(%rip),%rdi
call   1030 <printf@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<help>:
push   %rax
lea    0xf1d(%rip),%rdi
lea    0xed1(%rip),%rsi
call   1030 <printf@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@.str = [69 x i8] c"Usage: bin2hex [-p <pad lenght>] [-b (Big Endian)] <input> <output>\0A\00"
@.str.1 = [4 x i8] c"%s\0A\00"
define void @help() {
%1 = alloca i8*
store i8* getelementptr inbounds ([69 x i8], [69 x i8]* @.str, i64 0, i64 0), i8** %1
%2 = load i8*, i8** %1
%3 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i8* %2)
%4 = call i32 @exit(i32 1)
unreachable
}

LLVM IR (-O2):
@.str = [69 x i8] c"Usage: bin2hex [-p <pad lenght>] [-b (Big Endian)] <input> <output>\0A\00"
@.str.1 = [4 x i8] c"%s\0A\00"
define void @help() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([69 x i8], [69 x i8]* @.str, i64 0, i64 0))
%2 = tail call i32 @exit(i32 1)
unreachable
}
/* Variables and functions */
int /*<<< orphan*/ debug(char *, ...);
int G60_f(char *s) {
  debug("G60_f(const char *s) is not yet implemented!\n");
  debug("%s\n", s);
  return 1;
}


x86 assembly (clang, -O0):
<G60_f>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
lea    0xedd(%rip),%rdi
mov    $0x0,%al
call   1030 <debug@plt>
mov    -0x8(%rbp),%rsi
lea    0xef9(%rip),%rdi
mov    $0x0,%al
call   1030 <debug@plt>
mov    $0x1,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<G60_f>:
push   %rbx
mov    %rdi,%rbx
lea    0xee5(%rip),%rdi
xor    %eax,%eax
call   1030 <debug@plt>
lea    0xf05(%rip),%rdi
mov    %rbx,%rsi
xor    %eax,%eax
call   1030 <debug@plt>
mov    $0x1,%eax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [46 x i8] c"G60_f(const char *s) is not yet implemented!\0A\00"
@.str.1 = [4 x i8] c"%s\0A\00"
define i32 @G60_f(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = call i32 (i8*, ...) @debug(i8* getelementptr inbounds ([46 x i8], [46 x i8]* @.str, i64 0, i64 0))
%4 = load i8*, i8** %2
%5 = call i32 (i8*, ...) @debug(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i8* %4)
ret i32 1
}

LLVM IR (-O2):
@.str = [46 x i8] c"G60_f(const char *s) is not yet implemented!\0A\00"
@.str.1 = [4 x i8] c"%s\0A\00"
define i32 @G60_f(i8* %0) {
%2 = tail call i32 (i8*, ...) @debug(i8* getelementptr inbounds ([46 x i8], [46 x i8]* @.str, i64 0, i64 0))
%3 = tail call i32 (i8*, ...) @debug(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i8* %0)
ret i32 1
}
/* Variables and functions */
int /*<<< orphan*/ free(char *);
void _free(char **p) { free(*p); }


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

x86 assembly (clang, -O2):
<_free>:
mov    (%rdi),%rdi
jmp    1030 <free@plt>

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

LLVM IR (-O2):
define void @_free(i8** nocapture %0) {
%2 = load i8*, i8** %0
%3 = tail call i32 @free(i8* %2)
ret void
}
/* Type definitions */
struct stat {
  int /*<<< orphan*/ st_mode;
};

/* Variables and functions */
scalar_t__ S_ISREG(int /*<<< orphan*/);
scalar_t__ stat(char *, struct stat *);
int _is_file_regular(char *pathname) {
  struct stat st;
  if (stat(pathname, &st) != 0)
    return 0;
  return S_ISREG(st.st_mode) ? 1 : 0;
}


x86 assembly (clang, -O0):
<_is_file_regular>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
lea    -0x18(%rbp),%rsi
call   1030 <stat@plt>
cmp    $0x0,%rax
je     114f <_is_file_regular+0x2f>
movl   $0x0,-0x4(%rbp)
jmp    116b <_is_file_regular+0x4b>
mov    -0x18(%rbp),%edi
call   1040 <S_ISREG@plt>
mov    %rax,%rdx
xor    %eax,%eax
mov    $0x1,%ecx
cmp    $0x0,%rdx
cmovne %ecx,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<_is_file_regular>:
push   %rax
mov    %rsp,%rsi
call   1030 <stat@plt>
mov    %rax,%rcx
xor    %eax,%eax
test   %rcx,%rcx
je     1135 <_is_file_regular+0x15>
pop    %rcx
ret
mov    (%rsp),%edi
call   1040 <S_ISREG@plt>
mov    %rax,%rcx
xor    %eax,%eax
test   %rcx,%rcx
setne  %al
pop    %rcx
ret

LLVM IR (-O0):
%struct.stat = type { i32 }
define i32 @_is_file_regular(i8* %0) {
%2 = alloca i32
%3 = alloca i8*
%4 = alloca %struct.stat
store i8* %0, i8** %3
%5 = load i8*, i8** %3
%6 = call i64 @stat(i8* %5, %struct.stat* %4)
%7 = icmp ne i64 %6, 0
br i1 %7, label %8, label %9
8: ; preds = %1
store i32 0, i32* %2
br label %16
9: ; preds = %1
%10 = getelementptr inbounds %struct.stat, %struct.stat* %4, i32 0, i32 0
%11 = load i32, i32* %10
%12 = call i64 @S_ISREG(i32 %11)
%13 = icmp ne i64 %12, 0
%14 = zext i1 %13 to i64
%15 = select i1 %13, i32 1, i32 0
store i32 %15, i32* %2
br label %16
16: ; preds = %9, %8
%17 = load i32, i32* %2
ret i32 %17
}

LLVM IR (-O2):
%struct.stat = type { i32 }
define i32 @_is_file_regular(i8* %0) {
%2 = alloca %struct.stat
%3 = bitcast %struct.stat* %2 to i8*
%4 = call i64 @stat(i8* %0, %struct.stat* %2)
%5 = icmp eq i64 %4, 0
br i1 %5, label %6, label %12
6: ; preds = %1
%7 = getelementptr inbounds %struct.stat, %struct.stat* %2, i64 0, i32 0
%8 = load i32, i32* %7
%9 = call i64 @S_ISREG(i32 %8)
%10 = icmp ne i64 %9, 0
%11 = zext i1 %10 to i32
br label %12
12: ; preds = %1, %6
%13 = phi i32 [ %11, %6 ], [ 0, %1 ]
ret i32 %13
}
int main() {
  int a;
  int b;
  int c;
  if (!(b + a)) {
    c = -a;
  } else {
    b = 0;
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
movl   $0x0,-0x4(%rbp)
mov    -0xc(%rbp),%eax
add    -0x8(%rbp),%eax
cmp    $0x0,%eax
jne    1127 <main+0x27>
xor    %eax,%eax
sub    -0x8(%rbp),%eax
mov    %eax,-0x10(%rbp)
jmp    112e <main+0x2e>
movl   $0x0,-0xc(%rbp)
xor    %eax,%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @main() {
ret i32 0
}
/* Type definitions */
struct ioctl_entry {
  int dummy;
};
struct ioctl_args {
  int dummy;
};

/* Variables and functions */
int do_get_ioctl_int(struct ioctl_args *, struct ioctl_entry *);
int get_delta(struct ioctl_args *args, struct ioctl_entry *entry) {
  return do_get_ioctl_int(args, entry);
}


x86 assembly (clang, -O0):
<get_delta>:
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 <do_get_ioctl_int@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_delta>:
jmp    1030 <do_get_ioctl_int@plt>

LLVM IR (-O0):
%struct.ioctl_args = type { i32 }
%struct.ioctl_entry = type { i32 }
define i32 @get_delta(%struct.ioctl_args* %0, %struct.ioctl_entry* %1) {
%3 = alloca %struct.ioctl_args*
%4 = alloca %struct.ioctl_entry*
store %struct.ioctl_args* %0, %struct.ioctl_args** %3
store %struct.ioctl_entry* %1, %struct.ioctl_entry** %4
%5 = load %struct.ioctl_args*, %struct.ioctl_args** %3
%6 = load %struct.ioctl_entry*, %struct.ioctl_entry** %4
%7 = call i32 @do_get_ioctl_int(%struct.ioctl_args* %5, %struct.ioctl_entry* %6)
ret i32 %7
}

LLVM IR (-O2):
%struct.ioctl_args = type { i32 }
%struct.ioctl_entry = type { i32 }
define i32 @get_delta(%struct.ioctl_args* %0, %struct.ioctl_entry* %1) {
%3 = tail call i32 @do_get_ioctl_int(%struct.ioctl_args* %0, %struct.ioctl_entry* %1)
ret i32 %3
}
void sws_freeFilter() {}


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

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

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

LLVM IR (-O2):
define void @sws_freeFilter() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int, int, int);
void MoverCursor(int x, int y) {
  printf("%c[%d;%df", 0x1B, y, x);
  return;
}


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

x86 assembly (clang, -O2):
<MoverCursor>:
mov    %esi,%edx
mov    %edi,%ecx
lea    0xee5(%rip),%rdi
mov    $0x1b,%esi
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [10 x i8] c"%c[%d;%df\00"
define void @MoverCursor(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%5 = load i32, i32* %4
%6 = load i32, i32* %3
%7 = call i32 @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i32 27, i32 %5, i32 %6)
ret void
}

LLVM IR (-O2):
@.str = [10 x i8] c"%c[%d;%df\00"
define void @MoverCursor(i32 %0, i32 %1) {
%3 = tail call i32 @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i32 27, i32 %1, i32 %0)
ret void
}
void useit1(const int *val) {
  static int usedval;
  usedval = *val;
}


x86 assembly (clang, -O0):
<useit1>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%eax
mov    %eax,0x2f10(%rip)
pop    %rbp
ret

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

LLVM IR (-O0):
@useit1.usedval = internal global i32 0
define void @useit1(i32* %0) {
%2 = alloca i32*
store i32* %0, i32** %2
%3 = load i32*, i32** %2
%4 = load i32, i32* %3
store i32 %4, i32* @useit1.usedval
ret void
}

LLVM IR (-O2):
define void @useit1(i32* nocapture %0) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ _os_platform_loop();
void os_loop() { _os_platform_loop(); }


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

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

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

LLVM IR (-O2):
define void @os_loop() {
%1 = tail call i32 (...) @_os_platform_loop()
ret void
}