xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void help() {
  printf("Program to move file from one path to another\n"
         "-h|--help for help\n"
         "-v|--version for version information\n");
  printf("You must specify original file first, then specify the\n"
         " destinaiton file name (full path).\n");
}


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

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

LLVM IR (-O0):
@.str = [103 x i8] c"Program to move file from one path to another\0A-h|--help for help\0A-v|--version for version information\0A\00"
@.str.1 = [92 x i8] c"You must specify original file first, then specify the\0A destinaiton file name (full path).\0A\00"
define void @help() {
%1 = call i32 @printf(i8* getelementptr inbounds ([103 x i8], [103 x i8]* @.str, i64 0, i64 0))
%2 = call i32 @printf(i8* getelementptr inbounds ([92 x i8], [92 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@str = [102 x i8] c"Program to move file from one path to another\0A-h|--help for help\0A-v|--version for version information\00"
@str.2 = [91 x i8] c"You must specify original file first, then specify the\0A destinaiton file name (full path).\00"
define void @help() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([102 x i8], [102 x i8]* @str, i64 0, i64 0))
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([91 x i8], [91 x i8]* @str.2, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void p0_rot1(void) { printf("p0_rot1()\n"); }


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

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

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

LLVM IR (-O2):
@str = [10 x i8] c"p0_rot1()\00"
define void @p0_rot1() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([10 x i8], [10 x i8]* @str, i64 0, i64 0))
ret void
}
int nvAbs(int n) {
  if (n < 0)
    return -n;
  return n;
}


x86 assembly (clang, -O0):
<nvAbs>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
cmpl   $0x0,-0x8(%rbp)
jge    111e <nvAbs+0x1e>
xor    %eax,%eax
sub    -0x8(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    1124 <nvAbs+0x24>
mov    -0x8(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @nvAbs(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %3
%4 = load i32, i32* %3
%5 = icmp slt i32 %4, 0
br i1 %5, label %6, label %9
6: ; preds = %1
%7 = load i32, i32* %3
%8 = sub nsw i32 0, %7
store i32 %8, i32* %2
br label %11
9: ; preds = %1
%10 = load i32, i32* %3
store i32 %10, i32* %2
br label %11
11: ; preds = %9, %6
%12 = load i32, i32* %2
ret i32 %12
}

LLVM IR (-O2):
define i32 @nvAbs(i32 %0) {
%2 = tail call i32 @llvm.abs.i32(i32 %0, i1 true)
ret i32 %2
}
char *q_memrchr(char *p, int c, unsigned int size) {
  char *end;
  end = p + size - 1;
  for (; end >= p; end--) {
    if (*end == (unsigned char)c)
      return end;
  }
  return 0;
}


x86 assembly (clang, -O0):
<q_memrchr>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    %esi,-0x14(%rbp)
mov    %edx,-0x18(%rbp)
mov    -0x10(%rbp),%rax
mov    -0x18(%rbp),%ecx
add    %rcx,%rax
add    $0xffffffffffffffff,%rax
mov    %rax,-0x20(%rbp)
mov    -0x20(%rbp),%rax
cmp    -0x10(%rbp),%rax
jb     1166 <q_memrchr+0x66>
mov    -0x20(%rbp),%rax
movsbl (%rax),%eax
mov    -0x14(%rbp),%ecx
movzbl %cl,%ecx
cmp    %ecx,%eax
jne    1150 <q_memrchr+0x50>
mov    -0x20(%rbp),%rax
mov    %rax,-0x8(%rbp)
jmp    116e <q_memrchr+0x6e>
jmp    1155 <q_memrchr+0x55>
mov    -0x20(%rbp),%rax
add    $0xffffffffffffffff,%rax
mov    %rax,-0x20(%rbp)
jmp    1120 <q_memrchr+0x20>
movq   $0x0,-0x8(%rbp)
mov    -0x8(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<q_memrchr>:
mov    %edx,%eax
movzbl %sil,%edx
lea    (%rax,%rdi,1),%rcx
add    $0xffffffffffffffff,%rcx
xor    %eax,%eax
cmp    %rdi,%rcx
jb     1127 <q_memrchr+0x27>
movsbl (%rcx),%esi
add    $0xffffffffffffffff,%rcx
cmp    %esi,%edx
jne    1110 <q_memrchr+0x10>
add    $0x1,%rcx
mov    %rcx,%rax
ret

LLVM IR (-O0):
define i8* @q_memrchr(i8* %0, i32 %1, i32 %2) {
%4 = alloca i8*
%5 = alloca i8*
%6 = alloca i32
%7 = alloca i32
%8 = alloca i8*
store i8* %0, i8** %5
store i32 %1, i32* %6
store i32 %2, i32* %7
%9 = load i8*, i8** %5
%10 = load i32, i32* %7
%11 = zext i32 %10 to i64
%12 = getelementptr inbounds i8, i8* %9, i64 %11
%13 = getelementptr inbounds i8, i8* %12, i64 -1
store i8* %13, i8** %8
br label %14
14: ; preds = %29, %3
%15 = load i8*, i8** %8
%16 = load i8*, i8** %5
%17 = icmp uge i8* %15, %16
br i1 %17, label %18, label %32
18: ; preds = %14
%19 = load i8*, i8** %8
%20 = load i8, i8* %19
%21 = sext i8 %20 to i32
%22 = load i32, i32* %6
%23 = trunc i32 %22 to i8
%24 = zext i8 %23 to i32
%25 = icmp eq i32 %21, %24
br i1 %25, label %26, label %28
26: ; preds = %18
%27 = load i8*, i8** %8
store i8* %27, i8** %4
br label %33
28: ; preds = %18
br label %29
29: ; preds = %28
%30 = load i8*, i8** %8
%31 = getelementptr inbounds i8, i8* %30, i32 -1
store i8* %31, i8** %8
br label %14
32: ; preds = %14
store i8* null, i8** %4
br label %33
33: ; preds = %32, %26
%34 = load i8*, i8** %4
ret i8* %34
}

LLVM IR (-O2):
define i8* @q_memrchr(i8* %0, i32 %1, i32 %2) {
%4 = zext i32 %2 to i64
%5 = getelementptr inbounds i8, i8* %0, i64 %4
%6 = and i32 %1, 255
br label %7
7: ; preds = %11, %3
%8 = phi i8* [ %5, %3 ], [ %9, %11 ]
%9 = getelementptr inbounds i8, i8* %8, i64 -1
%10 = icmp ult i8* %9, %0
br i1 %10, label %15, label %11
11: ; preds = %7
%12 = load i8, i8* %9
%13 = sext i8 %12 to i32
%14 = icmp eq i32 %6, %13
br i1 %14, label %15, label %7
15: ; preds = %7, %11
%16 = phi i8* [ %9, %11 ], [ null, %7 ]
ret i8* %16
}
void Msp430TimerCapComP__5__Timer__overflow(void) {}


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

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

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

LLVM IR (-O2):
define void @Msp430TimerCapComP__5__Timer__overflow() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ strlen(char const *);
int /*<<< orphan*/ write(int, char const *, int /*<<< orphan*/);
void writes(int fd, const char *s) { write(fd, s, strlen(s)); }


x86 assembly (clang, -O0):
<writes>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x4(%rbp),%eax
mov    %eax,-0x1c(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x10(%rbp),%rdi
call   1040 <strlen@plt>
mov    -0x1c(%rbp),%edi
mov    -0x18(%rbp),%rsi
mov    %eax,%edx
call   1030 <write@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<writes>:
push   %rbp
push   %rbx
push   %rax
mov    %rsi,%rbx
mov    %edi,%ebp
mov    %rsi,%rdi
call   1040 <strlen@plt>
mov    %ebp,%edi
mov    %rbx,%rsi
mov    %eax,%edx
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    1030 <write@plt>

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

LLVM IR (-O2):
define void @writes(i32 %0, i8* %1) {
%3 = tail call i32 @strlen(i8* %1)
%4 = tail call i32 @write(i32 %0, i8* %1, i32 %3)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ log_errlogf(int /*<<< orphan*/, char *);
void usage() { log_errlogf(0, "usage: cnsc [-ahmv]\n"); }


x86 assembly (clang, -O0):
<usage>:
push   %rbp
mov    %rsp,%rbp
xor    %edi,%edi
lea    0xee3(%rip),%rsi
call   1030 <log_errlogf@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<usage>:
lea    0xee9(%rip),%rsi
xor    %edi,%edi
jmp    1030 <log_errlogf@plt>

LLVM IR (-O0):
@.str = [21 x i8] c"usage: cnsc [-ahmv]\0A\00"
define void @usage() {
%1 = call i32 @log_errlogf(i32 0, i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [21 x i8] c"usage: cnsc [-ahmv]\0A\00"
define void @usage() {
%1 = tail call i32 @log_errlogf(i32 0, i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str, i64 0, i64 0))
ret void
}
int main() { return 55; }


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

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

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

LLVM IR (-O2):
define i32 @main() {
ret i32 55
}
/* Variables and functions */
int __ESBMC_isnormal(double);
int isnormal(double d) { return __ESBMC_isnormal(d); }


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

x86 assembly (clang, -O2):
<isnormal>:
jmp    1030 <__ESBMC_isnormal@plt>

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

LLVM IR (-O2):
define i32 @isnormal(double %0) {
%2 = tail call i32 @__ESBMC_isnormal(double %0)
ret i32 %2
}
/* Variables and functions */
int /*<<< orphan*/ ENOMEM;
int /*<<< orphan*/ errno;
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ perror(int /*<<< orphan*/);
void memory_error(void) {
  errno = ENOMEM;
  perror(0);
  exit(1);
}


x86 assembly (clang, -O0):
<memory_error>:
push   %rbp
mov    %rsp,%rbp
mov    0x2eb5(%rip),%rax
mov    (%rax),%ecx
mov    0x2ea4(%rip),%rax
mov    %ecx,(%rax)
xor    %edi,%edi
call   1030 <perror@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<memory_error>:
push   %rax
mov    0x2eb8(%rip),%rax
mov    (%rax),%eax
mov    0x2ea7(%rip),%rcx
mov    %eax,(%rcx)
xor    %edi,%edi
call   1030 <perror@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@ENOMEM = global i32 0
@errno = global i32 0
define void @memory_error() {
%1 = load i32, i32* @ENOMEM
store i32 %1, i32* @errno
%2 = call i32 @perror(i32 0)
%3 = call i32 @exit(i32 1)
unreachable
}

LLVM IR (-O2):
@ENOMEM = global i32 0
@errno = global i32 0
define void @memory_error() {
%1 = load i32, i32* @ENOMEM
store i32 %1, i32* @errno
%2 = tail call i32 @perror(i32 0)
%3 = tail call i32 @exit(i32 1)
unreachable
}
/* Type definitions */
struct t_config_option {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ config_file_option_free(struct t_config_option *, int);
void plugin_api_config_file_option_free(struct t_config_option *option) {
  config_file_option_free(option, 1);
}


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

x86 assembly (clang, -O2):
<plugin_api_config_file_option_free>:
mov    $0x1,%esi
jmp    1030 <config_file_option_free@plt>

LLVM IR (-O0):
%struct.t_config_option = type { i32 }
define void @plugin_api_config_file_option_free(%struct.t_config_option* %0) {
%2 = alloca %struct.t_config_option*
store %struct.t_config_option* %0, %struct.t_config_option** %2
%3 = load %struct.t_config_option*, %struct.t_config_option** %2
%4 = call i32 @config_file_option_free(%struct.t_config_option* %3, i32 1)
ret void
}

LLVM IR (-O2):
%struct.t_config_option = type { i32 }
define void @plugin_api_config_file_option_free(%struct.t_config_option* %0) {
%2 = tail call i32 @config_file_option_free(%struct.t_config_option* %0, i32 1)
ret void
}
void interrupt_debug(void) {
  while (1) {
  }
}


x86 assembly (clang, -O0):
<interrupt_debug>:
push   %rbp
mov    %rsp,%rbp
jmp    1109 <interrupt_debug+0x9>
jmp    1109 <interrupt_debug+0x9>

x86 assembly (clang, -O2):
<interrupt_debug>:
jmp    1100 <interrupt_debug>

LLVM IR (-O0):
define void @interrupt_debug() {
br label %1
1: ; preds = %0, %1
br label %1
}

LLVM IR (-O2):
define void @interrupt_debug() {
br label %1
1: ; preds = %0, %1
br label %1
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ putc(int, int /*<<< orphan*/ *);
void putshort(FILE *file, int sval) {
  putc((sval >> 8) & 0xff, file);
  putc(sval & 0xff, file);
}


x86 assembly (clang, -O0):
<putshort>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0xc(%rbp),%edi
sar    $0x8,%edi
and    $0xff,%edi
mov    -0x8(%rbp),%rsi
call   1030 <putc@plt>
mov    -0xc(%rbp),%edi
and    $0xff,%edi
mov    -0x8(%rbp),%rsi
call   1030 <putc@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<putshort>:
push   %r14
push   %rbx
push   %rax
mov    %esi,%ebx
mov    %rdi,%r14
movzbl %bh,%edi
mov    %r14,%rsi
call   1030 <putc@plt>
movzbl %bl,%edi
mov    %r14,%rsi
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1030 <putc@plt>

LLVM IR (-O0):
define void @putshort(i32* %0, i32 %1) {
%3 = alloca i32*
%4 = alloca i32
store i32* %0, i32** %3
store i32 %1, i32* %4
%5 = load i32, i32* %4
%6 = ashr i32 %5, 8
%7 = and i32 %6, 255
%8 = load i32*, i32** %3
%9 = call i32 @putc(i32 %7, i32* %8)
%10 = load i32, i32* %4
%11 = and i32 %10, 255
%12 = load i32*, i32** %3
%13 = call i32 @putc(i32 %11, i32* %12)
ret void
}

LLVM IR (-O2):
define void @putshort(i32* nocapture %0, i32 %1) {
%3 = lshr i32 %1, 8
%4 = and i32 %3, 255
%5 = tail call i32 @putc(i32 %4, i32* %0)
%6 = and i32 %1, 255
%7 = tail call i32 @putc(i32 %6, i32* %0)
ret void
}
short str2short(char *str) { return (str[0] | str[1] << 8); }


x86 assembly (clang, -O0):
<str2short>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movsbl (%rax),%eax
mov    -0x8(%rbp),%rcx
movsbl 0x1(%rcx),%ecx
shl    $0x8,%ecx
or     %ecx,%eax
cwtl
pop    %rbp
ret

x86 assembly (clang, -O2):
<str2short>:
movsbl (%rdi),%ecx
movzbl 0x1(%rdi),%eax
shl    $0x8,%eax
or     %ecx,%eax
ret

LLVM IR (-O0):
define signext i16 @str2short(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = getelementptr inbounds i8, i8* %3, i64 0
%5 = load i8, i8* %4
%6 = sext i8 %5 to i32
%7 = load i8*, i8** %2
%8 = getelementptr inbounds i8, i8* %7, i64 1
%9 = load i8, i8* %8
%10 = sext i8 %9 to i32
%11 = shl i32 %10, 8
%12 = or i32 %6, %11
%13 = trunc i32 %12 to i16
ret i16 %13
}

LLVM IR (-O2):
define signext i16 @str2short(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = sext i8 %2 to i16
%4 = getelementptr inbounds i8, i8* %0, i64 1
%5 = load i8, i8* %4
%6 = zext i8 %5 to i16
%7 = shl nuw i16 %6, 8
%8 = or i16 %7, %3
ret i16 %8
}
/* Variables and functions */
int /*<<< orphan*/ free(void *);
void PFC_free(void *ptr) { free(ptr); }


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

x86 assembly (clang, -O2):
<PFC_free>:
jmp    1030 <free@plt>

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

LLVM IR (-O2):
define void @PFC_free(i8* nocapture %0) {
%2 = tail call i32 @free(i8* %0)
ret void
}
/* Type definitions */
struct stat {
  int /*<<< orphan*/ st_mode;
};

/* Variables and functions */
int /*<<< orphan*/ S_ISDIR(int /*<<< orphan*/);
scalar_t__ stat(char const *, struct stat *);
int pjf_isdir(const char *path) {
  struct stat dirstat;
  if (stat(path, &dirstat))
    return -1;
  if (!S_ISDIR(dirstat.st_mode))
    return -2;
  return 1;
}


x86 assembly (clang, -O0):
<pjf_isdir>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
lea    -0x18(%rbp),%rsi
call   1040 <stat@plt>
cmp    $0x0,%rax
je     114f <pjf_isdir+0x2f>
movl   $0xffffffff,-0x4(%rbp)
jmp    1173 <pjf_isdir+0x53>
mov    -0x18(%rbp),%edi
call   1030 <S_ISDIR@plt>
cmp    $0x0,%eax
jne    116c <pjf_isdir+0x4c>
movl   $0xfffffffe,-0x4(%rbp)
jmp    1173 <pjf_isdir+0x53>
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<pjf_isdir>:
push   %rax
mov    %rsp,%rsi
call   1040 <stat@plt>
mov    %rax,%rcx
mov    $0xffffffff,%eax
test   %rcx,%rcx
je     1138 <pjf_isdir+0x18>
pop    %rcx
ret
mov    (%rsp),%edi
call   1030 <S_ISDIR@plt>
xor    %ecx,%ecx
test   %eax,%eax
setne  %cl
lea    (%rcx,%rcx,2),%eax
add    $0xfffffffe,%eax
pop    %rcx
ret

LLVM IR (-O0):
%struct.stat = type { i32 }
define i32 @pjf_isdir(i8* %0) {
%2 = alloca i32
%3 = alloca i8*
%4 = alloca %struct.stat
store i8* %0, i8** %3
%5 = load i8*, i8** %3
%6 = call i64 @stat(i8* %5, %struct.stat* %4)
%7 = icmp ne i64 %6, 0
br i1 %7, label %8, label %9
8: ; preds = %1
store i32 -1, i32* %2
br label %16
9: ; preds = %1
%10 = getelementptr inbounds %struct.stat, %struct.stat* %4, i32 0, i32 0
%11 = load i32, i32* %10
%12 = call i32 @S_ISDIR(i32 %11)
%13 = icmp ne i32 %12, 0
br i1 %13, label %15, label %14
14: ; preds = %9
store i32 -2, i32* %2
br label %16
15: ; preds = %9
store i32 1, i32* %2
br label %16
16: ; preds = %15, %14, %8
%17 = load i32, i32* %2
ret i32 %17
}

LLVM IR (-O2):
%struct.stat = type { i32 }
define i32 @pjf_isdir(i8* %0) {
%2 = alloca %struct.stat
%3 = bitcast %struct.stat* %2 to i8*
%4 = call i64 @stat(i8* %0, %struct.stat* %2)
%5 = icmp eq i64 %4, 0
br i1 %5, label %6, label %12
6: ; preds = %1
%7 = getelementptr inbounds %struct.stat, %struct.stat* %2, i64 0, i32 0
%8 = load i32, i32* %7
%9 = call i32 @S_ISDIR(i32 %8)
%10 = icmp eq i32 %9, 0
%11 = select i1 %10, i32 -2, i32 1
br label %12
12: ; preds = %6, %1
%13 = phi i32 [ -1, %1 ], [ %11, %6 ]
ret i32 %13
}
int is_ws(char c) {
  if (c == ' ' || c == '\t' || c == '\n') {
    return 1;
  } else {
    return 0;
  }
}


x86 assembly (clang, -O0):
<is_ws>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x5(%rbp)
movsbl -0x5(%rbp),%eax
cmp    $0x20,%eax
je     1131 <is_ws+0x31>
movsbl -0x5(%rbp),%eax
cmp    $0x9,%eax
je     1131 <is_ws+0x31>
movsbl -0x5(%rbp),%eax
cmp    $0xa,%eax
jne    113d <is_ws+0x3d>
movl   $0x1,-0x4(%rbp)
jmp    1144 <is_ws+0x44>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<is_ws>:
cmp    $0x20,%dil
ja     1120 <is_ws+0x20>
mov    $0x1,%eax
movzbl %dil,%ecx
movabs $0x100000600,%rdx
bt     %rcx,%rdx
jae    1120 <is_ws+0x20>
ret
xor    %eax,%eax
ret

LLVM IR (-O0):
define i32 @is_ws(i8 signext %0) {
%2 = alloca i32
%3 = alloca i8
store i8 %0, i8* %3
%4 = load i8, i8* %3
%5 = sext i8 %4 to i32
%6 = icmp eq i32 %5, 32
br i1 %6, label %15, label %7
7: ; preds = %1
%8 = load i8, i8* %3
%9 = sext i8 %8 to i32
%10 = icmp eq i32 %9, 9
br i1 %10, label %15, label %11
11: ; preds = %7
%12 = load i8, i8* %3
%13 = sext i8 %12 to i32
%14 = icmp eq i32 %13, 10
br i1 %14, label %15, label %16
15: ; preds = %11, %7, %1
store i32 1, i32* %2
br label %17
16: ; preds = %11
store i32 0, i32* %2
br label %17
17: ; preds = %16, %15
%18 = load i32, i32* %2
ret i32 %18
}

LLVM IR (-O2):
define i32 @is_ws(i8 signext %0) {
switch i8 %0, label %2 [
i8 32, label %3
i8 10, label %3
i8 9, label %3
]
2: ; preds = %1
br label %3
3: ; preds = %1, %1, %1, %2
%4 = phi i32 [ 0, %2 ], [ 1, %1 ], [ 1, %1 ], [ 1, %1 ]
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ delay(int);
int /*<<< orphan*/ mbus_remote_register_write(int, int, int);
void pmu_reset_solar_short() {
  mbus_remote_register_write(0x6, 0x0E,
                             ((0 << 12) | (1 << 11) | (1 << 10) | (1 << 9) |
                              (0 << 8) | (3 << 4) | (0)));
  delay(100);
  mbus_remote_register_write(0x6, 0x0E,
                             ((0 << 12) | (1 << 11) | (1 << 10) | (0 << 9) |
                              (0 << 8) | (3 << 4) | (0)));
  delay(100);
}


x86 assembly (clang, -O0):
<pmu_reset_solar_short>:
push   %rbp
mov    %rsp,%rbp
mov    $0x6,%edi
mov    $0xe,%esi
mov    $0xe30,%edx
call   1040 <mbus_remote_register_write@plt>
mov    $0x64,%edi
call   1030 <delay@plt>
mov    $0x6,%edi
mov    $0xe,%esi
mov    $0xc30,%edx
call   1040 <mbus_remote_register_write@plt>
mov    $0x64,%edi
call   1030 <delay@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<pmu_reset_solar_short>:
push   %rax
mov    $0x6,%edi
mov    $0xe,%esi
mov    $0xe30,%edx
call   1040 <mbus_remote_register_write@plt>
mov    $0x64,%edi
call   1030 <delay@plt>
mov    $0x6,%edi
mov    $0xe,%esi
mov    $0xc30,%edx
call   1040 <mbus_remote_register_write@plt>
mov    $0x64,%edi
pop    %rax
jmp    1030 <delay@plt>

LLVM IR (-O0):
define void @pmu_reset_solar_short() {
%1 = call i32 @mbus_remote_register_write(i32 6, i32 14, i32 3632)
%2 = call i32 @delay(i32 100)
%3 = call i32 @mbus_remote_register_write(i32 6, i32 14, i32 3120)
%4 = call i32 @delay(i32 100)
ret void
}

LLVM IR (-O2):
define void @pmu_reset_solar_short() {
%1 = tail call i32 @mbus_remote_register_write(i32 6, i32 14, i32 3632)
%2 = tail call i32 @delay(i32 100)
%3 = tail call i32 @mbus_remote_register_write(i32 6, i32 14, i32 3120)
%4 = tail call i32 @delay(i32 100)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ buffer;
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ fread(char *, int, int, int /*<<< orphan*/ *);
int /*<<< orphan*/ pclose(int /*<<< orphan*/ *);
int /*<<< orphan*/ *popen(char *, char *);
int /*<<< orphan*/ printf(char *, char *);
int main() {
  FILE *pf;
  char buffer[4096];
  pf = popen("gradle -version", "r");
  fread(buffer, sizeof(buffer), 1, pf);
  printf("%s\n", buffer);
  pclose(pf);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x1010,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xea7(%rip),%rdi
lea    0xeb0(%rip),%rsi
call   1060 <popen@plt>
mov    %rax,-0x10(%rbp)
lea    -0x1010(%rbp),%rdi
mov    -0x10(%rbp),%rcx
mov    $0x1000,%esi
mov    $0x1,%edx
call   1030 <fread@plt>
lea    -0x1010(%rbp),%rsi
lea    0xe81(%rip),%rdi
call   1040 <printf@plt>
mov    -0x10(%rbp),%rdi
call   1050 <pclose@plt>
xor    %eax,%eax
add    $0x1010,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r14
push   %rbx
sub    $0x1008,%rsp
lea    0xeaf(%rip),%rdi
lea    0xeb8(%rip),%rsi
call   1060 <popen@plt>
mov    %rax,%rbx
mov    %rsp,%r14
mov    %r14,%rdi
mov    $0x1000,%esi
mov    $0x1,%edx
mov    %rax,%rcx
call   1030 <fread@plt>
lea    0xe93(%rip),%rdi
mov    %r14,%rsi
call   1040 <printf@plt>
mov    %rbx,%rdi
call   1050 <pclose@plt>
xor    %eax,%eax
add    $0x1008,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@.str = [16 x i8] c"gradle -version\00"
@.str.1 = [2 x i8] c"r\00"
@.str.2 = [4 x i8] c"%s\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32*
%3 = alloca [4096 x i8]
store i32 0, i32* %1
%4 = call i32* @popen(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
store i32* %4, i32** %2
%5 = getelementptr inbounds [4096 x i8], [4096 x i8]* %3, i64 0, i64 0
%6 = load i32*, i32** %2
%7 = call i32 @fread(i8* %5, i32 4096, i32 1, i32* %6)
%8 = getelementptr inbounds [4096 x i8], [4096 x i8]* %3, i64 0, i64 0
%9 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0), i8* %8)
%10 = load i32*, i32** %2
%11 = call i32 @pclose(i32* %10)
ret i32 0
}

LLVM IR (-O2):
@.str = [16 x i8] c"gradle -version\00"
@.str.1 = [2 x i8] c"r\00"
@.str.2 = [4 x i8] c"%s\0A\00"
define i32 @main() {
%1 = alloca [4096 x i8]
%2 = getelementptr inbounds [4096 x i8], [4096 x i8]* %1, i64 0, i64 0
%3 = tail call i32* @popen(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
%4 = call i32 @fread(i8* %2, i32 4096, i32 1, i32* %3)
%5 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0), i8* %2)
%6 = call i32 @pclose(i32* %3)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ strerror(int);
void uninitvar_strerror(void) {
  int i;
  (void)strerror(i);
}


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

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

LLVM IR (-O0):
define void @uninitvar_strerror() {
%1 = alloca i32
%2 = load i32, i32* %1
%3 = call i32 @strerror(i32 %2)
ret void
}

LLVM IR (-O2):
define void @uninitvar_strerror() {
%1 = tail call i32 @strerror(i32 undef)
ret void
}
int utmpname(const char *file) { return -1; }


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

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

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

LLVM IR (-O2):
define i32 @utmpname(i8* nocapture readnone %0) {
ret i32 -1
}
int test_imm_8Fint8_mem(signed char *val) {
  return ((*val) & (0x8F << 0)) ? -20 : -40;
}


x86 assembly (clang, -O0):
<test_imm_8Fint8_mem>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movsbl (%rax),%edx
and    $0x8f,%edx
mov    $0xffffffd8,%eax
mov    $0xffffffec,%ecx
cmp    $0x0,%edx
cmovne %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_imm_8Fint8_mem>:
testb  $0x8f,(%rdi)
mov    $0xffffffd8,%ecx
mov    $0xffffffec,%eax
cmove  %ecx,%eax
ret

LLVM IR (-O0):
define i32 @test_imm_8Fint8_mem(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = load i8, i8* %3
%5 = sext i8 %4 to i32
%6 = and i32 %5, 143
%7 = icmp ne i32 %6, 0
%8 = zext i1 %7 to i64
%9 = select i1 %7, i32 -20, i32 -40
ret i32 %9
}

LLVM IR (-O2):
define i32 @test_imm_8Fint8_mem(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = and i8 %2, -113
%4 = icmp eq i8 %3, 0
%5 = select i1 %4, i32 -40, i32 -20
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int, int);
int /*<<< orphan*/ scanf(char *, int *);
int main() {
  int numero, anterior, sucessor;
  scanf("%d", &numero);
  anterior = numero - 1;
  sucessor = numero + 1;
  printf("%d %d\n", anterior, sucessor);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeca(%rip),%rdi
lea    -0x8(%rbp),%rsi
call   1040 <scanf@plt>
mov    -0x8(%rbp),%eax
sub    $0x1,%eax
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
mov    -0xc(%rbp),%esi
mov    -0x10(%rbp),%edx
lea    0xea5(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xed8(%rip),%rdi
lea    0x4(%rsp),%rsi
call   1040 <scanf@plt>
mov    0x4(%rsp),%edx
lea    -0x1(%rdx),%esi
add    $0x1,%edx
lea    0xec0(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [3 x i8] c"%d\00"
@.str.1 = [7 x i8] c"%d %d\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
store i32 0, i32* %1
%5 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %2)
%6 = load i32, i32* %2
%7 = sub nsw i32 %6, 1
store i32 %7, i32* %3
%8 = load i32, i32* %2
%9 = add nsw i32 %8, 1
store i32 %9, i32* %4
%10 = load i32, i32* %3
%11 = load i32, i32* %4
%12 = call i32 @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0), i32 %10, i32 %11)
ret i32 0
}

LLVM IR (-O2):
@.str = [3 x i8] c"%d\00"
@.str.1 = [7 x i8] c"%d %d\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
%3 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %1)
%4 = load i32, i32* %1
%5 = add nsw i32 %4, -1
%6 = add nsw i32 %4, 1
%7 = call i32 @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0), i32 %5, i32 %6)
ret i32 0
}
void use_buffer(char *buf) { buf[0] = '\0'; }


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

x86 assembly (clang, -O2):
<use_buffer>:
movb   $0x0,(%rdi)
ret

LLVM IR (-O0):
define void @use_buffer(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = getelementptr inbounds i8, i8* %3, i64 0
store i8 0, i8* %4
ret void
}

LLVM IR (-O2):
define void @use_buffer(i8* nocapture writeonly %0) {
store i8 0, i8* %0
ret void
}
__attribute__((always_)) void selinux_secmark_refcount_inc(void) { return; }


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

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

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

LLVM IR (-O2):
define void @selinux_secmark_refcount_inc() {
ret void
}
long lrint(double x) {
  long retval = 0L;
  __asm__ __volatile__("fistpl %0" : "=m"(retval) : "t"(x) : "st");
  return retval;
}


x86 assembly (clang, -O0):
<lrint>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
movq   $0x0,-0x10(%rbp)
movsd  -0x8(%rbp),%xmm0
movsd  %xmm0,-0x18(%rbp)
fldl   -0x18(%rbp)
fistpl -0x10(%rbp)
mov    -0x10(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<lrint>:
movq   $0x0,-0x10(%rsp)
movsd  %xmm0,-0x8(%rsp)
fldl   -0x8(%rsp)
fistpl -0x10(%rsp)
mov    -0x10(%rsp),%rax
ret

LLVM IR (-O0):
define i64 @lrint(double %0) {
%2 = alloca double
%3 = alloca i64
store double %0, double* %2
store i64 0, i64* %3
%4 = load double, double* %2
%5 = load i64, i64* %3
ret i64 %5
}

LLVM IR (-O2):
define i64 @lrint(double %0) {
%2 = alloca i64
%3 = bitcast i64* %2 to i8*
store i64 0, i64* %2
%4 = load i64, i64* %2
ret i64 %4
}
/* Type definitions */
typedef int /*<<< orphan*/ uint8_t;
typedef int /*<<< orphan*/ uint32_t;

/* Variables and functions */
int /*<<< orphan*/ be32enc(int /*<<< orphan*/ *, int /*<<< orphan*/ const);
void be32enc_vect(uint8_t *dst, const uint32_t *src, size_t len) {
  size_t i;
  for (i = 0; i < len / 4; i++) {
    be32enc(dst + i * 4, src[i]);
  }
}


x86 assembly (clang, -O0):
<be32enc_vect>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
movq   $0x0,-0x20(%rbp)
mov    -0x20(%rbp),%rax
mov    -0x18(%rbp),%rcx
shr    $0x2,%rcx
cmp    %rcx,%rax
jae    1175 <be32enc_vect+0x65>
mov    -0x8(%rbp),%rdi
mov    -0x20(%rbp),%rax
shl    $0x2,%rax
shl    $0x2,%rax
add    %rax,%rdi
mov    -0x10(%rbp),%rax
mov    -0x20(%rbp),%rcx
mov    (%rax,%rcx,4),%esi
call   1030 <be32enc@plt>
mov    -0x20(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x20(%rbp)
jmp    112c <be32enc_vect+0x1c>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<be32enc_vect>:
push   %r15
push   %r14
push   %r12
push   %rbx
push   %rax
cmp    $0x4,%rdx
jb     1149 <be32enc_vect+0x39>
mov    %rdx,%r15
mov    %rsi,%r14
mov    %rdi,%r12
shr    $0x2,%r15
xor    %ebx,%ebx
nopl   (%rax)
mov    (%r14,%rbx,4),%esi
mov    %r12,%rdi
call   1030 <be32enc@plt>
add    $0x1,%rbx
add    $0x10,%r12
cmp    %rbx,%r15
jne    1130 <be32enc_vect+0x20>
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
ret

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

LLVM IR (-O2):
define void @be32enc_vect(i32* %0, i32* nocapture %1, i64 %2) {
%4 = icmp ult i64 %2, 4
br i1 %4, label %16, label %5
5: ; preds = %3
%6 = lshr i64 %2, 2
br label %7
7: ; preds = %5, %7
%8 = phi i64 [ %14, %7 ], [ 0, %5 ]
%9 = shl i64 %8, 2
%10 = getelementptr inbounds i32, i32* %0, i64 %9
%11 = getelementptr inbounds i32, i32* %1, i64 %8
%12 = load i32, i32* %11
%13 = tail call i32 @be32enc(i32* %10, i32 %12)
%14 = add nuw nsw i64 %8, 1
%15 = icmp eq i64 %14, %6
br i1 %15, label %16, label %7
16: ; preds = %7, %3
ret void
}
int _raise(int sig __attribute__((unused))) { return 1; }


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

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

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

LLVM IR (-O2):
define i32 @_raise(i32 %0) {
ret i32 1
}
/* Type definitions */
typedef int /*<<< orphan*/ off_t;

/* Variables and functions */
int /*<<< orphan*/ EBADF;
int /*<<< orphan*/ _stub(int /*<<< orphan*/);
scalar_t__ isatty(int);
off_t _lseek(int fd, off_t ptr, int dir) {
  if (isatty(fd))
    return 0;
  return _stub(EBADF);
}


x86 assembly (clang, -O0):
<_lseek>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    -0x8(%rbp),%edi
call   1030 <isatty@plt>
cmp    $0x0,%rax
je     114f <_lseek+0x2f>
movl   $0x0,-0x4(%rbp)
jmp    1160 <_lseek+0x40>
mov    0x2e8a(%rip),%rax
mov    (%rax),%edi
call   1040 <_stub@plt>
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<_lseek>:
push   %rax
call   1030 <isatty@plt>
test   %rax,%rax
je     112f <_lseek+0xf>
xor    %eax,%eax
pop    %rcx
ret
mov    0x2eaa(%rip),%rax
mov    (%rax),%edi
pop    %rax
jmp    1040 <_stub@plt>

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

LLVM IR (-O2):
@EBADF = global i32 0
define i32 @_lseek(i32 %0, i32 %1, i32 %2) {
%4 = tail call i64 @isatty(i32 %0)
%5 = icmp eq i64 %4, 0
br i1 %5, label %6, label %9
6: ; preds = %3
%7 = load i32, i32* @EBADF
%8 = tail call i32 @_stub(i32 %7)
br label %9
9: ; preds = %3, %6
%10 = phi i32 [ %8, %6 ], [ 0, %3 ]
ret i32 %10
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
void print_value(void) {
  extern int x;
  printf("%d\n", x);
}


x86 assembly (clang, -O0):
<print_value>:
push   %rbp
mov    %rsp,%rbp
mov    0x2ec5(%rip),%rax
mov    (%rax),%esi
lea    0xedc(%rip),%rdi
call   1030 <printf@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<print_value>:
mov    0x2ec9(%rip),%rax
mov    (%rax),%esi
lea    0xee0(%rip),%rdi
jmp    1030 <printf@plt>

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

LLVM IR (-O2):
@.str = [4 x i8] c"%d\0A\00"
@x = external global i32
define void @print_value() {
%1 = load i32, i32* @x
%2 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %1)
ret void
}
/* Variables and functions */
scalar_t__ rand();
void random_vector_double(double *a, const unsigned int n) {
  for (unsigned int i = 0; i < n; i++) {
    a[i] = (double)rand();
  }
}


x86 assembly (clang, -O0):
<random_vector_double>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
movl   $0x0,-0x10(%rbp)
mov    -0x10(%rbp),%eax
cmp    -0xc(%rbp),%eax
jae    1158 <random_vector_double+0x48>
mov    $0x0,%al
call   1030 <rand@plt>
cvtsi2sd %rax,%xmm0
mov    -0x8(%rbp),%rax
mov    -0x10(%rbp),%ecx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    1126 <random_vector_double+0x16>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<random_vector_double>:
push   %r15
push   %r14
push   %rbx
test   %esi,%esi
je     114e <random_vector_double+0x3e>
mov    %rdi,%r14
mov    %esi,%r15d
xor    %ebx,%ebx
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
xor    %eax,%eax
call   1030 <rand@plt>
xorps  %xmm0,%xmm0
cvtsi2sd %rax,%xmm0
movsd  %xmm0,(%r14,%rbx,8)
add    $0x1,%rbx
cmp    %rbx,%r15
jne    1130 <random_vector_double+0x20>
pop    %rbx
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
define void @random_vector_double(double* %0, i32 %1) {
%3 = alloca double*
%4 = alloca i32
%5 = alloca i32
store double* %0, double** %3
store i32 %1, i32* %4
store i32 0, i32* %5
br label %6
6: ; preds = %17, %2
%7 = load i32, i32* %5
%8 = load i32, i32* %4
%9 = icmp ult i32 %7, %8
br i1 %9, label %10, label %20
10: ; preds = %6
%11 = call i64 (...) @rand()
%12 = sitofp i64 %11 to double
%13 = load double*, double** %3
%14 = load i32, i32* %5
%15 = zext i32 %14 to i64
%16 = getelementptr inbounds double, double* %13, i64 %15
store double %12, double* %16
br label %17
17: ; preds = %10
%18 = load i32, i32* %5
%19 = add i32 %18, 1
store i32 %19, i32* %5
br label %6
20: ; preds = %6
ret void
}

LLVM IR (-O2):
define void @random_vector_double(double* nocapture writeonly %0, i32 %1) {
%3 = icmp eq i32 %1, 0
br i1 %3, label %6, label %4
4: ; preds = %2
%5 = zext i32 %1 to i64
br label %7
6: ; preds = %7, %2
ret void
7: ; preds = %4, %7
%8 = phi i64 [ 0, %4 ], [ %12, %7 ]
%9 = tail call i64 (...) @rand()
%10 = sitofp i64 %9 to double
%11 = getelementptr inbounds double, double* %0, i64 %8
store double %10, double* %11
%12 = add nuw nsw i64 %8, 1
%13 = icmp eq i64 %12, %5
br i1 %13, label %6, label %7
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, ...);
void traverse(int a[], int len) {
  int i;
  printf("\n");
  for (i = 0; i < len; i++) {
    printf("  %d", a[i]);
  }
}


x86 assembly (clang, -O0):
<traverse>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
lea    0xeda(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movl   $0x0,-0x10(%rbp)
mov    -0x10(%rbp),%eax
cmp    -0xc(%rbp),%eax
jge    1167 <traverse+0x57>
mov    -0x8(%rbp),%rax
movslq -0x10(%rbp),%rcx
mov    (%rax,%rcx,4),%esi
lea    0xeb0(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    1134 <traverse+0x24>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<traverse>:
push   %rbp
push   %r15
push   %r14
push   %rbx
push   %rax
mov    %esi,%ebp
mov    %rdi,%r15
mov    $0xa,%edi
call   1030 <putchar@plt>
test   %ebp,%ebp
jle    1167 <traverse+0x47>
mov    %ebp,%ebp
lea    0xebd(%rip),%r14
xor    %ebx,%ebx
cs nopw 0x0(%rax,%rax,1)
nop
mov    (%r15,%rbx,4),%esi
mov    %r14,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
add    $0x1,%rbx
cmp    %rbx,%rbp
jne    1150 <traverse+0x30>
add    $0x8,%rsp
pop    %rbx
pop    %r14
pop    %r15
pop    %rbp
ret

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

LLVM IR (-O2):
@.str.1 = [5 x i8] c" %d\00"
define void @traverse(i32* nocapture %0, i32 %1) {
%3 = tail call i32 @putchar(i32 10)
%4 = icmp sgt i32 %1, 0
br i1 %4, label %5, label %14
5: ; preds = %2
%6 = zext i32 %1 to i64
br label %7
7: ; preds = %5, %7
%8 = phi i64 [ 0, %5 ], [ %12, %7 ]
%9 = getelementptr inbounds i32, i32* %0, i64 %8
%10 = load i32, i32* %9
%11 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0), i32 %10)
%12 = add nuw nsw i64 %8, 1
%13 = icmp eq i64 %12, %6
br i1 %13, label %14, label %7
14: ; preds = %7, %2
ret void
}
/* Variables and functions */
int /*<<< orphan*/ free(char *);
int /*<<< orphan*/ remove(char *);
void remove_pid_file(char *pidfilename) {
  remove(pidfilename);
  free(pidfilename);
}


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

x86 assembly (clang, -O2):
<remove_pid_file>:
push   %rbx
mov    %rdi,%rbx
call   1040 <remove@plt>
mov    %rbx,%rdi
pop    %rbx
jmp    1030 <free@plt>

LLVM IR (-O0):
define void @remove_pid_file(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 @remove(i8* %3)
%5 = load i8*, i8** %2
%6 = call i32 @free(i8* %5)
ret void
}

LLVM IR (-O2):
define void @remove_pid_file(i8* nocapture %0) {
%2 = tail call i32 @remove(i8* %0)
%3 = tail call i32 @free(i8* %0)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ time_t;
struct tm {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ localtime_r(int /*<<< orphan*/ *, struct tm *);
int /*<<< orphan*/ strftime(char *, int, char *, struct tm *);
int /*<<< orphan*/ time(int /*<<< orphan*/ *);
char *b_strftime(char *buf) {
  time_t now = time(NULL);
  struct tm tm;
  localtime_r(&now, &tm);
  strftime(buf, 20, "%Y-%m-%d %H:%M:%S", &tm);
  return buf;
}


x86 assembly (clang, -O0):
<b_strftime>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
xor    %eax,%eax
mov    %eax,%edi
call   1040 <time@plt>
mov    %eax,-0xc(%rbp)
lea    -0xc(%rbp),%rdi
lea    -0x10(%rbp),%rsi
call   1030 <localtime_r@plt>
mov    -0x8(%rbp),%rdi
mov    $0x14,%esi
lea    0xe9b(%rip),%rdx
lea    -0x10(%rbp),%rcx
call   1050 <strftime@plt>
mov    -0x8(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<b_strftime>:
push   %r14
push   %rbx
sub    $0x18,%rsp
mov    %rdi,%rbx
xor    %edi,%edi
call   1040 <time@plt>
mov    %eax,0xc(%rsp)
lea    0xc(%rsp),%rdi
lea    0x10(%rsp),%r14
mov    %r14,%rsi
call   1030 <localtime_r@plt>
lea    0xea2(%rip),%rdx
mov    %rbx,%rdi
mov    $0x14,%esi
mov    %r14,%rcx
call   1050 <strftime@plt>
mov    %rbx,%rax
add    $0x18,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
%struct.tm = type { i32 }
@.str = [18 x i8] c"%Y-%m-%d %H:%M:%S\00"
define i8* @b_strftime(i8* %0) {
%2 = alloca i8*
%3 = alloca i32
%4 = alloca %struct.tm
store i8* %0, i8** %2
%5 = call i32 @time(i32* null)
store i32 %5, i32* %3
%6 = call i32 @localtime_r(i32* %3, %struct.tm* %4)
%7 = load i8*, i8** %2
%8 = call i32 @strftime(i8* %7, i32 20, i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0), %struct.tm* %4)
%9 = load i8*, i8** %2
ret i8* %9
}

LLVM IR (-O2):
%struct.tm = type { i32 }
@.str = [18 x i8] c"%Y-%m-%d %H:%M:%S\00"
define i8* @b_strftime(i8* returned %0) {
%2 = alloca i32
%3 = alloca %struct.tm
%4 = bitcast i32* %2 to i8*
%5 = tail call i32 @time(i32* null)
store i32 %5, i32* %2
%6 = bitcast %struct.tm* %3 to i8*
%7 = call i32 @localtime_r(i32* %2, %struct.tm* %3)
%8 = call i32 @strftime(i8* %0, i32 20, i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0), %struct.tm* %3)
ret i8* %0
}
void ARGBToUV444Row_NEON() {}


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

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

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

LLVM IR (-O2):
define void @ARGBToUV444Row_NEON() {
ret void
}
/* Variables and functions */
bool nrf52_errata_141(void) { return false; }


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

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

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

LLVM IR (-O2):
define i32 @nrf52_errata_141() {
ret i32 0
}
/* Type definitions */
typedef int uint8_t;
typedef int const uint32_t;

/* Variables and functions */
uint32_t rol(uint32_t x, const uint8_t n) { return (x << n) | (x >> (32 - n)); }


x86 assembly (clang, -O0):
<rol>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
mov    -0x8(%rbp),%ecx
shl    %cl,%eax
mov    -0x4(%rbp),%edx
mov    $0x20,%ecx
sub    -0x8(%rbp),%ecx
sar    %cl,%edx
mov    %edx,%ecx
or     %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<rol>:
mov    %esi,%ecx
mov    %edi,%eax
shl    %cl,%eax
neg    %cl
sar    %cl,%edi
or     %edi,%eax
ret

LLVM IR (-O0):
define i32 @rol(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 = shl i32 %5, %6
%8 = load i32, i32* %3
%9 = load i32, i32* %4
%10 = sub nsw i32 32, %9
%11 = ashr i32 %8, %10
%12 = or i32 %7, %11
ret i32 %12
}

LLVM IR (-O2):
define i32 @rol(i32 %0, i32 %1) {
%3 = shl i32 %0, %1
%4 = sub nsw i32 32, %1
%5 = ashr i32 %0, %4
%6 = or i32 %5, %3
ret i32 %6
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void EL(void) { printf("\x1B[K"); }


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

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

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

LLVM IR (-O2):
@.str = [4 x i8] c"\1B[K\00"
define void @EL() {
%1 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0))
ret void
}
/* Type definitions */
struct device {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ memset(char *, int /*<<< orphan*/, int);
void rk29_sdmmc_board_setpower(struct device *dev,
                               char *regulator_supply_name) {
  memset(regulator_supply_name, 0, 4);
}


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

x86 assembly (clang, -O2):
<rk29_sdmmc_board_setpower>:
mov    %rsi,%rdi
xor    %esi,%esi
mov    $0x4,%edx
jmp    1030 <memset@plt>

LLVM IR (-O0):
%struct.device = type { i32 }
define void @rk29_sdmmc_board_setpower(%struct.device* %0, i8* %1) {
%3 = alloca %struct.device*
%4 = alloca i8*
store %struct.device* %0, %struct.device** %3
store i8* %1, i8** %4
%5 = load i8*, i8** %4
%6 = call i32 @memset(i8* %5, i32 0, i32 4)
ret void
}

LLVM IR (-O2):
%struct.device = type { i32 }
define void @rk29_sdmmc_board_setpower(%struct.device* nocapture readnone %0, i8* %1) {
%3 = tail call i32 @memset(i8* %1, i32 0, i32 4)
ret void
}