xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ sleep(int);
void *Increment(void *arg) {
  long int number = (long int)arg;
  for (long int i = 0; i < number; ++i) {
    sleep(2);
  }
}


x86 assembly (clang, -O0):
<Increment>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x18(%rbp)
movq   $0x0,-0x20(%rbp)
mov    -0x20(%rbp),%rax
cmp    -0x18(%rbp),%rax
jge    1155 <Increment+0x45>
mov    $0x2,%edi
call   1030 <sleep@plt>
mov    -0x20(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x20(%rbp)
jmp    112c <Increment+0x1c>
mov    -0x8(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Increment>:
push   %rbx
test   %rdi,%rdi
jle    1140 <Increment+0x30>
cmp    $0x2,%rdi
mov    $0x1,%ebx
cmovge %rdi,%rbx
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
mov    $0x2,%edi
call   1030 <sleep@plt>
add    $0xffffffffffffffff,%rbx
jne    1130 <Increment+0x20>
pop    %rbx
ret

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

LLVM IR (-O2):
define noalias i8* @Increment(i8* %0) {
%2 = icmp sgt i8* %0, null
br i1 %2, label %3, label %6
3: ; preds = %1
%4 = ptrtoint i8* %0 to i64
%5 = call i64 @llvm.smax.i64(i64 %4, i64 1)
br label %7
6: ; preds = %7, %1
ret i8* undef
7: ; preds = %3, %7
%8 = phi i64 [ %10, %7 ], [ 0, %3 ]
%9 = tail call i32 @sleep(i32 2)
%10 = add nuw nsw i64 %8, 1
%11 = icmp eq i64 %10, %5
br i1 %11, label %6, label %7
}
/* Variables and functions */
int getchar();
int get16r(void) {
  int b1 = getchar();
  int b2 = getchar();
  return ((b2 << 8) & 0xff00) | (b1 & 0xff);
}


x86 assembly (clang, -O0):
<get16r>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1030 <getchar@plt>
mov    %eax,-0x4(%rbp)
mov    $0x0,%al
call   1030 <getchar@plt>
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
shl    $0x8,%eax
and    $0xff00,%eax
mov    -0x4(%rbp),%ecx
and    $0xff,%ecx
or     %ecx,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<get16r>:
push   %rbx
xor    %eax,%eax
call   1030 <getchar@plt>
mov    %eax,%ebx
xor    %eax,%eax
call   1030 <getchar@plt>
shl    $0x8,%eax
movzwl %ax,%ecx
movzbl %bl,%eax
or     %ecx,%eax
pop    %rbx
ret

LLVM IR (-O0):
define i32 @get16r() {
%1 = alloca i32
%2 = alloca i32
%3 = call i32 (...) @getchar()
store i32 %3, i32* %1
%4 = call i32 (...) @getchar()
store i32 %4, i32* %2
%5 = load i32, i32* %2
%6 = shl i32 %5, 8
%7 = and i32 %6, 65280
%8 = load i32, i32* %1
%9 = and i32 %8, 255
%10 = or i32 %7, %9
ret i32 %10
}

LLVM IR (-O2):
define i32 @get16r() {
%1 = tail call i32 (...) @getchar()
%2 = tail call i32 (...) @getchar()
%3 = shl i32 %2, 8
%4 = and i32 %3, 65280
%5 = and i32 %1, 255
%6 = or i32 %4, %5
ret i32 %6
}
/* Variables and functions */
int /*<<< orphan*/ timer_gettime();
unsigned int timer_to_microsecs(int /*<<< orphan*/);
unsigned int timer_gettime_us() { return timer_to_microsecs(timer_gettime()); }


x86 assembly (clang, -O0):
<timer_gettime_us>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1040 <timer_gettime@plt>
mov    %eax,%edi
call   1030 <timer_to_microsecs@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<timer_gettime_us>:
push   %rax
xor    %eax,%eax
call   1040 <timer_gettime@plt>
mov    %eax,%edi
pop    %rax
jmp    1030 <timer_to_microsecs@plt>

LLVM IR (-O0):
define i32 @timer_gettime_us() {
%1 = call i32 (...) @timer_gettime()
%2 = call i32 @timer_to_microsecs(i32 %1)
ret i32 %2
}

LLVM IR (-O2):
define i32 @timer_gettime_us() {
%1 = tail call i32 (...) @timer_gettime()
%2 = tail call i32 @timer_to_microsecs(i32 %1)
ret i32 %2
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
int /*<<< orphan*/ stderr;
void usage(void) {
  (void)fprintf(stderr, "usage: uniq [-c | -d | -u] [-i] [-f fields] [-s "
                        "chars] [input [output]]\n");
  exit(1);
}


x86 assembly (clang, -O0):
<usage>:
push   %rbp
mov    %rsp,%rbp
mov    0x2eb5(%rip),%rax
mov    (%rax),%edi
lea    0xecc(%rip),%rsi
call   1030 <fprintf@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

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

LLVM IR (-O0):
@stderr = global i32 0
@.str = [73 x i8] c"usage: uniq [-c | -d | -u] [-i] [-f fields] [-s chars] [input [output]]\0A\00"
define void @usage() {
%1 = load i32, i32* @stderr
%2 = call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([73 x i8], [73 x i8]* @.str, i64 0, i64 0))
%3 = call i32 @exit(i32 1)
unreachable
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [73 x i8] c"usage: uniq [-c | -d | -u] [-i] [-f fields] [-s chars] [input [output]]\0A\00"
define void @usage() {
%1 = load i32, i32* @stderr
%2 = tail call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([73 x i8], [73 x i8]* @.str, i64 0, i64 0))
%3 = tail call i32 @exit(i32 1)
unreachable
}
foo() {
  volatile int *p;
  volatile int x;
  p = &x;
  *p = 3;
  return *p + 1;
}


x86 assembly (clang, -O0):
<foo>:
push   %rbp
mov    %rsp,%rbp
lea    -0xc(%rbp),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movl   $0x3,(%rax)
mov    -0x8(%rbp),%rax
mov    (%rax),%eax
add    $0x1,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<foo>:
movl   $0x3,-0x4(%rsp)
mov    -0x4(%rsp),%eax
add    $0x1,%eax
ret

LLVM IR (-O0):
define i32 @foo() {
%1 = alloca i32*
%2 = alloca i32
store i32* %2, i32** %1
%3 = load i32*, i32** %1
store volatile i32 3, i32* %3
%4 = load i32*, i32** %1
%5 = load volatile i32, i32* %4
%6 = add nsw i32 %5, 1
ret i32 %6
}

LLVM IR (-O2):
define i32 @foo() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
store volatile i32 3, i32* %1
%3 = load volatile i32, i32* %1
%4 = add nsw i32 %3, 1
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ memcpy(char *, char *, size_t);
int putdata(char **dst, char *data, size_t len) {
  memcpy(*dst, data, len);
  (*dst) += len;
  return len;
}


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

x86 assembly (clang, -O2):
<putdata>:
push   %r14
push   %rbx
push   %rax
mov    %rdx,%rbx
mov    %rdi,%r14
mov    (%rdi),%rdi
call   1030 <memcpy@plt>
add    %rbx,(%r14)
mov    %ebx,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define i32 @putdata(i8** %0, i8* %1, i64 %2) {
%4 = alloca i8**
%5 = alloca i8*
%6 = alloca i64
store i8** %0, i8*** %4
store i8* %1, i8** %5
store i64 %2, i64* %6
%7 = load i8**, i8*** %4
%8 = load i8*, i8** %7
%9 = load i8*, i8** %5
%10 = load i64, i64* %6
%11 = call i32 @memcpy(i8* %8, i8* %9, i64 %10)
%12 = load i64, i64* %6
%13 = load i8**, i8*** %4
%14 = load i8*, i8** %13
%15 = getelementptr inbounds i8, i8* %14, i64 %12
store i8* %15, i8** %13
%16 = load i64, i64* %6
%17 = trunc i64 %16 to i32
ret i32 %17
}

LLVM IR (-O2):
define i32 @putdata(i8** nocapture %0, i8* %1, i64 %2) {
%4 = load i8*, i8** %0
%5 = tail call i32 @memcpy(i8* %4, i8* %1, i64 %2)
%6 = load i8*, i8** %0
%7 = getelementptr inbounds i8, i8* %6, i64 %2
store i8* %7, i8** %0
%8 = trunc i64 %2 to i32
ret i32 %8
}
/* Variables and functions */
size_t buffer_align_size(size_t size) {
  size_t align = 64 - (size % 64);
  if (size + align < size)
    return size;
  return size + align;
}


x86 assembly (clang, -O0):
<buffer_align_size>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rcx
and    $0x3f,%rcx
mov    $0x40,%eax
sub    %rcx,%rax
mov    %rax,-0x18(%rbp)
mov    -0x10(%rbp),%rax
add    -0x18(%rbp),%rax
cmp    -0x10(%rbp),%rax
jae    113b <buffer_align_size+0x3b>
mov    -0x10(%rbp),%rax
mov    %rax,-0x8(%rbp)
jmp    1147 <buffer_align_size+0x47>
mov    -0x10(%rbp),%rax
add    -0x18(%rbp),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<buffer_align_size>:
mov    %edi,%ecx
and    $0x3f,%ecx
mov    $0x40,%eax
sub    %rcx,%rax
add    %rdi,%rax
cmovb  %rdi,%rax
ret

LLVM IR (-O0):
define i64 @buffer_align_size(i64 %0) {
%2 = alloca i64
%3 = alloca i64
%4 = alloca i64
store i64 %0, i64* %3
%5 = load i64, i64* %3
%6 = urem i64 %5, 64
%7 = sub i64 64, %6
store i64 %7, i64* %4
%8 = load i64, i64* %3
%9 = load i64, i64* %4
%10 = add i64 %8, %9
%11 = load i64, i64* %3
%12 = icmp ult i64 %10, %11
br i1 %12, label %13, label %15
13: ; preds = %1
%14 = load i64, i64* %3
store i64 %14, i64* %2
br label %19
15: ; preds = %1
%16 = load i64, i64* %3
%17 = load i64, i64* %4
%18 = add i64 %16, %17
store i64 %18, i64* %2
br label %19
19: ; preds = %15, %13
%20 = load i64, i64* %2
ret i64 %20
}

LLVM IR (-O2):
define i64 @buffer_align_size(i64 %0) {
%2 = and i64 %0, 63
%3 = sub nuw nsw i64 64, %2
%4 = add i64 %3, %0
%5 = icmp ult i64 %4, %0
%6 = select i1 %5, i64 %0, i64 %4
ret i64 %6
}
/* Variables and functions */
int /*<<< orphan*/ clang_analyzer_eval(int);
int strncmp(char *, char *, int);
void strncmp_diff_length_2() {
  char *x = "12345";
  char *y = "123";
  clang_analyzer_eval(strncmp(x, y, 5) == 1);
}


x86 assembly (clang, -O0):
<strncmp_diff_length_2>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    0xed1(%rip),%rax
mov    %rax,-0x8(%rbp)
lea    0xecc(%rip),%rax
mov    %rax,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    $0x5,%edx
call   1030 <strncmp@plt>
cmp    $0x1,%eax
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1040 <clang_analyzer_eval@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<strncmp_diff_length_2>:
push   %rax
lea    0xed8(%rip),%rdi
lea    0xed7(%rip),%rsi
mov    $0x5,%edx
call   1030 <strncmp@plt>
xor    %edi,%edi
cmp    $0x1,%eax
sete   %dil
pop    %rax
jmp    1040 <clang_analyzer_eval@plt>

LLVM IR (-O0):
@.str = [6 x i8] c"12345\00"
@.str.1 = [4 x i8] c"123\00"
define void @strncmp_diff_length_2() {
%1 = alloca i8*
%2 = alloca i8*
store i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i8** %1
store i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i8** %2
%3 = load i8*, i8** %1
%4 = load i8*, i8** %2
%5 = call i32 @strncmp(i8* %3, i8* %4, i32 5)
%6 = icmp eq i32 %5, 1
%7 = zext i1 %6 to i32
%8 = call i32 @clang_analyzer_eval(i32 %7)
ret void
}

LLVM IR (-O2):
@.str = [6 x i8] c"12345\00"
@.str.1 = [4 x i8] c"123\00"
define void @strncmp_diff_length_2() {
%1 = tail call i32 @strncmp(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i32 5)
%2 = icmp eq i32 %1, 1
%3 = zext i1 %2 to i32
%4 = tail call i32 @clang_analyzer_eval(i32 %3)
ret void
}
void glLightx(void) { return; }


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

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

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

LLVM IR (-O2):
define void @glLightx() {
ret void
}
/* Variables and functions */
int check_arg_count(int, int);
int /*<<< orphan*/ report_count(int);
int /*<<< orphan*/ report_error(char *);
void cmd_mvwgetn_wstr(int nargs, char **args) {
  if (check_arg_count(nargs, 1) == 1)
    return;
  report_count(1);
  report_error("UNSUPPORTED");
}


x86 assembly (clang, -O0):
<cmd_mvwgetn_wstr>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x4(%rbp),%edi
mov    $0x1,%esi
call   1030 <check_arg_count@plt>
cmp    $0x1,%eax
jne    115a <cmd_mvwgetn_wstr+0x2a>
jmp    1170 <cmd_mvwgetn_wstr+0x40>
mov    $0x1,%edi
call   1040 <report_count@plt>
lea    0xe95(%rip),%rdi
call   1050 <report_error@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<cmd_mvwgetn_wstr>:
push   %rax
mov    $0x1,%esi
call   1030 <check_arg_count@plt>
cmp    $0x1,%eax
jne    1142 <cmd_mvwgetn_wstr+0x12>
pop    %rax
ret
mov    $0x1,%edi
call   1040 <report_count@plt>
lea    0xead(%rip),%rdi
pop    %rax
jmp    1050 <report_error@plt>

LLVM IR (-O0):
@.str = [12 x i8] c"UNSUPPORTED\00"
define void @cmd_mvwgetn_wstr(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 = call i32 @check_arg_count(i32 %5, i32 1)
%7 = icmp eq i32 %6, 1
br i1 %7, label %8, label %9
8: ; preds = %2
br label %12
9: ; preds = %2
%10 = call i32 @report_count(i32 1)
%11 = call i32 @report_error(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0))
br label %12
12: ; preds = %9, %8
ret void
}

LLVM IR (-O2):
@.str = [12 x i8] c"UNSUPPORTED\00"
define void @cmd_mvwgetn_wstr(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @check_arg_count(i32 %0, i32 1)
%4 = icmp eq i32 %3, 1
br i1 %4, label %8, label %5
5: ; preds = %2
%6 = tail call i32 @report_count(i32 1)
%7 = tail call i32 @report_error(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0))
br label %8
8: ; preds = %2, %5
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ __m64;

/* Variables and functions */
scalar_t__ _mm_packs_pu16(int /*<<< orphan*/, int /*<<< orphan*/);
int /*<<< orphan*/ abort();
void __attribute__((no))
check_packs_pu16(unsigned long long int src1, unsigned long long int src2,
                 unsigned long long int res_ref) {
  unsigned long long int res;
  res = (unsigned long long int)_mm_packs_pu16((__m64)src1, (__m64)src2);
  if (res != res_ref)
    abort();
}


x86 assembly (clang, -O0):
<check_packs_pu16>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x8(%rbp),%rax
mov    %eax,%edi
mov    -0x10(%rbp),%rax
mov    %eax,%esi
call   1040 <_mm_packs_pu16@plt>
mov    %rax,-0x20(%rbp)
mov    -0x20(%rbp),%rax
cmp    -0x18(%rbp),%rax
je     115e <check_packs_pu16+0x3e>
mov    $0x0,%al
call   1030 <abort@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<check_packs_pu16>:
push   %rbx
mov    %rdx,%rbx
call   1040 <_mm_packs_pu16@plt>
cmp    %rbx,%rax
jne    1130 <check_packs_pu16+0x10>
pop    %rbx
ret
xor    %eax,%eax
call   1030 <abort@plt>

LLVM IR (-O0):
define void @check_packs_pu16(i64 %0, i64 %1, i64 %2) {
%4 = alloca i64
%5 = alloca i64
%6 = alloca i64
%7 = alloca i64
store i64 %0, i64* %4
store i64 %1, i64* %5
store i64 %2, i64* %6
%8 = load i64, i64* %4
%9 = trunc i64 %8 to i32
%10 = load i64, i64* %5
%11 = trunc i64 %10 to i32
%12 = call i64 @_mm_packs_pu16(i32 %9, i32 %11)
store i64 %12, i64* %7
%13 = load i64, i64* %7
%14 = load i64, i64* %6
%15 = icmp ne i64 %13, %14
br i1 %15, label %16, label %18
16: ; preds = %3
%17 = call i32 (...) @abort()
unreachable
18: ; preds = %3
ret void
}

LLVM IR (-O2):
define void @check_packs_pu16(i64 %0, i64 %1, i64 %2) {
%4 = trunc i64 %0 to i32
%5 = trunc i64 %1 to i32
%6 = tail call i64 @_mm_packs_pu16(i32 %4, i32 %5)
%7 = icmp eq i64 %6, %2
br i1 %7, label %10, label %8
8: ; preds = %3
%9 = tail call i32 (...) @abort()
unreachable
10: ; preds = %3
ret void
}
char *dngettext(domainname, msgid1, msgid2, n) const char *domainname;
const char *msgid1;
const char *msgid2;
unsigned long int n;
{ return libintl_dngettext(domainname, msgid1, msgid2, n); }


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

x86 assembly (clang, -O2):
<dngettext>:
push   %rax
xor    %eax,%eax
call   1030 <libintl_dngettext@plt>
cltq
pop    %rcx
ret

LLVM IR (-O0):
define i8* @dngettext(i8* %0, i8* %1, i8* %2, i64 %3) {
%5 = alloca i8*
%6 = alloca i8*
%7 = alloca i8*
%8 = alloca i64
store i8* %0, i8** %5
store i8* %1, i8** %6
store i8* %2, i8** %7
store i64 %3, i64* %8
%9 = load i8*, i8** %5
%10 = load i8*, i8** %6
%11 = load i8*, i8** %7
%12 = load i64, i64* %8
%13 = call i32 (i8*, i8*, i8*, i64, ...) bitcast (i32 (...)* @libintl_dngettext to i32 (i8*, i8*, i8*, i64, ...)*)(i8* %9, i8* %10, i8* %11, i64 %12)
%14 = sext i32 %13 to i64
%15 = inttoptr i64 %14 to i8*
ret i8* %15
}

LLVM IR (-O2):
define i8* @dngettext(i8* %0, i8* %1, i8* %2, i64 %3) {
%5 = tail call i32 (i8*, i8*, i8*, i64, ...) bitcast (i32 (...)* @libintl_dngettext to i32 (i8*, i8*, i8*, i64, ...)*)(i8* %0, i8* %1, i8* %2, i64 %3)
%6 = sext i32 %5 to i64
%7 = inttoptr i64 %6 to i8*
ret i8* %7
}
int t1_getctxno_mag(int f) {
  int tmp1 = (f & (0x0010 | 0x0001 | 0x0020 | 0x0002 | 0x0040 | 0x0004 |
                   0x0080 | 0x0008))
                 ? ((0 + 9) + 5) + 1
                 : ((0 + 9) + 5);
  int tmp2 = (f & 0x2000) ? ((0 + 9) + 5) + 2 : tmp1;
  return (tmp2);
}


x86 assembly (clang, -O0):
<t1_getctxno_mag>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edx
and    $0xff,%edx
mov    $0xe,%eax
mov    $0xf,%ecx
cmp    $0x0,%edx
cmovne %ecx,%eax
mov    %eax,-0x8(%rbp)
mov    -0x4(%rbp),%eax
and    $0x2000,%eax
cmp    $0x0,%eax
je     1141 <t1_getctxno_mag+0x41>
mov    $0x10,%eax
mov    %eax,-0x10(%rbp)
jmp    1147 <t1_getctxno_mag+0x47>
mov    -0x8(%rbp),%eax
mov    %eax,-0x10(%rbp)
mov    -0x10(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<t1_getctxno_mag>:
cmp    $0x1,%dil
mov    $0xf,%ecx
sbb    $0x0,%ecx
test   $0x2000,%edi
mov    $0x10,%eax
cmove  %ecx,%eax
ret

LLVM IR (-O0):
define i32 @t1_getctxno_mag(i32 %0) {
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %2
%5 = load i32, i32* %2
%6 = and i32 %5, 255
%7 = icmp ne i32 %6, 0
%8 = zext i1 %7 to i64
%9 = select i1 %7, i32 15, i32 14
store i32 %9, i32* %3
%10 = load i32, i32* %2
%11 = and i32 %10, 8192
%12 = icmp ne i32 %11, 0
br i1 %12, label %13, label %14
13: ; preds = %1
br label %16
14: ; preds = %1
%15 = load i32, i32* %3
br label %16
16: ; preds = %14, %13
%17 = phi i32 [ 16, %13 ], [ %15, %14 ]
store i32 %17, i32* %4
%18 = load i32, i32* %4
ret i32 %18
}

LLVM IR (-O2):
define i32 @t1_getctxno_mag(i32 %0) {
%2 = and i32 %0, 255
%3 = icmp eq i32 %2, 0
%4 = select i1 %3, i32 14, i32 15
%5 = and i32 %0, 8192
%6 = icmp eq i32 %5, 0
%7 = select i1 %6, i32 %4, i32 16
ret i32 %7
}
int test_imm_19int32_reg(int val) { return ((val) & (0x19 << 0)) ? -20 : -40; }


x86 assembly (clang, -O0):
<test_imm_19int32_reg>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edx
and    $0x19,%edx
mov    $0xffffffd8,%eax
mov    $0xffffffec,%ecx
cmp    $0x0,%edx
cmovne %ecx,%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @test_imm_19int32_reg(i32 %0) {
%2 = and i32 %0, 25
%3 = icmp eq i32 %2, 0
%4 = select i1 %3, i32 -40, i32 -20
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ free(void *);
void os_free(void *ptr) { free(ptr); }


x86 assembly (clang, -O0):
<os_free>:
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):
<os_free>:
jmp    1030 <free@plt>

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

LLVM IR (-O2):
define void @os_free(i8* nocapture %0) {
%2 = tail call i32 @free(i8* %0)
ret void
}
void EC_POINT_set_affine_coordinates_GFp(void) {}


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

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

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

LLVM IR (-O2):
define void @EC_POINT_set_affine_coordinates_GFp() {
ret void
}
/* Variables and functions */
double ceil(double);
double module_libc_ceil(double x) { return ceil(x); }


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

x86 assembly (clang, -O2):
<module_libc_ceil>:
jmp    1030 <ceil@plt>

LLVM IR (-O0):
define double @module_libc_ceil(double %0) {
%2 = alloca double
store double %0, double* %2
%3 = load double, double* %2
%4 = call double @llvm.ceil.f64(double %3)
ret double %4
}

LLVM IR (-O2):
define double @module_libc_ceil(double %0) {
%2 = tail call double @llvm.ceil.f64(double %0)
ret double %2
}
unsigned int get_flit_type(unsigned int flit) {
  return (flit & 0b11100000000000000000000000000000) >> 29;
}


x86 assembly (clang, -O0):
<get_flit_type>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
and    $0xe0000000,%eax
shr    $0x1d,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_flit_type>:
mov    %edi,%eax
shr    $0x1d,%eax
ret

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

LLVM IR (-O2):
define i32 @get_flit_type(i32 %0) {
%2 = lshr i32 %0, 29
ret i32 %2
}
/* Variables and functions */
int /*<<< orphan*/ EA_AY_DI_32();
int /*<<< orphan*/ m68ki_jump(int /*<<< orphan*/);
void m68k_op_jmp_32_di(void) { m68ki_jump(EA_AY_DI_32()); }


x86 assembly (clang, -O0):
<m68k_op_jmp_32_di>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1040 <EA_AY_DI_32@plt>
mov    %eax,%edi
call   1030 <m68ki_jump@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<m68k_op_jmp_32_di>:
push   %rax
xor    %eax,%eax
call   1040 <EA_AY_DI_32@plt>
mov    %eax,%edi
pop    %rax
jmp    1030 <m68ki_jump@plt>

LLVM IR (-O0):
define void @m68k_op_jmp_32_di() {
%1 = call i32 (...) @EA_AY_DI_32()
%2 = call i32 @m68ki_jump(i32 %1)
ret void
}

LLVM IR (-O2):
define void @m68k_op_jmp_32_di() {
%1 = tail call i32 (...) @EA_AY_DI_32()
%2 = tail call i32 @m68ki_jump(i32 %1)
ret void
}
/* Variables and functions */
double __ieee754_cosh(double);
double jcosh(double x) { return __ieee754_cosh(x); }


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

x86 assembly (clang, -O2):
<jcosh>:
jmp    1030 <__ieee754_cosh@plt>

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

LLVM IR (-O2):
define double @jcosh(double %0) {
%2 = tail call double @__ieee754_cosh(double %0)
ret double %2
}
/* Variables and functions */
int /*<<< orphan*/
UpnpResponse_RemoteIOClient_RemoteInput_GetInputSetup(void *, char *);
int /*<<< orphan*/ printf(char *);
void UpnpRemoteIOClient_RemoteInput_GetInputSetup(void *upnptoken) {
  printf("Invoke: UpnpRemoteIOClient_RemoteInput_GetInputSetup();\r\n");
  UpnpResponse_RemoteIOClient_RemoteInput_GetInputSetup(upnptoken,
                                                        "Sample String");
}


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

x86 assembly (clang, -O2):
<UpnpRemoteIOClient_RemoteInput_GetInputSetup>:
push   %rbx
mov    %rdi,%rbx
lea    0xee3(%rip),%rdi
call   1030 <puts@plt>
lea    0xec9(%rip),%rsi
mov    %rbx,%rdi
pop    %rbx
jmp    1040 <UpnpResponse_RemoteIOClient_RemoteInput_GetInputSetup@plt>

LLVM IR (-O0):
@.str = [58 x i8] c"Invoke: UpnpRemoteIOClient_RemoteInput_GetInputSetup();\0D\0A\00"
@.str.1 = [14 x i8] c"Sample String\00"
define void @UpnpRemoteIOClient_RemoteInput_GetInputSetup(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = call i32 @printf(i8* getelementptr inbounds ([58 x i8], [58 x i8]* @.str, i64 0, i64 0))
%4 = load i8*, i8** %2
%5 = call i32 @UpnpResponse_RemoteIOClient_RemoteInput_GetInputSetup(i8* %4, i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str.1 = [14 x i8] c"Sample String\00"
@str = [57 x i8] c"Invoke: UpnpRemoteIOClient_RemoteInput_GetInputSetup();\0D\00"
define void @UpnpRemoteIOClient_RemoteInput_GetInputSetup(i8* %0) {
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([57 x i8], [57 x i8]* @str, i64 0, i64 0))
%3 = tail call i32 @UpnpResponse_RemoteIOClient_RemoteInput_GetInputSetup(i8* %0, i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
int /*<<< orphan*/ scanf(char *, int *);
int main() {
  int a, b;
  scanf("%d", &a);
  scanf("%d", &b);
  printf("%d", (a < b) ? b : a);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeca(%rip),%rdi
lea    -0x8(%rbp),%rsi
call   1040 <scanf@plt>
lea    0xeba(%rip),%rdi
lea    -0xc(%rbp),%rsi
call   1040 <scanf@plt>
mov    -0x8(%rbp),%eax
cmp    -0xc(%rbp),%eax
jge    1166 <main+0x46>
mov    -0xc(%rbp),%eax
mov    %eax,-0x10(%rbp)
jmp    116c <main+0x4c>
mov    -0x8(%rbp),%eax
mov    %eax,-0x10(%rbp)
mov    -0x10(%rbp),%esi
lea    0xe8a(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
@.str = [3 x i8] c"%d\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
store i32 0, i32* %1
%4 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), 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 = icmp slt i32 %6, %7
br i1 %8, label %9, label %11
9: ; preds = %0
%10 = load i32, i32* %3
br label %13
11: ; preds = %0
%12 = load i32, i32* %2
br label %13
13: ; preds = %11, %9
%14 = phi i32 [ %10, %9 ], [ %12, %11 ]
%15 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 %14)
ret i32 0
}

LLVM IR (-O2):
@.str = [3 x i8] c"%d\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = bitcast i32* %1 to i8*
%4 = bitcast i32* %2 to i8*
%5 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %1)
%6 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %2)
%7 = load i32, i32* %1
%8 = load i32, i32* %2
%9 = icmp slt i32 %7, %8
%10 = select i1 %9, i32 %8, i32 %7
%11 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 %10)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ ini_getint_port(int *, char *, char *);
int ini_getint_port_def(char *port, char *param, int def) {
  int value;
  if (!ini_getint_port(&value, port, param))
    return def;
  return value;
}


x86 assembly (clang, -O0):
<ini_getint_port_def>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    %edx,-0x1c(%rbp)
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
lea    -0x20(%rbp),%rdi
call   1030 <ini_getint_port@plt>
cmp    $0x0,%eax
jne    1148 <ini_getint_port_def+0x38>
mov    -0x1c(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    114e <ini_getint_port_def+0x3e>
mov    -0x20(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ini_getint_port_def>:
push   %rbx
sub    $0x10,%rsp
mov    %edx,%ebx
mov    %rsi,%rdx
mov    %rdi,%rsi
lea    0xc(%rsp),%rdi
call   1030 <ini_getint_port@plt>
test   %eax,%eax
je     112f <ini_getint_port_def+0x1f>
mov    0xc(%rsp),%ebx
mov    %ebx,%eax
add    $0x10,%rsp
pop    %rbx
ret

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

LLVM IR (-O2):
define i32 @ini_getint_port_def(i8* %0, i8* %1, i32 %2) {
%4 = alloca i32
%5 = bitcast i32* %4 to i8*
%6 = call i32 @ini_getint_port(i32* %4, i8* %0, i8* %1)
%7 = icmp eq i32 %6, 0
%8 = load i32, i32* %4
%9 = select i1 %7, i32 %2, i32 %8
ret i32 %9
}
int m(int a, int b) { return b >> 15; }


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

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

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

LLVM IR (-O2):
define i32 @m(i32 %0, i32 %1) {
%3 = ashr i32 %1, 15
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ strncpy(char *, char const *, int);
int str_copy(char *dst, const char *src, int size) {
  (void)strncpy(dst, src, size);
  return dst[size - 1] == '\0' ? 0 : -1;
}


x86 assembly (clang, -O0):
<str_copy>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x14(%rbp),%edx
call   1030 <strncpy@plt>
mov    -0x8(%rbp),%rax
mov    -0x14(%rbp),%ecx
sub    $0x1,%ecx
movslq %ecx,%rcx
movsbl (%rax,%rcx,1),%edx
mov    $0xffffffff,%eax
xor    %ecx,%ecx
cmp    $0x0,%edx
cmove  %ecx,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<str_copy>:
push   %r14
push   %rbx
push   %rax
mov    %edx,%ebx
mov    %rdi,%r14
call   1030 <strncpy@plt>
movslq %ebx,%rax
xor    %ecx,%ecx
cmp    -0x1(%rax,%r14,1),%cl
sbb    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define i32 @str_copy(i8* %0, i8* %1, i32 %2) {
%4 = alloca i8*
%5 = alloca i8*
%6 = alloca i32
store i8* %0, i8** %4
store i8* %1, i8** %5
store i32 %2, i32* %6
%7 = load i8*, i8** %4
%8 = load i8*, i8** %5
%9 = load i32, i32* %6
%10 = call i32 @strncpy(i8* %7, i8* %8, i32 %9)
%11 = load i8*, i8** %4
%12 = load i32, i32* %6
%13 = sub nsw i32 %12, 1
%14 = sext i32 %13 to i64
%15 = getelementptr inbounds i8, i8* %11, i64 %14
%16 = load i8, i8* %15
%17 = sext i8 %16 to i32
%18 = icmp eq i32 %17, 0
%19 = zext i1 %18 to i64
%20 = select i1 %18, i32 0, i32 -1
ret i32 %20
}

LLVM IR (-O2):
define i32 @str_copy(i8* %0, i8* %1, i32 %2) {
%4 = tail call i32 @strncpy(i8* %0, i8* %1, i32 %2)
%5 = add nsw i32 %2, -1
%6 = sext i32 %5 to i64
%7 = getelementptr inbounds i8, i8* %0, i64 %6
%8 = load i8, i8* %7
%9 = icmp ne i8 %8, 0
%10 = sext i1 %9 to i32
ret i32 %10
}
/* Variables and functions */
int /*<<< orphan*/ FIONREAD;
scalar_t__ ioctl(int, int /*<<< orphan*/, long *);
long carmen_serial_numChars(int dev_fd) {
  long available = 0;
  if (ioctl(dev_fd, FIONREAD, &available) == 0)
    return available;
  else
    return -1;
}


x86 assembly (clang, -O0):
<carmen_serial_numChars>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0xc(%rbp)
movq   $0x0,-0x18(%rbp)
mov    -0xc(%rbp),%edi
mov    0x2ebb(%rip),%rax
mov    (%rax),%esi
lea    -0x18(%rbp),%rdx
call   1030 <ioctl@plt>
cmp    $0x0,%rax
jne    114f <carmen_serial_numChars+0x3f>
mov    -0x18(%rbp),%rax
mov    %rax,-0x8(%rbp)
jmp    1157 <carmen_serial_numChars+0x47>
movq   $0xffffffffffffffff,-0x8(%rbp)
ff
mov    -0x8(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<carmen_serial_numChars>:
push   %rax
movq   $0x0,(%rsp)
mov    0x2ec8(%rip),%rax
mov    (%rax),%esi
mov    %rsp,%rdx
call   1030 <ioctl@plt>
neg    %rax
sbb    %rax,%rax
or     (%rsp),%rax
pop    %rcx
ret

LLVM IR (-O0):
@FIONREAD = global i32 0
define i64 @carmen_serial_numChars(i32 %0) {
%2 = alloca i64
%3 = alloca i32
%4 = alloca i64
store i32 %0, i32* %3
store i64 0, i64* %4
%5 = load i32, i32* %3
%6 = load i32, i32* @FIONREAD
%7 = call i64 @ioctl(i32 %5, i32 %6, i64* %4)
%8 = icmp eq i64 %7, 0
br i1 %8, label %9, label %11
9: ; preds = %1
%10 = load i64, i64* %4
store i64 %10, i64* %2
br label %12
11: ; preds = %1
store i64 -1, i64* %2
br label %12
12: ; preds = %11, %9
%13 = load i64, i64* %2
ret i64 %13
}

LLVM IR (-O2):
@FIONREAD = global i32 0
define i64 @carmen_serial_numChars(i32 %0) {
%2 = alloca i64
%3 = bitcast i64* %2 to i8*
store i64 0, i64* %2
%4 = load i32, i32* @FIONREAD
%5 = call i64 @ioctl(i32 %0, i32 %4, i64* %2)
%6 = icmp eq i64 %5, 0
%7 = load i64, i64* %2
%8 = select i1 %6, i64 %7, i64 -1
ret i64 %8
}
void gtk_action_group_get_name() {}


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

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

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

LLVM IR (-O2):
define void @gtk_action_group_get_name() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ eembed_stdout();
int /*<<< orphan*/ eembed_system_fprintf(int /*<<< orphan*/, char *, char);
void eembed_stdout_printc(char c) {
  eembed_system_fprintf(eembed_stdout(), "%c", c);
}


x86 assembly (clang, -O0):
<eembed_stdout_printc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %dil,%al
mov    %al,-0x1(%rbp)
mov    $0x0,%al
call   1040 <eembed_stdout@plt>
mov    %eax,%edi
lea    0xec2(%rip),%rsi
movsbl -0x1(%rbp),%edx
call   1030 <eembed_system_fprintf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<eembed_stdout_printc>:
push   %rbx
mov    %edi,%ebx
xor    %eax,%eax
call   1040 <eembed_stdout@plt>
lea    0xecf(%rip),%rsi
mov    %eax,%edi
mov    %ebx,%edx
pop    %rbx
jmp    1030 <eembed_system_fprintf@plt>

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

LLVM IR (-O2):
@.str = [3 x i8] c"%c\00"
define void @eembed_stdout_printc(i8 signext %0) {
%2 = tail call i32 (...) @eembed_stdout()
%3 = tail call i32 @eembed_system_fprintf(i32 %2, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8 signext %0)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ ssize_t;
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ getdelim(char **, size_t *, char, int /*<<< orphan*/ *);
ssize_t getline(char **restrict lineptr, size_t *restrict size,
                FILE *restrict file) {
  return getdelim(lineptr, size, '\n', file);
}


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

x86 assembly (clang, -O2):
<getline>:
mov    %rdx,%rcx
mov    $0xa,%edx
jmp    1030 <getdelim@plt>

LLVM IR (-O0):
define i32 @getline(i8** noalias %0, i64* noalias %1, i32* noalias %2) {
%4 = alloca i8**
%5 = alloca i64*
%6 = alloca i32*
store i8** %0, i8*** %4
store i64* %1, i64** %5
store i32* %2, i32** %6
%7 = load i8**, i8*** %4
%8 = load i64*, i64** %5
%9 = load i32*, i32** %6
%10 = call i32 @getdelim(i8** %7, i64* %8, i8 signext 10, i32* %9)
ret i32 %10
}

LLVM IR (-O2):
define i32 @getline(i8** noalias %0, i64* noalias %1, i32* noalias %2) {
%4 = tail call i32 @getdelim(i8** %0, i64* %1, i8 signext 10, i32* %2)
ret i32 %4
}
unsigned long long int sum(unsigned long long int a, unsigned long long int b) {
  return (a + b);
}


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

x86 assembly (clang, -O2):
<sum>:
lea    (%rdi,%rsi,1),%rax
ret

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

LLVM IR (-O2):
define i64 @sum(i64 %0, i64 %1) {
%3 = add i64 %1, %0
ret i64 %3
}
char to_lower(char c) { return c >= 'A' && c <= 'Z' ? c + 'a' - 'A' : c; }


x86 assembly (clang, -O0):
<to_lower>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movsbl -0x1(%rbp),%eax
cmp    $0x41,%eax
jl     1136 <to_lower+0x36>
movsbl -0x1(%rbp),%eax
cmp    $0x5a,%eax
jg     1136 <to_lower+0x36>
movsbl -0x1(%rbp),%eax
add    $0x61,%eax
sub    $0x41,%eax
mov    %eax,-0x8(%rbp)
jmp    113d <to_lower+0x3d>
movsbl -0x1(%rbp),%eax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
movsbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<to_lower>:
lea    -0x41(%rdi),%eax
lea    0x20(%rdi),%ecx
cmp    $0x1a,%al
movzbl %cl,%eax
cmovae %edi,%eax
ret

LLVM IR (-O0):
define signext i8 @to_lower(i8 signext %0) {
%2 = alloca i8
store i8 %0, i8* %2
%3 = load i8, i8* %2
%4 = sext i8 %3 to i32
%5 = icmp sge i32 %4, 65
br i1 %5, label %6, label %15
6: ; preds = %1
%7 = load i8, i8* %2
%8 = sext i8 %7 to i32
%9 = icmp sle i32 %8, 90
br i1 %9, label %10, label %15
10: ; preds = %6
%11 = load i8, i8* %2
%12 = sext i8 %11 to i32
%13 = add nsw i32 %12, 97
%14 = sub nsw i32 %13, 65
br label %18
15: ; preds = %6, %1
%16 = load i8, i8* %2
%17 = sext i8 %16 to i32
br label %18
18: ; preds = %15, %10
%19 = phi i32 [ %14, %10 ], [ %17, %15 ]
%20 = trunc i32 %19 to i8
ret i8 %20
}

LLVM IR (-O2):
define signext i8 @to_lower(i8 signext %0) {
%2 = add i8 %0, -65
%3 = icmp ult i8 %2, 26
%4 = add i8 %0, 32
%5 = select i1 %3, i8 %4, i8 %0
ret i8 %5
}
/* Variables and functions */
int liberties(int *, int);
int atari(int *m, int p) { return liberties(m, p) == 1; }


x86 assembly (clang, -O0):
<atari>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
call   1030 <liberties@plt>
cmp    $0x1,%eax
sete   %al
and    $0x1,%al
movzbl %al,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<atari>:
push   %rax
call   1030 <liberties@plt>
xor    %ecx,%ecx
cmp    $0x1,%eax
sete   %cl
mov    %ecx,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @atari(i32* %0, i32 %1) {
%3 = alloca i32*
%4 = alloca i32
store i32* %0, i32** %3
store i32 %1, i32* %4
%5 = load i32*, i32** %3
%6 = load i32, i32* %4
%7 = call i32 @liberties(i32* %5, i32 %6)
%8 = icmp eq i32 %7, 1
%9 = zext i1 %8 to i32
ret i32 %9
}

LLVM IR (-O2):
define i32 @atari(i32* %0, i32 %1) {
%3 = tail call i32 @liberties(i32* %0, i32 %1)
%4 = icmp eq i32 %3, 1
%5 = zext i1 %4 to i32
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ write_tempbannedtemp();
void clean_tempbans(void) { write_tempbannedtemp(); }


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

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

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

LLVM IR (-O2):
define void @clean_tempbans() {
%1 = tail call i32 (...) @write_tempbannedtemp()
ret void
}
long xpow(long base, long exp) {
  long r, i;
  r = 1;
  for (i = 0; i < exp; i++) {
    r *= base;
  }
  return r;
}


x86 assembly (clang, -O0):
<xpow>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movq   $0x1,-0x18(%rbp)
movq   $0x0,-0x20(%rbp)
mov    -0x20(%rbp),%rax
cmp    -0x10(%rbp),%rax
jge    1148 <xpow+0x48>
mov    -0x8(%rbp),%rax
imul   -0x18(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x20(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x20(%rbp)
jmp    111c <xpow+0x1c>
mov    -0x18(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<xpow>:
test   %rsi,%rsi
jle    111b <xpow+0x1b>
lea    -0x1(%rsi),%rax
mov    %esi,%ecx
and    $0x7,%ecx
cmp    $0x7,%rax
jae    1121 <xpow+0x21>
mov    $0x1,%eax
jmp    1156 <xpow+0x56>
mov    $0x1,%eax
ret
and    $0xfffffffffffffff8,%rsi
mov    $0x1,%eax
nopw   0x0(%rax,%rax,1)
imul   %rdi,%rax
imul   %rdi,%rax
imul   %rdi,%rax
imul   %rdi,%rax
imul   %rdi,%rax
imul   %rdi,%rax
imul   %rdi,%rax
imul   %rdi,%rax
add    $0xfffffffffffffff8,%rsi
jne    1130 <xpow+0x30>
test   %rcx,%rcx
je     116a <xpow+0x6a>
nopl   0x0(%rax,%rax,1)
imul   %rdi,%rax
add    $0xffffffffffffffff,%rcx
jne    1160 <xpow+0x60>
ret

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

LLVM IR (-O2):
define i64 @xpow(i64 %0, i64 %1) {
%3 = icmp sgt i64 %1, 0
br i1 %3, label %4, label %33
4: ; preds = %2
%5 = add i64 %1, -1
%6 = and i64 %1, 7
%7 = icmp ult i64 %5, 7
br i1 %7, label %23, label %8
8: ; preds = %4
%9 = and i64 %1, -8
br label %10
10: ; preds = %10, %8
%11 = phi i64 [ 1, %8 ], [ %20, %10 ]
%12 = phi i64 [ 0, %8 ], [ %21, %10 ]
%13 = mul nsw i64 %11, %0
%14 = mul nsw i64 %13, %0
%15 = mul nsw i64 %14, %0
%16 = mul nsw i64 %15, %0
%17 = mul nsw i64 %16, %0
%18 = mul nsw i64 %17, %0
%19 = mul nsw i64 %18, %0
%20 = mul nsw i64 %19, %0
%21 = add i64 %12, 8
%22 = icmp eq i64 %21, %9
br i1 %22, label %23, label %10
23: ; preds = %10, %4
%24 = phi i64 [ undef, %4 ], [ %20, %10 ]
%25 = phi i64 [ 1, %4 ], [ %20, %10 ]
%26 = icmp eq i64 %6, 0
br i1 %26, label %33, label %27
27: ; preds = %23, %27
%28 = phi i64 [ %30, %27 ], [ %25, %23 ]
%29 = phi i64 [ %31, %27 ], [ 0, %23 ]
%30 = mul nsw i64 %28, %0
%31 = add i64 %29, 1
%32 = icmp eq i64 %31, %6
br i1 %32, label %33, label %27
33: ; preds = %23, %27, %2
%34 = phi i64 [ 1, %2 ], [ %24, %23 ], [ %30, %27 ]
ret i64 %34
}
/* Type definitions */
struct ttrie__iterator {
  int dummy;
};
struct ttrie__frame {
  int dummy;
};

/* Variables and functions */
struct ttrie__frame *pop_frame(struct ttrie__iterator *);
struct ttrie__frame *walk_suffix_table(struct ttrie__iterator *iter,
                                       struct ttrie__frame *lframe,
                                       int *direction) {
  struct ttrie__frame *f = pop_frame(iter);
  *direction = 6;
  return f;
}


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

x86 assembly (clang, -O2):
<walk_suffix_table>:
push   %rbx
mov    %rdx,%rbx
call   1030 <pop_frame@plt>
movl   $0x6,(%rbx)
pop    %rbx
ret

LLVM IR (-O0):
%struct.ttrie__iterator = type { i32 }
%struct.ttrie__frame = type { i32 }
define %struct.ttrie__frame* @walk_suffix_table(%struct.ttrie__iterator* %0, %struct.ttrie__frame* %1, i32* %2) {
%4 = alloca %struct.ttrie__iterator*
%5 = alloca %struct.ttrie__frame*
%6 = alloca i32*
%7 = alloca %struct.ttrie__frame*
store %struct.ttrie__iterator* %0, %struct.ttrie__iterator** %4
store %struct.ttrie__frame* %1, %struct.ttrie__frame** %5
store i32* %2, i32** %6
%8 = load %struct.ttrie__iterator*, %struct.ttrie__iterator** %4
%9 = call %struct.ttrie__frame* @pop_frame(%struct.ttrie__iterator* %8)
store %struct.ttrie__frame* %9, %struct.ttrie__frame** %7
%10 = load i32*, i32** %6
store i32 6, i32* %10
%11 = load %struct.ttrie__frame*, %struct.ttrie__frame** %7
ret %struct.ttrie__frame* %11
}

LLVM IR (-O2):
%struct.ttrie__iterator = type { i32 }
%struct.ttrie__frame = type { i32 }
define %struct.ttrie__frame* @walk_suffix_table(%struct.ttrie__iterator* %0, %struct.ttrie__frame* nocapture readnone %1, i32* nocapture writeonly %2) {
%4 = tail call %struct.ttrie__frame* @pop_frame(%struct.ttrie__iterator* %0)
store i32 6, i32* %2
ret %struct.ttrie__frame* %4
}
/* Type definitions */
struct sockaddr_storage {
  scalar_t__ ss_family;
};

/* Variables and functions */
scalar_t__ AF_LOCAL;
int _is_domain_socket(struct sockaddr_storage *address) {
  return address->ss_family == AF_LOCAL;
}


x86 assembly (clang, -O0):
<_is_domain_socket>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%rax
mov    0x2ed2(%rip),%rcx
cmp    (%rcx),%rax
sete   %al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<_is_domain_socket>:
mov    (%rdi),%rcx
mov    0x2ede(%rip),%rdx
xor    %eax,%eax
cmp    (%rdx),%rcx
sete   %al
ret

LLVM IR (-O0):
%struct.sockaddr_storage = type { i64 }
@AF_LOCAL = global i64 0
define i32 @_is_domain_socket(%struct.sockaddr_storage* %0) {
%2 = alloca %struct.sockaddr_storage*
store %struct.sockaddr_storage* %0, %struct.sockaddr_storage** %2
%3 = load %struct.sockaddr_storage*, %struct.sockaddr_storage** %2
%4 = getelementptr inbounds %struct.sockaddr_storage, %struct.sockaddr_storage* %3, i32 0, i32 0
%5 = load i64, i64* %4
%6 = load i64, i64* @AF_LOCAL
%7 = icmp eq i64 %5, %6
%8 = zext i1 %7 to i32
ret i32 %8
}

LLVM IR (-O2):
%struct.sockaddr_storage = type { i64 }
@AF_LOCAL = global i64 0
define i32 @_is_domain_socket(%struct.sockaddr_storage* nocapture %0) {
%2 = getelementptr inbounds %struct.sockaddr_storage, %struct.sockaddr_storage* %0, i64 0, i32 0
%3 = load i64, i64* %2
%4 = load i64, i64* @AF_LOCAL
%5 = icmp eq i64 %3, %4
%6 = zext i1 %5 to i32
ret i32 %6
}
void gdk_spawn_on_screen_with_pipes() {}


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

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

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

LLVM IR (-O2):
define void @gdk_spawn_on_screen_with_pipes() {
ret void
}