xunge/DecIR huggingface dataset:
void RTLogGetDefaultInstance(void) {}


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

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

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

LLVM IR (-O2):
define void @RTLogGetDefaultInstance() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ chdir(char *);
void ichdir(char *name) { chdir(name); }


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

x86 assembly (clang, -O2):
<ichdir>:
jmp    1030 <chdir@plt>

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

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

/* Variables and functions */
int getParity(int /*<<< orphan*/);
void printSeatalkChar(uint8_t c, int parerr, int *cmdFlag) {
  int parity = getParity(c);
  if (!parity) {
    if (parerr) {
      *cmdFlag = 1;
    } else {
      *cmdFlag = 0;
    }
  } else {
    if (parerr) {
      *cmdFlag = 0;
    } else {
      *cmdFlag = 1;
    }
  }
}


x86 assembly (clang, -O0):
<printSeatalkChar>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %rdx,-0x10(%rbp)
mov    -0x4(%rbp),%edi
call   1030 <getParity@plt>
mov    %eax,-0x14(%rbp)
cmpl   $0x0,-0x14(%rbp)
jne    115f <printSeatalkChar+0x4f>
cmpl   $0x0,-0x8(%rbp)
je     1150 <printSeatalkChar+0x40>
mov    -0x10(%rbp),%rax
movl   $0x1,(%rax)
jmp    115a <printSeatalkChar+0x4a>
mov    -0x10(%rbp),%rax
movl   $0x0,(%rax)
jmp    1187 <printSeatalkChar+0x77>
cmpl   $0x0,-0x8(%rbp)
je     1178 <printSeatalkChar+0x68>
mov    -0x10(%rbp),%rax
movl   $0x0,(%rax)
jmp    1182 <printSeatalkChar+0x72>
mov    -0x10(%rbp),%rax
movl   $0x1,(%rax)
jmp    1187 <printSeatalkChar+0x77>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<printSeatalkChar>:
push   %rbp
push   %rbx
push   %rax
mov    %rdx,%rbx
mov    %esi,%ebp
call   1030 <getParity@plt>
test   %eax,%eax
sete   %al
test   %ebp,%ebp
sete   %cl
xor    %al,%cl
movzbl %cl,%eax
mov    %eax,(%rbx)
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

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

LLVM IR (-O2):
define void @printSeatalkChar(i32 %0, i32 %1, i32* nocapture writeonly %2) {
%4 = tail call i32 @getParity(i32 %0)
%5 = icmp eq i32 %4, 0
%6 = icmp eq i32 %1, 0
%7 = xor i1 %6, %5
%8 = zext i1 %7 to i32
store i32 %8, i32* %2
ret void
}
/* Variables and functions */
long raster_multiplication(long, long);
long edf_raster_multiplication(long a, long x) {
  return (raster_multiplication(a, x));
}


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

x86 assembly (clang, -O2):
<edf_raster_multiplication>:
jmp    1030 <raster_multiplication@plt>

LLVM IR (-O0):
define i64 @edf_raster_multiplication(i64 %0, i64 %1) {
%3 = alloca i64
%4 = alloca i64
store i64 %0, i64* %3
store i64 %1, i64* %4
%5 = load i64, i64* %3
%6 = load i64, i64* %4
%7 = call i64 @raster_multiplication(i64 %5, i64 %6)
ret i64 %7
}

LLVM IR (-O2):
define i64 @edf_raster_multiplication(i64 %0, i64 %1) {
%3 = tail call i64 @raster_multiplication(i64 %0, i64 %1)
ret i64 %3
}
/* Variables and functions */
int /*<<< orphan*/ term_atrial_actuator();
int /*<<< orphan*/ term_atrial_signal_sensor();
int /*<<< orphan*/ term_ventricle_actuator();
int /*<<< orphan*/ term_ventricle_signal_sensor();
void terminate_system() {
  term_atrial_actuator();
  term_ventricle_signal_sensor();
  term_ventricle_actuator();
  term_atrial_signal_sensor();
}


x86 assembly (clang, -O0):
<terminate_system>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1060 <term_atrial_actuator@plt>
mov    $0x0,%al
call   1030 <term_ventricle_signal_sensor@plt>
mov    $0x0,%al
call   1040 <term_ventricle_actuator@plt>
mov    $0x0,%al
call   1050 <term_atrial_signal_sensor@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<terminate_system>:
push   %rax
xor    %eax,%eax
call   1060 <term_atrial_actuator@plt>
xor    %eax,%eax
call   1030 <term_ventricle_signal_sensor@plt>
xor    %eax,%eax
call   1040 <term_ventricle_actuator@plt>
xor    %eax,%eax
pop    %rcx
jmp    1050 <term_atrial_signal_sensor@plt>

LLVM IR (-O0):
define void @terminate_system() {
%1 = call i32 (...) @term_atrial_actuator()
%2 = call i32 (...) @term_ventricle_signal_sensor()
%3 = call i32 (...) @term_ventricle_actuator()
%4 = call i32 (...) @term_atrial_signal_sensor()
ret void
}

LLVM IR (-O2):
define void @terminate_system() {
%1 = tail call i32 (...) @term_atrial_actuator()
%2 = tail call i32 (...) @term_ventricle_signal_sensor()
%3 = tail call i32 (...) @term_ventricle_actuator()
%4 = tail call i32 (...) @term_atrial_signal_sensor()
ret void
}
int eaccess(path, mode) const char *path;
int mode;
{ return access(path, mode); }


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

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

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

LLVM IR (-O2):
define i32 @eaccess(i8* %0, i32 %1) {
%3 = tail call i32 (i8*, i32, ...) bitcast (i32 (...)* @access to i32 (i8*, i32, ...)*)(i8* %0, i32 %1)
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ WNOHANG;
scalar_t__ waitpid(int, int /*<<< orphan*/ *, int /*<<< orphan*/);
void sig_chld_defunct_reap(int sno) {
  while (waitpid(-1, NULL, WNOHANG) > 0)
    ;
}


x86 assembly (clang, -O0):
<sig_chld_defunct_reap>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    0x2ec6(%rip),%rax
mov    (%rax),%edx
mov    $0xffffffff,%edi
xor    %eax,%eax
mov    %eax,%esi
call   1030 <waitpid@plt>
cmp    $0x0,%rax
jle    1141 <sig_chld_defunct_reap+0x31>
jmp    111b <sig_chld_defunct_reap+0xb>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<sig_chld_defunct_reap>:
push   %rbx
mov    0x2ed0(%rip),%rbx
nopl   0x0(%rax,%rax,1)
mov    (%rbx),%edx
mov    $0xffffffff,%edi
xor    %esi,%esi
call   1030 <waitpid@plt>
test   %rax,%rax
jg     1120 <sig_chld_defunct_reap+0x10>
pop    %rbx
ret

LLVM IR (-O0):
@WNOHANG = global i32 0
define void @sig_chld_defunct_reap(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
br label %3
3: ; preds = %7, %1
%4 = load i32, i32* @WNOHANG
%5 = call i64 @waitpid(i32 -1, i32* null, i32 %4)
%6 = icmp sgt i64 %5, 0
br i1 %6, label %7, label %8
7: ; preds = %3
br label %3
8: ; preds = %3
ret void
}

LLVM IR (-O2):
@WNOHANG = global i32 0
define void @sig_chld_defunct_reap(i32 %0) {
br label %2
2: ; preds = %2, %1
%3 = load i32, i32* @WNOHANG
%4 = tail call i64 @waitpid(i32 -1, i32* null, i32 %3)
%5 = icmp sgt i64 %4, 0
br i1 %5, label %2, label %6
6: ; preds = %2
ret void
}
void ARGBCopyYToAlpha() {}


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

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

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

LLVM IR (-O2):
define void @ARGBCopyYToAlpha() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ scanf(char *, float *);
void preencher_vetor(float v[], int n) {
  for (int i = 0; i < n; ++i) {
    scanf("%f", v + i);
  }
}


x86 assembly (clang, -O0):
<preencher_vetor>:
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    115b <preencher_vetor+0x4b>
mov    -0x8(%rbp),%rsi
movslq -0x10(%rbp),%rax
shl    $0x2,%rax
add    %rax,%rsi
lea    0xeb8(%rip),%rdi
call   1030 <scanf@plt>
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    1126 <preencher_vetor+0x16>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<preencher_vetor>:
push   %r15
push   %r14
push   %rbx
test   %esi,%esi
jle    1145 <preencher_vetor+0x35>
mov    %rdi,%rbx
mov    %esi,%r15d
lea    0xeda(%rip),%r14
cs nopw 0x0(%rax,%rax,1)
mov    %r14,%rdi
mov    %rbx,%rsi
call   1030 <scanf@plt>
add    $0x4,%rbx
add    $0xffffffffffffffff,%r15
jne    1130 <preencher_vetor+0x20>
pop    %rbx
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
@.str = [3 x i8] c"%f\00"
define void @preencher_vetor(float* %0, i32 %1) {
%3 = alloca float*
%4 = alloca i32
%5 = alloca i32
store float* %0, float** %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 float*, float** %3
%12 = load i32, i32* %5
%13 = sext i32 %12 to i64
%14 = getelementptr inbounds float, float* %11, i64 %13
%15 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), float* %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):
@.str = [3 x i8] c"%f\00"
define void @preencher_vetor(float* %0, i32 %1) {
%3 = icmp sgt i32 %1, 0
br i1 %3, label %4, label %6
4: ; preds = %2
%5 = zext i32 %1 to i64
br label %7
6: ; preds = %7, %2
ret void
7: ; preds = %4, %7
%8 = phi i64 [ 0, %4 ], [ %11, %7 ]
%9 = getelementptr inbounds float, float* %0, i64 %8
%10 = tail call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), float* %9)
%11 = add nuw nsw i64 %8, 1
%12 = icmp eq i64 %11, %5
br i1 %12, label %6, label %7
}
int gcspy_colorDBGetLength() { return 15; }


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

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

LLVM IR (-O0):
define i32 @gcspy_colorDBGetLength() {
ret i32 15
}

LLVM IR (-O2):
define i32 @gcspy_colorDBGetLength() {
ret i32 15
}
/* Variables and functions */
int /*<<< orphan*/ putchar(int);
int main() {
  int arr[16];
  arr[0] = 42;
  arr[1] = 43;
  arr[2] = 44;
  putchar(arr[0]);
  putchar(arr[1]);
  putchar(arr[2]);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x50,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x2a,-0x50(%rbp)
movl   $0x2b,-0x4c(%rbp)
movl   $0x2c,-0x48(%rbp)
mov    -0x50(%rbp),%edi
call   1030 <putchar@plt>
mov    -0x4c(%rbp),%edi
call   1030 <putchar@plt>
mov    -0x48(%rbp),%edi
call   1030 <putchar@plt>
xor    %eax,%eax
add    $0x50,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    $0x2a,%edi
call   1030 <putchar@plt>
mov    $0x2b,%edi
call   1030 <putchar@plt>
mov    $0x2c,%edi
call   1030 <putchar@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca [16 x i32]
store i32 0, i32* %1
%3 = getelementptr inbounds [16 x i32], [16 x i32]* %2, i64 0, i64 0
store i32 42, i32* %3
%4 = getelementptr inbounds [16 x i32], [16 x i32]* %2, i64 0, i64 1
store i32 43, i32* %4
%5 = getelementptr inbounds [16 x i32], [16 x i32]* %2, i64 0, i64 2
store i32 44, i32* %5
%6 = getelementptr inbounds [16 x i32], [16 x i32]* %2, i64 0, i64 0
%7 = load i32, i32* %6
%8 = call i32 @putchar(i32 %7)
%9 = getelementptr inbounds [16 x i32], [16 x i32]* %2, i64 0, i64 1
%10 = load i32, i32* %9
%11 = call i32 @putchar(i32 %10)
%12 = getelementptr inbounds [16 x i32], [16 x i32]* %2, i64 0, i64 2
%13 = load i32, i32* %12
%14 = call i32 @putchar(i32 %13)
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 @putchar(i32 42)
%2 = tail call i32 @putchar(i32 43)
%3 = tail call i32 @putchar(i32 44)
ret i32 0
}
/* Type definitions */
typedef int uint8_t;

/* Variables and functions */
int recv_byte();
int /*<<< orphan*/ send_byte(int);
uint8_t debug_instr_3(uint8_t in0, uint8_t in1, uint8_t in2) {
  send_byte(0x57);
  send_byte(in0);
  send_byte(in1);
  send_byte(in2);
  return recv_byte();
}


x86 assembly (clang, -O0):
<debug_instr_3>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    $0x57,%edi
call   1040 <send_byte@plt>
mov    -0x4(%rbp),%edi
call   1040 <send_byte@plt>
mov    -0x8(%rbp),%edi
call   1040 <send_byte@plt>
mov    -0xc(%rbp),%edi
call   1040 <send_byte@plt>
mov    $0x0,%al
call   1030 <recv_byte@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<debug_instr_3>:
push   %rbp
push   %r14
push   %rbx
mov    %edx,%r14d
mov    %esi,%ebp
mov    %edi,%ebx
mov    $0x57,%edi
call   1040 <send_byte@plt>
mov    %ebx,%edi
call   1040 <send_byte@plt>
mov    %ebp,%edi
call   1040 <send_byte@plt>
mov    %r14d,%edi
call   1040 <send_byte@plt>
xor    %eax,%eax
pop    %rbx
pop    %r14
pop    %rbp
jmp    1030 <recv_byte@plt>

LLVM IR (-O0):
define i32 @debug_instr_3(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 = call i32 @send_byte(i32 87)
%8 = load i32, i32* %4
%9 = call i32 @send_byte(i32 %8)
%10 = load i32, i32* %5
%11 = call i32 @send_byte(i32 %10)
%12 = load i32, i32* %6
%13 = call i32 @send_byte(i32 %12)
%14 = call i32 (...) @recv_byte()
ret i32 %14
}

LLVM IR (-O2):
define i32 @debug_instr_3(i32 %0, i32 %1, i32 %2) {
%4 = tail call i32 @send_byte(i32 87)
%5 = tail call i32 @send_byte(i32 %0)
%6 = tail call i32 @send_byte(i32 %1)
%7 = tail call i32 @send_byte(i32 %2)
%8 = tail call i32 (...) @recv_byte()
ret i32 %8
}
/* Type definitions */
typedef scalar_t__ uint8_t;
typedef int uint32_t;

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


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

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

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

LLVM IR (-O2):
define i32 @r32le(i64* nocapture %0) {
%2 = getelementptr inbounds i64, i64* %0, i64 3
%3 = load i64, i64* %2
%4 = trunc i64 %3 to i32
%5 = shl i32 %4, 24
%6 = getelementptr inbounds i64, i64* %0, i64 2
%7 = load i64, i64* %6
%8 = trunc i64 %7 to i32
%9 = shl i32 %8, 16
%10 = or i32 %9, %5
%11 = getelementptr inbounds i64, i64* %0, i64 1
%12 = load i64, i64* %11
%13 = trunc i64 %12 to i32
%14 = shl i32 %13, 8
%15 = or i32 %10, %14
%16 = load i64, i64* %0
%17 = trunc i64 %16 to i32
%18 = or i32 %15, %17
ret i32 %18
}
/* Variables and functions */
int /*<<< orphan*/ PopIndent();
int /*<<< orphan*/ RecursiveReturn();
int /*<<< orphan*/ TXTOUT(char *);
void EndVERBATIM() {
  PopIndent();
  TXTOUT("@end example\n");
  RecursiveReturn();
}


x86 assembly (clang, -O0):
<EndVERBATIM>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1030 <PopIndent@plt>
lea    0xebe(%rip),%rdi
call   1040 <TXTOUT@plt>
mov    $0x0,%al
call   1050 <RecursiveReturn@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<EndVERBATIM>:
push   %rax
xor    %eax,%eax
call   1030 <PopIndent@plt>
lea    0xec1(%rip),%rdi
call   1040 <TXTOUT@plt>
xor    %eax,%eax
pop    %rcx
jmp    1050 <RecursiveReturn@plt>

LLVM IR (-O0):
@.str = [14 x i8] c"@end example\0A\00"
define void @EndVERBATIM() {
%1 = call i32 (...) @PopIndent()
%2 = call i32 @TXTOUT(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0))
%3 = call i32 (...) @RecursiveReturn()
ret void
}

LLVM IR (-O2):
@.str = [14 x i8] c"@end example\0A\00"
define void @EndVERBATIM() {
%1 = tail call i32 (...) @PopIndent()
%2 = tail call i32 @TXTOUT(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0))
%3 = tail call i32 (...) @RecursiveReturn()
ret void
}
/* Variables and functions */
scalar_t__ calloc(unsigned int, int);
int /*<<< orphan*/ printf(char *);
double *dvector(int nl, int nh) {
  double *v;
  v = (double *)calloc((unsigned)(nh - nl + 1), sizeof(double));
  if (!v)
    printf("allocation failure in dvector()");
  return v - nl;
}


x86 assembly (clang, -O0):
<dvector>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x8(%rbp),%edi
sub    -0x4(%rbp),%edi
add    $0x1,%edi
mov    $0x8,%esi
call   1040 <calloc@plt>
mov    %rax,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
jne    115c <dvector+0x3c>
lea    0xea9(%rip),%rdi
call   1030 <printf@plt>
mov    -0x10(%rbp),%rax
movslq -0x4(%rbp),%rdx
xor    %ecx,%ecx
sub    %rdx,%rcx
shl    $0x3,%rcx
add    %rcx,%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<dvector>:
push   %rbp
push   %rbx
push   %rax
mov    %edi,%ebp
sub    %edi,%esi
lea    0x1(%rsi),%edi
mov    $0x8,%esi
call   1040 <calloc@plt>
mov    %rax,%rbx
test   %rax,%rax
jne    1148 <dvector+0x28>
lea    0xebd(%rip),%rdi
call   1030 <printf@plt>
movslq %ebp,%rax
shl    $0x3,%rax
sub    %rax,%rbx
mov    %rbx,%rax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
@.str = [32 x i8] c"allocation failure in dvector()\00"
define double* @dvector(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca double*
store i32 %0, i32* %3
store i32 %1, i32* %4
%6 = load i32, i32* %4
%7 = load i32, i32* %3
%8 = sub nsw i32 %6, %7
%9 = add nsw i32 %8, 1
%10 = call i64 @calloc(i32 %9, i32 8)
%11 = inttoptr i64 %10 to double*
store double* %11, double** %5
%12 = load double*, double** %5
%13 = icmp ne double* %12, null
br i1 %13, label %16, label %14
14: ; preds = %2
%15 = call i32 @printf(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str, i64 0, i64 0))
br label %16
16: ; preds = %14, %2
%17 = load double*, double** %5
%18 = load i32, i32* %3
%19 = sext i32 %18 to i64
%20 = sub i64 0, %19
%21 = getelementptr inbounds double, double* %17, i64 %20
ret double* %21
}

LLVM IR (-O2):
@.str = [32 x i8] c"allocation failure in dvector()\00"
define double* @dvector(i32 %0, i32 %1) {
%3 = sub i32 1, %0
%4 = add i32 %3, %1
%5 = tail call i64 @calloc(i32 %4, i32 8)
%6 = icmp eq i64 %5, 0
br i1 %6, label %7, label %9
7: ; preds = %2
%8 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([32 x i8], [32 x i8]* @.str, i64 0, i64 0))
br label %9
9: ; preds = %7, %2
%10 = inttoptr i64 %5 to double*
%11 = sext i32 %0 to i64
%12 = sub nsw i64 0, %11
%13 = getelementptr inbounds double, double* %10, i64 %12
ret double* %13
}
int test_imm_F0int64_midword_mem(long long *val) {
  return ((*val >> 16) & (0xF0 << 0)) ? -20 : -40;
}


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

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

LLVM IR (-O0):
define i32 @test_imm_F0int64_midword_mem(i64* %0) {
%2 = alloca i64*
store i64* %0, i64** %2
%3 = load i64*, i64** %2
%4 = load i64, i64* %3
%5 = ashr i64 %4, 16
%6 = and i64 %5, 240
%7 = icmp ne i64 %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_F0int64_midword_mem(i64* nocapture %0) {
%2 = load i64, i64* %0
%3 = and i64 %2, 15728640
%4 = icmp eq i64 %3, 0
%5 = select i1 %4, i32 -40, i32 -20
ret i32 %5
}
/* Variables and functions */
int _ada_use_c2phc4c(int, int *, int *, double *, int /*<<< orphan*/);
int copy_container_to_start_system(void) {
  int *a, *b, fail;
  double *c;
  fail = _ada_use_c2phc4c(4, a, b, c, 0);
  return fail;
}


x86 assembly (clang, -O0):
<copy_container_to_start_system>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    -0x8(%rbp),%rsi
mov    -0x10(%rbp),%rdx
mov    -0x20(%rbp),%rcx
mov    $0x4,%edi
xor    %r8d,%r8d
call   1030 <_ada_use_c2phc4c@plt>
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<copy_container_to_start_system>:
mov    $0x4,%edi
xor    %r8d,%r8d
jmp    1030 <_ada_use_c2phc4c@plt>

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

LLVM IR (-O2):
define i32 @copy_container_to_start_system() {
%1 = tail call i32 @_ada_use_c2phc4c(i32 4, i32* undef, i32* undef, double* undef, i32 0)
ret i32 %1
}
/* Type definitions */
typedef int /*<<< orphan*/ uint8_t;
typedef int /*<<< orphan*/ uint64_t;

/* Variables and functions */
int /*<<< orphan*/ crc64_ecma_refl_base(int /*<<< orphan*/,
                                        int /*<<< orphan*/ const *,
                                        int /*<<< orphan*/);
uint64_t crc64_ecma_refl(uint64_t seed, const uint8_t *buf, uint64_t len) {
  return crc64_ecma_refl_base(seed, buf, len);
}


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

x86 assembly (clang, -O2):
<crc64_ecma_refl>:
jmp    1030 <crc64_ecma_refl_base@plt>

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

LLVM IR (-O2):
define i32 @crc64_ecma_refl(i32 %0, i32* %1, i32 %2) {
%4 = tail call i32 @crc64_ecma_refl_base(i32 %0, i32* %1, i32 %2)
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ accept_additive_expression();
int /*<<< orphan*/ parse_relational_expression();
void accept_relational_expression() {
  accept_additive_expression();
  parse_relational_expression();
}


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

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

LLVM IR (-O0):
define void @accept_relational_expression() {
%1 = call i32 (...) @accept_additive_expression()
%2 = call i32 (...) @parse_relational_expression()
ret void
}

LLVM IR (-O2):
define void @accept_relational_expression() {
%1 = tail call i32 (...) @accept_additive_expression()
%2 = tail call i32 (...) @parse_relational_expression()
ret void
}
void f(int a) {
  long long b;
  extern char c;
  a *= 2;
  b = a;
  c = (char)b;
}


x86 assembly (clang, -O0):
<f>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
shl    $0x1,%eax
mov    %eax,-0x4(%rbp)
movslq -0x4(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    %al,%cl
mov    0x2ec3(%rip),%rax
mov    %cl,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<f>:
add    %dil,%dil
mov    0x2ede(%rip),%rax
mov    %dil,(%rax)
ret

LLVM IR (-O0):
@c = external global i8
define void @f(i32 %0) {
%2 = alloca i32
%3 = alloca i64
store i32 %0, i32* %2
%4 = load i32, i32* %2
%5 = mul nsw i32 %4, 2
store i32 %5, i32* %2
%6 = load i32, i32* %2
%7 = sext i32 %6 to i64
store i64 %7, i64* %3
%8 = load i64, i64* %3
%9 = trunc i64 %8 to i8
store i8 %9, i8* @c
ret void
}

LLVM IR (-O2):
@c = external global i8
define void @f(i32 %0) {
%2 = trunc i32 %0 to i8
%3 = shl i8 %2, 1
store i8 %3, i8* @c
ret void
}
/* Variables and functions */
int /*<<< orphan*/ set_tbh_size(char *, int);
int /*<<< orphan*/ write(int, char *, int);
void tbh_write(int fd, char buf[], int buffsize) {
  char header_buf[2];
  ;
  set_tbh_size(header_buf, buffsize);
  write(fd, header_buf, 2);
  write(fd, buf, buffsize);
  return;
}


x86 assembly (clang, -O0):
<tbh_write>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
lea    -0x16(%rbp),%rdi
mov    -0x14(%rbp),%esi
call   1040 <set_tbh_size@plt>
mov    -0x4(%rbp),%edi
lea    -0x16(%rbp),%rsi
mov    $0x2,%edx
call   1030 <write@plt>
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):
<tbh_write>:
push   %rbp
push   %r15
push   %r14
push   %rbx
push   %rax
mov    %edx,%ebx
mov    %rsi,%r14
mov    %edi,%ebp
lea    0x6(%rsp),%r15
mov    %r15,%rdi
mov    %edx,%esi
call   1040 <set_tbh_size@plt>
mov    %ebp,%edi
mov    %r15,%rsi
mov    $0x2,%edx
call   1030 <write@plt>
mov    %ebp,%edi
mov    %r14,%rsi
mov    %ebx,%edx
call   1030 <write@plt>
add    $0x8,%rsp
pop    %rbx
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
define void @tbh_write(i32 %0, i8* %1, i32 %2) {
%4 = alloca i32
%5 = alloca i8*
%6 = alloca i32
%7 = alloca [2 x i8]
store i32 %0, i32* %4
store i8* %1, i8** %5
store i32 %2, i32* %6
%8 = getelementptr inbounds [2 x i8], [2 x i8]* %7, i64 0, i64 0
%9 = load i32, i32* %6
%10 = call i32 @set_tbh_size(i8* %8, i32 %9)
%11 = load i32, i32* %4
%12 = getelementptr inbounds [2 x i8], [2 x i8]* %7, i64 0, i64 0
%13 = call i32 @write(i32 %11, i8* %12, i32 2)
%14 = load i32, i32* %4
%15 = load i8*, i8** %5
%16 = load i32, i32* %6
%17 = call i32 @write(i32 %14, i8* %15, i32 %16)
ret void
}

LLVM IR (-O2):
define void @tbh_write(i32 %0, i8* nocapture %1, i32 %2) {
%4 = alloca [2 x i8]
%5 = getelementptr inbounds [2 x i8], [2 x i8]* %4, i64 0, i64 0
%6 = call i32 @set_tbh_size(i8* %5, i32 %2)
%7 = call i32 @write(i32 %0, i8* %5, i32 2)
%8 = call i32 @write(i32 %0, i8* %1, i32 %2)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ diagnostics(int, char *);
void CmdTolerateEnviron(int code) {
  if (code == 0x4000) {
    diagnostics(4, "Entering CmdTolerateEnviron \\begin{environ}");
  }
  if (code == 0x0000) {
    diagnostics(4, "Exiting CmdTolerateEnviron \\end{environ}");
  }
}


x86 assembly (clang, -O0):
<CmdTolerateEnviron>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
cmpl   $0x4000,-0x4(%rbp)
jne    1139 <CmdTolerateEnviron+0x29>
mov    $0x4,%edi
lea    0xecc(%rip),%rsi
call   1030 <diagnostics@plt>
cmpl   $0x0,-0x4(%rbp)
jne    1154 <CmdTolerateEnviron+0x44>
mov    $0x4,%edi
lea    0xedd(%rip),%rsi
call   1030 <diagnostics@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<CmdTolerateEnviron>:
cmp    $0x4000,%edi
je     112d <CmdTolerateEnviron+0x1d>
test   %edi,%edi
jne    113e <CmdTolerateEnviron+0x2e>
lea    0xf09(%rip),%rsi
mov    $0x4,%edi
jmp    1030 <diagnostics@plt>
lea    0xecc(%rip),%rsi
mov    $0x4,%edi
jmp    1030 <diagnostics@plt>
ret

LLVM IR (-O0):
@.str = [44 x i8] c"Entering CmdTolerateEnviron \\begin{environ}\00"
@.str.1 = [41 x i8] c"Exiting CmdTolerateEnviron \\end{environ}\00"
define void @CmdTolerateEnviron(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = icmp eq i32 %3, 16384
br i1 %4, label %5, label %7
5: ; preds = %1
%6 = call i32 @diagnostics(i32 4, i8* getelementptr inbounds ([44 x i8], [44 x i8]* @.str, i64 0, i64 0))
br label %7
7: ; preds = %5, %1
%8 = load i32, i32* %2
%9 = icmp eq i32 %8, 0
br i1 %9, label %10, label %12
10: ; preds = %7
%11 = call i32 @diagnostics(i32 4, i8* getelementptr inbounds ([41 x i8], [41 x i8]* @.str.1, i64 0, i64 0))
br label %12
12: ; preds = %10, %7
ret void
}

LLVM IR (-O2):
@.str = [44 x i8] c"Entering CmdTolerateEnviron \\begin{environ}\00"
@.str.1 = [41 x i8] c"Exiting CmdTolerateEnviron \\end{environ}\00"
define void @CmdTolerateEnviron(i32 %0) {
switch i32 %0, label %6 [
i32 16384, label %3
i32 0, label %2
]
2: ; preds = %1
br label %3
3: ; preds = %1, %2
%4 = phi i8* [ getelementptr inbounds ([41 x i8], [41 x i8]* @.str.1, i64 0, i64 0), %2 ], [ getelementptr inbounds ([44 x i8], [44 x i8]* @.str, i64 0, i64 0), %1 ]
%5 = tail call i32 @diagnostics(i32 4, i8* %4)
br label %6
6: ; preds = %3, %1
ret void
}
/* Variables and functions */
int /*<<< orphan*/ extern_used();
int /*<<< orphan*/ static_define();
int main() {
  extern_used();
  static_define();
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1040 <extern_used@plt>
mov    $0x0,%al
call   1030 <static_define@plt>
xor    %eax,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @main() {
%1 = call i32 (...) @extern_used()
%2 = call i32 (...) @static_define()
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @extern_used()
%2 = tail call i32 (...) @static_define()
ret i32 0
}
void exceptionHandler(void) {
  while (1)
    ;
}


x86 assembly (clang, -O0):
<exceptionHandler>:
push   %rbp
mov    %rsp,%rbp
jmp    1109 <exceptionHandler+0x9>
jmp    1109 <exceptionHandler+0x9>

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

LLVM IR (-O0):
define void @exceptionHandler() {
br label %1
1: ; preds = %0, %1
br label %1
}

LLVM IR (-O2):
define void @exceptionHandler() {
br label %1
1: ; preds = %0, %1
br label %1
}
/* Type definitions */
struct termios {
  int /*<<< orphan*/ c_iflag;
};

/* Variables and functions */
int /*<<< orphan*/ IXON;
int /*<<< orphan*/ TCSANOW;
int /*<<< orphan*/ tcgetattr(int /*<<< orphan*/, struct termios *);
int /*<<< orphan*/ tcsetattr(int /*<<< orphan*/, int /*<<< orphan*/,
                             struct termios *);
void disable_flow_control(void) {
  struct termios term;
  tcgetattr(0, &term);
  term.c_iflag &= ~IXON;
  tcsetattr(0, TCSANOW, &term);
}


x86 assembly (clang, -O0):
<disable_flow_control>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
xor    %edi,%edi
lea    -0x8(%rbp),%rsi
call   1030 <tcgetattr@plt>
mov    0x2eae(%rip),%rax
mov    (%rax),%eax
xor    $0xffffffff,%eax
and    -0x8(%rbp),%eax
mov    %eax,-0x8(%rbp)
mov    0x2e94(%rip),%rax
mov    (%rax),%esi
xor    %edi,%edi
lea    -0x8(%rbp),%rdx
call   1040 <tcsetattr@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<disable_flow_control>:
push   %rbx
sub    $0x10,%rsp
lea    0x8(%rsp),%rbx
xor    %edi,%edi
mov    %rbx,%rsi
call   1030 <tcgetattr@plt>
mov    0x2ead(%rip),%rax
mov    (%rax),%eax
not    %eax
and    %eax,0x8(%rsp)
mov    0x2e96(%rip),%rax
mov    (%rax),%esi
xor    %edi,%edi
mov    %rbx,%rdx
call   1040 <tcsetattr@plt>
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
%struct.termios = type { i32 }
@IXON = global i32 0
@TCSANOW = global i32 0
define void @disable_flow_control() {
%1 = alloca %struct.termios
%2 = call i32 @tcgetattr(i32 0, %struct.termios* %1)
%3 = load i32, i32* @IXON
%4 = xor i32 %3, -1
%5 = getelementptr inbounds %struct.termios, %struct.termios* %1, i32 0, i32 0
%6 = load i32, i32* %5
%7 = and i32 %6, %4
store i32 %7, i32* %5
%8 = load i32, i32* @TCSANOW
%9 = call i32 @tcsetattr(i32 0, i32 %8, %struct.termios* %1)
ret void
}

LLVM IR (-O2):
%struct.termios = type { i32 }
@IXON = global i32 0
@TCSANOW = global i32 0
define void @disable_flow_control() {
%1 = alloca %struct.termios
%2 = bitcast %struct.termios* %1 to i8*
%3 = call i32 @tcgetattr(i32 0, %struct.termios* %1)
%4 = load i32, i32* @IXON
%5 = xor i32 %4, -1
%6 = getelementptr inbounds %struct.termios, %struct.termios* %1, i64 0, i32 0
%7 = load i32, i32* %6
%8 = and i32 %7, %5
store i32 %8, i32* %6
%9 = load i32, i32* @TCSANOW
%10 = call i32 @tcsetattr(i32 0, i32 %9, %struct.termios* %1)
ret void
}
void dump_distinct_digest_count(int severity) { (void)severity; }


x86 assembly (clang, -O0):
<dump_distinct_digest_count>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
pop    %rbp
ret

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

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

LLVM IR (-O2):
define void @dump_distinct_digest_count(i32 %0) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ remove_old_pairs(long long);
int /*<<< orphan*/ sniffer_trace(char *);
void remove_old(long long time_stamp) {
  if (0) {
    sniffer_trace("ENTERING: remove_old");
  }
  remove_old_pairs(time_stamp);
  if (0) {
    sniffer_trace("LEAVING: remove_old");
  }
}


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

x86 assembly (clang, -O2):
<remove_old>:
jmp    1030 <remove_old_pairs@plt>

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

LLVM IR (-O2):
define void @remove_old(i64 %0) {
%2 = tail call i32 @remove_old_pairs(i64 %0)
ret void
}
int main(int artc, char *argv[]) {
  asm volatile("andq  $0xfffffffffffffff0, %rsp\n");
  _Exit(42);
}


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)
and    $0xfffffffffffffff0,%rsp
mov    $0x2a,%edi
call   1030 <_Exit@plt>

x86 assembly (clang, -O2):
<main>:
push   %rax
and    $0xfffffffffffffff0,%rsp
mov    $0x2a,%edi
call   1030 <_Exit@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
unreachable
}

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture readnone %1) {
tail call void asm sideeffect "andq $$0xfffffffffffffff0, %rsp\0A", "~{dirflag},~{fpsr},~{flags}"()
tail call void @_Exit(i32 42)
unreachable
}
/* Variables and functions */
int /*<<< orphan*/ FAIL(char *, char *, int, char *);
void __assert(int x, char *ln, char *file, int line) {
  if (!x) {
    FAIL("%s:%d %s", file, line, ln);
  }
}


x86 assembly (clang, -O0):
<__assert>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %ecx,-0x1c(%rbp)
cmpl   $0x0,-0x4(%rbp)
jne    1147 <__assert+0x37>
mov    -0x18(%rbp),%rsi
mov    -0x1c(%rbp),%edx
mov    -0x10(%rbp),%rcx
lea    0xebe(%rip),%rdi
call   1030 <FAIL@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<__assert>:
test   %edi,%edi
je     1115 <__assert+0x5>
ret
mov    %rsi,%rax
lea    0xee1(%rip),%rdi
mov    %rdx,%rsi
mov    %ecx,%edx
mov    %rax,%rcx
jmp    1030 <FAIL@plt>

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

LLVM IR (-O2):
@.str = [9 x i8] c"%s:%d %s\00"
define void @__assert(i32 %0, i8* %1, i8* %2, i32 %3) {
%5 = icmp eq i32 %0, 0
br i1 %5, label %6, label %8
6: ; preds = %4
%7 = tail call i32 @FAIL(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), i8* %2, i32 %3, i8* %1)
br label %8
8: ; preds = %6, %4
ret void
}
int test_imm_2Dint64_lowword_reg(long long val) {
  return ((val) & (0x2D << 0)) ? -20 : -40;
}


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

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

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

LLVM IR (-O2):
define i32 @test_imm_2Dint64_lowword_reg(i64 %0) {
%2 = and i64 %0, 45
%3 = icmp eq i64 %2, 0
%4 = select i1 %3, i32 -40, i32 -20
ret i32 %4
}
int foo2(void) {}


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

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

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

LLVM IR (-O2):
define i32 @foo2() {
ret i32 undef
}
/* Variables and functions */
int /*<<< orphan*/ glutWireCube(int);
void drawWireCube(void) { glutWireCube(1); }


x86 assembly (clang, -O0):
<drawWireCube>:
push   %rbp
mov    %rsp,%rbp
mov    $0x1,%edi
call   1030 <glutWireCube@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<drawWireCube>:
mov    $0x1,%edi
jmp    1030 <glutWireCube@plt>

LLVM IR (-O0):
define void @drawWireCube() {
%1 = call i32 @glutWireCube(i32 1)
ret void
}

LLVM IR (-O2):
define void @drawWireCube() {
%1 = tail call i32 @glutWireCube(i32 1)
ret void
}
DF(par_f) { err(16); }


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

x86 assembly (clang, -O2):
<DF>:
mov    $0x10,%edi
xor    %eax,%eax
jmp    1030 <err@plt>

LLVM IR (-O0):
define i32 @DF(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %3
%4 = call i32 (i32, ...) bitcast (i32 (...)* @err to i32 (i32, ...)*)(i32 16)
%5 = load i32, i32* %2
ret i32 %5
}

LLVM IR (-O2):
define i32 @DF(i32 %0) {
%2 = tail call i32 (i32, ...) bitcast (i32 (...)* @err to i32 (i32, ...)*)(i32 16)
ret i32 undef
}
void ff_hevc_put_hevc_bi_w_pel_pixels12_8_sse4() {}


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

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

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

LLVM IR (-O2):
define void @ff_hevc_put_hevc_bi_w_pel_pixels12_8_sse4() {
ret void
}
void rop3_62_0_0(unsigned char *D, unsigned char S, unsigned char T) {
  unsigned char stk1;
  unsigned char stk2;
  unsigned char stk3;
  unsigned char stk4;
  stk4 = ~S;
  stk3 = *D & stk4;
  stk2 = T | stk3;
  stk1 = S ^ stk2;
  *D = stk1;
}


x86 assembly (clang, -O0):
<rop3_62_0_0>:
push   %rbp
mov    %rsp,%rbp
mov    %dl,%al
mov    %sil,%cl
mov    %rdi,-0x8(%rbp)
mov    %cl,-0x9(%rbp)
mov    %al,-0xa(%rbp)
movzbl -0x9(%rbp),%eax
xor    $0xffffffff,%eax
mov    %al,-0xe(%rbp)
mov    -0x8(%rbp),%rax
movzbl (%rax),%eax
movzbl -0xe(%rbp),%ecx
and    %ecx,%eax
mov    %al,-0xd(%rbp)
movzbl -0xa(%rbp),%eax
movzbl -0xd(%rbp),%ecx
or     %ecx,%eax
mov    %al,-0xc(%rbp)
movzbl -0x9(%rbp),%eax
movzbl -0xc(%rbp),%ecx
xor    %ecx,%eax
mov    %al,-0xb(%rbp)
mov    -0xb(%rbp),%cl
mov    -0x8(%rbp),%rax
mov    %cl,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<rop3_62_0_0>:
mov    %esi,%eax
not    %al
and    (%rdi),%al
or     %dl,%al
xor    %sil,%al
mov    %al,(%rdi)
ret

LLVM IR (-O0):
define void @rop3_62_0_0(i8* %0, i8 zeroext %1, i8 zeroext %2) {
%4 = alloca i8*
%5 = alloca i8
%6 = alloca i8
%7 = alloca i8
%8 = alloca i8
%9 = alloca i8
%10 = alloca i8
store i8* %0, i8** %4
store i8 %1, i8* %5
store i8 %2, i8* %6
%11 = load i8, i8* %5
%12 = zext i8 %11 to i32
%13 = xor i32 %12, -1
%14 = trunc i32 %13 to i8
store i8 %14, i8* %10
%15 = load i8*, i8** %4
%16 = load i8, i8* %15
%17 = zext i8 %16 to i32
%18 = load i8, i8* %10
%19 = zext i8 %18 to i32
%20 = and i32 %17, %19
%21 = trunc i32 %20 to i8
store i8 %21, i8* %9
%22 = load i8, i8* %6
%23 = zext i8 %22 to i32
%24 = load i8, i8* %9
%25 = zext i8 %24 to i32
%26 = or i32 %23, %25
%27 = trunc i32 %26 to i8
store i8 %27, i8* %8
%28 = load i8, i8* %5
%29 = zext i8 %28 to i32
%30 = load i8, i8* %8
%31 = zext i8 %30 to i32
%32 = xor i32 %29, %31
%33 = trunc i32 %32 to i8
store i8 %33, i8* %7
%34 = load i8, i8* %7
%35 = load i8*, i8** %4
store i8 %34, i8* %35
ret void
}

LLVM IR (-O2):
define void @rop3_62_0_0(i8* nocapture %0, i8 zeroext %1, i8 zeroext %2) {
%4 = xor i8 %1, -1
%5 = load i8, i8* %0
%6 = and i8 %5, %4
%7 = or i8 %6, %2
%8 = xor i8 %7, %1
store i8 %8, i8* %0
ret void
}
int f7d(int *p) {
  p = (void *)(0);
  return 1;
}


x86 assembly (clang, -O0):
<f7d>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movq   $0x0,-0x8(%rbp)
mov    $0x1,%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @f7d(i32* nocapture readnone %0) {
ret i32 1
}
unsigned ht_string_hash_(const char *s) {
  unsigned h;
  const unsigned char *cp = (const unsigned char *)s;
  h = *cp << 7;
  while (*cp) {
    h = (1000003 * h) ^ *cp++;
  }
  h ^= (unsigned)(cp - (const unsigned char *)s);
  return h;
}


x86 assembly (clang, -O0):
<ht_string_hash_>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rax
movzbl (%rax),%eax
shl    $0x7,%eax
mov    %eax,-0xc(%rbp)
mov    -0x18(%rbp),%rax
cmpb   $0x0,(%rax)
je     114d <ht_string_hash_+0x4d>
imul   $0xf4243,-0xc(%rbp),%eax
mov    -0x18(%rbp),%rcx
mov    %rcx,%rdx
add    $0x1,%rdx
mov    %rdx,-0x18(%rbp)
movzbl (%rcx),%ecx
xor    %ecx,%eax
mov    %eax,-0xc(%rbp)
jmp    111d <ht_string_hash_+0x1d>
mov    -0x18(%rbp),%rax
mov    -0x8(%rbp),%rcx
sub    %rcx,%rax
xor    -0xc(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<ht_string_hash_>:
movzbl (%rdi),%edx
mov    %edx,%ecx
shl    $0x7,%ecx
mov    %rdi,%rax
test   %edx,%edx
je     1127 <ht_string_hash_+0x27>
nop
imul   $0xf4243,%ecx,%esi
movzbl %dl,%ecx
xor    %esi,%ecx
movzbl 0x1(%rax),%edx
add    $0x1,%rax
test   %dl,%dl
jne    1110 <ht_string_hash_+0x10>
sub    %edi,%eax
xor    %ecx,%eax
ret

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

LLVM IR (-O2):
define i32 @ht_string_hash_(i8* %0) {
%2 = load i8, i8* %0
%3 = zext i8 %2 to i32
%4 = shl nuw nsw i32 %3, 7
%5 = icmp eq i8 %2, 0
br i1 %5, label %16, label %6
6: ; preds = %1, %6
%7 = phi i8* [ %11, %6 ], [ %0, %1 ]
%8 = phi i32 [ %13, %6 ], [ %4, %1 ]
%9 = phi i8 [ %14, %6 ], [ %2, %1 ]
%10 = mul i32 %8, 1000003
%11 = getelementptr inbounds i8, i8* %7, i64 1
%12 = zext i8 %9 to i32
%13 = xor i32 %10, %12
%14 = load i8, i8* %11
%15 = icmp eq i8 %14, 0
br i1 %15, label %16, label %6
16: ; preds = %6, %1
%17 = phi i32 [ %4, %1 ], [ %13, %6 ]
%18 = phi i8* [ %0, %1 ], [ %11, %6 ]
%19 = ptrtoint i8* %18 to i64
%20 = ptrtoint i8* %0 to i64
%21 = sub i64 %19, %20
%22 = trunc i64 %21 to i32
%23 = xor i32 %17, %22
ret i32 %23
}
/* Variables and functions */
int EXIT_SUCCESS;
int /*<<< orphan*/ printf(char *);
int main(void) {
  printf("use spi_driver\n");
  return EXIT_SUCCESS;
}


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

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

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

LLVM IR (-O2):
@EXIT_SUCCESS = global i32 0
@str = [15 x i8] c"use spi_driver\00"
define i32 @main() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([15 x i8], [15 x i8]* @str, i64 0, i64 0))
%2 = load i32, i32* @EXIT_SUCCESS
ret i32 %2
}