xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ O_RDONLY;
int cat_fd(int);
scalar_t__ close(int);
int open(char const *, int /*<<< orphan*/);
int cat(const char *fname) {
  int fd, success;
  if ((fd = open(fname, O_RDONLY)) == -1)
    return -1;
  success = cat_fd(fd);
  if (close(fd) != 0)
    return -1;
  return success;
}


x86 assembly (clang, -O0):
<cat>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
mov    0x2ea1(%rip),%rax
mov    (%rax),%esi
call   1050 <open@plt>
mov    %eax,-0x14(%rbp)
cmp    $0xffffffff,%eax
jne    1166 <cat+0x36>
movl   $0xffffffff,-0x4(%rbp)
jmp    1195 <cat+0x65>
mov    -0x14(%rbp),%edi
call   1030 <cat_fd@plt>
mov    %eax,-0x18(%rbp)
mov    -0x14(%rbp),%edi
call   1040 <close@plt>
cmp    $0x0,%rax
je     118f <cat+0x5f>
movl   $0xffffffff,-0x4(%rbp)
jmp    1195 <cat+0x65>
mov    -0x18(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<cat>:
push   %rbp
push   %rbx
push   %rax
mov    0x2eae(%rip),%rax
mov    (%rax),%esi
call   1050 <open@plt>
cmp    $0xffffffff,%eax
je     1161 <cat+0x31>
mov    %eax,%ebx
mov    %eax,%edi
call   1030 <cat_fd@plt>
mov    %eax,%ebp
mov    %ebx,%edi
call   1040 <close@plt>
neg    %rax
sbb    %eax,%eax
or     %ebp,%eax
jmp    1166 <cat+0x36>
mov    $0xffffffff,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
@O_RDONLY = global i32 0
define i32 @cat(i8* %0) {
%2 = alloca i32
%3 = alloca i8*
%4 = alloca i32
%5 = alloca i32
store i8* %0, i8** %3
%6 = load i8*, i8** %3
%7 = load i32, i32* @O_RDONLY
%8 = call i32 @open(i8* %6, i32 %7)
store i32 %8, i32* %4
%9 = icmp eq i32 %8, -1
br i1 %9, label %10, label %11
10: ; preds = %1
store i32 -1, i32* %2
br label %20
11: ; preds = %1
%12 = load i32, i32* %4
%13 = call i32 @cat_fd(i32 %12)
store i32 %13, i32* %5
%14 = load i32, i32* %4
%15 = call i64 @close(i32 %14)
%16 = icmp ne i64 %15, 0
br i1 %16, label %17, label %18
17: ; preds = %11
store i32 -1, i32* %2
br label %20
18: ; preds = %11
%19 = load i32, i32* %5
store i32 %19, i32* %2
br label %20
20: ; preds = %18, %17, %10
%21 = load i32, i32* %2
ret i32 %21
}

LLVM IR (-O2):
@O_RDONLY = global i32 0
define i32 @cat(i8* nocapture %0) {
%2 = load i32, i32* @O_RDONLY
%3 = tail call i32 @open(i8* %0, i32 %2)
%4 = icmp eq i32 %3, -1
br i1 %4, label %10, label %5
5: ; preds = %1
%6 = tail call i32 @cat_fd(i32 %3)
%7 = tail call i64 @close(i32 %3)
%8 = icmp eq i64 %7, 0
%9 = select i1 %8, i32 %6, i32 -1
br label %10
10: ; preds = %5, %1
%11 = phi i32 [ -1, %1 ], [ %9, %5 ]
ret i32 %11
}
/* Variables and functions */
int combination(int, int);
int /*<<< orphan*/ printf(char *, int);
int /*<<< orphan*/ scanf(char *, int *, int *);
int main(int argc, char *argv[]) {
  int n, k;
  scanf("%d %d", &n, &k);
  printf("%d\n", combination(n, k));
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
lea    0xeba(%rip),%rdi
lea    -0x14(%rbp),%rsi
lea    -0x18(%rbp),%rdx
call   1050 <scanf@plt>
mov    -0x14(%rbp),%edi
mov    -0x18(%rbp),%esi
call   1040 <combination@plt>
mov    %eax,%esi
lea    0xe9f(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

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

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

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


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x63,%edi
call   1040 <digito@plt>
mov    %eax,%esi
lea    0xebe(%rip),%rdi
call   1030 <printf@plt>
mov    $0x30,%edi
call   1040 <digito@plt>
mov    %eax,%esi
lea    0xea6(%rip),%rdi
call   1030 <printf@plt>
mov    $0x39,%edi
call   1040 <digito@plt>
mov    %eax,%esi
lea    0xe8e(%rip),%rdi
call   1030 <printf@plt>
mov    $0x38,%edi
call   1040 <digito@plt>
mov    %eax,%esi
lea    0xe76(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
mov    $0x63,%edi
call   1040 <digito@plt>
lea    0xece(%rip),%rbx
mov    %rbx,%rdi
mov    %eax,%esi
call   1030 <printf@plt>
mov    $0x30,%edi
call   1040 <digito@plt>
mov    %rbx,%rdi
mov    %eax,%esi
call   1030 <printf@plt>
mov    $0x39,%edi
call   1040 <digito@plt>
mov    %rbx,%rdi
mov    %eax,%esi
call   1030 <printf@plt>
mov    $0x38,%edi
call   1040 <digito@plt>
mov    %rbx,%rdi
mov    %eax,%esi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [3 x i8] c"%d\00"
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 @digito(i8 signext 99)
%3 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 %2)
%4 = call i32 @digito(i8 signext 48)
%5 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 %4)
%6 = call i32 @digito(i8 signext 57)
%7 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 %6)
%8 = call i32 @digito(i8 signext 56)
%9 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 %8)
ret i32 0
}

LLVM IR (-O2):
@.str = [3 x i8] c"%d\00"
define i32 @main() {
%1 = tail call i32 @digito(i8 signext 99)
%2 = tail call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 %1)
%3 = tail call i32 @digito(i8 signext 48)
%4 = tail call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 %3)
%5 = tail call i32 @digito(i8 signext 57)
%6 = tail call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 %5)
%7 = tail call i32 @digito(i8 signext 56)
%8 = tail call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 %7)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ ksft_exit_pass();
int /*<<< orphan*/ ksft_print_header();
int /*<<< orphan*/ test_membarrier();
int /*<<< orphan*/ test_membarrier_query();
int main(int argc, char **argv) {
  ksft_print_header();
  test_membarrier_query();
  test_membarrier();
  ksft_exit_pass();
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    $0x0,%al
call   1060 <ksft_print_header@plt>
mov    $0x0,%al
call   1040 <test_membarrier_query@plt>
mov    $0x0,%al
call   1050 <test_membarrier@plt>
mov    $0x0,%al
call   1030 <ksft_exit_pass@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1060 <ksft_print_header@plt>
xor    %eax,%eax
call   1040 <test_membarrier_query@plt>
xor    %eax,%eax
call   1050 <test_membarrier@plt>
xor    %eax,%eax
call   1030 <ksft_exit_pass@plt>
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 (...) @ksft_print_header()
%4 = tail call i32 (...) @test_membarrier_query()
%5 = tail call i32 (...) @test_membarrier()
%6 = tail call i32 (...) @ksft_exit_pass()
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ helper_double_13_recursive(double *, int);
void helper_double_13(double *buf) { helper_double_13_recursive(buf, 13); }


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

x86 assembly (clang, -O2):
<helper_double_13>:
mov    $0xd,%esi
jmp    1030 <helper_double_13_recursive@plt>

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

LLVM IR (-O2):
define void @helper_double_13(double* %0) {
%2 = tail call i32 @helper_double_13_recursive(double* %0, i32 13)
ret void
}
unsigned int _uiMagGet(unsigned int uiTrackNo, unsigned char *pszBuffer) {
  return (1);
}


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

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

LLVM IR (-O0):
define i32 @_uiMagGet(i32 %0, i8* %1) {
%3 = alloca i32
%4 = alloca i8*
store i32 %0, i32* %3
store i8* %1, i8** %4
ret i32 1
}

LLVM IR (-O2):
define i32 @_uiMagGet(i32 %0, i8* nocapture readnone %1) {
ret i32 1
}
/* Type definitions */
struct DynArr {
  int dummy;
};

/* Variables and functions */
double fabs(double);
scalar_t__ isEmptyDynArr(struct DynArr *);
int /*<<< orphan*/ popDynArr(struct DynArr *);
int /*<<< orphan*/ pushDynArr(struct DynArr *, double);
double topDynArr(struct DynArr *);
void absolute(struct DynArr *stack) {
  double a, c;
  if (isEmptyDynArr(stack))
    return;
  a = topDynArr(stack);
  popDynArr(stack);
  c = fabs(a);
  pushDynArr(stack, c);
}


x86 assembly (clang, -O0):
<absolute>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1050 <isEmptyDynArr@plt>
cmp    $0x0,%rax
je     1164 <absolute+0x24>
jmp    119e <absolute+0x5e>
mov    -0x8(%rbp),%rdi
call   1030 <topDynArr@plt>
movsd  %xmm0,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <popDynArr@plt>
movsd  -0x10(%rbp),%xmm0
movaps 0xe79(%rip),%xmm1
pand   %xmm1,%xmm0
movsd  %xmm0,-0x18(%rbp)
mov    -0x8(%rbp),%rdi
movsd  -0x18(%rbp),%xmm0
call   1060 <pushDynArr@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<absolute>:
push   %rbx
sub    $0x10,%rsp
mov    %rdi,%rbx
call   1050 <isEmptyDynArr@plt>
test   %rax,%rax
je     1158 <absolute+0x18>
add    $0x10,%rsp
pop    %rbx
ret
mov    %rbx,%rdi
call   1030 <topDynArr@plt>
movaps %xmm0,(%rsp)
mov    %rbx,%rdi
call   1040 <popDynArr@plt>
movaps (%rsp),%xmm0
andps  0xe89(%rip),%xmm0
mov    %rbx,%rdi
add    $0x10,%rsp
pop    %rbx
jmp    1060 <pushDynArr@plt>

LLVM IR (-O0):
%struct.DynArr = type { i32 }
define void @absolute(%struct.DynArr* %0) {
%2 = alloca %struct.DynArr*
%3 = alloca double
%4 = alloca double
store %struct.DynArr* %0, %struct.DynArr** %2
%5 = load %struct.DynArr*, %struct.DynArr** %2
%6 = call i64 @isEmptyDynArr(%struct.DynArr* %5)
%7 = icmp ne i64 %6, 0
br i1 %7, label %8, label %9
8: ; preds = %1
br label %19
9: ; preds = %1
%10 = load %struct.DynArr*, %struct.DynArr** %2
%11 = call double @topDynArr(%struct.DynArr* %10)
store double %11, double* %3
%12 = load %struct.DynArr*, %struct.DynArr** %2
%13 = call i32 @popDynArr(%struct.DynArr* %12)
%14 = load double, double* %3
%15 = call double @llvm.fabs.f64(double %14)
store double %15, double* %4
%16 = load %struct.DynArr*, %struct.DynArr** %2
%17 = load double, double* %4
%18 = call i32 @pushDynArr(%struct.DynArr* %16, double %17)
br label %19
19: ; preds = %9, %8
ret void
}

LLVM IR (-O2):
%struct.DynArr = type { i32 }
define void @absolute(%struct.DynArr* %0) {
%2 = tail call i64 @isEmptyDynArr(%struct.DynArr* %0)
%3 = icmp eq i64 %2, 0
br i1 %3, label %4, label %9
4: ; preds = %1
%5 = tail call double @topDynArr(%struct.DynArr* %0)
%6 = tail call i32 @popDynArr(%struct.DynArr* %0)
%7 = tail call double @llvm.fabs.f64(double %5)
%8 = tail call i32 @pushDynArr(%struct.DynArr* %0, double %7)
br label %9
9: ; preds = %1, %4
ret void
}
void param_ptr(int *px) { *px = 123; }


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

x86 assembly (clang, -O2):
<param_ptr>:
movl   $0x7b,(%rdi)
ret

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

LLVM IR (-O2):
define void @param_ptr(i32* nocapture writeonly %0) {
store i32 123, i32* %0
ret void
}
void __attribute__((section(".after_vectors"))) DebugMon_Handler(void) {
  while (1) {
  }
}


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

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

LLVM IR (-O0):
define void @DebugMon_Handler() section ".after_vectors" {
br label %1
1: ; preds = %0, %1
br label %1
}

LLVM IR (-O2):
define void @DebugMon_Handler() section ".after_vectors" {
br label %1
1: ; preds = %0, %1
br label %1
}
void rop3_9_0_0(unsigned char *D, unsigned char S, unsigned char T) {
  unsigned char stk1;
  unsigned char stk2;
  stk2 = *D ^ S;
  stk1 = T | stk2;
  stk1 = ~stk1;
  *D = stk1;
}


x86 assembly (clang, -O0):
<rop3_9_0_0>:
push   %rbp
mov    %rsp,%rbp
mov    %dl,%al
mov    %sil,%cl
mov    %rdi,-0x8(%rbp)
mov    %cl,-0x9(%rbp)
mov    %al,-0xa(%rbp)
mov    -0x8(%rbp),%rax
movzbl (%rax),%eax
movzbl -0x9(%rbp),%ecx
xor    %ecx,%eax
mov    %al,-0xc(%rbp)
movzbl -0xa(%rbp),%eax
movzbl -0xc(%rbp),%ecx
or     %ecx,%eax
mov    %al,-0xb(%rbp)
movzbl -0xb(%rbp),%eax
xor    $0xffffffff,%eax
mov    %al,-0xb(%rbp)
mov    -0xb(%rbp),%cl
mov    -0x8(%rbp),%rax
mov    %cl,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<rop3_9_0_0>:
xor    (%rdi),%sil
or     %dl,%sil
not    %sil
mov    %sil,(%rdi)
ret

LLVM IR (-O0):
define void @rop3_9_0_0(i8* %0, i8 zeroext %1, i8 zeroext %2) {
%4 = alloca i8*
%5 = alloca i8
%6 = alloca i8
%7 = alloca i8
%8 = alloca i8
store i8* %0, i8** %4
store i8 %1, i8* %5
store i8 %2, i8* %6
%9 = load i8*, i8** %4
%10 = load i8, i8* %9
%11 = zext i8 %10 to i32
%12 = load i8, i8* %5
%13 = zext i8 %12 to i32
%14 = xor i32 %11, %13
%15 = trunc i32 %14 to i8
store i8 %15, i8* %8
%16 = load i8, i8* %6
%17 = zext i8 %16 to i32
%18 = load i8, i8* %8
%19 = zext i8 %18 to i32
%20 = or i32 %17, %19
%21 = trunc i32 %20 to i8
store i8 %21, i8* %7
%22 = load i8, i8* %7
%23 = zext i8 %22 to i32
%24 = xor i32 %23, -1
%25 = trunc i32 %24 to i8
store i8 %25, i8* %7
%26 = load i8, i8* %7
%27 = load i8*, i8** %4
store i8 %26, i8* %27
ret void
}

LLVM IR (-O2):
define void @rop3_9_0_0(i8* nocapture %0, i8 zeroext %1, i8 zeroext %2) {
%4 = load i8, i8* %0
%5 = xor i8 %4, %1
%6 = or i8 %5, %2
%7 = xor i8 %6, -1
store i8 %7, i8* %0
ret void
}
void traffic_register_cmds(void) {}


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

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

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

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

/* Variables and functions */
int fclose(int /*<<< orphan*/ *);
int close_dcd_read(FILE *fd) {
  int result;
  result = fclose(fd);
  return result;
}


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

x86 assembly (clang, -O2):
<close_dcd_read>:
jmp    1030 <fclose@plt>

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

LLVM IR (-O2):
define i32 @close_dcd_read(i32* nocapture %0) {
%2 = tail call i32 @fclose(i32* %0)
ret i32 %2
}
void delay(unsigned time) {
  unsigned n;
  while (time > 0) {
    n = 4;
    while (n > 0)
      n--;
    time--;
  }
}


x86 assembly (clang, -O0):
<delay>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
cmpl   $0x0,-0x4(%rbp)
jbe    113e <delay+0x3e>
movl   $0x4,-0x8(%rbp)
cmpl   $0x0,-0x8(%rbp)
jbe    1130 <delay+0x30>
mov    -0x8(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0x8(%rbp)
jmp    1118 <delay+0x18>
mov    -0x4(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0x4(%rbp)
jmp    1107 <delay+0x7>
pop    %rbp
ret

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

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

LLVM IR (-O2):
define void @delay(i32 %0) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ strlen(char *);
scalar_t__ strncmp(char *, char *, int /*<<< orphan*/);
int str_starts_with(char *a, char *b) { return strncmp(a, b, strlen(b)) == 0; }


x86 assembly (clang, -O0):
<str_starts_with>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x20(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x10(%rbp),%rdi
call   1040 <strlen@plt>
mov    -0x20(%rbp),%rdi
mov    -0x18(%rbp),%rsi
mov    %eax,%edx
call   1030 <strncmp@plt>
cmp    $0x0,%rax
sete   %al
and    $0x1,%al
movzbl %al,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<str_starts_with>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%rbx
mov    %rdi,%r14
mov    %rsi,%rdi
call   1040 <strlen@plt>
mov    %r14,%rdi
mov    %rbx,%rsi
mov    %eax,%edx
call   1030 <strncmp@plt>
xor    %ecx,%ecx
test   %rax,%rax
sete   %cl
mov    %ecx,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define i32 @str_starts_with(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 = load i8*, i8** %4
%8 = call i32 @strlen(i8* %7)
%9 = call i64 @strncmp(i8* %5, i8* %6, i32 %8)
%10 = icmp eq i64 %9, 0
%11 = zext i1 %10 to i32
ret i32 %11
}

LLVM IR (-O2):
define i32 @str_starts_with(i8* %0, i8* %1) {
%3 = tail call i32 @strlen(i8* %1)
%4 = tail call i64 @strncmp(i8* %0, i8* %1, i32 %3)
%5 = icmp eq i64 %4, 0
%6 = zext i1 %5 to i32
ret i32 %6
}
/* Variables and functions */
int /*<<< orphan*/ itob(int, char *, int);
int /*<<< orphan*/ printf(char *, char *);
int main(void) {
  char s[1000];
  itob(18, s, 2);
  printf("%s\n", s);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x3f0,%rsp
movl   $0x0,-0x4(%rbp)
lea    -0x3f0(%rbp),%rsi
mov    $0x12,%edi
mov    $0x2,%edx
call   1040 <itob@plt>
lea    -0x3f0(%rbp),%rsi
lea    0xeaa(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x3f0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x3f0,%rsp
mov    %rsp,%rbx
mov    $0x12,%edi
mov    %rbx,%rsi
mov    $0x2,%edx
call   1040 <itob@plt>
lea    0xebc(%rip),%rdi
mov    %rbx,%rsi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x3f0,%rsp
pop    %rbx
ret

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

LLVM IR (-O2):
@.str = [4 x i8] c"%s\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 = call i32 @itob(i32 18, i8* %2, i32 2)
%4 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %2)
ret i32 0
}
void fat_read_dirent(struct fat_DirEnt *d) {}


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

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

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

LLVM IR (-O2):
%struct.fat_DirEnt = type opaque
define void @fat_read_dirent(%struct.fat_DirEnt* nocapture %0) {
ret void
}
void auth_shadow_cleanup() {}


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

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

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

LLVM IR (-O2):
define void @auth_shadow_cleanup() {
ret void
}
void outer_nolock_clean_all(void) {}


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

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

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

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

/* Variables and functions */
int /*<<< orphan*/ sendto(int, void const *, size_t, int, int /*<<< orphan*/ *,
                          int /*<<< orphan*/);
ssize_t send(int s, const void *msg, size_t len, int flags) {
  return (sendto(s, msg, len, flags, NULL, 0));
}


x86 assembly (clang, -O0):
<send>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %ecx,-0x1c(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
mov    -0x1c(%rbp),%ecx
xor    %eax,%eax
mov    %eax,%r8d
xor    %r9d,%r9d
call   1030 <sendto@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<send>:
xor    %r8d,%r8d
xor    %r9d,%r9d
jmp    1030 <sendto@plt>

LLVM IR (-O0):
define i32 @send(i32 %0, i8* %1, i64 %2, i32 %3) {
%5 = alloca i32
%6 = alloca i8*
%7 = alloca i64
%8 = alloca i32
store i32 %0, i32* %5
store i8* %1, i8** %6
store i64 %2, i64* %7
store i32 %3, i32* %8
%9 = load i32, i32* %5
%10 = load i8*, i8** %6
%11 = load i64, i64* %7
%12 = load i32, i32* %8
%13 = call i32 @sendto(i32 %9, i8* %10, i64 %11, i32 %12, i32* null, i32 0)
ret i32 %13
}

LLVM IR (-O2):
define i32 @send(i32 %0, i8* %1, i64 %2, i32 %3) {
%5 = tail call i32 @sendto(i32 %0, i8* %1, i64 %2, i32 %3, i32* null, i32 0)
ret i32 %5
}
int fibo(int num) {
  if (num == 0 || num == 1)
    return 1;
  else
    return (fibo(num - 1) + fibo(num - 2));
}


x86 assembly (clang, -O0):
<fibo>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
cmpl   $0x0,-0x8(%rbp)
je     112f <fibo+0x1f>
cmpl   $0x1,-0x8(%rbp)
jne    113b <fibo+0x2b>
movl   $0x1,-0x4(%rbp)
jmp    115e <fibo+0x4e>
mov    -0x8(%rbp),%edi
sub    $0x1,%edi
call   1030 <fibo@plt>
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%edi
sub    $0x2,%edi
call   1030 <fibo@plt>
mov    %eax,%ecx
mov    -0xc(%rbp),%eax
add    %ecx,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fibo>:
push   %rbp
push   %rbx
push   %rax
mov    $0x1,%ebp
cmp    $0x2,%edi
jb     1145 <fibo+0x35>
mov    %edi,%ebx
xor    %ebp,%ebp
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
lea    -0x1(%rbx),%edi
call   1030 <fibo@plt>
add    $0xfffffffe,%ebx
add    %eax,%ebp
cmp    $0x1,%ebx
ja     1130 <fibo+0x20>
add    $0x1,%ebp
mov    %ebp,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
define i32 @fibo(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %3
%4 = load i32, i32* %3
%5 = icmp eq i32 %4, 0
br i1 %5, label %9, label %6
6: ; preds = %1
%7 = load i32, i32* %3
%8 = icmp eq i32 %7, 1
br i1 %8, label %9, label %10
9: ; preds = %6, %1
store i32 1, i32* %2
br label %18
10: ; preds = %6
%11 = load i32, i32* %3
%12 = sub nsw i32 %11, 1
%13 = call i32 @fibo(i32 %12)
%14 = load i32, i32* %3
%15 = sub nsw i32 %14, 2
%16 = call i32 @fibo(i32 %15)
%17 = add nsw i32 %13, %16
store i32 %17, i32* %2
br label %18
18: ; preds = %10, %9
%19 = load i32, i32* %2
ret i32 %19
}

LLVM IR (-O2):
define i32 @fibo(i32 %0) {
%2 = icmp ult i32 %0, 2
br i1 %2, label %13, label %3
3: ; preds = %1, %3
%4 = phi i32 [ %8, %3 ], [ %0, %1 ]
%5 = phi i32 [ %9, %3 ], [ 0, %1 ]
%6 = add nsw i32 %4, -1
%7 = tail call i32 @fibo(i32 %6)
%8 = add nsw i32 %4, -2
%9 = add nsw i32 %7, %5
%10 = icmp ult i32 %8, 2
br i1 %10, label %11, label %3
11: ; preds = %3
%12 = add i32 %9, 1
br label %13
13: ; preds = %11, %1
%14 = phi i32 [ 1, %1 ], [ %12, %11 ]
ret i32 %14
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void print_usage() { printf("Usage: in-trigger command [pattern]\n"); }


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

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

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

LLVM IR (-O2):
@str = [36 x i8] c"Usage: in-trigger command [pattern]\00"
define void @print_usage() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([36 x i8], [36 x i8]* @str, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ c027_init();
void mbed_sdk_init() { c027_init(); }


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

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

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

LLVM IR (-O2):
define void @mbed_sdk_init() {
%1 = tail call i32 (...) @c027_init()
ret void
}
/* Type definitions */
struct rlimit {
  int /*<<< orphan*/ rlim_max;
  int /*<<< orphan*/ rlim_cur;
};

/* Variables and functions */
int /*<<< orphan*/ RLIMIT_DATA;
int /*<<< orphan*/ getrlimit(int /*<<< orphan*/, struct rlimit *);
int /*<<< orphan*/ setrlimit(int /*<<< orphan*/, struct rlimit *);
void unlimit(void) {
  struct rlimit rl;
  getrlimit(RLIMIT_DATA, &rl);
  rl.rlim_cur = rl.rlim_max;
  setrlimit(RLIMIT_DATA, &rl);
}


x86 assembly (clang, -O0):
<unlimit>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    0x2eb9(%rip),%rax
mov    (%rax),%edi
lea    -0x8(%rbp),%rsi
call   1040 <getrlimit@plt>
mov    -0x8(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    0x2ea1(%rip),%rax
mov    (%rax),%edi
lea    -0x8(%rbp),%rsi
call   1030 <setrlimit@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<unlimit>:
push   %r14
push   %rbx
push   %rax
mov    0x2ebd(%rip),%r14
mov    (%r14),%edi
mov    %rsp,%rbx
mov    %rbx,%rsi
call   1040 <getrlimit@plt>
mov    (%rsp),%eax
mov    %eax,0x4(%rsp)
mov    (%r14),%edi
mov    %rbx,%rsi
call   1030 <setrlimit@plt>
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
%struct.rlimit = type { i32, i32 }
@RLIMIT_DATA = global i32 0
define void @unlimit() {
%1 = alloca %struct.rlimit
%2 = load i32, i32* @RLIMIT_DATA
%3 = call i32 @getrlimit(i32 %2, %struct.rlimit* %1)
%4 = getelementptr inbounds %struct.rlimit, %struct.rlimit* %1, i32 0, i32 0
%5 = load i32, i32* %4
%6 = getelementptr inbounds %struct.rlimit, %struct.rlimit* %1, i32 0, i32 1
store i32 %5, i32* %6
%7 = load i32, i32* @RLIMIT_DATA
%8 = call i32 @setrlimit(i32 %7, %struct.rlimit* %1)
ret void
}

LLVM IR (-O2):
%struct.rlimit = type { i32, i32 }
@RLIMIT_DATA = global i32 0
define void @unlimit() {
%1 = alloca %struct.rlimit
%2 = bitcast %struct.rlimit* %1 to i8*
%3 = load i32, i32* @RLIMIT_DATA
%4 = call i32 @getrlimit(i32 %3, %struct.rlimit* %1)
%5 = getelementptr inbounds %struct.rlimit, %struct.rlimit* %1, i64 0, i32 0
%6 = load i32, i32* %5
%7 = getelementptr inbounds %struct.rlimit, %struct.rlimit* %1, i64 0, i32 1
store i32 %6, i32* %7
%8 = load i32, i32* @RLIMIT_DATA
%9 = call i32 @setrlimit(i32 %8, %struct.rlimit* %1)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ copy_frames();
int /*<<< orphan*/ open_video();
int /*<<< orphan*/ process_args(int, char **);
int /*<<< orphan*/ process_header();
int main(int argc, char **argv) {
  process_args(argc, argv);
  process_header();
  open_video();
  copy_frames();
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%edi
mov    -0x10(%rbp),%rsi
call   1060 <process_args@plt>
mov    $0x0,%al
call   1030 <process_header@plt>
mov    $0x0,%al
call   1040 <open_video@plt>
mov    $0x0,%al
call   1050 <copy_frames@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
call   1060 <process_args@plt>
xor    %eax,%eax
call   1030 <process_header@plt>
xor    %eax,%eax
call   1040 <open_video@plt>
xor    %eax,%eax
call   1050 <copy_frames@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%6 = load i32, i32* %4
%7 = load i8**, i8*** %5
%8 = call i32 @process_args(i32 %6, i8** %7)
%9 = call i32 (...) @process_header()
%10 = call i32 (...) @open_video()
%11 = call i32 (...) @copy_frames()
ret i32 0
}

LLVM IR (-O2):
define i32 @main(i32 %0, i8** %1) {
%3 = tail call i32 @process_args(i32 %0, i8** %1)
%4 = tail call i32 (...) @process_header()
%5 = tail call i32 (...) @open_video()
%6 = tail call i32 (...) @copy_frames()
ret i32 0
}
/* Variables and functions */
int f82(int *);
int f83(int *p) { return f82(p); }


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

x86 assembly (clang, -O2):
<f83>:
jmp    1030 <f82@plt>

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

LLVM IR (-O2):
define i32 @f83(i32* %0) {
%2 = tail call i32 @f82(i32* %0)
ret i32 %2
}
void Intro_Primera(char c[3][3]) {
  int i, j;
  char aux;
  aux = '1';
  for (i = 0; i < 3; i++) {
    for (j = 0; j < 3; j++) {
      c[i][j] = aux++;
    }
  }
}


x86 assembly (clang, -O0):
<Intro_Primera>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movb   $0x31,-0x11(%rbp)
movl   $0x0,-0xc(%rbp)
cmpl   $0x3,-0xc(%rbp)
jge    116f <Intro_Primera+0x6f>
movl   $0x0,-0x10(%rbp)
cmpl   $0x3,-0x10(%rbp)
jge    115c <Intro_Primera+0x5c>
mov    -0x11(%rbp),%dl
mov    %dl,%al
add    $0x1,%al
mov    %al,-0x11(%rbp)
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
imul   $0x3,%rcx,%rcx
add    %rcx,%rax
movslq -0x10(%rbp),%rcx
mov    %dl,(%rax,%rcx,1)
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    1124 <Intro_Primera+0x24>
jmp    1161 <Intro_Primera+0x61>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1113 <Intro_Primera+0x13>
pop    %rbp
ret

x86 assembly (clang, -O2):
<Intro_Primera>:
movabs $0x3837363534333231,%rax
36 37 38
mov    %rax,(%rdi)
movb   $0x39,0x8(%rdi)
ret

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

LLVM IR (-O2):
define void @Intro_Primera([3 x i8]* nocapture writeonly %0) {
%2 = getelementptr inbounds [3 x i8], [3 x i8]* %0, i64 0, i64 0
store i8 49, i8* %2
%3 = getelementptr inbounds [3 x i8], [3 x i8]* %0, i64 0, i64 1
store i8 50, i8* %3
%4 = getelementptr inbounds [3 x i8], [3 x i8]* %0, i64 0, i64 2
store i8 51, i8* %4
%5 = getelementptr inbounds [3 x i8], [3 x i8]* %0, i64 1, i64 0
store i8 52, i8* %5
%6 = getelementptr inbounds [3 x i8], [3 x i8]* %0, i64 1, i64 1
store i8 53, i8* %6
%7 = getelementptr inbounds [3 x i8], [3 x i8]* %0, i64 1, i64 2
store i8 54, i8* %7
%8 = getelementptr inbounds [3 x i8], [3 x i8]* %0, i64 2, i64 0
store i8 55, i8* %8
%9 = getelementptr inbounds [3 x i8], [3 x i8]* %0, i64 2, i64 1
store i8 56, i8* %9
%10 = getelementptr inbounds [3 x i8], [3 x i8]* %0, i64 2, i64 2
store i8 57, i8* %10
ret void
}
/* Variables and functions */
int /*<<< orphan*/ HplAtmRfa1TimerMacP__CompareB__default__fired();
void HplAtmRfa1TimerMacP__CompareB__fired(void) {
  HplAtmRfa1TimerMacP__CompareB__default__fired();
}


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

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

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

LLVM IR (-O2):
define void @HplAtmRfa1TimerMacP__CompareB__fired() {
%1 = tail call i32 (...) @HplAtmRfa1TimerMacP__CompareB__default__fired()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ F_DUPFD;
int fcntl(int, int /*<<< orphan*/, int /*<<< orphan*/);
int dup(int oldfd) { return fcntl(oldfd, F_DUPFD, 0); }


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

x86 assembly (clang, -O2):
<dup>:
mov    0x2ed1(%rip),%rax
mov    (%rax),%esi
xor    %edx,%edx
jmp    1030 <fcntl@plt>

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

LLVM IR (-O2):
@F_DUPFD = global i32 0
define i32 @dup(i32 %0) {
%2 = load i32, i32* @F_DUPFD
%3 = tail call i32 @fcntl(i32 %0, i32 %2, i32 0)
ret i32 %3
}
void proc_unknown_nmi_panic(void) { nsc_assert(0, __func__); }


x86 assembly (clang, -O0):
<proc_unknown_nmi_panic>:
push   %rbp
mov    %rsp,%rbp
xor    %edi,%edi
lea    0xee3(%rip),%rsi
mov    $0x0,%al
call   1030 <nsc_assert@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<proc_unknown_nmi_panic>:
lea    0xee9(%rip),%rsi
xor    %edi,%edi
xor    %eax,%eax
jmp    1030 <nsc_assert@plt>

LLVM IR (-O0):
@__func__.proc_unknown_nmi_panic = [23 x i8] c"proc_unknown_nmi_panic\00"
define void @proc_unknown_nmi_panic() {
%1 = call i32 (i32, i8*, ...) bitcast (i32 (...)* @nsc_assert to i32 (i32, i8*, ...)*)(i32 0, i8* getelementptr inbounds ([23 x i8], [23 x i8]* @__func__.proc_unknown_nmi_panic, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@__func__.proc_unknown_nmi_panic = [23 x i8] c"proc_unknown_nmi_panic\00"
define void @proc_unknown_nmi_panic() {
%1 = tail call i32 (i32, i8*, ...) bitcast (i32 (...)* @nsc_assert to i32 (i32, i8*, ...)*)(i32 0, i8* getelementptr inbounds ([23 x i8], [23 x i8]* @__func__.proc_unknown_nmi_panic, i64 0, i64 0))
ret void
}
void MD4Transform(unsigned int buf[4], const unsigned int in[16]) {
  unsigned int a, b, c, d;
  (b) += ((((c)) & ((d))) | ((~(c)) & ((a)))) + (in[7]);
  (a) += ((((b)) & ((c))) | ((~(b)) & ((d)))) + (in[8]);
  (d) += ((((a)) & ((b))) | ((~(a)) & ((c)))) + (in[9]);
  buf[3] += d;
}


x86 assembly (clang, -O0):
<MD4Transform>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x1c(%rbp),%eax
and    -0x20(%rbp),%eax
mov    -0x1c(%rbp),%ecx
xor    $0xffffffff,%ecx
and    -0x14(%rbp),%ecx
or     %ecx,%eax
mov    -0x10(%rbp),%rcx
add    0x1c(%rcx),%eax
add    -0x18(%rbp),%eax
mov    %eax,-0x18(%rbp)
mov    -0x18(%rbp),%eax
and    -0x1c(%rbp),%eax
mov    -0x18(%rbp),%ecx
xor    $0xffffffff,%ecx
and    -0x20(%rbp),%ecx
or     %ecx,%eax
mov    -0x10(%rbp),%rcx
add    0x20(%rcx),%eax
add    -0x14(%rbp),%eax
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
and    -0x18(%rbp),%eax
mov    -0x14(%rbp),%ecx
xor    $0xffffffff,%ecx
and    -0x1c(%rbp),%ecx
or     %ecx,%eax
mov    -0x10(%rbp),%rcx
add    0x24(%rcx),%eax
add    -0x20(%rbp),%eax
mov    %eax,-0x20(%rbp)
mov    -0x20(%rbp),%ecx
mov    -0x8(%rbp),%rax
add    0xc(%rax),%ecx
mov    %ecx,0xc(%rax)
pop    %rbp
ret

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

LLVM IR (-O0):
define void @MD4Transform(i32* %0, i32* %1) {
%3 = alloca i32*
%4 = alloca i32*
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
store i32* %0, i32** %3
store i32* %1, i32** %4
%9 = load i32, i32* %7
%10 = load i32, i32* %8
%11 = and i32 %9, %10
%12 = load i32, i32* %7
%13 = xor i32 %12, -1
%14 = load i32, i32* %5
%15 = and i32 %13, %14
%16 = or i32 %11, %15
%17 = load i32*, i32** %4
%18 = getelementptr inbounds i32, i32* %17, i64 7
%19 = load i32, i32* %18
%20 = add i32 %16, %19
%21 = load i32, i32* %6
%22 = add i32 %21, %20
store i32 %22, i32* %6
%23 = load i32, i32* %6
%24 = load i32, i32* %7
%25 = and i32 %23, %24
%26 = load i32, i32* %6
%27 = xor i32 %26, -1
%28 = load i32, i32* %8
%29 = and i32 %27, %28
%30 = or i32 %25, %29
%31 = load i32*, i32** %4
%32 = getelementptr inbounds i32, i32* %31, i64 8
%33 = load i32, i32* %32
%34 = add i32 %30, %33
%35 = load i32, i32* %5
%36 = add i32 %35, %34
store i32 %36, i32* %5
%37 = load i32, i32* %5
%38 = load i32, i32* %6
%39 = and i32 %37, %38
%40 = load i32, i32* %5
%41 = xor i32 %40, -1
%42 = load i32, i32* %7
%43 = and i32 %41, %42
%44 = or i32 %39, %43
%45 = load i32*, i32** %4
%46 = getelementptr inbounds i32, i32* %45, i64 9
%47 = load i32, i32* %46
%48 = add i32 %44, %47
%49 = load i32, i32* %8
%50 = add i32 %49, %48
store i32 %50, i32* %8
%51 = load i32, i32* %8
%52 = load i32*, i32** %3
%53 = getelementptr inbounds i32, i32* %52, i64 3
%54 = load i32, i32* %53
%55 = add i32 %54, %51
store i32 %55, i32* %53
ret void
}

LLVM IR (-O2):
define void @MD4Transform(i32* nocapture %0, i32* nocapture %1) {
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ uint8_t;
typedef int /*<<< orphan*/ uint64_t;

/* Variables and functions */
int /*<<< orphan*/ internal_fiat_p448_from_bytes(uintptr_t, uintptr_t);
void fiat_p448_from_bytes(uint64_t out1[8], const uint8_t arg1[56]) {
  internal_fiat_p448_from_bytes((uintptr_t)out1, (uintptr_t)arg1);
}


x86 assembly (clang, -O0):
<fiat_p448_from_bytes>:
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 <internal_fiat_p448_from_bytes@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fiat_p448_from_bytes>:
jmp    1030 <internal_fiat_p448_from_bytes@plt>

LLVM IR (-O0):
define void @fiat_p448_from_bytes(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 = ptrtoint i32* %5 to i64
%7 = load i32*, i32** %4
%8 = ptrtoint i32* %7 to i64
%9 = call i32 @internal_fiat_p448_from_bytes(i64 %6, i64 %8)
ret void
}

LLVM IR (-O2):
define void @fiat_p448_from_bytes(i32* %0, i32* %1) {
%3 = ptrtoint i32* %0 to i64
%4 = ptrtoint i32* %1 to i64
%5 = tail call i32 @internal_fiat_p448_from_bytes(i64 %3, i64 %4)
ret void
}
void r_icu_irq2_interrupt(void) {}


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

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

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

LLVM IR (-O2):
define void @r_icu_irq2_interrupt() {
ret void
}
/* Type definitions */
typedef int time_t;

/* Variables and functions */
int /*<<< orphan*/ assert(int);
int /*<<< orphan*/ localtime(int *);
void test_localtime() {
  time_t t = 1;
  localtime(&t);
  assert(t == 1);
}


x86 assembly (clang, -O0):
<test_localtime>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x1,-0x4(%rbp)
lea    -0x4(%rbp),%rdi
call   1030 <localtime@plt>
cmpl   $0x1,-0x4(%rbp)
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1040 <assert@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_localtime>:
push   %rax
movl   $0x1,0x4(%rsp)
lea    0x4(%rsp),%rdi
call   1030 <localtime@plt>
xor    %edi,%edi
cmpl   $0x1,0x4(%rsp)
sete   %dil
call   1040 <assert@plt>
pop    %rax
ret

LLVM IR (-O0):
define void @test_localtime() {
%1 = alloca i32
store i32 1, i32* %1
%2 = call i32 @localtime(i32* %1)
%3 = load i32, i32* %1
%4 = icmp eq i32 %3, 1
%5 = zext i1 %4 to i32
%6 = call i32 @assert(i32 %5)
ret void
}

LLVM IR (-O2):
define void @test_localtime() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
store i32 1, i32* %1
%3 = call i32 @localtime(i32* %1)
%4 = load i32, i32* %1
%5 = icmp eq i32 %4, 1
%6 = zext i1 %5 to i32
%7 = call i32 @assert(i32 %6)
ret void
}
double Sleef_cbrt_u10(double x) { return __builtin_cbrt(x); }


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

x86 assembly (clang, -O2):
<Sleef_cbrt_u10>:
jmp    1030 <cbrt@plt>

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

LLVM IR (-O2):
define double @Sleef_cbrt_u10(double %0) {
%2 = tail call double @cbrt(double %0)
ret double %2
}
void destory(void *key, void *val) { return; }


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

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

LLVM IR (-O0):
define void @destory(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
store i8* %0, i8** %3
store i8* %1, i8** %4
ret void
}

LLVM IR (-O2):
define void @destory(i8* nocapture %0, i8* nocapture %1) {
ret void
}
/* Type definitions */
typedef int int32_t;

/* Variables and functions */
int /*<<< orphan*/ printf(char *, char *, char *, int, char *, int);
void exampleHandler(void *pvReceiver, void *pvSender, int32_t s32Info,
                    void *pvData, int32_t s32DataSize) {
  printf("%s: Sender %s fired callback with: Info = %d, Data = %s, Data size = "
         "%d \r\n",
         (char *)pvReceiver, (char *)pvSender, s32Info, (char *)pvData,
         s32DataSize);
}


x86 assembly (clang, -O0):
<exampleHandler>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    %rcx,-0x20(%rbp)
mov    %r8d,-0x24(%rbp)
mov    -0x8(%rbp),%rsi
mov    -0x10(%rbp),%rdx
mov    -0x14(%rbp),%ecx
mov    -0x20(%rbp),%r8
mov    -0x24(%rbp),%r9d
lea    0xebb(%rip),%rdi
call   1030 <printf@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<exampleHandler>:
mov    %r8d,%r9d
mov    %rcx,%r8
mov    %edx,%ecx
mov    %rsi,%rdx
mov    %rdi,%rsi
lea    0xedb(%rip),%rdi
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [75 x i8] c"%s: Sender %s fired callback with: Info = %d, Data = %s, Data size = %d \0D\0A\00"
define void @exampleHandler(i8* %0, i8* %1, i32 %2, i8* %3, i32 %4) {
%6 = alloca i8*
%7 = alloca i8*
%8 = alloca i32
%9 = alloca i8*
%10 = alloca i32
store i8* %0, i8** %6
store i8* %1, i8** %7
store i32 %2, i32* %8
store i8* %3, i8** %9
store i32 %4, i32* %10
%11 = load i8*, i8** %6
%12 = load i8*, i8** %7
%13 = load i32, i32* %8
%14 = load i8*, i8** %9
%15 = load i32, i32* %10
%16 = call i32 @printf(i8* getelementptr inbounds ([75 x i8], [75 x i8]* @.str, i64 0, i64 0), i8* %11, i8* %12, i32 %13, i8* %14, i32 %15)
ret void
}

LLVM IR (-O2):
@.str = [75 x i8] c"%s: Sender %s fired callback with: Info = %d, Data = %s, Data size = %d \0D\0A\00"
define void @exampleHandler(i8* %0, i8* %1, i32 %2, i8* %3, i32 %4) {
%6 = tail call i32 @printf(i8* getelementptr inbounds ([75 x i8], [75 x i8]* @.str, i64 0, i64 0), i8* %0, i8* %1, i32 %2, i8* %3, i32 %4)
ret void
}
void prune_alias_ge_Ok(int x) {
  int a[1];
  if (x >= x) {
    a[0] = 0;
  } else {
    a[1] = 0;
  }
}


x86 assembly (clang, -O0):
<prune_alias_ge_Ok>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
cmp    -0x4(%rbp),%eax
jl     111f <prune_alias_ge_Ok+0x1f>
movl   $0x0,-0x8(%rbp)
jmp    1126 <prune_alias_ge_Ok+0x26>
movl   $0x0,-0x4(%rbp)
pop    %rbp
ret

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

LLVM IR (-O0):
define void @prune_alias_ge_Ok(i32 %0) {
%2 = alloca i32
%3 = alloca [1 x i32]
store i32 %0, i32* %2
%4 = load i32, i32* %2
%5 = load i32, i32* %2
%6 = icmp sge i32 %4, %5
br i1 %6, label %7, label %9
7: ; preds = %1
%8 = getelementptr inbounds [1 x i32], [1 x i32]* %3, i64 0, i64 0
store i32 0, i32* %8
br label %11
9: ; preds = %1
%10 = getelementptr inbounds [1 x i32], [1 x i32]* %3, i64 0, i64 1
store i32 0, i32* %10
br label %11
11: ; preds = %9, %7
ret void
}

LLVM IR (-O2):
define void @prune_alias_ge_Ok(i32 %0) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int help(void) { printf("No help\n"); }


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

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

LLVM IR (-O0):
@.str = [9 x i8] c"No help\0A\00"
define i32 @help() {
%1 = alloca i32
%2 = call i32 @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0))
%3 = load i32, i32* %1
ret i32 %3
}

LLVM IR (-O2):
@str = [8 x i8] c"No help\00"
define i32 @help() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([8 x i8], [8 x i8]* @str, i64 0, i64 0))
ret i32 undef
}