xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ isodigit(int);
void t_isodigit_0x91() {
  Assert_real((isodigit(145) == 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_isodigit.c",
              730, ("isodigit should be 0 for 0x91"));
}


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

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

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

LLVM IR (-O2):
@.str = [169 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/ctype/test_isodigit.c\00"
@.str.1 = [30 x i8] c"isodigit should be 0 for 0x91\00"
define void @t_isodigit_0x91() {
%1 = tail call i64 @isodigit(i32 145)
%2 = icmp eq i64 %1, 0
%3 = zext i1 %2 to i32
%4 = tail call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([169 x i8], [169 x i8]* @.str, i64 0, i64 0), i32 730, i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Forward declarations */
typedef struct TYPE_2__ TYPE_1__;

/* Type definitions */
struct TYPE_2__ {
  scalar_t__ type;
};
typedef TYPE_1__ XMapRequestEvent;

/* Variables and functions */
int get_XMapRequestEvent_type(void *_p) {
  return (int)((XMapRequestEvent *)_p)->type;
}


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

x86 assembly (clang, -O2):
<get_XMapRequestEvent_type>:
mov    (%rdi),%eax
ret

LLVM IR (-O0):
%struct.TYPE_2__ = type { i64 }
define i32 @get_XMapRequestEvent_type(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = bitcast i8* %3 to %struct.TYPE_2__*
%5 = getelementptr inbounds %struct.TYPE_2__, %struct.TYPE_2__* %4, i32 0, i32 0
%6 = load i64, i64* %5
%7 = trunc i64 %6 to i32
ret i32 %7
}

LLVM IR (-O2):
define i32 @get_XMapRequestEvent_type(i8* nocapture %0) {
%2 = bitcast i8* %0 to i64*
%3 = load i64, i64* %2
%4 = trunc i64 %3 to i32
ret i32 %4
}
void run_motors() {}


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

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

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

LLVM IR (-O2):
define void @run_motors() {
ret void
}
/* Type definitions */
struct ns_connection {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ ns_mqtt_prepend_header(struct ns_connection *, int,
                                          int /*<<< orphan*/,
                                          int /*<<< orphan*/);
void ns_mqtt_disconnect(struct ns_connection *nc) {
  ns_mqtt_prepend_header(nc, 14, 0, 0);
}


x86 assembly (clang, -O0):
<ns_mqtt_disconnect>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
mov    $0xe,%esi
xor    %ecx,%ecx
mov    %ecx,%edx
call   1030 <ns_mqtt_prepend_header@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ns_mqtt_disconnect>:
mov    $0xe,%esi
xor    %edx,%edx
xor    %ecx,%ecx
jmp    1030 <ns_mqtt_prepend_header@plt>

LLVM IR (-O0):
%struct.ns_connection = type { i32 }
define void @ns_mqtt_disconnect(%struct.ns_connection* %0) {
%2 = alloca %struct.ns_connection*
store %struct.ns_connection* %0, %struct.ns_connection** %2
%3 = load %struct.ns_connection*, %struct.ns_connection** %2
%4 = call i32 @ns_mqtt_prepend_header(%struct.ns_connection* %3, i32 14, i32 0, i32 0)
ret void
}

LLVM IR (-O2):
%struct.ns_connection = type { i32 }
define void @ns_mqtt_disconnect(%struct.ns_connection* %0) {
%2 = tail call i32 @ns_mqtt_prepend_header(%struct.ns_connection* %0, i32 14, i32 0, i32 0)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ fread(char *, size_t, size_t, int /*<<< orphan*/ *);
void src_char_read(FILE *fd, char *val) {
  fread(val, (size_t)1, (size_t)1, fd);
}


x86 assembly (clang, -O0):
<src_char_read>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x8(%rbp),%rcx
mov    $0x1,%edx
mov    %rdx,%rsi
call   1030 <fread@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<src_char_read>:
mov    %rsi,%rax
mov    %rdi,%rcx
mov    $0x1,%esi
mov    $0x1,%edx
mov    %rax,%rdi
jmp    1030 <fread@plt>

LLVM IR (-O0):
define void @src_char_read(i32* %0, i8* %1) {
%3 = alloca i32*
%4 = alloca i8*
store i32* %0, i32** %3
store i8* %1, i8** %4
%5 = load i8*, i8** %4
%6 = load i32*, i32** %3
%7 = call i32 @fread(i8* %5, i64 1, i64 1, i32* %6)
ret void
}

LLVM IR (-O2):
define void @src_char_read(i32* nocapture %0, i8* nocapture %1) {
%3 = tail call i32 @fread(i8* %1, i64 1, i64 1, i32* %0)
ret void
}
/* Variables and functions */
char getchar();
void flushin() {
  while (getchar() != '\n')
    ;
}


x86 assembly (clang, -O0):
<flushin>:
push   %rbp
mov    %rsp,%rbp
jmp    1119 <flushin+0x9>
mov    $0x0,%al
call   1030 <getchar@plt>
movsbl %al,%eax
cmp    $0xa,%eax
je     1131 <flushin+0x21>
jmp    1119 <flushin+0x9>
pop    %rbp
ret

x86 assembly (clang, -O2):
<flushin>:
push   %rax
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
xor    %eax,%eax
call   1030 <getchar@plt>
cmp    $0xa,%al
jne    1120 <flushin+0x10>
pop    %rax
ret

LLVM IR (-O0):
define void @flushin() {
br label %1
1: ; preds = %5, %0
%2 = call signext i8 (...) @getchar()
%3 = sext i8 %2 to i32
%4 = icmp ne i32 %3, 10
br i1 %4, label %5, label %6
5: ; preds = %1
br label %1
6: ; preds = %1
ret void
}

LLVM IR (-O2):
define void @flushin() {
br label %1
1: ; preds = %1, %0
%2 = tail call signext i8 (...) @getchar()
%3 = icmp eq i8 %2, 10
br i1 %3, label %4, label %1
4: ; preds = %1
ret void
}
int isgreaterequal(float f1, float f2) {
  int r = (f1 >= f2);
  return !r ? -1 : 1;
}


x86 assembly (clang, -O0):
<isgreaterequal>:
push   %rbp
mov    %rsp,%rbp
movss  %xmm0,-0x4(%rbp)
movss  %xmm1,-0x8(%rbp)
movss  -0x4(%rbp),%xmm0
ucomiss -0x8(%rbp),%xmm0
setae  %al
and    $0x1,%al
movzbl %al,%eax
mov    %eax,-0xc(%rbp)
cmpl   $0x0,-0xc(%rbp)
setne  %dl
xor    $0xff,%dl
mov    $0x1,%eax
mov    $0xffffffff,%ecx
test   $0x1,%dl
cmovne %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<isgreaterequal>:
xor    %eax,%eax
ucomiss %xmm1,%xmm0
setae  %al
add    %eax,%eax
add    $0xffffffff,%eax
ret

LLVM IR (-O0):
define i32 @isgreaterequal(float %0, float %1) {
%3 = alloca float
%4 = alloca float
%5 = alloca i32
store float %0, float* %3
store float %1, float* %4
%6 = load float, float* %3
%7 = load float, float* %4
%8 = fcmp oge float %6, %7
%9 = zext i1 %8 to i32
store i32 %9, i32* %5
%10 = load i32, i32* %5
%11 = icmp ne i32 %10, 0
%12 = xor i1 %11, true
%13 = zext i1 %12 to i64
%14 = select i1 %12, i32 -1, i32 1
ret i32 %14
}

LLVM IR (-O2):
define i32 @isgreaterequal(float %0, float %1) {
%3 = fcmp ult float %0, %1
%4 = select i1 %3, i32 -1, i32 1
ret i32 %4
}
/* Type definitions */
typedef int /*<<< orphan*/ uint8_t;
typedef int /*<<< orphan*/ uint32_t;

/* Variables and functions */
int /*<<< orphan*/ GPIODirModeSet(int /*<<< orphan*/, int /*<<< orphan*/, int);
int /*<<< orphan*/ GPIOPadConfigSet(int /*<<< orphan*/, int /*<<< orphan*/, int,
                                    int);
void GPIOPinTypeUART(uint32_t ui32Port, uint8_t ui8Pins) {
  ;
  GPIODirModeSet(ui32Port, ui8Pins, 0x00000002);
  GPIOPadConfigSet(ui32Port, ui8Pins, 0x00000001, 0x00000008);
}


x86 assembly (clang, -O0):
<GPIOPinTypeUART>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x8(%rbp),%esi
mov    $0x2,%edx
call   1040 <GPIODirModeSet@plt>
mov    -0x4(%rbp),%edi
mov    -0x8(%rbp),%esi
mov    $0x1,%edx
mov    $0x8,%ecx
call   1030 <GPIOPadConfigSet@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<GPIOPinTypeUART>:
push   %rbp
push   %rbx
push   %rax
mov    %esi,%ebx
mov    %edi,%ebp
mov    $0x2,%edx
call   1040 <GPIODirModeSet@plt>
mov    %ebp,%edi
mov    %ebx,%esi
mov    $0x1,%edx
mov    $0x8,%ecx
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    1030 <GPIOPadConfigSet@plt>

LLVM IR (-O0):
define void @GPIOPinTypeUART(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 @GPIODirModeSet(i32 %5, i32 %6, i32 2)
%8 = load i32, i32* %3
%9 = load i32, i32* %4
%10 = call i32 @GPIOPadConfigSet(i32 %8, i32 %9, i32 1, i32 8)
ret void
}

LLVM IR (-O2):
define void @GPIOPinTypeUART(i32 %0, i32 %1) {
%3 = tail call i32 @GPIODirModeSet(i32 %0, i32 %1, i32 2)
%4 = tail call i32 @GPIOPadConfigSet(i32 %0, i32 %1, i32 1, i32 8)
ret void
}
void word_capitalise_first(char *str, int n) {
  if ((str[0] >= 'A') && (str[0] <= 'Z')) {
    str[0] += 32;
  }
}


x86 assembly (clang, -O0):
<word_capitalise_first>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x41,%eax
jl     1137 <word_capitalise_first+0x37>
mov    -0x8(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x5a,%eax
jg     1137 <word_capitalise_first+0x37>
mov    -0x8(%rbp),%rax
movsbl (%rax),%ecx
add    $0x20,%ecx
mov    %cl,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<word_capitalise_first>:
mov    (%rdi),%al
lea    -0x41(%rax),%ecx
cmp    $0x19,%cl
ja     110e <word_capitalise_first+0xe>
add    $0x20,%al
mov    %al,(%rdi)
ret

LLVM IR (-O0):
define void @word_capitalise_first(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 = getelementptr inbounds i8, i8* %5, i64 0
%7 = load i8, i8* %6
%8 = sext i8 %7 to i32
%9 = icmp sge i32 %8, 65
br i1 %9, label %10, label %23
10: ; preds = %2
%11 = load i8*, i8** %3
%12 = getelementptr inbounds i8, i8* %11, i64 0
%13 = load i8, i8* %12
%14 = sext i8 %13 to i32
%15 = icmp sle i32 %14, 90
br i1 %15, label %16, label %23
16: ; preds = %10
%17 = load i8*, i8** %3
%18 = getelementptr inbounds i8, i8* %17, i64 0
%19 = load i8, i8* %18
%20 = sext i8 %19 to i32
%21 = add nsw i32 %20, 32
%22 = trunc i32 %21 to i8
store i8 %22, i8* %18
br label %23
23: ; preds = %16, %10, %2
ret void
}

LLVM IR (-O2):
define void @word_capitalise_first(i8* nocapture %0, i32 %1) {
%3 = load i8, i8* %0
%4 = add i8 %3, -65
%5 = icmp ult i8 %4, 26
br i1 %5, label %6, label %8
6: ; preds = %2
%7 = add nuw nsw i8 %3, 32
store i8 %7, i8* %0
br label %8
8: ; preds = %6, %2
ret void
}
int __get_nprocs_conf() { return 1; }


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

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

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

LLVM IR (-O2):
define i32 @__get_nprocs_conf() {
ret i32 1
}
/* Variables and functions */
int /*<<< orphan*/ logDebug(char *);
int threadInit(void **context) {
  logDebug("The Sample plugin thread context is initializing ...");
  *context = NULL;
  return 1;
}


x86 assembly (clang, -O0):
<threadInit>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
lea    0xedd(%rip),%rdi
call   1030 <logDebug@plt>
mov    -0x8(%rbp),%rax
movq   $0x0,(%rax)
mov    $0x1,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<threadInit>:
push   %rbx
mov    %rdi,%rbx
lea    0xee5(%rip),%rdi
call   1030 <logDebug@plt>
movq   $0x0,(%rbx)
mov    $0x1,%eax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [53 x i8] c"The Sample plugin thread context is initializing ...\00"
define i32 @threadInit(i8** %0) {
%2 = alloca i8**
store i8** %0, i8*** %2
%3 = call i32 @logDebug(i8* getelementptr inbounds ([53 x i8], [53 x i8]* @.str, i64 0, i64 0))
%4 = load i8**, i8*** %2
store i8* null, i8** %4
ret i32 1
}

LLVM IR (-O2):
@.str = [53 x i8] c"The Sample plugin thread context is initializing ...\00"
define i32 @threadInit(i8** nocapture writeonly %0) {
%2 = tail call i32 @logDebug(i8* getelementptr inbounds ([53 x i8], [53 x i8]* @.str, i64 0, i64 0))
store i8* null, i8** %0
ret i32 1
}
/* Variables and functions */
int EXIT_SUCCESS;
int /*<<< orphan*/ read_file();
int main() {
  read_file();
  return EXIT_SUCCESS;
}


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

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

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

LLVM IR (-O2):
@EXIT_SUCCESS = global i32 0
define i32 @main() {
%1 = tail call i32 (...) @read_file()
%2 = load i32, i32* @EXIT_SUCCESS
ret i32 %2
}
int test5(int e) { return (~e & 4) != 0; }


x86 assembly (clang, -O0):
<test5>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
xor    $0xffffffff,%eax
and    $0x4,%eax
cmp    $0x0,%eax
setne  %al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<test5>:
xor    %eax,%eax
test   $0x4,%dil
sete   %al
ret

LLVM IR (-O0):
define i32 @test5(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = xor i32 %3, -1
%5 = and i32 %4, 4
%6 = icmp ne i32 %5, 0
%7 = zext i1 %6 to i32
ret i32 %7
}

LLVM IR (-O2):
define i32 @test5(i32 %0) {
%2 = lshr i32 %0, 2
%3 = and i32 %2, 1
%4 = xor i32 %3, 1
ret i32 %4
}
/* Type definitions */
typedef int in_port_t;

/* Variables and functions */
int rand();
in_port_t generateRandomPortNumber() { return rand() % 65536; }


x86 assembly (clang, -O0):
<generateRandomPortNumber>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1030 <rand@plt>
mov    $0x10000,%ecx
cltd
idiv   %ecx
mov    %edx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<generateRandomPortNumber>:
push   %rax
xor    %eax,%eax
call   1030 <rand@plt>
lea    0xffff(%rax),%ecx
test   %eax,%eax
cmovns %eax,%ecx
and    $0xffff0000,%ecx
sub    %ecx,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @generateRandomPortNumber() {
%1 = call i32 (...) @rand()
%2 = srem i32 %1, 65536
ret i32 %2
}

LLVM IR (-O2):
define i32 @generateRandomPortNumber() {
%1 = tail call i32 (...) @rand()
%2 = srem i32 %1, 65536
ret i32 %2
}
/* Variables and functions */
bool isHexDigit(char digit) {
  return ('0' <= digit && digit <= '9') || ('a' <= digit && digit <= 'f') ||
         ('A' <= digit && digit <= 'F');
}


x86 assembly (clang, -O0):
<isHexDigit>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movsbl -0x1(%rbp),%ecx
mov    $0x30,%eax
cmp    %ecx,%eax
jg     112d <isHexDigit+0x2d>
movsbl -0x1(%rbp),%ecx
mov    $0x1,%al
cmp    $0x39,%ecx
mov    %al,-0x2(%rbp)
jle    1179 <isHexDigit+0x79>
movsbl -0x1(%rbp),%ecx
mov    $0x61,%eax
cmp    %ecx,%eax
jg     1150 <isHexDigit+0x50>
movsbl -0x1(%rbp),%ecx
mov    $0x1,%al
cmp    $0x66,%ecx
mov    %al,-0x2(%rbp)
jle    1179 <isHexDigit+0x79>
movsbl -0x1(%rbp),%edx
xor    %eax,%eax
mov    $0x41,%ecx
cmp    %edx,%ecx
mov    %al,-0x3(%rbp)
jg     1173 <isHexDigit+0x73>
movsbl -0x1(%rbp),%eax
cmp    $0x46,%eax
setle  %al
mov    %al,-0x3(%rbp)
mov    -0x3(%rbp),%al
mov    %al,-0x2(%rbp)
mov    -0x2(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<isHexDigit>:
lea    -0x30(%rdi),%eax
cmp    $0xa,%al
setb   %al
and    $0xdf,%dil
add    $0xbf,%dil
cmp    $0x6,%dil
setb   %cl
or     %al,%cl
movzbl %cl,%eax
ret

LLVM IR (-O0):
define i32 @isHexDigit(i8 signext %0) {
%2 = alloca i8
store i8 %0, i8* %2
%3 = load i8, i8* %2
%4 = sext i8 %3 to i32
%5 = icmp sle i32 48, %4
br i1 %5, label %6, label %10
6: ; preds = %1
%7 = load i8, i8* %2
%8 = sext i8 %7 to i32
%9 = icmp sle i32 %8, 57
br i1 %9, label %28, label %10
10: ; preds = %6, %1
%11 = load i8, i8* %2
%12 = sext i8 %11 to i32
%13 = icmp sle i32 97, %12
br i1 %13, label %14, label %18
14: ; preds = %10
%15 = load i8, i8* %2
%16 = sext i8 %15 to i32
%17 = icmp sle i32 %16, 102
br i1 %17, label %28, label %18
18: ; preds = %14, %10
%19 = load i8, i8* %2
%20 = sext i8 %19 to i32
%21 = icmp sle i32 65, %20
br i1 %21, label %22, label %26
22: ; preds = %18
%23 = load i8, i8* %2
%24 = sext i8 %23 to i32
%25 = icmp sle i32 %24, 70
br label %26
26: ; preds = %22, %18
%27 = phi i1 [ false, %18 ], [ %25, %22 ]
br label %28
28: ; preds = %26, %14, %6
%29 = phi i1 [ true, %14 ], [ true, %6 ], [ %27, %26 ]
%30 = zext i1 %29 to i32
ret i32 %30
}

LLVM IR (-O2):
define i32 @isHexDigit(i8 signext %0) {
%2 = add i8 %0, -48
%3 = icmp ult i8 %2, 10
%4 = and i8 %0, -33
%5 = add i8 %4, -65
%6 = icmp ult i8 %5, 6
%7 = or i1 %3, %6
%8 = zext i1 %7 to i32
ret i32 %8
}
__typeof__(isdigit(1)) test_isdigit_25(void) { return isdigit(1); }


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

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

LLVM IR (-O0):
define i32 @test_isdigit_25() {
%1 = call i32 @isdigit(i32 1)
ret i32 %1
}

LLVM IR (-O2):
define i32 @test_isdigit_25() {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ HibernateWriteComplete();
void HibernateRequest(void) {
  (*((volatile unsigned long *)(0x400FC010))) |= 0x00000002;
  HibernateWriteComplete();
}


x86 assembly (clang, -O0):
<HibernateRequest>:
push   %rbp
mov    %rsp,%rbp
mov    $0x400fc010,%eax
mov    (%rax),%rcx
or     $0x2,%rcx
mov    $0x400fc010,%eax
mov    %rcx,(%rax)
mov    $0x0,%al
call   1030 <HibernateWriteComplete@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<HibernateRequest>:
orq    $0x2,0x400fc010
40 02
xor    %eax,%eax
jmp    1030 <HibernateWriteComplete@plt>

LLVM IR (-O0):
define void @HibernateRequest() {
%1 = load volatile i64, i64* inttoptr (i64 1074774032 to i64*)
%2 = or i64 %1, 2
store volatile i64 %2, i64* inttoptr (i64 1074774032 to i64*)
%3 = call i32 (...) @HibernateWriteComplete()
ret void
}

LLVM IR (-O2):
define void @HibernateRequest() {
%1 = load volatile i64, i64* inttoptr (i64 1074774032 to i64*)
%2 = or i64 %1, 2
store volatile i64 %2, i64* inttoptr (i64 1074774032 to i64*)
%3 = tail call i32 (...) @HibernateWriteComplete()
ret void
}
/* Type definitions */
typedef int ssize_t;

/* Variables and functions */
int /*<<< orphan*/ perror(char *);
int recv(int, char *, size_t, int /*<<< orphan*/);
ssize_t readline(int fd, char *buf, size_t maxlen) {
  int rv;
  rv = recv(fd, buf, maxlen, 0);
  if (rv == -1)
    perror("recv");
  return rv;
}


x86 assembly (clang, -O0):
<readline>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
xor    %ecx,%ecx
call   1030 <recv@plt>
mov    %eax,-0x1c(%rbp)
cmpl   $0xffffffff,-0x1c(%rbp)
jne    115e <readline+0x3e>
lea    0xea7(%rip),%rdi
call   1040 <perror@plt>
mov    -0x1c(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<readline>:
push   %rbx
xor    %ecx,%ecx
call   1030 <recv@plt>
mov    %eax,%ebx
cmp    $0xffffffff,%eax
je     1133 <readline+0x13>
mov    %ebx,%eax
pop    %rbx
ret
lea    0xec6(%rip),%rdi
call   1040 <perror@plt>
jmp    112f <readline+0xf>

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

LLVM IR (-O2):
@.str = [5 x i8] c"recv\00"
define i32 @readline(i32 %0, i8* %1, i64 %2) {
%4 = tail call i32 @recv(i32 %0, i8* %1, i64 %2, i32 0)
%5 = icmp eq i32 %4, -1
br i1 %5, label %6, label %8
6: ; preds = %3
%7 = tail call i32 @perror(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0))
br label %8
8: ; preds = %6, %3
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char const *);
int /*<<< orphan*/ stderr;
void PrintUsage(const char *own_path) {
  fprintf(stderr, "Usage: %s [iconset]\n", own_path);
}


x86 assembly (clang, -O0):
<PrintUsage>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    0x2ebd(%rip),%rax
mov    (%rax),%edi
mov    -0x8(%rbp),%rdx
lea    0xed0(%rip),%rsi
call   1030 <fprintf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<PrintUsage>:
mov    %rdi,%rdx
mov    0x2ec6(%rip),%rax
mov    (%rax),%edi
lea    0xedd(%rip),%rsi
jmp    1030 <fprintf@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [21 x i8] c"Usage: %s [iconset]\0A\00"
define void @PrintUsage(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i32, i32* @stderr
%4 = load i8*, i8** %2
%5 = call i32 @fprintf(i32 %3, i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str, i64 0, i64 0), i8* %4)
ret void
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [21 x i8] c"Usage: %s [iconset]\0A\00"
define void @PrintUsage(i8* %0) {
%2 = load i32, i32* @stderr
%3 = tail call i32 @fprintf(i32 %2, i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str, i64 0, i64 0), i8* %0)
ret void
}
/* Variables and functions */
char *proc_get_driver(unsigned int);
char *sysfs_get_driver(unsigned int);
char *cpufreq_get_driver(unsigned int cpu) {
  char *ret;
  ret = sysfs_get_driver(cpu);
  if (!ret) {
    ret = proc_get_driver(cpu);
  }
  return (ret);
}


x86 assembly (clang, -O0):
<cpufreq_get_driver>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
call   1030 <sysfs_get_driver@plt>
mov    %rax,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
jne    114e <cpufreq_get_driver+0x2e>
mov    -0x4(%rbp),%edi
call   1040 <proc_get_driver@plt>
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<cpufreq_get_driver>:
push   %rbx
mov    %edi,%ebx
call   1030 <sysfs_get_driver@plt>
test   %rax,%rax
je     112f <cpufreq_get_driver+0xf>
pop    %rbx
ret
mov    %ebx,%edi
pop    %rbx
jmp    1040 <proc_get_driver@plt>

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

LLVM IR (-O2):
define i8* @cpufreq_get_driver(i32 %0) {
%2 = tail call i8* @sysfs_get_driver(i32 %0)
%3 = icmp eq i8* %2, null
br i1 %3, label %4, label %6
4: ; preds = %1
%5 = tail call i8* @proc_get_driver(i32 %0)
br label %6
6: ; preds = %4, %1
%7 = phi i8* [ %2, %1 ], [ %5, %4 ]
ret i8* %7
}
/* Variables and functions */
size_t strlen(char const *);
char *strndup(char const *, size_t const);
char *string_cut_end(const char *str, const char *end) {
  const size_t end_len = strlen(end);
  const size_t str_len = strlen(str);
  if (end_len >= str_len) {
    return NULL;
  }
  return strndup(str, str_len - end_len);
}


x86 assembly (clang, -O0):
<string_cut_end>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    -0x18(%rbp),%rdi
call   1030 <strlen@plt>
mov    %rax,-0x20(%rbp)
mov    -0x10(%rbp),%rdi
call   1030 <strlen@plt>
mov    %rax,-0x28(%rbp)
mov    -0x20(%rbp),%rax
cmp    -0x28(%rbp),%rax
jb     1165 <string_cut_end+0x45>
movq   $0x0,-0x8(%rbp)
jmp    117a <string_cut_end+0x5a>
mov    -0x10(%rbp),%rdi
mov    -0x28(%rbp),%rsi
sub    -0x20(%rbp),%rsi
call   1040 <strndup@plt>
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<string_cut_end>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%r14
mov    %rsi,%rdi
call   1030 <strlen@plt>
mov    %rax,%rbx
mov    %r14,%rdi
call   1030 <strlen@plt>
sub    %rbx,%rax
jbe    1151 <string_cut_end+0x31>
mov    %r14,%rdi
mov    %rax,%rsi
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1040 <strndup@plt>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

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

LLVM IR (-O2):
define noalias i8* @string_cut_end(i8* nocapture %0, i8* nocapture %1) {
%3 = tail call i64 @strlen(i8* dereferenceable(1) %1)
%4 = tail call i64 @strlen(i8* dereferenceable(1) %0)
%5 = icmp ugt i64 %4, %3
br i1 %5, label %6, label %9
6: ; preds = %2
%7 = sub i64 %4, %3
%8 = tail call i8* @strndup(i8* %0, i64 %7)
br label %9
9: ; preds = %2, %6
%10 = phi i8* [ %8, %6 ], [ null, %2 ]
ret i8* %10
}
/* Variables and functions */
int /*<<< orphan*/ set_servo_position(int, int);
void steer(int pos) { set_servo_position(2, pos); }


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

x86 assembly (clang, -O2):
<steer>:
mov    %edi,%esi
mov    $0x2,%edi
jmp    1030 <set_servo_position@plt>

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

LLVM IR (-O2):
define void @steer(i32 %0) {
%2 = tail call i32 @set_servo_position(i32 2, i32 %0)
ret void
}
/* Type definitions */
struct stat {
  int st_size;
};

/* Variables and functions */
scalar_t__ errno;
int fstat(int, struct stat *);
int _filesize(int fd) {
  struct stat buffer;
  int status;
  status = fstat(fd, &buffer);
  if (status || errno) {
    return -1;
  }
  return buffer.st_size;
}


x86 assembly (clang, -O0):
<_filesize>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x8(%rbp)
mov    -0x8(%rbp),%edi
lea    -0x10(%rbp),%rsi
call   1030 <fstat@plt>
mov    %eax,-0x14(%rbp)
cmpl   $0x0,-0x14(%rbp)
jne    1145 <_filesize+0x35>
mov    0x2ea5(%rip),%rax
cmpq   $0x0,(%rax)
je     1151 <_filesize+0x41>
movl   $0xffffffff,-0x4(%rbp)
jmp    1157 <_filesize+0x47>
mov    -0x10(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<_filesize>:
push   %rax
mov    %rsp,%rsi
call   1030 <fstat@plt>
mov    0x2ec0(%rip),%rcx
neg    %eax
sbb    %edx,%edx
xor    %eax,%eax
cmp    (%rcx),%rax
sbb    %eax,%eax
or     (%rsp),%eax
or     %edx,%eax
pop    %rcx
ret

LLVM IR (-O0):
%struct.stat = type { i32 }
@errno = global i64 0
define i32 @_filesize(i32 %0) {
%2 = alloca i32
%3 = alloca i32
%4 = alloca %struct.stat
%5 = alloca i32
store i32 %0, i32* %3
%6 = load i32, i32* %3
%7 = call i32 @fstat(i32 %6, %struct.stat* %4)
store i32 %7, i32* %5
%8 = load i32, i32* %5
%9 = icmp ne i32 %8, 0
br i1 %9, label %13, label %10
10: ; preds = %1
%11 = load i64, i64* @errno
%12 = icmp ne i64 %11, 0
br i1 %12, label %13, label %14
13: ; preds = %10, %1
store i32 -1, i32* %2
br label %17
14: ; preds = %10
%15 = getelementptr inbounds %struct.stat, %struct.stat* %4, i32 0, i32 0
%16 = load i32, i32* %15
store i32 %16, i32* %2
br label %17
17: ; preds = %14, %13
%18 = load i32, i32* %2
ret i32 %18
}

LLVM IR (-O2):
%struct.stat = type { i32 }
@errno = global i64 0
define i32 @_filesize(i32 %0) {
%2 = alloca %struct.stat
%3 = bitcast %struct.stat* %2 to i8*
%4 = call i32 @fstat(i32 %0, %struct.stat* %2)
%5 = icmp ne i32 %4, 0
%6 = load i64, i64* @errno
%7 = icmp ne i64 %6, 0
%8 = select i1 %5, i1 true, i1 %7
%9 = getelementptr inbounds %struct.stat, %struct.stat* %2, i64 0, i32 0
%10 = load i32, i32* %9
%11 = select i1 %8, i32 -1, i32 %10
ret i32 %11
}
void outb_p(unsigned char value, unsigned short port) {
  __asm__ __volatile__("out"
                       "b"
                       " %"
                       "b"
                       "0,%"
                       "w"
                       "1"
                       :
                       : "a"(value), "Nd"(port));
  slow_down_io();
}


x86 assembly (clang, -O0):
<outb_p>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %si,%ax
mov    %dil,%cl
mov    %cl,-0x1(%rbp)
mov    %ax,-0x4(%rbp)
mov    -0x1(%rbp),%al
mov    -0x4(%rbp),%dx
out    %al,(%dx)
mov    $0x0,%al
call   1030 <slow_down_io@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<outb_p>:
mov    %esi,%edx
mov    %edi,%eax
out    %al,(%dx)
xor    %eax,%eax
jmp    1030 <slow_down_io@plt>

LLVM IR (-O0):
define void @outb_p(i8 zeroext %0, i16 zeroext %1) {
%3 = alloca i8
%4 = alloca i16
store i8 %0, i8* %3
store i16 %1, i16* %4
%5 = load i8, i8* %3
%6 = load i16, i16* %4
%7 = call i32 (...) @slow_down_io()
ret void
}

LLVM IR (-O2):
define void @outb_p(i8 zeroext %0, i16 zeroext %1) {
tail call void asm sideeffect "outb ${0:b},${1:w}", "{ax},N{dx},~{dirflag},~{fpsr},~{flags}"(i8 %0, i16 %1)
%3 = tail call i32 (...) @slow_down_io()
ret void
}
/* Variables and functions */
unsigned long largest_prime_factor(int);
int /*<<< orphan*/ printf(char *, unsigned long);
int main() {
  unsigned long factor;
  factor = largest_prime_factor(600851475143);
  printf("%ld\n", factor);
  return 0;
}


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

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    $0xe589eac7,%edi
call   1040 <largest_prime_factor@plt>
lea    0xece(%rip),%rdi
mov    %rax,%rsi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
@.str = [5 x i8] c"%ld\0A\00"
define i32 @main() {
%1 = tail call i64 @largest_prime_factor(i32 -443946297)
%2 = tail call i32 @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i64 %1)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ set_key_wait_unix();
void set_key_wait(void) { set_key_wait_unix(); }


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

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

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

LLVM IR (-O2):
define void @set_key_wait() {
%1 = tail call i32 (...) @set_key_wait_unix()
ret void
}
/* Forward declarations */
typedef struct TYPE_2__ TYPE_1__;

/* Type definitions */
struct TYPE_2__ {
  scalar_t__ save_under;
};
typedef TYPE_1__ XSetWindowAttributes;

/* Variables and functions */
int get_XSetWindowAttributes_save_under(void *_p) {
  return (int)((XSetWindowAttributes *)_p)->save_under;
}


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

x86 assembly (clang, -O2):
<get_XSetWindowAttributes_save_under>:
mov    (%rdi),%eax
ret

LLVM IR (-O0):
%struct.TYPE_2__ = type { i64 }
define i32 @get_XSetWindowAttributes_save_under(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = bitcast i8* %3 to %struct.TYPE_2__*
%5 = getelementptr inbounds %struct.TYPE_2__, %struct.TYPE_2__* %4, i32 0, i32 0
%6 = load i64, i64* %5
%7 = trunc i64 %6 to i32
ret i32 %7
}

LLVM IR (-O2):
define i32 @get_XSetWindowAttributes_save_under(i8* nocapture %0) {
%2 = bitcast i8* %0 to i64*
%3 = load i64, i64* %2
%4 = trunc i64 %3 to i32
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ dgtsv_(int *, int *, double *, double *, double *, double *,
                          int *, int *);
void dgtsv(int n, int nrhs, double *dl, double *d, double *du, double *b,
           int ldb, int *info) {
  dgtsv_(&n, &nrhs, dl, d, du, b, &ldb, info);
}


x86 assembly (clang, -O0):
<dgtsv>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
mov    0x18(%rbp),%rax
mov    0x10(%rbp),%eax
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %rdx,-0x10(%rbp)
mov    %rcx,-0x18(%rbp)
mov    %r8,-0x20(%rbp)
mov    %r9,-0x28(%rbp)
mov    -0x10(%rbp),%rdx
mov    -0x18(%rbp),%rcx
mov    -0x20(%rbp),%r8
mov    -0x28(%rbp),%r9
mov    0x18(%rbp),%rax
lea    -0x4(%rbp),%rdi
lea    -0x8(%rbp),%rsi
lea    0x10(%rbp),%r10
mov    %r10,(%rsp)
mov    %rax,0x8(%rsp)
call   1030 <dgtsv_@plt>
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<dgtsv>:
push   %rax
mov    0x18(%rsp),%r10
mov    %edi,0x4(%rsp)
mov    %esi,(%rsp)
lea    0x10(%rsp),%rax
lea    0x4(%rsp),%rdi
mov    %rsp,%rsi
push   %r10
push   %rax
call   1030 <dgtsv_@plt>
add    $0x10,%rsp
pop    %rax
ret

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

LLVM IR (-O2):
define void @dgtsv(i32 %0, i32 %1, double* %2, double* %3, double* %4, double* %5, i32 %6, i32* %7) {
%9 = alloca i32
%10 = alloca i32
%11 = alloca i32
store i32 %0, i32* %9
store i32 %1, i32* %10
store i32 %6, i32* %11
%12 = call i32 @dgtsv_(i32* %9, i32* %10, double* %2, double* %3, double* %4, double* %5, i32* %11, i32* %7)
ret void
}
void audio_music_switch_theme(int theme_number) {}


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

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

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

LLVM IR (-O2):
define void @audio_music_switch_theme(i32 %0) {
ret void
}
int increment(int *x) { (*x)++; }


x86 assembly (clang, -O0):
<increment>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    (%rax),%ecx
add    $0x1,%ecx
mov    %ecx,(%rax)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<increment>:
addl   $0x1,(%rdi)
ret

LLVM IR (-O0):
define i32 @increment(i32* %0) {
%2 = alloca i32
%3 = alloca i32*
store i32* %0, i32** %3
%4 = load i32*, i32** %3
%5 = load i32, i32* %4
%6 = add nsw i32 %5, 1
store i32 %6, i32* %4
%7 = load i32, i32* %2
ret i32 %7
}

LLVM IR (-O2):
define i32 @increment(i32* nocapture %0) {
%2 = load i32, i32* %0
%3 = add nsw i32 %2, 1
store i32 %3, i32* %0
ret i32 undef
}
void(prefetch)(void const *x) {
  {
    ;
    return;
  }
}


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

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

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

LLVM IR (-O2):
define void @prefetch(i8* nocapture %0) {
ret void
}
char *event_api_name(void) { return "epoll"; }


x86 assembly (clang, -O0):
<event_api_name>:
push   %rbp
mov    %rsp,%rbp
lea    0xef5(%rip),%rax
pop    %rbp
ret

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

LLVM IR (-O0):
@.str = [6 x i8] c"epoll\00"
define i8* @event_api_name() {
ret i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0)
}

LLVM IR (-O2):
@.str = [6 x i8] c"epoll\00"
define i8* @event_api_name() {
ret i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0)
}
/* Forward declarations */
typedef struct TYPE_2__ TYPE_1__;

/* Type definitions */
struct TYPE_2__ {
  int number;
};
typedef TYPE_1__ XExtData;

/* Variables and functions */
void set_XExtData_number(void *_p, int _v) {
  ((XExtData *)_p)->number = (int)_v;
}


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

x86 assembly (clang, -O2):
<set_XExtData_number>:
mov    %esi,(%rdi)
ret

LLVM IR (-O0):
%struct.TYPE_2__ = type { i32 }
define void @set_XExtData_number(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i32
store i8* %0, i8** %3
store i32 %1, i32* %4
%5 = load i32, i32* %4
%6 = load i8*, i8** %3
%7 = bitcast i8* %6 to %struct.TYPE_2__*
%8 = getelementptr inbounds %struct.TYPE_2__, %struct.TYPE_2__* %7, i32 0, i32 0
store i32 %5, i32* %8
ret void
}

LLVM IR (-O2):
define void @set_XExtData_number(i8* nocapture writeonly %0, i32 %1) {
%3 = bitcast i8* %0 to i32*
store i32 %1, i32* %3
ret void
}
/* Variables and functions */
int /*<<< orphan*/ OAL_OBTAIN_SEMAPHORE();
int /*<<< orphan*/ OAL_RELEASE_SEMAPHORE();
int spi_bulkread(void *, unsigned short, unsigned char, unsigned char *,
                 unsigned short);
signed int fc8180_spib_bulkread(void *handle, unsigned short addr,
                                unsigned char *data, unsigned short length) {
  signed int res;
  unsigned char command = 0x40 | 0x80;
  OAL_OBTAIN_SEMAPHORE();
  res = spi_bulkread(handle, addr, command, data, length);
  OAL_RELEASE_SEMAPHORE();
  return res;
}


x86 assembly (clang, -O0):
<fc8180_spib_bulkread>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %cx,%ax
mov    %si,%cx
mov    %rdi,-0x8(%rbp)
mov    %cx,-0xa(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %ax,-0x1a(%rbp)
movb   $0xc0,-0x21(%rbp)
mov    $0x0,%al
call   1050 <OAL_OBTAIN_SEMAPHORE@plt>
mov    -0x8(%rbp),%rdi
mov    -0xa(%rbp),%dx
mov    -0x21(%rbp),%al
mov    -0x18(%rbp),%rcx
movzwl %dx,%esi
movzbl %al,%edx
movzwl -0x1a(%rbp),%r8d
call   1040 <spi_bulkread@plt>
mov    %eax,-0x20(%rbp)
mov    $0x0,%al
call   1030 <OAL_RELEASE_SEMAPHORE@plt>
mov    -0x20(%rbp),%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fc8180_spib_bulkread>:
push   %rbp
push   %r15
push   %r14
push   %rbx
push   %rax
mov    %ecx,%r14d
mov    %rdx,%r15
mov    %esi,%ebp
mov    %rdi,%rbx
xor    %eax,%eax
call   1050 <OAL_OBTAIN_SEMAPHORE@plt>
mov    %rbx,%rdi
mov    %ebp,%esi
mov    $0xc0,%edx
mov    %r15,%rcx
mov    %r14d,%r8d
call   1040 <spi_bulkread@plt>
mov    %eax,%ebx
xor    %eax,%eax
call   1030 <OAL_RELEASE_SEMAPHORE@plt>
mov    %ebx,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
define i32 @fc8180_spib_bulkread(i8* %0, i16 zeroext %1, i8* %2, i16 zeroext %3) {
%5 = alloca i8*
%6 = alloca i16
%7 = alloca i8*
%8 = alloca i16
%9 = alloca i32
%10 = alloca i8
store i8* %0, i8** %5
store i16 %1, i16* %6
store i8* %2, i8** %7
store i16 %3, i16* %8
store i8 -64, i8* %10
%11 = call i32 (...) @OAL_OBTAIN_SEMAPHORE()
%12 = load i8*, i8** %5
%13 = load i16, i16* %6
%14 = load i8, i8* %10
%15 = load i8*, i8** %7
%16 = load i16, i16* %8
%17 = call i32 @spi_bulkread(i8* %12, i16 zeroext %13, i8 zeroext %14, i8* %15, i16 zeroext %16)
store i32 %17, i32* %9
%18 = call i32 (...) @OAL_RELEASE_SEMAPHORE()
%19 = load i32, i32* %9
ret i32 %19
}

LLVM IR (-O2):
define i32 @fc8180_spib_bulkread(i8* %0, i16 zeroext %1, i8* %2, i16 zeroext %3) {
%5 = tail call i32 (...) @OAL_OBTAIN_SEMAPHORE()
%6 = tail call i32 @spi_bulkread(i8* %0, i16 zeroext %1, i8 zeroext -64, i8* %2, i16 zeroext %3)
%7 = tail call i32 (...) @OAL_RELEASE_SEMAPHORE()
ret i32 %6
}
int is_same_clock(struct clk *a, struct clk *b) { return a == b; }


x86 assembly (clang, -O0):
<is_same_clock>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
cmp    -0x10(%rbp),%rax
sete   %al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<is_same_clock>:
xor    %eax,%eax
cmp    %rsi,%rdi
sete   %al
ret

LLVM IR (-O0):
%struct.clk = type opaque
define i32 @is_same_clock(%struct.clk* %0, %struct.clk* %1) {
%3 = alloca %struct.clk*
%4 = alloca %struct.clk*
store %struct.clk* %0, %struct.clk** %3
store %struct.clk* %1, %struct.clk** %4
%5 = load %struct.clk*, %struct.clk** %3
%6 = load %struct.clk*, %struct.clk** %4
%7 = icmp eq %struct.clk* %5, %6
%8 = zext i1 %7 to i32
ret i32 %8
}

LLVM IR (-O2):
%struct.clk = type opaque
define i32 @is_same_clock(%struct.clk* readnone %0, %struct.clk* readnone %1) {
%3 = icmp eq %struct.clk* %0, %1
%4 = zext i1 %3 to i32
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ new_integer();
int main() { new_integer(); }


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

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

LLVM IR (-O0):
define i32 @main() {
%1 = call i32 (...) @new_integer()
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @new_integer()
ret i32 0
}
int stdlib_isoneof(char c, char *from, int fsize) {
  char *fend = from + fsize;
  while (from < fend) {
    if (c == *from)
      return 1;
    from++;
  }
  return 0;
}


x86 assembly (clang, -O0):
<stdlib_isoneof>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x5(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    -0x10(%rbp),%rax
movslq -0x14(%rbp),%rcx
add    %rcx,%rax
mov    %rax,-0x20(%rbp)
mov    -0x10(%rbp),%rax
cmp    -0x20(%rbp),%rax
jae    115e <stdlib_isoneof+0x5e>
movsbl -0x5(%rbp),%eax
mov    -0x10(%rbp),%rcx
movsbl (%rcx),%ecx
cmp    %ecx,%eax
jne    114d <stdlib_isoneof+0x4d>
movl   $0x1,-0x4(%rbp)
jmp    1165 <stdlib_isoneof+0x65>
mov    -0x10(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x10(%rbp)
jmp    1120 <stdlib_isoneof+0x20>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<stdlib_isoneof>:
xor    %eax,%eax
test   %edx,%edx
jle    111e <stdlib_isoneof+0x1e>
movslq %edx,%rcx
add    %rsi,%rcx
nopl   0x0(%rax)
cmp    %dil,(%rsi)
je     111f <stdlib_isoneof+0x1f>
add    $0x1,%rsi
cmp    %rcx,%rsi
jb     1110 <stdlib_isoneof+0x10>
ret
mov    $0x1,%eax
ret

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

LLVM IR (-O2):
define i32 @stdlib_isoneof(i8 signext %0, i8* %1, i32 %2) {
%4 = sext i32 %2 to i64
%5 = getelementptr inbounds i8, i8* %1, i64 %4
%6 = icmp sgt i32 %2, 0
br i1 %6, label %9, label %14
7: ; preds = %9
%8 = icmp ult i8* %13, %5
br i1 %8, label %9, label %14
9: ; preds = %3, %7
%10 = phi i8* [ %13, %7 ], [ %1, %3 ]
%11 = load i8, i8* %10
%12 = icmp eq i8 %11, %0
%13 = getelementptr inbounds i8, i8* %10, i64 1
br i1 %12, label %14, label %7
14: ; preds = %9, %7, %3
%15 = phi i32 [ 0, %3 ], [ 0, %7 ], [ 1, %9 ]
ret i32 %15
}
void arch_bprm_mm_init(struct mm_struct *mm, struct vm_area_struct *vma) {}


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

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

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

LLVM IR (-O2):
%struct.mm_struct = type opaque
%struct.vm_area_struct = type opaque
define void @arch_bprm_mm_init(%struct.mm_struct* nocapture %0, %struct.vm_area_struct* nocapture %1) {
ret void
}