xunge/DecIR huggingface dataset:
int cmpint_search(const void *key, const void *x) {
  if (*(unsigned int *)key == *(unsigned int *)x) {
    return 0;
  } else {
    if (*(unsigned int *)key > *(unsigned int *)x)
      return 1;
    else
      return -1;
  }
}


x86 assembly (clang, -O0):
<cmpint_search>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    -0x10(%rbp),%rax
mov    (%rax),%eax
mov    -0x18(%rbp),%rcx
cmp    (%rcx),%eax
jne    112a <cmpint_search+0x2a>
movl   $0x0,-0x4(%rbp)
jmp    114f <cmpint_search+0x4f>
mov    -0x10(%rbp),%rax
mov    (%rax),%eax
mov    -0x18(%rbp),%rcx
cmp    (%rcx),%eax
jbe    1148 <cmpint_search+0x48>
movl   $0x1,-0x4(%rbp)
jmp    114f <cmpint_search+0x4f>
movl   $0xffffffff,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<cmpint_search>:
mov    (%rdi),%eax
xor    %ecx,%ecx
xor    %edx,%edx
cmp    (%rsi),%eax
seta   %dl
lea    -0x1(%rdx,%rdx,1),%eax
cmove  %ecx,%eax
ret

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

LLVM IR (-O2):
define i32 @cmpint_search(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 eq i32 %4, %6
%8 = icmp ugt i32 %4, %6
%9 = select i1 %8, i32 1, i32 -1
%10 = select i1 %7, i32 0, i32 %9
ret i32 %10
}
/* Variables and functions */
scalar_t__ ft_isuppercase(int);
int ft_tolower(int c) {
  if (ft_isuppercase(c))
    c += 32;
  return (c);
}


x86 assembly (clang, -O0):
<ft_tolower>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
call   1030 <ft_isuppercase@plt>
cmp    $0x0,%rax
je     1136 <ft_tolower+0x26>
mov    -0x4(%rbp),%eax
add    $0x20,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ft_tolower>:
push   %rbx
mov    %edi,%ebx
call   1030 <ft_isuppercase@plt>
lea    0x20(%rbx),%ecx
test   %rax,%rax
cmove  %ebx,%ecx
mov    %ecx,%eax
pop    %rbx
ret

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

LLVM IR (-O2):
define i32 @ft_tolower(i32 %0) {
%2 = tail call i64 @ft_isuppercase(i32 %0)
%3 = icmp eq i64 %2, 0
%4 = add nsw i32 %0, 32
%5 = select i1 %3, i32 %0, i32 %4
ret i32 %5
}
int dead_code(int i) {
  if (i) {
    if (!i) {
    }
    for (i = 0; i < 100; ++i) {
    }
    while (--i) {
    }
    do {
    } while (i++ < 75);
    switch (i) {
    case 12:
      return 3;
    case 82:
      return 0;
    default:
      return 89;
    }
  }
  return 2;
}


x86 assembly (clang, -O0):
<dead_code>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
cmpl   $0x0,-0x8(%rbp)
je     11c7 <dead_code+0xc7>
cmpl   $0x0,-0x8(%rbp)
jne    1120 <dead_code+0x20>
jmp    1120 <dead_code+0x20>
movl   $0x0,-0x8(%rbp)
cmpl   $0x64,-0x8(%rbp)
jge    1144 <dead_code+0x44>
jmp    1136 <dead_code+0x36>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1127 <dead_code+0x27>
jmp    1149 <dead_code+0x49>
mov    -0x8(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0x8(%rbp)
cmp    $0x0,%eax
je     1160 <dead_code+0x60>
jmp    1149 <dead_code+0x49>
jmp    1165 <dead_code+0x65>
jmp    116a <dead_code+0x6a>
mov    -0x8(%rbp),%eax
mov    %eax,%ecx
add    $0x1,%ecx
mov    %ecx,-0x8(%rbp)
cmp    $0x4b,%eax
jl     1165 <dead_code+0x65>
mov    -0x8(%rbp),%eax
mov    %eax,-0xc(%rbp)
sub    $0xc,%eax
je     11a3 <dead_code+0xa3>
jmp    1192 <dead_code+0x92>
mov    -0xc(%rbp),%eax
sub    $0x52,%eax
je     11af <dead_code+0xaf>
jmp    11bb <dead_code+0xbb>
movl   $0x3,-0x4(%rbp)
jmp    11ce <dead_code+0xce>
movl   $0x0,-0x4(%rbp)
jmp    11ce <dead_code+0xce>
movl   $0x59,-0x4(%rbp)
jmp    11ce <dead_code+0xce>
movl   $0x2,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<dead_code>:
test   %edi,%edi
mov    $0x2,%ecx
mov    $0x59,%eax
cmove  %ecx,%eax
ret

LLVM IR (-O0):
define i32 @dead_code(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %3
%4 = load i32, i32* %3
%5 = icmp ne i32 %4, 0
br i1 %5, label %6, label %35
6: ; preds = %1
%7 = load i32, i32* %3
%8 = icmp ne i32 %7, 0
br i1 %8, label %10, label %9
9: ; preds = %6
br label %10
10: ; preds = %9, %6
store i32 0, i32* %3
br label %11
11: ; preds = %15, %10
%12 = load i32, i32* %3
%13 = icmp slt i32 %12, 100
br i1 %13, label %14, label %18
14: ; preds = %11
br label %15
15: ; preds = %14
%16 = load i32, i32* %3
%17 = add nsw i32 %16, 1
store i32 %17, i32* %3
br label %11
18: ; preds = %11
br label %19
19: ; preds = %23, %18
%20 = load i32, i32* %3
%21 = add nsw i32 %20, -1
store i32 %21, i32* %3
%22 = icmp ne i32 %21, 0
br i1 %22, label %23, label %24
23: ; preds = %19
br label %19
24: ; preds = %19
br label %25
25: ; preds = %26, %24
br label %26
26: ; preds = %25
%27 = load i32, i32* %3
%28 = add nsw i32 %27, 1
store i32 %28, i32* %3
%29 = icmp slt i32 %27, 75
br i1 %29, label %25, label %30
30: ; preds = %26
%31 = load i32, i32* %3
switch i32 %31, label %34 [
i32 12, label %32
i32 82, label %33
]
32: ; preds = %30
store i32 3, i32* %2
br label %36
33: ; preds = %30
store i32 0, i32* %2
br label %36
34: ; preds = %30
store i32 89, i32* %2
br label %36
35: ; preds = %1
store i32 2, i32* %2
br label %36
36: ; preds = %35, %34, %33, %32
%37 = load i32, i32* %2
ret i32 %37
}

LLVM IR (-O2):
define i32 @dead_code(i32 %0) {
%2 = icmp eq i32 %0, 0
%3 = select i1 %2, i32 2, i32 89
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ getch();
int /*<<< orphan*/ printf(char *, ...);
int /*<<< orphan*/ scanf(char *, int *);
main() {
  int a;
  printf("digite um numero: ");
  scanf("%d", &a);
  int b = a * a;
  printf("seu quadrado eh %d", b);
  getch();
}


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

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

LLVM IR (-O0):
@.str = [19 x i8] c"digite um numero: \00"
@.str.1 = [3 x i8] c"%d\00"
@.str.2 = [19 x i8] c"seu quadrado eh %d\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([19 x i8], [19 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), i32* %1)
%5 = load i32, i32* %1
%6 = load i32, i32* %1
%7 = mul nsw i32 %5, %6
store i32 %7, i32* %2
%8 = load i32, i32* %2
%9 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.2, i64 0, i64 0), i32 %8)
%10 = call i32 (...) @getch()
ret i32 0
}

LLVM IR (-O2):
@.str = [19 x i8] c"digite um numero: \00"
@.str.1 = [3 x i8] c"%d\00"
@.str.2 = [19 x i8] c"seu quadrado eh %d\00"
define i32 @main() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
%3 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([19 x i8], [19 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), i32* %1)
%5 = load i32, i32* %1
%6 = mul nsw i32 %5, %5
%7 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([19 x i8], [19 x i8]* @.str.2, i64 0, i64 0), i32 %6)
%8 = call i32 (...) @getch()
ret i32 0
}
/* Variables and functions */
bool remove_person_at_index(int index) { return true; }


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

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

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

LLVM IR (-O2):
define i32 @remove_person_at_index(i32 %0) {
ret i32 1
}
/* Variables and functions */
int /*<<< orphan*/ debug(char *, ...);
int M33_f(char *s) {
  debug("M33_f(const char *s) is not yet implemented!\n");
  debug("%s\n", s);
  return 1;
}


x86 assembly (clang, -O0):
<M33_f>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
lea    0xedd(%rip),%rdi
mov    $0x0,%al
call   1030 <debug@plt>
mov    -0x8(%rbp),%rsi
lea    0xef9(%rip),%rdi
mov    $0x0,%al
call   1030 <debug@plt>
mov    $0x1,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<M33_f>:
push   %rbx
mov    %rdi,%rbx
lea    0xee5(%rip),%rdi
xor    %eax,%eax
call   1030 <debug@plt>
lea    0xf05(%rip),%rdi
mov    %rbx,%rsi
xor    %eax,%eax
call   1030 <debug@plt>
mov    $0x1,%eax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [46 x i8] c"M33_f(const char *s) is not yet implemented!\0A\00"
@.str.1 = [4 x i8] c"%s\0A\00"
define i32 @M33_f(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = call i32 (i8*, ...) @debug(i8* getelementptr inbounds ([46 x i8], [46 x i8]* @.str, i64 0, i64 0))
%4 = load i8*, i8** %2
%5 = call i32 (i8*, ...) @debug(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i8* %4)
ret i32 1
}

LLVM IR (-O2):
@.str = [46 x i8] c"M33_f(const char *s) is not yet implemented!\0A\00"
@.str.1 = [4 x i8] c"%s\0A\00"
define i32 @M33_f(i8* %0) {
%2 = tail call i32 (i8*, ...) @debug(i8* getelementptr inbounds ([46 x i8], [46 x i8]* @.str, i64 0, i64 0))
%3 = tail call i32 (i8*, ...) @debug(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i8* %0)
ret i32 1
}
/* Variables and functions */
int SIGUSR2;
int /*<<< orphan*/ pthread_exit(int /*<<< orphan*/ *);
void test_sig(int sig) {
  if (sig == SIGUSR2)
    pthread_exit(NULL);
}


x86 assembly (clang, -O0):
<test_sig>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
mov    0x2ebb(%rip),%rcx
cmp    (%rcx),%eax
jne    1136 <test_sig+0x26>
xor    %eax,%eax
mov    %eax,%edi
call   1030 <pthread_exit@plt>
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
@SIGUSR2 = global i32 0
define void @test_sig(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = load i32, i32* @SIGUSR2
%5 = icmp eq i32 %3, %4
br i1 %5, label %6, label %8
6: ; preds = %1
%7 = call i32 @pthread_exit(i32* null)
br label %8
8: ; preds = %6, %1
ret void
}

LLVM IR (-O2):
@SIGUSR2 = global i32 0
define void @test_sig(i32 %0) {
%2 = load i32, i32* @SIGUSR2
%3 = icmp eq i32 %2, %0
br i1 %3, label %4, label %6
4: ; preds = %1
%5 = tail call i32 @pthread_exit(i32* null)
br label %6
6: ; preds = %4, %1
ret void
}
int SbiMmCardSelect(int on) {
  int rc = (1);
  if (on == 1) {
    ;
  } else if (on == 0) {
    ;
  }
  return rc;
}


x86 assembly (clang, -O0):
<SbiMmCardSelect>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
movl   $0x1,-0x8(%rbp)
cmpl   $0x1,-0x4(%rbp)
jne    111d <SbiMmCardSelect+0x1d>
jmp    1131 <SbiMmCardSelect+0x31>
cmpl   $0x0,-0x4(%rbp)
jne    112c <SbiMmCardSelect+0x2c>
jmp    112c <SbiMmCardSelect+0x2c>
jmp    1131 <SbiMmCardSelect+0x31>
mov    -0x8(%rbp),%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @SbiMmCardSelect(i32 %0) {
ret i32 1
}
unsigned short switch_a_roo(unsigned short input) {
  return ((input >> 4) + ((input & 15) << 4));
}


x86 assembly (clang, -O0):
<switch_a_roo>:
push   %rbp
mov    %rsp,%rbp
mov    %di,%ax
mov    %ax,-0x2(%rbp)
movzwl -0x2(%rbp),%eax
sar    $0x4,%eax
movzwl -0x2(%rbp),%ecx
and    $0xf,%ecx
shl    $0x4,%ecx
add    %ecx,%eax
movzwl %ax,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<switch_a_roo>:
mov    %edi,%ecx
shr    $0x4,%ecx
shl    $0x4,%edi
movzbl %dil,%eax
add    %ecx,%eax
ret

LLVM IR (-O0):
define zeroext i16 @switch_a_roo(i16 zeroext %0) {
%2 = alloca i16
store i16 %0, i16* %2
%3 = load i16, i16* %2
%4 = zext i16 %3 to i32
%5 = ashr i32 %4, 4
%6 = load i16, i16* %2
%7 = zext i16 %6 to i32
%8 = and i32 %7, 15
%9 = shl i32 %8, 4
%10 = add nsw i32 %5, %9
%11 = trunc i32 %10 to i16
ret i16 %11
}

LLVM IR (-O2):
define zeroext i16 @switch_a_roo(i16 zeroext %0) {
%2 = lshr i16 %0, 4
%3 = shl i16 %0, 4
%4 = and i16 %3, 240
%5 = add nuw nsw i16 %4, %2
ret i16 %5
}
/* Variables and functions */
int /*<<< orphan*/ memset(void *, int /*<<< orphan*/, size_t);
void *ZnoAllocClear(size_t len, void *p, void *(*init)(void *)) {
  memset(p, 0, len);
  if (init)
    init(p);
  return p;
}


x86 assembly (clang, -O0):
<ZnoAllocClear>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x8(%rbp),%rdx
xor    %esi,%esi
call   1030 <memset@plt>
cmpq   $0x0,-0x18(%rbp)
je     1148 <ZnoAllocClear+0x38>
mov    -0x18(%rbp),%rax
mov    -0x10(%rbp),%rdi
call   *%rax
mov    -0x10(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ZnoAllocClear>:
push   %r14
push   %rbx
push   %rax
mov    %rdx,%r14
mov    %rsi,%rbx
mov    %rdi,%rdx
mov    %rsi,%rdi
xor    %esi,%esi
call   1030 <memset@plt>
test   %r14,%r14
je     1132 <ZnoAllocClear+0x22>
mov    %rbx,%rdi
call   *%r14
mov    %rbx,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

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

LLVM IR (-O2):
define i8* @ZnoAllocClear(i64 %0, i8* returned %1, i8* (i8*)* %2) {
%4 = tail call i32 @memset(i8* %1, i32 0, i64 %0)
%5 = icmp eq i8* (i8*)* %2, null
br i1 %5, label %8, label %6
6: ; preds = %3
%7 = tail call i8* %2(i8* %1)
br label %8
8: ; preds = %6, %3
ret i8* %1
}
/* Variables and functions */
int /*<<< orphan*/ GetLine(char *, int);
int /*<<< orphan*/ printf(char *, char *);
int main(void) {
  char s[1024];
  GetLine(s, 1024);
  printf("%s", s);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x410,%rsp
movl   $0x0,-0x4(%rbp)
lea    -0x410(%rbp),%rdi
mov    $0x400,%esi
call   1030 <GetLine@plt>
lea    -0x410(%rbp),%rsi
lea    0xeaf(%rip),%rdi
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x410,%rsp
pop    %rbp
ret

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

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

LLVM IR (-O2):
@.str = [3 x i8] c"%s\00"
define i32 @main() {
%1 = alloca [1024 x i8]
%2 = getelementptr inbounds [1024 x i8], [1024 x i8]* %1, i64 0, i64 0
%3 = call i32 @GetLine(i8* %2, i32 1024)
%4 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* %2)
ret i32 0
}
int etypesw2(etype)
int etype;
{
  switch (etype) {
  case 32:
    return 1;
  default:
    return 0;
  }
}


x86 assembly (clang, -O0):
<etypesw2>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
mov    -0x8(%rbp),%eax
sub    $0x20,%eax
jne    1124 <etypesw2+0x24>
jmp    1118 <etypesw2+0x18>
movl   $0x1,-0x4(%rbp)
jmp    112b <etypesw2+0x2b>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<etypesw2>:
xor    %eax,%eax
cmp    $0x20,%edi
sete   %al
ret

LLVM IR (-O0):
define i32 @etypesw2(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %3
%4 = load i32, i32* %3
switch i32 %4, label %6 [
i32 32, label %5
]
5: ; preds = %1
store i32 1, i32* %2
br label %7
6: ; preds = %1
store i32 0, i32* %2
br label %7
7: ; preds = %6, %5
%8 = load i32, i32* %2
ret i32 %8
}

LLVM IR (-O2):
define i32 @etypesw2(i32 %0) {
%2 = icmp eq i32 %0, 32
%3 = zext i1 %2 to i32
ret i32 %3
}
int func(void) {
  int n = 3;
  int m = 5;
  n = (m--);
  return 0;
}


x86 assembly (clang, -O0):
<func>:
push   %rbp
mov    %rsp,%rbp
movl   $0x3,-0x4(%rbp)
movl   $0x5,-0x8(%rbp)
mov    -0x8(%rbp),%eax
mov    %eax,%ecx
add    $0xffffffff,%ecx
mov    %ecx,-0x8(%rbp)
mov    %eax,-0x4(%rbp)
xor    %eax,%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @func() {
ret i32 0
}
void int_copy(int *__restrict__ dest, int const *__restrict__ src) {
  *dest = *src;
}


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

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

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

LLVM IR (-O2):
define void @int_copy(i32* noalias nocapture writeonly %0, i32* noalias nocapture %1) {
%3 = load i32, i32* %1
store i32 %3, i32* %0
ret void
}
/* Variables and functions */
void *mkd_string(char *, int, int);
void *mkd_string_wrapper(char *buf, int len, int flags) {
  return mkd_string(buf, len, flags);
}


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

x86 assembly (clang, -O2):
<mkd_string_wrapper>:
jmp    1030 <mkd_string@plt>

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

LLVM IR (-O2):
define i8* @mkd_string_wrapper(i8* %0, i32 %1, i32 %2) {
%4 = tail call i8* @mkd_string(i8* %0, i32 %1, i32 %2)
ret i8* %4
}
/* Variables and functions */
scalar_t__ in_class(int, char *);
scalar_t__ isdigit(int);
int in_hex_digit_class(int c) {
  return isdigit(c) || in_class(c, "abcdefABCDEF");
}


x86 assembly (clang, -O0):
<in_hex_digit_class>:
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    115e <in_hex_digit_class+0x3e>
mov    -0x4(%rbp),%edi
lea    0xeb1(%rip),%rsi
call   1040 <in_class@plt>
cmp    $0x0,%rax
setne  %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):
<in_hex_digit_class>:
push   %rbx
mov    %edi,%ebx
call   1030 <isdigit@plt>
mov    %rax,%rcx
mov    $0x1,%eax
test   %rcx,%rcx
je     1137 <in_hex_digit_class+0x17>
pop    %rbx
ret
lea    0xec2(%rip),%rsi
mov    %ebx,%edi
call   1040 <in_class@plt>
mov    %rax,%rcx
xor    %eax,%eax
test   %rcx,%rcx
setne  %al
pop    %rbx
ret

LLVM IR (-O0):
@.str = [13 x i8] c"abcdefABCDEF\00"
define i32 @in_hex_digit_class(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 %10, label %6
6: ; preds = %1
%7 = load i32, i32* %2
%8 = call i64 @in_class(i32 %7, i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0))
%9 = icmp ne i64 %8, 0
br label %10
10: ; preds = %6, %1
%11 = phi i1 [ true, %1 ], [ %9, %6 ]
%12 = zext i1 %11 to i32
ret i32 %12
}

LLVM IR (-O2):
@.str = [13 x i8] c"abcdefABCDEF\00"
define i32 @in_hex_digit_class(i32 %0) {
%2 = tail call i64 @isdigit(i32 %0)
%3 = icmp eq i64 %2, 0
br i1 %3, label %4, label %8
4: ; preds = %1
%5 = tail call i64 @in_class(i32 %0, i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0))
%6 = icmp ne i64 %5, 0
%7 = zext i1 %6 to i32
br label %8
8: ; preds = %4, %1
%9 = phi i32 [ 1, %1 ], [ %7, %4 ]
ret i32 %9
}
OP(dd, c4) { op_c4(); }


x86 assembly (clang, -O0):
<OP>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    $0x0,%al
call   1030 <op_c4@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @OP(i32 %0, i32 %1) {
%3 = tail call i32 (...) @op_c4()
ret i32 undef
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ SEEK_END;
int /*<<< orphan*/ fseek(int /*<<< orphan*/ *, int /*<<< orphan*/,
                         int /*<<< orphan*/);
long ftell(int /*<<< orphan*/ *);
int /*<<< orphan*/ rewind(int /*<<< orphan*/ *);
long get_file_size(FILE *xfile) {
  long size;
  fseek(xfile, 0, SEEK_END);
  size = ftell(xfile);
  rewind(xfile);
  return size;
}


x86 assembly (clang, -O0):
<get_file_size>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
mov    0x2ea1(%rip),%rax
mov    (%rax),%edx
xor    %esi,%esi
call   1050 <fseek@plt>
mov    -0x8(%rbp),%rdi
call   1040 <ftell@plt>
mov    %rax,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <rewind@plt>
mov    -0x10(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_file_size>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%rbx
mov    0x2eaa(%rip),%rax
mov    (%rax),%edx
xor    %esi,%esi
call   1050 <fseek@plt>
mov    %rbx,%rdi
call   1040 <ftell@plt>
mov    %rax,%r14
mov    %rbx,%rdi
call   1030 <rewind@plt>
mov    %r14,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@SEEK_END = global i32 0
define i64 @get_file_size(i32* %0) {
%2 = alloca i32*
%3 = alloca i64
store i32* %0, i32** %2
%4 = load i32*, i32** %2
%5 = load i32, i32* @SEEK_END
%6 = call i32 @fseek(i32* %4, i32 0, i32 %5)
%7 = load i32*, i32** %2
%8 = call i64 @ftell(i32* %7)
store i64 %8, i64* %3
%9 = load i32*, i32** %2
%10 = call i32 @rewind(i32* %9)
%11 = load i64, i64* %3
ret i64 %11
}

LLVM IR (-O2):
@SEEK_END = global i32 0
define i64 @get_file_size(i32* nocapture %0) {
%2 = load i32, i32* @SEEK_END
%3 = tail call i32 @fseek(i32* %0, i32 0, i32 %2)
%4 = tail call i64 @ftell(i32* %0)
%5 = tail call i32 @rewind(i32* %0)
ret i64 %4
}
/* Variables and functions */
int strcmp(char const *, char const *);
int mystrcmp(const char *a, const char *b) {
  return a == b ? 0 : !a ? -1 : !b ? 1 : strcmp(a, b);
}


x86 assembly (clang, -O0):
<mystrcmp>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
cmp    -0x10(%rbp),%rax
jne    1138 <mystrcmp+0x28>
xor    %eax,%eax
mov    %eax,-0x14(%rbp)
jmp    1184 <mystrcmp+0x74>
cmpq   $0x0,-0x8(%rbp)
jne    1150 <mystrcmp+0x40>
mov    $0xffffffff,%eax
mov    %eax,-0x18(%rbp)
jmp    117e <mystrcmp+0x6e>
cmpq   $0x0,-0x10(%rbp)
jne    1168 <mystrcmp+0x58>
mov    $0x1,%eax
mov    %eax,-0x1c(%rbp)
jmp    1178 <mystrcmp+0x68>
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1030 <strcmp@plt>
mov    %eax,-0x1c(%rbp)
mov    -0x1c(%rbp),%eax
mov    %eax,-0x18(%rbp)
mov    -0x18(%rbp),%eax
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<mystrcmp>:
cmp    %rsi,%rdi
je     1124 <mystrcmp+0x14>
test   %rdi,%rdi
je     1127 <mystrcmp+0x17>
test   %rsi,%rsi
je     112d <mystrcmp+0x1d>
jmp    1030 <strcmp@plt>
xor    %eax,%eax
ret
mov    $0xffffffff,%eax
ret
mov    $0x1,%eax
ret

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

LLVM IR (-O2):
define i32 @mystrcmp(i8* %0, i8* %1) {
%3 = icmp eq i8* %0, %1
br i1 %3, label %10, label %4
4: ; preds = %2
%5 = icmp eq i8* %0, null
br i1 %5, label %10, label %6
6: ; preds = %4
%7 = icmp eq i8* %1, null
br i1 %7, label %10, label %8
8: ; preds = %6
%9 = tail call i32 @strcmp(i8* %0, i8* %1)
br label %10
10: ; preds = %4, %6, %8, %2
%11 = phi i32 [ 0, %2 ], [ -1, %4 ], [ %9, %8 ], [ 1, %6 ]
ret i32 %11
}
void nasm_init_malloc_error(void) {}


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

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

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

LLVM IR (-O2):
define void @nasm_init_malloc_error() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ __VERIFIER_nondet_String();
int /*<<< orphan*/ __VERIFIER_nondet_int();
int cstrncmp(int /*<<< orphan*/, int /*<<< orphan*/, int /*<<< orphan*/);
int main() {
  return cstrncmp(__VERIFIER_nondet_String(), __VERIFIER_nondet_String(),
                  __VERIFIER_nondet_int());
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x0,%al
call   1030 <__VERIFIER_nondet_String@plt>
mov    %eax,-0xc(%rbp)
mov    $0x0,%al
call   1030 <__VERIFIER_nondet_String@plt>
mov    %eax,-0x8(%rbp)
mov    $0x0,%al
call   1040 <__VERIFIER_nondet_int@plt>
mov    -0xc(%rbp),%edi
mov    -0x8(%rbp),%esi
mov    %eax,%edx
call   1050 <cstrncmp@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %rbx
push   %rax
xor    %eax,%eax
call   1030 <__VERIFIER_nondet_String@plt>
mov    %eax,%ebx
xor    %eax,%eax
call   1030 <__VERIFIER_nondet_String@plt>
mov    %eax,%ebp
xor    %eax,%eax
call   1040 <__VERIFIER_nondet_int@plt>
mov    %ebx,%edi
mov    %ebp,%esi
mov    %eax,%edx
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    1050 <cstrncmp@plt>

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 (...) @__VERIFIER_nondet_String()
%3 = call i32 (...) @__VERIFIER_nondet_String()
%4 = call i32 (...) @__VERIFIER_nondet_int()
%5 = call i32 @cstrncmp(i32 %2, i32 %3, i32 %4)
ret i32 %5
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @__VERIFIER_nondet_String()
%2 = tail call i32 (...) @__VERIFIER_nondet_String()
%3 = tail call i32 (...) @__VERIFIER_nondet_int()
%4 = tail call i32 @cstrncmp(i32 %1, i32 %2, i32 %3)
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ free(void *);
int unit_destructor(void *a) {
  free(a);
  return 0;
}


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

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

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

LLVM IR (-O2):
define i32 @unit_destructor(i8* nocapture %0) {
%2 = tail call i32 @free(i8* %0)
ret i32 0
}
int test_imm_68uint16_mem(unsigned short *val) {
  return ((*val) & (0x68 << 0)) ? -20 : -40;
}


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

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

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

LLVM IR (-O2):
define i32 @test_imm_68uint16_mem(i16* nocapture %0) {
%2 = load i16, i16* %0
%3 = and i16 %2, 104
%4 = icmp eq i16 %3, 0
%5 = select i1 %4, i32 -40, i32 -20
ret i32 %5
}
/* Type definitions */
typedef int /*<<< orphan*/ RSA;
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ ASN1_ITEM_rptr(int /*<<< orphan*/);
int /*<<< orphan*/ *ASN1_item_d2i_fp(int /*<<< orphan*/, int /*<<< orphan*/ *,
                                     int /*<<< orphan*/ **);
int /*<<< orphan*/ RSAPrivateKey;
RSA *d2i_RSAPrivateKey_fp(FILE *fp, RSA **rsa) {
  return ASN1_item_d2i_fp(ASN1_ITEM_rptr(RSAPrivateKey), fp, rsa);
}


x86 assembly (clang, -O0):
<d2i_RSAPrivateKey_fp>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    0x2eb1(%rip),%rax
mov    (%rax),%edi
call   1030 <ASN1_ITEM_rptr@plt>
mov    %eax,%edi
mov    -0x8(%rbp),%rsi
mov    -0x10(%rbp),%rdx
call   1040 <ASN1_item_d2i_fp@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<d2i_RSAPrivateKey_fp>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%r14
mov    %rdi,%rbx
mov    0x2eb7(%rip),%rax
mov    (%rax),%edi
call   1030 <ASN1_ITEM_rptr@plt>
mov    %eax,%edi
mov    %rbx,%rsi
mov    %r14,%rdx
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1040 <ASN1_item_d2i_fp@plt>

LLVM IR (-O0):
@RSAPrivateKey = global i32 0
define i32* @d2i_RSAPrivateKey_fp(i32* %0, i32** %1) {
%3 = alloca i32*
%4 = alloca i32**
store i32* %0, i32** %3
store i32** %1, i32*** %4
%5 = load i32, i32* @RSAPrivateKey
%6 = call i32 @ASN1_ITEM_rptr(i32 %5)
%7 = load i32*, i32** %3
%8 = load i32**, i32*** %4
%9 = call i32* @ASN1_item_d2i_fp(i32 %6, i32* %7, i32** %8)
ret i32* %9
}

LLVM IR (-O2):
@RSAPrivateKey = global i32 0
define i32* @d2i_RSAPrivateKey_fp(i32* %0, i32** %1) {
%3 = load i32, i32* @RSAPrivateKey
%4 = tail call i32 @ASN1_ITEM_rptr(i32 %3)
%5 = tail call i32* @ASN1_item_d2i_fp(i32 %4, i32* %0, i32** %1)
ret i32* %5
}
int ti_sin_start(double const *options) {
  (void)options;
  return 0;
}


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

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

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

LLVM IR (-O2):
define i32 @ti_sin_start(double* nocapture readnone %0) {
ret i32 0
}
void XdbeGetVisualInfo() {}


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

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

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

LLVM IR (-O2):
define void @XdbeGetVisualInfo() {
ret void
}
/* Variables and functions */
void *malloc(int);
int main(int argc, char **argv) {
  char t = **argv;
  void *p = malloc(16);
  ((char *)p)[16] = t;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    (%rax),%rax
mov    (%rax),%al
mov    %al,-0x11(%rbp)
mov    $0x10,%edi
call   1030 <malloc@plt>
mov    %rax,-0x20(%rbp)
mov    -0x11(%rbp),%cl
mov    -0x20(%rbp),%rax
mov    %cl,0x10(%rax)
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i8**
%5 = alloca i8
%6 = alloca i8*
store i32 %0, i32* %3
store i8** %1, i8*** %4
%7 = load i8**, i8*** %4
%8 = load i8*, i8** %7
%9 = load i8, i8* %8
store i8 %9, i8* %5
%10 = call i8* @malloc(i32 16)
store i8* %10, i8** %6
%11 = load i8, i8* %5
%12 = load i8*, i8** %6
%13 = getelementptr inbounds i8, i8* %12, i64 16
store i8 %11, i8* %13
ret i32 0
}

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture readnone %1) {
ret i32 0
}
void SetField32(unsigned int *A, register unsigned int index,
                register unsigned int x) {
  A[index] = x;
}


x86 assembly (clang, -O0):
<SetField32>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    -0x10(%rbp),%edx
mov    -0x8(%rbp),%rax
mov    -0xc(%rbp),%ecx
mov    %edx,(%rax,%rcx,4)
pop    %rbp
ret

x86 assembly (clang, -O2):
<SetField32>:
mov    %esi,%eax
mov    %edx,(%rdi,%rax,4)
ret

LLVM IR (-O0):
define void @SetField32(i32* %0, i32 %1, i32 %2) {
%4 = alloca i32*
%5 = alloca i32
%6 = alloca i32
store i32* %0, i32** %4
store i32 %1, i32* %5
store i32 %2, i32* %6
%7 = load i32, i32* %6
%8 = load i32*, i32** %4
%9 = load i32, i32* %5
%10 = zext i32 %9 to i64
%11 = getelementptr inbounds i32, i32* %8, i64 %10
store i32 %7, i32* %11
ret void
}

LLVM IR (-O2):
define void @SetField32(i32* nocapture writeonly %0, i32 %1, i32 %2) {
%4 = zext i32 %1 to i64
%5 = getelementptr inbounds i32, i32* %0, i64 %4
store i32 %2, i32* %5
ret void
}
/* Variables and functions */
int /*<<< orphan*/ CMT1_delay_10us(int);
int /*<<< orphan*/ LCD_AQM_wrcmd(int);
void LCD_AQM_locate(int y, int x) {
  int adrs;
  adrs = 0x40 * y + x;
  LCD_AQM_wrcmd(0x80 + adrs);
  CMT1_delay_10us(3);
}


x86 assembly (clang, -O0):
<LCD_AQM_locate>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
shl    $0x6,%eax
add    -0x8(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%edi
add    $0x80,%edi
call   1030 <LCD_AQM_wrcmd@plt>
mov    $0x3,%edi
call   1040 <CMT1_delay_10us@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<LCD_AQM_locate>:
push   %rax
shl    $0x6,%edi
add    %esi,%edi
add    $0x80,%edi
call   1030 <LCD_AQM_wrcmd@plt>
mov    $0x3,%edi
pop    %rax
jmp    1040 <CMT1_delay_10us@plt>

LLVM IR (-O0):
define void @LCD_AQM_locate(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%6 = load i32, i32* %3
%7 = mul nsw i32 64, %6
%8 = load i32, i32* %4
%9 = add nsw i32 %7, %8
store i32 %9, i32* %5
%10 = load i32, i32* %5
%11 = add nsw i32 128, %10
%12 = call i32 @LCD_AQM_wrcmd(i32 %11)
%13 = call i32 @CMT1_delay_10us(i32 3)
ret void
}

LLVM IR (-O2):
define void @LCD_AQM_locate(i32 %0, i32 %1) {
%3 = shl nsw i32 %0, 6
%4 = add i32 %1, 128
%5 = add i32 %4, %3
%6 = tail call i32 @LCD_AQM_wrcmd(i32 %5)
%7 = tail call i32 @CMT1_delay_10us(i32 3)
ret void
}
/* Variables and functions */
int _ada_use_c2phc4c(int, int *, int *, double *, int /*<<< orphan*/);
int padcon_get_standard_hessian_step(double *step) {
  int fail;
  int precision = 0;
  int *b;
  fail = _ada_use_c2phc4c(888, &precision, b, step, 0);
  return fail;
}


x86 assembly (clang, -O0):
<padcon_get_standard_hessian_step>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0x10(%rbp)
mov    -0x18(%rbp),%rdx
mov    -0x8(%rbp),%rcx
mov    $0x378,%edi
lea    -0x10(%rbp),%rsi
xor    %r8d,%r8d
call   1030 <_ada_use_c2phc4c@plt>
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<padcon_get_standard_hessian_step>:
push   %rax
mov    %rdi,%rcx
movl   $0x0,0x4(%rsp)
lea    0x4(%rsp),%rsi
mov    $0x378,%edi
xor    %r8d,%r8d
call   1030 <_ada_use_c2phc4c@plt>
pop    %rcx
ret

LLVM IR (-O0):
define i32 @padcon_get_standard_hessian_step(double* %0) {
%2 = alloca double*
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32*
store double* %0, double** %2
store i32 0, i32* %4
%6 = load i32*, i32** %5
%7 = load double*, double** %2
%8 = call i32 @_ada_use_c2phc4c(i32 888, i32* %4, i32* %6, double* %7, i32 0)
store i32 %8, i32* %3
%9 = load i32, i32* %3
ret i32 %9
}

LLVM IR (-O2):
define i32 @padcon_get_standard_hessian_step(double* %0) {
%2 = alloca i32
%3 = bitcast i32* %2 to i8*
store i32 0, i32* %2
%4 = call i32 @_ada_use_c2phc4c(i32 888, i32* %2, i32* undef, double* %0, i32 0)
ret i32 %4
}
/* Variables and functions */
scalar_t__ isspace(char);
char *malloc(scalar_t__);
int /*<<< orphan*/ strcpy(char *, char *);
scalar_t__ strlen(char *);
char *rmv_spc(char *argstr) {
  char *rstpnt = argstr;
  while (isspace(*argstr))
    argstr++;
  char *tempstr = malloc(strlen(argstr) + 1);
  strcpy(tempstr, argstr);
  argstr = rstpnt;
  return tempstr;
}


x86 assembly (clang, -O0):
<rmv_spc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x8(%rbp),%rax
movsbl (%rax),%edi
call   1050 <isspace@plt>
cmp    $0x0,%rax
je     117b <rmv_spc+0x3b>
mov    -0x8(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x8(%rbp)
jmp    1154 <rmv_spc+0x14>
mov    -0x8(%rbp),%rdi
call   1040 <strlen@plt>
mov    %rax,%rdi
add    $0x1,%rdi
call   1060 <malloc@plt>
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rdi
mov    -0x8(%rbp),%rsi
call   1030 <strcpy@plt>
mov    -0x10(%rbp),%rax
mov    %rax,-0x8(%rbp)
mov    -0x18(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<rmv_spc>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%rbx
add    $0xffffffffffffffff,%rbx
nopl   0x0(%rax,%rax,1)
movsbl 0x1(%rbx),%edi
add    $0x1,%rbx
call   1050 <isspace@plt>
test   %rax,%rax
jne    1150 <rmv_spc+0x10>
mov    %rbx,%rdi
call   1040 <strlen@plt>
lea    0x1(%rax),%rdi
call   1060 <malloc@plt>
mov    %rax,%r14
mov    %rax,%rdi
mov    %rbx,%rsi
call   1030 <strcpy@plt>
mov    %r14,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

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

LLVM IR (-O2):
define i8* @rmv_spc(i8* %0) {
br label %2
2: ; preds = %2, %1
%3 = phi i8* [ %0, %1 ], [ %7, %2 ]
%4 = load i8, i8* %3
%5 = tail call i64 @isspace(i8 signext %4)
%6 = icmp eq i64 %5, 0
%7 = getelementptr inbounds i8, i8* %3, i64 1
br i1 %6, label %8, label %2
8: ; preds = %2
%9 = tail call i64 @strlen(i8* %3)
%10 = add nsw i64 %9, 1
%11 = tail call i8* @malloc(i64 %10)
%12 = tail call i32 @strcpy(i8* %11, i8* %3)
ret i8* %11
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
scalar_t__ fwrite(int *, int, int, int /*<<< orphan*/ *);
int fputc(int c, FILE *stream) {
  if (fwrite(&c, 1, 1, stream)) {
    return c;
  } else {
    return 0;
  }
}


x86 assembly (clang, -O0):
<fputc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rcx
lea    -0x8(%rbp),%rdi
mov    $0x1,%edx
mov    %edx,%esi
call   1030 <fwrite@plt>
cmp    $0x0,%rax
je     1148 <fputc+0x38>
mov    -0x8(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    114f <fputc+0x3f>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fputc>:
push   %rax
mov    %rsi,%rcx
mov    %edi,0x4(%rsp)
lea    0x4(%rsp),%rdi
mov    $0x1,%esi
mov    $0x1,%edx
call   1030 <fwrite@plt>
mov    %rax,%rcx
xor    %eax,%eax
test   %rcx,%rcx
je     113a <fputc+0x2a>
mov    0x4(%rsp),%eax
pop    %rcx
ret

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

LLVM IR (-O2):
define i32 @fputc(i32 %0, i32* nocapture %1) {
%3 = alloca i32
store i32 %0, i32* %3
%4 = call i64 @fwrite(i32* %3, i32 1, i32 1, i32* %1)
%5 = icmp eq i64 %4, 0
%6 = load i32, i32* %3
%7 = select i1 %5, i32 0, i32 %6
ret i32 %7
}
unsigned int iw_scale_to_int(double s, unsigned int maxcolor) {
  if (s <= 0.0)
    return 0;
  if (s >= 1.0)
    return maxcolor;
  return (unsigned int)(0.5 + s * maxcolor);
}


x86 assembly (clang, -O0):
<iw_scale_to_int>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x10(%rbp)
mov    %edi,-0x14(%rbp)
xorps  %xmm0,%xmm0
ucomisd -0x10(%rbp),%xmm0
jb     1126 <iw_scale_to_int+0x26>
movl   $0x0,-0x4(%rbp)
jmp    116d <iw_scale_to_int+0x6d>
movsd  -0x10(%rbp),%xmm0
movsd  0xecd(%rip),%xmm1
ucomisd %xmm1,%xmm0
jb     1148 <iw_scale_to_int+0x48>
mov    -0x14(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    116d <iw_scale_to_int+0x6d>
movsd  -0x10(%rbp),%xmm0
mov    -0x14(%rbp),%eax
cvtsi2sd %rax,%xmm1
mulsd  %xmm1,%xmm0
movsd  0xea7(%rip),%xmm1
addsd  %xmm1,%xmm0
cvttsd2si %xmm0,%rax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<iw_scale_to_int>:
xor    %eax,%eax
xorpd  %xmm1,%xmm1
ucomisd %xmm0,%xmm1
jae    1131 <iw_scale_to_int+0x31>
ucomisd 0xeec(%rip),%xmm0
jae    1132 <iw_scale_to_int+0x32>
mov    %edi,%eax
xorps  %xmm1,%xmm1
cvtsi2sd %rax,%xmm1
mulsd  %xmm1,%xmm0
addsd  0xedc(%rip),%xmm0
cvttsd2si %xmm0,%rax
ret
mov    %edi,%eax
ret

LLVM IR (-O0):
define i32 @iw_scale_to_int(double %0, i32 %1) {
%3 = alloca i32
%4 = alloca double
%5 = alloca i32
store double %0, double* %4
store i32 %1, i32* %5
%6 = load double, double* %4
%7 = fcmp ole double %6, 0.000000e+00
br i1 %7, label %8, label %9
8: ; preds = %2
store i32 0, i32* %3
br label %20
9: ; preds = %2
%10 = load double, double* %4
%11 = fcmp oge double %10, 1.000000e+00
br i1 %11, label %12, label %14
12: ; preds = %9
%13 = load i32, i32* %5
store i32 %13, i32* %3
br label %20
14: ; preds = %9
%15 = load double, double* %4
%16 = load i32, i32* %5
%17 = uitofp i32 %16 to double
%18 = call double @llvm.fmuladd.f64(double %15, double %17, double 5.000000e-01)
%19 = fptoui double %18 to i32
store i32 %19, i32* %3
br label %20
20: ; preds = %14, %12, %8
%21 = load i32, i32* %3
ret i32 %21
}

LLVM IR (-O2):
define i32 @iw_scale_to_int(double %0, i32 %1) {
%3 = fcmp ugt double %0, 0.000000e+00
br i1 %3, label %4, label %10
4: ; preds = %2
%5 = fcmp ult double %0, 1.000000e+00
br i1 %5, label %6, label %10
6: ; preds = %4
%7 = uitofp i32 %1 to double
%8 = tail call double @llvm.fmuladd.f64(double %0, double %7, double 5.000000e-01)
%9 = fptoui double %8 to i32
br label %10
10: ; preds = %4, %2, %6
%11 = phi i32 [ %9, %6 ], [ 0, %2 ], [ %1, %4 ]
ret i32 %11
}
/* Variables and functions */
int MaxSubsequenceSumAlg2(int *, int);
int /*<<< orphan*/ printf(char *, int);
int main(int argc, const char *argv[]) {
  int A[] = {-2, 11, -4, 13, -5, -2};
  int maxSum;
  maxSum = MaxSubsequenceSumAlg2(A, 6);
  printf("%d\n", maxSum);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    0xec3(%rip),%rax
mov    %rax,-0x30(%rbp)
mov    0xec0(%rip),%rax
mov    %rax,-0x28(%rbp)
mov    0xebd(%rip),%rax
mov    %rax,-0x20(%rbp)
lea    -0x30(%rbp),%rdi
mov    $0x6,%esi
call   1040 <MaxSubsequenceSumAlg2@plt>
mov    %eax,-0x34(%rbp)
mov    -0x34(%rbp),%esi
lea    0xea6(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
sub    $0x18,%rsp
mov    0xee5(%rip),%rax
mov    %rax,0x10(%rsp)
movaps 0xec9(%rip),%xmm0
movaps %xmm0,(%rsp)
mov    %rsp,%rdi
mov    $0x6,%esi
call   1040 <MaxSubsequenceSumAlg2@plt>
lea    0xec9(%rip),%rdi
mov    %eax,%esi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x18,%rsp
ret

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

LLVM IR (-O2):
@__const.main.A = [6 x i32] [i32 -2, i32 11, i32 -4, i32 13, i32 -5, i32 -2]
@.str = [4 x i8] c"%d\0A\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = alloca [6 x i32]
%4 = bitcast [6 x i32]* %3 to i8*
%5 = getelementptr inbounds [6 x i32], [6 x i32]* %3, i64 0, i64 0
%6 = call i32 @MaxSubsequenceSumAlg2(i32* %5, i32 6)
%7 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %6)
ret i32 0
}