xunge/DecIR huggingface dataset:
/* Variables and functions */
scalar_t__ is_alpha(char const);
char *__skip_alpha(const char *s) {
  while (is_alpha(*s))
    s++;
  return (char *)s;
}


x86 assembly (clang, -O0):
<__skip_alpha>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movsbl (%rax),%edi
call   1030 <is_alpha@plt>
cmp    $0x0,%rax
je     1143 <__skip_alpha+0x33>
mov    -0x8(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x8(%rbp)
jmp    111c <__skip_alpha+0xc>
mov    -0x8(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<__skip_alpha>:
push   %rbx
mov    %rdi,%rbx
add    $0xffffffffffffffff,%rbx
nopl   0x0(%rax,%rax,1)
movsbl 0x1(%rbx),%edi
add    $0x1,%rbx
call   1030 <is_alpha@plt>
test   %rax,%rax
jne    1120 <__skip_alpha+0x10>
mov    %rbx,%rax
pop    %rbx
ret

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

LLVM IR (-O2):
define i8* @__skip_alpha(i8* %0) {
br label %2
2: ; preds = %2, %1
%3 = phi i8* [ %0, %1 ], [ %7, %2 ]
%4 = load i8, i8* %3
%5 = tail call i64 @is_alpha(i8 signext %4)
%6 = icmp eq i64 %5, 0
%7 = getelementptr inbounds i8, i8* %3, i64 1
br i1 %6, label %8, label %2
8: ; preds = %2
ret i8* %3
}
int main() {
  int a;
  a = 3;
  if (!a)
    return 1;
  return 2;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
movl   $0x0,-0x4(%rbp)
movl   $0x3,-0x8(%rbp)
cmpl   $0x0,-0x8(%rbp)
jne    1128 <main+0x28>
movl   $0x1,-0x4(%rbp)
jmp    112f <main+0x2f>
movl   $0x2,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
store i32 0, i32* %1
store i32 3, i32* %2
%3 = load i32, i32* %2
%4 = icmp ne i32 %3, 0
br i1 %4, label %6, label %5
5: ; preds = %0
store i32 1, i32* %1
br label %7
6: ; preds = %0
store i32 2, i32* %1
br label %7
7: ; preds = %6, %5
%8 = load i32, i32* %1
ret i32 %8
}

LLVM IR (-O2):
define i32 @main() {
ret i32 2
}
/* Variables and functions */
int /*<<< orphan*/ uart_puts(char *);
void key_2_handler(void) {
  uart_puts("\nkey_2_handler");
  return;
}


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

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

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

LLVM IR (-O2):
@.str = [15 x i8] c"\0Akey_2_handler\00"
define void @key_2_handler() {
%1 = tail call i32 @uart_puts(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ fatal(char *);
void jogmap_rd_init(const char *fname) {
  fatal("xol"
        ": This build excluded \""
        "xol"
        "\" support because expat was not installed.\n");
}


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

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

LLVM IR (-O0):
@.str = [73 x i8] c"xol: This build excluded \22xol\22 support because expat was not installed.\0A\00"
define void @jogmap_rd_init(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = call i32 @fatal(i8* getelementptr inbounds ([73 x i8], [73 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [73 x i8] c"xol: This build excluded \22xol\22 support because expat was not installed.\0A\00"
define void @jogmap_rd_init(i8* nocapture readnone %0) {
%2 = tail call i32 @fatal(i8* getelementptr inbounds ([73 x i8], [73 x i8]* @.str, i64 0, i64 0))
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ msg;

/* Variables and functions */
int /*<<< orphan*/ printf(char *, ...);
void fortune_cookie(char msg[]) {
  printf("size of message %i\n", sizeof(msg));
  printf("Message reads %s\n", msg);
  printf("message is stored at %p\n", &msg);
}


x86 assembly (clang, -O0):
<fortune_cookie>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
lea    0xedd(%rip),%rdi
mov    $0x8,%esi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x8(%rbp),%rsi
lea    0xeda(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xede(%rip),%rdi
lea    -0x8(%rbp),%rsi
mov    $0x0,%al
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fortune_cookie>:
push   %rbx
sub    $0x10,%rsp
mov    %rdi,%rbx
mov    %rdi,0x8(%rsp)
lea    0xedc(%rip),%rdi
mov    $0x8,%esi
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xedd(%rip),%rdi
mov    %rbx,%rsi
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xede(%rip),%rdi
lea    0x8(%rsp),%rsi
xor    %eax,%eax
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@.str = [20 x i8] c"size of message %i\0A\00"
@.str.1 = [18 x i8] c"Message reads %s\0A\00"
@.str.2 = [25 x i8] c"message is stored at %p\0A\00"
define void @fortune_cookie(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0), i64 8)
%4 = load i8*, i8** %2
%5 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.1, i64 0, i64 0), i8* %4)
%6 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.2, i64 0, i64 0), i8** %2)
ret void
}

LLVM IR (-O2):
@.str = [20 x i8] c"size of message %i\0A\00"
@.str.1 = [18 x i8] c"Message reads %s\0A\00"
@.str.2 = [25 x i8] c"message is stored at %p\0A\00"
define void @fortune_cookie(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0), i64 8)
%4 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([18 x i8], [18 x i8]* @.str.1, i64 0, i64 0), i8* %0)
%5 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([25 x i8], [25 x i8]* @.str.2, i64 0, i64 0), i8** %2)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ free(int *);
void nullFree() {
  int *p = 0;
  free(p);
}


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

x86 assembly (clang, -O2):
<nullFree>:
xor    %edi,%edi
jmp    1030 <free@plt>

LLVM IR (-O0):
define void @nullFree() {
%1 = alloca i32*
store i32* null, i32** %1
%2 = load i32*, i32** %1
%3 = call i32 @free(i32* %2)
ret void
}

LLVM IR (-O2):
define void @nullFree() {
%1 = tail call i32 @free(i32* null)
ret void
}
void SensorSetContrast_SANYO(unsigned char val) {}


x86 assembly (clang, -O0):
<SensorSetContrast_SANYO>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x1(%rbp)
pop    %rbp
ret

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

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

LLVM IR (-O2):
define void @SensorSetContrast_SANYO(i8 zeroext %0) {
ret void
}
void iio_simple_dummy_unconfigure_buffer(struct iio_dev *indio_dev) {}


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

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

LLVM IR (-O0):
%struct.iio_dev = type opaque
define void @iio_simple_dummy_unconfigure_buffer(%struct.iio_dev* %0) {
%2 = alloca %struct.iio_dev*
store %struct.iio_dev* %0, %struct.iio_dev** %2
ret void
}

LLVM IR (-O2):
%struct.iio_dev = type opaque
define void @iio_simple_dummy_unconfigure_buffer(%struct.iio_dev* nocapture %0) {
ret void
}
/* Type definitions */
typedef int uint32_t;

/* Variables and functions */
int /*<<< orphan*/ ASSERT(int);
void EMACTimestampPPSPeriodSet(uint32_t ui32Base, uint32_t ui32Period,
                               uint32_t ui32Width) {
  ASSERT(ui32Base == 0x400EC000);
  (*((volatile uint32_t *)(ui32Base + 0x00000760))) = ui32Period;
  (*((volatile uint32_t *)(ui32Base + 0x00000764))) = ui32Width;
}


x86 assembly (clang, -O0):
<EMACTimestampPPSPeriodSet>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
cmpl   $0x400ec000,-0x4(%rbp)
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <ASSERT@plt>
mov    -0x8(%rbp),%ecx
mov    -0x4(%rbp),%eax
add    $0x760,%eax
cltq
mov    %ecx,(%rax)
mov    -0xc(%rbp),%ecx
mov    -0x4(%rbp),%eax
add    $0x764,%eax
cltq
mov    %ecx,(%rax)
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<EMACTimestampPPSPeriodSet>:
push   %rbp
push   %r14
push   %rbx
mov    %edx,%r14d
mov    %esi,%ebp
mov    %edi,%ebx
xor    %edi,%edi
cmp    $0x400ec000,%ebx
sete   %dil
call   1030 <ASSERT@plt>
movslq %ebx,%rax
mov    %ebp,0x760(%rax)
mov    %r14d,0x764(%rax)
pop    %rbx
pop    %r14
pop    %rbp
ret

LLVM IR (-O0):
define void @EMACTimestampPPSPeriodSet(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
%7 = load i32, i32* %4
%8 = icmp eq i32 %7, 1074708480
%9 = zext i1 %8 to i32
%10 = call i32 @ASSERT(i32 %9)
%11 = load i32, i32* %5
%12 = load i32, i32* %4
%13 = add nsw i32 %12, 1888
%14 = sext i32 %13 to i64
%15 = inttoptr i64 %14 to i32*
store volatile i32 %11, i32* %15
%16 = load i32, i32* %6
%17 = load i32, i32* %4
%18 = add nsw i32 %17, 1892
%19 = sext i32 %18 to i64
%20 = inttoptr i64 %19 to i32*
store volatile i32 %16, i32* %20
ret void
}

LLVM IR (-O2):
define void @EMACTimestampPPSPeriodSet(i32 %0, i32 %1, i32 %2) {
%4 = icmp eq i32 %0, 1074708480
%5 = zext i1 %4 to i32
%6 = tail call i32 @ASSERT(i32 %5)
%7 = add nsw i32 %0, 1888
%8 = sext i32 %7 to i64
%9 = inttoptr i64 %8 to i32*
store volatile i32 %1, i32* %9
%10 = add nsw i32 %0, 1892
%11 = sext i32 %10 to i64
%12 = inttoptr i64 %11 to i32*
store volatile i32 %2, i32* %12
ret void
}
cbuf27(f, n) int f, n;
{ cbuf(f, n, 27); }


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

x86 assembly (clang, -O2):
<cbuf27>:
mov    $0x1b,%edx
xor    %eax,%eax
jmp    1030 <cbuf@plt>

LLVM IR (-O0):
define i32 @cbuf27(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
store i32 %0, i32* %4
store i32 %1, i32* %5
%6 = load i32, i32* %4
%7 = load i32, i32* %5
%8 = call i32 (i32, i32, i32, ...) bitcast (i32 (...)* @cbuf to i32 (i32, i32, i32, ...)*)(i32 %6, i32 %7, i32 27)
%9 = load i32, i32* %3
ret i32 %9
}

LLVM IR (-O2):
define i32 @cbuf27(i32 %0, i32 %1) {
%3 = tail call i32 (i32, i32, i32, ...) bitcast (i32 (...)* @cbuf to i32 (i32, i32, i32, ...)*)(i32 %0, i32 %1, i32 27)
ret i32 undef
}
/* Type definitions */
struct bitpack__clump {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int encode_big_endian(char *target, struct bitpack__clump *source) {
  printf("Not implemented");
  return -1;
}


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

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

LLVM IR (-O0):
%struct.bitpack__clump = type { i32 }
@.str = [16 x i8] c"Not implemented\00"
define i32 @encode_big_endian(i8* %0, %struct.bitpack__clump* %1) {
%3 = alloca i8*
%4 = alloca %struct.bitpack__clump*
store i8* %0, i8** %3
store %struct.bitpack__clump* %1, %struct.bitpack__clump** %4
%5 = call i32 @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0))
ret i32 -1
}

LLVM IR (-O2):
%struct.bitpack__clump = type { i32 }
@.str = [16 x i8] c"Not implemented\00"
define i32 @encode_big_endian(i8* nocapture readnone %0, %struct.bitpack__clump* nocapture readnone %1) {
%3 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0))
ret i32 -1
}
void PWM_device_channel_start_all() {}


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

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

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

LLVM IR (-O2):
define void @PWM_device_channel_start_all() {
ret void
}
__attribute__((always_)) void file_reset_write(struct file *filp) {}


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

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

LLVM IR (-O0):
%struct.file = type opaque
define void @file_reset_write(%struct.file* %0) {
%2 = alloca %struct.file*
store %struct.file* %0, %struct.file** %2
ret void
}

LLVM IR (-O2):
%struct.file = type opaque
define void @file_reset_write(%struct.file* nocapture %0) {
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ uint8_t;
typedef int /*<<< orphan*/ uint64_t;

/* Variables and functions */
int /*<<< orphan*/ memcpy(int /*<<< orphan*/ *, int /*<<< orphan*/ const *,
                          int);
uint64_t load64_le(const uint8_t src[8]) {
  uint64_t w;
  memcpy(&w, src, sizeof w);
  return w;
}


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

x86 assembly (clang, -O2):
<load64_le>:
push   %rax
mov    %rdi,%rsi
lea    0x4(%rsp),%rdi
mov    $0x4,%edx
call   1030 <memcpy@plt>
mov    0x4(%rsp),%eax
pop    %rcx
ret

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

LLVM IR (-O2):
define i32 @load64_le(i32* %0) {
%2 = alloca i32
%3 = bitcast i32* %2 to i8*
%4 = call i32 @memcpy(i32* %2, i32* %0, i32 4)
%5 = load i32, i32* %2
ret i32 %5
}
/* Type definitions */
typedef int uint64_t;
typedef int /*<<< orphan*/ uint32_t;

/* Variables and functions */
int read_at_be32(void const *, int);
int read_be32(void const *);
uint64_t read_be64(const void *src) {
  uint64_t val;
  val = read_be32(src);
  val <<= 32;
  val |= read_at_be32(src, sizeof(uint32_t));
  return val;
}


x86 assembly (clang, -O0):
<read_be64>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <read_be32@plt>
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
mov    $0x20,%ecx
shl    %cl,%eax
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%rdi
mov    $0x4,%esi
call   1040 <read_at_be32@plt>
or     -0xc(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<read_be64>:
push   %rbx
mov    %rdi,%rbx
call   1030 <read_be32@plt>
mov    %rbx,%rdi
mov    $0x4,%esi
pop    %rbx
jmp    1040 <read_at_be32@plt>

LLVM IR (-O0):
define i32 @read_be64(i8* %0) {
%2 = alloca i8*
%3 = alloca i32
store i8* %0, i8** %2
%4 = load i8*, i8** %2
%5 = call i32 @read_be32(i8* %4)
store i32 %5, i32* %3
%6 = load i32, i32* %3
%7 = shl i32 %6, 32
store i32 %7, i32* %3
%8 = load i8*, i8** %2
%9 = call i32 @read_at_be32(i8* %8, i32 4)
%10 = load i32, i32* %3
%11 = or i32 %10, %9
store i32 %11, i32* %3
%12 = load i32, i32* %3
ret i32 %12
}

LLVM IR (-O2):
define i32 @read_be64(i8* %0) {
%2 = tail call i32 @read_be32(i8* %0)
%3 = tail call i32 @read_at_be32(i8* %0, i32 4)
ret i32 poison
}
/* Variables and functions */
int /*<<< orphan*/ abort();
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int f(int);
main() {
  if (f(4) != 2)
    abort();
  exit(0);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x4,%edi
call   1040 <f@plt>
cmp    $0x2,%eax
je     1159 <main+0x29>
mov    $0x0,%al
call   1030 <abort@plt>
xor    %edi,%edi
call   1050 <exit@plt>

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    $0x4,%edi
call   1040 <f@plt>
cmp    $0x2,%eax
jne    1147 <main+0x17>
xor    %edi,%edi
call   1050 <exit@plt>
xor    %eax,%eax
call   1030 <abort@plt>

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 @f(i32 4)
%3 = icmp ne i32 %2, 2
br i1 %3, label %4, label %6
4: ; preds = %0
%5 = call i32 (...) @abort()
unreachable
6: ; preds = %0
%7 = call i32 @exit(i32 0)
unreachable
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 @f(i32 4)
%2 = icmp eq i32 %1, 2
br i1 %2, label %5, label %3
3: ; preds = %0
%4 = tail call i32 (...) @abort()
unreachable
5: ; preds = %0
%6 = tail call i32 @exit(i32 0)
unreachable
}
/* Type definitions */
struct memorycontainer {
  int dummy;
};

/* Variables and functions */
struct memorycontainer *createExpression(int, struct memorycontainer *,
                                         struct memorycontainer *);
struct memorycontainer *
createModExpression(struct memorycontainer *expression1,
                    struct memorycontainer *expression2) {
  return createExpression(0x000F, expression1, expression2);
}


x86 assembly (clang, -O0):
<createModExpression>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rsi
mov    -0x10(%rbp),%rdx
mov    $0xf,%edi
call   1030 <createExpression@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<createModExpression>:
mov    %rsi,%rdx
mov    %rdi,%rsi
mov    $0xf,%edi
jmp    1030 <createExpression@plt>

LLVM IR (-O0):
%struct.memorycontainer = type { i32 }
define %struct.memorycontainer* @createModExpression(%struct.memorycontainer* %0, %struct.memorycontainer* %1) {
%3 = alloca %struct.memorycontainer*
%4 = alloca %struct.memorycontainer*
store %struct.memorycontainer* %0, %struct.memorycontainer** %3
store %struct.memorycontainer* %1, %struct.memorycontainer** %4
%5 = load %struct.memorycontainer*, %struct.memorycontainer** %3
%6 = load %struct.memorycontainer*, %struct.memorycontainer** %4
%7 = call %struct.memorycontainer* @createExpression(i32 15, %struct.memorycontainer* %5, %struct.memorycontainer* %6)
ret %struct.memorycontainer* %7
}

LLVM IR (-O2):
%struct.memorycontainer = type { i32 }
define %struct.memorycontainer* @createModExpression(%struct.memorycontainer* %0, %struct.memorycontainer* %1) {
%3 = tail call %struct.memorycontainer* @createExpression(i32 15, %struct.memorycontainer* %0, %struct.memorycontainer* %1)
ret %struct.memorycontainer* %3
}
/* Type definitions */
struct termios {
  int c_oflag;
};

/* Variables and functions */
int INLCR;
int OPOST;
int /*<<< orphan*/ TCSADRAIN;
int /*<<< orphan*/ tcgetattr(int /*<<< orphan*/, struct termios *);
int /*<<< orphan*/ tcsetattr(int /*<<< orphan*/, int /*<<< orphan*/,
                             struct termios *);
void newlines_off(void) {
  struct termios t;
  tcgetattr(0, &t);
  t.c_oflag &= ~(INLCR | OPOST);
  tcsetattr(0, TCSADRAIN, &t);
}


x86 assembly (clang, -O0):
<newlines_off>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
xor    %edi,%edi
lea    -0x8(%rbp),%rsi
call   1030 <tcgetattr@plt>
mov    0x2eae(%rip),%rax
mov    (%rax),%eax
mov    0x2e9d(%rip),%rcx
or     (%rcx),%eax
xor    $0xffffffff,%eax
and    -0x8(%rbp),%eax
mov    %eax,-0x8(%rbp)
mov    0x2e7b(%rip),%rax
mov    (%rax),%esi
xor    %edi,%edi
lea    -0x8(%rbp),%rdx
call   1040 <tcsetattr@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<newlines_off>:
push   %rbx
sub    $0x10,%rsp
lea    0x8(%rsp),%rbx
xor    %edi,%edi
mov    %rbx,%rsi
call   1030 <tcgetattr@plt>
mov    0x2ead(%rip),%rax
mov    0x2e9e(%rip),%rcx
mov    (%rcx),%ecx
or     (%rax),%ecx
not    %ecx
and    %ecx,0x8(%rsp)
mov    0x2e7d(%rip),%rax
mov    (%rax),%esi
xor    %edi,%edi
mov    %rbx,%rdx
call   1040 <tcsetattr@plt>
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
%struct.termios = type { i32 }
@INLCR = global i32 0
@OPOST = global i32 0
@TCSADRAIN = global i32 0
define void @newlines_off() {
%1 = alloca %struct.termios
%2 = call i32 @tcgetattr(i32 0, %struct.termios* %1)
%3 = load i32, i32* @INLCR
%4 = load i32, i32* @OPOST
%5 = or i32 %3, %4
%6 = xor i32 %5, -1
%7 = getelementptr inbounds %struct.termios, %struct.termios* %1, i32 0, i32 0
%8 = load i32, i32* %7
%9 = and i32 %8, %6
store i32 %9, i32* %7
%10 = load i32, i32* @TCSADRAIN
%11 = call i32 @tcsetattr(i32 0, i32 %10, %struct.termios* %1)
ret void
}

LLVM IR (-O2):
%struct.termios = type { i32 }
@INLCR = global i32 0
@OPOST = global i32 0
@TCSADRAIN = global i32 0
define void @newlines_off() {
%1 = alloca %struct.termios
%2 = bitcast %struct.termios* %1 to i8*
%3 = call i32 @tcgetattr(i32 0, %struct.termios* %1)
%4 = load i32, i32* @INLCR
%5 = load i32, i32* @OPOST
%6 = or i32 %5, %4
%7 = xor i32 %6, -1
%8 = getelementptr inbounds %struct.termios, %struct.termios* %1, i64 0, i32 0
%9 = load i32, i32* %8
%10 = and i32 %9, %7
store i32 %10, i32* %8
%11 = load i32, i32* @TCSADRAIN
%12 = call i32 @tcsetattr(i32 0, i32 %11, %struct.termios* %1)
ret void
}
/* Variables and functions */
int sck_sendf(int, char *, char const *);
int irc_part(int s, const char *data) {
  return sck_sendf(s, "PART %s\r\n", data);
}


x86 assembly (clang, -O0):
<irc_part>:
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 <sck_sendf@plt>
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
@.str = [10 x i8] c"PART %s\0D\0A\00"
define i32 @irc_part(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 @sck_sendf(i32 %5, i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i8* %6)
ret i32 %7
}

LLVM IR (-O2):
@.str = [10 x i8] c"PART %s\0D\0A\00"
define i32 @irc_part(i32 %0, i8* %1) {
%3 = tail call i32 @sck_sendf(i32 %0, i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i8* %1)
ret i32 %3
}
double add2(int a, float b, double c) { return c + a + b; }


x86 assembly (clang, -O0):
<add2>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
movss  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  -0x10(%rbp),%xmm0
cvtsi2sdl -0x4(%rbp),%xmm1
addsd  %xmm1,%xmm0
movss  -0x8(%rbp),%xmm1
cvtss2sd %xmm1,%xmm1
addsd  %xmm1,%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<add2>:
cvtsi2sd %edi,%xmm2
addsd  %xmm1,%xmm2
cvtss2sd %xmm0,%xmm0
addsd  %xmm2,%xmm0
ret

LLVM IR (-O0):
define double @add2(i32 %0, float %1, double %2) {
%4 = alloca i32
%5 = alloca float
%6 = alloca double
store i32 %0, i32* %4
store float %1, float* %5
store double %2, double* %6
%7 = load double, double* %6
%8 = load i32, i32* %4
%9 = sitofp i32 %8 to double
%10 = fadd double %7, %9
%11 = load float, float* %5
%12 = fpext float %11 to double
%13 = fadd double %10, %12
ret double %13
}

LLVM IR (-O2):
define double @add2(i32 %0, float %1, double %2) {
%4 = sitofp i32 %0 to double
%5 = fadd double %4, %2
%6 = fpext float %1 to double
%7 = fadd double %5, %6
ret double %7
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void usage() {
  printf("Generates a sinus dataset\n"
         "Usage: sinus_gen  <frequ> <frequ amplitude> <parasitic frequ> "
         "<amplitude> <fsample> <sampling time>\n"
         "\t-> frequs and amplitudes are double vales, time is int in sec\n"
         "\t-> prints to stdout\n");
}


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

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

LLVM IR (-O0):
@.str = [211 x i8] c"Generates a sinus dataset\0AUsage: sinus_gen <frequ> <frequ amplitude> <parasitic frequ> <amplitude> <fsample> <sampling time>\0A\09-> frequs and amplitudes are double vales, time is int in sec\0A\09-> prints to stdout\0A\00"
define void @usage() {
%1 = call i32 @printf(i8* getelementptr inbounds ([211 x i8], [211 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@str = [210 x i8] c"Generates a sinus dataset\0AUsage: sinus_gen <frequ> <frequ amplitude> <parasitic frequ> <amplitude> <fsample> <sampling time>\0A\09-> frequs and amplitudes are double vales, time is int in sec\0A\09-> prints to stdout\00"
define void @usage() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([210 x i8], [210 x i8]* @str, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ free(void *);
void FreeAlignedMemory(void *ptr) { free(ptr); }


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

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

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

LLVM IR (-O2):
define void @FreeAlignedMemory(i8* nocapture %0) {
%2 = tail call i32 @free(i8* %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ g(int);
void h(int t) { g(t); }


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

x86 assembly (clang, -O2):
<h>:
jmp    1030 <g@plt>

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

LLVM IR (-O2):
define void @h(i32 %0) {
%2 = tail call i32 @g(i32 %0)
ret void
}
int HelpItem0(void) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @HelpItem0() {
ret i32 0
}
void I420ToNV12() {}


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

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

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

LLVM IR (-O2):
define void @I420ToNV12() {
ret void
}
/* Variables and functions */
int EAI_SYSTEM;
int os_error_from_gai(int ret, int _errno) {
  if (ret == 0)
    return 0;
  if (ret == EAI_SYSTEM)
    return _errno;
  return (-ret) | (1 << 16);
}


x86 assembly (clang, -O0):
<os_error_from_gai>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
cmpl   $0x0,-0x8(%rbp)
jne    1120 <os_error_from_gai+0x20>
movl   $0x0,-0x4(%rbp)
jmp    114a <os_error_from_gai+0x4a>
mov    -0x8(%rbp),%eax
mov    0x2ebe(%rip),%rcx
cmp    (%rcx),%eax
jne    113d <os_error_from_gai+0x3d>
mov    -0xc(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    114a <os_error_from_gai+0x4a>
xor    %eax,%eax
sub    -0x8(%rbp),%eax
or     $0x10000,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<os_error_from_gai>:
test   %edi,%edi
je     111c <os_error_from_gai+0x1c>
mov    %esi,%eax
mov    0x2edb(%rip),%rcx
cmp    %edi,(%rcx)
je     111b <os_error_from_gai+0x1b>
neg    %edi
or     $0x10000,%edi
mov    %edi,%eax
ret
xor    %eax,%eax
ret

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

LLVM IR (-O2):
@EAI_SYSTEM = global i32 0
define i32 @os_error_from_gai(i32 %0, i32 %1) {
%3 = icmp eq i32 %0, 0
br i1 %3, label %10, label %4
4: ; preds = %2
%5 = load i32, i32* @EAI_SYSTEM
%6 = icmp eq i32 %5, %0
br i1 %6, label %10, label %7
7: ; preds = %4
%8 = sub nsw i32 0, %0
%9 = or i32 %8, 65536
br label %10
10: ; preds = %4, %2, %7
%11 = phi i32 [ %9, %7 ], [ 0, %2 ], [ %1, %4 ]
ret i32 %11
}
/* Type definitions */
typedef int ssize_t;
typedef int /*<<< orphan*/ socklen_t;
typedef int /*<<< orphan*/ __CONST_SOCKADDR_ARG;

/* Variables and functions */
int /*<<< orphan*/ ENOSYS;
int /*<<< orphan*/ __set_errno(int /*<<< orphan*/);
ssize_t sendto(int __fd, const void *__buf, size_t __n, int __flags,
               __CONST_SOCKADDR_ARG __addr, socklen_t __addr_len) {
  __set_errno(ENOSYS);
  return -1;
}


x86 assembly (clang, -O0):
<sendto>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %ecx,-0x1c(%rbp)
mov    %r8d,-0x20(%rbp)
mov    %r9d,-0x24(%rbp)
mov    0x2eb3(%rip),%rax
mov    (%rax),%edi
call   1030 <__set_errno@plt>
mov    $0xffffffff,%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<sendto>:
push   %rax
mov    0x2ed0(%rip),%rax
mov    (%rax),%edi
call   1030 <__set_errno@plt>
mov    $0xffffffff,%eax
pop    %rcx
ret

LLVM IR (-O0):
@ENOSYS = global i32 0
define i32 @sendto(i32 %0, i8* %1, i64 %2, i32 %3, i32 %4, i32 %5) {
%7 = alloca i32
%8 = alloca i8*
%9 = alloca i64
%10 = alloca i32
%11 = alloca i32
%12 = alloca i32
store i32 %0, i32* %7
store i8* %1, i8** %8
store i64 %2, i64* %9
store i32 %3, i32* %10
store i32 %4, i32* %11
store i32 %5, i32* %12
%13 = load i32, i32* @ENOSYS
%14 = call i32 @__set_errno(i32 %13)
ret i32 -1
}

LLVM IR (-O2):
@ENOSYS = global i32 0
define i32 @sendto(i32 %0, i8* nocapture readnone %1, i64 %2, i32 %3, i32 %4, i32 %5) {
%7 = load i32, i32* @ENOSYS
%8 = tail call i32 @__set_errno(i32 %7)
ret i32 -1
}
/* Variables and functions */
int /*<<< orphan*/ NEG();
int /*<<< orphan*/ T_WAIT_UNTIL(int);
void op_ED_0x74(void) {
  NEG();
  T_WAIT_UNTIL(4);
  return;
}


x86 assembly (clang, -O0):
<op_ED_0x74>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1040 <NEG@plt>
mov    $0x4,%edi
call   1030 <T_WAIT_UNTIL@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<op_ED_0x74>:
push   %rax
xor    %eax,%eax
call   1040 <NEG@plt>
mov    $0x4,%edi
pop    %rax
jmp    1030 <T_WAIT_UNTIL@plt>

LLVM IR (-O0):
define void @op_ED_0x74() {
%1 = call i32 (...) @NEG()
%2 = call i32 @T_WAIT_UNTIL(i32 4)
ret void
}

LLVM IR (-O2):
define void @op_ED_0x74() {
%1 = tail call i32 (...) @NEG()
%2 = tail call i32 @T_WAIT_UNTIL(i32 4)
ret void
}
/* Type definitions */
struct task {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ task_loop(struct task *);
void *task_function(void *task) {
  task_loop((struct task *)task);
  return NULL;
}


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

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

LLVM IR (-O0):
%struct.task = type { i32 }
define i8* @task_function(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = bitcast i8* %3 to %struct.task*
%5 = call i32 @task_loop(%struct.task* %4)
ret i8* null
}

LLVM IR (-O2):
%struct.task = type { i32 }
define noalias i8* @task_function(i8* %0) {
%2 = bitcast i8* %0 to %struct.task*
%3 = tail call i32 @task_loop(%struct.task* %2)
ret i8* null
}
IR0AR1(r0, r1, x0, x1, p0, p1) unsigned short r0, r1;
unsigned short *p0, *p1;
{
  if ((*p0) <= (p1[1111111 / 4]))
    return 1;
  else
    return 0;
}


x86 assembly (clang, -O0):
<IR0AR1>:
push   %rbp
mov    %rsp,%rbp
mov    %esi,%eax
mov    %di,%si
mov    %si,-0x6(%rbp)
mov    %ax,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    %ecx,-0x10(%rbp)
mov    %r8,-0x18(%rbp)
mov    %r9,-0x20(%rbp)
mov    -0x18(%rbp),%rax
movzwl (%rax),%eax
mov    -0x20(%rbp),%rcx
movzwl 0x87a22(%rcx),%ecx
cmp    %ecx,%eax
jg     1145 <IR0AR1+0x45>
movl   $0x1,-0x4(%rbp)
jmp    114c <IR0AR1+0x4c>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<IR0AR1>:
movzwl (%r8),%ecx
xor    %eax,%eax
cmp    0x87a22(%r9),%cx
setbe  %al
ret

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

LLVM IR (-O2):
define i32 @IR0AR1(i32 %0, i32 %1, i32 %2, i32 %3, i16* nocapture %4, i16* nocapture %5) {
%7 = load i16, i16* %4
%8 = getelementptr inbounds i16, i16* %5, i64 277777
%9 = load i16, i16* %8
%10 = icmp ule i16 %7, %9
%11 = zext i1 %10 to i32
ret i32 %11
}
/* Variables and functions */
scalar_t__ isspace(int);
char *skip_space(char *ptr) {
  while (*ptr && isspace((int)*ptr))
    ptr++;
  return ptr;
}


x86 assembly (clang, -O0):
<skip_space>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movsbl (%rax),%ecx
xor    %eax,%eax
cmp    $0x0,%ecx
mov    %al,-0x9(%rbp)
je     1147 <skip_space+0x37>
mov    -0x8(%rbp),%rax
movsbl (%rax),%edi
call   1030 <isspace@plt>
cmp    $0x0,%rax
setne  %al
mov    %al,-0x9(%rbp)
mov    -0x9(%rbp),%al
test   $0x1,%al
jne    1157 <skip_space+0x47>
jmp    1168 <skip_space+0x58>
mov    -0x8(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x8(%rbp)
jmp    111c <skip_space+0xc>
mov    -0x8(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<skip_space>:
push   %rbx
mov    %rdi,%rbx
mov    (%rdi),%al
test   %al,%al
je     1139 <skip_space+0x29>
nopw   0x0(%rax,%rax,1)
movsbl %al,%edi
call   1030 <isspace@plt>
test   %rax,%rax
je     1139 <skip_space+0x29>
movzbl 0x1(%rbx),%eax
add    $0x1,%rbx
test   %al,%al
jne    1120 <skip_space+0x10>
mov    %rbx,%rax
pop    %rbx
ret

LLVM IR (-O0):
define i8* @skip_space(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
br label %3
3: ; preds = %16, %1
%4 = load i8*, i8** %2
%5 = load i8, i8* %4
%6 = sext i8 %5 to i32
%7 = icmp ne i32 %6, 0
br i1 %7, label %8, label %14
8: ; preds = %3
%9 = load i8*, i8** %2
%10 = load i8, i8* %9
%11 = sext i8 %10 to i32
%12 = call i64 @isspace(i32 %11)
%13 = icmp ne i64 %12, 0
br label %14
14: ; preds = %8, %3
%15 = phi i1 [ false, %3 ], [ %13, %8 ]
br i1 %15, label %16, label %19
16: ; preds = %14
%17 = load i8*, i8** %2
%18 = getelementptr inbounds i8, i8* %17, i32 1
store i8* %18, i8** %2
br label %3
19: ; preds = %14
%20 = load i8*, i8** %2
ret i8* %20
}

LLVM IR (-O2):
define i8* @skip_space(i8* %0) {
%2 = load i8, i8* %0
%3 = icmp eq i8 %2, 0
br i1 %3, label %14, label %4
4: ; preds = %1, %10
%5 = phi i8 [ %12, %10 ], [ %2, %1 ]
%6 = phi i8* [ %11, %10 ], [ %0, %1 ]
%7 = sext i8 %5 to i32
%8 = tail call i64 @isspace(i32 %7)
%9 = icmp eq i64 %8, 0
br i1 %9, label %14, label %10
10: ; preds = %4
%11 = getelementptr inbounds i8, i8* %6, i64 1
%12 = load i8, i8* %11
%13 = icmp eq i8 %12, 0
br i1 %13, label %14, label %4
14: ; preds = %4, %10, %1
%15 = phi i8* [ %0, %1 ], [ %11, %10 ], [ %6, %4 ]
ret i8* %15
}
/* Type definitions */
struct nlmsghdr {
  int dummy;
};
struct nlattr {
  int dummy;
};

/* Variables and functions */
int NLMSG_ALIGN(int);
unsigned char *nlmsg_data(struct nlmsghdr const *);
struct nlattr *nlmsg_attrdata(const struct nlmsghdr *nlh, int hdrlen) {
  unsigned char *data = nlmsg_data(nlh);
  return (struct nlattr *)(data + NLMSG_ALIGN(hdrlen));
}


x86 assembly (clang, -O0):
<nlmsg_attrdata>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <nlmsg_data@plt>
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rax
mov    %rax,-0x20(%rbp)
mov    -0xc(%rbp),%edi
call   1030 <NLMSG_ALIGN@plt>
mov    %eax,%ecx
mov    -0x20(%rbp),%rax
movslq %ecx,%rcx
add    %rcx,%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<nlmsg_attrdata>:
push   %r14
push   %rbx
push   %rax
mov    %esi,%ebx
call   1040 <nlmsg_data@plt>
mov    %rax,%r14
mov    %ebx,%edi
call   1030 <NLMSG_ALIGN@plt>
cltq
add    %r14,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
%struct.nlattr = type { i32 }
%struct.nlmsghdr = type { i32 }
define %struct.nlattr* @nlmsg_attrdata(%struct.nlmsghdr* %0, i32 %1) {
%3 = alloca %struct.nlmsghdr*
%4 = alloca i32
%5 = alloca i8*
store %struct.nlmsghdr* %0, %struct.nlmsghdr** %3
store i32 %1, i32* %4
%6 = load %struct.nlmsghdr*, %struct.nlmsghdr** %3
%7 = call i8* @nlmsg_data(%struct.nlmsghdr* %6)
store i8* %7, i8** %5
%8 = load i8*, i8** %5
%9 = load i32, i32* %4
%10 = call i32 @NLMSG_ALIGN(i32 %9)
%11 = sext i32 %10 to i64
%12 = getelementptr inbounds i8, i8* %8, i64 %11
%13 = bitcast i8* %12 to %struct.nlattr*
ret %struct.nlattr* %13
}

LLVM IR (-O2):
%struct.nlattr = type { i32 }
%struct.nlmsghdr = type { i32 }
define %struct.nlattr* @nlmsg_attrdata(%struct.nlmsghdr* %0, i32 %1) {
%3 = tail call i8* @nlmsg_data(%struct.nlmsghdr* %0)
%4 = tail call i32 @NLMSG_ALIGN(i32 %1)
%5 = sext i32 %4 to i64
%6 = getelementptr inbounds i8, i8* %3, i64 %5
%7 = bitcast i8* %6 to %struct.nlattr*
ret %struct.nlattr* %7
}
/* Type definitions */
typedef int __le16;

/* Variables and functions */
int __cpu_to_le16(int);
int ieee80211_is_qos_nullfunc(__le16 fc) {
  return (fc & __cpu_to_le16(0x000c | 0x00f0)) ==
         __cpu_to_le16(0x0008 | 0x00C0);
}


x86 assembly (clang, -O0):
<ieee80211_is_qos_nullfunc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    $0xfc,%edi
call   1030 <__cpu_to_le16@plt>
mov    %eax,%ecx
mov    -0xc(%rbp),%eax
and    %ecx,%eax
mov    %eax,-0x8(%rbp)
mov    $0xc8,%edi
call   1030 <__cpu_to_le16@plt>
mov    %eax,%ecx
mov    -0x8(%rbp),%eax
cmp    %ecx,%eax
sete   %al
and    $0x1,%al
movzbl %al,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ieee80211_is_qos_nullfunc>:
push   %rbp
push   %rbx
push   %rax
mov    %edi,%ebx
mov    $0xfc,%edi
call   1030 <__cpu_to_le16@plt>
mov    %eax,%ebp
and    %ebx,%ebp
mov    $0xc8,%edi
call   1030 <__cpu_to_le16@plt>
xor    %ecx,%ecx
cmp    %eax,%ebp
sete   %cl
mov    %ecx,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
define i32 @ieee80211_is_qos_nullfunc(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = call i32 @__cpu_to_le16(i32 252)
%5 = and i32 %3, %4
%6 = call i32 @__cpu_to_le16(i32 200)
%7 = icmp eq i32 %5, %6
%8 = zext i1 %7 to i32
ret i32 %8
}

LLVM IR (-O2):
define i32 @ieee80211_is_qos_nullfunc(i32 %0) {
%2 = tail call i32 @__cpu_to_le16(i32 252)
%3 = and i32 %2, %0
%4 = tail call i32 @__cpu_to_le16(i32 200)
%5 = icmp eq i32 %3, %4
%6 = zext i1 %5 to i32
ret i32 %6
}
/* Variables and functions */
int /*<<< orphan*/ prime(int);
int first_larger_prime(int n) {
  ++n;
  while (!prime(n)) {
    ++n;
  }
  return n;
}


x86 assembly (clang, -O0):
<first_larger_prime>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%edi
call   1030 <prime@plt>
cmp    $0x0,%eax
setne  %al
xor    $0xff,%al
test   $0x1,%al
jne    1141 <first_larger_prime+0x31>
jmp    114f <first_larger_prime+0x3f>
mov    -0x4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
jmp    1124 <first_larger_prime+0x14>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<first_larger_prime>:
push   %rbx
mov    %edi,%ebx
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
add    $0x1,%ebx
mov    %ebx,%edi
call   1030 <prime@plt>
test   %eax,%eax
je     1120 <first_larger_prime+0x10>
mov    %ebx,%eax
pop    %rbx
ret

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

LLVM IR (-O2):
define i32 @first_larger_prime(i32 %0) {
br label %2
2: ; preds = %2, %1
%3 = phi i32 [ %0, %1 ], [ %4, %2 ]
%4 = add nsw i32 %3, 1
%5 = tail call i32 @prime(i32 %4)
%6 = icmp eq i32 %5, 0
br i1 %6, label %2, label %7
7: ; preds = %2
ret i32 %4
}
void foo150() {}


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

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

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

LLVM IR (-O2):
define void @foo150() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ swd_set_target_reset(int);
void target_before_init_debug(void) { swd_set_target_reset(1); }


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

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

LLVM IR (-O0):
define void @target_before_init_debug() {
%1 = call i32 @swd_set_target_reset(i32 1)
ret void
}

LLVM IR (-O2):
define void @target_before_init_debug() {
%1 = tail call i32 @swd_set_target_reset(i32 1)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ error(char *);
void *realloc(void *, size_t);
void *xrealloc(void *ptr, size_t size) {
  void *nptr = realloc(ptr, size);
  if (!nptr)
    error("memory exhausted");
  return nptr;
}


x86 assembly (clang, -O0):
<xrealloc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1030 <realloc@plt>
mov    %rax,-0x18(%rbp)
cmpq   $0x0,-0x18(%rbp)
jne    1158 <xrealloc+0x38>
lea    0xead(%rip),%rdi
call   1040 <error@plt>
mov    -0x18(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<xrealloc>:
push   %rbx
call   1030 <realloc@plt>
mov    %rax,%rbx
test   %rax,%rax
jne    113a <xrealloc+0x1a>
lea    0xecb(%rip),%rdi
call   1040 <error@plt>
mov    %rbx,%rax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [17 x i8] c"memory exhausted\00"
define i8* @xrealloc(i8* %0, i64 %1) {
%3 = alloca i8*
%4 = alloca i64
%5 = alloca i8*
store i8* %0, i8** %3
store i64 %1, i64* %4
%6 = load i8*, i8** %3
%7 = load i64, i64* %4
%8 = call i8* @realloc(i8* %6, i64 %7)
store i8* %8, i8** %5
%9 = load i8*, i8** %5
%10 = icmp ne i8* %9, null
br i1 %10, label %13, label %11
11: ; preds = %2
%12 = call i32 @error(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0))
br label %13
13: ; preds = %11, %2
%14 = load i8*, i8** %5
ret i8* %14
}

LLVM IR (-O2):
@.str = [17 x i8] c"memory exhausted\00"
define noalias i8* @xrealloc(i8* nocapture %0, i64 %1) {
%3 = tail call i8* @realloc(i8* %0, i64 %1)
%4 = icmp eq i8* %3, null
br i1 %4, label %5, label %7
5: ; preds = %2
%6 = tail call i32 @error(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0))
br label %7
7: ; preds = %5, %2
ret i8* %3
}
/* Variables and functions */
int fdt_supernode_atdepth_offset(void const *, int, int /*<<< orphan*/, int *);
int fdt_node_depth(const void *fdt, int nodeoffset) {
  int nodedepth;
  int err;
  err = fdt_supernode_atdepth_offset(fdt, nodeoffset, 0, &nodedepth);
  if (err)
    return (err < 0) ? err : -13;
  return nodedepth;
}


x86 assembly (clang, -O0):
<fdt_node_depth>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    %esi,-0x14(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x14(%rbp),%esi
xor    %edx,%edx
lea    -0x18(%rbp),%rcx
call   1030 <fdt_supernode_atdepth_offset@plt>
mov    %eax,-0x1c(%rbp)
cmpl   $0x0,-0x1c(%rbp)
je     116b <fdt_node_depth+0x5b>
cmpl   $0x0,-0x1c(%rbp)
jge    1153 <fdt_node_depth+0x43>
mov    -0x1c(%rbp),%eax
mov    %eax,-0x20(%rbp)
jmp    1160 <fdt_node_depth+0x50>
mov    $0xfffffff3,%eax
mov    %eax,-0x20(%rbp)
jmp    1160 <fdt_node_depth+0x50>
mov    -0x20(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    1171 <fdt_node_depth+0x61>
mov    -0x18(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fdt_node_depth>:
push   %rax
lea    0x4(%rsp),%rcx
xor    %edx,%edx
call   1030 <fdt_supernode_atdepth_offset@plt>
test   %eax,%eax
mov    $0xfffffff3,%ecx
cmovns %ecx,%eax
cmove  0x4(%rsp),%eax
pop    %rcx
ret

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

LLVM IR (-O2):
define i32 @fdt_node_depth(i8* %0, i32 %1) {
%3 = alloca i32
%4 = bitcast i32* %3 to i8*
%5 = call i32 @fdt_supernode_atdepth_offset(i8* %0, i32 %1, i32 0, i32* %3)
%6 = icmp eq i32 %5, 0
%7 = icmp slt i32 %5, 0
%8 = select i1 %7, i32 %5, i32 -13
%9 = load i32, i32* %3
%10 = select i1 %6, i32 %9, i32 %8
ret i32 %10
}