xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ glmOr3s(int *, int *, int);
void glmOr3s_(bool x[3], bool y) { glmOr3s(x, x, y); }


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

x86 assembly (clang, -O2):
<glmOr3s_>:
mov    %esi,%edx
mov    %rdi,%rsi
jmp    1030 <glmOr3s@plt>

LLVM IR (-O0):
define void @glmOr3s_(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** %3
%7 = load i32, i32* %4
%8 = call i32 @glmOr3s(i32* %5, i32* %6, i32 %7)
ret void
}

LLVM IR (-O2):
define void @glmOr3s_(i32* %0, i32 %1) {
%3 = tail call i32 @glmOr3s(i32* %0, i32* %0, i32 %1)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int main(void) {
  printf("Hello World\n");
  printf("My name is Humberto Atondo Martin del Campo \n");
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeda(%rip),%rdi
call   1030 <printf@plt>
lea    0xedb(%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 <puts@plt>
lea    0xee8(%rip),%rdi
call   1030 <puts@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [13 x i8] c"Hello World\0A\00"
@.str.1 = [46 x i8] c"My name is Humberto Atondo Martin del Campo \0A\00"
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0))
%3 = call i32 @printf(i8* getelementptr inbounds ([46 x i8], [46 x i8]* @.str.1, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@str = [12 x i8] c"Hello World\00"
@str.2 = [45 x i8] c"My name is Humberto Atondo Martin del Campo \00"
define i32 @main() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([12 x i8], [12 x i8]* @str, i64 0, i64 0))
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([45 x i8], [45 x i8]* @str.2, i64 0, i64 0))
ret i32 0
}
unsigned kol_system_time_get() { asm("int $0x40" ::"a"(3)); }


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

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

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

LLVM IR (-O2):
define i32 @kol_system_time_get() {
tail call void asm sideeffect "int $$0x40", "{ax},~{dirflag},~{fpsr},~{flags}"(i32 3)
ret i32 undef
}
int setBit(int x, int i) { return (x | (1 << (i - 1))); }


x86 assembly (clang, -O0):
<setBit>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
mov    -0x8(%rbp),%ecx
sub    $0x1,%ecx
mov    $0x1,%edx
shl    %cl,%edx
mov    %edx,%ecx
or     %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<setBit>:
mov    %edi,%eax
add    $0xff,%sil
bts    %esi,%eax
ret

LLVM IR (-O0):
define i32 @setBit(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 = sub nsw i32 %6, 1
%8 = shl i32 1, %7
%9 = or i32 %5, %8
ret i32 %9
}

LLVM IR (-O2):
define i32 @setBit(i32 %0, i32 %1) {
%3 = add nsw i32 %1, -1
%4 = shl nuw i32 1, %3
%5 = or i32 %4, %0
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ __print_int(int);
int main() {
  int i;
  int a = 2;
  for (i = 0; i < 5; i++) {
    a = a * 2;
  }
  __print_int(a);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x2,-0xc(%rbp)
movl   $0x0,-0x8(%rbp)
cmpl   $0x5,-0x8(%rbp)
jge    114e <main+0x3e>
mov    -0xc(%rbp),%eax
shl    $0x1,%eax
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    112d <main+0x1d>
mov    -0xc(%rbp),%edi
call   1030 <__print_int@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 @__print_int(i32 64)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ g(int, int);
int /*<<< orphan*/ send_addr(int *);
int f(int a) {
  if (a > 0)
    g(a, 3);
  else
    g(a, 5);
  send_addr(&a);
}


x86 assembly (clang, -O0):
<f>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
cmpl   $0x0,-0x8(%rbp)
jle    1147 <f+0x27>
mov    -0x8(%rbp),%edi
mov    $0x3,%esi
call   1040 <g@plt>
jmp    1154 <f+0x34>
mov    -0x8(%rbp),%edi
mov    $0x5,%esi
call   1040 <g@plt>
lea    -0x8(%rbp),%rdi
call   1030 <send_addr@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<f>:
push   %rax
mov    %edi,0x4(%rsp)
xor    %eax,%eax
test   %edi,%edi
setle  %al
lea    (%rax,%rax,1),%esi
add    $0x3,%esi
call   1040 <g@plt>
lea    0x4(%rsp),%rdi
call   1030 <send_addr@plt>
pop    %rcx
ret

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

LLVM IR (-O2):
define i32 @f(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = icmp sgt i32 %0, 0
%4 = select i1 %3, i32 3, i32 5
%5 = tail call i32 @g(i32 %0, i32 %4)
%6 = call i32 @send_addr(i32* %2)
ret i32 undef
}
/* Type definitions */
struct stream {
  int dummy;
};

/* Variables and functions */
char efp_stream_current_char(struct stream *);
int /*<<< orphan*/ efp_stream_skip_nonspace(struct stream *);
int /*<<< orphan*/ efp_stream_skip_space(struct stream *);
int skip_label(struct stream *stream) {
  efp_stream_skip_space(stream);
  efp_stream_skip_nonspace(stream);
  return efp_stream_current_char(stream) != '\0';
}


x86 assembly (clang, -O0):
<skip_label>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1050 <efp_stream_skip_space@plt>
mov    -0x8(%rbp),%rdi
call   1030 <efp_stream_skip_nonspace@plt>
mov    -0x8(%rbp),%rdi
call   1040 <efp_stream_current_char@plt>
movsbl %al,%eax
cmp    $0x0,%eax
setne  %al
and    $0x1,%al
movzbl %al,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<skip_label>:
push   %rbx
mov    %rdi,%rbx
call   1050 <efp_stream_skip_space@plt>
mov    %rbx,%rdi
call   1030 <efp_stream_skip_nonspace@plt>
mov    %rbx,%rdi
call   1040 <efp_stream_current_char@plt>
xor    %ecx,%ecx
test   %al,%al
setne  %cl
mov    %ecx,%eax
pop    %rbx
ret

LLVM IR (-O0):
%struct.stream = type { i32 }
define i32 @skip_label(%struct.stream* %0) {
%2 = alloca %struct.stream*
store %struct.stream* %0, %struct.stream** %2
%3 = load %struct.stream*, %struct.stream** %2
%4 = call i32 @efp_stream_skip_space(%struct.stream* %3)
%5 = load %struct.stream*, %struct.stream** %2
%6 = call i32 @efp_stream_skip_nonspace(%struct.stream* %5)
%7 = load %struct.stream*, %struct.stream** %2
%8 = call signext i8 @efp_stream_current_char(%struct.stream* %7)
%9 = sext i8 %8 to i32
%10 = icmp ne i32 %9, 0
%11 = zext i1 %10 to i32
ret i32 %11
}

LLVM IR (-O2):
%struct.stream = type { i32 }
define i32 @skip_label(%struct.stream* %0) {
%2 = tail call i32 @efp_stream_skip_space(%struct.stream* %0)
%3 = tail call i32 @efp_stream_skip_nonspace(%struct.stream* %0)
%4 = tail call signext i8 @efp_stream_current_char(%struct.stream* %0)
%5 = icmp ne i8 %4, 0
%6 = zext i1 %5 to i32
ret i32 %6
}
/* Variables and functions */
int /*<<< orphan*/ __fpurge(int /*<<< orphan*/);
int /*<<< orphan*/ fgets(char *, int, int /*<<< orphan*/);
int /*<<< orphan*/ stdin;
size_t strcspn(char *, char *);
void readString2(char variable[], int stringLength) {
  fgets(variable, stringLength, stdin);
  variable[strcspn(variable, "\n")] = '\0';
  __fpurge(stdin);
}


x86 assembly (clang, -O0):
<readString2>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
mov    0x2e9b(%rip),%rax
mov    (%rax),%edx
call   1050 <fgets@plt>
mov    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x8(%rbp),%rdi
lea    0xe99(%rip),%rsi
call   1040 <strcspn@plt>
mov    %rax,%rcx
mov    -0x18(%rbp),%rax
movb   $0x0,(%rax,%rcx,1)
mov    0x2e6a(%rip),%rax
mov    (%rax),%edi
call   1030 <__fpurge@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<readString2>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%rbx
mov    0x2eaa(%rip),%r14
mov    (%r14),%edx
call   1050 <fgets@plt>
lea    0xeb3(%rip),%rsi
mov    %rbx,%rdi
call   1040 <strcspn@plt>
movb   $0x0,(%rbx,%rax,1)
mov    (%r14),%edi
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1030 <__fpurge@plt>

LLVM IR (-O0):
@stdin = global i32 0
@.str = [2 x i8] c"\0A\00"
define void @readString2(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i32
store i8* %0, i8** %3
store i32 %1, i32* %4
%5 = load i8*, i8** %3
%6 = load i32, i32* %4
%7 = load i32, i32* @stdin
%8 = call i32 @fgets(i8* %5, i32 %6, i32 %7)
%9 = load i8*, i8** %3
%10 = load i8*, i8** %3
%11 = call i64 @strcspn(i8* %10, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
%12 = getelementptr inbounds i8, i8* %9, i64 %11
store i8 0, i8* %12
%13 = load i32, i32* @stdin
%14 = call i32 @__fpurge(i32 %13)
ret void
}

LLVM IR (-O2):
@stdin = global i32 0
@.str = [2 x i8] c"\0A\00"
define void @readString2(i8* %0, i32 %1) {
%3 = load i32, i32* @stdin
%4 = tail call i32 @fgets(i8* %0, i32 %1, i32 %3)
%5 = tail call i64 @strcspn(i8* %0, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
%6 = getelementptr inbounds i8, i8* %0, i64 %5
store i8 0, i8* %6
%7 = load i32, i32* @stdin
%8 = tail call i32 @__fpurge(i32 %7)
ret void
}
/* Type definitions */
typedef int uint8_t;

/* Variables and functions */
uint8_t av_clip_uint8_c(int a) {
  if (a & (~0xFF))
    return (-a) >> 31;
  else
    return a;
}


x86 assembly (clang, -O0):
<av_clip_uint8_c>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
mov    -0x8(%rbp),%eax
and    $0xffffff00,%eax
cmp    $0x0,%eax
je     1128 <av_clip_uint8_c+0x28>
xor    %eax,%eax
sub    -0x8(%rbp),%eax
sar    $0x1f,%eax
mov    %eax,-0x4(%rbp)
jmp    112e <av_clip_uint8_c+0x2e>
mov    -0x8(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<av_clip_uint8_c>:
xor    %eax,%eax
test   %edi,%edi
setg   %al
neg    %eax
cmp    $0x100,%edi
cmovb  %edi,%eax
ret

LLVM IR (-O0):
define i32 @av_clip_uint8_c(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %3
%4 = load i32, i32* %3
%5 = and i32 %4, -256
%6 = icmp ne i32 %5, 0
br i1 %6, label %7, label %11
7: ; preds = %1
%8 = load i32, i32* %3
%9 = sub nsw i32 0, %8
%10 = ashr i32 %9, 31
store i32 %10, i32* %2
br label %13
11: ; preds = %1
%12 = load i32, i32* %3
store i32 %12, i32* %2
br label %13
13: ; preds = %11, %7
%14 = load i32, i32* %2
ret i32 %14
}

LLVM IR (-O2):
define i32 @av_clip_uint8_c(i32 %0) {
%2 = icmp ult i32 %0, 256
%3 = icmp sgt i32 %0, 0
%4 = sext i1 %3 to i32
%5 = select i1 %2, i32 %0, i32 %4
ret i32 %5
}
void ff_hevc_put_hevc_bi_qpel_v24_8_sse4() {}


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

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

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

LLVM IR (-O2):
define void @ff_hevc_put_hevc_bi_qpel_v24_8_sse4() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ PF_INET;
int /*<<< orphan*/ SOCK_STREAM;
int /*<<< orphan*/ error(char *);
int socket(int /*<<< orphan*/, int /*<<< orphan*/, int /*<<< orphan*/);
int open_listener_socket() {
  int s = socket(PF_INET, SOCK_STREAM, 0);
  if (s == -1)
    error("Unable to create a socket");
  return s;
}


x86 assembly (clang, -O0):
<open_listener_socket>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    0x2ea9(%rip),%rax
mov    (%rax),%edi
mov    0x2ea8(%rip),%rax
mov    (%rax),%esi
xor    %edx,%edx
call   1040 <socket@plt>
mov    %eax,-0x4(%rbp)
cmpl   $0xffffffff,-0x4(%rbp)
jne    115a <open_listener_socket+0x3a>
lea    0xeab(%rip),%rdi
call   1030 <error@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<open_listener_socket>:
push   %rbx
mov    0x2eb0(%rip),%rax
mov    (%rax),%edi
mov    0x2eaf(%rip),%rax
mov    (%rax),%esi
xor    %edx,%edx
call   1040 <socket@plt>
mov    %eax,%ebx
cmp    $0xffffffff,%eax
jne    114d <open_listener_socket+0x2d>
lea    0xeb8(%rip),%rdi
call   1030 <error@plt>
mov    %ebx,%eax
pop    %rbx
ret

LLVM IR (-O0):
@PF_INET = global i32 0
@SOCK_STREAM = global i32 0
@.str = [26 x i8] c"Unable to create a socket\00"
define i32 @open_listener_socket() {
%1 = alloca i32
%2 = load i32, i32* @PF_INET
%3 = load i32, i32* @SOCK_STREAM
%4 = call i32 @socket(i32 %2, i32 %3, i32 0)
store i32 %4, i32* %1
%5 = load i32, i32* %1
%6 = icmp eq i32 %5, -1
br i1 %6, label %7, label %9
7: ; preds = %0
%8 = call i32 @error(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str, i64 0, i64 0))
br label %9
9: ; preds = %7, %0
%10 = load i32, i32* %1
ret i32 %10
}

LLVM IR (-O2):
@PF_INET = global i32 0
@SOCK_STREAM = global i32 0
@.str = [26 x i8] c"Unable to create a socket\00"
define i32 @open_listener_socket() {
%1 = load i32, i32* @PF_INET
%2 = load i32, i32* @SOCK_STREAM
%3 = tail call i32 @socket(i32 %1, i32 %2, i32 0)
%4 = icmp eq i32 %3, -1
br i1 %4, label %5, label %7
5: ; preds = %0
%6 = tail call i32 @error(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str, i64 0, i64 0))
br label %7
7: ; preds = %5, %0
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ isbdigit(int);
void t_isbdigit_0xde() {
  Assert_real((isbdigit(222) == 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_isbdigit.c",
              1115, ("isbdigit should be 0 for 0xde"));
}


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

x86 assembly (clang, -O2):
<t_isbdigit_0xde>:
push   %rax
mov    $0xde,%edi
call   1040 <isbdigit@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf67(%rip),%rcx
mov    $0x45b,%edx
pop    %rax
jmp    1030 <Assert_real@plt>

LLVM IR (-O0):
@.str = [169 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_isbdigit.c\00"
@.str.1 = [30 x i8] c"isbdigit should be 0 for 0xde\00"
define void @t_isbdigit_0xde() {
%1 = call i64 @isbdigit(i32 222)
%2 = icmp eq i64 %1, 0
%3 = zext i1 %2 to i32
%4 = call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([169 x i8], [169 x i8]* @.str, i64 0, i64 0), i32 1115, i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [169 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_isbdigit.c\00"
@.str.1 = [30 x i8] c"isbdigit should be 0 for 0xde\00"
define void @t_isbdigit_0xde() {
%1 = tail call i64 @isbdigit(i32 222)
%2 = icmp eq i64 %1, 0
%3 = zext i1 %2 to i32
%4 = tail call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([169 x i8], [169 x i8]* @.str, i64 0, i64 0), i32 1115, i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.1, i64 0, i64 0))
ret void
}
void gentestl() {}


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

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

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

LLVM IR (-O2):
define void @gentestl() {
ret void
}
void create_spin_CW(int speed) {}


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

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

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

LLVM IR (-O2):
define void @create_spin_CW(i32 %0) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ yas_lis3dh_write_reg_byte(int, int);
int yas_lis3dh_power_down(void) {
  yas_lis3dh_write_reg_byte(0x20, 0x07);
  yas_lis3dh_write_reg_byte(0x23, 0);
  return (0);
}


x86 assembly (clang, -O0):
<yas_lis3dh_power_down>:
push   %rbp
mov    %rsp,%rbp
mov    $0x20,%edi
mov    $0x7,%esi
call   1030 <yas_lis3dh_write_reg_byte@plt>
mov    $0x23,%edi
xor    %esi,%esi
call   1030 <yas_lis3dh_write_reg_byte@plt>
xor    %eax,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<yas_lis3dh_power_down>:
push   %rax
mov    $0x20,%edi
mov    $0x7,%esi
call   1030 <yas_lis3dh_write_reg_byte@plt>
mov    $0x23,%edi
xor    %esi,%esi
call   1030 <yas_lis3dh_write_reg_byte@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @yas_lis3dh_power_down() {
%1 = call i32 @yas_lis3dh_write_reg_byte(i32 32, i32 7)
%2 = call i32 @yas_lis3dh_write_reg_byte(i32 35, i32 0)
ret i32 0
}

LLVM IR (-O2):
define i32 @yas_lis3dh_power_down() {
%1 = tail call i32 @yas_lis3dh_write_reg_byte(i32 32, i32 7)
%2 = tail call i32 @yas_lis3dh_write_reg_byte(i32 35, i32 0)
ret i32 0
}
signed short d_getsw(register const unsigned char *ptr) {
  return (((signed short)ptr[0] << 8) | ((unsigned short)ptr[1] << 0));
}


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

x86 assembly (clang, -O2):
<d_getsw>:
movzwl (%rdi),%eax
rol    $0x8,%ax
ret

LLVM IR (-O0):
define signext i16 @d_getsw(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 i16
%7 = sext i16 %6 to i32
%8 = shl i32 %7, 8
%9 = load i8*, i8** %2
%10 = getelementptr inbounds i8, i8* %9, i64 1
%11 = load i8, i8* %10
%12 = zext i8 %11 to i16
%13 = zext i16 %12 to i32
%14 = shl i32 %13, 0
%15 = or i32 %8, %14
%16 = trunc i32 %15 to i16
ret i16 %16
}

LLVM IR (-O2):
define signext i16 @d_getsw(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = zext i8 %2 to i16
%4 = shl nuw i16 %3, 8
%5 = getelementptr inbounds i8, i8* %0, i64 1
%6 = load i8, i8* %5
%7 = zext i8 %6 to i16
%8 = or i16 %4, %7
ret i16 %8
}
int main() {
  int x = 1;
  int i;
  for (i = 0; i < 100000000; i++) {
    x = x * 2;
    x = x * 64;
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
movl   $0x0,-0x4(%rbp)
movl   $0x1,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
cmpl   $0x5f5e100,-0xc(%rbp)
jge    1146 <main+0x46>
mov    -0x8(%rbp),%eax
shl    $0x1,%eax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
shl    $0x6,%eax
mov    %eax,-0x8(%rbp)
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1119 <main+0x19>
xor    %eax,%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @main() {
ret i32 0
}
/* Type definitions */
typedef int /*<<< orphan*/ posix_spawnattr_t;

/* Variables and functions */
int /*<<< orphan*/ ENOSYS;
int /*<<< orphan*/ errno;
int posix_spawnattr_getschedpolicy(const posix_spawnattr_t *attr,
                                   int *schedpolicy) {
  ;
  errno = ENOSYS;
  return -1;
  ;
}


x86 assembly (clang, -O0):
<posix_spawnattr_getschedpolicy>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    0x2ed5(%rip),%rax
mov    (%rax),%ecx
mov    0x2ebc(%rip),%rax
mov    %ecx,(%rax)
mov    $0xffffffff,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<posix_spawnattr_getschedpolicy>:
mov    0x2ee1(%rip),%rax
mov    (%rax),%eax
mov    0x2ec8(%rip),%rcx
mov    %eax,(%rcx)
mov    $0xffffffff,%eax
ret

LLVM IR (-O0):
@ENOSYS = global i32 0
@errno = global i32 0
define i32 @posix_spawnattr_getschedpolicy(i32* %0, i32* %1) {
%3 = alloca i32*
%4 = alloca i32*
store i32* %0, i32** %3
store i32* %1, i32** %4
%5 = load i32, i32* @ENOSYS
store i32 %5, i32* @errno
ret i32 -1
}

LLVM IR (-O2):
@ENOSYS = global i32 0
@errno = global i32 0
define i32 @posix_spawnattr_getschedpolicy(i32* nocapture readnone %0, i32* nocapture readnone %1) {
%3 = load i32, i32* @ENOSYS
store i32 %3, i32* @errno
ret i32 -1
}
/* Variables and functions */
scalar_t__ convertBCD(int, unsigned int);
char CHAR2BCD2(char input) { return (char)convertBCD(3, (unsigned int)input); }


x86 assembly (clang, -O0):
<CHAR2BCD2>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movsbl -0x1(%rbp),%esi
mov    $0x3,%edi
call   1030 <convertBCD@plt>
movsbl %al,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<CHAR2BCD2>:
push   %rax
mov    %edi,%esi
mov    $0x3,%edi
call   1030 <convertBCD@plt>
pop    %rcx
ret

LLVM IR (-O0):
define signext i8 @CHAR2BCD2(i8 signext %0) {
%2 = alloca i8
store i8 %0, i8* %2
%3 = load i8, i8* %2
%4 = sext i8 %3 to i32
%5 = call i64 @convertBCD(i32 3, i32 %4)
%6 = trunc i64 %5 to i8
ret i8 %6
}

LLVM IR (-O2):
define signext i8 @CHAR2BCD2(i8 signext %0) {
%2 = sext i8 %0 to i32
%3 = tail call i64 @convertBCD(i32 3, i32 %2)
%4 = trunc i64 %3 to i8
ret i8 %4
}
/* Variables and functions */
int /*<<< orphan*/ acos(int);
int glmComputeVectorLength3d(double const *);
double glmDegd(int /*<<< orphan*/);
int glmDotProduct3d(double const *, double const *);
double glmComputeVectorAngle3dDeg(const double v1[3], const double v2[3]) {
  return glmDegd(
      acos(glmDotProduct3d(v1, v2) /
           (glmComputeVectorLength3d(v1) * glmComputeVectorLength3d(v2))));
}


x86 assembly (clang, -O0):
<glmComputeVectorAngle3dDeg>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1050 <glmDotProduct3d@plt>
mov    %eax,-0x14(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <glmComputeVectorLength3d@plt>
mov    %eax,-0x18(%rbp)
mov    -0x10(%rbp),%rdi
call   1030 <glmComputeVectorLength3d@plt>
mov    -0x18(%rbp),%ecx
mov    %eax,%edx
mov    -0x14(%rbp),%eax
imul   %edx,%ecx
cltd
idiv   %ecx
mov    %eax,%edi
call   1040 <acos@plt>
mov    %eax,%edi
call   1060 <glmDegd@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<glmComputeVectorAngle3dDeg>:
push   %rbp
push   %r14
push   %rbx
mov    %rsi,%r14
mov    %rdi,%rbx
call   1050 <glmDotProduct3d@plt>
mov    %eax,%ebp
mov    %rbx,%rdi
call   1030 <glmComputeVectorLength3d@plt>
mov    %eax,%ebx
mov    %r14,%rdi
call   1030 <glmComputeVectorLength3d@plt>
mov    %eax,%ecx
imul   %ebx,%ecx
mov    %ebp,%eax
cltd
idiv   %ecx
mov    %eax,%edi
call   1040 <acos@plt>
mov    %eax,%edi
pop    %rbx
pop    %r14
pop    %rbp
jmp    1060 <glmDegd@plt>

LLVM IR (-O0):
define double @glmComputeVectorAngle3dDeg(double* %0, double* %1) {
%3 = alloca double*
%4 = alloca double*
store double* %0, double** %3
store double* %1, double** %4
%5 = load double*, double** %3
%6 = load double*, double** %4
%7 = call i32 @glmDotProduct3d(double* %5, double* %6)
%8 = load double*, double** %3
%9 = call i32 @glmComputeVectorLength3d(double* %8)
%10 = load double*, double** %4
%11 = call i32 @glmComputeVectorLength3d(double* %10)
%12 = mul nsw i32 %9, %11
%13 = sdiv i32 %7, %12
%14 = call i32 @acos(i32 %13)
%15 = call double @glmDegd(i32 %14)
ret double %15
}

LLVM IR (-O2):
define double @glmComputeVectorAngle3dDeg(double* %0, double* %1) {
%3 = tail call i32 @glmDotProduct3d(double* %0, double* %1)
%4 = tail call i32 @glmComputeVectorLength3d(double* %0)
%5 = tail call i32 @glmComputeVectorLength3d(double* %1)
%6 = mul nsw i32 %5, %4
%7 = sdiv i32 %3, %6
%8 = tail call i32 @acos(i32 %7)
%9 = tail call double @glmDegd(i32 %8)
ret double %9
}
/* Type definitions */
typedef int uint;

/* Variables and functions */
int digits(uint d) {
  uint r = 0;
  while (d >= 10) {
    r++;
    d /= 10;
  }
  if (d > 0)
    r++;
  return r;
}


x86 assembly (clang, -O0):
<digits>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
cmpl   $0xa,-0x4(%rbp)
jl     1134 <digits+0x34>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
mov    -0x4(%rbp),%eax
mov    $0xa,%ecx
cltd
idiv   %ecx
mov    %eax,-0x4(%rbp)
jmp    110e <digits+0xe>
cmpl   $0x0,-0x4(%rbp)
jle    1147 <digits+0x47>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<digits>:
xor    %ecx,%ecx
cmp    $0xa,%edi
jl     1126 <digits+0x26>
xor    %ecx,%ecx
mov    $0xcccccccd,%eax
xchg   %ax,%ax
add    $0x1,%ecx
mov    %edi,%edx
imul   %rax,%rdx
shr    $0x23,%rdx
cmp    $0x63,%edi
mov    %edx,%edi
ja     1110 <digits+0x10>
jmp    1128 <digits+0x28>
mov    %edi,%edx
xor    %eax,%eax
test   %edx,%edx
setg   %al
add    %ecx,%eax
ret

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

LLVM IR (-O2):
define i32 @digits(i32 %0) {
%2 = icmp sgt i32 %0, 9
br i1 %2, label %3, label %9
3: ; preds = %1, %3
%4 = phi i32 [ %6, %3 ], [ 0, %1 ]
%5 = phi i32 [ %7, %3 ], [ %0, %1 ]
%6 = add nuw nsw i32 %4, 1
%7 = udiv i32 %5, 10
%8 = icmp ugt i32 %5, 99
br i1 %8, label %3, label %9
9: ; preds = %3, %1
%10 = phi i32 [ %0, %1 ], [ %7, %3 ]
%11 = phi i32 [ 0, %1 ], [ %6, %3 ]
%12 = icmp sgt i32 %10, 0
%13 = zext i1 %12 to i32
%14 = add nuw nsw i32 %11, %13
ret i32 %14
}
struct thread *get_current(void) {
  struct thread **current;
  register unsigned long sp asm("rsp");
  current = (void *)(sp & ~8191UL);
  return *current;
}


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

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

LLVM IR (-O0):
%struct.thread = type opaque
define %struct.thread* @get_current() {
%1 = alloca %struct.thread**
%2 = alloca i64
%3 = load i64, i64* %2
%4 = and i64 %3, -8192
%5 = inttoptr i64 %4 to i8*
%6 = bitcast i8* %5 to %struct.thread**
store %struct.thread** %6, %struct.thread*** %1
%7 = load %struct.thread**, %struct.thread*** %1
%8 = load %struct.thread*, %struct.thread** %7
ret %struct.thread* %8
}

LLVM IR (-O2):
%struct.thread = type opaque
define noalias %struct.thread* @get_current() {
ret %struct.thread* undef
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ fputc(int, int /*<<< orphan*/ *);
void Putword(int w, FILE *fp) {
  fputc(w & 0xff, fp);
  fputc((w / 256) & 0xff, fp);
}


x86 assembly (clang, -O0):
<Putword>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x4(%rbp),%edi
and    $0xff,%edi
mov    -0x10(%rbp),%rsi
call   1030 <fputc@plt>
mov    -0x4(%rbp),%eax
mov    $0x100,%ecx
cltd
idiv   %ecx
mov    %eax,%edi
and    $0xff,%edi
mov    -0x10(%rbp),%rsi
call   1030 <fputc@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Putword>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%r14
mov    %edi,%ebx
movzbl %bl,%edi
call   1030 <fputc@plt>
lea    0xff(%rbx),%eax
test   %ebx,%ebx
cmovns %ebx,%eax
movzbl %ah,%edi
mov    %r14,%rsi
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1030 <fputc@plt>

LLVM IR (-O0):
define void @Putword(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 = and i32 %5, 255
%7 = load i32*, i32** %4
%8 = call i32 @fputc(i32 %6, i32* %7)
%9 = load i32, i32* %3
%10 = sdiv i32 %9, 256
%11 = and i32 %10, 255
%12 = load i32*, i32** %4
%13 = call i32 @fputc(i32 %11, i32* %12)
ret void
}

LLVM IR (-O2):
define void @Putword(i32 %0, i32* nocapture %1) {
%3 = and i32 %0, 255
%4 = tail call i32 @fputc(i32 %3, i32* %1)
%5 = sdiv i32 %0, 256
%6 = and i32 %5, 255
%7 = tail call i32 @fputc(i32 %6, i32* %1)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ ls_handler(int /*<<< orphan*/ *);
int /*<<< orphan*/ set_handler();
int main() {
  set_handler();
  ls_handler(NULL);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1030 <set_handler@plt>
xor    %eax,%eax
mov    %eax,%edi
call   1040 <ls_handler@plt>
xor    %eax,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @main() {
%1 = call i32 (...) @set_handler()
%2 = call i32 @ls_handler(i32* null)
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @set_handler()
%2 = tail call i32 @ls_handler(i32* null)
ret i32 0
}
void float32Clear(float *data) { *data = 0.0; }


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

x86 assembly (clang, -O2):
<float32Clear>:
movl   $0x0,(%rdi)
ret

LLVM IR (-O0):
define void @float32Clear(float* %0) {
%2 = alloca float*
store float* %0, float** %2
%3 = load float*, float** %2
store float 0.000000e+00, float* %3
ret void
}

LLVM IR (-O2):
define void @float32Clear(float* nocapture writeonly %0) {
store float 0.000000e+00, float* %0
ret void
}
/* Variables and functions */
int /*<<< orphan*/ __enable_irq();
void port_unlock(void) { __enable_irq(); }


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

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

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

LLVM IR (-O2):
define void @port_unlock() {
%1 = tail call i32 (...) @__enable_irq()
ret void
}
/* Variables and functions */
int data_getgold(int);
int weight_gold(int gold, int player) { return gold - data_getgold(player); }


x86 assembly (clang, -O0):
<weight_gold>:
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 <data_getgold@plt>
mov    %eax,%ecx
mov    -0xc(%rbp),%eax
sub    %ecx,%eax
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @weight_gold(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 @data_getgold(i32 %6)
%8 = sub nsw i32 %5, %7
ret i32 %8
}

LLVM IR (-O2):
define i32 @weight_gold(i32 %0, i32 %1) {
%3 = tail call i32 @data_getgold(i32 %1)
%4 = sub nsw i32 %0, %3
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, double, double, double, double);
int handler_result_g01_test(double dx, double dy, double dz, double f) {
  printf("G1 result: dX%f dY%f dZ%f F%f\n", dx, dy, dz, f);
}


x86 assembly (clang, -O0):
<handler_result_g01_test>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movsd  %xmm0,-0x10(%rbp)
movsd  %xmm1,-0x18(%rbp)
movsd  %xmm2,-0x20(%rbp)
movsd  %xmm3,-0x28(%rbp)
movsd  -0x10(%rbp),%xmm0
movsd  -0x18(%rbp),%xmm1
movsd  -0x20(%rbp),%xmm2
movsd  -0x28(%rbp),%xmm3
lea    0xeb9(%rip),%rdi
call   1030 <printf@plt>
mov    -0x4(%rbp),%eax
add    $0x30,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
@.str = [31 x i8] c"G1 result: dX%f dY%f dZ%f F%f\0A\00"
define i32 @handler_result_g01_test(double %0, double %1, double %2, double %3) {
%5 = alloca i32
%6 = alloca double
%7 = alloca double
%8 = alloca double
%9 = alloca double
store double %0, double* %6
store double %1, double* %7
store double %2, double* %8
store double %3, double* %9
%10 = load double, double* %6
%11 = load double, double* %7
%12 = load double, double* %8
%13 = load double, double* %9
%14 = call i32 @printf(i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str, i64 0, i64 0), double %10, double %11, double %12, double %13)
%15 = load i32, i32* %5
ret i32 %15
}

LLVM IR (-O2):
@.str = [31 x i8] c"G1 result: dX%f dY%f dZ%f F%f\0A\00"
define i32 @handler_result_g01_test(double %0, double %1, double %2, double %3) {
%5 = tail call i32 @printf(i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str, i64 0, i64 0), double %0, double %1, double %2, double %3)
ret i32 undef
}
unsigned hash_fn(const char *s, int hashtab_mask) {
  unsigned hashval;
  const char *p;
  for (hashval = 0, p = s; *p; p++)
    hashval = (hashval << 5) + hashval + *p;
  return (hashval & hashtab_mask);
}


x86 assembly (clang, -O0):
<hash_fn>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
movl   $0x0,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rax
cmpb   $0x0,(%rax)
je     114d <hash_fn+0x4d>
mov    -0x10(%rbp),%eax
shl    $0x5,%eax
add    -0x10(%rbp),%eax
mov    -0x18(%rbp),%rcx
movsbl (%rcx),%ecx
add    %ecx,%eax
mov    %eax,-0x10(%rbp)
mov    -0x18(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x18(%rbp)
jmp    111a <hash_fn+0x1a>
mov    -0x10(%rbp),%eax
and    -0xc(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<hash_fn>:
mov    (%rdi),%cl
test   %cl,%cl
je     112a <hash_fn+0x2a>
add    $0x1,%rdi
xor    %eax,%eax
nopl   0x0(%rax)
mov    %eax,%edx
shl    $0x5,%edx
add    %eax,%edx
movsbl %cl,%eax
add    %edx,%eax
movzbl (%rdi),%ecx
add    $0x1,%rdi
test   %cl,%cl
jne    1110 <hash_fn+0x10>
and    %esi,%eax
ret
xor    %eax,%eax
and    %esi,%eax
ret

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

LLVM IR (-O2):
define i32 @hash_fn(i8* nocapture %0, i32 %1) {
%3 = load i8, i8* %0
%4 = icmp eq i8 %3, 0
br i1 %4, label %15, label %5
5: ; preds = %2, %5
%6 = phi i8 [ %13, %5 ], [ %3, %2 ]
%7 = phi i8* [ %12, %5 ], [ %0, %2 ]
%8 = phi i32 [ %11, %5 ], [ 0, %2 ]
%9 = mul i32 %8, 33
%10 = sext i8 %6 to i32
%11 = add i32 %9, %10
%12 = getelementptr inbounds i8, i8* %7, i64 1
%13 = load i8, i8* %12
%14 = icmp eq i8 %13, 0
br i1 %14, label %15, label %5
15: ; preds = %5, %2
%16 = phi i32 [ 0, %2 ], [ %11, %5 ]
%17 = and i32 %16, %1
ret i32 %17
}
/* Variables and functions */
double sin(double);
double Double_sin(double x) { return sin(x); }


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

x86 assembly (clang, -O2):
<Double_sin>:
jmp    1030 <sin@plt>

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

LLVM IR (-O2):
define double @Double_sin(double %0) {
%2 = tail call double @sin(double %0)
ret double %2
}
/* Variables and functions */
int /*<<< orphan*/ DoTest16();
int /*<<< orphan*/ DoTest32();
int main() {
  DoTest16();
  DoTest32();
  return 0;
}


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

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

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

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @DoTest16()
%2 = tail call i32 (...) @DoTest32()
ret i32 0
}
/* Variables and functions */
int strlen(char *);
scalar_t__ strncmp(char *, char *, int);
unsigned char string_match(char *string1, char *string2) {
  int len1, len2;
  len1 = strlen(string1);
  len2 = strlen(string2);
  if (len1 != len2) {
    return 0;
  } else {
    if (strncmp(string1, string2, len1) == 0) {
      return 1;
    } else {
      return 0;
    }
  }
}


x86 assembly (clang, -O0):
<string_match>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    -0x10(%rbp),%rdi
call   1040 <strlen@plt>
mov    %eax,-0x1c(%rbp)
mov    -0x18(%rbp),%rdi
call   1040 <strlen@plt>
mov    %eax,-0x20(%rbp)
mov    -0x1c(%rbp),%eax
cmp    -0x20(%rbp),%eax
je     115d <string_match+0x3d>
movb   $0x0,-0x1(%rbp)
jmp    1184 <string_match+0x64>
mov    -0x10(%rbp),%rdi
mov    -0x18(%rbp),%rsi
mov    -0x1c(%rbp),%edx
call   1030 <strncmp@plt>
cmp    $0x0,%rax
jne    1180 <string_match+0x60>
movb   $0x1,-0x1(%rbp)
jmp    1184 <string_match+0x64>
movb   $0x0,-0x1(%rbp)
movzbl -0x1(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<string_match>:
push   %rbp
push   %r14
push   %rbx
mov    %rsi,%r14
mov    %rdi,%rbx
call   1040 <strlen@plt>
mov    %eax,%ebp
mov    %r14,%rdi
call   1040 <strlen@plt>
cmp    %eax,%ebp
jne    1152 <string_match+0x32>
mov    %rbx,%rdi
mov    %r14,%rsi
mov    %ebp,%edx
call   1030 <strncmp@plt>
test   %rax,%rax
sete   %al
jmp    1154 <string_match+0x34>
xor    %eax,%eax
pop    %rbx
pop    %r14
pop    %rbp
ret

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

LLVM IR (-O2):
define zeroext i8 @string_match(i8* %0, i8* %1) {
%3 = tail call i32 @strlen(i8* %0)
%4 = tail call i32 @strlen(i8* %1)
%5 = icmp eq i32 %3, %4
br i1 %5, label %6, label %10
6: ; preds = %2
%7 = tail call i64 @strncmp(i8* %0, i8* %1, i32 %3)
%8 = icmp eq i64 %7, 0
%9 = zext i1 %8 to i8
br label %10
10: ; preds = %6, %2
%11 = phi i8 [ 0, %2 ], [ %9, %6 ]
ret i8 %11
}
double CrosswindSpoilerExperimentOnRate(double target_deflection_angle) {
  double expected_loop_duration_s = 20.0;
  return target_deflection_angle / expected_loop_duration_s;
}


x86 assembly (clang, -O0):
<CrosswindSpoilerExperimentOnRate>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
movsd  0xeef(%rip),%xmm0
movsd  %xmm0,-0x10(%rbp)
movsd  -0x8(%rbp),%xmm0
divsd  -0x10(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<CrosswindSpoilerExperimentOnRate>:
divsd  0xef8(%rip),%xmm0
ret

LLVM IR (-O0):
define double @CrosswindSpoilerExperimentOnRate(double %0) {
%2 = alloca double
%3 = alloca double
store double %0, double* %2
store double 2.000000e+01, double* %3
%4 = load double, double* %2
%5 = load double, double* %3
%6 = fdiv double %4, %5
ret double %6
}

LLVM IR (-O2):
define double @CrosswindSpoilerExperimentOnRate(double %0) {
%2 = fdiv double %0, 2.000000e+01
ret double %2
}
int _close(__attribute__((unused)) int fd) { return -1; }


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

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

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

LLVM IR (-O2):
define i32 @_close(i32 %0) {
ret i32 -1
}
int test_imm_52uint64_highword_mem(unsigned long long *val) {
  return ((*val >> 32) & (0x52 << 0)) ? -20 : -40;
}


x86 assembly (clang, -O0):
<test_imm_52uint64_highword_mem>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%rdx
shr    $0x20,%rdx
and    $0x52,%rdx
mov    $0xffffffd8,%eax
mov    $0xffffffec,%ecx
cmp    $0x0,%rdx
cmovne %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_imm_52uint64_highword_mem>:
testb  $0x52,0x4(%rdi)
mov    $0xffffffd8,%ecx
mov    $0xffffffec,%eax
cmove  %ecx,%eax
ret

LLVM IR (-O0):
define i32 @test_imm_52uint64_highword_mem(i64* %0) {
%2 = alloca i64*
store i64* %0, i64** %2
%3 = load i64*, i64** %2
%4 = load i64, i64* %3
%5 = lshr i64 %4, 32
%6 = and i64 %5, 82
%7 = icmp ne i64 %6, 0
%8 = zext i1 %7 to i64
%9 = select i1 %7, i32 -20, i32 -40
ret i32 %9
}

LLVM IR (-O2):
define i32 @test_imm_52uint64_highword_mem(i64* nocapture %0) {
%2 = load i64, i64* %0
%3 = and i64 %2, 352187318272
%4 = icmp eq i64 %3, 0
%5 = select i1 %4, i32 -40, i32 -20
ret i32 %5
}
/* Variables and functions */
int ERR;
int getch();
int tge_get_character(void) {
  int c = getch();
  return (c == ERR) ? -1 : c;
}


x86 assembly (clang, -O0):
<tge_get_character>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1030 <getch@plt>
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
mov    0x2ebc(%rip),%rcx
cmp    (%rcx),%eax
jne    1141 <tge_get_character+0x31>
mov    $0xffffffff,%eax
mov    %eax,-0x8(%rbp)
jmp    1147 <tge_get_character+0x37>
mov    -0x4(%rbp),%eax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<tge_get_character>:
push   %rax
xor    %eax,%eax
call   1030 <getch@plt>
mov    0x2ec9(%rip),%rcx
cmp    (%rcx),%eax
mov    $0xffffffff,%ecx
cmove  %ecx,%eax
pop    %rcx
ret

LLVM IR (-O0):
@ERR = global i32 0
define i32 @tge_get_character() {
%1 = alloca i32
%2 = call i32 (...) @getch()
store i32 %2, i32* %1
%3 = load i32, i32* %1
%4 = load i32, i32* @ERR
%5 = icmp eq i32 %3, %4
br i1 %5, label %6, label %7
6: ; preds = %0
br label %9
7: ; preds = %0
%8 = load i32, i32* %1
br label %9
9: ; preds = %7, %6
%10 = phi i32 [ -1, %6 ], [ %8, %7 ]
ret i32 %10
}

LLVM IR (-O2):
@ERR = global i32 0
define i32 @tge_get_character() {
%1 = tail call i32 (...) @getch()
%2 = load i32, i32* @ERR
%3 = icmp eq i32 %1, %2
%4 = select i1 %3, i32 -1, i32 %1
ret i32 %4
}
int test_imm_C8uint16_reg(unsigned short val) {
  return ((val) & (-0xC8 << 0)) ? -20 : -40;
}


x86 assembly (clang, -O0):
<test_imm_C8uint16_reg>:
push   %rbp
mov    %rsp,%rbp
mov    %di,%ax
mov    %ax,-0x2(%rbp)
movzwl -0x2(%rbp),%edx
and    $0xffffff38,%edx
mov    $0xffffffd8,%eax
mov    $0xffffffec,%ecx
cmp    $0x0,%edx
cmovne %ecx,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @test_imm_C8uint16_reg(i16 zeroext %0) {
%2 = alloca i16
store i16 %0, i16* %2
%3 = load i16, i16* %2
%4 = zext i16 %3 to i32
%5 = and i32 %4, -200
%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_C8uint16_reg(i16 zeroext %0) {
%2 = and i16 %0, -200
%3 = icmp eq i16 %2, 0
%4 = select i1 %3, i32 -40, i32 -20
ret i32 %4
}
AX0AX1(r0, r1, x0, x1, p0, p1) short r0, r1;
short *p0, *p1;
{
  if ((((short *)10000000)[x0]) <= (((short *)11111111)[x1]))
    return 1;
  else
    return 0;
}


x86 assembly (clang, -O0):
<AX0AX1>:
push   %rbp
mov    %rsp,%rbp
mov    %esi,%eax
mov    %di,%si
mov    %si,-0x6(%rbp)
mov    %ax,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    %ecx,-0x10(%rbp)
mov    %r8,-0x18(%rbp)
mov    %r9,-0x20(%rbp)
movslq -0xc(%rbp),%rcx
mov    $0x989680,%eax
movswl (%rax,%rcx,2),%eax
movslq -0x10(%rbp),%rdx
mov    $0xa98ac7,%ecx
movswl (%rcx,%rdx,2),%ecx
cmp    %ecx,%eax
jg     114d <AX0AX1+0x4d>
movl   $0x1,-0x4(%rbp)
jmp    1154 <AX0AX1+0x54>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<AX0AX1>:
movslq %edx,%rax
movzwl 0x989680(%rax,%rax,1),%edx
movslq %ecx,%rcx
xor    %eax,%eax
cmp    0xa98ac7(%rcx,%rcx,1),%dx
setle  %al
ret

LLVM IR (-O0):
define i32 @AX0AX1(i32 %0, i32 %1, i32 %2, i32 %3, i16* %4, i16* %5) {
%7 = alloca i32
%8 = alloca i16
%9 = alloca i16
%10 = alloca i32
%11 = alloca i32
%12 = alloca i16*
%13 = alloca i16*
%14 = trunc i32 %0 to i16
%15 = trunc i32 %1 to i16
store i16 %14, i16* %8
store i16 %15, i16* %9
store i32 %2, i32* %10
store i32 %3, i32* %11
store i16* %4, i16** %12
store i16* %5, i16** %13
%16 = load i32, i32* %10
%17 = sext i32 %16 to i64
%18 = getelementptr inbounds i16, i16* inttoptr (i64 10000000 to i16*), i64 %17
%19 = load i16, i16* %18
%20 = sext i16 %19 to i32
%21 = load i32, i32* %11
%22 = sext i32 %21 to i64
%23 = getelementptr inbounds i16, i16* inttoptr (i64 11111111 to i16*), i64 %22
%24 = load i16, i16* %23
%25 = sext i16 %24 to i32
%26 = icmp sle i32 %20, %25
br i1 %26, label %27, label %28
27: ; preds = %6
store i32 1, i32* %7
br label %29
28: ; preds = %6
store i32 0, i32* %7
br label %29
29: ; preds = %28, %27
%30 = load i32, i32* %7
ret i32 %30
}

LLVM IR (-O2):
define i32 @AX0AX1(i32 %0, i32 %1, i32 %2, i32 %3, i16* nocapture readnone %4, i16* nocapture readnone %5) {
%7 = sext i32 %2 to i64
%8 = getelementptr inbounds i16, i16* inttoptr (i64 10000000 to i16*), i64 %7
%9 = load i16, i16* %8
%10 = sext i32 %3 to i64
%11 = getelementptr inbounds i16, i16* inttoptr (i64 11111111 to i16*), i64 %10
%12 = load i16, i16* %11
%13 = icmp sle i16 %9, %12
%14 = zext i1 %13 to i32
ret i32 %14
}