xunge/DecIR huggingface dataset:
/* Type definitions */
struct sockaddr_un {
  int /*<<< orphan*/ sun_path;
  int /*<<< orphan*/ sun_family;
};

/* Variables and functions */
int /*<<< orphan*/ AF_LOCAL;
int /*<<< orphan*/ memset(struct sockaddr_un *, char, int);
int /*<<< orphan*/ strcpy(int /*<<< orphan*/, char const *);
void prepare_ifsun(struct sockaddr_un *ifsun, const char *path) {
  memset(ifsun, '\0', sizeof(*ifsun));
  ifsun->sun_family = AF_LOCAL;
  strcpy(ifsun->sun_path, path);
}


x86 assembly (clang, -O0):
<prepare_ifsun>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
xor    %esi,%esi
mov    $0x8,%edx
call   1040 <memset@plt>
mov    0x2ea1(%rip),%rax
mov    (%rax),%ecx
mov    -0x8(%rbp),%rax
mov    %ecx,0x4(%rax)
mov    -0x8(%rbp),%rax
mov    (%rax),%edi
mov    -0x10(%rbp),%rsi
call   1030 <strcpy@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<prepare_ifsun>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%r14
mov    %rdi,%rbx
xor    %esi,%esi
mov    $0x8,%edx
call   1040 <memset@plt>
mov    0x2eab(%rip),%rax
mov    (%rax),%eax
mov    %eax,0x4(%rbx)
mov    (%rbx),%edi
mov    %r14,%rsi
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1030 <strcpy@plt>

LLVM IR (-O0):
%struct.sockaddr_un = type { i32, i32 }
@AF_LOCAL = global i32 0
define void @prepare_ifsun(%struct.sockaddr_un* %0, i8* %1) {
%3 = alloca %struct.sockaddr_un*
%4 = alloca i8*
store %struct.sockaddr_un* %0, %struct.sockaddr_un** %3
store i8* %1, i8** %4
%5 = load %struct.sockaddr_un*, %struct.sockaddr_un** %3
%6 = call i32 @memset(%struct.sockaddr_un* %5, i8 signext 0, i32 8)
%7 = load i32, i32* @AF_LOCAL
%8 = load %struct.sockaddr_un*, %struct.sockaddr_un** %3
%9 = getelementptr inbounds %struct.sockaddr_un, %struct.sockaddr_un* %8, i32 0, i32 1
store i32 %7, i32* %9
%10 = load %struct.sockaddr_un*, %struct.sockaddr_un** %3
%11 = getelementptr inbounds %struct.sockaddr_un, %struct.sockaddr_un* %10, i32 0, i32 0
%12 = load i32, i32* %11
%13 = load i8*, i8** %4
%14 = call i32 @strcpy(i32 %12, i8* %13)
ret void
}

LLVM IR (-O2):
%struct.sockaddr_un = type { i32, i32 }
@AF_LOCAL = global i32 0
define void @prepare_ifsun(%struct.sockaddr_un* %0, i8* %1) {
%3 = tail call i32 @memset(%struct.sockaddr_un* %0, i8 signext 0, i32 8)
%4 = load i32, i32* @AF_LOCAL
%5 = getelementptr inbounds %struct.sockaddr_un, %struct.sockaddr_un* %0, i64 0, i32 1
store i32 %4, i32* %5
%6 = getelementptr inbounds %struct.sockaddr_un, %struct.sockaddr_un* %0, i64 0, i32 0
%7 = load i32, i32* %6
%8 = tail call i32 @strcpy(i32 %7, i8* %1)
ret void
}
/* Variables and functions */
scalar_t__ isspace(char);
char *trim_left(char *szString) {
  unsigned int i = 0;
  while (isspace(szString[i++]))
    ;
  return &szString[i - 1];
}


x86 assembly (clang, -O0):
<trim_left>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
mov    -0x8(%rbp),%rax
mov    -0xc(%rbp),%ecx
mov    %ecx,%edx
add    $0x1,%edx
mov    %edx,-0xc(%rbp)
mov    %ecx,%ecx
movsbl (%rax,%rcx,1),%edi
call   1030 <isspace@plt>
cmp    $0x0,%rax
je     114c <trim_left+0x3c>
jmp    1123 <trim_left+0x13>
mov    -0x8(%rbp),%rax
mov    -0xc(%rbp),%ecx
sub    $0x1,%ecx
mov    %ecx,%ecx
add    %rcx,%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<trim_left>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%r14
mov    $0xffffffff,%ebx
nopl   0x0(%rax)
add    $0x1,%ebx
movsbl (%r14,%rbx,1),%edi
call   1030 <isspace@plt>
test   %rax,%rax
jne    1120 <trim_left+0x10>
mov    %ebx,%eax
add    %rax,%r14
mov    %r14,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

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

LLVM IR (-O2):
define i8* @trim_left(i8* %0) {
br label %2
2: ; preds = %2, %1
%3 = phi i32 [ 0, %1 ], [ %4, %2 ]
%4 = add i32 %3, 1
%5 = zext i32 %3 to i64
%6 = getelementptr inbounds i8, i8* %0, i64 %5
%7 = load i8, i8* %6
%8 = tail call i64 @isspace(i8 signext %7)
%9 = icmp eq i64 %8, 0
br i1 %9, label %10, label %2
10: ; preds = %2
%11 = zext i32 %3 to i64
%12 = getelementptr inbounds i8, i8* %0, i64 %11
ret i8* %12
}
void test1_ok(int x) {
  int buf[100];
  buf[99] = 1;
}


x86 assembly (clang, -O0):
<test1_ok>:
push   %rbp
mov    %rsp,%rbp
sub    $0x120,%rsp
mov    %edi,-0x4(%rbp)
movl   $0x1,-0x14(%rbp)
add    $0x120,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
define void @test1_ok(i32 %0) {
%2 = alloca i32
%3 = alloca [100 x i32]
store i32 %0, i32* %2
%4 = getelementptr inbounds [100 x i32], [100 x i32]* %3, i64 0, i64 99
store i32 1, i32* %4
ret void
}

LLVM IR (-O2):
define void @test1_ok(i32 %0) {
ret void
}
void RTAvlU32Destroy(void) {}


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

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

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

LLVM IR (-O2):
define void @RTAvlU32Destroy() {
ret void
}
/* Variables and functions */
char *malloc(scalar_t__);
int /*<<< orphan*/ strcpy(char *, char const *);
scalar_t__ strlen(char const *);
int option_read_string(void *out, const char *in) {
  char **out_char = out;
  *out_char = malloc(strlen(in) + 1);
  strcpy(*out_char, in);
  return 0;
}


x86 assembly (clang, -O0):
<option_read_string>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x10(%rbp),%rdi
call   1040 <strlen@plt>
mov    %rax,%rdi
add    $0x1,%rdi
call   1050 <malloc@plt>
mov    %rax,%rcx
mov    -0x18(%rbp),%rax
mov    %rcx,(%rax)
mov    -0x18(%rbp),%rax
mov    (%rax),%rdi
mov    -0x10(%rbp),%rsi
call   1030 <strcpy@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<option_read_string>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%rbx
mov    %rdi,%r14
mov    %rsi,%rdi
call   1040 <strlen@plt>
lea    0x1(%rax),%rdi
call   1050 <malloc@plt>
mov    %rax,(%r14)
mov    %rax,%rdi
mov    %rbx,%rsi
call   1030 <strcpy@plt>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define i32 @option_read_string(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
%5 = alloca i8**
store i8* %0, i8** %3
store i8* %1, i8** %4
%6 = load i8*, i8** %3
%7 = bitcast i8* %6 to i8**
store i8** %7, i8*** %5
%8 = load i8*, i8** %4
%9 = call i64 @strlen(i8* %8)
%10 = add nsw i64 %9, 1
%11 = call i8* @malloc(i64 %10)
%12 = load i8**, i8*** %5
store i8* %11, i8** %12
%13 = load i8**, i8*** %5
%14 = load i8*, i8** %13
%15 = load i8*, i8** %4
%16 = call i32 @strcpy(i8* %14, i8* %15)
ret i32 0
}

LLVM IR (-O2):
define i32 @option_read_string(i8* nocapture writeonly %0, i8* %1) {
%3 = bitcast i8* %0 to i8**
%4 = tail call i64 @strlen(i8* dereferenceable(1) %1)
%5 = add nsw i64 %4, 1
%6 = tail call i8* @malloc(i64 %5)
store i8* %6, i8** %3
%7 = tail call i32 @strcpy(i8* %6, i8* %1)
ret i32 0
}
void XkbFreeIndicatorMaps() {}


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

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

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

LLVM IR (-O2):
define void @XkbFreeIndicatorMaps() {
ret void
}
void TransformComponent_update(void *_self) {
  if (!_self)
    return;
}


x86 assembly (clang, -O0):
<TransformComponent_update>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
cmpq   $0x0,-0x8(%rbp)
jne    1118 <TransformComponent_update+0x18>
jmp    1118 <TransformComponent_update+0x18>
pop    %rbp
ret

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

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

LLVM IR (-O2):
define void @TransformComponent_update(i8* nocapture %0) {
ret void
}
void dump_stack_symbols_to_error_fds(void) {}


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

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

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

LLVM IR (-O2):
define void @dump_stack_symbols_to_error_fds() {
ret void
}
int test_imm_A8int64_midword_mem(long long *val) {
  return ((*val >> 16) & (0xA8 << 0)) ? -20 : -40;
}


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

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

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

LLVM IR (-O2):
define i32 @test_imm_A8int64_midword_mem(i64* nocapture %0) {
%2 = load i64, i64* %0
%3 = and i64 %2, 11010048
%4 = icmp eq i64 %3, 0
%5 = select i1 %4, i32 -40, i32 -20
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ free(int *);
void free_1d_int(int *i) { free(i); }


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

x86 assembly (clang, -O2):
<free_1d_int>:
jmp    1030 <free@plt>

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

LLVM IR (-O2):
define void @free_1d_int(i32* nocapture %0) {
%2 = tail call i32 @free(i32* %0)
ret void
}
/* Type definitions */
struct dpaa2_dq {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ qbman_result_is_DQ(struct dpaa2_dq const *);
int qbman_result_is_SCN(const struct dpaa2_dq *dq) {
  return !qbman_result_is_DQ(dq);
}


x86 assembly (clang, -O0):
<qbman_result_is_SCN>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <qbman_result_is_DQ@plt>
cmp    $0x0,%eax
setne  %al
xor    $0xff,%al
and    $0x1,%al
movzbl %al,%eax
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
%struct.dpaa2_dq = type { i32 }
define i32 @qbman_result_is_SCN(%struct.dpaa2_dq* %0) {
%2 = alloca %struct.dpaa2_dq*
store %struct.dpaa2_dq* %0, %struct.dpaa2_dq** %2
%3 = load %struct.dpaa2_dq*, %struct.dpaa2_dq** %2
%4 = call i32 @qbman_result_is_DQ(%struct.dpaa2_dq* %3)
%5 = icmp ne i32 %4, 0
%6 = xor i1 %5, true
%7 = zext i1 %6 to i32
ret i32 %7
}

LLVM IR (-O2):
%struct.dpaa2_dq = type { i32 }
define i32 @qbman_result_is_SCN(%struct.dpaa2_dq* %0) {
%2 = tail call i32 @qbman_result_is_DQ(%struct.dpaa2_dq* %0)
%3 = icmp eq i32 %2, 0
%4 = zext i1 %3 to i32
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ eprintf(char *, char *, int, size_t);
void *realloc(void *, size_t);
void *erealloc(void *ptr, size_t n) {
  void *p;
  p = realloc(ptr, n);
  if (p == NULL)
    eprintf("realloc of %u bytes failed:",
            "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
            "2022-01-22/02-19-57/repos/9fcc/check/refs/heads/master/src/"
            "check_error.c",
            74 - 2, n);
  return p;
}


x86 assembly (clang, -O0):
<erealloc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1040 <realloc@plt>
mov    %rax,-0x18(%rbp)
cmpq   $0x0,-0x18(%rbp)
jne    1168 <erealloc+0x48>
mov    -0x10(%rbp),%rcx
lea    0xea9(%rip),%rdi
lea    0xebe(%rip),%rsi
mov    $0x48,%edx
call   1030 <eprintf@plt>
mov    -0x18(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<erealloc>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%r14
call   1040 <realloc@plt>
mov    %rax,%rbx
test   %rax,%rax
jne    114f <erealloc+0x2f>
lea    0xec5(%rip),%rdi
lea    0xeda(%rip),%rsi
mov    $0x48,%edx
mov    %r14,%rcx
call   1030 <eprintf@plt>
mov    %rbx,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@.str = [28 x i8] c"realloc of %u bytes failed:\00"
@.str.1 = [137 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/9fcc/check/refs/heads/master/src/check_error.c\00"
define i8* @erealloc(i8* %0, i64 %1) {
%3 = alloca i8*
%4 = alloca i64
%5 = alloca i8*
store i8* %0, i8** %3
store i64 %1, i64* %4
%6 = load i8*, i8** %3
%7 = load i64, i64* %4
%8 = call i8* @realloc(i8* %6, i64 %7)
store i8* %8, i8** %5
%9 = load i8*, i8** %5
%10 = icmp eq i8* %9, null
br i1 %10, label %11, label %14
11: ; preds = %2
%12 = load i64, i64* %4
%13 = call i32 @eprintf(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([137 x i8], [137 x i8]* @.str.1, i64 0, i64 0), i32 72, i64 %12)
br label %14
14: ; preds = %11, %2
%15 = load i8*, i8** %5
ret i8* %15
}

LLVM IR (-O2):
@.str = [28 x i8] c"realloc of %u bytes failed:\00"
@.str.1 = [137 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/9fcc/check/refs/heads/master/src/check_error.c\00"
define noalias i8* @erealloc(i8* nocapture %0, i64 %1) {
%3 = tail call i8* @realloc(i8* %0, i64 %1)
%4 = icmp eq i8* %3, null
br i1 %4, label %5, label %7
5: ; preds = %2
%6 = tail call i32 @eprintf(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([137 x i8], [137 x i8]* @.str.1, i64 0, i64 0), i32 72, i64 %1)
br label %7
7: ; preds = %5, %2
ret i8* %3
}
void debugprintf(const char *fmt, ...) {}


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

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

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

LLVM IR (-O2):
define void @debugprintf(i8* nocapture %0, ...) {
ret void
}
/* Variables and functions */
int cmp_int_inv(const void *_a, const void *_b) {
  int a = *(int *)_a, b = *(int *)_b;
  if (a < b) {
    return +1;
  } else if (a > b) {
    return -1;
  }
  return 0;
}


x86 assembly (clang, -O0):
<cmp_int_inv>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    -0x10(%rbp),%rax
mov    (%rax),%eax
mov    %eax,-0x1c(%rbp)
mov    -0x18(%rbp),%rax
mov    (%rax),%eax
mov    %eax,-0x20(%rbp)
mov    -0x1c(%rbp),%eax
cmp    -0x20(%rbp),%eax
jge    1136 <cmp_int_inv+0x36>
movl   $0x1,-0x4(%rbp)
jmp    115a <cmp_int_inv+0x5a>
mov    -0x1c(%rbp),%eax
cmp    -0x20(%rbp),%eax
jle    114e <cmp_int_inv+0x4e>
movl   $0xffffffff,-0x4(%rbp)
jmp    115a <cmp_int_inv+0x5a>
jmp    1153 <cmp_int_inv+0x53>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<cmp_int_inv>:
mov    (%rdi),%eax
mov    (%rsi),%ecx
xor    %edx,%edx
cmp    %ecx,%eax
setg   %dl
neg    %edx
cmp    %ecx,%eax
mov    $0x1,%eax
cmovge %edx,%eax
ret

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

LLVM IR (-O2):
define i32 @cmp_int_inv(i8* nocapture %0, i8* nocapture %1) {
%3 = bitcast i8* %0 to i32*
%4 = load i32, i32* %3
%5 = bitcast i8* %1 to i32*
%6 = load i32, i32* %5
%7 = icmp slt i32 %4, %6
%8 = icmp sgt i32 %4, %6
%9 = sext i1 %8 to i32
%10 = select i1 %7, i32 1, i32 %9
ret i32 %10
}
/* Variables and functions */
int /*<<< orphan*/ fputs(char *, int /*<<< orphan*/);
int /*<<< orphan*/ stderr;
int _usage(void) {
  fputs("Usage: "
        "printf"
        " format [argument...]\n",
        stderr);
  return 1;
}


x86 assembly (clang, -O0):
<_usage>:
push   %rbp
mov    %rsp,%rbp
mov    0x2ec5(%rip),%rax
mov    (%rax),%esi
lea    0xedc(%rip),%rdi
call   1030 <fputs@plt>
mov    $0x1,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<_usage>:
push   %rax
mov    0x2ec8(%rip),%rax
mov    (%rax),%esi
lea    0xedf(%rip),%rdi
call   1030 <fputs@plt>
mov    $0x1,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [36 x i8] c"Usage: printf format [argument...]\0A\00"
@stderr = global i32 0
define i32 @_usage() {
%1 = load i32, i32* @stderr
%2 = call i32 @fputs(i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str, i64 0, i64 0), i32 %1)
ret i32 1
}

LLVM IR (-O2):
@.str = [36 x i8] c"Usage: printf format [argument...]\0A\00"
@stderr = global i32 0
define i32 @_usage() {
%1 = load i32, i32* @stderr
%2 = tail call i32 @fputs(i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str, i64 0, i64 0), i32 %1)
ret i32 1
}
void element2ANY() {}


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

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

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

LLVM IR (-O2):
define void @element2ANY() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ emit(char *);
void force_context_switch(void) {
  emit("sub edi,[__cycles_needed]\n");
  emit("mov dword[__cycles_needed],0\n");
}


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

x86 assembly (clang, -O2):
<force_context_switch>:
push   %rax
lea    0xee8(%rip),%rdi
call   1030 <emit@plt>
lea    0xef7(%rip),%rdi
pop    %rax
jmp    1030 <emit@plt>

LLVM IR (-O0):
@.str = [27 x i8] c"sub edi,[__cycles_needed]\0A\00"
@.str.1 = [30 x i8] c"mov dword[__cycles_needed],0\0A\00"
define void @force_context_switch() {
%1 = call i32 @emit(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str, i64 0, i64 0))
%2 = call i32 @emit(i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [27 x i8] c"sub edi,[__cycles_needed]\0A\00"
@.str.1 = [30 x i8] c"mov dword[__cycles_needed],0\0A\00"
define void @force_context_switch() {
%1 = tail call i32 @emit(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str, i64 0, i64 0))
%2 = tail call i32 @emit(i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.1, i64 0, i64 0))
ret void
}
unsigned kol_system_end(unsigned param) {
  asm volatile("int $0x40" ::"a"(18), "b"(9), "c"(param));
}


x86 assembly (clang, -O0):
<kol_system_end>:
push   %rbp
mov    %rsp,%rbp
push   %rbx
mov    %edi,-0x10(%rbp)
mov    -0x10(%rbp),%ecx
mov    $0x12,%eax
mov    $0x9,%ebx
int    $0x40
mov    -0xc(%rbp),%eax
pop    %rbx
pop    %rbp
ret

x86 assembly (clang, -O2):
<kol_system_end>:
push   %rbx
mov    %edi,%ecx
mov    $0x12,%eax
mov    $0x9,%ebx
int    $0x40
pop    %rbx
ret

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

LLVM IR (-O2):
define i32 @kol_system_end(i32 %0) {
tail call void asm sideeffect "int $$0x40", "{ax},{bx},{cx},~{dirflag},~{fpsr},~{flags}"(i32 18, i32 9, i32 %0)
ret i32 undef
}
/* Type definitions */
typedef int /*<<< orphan*/ pthread_mutex_t;

/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ perror(char *);
scalar_t__ pthread_mutex_lock(int /*<<< orphan*/ *);
void spin_lock(pthread_mutex_t *lp) {
  if (pthread_mutex_lock(lp) != 0) {
    perror("pthread_mutex_lock");
    exit(-1);
  }
}


x86 assembly (clang, -O0):
<spin_lock>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1050 <pthread_mutex_lock@plt>
cmp    $0x0,%rax
je     1165 <spin_lock+0x35>
lea    0xeaa(%rip),%rdi
call   1030 <perror@plt>
mov    $0xffffffff,%edi
call   1040 <exit@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<spin_lock>:
push   %rax
call   1050 <pthread_mutex_lock@plt>
test   %rax,%rax
jne    113d <spin_lock+0xd>
pop    %rax
ret
lea    0xebc(%rip),%rdi
call   1030 <perror@plt>
mov    $0xffffffff,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@.str = [19 x i8] c"pthread_mutex_lock\00"
define void @spin_lock(i32* %0) {
%2 = alloca i32*
store i32* %0, i32** %2
%3 = load i32*, i32** %2
%4 = call i64 @pthread_mutex_lock(i32* %3)
%5 = icmp ne i64 %4, 0
br i1 %5, label %6, label %9
6: ; preds = %1
%7 = call i32 @perror(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0))
%8 = call i32 @exit(i32 -1)
unreachable
9: ; preds = %1
ret void
}

LLVM IR (-O2):
@.str = [19 x i8] c"pthread_mutex_lock\00"
define void @spin_lock(i32* %0) {
%2 = tail call i64 @pthread_mutex_lock(i32* %0)
%3 = icmp eq i64 %2, 0
br i1 %3, label %7, label %4
4: ; preds = %1
%5 = tail call i32 @perror(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0))
%6 = tail call i32 @exit(i32 -1)
unreachable
7: ; preds = %1
ret void
}
void SteamAPI_ISteamUser_EndAuthSession(void *self) {
  xlogf("%s(self = %p)\n", __func__, self);
}


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

x86 assembly (clang, -O2):
<SteamAPI_ISteamUser_EndAuthSession>:
mov    %rdi,%rdx
lea    0xee6(%rip),%rdi
lea    0xeee(%rip),%rsi
xor    %eax,%eax
jmp    1030 <xlogf@plt>

LLVM IR (-O0):
@.str = [15 x i8] c"%s(self = %p)\0A\00"
@__func__.SteamAPI_ISteamUser_EndAuthSession = [35 x i8] c"SteamAPI_ISteamUser_EndAuthSession\00"
define void @SteamAPI_ISteamUser_EndAuthSession(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 (i8*, i8*, i8*, ...) bitcast (i32 (...)* @xlogf to i32 (i8*, i8*, i8*, ...)*)(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([35 x i8], [35 x i8]* @__func__.SteamAPI_ISteamUser_EndAuthSession, i64 0, i64 0), i8* %3)
ret void
}

LLVM IR (-O2):
@.str = [15 x i8] c"%s(self = %p)\0A\00"
@__func__.SteamAPI_ISteamUser_EndAuthSession = [35 x i8] c"SteamAPI_ISteamUser_EndAuthSession\00"
define void @SteamAPI_ISteamUser_EndAuthSession(i8* %0) {
%2 = tail call i32 (i8*, i8*, i8*, ...) bitcast (i32 (...)* @xlogf to i32 (i8*, i8*, i8*, ...)*)(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([35 x i8], [35 x i8]* @__func__.SteamAPI_ISteamUser_EndAuthSession, i64 0, i64 0), i8* %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ clear_screen();
int /*<<< orphan*/ cursor(int /*<<< orphan*/, int /*<<< orphan*/);
int /*<<< orphan*/ main_screen();
int /*<<< orphan*/ printf(char *);
int main(void) {
  main_screen();
  clear_screen();
  cursor(0, 0);
  printf("Thanks for playing tmaze! :)\n");
  return 0;
}


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

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1040 <main_screen@plt>
xor    %eax,%eax
call   1060 <clear_screen@plt>
xor    %edi,%edi
xor    %esi,%esi
call   1050 <cursor@plt>
lea    0xea1(%rip),%rdi
call   1030 <puts@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [30 x i8] c"Thanks for playing tmaze! :)\0A\00"
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 (...) @main_screen()
%3 = call i32 (...) @clear_screen()
%4 = call i32 @cursor(i32 0, i32 0)
%5 = call i32 @printf(i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@str = [29 x i8] c"Thanks for playing tmaze! :)\00"
define i32 @main() {
%1 = tail call i32 (...) @main_screen()
%2 = tail call i32 (...) @clear_screen()
%3 = tail call i32 @cursor(i32 0, i32 0)
%4 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([29 x i8], [29 x i8]* @str, i64 0, i64 0))
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ __spim_print_char(char);
void print_hex(unsigned n) {
  if (n >= 16)
    print_hex(n / 16);
  __spim_print_char("0123456789ABCDEF"[n % 16]);
}


x86 assembly (clang, -O0):
<print_hex>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
cmpl   $0x10,-0x4(%rbp)
jb     1140 <print_hex+0x20>
mov    -0x4(%rbp),%edi
shr    $0x4,%edi
call   1040 <print_hex@plt>
mov    -0x4(%rbp),%eax
and    $0xf,%eax
mov    %eax,%eax
mov    %eax,%ecx
lea    0xeaf(%rip),%rax
movsbl (%rax,%rcx,1),%edi
call   1030 <__spim_print_char@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<print_hex>:
push   %rbx
mov    %edi,%ebx
cmp    $0x10,%edi
jb     1132 <print_hex+0x12>
mov    %ebx,%edi
shr    $0x4,%edi
call   1040 <print_hex@plt>
and    $0xf,%ebx
lea    0xec4(%rip),%rax
movsbl (%rbx,%rax,1),%edi
pop    %rbx
jmp    1030 <__spim_print_char@plt>

LLVM IR (-O0):
@.str = [17 x i8] c"0123456789ABCDEF\00"
define void @print_hex(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = icmp uge i32 %3, 16
br i1 %4, label %5, label %8
5: ; preds = %1
%6 = load i32, i32* %2
%7 = udiv i32 %6, 16
br label %8
8: ; preds = %5, %1
%9 = load i32, i32* %2
%10 = urem i32 %9, 16
%11 = zext i32 %10 to i64
%12 = getelementptr inbounds [17 x i8], [17 x i8]* @.str, i64 0, i64 %11
%13 = load i8, i8* %12
%14 = call i32 @__spim_print_char(i8 signext %13)
ret void
}

LLVM IR (-O2):
@.str = [17 x i8] c"0123456789ABCDEF\00"
define void @print_hex(i32 %0) {
%2 = icmp ugt i32 %0, 15
br i1 %2, label %3, label %5
3: ; preds = %1
%4 = lshr i32 %0, 4
tail call void @print_hex(i32 %4)
br label %5
5: ; preds = %3, %1
%6 = and i32 %0, 15
%7 = zext i32 %6 to i64
%8 = getelementptr inbounds [17 x i8], [17 x i8]* @.str, i64 0, i64 %7
%9 = load i8, i8* %8
%10 = tail call i32 @__spim_print_char(i8 signext %9)
ret void
}
void XSetRGBColormaps() {}


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

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

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

LLVM IR (-O2):
define void @XSetRGBColormaps() {
ret void
}
/* Variables and functions */
int U_WMRCORENONE_get(char *);
int U_WMR93_get(void) { return U_WMRCORENONE_get("U_WMR93"); }


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

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

LLVM IR (-O0):
@.str = [8 x i8] c"U_WMR93\00"
define i32 @U_WMR93_get() {
%1 = call i32 @U_WMRCORENONE_get(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0))
ret i32 %1
}

LLVM IR (-O2):
@.str = [8 x i8] c"U_WMR93\00"
define i32 @U_WMR93_get() {
%1 = tail call i32 @U_WMRCORENONE_get(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0))
ret i32 %1
}
int registerfarbgidriver(int far) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @registerfarbgidriver(i32 %0) {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ HplMsp430GeneralIOP__25__IO__selectIOFunc();
void GpioCaptureC__0__GeneralIO__selectIOFunc(void) {
  HplMsp430GeneralIOP__25__IO__selectIOFunc();
}


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

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

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

LLVM IR (-O2):
define void @GpioCaptureC__0__GeneralIO__selectIOFunc() {
%1 = tail call i32 (...) @HplMsp430GeneralIOP__25__IO__selectIOFunc()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ do_it();
scalar_t__ last();
__attribute__((no, noclone)) void f3(void) {
  for (;; do_it())
    if (last())
      break;
  do_it();
}


x86 assembly (clang, -O0):
<f3>:
push   %rbp
mov    %rsp,%rbp
jmp    1129 <f3+0x9>
mov    $0x0,%al
call   1030 <last@plt>
cmp    $0x0,%rax
je     113f <f3+0x1f>
jmp    1150 <f3+0x30>
jmp    1144 <f3+0x24>
mov    $0x0,%al
call   1040 <do_it@plt>
jmp    1129 <f3+0x9>
mov    $0x0,%al
call   1040 <do_it@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<f3>:
push   %rax
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
xor    %eax,%eax
call   1030 <last@plt>
test   %rax,%rax
jne    1145 <f3+0x25>
xor    %eax,%eax
call   1040 <do_it@plt>
jmp    1130 <f3+0x10>
xor    %eax,%eax
pop    %rcx
jmp    1040 <do_it@plt>

LLVM IR (-O0):
define void @f3() {
br label %1
1: ; preds = %6, %0
%2 = call i64 (...) @last()
%3 = icmp ne i64 %2, 0
br i1 %3, label %4, label %5
4: ; preds = %1
br label %8
5: ; preds = %1
br label %6
6: ; preds = %5
%7 = call i32 (...) @do_it()
br label %1
8: ; preds = %4
%9 = call i32 (...) @do_it()
ret void
}

LLVM IR (-O2):
define void @f3() {
%1 = tail call i64 (...) @last()
%2 = icmp eq i64 %1, 0
br i1 %2, label %3, label %7
3: ; preds = %0, %3
%4 = tail call i32 (...) @do_it()
%5 = tail call i64 (...) @last()
%6 = icmp eq i64 %5, 0
br i1 %6, label %3, label %7
7: ; preds = %3, %0
%8 = tail call i32 (...) @do_it()
ret void
}
void drawOptions() {}


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

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

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

LLVM IR (-O2):
define void @drawOptions() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ isxdigit(int);
void t_isxdigit_0xb0() {
  Assert_real((isxdigit(176) == 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_isxdigit.c",
              885, ("isxdigit should be 0 for 0xb0"));
}


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

x86 assembly (clang, -O2):
<t_isxdigit_0xb0>:
push   %rax
mov    $0xb0,%edi
call   1030 <isxdigit@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf67(%rip),%rcx
mov    $0x375,%edx
pop    %rax
jmp    1040 <Assert_real@plt>

LLVM IR (-O0):
@.str = [169 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_isxdigit.c\00"
@.str.1 = [30 x i8] c"isxdigit should be 0 for 0xb0\00"
define void @t_isxdigit_0xb0() {
%1 = call i64 @isxdigit(i32 176)
%2 = icmp eq i64 %1, 0
%3 = zext i1 %2 to i32
%4 = call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([169 x i8], [169 x i8]* @.str, i64 0, i64 0), i32 885, i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [169 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_isxdigit.c\00"
@.str.1 = [30 x i8] c"isxdigit should be 0 for 0xb0\00"
define void @t_isxdigit_0xb0() {
%1 = tail call i64 @isxdigit(i32 176)
%2 = icmp eq i64 %1, 0
%3 = zext i1 %2 to i32
%4 = tail call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([169 x i8], [169 x i8]* @.str, i64 0, i64 0), i32 885, i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ emitln(char *);
int /*<<< orphan*/ factor();
int /*<<< orphan*/ match(char);
void divide() {
  match('/');
  factor();
  emitln("mov\t%%eax,%%ebx");
  emitln("pop\t%%eax");
  emitln("xor\t%%edx,%%edx");
  emitln("div\t%%ebx");
}


x86 assembly (clang, -O0):
<divide>:
push   %rbp
mov    %rsp,%rbp
mov    $0x2f,%edi
call   1040 <match@plt>
mov    $0x0,%al
call   1050 <factor@plt>
lea    0xeb4(%rip),%rdi
call   1030 <emitln@plt>
lea    0xeb8(%rip),%rdi
call   1030 <emitln@plt>
lea    0xeb6(%rip),%rdi
call   1030 <emitln@plt>
lea    0xeba(%rip),%rdi
call   1030 <emitln@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<divide>:
push   %rax
mov    $0x2f,%edi
call   1040 <match@plt>
xor    %eax,%eax
call   1050 <factor@plt>
lea    0xeb7(%rip),%rdi
call   1030 <emitln@plt>
lea    0xebb(%rip),%rdi
call   1030 <emitln@plt>
lea    0xeb9(%rip),%rdi
call   1030 <emitln@plt>
lea    0xebd(%rip),%rdi
pop    %rax
jmp    1030 <emitln@plt>

LLVM IR (-O0):
@.str = [16 x i8] c"mov\09%%eax,%%ebx\00"
@.str.1 = [10 x i8] c"pop\09%%eax\00"
@.str.2 = [16 x i8] c"xor\09%%edx,%%edx\00"
@.str.3 = [10 x i8] c"div\09%%ebx\00"
define void @divide() {
%1 = call i32 @match(i8 signext 47)
%2 = call i32 (...) @factor()
%3 = call i32 @emitln(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0))
%4 = call i32 @emitln(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.1, i64 0, i64 0))
%5 = call i32 @emitln(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.2, i64 0, i64 0))
%6 = call i32 @emitln(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.3, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [16 x i8] c"mov\09%%eax,%%ebx\00"
@.str.1 = [10 x i8] c"pop\09%%eax\00"
@.str.2 = [16 x i8] c"xor\09%%edx,%%edx\00"
@.str.3 = [10 x i8] c"div\09%%ebx\00"
define void @divide() {
%1 = tail call i32 @match(i8 signext 47)
%2 = tail call i32 (...) @factor()
%3 = tail call i32 @emitln(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0))
%4 = tail call i32 @emitln(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.1, i64 0, i64 0))
%5 = tail call i32 @emitln(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.2, i64 0, i64 0))
%6 = tail call i32 @emitln(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.3, i64 0, i64 0))
ret void
}
int test_imm_7Eint8_reg(signed char val) {
  return ((val) & (0x7E << 0)) ? -20 : -40;
}


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

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

LLVM IR (-O0):
define i32 @test_imm_7Eint8_reg(i8 signext %0) {
%2 = alloca i8
store i8 %0, i8* %2
%3 = load i8, i8* %2
%4 = sext i8 %3 to i32
%5 = and i32 %4, 126
%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_7Eint8_reg(i8 signext %0) {
%2 = and i8 %0, 126
%3 = icmp eq i8 %2, 0
%4 = select i1 %3, i32 -40, i32 -20
ret i32 %4
}
void __DELETE_java_lang_reflect_Constructor(void *me, void *client_data) {}


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

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

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

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

/* Variables and functions */
char *empty_string();
int /*<<< orphan*/ fclose(int /*<<< orphan*/ *);
int /*<<< orphan*/ *fopen(char *, char *);
char *slurp(int /*<<< orphan*/ *);
char *slurp_file(char *filename) {
  char *result;
  FILE *f = fopen(filename, "r");
  if (!f)
    return empty_string();
  result = slurp(f);
  fclose(f);
  return result;
}


x86 assembly (clang, -O0):
<slurp_file>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
lea    0xea9(%rip),%rsi
call   1060 <fopen@plt>
mov    %rax,-0x20(%rbp)
cmpq   $0x0,-0x20(%rbp)
jne    117b <slurp_file+0x3b>
mov    $0x0,%al
call   1030 <empty_string@plt>
mov    %rax,-0x8(%rbp)
jmp    1199 <slurp_file+0x59>
mov    -0x20(%rbp),%rdi
call   1040 <slurp@plt>
mov    %rax,-0x18(%rbp)
mov    -0x20(%rbp),%rdi
call   1050 <fclose@plt>
mov    -0x18(%rbp),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<slurp_file>:
push   %r14
push   %rbx
push   %rax
lea    0xeb5(%rip),%rsi
call   1060 <fopen@plt>
test   %rax,%rax
je     1176 <slurp_file+0x36>
mov    %rax,%rbx
mov    %rax,%rdi
call   1040 <slurp@plt>
mov    %rax,%r14
mov    %rbx,%rdi
call   1050 <fclose@plt>
mov    %r14,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1030 <empty_string@plt>

LLVM IR (-O0):
@.str = [2 x i8] c"r\00"
define i8* @slurp_file(i8* %0) {
%2 = alloca i8*
%3 = alloca i8*
%4 = alloca i8*
%5 = alloca i32*
store i8* %0, i8** %3
%6 = load i8*, i8** %3
%7 = call i32* @fopen(i8* %6, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
store i32* %7, i32** %5
%8 = load i32*, i32** %5
%9 = icmp ne i32* %8, null
br i1 %9, label %12, label %10
10: ; preds = %1
%11 = call i8* (...) @empty_string()
store i8* %11, i8** %2
br label %18
12: ; preds = %1
%13 = load i32*, i32** %5
%14 = call i8* @slurp(i32* %13)
store i8* %14, i8** %4
%15 = load i32*, i32** %5
%16 = call i32 @fclose(i32* %15)
%17 = load i8*, i8** %4
store i8* %17, i8** %2
br label %18
18: ; preds = %12, %10
%19 = load i8*, i8** %2
ret i8* %19
}

LLVM IR (-O2):
@.str = [2 x i8] c"r\00"
define i8* @slurp_file(i8* nocapture %0) {
%2 = tail call i32* @fopen(i8* %0, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
%3 = icmp eq i32* %2, null
br i1 %3, label %4, label %6
4: ; preds = %1
%5 = tail call i8* (...) @empty_string()
br label %9
6: ; preds = %1
%7 = tail call i8* @slurp(i32* %2)
%8 = tail call i32 @fclose(i32* %2)
br label %9
9: ; preds = %6, %4
%10 = phi i8* [ %7, %6 ], [ %5, %4 ]
ret i8* %10
}
/* Type definitions */
typedef char uint8_t;

/* Variables and functions */
int /*<<< orphan*/ seek2ch(char **, char *const, char);
uint8_t seek2eol(uint8_t **pos, uint8_t *const limit) {
  if (!seek2ch(pos, limit, '\n'))
    return 0;
  if ((*pos)[-1] == '\r') {
    return 2;
  }
  return 1;
}


x86 assembly (clang, -O0):
<seek2eol>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x18(%rbp),%rsi
mov    $0xa,%edx
call   1030 <seek2ch@plt>
cmp    $0x0,%eax
jne    1144 <seek2eol+0x34>
movb   $0x0,-0x1(%rbp)
jmp    1165 <seek2eol+0x55>
mov    -0x10(%rbp),%rax
mov    (%rax),%rax
movsbl -0x1(%rax),%eax
cmp    $0xd,%eax
jne    1161 <seek2eol+0x51>
movb   $0x2,-0x1(%rbp)
jmp    1165 <seek2eol+0x55>
movb   $0x1,-0x1(%rbp)
movsbl -0x1(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<seek2eol>:
push   %rbx
mov    %rdi,%rbx
mov    $0xa,%edx
call   1030 <seek2ch@plt>
test   %eax,%eax
je     1130 <seek2eol+0x20>
mov    (%rbx),%rax
cmpb   $0xd,-0x1(%rax)
sete   %al
add    $0x1,%al
pop    %rbx
ret
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
define signext i8 @seek2eol(i8** %0, i8* %1) {
%3 = alloca i8
%4 = alloca i8**
%5 = alloca i8*
store i8** %0, i8*** %4
store i8* %1, i8** %5
%6 = load i8**, i8*** %4
%7 = load i8*, i8** %5
%8 = call i32 @seek2ch(i8** %6, i8* %7, i8 signext 10)
%9 = icmp ne i32 %8, 0
br i1 %9, label %11, label %10
10: ; preds = %2
store i8 0, i8* %3
br label %20
11: ; preds = %2
%12 = load i8**, i8*** %4
%13 = load i8*, i8** %12
%14 = getelementptr inbounds i8, i8* %13, i64 -1
%15 = load i8, i8* %14
%16 = sext i8 %15 to i32
%17 = icmp eq i32 %16, 13
br i1 %17, label %18, label %19
18: ; preds = %11
store i8 2, i8* %3
br label %20
19: ; preds = %11
store i8 1, i8* %3
br label %20
20: ; preds = %19, %18, %10
%21 = load i8, i8* %3
ret i8 %21
}

LLVM IR (-O2):
define signext i8 @seek2eol(i8** %0, i8* %1) {
%3 = tail call i32 @seek2ch(i8** %0, i8* %1, i8 signext 10)
%4 = icmp eq i32 %3, 0
br i1 %4, label %11, label %5
5: ; preds = %2
%6 = load i8*, i8** %0
%7 = getelementptr inbounds i8, i8* %6, i64 -1
%8 = load i8, i8* %7
%9 = icmp eq i8 %8, 13
%10 = select i1 %9, i8 2, i8 1
br label %11
11: ; preds = %5, %2
%12 = phi i8 [ 0, %2 ], [ %10, %5 ]
ret i8 %12
}
void icfree(p) char *const p;
{
  if (!((p) == ((void *)0)))
    (void)free(p);
}


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

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

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

LLVM IR (-O2):
define void @icfree(i8* %0) {
%2 = icmp eq i8* %0, null
br i1 %2, label %4, label %3
3: ; preds = %1
tail call void @free(i8* %0)
br label %4
4: ; preds = %3, %1
ret void
}
int fitsBits(int x, int n) {
  int minusOne = ((0xFF) << 24) >> 24;
  int mov = n + minusOne;
  int value = x >> mov;
  int ret = (!(~value)) | (!value);
  return ret;
}


x86 assembly (clang, -O0):
<fitsBits>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
movl   $0xffffffff,-0xc(%rbp)
mov    -0x8(%rbp),%eax
add    -0xc(%rbp),%eax
mov    %eax,-0x10(%rbp)
mov    -0x4(%rbp),%eax
mov    -0x10(%rbp),%ecx
sar    %cl,%eax
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
xor    $0xffffffff,%eax
cmp    $0x0,%eax
setne  %al
xor    $0xff,%al
and    $0x1,%al
movzbl %al,%eax
cmpl   $0x0,-0x14(%rbp)
setne  %cl
xor    $0xff,%cl
and    $0x1,%cl
movzbl %cl,%ecx
or     %ecx,%eax
mov    %eax,-0x18(%rbp)
mov    -0x18(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<fitsBits>:
lea    -0x1(%rsi),%ecx
sar    %cl,%edi
add    $0x1,%edi
xor    %eax,%eax
cmp    $0x2,%edi
setb   %al
ret

LLVM IR (-O0):
define i32 @fitsBits(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
store i32 -1, i32* %5
%9 = load i32, i32* %4
%10 = load i32, i32* %5
%11 = add nsw i32 %9, %10
store i32 %11, i32* %6
%12 = load i32, i32* %3
%13 = load i32, i32* %6
%14 = ashr i32 %12, %13
store i32 %14, i32* %7
%15 = load i32, i32* %7
%16 = xor i32 %15, -1
%17 = icmp ne i32 %16, 0
%18 = xor i1 %17, true
%19 = zext i1 %18 to i32
%20 = load i32, i32* %7
%21 = icmp ne i32 %20, 0
%22 = xor i1 %21, true
%23 = zext i1 %22 to i32
%24 = or i32 %19, %23
store i32 %24, i32* %8
%25 = load i32, i32* %8
ret i32 %25
}

LLVM IR (-O2):
define i32 @fitsBits(i32 %0, i32 %1) {
%3 = add nsw i32 %1, -1
%4 = ashr i32 %0, %3
%5 = add i32 %4, 1
%6 = icmp ult i32 %5, 2
%7 = zext i1 %6 to i32
ret i32 %7
}
int strchr_ind(const char *s, char c) {
  int i;
  for (i = 0; s[i] != 0; i++)
    if (s[i] == c)
      return i;
  return -1;
}


x86 assembly (clang, -O0):
<strchr_ind>:
push   %rbp
mov    %rsp,%rbp
mov    %sil,%al
mov    %rdi,-0x10(%rbp)
mov    %al,-0x11(%rbp)
movl   $0x0,-0x18(%rbp)
mov    -0x10(%rbp),%rax
movslq -0x18(%rbp),%rcx
movsbl (%rax,%rcx,1),%eax
cmp    $0x0,%eax
je     1160 <strchr_ind+0x60>
mov    -0x10(%rbp),%rax
movslq -0x18(%rbp),%rcx
movsbl (%rax,%rcx,1),%eax
movsbl -0x11(%rbp),%ecx
cmp    %ecx,%eax
jne    114d <strchr_ind+0x4d>
mov    -0x18(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    1167 <strchr_ind+0x67>
jmp    1152 <strchr_ind+0x52>
mov    -0x18(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x18(%rbp)
jmp    1115 <strchr_ind+0x15>
movl   $0xffffffff,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<strchr_ind>:
mov    (%rdi),%dl
mov    $0xffffffff,%eax
test   %dl,%dl
je     1122 <strchr_ind+0x22>
xor    %ecx,%ecx
nopl   (%rax)
cmp    %sil,%dl
je     1123 <strchr_ind+0x23>
movzbl 0x1(%rdi,%rcx,1),%edx
add    $0x1,%rcx
test   %dl,%dl
jne    1110 <strchr_ind+0x10>
ret
mov    %ecx,%eax
ret

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

LLVM IR (-O2):
define i32 @strchr_ind(i8* nocapture %0, i8 signext %1) {
%3 = load i8, i8* %0
%4 = icmp eq i8 %3, 0
br i1 %4, label %16, label %5
5: ; preds = %2, %9
%6 = phi i64 [ %10, %9 ], [ 0, %2 ]
%7 = phi i8 [ %12, %9 ], [ %3, %2 ]
%8 = icmp eq i8 %7, %1
br i1 %8, label %14, label %9
9: ; preds = %5
%10 = add nuw i64 %6, 1
%11 = getelementptr inbounds i8, i8* %0, i64 %10
%12 = load i8, i8* %11
%13 = icmp eq i8 %12, 0
br i1 %13, label %16, label %5
14: ; preds = %5
%15 = trunc i64 %6 to i32
br label %16
16: ; preds = %9, %14, %2
%17 = phi i32 [ -1, %2 ], [ %15, %14 ], [ -1, %9 ]
ret i32 %17
}