xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ assert(int /*<<< orphan*/);
int /*<<< orphan*/ printf(char *, int);
void parseError(int c) {
  printf("Quartet grouping parser expecting symbol: %c\n", c);
  assert(0);
}


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

x86 assembly (clang, -O2):
<parseError>:
push   %rax
mov    %edi,%esi
lea    0xed6(%rip),%rdi
call   1030 <printf@plt>
xor    %edi,%edi
pop    %rax
jmp    1040 <assert@plt>

LLVM IR (-O0):
@.str = [46 x i8] c"Quartet grouping parser expecting symbol: %c\0A\00"
define void @parseError(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = call i32 @printf(i8* getelementptr inbounds ([46 x i8], [46 x i8]* @.str, i64 0, i64 0), i32 %3)
%5 = call i32 @assert(i32 0)
ret void
}

LLVM IR (-O2):
@.str = [46 x i8] c"Quartet grouping parser expecting symbol: %c\0A\00"
define void @parseError(i32 %0) {
%2 = tail call i32 @printf(i8* getelementptr inbounds ([46 x i8], [46 x i8]* @.str, i64 0, i64 0), i32 %0)
%3 = tail call i32 @assert(i32 0)
ret void
}
/* Type definitions */
struct task_struct {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ vtime_account_system(struct task_struct *);
void vtime_account_irq_exit(struct task_struct *tsk) {
  vtime_account_system(tsk);
}


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

x86 assembly (clang, -O2):
<vtime_account_irq_exit>:
jmp    1030 <vtime_account_system@plt>

LLVM IR (-O0):
%struct.task_struct = type { i32 }
define void @vtime_account_irq_exit(%struct.task_struct* %0) {
%2 = alloca %struct.task_struct*
store %struct.task_struct* %0, %struct.task_struct** %2
%3 = load %struct.task_struct*, %struct.task_struct** %2
%4 = call i32 @vtime_account_system(%struct.task_struct* %3)
ret void
}

LLVM IR (-O2):
%struct.task_struct = type { i32 }
define void @vtime_account_irq_exit(%struct.task_struct* %0) {
%2 = tail call i32 @vtime_account_system(%struct.task_struct* %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ dodir1(int, char **, int);
void dodir(int ac, char **av) { dodir1(ac, av, 1); }


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

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

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

LLVM IR (-O2):
define void @dodir(i32 %0, i8** %1) {
%3 = tail call i32 @dodir1(i32 %0, i8** %1, i32 1)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ isspace(char);
char *skip_to_blank(char *cp) {
  while (*cp && !isspace(*cp)) {
    cp++;
  }
  return cp;
}


x86 assembly (clang, -O0):
<skip_to_blank>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movsbl (%rax),%ecx
xor    %eax,%eax
cmp    $0x0,%ecx
mov    %al,-0x9(%rbp)
je     1148 <skip_to_blank+0x38>
mov    -0x8(%rbp),%rax
movsbl (%rax),%edi
call   1030 <isspace@plt>
cmp    $0x0,%eax
setne  %al
xor    $0xff,%al
mov    %al,-0x9(%rbp)
mov    -0x9(%rbp),%al
test   $0x1,%al
jne    1158 <skip_to_blank+0x48>
jmp    1169 <skip_to_blank+0x59>
mov    -0x8(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x8(%rbp)
jmp    111c <skip_to_blank+0xc>
mov    -0x8(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<skip_to_blank>:
push   %rbx
mov    %rdi,%rbx
mov    (%rdi),%al
test   %al,%al
je     1138 <skip_to_blank+0x28>
nopw   0x0(%rax,%rax,1)
movsbl %al,%edi
call   1030 <isspace@plt>
test   %eax,%eax
jne    1138 <skip_to_blank+0x28>
movzbl 0x1(%rbx),%eax
add    $0x1,%rbx
test   %al,%al
jne    1120 <skip_to_blank+0x10>
mov    %rbx,%rax
pop    %rbx
ret

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

LLVM IR (-O2):
define i8* @skip_to_blank(i8* %0) {
%2 = load i8, i8* %0
%3 = icmp eq i8 %2, 0
br i1 %3, label %13, label %4
4: ; preds = %1, %9
%5 = phi i8 [ %11, %9 ], [ %2, %1 ]
%6 = phi i8* [ %10, %9 ], [ %0, %1 ]
%7 = tail call i32 @isspace(i8 signext %5)
%8 = icmp eq i32 %7, 0
br i1 %8, label %9, label %13
9: ; preds = %4
%10 = getelementptr inbounds i8, i8* %6, i64 1
%11 = load i8, i8* %10
%12 = icmp eq i8 %11, 0
br i1 %12, label %13, label %4
13: ; preds = %4, %9, %1
%14 = phi i8* [ %0, %1 ], [ %10, %9 ], [ %6, %4 ]
ret i8* %14
}
/* Variables and functions */
int print(int, char *);
int invert(int tty) { return print(tty, "\033[7m"); }


x86 assembly (clang, -O0):
<invert>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
lea    0xedb(%rip),%rsi
call   1030 <print@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<invert>:
lea    0xee9(%rip),%rsi
jmp    1030 <print@plt>

LLVM IR (-O0):
@.str = [5 x i8] c"\1B[7m\00"
define i32 @invert(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = call i32 @print(i32 %3, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0))
ret i32 %4
}

LLVM IR (-O2):
@.str = [5 x i8] c"\1B[7m\00"
define i32 @invert(i32 %0) {
%2 = tail call i32 @print(i32 %0, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0))
ret i32 %2
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int, int);
int main(int argc, char **argv) {
  int a;
  int b;
  int c;
  b = argc + 1;
  c = argc + 2;
  a = b + c;
  if (argc * 2) {
    c = argc + 3;
  }
  printf("%d, %d\n", a, b + c);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x18(%rbp)
mov    -0x8(%rbp),%eax
add    $0x2,%eax
mov    %eax,-0x1c(%rbp)
mov    -0x18(%rbp),%eax
add    -0x1c(%rbp),%eax
mov    %eax,-0x14(%rbp)
mov    -0x8(%rbp),%eax
shl    $0x1,%eax
cmp    $0x0,%eax
je     1159 <main+0x49>
mov    -0x8(%rbp),%eax
add    $0x3,%eax
mov    %eax,-0x1c(%rbp)
mov    -0x14(%rbp),%esi
mov    -0x18(%rbp),%edx
add    -0x1c(%rbp),%edx
lea    0xe97(%rip),%rdi
call   1030 <printf@plt>
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0x3(%rdi),%eax
test   %edi,%edi
mov    $0x2,%ecx
cmovne %eax,%ecx
lea    (%rdi,%rdi,1),%esi
add    $0x3,%esi
lea    (%rcx,%rdi,1),%edx
add    $0x1,%edx
lea    0xecf(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [8 x i8] c"%d, %d\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%9 = load i32, i32* %4
%10 = add nsw i32 %9, 1
store i32 %10, i32* %7
%11 = load i32, i32* %4
%12 = add nsw i32 %11, 2
store i32 %12, i32* %8
%13 = load i32, i32* %7
%14 = load i32, i32* %8
%15 = add nsw i32 %13, %14
store i32 %15, i32* %6
%16 = load i32, i32* %4
%17 = mul nsw i32 %16, 2
%18 = icmp ne i32 %17, 0
br i1 %18, label %19, label %22
19: ; preds = %2
%20 = load i32, i32* %4
%21 = add nsw i32 %20, 3
store i32 %21, i32* %8
br label %22
22: ; preds = %19, %2
%23 = load i32, i32* %6
%24 = load i32, i32* %7
%25 = load i32, i32* %8
%26 = add nsw i32 %24, %25
%27 = call i32 @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i32 %23, i32 %26)
%28 = load i32, i32* %3
ret i32 %28
}

LLVM IR (-O2):
@.str = [8 x i8] c"%d, %d\0A\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = add nsw i32 %0, 1
%4 = add nsw i32 %0, 2
%5 = icmp eq i32 %0, 0
%6 = add nsw i32 %0, 3
%7 = select i1 %5, i32 2, i32 %6
%8 = add nsw i32 %4, %3
%9 = add nsw i32 %7, %3
%10 = tail call i32 @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i32 %8, i32 %9)
ret i32 0
}
void TimPro_lc898122_sharp(void) {}


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

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

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

LLVM IR (-O2):
define void @TimPro_lc898122_sharp() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ clock();
int /*<<< orphan*/ getpid();
unsigned long mix(int /*<<< orphan*/, int /*<<< orphan*/, int /*<<< orphan*/);
int /*<<< orphan*/ srand(unsigned long);
int /*<<< orphan*/ time(int /*<<< orphan*/ *);
void seed_random() {
  unsigned long seed = mix(clock(), time(NULL), getpid());
  srand(seed);
}


x86 assembly (clang, -O0):
<seed_random>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1040 <clock@plt>
mov    %eax,-0x10(%rbp)
xor    %eax,%eax
mov    %eax,%edi
call   1070 <time@plt>
mov    %eax,-0xc(%rbp)
mov    $0x0,%al
call   1030 <getpid@plt>
mov    -0x10(%rbp),%edi
mov    -0xc(%rbp),%esi
mov    %eax,%edx
call   1050 <mix@plt>
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1060 <srand@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<seed_random>:
push   %rbp
push   %rbx
push   %rax
xor    %eax,%eax
call   1040 <clock@plt>
mov    %eax,%ebx
xor    %edi,%edi
call   1070 <time@plt>
mov    %eax,%ebp
xor    %eax,%eax
call   1030 <getpid@plt>
mov    %ebx,%edi
mov    %ebp,%esi
mov    %eax,%edx
call   1050 <mix@plt>
mov    %rax,%rdi
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    1060 <srand@plt>

LLVM IR (-O0):
define void @seed_random() {
%1 = alloca i64
%2 = call i32 (...) @clock()
%3 = call i32 @time(i32* null)
%4 = call i32 (...) @getpid()
%5 = call i64 @mix(i32 %2, i32 %3, i32 %4)
store i64 %5, i64* %1
%6 = load i64, i64* %1
%7 = call i32 @srand(i64 %6)
ret void
}

LLVM IR (-O2):
define void @seed_random() {
%1 = tail call i32 (...) @clock()
%2 = tail call i32 @time(i32* null)
%3 = tail call i32 (...) @getpid()
%4 = tail call i64 @mix(i32 %1, i32 %2, i32 %3)
%5 = tail call i32 @srand(i64 %4)
ret void
}
void PDC_set_title(title) char *title;
{
  SetConsoleTitle(title);
  return;
}


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

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

LLVM IR (-O0):
define void @PDC_set_title(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 (i8*, ...) bitcast (i32 (...)* @SetConsoleTitle to i32 (i8*, ...)*)(i8* %3)
ret void
}

LLVM IR (-O2):
define void @PDC_set_title(i8* %0) {
%2 = tail call i32 (i8*, ...) bitcast (i32 (...)* @SetConsoleTitle to i32 (i8*, ...)*)(i8* %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ TestPointers();
int main(int argc, char *argv[]) {
  TestPointers();
  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)
mov    $0x0,%al
call   1030 <TestPointers@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
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 (...) @TestPointers()
ret i32 0
}

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 (...) @TestPointers()
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, ...);
int /*<<< orphan*/ stderr;
void iargs(char *message) {
  fprintf(stderr, "Invalid arguments: %s.\n", message);
  fprintf(stderr, "   - use 'imp help' for more info.");
  exit(1);
}


x86 assembly (clang, -O0):
<iargs>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    0x2ead(%rip),%rax
mov    (%rax),%edi
mov    -0x8(%rbp),%rdx
lea    0xec0(%rip),%rsi
mov    $0x0,%al
call   1030 <fprintf@plt>
mov    0x2e92(%rip),%rax
mov    (%rax),%edi
lea    0xec1(%rip),%rsi
mov    $0x0,%al
call   1030 <fprintf@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<iargs>:
push   %rbx
mov    %rdi,%rdx
mov    0x2eb5(%rip),%rbx
mov    (%rbx),%edi
lea    0xecc(%rip),%rsi
xor    %eax,%eax
call   1030 <fprintf@plt>
mov    (%rbx),%edi
lea    0xed4(%rip),%rsi
xor    %eax,%eax
call   1030 <fprintf@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [24 x i8] c"Invalid arguments: %s.\0A\00"
@.str.1 = [35 x i8] c" - use 'imp help' for more info.\00"
define void @iargs(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i32, i32* @stderr
%4 = load i8*, i8** %2
%5 = call i32 (i32, i8*, ...) @fprintf(i32 %3, i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str, i64 0, i64 0), i8* %4)
%6 = load i32, i32* @stderr
%7 = call i32 (i32, i8*, ...) @fprintf(i32 %6, i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str.1, i64 0, i64 0))
%8 = call i32 @exit(i32 1)
unreachable
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [24 x i8] c"Invalid arguments: %s.\0A\00"
@.str.1 = [35 x i8] c" - use 'imp help' for more info.\00"
define void @iargs(i8* %0) {
%2 = load i32, i32* @stderr
%3 = tail call i32 (i32, i8*, ...) @fprintf(i32 %2, i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str, i64 0, i64 0), i8* %0)
%4 = load i32, i32* @stderr
%5 = tail call i32 (i32, i8*, ...) @fprintf(i32 %4, i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str.1, i64 0, i64 0))
%6 = tail call i32 @exit(i32 1)
unreachable
}
int hash(s) const char *s;
{
  int hashval = 0;
  while (*s) {
    hashval += *s++;
    hashval *= 81;
    hashval &= (256 - 1);
  }
  return hashval;
}


x86 assembly (clang, -O0):
<hash>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
mov    -0x8(%rbp),%rax
cmpb   $0x0,(%rax)
je     114b <hash+0x4b>
mov    -0x8(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x8(%rbp)
movsbl (%rax),%eax
add    -0xc(%rbp),%eax
mov    %eax,-0xc(%rbp)
imul   $0x51,-0xc(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
and    $0xff,%eax
mov    %eax,-0xc(%rbp)
jmp    110f <hash+0xf>
mov    -0xc(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<hash>:
mov    (%rdi),%cl
test   %cl,%cl
je     112a <hash+0x2a>
add    $0x1,%rdi
xor    %eax,%eax
nopl   0x0(%rax)
movzbl %cl,%ecx
add    %eax,%ecx
lea    (%rcx,%rcx,8),%eax
lea    (%rax,%rax,8),%eax
movzbl %al,%eax
movzbl (%rdi),%ecx
add    $0x1,%rdi
test   %cl,%cl
jne    1110 <hash+0x10>
ret
xor    %eax,%eax
ret

LLVM IR (-O0):
define i32 @hash(i8* %0) {
%2 = alloca i8*
%3 = alloca i32
store i8* %0, i8** %2
store i32 0, i32* %3
br label %4
4: ; preds = %8, %1
%5 = load i8*, i8** %2
%6 = load i8, i8* %5
%7 = icmp ne i8 %6, 0
br i1 %7, label %8, label %19
8: ; preds = %4
%9 = load i8*, i8** %2
%10 = getelementptr inbounds i8, i8* %9, i32 1
store i8* %10, i8** %2
%11 = load i8, i8* %9
%12 = sext i8 %11 to i32
%13 = load i32, i32* %3
%14 = add nsw i32 %13, %12
store i32 %14, i32* %3
%15 = load i32, i32* %3
%16 = mul nsw i32 %15, 81
store i32 %16, i32* %3
%17 = load i32, i32* %3
%18 = and i32 %17, 255
store i32 %18, i32* %3
br label %4
19: ; preds = %4
%20 = load i32, i32* %3
ret i32 %20
}

LLVM IR (-O2):
define i32 @hash(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = icmp eq i8 %2, 0
br i1 %3, label %15, label %4
4: ; preds = %1, %4
%5 = phi i8 [ %13, %4 ], [ %2, %1 ]
%6 = phi i32 [ %12, %4 ], [ 0, %1 ]
%7 = phi i8* [ %8, %4 ], [ %0, %1 ]
%8 = getelementptr inbounds i8, i8* %7, i64 1
%9 = zext i8 %5 to i32
%10 = add nuw nsw i32 %6, %9
%11 = mul nuw nsw i32 %10, 81
%12 = and i32 %11, 255
%13 = load i8, i8* %8
%14 = icmp eq i8 %13, 0
br i1 %14, label %15, label %4
15: ; preds = %4, %1
%16 = phi i32 [ 0, %1 ], [ %12, %4 ]
ret i32 %16
}
/* Variables and functions */
int /*<<< orphan*/ debug_data(char *, int);
int /*<<< orphan*/ debug_hex(uintptr_t);
void debug_ptr(const void *ptr) {
  debug_data("0x", 2);
  debug_hex((uintptr_t)ptr);
}


x86 assembly (clang, -O0):
<debug_ptr>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
lea    0xecd(%rip),%rdi
mov    $0x2,%esi
call   1040 <debug_data@plt>
mov    -0x8(%rbp),%rdi
call   1030 <debug_hex@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<debug_ptr>:
push   %rbx
mov    %rdi,%rbx
lea    0xed5(%rip),%rdi
mov    $0x2,%esi
call   1040 <debug_data@plt>
mov    %rbx,%rdi
pop    %rbx
jmp    1030 <debug_hex@plt>

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

LLVM IR (-O2):
@.str = [3 x i8] c"0x\00"
define void @debug_ptr(i8* %0) {
%2 = tail call i32 @debug_data(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 2)
%3 = ptrtoint i8* %0 to i64
%4 = tail call i32 @debug_hex(i64 %3)
ret void
}
void sn9cxxx_setquality(struct usb_spca50x *spca50x) {}


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

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

LLVM IR (-O0):
%struct.usb_spca50x = type opaque
define void @sn9cxxx_setquality(%struct.usb_spca50x* %0) {
%2 = alloca %struct.usb_spca50x*
store %struct.usb_spca50x* %0, %struct.usb_spca50x** %2
ret void
}

LLVM IR (-O2):
%struct.usb_spca50x = type opaque
define void @sn9cxxx_setquality(%struct.usb_spca50x* nocapture %0) {
ret void
}
/* Variables and functions */
int is_category_Sc(unsigned int);
bool is_property_currency_symbol(unsigned int ch) { return is_category_Sc(ch); }


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

x86 assembly (clang, -O2):
<is_property_currency_symbol>:
jmp    1030 <is_category_Sc@plt>

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

LLVM IR (-O2):
define i32 @is_property_currency_symbol(i32 %0) {
%2 = tail call i32 @is_category_Sc(i32 %0)
ret i32 %2
}
void fs_write_to(struct _file_stream *s, struct _file_stream *out) {
  long long end = 1024;
  long long pos = 0;
  int buffer = 0;
  while (pos < end) {
    int length = 1024;
    long long next_pos = pos + length;
    if (next_pos > end) {
      length = (int)(end - pos);
    }
    pos = next_pos;
  }
}


x86 assembly (clang, -O0):
<fs_write_to>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movq   $0x400,-0x18(%rbp)
movq   $0x0,-0x20(%rbp)
movl   $0x0,-0x24(%rbp)
mov    -0x20(%rbp),%rax
cmp    -0x18(%rbp),%rax
jge    116d <fs_write_to+0x6d>
movl   $0x400,-0x28(%rbp)
mov    -0x20(%rbp),%rax
movslq -0x28(%rbp),%rcx
add    %rcx,%rax
mov    %rax,-0x30(%rbp)
mov    -0x30(%rbp),%rax
cmp    -0x18(%rbp),%rax
jle    1160 <fs_write_to+0x60>
mov    -0x18(%rbp),%rax
sub    -0x20(%rbp),%rax
mov    %eax,-0x28(%rbp)
mov    -0x30(%rbp),%rax
mov    %rax,-0x20(%rbp)
jmp    1123 <fs_write_to+0x23>
pop    %rbp
ret

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

LLVM IR (-O0):
%struct._file_stream = type opaque
define void @fs_write_to(%struct._file_stream* %0, %struct._file_stream* %1) {
%3 = alloca %struct._file_stream*
%4 = alloca %struct._file_stream*
%5 = alloca i64
%6 = alloca i64
%7 = alloca i32
%8 = alloca i32
%9 = alloca i64
store %struct._file_stream* %0, %struct._file_stream** %3
store %struct._file_stream* %1, %struct._file_stream** %4
store i64 1024, i64* %5
store i64 0, i64* %6
store i32 0, i32* %7
br label %10
10: ; preds = %27, %2
%11 = load i64, i64* %6
%12 = load i64, i64* %5
%13 = icmp slt i64 %11, %12
br i1 %13, label %14, label %29
14: ; preds = %10
store i32 1024, i32* %8
%15 = load i64, i64* %6
%16 = load i32, i32* %8
%17 = sext i32 %16 to i64
%18 = add nsw i64 %15, %17
store i64 %18, i64* %9
%19 = load i64, i64* %9
%20 = load i64, i64* %5
%21 = icmp sgt i64 %19, %20
br i1 %21, label %22, label %27
22: ; preds = %14
%23 = load i64, i64* %5
%24 = load i64, i64* %6
%25 = sub nsw i64 %23, %24
%26 = trunc i64 %25 to i32
store i32 %26, i32* %8
br label %27
27: ; preds = %22, %14
%28 = load i64, i64* %9
store i64 %28, i64* %6
br label %10
29: ; preds = %10
ret void
}

LLVM IR (-O2):
%struct._file_stream = type opaque
define void @fs_write_to(%struct._file_stream* nocapture %0, %struct._file_stream* nocapture %1) {
ret void
}
/* Variables and functions */
int get_gpio_number(int);
int /*<<< orphan*/ setup_gpio(int, int, int);
void pinMode(int gpio, int direction) {
  int gpioPin = get_gpio_number(gpio);
  setup_gpio(gpioPin, direction, 1);
}


x86 assembly (clang, -O0):
<pinMode>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%edi
call   1040 <get_gpio_number@plt>
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%edi
mov    -0x8(%rbp),%esi
mov    $0x1,%edx
call   1030 <setup_gpio@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<pinMode>:
push   %rbx
mov    %esi,%ebx
call   1040 <get_gpio_number@plt>
mov    %eax,%edi
mov    %ebx,%esi
mov    $0x1,%edx
pop    %rbx
jmp    1030 <setup_gpio@plt>

LLVM IR (-O0):
define void @pinMode(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%6 = load i32, i32* %3
%7 = call i32 @get_gpio_number(i32 %6)
store i32 %7, i32* %5
%8 = load i32, i32* %5
%9 = load i32, i32* %4
%10 = call i32 @setup_gpio(i32 %8, i32 %9, i32 1)
ret void
}

LLVM IR (-O2):
define void @pinMode(i32 %0, i32 %1) {
%3 = tail call i32 @get_gpio_number(i32 %0)
%4 = tail call i32 @setup_gpio(i32 %3, i32 %1, i32 1)
ret void
}
void g_string_ascii_down() {}


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

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

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

LLVM IR (-O2):
define void @g_string_ascii_down() {
ret void
}
/* Variables and functions */
void *malloc(int);
int /*<<< orphan*/ printf(char *, void *);
void f() {
  int x = 0;
  void *y = malloc(8);
  void *z = malloc(8);
  printf("Address of x is %p\n", &x);
  printf("Address of y is %p\n", y);
  printf("Address of z is %p\n", z);
}


x86 assembly (clang, -O0):
<f>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x8,%edi
call   1040 <malloc@plt>
mov    %rax,-0x10(%rbp)
mov    $0x8,%edi
call   1040 <malloc@plt>
mov    %rax,-0x18(%rbp)
lea    -0x4(%rbp),%rsi
lea    0xeaa(%rip),%rdi
call   1030 <printf@plt>
mov    -0x10(%rbp),%rsi
lea    0xeae(%rip),%rdi
call   1030 <printf@plt>
mov    -0x18(%rbp),%rsi
lea    0xeb2(%rip),%rdi
call   1030 <printf@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<f>:
push   %r14
push   %rbx
push   %rax
movl   $0x0,0x4(%rsp)
mov    $0x8,%edi
call   1040 <malloc@plt>
mov    %rax,%rbx
mov    $0x8,%edi
call   1040 <malloc@plt>
mov    %rax,%r14
lea    0xeb3(%rip),%rdi
lea    0x4(%rsp),%rsi
call   1030 <printf@plt>
lea    0xeb6(%rip),%rdi
mov    %rbx,%rsi
call   1030 <printf@plt>
lea    0xebb(%rip),%rdi
mov    %r14,%rsi
call   1030 <printf@plt>
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@.str = [20 x i8] c"Address of x is %p\0A\00"
@.str.1 = [20 x i8] c"Address of y is %p\0A\00"
@.str.2 = [20 x i8] c"Address of z is %p\0A\00"
define void @f() {
%1 = alloca i32
%2 = alloca i8*
%3 = alloca i8*
store i32 0, i32* %1
%4 = call i8* @malloc(i32 8)
store i8* %4, i8** %2
%5 = call i8* @malloc(i32 8)
store i8* %5, i8** %3
%6 = bitcast i32* %1 to i8*
%7 = call i32 @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0), i8* %6)
%8 = load i8*, i8** %2
%9 = call i32 @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.1, i64 0, i64 0), i8* %8)
%10 = load i8*, i8** %3
%11 = call i32 @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.2, i64 0, i64 0), i8* %10)
ret void
}

LLVM IR (-O2):
@.str = [20 x i8] c"Address of x is %p\0A\00"
@.str.1 = [20 x i8] c"Address of y is %p\0A\00"
@.str.2 = [20 x i8] c"Address of z is %p\0A\00"
define void @f() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
store i32 0, i32* %1
%3 = tail call dereferenceable_or_null(8) i8* @malloc(i32 8)
%4 = tail call dereferenceable_or_null(8) i8* @malloc(i32 8)
%5 = call i32 @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0), i8* %2)
%6 = call i32 @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.1, i64 0, i64 0), i8* %3)
%7 = call i32 @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.2, i64 0, i64 0), i8* %4)
ret void
}
/* Variables and functions */
int EOF;
int getchar();
int /*<<< orphan*/ printf(char *, int);
int main() {
  int c;
  while ((c = getchar()) != EOF) {
    printf("%d", c != EOF);
  }
  printf("%d", c != EOF);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x0,%al
call   1040 <getchar@plt>
mov    %eax,-0x8(%rbp)
mov    0x2ea8(%rip),%rcx
cmp    (%rcx),%eax
je     116d <main+0x4d>
mov    -0x8(%rbp),%eax
mov    0x2e96(%rip),%rcx
cmp    (%rcx),%eax
setne  %al
and    $0x1,%al
movzbl %al,%esi
lea    0xe9d(%rip),%rdi
call   1030 <printf@plt>
jmp    112f <main+0xf>
mov    -0x8(%rbp),%eax
mov    0x2e71(%rip),%rcx
cmp    (%rcx),%eax
setne  %al
and    $0x1,%al
movzbl %al,%esi
lea    0xe78(%rip),%rdi
call   1030 <printf@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r14
push   %rbx
push   %rax
xor    %eax,%eax
call   1040 <getchar@plt>
mov    0x2eb6(%rip),%r14
cmp    (%r14),%eax
je     1159 <main+0x39>
lea    0xec2(%rip),%rbx
xchg   %ax,%ax
mov    %rbx,%rdi
mov    $0x1,%esi
call   1030 <printf@plt>
xor    %eax,%eax
call   1040 <getchar@plt>
cmp    (%r14),%eax
jne    1140 <main+0x20>
lea    0xea0(%rip),%rdi
xor    %esi,%esi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

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

LLVM IR (-O2):
@EOF = global i32 0
@.str = [3 x i8] c"%d\00"
define i32 @main() {
%1 = tail call i32 (...) @getchar()
%2 = load i32, i32* @EOF
%3 = icmp eq i32 %1, %2
br i1 %3, label %9, label %4
4: ; preds = %0, %4
%5 = tail call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 1)
%6 = tail call i32 (...) @getchar()
%7 = load i32, i32* @EOF
%8 = icmp eq i32 %6, %7
br i1 %8, label %9, label %4
9: ; preds = %4, %0
%10 = tail call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 0)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ EINVAL;
int /*<<< orphan*/ ERANGE;
int /*<<< orphan*/ errno;
char *getcwd(char *buf, size_t size) {
  if (size <= 1) {
    errno = EINVAL;
    if (size == 1)
      errno = ERANGE;
    return NULL;
  }
  buf[0] = '/';
  buf[1] = '\0';
  return buf;
}


x86 assembly (clang, -O0):
<getcwd>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
cmpq   $0x1,-0x18(%rbp)
ja     1153 <getcwd+0x53>
mov    0x2eb2(%rip),%rax
mov    (%rax),%ecx
mov    0x2eb1(%rip),%rax
mov    %ecx,(%rax)
cmpq   $0x1,-0x18(%rbp)
jne    1146 <getcwd+0x46>
mov    0x2ead(%rip),%rax
mov    (%rax),%ecx
mov    0x2e94(%rip),%rax
mov    %ecx,(%rax)
movq   $0x0,-0x8(%rbp)
jmp    116a <getcwd+0x6a>
mov    -0x10(%rbp),%rax
movb   $0x2f,(%rax)
mov    -0x10(%rbp),%rax
movb   $0x0,0x1(%rax)
mov    -0x10(%rbp),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<getcwd>:
cmp    $0x1,%rsi
ja     1128 <getcwd+0x28>
mov    0x2ec3(%rip),%rax
mov    (%rax),%ecx
mov    0x2ec2(%rip),%rax
mov    %ecx,(%rax)
jne    1131 <getcwd+0x31>
mov    0x2ec7(%rip),%rcx
mov    (%rcx),%ecx
mov    %ecx,(%rax)
xor    %eax,%eax
ret
mov    %rdi,%rax
movw   $0x2f,(%rdi)
ret
xor    %eax,%eax
ret

LLVM IR (-O0):
@EINVAL = global i32 0
@errno = global i32 0
@ERANGE = global i32 0
define i8* @getcwd(i8* %0, i64 %1) {
%3 = alloca i8*
%4 = alloca i8*
%5 = alloca i64
store i8* %0, i8** %4
store i64 %1, i64* %5
%6 = load i64, i64* %5
%7 = icmp ule i64 %6, 1
br i1 %7, label %8, label %15
8: ; preds = %2
%9 = load i32, i32* @EINVAL
store i32 %9, i32* @errno
%10 = load i64, i64* %5
%11 = icmp eq i64 %10, 1
br i1 %11, label %12, label %14
12: ; preds = %8
%13 = load i32, i32* @ERANGE
store i32 %13, i32* @errno
br label %14
14: ; preds = %12, %8
store i8* null, i8** %3
br label %21
15: ; preds = %2
%16 = load i8*, i8** %4
%17 = getelementptr inbounds i8, i8* %16, i64 0
store i8 47, i8* %17
%18 = load i8*, i8** %4
%19 = getelementptr inbounds i8, i8* %18, i64 1
store i8 0, i8* %19
%20 = load i8*, i8** %4
store i8* %20, i8** %3
br label %21
21: ; preds = %15, %14
%22 = load i8*, i8** %3
ret i8* %22
}

LLVM IR (-O2):
@EINVAL = global i32 0
@errno = global i32 0
@ERANGE = global i32 0
define i8* @getcwd(i8* writeonly %0, i64 %1) {
%3 = icmp ult i64 %1, 2
br i1 %3, label %4, label %9
4: ; preds = %2
%5 = load i32, i32* @EINVAL
store i32 %5, i32* @errno
%6 = icmp eq i64 %1, 1
br i1 %6, label %7, label %11
7: ; preds = %4
%8 = load i32, i32* @ERANGE
store i32 %8, i32* @errno
br label %11
9: ; preds = %2
store i8 47, i8* %0
%10 = getelementptr inbounds i8, i8* %0, i64 1
store i8 0, i8* %10
br label %11
11: ; preds = %4, %7, %9
%12 = phi i8* [ %0, %9 ], [ null, %7 ], [ null, %4 ]
ret i8* %12
}
int main() {
  int a = 6;
  int b = 7;
  return a * b;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
movl   $0x0,-0x4(%rbp)
movl   $0x6,-0x8(%rbp)
movl   $0x7,-0xc(%rbp)
mov    -0x8(%rbp),%eax
imul   -0xc(%rbp),%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @main() {
ret i32 42
}
/* Variables and functions */
size_t address_to_frame(void *);
void deallocate_frame(void *address) {
  unsigned char *frames_ptr = 0xC1400000;
  frames_ptr[address_to_frame(address)] = 0;
}


x86 assembly (clang, -O0):
<deallocate_frame>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    $0xc1400000,%eax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <address_to_frame@plt>
mov    %rax,%rcx
mov    -0x18(%rbp),%rax
movb   $0x0,(%rax,%rcx,1)
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<deallocate_frame>:
push   %rax
call   1030 <address_to_frame@plt>
mov    $0xc1400000,%ecx
movb   $0x0,(%rax,%rcx,1)
pop    %rax
ret

LLVM IR (-O0):
define void @deallocate_frame(i8* %0) {
%2 = alloca i8*
%3 = alloca i8*
store i8* %0, i8** %2
store i8* inttoptr (i64 3242196992 to i8*), i8** %3
%4 = load i8*, i8** %3
%5 = load i8*, i8** %2
%6 = call i64 @address_to_frame(i8* %5)
%7 = getelementptr inbounds i8, i8* %4, i64 %6
store i8 0, i8* %7
ret void
}

LLVM IR (-O2):
define void @deallocate_frame(i8* %0) {
%2 = tail call i64 @address_to_frame(i8* %0)
%3 = getelementptr inbounds i8, i8* inttoptr (i64 3242196992 to i8*), i64 %2
store i8 0, i8* %3
ret void
}
void fc126(int n) {
  {
    typedef int(*b)[n];
    {
      typedef int(*c)[n];
      0;
    }
    {
      typedef int(*d)[n];
      0;
    };
    typedef int(*e)[n];
    0;
  };
  goto a;
a : {
  typedef int(*f)[n];
  {
    typedef int(*g)[n];
    0;
  };
  {
    typedef int(*h)[n];
    0;
  };
  ;
  typedef int(*i)[n];
  0;
};
  ;
  typedef int(*j)[n];
  0;
}


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

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

LLVM IR (-O0):
define void @fc126(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = zext i32 %3 to i64
%5 = load i32, i32* %2
%6 = zext i32 %5 to i64
%7 = load i32, i32* %2
%8 = zext i32 %7 to i64
%9 = load i32, i32* %2
%10 = zext i32 %9 to i64
br label %11
11: ; preds = %1
%12 = load i32, i32* %2
%13 = zext i32 %12 to i64
%14 = load i32, i32* %2
%15 = zext i32 %14 to i64
%16 = load i32, i32* %2
%17 = zext i32 %16 to i64
%18 = load i32, i32* %2
%19 = zext i32 %18 to i64
%20 = load i32, i32* %2
%21 = zext i32 %20 to i64
ret void
}

LLVM IR (-O2):
define void @fc126(i32 %0) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ log_f(char *);
unsigned mouseb_none_axe_count_get(unsigned mouse) {
  log_f("mouseb:none: mouseb_none_axe_count_get()\n");
  return 2;
}


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

x86 assembly (clang, -O2):
<mouseb_none_axe_count_get>:
push   %rax
lea    0xee8(%rip),%rdi
call   1030 <log_f@plt>
mov    $0x2,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [42 x i8] c"mouseb:none: mouseb_none_axe_count_get()\0A\00"
define i32 @mouseb_none_axe_count_get(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = call i32 @log_f(i8* getelementptr inbounds ([42 x i8], [42 x i8]* @.str, i64 0, i64 0))
ret i32 2
}

LLVM IR (-O2):
@.str = [42 x i8] c"mouseb:none: mouseb_none_axe_count_get()\0A\00"
define i32 @mouseb_none_axe_count_get(i32 %0) {
%2 = tail call i32 @log_f(i8* getelementptr inbounds ([42 x i8], [42 x i8]* @.str, i64 0, i64 0))
ret i32 2
}
/* Variables and functions */
int /*<<< orphan*/ endwin();
void cleanup(void) { endwin(); }


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

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

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

LLVM IR (-O2):
define void @cleanup() {
%1 = tail call i32 (...) @endwin()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ O_RDWR;
int open(char *, int /*<<< orphan*/);
int sw_sync_timeline_create(void) {
  return open("/sys/kernel/debug/sync/sw_sync", O_RDWR);
}


x86 assembly (clang, -O0):
<sw_sync_timeline_create>:
push   %rbp
mov    %rsp,%rbp
mov    0x2ecd(%rip),%rax
mov    (%rax),%esi
lea    0xedc(%rip),%rdi
call   1030 <open@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<sw_sync_timeline_create>:
mov    0x2ed1(%rip),%rax
mov    (%rax),%esi
lea    0xee0(%rip),%rdi
jmp    1030 <open@plt>

LLVM IR (-O0):
@.str = [31 x i8] c"/sys/kernel/debug/sync/sw_sync\00"
@O_RDWR = global i32 0
define i32 @sw_sync_timeline_create() {
%1 = load i32, i32* @O_RDWR
%2 = call i32 @open(i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str, i64 0, i64 0), i32 %1)
ret i32 %2
}

LLVM IR (-O2):
@.str = [31 x i8] c"/sys/kernel/debug/sync/sw_sync\00"
@O_RDWR = global i32 0
define i32 @sw_sync_timeline_create() {
%1 = load i32, i32* @O_RDWR
%2 = tail call i32 @open(i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str, i64 0, i64 0), i32 %1)
ret i32 %2
}
/* Variables and functions */
scalar_t__ malloc(size_t);
void *skyeye_mm(size_t sz) {
  void *result = (unsigned long)malloc(sz);
  return result;
}


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

x86 assembly (clang, -O2):
<skyeye_mm>:
jmp    1030 <malloc@plt>

LLVM IR (-O0):
define i8* @skyeye_mm(i64 %0) {
%2 = alloca i64
%3 = alloca i8*
store i64 %0, i64* %2
%4 = load i64, i64* %2
%5 = call i64 @malloc(i64 %4)
%6 = inttoptr i64 %5 to i8*
store i8* %6, i8** %3
%7 = load i8*, i8** %3
ret i8* %7
}

LLVM IR (-O2):
define i8* @skyeye_mm(i64 %0) {
%2 = tail call i64 @malloc(i64 %0)
%3 = inttoptr i64 %2 to i8*
ret i8* %3
}
/* Variables and functions */
scalar_t__ ENOTTY;
int /*<<< orphan*/ TIOCOUTQ;
scalar_t__ errno;
int ioctl(int, int /*<<< orphan*/, int *);
bool istty(int fd) {
  int error;
  int num;
  error = ioctl(fd, TIOCOUTQ, &num);
  if (error && errno == ENOTTY)
    return false;
  else
    return true;
}


x86 assembly (clang, -O0):
<istty>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
mov    -0x8(%rbp),%edi
mov    0x2eb3(%rip),%rax
mov    (%rax),%esi
lea    -0x10(%rbp),%rdx
call   1030 <ioctl@plt>
mov    %eax,-0xc(%rbp)
cmpl   $0x0,-0xc(%rbp)
je     1163 <istty+0x53>
mov    0x2e8c(%rip),%rax
mov    (%rax),%rax
mov    0x2e9a(%rip),%rcx
cmp    (%rcx),%rax
jne    1163 <istty+0x53>
movl   $0x0,-0x4(%rbp)
jmp    116a <istty+0x5a>
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<istty>:
push   %rax
mov    0x2ec0(%rip),%rax
mov    (%rax),%esi
lea    0x4(%rsp),%rdx
call   1030 <ioctl@plt>
test   %eax,%eax
je     1140 <istty+0x30>
mov    0x2ea1(%rip),%rax
mov    (%rax),%rcx
mov    0x2eaf(%rip),%rdx
xor    %eax,%eax
cmp    (%rdx),%rcx
je     1145 <istty+0x35>
mov    $0x1,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
@TIOCOUTQ = global i32 0
@errno = global i64 0
@ENOTTY = global i64 0
define i32 @istty(i32 %0) {
%2 = alloca i32
%3 = bitcast i32* %2 to i8*
%4 = load i32, i32* @TIOCOUTQ
%5 = call i32 @ioctl(i32 %0, i32 %4, i32* %2)
%6 = icmp eq i32 %5, 0
br i1 %6, label %11, label %7
7: ; preds = %1
%8 = load i64, i64* @errno
%9 = load i64, i64* @ENOTTY
%10 = icmp eq i64 %8, %9
br i1 %10, label %12, label %11
11: ; preds = %7, %1
br label %12
12: ; preds = %7, %11
%13 = phi i32 [ 1, %11 ], [ 0, %7 ]
ret i32 %13
}
/* Variables and functions */
int strempty(const char *s) { return (s == NULL) || (s[0] == '\0'); }


x86 assembly (clang, -O0):
<strempty>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    $0x1,%al
cmpq   $0x0,-0x8(%rbp)
mov    %al,-0x9(%rbp)
je     1128 <strempty+0x28>
mov    -0x8(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x0,%eax
sete   %al
mov    %al,-0x9(%rbp)
mov    -0x9(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<strempty>:
test   %rdi,%rdi
je     110e <strempty+0xe>
xor    %eax,%eax
cmpb   $0x0,(%rdi)
sete   %al
ret
mov    $0x1,%eax
ret

LLVM IR (-O0):
define i32 @strempty(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = icmp eq i8* %3, null
br i1 %4, label %11, label %5
5: ; preds = %1
%6 = load i8*, i8** %2
%7 = getelementptr inbounds i8, i8* %6, i64 0
%8 = load i8, i8* %7
%9 = sext i8 %8 to i32
%10 = icmp eq i32 %9, 0
br label %11
11: ; preds = %5, %1
%12 = phi i1 [ true, %1 ], [ %10, %5 ]
%13 = zext i1 %12 to i32
ret i32 %13
}

LLVM IR (-O2):
define i32 @strempty(i8* %0) {
%2 = icmp eq i8* %0, null
br i1 %2, label %7, label %3
3: ; preds = %1
%4 = load i8, i8* %0
%5 = icmp eq i8 %4, 0
%6 = zext i1 %5 to i32
br label %7
7: ; preds = %3, %1
%8 = phi i32 [ 1, %1 ], [ %6, %3 ]
ret i32 %8
}
unsigned base32_encode_length(unsigned length) {
  return ((length * 8) + 4) / 5;
}


x86 assembly (clang, -O0):
<base32_encode_length>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
shl    $0x3,%eax
add    $0x4,%eax
mov    $0x5,%ecx
xor    %edx,%edx
div    %ecx
pop    %rbp
ret

x86 assembly (clang, -O2):
<base32_encode_length>:
lea    0x4(,%rdi,8),%ecx
mov    $0xcccccccd,%eax
imul   %rcx,%rax
shr    $0x22,%rax
ret

LLVM IR (-O0):
define i32 @base32_encode_length(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = mul i32 %3, 8
%5 = add i32 %4, 4
%6 = udiv i32 %5, 5
ret i32 %6
}

LLVM IR (-O2):
define i32 @base32_encode_length(i32 %0) {
%2 = shl i32 %0, 3
%3 = or i32 %2, 4
%4 = udiv i32 %3, 5
ret i32 %4
}
/* Variables and functions */
char *strdup(char *);
char *cdio_get_default_device_bsdi(void) { return strdup("/dev/rsr0c"); }


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

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

LLVM IR (-O0):
@.str = [11 x i8] c"/dev/rsr0c\00"
define i8* @cdio_get_default_device_bsdi() {
%1 = call i8* @strdup(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0))
ret i8* %1
}

LLVM IR (-O2):
@.str = [11 x i8] c"/dev/rsr0c\00"
define noalias i8* @cdio_get_default_device_bsdi() {
%1 = tail call dereferenceable_or_null(11) i8* @strdup(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0))
ret i8* %1
}
/* Variables and functions */
int /*<<< orphan*/ p2(int);
int /*<<< orphan*/ printf(char *, int /*<<< orphan*/);
int main() {
  printf("%ld", p2(4e6));
  return 0;
}


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

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    $0x3d0900,%edi
call   1030 <p2@plt>
lea    0xece(%rip),%rdi
mov    %eax,%esi
call   1040 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [4 x i8] c"%ld\00"
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 @p2(i32 4000000)
%3 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %2)
ret i32 0
}

LLVM IR (-O2):
@.str = [4 x i8] c"%ld\00"
define i32 @main() {
%1 = tail call i32 @p2(i32 4000000)
%2 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %1)
ret i32 0
}
/* Type definitions */
typedef scalar_t__ uint8_t;
typedef int /*<<< orphan*/ uint32_t;

/* Variables and functions */
int /*<<< orphan*/ internal_fiat_secp256k1_selectznz(uintptr_t, uintptr_t,
                                                     uintptr_t, uintptr_t);
void fiat_secp256k1_selectznz(uint32_t out1[8], uint8_t arg1,
                              const uint32_t arg2[8], const uint32_t arg3[8]) {
  internal_fiat_secp256k1_selectznz((uintptr_t)out1, (uintptr_t)arg1,
                                    (uintptr_t)arg2, (uintptr_t)arg3);
}


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

x86 assembly (clang, -O2):
<fiat_secp256k1_selectznz>:
jmp    1030 <internal_fiat_secp256k1_selectznz@plt>

LLVM IR (-O0):
define void @fiat_secp256k1_selectznz(i32* %0, i64 %1, i32* %2, i32* %3) {
%5 = alloca i32*
%6 = alloca i64
%7 = alloca i32*
%8 = alloca i32*
store i32* %0, i32** %5
store i64 %1, i64* %6
store i32* %2, i32** %7
store i32* %3, i32** %8
%9 = load i32*, i32** %5
%10 = ptrtoint i32* %9 to i64
%11 = load i64, i64* %6
%12 = load i32*, i32** %7
%13 = ptrtoint i32* %12 to i64
%14 = load i32*, i32** %8
%15 = ptrtoint i32* %14 to i64
%16 = call i32 @internal_fiat_secp256k1_selectznz(i64 %10, i64 %11, i64 %13, i64 %15)
ret void
}

LLVM IR (-O2):
define void @fiat_secp256k1_selectznz(i32* %0, i64 %1, i32* %2, i32* %3) {
%5 = ptrtoint i32* %0 to i64
%6 = ptrtoint i32* %2 to i64
%7 = ptrtoint i32* %3 to i64
%8 = tail call i32 @internal_fiat_secp256k1_selectznz(i64 %5, i64 %1, i64 %6, i64 %7)
ret void
}
int (*s_calc_func(char op))(int, int) { return calc_func(op); }


x86 assembly (clang, -O0):
<s_calc_func>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movsbl -0x1(%rbp),%edi
mov    $0x0,%al
call   1030 <calc_func@plt>
cltq
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 (i32, i32)* @s_calc_func(i8 signext %0) {
%2 = alloca i8
store i8 %0, i8* %2
%3 = load i8, i8* %2
%4 = sext i8 %3 to i32
%5 = call i32 (i32, ...) bitcast (i32 (...)* @calc_func to i32 (i32, ...)*)(i32 %4)
%6 = sext i32 %5 to i64
%7 = inttoptr i64 %6 to i32 (i32, i32)*
ret i32 (i32, i32)* %7
}

LLVM IR (-O2):
define i32 (i32, i32)* @s_calc_func(i8 signext %0) {
%2 = sext i8 %0 to i32
%3 = tail call i32 (i32, ...) bitcast (i32 (...)* @calc_func to i32 (i32, ...)*)(i32 %2)
%4 = sext i32 %3 to i64
%5 = inttoptr i64 %4 to i32 (i32, i32)*
ret i32 (i32, i32)* %5
}
int numcmp(long long a, long long b) {
  if (a < b)
    return -1;
  if (a > b)
    return 1;
  return 0;
}


x86 assembly (clang, -O0):
<numcmp>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    -0x10(%rbp),%rax
cmp    -0x18(%rbp),%rax
jge    1126 <numcmp+0x26>
movl   $0xffffffff,-0x4(%rbp)
jmp    1147 <numcmp+0x47>
mov    -0x10(%rbp),%rax
cmp    -0x18(%rbp),%rax
jle    1140 <numcmp+0x40>
movl   $0x1,-0x4(%rbp)
jmp    1147 <numcmp+0x47>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<numcmp>:
xor    %ecx,%ecx
cmp    %rsi,%rdi
setg   %cl
mov    $0xffffffff,%eax
cmovge %ecx,%eax
ret

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

LLVM IR (-O2):
define i32 @numcmp(i64 %0, i64 %1) {
%3 = icmp slt i64 %0, %1
%4 = icmp sgt i64 %0, %1
%5 = zext i1 %4 to i32
%6 = select i1 %3, i32 -1, i32 %5
ret i32 %6
}