xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int /*<<< orphan*/, char *, int, char *);
int /*<<< orphan*/ isgraph(int);
void t_isgraph_0x49() {
  Assert_real((isgraph(73)),
              "/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_isgraph.c",
              370, ("isgraph should be 1 for I"));
}


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

x86 assembly (clang, -O2):
<t_isgraph_0x49>:
push   %rax
mov    $0x49,%edi
call   1040 <isgraph@plt>
lea    0xece(%rip),%rsi
lea    0xf6f(%rip),%rcx
mov    %eax,%edi
mov    $0x172,%edx
pop    %rax
jmp    1030 <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_isgraph.c\00"
@.str.1 = [26 x i8] c"isgraph should be 1 for I\00"
define void @t_isgraph_0x49() {
%1 = call i32 @isgraph(i32 73)
%2 = call i32 @Assert_real(i32 %1, i8* getelementptr inbounds ([168 x i8], [168 x i8]* @.str, i64 0, i64 0), i32 370, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [168 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/ctype/test_isgraph.c\00"
@.str.1 = [26 x i8] c"isgraph should be 1 for I\00"
define void @t_isgraph_0x49() {
%1 = tail call i32 @isgraph(i32 73)
%2 = tail call i32 @Assert_real(i32 %1, i8* getelementptr inbounds ([168 x i8], [168 x i8]* @.str, i64 0, i64 0), i32 370, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.1, i64 0, i64 0))
ret void
}
int test_imm_E5uint32_reg(unsigned int val) {
  return ((val) & (0xE5 << 0)) ? -20 : -40;
}


x86 assembly (clang, -O0):
<test_imm_E5uint32_reg>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edx
and    $0xe5,%edx
mov    $0xffffffd8,%eax
mov    $0xffffffec,%ecx
cmp    $0x0,%edx
cmovne %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_imm_E5uint32_reg>:
test   $0xe5,%dil
mov    $0xffffffd8,%ecx
mov    $0xffffffec,%eax
cmove  %ecx,%eax
ret

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

LLVM IR (-O2):
define i32 @test_imm_E5uint32_reg(i32 %0) {
%2 = and i32 %0, 229
%3 = icmp eq i32 %2, 0
%4 = select i1 %3, i32 -40, i32 -20
ret i32 %4
}
/* Variables and functions */
unsigned int rand();
unsigned int rand_range(unsigned int low, unsigned int high) {
  return (unsigned int)low + (rand() % ((high - low) + 1));
}


x86 assembly (clang, -O0):
<rand_range>:
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    $0x0,%al
call   1030 <rand@plt>
mov    -0x8(%rbp),%ecx
sub    -0x4(%rbp),%ecx
add    $0x1,%ecx
xor    %edx,%edx
div    %ecx
mov    -0xc(%rbp),%eax
add    %edx,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<rand_range>:
push   %rbp
push   %rbx
push   %rax
mov    %esi,%ebx
mov    %edi,%ebp
xor    %eax,%eax
call   1030 <rand@plt>
sub    %ebp,%ebx
add    $0x1,%ebx
xor    %edx,%edx
div    %ebx
add    %edx,%ebp
mov    %ebp,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
define i32 @rand_range(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 = call i32 (...) @rand()
%7 = load i32, i32* %4
%8 = load i32, i32* %3
%9 = sub i32 %7, %8
%10 = add i32 %9, 1
%11 = urem i32 %6, %10
%12 = add i32 %5, %11
ret i32 %12
}

LLVM IR (-O2):
define i32 @rand_range(i32 %0, i32 %1) {
%3 = tail call i32 (...) @rand()
%4 = sub i32 1, %0
%5 = add i32 %4, %1
%6 = urem i32 %3, %5
%7 = add i32 %6, %0
ret i32 %7
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
scalar_t__ sethostname(char *, int /*<<< orphan*/);
int /*<<< orphan*/ strlen(char *);
int setup_network(char *hostname) {
  if (sethostname(hostname, strlen(hostname)) < 0) {
    printf("setup_network(): Failed to set hostname\n");
    return -1;
  }
  return 0;
}


x86 assembly (clang, -O0):
<setup_network>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x10(%rbp),%rdi
call   1030 <strlen@plt>
mov    -0x18(%rbp),%rdi
mov    %eax,%esi
call   1050 <sethostname@plt>
cmp    $0x0,%rax
jge    117a <setup_network+0x4a>
lea    0xe97(%rip),%rdi
call   1040 <printf@plt>
movl   $0xffffffff,-0x4(%rbp)
jmp    1181 <setup_network+0x51>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<setup_network>:
push   %rbx
mov    %rdi,%rbx
call   1040 <strlen@plt>
mov    %rbx,%rdi
mov    %eax,%esi
call   1050 <sethostname@plt>
mov    %rax,%rcx
xor    %eax,%eax
test   %rcx,%rcx
js     114f <setup_network+0x1f>
pop    %rbx
ret
lea    0xeaa(%rip),%rdi
call   1030 <puts@plt>
mov    $0xffffffff,%eax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [41 x i8] c"setup_network(): Failed to set hostname\0A\00"
define i32 @setup_network(i8* %0) {
%2 = alloca i32
%3 = alloca i8*
store i8* %0, i8** %3
%4 = load i8*, i8** %3
%5 = load i8*, i8** %3
%6 = call i32 @strlen(i8* %5)
%7 = call i64 @sethostname(i8* %4, i32 %6)
%8 = icmp slt i64 %7, 0
br i1 %8, label %9, label %11
9: ; preds = %1
%10 = call i32 @printf(i8* getelementptr inbounds ([41 x i8], [41 x i8]* @.str, i64 0, i64 0))
store i32 -1, i32* %2
br label %12
11: ; preds = %1
store i32 0, i32* %2
br label %12
12: ; preds = %11, %9
%13 = load i32, i32* %2
ret i32 %13
}

LLVM IR (-O2):
@str = [40 x i8] c"setup_network(): Failed to set hostname\00"
define i32 @setup_network(i8* %0) {
%2 = tail call i32 @strlen(i8* %0)
%3 = tail call i64 @sethostname(i8* %0, i32 %2)
%4 = icmp slt i64 %3, 0
br i1 %4, label %5, label %7
5: ; preds = %1
%6 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([40 x i8], [40 x i8]* @str, i64 0, i64 0))
br label %7
7: ; preds = %1, %5
%8 = phi i32 [ -1, %5 ], [ 0, %1 ]
ret i32 %8
}
/* Type definitions */
struct if_nameindex {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ if_freenameindex(struct if_nameindex *);
void __dispose_if_list_2(struct if_nameindex **if_list) {
  if (if_list && *if_list) {
    if_freenameindex(*if_list);
    *if_list = 0;
  }
}


x86 assembly (clang, -O0):
<__dispose_if_list_2>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
cmpq   $0x0,-0x8(%rbp)
je     114c <__dispose_if_list_2+0x3c>
mov    -0x8(%rbp),%rax
cmpq   $0x0,(%rax)
je     114c <__dispose_if_list_2+0x3c>
mov    -0x8(%rbp),%rax
mov    (%rax),%rdi
call   1030 <if_freenameindex@plt>
mov    -0x8(%rbp),%rax
movq   $0x0,(%rax)
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<__dispose_if_list_2>:
push   %rbx
test   %rdi,%rdi
je     112d <__dispose_if_list_2+0x1d>
mov    %rdi,%rbx
mov    (%rdi),%rdi
test   %rdi,%rdi
je     112d <__dispose_if_list_2+0x1d>
call   1030 <if_freenameindex@plt>
movq   $0x0,(%rbx)
pop    %rbx
ret

LLVM IR (-O0):
%struct.if_nameindex = type { i32 }
define void @__dispose_if_list_2(%struct.if_nameindex** %0) {
%2 = alloca %struct.if_nameindex**
store %struct.if_nameindex** %0, %struct.if_nameindex*** %2
%3 = load %struct.if_nameindex**, %struct.if_nameindex*** %2
%4 = icmp ne %struct.if_nameindex** %3, null
br i1 %4, label %5, label %14
5: ; preds = %1
%6 = load %struct.if_nameindex**, %struct.if_nameindex*** %2
%7 = load %struct.if_nameindex*, %struct.if_nameindex** %6
%8 = icmp ne %struct.if_nameindex* %7, null
br i1 %8, label %9, label %14
9: ; preds = %5
%10 = load %struct.if_nameindex**, %struct.if_nameindex*** %2
%11 = load %struct.if_nameindex*, %struct.if_nameindex** %10
%12 = call i32 @if_freenameindex(%struct.if_nameindex* %11)
%13 = load %struct.if_nameindex**, %struct.if_nameindex*** %2
store %struct.if_nameindex* null, %struct.if_nameindex** %13
br label %14
14: ; preds = %9, %5, %1
ret void
}

LLVM IR (-O2):
%struct.if_nameindex = type { i32 }
define void @__dispose_if_list_2(%struct.if_nameindex** %0) {
%2 = icmp eq %struct.if_nameindex** %0, null
br i1 %2, label %8, label %3
3: ; preds = %1
%4 = load %struct.if_nameindex*, %struct.if_nameindex** %0
%5 = icmp eq %struct.if_nameindex* %4, null
br i1 %5, label %8, label %6
6: ; preds = %3
%7 = tail call i32 @if_freenameindex(%struct.if_nameindex* %4)
store %struct.if_nameindex* null, %struct.if_nameindex** %0
br label %8
8: ; preds = %6, %3, %1
ret void
}
signed int glwin_handle_events(void *voidhandle) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @glwin_handle_events(i8* nocapture readnone %0) {
ret i32 0
}
/* Variables and functions */
size_t get_pagesize(void) {
  static size_t page_size = 0;
  if (page_size > 0)
    return page_size;
  page_size = (4 * (1024ULL));
  return page_size;
}


x86 assembly (clang, -O0):
<get_pagesize>:
push   %rbp
mov    %rsp,%rbp
cmpq   $0x0,0x2f1c(%rip)
jbe    1122 <get_pagesize+0x22>
mov    0x2f0f(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    1138 <get_pagesize+0x38>
movq   $0x1000,0x2efb(%rip)
mov    0x2ef4(%rip),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_pagesize>:
cmpb   $0x0,0x2f21(%rip)
jne    1110 <get_pagesize+0x10>
movb   $0x1,0x2f18(%rip)
mov    $0x1000,%eax
ret

LLVM IR (-O0):
@get_pagesize.page_size = internal global i64 0
define i64 @get_pagesize() {
%1 = alloca i64
%2 = load i64, i64* @get_pagesize.page_size
%3 = icmp ugt i64 %2, 0
br i1 %3, label %4, label %6
4: ; preds = %0
%5 = load i64, i64* @get_pagesize.page_size
store i64 %5, i64* %1
br label %8
6: ; preds = %0
store i64 4096, i64* @get_pagesize.page_size
%7 = load i64, i64* @get_pagesize.page_size
store i64 %7, i64* %1
br label %8
8: ; preds = %6, %4
%9 = load i64, i64* %1
ret i64 %9
}

LLVM IR (-O2):
@get_pagesize.page_size = internal unnamed_addr global i1 false
define i64 @get_pagesize() {
%1 = load i1, i1* @get_pagesize.page_size
br i1 %1, label %3, label %2
2: ; preds = %0
store i1 true, i1* @get_pagesize.page_size
br label %3
3: ; preds = %0, %2
ret i64 4096
}
/* Variables and functions */
int /*<<< orphan*/ strcpy(char *, char *);
void mystrcat(char *s, char *t) {
  while (*s) {
    s++;
  }
  strcpy(s, t);
  return;
}


x86 assembly (clang, -O0):
<mystrcat>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
cmpb   $0x0,(%rax)
je     113e <mystrcat+0x2e>
mov    -0x8(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x8(%rbp)
jmp    1120 <mystrcat+0x10>
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1030 <strcpy@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<mystrcat>:
add    $0xffffffffffffffff,%rdi
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
cmpb   $0x0,0x1(%rdi)
lea    0x1(%rdi),%rdi
jne    1120 <mystrcat+0x10>
jmp    1030 <strcpy@plt>

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

LLVM IR (-O2):
define void @mystrcat(i8* %0, i8* %1) {
br label %3
3: ; preds = %3, %2
%4 = phi i8* [ %0, %2 ], [ %7, %3 ]
%5 = load i8, i8* %4
%6 = icmp eq i8 %5, 0
%7 = getelementptr inbounds i8, i8* %4, i64 1
br i1 %6, label %8, label %3
8: ; preds = %3
%9 = tail call i32 @strcpy(i8* %4, i8* %1)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ recv_ack();
scalar_t__ send_msg(char *, int /*<<< orphan*/);
int /*<<< orphan*/ sprintf(char *, char *);
int /*<<< orphan*/ strlen(char *);
void reset_motor_encoders() {
  char buf[80];
  sprintf(buf, "C RME\n");
  if (send_msg(buf, strlen(buf))) {
    recv_ack();
  }
}


x86 assembly (clang, -O0):
<reset_motor_encoders>:
push   %rbp
mov    %rsp,%rbp
sub    $0x60,%rsp
lea    -0x50(%rbp),%rdi
lea    0xead(%rip),%rsi
call   1060 <sprintf@plt>
lea    -0x50(%rbp),%rax
mov    %rax,-0x58(%rbp)
lea    -0x50(%rbp),%rdi
call   1040 <strlen@plt>
mov    -0x58(%rbp),%rdi
mov    %eax,%esi
call   1050 <send_msg@plt>
cmp    $0x0,%rax
je     1185 <reset_motor_encoders+0x45>
mov    $0x0,%al
call   1030 <recv_ack@plt>
add    $0x60,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<reset_motor_encoders>:
push   %rbx
sub    $0x50,%rsp
movl   $0xa454d,0x3(%rsp)
movl   $0x4d522043,(%rsp)
mov    %rsp,%rbx
mov    %rbx,%rdi
call   1040 <strlen@plt>
mov    %rbx,%rdi
mov    %eax,%esi
call   1050 <send_msg@plt>
test   %rax,%rax
je     1165 <reset_motor_encoders+0x35>
xor    %eax,%eax
call   1030 <recv_ack@plt>
add    $0x50,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@.str = [7 x i8] c"C RME\0A\00"
define void @reset_motor_encoders() {
%1 = alloca [80 x i8]
%2 = getelementptr inbounds [80 x i8], [80 x i8]* %1, i64 0, i64 0
%3 = call i32 @sprintf(i8* %2, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0))
%4 = getelementptr inbounds [80 x i8], [80 x i8]* %1, i64 0, i64 0
%5 = getelementptr inbounds [80 x i8], [80 x i8]* %1, i64 0, i64 0
%6 = call i32 @strlen(i8* %5)
%7 = call i64 @send_msg(i8* %4, i32 %6)
%8 = icmp ne i64 %7, 0
br i1 %8, label %9, label %11
9: ; preds = %0
%10 = call i32 (...) @recv_ack()
br label %11
11: ; preds = %9, %0
ret void
}

LLVM IR (-O2):
@.str = [7 x i8] c"C RME\0A\00"
define void @reset_motor_encoders() {
%1 = alloca [80 x i8]
%2 = getelementptr inbounds [80 x i8], [80 x i8]* %1, i64 0, i64 0
%3 = call i32 @strlen(i8* %2)
%4 = call i64 @send_msg(i8* %2, i32 %3)
%5 = icmp eq i64 %4, 0
br i1 %5, label %8, label %6
6: ; preds = %0
%7 = call i32 (...) @recv_ack()
br label %8
8: ; preds = %6, %0
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ mpz_t;

/* Variables and functions */
int /*<<< orphan*/ mpz_init_set_si(int /*<<< orphan*/, int);
void gmpint_seti(mpz_t *op, int i) { mpz_init_set_si(*op, i); }


x86 assembly (clang, -O0):
<gmpint_seti>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%edi
mov    -0xc(%rbp),%esi
call   1030 <mpz_init_set_si@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<gmpint_seti>:
mov    (%rdi),%edi
jmp    1030 <mpz_init_set_si@plt>

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

LLVM IR (-O2):
define void @gmpint_seti(i32* nocapture %0, i32 %1) {
%3 = load i32, i32* %0
%4 = tail call i32 @mpz_init_set_si(i32 %3, i32 %1)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ sio_error(char *);
void Sio_error(char s[]) { sio_error(s); }


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

x86 assembly (clang, -O2):
<Sio_error>:
jmp    1030 <sio_error@plt>

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

LLVM IR (-O2):
define void @Sio_error(i8* %0) {
%2 = tail call i32 @sio_error(i8* %0)
ret void
}
int foo(int *x, int y) {
  int z = *x;
  while (y > z)
    z *= 2;
  return z;
}


x86 assembly (clang, -O0):
<foo>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%eax
mov    %eax,-0x10(%rbp)
mov    -0xc(%rbp),%eax
cmp    -0x10(%rbp),%eax
jle    112e <foo+0x2e>
mov    -0x10(%rbp),%eax
shl    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    1114 <foo+0x14>
mov    -0x10(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<foo>:
mov    (%rdi),%ecx
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
mov    %ecx,%eax
lea    (%rax,%rax,1),%ecx
cmp    %esi,%eax
jl     1110 <foo+0x10>
ret

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

LLVM IR (-O2):
define i32 @foo(i32* nocapture %0, i32 %1) {
%3 = load i32, i32* %0
br label %4
4: ; preds = %4, %2
%5 = phi i32 [ %3, %2 ], [ %7, %4 ]
%6 = icmp slt i32 %5, %1
%7 = shl nsw i32 %5, 1
br i1 %6, label %4, label %8
8: ; preds = %4
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ portctl(char, int, char *);
int ctcssoff() {
  int pin = 1;
  char mask = 0x10;
  portctl(mask, pin, "ctcssoff");
  return 0;
}


x86 assembly (clang, -O0):
<ctcssoff>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x1,-0x4(%rbp)
movb   $0x10,-0x5(%rbp)
mov    -0x5(%rbp),%al
mov    -0x4(%rbp),%esi
lea    0xed0(%rip),%rdx
movsbl %al,%edi
call   1030 <portctl@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ctcssoff>:
push   %rax
lea    0xee8(%rip),%rdx
mov    $0x10,%edi
mov    $0x1,%esi
call   1030 <portctl@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [9 x i8] c"ctcssoff\00"
define i32 @ctcssoff() {
%1 = alloca i32
%2 = alloca i8
store i32 1, i32* %1
store i8 16, i8* %2
%3 = load i8, i8* %2
%4 = load i32, i32* %1
%5 = call i32 @portctl(i8 signext %3, i32 %4, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@.str = [9 x i8] c"ctcssoff\00"
define i32 @ctcssoff() {
%1 = tail call i32 @portctl(i8 signext 16, i32 1, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0))
ret i32 0
}
/* Type definitions */
typedef char uint8_t;
typedef size_t uint32_t;

/* Variables and functions */
uint32_t SMTP_strlen(uint8_t *msg) {
  uint8_t p;
  uint32_t i;
  i = 0;
  while (msg[i] != '\r' && msg[i] != '\n' && msg[i] != ' ')
    i++;
  return i;
}


x86 assembly (clang, -O0):
<SMTP_strlen>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movq   $0x0,-0x18(%rbp)
mov    -0x8(%rbp),%rax
mov    -0x18(%rbp),%rcx
movsbl (%rax,%rcx,1),%ecx
xor    %eax,%eax
cmp    $0xd,%ecx
mov    %al,-0x19(%rbp)
je     1159 <SMTP_strlen+0x59>
mov    -0x8(%rbp),%rax
mov    -0x18(%rbp),%rcx
movsbl (%rax,%rcx,1),%ecx
xor    %eax,%eax
cmp    $0xa,%ecx
mov    %al,-0x19(%rbp)
je     1159 <SMTP_strlen+0x59>
mov    -0x8(%rbp),%rax
mov    -0x18(%rbp),%rcx
movsbl (%rax,%rcx,1),%eax
cmp    $0x20,%eax
setne  %al
mov    %al,-0x19(%rbp)
mov    -0x19(%rbp),%al
test   $0x1,%al
jne    1169 <SMTP_strlen+0x69>
jmp    117a <SMTP_strlen+0x7a>
mov    -0x18(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x18(%rbp)
jmp    1110 <SMTP_strlen+0x10>
mov    -0x18(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<SMTP_strlen>:
xor    %eax,%eax
movabs $0x100002400,%rcx
jmp    1114 <SMTP_strlen+0x14>
xchg   %ax,%ax
add    $0x1,%rax
movzbl (%rdi,%rax,1),%edx
cmp    $0x20,%rdx
ja     1110 <SMTP_strlen+0x10>
bt     %rdx,%rcx
jae    1110 <SMTP_strlen+0x10>
ret

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

LLVM IR (-O2):
define i64 @SMTP_strlen(i8* nocapture %0) {
br label %2
2: ; preds = %6, %1
%3 = phi i64 [ 0, %1 ], [ %7, %6 ]
%4 = getelementptr inbounds i8, i8* %0, i64 %3
%5 = load i8, i8* %4
switch i8 %5, label %6 [
i8 13, label %8
i8 10, label %8
i8 32, label %8
]
6: ; preds = %2
%7 = add i64 %3, 1
br label %2
8: ; preds = %2, %2, %2
ret i64 %3
}
/* Type definitions */
typedef int /*<<< orphan*/ off_t;

/* Variables and functions */
int /*<<< orphan*/ __SYSCALL_LL_O(int /*<<< orphan*/);
int syscall(int, char const *, int /*<<< orphan*/);
int truncate(const char *path, off_t length) {
  return syscall(92, path, __SYSCALL_LL_O(length));
}


x86 assembly (clang, -O0):
<truncate>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0xc(%rbp),%edi
call   1040 <__SYSCALL_LL_O@plt>
mov    -0x18(%rbp),%rsi
mov    %eax,%edx
mov    $0x5c,%edi
call   1030 <syscall@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<truncate>:
push   %rbx
mov    %rdi,%rbx
mov    %esi,%edi
call   1040 <__SYSCALL_LL_O@plt>
mov    $0x5c,%edi
mov    %rbx,%rsi
mov    %eax,%edx
pop    %rbx
jmp    1030 <syscall@plt>

LLVM IR (-O0):
define i32 @truncate(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i32
store i8* %0, i8** %3
store i32 %1, i32* %4
%5 = load i8*, i8** %3
%6 = load i32, i32* %4
%7 = call i32 @__SYSCALL_LL_O(i32 %6)
%8 = call i32 @syscall(i32 92, i8* %5, i32 %7)
ret i32 %8
}

LLVM IR (-O2):
define i32 @truncate(i8* %0, i32 %1) {
%3 = tail call i32 @__SYSCALL_LL_O(i32 %1)
%4 = tail call i32 @syscall(i32 92, i8* %0, i32 %3)
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int pa_hashmap_free() {
  printf("NOT IMPLEMENTED:"
         "pa_hashmap_free"
         "\n");
}


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

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

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

LLVM IR (-O2):
@str = [32 x i8] c"NOT IMPLEMENTED:pa_hashmap_free\00"
define i32 @pa_hashmap_free() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([32 x i8], [32 x i8]* @str, i64 0, i64 0))
ret i32 undef
}
/* Variables and functions */
int U_WMRCORENONE_get(char *);
int U_WMRA5_get(void) { return U_WMRCORENONE_get("U_WMRA5"); }


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

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

LLVM IR (-O0):
@.str = [8 x i8] c"U_WMRA5\00"
define i32 @U_WMRA5_get() {
%1 = call i32 @U_WMRCORENONE_get(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0))
ret i32 %1
}

LLVM IR (-O2):
@.str = [8 x i8] c"U_WMRA5\00"
define i32 @U_WMRA5_get() {
%1 = tail call i32 @U_WMRCORENONE_get(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0))
ret i32 %1
}
/* Type definitions */
typedef int /*<<< orphan*/ ulong;
typedef int /*<<< orphan*/ Drawable;
typedef int /*<<< orphan*/ Display;

/* Variables and functions */
void XScreenSaverSelectInput(register Display *dpy, Drawable drawable,
                             ulong mask) {}


x86 assembly (clang, -O0):
<XScreenSaverSelectInput>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
pop    %rbp
ret

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

LLVM IR (-O0):
define void @XScreenSaverSelectInput(i32* %0, i32 %1, i32 %2) {
%4 = alloca i32*
%5 = alloca i32
%6 = alloca i32
store i32* %0, i32** %4
store i32 %1, i32* %5
store i32 %2, i32* %6
ret void
}

LLVM IR (-O2):
define void @XScreenSaverSelectInput(i32* nocapture %0, i32 %1, i32 %2) {
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ XCrossingEvent;

/* Variables and functions */
int /*<<< orphan*/ abort();
int /*<<< orphan*/ free(int /*<<< orphan*/ *);
void free_XCrossingEvent(void *_p) {
  if (_p == NULL)
    abort();
  free((XCrossingEvent *)_p);
}


x86 assembly (clang, -O0):
<free_XCrossingEvent>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
cmpq   $0x0,-0x8(%rbp)
jne    113e <free_XCrossingEvent+0x1e>
mov    $0x0,%al
call   1040 <abort@plt>
mov    -0x8(%rbp),%rdi
call   1030 <free@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<free_XCrossingEvent>:
test   %rdi,%rdi
je     112a <free_XCrossingEvent+0xa>
jmp    1030 <free@plt>
push   %rax
xor    %eax,%eax
call   1040 <abort@plt>

LLVM IR (-O0):
define void @free_XCrossingEvent(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = icmp eq i8* %3, null
br i1 %4, label %5, label %7
5: ; preds = %1
%6 = call i32 (...) @abort()
unreachable
7: ; preds = %1
%8 = load i8*, i8** %2
%9 = bitcast i8* %8 to i32*
%10 = call i32 @free(i32* %9)
ret void
}

LLVM IR (-O2):
define void @free_XCrossingEvent(i8* %0) {
%2 = icmp eq i8* %0, null
br i1 %2, label %3, label %5
3: ; preds = %1
%4 = tail call i32 (...) @abort()
unreachable
5: ; preds = %1
%6 = bitcast i8* %0 to i32*
%7 = tail call i32 @free(i32* %6)
ret void
}
int XSetErrorHandler() { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @XSetErrorHandler() {
ret i32 0
}
int alock_auth_none_deinit() { return 1; }


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

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

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

LLVM IR (-O2):
define i32 @alock_auth_none_deinit() {
ret i32 1
}
/* Variables and functions */
int /*<<< orphan*/ abort();
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
int /*<<< orphan*/ stderr;
void grpcsharp_auth_context_peer_identity_property_name() {
  fprintf(stderr, "Should never reach here");
  abort();
}


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

x86 assembly (clang, -O2):
<grpcsharp_auth_context_peer_identity_property_name>:
push   %rax
mov    0x2eb8(%rip),%rax
mov    (%rax),%edi
lea    0xecf(%rip),%rsi
call   1040 <fprintf@plt>
xor    %eax,%eax
call   1030 <abort@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [24 x i8] c"Should never reach here\00"
define void @grpcsharp_auth_context_peer_identity_property_name() {
%1 = load i32, i32* @stderr
%2 = call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str, i64 0, i64 0))
%3 = call i32 (...) @abort()
unreachable
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [24 x i8] c"Should never reach here\00"
define void @grpcsharp_auth_context_peer_identity_property_name() {
%1 = load i32, i32* @stderr
%2 = tail call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str, i64 0, i64 0))
%3 = tail call i32 (...) @abort()
unreachable
}
void ch_asm_volatile_memory() { asm volatile("" : : : "memory"); }


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

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

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

LLVM IR (-O2):
define void @ch_asm_volatile_memory() {
tail call void asm sideeffect "", "~{memory},~{dirflag},~{fpsr},~{flags}"()
ret void
}
const char *plugin_api_gettext(const char *string) { return (string); }


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

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

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

LLVM IR (-O2):
define i8* @plugin_api_gettext(i8* readnone returned %0) {
ret i8* %0
}
print_color_table(struct ctstruct *rgb, int size) {}


x86 assembly (clang, -O0):
<print_color_table>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    %esi,-0x14(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

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

LLVM IR (-O0):
%struct.ctstruct = type opaque
define i32 @print_color_table(%struct.ctstruct* %0, i32 %1) {
%3 = alloca i32
%4 = alloca %struct.ctstruct*
%5 = alloca i32
store %struct.ctstruct* %0, %struct.ctstruct** %4
store i32 %1, i32* %5
%6 = load i32, i32* %3
ret i32 %6
}

LLVM IR (-O2):
%struct.ctstruct = type opaque
define i32 @print_color_table(%struct.ctstruct* nocapture readnone %0, i32 %1) {
ret i32 undef
}
double test12(int c) { return c ? 4.0 : 2.0; }


x86 assembly (clang, -O0):
<test12>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
movsd  0xeee(%rip),%xmm0
movsd  0xeee(%rip),%xmm1
movsd  %xmm1,-0x18(%rbp)
cmp    $0x0,%eax
movsd  %xmm0,-0x10(%rbp)
jne    1137 <test12+0x37>
movsd  -0x18(%rbp),%xmm0
movsd  %xmm0,-0x10(%rbp)
movsd  -0x10(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<test12>:
xor    %eax,%eax
test   %edi,%edi
sete   %al
lea    0xef2(%rip),%rcx
movsd  (%rcx,%rax,8),%xmm0
ret

LLVM IR (-O0):
define double @test12(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = icmp ne i32 %3, 0
%5 = zext i1 %4 to i64
%6 = select i1 %4, double 4.000000e+00, double 2.000000e+00
ret double %6
}

LLVM IR (-O2):
define double @test12(i32 %0) {
%2 = icmp eq i32 %0, 0
%3 = select i1 %2, double 2.000000e+00, double 4.000000e+00
ret double %3
}
void gf8mul_11101001(void) {
  __asm__ __volatile__("\tpxor    %xmm7, %xmm4\n"
                       "\tpxor    %xmm7, %xmm3\n"
                       "\tpxor    %xmm6, %xmm3\n"
                       "\tpxor    %xmm6, %xmm2\n"
                       "\tpxor    %xmm5, %xmm2\n"
                       "\tpxor    %xmm5, %xmm1\n"
                       "\tpxor    %xmm4, %xmm1\n"
                       "\tpxor    %xmm4, %xmm0\n"
                       "\tpxor    %xmm3, %xmm7\n"
                       "\tpxor    %xmm3, %xmm4\n"
                       "\tpxor    %xmm3, %xmm2\n"
                       "\tpxor    %xmm2, %xmm6\n"
                       "\tpxor    %xmm2, %xmm3\n"
                       "\tpxor    %xmm2, %xmm1\n"
                       "\tpxor    %xmm1, %xmm5\n"
                       "\tpxor    %xmm1, %xmm2\n"
                       "\tpxor    %xmm1, %xmm0\n"
                       "\tpxor    %xmm0, %xmm7\n"
                       "\tpxor    %xmm0, %xmm6\n"
                       "\tpxor    %xmm0, %xmm5\n"
                       "\tpxor    %xmm0, %xmm3\n");
}


x86 assembly (clang, -O0):
push   %rbp
mov    %rsp,%rbp
pxor   %xmm7,%xmm4
pxor   %xmm7,%xmm3
pxor   %xmm6,%xmm3
pxor   %xmm6,%xmm2
pxor   %xmm5,%xmm2
pxor   %xmm5,%xmm1
pxor   %xmm4,%xmm1
pxor   %xmm4,%xmm0
pxor   %xmm3,%xmm7
pxor   %xmm3,%xmm4
pxor   %xmm3,%xmm2
pxor   %xmm2,%xmm6
pxor   %xmm2,%xmm3
pxor   %xmm2,%xmm1
pxor   %xmm1,%xmm5
pxor   %xmm1,%xmm2
pxor   %xmm1,%xmm0
pxor   %xmm0,%xmm7
pxor   %xmm0,%xmm6
pxor   %xmm0,%xmm5
pxor   %xmm0,%xmm3
pop    %rbp
ret

x86 assembly (clang, -O2):
pxor   %xmm7,%xmm4
pxor   %xmm7,%xmm3
pxor   %xmm6,%xmm3
pxor   %xmm6,%xmm2
pxor   %xmm5,%xmm2
pxor   %xmm5,%xmm1
pxor   %xmm4,%xmm1
pxor   %xmm4,%xmm0
pxor   %xmm3,%xmm7
pxor   %xmm3,%xmm4
pxor   %xmm3,%xmm2
pxor   %xmm2,%xmm6
pxor   %xmm2,%xmm3
pxor   %xmm2,%xmm1
pxor   %xmm1,%xmm5
pxor   %xmm1,%xmm2
pxor   %xmm1,%xmm0
pxor   %xmm0,%xmm7
pxor   %xmm0,%xmm6
pxor   %xmm0,%xmm5
pxor   %xmm0,%xmm3
ret

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

LLVM IR (-O2):
define void @gf8mul_11101001() {
tail call void asm sideeffect "\09pxor %xmm7, %xmm4\0A\09pxor %xmm7, %xmm3\0A\09pxor %xmm6, %xmm3\0A\09pxor %xmm6, %xmm2\0A\09pxor %xmm5, %xmm2\0A\09pxor %xmm5, %xmm1\0A\09pxor %xmm4, %xmm1\0A\09pxor %xmm4, %xmm0\0A\09pxor %xmm3, %xmm7\0A\09pxor %xmm3, %xmm4\0A\09pxor %xmm3, %xmm2\0A\09pxor %xmm2, %xmm6\0A\09pxor %xmm2, %xmm3\0A\09pxor %xmm2, %xmm1\0A\09pxor %xmm1, %xmm5\0A\09pxor %xmm1, %xmm2\0A\09pxor %xmm1, %xmm0\0A\09pxor %xmm0, %xmm7\0A\09pxor %xmm0, %xmm6\0A\09pxor %xmm0, %xmm5\0A\09pxor %xmm0, %xmm3\0A", "~{dirflag},~{fpsr},~{flags}"()
ret void
}
/* Variables and functions */
double pt_chi2(double, double, double);
double pt_gamma(double p, double shape, double scale, double ln_gamma_shape) {
  return pt_chi2(p, shape * 2.0, ln_gamma_shape) * 0.5 * scale;
}


x86 assembly (clang, -O0):
<pt_gamma>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  %xmm2,-0x18(%rbp)
movsd  %xmm3,-0x20(%rbp)
movsd  -0x8(%rbp),%xmm0
movsd  0xecf(%rip),%xmm1
mulsd  -0x10(%rbp),%xmm1
movsd  -0x20(%rbp),%xmm2
call   1030 <pt_chi2@plt>
movsd  0xeb0(%rip),%xmm1
mulsd  %xmm1,%xmm0
mulsd  -0x18(%rbp),%xmm0
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<pt_gamma>:
push   %rax
movsd  %xmm2,(%rsp)
addsd  %xmm1,%xmm1
movaps %xmm3,%xmm2
call   1030 <pt_chi2@plt>
mulsd  0xed6(%rip),%xmm0
mulsd  (%rsp),%xmm0
pop    %rax
ret

LLVM IR (-O0):
define double @pt_gamma(double %0, double %1, double %2, double %3) {
%5 = alloca double
%6 = alloca double
%7 = alloca double
%8 = alloca double
store double %0, double* %5
store double %1, double* %6
store double %2, double* %7
store double %3, double* %8
%9 = load double, double* %5
%10 = load double, double* %6
%11 = fmul double %10, 2.000000e+00
%12 = load double, double* %8
%13 = call double @pt_chi2(double %9, double %11, double %12)
%14 = fmul double %13, 5.000000e-01
%15 = load double, double* %7
%16 = fmul double %14, %15
ret double %16
}

LLVM IR (-O2):
define double @pt_gamma(double %0, double %1, double %2, double %3) {
%5 = fmul double %1, 2.000000e+00
%6 = tail call double @pt_chi2(double %0, double %5, double %3)
%7 = fmul double %6, 5.000000e-01
%8 = fmul double %7, %2
ret double %8
}
/* Variables and functions */
unsigned int unpacku16(unsigned char *);
extern unsigned int deserialize_uint16(unsigned char *buf) {
  return (unpacku16(buf));
}


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

x86 assembly (clang, -O2):
<deserialize_uint16>:
jmp    1030 <unpacku16@plt>

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

LLVM IR (-O2):
define i32 @deserialize_uint16(i8* %0) {
%2 = tail call i32 @unpacku16(i8* %0)
ret i32 %2
}
/* Variables and functions */
int /*<<< orphan*/ deraw(int);
int /*<<< orphan*/ diesave();
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char *);
int /*<<< orphan*/ stderr;
void fatal(char *str) {
  deraw(1);
  (void)fprintf(stderr, "%s\n", str);
  diesave();
  exit(1);
}


x86 assembly (clang, -O0):
<fatal>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    $0x1,%edi
call   1040 <deraw@plt>
mov    0x2e83(%rip),%rax
mov    (%rax),%edi
mov    -0x8(%rbp),%rdx
lea    0xe96(%rip),%rsi
call   1030 <fprintf@plt>
mov    $0x0,%al
call   1060 <diesave@plt>
mov    $0x1,%edi
call   1050 <exit@plt>

x86 assembly (clang, -O2):
<fatal>:
push   %rbx
mov    %rdi,%rbx
mov    $0x1,%edi
call   1040 <deraw@plt>
mov    0x2e8b(%rip),%rax
mov    (%rax),%edi
lea    0xea2(%rip),%rsi
mov    %rbx,%rdx
call   1030 <fprintf@plt>
xor    %eax,%eax
call   1060 <diesave@plt>
mov    $0x1,%edi
call   1050 <exit@plt>

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

LLVM IR (-O2):
@stderr = global i32 0
@.str = [4 x i8] c"%s\0A\00"
define void @fatal(i8* %0) {
%2 = tail call i32 @deraw(i32 1)
%3 = load i32, i32* @stderr
%4 = tail call i32 @fprintf(i32 %3, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %0)
%5 = tail call i32 (...) @diesave()
%6 = tail call i32 @exit(i32 1)
unreachable
}
/* Variables and functions */
void *ASN1_OCTET_STRING_new();
void *ocsp_nonce_new(void) { return ASN1_OCTET_STRING_new(); }


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

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

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

LLVM IR (-O2):
define i8* @ocsp_nonce_new() {
%1 = tail call i8* (...) @ASN1_OCTET_STRING_new()
ret i8* %1
}
void foo_s(struct _Data$$3 *p) { ; }


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

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

LLVM IR (-O0):
%"struct._Data$$3" = type opaque
define void @foo_s(%"struct._Data$$3"* %0) {
%2 = alloca %"struct._Data$$3"*
store %"struct._Data$$3"* %0, %"struct._Data$$3"** %2
ret void
}

LLVM IR (-O2):
%"struct._Data$$3" = type opaque
define void @foo_s(%"struct._Data$$3"* nocapture %0) {
ret void
}
unsigned short SIO1readMode16(void) { return 0; }


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

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

LLVM IR (-O0):
define zeroext i16 @SIO1readMode16() {
ret i16 0
}

LLVM IR (-O2):
define zeroext i16 @SIO1readMode16() {
ret i16 0
}
/* Variables and functions */
scalar_t__ RAND_MAX;
unsigned long rand();
double random_number(double inner, double outer) {
  unsigned long r = rand();
  double rr = (double)r / ((double)RAND_MAX);
  double range = outer - inner;
  return (rr * range + inner);
}


x86 assembly (clang, -O0):
<random_number>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
xor    %eax,%eax
call   1030 <rand@plt>
mov    %rax,-0x18(%rbp)
movaps 0xecc(%rip),%xmm1
movq   -0x18(%rbp),%xmm0
punpckldq %xmm1,%xmm0
movapd 0xecb(%rip),%xmm1
subpd  %xmm1,%xmm0
movaps %xmm0,%xmm1
unpckhpd %xmm0,%xmm0
addsd  %xmm1,%xmm0
mov    0x2e8d(%rip),%rax
cvtsi2sdq (%rax),%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x20(%rbp)
movsd  -0x10(%rbp),%xmm0
subsd  -0x8(%rbp),%xmm0
movsd  %xmm0,-0x28(%rbp)
movsd  -0x20(%rbp),%xmm0
movsd  -0x28(%rbp),%xmm2
movsd  -0x8(%rbp),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<random_number>:
sub    $0x18,%rsp
movsd  %xmm1,0x10(%rsp)
movsd  %xmm0,0x8(%rsp)
xor    %eax,%eax
call   1030 <rand@plt>
movq   %rax,%xmm0
punpckldq 0xecc(%rip),%xmm0
subpd  0xed4(%rip),%xmm0
movapd %xmm0,%xmm1
unpckhpd %xmm0,%xmm1
addsd  %xmm0,%xmm1
mov    0x2e99(%rip),%rax
xorps  %xmm0,%xmm0
cvtsi2sdq (%rax),%xmm0
divsd  %xmm0,%xmm1
movsd  0x10(%rsp),%xmm0
movsd  0x8(%rsp),%xmm2
subsd  %xmm2,%xmm0
mulsd  %xmm1,%xmm0
addsd  %xmm2,%xmm0
add    $0x18,%rsp
ret

LLVM IR (-O0):
@RAND_MAX = global i64 0
define double @random_number(double %0, double %1) {
%3 = alloca double
%4 = alloca double
%5 = alloca i64
%6 = alloca double
%7 = alloca double
store double %0, double* %3
store double %1, double* %4
%8 = call i64 (...) @rand()
store i64 %8, i64* %5
%9 = load i64, i64* %5
%10 = uitofp i64 %9 to double
%11 = load i64, i64* @RAND_MAX
%12 = sitofp i64 %11 to double
%13 = fdiv double %10, %12
store double %13, double* %6
%14 = load double, double* %4
%15 = load double, double* %3
%16 = fsub double %14, %15
store double %16, double* %7
%17 = load double, double* %6
%18 = load double, double* %7
%19 = load double, double* %3
%20 = call double @llvm.fmuladd.f64(double %17, double %18, double %19)
ret double %20
}

LLVM IR (-O2):
@RAND_MAX = global i64 0
define double @random_number(double %0, double %1) {
%3 = tail call i64 (...) @rand()
%4 = uitofp i64 %3 to double
%5 = load i64, i64* @RAND_MAX
%6 = sitofp i64 %5 to double
%7 = fdiv double %4, %6
%8 = fsub double %1, %0
%9 = tail call double @llvm.fmuladd.f64(double %7, double %8, double %0)
ret double %9
}
/* Variables and functions */
double __datand(double);
double intr_wrap_018(double p1) { return __datand(p1); }


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

x86 assembly (clang, -O2):
<intr_wrap_018>:
jmp    1030 <__datand@plt>

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

LLVM IR (-O2):
define double @intr_wrap_018(double %0) {
%2 = tail call double @__datand(double %0)
ret double %2
}
int test(int i, int j) { return (i * j); }


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

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

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

LLVM IR (-O2):
define i32 @test(i32 %0, i32 %1) {
%3 = mul nsw i32 %1, %0
ret i32 %3
}
/* Type definitions */
typedef int /*<<< orphan*/ uint8_t;

/* Variables and functions */
int /*<<< orphan*/ od(void const *, size_t, int /*<<< orphan*/, int);
void od_hex_dump(const void *data, size_t data_len, uint8_t width) {
  od(data, data_len, width, (0x4000) | (0x0200) | (0x0010));
}


x86 assembly (clang, -O0):
<od_hex_dump>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x14(%rbp),%edx
mov    $0x4210,%ecx
call   1030 <od@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<od_hex_dump>:
mov    $0x4210,%ecx
jmp    1030 <od@plt>

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

LLVM IR (-O2):
define void @od_hex_dump(i8* %0, i64 %1, i32 %2) {
%4 = tail call i32 @od(i8* %0, i64 %1, i32 %2, i32 16912)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ S_IFCHR;
int /*<<< orphan*/ mknod(char *, int /*<<< orphan*/, int);
void make_nodes(void) {
  mknod("/dev/uart0", S_IFCHR, 42 << 8);
  mknod("/dev/uart1", S_IFCHR, (42 << 8) + 1);
  mknod("/dev/uart10", S_IFCHR, (42 << 8) + 10);
}


x86 assembly (clang, -O0):
<make_nodes>:
push   %rbp
mov    %rsp,%rbp
mov    0x2ec5(%rip),%rax
mov    (%rax),%esi
lea    0xedc(%rip),%rdi
mov    $0x2a00,%edx
call   1030 <mknod@plt>
mov    0x2eab(%rip),%rax
mov    (%rax),%esi
lea    0xecd(%rip),%rdi
mov    $0x2a01,%edx
call   1030 <mknod@plt>
mov    0x2e91(%rip),%rax
mov    (%rax),%esi
lea    0xebe(%rip),%rdi
mov    $0x2a0a,%edx
call   1030 <mknod@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<make_nodes>:
push   %rbx
mov    0x2ec8(%rip),%rbx
mov    (%rbx),%esi
lea    0xedf(%rip),%rdi
mov    $0x2a00,%edx
call   1030 <mknod@plt>
mov    (%rbx),%esi
lea    0xed7(%rip),%rdi
mov    $0x2a01,%edx
call   1030 <mknod@plt>
mov    (%rbx),%esi
lea    0xecf(%rip),%rdi
mov    $0x2a0a,%edx
pop    %rbx
jmp    1030 <mknod@plt>

LLVM IR (-O0):
@.str = [11 x i8] c"/dev/uart0\00"
@S_IFCHR = global i32 0
@.str.1 = [11 x i8] c"/dev/uart1\00"
@.str.2 = [12 x i8] c"/dev/uart10\00"
define void @make_nodes() {
%1 = load i32, i32* @S_IFCHR
%2 = call i32 @mknod(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), i32 %1, i32 10752)
%3 = load i32, i32* @S_IFCHR
%4 = call i32 @mknod(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.1, i64 0, i64 0), i32 %3, i32 10753)
%5 = load i32, i32* @S_IFCHR
%6 = call i32 @mknod(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.2, i64 0, i64 0), i32 %5, i32 10762)
ret void
}

LLVM IR (-O2):
@.str = [11 x i8] c"/dev/uart0\00"
@S_IFCHR = global i32 0
@.str.1 = [11 x i8] c"/dev/uart1\00"
@.str.2 = [12 x i8] c"/dev/uart10\00"
define void @make_nodes() {
%1 = load i32, i32* @S_IFCHR
%2 = tail call i32 @mknod(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), i32 %1, i32 10752)
%3 = load i32, i32* @S_IFCHR
%4 = tail call i32 @mknod(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.1, i64 0, i64 0), i32 %3, i32 10753)
%5 = load i32, i32* @S_IFCHR
%6 = tail call i32 @mknod(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.2, i64 0, i64 0), i32 %5, i32 10762)
ret void
}
/* Variables and functions */
int strlen(char *);
void advance_past_first_word(char **sptr) {
  int len = strlen(*sptr);
  (*sptr) += len + 1;
}


x86 assembly (clang, -O0):
<advance_past_first_word>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%rdi
call   1030 <strlen@plt>
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%edx
add    $0x1,%edx
mov    -0x8(%rbp),%rax
mov    (%rax),%rcx
movslq %edx,%rdx
add    %rdx,%rcx
mov    %rcx,(%rax)
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<advance_past_first_word>:
push   %rbx
mov    %rdi,%rbx
mov    (%rdi),%rdi
call   1030 <strlen@plt>
mov    (%rbx),%rcx
cltq
add    %rcx,%rax
add    $0x1,%rax
mov    %rax,(%rbx)
pop    %rbx
ret

LLVM IR (-O0):
define void @advance_past_first_word(i8** %0) {
%2 = alloca i8**
%3 = alloca i32
store i8** %0, i8*** %2
%4 = load i8**, i8*** %2
%5 = load i8*, i8** %4
%6 = call i32 @strlen(i8* %5)
store i32 %6, i32* %3
%7 = load i32, i32* %3
%8 = add nsw i32 %7, 1
%9 = load i8**, i8*** %2
%10 = load i8*, i8** %9
%11 = sext i32 %8 to i64
%12 = getelementptr inbounds i8, i8* %10, i64 %11
store i8* %12, i8** %9
ret void
}

LLVM IR (-O2):
define void @advance_past_first_word(i8** nocapture %0) {
%2 = load i8*, i8** %0
%3 = tail call i32 @strlen(i8* %2)
%4 = add nsw i32 %3, 1
%5 = load i8*, i8** %0
%6 = sext i32 %4 to i64
%7 = getelementptr inbounds i8, i8* %5, i64 %6
store i8* %7, i8** %0
ret void
}
void do_locate() {}


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

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

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

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