xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ Report(char *);
void HttpAssert(int condition) {
  if (condition)
    return;
  Report("ASSERTION!\n\r");
  while (1) {
  }
}


x86 assembly (clang, -O0):
<HttpAssert>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
cmpl   $0x0,-0x4(%rbp)
je     112b <HttpAssert+0x1b>
add    $0x10,%rsp
pop    %rbp
ret
lea    0xece(%rip),%rdi
call   1030 <Report@plt>
jmp    1137 <HttpAssert+0x27>

x86 assembly (clang, -O2):
<HttpAssert>:
test   %edi,%edi
je     1115 <HttpAssert+0x5>
ret
push   %rax
lea    0xee3(%rip),%rdi
call   1030 <Report@plt>
add    $0x8,%rsp
cs nopw 0x0(%rax,%rax,1)
jmp    1130 <HttpAssert+0x20>

LLVM IR (-O0):
@.str = [13 x i8] c"ASSERTION!\0A\0D\00"
define void @HttpAssert(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = icmp ne i32 %3, 0
br i1 %4, label %5, label %6
5: ; preds = %1
ret void
6: ; preds = %1
%7 = call i32 @Report(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0))
br label %8
8: ; preds = %6, %8
br label %8
}

LLVM IR (-O2):
@.str = [13 x i8] c"ASSERTION!\0A\0D\00"
define void @HttpAssert(i32 %0) {
%2 = icmp eq i32 %0, 0
br i1 %2, label %4, label %3
3: ; preds = %1
ret void
4: ; preds = %1
%5 = tail call i32 @Report(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0))
br label %6
6: ; preds = %4, %6
br label %6
}
/* Type definitions */
typedef scalar_t__ int8_t;

/* Variables and functions */
int _random_int_func(int, int);
int8_t _random_8_from_int(int8_t min, int8_t max) {
  int ret = _random_int_func((int)min, (int)max);
  return (int8_t)ret;
}


x86 assembly (clang, -O0):
<_random_8_from_int>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    %eax,%edi
mov    -0x10(%rbp),%rax
mov    %eax,%esi
call   1030 <_random_int_func@plt>
mov    %eax,-0x14(%rbp)
movslq -0x14(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<_random_8_from_int>:
push   %rax
call   1030 <_random_int_func@plt>
cltq
pop    %rcx
ret

LLVM IR (-O0):
define i64 @_random_8_from_int(i64 %0, i64 %1) {
%3 = alloca i64
%4 = alloca i64
%5 = alloca i32
store i64 %0, i64* %3
store i64 %1, i64* %4
%6 = load i64, i64* %3
%7 = trunc i64 %6 to i32
%8 = load i64, i64* %4
%9 = trunc i64 %8 to i32
%10 = call i32 @_random_int_func(i32 %7, i32 %9)
store i32 %10, i32* %5
%11 = load i32, i32* %5
%12 = sext i32 %11 to i64
ret i64 %12
}

LLVM IR (-O2):
define i64 @_random_8_from_int(i64 %0, i64 %1) {
%3 = trunc i64 %0 to i32
%4 = trunc i64 %1 to i32
%5 = tail call i32 @_random_int_func(i32 %3, i32 %4)
%6 = sext i32 %5 to i64
ret i64 %6
}
void Float32_To_UInt8_DitherClip(
    void *destinationBuffer, signed int destinationStride, void *sourceBuffer,
    signed int sourceStride, unsigned int count,
    struct PaUtilTriangularDitherGenerator *ditherGenerator) {
  float *src = (float *)sourceBuffer;
  unsigned char *dest = (unsigned char *)destinationBuffer;
  (void)ditherGenerator;
  while (count--) {
    src += sourceStride;
    dest += destinationStride;
  }
}


x86 assembly (clang, -O0):
<Float32_To_UInt8_DitherClip>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %ecx,-0x1c(%rbp)
mov    %r8d,-0x20(%rbp)
mov    %r9,-0x28(%rbp)
mov    -0x18(%rbp),%rax
mov    %rax,-0x30(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x38(%rbp)
mov    -0x20(%rbp),%eax
mov    %eax,%ecx
add    $0xffffffff,%ecx
mov    %ecx,-0x20(%rbp)
cmp    $0x0,%eax
je     1169 <Float32_To_UInt8_DitherClip+0x69>
mov    -0x1c(%rbp),%ecx
mov    -0x30(%rbp),%rax
movslq %ecx,%rcx
shl    $0x2,%rcx
add    %rcx,%rax
mov    %rax,-0x30(%rbp)
mov    -0xc(%rbp),%ecx
mov    -0x38(%rbp),%rax
movslq %ecx,%rcx
add    %rcx,%rax
mov    %rax,-0x38(%rbp)
jmp    112a <Float32_To_UInt8_DitherClip+0x2a>
pop    %rbp
ret

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

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

LLVM IR (-O2):
%struct.PaUtilTriangularDitherGenerator = type opaque
define void @Float32_To_UInt8_DitherClip(i8* nocapture %0, i32 %1, i8* nocapture %2, i32 %3, i32 %4, %struct.PaUtilTriangularDitherGenerator* nocapture %5) {
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ uint8_t;
typedef int /*<<< orphan*/ uint16_t;

/* Variables and functions */
int /*<<< orphan*/ smb2c_irqDisable();
void m40setParams8000(uint16_t addr, uint8_t val) {
  (void)addr;
  (void)val;
  smb2c_irqDisable();
}


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

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

LLVM IR (-O0):
define void @m40setParams8000(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 (...) @smb2c_irqDisable()
ret void
}

LLVM IR (-O2):
define void @m40setParams8000(i32 %0, i32 %1) {
%3 = tail call i32 (...) @smb2c_irqDisable()
ret void
}
void emit_type_definition_nat64(
    struct processor_explicatory_state *process_state,
    struct modern_stream *stream, void *stream_state,
    struct modern_vfile *vfile, void *vfile_state) {}


x86 assembly (clang, -O0):
<emit_type_definition_nat64>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    %r8,-0x28(%rbp)
pop    %rbp
ret

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

LLVM IR (-O0):
%struct.processor_explicatory_state = type opaque
%struct.modern_stream = type opaque
%struct.modern_vfile = type opaque
define void @emit_type_definition_nat64(%struct.processor_explicatory_state* %0, %struct.modern_stream* %1, i8* %2, %struct.modern_vfile* %3, i8* %4) {
%6 = alloca %struct.processor_explicatory_state*
%7 = alloca %struct.modern_stream*
%8 = alloca i8*
%9 = alloca %struct.modern_vfile*
%10 = alloca i8*
store %struct.processor_explicatory_state* %0, %struct.processor_explicatory_state** %6
store %struct.modern_stream* %1, %struct.modern_stream** %7
store i8* %2, i8** %8
store %struct.modern_vfile* %3, %struct.modern_vfile** %9
store i8* %4, i8** %10
ret void
}

LLVM IR (-O2):
%struct.processor_explicatory_state = type opaque
%struct.modern_stream = type opaque
%struct.modern_vfile = type opaque
define void @emit_type_definition_nat64(%struct.processor_explicatory_state* nocapture %0, %struct.modern_stream* nocapture %1, i8* nocapture %2, %struct.modern_vfile* nocapture %3, i8* nocapture %4) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ iscntrl(int);
void t_iscntrl_0xa6() {
  Assert_real((iscntrl(166) == 0),
              "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
              "2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/"
              "dg/z88dk/test/suites/ctype/test_iscntrl.c",
              835, ("iscntrl should be 0 for 0xa6"));
}


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

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

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

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

/* Variables and functions */
int /*<<< orphan*/ make_cloexec(int);
int recv_fd(int);
int /*<<< orphan*/ send_str(int, char *);
int /*<<< orphan*/ spawn_binary(int);
int /*<<< orphan*/ waitfor(int /*<<< orphan*/);
int main(int argc, char *argv[]) {
  int broker_fd = 30;
  int sandbox_fd = 29;
  make_cloexec(sandbox_fd);
  while (1) {
    int exec_fd = recv_fd(sandbox_fd);
    pid_t pid = spawn_binary(exec_fd);
    waitfor(pid);
    send_str(sandbox_fd, "OK");
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x1e,-0x14(%rbp)
movl   $0x1d,-0x18(%rbp)
mov    -0x18(%rbp),%edi
call   1060 <make_cloexec@plt>
mov    -0x18(%rbp),%edi
call   1050 <recv_fd@plt>
mov    %eax,-0x1c(%rbp)
mov    -0x1c(%rbp),%edi
call   1030 <spawn_binary@plt>
mov    %eax,-0x20(%rbp)
mov    -0x20(%rbp),%edi
call   1070 <waitfor@plt>
mov    -0x18(%rbp),%edi
lea    0xe5c(%rip),%rsi
call   1040 <send_str@plt>
jmp    117c <main+0x2c>

x86 assembly (clang, -O2):
<main>:
push   %rbx
mov    $0x1d,%edi
call   1060 <make_cloexec@plt>
lea    0xe9e(%rip),%rbx
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
mov    $0x1d,%edi
call   1050 <recv_fd@plt>
mov    %eax,%edi
call   1030 <spawn_binary@plt>
mov    %eax,%edi
call   1070 <waitfor@plt>
mov    $0x1d,%edi
mov    %rbx,%rsi
call   1040 <send_str@plt>
jmp    1170 <main+0x20>

LLVM IR (-O0):
@.str = [3 x i8] c"OK\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
store i32 30, i32* %6
store i32 29, i32* %7
%10 = load i32, i32* %7
%11 = call i32 @make_cloexec(i32 %10)
br label %12
12: ; preds = %2, %12
%13 = load i32, i32* %7
%14 = call i32 @recv_fd(i32 %13)
store i32 %14, i32* %8
%15 = load i32, i32* %8
%16 = call i32 @spawn_binary(i32 %15)
store i32 %16, i32* %9
%17 = load i32, i32* %9
%18 = call i32 @waitfor(i32 %17)
%19 = load i32, i32* %7
%20 = call i32 @send_str(i32 %19, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0))
br label %12
}

LLVM IR (-O2):
@.str = [3 x i8] c"OK\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @make_cloexec(i32 29)
br label %4
4: ; preds = %4, %2
%5 = tail call i32 @recv_fd(i32 29)
%6 = tail call i32 @spawn_binary(i32 %5)
%7 = tail call i32 @waitfor(i32 %6)
%8 = tail call i32 @send_str(i32 29, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0))
br label %4
}
/* Variables and functions */
int /*<<< orphan*/ break_me();
int main(void) {
  int i;
  break_me();
  break_me();
  for (i = 0; i < 5; i++)
    break_me();
  break_me();
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x0,%al
call   1030 <break_me@plt>
mov    $0x0,%al
call   1030 <break_me@plt>
movl   $0x0,-0x8(%rbp)
cmpl   $0x5,-0x8(%rbp)
jge    1153 <main+0x43>
mov    $0x0,%al
call   1030 <break_me@plt>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1134 <main+0x24>
mov    $0x0,%al
call   1030 <break_me@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @break_me()
%2 = tail call i32 (...) @break_me()
%3 = tail call i32 (...) @break_me()
%4 = tail call i32 (...) @break_me()
%5 = tail call i32 (...) @break_me()
%6 = tail call i32 (...) @break_me()
%7 = tail call i32 (...) @break_me()
%8 = tail call i32 (...) @break_me()
ret i32 0
}
/* Variables and functions */
char const *gethome_uid(int /*<<< orphan*/);
int /*<<< orphan*/ getuid();
const char *gethome(void) { return gethome_uid(getuid()); }


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

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

LLVM IR (-O0):
define i8* @gethome() {
%1 = call i32 (...) @getuid()
%2 = call i8* @gethome_uid(i32 %1)
ret i8* %2
}

LLVM IR (-O2):
define i8* @gethome() {
%1 = tail call i32 (...) @getuid()
%2 = tail call i8* @gethome_uid(i32 %1)
ret i8* %2
}
/* Variables and functions */
int /*<<< orphan*/ bar();
int /*<<< orphan*/ foo();
void cbcondl(long a) {
  if (a < 0)
    foo();
  bar();
}


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

x86 assembly (clang, -O2):
<cbcondl>:
test   %rdi,%rdi
js     112c <cbcondl+0xc>
xor    %eax,%eax
jmp    1030 <bar@plt>
push   %rax
xor    %eax,%eax
call   1040 <foo@plt>
add    $0x8,%rsp
xor    %eax,%eax
jmp    1030 <bar@plt>

LLVM IR (-O0):
define void @cbcondl(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = load i64, i64* %2
%4 = icmp slt i64 %3, 0
br i1 %4, label %5, label %7
5: ; preds = %1
%6 = call i32 (...) @foo()
br label %7
7: ; preds = %5, %1
%8 = call i32 (...) @bar()
ret void
}

LLVM IR (-O2):
define void @cbcondl(i64 %0) {
%2 = icmp slt i64 %0, 0
br i1 %2, label %3, label %5
3: ; preds = %1
%4 = tail call i32 (...) @foo()
br label %5
5: ; preds = %3, %1
%6 = tail call i32 (...) @bar()
ret void
}
int mvpstb_set_video_sync(int on) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @mvpstb_set_video_sync(i32 %0) {
ret i32 0
}
/* Type definitions */
typedef int uint8_t;
typedef int uint32_t;

/* Variables and functions */
void htonb4(uint32_t host, uint8_t *network4) {
  network4[0] = (host & 0xff000000) >> 24;
  network4[1] = (host & 0x00ff0000) >> 16;
  network4[2] = (host & 0x0000ff00) >> 8;
  network4[3] = host & 0x000000ff;
}


x86 assembly (clang, -O0):
<htonb4>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x4(%rbp),%ecx
and    $0xff000000,%ecx
shr    $0x18,%ecx
mov    -0x10(%rbp),%rax
mov    %ecx,(%rax)
mov    -0x4(%rbp),%ecx
and    $0xff0000,%ecx
sar    $0x10,%ecx
mov    -0x10(%rbp),%rax
mov    %ecx,0x4(%rax)
mov    -0x4(%rbp),%ecx
and    $0xff00,%ecx
sar    $0x8,%ecx
mov    -0x10(%rbp),%rax
mov    %ecx,0x8(%rax)
mov    -0x4(%rbp),%ecx
and    $0xff,%ecx
mov    -0x10(%rbp),%rax
mov    %ecx,0xc(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<htonb4>:
mov    %edi,%eax
mov    %edi,%ecx
movzbl %ah,%edx
movzbl %al,%edi
shr    $0x18,%eax
mov    %eax,(%rsi)
shr    $0x10,%ecx
movzbl %cl,%eax
mov    %eax,0x4(%rsi)
mov    %edx,0x8(%rsi)
mov    %edi,0xc(%rsi)
ret

LLVM IR (-O0):
define void @htonb4(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, -16777216
%7 = lshr i32 %6, 24
%8 = load i32*, i32** %4
%9 = getelementptr inbounds i32, i32* %8, i64 0
store i32 %7, i32* %9
%10 = load i32, i32* %3
%11 = and i32 %10, 16711680
%12 = ashr i32 %11, 16
%13 = load i32*, i32** %4
%14 = getelementptr inbounds i32, i32* %13, i64 1
store i32 %12, i32* %14
%15 = load i32, i32* %3
%16 = and i32 %15, 65280
%17 = ashr i32 %16, 8
%18 = load i32*, i32** %4
%19 = getelementptr inbounds i32, i32* %18, i64 2
store i32 %17, i32* %19
%20 = load i32, i32* %3
%21 = and i32 %20, 255
%22 = load i32*, i32** %4
%23 = getelementptr inbounds i32, i32* %22, i64 3
store i32 %21, i32* %23
ret void
}

LLVM IR (-O2):
define void @htonb4(i32 %0, i32* nocapture writeonly %1) {
%3 = lshr i32 %0, 24
store i32 %3, i32* %1
%4 = lshr i32 %0, 16
%5 = and i32 %4, 255
%6 = getelementptr inbounds i32, i32* %1, i64 1
store i32 %5, i32* %6
%7 = lshr i32 %0, 8
%8 = and i32 %7, 255
%9 = getelementptr inbounds i32, i32* %1, i64 2
store i32 %8, i32* %9
%10 = and i32 %0, 255
%11 = getelementptr inbounds i32, i32* %1, i64 3
store i32 %10, i32* %11
ret void
}
/* Variables and functions */
int /*<<< orphan*/ chdir(char *);
int /*<<< orphan*/ fgets(char *, int, int /*<<< orphan*/);
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ stdin;
int /*<<< orphan*/ strip_newline_of_help(char *, int);
void do_cd() {
  char dirName[512];
  printf("To what directory?");
  fgets(dirName, 512, stdin);
  strip_newline_of_help(dirName, 512);
  chdir(dirName);
}


x86 assembly (clang, -O0):
<do_cd>:
push   %rbp
mov    %rsp,%rbp
sub    $0x200,%rsp
lea    0xeae(%rip),%rdi
call   1040 <printf@plt>
lea    -0x200(%rbp),%rdi
mov    0x2e83(%rip),%rax
mov    (%rax),%edx
mov    $0x200,%esi
call   1050 <fgets@plt>
lea    -0x200(%rbp),%rdi
mov    $0x200,%esi
call   1060 <strip_newline_of_help@plt>
lea    -0x200(%rbp),%rdi
call   1030 <chdir@plt>
add    $0x200,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<do_cd>:
push   %rbx
sub    $0x200,%rsp
lea    0xeb1(%rip),%rdi
call   1040 <printf@plt>
mov    0x2e8d(%rip),%rax
mov    (%rax),%edx
mov    %rsp,%rbx
mov    %rbx,%rdi
mov    $0x200,%esi
call   1050 <fgets@plt>
mov    %rbx,%rdi
mov    $0x200,%esi
call   1060 <strip_newline_of_help@plt>
mov    %rbx,%rdi
call   1030 <chdir@plt>
add    $0x200,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@.str = [19 x i8] c"To what directory?\00"
@stdin = global i32 0
define void @do_cd() {
%1 = alloca [512 x i8]
%2 = call i32 @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0))
%3 = getelementptr inbounds [512 x i8], [512 x i8]* %1, i64 0, i64 0
%4 = load i32, i32* @stdin
%5 = call i32 @fgets(i8* %3, i32 512, i32 %4)
%6 = getelementptr inbounds [512 x i8], [512 x i8]* %1, i64 0, i64 0
%7 = call i32 @strip_newline_of_help(i8* %6, i32 512)
%8 = getelementptr inbounds [512 x i8], [512 x i8]* %1, i64 0, i64 0
%9 = call i32 @chdir(i8* %8)
ret void
}

LLVM IR (-O2):
@.str = [19 x i8] c"To what directory?\00"
@stdin = global i32 0
define void @do_cd() {
%1 = alloca [512 x i8]
%2 = getelementptr inbounds [512 x i8], [512 x i8]* %1, i64 0, i64 0
%3 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0))
%4 = load i32, i32* @stdin
%5 = call i32 @fgets(i8* %2, i32 512, i32 %4)
%6 = call i32 @strip_newline_of_help(i8* %2, i32 512)
%7 = call i32 @chdir(i8* %2)
ret void
}
int stfull(int top) { return top >= 5 ? 1 : 0; }


x86 assembly (clang, -O0):
<stfull>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edx
xor    %eax,%eax
mov    $0x1,%ecx
cmp    $0x5,%edx
cmovge %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<stfull>:
xor    %eax,%eax
cmp    $0x5,%edi
setge  %al
ret

LLVM IR (-O0):
define i32 @stfull(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = icmp sge i32 %3, 5
%5 = zext i1 %4 to i64
%6 = select i1 %4, i32 1, i32 0
ret i32 %6
}

LLVM IR (-O2):
define i32 @stfull(i32 %0) {
%2 = icmp sgt i32 %0, 4
%3 = zext i1 %2 to i32
ret i32 %3
}
int do_524() { return 524; }


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

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

LLVM IR (-O0):
define i32 @do_524() {
ret i32 524
}

LLVM IR (-O2):
define i32 @do_524() {
ret i32 524
}
int test_imm_FEint8_mem(signed char *val) {
  return ((*val) & (-0xFE << 0)) ? -20 : -40;
}


x86 assembly (clang, -O0):
<test_imm_FEint8_mem>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movsbl (%rax),%edx
and    $0xffffff02,%edx
mov    $0xffffffd8,%eax
mov    $0xffffffec,%ecx
cmp    $0x0,%edx
cmovne %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_imm_FEint8_mem>:
movsbl (%rdi),%eax
test   $0xffffff02,%eax
mov    $0xffffffd8,%ecx
mov    $0xffffffec,%eax
cmove  %ecx,%eax
ret

LLVM IR (-O0):
define i32 @test_imm_FEint8_mem(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = load i8, i8* %3
%5 = sext i8 %4 to i32
%6 = and i32 %5, -254
%7 = icmp ne i32 %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_FEint8_mem(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = sext i8 %2 to i32
%4 = and i32 %3, -254
%5 = icmp eq i32 %4, 0
%6 = select i1 %5, i32 -40, i32 -20
ret i32 %6
}
/* Type definitions */
struct mat4 {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ mat4_identity(float *);
__attribute__((always_)) struct mat4 *psmat4_identity(struct mat4 *result) {
  mat4_identity((float *)result);
  return result;
}


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

x86 assembly (clang, -O2):
<psmat4_identity>:
push   %rbx
mov    %rdi,%rbx
call   1030 <mat4_identity@plt>
mov    %rbx,%rax
pop    %rbx
ret

LLVM IR (-O0):
%struct.mat4 = type { i32 }
define %struct.mat4* @psmat4_identity(%struct.mat4* %0) {
%2 = alloca %struct.mat4*
store %struct.mat4* %0, %struct.mat4** %2
%3 = load %struct.mat4*, %struct.mat4** %2
%4 = bitcast %struct.mat4* %3 to float*
%5 = call i32 @mat4_identity(float* %4)
%6 = load %struct.mat4*, %struct.mat4** %2
ret %struct.mat4* %6
}

LLVM IR (-O2):
%struct.mat4 = type { i32 }
define %struct.mat4* @psmat4_identity(%struct.mat4* returned %0) {
%2 = bitcast %struct.mat4* %0 to float*
%3 = tail call i32 @mat4_identity(float* %2)
ret %struct.mat4* %0
}
/* Variables and functions */
int /*<<< orphan*/ output(char *);
void printApmBatTimeInfo(const char *cmd) {
  (void)cmd;
  output("Remaining battery time\t0\t0\tmin\n");
}


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

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

LLVM IR (-O0):
@.str = [32 x i8] c"Remaining battery time\090\090\09min\0A\00"
define void @printApmBatTimeInfo(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 @output(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [32 x i8] c"Remaining battery time\090\090\09min\0A\00"
define void @printApmBatTimeInfo(i8* nocapture readnone %0) {
%2 = tail call i32 @output(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ calculateTriangularNumber(int);
int main(void) {
  calculateTriangularNumber(10);
  calculateTriangularNumber(20);
  calculateTriangularNumber(50);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0xa,%edi
call   1030 <calculateTriangularNumber@plt>
mov    $0x14,%edi
call   1030 <calculateTriangularNumber@plt>
mov    $0x32,%edi
call   1030 <calculateTriangularNumber@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 @calculateTriangularNumber(i32 10)
%3 = call i32 @calculateTriangularNumber(i32 20)
%4 = call i32 @calculateTriangularNumber(i32 50)
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 @calculateTriangularNumber(i32 10)
%2 = tail call i32 @calculateTriangularNumber(i32 20)
%3 = tail call i32 @calculateTriangularNumber(i32 50)
ret i32 0
}
/* Type definitions */
typedef unsigned long val;
typedef long long uint64_t;

/* Variables and functions */
unsigned long pagemap_pfn(uint64_t val) {
  unsigned long pfn;
  if (val & (((4LL) << (64 - 3)) & (((1LL << 3) - 1) << (64 - 3))))
    pfn = ((val) & ((1LL << ((64 - 3) - 6)) - 1));
  else
    pfn = 0;
  return pfn;
}


x86 assembly (clang, -O0):
<pagemap_pfn>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movabs $0x8000000000000000,%rax
and    -0x8(%rbp),%rax
cmp    $0x0,%rax
je     1137 <pagemap_pfn+0x37>
movabs $0x7fffffffffffff,%rax
and    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
jmp    113f <pagemap_pfn+0x3f>
movq   $0x0,-0x10(%rbp)
mov    -0x10(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<pagemap_pfn>:
mov    %rdi,%rcx
sar    $0x3f,%rcx
and    %rdi,%rcx
movabs $0x7fffffffffffff,%rax
and    %rcx,%rax
ret

LLVM IR (-O0):
define i64 @pagemap_pfn(i64 %0) {
%2 = alloca i64
%3 = alloca i64
store i64 %0, i64* %2
%4 = load i64, i64* %2
%5 = and i64 %4, -9223372036854775808
%6 = icmp ne i64 %5, 0
br i1 %6, label %7, label %10
7: ; preds = %1
%8 = load i64, i64* %2
%9 = and i64 %8, 36028797018963967
store i64 %9, i64* %3
br label %11
10: ; preds = %1
store i64 0, i64* %3
br label %11
11: ; preds = %10, %7
%12 = load i64, i64* %3
ret i64 %12
}

LLVM IR (-O2):
define i64 @pagemap_pfn(i64 %0) {
%2 = and i64 %0, 36028797018963967
%3 = icmp slt i64 %0, 0
%4 = select i1 %3, i64 %2, i64 0
ret i64 %4
}
SedFluxToChannels() {}


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

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

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

LLVM IR (-O2):
define i32 @SedFluxToChannels() {
ret i32 undef
}
/* Variables and functions */
char get_from_buf();
char getc() { return get_from_buf(); }


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

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

LLVM IR (-O0):
define signext i8 @getc() {
%1 = call signext i8 (...) @get_from_buf()
ret i8 %1
}

LLVM IR (-O2):
define signext i8 @getc() {
%1 = tail call signext i8 (...) @get_from_buf()
ret i8 %1
}
/* Type definitions */
typedef int /*<<< orphan*/ WINDOW;

/* Variables and functions */
int untouchwin(int /*<<< orphan*/ *);
int ncurses_untouchwin(WINDOW *win) { return untouchwin(win); }


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

x86 assembly (clang, -O2):
<ncurses_untouchwin>:
jmp    1030 <untouchwin@plt>

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

LLVM IR (-O2):
define i32 @ncurses_untouchwin(i32* %0) {
%2 = tail call i32 @untouchwin(i32* %0)
ret i32 %2
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
int /*<<< orphan*/ scanf(char *, int *, int *);
int main(void) {
  int m, a, n, total;
  scanf("%d %d", &m, &n);
  total = ((n / 2) * m) + ((n % 2) * m) / 2;
  printf("%d", total);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
lea    0xed1(%rip),%rdi
lea    -0x4(%rbp),%rsi
lea    -0xc(%rbp),%rdx
call   1040 <scanf@plt>
mov    -0xc(%rbp),%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
imul   -0x4(%rbp),%eax
mov    %eax,-0x14(%rbp)
mov    -0xc(%rbp),%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
mov    %edx,%eax
imul   -0x4(%rbp),%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
mov    %eax,%ecx
mov    -0x14(%rbp),%eax
add    %ecx,%eax
mov    %eax,-0x10(%rbp)
mov    -0x10(%rbp),%esi
lea    0xe88(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xed8(%rip),%rdi
lea    0x4(%rsp),%rsi
mov    %rsp,%rdx
call   1040 <scanf@plt>
mov    (%rsp),%eax
mov    0x4(%rsp),%ecx
mov    %eax,%edx
shr    $0x1f,%edx
add    %eax,%edx
mov    %edx,%edi
sar    %edi
imul   %ecx,%edi
and    $0xfffffffe,%edx
sub    %edx,%eax
imul   %ecx,%eax
mov    %eax,%esi
shr    $0x1f,%esi
add    %eax,%esi
sar    %esi
add    %edi,%esi
lea    0xe9f(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [6 x i8] c"%d %d\00"
@.str.1 = [3 x i8] c"%d\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
%5 = call i32 @scanf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i32* %1, i32* %3)
%6 = load i32, i32* %3
%7 = sdiv i32 %6, 2
%8 = load i32, i32* %1
%9 = mul nsw i32 %7, %8
%10 = load i32, i32* %3
%11 = srem i32 %10, 2
%12 = load i32, i32* %1
%13 = mul nsw i32 %11, %12
%14 = sdiv i32 %13, 2
%15 = add nsw i32 %9, %14
store i32 %15, i32* %4
%16 = load i32, i32* %4
%17 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32 %16)
ret i32 0
}

LLVM IR (-O2):
@.str = [6 x i8] c"%d %d\00"
@.str.1 = [3 x i8] c"%d\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = bitcast i32* %1 to i8*
%4 = bitcast i32* %2 to i8*
%5 = call i32 @scanf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i32* %1, i32* %2)
%6 = load i32, i32* %2
%7 = sdiv i32 %6, 2
%8 = load i32, i32* %1
%9 = mul nsw i32 %7, %8
%10 = srem i32 %6, 2
%11 = mul nsw i32 %10, %8
%12 = sdiv i32 %11, 2
%13 = add nsw i32 %12, %9
%14 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32 %13)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ gdb_reset(int);
void gdb_cmd_kill(char *gdb_packet, int packet_len) {
  (void)gdb_packet;
  (void)packet_len;
  gdb_reset(1);
}


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

x86 assembly (clang, -O2):
<gdb_cmd_kill>:
mov    $0x1,%edi
jmp    1030 <gdb_reset@plt>

LLVM IR (-O0):
define void @gdb_cmd_kill(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 @gdb_reset(i32 1)
ret void
}

LLVM IR (-O2):
define void @gdb_cmd_kill(i8* nocapture readnone %0, i32 %1) {
%3 = tail call i32 @gdb_reset(i32 1)
ret void
}
int test_imm_F3uint8_mem(unsigned char *val) {
  return ((*val) & (-0xF3 << 0)) ? -20 : -40;
}


x86 assembly (clang, -O0):
<test_imm_F3uint8_mem>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movzbl (%rax),%edx
and    $0xffffff0d,%edx
mov    $0xffffffd8,%eax
mov    $0xffffffec,%ecx
cmp    $0x0,%edx
cmovne %ecx,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @test_imm_F3uint8_mem(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = load i8, i8* %3
%5 = zext i8 %4 to i32
%6 = and i32 %5, -243
%7 = icmp ne i32 %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_F3uint8_mem(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = and i8 %2, 13
%4 = icmp eq i8 %3, 0
%5 = select i1 %4, i32 -40, i32 -20
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fputs(char *, int /*<<< orphan*/);
int /*<<< orphan*/ stdout;
void read_err(void) {
  fputs("\nError: error during the reading of the input file\n\n", stdout);
  exit(1);
}


x86 assembly (clang, -O0):
<read_err>:
push   %rbp
mov    %rsp,%rbp
mov    0x2eb5(%rip),%rax
mov    (%rax),%esi
lea    0xecc(%rip),%rdi
call   1030 <fputs@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<read_err>:
push   %rax
mov    0x2eb8(%rip),%rax
mov    (%rax),%esi
lea    0xecf(%rip),%rdi
call   1030 <fputs@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@.str = [53 x i8] c"\0AError: error during the reading of the input file\0A\0A\00"
@stdout = global i32 0
define void @read_err() {
%1 = load i32, i32* @stdout
%2 = call i32 @fputs(i8* getelementptr inbounds ([53 x i8], [53 x i8]* @.str, i64 0, i64 0), i32 %1)
%3 = call i32 @exit(i32 1)
unreachable
}

LLVM IR (-O2):
@.str = [53 x i8] c"\0AError: error during the reading of the input file\0A\0A\00"
@stdout = global i32 0
define void @read_err() {
%1 = load i32, i32* @stdout
%2 = tail call i32 @fputs(i8* getelementptr inbounds ([53 x i8], [53 x i8]* @.str, i64 0, i64 0), i32 %1)
%3 = tail call i32 @exit(i32 1)
unreachable
}
const char *_Locale_mon_grouping(struct _Locale_monetary *__DUMMY_PAR) {
  return "";
}


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

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

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

LLVM IR (-O2):
%struct._Locale_monetary = type opaque
@.str = [1 x i8] zeroinitializer
define i8* @_Locale_mon_grouping(%struct._Locale_monetary* nocapture readnone %0) {
ret i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str, i64 0, i64 0)
}
/* Type definitions */
typedef int uint8_t;
struct pci_dev {
  int dummy;
};

/* Variables and functions */
int pci_read_byte(struct pci_dev *, int);
int /*<<< orphan*/ rpci_write_byte(struct pci_dev *, int, int);
int enable_flash_ali_m1533(struct pci_dev *dev, const char *name) {
  uint8_t tmp;
  tmp = pci_read_byte(dev, 0x47);
  tmp |= 0x46;
  rpci_write_byte(dev, 0x47, tmp);
  return 0;
}


x86 assembly (clang, -O0):
<enable_flash_ali_m1533>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    $0x47,%esi
call   1030 <pci_read_byte@plt>
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
or     $0x46,%eax
mov    %eax,-0x14(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x14(%rbp),%edx
mov    $0x47,%esi
call   1040 <rpci_write_byte@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<enable_flash_ali_m1533>:
push   %rbx
mov    %rdi,%rbx
mov    $0x47,%esi
call   1030 <pci_read_byte@plt>
or     $0x46,%eax
mov    %rbx,%rdi
mov    $0x47,%esi
mov    %eax,%edx
call   1040 <rpci_write_byte@plt>
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
%struct.pci_dev = type { i32 }
define i32 @enable_flash_ali_m1533(%struct.pci_dev* %0, i8* %1) {
%3 = alloca %struct.pci_dev*
%4 = alloca i8*
%5 = alloca i32
store %struct.pci_dev* %0, %struct.pci_dev** %3
store i8* %1, i8** %4
%6 = load %struct.pci_dev*, %struct.pci_dev** %3
%7 = call i32 @pci_read_byte(%struct.pci_dev* %6, i32 71)
store i32 %7, i32* %5
%8 = load i32, i32* %5
%9 = or i32 %8, 70
store i32 %9, i32* %5
%10 = load %struct.pci_dev*, %struct.pci_dev** %3
%11 = load i32, i32* %5
%12 = call i32 @rpci_write_byte(%struct.pci_dev* %10, i32 71, i32 %11)
ret i32 0
}

LLVM IR (-O2):
%struct.pci_dev = type { i32 }
define i32 @enable_flash_ali_m1533(%struct.pci_dev* %0, i8* nocapture readnone %1) {
%3 = tail call i32 @pci_read_byte(%struct.pci_dev* %0, i32 71)
%4 = or i32 %3, 70
%5 = tail call i32 @rpci_write_byte(%struct.pci_dev* %0, i32 71, i32 %4)
ret i32 0
}
/* Type definitions */
typedef int /*<<< orphan*/ __m128;

/* Variables and functions */
int _mm_comineq_ss(int /*<<< orphan*/, int /*<<< orphan*/);
int test_mm_comineq_ss(__m128 A, __m128 B) { return _mm_comineq_ss(A, B); }


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

x86 assembly (clang, -O2):
<test_mm_comineq_ss>:
jmp    1030 <_mm_comineq_ss@plt>

LLVM IR (-O0):
define i32 @test_mm_comineq_ss(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 @_mm_comineq_ss(i32 %5, i32 %6)
ret i32 %7
}

LLVM IR (-O2):
define i32 @test_mm_comineq_ss(i32 %0, i32 %1) {
%3 = tail call i32 @_mm_comineq_ss(i32 %0, i32 %1)
ret i32 %3
}
void dummy_destroy(void *nil) { return; }


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

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

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

LLVM IR (-O2):
define void @dummy_destroy(i8* nocapture %0) {
ret void
}
long double csys(x)
char *x;
{
  void system();
  system(x + 1);
  cmdh();
  return (0.0L);
}


x86 assembly (clang, -O0):
<csys>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
add    $0x1,%rdi
xor    %eax,%eax
mov    %al,-0x9(%rbp)
call   1030 <system@plt>
mov    -0x9(%rbp),%al
call   1040 <cmdh@plt>
fldz
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<csys>:
push   %rax
add    $0x1,%rdi
xor    %eax,%eax
call   1030 <system@plt>
xor    %eax,%eax
call   1040 <cmdh@plt>
fldz
pop    %rax
ret

LLVM IR (-O0):
define x86_fp80 @csys(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = getelementptr inbounds i8, i8* %3, i64 1
%5 = call i32 (...) @cmdh()
ret x86_fp80 0xK00000000000000000000
}

LLVM IR (-O2):
define x86_fp80 @csys(i8* %0) {
%2 = getelementptr inbounds i8, i8* %0, i64 1
tail call void (i8*, ...) bitcast (void (...)* @system to void (i8*, ...)*)(i8* %2)
%3 = tail call i32 (...) @cmdh()
ret x86_fp80 0xK00000000000000000000
}
void gs_show_cursor(long display, unsigned char show) {}


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

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

LLVM IR (-O0):
define void @gs_show_cursor(i64 %0, i8 zeroext %1) {
%3 = alloca i64
%4 = alloca i8
store i64 %0, i64* %3
store i8 %1, i8* %4
ret void
}

LLVM IR (-O2):
define void @gs_show_cursor(i64 %0, i8 zeroext %1) {
ret void
}
/* Variables and functions */
int do_send(int, char *, char const *);
int irc_who(int fd, const char *channel) {
  return do_send(fd, "WHO %s", channel);
}


x86 assembly (clang, -O0):
<irc_who>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x10(%rbp),%rdx
lea    0xed3(%rip),%rsi
call   1030 <do_send@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<irc_who>:
mov    %rsi,%rdx
lea    0xee6(%rip),%rsi
jmp    1030 <do_send@plt>

LLVM IR (-O0):
@.str = [7 x i8] c"WHO %s\00"
define i32 @irc_who(i32 %0, i8* %1) {
%3 = alloca i32
%4 = alloca i8*
store i32 %0, i32* %3
store i8* %1, i8** %4
%5 = load i32, i32* %3
%6 = load i8*, i8** %4
%7 = call i32 @do_send(i32 %5, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i8* %6)
ret i32 %7
}

LLVM IR (-O2):
@.str = [7 x i8] c"WHO %s\00"
define i32 @irc_who(i32 %0, i8* %1) {
%3 = tail call i32 @do_send(i32 %0, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i8* %1)
ret i32 %3
}
void backfa_(onoff) int *onoff;
{ backface(*onoff); }


x86 assembly (clang, -O0):
<backfa_>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%edi
mov    $0x0,%al
call   1030 <backface@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<backfa_>:
mov    (%rdi),%edi
xor    %eax,%eax
jmp    1030 <backface@plt>

LLVM IR (-O0):
define void @backfa_(i32* %0) {
%2 = alloca i32*
store i32* %0, i32** %2
%3 = load i32*, i32** %2
%4 = load i32, i32* %3
%5 = call i32 (i32, ...) bitcast (i32 (...)* @backface to i32 (i32, ...)*)(i32 %4)
ret void
}

LLVM IR (-O2):
define void @backfa_(i32* nocapture %0) {
%2 = load i32, i32* %0
%3 = tail call i32 (i32, ...) bitcast (i32 (...)* @backface to i32 (i32, ...)*)(i32 %2)
ret void
}
int defined_twice_a(void) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @defined_twice_a() {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ pthread_testcancel();
int foo() {
  pthread_testcancel();
  return 27;
}


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

x86 assembly (clang, -O2):
<foo>:
push   %rax
xor    %eax,%eax
call   1030 <pthread_testcancel@plt>
mov    $0x1b,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @foo() {
%1 = call i32 (...) @pthread_testcancel()
ret i32 27
}

LLVM IR (-O2):
define i32 @foo() {
%1 = tail call i32 (...) @pthread_testcancel()
ret i32 27
}
/* Type definitions */
typedef int uint64_t;

/* Variables and functions */
int /*<<< orphan*/ printf(char *, ...);
void print_v16w4(uint64_t x) {
  uint64_t d;
  printf("[");
  while (x != 0) {
    d = x & 0xf;
    printf("%lu;", d);
    x >>= 4;
  }
  printf("]\n");
}


x86 assembly (clang, -O0):
<print_v16w4>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
lea    0xede(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
cmpl   $0x0,-0x4(%rbp)
je     115b <print_v16w4+0x4b>
mov    -0x4(%rbp),%eax
and    $0xf,%eax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%esi
lea    0xebc(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x4(%rbp),%eax
sar    $0x4,%eax
mov    %eax,-0x4(%rbp)
jmp    1129 <print_v16w4+0x19>
lea    0xea5(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<print_v16w4>:
push   %rbp
push   %r14
push   %rbx
mov    %edi,%ebx
mov    $0x5b,%edi
call   1030 <putchar@plt>
test   %ebx,%ebx
je     1169 <print_v16w4+0x39>
lea    0xeb5(%rip),%r14
mov    %ebx,%ebp
nopl   (%rax)
mov    %ebx,%esi
and    $0xf,%esi
mov    %r14,%rdi
xor    %eax,%eax
call   1050 <printf@plt>
sar    $0x4,%ebp
cmp    $0xf,%ebx
mov    %ebp,%ebx
ja     1150 <print_v16w4+0x20>
lea    0xe95(%rip),%rdi
pop    %rbx
pop    %r14
pop    %rbp
jmp    1040 <puts@plt>

LLVM IR (-O0):
@.str = [2 x i8] c"[\00"
@.str.1 = [5 x i8] c"%lu;\00"
@.str.2 = [3 x i8] c"]\0A\00"
define void @print_v16w4(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %2
%4 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
br label %5
5: ; preds = %8, %1
%6 = load i32, i32* %2
%7 = icmp ne i32 %6, 0
br i1 %7, label %8, label %15
8: ; preds = %5
%9 = load i32, i32* %2
%10 = and i32 %9, 15
store i32 %10, i32* %3
%11 = load i32, i32* %3
%12 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0), i32 %11)
%13 = load i32, i32* %2
%14 = ashr i32 %13, 4
store i32 %14, i32* %2
br label %5
15: ; preds = %5
%16 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str.1 = [5 x i8] c"%lu;\00"
@str = [2 x i8] c"]\00"
define void @print_v16w4(i32 %0) {
%2 = tail call i32 @putchar(i32 91)
%3 = icmp eq i32 %0, 0
br i1 %3, label %10, label %4
4: ; preds = %1, %4
%5 = phi i32 [ %8, %4 ], [ %0, %1 ]
%6 = and i32 %5, 15
%7 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0), i32 %6)
%8 = ashr i32 %5, 4
%9 = icmp ult i32 %5, 16
br i1 %9, label %10, label %4
10: ; preds = %4, %1
%11 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([2 x i8], [2 x i8]* @str, i64 0, i64 0))
ret void
}
double cdfUniform(double a, double b, double x) { return ((x - a) / (b - a)); }


x86 assembly (clang, -O0):
<cdfUniform>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  %xmm2,-0x18(%rbp)
movsd  -0x18(%rbp),%xmm0
subsd  -0x8(%rbp),%xmm0
movsd  -0x10(%rbp),%xmm1
subsd  -0x8(%rbp),%xmm1
divsd  %xmm1,%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<cdfUniform>:
subsd  %xmm0,%xmm2
subsd  %xmm0,%xmm1
divsd  %xmm1,%xmm2
movapd %xmm2,%xmm0
ret

LLVM IR (-O0):
define double @cdfUniform(double %0, double %1, double %2) {
%4 = alloca double
%5 = alloca double
%6 = alloca double
store double %0, double* %4
store double %1, double* %5
store double %2, double* %6
%7 = load double, double* %6
%8 = load double, double* %4
%9 = fsub double %7, %8
%10 = load double, double* %5
%11 = load double, double* %4
%12 = fsub double %10, %11
%13 = fdiv double %9, %12
ret double %13
}

LLVM IR (-O2):
define double @cdfUniform(double %0, double %1, double %2) {
%4 = fsub double %2, %0
%5 = fsub double %1, %0
%6 = fdiv double %4, %5
ret double %6
}