xunge/DecIR huggingface dataset:
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
scalar_t__ ENOENT;
scalar_t__ errno;
int /*<<< orphan*/ fclose(int /*<<< orphan*/ *);
int /*<<< orphan*/ *fopen(char *, char *);
int file_exists(char *filename) {
  FILE *f = fopen(filename, "r");
  if (f == NULL) {
    if (errno == ENOENT) {
      return 0;
    }
    return -1;
  }
  fclose(f);
  return 1;
}


x86 assembly (clang, -O0):
<file_exists>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
lea    0xec9(%rip),%rsi
call   1040 <fopen@plt>
mov    %rax,-0x18(%rbp)
cmpq   $0x0,-0x18(%rbp)
jne    117d <file_exists+0x5d>
mov    0x2e8e(%rip),%rax
mov    (%rax),%rax
mov    0x2e74(%rip),%rcx
cmp    (%rcx),%rax
jne    1171 <file_exists+0x51>
movl   $0x0,-0x4(%rbp)
jmp    118d <file_exists+0x6d>
movl   $0xffffffff,-0x4(%rbp)
jmp    118d <file_exists+0x6d>
mov    -0x18(%rbp),%rdi
call   1030 <fclose@plt>
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<file_exists>:
push   %rax
lea    0xed8(%rip),%rsi
call   1040 <fopen@plt>
test   %rax,%rax
je     1141 <file_exists+0x21>
mov    %rax,%rdi
call   1030 <fclose@plt>
mov    $0x1,%eax
pop    %rcx
ret
mov    0x2e98(%rip),%rax
mov    (%rax),%rcx
mov    0x2e7e(%rip),%rdx
xor    %eax,%eax
cmp    (%rdx),%rcx
setne  %al
neg    %eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [2 x i8] c"r\00"
@errno = global i64 0
@ENOENT = global i64 0
define i32 @file_exists(i8* %0) {
%2 = alloca i32
%3 = alloca i8*
%4 = alloca i32*
store i8* %0, i8** %3
%5 = load i8*, i8** %3
%6 = call i32* @fopen(i8* %5, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
store i32* %6, i32** %4
%7 = load i32*, i32** %4
%8 = icmp eq i32* %7, null
br i1 %8, label %9, label %15
9: ; preds = %1
%10 = load i64, i64* @errno
%11 = load i64, i64* @ENOENT
%12 = icmp eq i64 %10, %11
br i1 %12, label %13, label %14
13: ; preds = %9
store i32 0, i32* %2
br label %18
14: ; preds = %9
store i32 -1, i32* %2
br label %18
15: ; preds = %1
%16 = load i32*, i32** %4
%17 = call i32 @fclose(i32* %16)
store i32 1, i32* %2
br label %18
18: ; preds = %15, %14, %13
%19 = load i32, i32* %2
ret i32 %19
}

LLVM IR (-O2):
@.str = [2 x i8] c"r\00"
@errno = global i64 0
@ENOENT = global i64 0
define i32 @file_exists(i8* nocapture %0) {
%2 = tail call i32* @fopen(i8* %0, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
%3 = icmp eq i32* %2, null
br i1 %3, label %4, label %9
4: ; preds = %1
%5 = load i64, i64* @errno
%6 = load i64, i64* @ENOENT
%7 = icmp ne i64 %5, %6
%8 = sext i1 %7 to i32
br label %11
9: ; preds = %1
%10 = tail call i32 @fclose(i32* %2)
br label %11
11: ; preds = %4, %9
%12 = phi i32 [ 1, %9 ], [ %8, %4 ]
ret i32 %12
}
void sd_zbc_write_unlock_zone(struct scsi_cmnd *cmd) {}


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

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

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

LLVM IR (-O2):
%struct.scsi_cmnd = type opaque
define void @sd_zbc_write_unlock_zone(%struct.scsi_cmnd* nocapture %0) {
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ __m64;

/* Variables and functions */
int _mm_cvtsi64_si32(int /*<<< orphan*/);
int test_mm_cvtsi64_si32(__m64 a) { return _mm_cvtsi64_si32(a); }


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

x86 assembly (clang, -O2):
<test_mm_cvtsi64_si32>:
jmp    1030 <_mm_cvtsi64_si32@plt>

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

LLVM IR (-O2):
define i32 @test_mm_cvtsi64_si32(i32 %0) {
%2 = tail call i32 @_mm_cvtsi64_si32(i32 %0)
ret i32 %2
}
/* Variables and functions */
int foo2();
int bar2() { return foo2(); }


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

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

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

LLVM IR (-O2):
define i32 @bar2() {
%1 = tail call i32 (...) @foo2()
ret i32 %1
}
/* Variables and functions */
int Blue6(int, int);
int /*<<< orphan*/ printf(char *, int, int);
extern int Bar6(int one, int two) {
  int sum = 0;
  printf(" Hello from Bar6: one = %d, two = %d!\n ", one, two);
  sum = Blue6(one, two);
  return sum;
}


x86 assembly (clang, -O0):
<Bar6>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
mov    -0x4(%rbp),%esi
mov    -0x8(%rbp),%edx
lea    0xebe(%rip),%rdi
call   1030 <printf@plt>
mov    -0x4(%rbp),%edi
mov    -0x8(%rbp),%esi
call   1040 <Blue6@plt>
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Bar6>:
push   %rbp
push   %rbx
push   %rax
mov    %esi,%ebx
mov    %edi,%ebp
lea    0xed2(%rip),%rdi
mov    %ebp,%esi
mov    %ebx,%edx
call   1030 <printf@plt>
mov    %ebp,%edi
mov    %ebx,%esi
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    1040 <Blue6@plt>

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

LLVM IR (-O2):
@.str = [40 x i8] c" Hello from Bar6: one = %d, two = %d!\0A \00"
define i32 @Bar6(i32 %0, i32 %1) {
%3 = tail call i32 @printf(i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str, i64 0, i64 0), i32 %0, i32 %1)
%4 = tail call i32 @Blue6(i32 %0, i32 %1)
ret i32 %4
}
unsigned xrop3_156_1_0(unsigned char s, unsigned char t) {
  unsigned D = 0x00ff;
  unsigned S = ((unsigned)s << 8) | s;
  unsigned T = ((unsigned)t << 8) | t;
  unsigned stk1;
  unsigned stk2;
  unsigned stk3;
  stk3 = ~D;
  stk2 = T & stk3;
  stk1 = S ^ stk2;
  return (stk1 & (~S)) | (D & S);
}


x86 assembly (clang, -O0):
<xrop3_156_1_0>:
push   %rbp
mov    %rsp,%rbp
mov    %sil,%al
mov    %dil,%cl
mov    %cl,-0x1(%rbp)
mov    %al,-0x2(%rbp)
movl   $0xff,-0x8(%rbp)
movzbl -0x1(%rbp),%eax
shl    $0x8,%eax
movzbl -0x1(%rbp),%ecx
or     %ecx,%eax
mov    %eax,-0xc(%rbp)
movzbl -0x2(%rbp),%eax
shl    $0x8,%eax
movzbl -0x2(%rbp),%ecx
or     %ecx,%eax
mov    %eax,-0x10(%rbp)
mov    -0x8(%rbp),%eax
xor    $0xffffffff,%eax
mov    %eax,-0x1c(%rbp)
mov    -0x10(%rbp),%eax
and    -0x1c(%rbp),%eax
mov    %eax,-0x18(%rbp)
mov    -0xc(%rbp),%eax
xor    -0x18(%rbp),%eax
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
mov    -0xc(%rbp),%ecx
xor    $0xffffffff,%ecx
and    %ecx,%eax
mov    -0x8(%rbp),%ecx
and    -0xc(%rbp),%ecx
or     %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<xrop3_156_1_0>:
mov    %edi,%eax
shl    $0x8,%eax
or     %edi,%eax
shl    $0x8,%esi
not    %eax
and    %esi,%eax
or     %edi,%eax
ret

LLVM IR (-O0):
define i32 @xrop3_156_1_0(i8 zeroext %0, i8 zeroext %1) {
%3 = alloca i8
%4 = alloca i8
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32
%10 = alloca i32
store i8 %0, i8* %3
store i8 %1, i8* %4
store i32 255, i32* %5
%11 = load i8, i8* %3
%12 = zext i8 %11 to i32
%13 = shl i32 %12, 8
%14 = load i8, i8* %3
%15 = zext i8 %14 to i32
%16 = or i32 %13, %15
store i32 %16, i32* %6
%17 = load i8, i8* %4
%18 = zext i8 %17 to i32
%19 = shl i32 %18, 8
%20 = load i8, i8* %4
%21 = zext i8 %20 to i32
%22 = or i32 %19, %21
store i32 %22, i32* %7
%23 = load i32, i32* %5
%24 = xor i32 %23, -1
store i32 %24, i32* %10
%25 = load i32, i32* %7
%26 = load i32, i32* %10
%27 = and i32 %25, %26
store i32 %27, i32* %9
%28 = load i32, i32* %6
%29 = load i32, i32* %9
%30 = xor i32 %28, %29
store i32 %30, i32* %8
%31 = load i32, i32* %8
%32 = load i32, i32* %6
%33 = xor i32 %32, -1
%34 = and i32 %31, %33
%35 = load i32, i32* %5
%36 = load i32, i32* %6
%37 = and i32 %35, %36
%38 = or i32 %34, %37
ret i32 %38
}

LLVM IR (-O2):
define i32 @xrop3_156_1_0(i8 zeroext %0, i8 zeroext %1) {
%3 = zext i8 %0 to i32
%4 = mul nuw nsw i32 %3, 257
%5 = zext i8 %1 to i32
%6 = shl nuw nsw i32 %5, 8
%7 = xor i32 %4, -1
%8 = and i32 %6, %7
%9 = or i32 %8, %3
ret i32 %9
}
/* Forward declarations */
typedef struct TYPE_2__ TYPE_1__;

/* Type definitions */
struct TYPE_2__ {
  scalar_t__ ascent;
};
typedef TYPE_1__ XCharStruct;

/* Variables and functions */
short get_XCharStruct_ascent(void *_p) {
  return (short)((XCharStruct *)_p)->ascent;
}


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

x86 assembly (clang, -O2):
<get_XCharStruct_ascent>:
movzwl (%rdi),%eax
ret

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

LLVM IR (-O2):
define signext i16 @get_XCharStruct_ascent(i8* nocapture %0) {
%2 = bitcast i8* %0 to i64*
%3 = load i64, i64* %2
%4 = trunc i64 %3 to i16
ret i16 %4
}
void yy_1_TextPlus(char *yytext, int yyleng) {
  ;
  ;
}


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

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

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

LLVM IR (-O2):
define void @yy_1_TextPlus(i8* nocapture %0, i32 %1) {
ret void
}
void acct_update_integrals(struct task_struct *tsk) {}


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

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

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

LLVM IR (-O2):
%struct.task_struct = type opaque
define void @acct_update_integrals(%struct.task_struct* nocapture %0) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int, char *);
int main(int argc, char *argv[]) {
  int i;
  for (i = 0; i < argc; i++) {
    printf("arg: %d is '%s'\n", i, argv[i]);
  }
  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)
movl   $0x0,-0x14(%rbp)
mov    -0x14(%rbp),%eax
cmp    -0x8(%rbp),%eax
jge    1162 <main+0x52>
mov    -0x14(%rbp),%esi
mov    -0x10(%rbp),%rax
movslq -0x14(%rbp),%rcx
mov    (%rax,%rcx,8),%rdx
lea    0xeb1(%rip),%rdi
call   1030 <printf@plt>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    112d <main+0x1d>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r15
push   %r14
push   %r12
push   %rbx
push   %rax
test   %edi,%edi
jle    1147 <main+0x37>
mov    %rsi,%r14
mov    %edi,%r12d
xor    %ebx,%ebx
lea    0xed5(%rip),%r15
nopl   0x0(%rax,%rax,1)
mov    (%r14,%rbx,8),%rdx
mov    %r15,%rdi
mov    %ebx,%esi
call   1030 <printf@plt>
add    $0x1,%rbx
cmp    %rbx,%r12
jne    1130 <main+0x20>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
@.str = [17 x i8] c"arg: %d is '%s'\0A\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
store i32 0, i32* %6
br label %7
7: ; preds = %19, %2
%8 = load i32, i32* %6
%9 = load i32, i32* %4
%10 = icmp slt i32 %8, %9
br i1 %10, label %11, label %22
11: ; preds = %7
%12 = load i32, i32* %6
%13 = load i8**, i8*** %5
%14 = load i32, i32* %6
%15 = sext i32 %14 to i64
%16 = getelementptr inbounds i8*, i8** %13, i64 %15
%17 = load i8*, i8** %16
%18 = call i32 @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0), i32 %12, i8* %17)
br label %19
19: ; preds = %11
%20 = load i32, i32* %6
%21 = add nsw i32 %20, 1
store i32 %21, i32* %6
br label %7
22: ; preds = %7
ret i32 0
}

LLVM IR (-O2):
@.str = [17 x i8] c"arg: %d is '%s'\0A\00"
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = icmp sgt i32 %0, 0
br i1 %3, label %4, label %14
4: ; preds = %2
%5 = zext i32 %0 to i64
br label %6
6: ; preds = %4, %6
%7 = phi i64 [ 0, %4 ], [ %12, %6 ]
%8 = getelementptr inbounds i8*, i8** %1, i64 %7
%9 = load i8*, i8** %8
%10 = trunc i64 %7 to i32
%11 = tail call i32 @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0), i32 %10, i8* %9)
%12 = add nuw nsw i64 %7, 1
%13 = icmp eq i64 %12, %5
br i1 %13, label %14, label %6
14: ; preds = %6, %2
ret i32 0
}
/* Type definitions */
struct in_addr {
  int dummy;
};

/* Variables and functions */
int create_socket(struct in_addr *);
int /*<<< orphan*/ getchar();
int /*<<< orphan*/ inet_aton(char *, struct in_addr *);
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ send_frames(int);
int main(int argc, char *argv[]) {
  (void)argc;
  (void)argv;
  struct in_addr remote_ip;
  inet_aton("172.16.50.1", &remote_ip);
  int mySocket = create_socket(&remote_ip);
  send_frames(mySocket);
  printf("Sender finished\n");
  getchar();
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
lea    0xe9a(%rip),%rdi
lea    -0x18(%rbp),%rsi
call   1060 <inet_aton@plt>
lea    -0x18(%rbp),%rdi
call   1070 <create_socket@plt>
mov    %eax,-0x1c(%rbp)
mov    -0x1c(%rbp),%edi
call   1040 <send_frames@plt>
lea    0xe82(%rip),%rdi
call   1030 <printf@plt>
mov    $0x0,%al
call   1050 <getchar@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x10,%rsp
lea    0xea4(%rip),%rdi
lea    0x8(%rsp),%rbx
mov    %rbx,%rsi
call   1060 <inet_aton@plt>
mov    %rbx,%rdi
call   1070 <create_socket@plt>
mov    %eax,%edi
call   1040 <send_frames@plt>
lea    0xe8d(%rip),%rdi
call   1030 <puts@plt>
xor    %eax,%eax
call   1050 <getchar@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
%struct.in_addr = type { i32 }
@.str = [12 x i8] c"172.16.50.1\00"
@.str.1 = [17 x i8] c"Sender finished\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i8**
%5 = alloca %struct.in_addr
%6 = alloca i32
store i32 %0, i32* %3
store i8** %1, i8*** %4
%7 = load i32, i32* %3
%8 = load i8**, i8*** %4
%9 = call i32 @inet_aton(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), %struct.in_addr* %5)
%10 = call i32 @create_socket(%struct.in_addr* %5)
store i32 %10, i32* %6
%11 = load i32, i32* %6
%12 = call i32 @send_frames(i32 %11)
%13 = call i32 @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.1, i64 0, i64 0))
%14 = call i32 (...) @getchar()
ret i32 0
}

LLVM IR (-O2):
%struct.in_addr = type { i32 }
@.str = [12 x i8] c"172.16.50.1\00"
@str = [16 x i8] c"Sender finished\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = alloca %struct.in_addr
%4 = bitcast %struct.in_addr* %3 to i8*
%5 = call i32 @inet_aton(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), %struct.in_addr* %3)
%6 = call i32 @create_socket(%struct.in_addr* %3)
%7 = call i32 @send_frames(i32 %6)
%8 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([16 x i8], [16 x i8]* @str, i64 0, i64 0))
%9 = call i32 (...) @getchar()
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ evt_store_dl(int, int, int, int, int /*<<< orphan*/,
                                int /*<<< orphan*/);
void evt_store(int type, int time, int pid, int cpu) {
  evt_store_dl(type, time, pid, cpu, 0, 0);
}


x86 assembly (clang, -O0):
<evt_store>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    %ecx,-0x10(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x8(%rbp),%esi
mov    -0xc(%rbp),%edx
mov    -0x10(%rbp),%ecx
xor    %r9d,%r9d
mov    %r9d,%r8d
call   1030 <evt_store_dl@plt>
add    $0x10,%rsp
pop    %rbp
ret

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

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

LLVM IR (-O2):
define void @evt_store(i32 %0, i32 %1, i32 %2, i32 %3) {
%5 = tail call i32 @evt_store_dl(i32 %0, i32 %1, i32 %2, i32 %3, i32 0, i32 0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int main() {
  printf("∞");
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%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 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [4 x i8] c"\E2\88\9E\00"
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@.str = [4 x i8] c"\E2\88\9E\00"
define i32 @main() {
%1 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0))
ret i32 0
}
void glFramebufferRenderbuffer(void) { return; }


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

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

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

LLVM IR (-O2):
define void @glFramebufferRenderbuffer() {
ret void
}
long get_nfft(void) { return ((long)64); }


x86 assembly (clang, -O0):
<get_nfft>:
push   %rbp
mov    %rsp,%rbp
mov    $0x40,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i64 @get_nfft() {
ret i64 64
}

LLVM IR (-O2):
define i64 @get_nfft() {
ret i64 64
}
/* Variables and functions */
scalar_t__ strlen(char const *);
int /*<<< orphan*/ strncpy(char *, char const *, scalar_t__);
char const *strrchr(char const *, char);
void lyrics_remove_prefix(const char *filename, char *new_name) {
  strncpy(new_name, filename,
          strlen(filename) - strlen(strrchr(filename, '.')));
}


x86 assembly (clang, -O0):
<lyrics_remove_prefix>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x20(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <strlen@plt>
mov    %rax,-0x28(%rbp)
mov    -0x8(%rbp),%rdi
mov    $0x2e,%esi
call   1050 <strrchr@plt>
mov    %rax,%rdi
call   1040 <strlen@plt>
mov    -0x28(%rbp),%rdx
mov    -0x20(%rbp),%rdi
mov    -0x18(%rbp),%rsi
sub    %rax,%rdx
call   1030 <strncpy@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<lyrics_remove_prefix>:
push   %r15
push   %r14
push   %rbx
mov    %rsi,%r14
mov    %rdi,%r15
call   1040 <strlen@plt>
mov    %rax,%rbx
mov    %r15,%rdi
mov    $0x2e,%esi
call   1050 <strrchr@plt>
mov    %rax,%rdi
call   1040 <strlen@plt>
sub    %rax,%rbx
mov    %r14,%rdi
mov    %r15,%rsi
mov    %rbx,%rdx
pop    %rbx
pop    %r14
pop    %r15
jmp    1030 <strncpy@plt>

LLVM IR (-O0):
define void @lyrics_remove_prefix(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
store i8* %0, i8** %3
store i8* %1, i8** %4
%5 = load i8*, i8** %4
%6 = load i8*, i8** %3
%7 = load i8*, i8** %3
%8 = call i64 @strlen(i8* %7)
%9 = load i8*, i8** %3
%10 = call i8* @strrchr(i8* %9, i8 signext 46)
%11 = call i64 @strlen(i8* %10)
%12 = sub nsw i64 %8, %11
%13 = call i32 @strncpy(i8* %5, i8* %6, i64 %12)
ret void
}

LLVM IR (-O2):
define void @lyrics_remove_prefix(i8* %0, i8* %1) {
%3 = tail call i64 @strlen(i8* dereferenceable(1) %0)
%4 = tail call i8* @strrchr(i8* dereferenceable(1) %0, i8 signext 46)
%5 = tail call i64 @strlen(i8* dereferenceable(1) %4)
%6 = sub nsw i64 %3, %5
%7 = tail call i32 @strncpy(i8* %1, i8* %0, i64 %6)
ret void
}
void test_chars_not_from_the_list_are_rejected_on_assignment(void) {
  const int res = set_options("cpoptions=yxz");
  do {
    seatest_assert_false(res == 0, __FUNCTION__, 125);
  } while (0);
}


x86 assembly (clang, -O0):
<test_chars_not_from_the_list_are_rejected_on_assignment>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    0xed1(%rip),%rdi
mov    $0x0,%al
call   1040 <set_options@plt>
mov    %eax,-0x4(%rbp)
cmpl   $0x0,-0x4(%rbp)
sete   %al
and    $0x1,%al
movzbl %al,%edi
lea    0xec2(%rip),%rsi
mov    $0x7d,%edx
mov    $0x0,%al
call   1030 <seatest_assert_false@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_chars_not_from_the_list_are_rejected_on_assignment>:
push   %rax
lea    0xed8(%rip),%rdi
xor    %eax,%eax
call   1040 <set_options@plt>
xor    %edi,%edi
test   %eax,%eax
sete   %dil
lea    0xed0(%rip),%rsi
mov    $0x7d,%edx
xor    %eax,%eax
pop    %rcx
jmp    1030 <seatest_assert_false@plt>

LLVM IR (-O0):
@.str = [14 x i8] c"cpoptions=yxz\00"
@__FUNCTION__.test_chars_not_from_the_list_are_rejected_on_assignment = [56 x i8] c"test_chars_not_from_the_list_are_rejected_on_assignment\00"
define void @test_chars_not_from_the_list_are_rejected_on_assignment() {
%1 = alloca i32
%2 = call i32 (i8*, ...) bitcast (i32 (...)* @set_options to i32 (i8*, ...)*)(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0))
store i32 %2, i32* %1
br label %3
3: ; preds = %0
%4 = load i32, i32* %1
%5 = icmp eq i32 %4, 0
%6 = zext i1 %5 to i32
%7 = call i32 (i32, i8*, i32, ...) bitcast (i32 (...)* @seatest_assert_false to i32 (i32, i8*, i32, ...)*)(i32 %6, i8* getelementptr inbounds ([56 x i8], [56 x i8]* @__FUNCTION__.test_chars_not_from_the_list_are_rejected_on_assignment, i64 0, i64 0), i32 125)
br label %8
8: ; preds = %3
ret void
}

LLVM IR (-O2):
@.str = [14 x i8] c"cpoptions=yxz\00"
@__FUNCTION__.test_chars_not_from_the_list_are_rejected_on_assignment = [56 x i8] c"test_chars_not_from_the_list_are_rejected_on_assignment\00"
define void @test_chars_not_from_the_list_are_rejected_on_assignment() {
%1 = tail call i32 (i8*, ...) bitcast (i32 (...)* @set_options to i32 (i8*, ...)*)(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0))
%2 = icmp eq i32 %1, 0
%3 = zext i1 %2 to i32
%4 = tail call i32 (i32, i8*, i32, ...) bitcast (i32 (...)* @seatest_assert_false to i32 (i32, i8*, i32, ...)*)(i32 %3, i8* getelementptr inbounds ([56 x i8], [56 x i8]* @__FUNCTION__.test_chars_not_from_the_list_are_rejected_on_assignment, i64 0, i64 0), i32 125)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ close(int);
void sapi_inet_udp_server_destroy(int sock) { close(sock); }


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

x86 assembly (clang, -O2):
<sapi_inet_udp_server_destroy>:
jmp    1030 <close@plt>

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

LLVM IR (-O2):
define void @sapi_inet_udp_server_destroy(i32 %0) {
%2 = tail call i32 @close(i32 %0)
ret void
}
/* Variables and functions */
int charVowel(char, int);
int vowelNumber(char string[]) {
  int index = 0;
  int count = 0;
  while (string[index] != '\0') {
    count = charVowel(string[index], count);
    index++;
  }
  return count;
}


x86 assembly (clang, -O0):
<vowelNumber>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
movl   $0x0,-0x10(%rbp)
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
movsbl (%rax,%rcx,1),%eax
cmp    $0x0,%eax
je     1166 <vowelNumber+0x56>
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
mov    (%rax,%rcx,1),%al
mov    -0x10(%rbp),%esi
movsbl %al,%edi
call   1030 <charVowel@plt>
mov    %eax,-0x10(%rbp)
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    112a <vowelNumber+0x1a>
mov    -0x10(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<vowelNumber>:
push   %rbx
mov    (%rdi),%cl
test   %cl,%cl
je     1137 <vowelNumber+0x27>
mov    %rdi,%rbx
add    $0x1,%rbx
xor    %eax,%eax
movsbl %cl,%edi
mov    %eax,%esi
call   1030 <charVowel@plt>
movzbl (%rbx),%ecx
add    $0x1,%rbx
test   %cl,%cl
jne    1120 <vowelNumber+0x10>
pop    %rbx
ret
xor    %eax,%eax
pop    %rbx
ret

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

LLVM IR (-O2):
define i32 @vowelNumber(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = icmp eq i8 %2, 0
br i1 %3, label %13, label %4
4: ; preds = %1, %4
%5 = phi i64 [ %9, %4 ], [ 0, %1 ]
%6 = phi i8 [ %11, %4 ], [ %2, %1 ]
%7 = phi i32 [ %8, %4 ], [ 0, %1 ]
%8 = tail call i32 @charVowel(i8 signext %6, i32 %7)
%9 = add nuw i64 %5, 1
%10 = getelementptr inbounds i8, i8* %0, i64 %9
%11 = load i8, i8* %10
%12 = icmp eq i8 %11, 0
br i1 %12, label %13, label %4
13: ; preds = %4, %1
%14 = phi i32 [ 0, %1 ], [ %8, %4 ]
ret i32 %14
}
char *hash_plugin_detailed(void) {
  return ("joomla - A md5(password,salt) module\n"
          "------------------------\n"
          "Use this module to crack md5(password,salt) hashes\n"
          "Input should be in form: \'user:hash:salt\' or just \'hash:salt\'\n"
          "Software that uses that password hashing method:\n"
          "joomla > 1.0.13\n"
          "\nAuthor: Milen Rangelov <gat3way@gat3way.eu>\n");
}


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

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

LLVM IR (-O0):
@.str = [286 x i8] c"joomla - A md5(password,salt) module\0A------------------------\0AUse this module to crack md5(password,salt) hashes\0AInput should be in form: 'user:hash:salt' or just 'hash:salt'\0ASoftware that uses that password hashing method:\0Ajoomla > 1.0.13\0A\0AAuthor: Milen Rangelov <gat3way@gat3way.eu>\0A\00"
define i8* @hash_plugin_detailed() {
ret i8* getelementptr inbounds ([286 x i8], [286 x i8]* @.str, i64 0, i64 0)
}

LLVM IR (-O2):
@.str = [286 x i8] c"joomla - A md5(password,salt) module\0A------------------------\0AUse this module to crack md5(password,salt) hashes\0AInput should be in form: 'user:hash:salt' or just 'hash:salt'\0ASoftware that uses that password hashing method:\0Ajoomla > 1.0.13\0A\0AAuthor: Milen Rangelov <gat3way@gat3way.eu>\0A\00"
define i8* @hash_plugin_detailed() {
ret i8* getelementptr inbounds ([286 x i8], [286 x i8]* @.str, i64 0, i64 0)
}
void f(int x) {
  int k;
#pragma analysis_check assert defined(k)
  if (x > 3)
    k = 1;
  else
    k = 2;
#pragma analysis_check assert reaching_definition_in(k : 1, 2)
  if (x > 3) {
#pragma analysis_check assert live_in(k)
    k = k + x;
  }
  int i = 0;
#pragma analysis_check assert dead(k)
  k = 0;
#pragma analysis_check assert reaching_definition_in(i : 0)                    \
    induction_var(i : 0 : 99 : 1)
  while (i < 100) {
    ++i;
  }
}


x86 assembly (clang, -O0):
<f>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
cmpl   $0x3,-0x4(%rbp)
jle    111d <f+0x1d>
movl   $0x1,-0x8(%rbp)
jmp    1124 <f+0x24>
movl   $0x2,-0x8(%rbp)
cmpl   $0x3,-0x4(%rbp)
jle    1137 <f+0x37>
mov    -0x8(%rbp),%eax
add    -0x4(%rbp),%eax
mov    %eax,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
movl   $0x0,-0x8(%rbp)
cmpl   $0x64,-0xc(%rbp)
jge    115d <f+0x5d>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1145 <f+0x45>
pop    %rbp
ret

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

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

LLVM IR (-O2):
define void @f(i32 %0) {
ret void
}
void security_task_free(struct task_struct *p) {}


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

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

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

LLVM IR (-O2):
%struct.task_struct = type opaque
define void @security_task_free(%struct.task_struct* nocapture %0) {
ret void
}
void foo334(int p) {}


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

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

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

LLVM IR (-O2):
define void @foo334(i32 %0) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int main(int argc, char **argv) {
  printf("working\n");
  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)
lea    0xed3(%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 = [9 x i8] c"working\0A\00"
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 @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@str = [8 x i8] c"working\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([8 x i8], [8 x i8]* @str, i64 0, i64 0))
ret i32 0
}
unsigned digit_value(char c) {
  unsigned x = (unsigned char)c;
  x -= '0';
  return x;
}


x86 assembly (clang, -O0):
<digit_value>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movzbl -0x1(%rbp),%eax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
sub    $0x30,%eax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<digit_value>:
movzbl %dil,%eax
add    $0xffffffd0,%eax
ret

LLVM IR (-O0):
define i32 @digit_value(i8 signext %0) {
%2 = alloca i8
%3 = alloca i32
store i8 %0, i8* %2
%4 = load i8, i8* %2
%5 = zext i8 %4 to i32
store i32 %5, i32* %3
%6 = load i32, i32* %3
%7 = sub i32 %6, 48
store i32 %7, i32* %3
%8 = load i32, i32* %3
ret i32 %8
}

LLVM IR (-O2):
define i32 @digit_value(i8 signext %0) {
%2 = zext i8 %0 to i32
%3 = add nsw i32 %2, -48
ret i32 %3
}
/* Type definitions */
typedef int /*<<< orphan*/ u_char;

/* Variables and functions */
int __res_send(int /*<<< orphan*/ const *, int, int /*<<< orphan*/ *, int);
int res_send(const u_char *buf, int buflen, u_char *ans, int anssiz) {
  return __res_send(buf, buflen, ans, anssiz);
}


x86 assembly (clang, -O0):
<res_send>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %ecx,-0x1c(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
mov    -0x18(%rbp),%rdx
mov    -0x1c(%rbp),%ecx
call   1030 <__res_send@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<res_send>:
jmp    1030 <__res_send@plt>

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

LLVM IR (-O2):
define i32 @res_send(i32* %0, i32 %1, i32* %2, i32 %3) {
%5 = tail call i32 @__res_send(i32* %0, i32 %1, i32* %2, i32 %3)
ret i32 %5
}
void ExttInvoiceStatusAuxTable(void) {}


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

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

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

LLVM IR (-O2):
define void @ExttInvoiceStatusAuxTable() {
ret void
}
/* Variables and functions */
int rand();
int rrange(int a, int b) {
  int temp = rand();
  while (temp < a || temp > b) {
    temp = rand();
  }
  return temp;
}


x86 assembly (clang, -O0):
<rrange>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    $0x0,%al
call   1030 <rand@plt>
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%ecx
mov    $0x1,%al
cmp    -0x4(%rbp),%ecx
mov    %al,-0xd(%rbp)
jl     1145 <rrange+0x35>
mov    -0xc(%rbp),%eax
cmp    -0x8(%rbp),%eax
setg   %al
mov    %al,-0xd(%rbp)
mov    -0xd(%rbp),%al
test   $0x1,%al
jne    1155 <rrange+0x45>
jmp    1164 <rrange+0x54>
mov    $0x0,%al
call   1030 <rand@plt>
mov    %eax,-0xc(%rbp)
jmp    1128 <rrange+0x18>
mov    -0xc(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<rrange>:
push   %rbp
push   %rbx
push   %rax
mov    %esi,%ebx
mov    %edi,%ebp
nopw   0x0(%rax,%rax,1)
xor    %eax,%eax
call   1030 <rand@plt>
cmp    %ebp,%eax
jl     1120 <rrange+0x10>
cmp    %ebx,%eax
jg     1120 <rrange+0x10>
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
define i32 @rrange(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%6 = call i32 (...) @rand()
store i32 %6, i32* %5
br label %7
7: ; preds = %17, %2
%8 = load i32, i32* %5
%9 = load i32, i32* %3
%10 = icmp slt i32 %8, %9
br i1 %10, label %15, label %11
11: ; preds = %7
%12 = load i32, i32* %5
%13 = load i32, i32* %4
%14 = icmp sgt i32 %12, %13
br label %15
15: ; preds = %11, %7
%16 = phi i1 [ true, %7 ], [ %14, %11 ]
br i1 %16, label %17, label %19
17: ; preds = %15
%18 = call i32 (...) @rand()
store i32 %18, i32* %5
br label %7
19: ; preds = %15
%20 = load i32, i32* %5
ret i32 %20
}

LLVM IR (-O2):
define i32 @rrange(i32 %0, i32 %1) {
%3 = tail call i32 (...) @rand()
%4 = icmp slt i32 %3, %0
%5 = icmp sgt i32 %3, %1
%6 = or i1 %4, %5
br i1 %6, label %7, label %12
7: ; preds = %2, %7
%8 = tail call i32 (...) @rand()
%9 = icmp slt i32 %8, %0
%10 = icmp sgt i32 %8, %1
%11 = or i1 %9, %10
br i1 %11, label %7, label %12
12: ; preds = %7, %2
%13 = phi i32 [ %3, %2 ], [ %8, %7 ]
ret i32 %13
}
int test3(int x, int y) {
  int v = x && y;
  return v;
}


x86 assembly (clang, -O0):
<test3>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
xor    %eax,%eax
cmpl   $0x0,-0x4(%rbp)
mov    %al,-0xd(%rbp)
je     1123 <test3+0x23>
cmpl   $0x0,-0x8(%rbp)
setne  %al
mov    %al,-0xd(%rbp)
mov    -0xd(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<test3>:
test   %edi,%edi
setne  %al
test   %esi,%esi
setne  %cl
and    %al,%cl
movzbl %cl,%eax
ret

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

LLVM IR (-O2):
define i32 @test3(i32 %0, i32 %1) {
%3 = icmp ne i32 %0, 0
%4 = icmp ne i32 %1, 0
%5 = and i1 %3, %4
%6 = zext i1 %5 to i32
ret i32 %6
}
/* Variables and functions */
int /*<<< orphan*/ EXIT_SUCCESS;
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ printf(char *, char const *);
void usage(const char *name) {
  printf("%s NAME VALUE\n", name);
  exit(EXIT_SUCCESS);
}


x86 assembly (clang, -O0):
<usage>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rsi
lea    0xec9(%rip),%rdi
call   1030 <printf@plt>
mov    0x2e9d(%rip),%rax
mov    (%rax),%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<usage>:
push   %rax
mov    %rdi,%rsi
lea    0xed5(%rip),%rdi
call   1030 <printf@plt>
mov    0x2ea9(%rip),%rax
mov    (%rax),%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@.str = [15 x i8] c"%s NAME VALUE\0A\00"
@EXIT_SUCCESS = global i32 0
define void @usage(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0), i8* %3)
%5 = load i32, i32* @EXIT_SUCCESS
%6 = call i32 @exit(i32 %5)
unreachable
}

LLVM IR (-O2):
@.str = [15 x i8] c"%s NAME VALUE\0A\00"
@EXIT_SUCCESS = global i32 0
define void @usage(i8* %0) {
%2 = tail call i32 @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0), i8* %0)
%3 = load i32, i32* @EXIT_SUCCESS
%4 = tail call i32 @exit(i32 %3)
unreachable
}
/* Variables and functions */
int /*<<< orphan*/ libc_stop(unsigned long);
int /*<<< orphan*/ panic_notify(unsigned long);
int /*<<< orphan*/ printf(char *);
void kdump_failed(unsigned long reason) {
  do {
    printf("Dump failed: Check disabled wait code");
    panic_notify(reason);
    libc_stop(reason);
  } while (0);
}


x86 assembly (clang, -O0):
<kdump_failed>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
lea    0xebd(%rip),%rdi
call   1030 <printf@plt>
mov    -0x8(%rbp),%rdi
call   1040 <panic_notify@plt>
mov    -0x8(%rbp),%rdi
call   1050 <libc_stop@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<kdump_failed>:
push   %rbx
mov    %rdi,%rbx
lea    0xec5(%rip),%rdi
call   1030 <printf@plt>
mov    %rbx,%rdi
call   1040 <panic_notify@plt>
mov    %rbx,%rdi
pop    %rbx
jmp    1050 <libc_stop@plt>

LLVM IR (-O0):
@.str = [38 x i8] c"Dump failed: Check disabled wait code\00"
define void @kdump_failed(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
br label %3
3: ; preds = %1
%4 = call i32 @printf(i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str, i64 0, i64 0))
%5 = load i64, i64* %2
%6 = call i32 @panic_notify(i64 %5)
%7 = load i64, i64* %2
%8 = call i32 @libc_stop(i64 %7)
br label %9
9: ; preds = %3
ret void
}

LLVM IR (-O2):
@.str = [38 x i8] c"Dump failed: Check disabled wait code\00"
define void @kdump_failed(i64 %0) {
%2 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([38 x i8], [38 x i8]* @.str, i64 0, i64 0))
%3 = tail call i32 @panic_notify(i64 %0)
%4 = tail call i32 @libc_stop(i64 %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ rest();
int /*<<< orphan*/ term();
void expr() {
  term();
  rest();
}


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

x86 assembly (clang, -O2):
<expr>:
push   %rax
xor    %eax,%eax
call   1040 <term@plt>
xor    %eax,%eax
pop    %rcx
jmp    1030 <rest@plt>

LLVM IR (-O0):
define void @expr() {
%1 = call i32 (...) @term()
%2 = call i32 (...) @rest()
ret void
}

LLVM IR (-O2):
define void @expr() {
%1 = tail call i32 (...) @term()
%2 = tail call i32 (...) @rest()
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ volatile uint8_t;

/* Variables and functions */
void reg8_toggle_bits(volatile uint8_t *reg, uint8_t value) { *reg ^= value; }


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

x86 assembly (clang, -O2):
<reg8_toggle_bits>:
mov    %esi,-0x4(%rsp)
mov    -0x4(%rsp),%eax
xor    %eax,(%rdi)
ret

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

LLVM IR (-O2):
define void @reg8_toggle_bits(i32* %0, i32 %1) {
%3 = alloca i32
store volatile i32 %1, i32* %3
%4 = load volatile i32, i32* %3
%5 = load volatile i32, i32* %0
%6 = xor i32 %5, %4
store volatile i32 %6, i32* %0
ret void
}
/* Type definitions */
typedef scalar_t__ pid_t;

/* Variables and functions */
int /*<<< orphan*/ error();
int /*<<< orphan*/ execvp(char *, char **);
int /*<<< orphan*/ exit(int /*<<< orphan*/);
scalar_t__ fork();
int /*<<< orphan*/ waitpid(scalar_t__, int *, int /*<<< orphan*/);
void execCmd(char *command[]) {
  pid_t childPID;
  int childStatus;
  childPID = fork();
  if (childPID == 0) {
    execvp(command[0], command);
    error();
    exit(0);
  } else {
    waitpid(childPID, &childStatus, 0);
  }
  return;
}


x86 assembly (clang, -O0):
<execCmd>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    $0x0,%al
call   1070 <fork@plt>
mov    %rax,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
jne    1190 <execCmd+0x40>
mov    -0x8(%rbp),%rax
mov    (%rax),%rdi
mov    -0x8(%rbp),%rsi
call   1050 <execvp@plt>
mov    $0x0,%al
call   1030 <error@plt>
xor    %edi,%edi
call   1060 <exit@plt>
mov    -0x10(%rbp),%rdi
lea    -0x14(%rbp),%rsi
xor    %edx,%edx
call   1040 <waitpid@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<execCmd>:
push   %rbx
sub    $0x10,%rsp
mov    %rdi,%rbx
xor    %eax,%eax
call   1070 <fork@plt>
test   %rax,%rax
je     1179 <execCmd+0x29>
lea    0xc(%rsp),%rsi
mov    %rax,%rdi
xor    %edx,%edx
call   1040 <waitpid@plt>
add    $0x10,%rsp
pop    %rbx
ret
mov    (%rbx),%rdi
mov    %rbx,%rsi
call   1050 <execvp@plt>
xor    %eax,%eax
call   1030 <error@plt>
xor    %edi,%edi
call   1060 <exit@plt>

LLVM IR (-O0):
define void @execCmd(i8** %0) {
%2 = alloca i8**
%3 = alloca i64
%4 = alloca i32
store i8** %0, i8*** %2
%5 = call i64 (...) @fork()
store i64 %5, i64* %3
%6 = load i64, i64* %3
%7 = icmp eq i64 %6, 0
br i1 %7, label %8, label %16
8: ; preds = %1
%9 = load i8**, i8*** %2
%10 = getelementptr inbounds i8*, i8** %9, i64 0
%11 = load i8*, i8** %10
%12 = load i8**, i8*** %2
%13 = call i32 @execvp(i8* %11, i8** %12)
%14 = call i32 (...) @error()
%15 = call i32 @exit(i32 0)
unreachable
16: ; preds = %1
%17 = load i64, i64* %3
%18 = call i32 @waitpid(i64 %17, i32* %4, i32 0)
br label %19
19: ; preds = %16
ret void
}

LLVM IR (-O2):
define void @execCmd(i8** %0) {
%2 = alloca i32
%3 = bitcast i32* %2 to i8*
%4 = tail call i64 (...) @fork()
%5 = icmp eq i64 %4, 0
br i1 %5, label %6, label %11
6: ; preds = %1
%7 = load i8*, i8** %0
%8 = tail call i32 @execvp(i8* %7, i8** %0)
%9 = tail call i32 (...) @error()
%10 = tail call i32 @exit(i32 0)
unreachable
11: ; preds = %1
%12 = call i32 @waitpid(i64 %4, i32* %2, i32 0)
ret void
}
char lastchr(char *cp) {
  while (cp[0] && cp[1])
    cp++;
  return (*cp);
}


x86 assembly (clang, -O0):
<lastchr>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movsbl (%rax),%ecx
xor    %eax,%eax
cmp    $0x0,%ecx
mov    %al,-0x9(%rbp)
je     112e <lastchr+0x2e>
mov    -0x8(%rbp),%rax
movsbl 0x1(%rax),%eax
cmp    $0x0,%eax
setne  %al
mov    %al,-0x9(%rbp)
mov    -0x9(%rbp),%al
test   $0x1,%al
jne    113e <lastchr+0x3e>
jmp    114f <lastchr+0x4f>
mov    -0x8(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x8(%rbp)
jmp    1108 <lastchr+0x8>
mov    -0x8(%rbp),%rax
movsbl (%rax),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<lastchr>:
mov    (%rdi),%cl
add    $0x1,%rdi
cs nopw 0x0(%rax,%rax,1)
mov    %ecx,%eax
test   %cl,%cl
je     1121 <lastchr+0x21>
movzbl (%rdi),%ecx
add    $0x1,%rdi
test   %cl,%cl
jne    1110 <lastchr+0x10>
ret

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

LLVM IR (-O2):
define signext i8 @lastchr(i8* nocapture %0) {
%2 = load i8, i8* %0
br label %3
3: ; preds = %7, %1
%4 = phi i8 [ %2, %1 ], [ %9, %7 ]
%5 = phi i8* [ %0, %1 ], [ %8, %7 ]
%6 = icmp eq i8 %4, 0
br i1 %6, label %11, label %7
7: ; preds = %3
%8 = getelementptr inbounds i8, i8* %5, i64 1
%9 = load i8, i8* %8
%10 = icmp eq i8 %9, 0
br i1 %10, label %11, label %3
11: ; preds = %3, %7
ret i8 %4
}
int hcf(int n1, int n2) {
  if (n2 != 0)
    return hcf(n2, n1 % n2);
  else
    return n1;
}


x86 assembly (clang, -O0):
<hcf>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
cmpl   $0x0,-0xc(%rbp)
je     1141 <hcf+0x31>
mov    -0xc(%rbp),%edi
mov    -0x8(%rbp),%eax
cltd
idivl  -0xc(%rbp)
mov    %edx,%esi
call   1030 <hcf@plt>
mov    %eax,-0x4(%rbp)
jmp    1147 <hcf+0x37>
mov    -0x8(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<hcf>:
mov    %edi,%eax
test   %esi,%esi
je     111d <hcf+0x1d>
mov    %esi,%edx
nopl   0x0(%rax,%rax,1)
mov    %edx,%ecx
cltd
idiv   %ecx
mov    %ecx,%eax
test   %edx,%edx
jne    1110 <hcf+0x10>
mov    %ecx,%eax
ret

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

LLVM IR (-O2):
define i32 @hcf(i32 %0, i32 %1) {
%3 = icmp eq i32 %1, 0
br i1 %3, label %9, label %4
4: ; preds = %2, %4
%5 = phi i32 [ %7, %4 ], [ %1, %2 ]
%6 = phi i32 [ %5, %4 ], [ %0, %2 ]
%7 = srem i32 %6, %5
%8 = icmp eq i32 %7, 0
br i1 %8, label %9, label %4
9: ; preds = %4, %2
%10 = phi i32 [ %0, %2 ], [ %5, %4 ]
ret i32 %10
}