xunge/DecIR huggingface dataset:
/* Variables and functions */
scalar_t__ is_attr_name(char const);
char *skip_attr_name(const char *s, int sz) {
  while (sz > 0 && is_attr_name(*s)) {
    s++;
    sz--;
  }
  return (char *)s;
}


x86 assembly (clang, -O0):
<skip_attr_name>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
xor    %eax,%eax
cmpl   $0x0,-0xc(%rbp)
mov    %al,-0xd(%rbp)
jle    1144 <skip_attr_name+0x34>
mov    -0x8(%rbp),%rax
movsbl (%rax),%edi
call   1030 <is_attr_name@plt>
cmp    $0x0,%rax
setne  %al
mov    %al,-0xd(%rbp)
mov    -0xd(%rbp),%al
test   $0x1,%al
jne    1154 <skip_attr_name+0x44>
jmp    116e <skip_attr_name+0x5e>
mov    -0x8(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x8(%rbp)
mov    -0xc(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0xc(%rbp)
jmp    111f <skip_attr_name+0xf>
mov    -0x8(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<skip_attr_name>:
push   %rbp
push   %rbx
push   %rax
mov    %rdi,%rbx
test   %esi,%esi
jle    1139 <skip_attr_name+0x29>
mov    %esi,%ebp
add    $0x1,%ebp
nop
movsbl (%rbx),%edi
call   1030 <is_attr_name@plt>
test   %rax,%rax
je     1139 <skip_attr_name+0x29>
add    $0x1,%rbx
add    $0xffffffff,%ebp
cmp    $0x1,%ebp
jg     1120 <skip_attr_name+0x10>
mov    %rbx,%rax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

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

LLVM IR (-O2):
define i8* @skip_attr_name(i8* %0, i32 %1) {
%3 = icmp sgt i32 %1, 0
br i1 %3, label %4, label %14
4: ; preds = %2, %10
%5 = phi i32 [ %12, %10 ], [ %1, %2 ]
%6 = phi i8* [ %11, %10 ], [ %0, %2 ]
%7 = load i8, i8* %6
%8 = tail call i64 @is_attr_name(i8 signext %7)
%9 = icmp eq i64 %8, 0
br i1 %9, label %14, label %10
10: ; preds = %4
%11 = getelementptr inbounds i8, i8* %6, i64 1
%12 = add nsw i32 %5, -1
%13 = icmp sgt i32 %5, 1
br i1 %13, label %4, label %14
14: ; preds = %4, %10, %2
%15 = phi i8* [ %0, %2 ], [ %11, %10 ], [ %6, %4 ]
ret i8* %15
}
/* Variables and functions */
int /*<<< orphan*/ OpenSSL_add_all_algorithms();
int /*<<< orphan*/ SIGPIPE;
int /*<<< orphan*/ SIG_IGN;
int /*<<< orphan*/ SSL_library_init();
int /*<<< orphan*/ SSL_load_error_strings();
int /*<<< orphan*/ setup_ui();
int /*<<< orphan*/ signal(int /*<<< orphan*/, int /*<<< orphan*/);
void openssl_startup(void) {
  signal(SIGPIPE, SIG_IGN);
  OpenSSL_add_all_algorithms();
  SSL_library_init();
  SSL_load_error_strings();
  setup_ui();
}


x86 assembly (clang, -O0):
<openssl_startup>:
push   %rbp
mov    %rsp,%rbp
mov    0x2e7d(%rip),%rax
mov    (%rax),%edi
mov    0x2e84(%rip),%rax
mov    (%rax),%esi
call   1050 <signal@plt>
mov    $0x0,%al
call   1060 <OpenSSL_add_all_algorithms@plt>
mov    $0x0,%al
call   1030 <SSL_library_init@plt>
mov    $0x0,%al
call   1070 <SSL_load_error_strings@plt>
mov    $0x0,%al
call   1040 <setup_ui@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<openssl_startup>:
push   %rax
mov    0x2e80(%rip),%rax
mov    (%rax),%edi
mov    0x2e87(%rip),%rax
mov    (%rax),%esi
call   1050 <signal@plt>
xor    %eax,%eax
call   1060 <OpenSSL_add_all_algorithms@plt>
xor    %eax,%eax
call   1030 <SSL_library_init@plt>
xor    %eax,%eax
call   1070 <SSL_load_error_strings@plt>
xor    %eax,%eax
pop    %rcx
jmp    1040 <setup_ui@plt>

LLVM IR (-O0):
@SIGPIPE = global i32 0
@SIG_IGN = global i32 0
define void @openssl_startup() {
%1 = load i32, i32* @SIGPIPE
%2 = load i32, i32* @SIG_IGN
%3 = call i32 @signal(i32 %1, i32 %2)
%4 = call i32 (...) @OpenSSL_add_all_algorithms()
%5 = call i32 (...) @SSL_library_init()
%6 = call i32 (...) @SSL_load_error_strings()
%7 = call i32 (...) @setup_ui()
ret void
}

LLVM IR (-O2):
@SIGPIPE = global i32 0
@SIG_IGN = global i32 0
define void @openssl_startup() {
%1 = load i32, i32* @SIGPIPE
%2 = load i32, i32* @SIG_IGN
%3 = tail call i32 @signal(i32 %1, i32 %2)
%4 = tail call i32 (...) @OpenSSL_add_all_algorithms()
%5 = tail call i32 (...) @SSL_library_init()
%6 = tail call i32 (...) @SSL_load_error_strings()
%7 = tail call i32 (...) @setup_ui()
ret void
}
/* Variables and functions */
double __nv_dsub_ru(double, double);
double __dsub_ru(double __a, double __b) { return __nv_dsub_ru(__a, __b); }


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

x86 assembly (clang, -O2):
<__dsub_ru>:
jmp    1030 <__nv_dsub_ru@plt>

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

LLVM IR (-O2):
define double @__dsub_ru(double %0, double %1) {
%3 = tail call double @__nv_dsub_ru(double %0, double %1)
ret double %3
}
/* Variables and functions */
scalar_t__ strlen(char *);
int isBlank(char *str) {
  int i;
  for (i = 0; i < (int)strlen(str); ++i)
    if (str[i] != ' ')
      return (0);
  return (1);
}


x86 assembly (clang, -O0):
<isBlank>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
mov    -0x14(%rbp),%eax
mov    %eax,-0x18(%rbp)
mov    -0x10(%rbp),%rdi
call   1030 <strlen@plt>
mov    %rax,%rcx
mov    -0x18(%rbp),%eax
cmp    %ecx,%eax
jge    1174 <isBlank+0x64>
mov    -0x10(%rbp),%rax
movslq -0x14(%rbp),%rcx
movsbl (%rax,%rcx,1),%eax
cmp    $0x20,%eax
je     1161 <isBlank+0x51>
movl   $0x0,-0x4(%rbp)
jmp    117b <isBlank+0x6b>
jmp    1166 <isBlank+0x56>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    1123 <isBlank+0x13>
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<isBlank>:
push   %rbx
mov    %rdi,%rbx
call   1030 <strlen@plt>
mov    %rax,%rcx
mov    $0x1,%eax
test   %ecx,%ecx
jle    113f <isBlank+0x2f>
mov    %ecx,%ecx
xor    %edx,%edx
nopl   0x0(%rax)
cmpb   $0x20,(%rbx,%rdx,1)
jne    1141 <isBlank+0x31>
add    $0x1,%rdx
cmp    %rdx,%rcx
jne    1130 <isBlank+0x20>
pop    %rbx
ret
xor    %eax,%eax
pop    %rbx
ret

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

LLVM IR (-O2):
define i32 @isBlank(i8* nocapture %0) {
%2 = tail call i64 @strlen(i8* dereferenceable(1) %0)
%3 = trunc i64 %2 to i32
%4 = icmp sgt i32 %3, 0
br i1 %4, label %5, label %15
5: ; preds = %1
%6 = and i64 %2, 4294967295
br label %9
7: ; preds = %9
%8 = icmp eq i64 %14, %6
br i1 %8, label %15, label %9
9: ; preds = %5, %7
%10 = phi i64 [ 0, %5 ], [ %14, %7 ]
%11 = getelementptr inbounds i8, i8* %0, i64 %10
%12 = load i8, i8* %11
%13 = icmp eq i8 %12, 32
%14 = add nuw nsw i64 %10, 1
br i1 %13, label %7, label %15
15: ; preds = %9, %7, %1
%16 = phi i32 [ 1, %1 ], [ 1, %7 ], [ 0, %9 ]
ret i32 %16
}
/* Variables and functions */
int /*<<< orphan*/ sprintf(char *, char *, char *);
scalar_t__ system(char *);
void regression_remove_temp_file(char *temp_filename) {
  char sys_string[1024];
  sprintf(sys_string, "rm -f %s", temp_filename);
  if (system(sys_string)) {
  };
}


x86 assembly (clang, -O0):
<regression_remove_temp_file>:
push   %rbp
mov    %rsp,%rbp
sub    $0x410,%rsp
mov    %rdi,-0x8(%rbp)
lea    -0x410(%rbp),%rdi
mov    -0x8(%rbp),%rdx
lea    0xebf(%rip),%rsi
call   1040 <sprintf@plt>
lea    -0x410(%rbp),%rdi
call   1030 <system@plt>
cmp    $0x0,%rax
je     1161 <regression_remove_temp_file+0x41>
jmp    1161 <regression_remove_temp_file+0x41>
add    $0x410,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<regression_remove_temp_file>:
push   %rbx
sub    $0x400,%rsp
mov    %rdi,%rdx
lea    0xece(%rip),%rsi
mov    %rsp,%rbx
mov    %rbx,%rdi
call   1040 <sprintf@plt>
mov    %rbx,%rdi
call   1030 <system@plt>
add    $0x400,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@.str = [9 x i8] c"rm -f %s\00"
define void @regression_remove_temp_file(i8* %0) {
%2 = alloca i8*
%3 = alloca [1024 x i8]
store i8* %0, i8** %2
%4 = getelementptr inbounds [1024 x i8], [1024 x i8]* %3, i64 0, i64 0
%5 = load i8*, i8** %2
%6 = call i32 @sprintf(i8* %4, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), i8* %5)
%7 = getelementptr inbounds [1024 x i8], [1024 x i8]* %3, i64 0, i64 0
%8 = call i64 @system(i8* %7)
%9 = icmp ne i64 %8, 0
br i1 %9, label %10, label %11
10: ; preds = %1
br label %11
11: ; preds = %10, %1
ret void
}

LLVM IR (-O2):
@.str = [9 x i8] c"rm -f %s\00"
define void @regression_remove_temp_file(i8* %0) {
%2 = alloca [1024 x i8]
%3 = getelementptr inbounds [1024 x i8], [1024 x i8]* %2, i64 0, i64 0
%4 = call i32 @sprintf(i8* %3, i8* dereferenceable(1) getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), i8* %0)
%5 = call i64 @system(i8* %3)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ destroy();
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ wait(int *);
void handle(int s) {
  wait(&s);
  destroy();
  exit(-1);
}


x86 assembly (clang, -O0):
<handle>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
lea    -0x4(%rbp),%rdi
call   1050 <wait@plt>
mov    $0x0,%al
call   1030 <destroy@plt>
mov    $0xffffffff,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<handle>:
push   %rax
mov    %edi,0x4(%rsp)
lea    0x4(%rsp),%rdi
call   1050 <wait@plt>
xor    %eax,%eax
call   1030 <destroy@plt>
mov    $0xffffffff,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
define void @handle(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = call i32 @wait(i32* %2)
%4 = call i32 (...) @destroy()
%5 = call i32 @exit(i32 -1)
unreachable
}

LLVM IR (-O2):
define void @handle(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = call i32 @wait(i32* %2)
%4 = call i32 (...) @destroy()
%5 = call i32 @exit(i32 -1)
unreachable
}
void ee_deinitObj(struct ee_obj __attribute__((unused)) * pThis) { ; }


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

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

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

LLVM IR (-O2):
%struct.ee_obj = type opaque
define void @ee_deinitObj(%struct.ee_obj* nocapture %0) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
void f2(int var) { printf("this is f2 and var is: %d\n", var); }


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

x86 assembly (clang, -O2):
<f2>:
mov    %edi,%esi
lea    0xee7(%rip),%rdi
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [27 x i8] c"this is f2 and var is: %d\0A\00"
define void @f2(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = call i32 @printf(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str, i64 0, i64 0), i32 %3)
ret void
}

LLVM IR (-O2):
@.str = [27 x i8] c"this is f2 and var is: %d\0A\00"
define void @f2(i32 %0) {
%2 = tail call i32 @printf(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str, i64 0, i64 0), i32 %0)
ret void
}
/* Variables and functions */
char *get_default_domain();
int _rpc_get_default_domain(char **domain) {
  if ((*domain = get_default_domain()) != 0)
    return (0);
  return (-1);
}


x86 assembly (clang, -O0):
<_rpc_get_default_domain>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x10(%rbp)
mov    $0x0,%al
call   1030 <get_default_domain@plt>
mov    -0x10(%rbp),%rcx
mov    %rax,(%rcx)
cmp    $0x0,%rax
je     1140 <_rpc_get_default_domain+0x30>
movl   $0x0,-0x4(%rbp)
jmp    1147 <_rpc_get_default_domain+0x37>
movl   $0xffffffff,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<_rpc_get_default_domain>:
push   %rbx
mov    %rdi,%rbx
xor    %eax,%eax
call   1030 <get_default_domain@plt>
mov    %rax,(%rbx)
cmp    $0x1,%rax
sbb    %eax,%eax
pop    %rbx
ret

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

LLVM IR (-O2):
define i32 @_rpc_get_default_domain(i8** nocapture writeonly %0) {
%2 = tail call i8* (...) @get_default_domain()
store i8* %2, i8** %0
%3 = icmp eq i8* %2, null
%4 = sext i1 %3 to i32
ret i32 %4
}
void timer_handler(int signum) { return; }


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

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

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

LLVM IR (-O2):
define void @timer_handler(i32 %0) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ link_error();
void test01(unsigned int a, unsigned int b) {
  unsigned int x = 0x80000000;
  if (a < x)
    if (b < x)
      if (a > 5)
        if (a + b == 0U)
          link_error();
}


x86 assembly (clang, -O0):
<test01>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
movl   $0x80000000,-0xc(%rbp)
mov    -0x4(%rbp),%eax
cmp    -0xc(%rbp),%eax
jae    116c <test01+0x5c>
mov    -0x8(%rbp),%eax
cmp    -0xc(%rbp),%eax
jae    1167 <test01+0x57>
cmpl   $0x5,-0x4(%rbp)
jbe    1162 <test01+0x52>
mov    -0x4(%rbp),%eax
add    -0x8(%rbp),%eax
cmp    $0x0,%eax
jne    115d <test01+0x4d>
mov    $0x0,%al
call   1030 <link_error@plt>
jmp    1162 <test01+0x52>
jmp    1167 <test01+0x57>
jmp    116c <test01+0x5c>
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
define void @test01(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
store i32 -2147483648, i32* %5
%6 = load i32, i32* %3
%7 = load i32, i32* %5
%8 = icmp ult i32 %6, %7
br i1 %8, label %9, label %26
9: ; preds = %2
%10 = load i32, i32* %4
%11 = load i32, i32* %5
%12 = icmp ult i32 %10, %11
br i1 %12, label %13, label %25
13: ; preds = %9
%14 = load i32, i32* %3
%15 = icmp ugt i32 %14, 5
br i1 %15, label %16, label %24
16: ; preds = %13
%17 = load i32, i32* %3
%18 = load i32, i32* %4
%19 = add i32 %17, %18
%20 = icmp eq i32 %19, 0
br i1 %20, label %21, label %23
21: ; preds = %16
%22 = call i32 (...) @link_error()
br label %23
23: ; preds = %21, %16
br label %24
24: ; preds = %23, %13
br label %25
25: ; preds = %24, %9
br label %26
26: ; preds = %25, %2
ret void
}

LLVM IR (-O2):
define void @test01(i32 %0, i32 %1) {
ret void
}
int is_big_endian(void) {
  unsigned short n = 1;
  return *((unsigned char *)&n) != 256;
}


x86 assembly (clang, -O0):
<is_big_endian>:
push   %rbp
mov    %rsp,%rbp
movw   $0x1,-0x2(%rbp)
movzbl -0x2(%rbp),%eax
cmp    $0x100,%eax
setne  %al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @is_big_endian() {
%1 = alloca i16
store i16 1, i16* %1
%2 = bitcast i16* %1 to i8*
%3 = load i8, i8* %2
%4 = zext i8 %3 to i32
%5 = icmp ne i32 %4, 256
%6 = zext i1 %5 to i32
ret i32 %6
}

LLVM IR (-O2):
define i32 @is_big_endian() {
ret i32 1
}
unsigned int sd_zbc_complete(struct scsi_cmnd *cmd, unsigned int good_bytes,
                             struct scsi_sense_hdr *sshdr) {
  return good_bytes;
}


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

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

LLVM IR (-O0):
%struct.scsi_cmnd = type opaque
%struct.scsi_sense_hdr = type opaque
define i32 @sd_zbc_complete(%struct.scsi_cmnd* %0, i32 %1, %struct.scsi_sense_hdr* %2) {
%4 = alloca %struct.scsi_cmnd*
%5 = alloca i32
%6 = alloca %struct.scsi_sense_hdr*
store %struct.scsi_cmnd* %0, %struct.scsi_cmnd** %4
store i32 %1, i32* %5
store %struct.scsi_sense_hdr* %2, %struct.scsi_sense_hdr** %6
%7 = load i32, i32* %5
ret i32 %7
}

LLVM IR (-O2):
%struct.scsi_cmnd = type opaque
%struct.scsi_sense_hdr = type opaque
define i32 @sd_zbc_complete(%struct.scsi_cmnd* nocapture readnone %0, i32 returned %1, %struct.scsi_sense_hdr* nocapture readnone %2) {
ret i32 %1
}
/* Type definitions */
struct mg_connection {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ mg_mqtt_prepend_header(struct mg_connection *, int,
                                          int /*<<< orphan*/,
                                          int /*<<< orphan*/);
void mg_mqtt_ping(struct mg_connection *nc) {
  mg_mqtt_prepend_header(nc, 12, 0, 0);
}


x86 assembly (clang, -O0):
<mg_mqtt_ping>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
mov    $0xc,%esi
xor    %ecx,%ecx
mov    %ecx,%edx
call   1030 <mg_mqtt_prepend_header@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<mg_mqtt_ping>:
mov    $0xc,%esi
xor    %edx,%edx
xor    %ecx,%ecx
jmp    1030 <mg_mqtt_prepend_header@plt>

LLVM IR (-O0):
%struct.mg_connection = type { i32 }
define void @mg_mqtt_ping(%struct.mg_connection* %0) {
%2 = alloca %struct.mg_connection*
store %struct.mg_connection* %0, %struct.mg_connection** %2
%3 = load %struct.mg_connection*, %struct.mg_connection** %2
%4 = call i32 @mg_mqtt_prepend_header(%struct.mg_connection* %3, i32 12, i32 0, i32 0)
ret void
}

LLVM IR (-O2):
%struct.mg_connection = type { i32 }
define void @mg_mqtt_ping(%struct.mg_connection* %0) {
%2 = tail call i32 @mg_mqtt_prepend_header(%struct.mg_connection* %0, i32 12, i32 0, i32 0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ private_core_mm_paging_init();
void core_mm_init() {
  private_core_mm_paging_init();
  return;
}


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

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

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

LLVM IR (-O2):
define void @core_mm_init() {
%1 = tail call i32 (...) @private_core_mm_paging_init()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ normalCDeclaration2();
void forwardCDeclaration() { normalCDeclaration2(); }


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

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

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

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

/* Variables and functions */
uint16_t FromLE16(uint16_t value) { return value; }


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

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

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

LLVM IR (-O2):
define i32 @FromLE16(i32 returned %0) {
ret i32 %0
}
/* Type definitions */
struct usb_hcd {
  int dummy;
};
struct platform_device {
  int dummy;
};
struct device {
  int dummy;
};

/* Variables and functions */
struct usb_hcd *dev_get_drvdata(struct device *);
struct platform_device *to_platform_device(struct device *);
int /*<<< orphan*/ usb_hcd_brcm_remove(struct usb_hcd *,
                                       struct platform_device *);
int ehci_hcd_brcm_drv_remove(struct device *dev) {
  struct platform_device *pdev = to_platform_device(dev);
  struct usb_hcd *hcd = dev_get_drvdata(dev);
  usb_hcd_brcm_remove(hcd, pdev);
  return 0;
}


x86 assembly (clang, -O0):
<ehci_hcd_brcm_drv_remove>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <to_platform_device@plt>
mov    %rax,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <dev_get_drvdata@plt>
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1050 <usb_hcd_brcm_remove@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ehci_hcd_brcm_drv_remove>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%rbx
call   1040 <to_platform_device@plt>
mov    %rax,%r14
mov    %rbx,%rdi
call   1030 <dev_get_drvdata@plt>
mov    %rax,%rdi
mov    %r14,%rsi
call   1050 <usb_hcd_brcm_remove@plt>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
%struct.device = type { i32 }
%struct.platform_device = type { i32 }
%struct.usb_hcd = type { i32 }
define i32 @ehci_hcd_brcm_drv_remove(%struct.device* %0) {
%2 = alloca %struct.device*
%3 = alloca %struct.platform_device*
%4 = alloca %struct.usb_hcd*
store %struct.device* %0, %struct.device** %2
%5 = load %struct.device*, %struct.device** %2
%6 = call %struct.platform_device* @to_platform_device(%struct.device* %5)
store %struct.platform_device* %6, %struct.platform_device** %3
%7 = load %struct.device*, %struct.device** %2
%8 = call %struct.usb_hcd* @dev_get_drvdata(%struct.device* %7)
store %struct.usb_hcd* %8, %struct.usb_hcd** %4
%9 = load %struct.usb_hcd*, %struct.usb_hcd** %4
%10 = load %struct.platform_device*, %struct.platform_device** %3
%11 = call i32 @usb_hcd_brcm_remove(%struct.usb_hcd* %9, %struct.platform_device* %10)
ret i32 0
}

LLVM IR (-O2):
%struct.device = type { i32 }
%struct.platform_device = type { i32 }
%struct.usb_hcd = type { i32 }
define i32 @ehci_hcd_brcm_drv_remove(%struct.device* %0) {
%2 = tail call %struct.platform_device* @to_platform_device(%struct.device* %0)
%3 = tail call %struct.usb_hcd* @dev_get_drvdata(%struct.device* %0)
%4 = tail call i32 @usb_hcd_brcm_remove(%struct.usb_hcd* %3, %struct.platform_device* %2)
ret i32 0
}
double dle(double x, double y) { return ((double)(x <= y)); }


x86 assembly (clang, -O0):
<dle>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  -0x8(%rbp),%xmm1
movsd  -0x10(%rbp),%xmm0
ucomisd %xmm1,%xmm0
setae  %al
and    $0x1,%al
movzbl %al,%eax
cvtsi2sd %eax,%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<dle>:
cmplesd %xmm1,%xmm0
movsd  0xef3(%rip),%xmm1
andpd  %xmm1,%xmm0
ret

LLVM IR (-O0):
define double @dle(double %0, double %1) {
%3 = alloca double
%4 = alloca double
store double %0, double* %3
store double %1, double* %4
%5 = load double, double* %3
%6 = load double, double* %4
%7 = fcmp ole double %5, %6
%8 = zext i1 %7 to i32
%9 = sitofp i32 %8 to double
ret double %9
}

LLVM IR (-O2):
define double @dle(double %0, double %1) {
%3 = fcmp ole double %0, %1
%4 = uitofp i1 %3 to double
ret double %4
}
/* Variables and functions */
int /*<<< orphan*/ EOPNOTSUPP;
int /*<<< orphan*/ errno;
int fgetflags(const char *name, unsigned long *flags) {
  errno = EOPNOTSUPP;
  return -1;
}


x86 assembly (clang, -O0):
<fgetflags>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    0x2ecd(%rip),%rax
mov    (%rax),%ecx
mov    0x2ebc(%rip),%rax
mov    %ecx,(%rax)
mov    $0xffffffff,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<fgetflags>:
mov    0x2ed9(%rip),%rax
mov    (%rax),%eax
mov    0x2ec8(%rip),%rcx
mov    %eax,(%rcx)
mov    $0xffffffff,%eax
ret

LLVM IR (-O0):
@EOPNOTSUPP = global i32 0
@errno = global i32 0
define i32 @fgetflags(i8* %0, i64* %1) {
%3 = alloca i8*
%4 = alloca i64*
store i8* %0, i8** %3
store i64* %1, i64** %4
%5 = load i32, i32* @EOPNOTSUPP
store i32 %5, i32* @errno
ret i32 -1
}

LLVM IR (-O2):
@EOPNOTSUPP = global i32 0
@errno = global i32 0
define i32 @fgetflags(i8* nocapture readnone %0, i64* nocapture readnone %1) {
%3 = load i32, i32* @EOPNOTSUPP
store i32 %3, i32* @errno
ret i32 -1
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int /*<<< orphan*/, char *, int, char *);
int /*<<< orphan*/ isascii(int);
void t_isascii_0x49() {
  Assert_real((isascii(73)),
              "/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_isascii.c",
              370, ("isascii should be 1 for I"));
}


x86 assembly (clang, -O0):
<t_isascii_0x49>:
push   %rbp
mov    %rsp,%rbp
mov    $0x49,%edi
call   1030 <isascii@plt>
mov    %eax,%edi
lea    0xec9(%rip),%rsi
mov    $0x172,%edx
lea    0xf65(%rip),%rcx
call   1040 <Assert_real@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<t_isascii_0x49>:
lea    0xee9(%rip),%rsi
lea    0xf8a(%rip),%rcx
mov    $0x1,%edi
mov    $0x172,%edx
jmp    1030 <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_isascii.c\00"
@.str.1 = [26 x i8] c"isascii should be 1 for I\00"
define void @t_isascii_0x49() {
%1 = call i32 @isascii(i32 73)
%2 = call i32 @Assert_real(i32 %1, i8* getelementptr inbounds ([168 x i8], [168 x i8]* @.str, i64 0, i64 0), i32 370, 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_isascii.c\00"
@.str.1 = [26 x i8] c"isascii should be 1 for I\00"
define void @t_isascii_0x49() {
%1 = tail call i32 @Assert_real(i32 1, i8* getelementptr inbounds ([168 x i8], [168 x i8]* @.str, i64 0, i64 0), i32 370, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Variables and functions */
double fmod(double, int);
double local_to_greenwich_time(double lon, double loc_time) {
  double gw_time;
  gw_time = loc_time - lon / (3.14159265358979323846264338327 * 2.);
  if ((gw_time = fmod(gw_time, 1.)) < 0.)
    gw_time += 1.;
  return gw_time;
}


x86 assembly (clang, -O0):
<local_to_greenwich_time>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  -0x10(%rbp),%xmm0
movsd  -0x8(%rbp),%xmm1
movsd  0xecc(%rip),%xmm2
divsd  %xmm2,%xmm1
subsd  %xmm1,%xmm0
movsd  %xmm0,-0x18(%rbp)
movsd  -0x18(%rbp),%xmm0
mov    $0x1,%edi
call   1030 <fmod@plt>
movaps %xmm0,%xmm1
movsd  %xmm1,-0x18(%rbp)
xorps  %xmm0,%xmm0
ucomisd %xmm1,%xmm0
jbe    1177 <local_to_greenwich_time+0x67>
movsd  0xe9b(%rip),%xmm0
addsd  -0x18(%rbp),%xmm0
movsd  %xmm0,-0x18(%rbp)
movsd  -0x18(%rbp),%xmm0
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<local_to_greenwich_time>:
push   %rax
divsd  0xee7(%rip),%xmm0
addsd  %xmm1,%xmm0
mov    $0x1,%edi
call   1030 <fmod@plt>
movsd  0xed9(%rip),%xmm2
addsd  %xmm0,%xmm2
xorpd  %xmm3,%xmm3
movapd %xmm0,%xmm1
cmpltsd %xmm3,%xmm1
andpd  %xmm1,%xmm2
andnpd %xmm0,%xmm1
orpd   %xmm2,%xmm1
movapd %xmm1,%xmm0
pop    %rax
ret

LLVM IR (-O0):
define double @local_to_greenwich_time(double %0, double %1) {
%3 = alloca double
%4 = alloca double
%5 = alloca double
store double %0, double* %3
store double %1, double* %4
%6 = load double, double* %4
%7 = load double, double* %3
%8 = fdiv double %7, 0x401921FB54442D18
%9 = fsub double %6, %8
store double %9, double* %5
%10 = load double, double* %5
%11 = call double @fmod(double %10, i32 1)
store double %11, double* %5
%12 = fcmp olt double %11, 0.000000e+00
br i1 %12, label %13, label %16
13: ; preds = %2
%14 = load double, double* %5
%15 = fadd double %14, 1.000000e+00
store double %15, double* %5
br label %16
16: ; preds = %13, %2
%17 = load double, double* %5
ret double %17
}

LLVM IR (-O2):
define double @local_to_greenwich_time(double %0, double %1) {
%3 = fdiv double %0, 0x401921FB54442D18
%4 = fsub double %1, %3
%5 = tail call double @fmod(double %4, i32 1)
%6 = fcmp olt double %5, 0.000000e+00
%7 = fadd double %5, 1.000000e+00
%8 = select i1 %6, double %7, double %5
ret double %8
}
/* Variables and functions */
int /*<<< orphan*/ U_WMRNOTIMPLEMENTED_swap(char *, int);
void U_WMR5A_swap(char *record, int torev) {
  U_WMRNOTIMPLEMENTED_swap(record, torev);
}


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

x86 assembly (clang, -O2):
<U_WMR5A_swap>:
jmp    1030 <U_WMRNOTIMPLEMENTED_swap@plt>

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

LLVM IR (-O2):
define void @U_WMR5A_swap(i8* %0, i32 %1) {
%3 = tail call i32 @U_WMRNOTIMPLEMENTED_swap(i8* %0, i32 %1)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ msg_init();
void msg_destroy(void) { msg_init(); }


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

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

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

LLVM IR (-O2):
define void @msg_destroy() {
%1 = tail call i32 (...) @msg_init()
ret void
}
/* Variables and functions */
void foo(void) {}


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

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

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

LLVM IR (-O2):
define void @foo() {
ret void
}
/* Variables and functions */
scalar_t__ fmax(double, double);
int /*<<< orphan*/ link_failure_fmax();
void test_fmax(double d1, double d2) {
  if (fmax(d1, d2) != fmax(d1, d2))
    link_failure_fmax();
}


x86 assembly (clang, -O0):
<test_fmax>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  -0x8(%rbp),%xmm0
movsd  -0x10(%rbp),%xmm1
call   1040 <fmax@plt>
mov    %rax,-0x18(%rbp)
movsd  -0x8(%rbp),%xmm0
movsd  -0x10(%rbp),%xmm1
call   1040 <fmax@plt>
mov    %rax,%rcx
mov    -0x18(%rbp),%rax
cmp    %rcx,%rax
je     116b <test_fmax+0x4b>
mov    $0x0,%al
call   1030 <link_failure_fmax@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_fmax>:
push   %rbx
sub    $0x10,%rsp
movsd  %xmm1,0x8(%rsp)
movsd  %xmm0,(%rsp)
call   1040 <fmax@plt>
mov    %rax,%rbx
movsd  (%rsp),%xmm0
movsd  0x8(%rsp),%xmm1
call   1040 <fmax@plt>
cmp    %rax,%rbx
jne    1153 <test_fmax+0x33>
add    $0x10,%rsp
pop    %rbx
ret
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbx
jmp    1030 <link_failure_fmax@plt>

LLVM IR (-O0):
define void @test_fmax(double %0, double %1) {
%3 = alloca double
%4 = alloca double
store double %0, double* %3
store double %1, double* %4
%5 = load double, double* %3
%6 = load double, double* %4
%7 = call i64 @fmax(double %5, double %6)
%8 = load double, double* %3
%9 = load double, double* %4
%10 = call i64 @fmax(double %8, double %9)
%11 = icmp ne i64 %7, %10
br i1 %11, label %12, label %14
12: ; preds = %2
%13 = call i32 (...) @link_failure_fmax()
br label %14
14: ; preds = %12, %2
ret void
}

LLVM IR (-O2):
define void @test_fmax(double %0, double %1) {
%3 = tail call i64 @fmax(double %0, double %1)
%4 = tail call i64 @fmax(double %0, double %1)
%5 = icmp eq i64 %3, %4
br i1 %5, label %8, label %6
6: ; preds = %2
%7 = tail call i32 (...) @link_failure_fmax()
br label %8
8: ; preds = %6, %2
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char *);
void test_start(char *name) { printf("test: %s\n", name); }


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

x86 assembly (clang, -O2):
<test_start>:
mov    %rdi,%rsi
lea    0xee6(%rip),%rdi
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [10 x i8] c"test: %s\0A\00"
define void @test_start(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i8* %3)
ret void
}

LLVM IR (-O2):
@.str = [10 x i8] c"test: %s\0A\00"
define void @test_start(i8* %0) {
%2 = tail call i32 @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i8* %0)
ret void
}
/* Variables and functions */
int check_string(char *, char *);
int check_table1(char *str) { return check_string(str, "^--"); }


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

x86 assembly (clang, -O2):
<check_table1>:
lea    0xee9(%rip),%rsi
jmp    1030 <check_string@plt>

LLVM IR (-O0):
@.str = [4 x i8] c"^--\00"
define i32 @check_table1(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 @check_string(i8* %3, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0))
ret i32 %4
}

LLVM IR (-O2):
@.str = [4 x i8] c"^--\00"
define i32 @check_table1(i8* %0) {
%2 = tail call i32 @check_string(i8* %0, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0))
ret i32 %2
}
void foo654() {}


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

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

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

LLVM IR (-O2):
define void @foo654() {
ret void
}
void SSMR3SetLoadError(void) {}


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

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

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

LLVM IR (-O2):
define void @SSMR3SetLoadError() {
ret void
}
int isPosPrime(const int n) {
  if (n < 1) {
    return 0;
  }
  int i;
  for (i = n - 1; i > 1; i--) {
    if (n % i == 0) {
      return 0;
    }
  }
  return 1;
}


x86 assembly (clang, -O0):
<isPosPrime>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
cmpl   $0x1,-0x8(%rbp)
jge    111d <isPosPrime+0x1d>
movl   $0x0,-0x4(%rbp)
jmp    1166 <isPosPrime+0x66>
mov    -0x8(%rbp),%eax
sub    $0x1,%eax
mov    %eax,-0xc(%rbp)
cmpl   $0x1,-0xc(%rbp)
jle    115f <isPosPrime+0x5f>
mov    -0x8(%rbp),%eax
cltd
idivl  -0xc(%rbp)
cmp    $0x0,%edx
jne    114c <isPosPrime+0x4c>
movl   $0x0,-0x4(%rbp)
jmp    1166 <isPosPrime+0x66>
jmp    1151 <isPosPrime+0x51>
mov    -0xc(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0xc(%rbp)
jmp    1126 <isPosPrime+0x26>
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<isPosPrime>:
xor    %ecx,%ecx
test   %edi,%edi
jle    1121 <isPosPrime+0x21>
mov    %edi,%esi
nopl   0x0(%rax,%rax,1)
cmp    $0x3,%esi
jl     1124 <isPosPrime+0x24>
add    $0xffffffff,%esi
mov    %edi,%eax
cltd
idiv   %esi
test   %edx,%edx
jne    1110 <isPosPrime+0x10>
mov    %ecx,%eax
ret
mov    $0x1,%eax
ret

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

LLVM IR (-O2):
define i32 @isPosPrime(i32 %0) {
%2 = icmp slt i32 %0, 1
br i1 %2, label %10, label %3
3: ; preds = %1, %7
%4 = phi i32 [ %5, %7 ], [ %0, %1 ]
%5 = add nsw i32 %4, -1
%6 = icmp sgt i32 %4, 2
br i1 %6, label %7, label %10
7: ; preds = %3
%8 = srem i32 %0, %5
%9 = icmp eq i32 %8, 0
br i1 %9, label %10, label %3
10: ; preds = %7, %3, %1
%11 = phi i32 [ 0, %1 ], [ 1, %3 ], [ 0, %7 ]
ret i32 %11
}
/* Variables and functions */
int /*<<< orphan*/ wl12xx_exit();
void cleanup_module(void) {
  {
    { wl12xx_exit(); }
    return;
  }
}


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

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

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

LLVM IR (-O2):
define void @cleanup_module() {
%1 = tail call i32 (...) @wl12xx_exit()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ asprintf(char **, char *, char *, char *);
char *append(char *string1, char *string2) {
  char *result = NULL;
  asprintf(&result, "%s%s", string1, string2);
  return result;
}


x86 assembly (clang, -O0):
<append>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movq   $0x0,-0x18(%rbp)
mov    -0x8(%rbp),%rdx
mov    -0x10(%rbp),%rcx
lea    -0x18(%rbp),%rdi
lea    0xec5(%rip),%rsi
call   1030 <asprintf@plt>
mov    -0x18(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<append>:
push   %rax
mov    %rsi,%rcx
mov    %rdi,%rdx
movq   $0x0,(%rsp)
lea    0xeda(%rip),%rsi
mov    %rsp,%rdi
call   1030 <asprintf@plt>
mov    (%rsp),%rax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [5 x i8] c"%s%s\00"
define i8* @append(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
%5 = alloca i8*
store i8* %0, i8** %3
store i8* %1, i8** %4
store i8* null, i8** %5
%6 = load i8*, i8** %3
%7 = load i8*, i8** %4
%8 = call i32 @asprintf(i8** %5, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i8* %6, i8* %7)
%9 = load i8*, i8** %5
ret i8* %9
}

LLVM IR (-O2):
@.str = [5 x i8] c"%s%s\00"
define i8* @append(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = bitcast i8** %3 to i8*
store i8* null, i8** %3
%5 = call i32 @asprintf(i8** %3, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i8* %0, i8* %1)
%6 = load i8*, i8** %3
ret i8* %6
}
unsigned long rdfpcr(void) {
  unsigned long tmp, ret;
  __asm__("" : "=r"(tmp), "=r"(ret));
  return ret;
}


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

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

LLVM IR (-O0):
define i64 @rdfpcr() {
%1 = alloca i64
%2 = alloca i64
%3 = call { i64, i64 } asm "", "=r,=r,~{dirflag},~{fpsr},~{flags}"()
%4 = extractvalue { i64, i64 } %3, 0
%5 = extractvalue { i64, i64 } %3, 1
store i64 %4, i64* %1
store i64 %5, i64* %2
%6 = load i64, i64* %2
ret i64 %6
}

LLVM IR (-O2):
define i64 @rdfpcr() {
%1 = tail call { i64, i64 } asm "", "=r,=r,~{dirflag},~{fpsr},~{flags}"()
%2 = extractvalue { i64, i64 } %1, 1
ret i64 %2
}
/* Type definitions */
typedef scalar_t__ const int64_t;

/* Variables and functions */
int64_t sub64(const int64_t a, const int64_t b) { return a - b; }


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

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

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

LLVM IR (-O2):
define i64 @sub64(i64 %0, i64 %1) {
%3 = sub nsw i64 %0, %1
ret i64 %3
}
/* Variables and functions */
int /*<<< orphan*/ assert(int /*<<< orphan*/);
double log2(double d) {
  assert(0);
  return 0;
}


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

x86 assembly (clang, -O2):
<log2>:
push   %rax
xor    %edi,%edi
call   1030 <assert@plt>
xorps  %xmm0,%xmm0
pop    %rax
ret

LLVM IR (-O0):
define double @log2(double %0) {
%2 = alloca double
store double %0, double* %2
%3 = call i32 @assert(i32 0)
ret double 0.000000e+00
}

LLVM IR (-O2):
define double @log2(double %0) {
%2 = tail call i32 @assert(i32 0)
ret double 0.000000e+00
}
int main(void) { return (10 <= 20) + (20 <= 20) + (30 <= 20); }


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
movl   $0x0,-0x4(%rbp)
mov    $0x2,%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @main() {
ret i32 2
}
void ff_hevc_put_hevc_pel_pixels6_12_sse4() {}


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

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

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

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

/* Variables and functions */
char *strerror(int);
char *strerror_l(int errno, locale_t loc) { return strerror(errno); }


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

x86 assembly (clang, -O2):
<strerror_l>:
jmp    1030 <strerror@plt>

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

LLVM IR (-O2):
define i8* @strerror_l(i32 %0, i32 %1) {
%3 = tail call i8* @strerror(i32 %0)
ret i8* %3
}
/* Variables and functions */
int /*<<< orphan*/ display_status(int);
int /*<<< orphan*/ printf(char *);
void fry(int x) {
  x = x * x;
  printf("In fry(), I got: ");
  display_status(x);
}


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

x86 assembly (clang, -O2):
<fry>:
push   %rbx
mov    %edi,%ebx
imul   %edi,%ebx
lea    0xed3(%rip),%rdi
call   1040 <printf@plt>
mov    %ebx,%edi
pop    %rbx
jmp    1030 <display_status@plt>

LLVM IR (-O0):
@.str = [18 x i8] c"In fry(), I got: \00"
define void @fry(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = load i32, i32* %2
%5 = mul nsw i32 %3, %4
store i32 %5, i32* %2
%6 = call i32 @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0))
%7 = load i32, i32* %2
%8 = call i32 @display_status(i32 %7)
ret void
}

LLVM IR (-O2):
@.str = [18 x i8] c"In fry(), I got: \00"
define void @fry(i32 %0) {
%2 = mul nsw i32 %0, %0
%3 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0))
%4 = tail call i32 @display_status(i32 %2)
ret void
}
double ABS(double x) { return (x >= 0) ? x : -x; }


x86 assembly (clang, -O0):
<ABS>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
xorps  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jb     112a <ABS+0x2a>
movsd  -0x8(%rbp),%xmm0
movsd  %xmm0,-0x10(%rbp)
jmp    114b <ABS+0x4b>
movsd  -0x8(%rbp),%xmm0
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
movsd  %xmm0,-0x10(%rbp)
movsd  -0x10(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<ABS>:
movapd 0xef8(%rip),%xmm1
xorpd  %xmm0,%xmm1
xorpd  %xmm2,%xmm2
cmplesd %xmm0,%xmm2
andpd  %xmm2,%xmm0
andnpd %xmm1,%xmm2
orpd   %xmm2,%xmm0
ret

LLVM IR (-O0):
define double @ABS(double %0) {
%2 = alloca double
store double %0, double* %2
%3 = load double, double* %2
%4 = fcmp oge double %3, 0.000000e+00
br i1 %4, label %5, label %7
5: ; preds = %1
%6 = load double, double* %2
br label %10
7: ; preds = %1
%8 = load double, double* %2
%9 = fneg double %8
br label %10
10: ; preds = %7, %5
%11 = phi double [ %6, %5 ], [ %9, %7 ]
ret double %11
}

LLVM IR (-O2):
define double @ABS(double %0) {
%2 = fcmp oge double %0, 0.000000e+00
%3 = fneg double %0
%4 = select i1 %2, double %0, double %3
ret double %4
}
void change(int *pInt) {
  int i = 0;
  i = 100;
  *pInt = i;
}


x86 assembly (clang, -O0):
<change>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
movl   $0x64,-0xc(%rbp)
mov    -0xc(%rbp),%ecx
mov    -0x8(%rbp),%rax
mov    %ecx,(%rax)
pop    %rbp
ret

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

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

LLVM IR (-O2):
define void @change(i32* nocapture writeonly %0) {
store i32 100, i32* %0
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char *);
int /*<<< orphan*/ scanf(char *, char *);
int main() {
  char a[40], b[40];
  scanf("%s", a);
  printf("%s\n", a);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x60,%rsp
lea    -0x30(%rbp),%rsi
lea    0xecd(%rip),%rdi
call   1040 <scanf@plt>
lea    -0x30(%rbp),%rsi
lea    0xec0(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x60,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x30,%rsp
lea    0xed4(%rip),%rdi
mov    %rsp,%rbx
mov    %rbx,%rsi
call   1040 <scanf@plt>
lea    0xec5(%rip),%rdi
mov    %rbx,%rsi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x30,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@.str = [3 x i8] c"%s\00"
@.str.1 = [4 x i8] c"%s\0A\00"
define i32 @main() {
%1 = alloca [40 x i8]
%2 = alloca [40 x i8]
%3 = getelementptr inbounds [40 x i8], [40 x i8]* %1, i64 0, i64 0
%4 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* %3)
%5 = getelementptr inbounds [40 x i8], [40 x i8]* %1, 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):
@.str = [3 x i8] c"%s\00"
@.str.1 = [4 x i8] c"%s\0A\00"
define i32 @main() {
%1 = alloca [40 x i8]
%2 = getelementptr inbounds [40 x i8], [40 x i8]* %1, i64 0, i64 0
%3 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* %2)
%4 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i8* %2)
ret i32 0
}