xunge/DecIR huggingface dataset:
/* Variables and functions */
int EOF;
int getchar();
int /*<<< orphan*/ putchar(char);
void commaer() {
  int c = getchar();
  while (c != EOF) {
    putchar(c);
    if (c != '\n') {
      putchar(',');
    }
    c = getchar();
  }
}


x86 assembly (clang, -O0):
<commaer>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1040 <getchar@plt>
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
mov    0x2eac(%rip),%rcx
cmp    (%rcx),%eax
je     1172 <commaer+0x52>
mov    -0x4(%rbp),%eax
movsbl %al,%edi
call   1030 <putchar@plt>
cmpl   $0xa,-0x4(%rbp)
je     1163 <commaer+0x43>
mov    $0x2c,%edi
call   1030 <putchar@plt>
mov    $0x0,%al
call   1040 <getchar@plt>
mov    %eax,-0x4(%rbp)
jmp    1132 <commaer+0x12>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<commaer>:
push   %r14
push   %rbx
push   %rax
xor    %eax,%eax
call   1040 <getchar@plt>
mov    0x2eb6(%rip),%r14
cmp    (%r14),%eax
jne    113f <commaer+0x1f>
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret
mov    %eax,%ebx
jmp    115e <commaer+0x3e>
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
xor    %eax,%eax
call   1040 <getchar@plt>
mov    %eax,%ebx
cmp    (%r14),%eax
je     1137 <commaer+0x17>
movsbl %bl,%edi
call   1030 <putchar@plt>
cmp    $0xa,%ebx
je     1150 <commaer+0x30>
mov    $0x2c,%edi
call   1030 <putchar@plt>
jmp    1150 <commaer+0x30>

LLVM IR (-O0):
@EOF = global i32 0
define void @commaer() {
%1 = alloca i32
%2 = call i32 (...) @getchar()
store i32 %2, i32* %1
br label %3
3: ; preds = %15, %0
%4 = load i32, i32* %1
%5 = load i32, i32* @EOF
%6 = icmp ne i32 %4, %5
br i1 %6, label %7, label %17
7: ; preds = %3
%8 = load i32, i32* %1
%9 = trunc i32 %8 to i8
%10 = call i32 @putchar(i8 signext %9)
%11 = load i32, i32* %1
%12 = icmp ne i32 %11, 10
br i1 %12, label %13, label %15
13: ; preds = %7
%14 = call i32 @putchar(i8 signext 44)
br label %15
15: ; preds = %13, %7
%16 = call i32 (...) @getchar()
store i32 %16, i32* %1
br label %3
17: ; preds = %3
ret void
}

LLVM IR (-O2):
@EOF = global i32 0
define void @commaer() {
%1 = tail call i32 (...) @getchar()
%2 = load i32, i32* @EOF
%3 = icmp eq i32 %1, %2
br i1 %3, label %15, label %4
4: ; preds = %0, %11
%5 = phi i32 [ %12, %11 ], [ %1, %0 ]
%6 = trunc i32 %5 to i8
%7 = tail call i32 @putchar(i8 signext %6)
%8 = icmp eq i32 %5, 10
br i1 %8, label %11, label %9
9: ; preds = %4
%10 = tail call i32 @putchar(i8 signext 44)
br label %11
11: ; preds = %9, %4
%12 = tail call i32 (...) @getchar()
%13 = load i32, i32* @EOF
%14 = icmp eq i32 %12, %13
br i1 %14, label %15, label %4
15: ; preds = %11, %0
ret void
}
unsigned hash(char *s) {
  unsigned hashval;
  for (hashval = 0; *s != '\0'; s++)
    hashval = *s + 31 * hashval;
  return hashval % 101;
}


x86 assembly (clang, -O0):
<hash>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
mov    -0x8(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x0,%eax
je     1140 <hash+0x40>
mov    -0x8(%rbp),%rax
movsbl (%rax),%eax
imul   $0x1f,-0xc(%rbp),%ecx
add    %ecx,%eax
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x8(%rbp)
jmp    110f <hash+0xf>
mov    -0xc(%rbp),%eax
mov    $0x65,%ecx
xor    %edx,%edx
div    %ecx
mov    %edx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<hash>:
mov    (%rdi),%cl
test   %cl,%cl
je     1147 <hash+0x47>
add    $0x1,%rdi
xor    %eax,%eax
nopl   0x0(%rax)
movsbl %cl,%ecx
mov    %eax,%edx
shl    $0x5,%edx
sub    %eax,%edx
mov    %edx,%eax
add    %ecx,%eax
movzbl (%rdi),%ecx
add    $0x1,%rdi
test   %cl,%cl
jne    1110 <hash+0x10>
mov    %eax,%ecx
imul   $0x446f8657,%rcx,%rcx
shr    $0x20,%rcx
mov    %eax,%edx
sub    %ecx,%edx
shr    %edx
add    %ecx,%edx
shr    $0x6,%edx
imul   $0x65,%edx,%ecx
sub    %ecx,%eax
ret
xor    %eax,%eax
ret

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

LLVM IR (-O2):
define i32 @hash(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 i32 [ %10, %4 ], [ 0, %1 ]
%7 = phi i8* [ %11, %4 ], [ %0, %1 ]
%8 = sext i8 %5 to i32
%9 = mul i32 %6, 31
%10 = add i32 %9, %8
%11 = getelementptr inbounds i8, i8* %7, i64 1
%12 = load i8, i8* %11
%13 = icmp eq i8 %12, 0
br i1 %13, label %14, label %4
14: ; preds = %4
%15 = urem i32 %10, 101
br label %16
16: ; preds = %14, %1
%17 = phi i32 [ 0, %1 ], [ %15, %14 ]
ret i32 %17
}
int main() {
  int n;
  int k = 0;
  int i = 0;
  while (i < n) {
    i++;
    k++;
  }
  int j = n;
  while (j > 0) {
    j--;
    k--;
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0xc(%rbp)
movl   $0x0,-0x10(%rbp)
mov    -0x10(%rbp),%eax
cmp    -0x8(%rbp),%eax
jge    113c <main+0x3c>
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1119 <main+0x19>
mov    -0x8(%rbp),%eax
mov    %eax,-0x14(%rbp)
cmpl   $0x0,-0x14(%rbp)
jle    1163 <main+0x63>
mov    -0x14(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0x14(%rbp)
mov    -0xc(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0xc(%rbp)
jmp    1142 <main+0x42>
xor    %eax,%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @main() {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ CRYPTO_free_ex_index(int /*<<< orphan*/, int);
int /*<<< orphan*/ ERR_clear_error();
int /*<<< orphan*/ OPENSSL_INIT_LOAD_CRYPTO_STRINGS;
int /*<<< orphan*/ OPENSSL_init_crypto(int /*<<< orphan*/,
                                       int /*<<< orphan*/ *);
int FuzzerInitialize(int *argc, char ***argv) {
  OPENSSL_init_crypto(OPENSSL_INIT_LOAD_CRYPTO_STRINGS, NULL);
  ERR_clear_error();
  CRYPTO_free_ex_index(0, -1);
  return 1;
}


x86 assembly (clang, -O0):
<FuzzerInitialize>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    0x2ea1(%rip),%rax
mov    (%rax),%edi
xor    %eax,%eax
mov    %eax,%esi
call   1040 <OPENSSL_init_crypto@plt>
mov    $0x0,%al
call   1030 <ERR_clear_error@plt>
xor    %edi,%edi
mov    $0xffffffff,%esi
call   1050 <CRYPTO_free_ex_index@plt>
mov    $0x1,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<FuzzerInitialize>:
push   %rax
mov    0x2eb0(%rip),%rax
mov    (%rax),%edi
xor    %esi,%esi
call   1040 <OPENSSL_init_crypto@plt>
xor    %eax,%eax
call   1030 <ERR_clear_error@plt>
xor    %edi,%edi
mov    $0xffffffff,%esi
call   1050 <CRYPTO_free_ex_index@plt>
mov    $0x1,%eax
pop    %rcx
ret

LLVM IR (-O0):
@OPENSSL_INIT_LOAD_CRYPTO_STRINGS = global i32 0
define i32 @FuzzerInitialize(i32* %0, i8*** %1) {
%3 = alloca i32*
%4 = alloca i8***
store i32* %0, i32** %3
store i8*** %1, i8**** %4
%5 = load i32, i32* @OPENSSL_INIT_LOAD_CRYPTO_STRINGS
%6 = call i32 @OPENSSL_init_crypto(i32 %5, i32* null)
%7 = call i32 (...) @ERR_clear_error()
%8 = call i32 @CRYPTO_free_ex_index(i32 0, i32 -1)
ret i32 1
}

LLVM IR (-O2):
@OPENSSL_INIT_LOAD_CRYPTO_STRINGS = global i32 0
define i32 @FuzzerInitialize(i32* nocapture readnone %0, i8*** nocapture readnone %1) {
%3 = load i32, i32* @OPENSSL_INIT_LOAD_CRYPTO_STRINGS
%4 = tail call i32 @OPENSSL_init_crypto(i32 %3, i32* null)
%5 = tail call i32 (...) @ERR_clear_error()
%6 = tail call i32 @CRYPTO_free_ex_index(i32 0, i32 -1)
ret i32 1
}
/* Variables and functions */
int /*<<< orphan*/ zig_panic();
void assert_or_panic(bool ok) {
  if (!ok) {
    zig_panic();
  }
}


x86 assembly (clang, -O0):
<assert_or_panic>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
cmpl   $0x0,-0x4(%rbp)
jne    112c <assert_or_panic+0x1c>
mov    $0x0,%al
call   1030 <zig_panic@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<assert_or_panic>:
test   %edi,%edi
je     1115 <assert_or_panic+0x5>
ret
xor    %eax,%eax
jmp    1030 <zig_panic@plt>

LLVM IR (-O0):
define void @assert_or_panic(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 %7, label %5
5: ; preds = %1
%6 = call i32 (...) @zig_panic()
br label %7
7: ; preds = %5, %1
ret void
}

LLVM IR (-O2):
define void @assert_or_panic(i32 %0) {
%2 = icmp eq i32 %0, 0
br i1 %2, label %3, label %5
3: ; preds = %1
%4 = tail call i32 (...) @zig_panic()
br label %5
5: ; preds = %3, %1
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void print_usage(void) { printf("Usage: stat [FILE]...\n"); }


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

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

LLVM IR (-O0):
@.str = [23 x i8] c"Usage: stat [FILE]...\0A\00"
define void @print_usage() {
%1 = call i32 @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@str = [22 x i8] c"Usage: stat [FILE]...\00"
define void @print_usage() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([22 x i8], [22 x i8]* @str, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ free(char *);
void free_smatrix_map(short **m, long nrl, long nrh, long ncl, long nch) {
  free((char *)(m + nrl));
}


x86 assembly (clang, -O0):
<free_smatrix_map>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    %r8,-0x28(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rax
shl    $0x3,%rax
add    %rax,%rdi
call   1030 <free@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<free_smatrix_map>:
lea    (%rdi,%rsi,8),%rdi
jmp    1030 <free@plt>

LLVM IR (-O0):
define void @free_smatrix_map(i16** %0, i64 %1, i64 %2, i64 %3, i64 %4) {
%6 = alloca i16**
%7 = alloca i64
%8 = alloca i64
%9 = alloca i64
%10 = alloca i64
store i16** %0, i16*** %6
store i64 %1, i64* %7
store i64 %2, i64* %8
store i64 %3, i64* %9
store i64 %4, i64* %10
%11 = load i16**, i16*** %6
%12 = load i64, i64* %7
%13 = getelementptr inbounds i16*, i16** %11, i64 %12
%14 = bitcast i16** %13 to i8*
%15 = call i32 @free(i8* %14)
ret void
}

LLVM IR (-O2):
define void @free_smatrix_map(i16** nocapture %0, i64 %1, i64 %2, i64 %3, i64 %4) {
%6 = getelementptr inbounds i16*, i16** %0, i64 %1
%7 = bitcast i16** %6 to i8*
%8 = tail call i32 @free(i8* %7)
ret void
}
/* Variables and functions */
scalar_t__ vmison(int);
int vmstatus(int id) {
  if (vmison(id)) {
    return 0;
  } else {
    return 1;
  }
}


x86 assembly (clang, -O0):
<vmstatus>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
mov    -0x8(%rbp),%edi
call   1030 <vmison@plt>
cmp    $0x0,%rax
je     1139 <vmstatus+0x29>
movl   $0x0,-0x4(%rbp)
jmp    1140 <vmstatus+0x30>
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @vmstatus(i32 %0) {
%2 = tail call i64 @vmison(i32 %0)
%3 = icmp eq i64 %2, 0
%4 = zext i1 %3 to i32
ret i32 %4
}
/* Variables and functions */
bool is_xdigit(unsigned int ch) {
  return (ch >= 0x0030 && ch <= 0x0039) || (ch >= 0x0041 && ch <= 0x0046) ||
         (ch >= 0x0061 && ch <= 0x0066);
}


x86 assembly (clang, -O0):
<is_xdigit>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
cmpl   $0x30,-0x4(%rbp)
jb     1120 <is_xdigit+0x20>
mov    $0x1,%al
cmpl   $0x39,-0x4(%rbp)
mov    %al,-0x5(%rbp)
jbe    1158 <is_xdigit+0x58>
cmpl   $0x41,-0x4(%rbp)
jb     1139 <is_xdigit+0x39>
mov    $0x1,%al
cmpl   $0x46,-0x4(%rbp)
mov    %al,-0x5(%rbp)
jbe    1158 <is_xdigit+0x58>
xor    %eax,%eax
cmpl   $0x61,-0x4(%rbp)
mov    %al,-0x6(%rbp)
jb     1152 <is_xdigit+0x52>
cmpl   $0x66,-0x4(%rbp)
setbe  %al
mov    %al,-0x6(%rbp)
mov    -0x6(%rbp),%al
mov    %al,-0x5(%rbp)
mov    -0x5(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<is_xdigit>:
lea    -0x30(%rdi),%eax
cmp    $0xa,%eax
setb   %al
and    $0xffffffdf,%edi
add    $0xffffffbf,%edi
cmp    $0x6,%edi
setb   %cl
or     %al,%cl
movzbl %cl,%eax
ret

LLVM IR (-O0):
define i32 @is_xdigit(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = icmp uge i32 %3, 48
br i1 %4, label %5, label %8
5: ; preds = %1
%6 = load i32, i32* %2
%7 = icmp ule i32 %6, 57
br i1 %7, label %22, label %8
8: ; preds = %5, %1
%9 = load i32, i32* %2
%10 = icmp uge i32 %9, 65
br i1 %10, label %11, label %14
11: ; preds = %8
%12 = load i32, i32* %2
%13 = icmp ule i32 %12, 70
br i1 %13, label %22, label %14
14: ; preds = %11, %8
%15 = load i32, i32* %2
%16 = icmp uge i32 %15, 97
br i1 %16, label %17, label %20
17: ; preds = %14
%18 = load i32, i32* %2
%19 = icmp ule i32 %18, 102
br label %20
20: ; preds = %17, %14
%21 = phi i1 [ false, %14 ], [ %19, %17 ]
br label %22
22: ; preds = %20, %11, %5
%23 = phi i1 [ true, %11 ], [ true, %5 ], [ %21, %20 ]
%24 = zext i1 %23 to i32
ret i32 %24
}

LLVM IR (-O2):
define i32 @is_xdigit(i32 %0) {
%2 = add i32 %0, -48
%3 = icmp ult i32 %2, 10
%4 = and i32 %0, -33
%5 = add i32 %4, -65
%6 = icmp ult i32 %5, 6
%7 = or i1 %3, %6
%8 = zext i1 %7 to i32
ret i32 %8
}
void strlower(s) char *s;
{
  while (*s) {
    *s = (char)tolower(*s);
    s++;
  }
}


x86 assembly (clang, -O0):
<strlower>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
cmpb   $0x0,(%rax)
je     114e <strlower+0x3e>
mov    -0x8(%rbp),%rax
movsbl (%rax),%edi
call   1030 <tolower@plt>
mov    %al,%cl
mov    -0x8(%rbp),%rax
mov    %cl,(%rax)
mov    -0x8(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x8(%rbp)
jmp    111c <strlower+0xc>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<strlower>:
push   %rbx
mov    (%rdi),%al
test   %al,%al
je     1136 <strlower+0x26>
mov    %rdi,%rbx
add    $0x1,%rbx
xchg   %ax,%ax
movsbl %al,%edi
call   1030 <tolower@plt>
mov    %al,-0x1(%rbx)
movzbl (%rbx),%eax
add    $0x1,%rbx
test   %al,%al
jne    1120 <strlower+0x10>
pop    %rbx
ret

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

LLVM IR (-O2):
define void @strlower(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = icmp eq i8 %2, 0
br i1 %3, label %13, label %4
4: ; preds = %1, %4
%5 = phi i8 [ %11, %4 ], [ %2, %1 ]
%6 = phi i8* [ %10, %4 ], [ %0, %1 ]
%7 = sext i8 %5 to i32
%8 = tail call i32 @tolower(i32 %7)
%9 = trunc i32 %8 to i8
store i8 %9, i8* %6
%10 = getelementptr inbounds i8, i8* %6, i64 1
%11 = load i8, i8* %10
%12 = icmp eq i8 %11, 0
br i1 %12, label %13, label %4
13: ; preds = %4, %1
ret void
}
/* Type definitions */
struct udev_device {
  int dummy;
};

/* Variables and functions */
struct udev_device *handle_cciss(struct udev_device *parent, char **path) {
  return NULL;
}


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

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

LLVM IR (-O0):
%struct.udev_device = type { i32 }
define %struct.udev_device* @handle_cciss(%struct.udev_device* %0, i8** %1) {
%3 = alloca %struct.udev_device*
%4 = alloca i8**
store %struct.udev_device* %0, %struct.udev_device** %3
store i8** %1, i8*** %4
ret %struct.udev_device* null
}

LLVM IR (-O2):
%struct.udev_device = type { i32 }
define noalias %struct.udev_device* @handle_cciss(%struct.udev_device* nocapture readnone %0, i8** nocapture readnone %1) {
ret %struct.udev_device* null
}
/* Variables and functions */
int /*<<< orphan*/ motif_init();
int /*<<< orphan*/ motifaux_init();
int /*<<< orphan*/ xtaux_init();
void pi_init(void) {
  motif_init();
  motifaux_init();
  xtaux_init();
}


x86 assembly (clang, -O0):
<pi_init>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1030 <motif_init@plt>
mov    $0x0,%al
call   1050 <motifaux_init@plt>
mov    $0x0,%al
call   1040 <xtaux_init@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<pi_init>:
push   %rax
xor    %eax,%eax
call   1030 <motif_init@plt>
xor    %eax,%eax
call   1050 <motifaux_init@plt>
xor    %eax,%eax
pop    %rcx
jmp    1040 <xtaux_init@plt>

LLVM IR (-O0):
define void @pi_init() {
%1 = call i32 (...) @motif_init()
%2 = call i32 (...) @motifaux_init()
%3 = call i32 (...) @xtaux_init()
ret void
}

LLVM IR (-O2):
define void @pi_init() {
%1 = tail call i32 (...) @motif_init()
%2 = tail call i32 (...) @motifaux_init()
%3 = tail call i32 (...) @xtaux_init()
ret void
}
/* Type definitions */
typedef scalar_t__ uint32_t;

/* Variables and functions */
bool audit_session_is_valid(uint32_t id) {
  return id > 0 && id != ((uint32_t)-1);
}


x86 assembly (clang, -O0):
<audit_session_is_valid>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
xor    %eax,%eax
cmpq   $0x0,-0x8(%rbp)
mov    %al,-0x9(%rbp)
jle    1123 <audit_session_is_valid+0x23>
cmpq   $0xffffffffffffffff,-0x8(%rbp)
setne  %al
mov    %al,-0x9(%rbp)
mov    -0x9(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<audit_session_is_valid>:
xor    %eax,%eax
test   %rdi,%rdi
setg   %al
ret

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

LLVM IR (-O2):
define i32 @audit_session_is_valid(i64 %0) {
%2 = icmp sgt i64 %0, 0
%3 = zext i1 %2 to i32
ret i32 %3
}
/* Type definitions */
struct timeval {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ getstarttime(struct timeval *);
int main() {
  struct timeval tv;
  getstarttime(&tv);
  return 0;
}


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

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    %rsp,%rdi
call   1030 <getstarttime@plt>
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
%struct.timeval = type { i32 }
define i32 @main() {
%1 = alloca %struct.timeval
%2 = bitcast %struct.timeval* %1 to i8*
%3 = call i32 @getstarttime(%struct.timeval* %1)
ret i32 0
}
/* Variables and functions */
void *malloc(size_t);
void *_mosquitto_malloc(size_t size) {
  void *mem = malloc(size);
  return mem;
}


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

x86 assembly (clang, -O2):
<_mosquitto_malloc>:
jmp    1030 <malloc@plt>

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

LLVM IR (-O2):
define noalias i8* @_mosquitto_malloc(i64 %0) {
%2 = tail call i8* @malloc(i64 %0)
ret i8* %2
}
void opcode_nop(void) {
  ;
  ;
}


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

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

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

LLVM IR (-O2):
define void @opcode_nop() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void DisplayPic(void) { printf("FIXME: DisplayPic isnt impelemnted\n"); }


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

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

LLVM IR (-O0):
@.str = [36 x i8] c"FIXME: DisplayPic isnt impelemnted\0A\00"
define void @DisplayPic() {
%1 = call i32 @printf(i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@str = [35 x i8] c"FIXME: DisplayPic isnt impelemnted\00"
define void @DisplayPic() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([35 x i8], [35 x i8]* @str, i64 0, i64 0))
ret void
}
void rom_display_header(void) {}


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

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

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

LLVM IR (-O2):
define void @rom_display_header() {
ret void
}
/* Variables and functions */
scalar_t__ path_is_sep(char const);
int path_is_abs(const char *path) {
  if (path_is_sep(path[0]))
    return 1;
  return 0;
}


x86 assembly (clang, -O0):
<path_is_abs>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
movsbl (%rax),%edi
call   1030 <path_is_sep@plt>
cmp    $0x0,%rax
je     113e <path_is_abs+0x2e>
movl   $0x1,-0x4(%rbp)
jmp    1145 <path_is_abs+0x35>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @path_is_abs(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = tail call i64 @path_is_sep(i8 signext %2)
%4 = icmp ne i64 %3, 0
%5 = zext i1 %4 to i32
ret i32 %5
}
int *g(int *x) { return x; }


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

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

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

LLVM IR (-O2):
define i32* @g(i32* readnone returned %0) {
ret i32* %0
}
void foo() {
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):
<foo>:
push   %rbp
mov    %rsp,%rbp
jmp    1104 <foo+0x4>

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

LLVM IR (-O0):
define void @foo() {
%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 @foo() {
br label %1
1: ; preds = %1, %0
br label %1
}
/* Variables and functions */
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ printf(char *, char *);
void dieWithSystemMessage(char *msg) {
  printf("%s", msg);
  exit(0);
}


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

x86 assembly (clang, -O2):
<dieWithSystemMessage>:
push   %rax
mov    %rdi,%rsi
lea    0xed5(%rip),%rdi
call   1030 <printf@plt>
xor    %edi,%edi
call   1040 <exit@plt>

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

LLVM IR (-O2):
@.str = [3 x i8] c"%s\00"
define void @dieWithSystemMessage(i8* %0) {
%2 = tail call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* %0)
%3 = tail call i32 @exit(i32 0)
unreachable
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, unsigned int, int, unsigned int);
void show_int(unsigned uf) {
  printf("Hex = 0x%.8x,\tSigned = %d,\tUnsigned = %u\n", uf, (int)uf, uf);
}


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

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

LLVM IR (-O0):
@.str = [42 x i8] c"Hex = 0x%.8x,\09Signed = %d,\09Unsigned = %u\0A\00"
define void @show_int(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = load i32, i32* %2
%5 = load i32, i32* %2
%6 = call i32 @printf(i8* getelementptr inbounds ([42 x i8], [42 x i8]* @.str, i64 0, i64 0), i32 %3, i32 %4, i32 %5)
ret void
}

LLVM IR (-O2):
@.str = [42 x i8] c"Hex = 0x%.8x,\09Signed = %d,\09Unsigned = %u\0A\00"
define void @show_int(i32 %0) {
%2 = tail call i32 @printf(i8* getelementptr inbounds ([42 x i8], [42 x i8]* @.str, i64 0, i64 0), i32 %0, i32 %0, i32 %0)
ret void
}
double velocitySqVisVia(double GM, double a, double r) {
  return GM * (2 / r - 1 / a);
}


x86 assembly (clang, -O0):
<velocitySqVisVia>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  %xmm2,-0x18(%rbp)
movsd  -0x8(%rbp),%xmm0
movsd  0xee8(%rip),%xmm1
divsd  -0x18(%rbp),%xmm1
movsd  0xed3(%rip),%xmm2
divsd  -0x10(%rbp),%xmm2
subsd  %xmm2,%xmm1
mulsd  %xmm1,%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<velocitySqVisVia>:
unpcklpd %xmm1,%xmm2
movapd 0xef4(%rip),%xmm1
divpd  %xmm2,%xmm1
movapd %xmm1,%xmm2
unpckhpd %xmm1,%xmm2
subsd  %xmm2,%xmm1
mulsd  %xmm1,%xmm0
ret

LLVM IR (-O0):
define double @velocitySqVisVia(double %0, double %1, double %2) {
%4 = alloca double
%5 = alloca double
%6 = alloca double
store double %0, double* %4
store double %1, double* %5
store double %2, double* %6
%7 = load double, double* %4
%8 = load double, double* %6
%9 = fdiv double 2.000000e+00, %8
%10 = load double, double* %5
%11 = fdiv double 1.000000e+00, %10
%12 = fsub double %9, %11
%13 = fmul double %7, %12
ret double %13
}

LLVM IR (-O2):
define double @velocitySqVisVia(double %0, double %1, double %2) {
%4 = insertelement <2 x double> poison, double %2, i64 0
%5 = insertelement <2 x double> %4, double %1, i64 1
%6 = fdiv <2 x double> <double 2.000000e+00, double 1.000000e+00>, %5
%7 = shufflevector <2 x double> %6, <2 x double> poison, <2 x i32> <i32 1, i32 undef>
%8 = fsub <2 x double> %6, %7
%9 = extractelement <2 x double> %8, i64 0
%10 = fmul double %9, %0
ret double %10
}
int test_imm_D4int32_mem(int *val) {
  return ((*val) & (0xD4 << 0)) ? -20 : -40;
}


x86 assembly (clang, -O0):
<test_imm_D4int32_mem>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%edx
and    $0xd4,%edx
mov    $0xffffffd8,%eax
mov    $0xffffffec,%ecx
cmp    $0x0,%edx
cmovne %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_imm_D4int32_mem>:
testb  $0xd4,(%rdi)
mov    $0xffffffd8,%ecx
mov    $0xffffffec,%eax
cmove  %ecx,%eax
ret

LLVM IR (-O0):
define i32 @test_imm_D4int32_mem(i32* %0) {
%2 = alloca i32*
store i32* %0, i32** %2
%3 = load i32*, i32** %2
%4 = load i32, i32* %3
%5 = and i32 %4, 212
%6 = icmp ne i32 %5, 0
%7 = zext i1 %6 to i64
%8 = select i1 %6, i32 -20, i32 -40
ret i32 %8
}

LLVM IR (-O2):
define i32 @test_imm_D4int32_mem(i32* nocapture %0) {
%2 = load i32, i32* %0
%3 = and i32 %2, 212
%4 = icmp eq i32 %3, 0
%5 = select i1 %4, i32 -40, i32 -20
ret i32 %5
}
void gdk_window_deiconify() {}


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

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

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

LLVM IR (-O2):
define void @gdk_window_deiconify() {
ret void
}
int g_DUMMY_menu_set_label(int menu_id, int item_id, char *label) {
  menu_id = menu_id;
  item_id = item_id;
  label = label;
  return -1;
}


x86 assembly (clang, -O0):
<g_DUMMY_menu_set_label>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %rdx,-0x10(%rbp)
mov    -0x4(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x8(%rbp),%eax
mov    %eax,-0x8(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    $0xffffffff,%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @g_DUMMY_menu_set_label(i32 %0, i32 %1, i8* nocapture readnone %2) {
ret i32 -1
}
signed long signedlong_ignoring_unsignedlongint(signed long x,
                                                unsigned long int y) {
  return x;
}


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

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

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

LLVM IR (-O2):
define i64 @signedlong_ignoring_unsignedlongint(i64 returned %0, i64 %1) {
ret i64 %0
}
/* Variables and functions */
__attribute__((visibility("default"))) void *
sd_event_source_get_userdata(void *s) {
  return NULL;
}


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

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

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

LLVM IR (-O2):
define noalias i8* @sd_event_source_get_userdata(i8* nocapture readnone %0) {
ret i8* null
}
/* Variables and functions */
double __ieee754_sinh(double);
double jsinh(double x) { return __ieee754_sinh(x); }


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

x86 assembly (clang, -O2):
<jsinh>:
jmp    1030 <__ieee754_sinh@plt>

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

LLVM IR (-O2):
define double @jsinh(double %0) {
%2 = tail call double @__ieee754_sinh(double %0)
ret double %2
}
/* Variables and functions */
int /*<<< orphan*/ initHardware();
int /*<<< orphan*/ setServo(int);
int /*<<< orphan*/ sleep(int);
int main(int argc, char **argv) {
  initHardware();
  while (1) {
    setServo(20);
    sleep(1);
    setServo(30);
    sleep(1);
    setServo(40);
    sleep(1);
    setServo(50);
    sleep(1);
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    $0x0,%al
call   1030 <initHardware@plt>
mov    $0x14,%edi
call   1040 <setServo@plt>
mov    $0x1,%edi
call   1050 <sleep@plt>
mov    $0x1e,%edi
call   1040 <setServo@plt>
mov    $0x1,%edi
call   1050 <sleep@plt>
mov    $0x28,%edi
call   1040 <setServo@plt>
mov    $0x1,%edi
call   1050 <sleep@plt>
mov    $0x32,%edi
call   1040 <setServo@plt>
mov    $0x1,%edi
call   1050 <sleep@plt>
jmp    114d <main+0x1d>

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1030 <initHardware@plt>
nopl   0x0(%rax,%rax,1)
mov    $0x14,%edi
call   1040 <setServo@plt>
mov    $0x1,%edi
call   1050 <sleep@plt>
mov    $0x1e,%edi
call   1040 <setServo@plt>
mov    $0x1,%edi
call   1050 <sleep@plt>
mov    $0x28,%edi
call   1040 <setServo@plt>
mov    $0x1,%edi
call   1050 <sleep@plt>
mov    $0x32,%edi
call   1040 <setServo@plt>
mov    $0x1,%edi
call   1050 <sleep@plt>
jmp    1140 <main+0x10>

LLVM IR (-O0):
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 (...) @initHardware()
br label %7
7: ; preds = %2, %7
%8 = call i32 @setServo(i32 20)
%9 = call i32 @sleep(i32 1)
%10 = call i32 @setServo(i32 30)
%11 = call i32 @sleep(i32 1)
%12 = call i32 @setServo(i32 40)
%13 = call i32 @sleep(i32 1)
%14 = call i32 @setServo(i32 50)
%15 = call i32 @sleep(i32 1)
br label %7
}

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 (...) @initHardware()
br label %4
4: ; preds = %2, %4
%5 = tail call i32 @setServo(i32 20)
%6 = tail call i32 @sleep(i32 1)
%7 = tail call i32 @setServo(i32 30)
%8 = tail call i32 @sleep(i32 1)
%9 = tail call i32 @setServo(i32 40)
%10 = tail call i32 @sleep(i32 1)
%11 = tail call i32 @setServo(i32 50)
%12 = tail call i32 @sleep(i32 1)
br label %4
}
/* Type definitions */
struct dirent {
  int /*<<< orphan*/ d_name;
};

/* Variables and functions */
int wmqfile_iswmqfile(int /*<<< orphan*/);
int is_wmqfile(const struct dirent *dirent) {
  return wmqfile_iswmqfile(dirent->d_name);
}


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

x86 assembly (clang, -O2):
<is_wmqfile>:
mov    (%rdi),%edi
jmp    1030 <wmqfile_iswmqfile@plt>

LLVM IR (-O0):
%struct.dirent = type { i32 }
define i32 @is_wmqfile(%struct.dirent* %0) {
%2 = alloca %struct.dirent*
store %struct.dirent* %0, %struct.dirent** %2
%3 = load %struct.dirent*, %struct.dirent** %2
%4 = getelementptr inbounds %struct.dirent, %struct.dirent* %3, i32 0, i32 0
%5 = load i32, i32* %4
%6 = call i32 @wmqfile_iswmqfile(i32 %5)
ret i32 %6
}

LLVM IR (-O2):
%struct.dirent = type { i32 }
define i32 @is_wmqfile(%struct.dirent* nocapture %0) {
%2 = getelementptr inbounds %struct.dirent, %struct.dirent* %0, i64 0, i32 0
%3 = load i32, i32* %2
%4 = tail call i32 @wmqfile_iswmqfile(i32 %3)
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ GyrCon(int);
void OisOff(void) {
  GyrCon(0x00);
  return;
}


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

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

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

LLVM IR (-O2):
define void @OisOff() {
%1 = tail call i32 @GyrCon(i32 0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ LCD_Write_COM(char);
int /*<<< orphan*/ LCD_Write_DATA(int, int);
void LCD_Write_COM_DATA(char com1, int dat1) {
  LCD_Write_COM(com1);
  LCD_Write_DATA(dat1 >> 8, dat1);
}


x86 assembly (clang, -O0):
<LCD_Write_COM_DATA>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %dil,%al
mov    %al,-0x1(%rbp)
mov    %esi,-0x8(%rbp)
movsbl -0x1(%rbp),%edi
call   1030 <LCD_Write_COM@plt>
mov    -0x8(%rbp),%edi
sar    $0x8,%edi
mov    -0x8(%rbp),%esi
call   1040 <LCD_Write_DATA@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<LCD_Write_COM_DATA>:
push   %rbx
mov    %esi,%ebx
call   1030 <LCD_Write_COM@plt>
mov    %ebx,%edi
sar    $0x8,%edi
mov    %ebx,%esi
pop    %rbx
jmp    1040 <LCD_Write_DATA@plt>

LLVM IR (-O0):
define void @LCD_Write_COM_DATA(i8 signext %0, i32 %1) {
%3 = alloca i8
%4 = alloca i32
store i8 %0, i8* %3
store i32 %1, i32* %4
%5 = load i8, i8* %3
%6 = call i32 @LCD_Write_COM(i8 signext %5)
%7 = load i32, i32* %4
%8 = ashr i32 %7, 8
%9 = load i32, i32* %4
%10 = call i32 @LCD_Write_DATA(i32 %8, i32 %9)
ret void
}

LLVM IR (-O2):
define void @LCD_Write_COM_DATA(i8 signext %0, i32 %1) {
%3 = tail call i32 @LCD_Write_COM(i8 signext %0)
%4 = ashr i32 %1, 8
%5 = tail call i32 @LCD_Write_DATA(i32 %4, i32 %1)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ assert(char *);
char *malloc(size_t);
int /*<<< orphan*/ strncpy(char *, char *, size_t);
size_t var_len(char *);
char *var_alloccpy_name(char *src) {
  size_t len = var_len(src);
  char *rv = malloc(len + 1);
  assert(rv);
  strncpy(rv, src + 1, len);
  rv[len] = 0;
  return rv;
}


x86 assembly (clang, -O0):
<var_alloccpy_name>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <var_len@plt>
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
add    $0x1,%rdi
call   1060 <malloc@plt>
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rdi
call   1050 <assert@plt>
mov    -0x18(%rbp),%rdi
mov    -0x8(%rbp),%rsi
add    $0x1,%rsi
mov    -0x10(%rbp),%rdx
call   1040 <strncpy@plt>
mov    -0x18(%rbp),%rax
mov    -0x10(%rbp),%rcx
movb   $0x0,(%rax,%rcx,1)
mov    -0x18(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<var_alloccpy_name>:
push   %r15
push   %r14
push   %rbx
mov    %rdi,%r15
call   1030 <var_len@plt>
mov    %rax,%r14
lea    0x1(%rax),%rdi
call   1060 <malloc@plt>
mov    %rax,%rbx
mov    %rax,%rdi
call   1050 <assert@plt>
add    $0x1,%r15
mov    %rbx,%rdi
mov    %r15,%rsi
mov    %r14,%rdx
call   1040 <strncpy@plt>
movb   $0x0,(%rbx,%r14,1)
mov    %rbx,%rax
pop    %rbx
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
define i8* @var_alloccpy_name(i8* %0) {
%2 = alloca i8*
%3 = alloca i64
%4 = alloca i8*
store i8* %0, i8** %2
%5 = load i8*, i8** %2
%6 = call i64 @var_len(i8* %5)
store i64 %6, i64* %3
%7 = load i64, i64* %3
%8 = add i64 %7, 1
%9 = call i8* @malloc(i64 %8)
store i8* %9, i8** %4
%10 = load i8*, i8** %4
%11 = call i32 @assert(i8* %10)
%12 = load i8*, i8** %4
%13 = load i8*, i8** %2
%14 = getelementptr inbounds i8, i8* %13, i64 1
%15 = load i64, i64* %3
%16 = call i32 @strncpy(i8* %12, i8* %14, i64 %15)
%17 = load i8*, i8** %4
%18 = load i64, i64* %3
%19 = getelementptr inbounds i8, i8* %17, i64 %18
store i8 0, i8* %19
%20 = load i8*, i8** %4
ret i8* %20
}

LLVM IR (-O2):
define i8* @var_alloccpy_name(i8* %0) {
%2 = tail call i64 @var_len(i8* %0)
%3 = add i64 %2, 1
%4 = tail call i8* @malloc(i64 %3)
%5 = tail call i32 @assert(i8* %4)
%6 = getelementptr inbounds i8, i8* %0, i64 1
%7 = tail call i32 @strncpy(i8* %4, i8* %6, i64 %2)
%8 = getelementptr inbounds i8, i8* %4, i64 %2
store i8 0, i8* %8
ret i8* %4
}
/* Variables and functions */
int /*<<< orphan*/ init();
int /*<<< orphan*/ swap_simple();
int main() {
  init();
  swap_simple();
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1040 <init@plt>
mov    $0x0,%al
call   1030 <swap_simple@plt>
xor    %eax,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @main() {
%1 = call i32 (...) @init()
%2 = call i32 (...) @swap_simple()
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @init()
%2 = tail call i32 (...) @swap_simple()
ret i32 0
}
void init_hpmanager(struct hpuser **head_ptr, int *hpcount_ptr) {
  *hpcount_ptr = 0;
  *head_ptr = 0;
}


x86 assembly (clang, -O0):
<init_hpmanager>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
movl   $0x0,(%rax)
mov    -0x8(%rbp),%rax
movq   $0x0,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<init_hpmanager>:
movl   $0x0,(%rsi)
movq   $0x0,(%rdi)
ret

LLVM IR (-O0):
%struct.hpuser = type opaque
define void @init_hpmanager(%struct.hpuser** %0, i32* %1) {
%3 = alloca %struct.hpuser**
%4 = alloca i32*
store %struct.hpuser** %0, %struct.hpuser*** %3
store i32* %1, i32** %4
%5 = load i32*, i32** %4
store i32 0, i32* %5
%6 = load %struct.hpuser**, %struct.hpuser*** %3
store %struct.hpuser* null, %struct.hpuser** %6
ret void
}

LLVM IR (-O2):
%struct.hpuser = type opaque
define void @init_hpmanager(%struct.hpuser** nocapture writeonly %0, i32* nocapture writeonly %1) {
store i32 0, i32* %1
store %struct.hpuser* null, %struct.hpuser** %0
ret void
}
void ff_hevc_put_hevc_uni_pel_pixels128_8_avx2() {}


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

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

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

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

/* Variables and functions */
int /*<<< orphan*/ htonl(int /*<<< orphan*/);
int /*<<< orphan*/ send(int, int /*<<< orphan*/ *, int, int /*<<< orphan*/);
void cbWriteLongC(int fd, uint32_t write_value) {
  write_value = htonl(write_value);
  send(fd, &write_value, sizeof(uint32_t), 0);
}


x86 assembly (clang, -O0):
<cbWriteLongC>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x8(%rbp),%edi
call   1040 <htonl@plt>
mov    %eax,-0x8(%rbp)
mov    -0x4(%rbp),%edi
lea    -0x8(%rbp),%rsi
mov    $0x4,%edx
xor    %ecx,%ecx
call   1030 <send@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<cbWriteLongC>:
push   %rbx
sub    $0x10,%rsp
mov    %edi,%ebx
mov    %esi,%edi
call   1040 <htonl@plt>
mov    %eax,0xc(%rsp)
lea    0xc(%rsp),%rsi
mov    %ebx,%edi
mov    $0x4,%edx
xor    %ecx,%ecx
call   1030 <send@plt>
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
define void @cbWriteLongC(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%5 = load i32, i32* %4
%6 = call i32 @htonl(i32 %5)
store i32 %6, i32* %4
%7 = load i32, i32* %3
%8 = call i32 @send(i32 %7, i32* %4, i32 4, i32 0)
ret void
}

LLVM IR (-O2):
define void @cbWriteLongC(i32 %0, i32 %1) {
%3 = alloca i32
%4 = tail call i32 @htonl(i32 %1)
store i32 %4, i32* %3
%5 = call i32 @send(i32 %0, i32* %3, i32 4, i32 0)
ret void
}
/* Variables and functions */
int INT_MAX;
int /*<<< orphan*/ this_comparison_is_not_decidable();
void bla4eq(int var) {
  if (var - 10 == INT_MAX - 10)
    this_comparison_is_not_decidable();
}


x86 assembly (clang, -O0):
<bla4eq>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
sub    $0xa,%eax
mov    0x2ec0(%rip),%rcx
mov    (%rcx),%ecx
sub    $0xa,%ecx
cmp    %ecx,%eax
jne    113c <bla4eq+0x2c>
mov    $0x0,%al
call   1030 <this_comparison_is_not_decidable@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<bla4eq>:
mov    0x2ed1(%rip),%rax
cmp    %edi,(%rax)
jne    1122 <bla4eq+0x12>
xor    %eax,%eax
jmp    1030 <this_comparison_is_not_decidable@plt>
ret

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

LLVM IR (-O2):
@INT_MAX = global i32 0
define void @bla4eq(i32 %0) {
%2 = load i32, i32* @INT_MAX
%3 = icmp eq i32 %2, %0
br i1 %3, label %4, label %6
4: ; preds = %1
%5 = tail call i32 (...) @this_comparison_is_not_decidable()
br label %6
6: ; preds = %4, %1
ret void
}
double test_PR8567(int n, double (*p)[n][5]) { return p[1][2][3]; }


x86 assembly (clang, -O0):
<test_PR8567>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x4(%rbp),%eax
mov    %eax,%ecx
mov    -0x10(%rbp),%rax
shl    $0x0,%rcx
imul   $0x28,%rcx,%rcx
add    %rcx,%rax
movsd  0x68(%rax),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_PR8567>:
mov    %edi,%eax
lea    (%rax,%rax,4),%rax
movsd  0x68(%rsi,%rax,8),%xmm0
ret

LLVM IR (-O0):
define double @test_PR8567(i32 %0, [5 x double]* %1) {
%3 = alloca i32
%4 = alloca [5 x double]*
store i32 %0, i32* %3
store [5 x double]* %1, [5 x double]** %4
%5 = load i32, i32* %3
%6 = zext i32 %5 to i64
%7 = load [5 x double]*, [5 x double]** %4
%8 = mul nsw i64 1, %6
%9 = getelementptr inbounds [5 x double], [5 x double]* %7, i64 %8
%10 = getelementptr inbounds [5 x double], [5 x double]* %9, i64 2
%11 = getelementptr inbounds [5 x double], [5 x double]* %10, i64 0, i64 3
%12 = load double, double* %11
ret double %12
}

LLVM IR (-O2):
define double @test_PR8567(i32 %0, [5 x double]* nocapture %1) {
%3 = zext i32 %0 to i64
%4 = getelementptr inbounds [5 x double], [5 x double]* %1, i64 %3
%5 = getelementptr inbounds [5 x double], [5 x double]* %4, i64 2
%6 = getelementptr inbounds [5 x double], [5 x double]* %5, i64 0, i64 3
%7 = load double, double* %6
ret double %7
}