xunge/DecIR huggingface dataset:
void xzywCalcSize(int *pW, int *pH, int level) {
  *pW &= ~((1 << level) - 1);
  *pH &= ~((1 << level) - 1);
}


x86 assembly (clang, -O0):
<xzywCalcSize>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    -0x14(%rbp),%ecx
mov    $0x1,%eax
shl    %cl,%eax
mov    %eax,%ecx
sub    $0x1,%ecx
xor    $0xffffffff,%ecx
mov    -0x8(%rbp),%rax
and    (%rax),%ecx
mov    %ecx,(%rax)
mov    -0x14(%rbp),%ecx
mov    $0x1,%eax
shl    %cl,%eax
mov    %eax,%ecx
sub    $0x1,%ecx
xor    $0xffffffff,%ecx
mov    -0x10(%rbp),%rax
and    (%rax),%ecx
mov    %ecx,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<xzywCalcSize>:
mov    %edx,%ecx
mov    $0xffffffff,%eax
shl    %cl,%eax
and    %eax,(%rdi)
and    %eax,(%rsi)
ret

LLVM IR (-O0):
define void @xzywCalcSize(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* %6
%8 = shl i32 1, %7
%9 = sub nsw i32 %8, 1
%10 = xor i32 %9, -1
%11 = load i32*, i32** %4
%12 = load i32, i32* %11
%13 = and i32 %12, %10
store i32 %13, i32* %11
%14 = load i32, i32* %6
%15 = shl i32 1, %14
%16 = sub nsw i32 %15, 1
%17 = xor i32 %16, -1
%18 = load i32*, i32** %5
%19 = load i32, i32* %18
%20 = and i32 %19, %17
store i32 %20, i32* %18
ret void
}

LLVM IR (-O2):
define void @xzywCalcSize(i32* nocapture %0, i32* nocapture %1, i32 %2) {
%4 = shl nsw i32 -1, %2
%5 = load i32, i32* %0
%6 = and i32 %5, %4
store i32 %6, i32* %0
%7 = load i32, i32* %1
%8 = and i32 %7, %4
store i32 %8, i32* %1
ret void
}
float media(float x, float y) { return (x + y) / 2; }


x86 assembly (clang, -O0):
<media>:
push   %rbp
mov    %rsp,%rbp
movss  %xmm0,-0x4(%rbp)
movss  %xmm1,-0x8(%rbp)
movss  -0x4(%rbp),%xmm0
addss  -0x8(%rbp),%xmm0
movss  0xee0(%rip),%xmm1
divss  %xmm1,%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<media>:
addss  %xmm1,%xmm0
mulss  0xef4(%rip),%xmm0
ret

LLVM IR (-O0):
define float @media(float %0, float %1) {
%3 = alloca float
%4 = alloca float
store float %0, float* %3
store float %1, float* %4
%5 = load float, float* %3
%6 = load float, float* %4
%7 = fadd float %5, %6
%8 = fdiv float %7, 2.000000e+00
ret float %8
}

LLVM IR (-O2):
define float @media(float %0, float %1) {
%3 = fadd float %0, %1
%4 = fmul float %3, 5.000000e-01
ret float %4
}
/* Type definitions */
struct timespec {
  scalar_t__ tv_nsec;
  scalar_t__ tv_sec;
};

/* Variables and functions */
int /*<<< orphan*/ CLOCK_MONOTONIC;
int /*<<< orphan*/ clock_gettime(int /*<<< orphan*/, struct timespec *);
double now() {
  struct timespec tp;
  clock_gettime(CLOCK_MONOTONIC, &tp);
  return (double)tp.tv_sec + (double)tp.tv_nsec * 1e-9;
}


x86 assembly (clang, -O0):
<now>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    0x2ec9(%rip),%rax
mov    (%rax),%edi
lea    -0x10(%rbp),%rsi
call   1030 <clock_gettime@plt>
cvtsi2sdq -0x8(%rbp),%xmm1
cvtsi2sdq -0x10(%rbp),%xmm0
movsd  0xec2(%rip),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<now>:
sub    $0x18,%rsp
mov    0x2ecd(%rip),%rax
mov    (%rax),%edi
lea    0x8(%rsp),%rsi
call   1030 <clock_gettime@plt>
cvtsi2sdq 0x10(%rsp),%xmm1
cvtsi2sdq 0x8(%rsp),%xmm0
mulsd  0xec3(%rip),%xmm0
addsd  %xmm1,%xmm0
add    $0x18,%rsp
ret

LLVM IR (-O0):
%struct.timespec = type { i64, i64 }
@CLOCK_MONOTONIC = global i32 0
define double @now() {
%1 = alloca %struct.timespec
%2 = load i32, i32* @CLOCK_MONOTONIC
%3 = call i32 @clock_gettime(i32 %2, %struct.timespec* %1)
%4 = getelementptr inbounds %struct.timespec, %struct.timespec* %1, i32 0, i32 1
%5 = load i64, i64* %4
%6 = sitofp i64 %5 to double
%7 = getelementptr inbounds %struct.timespec, %struct.timespec* %1, i32 0, i32 0
%8 = load i64, i64* %7
%9 = sitofp i64 %8 to double
%10 = call double @llvm.fmuladd.f64(double %9, double 1.000000e-09, double %6)
ret double %10
}

LLVM IR (-O2):
%struct.timespec = type { i64, i64 }
@CLOCK_MONOTONIC = global i32 0
define double @now() {
%1 = alloca %struct.timespec
%2 = bitcast %struct.timespec* %1 to i8*
%3 = load i32, i32* @CLOCK_MONOTONIC
%4 = call i32 @clock_gettime(i32 %3, %struct.timespec* %1)
%5 = getelementptr inbounds %struct.timespec, %struct.timespec* %1, i64 0, i32 1
%6 = load i64, i64* %5
%7 = sitofp i64 %6 to double
%8 = getelementptr inbounds %struct.timespec, %struct.timespec* %1, i64 0, i32 0
%9 = load i64, i64* %8
%10 = sitofp i64 %9 to double
%11 = call double @llvm.fmuladd.f64(double %10, double 1.000000e-09, double %7)
ret double %11
}
/* Variables and functions */
int /*<<< orphan*/ compileStatement();
int /*<<< orphan*/ compileStatements2();
void compileStatements(void) {
  compileStatement();
  compileStatements2();
}


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

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

LLVM IR (-O0):
define void @compileStatements() {
%1 = call i32 (...) @compileStatement()
%2 = call i32 (...) @compileStatements2()
ret void
}

LLVM IR (-O2):
define void @compileStatements() {
%1 = tail call i32 (...) @compileStatement()
%2 = tail call i32 (...) @compileStatements2()
ret void
}
/* Variables and functions */
int startBeep(int /*<<< orphan*/);
int stopBeep(void) { return startBeep(0); }


x86 assembly (clang, -O0):
<stopBeep>:
push   %rbp
mov    %rsp,%rbp
xor    %edi,%edi
call   1030 <startBeep@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<stopBeep>:
xor    %edi,%edi
jmp    1030 <startBeep@plt>

LLVM IR (-O0):
define i32 @stopBeep() {
%1 = call i32 @startBeep(i32 0)
ret i32 %1
}

LLVM IR (-O2):
define i32 @stopBeep() {
%1 = tail call i32 @startBeep(i32 0)
ret i32 %1
}
int test_imm_E6int64_highword_reg(long long val) {
  return ((val >> 32) & (0xE6 << 0)) ? -20 : -40;
}


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

x86 assembly (clang, -O2):
<test_imm_E6int64_highword_reg>:
movabs $0xe600000000,%rax
test   %rax,%rdi
mov    $0xffffffd8,%ecx
mov    $0xffffffec,%eax
cmove  %ecx,%eax
ret

LLVM IR (-O0):
define i32 @test_imm_E6int64_highword_reg(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = load i64, i64* %2
%4 = ashr i64 %3, 32
%5 = and i64 %4, 230
%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_E6int64_highword_reg(i64 %0) {
%2 = and i64 %0, 987842478080
%3 = icmp eq i64 %2, 0
%4 = select i1 %3, i32 -40, i32 -20
ret i32 %4
}
void Nand_Reset(void) {
  { (*(volatile unsigned *)0x4E000004) &= ~(1 << 1); };
  { (*(volatile unsigned *)0x4E000020) |= (1 << 2); };
  { (*(volatile unsigned *)0x4E000008) = (0xFF); };
  {
    while (!((*(volatile unsigned *)0x4E000020) & (1 << 2)))
      ;
  };
  { (*(volatile unsigned *)0x4E000004) |= (1 << 1); };
}


x86 assembly (clang, -O0):
<Nand_Reset>:
push   %rbp
mov    %rsp,%rbp
mov    $0x4e000004,%eax
mov    (%rax),%ecx
and    $0xfffffffd,%ecx
mov    $0x4e000004,%eax
mov    %ecx,(%rax)
mov    $0x4e000020,%eax
mov    (%rax),%ecx
or     $0x4,%ecx
mov    $0x4e000020,%eax
mov    %ecx,(%rax)
mov    $0x4e000008,%eax
movl   $0xff,(%rax)
mov    $0x4e000020,%eax
mov    (%rax),%eax
and    $0x4,%eax
cmp    $0x0,%eax
setne  %al
xor    $0xff,%al
test   $0x1,%al
jne    1150 <Nand_Reset+0x50>
jmp    1155 <Nand_Reset+0x55>
jmp    1131 <Nand_Reset+0x31>
mov    $0x4e000004,%eax
mov    (%rax),%ecx
or     $0x2,%ecx
mov    $0x4e000004,%eax
mov    %ecx,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<Nand_Reset>:
andl   $0xfffffffd,0x4e000004
fd
orl    $0x4,0x4e000020
04
movl   $0xff,0x4e000008
nopl   0x0(%rax,%rax,1)
testl  $0x4,0x4e000020
je     1120 <Nand_Reset+0x20>
orl    $0x2,0x4e000004
02
ret

LLVM IR (-O0):
define void @Nand_Reset() {
%1 = load volatile i32, i32* inttoptr (i64 1308622852 to i32*)
%2 = and i32 %1, -3
store volatile i32 %2, i32* inttoptr (i64 1308622852 to i32*)
%3 = load volatile i32, i32* inttoptr (i64 1308622880 to i32*)
%4 = or i32 %3, 4
store volatile i32 %4, i32* inttoptr (i64 1308622880 to i32*)
store volatile i32 255, i32* inttoptr (i64 1308622856 to i32*)
br label %5
5: ; preds = %10, %0
%6 = load volatile i32, i32* inttoptr (i64 1308622880 to i32*)
%7 = and i32 %6, 4
%8 = icmp ne i32 %7, 0
%9 = xor i1 %8, true
br i1 %9, label %10, label %11
10: ; preds = %5
br label %5
11: ; preds = %5
%12 = load volatile i32, i32* inttoptr (i64 1308622852 to i32*)
%13 = or i32 %12, 2
store volatile i32 %13, i32* inttoptr (i64 1308622852 to i32*)
ret void
}

LLVM IR (-O2):
define void @Nand_Reset() {
%1 = load volatile i32, i32* inttoptr (i64 1308622852 to i32*)
%2 = and i32 %1, -3
store volatile i32 %2, i32* inttoptr (i64 1308622852 to i32*)
%3 = load volatile i32, i32* inttoptr (i64 1308622880 to i32*)
%4 = or i32 %3, 4
store volatile i32 %4, i32* inttoptr (i64 1308622880 to i32*)
store volatile i32 255, i32* inttoptr (i64 1308622856 to i32*)
br label %5
5: ; preds = %5, %0
%6 = load volatile i32, i32* inttoptr (i64 1308622880 to i32*)
%7 = and i32 %6, 4
%8 = icmp eq i32 %7, 0
br i1 %8, label %5, label %9
9: ; preds = %5
%10 = load volatile i32, i32* inttoptr (i64 1308622852 to i32*)
%11 = or i32 %10, 2
store volatile i32 %11, i32* inttoptr (i64 1308622852 to i32*)
ret void
}
/* Variables and functions */
int check_arg_count(int, int);
int /*<<< orphan*/ report_count(int);
int /*<<< orphan*/ report_error(char *);
void cmd_wecho_wchar(int nargs, char **args) {
  if (check_arg_count(nargs, 1) == 1)
    return;
  report_count(1);
  report_error("UNSUPPORTED");
}


x86 assembly (clang, -O0):
<cmd_wecho_wchar>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x4(%rbp),%edi
mov    $0x1,%esi
call   1030 <check_arg_count@plt>
cmp    $0x1,%eax
jne    115a <cmd_wecho_wchar+0x2a>
jmp    1170 <cmd_wecho_wchar+0x40>
mov    $0x1,%edi
call   1040 <report_count@plt>
lea    0xe95(%rip),%rdi
call   1050 <report_error@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<cmd_wecho_wchar>:
push   %rax
mov    $0x1,%esi
call   1030 <check_arg_count@plt>
cmp    $0x1,%eax
jne    1142 <cmd_wecho_wchar+0x12>
pop    %rax
ret
mov    $0x1,%edi
call   1040 <report_count@plt>
lea    0xead(%rip),%rdi
pop    %rax
jmp    1050 <report_error@plt>

LLVM IR (-O0):
@.str = [12 x i8] c"UNSUPPORTED\00"
define void @cmd_wecho_wchar(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i8**
store i32 %0, i32* %3
store i8** %1, i8*** %4
%5 = load i32, i32* %3
%6 = call i32 @check_arg_count(i32 %5, i32 1)
%7 = icmp eq i32 %6, 1
br i1 %7, label %8, label %9
8: ; preds = %2
br label %12
9: ; preds = %2
%10 = call i32 @report_count(i32 1)
%11 = call i32 @report_error(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0))
br label %12
12: ; preds = %9, %8
ret void
}

LLVM IR (-O2):
@.str = [12 x i8] c"UNSUPPORTED\00"
define void @cmd_wecho_wchar(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @check_arg_count(i32 %0, i32 1)
%4 = icmp eq i32 %3, 1
br i1 %4, label %8, label %5
5: ; preds = %2
%6 = tail call i32 @report_count(i32 1)
%7 = tail call i32 @report_error(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0))
br label %8
8: ; preds = %2, %5
ret void
}
/* Variables and functions */
long double expl(long double);
long double cbuiltin_expl(long double x) { return expl(x); }


x86 assembly (clang, -O0):
<cbuiltin_expl>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
fldt   0x10(%rbp)
fstpt  -0x10(%rbp)
fldt   -0x10(%rbp)
mov    %rsp,%rax
fstpt  (%rax)
call   1030 <expl@plt>
fld    %st(0)
fstp   %st(0)
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<cbuiltin_expl>:
jmp    1030 <expl@plt>

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

LLVM IR (-O2):
define x86_fp80 @cbuiltin_expl(x86_fp80 %0) {
%2 = tail call x86_fp80 @expl(x86_fp80 %0)
ret x86_fp80 %2
}
/* Type definitions */
struct conn {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ conn_process_read(struct conn *);
void conn_process_all(struct conn *c, void *data) {
  (void)data;
  conn_process_read(c);
}


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

x86 assembly (clang, -O2):
<conn_process_all>:
jmp    1030 <conn_process_read@plt>

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

LLVM IR (-O2):
%struct.conn = type { i32 }
define void @conn_process_all(%struct.conn* %0, i8* nocapture readnone %1) {
%3 = tail call i32 @conn_process_read(%struct.conn* %0)
ret void
}
int of_parse_partitions(struct cdev *cdev, struct device_node *node) {
  return -22;
}


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

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

LLVM IR (-O0):
%struct.cdev = type opaque
%struct.device_node = type opaque
define i32 @of_parse_partitions(%struct.cdev* %0, %struct.device_node* %1) {
%3 = alloca %struct.cdev*
%4 = alloca %struct.device_node*
store %struct.cdev* %0, %struct.cdev** %3
store %struct.device_node* %1, %struct.device_node** %4
ret i32 -22
}

LLVM IR (-O2):
%struct.cdev = type opaque
%struct.device_node = type opaque
define i32 @of_parse_partitions(%struct.cdev* nocapture readnone %0, %struct.device_node* nocapture readnone %1) {
ret i32 -22
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
void main() {
  int i;
  i = 1;
  i = i + 2 * i++;
  printf("is %d \n", i);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
mov    -0x4(%rbp),%ecx
mov    %ecx,%edx
add    $0x1,%edx
mov    %edx,-0x4(%rbp)
shl    $0x1,%ecx
add    %ecx,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%esi
lea    0xec1(%rip),%rdi
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
lea    0xee9(%rip),%rdi
mov    $0x3,%esi
jmp    1030 <printf@plt>

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

LLVM IR (-O2):
@.str = [8 x i8] c"is %d \0A\00"
define void @main() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i32 3)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ show_dec_locator_events(char const *, int,
                                           int /*<<< orphan*/);
int test_dec_locator_events(const char *the_title) {
  show_dec_locator_events(the_title, 1, (0));
  return 1;
}


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

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

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

LLVM IR (-O2):
define i32 @test_dec_locator_events(i8* %0) {
%2 = tail call i32 @show_dec_locator_events(i8* %0, i32 1, i32 0)
ret i32 1
}
/* Variables and functions */
int enable_path_for_cleanup(char const *, char const *, char *);
char *get_job_directory(char const *, char const *, char const *);
int enable_job_for_cleanup(const char *tt_root, const char *user,
                           const char *jobid) {
  char *full_path = get_job_directory(tt_root, user, jobid);
  return enable_path_for_cleanup(tt_root, user, full_path);
}


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

x86 assembly (clang, -O2):
<enable_job_for_cleanup>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%r14
mov    %rdi,%rbx
call   1040 <get_job_directory@plt>
mov    %rbx,%rdi
mov    %r14,%rsi
mov    %rax,%rdx
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1030 <enable_path_for_cleanup@plt>

LLVM IR (-O0):
define i32 @enable_job_for_cleanup(i8* %0, i8* %1, i8* %2) {
%4 = alloca i8*
%5 = alloca i8*
%6 = alloca i8*
%7 = alloca i8*
store i8* %0, i8** %4
store i8* %1, i8** %5
store i8* %2, i8** %6
%8 = load i8*, i8** %4
%9 = load i8*, i8** %5
%10 = load i8*, i8** %6
%11 = call i8* @get_job_directory(i8* %8, i8* %9, i8* %10)
store i8* %11, i8** %7
%12 = load i8*, i8** %4
%13 = load i8*, i8** %5
%14 = load i8*, i8** %7
%15 = call i32 @enable_path_for_cleanup(i8* %12, i8* %13, i8* %14)
ret i32 %15
}

LLVM IR (-O2):
define i32 @enable_job_for_cleanup(i8* %0, i8* %1, i8* %2) {
%4 = tail call i8* @get_job_directory(i8* %0, i8* %1, i8* %2)
%5 = tail call i32 @enable_path_for_cleanup(i8* %0, i8* %1, i8* %4)
ret i32 %5
}
long double getpi(void) {
  long double pi;
  pi = 3.1415926535897932384626;
  return pi;
}


x86 assembly (clang, -O0):
<getpi>:
push   %rbp
mov    %rsp,%rbp
fldl   0xef6(%rip)
fstpt  -0x10(%rbp)
fldt   -0x10(%rbp)
pop    %rbp
ret

x86 assembly (clang, -O2):
<getpi>:
fldl   0xefa(%rip)
ret

LLVM IR (-O0):
define x86_fp80 @getpi() {
%1 = alloca x86_fp80
store x86_fp80 0xK4000C90FDAA22168C000, x86_fp80* %1
%2 = load x86_fp80, x86_fp80* %1
ret x86_fp80 %2
}

LLVM IR (-O2):
define x86_fp80 @getpi() {
ret x86_fp80 0xK4000C90FDAA22168C000
}
/* Forward declarations */
typedef struct TYPE_4__ TYPE_2__;
typedef struct TYPE_3__ TYPE_1__;

/* Type definitions */
struct TYPE_3__ {
  int send_event;
};
struct TYPE_4__ {
  TYPE_1__ xcirculaterequest;
};
typedef TYPE_2__ XEvent;

/* Variables and functions */
void set_XEvent_xcirculaterequest_send_event(void *_p, int _v) {
  ((XEvent *)_p)->xcirculaterequest.send_event = (int)_v;
}


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

x86 assembly (clang, -O2):
<set_XEvent_xcirculaterequest_send_event>:
mov    %esi,(%rdi)
ret

LLVM IR (-O0):
%struct.TYPE_4__ = type { %struct.TYPE_3__ }
%struct.TYPE_3__ = type { i32 }
define void @set_XEvent_xcirculaterequest_send_event(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i32
store i8* %0, i8** %3
store i32 %1, i32* %4
%5 = load i32, i32* %4
%6 = load i8*, i8** %3
%7 = bitcast i8* %6 to %struct.TYPE_4__*
%8 = getelementptr inbounds %struct.TYPE_4__, %struct.TYPE_4__* %7, i32 0, i32 0
%9 = getelementptr inbounds %struct.TYPE_3__, %struct.TYPE_3__* %8, i32 0, i32 0
store i32 %5, i32* %9
ret void
}

LLVM IR (-O2):
define void @set_XEvent_xcirculaterequest_send_event(i8* nocapture writeonly %0, i32 %1) {
%3 = bitcast i8* %0 to i32*
store i32 %1, i32* %3
ret void
}
void init_joypad() {}


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

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

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

LLVM IR (-O2):
define void @init_joypad() {
ret void
}
int test_imm_86uint64_highword_reg(unsigned long long val) {
  return ((val >> 32) & (0x86 << 0)) ? -20 : -40;
}


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

x86 assembly (clang, -O2):
<test_imm_86uint64_highword_reg>:
movabs $0x8600000000,%rax
test   %rax,%rdi
mov    $0xffffffd8,%ecx
mov    $0xffffffec,%eax
cmove  %ecx,%eax
ret

LLVM IR (-O0):
define i32 @test_imm_86uint64_highword_reg(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = load i64, i64* %2
%4 = lshr i64 %3, 32
%5 = and i64 %4, 134
%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_86uint64_highword_reg(i64 %0) {
%2 = and i64 %0, 575525617664
%3 = icmp eq i64 %2, 0
%4 = select i1 %3, i32 -40, i32 -20
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ usleep(int);
void pause(int milliseconds) { usleep(milliseconds * 1000); }


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

x86 assembly (clang, -O2):
<pause>:
imul   $0x3e8,%edi,%edi
jmp    1030 <usleep@plt>

LLVM IR (-O0):
define void @pause(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = mul nsw i32 %3, 1000
%5 = call i32 @usleep(i32 %4)
ret void
}

LLVM IR (-O2):
define void @pause(i32 %0) {
%2 = mul nsw i32 %0, 1000
%3 = tail call i32 @usleep(i32 %2)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ assert(int);
int open(char *, int /*<<< orphan*/);
int /*<<< orphan*/ sleep(int);
int main(int argc, char **argv) {
  int d0 = open(argv[1], 0);
  int d1 = open(argv[1], 0);
  assert(d0 > 0);
  assert(d1 > 0);
  sleep(60);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
xor    %esi,%esi
call   1040 <open@plt>
mov    %eax,-0x14(%rbp)
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
xor    %esi,%esi
call   1040 <open@plt>
mov    %eax,-0x18(%rbp)
cmpl   $0x0,-0x14(%rbp)
setg   %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <assert@plt>
cmpl   $0x0,-0x18(%rbp)
setg   %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <assert@plt>
mov    $0x3c,%edi
call   1050 <sleep@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %rbx
push   %rax
mov    %rsi,%rbx
mov    0x8(%rsi),%rdi
xor    %esi,%esi
call   1040 <open@plt>
mov    %eax,%ebp
mov    0x8(%rbx),%rdi
xor    %esi,%esi
call   1040 <open@plt>
mov    %eax,%ebx
xor    %edi,%edi
test   %ebp,%ebp
setg   %dil
call   1030 <assert@plt>
xor    %edi,%edi
test   %ebx,%ebx
setg   %dil
call   1030 <assert@plt>
mov    $0x3c,%edi
call   1050 <sleep@plt>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i32
%7 = alloca i32
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%8 = load i8**, i8*** %5
%9 = getelementptr inbounds i8*, i8** %8, i64 1
%10 = load i8*, i8** %9
%11 = call i32 @open(i8* %10, i32 0)
store i32 %11, i32* %6
%12 = load i8**, i8*** %5
%13 = getelementptr inbounds i8*, i8** %12, i64 1
%14 = load i8*, i8** %13
%15 = call i32 @open(i8* %14, i32 0)
store i32 %15, i32* %7
%16 = load i32, i32* %6
%17 = icmp sgt i32 %16, 0
%18 = zext i1 %17 to i32
%19 = call i32 @assert(i32 %18)
%20 = load i32, i32* %7
%21 = icmp sgt i32 %20, 0
%22 = zext i1 %21 to i32
%23 = call i32 @assert(i32 %22)
%24 = call i32 @sleep(i32 60)
ret i32 0
}

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = getelementptr inbounds i8*, i8** %1, i64 1
%4 = load i8*, i8** %3
%5 = tail call i32 @open(i8* %4, i32 0)
%6 = load i8*, i8** %3
%7 = tail call i32 @open(i8* %6, i32 0)
%8 = icmp sgt i32 %5, 0
%9 = zext i1 %8 to i32
%10 = tail call i32 @assert(i32 %9)
%11 = icmp sgt i32 %7, 0
%12 = zext i1 %11 to i32
%13 = tail call i32 @assert(i32 %12)
%14 = tail call i32 @sleep(i32 60)
ret i32 0
}
/* Variables and functions */
scalar_t__ malloc(unsigned int);
int /*<<< orphan*/ strcpy(char *, char const *);
scalar_t__ strlen(char const *);
char *strdup(const char *s) {
  char *cp;
  if (s) {
    cp = (char *)malloc((unsigned)(strlen(s) + 1));
    if (cp) {
      (void)strcpy(cp, s);
    }
  } else {
    cp = (char *)0;
  }
  return (cp);
}


x86 assembly (clang, -O0):
<strdup>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
cmpq   $0x0,-0x8(%rbp)
je     117c <strdup+0x4c>
mov    -0x8(%rbp),%rdi
call   1040 <strlen@plt>
add    $0x1,%rax
mov    %eax,%edi
call   1050 <malloc@plt>
mov    %rax,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
je     1177 <strdup+0x47>
mov    -0x10(%rbp),%rdi
mov    -0x8(%rbp),%rsi
call   1030 <strcpy@plt>
jmp    1184 <strdup+0x54>
movq   $0x0,-0x10(%rbp)
mov    -0x10(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<strdup>:
push   %r14
push   %rbx
push   %rax
test   %rdi,%rdi
je     115e <strdup+0x2e>
mov    %rdi,%r14
call   1040 <strlen@plt>
lea    0x1(%rax),%edi
call   1050 <malloc@plt>
test   %rax,%rax
je     115e <strdup+0x2e>
mov    %rax,%rbx
mov    %rax,%rdi
mov    %r14,%rsi
call   1030 <strcpy@plt>
jmp    1160 <strdup+0x30>
xor    %ebx,%ebx
mov    %rbx,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

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

LLVM IR (-O2):
define i8* @strdup(i8* %0) {
%2 = icmp eq i8* %0, null
br i1 %2, label %12, label %3
3: ; preds = %1
%4 = tail call i64 @strlen(i8* %0)
%5 = trunc i64 %4 to i32
%6 = add i32 %5, 1
%7 = tail call i64 @malloc(i32 %6)
%8 = inttoptr i64 %7 to i8*
%9 = icmp eq i64 %7, 0
br i1 %9, label %12, label %10
10: ; preds = %3
%11 = tail call i32 @strcpy(i8* %8, i8* %0)
br label %12
12: ; preds = %1, %3, %10
%13 = phi i8* [ %8, %10 ], [ null, %3 ], [ null, %1 ]
ret i8* %13
}
/* Type definitions */
typedef int __u64;
typedef int __u32;

/* Variables and functions */
int fls(int);
int fls64(__u64 x) {
  __u32 h = x >> 32;
  if (h) {
    return fls(h) + 32;
  }
  return fls(x);
}


x86 assembly (clang, -O0):
<fls64>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
mov    -0x8(%rbp),%eax
mov    $0x20,%ecx
sar    %cl,%eax
mov    %eax,-0xc(%rbp)
cmpl   $0x0,-0xc(%rbp)
je     1145 <fls64+0x35>
mov    -0xc(%rbp),%edi
call   1030 <fls@plt>
add    $0x20,%eax
mov    %eax,-0x4(%rbp)
jmp    1150 <fls64+0x40>
mov    -0x8(%rbp),%edi
call   1030 <fls@plt>
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fls64>:
jmp    1030 <fls@plt>

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

LLVM IR (-O2):
define i32 @fls64(i32 %0) {
%2 = tail call i32 @fls(i32 %0)
ret i32 %2
}
/* Variables and functions */
int /*<<< orphan*/ recursively_insert(int *, int, int);
void insert_recursive(int *array, int *tam, int target) {
  if (*tam >= 20)
    return;
  (*tam)++;
  recursively_insert(array, *tam, target);
}


x86 assembly (clang, -O0):
<insert_recursive>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    -0x10(%rbp),%rax
cmpl   $0x14,(%rax)
jl     1135 <insert_recursive+0x25>
jmp    1152 <insert_recursive+0x42>
mov    -0x10(%rbp),%rax
mov    (%rax),%ecx
add    $0x1,%ecx
mov    %ecx,(%rax)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rax
mov    (%rax),%esi
mov    -0x14(%rbp),%edx
call   1030 <recursively_insert@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<insert_recursive>:
mov    (%rsi),%eax
cmp    $0x13,%eax
jle    1118 <insert_recursive+0x8>
ret
add    $0x1,%eax
mov    %eax,(%rsi)
mov    %eax,%esi
jmp    1030 <recursively_insert@plt>

LLVM IR (-O0):
define void @insert_recursive(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** %5
%8 = load i32, i32* %7
%9 = icmp sge i32 %8, 20
br i1 %9, label %10, label %11
10: ; preds = %3
br label %20
11: ; preds = %3
%12 = load i32*, i32** %5
%13 = load i32, i32* %12
%14 = add nsw i32 %13, 1
store i32 %14, i32* %12
%15 = load i32*, i32** %4
%16 = load i32*, i32** %5
%17 = load i32, i32* %16
%18 = load i32, i32* %6
%19 = call i32 @recursively_insert(i32* %15, i32 %17, i32 %18)
br label %20
20: ; preds = %11, %10
ret void
}

LLVM IR (-O2):
define void @insert_recursive(i32* %0, i32* nocapture %1, i32 %2) {
%4 = load i32, i32* %1
%5 = icmp sgt i32 %4, 19
br i1 %5, label %9, label %6
6: ; preds = %3
%7 = add nsw i32 %4, 1
store i32 %7, i32* %1
%8 = tail call i32 @recursively_insert(i32* %0, i32 %7, i32 %2)
br label %9
9: ; preds = %3, %6
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ omp_lock_t;

/* Variables and functions */
int /*<<< orphan*/ omp_destroy_lock(int /*<<< orphan*/ *);
void Destroy_locks(omp_lock_t locks[], int n) {
  int i;
  for (i = 0; i < n; i++)
    omp_destroy_lock(&locks[i]);
}


x86 assembly (clang, -O0):
<Destroy_locks>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
movl   $0x0,-0x10(%rbp)
mov    -0x10(%rbp),%eax
cmp    -0xc(%rbp),%eax
jge    1154 <Destroy_locks+0x44>
mov    -0x8(%rbp),%rdi
movslq -0x10(%rbp),%rax
shl    $0x2,%rax
add    %rax,%rdi
call   1030 <omp_destroy_lock@plt>
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    1126 <Destroy_locks+0x16>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Destroy_locks>:
push   %r14
push   %rbx
push   %rax
test   %esi,%esi
jle    1132 <Destroy_locks+0x22>
mov    %rdi,%rbx
mov    %esi,%r14d
xchg   %ax,%ax
mov    %rbx,%rdi
call   1030 <omp_destroy_lock@plt>
add    $0x4,%rbx
add    $0xffffffffffffffff,%r14
jne    1120 <Destroy_locks+0x10>
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

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

LLVM IR (-O2):
define void @Destroy_locks(i32* %0, i32 %1) {
%3 = icmp sgt i32 %1, 0
br i1 %3, label %4, label %12
4: ; preds = %2
%5 = zext i32 %1 to i64
br label %6
6: ; preds = %4, %6
%7 = phi i64 [ 0, %4 ], [ %10, %6 ]
%8 = getelementptr inbounds i32, i32* %0, i64 %7
%9 = tail call i32 @omp_destroy_lock(i32* %8)
%10 = add nuw nsw i64 %7, 1
%11 = icmp eq i64 %10, %5
br i1 %11, label %12, label %6
12: ; preds = %6, %2
ret void
}
/* Type definitions */
struct stat {
  int dummy;
};

/* Variables and functions */
int dll_stat(char const *, struct stat *);
int __wrap___xstat(int __ver, const char *__filename, struct stat *__stat_buf) {
  return dll_stat(__filename, __stat_buf);
}


x86 assembly (clang, -O0):
<__wrap___xstat>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x18(%rbp),%rsi
call   1030 <dll_stat@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<__wrap___xstat>:
mov    %rsi,%rdi
mov    %rdx,%rsi
jmp    1030 <dll_stat@plt>

LLVM IR (-O0):
%struct.stat = type { i32 }
define i32 @__wrap___xstat(i32 %0, i8* %1, %struct.stat* %2) {
%4 = alloca i32
%5 = alloca i8*
%6 = alloca %struct.stat*
store i32 %0, i32* %4
store i8* %1, i8** %5
store %struct.stat* %2, %struct.stat** %6
%7 = load i8*, i8** %5
%8 = load %struct.stat*, %struct.stat** %6
%9 = call i32 @dll_stat(i8* %7, %struct.stat* %8)
ret i32 %9
}

LLVM IR (-O2):
%struct.stat = type { i32 }
define i32 @__wrap___xstat(i32 %0, i8* %1, %struct.stat* %2) {
%4 = tail call i32 @dll_stat(i8* %1, %struct.stat* %2)
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
int main() {
  char num;
  num = 'b';
  printf("%c", 98);
  return 0;
}


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

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

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

LLVM IR (-O2):
@.str = [3 x i8] c"%c\00"
define i32 @main() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 98)
ret i32 0
}
/* Type definitions */
struct ebpt_node {
  int dummy;
};
struct eb_root {
  int dummy;
};

/* Variables and functions */
struct ebpt_node *__ebis_insert(struct eb_root *, struct ebpt_node *);
struct ebpt_node *ebis_insert(struct eb_root *root, struct ebpt_node *new) {
  return __ebis_insert(root, new);
}


x86 assembly (clang, -O0):
<ebis_insert>:
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 <__ebis_insert@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ebis_insert>:
jmp    1030 <__ebis_insert@plt>

LLVM IR (-O0):
%struct.eb_root = type { i32 }
%struct.ebpt_node = type { i32 }
define %struct.ebpt_node* @ebis_insert(%struct.eb_root* %0, %struct.ebpt_node* %1) {
%3 = alloca %struct.eb_root*
%4 = alloca %struct.ebpt_node*
store %struct.eb_root* %0, %struct.eb_root** %3
store %struct.ebpt_node* %1, %struct.ebpt_node** %4
%5 = load %struct.eb_root*, %struct.eb_root** %3
%6 = load %struct.ebpt_node*, %struct.ebpt_node** %4
%7 = call %struct.ebpt_node* @__ebis_insert(%struct.eb_root* %5, %struct.ebpt_node* %6)
ret %struct.ebpt_node* %7
}

LLVM IR (-O2):
%struct.eb_root = type { i32 }
%struct.ebpt_node = type { i32 }
define %struct.ebpt_node* @ebis_insert(%struct.eb_root* %0, %struct.ebpt_node* %1) {
%3 = tail call %struct.ebpt_node* @__ebis_insert(%struct.eb_root* %0, %struct.ebpt_node* %1)
ret %struct.ebpt_node* %3
}
int do_137() { return 137; }


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

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

LLVM IR (-O0):
define i32 @do_137() {
ret i32 137
}

LLVM IR (-O2):
define i32 @do_137() {
ret i32 137
}
int doublecmp(const void *a, const void *b) {
  return (*(double *)a - *(double *)b);
}


x86 assembly (clang, -O0):
<doublecmp>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
movsd  (%rax),%xmm0
mov    -0x10(%rbp),%rax
subsd  (%rax),%xmm0
cvttsd2si %xmm0,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<doublecmp>:
movsd  (%rdi),%xmm0
subsd  (%rsi),%xmm0
cvttsd2si %xmm0,%eax
ret

LLVM IR (-O0):
define i32 @doublecmp(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 = bitcast i8* %5 to double*
%7 = load double, double* %6
%8 = load i8*, i8** %4
%9 = bitcast i8* %8 to double*
%10 = load double, double* %9
%11 = fsub double %7, %10
%12 = fptosi double %11 to i32
ret i32 %12
}

LLVM IR (-O2):
define i32 @doublecmp(i8* nocapture %0, i8* nocapture %1) {
%3 = bitcast i8* %0 to double*
%4 = load double, double* %3
%5 = bitcast i8* %1 to double*
%6 = load double, double* %5
%7 = fsub double %4, %6
%8 = fptosi double %7 to i32
ret i32 %8
}
/* Variables and functions */
int fd_get_flags(int);
int fd_set_nonblocking(int, int);
int fd_make_nonblocking(int fd) {
  int flags;
  flags = fd_get_flags(fd);
  if (flags == -1)
    return -1;
  return fd_set_nonblocking(fd, flags);
}


x86 assembly (clang, -O0):
<fd_make_nonblocking>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
mov    -0x8(%rbp),%edi
call   1040 <fd_get_flags@plt>
mov    %eax,-0xc(%rbp)
cmpl   $0xffffffff,-0xc(%rbp)
jne    114c <fd_make_nonblocking+0x2c>
movl   $0xffffffff,-0x4(%rbp)
jmp    115a <fd_make_nonblocking+0x3a>
mov    -0x8(%rbp),%edi
mov    -0xc(%rbp),%esi
call   1030 <fd_set_nonblocking@plt>
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fd_make_nonblocking>:
push   %rbx
mov    %edi,%ebx
call   1040 <fd_get_flags@plt>
cmp    $0xffffffff,%eax
je     1137 <fd_make_nonblocking+0x17>
mov    %ebx,%edi
mov    %eax,%esi
pop    %rbx
jmp    1030 <fd_set_nonblocking@plt>
mov    $0xffffffff,%eax
pop    %rbx
ret

LLVM IR (-O0):
define i32 @fd_make_nonblocking(i32 %0) {
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %3
%5 = load i32, i32* %3
%6 = call i32 @fd_get_flags(i32 %5)
store i32 %6, i32* %4
%7 = load i32, i32* %4
%8 = icmp eq i32 %7, -1
br i1 %8, label %9, label %10
9: ; preds = %1
store i32 -1, i32* %2
br label %14
10: ; preds = %1
%11 = load i32, i32* %3
%12 = load i32, i32* %4
%13 = call i32 @fd_set_nonblocking(i32 %11, i32 %12)
store i32 %13, i32* %2
br label %14
14: ; preds = %10, %9
%15 = load i32, i32* %2
ret i32 %15
}

LLVM IR (-O2):
define i32 @fd_make_nonblocking(i32 %0) {
%2 = tail call i32 @fd_get_flags(i32 %0)
%3 = icmp eq i32 %2, -1
br i1 %3, label %6, label %4
4: ; preds = %1
%5 = tail call i32 @fd_set_nonblocking(i32 %0, i32 %2)
br label %6
6: ; preds = %1, %4
%7 = phi i32 [ %5, %4 ], [ -1, %1 ]
ret i32 %7
}
/* Variables and functions */
double exp(double);
double dBbp0a(double x) { return (1.0 - x) * exp(x) - 1.0; }


x86 assembly (clang, -O0):
<dBbp0a>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  0xee3(%rip),%xmm0
subsd  -0x8(%rbp),%xmm0
movsd  %xmm0,-0x10(%rbp)
movsd  -0x8(%rbp),%xmm0
call   1030 <exp@plt>
movaps %xmm0,%xmm1
movsd  -0x10(%rbp),%xmm0
mulsd  %xmm1,%xmm0
movsd  0xeb3(%rip),%xmm1
addsd  %xmm1,%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<dBbp0a>:
push   %rax
movsd  0xee7(%rip),%xmm1
subsd  %xmm0,%xmm1
movsd  %xmm1,(%rsp)
call   1030 <exp@plt>
mulsd  (%rsp),%xmm0
addsd  0xed4(%rip),%xmm0
pop    %rax
ret

LLVM IR (-O0):
define double @dBbp0a(double %0) {
%2 = alloca double
store double %0, double* %2
%3 = load double, double* %2
%4 = fsub double 1.000000e+00, %3
%5 = load double, double* %2
%6 = call double @exp(double %5)
%7 = call double @llvm.fmuladd.f64(double %4, double %6, double -1.000000e+00)
ret double %7
}

LLVM IR (-O2):
define double @dBbp0a(double %0) {
%2 = fsub double 1.000000e+00, %0
%3 = tail call double @exp(double %0)
%4 = tail call double @llvm.fmuladd.f64(double %2, double %3, double -1.000000e+00)
ret double %4
}
long long suuz() { return 0xffff7fff7fff0000LL; }


x86 assembly (clang, -O0):
<suuz>:
push   %rbp
mov    %rsp,%rbp
movabs $0xffff7fff7fff0000,%rax
7f ff ff
pop    %rbp
ret

x86 assembly (clang, -O2):
<suuz>:
movabs $0xffff7fff7fff0000,%rax
7f ff ff
ret

LLVM IR (-O0):
define i64 @suuz() {
ret i64 -140739635904512
}

LLVM IR (-O2):
define i64 @suuz() {
ret i64 -140739635904512
}
/* Variables and functions */
int /*<<< orphan*/ set_file(char *);
int /*<<< orphan*/ solver_init(int);
int yyparse();
int go(int debug, char *input) {
  solver_init(debug);
  set_file(input);
  return yyparse();
}


x86 assembly (clang, -O0):
<go>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x4(%rbp),%edi
call   1030 <solver_init@plt>
mov    -0x10(%rbp),%rdi
call   1050 <set_file@plt>
mov    $0x0,%al
call   1040 <yyparse@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<go>:
push   %rbx
mov    %rsi,%rbx
call   1030 <solver_init@plt>
mov    %rbx,%rdi
call   1050 <set_file@plt>
xor    %eax,%eax
pop    %rbx
jmp    1040 <yyparse@plt>

LLVM IR (-O0):
define i32 @go(i32 %0, i8* %1) {
%3 = alloca i32
%4 = alloca i8*
store i32 %0, i32* %3
store i8* %1, i8** %4
%5 = load i32, i32* %3
%6 = call i32 @solver_init(i32 %5)
%7 = load i8*, i8** %4
%8 = call i32 @set_file(i8* %7)
%9 = call i32 (...) @yyparse()
ret i32 %9
}

LLVM IR (-O2):
define i32 @go(i32 %0, i8* %1) {
%3 = tail call i32 @solver_init(i32 %0)
%4 = tail call i32 @set_file(i8* %1)
%5 = tail call i32 (...) @yyparse()
ret i32 %5
}
void f0() {
  int x, y;
  x = 1;
  y = (x = 1);
}


x86 assembly (clang, -O0):
<f0>:
push   %rbp
mov    %rsp,%rbp
movl   $0x1,-0x4(%rbp)
movl   $0x1,-0x4(%rbp)
movl   $0x1,-0x8(%rbp)
pop    %rbp
ret

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

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

LLVM IR (-O2):
define void @f0() {
ret void
}
int bytes_to_int(char *ptr) {
  return ((int)ptr[0] << 24) | ((int)ptr[1] << 16) | ((int)ptr[2] << 8) |
         ((int)ptr[3] << 0);
}


x86 assembly (clang, -O0):
<bytes_to_int>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movsbl (%rax),%eax
shl    $0x18,%eax
mov    -0x8(%rbp),%rcx
movsbl 0x1(%rcx),%ecx
shl    $0x10,%ecx
or     %ecx,%eax
mov    -0x8(%rbp),%rcx
movsbl 0x2(%rcx),%ecx
shl    $0x8,%ecx
or     %ecx,%eax
mov    -0x8(%rbp),%rcx
movsbl 0x3(%rcx),%ecx
shl    $0x0,%ecx
or     %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<bytes_to_int>:
movzbl (%rdi),%eax
shl    $0x18,%eax
movsbl 0x1(%rdi),%ecx
shl    $0x10,%ecx
or     %eax,%ecx
movsbl 0x2(%rdi),%edx
shl    $0x8,%edx
movsbl 0x3(%rdi),%eax
or     %edx,%eax
or     %ecx,%eax
ret

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

LLVM IR (-O2):
define i32 @bytes_to_int(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = zext i8 %2 to i32
%4 = shl nuw i32 %3, 24
%5 = getelementptr inbounds i8, i8* %0, i64 1
%6 = load i8, i8* %5
%7 = sext i8 %6 to i32
%8 = shl nsw i32 %7, 16
%9 = or i32 %8, %4
%10 = getelementptr inbounds i8, i8* %0, i64 2
%11 = load i8, i8* %10
%12 = sext i8 %11 to i32
%13 = shl nsw i32 %12, 8
%14 = or i32 %9, %13
%15 = getelementptr inbounds i8, i8* %0, i64 3
%16 = load i8, i8* %15
%17 = sext i8 %16 to i32
%18 = or i32 %14, %17
ret i32 %18
}
/* Type definitions */
typedef int /*<<< orphan*/ pid_t;

/* Variables and functions */
int /*<<< orphan*/ PTRACE_DETACH;
int /*<<< orphan*/ perror(char *);
scalar_t__ ptrace(int /*<<< orphan*/, int /*<<< orphan*/, int /*<<< orphan*/ *,
                  int /*<<< orphan*/);
int ptrace_detach(pid_t pid) {
  if (ptrace(PTRACE_DETACH, pid, NULL, 0) < 0) {
    perror("ptrace_detach");
    return -1;
  }
  return 0;
}


x86 assembly (clang, -O0):
<ptrace_detach>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
mov    0x2eb6(%rip),%rax
mov    (%rax),%edi
mov    -0x8(%rbp),%esi
xor    %eax,%eax
mov    %eax,%edx
xor    %ecx,%ecx
call   1030 <ptrace@plt>
cmp    $0x0,%rax
jge    1164 <ptrace_detach+0x44>
lea    0xead(%rip),%rdi
call   1040 <perror@plt>
movl   $0xffffffff,-0x4(%rbp)
jmp    116b <ptrace_detach+0x4b>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ptrace_detach>:
push   %rbx
mov    %edi,%esi
mov    0x2ebe(%rip),%rax
mov    (%rax),%edi
xor    %ebx,%ebx
xor    %edx,%edx
xor    %ecx,%ecx
call   1030 <ptrace@plt>
test   %rax,%rax
js     1140 <ptrace_detach+0x20>
mov    %ebx,%eax
pop    %rbx
ret
lea    0xeb9(%rip),%rdi
call   1040 <perror@plt>
mov    $0xffffffff,%ebx
jmp    113c <ptrace_detach+0x1c>

LLVM IR (-O0):
@PTRACE_DETACH = global i32 0
@.str = [14 x i8] c"ptrace_detach\00"
define i32 @ptrace_detach(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %3
%4 = load i32, i32* @PTRACE_DETACH
%5 = load i32, i32* %3
%6 = call i64 @ptrace(i32 %4, i32 %5, i32* null, i32 0)
%7 = icmp slt i64 %6, 0
br i1 %7, label %8, label %10
8: ; preds = %1
%9 = call i32 @perror(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0))
store i32 -1, i32* %2
br label %11
10: ; preds = %1
store i32 0, i32* %2
br label %11
11: ; preds = %10, %8
%12 = load i32, i32* %2
ret i32 %12
}

LLVM IR (-O2):
@PTRACE_DETACH = global i32 0
@.str = [14 x i8] c"ptrace_detach\00"
define i32 @ptrace_detach(i32 %0) {
%2 = load i32, i32* @PTRACE_DETACH
%3 = tail call i64 @ptrace(i32 %2, i32 %0, i32* null, i32 0)
%4 = icmp slt i64 %3, 0
br i1 %4, label %5, label %7
5: ; preds = %1
%6 = tail call i32 @perror(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0))
br label %7
7: ; preds = %1, %5
%8 = phi i32 [ -1, %5 ], [ 0, %1 ]
ret i32 %8
}
double foo2(double foo2param) { return foo2param; }


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

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

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

LLVM IR (-O2):
define double @foo2(double returned %0) {
ret double %0
}
double __infer_nondet_double() {
  double ret;
  return ret;
}


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

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

LLVM IR (-O0):
define double @__infer_nondet_double() {
%1 = alloca double
%2 = load double, double* %1
ret double %2
}

LLVM IR (-O2):
define double @__infer_nondet_double() {
ret double undef
}