xunge/DecIR huggingface dataset:
unsigned int next_pow2(unsigned int x) {
  unsigned int y = 1;
  if (x == 0)
    return 0;
  while (y <= x)
    y = y << 1;
  return y;
}


x86 assembly (clang, -O0):
<next_pow2>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
movl   $0x1,-0xc(%rbp)
cmpl   $0x0,-0x8(%rbp)
jne    1124 <next_pow2+0x24>
movl   $0x0,-0x4(%rbp)
jmp    1149 <next_pow2+0x49>
jmp    1129 <next_pow2+0x29>
mov    -0xc(%rbp),%eax
cmp    -0x8(%rbp),%eax
ja     1143 <next_pow2+0x43>
mov    -0xc(%rbp),%eax
shl    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1129 <next_pow2+0x29>
mov    -0xc(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<next_pow2>:
test   %edi,%edi
je     111a <next_pow2+0x1a>
mov    $0x1,%ecx
nopl   0x0(%rax)
mov    %ecx,%eax
lea    (%rax,%rax,1),%ecx
cmp    %edi,%eax
jbe    1110 <next_pow2+0x10>
ret
xor    %eax,%eax
ret

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

LLVM IR (-O2):
define i32 @next_pow2(i32 %0) {
%2 = icmp eq i32 %0, 0
br i1 %2, label %7, label %3
3: ; preds = %1, %3
%4 = phi i32 [ %6, %3 ], [ 1, %1 ]
%5 = icmp ugt i32 %4, %0
%6 = shl i32 %4, 1
br i1 %5, label %7, label %3
7: ; preds = %3, %1
%8 = phi i32 [ 0, %1 ], [ %4, %3 ]
ret i32 %8
}
/* Variables and functions */
int /*<<< orphan*/ DeinitFields();
void SwitchFrom_65(void) { DeinitFields(); }


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

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

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

LLVM IR (-O2):
define void @SwitchFrom_65() {
%1 = tail call i32 (...) @DeinitFields()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ FIONBIO;
int ioctl(int, int /*<<< orphan*/, int *);
int set_nonblock(int fd) {
  int nb = 1;
  return ioctl(fd, FIONBIO, &nb);
}


x86 assembly (clang, -O0):
<set_nonblock>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
movl   $0x1,-0x8(%rbp)
mov    -0x4(%rbp),%edi
mov    0x2eb4(%rip),%rax
mov    (%rax),%esi
lea    -0x8(%rbp),%rdx
call   1030 <ioctl@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<set_nonblock>:
push   %rax
movl   $0x1,0x4(%rsp)
mov    0x2ec0(%rip),%rax
mov    (%rax),%esi
lea    0x4(%rsp),%rdx
call   1030 <ioctl@plt>
pop    %rcx
ret

LLVM IR (-O0):
@FIONBIO = global i32 0
define i32 @set_nonblock(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %2
store i32 1, i32* %3
%4 = load i32, i32* %2
%5 = load i32, i32* @FIONBIO
%6 = call i32 @ioctl(i32 %4, i32 %5, i32* %3)
ret i32 %6
}

LLVM IR (-O2):
@FIONBIO = global i32 0
define i32 @set_nonblock(i32 %0) {
%2 = alloca i32
%3 = bitcast i32* %2 to i8*
store i32 1, i32* %2
%4 = load i32, i32* @FIONBIO
%5 = call i32 @ioctl(i32 %0, i32 %4, i32* %2)
ret i32 %5
}
/* Type definitions */
typedef int /*<<< orphan*/ pthread_attr_t;

/* Variables and functions */
int /*<<< orphan*/ *malloc(int);
int pthread_attr_init(int /*<<< orphan*/ *);
int my_pthread_attr_init(pthread_attr_t *__attr) {
  pthread_attr_t *realattr;
  realattr = malloc(sizeof(pthread_attr_t));
  *((int *)__attr) = (int)realattr;
  return pthread_attr_init(realattr);
}


x86 assembly (clang, -O0):
<my_pthread_attr_init>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    $0x4,%edi
call   1040 <malloc@plt>
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    %eax,%ecx
mov    -0x8(%rbp),%rax
mov    %ecx,(%rax)
mov    -0x10(%rbp),%rdi
call   1030 <pthread_attr_init@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<my_pthread_attr_init>:
push   %rbx
mov    %rdi,%rbx
mov    $0x4,%edi
call   1040 <malloc@plt>
mov    %eax,(%rbx)
mov    %rax,%rdi
pop    %rbx
jmp    1030 <pthread_attr_init@plt>

LLVM IR (-O0):
define i32 @my_pthread_attr_init(i32* %0) {
%2 = alloca i32*
%3 = alloca i32*
store i32* %0, i32** %2
%4 = call i32* @malloc(i32 4)
store i32* %4, i32** %3
%5 = load i32*, i32** %3
%6 = ptrtoint i32* %5 to i32
%7 = load i32*, i32** %2
store i32 %6, i32* %7
%8 = load i32*, i32** %3
%9 = call i32 @pthread_attr_init(i32* %8)
ret i32 %9
}

LLVM IR (-O2):
define i32 @my_pthread_attr_init(i32* nocapture writeonly %0) {
%2 = tail call i32* @malloc(i32 4)
%3 = ptrtoint i32* %2 to i64
%4 = trunc i64 %3 to i32
store i32 %4, i32* %0
%5 = tail call i32 @pthread_attr_init(i32* %2)
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ cputch(char, int *);
int cputs(const char *str) {
  int cnt = 0;
  char c;
  while ((c = *str++) != '\0') {
    cputch(c, &cnt);
  }
  cputch('\n', &cnt);
  return cnt;
}


x86 assembly (clang, -O0):
<cputs>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x8(%rbp)
mov    (%rax),%al
mov    %al,-0xd(%rbp)
movsbl %al,%eax
cmp    $0x0,%eax
je     1155 <cputs+0x45>
lea    -0xc(%rbp),%rsi
movsbl -0xd(%rbp),%edi
call   1030 <cputch@plt>
jmp    1123 <cputs+0x13>
mov    $0xa,%edi
lea    -0xc(%rbp),%rsi
call   1030 <cputch@plt>
mov    -0xc(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<cputs>:
push   %r14
push   %rbx
push   %rax
movl   $0x0,0x4(%rsp)
mov    (%rdi),%al
test   %al,%al
je     1146 <cputs+0x36>
mov    %rdi,%rbx
add    $0x1,%rbx
lea    0x4(%rsp),%r14
xchg   %ax,%ax
movsbl %al,%edi
mov    %r14,%rsi
call   1030 <cputch@plt>
movzbl (%rbx),%eax
add    $0x1,%rbx
test   %al,%al
jne    1130 <cputs+0x20>
lea    0x4(%rsp),%rsi
mov    $0xa,%edi
call   1030 <cputch@plt>
mov    0x4(%rsp),%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

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

LLVM IR (-O2):
define i32 @cputs(i8* nocapture %0) {
%2 = alloca i32
%3 = bitcast i32* %2 to i8*
store i32 0, i32* %2
%4 = load i8, i8* %0
%5 = icmp eq i8 %4, 0
br i1 %5, label %13, label %6
6: ; preds = %1, %6
%7 = phi i8 [ %11, %6 ], [ %4, %1 ]
%8 = phi i8* [ %9, %6 ], [ %0, %1 ]
%9 = getelementptr inbounds i8, i8* %8, i64 1
%10 = call i32 @cputch(i8 signext %7, i32* %2)
%11 = load i8, i8* %9
%12 = icmp eq i8 %11, 0
br i1 %12, label %13, label %6
13: ; preds = %6, %1
%14 = call i32 @cputch(i8 signext 10, i32* %2)
%15 = load i32, i32* %2
ret i32 %15
}
int fun436() { return 436; }


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

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

LLVM IR (-O0):
define i32 @fun436() {
ret i32 436
}

LLVM IR (-O2):
define i32 @fun436() {
ret i32 436
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int /*<<< orphan*/, char *, int, char *);
int /*<<< orphan*/ islower(int);
void t_islower_0x70() {
  Assert_real((islower(112)),
              "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
              "2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/"
              "dg/z88dk/test/suites/ctype/test_islower.c",
              565, ("islower should be 1 for p"));
}


x86 assembly (clang, -O0):
<t_islower_0x70>:
push   %rbp
mov    %rsp,%rbp
mov    $0x70,%edi
call   1030 <islower@plt>
mov    %eax,%edi
lea    0xec9(%rip),%rsi
mov    $0x235,%edx
lea    0xf65(%rip),%rcx
call   1040 <Assert_real@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<t_islower_0x70>:
push   %rax
mov    $0x70,%edi
call   1030 <islower@plt>
lea    0xece(%rip),%rsi
lea    0xf6f(%rip),%rcx
mov    %eax,%edi
mov    $0x235,%edx
pop    %rax
jmp    1040 <Assert_real@plt>

LLVM IR (-O0):
@.str = [168 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/ctype/test_islower.c\00"
@.str.1 = [26 x i8] c"islower should be 1 for p\00"
define void @t_islower_0x70() {
%1 = call i32 @islower(i32 112)
%2 = call i32 @Assert_real(i32 %1, i8* getelementptr inbounds ([168 x i8], [168 x i8]* @.str, i64 0, i64 0), i32 565, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [168 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/ctype/test_islower.c\00"
@.str.1 = [26 x i8] c"islower should be 1 for p\00"
define void @t_islower_0x70() {
%1 = tail call i32 @islower(i32 112)
%2 = tail call i32 @Assert_real(i32 %1, i8* getelementptr inbounds ([168 x i8], [168 x i8]* @.str, i64 0, i64 0), i32 565, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.1, i64 0, i64 0))
ret void
}
void inchalExtUnit2inchalUnit() {}


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

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

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

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

/* Variables and functions */
int /*<<< orphan*/ list_free_callback(struct list *, int /*<<< orphan*/ *);
void list_free(struct list *target) { list_free_callback(target, NULL); }


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

x86 assembly (clang, -O2):
<list_free>:
xor    %esi,%esi
jmp    1030 <list_free_callback@plt>

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

LLVM IR (-O2):
%struct.list = type { i32 }
define void @list_free(%struct.list* %0) {
%2 = tail call i32 @list_free_callback(%struct.list* %0, i32* null)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ free(void *);
void __attribute__((weak)) lwm2m_free(void *p) { free(p); }


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

x86 assembly (clang, -O2):
<lwm2m_free>:
jmp    1030 <free@plt>

LLVM IR (-O0):
define weak void @lwm2m_free(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 @free(i8* %3)
ret void
}

LLVM IR (-O2):
define weak void @lwm2m_free(i8* %0) {
%2 = tail call i32 @free(i8* %0)
ret void
}
unsigned int hash_function_u(unsigned int x) {
  unsigned int h = x;
  h = ((h >> 16) ^ h) * 0x45d9f3b;
  h = ((h >> 16) ^ h) * 0x45d9f3b;
  h = ((h >> 16) ^ h);
  return h;
}


x86 assembly (clang, -O0):
<hash_function_u>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
shr    $0x10,%eax
xor    -0x8(%rbp),%eax
imul   $0x45d9f3b,%eax,%eax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
shr    $0x10,%eax
xor    -0x8(%rbp),%eax
imul   $0x45d9f3b,%eax,%eax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
shr    $0x10,%eax
xor    -0x8(%rbp),%eax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<hash_function_u>:
mov    %edi,%eax
shr    $0x10,%eax
xor    %edi,%eax
imul   $0x45d9f3b,%eax,%eax
mov    %eax,%ecx
shr    $0x10,%ecx
xor    %eax,%ecx
imul   $0x45d9f3b,%ecx,%ecx
mov    %ecx,%eax
shr    $0x10,%eax
xor    %ecx,%eax
ret

LLVM IR (-O0):
define i32 @hash_function_u(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %2
%4 = load i32, i32* %2
store i32 %4, i32* %3
%5 = load i32, i32* %3
%6 = lshr i32 %5, 16
%7 = load i32, i32* %3
%8 = xor i32 %6, %7
%9 = mul i32 %8, 73244475
store i32 %9, i32* %3
%10 = load i32, i32* %3
%11 = lshr i32 %10, 16
%12 = load i32, i32* %3
%13 = xor i32 %11, %12
%14 = mul i32 %13, 73244475
store i32 %14, i32* %3
%15 = load i32, i32* %3
%16 = lshr i32 %15, 16
%17 = load i32, i32* %3
%18 = xor i32 %16, %17
store i32 %18, i32* %3
%19 = load i32, i32* %3
ret i32 %19
}

LLVM IR (-O2):
define i32 @hash_function_u(i32 %0) {
%2 = lshr i32 %0, 16
%3 = xor i32 %2, %0
%4 = mul i32 %3, 73244475
%5 = lshr i32 %4, 16
%6 = xor i32 %5, %4
%7 = mul i32 %6, 73244475
%8 = lshr i32 %7, 16
%9 = xor i32 %8, %7
ret i32 %9
}
void swap(int *arr, int i, int j) {
  int temp = 0;
  temp = arr[i];
  arr[i] = arr[j];
  arr[j] = temp;
}


x86 assembly (clang, -O0):
<swap>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
mov    (%rax,%rcx,4),%eax
mov    %eax,-0x14(%rbp)
mov    -0x8(%rbp),%rax
movslq -0x10(%rbp),%rcx
mov    (%rax,%rcx,4),%edx
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
mov    %edx,(%rax,%rcx,4)
mov    -0x14(%rbp),%edx
mov    -0x8(%rbp),%rax
movslq -0x10(%rbp),%rcx
mov    %edx,(%rax,%rcx,4)
pop    %rbp
ret

x86 assembly (clang, -O2):
<swap>:
movslq %esi,%rax
mov    (%rdi,%rax,4),%ecx
movslq %edx,%rdx
mov    (%rdi,%rdx,4),%esi
mov    %esi,(%rdi,%rax,4)
mov    %ecx,(%rdi,%rdx,4)
ret

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

LLVM IR (-O2):
define void @swap(i32* nocapture %0, i32 %1, i32 %2) {
%4 = sext i32 %1 to i64
%5 = getelementptr inbounds i32, i32* %0, i64 %4
%6 = load i32, i32* %5
%7 = sext i32 %2 to i64
%8 = getelementptr inbounds i32, i32* %0, i64 %7
%9 = load i32, i32* %8
store i32 %9, i32* %5
store i32 %6, i32* %8
ret void
}
void _dcache_writeback_all(void) { ; }


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

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

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

LLVM IR (-O2):
define void @_dcache_writeback_all() {
ret void
}
void XtCvtStringToFloat() {}


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

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

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

LLVM IR (-O2):
define void @XtCvtStringToFloat() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ execvp(char *, char **);
int main(int argc, char **argv) {
  if (argc < 2)
    return 1;
  execvp(argv[1], argv + 1);
}


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)
cmpl   $0x2,-0x8(%rbp)
jge    113c <main+0x2c>
movl   $0x1,-0x4(%rbp)
jmp    1151 <main+0x41>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
mov    -0x10(%rbp),%rsi
add    $0x8,%rsi
call   1030 <execvp@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
mov    $0x1,%eax
cmp    $0x2,%edi
jl     112e <main+0x1e>
push   %rax
mov    0x8(%rsi),%rdi
add    $0x8,%rsi
call   1030 <execvp@plt>
xor    %eax,%eax
add    $0x8,%rsp
ret

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

LLVM IR (-O2):
define i32 @main(i32 %0, i8** %1) {
%3 = icmp slt i32 %0, 2
br i1 %3, label %8, label %4
4: ; preds = %2
%5 = getelementptr inbounds i8*, i8** %1, i64 1
%6 = load i8*, i8** %5
%7 = tail call i32 @execvp(i8* %6, i8** %5)
br label %8
8: ; preds = %2, %4
%9 = phi i32 [ 0, %4 ], [ 1, %2 ]
ret i32 %9
}
float Sleef_floorf(float x) { return __builtin_floorf(x); }


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

x86 assembly (clang, -O2):
<Sleef_floorf>:
jmp    1030 <floorf@plt>

LLVM IR (-O0):
define float @Sleef_floorf(float %0) {
%2 = alloca float
store float %0, float* %2
%3 = load float, float* %2
%4 = call float @llvm.floor.f32(float %3)
ret float %4
}

LLVM IR (-O2):
define float @Sleef_floorf(float %0) {
%2 = tail call float @llvm.floor.f32(float %0)
ret float %2
}
/* Variables and functions */
int /*<<< orphan*/ memcpy(char *, scalar_t__, size_t);
scalar_t__ strrchr(char const *, char);
char *parseFileName(const char *path, char *parsed) {
  memcpy(parsed, strrchr(path, '/') + 1,
         (size_t)(strrchr(path, 0) - strrchr(path, '/')));
  return parsed;
}


x86 assembly (clang, -O0):
<parseFileName>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x20(%rbp)
mov    -0x8(%rbp),%rdi
mov    $0x2f,%esi
call   1030 <strrchr@plt>
add    $0x1,%rax
mov    %rax,-0x18(%rbp)
mov    -0x8(%rbp),%rdi
xor    %esi,%esi
call   1030 <strrchr@plt>
mov    %rax,-0x28(%rbp)
mov    -0x8(%rbp),%rdi
mov    $0x2f,%esi
call   1030 <strrchr@plt>
mov    -0x28(%rbp),%rdx
mov    -0x20(%rbp),%rdi
mov    -0x18(%rbp),%rsi
sub    %rax,%rdx
call   1040 <memcpy@plt>
mov    -0x10(%rbp),%rax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<parseFileName>:
push   %r15
push   %r14
push   %r12
push   %rbx
push   %rax
mov    %rsi,%r14
mov    %rdi,%r12
mov    $0x2f,%esi
call   1030 <strrchr@plt>
lea    0x1(%rax),%r15
mov    %r12,%rdi
xor    %esi,%esi
call   1030 <strrchr@plt>
mov    %rax,%rbx
mov    %r12,%rdi
mov    $0x2f,%esi
call   1030 <strrchr@plt>
sub    %rax,%rbx
mov    %r14,%rdi
mov    %r15,%rsi
mov    %rbx,%rdx
call   1040 <memcpy@plt>
mov    %r14,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
define i8* @parseFileName(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
store i8* %0, i8** %3
store i8* %1, i8** %4
%5 = load i8*, i8** %4
%6 = load i8*, i8** %3
%7 = call i64 @strrchr(i8* %6, i8 signext 47)
%8 = add nsw i64 %7, 1
%9 = load i8*, i8** %3
%10 = call i64 @strrchr(i8* %9, i8 signext 0)
%11 = load i8*, i8** %3
%12 = call i64 @strrchr(i8* %11, i8 signext 47)
%13 = sub nsw i64 %10, %12
%14 = call i32 @memcpy(i8* %5, i64 %8, i64 %13)
%15 = load i8*, i8** %4
ret i8* %15
}

LLVM IR (-O2):
define i8* @parseFileName(i8* %0, i8* returned %1) {
%3 = tail call i64 @strrchr(i8* %0, i8 signext 47)
%4 = add nsw i64 %3, 1
%5 = tail call i64 @strrchr(i8* %0, i8 signext 0)
%6 = tail call i64 @strrchr(i8* %0, i8 signext 47)
%7 = sub nsw i64 %5, %6
%8 = tail call i32 @memcpy(i8* %1, i64 %4, i64 %7)
ret i8* %1
}
/* Variables and functions */
int /*<<< orphan*/ AUDIO_SET_MUTE;
int ioctl(int, int /*<<< orphan*/, int);
int /*<<< orphan*/ perror(char *);
int audioSetMute(int fd, int state) {
  int ans;
  if ((ans = ioctl(fd, AUDIO_SET_MUTE, state)) < 0) {
    perror("AUDIO SET MUTE: ");
    return -1;
  }
  return 0;
}


x86 assembly (clang, -O0):
<audioSetMute>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%edi
mov    0x2ea8(%rip),%rax
mov    (%rax),%esi
mov    -0xc(%rbp),%edx
call   1030 <ioctl@plt>
mov    %eax,-0x10(%rbp)
cmp    $0x0,%eax
jge    1166 <audioSetMute+0x46>
lea    0xeab(%rip),%rdi
call   1040 <perror@plt>
movl   $0xffffffff,-0x4(%rbp)
jmp    116d <audioSetMute+0x4d>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<audioSetMute>:
push   %rax
mov    %esi,%edx
mov    0x2eb6(%rip),%rax
mov    (%rax),%esi
call   1030 <ioctl@plt>
mov    %eax,%ecx
xor    %eax,%eax
test   %ecx,%ecx
js     113b <audioSetMute+0x1b>
pop    %rcx
ret
lea    0xebe(%rip),%rdi
call   1040 <perror@plt>
mov    $0xffffffff,%eax
pop    %rcx
ret

LLVM IR (-O0):
@AUDIO_SET_MUTE = global i32 0
@.str = [17 x i8] c"AUDIO SET MUTE: \00"
define i32 @audioSetMute(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
store i32 %0, i32* %4
store i32 %1, i32* %5
%7 = load i32, i32* %4
%8 = load i32, i32* @AUDIO_SET_MUTE
%9 = load i32, i32* %5
%10 = call i32 @ioctl(i32 %7, i32 %8, i32 %9)
store i32 %10, i32* %6
%11 = icmp slt i32 %10, 0
br i1 %11, label %12, label %14
12: ; preds = %2
%13 = call i32 @perror(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0))
store i32 -1, i32* %3
br label %15
14: ; preds = %2
store i32 0, i32* %3
br label %15
15: ; preds = %14, %12
%16 = load i32, i32* %3
ret i32 %16
}

LLVM IR (-O2):
@AUDIO_SET_MUTE = global i32 0
@.str = [17 x i8] c"AUDIO SET MUTE: \00"
define i32 @audioSetMute(i32 %0, i32 %1) {
%3 = load i32, i32* @AUDIO_SET_MUTE
%4 = tail call i32 @ioctl(i32 %0, i32 %3, i32 %1)
%5 = icmp slt i32 %4, 0
br i1 %5, label %6, label %8
6: ; preds = %2
%7 = tail call i32 @perror(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0))
br label %8
8: ; preds = %2, %6
%9 = phi i32 [ -1, %6 ], [ 0, %2 ]
ret i32 %9
}
/* Variables and functions */
int l_usleep(int);
int /*<<< orphan*/ printf(char *, ...);
int main(int argc, char *argv[]) {
  int timer = -1;
  printf("Start Main:\n");
  timer = l_usleep(1000 * 3);
  printf("timer remaining %d usec.\n", timer);
  printf("End Main:\n");
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0xffffffff,-0x14(%rbp)
lea    0xebc(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    $0xbb8,%edi
call   1040 <l_usleep@plt>
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%esi
lea    0xeab(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xeb7(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xee2(%rip),%rdi
call   1030 <puts@plt>
mov    $0xbb8,%edi
call   1050 <l_usleep@plt>
lea    0xeb2(%rip),%rdi
mov    %eax,%esi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xec8(%rip),%rdi
call   1030 <puts@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [13 x i8] c"Start Main:\0A\00"
@.str.1 = [26 x i8] c"timer remaining %d usec.\0A\00"
@.str.2 = [11 x i8] c"End Main:\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i32
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
store i32 -1, i32* %6
%7 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0))
%8 = call i32 @l_usleep(i32 3000)
store i32 %8, i32* %6
%9 = load i32, i32* %6
%10 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.1, i64 0, i64 0), i32 %9)
%11 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.2, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@.str.1 = [26 x i8] c"timer remaining %d usec.\0A\00"
@str = [12 x i8] c"Start Main:\00"
@str.3 = [10 x i8] c"End Main:\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([12 x i8], [12 x i8]* @str, i64 0, i64 0))
%4 = tail call i32 @l_usleep(i32 3000)
%5 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([26 x i8], [26 x i8]* @.str.1, i64 0, i64 0), i32 %4)
%6 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([10 x i8], [10 x i8]* @str.3, i64 0, i64 0))
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ m3f_mul_v3fo(float *, float const *, float *);
void m3f_mul_av3fo(float *m, const float *input, size_t count, float *result) {
  size_t i;
  for (i = 0; i < count; i += 3) {
    m3f_mul_v3fo(m, input + i, result + i);
  }
}


x86 assembly (clang, -O0):
<m3f_mul_av3fo>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
movq   $0x0,-0x28(%rbp)
mov    -0x28(%rbp),%rax
cmp    -0x18(%rbp),%rax
jae    1176 <m3f_mul_av3fo+0x66>
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x28(%rbp),%rax
shl    $0x2,%rax
add    %rax,%rsi
mov    -0x20(%rbp),%rdx
mov    -0x28(%rbp),%rax
shl    $0x2,%rax
add    %rax,%rdx
call   1030 <m3f_mul_v3fo@plt>
mov    -0x28(%rbp),%rax
add    $0x3,%rax
mov    %rax,-0x28(%rbp)
jmp    1130 <m3f_mul_av3fo+0x20>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<m3f_mul_av3fo>:
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
test   %rdx,%rdx
je     114f <m3f_mul_av3fo+0x3f>
mov    %rcx,%r15
mov    %rdx,%r14
mov    %rsi,%r13
mov    %rdi,%r12
xor    %ebx,%ebx
nopl   0x0(%rax)
mov    %r12,%rdi
mov    %r13,%rsi
mov    %r15,%rdx
call   1030 <m3f_mul_v3fo@plt>
add    $0x3,%rbx
add    $0xc,%r15
add    $0xc,%r13
cmp    %r14,%rbx
jb     1130 <m3f_mul_av3fo+0x20>
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
ret

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

LLVM IR (-O2):
define void @m3f_mul_av3fo(float* %0, float* %1, i64 %2, float* %3) {
%5 = icmp eq i64 %2, 0
br i1 %5, label %13, label %6
6: ; preds = %4, %6
%7 = phi i64 [ %11, %6 ], [ 0, %4 ]
%8 = getelementptr inbounds float, float* %1, i64 %7
%9 = getelementptr inbounds float, float* %3, i64 %7
%10 = tail call i32 @m3f_mul_v3fo(float* %0, float* %8, float* %9)
%11 = add i64 %7, 3
%12 = icmp ult i64 %11, %2
br i1 %12, label %6, label %13
13: ; preds = %6, %4
ret void
}
/* Variables and functions */
scalar_t__ malloc(int);
int /*<<< orphan*/ sprintf(char *, char *, unsigned char, unsigned char,
                           unsigned char);
char *iv2string(unsigned char *iv) {
  char *string = (char *)malloc(9);
  sprintf(string, "%02X %02X %02X", iv[0], iv[1], iv[2]);
  return string;
}


x86 assembly (clang, -O0):
<iv2string>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    $0x9,%edi
call   1030 <malloc@plt>
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x8(%rbp),%rax
mov    (%rax),%dl
mov    -0x8(%rbp),%rax
mov    0x1(%rax),%cl
mov    -0x8(%rbp),%rax
lea    0xeaa(%rip),%rsi
movzbl %dl,%edx
movzbl %cl,%ecx
movzbl 0x2(%rax),%r8d
call   1040 <sprintf@plt>
mov    -0x10(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<iv2string>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%rbx
mov    $0x9,%edi
call   1030 <malloc@plt>
mov    %rax,%r14
movzbl (%rbx),%edx
movzbl 0x1(%rbx),%ecx
movzbl 0x2(%rbx),%r8d
lea    0xeb9(%rip),%rsi
mov    %rax,%rdi
call   1040 <sprintf@plt>
mov    %r14,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@.str = [15 x i8] c"%02X %02X %02X\00"
define i8* @iv2string(i8* %0) {
%2 = alloca i8*
%3 = alloca i8*
store i8* %0, i8** %2
%4 = call i64 @malloc(i32 9)
%5 = inttoptr i64 %4 to i8*
store i8* %5, i8** %3
%6 = load i8*, i8** %3
%7 = load i8*, i8** %2
%8 = getelementptr inbounds i8, i8* %7, i64 0
%9 = load i8, i8* %8
%10 = load i8*, i8** %2
%11 = getelementptr inbounds i8, i8* %10, i64 1
%12 = load i8, i8* %11
%13 = load i8*, i8** %2
%14 = getelementptr inbounds i8, i8* %13, i64 2
%15 = load i8, i8* %14
%16 = call i32 @sprintf(i8* %6, i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0), i8 zeroext %9, i8 zeroext %12, i8 zeroext %15)
%17 = load i8*, i8** %3
ret i8* %17
}

LLVM IR (-O2):
@.str = [15 x i8] c"%02X %02X %02X\00"
define i8* @iv2string(i8* nocapture %0) {
%2 = tail call i64 @malloc(i32 9)
%3 = inttoptr i64 %2 to i8*
%4 = load i8, i8* %0
%5 = getelementptr inbounds i8, i8* %0, i64 1
%6 = load i8, i8* %5
%7 = getelementptr inbounds i8, i8* %0, i64 2
%8 = load i8, i8* %7
%9 = tail call i32 @sprintf(i8* dereferenceable(1) %3, i8* dereferenceable(1) getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0), i8 zeroext %4, i8 zeroext %6, i8 zeroext %8)
ret i8* %3
}
/* Type definitions */
typedef int /*<<< orphan*/ uint8_t;
struct ndarray {
  int dummy;
};
typedef int int8_t;
typedef int /*<<< orphan*/ int64_t;

/* Variables and functions */
int /*<<< orphan*/ *stdlib_ndarray_get_ptr(struct ndarray const *,
                                           int /*<<< orphan*/ const *);
int stdlib_ndarray_set_ptr_int8(int /*<<< orphan*/ *, int const);
int8_t stdlib_ndarray_set_int8(const struct ndarray *arr, const int64_t *sub,
                               const int8_t v) {
  uint8_t *idx = stdlib_ndarray_get_ptr(arr, sub);
  if (idx == NULL) {
    return -1;
  }
  return stdlib_ndarray_set_ptr_int8(idx, v);
}


x86 assembly (clang, -O0):
<stdlib_ndarray_set_int8>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    %edx,-0x1c(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x18(%rbp),%rsi
call   1030 <stdlib_ndarray_get_ptr@plt>
mov    %rax,-0x28(%rbp)
cmpq   $0x0,-0x28(%rbp)
jne    115b <stdlib_ndarray_set_int8+0x3b>
movl   $0xffffffff,-0x4(%rbp)
jmp    116a <stdlib_ndarray_set_int8+0x4a>
mov    -0x28(%rbp),%rdi
mov    -0x1c(%rbp),%esi
call   1040 <stdlib_ndarray_set_ptr_int8@plt>
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<stdlib_ndarray_set_int8>:
push   %rbx
mov    %edx,%ebx
call   1030 <stdlib_ndarray_get_ptr@plt>
test   %rax,%rax
je     1138 <stdlib_ndarray_set_int8+0x18>
mov    %rax,%rdi
mov    %ebx,%esi
pop    %rbx
jmp    1040 <stdlib_ndarray_set_ptr_int8@plt>
mov    $0xffffffff,%eax
pop    %rbx
ret

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

LLVM IR (-O2):
%struct.ndarray = type { i32 }
define i32 @stdlib_ndarray_set_int8(%struct.ndarray* %0, i32* %1, i32 %2) {
%4 = tail call i32* @stdlib_ndarray_get_ptr(%struct.ndarray* %0, i32* %1)
%5 = icmp eq i32* %4, null
br i1 %5, label %8, label %6
6: ; preds = %3
%7 = tail call i32 @stdlib_ndarray_set_ptr_int8(i32* %4, i32 %2)
br label %8
8: ; preds = %3, %6
%9 = phi i32 [ %7, %6 ], [ -1, %3 ]
ret i32 %9
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void FBDdrawEnd(void) {
  printf("draw end -------------------------------------\n");
}


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

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

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

LLVM IR (-O2):
@str = [47 x i8] c"draw end -------------------------------------\00"
define void @FBDdrawEnd() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([47 x i8], [47 x i8]* @str, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ do_csi(char *, int);
void decsace(int flag) { do_csi("%d*x", flag ? 2 : 0); }


x86 assembly (clang, -O0):
<decsace>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%ecx
xor    %esi,%esi
mov    $0x2,%eax
cmp    $0x0,%ecx
cmovne %eax,%esi
lea    0xece(%rip),%rdi
call   1030 <do_csi@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<decsace>:
xor    %esi,%esi
test   %edi,%edi
setne  %sil
add    %esi,%esi
lea    0xedf(%rip),%rdi
jmp    1030 <do_csi@plt>

LLVM IR (-O0):
@.str = [5 x i8] c"%d*x\00"
define void @decsace(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = icmp ne i32 %3, 0
%5 = zext i1 %4 to i64
%6 = select i1 %4, i32 2, i32 0
%7 = call i32 @do_csi(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i32 %6)
ret void
}

LLVM IR (-O2):
@.str = [5 x i8] c"%d*x\00"
define void @decsace(i32 %0) {
%2 = icmp eq i32 %0, 0
%3 = select i1 %2, i32 0, i32 2
%4 = tail call i32 @do_csi(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i32 %3)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void func2(void) { printf("func2\n"); }


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

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

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

LLVM IR (-O2):
@str = [6 x i8] c"func2\00"
define void @func2() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([6 x i8], [6 x i8]* @str, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ free(void *);
void FreeHashObject(void *obj) { free(obj); }


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

x86 assembly (clang, -O2):
<FreeHashObject>:
jmp    1030 <free@plt>

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

LLVM IR (-O2):
define void @FreeHashObject(i8* nocapture %0) {
%2 = tail call i32 @free(i8* %0)
ret void
}
/* Type definitions */
struct S_VOLUME {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ compute_Inviscid_FACE_RHS_EFE(struct S_VOLUME *const,
                                                 int const);
int /*<<< orphan*/ compute_Viscous_FACE_RHS_EFE(struct S_VOLUME *const,
                                                int const);
void explicit_FACE_info_c(struct S_VOLUME *const VOLUME_perturbed,
                          bool const compute_all) {
  compute_Inviscid_FACE_RHS_EFE(VOLUME_perturbed, compute_all);
  compute_Viscous_FACE_RHS_EFE(VOLUME_perturbed, compute_all);
}


x86 assembly (clang, -O0):
<explicit_FACE_info_c>:
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   1040 <compute_Inviscid_FACE_RHS_EFE@plt>
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
call   1030 <compute_Viscous_FACE_RHS_EFE@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<explicit_FACE_info_c>:
push   %rbp
push   %rbx
push   %rax
mov    %esi,%ebp
mov    %rdi,%rbx
call   1040 <compute_Inviscid_FACE_RHS_EFE@plt>
mov    %rbx,%rdi
mov    %ebp,%esi
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    1030 <compute_Viscous_FACE_RHS_EFE@plt>

LLVM IR (-O0):
%struct.S_VOLUME = type { i32 }
define void @explicit_FACE_info_c(%struct.S_VOLUME* %0, i32 %1) {
%3 = alloca %struct.S_VOLUME*
%4 = alloca i32
store %struct.S_VOLUME* %0, %struct.S_VOLUME** %3
store i32 %1, i32* %4
%5 = load %struct.S_VOLUME*, %struct.S_VOLUME** %3
%6 = load i32, i32* %4
%7 = call i32 @compute_Inviscid_FACE_RHS_EFE(%struct.S_VOLUME* %5, i32 %6)
%8 = load %struct.S_VOLUME*, %struct.S_VOLUME** %3
%9 = load i32, i32* %4
%10 = call i32 @compute_Viscous_FACE_RHS_EFE(%struct.S_VOLUME* %8, i32 %9)
ret void
}

LLVM IR (-O2):
%struct.S_VOLUME = type { i32 }
define void @explicit_FACE_info_c(%struct.S_VOLUME* %0, i32 %1) {
%3 = tail call i32 @compute_Inviscid_FACE_RHS_EFE(%struct.S_VOLUME* %0, i32 %1)
%4 = tail call i32 @compute_Viscous_FACE_RHS_EFE(%struct.S_VOLUME* %0, i32 %1)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ isprint(int);
void t_isprint_0xa6() {
  Assert_real((isprint(166) == 0),
              "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
              "2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/"
              "dg/z88dk/test/suites/ctype/test_isprint.c",
              835, ("isprint should be 0 for 0xa6"));
}


x86 assembly (clang, -O0):
<t_isprint_0xa6>:
push   %rbp
mov    %rsp,%rbp
mov    $0xa6,%edi
call   1030 <isprint@plt>
cmp    $0x0,%rax
sete   %al
and    $0x1,%al
movzbl %al,%edi
lea    0xebf(%rip),%rsi
mov    $0x343,%edx
lea    0xf5b(%rip),%rcx
call   1040 <Assert_real@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<t_isprint_0xa6>:
push   %rax
mov    $0xa6,%edi
call   1030 <isprint@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf66(%rip),%rcx
mov    $0x343,%edx
pop    %rax
jmp    1040 <Assert_real@plt>

LLVM IR (-O0):
@.str = [168 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/ctype/test_isprint.c\00"
@.str.1 = [29 x i8] c"isprint should be 0 for 0xa6\00"
define void @t_isprint_0xa6() {
%1 = call i64 @isprint(i32 166)
%2 = icmp eq i64 %1, 0
%3 = zext i1 %2 to i32
%4 = call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([168 x i8], [168 x i8]* @.str, i64 0, i64 0), i32 835, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [168 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/ctype/test_isprint.c\00"
@.str.1 = [29 x i8] c"isprint should be 0 for 0xa6\00"
define void @t_isprint_0xa6() {
%1 = tail call i64 @isprint(i32 166)
%2 = icmp eq i64 %1, 0
%3 = zext i1 %2 to i32
%4 = tail call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([168 x i8], [168 x i8]* @.str, i64 0, i64 0), i32 835, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ ft_bzero(void *, size_t);
void *malloc(size_t);
void *ft_memalloc(size_t size) {
  void *a;
  a = malloc(size);
  if (a == NULL)
    return (NULL);
  ft_bzero(a, size);
  return (a);
}


x86 assembly (clang, -O0):
<ft_memalloc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
call   1040 <malloc@plt>
mov    %rax,-0x18(%rbp)
cmpq   $0x0,-0x18(%rbp)
jne    1151 <ft_memalloc+0x31>
movq   $0x0,-0x8(%rbp)
jmp    1166 <ft_memalloc+0x46>
mov    -0x18(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1030 <ft_bzero@plt>
mov    -0x18(%rbp),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ft_memalloc>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%r14
call   1040 <malloc@plt>
mov    %rax,%rbx
test   %rax,%rax
je     113f <ft_memalloc+0x1f>
mov    %rbx,%rdi
mov    %r14,%rsi
call   1030 <ft_bzero@plt>
mov    %rbx,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

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

LLVM IR (-O2):
define i8* @ft_memalloc(i64 %0) {
%2 = tail call i8* @malloc(i64 %0)
%3 = icmp eq i8* %2, null
br i1 %3, label %6, label %4
4: ; preds = %1
%5 = tail call i32 @ft_bzero(i8* %2, i64 %0)
br label %6
6: ; preds = %1, %4
ret i8* %2
}
/* Variables and functions */
int /*<<< orphan*/ DrawTextXYw136(char const *, long, long, unsigned long);
void drawtextxyw(const char *s, long x, long y, unsigned long cfg) {
  DrawTextXYw136(s, x, y, cfg);
}


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

x86 assembly (clang, -O2):
<drawtextxyw>:
jmp    1030 <DrawTextXYw136@plt>

LLVM IR (-O0):
define void @drawtextxyw(i8* %0, i64 %1, i64 %2, i64 %3) {
%5 = alloca i8*
%6 = alloca i64
%7 = alloca i64
%8 = alloca i64
store i8* %0, i8** %5
store i64 %1, i64* %6
store i64 %2, i64* %7
store i64 %3, i64* %8
%9 = load i8*, i8** %5
%10 = load i64, i64* %6
%11 = load i64, i64* %7
%12 = load i64, i64* %8
%13 = call i32 @DrawTextXYw136(i8* %9, i64 %10, i64 %11, i64 %12)
ret void
}

LLVM IR (-O2):
define void @drawtextxyw(i8* %0, i64 %1, i64 %2, i64 %3) {
%5 = tail call i32 @DrawTextXYw136(i8* %0, i64 %1, i64 %2, i64 %3)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ write(char *, char *, int /*<<< orphan*/ *);
void function_empty_state() { write("csv-task.csv", ",", NULL); }


x86 assembly (clang, -O0):
<function_empty_state>:
push   %rbp
mov    %rsp,%rbp
lea    0xee5(%rip),%rdi
lea    0xeeb(%rip),%rsi
xor    %eax,%eax
mov    %eax,%edx
call   1030 <write@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<function_empty_state>:
lea    0xee9(%rip),%rdi
lea    0xeef(%rip),%rsi
xor    %edx,%edx
jmp    1030 <write@plt>

LLVM IR (-O0):
@.str = [13 x i8] c"csv-task.csv\00"
@.str.1 = [2 x i8] c",\00"
define void @function_empty_state() {
%1 = call i32 @write(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0), i32* null)
ret void
}

LLVM IR (-O2):
@.str = [13 x i8] c"csv-task.csv\00"
@.str.1 = [2 x i8] c",\00"
define void @function_empty_state() {
%1 = tail call i32 @write(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0), i32* null)
ret void
}
OP(dd, ef) { op_ef(); }


x86 assembly (clang, -O0):
<OP>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    $0x0,%al
call   1030 <op_ef@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @OP(i32 %0, i32 %1) {
%3 = tail call i32 (...) @op_ef()
ret i32 undef
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ iscntrl(int);
void t_iscntrl_0xeb() {
  Assert_real((iscntrl(235) == 0),
              "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
              "2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/"
              "dg/z88dk/test/suites/ctype/test_iscntrl.c",
              1180, ("iscntrl should be 0 for 0xeb"));
}


x86 assembly (clang, -O0):
<t_iscntrl_0xeb>:
push   %rbp
mov    %rsp,%rbp
mov    $0xeb,%edi
call   1030 <iscntrl@plt>
cmp    $0x0,%rax
sete   %al
and    $0x1,%al
movzbl %al,%edi
lea    0xebf(%rip),%rsi
mov    $0x49c,%edx
lea    0xf5b(%rip),%rcx
call   1040 <Assert_real@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<t_iscntrl_0xeb>:
push   %rax
mov    $0xeb,%edi
call   1030 <iscntrl@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf66(%rip),%rcx
mov    $0x49c,%edx
pop    %rax
jmp    1040 <Assert_real@plt>

LLVM IR (-O0):
@.str = [168 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/ctype/test_iscntrl.c\00"
@.str.1 = [29 x i8] c"iscntrl should be 0 for 0xeb\00"
define void @t_iscntrl_0xeb() {
%1 = call i64 @iscntrl(i32 235)
%2 = icmp eq i64 %1, 0
%3 = zext i1 %2 to i32
%4 = call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([168 x i8], [168 x i8]* @.str, i64 0, i64 0), i32 1180, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [168 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/ctype/test_iscntrl.c\00"
@.str.1 = [29 x i8] c"iscntrl should be 0 for 0xeb\00"
define void @t_iscntrl_0xeb() {
%1 = tail call i64 @iscntrl(i32 235)
%2 = icmp eq i64 %1, 0
%3 = zext i1 %2 to i32
%4 = tail call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([168 x i8], [168 x i8]* @.str, i64 0, i64 0), i32 1180, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0))
ret void
}
int test_imm_D9int8_reg(signed char val) {
  return ((val) & (-0xD9 << 0)) ? -20 : -40;
}


x86 assembly (clang, -O0):
<test_imm_D9int8_reg>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movsbl -0x1(%rbp),%edx
and    $0xffffff27,%edx
mov    $0xffffffd8,%eax
mov    $0xffffffec,%ecx
cmp    $0x0,%edx
cmovne %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_imm_D9int8_reg>:
test   $0xffffff27,%edi
mov    $0xffffffd8,%ecx
mov    $0xffffffec,%eax
cmove  %ecx,%eax
ret

LLVM IR (-O0):
define i32 @test_imm_D9int8_reg(i8 signext %0) {
%2 = alloca i8
store i8 %0, i8* %2
%3 = load i8, i8* %2
%4 = sext i8 %3 to i32
%5 = and i32 %4, -217
%6 = icmp ne i32 %5, 0
%7 = zext i1 %6 to i64
%8 = select i1 %6, i32 -20, i32 -40
ret i32 %8
}

LLVM IR (-O2):
define i32 @test_imm_D9int8_reg(i8 signext %0) {
%2 = sext i8 %0 to i32
%3 = and i32 %2, -217
%4 = icmp eq i32 %3, 0
%5 = select i1 %4, i32 -40, i32 -20
ret i32 %5
}