xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ isgraph(int);
void t_isgraph_0x09() {
  Assert_real((isgraph(9) == 0),
              "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
              "2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/"
              "dg/z88dk/test/suites/ctype/test_isgraph.c",
              50, ("isgraph should be 0 for 0x09"));
}


x86 assembly (clang, -O0):
<t_isgraph_0x09>:
push   %rbp
mov    %rsp,%rbp
mov    $0x9,%edi
call   1040 <isgraph@plt>
cmp    $0x0,%rax
sete   %al
and    $0x1,%al
movzbl %al,%edi
lea    0xebf(%rip),%rsi
mov    $0x32,%edx
lea    0xf5b(%rip),%rcx
call   1030 <Assert_real@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<t_isgraph_0x09>:
push   %rax
mov    $0x9,%edi
call   1040 <isgraph@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf66(%rip),%rcx
mov    $0x32,%edx
pop    %rax
jmp    1030 <Assert_real@plt>

LLVM IR (-O0):
@.str = [168 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/ctype/test_isgraph.c\00"
@.str.1 = [29 x i8] c"isgraph should be 0 for 0x09\00"
define void @t_isgraph_0x09() {
%1 = call i64 @isgraph(i32 9)
%2 = icmp eq i64 %1, 0
%3 = zext i1 %2 to i32
%4 = call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([168 x i8], [168 x i8]* @.str, i64 0, i64 0), i32 50, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [168 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/ctype/test_isgraph.c\00"
@.str.1 = [29 x i8] c"isgraph should be 0 for 0x09\00"
define void @t_isgraph_0x09() {
%1 = tail call i64 @isgraph(i32 9)
%2 = icmp eq i64 %1, 0
%3 = zext i1 %2 to i32
%4 = tail call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([168 x i8], [168 x i8]* @.str, i64 0, i64 0), i32 50, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Type definitions */
typedef scalar_t__ uint32_t;

/* Variables and functions */
bool AUXTDCCounterEnable(uint32_t ui32Base) {
  ;
  if (!(((*((volatile unsigned long *)(ui32Base + 0x00000004))) & 0x0000003F) ==
        0x00000006)) {
    return false;
  }
  (*((volatile unsigned long *)(ui32Base + 0x0000001C))) = 0x00000001;
  return true;
}


x86 assembly (clang, -O0):
<AUXTDCCounterEnable>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    0x4(%rax),%rax
and    $0x3f,%rax
cmp    $0x6,%rax
je     112a <AUXTDCCounterEnable+0x2a>
movl   $0x0,-0x4(%rbp)
jmp    113d <AUXTDCCounterEnable+0x3d>
mov    -0x10(%rbp),%rax
movq   $0x1,0x1c(%rax)
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<AUXTDCCounterEnable>:
mov    0x4(%rdi),%rcx
and    $0x3f,%ecx
xor    %eax,%eax
cmp    $0x6,%ecx
jne    111b <AUXTDCCounterEnable+0x1b>
movq   $0x1,0x1c(%rdi)
mov    $0x1,%eax
ret

LLVM IR (-O0):
define i32 @AUXTDCCounterEnable(i64 %0) {
%2 = alloca i32
%3 = alloca i64
store i64 %0, i64* %3
%4 = load i64, i64* %3
%5 = add nsw i64 %4, 4
%6 = inttoptr i64 %5 to i64*
%7 = load volatile i64, i64* %6
%8 = and i64 %7, 63
%9 = icmp eq i64 %8, 6
br i1 %9, label %11, label %10
10: ; preds = %1
store i32 0, i32* %2
br label %15
11: ; preds = %1
%12 = load i64, i64* %3
%13 = add nsw i64 %12, 28
%14 = inttoptr i64 %13 to i64*
store volatile i64 1, i64* %14
store i32 1, i32* %2
br label %15
15: ; preds = %11, %10
%16 = load i32, i32* %2
ret i32 %16
}

LLVM IR (-O2):
define i32 @AUXTDCCounterEnable(i64 %0) {
%2 = add nsw i64 %0, 4
%3 = inttoptr i64 %2 to i64*
%4 = load volatile i64, i64* %3
%5 = and i64 %4, 63
%6 = icmp eq i64 %5, 6
br i1 %6, label %7, label %10
7: ; preds = %1
%8 = add nsw i64 %0, 28
%9 = inttoptr i64 %8 to i64*
store volatile i64 1, i64* %9
br label %10
10: ; preds = %1, %7
%11 = phi i32 [ 1, %7 ], [ 0, %1 ]
ret i32 %11
}
/* Variables and functions */
double pow(double, double);
double affine_pNorm(int N, double args[N]) {
  int test = N - 1;
  double n = *(args + test);
  return pow(n, 1.0);
}


x86 assembly (clang, -O0):
<affine_pNorm>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x4(%rbp),%eax
sub    $0x1,%eax
mov    %eax,-0x14(%rbp)
mov    -0x10(%rbp),%rax
movslq -0x14(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
movsd  %xmm0,-0x20(%rbp)
movsd  -0x20(%rbp),%xmm0
movsd  0xeb9(%rip),%xmm1
call   1030 <pow@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<affine_pNorm>:
movslq %edi,%rax
movsd  -0x8(%rsi,%rax,8),%xmm0
ret

LLVM IR (-O0):
define double @affine_pNorm(i32 %0, double* %1) {
%3 = alloca i32
%4 = alloca double*
%5 = alloca i32
%6 = alloca double
store i32 %0, i32* %3
store double* %1, double** %4
%7 = load i32, i32* %3
%8 = zext i32 %7 to i64
%9 = load i32, i32* %3
%10 = sub nsw i32 %9, 1
store i32 %10, i32* %5
%11 = load double*, double** %4
%12 = load i32, i32* %5
%13 = sext i32 %12 to i64
%14 = getelementptr inbounds double, double* %11, i64 %13
%15 = load double, double* %14
store double %15, double* %6
%16 = load double, double* %6
%17 = call double @pow(double %16, double 1.000000e+00)
ret double %17
}

LLVM IR (-O2):
define double @affine_pNorm(i32 %0, double* nocapture %1) {
%3 = add nsw i32 %0, -1
%4 = sext i32 %3 to i64
%5 = getelementptr inbounds double, double* %1, i64 %4
%6 = load double, double* %5
ret double %6
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ printf(char *, char const *);
void usage(const char *name) {
  printf("Usage: %s mask_file outputdir\n", name);
  exit(1);
}


x86 assembly (clang, -O0):
<usage>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rsi
lea    0xec9(%rip),%rdi
call   1030 <printf@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<usage>:
push   %rax
mov    %rdi,%rsi
lea    0xed5(%rip),%rdi
call   1030 <printf@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@.str = [31 x i8] c"Usage: %s mask_file outputdir\0A\00"
define void @usage(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 @printf(i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str, i64 0, i64 0), i8* %3)
%5 = call i32 @exit(i32 1)
unreachable
}

LLVM IR (-O2):
@.str = [31 x i8] c"Usage: %s mask_file outputdir\0A\00"
define void @usage(i8* %0) {
%2 = tail call i32 @printf(i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str, i64 0, i64 0), i8* %0)
%3 = tail call i32 @exit(i32 1)
unreachable
}
int test_imm_2Cuint8_reg(unsigned char val) {
  return ((val) & (0x2C << 0)) ? -20 : -40;
}


x86 assembly (clang, -O0):
<test_imm_2Cuint8_reg>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movzbl -0x1(%rbp),%edx
and    $0x2c,%edx
mov    $0xffffffd8,%eax
mov    $0xffffffec,%ecx
cmp    $0x0,%edx
cmovne %ecx,%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @test_imm_2Cuint8_reg(i8 zeroext %0) {
%2 = and i8 %0, 44
%3 = icmp eq i8 %2, 0
%4 = select i1 %3, i32 -40, i32 -20
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void SIGUSR1_handler(int signo __attribute__((unused))) {
  printf("do nothing useful\n");
}


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

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

LLVM IR (-O0):
@.str = [19 x i8] c"do nothing useful\0A\00"
define void @SIGUSR1_handler(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = call i32 @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@str = [18 x i8] c"do nothing useful\00"
define void @SIGUSR1_handler(i32 %0) {
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([18 x i8], [18 x i8]* @str, i64 0, i64 0))
ret void
}
__attribute__((weak, section(".after_vectors"))) void DebugMon_Handler(void) {
  while (1) {
  }
}


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

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

LLVM IR (-O0):
define weak void @DebugMon_Handler() section ".after_vectors" {
br label %1
1: ; preds = %0, %1
br label %1
}

LLVM IR (-O2):
define weak void @DebugMon_Handler() section ".after_vectors" {
br label %1
1: ; preds = %0, %1
br label %1
}
int fu() { return 3; }


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

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

LLVM IR (-O0):
define i32 @fu() {
ret i32 3
}

LLVM IR (-O2):
define i32 @fu() {
ret i32 3
}
void g_unichar_toupper() {}


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

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

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

LLVM IR (-O2):
define void @g_unichar_toupper() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ R_OK;
int access(char const *, int /*<<< orphan*/);
bool FileReadPermissionCheck(const char *file_name) {
  if (access(file_name, R_OK) != -1) {
    return true;
  } else {
    return false;
  }
}


x86 assembly (clang, -O0):
<FileReadPermissionCheck>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
mov    0x2eb9(%rip),%rax
mov    (%rax),%esi
call   1030 <access@plt>
cmp    $0xffffffff,%eax
je     1143 <FileReadPermissionCheck+0x33>
movl   $0x1,-0x4(%rbp)
jmp    114a <FileReadPermissionCheck+0x3a>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<FileReadPermissionCheck>:
push   %rax
mov    0x2ec8(%rip),%rax
mov    (%rax),%esi
call   1030 <access@plt>
xor    %ecx,%ecx
cmp    $0xffffffff,%eax
setne  %cl
mov    %ecx,%eax
pop    %rcx
ret

LLVM IR (-O0):
@R_OK = global i32 0
define i32 @FileReadPermissionCheck(i8* %0) {
%2 = alloca i32
%3 = alloca i8*
store i8* %0, i8** %3
%4 = load i8*, i8** %3
%5 = load i32, i32* @R_OK
%6 = call i32 @access(i8* %4, i32 %5)
%7 = icmp ne i32 %6, -1
br i1 %7, label %8, label %9
8: ; preds = %1
store i32 1, i32* %2
br label %10
9: ; preds = %1
store i32 0, i32* %2
br label %10
10: ; preds = %9, %8
%11 = load i32, i32* %2
ret i32 %11
}

LLVM IR (-O2):
@R_OK = global i32 0
define i32 @FileReadPermissionCheck(i8* nocapture %0) {
%2 = load i32, i32* @R_OK
%3 = tail call i32 @access(i8* %0, i32 %2)
%4 = icmp ne i32 %3, -1
%5 = zext i1 %4 to i32
ret i32 %5
}
void gtk_list_store_prepend() {}


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

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

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

LLVM IR (-O2):
define void @gtk_list_store_prepend() {
ret void
}
int exact_square(int num) {
  int res = 0, mult;
  for (mult = 1; res < num; mult++) {
    res = mult * mult;
    if (res == num) {
      return 1;
    }
  }
  return 0;
}


x86 assembly (clang, -O0):
<exact_square>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
movl   $0x1,-0x10(%rbp)
mov    -0xc(%rbp),%eax
cmp    -0x8(%rbp),%eax
jge    1156 <exact_square+0x56>
mov    -0x10(%rbp),%eax
imul   -0x10(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
cmp    -0x8(%rbp),%eax
jne    1143 <exact_square+0x43>
movl   $0x1,-0x4(%rbp)
jmp    115d <exact_square+0x5d>
jmp    1148 <exact_square+0x48>
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    1115 <exact_square+0x15>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<exact_square>:
xor    %eax,%eax
test   %edi,%edi
jle    1120 <exact_square+0x20>
mov    $0x1,%ecx
nopl   0x0(%rax,%rax,1)
mov    %ecx,%edx
imul   %ecx,%edx
cmp    %edi,%edx
je     1121 <exact_square+0x21>
add    $0x1,%ecx
cmp    %edi,%edx
jl     1110 <exact_square+0x10>
ret
mov    $0x1,%eax
ret

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

LLVM IR (-O2):
define i32 @exact_square(i32 %0) {
%2 = icmp sgt i32 %0, 0
br i1 %2, label %6, label %10
3: ; preds = %6
%4 = add nuw nsw i32 %7, 1
%5 = icmp slt i32 %8, %0
br i1 %5, label %6, label %10
6: ; preds = %1, %3
%7 = phi i32 [ %4, %3 ], [ 1, %1 ]
%8 = mul nsw i32 %7, %7
%9 = icmp eq i32 %8, %0
br i1 %9, label %10, label %3
10: ; preds = %6, %3, %1
%11 = phi i32 [ 0, %1 ], [ 0, %3 ], [ 1, %6 ]
ret i32 %11
}
/* Type definitions */
typedef int int32_t;
typedef int /*<<< orphan*/ __m128i;
typedef int /*<<< orphan*/ __m128;

/* Variables and functions */
int /*<<< orphan*/ _mm_store_si128(int /*<<< orphan*/ *, int /*<<< orphan*/);
extern __attribute__((__gnu___, __always___, __artificial__)) int
_MM_EXTRACT_PS(__m128 vec, const int LANE) {
  __attribute__((aligned(16))) int32_t tmp[4];
  _mm_store_si128((__m128i *)tmp, (*(__m128i *)&(vec)));
  return tmp[LANE];
}


x86 assembly (clang, -O0):
<_MM_EXTRACT_PS>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
lea    -0x20(%rbp),%rdi
mov    -0x4(%rbp),%esi
call   1030 <_mm_store_si128@plt>
movslq -0x8(%rbp),%rax
mov    -0x20(%rbp,%rax,4),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<_MM_EXTRACT_PS>:
push   %rbx
sub    $0x10,%rsp
mov    %esi,%ebx
mov    %edi,%esi
mov    %rsp,%rdi
call   1030 <_mm_store_si128@plt>
movslq %ebx,%rax
mov    (%rsp,%rax,4),%eax
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
define i32 @_MM_EXTRACT_PS(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca [4 x i32]
store i32 %0, i32* %3
store i32 %1, i32* %4
%6 = getelementptr inbounds [4 x i32], [4 x i32]* %5, i64 0, i64 0
%7 = load i32, i32* %3
%8 = call i32 @_mm_store_si128(i32* %6, i32 %7)
%9 = load i32, i32* %4
%10 = sext i32 %9 to i64
%11 = getelementptr inbounds [4 x i32], [4 x i32]* %5, i64 0, i64 %10
%12 = load i32, i32* %11
ret i32 %12
}

LLVM IR (-O2):
define i32 @_MM_EXTRACT_PS(i32 %0, i32 %1) {
%3 = alloca [4 x i32]
%4 = bitcast [4 x i32]* %3 to i8*
%5 = getelementptr inbounds [4 x i32], [4 x i32]* %3, i64 0, i64 0
%6 = call i32 @_mm_store_si128(i32* %5, i32 %0)
%7 = sext i32 %1 to i64
%8 = getelementptr inbounds [4 x i32], [4 x i32]* %3, i64 0, i64 %7
%9 = load i32, i32* %8
ret i32 %9
}
/* Type definitions */
typedef int uint32_t;

/* Variables and functions */
void __u32_mul(void *cc, void *k, void *v, bool n) {
  if (n) {
    *(uint32_t *)v = 1;
  } else {
    *(uint32_t *)v *= *(uint32_t *)cc;
  }
}


x86 assembly (clang, -O0):
<__u32_mul>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %ecx,-0x1c(%rbp)
cmpl   $0x0,-0x1c(%rbp)
je     112c <__u32_mul+0x2c>
mov    -0x18(%rbp),%rax
movl   $0x1,(%rax)
jmp    113b <__u32_mul+0x3b>
mov    -0x8(%rbp),%rax
mov    (%rax),%ecx
mov    -0x18(%rbp),%rax
imul   (%rax),%ecx
mov    %ecx,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<__u32_mul>:
test   %ecx,%ecx
je     110b <__u32_mul+0xb>
movl   $0x1,(%rdx)
ret
mov    (%rdx),%eax
imul   (%rdi),%eax
mov    %eax,(%rdx)
ret

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

LLVM IR (-O2):
define void @__u32_mul(i8* nocapture %0, i8* nocapture readnone %1, i8* nocapture %2, i32 %3) {
%5 = icmp eq i32 %3, 0
br i1 %5, label %8, label %6
6: ; preds = %4
%7 = bitcast i8* %2 to i32*
store i32 1, i32* %7
br label %14
8: ; preds = %4
%9 = bitcast i8* %0 to i32*
%10 = load i32, i32* %9
%11 = bitcast i8* %2 to i32*
%12 = load i32, i32* %11
%13 = mul nsw i32 %12, %10
store i32 %13, i32* %11
br label %14
14: ; preds = %8, %6
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char *);
void test_display() {
  printf("%s\n", " ___");
  printf("%s\n", "|___|");
  printf("%s\n", "|___|");
}


x86 assembly (clang, -O0):
<test_display>:
push   %rbp
mov    %rsp,%rbp
lea    0xee5(%rip),%rdi
lea    0xee2(%rip),%rsi
call   1030 <printf@plt>
lea    0xed2(%rip),%rdi
lea    0xed4(%rip),%rsi
call   1030 <printf@plt>
lea    0xebf(%rip),%rdi
lea    0xec1(%rip),%rsi
call   1030 <printf@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_display>:
push   %r14
push   %rbx
push   %rax
lea    0xee5(%rip),%rbx
lea    0xee2(%rip),%rsi
mov    %rbx,%rdi
call   1030 <printf@plt>
lea    0xed8(%rip),%r14
mov    %rbx,%rdi
mov    %r14,%rsi
call   1030 <printf@plt>
mov    %rbx,%rdi
mov    %r14,%rsi
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [4 x i8] c"%s\0A\00"
@.str.1 = [5 x i8] c" ___\00"
@.str.2 = [6 x i8] c"|___|\00"
define void @test_display() {
%1 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0))
%2 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.2, i64 0, i64 0))
%3 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.2, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [4 x i8] c"%s\0A\00"
@.str.1 = [5 x i8] c" ___\00"
@.str.2 = [6 x i8] c"|___|\00"
define void @test_display() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0))
%2 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.2, i64 0, i64 0))
%3 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.2, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ memcpy(double *, double *, int);
void cass(double *aa, double *bb) { memcpy(aa, bb, 2 * sizeof(double)); }


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

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

LLVM IR (-O0):
define void @cass(double* %0, double* %1) {
%3 = alloca double*
%4 = alloca double*
store double* %0, double** %3
store double* %1, double** %4
%5 = load double*, double** %3
%6 = load double*, double** %4
%7 = call i32 @memcpy(double* %5, double* %6, i32 16)
ret void
}

LLVM IR (-O2):
define void @cass(double* %0, double* %1) {
%3 = tail call i32 @memcpy(double* %0, double* %1, i32 16)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ inet_addr(char *);
int isvalidnetmask(int /*<<< orphan*/);
int /*<<< orphan*/ ntohl(int /*<<< orphan*/);
int /*<<< orphan*/ printf(char *, char *, int);
void test(char *snetmask, int expected) {
  if (isvalidnetmask(ntohl(inet_addr(snetmask))) != expected) {
    printf("isvalidnetmask(\"%s\") != %d\n", snetmask, expected);
  }
}


x86 assembly (clang, -O0):
<test>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <inet_addr@plt>
mov    %eax,%edi
call   1060 <ntohl@plt>
mov    %eax,%edi
call   1050 <isvalidnetmask@plt>
cmp    -0xc(%rbp),%eax
je     1182 <test+0x42>
mov    -0x8(%rbp),%rsi
mov    -0xc(%rbp),%edx
lea    0xe83(%rip),%rdi
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test>:
push   %rbp
push   %rbx
push   %rax
mov    %esi,%ebp
mov    %rdi,%rbx
call   1040 <inet_addr@plt>
mov    %eax,%edi
call   1060 <ntohl@plt>
mov    %eax,%edi
call   1050 <isvalidnetmask@plt>
cmp    %ebp,%eax
jne    1166 <test+0x26>
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret
lea    0xe93(%rip),%rdi
mov    %rbx,%rsi
mov    %ebp,%edx
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [28 x i8] c"isvalidnetmask(\22%s\22) != %d\0A\00"
define void @test(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 = call i32 @inet_addr(i8* %5)
%7 = call i32 @ntohl(i32 %6)
%8 = call i32 @isvalidnetmask(i32 %7)
%9 = load i32, i32* %4
%10 = icmp ne i32 %8, %9
br i1 %10, label %11, label %15
11: ; preds = %2
%12 = load i8*, i8** %3
%13 = load i32, i32* %4
%14 = call i32 @printf(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str, i64 0, i64 0), i8* %12, i32 %13)
br label %15
15: ; preds = %11, %2
ret void
}

LLVM IR (-O2):
@.str = [28 x i8] c"isvalidnetmask(\22%s\22) != %d\0A\00"
define void @test(i8* %0, i32 %1) {
%3 = tail call i32 @inet_addr(i8* %0)
%4 = tail call i32 @ntohl(i32 %3)
%5 = tail call i32 @isvalidnetmask(i32 %4)
%6 = icmp eq i32 %5, %1
br i1 %6, label %9, label %7
7: ; preds = %2
%8 = tail call i32 @printf(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str, i64 0, i64 0), i8* %0, i32 %1)
br label %9
9: ; preds = %7, %2
ret void
}
int Cilk_partition_size(void) { return 1; }


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

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

LLVM IR (-O0):
define i32 @Cilk_partition_size() {
ret i32 1
}

LLVM IR (-O2):
define i32 @Cilk_partition_size() {
ret i32 1
}
/* Variables and functions */
long jdiv_round_up(long a, long b) { return (a + b - 1L) / b; }


x86 assembly (clang, -O0):
<jdiv_round_up>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
add    -0x10(%rbp),%rax
sub    $0x1,%rax
cqto
idivq  -0x10(%rbp)
pop    %rbp
ret

x86 assembly (clang, -O2):
<jdiv_round_up>:
lea    (%rdi,%rsi,1),%rax
add    $0xffffffffffffffff,%rax
mov    %rax,%rcx
or     %rsi,%rcx
shr    $0x20,%rcx
je     111a <jdiv_round_up+0x1a>
cqto
idiv   %rsi
ret
xor    %edx,%edx
div    %esi
ret

LLVM IR (-O0):
define i64 @jdiv_round_up(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 = add nsw i64 %5, %6
%8 = sub nsw i64 %7, 1
%9 = load i64, i64* %4
%10 = sdiv i64 %8, %9
ret i64 %10
}

LLVM IR (-O2):
define i64 @jdiv_round_up(i64 %0, i64 %1) {
%3 = add i64 %0, -1
%4 = add i64 %3, %1
%5 = sdiv i64 %4, %1
ret i64 %5
}
/* Type definitions */
struct widget {
  int dummy;
};
struct view {
  int dummy;
};

/* Variables and functions */
struct widget *createwidget(struct view *);
int /*<<< orphan*/ widget_text_init(struct widget *, char *, char *,
                                    unsigned int, unsigned int, char *);
void pool_create_text(struct view *view, char *id, char *in, unsigned int type,
                      unsigned int align, char *data) {
  struct widget *widget = createwidget(view);
  widget_text_init(widget, id, in, type, align, data);
}


x86 assembly (clang, -O0):
<pool_create_text>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %ecx,-0x1c(%rbp)
mov    %r8d,-0x20(%rbp)
mov    %r9,-0x28(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <createwidget@plt>
mov    %rax,-0x30(%rbp)
mov    -0x30(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
mov    -0x1c(%rbp),%ecx
mov    -0x20(%rbp),%r8d
mov    -0x28(%rbp),%r9
call   1040 <widget_text_init@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<pool_create_text>:
push   %rbp
push   %r15
push   %r14
push   %r12
push   %rbx
mov    %r9,%r14
mov    %r8d,%r15d
mov    %ecx,%r12d
mov    %rdx,%rbp
mov    %rsi,%rbx
call   1030 <createwidget@plt>
mov    %rax,%rdi
mov    %rbx,%rsi
mov    %rbp,%rdx
mov    %r12d,%ecx
mov    %r15d,%r8d
mov    %r14,%r9
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
pop    %rbp
jmp    1040 <widget_text_init@plt>

LLVM IR (-O0):
%struct.view = type { i32 }
%struct.widget = type { i32 }
define void @pool_create_text(%struct.view* %0, i8* %1, i8* %2, i32 %3, i32 %4, i8* %5) {
%7 = alloca %struct.view*
%8 = alloca i8*
%9 = alloca i8*
%10 = alloca i32
%11 = alloca i32
%12 = alloca i8*
%13 = alloca %struct.widget*
store %struct.view* %0, %struct.view** %7
store i8* %1, i8** %8
store i8* %2, i8** %9
store i32 %3, i32* %10
store i32 %4, i32* %11
store i8* %5, i8** %12
%14 = load %struct.view*, %struct.view** %7
%15 = call %struct.widget* @createwidget(%struct.view* %14)
store %struct.widget* %15, %struct.widget** %13
%16 = load %struct.widget*, %struct.widget** %13
%17 = load i8*, i8** %8
%18 = load i8*, i8** %9
%19 = load i32, i32* %10
%20 = load i32, i32* %11
%21 = load i8*, i8** %12
%22 = call i32 @widget_text_init(%struct.widget* %16, i8* %17, i8* %18, i32 %19, i32 %20, i8* %21)
ret void
}

LLVM IR (-O2):
%struct.view = type { i32 }
%struct.widget = type { i32 }
define void @pool_create_text(%struct.view* %0, i8* %1, i8* %2, i32 %3, i32 %4, i8* %5) {
%7 = tail call %struct.widget* @createwidget(%struct.view* %0)
%8 = tail call i32 @widget_text_init(%struct.widget* %7, i8* %1, i8* %2, i32 %3, i32 %4, i8* %5)
ret void
}
void ignore_handler(int useless) {}


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

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

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

LLVM IR (-O2):
define void @ignore_handler(i32 %0) {
ret void
}
int is_relation_with7(unsigned int n) {
  if (n % 7 == 0)
    return 1;
  while (n > 0) {
    if (n % 10 == 7)
      return 1;
    n /= 10;
  }
  return 0;
}


x86 assembly (clang, -O0):
<is_relation_with7>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
mov    -0x8(%rbp),%eax
mov    $0x7,%ecx
xor    %edx,%edx
div    %ecx
cmp    $0x0,%edx
jne    1128 <is_relation_with7+0x28>
movl   $0x1,-0x4(%rbp)
jmp    1173 <is_relation_with7+0x73>
jmp    112d <is_relation_with7+0x2d>
cmpl   $0x0,-0x8(%rbp)
jbe    116c <is_relation_with7+0x6c>
mov    -0x8(%rbp),%eax
mov    $0xa,%ecx
xor    %edx,%edx
div    %ecx
cmp    $0x7,%edx
jne    1158 <is_relation_with7+0x58>
movl   $0x1,-0x4(%rbp)
jmp    1173 <is_relation_with7+0x73>
mov    -0x8(%rbp),%eax
mov    $0xa,%ecx
xor    %edx,%edx
div    %ecx
mov    %eax,-0x8(%rbp)
jmp    112d <is_relation_with7+0x2d>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<is_relation_with7>:
imul   $0xb6db6db7,%edi,%ecx
mov    $0x1,%eax
cmp    $0x24924925,%ecx
jb     1149 <is_relation_with7+0x49>
mov    $0xcccccccd,%ecx
nopl   0x0(%rax,%rax,1)
imul   $0xcccccccd,%edi,%edx
add    $0x66666665,%edx
ror    %edx
cmp    $0x19999999,%edx
jb     1149 <is_relation_with7+0x49>
mov    %edi,%edx
imul   %rcx,%rdx
shr    $0x23,%rdx
cmp    $0x9,%edi
mov    %edx,%edi
ja     1120 <is_relation_with7+0x20>
xor    %eax,%eax
ret

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

LLVM IR (-O2):
define i32 @is_relation_with7(i32 %0) {
%2 = urem i32 %0, 7
%3 = icmp eq i32 %2, 0
br i1 %3, label %11, label %4
4: ; preds = %1, %9
%5 = phi i32 [ %7, %9 ], [ %0, %1 ]
%6 = urem i32 %5, 10
%7 = udiv i32 %5, 10
%8 = icmp eq i32 %6, 7
br i1 %8, label %11, label %9
9: ; preds = %4
%10 = icmp ult i32 %5, 10
br i1 %10, label %11, label %4
11: ; preds = %4, %9, %1
%12 = phi i32 [ 1, %1 ], [ 1, %4 ], [ 0, %9 ]
ret i32 %12
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ printf(char *);
void checkArgument(int argc, int N) {
  if (argc != 3 || (N != 1 && N != 2)) {
    printf("Argument error\n");
    exit(1);
  }
}


x86 assembly (clang, -O0):
<checkArgument>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
cmpl   $0x3,-0x4(%rbp)
jne    114c <checkArgument+0x2c>
cmpl   $0x1,-0x8(%rbp)
je     1162 <checkArgument+0x42>
cmpl   $0x2,-0x8(%rbp)
je     1162 <checkArgument+0x42>
lea    0xead(%rip),%rdi
call   1030 <printf@plt>
mov    $0x1,%edi
call   1040 <exit@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<checkArgument>:
cmp    $0x3,%edi
jne    112e <checkArgument+0xe>
add    $0xfffffffd,%esi
cmp    $0xfffffffd,%esi
jbe    112e <checkArgument+0xe>
ret
push   %rax
lea    0xeca(%rip),%rdi
call   1030 <puts@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@.str = [16 x i8] c"Argument error\0A\00"
define void @checkArgument(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 = icmp ne i32 %5, 3
br i1 %6, label %13, label %7
7: ; preds = %2
%8 = load i32, i32* %4
%9 = icmp ne i32 %8, 1
br i1 %9, label %10, label %16
10: ; preds = %7
%11 = load i32, i32* %4
%12 = icmp ne i32 %11, 2
br i1 %12, label %13, label %16
13: ; preds = %10, %2
%14 = call i32 @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0))
%15 = call i32 @exit(i32 1)
unreachable
16: ; preds = %10, %7
ret void
}

LLVM IR (-O2):
@str = [15 x i8] c"Argument error\00"
define void @checkArgument(i32 %0, i32 %1) {
%3 = icmp ne i32 %0, 3
%4 = add i32 %1, -3
%5 = icmp ult i32 %4, -2
%6 = or i1 %3, %5
br i1 %6, label %7, label %10
7: ; preds = %2
%8 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([15 x i8], [15 x i8]* @str, i64 0, i64 0))
%9 = tail call i32 @exit(i32 1)
unreachable
10: ; preds = %2
ret void
}
/* Variables and functions */
int /*<<< orphan*/ init_board();
int /*<<< orphan*/ init_data();
int /*<<< orphan*/ init_hash();
int /*<<< orphan*/ init_hashtable(int /*<<< orphan*/);
int /*<<< orphan*/ init_threads(int);
void init_all(int thread_count) {
  init_data();
  init_hash();
  init_hashtable(0);
  init_board();
  init_threads(thread_count);
}


x86 assembly (clang, -O0):
<init_all>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    $0x0,%al
call   1030 <init_data@plt>
mov    $0x0,%al
call   1040 <init_hash@plt>
xor    %edi,%edi
call   1070 <init_hashtable@plt>
mov    $0x0,%al
call   1050 <init_board@plt>
mov    -0x4(%rbp),%edi
call   1060 <init_threads@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<init_all>:
push   %rbx
mov    %edi,%ebx
xor    %eax,%eax
call   1030 <init_data@plt>
xor    %eax,%eax
call   1040 <init_hash@plt>
xor    %edi,%edi
call   1070 <init_hashtable@plt>
xor    %eax,%eax
call   1050 <init_board@plt>
mov    %ebx,%edi
pop    %rbx
jmp    1060 <init_threads@plt>

LLVM IR (-O0):
define void @init_all(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = call i32 (...) @init_data()
%4 = call i32 (...) @init_hash()
%5 = call i32 @init_hashtable(i32 0)
%6 = call i32 (...) @init_board()
%7 = load i32, i32* %2
%8 = call i32 @init_threads(i32 %7)
ret void
}

LLVM IR (-O2):
define void @init_all(i32 %0) {
%2 = tail call i32 (...) @init_data()
%3 = tail call i32 (...) @init_hash()
%4 = tail call i32 @init_hashtable(i32 0)
%5 = tail call i32 (...) @init_board()
%6 = tail call i32 @init_threads(i32 %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ Getc();
int /*<<< orphan*/ hash_algs(int /*<<< orphan*/);
int /*<<< orphan*/ printf(char *);
extern void preferred_hash_algorithms(int len) {
  int i;
  for (i = 0; i < len; i++) {
    printf("\t");
    hash_algs(Getc());
  }
}


x86 assembly (clang, -O0):
<preferred_hash_algorithms>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
mov    -0x8(%rbp),%eax
cmp    -0x4(%rbp),%eax
jge    1176 <preferred_hash_algorithms+0x46>
lea    0xeab(%rip),%rdi
call   1030 <printf@plt>
mov    $0x0,%al
call   1050 <Getc@plt>
mov    %eax,%edi
call   1040 <hash_algs@plt>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1142 <preferred_hash_algorithms+0x12>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<preferred_hash_algorithms>:
push   %rbx
test   %edi,%edi
jle    115d <preferred_hash_algorithms+0x2d>
mov    %edi,%ebx
nopw   0x0(%rax,%rax,1)
mov    $0x9,%edi
call   1030 <putchar@plt>
xor    %eax,%eax
call   1050 <Getc@plt>
mov    %eax,%edi
call   1040 <hash_algs@plt>
add    $0xffffffff,%ebx
jne    1140 <preferred_hash_algorithms+0x10>
pop    %rbx
ret

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

LLVM IR (-O2):
define void @preferred_hash_algorithms(i32 %0) {
%2 = icmp sgt i32 %0, 0
br i1 %2, label %3, label %10
3: ; preds = %1, %3
%4 = phi i32 [ %8, %3 ], [ 0, %1 ]
%5 = tail call i32 @putchar(i32 9)
%6 = tail call i32 (...) @Getc()
%7 = tail call i32 @hash_algs(i32 %6)
%8 = add nuw nsw i32 %4, 1
%9 = icmp eq i32 %8, %0
br i1 %9, label %10, label %3
10: ; preds = %3, %1
ret void
}
/* Variables and functions */
double __nv_nearbyint(double);
double nearbyint(double __a) { return __nv_nearbyint(__a); }


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

x86 assembly (clang, -O2):
<nearbyint>:
jmp    1030 <__nv_nearbyint@plt>

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

LLVM IR (-O2):
define double @nearbyint(double %0) {
%2 = tail call double @__nv_nearbyint(double %0)
ret double %2
}
/* Variables and functions */
int /*<<< orphan*/ reset_andns_ns();
void andns_close(void) { reset_andns_ns(); }


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

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

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

LLVM IR (-O2):
define void @andns_close() {
%1 = tail call i32 (...) @reset_andns_ns()
ret void
}
/* Variables and functions */
int syscall(int, char *, int);
int open(char *file, int flag) { return syscall(31, file, flag); }


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

x86 assembly (clang, -O2):
<open>:
mov    %esi,%edx
mov    %rdi,%rsi
mov    $0x1f,%edi
jmp    1030 <syscall@plt>

LLVM IR (-O0):
define i32 @open(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 @syscall(i32 31, i8* %5, i32 %6)
ret i32 %7
}

LLVM IR (-O2):
define i32 @open(i8* %0, i32 %1) {
%3 = tail call i32 @syscall(i32 31, i8* %0, i32 %1)
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ ld_hli_a();
void opcode_22() { ld_hli_a(); }


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

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

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

LLVM IR (-O2):
define void @opcode_22() {
%1 = tail call i32 (...) @ld_hli_a()
ret void
}
void error(char *why) {}


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

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

LLVM IR (-O0):
define void @error(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
ret void
}

LLVM IR (-O2):
define void @error(i8* nocapture %0) {
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ useconds_t;

/* Variables and functions */
int __infer_nondet_int();
int usleep(useconds_t useconds) {
  int success = __infer_nondet_int();
  return (success > 0) ? 0 : -1;
}


x86 assembly (clang, -O0):
<usleep>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    $0x0,%al
call   1030 <__infer_nondet_int@plt>
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%edx
mov    $0xffffffff,%eax
xor    %ecx,%ecx
cmp    $0x0,%edx
cmovg  %ecx,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<usleep>:
push   %rax
xor    %eax,%eax
call   1030 <__infer_nondet_int@plt>
xor    %ecx,%ecx
test   %eax,%eax
setle  %cl
neg    %ecx
mov    %ecx,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @usleep(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %2
%4 = call i32 (...) @__infer_nondet_int()
store i32 %4, i32* %3
%5 = load i32, i32* %3
%6 = icmp sgt i32 %5, 0
%7 = zext i1 %6 to i64
%8 = select i1 %6, i32 0, i32 -1
ret i32 %8
}

LLVM IR (-O2):
define i32 @usleep(i32 %0) {
%2 = tail call i32 (...) @__infer_nondet_int()
%3 = icmp slt i32 %2, 1
%4 = sext i1 %3 to i32
ret i32 %4
}
/* Type definitions */
typedef scalar_t__ pthread_t;

/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
int /*<<< orphan*/ pthread_cancel(scalar_t__);
int client_stop(pthread_t threadID) {
  printf("will cancel server thread #%02d\n", (int)threadID);
  pthread_cancel(threadID);
  return 0;
}


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

x86 assembly (clang, -O2):
<client_stop>:
push   %rbx
mov    %rdi,%rbx
lea    0xed5(%rip),%rdi
mov    %ebx,%esi
call   1030 <printf@plt>
mov    %rbx,%rdi
call   1040 <pthread_cancel@plt>
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [33 x i8] c"will cancel server thread #%02d\0A\00"
define i32 @client_stop(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = load i64, i64* %2
%4 = trunc i64 %3 to i32
%5 = call i32 @printf(i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str, i64 0, i64 0), i32 %4)
%6 = load i64, i64* %2
%7 = call i32 @pthread_cancel(i64 %6)
ret i32 0
}

LLVM IR (-O2):
@.str = [33 x i8] c"will cancel server thread #%02d\0A\00"
define i32 @client_stop(i64 %0) {
%2 = trunc i64 %0 to i32
%3 = tail call i32 @printf(i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str, i64 0, i64 0), i32 %2)
%4 = tail call i32 @pthread_cancel(i64 %0)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ drawPhilosopher(int, int, int);
void killPhilosophers(int currPhil) {
  if (currPhil == 0)
    return;
  int i;
  for (i = 0; i < currPhil; i++) {
    drawPhilosopher(i, 3, currPhil);
  }
}


x86 assembly (clang, -O0):
<killPhilosophers>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
cmpl   $0x0,-0x4(%rbp)
jne    112a <killPhilosophers+0x1a>
jmp    115b <killPhilosophers+0x4b>
movl   $0x0,-0x8(%rbp)
mov    -0x8(%rbp),%eax
cmp    -0x4(%rbp),%eax
jge    115b <killPhilosophers+0x4b>
mov    -0x8(%rbp),%edi
mov    -0x4(%rbp),%edx
mov    $0x3,%esi
call   1030 <drawPhilosopher@plt>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1131 <killPhilosophers+0x21>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<killPhilosophers>:
push   %rbp
push   %rbx
push   %rax
test   %edi,%edi
jle    1135 <killPhilosophers+0x25>
mov    %edi,%ebx
xor    %ebp,%ebp
nopl   0x0(%rax,%rax,1)
mov    %ebp,%edi
mov    $0x3,%esi
mov    %ebx,%edx
call   1030 <drawPhilosopher@plt>
add    $0x1,%ebp
cmp    %ebp,%ebx
jne    1120 <killPhilosophers+0x10>
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

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

LLVM IR (-O2):
define void @killPhilosophers(i32 %0) {
%2 = icmp sgt i32 %0, 0
br i1 %2, label %3, label %8
3: ; preds = %1, %3
%4 = phi i32 [ %6, %3 ], [ 0, %1 ]
%5 = tail call i32 @drawPhilosopher(i32 %4, i32 3, i32 %0)
%6 = add nuw nsw i32 %4, 1
%7 = icmp eq i32 %6, %0
br i1 %7, label %8, label %3
8: ; preds = %3, %1
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ pid_t;

/* Variables and functions */
int /*<<< orphan*/ X_OK;
int /*<<< orphan*/ _exit(int);
scalar_t__ access(char *, int /*<<< orphan*/);
int /*<<< orphan*/ execl(char *, char *, int /*<<< orphan*/ *);
int main(void) {
  pid_t pid;
  int status;
  char initpath[256];
  if (access("/sbin/ldconfig", X_OK))
    _exit(0);
  execl("/sbin/ldconfig", "/sbin/ldconfig", NULL);
  _exit(110);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x110,%rsp
movl   $0x0,-0x4(%rbp)
mov    0x2e9f(%rip),%rax
mov    (%rax),%esi
lea    0xeae(%rip),%rdi
call   1040 <access@plt>
cmp    $0x0,%rax
je     1168 <main+0x38>
xor    %edi,%edi
call   1030 <_exit@plt>
lea    0xe91(%rip),%rsi
xor    %eax,%eax
mov    %eax,%edx
mov    %rsi,%rdi
call   1050 <execl@plt>
mov    $0x6e,%edi
call   1030 <_exit@plt>

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    0x2eb0(%rip),%rax
mov    (%rax),%esi
lea    0xebf(%rip),%rdi
call   1040 <access@plt>
test   %rax,%rax
jne    1166 <main+0x36>
lea    0xeae(%rip),%rdi
mov    %rdi,%rsi
xor    %edx,%edx
call   1050 <execl@plt>
mov    $0x6e,%edi
call   1030 <_exit@plt>
xor    %edi,%edi
call   1030 <_exit@plt>

LLVM IR (-O0):
@.str = [15 x i8] c"/sbin/ldconfig\00"
@X_OK = global i32 0
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca [256 x i8]
store i32 0, i32* %1
%5 = load i32, i32* @X_OK
%6 = call i64 @access(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0), i32 %5)
%7 = icmp ne i64 %6, 0
br i1 %7, label %8, label %10
8: ; preds = %0
%9 = call i32 @_exit(i32 0)
unreachable
10: ; preds = %0
%11 = call i32 @execl(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0), i32* null)
%12 = call i32 @_exit(i32 110)
unreachable
}

LLVM IR (-O2):
@.str = [15 x i8] c"/sbin/ldconfig\00"
@X_OK = global i32 0
define i32 @main() {
%1 = load i32, i32* @X_OK
%2 = tail call i64 @access(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0), i32 %1)
%3 = icmp eq i64 %2, 0
br i1 %3, label %6, label %4
4: ; preds = %0
%5 = tail call i32 @_exit(i32 0)
unreachable
6: ; preds = %0
%7 = tail call i32 @execl(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0), i32* null)
%8 = tail call i32 @_exit(i32 110)
unreachable
}
int track_size(int ch, int i) {}


x86 assembly (clang, -O0):
<track_size>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @track_size(i32 %0, i32 %1) {
ret i32 undef
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
int /*<<< orphan*/ scanf(char *, int *);
int main(void) {
  int a;
  scanf("%d", &a);
  printf("%d", a);
  return 0;
}


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

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x10,%rsp
lea    0xed4(%rip),%rbx
lea    0xc(%rsp),%rsi
mov    %rbx,%rdi
call   1040 <scanf@plt>
mov    0xc(%rsp),%esi
mov    %rbx,%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbx
ret

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

LLVM IR (-O2):
@.str = [3 x i8] c"%d\00"
define i32 @main() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
%3 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %1)
%4 = load i32, i32* %1
%5 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 %4)
ret i32 0
}
/* Variables and functions */
double copysign(double, double);
double t2(double x, double y) { return copysign(x, y); }


x86 assembly (clang, -O0):
<t2>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  -0x8(%rbp),%xmm0
movsd  -0x10(%rbp),%xmm1
movaps 0xee1(%rip),%xmm2
pand   %xmm2,%xmm1
movaps 0xee6(%rip),%xmm2
pand   %xmm2,%xmm0
por    %xmm1,%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<t2>:
andps  0xef9(%rip),%xmm1
andps  0xf02(%rip),%xmm0
orps   %xmm1,%xmm0
ret

LLVM IR (-O0):
define double @t2(double %0, double %1) {
%3 = alloca double
%4 = alloca double
store double %0, double* %3
store double %1, double* %4
%5 = load double, double* %3
%6 = load double, double* %4
%7 = call double @llvm.copysign.f64(double %5, double %6)
ret double %7
}

LLVM IR (-O2):
define double @t2(double %0, double %1) {
%3 = tail call double @llvm.copysign.f64(double %0, double %1)
ret double %3
}