xunge/DecIR huggingface dataset:
/* Variables and functions */
char *malloc(int);
int /*<<< orphan*/ strncpy(char *, char const *, int);
char *getsubstring(const char *s, int start, int end) {
  int n = end - start + 1;
  char *buff = malloc(sizeof(char) * (n + 1));
  strncpy(buff, s + start, n);
  buff[n] = '\0';
  return buff;
}


x86 assembly (clang, -O0):
<getsubstring>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    -0x10(%rbp),%eax
sub    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
add    $0x1,%eax
cltq
shl    $0x0,%rax
mov    %eax,%edi
call   1040 <malloc@plt>
mov    %rax,-0x20(%rbp)
mov    -0x20(%rbp),%rdi
mov    -0x8(%rbp),%rsi
movslq -0xc(%rbp),%rax
add    %rax,%rsi
mov    -0x14(%rbp),%edx
call   1030 <strncpy@plt>
mov    -0x20(%rbp),%rax
movslq -0x14(%rbp),%rcx
movb   $0x0,(%rax,%rcx,1)
mov    -0x20(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<getsubstring>:
push   %rbp
push   %r15
push   %r14
push   %r12
push   %rbx
mov    %esi,%r12d
mov    %rdi,%r14
sub    %esi,%edx
movslq %edx,%rbp
lea    0x1(%rbp),%r15
lea    0x2(%rbp),%edi
call   1040 <malloc@plt>
mov    %rax,%rbx
movslq %r12d,%rsi
add    %r14,%rsi
mov    %rax,%rdi
mov    %r15d,%edx
call   1030 <strncpy@plt>
movb   $0x0,0x1(%rbx,%rbp,1)
mov    %rbx,%rax
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
define i8* @getsubstring(i8* %0, i32 %1, i32 %2) {
%4 = alloca i8*
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
%8 = alloca i8*
store i8* %0, i8** %4
store i32 %1, i32* %5
store i32 %2, i32* %6
%9 = load i32, i32* %6
%10 = load i32, i32* %5
%11 = sub nsw i32 %9, %10
%12 = add nsw i32 %11, 1
store i32 %12, i32* %7
%13 = load i32, i32* %7
%14 = add nsw i32 %13, 1
%15 = sext i32 %14 to i64
%16 = mul i64 1, %15
%17 = trunc i64 %16 to i32
%18 = call i8* @malloc(i32 %17)
store i8* %18, i8** %8
%19 = load i8*, i8** %8
%20 = load i8*, i8** %4
%21 = load i32, i32* %5
%22 = sext i32 %21 to i64
%23 = getelementptr inbounds i8, i8* %20, i64 %22
%24 = load i32, i32* %7
%25 = call i32 @strncpy(i8* %19, i8* %23, i32 %24)
%26 = load i8*, i8** %8
%27 = load i32, i32* %7
%28 = sext i32 %27 to i64
%29 = getelementptr inbounds i8, i8* %26, i64 %28
store i8 0, i8* %29
%30 = load i8*, i8** %8
ret i8* %30
}

LLVM IR (-O2):
define i8* @getsubstring(i8* %0, i32 %1, i32 %2) {
%4 = sub nsw i32 %2, %1
%5 = add nsw i32 %4, 1
%6 = add nsw i32 %4, 2
%7 = tail call i8* @malloc(i32 %6)
%8 = sext i32 %1 to i64
%9 = getelementptr inbounds i8, i8* %0, i64 %8
%10 = tail call i32 @strncpy(i8* %7, i8* %9, i32 %5)
%11 = sext i32 %5 to i64
%12 = getelementptr inbounds i8, i8* %7, i64 %11
store i8 0, i8* %12
ret i8* %7
}
/* Variables and functions */
int /*<<< orphan*/ unreachable();
int fge22(int a) {
  unsigned i = a / 4;
  unsigned j = i + 2;
  if (j == -7)
    return -1;
  if (i >= -3)
    return 0;
  if (i >= j)
    unreachable();
  return 1;
}


x86 assembly (clang, -O0):
<fge22>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
mov    -0x8(%rbp),%eax
mov    $0x4,%ecx
cltd
idiv   %ecx
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
add    $0x2,%eax
mov    %eax,-0x10(%rbp)
cmpl   $0xfffffff9,-0x10(%rbp)
jne    1148 <fge22+0x38>
movl   $0xffffffff,-0x4(%rbp)
jmp    1178 <fge22+0x68>
cmpl   $0xfffffffd,-0xc(%rbp)
jb     115e <fge22+0x4e>
movl   $0x0,-0x4(%rbp)
jmp    1178 <fge22+0x68>
mov    -0xc(%rbp),%eax
cmp    -0x10(%rbp),%eax
jb     1171 <fge22+0x61>
mov    $0x0,%al
call   1030 <unreachable@plt>
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fge22>:
lea    0x27(%rdi),%ecx
mov    $0xffffffff,%eax
cmp    $0x4,%ecx
jb     1120 <fge22+0x20>
lea    0x3(%rdi),%ecx
test   %edi,%edi
cmovns %edi,%ecx
sar    $0x2,%ecx
xor    %eax,%eax
cmp    $0xfffffffd,%ecx
setb   %al
ret

LLVM IR (-O0):
define i32 @fge22(i32 %0) {
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
store i32 %0, i32* %3
%6 = load i32, i32* %3
%7 = sdiv i32 %6, 4
store i32 %7, i32* %4
%8 = load i32, i32* %4
%9 = add i32 %8, 2
store i32 %9, i32* %5
%10 = load i32, i32* %5
%11 = icmp eq i32 %10, -7
br i1 %11, label %12, label %13
12: ; preds = %1
store i32 -1, i32* %2
br label %24
13: ; preds = %1
%14 = load i32, i32* %4
%15 = icmp uge i32 %14, -3
br i1 %15, label %16, label %17
16: ; preds = %13
store i32 0, i32* %2
br label %24
17: ; preds = %13
%18 = load i32, i32* %4
%19 = load i32, i32* %5
%20 = icmp uge i32 %18, %19
br i1 %20, label %21, label %23
21: ; preds = %17
%22 = call i32 (...) @unreachable()
br label %23
23: ; preds = %21, %17
store i32 1, i32* %2
br label %24
24: ; preds = %23, %16, %12
%25 = load i32, i32* %2
ret i32 %25
}

LLVM IR (-O2):
define i32 @fge22(i32 %0) {
%2 = add i32 %0, 39
%3 = icmp ult i32 %2, 4
br i1 %3, label %8, label %4
4: ; preds = %1
%5 = sdiv i32 %0, 4
%6 = icmp ult i32 %5, -3
%7 = zext i1 %6 to i32
br label %8
8: ; preds = %4, %1
%9 = phi i32 [ -1, %1 ], [ %7, %4 ]
ret i32 %9
}
/* Variables and functions */
int /*<<< orphan*/ signal(int, void (*)(int));
void sighup(int i) { signal(i, &sighup); }


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

x86 assembly (clang, -O2):
<sighup>:
mov    0x2ed1(%rip),%rsi
jmp    1030 <signal@plt>

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

LLVM IR (-O2):
define void @sighup(i32 %0) {
%2 = tail call i32 @signal(i32 %0, void (i32)* @sighup)
ret void
}
void free_char(char *val) {}


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

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

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

LLVM IR (-O2):
define void @free_char(i8* nocapture %0) {
ret void
}
/* Variables and functions */
scalar_t__ memcmp(double *, double *, int);
int have_minus_zero() {
  static double plus_zero = 0.0;
  double minus_zero = -plus_zero;
  return memcmp(&plus_zero, &minus_zero, sizeof(double)) != 0;
}


x86 assembly (clang, -O0):
<have_minus_zero>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movsd  0x2f10(%rip),%xmm0
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
movsd  %xmm0,-0x8(%rbp)
lea    0x2eed(%rip),%rdi
lea    -0x8(%rbp),%rsi
mov    $0x8,%edx
call   1030 <memcmp@plt>
cmp    $0x0,%rax
setne  %al
and    $0x1,%al
movzbl %al,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<have_minus_zero>:
push   %rax
lea    0x2f18(%rip),%rdi
movsd  0x2f10(%rip),%xmm0
xorps  0xed9(%rip),%xmm0
movlps %xmm0,(%rsp)
mov    %rsp,%rsi
mov    $0x8,%edx
call   1030 <memcmp@plt>
xor    %ecx,%ecx
test   %rax,%rax
setne  %cl
mov    %ecx,%eax
pop    %rcx
ret

LLVM IR (-O0):
@have_minus_zero.plus_zero = internal global double 0.000000e+00
define i32 @have_minus_zero() {
%1 = alloca double
%2 = load double, double* @have_minus_zero.plus_zero
%3 = fneg double %2
store double %3, double* %1
%4 = call i64 @memcmp(double* @have_minus_zero.plus_zero, double* %1, i32 8)
%5 = icmp ne i64 %4, 0
%6 = zext i1 %5 to i32
ret i32 %6
}

LLVM IR (-O2):
@have_minus_zero.plus_zero = internal global double 0.000000e+00
define i32 @have_minus_zero() {
%1 = alloca double
%2 = bitcast double* %1 to i8*
%3 = load double, double* @have_minus_zero.plus_zero
%4 = fneg double %3
store double %4, double* %1
%5 = call i64 @memcmp(double* @have_minus_zero.plus_zero, double* %1, i32 8)
%6 = icmp ne i64 %5, 0
%7 = zext i1 %6 to i32
ret i32 %7
}
/* Variables and functions */
int /*<<< orphan*/ jstp_tx_char(char);
void jstp_tx_bool(int boolValue) {
  if (boolValue) {
    jstp_tx_char('t');
    jstp_tx_char('r');
    jstp_tx_char('u');
    jstp_tx_char('e');
  } else {
    jstp_tx_char('f');
    jstp_tx_char('a');
    jstp_tx_char('l');
    jstp_tx_char('s');
    jstp_tx_char('e');
  }
}


x86 assembly (clang, -O0):
<jstp_tx_bool>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
cmpl   $0x0,-0x4(%rbp)
je     1152 <jstp_tx_bool+0x42>
mov    $0x74,%edi
call   1030 <jstp_tx_char@plt>
mov    $0x72,%edi
call   1030 <jstp_tx_char@plt>
mov    $0x75,%edi
call   1030 <jstp_tx_char@plt>
mov    $0x65,%edi
call   1030 <jstp_tx_char@plt>
jmp    1184 <jstp_tx_bool+0x74>
mov    $0x66,%edi
call   1030 <jstp_tx_char@plt>
mov    $0x61,%edi
call   1030 <jstp_tx_char@plt>
mov    $0x6c,%edi
call   1030 <jstp_tx_char@plt>
mov    $0x73,%edi
call   1030 <jstp_tx_char@plt>
mov    $0x65,%edi
call   1030 <jstp_tx_char@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<jstp_tx_bool>:
push   %rbp
push   %rbx
push   %rax
test   %edi,%edi
je     1120 <jstp_tx_bool+0x10>
mov    $0x75,%bpl
mov    $0x72,%bl
mov    $0x74,%al
jmp    1131 <jstp_tx_bool+0x21>
mov    $0x66,%edi
call   1030 <jstp_tx_char@plt>
mov    $0x73,%bpl
mov    $0x6c,%bl
mov    $0x61,%al
movzbl %al,%edi
call   1030 <jstp_tx_char@plt>
movzbl %bl,%edi
call   1030 <jstp_tx_char@plt>
movzbl %bpl,%edi
call   1030 <jstp_tx_char@plt>
mov    $0x65,%edi
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    1030 <jstp_tx_char@plt>

LLVM IR (-O0):
define void @jstp_tx_bool(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = icmp ne i32 %3, 0
br i1 %4, label %5, label %10
5: ; preds = %1
%6 = call i32 @jstp_tx_char(i8 signext 116)
%7 = call i32 @jstp_tx_char(i8 signext 114)
%8 = call i32 @jstp_tx_char(i8 signext 117)
%9 = call i32 @jstp_tx_char(i8 signext 101)
br label %16
10: ; preds = %1
%11 = call i32 @jstp_tx_char(i8 signext 102)
%12 = call i32 @jstp_tx_char(i8 signext 97)
%13 = call i32 @jstp_tx_char(i8 signext 108)
%14 = call i32 @jstp_tx_char(i8 signext 115)
%15 = call i32 @jstp_tx_char(i8 signext 101)
br label %16
16: ; preds = %10, %5
ret void
}

LLVM IR (-O2):
define void @jstp_tx_bool(i32 %0) {
%2 = icmp eq i32 %0, 0
br i1 %2, label %3, label %5
3: ; preds = %1
%4 = tail call i32 @jstp_tx_char(i8 signext 102)
br label %5
5: ; preds = %1, %3
%6 = phi i8 [ 97, %3 ], [ 116, %1 ]
%7 = phi i8 [ 108, %3 ], [ 114, %1 ]
%8 = phi i8 [ 115, %3 ], [ 117, %1 ]
%9 = tail call i32 @jstp_tx_char(i8 signext %6)
%10 = tail call i32 @jstp_tx_char(i8 signext %7)
%11 = tail call i32 @jstp_tx_char(i8 signext %8)
%12 = tail call i32 @jstp_tx_char(i8 signext 101)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ sigset_t;

/* Variables and functions */
int errno;
int /*<<< orphan*/ pr_mask(int /*<<< orphan*/ *);
int /*<<< orphan*/ printf(char *, int);
int /*<<< orphan*/ puts(char const *);
scalar_t__ sigpending(int /*<<< orphan*/ *);
void pr_pendmask(char const *tip) {
  sigset_t mask;
  if (sigpending(&mask) < 0)
    printf("sigpending failed, errno %d", errno);
  else {
    puts(tip);
    pr_mask(&mask);
  }
}


x86 assembly (clang, -O0):
<pr_pendmask>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
lea    -0xc(%rbp),%rdi
call   1060 <sigpending@plt>
cmp    $0x0,%rax
jge    1179 <pr_pendmask+0x39>
mov    0x2e7a(%rip),%rax
mov    (%rax),%esi
lea    0xe91(%rip),%rdi
call   1050 <printf@plt>
jmp    118b <pr_pendmask+0x4b>
mov    -0x8(%rbp),%rdi
call   1030 <puts@plt>
lea    -0xc(%rbp),%rdi
call   1040 <pr_mask@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<pr_pendmask>:
push   %rbx
sub    $0x10,%rsp
mov    %rdi,%rbx
lea    0xc(%rsp),%rdi
call   1060 <sigpending@plt>
test   %rax,%rax
js     116b <pr_pendmask+0x2b>
mov    %rbx,%rdi
call   1030 <puts@plt>
lea    0xc(%rsp),%rdi
call   1040 <pr_mask@plt>
jmp    1180 <pr_pendmask+0x40>
mov    0x2e6e(%rip),%rax
mov    (%rax),%esi
lea    0xe85(%rip),%rdi
call   1050 <printf@plt>
add    $0x10,%rsp
pop    %rbx
ret

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

LLVM IR (-O2):
@.str = [28 x i8] c"sigpending failed, errno %d\00"
@errno = global i32 0
define void @pr_pendmask(i8* nocapture %0) {
%2 = alloca i32
%3 = bitcast i32* %2 to i8*
%4 = call i64 @sigpending(i32* %2)
%5 = icmp slt i64 %4, 0
br i1 %5, label %6, label %9
6: ; preds = %1
%7 = load i32, i32* @errno
%8 = call i32 @printf(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str, i64 0, i64 0), i32 %7)
br label %12
9: ; preds = %1
%10 = call i32 @puts(i8* dereferenceable(1) %0)
%11 = call i32 @pr_mask(i32* %2)
br label %12
12: ; preds = %9, %6
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
int /*<<< orphan*/ scanf(char *, int *);
int main() {
  int n;
  scanf("%d", &n);
  printf("\n%d", n * n);
  printf("\n%d", n * n * n);
  return 0;
}


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

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x10,%rsp
lea    0xed5(%rip),%rdi
lea    0xc(%rsp),%rsi
call   1040 <scanf@plt>
mov    0xc(%rsp),%esi
imul   %esi,%esi
lea    0xebc(%rip),%rbx
mov    %rbx,%rdi
call   1030 <printf@plt>
mov    0xc(%rsp),%eax
mov    %eax,%esi
imul   %eax,%esi
imul   %eax,%esi
mov    %rbx,%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbx
ret

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

LLVM IR (-O2):
@.str = [3 x i8] c"%d\00"
@.str.1 = [4 x i8] c"\0A%d\00"
define i32 @main() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
%3 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %1)
%4 = load i32, i32* %1
%5 = mul nsw i32 %4, %4
%6 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i32 %5)
%7 = load i32, i32* %1
%8 = mul nsw i32 %7, %7
%9 = mul nsw i32 %8, %7
%10 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i32 %9)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ print_routine(char const *);
int jupiter_print(const char *name) { print_routine(name); }


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

x86 assembly (clang, -O2):
<jupiter_print>:
jmp    1030 <print_routine@plt>

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

LLVM IR (-O2):
define i32 @jupiter_print(i8* %0) {
%2 = tail call i32 @print_routine(i8* %0)
ret i32 undef
}
int hash_function(char *key, int size) {
  unsigned int hashval;
  for (hashval = 0; *key != '\0'; key++)
    hashval = *key + 31 * hashval;
  return hashval % size;
}


x86 assembly (clang, -O0):
<hash_function>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
movl   $0x0,-0x10(%rbp)
mov    -0x8(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x0,%eax
je     1143 <hash_function+0x43>
mov    -0x8(%rbp),%rax
movsbl (%rax),%eax
imul   $0x1f,-0x10(%rbp),%ecx
add    %ecx,%eax
mov    %eax,-0x10(%rbp)
mov    -0x8(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x8(%rbp)
jmp    1112 <hash_function+0x12>
mov    -0x10(%rbp),%eax
xor    %edx,%edx
divl   -0xc(%rbp)
mov    %edx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<hash_function>:
mov    (%rdi),%cl
test   %cl,%cl
je     1129 <hash_function+0x29>
add    $0x1,%rdi
xor    %edx,%edx
mov    %edx,%eax
xchg   %ax,%ax
movsbl %cl,%ecx
shl    $0x5,%eax
sub    %edx,%eax
add    %ecx,%eax
movzbl (%rdi),%ecx
add    $0x1,%rdi
mov    %eax,%edx
test   %cl,%cl
jne    1110 <hash_function+0x10>
jmp    112b <hash_function+0x2b>
xor    %eax,%eax
xor    %edx,%edx
div    %esi
mov    %edx,%eax
ret

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

LLVM IR (-O2):
define i32 @hash_function(i8* nocapture %0, i32 %1) {
%3 = load i8, i8* %0
%4 = icmp eq i8 %3, 0
br i1 %4, label %15, label %5
5: ; preds = %2, %5
%6 = phi i8 [ %13, %5 ], [ %3, %2 ]
%7 = phi i32 [ %11, %5 ], [ 0, %2 ]
%8 = phi i8* [ %12, %5 ], [ %0, %2 ]
%9 = sext i8 %6 to i32
%10 = mul i32 %7, 31
%11 = add i32 %10, %9
%12 = getelementptr inbounds i8, i8* %8, i64 1
%13 = load i8, i8* %12
%14 = icmp eq i8 %13, 0
br i1 %14, label %15, label %5
15: ; preds = %5, %2
%16 = phi i32 [ 0, %2 ], [ %11, %5 ]
%17 = urem i32 %16, %1
ret i32 %17
}
/* Variables and functions */
int /*<<< orphan*/ cs2tcb();
void cs2tcb_(void) { cs2tcb(); }


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

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

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

LLVM IR (-O2):
define void @cs2tcb_() {
%1 = tail call i32 (...) @cs2tcb()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ sprintf(char *, char *, char *);
void operation_semaphore_remove_file(char *semaphore_filename) {
  char sys_string[1024];
  sprintf(sys_string, "rm -f %s", semaphore_filename);
}


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

x86 assembly (clang, -O2):
<operation_semaphore_remove_file>:
sub    $0x408,%rsp
mov    %rdi,%rdx
lea    0xedf(%rip),%rsi
mov    %rsp,%rdi
call   1030 <sprintf@plt>
add    $0x408,%rsp
ret

LLVM IR (-O0):
@.str = [9 x i8] c"rm -f %s\00"
define void @operation_semaphore_remove_file(i8* %0) {
%2 = alloca i8*
%3 = alloca [1024 x i8]
store i8* %0, i8** %2
%4 = getelementptr inbounds [1024 x i8], [1024 x i8]* %3, i64 0, i64 0
%5 = load i8*, i8** %2
%6 = call i32 @sprintf(i8* %4, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), i8* %5)
ret void
}

LLVM IR (-O2):
@.str = [9 x i8] c"rm -f %s\00"
define void @operation_semaphore_remove_file(i8* %0) {
%2 = alloca [1024 x i8]
%3 = getelementptr inbounds [1024 x i8], [1024 x i8]* %2, i64 0, i64 0
%4 = call i32 @sprintf(i8* %3, i8* dereferenceable(1) getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), i8* %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ VIDEO_SLOWMOTION;
int ioctl(int, int /*<<< orphan*/, int);
int /*<<< orphan*/ perror(char *);
int videoSlowMotion(int fd, int nframes) {
  int ans;
  if ((ans = ioctl(fd, VIDEO_SLOWMOTION, nframes)) < 0) {
    perror("VIDEO SLOWMOTION: ");
    return -1;
  }
  return 0;
}


x86 assembly (clang, -O0):
<videoSlowMotion>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%edi
mov    0x2eb0(%rip),%rax
mov    (%rax),%esi
mov    -0xc(%rbp),%edx
call   1030 <ioctl@plt>
mov    %eax,-0x10(%rbp)
cmp    $0x0,%eax
jge    1166 <videoSlowMotion+0x46>
lea    0xeab(%rip),%rdi
call   1040 <perror@plt>
movl   $0xffffffff,-0x4(%rbp)
jmp    116d <videoSlowMotion+0x4d>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<videoSlowMotion>:
push   %rax
mov    %esi,%edx
mov    0x2ebe(%rip),%rax
mov    (%rax),%esi
call   1030 <ioctl@plt>
mov    %eax,%ecx
xor    %eax,%eax
test   %ecx,%ecx
js     113b <videoSlowMotion+0x1b>
pop    %rcx
ret
lea    0xebe(%rip),%rdi
call   1040 <perror@plt>
mov    $0xffffffff,%eax
pop    %rcx
ret

LLVM IR (-O0):
@VIDEO_SLOWMOTION = global i32 0
@.str = [19 x i8] c"VIDEO SLOWMOTION: \00"
define i32 @videoSlowMotion(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
store i32 %0, i32* %4
store i32 %1, i32* %5
%7 = load i32, i32* %4
%8 = load i32, i32* @VIDEO_SLOWMOTION
%9 = load i32, i32* %5
%10 = call i32 @ioctl(i32 %7, i32 %8, i32 %9)
store i32 %10, i32* %6
%11 = icmp slt i32 %10, 0
br i1 %11, label %12, label %14
12: ; preds = %2
%13 = call i32 @perror(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0))
store i32 -1, i32* %3
br label %15
14: ; preds = %2
store i32 0, i32* %3
br label %15
15: ; preds = %14, %12
%16 = load i32, i32* %3
ret i32 %16
}

LLVM IR (-O2):
@VIDEO_SLOWMOTION = global i32 0
@.str = [19 x i8] c"VIDEO SLOWMOTION: \00"
define i32 @videoSlowMotion(i32 %0, i32 %1) {
%3 = load i32, i32* @VIDEO_SLOWMOTION
%4 = tail call i32 @ioctl(i32 %0, i32 %3, i32 %1)
%5 = icmp slt i32 %4, 0
br i1 %5, label %6, label %8
6: ; preds = %2
%7 = tail call i32 @perror(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0))
br label %8
8: ; preds = %2, %6
%9 = phi i32 [ -1, %6 ], [ 0, %2 ]
ret i32 %9
}
/* Forward declarations */
typedef struct TYPE_4__ TYPE_2__;
typedef struct TYPE_3__ TYPE_1__;

/* Type definitions */
struct TYPE_3__ {
  scalar_t__ send_event;
};
struct TYPE_4__ {
  TYPE_1__ xproperty;
};
typedef TYPE_2__ XEvent;

/* Variables and functions */
int get_XEvent_xproperty_send_event(void *_p) {
  return (int)((XEvent *)_p)->xproperty.send_event;
}


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

x86 assembly (clang, -O2):
<get_XEvent_xproperty_send_event>:
mov    (%rdi),%eax
ret

LLVM IR (-O0):
%struct.TYPE_4__ = type { %struct.TYPE_3__ }
%struct.TYPE_3__ = type { i64 }
define i32 @get_XEvent_xproperty_send_event(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = bitcast i8* %3 to %struct.TYPE_4__*
%5 = getelementptr inbounds %struct.TYPE_4__, %struct.TYPE_4__* %4, i32 0, i32 0
%6 = getelementptr inbounds %struct.TYPE_3__, %struct.TYPE_3__* %5, i32 0, i32 0
%7 = load i64, i64* %6
%8 = trunc i64 %7 to i32
ret i32 %8
}

LLVM IR (-O2):
define i32 @get_XEvent_xproperty_send_event(i8* nocapture %0) {
%2 = bitcast i8* %0 to i64*
%3 = load i64, i64* %2
%4 = trunc i64 %3 to i32
ret i32 %4
}
unsigned thumb_alignpc4(unsigned addr) { return (addr + 4) & ~3; }


x86 assembly (clang, -O0):
<thumb_alignpc4>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x4,%eax
and    $0xfffffffc,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<thumb_alignpc4>:
lea    0x4(%rdi),%eax
and    $0xfffffffc,%eax
ret

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

LLVM IR (-O2):
define i32 @thumb_alignpc4(i32 %0) {
%2 = add i32 %0, 4
%3 = and i32 %2, -4
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ ExecPS2(int, int /*<<< orphan*/, int, char **);
int /*<<< orphan*/ FlushCache(int);
int ReadELF(char *);
int /*<<< orphan*/ ResetIOP();
int RunELF(char *elfname) {
  int Entry = ReadELF(elfname);
  char *argv[1];
  if (Entry > 0) {
    argv[0] = elfname;
    ResetIOP();
    FlushCache(0);
    FlushCache(2);
    ExecPS2(Entry, 0, 1, argv);
  }
  return -1;
}


x86 assembly (clang, -O0):
<RunELF>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <ReadELF@plt>
mov    %eax,-0xc(%rbp)
cmpl   $0x0,-0xc(%rbp)
jle    1195 <RunELF+0x55>
mov    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    $0x0,%al
call   1040 <ResetIOP@plt>
xor    %edi,%edi
call   1050 <FlushCache@plt>
mov    $0x2,%edi
call   1050 <FlushCache@plt>
mov    -0xc(%rbp),%edi
lea    -0x18(%rbp),%rcx
xor    %esi,%esi
mov    $0x1,%edx
call   1060 <ExecPS2@plt>
mov    $0xffffffff,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<RunELF>:
push   %rbp
push   %rbx
push   %rax
mov    %rdi,%rbx
call   1030 <ReadELF@plt>
test   %eax,%eax
jle    117e <RunELF+0x3e>
mov    %eax,%ebp
mov    %rbx,(%rsp)
xor    %eax,%eax
call   1040 <ResetIOP@plt>
xor    %edi,%edi
call   1050 <FlushCache@plt>
mov    $0x2,%edi
call   1050 <FlushCache@plt>
mov    %rsp,%rcx
mov    %ebp,%edi
xor    %esi,%esi
mov    $0x1,%edx
call   1060 <ExecPS2@plt>
mov    $0xffffffff,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
define i32 @RunELF(i8* %0) {
%2 = alloca i8*
%3 = alloca i32
%4 = alloca [1 x i8*]
store i8* %0, i8** %2
%5 = load i8*, i8** %2
%6 = call i32 @ReadELF(i8* %5)
store i32 %6, i32* %3
%7 = load i32, i32* %3
%8 = icmp sgt i32 %7, 0
br i1 %8, label %9, label %18
9: ; preds = %1
%10 = load i8*, i8** %2
%11 = getelementptr inbounds [1 x i8*], [1 x i8*]* %4, i64 0, i64 0
store i8* %10, i8** %11
%12 = call i32 (...) @ResetIOP()
%13 = call i32 @FlushCache(i32 0)
%14 = call i32 @FlushCache(i32 2)
%15 = load i32, i32* %3
%16 = getelementptr inbounds [1 x i8*], [1 x i8*]* %4, i64 0, i64 0
%17 = call i32 @ExecPS2(i32 %15, i32 0, i32 1, i8** %16)
br label %18
18: ; preds = %9, %1
ret i32 -1
}

LLVM IR (-O2):
define i32 @RunELF(i8* %0) {
%2 = alloca [1 x i8*]
%3 = tail call i32 @ReadELF(i8* %0)
%4 = bitcast [1 x i8*]* %2 to i8*
%5 = icmp sgt i32 %3, 0
br i1 %5, label %6, label %12
6: ; preds = %1
%7 = getelementptr inbounds [1 x i8*], [1 x i8*]* %2, i64 0, i64 0
store i8* %0, i8** %7
%8 = tail call i32 (...) @ResetIOP()
%9 = tail call i32 @FlushCache(i32 0)
%10 = tail call i32 @FlushCache(i32 2)
%11 = call i32 @ExecPS2(i32 %3, i32 0, i32 1, i8** %7)
br label %12
12: ; preds = %6, %1
ret i32 -1
}
void free_matrix(unsigned int width, unsigned char **matrix) {
  unsigned int i;
  for (i = 0; i < width; i++) {
    free(matrix[i]);
  }
  free(matrix);
}


x86 assembly (clang, -O0):
<free_matrix>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
mov    -0x14(%rbp),%eax
cmp    -0x4(%rbp),%eax
jae    1150 <free_matrix+0x40>
mov    -0x10(%rbp),%rax
mov    -0x14(%rbp),%ecx
mov    (%rax,%rcx,8),%rdi
call   1030 <free@plt>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    1126 <free_matrix+0x16>
mov    -0x10(%rbp),%rdi
call   1030 <free@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<free_matrix>:
push   %r15
push   %r14
push   %rbx
mov    %rsi,%r14
test   %edi,%edi
je     1142 <free_matrix+0x32>
mov    %edi,%r15d
xor    %ebx,%ebx
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
mov    (%r14,%rbx,8),%rdi
call   1030 <free@plt>
add    $0x1,%rbx
cmp    %rbx,%r15
jne    1130 <free_matrix+0x20>
mov    %r14,%rdi
pop    %rbx
pop    %r14
pop    %r15
jmp    1030 <free@plt>

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

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

/* Variables and functions */
int /*<<< orphan*/ print_internal(char *, void *);
void printf_vga(char *format, ...) {
  void *param;
  if (format && ('\0' != *format)) {
    param = (void *)&format + sizeof(format);
    print_internal(format, param);
  }
}


x86 assembly (clang, -O0):
<printf_vga>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
cmpq   $0x0,-0x8(%rbp)
je     1151 <printf_vga+0x41>
mov    -0x8(%rbp),%rax
movsbl (%rax),%ecx
xor    %eax,%eax
cmp    %ecx,%eax
je     1151 <printf_vga+0x41>
lea    -0x8(%rbp),%rax
add    $0x8,%rax
mov    %rax,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1030 <print_internal@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<printf_vga>:
push   %rax
mov    %rdi,(%rsp)
test   %rdi,%rdi
je     1129 <printf_vga+0x19>
cmpb   $0x0,(%rdi)
je     1129 <printf_vga+0x19>
lea    0x8(%rsp),%rsi
call   1030 <print_internal@plt>
pop    %rax
ret

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

LLVM IR (-O2):
define void @printf_vga(i8* %0, ...) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = icmp eq i8* %0, null
br i1 %3, label %11, label %4
4: ; preds = %1
%5 = load i8, i8* %0
%6 = icmp eq i8 %5, 0
br i1 %6, label %11, label %7
7: ; preds = %4
%8 = getelementptr inbounds i8*, i8** %2, i64 1
%9 = bitcast i8** %8 to i8*
%10 = call i32 @print_internal(i8* %0, i8* %9)
br label %11
11: ; preds = %7, %4, %1
ret void
}
/* Variables and functions */
int /*<<< orphan*/ xlFmtError(char *);
void badfop(void) { xlFmtError("bad floating point operation"); }


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

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

LLVM IR (-O0):
@.str = [29 x i8] c"bad floating point operation\00"
define void @badfop() {
%1 = call i32 @xlFmtError(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [29 x i8] c"bad floating point operation\00"
define void @badfop() {
%1 = tail call i32 @xlFmtError(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str, i64 0, i64 0))
ret void
}
/* Forward declarations */
typedef struct TYPE_2__ TYPE_1__;

/* Type definitions */
struct TYPE_2__ {
  scalar_t__ value;
};
typedef TYPE_1__ XTextProperty;

/* Variables and functions */
void *get_XTextProperty_value(void *_p) {
  return (void *)((XTextProperty *)_p)->value;
}


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

x86 assembly (clang, -O2):
<get_XTextProperty_value>:
mov    (%rdi),%rax
ret

LLVM IR (-O0):
%struct.TYPE_2__ = type { i64 }
define i8* @get_XTextProperty_value(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = bitcast i8* %3 to %struct.TYPE_2__*
%5 = getelementptr inbounds %struct.TYPE_2__, %struct.TYPE_2__* %4, i32 0, i32 0
%6 = load i64, i64* %5
%7 = inttoptr i64 %6 to i8*
ret i8* %7
}

LLVM IR (-O2):
define i8* @get_XTextProperty_value(i8* nocapture %0) {
%2 = bitcast i8* %0 to i64*
%3 = load i64, i64* %2
%4 = inttoptr i64 %3 to i8*
ret i8* %4
}
void foo20() {}


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

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

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

LLVM IR (-O2):
define void @foo20() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ jerry_port_console(char *, char *);
void print_help(char *name) {
  jerry_port_console("Usage: %s [OPTION]... [FILE]...\n"
                     "\n"
                     "Options:\n"
                     "  -h, --help\n"
                     "  -v, --version\n"
                     "  --mem-stats\n"
                     "  --mem-stats-separate\n"
                     "  --parse-only\n"
                     "  --show-opcodes\n"
                     "  --show-regexp-opcodes\n"
                     "  --save-snapshot-for-global FILE\n"
                     "  --save-snapshot-for-eval FILE\n"
                     "  --exec-snapshot FILE\n"
                     "  --log-level [0-3]\n"
                     "  --abort-on-fail\n"
                     "  --no-prompt\n"
                     "\n",
                     name);
}


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

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

LLVM IR (-O0):
@.str = [307 x i8] c"Usage: %s [OPTION]... [FILE]...\0A\0AOptions:\0A -h, --help\0A -v, --version\0A --mem-stats\0A --mem-stats-separate\0A --parse-only\0A --show-opcodes\0A --show-regexp-opcodes\0A --save-snapshot-for-global FILE\0A --save-snapshot-for-eval FILE\0A --exec-snapshot FILE\0A --log-level [0-3]\0A --abort-on-fail\0A --no-prompt\0A\0A\00"
define void @print_help(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 @jerry_port_console(i8* getelementptr inbounds ([307 x i8], [307 x i8]* @.str, i64 0, i64 0), i8* %3)
ret void
}

LLVM IR (-O2):
@.str = [307 x i8] c"Usage: %s [OPTION]... [FILE]...\0A\0AOptions:\0A -h, --help\0A -v, --version\0A --mem-stats\0A --mem-stats-separate\0A --parse-only\0A --show-opcodes\0A --show-regexp-opcodes\0A --save-snapshot-for-global FILE\0A --save-snapshot-for-eval FILE\0A --exec-snapshot FILE\0A --log-level [0-3]\0A --abort-on-fail\0A --no-prompt\0A\0A\00"
define void @print_help(i8* %0) {
%2 = tail call i32 @jerry_port_console(i8* getelementptr inbounds ([307 x i8], [307 x i8]* @.str, i64 0, i64 0), i8* %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ g2(char *);
void g(void) {
  char x[5];
  x[0] = 42;
  g2(x);
}


x86 assembly (clang, -O0):
<g>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movb   $0x2a,-0x5(%rbp)
lea    -0x5(%rbp),%rdi
call   1030 <g2@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<g>:
push   %rax
movb   $0x2a,0x3(%rsp)
lea    0x3(%rsp),%rdi
call   1030 <g2@plt>
pop    %rax
ret

LLVM IR (-O0):
define void @g() {
%1 = alloca [5 x i8]
%2 = getelementptr inbounds [5 x i8], [5 x i8]* %1, i64 0, i64 0
store i8 42, i8* %2
%3 = getelementptr inbounds [5 x i8], [5 x i8]* %1, i64 0, i64 0
%4 = call i32 @g2(i8* %3)
ret void
}

LLVM IR (-O2):
define void @g() {
%1 = alloca [5 x i8]
%2 = getelementptr inbounds [5 x i8], [5 x i8]* %1, i64 0, i64 0
store i8 42, i8* %2
%3 = call i32 @g2(i8* %2)
ret void
}
unsigned int ECAPClockEnableStatusGet(unsigned int baseAdd) {
  unsigned int status;
  status = (*((volatile unsigned int *)(baseAdd + 0x0C)));
  status = status << 0x00;
  return status;
}


x86 assembly (clang, -O0):
<ECAPClockEnableStatusGet>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0xc,%eax
mov    %eax,%eax
mov    (%rax),%eax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
shl    $0x0,%eax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<ECAPClockEnableStatusGet>:
add    $0xc,%edi
mov    (%rdi),%eax
ret

LLVM IR (-O0):
define i32 @ECAPClockEnableStatusGet(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %2
%4 = load i32, i32* %2
%5 = add i32 %4, 12
%6 = zext i32 %5 to i64
%7 = inttoptr i64 %6 to i32*
%8 = load volatile i32, i32* %7
store i32 %8, i32* %3
%9 = load i32, i32* %3
%10 = shl i32 %9, 0
store i32 %10, i32* %3
%11 = load i32, i32* %3
ret i32 %11
}

LLVM IR (-O2):
define i32 @ECAPClockEnableStatusGet(i32 %0) {
%2 = add i32 %0, 12
%3 = zext i32 %2 to i64
%4 = inttoptr i64 %3 to i32*
%5 = load volatile i32, i32* %4
ret i32 %5
}
int getRow(int x, int y) { return y; }


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

x86 assembly (clang, -O2):
<getRow>:
mov    %esi,%eax
ret

LLVM IR (-O0):
define i32 @getRow(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
ret i32 %5
}

LLVM IR (-O2):
define i32 @getRow(i32 %0, i32 returned %1) {
ret i32 %1
}
/* Variables and functions */
scalar_t__ calloc(int, size_t);
void *s_alloc(size_t n) {
  void *p = (void *)calloc(1, n);
  return p;
}


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

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

LLVM IR (-O0):
define i8* @s_alloc(i64 %0) {
%2 = alloca i64
%3 = alloca i8*
store i64 %0, i64* %2
%4 = load i64, i64* %2
%5 = call i64 @calloc(i32 1, i64 %4)
%6 = inttoptr i64 %5 to i8*
store i8* %6, i8** %3
%7 = load i8*, i8** %3
ret i8* %7
}

LLVM IR (-O2):
define i8* @s_alloc(i64 %0) {
%2 = tail call i64 @calloc(i32 1, i64 %0)
%3 = inttoptr i64 %2 to i8*
ret i8* %3
}
/* Variables and functions */
int /*<<< orphan*/ check_long(long *, long *, char *);
void check_long_(long *x, long *y, char *ret) { check_long(x, y, ret); }


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

x86 assembly (clang, -O2):
<check_long_>:
jmp    1030 <check_long@plt>

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

LLVM IR (-O2):
define void @check_long_(i64* %0, i64* %1, i8* %2) {
%4 = tail call i32 @check_long(i64* %0, i64* %1, i8* %2)
ret void
}
int isq(int v) { return v * v; }


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

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

LLVM IR (-O0):
define i32 @isq(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 @isq(i32 %0) {
%2 = mul nsw i32 %0, %0
ret i32 %2
}
void signed_char_sub_signed_char_unsigned_int(signed char *LHS,
                                              unsigned int RHS) {
  (*LHS) -= RHS;
}


x86 assembly (clang, -O0):
<signed_char_sub_signed_char_unsigned_int>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0xc(%rbp),%edx
mov    -0x8(%rbp),%rax
movsbl (%rax),%ecx
sub    %edx,%ecx
mov    %cl,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<signed_char_sub_signed_char_unsigned_int>:
sub    %sil,(%rdi)
ret

LLVM IR (-O0):
define void @signed_char_sub_signed_char_unsigned_int(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i32
store i8* %0, i8** %3
store i32 %1, i32* %4
%5 = load i32, i32* %4
%6 = load i8*, i8** %3
%7 = load i8, i8* %6
%8 = sext i8 %7 to i32
%9 = sub i32 %8, %5
%10 = trunc i32 %9 to i8
store i8 %10, i8* %6
ret void
}

LLVM IR (-O2):
define void @signed_char_sub_signed_char_unsigned_int(i8* nocapture %0, i32 %1) {
%3 = load i8, i8* %0
%4 = trunc i32 %1 to i8
%5 = sub i8 %3, %4
store i8 %5, i8* %0
ret void
}
/* Variables and functions */
int PrintfP__Putchar__putchar(int);
int PutcharP__Putchar__putchar(int c) {
  int __nesc_result;
  __nesc_result = PrintfP__Putchar__putchar(c);
  return __nesc_result;
}


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

x86 assembly (clang, -O2):
<PutcharP__Putchar__putchar>:
jmp    1030 <PrintfP__Putchar__putchar@plt>

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

LLVM IR (-O2):
define i32 @PutcharP__Putchar__putchar(i32 %0) {
%2 = tail call i32 @PrintfP__Putchar__putchar(i32 %0)
ret i32 %2
}
void chtls_rsk_destructor(struct request_sock *req) {}


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

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

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

LLVM IR (-O2):
%struct.request_sock = type opaque
define void @chtls_rsk_destructor(%struct.request_sock* nocapture %0) {
ret void
}
void INT_Excep_RSPI1_SPRI1(void) {}


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

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

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

LLVM IR (-O2):
define void @INT_Excep_RSPI1_SPRI1() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ __emit_string_literal_range(char *, int, int, int);
void test_backslash_continued_logical_lines(void) {
  __emit_string_literal_range("0123456789", 6, 6, 7);
}


x86 assembly (clang, -O0):
<test_backslash_continued_logical_lines>:
push   %rbp
mov    %rsp,%rbp
lea    0xee5(%rip),%rdi
mov    $0x6,%edx
mov    $0x7,%ecx
mov    %edx,%esi
call   1030 <__emit_string_literal_range@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_backslash_continued_logical_lines>:
lea    0xee9(%rip),%rdi
mov    $0x6,%esi
mov    $0x6,%edx
mov    $0x7,%ecx
jmp    1030 <__emit_string_literal_range@plt>

LLVM IR (-O0):
@.str = [11 x i8] c"0123456789\00"
define void @test_backslash_continued_logical_lines() {
%1 = call i32 @__emit_string_literal_range(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), i32 6, i32 6, i32 7)
ret void
}

LLVM IR (-O2):
@.str = [11 x i8] c"0123456789\00"
define void @test_backslash_continued_logical_lines() {
%1 = tail call i32 @__emit_string_literal_range(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), i32 6, i32 6, i32 7)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ ST7735_FillScreen(int /*<<< orphan*/);
void Output_Clear(void) { ST7735_FillScreen(0); }


x86 assembly (clang, -O0):
<Output_Clear>:
push   %rbp
mov    %rsp,%rbp
xor    %edi,%edi
call   1030 <ST7735_FillScreen@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<Output_Clear>:
xor    %edi,%edi
jmp    1030 <ST7735_FillScreen@plt>

LLVM IR (-O0):
define void @Output_Clear() {
%1 = call i32 @ST7735_FillScreen(i32 0)
ret void
}

LLVM IR (-O2):
define void @Output_Clear() {
%1 = tail call i32 @ST7735_FillScreen(i32 0)
ret void
}
__attribute__((always_)) int serial_paranoia_check(struct esp_struct *info,
                                                   char *name,
                                                   const char *routine) {
  return 0;
}


x86 assembly (clang, -O0):
<serial_paranoia_check>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
xor    %eax,%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
%struct.esp_struct = type opaque
define i32 @serial_paranoia_check(%struct.esp_struct* nocapture readnone %0, i8* nocapture readnone %1, i8* nocapture readnone %2) {
ret i32 0
}
int Sequential_Search2(int *a, int n, int key) {
  int i;
  a[0] = key;
  i = n;
  while (a[i] != key)
    i--;
  return i;
}


x86 assembly (clang, -O0):
<Sequential_Search2>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    -0x10(%rbp),%ecx
mov    -0x8(%rbp),%rax
mov    %ecx,(%rax)
mov    -0xc(%rbp),%eax
mov    %eax,-0x14(%rbp)
mov    -0x8(%rbp),%rax
movslq -0x14(%rbp),%rcx
mov    (%rax,%rcx,4),%eax
cmp    -0x10(%rbp),%eax
je     113f <Sequential_Search2+0x3f>
mov    -0x14(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0x14(%rbp)
jmp    111d <Sequential_Search2+0x1d>
mov    -0x14(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<Sequential_Search2>:
mov    %edx,(%rdi)
movslq %esi,%rcx
lea    0x1(%rcx),%eax
lea    (%rdi,%rcx,4),%rcx
nopl   0x0(%rax)
add    $0xffffffff,%eax
lea    -0x4(%rcx),%rsi
cmp    %edx,(%rcx)
mov    %rsi,%rcx
jne    1110 <Sequential_Search2+0x10>
ret

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

LLVM IR (-O2):
define i32 @Sequential_Search2(i32* nocapture %0, i32 %1, i32 %2) {
store i32 %2, i32* %0
%4 = sext i32 %1 to i64
br label %5
5: ; preds = %5, %3
%6 = phi i64 [ %10, %5 ], [ %4, %3 ]
%7 = getelementptr inbounds i32, i32* %0, i64 %6
%8 = load i32, i32* %7
%9 = icmp eq i32 %8, %2
%10 = add i64 %6, -1
br i1 %9, label %11, label %5
11: ; preds = %5
%12 = trunc i64 %6 to i32
ret i32 %12
}