xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int main(int argc, char *argv[]) {
  printf("hello, world");
  return 0;
}


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

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

LLVM IR (-O0):
@.str = [13 x i8] c"hello, world\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%6 = call i32 @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@.str = [13 x i8] c"hello, world\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0))
ret i32 0
}
void mixed(int a, float b, int c, float d) {}


x86 assembly (clang, -O0):
<mixed>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
movss  %xmm0,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
movss  %xmm1,-0x10(%rbp)
pop    %rbp
ret

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

LLVM IR (-O0):
define void @mixed(i32 %0, float %1, i32 %2, float %3) {
%5 = alloca i32
%6 = alloca float
%7 = alloca i32
%8 = alloca float
store i32 %0, i32* %5
store float %1, float* %6
store i32 %2, i32* %7
store float %3, float* %8
ret void
}

LLVM IR (-O2):
define void @mixed(i32 %0, float %1, i32 %2, float %3) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ commit_creds(int /*<<< orphan*/);
int /*<<< orphan*/ prepare_kernel_cred(int /*<<< orphan*/);
void get_root() { commit_creds(prepare_kernel_cred(0)); }


x86 assembly (clang, -O0):
<get_root>:
push   %rbp
mov    %rsp,%rbp
xor    %edi,%edi
call   1030 <prepare_kernel_cred@plt>
mov    %eax,%edi
call   1040 <commit_creds@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_root>:
push   %rax
xor    %edi,%edi
call   1030 <prepare_kernel_cred@plt>
mov    %eax,%edi
pop    %rax
jmp    1040 <commit_creds@plt>

LLVM IR (-O0):
define void @get_root() {
%1 = call i32 @prepare_kernel_cred(i32 0)
%2 = call i32 @commit_creds(i32 %1)
ret void
}

LLVM IR (-O2):
define void @get_root() {
%1 = tail call i32 @prepare_kernel_cred(i32 0)
%2 = tail call i32 @commit_creds(i32 %1)
ret void
}
int exor(int a, int b) { return !(!(!a | !b) | !(a | b)); }


x86 assembly (clang, -O0):
<exor>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
cmpl   $0x0,-0x4(%rbp)
setne  %al
xor    $0xff,%al
and    $0x1,%al
movzbl %al,%eax
cmpl   $0x0,-0x8(%rbp)
setne  %cl
xor    $0xff,%cl
and    $0x1,%cl
movzbl %cl,%ecx
or     %ecx,%eax
cmp    $0x0,%eax
setne  %al
xor    $0xff,%al
and    $0x1,%al
movzbl %al,%eax
mov    -0x4(%rbp),%ecx
or     -0x8(%rbp),%ecx
cmp    $0x0,%ecx
setne  %cl
xor    $0xff,%cl
and    $0x1,%cl
movzbl %cl,%ecx
or     %ecx,%eax
cmp    $0x0,%eax
setne  %al
xor    $0xff,%al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<exor>:
test   %edi,%edi
sete   %al
test   %esi,%esi
sete   %cl
or     %al,%cl
or     %edi,%esi
setne  %al
and    %cl,%al
movzbl %al,%eax
ret

LLVM IR (-O0):
define i32 @exor(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 = icmp ne i32 %5, 0
%7 = xor i1 %6, true
%8 = zext i1 %7 to i32
%9 = load i32, i32* %4
%10 = icmp ne i32 %9, 0
%11 = xor i1 %10, true
%12 = zext i1 %11 to i32
%13 = or i32 %8, %12
%14 = icmp ne i32 %13, 0
%15 = xor i1 %14, true
%16 = zext i1 %15 to i32
%17 = load i32, i32* %3
%18 = load i32, i32* %4
%19 = or i32 %17, %18
%20 = icmp ne i32 %19, 0
%21 = xor i1 %20, true
%22 = zext i1 %21 to i32
%23 = or i32 %16, %22
%24 = icmp ne i32 %23, 0
%25 = xor i1 %24, true
%26 = zext i1 %25 to i32
ret i32 %26
}

LLVM IR (-O2):
define i32 @exor(i32 %0, i32 %1) {
%3 = icmp ne i32 %0, 0
%4 = icmp ne i32 %1, 0
%5 = and i1 %3, %4
%6 = or i32 %1, %0
%7 = icmp eq i32 %6, 0
%8 = or i1 %5, %7
%9 = xor i1 %8, true
%10 = zext i1 %9 to i32
ret i32 %10
}
char *Field_FindFirstSeparator(char *s) {
  int i;
  for (i = 0; i < strlen(s); i++) {
    if (s[i] == ';') {
      return &s[i];
    }
  }
  return ((void *)0);
}


x86 assembly (clang, -O0):
<Field_FindFirstSeparator>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
movslq -0x14(%rbp),%rax
mov    %rax,-0x20(%rbp)
mov    -0x10(%rbp),%rdi
call   1030 <strlen@plt>
mov    %rax,%rcx
mov    -0x20(%rbp),%rax
cmp    %rcx,%rax
jae    1180 <Field_FindFirstSeparator+0x70>
mov    -0x10(%rbp),%rax
movslq -0x14(%rbp),%rcx
movsbl (%rax,%rcx,1),%eax
cmp    $0x3b,%eax
jne    116d <Field_FindFirstSeparator+0x5d>
mov    -0x10(%rbp),%rax
movslq -0x14(%rbp),%rcx
add    %rcx,%rax
mov    %rax,-0x8(%rbp)
jmp    1188 <Field_FindFirstSeparator+0x78>
jmp    1172 <Field_FindFirstSeparator+0x62>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    1123 <Field_FindFirstSeparator+0x13>
movq   $0x0,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Field_FindFirstSeparator>:
push   %rbx
mov    %rdi,%rbx
call   1030 <strlen@plt>
test   %rax,%rax
je     1141 <Field_FindFirstSeparator+0x31>
mov    %rax,%rcx
xor    %eax,%eax
xor    %edx,%edx
cs nopw 0x0(%rax,%rax,1)
nop
cmpb   $0x3b,(%rbx,%rdx,1)
je     1145 <Field_FindFirstSeparator+0x35>
add    $0x1,%rdx
cmp    %rdx,%rcx
jne    1130 <Field_FindFirstSeparator+0x20>
pop    %rbx
ret
xor    %eax,%eax
pop    %rbx
ret
mov    %edx,%eax
add    %rax,%rbx
mov    %rbx,%rax
pop    %rbx
ret

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

LLVM IR (-O2):
define i8* @Field_FindFirstSeparator(i8* %0) {
%2 = tail call i64 @strlen(i8* dereferenceable(1) %0)
%3 = icmp eq i64 %2, 0
br i1 %3, label %15, label %4
4: ; preds = %1, %9
%5 = phi i64 [ %10, %9 ], [ 0, %1 ]
%6 = getelementptr inbounds i8, i8* %0, i64 %5
%7 = load i8, i8* %6
%8 = icmp eq i8 %7, 59
br i1 %8, label %12, label %9
9: ; preds = %4
%10 = add nuw i64 %5, 1
%11 = icmp eq i64 %10, %2
br i1 %11, label %15, label %4
12: ; preds = %4
%13 = and i64 %5, 4294967295
%14 = getelementptr inbounds i8, i8* %0, i64 %13
br label %15
15: ; preds = %9, %1, %12
%16 = phi i8* [ %14, %12 ], [ null, %1 ], [ null, %9 ]
ret i8* %16
}
void proc9(long p1, int p2, short p3, char p4, long *p5, long p6, long p7,
           long p8, long *p9) {
  *p5 = p1 + p2 + p3 - p4;
  *p9 = p6 * p7 * p8;
}


x86 assembly (clang, -O0):
<proc9>:
push   %rbp
mov    %rsp,%rbp
mov    %cl,%al
mov    %dx,%cx
mov    0x20(%rbp),%rdx
mov    0x18(%rbp),%rdx
mov    0x10(%rbp),%rdx
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %cx,-0xe(%rbp)
mov    %al,-0xf(%rbp)
mov    %r8,-0x18(%rbp)
mov    %r9,-0x20(%rbp)
mov    -0x8(%rbp),%rcx
movslq -0xc(%rbp),%rax
add    %rax,%rcx
movswq -0xe(%rbp),%rax
add    %rax,%rcx
movsbq -0xf(%rbp),%rax
sub    %rax,%rcx
mov    -0x18(%rbp),%rax
mov    %rcx,(%rax)
mov    -0x20(%rbp),%rcx
imul   0x10(%rbp),%rcx
imul   0x18(%rbp),%rcx
mov    0x20(%rbp),%rax
mov    %rcx,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<proc9>:
mov    0x18(%rsp),%rax
movslq %esi,%rsi
add    %rdi,%rsi
movslq %edx,%rdx
add    %rsi,%rdx
movslq %ecx,%rcx
sub    %rcx,%rdx
imul   0x8(%rsp),%r9
mov    %rdx,(%r8)
imul   0x10(%rsp),%r9
mov    %r9,(%rax)
ret

LLVM IR (-O0):
define void @proc9(i64 %0, i32 %1, i16 signext %2, i8 signext %3, i64* %4, i64 %5, i64 %6, i64 %7, i64* %8) {
%10 = alloca i64
%11 = alloca i32
%12 = alloca i16
%13 = alloca i8
%14 = alloca i64*
%15 = alloca i64
%16 = alloca i64
%17 = alloca i64
%18 = alloca i64*
store i64 %0, i64* %10
store i32 %1, i32* %11
store i16 %2, i16* %12
store i8 %3, i8* %13
store i64* %4, i64** %14
store i64 %5, i64* %15
store i64 %6, i64* %16
store i64 %7, i64* %17
store i64* %8, i64** %18
%19 = load i64, i64* %10
%20 = load i32, i32* %11
%21 = sext i32 %20 to i64
%22 = add nsw i64 %19, %21
%23 = load i16, i16* %12
%24 = sext i16 %23 to i64
%25 = add nsw i64 %22, %24
%26 = load i8, i8* %13
%27 = sext i8 %26 to i64
%28 = sub nsw i64 %25, %27
%29 = load i64*, i64** %14
store i64 %28, i64* %29
%30 = load i64, i64* %15
%31 = load i64, i64* %16
%32 = mul nsw i64 %30, %31
%33 = load i64, i64* %17
%34 = mul nsw i64 %32, %33
%35 = load i64*, i64** %18
store i64 %34, i64* %35
ret void
}

LLVM IR (-O2):
define void @proc9(i64 %0, i32 %1, i16 signext %2, i8 signext %3, i64* nocapture writeonly %4, i64 %5, i64 %6, i64 %7, i64* nocapture writeonly %8) {
%10 = sext i32 %1 to i64
%11 = add nsw i64 %10, %0
%12 = sext i16 %2 to i64
%13 = add nsw i64 %11, %12
%14 = sext i8 %3 to i64
%15 = sub i64 %13, %14
store i64 %15, i64* %4
%16 = mul nsw i64 %6, %5
%17 = mul nsw i64 %16, %7
store i64 %17, i64* %8
ret void
}
/* Type definitions */
struct timespec {
  int tv_sec;
  int tv_nsec;
};

/* Variables and functions */
int /*<<< orphan*/ nanosleep(struct timespec *, int /*<<< orphan*/ *);
void idris2_usleep(int usec) {
  struct timespec t;
  t.tv_sec = usec / 1000000;
  t.tv_nsec = (usec % 1000000) * 1000;
  nanosleep(&t, NULL);
}


x86 assembly (clang, -O0):
<idris2_usleep>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
mov    $0xf4240,%ecx
cltd
idiv   %ecx
mov    %eax,-0x10(%rbp)
mov    -0x4(%rbp),%eax
mov    $0xf4240,%ecx
cltd
idiv   %ecx
imul   $0x3e8,%edx,%eax
mov    %eax,-0xc(%rbp)
lea    -0x10(%rbp),%rdi
xor    %eax,%eax
mov    %eax,%esi
call   1030 <nanosleep@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<idris2_usleep>:
push   %rax
movslq %edi,%rax
imul   $0x431bde83,%rax,%rcx
mov    %rcx,%rdx
shr    $0x3f,%rdx
sar    $0x32,%rcx
add    %edx,%ecx
mov    %ecx,(%rsp)
imul   $0xf4240,%ecx,%ecx
sub    %ecx,%eax
imul   $0x3e8,%eax,%eax
mov    %eax,0x4(%rsp)
mov    %rsp,%rdi
xor    %esi,%esi
call   1030 <nanosleep@plt>
pop    %rax
ret

LLVM IR (-O0):
%struct.timespec = type { i32, i32 }
define void @idris2_usleep(i32 %0) {
%2 = alloca i32
%3 = alloca %struct.timespec
store i32 %0, i32* %2
%4 = load i32, i32* %2
%5 = sdiv i32 %4, 1000000
%6 = getelementptr inbounds %struct.timespec, %struct.timespec* %3, i32 0, i32 0
store i32 %5, i32* %6
%7 = load i32, i32* %2
%8 = srem i32 %7, 1000000
%9 = mul nsw i32 %8, 1000
%10 = getelementptr inbounds %struct.timespec, %struct.timespec* %3, i32 0, i32 1
store i32 %9, i32* %10
%11 = call i32 @nanosleep(%struct.timespec* %3, i32* null)
ret void
}

LLVM IR (-O2):
%struct.timespec = type { i32, i32 }
define void @idris2_usleep(i32 %0) {
%2 = alloca %struct.timespec
%3 = bitcast %struct.timespec* %2 to i8*
%4 = sdiv i32 %0, 1000000
%5 = getelementptr inbounds %struct.timespec, %struct.timespec* %2, i64 0, i32 0
store i32 %4, i32* %5
%6 = srem i32 %0, 1000000
%7 = mul nsw i32 %6, 1000
%8 = getelementptr inbounds %struct.timespec, %struct.timespec* %2, i64 0, i32 1
store i32 %7, i32* %8
%9 = call i32 @nanosleep(%struct.timespec* %2, i32* null)
ret void
}
void isr(void) {}


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

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

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

LLVM IR (-O2):
define void @isr() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int b() { exit(1); }


x86 assembly (clang, -O0):
<b>:
push   %rbp
mov    %rsp,%rbp
mov    $0x1,%edi
call   1030 <exit@plt>

x86 assembly (clang, -O2):
<b>:
push   %rax
mov    $0x1,%edi
call   1030 <exit@plt>

LLVM IR (-O0):
define i32 @b() {
%1 = call i32 @exit(i32 1)
unreachable
}

LLVM IR (-O2):
define i32 @b() {
%1 = tail call i32 @exit(i32 1)
unreachable
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ my_putstr(char *);
void print_only_number() {
  my_putstr("\nError : Your string can't be transform to a number");
  my_putstr(" because it contains a alphabetical caracter");
  my_putstr("\nThe only available caracter ");
  my_putstr("are digit\n\n");
  exit(-1);
}


x86 assembly (clang, -O0):
<print_only_number>:
push   %rbp
mov    %rsp,%rbp
lea    0xed5(%rip),%rdi
call   1030 <my_putstr@plt>
lea    0xefd(%rip),%rdi
call   1030 <my_putstr@plt>
lea    0xf1e(%rip),%rdi
call   1030 <my_putstr@plt>
lea    0xf30(%rip),%rdi
call   1030 <my_putstr@plt>
mov    $0xffffffff,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<print_only_number>:
push   %rax
lea    0xed8(%rip),%rdi
call   1030 <my_putstr@plt>
lea    0xf00(%rip),%rdi
call   1030 <my_putstr@plt>
lea    0xf21(%rip),%rdi
call   1030 <my_putstr@plt>
lea    0xf33(%rip),%rdi
call   1030 <my_putstr@plt>
mov    $0xffffffff,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@.str = [52 x i8] c"\0AError : Your string can't be transform to a number\00"
@.str.1 = [45 x i8] c" because it contains a alphabetical caracter\00"
@.str.2 = [30 x i8] c"\0AThe only available caracter \00"
@.str.3 = [12 x i8] c"are digit\0A\0A\00"
define void @print_only_number() {
%1 = call i32 @my_putstr(i8* getelementptr inbounds ([52 x i8], [52 x i8]* @.str, i64 0, i64 0))
%2 = call i32 @my_putstr(i8* getelementptr inbounds ([45 x i8], [45 x i8]* @.str.1, i64 0, i64 0))
%3 = call i32 @my_putstr(i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.2, i64 0, i64 0))
%4 = call i32 @my_putstr(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.3, i64 0, i64 0))
%5 = call i32 @exit(i32 -1)
unreachable
}

LLVM IR (-O2):
@.str = [52 x i8] c"\0AError : Your string can't be transform to a number\00"
@.str.1 = [45 x i8] c" because it contains a alphabetical caracter\00"
@.str.2 = [30 x i8] c"\0AThe only available caracter \00"
@.str.3 = [12 x i8] c"are digit\0A\0A\00"
define void @print_only_number() {
%1 = tail call i32 @my_putstr(i8* getelementptr inbounds ([52 x i8], [52 x i8]* @.str, i64 0, i64 0))
%2 = tail call i32 @my_putstr(i8* getelementptr inbounds ([45 x i8], [45 x i8]* @.str.1, i64 0, i64 0))
%3 = tail call i32 @my_putstr(i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.2, i64 0, i64 0))
%4 = tail call i32 @my_putstr(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.3, i64 0, i64 0))
%5 = tail call i32 @exit(i32 -1)
unreachable
}
void ath79_pci_set_irq_map(unsigned nr_irqs, const struct ath79_pci_irq *map) {}


x86 assembly (clang, -O0):
<ath79_pci_set_irq_map>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
pop    %rbp
ret

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

LLVM IR (-O0):
%struct.ath79_pci_irq = type opaque
define void @ath79_pci_set_irq_map(i32 %0, %struct.ath79_pci_irq* %1) {
%3 = alloca i32
%4 = alloca %struct.ath79_pci_irq*
store i32 %0, i32* %3
store %struct.ath79_pci_irq* %1, %struct.ath79_pci_irq** %4
ret void
}

LLVM IR (-O2):
%struct.ath79_pci_irq = type opaque
define void @ath79_pci_set_irq_map(i32 %0, %struct.ath79_pci_irq* nocapture %1) {
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ __m128i;

/* Variables and functions */
int /*<<< orphan*/ _mm_madd_epi16(int /*<<< orphan*/ const,
                                  int /*<<< orphan*/ const);
int /*<<< orphan*/ _mm_packs_epi32(int /*<<< orphan*/ const,
                                   int /*<<< orphan*/ const);
__m128i mm_madd_packs_epi16_sse2(const __m128i *const src_0,
                                 const __m128i *const src_1,
                                 const __m128i *const ker) {
  const __m128i madd_1 = _mm_madd_epi16(*src_0, *ker);
  const __m128i madd_2 = _mm_madd_epi16(*src_1, *ker);
  return _mm_packs_epi32(madd_1, madd_2);
}


x86 assembly (clang, -O0):
<mm_madd_packs_epi16_sse2>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%edi
mov    -0x18(%rbp),%rax
mov    (%rax),%esi
call   1040 <_mm_madd_epi16@plt>
mov    %eax,-0x1c(%rbp)
mov    -0x10(%rbp),%rax
mov    (%rax),%edi
mov    -0x18(%rbp),%rax
mov    (%rax),%esi
call   1040 <_mm_madd_epi16@plt>
mov    %eax,-0x20(%rbp)
mov    -0x1c(%rbp),%edi
mov    -0x20(%rbp),%esi
call   1030 <_mm_packs_epi32@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<mm_madd_packs_epi16_sse2>:
push   %rbp
push   %r14
push   %rbx
mov    %rdx,%rbx
mov    %rsi,%r14
mov    (%rdi),%edi
mov    (%rdx),%esi
call   1040 <_mm_madd_epi16@plt>
mov    %eax,%ebp
mov    (%r14),%edi
mov    (%rbx),%esi
call   1040 <_mm_madd_epi16@plt>
mov    %ebp,%edi
mov    %eax,%esi
pop    %rbx
pop    %r14
pop    %rbp
jmp    1030 <_mm_packs_epi32@plt>

LLVM IR (-O0):
define i32 @mm_madd_packs_epi16_sse2(i32* %0, i32* %1, i32* %2) {
%4 = alloca i32*
%5 = alloca i32*
%6 = alloca i32*
%7 = alloca i32
%8 = alloca i32
store i32* %0, i32** %4
store i32* %1, i32** %5
store i32* %2, i32** %6
%9 = load i32*, i32** %4
%10 = load i32, i32* %9
%11 = load i32*, i32** %6
%12 = load i32, i32* %11
%13 = call i32 @_mm_madd_epi16(i32 %10, i32 %12)
store i32 %13, i32* %7
%14 = load i32*, i32** %5
%15 = load i32, i32* %14
%16 = load i32*, i32** %6
%17 = load i32, i32* %16
%18 = call i32 @_mm_madd_epi16(i32 %15, i32 %17)
store i32 %18, i32* %8
%19 = load i32, i32* %7
%20 = load i32, i32* %8
%21 = call i32 @_mm_packs_epi32(i32 %19, i32 %20)
ret i32 %21
}

LLVM IR (-O2):
define i32 @mm_madd_packs_epi16_sse2(i32* nocapture %0, i32* nocapture %1, i32* nocapture %2) {
%4 = load i32, i32* %0
%5 = load i32, i32* %2
%6 = tail call i32 @_mm_madd_epi16(i32 %4, i32 %5)
%7 = load i32, i32* %1
%8 = load i32, i32* %2
%9 = tail call i32 @_mm_madd_epi16(i32 %7, i32 %8)
%10 = tail call i32 @_mm_packs_epi32(i32 %6, i32 %9)
ret i32 %10
}
/* Variables and functions */
int /*<<< orphan*/ Output_printf(char *);
void Output_clear() { Output_printf("\033[2J\033[;H"); }


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

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

LLVM IR (-O0):
@.str = [9 x i8] c"\1B[2J\1B[;H\00"
define void @Output_clear() {
%1 = call i32 @Output_printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [9 x i8] c"\1B[2J\1B[;H\00"
define void @Output_clear() {
%1 = tail call i32 @Output_printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0))
ret void
}
/* Variables and functions */
size_t cycle(size_t value, size_t max) {
  if (value < max)
    return value;
  return value - max;
}


x86 assembly (clang, -O0):
<cycle>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    -0x10(%rbp),%rax
cmp    -0x18(%rbp),%rax
jae    1127 <cycle+0x27>
mov    -0x10(%rbp),%rax
mov    %rax,-0x8(%rbp)
jmp    1133 <cycle+0x33>
mov    -0x10(%rbp),%rax
sub    -0x18(%rbp),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<cycle>:
mov    %rdi,%rax
xor    %ecx,%ecx
cmp    %rsi,%rdi
cmovae %rsi,%rcx
sub    %rcx,%rax
ret

LLVM IR (-O0):
define i64 @cycle(i64 %0, i64 %1) {
%3 = alloca i64
%4 = alloca i64
%5 = alloca i64
store i64 %0, i64* %4
store i64 %1, i64* %5
%6 = load i64, i64* %4
%7 = load i64, i64* %5
%8 = icmp ult i64 %6, %7
br i1 %8, label %9, label %11
9: ; preds = %2
%10 = load i64, i64* %4
store i64 %10, i64* %3
br label %15
11: ; preds = %2
%12 = load i64, i64* %4
%13 = load i64, i64* %5
%14 = sub i64 %12, %13
store i64 %14, i64* %3
br label %15
15: ; preds = %11, %9
%16 = load i64, i64* %3
ret i64 %16
}

LLVM IR (-O2):
define i64 @cycle(i64 %0, i64 %1) {
%3 = icmp ult i64 %0, %1
%4 = select i1 %3, i64 0, i64 %1
%5 = sub i64 %0, %4
ret i64 %5
}
double vde_chain_nm5_sign(double x) { return x < 0 ? -1 : x > 0 ? 1 : x; }


x86 assembly (clang, -O0):
<vde_chain_nm5_sign>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
xorps  %xmm0,%xmm0
ucomisd -0x8(%rbp),%xmm0
jbe    1129 <vde_chain_nm5_sign+0x29>
movsd  0xee9(%rip),%xmm0
movsd  %xmm0,-0x10(%rbp)
jmp    1161 <vde_chain_nm5_sign+0x61>
movsd  -0x8(%rbp),%xmm0
xorps  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jbe    114d <vde_chain_nm5_sign+0x4d>
movsd  0xebd(%rip),%xmm0
movsd  %xmm0,-0x18(%rbp)
jmp    1157 <vde_chain_nm5_sign+0x57>
movsd  -0x8(%rbp),%xmm0
movsd  %xmm0,-0x18(%rbp)
movsd  -0x18(%rbp),%xmm0
movsd  %xmm0,-0x10(%rbp)
movsd  -0x10(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<vde_chain_nm5_sign>:
xorpd  %xmm1,%xmm1
xorpd  %xmm2,%xmm2
cmpltsd %xmm0,%xmm2
movsd  0xeeb(%rip),%xmm3
andpd  %xmm2,%xmm3
andnpd %xmm0,%xmm2
orpd   %xmm3,%xmm2
cmpltsd %xmm1,%xmm0
movapd %xmm0,%xmm1
andnpd %xmm2,%xmm1
movsd  0xed2(%rip),%xmm2
andpd  %xmm2,%xmm0
orpd   %xmm1,%xmm0
ret

LLVM IR (-O0):
define double @vde_chain_nm5_sign(double %0) {
%2 = alloca double
store double %0, double* %2
%3 = load double, double* %2
%4 = fcmp olt double %3, 0.000000e+00
br i1 %4, label %5, label %6
5: ; preds = %1
br label %14
6: ; preds = %1
%7 = load double, double* %2
%8 = fcmp ogt double %7, 0.000000e+00
br i1 %8, label %9, label %10
9: ; preds = %6
br label %12
10: ; preds = %6
%11 = load double, double* %2
br label %12
12: ; preds = %10, %9
%13 = phi double [ 1.000000e+00, %9 ], [ %11, %10 ]
br label %14
14: ; preds = %12, %5
%15 = phi double [ -1.000000e+00, %5 ], [ %13, %12 ]
ret double %15
}

LLVM IR (-O2):
define double @vde_chain_nm5_sign(double %0) {
%2 = fcmp olt double %0, 0.000000e+00
%3 = fcmp ogt double %0, 0.000000e+00
%4 = select i1 %3, double 1.000000e+00, double %0
%5 = select i1 %2, double -1.000000e+00, double %4
ret double %5
}
/* Variables and functions */
double tanh(double);
double w_WR(double x) {
  const double C4 = 1.523;
  const double C5 = 0.1477;
  return 0.5 + 0.5 * tanh((x - C4) / C5);
}


x86 assembly (clang, -O0):
<w_WR>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  0xeeb(%rip),%xmm0
movsd  %xmm0,-0x10(%rbp)
movsd  0xed6(%rip),%xmm0
movsd  %xmm0,-0x18(%rbp)
movsd  -0x8(%rbp),%xmm0
movsd  0xecc(%rip),%xmm1
subsd  %xmm1,%xmm0
movsd  0xeb8(%rip),%xmm1
divsd  %xmm1,%xmm0
call   1030 <tanh@plt>
movsd  0xe9f(%rip),%xmm1
mulsd  %xmm1,%xmm0
addsd  %xmm1,%xmm0
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<w_WR>:
push   %rax
addsd  0xee7(%rip),%xmm0
divsd  0xee7(%rip),%xmm0
call   1030 <tanh@plt>
movsd  0xee2(%rip),%xmm1
mulsd  %xmm1,%xmm0
addsd  %xmm1,%xmm0
pop    %rax
ret

LLVM IR (-O0):
define double @w_WR(double %0) {
%2 = alloca double
%3 = alloca double
%4 = alloca double
store double %0, double* %2
store double 1.523000e+00, double* %3
store double 1.477000e-01, double* %4
%5 = load double, double* %2
%6 = fsub double %5, 1.523000e+00
%7 = fdiv double %6, 1.477000e-01
%8 = call double @tanh(double %7)
%9 = call double @llvm.fmuladd.f64(double 5.000000e-01, double %8, double 5.000000e-01)
ret double %9
}

LLVM IR (-O2):
define double @w_WR(double %0) {
%2 = fadd double %0, -1.523000e+00
%3 = fdiv double %2, 1.477000e-01
%4 = tail call double @tanh(double %3)
%5 = tail call double @llvm.fmuladd.f64(double %4, double 5.000000e-01, double 5.000000e-01)
ret double %5
}
void gtk_text_iter_backward_lines() {}


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

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

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

LLVM IR (-O2):
define void @gtk_text_iter_backward_lines() {
ret void
}
unsigned getb16(const unsigned char *buf) { return (buf[0] << 8) | buf[1]; }


x86 assembly (clang, -O0):
<getb16>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movzbl (%rax),%eax
shl    $0x8,%eax
mov    -0x8(%rbp),%rcx
movzbl 0x1(%rcx),%ecx
or     %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<getb16>:
movzwl (%rdi),%eax
shl    $0x10,%eax
bswap  %eax
ret

LLVM IR (-O0):
define i32 @getb16(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = getelementptr inbounds i8, i8* %3, i64 0
%5 = load i8, i8* %4
%6 = zext i8 %5 to i32
%7 = shl i32 %6, 8
%8 = load i8*, i8** %2
%9 = getelementptr inbounds i8, i8* %8, i64 1
%10 = load i8, i8* %9
%11 = zext i8 %10 to i32
%12 = or i32 %7, %11
ret i32 %12
}

LLVM IR (-O2):
define i32 @getb16(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = zext i8 %2 to i32
%4 = shl nuw nsw i32 %3, 8
%5 = getelementptr inbounds i8, i8* %0, i64 1
%6 = load i8, i8* %5
%7 = zext i8 %6 to i32
%8 = or i32 %4, %7
ret i32 %8
}
/* Variables and functions */
int /*<<< orphan*/ debugf(char *, char *);
void debug(char message[]) { debugf("DEBUG", message); }


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

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

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

LLVM IR (-O2):
@.str = [6 x i8] c"DEBUG\00"
define void @debug(i8* %0) {
%2 = tail call i32 @debugf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i8* %0)
ret void
}
/* Variables and functions */
unsigned int crc32(unsigned int, unsigned char const *, unsigned int);
unsigned int f_crc32(unsigned int *crc, const unsigned char *buf,
                     unsigned int *len) {
  return crc32(*crc, buf, *len);
}


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

x86 assembly (clang, -O2):
<f_crc32>:
mov    (%rdi),%edi
mov    (%rdx),%edx
jmp    1030 <crc32@plt>

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

LLVM IR (-O2):
define i32 @f_crc32(i32* nocapture %0, i8* %1, i32* nocapture %2) {
%4 = load i32, i32* %0
%5 = load i32, i32* %2
%6 = tail call i32 @crc32(i32 %4, i8* %1, i32 %5)
ret i32 %6
}
/* Type definitions */
struct opt_set {
  int dummy;
};
typedef int off_t;

/* Variables and functions */
char *set_get_value(struct opt_set *, char const *);
int strtol(char const *, char **, int);
off_t smbftpd_transfer_rate_get(struct opt_set *set, const char *user) {
  off_t size;
  const char *value;
  value = set_get_value(set, user);
  if (NULL == value) {
    return 0;
  }
  size = 1024 * strtol(value, (char **)NULL, 10);
  return size;
}


x86 assembly (clang, -O0):
<smbftpd_transfer_rate_get>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x18(%rbp),%rsi
call   1030 <set_get_value@plt>
mov    %rax,-0x28(%rbp)
xor    %eax,%eax
cmp    -0x28(%rbp),%rax
jne    1159 <smbftpd_transfer_rate_get+0x39>
movl   $0x0,-0x4(%rbp)
jmp    1177 <smbftpd_transfer_rate_get+0x57>
mov    -0x28(%rbp),%rdi
xor    %eax,%eax
mov    %eax,%esi
mov    $0xa,%edx
call   1040 <strtol@plt>
shl    $0xa,%eax
mov    %eax,-0x1c(%rbp)
mov    -0x1c(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<smbftpd_transfer_rate_get>:
push   %rax
call   1030 <set_get_value@plt>
test   %rax,%rax
je     113f <smbftpd_transfer_rate_get+0x1f>
mov    %rax,%rdi
xor    %esi,%esi
mov    $0xa,%edx
call   1040 <strtol@plt>
shl    $0xa,%eax
pop    %rcx
ret
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
%struct.opt_set = type { i32 }
define i32 @smbftpd_transfer_rate_get(%struct.opt_set* %0, i8* %1) {
%3 = tail call i8* @set_get_value(%struct.opt_set* %0, i8* %1)
%4 = icmp eq i8* %3, null
br i1 %4, label %8, label %5
5: ; preds = %2
%6 = tail call i32 @strtol(i8* nocapture %3, i8** null, i32 10)
%7 = shl nsw i32 %6, 10
br label %8
8: ; preds = %2, %5
%9 = phi i32 [ %7, %5 ], [ 0, %2 ]
ret i32 %9
}
int modinc(int x, int m) {
  int xinc = x + 1;
  if (xinc == m)
    xinc = 0;
  return xinc;
}


x86 assembly (clang, -O0):
<modinc>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
cmp    -0x8(%rbp),%eax
jne    1126 <modinc+0x26>
movl   $0x0,-0xc(%rbp)
mov    -0xc(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<modinc>:
lea    0x1(%rdi),%ecx
xor    %eax,%eax
cmp    %esi,%ecx
cmovne %ecx,%eax
ret

LLVM IR (-O0):
define i32 @modinc(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%6 = load i32, i32* %3
%7 = add nsw i32 %6, 1
store i32 %7, i32* %5
%8 = load i32, i32* %5
%9 = load i32, i32* %4
%10 = icmp eq i32 %8, %9
br i1 %10, label %11, label %12
11: ; preds = %2
store i32 0, i32* %5
br label %12
12: ; preds = %11, %2
%13 = load i32, i32* %5
ret i32 %13
}

LLVM IR (-O2):
define i32 @modinc(i32 %0, i32 %1) {
%3 = add nsw i32 %0, 1
%4 = icmp eq i32 %3, %1
%5 = select i1 %4, i32 0, i32 %3
ret i32 %5
}
int bar() { return 3; }


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

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

LLVM IR (-O0):
define i32 @bar() {
ret i32 3
}

LLVM IR (-O2):
define i32 @bar() {
ret i32 3
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, double, double, double);
int /*<<< orphan*/ scanf(char *, double *, double *, double *);
int main() {
  double a, b, c;
  scanf("%lf %lf %lf", &a, &b, &c);
  printf("%.2f %.2f %.2f", c, b, a);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeca(%rip),%rdi
lea    -0x10(%rbp),%rsi
lea    -0x18(%rbp),%rdx
lea    -0x20(%rbp),%rcx
call   1040 <scanf@plt>
movsd  -0x20(%rbp),%xmm0
movsd  -0x18(%rbp),%xmm1
movsd  -0x10(%rbp),%xmm2
lea    0xeaf(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
sub    $0x18,%rsp
lea    0xed5(%rip),%rdi
lea    0x10(%rsp),%rsi
lea    0x8(%rsp),%rdx
mov    %rsp,%rcx
call   1040 <scanf@plt>
movsd  (%rsp),%xmm0
movsd  0x8(%rsp),%xmm1
movsd  0x10(%rsp),%xmm2
lea    0xeb7(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x18,%rsp
ret

LLVM IR (-O0):
@.str = [12 x i8] c"%lf %lf %lf\00"
@.str.1 = [15 x i8] c"%.2f %.2f %.2f\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca double
%3 = alloca double
%4 = alloca double
store i32 0, i32* %1
%5 = call i32 @scanf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), double* %2, double* %3, double* %4)
%6 = load double, double* %4
%7 = load double, double* %3
%8 = load double, double* %2
%9 = call i32 @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.1, i64 0, i64 0), double %6, double %7, double %8)
ret i32 0
}

LLVM IR (-O2):
@.str = [12 x i8] c"%lf %lf %lf\00"
@.str.1 = [15 x i8] c"%.2f %.2f %.2f\00"
define i32 @main() {
%1 = alloca double
%2 = alloca double
%3 = alloca double
%4 = bitcast double* %1 to i8*
%5 = bitcast double* %2 to i8*
%6 = bitcast double* %3 to i8*
%7 = call i32 @scanf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), double* %1, double* %2, double* %3)
%8 = load double, double* %3
%9 = load double, double* %2
%10 = load double, double* %1
%11 = call i32 @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.1, i64 0, i64 0), double %8, double %9, double %10)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ uart_tx_byte(unsigned char);
void print_nibble(unsigned nibble) {
  unsigned char digit;
  digit = nibble + '0';
  if (digit > '9') {
    digit += 39;
  }
  uart_tx_byte(digit);
}


x86 assembly (clang, -O0):
<print_nibble>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x30,%eax
mov    %al,-0x5(%rbp)
movzbl -0x5(%rbp),%eax
cmp    $0x39,%eax
jle    113b <print_nibble+0x2b>
movzbl -0x5(%rbp),%eax
add    $0x27,%eax
mov    %al,-0x5(%rbp)
movzbl -0x5(%rbp),%edi
call   1030 <uart_tx_byte@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<print_nibble>:
lea    0x30(%rdi),%eax
add    $0x57,%dil
cmp    $0x3a,%al
movzbl %dil,%ecx
movzbl %al,%eax
cmovae %ecx,%eax
movzbl %al,%edi
jmp    1030 <uart_tx_byte@plt>

LLVM IR (-O0):
define void @print_nibble(i32 %0) {
%2 = alloca i32
%3 = alloca i8
store i32 %0, i32* %2
%4 = load i32, i32* %2
%5 = add i32 %4, 48
%6 = trunc i32 %5 to i8
store i8 %6, i8* %3
%7 = load i8, i8* %3
%8 = zext i8 %7 to i32
%9 = icmp sgt i32 %8, 57
br i1 %9, label %10, label %15
10: ; preds = %1
%11 = load i8, i8* %3
%12 = zext i8 %11 to i32
%13 = add nsw i32 %12, 39
%14 = trunc i32 %13 to i8
store i8 %14, i8* %3
br label %15
15: ; preds = %10, %1
%16 = load i8, i8* %3
%17 = call i32 @uart_tx_byte(i8 zeroext %16)
ret void
}

LLVM IR (-O2):
define void @print_nibble(i32 %0) {
%2 = trunc i32 %0 to i8
%3 = add i8 %2, 48
%4 = icmp ugt i8 %3, 57
%5 = add i8 %2, 87
%6 = select i1 %4, i8 %5, i8 %3
%7 = tail call i32 @uart_tx_byte(i8 zeroext %6)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ EXIT_FAILURE;
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char const *);
int /*<<< orphan*/ stderr;
void yyerror(const char *msg) {
  fprintf(stderr, "Error: %s\n", msg);
  exit(EXIT_FAILURE);
}


x86 assembly (clang, -O0):
<yyerror>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    0x2ead(%rip),%rax
mov    (%rax),%edi
mov    -0x8(%rbp),%rdx
lea    0xec0(%rip),%rsi
call   1030 <fprintf@plt>
mov    0x2e8c(%rip),%rax
mov    (%rax),%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<yyerror>:
push   %rax
mov    %rdi,%rdx
mov    0x2eb5(%rip),%rax
mov    (%rax),%edi
lea    0xecc(%rip),%rsi
call   1030 <fprintf@plt>
mov    0x2e98(%rip),%rax
mov    (%rax),%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [11 x i8] c"Error: %s\0A\00"
@EXIT_FAILURE = global i32 0
define void @yyerror(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i32, i32* @stderr
%4 = load i8*, i8** %2
%5 = call i32 @fprintf(i32 %3, i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), i8* %4)
%6 = load i32, i32* @EXIT_FAILURE
%7 = call i32 @exit(i32 %6)
unreachable
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [11 x i8] c"Error: %s\0A\00"
@EXIT_FAILURE = global i32 0
define void @yyerror(i8* %0) {
%2 = load i32, i32* @stderr
%3 = tail call i32 @fprintf(i32 %2, i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), i8* %0)
%4 = load i32, i32* @EXIT_FAILURE
%5 = tail call i32 @exit(i32 %4)
unreachable
}
/* Type definitions */
typedef int __u16;

/* Variables and functions */
int hea_u16_bit(int);
__u16 hea_set_u16_bit(__u16 v, int b) { return v | hea_u16_bit(b); }


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

x86 assembly (clang, -O2):
<hea_set_u16_bit>:
push   %rbx
mov    %edi,%ebx
mov    %esi,%edi
call   1030 <hea_u16_bit@plt>
or     %ebx,%eax
pop    %rbx
ret

LLVM IR (-O0):
define i32 @hea_set_u16_bit(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 @hea_u16_bit(i32 %6)
%8 = or i32 %5, %7
ret i32 %8
}

LLVM IR (-O2):
define i32 @hea_set_u16_bit(i32 %0, i32 %1) {
%3 = tail call i32 @hea_u16_bit(i32 %1)
%4 = or i32 %3, %0
ret i32 %4
}
/* Variables and functions */
int dos_change_cwd(int /*<<< orphan*/);
int /*<<< orphan*/ getstr(int, int);
int dos_change_dir(int addr) { return dos_change_cwd(getstr(addr, 63)); }


x86 assembly (clang, -O0):
<dos_change_dir>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
mov    $0x3f,%esi
call   1030 <getstr@plt>
mov    %eax,%edi
call   1040 <dos_change_cwd@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<dos_change_dir>:
push   %rax
mov    $0x3f,%esi
call   1030 <getstr@plt>
mov    %eax,%edi
pop    %rax
jmp    1040 <dos_change_cwd@plt>

LLVM IR (-O0):
define i32 @dos_change_dir(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = call i32 @getstr(i32 %3, i32 63)
%5 = call i32 @dos_change_cwd(i32 %4)
ret i32 %5
}

LLVM IR (-O2):
define i32 @dos_change_dir(i32 %0) {
%2 = tail call i32 @getstr(i32 %0, i32 63)
%3 = tail call i32 @dos_change_cwd(i32 %2)
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ isprint(int);
void t_isprint_0x90() {
  Assert_real((isprint(144) == 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",
              725, ("isprint should be 0 for 0x90"));
}


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

x86 assembly (clang, -O2):
<t_isprint_0x90>:
push   %rax
mov    $0x90,%edi
call   1030 <isprint@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf66(%rip),%rcx
mov    $0x2d5,%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 0x90\00"
define void @t_isprint_0x90() {
%1 = call i64 @isprint(i32 144)
%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 725, 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 0x90\00"
define void @t_isprint_0x90() {
%1 = tail call i64 @isprint(i32 144)
%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 725, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ put8(int);
void shr_reg64_cl(unsigned int reg64) {
  put8(0x48);
  put8(0xD3);
  put8(0xE8 + reg64);
}


x86 assembly (clang, -O0):
<shr_reg64_cl>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    $0x48,%edi
call   1030 <put8@plt>
mov    $0xd3,%edi
call   1030 <put8@plt>
mov    -0x4(%rbp),%edi
add    $0xe8,%edi
call   1030 <put8@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<shr_reg64_cl>:
push   %rbx
mov    %edi,%ebx
mov    $0x48,%edi
call   1030 <put8@plt>
mov    $0xd3,%edi
call   1030 <put8@plt>
add    $0xe8,%ebx
mov    %ebx,%edi
pop    %rbx
jmp    1030 <put8@plt>

LLVM IR (-O0):
define void @shr_reg64_cl(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = call i32 @put8(i32 72)
%4 = call i32 @put8(i32 211)
%5 = load i32, i32* %2
%6 = add i32 232, %5
%7 = call i32 @put8(i32 %6)
ret void
}

LLVM IR (-O2):
define void @shr_reg64_cl(i32 %0) {
%2 = tail call i32 @put8(i32 72)
%3 = tail call i32 @put8(i32 211)
%4 = add i32 %0, 232
%5 = tail call i32 @put8(i32 %4)
ret void
}
void I420Scale_16() {}


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

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

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

LLVM IR (-O2):
define void @I420Scale_16() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ reduced(int /*<<< orphan*/, double, int /*<<< orphan*/,
                           double, int /*<<< orphan*/);
int main(void) { reduced(0, 0.0, 0, 0.0, 0); }


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
xor    %edx,%edx
xorps  %xmm1,%xmm1
mov    %edx,%edi
movaps %xmm1,%xmm0
mov    %edx,%esi
call   1030 <reduced@plt>
xor    %eax,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
xorps  %xmm0,%xmm0
xorps  %xmm1,%xmm1
xor    %edi,%edi
xor    %esi,%esi
xor    %edx,%edx
call   1030 <reduced@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @main() {
%1 = call i32 @reduced(i32 0, double 0.000000e+00, i32 0, double 0.000000e+00, i32 0)
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 @reduced(i32 0, double 0.000000e+00, i32 0, double 0.000000e+00, i32 0)
ret i32 0
}
void BN_mod_sqr(void) {}


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

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

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

LLVM IR (-O2):
define void @BN_mod_sqr() {
ret void
}
/* Variables and functions */
int strlen(char *);
char *strstr(char *, char *);
char *matchNext(char *message, char *target) {
  char *start = message;
  start = strstr(start, target);
  if (start == NULL) {
    return start;
  }
  start[0] = '\000';
  return start + strlen(target);
}


x86 assembly (clang, -O0):
<matchNext>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x20(%rbp)
mov    -0x20(%rbp),%rdi
mov    -0x18(%rbp),%rsi
call   1040 <strstr@plt>
mov    %rax,-0x20(%rbp)
cmpq   $0x0,-0x20(%rbp)
jne    1161 <matchNext+0x41>
mov    -0x20(%rbp),%rax
mov    %rax,-0x8(%rbp)
jmp    1189 <matchNext+0x69>
mov    -0x20(%rbp),%rax
movb   $0x0,(%rax)
mov    -0x20(%rbp),%rax
mov    %rax,-0x28(%rbp)
mov    -0x18(%rbp),%rdi
call   1030 <strlen@plt>
mov    %eax,%ecx
mov    -0x28(%rbp),%rax
movslq %ecx,%rcx
add    %rcx,%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<matchNext>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%r14
call   1040 <strstr@plt>
test   %rax,%rax
je     1146 <matchNext+0x26>
mov    %rax,%rbx
movb   $0x0,(%rax)
mov    %r14,%rdi
call   1030 <strlen@plt>
cltq
add    %rbx,%rax
jmp    1148 <matchNext+0x28>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

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

LLVM IR (-O2):
define i8* @matchNext(i8* %0, i8* %1) {
%3 = tail call i8* @strstr(i8* dereferenceable(1) %0, i8* dereferenceable(1) %1)
%4 = icmp eq i8* %3, null
br i1 %4, label %9, label %5
5: ; preds = %2
store i8 0, i8* %3
%6 = tail call i32 @strlen(i8* %1)
%7 = sext i32 %6 to i64
%8 = getelementptr inbounds i8, i8* %3, i64 %7
br label %9
9: ; preds = %2, %5
%10 = phi i8* [ %8, %5 ], [ null, %2 ]
ret i8* %10
}
/* Type definitions */
typedef int pid_t;

/* Variables and functions */
pid_t __attribute__((section("libgloss_epiphany"))) _getpid(void) { return 1; }


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

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

LLVM IR (-O0):
define i32 @_getpid() section "libgloss_epiphany" {
ret i32 1
}

LLVM IR (-O2):
define i32 @_getpid() section "libgloss_epiphany" {
ret i32 1
}
/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
scalar_t__ reduce_stack(int);
int /*<<< orphan*/ stderr;
int vm_free(int n) {
  if (reduce_stack(n)) {
    fprintf(stderr, "FREE: stack empty\n");
    return 1;
  }
  return 0;
}


x86 assembly (clang, -O0):
<vm_free>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
mov    -0x8(%rbp),%edi
call   1030 <reduce_stack@plt>
cmp    $0x0,%rax
je     115e <vm_free+0x3e>
mov    0x2e9c(%rip),%rax
mov    (%rax),%edi
lea    0xeb3(%rip),%rsi
call   1040 <fprintf@plt>
movl   $0x1,-0x4(%rbp)
jmp    1165 <vm_free+0x45>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<vm_free>:
push   %rax
call   1030 <reduce_stack@plt>
test   %rax,%rax
je     1147 <vm_free+0x27>
mov    0x2eae(%rip),%rax
mov    (%rax),%edi
lea    0xec5(%rip),%rsi
call   1040 <fprintf@plt>
mov    $0x1,%eax
pop    %rcx
ret
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@stderr = global i32 0
@.str = [19 x i8] c"FREE: stack empty\0A\00"
define i32 @vm_free(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %3
%4 = load i32, i32* %3
%5 = call i64 @reduce_stack(i32 %4)
%6 = icmp ne i64 %5, 0
br i1 %6, label %7, label %10
7: ; preds = %1
%8 = load i32, i32* @stderr
%9 = call i32 @fprintf(i32 %8, i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0))
store i32 1, i32* %2
br label %11
10: ; preds = %1
store i32 0, i32* %2
br label %11
11: ; preds = %10, %7
%12 = load i32, i32* %2
ret i32 %12
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [19 x i8] c"FREE: stack empty\0A\00"
define i32 @vm_free(i32 %0) {
%2 = tail call i64 @reduce_stack(i32 %0)
%3 = icmp eq i64 %2, 0
br i1 %3, label %7, label %4
4: ; preds = %1
%5 = load i32, i32* @stderr
%6 = tail call i32 @fprintf(i32 %5, i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0))
br label %7
7: ; preds = %1, %4
%8 = phi i32 [ 1, %4 ], [ 0, %1 ]
ret i32 %8
}
double sys_scale() {}


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

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

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

LLVM IR (-O2):
define double @sys_scale() {
ret double undef
}