xunge/DecIR huggingface dataset:
/* Variables and functions */
int EXIT_SUCCESS;
int __BIG_ENDIAN;
int __LITTLE_ENDIAN;
scalar_t__ little_endian();
int /*<<< orphan*/ printf(char *, int);
int main(void) {
  if (little_endian())
    printf("little-endian: %d\n", __LITTLE_ENDIAN);
  else
    printf("big-endian: %d\n", __BIG_ENDIAN);
  return (EXIT_SUCCESS);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x0,%al
call   1030 <little_endian@plt>
cmp    $0x0,%rax
je     115a <main+0x3a>
mov    0x2eb1(%rip),%rax
mov    (%rax),%esi
lea    0xeb0(%rip),%rdi
call   1040 <printf@plt>
jmp    116f <main+0x4f>
mov    0x2e6f(%rip),%rax
mov    (%rax),%esi
lea    0xea9(%rip),%rdi
call   1040 <printf@plt>
mov    0x2e62(%rip),%rax
mov    (%rax),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1030 <little_endian@plt>
test   %rax,%rax
lea    0xee1(%rip),%rax
lea    0xec7(%rip),%rdi
cmove  %rax,%rdi
mov    0x2eb4(%rip),%rax
cmove  0x2e84(%rip),%rax
mov    (%rax),%esi
call   1040 <printf@plt>
mov    0x2e7e(%rip),%rax
mov    (%rax),%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [19 x i8] c"little-endian: %d\0A\00"
@__LITTLE_ENDIAN = global i32 0
@.str.1 = [16 x i8] c"big-endian: %d\0A\00"
@__BIG_ENDIAN = global i32 0
@EXIT_SUCCESS = global i32 0
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i64 (...) @little_endian()
%3 = icmp ne i64 %2, 0
br i1 %3, label %4, label %7
4: ; preds = %0
%5 = load i32, i32* @__LITTLE_ENDIAN
%6 = call i32 @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0), i32 %5)
br label %10
7: ; preds = %0
%8 = load i32, i32* @__BIG_ENDIAN
%9 = call i32 @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.1, i64 0, i64 0), i32 %8)
br label %10
10: ; preds = %7, %4
%11 = load i32, i32* @EXIT_SUCCESS
ret i32 %11
}

LLVM IR (-O2):
@.str = [19 x i8] c"little-endian: %d\0A\00"
@__LITTLE_ENDIAN = global i32 0
@.str.1 = [16 x i8] c"big-endian: %d\0A\00"
@__BIG_ENDIAN = global i32 0
@EXIT_SUCCESS = global i32 0
define i32 @main() {
%1 = tail call i64 (...) @little_endian()
%2 = icmp eq i64 %1, 0
%3 = select i1 %2, i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0)
%4 = load i32, i32* @__BIG_ENDIAN
%5 = load i32, i32* @__LITTLE_ENDIAN
%6 = select i1 %2, i32 %4, i32 %5
%7 = tail call i32 @printf(i8* %3, i32 %6)
%8 = load i32, i32* @EXIT_SUCCESS
ret i32 %8
}
int compareThruSlash(char *string1, char *string2) {
  while (1) {
    if (*string1 != *string2)
      return 0;
    if (*string1 == '\0' || *string1 == '/')
      return 1;
    string1++;
    string2++;
  }
}


x86 assembly (clang, -O0):
<compareThruSlash>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    -0x10(%rbp),%rax
movsbl (%rax),%eax
mov    -0x18(%rbp),%rcx
movsbl (%rcx),%ecx
cmp    %ecx,%eax
je     112e <compareThruSlash+0x2e>
movl   $0x0,-0x4(%rbp)
jmp    1177 <compareThruSlash+0x77>
mov    -0x10(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x0,%eax
je     114e <compareThruSlash+0x4e>
mov    -0x10(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x2f,%eax
jne    115a <compareThruSlash+0x5a>
movl   $0x1,-0x4(%rbp)
jmp    1177 <compareThruSlash+0x77>
mov    -0x10(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x10(%rbp)
mov    -0x18(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x18(%rbp)
jmp    110c <compareThruSlash+0xc>
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<compareThruSlash>:
mov    (%rdi),%cl
cmp    (%rsi),%cl
jne    112e <compareThruSlash+0x2e>
mov    $0x1,%edx
nopl   0x0(%rax,%rax,1)
mov    $0x1,%eax
test   %cl,%cl
je     1130 <compareThruSlash+0x30>
cmp    $0x2f,%cl
je     1130 <compareThruSlash+0x30>
movzbl (%rdi,%rdx,1),%ecx
lea    0x1(%rdx),%rax
cmp    (%rsi,%rdx,1),%cl
mov    %rax,%rdx
je     1110 <compareThruSlash+0x10>
xor    %eax,%eax
ret

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

LLVM IR (-O2):
define i32 @compareThruSlash(i8* nocapture %0, i8* nocapture %1) {
%3 = load i8, i8* %0
%4 = load i8, i8* %1
%5 = icmp eq i8 %3, %4
br i1 %5, label %6, label %16
6: ; preds = %2, %10
%7 = phi i8 [ %13, %10 ], [ %3, %2 ]
%8 = phi i8* [ %12, %10 ], [ %1, %2 ]
%9 = phi i8* [ %11, %10 ], [ %0, %2 ]
switch i8 %7, label %10 [
i8 0, label %16
i8 47, label %16
]
10: ; preds = %6
%11 = getelementptr inbounds i8, i8* %9, i64 1
%12 = getelementptr inbounds i8, i8* %8, i64 1
%13 = load i8, i8* %11
%14 = load i8, i8* %12
%15 = icmp eq i8 %13, %14
br i1 %15, label %6, label %16
16: ; preds = %10, %6, %6, %2
%17 = phi i32 [ 0, %2 ], [ 1, %6 ], [ 1, %6 ], [ 0, %10 ]
ret i32 %17
}
/* Variables and functions */
int /*<<< orphan*/ dot_nodeid(int);
int /*<<< orphan*/ printf(char *);
void dot_add_edge(int id, int id2) {
  dot_nodeid(id);
  printf(" -> ");
  dot_nodeid(id2);
  printf(";\n");
}


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

x86 assembly (clang, -O2):
<dot_add_edge>:
push   %rbx
mov    %esi,%ebx
call   1050 <dot_nodeid@plt>
lea    0xec1(%rip),%rdi
call   1040 <printf@plt>
mov    %ebx,%edi
call   1050 <dot_nodeid@plt>
lea    0xeb3(%rip),%rdi
pop    %rbx
jmp    1030 <puts@plt>

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

LLVM IR (-O2):
@.str = [5 x i8] c" -> \00"
@str = [2 x i8] c";\00"
define void @dot_add_edge(i32 %0, i32 %1) {
%3 = tail call i32 @dot_nodeid(i32 %0)
%4 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0))
%5 = tail call i32 @dot_nodeid(i32 %1)
%6 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([2 x i8], [2 x i8]* @str, i64 0, i64 0))
ret void
}
/* Type definitions */
typedef char *uint64_t;

/* Variables and functions */
__attribute__((always_, const)) uint64_t __bswap_variable_64(uint64_t x) {
  __asm__("bswapq %q0" : "=r"(x) : "0"(x));
  return x;
}


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

x86 assembly (clang, -O2):
<__bswap_variable_64>:
mov    %rdi,%rax
bswap  %rax
ret

LLVM IR (-O0):
define i8* @__bswap_variable_64(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i8* asm "bswapq ${0:q}", "=r,0,~{dirflag},~{fpsr},~{flags}"(i8* %3)
store i8* %4, i8** %2
%5 = load i8*, i8** %2
ret i8* %5
}

LLVM IR (-O2):
define i8* @__bswap_variable_64(i8* readnone %0) {
%2 = tail call i8* asm "bswapq ${0:q}", "=r,0,~{dirflag},~{fpsr},~{flags}"(i8* %0)
ret i8* %2
}
/* Variables and functions */
float powf(float, float);
float Q_exp2f(float f) { return powf(2.0f, f); }


x86 assembly (clang, -O0):
<Q_exp2f>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movss  %xmm0,-0x4(%rbp)
movss  -0x4(%rbp),%xmm1
movss  0xed6(%rip),%xmm0
call   1030 <powf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Q_exp2f>:
jmp    1030 <exp2f@plt>

LLVM IR (-O0):
define float @Q_exp2f(float %0) {
%2 = alloca float
store float %0, float* %2
%3 = load float, float* %2
%4 = call float @powf(float 2.000000e+00, float %3)
ret float %4
}

LLVM IR (-O2):
define float @Q_exp2f(float %0) {
%2 = tail call float @exp2f(float %0)
ret float %2
}
/* Variables and functions */
bool optional_stop_machine(void) { return false; }


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

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

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

LLVM IR (-O2):
define i32 @optional_stop_machine() {
ret i32 0
}
/* Variables and functions */
size_t leftChild(size_t parent) { return 2 * parent + 1; }


x86 assembly (clang, -O0):
<leftChild>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
shl    $0x1,%rax
add    $0x1,%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<leftChild>:
lea    (%rdi,%rdi,1),%rax
add    $0x1,%rax
ret

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

LLVM IR (-O2):
define i64 @leftChild(i64 %0) {
%2 = shl i64 %0, 1
%3 = or i64 %2, 1
ret i64 %3
}
/* Variables and functions */
int /*<<< orphan*/ cnfCptr(unsigned int);
int /*<<< orphan*/ cnfFree(int /*<<< orphan*/);
void freemem_(unsigned int *const ptr) { cnfFree(cnfCptr(*ptr)); }


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

x86 assembly (clang, -O2):
<freemem_>:
push   %rax
mov    (%rdi),%edi
call   1040 <cnfCptr@plt>
mov    %eax,%edi
pop    %rax
jmp    1030 <cnfFree@plt>

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

LLVM IR (-O2):
define void @freemem_(i32* nocapture %0) {
%2 = load i32, i32* %0
%3 = tail call i32 @cnfCptr(i32 %2)
%4 = tail call i32 @cnfFree(i32 %3)
ret void
}
int test_imm_E1uint32_mem(unsigned int *val) {
  return ((*val) & (0xE1 << 0)) ? -20 : -40;
}


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

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

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

LLVM IR (-O2):
define i32 @test_imm_E1uint32_mem(i32* nocapture %0) {
%2 = load i32, i32* %0
%3 = and i32 %2, 225
%4 = icmp eq i32 %3, 0
%5 = select i1 %4, i32 -40, i32 -20
ret i32 %5
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
unsigned char fgetc(int /*<<< orphan*/ *);
unsigned int getCount2(FILE *infile) {
  unsigned char b1, b2;
  b1 = fgetc(infile);
  b2 = fgetc(infile);
  return ((unsigned int)b1 << 8) | (unsigned int)b2;
}


x86 assembly (clang, -O0):
<getCount2>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <fgetc@plt>
mov    %al,-0x9(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <fgetc@plt>
mov    %al,-0xa(%rbp)
movzbl -0x9(%rbp),%eax
shl    $0x8,%eax
movzbl -0xa(%rbp),%ecx
or     %ecx,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<getCount2>:
push   %rbp
push   %rbx
push   %rax
mov    %rdi,%rbx
call   1030 <fgetc@plt>
mov    %eax,%ebp
mov    %rbx,%rdi
call   1030 <fgetc@plt>
movzbl %bpl,%ecx
shl    $0x8,%ecx
movzbl %al,%eax
or     %ecx,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
define i32 @getCount2(i32* %0) {
%2 = alloca i32*
%3 = alloca i8
%4 = alloca i8
store i32* %0, i32** %2
%5 = load i32*, i32** %2
%6 = call zeroext i8 @fgetc(i32* %5)
store i8 %6, i8* %3
%7 = load i32*, i32** %2
%8 = call zeroext i8 @fgetc(i32* %7)
store i8 %8, i8* %4
%9 = load i8, i8* %3
%10 = zext i8 %9 to i32
%11 = shl i32 %10, 8
%12 = load i8, i8* %4
%13 = zext i8 %12 to i32
%14 = or i32 %11, %13
ret i32 %14
}

LLVM IR (-O2):
define i32 @getCount2(i32* nocapture %0) {
%2 = tail call zeroext i8 @fgetc(i32* %0)
%3 = tail call zeroext i8 @fgetc(i32* %0)
%4 = zext i8 %2 to i32
%5 = shl nuw nsw i32 %4, 8
%6 = zext i8 %3 to i32
%7 = or i32 %5, %6
ret i32 %7
}
/* Type definitions */
typedef int /*<<< orphan*/ pthread_mutex_t;

/* Variables and functions */
int /*<<< orphan*/ printf(char *, char const *);
int pthread_mutex_trylock(int /*<<< orphan*/ *);
int mem_trylock(pthread_mutex_t *lock, const char *info) {
  printf("trylock : [%s]\n", info);
  return pthread_mutex_trylock(lock);
}


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

x86 assembly (clang, -O2):
<mem_trylock>:
push   %rbx
mov    %rdi,%rbx
lea    0xed5(%rip),%rdi
call   1030 <printf@plt>
mov    %rbx,%rdi
pop    %rbx
jmp    1040 <pthread_mutex_trylock@plt>

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

LLVM IR (-O2):
@.str = [16 x i8] c"trylock : [%s]\0A\00"
define i32 @mem_trylock(i32* %0, i8* %1) {
%3 = tail call i32 @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0), i8* %1)
%4 = tail call i32 @pthread_mutex_trylock(i32* %0)
ret i32 %4
}
/* Variables and functions */
char *strdup(char const *);
char *c_strdup(const char *s) { return strdup(s); }


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

x86 assembly (clang, -O2):
<c_strdup>:
jmp    1030 <strdup@plt>

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

LLVM IR (-O2):
define noalias i8* @c_strdup(i8* nocapture %0) {
%2 = tail call i8* @strdup(i8* %0)
ret i8* %2
}
const char *rcsid(const char *p) {
  return rcsid(
      p = "@(#)$File: apprentice.c,v 1.140 2008/07/20 04:02:15 christos Exp $");
}


x86 assembly (clang, -O0):
<rcsid>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
lea    0xedd(%rip),%rax
mov    %rax,-0x8(%rbp)
lea    0xed2(%rip),%rdi
call   1030 <rcsid@plt>
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
@.str = [67 x i8] c"@(#)$File: apprentice.c,v 1.140 2008/07/20 04:02:15 christos Exp $\00"
define i8* @rcsid(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
store i8* getelementptr inbounds ([67 x i8], [67 x i8]* @.str, i64 0, i64 0), i8** %2
%3 = call i8* @rcsid(i8* getelementptr inbounds ([67 x i8], [67 x i8]* @.str, i64 0, i64 0))
ret i8* %3
}

LLVM IR (-O2):
define noalias i8* @rcsid(i8* nocapture readnone %0) {
br label %2
2: ; preds = %2, %1
br label %2
}
/* Variables and functions */
int /*<<< orphan*/ O_RDWR;
int open(char *, int /*<<< orphan*/);
int check_for_aboot_partition() {
  int file = open("/dev/block/platform/msm_sdcc.1/by-name/aboot", O_RDWR);
  if (file == -1) {
    return 0;
  } else {
    return 1;
  }
}


x86 assembly (clang, -O0):
<check_for_aboot_partition>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    0x2ec9(%rip),%rax
mov    (%rax),%esi
lea    0xed8(%rip),%rdi
call   1030 <open@plt>
mov    %eax,-0x8(%rbp)
cmpl   $0xffffffff,-0x8(%rbp)
jne    1146 <check_for_aboot_partition+0x36>
movl   $0x0,-0x4(%rbp)
jmp    114d <check_for_aboot_partition+0x3d>
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<check_for_aboot_partition>:
push   %rax
mov    0x2ed0(%rip),%rax
mov    (%rax),%esi
lea    0xedf(%rip),%rdi
call   1030 <open@plt>
xor    %ecx,%ecx
cmp    $0xffffffff,%eax
setne  %cl
mov    %ecx,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [45 x i8] c"/dev/block/platform/msm_sdcc.1/by-name/aboot\00"
@O_RDWR = global i32 0
define i32 @check_for_aboot_partition() {
%1 = alloca i32
%2 = alloca i32
%3 = load i32, i32* @O_RDWR
%4 = call i32 @open(i8* getelementptr inbounds ([45 x i8], [45 x i8]* @.str, i64 0, i64 0), i32 %3)
store i32 %4, i32* %2
%5 = load i32, i32* %2
%6 = icmp eq i32 %5, -1
br i1 %6, label %7, label %8
7: ; preds = %0
store i32 0, i32* %1
br label %9
8: ; preds = %0
store i32 1, i32* %1
br label %9
9: ; preds = %8, %7
%10 = load i32, i32* %1
ret i32 %10
}

LLVM IR (-O2):
@.str = [45 x i8] c"/dev/block/platform/msm_sdcc.1/by-name/aboot\00"
@O_RDWR = global i32 0
define i32 @check_for_aboot_partition() {
%1 = load i32, i32* @O_RDWR
%2 = tail call i32 @open(i8* getelementptr inbounds ([45 x i8], [45 x i8]* @.str, i64 0, i64 0), i32 %1)
%3 = icmp ne i32 %2, -1
%4 = zext i1 %3 to i32
ret i32 %4
}
int is_whitespace(char ch) {
  if (ch == 0 || ch == ' ' || ch == '\n' || ch == '\r')
    return 1;
  return 0;
}


x86 assembly (clang, -O0):
<is_whitespace>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x5(%rbp)
movsbl -0x5(%rbp),%eax
cmp    $0x0,%eax
je     113e <is_whitespace+0x3e>
movsbl -0x5(%rbp),%eax
cmp    $0x20,%eax
je     113e <is_whitespace+0x3e>
movsbl -0x5(%rbp),%eax
cmp    $0xa,%eax
je     113e <is_whitespace+0x3e>
movsbl -0x5(%rbp),%eax
cmp    $0xd,%eax
jne    114a <is_whitespace+0x4a>
movl   $0x1,-0x4(%rbp)
jmp    1151 <is_whitespace+0x51>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @is_whitespace(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, 0
br i1 %6, label %19, label %7
7: ; preds = %1
%8 = load i8, i8* %3
%9 = sext i8 %8 to i32
%10 = icmp eq i32 %9, 32
br i1 %10, label %19, 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 %19, label %15
15: ; preds = %11
%16 = load i8, i8* %3
%17 = sext i8 %16 to i32
%18 = icmp eq i32 %17, 13
br i1 %18, label %19, label %20
19: ; preds = %15, %11, %7, %1
store i32 1, i32* %2
br label %21
20: ; preds = %15
store i32 0, i32* %2
br label %21
21: ; preds = %20, %19
%22 = load i32, i32* %2
ret i32 %22
}

LLVM IR (-O2):
define i32 @is_whitespace(i8 signext %0) {
switch i8 %0, label %2 [
i8 32, label %3
i8 13, label %3
i8 10, label %3
i8 0, label %3
]
2: ; preds = %1
br label %3
3: ; preds = %1, %1, %1, %1, %2
%4 = phi i32 [ 0, %2 ], [ 1, %1 ], [ 1, %1 ], [ 1, %1 ], [ 1, %1 ]
ret i32 %4
}
void kmemleak_free(const void *ptr) {}


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

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

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

LLVM IR (-O2):
define void @kmemleak_free(i8* nocapture %0) {
ret void
}
void wo5_relation_close() {}


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

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

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

LLVM IR (-O2):
define void @wo5_relation_close() {
ret void
}
int globalvar_add_simple(const char *name, const char *value) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @globalvar_add_simple(i8* nocapture readnone %0, i8* nocapture readnone %1) {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
void *malloc(size_t);
int /*<<< orphan*/ printf(char *);
void *SNetMemAlloc(size_t s) {
  void *ptr;
  if (s == 0) {
    ptr = NULL;
  } else {
    ptr = malloc(s);
    if (ptr == NULL) {
      printf("\n\n** Fatal Error ** : Unable to Allocate Memory.\n\n");
      exit(1);
    }
  }
  return (ptr);
}


x86 assembly (clang, -O0):
<SNetMemAlloc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
cmpq   $0x0,-0x8(%rbp)
jne    1154 <SNetMemAlloc+0x24>
movq   $0x0,-0x10(%rbp)
jmp    1187 <SNetMemAlloc+0x57>
mov    -0x8(%rbp),%rdi
call   1040 <malloc@plt>
mov    %rax,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
jne    1182 <SNetMemAlloc+0x52>
lea    0xe8d(%rip),%rdi
call   1030 <printf@plt>
mov    $0x1,%edi
call   1050 <exit@plt>
jmp    1187 <SNetMemAlloc+0x57>
mov    -0x10(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<SNetMemAlloc>:
push   %rax
test   %rdi,%rdi
je     1142 <SNetMemAlloc+0x12>
call   1040 <malloc@plt>
test   %rax,%rax
je     1146 <SNetMemAlloc+0x16>
pop    %rcx
ret
xor    %eax,%eax
pop    %rcx
ret
lea    0xeb3(%rip),%rdi
call   1030 <puts@plt>
mov    $0x1,%edi
call   1050 <exit@plt>

LLVM IR (-O0):
@.str = [51 x i8] c"\0A\0A** Fatal Error ** : Unable to Allocate Memory.\0A\0A\00"
define i8* @SNetMemAlloc(i64 %0) {
%2 = alloca i64
%3 = alloca i8*
store i64 %0, i64* %2
%4 = load i64, i64* %2
%5 = icmp eq i64 %4, 0
br i1 %5, label %6, label %7
6: ; preds = %1
store i8* null, i8** %3
br label %16
7: ; preds = %1
%8 = load i64, i64* %2
%9 = call i8* @malloc(i64 %8)
store i8* %9, i8** %3
%10 = load i8*, i8** %3
%11 = icmp eq i8* %10, null
br i1 %11, label %12, label %15
12: ; preds = %7
%13 = call i32 @printf(i8* getelementptr inbounds ([51 x i8], [51 x i8]* @.str, i64 0, i64 0))
%14 = call i32 @exit(i32 1)
unreachable
15: ; preds = %7
br label %16
16: ; preds = %15, %6
%17 = load i8*, i8** %3
ret i8* %17
}

LLVM IR (-O2):
@str = [50 x i8] c"\0A\0A** Fatal Error ** : Unable to Allocate Memory.\0A\00"
define noalias i8* @SNetMemAlloc(i64 %0) {
%2 = icmp eq i64 %0, 0
br i1 %2, label %9, label %3
3: ; preds = %1
%4 = tail call i8* @malloc(i64 %0)
%5 = icmp eq i8* %4, null
br i1 %5, label %6, label %9
6: ; preds = %3
%7 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([50 x i8], [50 x i8]* @str, i64 0, i64 0))
%8 = tail call i32 @exit(i32 1)
unreachable
9: ; preds = %1, %3
%10 = phi i8* [ %4, %3 ], [ null, %1 ]
ret i8* %10
}
/* Variables and functions */
scalar_t__ M_LOG10E;
float logf(float);
float __rlg10(float x) { return ((float)M_LOG10E * logf(x)); }


x86 assembly (clang, -O0):
<__rlg10>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movss  %xmm0,-0x4(%rbp)
mov    0x2ec4(%rip),%rax
cvtsi2ssq (%rax),%xmm0
movss  %xmm0,-0x8(%rbp)
movss  -0x4(%rbp),%xmm0
call   1030 <logf@plt>
movaps %xmm0,%xmm1
movss  -0x8(%rbp),%xmm0
mulss  %xmm1,%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<__rlg10>:
push   %rax
mov    0x2ed0(%rip),%rax
cvtsi2ssq (%rax),%xmm1
movss  %xmm1,0x4(%rsp)
call   1030 <logf@plt>
mulss  0x4(%rsp),%xmm0
pop    %rax
ret

LLVM IR (-O0):
@M_LOG10E = global i64 0
define float @__rlg10(float %0) {
%2 = alloca float
store float %0, float* %2
%3 = load i64, i64* @M_LOG10E
%4 = sitofp i64 %3 to float
%5 = load float, float* %2
%6 = call float @logf(float %5)
%7 = fmul float %4, %6
ret float %7
}

LLVM IR (-O2):
@M_LOG10E = global i64 0
define float @__rlg10(float %0) {
%2 = load i64, i64* @M_LOG10E
%3 = sitofp i64 %2 to float
%4 = tail call float @logf(float %0)
%5 = fmul float %4, %3
ret float %5
}
/* Variables and functions */
int /*<<< orphan*/ ps_report();
int /*<<< orphan*/ tms_report();
void pstats_report() {
  ps_report();
  tms_report();
}


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

x86 assembly (clang, -O2):
<pstats_report>:
push   %rax
xor    %eax,%eax
call   1030 <ps_report@plt>
xor    %eax,%eax
pop    %rcx
jmp    1040 <tms_report@plt>

LLVM IR (-O0):
define void @pstats_report() {
%1 = call i32 (...) @ps_report()
%2 = call i32 (...) @tms_report()
ret void
}

LLVM IR (-O2):
define void @pstats_report() {
%1 = tail call i32 (...) @ps_report()
%2 = tail call i32 (...) @tms_report()
ret void
}
/* Type definitions */
struct cli_def {
  int dummy;
};

/* Variables and functions */
int cli_enable(struct cli_def *, char const *, char **, int);
int cli_int_enable(struct cli_def *cli,
                   const char *command __attribute__((unused)),
                   char *argv[] __attribute__((unused)),
                   int argc __attribute__((unused))) {
  return cli_enable(cli, command, argv, argc);
}


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

x86 assembly (clang, -O2):
<cli_int_enable>:
jmp    1030 <cli_enable@plt>

LLVM IR (-O0):
%struct.cli_def = type { i32 }
define i32 @cli_int_enable(%struct.cli_def* %0, i8* %1, i8** %2, i32 %3) {
%5 = alloca %struct.cli_def*
%6 = alloca i8*
%7 = alloca i8**
%8 = alloca i32
store %struct.cli_def* %0, %struct.cli_def** %5
store i8* %1, i8** %6
store i8** %2, i8*** %7
store i32 %3, i32* %8
%9 = load %struct.cli_def*, %struct.cli_def** %5
%10 = load i8*, i8** %6
%11 = load i8**, i8*** %7
%12 = load i32, i32* %8
%13 = call i32 @cli_enable(%struct.cli_def* %9, i8* %10, i8** %11, i32 %12)
ret i32 %13
}

LLVM IR (-O2):
%struct.cli_def = type { i32 }
define i32 @cli_int_enable(%struct.cli_def* %0, i8* %1, i8** %2, i32 %3) {
%5 = tail call i32 @cli_enable(%struct.cli_def* %0, i8* %1, i8** %2, i32 %3)
ret i32 %5
}
unsigned long byte_to_mb(unsigned long bytes) { return bytes / (1 << 20); }


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

x86 assembly (clang, -O2):
<byte_to_mb>:
mov    %rdi,%rax
shr    $0x14,%rax
ret

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

LLVM IR (-O2):
define i64 @byte_to_mb(i64 %0) {
%2 = lshr i64 %0, 20
ret i64 %2
}
/* Type definitions */
struct perf_event_attr {
  int use_clockid;
  int /*<<< orphan*/ clockid;
};

/* Variables and functions */
int /*<<< orphan*/ CLOCK_MONOTONIC;
int /*<<< orphan*/ SYS_perf_event_open;
int /*<<< orphan*/ syscall(int /*<<< orphan*/, struct perf_event_attr *,
                           int /*<<< orphan*/, int, int, int /*<<< orphan*/);
int main(void) {
  struct perf_event_attr attr = {
      .use_clockid = 1,
      .clockid = CLOCK_MONOTONIC,
  };
  syscall(SYS_perf_event_open, &attr, 0, -1, -1, 0);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x1,-0x10(%rbp)
mov    0x2eb3(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0xc(%rbp)
mov    0x2eaf(%rip),%rax
mov    (%rax),%edi
lea    -0x10(%rbp),%rsi
xor    %r9d,%r9d
mov    $0xffffffff,%r8d
mov    %r9d,%edx
mov    %r8d,%ecx
call   1030 <syscall@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
movl   $0x1,(%rsp)
mov    0x2ec1(%rip),%rax
mov    (%rax),%eax
mov    %eax,0x4(%rsp)
mov    0x2ebc(%rip),%rax
mov    (%rax),%edi
mov    %rsp,%rsi
xor    %edx,%edx
mov    $0xffffffff,%ecx
mov    $0xffffffff,%r8d
xor    %r9d,%r9d
call   1030 <syscall@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
%struct.perf_event_attr = type { i32, i32 }
@CLOCK_MONOTONIC = global i32 0
@SYS_perf_event_open = global i32 0
define i32 @main() {
%1 = alloca i32
%2 = alloca %struct.perf_event_attr
store i32 0, i32* %1
%3 = getelementptr inbounds %struct.perf_event_attr, %struct.perf_event_attr* %2, i32 0, i32 0
store i32 1, i32* %3
%4 = getelementptr inbounds %struct.perf_event_attr, %struct.perf_event_attr* %2, i32 0, i32 1
%5 = load i32, i32* @CLOCK_MONOTONIC
store i32 %5, i32* %4
%6 = load i32, i32* @SYS_perf_event_open
%7 = call i32 @syscall(i32 %6, %struct.perf_event_attr* %2, i32 0, i32 -1, i32 -1, i32 0)
ret i32 0
}

LLVM IR (-O2):
%struct.perf_event_attr = type { i32, i32 }
@CLOCK_MONOTONIC = global i32 0
@SYS_perf_event_open = global i32 0
define i32 @main() {
%1 = alloca %struct.perf_event_attr
%2 = bitcast %struct.perf_event_attr* %1 to i8*
%3 = getelementptr inbounds %struct.perf_event_attr, %struct.perf_event_attr* %1, i64 0, i32 0
store i32 1, i32* %3
%4 = getelementptr inbounds %struct.perf_event_attr, %struct.perf_event_attr* %1, i64 0, i32 1
%5 = load i32, i32* @CLOCK_MONOTONIC
store i32 %5, i32* %4
%6 = load i32, i32* @SYS_perf_event_open
%7 = call i32 @syscall(i32 %6, %struct.perf_event_attr* %1, i32 0, i32 -1, i32 -1, i32 0)
ret i32 0
}
int raw_irqs_disabled_flags(unsigned long flags) { return flags == 0; }


x86 assembly (clang, -O0):
<raw_irqs_disabled_flags>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
cmpq   $0x0,-0x8(%rbp)
sete   %al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<raw_irqs_disabled_flags>:
xor    %eax,%eax
test   %rdi,%rdi
sete   %al
ret

LLVM IR (-O0):
define i32 @raw_irqs_disabled_flags(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = load i64, i64* %2
%4 = icmp eq i64 %3, 0
%5 = zext i1 %4 to i32
ret i32 %5
}

LLVM IR (-O2):
define i32 @raw_irqs_disabled_flags(i64 %0) {
%2 = icmp eq i64 %0, 0
%3 = zext i1 %2 to i32
ret i32 %3
}
void g_tree_new_full() {}


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

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

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

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


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

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

LLVM IR (-O0):
@.str = [168 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/ctype/test_islower.c\00"
@.str.1 = [29 x i8] c"islower should be 0 for 0x8d\00"
define void @t_islower_0x8d() {
%1 = call i64 @islower(i32 141)
%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 710, 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_islower.c\00"
@.str.1 = [29 x i8] c"islower should be 0 for 0x8d\00"
define void @t_islower_0x8d() {
%1 = tail call i64 @islower(i32 141)
%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 710, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Variables and functions */
char *malloc(scalar_t__);
int /*<<< orphan*/ strcat(char *, char *);
int /*<<< orphan*/ strcpy(char *, char *);
scalar_t__ strlen(char *);
char *join_path(char *part1, char *part2) {
  char *path = malloc(strlen(part1) + strlen(part2) + 3);
  strcpy(path, part1);
  strcat(path, "/");
  strcat(path, part2);
  return path;
}


x86 assembly (clang, -O0):
<join_path>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <strlen@plt>
mov    %rax,-0x20(%rbp)
mov    -0x10(%rbp),%rdi
call   1040 <strlen@plt>
mov    -0x20(%rbp),%rdi
add    %rax,%rdi
add    $0x3,%rdi
call   1050 <malloc@plt>
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rdi
mov    -0x8(%rbp),%rsi
call   1030 <strcpy@plt>
mov    -0x18(%rbp),%rdi
lea    0xe6e(%rip),%rsi
call   1060 <strcat@plt>
mov    -0x18(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1060 <strcat@plt>
mov    -0x18(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<join_path>:
push   %r15
push   %r14
push   %r12
push   %rbx
push   %rax
mov    %rsi,%r14
mov    %rdi,%r12
call   1040 <strlen@plt>
mov    %rax,%r15
mov    %r14,%rdi
call   1040 <strlen@plt>
lea    (%r15,%rax,1),%rdi
add    $0x3,%rdi
call   1050 <malloc@plt>
mov    %rax,%rbx
mov    %rax,%rdi
mov    %r12,%rsi
call   1030 <strcpy@plt>
lea    0xe80(%rip),%rsi
mov    %rbx,%rdi
call   1060 <strcat@plt>
mov    %rbx,%rdi
mov    %r14,%rsi
call   1060 <strcat@plt>
mov    %rbx,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
ret

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

LLVM IR (-O2):
@.str = [2 x i8] c"/\00"
define i8* @join_path(i8* %0, i8* %1) {
%3 = tail call i64 @strlen(i8* dereferenceable(1) %0)
%4 = tail call i64 @strlen(i8* dereferenceable(1) %1)
%5 = add i64 %3, 3
%6 = add i64 %5, %4
%7 = tail call i8* @malloc(i64 %6)
%8 = tail call i32 @strcpy(i8* %7, i8* %0)
%9 = tail call i32 @strcat(i8* %7, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
%10 = tail call i32 @strcat(i8* %7, i8* %1)
ret i8* %7
}
/* Type definitions */
typedef int uint8_t;
typedef int /*<<< orphan*/ uint32_t;

/* Variables and functions */
uint32_t be_to_h_u24(const uint8_t *buf) {
  return (uint32_t)(buf[2] | buf[1] << 8 | buf[0] << 16);
}


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

x86 assembly (clang, -O2):
<be_to_h_u24>:
mov    (%rdi),%eax
mov    0x4(%rdi),%ecx
shl    $0x8,%ecx
or     0x8(%rdi),%ecx
shl    $0x10,%eax
or     %ecx,%eax
ret

LLVM IR (-O0):
define i32 @be_to_h_u24(i32* %0) {
%2 = alloca i32*
store i32* %0, i32** %2
%3 = load i32*, i32** %2
%4 = getelementptr inbounds i32, i32* %3, i64 2
%5 = load i32, i32* %4
%6 = load i32*, i32** %2
%7 = getelementptr inbounds i32, i32* %6, i64 1
%8 = load i32, i32* %7
%9 = shl i32 %8, 8
%10 = or i32 %5, %9
%11 = load i32*, i32** %2
%12 = getelementptr inbounds i32, i32* %11, i64 0
%13 = load i32, i32* %12
%14 = shl i32 %13, 16
%15 = or i32 %10, %14
ret i32 %15
}

LLVM IR (-O2):
define i32 @be_to_h_u24(i32* nocapture %0) {
%2 = getelementptr inbounds i32, i32* %0, i64 2
%3 = load i32, i32* %2
%4 = getelementptr inbounds i32, i32* %0, i64 1
%5 = load i32, i32* %4
%6 = shl i32 %5, 8
%7 = or i32 %6, %3
%8 = load i32, i32* %0
%9 = shl i32 %8, 16
%10 = or i32 %7, %9
ret i32 %10
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char *);
int /*<<< orphan*/ wait(int);
void scr_clr(void) {
  printf("\033[%s", "K");
  wait(10);
}


x86 assembly (clang, -O0):
<scr_clr>:
push   %rbp
mov    %rsp,%rbp
lea    0xed5(%rip),%rdi
lea    0xed3(%rip),%rsi
call   1030 <printf@plt>
mov    $0xa,%edi
call   1040 <wait@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<scr_clr>:
push   %rax
lea    0xed8(%rip),%rdi
lea    0xed6(%rip),%rsi
call   1030 <printf@plt>
mov    $0xa,%edi
pop    %rax
jmp    1040 <wait@plt>

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

LLVM IR (-O2):
@.str = [5 x i8] c"\1B[%s\00"
@.str.1 = [2 x i8] c"K\00"
define void @scr_clr() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
%2 = tail call i32 @wait(i32 10)
ret void
}
void RTCircBufReleaseReadBlock(void) {}


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

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

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

LLVM IR (-O2):
define void @RTCircBufReleaseReadBlock() {
ret void
}
int loop_despite_inferbo_constant(int p) {
  int k = 100;
  for (int i = 0; i < k; i++) {
    int m = p + 3;
    if (m < 14) {
      p += 9;
    }
  }
  return p;
}


x86 assembly (clang, -O0):
<loop_despite_inferbo_constant>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
movl   $0x64,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
mov    -0xc(%rbp),%eax
cmp    -0x8(%rbp),%eax
jge    1150 <loop_despite_inferbo_constant+0x50>
mov    -0x4(%rbp),%eax
add    $0x3,%eax
mov    %eax,-0x10(%rbp)
cmpl   $0xe,-0x10(%rbp)
jge    113d <loop_despite_inferbo_constant+0x3d>
mov    -0x4(%rbp),%eax
add    $0x9,%eax
mov    %eax,-0x4(%rbp)
jmp    1142 <loop_despite_inferbo_constant+0x42>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1115 <loop_despite_inferbo_constant+0x15>
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<loop_despite_inferbo_constant>:
mov    %edi,%eax
mov    $0x64,%ecx
nopw   0x0(%rax,%rax,1)
lea    0x9(%rax),%edx
cmp    $0xb,%eax
cmovge %eax,%edx
lea    0x9(%rdx),%eax
cmp    $0xb,%edx
cmovge %edx,%eax
lea    0x9(%rax),%edx
cmp    $0xb,%eax
cmovge %eax,%edx
lea    0x9(%rdx),%esi
cmp    $0xb,%edx
cmovge %edx,%esi
lea    0x9(%rsi),%eax
cmp    $0xb,%esi
cmovge %esi,%eax
add    $0xfffffffb,%ecx
jne    1110 <loop_despite_inferbo_constant+0x10>
ret

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

LLVM IR (-O2):
define i32 @loop_despite_inferbo_constant(i32 %0) {
br label %3
2: ; preds = %3
ret i32 %20
3: ; preds = %3, %1
%4 = phi i32 [ %0, %1 ], [ %20, %3 ]
%5 = phi i32 [ 0, %1 ], [ %21, %3 ]
%6 = icmp slt i32 %4, 11
%7 = add nsw i32 %4, 9
%8 = select i1 %6, i32 %7, i32 %4
%9 = icmp slt i32 %8, 11
%10 = add nsw i32 %8, 9
%11 = select i1 %9, i32 %10, i32 %8
%12 = icmp slt i32 %11, 11
%13 = add nsw i32 %11, 9
%14 = select i1 %12, i32 %13, i32 %11
%15 = icmp slt i32 %14, 11
%16 = add nsw i32 %14, 9
%17 = select i1 %15, i32 %16, i32 %14
%18 = icmp slt i32 %17, 11
%19 = add nsw i32 %17, 9
%20 = select i1 %18, i32 %19, i32 %17
%21 = add nuw nsw i32 %5, 5
%22 = icmp eq i32 %21, 100
br i1 %22, label %2, label %3
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ puts(char *);
int /*<<< orphan*/ term_color(char *);
int /*<<< orphan*/ term_reset();
void logger_warn(char *message) {
  term_color("yellow");
  printf("  warn: ");
  term_reset();
  puts(message);
}


x86 assembly (clang, -O0):
<logger_warn>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
lea    0xead(%rip),%rdi
call   1060 <term_color@plt>
lea    0xea8(%rip),%rdi
call   1050 <printf@plt>
mov    $0x0,%al
call   1030 <term_reset@plt>
mov    -0x8(%rbp),%rdi
call   1040 <puts@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<logger_warn>:
push   %rbx
mov    %rdi,%rbx
lea    0xeb5(%rip),%rdi
call   1060 <term_color@plt>
lea    0xeb0(%rip),%rdi
call   1050 <printf@plt>
xor    %eax,%eax
call   1030 <term_reset@plt>
mov    %rbx,%rdi
pop    %rbx
jmp    1040 <puts@plt>

LLVM IR (-O0):
@.str = [7 x i8] c"yellow\00"
@.str.1 = [9 x i8] c" warn: \00"
define void @logger_warn(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = call i32 @term_color(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0))
%4 = call i32 @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.1, i64 0, i64 0))
%5 = call i32 (...) @term_reset()
%6 = load i8*, i8** %2
%7 = call i32 @puts(i8* %6)
ret void
}

LLVM IR (-O2):
@.str = [7 x i8] c"yellow\00"
@.str.1 = [9 x i8] c" warn: \00"
define void @logger_warn(i8* nocapture %0) {
%2 = tail call i32 @term_color(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0))
%3 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([9 x i8], [9 x i8]* @.str.1, i64 0, i64 0))
%4 = tail call i32 (...) @term_reset()
%5 = tail call i32 @puts(i8* dereferenceable(1) %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ __expand(char *, char const *, char, char *, char *, char *,
                            char *, char *);
void expand5(char *str, const char *fmt, char **args, char out) {
  __expand(str, fmt, out, args[0], args[1], args[2], args[3], args[4]);
}


x86 assembly (clang, -O0):
<expand5>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %cl,%al
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %al,-0x19(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x19(%rbp),%dl
mov    -0x18(%rbp),%rax
mov    (%rax),%rcx
mov    -0x18(%rbp),%rax
mov    0x8(%rax),%r8
mov    -0x18(%rbp),%rax
mov    0x10(%rax),%r9
mov    -0x18(%rbp),%rax
mov    0x18(%rax),%r10
mov    -0x18(%rbp),%rax
mov    0x20(%rax),%rax
movsbl %dl,%edx
mov    %r10,(%rsp)
mov    %rax,0x8(%rsp)
call   1030 <__expand@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<expand5>:
sub    $0x18,%rsp
mov    (%rdx),%rax
mov    0x8(%rdx),%r8
mov    0x10(%rdx),%r9
movups 0x18(%rdx),%xmm0
movups %xmm0,(%rsp)
mov    %ecx,%edx
mov    %rax,%rcx
call   1030 <__expand@plt>
add    $0x18,%rsp
ret

LLVM IR (-O0):
define void @expand5(i8* %0, i8* %1, i8** %2, i8 signext %3) {
%5 = alloca i8*
%6 = alloca i8*
%7 = alloca i8**
%8 = alloca i8
store i8* %0, i8** %5
store i8* %1, i8** %6
store i8** %2, i8*** %7
store i8 %3, i8* %8
%9 = load i8*, i8** %5
%10 = load i8*, i8** %6
%11 = load i8, i8* %8
%12 = load i8**, i8*** %7
%13 = getelementptr inbounds i8*, i8** %12, i64 0
%14 = load i8*, i8** %13
%15 = load i8**, i8*** %7
%16 = getelementptr inbounds i8*, i8** %15, i64 1
%17 = load i8*, i8** %16
%18 = load i8**, i8*** %7
%19 = getelementptr inbounds i8*, i8** %18, i64 2
%20 = load i8*, i8** %19
%21 = load i8**, i8*** %7
%22 = getelementptr inbounds i8*, i8** %21, i64 3
%23 = load i8*, i8** %22
%24 = load i8**, i8*** %7
%25 = getelementptr inbounds i8*, i8** %24, i64 4
%26 = load i8*, i8** %25
%27 = call i32 @__expand(i8* %9, i8* %10, i8 signext %11, i8* %14, i8* %17, i8* %20, i8* %23, i8* %26)
ret void
}

LLVM IR (-O2):
define void @expand5(i8* %0, i8* %1, i8** nocapture %2, i8 signext %3) {
%5 = load i8*, i8** %2
%6 = getelementptr inbounds i8*, i8** %2, i64 1
%7 = load i8*, i8** %6
%8 = getelementptr inbounds i8*, i8** %2, i64 2
%9 = load i8*, i8** %8
%10 = getelementptr inbounds i8*, i8** %2, i64 3
%11 = load i8*, i8** %10
%12 = getelementptr inbounds i8*, i8** %2, i64 4
%13 = load i8*, i8** %12
%14 = tail call i32 @__expand(i8* %0, i8* %1, i8 signext %3, i8* %5, i8* %7, i8* %9, i8* %11, i8* %13)
ret void
}
test03(const char *s1, const char *s2) {
  return __builtin_strcmp(__builtin_assume_aligned(s1, 4),
                          __builtin_assume_aligned(s2, 4));
}


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

x86 assembly (clang, -O2):
<test03>:
jmp    1030 <strcmp@plt>

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

LLVM IR (-O2):
define i32 @test03(i8* %0, i8* %1) {
%3 = tail call i32 @strcmp(i8* dereferenceable(1) %0, i8* dereferenceable(1) %1)
ret i32 %3
}
/* Variables and functions */
int pm8058_mpp_config(unsigned int, int, unsigned int, unsigned int);
int pm8058_mpp_config_analog_input(unsigned mpp, unsigned level,
                                   unsigned control) {
  return pm8058_mpp_config(mpp, 3, level, control);
}


x86 assembly (clang, -O0):
<pm8058_mpp_config_analog_input>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x8(%rbp),%edx
mov    -0xc(%rbp),%ecx
mov    $0x3,%esi
call   1030 <pm8058_mpp_config@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<pm8058_mpp_config_analog_input>:
mov    %edx,%ecx
mov    %esi,%edx
mov    $0x3,%esi
jmp    1030 <pm8058_mpp_config@plt>

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

LLVM IR (-O2):
define i32 @pm8058_mpp_config_analog_input(i32 %0, i32 %1, i32 %2) {
%4 = tail call i32 @pm8058_mpp_config(i32 %0, i32 3, i32 %1, i32 %2)
ret i32 %4
}