xunge/DecIR huggingface dataset:
int ieee_flags(const char *a, const char *b, const char *c, char **d) {
  *d = "not available";
  return 1;
}


x86 assembly (clang, -O0):
<ieee_flags>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    -0x20(%rbp),%rax
lea    0xee1(%rip),%rcx
mov    %rcx,(%rax)
mov    $0x1,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<ieee_flags>:
lea    0xef9(%rip),%rax
mov    %rax,(%rcx)
mov    $0x1,%eax
ret

LLVM IR (-O0):
@.str = [14 x i8] c"not available\00"
define i32 @ieee_flags(i8* %0, i8* %1, i8* %2, i8** %3) {
%5 = alloca i8*
%6 = alloca i8*
%7 = alloca i8*
%8 = alloca i8**
store i8* %0, i8** %5
store i8* %1, i8** %6
store i8* %2, i8** %7
store i8** %3, i8*** %8
%9 = load i8**, i8*** %8
store i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0), i8** %9
ret i32 1
}

LLVM IR (-O2):
@.str = [14 x i8] c"not available\00"
define i32 @ieee_flags(i8* nocapture readnone %0, i8* nocapture readnone %1, i8* nocapture readnone %2, i8** nocapture writeonly %3) {
store i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0), i8** %3
ret i32 1
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int, int, int);
int rand();
int zar_atma(void) {
  int zar_1, zar_2, toplam_zar;
  zar_1 = 1 + (rand() % 6);
  zar_2 = 1 + (rand() % 6);
  toplam_zar = zar_1 + zar_2;
  printf("Oyuncu %d + %d = %d atti\n", zar_1, zar_2, toplam_zar);
  return toplam_zar;
}


x86 assembly (clang, -O0):
<zar_atma>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1040 <rand@plt>
mov    $0x6,%ecx
cltd
idiv   %ecx
add    $0x1,%edx
mov    %edx,-0x4(%rbp)
mov    $0x0,%al
call   1040 <rand@plt>
mov    $0x6,%ecx
cltd
idiv   %ecx
add    $0x1,%edx
mov    %edx,-0x8(%rbp)
mov    -0x4(%rbp),%eax
add    -0x8(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0x4(%rbp),%esi
mov    -0x8(%rbp),%edx
mov    -0xc(%rbp),%ecx
lea    0xe95(%rip),%rdi
call   1030 <printf@plt>
mov    -0xc(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<zar_atma>:
push   %rbp
push   %rbx
push   %rax
xor    %eax,%eax
call   1040 <rand@plt>
cltq
imul   $0x2aaaaaab,%rax,%rcx
mov    %rcx,%rdx
shr    $0x3f,%rdx
shr    $0x20,%rcx
add    %edx,%ecx
add    %ecx,%ecx
lea    (%rcx,%rcx,2),%ecx
neg    %ecx
lea    (%rax,%rcx,1),%ebx
add    $0x1,%ebx
xor    %eax,%eax
call   1040 <rand@plt>
cltq
imul   $0x2aaaaaab,%rax,%rcx
mov    %rcx,%rdx
shr    $0x3f,%rdx
shr    $0x20,%rcx
add    %edx,%ecx
add    %ecx,%ecx
lea    (%rcx,%rcx,2),%ecx
neg    %ecx
lea    (%rax,%rcx,1),%edx
add    $0x1,%edx
lea    (%rdx,%rbx,1),%ebp
lea    0xe7f(%rip),%rdi
mov    %ebx,%esi
mov    %ebp,%ecx
call   1030 <printf@plt>
mov    %ebp,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
@.str = [26 x i8] c"Oyuncu %d + %d = %d atti\0A\00"
define i32 @zar_atma() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = call i32 (...) @rand()
%5 = srem i32 %4, 6
%6 = add nsw i32 1, %5
store i32 %6, i32* %1
%7 = call i32 (...) @rand()
%8 = srem i32 %7, 6
%9 = add nsw i32 1, %8
store i32 %9, i32* %2
%10 = load i32, i32* %1
%11 = load i32, i32* %2
%12 = add nsw i32 %10, %11
store i32 %12, i32* %3
%13 = load i32, i32* %1
%14 = load i32, i32* %2
%15 = load i32, i32* %3
%16 = call i32 @printf(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str, i64 0, i64 0), i32 %13, i32 %14, i32 %15)
%17 = load i32, i32* %3
ret i32 %17
}

LLVM IR (-O2):
@.str = [26 x i8] c"Oyuncu %d + %d = %d atti\0A\00"
define i32 @zar_atma() {
%1 = tail call i32 (...) @rand()
%2 = srem i32 %1, 6
%3 = add nsw i32 %2, 1
%4 = tail call i32 (...) @rand()
%5 = srem i32 %4, 6
%6 = add nsw i32 %5, 1
%7 = add nsw i32 %6, %3
%8 = tail call i32 @printf(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str, i64 0, i64 0), i32 %3, i32 %6, i32 %7)
ret i32 %7
}
/* Type definitions */
typedef int /*<<< orphan*/ SXNET;
typedef int /*<<< orphan*/ ASN1_VALUE;

/* Variables and functions */
int ASN1_item_i2d(int /*<<< orphan*/ *, unsigned char **, int /*<<< orphan*/ *);
int /*<<< orphan*/ SXNET_it;
int i2d_SXNET(SXNET *a, unsigned char **out) {
  return ASN1_item_i2d((ASN1_VALUE *)a, out, &SXNET_it);
}


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

x86 assembly (clang, -O2):
<i2d_SXNET>:
mov    0x2ed1(%rip),%rdx
jmp    1030 <ASN1_item_i2d@plt>

LLVM IR (-O0):
@SXNET_it = global i32 0
define i32 @i2d_SXNET(i32* %0, i8** %1) {
%3 = alloca i32*
%4 = alloca i8**
store i32* %0, i32** %3
store i8** %1, i8*** %4
%5 = load i32*, i32** %3
%6 = load i8**, i8*** %4
%7 = call i32 @ASN1_item_i2d(i32* %5, i8** %6, i32* @SXNET_it)
ret i32 %7
}

LLVM IR (-O2):
@SXNET_it = global i32 0
define i32 @i2d_SXNET(i32* %0, i8** %1) {
%3 = tail call i32 @ASN1_item_i2d(i32* %0, i8** %1, i32* @SXNET_it)
ret i32 %3
}
float div_by_pow_2(float x, int n) { return x; }


x86 assembly (clang, -O0):
<div_by_pow_2>:
push   %rbp
mov    %rsp,%rbp
movss  %xmm0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
movss  -0x4(%rbp),%xmm0
pop    %rbp
ret

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

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

LLVM IR (-O2):
define float @div_by_pow_2(float returned %0, i32 %1) {
ret float %0
}
/* Variables and functions */
int ksft_exit_pass();
int /*<<< orphan*/ ksft_print_header();
int /*<<< orphan*/ ksft_set_plan(int);
int /*<<< orphan*/ test_pidfd_dead_fdinfo();
int /*<<< orphan*/ test_pidfd_fdinfo_nspid();
int main(int argc, char **argv) {
  ksft_print_header();
  ksft_set_plan(2);
  test_pidfd_fdinfo_nspid();
  test_pidfd_dead_fdinfo();
  return ksft_exit_pass();
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    $0x0,%al
call   1070 <ksft_print_header@plt>
mov    $0x2,%edi
call   1030 <ksft_set_plan@plt>
mov    $0x0,%al
call   1060 <test_pidfd_fdinfo_nspid@plt>
mov    $0x0,%al
call   1050 <test_pidfd_dead_fdinfo@plt>
mov    $0x0,%al
call   1040 <ksft_exit_pass@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1070 <ksft_print_header@plt>
mov    $0x2,%edi
call   1030 <ksft_set_plan@plt>
xor    %eax,%eax
call   1060 <test_pidfd_fdinfo_nspid@plt>
xor    %eax,%eax
call   1050 <test_pidfd_dead_fdinfo@plt>
xor    %eax,%eax
pop    %rcx
jmp    1040 <ksft_exit_pass@plt>

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

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 (...) @ksft_print_header()
%4 = tail call i32 @ksft_set_plan(i32 2)
%5 = tail call i32 (...) @test_pidfd_fdinfo_nspid()
%6 = tail call i32 (...) @test_pidfd_dead_fdinfo()
%7 = tail call i32 (...) @ksft_exit_pass()
ret i32 %7
}
/* Variables and functions */
int CALL(int);
int FUNCTION(int a) { return CALL(a) + 3; }


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

x86 assembly (clang, -O2):
<FUNCTION>:
push   %rax
call   1030 <CALL@plt>
add    $0x3,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
define i32 @FUNCTION(i32 %0) {
%2 = tail call i32 @CALL(i32 %0)
%3 = add nsw i32 %2, 3
ret i32 %3
}
int iswhite(int c) {
  switch (c) {
  case '\t':
  case '\v':
  case '\f':
  case ' ':
    return 1;
  }
  return 0;
}


x86 assembly (clang, -O0):
<iswhite>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
mov    -0x8(%rbp),%eax
mov    %eax,-0xc(%rbp)
sub    $0x9,%eax
je     1140 <iswhite+0x40>
jmp    111b <iswhite+0x1b>
mov    -0xc(%rbp),%eax
add    $0xfffffff5,%eax
sub    $0x2,%eax
jb     1140 <iswhite+0x40>
jmp    112f <iswhite+0x2f>
mov    -0xc(%rbp),%eax
sub    $0x20,%eax
jne    114c <iswhite+0x4c>
jmp    1140 <iswhite+0x40>
movl   $0x1,-0x4(%rbp)
jmp    1153 <iswhite+0x53>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<iswhite>:
cmp    $0x20,%edi
ja     111d <iswhite+0x1d>
mov    $0x1,%eax
mov    %edi,%ecx
movabs $0x100001a00,%rdx
bt     %rcx,%rdx
jae    111d <iswhite+0x1d>
ret
xor    %eax,%eax
ret

LLVM IR (-O0):
define i32 @iswhite(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %3
%4 = load i32, i32* %3
switch i32 %4, label %6 [
i32 9, label %5
i32 11, label %5
i32 12, label %5
i32 32, label %5
]
5: ; preds = %1, %1, %1, %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 @iswhite(i32 %0) {
switch i32 %0, label %2 [
i32 9, label %3
i32 11, label %3
i32 12, label %3
i32 32, label %3
]
2: ; preds = %1
br label %3
3: ; preds = %1, %1, %1, %1, %2
%4 = phi i32 [ 0, %2 ], [ 1, %1 ], [ 1, %1 ], [ 1, %1 ], [ 1, %1 ]
ret i32 %4
}
/* Variables and functions */
char *format(char *, char *);
int strlen(char *);
char *drop_last_slash(char *s) {
  char *r = format("%s", s);
  char *p = r + strlen(r) - 1;
  if (*p == '/')
    *p = '\0';
  return r;
}


x86 assembly (clang, -O0):
<drop_last_slash>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rsi
lea    0xec9(%rip),%rdi
call   1040 <format@plt>
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x20(%rbp)
mov    -0x10(%rbp),%rdi
call   1030 <strlen@plt>
mov    %eax,%ecx
mov    -0x20(%rbp),%rax
movslq %ecx,%rcx
add    %rcx,%rax
add    $0xffffffffffffffff,%rax
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x2f,%eax
jne    117c <drop_last_slash+0x5c>
mov    -0x18(%rbp),%rax
movb   $0x0,(%rax)
mov    -0x10(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<drop_last_slash>:
push   %rbx
mov    %rdi,%rsi
lea    0xed5(%rip),%rdi
call   1040 <format@plt>
mov    %rax,%rbx
mov    %rax,%rdi
call   1030 <strlen@plt>
cltq
cmpb   $0x2f,-0x1(%rbx,%rax,1)
jne    1149 <drop_last_slash+0x29>
movb   $0x0,-0x1(%rbx,%rax,1)
mov    %rbx,%rax
pop    %rbx
ret

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

LLVM IR (-O2):
@.str = [3 x i8] c"%s\00"
define i8* @drop_last_slash(i8* %0) {
%2 = tail call i8* @format(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* %0)
%3 = tail call i32 @strlen(i8* %2)
%4 = sext i32 %3 to i64
%5 = getelementptr inbounds i8, i8* %2, i64 %4
%6 = getelementptr inbounds i8, i8* %5, i64 -1
%7 = load i8, i8* %6
%8 = icmp eq i8 %7, 47
br i1 %8, label %9, label %10
9: ; preds = %1
store i8 0, i8* %6
br label %10
10: ; preds = %9, %1
ret i8* %2
}
void sl_term(void) {}


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

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

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

LLVM IR (-O2):
define void @sl_term() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ pfan_draw_char(int, char, unsigned short *);
void Test_26chars(unsigned short display[156]) {
  for (int i = 0; i < 26; ++i)
    pfan_draw_char(i * 6, 'A', display);
}


x86 assembly (clang, -O0):
<Test_26chars>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
cmpl   $0x1a,-0xc(%rbp)
jge    114d <Test_26chars+0x3d>
imul   $0x6,-0xc(%rbp),%edi
mov    -0x8(%rbp),%rdx
mov    $0x41,%esi
call   1030 <pfan_draw_char@plt>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1123 <Test_26chars+0x13>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Test_26chars>:
push   %rbp
push   %rbx
push   %rax
mov    %rdi,%rbx
xor    %ebp,%ebp
nopl   0x0(%rax,%rax,1)
mov    %ebp,%edi
mov    $0x41,%esi
mov    %rbx,%rdx
call   1030 <pfan_draw_char@plt>
add    $0x6,%ebp
cmp    $0x9c,%ebp
jne    1120 <Test_26chars+0x10>
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
define void @Test_26chars(i16* %0) {
%2 = alloca i16*
%3 = alloca i32
store i16* %0, i16** %2
store i32 0, i32* %3
br label %4
4: ; preds = %12, %1
%5 = load i32, i32* %3
%6 = icmp slt i32 %5, 26
br i1 %6, label %7, label %15
7: ; preds = %4
%8 = load i32, i32* %3
%9 = mul nsw i32 %8, 6
%10 = load i16*, i16** %2
%11 = call i32 @pfan_draw_char(i32 %9, i8 signext 65, i16* %10)
br label %12
12: ; preds = %7
%13 = load i32, i32* %3
%14 = add nsw i32 %13, 1
store i32 %14, i32* %3
br label %4
15: ; preds = %4
ret void
}

LLVM IR (-O2):
define void @Test_26chars(i16* %0) {
br label %3
2: ; preds = %3
ret void
3: ; preds = %1, %3
%4 = phi i32 [ 0, %1 ], [ %7, %3 ]
%5 = mul nuw nsw i32 %4, 6
%6 = tail call i32 @pfan_draw_char(i32 %5, i8 signext 65, i16* %0)
%7 = add nuw nsw i32 %4, 1
%8 = icmp eq i32 %7, 26
br i1 %8, label %2, label %3
}
void *Loadp(void *ptr) { return __atomic_load_n((void **)ptr, 2); }


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

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

LLVM IR (-O0):
define i8* @Loadp(i8* %0) {
%2 = alloca i8*
%3 = alloca i8*
store i8* %0, i8** %2
%4 = load i8*, i8** %2
%5 = bitcast i8* %4 to i8**
%6 = bitcast i8** %5 to i64*
%7 = bitcast i8** %3 to i64*
%8 = load atomic i64, i64* %6 acquire
store i64 %8, i64* %7
%9 = bitcast i64* %7 to i8**
%10 = load i8*, i8** %9
ret i8* %10
}

LLVM IR (-O2):
define i8* @Loadp(i8* nocapture %0) {
%2 = bitcast i8* %0 to i64*
%3 = load atomic i64, i64* %2 acquire
%4 = inttoptr i64 %3 to i8*
ret i8* %4
}
void swift_getObjCClassMetadata(void) {}


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

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

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

LLVM IR (-O2):
define void @swift_getObjCClassMetadata() {
ret void
}
/* Type definitions */
struct __test_metadata {
  int dummy;
};
struct __fixture_variant_metadata {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ epoll49(struct __test_metadata *);
void wrapper_epoll49(struct __test_metadata *_metadata,
                     struct __fixture_variant_metadata *variant) {
  epoll49(_metadata);
}


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

x86 assembly (clang, -O2):
<wrapper_epoll49>:
jmp    1030 <epoll49@plt>

LLVM IR (-O0):
%struct.__test_metadata = type { i32 }
%struct.__fixture_variant_metadata = type { i32 }
define void @wrapper_epoll49(%struct.__test_metadata* %0, %struct.__fixture_variant_metadata* %1) {
%3 = alloca %struct.__test_metadata*
%4 = alloca %struct.__fixture_variant_metadata*
store %struct.__test_metadata* %0, %struct.__test_metadata** %3
store %struct.__fixture_variant_metadata* %1, %struct.__fixture_variant_metadata** %4
%5 = load %struct.__test_metadata*, %struct.__test_metadata** %3
%6 = call i32 @epoll49(%struct.__test_metadata* %5)
ret void
}

LLVM IR (-O2):
%struct.__test_metadata = type { i32 }
%struct.__fixture_variant_metadata = type { i32 }
define void @wrapper_epoll49(%struct.__test_metadata* %0, %struct.__fixture_variant_metadata* nocapture readnone %1) {
%3 = tail call i32 @epoll49(%struct.__test_metadata* %0)
ret void
}
int condition_semicolon(char c) { return c == ';'; }


x86 assembly (clang, -O0):
<condition_semicolon>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movsbl -0x1(%rbp),%eax
cmp    $0x3b,%eax
sete   %al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<condition_semicolon>:
xor    %eax,%eax
cmp    $0x3b,%dil
sete   %al
ret

LLVM IR (-O0):
define i32 @condition_semicolon(i8 signext %0) {
%2 = alloca i8
store i8 %0, i8* %2
%3 = load i8, i8* %2
%4 = sext i8 %3 to i32
%5 = icmp eq i32 %4, 59
%6 = zext i1 %5 to i32
ret i32 %6
}

LLVM IR (-O2):
define i32 @condition_semicolon(i8 signext %0) {
%2 = icmp eq i8 %0, 59
%3 = zext i1 %2 to i32
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int main(int argc, char **argv) { printf("Hello, world!\n"); }


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

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xee8(%rip),%rdi
call   1030 <puts@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [15 x i8] c"Hello, world!\0A\00"
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 @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@str = [14 x i8] c"Hello, world!\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([14 x i8], [14 x i8]* @str, i64 0, i64 0))
ret i32 0
}
double max(double a, double b, double c) {
  double _max = a;
  if (_max < b)
    _max = b;
  if (_max < c)
    _max = c;
  return _max;
}


x86 assembly (clang, -O0):
<max>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  %xmm2,-0x18(%rbp)
movsd  -0x8(%rbp),%xmm0
movsd  %xmm0,-0x20(%rbp)
movsd  -0x20(%rbp),%xmm1
movsd  -0x10(%rbp),%xmm0
ucomisd %xmm1,%xmm0
jbe    113b <max+0x3b>
movsd  -0x10(%rbp),%xmm0
movsd  %xmm0,-0x20(%rbp)
movsd  -0x20(%rbp),%xmm1
movsd  -0x18(%rbp),%xmm0
ucomisd %xmm1,%xmm0
jbe    1159 <max+0x59>
movsd  -0x18(%rbp),%xmm0
movsd  %xmm0,-0x20(%rbp)
movsd  -0x20(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<max>:
maxsd  %xmm0,%xmm1
maxsd  %xmm1,%xmm2
movapd %xmm2,%xmm0
ret

LLVM IR (-O0):
define double @max(double %0, double %1, double %2) {
%4 = alloca double
%5 = alloca double
%6 = alloca double
%7 = alloca double
store double %0, double* %4
store double %1, double* %5
store double %2, double* %6
%8 = load double, double* %4
store double %8, double* %7
%9 = load double, double* %7
%10 = load double, double* %5
%11 = fcmp olt double %9, %10
br i1 %11, label %12, label %14
12: ; preds = %3
%13 = load double, double* %5
store double %13, double* %7
br label %14
14: ; preds = %12, %3
%15 = load double, double* %7
%16 = load double, double* %6
%17 = fcmp olt double %15, %16
br i1 %17, label %18, label %20
18: ; preds = %14
%19 = load double, double* %6
store double %19, double* %7
br label %20
20: ; preds = %18, %14
%21 = load double, double* %7
ret double %21
}

LLVM IR (-O2):
define double @max(double %0, double %1, double %2) {
%4 = fcmp olt double %0, %1
%5 = select i1 %4, double %1, double %0
%6 = fcmp olt double %5, %2
%7 = select i1 %6, double %2, double %5
ret double %7
}
/* Variables and functions */
int /*<<< orphan*/ app_init(char *, int);
int dpdk_linux_tcpip_init(int, char **);
int /*<<< orphan*/ printf(char *);
int main(int argc, char **argv) {
  int ret = dpdk_linux_tcpip_init(argc, argv);
  if (ret < 0) {
    printf("Invalid arguments\n");
    return 1;
  }
  app_init("192.168.1.1", 7777);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%edi
mov    -0x10(%rbp),%rsi
call   1050 <dpdk_linux_tcpip_init@plt>
mov    %eax,-0x14(%rbp)
cmpl   $0x0,-0x14(%rbp)
jge    1177 <main+0x47>
lea    0xe9a(%rip),%rdi
call   1040 <printf@plt>
movl   $0x1,-0x4(%rbp)
jmp    118f <main+0x5f>
lea    0xe95(%rip),%rdi
mov    $0x1e61,%esi
call   1030 <app_init@plt>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
call   1050 <dpdk_linux_tcpip_init@plt>
test   %eax,%eax
js     114f <main+0x1f>
lea    0xebf(%rip),%rdi
mov    $0x1e61,%esi
call   1030 <app_init@plt>
xor    %eax,%eax
pop    %rcx
ret
lea    0xeb6(%rip),%rdi
call   1040 <puts@plt>
mov    $0x1,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [19 x i8] c"Invalid arguments\0A\00"
@.str.1 = [12 x i8] c"192.168.1.1\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i32
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%7 = load i32, i32* %4
%8 = load i8**, i8*** %5
%9 = call i32 @dpdk_linux_tcpip_init(i32 %7, i8** %8)
store i32 %9, i32* %6
%10 = load i32, i32* %6
%11 = icmp slt i32 %10, 0
br i1 %11, label %12, label %14
12: ; preds = %2
%13 = call i32 @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0))
store i32 1, i32* %3
br label %16
14: ; preds = %2
%15 = call i32 @app_init(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.1, i64 0, i64 0), i32 7777)
store i32 0, i32* %3
br label %16
16: ; preds = %14, %12
%17 = load i32, i32* %3
ret i32 %17
}

LLVM IR (-O2):
@.str.1 = [12 x i8] c"192.168.1.1\00"
@str = [18 x i8] c"Invalid arguments\00"
define i32 @main(i32 %0, i8** %1) {
%3 = tail call i32 @dpdk_linux_tcpip_init(i32 %0, i8** %1)
%4 = icmp slt i32 %3, 0
br i1 %4, label %5, label %7
5: ; preds = %2
%6 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([18 x i8], [18 x i8]* @str, i64 0, i64 0))
br label %9
7: ; preds = %2
%8 = tail call i32 @app_init(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.1, i64 0, i64 0), i32 7777)
br label %9
9: ; preds = %7, %5
%10 = phi i32 [ 1, %5 ], [ 0, %7 ]
ret i32 %10
}
char get_r_rt(int inst) { return ((inst & 0x001F0000) >> 16); }


x86 assembly (clang, -O0):
<get_r_rt>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
and    $0x1f0000,%eax
sar    $0x10,%eax
movsbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_r_rt>:
mov    %edi,%eax
shr    $0x10,%eax
and    $0x1f,%al
ret

LLVM IR (-O0):
define signext i8 @get_r_rt(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = and i32 %3, 2031616
%5 = ashr i32 %4, 16
%6 = trunc i32 %5 to i8
ret i8 %6
}

LLVM IR (-O2):
define signext i8 @get_r_rt(i32 %0) {
%2 = lshr i32 %0, 16
%3 = trunc i32 %2 to i8
%4 = and i8 %3, 31
ret i8 %4
}
float brick_noise(int n) {
  int nn;
  n = (n + 1013) & 0x7fffffff;
  n = (n >> 13) ^ n;
  nn = (n * (n * n * 60493 + 19990303) + 1376312589) & 0x7fffffff;
  return 0.5f * ((float)nn / 1073741824.0f);
}


x86 assembly (clang, -O0):
<brick_noise>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x3f5,%eax
and    $0x7fffffff,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
sar    $0xd,%eax
xor    -0x4(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
mov    -0x4(%rbp),%ecx
imul   -0x4(%rbp),%ecx
imul   $0xec4d,%ecx,%ecx
add    $0x131071f,%ecx
imul   %ecx,%eax
add    $0x5208dd0d,%eax
and    $0x7fffffff,%eax
mov    %eax,-0x8(%rbp)
cvtsi2ssl -0x8(%rbp),%xmm1
movss  0xeae(%rip),%xmm0
divss  %xmm0,%xmm1
movss  0xe9e(%rip),%xmm0
mulss  %xmm1,%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<brick_noise>:
add    $0x3f5,%edi
and    $0x7fffffff,%edi
mov    %edi,%eax
shr    $0xd,%eax
xor    %edi,%eax
mov    %eax,%ecx
imul   %eax,%ecx
imul   $0xec4d,%ecx,%ecx
add    $0x131071f,%ecx
imul   %eax,%ecx
add    $0x5208dd0d,%ecx
cvtsi2ss %ecx,%xmm0
mulss  0xec7(%rip),%xmm0
mulss  0xec3(%rip),%xmm0
ret

LLVM IR (-O0):
define float @brick_noise(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %2
%4 = load i32, i32* %2
%5 = add nsw i32 %4, 1013
%6 = and i32 %5, 2147483647
store i32 %6, i32* %2
%7 = load i32, i32* %2
%8 = ashr i32 %7, 13
%9 = load i32, i32* %2
%10 = xor i32 %8, %9
store i32 %10, i32* %2
%11 = load i32, i32* %2
%12 = load i32, i32* %2
%13 = load i32, i32* %2
%14 = mul nsw i32 %12, %13
%15 = mul nsw i32 %14, 60493
%16 = add nsw i32 %15, 19990303
%17 = mul nsw i32 %11, %16
%18 = add nsw i32 %17, 1376312589
%19 = and i32 %18, 2147483647
store i32 %19, i32* %3
%20 = load i32, i32* %3
%21 = sitofp i32 %20 to float
%22 = fdiv float %21, 0x41D0000000000000
%23 = fmul float 5.000000e-01, %22
ret float %23
}

LLVM IR (-O2):
define float @brick_noise(i32 %0) {
%2 = add nsw i32 %0, 1013
%3 = and i32 %2, 2147483647
%4 = lshr i32 %3, 13
%5 = xor i32 %4, %3
%6 = mul i32 %5, 60493
%7 = mul i32 %6, %5
%8 = add nuw nsw i32 %7, 19990303
%9 = mul nsw i32 %8, %5
%10 = add nuw nsw i32 %9, 1376312589
%11 = sitofp i32 %10 to float
%12 = fmul float %11, 0x3E10000000000000
%13 = fmul float %12, 5.000000e-01
ret float %13
}
/* Variables and functions */
int convert_sound();
int main(int argc, char *argv[]) { return convert_sound(); }


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

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

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

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 (...) @convert_sound()
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
int /*<<< orphan*/ stderr;
void badusage(void) {
  fprintf(stderr,
          "Usage: fsacount [-is n] [-ip d/s] [-silent] [-v] [filename]\n");
  exit(1);
}


x86 assembly (clang, -O0):
<badusage>:
push   %rbp
mov    %rsp,%rbp
mov    0x2eb5(%rip),%rax
mov    (%rax),%edi
lea    0xecc(%rip),%rsi
call   1030 <fprintf@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<badusage>:
push   %rax
mov    0x2eb8(%rip),%rax
mov    (%rax),%edi
lea    0xecf(%rip),%rsi
call   1030 <fprintf@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [61 x i8] c"Usage: fsacount [-is n] [-ip d/s] [-silent] [-v] [filename]\0A\00"
define void @badusage() {
%1 = load i32, i32* @stderr
%2 = call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([61 x i8], [61 x i8]* @.str, i64 0, i64 0))
%3 = call i32 @exit(i32 1)
unreachable
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [61 x i8] c"Usage: fsacount [-is n] [-ip d/s] [-silent] [-v] [filename]\0A\00"
define void @badusage() {
%1 = load i32, i32* @stderr
%2 = tail call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([61 x i8], [61 x i8]* @.str, i64 0, i64 0))
%3 = tail call i32 @exit(i32 1)
unreachable
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
scalar_t__ malloc(int);
int /*<<< orphan*/ printf(char *);
int *CreateIntMatrix(int NumberOfCharacters) {
  int *IntMatrix;
  IntMatrix = (int *)malloc(NumberOfCharacters * sizeof(int));
  if (IntMatrix == NULL) {
    printf("Out of memory!\n");
    exit(3);
  }
  return IntMatrix;
}


x86 assembly (clang, -O0):
<CreateIntMatrix>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
movslq -0x4(%rbp),%rax
shl    $0x2,%rax
mov    %eax,%edi
call   1040 <malloc@plt>
mov    %rax,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
jne    116f <CreateIntMatrix+0x3f>
lea    0xea0(%rip),%rdi
call   1030 <printf@plt>
mov    $0x3,%edi
call   1050 <exit@plt>
mov    -0x10(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<CreateIntMatrix>:
push   %rax
shl    $0x2,%edi
call   1040 <malloc@plt>
test   %rax,%rax
je     1140 <CreateIntMatrix+0x10>
pop    %rcx
ret
lea    0xeb9(%rip),%rdi
call   1030 <puts@plt>
mov    $0x3,%edi
call   1050 <exit@plt>

LLVM IR (-O0):
@.str = [16 x i8] c"Out of memory!\0A\00"
define i32* @CreateIntMatrix(i32 %0) {
%2 = alloca i32
%3 = alloca i32*
store i32 %0, i32* %2
%4 = load i32, i32* %2
%5 = sext i32 %4 to i64
%6 = mul i64 %5, 4
%7 = trunc i64 %6 to i32
%8 = call i64 @malloc(i32 %7)
%9 = inttoptr i64 %8 to i32*
store i32* %9, i32** %3
%10 = load i32*, i32** %3
%11 = icmp eq i32* %10, null
br i1 %11, label %12, label %15
12: ; preds = %1
%13 = call i32 @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0))
%14 = call i32 @exit(i32 3)
unreachable
15: ; preds = %1
%16 = load i32*, i32** %3
ret i32* %16
}

LLVM IR (-O2):
@str = [15 x i8] c"Out of memory!\00"
define i32* @CreateIntMatrix(i32 %0) {
%2 = shl i32 %0, 2
%3 = tail call i64 @malloc(i32 %2)
%4 = icmp eq i64 %3, 0
br i1 %4, label %5, label %8
5: ; preds = %1
%6 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([15 x i8], [15 x i8]* @str, i64 0, i64 0))
%7 = tail call i32 @exit(i32 3)
unreachable
8: ; preds = %1
%9 = inttoptr i64 %3 to i32*
ret i32* %9
}
/* Variables and functions */
int iguistep_(float *, int *);
int IGUISTEP(float pparcs[], int kdatim[]) { return iguistep_(pparcs, kdatim); }


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

x86 assembly (clang, -O2):
<IGUISTEP>:
jmp    1030 <iguistep_@plt>

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

LLVM IR (-O2):
define i32 @IGUISTEP(float* %0, i32* %1) {
%3 = tail call i32 @iguistep_(float* %0, i32* %1)
ret i32 %3
}
/* Type definitions */
typedef int /*<<< orphan*/ XEvent;

/* Variables and functions */
int /*<<< orphan*/ abort();
int /*<<< orphan*/ free(int /*<<< orphan*/ *);
void free_XEvent(void *_p) {
  if (_p == NULL)
    abort();
  free((XEvent *)_p);
}


x86 assembly (clang, -O0):
<free_XEvent>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
cmpq   $0x0,-0x8(%rbp)
jne    113e <free_XEvent+0x1e>
mov    $0x0,%al
call   1040 <abort@plt>
mov    -0x8(%rbp),%rdi
call   1030 <free@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<free_XEvent>:
test   %rdi,%rdi
je     112a <free_XEvent+0xa>
jmp    1030 <free@plt>
push   %rax
xor    %eax,%eax
call   1040 <abort@plt>

LLVM IR (-O0):
define void @free_XEvent(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = icmp eq i8* %3, null
br i1 %4, label %5, label %7
5: ; preds = %1
%6 = call i32 (...) @abort()
unreachable
7: ; preds = %1
%8 = load i8*, i8** %2
%9 = bitcast i8* %8 to i32*
%10 = call i32 @free(i32* %9)
ret void
}

LLVM IR (-O2):
define void @free_XEvent(i8* %0) {
%2 = icmp eq i8* %0, null
br i1 %2, label %3, label %5
3: ; preds = %1
%4 = tail call i32 (...) @abort()
unreachable
5: ; preds = %1
%6 = bitcast i8* %0 to i32*
%7 = tail call i32 @free(i32* %6)
ret void
}
void foo809(int p) {}


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

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

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

LLVM IR (-O2):
define void @foo809(i32 %0) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ print_menu_hdr(char *);
int /*<<< orphan*/ printf(char *);
int delete_empl() {
  print_menu_hdr("DELETE");
  printf("\n Menu2: Delete is not implemented.");
}


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

x86 assembly (clang, -O2):
<delete_empl>:
push   %rax
lea    0xed8(%rip),%rdi
call   1030 <print_menu_hdr@plt>
lea    0xed3(%rip),%rdi
pop    %rax
jmp    1040 <printf@plt>

LLVM IR (-O0):
@.str = [7 x i8] c"DELETE\00"
@.str.1 = [36 x i8] c"\0A Menu2: Delete is not implemented.\00"
define i32 @delete_empl() {
%1 = alloca i32
%2 = call i32 @print_menu_hdr(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0))
%3 = call i32 @printf(i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str.1, i64 0, i64 0))
%4 = load i32, i32* %1
ret i32 %4
}

LLVM IR (-O2):
@.str = [7 x i8] c"DELETE\00"
@.str.1 = [36 x i8] c"\0A Menu2: Delete is not implemented.\00"
define i32 @delete_empl() {
%1 = tail call i32 @print_menu_hdr(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0))
%2 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([36 x i8], [36 x i8]* @.str.1, i64 0, i64 0))
ret i32 undef
}
/* Variables and functions */
int PnameDef();
PfigureGroupNameDef() {
  int b = -1;
  ;
  b = PnameDef();
  return (b);
}


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

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

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

LLVM IR (-O2):
define i32 @PfigureGroupNameDef() {
%1 = tail call i32 (...) @PnameDef()
ret i32 %1
}
/* Variables and functions */
int /*<<< orphan*/ abort();
int foo(int);
int main() {
  if (foo(1) != 3)
    abort();
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x1,%edi
call   1040 <foo@plt>
cmp    $0x3,%eax
je     1149 <main+0x29>
mov    $0x0,%al
call   1030 <abort@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    $0x1,%edi
call   1040 <foo@plt>
cmp    $0x3,%eax
jne    1134 <main+0x14>
xor    %eax,%eax
pop    %rcx
ret
xor    %eax,%eax
call   1030 <abort@plt>

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 @foo(i32 1)
%3 = icmp ne i32 %2, 3
br i1 %3, label %4, label %6
4: ; preds = %0
%5 = call i32 (...) @abort()
unreachable
6: ; preds = %0
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 @foo(i32 1)
%2 = icmp eq i32 %1, 3
br i1 %2, label %5, label %3
3: ; preds = %0
%4 = tail call i32 (...) @abort()
unreachable
5: ; preds = %0
ret i32 0
}
/* Variables and functions */
char *secure_getenv(char const *);
char *strdup(char *);
char *getenvdup(const char *varname) {
  char *envvar = secure_getenv(varname);
  if (envvar == NULL || envvar[0] == 0)
    return NULL;
  else
    return strdup(envvar);
}


x86 assembly (clang, -O0):
<getenvdup>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
call   1030 <secure_getenv@plt>
mov    %rax,-0x18(%rbp)
cmpq   $0x0,-0x18(%rbp)
je     1154 <getenvdup+0x34>
mov    -0x18(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x0,%eax
jne    1161 <getenvdup+0x41>
movq   $0x0,-0x8(%rbp)
jmp    116e <getenvdup+0x4e>
mov    -0x18(%rbp),%rdi
call   1040 <strdup@plt>
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<getenvdup>:
push   %rax
call   1030 <secure_getenv@plt>
test   %rax,%rax
je     1139 <getenvdup+0x19>
cmpb   $0x0,(%rax)
je     1139 <getenvdup+0x19>
mov    %rax,%rdi
pop    %rax
jmp    1040 <strdup@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i8* @getenvdup(i8* %0) {
%2 = alloca i8*
%3 = alloca i8*
%4 = alloca i8*
store i8* %0, i8** %3
%5 = load i8*, i8** %3
%6 = call i8* @secure_getenv(i8* %5)
store i8* %6, i8** %4
%7 = load i8*, i8** %4
%8 = icmp eq i8* %7, null
br i1 %8, label %15, label %9
9: ; preds = %1
%10 = load i8*, i8** %4
%11 = getelementptr inbounds i8, i8* %10, i64 0
%12 = load i8, i8* %11
%13 = sext i8 %12 to i32
%14 = icmp eq i32 %13, 0
br i1 %14, label %15, label %16
15: ; preds = %9, %1
store i8* null, i8** %2
br label %19
16: ; preds = %9
%17 = load i8*, i8** %4
%18 = call i8* @strdup(i8* %17)
store i8* %18, i8** %2
br label %19
19: ; preds = %16, %15
%20 = load i8*, i8** %2
ret i8* %20
}

LLVM IR (-O2):
define noalias i8* @getenvdup(i8* %0) {
%2 = tail call i8* @secure_getenv(i8* %0)
%3 = icmp eq i8* %2, null
br i1 %3, label %9, label %4
4: ; preds = %1
%5 = load i8, i8* %2
%6 = icmp eq i8 %5, 0
br i1 %6, label %9, label %7
7: ; preds = %4
%8 = tail call i8* @strdup(i8* %2)
br label %9
9: ; preds = %1, %4, %7
%10 = phi i8* [ %8, %7 ], [ null, %4 ], [ null, %1 ]
ret i8* %10
}
/* Type definitions */
struct in_addr {
  unsigned int s_addr;
};
typedef int /*<<< orphan*/ a;

/* Variables and functions */
char *inet_ntoa(struct in_addr);
int /*<<< orphan*/ memset(struct in_addr *, int /*<<< orphan*/, int);
char *my_ntoa(unsigned int ip) {
  struct in_addr a;
  memset(&a, 0, sizeof(a));
  a.s_addr = ip;
  return (inet_ntoa(a));
}


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

x86 assembly (clang, -O2):
<my_ntoa>:
push   %rbx
sub    $0x10,%rsp
mov    %edi,%ebx
lea    0x8(%rsp),%rdi
xor    %esi,%esi
mov    $0x4,%edx
call   1040 <memset@plt>
mov    %ebx,0x8(%rsp)
mov    %ebx,%edi
call   1030 <inet_ntoa@plt>
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
%struct.in_addr = type { i32 }
define i8* @my_ntoa(i32 %0) {
%2 = alloca i32
%3 = alloca %struct.in_addr
store i32 %0, i32* %2
%4 = call i32 @memset(%struct.in_addr* %3, i32 0, i32 4)
%5 = load i32, i32* %2
%6 = getelementptr inbounds %struct.in_addr, %struct.in_addr* %3, i32 0, i32 0
store i32 %5, i32* %6
%7 = getelementptr inbounds %struct.in_addr, %struct.in_addr* %3, i32 0, i32 0
%8 = load i32, i32* %7
%9 = call i8* @inet_ntoa(i32 %8)
ret i8* %9
}

LLVM IR (-O2):
%struct.in_addr = type { i32 }
define i8* @my_ntoa(i32 %0) {
%2 = alloca %struct.in_addr
%3 = bitcast %struct.in_addr* %2 to i8*
%4 = call i32 @memset(%struct.in_addr* %2, i32 0, i32 4)
%5 = getelementptr inbounds %struct.in_addr, %struct.in_addr* %2, i64 0, i32 0
store i32 %0, i32* %5
%6 = call i8* @inet_ntoa(i32 %0)
ret i8* %6
}
double call(double (*f)(double), double x) { return f(x); }


x86 assembly (clang, -O0):
<call>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
movsd  %xmm0,-0x10(%rbp)
mov    -0x8(%rbp),%rax
movsd  -0x10(%rbp),%xmm0
call   *%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<call>:
jmp    *%rdi

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

LLVM IR (-O2):
define double @call(double (double)* nocapture %0, double %1) {
%3 = tail call double %0(double %1)
ret double %3
}
/* Forward declarations */
typedef struct TYPE_4__ TYPE_2__;
typedef struct TYPE_3__ TYPE_1__;

/* Type definitions */
struct TYPE_3__ {
  scalar_t__ height;
};
struct TYPE_4__ {
  TYPE_1__ xresizerequest;
};
typedef TYPE_2__ XEvent;

/* Variables and functions */
int get_XEvent_xresizerequest_height(void *_p) {
  return (int)((XEvent *)_p)->xresizerequest.height;
}


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

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

LLVM IR (-O0):
%struct.TYPE_4__ = type { %struct.TYPE_3__ }
%struct.TYPE_3__ = type { i64 }
define i32 @get_XEvent_xresizerequest_height(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = bitcast i8* %3 to %struct.TYPE_4__*
%5 = getelementptr inbounds %struct.TYPE_4__, %struct.TYPE_4__* %4, i32 0, i32 0
%6 = getelementptr inbounds %struct.TYPE_3__, %struct.TYPE_3__* %5, i32 0, i32 0
%7 = load i64, i64* %6
%8 = trunc i64 %7 to i32
ret i32 %8
}

LLVM IR (-O2):
define i32 @get_XEvent_xresizerequest_height(i8* nocapture %0) {
%2 = bitcast i8* %0 to i64*
%3 = load i64, i64* %2
%4 = trunc i64 %3 to i32
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void ClearScreen() {
  printf("\033[2J");
  printf("\033[0;0f");
}


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

x86 assembly (clang, -O2):
<ClearScreen>:
push   %rax
lea    0xee8(%rip),%rdi
call   1030 <printf@plt>
lea    0xee1(%rip),%rdi
pop    %rax
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [5 x i8] c"\1B[2J\00"
@.str.1 = [7 x i8] c"\1B[0;0f\00"
define void @ClearScreen() {
%1 = call i32 @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0))
%2 = call i32 @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [5 x i8] c"\1B[2J\00"
@.str.1 = [7 x i8] c"\1B[0;0f\00"
define void @ClearScreen() {
%1 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0))
%2 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Variables and functions */
int abi1(int /*<<< orphan*/);
int abi2(int /*<<< orphan*/);
int main() {
  int a = abi1(0);
  int b = abi2(0);
  char c = 'A';
  return b - a - 16;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
xor    %edi,%edi
call   1030 <abi1@plt>
mov    %eax,-0x8(%rbp)
xor    %edi,%edi
call   1040 <abi2@plt>
mov    %eax,-0xc(%rbp)
movb   $0x41,-0xd(%rbp)
mov    -0xc(%rbp),%eax
sub    -0x8(%rbp),%eax
sub    $0x10,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
xor    %edi,%edi
call   1030 <abi1@plt>
mov    %eax,%ebx
xor    %edi,%edi
call   1040 <abi2@plt>
sub    %ebx,%eax
add    $0xfffffff0,%eax
pop    %rbx
ret

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i8
store i32 0, i32* %1
%5 = call i32 @abi1(i32 0)
store i32 %5, i32* %2
%6 = call i32 @abi2(i32 0)
store i32 %6, i32* %3
store i8 65, i8* %4
%7 = load i32, i32* %3
%8 = load i32, i32* %2
%9 = sub nsw i32 %7, %8
%10 = sub nsw i32 %9, 16
ret i32 %10
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 @abi1(i32 0)
%2 = tail call i32 @abi2(i32 0)
%3 = sub i32 -16, %1
%4 = add i32 %3, %2
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int main() {
  int y;
  int a, b, c;
  a = y % 4;
  b = y % 100;
  c = y % 400;
  if (a == 0) {
    if (b == 0) {
      if (c == 0)
        printf("Leap Year");
      else
        printf("Not Leap Year");
    } else
      printf("Leap Year");
  } else
    printf("Not Leap Year");
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    -0x8(%rbp),%eax
mov    $0x4,%ecx
cltd
idiv   %ecx
mov    %edx,-0xc(%rbp)
mov    -0x8(%rbp),%eax
mov    $0x64,%ecx
cltd
idiv   %ecx
mov    %edx,-0x10(%rbp)
mov    -0x8(%rbp),%eax
mov    $0x190,%ecx
cltd
idiv   %ecx
mov    %edx,-0x14(%rbp)
cmpl   $0x0,-0xc(%rbp)
jne    119a <main+0x8a>
cmpl   $0x0,-0x10(%rbp)
jne    1189 <main+0x79>
cmpl   $0x0,-0x14(%rbp)
jne    1178 <main+0x68>
lea    0xe96(%rip),%rdi
call   1030 <printf@plt>
jmp    1184 <main+0x74>
lea    0xe81(%rip),%rdi
call   1030 <printf@plt>
jmp    1195 <main+0x85>
lea    0xe74(%rip),%rdi
call   1030 <printf@plt>
jmp    11a6 <main+0x96>
lea    0xe5f(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xee8(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [10 x i8] c"Leap Year\00"
@.str.1 = [14 x i8] c"Not Leap Year\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
store i32 0, i32* %1
%6 = load i32, i32* %2
%7 = srem i32 %6, 4
store i32 %7, i32* %3
%8 = load i32, i32* %2
%9 = srem i32 %8, 100
store i32 %9, i32* %4
%10 = load i32, i32* %2
%11 = srem i32 %10, 400
store i32 %11, i32* %5
%12 = load i32, i32* %3
%13 = icmp eq i32 %12, 0
br i1 %13, label %14, label %28
14: ; preds = %0
%15 = load i32, i32* %4
%16 = icmp eq i32 %15, 0
br i1 %16, label %17, label %25
17: ; preds = %14
%18 = load i32, i32* %5
%19 = icmp eq i32 %18, 0
br i1 %19, label %20, label %22
20: ; preds = %17
%21 = call i32 @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0))
br label %24
22: ; preds = %17
%23 = call i32 @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.1, i64 0, i64 0))
br label %24
24: ; preds = %22, %20
br label %27
25: ; preds = %14
%26 = call i32 @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0))
br label %27
27: ; preds = %25, %24
br label %30
28: ; preds = %0
%29 = call i32 @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.1, i64 0, i64 0))
br label %30
30: ; preds = %28, %27
ret i32 0
}

LLVM IR (-O2):
@.str = [10 x i8] c"Leap Year\00"
define i32 @main() {
%1 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0))
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ benchmark();
int /*<<< orphan*/ initialise_board();
int /*<<< orphan*/ start_trigger();
int /*<<< orphan*/ stop_trigger();
int main(void) {
  int i;
  initialise_board();
  start_trigger();
  for (i = 0; i < (4096 >> 3); i++)
    benchmark();
  stop_trigger();
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x0,%al
call   1060 <initialise_board@plt>
mov    $0x0,%al
call   1030 <start_trigger@plt>
movl   $0x0,-0x8(%rbp)
cmpl   $0x200,-0x8(%rbp)
jge    1186 <main+0x46>
mov    $0x0,%al
call   1050 <benchmark@plt>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1164 <main+0x24>
mov    $0x0,%al
call   1040 <stop_trigger@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
xor    %eax,%eax
call   1060 <initialise_board@plt>
xor    %eax,%eax
call   1030 <start_trigger@plt>
mov    $0x200,%ebx
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
xor    %eax,%eax
call   1050 <benchmark@plt>
add    $0xffffffff,%ebx
jne    1160 <main+0x20>
xor    %eax,%eax
call   1040 <stop_trigger@plt>
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
store i32 0, i32* %1
%3 = call i32 (...) @initialise_board()
%4 = call i32 (...) @start_trigger()
store i32 0, i32* %2
br label %5
5: ; preds = %10, %0
%6 = load i32, i32* %2
%7 = icmp slt i32 %6, 512
br i1 %7, label %8, label %13
8: ; preds = %5
%9 = call i32 (...) @benchmark()
br label %10
10: ; preds = %8
%11 = load i32, i32* %2
%12 = add nsw i32 %11, 1
store i32 %12, i32* %2
br label %5
13: ; preds = %5
%14 = call i32 (...) @stop_trigger()
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @initialise_board()
%2 = tail call i32 (...) @start_trigger()
br label %3
3: ; preds = %0, %3
%4 = phi i32 [ 0, %0 ], [ %6, %3 ]
%5 = tail call i32 (...) @benchmark()
%6 = add nuw nsw i32 %4, 1
%7 = icmp eq i32 %6, 512
br i1 %7, label %8, label %3
8: ; preds = %3
%9 = tail call i32 (...) @stop_trigger()
ret i32 0
}