xunge/DecIR huggingface dataset:
double cephes_btdtr(a, b, x)
double a, b, x;
{ return (cephes_incbet(a, b, x)); }


x86 assembly (clang, -O0):
<cephes_btdtr>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  %xmm2,-0x18(%rbp)
movsd  -0x8(%rbp),%xmm0
movsd  -0x10(%rbp),%xmm1
movsd  -0x18(%rbp),%xmm2
mov    $0x3,%al
call   1030 <cephes_incbet@plt>
cvtsi2sd %eax,%xmm0
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<cephes_btdtr>:
push   %rax
mov    $0x3,%al
call   1030 <cephes_incbet@plt>
xorps  %xmm0,%xmm0
cvtsi2sd %eax,%xmm0
pop    %rax
ret

LLVM IR (-O0):
define double @cephes_btdtr(double %0, double %1, double %2) {
%4 = alloca double
%5 = alloca double
%6 = alloca double
store double %0, double* %4
store double %1, double* %5
store double %2, double* %6
%7 = load double, double* %4
%8 = load double, double* %5
%9 = load double, double* %6
%10 = call i32 (double, double, double, ...) bitcast (i32 (...)* @cephes_incbet to i32 (double, double, double, ...)*)(double %7, double %8, double %9)
%11 = sitofp i32 %10 to double
ret double %11
}

LLVM IR (-O2):
define double @cephes_btdtr(double %0, double %1, double %2) {
%4 = tail call i32 (double, double, double, ...) bitcast (i32 (...)* @cephes_incbet to i32 (double, double, double, ...)*)(double %0, double %1, double %2)
%5 = sitofp i32 %4 to double
ret double %5
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
void goLeft(int dx) { printf("\e[%dD", dx); }


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

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

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

LLVM IR (-O2):
@.str = [6 x i8] c"\1B[%dD\00"
define void @goLeft(i32 %0) {
%2 = tail call i32 @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i32 %0)
ret void
}
/* Type definitions */
typedef scalar_t__ uint32_t;

/* Variables and functions */
int /*<<< orphan*/ assert(int /*<<< orphan*/);
int /*<<< orphan*/ pn_is_power_of_two(scalar_t__);
void *pn_align_down_pointer(void *p, uint32_t align) {
  assert(pn_is_power_of_two(align));
  return (void *)((intptr_t)p & ~((intptr_t)align - 1));
}


x86 assembly (clang, -O0):
<pn_align_down_pointer>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
call   1040 <pn_is_power_of_two@plt>
mov    %eax,%edi
call   1030 <assert@plt>
mov    -0x8(%rbp),%rax
mov    -0x10(%rbp),%rcx
sub    $0x1,%rcx
xor    $0xffffffffffffffff,%rcx
and    %rcx,%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<pn_align_down_pointer>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%rbx
mov    %rdi,%r14
mov    %rsi,%rdi
call   1040 <pn_is_power_of_two@plt>
mov    %eax,%edi
call   1030 <assert@plt>
neg    %rbx
and    %r14,%rbx
mov    %rbx,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define i8* @pn_align_down_pointer(i8* %0, i64 %1) {
%3 = alloca i8*
%4 = alloca i64
store i8* %0, i8** %3
store i64 %1, i64* %4
%5 = load i64, i64* %4
%6 = call i32 @pn_is_power_of_two(i64 %5)
%7 = call i32 @assert(i32 %6)
%8 = load i8*, i8** %3
%9 = ptrtoint i8* %8 to i64
%10 = load i64, i64* %4
%11 = sub nsw i64 %10, 1
%12 = xor i64 %11, -1
%13 = and i64 %9, %12
%14 = inttoptr i64 %13 to i8*
ret i8* %14
}

LLVM IR (-O2):
define i8* @pn_align_down_pointer(i8* %0, i64 %1) {
%3 = tail call i32 @pn_is_power_of_two(i64 %1)
%4 = tail call i32 @assert(i32 %3)
%5 = ptrtoint i8* %0 to i64
%6 = sub i64 0, %1
%7 = and i64 %5, %6
%8 = inttoptr i64 %7 to i8*
ret i8* %8
}
/* Variables and functions */
void buf_rnd(char *buf, const size_t size) { return; }


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

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

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

LLVM IR (-O2):
define void @buf_rnd(i8* nocapture %0, i64 %1) {
ret void
}
/* Type definitions */
struct kdnode {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ free(struct kdnode *);
void kdnode_free(struct kdnode *node) { free(node); }


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

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

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

LLVM IR (-O2):
%struct.kdnode = type { i32 }
define void @kdnode_free(%struct.kdnode* nocapture %0) {
%2 = tail call i32 @free(%struct.kdnode* %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ chdir(char *);
int /*<<< orphan*/ creat(char *, int);
int /*<<< orphan*/ mkdir(char *, int);
int main() {
  chdir("/home/shahas/Desktop/");
  mkdir("new_dir1", 0777);
  chdir("new_dir1");
  creat("database.txt", 0777);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
lea    0xec5(%rip),%rdi
call   1040 <chdir@plt>
lea    0xecf(%rip),%rdi
mov    $0x1ff,%esi
call   1030 <mkdir@plt>
lea    0xebe(%rip),%rdi
call   1040 <chdir@plt>
lea    0xebb(%rip),%rdi
mov    $0x1ff,%esi
call   1050 <creat@plt>
xor    %eax,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
lea    0xec8(%rip),%rdi
call   1040 <chdir@plt>
lea    0xed2(%rip),%rbx
mov    %rbx,%rdi
mov    $0x1ff,%esi
call   1030 <mkdir@plt>
mov    %rbx,%rdi
call   1040 <chdir@plt>
lea    0xebf(%rip),%rdi
mov    $0x1ff,%esi
call   1050 <creat@plt>
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [22 x i8] c"/home/shahas/Desktop/\00"
@.str.1 = [9 x i8] c"new_dir1\00"
@.str.2 = [13 x i8] c"database.txt\00"
define i32 @main() {
%1 = call i32 @chdir(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0))
%2 = call i32 @mkdir(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.1, i64 0, i64 0), i32 511)
%3 = call i32 @chdir(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.1, i64 0, i64 0))
%4 = call i32 @creat(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.2, i64 0, i64 0), i32 511)
ret i32 0
}

LLVM IR (-O2):
@.str = [22 x i8] c"/home/shahas/Desktop/\00"
@.str.1 = [9 x i8] c"new_dir1\00"
@.str.2 = [13 x i8] c"database.txt\00"
define i32 @main() {
%1 = tail call i32 @chdir(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0))
%2 = tail call i32 @mkdir(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.1, i64 0, i64 0), i32 511)
%3 = tail call i32 @chdir(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.1, i64 0, i64 0))
%4 = tail call i32 @creat(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.2, i64 0, i64 0), i32 511)
ret i32 0
}
/* Type definitions */
typedef int /*<<< orphan*/ ssize_t;
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
ssize_t knot_getline(char **lineptr, size_t *n, FILE *stream) {}


x86 assembly (clang, -O0):
<knot_getline>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    %rdx,-0x20(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @knot_getline(i8** %0, i64* %1, i32* %2) {
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i64*
%7 = alloca i32*
store i8** %0, i8*** %5
store i64* %1, i64** %6
store i32* %2, i32** %7
%8 = load i32, i32* %4
ret i32 %8
}

LLVM IR (-O2):
define i32 @knot_getline(i8** nocapture readnone %0, i64* nocapture readnone %1, i32* nocapture readnone %2) {
ret i32 undef
}
/* Variables and functions */
unsigned int _mm_crc32_u8(unsigned int, unsigned char);
unsigned int test_mm_crc32_u8(unsigned int CRC, unsigned char V) {
  return _mm_crc32_u8(CRC, V);
}


x86 assembly (clang, -O0):
<test_mm_crc32_u8>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %sil,%al
mov    %edi,-0x4(%rbp)
mov    %al,-0x5(%rbp)
mov    -0x4(%rbp),%edi
movzbl -0x5(%rbp),%esi
call   1030 <_mm_crc32_u8@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_mm_crc32_u8>:
jmp    1030 <_mm_crc32_u8@plt>

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

LLVM IR (-O2):
define i32 @test_mm_crc32_u8(i32 %0, i8 zeroext %1) {
%3 = tail call i32 @_mm_crc32_u8(i32 %0, i8 zeroext %1)
ret i32 %3
}
/* Type definitions */
struct svc_req {
  int dummy;
};

/* Variables and functions */
long time(long *);
long *bindate_1(void *arg1, struct svc_req *arg2) {
  static long timeval;
  timeval = time((long *)0);
  return (&timeval);
}


x86 assembly (clang, -O0):
<bindate_1>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
xor    %eax,%eax
mov    %eax,%edi
call   1030 <time@plt>
mov    %rax,0x2f00(%rip)
lea    0x2ef9(%rip),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<bindate_1>:
push   %rax
xor    %edi,%edi
call   1030 <time@plt>
mov    %rax,0x2f11(%rip)
lea    0x2f0a(%rip),%rax
pop    %rcx
ret

LLVM IR (-O0):
%struct.svc_req = type { i32 }
@bindate_1.timeval = internal global i64 0
define i64* @bindate_1(i8* %0, %struct.svc_req* %1) {
%3 = alloca i8*
%4 = alloca %struct.svc_req*
store i8* %0, i8** %3
store %struct.svc_req* %1, %struct.svc_req** %4
%5 = call i64 @time(i64* null)
store i64 %5, i64* @bindate_1.timeval
ret i64* @bindate_1.timeval
}

LLVM IR (-O2):
%struct.svc_req = type { i32 }
@bindate_1.timeval = internal global i64 0
define i64* @bindate_1(i8* nocapture readnone %0, %struct.svc_req* nocapture readnone %1) {
%3 = tail call i64 @time(i64* null)
store i64 %3, i64* @bindate_1.timeval
ret i64* @bindate_1.timeval
}
/* Variables and functions */
int /*<<< orphan*/ memcmp(char *, char *, int);
int is_final_match(char *line, char *search) {
  return !memcmp(&line[2], search, 2);
}


x86 assembly (clang, -O0):
<is_final_match>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
add    $0x2,%rdi
mov    -0x10(%rbp),%rsi
mov    $0x2,%edx
call   1030 <memcmp@plt>
cmp    $0x0,%eax
setne  %al
xor    $0xff,%al
and    $0x1,%al
movzbl %al,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<is_final_match>:
push   %rax
add    $0x2,%rdi
mov    $0x2,%edx
call   1030 <memcmp@plt>
xor    %ecx,%ecx
test   %eax,%eax
sete   %cl
mov    %ecx,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @is_final_match(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 = getelementptr inbounds i8, i8* %5, i64 2
%7 = load i8*, i8** %4
%8 = call i32 @memcmp(i8* %6, i8* %7, i32 2)
%9 = icmp ne i32 %8, 0
%10 = xor i1 %9, true
%11 = zext i1 %10 to i32
ret i32 %11
}

LLVM IR (-O2):
define i32 @is_final_match(i8* %0, i8* %1) {
%3 = getelementptr inbounds i8, i8* %0, i64 2
%4 = tail call i32 @memcmp(i8* %3, i8* %1, i32 2)
%5 = icmp eq i32 %4, 0
%6 = zext i1 %5 to i32
ret i32 %6
}
/* Variables and functions */
int /*<<< orphan*/ write_imm(int);
int /*<<< orphan*/ write_instr(int);
int f8_handler(char **save) {
  write_instr(0x00);
  write_imm(0x41);
  write_instr(0x28);
  return 0;
}


x86 assembly (clang, -O0):
<f8_handler>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
xor    %edi,%edi
call   1040 <write_instr@plt>
mov    $0x41,%edi
call   1030 <write_imm@plt>
mov    $0x28,%edi
call   1040 <write_instr@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<f8_handler>:
push   %rax
xor    %edi,%edi
call   1040 <write_instr@plt>
mov    $0x41,%edi
call   1030 <write_imm@plt>
mov    $0x28,%edi
call   1040 <write_instr@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @f8_handler(i8** %0) {
%2 = alloca i8**
store i8** %0, i8*** %2
%3 = call i32 @write_instr(i32 0)
%4 = call i32 @write_imm(i32 65)
%5 = call i32 @write_instr(i32 40)
ret i32 0
}

LLVM IR (-O2):
define i32 @f8_handler(i8** nocapture readnone %0) {
%2 = tail call i32 @write_instr(i32 0)
%3 = tail call i32 @write_imm(i32 65)
%4 = tail call i32 @write_instr(i32 40)
ret i32 0
}
void gtk_drag_check_threshold() {}


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

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

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

LLVM IR (-O2):
define void @gtk_drag_check_threshold() {
ret void
}
float initc() { return 4.0; }


x86 assembly (clang, -O0):
<initc>:
push   %rbp
mov    %rsp,%rbp
movss  0xef4(%rip),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<initc>:
movss  0xef8(%rip),%xmm0
ret

LLVM IR (-O0):
define float @initc() {
ret float 4.000000e+00
}

LLVM IR (-O2):
define float @initc() {
ret float 4.000000e+00
}
int test_imm_2Dint64_midword_reg(long long val) {
  return ((val >> 16) & (0x2D << 0)) ? -20 : -40;
}


x86 assembly (clang, -O0):
<test_imm_2Dint64_midword_reg>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdx
sar    $0x10,%rdx
and    $0x2d,%rdx
mov    $0xffffffd8,%eax
mov    $0xffffffec,%ecx
cmp    $0x0,%rdx
cmovne %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_imm_2Dint64_midword_reg>:
test   $0x2d0000,%edi
mov    $0xffffffd8,%ecx
mov    $0xffffffec,%eax
cmove  %ecx,%eax
ret

LLVM IR (-O0):
define i32 @test_imm_2Dint64_midword_reg(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = load i64, i64* %2
%4 = ashr i64 %3, 16
%5 = and i64 %4, 45
%6 = icmp ne i64 %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_2Dint64_midword_reg(i64 %0) {
%2 = and i64 %0, 2949120
%3 = icmp eq i64 %2, 0
%4 = select i1 %3, i32 -40, i32 -20
ret i32 %4
}
/* Variables and functions */
int abs_alias(int);
__attribute__((__always___)) int abs(int x) { return abs_alias(x); }


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

x86 assembly (clang, -O2):
<abs>:
jmp    1030 <abs_alias@plt>

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

LLVM IR (-O2):
define i32 @abs(i32 %0) {
%2 = tail call i32 @abs_alias(i32 %0)
ret i32 %2
}
int power(unsigned int a, unsigned int n) {
  if (n == 0) {
    return 1;
  }
  if ((n % 2) == 0) {
    return power(a * a, n / 2);
  }
  return a * power(a * a, n / 2);
}


x86 assembly (clang, -O0):
<power>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
cmpl   $0x0,-0xc(%rbp)
jne    1134 <power+0x24>
movl   $0x1,-0x4(%rbp)
jmp    1180 <power+0x70>
mov    -0xc(%rbp),%eax
and    $0x1,%eax
cmp    $0x0,%eax
jne    115d <power+0x4d>
mov    -0x8(%rbp),%edi
imul   -0x8(%rbp),%edi
mov    -0xc(%rbp),%esi
shr    $0x1,%esi
call   1030 <power@plt>
mov    %eax,-0x4(%rbp)
jmp    1180 <power+0x70>
mov    -0x8(%rbp),%eax
mov    %eax,-0x10(%rbp)
mov    -0x8(%rbp),%edi
imul   -0x8(%rbp),%edi
mov    -0xc(%rbp),%esi
shr    $0x1,%esi
call   1030 <power@plt>
mov    %eax,%ecx
mov    -0x10(%rbp),%eax
imul   %ecx,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<power>:
mov    $0x1,%eax
test   %esi,%esi
je     1138 <power+0x38>
mov    %esi,%ecx
mov    %edi,%edx
nopl   (%rax)
imul   %edi,%edi
shr    %esi
test   $0x1,%cl
jne    1130 <power+0x30>
mov    %edi,%edx
cmp    $0x2,%ecx
mov    %esi,%ecx
jae    1110 <power+0x10>
jmp    1138 <power+0x38>
cs nopw 0x0(%rax,%rax,1)
nop
imul   %edx,%eax
cmp    $0x1,%ecx
ja     1109 <power+0x9>
ret

LLVM IR (-O0):
define i32 @power(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
store i32 %0, i32* %4
store i32 %1, i32* %5
%6 = load i32, i32* %5
%7 = icmp eq i32 %6, 0
br i1 %7, label %8, label %9
8: ; preds = %2
store i32 1, i32* %3
br label %29
9: ; preds = %2
%10 = load i32, i32* %5
%11 = urem i32 %10, 2
%12 = icmp eq i32 %11, 0
br i1 %12, label %13, label %20
13: ; preds = %9
%14 = load i32, i32* %4
%15 = load i32, i32* %4
%16 = mul i32 %14, %15
%17 = load i32, i32* %5
%18 = udiv i32 %17, 2
%19 = call i32 @power(i32 %16, i32 %18)
store i32 %19, i32* %3
br label %29
20: ; preds = %9
%21 = load i32, i32* %4
%22 = load i32, i32* %4
%23 = load i32, i32* %4
%24 = mul i32 %22, %23
%25 = load i32, i32* %5
%26 = udiv i32 %25, 2
%27 = call i32 @power(i32 %24, i32 %26)
%28 = mul i32 %21, %27
store i32 %28, i32* %3
br label %29
29: ; preds = %20, %13, %8
%30 = load i32, i32* %3
ret i32 %30
}

LLVM IR (-O2):
define i32 @power(i32 %0, i32 %1) {
%3 = icmp eq i32 %1, 0
br i1 %3, label %20, label %4
4: ; preds = %2, %17
%5 = phi i32 [ %14, %17 ], [ %1, %2 ]
%6 = phi i32 [ %13, %17 ], [ %0, %2 ]
%7 = phi i32 [ %18, %17 ], [ 1, %2 ]
br label %8
8: ; preds = %4, %15
%9 = phi i32 [ %5, %4 ], [ %14, %15 ]
%10 = phi i32 [ %6, %4 ], [ %13, %15 ]
%11 = and i32 %9, 1
%12 = icmp eq i32 %11, 0
%13 = mul i32 %10, %10
%14 = lshr i32 %9, 1
br i1 %12, label %15, label %17
15: ; preds = %8
%16 = icmp ult i32 %9, 2
br i1 %16, label %20, label %8
17: ; preds = %8
%18 = mul i32 %10, %7
%19 = icmp ult i32 %9, 2
br i1 %19, label %20, label %4
20: ; preds = %17, %15, %2
%21 = phi i32 [ 1, %2 ], [ %7, %15 ], [ %18, %17 ]
ret i32 %21
}
/* Variables and functions */
int /*<<< orphan*/ get_mutex(int);
int pthread_mutex_unlock(int /*<<< orphan*/);
int unlock_fd(int fd) { return pthread_mutex_unlock(get_mutex(fd)); }


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

x86 assembly (clang, -O2):
<unlock_fd>:
push   %rax
call   1030 <get_mutex@plt>
mov    %eax,%edi
pop    %rax
jmp    1040 <pthread_mutex_unlock@plt>

LLVM IR (-O0):
define i32 @unlock_fd(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = call i32 @get_mutex(i32 %3)
%5 = call i32 @pthread_mutex_unlock(i32 %4)
ret i32 %5
}

LLVM IR (-O2):
define i32 @unlock_fd(i32 %0) {
%2 = tail call i32 @get_mutex(i32 %0)
%3 = tail call i32 @pthread_mutex_unlock(i32 %2)
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
scalar_t__ my_readir(char *);
int /*<<< orphan*/ printf(char *);
int main(int argc, char *argv[]) {
  if (argc < 2) {
    printf("listfile <target path>\n");
    exit(1);
  }
  if (my_readir(argv[1]) < 0) {
    exit(1);
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
cmpl   $0x2,-0x8(%rbp)
jge    1166 <main+0x36>
lea    0xea9(%rip),%rdi
call   1030 <printf@plt>
mov    $0x1,%edi
call   1050 <exit@plt>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
call   1040 <my_readir@plt>
cmp    $0x0,%rax
jge    1187 <main+0x57>
mov    $0x1,%edi
call   1050 <exit@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
cmp    $0x1,%edi
jle    1148 <main+0x18>
mov    0x8(%rsi),%rdi
call   1040 <my_readir@plt>
test   %rax,%rax
js     1154 <main+0x24>
xor    %eax,%eax
pop    %rcx
ret
lea    0xeb1(%rip),%rdi
call   1030 <puts@plt>
mov    $0x1,%edi
call   1050 <exit@plt>

LLVM IR (-O0):
@.str = [24 x i8] c"listfile <target path>\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%6 = load i32, i32* %4
%7 = icmp slt i32 %6, 2
br i1 %7, label %8, label %11
8: ; preds = %2
%9 = call i32 @printf(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str, i64 0, i64 0))
%10 = call i32 @exit(i32 1)
unreachable
11: ; preds = %2
%12 = load i8**, i8*** %5
%13 = getelementptr inbounds i8*, i8** %12, i64 1
%14 = load i8*, i8** %13
%15 = call i64 @my_readir(i8* %14)
%16 = icmp slt i64 %15, 0
br i1 %16, label %17, label %19
17: ; preds = %11
%18 = call i32 @exit(i32 1)
unreachable
19: ; preds = %11
ret i32 0
}

LLVM IR (-O2):
@str = [23 x i8] c"listfile <target path>\00"
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = icmp slt i32 %0, 2
br i1 %3, label %4, label %7
4: ; preds = %2
%5 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([23 x i8], [23 x i8]* @str, i64 0, i64 0))
%6 = tail call i32 @exit(i32 1)
unreachable
7: ; preds = %2
%8 = getelementptr inbounds i8*, i8** %1, i64 1
%9 = load i8*, i8** %8
%10 = tail call i64 @my_readir(i8* %9)
%11 = icmp slt i64 %10, 0
br i1 %11, label %12, label %14
12: ; preds = %7
%13 = tail call i32 @exit(i32 1)
unreachable
14: ; preds = %7
ret i32 0
}
int wpas_wps_ssid_bss_match(struct wpa_supplicant *wpa_s, struct wpa_ssid *ssid,
                            struct wpa_bss *bss) {
  return -1;
}


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

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

LLVM IR (-O0):
%struct.wpa_supplicant = type opaque
%struct.wpa_ssid = type opaque
%struct.wpa_bss = type opaque
define i32 @wpas_wps_ssid_bss_match(%struct.wpa_supplicant* %0, %struct.wpa_ssid* %1, %struct.wpa_bss* %2) {
%4 = alloca %struct.wpa_supplicant*
%5 = alloca %struct.wpa_ssid*
%6 = alloca %struct.wpa_bss*
store %struct.wpa_supplicant* %0, %struct.wpa_supplicant** %4
store %struct.wpa_ssid* %1, %struct.wpa_ssid** %5
store %struct.wpa_bss* %2, %struct.wpa_bss** %6
ret i32 -1
}

LLVM IR (-O2):
%struct.wpa_supplicant = type opaque
%struct.wpa_ssid = type opaque
%struct.wpa_bss = type opaque
define i32 @wpas_wps_ssid_bss_match(%struct.wpa_supplicant* nocapture readnone %0, %struct.wpa_ssid* nocapture readnone %1, %struct.wpa_bss* nocapture readnone %2) {
ret i32 -1
}
void closure(short *core, int n) {
  short *csend;
  csend = core + n;
}


x86 assembly (clang, -O0):
<closure>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
shl    $0x1,%rcx
add    %rcx,%rax
mov    %rax,-0x18(%rbp)
pop    %rbp
ret

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

LLVM IR (-O0):
define void @closure(i16* %0, i32 %1) {
%3 = alloca i16*
%4 = alloca i32
%5 = alloca i16*
store i16* %0, i16** %3
store i32 %1, i32* %4
%6 = load i16*, i16** %3
%7 = load i32, i32* %4
%8 = sext i32 %7 to i64
%9 = getelementptr inbounds i16, i16* %6, i64 %8
store i16* %9, i16** %5
ret void
}

LLVM IR (-O2):
define void @closure(i16* nocapture %0, i32 %1) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ Init_Display_Panel();
char initLcd(void *parameters) {
  Init_Display_Panel();
  return 0;
}


x86 assembly (clang, -O0):
<initLcd>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    $0x0,%al
call   1030 <Init_Display_Panel@plt>
xor    %eax,%eax
movsbl %al,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<initLcd>:
push   %rax
xor    %eax,%eax
call   1030 <Init_Display_Panel@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define signext i8 @initLcd(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = call i32 (...) @Init_Display_Panel()
ret i8 0
}

LLVM IR (-O2):
define signext i8 @initLcd(i8* nocapture readnone %0) {
%2 = tail call i32 (...) @Init_Display_Panel()
ret i8 0
}
/* Variables and functions */
int FD_SETSIZE;
int /*<<< orphan*/ _isfsync(int);
_issync() {
  int i;
  for (i = 0; i < FD_SETSIZE; i++)
    (void)_isfsync(i);
  return (0);
}


x86 assembly (clang, -O0):
<_issync>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
mov    0x2eb7(%rip),%rcx
cmp    (%rcx),%eax
jge    1147 <_issync+0x37>
mov    -0x4(%rbp),%edi
call   1030 <_isfsync@plt>
mov    -0x4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
jmp    111f <_issync+0xf>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<_issync>:
push   %r14
push   %rbx
push   %rax
mov    0x2ec5(%rip),%r14
cmpl   $0x0,(%r14)
jle    113f <_issync+0x2f>
xor    %ebx,%ebx
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
mov    %ebx,%edi
call   1030 <_isfsync@plt>
add    $0x1,%ebx
cmp    (%r14),%ebx
jl     1130 <_issync+0x20>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

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

LLVM IR (-O2):
@FD_SETSIZE = global i32 0
define i32 @_issync() {
%1 = load i32, i32* @FD_SETSIZE
%2 = icmp sgt i32 %1, 0
br i1 %2, label %3, label %9
3: ; preds = %0, %3
%4 = phi i32 [ %6, %3 ], [ 0, %0 ]
%5 = tail call i32 @_isfsync(i32 %4)
%6 = add nuw nsw i32 %4, 1
%7 = load i32, i32* @FD_SETSIZE
%8 = icmp slt i32 %6, %7
br i1 %8, label %3, label %9
9: ; preds = %3, %0
ret i32 0
}
/* Variables and functions */
int f73(int *);
int f74(int *p) { return f73(p); }


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

x86 assembly (clang, -O2):
<f74>:
jmp    1030 <f73@plt>

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

LLVM IR (-O2):
define i32 @f74(i32* %0) {
%2 = tail call i32 @f73(i32* %0)
ret i32 %2
}
/* Variables and functions */
scalar_t__ _U_Qfcmp(long double, long double, int);
int _U_Qfltgt(long double a, long double b) {
  return (_U_Qfcmp(a, b, 1 | 8 | 16) != 0);
}


x86 assembly (clang, -O0):
<_U_Qfltgt>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
fldt   0x20(%rbp)
fldt   0x10(%rbp)
fstpt  -0x10(%rbp)
fstpt  -0x20(%rbp)
fldt   -0x10(%rbp)
fldt   -0x20(%rbp)
mov    %rsp,%rax
fstpt  0x10(%rax)
fstpt  (%rax)
mov    $0x19,%edi
call   1030 <_U_Qfcmp@plt>
cmp    $0x0,%rax
setne  %al
and    $0x1,%al
movzbl %al,%eax
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<_U_Qfltgt>:
sub    $0x28,%rsp
fldt   0x30(%rsp)
fldt   0x40(%rsp)
fstpt  0x10(%rsp)
fstpt  (%rsp)
mov    $0x19,%edi
call   1030 <_U_Qfcmp@plt>
xor    %ecx,%ecx
test   %rax,%rax
setne  %cl
mov    %ecx,%eax
add    $0x28,%rsp
ret

LLVM IR (-O0):
define i32 @_U_Qfltgt(x86_fp80 %0, x86_fp80 %1) {
%3 = alloca x86_fp80
%4 = alloca x86_fp80
store x86_fp80 %0, x86_fp80* %3
store x86_fp80 %1, x86_fp80* %4
%5 = load x86_fp80, x86_fp80* %3
%6 = load x86_fp80, x86_fp80* %4
%7 = call i64 @_U_Qfcmp(x86_fp80 %5, x86_fp80 %6, i32 25)
%8 = icmp ne i64 %7, 0
%9 = zext i1 %8 to i32
ret i32 %9
}

LLVM IR (-O2):
define i32 @_U_Qfltgt(x86_fp80 %0, x86_fp80 %1) {
%3 = tail call i64 @_U_Qfcmp(x86_fp80 %0, x86_fp80 %1, i32 25)
%4 = icmp ne i64 %3, 0
%5 = zext i1 %4 to i32
ret i32 %5
}
/* Type definitions */
struct can_frame {
  int *data;
};

/* Variables and functions */
void sdo_expediate(struct can_frame *frame) { frame->data[0] |= 2; }


x86 assembly (clang, -O0):
<sdo_expediate>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%rax
mov    (%rax),%ecx
or     $0x2,%ecx
mov    %ecx,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<sdo_expediate>:
mov    (%rdi),%rax
orl    $0x2,(%rax)
ret

LLVM IR (-O0):
%struct.can_frame = type { i32* }
define void @sdo_expediate(%struct.can_frame* %0) {
%2 = alloca %struct.can_frame*
store %struct.can_frame* %0, %struct.can_frame** %2
%3 = load %struct.can_frame*, %struct.can_frame** %2
%4 = getelementptr inbounds %struct.can_frame, %struct.can_frame* %3, i32 0, i32 0
%5 = load i32*, i32** %4
%6 = getelementptr inbounds i32, i32* %5, i64 0
%7 = load i32, i32* %6
%8 = or i32 %7, 2
store i32 %8, i32* %6
ret void
}

LLVM IR (-O2):
%struct.can_frame = type { i32* }
define void @sdo_expediate(%struct.can_frame* nocapture %0) {
%2 = getelementptr inbounds %struct.can_frame, %struct.can_frame* %0, i64 0, i32 0
%3 = load i32*, i32** %2
%4 = load i32, i32* %3
%5 = or i32 %4, 2
store i32 %5, i32* %3
ret void
}
/* Variables and functions */
int /*<<< orphan*/ cli_command_loop();
int start_cli(void) {
  cli_command_loop();
  return 1;
}


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

x86 assembly (clang, -O2):
<start_cli>:
push   %rax
xor    %eax,%eax
call   1030 <cli_command_loop@plt>
mov    $0x1,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @start_cli() {
%1 = call i32 (...) @cli_command_loop()
ret i32 1
}

LLVM IR (-O2):
define i32 @start_cli() {
%1 = tail call i32 (...) @cli_command_loop()
ret i32 1
}
/* Variables and functions */
int /*<<< orphan*/ puts(char *);
int main(int argc, char *argv[]) { puts("Hello World"); }


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
lea    0xeda(%rip),%rdi
call   1030 <puts@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
@.str = [12 x i8] c"Hello World\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i8**
store i32 %0, i32* %3
store i8** %1, i8*** %4
%5 = call i32 @puts(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@.str = [12 x i8] c"Hello World\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0))
ret i32 0
}
int find_first_gt(double *x, double a, int n) {
  int i;
  for (i = 0; i < n; ++i)
    if (x[i] > a)
      break;
  return i;
}


x86 assembly (clang, -O0):
<find_first_gt>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movsd  %xmm0,-0x10(%rbp)
mov    %esi,-0x14(%rbp)
movl   $0x0,-0x18(%rbp)
mov    -0x18(%rbp),%eax
cmp    -0x14(%rbp),%eax
jge    1153 <find_first_gt+0x53>
mov    -0x8(%rbp),%rax
movslq -0x18(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
ucomisd -0x10(%rbp),%xmm0
jbe    1140 <find_first_gt+0x40>
jmp    1153 <find_first_gt+0x53>
jmp    1145 <find_first_gt+0x45>
mov    -0x18(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x18(%rbp)
jmp    1117 <find_first_gt+0x17>
mov    -0x18(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<find_first_gt>:
test   %esi,%esi
jle    1127 <find_first_gt+0x27>
mov    %esi,%ecx
xor    %eax,%eax
nopl   0x0(%rax,%rax,1)
movsd  (%rdi,%rax,8),%xmm1
ucomisd %xmm0,%xmm1
ja     1126 <find_first_gt+0x26>
add    $0x1,%rax
cmp    %rax,%rcx
jne    1110 <find_first_gt+0x10>
mov    %ecx,%eax
ret
xor    %eax,%eax
ret

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

LLVM IR (-O2):
define i32 @find_first_gt(double* nocapture %0, double %1, i32 %2) {
%4 = icmp sgt i32 %2, 0
br i1 %4, label %5, label %17
5: ; preds = %3
%6 = zext i32 %2 to i64
br label %7
7: ; preds = %5, %12
%8 = phi i64 [ 0, %5 ], [ %13, %12 ]
%9 = getelementptr inbounds double, double* %0, i64 %8
%10 = load double, double* %9
%11 = fcmp ogt double %10, %1
br i1 %11, label %15, label %12
12: ; preds = %7
%13 = add nuw nsw i64 %8, 1
%14 = icmp eq i64 %13, %6
br i1 %14, label %17, label %7
15: ; preds = %7
%16 = trunc i64 %8 to i32
br label %17
17: ; preds = %12, %15, %3
%18 = phi i32 [ 0, %3 ], [ %16, %15 ], [ %2, %12 ]
ret i32 %18
}
/* Type definitions */
struct xlist_t {
  int dummy;
};
struct xlist_node_t {
  int dummy;
};

/* Variables and functions */
struct xlist_node_t *_find_node_by_index(struct xlist_t *, long);
int _xlist_remove_node(struct xlist_t *, struct xlist_node_t *);
int xlist_remove_by_index(struct xlist_t *l, long index) {
  struct xlist_node_t *findnode = _find_node_by_index(l, index);
  return _xlist_remove_node(l, findnode);
}


x86 assembly (clang, -O0):
<xlist_remove_by_index>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1040 <_find_node_by_index@plt>
mov    %rax,-0x18(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x18(%rbp),%rsi
call   1030 <_xlist_remove_node@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<xlist_remove_by_index>:
push   %rbx
mov    %rdi,%rbx
call   1040 <_find_node_by_index@plt>
mov    %rbx,%rdi
mov    %rax,%rsi
pop    %rbx
jmp    1030 <_xlist_remove_node@plt>

LLVM IR (-O0):
%struct.xlist_t = type { i32 }
%struct.xlist_node_t = type { i32 }
define i32 @xlist_remove_by_index(%struct.xlist_t* %0, i64 %1) {
%3 = alloca %struct.xlist_t*
%4 = alloca i64
%5 = alloca %struct.xlist_node_t*
store %struct.xlist_t* %0, %struct.xlist_t** %3
store i64 %1, i64* %4
%6 = load %struct.xlist_t*, %struct.xlist_t** %3
%7 = load i64, i64* %4
%8 = call %struct.xlist_node_t* @_find_node_by_index(%struct.xlist_t* %6, i64 %7)
store %struct.xlist_node_t* %8, %struct.xlist_node_t** %5
%9 = load %struct.xlist_t*, %struct.xlist_t** %3
%10 = load %struct.xlist_node_t*, %struct.xlist_node_t** %5
%11 = call i32 @_xlist_remove_node(%struct.xlist_t* %9, %struct.xlist_node_t* %10)
ret i32 %11
}

LLVM IR (-O2):
%struct.xlist_t = type { i32 }
%struct.xlist_node_t = type { i32 }
define i32 @xlist_remove_by_index(%struct.xlist_t* %0, i64 %1) {
%3 = tail call %struct.xlist_node_t* @_find_node_by_index(%struct.xlist_t* %0, i64 %1)
%4 = tail call i32 @_xlist_remove_node(%struct.xlist_t* %0, %struct.xlist_node_t* %3)
ret i32 %4
}
int sys$waitfr(unsigned int efn) {
  return ({
    unsigned long resultvar;
    register long int _a1 asm("rdi") = (long)(efn);
    asm volatile("movq %1, %%rax\n\t"
                 "int $0x81\n\t"
                 : "=a"(resultvar)
                 : "i"(6), "r"(_a1)
                 : "memory", "cc", "r11", "cx");
    (long)resultvar;
  });
}


x86 assembly (clang, -O0):
<sys$waitfr>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rdi
mov    $0x6,%rax
int    $0x81
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x20(%rbp)
mov    -0x20(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<sys$waitfr>:
mov    %edi,%edi
mov    $0x6,%rax
int    $0x81
ret

LLVM IR (-O0):
define i32 @"sys$waitfr"(i32 %0) {
%2 = alloca i32
%3 = alloca i64
%4 = alloca i64
%5 = alloca i64
store i32 %0, i32* %2
%6 = load i32, i32* %2
%7 = zext i32 %6 to i64
store i64 %7, i64* %4
%8 = load i64, i64* %4
%9 = call i64 asm sideeffect "movq $1, %rax\0A\09int $$0x81\0A\09", "={ax},i,{rdi},~{memory},~{cc},~{r11},~{cx},~{dirflag},~{fpsr},~{flags}"(i32 6, i64 %8)
store i64 %9, i64* %3
%10 = load i64, i64* %3
store i64 %10, i64* %5
%11 = load i64, i64* %5
%12 = trunc i64 %11 to i32
ret i32 %12
}

LLVM IR (-O2):
define i32 @"sys$waitfr"(i32 %0) {
%2 = zext i32 %0 to i64
%3 = tail call i64 asm sideeffect "movq $1, %rax\0A\09int $$0x81\0A\09", "={ax},i,{rdi},~{memory},~{cc},~{r11},~{cx},~{dirflag},~{fpsr},~{flags}"(i32 6, i64 %2)
%4 = trunc i64 %3 to i32
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ dxl_write_byte(unsigned char, int, unsigned char);
void setStatusReturnLevel(unsigned char id, unsigned char level) {
  dxl_write_byte(id, (16), level);
}


x86 assembly (clang, -O0):
<setStatusReturnLevel>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %sil,%al
mov    %dil,%cl
mov    %cl,-0x1(%rbp)
mov    %al,-0x2(%rbp)
mov    -0x1(%rbp),%al
mov    $0x10,%esi
movzbl %al,%edi
movzbl -0x2(%rbp),%edx
call   1030 <dxl_write_byte@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<setStatusReturnLevel>:
mov    %esi,%edx
mov    $0x10,%esi
jmp    1030 <dxl_write_byte@plt>

LLVM IR (-O0):
define void @setStatusReturnLevel(i8 zeroext %0, i8 zeroext %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 @dxl_write_byte(i8 zeroext %5, i32 16, i8 zeroext %6)
ret void
}

LLVM IR (-O2):
define void @setStatusReturnLevel(i8 zeroext %0, i8 zeroext %1) {
%3 = tail call i32 @dxl_write_byte(i8 zeroext %0, i32 16, i8 zeroext %1)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ m68ki_jump(int /*<<< orphan*/);
int /*<<< orphan*/ m68ki_read_imm_32();
void m68k_op_jmp_32_al(void) { m68ki_jump(m68ki_read_imm_32()); }


x86 assembly (clang, -O0):
<m68k_op_jmp_32_al>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1040 <m68ki_read_imm_32@plt>
mov    %eax,%edi
call   1030 <m68ki_jump@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<m68k_op_jmp_32_al>:
push   %rax
xor    %eax,%eax
call   1040 <m68ki_read_imm_32@plt>
mov    %eax,%edi
pop    %rax
jmp    1030 <m68ki_jump@plt>

LLVM IR (-O0):
define void @m68k_op_jmp_32_al() {
%1 = call i32 (...) @m68ki_read_imm_32()
%2 = call i32 @m68ki_jump(i32 %1)
ret void
}

LLVM IR (-O2):
define void @m68k_op_jmp_32_al() {
%1 = tail call i32 (...) @m68ki_read_imm_32()
%2 = tail call i32 @m68ki_jump(i32 %1)
ret void
}
/* Type definitions */
typedef int uint64_t;
struct pcg_state_setseq_64 {
  int dummy;
};

/* Variables and functions */
int pcg_setseq_64_rxs_m_xs_64_random_r(struct pcg_state_setseq_64 *);
uint64_t
pcg_setseq_64_rxs_m_xs_64_boundedrand_r(struct pcg_state_setseq_64 *rng,
                                        uint64_t bound) {
  uint64_t threshold = -bound % bound;
  for (;;) {
    uint64_t r = pcg_setseq_64_rxs_m_xs_64_random_r(rng);
    if (r >= threshold)
      return r % bound;
  }
}


x86 assembly (clang, -O0):
<pcg_setseq_64_rxs_m_xs_64_boundedrand_r>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
xor    %eax,%eax
sub    -0xc(%rbp),%eax
cltd
idivl  -0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <pcg_setseq_64_rxs_m_xs_64_random_r@plt>
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
cmp    -0x10(%rbp),%eax
jl     1152 <pcg_setseq_64_rxs_m_xs_64_boundedrand_r+0x42>
mov    -0x14(%rbp),%eax
cltd
idivl  -0xc(%rbp)
mov    %edx,%eax
add    $0x20,%rsp
pop    %rbp
ret
jmp    112b <pcg_setseq_64_rxs_m_xs_64_boundedrand_r+0x1b>

x86 assembly (clang, -O2):
<pcg_setseq_64_rxs_m_xs_64_boundedrand_r>:
push   %rbp
push   %rbx
push   %rax
mov    %esi,%ebp
mov    %rdi,%rbx
nopl   0x0(%rax,%rax,1)
mov    %rbx,%rdi
call   1030 <pcg_setseq_64_rxs_m_xs_64_random_r@plt>
test   %eax,%eax
js     1120 <pcg_setseq_64_rxs_m_xs_64_boundedrand_r+0x10>
cltd
idiv   %ebp
mov    %edx,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
%struct.pcg_state_setseq_64 = type { i32 }
define i32 @pcg_setseq_64_rxs_m_xs_64_boundedrand_r(%struct.pcg_state_setseq_64* %0, i32 %1) {
%3 = alloca %struct.pcg_state_setseq_64*
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
store %struct.pcg_state_setseq_64* %0, %struct.pcg_state_setseq_64** %3
store i32 %1, i32* %4
%7 = load i32, i32* %4
%8 = sub nsw i32 0, %7
%9 = load i32, i32* %4
%10 = srem i32 %8, %9
store i32 %10, i32* %5
br label %11
11: ; preds = %21, %2
%12 = load %struct.pcg_state_setseq_64*, %struct.pcg_state_setseq_64** %3
%13 = call i32 @pcg_setseq_64_rxs_m_xs_64_random_r(%struct.pcg_state_setseq_64* %12)
store i32 %13, i32* %6
%14 = load i32, i32* %6
%15 = load i32, i32* %5
%16 = icmp sge i32 %14, %15
br i1 %16, label %17, label %21
17: ; preds = %11
%18 = load i32, i32* %6
%19 = load i32, i32* %4
%20 = srem i32 %18, %19
ret i32 %20
21: ; preds = %11
br label %11
}

LLVM IR (-O2):
%struct.pcg_state_setseq_64 = type { i32 }
define i32 @pcg_setseq_64_rxs_m_xs_64_boundedrand_r(%struct.pcg_state_setseq_64* %0, i32 %1) {
br label %3
3: ; preds = %3, %2
%4 = tail call i32 @pcg_setseq_64_rxs_m_xs_64_random_r(%struct.pcg_state_setseq_64* %0)
%5 = icmp sgt i32 %4, -1
br i1 %5, label %6, label %3
6: ; preds = %3
%7 = srem i32 %4, %1
ret i32 %7
}
void prec2nbits() {}


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

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

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

LLVM IR (-O2):
define void @prec2nbits() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
int /*<<< orphan*/ pthread_exit(int /*<<< orphan*/ *);
void *PrintHello(void *threadid) {
  int tid;
  tid = (int)(long int)threadid;
  printf("Hello World! It's me, thread #%d!\n", tid);
  pthread_exit(NULL);
}


x86 assembly (clang, -O0):
<PrintHello>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%esi
lea    0xec3(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
mov    %eax,%edi
call   1040 <pthread_exit@plt>
mov    -0x8(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<PrintHello>:
push   %rax
mov    %rdi,%rsi
lea    0xed5(%rip),%rdi
call   1030 <printf@plt>
xor    %edi,%edi
pop    %rax
jmp    1040 <pthread_exit@plt>

LLVM IR (-O0):
@.str = [35 x i8] c"Hello World! It's me, thread #%d!\0A\00"
define i8* @PrintHello(i8* %0) {
%2 = alloca i8*
%3 = alloca i8*
%4 = alloca i32
store i8* %0, i8** %3
%5 = load i8*, i8** %3
%6 = ptrtoint i8* %5 to i64
%7 = trunc i64 %6 to i32
store i32 %7, i32* %4
%8 = load i32, i32* %4
%9 = call i32 @printf(i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str, i64 0, i64 0), i32 %8)
%10 = call i32 @pthread_exit(i32* null)
%11 = load i8*, i8** %2
ret i8* %11
}

LLVM IR (-O2):
@.str = [35 x i8] c"Hello World! It's me, thread #%d!\0A\00"
define noalias i8* @PrintHello(i8* %0) {
%2 = ptrtoint i8* %0 to i64
%3 = trunc i64 %2 to i32
%4 = tail call i32 @printf(i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str, i64 0, i64 0), i32 %3)
%5 = tail call i32 @pthread_exit(i32* null)
ret i8* undef
}
/* Variables and functions */
int /*<<< orphan*/ memset(char *, int /*<<< orphan*/, size_t);
char *realloc(char *, size_t);
char *test_size(char *p, size_t size) {
  p = realloc(p, size);
  if (p != NULL && size != 0)
    memset(p, 0, size);
  return p;
}


x86 assembly (clang, -O0):
<test_size>:
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   1040 <realloc@plt>
mov    %rax,-0x8(%rbp)
cmpq   $0x0,-0x8(%rbp)
je     1166 <test_size+0x46>
cmpq   $0x0,-0x10(%rbp)
je     1166 <test_size+0x46>
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rdx
xor    %esi,%esi
call   1030 <memset@plt>
mov    -0x8(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_size>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%rbx
call   1040 <realloc@plt>
mov    %rax,%r14
test   %rbx,%rbx
je     1146 <test_size+0x26>
test   %r14,%r14
je     1146 <test_size+0x26>
mov    %r14,%rdi
xor    %esi,%esi
mov    %rbx,%rdx
call   1030 <memset@plt>
mov    %r14,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

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

LLVM IR (-O2):
define i8* @test_size(i8* nocapture %0, i64 %1) {
%3 = tail call i8* @realloc(i8* %0, i64 %1)
%4 = icmp ne i8* %3, null
%5 = icmp ne i64 %1, 0
%6 = and i1 %5, %4
br i1 %6, label %7, label %9
7: ; preds = %2
%8 = tail call i32 @memset(i8* %3, i32 0, i64 %1)
br label %9
9: ; preds = %7, %2
ret i8* %3
}
short FIELD_OFFSET(int i) { return i & 0xFFFF; }


x86 assembly (clang, -O0):
<FIELD_OFFSET>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
and    $0xffff,%eax
cwtl
pop    %rbp
ret

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

LLVM IR (-O0):
define signext i16 @FIELD_OFFSET(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = and i32 %3, 65535
%5 = trunc i32 %4 to i16
ret i16 %5
}

LLVM IR (-O2):
define signext i16 @FIELD_OFFSET(i32 %0) {
%2 = trunc i32 %0 to i16
ret i16 %2
}
/* Variables and functions */
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int foo(void) {
  exit(0);
  return 0;
}


x86 assembly (clang, -O0):
<foo>:
push   %rbp
mov    %rsp,%rbp
xor    %edi,%edi
call   1030 <exit@plt>

x86 assembly (clang, -O2):
<foo>:
push   %rax
xor    %edi,%edi
call   1030 <exit@plt>

LLVM IR (-O0):
define i32 @foo() {
%1 = call i32 @exit(i32 0)
unreachable
}

LLVM IR (-O2):
define i32 @foo() {
%1 = tail call i32 @exit(i32 0)
unreachable
}
/* Variables and functions */
int /*<<< orphan*/ FuzzerClearRand();
void FuzzerCleanup(void) { FuzzerClearRand(); }


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

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

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

LLVM IR (-O2):
define void @FuzzerCleanup() {
%1 = tail call i32 (...) @FuzzerClearRand()
ret void
}
unsigned _longcat(unsigned low, unsigned high) {
  return (high << (sizeof(unsigned) * 4)) + low;
}


x86 assembly (clang, -O0):
<_longcat>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x8(%rbp),%eax
shl    $0x10,%eax
add    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<_longcat>:
shl    $0x10,%esi
lea    (%rsi,%rdi,1),%eax
ret

LLVM IR (-O0):
define i32 @_longcat(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%5 = load i32, i32* %4
%6 = shl i32 %5, 16
%7 = load i32, i32* %3
%8 = add i32 %6, %7
ret i32 %8
}

LLVM IR (-O2):
define i32 @_longcat(i32 %0, i32 %1) {
%3 = shl i32 %1, 16
%4 = add i32 %3, %0
ret i32 %4
}