xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ start_microaccounting();
void Cilk_arch_specific_init(void) { start_microaccounting(); }


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

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

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

LLVM IR (-O2):
define void @Cilk_arch_specific_init() {
%1 = tail call i32 (...) @start_microaccounting()
ret void
}
/* Variables and functions */
scalar_t__ graphicMode();
int shellementaryPresent() {
  static int lShellementaryPresent = -1;
  if (lShellementaryPresent < 0) {
    lShellementaryPresent = 0;
  }
  return lShellementaryPresent && graphicMode();
}


x86 assembly (clang, -O0):
<shellementaryPresent>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
cmpl   $0x0,0x2f09(%rip)
jge    112f <shellementaryPresent+0x1f>
movl   $0x0,0x2ef9(%rip)
xor    %eax,%eax
cmpl   $0x0,0x2ef0(%rip)
mov    %al,-0x1(%rbp)
je     1152 <shellementaryPresent+0x42>
mov    $0x0,%al
call   1030 <graphicMode@plt>
cmp    $0x0,%rax
setne  %al
mov    %al,-0x1(%rbp)
mov    -0x1(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<shellementaryPresent>:
cmpb   $0x0,0x2f1d(%rip)
jne    1110 <shellementaryPresent+0x10>
movb   $0x1,0x2f14(%rip)
xor    %eax,%eax
ret

LLVM IR (-O0):
@shellementaryPresent.lShellementaryPresent = internal global i32 -1
define i32 @shellementaryPresent() {
%1 = load i32, i32* @shellementaryPresent.lShellementaryPresent
%2 = icmp slt i32 %1, 0
br i1 %2, label %3, label %4
3: ; preds = %0
store i32 0, i32* @shellementaryPresent.lShellementaryPresent
br label %4
4: ; preds = %3, %0
%5 = load i32, i32* @shellementaryPresent.lShellementaryPresent
%6 = icmp ne i32 %5, 0
br i1 %6, label %7, label %10
7: ; preds = %4
%8 = call i64 (...) @graphicMode()
%9 = icmp ne i64 %8, 0
br label %10
10: ; preds = %7, %4
%11 = phi i1 [ false, %4 ], [ %9, %7 ]
%12 = zext i1 %11 to i32
ret i32 %12
}

LLVM IR (-O2):
@shellementaryPresent.lShellementaryPresent = internal unnamed_addr global i1 false
define i32 @shellementaryPresent() {
%1 = load i1, i1* @shellementaryPresent.lShellementaryPresent
br i1 %1, label %3, label %2
2: ; preds = %0
store i1 true, i1* @shellementaryPresent.lShellementaryPresent
br label %3
3: ; preds = %0, %2
ret i32 0
}
/* Type definitions */
typedef scalar_t__ b;
typedef scalar_t__ a;

/* Variables and functions */
double rand_seed();
int random_range(int a, int b) {
  return ((int)(rand_seed() * ((double)(b) - (a) + 1))) + (a);
}


x86 assembly (clang, -O0):
<random_range>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    $0x0,%al
call   1030 <rand_seed@plt>
cvtsi2sdl -0x8(%rbp),%xmm1
cvtsi2sdl -0x4(%rbp),%xmm2
subsd  %xmm2,%xmm1
movsd  0xec5(%rip),%xmm2
addsd  %xmm2,%xmm1
mulsd  %xmm1,%xmm0
cvttsd2si %xmm0,%eax
add    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<random_range>:
push   %rbp
push   %rbx
push   %rax
mov    %esi,%ebx
mov    %edi,%ebp
xor    %eax,%eax
call   1030 <rand_seed@plt>
cvtsi2sd %ebx,%xmm1
cvtsi2sd %ebp,%xmm2
subsd  %xmm2,%xmm1
addsd  0xece(%rip),%xmm1
mulsd  %xmm0,%xmm1
cvttsd2si %xmm1,%eax
add    %ebp,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
define i32 @random_range(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%5 = call double (...) @rand_seed()
%6 = load i32, i32* %4
%7 = sitofp i32 %6 to double
%8 = load i32, i32* %3
%9 = sitofp i32 %8 to double
%10 = fsub double %7, %9
%11 = fadd double %10, 1.000000e+00
%12 = fmul double %5, %11
%13 = fptosi double %12 to i32
%14 = load i32, i32* %3
%15 = add nsw i32 %13, %14
ret i32 %15
}

LLVM IR (-O2):
define i32 @random_range(i32 %0, i32 %1) {
%3 = tail call double (...) @rand_seed()
%4 = sitofp i32 %1 to double
%5 = sitofp i32 %0 to double
%6 = fsub double %4, %5
%7 = fadd double %6, 1.000000e+00
%8 = fmul double %7, %3
%9 = fptosi double %8 to i32
%10 = add nsw i32 %9, %0
ret i32 %10
}
/* Variables and functions */
int /*<<< orphan*/ GL_TEXTURE_2D;
int /*<<< orphan*/ glDisable(int /*<<< orphan*/);
int /*<<< orphan*/ glEnable(int /*<<< orphan*/);
void tfunc(void) {
  static int state = 1;
  if (state ^= 1)
    glEnable(GL_TEXTURE_2D);
  else
    glDisable(GL_TEXTURE_2D);
}


x86 assembly (clang, -O0):
<tfunc>:
push   %rbp
mov    %rsp,%rbp
mov    0x2f06(%rip),%eax
xor    $0x1,%eax
mov    %eax,0x2efd(%rip)
cmp    $0x0,%eax
je     114f <tfunc+0x2f>
mov    0x2e9d(%rip),%rax
mov    (%rax),%edi
call   1030 <glEnable@plt>
jmp    115d <tfunc+0x3d>
mov    0x2e8a(%rip),%rax
mov    (%rax),%edi
call   1040 <glDisable@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<tfunc>:
xorl   $0x1,0x2f09(%rip)
mov    0x2eb2(%rip),%rax
mov    (%rax),%edi
je     1137 <tfunc+0x17>
jmp    1030 <glEnable@plt>
jmp    1040 <glDisable@plt>

LLVM IR (-O0):
@tfunc.state = internal global i32 1
@GL_TEXTURE_2D = global i32 0
define void @tfunc() {
%1 = load i32, i32* @tfunc.state
%2 = xor i32 %1, 1
store i32 %2, i32* @tfunc.state
%3 = icmp ne i32 %2, 0
br i1 %3, label %4, label %7
4: ; preds = %0
%5 = load i32, i32* @GL_TEXTURE_2D
%6 = call i32 @glEnable(i32 %5)
br label %10
7: ; preds = %0
%8 = load i32, i32* @GL_TEXTURE_2D
%9 = call i32 @glDisable(i32 %8)
br label %10
10: ; preds = %7, %4
ret void
}

LLVM IR (-O2):
@tfunc.state = internal unnamed_addr global i32 1
@GL_TEXTURE_2D = global i32 0
define void @tfunc() {
%1 = load i32, i32* @tfunc.state
%2 = xor i32 %1, 1
store i32 %2, i32* @tfunc.state
%3 = icmp eq i32 %2, 0
%4 = load i32, i32* @GL_TEXTURE_2D
br i1 %3, label %7, label %5
5: ; preds = %0
%6 = tail call i32 @glEnable(i32 %4)
br label %9
7: ; preds = %0
%8 = tail call i32 @glDisable(i32 %4)
br label %9
9: ; preds = %7, %5
ret void
}
/* Variables and functions */
bool nrf51_errata_45(void) { return false; }


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

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

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

LLVM IR (-O2):
define i32 @nrf51_errata_45() {
ret i32 0
}
void foo061() {}


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

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

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

LLVM IR (-O2):
define void @foo061() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ SIGINT;
int /*<<< orphan*/ printf(char *, int);
int /*<<< orphan*/ signal(int /*<<< orphan*/, void (*)(int));
void interrupt_signal_handler(int signal_number) {
  printf("terminated by signal %d\n", signal_number);
  signal(SIGINT, interrupt_signal_handler);
}


x86 assembly (clang, -O0):
<interrupt_signal_handler>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%esi
lea    0xecb(%rip),%rdi
call   1030 <printf@plt>
mov    0x2ea7(%rip),%rax
mov    (%rax),%edi
mov    0x2e96(%rip),%rsi
call   1040 <signal@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<interrupt_signal_handler>:
push   %rax
mov    %edi,%esi
lea    0xed6(%rip),%rdi
call   1030 <printf@plt>
mov    0x2eb2(%rip),%rax
mov    (%rax),%edi
mov    0x2ea1(%rip),%rsi
pop    %rax
jmp    1040 <signal@plt>

LLVM IR (-O0):
@.str = [25 x i8] c"terminated by signal %d\0A\00"
@SIGINT = global i32 0
define void @interrupt_signal_handler(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = call i32 @printf(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str, i64 0, i64 0), i32 %3)
%5 = load i32, i32* @SIGINT
%6 = call i32 @signal(i32 %5, void (i32)* @interrupt_signal_handler)
ret void
}

LLVM IR (-O2):
@.str = [25 x i8] c"terminated by signal %d\0A\00"
@SIGINT = global i32 0
define void @interrupt_signal_handler(i32 %0) {
%2 = tail call i32 @printf(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str, i64 0, i64 0), i32 %0)
%3 = load i32, i32* @SIGINT
%4 = tail call i32 @signal(i32 %3, void (i32)* @interrupt_signal_handler)
ret void
}
/* Variables and functions */
int ARCONTROLLER_TESTBENCH_NetworkControllerAutoTest();
int main(int argc, char *argv[]) {
  return ARCONTROLLER_TESTBENCH_NetworkControllerAutoTest();
}


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)
mov    $0x0,%al
call   1030 <ARCONTROLLER_TESTBENCH_NetworkControllerAutoTest@plt>
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
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 = call i32 (...) @ARCONTROLLER_TESTBENCH_NetworkControllerAutoTest()
ret i32 %6
}

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 (...) @ARCONTROLLER_TESTBENCH_NetworkControllerAutoTest()
ret i32 %3
}
/* Variables and functions */
double sqrt(double);
double nextB(double a, double b) { return sqrt(a * b); }


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

x86 assembly (clang, -O2):
<nextB>:
mulsd  %xmm1,%xmm0
xorpd  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jb     1123 <nextB+0x13>
sqrtsd %xmm0,%xmm0
ret
jmp    1030 <sqrt@plt>

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

LLVM IR (-O2):
define double @nextB(double %0, double %1) {
%3 = fmul double %0, %1
%4 = tail call double @sqrt(double %3)
ret double %4
}
/* Variables and functions */
int /*<<< orphan*/ abort();
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int f();
main() {
  if (f() != 1)
    abort();
  else
    exit(0);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x0,%al
call   1040 <f@plt>
cmp    $0x1,%eax
je     1156 <main+0x26>
mov    $0x0,%al
call   1030 <abort@plt>
xor    %edi,%edi
call   1050 <exit@plt>

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1040 <f@plt>
cmp    $0x1,%eax
jne    1144 <main+0x14>
xor    %edi,%edi
call   1050 <exit@plt>
xor    %eax,%eax
call   1030 <abort@plt>

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 (...) @f()
%3 = icmp ne i32 %2, 1
br i1 %3, label %4, label %6
4: ; preds = %0
%5 = call i32 (...) @abort()
unreachable
6: ; preds = %0
%7 = call i32 @exit(i32 0)
unreachable
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @f()
%2 = icmp eq i32 %1, 1
br i1 %2, label %5, label %3
3: ; preds = %0
%4 = tail call i32 (...) @abort()
unreachable
5: ; preds = %0
%6 = tail call i32 @exit(i32 0)
unreachable
}
int test_imm_7Buint16_reg(unsigned short val) {
  return ((val) & (0x7B << 0)) ? -20 : -40;
}


x86 assembly (clang, -O0):
<test_imm_7Buint16_reg>:
push   %rbp
mov    %rsp,%rbp
mov    %di,%ax
mov    %ax,-0x2(%rbp)
movzwl -0x2(%rbp),%edx
and    $0x7b,%edx
mov    $0xffffffd8,%eax
mov    $0xffffffec,%ecx
cmp    $0x0,%edx
cmovne %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_imm_7Buint16_reg>:
test   $0x7b,%dil
mov    $0xffffffd8,%ecx
mov    $0xffffffec,%eax
cmove  %ecx,%eax
ret

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

LLVM IR (-O2):
define i32 @test_imm_7Buint16_reg(i16 zeroext %0) {
%2 = and i16 %0, 123
%3 = icmp eq i16 %2, 0
%4 = select i1 %3, i32 -40, i32 -20
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void point() { printf("\033[0;31mLook at here !!!\033[0m\n"); }


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

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

LLVM IR (-O0):
@.str = [29 x i8] c"\1B[0;31mLook at here !!!\1B[0m\0A\00"
define void @point() {
%1 = call i32 @printf(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@str = [28 x i8] c"\1B[0;31mLook at here !!!\1B[0m\00"
define void @point() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([28 x i8], [28 x i8]* @str, i64 0, i64 0))
ret void
}
/* Variables and functions */
unsigned int __get_cpsr();
int /*<<< orphan*/ __set_cpsr(unsigned int);
unsigned INT_enable(void) {
  unsigned _cpsr_val;
  _cpsr_val = __get_cpsr();
  __set_cpsr(_cpsr_val & ~(0x00000080 | 0x00000040));
  return _cpsr_val;
}


x86 assembly (clang, -O0):
<INT_enable>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1040 <__get_cpsr@plt>
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%edi
and    $0xffffff3f,%edi
call   1030 <__set_cpsr@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<INT_enable>:
push   %rbx
xor    %eax,%eax
call   1040 <__get_cpsr@plt>
mov    %eax,%ebx
mov    %eax,%edi
and    $0xffffff3f,%edi
call   1030 <__set_cpsr@plt>
mov    %ebx,%eax
pop    %rbx
ret

LLVM IR (-O0):
define i32 @INT_enable() {
%1 = alloca i32
%2 = call i32 (...) @__get_cpsr()
store i32 %2, i32* %1
%3 = load i32, i32* %1
%4 = and i32 %3, -193
%5 = call i32 @__set_cpsr(i32 %4)
%6 = load i32, i32* %1
ret i32 %6
}

LLVM IR (-O2):
define i32 @INT_enable() {
%1 = tail call i32 (...) @__get_cpsr()
%2 = and i32 %1, -193
%3 = tail call i32 @__set_cpsr(i32 %2)
ret i32 %1
}
/* Variables and functions */
double pow(double, int);
double f(double x) { return (pow(x, 4) - pow(x, 3) - 20); }


x86 assembly (clang, -O0):
<f>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
mov    $0x4,%edi
call   1030 <pow@plt>
movsd  %xmm0,-0x10(%rbp)
movsd  -0x8(%rbp),%xmm0
mov    $0x3,%edi
call   1030 <pow@plt>
movaps %xmm0,%xmm1
movsd  -0x10(%rbp),%xmm0
subsd  %xmm1,%xmm0
movsd  0xeac(%rip),%xmm1
subsd  %xmm1,%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<f>:
sub    $0x18,%rsp
movsd  %xmm0,0x8(%rsp)
mov    $0x4,%edi
call   1030 <pow@plt>
movsd  %xmm0,0x10(%rsp)
movsd  0x8(%rsp),%xmm0
mov    $0x3,%edi
call   1030 <pow@plt>
movsd  0x10(%rsp),%xmm1
subsd  %xmm0,%xmm1
addsd  0xeb4(%rip),%xmm1
movapd %xmm1,%xmm0
add    $0x18,%rsp
ret

LLVM IR (-O0):
define double @f(double %0) {
%2 = alloca double
store double %0, double* %2
%3 = load double, double* %2
%4 = call double @pow(double %3, i32 4)
%5 = load double, double* %2
%6 = call double @pow(double %5, i32 3)
%7 = fsub double %4, %6
%8 = fsub double %7, 2.000000e+01
ret double %8
}

LLVM IR (-O2):
define double @f(double %0) {
%2 = tail call double @pow(double %0, i32 4)
%3 = tail call double @pow(double %0, i32 3)
%4 = fsub double %2, %3
%5 = fadd double %4, -2.000000e+01
ret double %5
}
/* Variables and functions */
int /*<<< orphan*/ write(int, unsigned char *, int);
void SendUBX(int fd, unsigned char *MSG, int len) { write(fd, MSG, len); }


x86 assembly (clang, -O0):
<SendUBX>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x10(%rbp),%rsi
mov    -0x14(%rbp),%edx
call   1030 <write@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<SendUBX>:
jmp    1030 <write@plt>

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

LLVM IR (-O2):
define void @SendUBX(i32 %0, i8* nocapture %1, i32 %2) {
%4 = tail call i32 @write(i32 %0, i8* %1, i32 %2)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ cwd;

/* Variables and functions */
int EXIT_SUCCESS;
int /*<<< orphan*/ MAXPATHLEN;
char *getcwd(char *, int);
int /*<<< orphan*/ printf(char *, char *);
int main(int argc, char *argv[]) {
  char cwd[MAXPATHLEN + 1];
  printf("%s\n", getcwd(cwd, sizeof(cwd)));
  return (EXIT_SUCCESS);
}


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    0x2eab(%rip),%rax
mov    (%rax),%eax
add    $0x1,%eax
mov    %rsp,%rcx
mov    %rcx,-0x18(%rbp)
mov    %rax,%rcx
add    $0xf,%rcx
and    $0xfffffffffffffff0,%rcx
mov    %rsp,%rdi
sub    %rcx,%rdi
mov    %rdi,%rsp
mov    %rax,-0x20(%rbp)
mov    %eax,%esi
call   1040 <getcwd@plt>
mov    %rax,%rsi
lea    0xe8e(%rip),%rdi
call   1030 <printf@plt>
mov    0x2e5a(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x4(%rbp)
mov    -0x18(%rbp),%rax
mov    %rax,%rsp
mov    -0x4(%rbp),%eax
mov    %rbp,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
mov    %rsp,%rbp
mov    0x2ebd(%rip),%rax
mov    (%rax),%esi
add    $0x1,%esi
mov    %rsp,%rdi
lea    0xf(%rsi),%rax
and    $0xfffffffffffffff0,%rax
sub    %rax,%rdi
mov    %rdi,%rsp
call   1040 <getcwd@plt>
lea    0xeb3(%rip),%rdi
mov    %rax,%rsi
call   1030 <printf@plt>
mov    0x2e7c(%rip),%rax
mov    (%rax),%eax
mov    %rbp,%rsp
pop    %rbp
ret

LLVM IR (-O0):
@MAXPATHLEN = global i32 0
@.str = [4 x i8] c"%s\0A\00"
@EXIT_SUCCESS = global i32 0
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i8*
%7 = alloca i64
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%8 = load i32, i32* @MAXPATHLEN
%9 = add nsw i32 %8, 1
%10 = zext i32 %9 to i64
%11 = call i8* @llvm.stacksave()
store i8* %11, i8** %6
%12 = alloca i8, i64 %10
store i64 %10, i64* %7
%13 = trunc i64 %10 to i32
%14 = call i8* @getcwd(i8* %12, i32 %13)
%15 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %14)
%16 = load i32, i32* @EXIT_SUCCESS
store i32 %16, i32* %3
%17 = load i8*, i8** %6
%18 = load i32, i32* %3
ret i32 %18
}

LLVM IR (-O2):
@MAXPATHLEN = global i32 0
@.str = [4 x i8] c"%s\0A\00"
@EXIT_SUCCESS = global i32 0
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = load i32, i32* @MAXPATHLEN
%4 = add nsw i32 %3, 1
%5 = zext i32 %4 to i64
%6 = alloca i8, i64 %5
%7 = call i8* @getcwd(i8* %6, i32 %4)
%8 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %7)
%9 = load i32, i32* @EXIT_SUCCESS
ret i32 %9
}
/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, int const, char const *,
                           char const *);
int /*<<< orphan*/ stderr;
void pd_debug(const char *message, const char *file_origin,
              const int line_origin) {
  fprintf(stderr, "(%d : %s) :: %s \n", line_origin, file_origin, message);
}


x86 assembly (clang, -O0):
<pd_debug>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    0x2eb6(%rip),%rax
mov    (%rax),%edi
mov    -0x14(%rbp),%edx
mov    -0x10(%rbp),%rcx
mov    -0x8(%rbp),%r8
lea    0xec2(%rip),%rsi
call   1030 <fprintf@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<pd_debug>:
mov    %rsi,%rcx
mov    %rdi,%r8
mov    0x2ec3(%rip),%rax
mov    (%rax),%edi
lea    0xeda(%rip),%rsi
jmp    1030 <fprintf@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [18 x i8] c"(%d : %s) :: %s \0A\00"
define void @pd_debug(i8* %0, i8* %1, i32 %2) {
%4 = alloca i8*
%5 = alloca i8*
%6 = alloca i32
store i8* %0, i8** %4
store i8* %1, i8** %5
store i32 %2, i32* %6
%7 = load i32, i32* @stderr
%8 = load i32, i32* %6
%9 = load i8*, i8** %5
%10 = load i8*, i8** %4
%11 = call i32 @fprintf(i32 %7, i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0), i32 %8, i8* %9, i8* %10)
ret void
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [18 x i8] c"(%d : %s) :: %s \0A\00"
define void @pd_debug(i8* %0, i8* %1, i32 %2) {
%4 = load i32, i32* @stderr
%5 = tail call i32 @fprintf(i32 %4, i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0), i32 %2, i8* %1, i8* %0)
ret void
}
void av_mul_q() {}


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

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

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

LLVM IR (-O2):
define void @av_mul_q() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ free(float **);
void free_convert_matrix(float **b, int nrl) { free(b + nrl); }


x86 assembly (clang, -O0):
<free_convert_matrix>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rdi
movslq -0xc(%rbp),%rax
shl    $0x3,%rax
add    %rax,%rdi
call   1030 <free@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<free_convert_matrix>:
movslq %esi,%rax
lea    (%rdi,%rax,8),%rdi
jmp    1030 <free@plt>

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

LLVM IR (-O2):
define void @free_convert_matrix(float** nocapture %0, i32 %1) {
%3 = sext i32 %1 to i64
%4 = getelementptr inbounds float*, float** %0, i64 %3
%5 = tail call i32 @free(float** %4)
ret void
}
void d2i_OCSP_SIGNATURE(void) {}


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

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

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

LLVM IR (-O2):
define void @d2i_OCSP_SIGNATURE() {
ret void
}
int j(int i) { return i > (i - (-2)); }


x86 assembly (clang, -O0):
<j>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
mov    -0x4(%rbp),%ecx
sub    $0xfffffffe,%ecx
cmp    %ecx,%eax
setg   %al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @j(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = load i32, i32* %2
%5 = sub nsw i32 %4, -2
%6 = icmp sgt i32 %3, %5
%7 = zext i1 %6 to i32
ret i32 %7
}

LLVM IR (-O2):
define i32 @j(i32 %0) {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ free(void *);
void CFree(void *mem) {
  if (mem)
    free(mem);
}


x86 assembly (clang, -O0):
<CFree>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
cmpq   $0x0,-0x8(%rbp)
je     1130 <CFree+0x20>
mov    -0x8(%rbp),%rdi
call   1030 <free@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<CFree>:
test   %rdi,%rdi
je     111a <CFree+0xa>
jmp    1030 <free@plt>
ret

LLVM IR (-O0):
define void @CFree(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = icmp ne i8* %3, null
br i1 %4, label %5, label %8
5: ; preds = %1
%6 = load i8*, i8** %2
%7 = call i32 @free(i8* %6)
br label %8
8: ; preds = %5, %1
ret void
}

LLVM IR (-O2):
define void @CFree(i8* %0) {
%2 = icmp eq i8* %0, null
br i1 %2, label %5, label %3
3: ; preds = %1
%4 = tail call i32 @free(i8* %0)
br label %5
5: ; preds = %3, %1
ret void
}
/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char *);
int /*<<< orphan*/ stderr;
int usageError(char *argv0) {
  fprintf(stderr, "Error. Usage: %s <string> -r <rating> -s <stlfile>\n",
          argv0);
}


x86 assembly (clang, -O0):
<usageError>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x10(%rbp)
mov    0x2ebd(%rip),%rax
mov    (%rax),%edi
mov    -0x10(%rbp),%rdx
lea    0xed0(%rip),%rsi
call   1030 <fprintf@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<usageError>:
mov    %rdi,%rdx
mov    0x2ec6(%rip),%rax
mov    (%rax),%edi
lea    0xedd(%rip),%rsi
jmp    1030 <fprintf@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [52 x i8] c"Error. Usage: %s <string> -r <rating> -s <stlfile>\0A\00"
define i32 @usageError(i8* %0) {
%2 = alloca i32
%3 = alloca i8*
store i8* %0, i8** %3
%4 = load i32, i32* @stderr
%5 = load i8*, i8** %3
%6 = call i32 @fprintf(i32 %4, i8* getelementptr inbounds ([52 x i8], [52 x i8]* @.str, i64 0, i64 0), i8* %5)
%7 = load i32, i32* %2
ret i32 %7
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [52 x i8] c"Error. Usage: %s <string> -r <rating> -s <stlfile>\0A\00"
define i32 @usageError(i8* %0) {
%2 = load i32, i32* @stderr
%3 = tail call i32 @fprintf(i32 %2, i8* getelementptr inbounds ([52 x i8], [52 x i8]* @.str, i64 0, i64 0), i8* %0)
ret i32 undef
}
/* Variables and functions */
int /*<<< orphan*/ mlMatrixCopy(float *, float *);
int /*<<< orphan*/ mlMatrixTranslateTo(float *, float const *, float *);
void mlMatrixTranslate(float *a, const float *b) {
  float result[16];
  mlMatrixTranslateTo(a, b, result);
  mlMatrixCopy(result, a);
}


x86 assembly (clang, -O0):
<mlMatrixTranslate>:
push   %rbp
mov    %rsp,%rbp
sub    $0x50,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
lea    -0x50(%rbp),%rdx
call   1030 <mlMatrixTranslateTo@plt>
lea    -0x50(%rbp),%rdi
mov    -0x8(%rbp),%rsi
call   1040 <mlMatrixCopy@plt>
add    $0x50,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<mlMatrixTranslate>:
push   %r14
push   %rbx
sub    $0x48,%rsp
mov    %rdi,%rbx
mov    %rsp,%r14
mov    %r14,%rdx
call   1030 <mlMatrixTranslateTo@plt>
mov    %r14,%rdi
mov    %rbx,%rsi
call   1040 <mlMatrixCopy@plt>
add    $0x48,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define void @mlMatrixTranslate(float* %0, float* %1) {
%3 = alloca float*
%4 = alloca float*
%5 = alloca [16 x float]
store float* %0, float** %3
store float* %1, float** %4
%6 = load float*, float** %3
%7 = load float*, float** %4
%8 = getelementptr inbounds [16 x float], [16 x float]* %5, i64 0, i64 0
%9 = call i32 @mlMatrixTranslateTo(float* %6, float* %7, float* %8)
%10 = getelementptr inbounds [16 x float], [16 x float]* %5, i64 0, i64 0
%11 = load float*, float** %3
%12 = call i32 @mlMatrixCopy(float* %10, float* %11)
ret void
}

LLVM IR (-O2):
define void @mlMatrixTranslate(float* %0, float* %1) {
%3 = alloca [16 x float]
%4 = bitcast [16 x float]* %3 to i8*
%5 = getelementptr inbounds [16 x float], [16 x float]* %3, i64 0, i64 0
%6 = call i32 @mlMatrixTranslateTo(float* %0, float* %1, float* %5)
%7 = call i32 @mlMatrixCopy(float* %5, float* %0)
ret void
}
int min(int k, int j) {
  if (k < j)
    return k;
  return j;
}


x86 assembly (clang, -O0):
<min>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%eax
cmp    -0xc(%rbp),%eax
jge    1121 <min+0x21>
mov    -0x8(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    1127 <min+0x27>
mov    -0xc(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<min>:
mov    %esi,%eax
cmp    %esi,%edi
cmovl  %edi,%eax
ret

LLVM IR (-O0):
define i32 @min(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* %4
%7 = load i32, i32* %5
%8 = icmp slt i32 %6, %7
br i1 %8, label %9, label %11
9: ; preds = %2
%10 = load i32, i32* %4
store i32 %10, i32* %3
br label %13
11: ; preds = %2
%12 = load i32, i32* %5
store i32 %12, i32* %3
br label %13
13: ; preds = %11, %9
%14 = load i32, i32* %3
ret i32 %14
}

LLVM IR (-O2):
define i32 @min(i32 %0, i32 %1) {
%3 = icmp slt i32 %0, %1
%4 = select i1 %3, i32 %0, i32 %1
ret i32 %4
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/ *, char *, char *);
void display_usage(char *argv[], FILE *out_stream) {
  fprintf(out_stream, "Usage: %s [-h] [-w hostname:server_port] ", argv[0]);
}


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

x86 assembly (clang, -O2):
<display_usage>:
mov    %rsi,%rax
mov    (%rdi),%rdx
lea    0xee3(%rip),%rsi
mov    %rax,%rdi
jmp    1030 <fprintf@plt>

LLVM IR (-O0):
@.str = [42 x i8] c"Usage: %s [-h] [-w hostname:server_port] \00"
define void @display_usage(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 = getelementptr inbounds i8*, i8** %6, i64 0
%8 = load i8*, i8** %7
%9 = call i32 @fprintf(i32* %5, i8* getelementptr inbounds ([42 x i8], [42 x i8]* @.str, i64 0, i64 0), i8* %8)
ret void
}

LLVM IR (-O2):
@.str = [42 x i8] c"Usage: %s [-h] [-w hostname:server_port] \00"
define void @display_usage(i8** nocapture %0, i32* nocapture %1) {
%3 = load i8*, i8** %0
%4 = tail call i32 @fprintf(i32* %1, i8* getelementptr inbounds ([42 x i8], [42 x i8]* @.str, i64 0, i64 0), i8* %3)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
int /*<<< orphan*/ stderr;
void test_fail_handler(void) { fprintf(stderr, "test failed\n"); }


x86 assembly (clang, -O0):
<test_fail_handler>:
push   %rbp
mov    %rsp,%rbp
mov    0x2ec5(%rip),%rax
mov    (%rax),%edi
lea    0xedc(%rip),%rsi
call   1030 <fprintf@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_fail_handler>:
mov    0x2ec9(%rip),%rax
mov    (%rax),%edi
lea    0xee0(%rip),%rsi
jmp    1030 <fprintf@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [13 x i8] c"test failed\0A\00"
define void @test_fail_handler() {
%1 = load i32, i32* @stderr
%2 = call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [13 x i8] c"test failed\0A\00"
define void @test_fail_handler() {
%1 = load i32, i32* @stderr
%2 = tail call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0))
ret void
}
/* Variables and functions */
unsigned hash(char *s, size_t hashsize) {
  unsigned hashval;
  for (hashval = 0; *s != '\0'; s++)
    hashval = *s + 31 * hashval;
  return hashval % hashsize;
}


x86 assembly (clang, -O0):
<hash>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
mov    -0x8(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x0,%eax
je     1144 <hash+0x44>
mov    -0x8(%rbp),%rax
movsbl (%rax),%eax
imul   $0x1f,-0x14(%rbp),%ecx
add    %ecx,%eax
mov    %eax,-0x14(%rbp)
mov    -0x8(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x8(%rbp)
jmp    1113 <hash+0x13>
mov    -0x14(%rbp),%eax
xor    %ecx,%ecx
mov    %ecx,%edx
divq   -0x10(%rbp)
mov    %edx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<hash>:
mov    (%rdi),%cl
xor    %eax,%eax
test   %cl,%cl
je     112b <hash+0x2b>
add    $0x1,%rdi
nopl   0x0(%rax)
movsbl %cl,%ecx
mov    %eax,%edx
shl    $0x5,%edx
sub    %eax,%edx
mov    %edx,%eax
add    %ecx,%eax
movzbl (%rdi),%ecx
add    $0x1,%rdi
test   %cl,%cl
jne    1110 <hash+0x10>
mov    %eax,%eax
cmp    %rsi,%rax
jb     1136 <hash+0x36>
xor    %edx,%edx
div    %esi
mov    %edx,%eax
ret

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

LLVM IR (-O2):
define i32 @hash(i8* nocapture %0, i64 %1) {
%3 = load i8, i8* %0
%4 = icmp eq i8 %3, 0
br i1 %4, label %17, label %5
5: ; preds = %2, %5
%6 = phi i8 [ %13, %5 ], [ %3, %2 ]
%7 = phi i32 [ %11, %5 ], [ 0, %2 ]
%8 = phi i8* [ %12, %5 ], [ %0, %2 ]
%9 = sext i8 %6 to i32
%10 = mul i32 %7, 31
%11 = add i32 %10, %9
%12 = getelementptr inbounds i8, i8* %8, i64 1
%13 = load i8, i8* %12
%14 = icmp eq i8 %13, 0
br i1 %14, label %15, label %5
15: ; preds = %5
%16 = zext i32 %11 to i64
br label %17
17: ; preds = %15, %2
%18 = phi i64 [ 0, %2 ], [ %16, %15 ]
%19 = urem i64 %18, %1
%20 = trunc i64 %19 to i32
ret i32 %20
}
/* Variables and functions */
char *concat(char *, char *);
int /*<<< orphan*/ printf(char *, char *);
int main(void) {
  char s1[] = "first ", s2[] = "name";
  char *p = concat(s1, s2);
  printf("%s\n", p);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    0xecb(%rip),%eax
mov    %eax,-0xb(%rbp)
mov    0xec5(%rip),%ax
mov    %ax,-0x7(%rbp)
mov    0xebd(%rip),%al
mov    %al,-0x5(%rbp)
mov    0xeb5(%rip),%eax
mov    %eax,-0x10(%rbp)
mov    0xeb0(%rip),%al
mov    %al,-0xc(%rbp)
lea    -0xb(%rbp),%rdi
lea    -0x10(%rbp),%rsi
call   1040 <concat@plt>
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rsi
lea    0xe92(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
sub    $0x18,%rsp
movl   $0x207473,0x13(%rsp)
movl   $0x73726966,0x10(%rsp)
73
movb   $0x0,0xc(%rsp)
movl   $0x656d616e,0x8(%rsp)
65
lea    0x10(%rsp),%rdi
lea    0x8(%rsp),%rsi
call   1040 <concat@plt>
lea    0xeb5(%rip),%rdi
mov    %rax,%rsi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x18,%rsp
ret

LLVM IR (-O0):
@__const.main.s1 = [7 x i8] c"first \00"
@__const.main.s2 = [5 x i8] c"name\00"
@.str = [4 x i8] c"%s\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca [7 x i8]
%3 = alloca [5 x i8]
%4 = alloca i8*
store i32 0, i32* %1
%5 = bitcast [7 x i8]* %2 to i8*
%6 = bitcast [5 x i8]* %3 to i8*
%7 = getelementptr inbounds [7 x i8], [7 x i8]* %2, i64 0, i64 0
%8 = getelementptr inbounds [5 x i8], [5 x i8]* %3, i64 0, i64 0
%9 = call i8* @concat(i8* %7, i8* %8)
store i8* %9, i8** %4
%10 = load i8*, i8** %4
%11 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %10)
ret i32 0
}

LLVM IR (-O2):
@__const.main.s1 = [7 x i8] c"first \00"
@__const.main.s2 = [5 x i8] c"name\00"
@.str = [4 x i8] c"%s\0A\00"
define i32 @main() {
%1 = alloca [7 x i8]
%2 = alloca [5 x i8]
%3 = getelementptr inbounds [7 x i8], [7 x i8]* %1, i64 0, i64 0
%4 = getelementptr inbounds [5 x i8], [5 x i8]* %2, i64 0, i64 0
%5 = call i8* @concat(i8* %3, i8* %4)
%6 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %5)
ret i32 0
}
/* Variables and functions */
float atod(char const *);
float atof(const char *s) { return atod(s); }


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

x86 assembly (clang, -O2):
<atof>:
jmp    1030 <atod@plt>

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

LLVM IR (-O2):
define float @atof(i8* %0) {
%2 = tail call float @atod(i8* %0)
ret float %2
}
cbuf37(f, n) int f, n;
{ cbuf(f, n, 37); }


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

x86 assembly (clang, -O2):
<cbuf37>:
mov    $0x25,%edx
xor    %eax,%eax
jmp    1030 <cbuf@plt>

LLVM IR (-O0):
define i32 @cbuf37(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* %4
%7 = load i32, i32* %5
%8 = call i32 (i32, i32, i32, ...) bitcast (i32 (...)* @cbuf to i32 (i32, i32, i32, ...)*)(i32 %6, i32 %7, i32 37)
%9 = load i32, i32* %3
ret i32 %9
}

LLVM IR (-O2):
define i32 @cbuf37(i32 %0, i32 %1) {
%3 = tail call i32 (i32, i32, i32, ...) bitcast (i32 (...)* @cbuf to i32 (i32, i32, i32, ...)*)(i32 %0, i32 %1, i32 37)
ret i32 undef
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char);
int /*<<< orphan*/ scanf(char *, char *);
int main() {
  char a, opp;
  scanf("%c", &a);
  opp = ('z' - (a - 'a'));
  printf("\n%c\n", opp);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeca(%rip),%rdi
lea    -0x5(%rbp),%rsi
call   1040 <scanf@plt>
movsbl -0x5(%rbp),%ecx
sub    $0x61,%ecx
mov    $0x7a,%eax
sub    %ecx,%eax
mov    %al,-0x6(%rbp)
lea    0xeac(%rip),%rdi
movsbl -0x6(%rbp),%esi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xed8(%rip),%rdi
lea    0x7(%rsp),%rsi
call   1040 <scanf@plt>
mov    $0xdb,%al
sub    0x7(%rsp),%al
movsbl %al,%esi
lea    0xec1(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
@.str = [3 x i8] c"%c\00"
@.str.1 = [5 x i8] c"\0A%c\0A\00"
define i32 @main() {
%1 = alloca i8
%2 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* %1)
%3 = load i8, i8* %1
%4 = sub i8 -37, %3
%5 = call i32 @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0), i8 signext %4)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ __console_tx_string(char *);
void print_spew(char *str) { __console_tx_string(str); }


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

x86 assembly (clang, -O2):
<print_spew>:
jmp    1030 <__console_tx_string@plt>

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

LLVM IR (-O2):
define void @print_spew(i8* %0) {
%2 = tail call i32 @__console_tx_string(i8* %0)
ret void
}
/* Type definitions */
typedef int uint8_t;

/* Variables and functions */
void smpte_hbrmt_set_video_source_id(uint8_t *p_hbrmt, uint8_t vsid) {
  p_hbrmt[0] |= (vsid & 0x7);
}


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

x86 assembly (clang, -O2):
<smpte_hbrmt_set_video_source_id>:
and    $0x7,%esi
or     %esi,(%rdi)
ret

LLVM IR (-O0):
define void @smpte_hbrmt_set_video_source_id(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 = and i32 %5, 7
%7 = load i32*, i32** %3
%8 = getelementptr inbounds i32, i32* %7, i64 0
%9 = load i32, i32* %8
%10 = or i32 %9, %6
store i32 %10, i32* %8
ret void
}

LLVM IR (-O2):
define void @smpte_hbrmt_set_video_source_id(i32* nocapture %0, i32 %1) {
%3 = and i32 %1, 7
%4 = load i32, i32* %0
%5 = or i32 %4, %3
store i32 %5, i32* %0
ret void
}
/* Variables and functions */
scalar_t__ strcmp(char *, char *);
int equal_string(void *s1, void *s2) {
  return (strcmp((char *)s1, (char *)s2)) == 0;
}


x86 assembly (clang, -O0):
<equal_string>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1030 <strcmp@plt>
cmp    $0x0,%rax
sete   %al
and    $0x1,%al
movzbl %al,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<equal_string>:
push   %rax
call   1030 <strcmp@plt>
xor    %ecx,%ecx
test   %rax,%rax
sete   %cl
mov    %ecx,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @equal_string(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
store i8* %0, i8** %3
store i8* %1, i8** %4
%5 = load i8*, i8** %3
%6 = load i8*, i8** %4
%7 = call i64 @strcmp(i8* %5, i8* %6)
%8 = icmp eq i64 %7, 0
%9 = zext i1 %8 to i32
ret i32 %9
}

LLVM IR (-O2):
define i32 @equal_string(i8* %0, i8* %1) {
%3 = tail call i64 @strcmp(i8* %0, i8* %1)
%4 = icmp eq i64 %3, 0
%5 = zext i1 %4 to i32
ret i32 %5
}
void gtk_icon_view_set_model() {}


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

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

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

LLVM IR (-O2):
define void @gtk_icon_view_set_model() {
ret void
}
void test_analyzer_is_running() {
  int *p = 0;
  *p = 0xDEADBEEF;
}


x86 assembly (clang, -O0):
<test_analyzer_is_running>:
push   %rbp
mov    %rsp,%rbp
movq   $0x0,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movl   $0xdeadbeef,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
LLVM IR (-O0):
define void @test_analyzer_is_running() {
%1 = alloca i32*
store i32* null, i32** %1
%2 = load i32*, i32** %1
store i32 -559038737, i32* %2
ret void
}

LLVM IR (-O2):
void glUniform4uiv(void) { return; }


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

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

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

LLVM IR (-O2):
define void @glUniform4uiv() {
ret void
}
int test_imm_98int16_mem(short *val) {
  return ((*val) & (0x98 << 0)) ? -20 : -40;
}


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

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

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

LLVM IR (-O2):
define i32 @test_imm_98int16_mem(i16* nocapture %0) {
%2 = load i16, i16* %0
%3 = and i16 %2, 152
%4 = icmp eq i16 %3, 0
%5 = select i1 %4, i32 -40, i32 -20
ret i32 %5
}
/* Type definitions */
struct in_addr {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ err_sys(char *);
int inet_pton(int, char const *, struct in_addr *);
int Inet_pton(int family, const char *strptr, struct in_addr *addrptr) {
  if (inet_pton(family, strptr, addrptr) != 1)
    err_sys("inet_pton error");
  return 1;
}


x86 assembly (clang, -O0):
<Inet_pton>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
call   1040 <inet_pton@plt>
cmp    $0x1,%eax
je     1158 <Inet_pton+0x38>
lea    0xead(%rip),%rdi
call   1030 <err_sys@plt>
mov    $0x1,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Inet_pton>:
push   %rax
call   1040 <inet_pton@plt>
cmp    $0x1,%eax
je     1137 <Inet_pton+0x17>
lea    0xece(%rip),%rdi
call   1030 <err_sys@plt>
mov    $0x1,%eax
pop    %rcx
ret

LLVM IR (-O0):
%struct.in_addr = type { i32 }
@.str = [16 x i8] c"inet_pton error\00"
define i32 @Inet_pton(i32 %0, i8* %1, %struct.in_addr* %2) {
%4 = alloca i32
%5 = alloca i8*
%6 = alloca %struct.in_addr*
store i32 %0, i32* %4
store i8* %1, i8** %5
store %struct.in_addr* %2, %struct.in_addr** %6
%7 = load i32, i32* %4
%8 = load i8*, i8** %5
%9 = load %struct.in_addr*, %struct.in_addr** %6
%10 = call i32 @inet_pton(i32 %7, i8* %8, %struct.in_addr* %9)
%11 = icmp ne i32 %10, 1
br i1 %11, label %12, label %14
12: ; preds = %3
%13 = call i32 @err_sys(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0))
br label %14
14: ; preds = %12, %3
ret i32 1
}

LLVM IR (-O2):
%struct.in_addr = type { i32 }
@.str = [16 x i8] c"inet_pton error\00"
define i32 @Inet_pton(i32 %0, i8* %1, %struct.in_addr* %2) {
%4 = tail call i32 @inet_pton(i32 %0, i8* %1, %struct.in_addr* %2)
%5 = icmp eq i32 %4, 1
br i1 %5, label %8, label %6
6: ; preds = %3
%7 = tail call i32 @err_sys(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0))
br label %8
8: ; preds = %6, %3
ret i32 1
}
void fix_pages(unsigned char *bot, unsigned char *top) {}


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

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

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

LLVM IR (-O2):
define void @fix_pages(i8* nocapture %0, i8* nocapture %1) {
ret void
}
void testAssert() {
  "";
  "";
}


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

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

LLVM IR (-O0):
@.str = [1 x i8] zeroinitializer
define void @testAssert() {
ret void
}

LLVM IR (-O2):
define void @testAssert() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
void exit1() { exit(42); }


x86 assembly (clang, -O0):
<exit1>:
push   %rbp
mov    %rsp,%rbp
mov    $0x2a,%edi
call   1030 <exit@plt>

x86 assembly (clang, -O2):
<exit1>:
push   %rax
mov    $0x2a,%edi
call   1030 <exit@plt>

LLVM IR (-O0):
define void @exit1() {
%1 = call i32 @exit(i32 42)
unreachable
}

LLVM IR (-O2):
define void @exit1() {
%1 = tail call i32 @exit(i32 42)
unreachable
}
/* Variables and functions */
int Factorial(int);
int /*<<< orphan*/ printf(char *, int);
int main() {
  printf("%d\n", Factorial(3));
  return 0;
}


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

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

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

LLVM IR (-O2):
@.str = [4 x i8] c"%d\0A\00"
define i32 @main() {
%1 = tail call i32 @Factorial(i32 3)
%2 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %1)
ret i32 0
}