xunge/DecIR huggingface dataset:
int _bor(int x, int y, void *garb) { return x | y; }


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

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

LLVM IR (-O0):
define i32 @_bor(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
%8 = load i32, i32* %5
%9 = or i32 %7, %8
ret i32 %9
}

LLVM IR (-O2):
define i32 @_bor(i32 %0, i32 %1, i8* nocapture readnone %2) {
%4 = or i32 %1, %0
ret i32 %4
}
/* Variables and functions */
unsigned char *chacha12poly1305_decrypt(unsigned char *, size_t *,
                                        unsigned char const *, size_t,
                                        unsigned char const *,
                                        unsigned char const *);
unsigned char *crypt_decrypt_chacha12poly1305(
    unsigned char *out, size_t *out_len, const unsigned char *in, size_t in_len,
    const unsigned char *nonce, const unsigned char *key) {
  return chacha12poly1305_decrypt(out, out_len, in, in_len, nonce, key);
}


x86 assembly (clang, -O0):
<crypt_decrypt_chacha12poly1305>:
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    %r9,-0x30(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
mov    -0x20(%rbp),%rcx
mov    -0x28(%rbp),%r8
mov    -0x30(%rbp),%r9
call   1030 <chacha12poly1305_decrypt@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<crypt_decrypt_chacha12poly1305>:
jmp    1030 <chacha12poly1305_decrypt@plt>

LLVM IR (-O0):
define i8* @crypt_decrypt_chacha12poly1305(i8* %0, i64* %1, i8* %2, i64 %3, i8* %4, i8* %5) {
%7 = alloca i8*
%8 = alloca i64*
%9 = alloca i8*
%10 = alloca i64
%11 = alloca i8*
%12 = alloca i8*
store i8* %0, i8** %7
store i64* %1, i64** %8
store i8* %2, i8** %9
store i64 %3, i64* %10
store i8* %4, i8** %11
store i8* %5, i8** %12
%13 = load i8*, i8** %7
%14 = load i64*, i64** %8
%15 = load i8*, i8** %9
%16 = load i64, i64* %10
%17 = load i8*, i8** %11
%18 = load i8*, i8** %12
%19 = call i8* @chacha12poly1305_decrypt(i8* %13, i64* %14, i8* %15, i64 %16, i8* %17, i8* %18)
ret i8* %19
}

LLVM IR (-O2):
define i8* @crypt_decrypt_chacha12poly1305(i8* %0, i64* %1, i8* %2, i64 %3, i8* %4, i8* %5) {
%7 = tail call i8* @chacha12poly1305_decrypt(i8* %0, i64* %1, i8* %2, i64 %3, i8* %4, i8* %5)
ret i8* %7
}
/* Variables and functions */
char getchar();
int /*<<< orphan*/ printf(char *, char *);
char skipbl();
char ask(char *s) {
  char a, c;
  printf("%s ", s);
  a = skipbl();
  while (c != '\n' && c != 4)
    c = getchar();
  return a;
}


x86 assembly (clang, -O0):
<ask>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rsi
lea    0xeb9(%rip),%rdi
call   1030 <printf@plt>
mov    $0x0,%al
call   1050 <skipbl@plt>
mov    %al,-0x9(%rbp)
movsbl -0xa(%rbp),%ecx
xor    %eax,%eax
cmp    $0xa,%ecx
mov    %al,-0xb(%rbp)
je     1175 <ask+0x45>
movsbl -0xa(%rbp),%eax
cmp    $0x4,%eax
setne  %al
mov    %al,-0xb(%rbp)
mov    -0xb(%rbp),%al
test   $0x1,%al
jne    1185 <ask+0x55>
jmp    1194 <ask+0x64>
mov    $0x0,%al
call   1040 <getchar@plt>
mov    %al,-0xa(%rbp)
jmp    1156 <ask+0x26>
movsbl -0x9(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ask>:
push   %rbx
mov    %rdi,%rsi
lea    0xec5(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
call   1050 <skipbl@plt>
mov    %eax,%ebx
cmp    $0x4,%al
je     115f <ask+0x2f>
nopl   (%rax)
cmp    $0xa,%al
je     115f <ask+0x2f>
xor    %eax,%eax
call   1040 <getchar@plt>
cmp    $0x4,%al
jne    1150 <ask+0x20>
mov    %ebx,%eax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [4 x i8] c"%s \00"
define signext i8 @ask(i8* %0) {
%2 = alloca i8*
%3 = alloca i8
%4 = alloca i8
store i8* %0, i8** %2
%5 = load i8*, i8** %2
%6 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %5)
%7 = call signext i8 (...) @skipbl()
store i8 %7, i8* %3
br label %8
8: ; preds = %18, %1
%9 = load i8, i8* %4
%10 = sext i8 %9 to i32
%11 = icmp ne i32 %10, 10
br i1 %11, label %12, label %16
12: ; preds = %8
%13 = load i8, i8* %4
%14 = sext i8 %13 to i32
%15 = icmp ne i32 %14, 4
br label %16
16: ; preds = %12, %8
%17 = phi i1 [ false, %8 ], [ %15, %12 ]
br i1 %17, label %18, label %20
18: ; preds = %16
%19 = call signext i8 (...) @getchar()
store i8 %19, i8* %4
br label %8
20: ; preds = %16
%21 = load i8, i8* %3
ret i8 %21
}

LLVM IR (-O2):
@.str = [4 x i8] c"%s \00"
define signext i8 @ask(i8* %0) {
%2 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %0)
%3 = tail call signext i8 (...) @skipbl()
br label %4
4: ; preds = %6, %1
%5 = phi i8 [ undef, %1 ], [ %7, %6 ]
switch i8 %5, label %6 [
i8 10, label %8
i8 4, label %8
]
6: ; preds = %4
%7 = tail call signext i8 (...) @getchar()
br label %4
8: ; preds = %4, %4
ret i8 %3
}
/* Variables and functions */
unsigned char toupper(unsigned char c) {
  if (c <= 'z' && c >= 'a')
    return (c - 32);
  return (c);
}


x86 assembly (clang, -O0):
<toupper>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x2(%rbp)
movzbl -0x2(%rbp),%eax
cmp    $0x7a,%eax
jg     1133 <toupper+0x33>
movzbl -0x2(%rbp),%eax
cmp    $0x61,%eax
jl     1133 <toupper+0x33>
movzbl -0x2(%rbp),%eax
sub    $0x20,%eax
mov    %al,-0x1(%rbp)
jmp    1139 <toupper+0x39>
mov    -0x2(%rbp),%al
mov    %al,-0x1(%rbp)
movzbl -0x1(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<toupper>:
lea    -0x61(%rdi),%eax
lea    -0x20(%rdi),%ecx
cmp    $0x1a,%al
movzbl %cl,%eax
cmovae %edi,%eax
ret

LLVM IR (-O0):
define zeroext i8 @toupper(i8 zeroext %0) {
%2 = alloca i8
%3 = alloca i8
store i8 %0, i8* %3
%4 = load i8, i8* %3
%5 = zext i8 %4 to i32
%6 = icmp sle i32 %5, 122
br i1 %6, label %7, label %16
7: ; preds = %1
%8 = load i8, i8* %3
%9 = zext i8 %8 to i32
%10 = icmp sge i32 %9, 97
br i1 %10, label %11, label %16
11: ; preds = %7
%12 = load i8, i8* %3
%13 = zext i8 %12 to i32
%14 = sub nsw i32 %13, 32
%15 = trunc i32 %14 to i8
store i8 %15, i8* %2
br label %18
16: ; preds = %7, %1
%17 = load i8, i8* %3
store i8 %17, i8* %2
br label %18
18: ; preds = %16, %11
%19 = load i8, i8* %2
ret i8 %19
}

LLVM IR (-O2):
define zeroext i8 @toupper(i8 zeroext %0) {
%2 = add i8 %0, -97
%3 = icmp ult i8 %2, 26
%4 = add i8 %0, -32
%5 = select i1 %3, i8 %4, i8 %0
ret i8 %5
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char);
int main() {
  int i = 0, j;
  char ar[5] = {'/', '-', '\\', '|'};
  while (true) {
    for (j = 0; j < 23000; j++)
      ;
    printf("%c\r", ar[i % 7]);
    i++;
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
mov    0xed4(%rip),%eax
mov    %eax,-0x11(%rbp)
mov    0xecf(%rip),%al
mov    %al,-0xd(%rbp)
movl   $0x0,-0xc(%rbp)
cmpl   $0x59d8,-0xc(%rbp)
jge    115f <main+0x4f>
jmp    1151 <main+0x41>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    113f <main+0x2f>
mov    -0x8(%rbp),%eax
mov    $0x7,%ecx
cltd
idiv   %ecx
movslq %edx,%rax
lea    0xe91(%rip),%rdi
movsbl -0x11(%rbp,%rax,1),%esi
call   1030 <printf@plt>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1138 <main+0x28>

x86 assembly (clang, -O2):
<main>:
push   %r15
push   %r14
push   %r12
push   %rbx
push   %rax
lea    0xee1(%rip),%r15
xor    %ebx,%ebx
movabs $0x2492492492492493,%r12
49 92 24
lea    0xed3(%rip),%r14
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
mov    %rbx,%rax
mul    %r12
mov    %rbx,%rax
sub    %rdx,%rax
shr    %rax
add    %rdx,%rax
shr    $0x2,%rax
lea    0x0(,%rax,8),%rcx
sub    %rcx,%rax
movsbl (%r15,%rax,1),%esi
mov    %r14,%rdi
call   1030 <printf@plt>
add    $0x1,%r15
add    $0x1,%rbx
jmp    1140 <main+0x30>

LLVM IR (-O0):
@__const.main.ar = [5 x i8] c"/-\\|\00"
@.str = [4 x i8] c"%c\0D\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca [5 x i8]
store i32 0, i32* %1
store i32 0, i32* %2
%5 = bitcast [5 x i8]* %4 to i8*
br label %6
6: ; preds = %0, %14
store i32 0, i32* %3
br label %7
7: ; preds = %11, %6
%8 = load i32, i32* %3
%9 = icmp slt i32 %8, 23000
br i1 %9, label %10, label %14
10: ; preds = %7
br label %11
11: ; preds = %10
%12 = load i32, i32* %3
%13 = add nsw i32 %12, 1
store i32 %13, i32* %3
br label %7
14: ; preds = %7
%15 = load i32, i32* %2
%16 = srem i32 %15, 7
%17 = sext i32 %16 to i64
%18 = getelementptr inbounds [5 x i8], [5 x i8]* %4, i64 0, i64 %17
%19 = load i8, i8* %18
%20 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8 signext %19)
%21 = load i32, i32* %2
%22 = add nsw i32 %21, 1
store i32 %22, i32* %2
br label %6
}

LLVM IR (-O2):
@__const.main.ar = [5 x i8] c"/-\\|\00"
@.str = [4 x i8] c"%c\0D\00"
define i32 @main() {
br label %1
1: ; preds = %1, %0
%2 = phi i32 [ 0, %0 ], [ %8, %1 ]
%3 = urem i32 %2, 7
%4 = zext i32 %3 to i64
%5 = getelementptr inbounds [5 x i8], [5 x i8]* @__const.main.ar, i64 0, i64 %4
%6 = load i8, i8* %5
%7 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8 signext %6)
%8 = add nuw nsw i32 %2, 1
br label %1
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, ...);
int main() {
  if (sizeof(void *) == 8)
    printf("-DLIN64 ");
  else
    printf("-DLIN ");
  printf("-DSIZEOF_VOID_P=%d -DSIZEOF_LONG=%d -DSIZEOF_INT=%d\n",
         (int)sizeof(void *), (int)sizeof(long), (int)sizeof(int));
  return 0;
}


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

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

LLVM IR (-O0):
@.str = [9 x i8] c"-DLIN64 \00"
@.str.1 = [53 x i8] c"-DSIZEOF_VOID_P=%d -DSIZEOF_LONG=%d -DSIZEOF_INT=%d\0A\00"
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0))
%3 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([53 x i8], [53 x i8]* @.str.1, i64 0, i64 0), i32 8, i32 8, i32 4)
ret i32 0
}

LLVM IR (-O2):
@.str = [9 x i8] c"-DLIN64 \00"
@.str.1 = [53 x i8] c"-DSIZEOF_VOID_P=%d -DSIZEOF_LONG=%d -DSIZEOF_INT=%d\0A\00"
define i32 @main() {
%1 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0))
%2 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([53 x i8], [53 x i8]* @.str.1, i64 0, i64 0), i32 8, i32 8, i32 4)
ret i32 0
}
/* Type definitions */
typedef int /*<<< orphan*/ mpfr_rnd_t;

/* Variables and functions */
int /*<<< orphan*/ mpfr_get_default_rounding_mode();
mpfr_rnd_t m_getRoundingMode() { return mpfr_get_default_rounding_mode(); }


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

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

LLVM IR (-O0):
define i32 @m_getRoundingMode() {
%1 = call i32 (...) @mpfr_get_default_rounding_mode()
ret i32 %1
}

LLVM IR (-O2):
define i32 @m_getRoundingMode() {
%1 = tail call i32 (...) @mpfr_get_default_rounding_mode()
ret i32 %1
}
/* Variables and functions */
int /*<<< orphan*/ bar();
int /*<<< orphan*/ foo();
void *f2(void *arg) {
  bar();
  foo();
  return NULL;
}


x86 assembly (clang, -O0):
<f2>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    $0x0,%al
call   1030 <bar@plt>
mov    $0x0,%al
call   1040 <foo@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
define i8* @f2(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = call i32 (...) @bar()
%4 = call i32 (...) @foo()
ret i8* null
}

LLVM IR (-O2):
define noalias i8* @f2(i8* nocapture readnone %0) {
%2 = tail call i32 (...) @bar()
%3 = tail call i32 (...) @foo()
ret i8* null
}
const char *__malidrv_build_info(void) {
  return "malidrv:  API_VERSION=20 REPO_URL=r3p2-01rel2 REVISION=r3p2-01rel2 "
         "CHANGED_REVISION= CHANGE_DATE= BUILD_DATE=Чт ноя  5 19:38:41 MSK "
         "2015 BUILD=release TARGET_PLATFORM=rk30 MALI_PLATFORM=rk30 KDIR= "
         "OS_MEMORY_KERNEL_BUFFER_SIZE_IN_MB=16 USING_UMP=y USING_PROFILING=y "
         "USING_INTERNAL_PROFILING= USING_GPU_UTILIZATION=1 "
         "MALI_UPPER_HALF_SCHEDULING=1";
}


x86 assembly (clang, -O0):
<__malidrv_build_info>:
push   %rbp
mov    %rsp,%rbp
lea    0xef5(%rip),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<__malidrv_build_info>:
lea    0xef9(%rip),%rax
ret

LLVM IR (-O0):
@.str = [349 x i8] c"malidrv: API_VERSION=20 REPO_URL=r3p2-01rel2 REVISION=r3p2-01rel2 CHANGED_REVISION= CHANGE_DATE= BUILD_DATE=\D0\A7\D1\82 \D0\BD\D0\BE\D1\8F 5 19:38:41 MSK 2015 BUILD=release TARGET_PLATFORM=rk30 MALI_PLATFORM=rk30 KDIR= OS_MEMORY_KERNEL_BUFFER_SIZE_IN_MB=16 USING_UMP=y USING_PROFILING=y USING_INTERNAL_PROFILING= USING_GPU_UTILIZATION=1 MALI_UPPER_HALF_SCHEDULING=1\00"
define i8* @__malidrv_build_info() {
ret i8* getelementptr inbounds ([349 x i8], [349 x i8]* @.str, i64 0, i64 0)
}

LLVM IR (-O2):
@.str = [349 x i8] c"malidrv: API_VERSION=20 REPO_URL=r3p2-01rel2 REVISION=r3p2-01rel2 CHANGED_REVISION= CHANGE_DATE= BUILD_DATE=\D0\A7\D1\82 \D0\BD\D0\BE\D1\8F 5 19:38:41 MSK 2015 BUILD=release TARGET_PLATFORM=rk30 MALI_PLATFORM=rk30 KDIR= OS_MEMORY_KERNEL_BUFFER_SIZE_IN_MB=16 USING_UMP=y USING_PROFILING=y USING_INTERNAL_PROFILING= USING_GPU_UTILIZATION=1 MALI_UPPER_HALF_SCHEDULING=1\00"
define i8* @__malidrv_build_info() {
ret i8* getelementptr inbounds ([349 x i8], [349 x i8]* @.str, i64 0, i64 0)
}
/* Variables and functions */
int /*<<< orphan*/ gen_data();
int main(int argc, char *argv[]) {
  char *ifn = NULL;
  gen_data();
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movq   $0x0,-0x18(%rbp)
mov    $0x0,%al
call   1030 <gen_data@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i8*
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
store i8* null, i8** %6
%7 = call i32 (...) @gen_data()
ret i32 0
}

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 (...) @gen_data()
ret i32 0
}
/* Type definitions */
typedef int /*<<< orphan*/ uint8_t;

/* Variables and functions */
int /*<<< orphan*/ ehrpwm_write(int /*<<< orphan*/, int, unsigned short);
int ehrpwm_tb_set_period(uint8_t module, unsigned short val) {
  ehrpwm_write(module, 0xA, val);
  return 0;
}


x86 assembly (clang, -O0):
<ehrpwm_tb_set_period>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %si,%ax
mov    %edi,-0x4(%rbp)
mov    %ax,-0x6(%rbp)
mov    -0x4(%rbp),%edi
mov    $0xa,%esi
movzwl -0x6(%rbp),%edx
call   1030 <ehrpwm_write@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ehrpwm_tb_set_period>:
push   %rax
mov    %esi,%edx
mov    $0xa,%esi
call   1030 <ehrpwm_write@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @ehrpwm_tb_set_period(i32 %0, i16 zeroext %1) {
%3 = alloca i32
%4 = alloca i16
store i32 %0, i32* %3
store i16 %1, i16* %4
%5 = load i32, i32* %3
%6 = load i16, i16* %4
%7 = call i32 @ehrpwm_write(i32 %5, i32 10, i16 zeroext %6)
ret i32 0
}

LLVM IR (-O2):
define i32 @ehrpwm_tb_set_period(i32 %0, i16 zeroext %1) {
%3 = tail call i32 @ehrpwm_write(i32 %0, i32 10, i16 zeroext %1)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ arm_memio_mult_op();
int /*<<< orphan*/ arm_memio_stm(int /*<<< orphan*/);
void arm_stm() { arm_memio_stm(arm_memio_mult_op()); }


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

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

LLVM IR (-O0):
define void @arm_stm() {
%1 = call i32 (...) @arm_memio_mult_op()
%2 = call i32 @arm_memio_stm(i32 %1)
ret void
}

LLVM IR (-O2):
define void @arm_stm() {
%1 = tail call i32 (...) @arm_memio_mult_op()
%2 = tail call i32 @arm_memio_stm(i32 %1)
ret void
}
/* Variables and functions */
float tsGetValue(double, double);
int /*<<< orphan*/ tsLatLonToGridpoint(double, double, double *, double *);
float tsGetValueLatLon(double lat, double lon) {
  double ix, iy;
  tsLatLonToGridpoint(lat, lon, &ix, &iy);
  return (tsGetValue(ix, iy));
}


x86 assembly (clang, -O0):
<tsGetValueLatLon>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  -0x8(%rbp),%xmm0
movsd  -0x10(%rbp),%xmm1
lea    -0x18(%rbp),%rdi
lea    -0x20(%rbp),%rsi
call   1030 <tsLatLonToGridpoint@plt>
movsd  -0x18(%rbp),%xmm0
movsd  -0x20(%rbp),%xmm1
call   1040 <tsGetValue@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<tsGetValueLatLon>:
sub    $0x18,%rsp
lea    0x10(%rsp),%rdi
lea    0x8(%rsp),%rsi
call   1030 <tsLatLonToGridpoint@plt>
movsd  0x10(%rsp),%xmm0
movsd  0x8(%rsp),%xmm1
call   1040 <tsGetValue@plt>
add    $0x18,%rsp
ret

LLVM IR (-O0):
define float @tsGetValueLatLon(double %0, double %1) {
%3 = alloca double
%4 = alloca double
%5 = alloca double
%6 = alloca double
store double %0, double* %3
store double %1, double* %4
%7 = load double, double* %3
%8 = load double, double* %4
%9 = call i32 @tsLatLonToGridpoint(double %7, double %8, double* %5, double* %6)
%10 = load double, double* %5
%11 = load double, double* %6
%12 = call float @tsGetValue(double %10, double %11)
ret float %12
}

LLVM IR (-O2):
define float @tsGetValueLatLon(double %0, double %1) {
%3 = alloca double
%4 = alloca double
%5 = bitcast double* %3 to i8*
%6 = bitcast double* %4 to i8*
%7 = call i32 @tsLatLonToGridpoint(double %0, double %1, double* %3, double* %4)
%8 = load double, double* %3
%9 = load double, double* %4
%10 = call float @tsGetValue(double %8, double %9)
ret float %10
}
/* Variables and functions */
float acoshf(float);
void sAcosh_process(float bIn, float *bOut) { *bOut = acoshf(bIn); }


x86 assembly (clang, -O0):
<sAcosh_process>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movss  %xmm0,-0x4(%rbp)
mov    %rdi,-0x10(%rbp)
movss  -0x4(%rbp),%xmm0
call   1030 <acoshf@plt>
mov    -0x10(%rbp),%rax
movss  %xmm0,(%rax)
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<sAcosh_process>:
push   %rbx
mov    %rdi,%rbx
call   1030 <acoshf@plt>
movss  %xmm0,(%rbx)
pop    %rbx
ret

LLVM IR (-O0):
define void @sAcosh_process(float %0, float* %1) {
%3 = alloca float
%4 = alloca float*
store float %0, float* %3
store float* %1, float** %4
%5 = load float, float* %3
%6 = call float @acoshf(float %5)
%7 = load float*, float** %4
store float %6, float* %7
ret void
}

LLVM IR (-O2):
define void @sAcosh_process(float %0, float* nocapture writeonly %1) {
%3 = tail call float @acoshf(float %0)
store float %3, float* %1
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ pthread_t;

/* Variables and functions */
int /*<<< orphan*/ SIGUSR1;
int pthread_kill(int /*<<< orphan*/, int /*<<< orphan*/);
int cancel_thread(pthread_t thread) { return pthread_kill(thread, SIGUSR1); }


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

x86 assembly (clang, -O2):
<cancel_thread>:
mov    0x2ed1(%rip),%rax
mov    (%rax),%esi
jmp    1030 <pthread_kill@plt>

LLVM IR (-O0):
@SIGUSR1 = global i32 0
define i32 @cancel_thread(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = load i32, i32* @SIGUSR1
%5 = call i32 @pthread_kill(i32 %3, i32 %4)
ret i32 %5
}

LLVM IR (-O2):
@SIGUSR1 = global i32 0
define i32 @cancel_thread(i32 %0) {
%2 = load i32, i32* @SIGUSR1
%3 = tail call i32 @pthread_kill(i32 %0, i32 %2)
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ output_string(char *);
gen_def_byte() { output_string("\t.byte\t"); }


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

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

LLVM IR (-O0):
@.str = [8 x i8] c"\09.byte\09\00"
define i32 @gen_def_byte() {
%1 = alloca i32
%2 = call i32 @output_string(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0))
%3 = load i32, i32* %1
ret i32 %3
}

LLVM IR (-O2):
@.str = [8 x i8] c"\09.byte\09\00"
define i32 @gen_def_byte() {
%1 = tail call i32 @output_string(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0))
ret i32 undef
}
unsigned int _check_times(unsigned x, unsigned y) {
  unsigned long long whole_ans =
      ((unsigned long long)x) * ((unsigned long long)y);
  unsigned word_ans = (unsigned)whole_ans;
  if (word_ans < whole_ans || word_ans > (1 << 28))
    (_throw_badalloc_fn("/scratch/repos/new/home/jordi_armengol_estape/"
                        "c-scraper/outputs/2022-01-22/02-19-57/repos/FauxFaux/"
                        "cyclone/refs/heads/master/bin/genfiles/graph.c",
                        284));
  return word_ans;
}


x86 assembly (clang, -O0):
<_check_times>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
mov    -0x8(%rbp),%ecx
imul   %rcx,%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
cmp    -0x10(%rbp),%rax
jb     114d <_check_times+0x3d>
cmpl   $0x10000000,-0x14(%rbp)
jbe    1160 <_check_times+0x50>
lea    0xeac(%rip),%rdi
mov    $0x11c,%esi
mov    $0x0,%al
call   1030 <_throw_badalloc_fn@plt>
mov    -0x14(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<_check_times>:
push   %rbx
mov    %edi,%eax
mul    %esi
mov    %eax,%ebx
jo     1121 <_check_times+0x11>
cmp    $0x10000001,%ebx
jb     1134 <_check_times+0x24>
lea    0xed8(%rip),%rdi
mov    $0x11c,%esi
xor    %eax,%eax
call   1030 <_throw_badalloc_fn@plt>
mov    %ebx,%eax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [146 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/FauxFaux/cyclone/refs/heads/master/bin/genfiles/graph.c\00"
define i32 @_check_times(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i64
%6 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%7 = load i32, i32* %3
%8 = zext i32 %7 to i64
%9 = load i32, i32* %4
%10 = zext i32 %9 to i64
%11 = mul i64 %8, %10
store i64 %11, i64* %5
%12 = load i64, i64* %5
%13 = trunc i64 %12 to i32
store i32 %13, i32* %6
%14 = load i32, i32* %6
%15 = zext i32 %14 to i64
%16 = load i64, i64* %5
%17 = icmp ult i64 %15, %16
br i1 %17, label %21, label %18
18: ; preds = %2
%19 = load i32, i32* %6
%20 = icmp ugt i32 %19, 268435456
br i1 %20, label %21, label %23
21: ; preds = %18, %2
%22 = call i32 (i8*, i32, ...) bitcast (i32 (...)* @_throw_badalloc_fn to i32 (i8*, i32, ...)*)(i8* getelementptr inbounds ([146 x i8], [146 x i8]* @.str, i64 0, i64 0), i32 284)
br label %23
23: ; preds = %21, %18
%24 = load i32, i32* %6
ret i32 %24
}

LLVM IR (-O2):
@.str = [146 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/FauxFaux/cyclone/refs/heads/master/bin/genfiles/graph.c\00"
define i32 @_check_times(i32 %0, i32 %1) {
%3 = tail call { i32, i1 } @llvm.umul.with.overflow.i32(i32 %0, i32 %1)
%4 = extractvalue { i32, i1 } %3, 0
%5 = extractvalue { i32, i1 } %3, 1
%6 = icmp ugt i32 %4, 268435456
%7 = or i1 %5, %6
br i1 %7, label %8, label %10
8: ; preds = %2
%9 = tail call i32 (i8*, i32, ...) bitcast (i32 (...)* @_throw_badalloc_fn to i32 (i8*, i32, ...)*)(i8* getelementptr inbounds ([146 x i8], [146 x i8]* @.str, i64 0, i64 0), i32 284)
br label %10
10: ; preds = %2, %8
ret i32 %4
}
/* Variables and functions */
scalar_t__ isdigit(int);
int ishex(int c) {
  return isdigit(c) || (c >= 97 && c <= 102) || (c >= 65 && c <= 70);
}


x86 assembly (clang, -O0):
<ishex>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
call   1030 <isdigit@plt>
mov    %rax,%rcx
mov    $0x1,%al
cmp    $0x0,%rcx
mov    %al,-0x5(%rbp)
jne    116d <ishex+0x5d>
cmpl   $0x61,-0x4(%rbp)
jl     114e <ishex+0x3e>
mov    $0x1,%al
cmpl   $0x66,-0x4(%rbp)
mov    %al,-0x5(%rbp)
jle    116d <ishex+0x5d>
xor    %eax,%eax
cmpl   $0x41,-0x4(%rbp)
mov    %al,-0x6(%rbp)
jl     1167 <ishex+0x57>
cmpl   $0x46,-0x4(%rbp)
setle  %al
mov    %al,-0x6(%rbp)
mov    -0x6(%rbp),%al
mov    %al,-0x5(%rbp)
mov    -0x5(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ishex>:
push   %rbx
mov    %edi,%ebx
call   1030 <isdigit@plt>
test   %rax,%rax
setne  %al
and    $0xffffffdf,%ebx
add    $0xffffffbf,%ebx
cmp    $0x6,%ebx
setb   %cl
or     %al,%cl
movzbl %cl,%eax
pop    %rbx
ret

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

LLVM IR (-O2):
define i32 @ishex(i32 %0) {
%2 = tail call i64 @isdigit(i32 %0)
%3 = icmp ne i64 %2, 0
%4 = and i32 %0, -33
%5 = add i32 %4, -65
%6 = icmp ult i32 %5, 6
%7 = or i1 %6, %3
%8 = zext i1 %7 to i32
ret i32 %8
}
/* Variables and functions */
int __ocml_isnan_f32(float);
int __isnanf(float x) { return __ocml_isnan_f32(x); }


x86 assembly (clang, -O0):
<__isnanf>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movss  %xmm0,-0x4(%rbp)
movss  -0x4(%rbp),%xmm0
call   1030 <__ocml_isnan_f32@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<__isnanf>:
jmp    1030 <__ocml_isnan_f32@plt>

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

LLVM IR (-O2):
define i32 @__isnanf(float %0) {
%2 = tail call i32 @__ocml_isnan_f32(float %0)
ret i32 %2
}
void large_stack() {
  volatile int stack[20000], i;
  for (i = 0; i < sizeof(stack) / sizeof(int); ++i)
    stack[i] = i;
}


x86 assembly (clang, -O0):
<large_stack>:
push   %rbp
mov    %rsp,%rbp
sub    $0x13810,%rsp
movl   $0x0,-0x13884(%rbp)
mov    -0x13884(%rbp),%eax
cltq
cmp    $0x4e20,%rax
jae    1152 <large_stack+0x52>
mov    -0x13884(%rbp),%ecx
mov    -0x13884(%rbp),%eax
cltq
mov    %ecx,-0x13880(%rbp,%rax,4)
mov    -0x13884(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x13884(%rbp)
jmp    1115 <large_stack+0x15>
add    $0x13810,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<large_stack>:
sub    $0x13818,%rsp
movl   $0x0,-0x74(%rsp)
mov    -0x74(%rsp),%eax
cmp    $0x4e1f,%eax
ja     113d <large_stack+0x3d>
nopw   0x0(%rax,%rax,1)
mov    -0x74(%rsp),%eax
movslq -0x74(%rsp),%rcx
mov    %eax,-0x70(%rsp,%rcx,4)
addl   $0x1,-0x74(%rsp)
mov    -0x74(%rsp),%eax
cmp    $0x4e20,%eax
jb     1120 <large_stack+0x20>
add    $0x13818,%rsp
ret

LLVM IR (-O0):
define void @large_stack() {
%1 = alloca [20000 x i32]
%2 = alloca i32
store volatile i32 0, i32* %2
br label %3
3: ; preds = %12, %0
%4 = load volatile i32, i32* %2
%5 = sext i32 %4 to i64
%6 = icmp ult i64 %5, 20000
br i1 %6, label %7, label %15
7: ; preds = %3
%8 = load volatile i32, i32* %2
%9 = load volatile i32, i32* %2
%10 = sext i32 %9 to i64
%11 = getelementptr inbounds [20000 x i32], [20000 x i32]* %1, i64 0, i64 %10
store volatile i32 %8, i32* %11
br label %12
12: ; preds = %7
%13 = load volatile i32, i32* %2
%14 = add nsw i32 %13, 1
store volatile i32 %14, i32* %2
br label %3
15: ; preds = %3
ret void
}

LLVM IR (-O2):
define void @large_stack() {
%1 = alloca [20000 x i32]
%2 = alloca i32
%3 = bitcast [20000 x i32]* %1 to i8*
%4 = bitcast i32* %2 to i8*
store volatile i32 0, i32* %2
%5 = load volatile i32, i32* %2
%6 = icmp ult i32 %5, 20000
br i1 %6, label %7, label %16
7: ; preds = %0, %7
%8 = load volatile i32, i32* %2
%9 = load volatile i32, i32* %2
%10 = sext i32 %9 to i64
%11 = getelementptr inbounds [20000 x i32], [20000 x i32]* %1, i64 0, i64 %10
store volatile i32 %8, i32* %11
%12 = load volatile i32, i32* %2
%13 = add nsw i32 %12, 1
store volatile i32 %13, i32* %2
%14 = load volatile i32, i32* %2
%15 = icmp ult i32 %14, 20000
br i1 %15, label %7, label %16
16: ; preds = %7, %0
ret void
}
void foo_1_1_1_2_1_1_1_1_1() {}


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

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

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

LLVM IR (-O2):
define void @foo_1_1_1_2_1_1_1_1_1() {
ret void
}
int size_alignment(int size) {
  int bits = 0;
  while (size > 1) {
    bits++;
    size >>= 1;
  }
  return bits;
}


x86 assembly (clang, -O0):
<size_alignment>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
cmpl   $0x1,-0x4(%rbp)
jle    112f <size_alignment+0x2f>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
mov    -0x4(%rbp),%eax
sar    $0x1,%eax
mov    %eax,-0x4(%rbp)
jmp    110e <size_alignment+0xe>
mov    -0x8(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<size_alignment>:
xor    %eax,%eax
cmp    $0x2,%edi
jl     111c <size_alignment+0x1c>
xor    %eax,%eax
mov    %edi,%ecx
nopl   0x0(%rax,%rax,1)
add    $0x1,%eax
shr    %ecx
cmp    $0x3,%edi
mov    %ecx,%edi
ja     1110 <size_alignment+0x10>
ret

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

LLVM IR (-O2):
define i32 @size_alignment(i32 %0) {
%2 = icmp sgt i32 %0, 1
br i1 %2, label %3, label %9
3: ; preds = %1, %3
%4 = phi i32 [ %6, %3 ], [ 0, %1 ]
%5 = phi i32 [ %7, %3 ], [ %0, %1 ]
%6 = add nuw nsw i32 %4, 1
%7 = lshr i32 %5, 1
%8 = icmp ugt i32 %5, 3
br i1 %8, label %3, label %9
9: ; preds = %3, %1
%10 = phi i32 [ 0, %1 ], [ %6, %3 ]
ret i32 %10
}
/* Variables and functions */
int halfdelay(int);
int wrap_halfdelay(int tenths) { return halfdelay(tenths); }


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

x86 assembly (clang, -O2):
<wrap_halfdelay>:
jmp    1030 <halfdelay@plt>

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

LLVM IR (-O2):
define i32 @wrap_halfdelay(i32 %0) {
%2 = tail call i32 @halfdelay(i32 %0)
ret i32 %2
}
void ff_hevc_put_hevc_uni_qpel_v32_10_sse4() {}


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

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

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

LLVM IR (-O2):
define void @ff_hevc_put_hevc_uni_qpel_v32_10_sse4() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ strcpy(char *, char *);
scalar_t__ strlen(char *);
char *xmalloc(scalar_t__);
char *xstrdup(char *s) {
  char *p = xmalloc(strlen(s) + 1);
  strcpy(p, s);
  return p;
}


x86 assembly (clang, -O0):
<xstrdup>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <strlen@plt>
mov    %rax,%rdi
add    $0x1,%rdi
call   1050 <xmalloc@plt>
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x8(%rbp),%rsi
call   1030 <strcpy@plt>
mov    -0x10(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<xstrdup>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%r14
call   1040 <strlen@plt>
lea    0x1(%rax),%rdi
call   1050 <xmalloc@plt>
mov    %rax,%rbx
mov    %rax,%rdi
mov    %r14,%rsi
call   1030 <strcpy@plt>
mov    %rbx,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define i8* @xstrdup(i8* %0) {
%2 = alloca i8*
%3 = alloca i8*
store i8* %0, i8** %2
%4 = load i8*, i8** %2
%5 = call i64 @strlen(i8* %4)
%6 = add nsw i64 %5, 1
%7 = call i8* @xmalloc(i64 %6)
store i8* %7, i8** %3
%8 = load i8*, i8** %3
%9 = load i8*, i8** %2
%10 = call i32 @strcpy(i8* %8, i8* %9)
%11 = load i8*, i8** %3
ret i8* %11
}

LLVM IR (-O2):
define i8* @xstrdup(i8* %0) {
%2 = tail call i64 @strlen(i8* dereferenceable(1) %0)
%3 = add nsw i64 %2, 1
%4 = tail call i8* @xmalloc(i64 %3)
%5 = tail call i32 @strcpy(i8* %4, i8* %0)
ret i8* %4
}
/* Variables and functions */
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ write_fan_manual(char *, int /*<<< orphan*/);
void signal_handler(int sig) {
  write_fan_manual("/sys/devices/platform/applesmc.768/fan1_manual", 0);
  write_fan_manual("/sys/devices/platform/applesmc.768/fan2_manual", 0);
  exit(0);
}


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

x86 assembly (clang, -O2):
<signal_handler>:
push   %rax
lea    0xed8(%rip),%rdi
xor    %esi,%esi
call   1030 <write_fan_manual@plt>
lea    0xef9(%rip),%rdi
xor    %esi,%esi
call   1030 <write_fan_manual@plt>
xor    %edi,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@.str = [47 x i8] c"/sys/devices/platform/applesmc.768/fan1_manual\00"
@.str.1 = [47 x i8] c"/sys/devices/platform/applesmc.768/fan2_manual\00"
define void @signal_handler(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = call i32 @write_fan_manual(i8* getelementptr inbounds ([47 x i8], [47 x i8]* @.str, i64 0, i64 0), i32 0)
%4 = call i32 @write_fan_manual(i8* getelementptr inbounds ([47 x i8], [47 x i8]* @.str.1, i64 0, i64 0), i32 0)
%5 = call i32 @exit(i32 0)
unreachable
}

LLVM IR (-O2):
@.str = [47 x i8] c"/sys/devices/platform/applesmc.768/fan1_manual\00"
@.str.1 = [47 x i8] c"/sys/devices/platform/applesmc.768/fan2_manual\00"
define void @signal_handler(i32 %0) {
%2 = tail call i32 @write_fan_manual(i8* getelementptr inbounds ([47 x i8], [47 x i8]* @.str, i64 0, i64 0), i32 0)
%3 = tail call i32 @write_fan_manual(i8* getelementptr inbounds ([47 x i8], [47 x i8]* @.str.1, i64 0, i64 0), i32 0)
%4 = tail call i32 @exit(i32 0)
unreachable
}
/* Variables and functions */
char *encode_bulk(char const *);
char *morse_encode(char const *in) { return encode_bulk(in); }


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

x86 assembly (clang, -O2):
<morse_encode>:
jmp    1030 <encode_bulk@plt>

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

LLVM IR (-O2):
define i8* @morse_encode(i8* %0) {
%2 = tail call i8* @encode_bulk(i8* %0)
ret i8* %2
}
int path_Euclidean(double **cost, int n, int m) { return n; }


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

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

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

LLVM IR (-O2):
define i32 @path_Euclidean(double** nocapture readnone %0, i32 returned %1, i32 %2) {
ret i32 %1
}
void test_save(struct pevent_record *record, int cpu) {}


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

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

LLVM IR (-O0):
%struct.pevent_record = type opaque
define void @test_save(%struct.pevent_record* %0, i32 %1) {
%3 = alloca %struct.pevent_record*
%4 = alloca i32
store %struct.pevent_record* %0, %struct.pevent_record** %3
store i32 %1, i32* %4
ret void
}

LLVM IR (-O2):
%struct.pevent_record = type opaque
define void @test_save(%struct.pevent_record* nocapture %0, i32 %1) {
ret void
}
/* Variables and functions */
int core3_safe(char const *);
int U_EMRSETMAPMODE_safe(const char *record) { return (core3_safe(record)); }


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

x86 assembly (clang, -O2):
<U_EMRSETMAPMODE_safe>:
jmp    1030 <core3_safe@plt>

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

LLVM IR (-O2):
define i32 @U_EMRSETMAPMODE_safe(i8* %0) {
%2 = tail call i32 @core3_safe(i8* %0)
ret i32 %2
}
void test_37a(int i) {
  int *ptr;
  *ptr = i;
}


x86 assembly (clang, -O0):
<test_37a>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%ecx
mov    -0x10(%rbp),%rax
mov    %ecx,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
LLVM IR (-O0):
define void @test_37a(i32 %0) {
%2 = alloca i32
%3 = alloca i32*
store i32 %0, i32* %2
%4 = load i32, i32* %2
%5 = load i32*, i32** %3
store i32 %4, i32* %5
ret void
}

LLVM IR (-O2):
/* Variables and functions */
int /*<<< orphan*/ Msp430GpioC__12__GeneralIO__set();
void Stm25pSpiP__CSN__set(void) { Msp430GpioC__12__GeneralIO__set(); }


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

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

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

LLVM IR (-O2):
define void @Stm25pSpiP__CSN__set() {
%1 = tail call i32 (...) @Msp430GpioC__12__GeneralIO__set()
ret void
}
void blk_throtl_drain(struct request_queue *q) {}


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

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

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

LLVM IR (-O2):
%struct.request_queue = type opaque
define void @blk_throtl_drain(%struct.request_queue* nocapture %0) {
ret void
}
/* Type definitions */
struct sockaddr_in {
  unsigned short sin_port;
};
struct sockaddr {
  scalar_t__ sa_family;
};

/* Variables and functions */
scalar_t__ AF_INET;
unsigned short get_in_port(struct sockaddr *sa) {
  if (sa->sa_family == AF_INET)
    return ((struct sockaddr_in *)sa)->sin_port;
  return 0;
}


x86 assembly (clang, -O0):
<get_in_port>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    (%rax),%rax
mov    0x2ed2(%rip),%rcx
cmp    (%rcx),%rax
jne    112f <get_in_port+0x2f>
mov    -0x10(%rbp),%rax
mov    (%rax),%ax
mov    %ax,-0x2(%rbp)
jmp    1135 <get_in_port+0x35>
movw   $0x0,-0x2(%rbp)
movzwl -0x2(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_in_port>:
mov    (%rdi),%rax
mov    0x2ede(%rip),%rcx
xor    %edx,%edx
cmp    (%rcx),%rax
cmovne %edx,%eax
ret

LLVM IR (-O0):
%struct.sockaddr = type { i64 }
%struct.sockaddr_in = type { i16 }
@AF_INET = global i64 0
define zeroext i16 @get_in_port(%struct.sockaddr* %0) {
%2 = alloca i16
%3 = alloca %struct.sockaddr*
store %struct.sockaddr* %0, %struct.sockaddr** %3
%4 = load %struct.sockaddr*, %struct.sockaddr** %3
%5 = getelementptr inbounds %struct.sockaddr, %struct.sockaddr* %4, i32 0, i32 0
%6 = load i64, i64* %5
%7 = load i64, i64* @AF_INET
%8 = icmp eq i64 %6, %7
br i1 %8, label %9, label %14
9: ; preds = %1
%10 = load %struct.sockaddr*, %struct.sockaddr** %3
%11 = bitcast %struct.sockaddr* %10 to %struct.sockaddr_in*
%12 = getelementptr inbounds %struct.sockaddr_in, %struct.sockaddr_in* %11, i32 0, i32 0
%13 = load i16, i16* %12
store i16 %13, i16* %2
br label %15
14: ; preds = %1
store i16 0, i16* %2
br label %15
15: ; preds = %14, %9
%16 = load i16, i16* %2
ret i16 %16
}

LLVM IR (-O2):
%struct.sockaddr = type { i64 }
@AF_INET = global i64 0
define zeroext i16 @get_in_port(%struct.sockaddr* nocapture %0) {
%2 = getelementptr inbounds %struct.sockaddr, %struct.sockaddr* %0, i64 0, i32 0
%3 = load i64, i64* %2
%4 = load i64, i64* @AF_INET
%5 = icmp eq i64 %3, %4
%6 = trunc i64 %3 to i16
%7 = select i1 %5, i16 %6, i16 0
ret i16 %7
}
/* Variables and functions */
int /*<<< orphan*/ getchar();
int /*<<< orphan*/ scanf(char *, char *);
int answer(void) {
  char ch;
  scanf("%c", &ch);
  getchar();
  if (ch == 'Y' || ch == 'y')
    return 1;
  return 0;
}


x86 assembly (clang, -O0):
<answer>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    0xed1(%rip),%rdi
lea    -0x5(%rbp),%rsi
call   1040 <scanf@plt>
mov    $0x0,%al
call   1030 <getchar@plt>
movsbl -0x5(%rbp),%eax
cmp    $0x59,%eax
je     1159 <answer+0x39>
movsbl -0x5(%rbp),%eax
cmp    $0x79,%eax
jne    1165 <answer+0x45>
movl   $0x1,-0x4(%rbp)
jmp    116c <answer+0x4c>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<answer>:
push   %rax
lea    0xed8(%rip),%rdi
lea    0x7(%rsp),%rsi
call   1040 <scanf@plt>
xor    %eax,%eax
call   1030 <getchar@plt>
mov    0x7(%rsp),%cl
and    $0xdf,%cl
xor    %eax,%eax
cmp    $0x59,%cl
sete   %al
pop    %rcx
ret

LLVM IR (-O0):
@.str = [3 x i8] c"%c\00"
define i32 @answer() {
%1 = alloca i32
%2 = alloca i8
%3 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* %2)
%4 = call i32 (...) @getchar()
%5 = load i8, i8* %2
%6 = sext i8 %5 to i32
%7 = icmp eq i32 %6, 89
br i1 %7, label %12, label %8
8: ; preds = %0
%9 = load i8, i8* %2
%10 = sext i8 %9 to i32
%11 = icmp eq i32 %10, 121
br i1 %11, label %12, label %13
12: ; preds = %8, %0
store i32 1, i32* %1
br label %14
13: ; preds = %8
store i32 0, i32* %1
br label %14
14: ; preds = %13, %12
%15 = load i32, i32* %1
ret i32 %15
}

LLVM IR (-O2):
@.str = [3 x i8] c"%c\00"
define i32 @answer() {
%1 = alloca i8
%2 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* %1)
%3 = call i32 (...) @getchar()
%4 = load i8, i8* %1
%5 = and i8 %4, -33
%6 = icmp eq i8 %5, 89
%7 = zext i1 %6 to i32
ret i32 %7
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, ...);
int main(int argc, char *argv[]) {
  int age = 24;
  float height = 76.1023;
  double super_power = 12412.1231231;
  char initial = 'A';
  char first_name[] = "Zed";
  char last_name[] = "Shaw";
  printf("My name is %s\n", first_name);
  printf(" I am %d years old.\n", age);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x18,-0x14(%rbp)
movss  0xed3(%rip),%xmm0
movss  %xmm0,-0x18(%rbp)
movsd  0xebe(%rip),%xmm0
movsd  %xmm0,-0x20(%rbp)
movb   $0x41,-0x21(%rbp)
mov    0xebb(%rip),%eax
mov    %eax,-0x25(%rbp)
mov    0xeb6(%rip),%eax
mov    %eax,-0x2a(%rbp)
mov    0xeb1(%rip),%al
mov    %al,-0x26(%rbp)
lea    -0x25(%rbp),%rsi
lea    0xea4(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x14(%rbp),%esi
lea    0xea2(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
movl   $0x64655a,0x4(%rsp)
lea    0xee0(%rip),%rdi
lea    0x4(%rsp),%rsi
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xedc(%rip),%rdi
mov    $0x18,%esi
xor    %eax,%eax
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@__const.main.first_name = [4 x i8] c"Zed\00"
@__const.main.last_name = [5 x i8] c"Shaw\00"
@.str = [15 x i8] c"My name is %s\0A\00"
@.str.1 = [21 x i8] c" I am %d years old.\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i32
%7 = alloca float
%8 = alloca double
%9 = alloca i8
%10 = alloca [4 x i8]
%11 = alloca [5 x i8]
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
store i32 24, i32* %6
store float 0x4053068C20000000, float* %7
store double 0x40C83E0FC27F6BF1, double* %8
store i8 65, i8* %9
%12 = bitcast [4 x i8]* %10 to i8*
%13 = bitcast [5 x i8]* %11 to i8*
%14 = getelementptr inbounds [4 x i8], [4 x i8]* %10, i64 0, i64 0
%15 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0), i8* %14)
%16 = load i32, i32* %6
%17 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.1, i64 0, i64 0), i32 %16)
ret i32 0
}

LLVM IR (-O2):
@.str = [15 x i8] c"My name is %s\0A\00"
@.str.1 = [21 x i8] c" I am %d years old.\0A\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = alloca i32
%4 = bitcast i32* %3 to i8*
store i32 6579546, i32* %3
%5 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0), i32* %3)
%6 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([21 x i8], [21 x i8]* @.str.1, i64 0, i64 0), i32 24)
ret i32 0
}