xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int /*<<< orphan*/, char *, int, char *);
int /*<<< orphan*/ iscntrl(int);
void t_iscntrl_0x1b() {
  Assert_real((iscntrl(27)),
              "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
              "2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/"
              "dg/z88dk/test/suites/ctype/test_iscntrl.c",
              140, ("iscntrl should be 1 for 0x1b"));
}


x86 assembly (clang, -O0):
<t_iscntrl_0x1b>:
push   %rbp
mov    %rsp,%rbp
mov    $0x1b,%edi
call   1030 <iscntrl@plt>
mov    %eax,%edi
lea    0xec9(%rip),%rsi
mov    $0x8c,%edx
lea    0xf65(%rip),%rcx
call   1040 <Assert_real@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<t_iscntrl_0x1b>:
push   %rax
mov    $0x1b,%edi
call   1030 <iscntrl@plt>
lea    0xece(%rip),%rsi
lea    0xf6f(%rip),%rcx
mov    %eax,%edi
mov    $0x8c,%edx
pop    %rax
jmp    1040 <Assert_real@plt>

LLVM IR (-O0):
@.str = [168 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/ctype/test_iscntrl.c\00"
@.str.1 = [29 x i8] c"iscntrl should be 1 for 0x1b\00"
define void @t_iscntrl_0x1b() {
%1 = call i32 @iscntrl(i32 27)
%2 = call i32 @Assert_real(i32 %1, i8* getelementptr inbounds ([168 x i8], [168 x i8]* @.str, i64 0, i64 0), i32 140, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [168 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/ctype/test_iscntrl.c\00"
@.str.1 = [29 x i8] c"iscntrl should be 1 for 0x1b\00"
define void @t_iscntrl_0x1b() {
%1 = tail call i32 @iscntrl(i32 27)
%2 = tail call i32 @Assert_real(i32 %1, i8* getelementptr inbounds ([168 x i8], [168 x i8]* @.str, i64 0, i64 0), i32 140, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ blinkdot();
int /*<<< orphan*/ sleep(double);
int blinkE() {
  blinkdot();
  sleep(1.5);
  return 0;
}


x86 assembly (clang, -O0):
<blinkE>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1030 <blinkdot@plt>
movsd  0xecd(%rip),%xmm0
call   1040 <sleep@plt>
xor    %eax,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<blinkE>:
push   %rax
xor    %eax,%eax
call   1030 <blinkdot@plt>
movsd  0xed0(%rip),%xmm0
call   1040 <sleep@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @blinkE() {
%1 = call i32 (...) @blinkdot()
%2 = call i32 @sleep(double 1.500000e+00)
ret i32 0
}

LLVM IR (-O2):
define i32 @blinkE() {
%1 = tail call i32 (...) @blinkdot()
%2 = tail call i32 @sleep(double 1.500000e+00)
ret i32 0
}
void print(ptr) char *ptr;
{
  int len = 0;
  char *p = ptr;
  while (*p != '\0')
    p++;
  write(1, ptr, p - ptr);
}


x86 assembly (clang, -O0):
<print>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x0,%eax
je     114c <print+0x3c>
mov    -0x18(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x18(%rbp)
jmp    112b <print+0x1b>
mov    -0x8(%rbp),%rsi
mov    -0x18(%rbp),%rdx
mov    -0x8(%rbp),%rax
sub    %rax,%rdx
mov    $0x1,%edi
mov    $0x0,%al
call   1030 <write@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<print>:
mov    %rdi,%rsi
mov    $0xffffffffffffffff,%rdx
nopw   0x0(%rax,%rax,1)
cmpb   $0x0,0x1(%rsi,%rdx,1)
lea    0x1(%rdx),%rdx
jne    1120 <print+0x10>
mov    $0x1,%edi
xor    %eax,%eax
jmp    1030 <write@plt>

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

LLVM IR (-O2):
define void @print(i8* %0) {
br label %2
2: ; preds = %2, %1
%3 = phi i8* [ %0, %1 ], [ %6, %2 ]
%4 = load i8, i8* %3
%5 = icmp eq i8 %4, 0
%6 = getelementptr inbounds i8, i8* %3, i64 1
br i1 %5, label %7, label %2
7: ; preds = %2
%8 = ptrtoint i8* %3 to i64
%9 = ptrtoint i8* %0 to i64
%10 = sub i64 %8, %9
%11 = tail call i32 (i32, i8*, i64, ...) bitcast (i32 (...)* @write to i32 (i32, i8*, i64, ...)*)(i32 1, i8* %0, i64 %10)
ret void
}
void SPI_MAX7221_RestoreConfig(void) {}


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

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

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

LLVM IR (-O2):
define void @SPI_MAX7221_RestoreConfig() {
ret void
}
void gtk_widget_remove_mnemonic_label() {}


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

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

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

LLVM IR (-O2):
define void @gtk_widget_remove_mnemonic_label() {
ret void
}
/* Variables and functions */
scalar_t__ match_indirect(char **, void *);
scalar_t__ match_star(char **, void *);
bool match_plus(char **p, void *bd) {
  return match_indirect(p, bd) && match_star(p, bd);
}


x86 assembly (clang, -O0):
<match_plus>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1030 <match_indirect@plt>
mov    %rax,%rcx
xor    %eax,%eax
cmp    $0x0,%rcx
mov    %al,-0x11(%rbp)
je     1166 <match_plus+0x46>
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1040 <match_star@plt>
cmp    $0x0,%rax
setne  %al
mov    %al,-0x11(%rbp)
mov    -0x11(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<match_plus>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%r14
mov    %rdi,%rbx
call   1030 <match_indirect@plt>
test   %rax,%rax
je     114c <match_plus+0x2c>
mov    %rbx,%rdi
mov    %r14,%rsi
call   1040 <match_star@plt>
mov    %rax,%rcx
xor    %eax,%eax
test   %rcx,%rcx
setne  %al
jmp    114e <match_plus+0x2e>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define i32 @match_plus(i8** %0, i8* %1) {
%3 = alloca i8**
%4 = alloca i8*
store i8** %0, i8*** %3
store i8* %1, i8** %4
%5 = load i8**, i8*** %3
%6 = load i8*, i8** %4
%7 = call i64 @match_indirect(i8** %5, i8* %6)
%8 = icmp ne i64 %7, 0
br i1 %8, label %9, label %14
9: ; preds = %2
%10 = load i8**, i8*** %3
%11 = load i8*, i8** %4
%12 = call i64 @match_star(i8** %10, i8* %11)
%13 = icmp ne i64 %12, 0
br label %14
14: ; preds = %9, %2
%15 = phi i1 [ false, %2 ], [ %13, %9 ]
%16 = zext i1 %15 to i32
ret i32 %16
}

LLVM IR (-O2):
define i32 @match_plus(i8** %0, i8* %1) {
%3 = tail call i64 @match_indirect(i8** %0, i8* %1)
%4 = icmp eq i64 %3, 0
br i1 %4, label %9, label %5
5: ; preds = %2
%6 = tail call i64 @match_star(i8** %0, i8* %1)
%7 = icmp ne i64 %6, 0
%8 = zext i1 %7 to i32
br label %9
9: ; preds = %5, %2
%10 = phi i32 [ 0, %2 ], [ %8, %5 ]
ret i32 %10
}
/* Type definitions */
typedef int ssize_t;
typedef int off_t;
typedef int /*<<< orphan*/ i5;
typedef int /*<<< orphan*/ i4;
typedef int /*<<< orphan*/ i3;
typedef int /*<<< orphan*/ i2;
typedef int /*<<< orphan*/ i1;
typedef int /*<<< orphan*/ i0;

/* Variables and functions */
int /*<<< orphan*/ printf(char *, int, int, int, int, int, int);
main() {
  short i0 = 1;
  off_t i1 = 1;
  size_t i2 = 1;
  long i3 = 1;
  long long i4 = 1;
  ssize_t i5 = 1;
  int l0 = sizeof(i0);
  int l1 = sizeof(i1);
  int l2 = sizeof(i2);
  int l3 = sizeof(i3);
  int l4 = sizeof(i4);
  int l5 = sizeof(i5);
  printf("%d %d %d %d %d %d\n", l0, l1, l2, l3, l4, l5);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x50,%rsp
movw   $0x1,-0x2(%rbp)
movl   $0x1,-0x8(%rbp)
movq   $0x1,-0x10(%rbp)
movq   $0x1,-0x18(%rbp)
movq   $0x1,-0x20(%rbp)
movl   $0x1,-0x24(%rbp)
movl   $0x2,-0x28(%rbp)
movl   $0x4,-0x2c(%rbp)
movl   $0x8,-0x30(%rbp)
movl   $0x8,-0x34(%rbp)
movl   $0x8,-0x38(%rbp)
movl   $0x4,-0x3c(%rbp)
mov    -0x28(%rbp),%esi
mov    -0x2c(%rbp),%edx
mov    -0x30(%rbp),%ecx
mov    -0x34(%rbp),%r8d
mov    -0x38(%rbp),%r9d
mov    -0x3c(%rbp),%eax
lea    0xe77(%rip),%rdi
mov    %eax,(%rsp)
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x50,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
movl   $0x4,(%rsp)
lea    0xee1(%rip),%rdi
mov    $0x2,%esi
mov    $0x4,%edx
mov    $0x8,%ecx
mov    $0x8,%r8d
mov    $0x8,%r9d
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [19 x i8] c"%d %d %d %d %d %d\0A\00"
define i32 @main() {
%1 = alloca i16
%2 = alloca i32
%3 = alloca i64
%4 = alloca i64
%5 = alloca i64
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32
%10 = alloca i32
%11 = alloca i32
%12 = alloca i32
store i16 1, i16* %1
store i32 1, i32* %2
store i64 1, i64* %3
store i64 1, i64* %4
store i64 1, i64* %5
store i32 1, i32* %6
store i32 2, i32* %7
store i32 4, i32* %8
store i32 8, i32* %9
store i32 8, i32* %10
store i32 8, i32* %11
store i32 4, i32* %12
%13 = load i32, i32* %7
%14 = load i32, i32* %8
%15 = load i32, i32* %9
%16 = load i32, i32* %10
%17 = load i32, i32* %11
%18 = load i32, i32* %12
%19 = call i32 @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0), i32 %13, i32 %14, i32 %15, i32 %16, i32 %17, i32 %18)
ret i32 0
}

LLVM IR (-O2):
@.str = [19 x i8] c"%d %d %d %d %d %d\0A\00"
define i32 @main() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0), i32 2, i32 4, i32 8, i32 8, i32 8, i32 4)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int main(int ac, char **av) {
  printf("Hello World !\n");
  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)
lea    0xed3(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
@.str = [15 x i8] c"Hello World !\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%6 = call i32 @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@str = [14 x i8] c"Hello World !\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([14 x i8], [14 x i8]* @str, i64 0, i64 0))
ret i32 0
}
/* Variables and functions */
double atan(double);
double Func_Atan(double *oplist, unsigned int numops) {
  return atan(oplist[0]);
}


x86 assembly (clang, -O0):
<Func_Atan>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rax
movsd  (%rax),%xmm0
call   1030 <atan@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Func_Atan>:
movsd  (%rdi),%xmm0
jmp    1030 <atan@plt>

LLVM IR (-O0):
define double @Func_Atan(double* %0, i32 %1) {
%3 = alloca double*
%4 = alloca i32
store double* %0, double** %3
store i32 %1, i32* %4
%5 = load double*, double** %3
%6 = getelementptr inbounds double, double* %5, i64 0
%7 = load double, double* %6
%8 = call double @atan(double %7)
ret double %8
}

LLVM IR (-O2):
define double @Func_Atan(double* nocapture %0, i32 %1) {
%3 = load double, double* %0
%4 = tail call double @atan(double %3)
ret double %4
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, ...);
void speed_usage(char *fct) {
  printf("usage:  %s -slot <num>", fct);
  printf(" [-rsa_keygen] [-rsa_signverify]");
  printf(" [-rsa_endecrypt] [-des3] [-aes] [-sha]");
  printf(" [-h] \n\n");
  return;
}


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

x86 assembly (clang, -O2):
<speed_usage>:
push   %rax
mov    %rdi,%rsi
lea    0xed5(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xede(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xef1(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xf0b(%rip),%rdi
pop    %rax
jmp    1030 <puts@plt>

LLVM IR (-O0):
@.str = [23 x i8] c"usage: %s -slot <num>\00"
@.str.1 = [33 x i8] c" [-rsa_keygen] [-rsa_signverify]\00"
@.str.2 = [40 x i8] c" [-rsa_endecrypt] [-des3] [-aes] [-sha]\00"
@.str.3 = [9 x i8] c" [-h] \0A\0A\00"
define void @speed_usage(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str, i64 0, i64 0), i8* %3)
%5 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str.1, i64 0, i64 0))
%6 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str.2, i64 0, i64 0))
%7 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.3, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [23 x i8] c"usage: %s -slot <num>\00"
@.str.1 = [33 x i8] c" [-rsa_keygen] [-rsa_signverify]\00"
@.str.2 = [40 x i8] c" [-rsa_endecrypt] [-des3] [-aes] [-sha]\00"
@str = [8 x i8] c" [-h] \0A\00"
define void @speed_usage(i8* %0) {
%2 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([23 x i8], [23 x i8]* @.str, i64 0, i64 0), i8* %0)
%3 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([33 x i8], [33 x i8]* @.str.1, i64 0, i64 0))
%4 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([40 x i8], [40 x i8]* @.str.2, i64 0, i64 0))
%5 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([8 x i8], [8 x i8]* @str, i64 0, i64 0))
ret void
}
/* Type definitions */
struct block_device {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ bdev_get_queue(struct block_device *);
int queue_hardsect_size(int /*<<< orphan*/);
__attribute__((always_)) int bdev_hardsect_size(struct block_device *bdev) {
  return queue_hardsect_size(bdev_get_queue(bdev));
}


x86 assembly (clang, -O0):
<bdev_hardsect_size>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <bdev_get_queue@plt>
mov    %eax,%edi
call   1030 <queue_hardsect_size@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<bdev_hardsect_size>:
push   %rax
call   1040 <bdev_get_queue@plt>
mov    %eax,%edi
pop    %rax
jmp    1030 <queue_hardsect_size@plt>

LLVM IR (-O0):
%struct.block_device = type { i32 }
define i32 @bdev_hardsect_size(%struct.block_device* %0) {
%2 = alloca %struct.block_device*
store %struct.block_device* %0, %struct.block_device** %2
%3 = load %struct.block_device*, %struct.block_device** %2
%4 = call i32 @bdev_get_queue(%struct.block_device* %3)
%5 = call i32 @queue_hardsect_size(i32 %4)
ret i32 %5
}

LLVM IR (-O2):
%struct.block_device = type { i32 }
define i32 @bdev_hardsect_size(%struct.block_device* %0) {
%2 = tail call i32 @bdev_get_queue(%struct.block_device* %0)
%3 = tail call i32 @queue_hardsect_size(i32 %2)
ret i32 %3
}
unsigned int hash_string_func(const char *str) {
  unsigned int hash = 2729;
  int c;
  while (c = *str++)
    hash = (hash * 585) + c;
  return hash % 1009;
}


x86 assembly (clang, -O0):
<hash_string_func>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movl   $0xaa9,-0xc(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x8(%rbp)
movsbl (%rax),%eax
mov    %eax,-0x10(%rbp)
cmp    $0x0,%eax
je     113f <hash_string_func+0x3f>
imul   $0x249,-0xc(%rbp),%eax
add    -0x10(%rbp),%eax
mov    %eax,-0xc(%rbp)
jmp    110f <hash_string_func+0xf>
mov    -0xc(%rbp),%eax
mov    $0x3f1,%ecx
xor    %edx,%edx
div    %ecx
mov    %edx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<hash_string_func>:
mov    (%rdi),%cl
test   %cl,%cl
je     1147 <hash_string_func+0x47>
add    $0x1,%rdi
mov    $0xaa9,%eax
nop
movsbl %cl,%ecx
imul   $0x249,%eax,%eax
add    %ecx,%eax
movzbl (%rdi),%ecx
add    $0x1,%rdi
test   %cl,%cl
jne    1110 <hash_string_func+0x10>
mov    %eax,%ecx
imul   $0x3ce4585,%rcx,%rcx
shr    $0x20,%rcx
mov    %eax,%edx
sub    %ecx,%edx
shr    %edx
add    %ecx,%edx
shr    $0x9,%edx
imul   $0x3f1,%edx,%ecx
sub    %ecx,%eax
ret
mov    $0x2c7,%eax
ret

LLVM IR (-O0):
define i32 @hash_string_func(i8* %0) {
%2 = alloca i8*
%3 = alloca i32
%4 = alloca i32
store i8* %0, i8** %2
store i32 2729, i32* %3
br label %5
5: ; preds = %11, %1
%6 = load i8*, i8** %2
%7 = getelementptr inbounds i8, i8* %6, i32 1
store i8* %7, i8** %2
%8 = load i8, i8* %6
%9 = sext i8 %8 to i32
store i32 %9, i32* %4
%10 = icmp ne i32 %9, 0
br i1 %10, label %11, label %16
11: ; preds = %5
%12 = load i32, i32* %3
%13 = mul i32 %12, 585
%14 = load i32, i32* %4
%15 = add i32 %13, %14
store i32 %15, i32* %3
br label %5
16: ; preds = %5
%17 = load i32, i32* %3
%18 = urem i32 %17, 1009
ret i32 %18
}

LLVM IR (-O2):
define i32 @hash_string_func(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = icmp eq i8 %2, 0
br i1 %3, label %16, label %4
4: ; preds = %1, %4
%5 = phi i8 [ %12, %4 ], [ %2, %1 ]
%6 = phi i8* [ %9, %4 ], [ %0, %1 ]
%7 = phi i32 [ %11, %4 ], [ 2729, %1 ]
%8 = sext i8 %5 to i32
%9 = getelementptr inbounds i8, i8* %6, i64 1
%10 = mul i32 %7, 585
%11 = add i32 %10, %8
%12 = load i8, i8* %9
%13 = icmp eq i8 %12, 0
br i1 %13, label %14, label %4
14: ; preds = %4
%15 = urem i32 %11, 1009
br label %16
16: ; preds = %14, %1
%17 = phi i32 [ 711, %1 ], [ %15, %14 ]
ret i32 %17
}
/* Variables and functions */
int /*<<< orphan*/ stdout;
int /*<<< orphan*/ usage(int /*<<< orphan*/);
int do_help(int argc, char *const *argv) {
  usage(stdout);
  return 0;
}


x86 assembly (clang, -O0):
<do_help>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    0x2eba(%rip),%rax
mov    (%rax),%edi
call   1030 <usage@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<do_help>:
push   %rax
mov    0x2ec8(%rip),%rax
mov    (%rax),%edi
call   1030 <usage@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@stdout = global i32 0
define i32 @do_help(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i8**
store i32 %0, i32* %3
store i8** %1, i8*** %4
%5 = load i32, i32* @stdout
%6 = call i32 @usage(i32 %5)
ret i32 0
}

LLVM IR (-O2):
@stdout = global i32 0
define i32 @do_help(i32 %0, i8** nocapture readnone %1) {
%3 = load i32, i32* @stdout
%4 = tail call i32 @usage(i32 %3)
ret i32 0
}
void get_launch_token() {}


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

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

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

LLVM IR (-O2):
define void @get_launch_token() {
ret void
}
void baz() {
bad1:
#pragma omp parallel
  goto bad1;
  goto bad2;
#pragma omp parallel
  {
  bad2:;
  }
#pragma omp parallel
  {
    int i;
    goto ok1;
    for (i = 0; i < 10; ++i) {
    ok1:
      break;
    }
  }
}


x86 assembly (clang, -O0):
<baz>:
push   %rbp
mov    %rsp,%rbp
jmp    1104 <baz+0x4>

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

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

LLVM IR (-O2):
define void @baz() {
br label %1
1: ; preds = %1, %0
br label %1
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int pa_volume_snprint() {
  printf("NOT IMPLEMENTED:"
         "pa_volume_snprint"
         "\n");
}


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

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

LLVM IR (-O0):
@.str = [35 x i8] c"NOT IMPLEMENTED:pa_volume_snprint\0A\00"
define i32 @pa_volume_snprint() {
%1 = alloca i32
%2 = call i32 @printf(i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str, i64 0, i64 0))
%3 = load i32, i32* %1
ret i32 %3
}

LLVM IR (-O2):
@str = [34 x i8] c"NOT IMPLEMENTED:pa_volume_snprint\00"
define i32 @pa_volume_snprint() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([34 x i8], [34 x i8]* @str, i64 0, i64 0))
ret i32 undef
}
/* Variables and functions */
size_t fock_idx(size_t i, size_t j) {
  return i < j ? (j * (j + 1) / 2 + i) : (i * (i + 1) / 2 + j);
}


x86 assembly (clang, -O0):
<fock_idx>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
cmp    -0x10(%rbp),%rax
jae    113b <fock_idx+0x3b>
mov    -0x10(%rbp),%rax
mov    -0x10(%rbp),%rcx
add    $0x1,%rcx
imul   %rcx,%rax
shr    $0x1,%rax
add    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
jmp    1157 <fock_idx+0x57>
mov    -0x8(%rbp),%rax
mov    -0x8(%rbp),%rcx
add    $0x1,%rcx
imul   %rcx,%rax
shr    $0x1,%rax
add    -0x10(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<fock_idx>:
cmp    %rsi,%rdi
mov    %rdi,%rcx
cmovb  %rsi,%rcx
cmovb  %rdi,%rsi
lea    0x1(%rcx),%rax
imul   %rcx,%rax
shr    %rax
add    %rsi,%rax
ret

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

LLVM IR (-O2):
define i64 @fock_idx(i64 %0, i64 %1) {
%3 = icmp ult i64 %0, %1
%4 = select i1 %3, i64 %1, i64 %0
%5 = select i1 %3, i64 %0, i64 %1
%6 = add i64 %4, 1
%7 = mul i64 %6, %4
%8 = lshr i64 %7, 1
%9 = add i64 %8, %5
ret i64 %9
}
int cabacZeroWords_need_added(int pic_bin_count, int pic_size_in_mbs,
                              int bytes_in_picture) {
  int stuffing_bytes = 0;
  int i = 0;
  int RawMbBits = 256 * 8 + 2 * 8 * 8 * 8;
  int min_num_bytes =
      ((96 * pic_bin_count) - (RawMbBits * (int)pic_size_in_mbs * 3) + 1023) /
      1024;
  if (min_num_bytes > bytes_in_picture) {
    stuffing_bytes = min_num_bytes - bytes_in_picture;
    return stuffing_bytes;
  }
  return 0;
}


x86 assembly (clang, -O0):
<cabacZeroWords_need_added>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
movl   $0x0,-0x18(%rbp)
movl   $0xc00,-0x1c(%rbp)
imul   $0x60,-0x8(%rbp),%eax
mov    -0x1c(%rbp),%ecx
imul   -0xc(%rbp),%ecx
imul   $0x3,%ecx,%ecx
sub    %ecx,%eax
add    $0x3ff,%eax
mov    $0x400,%ecx
cltd
idiv   %ecx
mov    %eax,-0x20(%rbp)
mov    -0x20(%rbp),%eax
cmp    -0x10(%rbp),%eax
jle    1162 <cabacZeroWords_need_added+0x62>
mov    -0x20(%rbp),%eax
sub    -0x10(%rbp),%eax
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    1169 <cabacZeroWords_need_added+0x69>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<cabacZeroWords_need_added>:
shl    $0x5,%edi
lea    (%rdi,%rdi,2),%eax
shl    $0xa,%esi
lea    (%rsi,%rsi,8),%ecx
sub    %ecx,%eax
lea    0x3ff(%rax),%ecx
add    $0x7fe,%eax
test   %ecx,%ecx
cmovns %ecx,%eax
sar    $0xa,%eax
xor    %ecx,%ecx
sub    %edx,%eax
cmovle %ecx,%eax
ret

LLVM IR (-O0):
define i32 @cabacZeroWords_need_added(i32 %0, i32 %1, i32 %2) {
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32
%10 = alloca i32
%11 = alloca i32
store i32 %0, i32* %5
store i32 %1, i32* %6
store i32 %2, i32* %7
store i32 0, i32* %8
store i32 0, i32* %9
store i32 3072, i32* %10
%12 = load i32, i32* %5
%13 = mul nsw i32 96, %12
%14 = load i32, i32* %10
%15 = load i32, i32* %6
%16 = mul nsw i32 %14, %15
%17 = mul nsw i32 %16, 3
%18 = sub nsw i32 %13, %17
%19 = add nsw i32 %18, 1023
%20 = sdiv i32 %19, 1024
store i32 %20, i32* %11
%21 = load i32, i32* %11
%22 = load i32, i32* %7
%23 = icmp sgt i32 %21, %22
br i1 %23, label %24, label %29
24: ; preds = %3
%25 = load i32, i32* %11
%26 = load i32, i32* %7
%27 = sub nsw i32 %25, %26
store i32 %27, i32* %8
%28 = load i32, i32* %8
store i32 %28, i32* %4
br label %30
29: ; preds = %3
store i32 0, i32* %4
br label %30
30: ; preds = %29, %24
%31 = load i32, i32* %4
ret i32 %31
}

LLVM IR (-O2):
define i32 @cabacZeroWords_need_added(i32 %0, i32 %1, i32 %2) {
%4 = mul nsw i32 %0, 96
%5 = mul i32 %1, -9216
%6 = add i32 %4, 1023
%7 = add i32 %6, %5
%8 = sdiv i32 %7, 1024
%9 = icmp sgt i32 %8, %2
%10 = sub nsw i32 %8, %2
%11 = select i1 %9, i32 %10, i32 0
ret i32 %11
}
/* Type definitions */
typedef int uint64_t;
typedef scalar_t__ uint32_t;
typedef int int64_t;

/* Variables and functions */
scalar_t__ read32(char *, int);
uint64_t readTimeStamp(char *buffer, int offset) {
  uint32_t seconds = read32(buffer, offset);
  uint32_t fraction = read32(buffer, offset + 4);
  uint64_t v =
      ((int64_t)seconds - ((uint64_t)((365 * 70) + 17) * 24 * 60 * 60)) * 1000 +
      (int64_t)fraction * 1000 / (int64_t)0x100000000;
  return v;
}


x86 assembly (clang, -O0):
<readTimeStamp>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
call   1030 <read32@plt>
mov    %rax,-0x18(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
add    $0x4,%esi
call   1030 <read32@plt>
mov    %rax,-0x20(%rbp)
mov    -0x18(%rbp),%rax
sub    $0x83aa7e80,%eax
imul   $0x3e8,%eax,%eax
mov    %eax,-0x28(%rbp)
mov    -0x20(%rbp),%rax
imul   $0x3e8,%eax,%eax
xor    %ecx,%ecx
cltd
idiv   %ecx
mov    %eax,%ecx
mov    -0x28(%rbp),%eax
add    %ecx,%eax
mov    %eax,-0x24(%rbp)
mov    -0x24(%rbp),%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<readTimeStamp>:
push   %r14
push   %rbx
push   %rax
mov    %esi,%ebx
mov    %rdi,%r14
call   1030 <read32@plt>
add    $0x4,%ebx
mov    %r14,%rdi
mov    %ebx,%esi
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1030 <read32@plt>

LLVM IR (-O0):
define i32 @readTimeStamp(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i32
%5 = alloca i64
%6 = alloca i64
%7 = alloca i32
store i8* %0, i8** %3
store i32 %1, i32* %4
%8 = load i8*, i8** %3
%9 = load i32, i32* %4
%10 = call i64 @read32(i8* %8, i32 %9)
store i64 %10, i64* %5
%11 = load i8*, i8** %3
%12 = load i32, i32* %4
%13 = add nsw i32 %12, 4
%14 = call i64 @read32(i8* %11, i32 %13)
store i64 %14, i64* %6
%15 = load i64, i64* %5
%16 = trunc i64 %15 to i32
%17 = sub nsw i32 %16, -2085978496
%18 = mul nsw i32 %17, 1000
%19 = load i64, i64* %6
%20 = trunc i64 %19 to i32
%21 = mul nsw i32 %20, 1000
%22 = sdiv i32 %21, 0
%23 = add nsw i32 %18, %22
store i32 %23, i32* %7
%24 = load i32, i32* %7
ret i32 %24
}

LLVM IR (-O2):
define i32 @readTimeStamp(i8* %0, i32 %1) {
%3 = tail call i64 @read32(i8* %0, i32 %1)
%4 = add nsw i32 %1, 4
%5 = tail call i64 @read32(i8* %0, i32 %4)
ret i32 poison
}
void avformat_queue_attached_pictures() {}


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

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

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

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

/* Variables and functions */
int /*<<< orphan*/ free(struct _mgmt_deluser_rsp *);
void mgmt_deluser_rsp_free(struct _mgmt_deluser_rsp *ptr) { free(ptr); }


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

x86 assembly (clang, -O2):
<mgmt_deluser_rsp_free>:
jmp    1030 <free@plt>

LLVM IR (-O0):
%struct._mgmt_deluser_rsp = type { i32 }
define void @mgmt_deluser_rsp_free(%struct._mgmt_deluser_rsp* %0) {
%2 = alloca %struct._mgmt_deluser_rsp*
store %struct._mgmt_deluser_rsp* %0, %struct._mgmt_deluser_rsp** %2
%3 = load %struct._mgmt_deluser_rsp*, %struct._mgmt_deluser_rsp** %2
%4 = call i32 @free(%struct._mgmt_deluser_rsp* %3)
ret void
}

LLVM IR (-O2):
%struct._mgmt_deluser_rsp = type { i32 }
define void @mgmt_deluser_rsp_free(%struct._mgmt_deluser_rsp* nocapture %0) {
%2 = tail call i32 @free(%struct._mgmt_deluser_rsp* %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int, int);
void calculateTriangularNumber(int n) {
  int i, triangularNumber = 0;
  for (i = 1; i <= n; ++i) {
    triangularNumber += i;
  }
  printf("Triangular number %i is %i\n", n, triangularNumber);
}


x86 assembly (clang, -O0):
<calculateTriangularNumber>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
movl   $0x0,-0xc(%rbp)
movl   $0x1,-0x8(%rbp)
mov    -0x8(%rbp),%eax
cmp    -0x4(%rbp),%eax
jg     114c <calculateTriangularNumber+0x3c>
mov    -0x8(%rbp),%eax
add    -0xc(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1129 <calculateTriangularNumber+0x19>
mov    -0x4(%rbp),%esi
mov    -0xc(%rbp),%edx
lea    0xea7(%rip),%rdi
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<calculateTriangularNumber>:
mov    %edi,%esi
test   %edi,%edi
jle    1135 <calculateTriangularNumber+0x25>
lea    -0x1(%rsi),%eax
lea    -0x2(%rsi),%ecx
imul   %rax,%rcx
shr    %rcx
lea    (%rcx,%rsi,2),%edx
add    $0xffffffff,%edx
lea    0xed0(%rip),%rdi
jmp    1030 <printf@plt>
xor    %edx,%edx
lea    0xec2(%rip),%rdi
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [28 x i8] c"Triangular number %i is %i\0A\00"
define void @calculateTriangularNumber(i32 %0) {
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %2
store i32 0, i32* %4
store i32 1, i32* %3
br label %5
5: ; preds = %13, %1
%6 = load i32, i32* %3
%7 = load i32, i32* %2
%8 = icmp sle i32 %6, %7
br i1 %8, label %9, label %16
9: ; preds = %5
%10 = load i32, i32* %3
%11 = load i32, i32* %4
%12 = add nsw i32 %11, %10
store i32 %12, i32* %4
br label %13
13: ; preds = %9
%14 = load i32, i32* %3
%15 = add nsw i32 %14, 1
store i32 %15, i32* %3
br label %5
16: ; preds = %5
%17 = load i32, i32* %2
%18 = load i32, i32* %4
%19 = call i32 @printf(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str, i64 0, i64 0), i32 %17, i32 %18)
ret void
}

LLVM IR (-O2):
@.str = [28 x i8] c"Triangular number %i is %i\0A\00"
define void @calculateTriangularNumber(i32 %0) {
%2 = icmp slt i32 %0, 1
br i1 %2, label %14, label %3
3: ; preds = %1
%4 = shl nuw i32 %0, 1
%5 = add nsw i32 %0, -1
%6 = zext i32 %5 to i33
%7 = add nsw i32 %0, -2
%8 = zext i32 %7 to i33
%9 = mul i33 %6, %8
%10 = lshr i33 %9, 1
%11 = trunc i33 %10 to i32
%12 = add i32 %4, %11
%13 = add i32 %12, -1
br label %14
14: ; preds = %3, %1
%15 = phi i32 [ 0, %1 ], [ %13, %3 ]
%16 = tail call i32 @printf(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str, i64 0, i64 0), i32 %0, i32 %15)
ret void
}
/* Variables and functions */
void b_copyl(void *, int, void const *);
void b_copyr(void *, int, void const *);
void b_copy(void *to, int n, const void *from) {
  if (from > to) {
    return b_copyl(to, n, from);
  } else if (from < to) {
    return b_copyr(to, n, from);
  }
}


x86 assembly (clang, -O0):
<b_copy>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x18(%rbp),%rax
cmp    -0x8(%rbp),%rax
jbe    1156 <b_copy+0x36>
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
mov    -0x18(%rbp),%rdx
call   1030 <b_copyl@plt>
jmp    117e <b_copy+0x5e>
mov    -0x18(%rbp),%rax
cmp    -0x8(%rbp),%rax
jae    1179 <b_copy+0x59>
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
mov    -0x18(%rbp),%rdx
call   1040 <b_copyr@plt>
jmp    117e <b_copy+0x5e>
jmp    117e <b_copy+0x5e>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<b_copy>:
cmp    %rdi,%rdx
jbe    112a <b_copy+0xa>
jmp    1030 <b_copyl@plt>
jae    1131 <b_copy+0x11>
jmp    1040 <b_copyr@plt>
ret

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

LLVM IR (-O2):
define void @b_copy(i8* %0, i32 %1, i8* %2) {
%4 = icmp ugt i8* %2, %0
br i1 %4, label %5, label %6
5: ; preds = %3
tail call void @b_copyl(i8* %0, i32 %1, i8* %2)
br label %9
6: ; preds = %3
%7 = icmp ult i8* %2, %0
br i1 %7, label %8, label %9
8: ; preds = %6
tail call void @b_copyr(i8* %0, i32 %1, i8* %2)
br label %9
9: ; preds = %6, %5, %8
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char *);
int main() {
  printf("%s", "Exiting with code: 1");
  return 1;
}


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

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

LLVM IR (-O0):
@.str = [3 x i8] c"%s\00"
@.str.1 = [21 x i8] c"Exiting with code: 1\00"
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.1, i64 0, i64 0))
ret i32 1
}

LLVM IR (-O2):
@.str = [3 x i8] c"%s\00"
@.str.1 = [21 x i8] c"Exiting with code: 1\00"
define i32 @main() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.1, i64 0, i64 0))
ret i32 1
}
/* Variables and functions */
int /*<<< orphan*/ CantDeleteItemErrorMessage(void *, char *, char const *);
void DefinstancesDeleteError(void *theEnv, const char *dname) {
  CantDeleteItemErrorMessage(theEnv, "definstances", dname);
}


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

x86 assembly (clang, -O2):
<DefinstancesDeleteError>:
mov    %rsi,%rdx
lea    0xee6(%rip),%rsi
jmp    1030 <CantDeleteItemErrorMessage@plt>

LLVM IR (-O0):
@.str = [13 x i8] c"definstances\00"
define void @DefinstancesDeleteError(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
store i8* %0, i8** %3
store i8* %1, i8** %4
%5 = load i8*, i8** %3
%6 = load i8*, i8** %4
%7 = call i32 @CantDeleteItemErrorMessage(i8* %5, i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0), i8* %6)
ret void
}

LLVM IR (-O2):
@.str = [13 x i8] c"definstances\00"
define void @DefinstancesDeleteError(i8* %0, i8* %1) {
%3 = tail call i32 @CantDeleteItemErrorMessage(i8* %0, i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0), i8* %1)
ret void
}
/* Variables and functions */
int cpuGetAddrDS(int /*<<< orphan*/);
int /*<<< orphan*/ cpuGetDX();
int get_ex_fcb(void) { return cpuGetAddrDS(cpuGetDX()); }


x86 assembly (clang, -O0):
<get_ex_fcb>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1040 <cpuGetDX@plt>
mov    %eax,%edi
call   1030 <cpuGetAddrDS@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_ex_fcb>:
push   %rax
xor    %eax,%eax
call   1040 <cpuGetDX@plt>
mov    %eax,%edi
pop    %rax
jmp    1030 <cpuGetAddrDS@plt>

LLVM IR (-O0):
define i32 @get_ex_fcb() {
%1 = call i32 (...) @cpuGetDX()
%2 = call i32 @cpuGetAddrDS(i32 %1)
ret i32 %2
}

LLVM IR (-O2):
define i32 @get_ex_fcb() {
%1 = tail call i32 (...) @cpuGetDX()
%2 = tail call i32 @cpuGetAddrDS(i32 %1)
ret i32 %2
}
/* Type definitions */
struct mavl {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ free(struct mavl *);
int /*<<< orphan*/ mavl_del_all(struct mavl *);
void mavl_destroy(struct mavl *t) {
  mavl_del_all(t);
  free(t);
}


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

x86 assembly (clang, -O2):
<mavl_destroy>:
push   %rbx
mov    %rdi,%rbx
call   1040 <mavl_del_all@plt>
mov    %rbx,%rdi
pop    %rbx
jmp    1030 <free@plt>

LLVM IR (-O0):
%struct.mavl = type { i32 }
define void @mavl_destroy(%struct.mavl* %0) {
%2 = alloca %struct.mavl*
store %struct.mavl* %0, %struct.mavl** %2
%3 = load %struct.mavl*, %struct.mavl** %2
%4 = call i32 @mavl_del_all(%struct.mavl* %3)
%5 = load %struct.mavl*, %struct.mavl** %2
%6 = call i32 @free(%struct.mavl* %5)
ret void
}

LLVM IR (-O2):
%struct.mavl = type { i32 }
define void @mavl_destroy(%struct.mavl* %0) {
%2 = tail call i32 @mavl_del_all(%struct.mavl* %0)
%3 = tail call i32 @free(%struct.mavl* %0)
ret void
}
void rotate4(int *a, int *b, int *c, int *d) {
  int t = *d;
  *d = *c;
  *c = *b;
  *b = *a;
  *a = t;
}


x86 assembly (clang, -O0):
<rotate4>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    -0x20(%rbp),%rax
mov    (%rax),%eax
mov    %eax,-0x24(%rbp)
mov    -0x18(%rbp),%rax
mov    (%rax),%ecx
mov    -0x20(%rbp),%rax
mov    %ecx,(%rax)
mov    -0x10(%rbp),%rax
mov    (%rax),%ecx
mov    -0x18(%rbp),%rax
mov    %ecx,(%rax)
mov    -0x8(%rbp),%rax
mov    (%rax),%ecx
mov    -0x10(%rbp),%rax
mov    %ecx,(%rax)
mov    -0x24(%rbp),%ecx
mov    -0x8(%rbp),%rax
mov    %ecx,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<rotate4>:
mov    (%rcx),%r8d
mov    (%rdx),%eax
mov    %eax,(%rcx)
mov    (%rsi),%eax
mov    %eax,(%rdx)
mov    (%rdi),%eax
mov    %eax,(%rsi)
mov    %r8d,(%rdi)
ret

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

LLVM IR (-O2):
define void @rotate4(i32* nocapture %0, i32* nocapture %1, i32* nocapture %2, i32* nocapture %3) {
%5 = load i32, i32* %3
%6 = load i32, i32* %2
store i32 %6, i32* %3
%7 = load i32, i32* %1
store i32 %7, i32* %2
%8 = load i32, i32* %0
store i32 %8, i32* %1
store i32 %5, i32* %0
ret void
}
int lingot_audio_oss_register(void) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @lingot_audio_oss_register() {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ libstr_panic();
void *realloc(void *, size_t);
void *realloc_(void *ptr, size_t size) {
  void *result = realloc(ptr, size);
  if (!result) {
    libstr_panic();
  }
  return result;
}


x86 assembly (clang, -O0):
<realloc_>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1040 <realloc@plt>
mov    %rax,-0x18(%rbp)
cmpq   $0x0,-0x18(%rbp)
jne    1153 <realloc_+0x33>
mov    $0x0,%al
call   1030 <libstr_panic@plt>
mov    -0x18(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<realloc_>:
push   %rbx
call   1040 <realloc@plt>
mov    %rax,%rbx
test   %rax,%rax
jne    1135 <realloc_+0x15>
xor    %eax,%eax
call   1030 <libstr_panic@plt>
mov    %rbx,%rax
pop    %rbx
ret

LLVM IR (-O0):
define i8* @realloc_(i8* %0, i64 %1) {
%3 = alloca i8*
%4 = alloca i64
%5 = alloca i8*
store i8* %0, i8** %3
store i64 %1, i64* %4
%6 = load i8*, i8** %3
%7 = load i64, i64* %4
%8 = call i8* @realloc(i8* %6, i64 %7)
store i8* %8, i8** %5
%9 = load i8*, i8** %5
%10 = icmp ne i8* %9, null
br i1 %10, label %13, label %11
11: ; preds = %2
%12 = call i32 (...) @libstr_panic()
br label %13
13: ; preds = %11, %2
%14 = load i8*, i8** %5
ret i8* %14
}

LLVM IR (-O2):
define noalias i8* @realloc_(i8* nocapture %0, i64 %1) {
%3 = tail call i8* @realloc(i8* %0, i64 %1)
%4 = icmp eq i8* %3, null
br i1 %4, label %5, label %7
5: ; preds = %2
%6 = tail call i32 (...) @libstr_panic()
br label %7
7: ; preds = %5, %2
ret i8* %3
}
/* Variables and functions */
int strcmp(char const *, char const *);
int picolQsortCompStrDecr(const void *a, const void *b) {
  return -strcmp(*(const char **)a, *(const char **)b);
}


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

x86 assembly (clang, -O2):
<picolQsortCompStrDecr>:
push   %rax
mov    (%rdi),%rdi
mov    (%rsi),%rsi
call   1030 <strcmp@plt>
neg    %eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @picolQsortCompStrDecr(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
store i8* %0, i8** %3
store i8* %1, i8** %4
%5 = load i8*, i8** %3
%6 = bitcast i8* %5 to i8**
%7 = load i8*, i8** %6
%8 = load i8*, i8** %4
%9 = bitcast i8* %8 to i8**
%10 = load i8*, i8** %9
%11 = call i32 @strcmp(i8* %7, i8* %10)
%12 = sub nsw i32 0, %11
ret i32 %12
}

LLVM IR (-O2):
define i32 @picolQsortCompStrDecr(i8* nocapture %0, i8* nocapture %1) {
%3 = bitcast i8* %0 to i8**
%4 = load i8*, i8** %3
%5 = bitcast i8* %1 to i8**
%6 = load i8*, i8** %5
%7 = tail call i32 @strcmp(i8* dereferenceable(1) %4, i8* dereferenceable(1) %6)
%8 = sub nsw i32 0, %7
ret i32 %8
}
/* Variables and functions */
int /*<<< orphan*/ clear_evdev();
int setup_evdev();
int setup_uinput();
int setup_input() {
  int ret;
  ret = setup_evdev();
  if (!ret) {
    ret = setup_uinput();
    if (ret)
      clear_evdev();
  }
  return ret;
}


x86 assembly (clang, -O0):
<setup_input>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1050 <setup_evdev@plt>
mov    %eax,-0x4(%rbp)
cmpl   $0x0,-0x4(%rbp)
jne    116c <setup_input+0x3c>
mov    $0x0,%al
call   1030 <setup_uinput@plt>
mov    %eax,-0x4(%rbp)
cmpl   $0x0,-0x4(%rbp)
je     1167 <setup_input+0x37>
mov    $0x0,%al
call   1040 <clear_evdev@plt>
jmp    116c <setup_input+0x3c>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<setup_input>:
push   %rbx
xor    %eax,%eax
call   1050 <setup_evdev@plt>
test   %eax,%eax
je     113e <setup_input+0xe>
pop    %rbx
ret
xor    %eax,%eax
call   1030 <setup_uinput@plt>
mov    %eax,%ebx
mov    $0x0,%eax
test   %ebx,%ebx
je     113c <setup_input+0xc>
xor    %eax,%eax
call   1040 <clear_evdev@plt>
mov    %ebx,%eax
pop    %rbx
ret

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

LLVM IR (-O2):
define i32 @setup_input() {
%1 = tail call i32 (...) @setup_evdev()
%2 = icmp eq i32 %1, 0
br i1 %2, label %3, label %8
3: ; preds = %0
%4 = tail call i32 (...) @setup_uinput()
%5 = icmp eq i32 %4, 0
br i1 %5, label %8, label %6
6: ; preds = %3
%7 = tail call i32 (...) @clear_evdev()
br label %8
8: ; preds = %3, %6, %0
%9 = phi i32 [ %1, %0 ], [ %4, %6 ], [ 0, %3 ]
ret i32 %9
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, ...);
int /*<<< orphan*/ scanf(char *, int *, int *);
int main() {
  int b, h, area;
  printf("Enter breadth and height (e.g 4 6): ");
  scanf("%d %d", &b, &h);
  area = b * h;
  printf("Area of rectangle: %d", area);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeca(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xee1(%rip),%rdi
lea    -0x8(%rbp),%rsi
lea    -0xc(%rbp),%rdx
call   1040 <scanf@plt>
mov    -0x8(%rbp),%eax
imul   -0xc(%rbp),%eax
mov    %eax,-0x10(%rbp)
mov    -0x10(%rbp),%esi
lea    0xec6(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xed8(%rip),%rdi
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xeef(%rip),%rdi
lea    0x4(%rsp),%rsi
mov    %rsp,%rdx
call   1040 <scanf@plt>
mov    (%rsp),%esi
imul   0x4(%rsp),%esi
lea    0xed9(%rip),%rdi
xor    %eax,%eax
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [37 x i8] c"Enter breadth and height (e.g 4 6): \00"
@.str.1 = [6 x i8] c"%d %d\00"
@.str.2 = [22 x i8] c"Area of rectangle: %d\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
store i32 0, i32* %1
%5 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([37 x i8], [37 x i8]* @.str, i64 0, i64 0))
%6 = call i32 @scanf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), i32* %2, i32* %3)
%7 = load i32, i32* %2
%8 = load i32, i32* %3
%9 = mul nsw i32 %7, %8
store i32 %9, i32* %4
%10 = load i32, i32* %4
%11 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.2, i64 0, i64 0), i32 %10)
ret i32 0
}

LLVM IR (-O2):
@.str = [37 x i8] c"Enter breadth and height (e.g 4 6): \00"
@.str.1 = [6 x i8] c"%d %d\00"
@.str.2 = [22 x i8] c"Area of rectangle: %d\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = bitcast i32* %1 to i8*
%4 = bitcast i32* %2 to i8*
%5 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([37 x i8], [37 x i8]* @.str, i64 0, i64 0))
%6 = call i32 @scanf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), i32* %1, i32* %2)
%7 = load i32, i32* %1
%8 = load i32, i32* %2
%9 = mul nsw i32 %8, %7
%10 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([22 x i8], [22 x i8]* @.str.2, i64 0, i64 0), i32 %9)
ret i32 0
}