xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ scanf(char *, int *);
int main() {
  int num = 0;
  for (printf("Keep entering numbers!\n"); num != 6;)
    scanf("%d", &num);
  printf("That is the one I want!\n");
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
lea    0xec3(%rip),%rdi
call   1030 <printf@plt>
cmpl   $0x6,-0x8(%rbp)
je     1161 <main+0x41>
lea    0xec5(%rip),%rdi
lea    -0x8(%rbp),%rsi
call   1040 <scanf@plt>
jmp    1142 <main+0x22>
lea    0xeb3(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r14
push   %rbx
push   %rax
movl   $0x0,0x4(%rsp)
lea    0xed0(%rip),%rdi
call   1030 <puts@plt>
lea    0xec1(%rip),%r14
lea    0x4(%rsp),%rbx
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
mov    %r14,%rdi
mov    %rbx,%rsi
call   1040 <scanf@plt>
cmpl   $0x6,0x4(%rsp)
jne    1150 <main+0x30>
lea    0xeb1(%rip),%rdi
call   1030 <puts@plt>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@.str = [24 x i8] c"Keep entering numbers!\0A\00"
@.str.1 = [3 x i8] c"%d\00"
@.str.2 = [25 x i8] c"That is the one I want!\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
store i32 0, i32* %1
store i32 0, i32* %2
%3 = call i32 @printf(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str, i64 0, i64 0))
br label %4
4: ; preds = %7, %0
%5 = load i32, i32* %2
%6 = icmp ne i32 %5, 6
br i1 %6, label %7, label %9
7: ; preds = %4
%8 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %2)
br label %4
9: ; preds = %4
%10 = call i32 @printf(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.2, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@.str.1 = [3 x i8] c"%d\00"
@str = [23 x i8] c"Keep entering numbers!\00"
@str.3 = [24 x i8] c"That is the one I want!\00"
define i32 @main() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
store i32 0, i32* %1
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([23 x i8], [23 x i8]* @str, i64 0, i64 0))
br label %4
4: ; preds = %0, %4
%5 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %1)
%6 = load i32, i32* %1
%7 = icmp eq i32 %6, 6
br i1 %7, label %8, label %4
8: ; preds = %4
%9 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([24 x i8], [24 x i8]* @str.3, i64 0, i64 0))
ret i32 0
}
/* Type definitions */
struct stack {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ stack_pop(struct stack *);
void stack_popn(struct stack *stack, int n) {
  int i = 0;
  while (i < n) {
    stack_pop(stack);
    i++;
  }
}


x86 assembly (clang, -O0):
<stack_popn>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
movl   $0x0,-0x10(%rbp)
mov    -0x10(%rbp),%eax
cmp    -0xc(%rbp),%eax
jge    1149 <stack_popn+0x39>
mov    -0x8(%rbp),%rdi
call   1030 <stack_pop@plt>
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    1126 <stack_popn+0x16>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<stack_popn>:
push   %r14
push   %rbx
push   %rax
test   %esi,%esi
jle    112d <stack_popn+0x1d>
mov    %esi,%ebx
mov    %rdi,%r14
nopl   (%rax)
mov    %r14,%rdi
call   1030 <stack_pop@plt>
add    $0xffffffff,%ebx
jne    1120 <stack_popn+0x10>
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
%struct.stack = type { i32 }
define void @stack_popn(%struct.stack* %0, i32 %1) {
%3 = alloca %struct.stack*
%4 = alloca i32
%5 = alloca i32
store %struct.stack* %0, %struct.stack** %3
store i32 %1, i32* %4
store i32 0, i32* %5
br label %6
6: ; preds = %10, %2
%7 = load i32, i32* %5
%8 = load i32, i32* %4
%9 = icmp slt i32 %7, %8
br i1 %9, label %10, label %15
10: ; preds = %6
%11 = load %struct.stack*, %struct.stack** %3
%12 = call i32 @stack_pop(%struct.stack* %11)
%13 = load i32, i32* %5
%14 = add nsw i32 %13, 1
store i32 %14, i32* %5
br label %6
15: ; preds = %6
ret void
}

LLVM IR (-O2):
%struct.stack = type { i32 }
define void @stack_popn(%struct.stack* %0, i32 %1) {
%3 = icmp sgt i32 %1, 0
br i1 %3, label %4, label %9
4: ; preds = %2, %4
%5 = phi i32 [ %7, %4 ], [ 0, %2 ]
%6 = tail call i32 @stack_pop(%struct.stack* %0)
%7 = add nuw nsw i32 %5, 1
%8 = icmp eq i32 %7, %1
br i1 %8, label %9, label %4
9: ; preds = %4, %2
ret void
}
int OrdDescr(int a) {
  int min = a % 10;
  a = a / 10;
  while (a != 0) {
    if (a % 10 < min)
      return 0;
    else {
      min = a % 10;
      a = a / 10;
    }
  }
  return 1;
}


x86 assembly (clang, -O0):
<OrdDescr>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
mov    -0x8(%rbp),%eax
mov    $0xa,%ecx
cltd
idiv   %ecx
mov    %edx,-0xc(%rbp)
mov    -0x8(%rbp),%eax
mov    $0xa,%ecx
cltd
idiv   %ecx
mov    %eax,-0x8(%rbp)
cmpl   $0x0,-0x8(%rbp)
je     116e <OrdDescr+0x6e>
mov    -0x8(%rbp),%eax
mov    $0xa,%ecx
cltd
idiv   %ecx
cmp    -0xc(%rbp),%edx
jge    114d <OrdDescr+0x4d>
movl   $0x0,-0x4(%rbp)
jmp    1175 <OrdDescr+0x75>
mov    -0x8(%rbp),%eax
mov    $0xa,%ecx
cltd
idiv   %ecx
mov    %edx,-0xc(%rbp)
mov    -0x8(%rbp),%eax
mov    $0xa,%ecx
cltd
idiv   %ecx
mov    %eax,-0x8(%rbp)
jmp    1123 <OrdDescr+0x23>
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<OrdDescr>:
movslq %edi,%rax
imul   $0x66666667,%rax,%rcx
mov    %rcx,%rdx
shr    $0x3f,%rdx
sar    $0x22,%rcx
add    %edx,%ecx
add    %ecx,%ecx
lea    (%rcx,%rcx,4),%ecx
sub    %ecx,%eax
xchg   %ax,%ax
lea    0x9(%rdi),%ecx
cmp    $0x13,%ecx
jb     1166 <OrdDescr+0x66>
movslq %edi,%rcx
imul   $0x66666667,%rcx,%rdi
mov    %rdi,%rcx
shr    $0x3f,%rcx
sar    $0x22,%rdi
add    %ecx,%edi
movslq %edi,%rcx
imul   $0x66666667,%rcx,%rdx
mov    %rdx,%rsi
shr    $0x3f,%rsi
sar    $0x22,%rdx
add    %esi,%edx
add    %edx,%edx
lea    (%rdx,%rdx,4),%edx
sub    %edx,%ecx
cmp    %eax,%ecx
mov    %ecx,%eax
jge    1120 <OrdDescr+0x20>
xor    %eax,%eax
ret
mov    $0x1,%eax
ret

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

LLVM IR (-O2):
define i32 @OrdDescr(i32 %0) {
%2 = srem i32 %0, 10
br label %3
3: ; preds = %9, %1
%4 = phi i32 [ %0, %1 ], [ %6, %9 ]
%5 = phi i32 [ %2, %1 ], [ %10, %9 ]
%6 = sdiv i32 %4, 10
%7 = add i32 %4, 9
%8 = icmp ult i32 %7, 19
br i1 %8, label %12, label %9
9: ; preds = %3
%10 = srem i32 %6, 10
%11 = icmp slt i32 %10, %5
br i1 %11, label %12, label %3
12: ; preds = %3, %9
%13 = phi i32 [ 0, %9 ], [ 1, %3 ]
ret i32 %13
}
/* Variables and functions */
int /*<<< orphan*/ close(int);
int udpsocket_close(int sock) {
  close(sock);
  return 0;
}


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

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

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

LLVM IR (-O2):
define i32 @udpsocket_close(i32 %0) {
%2 = tail call i32 @close(i32 %0)
ret i32 0
}
/* Type definitions */
typedef int /*<<< orphan*/ wchar_t;

/* Variables and functions */
size_t wcslen(int /*<<< orphan*/ const *);
int /*<<< orphan*/ wcsncpy(int /*<<< orphan*/ *, int /*<<< orphan*/ const *,
                           size_t);
size_t wcsxfrm(wchar_t *to, const wchar_t *from, size_t maxsize) {
  wcsncpy(to, from, maxsize);
  return wcslen(from);
}


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

x86 assembly (clang, -O2):
<wcsxfrm>:
push   %rbx
mov    %rsi,%rbx
call   1040 <wcsncpy@plt>
mov    %rbx,%rdi
pop    %rbx
jmp    1030 <wcslen@plt>

LLVM IR (-O0):
define i64 @wcsxfrm(i32* %0, i32* %1, i64 %2) {
%4 = alloca i32*
%5 = alloca i32*
%6 = alloca i64
store i32* %0, i32** %4
store i32* %1, i32** %5
store i64 %2, i64* %6
%7 = load i32*, i32** %4
%8 = load i32*, i32** %5
%9 = load i64, i64* %6
%10 = call i32 @wcsncpy(i32* %7, i32* %8, i64 %9)
%11 = load i32*, i32** %5
%12 = call i64 @wcslen(i32* %11)
ret i64 %12
}

LLVM IR (-O2):
define i64 @wcsxfrm(i32* %0, i32* %1, i64 %2) {
%4 = tail call i32 @wcsncpy(i32* %0, i32* %1, i64 %2)
%5 = tail call i64 @wcslen(i32* %1)
ret i64 %5
}
/* Type definitions */
typedef int /*<<< orphan*/ uint32_t;
struct bladerf {
  int dummy;
};

/* Variables and functions */
int nios_legacy_pio_read(struct bladerf *, int, int /*<<< orphan*/ *);
int nios_legacy_expansion_gpio_read(struct bladerf *dev, uint32_t *val) {
  int status = nios_legacy_pio_read(dev, 40, val);
  if (status == 0) {
    do {
      do {
      } while (0);
    } while (0);
  }
  return status;
}


x86 assembly (clang, -O0):
<nios_legacy_expansion_gpio_read>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rdx
mov    $0x28,%esi
call   1030 <nios_legacy_pio_read@plt>
mov    %eax,-0x14(%rbp)
cmpl   $0x0,-0x14(%rbp)
jne    1158 <nios_legacy_expansion_gpio_read+0x48>
jmp    1144 <nios_legacy_expansion_gpio_read+0x34>
jmp    1149 <nios_legacy_expansion_gpio_read+0x39>
jmp    114e <nios_legacy_expansion_gpio_read+0x3e>
jmp    1153 <nios_legacy_expansion_gpio_read+0x43>
jmp    1158 <nios_legacy_expansion_gpio_read+0x48>
mov    -0x14(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<nios_legacy_expansion_gpio_read>:
mov    %rsi,%rdx
mov    $0x28,%esi
jmp    1030 <nios_legacy_pio_read@plt>

LLVM IR (-O0):
%struct.bladerf = type { i32 }
define i32 @nios_legacy_expansion_gpio_read(%struct.bladerf* %0, i32* %1) {
%3 = alloca %struct.bladerf*
%4 = alloca i32*
%5 = alloca i32
store %struct.bladerf* %0, %struct.bladerf** %3
store i32* %1, i32** %4
%6 = load %struct.bladerf*, %struct.bladerf** %3
%7 = load i32*, i32** %4
%8 = call i32 @nios_legacy_pio_read(%struct.bladerf* %6, i32 40, i32* %7)
store i32 %8, i32* %5
%9 = load i32, i32* %5
%10 = icmp eq i32 %9, 0
br i1 %10, label %11, label %16
11: ; preds = %2
br label %12
12: ; preds = %11
br label %13
13: ; preds = %12
br label %14
14: ; preds = %13
br label %15
15: ; preds = %14
br label %16
16: ; preds = %15, %2
%17 = load i32, i32* %5
ret i32 %17
}

LLVM IR (-O2):
%struct.bladerf = type { i32 }
define i32 @nios_legacy_expansion_gpio_read(%struct.bladerf* %0, i32* %1) {
%3 = tail call i32 @nios_legacy_pio_read(%struct.bladerf* %0, i32 40, i32* %1)
ret i32 %3
}
void dummy_template_code() {
  asm(".text\n"
      ".globl "
      "template_code"
      "\n"
      ".type   "
      "template_code"
      ", @function\n"
      "template_code"
      ":\n"
      "push %rax\n"
      ".global "
      "tpl_offset0"
      "\n"
      ".type "
      "tpl_offset0"
      ", @object\n"
      "tpl_offset0"
      ":\n"
      "mov $0x12345678123456, %rax\n"
      "jmp *%rax\n"
      ".global "
      "tpl_offset0_end"
      "\n"
      ".type "
      "tpl_offset0_end"
      ", @object\n"
      "tpl_offset0_end"
      ":\n"
      ".align 8\n"
      "push %rdi\n"
      "push %rsi\n"
      "push %rbp\n"
      "push %rbx\n"
      "push %rdx\n"
      "push %rcx\n"
      "push %rax\n"
      "push %r8\n"
      "push %r9\n"
      ".global "
      "tpl_offset1"
      "\n"
      ".type "
      "tpl_offset1"
      ", @object\n"
      "tpl_offset1"
      ":\n"
      "mov $0x12345678123456, %rax\n"
      "call *%rax\n"
      "pop %r9\n"
      "pop %r8\n"
      "pop %rax\n"
      "pop %rcx\n"
      "pop %rdx\n"
      "pop %rbx\n"
      "pop %rbp\n"
      "pop %rsi\n"
      "pop %rdi\n"
      "push %rax\n"
      ".global "
      "tpl_offset2"
      "\n"
      ".type "
      "tpl_offset2"
      ", @object\n"
      "tpl_offset2"
      ":\n"
      "mov $0x1234567812345678,%rax\n"
      "xchg %rax,(%rsp)\n"
      "ret\n"
      ".global "
      "tpl_size"
      "\n"
      ".type "
      "tpl_size"
      ", @object\n"
      "tpl_size"
      ":\n"
      ".size "
      "template_code"
      ", .-"
      "template_code"
      "\n");
}


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

x86 assembly (clang, -O2):
<dummy_template_code>:
push   %rax

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

LLVM IR (-O2):
define void @dummy_template_code() {
tail call void asm sideeffect ".text\0A.globl template_code\0A.type template_code, @function\0Atemplate_code:\0Apush %rax\0A.global tpl_offset0\0A.type tpl_offset0, @object\0Atpl_offset0:\0Amov $$0x12345678123456, %rax\0Ajmp *%rax\0A.global tpl_offset0_end\0A.type tpl_offset0_end, @object\0Atpl_offset0_end:\0A.align 8\0Apush %rdi\0Apush %rsi\0Apush %rbp\0Apush %rbx\0Apush %rdx\0Apush %rcx\0Apush %rax\0Apush %r8\0Apush %r9\0A.global tpl_offset1\0A.type tpl_offset1, @object\0Atpl_offset1:\0Amov $$0x12345678123456, %rax\0Acall *%rax\0Apop %r9\0Apop %r8\0Apop %rax\0Apop %rcx\0Apop %rdx\0Apop %rbx\0Apop %rbp\0Apop %rsi\0Apop %rdi\0Apush %rax\0A.global tpl_offset2\0A.type tpl_offset2, @object\0Atpl_offset2:\0Amov $$0x1234567812345678,%rax\0Axchg %rax,(%rsp)\0Aret\0A.global tpl_size\0A.type tpl_size, @object\0Atpl_size:\0A.size template_code, .-template_code\0A", "~{dirflag},~{fpsr},~{flags}"()
ret void
}
/* Forward declarations */
typedef struct TYPE_4__ TYPE_2__;
typedef struct TYPE_3__ TYPE_1__;

/* Type definitions */
struct TYPE_3__ {
  scalar_t__ serial;
};
struct TYPE_4__ {
  TYPE_1__ xmapping;
};
typedef TYPE_2__ XEvent;

/* Variables and functions */
unsigned long get_XEvent_xmapping_serial(void *_p) {
  return (unsigned long)((XEvent *)_p)->xmapping.serial;
}


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

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

LLVM IR (-O0):
%struct.TYPE_4__ = type { %struct.TYPE_3__ }
%struct.TYPE_3__ = type { i64 }
define i64 @get_XEvent_xmapping_serial(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = bitcast i8* %3 to %struct.TYPE_4__*
%5 = getelementptr inbounds %struct.TYPE_4__, %struct.TYPE_4__* %4, i32 0, i32 0
%6 = getelementptr inbounds %struct.TYPE_3__, %struct.TYPE_3__* %5, i32 0, i32 0
%7 = load i64, i64* %6
ret i64 %7
}

LLVM IR (-O2):
define i64 @get_XEvent_xmapping_serial(i8* nocapture %0) {
%2 = bitcast i8* %0 to i64*
%3 = load i64, i64* %2
ret i64 %3
}
int has_feature(const char *feat) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @has_feature(i8* nocapture readnone %0) {
ret i32 0
}
void menu_print_budget_data() {}


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

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

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

LLVM IR (-O2):
define void @menu_print_budget_data() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, ...);
int /*<<< orphan*/ scanf(char *, float *);
float volume_esfera(float);
int main() {
  float r;
  printf("Insira o raio(r): ");
  scanf("%f", &r);
  float vol = volume_esfera(r);
  printf("Volume da esfera: %f\n", vol);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeba(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
lea    0xebf(%rip),%rdi
lea    -0x8(%rbp),%rsi
call   1050 <scanf@plt>
movss  -0x8(%rbp),%xmm0
call   1030 <volume_esfera@plt>
movss  %xmm0,-0xc(%rbp)
movss  -0xc(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
lea    0xe9a(%rip),%rdi
mov    $0x1,%al
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xec8(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xecd(%rip),%rdi
lea    0x4(%rsp),%rsi
call   1050 <scanf@plt>
movss  0x4(%rsp),%xmm0
call   1030 <volume_esfera@plt>
cvtss2sd %xmm0,%xmm0
lea    0xeb0(%rip),%rdi
mov    $0x1,%al
call   1040 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [19 x i8] c"Insira o raio(r): \00"
@.str.1 = [3 x i8] c"%f\00"
@.str.2 = [22 x i8] c"Volume da esfera: %f\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca float
%3 = alloca float
store i32 0, i32* %1
%4 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0))
%5 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), float* %2)
%6 = load float, float* %2
%7 = call float @volume_esfera(float %6)
store float %7, float* %3
%8 = load float, float* %3
%9 = fpext float %8 to double
%10 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.2, i64 0, i64 0), double %9)
ret i32 0
}

LLVM IR (-O2):
@.str = [19 x i8] c"Insira o raio(r): \00"
@.str.1 = [3 x i8] c"%f\00"
@.str.2 = [22 x i8] c"Volume da esfera: %f\0A\00"
define i32 @main() {
%1 = alloca float
%2 = bitcast float* %1 to i8*
%3 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0))
%4 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), float* %1)
%5 = load float, float* %1
%6 = call float @volume_esfera(float %5)
%7 = fpext float %6 to double
%8 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([22 x i8], [22 x i8]* @.str.2, i64 0, i64 0), double %7)
ret i32 0
}
int _isatty(__attribute__((unused)) int fd) { return 1; }


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

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

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

LLVM IR (-O2):
define i32 @_isatty(i32 %0) {
ret i32 1
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int pa_idxset_trivial_hash_func() {
  printf("NOT IMPLEMENTED:"
         "pa_idxset_trivial_hash_func"
         "\n");
}


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

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

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

LLVM IR (-O2):
@str = [44 x i8] c"NOT IMPLEMENTED:pa_idxset_trivial_hash_func\00"
define i32 @pa_idxset_trivial_hash_func() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([44 x i8], [44 x i8]* @str, i64 0, i64 0))
ret i32 undef
}
/* Variables and functions */
int /*<<< orphan*/ decrypt(int);
int /*<<< orphan*/ sscanf(char *, char *, int *);
main(int argc, char *argv[]) {
  int key;
  sscanf(argv[1], "%x", &key);
  decrypt(key);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
lea    0xec2(%rip),%rsi
lea    -0x14(%rbp),%rdx
call   1040 <sscanf@plt>
mov    -0x14(%rbp),%edi
call   1030 <decrypt@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    0x8(%rsi),%rdi
lea    0xed4(%rip),%rsi
lea    0x4(%rsp),%rdx
call   1040 <sscanf@plt>
mov    0x4(%rsp),%edi
call   1030 <decrypt@plt>
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
@.str = [3 x i8] c"%x\00"
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = alloca i32
%4 = bitcast i32* %3 to i8*
%5 = getelementptr inbounds i8*, i8** %1, i64 1
%6 = load i8*, i8** %5
%7 = call i32 @sscanf(i8* %6, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %3)
%8 = load i32, i32* %3
%9 = call i32 @decrypt(i32 %8)
ret i32 0
}
/* Variables and functions */
void *malloc(int);
int /*<<< orphan*/ sink(void *);
int /*<<< orphan*/ strcpy(void *, char *);
void malloc_uint_range_strcpy(unsigned n) {
  void *p = malloc(5 < n ? 5 : n);
  strcpy(p, "01234");
  sink(p);
  strcpy(p, "0123");
  sink(p);
}


x86 assembly (clang, -O0):
<malloc_uint_range_strcpy>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    $0x5,%eax
cmp    -0x4(%rbp),%eax
jae    1156 <malloc_uint_range_strcpy+0x26>
mov    $0x5,%eax
mov    %eax,-0x14(%rbp)
jmp    115c <malloc_uint_range_strcpy+0x2c>
mov    -0x4(%rbp),%eax
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%edi
call   1050 <malloc@plt>
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
lea    0xe8d(%rip),%rsi
call   1030 <strcpy@plt>
mov    -0x10(%rbp),%rdi
call   1040 <sink@plt>
mov    -0x10(%rbp),%rdi
lea    0xe7a(%rip),%rsi
call   1030 <strcpy@plt>
mov    -0x10(%rbp),%rdi
call   1040 <sink@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<malloc_uint_range_strcpy>:
push   %rbx
cmp    $0x5,%edi
mov    $0x5,%eax
cmovae %eax,%edi
call   1050 <malloc@plt>
mov    %rax,%rbx
lea    0xeb5(%rip),%rsi
mov    %rax,%rdi
call   1030 <strcpy@plt>
mov    %rbx,%rdi
call   1040 <sink@plt>
lea    0xea4(%rip),%rsi
mov    %rbx,%rdi
call   1030 <strcpy@plt>
mov    %rbx,%rdi
pop    %rbx
jmp    1040 <sink@plt>

LLVM IR (-O0):
@.str = [6 x i8] c"01234\00"
@.str.1 = [5 x i8] c"0123\00"
define void @malloc_uint_range_strcpy(i32 %0) {
%2 = alloca i32
%3 = alloca i8*
store i32 %0, i32* %2
%4 = load i32, i32* %2
%5 = icmp ult i32 5, %4
br i1 %5, label %6, label %7
6: ; preds = %1
br label %9
7: ; preds = %1
%8 = load i32, i32* %2
br label %9
9: ; preds = %7, %6
%10 = phi i32 [ 5, %6 ], [ %8, %7 ]
%11 = call i8* @malloc(i32 %10)
store i8* %11, i8** %3
%12 = load i8*, i8** %3
%13 = call i32 @strcpy(i8* %12, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0))
%14 = load i8*, i8** %3
%15 = call i32 @sink(i8* %14)
%16 = load i8*, i8** %3
%17 = call i32 @strcpy(i8* %16, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0))
%18 = load i8*, i8** %3
%19 = call i32 @sink(i8* %18)
ret void
}

LLVM IR (-O2):
@.str = [6 x i8] c"01234\00"
@.str.1 = [5 x i8] c"0123\00"
define void @malloc_uint_range_strcpy(i32 %0) {
%2 = icmp ult i32 %0, 5
%3 = select i1 %2, i32 %0, i32 5
%4 = tail call i8* @malloc(i32 %3)
%5 = tail call i32 @strcpy(i8* %4, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0))
%6 = tail call i32 @sink(i8* %4)
%7 = tail call i32 @strcpy(i8* %4, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0))
%8 = tail call i32 @sink(i8* %4)
ret void
}
/* Type definitions */
struct stream {
  int dummy;
};

/* Variables and functions */
int efp_stream_parse_double(struct stream *, double *);
int tok_double(struct stream *stream, double *val) {
  return efp_stream_parse_double(stream, val);
}


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

x86 assembly (clang, -O2):
<tok_double>:
jmp    1030 <efp_stream_parse_double@plt>

LLVM IR (-O0):
%struct.stream = type { i32 }
define i32 @tok_double(%struct.stream* %0, double* %1) {
%3 = alloca %struct.stream*
%4 = alloca double*
store %struct.stream* %0, %struct.stream** %3
store double* %1, double** %4
%5 = load %struct.stream*, %struct.stream** %3
%6 = load double*, double** %4
%7 = call i32 @efp_stream_parse_double(%struct.stream* %5, double* %6)
ret i32 %7
}

LLVM IR (-O2):
%struct.stream = type { i32 }
define i32 @tok_double(%struct.stream* %0, double* %1) {
%3 = tail call i32 @efp_stream_parse_double(%struct.stream* %0, double* %1)
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ printf(char *, char const *, char *, char *);
void usage(const char *progname) {
  printf("usage: %s [-h] [-r [-q]] directory\n%s%s", progname,
         "\t-r\tRecurse\n", "\t-q\tQuiet. Only print recursive total\n");
  exit(-1);
}


x86 assembly (clang, -O0):
<usage>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rsi
lea    0xec9(%rip),%rdi
lea    0xeea(%rip),%rdx
lea    0xef0(%rip),%rcx
call   1030 <printf@plt>
mov    $0xffffffff,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<usage>:
push   %rax
mov    %rdi,%rsi
lea    0xed5(%rip),%rdi
lea    0xef6(%rip),%rdx
lea    0xefc(%rip),%rcx
call   1030 <printf@plt>
mov    $0xffffffff,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@.str = [40 x i8] c"usage: %s [-h] [-r [-q]] directory\0A%s%s\00"
@.str.1 = [13 x i8] c"\09-r\09Recurse\0A\00"
@.str.2 = [39 x i8] c"\09-q\09Quiet. Only print recursive total\0A\00"
define void @usage(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 @printf(i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str, i64 0, i64 0), i8* %3, i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([39 x i8], [39 x i8]* @.str.2, i64 0, i64 0))
%5 = call i32 @exit(i32 -1)
unreachable
}

LLVM IR (-O2):
@.str = [40 x i8] c"usage: %s [-h] [-r [-q]] directory\0A%s%s\00"
@.str.1 = [13 x i8] c"\09-r\09Recurse\0A\00"
@.str.2 = [39 x i8] c"\09-q\09Quiet. Only print recursive total\0A\00"
define void @usage(i8* %0) {
%2 = tail call i32 @printf(i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str, i64 0, i64 0), i8* %0, i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([39 x i8], [39 x i8]* @.str.2, i64 0, i64 0))
%3 = tail call i32 @exit(i32 -1)
unreachable
}
/* Variables and functions */
int /*<<< orphan*/ ERR_error_string_n(unsigned long const, char *,
                                      size_t const);
char *ssl_get_error(const unsigned long e, char *s, const size_t s_len) {
  ERR_error_string_n(e, s, s_len);
  return s;
}


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

x86 assembly (clang, -O2):
<ssl_get_error>:
push   %rbx
mov    %rsi,%rbx
call   1030 <ERR_error_string_n@plt>
mov    %rbx,%rax
pop    %rbx
ret

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

LLVM IR (-O2):
define i8* @ssl_get_error(i64 %0, i8* returned %1, i64 %2) {
%4 = tail call i32 @ERR_error_string_n(i64 %0, i8* %1, i64 %2)
ret i8* %1
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int main(int argc, const char *argv[]) {
  while (1) {
    printf("Hello, World");
    break;
  }
  return 0;
}


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

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

LLVM IR (-O0):
@.str = [13 x i8] c"Hello, World\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
br label %6
6: ; preds = %2
%7 = call i32 @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0))
br label %8
8: ; preds = %6
ret i32 0
}

LLVM IR (-O2):
@.str = [13 x i8] c"Hello, World\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0))
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ LINUX_REBOOT_CMD_RESTART2;
int /*<<< orphan*/ LINUX_REBOOT_MAGIC1;
int /*<<< orphan*/ LINUX_REBOOT_MAGIC2C;
int /*<<< orphan*/ SYS_reboot;
int syscall(int /*<<< orphan*/, int /*<<< orphan*/, int /*<<< orphan*/,
            int /*<<< orphan*/, char const *);
int sys_reboot(const char *cmd) {
  return syscall(SYS_reboot, LINUX_REBOOT_MAGIC1, LINUX_REBOOT_MAGIC2C,
                 LINUX_REBOOT_CMD_RESTART2, cmd);
}


x86 assembly (clang, -O0):
<sys_reboot>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    0x2ea5(%rip),%rax
mov    (%rax),%edi
mov    0x2ebc(%rip),%rax
mov    (%rax),%esi
mov    0x2eab(%rip),%rax
mov    (%rax),%edx
mov    0x2e92(%rip),%rax
mov    (%rax),%ecx
mov    -0x8(%rbp),%r8
call   1030 <syscall@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<sys_reboot>:
mov    %rdi,%r8
mov    0x2eae(%rip),%rax
mov    (%rax),%edi
mov    0x2ec5(%rip),%rax
mov    (%rax),%esi
mov    0x2eb4(%rip),%rax
mov    (%rax),%edx
mov    0x2e9b(%rip),%rax
mov    (%rax),%ecx
jmp    1030 <syscall@plt>

LLVM IR (-O0):
@SYS_reboot = global i32 0
@LINUX_REBOOT_MAGIC1 = global i32 0
@LINUX_REBOOT_MAGIC2C = global i32 0
@LINUX_REBOOT_CMD_RESTART2 = global i32 0
define i32 @sys_reboot(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i32, i32* @SYS_reboot
%4 = load i32, i32* @LINUX_REBOOT_MAGIC1
%5 = load i32, i32* @LINUX_REBOOT_MAGIC2C
%6 = load i32, i32* @LINUX_REBOOT_CMD_RESTART2
%7 = load i8*, i8** %2
%8 = call i32 @syscall(i32 %3, i32 %4, i32 %5, i32 %6, i8* %7)
ret i32 %8
}

LLVM IR (-O2):
@SYS_reboot = global i32 0
@LINUX_REBOOT_MAGIC1 = global i32 0
@LINUX_REBOOT_MAGIC2C = global i32 0
@LINUX_REBOOT_CMD_RESTART2 = global i32 0
define i32 @sys_reboot(i8* %0) {
%2 = load i32, i32* @SYS_reboot
%3 = load i32, i32* @LINUX_REBOOT_MAGIC1
%4 = load i32, i32* @LINUX_REBOOT_MAGIC2C
%5 = load i32, i32* @LINUX_REBOOT_CMD_RESTART2
%6 = tail call i32 @syscall(i32 %2, i32 %3, i32 %4, i32 %5, i8* %0)
ret i32 %6
}
int region_initialize() { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @region_initialize() {
ret i32 0
}
/* Variables and functions */
int pipe2(int *, int);
int xpipe2(int pipefd[2], int flags) {
  int ret = pipe2(pipefd, flags);
  if (ret == -1) {
    ;
  }
  return ret;
}


x86 assembly (clang, -O0):
<xpipe2>:
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 <pipe2@plt>
mov    %eax,-0x10(%rbp)
cmpl   $0xffffffff,-0x10(%rbp)
jne    113d <xpipe2+0x2d>
jmp    113d <xpipe2+0x2d>
mov    -0x10(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<xpipe2>:
jmp    1030 <pipe2@plt>

LLVM IR (-O0):
define i32 @xpipe2(i32* %0, i32 %1) {
%3 = alloca i32*
%4 = alloca i32
%5 = alloca i32
store i32* %0, i32** %3
store i32 %1, i32* %4
%6 = load i32*, i32** %3
%7 = load i32, i32* %4
%8 = call i32 @pipe2(i32* %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 %12
11: ; preds = %2
br label %12
12: ; preds = %11, %2
%13 = load i32, i32* %5
ret i32 %13
}

LLVM IR (-O2):
define i32 @xpipe2(i32* %0, i32 %1) {
%3 = tail call i32 @pipe2(i32* %0, i32 %1)
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ log_f(char *);
void mouseb_none_poll(void) { log_f("mouseb:none: mouseb_none_poll()\n"); }


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

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

LLVM IR (-O0):
@.str = [33 x i8] c"mouseb:none: mouseb_none_poll()\0A\00"
define void @mouseb_none_poll() {
%1 = call i32 @log_f(i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [33 x i8] c"mouseb:none: mouseb_none_poll()\0A\00"
define void @mouseb_none_poll() {
%1 = tail call i32 @log_f(i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ strcmp(char *, char *);
int streq(char *a, char *b) { return !strcmp(a, b); }


x86 assembly (clang, -O0):
<streq>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1030 <strcmp@plt>
cmp    $0x0,%eax
setne  %al
xor    $0xff,%al
and    $0x1,%al
movzbl %al,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<streq>:
push   %rax
call   1030 <strcmp@plt>
xor    %ecx,%ecx
test   %eax,%eax
sete   %cl
mov    %ecx,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @streq(i8* %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 = load i8*, i8** %4
%7 = call i32 @strcmp(i8* %5, i8* %6)
%8 = icmp ne i32 %7, 0
%9 = xor i1 %8, true
%10 = zext i1 %9 to i32
ret i32 %10
}

LLVM IR (-O2):
define i32 @streq(i8* nocapture %0, i8* nocapture %1) {
%3 = tail call i32 @strcmp(i8* dereferenceable(1) %0, i8* dereferenceable(1) %1)
%4 = icmp eq i32 %3, 0
%5 = zext i1 %4 to i32
ret i32 %5
}
char value_to_hex_character(char value) {
  return value + (value < 10 ? '0' : 'A');
}


x86 assembly (clang, -O0):
<value_to_hex_character>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movsbl -0x1(%rbp),%eax
movsbl -0x1(%rbp),%esi
mov    $0x41,%ecx
mov    $0x30,%edx
cmp    $0xa,%esi
cmovl  %edx,%ecx
add    %ecx,%eax
movsbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<value_to_hex_character>:
cmp    $0xa,%dil
mov    $0x30,%ecx
mov    $0x41,%eax
cmovl  %ecx,%eax
add    %dil,%al
ret

LLVM IR (-O0):
define signext i8 @value_to_hex_character(i8 signext %0) {
%2 = alloca i8
store i8 %0, i8* %2
%3 = load i8, i8* %2
%4 = sext i8 %3 to i32
%5 = load i8, i8* %2
%6 = sext i8 %5 to i32
%7 = icmp slt i32 %6, 10
%8 = zext i1 %7 to i64
%9 = select i1 %7, i32 48, i32 65
%10 = add nsw i32 %4, %9
%11 = trunc i32 %10 to i8
ret i8 %11
}

LLVM IR (-O2):
define signext i8 @value_to_hex_character(i8 signext %0) {
%2 = icmp slt i8 %0, 10
%3 = select i1 %2, i8 48, i8 65
%4 = add i8 %3, %0
ret i8 %4
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
int /*<<< orphan*/ stderr;
void usage(void) {
  fprintf(stderr, "usage: syslog_caller num-messages\n");
  exit(1);
}


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

x86 assembly (clang, -O2):
<usage>:
push   %rax
mov    0x2eb8(%rip),%rax
mov    (%rax),%edi
lea    0xecf(%rip),%rsi
call   1030 <fprintf@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [35 x i8] c"usage: syslog_caller num-messages\0A\00"
define void @usage() {
%1 = load i32, i32* @stderr
%2 = call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str, i64 0, i64 0))
%3 = call i32 @exit(i32 1)
unreachable
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [35 x i8] c"usage: syslog_caller num-messages\0A\00"
define void @usage() {
%1 = load i32, i32* @stderr
%2 = tail call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str, i64 0, i64 0))
%3 = tail call i32 @exit(i32 1)
unreachable
}
/* Variables and functions */
void const *GppcFinfoV1();
const void *pg_finfo_userdata_project(void) { return GppcFinfoV1(); }


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

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

LLVM IR (-O0):
define i8* @pg_finfo_userdata_project() {
%1 = call i8* (...) @GppcFinfoV1()
ret i8* %1
}

LLVM IR (-O2):
define i8* @pg_finfo_userdata_project() {
%1 = tail call i8* (...) @GppcFinfoV1()
ret i8* %1
}
/* Variables and functions */
int /*<<< orphan*/ print_malloc_list();
int /*<<< orphan*/ prints(char *);
void mdebug_end() {
  prints("[end]\n");
  print_malloc_list();
}


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

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

LLVM IR (-O0):
@.str = [7 x i8] c"[end]\0A\00"
define void @mdebug_end() {
%1 = call i32 @prints(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0))
%2 = call i32 (...) @print_malloc_list()
ret void
}

LLVM IR (-O2):
@.str = [7 x i8] c"[end]\0A\00"
define void @mdebug_end() {
%1 = tail call i32 @prints(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0))
%2 = tail call i32 (...) @print_malloc_list()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ memmove(unsigned char *, unsigned char const *, size_t);
unsigned char *packet_memmove(unsigned char *ptr, const unsigned char *src,
                              size_t sz) {
  memmove(ptr, src, sz);
  return ptr + sz;
}


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

x86 assembly (clang, -O2):
<packet_memmove>:
push   %r14
push   %rbx
push   %rax
mov    %rdx,%r14
mov    %rdi,%rbx
call   1030 <memmove@plt>
add    %r14,%rbx
mov    %rbx,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define i8* @packet_memmove(i8* %0, i8* %1, i64 %2) {
%4 = alloca i8*
%5 = alloca i8*
%6 = alloca i64
store i8* %0, i8** %4
store i8* %1, i8** %5
store i64 %2, i64* %6
%7 = load i8*, i8** %4
%8 = load i8*, i8** %5
%9 = load i64, i64* %6
%10 = call i32 @memmove(i8* %7, i8* %8, i64 %9)
%11 = load i8*, i8** %4
%12 = load i64, i64* %6
%13 = getelementptr inbounds i8, i8* %11, i64 %12
ret i8* %13
}

LLVM IR (-O2):
define i8* @packet_memmove(i8* %0, i8* %1, i64 %2) {
%4 = tail call i32 @memmove(i8* %0, i8* %1, i64 %2)
%5 = getelementptr inbounds i8, i8* %0, i64 %2
ret i8* %5
}
/* Type definitions */
typedef unsigned long uint32_t;

/* Variables and functions */
void unset_bit_u32(int nr, uint32_t *addr) {
  addr[nr >> 5] &= ~(1UL << (nr & 31));
}


x86 assembly (clang, -O0):
<unset_bit_u32>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x4(%rbp),%eax
and    $0x1f,%eax
mov    %eax,%eax
mov    %eax,%ecx
mov    $0x1,%edx
shl    %cl,%rdx
xor    $0xffffffffffffffff,%rdx
mov    -0x10(%rbp),%rax
mov    -0x4(%rbp),%ecx
sar    $0x5,%ecx
movslq %ecx,%rcx
and    (%rax,%rcx,8),%rdx
mov    %rdx,(%rax,%rcx,8)
pop    %rbp
ret

x86 assembly (clang, -O2):
<unset_bit_u32>:
mov    %edi,%ecx
and    $0x1f,%cl
mov    $0xfffffffffffffffe,%rax
rol    %cl,%rax
sar    $0x5,%edi
movslq %edi,%rcx
and    %rax,(%rsi,%rcx,8)
ret

LLVM IR (-O0):
define void @unset_bit_u32(i32 %0, i64* %1) {
%3 = alloca i32
%4 = alloca i64*
store i32 %0, i32* %3
store i64* %1, i64** %4
%5 = load i32, i32* %3
%6 = and i32 %5, 31
%7 = zext i32 %6 to i64
%8 = shl i64 1, %7
%9 = xor i64 %8, -1
%10 = load i64*, i64** %4
%11 = load i32, i32* %3
%12 = ashr i32 %11, 5
%13 = sext i32 %12 to i64
%14 = getelementptr inbounds i64, i64* %10, i64 %13
%15 = load i64, i64* %14
%16 = and i64 %15, %9
store i64 %16, i64* %14
ret void
}

LLVM IR (-O2):
define void @unset_bit_u32(i32 %0, i64* nocapture %1) {
%3 = and i32 %0, 31
%4 = zext i32 %3 to i64
%5 = shl nuw nsw i64 1, %4
%6 = xor i64 %5, -1
%7 = ashr i32 %0, 5
%8 = sext i32 %7 to i64
%9 = getelementptr inbounds i64, i64* %1, i64 %8
%10 = load i64, i64* %9
%11 = and i64 %10, %6
store i64 %11, i64* %9
ret void
}
/* Variables and functions */
int /*<<< orphan*/ test_chaiscript_comment_entities();
int /*<<< orphan*/ test_chaiscript_comments();
void all_chaiscript_tests() {
  test_chaiscript_comments();
  test_chaiscript_comment_entities();
}


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

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

LLVM IR (-O0):
define void @all_chaiscript_tests() {
%1 = call i32 (...) @test_chaiscript_comments()
%2 = call i32 (...) @test_chaiscript_comment_entities()
ret void
}

LLVM IR (-O2):
define void @all_chaiscript_tests() {
%1 = tail call i32 (...) @test_chaiscript_comments()
%2 = tail call i32 (...) @test_chaiscript_comment_entities()
ret void
}
int blank_str(const char *str) {
  const char *p = str;
  while (*p != '\0') {
    if (*p != ' ')
      return 0;
    p++;
  }
  return 1;
}


x86 assembly (clang, -O0):
<blank_str>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x0,%eax
je     114d <blank_str+0x4d>
mov    -0x18(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x20,%eax
je     113c <blank_str+0x3c>
movl   $0x0,-0x4(%rbp)
jmp    1154 <blank_str+0x54>
mov    -0x18(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x18(%rbp)
jmp    1110 <blank_str+0x10>
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<blank_str>:
movzbl (%rdi),%eax
cmp    $0x20,%al
jne    110d <blank_str+0xd>
add    $0x1,%rdi
jmp    1100 <blank_str>
test   %al,%al
jne    1117 <blank_str+0x17>
mov    $0x1,%eax
ret
xor    %eax,%eax
ret

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

LLVM IR (-O2):
define i32 @blank_str(i8* nocapture %0) {
br label %2
2: ; preds = %5, %1
%3 = phi i8* [ %0, %1 ], [ %6, %5 ]
%4 = load i8, i8* %3
switch i8 %4, label %7 [
i8 0, label %8
i8 32, label %5
]
5: ; preds = %2
%6 = getelementptr inbounds i8, i8* %3, i64 1
br label %2
7: ; preds = %2
br label %8
8: ; preds = %2, %7
%9 = phi i32 [ 0, %7 ], [ 1, %2 ]
ret i32 %9
}
/* Type definitions */
typedef scalar_t__ wchar_t;
struct _Locale_collate {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ wcsncpy(scalar_t__ *, scalar_t__ const *, size_t);
size_t _WLocale_strxfrm(struct _Locale_collate *lcol, wchar_t *dest,
                        size_t dest_n, const wchar_t *src, size_t src_n) {
  if (dest != 0) {
    wcsncpy(dest, src, dest_n - 1);
    dest[dest_n - 1] = 0;
  }
  return src_n;
}


x86 assembly (clang, -O0):
<_WLocale_strxfrm>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    %r8,-0x28(%rbp)
cmpq   $0x0,-0x10(%rbp)
je     1160 <_WLocale_strxfrm+0x50>
mov    -0x10(%rbp),%rdi
mov    -0x20(%rbp),%rsi
mov    -0x18(%rbp),%rdx
sub    $0x1,%rdx
call   1030 <wcsncpy@plt>
mov    -0x10(%rbp),%rax
mov    -0x18(%rbp),%rcx
sub    $0x1,%rcx
movq   $0x0,(%rax,%rcx,8)
mov    -0x28(%rbp),%rax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<_WLocale_strxfrm>:
push   %r15
push   %r14
push   %rbx
mov    %r8,%r14
test   %rsi,%rsi
je     113b <_WLocale_strxfrm+0x2b>
mov    %rdx,%r15
mov    %rsi,%rbx
add    $0xffffffffffffffff,%rdx
mov    %rsi,%rdi
mov    %rcx,%rsi
call   1030 <wcsncpy@plt>
movq   $0x0,-0x8(%rbx,%r15,8)
mov    %r14,%rax
pop    %rbx
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
%struct._Locale_collate = type { i32 }
define i64 @_WLocale_strxfrm(%struct._Locale_collate* %0, i64* %1, i64 %2, i64* %3, i64 %4) {
%6 = alloca %struct._Locale_collate*
%7 = alloca i64*
%8 = alloca i64
%9 = alloca i64*
%10 = alloca i64
store %struct._Locale_collate* %0, %struct._Locale_collate** %6
store i64* %1, i64** %7
store i64 %2, i64* %8
store i64* %3, i64** %9
store i64 %4, i64* %10
%11 = load i64*, i64** %7
%12 = icmp ne i64* %11, null
br i1 %12, label %13, label %23
13: ; preds = %5
%14 = load i64*, i64** %7
%15 = load i64*, i64** %9
%16 = load i64, i64* %8
%17 = sub i64 %16, 1
%18 = call i32 @wcsncpy(i64* %14, i64* %15, i64 %17)
%19 = load i64*, i64** %7
%20 = load i64, i64* %8
%21 = sub i64 %20, 1
%22 = getelementptr inbounds i64, i64* %19, i64 %21
store i64 0, i64* %22
br label %23
23: ; preds = %13, %5
%24 = load i64, i64* %10
ret i64 %24
}

LLVM IR (-O2):
%struct._Locale_collate = type { i32 }
define i64 @_WLocale_strxfrm(%struct._Locale_collate* nocapture readnone %0, i64* %1, i64 %2, i64* %3, i64 returned %4) {
%6 = icmp eq i64* %1, null
br i1 %6, label %11, label %7
7: ; preds = %5
%8 = add i64 %2, -1
%9 = tail call i32 @wcsncpy(i64* %1, i64* %3, i64 %8)
%10 = getelementptr inbounds i64, i64* %1, i64 %8
store i64 0, i64* %10
br label %11
11: ; preds = %7, %5
ret i64 %4
}
void _infix_operator_mult_i64_i64(signed long long lhs, signed long long rhs,
                                  signed long long *__rval_1) {
  *__rval_1 = lhs * rhs;
}


x86 assembly (clang, -O0):
<_infix_operator_mult_i64_i64>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x8(%rbp),%rcx
imul   -0x10(%rbp),%rcx
mov    -0x18(%rbp),%rax
mov    %rcx,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<_infix_operator_mult_i64_i64>:
imul   %rsi,%rdi
mov    %rdi,(%rdx)
ret

LLVM IR (-O0):
define void @_infix_operator_mult_i64_i64(i64 %0, i64 %1, i64* %2) {
%4 = alloca i64
%5 = alloca i64
%6 = alloca i64*
store i64 %0, i64* %4
store i64 %1, i64* %5
store i64* %2, i64** %6
%7 = load i64, i64* %4
%8 = load i64, i64* %5
%9 = mul nsw i64 %7, %8
%10 = load i64*, i64** %6
store i64 %9, i64* %10
ret void
}

LLVM IR (-O2):
define void @_infix_operator_mult_i64_i64(i64 %0, i64 %1, i64* nocapture writeonly %2) {
%4 = mul nsw i64 %1, %0
store i64 %4, i64* %2
ret void
}