xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ genericError(char *, int, char const *);
void errorRegexCompile(const char *regex) {
  genericError("Error in compiling regex %s", 3, regex);
}


x86 assembly (clang, -O0):
<errorRegexCompile>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdx
lea    0xed9(%rip),%rdi
mov    $0x3,%esi
call   1030 <genericError@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<errorRegexCompile>:
mov    %rdi,%rdx
lea    0xee6(%rip),%rdi
mov    $0x3,%esi
jmp    1030 <genericError@plt>

LLVM IR (-O0):
@.str = [28 x i8] c"Error in compiling regex %s\00"
define void @errorRegexCompile(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 @genericError(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str, i64 0, i64 0), i32 3, i8* %3)
ret void
}

LLVM IR (-O2):
@.str = [28 x i8] c"Error in compiling regex %s\00"
define void @errorRegexCompile(i8* %0) {
%2 = tail call i32 @genericError(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str, i64 0, i64 0), i32 3, i8* %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ bar(int /*<<< orphan*/);
void foo(void) {
#pragma omp master
  bar(0);
}


x86 assembly (clang, -O0):
<foo>:
push   %rbp
mov    %rsp,%rbp
xor    %edi,%edi
call   1030 <bar@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<foo>:
xor    %edi,%edi
jmp    1030 <bar@plt>

LLVM IR (-O0):
define void @foo() {
%1 = call i32 @bar(i32 0)
ret void
}

LLVM IR (-O2):
define void @foo() {
%1 = tail call i32 @bar(i32 0)
ret void
}
/* Variables and functions */
scalar_t__ isblank(char);
char *skip_blank(char *p) {
  while (isblank(*p))
    p++;
  return p;
}


x86 assembly (clang, -O0):
<skip_blank>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movsbl (%rax),%edi
call   1030 <isblank@plt>
cmp    $0x0,%rax
je     1143 <skip_blank+0x33>
mov    -0x8(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x8(%rbp)
jmp    111c <skip_blank+0xc>
mov    -0x8(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<skip_blank>:
push   %rbx
mov    %rdi,%rbx
add    $0xffffffffffffffff,%rbx
nopl   0x0(%rax,%rax,1)
movsbl 0x1(%rbx),%edi
add    $0x1,%rbx
call   1030 <isblank@plt>
test   %rax,%rax
jne    1120 <skip_blank+0x10>
mov    %rbx,%rax
pop    %rbx
ret

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

LLVM IR (-O2):
define i8* @skip_blank(i8* %0) {
br label %2
2: ; preds = %2, %1
%3 = phi i8* [ %0, %1 ], [ %7, %2 ]
%4 = load i8, i8* %3
%5 = tail call i64 @isblank(i8 signext %4)
%6 = icmp eq i64 %5, 0
%7 = getelementptr inbounds i8, i8* %3, i64 1
br i1 %6, label %8, label %2
8: ; preds = %2
ret i8* %3
}
void pred_constant_init(const struct XCSF *xcsf, struct Cl *c) {
  (void)xcsf;
  (void)c;
}


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

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

LLVM IR (-O0):
%struct.XCSF = type opaque
%struct.Cl = type opaque
define void @pred_constant_init(%struct.XCSF* %0, %struct.Cl* %1) {
%3 = alloca %struct.XCSF*
%4 = alloca %struct.Cl*
store %struct.XCSF* %0, %struct.XCSF** %3
store %struct.Cl* %1, %struct.Cl** %4
%5 = load %struct.XCSF*, %struct.XCSF** %3
%6 = load %struct.Cl*, %struct.Cl** %4
ret void
}

LLVM IR (-O2):
%struct.XCSF = type opaque
%struct.Cl = type opaque
define void @pred_constant_init(%struct.XCSF* nocapture %0, %struct.Cl* nocapture %1) {
ret void
}
void call_desc_rec_state(struct desc_track *desc) {}


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

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

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

LLVM IR (-O2):
%struct.desc_track = type opaque
define void @call_desc_rec_state(%struct.desc_track* nocapture %0) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ unican_boards_cleanup();
void candrv_cleanup(void) { unican_boards_cleanup(); }


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

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

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

LLVM IR (-O2):
define void @candrv_cleanup() {
%1 = tail call i32 (...) @unican_boards_cleanup()
ret void
}
/* Variables and functions */
char *get_geoip_data(const char *data) {
  const char *location = NULL;
  return (char *)location;
}


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

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

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

LLVM IR (-O2):
define noalias i8* @get_geoip_data(i8* nocapture readnone %0) {
ret i8* null
}
void ff_hevc_put_hevc_uni_w_epel_hv24_8_sse4() {}


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

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

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

LLVM IR (-O2):
define void @ff_hevc_put_hevc_uni_w_epel_hv24_8_sse4() {
ret void
}
void genbltz_idle() {}


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

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

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

LLVM IR (-O2):
define void @genbltz_idle() {
ret void
}
unsigned xrop3_160_1_1(unsigned char s, unsigned char t) {
  unsigned D = 0x00ff;
  unsigned S = ((unsigned)s << 8) | s;
  unsigned T = ((unsigned)t << 8) | t;
  unsigned stk1;
  stk1 = D & T;
  return (stk1 & (~S) & (~T)) | (D & S) | (D & T);
}


x86 assembly (clang, -O0):
<xrop3_160_1_1>:
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
and    -0x10(%rbp),%eax
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
mov    -0xc(%rbp),%ecx
xor    $0xffffffff,%ecx
and    %ecx,%eax
mov    -0x10(%rbp),%ecx
xor    $0xffffffff,%ecx
and    %ecx,%eax
mov    -0x8(%rbp),%ecx
and    -0xc(%rbp),%ecx
or     %ecx,%eax
mov    -0x8(%rbp),%ecx
and    -0x10(%rbp),%ecx
or     %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<xrop3_160_1_1>:
mov    %edi,%eax
or     %esi,%eax
ret

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

LLVM IR (-O2):
define i32 @xrop3_160_1_1(i8 zeroext %0, i8 zeroext %1) {
%3 = or i8 %1, %0
%4 = zext i8 %3 to i32
ret i32 %4
}
/* Variables and functions */
size_t gc_align(size_t n) { return (n + 7) & (~(size_t)7); }


x86 assembly (clang, -O0):
<gc_align>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x7,%rax
and    $0xfffffffffffffff8,%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<gc_align>:
lea    0x7(%rdi),%rax
and    $0xfffffffffffffff8,%rax
ret

LLVM IR (-O0):
define i64 @gc_align(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = load i64, i64* %2
%4 = add i64 %3, 7
%5 = and i64 %4, -8
ret i64 %5
}

LLVM IR (-O2):
define i64 @gc_align(i64 %0) {
%2 = add i64 %0, 7
%3 = and i64 %2, -8
ret i64 %3
}
/* Variables and functions */
int /*<<< orphan*/ print_h2_pairs();
int /*<<< orphan*/ print_h2_singles();
int /*<<< orphan*/ printf(char *);
void print_h2_info() {
  print_h2_pairs();
  printf("\n");
  print_h2_singles();
  printf("\n");
}


x86 assembly (clang, -O0):
<print_h2_info>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1050 <print_h2_pairs@plt>
lea    0xebe(%rip),%rdi
call   1030 <printf@plt>
mov    $0x0,%al
call   1040 <print_h2_singles@plt>
lea    0xeab(%rip),%rdi
call   1030 <printf@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<print_h2_info>:
push   %rax
xor    %eax,%eax
call   1050 <print_h2_pairs@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
xor    %eax,%eax
call   1040 <print_h2_singles@plt>
mov    $0xa,%edi
pop    %rax
jmp    1030 <putchar@plt>

LLVM IR (-O0):
@.str = [2 x i8] c"\0A\00"
define void @print_h2_info() {
%1 = call i32 (...) @print_h2_pairs()
%2 = call i32 @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
%3 = call i32 (...) @print_h2_singles()
%4 = call i32 @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
define void @print_h2_info() {
%1 = tail call i32 (...) @print_h2_pairs()
%2 = tail call i32 @putchar(i32 10)
%3 = tail call i32 (...) @print_h2_singles()
%4 = tail call i32 @putchar(i32 10)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, ...);
int usage(char *progname) {
  printf("\nusage: %s [-d spooldir] [-p port]\n", progname);
  printf("options: -d spooldir\twhere to store incoming files (default: .)\n");
  printf("         -p port\tport we are listening on (default: %d)\n", 2546);
  return (-1);
}


x86 assembly (clang, -O0):
<usage>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rsi
lea    0xed9(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xeef(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xf22(%rip),%rdi
mov    $0x9f2,%esi
mov    $0x0,%al
call   1030 <printf@plt>
mov    $0xffffffff,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<usage>:
push   %rax
mov    %rdi,%rsi
lea    0xed5(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xf24(%rip),%rdi
call   1030 <puts@plt>
lea    0xedf(%rip),%rdi
mov    $0x9f2,%esi
xor    %eax,%eax
call   1040 <printf@plt>
mov    $0xffffffff,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [36 x i8] c"\0Ausage: %s [-d spooldir] [-p port]\0A\00"
@.str.1 = [65 x i8] c"options: -d spooldir\09where to store incoming files (default: .)\0A\00"
@.str.2 = [57 x i8] c" -p port\09port we are listening on (default: %d)\0A\00"
define i32 @usage(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str, i64 0, i64 0), i8* %3)
%5 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([65 x i8], [65 x i8]* @.str.1, i64 0, i64 0))
%6 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([57 x i8], [57 x i8]* @.str.2, i64 0, i64 0), i32 2546)
ret i32 -1
}

LLVM IR (-O2):
@.str = [36 x i8] c"\0Ausage: %s [-d spooldir] [-p port]\0A\00"
@.str.2 = [57 x i8] c" -p port\09port we are listening on (default: %d)\0A\00"
@str = [64 x i8] c"options: -d spooldir\09where to store incoming files (default: .)\00"
define i32 @usage(i8* %0) {
%2 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([36 x i8], [36 x i8]* @.str, i64 0, i64 0), i8* %0)
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([64 x i8], [64 x i8]* @str, i64 0, i64 0))
%4 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([57 x i8], [57 x i8]* @.str.2, i64 0, i64 0), i32 2546)
ret i32 -1
}
/* Variables and functions */
int /*<<< orphan*/ perror(char *);
int /*<<< orphan*/ printf(char *, char *);
int main() {
  char str2[20] = "Hola que tal estas";
  perror("The error is the error haha ");
  printf("%s\n", str2);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    0xeca(%rip),%rax
mov    %rax,-0x20(%rbp)
mov    0xec7(%rip),%rax
mov    %rax,-0x18(%rbp)
mov    0xec5(%rip),%eax
mov    %eax,-0x10(%rbp)
lea    0xebf(%rip),%rdi
call   1040 <perror@plt>
lea    -0x20(%rbp),%rsi
lea    0xecc(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
sub    $0x18,%rsp
movaps 0xed5(%rip),%xmm0
movaps %xmm0,(%rsp)
movl   $0x7361,0x10(%rsp)
lea    0xed6(%rip),%rdi
call   1040 <perror@plt>
lea    0xee7(%rip),%rdi
mov    %rsp,%rsi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x18,%rsp
ret

LLVM IR (-O0):
@__const.main.str2 = [20 x i8] c"Hola que tal estas\00\00"
@.str = [29 x i8] c"The error is the error haha \00"
@.str.1 = [4 x i8] c"%s\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca [20 x i8]
store i32 0, i32* %1
%3 = bitcast [20 x i8]* %2 to i8*
%4 = call i32 @perror(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str, i64 0, i64 0))
%5 = getelementptr inbounds [20 x i8], [20 x i8]* %2, i64 0, i64 0
%6 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i8* %5)
ret i32 0
}

LLVM IR (-O2):
@__const.main.str2 = [20 x i8] c"Hola que tal estas\00\00"
@.str = [29 x i8] c"The error is the error haha \00"
@.str.1 = [4 x i8] c"%s\0A\00"
define i32 @main() {
%1 = alloca [20 x i8]
%2 = getelementptr inbounds [20 x i8], [20 x i8]* %1, i64 0, i64 0
%3 = tail call i32 @perror(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str, i64 0, i64 0))
%4 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i8* %2)
ret i32 0
}
int awesome_add(int a, int b) { return a + b; }


x86 assembly (clang, -O0):
<awesome_add>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
add    -0x8(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<awesome_add>:
lea    (%rdi,%rsi,1),%eax
ret

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

LLVM IR (-O2):
define i32 @awesome_add(i32 %0, i32 %1) {
%3 = add nsw i32 %1, %0
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ putchar(int);
int output(int k, int j, int a, int b, int c, int d) {
  putchar(k);
  putchar(j);
  putchar(a);
  putchar(b);
  putchar(c);
  putchar(d);
  return 0;
}


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

x86 assembly (clang, -O2):
<output>:
push   %rbp
push   %r15
push   %r14
push   %r12
push   %rbx
mov    %r9d,%r14d
mov    %r8d,%r15d
mov    %ecx,%r12d
mov    %edx,%ebp
mov    %esi,%ebx
call   1030 <putchar@plt>
mov    %ebx,%edi
call   1030 <putchar@plt>
mov    %ebp,%edi
call   1030 <putchar@plt>
mov    %r12d,%edi
call   1030 <putchar@plt>
mov    %r15d,%edi
call   1030 <putchar@plt>
mov    %r14d,%edi
call   1030 <putchar@plt>
xor    %eax,%eax
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
define i32 @output(i32 %0, i32 %1, i32 %2, i32 %3, i32 %4, i32 %5) {
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32
%10 = alloca i32
%11 = alloca i32
%12 = alloca i32
store i32 %0, i32* %7
store i32 %1, i32* %8
store i32 %2, i32* %9
store i32 %3, i32* %10
store i32 %4, i32* %11
store i32 %5, i32* %12
%13 = load i32, i32* %7
%14 = call i32 @putchar(i32 %13)
%15 = load i32, i32* %8
%16 = call i32 @putchar(i32 %15)
%17 = load i32, i32* %9
%18 = call i32 @putchar(i32 %17)
%19 = load i32, i32* %10
%20 = call i32 @putchar(i32 %19)
%21 = load i32, i32* %11
%22 = call i32 @putchar(i32 %21)
%23 = load i32, i32* %12
%24 = call i32 @putchar(i32 %23)
ret i32 0
}

LLVM IR (-O2):
define i32 @output(i32 %0, i32 %1, i32 %2, i32 %3, i32 %4, i32 %5) {
%7 = tail call i32 @putchar(i32 %0)
%8 = tail call i32 @putchar(i32 %1)
%9 = tail call i32 @putchar(i32 %2)
%10 = tail call i32 @putchar(i32 %3)
%11 = tail call i32 @putchar(i32 %4)
%12 = tail call i32 @putchar(i32 %5)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ strlen(char const *);
scalar_t__ strncmp(char const *, char const *, int /*<<< orphan*/);
int StartsWith(const char *a, const char *b) {
  if (strncmp(a, b, strlen(b)) == 0)
    return 1;
  return 0;
}


x86 assembly (clang, -O0):
<StartsWith>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x28(%rbp)
mov    -0x18(%rbp),%rax
mov    %rax,-0x20(%rbp)
mov    -0x18(%rbp),%rdi
call   1040 <strlen@plt>
mov    -0x28(%rbp),%rdi
mov    -0x20(%rbp),%rsi
mov    %eax,%edx
call   1030 <strncmp@plt>
cmp    $0x0,%rax
jne    116e <StartsWith+0x4e>
movl   $0x1,-0x4(%rbp)
jmp    1175 <StartsWith+0x55>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x30,%rsp
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @StartsWith(i8* %0, i8* %1) {
%3 = tail call i32 @strlen(i8* %1)
%4 = tail call i64 @strncmp(i8* %0, i8* %1, i32 %3)
%5 = icmp eq i64 %4, 0
%6 = zext i1 %5 to i32
ret i32 %6
}
int clickplc_exe_ConnectUncond_dec(unsigned char *stream, void *obj) {
  int encsize = 4;
  return (encsize);
}


x86 assembly (clang, -O0):
<clickplc_exe_ConnectUncond_dec>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x4,-0x14(%rbp)
mov    -0x14(%rbp),%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @clickplc_exe_ConnectUncond_dec(i8* nocapture readnone %0, i8* nocapture readnone %1) {
ret i32 4
}
/* Variables and functions */
int /*<<< orphan*/ assert(int);
int /*<<< orphan*/ assume(int);
int main() {
  int n;
  assume(n >= 5000);
  assume(n <= 10000);
  int i;
  int j;
  i = 0;
  j = 0;
  while (i < n) {
    j = j + i;
    i = i + 1;
  }
  assert(2 * j == n * (n + 1));
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
cmpl   $0x1388,-0x8(%rbp)
setge  %al
and    $0x1,%al
movzbl %al,%edi
call   1040 <assume@plt>
cmpl   $0x2710,-0x8(%rbp)
setle  %al
and    $0x1,%al
movzbl %al,%edi
call   1040 <assume@plt>
movl   $0x0,-0xc(%rbp)
movl   $0x0,-0x10(%rbp)
mov    -0xc(%rbp),%eax
cmp    -0x8(%rbp),%eax
jge    1188 <main+0x68>
mov    -0x10(%rbp),%eax
add    -0xc(%rbp),%eax
mov    %eax,-0x10(%rbp)
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1165 <main+0x45>
mov    -0x10(%rbp),%eax
shl    $0x1,%eax
mov    -0x8(%rbp),%ecx
mov    -0x8(%rbp),%edx
add    $0x1,%edx
imul   %edx,%ecx
cmp    %ecx,%eax
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <assert@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
store i32 0, i32* %1
%5 = load i32, i32* %2
%6 = icmp sge i32 %5, 5000
%7 = zext i1 %6 to i32
%8 = call i32 @assume(i32 %7)
%9 = load i32, i32* %2
%10 = icmp sle i32 %9, 10000
%11 = zext i1 %10 to i32
%12 = call i32 @assume(i32 %11)
store i32 0, i32* %3
store i32 0, i32* %4
br label %13
13: ; preds = %17, %0
%14 = load i32, i32* %3
%15 = load i32, i32* %2
%16 = icmp slt i32 %14, %15
br i1 %16, label %17, label %23
17: ; preds = %13
%18 = load i32, i32* %4
%19 = load i32, i32* %3
%20 = add nsw i32 %18, %19
store i32 %20, i32* %4
%21 = load i32, i32* %3
%22 = add nsw i32 %21, 1
store i32 %22, i32* %3
br label %13
23: ; preds = %13
%24 = load i32, i32* %4
%25 = mul nsw i32 2, %24
%26 = load i32, i32* %2
%27 = load i32, i32* %2
%28 = add nsw i32 %27, 1
%29 = mul nsw i32 %26, %28
%30 = icmp eq i32 %25, %29
%31 = zext i1 %30 to i32
%32 = call i32 @assert(i32 %31)
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 @assume(i32 1)
%2 = tail call i32 @assume(i32 1)
%3 = tail call i32 @assert(i32 0)
ret i32 0
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;
typedef int /*<<< orphan*/ Elf64_Word;
typedef int /*<<< orphan*/ Elf64_Shdr;
typedef int /*<<< orphan*/ Elf64_Off;

/* Variables and functions */
void parse_section(FILE *fp, Elf64_Shdr section_header, Elf64_Off offset,
                   Elf64_Word size) {}


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

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

LLVM IR (-O0):
define void @parse_section(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
ret void
}

LLVM IR (-O2):
define void @parse_section(i32* nocapture %0, i32 %1, i32 %2, i32 %3) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ MYFUNC(int, char *);
int main() {
  MYFUNC(10, "printme");
  return 0;
}


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

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xee8(%rip),%rsi
mov    $0xa,%edi
call   1030 <MYFUNC@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [8 x i8] c"printme\00"
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 @MYFUNC(i32 10, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@.str = [8 x i8] c"printme\00"
define i32 @main() {
%1 = tail call i32 @MYFUNC(i32 10, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0))
ret i32 0
}
void ff_hevc_put_hevc_uni_epel_v64_10_avx2() {}


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

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

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

LLVM IR (-O2):
define void @ff_hevc_put_hevc_uni_epel_v64_10_avx2() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int main(int argc, char **argv) {
  printf("No FIPS DSA support\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 = [21 x i8] c"No FIPS DSA support\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 ([21 x i8], [21 x i8]* @.str, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@str = [20 x i8] c"No FIPS DSA support\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([20 x i8], [20 x i8]* @str, i64 0, i64 0))
ret i32 0
}
/* Variables and functions */
int mersenne_twister(unsigned int, unsigned int);
int rand_r(unsigned *seedp) {
  *seedp = mersenne_twister(*seedp & 0xf, *seedp) & 0x7fffffff;
  return *seedp;
}


x86 assembly (clang, -O0):
<rand_r>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%edi
and    $0xf,%edi
mov    -0x8(%rbp),%rax
mov    (%rax),%esi
call   1030 <mersenne_twister@plt>
mov    %eax,%ecx
and    $0x7fffffff,%ecx
mov    -0x8(%rbp),%rax
mov    %ecx,(%rax)
mov    -0x8(%rbp),%rax
mov    (%rax),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<rand_r>:
push   %rbx
mov    %rdi,%rbx
mov    (%rdi),%esi
mov    %esi,%edi
and    $0xf,%edi
call   1030 <mersenne_twister@plt>
and    $0x7fffffff,%eax
mov    %eax,(%rbx)
pop    %rbx
ret

LLVM IR (-O0):
define i32 @rand_r(i32* %0) {
%2 = alloca i32*
store i32* %0, i32** %2
%3 = load i32*, i32** %2
%4 = load i32, i32* %3
%5 = and i32 %4, 15
%6 = load i32*, i32** %2
%7 = load i32, i32* %6
%8 = call i32 @mersenne_twister(i32 %5, i32 %7)
%9 = and i32 %8, 2147483647
%10 = load i32*, i32** %2
store i32 %9, i32* %10
%11 = load i32*, i32** %2
%12 = load i32, i32* %11
ret i32 %12
}

LLVM IR (-O2):
define i32 @rand_r(i32* nocapture %0) {
%2 = load i32, i32* %0
%3 = and i32 %2, 15
%4 = tail call i32 @mersenne_twister(i32 %3, i32 %2)
%5 = and i32 %4, 2147483647
store i32 %5, i32* %0
ret i32 %5
}
/* Type definitions */
typedef int /*<<< orphan*/ uint32_t;

/* Variables and functions */
uint32_t endian_to_little32(uint32_t data) { return data; }


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

x86 assembly (clang, -O2):
<endian_to_little32>:
mov    %edi,%eax
ret

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

LLVM IR (-O2):
define i32 @endian_to_little32(i32 returned %0) {
ret i32 %0
}
/* Variables and functions */
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ printf(char *, ...);
int server_eof(void *client_data, int idx, int err, const char *errmsg) {
  if (err && errmsg)
    printf("Error: %s\n", errmsg);
  printf("Server closed connection!\n");
  exit(0);
}


x86 assembly (clang, -O0):
<server_eof>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    %rcx,-0x18(%rbp)
cmpl   $0x0,-0x10(%rbp)
je     115d <server_eof+0x3d>
cmpq   $0x0,-0x18(%rbp)
je     115d <server_eof+0x3d>
mov    -0x18(%rbp),%rsi
lea    0xeaa(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xea7(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
xor    %edi,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<server_eof>:
push   %rax
test   %edx,%edx
je     114b <server_eof+0x1b>
test   %rcx,%rcx
je     114b <server_eof+0x1b>
lea    0xebf(%rip),%rdi
mov    %rcx,%rsi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xeb9(%rip),%rdi
call   1030 <puts@plt>
xor    %edi,%edi
call   1050 <exit@plt>

LLVM IR (-O0):
@.str = [11 x i8] c"Error: %s\0A\00"
@.str.1 = [27 x i8] c"Server closed connection!\0A\00"
define i32 @server_eof(i8* %0, i32 %1, i32 %2, i8* %3) {
%5 = alloca i8*
%6 = alloca i32
%7 = alloca i32
%8 = alloca i8*
store i8* %0, i8** %5
store i32 %1, i32* %6
store i32 %2, i32* %7
store i8* %3, i8** %8
%9 = load i32, i32* %7
%10 = icmp ne i32 %9, 0
br i1 %10, label %11, label %17
11: ; preds = %4
%12 = load i8*, i8** %8
%13 = icmp ne i8* %12, null
br i1 %13, label %14, label %17
14: ; preds = %11
%15 = load i8*, i8** %8
%16 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), i8* %15)
br label %17
17: ; preds = %14, %11, %4
%18 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.1, i64 0, i64 0))
%19 = call i32 @exit(i32 0)
unreachable
}

LLVM IR (-O2):
@.str = [11 x i8] c"Error: %s\0A\00"
@str = [26 x i8] c"Server closed connection!\00"
define i32 @server_eof(i8* nocapture readnone %0, i32 %1, i32 %2, i8* %3) {
%5 = icmp ne i32 %2, 0
%6 = icmp ne i8* %3, null
%7 = and i1 %5, %6
br i1 %7, label %8, label %10
8: ; preds = %4
%9 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), i8* %3)
br label %10
10: ; preds = %8, %4
%11 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([26 x i8], [26 x i8]* @str, i64 0, i64 0))
%12 = tail call i32 @exit(i32 0)
unreachable
}
/* Variables and functions */
int /*<<< orphan*/ BNCIO(int);
int BNCPulse() {
  int ii, stat = 99;
  char com1, data;
  BNCIO(23);
  return (stat);
}


x86 assembly (clang, -O0):
<BNCPulse>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x63,-0x8(%rbp)
mov    $0x17,%edi
call   1030 <BNCIO@plt>
mov    -0x8(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<BNCPulse>:
push   %rax
mov    $0x17,%edi
call   1030 <BNCIO@plt>
mov    $0x63,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @BNCPulse() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i8
%4 = alloca i8
store i32 99, i32* %2
%5 = call i32 @BNCIO(i32 23)
%6 = load i32, i32* %2
ret i32 %6
}

LLVM IR (-O2):
define i32 @BNCPulse() {
%1 = tail call i32 @BNCIO(i32 23)
ret i32 99
}
/* Variables and functions */
int add_one(int arg) { return arg + 1; }


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

x86 assembly (clang, -O2):
<add_one>:
lea    0x1(%rdi),%eax
ret

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

LLVM IR (-O2):
define i32 @add_one(i32 %0) {
%2 = add nsw i32 %0, 1
ret i32 %2
}
unsigned xrop3_56_0_1(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 | T;
  stk2 = S & stk3;
  stk1 = T ^ stk2;
  return (stk1 & S) | (stk1 & (~T)) | (T & (~S) & D);
}


x86 assembly (clang, -O0):
<xrop3_56_0_1>:
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
or     -0x10(%rbp),%eax
mov    %eax,-0x1c(%rbp)
mov    -0xc(%rbp),%eax
and    -0x1c(%rbp),%eax
mov    %eax,-0x18(%rbp)
mov    -0x10(%rbp),%eax
xor    -0x18(%rbp),%eax
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
and    -0xc(%rbp),%eax
mov    -0x14(%rbp),%ecx
mov    -0x10(%rbp),%edx
xor    $0xffffffff,%edx
and    %edx,%ecx
or     %ecx,%eax
mov    -0x10(%rbp),%ecx
mov    -0xc(%rbp),%edx
xor    $0xffffffff,%edx
and    %edx,%ecx
and    -0x8(%rbp),%ecx
or     %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<xrop3_56_0_1>:
mov    %edi,%eax
shl    $0x8,%eax
or     %edi,%eax
mov    %esi,%ecx
shl    $0x8,%ecx
lea    (%rcx,%rsi,1),%edx
or     $0xff,%ecx
and    %eax,%ecx
mov    %ecx,%edi
xor    %edx,%edi
and    %eax,%edi
not    %edx
and    %ecx,%edx
not    %eax
and    %esi,%eax
or     %edx,%eax
or     %edi,%eax
ret

LLVM IR (-O0):
define i32 @xrop3_56_0_1(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 = load i32, i32* %7
%25 = or i32 %23, %24
store i32 %25, i32* %10
%26 = load i32, i32* %6
%27 = load i32, i32* %10
%28 = and i32 %26, %27
store i32 %28, i32* %9
%29 = load i32, i32* %7
%30 = load i32, i32* %9
%31 = xor i32 %29, %30
store i32 %31, i32* %8
%32 = load i32, i32* %8
%33 = load i32, i32* %6
%34 = and i32 %32, %33
%35 = load i32, i32* %8
%36 = load i32, i32* %7
%37 = xor i32 %36, -1
%38 = and i32 %35, %37
%39 = or i32 %34, %38
%40 = load i32, i32* %7
%41 = load i32, i32* %6
%42 = xor i32 %41, -1
%43 = and i32 %40, %42
%44 = load i32, i32* %5
%45 = and i32 %43, %44
%46 = or i32 %39, %45
ret i32 %46
}

LLVM IR (-O2):
define i32 @xrop3_56_0_1(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 = or i32 %6, %5
%8 = or i32 %6, 255
%9 = and i32 %8, %4
%10 = xor i32 %9, %7
%11 = and i32 %10, %4
%12 = xor i32 %7, -1
%13 = and i32 %9, %12
%14 = xor i32 %4, -1
%15 = and i32 %14, %5
%16 = or i32 %13, %15
%17 = or i32 %16, %11
ret i32 %17
}
int EraseChip(void) { return (0); }


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

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

LLVM IR (-O0):
define i32 @EraseChip() {
ret i32 0
}

LLVM IR (-O2):
define i32 @EraseChip() {
ret i32 0
}
/* Variables and functions */
int unlink(char const *);
int _unlink(const char *path) { return unlink(path); }


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

x86 assembly (clang, -O2):
<_unlink>:
jmp    1030 <unlink@plt>

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

LLVM IR (-O2):
define i32 @_unlink(i8* nocapture %0) {
%2 = tail call i32 @unlink(i8* %0)
ret i32 %2
}
/* Type definitions */
struct timeval {
  int tv_usec;
  scalar_t__ tv_sec;
};
typedef int int64_t;

/* Variables and functions */
int /*<<< orphan*/ gettimeofday(struct timeval *, int /*<<< orphan*/ *);
int64_t _timestamp_now() {
  struct timeval tv;
  gettimeofday(&tv, NULL);
  return (int64_t)tv.tv_sec * 1000000 + tv.tv_usec;
}


x86 assembly (clang, -O0):
<_timestamp_now>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    -0x10(%rbp),%rdi
xor    %eax,%eax
mov    %eax,%esi
call   1030 <gettimeofday@plt>
mov    -0x8(%rbp),%rax
imul   $0xf4240,%eax,%eax
add    -0x10(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<_timestamp_now>:
sub    $0x18,%rsp
lea    0x8(%rsp),%rdi
xor    %esi,%esi
call   1030 <gettimeofday@plt>
imul   $0xf4240,0x10(%rsp),%eax
add    0x8(%rsp),%eax
add    $0x18,%rsp
ret

LLVM IR (-O0):
%struct.timeval = type { i32, i64 }
define i32 @_timestamp_now() {
%1 = alloca %struct.timeval
%2 = call i32 @gettimeofday(%struct.timeval* %1, i32* null)
%3 = getelementptr inbounds %struct.timeval, %struct.timeval* %1, i32 0, i32 1
%4 = load i64, i64* %3
%5 = trunc i64 %4 to i32
%6 = mul nsw i32 %5, 1000000
%7 = getelementptr inbounds %struct.timeval, %struct.timeval* %1, i32 0, i32 0
%8 = load i32, i32* %7
%9 = add nsw i32 %6, %8
ret i32 %9
}

LLVM IR (-O2):
%struct.timeval = type { i32, i64 }
define i32 @_timestamp_now() {
%1 = alloca %struct.timeval
%2 = bitcast %struct.timeval* %1 to i8*
%3 = call i32 @gettimeofday(%struct.timeval* %1, i32* null)
%4 = getelementptr inbounds %struct.timeval, %struct.timeval* %1, i64 0, i32 1
%5 = load i64, i64* %4
%6 = trunc i64 %5 to i32
%7 = mul nsw i32 %6, 1000000
%8 = getelementptr inbounds %struct.timeval, %struct.timeval* %1, i64 0, i32 0
%9 = load i32, i32* %8
%10 = add nsw i32 %7, %9
ret i32 %10
}
/* Variables and functions */
int /*<<< orphan*/ OS_UNLOCK();
void tsk_unlock(void) { OS_UNLOCK(); }


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

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

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

LLVM IR (-O2):
define void @tsk_unlock() {
%1 = tail call i32 (...) @OS_UNLOCK()
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
scalar_t__ EINTR;
scalar_t__ errno;
int fclose(int /*<<< orphan*/ *);
int sca_fclose(FILE *fptr) {
  int retval;
  do {
    retval = fclose(fptr);
  } while (errno == EINTR);
  return retval;
}


x86 assembly (clang, -O0):
<sca_fclose>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <fclose@plt>
mov    %eax,-0xc(%rbp)
mov    0x2eb1(%rip),%rax
mov    (%rax),%rax
mov    0x2e9f(%rip),%rcx
cmp    (%rcx),%rax
je     111c <sca_fclose+0xc>
mov    -0xc(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<sca_fclose>:
push   %r15
push   %r14
push   %rbx
mov    %rdi,%rbx
mov    0x2ec1(%rip),%r14
mov    0x2eb2(%rip),%r15
cs nopw 0x0(%rax,%rax,1)
mov    %rbx,%rdi
call   1030 <fclose@plt>
mov    (%r14),%rcx
cmp    (%r15),%rcx
je     1130 <sca_fclose+0x20>
pop    %rbx
pop    %r14
pop    %r15
ret

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

LLVM IR (-O2):
@errno = global i64 0
@EINTR = global i64 0
define i32 @sca_fclose(i32* nocapture %0) {
br label %2
2: ; preds = %2, %1
%3 = tail call i32 @fclose(i32* %0)
%4 = load i64, i64* @errno
%5 = load i64, i64* @EINTR
%6 = icmp eq i64 %4, %5
br i1 %6, label %2, label %7
7: ; preds = %2
ret i32 %3
}
/* Variables and functions */
int checkout(char const *);
int /*<<< orphan*/ printf(char *, char const *);
int wizard(const char *uname) {
  int flag;
  if ((flag = checkout(uname)) != 0)
    printf("You are the Great wizard %s.\n", uname);
  return flag;
}


x86 assembly (clang, -O0):
<wizard>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <checkout@plt>
mov    %eax,-0xc(%rbp)
cmp    $0x0,%eax
je     1151 <wizard+0x31>
mov    -0x8(%rbp),%rsi
lea    0xeb4(%rip),%rdi
call   1040 <printf@plt>
mov    -0xc(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<wizard>:
push   %rbp
push   %rbx
push   %rax
mov    %rdi,%rbx
call   1030 <checkout@plt>
mov    %eax,%ebp
test   %eax,%eax
je     1140 <wizard+0x20>
lea    0xec8(%rip),%rdi
mov    %rbx,%rsi
call   1040 <printf@plt>
mov    %ebp,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
@.str = [30 x i8] c"You are the Great wizard %s.\0A\00"
define i32 @wizard(i8* %0) {
%2 = alloca i8*
%3 = alloca i32
store i8* %0, i8** %2
%4 = load i8*, i8** %2
%5 = call i32 @checkout(i8* %4)
store i32 %5, i32* %3
%6 = icmp ne i32 %5, 0
br i1 %6, label %7, label %10
7: ; preds = %1
%8 = load i8*, i8** %2
%9 = call i32 @printf(i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str, i64 0, i64 0), i8* %8)
br label %10
10: ; preds = %7, %1
%11 = load i32, i32* %3
ret i32 %11
}

LLVM IR (-O2):
@.str = [30 x i8] c"You are the Great wizard %s.\0A\00"
define i32 @wizard(i8* %0) {
%2 = tail call i32 @checkout(i8* %0)
%3 = icmp eq i32 %2, 0
br i1 %3, label %6, label %4
4: ; preds = %1
%5 = tail call i32 @printf(i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str, i64 0, i64 0), i8* %0)
br label %6
6: ; preds = %4, %1
ret i32 %2
}
void TZX_WriteData(unsigned char DataBit) {}


x86 assembly (clang, -O0):
<TZX_WriteData>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x1(%rbp)
pop    %rbp
ret

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

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

LLVM IR (-O2):
define void @TZX_WriteData(i8 zeroext %0) {
ret void
}
void logTrace(const char *logline, ...) {}


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

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

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

LLVM IR (-O2):
define void @logTrace(i8* nocapture %0, ...) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void hr() { printf("\n<-----> \t<-----> \n"); }


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

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

LLVM IR (-O0):
@.str = [20 x i8] c"\0A<-----> \09<-----> \0A\00"
define void @hr() {
%1 = call i32 @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@str = [19 x i8] c"\0A<-----> \09<-----> \00"
define void @hr() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([19 x i8], [19 x i8]* @str, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ freeDynamicGrid(short **);
void freeGlobalDynamicGrid(short ***grid) {
  if (*grid) {
    freeDynamicGrid(*grid);
    *grid = NULL;
  }
}


x86 assembly (clang, -O0):
<freeGlobalDynamicGrid>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
cmpq   $0x0,(%rax)
je     1141 <freeGlobalDynamicGrid+0x31>
mov    -0x8(%rbp),%rax
mov    (%rax),%rdi
call   1030 <freeDynamicGrid@plt>
mov    -0x8(%rbp),%rax
movq   $0x0,(%rax)
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<freeGlobalDynamicGrid>:
push   %rbx
mov    %rdi,%rbx
mov    (%rdi),%rdi
test   %rdi,%rdi
je     1128 <freeGlobalDynamicGrid+0x18>
call   1030 <freeDynamicGrid@plt>
movq   $0x0,(%rbx)
pop    %rbx
ret

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

LLVM IR (-O2):
define void @freeGlobalDynamicGrid(i16*** nocapture %0) {
%2 = load i16**, i16*** %0
%3 = icmp eq i16** %2, null
br i1 %3, label %6, label %4
4: ; preds = %1
%5 = tail call i32 @freeDynamicGrid(i16** %2)
store i16** null, i16*** %0
br label %6
6: ; preds = %4, %1
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, ...);
void tx_request_command() {
  unsigned char r_val;
  printf("Send transmit-request \n");
  r_val = *((unsigned char *)(0xfffc0000 + 0x0001)) | 0x01;
  *((unsigned char *)(0xfffc0000 + 0x0001)) = r_val;
  printf("command register: 0x%X \n\n",
         *((unsigned char *)(0xfffc0000 + 0x0001)));
}


x86 assembly (clang, -O0):
<tx_request_command>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    0xee1(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    $0xfffc0001,%eax
movzbl (%rax),%eax
or     $0x1,%eax
mov    %al,-0x1(%rbp)
mov    -0x1(%rbp),%cl
mov    $0xfffc0001,%eax
mov    %cl,(%rax)
mov    $0xfffc0001,%eax
movzbl (%rax),%esi
lea    0xecb(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<tx_request_command>:
push   %rax
lea    0xef2(%rip),%rdi
call   1030 <puts@plt>
mov    $0xfffc0001,%eax
movzbl (%rax),%esi
or     $0x1,%esi
mov    %sil,(%rax)
lea    0xebe(%rip),%rdi
xor    %eax,%eax
pop    %rcx
jmp    1040 <printf@plt>

LLVM IR (-O0):
@.str = [24 x i8] c"Send transmit-request \0A\00"
@.str.1 = [26 x i8] c"command register: 0x%X \0A\0A\00"
define void @tx_request_command() {
%1 = alloca i8
%2 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str, i64 0, i64 0))
%3 = load i8, i8* inttoptr (i64 4294705153 to i8*)
%4 = zext i8 %3 to i32
%5 = or i32 %4, 1
%6 = trunc i32 %5 to i8
store i8 %6, i8* %1
%7 = load i8, i8* %1
store i8 %7, i8* inttoptr (i64 4294705153 to i8*)
%8 = load i8, i8* inttoptr (i64 4294705153 to i8*)
%9 = zext i8 %8 to i32
%10 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.1, i64 0, i64 0), i32 %9)
ret void
}

LLVM IR (-O2):
@.str.1 = [26 x i8] c"command register: 0x%X \0A\0A\00"
@str = [23 x i8] c"Send transmit-request \00"
define void @tx_request_command() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([23 x i8], [23 x i8]* @str, i64 0, i64 0))
%2 = load i8, i8* inttoptr (i64 4294705153 to i8*)
%3 = or i8 %2, 1
store i8 %3, i8* inttoptr (i64 4294705153 to i8*)
%4 = zext i8 %3 to i32
%5 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([26 x i8], [26 x i8]* @.str.1, i64 0, i64 0), i32 %4)
ret void
}