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

/* Variables and functions */
int ressl_check_common_name(int /*<<< orphan*/ *, char const *);
int ressl_check_subject_altname(int /*<<< orphan*/ *, char const *);
int ressl_check_hostname(X509 *cert, const char *host) {
  int rv;
  rv = ressl_check_subject_altname(cert, host);
  if (rv == 0 || rv == -2)
    return rv;
  return ressl_check_common_name(cert, host);
}


x86 assembly (clang, -O0):
<ressl_check_hostname>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x18(%rbp),%rsi
call   1040 <ressl_check_subject_altname@plt>
mov    %eax,-0x1c(%rbp)
cmpl   $0x0,-0x1c(%rbp)
je     1154 <ressl_check_hostname+0x34>
cmpl   $0xfffffffe,-0x1c(%rbp)
jne    115f <ressl_check_hostname+0x3f>
mov    -0x1c(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    116f <ressl_check_hostname+0x4f>
mov    -0x10(%rbp),%rdi
mov    -0x18(%rbp),%rsi
call   1030 <ressl_check_common_name@plt>
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ressl_check_hostname>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%r14
mov    %rdi,%rbx
call   1040 <ressl_check_subject_altname@plt>
cmp    $0xfffffffe,%eax
je     1138 <ressl_check_hostname+0x18>
test   %eax,%eax
jne    1140 <ressl_check_hostname+0x20>
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret
mov    %rbx,%rdi
mov    %r14,%rsi
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1030 <ressl_check_common_name@plt>

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

LLVM IR (-O2):
define i32 @ressl_check_hostname(i32* %0, i8* %1) {
%3 = tail call i32 @ressl_check_subject_altname(i32* %0, i8* %1)
switch i32 %3, label %4 [
i32 -2, label %6
i32 0, label %6
]
4: ; preds = %2
%5 = tail call i32 @ressl_check_common_name(i32* %0, i8* %1)
br label %6
6: ; preds = %2, %2, %4
%7 = phi i32 [ %5, %4 ], [ %3, %2 ], [ %3, %2 ]
ret i32 %7
}
void pal_barrel_write() {}


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

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

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

LLVM IR (-O2):
define void @pal_barrel_write() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ back_to_prom();
void dec_machine_power_off(void) { back_to_prom(); }


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

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

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

LLVM IR (-O2):
define void @dec_machine_power_off() {
%1 = tail call i32 (...) @back_to_prom()
ret void
}
/* Variables and functions */
int _ada_use_c2phc(int, int *, int *, double *);
int sweep_get_number_of_variables(int *n) {
  int fail, *b;
  double *c;
  fail = _ada_use_c2phc(613, n, b, c);
  return fail;
}


x86 assembly (clang, -O0):
<sweep_get_number_of_variables>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rsi
mov    -0x18(%rbp),%rdx
mov    -0x20(%rbp),%rcx
mov    $0x265,%edi
call   1030 <_ada_use_c2phc@plt>
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<sweep_get_number_of_variables>:
mov    %rdi,%rsi
mov    $0x265,%edi
jmp    1030 <_ada_use_c2phc@plt>

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

LLVM IR (-O2):
define i32 @sweep_get_number_of_variables(i32* %0) {
%2 = tail call i32 @_ada_use_c2phc(i32 613, i32* %0, i32* undef, double* undef)
ret i32 %2
}
/* Variables and functions */
int cplusql_get_line();
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, int, char *);
int /*<<< orphan*/ stderr;
int yyerror(char *s) {
  fprintf(stderr, "%i %s\n", cplusql_get_line(), s ? s : "");
  exit(1);
}


x86 assembly (clang, -O0):
<yyerror>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    0x2e9d(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x10(%rbp)
mov    $0x0,%al
call   1040 <cplusql_get_line@plt>
mov    %eax,-0xc(%rbp)
cmpq   $0x0,-0x8(%rbp)
je     116a <yyerror+0x3a>
mov    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
jmp    117a <yyerror+0x4a>
lea    0xe95(%rip),%rax
mov    %rax,-0x18(%rbp)
jmp    117a <yyerror+0x4a>
mov    -0xc(%rbp),%edx
mov    -0x10(%rbp),%edi
mov    -0x18(%rbp),%rcx
lea    0xe75(%rip),%rsi
call   1030 <fprintf@plt>
mov    $0x1,%edi
call   1050 <exit@plt>

x86 assembly (clang, -O2):
<yyerror>:
push   %rbp
push   %rbx
push   %rax
mov    %rdi,%rbx
mov    0x2ea3(%rip),%rax
mov    (%rax),%ebp
xor    %eax,%eax
call   1040 <cplusql_get_line@plt>
test   %rbx,%rbx
lea    0xeb6(%rip),%rcx
cmovne %rbx,%rcx
lea    0xea5(%rip),%rsi
mov    %ebp,%edi
mov    %eax,%edx
call   1030 <fprintf@plt>
mov    $0x1,%edi
call   1050 <exit@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [7 x i8] c"%i %s\0A\00"
@.str.1 = [1 x i8] zeroinitializer
define i32 @yyerror(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i32, i32* @stderr
%4 = call i32 (...) @cplusql_get_line()
%5 = load i8*, i8** %2
%6 = icmp ne i8* %5, null
br i1 %6, label %7, label %9
7: ; preds = %1
%8 = load i8*, i8** %2
br label %10
9: ; preds = %1
br label %10
10: ; preds = %9, %7
%11 = phi i8* [ %8, %7 ], [ getelementptr inbounds ([1 x i8], [1 x i8]* @.str.1, i64 0, i64 0), %9 ]
%12 = call i32 @fprintf(i32 %3, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i32 %4, i8* %11)
%13 = call i32 @exit(i32 1)
unreachable
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [7 x i8] c"%i %s\0A\00"
@.str.1 = [1 x i8] zeroinitializer
define i32 @yyerror(i8* %0) {
%2 = load i32, i32* @stderr
%3 = tail call i32 (...) @cplusql_get_line()
%4 = icmp eq i8* %0, null
%5 = select i1 %4, i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.1, i64 0, i64 0), i8* %0
%6 = tail call i32 @fprintf(i32 %2, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i32 %3, i8* %5)
%7 = tail call i32 @exit(i32 1)
unreachable
}
/* Variables and functions */
char lower(char);
int /*<<< orphan*/ putchar(char);
int main(void) {
  (void)putchar(lower('T'));
  (void)putchar(lower('t'));
  (void)putchar('\n');
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x54,%edi
call   1040 <lower@plt>
movsbl %al,%edi
call   1030 <putchar@plt>
mov    $0x74,%edi
call   1040 <lower@plt>
movsbl %al,%edi
call   1030 <putchar@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    $0x54,%edi
call   1040 <lower@plt>
movsbl %al,%edi
call   1030 <putchar@plt>
mov    $0x74,%edi
call   1040 <lower@plt>
movsbl %al,%edi
call   1030 <putchar@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call signext i8 @lower(i8 signext 84)
%3 = call i32 @putchar(i8 signext %2)
%4 = call signext i8 @lower(i8 signext 116)
%5 = call i32 @putchar(i8 signext %4)
%6 = call i32 @putchar(i8 signext 10)
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call signext i8 @lower(i8 signext 84)
%2 = tail call i32 @putchar(i8 signext %1)
%3 = tail call signext i8 @lower(i8 signext 116)
%4 = tail call i32 @putchar(i8 signext %3)
%5 = tail call i32 @putchar(i8 signext 10)
ret i32 0
}
void Init_unicode(void) {}


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

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

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

LLVM IR (-O2):
define void @Init_unicode() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ lex(char *);
int /*<<< orphan*/ literaltable();
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ scanf(char *, char *);
int /*<<< orphan*/ universaltable();
int main() {
  char source[200];
  printf("\n\n enter source file name::");
  scanf("%s", source);
  lex(source);
  universaltable();
  literaltable();
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0xd0,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xe97(%rip),%rdi
call   1050 <printf@plt>
lea    -0xd0(%rbp),%rsi
lea    0xea0(%rip),%rdi
call   1070 <scanf@plt>
lea    -0xd0(%rbp),%rdi
call   1030 <lex@plt>
mov    $0x0,%al
call   1040 <universaltable@plt>
mov    $0x0,%al
call   1060 <literaltable@plt>
xor    %eax,%eax
add    $0xd0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0xd0,%rsp
lea    0xea1(%rip),%rdi
call   1050 <printf@plt>
lea    0xeb1(%rip),%rdi
mov    %rsp,%rbx
mov    %rbx,%rsi
call   1070 <scanf@plt>
mov    %rbx,%rdi
call   1030 <lex@plt>
xor    %eax,%eax
call   1040 <universaltable@plt>
xor    %eax,%eax
call   1060 <literaltable@plt>
xor    %eax,%eax
add    $0xd0,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@.str = [28 x i8] c"\0A\0A enter source file name::\00"
@.str.1 = [3 x i8] c"%s\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca [200 x i8]
store i32 0, i32* %1
%3 = call i32 @printf(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str, i64 0, i64 0))
%4 = getelementptr inbounds [200 x i8], [200 x i8]* %2, i64 0, i64 0
%5 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i8* %4)
%6 = getelementptr inbounds [200 x i8], [200 x i8]* %2, i64 0, i64 0
%7 = call i32 @lex(i8* %6)
%8 = call i32 (...) @universaltable()
%9 = call i32 (...) @literaltable()
ret i32 0
}

LLVM IR (-O2):
@.str = [28 x i8] c"\0A\0A enter source file name::\00"
@.str.1 = [3 x i8] c"%s\00"
define i32 @main() {
%1 = alloca [200 x i8]
%2 = getelementptr inbounds [200 x i8], [200 x i8]* %1, i64 0, i64 0
%3 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([28 x i8], [28 x i8]* @.str, i64 0, i64 0))
%4 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i8* %2)
%5 = call i32 @lex(i8* %2)
%6 = call i32 (...) @universaltable()
%7 = call i32 (...) @literaltable()
ret i32 0
}
int defaultCmp(void *thiss, void *that) {
  if (*(int *)thiss < *(int *)that) {
    return -1;
  } else if (*(int *)thiss > *(int *)that) {
    return 1;
  } else {
    return 0;
  }
}


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

x86 assembly (clang, -O2):
<defaultCmp>:
mov    (%rdi),%eax
xor    %ecx,%ecx
cmp    (%rsi),%eax
setg   %cl
mov    $0xffffffff,%eax
cmovge %ecx,%eax
ret

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

LLVM IR (-O2):
define i32 @defaultCmp(i8* nocapture %0, i8* nocapture %1) {
%3 = bitcast i8* %0 to i32*
%4 = load i32, i32* %3
%5 = bitcast i8* %1 to i32*
%6 = load i32, i32* %5
%7 = icmp slt i32 %4, %6
%8 = icmp sgt i32 %4, %6
%9 = zext i1 %8 to i32
%10 = select i1 %7, i32 -1, i32 %9
ret i32 %10
}
int cairo_code_draw_lushAxisLabel_get_width() { return 80; }


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

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

LLVM IR (-O0):
define i32 @cairo_code_draw_lushAxisLabel_get_width() {
ret i32 80
}

LLVM IR (-O2):
define i32 @cairo_code_draw_lushAxisLabel_get_width() {
ret i32 80
}
/* Variables and functions */
char *malloc(int);
int /*<<< orphan*/ strcat(char *, char *);
int /*<<< orphan*/ strcpy(char *, char *);
int strlen(char *);
char *buildQueryUrl(char *term) {
  char *searchUrl = "https://www.google.com/search?q=";
  char *query =
      malloc(sizeof(char) * (strlen(searchUrl) + 1 + strlen(term) + 1));
  strcpy(query, searchUrl);
  strcat(query, term);
  return query;
}


x86 assembly (clang, -O0):
<buildQueryUrl>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
lea    0xead(%rip),%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
call   1040 <strlen@plt>
add    $0x1,%eax
mov    %eax,-0x1c(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <strlen@plt>
mov    %eax,%ecx
mov    -0x1c(%rbp),%eax
add    %ecx,%eax
add    $0x1,%eax
cltq
shl    $0x0,%rax
mov    %eax,%edi
call   1050 <malloc@plt>
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1030 <strcpy@plt>
mov    -0x18(%rbp),%rdi
mov    -0x8(%rbp),%rsi
call   1060 <strcat@plt>
mov    -0x18(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<buildQueryUrl>:
push   %r15
push   %r14
push   %rbx
mov    %rdi,%r15
lea    0xeb1(%rip),%r14
mov    %r14,%rdi
call   1040 <strlen@plt>
mov    %eax,%ebx
mov    %r15,%rdi
call   1040 <strlen@plt>
lea    (%rbx,%rax,1),%edi
add    $0x2,%edi
call   1050 <malloc@plt>
mov    %rax,%rbx
mov    %rax,%rdi
mov    %r14,%rsi
call   1030 <strcpy@plt>
mov    %rbx,%rdi
mov    %r15,%rsi
call   1060 <strcat@plt>
mov    %rbx,%rax
pop    %rbx
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
@.str = [33 x i8] c"https://www.google.com/search?q=\00"
define i8* @buildQueryUrl(i8* %0) {
%2 = alloca i8*
%3 = alloca i8*
%4 = alloca i8*
store i8* %0, i8** %2
store i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str, i64 0, i64 0), i8** %3
%5 = load i8*, i8** %3
%6 = call i32 @strlen(i8* %5)
%7 = add nsw i32 %6, 1
%8 = load i8*, i8** %2
%9 = call i32 @strlen(i8* %8)
%10 = add nsw i32 %7, %9
%11 = add nsw i32 %10, 1
%12 = sext i32 %11 to i64
%13 = mul i64 1, %12
%14 = trunc i64 %13 to i32
%15 = call i8* @malloc(i32 %14)
store i8* %15, i8** %4
%16 = load i8*, i8** %4
%17 = load i8*, i8** %3
%18 = call i32 @strcpy(i8* %16, i8* %17)
%19 = load i8*, i8** %4
%20 = load i8*, i8** %2
%21 = call i32 @strcat(i8* %19, i8* %20)
%22 = load i8*, i8** %4
ret i8* %22
}

LLVM IR (-O2):
@.str = [33 x i8] c"https://www.google.com/search?q=\00"
define i8* @buildQueryUrl(i8* %0) {
%2 = tail call i32 @strlen(i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str, i64 0, i64 0))
%3 = tail call i32 @strlen(i8* %0)
%4 = add i32 %2, 2
%5 = add i32 %4, %3
%6 = tail call i8* @malloc(i32 %5)
%7 = tail call i32 @strcpy(i8* %6, i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str, i64 0, i64 0))
%8 = tail call i32 @strcat(i8* %6, i8* %0)
ret i8* %6
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;
typedef int /*<<< orphan*/ Elf64_Xword;
typedef int /*<<< orphan*/ Elf64_Sxword;

/* Variables and functions */
int elfrw_read_Xword(int /*<<< orphan*/ *, int /*<<< orphan*/ *);
int elfrw_read_Sxword(FILE *fp, Elf64_Sxword *in) {
  return elfrw_read_Xword(fp, (Elf64_Xword *)in);
}


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

x86 assembly (clang, -O2):
<elfrw_read_Sxword>:
jmp    1030 <elfrw_read_Xword@plt>

LLVM IR (-O0):
define i32 @elfrw_read_Sxword(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 = call i32 @elfrw_read_Xword(i32* %5, i32* %6)
ret i32 %7
}

LLVM IR (-O2):
define i32 @elfrw_read_Sxword(i32* %0, i32* %1) {
%3 = tail call i32 @elfrw_read_Xword(i32* %0, i32* %1)
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ free(void *);
void ADL_Main_Memory_Free(void *arg) {
  void **const lpBuffer = arg;
  if (lpBuffer && *lpBuffer) {
    free(*lpBuffer);
    *lpBuffer = NULL;
  }
}


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

x86 assembly (clang, -O2):
<ADL_Main_Memory_Free>:
push   %rbx
test   %rdi,%rdi
je     112d <ADL_Main_Memory_Free+0x1d>
mov    %rdi,%rbx
mov    (%rdi),%rdi
test   %rdi,%rdi
je     112d <ADL_Main_Memory_Free+0x1d>
call   1030 <free@plt>
movq   $0x0,(%rbx)
pop    %rbx
ret

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

LLVM IR (-O2):
define void @ADL_Main_Memory_Free(i8* %0) {
%2 = bitcast i8* %0 to i8**
%3 = icmp eq i8* %0, null
br i1 %3, label %9, label %4
4: ; preds = %1
%5 = load i8*, i8** %2
%6 = icmp eq i8* %5, null
br i1 %6, label %9, label %7
7: ; preds = %4
%8 = tail call i32 @free(i8* %5)
store i8* null, i8** %2
br label %9
9: ; preds = %7, %4, %1
ret void
}
int capture_me_1(void) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @capture_me_1() {
ret i32 0
}
/* Variables and functions */
scalar_t__ pthread_self();
long zz_posix_get_current_thread_id() { return (long)pthread_self(); }


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

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

LLVM IR (-O0):
define i64 @zz_posix_get_current_thread_id() {
%1 = call i64 (...) @pthread_self()
ret i64 %1
}

LLVM IR (-O2):
define i64 @zz_posix_get_current_thread_id() {
%1 = tail call i64 (...) @pthread_self()
ret i64 %1
}
/* Variables and functions */
int /*<<< orphan*/ a_function();
int /*<<< orphan*/ printf(char *, int);
int main(int argc, char *argv[]) {
  int a, b;
  a = 1;
  b = 2;
  if (b > a) {
    printf("right %d\n", a + b);
  } else {
    printf("left  %d\n", a + b);
  }
  a_function();
  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   $0x1,-0x14(%rbp)
movl   $0x2,-0x18(%rbp)
mov    -0x18(%rbp),%eax
cmp    -0x14(%rbp),%eax
jle    1167 <main+0x47>
mov    -0x14(%rbp),%esi
add    -0x18(%rbp),%esi
lea    0xea3(%rip),%rdi
call   1030 <printf@plt>
jmp    1179 <main+0x59>
mov    -0x14(%rbp),%esi
add    -0x18(%rbp),%esi
lea    0xe96(%rip),%rdi
call   1030 <printf@plt>
mov    $0x0,%al
call   1040 <a_function@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xed8(%rip),%rdi
mov    $0x3,%esi
call   1030 <printf@plt>
xor    %eax,%eax
call   1040 <a_function@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [10 x i8] c"right %d\0A\00"
@.str.1 = [10 x i8] c"left %d\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i32
%7 = alloca i32
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
store i32 1, i32* %6
store i32 2, i32* %7
%8 = load i32, i32* %7
%9 = load i32, i32* %6
%10 = icmp sgt i32 %8, %9
br i1 %10, label %11, label %16
11: ; preds = %2
%12 = load i32, i32* %6
%13 = load i32, i32* %7
%14 = add nsw i32 %12, %13
%15 = call i32 @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i32 %14)
br label %21
16: ; preds = %2
%17 = load i32, i32* %6
%18 = load i32, i32* %7
%19 = add nsw i32 %17, %18
%20 = call i32 @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.1, i64 0, i64 0), i32 %19)
br label %21
21: ; preds = %16, %11
%22 = call i32 (...) @a_function()
ret i32 0
}

LLVM IR (-O2):
@.str = [10 x i8] c"right %d\0A\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i32 3)
%4 = tail call i32 (...) @a_function()
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ pushNarray(char *, unsigned int);
void pushcomplex8array_(char *x, unsigned int *n) { pushNarray(x, (*n * 8)); }


x86 assembly (clang, -O0):
<pushcomplex8array_>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rax
mov    (%rax),%esi
shl    $0x3,%esi
call   1030 <pushNarray@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<pushcomplex8array_>:
mov    (%rsi),%esi
shl    $0x3,%esi
jmp    1030 <pushNarray@plt>

LLVM IR (-O0):
define void @pushcomplex8array_(i8* %0, i32* %1) {
%3 = alloca i8*
%4 = alloca i32*
store i8* %0, i8** %3
store i32* %1, i32** %4
%5 = load i8*, i8** %3
%6 = load i32*, i32** %4
%7 = load i32, i32* %6
%8 = mul i32 %7, 8
%9 = call i32 @pushNarray(i8* %5, i32 %8)
ret void
}

LLVM IR (-O2):
define void @pushcomplex8array_(i8* %0, i32* nocapture %1) {
%3 = load i32, i32* %1
%4 = shl i32 %3, 3
%5 = tail call i32 @pushNarray(i8* %0, i32 %4)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ __wdie(char *);
void *malloc(size_t);
void *__wxmalloc(size_t size) {
  void *ptr = malloc(size);
  if (ptr)
    return ptr;
  __wdie("Out of memory.");
  return NULL;
}


x86 assembly (clang, -O0):
<__wxmalloc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
call   1030 <malloc@plt>
mov    %rax,-0x18(%rbp)
cmpq   $0x0,-0x18(%rbp)
je     1151 <__wxmalloc+0x31>
mov    -0x18(%rbp),%rax
mov    %rax,-0x8(%rbp)
jmp    1165 <__wxmalloc+0x45>
lea    0xea8(%rip),%rdi
call   1040 <__wdie@plt>
movq   $0x0,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<__wxmalloc>:
push   %rbx
call   1030 <malloc@plt>
mov    %rax,%rbx
test   %rax,%rax
jne    113a <__wxmalloc+0x1a>
lea    0xecb(%rip),%rdi
call   1040 <__wdie@plt>
mov    %rbx,%rax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [15 x i8] c"Out of memory.\00"
define i8* @__wxmalloc(i64 %0) {
%2 = alloca i8*
%3 = alloca i64
%4 = alloca i8*
store i64 %0, i64* %3
%5 = load i64, i64* %3
%6 = call i8* @malloc(i64 %5)
store i8* %6, i8** %4
%7 = load i8*, i8** %4
%8 = icmp ne i8* %7, null
br i1 %8, label %9, label %11
9: ; preds = %1
%10 = load i8*, i8** %4
store i8* %10, i8** %2
br label %13
11: ; preds = %1
%12 = call i32 @__wdie(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0))
store i8* null, i8** %2
br label %13
13: ; preds = %11, %9
%14 = load i8*, i8** %2
ret i8* %14
}

LLVM IR (-O2):
@.str = [15 x i8] c"Out of memory.\00"
define noalias i8* @__wxmalloc(i64 %0) {
%2 = tail call i8* @malloc(i64 %0)
%3 = icmp eq i8* %2, null
br i1 %3, label %4, label %6
4: ; preds = %1
%5 = tail call i32 @__wdie(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0))
br label %6
6: ; preds = %1, %4
ret i8* %2
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ exit(int /*<<< orphan*/);
scalar_t__ feof(int /*<<< orphan*/ *);
scalar_t__ ferror(int /*<<< orphan*/ *);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
int /*<<< orphan*/ stderr;
void ioerrtst(FILE *gmvin) {
  if ((feof(gmvin) != 0) | (ferror(gmvin) != 0)) {
    fprintf(stderr, "I/O error while reading gmv input file.\n");
    exit(0);
  }
}


x86 assembly (clang, -O0):
<ioerrtst>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1050 <feof@plt>
cmp    $0x0,%rax
setne  %al
and    $0x1,%al
movzbl %al,%eax
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <ferror@plt>
mov    %rax,%rcx
mov    -0xc(%rbp),%eax
cmp    $0x0,%rcx
setne  %cl
and    $0x1,%cl
movzbl %cl,%ecx
or     %ecx,%eax
cmp    $0x0,%eax
je     11a7 <ioerrtst+0x67>
mov    0x2e4e(%rip),%rax
mov    (%rax),%edi
lea    0xe65(%rip),%rsi
call   1040 <fprintf@plt>
xor    %edi,%edi
call   1060 <exit@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ioerrtst>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%rbx
call   1050 <feof@plt>
mov    %rax,%r14
mov    %rbx,%rdi
call   1030 <ferror@plt>
or     %r14,%rax
jne    1164 <ioerrtst+0x24>
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret
mov    0x2e75(%rip),%rax
mov    (%rax),%edi
lea    0xe8c(%rip),%rsi
call   1040 <fprintf@plt>
xor    %edi,%edi
call   1060 <exit@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [41 x i8] c"I/O error while reading gmv input file.\0A\00"
define void @ioerrtst(i32* %0) {
%2 = alloca i32*
store i32* %0, i32** %2
%3 = load i32*, i32** %2
%4 = call i64 @feof(i32* %3)
%5 = icmp ne i64 %4, 0
%6 = zext i1 %5 to i32
%7 = load i32*, i32** %2
%8 = call i64 @ferror(i32* %7)
%9 = icmp ne i64 %8, 0
%10 = zext i1 %9 to i32
%11 = or i32 %6, %10
%12 = icmp ne i32 %11, 0
br i1 %12, label %13, label %17
13: ; preds = %1
%14 = load i32, i32* @stderr
%15 = call i32 @fprintf(i32 %14, i8* getelementptr inbounds ([41 x i8], [41 x i8]* @.str, i64 0, i64 0))
%16 = call i32 @exit(i32 0)
unreachable
17: ; preds = %1
ret void
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [41 x i8] c"I/O error while reading gmv input file.\0A\00"
define void @ioerrtst(i32* nocapture %0) {
%2 = tail call i64 @feof(i32* %0)
%3 = tail call i64 @ferror(i32* %0)
%4 = or i64 %3, %2
%5 = icmp eq i64 %4, 0
br i1 %5, label %10, label %6
6: ; preds = %1
%7 = load i32, i32* @stderr
%8 = tail call i32 @fprintf(i32 %7, i8* getelementptr inbounds ([41 x i8], [41 x i8]* @.str, i64 0, i64 0))
%9 = tail call i32 @exit(i32 0)
unreachable
10: ; preds = %1
ret void
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char *, char *);
int /*<<< orphan*/ stderr;
void PLY_FatalError(char *mess, char *what) {
  fprintf(stderr, "Error: %s : %s\n", mess, what);
  exit(1);
}


x86 assembly (clang, -O0):
<PLY_FatalError>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    0x2ea9(%rip),%rax
mov    (%rax),%edi
mov    -0x8(%rbp),%rdx
mov    -0x10(%rbp),%rcx
lea    0xeb8(%rip),%rsi
call   1030 <fprintf@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<PLY_FatalError>:
push   %rax
mov    %rsi,%rcx
mov    %rdi,%rdx
mov    0x2eb2(%rip),%rax
mov    (%rax),%edi
lea    0xec9(%rip),%rsi
call   1030 <fprintf@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [16 x i8] c"Error: %s : %s\0A\00"
define void @PLY_FatalError(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
store i8* %0, i8** %3
store i8* %1, i8** %4
%5 = load i32, i32* @stderr
%6 = load i8*, i8** %3
%7 = load i8*, i8** %4
%8 = call i32 @fprintf(i32 %5, i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0), i8* %6, i8* %7)
%9 = call i32 @exit(i32 1)
unreachable
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [16 x i8] c"Error: %s : %s\0A\00"
define void @PLY_FatalError(i8* %0, i8* %1) {
%3 = load i32, i32* @stderr
%4 = tail call i32 @fprintf(i32 %3, i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0), i8* %0, i8* %1)
%5 = tail call i32 @exit(i32 1)
unreachable
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, ...);
int main() {
  int a = 199999;
  int r;
  r = a % 100000;
  printf("\n\n%d\n\n", r);
  printf("\n\n%d\n\n", (int)(0.999999999 * 100000));
  if (r == (int)(0.99999999999 * 100000))
    printf("\nT ll work. . \n\n");
  else
    printf("\nBUSSSS\n");
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x30d3f,-0x8(%rbp)
mov    -0x8(%rbp),%eax
mov    $0x186a0,%ecx
cltd
idiv   %ecx
mov    %edx,-0xc(%rbp)
mov    -0xc(%rbp),%esi
lea    0xec2(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xeb4(%rip),%rdi
mov    $0x1869f,%esi
mov    $0x0,%al
call   1030 <printf@plt>
cmpl   $0x1869f,-0xc(%rbp)
jne    1178 <main+0x68>
lea    0xe9b(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    1186 <main+0x76>
lea    0xe99(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
lea    0xed8(%rip),%rbx
mov    %rbx,%rdi
mov    $0x1869f,%esi
xor    %eax,%eax
call   1040 <printf@plt>
mov    %rbx,%rdi
mov    $0x1869f,%esi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xeba(%rip),%rdi
call   1030 <puts@plt>
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [7 x i8] c"\0A\0A%d\0A\0A\00"
@.str.1 = [17 x i8] c"\0AT ll work. . \0A\0A\00"
@.str.2 = [9 x i8] c"\0ABUSSSS\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
store i32 0, i32* %1
store i32 199999, i32* %2
%4 = load i32, i32* %2
%5 = srem i32 %4, 100000
store i32 %5, i32* %3
%6 = load i32, i32* %3
%7 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i32 %6)
%8 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i32 99999)
%9 = load i32, i32* %3
%10 = icmp eq i32 %9, 99999
br i1 %10, label %11, label %13
11: ; preds = %0
%12 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.1, i64 0, i64 0))
br label %15
13: ; preds = %0
%14 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.2, i64 0, i64 0))
br label %15
15: ; preds = %13, %11
ret i32 0
}

LLVM IR (-O2):
@.str = [7 x i8] c"\0A\0A%d\0A\0A\00"
@str = [16 x i8] c"\0AT ll work. . \0A\00"
define i32 @main() {
%1 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i32 99999)
%2 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i32 99999)
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([16 x i8], [16 x i8]* @str, i64 0, i64 0))
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int *, int *, int);
void test4() {
  int a;
  a = 6;
  int *ptr_a, *ptr_b;
  ptr_a = &a;
  ptr_b = &a;
  printf("%p - %p - %i\n", ptr_a, ptr_b, ptr_a == ptr_b);
}


x86 assembly (clang, -O0):
<test4>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x6,-0x4(%rbp)
lea    -0x4(%rbp),%rax
mov    %rax,-0x10(%rbp)
lea    -0x4(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
mov    -0x10(%rbp),%rax
cmp    -0x18(%rbp),%rax
sete   %al
and    $0x1,%al
movzbl %al,%ecx
lea    0xeb2(%rip),%rdi
call   1030 <printf@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test4>:
push   %rax
movl   $0x6,0x4(%rsp)
lea    0xee0(%rip),%rdi
lea    0x4(%rsp),%rdx
mov    %rdx,%rsi
mov    $0x1,%ecx
call   1030 <printf@plt>
pop    %rax
ret

LLVM IR (-O0):
@.str = [14 x i8] c"%p - %p - %i\0A\00"
define void @test4() {
%1 = alloca i32
%2 = alloca i32*
%3 = alloca i32*
store i32 6, i32* %1
store i32* %1, i32** %2
store i32* %1, i32** %3
%4 = load i32*, i32** %2
%5 = load i32*, i32** %3
%6 = load i32*, i32** %2
%7 = load i32*, i32** %3
%8 = icmp eq i32* %6, %7
%9 = zext i1 %8 to i32
%10 = call i32 @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0), i32* %4, i32* %5, i32 %9)
ret void
}

LLVM IR (-O2):
@.str = [14 x i8] c"%p - %p - %i\0A\00"
define void @test4() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
store i32 6, i32* %1
%3 = call i32 @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0), i32* %1, i32* %1, i32 1)
ret void
}
int emac1_reg_status_set(unsigned int dev_id, union emac1_reg_status_u *value) {
  return 1;
}


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

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

LLVM IR (-O0):
%union.emac1_reg_status_u = type opaque
define i32 @emac1_reg_status_set(i32 %0, %union.emac1_reg_status_u* %1) {
%3 = alloca i32
%4 = alloca %union.emac1_reg_status_u*
store i32 %0, i32* %3
store %union.emac1_reg_status_u* %1, %union.emac1_reg_status_u** %4
ret i32 1
}

LLVM IR (-O2):
%union.emac1_reg_status_u = type opaque
define i32 @emac1_reg_status_set(i32 %0, %union.emac1_reg_status_u* nocapture readnone %1) {
ret i32 1
}
/* Variables and functions */
float fmin(float x, float y) { return x < y ? x : y; }


x86 assembly (clang, -O0):
<fmin>:
push   %rbp
mov    %rsp,%rbp
movss  %xmm0,-0x4(%rbp)
movss  %xmm1,-0x8(%rbp)
movss  -0x4(%rbp),%xmm1
movss  -0x8(%rbp),%xmm0
ucomiss %xmm1,%xmm0
jbe    1130 <fmin+0x30>
movss  -0x4(%rbp),%xmm0
movss  %xmm0,-0xc(%rbp)
jmp    113a <fmin+0x3a>
movss  -0x8(%rbp),%xmm0
movss  %xmm0,-0xc(%rbp)
movss  -0xc(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<fmin>:
minss  %xmm1,%xmm0
ret

LLVM IR (-O0):
define float @fmin(float %0, float %1) {
%3 = alloca float
%4 = alloca float
store float %0, float* %3
store float %1, float* %4
%5 = load float, float* %3
%6 = load float, float* %4
%7 = fcmp olt float %5, %6
br i1 %7, label %8, label %10
8: ; preds = %2
%9 = load float, float* %3
br label %12
10: ; preds = %2
%11 = load float, float* %4
br label %12
12: ; preds = %10, %8
%13 = phi float [ %9, %8 ], [ %11, %10 ]
ret float %13
}

LLVM IR (-O2):
define float @fmin(float %0, float %1) {
%3 = fcmp olt float %0, %1
%4 = select i1 %3, float %0, float %1
ret float %4
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ islower(int);
void t_islower_0x2b() {
  Assert_real((islower(43) == 0),
              "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
              "2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/"
              "dg/z88dk/test/suites/ctype/test_islower.c",
              220, ("islower should be 0 for +"));
}


x86 assembly (clang, -O0):
<t_islower_0x2b>:
push   %rbp
mov    %rsp,%rbp
mov    $0x2b,%edi
call   1030 <islower@plt>
cmp    $0x0,%rax
sete   %al
and    $0x1,%al
movzbl %al,%edi
lea    0xebf(%rip),%rsi
mov    $0xdc,%edx
lea    0xf5b(%rip),%rcx
call   1040 <Assert_real@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<t_islower_0x2b>:
push   %rax
mov    $0x2b,%edi
call   1030 <islower@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf66(%rip),%rcx
mov    $0xdc,%edx
pop    %rax
jmp    1040 <Assert_real@plt>

LLVM IR (-O0):
@.str = [168 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/ctype/test_islower.c\00"
@.str.1 = [26 x i8] c"islower should be 0 for +\00"
define void @t_islower_0x2b() {
%1 = call i64 @islower(i32 43)
%2 = icmp eq i64 %1, 0
%3 = zext i1 %2 to i32
%4 = call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([168 x i8], [168 x i8]* @.str, i64 0, i64 0), i32 220, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [168 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/ctype/test_islower.c\00"
@.str.1 = [26 x i8] c"islower should be 0 for +\00"
define void @t_islower_0x2b() {
%1 = tail call i64 @islower(i32 43)
%2 = icmp eq i64 %1, 0
%3 = zext i1 %2 to i32
%4 = tail call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([168 x i8], [168 x i8]* @.str, i64 0, i64 0), i32 220, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.1, i64 0, i64 0))
ret void
}
__uint128_t toRep128(long double x) {
  __uint128_t ret;
  memcpy(&ret, &x, 16);
  return ret;
}


x86 assembly (clang, -O0):
<toRep128>:
push   %rbp
mov    %rsp,%rbp
fldt   0x10(%rbp)
fstpt  -0x20(%rbp)
movaps -0x20(%rbp),%xmm0
movaps %xmm0,-0x30(%rbp)
mov    -0x30(%rbp),%rax
mov    -0x28(%rbp),%rcx
mov    %rcx,-0x8(%rbp)
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    -0x8(%rbp),%rdx
pop    %rbp
ret

x86 assembly (clang, -O2):
<toRep128>:
movzwl 0x10(%rsp),%edx
mov    0x8(%rsp),%rax
ret

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

LLVM IR (-O2):
define { i64, i64 } @toRep128(x86_fp80 %0) {
%2 = bitcast x86_fp80 %0 to i80
%3 = trunc i80 %2 to i64
%4 = lshr i80 %2, 64
%5 = trunc i80 %4 to i64
%6 = insertvalue { i64, i64 } poison, i64 %3, 0
%7 = insertvalue { i64, i64 } %6, i64 %5, 1
ret { i64, i64 } %7
}
void dvb_s2_config(const char *l) {}


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

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

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

LLVM IR (-O2):
define void @dvb_s2_config(i8* nocapture %0) {
ret void
}
int wkup_m3_pm_status(void) { return -1; }


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

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

LLVM IR (-O0):
define i32 @wkup_m3_pm_status() {
ret i32 -1
}

LLVM IR (-O2):
define i32 @wkup_m3_pm_status() {
ret i32 -1
}
/* Variables and functions */
char *aeron_loss_stat_usage();
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char const *, char *);
int /*<<< orphan*/ stderr;
void aeron_loss_stat_print_error_and_usage(const char *message) {
  fprintf(stderr, "%s\n%s", message, aeron_loss_stat_usage());
}


x86 assembly (clang, -O0):
<aeron_loss_stat_print_error_and_usage>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    0x2ead(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x14(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    $0x0,%al
call   1040 <aeron_loss_stat_usage@plt>
mov    -0x14(%rbp),%edi
mov    -0x10(%rbp),%rdx
mov    %rax,%rcx
lea    0xea8(%rip),%rsi
call   1030 <fprintf@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<aeron_loss_stat_print_error_and_usage>:
push   %rbp
push   %rbx
push   %rax
mov    %rdi,%rbx
mov    0x2eb3(%rip),%rax
mov    (%rax),%ebp
xor    %eax,%eax
call   1040 <aeron_loss_stat_usage@plt>
lea    0xec3(%rip),%rsi
mov    %ebp,%edi
mov    %rbx,%rdx
mov    %rax,%rcx
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    1030 <fprintf@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [6 x i8] c"%s\0A%s\00"
define void @aeron_loss_stat_print_error_and_usage(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i32, i32* @stderr
%4 = load i8*, i8** %2
%5 = call i8* (...) @aeron_loss_stat_usage()
%6 = call i32 @fprintf(i32 %3, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i8* %4, i8* %5)
ret void
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [6 x i8] c"%s\0A%s\00"
define void @aeron_loss_stat_print_error_and_usage(i8* %0) {
%2 = load i32, i32* @stderr
%3 = tail call i8* (...) @aeron_loss_stat_usage()
%4 = tail call i32 @fprintf(i32 %2, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i8* %0, i8* %3)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ test_basic_case();
int /*<<< orphan*/ test_consume();
int /*<<< orphan*/ test_fill();
int /*<<< orphan*/ test_fill_overflow();
int /*<<< orphan*/ test_flush();
int /*<<< orphan*/ test_flush_incontinous();
int /*<<< orphan*/ test_locate();
int /*<<< orphan*/ test_multiple_putget();
int /*<<< orphan*/ test_overflow();
int main(int argc, char *argv[]) {
  test_basic_case();
  test_overflow();
  test_multiple_putget();
  test_flush();
  test_flush_incontinous();
  test_fill();
  test_fill_overflow();
  test_consume();
  test_locate();
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    $0x0,%al
call   10b0 <test_basic_case@plt>
mov    $0x0,%al
call   1060 <test_overflow@plt>
mov    $0x0,%al
call   1090 <test_multiple_putget@plt>
mov    $0x0,%al
call   1070 <test_flush@plt>
mov    $0x0,%al
call   1040 <test_flush_incontinous@plt>
mov    $0x0,%al
call   1080 <test_fill@plt>
mov    $0x0,%al
call   1030 <test_fill_overflow@plt>
mov    $0x0,%al
call   10a0 <test_consume@plt>
mov    $0x0,%al
call   1050 <test_locate@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   10b0 <test_basic_case@plt>
xor    %eax,%eax
call   1060 <test_overflow@plt>
xor    %eax,%eax
call   1090 <test_multiple_putget@plt>
xor    %eax,%eax
call   1070 <test_flush@plt>
xor    %eax,%eax
call   1040 <test_flush_incontinous@plt>
xor    %eax,%eax
call   1080 <test_fill@plt>
xor    %eax,%eax
call   1030 <test_fill_overflow@plt>
xor    %eax,%eax
call   10a0 <test_consume@plt>
xor    %eax,%eax
call   1050 <test_locate@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%6 = call i32 (...) @test_basic_case()
%7 = call i32 (...) @test_overflow()
%8 = call i32 (...) @test_multiple_putget()
%9 = call i32 (...) @test_flush()
%10 = call i32 (...) @test_flush_incontinous()
%11 = call i32 (...) @test_fill()
%12 = call i32 (...) @test_fill_overflow()
%13 = call i32 (...) @test_consume()
%14 = call i32 (...) @test_locate()
ret i32 0
}

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 (...) @test_basic_case()
%4 = tail call i32 (...) @test_overflow()
%5 = tail call i32 (...) @test_multiple_putget()
%6 = tail call i32 (...) @test_flush()
%7 = tail call i32 (...) @test_flush_incontinous()
%8 = tail call i32 (...) @test_fill()
%9 = tail call i32 (...) @test_fill_overflow()
%10 = tail call i32 (...) @test_consume()
%11 = tail call i32 (...) @test_locate()
ret i32 0
}
int maxXPixel(void) { return 128; }


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

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

LLVM IR (-O0):
define i32 @maxXPixel() {
ret i32 128
}

LLVM IR (-O2):
define i32 @maxXPixel() {
ret i32 128
}
/* Forward declarations */
typedef struct TYPE_4__ TYPE_2__;
typedef struct TYPE_3__ TYPE_1__;

/* Type definitions */
struct TYPE_3__ {
  int height;
};
struct TYPE_4__ {
  TYPE_1__ xcreatewindow;
};
typedef TYPE_2__ XEvent;

/* Variables and functions */
void set_XEvent_xcreatewindow_height(void *_p, int _v) {
  ((XEvent *)_p)->xcreatewindow.height = (int)_v;
}


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

x86 assembly (clang, -O2):
<set_XEvent_xcreatewindow_height>:
mov    %esi,(%rdi)
ret

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

LLVM IR (-O2):
define void @set_XEvent_xcreatewindow_height(i8* nocapture writeonly %0, i32 %1) {
%3 = bitcast i8* %0 to i32*
store i32 %1, i32* %3
ret void
}
void fs_add(char type, unsigned short entry, char *file, unsigned long offset) {
}


x86 assembly (clang, -O0):
<fs_add>:
push   %rbp
mov    %rsp,%rbp
mov    %si,%ax
mov    %dil,%sil
mov    %sil,-0x1(%rbp)
mov    %ax,-0x4(%rbp)
mov    %rdx,-0x10(%rbp)
mov    %rcx,-0x18(%rbp)
pop    %rbp
ret

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

LLVM IR (-O0):
define void @fs_add(i8 signext %0, i16 zeroext %1, i8* %2, i64 %3) {
%5 = alloca i8
%6 = alloca i16
%7 = alloca i8*
%8 = alloca i64
store i8 %0, i8* %5
store i16 %1, i16* %6
store i8* %2, i8** %7
store i64 %3, i64* %8
ret void
}

LLVM IR (-O2):
define void @fs_add(i8 signext %0, i16 zeroext %1, i8* nocapture %2, i64 %3) {
ret void
}
void d2i_OCSP_RESPDATA(void) {}


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

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

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

LLVM IR (-O2):
define void @d2i_OCSP_RESPDATA() {
ret void
}
int dec(int a) { return (a - 1); }


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

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

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

LLVM IR (-O2):
define i32 @dec(i32 %0) {
%2 = add nsw i32 %0, -1
ret i32 %2
}
void l2x0_disable() { (*((volatile unsigned *)(0xC4200000 + 0x100)) = 0); }


x86 assembly (clang, -O0):
<l2x0_disable>:
push   %rbp
mov    %rsp,%rbp
mov    $0xc4200100,%eax
movl   $0x0,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<l2x0_disable>:
mov    $0xc4200100,%eax
movl   $0x0,(%rax)
ret

LLVM IR (-O0):
define void @l2x0_disable() {
store volatile i32 0, i32* inttoptr (i64 3290431744 to i32*)
ret void
}

LLVM IR (-O2):
define void @l2x0_disable() {
store volatile i32 0, i32* inttoptr (i64 3290431744 to i32*)
ret void
}