xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ _SC_PAGESIZE;
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
int /*<<< orphan*/ stderr;
long sysconf(int /*<<< orphan*/);
int get_pagesize() {
  long pagesize;
  if ((pagesize = sysconf(_SC_PAGESIZE)) == -1) {
    fprintf(stderr, "Unable to get page size");
    return -11;
  }
  return pagesize;
}


x86 assembly (clang, -O0):
<get_pagesize>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    0x2eb9(%rip),%rax
mov    (%rax),%edi
call   1040 <sysconf@plt>
mov    %rax,-0x10(%rbp)
cmp    $0xffffffffffffffff,%rax
jne    1165 <get_pagesize+0x45>
mov    0x2e8d(%rip),%rax
mov    (%rax),%edi
lea    0xeac(%rip),%rsi
call   1030 <fprintf@plt>
movl   $0xfffffff5,-0x4(%rbp)
jmp    116c <get_pagesize+0x4c>
mov    -0x10(%rbp),%rax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_pagesize>:
push   %rax
mov    0x2ec0(%rip),%rax
mov    (%rax),%edi
call   1040 <sysconf@plt>
cmp    $0xffffffffffffffff,%rax
je     1137 <get_pagesize+0x17>
pop    %rcx
ret
mov    0x2e9a(%rip),%rax
mov    (%rax),%edi
lea    0xeb9(%rip),%rsi
call   1030 <fprintf@plt>
mov    $0xfffffff5,%eax
pop    %rcx
ret

LLVM IR (-O0):
@_SC_PAGESIZE = global i32 0
@stderr = global i32 0
@.str = [24 x i8] c"Unable to get page size\00"
define i32 @get_pagesize() {
%1 = alloca i32
%2 = alloca i64
%3 = load i32, i32* @_SC_PAGESIZE
%4 = call i64 @sysconf(i32 %3)
store i64 %4, i64* %2
%5 = icmp eq i64 %4, -1
br i1 %5, label %6, label %9
6: ; preds = %0
%7 = load i32, i32* @stderr
%8 = call i32 @fprintf(i32 %7, i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str, i64 0, i64 0))
store i32 -11, i32* %1
br label %12
9: ; preds = %0
%10 = load i64, i64* %2
%11 = trunc i64 %10 to i32
store i32 %11, i32* %1
br label %12
12: ; preds = %9, %6
%13 = load i32, i32* %1
ret i32 %13
}

LLVM IR (-O2):
@_SC_PAGESIZE = global i32 0
@stderr = global i32 0
@.str = [24 x i8] c"Unable to get page size\00"
define i32 @get_pagesize() {
%1 = load i32, i32* @_SC_PAGESIZE
%2 = tail call i64 @sysconf(i32 %1)
%3 = icmp eq i64 %2, -1
br i1 %3, label %4, label %7
4: ; preds = %0
%5 = load i32, i32* @stderr
%6 = tail call i32 @fprintf(i32 %5, i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str, i64 0, i64 0))
br label %9
7: ; preds = %0
%8 = trunc i64 %2 to i32
br label %9
9: ; preds = %7, %4
%10 = phi i32 [ -11, %4 ], [ %8, %7 ]
ret i32 %10
}
/* Variables and functions */
int /*<<< orphan*/ rename(char const *, char *);
int /*<<< orphan*/ strcat(char *, char *);
int /*<<< orphan*/ strcpy(char *, char const *);
void backup(const char *filename) {
  char new_filename[64];
  strcpy(new_filename, filename);
  strcat(new_filename, ".backup");
  rename(filename, new_filename);
}


x86 assembly (clang, -O0):
<backup>:
push   %rbp
mov    %rsp,%rbp
sub    $0x50,%rsp
mov    %rdi,-0x8(%rbp)
lea    -0x50(%rbp),%rdi
mov    -0x8(%rbp),%rsi
call   1030 <strcpy@plt>
lea    -0x50(%rbp),%rdi
lea    0xeac(%rip),%rsi
call   1050 <strcat@plt>
mov    -0x8(%rbp),%rdi
lea    -0x50(%rbp),%rsi
call   1040 <rename@plt>
add    $0x50,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<backup>:
push   %r14
push   %rbx
sub    $0x48,%rsp
mov    %rdi,%rbx
mov    %rsp,%r14
mov    %r14,%rdi
mov    %rbx,%rsi
call   1030 <strcpy@plt>
lea    0xeb1(%rip),%rsi
mov    %r14,%rdi
call   1050 <strcat@plt>
mov    %rbx,%rdi
mov    %r14,%rsi
call   1040 <rename@plt>
add    $0x48,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@.str = [8 x i8] c".backup\00"
define void @backup(i8* %0) {
%2 = alloca i8*
%3 = alloca [64 x i8]
store i8* %0, i8** %2
%4 = getelementptr inbounds [64 x i8], [64 x i8]* %3, i64 0, i64 0
%5 = load i8*, i8** %2
%6 = call i32 @strcpy(i8* %4, i8* %5)
%7 = getelementptr inbounds [64 x i8], [64 x i8]* %3, i64 0, i64 0
%8 = call i32 @strcat(i8* %7, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0))
%9 = load i8*, i8** %2
%10 = getelementptr inbounds [64 x i8], [64 x i8]* %3, i64 0, i64 0
%11 = call i32 @rename(i8* %9, i8* %10)
ret void
}

LLVM IR (-O2):
@.str = [8 x i8] c".backup\00"
define void @backup(i8* %0) {
%2 = alloca [64 x i8]
%3 = getelementptr inbounds [64 x i8], [64 x i8]* %2, i64 0, i64 0
%4 = call i32 @strcpy(i8* %3, i8* %0)
%5 = call i32 @strcat(i8* %3, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0))
%6 = call i32 @rename(i8* %0, i8* %3)
ret void
}
/* Type definitions */
struct MCTStatStruc {
  int dummy;
};
struct DCTStatStruc {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ mct_ClrWbEnhWsbDis_D(struct MCTStatStruc *,
                                        struct DCTStatStruc *);
int /*<<< orphan*/ print_t(char *);
void mct_FinalMCT_D(struct MCTStatStruc *pMCTstat,
                    struct DCTStatStruc *pDCTstat) {
  print_t("\tmct_FinalMCT_D: Clr Cl, Wb\n");
  mct_ClrWbEnhWsbDis_D(pMCTstat, pDCTstat);
}


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

x86 assembly (clang, -O2):
<mct_FinalMCT_D>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%r14
mov    %rdi,%rbx
lea    0xecf(%rip),%rdi
call   1040 <print_t@plt>
mov    %rbx,%rdi
mov    %r14,%rsi
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1030 <mct_ClrWbEnhWsbDis_D@plt>

LLVM IR (-O0):
%struct.MCTStatStruc = type { i32 }
%struct.DCTStatStruc = type { i32 }
@.str = [29 x i8] c"\09mct_FinalMCT_D: Clr Cl, Wb\0A\00"
define void @mct_FinalMCT_D(%struct.MCTStatStruc* %0, %struct.DCTStatStruc* %1) {
%3 = alloca %struct.MCTStatStruc*
%4 = alloca %struct.DCTStatStruc*
store %struct.MCTStatStruc* %0, %struct.MCTStatStruc** %3
store %struct.DCTStatStruc* %1, %struct.DCTStatStruc** %4
%5 = call i32 @print_t(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str, i64 0, i64 0))
%6 = load %struct.MCTStatStruc*, %struct.MCTStatStruc** %3
%7 = load %struct.DCTStatStruc*, %struct.DCTStatStruc** %4
%8 = call i32 @mct_ClrWbEnhWsbDis_D(%struct.MCTStatStruc* %6, %struct.DCTStatStruc* %7)
ret void
}

LLVM IR (-O2):
%struct.MCTStatStruc = type { i32 }
%struct.DCTStatStruc = type { i32 }
@.str = [29 x i8] c"\09mct_FinalMCT_D: Clr Cl, Wb\0A\00"
define void @mct_FinalMCT_D(%struct.MCTStatStruc* %0, %struct.DCTStatStruc* %1) {
%3 = tail call i32 @print_t(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str, i64 0, i64 0))
%4 = tail call i32 @mct_ClrWbEnhWsbDis_D(%struct.MCTStatStruc* %0, %struct.DCTStatStruc* %1)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ uint32_t;
struct ohash {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ ohash_interval(char const *, char const **);
unsigned int ohash_lookup_interval(struct ohash *, char const *, char const *,
                                   int /*<<< orphan*/);
unsigned int ohash_qlookupi(struct ohash *h, const char *s, const char **e) {
  uint32_t hv;
  hv = ohash_interval(s, e);
  return ohash_lookup_interval(h, s, *e, hv);
}


x86 assembly (clang, -O0):
<ohash_qlookupi>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x18(%rbp),%rsi
call   1030 <ohash_interval@plt>
mov    %eax,-0x1c(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rax
mov    (%rax),%rdx
mov    -0x1c(%rbp),%ecx
call   1040 <ohash_lookup_interval@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ohash_qlookupi>:
push   %r15
push   %r14
push   %rbx
mov    %rdx,%rbx
mov    %rsi,%r14
mov    %rdi,%r15
mov    %rsi,%rdi
mov    %rdx,%rsi
call   1030 <ohash_interval@plt>
mov    (%rbx),%rdx
mov    %r15,%rdi
mov    %r14,%rsi
mov    %eax,%ecx
pop    %rbx
pop    %r14
pop    %r15
jmp    1040 <ohash_lookup_interval@plt>

LLVM IR (-O0):
%struct.ohash = type { i32 }
define i32 @ohash_qlookupi(%struct.ohash* %0, i8* %1, i8** %2) {
%4 = alloca %struct.ohash*
%5 = alloca i8*
%6 = alloca i8**
%7 = alloca i32
store %struct.ohash* %0, %struct.ohash** %4
store i8* %1, i8** %5
store i8** %2, i8*** %6
%8 = load i8*, i8** %5
%9 = load i8**, i8*** %6
%10 = call i32 @ohash_interval(i8* %8, i8** %9)
store i32 %10, i32* %7
%11 = load %struct.ohash*, %struct.ohash** %4
%12 = load i8*, i8** %5
%13 = load i8**, i8*** %6
%14 = load i8*, i8** %13
%15 = load i32, i32* %7
%16 = call i32 @ohash_lookup_interval(%struct.ohash* %11, i8* %12, i8* %14, i32 %15)
ret i32 %16
}

LLVM IR (-O2):
%struct.ohash = type { i32 }
define i32 @ohash_qlookupi(%struct.ohash* %0, i8* %1, i8** %2) {
%4 = tail call i32 @ohash_interval(i8* %1, i8** %2)
%5 = load i8*, i8** %2
%6 = tail call i32 @ohash_lookup_interval(%struct.ohash* %0, i8* %1, i8* %5, i32 %4)
ret i32 %6
}
OP(fd, ff) { op_ff(); }


x86 assembly (clang, -O0):
<OP>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    $0x0,%al
call   1030 <op_ff@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @OP(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
store i32 %0, i32* %4
store i32 %1, i32* %5
%6 = call i32 (...) @op_ff()
%7 = load i32, i32* %3
ret i32 %7
}

LLVM IR (-O2):
define i32 @OP(i32 %0, i32 %1) {
%3 = tail call i32 (...) @op_ff()
ret i32 undef
}
/* Variables and functions */
int /*<<< orphan*/ finish();
int /*<<< orphan*/ mymain();
int /*<<< orphan*/ start();
int main() {
  start();
  mymain();
  finish();
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x0,%al
call   1050 <start@plt>
mov    $0x0,%al
call   1040 <mymain@plt>
mov    $0x0,%al
call   1030 <finish@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1050 <start@plt>
xor    %eax,%eax
call   1040 <mymain@plt>
xor    %eax,%eax
call   1030 <finish@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 (...) @start()
%3 = call i32 (...) @mymain()
%4 = call i32 (...) @finish()
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @start()
%2 = tail call i32 (...) @mymain()
%3 = tail call i32 (...) @finish()
ret i32 0
}
/* Type definitions */
typedef int /*<<< orphan*/ uint8_t;

/* Variables and functions */
int /*<<< orphan*/ mmio_readb(void *);
uint8_t mmio_le_readb(void *addr) { return (mmio_readb(addr)); }


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

x86 assembly (clang, -O2):
<mmio_le_readb>:
jmp    1030 <mmio_readb@plt>

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

LLVM IR (-O2):
define i32 @mmio_le_readb(i8* %0) {
%2 = tail call i32 @mmio_readb(i8* %0)
ret i32 %2
}
/* Variables and functions */
int /*<<< orphan*/ getNumbers(double *, double *);
double pow(double, double);
double potencia(double a, double b) {
  getNumbers(&a, &b);
  return (pow(a, b));
}


x86 assembly (clang, -O0):
<potencia>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
lea    -0x8(%rbp),%rdi
lea    -0x10(%rbp),%rsi
call   1040 <getNumbers@plt>
movsd  -0x8(%rbp),%xmm0
movsd  -0x10(%rbp),%xmm1
call   1030 <pow@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<potencia>:
sub    $0x18,%rsp
movsd  %xmm0,0x10(%rsp)
movsd  %xmm1,0x8(%rsp)
lea    0x10(%rsp),%rdi
lea    0x8(%rsp),%rsi
call   1040 <getNumbers@plt>
movsd  0x10(%rsp),%xmm0
movsd  0x8(%rsp),%xmm1
call   1030 <pow@plt>
add    $0x18,%rsp
ret

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

LLVM IR (-O2):
define double @potencia(double %0, double %1) {
%3 = alloca double
%4 = alloca double
store double %0, double* %3
store double %1, double* %4
%5 = call i32 @getNumbers(double* %3, double* %4)
%6 = load double, double* %3
%7 = load double, double* %4
%8 = call double @pow(double %6, double %7)
ret double %8
}
/* Variables and functions */
scalar_t__ strtoll(char const *, int /*<<< orphan*/ *, int);
long long atoll(const char *nptr) { return (long long)strtoll(nptr, NULL, 10); }


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

x86 assembly (clang, -O2):
<atoll>:
xor    %esi,%esi
mov    $0xa,%edx
jmp    1030 <strtoll@plt>

LLVM IR (-O0):
define i64 @atoll(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i64 @strtoll(i8* %3, i32* null, i32 10)
ret i64 %4
}

LLVM IR (-O2):
define i64 @atoll(i8* nocapture %0) {
%2 = tail call i64 @strtoll(i8* nocapture %0, i32* null, i32 10)
ret i64 %2
}
void XShapeQueryExtension() {}


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

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

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

LLVM IR (-O2):
define void @XShapeQueryExtension() {
ret void
}
char Char2Nibble(char nibble) {
  if (nibble <= '9')
    return ((unsigned char)nibble) - '0';
  return nibble - 'A';
}


x86 assembly (clang, -O0):
<Char2Nibble>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x2(%rbp)
movsbl -0x2(%rbp),%eax
cmp    $0x39,%eax
jg     1126 <Char2Nibble+0x26>
movzbl -0x2(%rbp),%eax
sub    $0x30,%eax
mov    %al,-0x1(%rbp)
jmp    1130 <Char2Nibble+0x30>
movsbl -0x2(%rbp),%eax
sub    $0x41,%eax
mov    %al,-0x1(%rbp)
movsbl -0x1(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<Char2Nibble>:
cmp    $0x3a,%dil
mov    $0xd0,%ecx
mov    $0xbf,%eax
cmovl  %ecx,%eax
add    %dil,%al
ret

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

LLVM IR (-O2):
define signext i8 @Char2Nibble(i8 signext %0) {
%2 = icmp slt i8 %0, 58
%3 = select i1 %2, i8 -48, i8 -65
%4 = add i8 %3, %0
ret i8 %4
}
/* Type definitions */
struct i2c_client {
  int dummy;
};
struct ft5x06_data {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ ft5x06_remove(struct ft5x06_data *);
struct ft5x06_data *i2c_get_clientdata(struct i2c_client *);
int ft5x06_i2c_remove(struct i2c_client *client) {
  struct ft5x06_data *ft5x0x = i2c_get_clientdata(client);
  ft5x06_remove(ft5x0x);
  return 0;
}


x86 assembly (clang, -O0):
<ft5x06_i2c_remove>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <i2c_get_clientdata@plt>
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
call   1030 <ft5x06_remove@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ft5x06_i2c_remove>:
push   %rax
call   1040 <i2c_get_clientdata@plt>
mov    %rax,%rdi
call   1030 <ft5x06_remove@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
%struct.i2c_client = type { i32 }
%struct.ft5x06_data = type { i32 }
define i32 @ft5x06_i2c_remove(%struct.i2c_client* %0) {
%2 = alloca %struct.i2c_client*
%3 = alloca %struct.ft5x06_data*
store %struct.i2c_client* %0, %struct.i2c_client** %2
%4 = load %struct.i2c_client*, %struct.i2c_client** %2
%5 = call %struct.ft5x06_data* @i2c_get_clientdata(%struct.i2c_client* %4)
store %struct.ft5x06_data* %5, %struct.ft5x06_data** %3
%6 = load %struct.ft5x06_data*, %struct.ft5x06_data** %3
%7 = call i32 @ft5x06_remove(%struct.ft5x06_data* %6)
ret i32 0
}

LLVM IR (-O2):
%struct.i2c_client = type { i32 }
%struct.ft5x06_data = type { i32 }
define i32 @ft5x06_i2c_remove(%struct.i2c_client* %0) {
%2 = tail call %struct.ft5x06_data* @i2c_get_clientdata(%struct.i2c_client* %0)
%3 = tail call i32 @ft5x06_remove(%struct.ft5x06_data* %2)
ret i32 0
}
/* Variables and functions */
scalar_t__ rng_uint64();
long long int rng_int64(void) { return (long long int)rng_uint64(); }


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

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

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

LLVM IR (-O2):
define i64 @rng_int64() {
%1 = tail call i64 (...) @rng_uint64()
ret i64 %1
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int pa_proplist_gets() {
  printf("NOT IMPLEMENTED:"
         "pa_proplist_gets"
         "\n");
}


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

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

LLVM IR (-O0):
@.str = [34 x i8] c"NOT IMPLEMENTED:pa_proplist_gets\0A\00"
define i32 @pa_proplist_gets() {
%1 = alloca i32
%2 = call i32 @printf(i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str, i64 0, i64 0))
%3 = load i32, i32* %1
ret i32 %3
}

LLVM IR (-O2):
@str = [33 x i8] c"NOT IMPLEMENTED:pa_proplist_gets\00"
define i32 @pa_proplist_gets() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([33 x i8], [33 x i8]* @str, i64 0, i64 0))
ret i32 undef
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ isxdigit(int);
void t_isxdigit_0xd1() {
  Assert_real((isxdigit(209) == 0),
              "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
              "2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/"
              "dg/z88dk/test/suites/ctype/test_isxdigit.c",
              1050, ("isxdigit should be 0 for 0xd1"));
}


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

x86 assembly (clang, -O2):
<t_isxdigit_0xd1>:
push   %rax
mov    $0xd1,%edi
call   1030 <isxdigit@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf67(%rip),%rcx
mov    $0x41a,%edx
pop    %rax
jmp    1040 <Assert_real@plt>

LLVM IR (-O0):
@.str = [169 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_isxdigit.c\00"
@.str.1 = [30 x i8] c"isxdigit should be 0 for 0xd1\00"
define void @t_isxdigit_0xd1() {
%1 = call i64 @isxdigit(i32 209)
%2 = icmp eq i64 %1, 0
%3 = zext i1 %2 to i32
%4 = call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([169 x i8], [169 x i8]* @.str, i64 0, i64 0), i32 1050, i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [169 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_isxdigit.c\00"
@.str.1 = [30 x i8] c"isxdigit should be 0 for 0xd1\00"
define void @t_isxdigit_0xd1() {
%1 = tail call i64 @isxdigit(i32 209)
%2 = icmp eq i64 %1, 0
%3 = zext i1 %2 to i32
%4 = tail call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([169 x i8], [169 x i8]* @.str, i64 0, i64 0), i32 1050, i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ Msp430GpioC__7__GeneralIO__makeOutput();
void LedsP__Led0__makeOutput(void) { Msp430GpioC__7__GeneralIO__makeOutput(); }


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

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

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

LLVM IR (-O2):
define void @LedsP__Led0__makeOutput() {
%1 = tail call i32 (...) @Msp430GpioC__7__GeneralIO__makeOutput()
ret void
}
double clipd(double v, double min, double max) {
  if (v < min)
    return min;
  if (v > max)
    return max;
  return v;
}


x86 assembly (clang, -O0):
<clipd>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x10(%rbp)
movsd  %xmm1,-0x18(%rbp)
movsd  %xmm2,-0x20(%rbp)
movsd  -0x10(%rbp),%xmm1
movsd  -0x18(%rbp),%xmm0
ucomisd %xmm1,%xmm0
jbe    1136 <clipd+0x36>
movsd  -0x18(%rbp),%xmm0
movsd  %xmm0,-0x8(%rbp)
jmp    115f <clipd+0x5f>
movsd  -0x10(%rbp),%xmm0
ucomisd -0x20(%rbp),%xmm0
jbe    1155 <clipd+0x55>
movsd  -0x20(%rbp),%xmm0
movsd  %xmm0,-0x8(%rbp)
jmp    115f <clipd+0x5f>
movsd  -0x10(%rbp),%xmm0
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<clipd>:
minsd  %xmm0,%xmm2
cmpltsd %xmm1,%xmm0
movapd %xmm0,%xmm3
andnpd %xmm2,%xmm3
andpd  %xmm1,%xmm0
orpd   %xmm3,%xmm0
ret

LLVM IR (-O0):
define double @clipd(double %0, double %1, double %2) {
%4 = alloca double
%5 = alloca double
%6 = alloca double
%7 = alloca double
store double %0, double* %5
store double %1, double* %6
store double %2, double* %7
%8 = load double, double* %5
%9 = load double, double* %6
%10 = fcmp olt double %8, %9
br i1 %10, label %11, label %13
11: ; preds = %3
%12 = load double, double* %6
store double %12, double* %4
br label %21
13: ; preds = %3
%14 = load double, double* %5
%15 = load double, double* %7
%16 = fcmp ogt double %14, %15
br i1 %16, label %17, label %19
17: ; preds = %13
%18 = load double, double* %7
store double %18, double* %4
br label %21
19: ; preds = %13
%20 = load double, double* %5
store double %20, double* %4
br label %21
21: ; preds = %19, %17, %11
%22 = load double, double* %4
ret double %22
}

LLVM IR (-O2):
define double @clipd(double %0, double %1, double %2) {
%4 = fcmp olt double %0, %1
%5 = fcmp ogt double %0, %2
%6 = select i1 %5, double %2, double %0
%7 = select i1 %4, double %1, double %6
ret double %7
}
void swap_values(int *a, int *b) {
  int aux = *a;
  *a = *b;
  *b = aux;
}


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

x86 assembly (clang, -O2):
<swap_values>:
mov    (%rdi),%eax
mov    (%rsi),%ecx
mov    %ecx,(%rdi)
mov    %eax,(%rsi)
ret

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

LLVM IR (-O2):
define void @swap_values(i32* nocapture %0, i32* nocapture %1) {
%3 = load i32, i32* %0
%4 = load i32, i32* %1
store i32 %4, i32* %0
store i32 %3, i32* %1
ret void
}
/* Variables and functions */
int /*<<< orphan*/ close(int);
void close_sock(int sockhandle) { close(sockhandle); }


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

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

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

LLVM IR (-O2):
define void @close_sock(i32 %0) {
%2 = tail call i32 @close(i32 %0)
ret void
}
/* Type definitions */
struct buffer {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ SHA1(unsigned char *, size_t, unsigned char *);
size_t buffer_size(struct buffer *);
unsigned char *buffer_start(struct buffer *);
void buffer_sha1(struct buffer *self, unsigned char *hash) {
  unsigned char *data;
  size_t len;
  data = buffer_start(self);
  len = buffer_size(self);
  SHA1(data, len, hash);
}


x86 assembly (clang, -O0):
<buffer_sha1>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <buffer_start@plt>
mov    %rax,-0x18(%rbp)
mov    -0x8(%rbp),%rdi
call   1050 <buffer_size@plt>
mov    %rax,-0x20(%rbp)
mov    -0x18(%rbp),%rdi
mov    -0x20(%rbp),%rsi
mov    -0x10(%rbp),%rdx
call   1040 <SHA1@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<buffer_sha1>:
push   %r15
push   %r14
push   %rbx
mov    %rsi,%r14
mov    %rdi,%rbx
call   1030 <buffer_start@plt>
mov    %rax,%r15
mov    %rbx,%rdi
call   1050 <buffer_size@plt>
mov    %r15,%rdi
mov    %rax,%rsi
mov    %r14,%rdx
pop    %rbx
pop    %r14
pop    %r15
jmp    1040 <SHA1@plt>

LLVM IR (-O0):
%struct.buffer = type { i32 }
define void @buffer_sha1(%struct.buffer* %0, i8* %1) {
%3 = alloca %struct.buffer*
%4 = alloca i8*
%5 = alloca i8*
%6 = alloca i64
store %struct.buffer* %0, %struct.buffer** %3
store i8* %1, i8** %4
%7 = load %struct.buffer*, %struct.buffer** %3
%8 = call i8* @buffer_start(%struct.buffer* %7)
store i8* %8, i8** %5
%9 = load %struct.buffer*, %struct.buffer** %3
%10 = call i64 @buffer_size(%struct.buffer* %9)
store i64 %10, i64* %6
%11 = load i8*, i8** %5
%12 = load i64, i64* %6
%13 = load i8*, i8** %4
%14 = call i32 @SHA1(i8* %11, i64 %12, i8* %13)
ret void
}

LLVM IR (-O2):
%struct.buffer = type { i32 }
define void @buffer_sha1(%struct.buffer* %0, i8* %1) {
%3 = tail call i8* @buffer_start(%struct.buffer* %0)
%4 = tail call i64 @buffer_size(%struct.buffer* %0)
%5 = tail call i32 @SHA1(i8* %3, i64 %4, i8* %1)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ uint8_t;

/* Variables and functions */
int /*<<< orphan*/ ed25519_key_setup(int /*<<< orphan*/ *,
                                     int /*<<< orphan*/ const *);
int /*<<< orphan*/ memcpy(int /*<<< orphan*/ *, int /*<<< orphan*/ *, int);
void conv_sk_ed25519_to_x25519(uint8_t out[32], const uint8_t in[32]) {
  uint8_t h[64];
  ed25519_key_setup(h, in);
  memcpy(out, h, 32);
}


x86 assembly (clang, -O0):
<conv_sk_ed25519_to_x25519>:
push   %rbp
mov    %rsp,%rbp
sub    $0x110,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
lea    -0x110(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1040 <ed25519_key_setup@plt>
mov    -0x8(%rbp),%rdi
lea    -0x110(%rbp),%rsi
mov    $0x20,%edx
call   1030 <memcpy@plt>
add    $0x110,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<conv_sk_ed25519_to_x25519>:
push   %r14
push   %rbx
sub    $0x108,%rsp
mov    %rdi,%rbx
mov    %rsp,%r14
mov    %r14,%rdi
call   1040 <ed25519_key_setup@plt>
mov    %rbx,%rdi
mov    %r14,%rsi
mov    $0x20,%edx
call   1030 <memcpy@plt>
add    $0x108,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define void @conv_sk_ed25519_to_x25519(i32* %0, i32* %1) {
%3 = alloca i32*
%4 = alloca i32*
%5 = alloca [64 x i32]
store i32* %0, i32** %3
store i32* %1, i32** %4
%6 = getelementptr inbounds [64 x i32], [64 x i32]* %5, i64 0, i64 0
%7 = load i32*, i32** %4
%8 = call i32 @ed25519_key_setup(i32* %6, i32* %7)
%9 = load i32*, i32** %3
%10 = getelementptr inbounds [64 x i32], [64 x i32]* %5, i64 0, i64 0
%11 = call i32 @memcpy(i32* %9, i32* %10, i32 32)
ret void
}

LLVM IR (-O2):
define void @conv_sk_ed25519_to_x25519(i32* %0, i32* %1) {
%3 = alloca [64 x i32]
%4 = bitcast [64 x i32]* %3 to i8*
%5 = getelementptr inbounds [64 x i32], [64 x i32]* %3, i64 0, i64 0
%6 = call i32 @ed25519_key_setup(i32* %5, i32* %1)
%7 = call i32 @memcpy(i32* %0, i32* %5, i32 32)
ret void
}
int do_072() { return 72; }


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

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

LLVM IR (-O0):
define i32 @do_072() {
ret i32 72
}

LLVM IR (-O2):
define i32 @do_072() {
ret i32 72
}
void test21_Blink2_targetInit__I() {}


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

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

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

LLVM IR (-O2):
define void @test21_Blink2_targetInit__I() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ iscntrl(int);
void t_iscntrl_0x85() {
  Assert_real((iscntrl(133) == 0),
              "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
              "2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/"
              "dg/z88dk/test/suites/ctype/test_iscntrl.c",
              670, ("iscntrl should be 0 for 0x85"));
}


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

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

LLVM IR (-O0):
@.str = [168 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/ctype/test_iscntrl.c\00"
@.str.1 = [29 x i8] c"iscntrl should be 0 for 0x85\00"
define void @t_iscntrl_0x85() {
%1 = call i64 @iscntrl(i32 133)
%2 = icmp eq i64 %1, 0
%3 = zext i1 %2 to i32
%4 = call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([168 x i8], [168 x i8]* @.str, i64 0, i64 0), i32 670, i8* getelementptr inbounds ([29 x i8], [29 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_iscntrl.c\00"
@.str.1 = [29 x i8] c"iscntrl should be 0 for 0x85\00"
define void @t_iscntrl_0x85() {
%1 = tail call i64 @iscntrl(i32 133)
%2 = icmp eq i64 %1, 0
%3 = zext i1 %2 to i32
%4 = tail call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([168 x i8], [168 x i8]* @.str, i64 0, i64 0), i32 670, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ fwrite(float *, int, int, int /*<<< orphan*/ *);
void fwritef(FILE *fOut, float f) { fwrite(&f, sizeof(float), 1, fOut); }


x86 assembly (clang, -O0):
<fwritef>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
movss  %xmm0,-0xc(%rbp)
mov    -0x8(%rbp),%rcx
lea    -0xc(%rbp),%rdi
mov    $0x4,%esi
mov    $0x1,%edx
call   1030 <fwrite@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fwritef>:
push   %rax
mov    %rdi,%rcx
movss  %xmm0,0x4(%rsp)
lea    0x4(%rsp),%rdi
mov    $0x4,%esi
mov    $0x1,%edx
call   1030 <fwrite@plt>
pop    %rax
ret

LLVM IR (-O0):
define void @fwritef(i32* %0, float %1) {
%3 = alloca i32*
%4 = alloca float
store i32* %0, i32** %3
store float %1, float* %4
%5 = load i32*, i32** %3
%6 = call i32 @fwrite(float* %4, i32 4, i32 1, i32* %5)
ret void
}

LLVM IR (-O2):
define void @fwritef(i32* nocapture %0, float %1) {
%3 = alloca float
store float %1, float* %3
%4 = call i32 @fwrite(float* %3, i32 4, i32 1, i32* %0)
ret void
}
/* Variables and functions */
int fact(int);
int /*<<< orphan*/ printf(char *, int);
int tail(int, int);
int main(void) {
  int num = 0;
  num = fact(10);
  printf("%d\n", num);
  int b = 0;
  b = tail(10, 1);
  printf("%d\n", b);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0xa,%edi
call   1050 <fact@plt>
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%esi
lea    0xeaa(%rip),%rdi
call   1030 <printf@plt>
movl   $0x0,-0x8(%rbp)
mov    $0xa,%edi
mov    $0x1,%esi
call   1040 <tail@plt>
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%esi
lea    0xe82(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
mov    $0xa,%edi
call   1050 <fact@plt>
lea    0xebe(%rip),%rbx
mov    %rbx,%rdi
mov    %eax,%esi
call   1030 <printf@plt>
mov    $0xa,%edi
mov    $0x1,%esi
call   1040 <tail@plt>
mov    %rbx,%rdi
mov    %eax,%esi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rbx
ret

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

LLVM IR (-O2):
@.str = [4 x i8] c"%d\0A\00"
define i32 @main() {
%1 = tail call i32 @fact(i32 10)
%2 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %1)
%3 = tail call i32 @tail(i32 10, i32 1)
%4 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %3)
ret i32 0
}
void EPIIntErrorClear(unsigned long ulBase, unsigned long ulErrFlags) {
  ;
  ;
  (*((volatile unsigned long *)(ulBase + 0x0000021C))) = ulErrFlags;
}


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

x86 assembly (clang, -O2):
<EPIIntErrorClear>:
mov    %rsi,0x21c(%rdi)
ret

LLVM IR (-O0):
define void @EPIIntErrorClear(i64 %0, i64 %1) {
%3 = alloca i64
%4 = alloca i64
store i64 %0, i64* %3
store i64 %1, i64* %4
%5 = load i64, i64* %4
%6 = load i64, i64* %3
%7 = add i64 %6, 540
%8 = inttoptr i64 %7 to i64*
store volatile i64 %5, i64* %8
ret void
}

LLVM IR (-O2):
define void @EPIIntErrorClear(i64 %0, i64 %1) {
%3 = add i64 %0, 540
%4 = inttoptr i64 %3 to i64*
store volatile i64 %1, i64* %4
ret void
}
/* Forward declarations */
typedef struct TYPE_2__ TYPE_1__;

/* Type definitions */
struct TYPE_2__ {
  scalar_t__ bell_percent;
};
typedef TYPE_1__ XKeyboardState;

/* Variables and functions */
int get_XKeyboardState_bell_percent(void *_p) {
  return (int)((XKeyboardState *)_p)->bell_percent;
}


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

x86 assembly (clang, -O2):
<get_XKeyboardState_bell_percent>:
mov    (%rdi),%eax
ret

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

LLVM IR (-O2):
define i32 @get_XKeyboardState_bell_percent(i8* nocapture %0) {
%2 = bitcast i8* %0 to i64*
%3 = load i64, i64* %2
%4 = trunc i64 %3 to i32
ret i32 %4
}
int pathcon_nm6_f0(const double **arg, double **res, int *iw, double *w,
                   int mem) {
  return 0;
}


x86 assembly (clang, -O0):
<pathcon_nm6_f0>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    %r8d,-0x24(%rbp)
xor    %eax,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @pathcon_nm6_f0(double** %0, double** %1, i32* %2, double* %3, i32 %4) {
%6 = alloca double**
%7 = alloca double**
%8 = alloca i32*
%9 = alloca double*
%10 = alloca i32
store double** %0, double*** %6
store double** %1, double*** %7
store i32* %2, i32** %8
store double* %3, double** %9
store i32 %4, i32* %10
ret i32 0
}

LLVM IR (-O2):
define i32 @pathcon_nm6_f0(double** nocapture readnone %0, double** nocapture readnone %1, i32* nocapture readnone %2, double* nocapture readnone %3, i32 %4) {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
int /*<<< orphan*/ stderr;
void usage(void) {
  fprintf(stderr, "Usage:"
                  "\thubpower busnum:devnum power {portnum (on|off)} ...\n"
                  "\thubpower busnum:devnum status\n"
                  "\thubpower busnum:devnum bind\n");
  exit(1);
}


x86 assembly (clang, -O0):
<usage>:
push   %rbp
mov    %rsp,%rbp
mov    0x2eb5(%rip),%rax
mov    (%rax),%edi
lea    0xecc(%rip),%rsi
call   1030 <fprintf@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<usage>:
push   %rax
mov    0x2eb8(%rip),%rax
mov    (%rax),%edi
lea    0xecf(%rip),%rsi
call   1030 <fprintf@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [120 x i8] c"Usage:\09hubpower busnum:devnum power {portnum (on|off)} ...\0A\09hubpower busnum:devnum status\0A\09hubpower busnum:devnum bind\0A\00"
define void @usage() {
%1 = load i32, i32* @stderr
%2 = call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([120 x i8], [120 x i8]* @.str, i64 0, i64 0))
%3 = call i32 @exit(i32 1)
unreachable
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [120 x i8] c"Usage:\09hubpower busnum:devnum power {portnum (on|off)} ...\0A\09hubpower busnum:devnum status\0A\09hubpower busnum:devnum bind\0A\00"
define void @usage() {
%1 = load i32, i32* @stderr
%2 = tail call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([120 x i8], [120 x i8]* @.str, i64 0, i64 0))
%3 = tail call i32 @exit(i32 1)
unreachable
}
/* Variables and functions */
int /*<<< orphan*/ getchar();
int /*<<< orphan*/ printf(char *);
int main() {
  printf("Hello user!\n");
  getchar();
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeca(%rip),%rdi
call   1030 <printf@plt>
mov    $0x0,%al
call   1040 <getchar@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xed8(%rip),%rdi
call   1030 <puts@plt>
xor    %eax,%eax
call   1040 <getchar@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [13 x i8] c"Hello user!\0A\00"
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0))
%3 = call i32 (...) @getchar()
ret i32 0
}

LLVM IR (-O2):
@str = [12 x i8] c"Hello user!\00"
define i32 @main() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([12 x i8], [12 x i8]* @str, i64 0, i64 0))
%2 = tail call i32 (...) @getchar()
ret i32 0
}
void XtDestroyApplicationContext() {}


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

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

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

LLVM IR (-O2):
define void @XtDestroyApplicationContext() {
ret void
}
/* Variables and functions */
void *dlsym(void *, char const *);
void *getFuncFromDLL(const char *funcName, void *dllHandle) {
  if (!funcName || !dllHandle)
    return NULL;
  return dlsym(dllHandle, funcName);
}


x86 assembly (clang, -O0):
<getFuncFromDLL>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
cmpq   $0x0,-0x10(%rbp)
je     1136 <getFuncFromDLL+0x26>
cmpq   $0x0,-0x18(%rbp)
jne    1143 <getFuncFromDLL+0x33>
movq   $0x0,-0x8(%rbp)
jmp    1154 <getFuncFromDLL+0x44>
mov    -0x18(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1030 <dlsym@plt>
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<getFuncFromDLL>:
test   %rdi,%rdi
je     1128 <getFuncFromDLL+0x18>
test   %rsi,%rsi
je     1128 <getFuncFromDLL+0x18>
mov    %rdi,%rax
mov    %rsi,%rdi
mov    %rax,%rsi
jmp    1030 <dlsym@plt>
xor    %eax,%eax
ret

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

LLVM IR (-O2):
define i8* @getFuncFromDLL(i8* %0, i8* %1) {
%3 = icmp ne i8* %0, null
%4 = icmp ne i8* %1, null
%5 = and i1 %3, %4
br i1 %5, label %6, label %8
6: ; preds = %2
%7 = tail call i8* @dlsym(i8* %1, i8* %0)
br label %8
8: ; preds = %2, %6
%9 = phi i8* [ %7, %6 ], [ null, %2 ]
ret i8* %9
}
/* Variables and functions */
int /*<<< orphan*/ _irc_chan_del(char *);
int _irc_chan_getstatus(char *);
int /*<<< orphan*/ _irc_chan_setstatus(char *, int);
char *strtok(char *, char *);
int handle_join_failure(char *param, int n) {
  char *chan;
  chan = strtok(param, " ");
  _irc_chan_setstatus(chan, 3);
  if (_irc_chan_getstatus(chan) == 1) {
    _irc_chan_del(chan);
  } else {
  }
  return 0;
}


x86 assembly (clang, -O0):
<handle_join_failure>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rdi
lea    0xea6(%rip),%rsi
call   1060 <strtok@plt>
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rdi
mov    $0x3,%esi
call   1050 <_irc_chan_setstatus@plt>
mov    -0x18(%rbp),%rdi
call   1030 <_irc_chan_getstatus@plt>
cmp    $0x1,%eax
jne    1191 <handle_join_failure+0x51>
mov    -0x18(%rbp),%rdi
call   1040 <_irc_chan_del@plt>
jmp    1196 <handle_join_failure+0x56>
jmp    1196 <handle_join_failure+0x56>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<handle_join_failure>:
push   %rbx
lea    0xeb8(%rip),%rsi
call   1060 <strtok@plt>
mov    %rax,%rbx
mov    %rax,%rdi
mov    $0x3,%esi
call   1050 <_irc_chan_setstatus@plt>
mov    %rbx,%rdi
call   1030 <_irc_chan_getstatus@plt>
cmp    $0x1,%eax
jne    1172 <handle_join_failure+0x32>
mov    %rbx,%rdi
call   1040 <_irc_chan_del@plt>
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [2 x i8] c" \00"
define i32 @handle_join_failure(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i32
%5 = alloca i8*
store i8* %0, i8** %3
store i32 %1, i32* %4
%6 = load i8*, i8** %3
%7 = call i8* @strtok(i8* %6, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
store i8* %7, i8** %5
%8 = load i8*, i8** %5
%9 = call i32 @_irc_chan_setstatus(i8* %8, i32 3)
%10 = load i8*, i8** %5
%11 = call i32 @_irc_chan_getstatus(i8* %10)
%12 = icmp eq i32 %11, 1
br i1 %12, label %13, label %16
13: ; preds = %2
%14 = load i8*, i8** %5
%15 = call i32 @_irc_chan_del(i8* %14)
br label %17
16: ; preds = %2
br label %17
17: ; preds = %16, %13
ret i32 0
}

LLVM IR (-O2):
@.str = [2 x i8] c" \00"
define i32 @handle_join_failure(i8* %0, i32 %1) {
%3 = tail call i8* @strtok(i8* %0, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
%4 = tail call i32 @_irc_chan_setstatus(i8* %3, i32 3)
%5 = tail call i32 @_irc_chan_getstatus(i8* %3)
%6 = icmp eq i32 %5, 1
br i1 %6, label %7, label %9
7: ; preds = %2
%8 = tail call i32 @_irc_chan_del(i8* %3)
br label %9
9: ; preds = %2, %7
ret i32 0
}
/* Variables and functions */
int mpd_single_command(char *);
int play_pause(void) { return mpd_single_command("pause\n"); }


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

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

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

LLVM IR (-O2):
@.str = [7 x i8] c"pause\0A\00"
define i32 @play_pause() {
%1 = tail call i32 @mpd_single_command(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0))
ret i32 %1
}
/* Variables and functions */
int strcmp(char const *, char const *);
int btp_strcmp0(const char *s1, const char *s2) {
  if (!s1) {
    if (s2)
      return -1;
    return 0;
  } else {
    if (!s2)
      return 1;
    return strcmp(s1, s2);
  }
}


x86 assembly (clang, -O0):
<btp_strcmp0>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
cmpq   $0x0,-0x10(%rbp)
jne    114e <btp_strcmp0+0x3e>
cmpq   $0x0,-0x18(%rbp)
je     1142 <btp_strcmp0+0x32>
movl   $0xffffffff,-0x4(%rbp)
jmp    1175 <btp_strcmp0+0x65>
movl   $0x0,-0x4(%rbp)
jmp    1175 <btp_strcmp0+0x65>
cmpq   $0x0,-0x18(%rbp)
jne    1165 <btp_strcmp0+0x55>
movl   $0x1,-0x4(%rbp)
jmp    1175 <btp_strcmp0+0x65>
mov    -0x10(%rbp),%rdi
mov    -0x18(%rbp),%rsi
call   1030 <strcmp@plt>
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<btp_strcmp0>:
test   %rdi,%rdi
je     111f <btp_strcmp0+0xf>
test   %rsi,%rsi
je     1125 <btp_strcmp0+0x15>
jmp    1030 <strcmp@plt>
neg    %rsi
sbb    %eax,%eax
ret
mov    $0x1,%eax
ret

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

LLVM IR (-O2):
define i32 @btp_strcmp0(i8* %0, i8* %1) {
%3 = icmp eq i8* %0, null
br i1 %3, label %4, label %7
4: ; preds = %2
%5 = icmp ne i8* %1, null
%6 = sext i1 %5 to i32
br label %11
7: ; preds = %2
%8 = icmp eq i8* %1, null
br i1 %8, label %11, label %9
9: ; preds = %7
%10 = tail call i32 @strcmp(i8* %0, i8* %1)
br label %11
11: ; preds = %7, %4, %9
%12 = phi i32 [ %10, %9 ], [ %6, %4 ], [ 1, %7 ]
ret i32 %12
}
int do_364() { return 364; }


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

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

LLVM IR (-O0):
define i32 @do_364() {
ret i32 364
}

LLVM IR (-O2):
define i32 @do_364() {
ret i32 364
}