xunge/DecIR huggingface dataset:
void wcseq(hstring, wcs) char *hstring;
struct WorldCoor *wcs;
{
  char mchar;
  mchar = (char)0;
  wcseqm(hstring, wcs, &mchar);
  return;
}


x86 assembly (clang, -O0):
<wcseq>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movb   $0x0,-0x11(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
lea    -0x11(%rbp),%rdx
mov    $0x0,%al
call   1030 <wcseqm@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<wcseq>:
push   %rax
movb   $0x0,0x7(%rsp)
lea    0x7(%rsp),%rdx
xor    %eax,%eax
call   1030 <wcseqm@plt>
pop    %rax
ret

LLVM IR (-O0):
%struct.WorldCoor = type opaque
define void @wcseq(i8* %0, %struct.WorldCoor* %1) {
%3 = alloca i8*
%4 = alloca %struct.WorldCoor*
%5 = alloca i8
store i8* %0, i8** %3
store %struct.WorldCoor* %1, %struct.WorldCoor** %4
store i8 0, i8* %5
%6 = load i8*, i8** %3
%7 = load %struct.WorldCoor*, %struct.WorldCoor** %4
%8 = call i32 (i8*, %struct.WorldCoor*, i8*, ...) bitcast (i32 (...)* @wcseqm to i32 (i8*, %struct.WorldCoor*, i8*, ...)*)(i8* %6, %struct.WorldCoor* %7, i8* %5)
ret void
}

LLVM IR (-O2):
%struct.WorldCoor = type opaque
define void @wcseq(i8* %0, %struct.WorldCoor* %1) {
%3 = alloca i8
store i8 0, i8* %3
%4 = call i32 (i8*, %struct.WorldCoor*, i8*, ...) bitcast (i32 (...)* @wcseqm to i32 (i8*, %struct.WorldCoor*, i8*, ...)*)(i8* %0, %struct.WorldCoor* %1, i8* %3)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ uint8_t;
typedef int /*<<< orphan*/ uint16_t;
typedef int /*<<< orphan*/ u16;

/* Variables and functions */
int /*<<< orphan*/ memcpy(int /*<<< orphan*/ *, int /*<<< orphan*/ *, int);
int /*<<< orphan*/ pgp_ntoh16(int /*<<< orphan*/);
uint16_t get_16(uint8_t *p) {
  uint16_t u16;
  memcpy(&u16, p, sizeof(u16));
  return pgp_ntoh16(u16);
}


x86 assembly (clang, -O0):
<get_16>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rsi
lea    -0xc(%rbp),%rdi
mov    $0x4,%edx
call   1040 <memcpy@plt>
mov    -0xc(%rbp),%edi
call   1030 <pgp_ntoh16@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_16>:
push   %rax
mov    %rdi,%rsi
lea    0x4(%rsp),%rdi
mov    $0x4,%edx
call   1040 <memcpy@plt>
mov    0x4(%rsp),%edi
call   1030 <pgp_ntoh16@plt>
pop    %rcx
ret

LLVM IR (-O0):
define i32 @get_16(i32* %0) {
%2 = alloca i32*
%3 = alloca i32
store i32* %0, i32** %2
%4 = load i32*, i32** %2
%5 = call i32 @memcpy(i32* %3, i32* %4, i32 4)
%6 = load i32, i32* %3
%7 = call i32 @pgp_ntoh16(i32 %6)
ret i32 %7
}

LLVM IR (-O2):
define i32 @get_16(i32* %0) {
%2 = alloca i32
%3 = bitcast i32* %2 to i8*
%4 = call i32 @memcpy(i32* %2, i32* %0, i32 4)
%5 = load i32, i32* %2
%6 = call i32 @pgp_ntoh16(i32 %5)
ret i32 %6
}
/* Variables and functions */
int /*<<< orphan*/ get_user(char *);
int /*<<< orphan*/ printf(char *, char *);
char *select_user(char *);
int main(int argc, char *argv[]) {
  get_user("user.conf");
  char *nnn = select_user("guest");
  printf("%s\n", nnn);
  return (0);
}


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)
lea    0xeb3(%rip),%rdi
call   1050 <get_user@plt>
lea    0xeb1(%rip),%rdi
call   1040 <select_user@plt>
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rsi
lea    0xea3(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xec8(%rip),%rdi
call   1050 <get_user@plt>
lea    0xec6(%rip),%rdi
call   1040 <select_user@plt>
lea    0xec0(%rip),%rdi
mov    %rax,%rsi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [10 x i8] c"user.conf\00"
@.str.1 = [6 x i8] c"guest\00"
@.str.2 = [4 x i8] c"%s\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i8*
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%7 = call i32 @get_user(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0))
%8 = call i8* @select_user(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0))
store i8* %8, i8** %6
%9 = load i8*, i8** %6
%10 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0), i8* %9)
ret i32 0
}

LLVM IR (-O2):
@.str = [10 x i8] c"user.conf\00"
@.str.1 = [6 x i8] c"guest\00"
@.str.2 = [4 x i8] c"%s\0A\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @get_user(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0))
%4 = tail call i8* @select_user(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0))
%5 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0), i8* %4)
ret i32 0
}
void __exit(int code) {
  while (1) {
  }
}


x86 assembly (clang, -O0):
<__exit>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
jmp    1107 <__exit+0x7>

x86 assembly (clang, -O2):
<__exit>:
jmp    1100 <__exit>

LLVM IR (-O0):
define void @__exit(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
br label %3
3: ; preds = %1, %3
br label %3
}

LLVM IR (-O2):
define void @__exit(i32 %0) {
br label %2
2: ; preds = %1, %2
br label %2
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void vixDestroy(void) {
  printf("[genfb-demo-driver] "
         "destory\n");
  return;
}


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

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

LLVM IR (-O0):
@.str = [29 x i8] c"[genfb-demo-driver] destory\0A\00"
define void @vixDestroy() {
%1 = call i32 @printf(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@str = [28 x i8] c"[genfb-demo-driver] destory\00"
define void @vixDestroy() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([28 x i8], [28 x i8]* @str, i64 0, i64 0))
ret void
}
/* Variables and functions */
int strlen(char *);
int /*<<< orphan*/ strncat(char *, char *, int);
char *zalloc(int);
char *set_default(char *str) {
  int len;
  char *p;
  len = strlen(str);
  p = (zalloc(len + 1));
  if (!p)
    return NULL;
  strncat(p, str, len);
  return p;
}


x86 assembly (clang, -O0):
<set_default>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
call   1030 <strlen@plt>
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%edi
add    $0x1,%edi
call   1050 <zalloc@plt>
mov    %rax,-0x20(%rbp)
cmpq   $0x0,-0x20(%rbp)
jne    116f <set_default+0x3f>
movq   $0x0,-0x8(%rbp)
jmp    1187 <set_default+0x57>
mov    -0x20(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x14(%rbp),%edx
call   1040 <strncat@plt>
mov    -0x20(%rbp),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<set_default>:
push   %r15
push   %r14
push   %rbx
mov    %rdi,%r14
call   1030 <strlen@plt>
mov    %eax,%r15d
lea    0x1(%r15),%edi
call   1050 <zalloc@plt>
mov    %rax,%rbx
test   %rax,%rax
je     115f <set_default+0x2f>
mov    %rbx,%rdi
mov    %r14,%rsi
mov    %r15d,%edx
call   1040 <strncat@plt>
mov    %rbx,%rax
pop    %rbx
pop    %r14
pop    %r15
ret

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

LLVM IR (-O2):
define i8* @set_default(i8* %0) {
%2 = tail call i32 @strlen(i8* %0)
%3 = add nsw i32 %2, 1
%4 = tail call i8* @zalloc(i32 %3)
%5 = icmp eq i8* %4, null
br i1 %5, label %8, label %6
6: ; preds = %1
%7 = tail call i32 @strncat(i8* %4, i8* %0, i32 %2)
br label %8
8: ; preds = %1, %6
ret i8* %4
}
__attribute__((always_)) int test_and_clear_bit(int nr,
                                                volatile unsigned long *addr) {
  int oldbit;
  asm volatile(""
               "btr %2,%1\n\t"
               "sbb %0,%0"
               : "=r"(oldbit), "+m"(*(volatile long *)(addr))
               : "Ir"(nr)
               : "memory");
  return oldbit;
}


x86 assembly (clang, -O0):
<test_and_clear_bit>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    -0x4(%rbp),%ecx
btr    %ecx,(%rax)
sbb    %eax,%eax
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_and_clear_bit>:
btr    %edi,(%rsi)
sbb    %eax,%eax
ret

LLVM IR (-O0):
define i32 @test_and_clear_bit(i32 %0, i64* %1) {
%3 = alloca i32
%4 = alloca i64*
%5 = alloca i32
store i32 %0, i32* %3
store i64* %1, i64** %4
%6 = load i64*, i64** %4
%7 = load i32, i32* %3
%8 = call i32 asm sideeffect "btr $2,$1\0A\09sbb $0,$0", "=r,=*m,Ir,*m,~{memory},~{dirflag},~{fpsr},~{flags}"(i64* elementtype(i64) %6, i32 %7, i64* elementtype(i64) %6)
store i32 %8, i32* %5
%9 = load i32, i32* %5
ret i32 %9
}

LLVM IR (-O2):
define i32 @test_and_clear_bit(i32 %0, i64* %1) {
%3 = tail call i32 asm sideeffect "btr $2,$1\0A\09sbb $0,$0", "=r,=*m,Ir,*m,~{memory},~{dirflag},~{fpsr},~{flags}"(i64* elementtype(i64) %1, i32 %0, i64* elementtype(i64) %1)
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ perm(int);
int main(void) {
  perm(9);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x9,%edi
call   1030 <perm@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    $0x9,%edi
call   1030 <perm@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 @perm(i32 9)
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 @perm(i32 9)
ret i32 0
}
long atou(str)
char *str;
{
  long value;
  for (value = 0; (isdigit((*str))); ++str)
    value = value * 10 + *str - '0';
  return *str ? -1L : value;
}


x86 assembly (clang, -O0):
<atou>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
movq   $0x0,-0x10(%rbp)
mov    -0x8(%rbp),%rax
movsbl (%rax),%edi
call   1030 <isdigit@plt>
cmp    $0x0,%eax
je     1162 <atou+0x52>
imul   $0xa,-0x10(%rbp),%rax
mov    -0x8(%rbp),%rcx
movsbq (%rcx),%rcx
add    %rcx,%rax
sub    $0x30,%rax
mov    %rax,-0x10(%rbp)
mov    -0x8(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x8(%rbp)
jmp    1124 <atou+0x14>
mov    -0x8(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x0,%eax
je     1182 <atou+0x72>
mov    $0xffffffffffffffff,%rax
mov    %rax,-0x18(%rbp)
jmp    118a <atou+0x7a>
mov    -0x10(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<atou>:
movsbl (%rdi),%eax
mov    %eax,%ecx
add    $0xffffffd0,%ecx
cmp    $0x9,%ecx
ja     1143 <atou+0x43>
add    $0x1,%rdi
xor    %ecx,%ecx
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
lea    (%rcx,%rcx,4),%rcx
movsbq %al,%rax
lea    (%rax,%rcx,2),%rcx
add    $0xffffffffffffffd0,%rcx
movsbl (%rdi),%eax
mov    %eax,%edx
add    $0xffffffd0,%edx
add    $0x1,%rdi
cmp    $0xa,%edx
jb     1120 <atou+0x20>
jmp    1145 <atou+0x45>
xor    %ecx,%ecx
neg    %al
sbb    %rax,%rax
or     %rcx,%rax
ret

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

LLVM IR (-O2):
define i64 @atou(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = sext i8 %2 to i32
%4 = add nsw i32 %3, -48
%5 = icmp ult i32 %4, 10
br i1 %5, label %6, label %19
6: ; preds = %1, %6
%7 = phi i8 [ %15, %6 ], [ %2, %1 ]
%8 = phi i64 [ %13, %6 ], [ 0, %1 ]
%9 = phi i8* [ %14, %6 ], [ %0, %1 ]
%10 = mul nsw i64 %8, 10
%11 = sext i8 %7 to i64
%12 = add i64 %10, -48
%13 = add i64 %12, %11
%14 = getelementptr inbounds i8, i8* %9, i64 1
%15 = load i8, i8* %14
%16 = sext i8 %15 to i32
%17 = add nsw i32 %16, -48
%18 = icmp ult i32 %17, 10
br i1 %18, label %6, label %19
19: ; preds = %6, %1
%20 = phi i64 [ 0, %1 ], [ %13, %6 ]
%21 = phi i8 [ %2, %1 ], [ %15, %6 ]
%22 = icmp eq i8 %21, 0
%23 = select i1 %22, i64 %20, i64 -1
ret i64 %23
}
int bar(int i, int x, int y) { return i < (((x) <= (y)) ? (x) : (y)); }


x86 assembly (clang, -O0):
<bar>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    -0x4(%rbp),%eax
mov    %eax,-0x10(%rbp)
mov    -0x8(%rbp),%eax
cmp    -0xc(%rbp),%eax
jg     112a <bar+0x2a>
mov    -0x8(%rbp),%eax
mov    %eax,-0x14(%rbp)
jmp    1130 <bar+0x30>
mov    -0xc(%rbp),%eax
mov    %eax,-0x14(%rbp)
mov    -0x10(%rbp),%eax
mov    -0x14(%rbp),%ecx
cmp    %ecx,%eax
setl   %al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<bar>:
cmp    %edx,%esi
cmovg  %edx,%esi
xor    %eax,%eax
cmp    %edi,%esi
setg   %al
ret

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

LLVM IR (-O2):
define i32 @bar(i32 %0, i32 %1, i32 %2) {
%4 = icmp sgt i32 %1, %2
%5 = select i1 %4, i32 %2, i32 %1
%6 = icmp sgt i32 %5, %0
%7 = zext i1 %6 to i32
ret i32 %7
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, ...);
void printRow(int a, char lineChar) {
  printf("\n");
  int i = 0;
  for (; i < a; i++) {
    printf("%c", lineChar);
  }
  printf("\n");
}


x86 assembly (clang, -O0):
<printRow>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %sil,%al
mov    %edi,-0x4(%rbp)
mov    %al,-0x5(%rbp)
lea    0xed8(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movl   $0x0,-0xc(%rbp)
mov    -0xc(%rbp),%eax
cmp    -0x4(%rbp),%eax
jge    1162 <printRow+0x52>
movsbl -0x5(%rbp),%esi
lea    0xeb5(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1136 <printRow+0x26>
lea    0xe97(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<printRow>:
push   %rbp
push   %rbx
push   %rax
mov    %esi,%ebp
mov    %edi,%ebx
mov    $0xa,%edi
call   1030 <putchar@plt>
test   %ebx,%ebx
jle    113c <printRow+0x2c>
movsbl %bpl,%ebp
nopl   0x0(%rax)
mov    %ebp,%edi
call   1030 <putchar@plt>
add    $0xffffffff,%ebx
jne    1130 <printRow+0x20>
mov    $0xa,%edi
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    1030 <putchar@plt>

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

LLVM IR (-O2):
define void @printRow(i32 %0, i8 signext %1) {
%3 = tail call i32 @putchar(i32 10)
%4 = icmp sgt i32 %0, 0
br i1 %4, label %5, label %12
5: ; preds = %2
%6 = sext i8 %1 to i32
br label %7
7: ; preds = %5, %7
%8 = phi i32 [ 0, %5 ], [ %10, %7 ]
%9 = tail call i32 @putchar(i32 %6)
%10 = add nuw nsw i32 %8, 1
%11 = icmp eq i32 %10, %0
br i1 %11, label %12, label %7
12: ; preds = %7, %2
%13 = tail call i32 @putchar(i32 10)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ append(char *, int /*<<< orphan*/);
int /*<<< orphan*/ display_name(char const *, char const *);
int /*<<< orphan*/ indent();
void on_dict_start(void *ctx, const char *code, const char *name) {
  append("%s:", display_name(code, name));
  indent();
}


x86 assembly (clang, -O0):
<on_dict_start>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x18(%rbp),%rsi
call   1050 <display_name@plt>
mov    %eax,%esi
lea    0xea6(%rip),%rdi
call   1030 <append@plt>
mov    $0x0,%al
call   1040 <indent@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<on_dict_start>:
push   %rax
mov    %rsi,%rdi
mov    %rdx,%rsi
call   1050 <display_name@plt>
lea    0xebd(%rip),%rdi
mov    %eax,%esi
call   1030 <append@plt>
xor    %eax,%eax
pop    %rcx
jmp    1040 <indent@plt>

LLVM IR (-O0):
@.str = [4 x i8] c"%s:\00"
define void @on_dict_start(i8* %0, i8* %1, i8* %2) {
%4 = alloca i8*
%5 = alloca i8*
%6 = alloca i8*
store i8* %0, i8** %4
store i8* %1, i8** %5
store i8* %2, i8** %6
%7 = load i8*, i8** %5
%8 = load i8*, i8** %6
%9 = call i32 @display_name(i8* %7, i8* %8)
%10 = call i32 @append(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %9)
%11 = call i32 (...) @indent()
ret void
}

LLVM IR (-O2):
@.str = [4 x i8] c"%s:\00"
define void @on_dict_start(i8* nocapture readnone %0, i8* %1, i8* %2) {
%4 = tail call i32 @display_name(i8* %1, i8* %2)
%5 = tail call i32 @append(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %4)
%6 = tail call i32 (...) @indent()
ret void
}
int iselem(int c, char const *l) {
  for (; *l != '\0'; l++) {
    if (*l == c)
      return 1;
  }
  return 0;
}


x86 assembly (clang, -O0):
<iselem>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x0,%eax
je     114d <iselem+0x4d>
mov    -0x10(%rbp),%rax
movsbl (%rax),%eax
cmp    -0x8(%rbp),%eax
jne    1137 <iselem+0x37>
movl   $0x1,-0x4(%rbp)
jmp    1154 <iselem+0x54>
jmp    113c <iselem+0x3c>
mov    -0x10(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x10(%rbp)
jmp    110b <iselem+0xb>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<iselem>:
mov    (%rsi),%cl
xor    %eax,%eax
test   %cl,%cl
je     1122 <iselem+0x22>
add    $0x1,%rsi
nopl   0x0(%rax)
movsbl %cl,%ecx
cmp    %edi,%ecx
je     1123 <iselem+0x23>
movzbl (%rsi),%ecx
add    $0x1,%rsi
test   %cl,%cl
jne    1110 <iselem+0x10>
ret
mov    $0x1,%eax
ret

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

LLVM IR (-O2):
define i32 @iselem(i32 %0, i8* nocapture %1) {
%3 = load i8, i8* %1
%4 = icmp eq i8 %3, 0
br i1 %4, label %14, label %8
5: ; preds = %8
%6 = load i8, i8* %13
%7 = icmp eq i8 %6, 0
br i1 %7, label %14, label %8
8: ; preds = %2, %5
%9 = phi i8 [ %6, %5 ], [ %3, %2 ]
%10 = phi i8* [ %13, %5 ], [ %1, %2 ]
%11 = sext i8 %9 to i32
%12 = icmp eq i32 %11, %0
%13 = getelementptr inbounds i8, i8* %10, i64 1
br i1 %12, label %14, label %5
14: ; preds = %8, %5, %2
%15 = phi i32 [ 0, %2 ], [ 0, %5 ], [ 1, %8 ]
ret i32 %15
}
void wifi_evt_endpoint_data(const struct wifi_msg_endpoint_data_evt_t *msg) {}


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

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

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

LLVM IR (-O2):
%struct.wifi_msg_endpoint_data_evt_t = type opaque
define void @wifi_evt_endpoint_data(%struct.wifi_msg_endpoint_data_evt_t* nocapture %0) {
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ args;

/* Variables and functions */
int spawn(int, char **);
int main(int argc, char *argv[]) {
  char *args[] = {"/usr/games/fortune", NULL};
  return (spawn((sizeof(args) / sizeof((args)[0])) - 1, args));
}


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    0x2ce3(%rip),%rax
mov    %rax,-0x20(%rbp)
mov    0x2ce0(%rip),%rax
mov    %rax,-0x18(%rbp)
lea    -0x20(%rbp),%rsi
mov    $0x1,%edi
call   1030 <spawn@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
sub    $0x18,%rsp
movaps 0x2cf5(%rip),%xmm0
movaps %xmm0,(%rsp)
mov    %rsp,%rsi
mov    $0x1,%edi
call   1030 <spawn@plt>
add    $0x18,%rsp
ret

LLVM IR (-O0):
@.str = [19 x i8] c"/usr/games/fortune\00"
@__const.main.args = [2 x i8*] [i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i32 0, i32 0), i8* null]
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca [2 x i8*]
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%7 = bitcast [2 x i8*]* %6 to i8*
%8 = getelementptr inbounds [2 x i8*], [2 x i8*]* %6, i64 0, i64 0
%9 = call i32 @spawn(i32 1, i8** %8)
ret i32 %9
}

LLVM IR (-O2):
@.str = [19 x i8] c"/usr/games/fortune\00"
@__const.main.args = [2 x i8*] [i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i32 0, i32 0), i8* null]
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = alloca [2 x i8*]
%4 = bitcast [2 x i8*]* %3 to i8*
%5 = getelementptr inbounds [2 x i8*], [2 x i8*]* %3, i64 0, i64 0
%6 = call i32 @spawn(i32 1, i8** %5)
ret i32 %6
}
void func(char c, char *d) {
  *d = c + 1;
  return;
}


x86 assembly (clang, -O0):
<func>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x1(%rbp)
mov    %rsi,-0x10(%rbp)
movsbl -0x1(%rbp),%eax
add    $0x1,%eax
mov    %al,%cl
mov    -0x10(%rbp),%rax
mov    %cl,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<func>:
add    $0x1,%dil
mov    %dil,(%rsi)
ret

LLVM IR (-O0):
define void @func(i8 signext %0, i8* %1) {
%3 = alloca i8
%4 = alloca i8*
store i8 %0, i8* %3
store i8* %1, i8** %4
%5 = load i8, i8* %3
%6 = sext i8 %5 to i32
%7 = add nsw i32 %6, 1
%8 = trunc i32 %7 to i8
%9 = load i8*, i8** %4
store i8 %8, i8* %9
ret void
}

LLVM IR (-O2):
define void @func(i8 signext %0, i8* nocapture writeonly %1) {
%3 = add i8 %0, 1
store i8 %3, i8* %1
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ time_t;
struct stat {
  int /*<<< orphan*/ st_mtime;
};

/* Variables and functions */
int stat(char const *, struct stat *);
time_t get_mtime(const char *path) {
  struct stat statbuf;
  if (stat(path, &statbuf) == -1) {
    return 0;
  }
  return statbuf.st_mtime;
}


x86 assembly (clang, -O0):
<get_mtime>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
lea    -0x18(%rbp),%rsi
call   1030 <stat@plt>
cmp    $0xffffffff,%eax
jne    113e <get_mtime+0x2e>
movl   $0x0,-0x4(%rbp)
jmp    1144 <get_mtime+0x34>
mov    -0x18(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_mtime>:
push   %rax
mov    %rsp,%rsi
call   1030 <stat@plt>
mov    %eax,%ecx
xor    %eax,%eax
cmp    $0xffffffff,%ecx
je     1125 <get_mtime+0x15>
mov    (%rsp),%eax
pop    %rcx
ret

LLVM IR (-O0):
%struct.stat = type { i32 }
define i32 @get_mtime(i8* %0) {
%2 = alloca i32
%3 = alloca i8*
%4 = alloca %struct.stat
store i8* %0, i8** %3
%5 = load i8*, i8** %3
%6 = call i32 @stat(i8* %5, %struct.stat* %4)
%7 = icmp eq i32 %6, -1
br i1 %7, label %8, label %9
8: ; preds = %1
store i32 0, i32* %2
br label %12
9: ; preds = %1
%10 = getelementptr inbounds %struct.stat, %struct.stat* %4, i32 0, i32 0
%11 = load i32, i32* %10
store i32 %11, i32* %2
br label %12
12: ; preds = %9, %8
%13 = load i32, i32* %2
ret i32 %13
}

LLVM IR (-O2):
%struct.stat = type { i32 }
define i32 @get_mtime(i8* nocapture %0) {
%2 = alloca %struct.stat
%3 = bitcast %struct.stat* %2 to i8*
%4 = call i32 @stat(i8* %0, %struct.stat* %2)
%5 = icmp eq i32 %4, -1
%6 = getelementptr inbounds %struct.stat, %struct.stat* %2, i64 0, i32 0
%7 = load i32, i32* %6
%8 = select i1 %5, i32 0, i32 %7
ret i32 %8
}
/* Type definitions */
struct int_regs {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ print(char *);
void secondary_irq(struct int_regs *r) { print("ata: irq 15\n"); }


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

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

LLVM IR (-O0):
%struct.int_regs = type { i32 }
@.str = [13 x i8] c"ata: irq 15\0A\00"
define void @secondary_irq(%struct.int_regs* %0) {
%2 = alloca %struct.int_regs*
store %struct.int_regs* %0, %struct.int_regs** %2
%3 = call i32 @print(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
%struct.int_regs = type { i32 }
@.str = [13 x i8] c"ata: irq 15\0A\00"
define void @secondary_irq(%struct.int_regs* nocapture readnone %0) {
%2 = tail call i32 @print(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0))
ret void
}
/* Variables and functions */
scalar_t__ isspace(char const);
char *ltrim(const char *str) {
  while (isspace(*str))
    str++;
  return (char *)str;
}


x86 assembly (clang, -O0):
<ltrim>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movsbl (%rax),%edi
call   1030 <isspace@plt>
cmp    $0x0,%rax
je     1143 <ltrim+0x33>
mov    -0x8(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x8(%rbp)
jmp    111c <ltrim+0xc>
mov    -0x8(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i8* @ltrim(i8* %0) {
br label %2
2: ; preds = %2, %1
%3 = phi i8* [ %0, %1 ], [ %7, %2 ]
%4 = load i8, i8* %3
%5 = tail call i64 @isspace(i8 signext %4)
%6 = icmp eq i64 %5, 0
%7 = getelementptr inbounds i8, i8* %3, i64 1
br i1 %6, label %8, label %2
8: ; preds = %2
ret i8* %3
}
int test_imm_9Eint64_highword_mem(long long *val) {
  return ((*val >> 32) & (0x9E << 0)) ? -20 : -40;
}


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

x86 assembly (clang, -O2):
<test_imm_9Eint64_highword_mem>:
testb  $0x9e,0x4(%rdi)
mov    $0xffffffd8,%ecx
mov    $0xffffffec,%eax
cmove  %ecx,%eax
ret

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

LLVM IR (-O2):
define i32 @test_imm_9Eint64_highword_mem(i64* nocapture %0) {
%2 = load i64, i64* %0
%3 = and i64 %2, 678604832768
%4 = icmp eq i64 %3, 0
%5 = select i1 %4, i32 -40, i32 -20
ret i32 %5
}
void fb_pixel(unsigned short *fbmem, int w, int x, int y, int color) {
  unsigned short *pos;
  pos = fbmem + y * w + x;
  *pos = color;
}


x86 assembly (clang, -O0):
<fb_pixel>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    %ecx,-0x14(%rbp)
mov    %r8d,-0x18(%rbp)
mov    -0x8(%rbp),%rax
mov    -0x14(%rbp),%ecx
imul   -0xc(%rbp),%ecx
movslq %ecx,%rcx
shl    $0x1,%rcx
add    %rcx,%rax
movslq -0x10(%rbp),%rcx
shl    $0x1,%rcx
add    %rcx,%rax
mov    %rax,-0x20(%rbp)
mov    -0x18(%rbp),%eax
mov    %ax,%cx
mov    -0x20(%rbp),%rax
mov    %cx,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<fb_pixel>:
imul   %ecx,%esi
movslq %esi,%rax
lea    (%rdi,%rax,2),%rax
movslq %edx,%rcx
mov    %r8w,(%rax,%rcx,2)
ret

LLVM IR (-O0):
define void @fb_pixel(i16* %0, i32 %1, i32 %2, i32 %3, i32 %4) {
%6 = alloca i16*
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32
%10 = alloca i32
%11 = alloca i16*
store i16* %0, i16** %6
store i32 %1, i32* %7
store i32 %2, i32* %8
store i32 %3, i32* %9
store i32 %4, i32* %10
%12 = load i16*, i16** %6
%13 = load i32, i32* %9
%14 = load i32, i32* %7
%15 = mul nsw i32 %13, %14
%16 = sext i32 %15 to i64
%17 = getelementptr inbounds i16, i16* %12, i64 %16
%18 = load i32, i32* %8
%19 = sext i32 %18 to i64
%20 = getelementptr inbounds i16, i16* %17, i64 %19
store i16* %20, i16** %11
%21 = load i32, i32* %10
%22 = trunc i32 %21 to i16
%23 = load i16*, i16** %11
store i16 %22, i16* %23
ret void
}

LLVM IR (-O2):
define void @fb_pixel(i16* nocapture writeonly %0, i32 %1, i32 %2, i32 %3, i32 %4) {
%6 = mul nsw i32 %3, %1
%7 = sext i32 %6 to i64
%8 = getelementptr inbounds i16, i16* %0, i64 %7
%9 = sext i32 %2 to i64
%10 = getelementptr inbounds i16, i16* %8, i64 %9
%11 = trunc i32 %4 to i16
store i16 %11, i16* %10
ret void
}
int test1(long long n) {
  if (n < 1)
    return 1;
  return 0;
}


x86 assembly (clang, -O0):
<test1>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
cmpq   $0x1,-0x10(%rbp)
jge    111f <test1+0x1f>
movl   $0x1,-0x4(%rbp)
jmp    1126 <test1+0x26>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<test1>:
xor    %eax,%eax
test   %rdi,%rdi
setle  %al
ret

LLVM IR (-O0):
define i32 @test1(i64 %0) {
%2 = alloca i32
%3 = alloca i64
store i64 %0, i64* %3
%4 = load i64, i64* %3
%5 = icmp slt i64 %4, 1
br i1 %5, label %6, label %7
6: ; preds = %1
store i32 1, i32* %2
br label %8
7: ; preds = %1
store i32 0, i32* %2
br label %8
8: ; preds = %7, %6
%9 = load i32, i32* %2
ret i32 %9
}

LLVM IR (-O2):
define i32 @test1(i64 %0) {
%2 = icmp slt i64 %0, 1
%3 = zext i1 %2 to i32
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ NS_draw();
int /*<<< orphan*/ NS_schedule_redraw();
void NS_redraw(void) {
  NS_schedule_redraw();
  NS_draw();
}


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

x86 assembly (clang, -O2):
<NS_redraw>:
push   %rax
xor    %eax,%eax
call   1030 <NS_schedule_redraw@plt>
xor    %eax,%eax
pop    %rcx
jmp    1040 <NS_draw@plt>

LLVM IR (-O0):
define void @NS_redraw() {
%1 = call i32 (...) @NS_schedule_redraw()
%2 = call i32 (...) @NS_draw()
ret void
}

LLVM IR (-O2):
define void @NS_redraw() {
%1 = tail call i32 (...) @NS_schedule_redraw()
%2 = tail call i32 (...) @NS_draw()
ret void
}
/* Variables and functions */
int byg_count(char *, char *);
int count_sequences_uniprot(char *string) {
  int n = 0;
  n = byg_count("<entry", string);
  if (!n) {
    return 0;
  }
  return n;
}


x86 assembly (clang, -O0):
<count_sequences_uniprot>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
mov    -0x10(%rbp),%rsi
lea    0xed2(%rip),%rdi
call   1030 <byg_count@plt>
mov    %eax,-0x14(%rbp)
cmpl   $0x0,-0x14(%rbp)
jne    114c <count_sequences_uniprot+0x3c>
movl   $0x0,-0x4(%rbp)
jmp    1152 <count_sequences_uniprot+0x42>
mov    -0x14(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<count_sequences_uniprot>:
mov    %rdi,%rsi
lea    0xee6(%rip),%rdi
jmp    1030 <byg_count@plt>

LLVM IR (-O0):
@.str = [7 x i8] c"<entry\00"
define i32 @count_sequences_uniprot(i8* %0) {
%2 = alloca i32
%3 = alloca i8*
%4 = alloca i32
store i8* %0, i8** %3
store i32 0, i32* %4
%5 = load i8*, i8** %3
%6 = call i32 @byg_count(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i8* %5)
store i32 %6, i32* %4
%7 = load i32, i32* %4
%8 = icmp ne i32 %7, 0
br i1 %8, label %10, label %9
9: ; preds = %1
store i32 0, i32* %2
br label %12
10: ; preds = %1
%11 = load i32, i32* %4
store i32 %11, i32* %2
br label %12
12: ; preds = %10, %9
%13 = load i32, i32* %2
ret i32 %13
}

LLVM IR (-O2):
@.str = [7 x i8] c"<entry\00"
define i32 @count_sequences_uniprot(i8* %0) {
%2 = tail call i32 @byg_count(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i8* %0)
ret i32 %2
}
/* Variables and functions */
char tolower(char);
void to_lowercase(char *string) {
  int i;
  for (i = 0; string[i]; i++)
    string[i] = tolower(string[i]);
}


x86 assembly (clang, -O0):
<to_lowercase>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
cmpb   $0x0,(%rax,%rcx,1)
je     1161 <to_lowercase+0x51>
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
movsbl (%rax,%rcx,1),%edi
call   1030 <tolower@plt>
mov    %al,%dl
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
mov    %dl,(%rax,%rcx,1)
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1123 <to_lowercase+0x13>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<to_lowercase>:
push   %rbx
mov    (%rdi),%al
test   %al,%al
je     1136 <to_lowercase+0x26>
mov    %rdi,%rbx
add    $0x1,%rbx
xchg   %ax,%ax
movsbl %al,%edi
call   1030 <tolower@plt>
mov    %al,-0x1(%rbx)
movzbl (%rbx),%eax
add    $0x1,%rbx
test   %al,%al
jne    1120 <to_lowercase+0x10>
pop    %rbx
ret

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

LLVM IR (-O2):
define void @to_lowercase(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = icmp eq i8 %2, 0
br i1 %3, label %13, label %4
4: ; preds = %1, %4
%5 = phi i64 [ %9, %4 ], [ 0, %1 ]
%6 = phi i8 [ %11, %4 ], [ %2, %1 ]
%7 = phi i8* [ %10, %4 ], [ %0, %1 ]
%8 = tail call signext i8 @tolower(i8 signext %6)
store i8 %8, i8* %7
%9 = add nuw i64 %5, 1
%10 = getelementptr inbounds i8, i8* %0, i64 %9
%11 = load i8, i8* %10
%12 = icmp eq i8 %11, 0
br i1 %12, label %13, label %4
13: ; preds = %4, %1
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ mode_t;

/* Variables and functions */
int /*<<< orphan*/ Sys_failure(char *);
int mkfifo(char const *, int /*<<< orphan*/);
void Mkfifo(const char *pathname, mode_t mode) {
  int retval;
  retval = mkfifo(pathname, mode);
  if (retval == -1)
    Sys_failure("mkfifo");
}


x86 assembly (clang, -O0):
<Mkfifo>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
call   1030 <mkfifo@plt>
mov    %eax,-0x10(%rbp)
cmpl   $0xffffffff,-0x10(%rbp)
jne    1154 <Mkfifo+0x34>
lea    0xeb1(%rip),%rdi
call   1040 <Sys_failure@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Mkfifo>:
push   %rax
call   1030 <mkfifo@plt>
cmp    $0xffffffff,%eax
je     112d <Mkfifo+0xd>
pop    %rax
ret
lea    0xecc(%rip),%rdi
pop    %rax
jmp    1040 <Sys_failure@plt>

LLVM IR (-O0):
@.str = [7 x i8] c"mkfifo\00"
define void @Mkfifo(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i32
%5 = alloca i32
store i8* %0, i8** %3
store i32 %1, i32* %4
%6 = load i8*, i8** %3
%7 = load i32, i32* %4
%8 = call i32 @mkfifo(i8* %6, i32 %7)
store i32 %8, i32* %5
%9 = load i32, i32* %5
%10 = icmp eq i32 %9, -1
br i1 %10, label %11, label %13
11: ; preds = %2
%12 = call i32 @Sys_failure(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0))
br label %13
13: ; preds = %11, %2
ret void
}

LLVM IR (-O2):
@.str = [7 x i8] c"mkfifo\00"
define void @Mkfifo(i8* %0, i32 %1) {
%3 = tail call i32 @mkfifo(i8* %0, i32 %1)
%4 = icmp eq i32 %3, -1
br i1 %4, label %5, label %7
5: ; preds = %2
%6 = tail call i32 @Sys_failure(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0))
br label %7
7: ; preds = %5, %2
ret void
}
/* Variables and functions */
int _ada_use_c2phc(int, int *, int *, double *);
int read_dobldobl_target_system(void) {
  int *a, *b, fail;
  double *c;
  fail = _ada_use_c2phc(231, a, b, c);
  return fail;
}


x86 assembly (clang, -O0):
<read_dobldobl_target_system>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    -0x8(%rbp),%rsi
mov    -0x10(%rbp),%rdx
mov    -0x20(%rbp),%rcx
mov    $0xe7,%edi
call   1030 <_ada_use_c2phc@plt>
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<read_dobldobl_target_system>:
mov    $0xe7,%edi
jmp    1030 <_ada_use_c2phc@plt>

LLVM IR (-O0):
define i32 @read_dobldobl_target_system() {
%1 = alloca i32*
%2 = alloca i32*
%3 = alloca i32
%4 = alloca double*
%5 = load i32*, i32** %1
%6 = load i32*, i32** %2
%7 = load double*, double** %4
%8 = call i32 @_ada_use_c2phc(i32 231, i32* %5, i32* %6, double* %7)
store i32 %8, i32* %3
%9 = load i32, i32* %3
ret i32 %9
}

LLVM IR (-O2):
define i32 @read_dobldobl_target_system() {
%1 = tail call i32 @_ada_use_c2phc(i32 231, i32* undef, i32* undef, double* undef)
ret i32 %1
}
/* Type definitions */
typedef int /*<<< orphan*/ uint32_t;
typedef int /*<<< orphan*/ uint16_t;

/* Variables and functions */
int /*<<< orphan*/ _bytecode_write(int, int /*<<< orphan*/, int /*<<< orphan*/,
                                   int /*<<< orphan*/, int /*<<< orphan*/,
                                   int /*<<< orphan*/);
uint32_t bytecode_goto(uint16_t addr) {
  return _bytecode_write(4, 0, addr, 0, 0, 0);
}


x86 assembly (clang, -O0):
<bytecode_goto>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edx
mov    $0x4,%edi
xor    %r9d,%r9d
mov    %r9d,%esi
mov    %r9d,%ecx
mov    %r9d,%r8d
call   1030 <_bytecode_write@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<bytecode_goto>:
mov    %edi,%edx
mov    $0x4,%edi
xor    %esi,%esi
xor    %ecx,%ecx
xor    %r8d,%r8d
xor    %r9d,%r9d
jmp    1030 <_bytecode_write@plt>

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

LLVM IR (-O2):
define i32 @bytecode_goto(i32 %0) {
%2 = tail call i32 @_bytecode_write(i32 4, i32 0, i32 %0, i32 0, i32 0, i32 0)
ret i32 %2
}
void swap(char *p, char *q) {
  char temp;
  temp = *p;
  *p = *q;
  *q = temp;
}


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

x86 assembly (clang, -O2):
<swap>:
mov    (%rdi),%al
mov    (%rsi),%cl
mov    %cl,(%rdi)
mov    %al,(%rsi)
ret

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

LLVM IR (-O2):
define void @swap(i8* nocapture %0, i8* nocapture %1) {
%3 = load i8, i8* %0
%4 = load i8, i8* %1
store i8 %4, i8* %0
store i8 %3, i8* %1
ret void
}
void find(objpoint) {
  if (objpoint == 0) {
    tnou("Find what? ");
  } else {
    tnoua("If you can't find it I'm sure that I can't. It could be anywhere ");
    tnou("or may not even exist! ");
  }
  showtext();
}


x86 assembly (clang, -O0):
<find>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
cmpl   $0x0,-0x4(%rbp)
jne    1158 <find+0x28>
lea    0xeb4(%rip),%rdi
mov    $0x0,%al
call   1030 <tnou@plt>
jmp    1174 <find+0x44>
lea    0xead(%rip),%rdi
mov    $0x0,%al
call   1050 <tnoua@plt>
lea    0xee1(%rip),%rdi
mov    $0x0,%al
call   1030 <tnou@plt>
mov    $0x0,%al
call   1040 <showtext@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<find>:
push   %rax
test   %edi,%edi
je     114c <find+0x1c>
lea    0xed0(%rip),%rdi
xor    %eax,%eax
call   1050 <tnoua@plt>
lea    0xf04(%rip),%rdi
jmp    1153 <find+0x23>
lea    0xead(%rip),%rdi
xor    %eax,%eax
call   1030 <tnou@plt>
xor    %eax,%eax
pop    %rcx
jmp    1040 <showtext@plt>

LLVM IR (-O0):
@.str = [12 x i8] c"Find what? \00"
@.str.1 = [66 x i8] c"If you can't find it I'm sure that I can't. It could be anywhere \00"
@.str.2 = [24 x i8] c"or may not even exist! \00"
define void @find(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = icmp eq i32 %3, 0
br i1 %4, label %5, label %7
5: ; preds = %1
%6 = call i32 (i8*, ...) bitcast (i32 (...)* @tnou to i32 (i8*, ...)*)(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0))
br label %10
7: ; preds = %1
%8 = call i32 (i8*, ...) bitcast (i32 (...)* @tnoua to i32 (i8*, ...)*)(i8* getelementptr inbounds ([66 x i8], [66 x i8]* @.str.1, i64 0, i64 0))
%9 = call i32 (i8*, ...) bitcast (i32 (...)* @tnou to i32 (i8*, ...)*)(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.2, i64 0, i64 0))
br label %10
10: ; preds = %7, %5
%11 = call i32 (...) @showtext()
ret void
}

LLVM IR (-O2):
@.str = [12 x i8] c"Find what? \00"
@.str.1 = [66 x i8] c"If you can't find it I'm sure that I can't. It could be anywhere \00"
@.str.2 = [24 x i8] c"or may not even exist! \00"
define void @find(i32 %0) {
%2 = icmp eq i32 %0, 0
br i1 %2, label %5, label %3
3: ; preds = %1
%4 = tail call i32 (i8*, ...) bitcast (i32 (...)* @tnoua to i32 (i8*, ...)*)(i8* getelementptr inbounds ([66 x i8], [66 x i8]* @.str.1, i64 0, i64 0))
br label %5
5: ; preds = %1, %3
%6 = phi i8* [ getelementptr inbounds ([24 x i8], [24 x i8]* @.str.2, i64 0, i64 0), %3 ], [ getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), %1 ]
%7 = tail call i32 (i8*, ...) bitcast (i32 (...)* @tnou to i32 (i8*, ...)*)(i8* %6)
%8 = tail call i32 (...) @showtext()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, long long);
int scanf(char *, long long *);
int main() {
  long long p;
  while (scanf("%lld", &p) == 1) {
    printf("%lld\n", p - 1);
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeca(%rip),%rdi
lea    -0x10(%rbp),%rsi
call   1040 <scanf@plt>
cmp    $0x1,%eax
jne    1161 <main+0x41>
mov    -0x10(%rbp),%rsi
sub    $0x1,%rsi
lea    0xeae(%rip),%rdi
call   1030 <printf@plt>
jmp    112f <main+0xf>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r15
push   %r14
push   %rbx
sub    $0x10,%rsp
lea    0xed0(%rip),%rdi
lea    0x8(%rsp),%rsi
call   1040 <scanf@plt>
cmp    $0x1,%eax
jne    1181 <main+0x61>
lea    0xebf(%rip),%r14
lea    0xeb3(%rip),%r15
lea    0x8(%rsp),%rbx
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
mov    0x8(%rsp),%rsi
add    $0xffffffffffffffff,%rsi
mov    %r14,%rdi
call   1030 <printf@plt>
mov    %r15,%rdi
mov    %rbx,%rsi
call   1040 <scanf@plt>
cmp    $0x1,%eax
je     1160 <main+0x40>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbx
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
@.str = [5 x i8] c"%lld\00"
@.str.1 = [6 x i8] c"%lld\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i64
store i32 0, i32* %1
br label %3
3: ; preds = %6, %0
%4 = call i32 @scanf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i64* %2)
%5 = icmp eq i32 %4, 1
br i1 %5, label %6, label %10
6: ; preds = %3
%7 = load i64, i64* %2
%8 = sub nsw i64 %7, 1
%9 = call i32 @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), i64 %8)
br label %3
10: ; preds = %3
ret i32 0
}

LLVM IR (-O2):
@.str = [5 x i8] c"%lld\00"
@.str.1 = [6 x i8] c"%lld\0A\00"
define i32 @main() {
%1 = alloca i64
%2 = bitcast i64* %1 to i8*
%3 = call i32 @scanf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i64* %1)
%4 = icmp eq i32 %3, 1
br i1 %4, label %5, label %11
5: ; preds = %0, %5
%6 = load i64, i64* %1
%7 = add nsw i64 %6, -1
%8 = call i32 @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), i64 %7)
%9 = call i32 @scanf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i64* %1)
%10 = icmp eq i32 %9, 1
br i1 %10, label %5, label %11
11: ; preds = %5, %0
ret i32 0
}