xunge/DecIR huggingface dataset:
__attribute__((no, noclone)) unsigned __int128 t104_5mul(signed char x) {
  unsigned __int128 r;
  if (__builtin_mul_overflow(x, (signed char)(-1), &r))
    bar();
  return r;
}


x86 assembly (clang, -O0):
<t104_5mul>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %dil,%al
mov    %al,-0x11(%rbp)
movsbq -0x11(%rbp),%rdx
mov    %rdx,%rsi
sar    $0x3f,%rsi
xor    %eax,%eax
neg    %rdx
mov    %rax,%rcx
sbb    %rsi,%rcx
sbb    %rsi,%rax
and    $0x1,%al
mov    %rdx,-0x30(%rbp)
mov    %rcx,-0x28(%rbp)
test   $0x1,%al
jne    114f <t104_5mul+0x3f>
jmp    1156 <t104_5mul+0x46>
mov    $0x0,%al
call   1030 <bar@plt>
mov    -0x30(%rbp),%rax
mov    -0x28(%rbp),%rcx
mov    %rcx,-0x8(%rbp)
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    -0x8(%rbp),%rdx
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<t104_5mul>:
push   %r14
push   %rbx
push   %rax
movslq %edi,%rbx
mov    %rbx,%rax
sar    $0x3f,%rax
xor    %r14d,%r14d
neg    %rbx
sbb    %rax,%r14
test   %dil,%dil
jle    1133 <t104_5mul+0x23>
xor    %eax,%eax
call   1030 <bar@plt>
mov    %rbx,%rax
mov    %r14,%rdx
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define { i64, i64 } @t104_5mul(i8 signext %0) {
%2 = alloca i128
%3 = alloca i8
%4 = alloca i128
store i8 %0, i8* %3
%5 = load i8, i8* %3
%6 = sext i8 %5 to i129
%7 = call { i129, i1 } @llvm.smul.with.overflow.i129(i129 %6, i129 -1)
%8 = extractvalue { i129, i1 } %7, 1
%9 = extractvalue { i129, i1 } %7, 0
%10 = trunc i129 %9 to i128
%11 = zext i128 %10 to i129
%12 = icmp ne i129 %9, %11
%13 = or i1 %8, %12
store i128 %10, i128* %4
br i1 %13, label %14, label %16
14: ; preds = %1
%15 = call i32 (...) @bar()
br label %16
16: ; preds = %14, %1
%17 = load i128, i128* %4
store i128 %17, i128* %2
%18 = bitcast i128* %2 to { i64, i64 }*
%19 = load { i64, i64 }, { i64, i64 }* %18
ret { i64, i64 } %19
}

LLVM IR (-O2):
define { i64, i64 } @t104_5mul(i8 signext %0) {
%2 = sext i8 %0 to i129
%3 = sub nsw i129 0, %2
%4 = icmp sgt i8 %0, 0
br i1 %4, label %5, label %7
5: ; preds = %1
%6 = tail call i32 (...) @bar()
br label %7
7: ; preds = %5, %1
%8 = trunc i129 %3 to i64
%9 = lshr i129 %3, 64
%10 = trunc i129 %9 to i64
%11 = insertvalue { i64, i64 } poison, i64 %8, 0
%12 = insertvalue { i64, i64 } %11, i64 %10, 1
ret { i64, i64 } %12
}
int beep(void) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @beep() {
ret i32 0
}
/* Variables and functions */
size_t strlen(char *str) {
  size_t len = 0;
  while (*str++ != '\0')
    len++;
  return len;
}


x86 assembly (clang, -O0):
<strlen>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movq   $0x0,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x8(%rbp)
movsbl (%rax),%eax
cmp    $0x0,%eax
je     113c <strlen+0x3c>
mov    -0x10(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x10(%rbp)
jmp    1110 <strlen+0x10>
mov    -0x10(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<strlen>:
cmpb   $0x0,(%rdi)
je     111f <strlen+0x1f>
xor    %ecx,%ecx
nopw   0x0(%rax,%rax,1)
lea    0x1(%rcx),%rax
cmpb   $0x0,0x1(%rdi,%rcx,1)
mov    %rax,%rcx
jne    1110 <strlen+0x10>
ret
xor    %eax,%eax
ret

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

LLVM IR (-O2):
define i64 @strlen(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = icmp eq i8 %2, 0
br i1 %3, label %11, label %4
4: ; preds = %1, %4
%5 = phi i64 [ %8, %4 ], [ 0, %1 ]
%6 = phi i8* [ %7, %4 ], [ %0, %1 ]
%7 = getelementptr inbounds i8, i8* %6, i64 1
%8 = add i64 %5, 1
%9 = load i8, i8* %7
%10 = icmp eq i8 %9, 0
br i1 %10, label %11, label %4
11: ; preds = %4, %1
%12 = phi i64 [ 0, %1 ], [ %8, %4 ]
ret i64 %12
}
unsigned char clearBit(unsigned char c, int n) { return c = (c & (~(1 << n))); }


x86 assembly (clang, -O0):
<clearBit>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x1(%rbp)
mov    %esi,-0x8(%rbp)
movzbl -0x1(%rbp),%eax
mov    -0x8(%rbp),%ecx
mov    $0x1,%edx
shl    %cl,%edx
mov    %edx,%ecx
xor    $0xffffffff,%ecx
and    %ecx,%eax
mov    %al,-0x1(%rbp)
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<clearBit>:
mov    %esi,%ecx
mov    $0x1,%eax
shl    %cl,%eax
not    %al
and    %dil,%al
ret

LLVM IR (-O0):
define zeroext i8 @clearBit(i8 zeroext %0, i32 %1) {
%3 = alloca i8
%4 = alloca i32
store i8 %0, i8* %3
store i32 %1, i32* %4
%5 = load i8, i8* %3
%6 = zext i8 %5 to i32
%7 = load i32, i32* %4
%8 = shl i32 1, %7
%9 = xor i32 %8, -1
%10 = and i32 %6, %9
%11 = trunc i32 %10 to i8
store i8 %11, i8* %3
ret i8 %11
}

LLVM IR (-O2):
define zeroext i8 @clearBit(i8 zeroext %0, i32 %1) {
%3 = shl nuw i32 1, %1
%4 = trunc i32 %3 to i8
%5 = xor i8 %4, -1
%6 = and i8 %5, %0
ret i8 %6
}
/* Type definitions */
struct list {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ free(int /*<<< orphan*/);
int /*<<< orphan*/ list_extract(struct list *);
void list_remove(struct list *l) { free(list_extract(l)); }


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

x86 assembly (clang, -O2):
<list_remove>:
push   %rax
call   1040 <list_extract@plt>
mov    %eax,%edi
pop    %rax
jmp    1030 <free@plt>

LLVM IR (-O0):
%struct.list = type { i32 }
define void @list_remove(%struct.list* %0) {
%2 = alloca %struct.list*
store %struct.list* %0, %struct.list** %2
%3 = load %struct.list*, %struct.list** %2
%4 = call i32 @list_extract(%struct.list* %3)
%5 = call i32 @free(i32 %4)
ret void
}

LLVM IR (-O2):
%struct.list = type { i32 }
define void @list_remove(%struct.list* %0) {
%2 = tail call i32 @list_extract(%struct.list* %0)
%3 = tail call i32 @free(i32 %2)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ EXIT_FAILURE;
int /*<<< orphan*/ EXIT_SUCCESS;
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ open_sockets(char *);
int /*<<< orphan*/ printf(char *);
int main(int argc, char *argv[]) {
  if (argc < 1) {
    printf("Pass filename of socket file as argument.\n");
    exit(EXIT_FAILURE);
  }
  open_sockets(argv[1]);
  exit(EXIT_SUCCESS);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
cmpl   $0x1,-0x8(%rbp)
jge    116a <main+0x3a>
lea    0xea9(%rip),%rdi
call   1030 <printf@plt>
mov    0x2e7d(%rip),%rax
mov    (%rax),%edi
call   1050 <exit@plt>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
call   1040 <open_sockets@plt>
mov    0x2e5a(%rip),%rax
mov    (%rax),%edi
call   1050 <exit@plt>

x86 assembly (clang, -O2):
<main>:
push   %rax
test   %edi,%edi
jg     114f <main+0x1f>
lea    0xec4(%rip),%rdi
call   1030 <puts@plt>
mov    0x2e98(%rip),%rax
mov    (%rax),%edi
call   1050 <exit@plt>
mov    0x8(%rsi),%rdi
call   1040 <open_sockets@plt>
mov    0x2e79(%rip),%rax
mov    (%rax),%edi
call   1050 <exit@plt>

LLVM IR (-O0):
@.str = [43 x i8] c"Pass filename of socket file as argument.\0A\00"
@EXIT_FAILURE = global i32 0
@EXIT_SUCCESS = global i32 0
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%6 = load i32, i32* %4
%7 = icmp slt i32 %6, 1
br i1 %7, label %8, label %12
8: ; preds = %2
%9 = call i32 @printf(i8* getelementptr inbounds ([43 x i8], [43 x i8]* @.str, i64 0, i64 0))
%10 = load i32, i32* @EXIT_FAILURE
%11 = call i32 @exit(i32 %10)
unreachable
12: ; preds = %2
%13 = load i8**, i8*** %5
%14 = getelementptr inbounds i8*, i8** %13, i64 1
%15 = load i8*, i8** %14
%16 = call i32 @open_sockets(i8* %15)
%17 = load i32, i32* @EXIT_SUCCESS
%18 = call i32 @exit(i32 %17)
unreachable
}

LLVM IR (-O2):
@EXIT_FAILURE = global i32 0
@EXIT_SUCCESS = global i32 0
@str = [42 x i8] c"Pass filename of socket file as argument.\00"
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = icmp slt i32 %0, 1
br i1 %3, label %4, label %8
4: ; preds = %2
%5 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([42 x i8], [42 x i8]* @str, i64 0, i64 0))
%6 = load i32, i32* @EXIT_FAILURE
%7 = tail call i32 @exit(i32 %6)
unreachable
8: ; preds = %2
%9 = getelementptr inbounds i8*, i8** %1, i64 1
%10 = load i8*, i8** %9
%11 = tail call i32 @open_sockets(i8* %10)
%12 = load i32, i32* @EXIT_SUCCESS
%13 = tail call i32 @exit(i32 %12)
unreachable
}
long long int fact(int n) {
  static long long int F[13] = {1, 1, 2};
  if (F[n])
    return F[n];
  return F[n] = (long long int)(n)*fact(n - 1);
}


x86 assembly (clang, -O0):
<fact>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0xc(%rbp)
movslq -0xc(%rbp),%rcx
lea    0x2f0a(%rip),%rax
cmpq   $0x0,(%rax,%rcx,8)
je     1149 <fact+0x39>
movslq -0xc(%rbp),%rcx
lea    0x2ef4(%rip),%rax
mov    (%rax,%rcx,8),%rax
mov    %rax,-0x8(%rbp)
jmp    117a <fact+0x6a>
movslq -0xc(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0xc(%rbp),%edi
sub    $0x1,%edi
call   1030 <fact@plt>
mov    %rax,%rcx
mov    -0x18(%rbp),%rax
imul   %rcx,%rax
movslq -0xc(%rbp),%rdx
lea    0x2ebe(%rip),%rcx
mov    %rax,(%rcx,%rdx,8)
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fact>:
push   %r14
push   %rbx
push   %rax
movslq %edi,%rbx
lea    0x2f12(%rip),%r14
mov    (%r14,%rbx,8),%rax
test   %rax,%rax
jne    1137 <fact+0x27>
lea    -0x1(%rbx),%edi
call   1030 <fact@plt>
imul   %rbx,%rax
mov    %rax,(%r14,%rbx,8)
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@fact.F = internal global <{ i64, i64, i64, [10 x i64] }> <{ i64 1, i64 1, i64 2, [10 x i64] zeroinitializer }>
define i64 @fact(i32 %0) {
%2 = alloca i64
%3 = alloca i32
store i32 %0, i32* %3
%4 = load i32, i32* %3
%5 = sext i32 %4 to i64
%6 = getelementptr inbounds [13 x i64], [13 x i64]* bitcast (<{ i64, i64, i64, [10 x i64] }>* @fact.F to [13 x i64]*), i64 0, i64 %5
%7 = load i64, i64* %6
%8 = icmp ne i64 %7, 0
br i1 %8, label %9, label %14
9: ; preds = %1
%10 = load i32, i32* %3
%11 = sext i32 %10 to i64
%12 = getelementptr inbounds [13 x i64], [13 x i64]* bitcast (<{ i64, i64, i64, [10 x i64] }>* @fact.F to [13 x i64]*), i64 0, i64 %11
%13 = load i64, i64* %12
store i64 %13, i64* %2
br label %24
14: ; preds = %1
%15 = load i32, i32* %3
%16 = sext i32 %15 to i64
%17 = load i32, i32* %3
%18 = sub nsw i32 %17, 1
%19 = call i64 @fact(i32 %18)
%20 = mul nsw i64 %16, %19
%21 = load i32, i32* %3
%22 = sext i32 %21 to i64
%23 = getelementptr inbounds [13 x i64], [13 x i64]* bitcast (<{ i64, i64, i64, [10 x i64] }>* @fact.F to [13 x i64]*), i64 0, i64 %22
store i64 %20, i64* %23
store i64 %20, i64* %2
br label %24
24: ; preds = %14, %9
%25 = load i64, i64* %2
ret i64 %25
}

LLVM IR (-O2):
@fact.F = internal unnamed_addr global <{ i64, i64, i64, [10 x i64] }> <{ i64 1, i64 1, i64 2, [10 x i64] zeroinitializer }>
define i64 @fact(i32 %0) {
%2 = sext i32 %0 to i64
%3 = getelementptr inbounds [13 x i64], [13 x i64]* bitcast (<{ i64, i64, i64, [10 x i64] }>* @fact.F to [13 x i64]*), i64 0, i64 %2
%4 = load i64, i64* %3
%5 = icmp eq i64 %4, 0
br i1 %5, label %8, label %6
6: ; preds = %1, %8
%7 = phi i64 [ %11, %8 ], [ %4, %1 ]
ret i64 %7
8: ; preds = %1
%9 = add nsw i32 %0, -1
%10 = tail call i64 @fact(i32 %9)
%11 = mul nsw i64 %10, %2
store i64 %11, i64* %3
br label %6
}
/* Variables and functions */
int /*<<< orphan*/ memset(char *, int /*<<< orphan*/, size_t);
void *sat_extend(void *, size_t, size_t, size_t, size_t);
void *sat_zextend(void *buf, size_t len, size_t nmemb, size_t size,
                  size_t block) {
  buf = sat_extend(buf, len, nmemb, size, block);
  memset((char *)buf + len * size, 0, nmemb * size);
  return buf;
}


x86 assembly (clang, -O0):
<sat_zextend>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    %r8,-0x28(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
mov    -0x20(%rbp),%rcx
mov    -0x28(%rbp),%r8
call   1030 <sat_extend@plt>
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rax
imul   -0x20(%rbp),%rax
add    %rax,%rdi
mov    -0x18(%rbp),%rdx
imul   -0x20(%rbp),%rdx
xor    %esi,%esi
call   1040 <memset@plt>
mov    -0x8(%rbp),%rax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<sat_zextend>:
push   %r15
push   %r14
push   %r12
push   %rbx
push   %rax
mov    %rcx,%r15
mov    %rdx,%r14
mov    %rsi,%rbx
call   1030 <sat_extend@plt>
mov    %rax,%r12
imul   %r15,%rbx
add    %rax,%rbx
imul   %r14,%r15
mov    %rbx,%rdi
xor    %esi,%esi
mov    %r15,%rdx
call   1040 <memset@plt>
mov    %r12,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
define i8* @sat_zextend(i8* %0, i64 %1, i64 %2, i64 %3, i64 %4) {
%6 = alloca i8*
%7 = alloca i64
%8 = alloca i64
%9 = alloca i64
%10 = alloca i64
store i8* %0, i8** %6
store i64 %1, i64* %7
store i64 %2, i64* %8
store i64 %3, i64* %9
store i64 %4, i64* %10
%11 = load i8*, i8** %6
%12 = load i64, i64* %7
%13 = load i64, i64* %8
%14 = load i64, i64* %9
%15 = load i64, i64* %10
%16 = call i8* @sat_extend(i8* %11, i64 %12, i64 %13, i64 %14, i64 %15)
store i8* %16, i8** %6
%17 = load i8*, i8** %6
%18 = load i64, i64* %7
%19 = load i64, i64* %9
%20 = mul i64 %18, %19
%21 = getelementptr inbounds i8, i8* %17, i64 %20
%22 = load i64, i64* %8
%23 = load i64, i64* %9
%24 = mul i64 %22, %23
%25 = call i32 @memset(i8* %21, i32 0, i64 %24)
%26 = load i8*, i8** %6
ret i8* %26
}

LLVM IR (-O2):
define i8* @sat_zextend(i8* %0, i64 %1, i64 %2, i64 %3, i64 %4) {
%6 = tail call i8* @sat_extend(i8* %0, i64 %1, i64 %2, i64 %3, i64 %4)
%7 = mul i64 %3, %1
%8 = getelementptr inbounds i8, i8* %6, i64 %7
%9 = mul i64 %3, %2
%10 = tail call i32 @memset(i8* %8, i32 0, i64 %9)
ret i8* %6
}
float fahr2celsius(float fahr) { return 5.0 / 9.0 * (fahr - 32.0); }


x86 assembly (clang, -O0):
<fahr2celsius>:
push   %rbp
mov    %rsp,%rbp
movss  %xmm0,-0x4(%rbp)
movss  -0x4(%rbp),%xmm0
cvtss2sd %xmm0,%xmm1
movsd  0xeee(%rip),%xmm0
subsd  %xmm0,%xmm1
movsd  0xeda(%rip),%xmm0
mulsd  %xmm1,%xmm0
cvtsd2ss %xmm0,%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<fahr2celsius>:
cvtss2sd %xmm0,%xmm0
addsd  0xef4(%rip),%xmm0
mulsd  0xef4(%rip),%xmm0
cvtsd2ss %xmm0,%xmm0
ret

LLVM IR (-O0):
define float @fahr2celsius(float %0) {
%2 = alloca float
store float %0, float* %2
%3 = load float, float* %2
%4 = fpext float %3 to double
%5 = fsub double %4, 3.200000e+01
%6 = fmul double 0x3FE1C71C71C71C72, %5
%7 = fptrunc double %6 to float
ret float %7
}

LLVM IR (-O2):
define float @fahr2celsius(float %0) {
%2 = fpext float %0 to double
%3 = fadd double %2, -3.200000e+01
%4 = fmul double %3, 0x3FE1C71C71C71C72
%5 = fptrunc double %4 to float
ret float %5
}
/* Variables and functions */
int /*<<< orphan*/ usage();
int /*<<< orphan*/ warnx(char *);
void badformat(void) {
  warnx("illegal time format");
  usage();
}


x86 assembly (clang, -O0):
<badformat>:
push   %rbp
mov    %rsp,%rbp
lea    0xed5(%rip),%rdi
call   1030 <warnx@plt>
mov    $0x0,%al
call   1040 <usage@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<badformat>:
push   %rax
lea    0xed8(%rip),%rdi
call   1030 <warnx@plt>
xor    %eax,%eax
pop    %rcx
jmp    1040 <usage@plt>

LLVM IR (-O0):
@.str = [20 x i8] c"illegal time format\00"
define void @badformat() {
%1 = call i32 @warnx(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0))
%2 = call i32 (...) @usage()
ret void
}

LLVM IR (-O2):
@.str = [20 x i8] c"illegal time format\00"
define void @badformat() {
%1 = tail call i32 @warnx(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0))
%2 = tail call i32 (...) @usage()
ret void
}
/* Variables and functions */
bool is_letter(char sym) {
  if (sym >= 'a' && sym <= 'z')
    return true;
  return false;
}


x86 assembly (clang, -O0):
<is_letter>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x5(%rbp)
movsbl -0x5(%rbp),%eax
cmp    $0x61,%eax
jl     1130 <is_letter+0x30>
movsbl -0x5(%rbp),%eax
cmp    $0x7a,%eax
jg     1130 <is_letter+0x30>
movl   $0x1,-0x4(%rbp)
jmp    1137 <is_letter+0x37>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<is_letter>:
add    $0x9f,%dil
xor    %eax,%eax
cmp    $0x1a,%dil
setb   %al
ret

LLVM IR (-O0):
define i32 @is_letter(i8 signext %0) {
%2 = alloca i32
%3 = alloca i8
store i8 %0, i8* %3
%4 = load i8, i8* %3
%5 = sext i8 %4 to i32
%6 = icmp sge i32 %5, 97
br i1 %6, label %7, label %12
7: ; preds = %1
%8 = load i8, i8* %3
%9 = sext i8 %8 to i32
%10 = icmp sle i32 %9, 122
br i1 %10, label %11, label %12
11: ; preds = %7
store i32 1, i32* %2
br label %13
12: ; preds = %7, %1
store i32 0, i32* %2
br label %13
13: ; preds = %12, %11
%14 = load i32, i32* %2
ret i32 %14
}

LLVM IR (-O2):
define i32 @is_letter(i8 signext %0) {
%2 = add i8 %0, -97
%3 = icmp ult i8 %2, 26
%4 = zext i1 %3 to i32
ret i32 %4
}
/* Variables and functions */
scalar_t__ ceil(double);
double log(int);
int calc_k(double a, double b) {
  double k;
  k = (log(b - a) - log(0.00000000001)) / log(2);
  return (int)ceil(k);
}


x86 assembly (clang, -O0):
<calc_k>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  -0x10(%rbp),%xmm0
subsd  -0x8(%rbp),%xmm0
cvttsd2si %xmm0,%edi
call   1040 <log@plt>
movsd  %xmm0,-0x28(%rbp)
xor    %edi,%edi
call   1040 <log@plt>
movaps %xmm0,%xmm1
movsd  -0x28(%rbp),%xmm0
subsd  %xmm1,%xmm0
movsd  %xmm0,-0x20(%rbp)
mov    $0x2,%edi
call   1040 <log@plt>
movaps %xmm0,%xmm1
movsd  -0x20(%rbp),%xmm0
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x18(%rbp)
movsd  -0x18(%rbp),%xmm0
call   1030 <ceil@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<calc_k>:
push   %rax
subsd  %xmm0,%xmm1
cvttsd2si %xmm1,%edi
call   1040 <log@plt>
movsd  %xmm0,(%rsp)
xor    %edi,%edi
call   1040 <log@plt>
movsd  (%rsp),%xmm1
subsd  %xmm0,%xmm1
movsd  %xmm1,(%rsp)
mov    $0x2,%edi
call   1040 <log@plt>
movsd  (%rsp),%xmm1
divsd  %xmm0,%xmm1
movapd %xmm1,%xmm0
pop    %rax
jmp    1030 <ceil@plt>

LLVM IR (-O0):
define i32 @calc_k(double %0, double %1) {
%3 = alloca double
%4 = alloca double
%5 = alloca double
store double %0, double* %3
store double %1, double* %4
%6 = load double, double* %4
%7 = load double, double* %3
%8 = fsub double %6, %7
%9 = fptosi double %8 to i32
%10 = call double @log(i32 %9)
%11 = call double @log(i32 0)
%12 = fsub double %10, %11
%13 = call double @log(i32 2)
%14 = fdiv double %12, %13
store double %14, double* %5
%15 = load double, double* %5
%16 = call i64 @ceil(double %15)
%17 = trunc i64 %16 to i32
ret i32 %17
}

LLVM IR (-O2):
define i32 @calc_k(double %0, double %1) {
%3 = fsub double %1, %0
%4 = fptosi double %3 to i32
%5 = tail call double @log(i32 %4)
%6 = tail call double @log(i32 0)
%7 = fsub double %5, %6
%8 = tail call double @log(i32 2)
%9 = fdiv double %7, %8
%10 = tail call i64 @ceil(double %9)
%11 = trunc i64 %10 to i32
ret i32 %11
}
void ff_vdpau_h264_set_reference_frames() {}


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

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

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

LLVM IR (-O2):
define void @ff_vdpau_h264_set_reference_frames() {
ret void
}
/* Type definitions */
struct tm {
  int dummy;
};

/* Variables and functions */
size_t __infer_nondet_int();
size_t strftime(char *__restrict s, size_t maxsize,
                const char *__restrict format,
                const struct tm *__restrict timeptr) {
  size_t res;
  res = __infer_nondet_int();
  if (res < 0)
    while (1)
      ;
  return res;
}


x86 assembly (clang, -O0):
<strftime>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    $0x0,%al
call   1030 <__infer_nondet_int@plt>
mov    %rax,-0x28(%rbp)
cmpq   $0x0,-0x28(%rbp)
jae    1148 <strftime+0x38>
jmp    1143 <strftime+0x33>
jmp    1143 <strftime+0x33>
mov    -0x28(%rbp),%rax
add    $0x30,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
%struct.tm = type { i32 }
define i64 @strftime(i8* noalias %0, i64 %1, i8* noalias %2, %struct.tm* noalias %3) {
%5 = alloca i8*
%6 = alloca i64
%7 = alloca i8*
%8 = alloca %struct.tm*
%9 = alloca i64
store i8* %0, i8** %5
store i64 %1, i64* %6
store i8* %2, i8** %7
store %struct.tm* %3, %struct.tm** %8
%10 = call i64 (...) @__infer_nondet_int()
store i64 %10, i64* %9
%11 = load i64, i64* %9
%12 = icmp ult i64 %11, 0
br i1 %12, label %13, label %15
13: ; preds = %4
br label %14
14: ; preds = %13, %14
br label %14
15: ; preds = %4
%16 = load i64, i64* %9
ret i64 %16
}

LLVM IR (-O2):
%struct.tm = type { i32 }
define i64 @strftime(i8* noalias nocapture readnone %0, i64 %1, i8* noalias nocapture readnone %2, %struct.tm* noalias nocapture readnone %3) {
%5 = tail call i64 (...) @__infer_nondet_int()
ret i64 %5
}
/* Type definitions */
typedef int /*<<< orphan*/ ASN1_VISIBLESTRING;
typedef int /*<<< orphan*/ ASN1_VALUE;

/* Variables and functions */
int /*<<< orphan*/ ASN1_VISIBLESTRING_it;
scalar_t__ ASN1_item_d2i(int /*<<< orphan*/ **, unsigned char const **, long,
                         int /*<<< orphan*/ *);
ASN1_VISIBLESTRING *d2i_ASN1_VISIBLESTRING(ASN1_VISIBLESTRING **a,
                                           const unsigned char **in, long len) {
  return (ASN1_VISIBLESTRING *)ASN1_item_d2i((ASN1_VALUE **)a, in, len,
                                             &ASN1_VISIBLESTRING_it);
}


x86 assembly (clang, -O0):
<d2i_ASN1_VISIBLESTRING>:
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),%rdx
mov    0x2ea9(%rip),%rcx
call   1030 <ASN1_item_d2i@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<d2i_ASN1_VISIBLESTRING>:
mov    0x2ec9(%rip),%rcx
jmp    1030 <ASN1_item_d2i@plt>

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

LLVM IR (-O2):
@ASN1_VISIBLESTRING_it = global i32 0
define i32* @d2i_ASN1_VISIBLESTRING(i32** %0, i8** %1, i64 %2) {
%4 = tail call i64 @ASN1_item_d2i(i32** %0, i8** %1, i64 %2, i32* @ASN1_VISIBLESTRING_it)
%5 = inttoptr i64 %4 to i32*
ret i32* %5
}
void TOKEN_RIGHT_ASSIGN(int x, int y) { x >>= y; }


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

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

LLVM IR (-O0):
define void @TOKEN_RIGHT_ASSIGN(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 = load i32, i32* %3
%7 = ashr i32 %6, %5
store i32 %7, i32* %3
ret void
}

LLVM IR (-O2):
define void @TOKEN_RIGHT_ASSIGN(i32 %0, i32 %1) {
ret void
}
/* Variables and functions */
scalar_t__ isspace(char);
char *ltrim(char *string) {
  if (string == NULL) {
    return NULL;
  }
  while (isspace(*string)) {
    string++;
  }
  return string;
}


x86 assembly (clang, -O0):
<ltrim>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
jne    1134 <ltrim+0x24>
movq   $0x0,-0x8(%rbp)
jmp    1168 <ltrim+0x58>
jmp    1139 <ltrim+0x29>
mov    -0x10(%rbp),%rax
movsbl (%rax),%edi
call   1030 <isspace@plt>
cmp    $0x0,%rax
je     1160 <ltrim+0x50>
mov    -0x10(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x10(%rbp)
jmp    1139 <ltrim+0x29>
mov    -0x10(%rbp),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ltrim>:
push   %rbx
test   %rdi,%rdi
je     1134 <ltrim+0x24>
mov    %rdi,%rbx
add    $0xffffffffffffffff,%rbx
nopl   (%rax)
movsbl 0x1(%rbx),%edi
add    $0x1,%rbx
call   1030 <isspace@plt>
test   %rax,%rax
jne    1120 <ltrim+0x10>
jmp    1136 <ltrim+0x26>
xor    %ebx,%ebx
mov    %rbx,%rax
pop    %rbx
ret

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

LLVM IR (-O2):
define i8* @ltrim(i8* %0) {
%2 = icmp eq i8* %0, null
br i1 %2, label %9, label %3
3: ; preds = %1, %3
%4 = phi i8* [ %8, %3 ], [ %0, %1 ]
%5 = load i8, i8* %4
%6 = tail call i64 @isspace(i8 signext %5)
%7 = icmp eq i64 %6, 0
%8 = getelementptr inbounds i8, i8* %4, i64 1
br i1 %7, label %9, label %3
9: ; preds = %3, %1
%10 = phi i8* [ null, %1 ], [ %4, %3 ]
ret i8* %10
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
int /*<<< orphan*/ scanf(char *, int *, int *);
int main() {
  int a, b;
  scanf("%d %d", &a, &b);
  if (a > b) {
    printf("%d\n", a);
  } else {
    printf("%d\n", b);
  }
  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
lea    -0xc(%rbp),%rdx
call   1040 <scanf@plt>
mov    -0x8(%rbp),%eax
cmp    -0xc(%rbp),%eax
jle    1163 <main+0x43>
mov    -0x8(%rbp),%esi
lea    0xead(%rip),%rdi
call   1030 <printf@plt>
jmp    1172 <main+0x52>
mov    -0xc(%rbp),%esi
lea    0xe99(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xed8(%rip),%rdi
lea    0x4(%rsp),%rsi
mov    %rsp,%rdx
call   1040 <scanf@plt>
mov    0x4(%rsp),%eax
mov    (%rsp),%esi
cmp    %esi,%eax
cmovg  %eax,%esi
lea    0xebe(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
@.str = [6 x i8] c"%d %d\00"
@.str.1 = [4 x i8] c"%d\0A\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 ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i32* %1, i32* %2)
%6 = load i32, i32* %1
%7 = load i32, i32* %2
%8 = icmp sgt i32 %6, %7
%9 = select i1 %8, i32 %6, i32 %7
%10 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i32 %9)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ abort();
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
int /*<<< orphan*/ stderr;
void *localtime64() {
  fprintf(stderr, "nixpkgs: call into localtime64_r\n");
  abort();
}


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

x86 assembly (clang, -O2):
<localtime64>:
push   %rax
mov    0x2eb8(%rip),%rax
mov    (%rax),%edi
lea    0xecf(%rip),%rsi
call   1040 <fprintf@plt>
xor    %eax,%eax
call   1030 <abort@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [34 x i8] c"nixpkgs: call into localtime64_r\0A\00"
define i8* @localtime64() {
%1 = load i32, i32* @stderr
%2 = call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str, i64 0, i64 0))
%3 = call i32 (...) @abort()
unreachable
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [34 x i8] c"nixpkgs: call into localtime64_r\0A\00"
define noalias i8* @localtime64() {
%1 = load i32, i32* @stderr
%2 = tail call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str, i64 0, i64 0))
%3 = tail call i32 (...) @abort()
unreachable
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void fun3(int a) { printf("You shoud not see this.\n"); }


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

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

LLVM IR (-O0):
@.str = [25 x i8] c"You shoud not see this.\0A\00"
define void @fun3(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = call i32 @printf(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@str = [24 x i8] c"You shoud not see this.\00"
define void @fun3(i32 %0) {
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([24 x i8], [24 x i8]* @str, i64 0, i64 0))
ret void
}
/* Variables and functions */
int increment(int);
int /*<<< orphan*/ printf(char *, ...);
int main(void) {
  int x = 2;
  printf("x is now %d\n", x);
  printf("Incrementing...\n");
  x = increment(x);
  printf("Incremented!\n");
  printf("x is now %d\n", x);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x2,-0x4(%rbp)
mov    -0x4(%rbp),%esi
lea    0xec7(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
lea    0xec6(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    -0x4(%rbp),%edi
call   1030 <increment@plt>
mov    %eax,-0x4(%rbp)
lea    0xebe(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    -0x4(%rbp),%esi
lea    0xe8f(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %rbx
push   %rax
lea    0xec6(%rip),%rbx
mov    %rbx,%rdi
mov    $0x2,%esi
xor    %eax,%eax
call   1050 <printf@plt>
lea    0xebd(%rip),%rdi
call   1030 <puts@plt>
mov    $0x2,%edi
call   1040 <increment@plt>
mov    %eax,%ebp
lea    0xeb5(%rip),%rdi
call   1030 <puts@plt>
mov    %rbx,%rdi
mov    %ebp,%esi
xor    %eax,%eax
call   1050 <printf@plt>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

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

LLVM IR (-O2):
@.str = [13 x i8] c"x is now %d\0A\00"
@str = [16 x i8] c"Incrementing...\00"
@str.3 = [13 x i8] c"Incremented!\00"
define i32 @main() {
%1 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0), i32 2)
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([16 x i8], [16 x i8]* @str, i64 0, i64 0))
%3 = tail call i32 @increment(i32 2)
%4 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([13 x i8], [13 x i8]* @str.3, i64 0, i64 0))
%5 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0), i32 %3)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ foo(unsigned short);
__attribute__((no, noclone)) unsigned short f7(unsigned short x,
                                               unsigned short y) {
  unsigned short r = x + y;
  if (x <= r)
    foo(r);
  return r;
}


x86 assembly (clang, -O0):
<f7>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %si,%ax
mov    %di,%cx
mov    %cx,-0x2(%rbp)
mov    %ax,-0x4(%rbp)
movzwl -0x2(%rbp),%eax
movzwl -0x4(%rbp),%ecx
add    %ecx,%eax
mov    %ax,-0x6(%rbp)
movzwl -0x2(%rbp),%eax
movzwl -0x6(%rbp),%ecx
cmp    %ecx,%eax
jg     114d <f7+0x3d>
movzwl -0x6(%rbp),%edi
call   1030 <foo@plt>
movzwl -0x6(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<f7>:
push   %rbx
mov    %esi,%ebx
add    %di,%bx
jb     1120 <f7+0x10>
movzwl %bx,%edi
call   1030 <foo@plt>
mov    %ebx,%eax
pop    %rbx
ret

LLVM IR (-O0):
define zeroext i16 @f7(i16 zeroext %0, i16 zeroext %1) {
%3 = alloca i16
%4 = alloca i16
%5 = alloca i16
store i16 %0, i16* %3
store i16 %1, i16* %4
%6 = load i16, i16* %3
%7 = zext i16 %6 to i32
%8 = load i16, i16* %4
%9 = zext i16 %8 to i32
%10 = add nsw i32 %7, %9
%11 = trunc i32 %10 to i16
store i16 %11, i16* %5
%12 = load i16, i16* %3
%13 = zext i16 %12 to i32
%14 = load i16, i16* %5
%15 = zext i16 %14 to i32
%16 = icmp sle i32 %13, %15
br i1 %16, label %17, label %20
17: ; preds = %2
%18 = load i16, i16* %5
%19 = call i32 @foo(i16 zeroext %18)
br label %20
20: ; preds = %17, %2
%21 = load i16, i16* %5
ret i16 %21
}

LLVM IR (-O2):
define zeroext i16 @f7(i16 zeroext %0, i16 zeroext %1) {
%3 = add i16 %1, %0
%4 = icmp ult i16 %3, %0
br i1 %4, label %7, label %5
5: ; preds = %2
%6 = tail call i32 @foo(i16 zeroext %3)
br label %7
7: ; preds = %5, %2
ret i16 %3
}
void mdp4_dmap_done_lcdc(int cndx) {}


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

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

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

LLVM IR (-O2):
define void @mdp4_dmap_done_lcdc(i32 %0) {
ret void
}
char trim(char c) { return (c & 0x7f); }


x86 assembly (clang, -O0):
<trim>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movsbl -0x1(%rbp),%eax
and    $0x7f,%eax
movsbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<trim>:
mov    %edi,%eax
and    $0x7f,%al
ret

LLVM IR (-O0):
define signext i8 @trim(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, 127
%6 = trunc i32 %5 to i8
ret i8 %6
}

LLVM IR (-O2):
define signext i8 @trim(i8 signext %0) {
%2 = and i8 %0, 127
ret i8 %2
}
/* Type definitions */
typedef int /*<<< orphan*/ off_t;

/* Variables and functions */
void *__wrap_mmap64(void *, size_t, int, int, int, int /*<<< orphan*/);
void *__wrap_mmap(void *addr, size_t length, int prot, int flags, int fd,
                  off_t offset) {
  return __wrap_mmap64(addr, length, prot, flags, fd, offset);
}


x86 assembly (clang, -O0):
<__wrap_mmap>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    %ecx,-0x18(%rbp)
mov    %r8d,-0x1c(%rbp)
mov    %r9d,-0x20(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x14(%rbp),%edx
mov    -0x18(%rbp),%ecx
mov    -0x1c(%rbp),%r8d
mov    -0x20(%rbp),%r9d
call   1030 <__wrap_mmap64@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<__wrap_mmap>:
jmp    1030 <__wrap_mmap64@plt>

LLVM IR (-O0):
define i8* @__wrap_mmap(i8* %0, i64 %1, i32 %2, i32 %3, i32 %4, i32 %5) {
%7 = alloca i8*
%8 = alloca i64
%9 = alloca i32
%10 = alloca i32
%11 = alloca i32
%12 = alloca i32
store i8* %0, i8** %7
store i64 %1, i64* %8
store i32 %2, i32* %9
store i32 %3, i32* %10
store i32 %4, i32* %11
store i32 %5, i32* %12
%13 = load i8*, i8** %7
%14 = load i64, i64* %8
%15 = load i32, i32* %9
%16 = load i32, i32* %10
%17 = load i32, i32* %11
%18 = load i32, i32* %12
%19 = call i8* @__wrap_mmap64(i8* %13, i64 %14, i32 %15, i32 %16, i32 %17, i32 %18)
ret i8* %19
}

LLVM IR (-O2):
define i8* @__wrap_mmap(i8* %0, i64 %1, i32 %2, i32 %3, i32 %4, i32 %5) {
%7 = tail call i8* @__wrap_mmap64(i8* %0, i64 %1, i32 %2, i32 %3, i32 %4, i32 %5)
ret i8* %7
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int recur(char *type) {
  printf("[\033[31mError\033[0m] "
         "you should add MCOP_REC to gcc for using -r option\n");
}


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

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

LLVM IR (-O0):
@.str = [69 x i8] c"[\1B[31mError\1B[0m] you should add MCOP_REC to gcc for using -r option\0A\00"
define i32 @recur(i8* %0) {
%2 = alloca i32
%3 = alloca i8*
store i8* %0, i8** %3
%4 = call i32 @printf(i8* getelementptr inbounds ([69 x i8], [69 x i8]* @.str, i64 0, i64 0))
%5 = load i32, i32* %2
ret i32 %5
}

LLVM IR (-O2):
@str = [68 x i8] c"[\1B[31mError\1B[0m] you should add MCOP_REC to gcc for using -r option\00"
define i32 @recur(i8* nocapture readnone %0) {
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([68 x i8], [68 x i8]* @str, i64 0, i64 0))
ret i32 undef
}
int f() {
  __label__ l;
l:
  p();
}


x86 assembly (clang, -O0):
<f>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1030 <p@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @f() {
%1 = alloca i32
br label %2
2: ; preds = %0
%3 = call i32 (...) @p()
%4 = load i32, i32* %1
ret i32 %4
}

LLVM IR (-O2):
define i32 @f() {
%1 = tail call i32 (...) @p()
ret i32 undef
}
void fxx(int *pa, int *pb) {
  *pa = 0;
  *pb = 1;
}


x86 assembly (clang, -O0):
<fxx>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
movl   $0x0,(%rax)
mov    -0x10(%rbp),%rax
movl   $0x1,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<fxx>:
movl   $0x0,(%rdi)
movl   $0x1,(%rsi)
ret

LLVM IR (-O0):
define void @fxx(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
store i32 0, i32* %5
%6 = load i32*, i32** %4
store i32 1, i32* %6
ret void
}

LLVM IR (-O2):
define void @fxx(i32* nocapture writeonly %0, i32* nocapture writeonly %1) {
store i32 0, i32* %0
store i32 1, i32* %1
ret void
}
int rfpdn(int x) { return x + 1; }


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

x86 assembly (clang, -O2):
<rfpdn>:
lea    0x1(%rdi),%eax
ret

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

LLVM IR (-O2):
define i32 @rfpdn(i32 %0) {
%2 = add nsw i32 %0, 1
ret i32 %2
}
/* Variables and functions */
int /*<<< orphan*/ MON_7;
char *nl_langinfo(int /*<<< orphan*/);
char *langinfo_mon_7() { return nl_langinfo(MON_7); }


x86 assembly (clang, -O0):
<langinfo_mon_7>:
push   %rbp
mov    %rsp,%rbp
mov    0x2ecd(%rip),%rax
mov    (%rax),%edi
call   1030 <nl_langinfo@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<langinfo_mon_7>:
mov    0x2ed1(%rip),%rax
mov    (%rax),%edi
jmp    1030 <nl_langinfo@plt>

LLVM IR (-O0):
@MON_7 = global i32 0
define i8* @langinfo_mon_7() {
%1 = load i32, i32* @MON_7
%2 = call i8* @nl_langinfo(i32 %1)
ret i8* %2
}

LLVM IR (-O2):
@MON_7 = global i32 0
define i8* @langinfo_mon_7() {
%1 = load i32, i32* @MON_7
%2 = tail call i8* @nl_langinfo(i32 %1)
ret i8* %2
}
void admhc_dump_ed(const struct admhcd *ahcd, const char *label,
                   const struct ed *ed, int verbose) {}


x86 assembly (clang, -O0):
<admhc_dump_ed>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %ecx,-0x1c(%rbp)
pop    %rbp
ret

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

LLVM IR (-O0):
%struct.admhcd = type opaque
%struct.ed = type opaque
define void @admhc_dump_ed(%struct.admhcd* %0, i8* %1, %struct.ed* %2, i32 %3) {
%5 = alloca %struct.admhcd*
%6 = alloca i8*
%7 = alloca %struct.ed*
%8 = alloca i32
store %struct.admhcd* %0, %struct.admhcd** %5
store i8* %1, i8** %6
store %struct.ed* %2, %struct.ed** %7
store i32 %3, i32* %8
ret void
}

LLVM IR (-O2):
%struct.admhcd = type opaque
%struct.ed = type opaque
define void @admhc_dump_ed(%struct.admhcd* nocapture %0, i8* nocapture %1, %struct.ed* nocapture %2, i32 %3) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ show_mouse_tracking(char const *, char *);
int test_mouse_button_event(const char *the_title) {
  show_mouse_tracking(the_title, "?1002");
  return 1;
}


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

x86 assembly (clang, -O2):
<test_mouse_button_event>:
push   %rax
lea    0xee8(%rip),%rsi
call   1030 <show_mouse_tracking@plt>
mov    $0x1,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [6 x i8] c"?1002\00"
define i32 @test_mouse_button_event(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 @show_mouse_tracking(i8* %3, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0))
ret i32 1
}

LLVM IR (-O2):
@.str = [6 x i8] c"?1002\00"
define i32 @test_mouse_button_event(i8* %0) {
%2 = tail call i32 @show_mouse_tracking(i8* %0, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0))
ret i32 1
}
/* Variables and functions */
int /*<<< orphan*/ SYS_close;
int syscall1(int /*<<< orphan*/, int);
int sys_close(int fd) { return syscall1(SYS_close, fd); }


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

x86 assembly (clang, -O2):
<sys_close>:
mov    %edi,%esi
mov    0x2ecf(%rip),%rax
mov    (%rax),%edi
jmp    1030 <syscall1@plt>

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

LLVM IR (-O2):
@SYS_close = global i32 0
define i32 @sys_close(i32 %0) {
%2 = load i32, i32* @SYS_close
%3 = tail call i32 @syscall1(i32 %2, i32 %0)
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ Atm128GpioInterruptC__4__Atm128Interrupt__fired();
void HplAtm128InterruptPinP__7__Irq__fired(void) {
  Atm128GpioInterruptC__4__Atm128Interrupt__fired();
}


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

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

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

LLVM IR (-O2):
define void @HplAtm128InterruptPinP__7__Irq__fired() {
%1 = tail call i32 (...) @Atm128GpioInterruptC__4__Atm128Interrupt__fired()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ add_word(char *);
int /*<<< orphan*/ free(char *);
char *nodename_to_filename_1(char *, int);
void add_nodename_to_filename(char *nodename, int href) {
  char *filename = nodename_to_filename_1(nodename, href);
  add_word(filename);
  free(filename);
}


x86 assembly (clang, -O0):
<add_nodename_to_filename>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
call   1040 <nodename_to_filename_1@plt>
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rdi
call   1050 <add_word@plt>
mov    -0x18(%rbp),%rdi
call   1030 <free@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<add_nodename_to_filename>:
push   %rbx
call   1040 <nodename_to_filename_1@plt>
mov    %rax,%rbx
mov    %rax,%rdi
call   1050 <add_word@plt>
mov    %rbx,%rdi
pop    %rbx
jmp    1030 <free@plt>

LLVM IR (-O0):
define void @add_nodename_to_filename(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i32
%5 = alloca i8*
store i8* %0, i8** %3
store i32 %1, i32* %4
%6 = load i8*, i8** %3
%7 = load i32, i32* %4
%8 = call i8* @nodename_to_filename_1(i8* %6, i32 %7)
store i8* %8, i8** %5
%9 = load i8*, i8** %5
%10 = call i32 @add_word(i8* %9)
%11 = load i8*, i8** %5
%12 = call i32 @free(i8* %11)
ret void
}

LLVM IR (-O2):
define void @add_nodename_to_filename(i8* %0, i32 %1) {
%3 = tail call i8* @nodename_to_filename_1(i8* %0, i32 %1)
%4 = tail call i32 @add_word(i8* %3)
%5 = tail call i32 @free(i8* %3)
ret void
}
int get_free_list(int size) {
  int index = 0, current_size = 512;
  while (current_size != size) {
    index = 2 * index + 1;
    current_size = current_size / 2;
  }
  return index;
}


x86 assembly (clang, -O0):
<get_free_list>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
movl   $0x200,-0xc(%rbp)
mov    -0xc(%rbp),%eax
cmp    -0x4(%rbp),%eax
je     1140 <get_free_list+0x40>
mov    -0x8(%rbp),%eax
shl    $0x1,%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
mov    -0xc(%rbp),%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
mov    %eax,-0xc(%rbp)
jmp    1115 <get_free_list+0x15>
mov    -0x8(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_free_list>:
xor    %eax,%eax
cmp    $0x200,%edi
je     1132 <get_free_list+0x32>
xor    %eax,%eax
mov    $0x200,%edx
mov    %edx,%ecx
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
add    %eax,%eax
add    $0x1,%eax
shr    $0x1f,%ecx
add    %edx,%ecx
sar    %ecx
mov    %ecx,%edx
cmp    %edi,%ecx
jne    1120 <get_free_list+0x20>
ret

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

LLVM IR (-O2):
define i32 @get_free_list(i32 %0) {
%2 = icmp eq i32 %0, 512
br i1 %2, label %10, label %3
3: ; preds = %1, %3
%4 = phi i32 [ %8, %3 ], [ 512, %1 ]
%5 = phi i32 [ %7, %3 ], [ 0, %1 ]
%6 = shl nsw i32 %5, 1
%7 = or i32 %6, 1
%8 = sdiv i32 %4, 2
%9 = icmp eq i32 %8, %0
br i1 %9, label %10, label %3
10: ; preds = %3, %1
%11 = phi i32 [ 0, %1 ], [ %7, %3 ]
ret i32 %11
}