xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ printf(char *, int, int);
void exitfunc18(int status, void *arg) {
  printf("Executing exitfunc18 (status=%d, arg=%d)\n", status, (int)arg);
  exit((int)arg);
}


x86 assembly (clang, -O0):
<exitfunc18>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x4(%rbp),%esi
mov    -0x10(%rbp),%rax
mov    %eax,%edx
lea    0xec1(%rip),%rdi
call   1030 <printf@plt>
mov    -0x10(%rbp),%rax
mov    %eax,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<exitfunc18>:
push   %rbx
mov    %rsi,%rbx
mov    %edi,%esi
lea    0xed3(%rip),%rdi
mov    %ebx,%edx
call   1030 <printf@plt>
mov    %ebx,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@.str = [42 x i8] c"Executing exitfunc18 (status=%d, arg=%d)\0A\00"
define void @exitfunc18(i32 %0, i8* %1) {
%3 = alloca i32
%4 = alloca i8*
store i32 %0, i32* %3
store i8* %1, i8** %4
%5 = load i32, i32* %3
%6 = load i8*, i8** %4
%7 = ptrtoint i8* %6 to i32
%8 = call i32 @printf(i8* getelementptr inbounds ([42 x i8], [42 x i8]* @.str, i64 0, i64 0), i32 %5, i32 %7)
%9 = load i8*, i8** %4
%10 = ptrtoint i8* %9 to i32
%11 = call i32 @exit(i32 %10)
unreachable
}

LLVM IR (-O2):
@.str = [42 x i8] c"Executing exitfunc18 (status=%d, arg=%d)\0A\00"
define void @exitfunc18(i32 %0, i8* %1) {
%3 = ptrtoint i8* %1 to i64
%4 = trunc i64 %3 to i32
%5 = tail call i32 @printf(i8* getelementptr inbounds ([42 x i8], [42 x i8]* @.str, i64 0, i64 0), i32 %0, i32 %4)
%6 = tail call i32 @exit(i32 %4)
unreachable
}
/* Variables and functions */
int /*<<< orphan*/ doMult(int, int);
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ scanf(char *, int *, int *);
int main() {
  int n, m;
  printf("Enter The Value of M and N: ");
  scanf("%d %d", &n, &m);
  doMult(m, n);
  return 0;
}


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

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

LLVM IR (-O0):
@.str = [29 x i8] c"Enter The Value of M and N: \00"
@.str.1 = [6 x i8] c"%d %d\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
store i32 0, i32* %1
%4 = call i32 @printf(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str, i64 0, i64 0))
%5 = call i32 @scanf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), i32* %2, i32* %3)
%6 = load i32, i32* %3
%7 = load i32, i32* %2
%8 = call i32 @doMult(i32 %6, i32 %7)
ret i32 0
}

LLVM IR (-O2):
@.str = [29 x i8] c"Enter The Value of M and N: \00"
@.str.1 = [6 x i8] c"%d %d\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = bitcast i32* %1 to i8*
%4 = bitcast i32* %2 to i8*
%5 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([29 x i8], [29 x i8]* @.str, i64 0, i64 0))
%6 = call i32 @scanf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), i32* %1, i32* %2)
%7 = load i32, i32* %2
%8 = load i32, i32* %1
%9 = call i32 @doMult(i32 %7, i32 %8)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ prune_minmax2_Ok(int /*<<< orphan*/, int);
void call_prune_minmax2_Ok() { prune_minmax2_Ok(0, 2); }


x86 assembly (clang, -O0):
<call_prune_minmax2_Ok>:
push   %rbp
mov    %rsp,%rbp
xor    %edi,%edi
mov    $0x2,%esi
call   1030 <prune_minmax2_Ok@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<call_prune_minmax2_Ok>:
xor    %edi,%edi
mov    $0x2,%esi
jmp    1030 <prune_minmax2_Ok@plt>

LLVM IR (-O0):
define void @call_prune_minmax2_Ok() {
%1 = call i32 @prune_minmax2_Ok(i32 0, i32 2)
ret void
}

LLVM IR (-O2):
define void @call_prune_minmax2_Ok() {
%1 = tail call i32 @prune_minmax2_Ok(i32 0, i32 2)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ assert(int);
int main() {
  int a, undefined;
  int *pointer;
  a = 1;
  if (undefined) {
    pointer = &a;
  }
  *pointer = 42;
  assert(a == 42);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x1,-0x8(%rbp)
cmpl   $0x0,-0xc(%rbp)
je     1138 <main+0x28>
lea    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rax
movl   $0x2a,(%rax)
cmpl   $0x2a,-0x8(%rbp)
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <assert@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    $0x1,%edi
call   1030 <assert@plt>
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 @assert(i32 1)
ret i32 0
}
/* Variables and functions */
int pal(char *);
int /*<<< orphan*/ printf(char *, ...);
int /*<<< orphan*/ scanf(char *, char *);
int main() {
  char a[1000];
  int b;
  printf("Vavedi tekst: ");
  scanf("%s", a);
  b = pal(a);
  printf("%d\n", b);
  return b;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x400,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeb7(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    -0x3f0(%rbp),%rsi
lea    0xeb1(%rip),%rdi
call   1050 <scanf@plt>
lea    -0x3f0(%rbp),%rdi
call   1040 <pal@plt>
mov    %eax,-0x3f4(%rbp)
mov    -0x3f4(%rbp),%esi
lea    0xe90(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x3f4(%rbp),%eax
add    $0x400,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x3f0,%rsp
lea    0xec1(%rip),%rdi
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xec2(%rip),%rdi
mov    %rsp,%rbx
mov    %rbx,%rsi
call   1050 <scanf@plt>
mov    %rbx,%rdi
call   1040 <pal@plt>
mov    %eax,%ebx
lea    0xea9(%rip),%rdi
mov    %eax,%esi
xor    %eax,%eax
call   1030 <printf@plt>
mov    %ebx,%eax
add    $0x3f0,%rsp
pop    %rbx
ret

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

LLVM IR (-O2):
@.str = [15 x i8] c"Vavedi tekst: \00"
@.str.1 = [3 x i8] c"%s\00"
@.str.2 = [4 x i8] c"%d\0A\00"
define i32 @main() {
%1 = alloca [1000 x i8]
%2 = getelementptr inbounds [1000 x i8], [1000 x i8]* %1, i64 0, i64 0
%3 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0))
%4 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i8* %2)
%5 = call i32 @pal(i8* %2)
%6 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0), i32 %5)
ret i32 %5
}
int is_boolean_start(int c, int ahead) {
  return c == '#' && ahead != '\\' && ahead != '(';
}


x86 assembly (clang, -O0):
<is_boolean_start>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
xor    %eax,%eax
cmpl   $0x23,-0x4(%rbp)
mov    %al,-0x9(%rbp)
jne    1132 <is_boolean_start+0x32>
xor    %eax,%eax
cmpl   $0x5c,-0x8(%rbp)
mov    %al,-0x9(%rbp)
je     1132 <is_boolean_start+0x32>
cmpl   $0x28,-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):
<is_boolean_start>:
cmp    $0x23,%edi
sete   %al
cmp    $0x5c,%esi
setne  %cl
and    %al,%cl
cmp    $0x28,%esi
setne  %al
and    %cl,%al
movzbl %al,%eax
ret

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

LLVM IR (-O2):
define i32 @is_boolean_start(i32 %0, i32 %1) {
%3 = icmp eq i32 %0, 35
%4 = icmp ne i32 %1, 92
%5 = and i1 %3, %4
%6 = icmp ne i32 %1, 40
%7 = and i1 %6, %5
%8 = zext i1 %7 to i32
ret i32 %8
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int atoi(char *);
int /*<<< orphan*/ fgets(char *, int, int /*<<< orphan*/ *);
int read_int_http(FILE *f) {
  char buf[1024];
  fgets(buf, 1024 - 1, f);
  return atoi(buf);
}


x86 assembly (clang, -O0):
<read_int_http>:
push   %rbp
mov    %rsp,%rbp
sub    $0x410,%rsp
mov    %rdi,-0x8(%rbp)
lea    -0x410(%rbp),%rdi
mov    -0x8(%rbp),%rdx
mov    $0x3ff,%esi
call   1030 <fgets@plt>
lea    -0x410(%rbp),%rdi
call   1040 <atoi@plt>
add    $0x410,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<read_int_http>:
push   %rbx
sub    $0x400,%rsp
mov    %rdi,%rdx
mov    %rsp,%rbx
mov    %rbx,%rdi
mov    $0x3ff,%esi
call   1030 <fgets@plt>
mov    %rbx,%rdi
call   1040 <atoi@plt>
add    $0x400,%rsp
pop    %rbx
ret

LLVM IR (-O0):
define i32 @read_int_http(i32* %0) {
%2 = alloca i32*
%3 = alloca [1024 x i8]
store i32* %0, i32** %2
%4 = getelementptr inbounds [1024 x i8], [1024 x i8]* %3, i64 0, i64 0
%5 = load i32*, i32** %2
%6 = call i32 @fgets(i8* %4, i32 1023, i32* %5)
%7 = getelementptr inbounds [1024 x i8], [1024 x i8]* %3, i64 0, i64 0
%8 = call i32 @atoi(i8* %7)
ret i32 %8
}

LLVM IR (-O2):
define i32 @read_int_http(i32* nocapture %0) {
%2 = alloca [1024 x i8]
%3 = getelementptr inbounds [1024 x i8], [1024 x i8]* %2, i64 0, i64 0
%4 = call i32 @fgets(i8* %3, i32 1023, i32* %0)
%5 = call i32 @atoi(i8* %3)
ret i32 %5
}
int log10_cpu(int nb) {
  if (nb / 100)
    return 3;
  if (nb / 10)
    return 2;
  return 1;
}


x86 assembly (clang, -O0):
<log10_cpu>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
mov    -0x8(%rbp),%eax
mov    $0x64,%ecx
cltd
idiv   %ecx
cmp    $0x0,%eax
je     1127 <log10_cpu+0x27>
movl   $0x3,-0x4(%rbp)
jmp    114e <log10_cpu+0x4e>
mov    -0x8(%rbp),%eax
mov    $0xa,%ecx
cltd
idiv   %ecx
cmp    $0x0,%eax
je     1147 <log10_cpu+0x47>
movl   $0x2,-0x4(%rbp)
jmp    114e <log10_cpu+0x4e>
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<log10_cpu>:
lea    0x63(%rdi),%eax
add    $0x9,%edi
cmp    $0x13,%edi
mov    $0x2,%ecx
sbb    $0x0,%ecx
cmp    $0xc7,%eax
mov    $0x3,%eax
cmovb  %ecx,%eax
ret

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

LLVM IR (-O2):
define i32 @log10_cpu(i32 %0) {
%2 = add i32 %0, 99
%3 = icmp ult i32 %2, 199
%4 = add i32 %0, 9
%5 = icmp ult i32 %4, 19
%6 = select i1 %5, i32 1, i32 2
%7 = select i1 %3, i32 %6, i32 3
ret i32 %7
}
/* Type definitions */
typedef int /*<<< orphan*/ bio_info_cb;
typedef int /*<<< orphan*/ BIO;

/* Variables and functions */
long BIO_callback_ctrl(int /*<<< orphan*/ *, int, int /*<<< orphan*/ *);
int /*<<< orphan*/ *BIO_next(int /*<<< orphan*/ *);
long b64_callback_ctrl(BIO *b, int cmd, bio_info_cb *fp) {
  long ret = 1;
  BIO *next = BIO_next(b);
  if (next == NULL)
    return 0;
  switch (cmd) {
  default:
    ret = BIO_callback_ctrl(next, cmd, fp);
    break;
  }
  return (ret);
}


x86 assembly (clang, -O0):
<b64_callback_ctrl>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x10(%rbp)
mov    %esi,-0x14(%rbp)
mov    %rdx,-0x20(%rbp)
movq   $0x1,-0x28(%rbp)
mov    -0x10(%rbp),%rdi
call   1040 <BIO_next@plt>
mov    %rax,-0x30(%rbp)
cmpq   $0x0,-0x30(%rbp)
jne    1160 <b64_callback_ctrl+0x40>
movq   $0x0,-0x8(%rbp)
jmp    117c <b64_callback_ctrl+0x5c>
mov    -0x30(%rbp),%rdi
mov    -0x14(%rbp),%esi
mov    -0x20(%rbp),%rdx
call   1030 <BIO_callback_ctrl@plt>
mov    %rax,-0x28(%rbp)
mov    -0x28(%rbp),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<b64_callback_ctrl>:
push   %rbp
push   %rbx
push   %rax
mov    %rdx,%rbx
mov    %esi,%ebp
call   1040 <BIO_next@plt>
test   %rax,%rax
je     1145 <b64_callback_ctrl+0x25>
mov    %rax,%rdi
mov    %ebp,%esi
mov    %rbx,%rdx
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    1030 <BIO_callback_ctrl@plt>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
define i64 @b64_callback_ctrl(i32* %0, i32 %1, i32* %2) {
%4 = alloca i64
%5 = alloca i32*
%6 = alloca i32
%7 = alloca i32*
%8 = alloca i64
%9 = alloca i32*
store i32* %0, i32** %5
store i32 %1, i32* %6
store i32* %2, i32** %7
store i64 1, i64* %8
%10 = load i32*, i32** %5
%11 = call i32* @BIO_next(i32* %10)
store i32* %11, i32** %9
%12 = load i32*, i32** %9
%13 = icmp eq i32* %12, null
br i1 %13, label %14, label %15
14: ; preds = %3
store i64 0, i64* %4
br label %24
15: ; preds = %3
%16 = load i32, i32* %6
switch i32 %16, label %17 [
]
17: ; preds = %15
%18 = load i32*, i32** %9
%19 = load i32, i32* %6
%20 = load i32*, i32** %7
%21 = call i64 @BIO_callback_ctrl(i32* %18, i32 %19, i32* %20)
store i64 %21, i64* %8
br label %22
22: ; preds = %17
%23 = load i64, i64* %8
store i64 %23, i64* %4
br label %24
24: ; preds = %22, %14
%25 = load i64, i64* %4
ret i64 %25
}

LLVM IR (-O2):
define i64 @b64_callback_ctrl(i32* %0, i32 %1, i32* %2) {
%4 = tail call i32* @BIO_next(i32* %0)
%5 = icmp eq i32* %4, null
br i1 %5, label %8, label %6
6: ; preds = %3
%7 = tail call i64 @BIO_callback_ctrl(i32* %4, i32 %1, i32* %2)
br label %8
8: ; preds = %3, %6
%9 = phi i64 [ %7, %6 ], [ 0, %3 ]
ret i64 %9
}
int long_float_gt_xxxx(long a, long b) {
  if (a < 0) {
    a = 0x8000000000000000lu - a;
  }
  if (b < 0) {
    b = 0x8000000000000000lu - b;
  }
  return a > b;
}


x86 assembly (clang, -O0):
<long_float_gt_xxxx>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
cmpq   $0x0,-0x8(%rbp)
jge    1129 <long_float_gt_xxxx+0x29>
movabs $0x8000000000000000,%rax
sub    -0x8(%rbp),%rax
mov    %rax,-0x8(%rbp)
cmpq   $0x0,-0x10(%rbp)
jge    1146 <long_float_gt_xxxx+0x46>
movabs $0x8000000000000000,%rax
sub    -0x10(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x8(%rbp),%rax
cmp    -0x10(%rbp),%rax
setg   %al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<long_float_gt_xxxx>:
movabs $0x8000000000000000,%rcx
mov    %rcx,%rdx
sub    %rdi,%rdx
test   %rdi,%rdi
cmovns %rdi,%rdx
sub    %rsi,%rcx
test   %rsi,%rsi
cmovns %rsi,%rcx
xor    %eax,%eax
cmp    %rcx,%rdx
setg   %al
ret

LLVM IR (-O0):
define i32 @long_float_gt_xxxx(i64 %0, i64 %1) {
%3 = alloca i64
%4 = alloca i64
store i64 %0, i64* %3
store i64 %1, i64* %4
%5 = load i64, i64* %3
%6 = icmp slt i64 %5, 0
br i1 %6, label %7, label %10
7: ; preds = %2
%8 = load i64, i64* %3
%9 = sub i64 -9223372036854775808, %8
store i64 %9, i64* %3
br label %10
10: ; preds = %7, %2
%11 = load i64, i64* %4
%12 = icmp slt i64 %11, 0
br i1 %12, label %13, label %16
13: ; preds = %10
%14 = load i64, i64* %4
%15 = sub i64 -9223372036854775808, %14
store i64 %15, i64* %4
br label %16
16: ; preds = %13, %10
%17 = load i64, i64* %3
%18 = load i64, i64* %4
%19 = icmp sgt i64 %17, %18
%20 = zext i1 %19 to i32
ret i32 %20
}

LLVM IR (-O2):
define i32 @long_float_gt_xxxx(i64 %0, i64 %1) {
%3 = icmp slt i64 %0, 0
%4 = sub i64 -9223372036854775808, %0
%5 = select i1 %3, i64 %4, i64 %0
%6 = icmp slt i64 %1, 0
%7 = sub i64 -9223372036854775808, %1
%8 = select i1 %6, i64 %7, i64 %1
%9 = icmp sgt i64 %5, %8
%10 = zext i1 %9 to i32
ret i32 %10
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, ...);
void print_solution(float y, float z) {
  printf("\n");
  printf("The value of Y0 is: %10.4f\n", y);
}


x86 assembly (clang, -O0):
<print_solution>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movss  %xmm0,-0x4(%rbp)
movss  %xmm1,-0x8(%rbp)
lea    0xef1(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movss  -0x4(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
lea    0xec0(%rip),%rdi
mov    $0x1,%al
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<print_solution>:
push   %rax
movss  %xmm0,0x4(%rsp)
mov    $0xa,%edi
call   1030 <putchar@plt>
movss  0x4(%rsp),%xmm0
cvtss2sd %xmm0,%xmm0
lea    0xebe(%rip),%rdi
mov    $0x1,%al
pop    %rcx
jmp    1040 <printf@plt>

LLVM IR (-O0):
@.str = [2 x i8] c"\0A\00"
@.str.1 = [28 x i8] c"The value of Y0 is: %10.4f\0A\00"
define void @print_solution(float %0, float %1) {
%3 = alloca float
%4 = alloca float
store float %0, float* %3
store float %1, float* %4
%5 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
%6 = load float, float* %3
%7 = fpext float %6 to double
%8 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.1, i64 0, i64 0), double %7)
ret void
}

LLVM IR (-O2):
@.str.1 = [28 x i8] c"The value of Y0 is: %10.4f\0A\00"
define void @print_solution(float %0, float %1) {
%3 = tail call i32 @putchar(i32 10)
%4 = fpext float %0 to double
%5 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([28 x i8], [28 x i8]* @.str.1, i64 0, i64 0), double %4)
ret void
}
void f_acc_parallel(void) {
#pragma acc parallel
  {
    int i;
#pragma omp atomic write
    i = 0;
  }
}


x86 assembly (clang, -O0):
<f_acc_parallel>:
push   %rbp
mov    %rsp,%rbp
movl   $0x0,-0x4(%rbp)
pop    %rbp
ret

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

LLVM IR (-O0):
define void @f_acc_parallel() {
%1 = alloca i32
store i32 0, i32* %1
ret void
}

LLVM IR (-O2):
define void @f_acc_parallel() {
ret void
}
int PI_main(int argc, char *argv[], void (*init)(void)) {}


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

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

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

LLVM IR (-O2):
define i32 @PI_main(i32 %0, i8** nocapture readnone %1, void ()* nocapture readnone %2) {
ret i32 undef
}
int __to_mperiod(long freq) { return 1000.0 / (float)freq; }


x86 assembly (clang, -O0):
<__to_mperiod>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
cvtsi2ssq -0x8(%rbp),%xmm0
cvtss2sd %xmm0,%xmm1
movsd  0xee6(%rip),%xmm0
divsd  %xmm1,%xmm0
cvttsd2si %xmm0,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<__to_mperiod>:
cvtsi2ss %rdi,%xmm0
cvtss2sd %xmm0,%xmm0
movsd  0xeef(%rip),%xmm1
divsd  %xmm0,%xmm1
cvttsd2si %xmm1,%eax
ret

LLVM IR (-O0):
define i32 @__to_mperiod(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = load i64, i64* %2
%4 = sitofp i64 %3 to float
%5 = fpext float %4 to double
%6 = fdiv double 1.000000e+03, %5
%7 = fptosi double %6 to i32
ret i32 %7
}

LLVM IR (-O2):
define i32 @__to_mperiod(i64 %0) {
%2 = sitofp i64 %0 to float
%3 = fpext float %2 to double
%4 = fdiv double 1.000000e+03, %3
%5 = fptosi double %4 to i32
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ memcpy(void *, void const *, size_t);
void *bread(const void *memory, void *ptr, size_t size, size_t nmemb) {
  size_t total_size = size * nmemb;
  memcpy(ptr, memory, total_size);
  return (void *)(((char *)memory) + total_size);
}


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

x86 assembly (clang, -O2):
<bread>:
push   %r14
push   %rbx
push   %rax
mov    %rdx,%rbx
mov    %rdi,%r14
imul   %rcx,%rbx
mov    %rsi,%rdi
mov    %r14,%rsi
mov    %rbx,%rdx
call   1030 <memcpy@plt>
add    %r14,%rbx
mov    %rbx,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

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

LLVM IR (-O2):
define i8* @bread(i8* %0, i8* %1, i64 %2, i64 %3) {
%5 = mul i64 %3, %2
%6 = tail call i32 @memcpy(i8* %1, i8* %0, i64 %5)
%7 = getelementptr inbounds i8, i8* %0, i64 %5
ret i8* %7
}
/* Variables and functions */
int bin8_to_s16(unsigned char *);
void bin8_to_ns16(unsigned char *a, int *data, int n) {
  for (int i = 0; i < n; ++i) {
    data[i] = bin8_to_s16(&a[i * 2]);
  }
}


x86 assembly (clang, -O0):
<bin8_to_ns16>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
movl   $0x0,-0x18(%rbp)
mov    -0x18(%rbp),%eax
cmp    -0x14(%rbp),%eax
jge    1165 <bin8_to_ns16+0x55>
mov    -0x8(%rbp),%rdi
mov    -0x18(%rbp),%eax
shl    $0x1,%eax
cltq
add    %rax,%rdi
call   1030 <bin8_to_s16@plt>
mov    %eax,%edx
mov    -0x10(%rbp),%rax
movslq -0x18(%rbp),%rcx
mov    %edx,(%rax,%rcx,4)
mov    -0x18(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x18(%rbp)
jmp    112a <bin8_to_ns16+0x1a>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<bin8_to_ns16>:
push   %r15
push   %r14
push   %r12
push   %rbx
push   %rax
test   %edx,%edx
jle    1146 <bin8_to_ns16+0x36>
mov    %rsi,%r14
mov    %rdi,%r15
mov    %edx,%r12d
add    %r12,%r12
xor    %ebx,%ebx
nopw   0x0(%rax,%rax,1)
lea    (%r15,%rbx,1),%rdi
call   1030 <bin8_to_s16@plt>
mov    %eax,(%r14,%rbx,2)
add    $0x2,%rbx
cmp    %rbx,%r12
jne    1130 <bin8_to_ns16+0x20>
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
ret

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

LLVM IR (-O2):
define void @bin8_to_ns16(i8* %0, i32* nocapture writeonly %1, i32 %2) {
%4 = icmp sgt i32 %2, 0
br i1 %4, label %5, label %7
5: ; preds = %3
%6 = zext i32 %2 to i64
br label %8
7: ; preds = %8, %3
ret void
8: ; preds = %5, %8
%9 = phi i64 [ 0, %5 ], [ %14, %8 ]
%10 = shl nuw nsw i64 %9, 1
%11 = getelementptr inbounds i8, i8* %0, i64 %10
%12 = tail call i32 @bin8_to_s16(i8* %11)
%13 = getelementptr inbounds i32, i32* %1, i64 %9
store i32 %12, i32* %13
%14 = add nuw nsw i64 %9, 1
%15 = icmp eq i64 %14, %6
br i1 %15, label %7, label %8
}
void SSI3_Handler(void) {
  while (1) {
  }
}


x86 assembly (clang, -O0):
<SSI3_Handler>:
push   %rbp
mov    %rsp,%rbp
jmp    1109 <SSI3_Handler+0x9>
jmp    1109 <SSI3_Handler+0x9>

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

LLVM IR (-O0):
define void @SSI3_Handler() {
br label %1
1: ; preds = %0, %1
br label %1
}

LLVM IR (-O2):
define void @SSI3_Handler() {
br label %1
1: ; preds = %0, %1
br label %1
}
int compare_results(unsigned char *res1, unsigned char *res2, int length) {
  int i;
  for (i = 0; i < length; i++) {
    if (res1[i] != res2[i]) {
      return 0;
    }
  }
  return 1;
}


x86 assembly (clang, -O0):
<compare_results>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    %edx,-0x1c(%rbp)
movl   $0x0,-0x20(%rbp)
mov    -0x20(%rbp),%eax
cmp    -0x1c(%rbp),%eax
jge    1161 <compare_results+0x61>
mov    -0x10(%rbp),%rax
movslq -0x20(%rbp),%rcx
movzbl (%rax,%rcx,1),%eax
mov    -0x18(%rbp),%rcx
movslq -0x20(%rbp),%rdx
movzbl (%rcx,%rdx,1),%ecx
cmp    %ecx,%eax
je     114e <compare_results+0x4e>
movl   $0x0,-0x4(%rbp)
jmp    1168 <compare_results+0x68>
jmp    1153 <compare_results+0x53>
mov    -0x20(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x20(%rbp)
jmp    1116 <compare_results+0x16>
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<compare_results>:
mov    $0x1,%eax
test   %edx,%edx
jle    1122 <compare_results+0x22>
mov    %edx,%r8d
xor    %edx,%edx
xchg   %ax,%ax
movzbl (%rdi,%rdx,1),%ecx
cmp    (%rsi,%rdx,1),%cl
jne    1123 <compare_results+0x23>
add    $0x1,%rdx
cmp    %rdx,%r8
jne    1110 <compare_results+0x10>
ret
xor    %eax,%eax
ret

LLVM IR (-O0):
define i32 @compare_results(i8* %0, i8* %1, i32 %2) {
%4 = alloca i32
%5 = alloca i8*
%6 = alloca i8*
%7 = alloca i32
%8 = alloca i32
store i8* %0, i8** %5
store i8* %1, i8** %6
store i32 %2, i32* %7
store i32 0, i32* %8
br label %9
9: ; preds = %29, %3
%10 = load i32, i32* %8
%11 = load i32, i32* %7
%12 = icmp slt i32 %10, %11
br i1 %12, label %13, label %32
13: ; preds = %9
%14 = load i8*, i8** %5
%15 = load i32, i32* %8
%16 = sext i32 %15 to i64
%17 = getelementptr inbounds i8, i8* %14, i64 %16
%18 = load i8, i8* %17
%19 = zext i8 %18 to i32
%20 = load i8*, i8** %6
%21 = load i32, i32* %8
%22 = sext i32 %21 to i64
%23 = getelementptr inbounds i8, i8* %20, i64 %22
%24 = load i8, i8* %23
%25 = zext i8 %24 to i32
%26 = icmp ne i32 %19, %25
br i1 %26, label %27, label %28
27: ; preds = %13
store i32 0, i32* %4
br label %33
28: ; preds = %13
br label %29
29: ; preds = %28
%30 = load i32, i32* %8
%31 = add nsw i32 %30, 1
store i32 %31, i32* %8
br label %9
32: ; preds = %9
store i32 1, i32* %4
br label %33
33: ; preds = %32, %27
%34 = load i32, i32* %4
ret i32 %34
}

LLVM IR (-O2):
define i32 @compare_results(i8* nocapture %0, i8* nocapture %1, i32 %2) {
%4 = icmp sgt i32 %2, 0
br i1 %4, label %5, label %17
5: ; preds = %3
%6 = zext i32 %2 to i64
br label %9
7: ; preds = %9
%8 = icmp eq i64 %16, %6
br i1 %8, label %17, label %9
9: ; preds = %5, %7
%10 = phi i64 [ 0, %5 ], [ %16, %7 ]
%11 = getelementptr inbounds i8, i8* %0, i64 %10
%12 = load i8, i8* %11
%13 = getelementptr inbounds i8, i8* %1, i64 %10
%14 = load i8, i8* %13
%15 = icmp eq i8 %12, %14
%16 = add nuw nsw i64 %10, 1
br i1 %15, label %7, label %17
17: ; preds = %9, %7, %3
%18 = phi i32 [ 1, %3 ], [ 1, %7 ], [ 0, %9 ]
ret i32 %18
}
double x264_clip3f(double v, double f_min, double f_max) {
  return ((v < f_min) ? f_min : (v > f_max) ? f_max : v);
}


x86 assembly (clang, -O0):
<x264_clip3f>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  %xmm2,-0x18(%rbp)
movsd  -0x8(%rbp),%xmm1
movsd  -0x10(%rbp),%xmm0
ucomisd %xmm1,%xmm0
jbe    1136 <x264_clip3f+0x36>
movsd  -0x10(%rbp),%xmm0
movsd  %xmm0,-0x20(%rbp)
jmp    1169 <x264_clip3f+0x69>
movsd  -0x8(%rbp),%xmm0
ucomisd -0x18(%rbp),%xmm0
jbe    1155 <x264_clip3f+0x55>
movsd  -0x18(%rbp),%xmm0
movsd  %xmm0,-0x28(%rbp)
jmp    115f <x264_clip3f+0x5f>
movsd  -0x8(%rbp),%xmm0
movsd  %xmm0,-0x28(%rbp)
movsd  -0x28(%rbp),%xmm0
movsd  %xmm0,-0x20(%rbp)
movsd  -0x20(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<x264_clip3f>:
minsd  %xmm0,%xmm2
cmpltsd %xmm1,%xmm0
movapd %xmm0,%xmm3
andnpd %xmm2,%xmm3
andpd  %xmm1,%xmm0
orpd   %xmm3,%xmm0
ret

LLVM IR (-O0):
define double @x264_clip3f(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* %5
%9 = fcmp olt double %7, %8
br i1 %9, label %10, label %12
10: ; preds = %3
%11 = load double, double* %5
br label %22
12: ; preds = %3
%13 = load double, double* %4
%14 = load double, double* %6
%15 = fcmp ogt double %13, %14
br i1 %15, label %16, label %18
16: ; preds = %12
%17 = load double, double* %6
br label %20
18: ; preds = %12
%19 = load double, double* %4
br label %20
20: ; preds = %18, %16
%21 = phi double [ %17, %16 ], [ %19, %18 ]
br label %22
22: ; preds = %20, %10
%23 = phi double [ %11, %10 ], [ %21, %20 ]
ret double %23
}

LLVM IR (-O2):
define double @x264_clip3f(double %0, double %1, double %2) {
%4 = fcmp olt double %0, %1
%5 = fcmp ogt double %0, %2
%6 = select i1 %5, double %2, double %0
%7 = select i1 %4, double %1, double %6
ret double %7
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int, int);
void underline(char on) { printf("%c[%dm", 0x1B, on != 0 ? 4 : 24); }


x86 assembly (clang, -O0):
<underline>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movsbl -0x1(%rbp),%ecx
mov    $0x18,%edx
mov    $0x4,%eax
cmp    $0x0,%ecx
cmovne %eax,%edx
lea    0xec7(%rip),%rdi
mov    $0x1b,%esi
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<underline>:
test   %dil,%dil
mov    $0x18,%eax
mov    $0x4,%edx
cmove  %eax,%edx
lea    0xed9(%rip),%rdi
mov    $0x1b,%esi
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [7 x i8] c"%c[%dm\00"
define void @underline(i8 signext %0) {
%2 = alloca i8
store i8 %0, i8* %2
%3 = load i8, i8* %2
%4 = sext i8 %3 to i32
%5 = icmp ne i32 %4, 0
%6 = zext i1 %5 to i64
%7 = select i1 %5, i32 4, i32 24
%8 = call i32 @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i32 27, i32 %7)
ret void
}

LLVM IR (-O2):
@.str = [7 x i8] c"%c[%dm\00"
define void @underline(i8 signext %0) {
%2 = icmp eq i8 %0, 0
%3 = select i1 %2, i32 24, i32 4
%4 = tail call i32 @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i32 27, i32 %3)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ assert_or_panic(int);
void c_f32(float x) { assert_or_panic(x == 12.34f); }


x86 assembly (clang, -O0):
<c_f32>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movss  %xmm0,-0x4(%rbp)
movss  -0x4(%rbp),%xmm0
movss  0xed6(%rip),%xmm1
ucomiss %xmm1,%xmm0
sete   %al
setnp  %cl
and    %cl,%al
and    $0x1,%al
movzbl %al,%edi
call   1030 <assert_or_panic@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<c_f32>:
cmpeqss 0xee7(%rip),%xmm0
movd   %xmm0,%edi
and    $0x1,%edi
jmp    1030 <assert_or_panic@plt>

LLVM IR (-O0):
define void @c_f32(float %0) {
%2 = alloca float
store float %0, float* %2
%3 = load float, float* %2
%4 = fcmp oeq float %3, 0x4028AE1480000000
%5 = zext i1 %4 to i32
%6 = call i32 @assert_or_panic(i32 %5)
ret void
}

LLVM IR (-O2):
define void @c_f32(float %0) {
%2 = fcmp oeq float %0, 0x4028AE1480000000
%3 = zext i1 %2 to i32
%4 = tail call i32 @assert_or_panic(i32 %3)
ret void
}
/* Variables and functions */
char asin(char);
char internal_asin_b(char value) { return asin(value); }


x86 assembly (clang, -O0):
<internal_asin_b>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movsbl -0x1(%rbp),%edi
call   1030 <asin@plt>
movsbl %al,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<internal_asin_b>:
jmp    1030 <asin@plt>

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

LLVM IR (-O2):
define signext i8 @internal_asin_b(i8 signext %0) {
%2 = tail call signext i8 @asin(i8 signext %0)
ret i8 %2
}
/* Variables and functions */
scalar_t__ strlen(char *);
void setDefaultKey(char *key, int *keyIsNotAlpha) {
  if (*keyIsNotAlpha == (int)strlen(key)) {
    key[0] = 'A';
    key[1] = '\0';
  }
}


x86 assembly (clang, -O0):
<setDefaultKey>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    (%rax),%eax
mov    %eax,-0x14(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <strlen@plt>
mov    %rax,%rcx
mov    -0x14(%rbp),%eax
cmp    %ecx,%eax
jne    114f <setDefaultKey+0x3f>
mov    -0x8(%rbp),%rax
movb   $0x41,(%rax)
mov    -0x8(%rbp),%rax
movb   $0x0,0x1(%rax)
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<setDefaultKey>:
push   %rbp
push   %rbx
push   %rax
mov    %rdi,%rbx
mov    (%rsi),%ebp
call   1030 <strlen@plt>
cmp    %eax,%ebp
jne    1126 <setDefaultKey+0x16>
movw   $0x41,(%rbx)
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

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

LLVM IR (-O2):
define void @setDefaultKey(i8* nocapture %0, i32* nocapture %1) {
%3 = load i32, i32* %1
%4 = tail call i64 @strlen(i8* dereferenceable(1) %0)
%5 = trunc i64 %4 to i32
%6 = icmp eq i32 %3, %5
br i1 %6, label %7, label %9
7: ; preds = %2
store i8 65, i8* %0
%8 = getelementptr inbounds i8, i8* %0, i64 1
store i8 0, i8* %8
br label %9
9: ; preds = %7, %2
ret void
}
/* Variables and functions */
int /*<<< orphan*/ button_key();
int /*<<< orphan*/ power_key();
int main(void) {
  power_key();
  button_key();
  return 0;
}


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

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

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

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @power_key()
%2 = tail call i32 (...) @button_key()
ret i32 0
}
/* Variables and functions */
int MV_GetVolume();
int FX_GetVolume(void) {
  int volume;
  volume = MV_GetVolume();
  return (volume);
}


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

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

LLVM IR (-O0):
define i32 @FX_GetVolume() {
%1 = alloca i32
%2 = call i32 (...) @MV_GetVolume()
store i32 %2, i32* %1
%3 = load i32, i32* %1
ret i32 %3
}

LLVM IR (-O2):
define i32 @FX_GetVolume() {
%1 = tail call i32 (...) @MV_GetVolume()
ret i32 %1
}
/* Type definitions */
struct tm {
  int dummy;
};

/* Variables and functions */
long Timegm(struct tm *);
long int timegm(struct tm *tm) { return Timegm(tm); }


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

x86 assembly (clang, -O2):
<timegm>:
jmp    1030 <Timegm@plt>

LLVM IR (-O0):
%struct.tm = type { i32 }
define i64 @timegm(%struct.tm* %0) {
%2 = alloca %struct.tm*
store %struct.tm* %0, %struct.tm** %2
%3 = load %struct.tm*, %struct.tm** %2
%4 = call i64 @Timegm(%struct.tm* %3)
ret i64 %4
}

LLVM IR (-O2):
%struct.tm = type { i32 }
define i64 @timegm(%struct.tm* %0) {
%2 = tail call i64 @Timegm(%struct.tm* %0)
ret i64 %2
}
void rte_mb(void) {}


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

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

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

LLVM IR (-O2):
define void @rte_mb() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ C67_asm(char *, int /*<<< orphan*/, int, int);
void C67_INTDP(int r, int v) { C67_asm("INTDP.L", 0, r, v); }


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

x86 assembly (clang, -O2):
<C67_INTDP>:
mov    %esi,%ecx
mov    %edi,%edx
lea    0xee5(%rip),%rdi
xor    %esi,%esi
jmp    1030 <C67_asm@plt>

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

LLVM IR (-O2):
@.str = [8 x i8] c"INTDP.L\00"
define void @C67_INTDP(i32 %0, i32 %1) {
%3 = tail call i32 @C67_asm(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i32 0, i32 %0, i32 %1)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ pelexp_(double *, double *);
void cpelexp(double *xmom, double *para) { pelexp_(xmom, para); }


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

x86 assembly (clang, -O2):
<cpelexp>:
jmp    1030 <pelexp_@plt>

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

LLVM IR (-O2):
define void @cpelexp(double* %0, double* %1) {
%3 = tail call i32 @pelexp_(double* %0, double* %1)
ret void
}
int comparator(const void *a, const void *b) { return *(int *)a - *(int *)b; }


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

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

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

LLVM IR (-O2):
define i32 @comparator(i8* nocapture %0, i8* nocapture %1) {
%3 = bitcast i8* %0 to i32*
%4 = load i32, i32* %3
%5 = bitcast i8* %1 to i32*
%6 = load i32, i32* %5
%7 = sub nsw i32 %4, %6
ret i32 %7
}
/* Type definitions */
struct timespec {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ assert(struct timespec *);
int clock_gettime(int /*<<< orphan*/, struct timespec *);
int /*<<< orphan*/ get_valid_clock_id();
int qgis_timer_start(struct timespec *timer) {
  assert(timer);
  int retval = clock_gettime(get_valid_clock_id(), timer);
  return retval;
}


x86 assembly (clang, -O0):
<qgis_timer_start>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1050 <assert@plt>
mov    $0x0,%al
call   1030 <get_valid_clock_id@plt>
mov    %eax,%edi
mov    -0x8(%rbp),%rsi
call   1040 <clock_gettime@plt>
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<qgis_timer_start>:
push   %rbx
mov    %rdi,%rbx
call   1050 <assert@plt>
xor    %eax,%eax
call   1030 <get_valid_clock_id@plt>
mov    %eax,%edi
mov    %rbx,%rsi
pop    %rbx
jmp    1040 <clock_gettime@plt>

LLVM IR (-O0):
%struct.timespec = type { i32 }
define i32 @qgis_timer_start(%struct.timespec* %0) {
%2 = alloca %struct.timespec*
%3 = alloca i32
store %struct.timespec* %0, %struct.timespec** %2
%4 = load %struct.timespec*, %struct.timespec** %2
%5 = call i32 @assert(%struct.timespec* %4)
%6 = call i32 (...) @get_valid_clock_id()
%7 = load %struct.timespec*, %struct.timespec** %2
%8 = call i32 @clock_gettime(i32 %6, %struct.timespec* %7)
store i32 %8, i32* %3
%9 = load i32, i32* %3
ret i32 %9
}

LLVM IR (-O2):
%struct.timespec = type { i32 }
define i32 @qgis_timer_start(%struct.timespec* %0) {
%2 = tail call i32 @assert(%struct.timespec* %0)
%3 = tail call i32 (...) @get_valid_clock_id()
%4 = tail call i32 @clock_gettime(i32 %3, %struct.timespec* %0)
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
int /*<<< orphan*/ stderr;
char *strdup(char const *);
__attribute__((__unused__)) char *xstrdup(const char *str) {
  char *value;
  if (!str)
    return (NULL);
  value = strdup(str);
  if (value)
    return (value);
  fprintf(stderr, "out of memory\n");
  exit(1);
}


x86 assembly (clang, -O0):
<xstrdup>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
jne    1154 <xstrdup+0x24>
movq   $0x0,-0x8(%rbp)
jmp    1198 <xstrdup+0x68>
mov    -0x10(%rbp),%rdi
call   1050 <strdup@plt>
mov    %rax,-0x18(%rbp)
cmpq   $0x0,-0x18(%rbp)
je     1179 <xstrdup+0x49>
mov    -0x18(%rbp),%rax
mov    %rax,-0x8(%rbp)
jmp    1198 <xstrdup+0x68>
mov    0x2e60(%rip),%rax
mov    (%rax),%edi
lea    0xe77(%rip),%rsi
call   1030 <fprintf@plt>
mov    $0x1,%edi
call   1040 <exit@plt>
mov    -0x8(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<xstrdup>:
push   %rax
test   %rdi,%rdi
je     1142 <xstrdup+0x12>
call   1050 <strdup@plt>
test   %rax,%rax
je     1146 <xstrdup+0x16>
pop    %rcx
ret
xor    %eax,%eax
pop    %rcx
ret
mov    0x2e93(%rip),%rax
mov    (%rax),%edi
lea    0xeaa(%rip),%rsi
call   1030 <fprintf@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [15 x i8] c"out of memory\0A\00"
define i8* @xstrdup(i8* %0) {
%2 = alloca i8*
%3 = alloca i8*
%4 = alloca i8*
store i8* %0, i8** %3
%5 = load i8*, i8** %3
%6 = icmp ne i8* %5, null
br i1 %6, label %8, label %7
7: ; preds = %1
store i8* null, i8** %2
br label %19
8: ; preds = %1
%9 = load i8*, i8** %3
%10 = call i8* @strdup(i8* %9)
store i8* %10, i8** %4
%11 = load i8*, i8** %4
%12 = icmp ne i8* %11, null
br i1 %12, label %13, label %15
13: ; preds = %8
%14 = load i8*, i8** %4
store i8* %14, i8** %2
br label %19
15: ; preds = %8
%16 = load i32, i32* @stderr
%17 = call i32 @fprintf(i32 %16, i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0))
%18 = call i32 @exit(i32 1)
unreachable
19: ; preds = %13, %7
%20 = load i8*, i8** %2
ret i8* %20
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [15 x i8] c"out of memory\0A\00"
define noalias i8* @xstrdup(i8* %0) {
%2 = icmp eq i8* %0, null
br i1 %2, label %10, label %3
3: ; preds = %1
%4 = tail call i8* @strdup(i8* %0)
%5 = icmp eq i8* %4, null
br i1 %5, label %6, label %10
6: ; preds = %3
%7 = load i32, i32* @stderr
%8 = tail call i32 @fprintf(i32 %7, i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0))
%9 = tail call i32 @exit(i32 1)
unreachable
10: ; preds = %3, %1
%11 = phi i8* [ null, %1 ], [ %4, %3 ]
ret i8* %11
}
/* Variables and functions */
int /*<<< orphan*/ emsg(char *);
void badcmd() { emsg("Unrecognized command"); }


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

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

LLVM IR (-O0):
@.str = [21 x i8] c"Unrecognized command\00"
define void @badcmd() {
%1 = call i32 @emsg(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [21 x i8] c"Unrecognized command\00"
define void @badcmd() {
%1 = tail call i32 @emsg(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str, i64 0, i64 0))
ret void
}
double logic_le(double a, double b) { return a <= b; }


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

x86 assembly (clang, -O2):
<logic_le>:
cmplesd %xmm1,%xmm0
movsd  0xef3(%rip),%xmm1
andpd  %xmm1,%xmm0
ret

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

LLVM IR (-O2):
define double @logic_le(double %0, double %1) {
%3 = fcmp ole double %0, %1
%4 = uitofp i1 %3 to double
ret double %4
}
int comparator(const void *p1, const void *p2) {
  int i1 = *(const int *)p1;
  int i2 = *(const int *)p2;
  if (i1 < i2)
    return -1;
  if (i1 > i2)
    return 1;
  return 0;
}


x86 assembly (clang, -O0):
<comparator>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    -0x10(%rbp),%rax
mov    (%rax),%eax
mov    %eax,-0x1c(%rbp)
mov    -0x18(%rbp),%rax
mov    (%rax),%eax
mov    %eax,-0x20(%rbp)
mov    -0x1c(%rbp),%eax
cmp    -0x20(%rbp),%eax
jge    1136 <comparator+0x36>
movl   $0xffffffff,-0x4(%rbp)
jmp    1155 <comparator+0x55>
mov    -0x1c(%rbp),%eax
cmp    -0x20(%rbp),%eax
jle    114e <comparator+0x4e>
movl   $0x1,-0x4(%rbp)
jmp    1155 <comparator+0x55>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<comparator>:
mov    (%rdi),%eax
xor    %ecx,%ecx
cmp    (%rsi),%eax
setg   %cl
mov    $0xffffffff,%eax
cmovge %ecx,%eax
ret

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

LLVM IR (-O2):
define i32 @comparator(i8* nocapture %0, i8* nocapture %1) {
%3 = bitcast i8* %0 to i32*
%4 = load i32, i32* %3
%5 = bitcast i8* %1 to i32*
%6 = load i32, i32* %5
%7 = icmp slt i32 %4, %6
%8 = icmp sgt i32 %4, %6
%9 = zext i1 %8 to i32
%10 = select i1 %7, i32 -1, i32 %9
ret i32 %10
}