xunge/DecIR huggingface dataset:
/* Variables and functions */
int INT_MAX;
int /*<<< orphan*/ itoa(int);
scalar_t__ strcmp(int /*<<< orphan*/, char *);
int istrue(int i) {
  if (!(strcmp(itoa(i), "0") == 0)) {
    return INT_MAX;
  } else {
    return !istrue(1 == 1);
  }
}


x86 assembly (clang, -O0):
<istrue>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
mov    -0x8(%rbp),%edi
call   1050 <itoa@plt>
mov    %eax,%edi
lea    0xeb4(%rip),%rsi
call   1040 <strcmp@plt>
cmp    $0x0,%rax
je     116c <istrue+0x3c>
mov    0x2e86(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x4(%rbp)
jmp    1186 <istrue+0x56>
mov    $0x1,%edi
call   1030 <istrue@plt>
cmp    $0x0,%eax
setne  %al
xor    $0xff,%al
and    $0x1,%al
movzbl %al,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<istrue>:
push   %rax
call   1050 <itoa@plt>
lea    0xec3(%rip),%rsi
mov    %eax,%edi
call   1040 <strcmp@plt>
test   %rax,%rax
je     1154 <istrue+0x24>
mov    0x2e98(%rip),%rax
mov    (%rax),%eax
pop    %rcx
ret
mov    $0x1,%edi
call   1030 <istrue@plt>
mov    %eax,%ecx
xor    %eax,%eax
test   %ecx,%ecx
sete   %al
pop    %rcx
ret

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

LLVM IR (-O2):
@.str = [2 x i8] c"0\00"
@INT_MAX = global i32 0
define i32 @istrue(i32 %0) {
%2 = tail call i32 @itoa(i32 %0)
%3 = tail call i64 @strcmp(i32 %2, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
%4 = icmp eq i64 %3, 0
br i1 %4, label %9, label %5
5: ; preds = %1
%6 = load i32, i32* @INT_MAX
br label %7
7: ; preds = %5, %9
%8 = phi i32 [ %12, %9 ], [ %6, %5 ]
ret i32 %8
9: ; preds = %1
%10 = tail call i32 @istrue(i32 1)
%11 = icmp eq i32 %10, 0
%12 = zext i1 %11 to i32
br label %7
}
/* Type definitions */
typedef int uint16_t;

/* Variables and functions */
int CountBits16(uint16_t val) {
  val = (val & 0x5555) + ((val & 0xaaaa) >> 1);
  val = (val & 0x3333) + ((val & 0xcccc) >> 2);
  val = (val & 0x0f0f) + ((val & 0xf0f0) >> 4);
  val = (val & 0x00ff) + ((val & 0xff00) >> 8);
  return val;
}


x86 assembly (clang, -O0):
<CountBits16>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
and    $0x5555,%eax
mov    -0x4(%rbp),%ecx
and    $0xaaaa,%ecx
sar    $0x1,%ecx
add    %ecx,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
and    $0x3333,%eax
mov    -0x4(%rbp),%ecx
and    $0xcccc,%ecx
sar    $0x2,%ecx
add    %ecx,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
and    $0xf0f,%eax
mov    -0x4(%rbp),%ecx
and    $0xf0f0,%ecx
sar    $0x4,%ecx
add    %ecx,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
and    $0xff,%eax
mov    -0x4(%rbp),%ecx
and    $0xff00,%ecx
sar    $0x8,%ecx
add    %ecx,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<CountBits16>:
mov    %edi,%eax
and    $0x5555,%eax
shr    %edi
and    $0x5555,%edi
add    %edi,%eax
mov    %eax,%ecx
and    $0x3333,%ecx
shr    $0x2,%eax
and    $0x3333,%eax
add    %ecx,%eax
mov    %eax,%ecx
and    $0x707,%ecx
shr    $0x4,%eax
and    $0x707,%eax
add    %ecx,%eax
movzbl %al,%ecx
shr    $0x8,%eax
add    %ecx,%eax
ret

LLVM IR (-O0):
define i32 @CountBits16(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = and i32 %3, 21845
%5 = load i32, i32* %2
%6 = and i32 %5, 43690
%7 = ashr i32 %6, 1
%8 = add nsw i32 %4, %7
store i32 %8, i32* %2
%9 = load i32, i32* %2
%10 = and i32 %9, 13107
%11 = load i32, i32* %2
%12 = and i32 %11, 52428
%13 = ashr i32 %12, 2
%14 = add nsw i32 %10, %13
store i32 %14, i32* %2
%15 = load i32, i32* %2
%16 = and i32 %15, 3855
%17 = load i32, i32* %2
%18 = and i32 %17, 61680
%19 = ashr i32 %18, 4
%20 = add nsw i32 %16, %19
store i32 %20, i32* %2
%21 = load i32, i32* %2
%22 = and i32 %21, 255
%23 = load i32, i32* %2
%24 = and i32 %23, 65280
%25 = ashr i32 %24, 8
%26 = add nsw i32 %22, %25
store i32 %26, i32* %2
%27 = load i32, i32* %2
ret i32 %27
}

LLVM IR (-O2):
define i32 @CountBits16(i32 %0) {
%2 = and i32 %0, 21845
%3 = lshr i32 %0, 1
%4 = and i32 %3, 21845
%5 = add nuw nsw i32 %4, %2
%6 = and i32 %5, 13107
%7 = lshr i32 %5, 2
%8 = and i32 %7, 13107
%9 = add nuw nsw i32 %8, %6
%10 = and i32 %9, 1799
%11 = lshr i32 %9, 4
%12 = and i32 %11, 1799
%13 = add nuw nsw i32 %12, %10
%14 = and i32 %13, 15
%15 = lshr i32 %13, 8
%16 = add nuw nsw i32 %14, %15
ret i32 %16
}
/* Variables and functions */
long long bset_ll(long long *, long long *);
long long intr_wrap_530(long long p1, long long p2) {
  return bset_ll(&p1, &p2);
}


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

x86 assembly (clang, -O2):
<intr_wrap_530>:
sub    $0x18,%rsp
mov    %rdi,0x10(%rsp)
mov    %rsi,0x8(%rsp)
lea    0x10(%rsp),%rdi
lea    0x8(%rsp),%rsi
call   1030 <bset_ll@plt>
add    $0x18,%rsp
ret

LLVM IR (-O0):
define i64 @intr_wrap_530(i64 %0, i64 %1) {
%3 = alloca i64
%4 = alloca i64
store i64 %0, i64* %3
store i64 %1, i64* %4
%5 = call i64 @bset_ll(i64* %3, i64* %4)
ret i64 %5
}

LLVM IR (-O2):
define i64 @intr_wrap_530(i64 %0, i64 %1) {
%3 = alloca i64
%4 = alloca i64
store i64 %0, i64* %3
store i64 %1, i64* %4
%5 = call i64 @bset_ll(i64* %3, i64* %4)
ret i64 %5
}
struct gdev_device *
gdev_vsched_null_select_next_compute(struct gdev_device *gdev) {
  return gdev;
}


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

x86 assembly (clang, -O2):
<gdev_vsched_null_select_next_compute>:
mov    %rdi,%rax
ret

LLVM IR (-O0):
%struct.gdev_device = type opaque
define %struct.gdev_device* @gdev_vsched_null_select_next_compute(%struct.gdev_device* %0) {
%2 = alloca %struct.gdev_device*
store %struct.gdev_device* %0, %struct.gdev_device** %2
%3 = load %struct.gdev_device*, %struct.gdev_device** %2
ret %struct.gdev_device* %3
}

LLVM IR (-O2):
%struct.gdev_device = type opaque
define %struct.gdev_device* @gdev_vsched_null_select_next_compute(%struct.gdev_device* readnone returned %0) {
ret %struct.gdev_device* %0
}
signed int __aeabi_idiv0(signed int numerator, signed int denominator) {
  return -1;
}


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

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

LLVM IR (-O0):
define i32 @__aeabi_idiv0(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
ret i32 -1
}

LLVM IR (-O2):
define i32 @__aeabi_idiv0(i32 %0, i32 %1) {
ret i32 -1
}
/* Variables and functions */
int /*<<< orphan*/ pktmode(int /*<<< orphan*/);
int devrestore(void) {
  pktmode(0);
  return (1);
}


x86 assembly (clang, -O0):
<devrestore>:
push   %rbp
mov    %rsp,%rbp
xor    %edi,%edi
call   1030 <pktmode@plt>
mov    $0x1,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @devrestore() {
%1 = call i32 @pktmode(i32 0)
ret i32 1
}

LLVM IR (-O2):
define i32 @devrestore() {
%1 = tail call i32 @pktmode(i32 0)
ret i32 1
}
/* Variables and functions */
int /*<<< orphan*/ putchar(int);
void b_putchar(int idx, int *cells) { putchar(cells[idx]); }


x86 assembly (clang, -O0):
<b_putchar>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
movslq -0x4(%rbp),%rcx
mov    (%rax,%rcx,4),%edi
call   1030 <putchar@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<b_putchar>:
movslq %edi,%rax
mov    (%rsi,%rax,4),%edi
jmp    1030 <putchar@plt>

LLVM IR (-O0):
define void @b_putchar(i32 %0, i32* %1) {
%3 = alloca i32
%4 = alloca i32*
store i32 %0, i32* %3
store i32* %1, i32** %4
%5 = load i32*, i32** %4
%6 = load i32, i32* %3
%7 = sext i32 %6 to i64
%8 = getelementptr inbounds i32, i32* %5, i64 %7
%9 = load i32, i32* %8
%10 = call i32 @putchar(i32 %9)
ret void
}

LLVM IR (-O2):
define void @b_putchar(i32 %0, i32* nocapture %1) {
%3 = sext i32 %0 to i64
%4 = getelementptr inbounds i32, i32* %1, i64 %3
%5 = load i32, i32* %4
%6 = tail call i32 @putchar(i32 %5)
ret void
}
void S_AmbientOff(void) {}


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

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

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

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

/* Variables and functions */
int dns_resconf_release(struct dns_resolv_conf *);
int /*<<< orphan*/ free(struct dns_resolv_conf *);
void dns_resconf_close(struct dns_resolv_conf *resconf) {
  if (!resconf || 1 != dns_resconf_release(resconf))
    return;
  free(resconf);
}


x86 assembly (clang, -O0):
<dns_resconf_close>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
cmpq   $0x0,-0x8(%rbp)
je     114f <dns_resconf_close+0x2f>
mov    -0x8(%rbp),%rdi
call   1040 <dns_resconf_release@plt>
mov    %eax,%ecx
mov    $0x1,%eax
cmp    %ecx,%eax
je     1154 <dns_resconf_close+0x34>
jmp    115d <dns_resconf_close+0x3d>
mov    -0x8(%rbp),%rdi
call   1030 <free@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<dns_resconf_close>:
push   %rbx
test   %rdi,%rdi
je     113c <dns_resconf_close+0x1c>
mov    %rdi,%rbx
call   1040 <dns_resconf_release@plt>
cmp    $0x1,%eax
jne    113c <dns_resconf_close+0x1c>
mov    %rbx,%rdi
pop    %rbx
jmp    1030 <free@plt>
pop    %rbx
ret

LLVM IR (-O0):
%struct.dns_resolv_conf = type { i32 }
define void @dns_resconf_close(%struct.dns_resolv_conf* %0) {
%2 = alloca %struct.dns_resolv_conf*
store %struct.dns_resolv_conf* %0, %struct.dns_resolv_conf** %2
%3 = load %struct.dns_resolv_conf*, %struct.dns_resolv_conf** %2
%4 = icmp ne %struct.dns_resolv_conf* %3, null
br i1 %4, label %5, label %9
5: ; preds = %1
%6 = load %struct.dns_resolv_conf*, %struct.dns_resolv_conf** %2
%7 = call i32 @dns_resconf_release(%struct.dns_resolv_conf* %6)
%8 = icmp ne i32 1, %7
br i1 %8, label %9, label %10
9: ; preds = %5, %1
br label %13
10: ; preds = %5
%11 = load %struct.dns_resolv_conf*, %struct.dns_resolv_conf** %2
%12 = call i32 @free(%struct.dns_resolv_conf* %11)
br label %13
13: ; preds = %10, %9
ret void
}

LLVM IR (-O2):
%struct.dns_resolv_conf = type { i32 }
define void @dns_resconf_close(%struct.dns_resolv_conf* %0) {
%2 = icmp eq %struct.dns_resolv_conf* %0, null
br i1 %2, label %8, label %3
3: ; preds = %1
%4 = tail call i32 @dns_resconf_release(%struct.dns_resolv_conf* %0)
%5 = icmp eq i32 %4, 1
br i1 %5, label %6, label %8
6: ; preds = %3
%7 = tail call i32 @free(%struct.dns_resolv_conf* %0)
br label %8
8: ; preds = %1, %3, %6
ret void
}
void foo() {
  asm volatile("outb %b0, %w1" : : "a"('A'), "Nd"(0x3f8));
loop:
  goto loop;
}


x86 assembly (clang, -O0):
<foo>:
push   %rbp
mov    %rsp,%rbp
mov    $0x41,%eax
mov    $0x3f8,%edx
out    %al,(%dx)
jmp    110f <foo+0xf>

x86 assembly (clang, -O2):
<foo>:
mov    $0x41,%eax
mov    $0x3f8,%edx
out    %al,(%dx)
nopl   0x0(%rax,%rax,1)
jmp    1110 <foo+0x10>

LLVM IR (-O0):
define void @foo() {
br label %1
1: ; preds = %1, %0
br label %1
}

LLVM IR (-O2):
define void @foo() {
tail call void asm sideeffect "outb ${0:b}, ${1:w}", "{ax},N{dx},~{dirflag},~{fpsr},~{flags}"(i32 65, i32 1016)
br label %1
1: ; preds = %1, %0
br label %1
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int main(void) {
  int i;
  for (i = 0; i < 100; i++)
    if (i == 12) {
      printf("Entered goto\n");
      goto test;
    }
test:
  printf("Goto worked!\n");
  printf("End");
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
cmpl   $0x64,-0x8(%rbp)
jge    115e <main+0x4e>
cmpl   $0xc,-0x8(%rbp)
jne    114b <main+0x3b>
lea    0xebf(%rip),%rdi
call   1030 <printf@plt>
jmp    1163 <main+0x53>
jmp    1150 <main+0x40>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1126 <main+0x16>
jmp    1163 <main+0x53>
lea    0xea4(%rip),%rdi
call   1030 <printf@plt>
lea    0xea6(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xee9(%rip),%rdi
call   1030 <puts@plt>
lea    0xed0(%rip),%rdi
call   1030 <puts@plt>
lea    0xec0(%rip),%rdi
call   1040 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
@.str.2 = [4 x i8] c"End\00"
@str = [13 x i8] c"Goto worked!\00"
@str.3 = [13 x i8] c"Entered goto\00"
define i32 @main() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([13 x i8], [13 x i8]* @str.3, i64 0, i64 0))
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([13 x i8], [13 x i8]* @str, i64 0, i64 0))
%3 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0))
ret i32 0
}
void bol2BOL() {}


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

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

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

LLVM IR (-O2):
define void @bol2BOL() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int /*<<< orphan*/, ...);
int main(void) {
  int a;
  a = 10;
  { printf("this is test1 %d %d\r\n", a++, 21); };
  do {
    printf("this is test2 %d\r\n", a++);
  } while (0);
  { printf("this is test1 %d %d\r\n", a++, 23); };
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0xa,-0x8(%rbp)
mov    -0x8(%rbp),%esi
mov    %esi,%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
lea    0xec8(%rip),%rdi
mov    $0x15,%edx
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x8(%rbp),%esi
mov    %esi,%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
lea    0xec0(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x8(%rbp),%esi
mov    %esi,%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
lea    0xe91(%rip),%rdi
mov    $0x17,%edx
mov    $0x0,%al
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
lea    0xee8(%rip),%rbx
mov    %rbx,%rdi
mov    $0xa,%esi
mov    $0x15,%edx
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xee3(%rip),%rdi
mov    $0xb,%esi
xor    %eax,%eax
call   1030 <printf@plt>
mov    %rbx,%rdi
mov    $0xc,%esi
mov    $0x17,%edx
xor    %eax,%eax
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [22 x i8] c"this is test1 %d %d\0D\0A\00"
@.str.1 = [19 x i8] c"this is test2 %d\0D\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
store i32 0, i32* %1
store i32 10, i32* %2
%3 = load i32, i32* %2
%4 = add nsw i32 %3, 1
store i32 %4, i32* %2
%5 = call i32 (i8*, i32, ...) @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0), i32 %3, i32 21)
br label %6
6: ; preds = %0
%7 = load i32, i32* %2
%8 = add nsw i32 %7, 1
store i32 %8, i32* %2
%9 = call i32 (i8*, i32, ...) @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.1, i64 0, i64 0), i32 %7)
br label %10
10: ; preds = %6
%11 = load i32, i32* %2
%12 = add nsw i32 %11, 1
store i32 %12, i32* %2
%13 = call i32 (i8*, i32, ...) @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0), i32 %11, i32 23)
ret i32 0
}

LLVM IR (-O2):
@.str = [22 x i8] c"this is test1 %d %d\0D\0A\00"
@.str.1 = [19 x i8] c"this is test2 %d\0D\0A\00"
define i32 @main() {
%1 = tail call i32 (i8*, i32, ...) @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0), i32 10, i32 21)
%2 = tail call i32 (i8*, i32, ...) @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.1, i64 0, i64 0), i32 11)
%3 = tail call i32 (i8*, i32, ...) @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0), i32 12, i32 23)
ret i32 0
}
/* Variables and functions */
scalar_t__ calloc(int, int);
int /*<<< orphan*/ strcpy(char *, char *);
char *return_string() {
  char *strval = (char *)calloc(12, sizeof(char));
  strcpy(strval, "test string");
  return strval;
}


x86 assembly (clang, -O0):
<return_string>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0xc,%edi
mov    $0x1,%esi
call   1040 <calloc@plt>
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
lea    0xeba(%rip),%rsi
call   1030 <strcpy@plt>
mov    -0x8(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<return_string>:
push   %rbx
mov    $0xc,%edi
mov    $0x1,%esi
call   1040 <calloc@plt>
mov    %rax,%rbx
lea    0xec6(%rip),%rsi
mov    %rax,%rdi
call   1030 <strcpy@plt>
mov    %rbx,%rax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [12 x i8] c"test string\00"
define i8* @return_string() {
%1 = alloca i8*
%2 = call i64 @calloc(i32 12, i32 1)
%3 = inttoptr i64 %2 to i8*
store i8* %3, i8** %1
%4 = load i8*, i8** %1
%5 = call i32 @strcpy(i8* %4, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0))
%6 = load i8*, i8** %1
ret i8* %6
}

LLVM IR (-O2):
@.str = [12 x i8] c"test string\00"
define i8* @return_string() {
%1 = tail call i64 @calloc(i32 12, i32 1)
%2 = inttoptr i64 %1 to i8*
%3 = tail call i32 @strcpy(i8* %2, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0))
ret i8* %2
}
/* Variables and functions */
bool SHAREMIND_SET_KEY_LESS_THAN_char(char const k1, char const k2) {
  return k1 < k2;
}


x86 assembly (clang, -O0):
<SHAREMIND_SET_KEY_LESS_THAN_char>:
push   %rbp
mov    %rsp,%rbp
mov    %sil,%al
mov    %dil,%cl
mov    %cl,-0x1(%rbp)
mov    %al,-0x2(%rbp)
movsbl -0x1(%rbp),%eax
movsbl -0x2(%rbp),%ecx
cmp    %ecx,%eax
setl   %al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<SHAREMIND_SET_KEY_LESS_THAN_char>:
xor    %eax,%eax
cmp    %sil,%dil
setl   %al
ret

LLVM IR (-O0):
define i32 @SHAREMIND_SET_KEY_LESS_THAN_char(i8 signext %0, i8 signext %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 = load i8, i8* %4
%8 = sext i8 %7 to i32
%9 = icmp slt i32 %6, %8
%10 = zext i1 %9 to i32
ret i32 %10
}

LLVM IR (-O2):
define i32 @SHAREMIND_SET_KEY_LESS_THAN_char(i8 signext %0, i8 signext %1) {
%3 = icmp slt i8 %0, %1
%4 = zext i1 %3 to i32
ret i32 %4
}
/* Variables and functions */
char *malloc(int);
int strlen(char *);
int /*<<< orphan*/ strncpy(char *, char *, int);
char *str_dup(char *s) {
  char *s1;
  int i;
  i = strlen(s) + 1;
  s1 = malloc(i);
  strncpy(s1, s, i);
  return s1;
}


x86 assembly (clang, -O0):
<str_dup>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <strlen@plt>
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%edi
call   1050 <malloc@plt>
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x8(%rbp),%rsi
mov    -0x14(%rbp),%edx
call   1030 <strncpy@plt>
mov    -0x10(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<str_dup>:
push   %rbp
push   %r14
push   %rbx
mov    %rdi,%r14
call   1040 <strlen@plt>
lea    0x1(%rax),%ebp
mov    %ebp,%edi
call   1050 <malloc@plt>
mov    %rax,%rbx
mov    %rax,%rdi
mov    %r14,%rsi
mov    %ebp,%edx
call   1030 <strncpy@plt>
mov    %rbx,%rax
pop    %rbx
pop    %r14
pop    %rbp
ret

LLVM IR (-O0):
define i8* @str_dup(i8* %0) {
%2 = alloca i8*
%3 = alloca i8*
%4 = alloca i32
store i8* %0, i8** %2
%5 = load i8*, i8** %2
%6 = call i32 @strlen(i8* %5)
%7 = add nsw i32 %6, 1
store i32 %7, i32* %4
%8 = load i32, i32* %4
%9 = call i8* @malloc(i32 %8)
store i8* %9, i8** %3
%10 = load i8*, i8** %3
%11 = load i8*, i8** %2
%12 = load i32, i32* %4
%13 = call i32 @strncpy(i8* %10, i8* %11, i32 %12)
%14 = load i8*, i8** %3
ret i8* %14
}

LLVM IR (-O2):
define i8* @str_dup(i8* %0) {
%2 = tail call i32 @strlen(i8* %0)
%3 = add nsw i32 %2, 1
%4 = tail call i8* @malloc(i32 %3)
%5 = tail call i32 @strncpy(i8* %4, i8* %0, i32 %3)
ret i8* %4
}
XStoreName() {}


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

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

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

LLVM IR (-O2):
define i32 @XStoreName() {
ret i32 undef
}
/* Variables and functions */
double tanh(double const);
void morpheus_tanh(int n, const double *x, double *y) {
  for (int i = 0; i < n; ++i) {
    y[i] = tanh(x[i]);
  }
}


x86 assembly (clang, -O0):
<morpheus_tanh>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
movl   $0x0,-0x1c(%rbp)
mov    -0x1c(%rbp),%eax
cmp    -0x4(%rbp),%eax
jge    1163 <morpheus_tanh+0x53>
mov    -0x10(%rbp),%rax
movslq -0x1c(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
call   1030 <tanh@plt>
mov    -0x18(%rbp),%rax
movslq -0x1c(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x1c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x1c(%rbp)
jmp    112a <morpheus_tanh+0x1a>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<morpheus_tanh>:
push   %r15
push   %r14
push   %r12
push   %rbx
push   %rax
test   %edi,%edi
jle    114a <morpheus_tanh+0x3a>
mov    %rdx,%r14
mov    %rsi,%r15
mov    %edi,%r12d
xor    %ebx,%ebx
nopw   0x0(%rax,%rax,1)
movsd  (%r15,%rbx,8),%xmm0
call   1030 <tanh@plt>
movsd  %xmm0,(%r14,%rbx,8)
add    $0x1,%rbx
cmp    %rbx,%r12
jne    1130 <morpheus_tanh+0x20>
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
ret

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

LLVM IR (-O2):
define void @morpheus_tanh(i32 %0, double* nocapture %1, double* nocapture writeonly %2) {
%4 = icmp sgt i32 %0, 0
br i1 %4, label %5, label %7
5: ; preds = %3
%6 = zext i32 %0 to i64
br label %8
7: ; preds = %8, %3
ret void
8: ; preds = %5, %8
%9 = phi i64 [ 0, %5 ], [ %14, %8 ]
%10 = getelementptr inbounds double, double* %1, i64 %9
%11 = load double, double* %10
%12 = tail call double @tanh(double %11)
%13 = getelementptr inbounds double, double* %2, i64 %9
store double %12, double* %13
%14 = add nuw nsw i64 %9, 1
%15 = icmp eq i64 %14, %6
br i1 %15, label %7, label %8
}
void p16e_int_pin_2(void) {}


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

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

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

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

/* Variables and functions */
int /*<<< orphan*/ gui_completion_list_add(struct t_gui_completion *,
                                           char const *, int /*<<< orphan*/,
                                           char *);
void completion_list_map_add_palette_color_cb(void *data,
                                              struct t_hashtable *hashtable,
                                              const void *key,
                                              const void *value) {
  (void)hashtable;
  (void)value;
  gui_completion_list_add((struct t_gui_completion *)data, (const char *)key, 0,
                          "sort");
}


x86 assembly (clang, -O0):
<completion_list_map_add_palette_color_cb>:
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    -0x18(%rbp),%rsi
xor    %edx,%edx
lea    0xec7(%rip),%rcx
call   1030 <gui_completion_list_add@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<completion_list_map_add_palette_color_cb>:
lea    0xee9(%rip),%rcx
mov    %rdx,%rsi
xor    %edx,%edx
jmp    1030 <gui_completion_list_add@plt>

LLVM IR (-O0):
%struct.t_hashtable = type { i32 }
%struct.t_gui_completion = type { i32 }
@.str = [5 x i8] c"sort\00"
define void @completion_list_map_add_palette_color_cb(i8* %0, %struct.t_hashtable* %1, i8* %2, i8* %3) {
%5 = alloca i8*
%6 = alloca %struct.t_hashtable*
%7 = alloca i8*
%8 = alloca i8*
store i8* %0, i8** %5
store %struct.t_hashtable* %1, %struct.t_hashtable** %6
store i8* %2, i8** %7
store i8* %3, i8** %8
%9 = load %struct.t_hashtable*, %struct.t_hashtable** %6
%10 = load i8*, i8** %8
%11 = load i8*, i8** %5
%12 = bitcast i8* %11 to %struct.t_gui_completion*
%13 = load i8*, i8** %7
%14 = call i32 @gui_completion_list_add(%struct.t_gui_completion* %12, i8* %13, i32 0, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
%struct.t_hashtable = type { i32 }
%struct.t_gui_completion = type { i32 }
@.str = [5 x i8] c"sort\00"
define void @completion_list_map_add_palette_color_cb(i8* %0, %struct.t_hashtable* nocapture readnone %1, i8* %2, i8* nocapture readnone %3) {
%5 = bitcast i8* %0 to %struct.t_gui_completion*
%6 = tail call i32 @gui_completion_list_add(%struct.t_gui_completion* %5, i8* %2, i32 0, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0))
ret void
}
/* Type definitions */
struct VariableShare {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ error(char *);
int DeleteVariable_Database(struct VariableShare *vsh, unsigned int var_id) {
  error("The Variable Share Object wants to delete an item and there is no "
        "code implemented for deleting it (yet) !");
  return 0;
}


x86 assembly (clang, -O0):
<DeleteVariable_Database>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
lea    0xeda(%rip),%rdi
call   1030 <error@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<DeleteVariable_Database>:
push   %rax
lea    0xee8(%rip),%rdi
call   1030 <error@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
%struct.VariableShare = type { i32 }
@.str = [107 x i8] c"The Variable Share Object wants to delete an item and there is no code implemented for deleting it (yet) !\00"
define i32 @DeleteVariable_Database(%struct.VariableShare* %0, i32 %1) {
%3 = alloca %struct.VariableShare*
%4 = alloca i32
store %struct.VariableShare* %0, %struct.VariableShare** %3
store i32 %1, i32* %4
%5 = call i32 @error(i8* getelementptr inbounds ([107 x i8], [107 x i8]* @.str, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
%struct.VariableShare = type { i32 }
@.str = [107 x i8] c"The Variable Share Object wants to delete an item and there is no code implemented for deleting it (yet) !\00"
define i32 @DeleteVariable_Database(%struct.VariableShare* nocapture readnone %0, i32 %1) {
%3 = tail call i32 @error(i8* getelementptr inbounds ([107 x i8], [107 x i8]* @.str, i64 0, i64 0))
ret i32 0
}
int main(void) {
  __asm__ __volatile__("pause;\n");
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
movl   $0x0,-0x4(%rbp)
pause
xor    %eax,%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @main() {
tail call void asm sideeffect "pause;\0A", "~{dirflag},~{fpsr},~{flags}"()
ret i32 0
}
/* Variables and functions */
scalar_t__ Char_2d_array(int, int);
double **Double_2d_array(int i_size, int j_size) {
  return ((double **)Char_2d_array(i_size, j_size * sizeof(double)));
}


x86 assembly (clang, -O0):
<Double_2d_array>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%edi
movslq -0x8(%rbp),%rax
shl    $0x3,%rax
mov    %eax,%esi
call   1030 <Char_2d_array@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Double_2d_array>:
shl    $0x3,%esi
jmp    1030 <Char_2d_array@plt>

LLVM IR (-O0):
define double** @Double_2d_array(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%5 = load i32, i32* %3
%6 = load i32, i32* %4
%7 = sext i32 %6 to i64
%8 = mul i64 %7, 8
%9 = trunc i64 %8 to i32
%10 = call i64 @Char_2d_array(i32 %5, i32 %9)
%11 = inttoptr i64 %10 to double**
ret double** %11
}

LLVM IR (-O2):
define double** @Double_2d_array(i32 %0, i32 %1) {
%3 = shl i32 %1, 3
%4 = tail call i64 @Char_2d_array(i32 %0, i32 %3)
%5 = inttoptr i64 %4 to double**
ret double** %5
}
/* Variables and functions */
int /*<<< orphan*/ fn(int /*<<< orphan*/);
int main(void) {
  fn(0);
  return (0);
}


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

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

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

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 @fn(i32 0)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ ft_putchar(char);
void put_space(int w, int w_base) {
  int num;
  int i;
  num = (w_base - w) / 2;
  i = 0;
  while (i++ < num)
    ft_putchar(' ');
  ft_putchar('/');
}


x86 assembly (clang, -O0):
<put_space>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x8(%rbp),%eax
sub    -0x4(%rbp),%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
mov    %eax,-0xc(%rbp)
movl   $0x0,-0x10(%rbp)
mov    -0x10(%rbp),%eax
mov    %eax,%ecx
add    $0x1,%ecx
mov    %ecx,-0x10(%rbp)
cmp    -0xc(%rbp),%eax
jge    1159 <put_space+0x49>
mov    $0x20,%edi
call   1030 <ft_putchar@plt>
jmp    1136 <put_space+0x26>
mov    $0x2f,%edi
call   1030 <ft_putchar@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<put_space>:
push   %rbx
sub    %edi,%esi
cmp    $0x2,%esi
jl     113f <put_space+0x2f>
mov    %esi,%ebx
shr    $0x1f,%ebx
add    %esi,%ebx
sar    %ebx
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
mov    $0x20,%edi
call   1030 <ft_putchar@plt>
add    $0xffffffff,%ebx
jne    1130 <put_space+0x20>
mov    $0x2f,%edi
pop    %rbx
jmp    1030 <ft_putchar@plt>

LLVM IR (-O0):
define void @put_space(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%7 = load i32, i32* %4
%8 = load i32, i32* %3
%9 = sub nsw i32 %7, %8
%10 = sdiv i32 %9, 2
store i32 %10, i32* %5
store i32 0, i32* %6
br label %11
11: ; preds = %16, %2
%12 = load i32, i32* %6
%13 = add nsw i32 %12, 1
store i32 %13, i32* %6
%14 = load i32, i32* %5
%15 = icmp slt i32 %12, %14
br i1 %15, label %16, label %18
16: ; preds = %11
%17 = call i32 @ft_putchar(i8 signext 32)
br label %11
18: ; preds = %11
%19 = call i32 @ft_putchar(i8 signext 47)
ret void
}

LLVM IR (-O2):
define void @put_space(i32 %0, i32 %1) {
%3 = sub nsw i32 %1, %0
%4 = sdiv i32 %3, 2
%5 = icmp sgt i32 %3, 1
br i1 %5, label %6, label %11
6: ; preds = %2, %6
%7 = phi i32 [ %8, %6 ], [ 0, %2 ]
%8 = add nuw nsw i32 %7, 1
%9 = tail call i32 @ft_putchar(i8 signext 32)
%10 = icmp eq i32 %8, %4
br i1 %10, label %11, label %6
11: ; preds = %6, %2
%12 = tail call i32 @ft_putchar(i8 signext 47)
ret void
}
int bissexto(int ano) {
  if (((ano % 4 == 0) && (ano % 100 != 0)) || (ano % 400 == 0))
    return 1;
  return 0;
}


x86 assembly (clang, -O0):
<bissexto>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
mov    -0x8(%rbp),%eax
mov    $0x4,%ecx
cltd
idiv   %ecx
cmp    $0x0,%edx
jne    112f <bissexto+0x2f>
mov    -0x8(%rbp),%eax
mov    $0x64,%ecx
cltd
idiv   %ecx
cmp    $0x0,%edx
jne    1143 <bissexto+0x43>
mov    -0x8(%rbp),%eax
mov    $0x190,%ecx
cltd
idiv   %ecx
cmp    $0x0,%edx
jne    114f <bissexto+0x4f>
movl   $0x1,-0x4(%rbp)
jmp    1156 <bissexto+0x56>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<bissexto>:
test   $0x3,%dil
sete   %al
imul   $0xc28f5c29,%edi,%ecx
add    $0x51eb850,%ecx
mov    %ecx,%edx
ror    $0x2,%edx
cmp    $0x28f5c29,%edx
setae  %dl
and    %al,%dl
ror    $0x4,%ecx
cmp    $0xa3d70b,%ecx
setb   %al
or     %dl,%al
movzbl %al,%eax
ret

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

LLVM IR (-O2):
define i32 @bissexto(i32 %0) {
%2 = and i32 %0, 3
%3 = icmp eq i32 %2, 0
%4 = srem i32 %0, 100
%5 = icmp ne i32 %4, 0
%6 = and i1 %3, %5
%7 = srem i32 %0, 400
%8 = icmp eq i32 %7, 0
%9 = or i1 %8, %6
%10 = zext i1 %9 to i32
ret i32 %10
}
/* Variables and functions */
char getchar();
int input_string(char *input) {
  char ch = '0';
  while ((ch = getchar()) != '\n') {
    *input++ = ch;
  }
  return 0;
}


x86 assembly (clang, -O0):
<input_string>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
movb   $0x30,-0x9(%rbp)
mov    $0x0,%al
call   1030 <getchar@plt>
mov    %al,-0x9(%rbp)
movsbl %al,%eax
cmp    $0xa,%eax
je     114f <input_string+0x3f>
mov    -0x9(%rbp),%cl
mov    -0x8(%rbp),%rax
mov    %rax,%rdx
add    $0x1,%rdx
mov    %rdx,-0x8(%rbp)
mov    %cl,(%rax)
jmp    1120 <input_string+0x10>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<input_string>:
push   %rbx
mov    %rdi,%rbx
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
xor    %eax,%eax
call   1030 <getchar@plt>
cmp    $0xa,%al
je     1133 <input_string+0x23>
mov    %al,(%rbx)
add    $0x1,%rbx
jmp    1120 <input_string+0x10>
xor    %eax,%eax
pop    %rbx
ret

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

LLVM IR (-O2):
define i32 @input_string(i8* nocapture writeonly %0) {
%2 = tail call signext i8 (...) @getchar()
%3 = icmp eq i8 %2, 10
br i1 %3, label %10, label %4
4: ; preds = %1, %4
%5 = phi i8 [ %8, %4 ], [ %2, %1 ]
%6 = phi i8* [ %7, %4 ], [ %0, %1 ]
%7 = getelementptr inbounds i8, i8* %6, i64 1
store i8 %5, i8* %6
%8 = tail call signext i8 (...) @getchar()
%9 = icmp eq i8 %8, 10
br i1 %9, label %10, label %4
10: ; preds = %4, %1
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ CompileValue(int);
void DoIs(void) { CompileValue(94); }


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

x86 assembly (clang, -O2):
<DoIs>:
mov    $0x5e,%edi
jmp    1030 <CompileValue@plt>

LLVM IR (-O0):
define void @DoIs() {
%1 = call i32 @CompileValue(i32 94)
ret void
}

LLVM IR (-O2):
define void @DoIs() {
%1 = tail call i32 @CompileValue(i32 94)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void savescreen(void) {
  printf("\x1b["
         "?1049h");
}


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

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

LLVM IR (-O0):
@.str = [9 x i8] c"\1B[?1049h\00"
define void @savescreen() {
%1 = call i32 @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [9 x i8] c"\1B[?1049h\00"
define void @savescreen() {
%1 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0))
ret void
}
/* Variables and functions */
int lower(char);
int /*<<< orphan*/ printf(char *, int);
int main(void) {
  printf("%c\n", lower('A'));
  return 0;
}


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

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

LLVM IR (-O0):
@.str = [4 x i8] c"%c\0A\00"
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 @lower(i8 signext 65)
%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"%c\0A\00"
define i32 @main() {
%1 = tail call i32 @lower(i8 signext 65)
%2 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %1)
ret i32 0
}
void RomClosed(void) {}


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

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

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

LLVM IR (-O2):
define void @RomClosed() {
ret void
}
int ftw(const char *dir,
        int (*fn)(const char *file, const struct stat *sb, int flag),
        int nopenfd) {
  fn("", 0, 0);
  return 0;
}


x86 assembly (clang, -O0):
<ftw>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
lea    0xee6(%rip),%rdi
xor    %eax,%eax
mov    %eax,%esi
xor    %edx,%edx
call   *-0x10(%rbp)
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ftw>:
push   %rax
mov    %rsi,%rax
lea    0xef5(%rip),%rdi
xor    %esi,%esi
xor    %edx,%edx
call   *%rax
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
%struct.stat = type opaque
@.str = [1 x i8] zeroinitializer
define i32 @ftw(i8* %0, i32 (i8*, %struct.stat*, i32)* %1, i32 %2) {
%4 = alloca i8*
%5 = alloca i32 (i8*, %struct.stat*, i32)*
%6 = alloca i32
store i8* %0, i8** %4
store i32 (i8*, %struct.stat*, i32)* %1, i32 (i8*, %struct.stat*, i32)** %5
store i32 %2, i32* %6
%7 = load i32 (i8*, %struct.stat*, i32)*, i32 (i8*, %struct.stat*, i32)** %5
%8 = call i32 %7(i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str, i64 0, i64 0), %struct.stat* null, i32 0)
ret i32 0
}

LLVM IR (-O2):
%struct.stat = type opaque
@.str = [1 x i8] zeroinitializer
define i32 @ftw(i8* nocapture readnone %0, i32 (i8*, %struct.stat*, i32)* nocapture %1, i32 %2) {
%4 = tail call i32 %1(i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str, i64 0, i64 0), %struct.stat* null, i32 0)
ret i32 0
}
octal(num) unsigned int num;
{
  char a[4];
  a[0] = (((num >> 6) & 7) + '0');
  a[1] = (((num >> 3) & 7) + '0');
  a[2] = ((num & 7) + '0');
  a[3] = 0;
  std_err(a);
}


x86 assembly (clang, -O0):
<octal>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
mov    -0x8(%rbp),%eax
shr    $0x6,%eax
and    $0x7,%eax
add    $0x30,%eax
mov    %al,-0xc(%rbp)
mov    -0x8(%rbp),%eax
shr    $0x3,%eax
and    $0x7,%eax
add    $0x30,%eax
mov    %al,-0xb(%rbp)
mov    -0x8(%rbp),%eax
and    $0x7,%eax
add    $0x30,%eax
mov    %al,-0xa(%rbp)
movb   $0x0,-0x9(%rbp)
lea    -0xc(%rbp),%rdi
mov    $0x0,%al
call   1030 <std_err@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<octal>:
push   %rax
mov    %edi,%eax
shr    $0x6,%eax
and    $0x7,%al
or     $0x30,%al
mov    %al,0x4(%rsp)
mov    %edi,%eax
shr    $0x3,%al
and    $0x7,%al
or     $0x30,%al
mov    %al,0x5(%rsp)
and    $0x7,%dil
or     $0x30,%dil
mov    %dil,0x6(%rsp)
movb   $0x0,0x7(%rsp)
lea    0x4(%rsp),%rdi
xor    %eax,%eax
call   1030 <std_err@plt>
pop    %rcx
ret

LLVM IR (-O0):
define i32 @octal(i32 %0) {
%2 = alloca i32
%3 = alloca i32
%4 = alloca [4 x i8]
store i32 %0, i32* %3
%5 = load i32, i32* %3
%6 = lshr i32 %5, 6
%7 = and i32 %6, 7
%8 = add i32 %7, 48
%9 = trunc i32 %8 to i8
%10 = getelementptr inbounds [4 x i8], [4 x i8]* %4, i64 0, i64 0
store i8 %9, i8* %10
%11 = load i32, i32* %3
%12 = lshr i32 %11, 3
%13 = and i32 %12, 7
%14 = add i32 %13, 48
%15 = trunc i32 %14 to i8
%16 = getelementptr inbounds [4 x i8], [4 x i8]* %4, i64 0, i64 1
store i8 %15, i8* %16
%17 = load i32, i32* %3
%18 = and i32 %17, 7
%19 = add i32 %18, 48
%20 = trunc i32 %19 to i8
%21 = getelementptr inbounds [4 x i8], [4 x i8]* %4, i64 0, i64 2
store i8 %20, i8* %21
%22 = getelementptr inbounds [4 x i8], [4 x i8]* %4, i64 0, i64 3
store i8 0, i8* %22
%23 = getelementptr inbounds [4 x i8], [4 x i8]* %4, i64 0, i64 0
%24 = call i32 (i8*, ...) bitcast (i32 (...)* @std_err to i32 (i8*, ...)*)(i8* %23)
%25 = load i32, i32* %2
ret i32 %25
}

LLVM IR (-O2):
define i32 @octal(i32 %0) {
%2 = alloca [4 x i8]
%3 = getelementptr inbounds [4 x i8], [4 x i8]* %2, i64 0, i64 0
%4 = lshr i32 %0, 6
%5 = trunc i32 %4 to i8
%6 = and i8 %5, 7
%7 = or i8 %6, 48
store i8 %7, i8* %3
%8 = trunc i32 %0 to i8
%9 = lshr i8 %8, 3
%10 = and i8 %9, 7
%11 = or i8 %10, 48
%12 = getelementptr inbounds [4 x i8], [4 x i8]* %2, i64 0, i64 1
store i8 %11, i8* %12
%13 = and i8 %8, 7
%14 = or i8 %13, 48
%15 = getelementptr inbounds [4 x i8], [4 x i8]* %2, i64 0, i64 2
store i8 %14, i8* %15
%16 = getelementptr inbounds [4 x i8], [4 x i8]* %2, i64 0, i64 3
store i8 0, i8* %16
%17 = call i32 (i8*, ...) bitcast (i32 (...)* @std_err to i32 (i8*, ...)*)(i8* %3)
ret i32 undef
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char const *);
void section(const char *section) {
  printf("\n====== %s =======\n\n", section);
}


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

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

LLVM IR (-O0):
@.str = [21 x i8] c"\0A====== %s =======\0A\0A\00"
define void @section(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str, i64 0, i64 0), i8* %3)
ret void
}

LLVM IR (-O2):
@.str = [21 x i8] c"\0A====== %s =======\0A\0A\00"
define void @section(i8* %0) {
%2 = tail call i32 @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str, i64 0, i64 0), i8* %0)
ret void
}
/* Type definitions */
typedef int uint8_t;

/* Variables and functions */
void mp2vpicx_set_fcode00(uint8_t *p_mp2vpicx, uint8_t i_fcode00) {
  p_mp2vpicx[4] &= 0xf0;
  p_mp2vpicx[4] |= i_fcode00 & 0xf;
}


x86 assembly (clang, -O0):
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rax
mov    0x10(%rax),%ecx
and    $0xf0,%ecx
mov    %ecx,0x10(%rax)
mov    -0xc(%rbp),%ecx
and    $0xf,%ecx
mov    -0x8(%rbp),%rax
or     0x10(%rax),%ecx
mov    %ecx,0x10(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
mov    $0xf0,%eax
and    0x10(%rdi),%eax
and    $0xf,%esi
or     %eax,%esi
mov    %esi,0x10(%rdi)
ret

LLVM IR (-O0):
define void @mp2vpicx_set_fcode00(i32* %0, i32 %1) {
%3 = alloca i32*
%4 = alloca i32
store i32* %0, i32** %3
store i32 %1, i32* %4
%5 = load i32*, i32** %3
%6 = getelementptr inbounds i32, i32* %5, i64 4
%7 = load i32, i32* %6
%8 = and i32 %7, 240
store i32 %8, i32* %6
%9 = load i32, i32* %4
%10 = and i32 %9, 15
%11 = load i32*, i32** %3
%12 = getelementptr inbounds i32, i32* %11, i64 4
%13 = load i32, i32* %12
%14 = or i32 %13, %10
store i32 %14, i32* %12
ret void
}

LLVM IR (-O2):
define void @mp2vpicx_set_fcode00(i32* nocapture %0, i32 %1) {
%3 = getelementptr inbounds i32, i32* %0, i64 4
%4 = load i32, i32* %3
%5 = and i32 %4, 240
%6 = and i32 %1, 15
%7 = or i32 %5, %6
store i32 %7, i32* %3
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ gid_t;

/* Variables and functions */
int __setxid(int, int, int /*<<< orphan*/, int);
int setegid(gid_t egid) { return __setxid(210, -1, egid, -1); }


x86 assembly (clang, -O0):
<setegid>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edx
mov    $0xd2,%edi
mov    $0xffffffff,%ecx
mov    %ecx,%esi
call   1030 <__setxid@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<setegid>:
mov    %edi,%edx
mov    $0xd2,%edi
mov    $0xffffffff,%esi
mov    $0xffffffff,%ecx
jmp    1030 <__setxid@plt>

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

LLVM IR (-O2):
define i32 @setegid(i32 %0) {
%2 = tail call i32 @__setxid(i32 210, i32 -1, i32 %0, i32 -1)
ret i32 %2
}
/* Variables and functions */
double log10(double);
float fe_mel(float x___0) {
  double tmp;
  {
    tmp = log10(1.0 + (double)x___0 / 700.0);
    return ((float)(2595.0 * (double)((float)tmp)));
  }
}


x86 assembly (clang, -O0):
<fe_mel>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movss  %xmm0,-0x4(%rbp)
movss  -0x4(%rbp),%xmm0
cvtss2sd %xmm0,%xmm1
movsd  0xee2(%rip),%xmm0
divsd  %xmm0,%xmm1
movsd  0xece(%rip),%xmm0
addsd  %xmm1,%xmm0
call   1030 <log10@plt>
movsd  %xmm0,-0x10(%rbp)
movsd  -0x10(%rbp),%xmm0
cvtsd2ss %xmm0,%xmm0
cvtss2sd %xmm0,%xmm1
movsd  0xea3(%rip),%xmm0
mulsd  %xmm1,%xmm0
cvtsd2ss %xmm0,%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fe_mel>:
push   %rax
cvtss2sd %xmm0,%xmm0
divsd  0xee3(%rip),%xmm0
addsd  0xee3(%rip),%xmm0
call   1030 <log10@plt>
cvtsd2ss %xmm0,%xmm0
mulss  0xeda(%rip),%xmm0
pop    %rax
ret

LLVM IR (-O0):
define float @fe_mel(float %0) {
%2 = alloca float
%3 = alloca double
store float %0, float* %2
%4 = load float, float* %2
%5 = fpext float %4 to double
%6 = fdiv double %5, 7.000000e+02
%7 = fadd double 1.000000e+00, %6
%8 = call double @log10(double %7)
store double %8, double* %3
%9 = load double, double* %3
%10 = fptrunc double %9 to float
%11 = fpext float %10 to double
%12 = fmul double 2.595000e+03, %11
%13 = fptrunc double %12 to float
ret float %13
}

LLVM IR (-O2):
define float @fe_mel(float %0) {
%2 = fpext float %0 to double
%3 = fdiv double %2, 7.000000e+02
%4 = fadd double %3, 1.000000e+00
%5 = tail call double @log10(double %4)
%6 = fptrunc double %5 to float
%7 = fmul float %6, 2.595000e+03
ret float %7
}