xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ Debug(char *);
int /*<<< orphan*/ kill_this_task();
void pickup(void) {
  Debug("Player now owns this item.");
  kill_this_task();
}


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

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

LLVM IR (-O0):
@.str = [27 x i8] c"Player now owns this item.\00"
define void @pickup() {
%1 = call i32 @Debug(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str, i64 0, i64 0))
%2 = call i32 (...) @kill_this_task()
ret void
}

LLVM IR (-O2):
@.str = [27 x i8] c"Player now owns this item.\00"
define void @pickup() {
%1 = tail call i32 @Debug(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str, i64 0, i64 0))
%2 = tail call i32 (...) @kill_this_task()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void __assert_func(void) {
  printf("\nASSERT FAIL!");
  for (;;) {
  }
}


x86 assembly (clang, -O0):
<__assert_func>:
push   %rbp
mov    %rsp,%rbp
lea    0xee5(%rip),%rdi
call   1030 <printf@plt>
jmp    1120 <__assert_func+0x10>

x86 assembly (clang, -O2):
<__assert_func>:
push   %rax
lea    0xee8(%rip),%rdi
call   1030 <printf@plt>
nopl   (%rax)
jmp    1120 <__assert_func+0x10>

LLVM IR (-O0):
@.str = [14 x i8] c"\0AASSERT FAIL!\00"
define void @__assert_func() {
%1 = call i32 @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0))
br label %2
2: ; preds = %2, %0
br label %2
}

LLVM IR (-O2):
@.str = [14 x i8] c"\0AASSERT FAIL!\00"
define void @__assert_func() {
%1 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0))
br label %2
2: ; preds = %2, %0
br label %2
}
void CgDrv_CleanUp(struct CgDrv *cgdrv) {}


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

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

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

LLVM IR (-O2):
%struct.CgDrv = type opaque
define void @CgDrv_CleanUp(%struct.CgDrv* nocapture %0) {
ret void
}
int cube(int num) {
  int result;
  result = num * num * num;
  return result;
}


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

x86 assembly (clang, -O2):
<cube>:
mov    %edi,%eax
imul   %edi,%eax
imul   %edi,%eax
ret

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

LLVM IR (-O2):
define i32 @cube(i32 %0) {
%2 = mul nsw i32 %0, %0
%3 = mul nsw i32 %2, %0
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ gen(char *);
void cgindw(void) { gen("movl\t(%eax),%eax"); }


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

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

LLVM IR (-O0):
@.str = [17 x i8] c"movl\09(%eax),%eax\00"
define void @cgindw() {
%1 = call i32 @gen(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [17 x i8] c"movl\09(%eax),%eax\00"
define void @cgindw() {
%1 = tail call i32 @gen(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0))
ret void
}
int sched_init(void) { return (1); }


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

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

LLVM IR (-O0):
define i32 @sched_init() {
ret i32 1
}

LLVM IR (-O2):
define i32 @sched_init() {
ret i32 1
}
/* Variables and functions */
int /*<<< orphan*/ UARTEnableRXInterrupt();
int /*<<< orphan*/ UARTInit();
int /*<<< orphan*/ UARTWrite(char *);
int main(void) {
  UARTInit();
  UARTWrite("TX testing...");
  UARTEnableRXInterrupt();
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x0,%al
call   1030 <UARTInit@plt>
lea    0xeb3(%rip),%rdi
call   1040 <UARTWrite@plt>
mov    $0x0,%al
call   1050 <UARTEnableRXInterrupt@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1030 <UARTInit@plt>
lea    0xec1(%rip),%rdi
call   1040 <UARTWrite@plt>
xor    %eax,%eax
call   1050 <UARTEnableRXInterrupt@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [14 x i8] c"TX testing...\00"
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 (...) @UARTInit()
%3 = call i32 @UARTWrite(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0))
%4 = call i32 (...) @UARTEnableRXInterrupt()
ret i32 0
}

LLVM IR (-O2):
@.str = [14 x i8] c"TX testing...\00"
define i32 @main() {
%1 = tail call i32 (...) @UARTInit()
%2 = tail call i32 @UARTWrite(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0))
%3 = tail call i32 (...) @UARTEnableRXInterrupt()
ret i32 0
}
/* Type definitions */
struct wl_shell_surface {
  int dummy;
};
struct wl_proxy {
  int dummy;
};
struct wl_output {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ wl_proxy_marshal(struct wl_proxy *, int, struct wl_output *);
void wl_shell_surface_set_maximized(struct wl_shell_surface *wl_shell_surface,
                                    struct wl_output *output) {
  wl_proxy_marshal((struct wl_proxy *)wl_shell_surface, 7, output);
}


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

x86 assembly (clang, -O2):
<wl_shell_surface_set_maximized>:
mov    %rsi,%rdx
mov    $0x7,%esi
jmp    1030 <wl_proxy_marshal@plt>

LLVM IR (-O0):
%struct.wl_shell_surface = type { i32 }
%struct.wl_output = type { i32 }
%struct.wl_proxy = type { i32 }
define void @wl_shell_surface_set_maximized(%struct.wl_shell_surface* %0, %struct.wl_output* %1) {
%3 = alloca %struct.wl_shell_surface*
%4 = alloca %struct.wl_output*
store %struct.wl_shell_surface* %0, %struct.wl_shell_surface** %3
store %struct.wl_output* %1, %struct.wl_output** %4
%5 = load %struct.wl_shell_surface*, %struct.wl_shell_surface** %3
%6 = bitcast %struct.wl_shell_surface* %5 to %struct.wl_proxy*
%7 = load %struct.wl_output*, %struct.wl_output** %4
%8 = call i32 @wl_proxy_marshal(%struct.wl_proxy* %6, i32 7, %struct.wl_output* %7)
ret void
}

LLVM IR (-O2):
%struct.wl_shell_surface = type { i32 }
%struct.wl_output = type { i32 }
%struct.wl_proxy = type { i32 }
define void @wl_shell_surface_set_maximized(%struct.wl_shell_surface* %0, %struct.wl_output* %1) {
%3 = bitcast %struct.wl_shell_surface* %0 to %struct.wl_proxy*
%4 = tail call i32 @wl_proxy_marshal(%struct.wl_proxy* %3, i32 7, %struct.wl_output* %1)
ret void
}
/* Type definitions */
typedef int pid_t;

/* Variables and functions */
int /*<<< orphan*/ set_map(char *, int, int, int);
int /*<<< orphan*/ sprintf(char *, char *, int);
void set_uid_map(pid_t pid, int inside_id, int outside_id, int len) {
  char file[256];
  sprintf(file, "/proc/%d/uid_map", pid);
  set_map(file, inside_id, outside_id, len);
}


x86 assembly (clang, -O0):
<set_uid_map>:
push   %rbp
mov    %rsp,%rbp
sub    $0x110,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    %ecx,-0x10(%rbp)
lea    -0x110(%rbp),%rdi
mov    -0x4(%rbp),%edx
lea    0xeb8(%rip),%rsi
call   1040 <sprintf@plt>
lea    -0x110(%rbp),%rdi
mov    -0x8(%rbp),%esi
mov    -0xc(%rbp),%edx
mov    -0x10(%rbp),%ecx
call   1030 <set_map@plt>
add    $0x110,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<set_uid_map>:
push   %rbp
push   %r15
push   %r14
push   %rbx
sub    $0x108,%rsp
mov    %ecx,%r14d
mov    %edx,%ebp
mov    %esi,%ebx
mov    %edi,%edx
lea    0xec3(%rip),%rsi
mov    %rsp,%r15
mov    %r15,%rdi
call   1040 <sprintf@plt>
mov    %r15,%rdi
mov    %ebx,%esi
mov    %ebp,%edx
mov    %r14d,%ecx
call   1030 <set_map@plt>
add    $0x108,%rsp
pop    %rbx
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@.str = [17 x i8] c"/proc/%d/uid_map\00"
define void @set_uid_map(i32 %0, i32 %1, i32 %2, i32 %3) {
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
%9 = alloca [256 x i8]
store i32 %0, i32* %5
store i32 %1, i32* %6
store i32 %2, i32* %7
store i32 %3, i32* %8
%10 = getelementptr inbounds [256 x i8], [256 x i8]* %9, i64 0, i64 0
%11 = load i32, i32* %5
%12 = call i32 @sprintf(i8* %10, i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0), i32 %11)
%13 = getelementptr inbounds [256 x i8], [256 x i8]* %9, i64 0, i64 0
%14 = load i32, i32* %6
%15 = load i32, i32* %7
%16 = load i32, i32* %8
%17 = call i32 @set_map(i8* %13, i32 %14, i32 %15, i32 %16)
ret void
}

LLVM IR (-O2):
@.str = [17 x i8] c"/proc/%d/uid_map\00"
define void @set_uid_map(i32 %0, i32 %1, i32 %2, i32 %3) {
%5 = alloca [256 x i8]
%6 = getelementptr inbounds [256 x i8], [256 x i8]* %5, i64 0, i64 0
%7 = call i32 @sprintf(i8* %6, i8* dereferenceable(1) getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0), i32 %0)
%8 = call i32 @set_map(i8* %6, i32 %1, i32 %2, i32 %3)
ret void
}
void SHA384(void) {}


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

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

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

LLVM IR (-O2):
define void @SHA384() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int pa_iochannel_set_noclose() {
  printf("NOT IMPLEMENTED:"
         "pa_iochannel_set_noclose"
         "\n");
}


x86 assembly (clang, -O0):
<pa_iochannel_set_noclose>:
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_iochannel_set_noclose>:
lea    0xee9(%rip),%rdi
jmp    1030 <puts@plt>

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

LLVM IR (-O2):
@str = [41 x i8] c"NOT IMPLEMENTED:pa_iochannel_set_noclose\00"
define i32 @pa_iochannel_set_noclose() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([41 x i8], [41 x i8]* @str, i64 0, i64 0))
ret i32 undef
}
/* Variables and functions */
int _ada_use_c2phc4c(int, int *, int *, double *, int /*<<< orphan*/);
int syspool_quaddobl_clear(void) {
  int fail, *a, *b;
  double *c;
  fail = _ada_use_c2phc4c(699, a, b, c, 0);
  return fail;
}


x86 assembly (clang, -O0):
<syspool_quaddobl_clear>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
mov    -0x20(%rbp),%rcx
mov    $0x2bb,%edi
xor    %r8d,%r8d
call   1030 <_ada_use_c2phc4c@plt>
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<syspool_quaddobl_clear>:
mov    $0x2bb,%edi
xor    %r8d,%r8d
jmp    1030 <_ada_use_c2phc4c@plt>

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

LLVM IR (-O2):
define i32 @syspool_quaddobl_clear() {
%1 = tail call i32 @_ada_use_c2phc4c(i32 699, i32* undef, i32* undef, double* undef, i32 0)
ret i32 %1
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char *, char *, char *);
int /*<<< orphan*/ stderr;
void usage(void) {
  (void)fprintf(stderr, "%s %s\n%s\n",
                "usage: join [-a fileno | -v fileno ] [-e string] [-1 field]",
                "[-2 field]", "            [-o list] [-t char] file1 file2");
  exit(1);
}


x86 assembly (clang, -O0):
<usage>:
push   %rbp
mov    %rsp,%rbp
mov    0x2eb5(%rip),%rax
mov    (%rax),%edi
lea    0xecc(%rip),%rsi
lea    0xecf(%rip),%rdx
lea    0xf04(%rip),%rcx
lea    0xf08(%rip),%r8
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
lea    0xed2(%rip),%rdx
lea    0xf07(%rip),%rcx
lea    0xf0b(%rip),%r8
call   1030 <fprintf@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [10 x i8] c"%s %s\0A%s\0A\00"
@.str.1 = [60 x i8] c"usage: join [-a fileno | -v fileno ] [-e string] [-1 field]\00"
@.str.2 = [11 x i8] c"[-2 field]\00"
@.str.3 = [44 x i8] c" [-o list] [-t char] file1 file2\00"
define void @usage() {
%1 = load i32, i32* @stderr
%2 = call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([60 x i8], [60 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([44 x i8], [44 x i8]* @.str.3, i64 0, i64 0))
%3 = call i32 @exit(i32 1)
unreachable
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [10 x i8] c"%s %s\0A%s\0A\00"
@.str.1 = [60 x i8] c"usage: join [-a fileno | -v fileno ] [-e string] [-1 field]\00"
@.str.2 = [11 x i8] c"[-2 field]\00"
@.str.3 = [44 x i8] c" [-o list] [-t char] file1 file2\00"
define void @usage() {
%1 = load i32, i32* @stderr
%2 = tail call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([60 x i8], [60 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([44 x i8], [44 x i8]* @.str.3, i64 0, i64 0))
%3 = tail call i32 @exit(i32 1)
unreachable
}
/* Variables and functions */
long getStackValue(int /*<<< orphan*/);
long getStackTop(void) { return getStackValue(0); }


x86 assembly (clang, -O0):
<getStackTop>:
push   %rbp
mov    %rsp,%rbp
xor    %edi,%edi
call   1030 <getStackValue@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<getStackTop>:
xor    %edi,%edi
jmp    1030 <getStackValue@plt>

LLVM IR (-O0):
define i64 @getStackTop() {
%1 = call i64 @getStackValue(i32 0)
ret i64 %1
}

LLVM IR (-O2):
define i64 @getStackTop() {
%1 = tail call i64 @getStackValue(i32 0)
ret i64 %1
}
/* Variables and functions */
int /*<<< orphan*/ real_renderer_flush_queues();
void renderer_flush_queues(void) { real_renderer_flush_queues(); }


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

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

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

LLVM IR (-O2):
define void @renderer_flush_queues() {
%1 = tail call i32 (...) @real_renderer_flush_queues()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ EXIT_FAILURE;
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ perror(char *);
void pexit(char *error) {
  perror(error);
  exit(EXIT_FAILURE);
}


x86 assembly (clang, -O0):
<pexit>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <perror@plt>
mov    0x2ea4(%rip),%rax
mov    (%rax),%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<pexit>:
push   %rax
call   1030 <perror@plt>
mov    0x2eb3(%rip),%rax
mov    (%rax),%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@EXIT_FAILURE = global i32 0
define void @pexit(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 @perror(i8* %3)
%5 = load i32, i32* @EXIT_FAILURE
%6 = call i32 @exit(i32 %5)
unreachable
}

LLVM IR (-O2):
@EXIT_FAILURE = global i32 0
define void @pexit(i8* nocapture %0) {
%2 = tail call i32 @perror(i8* %0)
%3 = load i32, i32* @EXIT_FAILURE
%4 = tail call i32 @exit(i32 %3)
unreachable
}
void stretchhline(long p0, long u, long cnt, long uinc, long rptr, long p) {
  p0 = p - (cnt << 2);
  do {
    p--;
    *(char *)p = *(char *)((u >> 16) + rptr);
    u -= uinc;
  } while (p > p0);
}


x86 assembly (clang, -O0):
<stretchhline>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    %r8,-0x28(%rbp)
mov    %r9,-0x30(%rbp)
mov    -0x30(%rbp),%rax
mov    -0x18(%rbp),%rcx
shl    $0x2,%rcx
sub    %rcx,%rax
mov    %rax,-0x8(%rbp)
mov    -0x30(%rbp),%rax
add    $0xffffffffffffffff,%rax
mov    %rax,-0x30(%rbp)
mov    -0x10(%rbp),%rax
sar    $0x10,%rax
add    -0x28(%rbp),%rax
mov    (%rax),%cl
mov    -0x30(%rbp),%rax
mov    %cl,(%rax)
mov    -0x20(%rbp),%rcx
mov    -0x10(%rbp),%rax
sub    %rcx,%rax
mov    %rax,-0x10(%rbp)
mov    -0x30(%rbp),%rax
cmp    -0x8(%rbp),%rax
jg     112f <stretchhline+0x2f>
pop    %rbp
ret

x86 assembly (clang, -O2):
<stretchhline>:
shl    $0x2,%rdx
mov    %r9,%rax
sub    %rdx,%rax
nopw   0x0(%rax,%rax,1)
mov    %rsi,%rdx
sar    $0x10,%rdx
movzbl (%rdx,%r8,1),%edx
mov    %dl,-0x1(%r9)
add    $0xffffffffffffffff,%r9
sub    %rcx,%rsi
cmp    %rax,%r9
jg     1110 <stretchhline+0x10>
ret

LLVM IR (-O0):
define void @stretchhline(i64 %0, i64 %1, i64 %2, i64 %3, i64 %4, i64 %5) {
%7 = alloca i64
%8 = alloca i64
%9 = alloca i64
%10 = alloca i64
%11 = alloca i64
%12 = alloca i64
store i64 %0, i64* %7
store i64 %1, i64* %8
store i64 %2, i64* %9
store i64 %3, i64* %10
store i64 %4, i64* %11
store i64 %5, i64* %12
%13 = load i64, i64* %12
%14 = load i64, i64* %9
%15 = shl i64 %14, 2
%16 = sub nsw i64 %13, %15
store i64 %16, i64* %7
br label %17
17: ; preds = %31, %6
%18 = load i64, i64* %12
%19 = add nsw i64 %18, -1
store i64 %19, i64* %12
%20 = load i64, i64* %8
%21 = ashr i64 %20, 16
%22 = load i64, i64* %11
%23 = add nsw i64 %21, %22
%24 = inttoptr i64 %23 to i8*
%25 = load i8, i8* %24
%26 = load i64, i64* %12
%27 = inttoptr i64 %26 to i8*
store i8 %25, i8* %27
%28 = load i64, i64* %10
%29 = load i64, i64* %8
%30 = sub nsw i64 %29, %28
store i64 %30, i64* %8
br label %31
31: ; preds = %17
%32 = load i64, i64* %12
%33 = load i64, i64* %7
%34 = icmp sgt i64 %32, %33
br i1 %34, label %17, label %35
35: ; preds = %31
ret void
}

LLVM IR (-O2):
define void @stretchhline(i64 %0, i64 %1, i64 %2, i64 %3, i64 %4, i64 %5) {
%7 = mul i64 %2, -4
%8 = add i64 %7, %5
br label %9
9: ; preds = %9, %6
%10 = phi i64 [ %1, %6 ], [ %18, %9 ]
%11 = phi i64 [ %5, %6 ], [ %12, %9 ]
%12 = add nsw i64 %11, -1
%13 = ashr i64 %10, 16
%14 = add nsw i64 %13, %4
%15 = inttoptr i64 %14 to i8*
%16 = load i8, i8* %15
%17 = inttoptr i64 %12 to i8*
store i8 %16, i8* %17
%18 = sub nsw i64 %10, %3
%19 = icmp sgt i64 %12, %8
br i1 %19, label %9, label %20
20: ; preds = %9
ret void
}
/* Type definitions */
struct core_instr_params {
  int dummy;
};
struct core_cpu {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ core_cpu_i__call(struct core_cpu *,
                                    struct core_instr_params *, int);
void core_cpu_i_op_cc(struct core_cpu *cpu, struct core_instr_params *p) {
  core_cpu_i__call(cpu, p, 0x02);
}


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

x86 assembly (clang, -O2):
<core_cpu_i_op_cc>:
mov    $0x2,%edx
jmp    1030 <core_cpu_i__call@plt>

LLVM IR (-O0):
%struct.core_cpu = type { i32 }
%struct.core_instr_params = type { i32 }
define void @core_cpu_i_op_cc(%struct.core_cpu* %0, %struct.core_instr_params* %1) {
%3 = alloca %struct.core_cpu*
%4 = alloca %struct.core_instr_params*
store %struct.core_cpu* %0, %struct.core_cpu** %3
store %struct.core_instr_params* %1, %struct.core_instr_params** %4
%5 = load %struct.core_cpu*, %struct.core_cpu** %3
%6 = load %struct.core_instr_params*, %struct.core_instr_params** %4
%7 = call i32 @core_cpu_i__call(%struct.core_cpu* %5, %struct.core_instr_params* %6, i32 2)
ret void
}

LLVM IR (-O2):
%struct.core_cpu = type { i32 }
%struct.core_instr_params = type { i32 }
define void @core_cpu_i_op_cc(%struct.core_cpu* %0, %struct.core_instr_params* %1) {
%3 = tail call i32 @core_cpu_i__call(%struct.core_cpu* %0, %struct.core_instr_params* %1, i32 2)
ret void
}
/* Variables and functions */
char *getenv(char *);
int /*<<< orphan*/ read_graphics(char *);
void get_genv(void) {
  char *genv;
  read_graphics("tb=\\St:na=\\SX: lf=\\Sn:cr=\\Sr:	: 		"
                "	 ff=\\Sf:cc=\\SC:uk=\\S :::ul=\\N^: 		"
                "	 hb=\\N-:vb=\\N|:ll=\\N`");
  genv = getenv("GRAPHICSMAP");
  if (genv == 0)
    return;
  read_graphics(genv);
}


x86 assembly (clang, -O0):
<get_genv>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    0xed1(%rip),%rdi
call   1040 <read_graphics@plt>
lea    0xf21(%rip),%rdi
call   1030 <getenv@plt>
mov    %rax,-0x8(%rbp)
cmpq   $0x0,-0x8(%rbp)
jne    1154 <get_genv+0x34>
jmp    115d <get_genv+0x3d>
mov    -0x8(%rbp),%rdi
call   1040 <read_graphics@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_genv>:
push   %rax
lea    0xed8(%rip),%rdi
call   1040 <read_graphics@plt>
lea    0xf28(%rip),%rdi
call   1030 <getenv@plt>
test   %rax,%rax
je     1147 <get_genv+0x27>
mov    %rax,%rdi
pop    %rax
jmp    1040 <read_graphics@plt>
pop    %rax
ret

LLVM IR (-O0):
@.str = [92 x i8] c"tb=\\St:na=\\SX: lf=\\Sn:cr=\\Sr:\09: \09\09\09 ff=\\Sf:cc=\\SC:uk=\\S :::ul=\\N^: \09\09\09 hb=\\N-:vb=\\N|:ll=\\N`\00"
@.str.1 = [12 x i8] c"GRAPHICSMAP\00"
define void @get_genv() {
%1 = alloca i8*
%2 = call i32 @read_graphics(i8* getelementptr inbounds ([92 x i8], [92 x i8]* @.str, i64 0, i64 0))
%3 = call i8* @getenv(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.1, i64 0, i64 0))
store i8* %3, i8** %1
%4 = load i8*, i8** %1
%5 = icmp eq i8* %4, null
br i1 %5, label %6, label %7
6: ; preds = %0
br label %10
7: ; preds = %0
%8 = load i8*, i8** %1
%9 = call i32 @read_graphics(i8* %8)
br label %10
10: ; preds = %7, %6
ret void
}

LLVM IR (-O2):
@.str = [92 x i8] c"tb=\\St:na=\\SX: lf=\\Sn:cr=\\Sr:\09: \09\09\09 ff=\\Sf:cc=\\SC:uk=\\S :::ul=\\N^: \09\09\09 hb=\\N-:vb=\\N|:ll=\\N`\00"
@.str.1 = [12 x i8] c"GRAPHICSMAP\00"
define void @get_genv() {
%1 = tail call i32 @read_graphics(i8* getelementptr inbounds ([92 x i8], [92 x i8]* @.str, i64 0, i64 0))
%2 = tail call i8* @getenv(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.1, i64 0, i64 0))
%3 = icmp eq i8* %2, null
br i1 %3, label %6, label %4
4: ; preds = %0
%5 = tail call i32 @read_graphics(i8* %2)
br label %6
6: ; preds = %0, %4
ret void
}
/* Variables and functions */
scalar_t__ isspace(char);
int isignore(char c) { return isspace(c) || c == ','; }


x86 assembly (clang, -O0):
<isignore>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movsbl -0x1(%rbp),%edi
call   1030 <isspace@plt>
mov    %rax,%rcx
mov    $0x1,%al
cmp    $0x0,%rcx
mov    %al,-0x2(%rbp)
jne    1146 <isignore+0x36>
movsbl -0x1(%rbp),%eax
cmp    $0x2c,%eax
sete   %al
mov    %al,-0x2(%rbp)
mov    -0x2(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<isignore>:
push   %rbx
mov    %edi,%ebx
call   1030 <isspace@plt>
test   %rax,%rax
setne  %al
cmp    $0x2c,%bl
sete   %cl
or     %al,%cl
movzbl %cl,%eax
pop    %rbx
ret

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

LLVM IR (-O2):
define i32 @isignore(i8 signext %0) {
%2 = tail call i64 @isspace(i8 signext %0)
%3 = icmp ne i64 %2, 0
%4 = icmp eq i8 %0, 44
%5 = or i1 %4, %3
%6 = zext i1 %5 to i32
ret i32 %6
}
/* Variables and functions */
bool SHAREMIND_MAP_KEY_EQUALS_long(long const k1, long const k2) {
  return k1 == k2;
}


x86 assembly (clang, -O0):
<SHAREMIND_MAP_KEY_EQUALS_long>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
cmp    -0x10(%rbp),%rax
sete   %al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<SHAREMIND_MAP_KEY_EQUALS_long>:
xor    %eax,%eax
cmp    %rsi,%rdi
sete   %al
ret

LLVM IR (-O0):
define i32 @SHAREMIND_MAP_KEY_EQUALS_long(i64 %0, i64 %1) {
%3 = alloca i64
%4 = alloca i64
store i64 %0, i64* %3
store i64 %1, i64* %4
%5 = load i64, i64* %3
%6 = load i64, i64* %4
%7 = icmp eq i64 %5, %6
%8 = zext i1 %7 to i32
ret i32 %8
}

LLVM IR (-O2):
define i32 @SHAREMIND_MAP_KEY_EQUALS_long(i64 %0, i64 %1) {
%3 = icmp eq i64 %0, %1
%4 = zext i1 %3 to i32
ret i32 %4
}
int f(unsigned int x) { return ((int)x) % 4; }


x86 assembly (clang, -O0):
<f>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
mov    $0x4,%ecx
cltd
idiv   %ecx
mov    %edx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<f>:
mov    %edi,%eax
lea    0x3(%rax),%ecx
test   %edi,%edi
cmovns %edi,%ecx
and    $0xfffffffc,%ecx
sub    %ecx,%eax
ret

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

LLVM IR (-O2):
define i32 @f(i32 %0) {
%2 = srem i32 %0, 4
ret i32 %2
}
int audioPlayTime() {}


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

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

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

LLVM IR (-O2):
define i32 @audioPlayTime() {
ret i32 undef
}
void foo287() {}


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

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

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

LLVM IR (-O2):
define void @foo287() {
ret void
}
/* Variables and functions */
double genrand_res53();
double mt_genrand_res53(void) { return genrand_res53(); }


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

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

LLVM IR (-O0):
define double @mt_genrand_res53() {
%1 = call double (...) @genrand_res53()
ret double %1
}

LLVM IR (-O2):
define double @mt_genrand_res53() {
%1 = tail call double (...) @genrand_res53()
ret double %1
}
double vde_chain_nm8_sq(double x) { return x * x; }


x86 assembly (clang, -O0):
<vde_chain_nm8_sq>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
mulsd  -0x8(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<vde_chain_nm8_sq>:
mulsd  %xmm0,%xmm0
ret

LLVM IR (-O0):
define double @vde_chain_nm8_sq(double %0) {
%2 = alloca double
store double %0, double* %2
%3 = load double, double* %2
%4 = load double, double* %2
%5 = fmul double %3, %4
ret double %5
}

LLVM IR (-O2):
define double @vde_chain_nm8_sq(double %0) {
%2 = fmul double %0, %0
ret double %2
}
/* Variables and functions */
int /*<<< orphan*/ assert(char const *);
const char *tcstrskipspc(const char *str) {
  assert(str);
  while (*str > '\0' && *str <= ' ') {
    str++;
  }
  return str;
}


x86 assembly (clang, -O0):
<tcstrskipspc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <assert@plt>
mov    -0x8(%rbp),%rax
movsbl (%rax),%ecx
xor    %eax,%eax
cmp    $0x0,%ecx
mov    %al,-0x9(%rbp)
jle    114a <tcstrskipspc+0x3a>
mov    -0x8(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x20,%eax
setle  %al
mov    %al,-0x9(%rbp)
mov    -0x9(%rbp),%al
test   $0x1,%al
jne    115a <tcstrskipspc+0x4a>
jmp    116b <tcstrskipspc+0x5b>
mov    -0x8(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x8(%rbp)
jmp    1125 <tcstrskipspc+0x15>
mov    -0x8(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<tcstrskipspc>:
push   %rbx
mov    %rdi,%rbx
call   1030 <assert@plt>
add    $0xffffffffffffffff,%rbx
nopl   (%rax)
movzbl 0x1(%rbx),%eax
add    $0x1,%rbx
add    $0xff,%al
cmp    $0x20,%al
jb     1120 <tcstrskipspc+0x10>
mov    %rbx,%rax
pop    %rbx
ret

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

LLVM IR (-O2):
define i8* @tcstrskipspc(i8* %0) {
%2 = tail call i32 @assert(i8* %0)
br label %3
3: ; preds = %3, %1
%4 = phi i8* [ %0, %1 ], [ %8, %3 ]
%5 = load i8, i8* %4
%6 = add i8 %5, -1
%7 = icmp ult i8 %6, 32
%8 = getelementptr inbounds i8, i8* %4, i64 1
br i1 %7, label %3, label %9
9: ; preds = %3
ret i8* %4
}
/* Type definitions */
struct net_device {
  int dummy;
};
struct ethtool_wolinfo {
  scalar_t__ wolopts;
  scalar_t__ supported;
};

/* Variables and functions */
void spider_net_ethtool_get_wol(struct net_device *netdev,
                                struct ethtool_wolinfo *wolinfo) {
  wolinfo->supported = 0;
  wolinfo->wolopts = 0;
}


x86 assembly (clang, -O0):
<spider_net_ethtool_get_wol>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
movq   $0x0,0x8(%rax)
mov    -0x10(%rbp),%rax
movq   $0x0,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<spider_net_ethtool_get_wol>:
xorps  %xmm0,%xmm0
movups %xmm0,(%rsi)
ret

LLVM IR (-O0):
%struct.net_device = type { i32 }
%struct.ethtool_wolinfo = type { i64, i64 }
define void @spider_net_ethtool_get_wol(%struct.net_device* %0, %struct.ethtool_wolinfo* %1) {
%3 = alloca %struct.net_device*
%4 = alloca %struct.ethtool_wolinfo*
store %struct.net_device* %0, %struct.net_device** %3
store %struct.ethtool_wolinfo* %1, %struct.ethtool_wolinfo** %4
%5 = load %struct.ethtool_wolinfo*, %struct.ethtool_wolinfo** %4
%6 = getelementptr inbounds %struct.ethtool_wolinfo, %struct.ethtool_wolinfo* %5, i32 0, i32 1
store i64 0, i64* %6
%7 = load %struct.ethtool_wolinfo*, %struct.ethtool_wolinfo** %4
%8 = getelementptr inbounds %struct.ethtool_wolinfo, %struct.ethtool_wolinfo* %7, i32 0, i32 0
store i64 0, i64* %8
ret void
}

LLVM IR (-O2):
%struct.net_device = type { i32 }
%struct.ethtool_wolinfo = type { i64, i64 }
define void @spider_net_ethtool_get_wol(%struct.net_device* nocapture readnone %0, %struct.ethtool_wolinfo* nocapture writeonly %1) {
%3 = bitcast %struct.ethtool_wolinfo* %1 to i8*
ret void
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char const *,
                           char const *);
int /*<<< orphan*/ stderr;
void invalid_arg(const char *msg, const char *arg) {
  fprintf(stderr, "Error: Argument \"%s\" is wrong: %s\n", arg, msg);
  exit(-1);
}


x86 assembly (clang, -O0):
<invalid_arg>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    0x2ea9(%rip),%rax
mov    (%rax),%edi
mov    -0x10(%rbp),%rdx
mov    -0x8(%rbp),%rcx
lea    0xeb8(%rip),%rsi
call   1030 <fprintf@plt>
mov    $0xffffffff,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<invalid_arg>:
push   %rax
mov    %rsi,%rdx
mov    %rdi,%rcx
mov    0x2eb2(%rip),%rax
mov    (%rax),%edi
lea    0xec9(%rip),%rsi
call   1030 <fprintf@plt>
mov    $0xffffffff,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [35 x i8] c"Error: Argument \22%s\22 is wrong: %s\0A\00"
define void @invalid_arg(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
store i8* %0, i8** %3
store i8* %1, i8** %4
%5 = load i32, i32* @stderr
%6 = load i8*, i8** %4
%7 = load i8*, i8** %3
%8 = call i32 @fprintf(i32 %5, i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str, i64 0, i64 0), i8* %6, i8* %7)
%9 = call i32 @exit(i32 -1)
unreachable
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [35 x i8] c"Error: Argument \22%s\22 is wrong: %s\0A\00"
define void @invalid_arg(i8* %0, i8* %1) {
%3 = load i32, i32* @stderr
%4 = tail call i32 @fprintf(i32 %3, i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str, i64 0, i64 0), i8* %1, i8* %0)
%5 = tail call i32 @exit(i32 -1)
unreachable
}
int ISDIGIT(char c) { return '0' <= c && c <= '9'; }


x86 assembly (clang, -O0):
<ISDIGIT>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movsbl -0x1(%rbp),%edx
xor    %eax,%eax
mov    $0x30,%ecx
cmp    %edx,%ecx
mov    %al,-0x2(%rbp)
jg     112d <ISDIGIT+0x2d>
movsbl -0x1(%rbp),%eax
cmp    $0x39,%eax
setle  %al
mov    %al,-0x2(%rbp)
mov    -0x2(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<ISDIGIT>:
add    $0xd0,%dil
xor    %eax,%eax
cmp    $0xa,%dil
setb   %al
ret

LLVM IR (-O0):
define i32 @ISDIGIT(i8 signext %0) {
%2 = alloca i8
store i8 %0, i8* %2
%3 = load i8, i8* %2
%4 = sext i8 %3 to i32
%5 = icmp sle i32 48, %4
br i1 %5, label %6, label %10
6: ; preds = %1
%7 = load i8, i8* %2
%8 = sext i8 %7 to i32
%9 = icmp sle i32 %8, 57
br label %10
10: ; preds = %6, %1
%11 = phi i1 [ false, %1 ], [ %9, %6 ]
%12 = zext i1 %11 to i32
ret i32 %12
}

LLVM IR (-O2):
define i32 @ISDIGIT(i8 signext %0) {
%2 = add i8 %0, -48
%3 = icmp ult i8 %2, 10
%4 = zext i1 %3 to i32
ret i32 %4
}
const char *dbg_jhead(int jhead) { return ""; }


x86 assembly (clang, -O0):
<dbg_jhead>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
lea    0xef2(%rip),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<dbg_jhead>:
lea    0xef9(%rip),%rax
ret

LLVM IR (-O0):
@.str = [1 x i8] zeroinitializer
define i8* @dbg_jhead(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
ret i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str, i64 0, i64 0)
}

LLVM IR (-O2):
@.str = [1 x i8] zeroinitializer
define i8* @dbg_jhead(i32 %0) {
ret i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str, i64 0, i64 0)
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
int /*<<< orphan*/ scanf(char *, int *);
int main() {
  int KM;
  scanf(" %d", &KM);
  printf("%d minutos\n", KM * 2);
  return 0;
}


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

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xed8(%rip),%rdi
lea    0x4(%rsp),%rsi
call   1040 <scanf@plt>
mov    0x4(%rsp),%esi
add    %esi,%esi
lea    0xec5(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [4 x i8] c" %d\00"
@.str.1 = [12 x i8] c"%d minutos\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
store i32 0, i32* %1
%3 = call i32 @scanf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32* %2)
%4 = load i32, i32* %2
%5 = mul nsw i32 %4, 2
%6 = call i32 @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.1, i64 0, i64 0), i32 %5)
ret i32 0
}

LLVM IR (-O2):
@.str = [4 x i8] c" %d\00"
@.str.1 = [12 x i8] c"%d minutos\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
%3 = call i32 @scanf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32* %1)
%4 = load i32, i32* %1
%5 = shl nsw i32 %4, 1
%6 = call i32 @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.1, i64 0, i64 0), i32 %5)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ outl(unsigned int, unsigned int);
void OUTPORT32(unsigned idx, unsigned val) { outl(idx, val); }


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

x86 assembly (clang, -O2):
<OUTPORT32>:
jmp    1030 <outl@plt>

LLVM IR (-O0):
define void @OUTPORT32(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 = call i32 @outl(i32 %5, i32 %6)
ret void
}

LLVM IR (-O2):
define void @OUTPORT32(i32 %0, i32 %1) {
%3 = tail call i32 @outl(i32 %0, i32 %1)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ dump_stack();
int /*<<< orphan*/ panic(char const *);
void sa_log_abort(const char *buf) {
  dump_stack();
  panic(buf);
}


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

x86 assembly (clang, -O2):
<sa_log_abort>:
push   %rbx
mov    %rdi,%rbx
xor    %eax,%eax
call   1030 <dump_stack@plt>
mov    %rbx,%rdi
pop    %rbx
jmp    1040 <panic@plt>

LLVM IR (-O0):
define void @sa_log_abort(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = call i32 (...) @dump_stack()
%4 = load i8*, i8** %2
%5 = call i32 @panic(i8* %4)
ret void
}

LLVM IR (-O2):
define void @sa_log_abort(i8* %0) {
%2 = tail call i32 (...) @dump_stack()
%3 = tail call i32 @panic(i8* %0)
ret void
}
void test(void) {
  unsigned char reg = *((unsigned char *)0xDD02);
  reg = reg | 0x04;
  *((unsigned char *)0xDD02) = reg;
  *((unsigned char *)0x04A0) = 0;
  *((unsigned char *)0xD8A0) = 0;
}


x86 assembly (clang, -O0):
<test>:
push   %rbp
mov    %rsp,%rbp
mov    $0xdd02,%eax
mov    (%rax),%al
mov    %al,-0x1(%rbp)
movzbl -0x1(%rbp),%eax
or     $0x4,%eax
mov    %al,-0x1(%rbp)
mov    -0x1(%rbp),%cl
mov    $0xdd02,%eax
mov    %cl,(%rax)
mov    $0x4a0,%eax
movb   $0x0,(%rax)
mov    $0xd8a0,%eax
movb   $0x0,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<test>:
orb    $0x4,0xdd02
04
movb   $0x0,0x4a0
movb   $0x0,0xd8a0
ret

LLVM IR (-O0):
define void @test() {
%1 = alloca i8
%2 = load i8, i8* inttoptr (i64 56578 to i8*)
store i8 %2, i8* %1
%3 = load i8, i8* %1
%4 = zext i8 %3 to i32
%5 = or i32 %4, 4
%6 = trunc i32 %5 to i8
store i8 %6, i8* %1
%7 = load i8, i8* %1
store i8 %7, i8* inttoptr (i64 56578 to i8*)
store i8 0, i8* inttoptr (i64 1184 to i8*)
store i8 0, i8* inttoptr (i64 55456 to i8*)
ret void
}

LLVM IR (-O2):
define void @test() {
%1 = load i8, i8* inttoptr (i64 56578 to i8*)
%2 = or i8 %1, 4
store i8 %2, i8* inttoptr (i64 56578 to i8*)
store i8 0, i8* inttoptr (i64 1184 to i8*)
store i8 0, i8* inttoptr (i64 55456 to i8*)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ unlink(char *);
int main() {
  unlink("/etc/ld.so.preload");
  return (0);
}


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

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

LLVM IR (-O0):
@.str = [19 x i8] c"/etc/ld.so.preload\00"
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 @unlink(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@.str = [19 x i8] c"/etc/ld.so.preload\00"
define i32 @main() {
%1 = tail call i32 @unlink(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0))
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ prompt_error_msgf(char *, char *, char const *, int);
void show_sourcing_error(const char filename[], int line_num) {
  (void)prompt_error_msgf("File Sourcing Error", "Error in %s at %d line",
                          filename, line_num);
}


x86 assembly (clang, -O0):
<show_sourcing_error>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rdx
mov    -0xc(%rbp),%ecx
lea    0xed3(%rip),%rdi
lea    0xee0(%rip),%rsi
call   1030 <prompt_error_msgf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<show_sourcing_error>:
mov    %esi,%ecx
mov    %rdi,%rdx
lea    0xee4(%rip),%rdi
lea    0xef1(%rip),%rsi
jmp    1030 <prompt_error_msgf@plt>

LLVM IR (-O0):
@.str = [20 x i8] c"File Sourcing Error\00"
@.str.1 = [23 x i8] c"Error in %s at %d line\00"
define void @show_sourcing_error(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i32
store i8* %0, i8** %3
store i32 %1, i32* %4
%5 = load i8*, i8** %3
%6 = load i32, i32* %4
%7 = call i32 @prompt_error_msgf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.1, i64 0, i64 0), i8* %5, i32 %6)
ret void
}

LLVM IR (-O2):
@.str = [20 x i8] c"File Sourcing Error\00"
@.str.1 = [23 x i8] c"Error in %s at %d line\00"
define void @show_sourcing_error(i8* %0, i32 %1) {
%3 = tail call i32 @prompt_error_msgf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.1, i64 0, i64 0), i8* %0, i32 %1)
ret void
}
/* Type definitions */
typedef int uint8_t;

/* Variables and functions */
int is_local_ether_addr(const void *addr) {
  const uint8_t *addr_bytes = addr;
  return (addr_bytes[0] & 0x02);
}


x86 assembly (clang, -O0):
<is_local_ether_addr>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    (%rax),%eax
and    $0x2,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<is_local_ether_addr>:
mov    (%rdi),%eax
and    $0x2,%eax
ret

LLVM IR (-O0):
define i32 @is_local_ether_addr(i8* %0) {
%2 = alloca i8*
%3 = alloca i32*
store i8* %0, i8** %2
%4 = load i8*, i8** %2
%5 = bitcast i8* %4 to i32*
store i32* %5, i32** %3
%6 = load i32*, i32** %3
%7 = getelementptr inbounds i32, i32* %6, i64 0
%8 = load i32, i32* %7
%9 = and i32 %8, 2
ret i32 %9
}

LLVM IR (-O2):
define i32 @is_local_ether_addr(i8* nocapture %0) {
%2 = bitcast i8* %0 to i32*
%3 = load i32, i32* %2
%4 = and i32 %3, 2
ret i32 %4
}
/* Type definitions */
typedef int uint64_t;

/* Variables and functions */
uint64_t kbits_to_bytes(uint64_t kbits) { return kbits * 1000 / 8; }


x86 assembly (clang, -O0):
<kbits_to_bytes>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
imul   $0x3e8,-0x4(%rbp),%eax
mov    $0x8,%ecx
cltd
idiv   %ecx
pop    %rbp
ret

x86 assembly (clang, -O2):
<kbits_to_bytes>:
imul   $0x7d,%edi,%eax
ret

LLVM IR (-O0):
define i32 @kbits_to_bytes(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = mul nsw i32 %3, 1000
%5 = sdiv i32 %4, 8
ret i32 %5
}

LLVM IR (-O2):
define i32 @kbits_to_bytes(i32 %0) {
%2 = mul nsw i32 %0, 125
ret i32 %2
}
/* Variables and functions */
scalar_t__ isspace(char const);
const char *skip_white(const char *s) {
  while (isspace(*s))
    s++;
  return s;
}


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

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

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

LLVM IR (-O2):
define i8* @skip_white(i8* %0) {
br label %2
2: ; preds = %2, %1
%3 = phi i8* [ %0, %1 ], [ %7, %2 ]
%4 = load i8, i8* %3
%5 = tail call i64 @isspace(i8 signext %4)
%6 = icmp eq i64 %5, 0
%7 = getelementptr inbounds i8, i8* %3, i64 1
br i1 %6, label %8, label %2
8: ; preds = %2
ret i8* %3
}
/* Type definitions */
typedef int /*<<< orphan*/ a;

/* Variables and functions */
int /*<<< orphan*/ remove_all_occ(int *, int);
void main() {
  int a[] = {4, 6, 3, 21, 3, 5, 1, 9, 4};
  int len = sizeof(a) / sizeof(a[0]);
  remove_all_occ(a, len);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
lea    -0x30(%rbp),%rdi
lea    0xecd(%rip),%rsi
mov    $0x24,%edx
call   1040 <memcpy@plt>
movl   $0x9,-0x34(%rbp)
lea    -0x30(%rbp),%rdi
mov    -0x34(%rbp),%esi
call   1030 <remove_all_occ@plt>
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
sub    $0x28,%rsp
mov    0xf06(%rip),%eax
mov    %eax,0x20(%rsp)
movaps 0xeeb(%rip),%xmm0
movaps %xmm0,0x10(%rsp)
movaps 0xecf(%rip),%xmm0
movaps %xmm0,(%rsp)
mov    %rsp,%rdi
mov    $0x9,%esi
call   1030 <remove_all_occ@plt>
add    $0x28,%rsp
ret

LLVM IR (-O0):
@__const.main.a = [9 x i32] [i32 4, i32 6, i32 3, i32 21, i32 3, i32 5, i32 1, i32 9, i32 4]
define void @main() {
%1 = alloca [9 x i32]
%2 = alloca i32
%3 = bitcast [9 x i32]* %1 to i8*
store i32 9, i32* %2
%4 = getelementptr inbounds [9 x i32], [9 x i32]* %1, i64 0, i64 0
%5 = load i32, i32* %2
%6 = call i32 @remove_all_occ(i32* %4, i32 %5)
ret void
}

LLVM IR (-O2):
@__const.main.a = [9 x i32] [i32 4, i32 6, i32 3, i32 21, i32 3, i32 5, i32 1, i32 9, i32 4]
define void @main() {
%1 = alloca [9 x i32]
%2 = bitcast [9 x i32]* %1 to i8*
%3 = getelementptr inbounds [9 x i32], [9 x i32]* %1, i64 0, i64 0
%4 = call i32 @remove_all_occ(i32* %3, i32 9)
ret void
}
void bswap_24(const char in[3], char out[3]) {
  out[0] = in[2];
  out[1] = in[1];
  out[2] = in[0];
}


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

x86 assembly (clang, -O2):
<bswap_24>:
mov    0x2(%rdi),%al
mov    %al,(%rsi)
mov    0x1(%rdi),%al
mov    %al,0x1(%rsi)
mov    (%rdi),%al
mov    %al,0x2(%rsi)
ret

LLVM IR (-O0):
define void @bswap_24(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 = getelementptr inbounds i8, i8* %5, i64 2
%7 = load i8, i8* %6
%8 = load i8*, i8** %4
%9 = getelementptr inbounds i8, i8* %8, i64 0
store i8 %7, i8* %9
%10 = load i8*, i8** %3
%11 = getelementptr inbounds i8, i8* %10, i64 1
%12 = load i8, i8* %11
%13 = load i8*, i8** %4
%14 = getelementptr inbounds i8, i8* %13, i64 1
store i8 %12, i8* %14
%15 = load i8*, i8** %3
%16 = getelementptr inbounds i8, i8* %15, i64 0
%17 = load i8, i8* %16
%18 = load i8*, i8** %4
%19 = getelementptr inbounds i8, i8* %18, i64 2
store i8 %17, i8* %19
ret void
}

LLVM IR (-O2):
define void @bswap_24(i8* nocapture %0, i8* nocapture writeonly %1) {
%3 = getelementptr inbounds i8, i8* %0, i64 2
%4 = load i8, i8* %3
store i8 %4, i8* %1
%5 = getelementptr inbounds i8, i8* %0, i64 1
%6 = load i8, i8* %5
%7 = getelementptr inbounds i8, i8* %1, i64 1
store i8 %6, i8* %7
%8 = load i8, i8* %0
%9 = getelementptr inbounds i8, i8* %1, i64 2
store i8 %8, i8* %9
ret void
}