xunge/DecIR huggingface dataset:
/* Variables and functions */
scalar_t__ is_digit(int);
int is_hex_digit(int ch) {
  return is_digit(ch) || (ch >= 'a' && ch <= 'f') || (ch >= 'A' && ch <= 'F');
}


x86 assembly (clang, -O0):
<is_hex_digit>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
call   1030 <is_digit@plt>
mov    %rax,%rcx
mov    $0x1,%al
cmp    $0x0,%rcx
mov    %al,-0x5(%rbp)
jne    116d <is_hex_digit+0x5d>
cmpl   $0x61,-0x4(%rbp)
jl     114e <is_hex_digit+0x3e>
mov    $0x1,%al
cmpl   $0x66,-0x4(%rbp)
mov    %al,-0x5(%rbp)
jle    116d <is_hex_digit+0x5d>
xor    %eax,%eax
cmpl   $0x41,-0x4(%rbp)
mov    %al,-0x6(%rbp)
jl     1167 <is_hex_digit+0x57>
cmpl   $0x46,-0x4(%rbp)
setle  %al
mov    %al,-0x6(%rbp)
mov    -0x6(%rbp),%al
mov    %al,-0x5(%rbp)
mov    -0x5(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<is_hex_digit>:
push   %rbx
mov    %edi,%ebx
call   1030 <is_digit@plt>
test   %rax,%rax
setne  %al
and    $0xffffffdf,%ebx
add    $0xffffffbf,%ebx
cmp    $0x6,%ebx
setb   %cl
or     %al,%cl
movzbl %cl,%eax
pop    %rbx
ret

LLVM IR (-O0):
define i32 @is_hex_digit(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = call i64 @is_digit(i32 %3)
%5 = icmp ne i64 %4, 0
br i1 %5, label %20, label %6
6: ; preds = %1
%7 = load i32, i32* %2
%8 = icmp sge i32 %7, 97
br i1 %8, label %9, label %12
9: ; preds = %6
%10 = load i32, i32* %2
%11 = icmp sle i32 %10, 102
br i1 %11, label %20, label %12
12: ; preds = %9, %6
%13 = load i32, i32* %2
%14 = icmp sge i32 %13, 65
br i1 %14, label %15, label %18
15: ; preds = %12
%16 = load i32, i32* %2
%17 = icmp sle i32 %16, 70
br label %18
18: ; preds = %15, %12
%19 = phi i1 [ false, %12 ], [ %17, %15 ]
br label %20
20: ; preds = %18, %9, %1
%21 = phi i1 [ true, %9 ], [ true, %1 ], [ %19, %18 ]
%22 = zext i1 %21 to i32
ret i32 %22
}

LLVM IR (-O2):
define i32 @is_hex_digit(i32 %0) {
%2 = tail call i64 @is_digit(i32 %0)
%3 = icmp ne i64 %2, 0
%4 = and i32 %0, -33
%5 = add i32 %4, -65
%6 = icmp ult i32 %5, 6
%7 = or i1 %6, %3
%8 = zext i1 %7 to i32
ret i32 %8
}
char toLower(char c) {
  if (c >= 'A' && c <= 'Z')
    return c + 'a' - 'A';
  return c;
}


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

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

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

LLVM IR (-O2):
define signext i8 @toLower(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 disambget(int, int, int);
char getch();
int getoffset(int lvl, int off) {
  char c = getch();
  int i = c - 'a';
  if (i < 0 || i >= 26)
    return -1;
  return disambget(lvl, off, i);
}


x86 assembly (clang, -O0):
<getoffset>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    $0x0,%al
call   1040 <getch@plt>
mov    %al,-0xd(%rbp)
movsbl -0xd(%rbp),%eax
sub    $0x61,%eax
mov    %eax,-0x14(%rbp)
cmpl   $0x0,-0x14(%rbp)
jl     1156 <getoffset+0x36>
cmpl   $0x1a,-0x14(%rbp)
jl     1162 <getoffset+0x42>
movl   $0xffffffff,-0x4(%rbp)
jmp    1173 <getoffset+0x53>
mov    -0x8(%rbp),%edi
mov    -0xc(%rbp),%esi
mov    -0x14(%rbp),%edx
call   1030 <disambget@plt>
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<getoffset>:
push   %rbp
push   %rbx
push   %rax
mov    %esi,%ebx
mov    %edi,%ebp
xor    %eax,%eax
call   1040 <getch@plt>
lea    -0x7b(%rax),%ecx
cmp    $0xe6,%cl
jae    1142 <getoffset+0x22>
mov    $0xffffffff,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret
movzbl %al,%edx
add    $0xffffff9f,%edx
mov    %ebp,%edi
mov    %ebx,%esi
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    1030 <disambget@plt>

LLVM IR (-O0):
define i32 @getoffset(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
%6 = alloca i8
%7 = alloca i32
store i32 %0, i32* %4
store i32 %1, i32* %5
%8 = call signext i8 (...) @getch()
store i8 %8, i8* %6
%9 = load i8, i8* %6
%10 = sext i8 %9 to i32
%11 = sub nsw i32 %10, 97
store i32 %11, i32* %7
%12 = load i32, i32* %7
%13 = icmp slt i32 %12, 0
br i1 %13, label %17, label %14
14: ; preds = %2
%15 = load i32, i32* %7
%16 = icmp sge i32 %15, 26
br i1 %16, label %17, label %18
17: ; preds = %14, %2
store i32 -1, i32* %3
br label %23
18: ; preds = %14
%19 = load i32, i32* %4
%20 = load i32, i32* %5
%21 = load i32, i32* %7
%22 = call i32 @disambget(i32 %19, i32 %20, i32 %21)
store i32 %22, i32* %3
br label %23
23: ; preds = %18, %17
%24 = load i32, i32* %3
ret i32 %24
}

LLVM IR (-O2):
define i32 @getoffset(i32 %0, i32 %1) {
%3 = tail call signext i8 (...) @getch()
%4 = add i8 %3, -123
%5 = icmp ult i8 %4, -26
br i1 %5, label %10, label %6
6: ; preds = %2
%7 = zext i8 %3 to i32
%8 = add nsw i32 %7, -97
%9 = tail call i32 @disambget(i32 %0, i32 %1, i32 %8)
br label %10
10: ; preds = %2, %6
%11 = phi i32 [ %9, %6 ], [ -1, %2 ]
ret i32 %11
}
rp_readcntlpg(datfd, cntlpg) int datfd;
char *cntlpg;
{
  if (read(datfd, cntlpg, (1024 * 2)) != (1024 * 2))
    return (-1);
  return (0);
}


x86 assembly (clang, -O0):
<rp_readcntlpg>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%edi
mov    -0x10(%rbp),%rsi
mov    $0x800,%edx
mov    $0x0,%al
call   1030 <read@plt>
cmp    $0x800,%eax
je     1149 <rp_readcntlpg+0x39>
movl   $0xffffffff,-0x4(%rbp)
jmp    1150 <rp_readcntlpg+0x40>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<rp_readcntlpg>:
push   %rax
mov    $0x800,%edx
xor    %eax,%eax
call   1030 <read@plt>
xor    %ecx,%ecx
cmp    $0x800,%eax
setne  %cl
neg    %ecx
mov    %ecx,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @rp_readcntlpg(i32 %0, i8* %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8*
store i32 %0, i32* %4
store i8* %1, i8** %5
%6 = load i32, i32* %4
%7 = load i8*, i8** %5
%8 = call i32 (i32, i8*, i32, ...) bitcast (i32 (...)* @read to i32 (i32, i8*, i32, ...)*)(i32 %6, i8* %7, i32 2048)
%9 = icmp ne i32 %8, 2048
br i1 %9, label %10, label %11
10: ; preds = %2
store i32 -1, i32* %3
br label %12
11: ; preds = %2
store i32 0, i32* %3
br label %12
12: ; preds = %11, %10
%13 = load i32, i32* %3
ret i32 %13
}

LLVM IR (-O2):
define i32 @rp_readcntlpg(i32 %0, i8* %1) {
%3 = tail call i32 (i32, i8*, i32, ...) bitcast (i32 (...)* @read to i32 (i32, i8*, i32, ...)*)(i32 %0, i8* %1, i32 2048)
%4 = icmp ne i32 %3, 2048
%5 = sext i1 %4 to i32
ret i32 %5
}
int increment(int t) { return t + 1; }


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

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

LLVM IR (-O0):
define i32 @increment(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 @increment(i32 %0) {
%2 = add nsw i32 %0, 1
ret i32 %2
}
/* Variables and functions */
int /*<<< orphan*/ merge(long *, long, long, long);
void merge_sort(long ar[], long first, long last) {
  long mid;
  if (first < last) {
    mid = (first + last) / 2;
    merge_sort(ar, first, mid);
    merge_sort(ar, mid + 1, last);
    merge(ar, first, mid, last);
  }
}


x86 assembly (clang, -O0):
<merge_sort>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x10(%rbp),%rax
cmp    -0x18(%rbp),%rax
jge    1193 <merge_sort+0x73>
mov    -0x10(%rbp),%rax
add    -0x18(%rbp),%rax
mov    $0x2,%ecx
cqto
idiv   %rcx
mov    %rax,-0x20(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x20(%rbp),%rdx
call   1040 <merge_sort@plt>
mov    -0x8(%rbp),%rdi
mov    -0x20(%rbp),%rsi
add    $0x1,%rsi
mov    -0x18(%rbp),%rdx
call   1040 <merge_sort@plt>
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x20(%rbp),%rdx
mov    -0x18(%rbp),%rcx
call   1030 <merge@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<merge_sort>:
cmp    %rdx,%rsi
jge    117a <merge_sort+0x5a>
push   %r15
push   %r14
push   %r12
push   %rbx
push   %rax
mov    %rdx,%r14
mov    %rsi,%r12
mov    %rdi,%r15
lea    (%rdx,%rsi,1),%rax
mov    %rax,%rbx
shr    $0x3f,%rbx
add    %rax,%rbx
sar    %rbx
mov    %rbx,%rdx
call   1040 <merge_sort@plt>
lea    0x1(%rbx),%rsi
mov    %r15,%rdi
mov    %r14,%rdx
call   1040 <merge_sort@plt>
mov    %r15,%rdi
mov    %r12,%rsi
mov    %rbx,%rdx
mov    %r14,%rcx
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
jmp    1030 <merge@plt>
ret

LLVM IR (-O0):
define void @merge_sort(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* %5
%9 = load i64, i64* %6
%10 = icmp slt i64 %8, %9
br i1 %10, label %11, label %28
11: ; preds = %3
%12 = load i64, i64* %5
%13 = load i64, i64* %6
%14 = add nsw i64 %12, %13
%15 = sdiv i64 %14, 2
store i64 %15, i64* %7
%16 = load i64*, i64** %4
%17 = load i64, i64* %5
%18 = load i64, i64* %7
%19 = load i64*, i64** %4
%20 = load i64, i64* %7
%21 = add nsw i64 %20, 1
%22 = load i64, i64* %6
%23 = load i64*, i64** %4
%24 = load i64, i64* %5
%25 = load i64, i64* %7
%26 = load i64, i64* %6
%27 = call i32 @merge(i64* %23, i64 %24, i64 %25, i64 %26)
br label %28
28: ; preds = %11, %3
ret void
}

LLVM IR (-O2):
define void @merge_sort(i64* %0, i64 %1, i64 %2) {
%4 = icmp slt i64 %1, %2
br i1 %4, label %6, label %5
5: ; preds = %3, %6
ret void
6: ; preds = %3
%7 = add nsw i64 %2, %1
%8 = sdiv i64 %7, 2
tail call void @merge_sort(i64* %0, i64 %1, i64 %8)
%9 = add nsw i64 %8, 1
tail call void @merge_sort(i64* %0, i64 %9, i64 %2)
%10 = tail call i32 @merge(i64* %0, i64 %1, i64 %8, i64 %2)
br label %5
}
/* Variables and functions */
int d13(int);
int d14(int a) { return d13(d13(a)); }


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

x86 assembly (clang, -O2):
<d14>:
push   %rax
call   1030 <d13@plt>
mov    %eax,%edi
pop    %rax
jmp    1030 <d13@plt>

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

LLVM IR (-O2):
define i32 @d14(i32 %0) {
%2 = tail call i32 @d13(i32 %0)
%3 = tail call i32 @d13(i32 %2)
ret i32 %3
}
void rop3_169_0_0(unsigned char *D, unsigned char S, unsigned char T) {
  unsigned char stk1;
  unsigned char stk2;
  stk2 = T | S;
  stk1 = *D ^ stk2;
  stk1 = ~stk1;
  *D = stk1;
}


x86 assembly (clang, -O0):
<rop3_169_0_0>:
push   %rbp
mov    %rsp,%rbp
mov    %dl,%al
mov    %sil,%cl
mov    %rdi,-0x8(%rbp)
mov    %cl,-0x9(%rbp)
mov    %al,-0xa(%rbp)
movzbl -0xa(%rbp),%eax
movzbl -0x9(%rbp),%ecx
or     %ecx,%eax
mov    %al,-0xc(%rbp)
mov    -0x8(%rbp),%rax
movzbl (%rax),%eax
movzbl -0xc(%rbp),%ecx
xor    %ecx,%eax
mov    %al,-0xb(%rbp)
movzbl -0xb(%rbp),%eax
xor    $0xffffffff,%eax
mov    %al,-0xb(%rbp)
mov    -0xb(%rbp),%cl
mov    -0x8(%rbp),%rax
mov    %cl,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<rop3_169_0_0>:
or     %edx,%esi
xor    (%rdi),%sil
not    %sil
mov    %sil,(%rdi)
ret

LLVM IR (-O0):
define void @rop3_169_0_0(i8* %0, i8 zeroext %1, i8 zeroext %2) {
%4 = alloca i8*
%5 = alloca i8
%6 = alloca i8
%7 = alloca i8
%8 = alloca i8
store i8* %0, i8** %4
store i8 %1, i8* %5
store i8 %2, i8* %6
%9 = load i8, i8* %6
%10 = zext i8 %9 to i32
%11 = load i8, i8* %5
%12 = zext i8 %11 to i32
%13 = or i32 %10, %12
%14 = trunc i32 %13 to i8
store i8 %14, i8* %8
%15 = load i8*, i8** %4
%16 = load i8, i8* %15
%17 = zext i8 %16 to i32
%18 = load i8, i8* %8
%19 = zext i8 %18 to i32
%20 = xor i32 %17, %19
%21 = trunc i32 %20 to i8
store i8 %21, i8* %7
%22 = load i8, i8* %7
%23 = zext i8 %22 to i32
%24 = xor i32 %23, -1
%25 = trunc i32 %24 to i8
store i8 %25, i8* %7
%26 = load i8, i8* %7
%27 = load i8*, i8** %4
store i8 %26, i8* %27
ret void
}

LLVM IR (-O2):
define void @rop3_169_0_0(i8* nocapture %0, i8 zeroext %1, i8 zeroext %2) {
%4 = or i8 %2, %1
%5 = load i8, i8* %0
%6 = xor i8 %4, %5
%7 = xor i8 %6, -1
store i8 %7, i8* %0
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ uint64_t;

/* Variables and functions */
int /*<<< orphan*/ internal_fiat_secp256k1_divstep_precomp(uintptr_t);
void fiat_secp256k1_divstep_precomp(uint64_t out1[4]) {
  internal_fiat_secp256k1_divstep_precomp((uintptr_t)out1);
}


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

x86 assembly (clang, -O2):
<fiat_secp256k1_divstep_precomp>:
jmp    1030 <internal_fiat_secp256k1_divstep_precomp@plt>

LLVM IR (-O0):
define void @fiat_secp256k1_divstep_precomp(i32* %0) {
%2 = alloca i32*
store i32* %0, i32** %2
%3 = load i32*, i32** %2
%4 = ptrtoint i32* %3 to i64
%5 = call i32 @internal_fiat_secp256k1_divstep_precomp(i64 %4)
ret void
}

LLVM IR (-O2):
define void @fiat_secp256k1_divstep_precomp(i32* %0) {
%2 = ptrtoint i32* %0 to i64
%3 = tail call i32 @internal_fiat_secp256k1_divstep_precomp(i64 %2)
ret void
}
/* Type definitions */
typedef int uint32_t;

/* Variables and functions */
void Piano_Init(void) {
  unsigned long volatile delay;
  (*((volatile uint32_t *)0x400FE108)) |= 0x00000010;
  delay = (*((volatile uint32_t *)0x400FE108));
  (*((volatile uint32_t *)0x40024400)) &= ~0x0F;
  (*((volatile uint32_t *)0x4002451C)) |= 0x0F;
}


x86 assembly (clang, -O0):
<Piano_Init>:
push   %rbp
mov    %rsp,%rbp
mov    $0x400fe108,%eax
mov    (%rax),%ecx
or     $0x10,%ecx
mov    $0x400fe108,%eax
mov    %ecx,(%rax)
mov    $0x400fe108,%eax
mov    (%rax),%eax
cltq
mov    %rax,-0x8(%rbp)
mov    $0x40024400,%eax
mov    (%rax),%ecx
and    $0xfffffff0,%ecx
mov    $0x40024400,%eax
mov    %ecx,(%rax)
mov    $0x4002451c,%eax
mov    (%rax),%ecx
or     $0xf,%ecx
mov    $0x4002451c,%eax
mov    %ecx,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<Piano_Init>:
orl    $0x10,0x400fe108
10
movslq 0x400fe108,%rax
40
mov    %rax,-0x8(%rsp)
andl   $0xfffffff0,0x40024400
f0
orl    $0xf,0x4002451c
0f
ret

LLVM IR (-O0):
define void @Piano_Init() {
%1 = alloca i64
%2 = load volatile i32, i32* inttoptr (i64 1074782472 to i32*)
%3 = or i32 %2, 16
store volatile i32 %3, i32* inttoptr (i64 1074782472 to i32*)
%4 = load volatile i32, i32* inttoptr (i64 1074782472 to i32*)
%5 = sext i32 %4 to i64
store volatile i64 %5, i64* %1
%6 = load volatile i32, i32* inttoptr (i64 1073890304 to i32*)
%7 = and i32 %6, -16
store volatile i32 %7, i32* inttoptr (i64 1073890304 to i32*)
%8 = load volatile i32, i32* inttoptr (i64 1073890588 to i32*)
%9 = or i32 %8, 15
store volatile i32 %9, i32* inttoptr (i64 1073890588 to i32*)
ret void
}

LLVM IR (-O2):
define void @Piano_Init() {
%1 = alloca i64
%2 = bitcast i64* %1 to i8*
%3 = load volatile i32, i32* inttoptr (i64 1074782472 to i32*)
%4 = or i32 %3, 16
store volatile i32 %4, i32* inttoptr (i64 1074782472 to i32*)
%5 = load volatile i32, i32* inttoptr (i64 1074782472 to i32*)
%6 = sext i32 %5 to i64
store volatile i64 %6, i64* %1
%7 = load volatile i32, i32* inttoptr (i64 1073890304 to i32*)
%8 = and i32 %7, -16
store volatile i32 %8, i32* inttoptr (i64 1073890304 to i32*)
%9 = load volatile i32, i32* inttoptr (i64 1073890588 to i32*)
%10 = or i32 %9, 15
store volatile i32 %10, i32* inttoptr (i64 1073890588 to i32*)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ call(char *);
asr() { call("ccasr"); }


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

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

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

LLVM IR (-O2):
@.str = [6 x i8] c"ccasr\00"
define i32 @asr() {
%1 = tail call i32 @call(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0))
ret i32 undef
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ isupper(int);
void t_isupper_0x75() {
  Assert_real((isupper(117) == 0),
              "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
              "2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/"
              "dg/z88dk/test/suites/ctype/test_isupper.c",
              590, ("isupper should be 0 for u"));
}


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

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

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

LLVM IR (-O2):
@.str = [168 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/ctype/test_isupper.c\00"
@.str.1 = [26 x i8] c"isupper should be 0 for u\00"
define void @t_isupper_0x75() {
%1 = tail call i64 @isupper(i32 117)
%2 = icmp eq i64 %1, 0
%3 = zext i1 %2 to i32
%4 = tail call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([168 x i8], [168 x i8]* @.str, i64 0, i64 0), i32 590, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ concurrent_destroy();
int /*<<< orphan*/ concurrent_init();
int /*<<< orphan*/ testRRRRR();
int /*<<< orphan*/ testRRRRWWcreate();
int /*<<< orphan*/ testRRRRWWdelete();
int /*<<< orphan*/ testWWWWRRcreate();
int /*<<< orphan*/ testWWWWRRdelete();
int /*<<< orphan*/ testWWWWWcreate();
int /*<<< orphan*/ testWWWWWdelete();
int main() {
  concurrent_init();
  testWWWWWcreate();
  testWWWWWdelete();
  testRRRRR();
  testWWWWRRcreate();
  testWWWWRRdelete();
  testRRRRWWcreate();
  testRRRRWWdelete();
  concurrent_destroy();
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x0,%al
call   1090 <concurrent_init@plt>
mov    $0x0,%al
call   1080 <testWWWWWcreate@plt>
mov    $0x0,%al
call   1050 <testWWWWWdelete@plt>
mov    $0x0,%al
call   1070 <testRRRRR@plt>
mov    $0x0,%al
call   10a0 <testWWWWRRcreate@plt>
mov    $0x0,%al
call   10b0 <testWWWWRRdelete@plt>
mov    $0x0,%al
call   1040 <testRRRRWWcreate@plt>
mov    $0x0,%al
call   1030 <testRRRRWWdelete@plt>
mov    $0x0,%al
call   1060 <concurrent_destroy@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1090 <concurrent_init@plt>
xor    %eax,%eax
call   1080 <testWWWWWcreate@plt>
xor    %eax,%eax
call   1050 <testWWWWWdelete@plt>
xor    %eax,%eax
call   1070 <testRRRRR@plt>
xor    %eax,%eax
call   10a0 <testWWWWRRcreate@plt>
xor    %eax,%eax
call   10b0 <testWWWWRRdelete@plt>
xor    %eax,%eax
call   1040 <testRRRRWWcreate@plt>
xor    %eax,%eax
call   1030 <testRRRRWWdelete@plt>
xor    %eax,%eax
call   1060 <concurrent_destroy@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 (...) @concurrent_init()
%3 = call i32 (...) @testWWWWWcreate()
%4 = call i32 (...) @testWWWWWdelete()
%5 = call i32 (...) @testRRRRR()
%6 = call i32 (...) @testWWWWRRcreate()
%7 = call i32 (...) @testWWWWRRdelete()
%8 = call i32 (...) @testRRRRWWcreate()
%9 = call i32 (...) @testRRRRWWdelete()
%10 = call i32 (...) @concurrent_destroy()
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @concurrent_init()
%2 = tail call i32 (...) @testWWWWWcreate()
%3 = tail call i32 (...) @testWWWWWdelete()
%4 = tail call i32 (...) @testRRRRR()
%5 = tail call i32 (...) @testWWWWRRcreate()
%6 = tail call i32 (...) @testWWWWRRdelete()
%7 = tail call i32 (...) @testRRRRWWcreate()
%8 = tail call i32 (...) @testRRRRWWdelete()
%9 = tail call i32 (...) @concurrent_destroy()
ret i32 0
}
char *find_lb_end(char *pBuf) {
  while (*(--pBuf) <= 0x20)
    ;
  return ++pBuf;
}


x86 assembly (clang, -O0):
<find_lb_end>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,%rcx
add    $0xffffffffffffffff,%rcx
mov    %rcx,-0x8(%rbp)
movsbl -0x1(%rax),%eax
cmp    $0x20,%eax
jg     1129 <find_lb_end+0x29>
jmp    1108 <find_lb_end+0x8>
mov    -0x8(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x8(%rbp)
pop    %rbp
ret

x86 assembly (clang, -O2):
<find_lb_end>:
mov    %rdi,%rax
add    $0x1,%rax
nopw   0x0(%rax,%rax,1)
cmpb   $0x21,-0x2(%rax)
lea    -0x1(%rax),%rax
jl     1110 <find_lb_end+0x10>
ret

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

LLVM IR (-O2):
define i8* @find_lb_end(i8* %0) {
br label %2
2: ; preds = %2, %1
%3 = phi i8* [ %0, %1 ], [ %4, %2 ]
%4 = getelementptr inbounds i8, i8* %3, i64 -1
%5 = load i8, i8* %4
%6 = icmp slt i8 %5, 33
br i1 %6, label %2, label %7
7: ; preds = %2
ret i8* %3
}
/* Variables and functions */
int /*<<< orphan*/ sleep(int);
void registerObserver(void (*callback)(char *, void *), void *fci) {
  sleep(10000);
  callback("A file changed\n", fci);
}


x86 assembly (clang, -O0):
<registerObserver>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    $0x2710,%edi
call   1030 <sleep@plt>
mov    -0x8(%rbp),%rax
mov    -0x10(%rbp),%rsi
lea    0xec7(%rip),%rdi
call   *%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<registerObserver>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%r14
mov    %rdi,%rbx
mov    $0x2710,%edi
call   1030 <sleep@plt>
lea    0xed5(%rip),%rdi
mov    %r14,%rsi
mov    %rbx,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    *%rax

LLVM IR (-O0):
@.str = [16 x i8] c"A file changed\0A\00"
define void @registerObserver(void (i8*, i8*)* %0, i8* %1) {
%3 = alloca void (i8*, i8*)*
%4 = alloca i8*
store void (i8*, i8*)* %0, void (i8*, i8*)** %3
store i8* %1, i8** %4
%5 = call i32 @sleep(i32 10000)
%6 = load void (i8*, i8*)*, void (i8*, i8*)** %3
%7 = load i8*, i8** %4
ret void
}

LLVM IR (-O2):
@.str = [16 x i8] c"A file changed\0A\00"
define void @registerObserver(void (i8*, i8*)* nocapture %0, i8* %1) {
%3 = tail call i32 @sleep(i32 10000)
tail call void %0(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0), i8* %1)
ret void
}
__uint128_t t1(__uint128_t a) { return a << 8; }


x86 assembly (clang, -O0):
<t1>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x20(%rbp)
mov    %rsi,-0x18(%rbp)
mov    -0x20(%rbp),%rax
mov    -0x18(%rbp),%rcx
mov    %rcx,-0x28(%rbp)
mov    %rax,-0x30(%rbp)
mov    -0x30(%rbp),%rdx
mov    -0x28(%rbp),%rcx
mov    %rdx,%rax
shl    $0x8,%rax
shld   $0x8,%rdx,%rcx
mov    %rcx,-0x8(%rbp)
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    -0x8(%rbp),%rdx
pop    %rbp
ret

x86 assembly (clang, -O2):
<t1>:
mov    %rsi,%rdx
mov    %rdi,%rax
shld   $0x8,%rdi,%rdx
shl    $0x8,%rax
ret

LLVM IR (-O0):
define { i64, i64 } @t1(i64 %0, i64 %1) {
%3 = alloca i128
%4 = alloca i128
%5 = alloca i128
%6 = bitcast i128* %4 to { i64, i64 }*
%7 = getelementptr inbounds { i64, i64 }, { i64, i64 }* %6, i32 0, i32 0
store i64 %0, i64* %7
%8 = getelementptr inbounds { i64, i64 }, { i64, i64 }* %6, i32 0, i32 1
store i64 %1, i64* %8
%9 = load i128, i128* %4
store i128 %9, i128* %5
%10 = load i128, i128* %5
%11 = shl i128 %10, 8
store i128 %11, i128* %3
%12 = bitcast i128* %3 to { i64, i64 }*
%13 = load { i64, i64 }, { i64, i64 }* %12
ret { i64, i64 } %13
}

LLVM IR (-O2):
define { i64, i64 } @t1(i64 %0, i64 %1) {
%3 = zext i64 %1 to i128
%4 = zext i64 %0 to i128
%5 = shl i128 %3, 72
%6 = shl nuw nsw i128 %4, 8
%7 = or i128 %5, %6
%8 = trunc i128 %6 to i64
%9 = lshr i128 %7, 64
%10 = trunc i128 %9 to i64
%11 = insertvalue { i64, i64 } poison, i64 %8, 0
%12 = insertvalue { i64, i64 } %11, i64 %10, 1
ret { i64, i64 } %12
}
/* Type definitions */
struct in_addr {
  int /*<<< orphan*/ s_addr;
};
typedef int /*<<< orphan*/ in_addr_t;

/* Variables and functions */
int /*<<< orphan*/ INADDR_BROADCAST;
int /*<<< orphan*/ inet_aton(char const *, struct in_addr *);
in_addr_t inet_addr(const char *cp) {
  struct in_addr addr = {.s_addr = INADDR_BROADCAST};
  inet_aton(cp, &addr);
  return addr.s_addr;
}


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

x86 assembly (clang, -O2):
<inet_addr>:
push   %rax
mov    0x2ed0(%rip),%rax
mov    (%rax),%eax
mov    %eax,(%rsp)
mov    %rsp,%rsi
call   1030 <inet_aton@plt>
mov    (%rsp),%eax
pop    %rcx
ret

LLVM IR (-O0):
%struct.in_addr = type { i32 }
@INADDR_BROADCAST = global i32 0
define i32 @inet_addr(i8* %0) {
%2 = alloca i8*
%3 = alloca %struct.in_addr
store i8* %0, i8** %2
%4 = getelementptr inbounds %struct.in_addr, %struct.in_addr* %3, i32 0, i32 0
%5 = load i32, i32* @INADDR_BROADCAST
store i32 %5, i32* %4
%6 = load i8*, i8** %2
%7 = call i32 @inet_aton(i8* %6, %struct.in_addr* %3)
%8 = getelementptr inbounds %struct.in_addr, %struct.in_addr* %3, i32 0, i32 0
%9 = load i32, i32* %8
ret i32 %9
}

LLVM IR (-O2):
%struct.in_addr = type { i32 }
@INADDR_BROADCAST = global i32 0
define i32 @inet_addr(i8* %0) {
%2 = alloca %struct.in_addr
%3 = bitcast %struct.in_addr* %2 to i8*
%4 = getelementptr inbounds %struct.in_addr, %struct.in_addr* %2, i64 0, i32 0
%5 = load i32, i32* @INADDR_BROADCAST
store i32 %5, i32* %4
%6 = call i32 @inet_aton(i8* %0, %struct.in_addr* %2)
%7 = load i32, i32* %4
ret i32 %7
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
void PrintN(int N) {
  int n, i;
  n = N;
  for (i = 1; i <= N; i++)
    printf("%d\n", i);
}


x86 assembly (clang, -O0):
<PrintN>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
mov    %eax,-0x8(%rbp)
movl   $0x1,-0xc(%rbp)
mov    -0xc(%rbp),%eax
cmp    -0x4(%rbp),%eax
jg     1151 <PrintN+0x41>
mov    -0xc(%rbp),%esi
lea    0xec2(%rip),%rdi
call   1030 <printf@plt>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1128 <PrintN+0x18>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<PrintN>:
push   %r15
push   %r14
push   %rbx
test   %edi,%edi
jle    114d <PrintN+0x3d>
mov    %edi,%r15d
neg    %r15d
mov    $0x1,%ebx
lea    0xed5(%rip),%r14
nopl   0x0(%rax,%rax,1)
mov    %r14,%rdi
mov    %ebx,%esi
call   1030 <printf@plt>
lea    (%r15,%rbx,1),%eax
add    $0x1,%eax
mov    %ebx,%ecx
add    $0x1,%ecx
mov    %ecx,%ebx
cmp    $0x1,%eax
jne    1130 <PrintN+0x20>
pop    %rbx
pop    %r14
pop    %r15
ret

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

LLVM IR (-O2):
@.str = [4 x i8] c"%d\0A\00"
define void @PrintN(i32 %0) {
%2 = icmp slt i32 %0, 1
br i1 %2, label %8, label %3
3: ; preds = %1, %3
%4 = phi i32 [ %6, %3 ], [ 1, %1 ]
%5 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %4)
%6 = add nuw i32 %4, 1
%7 = icmp eq i32 %4, %0
br i1 %7, label %8, label %3
8: ; preds = %3, %1
ret void
}
/* Variables and functions */
void *brp_malloc_internal(void *, long, int);
void *brp_malloc_1(void *storage, long size) {
  return brp_malloc_internal(storage, size, 1);
}


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

x86 assembly (clang, -O2):
<brp_malloc_1>:
mov    $0x1,%edx
jmp    1030 <brp_malloc_internal@plt>

LLVM IR (-O0):
define i8* @brp_malloc_1(i8* %0, i64 %1) {
%3 = alloca i8*
%4 = alloca i64
store i8* %0, i8** %3
store i64 %1, i64* %4
%5 = load i8*, i8** %3
%6 = load i64, i64* %4
%7 = call i8* @brp_malloc_internal(i8* %5, i64 %6, i32 1)
ret i8* %7
}

LLVM IR (-O2):
define i8* @brp_malloc_1(i8* %0, i64 %1) {
%3 = tail call i8* @brp_malloc_internal(i8* %0, i64 %1, i32 1)
ret i8* %3
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
int main(void) {
  printf("Type int has a size of %lu bytes.\n", sizeof(int));
  printf("Type char has a size of %lu bytes.\n", sizeof(char));
  printf("Type long has a size of %lu bytes.\n", sizeof(long));
  printf("Type double has a size of %lu bytes.\n", sizeof(double));
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeda(%rip),%rdi
mov    $0x4,%esi
call   1030 <printf@plt>
lea    0xeec(%rip),%rdi
mov    $0x1,%esi
call   1030 <printf@plt>
lea    0xeff(%rip),%rdi
mov    $0x8,%esi
call   1030 <printf@plt>
lea    0xf12(%rip),%rdi
mov    $0x8,%esi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xee8(%rip),%rdi
mov    $0x4,%esi
call   1030 <printf@plt>
lea    0xefa(%rip),%rdi
mov    $0x1,%esi
call   1030 <printf@plt>
lea    0xf0d(%rip),%rdi
mov    $0x8,%esi
call   1030 <printf@plt>
lea    0xf20(%rip),%rdi
mov    $0x8,%esi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [35 x i8] c"Type int has a size of %lu bytes.\0A\00"
@.str.1 = [36 x i8] c"Type char has a size of %lu bytes.\0A\00"
@.str.2 = [36 x i8] c"Type long has a size of %lu bytes.\0A\00"
@.str.3 = [38 x i8] c"Type double has a size of %lu bytes.\0A\00"
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 @printf(i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str, i64 0, i64 0), i32 4)
%3 = call i32 @printf(i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str.1, i64 0, i64 0), i32 1)
%4 = call i32 @printf(i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str.2, i64 0, i64 0), i32 8)
%5 = call i32 @printf(i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str.3, i64 0, i64 0), i32 8)
ret i32 0
}

LLVM IR (-O2):
@.str = [35 x i8] c"Type int has a size of %lu bytes.\0A\00"
@.str.1 = [36 x i8] c"Type char has a size of %lu bytes.\0A\00"
@.str.2 = [36 x i8] c"Type long has a size of %lu bytes.\0A\00"
@.str.3 = [38 x i8] c"Type double has a size of %lu bytes.\0A\00"
define i32 @main() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str, i64 0, i64 0), i32 4)
%2 = tail call i32 @printf(i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str.1, i64 0, i64 0), i32 1)
%3 = tail call i32 @printf(i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str.2, i64 0, i64 0), i32 8)
%4 = tail call i32 @printf(i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str.3, i64 0, i64 0), i32 8)
ret i32 0
}
caselg() {}


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

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

LLVM IR (-O0):
define i32 @caselg() {
%1 = alloca i32
%2 = load i32, i32* %1
ret i32 %2
}

LLVM IR (-O2):
define i32 @caselg() {
ret i32 undef
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
int main(int argc, char **argv) {
  printf("T %d\n", 1 + 1);
  printf("W %d\n", 1 + 1 * (1 + 1 + 1 + 1));
  printf("H %d\n", 1 + 1 * (1 + 1 + 1 + 1));
  return 0;
}


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)
lea    0xed3(%rip),%rdi
mov    $0x2,%esi
call   1030 <printf@plt>
lea    0xec8(%rip),%rdi
mov    $0x5,%esi
call   1030 <printf@plt>
lea    0xebd(%rip),%rdi
mov    $0x5,%esi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xee8(%rip),%rdi
mov    $0x2,%esi
call   1030 <printf@plt>
lea    0xedd(%rip),%rdi
mov    $0x5,%esi
call   1030 <printf@plt>
lea    0xed2(%rip),%rdi
mov    $0x5,%esi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [6 x i8] c"T %d\0A\00"
@.str.1 = [6 x i8] c"W %d\0A\00"
@.str.2 = [6 x i8] c"H %d\0A\00"
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 = call i32 @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i32 2)
%7 = call i32 @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), i32 5)
%8 = call i32 @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.2, i64 0, i64 0), i32 5)
ret i32 0
}

LLVM IR (-O2):
@.str = [6 x i8] c"T %d\0A\00"
@.str.1 = [6 x i8] c"W %d\0A\00"
@.str.2 = [6 x i8] c"H %d\0A\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i32 2)
%4 = tail call i32 @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), i32 5)
%5 = tail call i32 @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.2, i64 0, i64 0), i32 5)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ picintc(int);
void esdi_clear_irq() { picintc(1 << 14); }


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

x86 assembly (clang, -O2):
<esdi_clear_irq>:
mov    $0x4000,%edi
jmp    1030 <picintc@plt>

LLVM IR (-O0):
define void @esdi_clear_irq() {
%1 = call i32 @picintc(i32 16384)
ret void
}

LLVM IR (-O2):
define void @esdi_clear_irq() {
%1 = tail call i32 @picintc(i32 16384)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ memcpy(unsigned char **, unsigned char **, int);
void copy_field(unsigned char dst[16][16], unsigned char src[16][16]) {
  memcpy(dst, src, 16 * 16);
}


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

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

LLVM IR (-O0):
define void @copy_field([16 x i8]* %0, [16 x i8]* %1) {
%3 = alloca [16 x i8]*
%4 = alloca [16 x i8]*
store [16 x i8]* %0, [16 x i8]** %3
store [16 x i8]* %1, [16 x i8]** %4
%5 = load [16 x i8]*, [16 x i8]** %3
%6 = bitcast [16 x i8]* %5 to i8**
%7 = load [16 x i8]*, [16 x i8]** %4
%8 = bitcast [16 x i8]* %7 to i8**
%9 = call i32 @memcpy(i8** %6, i8** %8, i32 256)
ret void
}

LLVM IR (-O2):
define void @copy_field([16 x i8]* %0, [16 x i8]* %1) {
%3 = bitcast [16 x i8]* %0 to i8**
%4 = bitcast [16 x i8]* %1 to i8**
%5 = tail call i32 @memcpy(i8** %3, i8** %4, i32 256)
ret void
}
int map_isset(unsigned char *map, unsigned int ch) {
  if (ch > 127)
    return 0;
  return map[ch >> 3] & (1 << (ch & 7));
}


x86 assembly (clang, -O0):
<map_isset>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    %esi,-0x14(%rbp)
cmpl   $0x7f,-0x14(%rbp)
jbe    1121 <map_isset+0x21>
movl   $0x0,-0x4(%rbp)
jmp    1145 <map_isset+0x45>
mov    -0x10(%rbp),%rax
mov    -0x14(%rbp),%ecx
shr    $0x3,%ecx
mov    %ecx,%ecx
movzbl (%rax,%rcx,1),%eax
mov    -0x14(%rbp),%ecx
and    $0x7,%ecx
mov    $0x1,%edx
shl    %cl,%edx
mov    %edx,%ecx
and    %ecx,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<map_isset>:
xor    %eax,%eax
cmp    $0x7f,%esi
ja     1120 <map_isset+0x20>
mov    %esi,%eax
shr    $0x3,%rax
movzbl (%rdi,%rax,1),%edx
and    $0x7,%sil
mov    $0x1,%eax
mov    %esi,%ecx
shl    %cl,%eax
and    %edx,%eax
ret

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

LLVM IR (-O2):
define i32 @map_isset(i8* nocapture %0, i32 %1) {
%3 = icmp ugt i32 %1, 127
br i1 %3, label %13, label %4
4: ; preds = %2
%5 = lshr i32 %1, 3
%6 = zext i32 %5 to i64
%7 = getelementptr inbounds i8, i8* %0, i64 %6
%8 = load i8, i8* %7
%9 = zext i8 %8 to i32
%10 = and i32 %1, 7
%11 = shl nuw nsw i32 1, %10
%12 = and i32 %11, %9
br label %13
13: ; preds = %2, %4
%14 = phi i32 [ %12, %4 ], [ 0, %2 ]
ret i32 %14
}
/* Variables and functions */
int /*<<< orphan*/ strcpy(char *, char *);
void swap(char *s1, char *s2) {
  char temp[30];
  temp[0] = '\0';
  strcpy(temp, s1);
  strcpy(s1, s2);
  strcpy(s2, temp);
  return;
}


x86 assembly (clang, -O0):
<swap>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movb   $0x0,-0x30(%rbp)
lea    -0x30(%rbp),%rdi
mov    -0x8(%rbp),%rsi
call   1030 <strcpy@plt>
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1030 <strcpy@plt>
mov    -0x10(%rbp),%rdi
lea    -0x30(%rbp),%rsi
call   1030 <strcpy@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<swap>:
push   %r15
push   %r14
push   %rbx
sub    $0x20,%rsp
mov    %rsi,%r14
mov    %rdi,%rbx
movb   $0x0,(%rsp)
mov    %rsp,%r15
mov    %r15,%rdi
mov    %rbx,%rsi
call   1030 <strcpy@plt>
mov    %rbx,%rdi
mov    %r14,%rsi
call   1030 <strcpy@plt>
mov    %r14,%rdi
mov    %r15,%rsi
call   1030 <strcpy@plt>
add    $0x20,%rsp
pop    %rbx
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
define void @swap(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
%5 = alloca [30 x i8]
store i8* %0, i8** %3
store i8* %1, i8** %4
%6 = getelementptr inbounds [30 x i8], [30 x i8]* %5, i64 0, i64 0
store i8 0, i8* %6
%7 = getelementptr inbounds [30 x i8], [30 x i8]* %5, i64 0, i64 0
%8 = load i8*, i8** %3
%9 = call i32 @strcpy(i8* %7, i8* %8)
%10 = load i8*, i8** %3
%11 = load i8*, i8** %4
%12 = call i32 @strcpy(i8* %10, i8* %11)
%13 = load i8*, i8** %4
%14 = getelementptr inbounds [30 x i8], [30 x i8]* %5, i64 0, i64 0
%15 = call i32 @strcpy(i8* %13, i8* %14)
ret void
}

LLVM IR (-O2):
define void @swap(i8* %0, i8* %1) {
%3 = alloca [30 x i8]
%4 = getelementptr inbounds [30 x i8], [30 x i8]* %3, i64 0, i64 0
store i8 0, i8* %4
%5 = call i32 @strcpy(i8* %4, i8* %0)
%6 = call i32 @strcpy(i8* %0, i8* %1)
%7 = call i32 @strcpy(i8* %1, i8* %4)
ret void
}
void hpgl_select_window(int id) { id = id; }


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

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

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

LLVM IR (-O2):
define void @hpgl_select_window(i32 %0) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char *, char *, char *, char *, char *);
int main() {
  printf("arg1 %s %s %s %s %s\n", "arg2", "arg3", "arg4", "arg5", "arg6");
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeda(%rip),%rdi
lea    0xee8(%rip),%rsi
lea    0xee6(%rip),%rdx
lea    0xee4(%rip),%rcx
lea    0xee2(%rip),%r8
lea    0xee0(%rip),%r9
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xee8(%rip),%rdi
lea    0xef6(%rip),%rsi
lea    0xef4(%rip),%rdx
lea    0xef2(%rip),%rcx
lea    0xef0(%rip),%r8
lea    0xeee(%rip),%r9
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [21 x i8] c"arg1 %s %s %s %s %s\0A\00"
@.str.1 = [5 x i8] c"arg2\00"
@.str.2 = [5 x i8] c"arg3\00"
@.str.3 = [5 x i8] c"arg4\00"
@.str.4 = [5 x i8] c"arg5\00"
@.str.5 = [5 x i8] c"arg6\00"
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.3, i64 0, i64 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.4, i64 0, i64 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.5, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@.str = [21 x i8] c"arg1 %s %s %s %s %s\0A\00"
@.str.1 = [5 x i8] c"arg2\00"
@.str.2 = [5 x i8] c"arg3\00"
@.str.3 = [5 x i8] c"arg4\00"
@.str.4 = [5 x i8] c"arg5\00"
@.str.5 = [5 x i8] c"arg6\00"
define i32 @main() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.3, i64 0, i64 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.4, i64 0, i64 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.5, i64 0, i64 0))
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ raw();
int read(int /*<<< orphan*/, unsigned char *, int);
int getch(void) {
  unsigned char temp;
  raw();
  if (read(0, &temp, 1) != 1)
    return 0;
  return temp;
}


x86 assembly (clang, -O0):
<getch>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1030 <raw@plt>
xor    %edi,%edi
lea    -0x5(%rbp),%rsi
mov    $0x1,%edx
call   1040 <read@plt>
cmp    $0x1,%eax
je     1154 <getch+0x34>
movl   $0x0,-0x4(%rbp)
jmp    115b <getch+0x3b>
movzbl -0x5(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<getch>:
push   %rbx
sub    $0x10,%rsp
xor    %ebx,%ebx
xor    %eax,%eax
call   1030 <raw@plt>
lea    0xf(%rsp),%rsi
xor    %edi,%edi
mov    $0x1,%edx
call   1040 <read@plt>
cmp    $0x1,%eax
movzbl 0xf(%rsp),%eax
cmovne %ebx,%eax
add    $0x10,%rsp
pop    %rbx
ret

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

LLVM IR (-O2):
define i32 @getch() {
%1 = alloca i8
%2 = tail call i32 (...) @raw()
%3 = call i32 @read(i32 0, i8* %1, i32 1)
%4 = icmp eq i32 %3, 1
%5 = load i8, i8* %1
%6 = zext i8 %5 to i32
%7 = select i1 %4, i32 %6, i32 0
ret i32 %7
}
void event_sluron(t) int t;
{ emit_string("("); }


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

x86 assembly (clang, -O2):
<event_sluron>:
lea    0xee9(%rip),%rdi
xor    %eax,%eax
jmp    1030 <emit_string@plt>

LLVM IR (-O0):
@.str = [2 x i8] c"(\00"
define void @event_sluron(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = call i32 (i8*, ...) bitcast (i32 (...)* @emit_string to i32 (i8*, ...)*)(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
ret void
}

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

/* Variables and functions */
void plot_number(FILE *f, const char **opts, double d) {}


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

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

LLVM IR (-O0):
define void @plot_number(i32* %0, i8** %1, double %2) {
%4 = alloca i32*
%5 = alloca i8**
%6 = alloca double
store i32* %0, i32** %4
store i8** %1, i8*** %5
store double %2, double* %6
ret void
}

LLVM IR (-O2):
define void @plot_number(i32* nocapture %0, i8** nocapture %1, double %2) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char *);
void set() {
  char str[12] = "O rato roeu";
  printf("%s\n", str);
}


x86 assembly (clang, -O0):
<set>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    0xee1(%rip),%rax
mov    %rax,-0xc(%rbp)
mov    0xedf(%rip),%eax
mov    %eax,-0x4(%rbp)
lea    -0xc(%rbp),%rsi
lea    0xed5(%rip),%rdi
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<set>:
sub    $0x18,%rsp
movabs $0x72206f746172204f,%rax
6f 20 72
mov    %rax,0x8(%rsp)
movl   $0x75656f,0x10(%rsp)
lea    0xeda(%rip),%rdi
lea    0x8(%rsp),%rsi
call   1030 <printf@plt>
add    $0x18,%rsp
ret

LLVM IR (-O0):
@__const.set.str = [12 x i8] c"O rato roeu\00"
@.str = [4 x i8] c"%s\0A\00"
define void @set() {
%1 = alloca [12 x i8]
%2 = bitcast [12 x i8]* %1 to i8*
%3 = getelementptr inbounds [12 x i8], [12 x i8]* %1, i64 0, i64 0
%4 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %3)
ret void
}

LLVM IR (-O2):
@__const.set.str = [12 x i8] c"O rato roeu\00"
@.str = [4 x i8] c"%s\0A\00"
define void @set() {
%1 = alloca [12 x i8]
%2 = getelementptr inbounds [12 x i8], [12 x i8]* %1, i64 0, i64 0
%3 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %2)
ret void
}