xunge/DecIR huggingface dataset:
/* Type definitions */
typedef int uint8_t;
typedef int uint16_t;

/* Variables and functions */
int bm_check(uint8_t *bm, uint16_t v) {
  uint16_t page_idx = (v >> 3);
  uint8_t bit_idx = (uint8_t)(v & 0x07);
  return bm[page_idx] & (1 << bit_idx);
}


x86 assembly (clang, -O0):
<bm_check>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0xc(%rbp),%eax
sar    $0x3,%eax
mov    %eax,-0x10(%rbp)
mov    -0xc(%rbp),%eax
and    $0x7,%eax
mov    %eax,-0x14(%rbp)
mov    -0x8(%rbp),%rax
movslq -0x10(%rbp),%rcx
mov    (%rax,%rcx,4),%eax
mov    -0x14(%rbp),%ecx
mov    $0x1,%edx
shl    %cl,%edx
mov    %edx,%ecx
and    %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<bm_check>:
mov    %esi,%ecx
mov    %esi,%edx
and    $0x7,%cl
mov    $0x1,%eax
shl    %cl,%eax
sar    $0x3,%edx
movslq %edx,%rcx
and    (%rdi,%rcx,4),%eax
ret

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

LLVM IR (-O2):
define i32 @bm_check(i32* nocapture %0, i32 %1) {
%3 = ashr i32 %1, 3
%4 = and i32 %1, 7
%5 = sext i32 %3 to i64
%6 = getelementptr inbounds i32, i32* %0, i64 %5
%7 = load i32, i32* %6
%8 = shl nuw nsw i32 1, %4
%9 = and i32 %7, %8
ret i32 %9
}
void pnv_pci_init(void) {}


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

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

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

LLVM IR (-O2):
define void @pnv_pci_init() {
ret void
}
/* Variables and functions */
__attribute__((weak)) void rgblight_toggle(void) {}


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

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

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

LLVM IR (-O2):
define weak void @rgblight_toggle() {
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
long fread(void *, long, long, int /*<<< orphan*/ *);
long _sys_fread(void *buffer, long size, long count, FILE *file) {
  return (fread(buffer, size, count, file));
}


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

x86 assembly (clang, -O2):
<_sys_fread>:
jmp    1030 <fread@plt>

LLVM IR (-O0):
define i64 @_sys_fread(i8* %0, i64 %1, i64 %2, i32* %3) {
%5 = alloca i8*
%6 = alloca i64
%7 = alloca i64
%8 = alloca i32*
store i8* %0, i8** %5
store i64 %1, i64* %6
store i64 %2, i64* %7
store i32* %3, i32** %8
%9 = load i8*, i8** %5
%10 = load i64, i64* %6
%11 = load i64, i64* %7
%12 = load i32*, i32** %8
%13 = call i64 @fread(i8* %9, i64 %10, i64 %11, i32* %12)
ret i64 %13
}

LLVM IR (-O2):
define i64 @_sys_fread(i8* nocapture %0, i64 %1, i64 %2, i32* nocapture %3) {
%5 = tail call i64 @fread(i8* %0, i64 %1, i64 %2, i32* %3)
ret i64 %5
}
void RTAvlrUIntPtrRangeGet(void) {}


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

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

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

LLVM IR (-O2):
define void @RTAvlrUIntPtrRangeGet() {
ret void
}
int test_imm_4Aint64_lowword_mem(long long *val) {
  return ((*val) & (0x4A << 0)) ? -20 : -40;
}


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

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

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

LLVM IR (-O2):
define i32 @test_imm_4Aint64_lowword_mem(i64* nocapture %0) {
%2 = load i64, i64* %0
%3 = and i64 %2, 74
%4 = icmp eq i64 %3, 0
%5 = select i1 %4, i32 -40, i32 -20
ret i32 %5
}
double bps(double bpm) { return bpm / 60; }


x86 assembly (clang, -O0):
<bps>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
movsd  0xeea(%rip),%xmm1
divsd  %xmm1,%xmm0
pop    %rbp
ret

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

LLVM IR (-O0):
define double @bps(double %0) {
%2 = alloca double
store double %0, double* %2
%3 = load double, double* %2
%4 = fdiv double %3, 6.000000e+01
ret double %4
}

LLVM IR (-O2):
define double @bps(double %0) {
%2 = fdiv double %0, 6.000000e+01
ret double %2
}
void iconnect_init(void) {}


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

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

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

LLVM IR (-O2):
define void @iconnect_init() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ xprintf(char *);
int main() {
  xprintf("foo\n");
  return 0;
}


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

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

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

LLVM IR (-O2):
@.str = [5 x i8] c"foo\0A\00"
define i32 @main() {
%1 = tail call i32 @xprintf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0))
ret i32 0
}
int RstChip(void) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @RstChip() {
ret i32 0
}
/* Type definitions */
typedef size_t uint16_t;
typedef int /*<<< orphan*/ ****int8_t;

/* Variables and functions */
int /*<<< orphan*/ free(int /*<<< orphan*/ ******);
void freeHadamardMatrix(int8_t **matrix, uint16_t block_edge) {
  uint16_t x;
  for (x = 0; x < block_edge; x++)
    free(matrix[x]);
  free(matrix);
}


x86 assembly (clang, -O0):
<freeHadamardMatrix>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movq   $0x0,-0x18(%rbp)
mov    -0x18(%rbp),%rax
cmp    -0x10(%rbp),%rax
jae    1158 <freeHadamardMatrix+0x48>
mov    -0x8(%rbp),%rax
mov    -0x18(%rbp),%rcx
mov    (%rax,%rcx,8),%rdi
call   1030 <free@plt>
mov    -0x18(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x18(%rbp)
jmp    1128 <freeHadamardMatrix+0x18>
mov    -0x8(%rbp),%rdi
call   1030 <free@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<freeHadamardMatrix>:
push   %r15
push   %r14
push   %rbx
mov    %rdi,%r14
test   %rsi,%rsi
je     1142 <freeHadamardMatrix+0x32>
mov    %rsi,%r15
xor    %ebx,%ebx
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
mov    (%r14,%rbx,8),%rdi
call   1030 <free@plt>
add    $0x1,%rbx
cmp    %rbx,%r15
jne    1130 <freeHadamardMatrix+0x20>
mov    %r14,%rdi
pop    %rbx
pop    %r14
pop    %r15
jmp    1030 <free@plt>

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

LLVM IR (-O2):
define void @freeHadamardMatrix(i32****** nocapture %0, i64 %1) {
%3 = icmp eq i64 %1, 0
br i1 %3, label %12, label %4
4: ; preds = %2, %4
%5 = phi i64 [ %10, %4 ], [ 0, %2 ]
%6 = getelementptr inbounds i32*****, i32****** %0, i64 %5
%7 = bitcast i32****** %6 to i32*******
%8 = load i32******, i32******* %7
%9 = tail call i32 @free(i32****** %8)
%10 = add nuw i64 %5, 1
%11 = icmp eq i64 %10, %1
br i1 %11, label %12, label %4
12: ; preds = %4, %2
%13 = tail call i32 @free(i32****** %0)
ret void
}
/* Variables and functions */
int strlen(char const *);
scalar_t__ strncmp(char const *, char const *, int);
int headmatch(const char *s1, const char *head) {
  int l1 = strlen(s1);
  int l2 = strlen(head);
  if (l1 < l2)
    return 0;
  return strncmp(s1, head, l2) == 0;
}


x86 assembly (clang, -O0):
<headmatch>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    -0x10(%rbp),%rdi
call   1040 <strlen@plt>
mov    %eax,-0x1c(%rbp)
mov    -0x18(%rbp),%rdi
call   1040 <strlen@plt>
mov    %eax,-0x20(%rbp)
mov    -0x1c(%rbp),%eax
cmp    -0x20(%rbp),%eax
jge    1160 <headmatch+0x40>
movl   $0x0,-0x4(%rbp)
jmp    117f <headmatch+0x5f>
mov    -0x10(%rbp),%rdi
mov    -0x18(%rbp),%rsi
mov    -0x20(%rbp),%edx
call   1030 <strncmp@plt>
cmp    $0x0,%rax
sete   %al
and    $0x1,%al
movzbl %al,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<headmatch>:
push   %rbp
push   %r14
push   %rbx
mov    %rsi,%r14
mov    %rdi,%rbx
call   1040 <strlen@plt>
mov    %eax,%ebp
mov    %r14,%rdi
call   1040 <strlen@plt>
mov    %eax,%edx
xor    %eax,%eax
cmp    %edx,%ebp
jl     1157 <headmatch+0x37>
mov    %rbx,%rdi
mov    %r14,%rsi
call   1030 <strncmp@plt>
mov    %rax,%rcx
xor    %eax,%eax
test   %rcx,%rcx
sete   %al
pop    %rbx
pop    %r14
pop    %rbp
ret

LLVM IR (-O0):
define i32 @headmatch(i8* %0, i8* %1) {
%3 = alloca i32
%4 = alloca i8*
%5 = alloca i8*
%6 = alloca i32
%7 = alloca i32
store i8* %0, i8** %4
store i8* %1, i8** %5
%8 = load i8*, i8** %4
%9 = call i32 @strlen(i8* %8)
store i32 %9, i32* %6
%10 = load i8*, i8** %5
%11 = call i32 @strlen(i8* %10)
store i32 %11, i32* %7
%12 = load i32, i32* %6
%13 = load i32, i32* %7
%14 = icmp slt i32 %12, %13
br i1 %14, label %15, label %16
15: ; preds = %2
store i32 0, i32* %3
br label %23
16: ; preds = %2
%17 = load i8*, i8** %4
%18 = load i8*, i8** %5
%19 = load i32, i32* %7
%20 = call i64 @strncmp(i8* %17, i8* %18, i32 %19)
%21 = icmp eq i64 %20, 0
%22 = zext i1 %21 to i32
store i32 %22, i32* %3
br label %23
23: ; preds = %16, %15
%24 = load i32, i32* %3
ret i32 %24
}

LLVM IR (-O2):
define i32 @headmatch(i8* %0, i8* %1) {
%3 = tail call i32 @strlen(i8* %0)
%4 = tail call i32 @strlen(i8* %1)
%5 = icmp slt i32 %3, %4
br i1 %5, label %10, label %6
6: ; preds = %2
%7 = tail call i64 @strncmp(i8* %0, i8* %1, i32 %4)
%8 = icmp eq i64 %7, 0
%9 = zext i1 %8 to i32
br label %10
10: ; preds = %2, %6
%11 = phi i32 [ %9, %6 ], [ 0, %2 ]
ret i32 %11
}
/* Variables and functions */
int /*<<< orphan*/ api_end();
int /*<<< orphan*/ putc(char);
void HariMain(void) {
  putc('A');
  api_end();
}


x86 assembly (clang, -O0):
<HariMain>:
push   %rbp
mov    %rsp,%rbp
mov    $0x41,%edi
call   1040 <putc@plt>
mov    $0x0,%al
call   1030 <api_end@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<HariMain>:
push   %rax
mov    $0x41,%edi
call   1040 <putc@plt>
xor    %eax,%eax
pop    %rcx
jmp    1030 <api_end@plt>

LLVM IR (-O0):
define void @HariMain() {
%1 = call i32 @putc(i8 signext 65)
%2 = call i32 (...) @api_end()
ret void
}

LLVM IR (-O2):
define void @HariMain() {
%1 = tail call i32 @putc(i8 signext 65)
%2 = tail call i32 (...) @api_end()
ret void
}
/* Variables and functions */
int malloc(int);
char *nondet_malloc(int i) {
  int __BLAST_NONDET___0;
  int tmp;
  {
    if (__BLAST_NONDET___0) {
      return ((char *)0);
    } else {
      { tmp = malloc(i); }
      return ((char *)tmp);
    }
  }
}


x86 assembly (clang, -O0):
<nondet_malloc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0xc(%rbp)
cmpl   $0x0,-0x10(%rbp)
je     1132 <nondet_malloc+0x22>
movq   $0x0,-0x8(%rbp)
jmp    1145 <nondet_malloc+0x35>
mov    -0xc(%rbp),%edi
call   1030 <malloc@plt>
mov    %eax,-0x14(%rbp)
movslq -0x14(%rbp),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<nondet_malloc>:
push   %rax
call   1030 <malloc@plt>
cltq
pop    %rcx
ret

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

LLVM IR (-O2):
define i8* @nondet_malloc(i32 %0) {
%2 = tail call i32 @malloc(i32 %0)
%3 = sext i32 %2 to i64
%4 = inttoptr i64 %3 to i8*
ret i8* %4
}
void posix_class2P_XDIGIT() {}


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

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

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

LLVM IR (-O2):
define void @posix_class2P_XDIGIT() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ LRDP(char *);
void uc9_wait_signal() { LRDP("uc9:wait_signal IGNORED\n"); }


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

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

LLVM IR (-O0):
@.str = [25 x i8] c"uc9:wait_signal IGNORED\0A\00"
define void @uc9_wait_signal() {
%1 = call i32 @LRDP(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [25 x i8] c"uc9:wait_signal IGNORED\0A\00"
define void @uc9_wait_signal() {
%1 = tail call i32 @LRDP(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str, i64 0, i64 0))
ret void
}
/* Variables and functions */
int EXIT_FAILURE;
int /*<<< orphan*/ sleep(int);
int sleep_helper(void) {
  sleep(300);
  return EXIT_FAILURE;
}


x86 assembly (clang, -O0):
<sleep_helper>:
push   %rbp
mov    %rsp,%rbp
mov    $0x12c,%edi
call   1030 <sleep@plt>
mov    0x2ebb(%rip),%rax
mov    (%rax),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<sleep_helper>:
push   %rax
mov    $0x12c,%edi
call   1030 <sleep@plt>
mov    0x2ebe(%rip),%rax
mov    (%rax),%eax
pop    %rcx
ret

LLVM IR (-O0):
@EXIT_FAILURE = global i32 0
define i32 @sleep_helper() {
%1 = call i32 @sleep(i32 300)
%2 = load i32, i32* @EXIT_FAILURE
ret i32 %2
}

LLVM IR (-O2):
@EXIT_FAILURE = global i32 0
define i32 @sleep_helper() {
%1 = tail call i32 @sleep(i32 300)
%2 = load i32, i32* @EXIT_FAILURE
ret i32 %2
}
/* Type definitions */
typedef int /*<<< orphan*/ GLshort;

/* Variables and functions */
int /*<<< orphan*/ glTexCoord3sv(int /*<<< orphan*/ *);
void TexCoord3sv(GLshort v[3]) { glTexCoord3sv(v); }


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

x86 assembly (clang, -O2):
<TexCoord3sv>:
jmp    1030 <glTexCoord3sv@plt>

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

LLVM IR (-O2):
define void @TexCoord3sv(i32* %0) {
%2 = tail call i32 @glTexCoord3sv(i32* %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ system(char *);
int main() {
  system("color 5f");
  printf("±³¾°É«ºÍ×ÖÌåÑÕÉ«¶¼·¢Éú±ä»¯ÁË");
  system("pause");
  return 0;
}


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

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xed8(%rip),%rdi
call   1030 <system@plt>
lea    0xed5(%rip),%rdi
call   1040 <printf@plt>
lea    0xf02(%rip),%rdi
call   1030 <system@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [9 x i8] c"color 5f\00"
@.str.1 = [57 x i8] c"\C2\B1\C2\B3\C2\BE\C2\B0\C3\89\C2\AB\C2\BA\C3\8D\C3\97\C3\96\C3\8C\C3\A5\C3\91\C3\95\C3\89\C2\AB\C2\B6\C2\BC\C2\B7\C2\A2\C3\89\C3\BA\C2\B1\C3\A4\C2\BB\C2\AF\C3\81\C3\8B\00"
@.str.2 = [6 x i8] c"pause\00"
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 @system(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0))
%3 = call i32 @printf(i8* getelementptr inbounds ([57 x i8], [57 x i8]* @.str.1, i64 0, i64 0))
%4 = call i32 @system(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.2, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@.str = [9 x i8] c"color 5f\00"
@.str.1 = [57 x i8] c"\C2\B1\C2\B3\C2\BE\C2\B0\C3\89\C2\AB\C2\BA\C3\8D\C3\97\C3\96\C3\8C\C3\A5\C3\91\C3\95\C3\89\C2\AB\C2\B6\C2\BC\C2\B7\C2\A2\C3\89\C3\BA\C2\B1\C3\A4\C2\BB\C2\AF\C3\81\C3\8B\00"
@.str.2 = [6 x i8] c"pause\00"
define i32 @main() {
%1 = tail call i32 @system(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0))
%2 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([57 x i8], [57 x i8]* @.str.1, i64 0, i64 0))
%3 = tail call i32 @system(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.2, i64 0, i64 0))
ret i32 0
}
/* Variables and functions */
long double exp(double);
double tanh(double x) {
  long double y = exp(x + x);
  return (y - 1.) / (y + 1.);
}


x86 assembly (clang, -O0):
<tanh>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
addsd  %xmm0,%xmm0
call   1030 <exp@plt>
fstpt  -0x20(%rbp)
fldt   -0x20(%rbp)
fld1
fld    %st(1)
fsub   %st(1),%st
fxch   %st(2)
faddp  %st,%st(1)
fdivrp %st,%st(1)
fstpl  -0x28(%rbp)
movsd  -0x28(%rbp),%xmm0
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<tanh>:
push   %rax
addsd  %xmm0,%xmm0
call   1030 <exp@plt>
fld1
fld    %st(0)
fchs
fadd   %st(2),%st
fxch   %st(2)
faddp  %st,%st(1)
fdivrp %st,%st(1)
fstpl  (%rsp)
movsd  (%rsp),%xmm0
pop    %rax
ret

LLVM IR (-O0):
define double @tanh(double %0) {
%2 = alloca double
%3 = alloca x86_fp80
store double %0, double* %2
%4 = load double, double* %2
%5 = load double, double* %2
%6 = fadd double %4, %5
%7 = call x86_fp80 @exp(double %6)
store x86_fp80 %7, x86_fp80* %3
%8 = load x86_fp80, x86_fp80* %3
%9 = fsub x86_fp80 %8, 0xK3FFF8000000000000000
%10 = load x86_fp80, x86_fp80* %3
%11 = fadd x86_fp80 %10, 0xK3FFF8000000000000000
%12 = fdiv x86_fp80 %9, %11
%13 = fptrunc x86_fp80 %12 to double
ret double %13
}

LLVM IR (-O2):
define double @tanh(double %0) {
%2 = fadd double %0, %0
%3 = tail call x86_fp80 @exp(double %2)
%4 = fadd x86_fp80 %3, 0xKBFFF8000000000000000
%5 = fadd x86_fp80 %3, 0xK3FFF8000000000000000
%6 = fdiv x86_fp80 %4, %5
%7 = fptrunc x86_fp80 %6 to double
ret double %7
}
/* Type definitions */
typedef int /*<<< orphan*/ c;

/* Variables and functions */
int read(int /*<<< orphan*/, unsigned char *, int);
int getch() {
  int r;
  unsigned char c;
  if ((r = read(0, &c, sizeof(c))) < 0) {
    return r;
  } else {
    return c;
  }
}


x86 assembly (clang, -O0):
<getch>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
xor    %edi,%edi
lea    -0x9(%rbp),%rsi
mov    $0x1,%edx
call   1030 <read@plt>
mov    %eax,-0x8(%rbp)
cmp    $0x0,%eax
jge    113f <getch+0x2f>
mov    -0x8(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    1146 <getch+0x36>
movzbl -0x9(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<getch>:
push   %rax
lea    0x7(%rsp),%rsi
xor    %edi,%edi
mov    $0x1,%edx
call   1030 <read@plt>
test   %eax,%eax
movzbl 0x7(%rsp),%ecx
cmovns %ecx,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @getch() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i8
%4 = call i32 @read(i32 0, i8* %3, i32 1)
store i32 %4, i32* %2
%5 = icmp slt i32 %4, 0
br i1 %5, label %6, label %8
6: ; preds = %0
%7 = load i32, i32* %2
store i32 %7, i32* %1
br label %11
8: ; preds = %0
%9 = load i8, i8* %3
%10 = zext i8 %9 to i32
store i32 %10, i32* %1
br label %11
11: ; preds = %8, %6
%12 = load i32, i32* %1
ret i32 %12
}

LLVM IR (-O2):
define i32 @getch() {
%1 = alloca i8
%2 = call i32 @read(i32 0, i8* %1, i32 1)
%3 = icmp slt i32 %2, 0
%4 = load i8, i8* %1
%5 = zext i8 %4 to i32
%6 = select i1 %3, i32 %2, i32 %5
ret i32 %6
}
void RTDbgModSymbolCount(void) {}


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

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

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

LLVM IR (-O2):
define void @RTDbgModSymbolCount() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ abort();
int bint1();
int lib1t2();
int /*<<< orphan*/ lib1test();
int /*<<< orphan*/ lib2test();
int main(void) {
  lib1test();
  lib2test();
  if (bint1() != 1)
    abort();
  if (lib1t2() != 1)
    abort();
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x0,%al
call   1050 <lib1test@plt>
mov    $0x0,%al
call   1070 <lib2test@plt>
mov    $0x0,%al
call   1040 <bint1@plt>
cmp    $0x1,%eax
je     1184 <main+0x34>
mov    $0x0,%al
call   1030 <abort@plt>
mov    $0x0,%al
call   1060 <lib1t2@plt>
cmp    $0x1,%eax
je     119b <main+0x4b>
mov    $0x0,%al
call   1030 <abort@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1050 <lib1test@plt>
xor    %eax,%eax
call   1070 <lib2test@plt>
xor    %eax,%eax
call   1040 <bint1@plt>
cmp    $0x1,%eax
jne    117b <main+0x2b>
xor    %eax,%eax
call   1060 <lib1t2@plt>
cmp    $0x1,%eax
jne    117b <main+0x2b>
xor    %eax,%eax
pop    %rcx
ret
xor    %eax,%eax
call   1030 <abort@plt>

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 (...) @lib1test()
%3 = call i32 (...) @lib2test()
%4 = call i32 (...) @bint1()
%5 = icmp ne i32 %4, 1
br i1 %5, label %6, label %8
6: ; preds = %0
%7 = call i32 (...) @abort()
unreachable
8: ; preds = %0
%9 = call i32 (...) @lib1t2()
%10 = icmp ne i32 %9, 1
br i1 %10, label %11, label %13
11: ; preds = %8
%12 = call i32 (...) @abort()
unreachable
13: ; preds = %8
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @lib1test()
%2 = tail call i32 (...) @lib2test()
%3 = tail call i32 (...) @bint1()
%4 = icmp eq i32 %3, 1
br i1 %4, label %7, label %5
5: ; preds = %0
%6 = tail call i32 (...) @abort()
unreachable
7: ; preds = %0
%8 = tail call i32 (...) @lib1t2()
%9 = icmp eq i32 %8, 1
br i1 %9, label %12, label %10
10: ; preds = %7
%11 = tail call i32 (...) @abort()
unreachable
12: ; preds = %7
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ errBegin(int *);
void err_begin_(int *const STATUS) {
  int status;
  status = *STATUS;
  errBegin(&status);
  *STATUS = status;
}


x86 assembly (clang, -O0):
<err_begin_>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%eax
mov    %eax,-0xc(%rbp)
lea    -0xc(%rbp),%rdi
call   1030 <errBegin@plt>
mov    -0xc(%rbp),%ecx
mov    -0x8(%rbp),%rax
mov    %ecx,(%rax)
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<err_begin_>:
push   %rbx
sub    $0x10,%rsp
mov    %rdi,%rbx
mov    (%rdi),%eax
mov    %eax,0xc(%rsp)
lea    0xc(%rsp),%rdi
call   1030 <errBegin@plt>
mov    0xc(%rsp),%eax
mov    %eax,(%rbx)
add    $0x10,%rsp
pop    %rbx
ret

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

LLVM IR (-O2):
define void @err_begin_(i32* nocapture %0) {
%2 = alloca i32
%3 = bitcast i32* %2 to i8*
%4 = load i32, i32* %0
store i32 %4, i32* %2
%5 = call i32 @errBegin(i32* %2)
%6 = load i32, i32* %2
store i32 %6, i32* %0
ret void
}
/* Forward declarations */
typedef struct TYPE_2__ TYPE_1__;

/* Type definitions */
struct TYPE_2__ {
  scalar_t__ type;
};
typedef TYPE_1__ XFocusInEvent;

/* Variables and functions */
int get_XFocusInEvent_type(void *_p) {
  return (int)((XFocusInEvent *)_p)->type;
}


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

x86 assembly (clang, -O2):
<get_XFocusInEvent_type>:
mov    (%rdi),%eax
ret

LLVM IR (-O0):
%struct.TYPE_2__ = type { i64 }
define i32 @get_XFocusInEvent_type(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = bitcast i8* %3 to %struct.TYPE_2__*
%5 = getelementptr inbounds %struct.TYPE_2__, %struct.TYPE_2__* %4, i32 0, i32 0
%6 = load i64, i64* %5
%7 = trunc i64 %6 to i32
ret i32 %7
}

LLVM IR (-O2):
define i32 @get_XFocusInEvent_type(i8* nocapture %0) {
%2 = bitcast i8* %0 to i64*
%3 = load i64, i64* %2
%4 = trunc i64 %3 to i32
ret i32 %4
}
/* Variables and functions */
int syscall(int, unsigned int, unsigned int);
int fanotify_init(unsigned flags, unsigned event_f_flags) {
  return syscall(367, flags, event_f_flags);
}


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

x86 assembly (clang, -O2):
<fanotify_init>:
mov    %esi,%edx
mov    %edi,%esi
mov    $0x16f,%edi
jmp    1030 <syscall@plt>

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

LLVM IR (-O2):
define i32 @fanotify_init(i32 %0, i32 %1) {
%3 = tail call i32 @syscall(i32 367, i32 %0, i32 %1)
ret i32 %3
}
/* Variables and functions */
scalar_t__ FALSE;
scalar_t__ has_colors();
int /*<<< orphan*/ start_color();
int initialize_colors(void) {
  if (has_colors() == FALSE) {
    return 1;
  }
  start_color();
  return 0;
}


x86 assembly (clang, -O0):
<initialize_colors>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1030 <has_colors@plt>
mov    0x2eaa(%rip),%rcx
cmp    (%rcx),%rax
jne    114b <initialize_colors+0x2b>
movl   $0x1,-0x4(%rbp)
jmp    1159 <initialize_colors+0x39>
mov    $0x0,%al
call   1040 <start_color@plt>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<initialize_colors>:
push   %rax
xor    %eax,%eax
call   1030 <has_colors@plt>
mov    %rax,%rcx
mov    0x2eae(%rip),%rdx
mov    $0x1,%eax
cmp    (%rdx),%rcx
je     1145 <initialize_colors+0x25>
xor    %eax,%eax
call   1040 <start_color@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@FALSE = global i64 0
define i32 @initialize_colors() {
%1 = alloca i32
%2 = call i64 (...) @has_colors()
%3 = load i64, i64* @FALSE
%4 = icmp eq i64 %2, %3
br i1 %4, label %5, label %6
5: ; preds = %0
store i32 1, i32* %1
br label %8
6: ; preds = %0
%7 = call i32 (...) @start_color()
store i32 0, i32* %1
br label %8
8: ; preds = %6, %5
%9 = load i32, i32* %1
ret i32 %9
}

LLVM IR (-O2):
@FALSE = global i64 0
define i32 @initialize_colors() {
%1 = tail call i64 (...) @has_colors()
%2 = load i64, i64* @FALSE
%3 = icmp eq i64 %1, %2
br i1 %3, label %6, label %4
4: ; preds = %0
%5 = tail call i32 (...) @start_color()
br label %6
6: ; preds = %0, %4
%7 = phi i32 [ 0, %4 ], [ 1, %0 ]
ret i32 %7
}
/* Variables and functions */
double pow(double, double);
double pgt_dbs_to_times(double _dbs) { return pow(10.0, _dbs / 10.0); }


x86 assembly (clang, -O0):
<pgt_dbs_to_times>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm1
movsd  0xed6(%rip),%xmm0
divsd  %xmm0,%xmm1
movsd  0xeca(%rip),%xmm0
call   1030 <pow@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<pgt_dbs_to_times>:
movapd %xmm0,%xmm1
movsd  0xee4(%rip),%xmm0
divsd  %xmm0,%xmm1
jmp    1030 <pow@plt>

LLVM IR (-O0):
define double @pgt_dbs_to_times(double %0) {
%2 = alloca double
store double %0, double* %2
%3 = load double, double* %2
%4 = fdiv double %3, 1.000000e+01
%5 = call double @pow(double 1.000000e+01, double %4)
ret double %5
}

LLVM IR (-O2):
define double @pgt_dbs_to_times(double %0) {
%2 = fdiv double %0, 1.000000e+01
%3 = tail call double @pow(double 1.000000e+01, double %2)
ret double %3
}
/* Variables and functions */
int /*<<< orphan*/ fahrenheitToCelsius(int);
int /*<<< orphan*/ printf(char *, int, int /*<<< orphan*/);
int main() {
  int i;
  for (i = 0; i <= 212; i++)
    printf("%10d%+10.3f\n", i, fahrenheitToCelsius(i));
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
cmpl   $0xd4,-0x8(%rbp)
jg     1170 <main+0x50>
mov    -0x8(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%edi
call   1030 <fahrenheitToCelsius@plt>
mov    -0xc(%rbp),%esi
mov    %eax,%edx
lea    0xea3(%rip),%rdi
call   1040 <printf@plt>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1136 <main+0x16>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r14
push   %rbx
push   %rax
xor    %ebx,%ebx
lea    0xed3(%rip),%r14
nopl   (%rax)
mov    %ebx,%edi
call   1030 <fahrenheitToCelsius@plt>
mov    %r14,%rdi
mov    %ebx,%esi
mov    %eax,%edx
call   1040 <printf@plt>
add    $0x1,%ebx
cmp    $0xd5,%ebx
jne    1130 <main+0x10>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@.str = [13 x i8] c"%10d%+10.3f\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
store i32 0, i32* %1
store i32 0, i32* %2
br label %3
3: ; preds = %11, %0
%4 = load i32, i32* %2
%5 = icmp sle i32 %4, 212
br i1 %5, label %6, label %14
6: ; preds = %3
%7 = load i32, i32* %2
%8 = load i32, i32* %2
%9 = call i32 @fahrenheitToCelsius(i32 %8)
%10 = call i32 @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0), i32 %7, i32 %9)
br label %11
11: ; preds = %6
%12 = load i32, i32* %2
%13 = add nsw i32 %12, 1
store i32 %13, i32* %2
br label %3
14: ; preds = %3
ret i32 0
}

LLVM IR (-O2):
@.str = [13 x i8] c"%10d%+10.3f\0A\00"
define i32 @main() {
br label %1
1: ; preds = %0, %1
%2 = phi i32 [ 0, %0 ], [ %5, %1 ]
%3 = tail call i32 @fahrenheitToCelsius(i32 %2)
%4 = tail call i32 @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0), i32 %2, i32 %3)
%5 = add nuw nsw i32 %2, 1
%6 = icmp eq i32 %5, 213
br i1 %6, label %7, label %1
7: ; preds = %1
ret i32 0
}
/* Type definitions */
struct activity {
  int dummy;
};

/* Variables and functions */
int get_in_nr();
int wrap_get_in_nr(struct activity *a) {
  int n;
  if ((n = get_in_nr()) > 4096)
    return 4096;
  else
    return n;
}


x86 assembly (clang, -O0):
<wrap_get_in_nr>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    $0x0,%al
call   1030 <get_in_nr@plt>
mov    %eax,-0x14(%rbp)
cmp    $0x1000,%eax
jle    113d <wrap_get_in_nr+0x2d>
movl   $0x1000,-0x4(%rbp)
jmp    1143 <wrap_get_in_nr+0x33>
mov    -0x14(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<wrap_get_in_nr>:
push   %rax
xor    %eax,%eax
call   1030 <get_in_nr@plt>
cmp    $0x1000,%eax
mov    $0x1000,%ecx
cmovge %ecx,%eax
pop    %rcx
ret

LLVM IR (-O0):
%struct.activity = type { i32 }
define i32 @wrap_get_in_nr(%struct.activity* %0) {
%2 = alloca i32
%3 = alloca %struct.activity*
%4 = alloca i32
store %struct.activity* %0, %struct.activity** %3
%5 = call i32 (...) @get_in_nr()
store i32 %5, i32* %4
%6 = icmp sgt i32 %5, 4096
br i1 %6, label %7, label %8
7: ; preds = %1
store i32 4096, i32* %2
br label %10
8: ; preds = %1
%9 = load i32, i32* %4
store i32 %9, i32* %2
br label %10
10: ; preds = %8, %7
%11 = load i32, i32* %2
ret i32 %11
}

LLVM IR (-O2):
%struct.activity = type { i32 }
define i32 @wrap_get_in_nr(%struct.activity* nocapture readnone %0) {
%2 = tail call i32 (...) @get_in_nr()
%3 = icmp slt i32 %2, 4096
%4 = select i1 %3, i32 %2, i32 4096
ret i32 %4
}
/* Type definitions */
typedef int /*<<< orphan*/ locale_t;

/* Variables and functions */
int toupper(int);
int toupper_l(int c, locale_t locale) {
  return toupper(c);
  (void)locale;
}


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

x86 assembly (clang, -O2):
<toupper_l>:
jmp    1030 <toupper@plt>

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

LLVM IR (-O2):
define i32 @toupper_l(i32 %0, i32 %1) {
%3 = tail call i32 @toupper(i32 %0)
ret i32 %3
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ *fopen(char *, char *);
int /*<<< orphan*/ printf(char *);
int fileOpenerW(FILE **file, char *fileName) {
  *file = fopen(fileName, "r+");
  if (*file == NULL) {
    printf("Error: cannot open file.\n");
    return -1;
  }
  return 1;
}


x86 assembly (clang, -O0):
<fileOpenerW>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    -0x18(%rbp),%rdi
lea    0xec5(%rip),%rsi
call   1040 <fopen@plt>
mov    %rax,%rcx
mov    -0x10(%rbp),%rax
mov    %rcx,(%rax)
mov    -0x10(%rbp),%rax
cmpq   $0x0,(%rax)
jne    1170 <fileOpenerW+0x50>
lea    0xea4(%rip),%rdi
call   1030 <printf@plt>
movl   $0xffffffff,-0x4(%rbp)
jmp    1177 <fileOpenerW+0x57>
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fileOpenerW>:
push   %rbx
mov    %rsi,%rax
mov    %rdi,%rbx
lea    0xed2(%rip),%rsi
mov    %rax,%rdi
call   1040 <fopen@plt>
mov    %rax,%rcx
mov    %rax,(%rbx)
mov    $0x1,%eax
test   %rcx,%rcx
je     1148 <fileOpenerW+0x28>
pop    %rbx
ret
lea    0xeb4(%rip),%rdi
call   1030 <puts@plt>
mov    $0xffffffff,%eax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [3 x i8] c"r+\00"
@.str.1 = [26 x i8] c"Error: cannot open file.\0A\00"
define i32 @fileOpenerW(i32** %0, i8* %1) {
%3 = alloca i32
%4 = alloca i32**
%5 = alloca i8*
store i32** %0, i32*** %4
store i8* %1, i8** %5
%6 = load i8*, i8** %5
%7 = call i32* @fopen(i8* %6, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0))
%8 = load i32**, i32*** %4
store i32* %7, i32** %8
%9 = load i32**, i32*** %4
%10 = load i32*, i32** %9
%11 = icmp eq i32* %10, null
br i1 %11, label %12, label %14
12: ; preds = %2
%13 = call i32 @printf(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.1, i64 0, i64 0))
store i32 -1, i32* %3
br label %15
14: ; preds = %2
store i32 1, i32* %3
br label %15
15: ; preds = %14, %12
%16 = load i32, i32* %3
ret i32 %16
}

LLVM IR (-O2):
@.str = [3 x i8] c"r+\00"
@str = [25 x i8] c"Error: cannot open file.\00"
define i32 @fileOpenerW(i32** nocapture writeonly %0, i8* nocapture %1) {
%3 = tail call i32* @fopen(i8* %1, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0))
store i32* %3, i32** %0
%4 = icmp eq i32* %3, null
br i1 %4, label %5, label %7
5: ; preds = %2
%6 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([25 x i8], [25 x i8]* @str, i64 0, i64 0))
br label %7
7: ; preds = %2, %5
%8 = phi i32 [ -1, %5 ], [ 1, %2 ]
ret i32 %8
}
int execute_query_module() { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @execute_query_module() {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ charrep(char, int);
int /*<<< orphan*/ printf(char *);
void display_cstates_header(void) {
  charrep('-', 80);
  printf("\n");
  printf("| C-state  |   min    |   max    |   avg    |   total  | hits  |  "
         "over | under |\n");
}


x86 assembly (clang, -O0):
<display_cstates_header>:
push   %rbp
mov    %rsp,%rbp
mov    $0x2d,%edi
mov    $0x50,%esi
call   1040 <charrep@plt>
lea    0xf16(%rip),%rdi
call   1030 <printf@plt>
lea    0xeba(%rip),%rdi
call   1030 <printf@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<display_cstates_header>:
push   %rax
mov    $0x2d,%edi
mov    $0x50,%esi
call   1050 <charrep@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
lea    0xeaf(%rip),%rdi
pop    %rax
jmp    1040 <puts@plt>

LLVM IR (-O0):
@.str = [2 x i8] c"\0A\00"
@.str.1 = [82 x i8] c"| C-state | min | max | avg | total | hits | over | under |\0A\00"
define void @display_cstates_header() {
%1 = call i32 @charrep(i8 signext 45, i32 80)
%2 = call i32 @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
%3 = call i32 @printf(i8* getelementptr inbounds ([82 x i8], [82 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@str = [81 x i8] c"| C-state | min | max | avg | total | hits | over | under |\00"
define void @display_cstates_header() {
%1 = tail call i32 @charrep(i8 signext 45, i32 80)
%2 = tail call i32 @putchar(i32 10)
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([81 x i8], [81 x i8]* @str, i64 0, i64 0))
ret void
}
/* Type definitions */
struct Player {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ assert(int /*<<< orphan*/);
int /*<<< orphan*/ free(struct Player *);
void Player_destroy(struct Player *player) {
  assert(player != NULL);
  free(player);
}


x86 assembly (clang, -O0):
<Player_destroy>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
cmpq   $0x0,-0x8(%rbp)
setne  %al
and    $0x1,%al
movzbl %al,%edi
call   1040 <assert@plt>
mov    -0x8(%rbp),%rdi
call   1030 <free@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Player_destroy>:
push   %rbx
mov    %rdi,%rbx
xor    %edi,%edi
test   %rbx,%rbx
setne  %dil
call   1040 <assert@plt>
mov    %rbx,%rdi
pop    %rbx
jmp    1030 <free@plt>

LLVM IR (-O0):
%struct.Player = type { i32 }
define void @Player_destroy(%struct.Player* %0) {
%2 = alloca %struct.Player*
store %struct.Player* %0, %struct.Player** %2
%3 = load %struct.Player*, %struct.Player** %2
%4 = icmp ne %struct.Player* %3, null
%5 = zext i1 %4 to i32
%6 = call i32 @assert(i32 %5)
%7 = load %struct.Player*, %struct.Player** %2
%8 = call i32 @free(%struct.Player* %7)
ret void
}

LLVM IR (-O2):
%struct.Player = type { i32 }
define void @Player_destroy(%struct.Player* %0) {
%2 = icmp ne %struct.Player* %0, null
%3 = zext i1 %2 to i32
%4 = tail call i32 @assert(i32 %3)
%5 = tail call i32 @free(%struct.Player* %0)
ret void
}
void rop3_98_0_1(unsigned char *D, unsigned char S, unsigned char T) {
  unsigned char stk1;
  unsigned char stk2;
  unsigned char stk3;
  stk3 = T | *D;
  stk2 = S & stk3;
  stk1 = *D ^ stk2;
  *D = (stk1 & S) | (stk1 & (~T)) | (T & (~S) & *D);
}


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

x86 assembly (clang, -O2):
<rop3_98_0_1>:
mov    (%rdi),%r8b
mov    %r8d,%ecx
or     %dl,%cl
and    %sil,%cl
xor    %r8b,%cl
mov    %edx,%eax
not    %al
or     %sil,%al
and    %cl,%al
not    %sil
and    %dl,%sil
and    %r8b,%sil
or     %al,%sil
mov    %sil,(%rdi)
ret

LLVM IR (-O0):
define void @rop3_98_0_1(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
store i8* %0, i8** %4
store i8 %1, i8* %5
store i8 %2, i8* %6
%10 = load i8, i8* %6
%11 = zext i8 %10 to i32
%12 = load i8*, i8** %4
%13 = load i8, i8* %12
%14 = zext i8 %13 to i32
%15 = or i32 %11, %14
%16 = trunc i32 %15 to i8
store i8 %16, i8* %9
%17 = load i8, i8* %5
%18 = zext i8 %17 to i32
%19 = load i8, i8* %9
%20 = zext i8 %19 to i32
%21 = and i32 %18, %20
%22 = trunc i32 %21 to i8
store i8 %22, i8* %8
%23 = load i8*, i8** %4
%24 = load i8, i8* %23
%25 = zext i8 %24 to i32
%26 = load i8, i8* %8
%27 = zext i8 %26 to i32
%28 = xor i32 %25, %27
%29 = trunc i32 %28 to i8
store i8 %29, i8* %7
%30 = load i8, i8* %7
%31 = zext i8 %30 to i32
%32 = load i8, i8* %5
%33 = zext i8 %32 to i32
%34 = and i32 %31, %33
%35 = load i8, i8* %7
%36 = zext i8 %35 to i32
%37 = load i8, i8* %6
%38 = zext i8 %37 to i32
%39 = xor i32 %38, -1
%40 = and i32 %36, %39
%41 = or i32 %34, %40
%42 = load i8, i8* %6
%43 = zext i8 %42 to i32
%44 = load i8, i8* %5
%45 = zext i8 %44 to i32
%46 = xor i32 %45, -1
%47 = and i32 %43, %46
%48 = load i8*, i8** %4
%49 = load i8, i8* %48
%50 = zext i8 %49 to i32
%51 = and i32 %47, %50
%52 = or i32 %41, %51
%53 = trunc i32 %52 to i8
%54 = load i8*, i8** %4
store i8 %53, i8* %54
ret void
}

LLVM IR (-O2):
define void @rop3_98_0_1(i8* nocapture %0, i8 zeroext %1, i8 zeroext %2) {
%4 = load i8, i8* %0
%5 = or i8 %4, %2
%6 = and i8 %5, %1
%7 = xor i8 %6, %4
%8 = xor i8 %2, -1
%9 = or i8 %8, %1
%10 = and i8 %7, %9
%11 = xor i8 %1, -1
%12 = and i8 %11, %2
%13 = and i8 %12, %4
%14 = or i8 %10, %13
store i8 %14, i8* %0
ret void
}
void error(void) {
  {
    goto ERROR;
  ERROR:;
    return;
  }
}


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

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

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

LLVM IR (-O2):
define void @error() {
ret void
}
int dect_is_pp_packet(unsigned char *packet) {
  if ((packet[3] == 0x16) && (packet[4] == 0x75))
    return 1;
  return 0;
}


x86 assembly (clang, -O0):
<dect_is_pp_packet>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
movzbl 0x3(%rax),%eax
cmp    $0x16,%eax
jne    1136 <dect_is_pp_packet+0x36>
mov    -0x10(%rbp),%rax
movzbl 0x4(%rax),%eax
cmp    $0x75,%eax
jne    1136 <dect_is_pp_packet+0x36>
movl   $0x1,-0x4(%rbp)
jmp    113d <dect_is_pp_packet+0x3d>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<dect_is_pp_packet>:
cmpb   $0x16,0x3(%rdi)
jne    1111 <dect_is_pp_packet+0x11>
mov    $0x1,%eax
cmpb   $0x75,0x4(%rdi)
je     1113 <dect_is_pp_packet+0x13>
xor    %eax,%eax
ret

LLVM IR (-O0):
define i32 @dect_is_pp_packet(i8* %0) {
%2 = alloca i32
%3 = alloca i8*
store i8* %0, i8** %3
%4 = load i8*, i8** %3
%5 = getelementptr inbounds i8, i8* %4, i64 3
%6 = load i8, i8* %5
%7 = zext i8 %6 to i32
%8 = icmp eq i32 %7, 22
br i1 %8, label %9, label %16
9: ; preds = %1
%10 = load i8*, i8** %3
%11 = getelementptr inbounds i8, i8* %10, i64 4
%12 = load i8, i8* %11
%13 = zext i8 %12 to i32
%14 = icmp eq i32 %13, 117
br i1 %14, label %15, label %16
15: ; preds = %9
store i32 1, i32* %2
br label %17
16: ; preds = %9, %1
store i32 0, i32* %2
br label %17
17: ; preds = %16, %15
%18 = load i32, i32* %2
ret i32 %18
}

LLVM IR (-O2):
define i32 @dect_is_pp_packet(i8* nocapture %0) {
%2 = getelementptr inbounds i8, i8* %0, i64 3
%3 = load i8, i8* %2
%4 = icmp eq i8 %3, 22
br i1 %4, label %5, label %9
5: ; preds = %1
%6 = getelementptr inbounds i8, i8* %0, i64 4
%7 = load i8, i8* %6
%8 = icmp eq i8 %7, 117
br i1 %8, label %10, label %9
9: ; preds = %5, %1
br label %10
10: ; preds = %5, %9
%11 = phi i32 [ 0, %9 ], [ 1, %5 ]
ret i32 %11
}
/* Variables and functions */
int /*<<< orphan*/ script_write_byte(char);
void script_LSDPWM(char s1, char s2, char s3) {
  script_write_byte(144);
  script_write_byte(s1);
  script_write_byte(s2);
  script_write_byte(s3);
}


x86 assembly (clang, -O0):
<script_LSDPWM>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %dl,%al
mov    %sil,%cl
mov    %dil,%dl
mov    %dl,-0x1(%rbp)
mov    %cl,-0x2(%rbp)
mov    %al,-0x3(%rbp)
mov    $0xffffff90,%edi
call   1030 <script_write_byte@plt>
movsbl -0x1(%rbp),%edi
call   1030 <script_write_byte@plt>
movsbl -0x2(%rbp),%edi
call   1030 <script_write_byte@plt>
movsbl -0x3(%rbp),%edi
call   1030 <script_write_byte@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<script_LSDPWM>:
push   %rbp
push   %r14
push   %rbx
mov    %edx,%r14d
mov    %esi,%ebp
mov    %edi,%ebx
mov    $0xffffff90,%edi
call   1030 <script_write_byte@plt>
mov    %ebx,%edi
call   1030 <script_write_byte@plt>
mov    %ebp,%edi
call   1030 <script_write_byte@plt>
mov    %r14d,%edi
pop    %rbx
pop    %r14
pop    %rbp
jmp    1030 <script_write_byte@plt>

LLVM IR (-O0):
define void @script_LSDPWM(i8 signext %0, i8 signext %1, i8 signext %2) {
%4 = alloca i8
%5 = alloca i8
%6 = alloca i8
store i8 %0, i8* %4
store i8 %1, i8* %5
store i8 %2, i8* %6
%7 = call i32 @script_write_byte(i8 signext -112)
%8 = load i8, i8* %4
%9 = call i32 @script_write_byte(i8 signext %8)
%10 = load i8, i8* %5
%11 = call i32 @script_write_byte(i8 signext %10)
%12 = load i8, i8* %6
%13 = call i32 @script_write_byte(i8 signext %12)
ret void
}

LLVM IR (-O2):
define void @script_LSDPWM(i8 signext %0, i8 signext %1, i8 signext %2) {
%4 = tail call i32 @script_write_byte(i8 signext -112)
%5 = tail call i32 @script_write_byte(i8 signext %0)
%6 = tail call i32 @script_write_byte(i8 signext %1)
%7 = tail call i32 @script_write_byte(i8 signext %2)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ XKeyPressedEvent;

/* Variables and functions */
int /*<<< orphan*/ abort();
scalar_t__ malloc(int);
void *alloc_XKeyPressedEvent(void) {
  XKeyPressedEvent *_p = (XKeyPressedEvent *)malloc(sizeof(XKeyPressedEvent));
  if (_p == NULL)
    abort();
  return (void *)_p;
}


x86 assembly (clang, -O0):
<alloc_XKeyPressedEvent>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x4,%edi
call   1040 <malloc@plt>
mov    %rax,-0x8(%rbp)
cmpq   $0x0,-0x8(%rbp)
jne    1148 <alloc_XKeyPressedEvent+0x28>
mov    $0x0,%al
call   1030 <abort@plt>
mov    -0x8(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<alloc_XKeyPressedEvent>:
push   %rax
mov    $0x4,%edi
call   1040 <malloc@plt>
test   %rax,%rax
je     1132 <alloc_XKeyPressedEvent+0x12>
pop    %rcx
ret
xor    %eax,%eax
call   1030 <abort@plt>

LLVM IR (-O0):
define i8* @alloc_XKeyPressedEvent() {
%1 = alloca i32*
%2 = call i64 @malloc(i32 4)
%3 = inttoptr i64 %2 to i32*
store i32* %3, i32** %1
%4 = load i32*, i32** %1
%5 = icmp eq i32* %4, null
br i1 %5, label %6, label %8
6: ; preds = %0
%7 = call i32 (...) @abort()
unreachable
8: ; preds = %0
%9 = load i32*, i32** %1
%10 = bitcast i32* %9 to i8*
ret i8* %10
}

LLVM IR (-O2):
define i8* @alloc_XKeyPressedEvent() {
%1 = tail call i64 @malloc(i32 4)
%2 = icmp eq i64 %1, 0
br i1 %2, label %3, label %5
3: ; preds = %0
%4 = tail call i32 (...) @abort()
unreachable
5: ; preds = %0
%6 = inttoptr i64 %1 to i8*
ret i8* %6
}