xunge/DecIR huggingface dataset:
void f119(void) {
  ({
    ({ 0; });
    ({ 0; });
    0;
  });
  ({
    a:
      ({
        goto a;
        0;
      });
      ({ 0; });
      0;
  });
  0;
}


x86 assembly (clang, -O0):
<f119>:
push   %rbp
mov    %rsp,%rbp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
jmp    1119 <f119+0x19>

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

LLVM IR (-O0):
define void @f119() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
store i32 0, i32* %1
%6 = load i32, i32* %1
store i32 0, i32* %2
%7 = load i32, i32* %2
store i32 0, i32* %3
%8 = load i32, i32* %3
br label %9
9: ; preds = %9, %0
br label %9
}

LLVM IR (-O2):
define void @f119() {
br label %1
1: ; preds = %1, %0
br label %1
}
int integerValueOrderer(const int *a, const int *b) {
  return ((int)a) - ((int)b);
}


x86 assembly (clang, -O0):
<integerValueOrderer>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    -0x10(%rbp),%rcx
sub    %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<integerValueOrderer>:
mov    %rdi,%rax
sub    %esi,%eax
ret

LLVM IR (-O0):
define i32 @integerValueOrderer(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 = ptrtoint i32* %5 to i32
%7 = load i32*, i32** %4
%8 = ptrtoint i32* %7 to i32
%9 = sub nsw i32 %6, %8
ret i32 %9
}

LLVM IR (-O2):
define i32 @integerValueOrderer(i32* %0, i32* %1) {
%3 = ptrtoint i32* %0 to i64
%4 = trunc i64 %3 to i32
%5 = ptrtoint i32* %1 to i64
%6 = trunc i64 %5 to i32
%7 = sub nsw i32 %4, %6
ret i32 %7
}
/* Type definitions */
typedef int uint32_t;

/* Variables and functions */
void write_u32_le(unsigned char *buf, uint32_t n) {
  buf[3] = n >> 24 & 0xff;
  buf[2] = n >> 16 & 0xff;
  buf[1] = n >> 8 & 0xff;
  buf[0] = n & 0xff;
}


x86 assembly (clang, -O0):
<write_u32_le>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0xc(%rbp),%eax
sar    $0x18,%eax
and    $0xff,%eax
mov    %al,%cl
mov    -0x8(%rbp),%rax
mov    %cl,0x3(%rax)
mov    -0xc(%rbp),%eax
sar    $0x10,%eax
and    $0xff,%eax
mov    %al,%cl
mov    -0x8(%rbp),%rax
mov    %cl,0x2(%rax)
mov    -0xc(%rbp),%eax
sar    $0x8,%eax
and    $0xff,%eax
mov    %al,%cl
mov    -0x8(%rbp),%rax
mov    %cl,0x1(%rax)
mov    -0xc(%rbp),%eax
and    $0xff,%eax
mov    %al,%cl
mov    -0x8(%rbp),%rax
mov    %cl,(%rax)
pop    %rbp
ret

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

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

LLVM IR (-O2):
define void @write_u32_le(i8* nocapture writeonly %0, i32 %1) {
%3 = lshr i32 %1, 24
%4 = trunc i32 %3 to i8
%5 = getelementptr inbounds i8, i8* %0, i64 3
store i8 %4, i8* %5
%6 = lshr i32 %1, 16
%7 = trunc i32 %6 to i8
%8 = getelementptr inbounds i8, i8* %0, i64 2
store i8 %7, i8* %8
%9 = lshr i32 %1, 8
%10 = trunc i32 %9 to i8
%11 = getelementptr inbounds i8, i8* %0, i64 1
store i8 %10, i8* %11
%12 = trunc i32 %1 to i8
store i8 %12, i8* %0
ret void
}
/* Variables and functions */
int is_prime(int, int);
int /*<<< orphan*/ printf(char *, int);
int /*<<< orphan*/ scanf(char *, int *);
int main() {
  int num2 = 2, num1, done;
  scanf("%d", &num1);
  done = is_prime(num2, num1);
  printf("\n%d", done);
  return 0;
}


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

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xec9(%rip),%rdi
lea    0x4(%rsp),%rsi
call   1050 <scanf@plt>
mov    0x4(%rsp),%esi
mov    $0x2,%edi
call   1040 <is_prime@plt>
lea    0xea9(%rip),%rdi
mov    %eax,%esi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
@.str = [3 x i8] c"%d\00"
@.str.1 = [4 x i8] c"\0A%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 @is_prime(i32 2, i32 %4)
%6 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i32 %5)
ret i32 0
}
const char *ABZ_BZ2_bzlibVersion(void) { return "1.0.6, 6-Sept-2010"; }


x86 assembly (clang, -O0):
<ABZ_BZ2_bzlibVersion>:
push   %rbp
mov    %rsp,%rbp
lea    0xef5(%rip),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<ABZ_BZ2_bzlibVersion>:
lea    0xef9(%rip),%rax
ret

LLVM IR (-O0):
@.str = [19 x i8] c"1.0.6, 6-Sept-2010\00"
define i8* @ABZ_BZ2_bzlibVersion() {
ret i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0)
}

LLVM IR (-O2):
@.str = [19 x i8] c"1.0.6, 6-Sept-2010\00"
define i8* @ABZ_BZ2_bzlibVersion() {
ret i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0)
}
/* Variables and functions */
int /*<<< orphan*/ error_and_exit(char *, char *, int, char *);
void *cmalloc_pvalloc(size_t size) {
  error_and_exit("CMalloc: Error at %s:%d %s.\n",
                 "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/"
                 "outputs/2022-01-22/02-19-57/repos/maokelong/cmalloc/refs/"
                 "heads/master/sources/cmalloc.c",
                 201, "pvalloc() called but not implemented");
  return NULL;
}


x86 assembly (clang, -O0):
<cmalloc_pvalloc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
lea    0xedd(%rip),%rdi
lea    0xef3(%rip),%rsi
mov    $0xc9,%edx
lea    0xf77(%rip),%rcx
call   1030 <error_and_exit@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<cmalloc_pvalloc>:
push   %rax
lea    0xee8(%rip),%rdi
lea    0xefe(%rip),%rsi
lea    0xf87(%rip),%rcx
mov    $0xc9,%edx
call   1030 <error_and_exit@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [29 x i8] c"CMalloc: Error at %s:%d %s.\0A\00"
@.str.1 = [144 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/maokelong/cmalloc/refs/heads/master/sources/cmalloc.c\00"
@.str.2 = [37 x i8] c"pvalloc() called but not implemented\00"
define i8* @cmalloc_pvalloc(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = call i32 @error_and_exit(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([144 x i8], [144 x i8]* @.str.1, i64 0, i64 0), i32 201, i8* getelementptr inbounds ([37 x i8], [37 x i8]* @.str.2, i64 0, i64 0))
ret i8* null
}

LLVM IR (-O2):
@.str = [29 x i8] c"CMalloc: Error at %s:%d %s.\0A\00"
@.str.1 = [144 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/maokelong/cmalloc/refs/heads/master/sources/cmalloc.c\00"
@.str.2 = [37 x i8] c"pvalloc() called but not implemented\00"
define noalias i8* @cmalloc_pvalloc(i64 %0) {
%2 = tail call i32 @error_and_exit(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([144 x i8], [144 x i8]* @.str.1, i64 0, i64 0), i32 201, i8* getelementptr inbounds ([37 x i8], [37 x i8]* @.str.2, i64 0, i64 0))
ret i8* null
}
int kdebug() { return (0); }


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

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

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

LLVM IR (-O2):
define i32 @kdebug() {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ free(int *);
scalar_t__ malloc(int);
int *realloc_wrapper(int *, int);
void realloc_no_check_bad() {
  int *p = (int *)malloc(sizeof(int));
  int *q = realloc_wrapper(p, sizeof(int));
  *q = 42;
  free(q);
}


x86 assembly (clang, -O0):
<realloc_no_check_bad>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x4,%edi
call   1050 <malloc@plt>
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
mov    $0x4,%esi
call   1040 <realloc_wrapper@plt>
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
movl   $0x2a,(%rax)
mov    -0x10(%rbp),%rdi
call   1030 <free@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<realloc_no_check_bad>:
push   %rax
mov    $0x4,%edi
call   1050 <malloc@plt>
mov    %rax,%rdi
mov    $0x4,%esi
call   1040 <realloc_wrapper@plt>
movl   $0x2a,(%rax)
mov    %rax,%rdi
pop    %rax
jmp    1030 <free@plt>

LLVM IR (-O0):
define void @realloc_no_check_bad() {
%1 = alloca i32*
%2 = alloca i32*
%3 = call i64 @malloc(i32 4)
%4 = inttoptr i64 %3 to i32*
store i32* %4, i32** %1
%5 = load i32*, i32** %1
%6 = call i32* @realloc_wrapper(i32* %5, i32 4)
store i32* %6, i32** %2
%7 = load i32*, i32** %2
store i32 42, i32* %7
%8 = load i32*, i32** %2
%9 = call i32 @free(i32* %8)
ret void
}

LLVM IR (-O2):
define void @realloc_no_check_bad() {
%1 = tail call i64 @malloc(i32 4)
%2 = inttoptr i64 %1 to i32*
%3 = tail call i32* @realloc_wrapper(i32* %2, i32 4)
store i32 42, i32* %3
%4 = tail call i32 @free(i32* %3)
ret void
}
/* Type definitions */
struct sockaddr_in6 {
  int sin6_scope_id;
  int /*<<< orphan*/ sin6_family;
};

/* Variables and functions */
int /*<<< orphan*/ PF_INET6;
int main() {
  struct sockaddr_in6 sa;
  sa.sin6_family = PF_INET6;
  sa.sin6_scope_id = 23;
  (void)sa;
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
movl   $0x0,-0x4(%rbp)
mov    0x2ed6(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0xc(%rbp)
movl   $0x17,-0x10(%rbp)
xor    %eax,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
%struct.sockaddr_in6 = type { i32, i32 }
@PF_INET6 = global i32 0
define i32 @main() {
%1 = alloca i32
%2 = alloca %struct.sockaddr_in6
store i32 0, i32* %1
%3 = load i32, i32* @PF_INET6
%4 = getelementptr inbounds %struct.sockaddr_in6, %struct.sockaddr_in6* %2, i32 0, i32 1
store i32 %3, i32* %4
%5 = getelementptr inbounds %struct.sockaddr_in6, %struct.sockaddr_in6* %2, i32 0, i32 0
store i32 23, i32* %5
ret i32 0
}

LLVM IR (-O2):
@PF_INET6 = global i32 0
define i32 @main() {
ret i32 0
}
int ft_get_res_length_un(unsigned long long n, int base_length) {
  int i;
  if (n == 0)
    return (1);
  i = 0;
  while (n != 0) {
    n /= base_length;
    i++;
  }
  return (i);
}


x86 assembly (clang, -O0):
<ft_get_res_length_un>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    %esi,-0x14(%rbp)
cmpq   $0x0,-0x10(%rbp)
jne    1122 <ft_get_res_length_un+0x22>
movl   $0x1,-0x4(%rbp)
jmp    1159 <ft_get_res_length_un+0x59>
movl   $0x0,-0x18(%rbp)
cmpq   $0x0,-0x10(%rbp)
je     1153 <ft_get_res_length_un+0x53>
movslq -0x14(%rbp),%rcx
mov    -0x10(%rbp),%rax
xor    %edx,%edx
div    %rcx
mov    %rax,-0x10(%rbp)
mov    -0x18(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x18(%rbp)
jmp    1129 <ft_get_res_length_un+0x29>
mov    -0x18(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<ft_get_res_length_un>:
test   %rdi,%rdi
je     113a <ft_get_res_length_un+0x3a>
movslq %esi,%r8
xor    %ecx,%ecx
jmp    1123 <ft_get_res_length_un+0x23>
nopl   0x0(%rax)
mov    %rdi,%rax
xor    %edx,%edx
div    %r8
add    $0x1,%ecx
cmp    %r8,%rdi
mov    %rax,%rdi
jb     1137 <ft_get_res_length_un+0x37>
mov    %rdi,%rax
or     %r8,%rax
shr    $0x20,%rax
jne    1110 <ft_get_res_length_un+0x10>
mov    %edi,%eax
xor    %edx,%edx
div    %esi
jmp    1118 <ft_get_res_length_un+0x18>
mov    %ecx,%eax
ret
mov    $0x1,%ecx
mov    %ecx,%eax
ret

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

LLVM IR (-O2):
define i32 @ft_get_res_length_un(i64 %0, i32 %1) {
%3 = icmp eq i64 %0, 0
br i1 %3, label %12, label %4
4: ; preds = %2
%5 = sext i32 %1 to i64
br label %6
6: ; preds = %4, %6
%7 = phi i32 [ 0, %4 ], [ %10, %6 ]
%8 = phi i64 [ %0, %4 ], [ %9, %6 ]
%9 = udiv i64 %8, %5
%10 = add nuw nsw i32 %7, 1
%11 = icmp ult i64 %8, %5
br i1 %11, label %12, label %6
12: ; preds = %6, %2
%13 = phi i32 [ 1, %2 ], [ %10, %6 ]
ret i32 %13
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char const *);
void debugPrintf(const char *pc) { printf("[%s]", pc); }


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

x86 assembly (clang, -O2):
<debugPrintf>:
mov    %rdi,%rsi
lea    0xee6(%rip),%rdi
jmp    1030 <printf@plt>

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

LLVM IR (-O2):
@.str = [5 x i8] c"[%s]\00"
define void @debugPrintf(i8* %0) {
%2 = tail call i32 @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i8* %0)
ret void
}
void glCopyTexSubImage3D(void) { return; }


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

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

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

LLVM IR (-O2):
define void @glCopyTexSubImage3D() {
ret void
}
int of_set_property(struct device_node *node, const char *p, const void *val,
                    int len, int create) {
  return -38;
}


x86 assembly (clang, -O0):
<of_set_property>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %ecx,-0x1c(%rbp)
mov    %r8d,-0x20(%rbp)
mov    $0xffffffda,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
%struct.device_node = type opaque
define i32 @of_set_property(%struct.device_node* %0, i8* %1, i8* %2, i32 %3, i32 %4) {
%6 = alloca %struct.device_node*
%7 = alloca i8*
%8 = alloca i8*
%9 = alloca i32
%10 = alloca i32
store %struct.device_node* %0, %struct.device_node** %6
store i8* %1, i8** %7
store i8* %2, i8** %8
store i32 %3, i32* %9
store i32 %4, i32* %10
ret i32 -38
}

LLVM IR (-O2):
%struct.device_node = type opaque
define i32 @of_set_property(%struct.device_node* nocapture readnone %0, i8* nocapture readnone %1, i8* nocapture readnone %2, i32 %3, i32 %4) {
ret i32 -38
}
/* Variables and functions */
int /*<<< orphan*/ static_assert(int);
scalar_t__ unknown1();
int main() {
  int x, m, n;
  x = 0;
  m = 0;
  while (x < n) {
    if (unknown1())
      m = x;
    x++;
  }
  if (n > 0) {
    static_assert(0 <= m);
    static_assert(m < n);
  }
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
mov    -0x8(%rbp),%eax
cmp    -0x10(%rbp),%eax
jge    116e <main+0x4e>
mov    $0x0,%al
call   1030 <unknown1@plt>
cmp    $0x0,%rax
je     1160 <main+0x40>
mov    -0x8(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    113d <main+0x1d>
cmpl   $0x0,-0x10(%rbp)
jle    119d <main+0x7d>
xor    %eax,%eax
cmp    -0xc(%rbp),%eax
setle  %al
and    $0x1,%al
movzbl %al,%edi
call   1040 <static_assert@plt>
mov    -0xc(%rbp),%eax
cmp    -0x10(%rbp),%eax
setl   %al
and    $0x1,%al
movzbl %al,%edi
call   1040 <static_assert@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
store i32 0, i32* %1
store i32 0, i32* %2
store i32 0, i32* %3
br label %5
5: ; preds = %14, %0
%6 = load i32, i32* %2
%7 = load i32, i32* %4
%8 = icmp slt i32 %6, %7
br i1 %8, label %9, label %17
9: ; preds = %5
%10 = call i64 (...) @unknown1()
%11 = icmp ne i64 %10, 0
br i1 %11, label %12, label %14
12: ; preds = %9
%13 = load i32, i32* %2
store i32 %13, i32* %3
br label %14
14: ; preds = %12, %9
%15 = load i32, i32* %2
%16 = add nsw i32 %15, 1
store i32 %16, i32* %2
br label %5
17: ; preds = %5
%18 = load i32, i32* %4
%19 = icmp sgt i32 %18, 0
br i1 %19, label %20, label %30
20: ; preds = %17
%21 = load i32, i32* %3
%22 = icmp sle i32 0, %21
%23 = zext i1 %22 to i32
%24 = call i32 @static_assert(i32 %23)
%25 = load i32, i32* %3
%26 = load i32, i32* %4
%27 = icmp slt i32 %25, %26
%28 = zext i1 %27 to i32
%29 = call i32 @static_assert(i32 %28)
br label %30
30: ; preds = %20, %17
%31 = load i32, i32* %1
ret i32 %31
}

LLVM IR (-O2):
define i32 @main() {
ret i32 0
}
void io_pin_toggle(char *pin) {}


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

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

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

LLVM IR (-O2):
define void @io_pin_toggle(i8* nocapture %0) {
ret void
}
/* Variables and functions */
char *strrchr(char *, char);
char *safe_basename(char *f) {
  char *answer;
  answer = strrchr(f, '/');
  if (!answer)
    answer = f;
  else
    answer += 1;
  return answer;
}


x86 assembly (clang, -O0):
<safe_basename>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
mov    $0x2f,%esi
call   1030 <strrchr@plt>
mov    %rax,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
jne    1146 <safe_basename+0x36>
mov    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
jmp    1152 <safe_basename+0x42>
mov    -0x10(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<safe_basename>:
push   %rbx
mov    %rdi,%rbx
mov    $0x2f,%esi
call   1030 <strrchr@plt>
lea    0x1(%rax),%rcx
test   %rax,%rax
cmove  %rbx,%rcx
mov    %rcx,%rax
pop    %rbx
ret

LLVM IR (-O0):
define i8* @safe_basename(i8* %0) {
%2 = alloca i8*
%3 = alloca i8*
store i8* %0, i8** %2
%4 = load i8*, i8** %2
%5 = call i8* @strrchr(i8* %4, i8 signext 47)
store i8* %5, i8** %3
%6 = load i8*, i8** %3
%7 = icmp ne i8* %6, null
br i1 %7, label %10, label %8
8: ; preds = %1
%9 = load i8*, i8** %2
store i8* %9, i8** %3
br label %13
10: ; preds = %1
%11 = load i8*, i8** %3
%12 = getelementptr inbounds i8, i8* %11, i64 1
store i8* %12, i8** %3
br label %13
13: ; preds = %10, %8
%14 = load i8*, i8** %3
ret i8* %14
}

LLVM IR (-O2):
define i8* @safe_basename(i8* %0) {
%2 = tail call i8* @strrchr(i8* dereferenceable(1) %0, i8 signext 47)
%3 = icmp eq i8* %2, null
%4 = getelementptr inbounds i8, i8* %2, i64 1
%5 = select i1 %3, i8* %0, i8* %4
ret i8* %5
}
/* Variables and functions */
unsigned int UPDC32(unsigned char, unsigned int);
unsigned int crc32buf(unsigned char *buf, int len) {
  unsigned int state, nbytes;
  state = 0xFFFFFFFF;
  for (nbytes = 0; nbytes < len; nbytes++) {
    state = UPDC32(buf[nbytes], state);
  }
  return state;
}


x86 assembly (clang, -O0):
<crc32buf>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
movl   $0xffffffff,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
mov    -0x14(%rbp),%eax
cmp    -0xc(%rbp),%eax
jae    115f <crc32buf+0x4f>
mov    -0x8(%rbp),%rax
mov    -0x14(%rbp),%ecx
mov    (%rax,%rcx,1),%al
mov    -0x10(%rbp),%esi
movzbl %al,%edi
call   1030 <UPDC32@plt>
mov    %eax,-0x10(%rbp)
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    112d <crc32buf+0x1d>
mov    -0x10(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<crc32buf>:
push   %r15
push   %r14
push   %rbx
test   %esi,%esi
je     1147 <crc32buf+0x37>
mov    %rdi,%r14
mov    %esi,%r15d
mov    $0xffffffff,%eax
xor    %ebx,%ebx
cs nopw 0x0(%rax,%rax,1)
movzbl (%r14,%rbx,1),%edi
mov    %eax,%esi
call   1030 <UPDC32@plt>
add    $0x1,%rbx
cmp    %rbx,%r15
jne    1130 <crc32buf+0x20>
jmp    114c <crc32buf+0x3c>
mov    $0xffffffff,%eax
pop    %rbx
pop    %r14
pop    %r15
ret

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

LLVM IR (-O2):
define i32 @crc32buf(i8* nocapture %0, i32 %1) {
%3 = icmp eq i32 %1, 0
br i1 %3, label %14, label %4
4: ; preds = %2
%5 = zext i32 %1 to i64
br label %6
6: ; preds = %4, %6
%7 = phi i64 [ 0, %4 ], [ %12, %6 ]
%8 = phi i32 [ -1, %4 ], [ %11, %6 ]
%9 = getelementptr inbounds i8, i8* %0, i64 %7
%10 = load i8, i8* %9
%11 = tail call i32 @UPDC32(i8 zeroext %10, i32 %8)
%12 = add nuw nsw i64 %7, 1
%13 = icmp eq i64 %12, %5
br i1 %13, label %14, label %6
14: ; preds = %6, %2
%15 = phi i32 [ -1, %2 ], [ %11, %6 ]
ret i32 %15
}
/* Variables and functions */
int /*<<< orphan*/ SHUT_RDWR;
int /*<<< orphan*/ close(int);
int /*<<< orphan*/ shutdown(int, int /*<<< orphan*/);
void CloseSocket(int SockFD) {
  shutdown(SockFD, SHUT_RDWR);
  close(SockFD);
}


x86 assembly (clang, -O0):
<CloseSocket>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
mov    0x2ebb(%rip),%rax
mov    (%rax),%esi
call   1030 <shutdown@plt>
mov    -0x4(%rbp),%edi
call   1040 <close@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<CloseSocket>:
push   %rbx
mov    %edi,%ebx
mov    0x2ec6(%rip),%rax
mov    (%rax),%esi
call   1030 <shutdown@plt>
mov    %ebx,%edi
pop    %rbx
jmp    1040 <close@plt>

LLVM IR (-O0):
@SHUT_RDWR = global i32 0
define void @CloseSocket(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = load i32, i32* @SHUT_RDWR
%5 = call i32 @shutdown(i32 %3, i32 %4)
%6 = load i32, i32* %2
%7 = call i32 @close(i32 %6)
ret void
}

LLVM IR (-O2):
@SHUT_RDWR = global i32 0
define void @CloseSocket(i32 %0) {
%2 = load i32, i32* @SHUT_RDWR
%3 = tail call i32 @shutdown(i32 %0, i32 %2)
%4 = tail call i32 @close(i32 %0)
ret void
}
/* Variables and functions */
scalar_t__ read(int, void *, size_t);
int c_read(int fd, void *buf, size_t count) {
  return (int)read(fd, buf, count);
}


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

x86 assembly (clang, -O2):
<c_read>:
jmp    1030 <read@plt>

LLVM IR (-O0):
define i32 @c_read(i32 %0, i8* %1, i64 %2) {
%4 = alloca i32
%5 = alloca i8*
%6 = alloca i64
store i32 %0, i32* %4
store i8* %1, i8** %5
store i64 %2, i64* %6
%7 = load i32, i32* %4
%8 = load i8*, i8** %5
%9 = load i64, i64* %6
%10 = call i64 @read(i32 %7, i8* %8, i64 %9)
%11 = trunc i64 %10 to i32
ret i32 %11
}

LLVM IR (-O2):
define i32 @c_read(i32 %0, i8* nocapture %1, i64 %2) {
%4 = tail call i64 @read(i32 %0, i8* %1, i64 %2)
%5 = trunc i64 %4 to i32
ret i32 %5
}
int resta(int numero1, int numero2) { return numero1 - numero2; }


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

x86 assembly (clang, -O2):
<resta>:
mov    %edi,%eax
sub    %esi,%eax
ret

LLVM IR (-O0):
define i32 @resta(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 = sub nsw i32 %5, %6
ret i32 %7
}

LLVM IR (-O2):
define i32 @resta(i32 %0, i32 %1) {
%3 = sub nsw i32 %0, %1
ret i32 %3
}
void MakeCallback3(void (*mlcall)(int), int i) { mlcall(i + 1); }


x86 assembly (clang, -O0):
<MakeCallback3>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rax
mov    -0xc(%rbp),%edi
add    $0x1,%edi
call   *%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<MakeCallback3>:
mov    %rdi,%rax
lea    0x1(%rsi),%edi
jmp    *%rax

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

LLVM IR (-O2):
define void @MakeCallback3(void (i32)* nocapture %0, i32 %1) {
%3 = add nsw i32 %1, 1
tail call void %0(i32 %3)
ret void
}
/* Variables and functions */
double inverfc(int);
double inverf(const double p) { return inverfc(1. - p); }


x86 assembly (clang, -O0):
<inverf>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  0xedb(%rip),%xmm0
subsd  -0x8(%rbp),%xmm0
cvttsd2si %xmm0,%edi
call   1030 <inverfc@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<inverf>:
movsd  0xee8(%rip),%xmm1
subsd  %xmm0,%xmm1
cvttsd2si %xmm1,%edi
jmp    1030 <inverfc@plt>

LLVM IR (-O0):
define double @inverf(double %0) {
%2 = alloca double
store double %0, double* %2
%3 = load double, double* %2
%4 = fsub double 1.000000e+00, %3
%5 = fptosi double %4 to i32
%6 = call double @inverfc(i32 %5)
ret double %6
}

LLVM IR (-O2):
define double @inverf(double %0) {
%2 = fsub double 1.000000e+00, %0
%3 = fptosi double %2 to i32
%4 = tail call double @inverfc(i32 %3)
ret double %4
}
int xislower(int c) { return (c >= 'a' && c <= 'z'); }


x86 assembly (clang, -O0):
<xislower>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
xor    %eax,%eax
cmpl   $0x61,-0x4(%rbp)
mov    %al,-0x5(%rbp)
jl     1120 <xislower+0x20>
cmpl   $0x7a,-0x4(%rbp)
setle  %al
mov    %al,-0x5(%rbp)
mov    -0x5(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<xislower>:
add    $0xffffff9f,%edi
xor    %eax,%eax
cmp    $0x1a,%edi
setb   %al
ret

LLVM IR (-O0):
define i32 @xislower(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = icmp sge i32 %3, 97
br i1 %4, label %5, label %8
5: ; preds = %1
%6 = load i32, i32* %2
%7 = icmp sle i32 %6, 122
br label %8
8: ; preds = %5, %1
%9 = phi i1 [ false, %1 ], [ %7, %5 ]
%10 = zext i1 %9 to i32
ret i32 %10
}

LLVM IR (-O2):
define i32 @xislower(i32 %0) {
%2 = add i32 %0, -97
%3 = icmp ult i32 %2, 26
%4 = zext i1 %3 to i32
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ change_state(int /*<<< orphan*/, int, int);
int /*<<< orphan*/ force_exit();
void goal_state_handle_input(int input) {
  if (input == ('\n'))
    change_state((0), (1), (1));
  if (input == ('q'))
    force_exit();
}


x86 assembly (clang, -O0):
<goal_state_handle_input>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
cmpl   $0xa,-0x4(%rbp)
jne    1143 <goal_state_handle_input+0x23>
xor    %edi,%edi
mov    $0x1,%edx
mov    %edx,%esi
call   1030 <change_state@plt>
cmpl   $0x71,-0x4(%rbp)
jne    1154 <goal_state_handle_input+0x34>
mov    $0x0,%al
call   1040 <force_exit@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<goal_state_handle_input>:
cmp    $0x71,%edi
je     113b <goal_state_handle_input+0x1b>
cmp    $0xa,%edi
jne    1142 <goal_state_handle_input+0x22>
xor    %edi,%edi
mov    $0x1,%esi
mov    $0x1,%edx
jmp    1030 <change_state@plt>
xor    %eax,%eax
jmp    1040 <force_exit@plt>
ret

LLVM IR (-O0):
define void @goal_state_handle_input(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = icmp eq i32 %3, 10
br i1 %4, label %5, label %7
5: ; preds = %1
%6 = call i32 @change_state(i32 0, i32 1, i32 1)
br label %7
7: ; preds = %5, %1
%8 = load i32, i32* %2
%9 = icmp eq i32 %8, 113
br i1 %9, label %10, label %12
10: ; preds = %7
%11 = call i32 (...) @force_exit()
br label %12
12: ; preds = %10, %7
ret void
}

LLVM IR (-O2):
define void @goal_state_handle_input(i32 %0) {
switch i32 %0, label %6 [
i32 10, label %2
i32 113, label %4
]
2: ; preds = %1
%3 = tail call i32 @change_state(i32 0, i32 1, i32 1)
br label %6
4: ; preds = %1
%5 = tail call i32 (...) @force_exit()
br label %6
6: ; preds = %2, %1, %4
ret void
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ printf(char *, int, int);
void exitfunc24(int status, void *arg) {
  printf("Executing exitfunc24 (status=%d, arg=%d)\n", status, (int)arg);
  exit((int)arg);
}


x86 assembly (clang, -O0):
<exitfunc24>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x4(%rbp),%esi
mov    -0x10(%rbp),%rax
mov    %eax,%edx
lea    0xec1(%rip),%rdi
call   1030 <printf@plt>
mov    -0x10(%rbp),%rax
mov    %eax,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<exitfunc24>:
push   %rbx
mov    %rsi,%rbx
mov    %edi,%esi
lea    0xed3(%rip),%rdi
mov    %ebx,%edx
call   1030 <printf@plt>
mov    %ebx,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@.str = [42 x i8] c"Executing exitfunc24 (status=%d, arg=%d)\0A\00"
define void @exitfunc24(i32 %0, i8* %1) {
%3 = alloca i32
%4 = alloca i8*
store i32 %0, i32* %3
store i8* %1, i8** %4
%5 = load i32, i32* %3
%6 = load i8*, i8** %4
%7 = ptrtoint i8* %6 to i32
%8 = call i32 @printf(i8* getelementptr inbounds ([42 x i8], [42 x i8]* @.str, i64 0, i64 0), i32 %5, i32 %7)
%9 = load i8*, i8** %4
%10 = ptrtoint i8* %9 to i32
%11 = call i32 @exit(i32 %10)
unreachable
}

LLVM IR (-O2):
@.str = [42 x i8] c"Executing exitfunc24 (status=%d, arg=%d)\0A\00"
define void @exitfunc24(i32 %0, i8* %1) {
%3 = ptrtoint i8* %1 to i64
%4 = trunc i64 %3 to i32
%5 = tail call i32 @printf(i8* getelementptr inbounds ([42 x i8], [42 x i8]* @.str, i64 0, i64 0), i32 %0, i32 %4)
%6 = tail call i32 @exit(i32 %4)
unreachable
}
/* Type definitions */
typedef int /*<<< orphan*/ Window;
typedef int /*<<< orphan*/ Region;
typedef int /*<<< orphan*/ Display;

/* Variables and functions */
int /*<<< orphan*/ GetWindowRegion(int /*<<< orphan*/ *, int /*<<< orphan*/,
                                   int /*<<< orphan*/);
int /*<<< orphan*/ True;
int /*<<< orphan*/ XDestroyRegion(int /*<<< orphan*/);
int /*<<< orphan*/ XSubtractRegion(int /*<<< orphan*/, int /*<<< orphan*/,
                                   int /*<<< orphan*/);
void SubtractWindowFromVisibleRegion(Display *dpy, Window win, Region visrgn) {
  Region winrgn = GetWindowRegion(dpy, win, True);
  XSubtractRegion(visrgn, winrgn, visrgn);
  XDestroyRegion(winrgn);
}


x86 assembly (clang, -O0):
<SubtractWindowFromVisibleRegion>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
mov    0x2e98(%rip),%rax
mov    (%rax),%edx
call   1030 <GetWindowRegion@plt>
mov    %eax,-0x14(%rbp)
mov    -0x10(%rbp),%edi
mov    -0x14(%rbp),%esi
mov    -0x10(%rbp),%edx
call   1050 <XSubtractRegion@plt>
mov    -0x14(%rbp),%edi
call   1040 <XDestroyRegion@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<SubtractWindowFromVisibleRegion>:
push   %rbp
push   %rbx
push   %rax
mov    %edx,%ebx
mov    0x2eac(%rip),%rax
mov    (%rax),%edx
call   1030 <GetWindowRegion@plt>
mov    %eax,%ebp
mov    %ebx,%edi
mov    %eax,%esi
mov    %ebx,%edx
call   1050 <XSubtractRegion@plt>
mov    %ebp,%edi
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    1040 <XDestroyRegion@plt>

LLVM IR (-O0):
@True = global i32 0
define void @SubtractWindowFromVisibleRegion(i32* %0, i32 %1, i32 %2) {
%4 = alloca i32*
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
store i32* %0, i32** %4
store i32 %1, i32* %5
store i32 %2, i32* %6
%8 = load i32*, i32** %4
%9 = load i32, i32* %5
%10 = load i32, i32* @True
%11 = call i32 @GetWindowRegion(i32* %8, i32 %9, i32 %10)
store i32 %11, i32* %7
%12 = load i32, i32* %6
%13 = load i32, i32* %7
%14 = load i32, i32* %6
%15 = call i32 @XSubtractRegion(i32 %12, i32 %13, i32 %14)
%16 = load i32, i32* %7
%17 = call i32 @XDestroyRegion(i32 %16)
ret void
}

LLVM IR (-O2):
@True = global i32 0
define void @SubtractWindowFromVisibleRegion(i32* %0, i32 %1, i32 %2) {
%4 = load i32, i32* @True
%5 = tail call i32 @GetWindowRegion(i32* %0, i32 %1, i32 %4)
%6 = tail call i32 @XSubtractRegion(i32 %2, i32 %5, i32 %2)
%7 = tail call i32 @XDestroyRegion(i32 %5)
ret void
}
void d2i_OTHERNAME(void) {}


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

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

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

LLVM IR (-O2):
define void @d2i_OTHERNAME() {
ret void
}
const char *get_ipl_banner(int show_ipl) {
  if (show_ipl)
    return "IPL type:";
  else
    return "Re-IPL type:";
}


x86 assembly (clang, -O0):
<get_ipl_banner>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0xc(%rbp)
cmpl   $0x0,-0xc(%rbp)
je     1121 <get_ipl_banner+0x21>
lea    0xeeb(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    112c <get_ipl_banner+0x2c>
lea    0xed8(%rip),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_ipl_banner>:
test   %edi,%edi
lea    0xef7(%rip),%rcx
lea    0xef3(%rip),%rax
cmove  %rcx,%rax
ret

LLVM IR (-O0):
@.str = [10 x i8] c"IPL type:\00"
@.str.1 = [13 x i8] c"Re-IPL type:\00"
define i8* @get_ipl_banner(i32 %0) {
%2 = alloca i8*
%3 = alloca i32
store i32 %0, i32* %3
%4 = load i32, i32* %3
%5 = icmp ne i32 %4, 0
br i1 %5, label %6, label %7
6: ; preds = %1
store i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i8** %2
br label %8
7: ; preds = %1
store i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.1, i64 0, i64 0), i8** %2
br label %8
8: ; preds = %7, %6
%9 = load i8*, i8** %2
ret i8* %9
}

LLVM IR (-O2):
@.str = [10 x i8] c"IPL type:\00"
@.str.1 = [13 x i8] c"Re-IPL type:\00"
define i8* @get_ipl_banner(i32 %0) {
%2 = icmp eq i32 %0, 0
%3 = select i1 %2, i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0)
ret i8* %3
}
int test_imm_89uint16_reg(unsigned short val) {
  return ((val) & (0x89 << 0)) ? -20 : -40;
}


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

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

LLVM IR (-O0):
define i32 @test_imm_89uint16_reg(i16 zeroext %0) {
%2 = alloca i16
store i16 %0, i16* %2
%3 = load i16, i16* %2
%4 = zext i16 %3 to i32
%5 = and i32 %4, 137
%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_89uint16_reg(i16 zeroext %0) {
%2 = and i16 %0, 137
%3 = icmp eq i16 %2, 0
%4 = select i1 %3, i32 -40, i32 -20
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ F_GETFL;
int /*<<< orphan*/ F_SETFL;
int O_NONBLOCK;
int fcntl(int, int /*<<< orphan*/, int);
int set_nonblocking(int fd) {
  int flags;
  flags = fcntl(fd, F_GETFL, 0);
  if (flags == -1) {
    return -1;
  }
  return fcntl(fd, F_SETFL, flags | O_NONBLOCK);
}


x86 assembly (clang, -O0):
<set_nonblocking>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
mov    -0x8(%rbp),%edi
mov    0x2eab(%rip),%rax
mov    (%rax),%esi
xor    %edx,%edx
call   1030 <fcntl@plt>
mov    %eax,-0xc(%rbp)
cmpl   $0xffffffff,-0xc(%rbp)
jne    1147 <set_nonblocking+0x37>
movl   $0xffffffff,-0x4(%rbp)
jmp    1167 <set_nonblocking+0x57>
mov    -0x8(%rbp),%edi
mov    0x2e87(%rip),%rax
mov    (%rax),%esi
mov    -0xc(%rbp),%edx
mov    0x2e8b(%rip),%rax
or     (%rax),%edx
call   1030 <fcntl@plt>
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<set_nonblocking>:
push   %rbx
mov    %edi,%ebx
mov    0x2eb6(%rip),%rax
mov    (%rax),%esi
xor    %edx,%edx
call   1030 <fcntl@plt>
cmp    $0xffffffff,%eax
je     1144 <set_nonblocking+0x34>
mov    0x2ea9(%rip),%rcx
mov    (%rcx),%esi
mov    0x2eb0(%rip),%rcx
or     (%rcx),%eax
mov    %ebx,%edi
mov    %eax,%edx
pop    %rbx
jmp    1030 <fcntl@plt>
mov    $0xffffffff,%eax
pop    %rbx
ret

LLVM IR (-O0):
@F_GETFL = global i32 0
@F_SETFL = global i32 0
@O_NONBLOCK = global i32 0
define i32 @set_nonblocking(i32 %0) {
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %3
%5 = load i32, i32* %3
%6 = load i32, i32* @F_GETFL
%7 = call i32 @fcntl(i32 %5, i32 %6, i32 0)
store i32 %7, i32* %4
%8 = load i32, i32* %4
%9 = icmp eq i32 %8, -1
br i1 %9, label %10, label %11
10: ; preds = %1
store i32 -1, i32* %2
br label %18
11: ; preds = %1
%12 = load i32, i32* %3
%13 = load i32, i32* @F_SETFL
%14 = load i32, i32* %4
%15 = load i32, i32* @O_NONBLOCK
%16 = or i32 %14, %15
%17 = call i32 @fcntl(i32 %12, i32 %13, i32 %16)
store i32 %17, i32* %2
br label %18
18: ; preds = %11, %10
%19 = load i32, i32* %2
ret i32 %19
}

LLVM IR (-O2):
@F_GETFL = global i32 0
@F_SETFL = global i32 0
@O_NONBLOCK = global i32 0
define i32 @set_nonblocking(i32 %0) {
%2 = load i32, i32* @F_GETFL
%3 = tail call i32 @fcntl(i32 %0, i32 %2, i32 0)
%4 = icmp eq i32 %3, -1
br i1 %4, label %10, label %5
5: ; preds = %1
%6 = load i32, i32* @F_SETFL
%7 = load i32, i32* @O_NONBLOCK
%8 = or i32 %7, %3
%9 = tail call i32 @fcntl(i32 %0, i32 %6, i32 %8)
br label %10
10: ; preds = %1, %5
%11 = phi i32 [ %9, %5 ], [ -1, %1 ]
ret i32 %11
}
/* Variables and functions */
int /*<<< orphan*/ func5();
int /*<<< orphan*/ printf(char *);
int main(void) {
  printf("Hello from subdir2/subdir3/subdir4/subdir5/prog5.c\n");
  func5();
  return 0;
}


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

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

LLVM IR (-O0):
@.str = [52 x i8] c"Hello from subdir2/subdir3/subdir4/subdir5/prog5.c\0A\00"
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 @printf(i8* getelementptr inbounds ([52 x i8], [52 x i8]* @.str, i64 0, i64 0))
%3 = call i32 (...) @func5()
ret i32 0
}

LLVM IR (-O2):
@str = [51 x i8] c"Hello from subdir2/subdir3/subdir4/subdir5/prog5.c\00"
define i32 @main() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([51 x i8], [51 x i8]* @str, i64 0, i64 0))
%2 = tail call i32 (...) @func5()
ret i32 0
}
int foo(int *x, int y) {
  int *__restrict p1 = x;
  int *__restrict p2 = x + 32;
  p1[y] = 1;
  p2[4] = 2;
  return p1[y];
}


x86 assembly (clang, -O0):
<foo>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x8(%rbp),%rax
add    $0x80,%rax
mov    %rax,-0x20(%rbp)
mov    -0x18(%rbp),%rax
movslq -0xc(%rbp),%rcx
movl   $0x1,(%rax,%rcx,4)
mov    -0x20(%rbp),%rax
movl   $0x2,0x10(%rax)
mov    -0x18(%rbp),%rax
movslq -0xc(%rbp),%rcx
mov    (%rax,%rcx,4),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<foo>:
movslq %esi,%rax
movl   $0x1,(%rdi,%rax,4)
movl   $0x2,0x90(%rdi)
mov    (%rdi,%rax,4),%eax
ret

LLVM IR (-O0):
define i32 @foo(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** %3
store i32* %7, i32** %5
%8 = load i32*, i32** %3
%9 = getelementptr inbounds i32, i32* %8, i64 32
store i32* %9, i32** %6
%10 = load i32*, i32** %5
%11 = load i32, i32* %4
%12 = sext i32 %11 to i64
%13 = getelementptr inbounds i32, i32* %10, i64 %12
store i32 1, i32* %13
%14 = load i32*, i32** %6
%15 = getelementptr inbounds i32, i32* %14, i64 4
store i32 2, i32* %15
%16 = load i32*, i32** %5
%17 = load i32, i32* %4
%18 = sext i32 %17 to i64
%19 = getelementptr inbounds i32, i32* %16, i64 %18
%20 = load i32, i32* %19
ret i32 %20
}

LLVM IR (-O2):
define i32 @foo(i32* nocapture %0, i32 %1) {
%3 = sext i32 %1 to i64
%4 = getelementptr inbounds i32, i32* %0, i64 %3
store i32 1, i32* %4
%5 = getelementptr inbounds i32, i32* %0, i64 36
store i32 2, i32* %5
%6 = load i32, i32* %4
ret i32 %6
}
int isgraph(int c) { return (c >= '!' && c <= '~') || (c > 0x7f); }


x86 assembly (clang, -O0):
<isgraph>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
cmpl   $0x21,-0x4(%rbp)
jl     1120 <isgraph+0x20>
mov    $0x1,%al
cmpl   $0x7e,-0x4(%rbp)
mov    %al,-0x5(%rbp)
jle    112a <isgraph+0x2a>
cmpl   $0x7f,-0x4(%rbp)
setg   %al
mov    %al,-0x5(%rbp)
mov    -0x5(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<isgraph>:
lea    -0x21(%rdi),%eax
cmp    $0x5e,%eax
setb   %al
cmp    $0x7f,%edi
setg   %cl
or     %al,%cl
movzbl %cl,%eax
ret

LLVM IR (-O0):
define i32 @isgraph(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = icmp sge i32 %3, 33
br i1 %4, label %5, label %8
5: ; preds = %1
%6 = load i32, i32* %2
%7 = icmp sle i32 %6, 126
br i1 %7, label %11, label %8
8: ; preds = %5, %1
%9 = load i32, i32* %2
%10 = icmp sgt i32 %9, 127
br label %11
11: ; preds = %8, %5
%12 = phi i1 [ true, %5 ], [ %10, %8 ]
%13 = zext i1 %12 to i32
ret i32 %13
}

LLVM IR (-O2):
define i32 @isgraph(i32 %0) {
%2 = add i32 %0, -33
%3 = icmp ult i32 %2, 94
%4 = icmp sgt i32 %0, 127
%5 = or i1 %4, %3
%6 = zext i1 %5 to i32
ret i32 %6
}
/* Variables and functions */
int enddata(char *, int);
int adddata(char *buff, int p, char d) {
  if ((p & 63) == 0) {
    p += 1;
  }
  buff[p] = d;
  if ((p & 63) == 63)
    p = enddata(buff, p);
  else
    p++;
  return p;
}


x86 assembly (clang, -O0):
<adddata>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %dl,%al
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %al,-0xd(%rbp)
mov    -0xc(%rbp),%eax
and    $0x3f,%eax
cmp    $0x0,%eax
jne    113c <adddata+0x2c>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
mov    -0xd(%rbp),%dl
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
mov    %dl,(%rax,%rcx,1)
mov    -0xc(%rbp),%eax
and    $0x3f,%eax
cmp    $0x3f,%eax
jne    116d <adddata+0x5d>
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
call   1030 <enddata@plt>
mov    %eax,-0xc(%rbp)
jmp    1176 <adddata+0x66>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<adddata>:
mov    %esi,%eax
and    $0x3f,%eax
cmp    $0x1,%eax
adc    $0x0,%esi
movslq %esi,%rax
mov    %dl,(%rdi,%rax,1)
not    %eax
test   $0x3f,%al
jne    112c <adddata+0x1c>
jmp    1030 <enddata@plt>
add    $0x1,%esi
mov    %esi,%eax
ret

LLVM IR (-O0):
define i32 @adddata(i8* %0, i32 %1, i8 signext %2) {
%4 = alloca i8*
%5 = alloca i32
%6 = alloca i8
store i8* %0, i8** %4
store i32 %1, i32* %5
store i8 %2, i8* %6
%7 = load i32, i32* %5
%8 = and i32 %7, 63
%9 = icmp eq i32 %8, 0
br i1 %9, label %10, label %13
10: ; preds = %3
%11 = load i32, i32* %5
%12 = add nsw i32 %11, 1
store i32 %12, i32* %5
br label %13
13: ; preds = %10, %3
%14 = load i8, i8* %6
%15 = load i8*, i8** %4
%16 = load i32, i32* %5
%17 = sext i32 %16 to i64
%18 = getelementptr inbounds i8, i8* %15, i64 %17
store i8 %14, i8* %18
%19 = load i32, i32* %5
%20 = and i32 %19, 63
%21 = icmp eq i32 %20, 63
br i1 %21, label %22, label %26
22: ; preds = %13
%23 = load i8*, i8** %4
%24 = load i32, i32* %5
%25 = call i32 @enddata(i8* %23, i32 %24)
store i32 %25, i32* %5
br label %29
26: ; preds = %13
%27 = load i32, i32* %5
%28 = add nsw i32 %27, 1
store i32 %28, i32* %5
br label %29
29: ; preds = %26, %22
%30 = load i32, i32* %5
ret i32 %30
}

LLVM IR (-O2):
define i32 @adddata(i8* %0, i32 %1, i8 signext %2) {
%4 = and i32 %1, 63
%5 = icmp eq i32 %4, 0
%6 = zext i1 %5 to i32
%7 = add nsw i32 %6, %1
%8 = sext i32 %7 to i64
%9 = getelementptr inbounds i8, i8* %0, i64 %8
store i8 %2, i8* %9
%10 = and i32 %7, 63
%11 = icmp eq i32 %10, 63
br i1 %11, label %12, label %14
12: ; preds = %3
%13 = tail call i32 @enddata(i8* %0, i32 %7)
br label %16
14: ; preds = %3
%15 = add nsw i32 %7, 1
br label %16
16: ; preds = %14, %12
%17 = phi i32 [ %13, %12 ], [ %15, %14 ]
ret i32 %17
}
/* Variables and functions */
int S_ISREG(int);
int st_is_file(int st_mode) { return S_ISREG(st_mode); }


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

x86 assembly (clang, -O2):
<st_is_file>:
jmp    1030 <S_ISREG@plt>

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

LLVM IR (-O2):
define i32 @st_is_file(i32 %0) {
%2 = tail call i32 @S_ISREG(i32 %0)
ret i32 %2
}
/* Variables and functions */
int /*<<< orphan*/ wdctl_command(int);
void wdctl_del_trusted_maclist() { wdctl_command(26); }


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

x86 assembly (clang, -O2):
<wdctl_del_trusted_maclist>:
mov    $0x1a,%edi
jmp    1030 <wdctl_command@plt>

LLVM IR (-O0):
define void @wdctl_del_trusted_maclist() {
%1 = call i32 @wdctl_command(i32 26)
ret void
}

LLVM IR (-O2):
define void @wdctl_del_trusted_maclist() {
%1 = tail call i32 @wdctl_command(i32 26)
ret void
}
int get_mapping_size() { return 16; }


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

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

LLVM IR (-O0):
define i32 @get_mapping_size() {
ret i32 16
}

LLVM IR (-O2):
define i32 @get_mapping_size() {
ret i32 16
}