xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char *, char const *,
                           char const *);
int /*<<< orphan*/ stderr;
void fileerror(const char *filename, const char *error) {
  fprintf(stderr, "%s:%s: %s\n", "mpck", filename, error);
}


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

x86 assembly (clang, -O2):
<fileerror>:
mov    %rsi,%r8
mov    %rdi,%rcx
mov    0x2ec3(%rip),%rax
mov    (%rax),%edi
lea    0xeda(%rip),%rsi
lea    0xede(%rip),%rdx
jmp    1030 <fprintf@plt>

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

LLVM IR (-O2):
@stderr = global i32 0
@.str = [11 x i8] c"%s:%s: %s\0A\00"
@.str.1 = [5 x i8] c"mpck\00"
define void @fileerror(i8* %0, i8* %1) {
%3 = load i32, i32* @stderr
%4 = tail call i32 @fprintf(i32 %3, i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0), i8* %0, i8* %1)
ret void
}
/* Variables and functions */
char *strstr(char *, char *);
char *xstrstr(char *a, char *b) { return strstr(a, b); }


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

x86 assembly (clang, -O2):
<xstrstr>:
jmp    1030 <strstr@plt>

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

LLVM IR (-O2):
define i8* @xstrstr(i8* %0, i8* nocapture %1) {
%3 = tail call i8* @strstr(i8* dereferenceable(1) %0, i8* dereferenceable(1) %1)
ret i8* %3
}
/* Type definitions */
typedef unsigned int uint64_t;

/* Variables and functions */
__attribute__((always_)) uint64_t bitw_rol_64(const uint64_t bit_sequence,
                                              const unsigned int shift) {
  return (bit_sequence << shift) | (bit_sequence >> (64 - shift));
}


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

x86 assembly (clang, -O2):
<bitw_rol_64>:
mov    %esi,%ecx
mov    %edi,%eax
shl    %cl,%eax
neg    %cl
shr    %cl,%edi
or     %edi,%eax
ret

LLVM IR (-O0):
define i32 @bitw_rol_64(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 = shl i32 %5, %6
%8 = load i32, i32* %3
%9 = load i32, i32* %4
%10 = sub i32 64, %9
%11 = lshr i32 %8, %10
%12 = or i32 %7, %11
ret i32 %12
}

LLVM IR (-O2):
define i32 @bitw_rol_64(i32 %0, i32 %1) {
%3 = shl i32 %0, %1
%4 = sub i32 64, %1
%5 = lshr i32 %0, %4
%6 = or i32 %5, %3
ret i32 %6
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void option1() { printf("You have selected option 1\n"); }


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

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

LLVM IR (-O0):
@.str = [28 x i8] c"You have selected option 1\0A\00"
define void @option1() {
%1 = call i32 @printf(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@str = [27 x i8] c"You have selected option 1\00"
define void @option1() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([27 x i8], [27 x i8]* @str, i64 0, i64 0))
ret void
}
/* Variables and functions */
int fsync(int);
int full_fsync(int fd, int fullSync) {
  int rc;
  rc = fsync(fd);
  return rc;
}


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

x86 assembly (clang, -O2):
<full_fsync>:
jmp    1030 <fsync@plt>

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

LLVM IR (-O2):
define i32 @full_fsync(i32 %0, i32 %1) {
%3 = tail call i32 @fsync(i32 %0)
ret i32 %3
}
/* Type definitions */
typedef scalar_t__ volatile uint32_t;

/* Variables and functions */
uint32_t EPIIntStatus(uint32_t ui32Base, bool bMasked) {
  ;
  if (bMasked) {
    return ((*((volatile uint32_t *)(ui32Base + 0x00000218))));
  } else {
    return ((*((volatile uint32_t *)(ui32Base + 0x00000214))));
  }
}


x86 assembly (clang, -O0):
<EPIIntStatus>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    %esi,-0x14(%rbp)
cmpl   $0x0,-0x14(%rbp)
je     1129 <EPIIntStatus+0x29>
mov    -0x10(%rbp),%rax
mov    0x218(%rax),%rax
mov    %rax,-0x8(%rbp)
jmp    1138 <EPIIntStatus+0x38>
mov    -0x10(%rbp),%rax
mov    0x214(%rax),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<EPIIntStatus>:
mov    %rdi,-0x8(%rsp)
xor    %eax,%eax
test   %esi,%esi
setne  %al
mov    -0x8(%rsp),%rcx
mov    0x214(%rcx,%rax,4),%rax
ret

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

LLVM IR (-O2):
define i64 @EPIIntStatus(i64 %0, i32 %1) {
%3 = alloca i64
store volatile i64 %0, i64* %3
%4 = icmp eq i32 %1, 0
%5 = load volatile i64, i64* %3
%6 = select i1 %4, i64 532, i64 536
%7 = add nsw i64 %5, %6
%8 = inttoptr i64 %7 to i64*
%9 = load volatile i64, i64* %8
ret i64 %9
}
/* Forward declarations */
typedef struct TYPE_2__ TYPE_1__;

/* Type definitions */
struct TYPE_2__ {
  scalar_t__ y;
};
typedef TYPE_1__ XKeyPressedEvent;

/* Variables and functions */
int get_XKeyPressedEvent_y(void *_p) {
  return (int)((XKeyPressedEvent *)_p)->y;
}


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

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

LLVM IR (-O0):
%struct.TYPE_2__ = type { i64 }
define i32 @get_XKeyPressedEvent_y(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_XKeyPressedEvent_y(i8* nocapture %0) {
%2 = bitcast i8* %0 to i64*
%3 = load i64, i64* %2
%4 = trunc i64 %3 to i32
ret i32 %4
}
void trace_block_enter(struct __trace_block *tb) {}


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

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

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

LLVM IR (-O2):
%struct.__trace_block = type opaque
define void @trace_block_enter(%struct.__trace_block* nocapture %0) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ getenv(char *);
int /*<<< orphan*/ parse_function(int /*<<< orphan*/, char *, char ***, int *);
void get_paths(char ***paths, int *argc) {
  parse_function(getenv("PATH"), ":", paths, argc);
}


x86 assembly (clang, -O0):
<get_paths>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
lea    0xec9(%rip),%rdi
call   1030 <getenv@plt>
mov    %eax,%edi
mov    -0x8(%rbp),%rdx
mov    -0x10(%rbp),%rcx
lea    0xeb8(%rip),%rsi
call   1040 <parse_function@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_paths>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%r14
mov    %rdi,%rbx
lea    0xecf(%rip),%rdi
call   1030 <getenv@plt>
lea    0xec8(%rip),%rsi
mov    %eax,%edi
mov    %rbx,%rdx
mov    %r14,%rcx
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1040 <parse_function@plt>

LLVM IR (-O0):
@.str = [5 x i8] c"PATH\00"
@.str.1 = [2 x i8] c":\00"
define void @get_paths(i8*** %0, i32* %1) {
%3 = alloca i8***
%4 = alloca i32*
store i8*** %0, i8**** %3
store i32* %1, i32** %4
%5 = call i32 @getenv(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0))
%6 = load i8***, i8**** %3
%7 = load i32*, i32** %4
%8 = call i32 @parse_function(i32 %5, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0), i8*** %6, i32* %7)
ret void
}

LLVM IR (-O2):
@.str = [5 x i8] c"PATH\00"
@.str.1 = [2 x i8] c":\00"
define void @get_paths(i8*** %0, i32* %1) {
%3 = tail call i32 @getenv(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0))
%4 = tail call i32 @parse_function(i32 %3, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0), i8*** %0, i32* %1)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ convert_addresses(char **, int, char *, int *);
void __gnat_gmem_symbolic(void *addr, char *buf, int *length) {
  char *addresses[] = {(char *)addr};
  extern char **gnat_argv;
  convert_addresses(addresses, 1, buf, length);
}


x86 assembly (clang, -O0):
<__gnat_gmem_symbolic>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x20(%rbp)
lea    -0x20(%rbp),%rdi
mov    -0x10(%rbp),%rdx
mov    -0x18(%rbp),%rcx
mov    $0x1,%esi
call   1030 <convert_addresses@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<__gnat_gmem_symbolic>:
push   %rax
mov    %rdx,%rcx
mov    %rsi,%rdx
mov    %rdi,(%rsp)
mov    %rsp,%rdi
mov    $0x1,%esi
call   1030 <convert_addresses@plt>
pop    %rax
ret

LLVM IR (-O0):
define void @__gnat_gmem_symbolic(i8* %0, i8* %1, i32* %2) {
%4 = alloca i8*
%5 = alloca i8*
%6 = alloca i32*
%7 = alloca [1 x i8*]
store i8* %0, i8** %4
store i8* %1, i8** %5
store i32* %2, i32** %6
%8 = getelementptr inbounds [1 x i8*], [1 x i8*]* %7, i64 0, i64 0
%9 = load i8*, i8** %4
store i8* %9, i8** %8
%10 = getelementptr inbounds [1 x i8*], [1 x i8*]* %7, i64 0, i64 0
%11 = load i8*, i8** %5
%12 = load i32*, i32** %6
%13 = call i32 @convert_addresses(i8** %10, i32 1, i8* %11, i32* %12)
ret void
}

LLVM IR (-O2):
define void @__gnat_gmem_symbolic(i8* %0, i8* %1, i32* %2) {
%4 = alloca [1 x i8*]
%5 = bitcast [1 x i8*]* %4 to i8*
%6 = getelementptr inbounds [1 x i8*], [1 x i8*]* %4, i64 0, i64 0
store i8* %0, i8** %6
%7 = call i32 @convert_addresses(i8** %6, i32 1, i8* %1, i32* %2)
ret void
}
/* Variables and functions */
int isblank(char);
int main(void) { return isblank(' '); }


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

x86 assembly (clang, -O2):
<main>:
mov    $0x20,%edi
jmp    1030 <isblank@plt>

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 @isblank(i8 signext 32)
ret i32 %2
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 @isblank(i8 signext 32)
ret i32 %1
}
/* Variables and functions */
int /*<<< orphan*/ display_set_cursor(int /*<<< orphan*/, int /*<<< orphan*/);
int /*<<< orphan*/ hd44780_display_hal_init();
void display_init(void) {
  hd44780_display_hal_init();
  display_set_cursor(0, 0);
}


x86 assembly (clang, -O0):
<display_init>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1040 <hd44780_display_hal_init@plt>
xor    %esi,%esi
mov    %esi,%edi
call   1030 <display_set_cursor@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<display_init>:
push   %rax
xor    %eax,%eax
call   1040 <hd44780_display_hal_init@plt>
xor    %edi,%edi
xor    %esi,%esi
pop    %rax
jmp    1030 <display_set_cursor@plt>

LLVM IR (-O0):
define void @display_init() {
%1 = call i32 (...) @hd44780_display_hal_init()
%2 = call i32 @display_set_cursor(i32 0, i32 0)
ret void
}

LLVM IR (-O2):
define void @display_init() {
%1 = tail call i32 (...) @hd44780_display_hal_init()
%2 = tail call i32 @display_set_cursor(i32 0, i32 0)
ret void
}
int test_imm_65uint64_midword_reg(unsigned long long val) {
  return ((val >> 16) & (0x65 << 0)) ? -20 : -40;
}


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

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

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

LLVM IR (-O2):
define i32 @test_imm_65uint64_midword_reg(i64 %0) {
%2 = and i64 %0, 6619136
%3 = icmp eq i64 %2, 0
%4 = select i1 %3, i32 -40, i32 -20
ret i32 %4
}
int pnpbios_proc_init(void) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @pnpbios_proc_init() {
ret i32 0
}
int main() {
  int i = 0;
  i++;
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
xor    %eax,%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @main() {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ SIGFPE;
int /*<<< orphan*/ my_atof(char *, double *);
int /*<<< orphan*/ raise(int /*<<< orphan*/);
double atof(char *s) {
  double d = 0.0;
  if (!my_atof(s, &d)) {
    raise(SIGFPE);
  }
  return d;
}


x86 assembly (clang, -O0):
<atof>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
lea    -0x10(%rbp),%rsi
call   1040 <my_atof@plt>
cmp    $0x0,%eax
jne    1158 <atof+0x38>
mov    0x2e97(%rip),%rax
mov    (%rax),%edi
call   1030 <raise@plt>
movsd  -0x10(%rbp),%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<atof>:
push   %rax
movq   $0x0,(%rsp)
mov    %rsp,%rsi
call   1040 <my_atof@plt>
test   %eax,%eax
jne    1143 <atof+0x23>
mov    0x2eac(%rip),%rax
mov    (%rax),%edi
call   1030 <raise@plt>
movsd  (%rsp),%xmm0
pop    %rax
ret

LLVM IR (-O0):
@SIGFPE = global i32 0
define double @atof(i8* %0) {
%2 = alloca i8*
%3 = alloca double
store i8* %0, i8** %2
store double 0.000000e+00, double* %3
%4 = load i8*, i8** %2
%5 = call i32 @my_atof(i8* %4, double* %3)
%6 = icmp ne i32 %5, 0
br i1 %6, label %10, label %7
7: ; preds = %1
%8 = load i32, i32* @SIGFPE
%9 = call i32 @raise(i32 %8)
br label %10
10: ; preds = %7, %1
%11 = load double, double* %3
ret double %11
}

LLVM IR (-O2):
@SIGFPE = global i32 0
define double @atof(i8* %0) {
%2 = alloca double
%3 = bitcast double* %2 to i8*
store double 0.000000e+00, double* %2
%4 = call i32 @my_atof(i8* %0, double* %2)
%5 = icmp eq i32 %4, 0
br i1 %5, label %6, label %9
6: ; preds = %1
%7 = load i32, i32* @SIGFPE
%8 = call i32 @raise(i32 %7)
br label %9
9: ; preds = %6, %1
%10 = load double, double* %2
ret double %10
}
/* Variables and functions */
char *strpbrk(char *, char *);
void sanitize_str(char *str) {
  if ((str = strpbrk(str, "\r\n")))
    *str = 0;
}


x86 assembly (clang, -O0):
<sanitize_str>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
lea    0xed9(%rip),%rsi
call   1030 <strpbrk@plt>
mov    %rax,-0x8(%rbp)
cmp    $0x0,%rax
je     1141 <sanitize_str+0x31>
mov    -0x8(%rbp),%rax
movb   $0x0,(%rax)
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<sanitize_str>:
push   %rax
lea    0xee8(%rip),%rsi
call   1030 <strpbrk@plt>
test   %rax,%rax
je     1125 <sanitize_str+0x15>
movb   $0x0,(%rax)
pop    %rax
ret

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

LLVM IR (-O2):
@.str = [3 x i8] c"\0D\0A\00"
define void @sanitize_str(i8* %0) {
%2 = tail call i8* @strpbrk(i8* %0, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0))
%3 = icmp eq i8* %2, null
br i1 %3, label %5, label %4
4: ; preds = %1
store i8 0, i8* %2
br label %5
5: ; preds = %4, %1
ret void
}
/* Variables and functions */
int /*<<< orphan*/ EXIT_FAILURE;
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ perror(char *);
int rmdir(char *);
void cleanup(void) {
  if (rmdir("fileio-fopen-directory.temp") == -1) {
    perror("rmdir");
    exit(EXIT_FAILURE);
  }
}


x86 assembly (clang, -O0):
<cleanup>:
push   %rbp
mov    %rsp,%rbp
lea    0xec5(%rip),%rdi
call   1030 <rmdir@plt>
cmp    $0xffffffff,%eax
jne    1163 <cleanup+0x33>
lea    0xecc(%rip),%rdi
call   1040 <perror@plt>
mov    0x2e84(%rip),%rax
mov    (%rax),%edi
call   1050 <exit@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<cleanup>:
push   %rax
lea    0xec8(%rip),%rdi
call   1030 <rmdir@plt>
cmp    $0xffffffff,%eax
je     1144 <cleanup+0x14>
pop    %rax
ret
lea    0xed1(%rip),%rdi
call   1040 <perror@plt>
mov    0x2e89(%rip),%rax
mov    (%rax),%edi
call   1050 <exit@plt>

LLVM IR (-O0):
@.str = [28 x i8] c"fileio-fopen-directory.temp\00"
@.str.1 = [6 x i8] c"rmdir\00"
@EXIT_FAILURE = global i32 0
define void @cleanup() {
%1 = call i32 @rmdir(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str, i64 0, i64 0))
%2 = icmp eq i32 %1, -1
br i1 %2, label %3, label %7
3: ; preds = %0
%4 = call i32 @perror(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0))
%5 = load i32, i32* @EXIT_FAILURE
%6 = call i32 @exit(i32 %5)
unreachable
7: ; preds = %0
ret void
}

LLVM IR (-O2):
@.str = [28 x i8] c"fileio-fopen-directory.temp\00"
@.str.1 = [6 x i8] c"rmdir\00"
@EXIT_FAILURE = global i32 0
define void @cleanup() {
%1 = tail call i32 @rmdir(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str, i64 0, i64 0))
%2 = icmp eq i32 %1, -1
br i1 %2, label %3, label %7
3: ; preds = %0
%4 = tail call i32 @perror(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0))
%5 = load i32, i32* @EXIT_FAILURE
%6 = tail call i32 @exit(i32 %5)
unreachable
7: ; preds = %0
ret void
}
int f(long long x) { return x % (1 << 31); }


x86 assembly (clang, -O0):
<f>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    $0xffffffff80000000,%rcx
cqto
idiv   %rcx
mov    %edx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<f>:
mov    %rdi,%rax
lea    0x7fffffff(%rdi),%ecx
test   %rdi,%rdi
cmovns %eax,%ecx
and    $0x80000000,%ecx
sub    %ecx,%eax
ret

LLVM IR (-O0):
define i32 @f(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = load i64, i64* %2
%4 = srem i64 %3, -2147483648
%5 = trunc i64 %4 to i32
ret i32 %5
}

LLVM IR (-O2):
define i32 @f(i64 %0) {
%2 = srem i64 %0, 2147483648
%3 = trunc i64 %2 to i32
ret i32 %3
}
int ft_islower(int c) { return ('a' <= c && c <= 'z'); }


x86 assembly (clang, -O0):
<ft_islower>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
xor    %eax,%eax
mov    $0x61,%ecx
cmp    -0x4(%rbp),%ecx
mov    %al,-0x5(%rbp)
jg     1124 <ft_islower+0x24>
cmpl   $0x7a,-0x4(%rbp)
setle  %al
mov    %al,-0x5(%rbp)
mov    -0x5(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<ft_islower>:
add    $0xffffff9f,%edi
xor    %eax,%eax
cmp    $0x1a,%edi
setb   %al
ret

LLVM IR (-O0):
define i32 @ft_islower(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = icmp sle i32 97, %3
br i1 %4, label %5, label %8
5: ; preds = %1
%6 = load i32, i32* %2
%7 = icmp sle i32 %6, 122
br label %8
8: ; preds = %5, %1
%9 = phi i1 [ false, %1 ], [ %7, %5 ]
%10 = zext i1 %9 to i32
ret i32 %10
}

LLVM IR (-O2):
define i32 @ft_islower(i32 %0) {
%2 = add i32 %0, -97
%3 = icmp ult i32 %2, 26
%4 = zext i1 %3 to i32
ret i32 %4
}
void gtk_file_selection_get_type() {}


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

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

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

LLVM IR (-O2):
define void @gtk_file_selection_get_type() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
int /*<<< orphan*/ stderr;
void usage(void) { fprintf(stderr, "eklogin [-l username] hostname\n\n"); }


x86 assembly (clang, -O0):
<usage>:
push   %rbp
mov    %rsp,%rbp
mov    0x2ec5(%rip),%rax
mov    (%rax),%edi
lea    0xedc(%rip),%rsi
call   1030 <fprintf@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<usage>:
mov    0x2ec9(%rip),%rax
mov    (%rax),%edi
lea    0xee0(%rip),%rsi
jmp    1030 <fprintf@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [33 x i8] c"eklogin [-l username] hostname\0A\0A\00"
define void @usage() {
%1 = load i32, i32* @stderr
%2 = call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [33 x i8] c"eklogin [-l username] hostname\0A\0A\00"
define void @usage() {
%1 = load i32, i32* @stderr
%2 = tail call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str, i64 0, i64 0))
ret void
}
void rop3_51_1_1(unsigned char *D, unsigned char S, unsigned char T) {
  unsigned char stk1;
  stk1 = ~S;
  *D = (stk1 & (~S) & (~T)) | (*D & S) | (*D & T);
}


x86 assembly (clang, -O0):
<rop3_51_1_1>:
push   %rbp
mov    %rsp,%rbp
mov    %dl,%al
mov    %sil,%cl
mov    %rdi,-0x8(%rbp)
mov    %cl,-0x9(%rbp)
mov    %al,-0xa(%rbp)
movzbl -0x9(%rbp),%eax
xor    $0xffffffff,%eax
mov    %al,-0xb(%rbp)
movzbl -0xb(%rbp),%eax
movzbl -0x9(%rbp),%ecx
xor    $0xffffffff,%ecx
and    %ecx,%eax
movzbl -0xa(%rbp),%ecx
xor    $0xffffffff,%ecx
and    %ecx,%eax
mov    -0x8(%rbp),%rcx
movzbl (%rcx),%ecx
movzbl -0x9(%rbp),%edx
and    %edx,%ecx
or     %ecx,%eax
mov    -0x8(%rbp),%rcx
movzbl (%rcx),%ecx
movzbl -0xa(%rbp),%edx
and    %edx,%ecx
or     %ecx,%eax
mov    %al,%cl
mov    -0x8(%rbp),%rax
mov    %cl,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<rop3_51_1_1>:
mov    %edx,%eax
or     %sil,%al
not    %al
mov    (%rdi),%cl
and    %cl,%sil
or     %al,%sil
and    %dl,%cl
or     %sil,%cl
mov    %cl,(%rdi)
ret

LLVM IR (-O0):
define void @rop3_51_1_1(i8* %0, i8 zeroext %1, i8 zeroext %2) {
%4 = alloca i8*
%5 = alloca i8
%6 = alloca i8
%7 = alloca i8
store i8* %0, i8** %4
store i8 %1, i8* %5
store i8 %2, i8* %6
%8 = load i8, i8* %5
%9 = zext i8 %8 to i32
%10 = xor i32 %9, -1
%11 = trunc i32 %10 to i8
store i8 %11, i8* %7
%12 = load i8, i8* %7
%13 = zext i8 %12 to i32
%14 = load i8, i8* %5
%15 = zext i8 %14 to i32
%16 = xor i32 %15, -1
%17 = and i32 %13, %16
%18 = load i8, i8* %6
%19 = zext i8 %18 to i32
%20 = xor i32 %19, -1
%21 = and i32 %17, %20
%22 = load i8*, i8** %4
%23 = load i8, i8* %22
%24 = zext i8 %23 to i32
%25 = load i8, i8* %5
%26 = zext i8 %25 to i32
%27 = and i32 %24, %26
%28 = or i32 %21, %27
%29 = load i8*, i8** %4
%30 = load i8, i8* %29
%31 = zext i8 %30 to i32
%32 = load i8, i8* %6
%33 = zext i8 %32 to i32
%34 = and i32 %31, %33
%35 = or i32 %28, %34
%36 = trunc i32 %35 to i8
%37 = load i8*, i8** %4
store i8 %36, i8* %37
ret void
}

LLVM IR (-O2):
define void @rop3_51_1_1(i8* nocapture %0, i8 zeroext %1, i8 zeroext %2) {
%4 = or i8 %2, %1
%5 = xor i8 %4, -1
%6 = load i8, i8* %0
%7 = and i8 %6, %1
%8 = or i8 %7, %5
%9 = and i8 %6, %2
%10 = or i8 %8, %9
store i8 %10, i8* %0
ret void
}
/* Variables and functions */
bool arch_core_is_bsp(void) { return true; }


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

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

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

LLVM IR (-O2):
define i32 @arch_core_is_bsp() {
ret i32 1
}
void __attribute__((stdcall)) typedef_fun(int x) {}


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

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

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

LLVM IR (-O2):
define void @typedef_fun(i32 %0) {
ret void
}
void WDTimerRestart(void) {}


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

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

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

LLVM IR (-O2):
define void @WDTimerRestart() {
ret void
}
int fun1237() { return 1237; }


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

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

LLVM IR (-O0):
define i32 @fun1237() {
ret i32 1237
}

LLVM IR (-O2):
define i32 @fun1237() {
ret i32 1237
}
/* Variables and functions */
int /*<<< orphan*/ imodCopyright();
int /*<<< orphan*/ imodVersion(char *);
void imodUsageHeader(char *pname) {
  imodVersion(pname);
  imodCopyright();
}


x86 assembly (clang, -O0):
<imodUsageHeader>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <imodVersion@plt>
mov    $0x0,%al
call   1030 <imodCopyright@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<imodUsageHeader>:
push   %rax
call   1040 <imodVersion@plt>
xor    %eax,%eax
pop    %rcx
jmp    1030 <imodCopyright@plt>

LLVM IR (-O0):
define void @imodUsageHeader(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 @imodVersion(i8* %3)
%5 = call i32 (...) @imodCopyright()
ret void
}

LLVM IR (-O2):
define void @imodUsageHeader(i8* %0) {
%2 = tail call i32 @imodVersion(i8* %0)
%3 = tail call i32 (...) @imodCopyright()
ret void
}
void px_strfreev(char **strv) {
  if (!strv)
    return;
  for (int i = 0; *(strv + i); i++)
    px_free(*(strv + i));
  px_free(strv);
}


x86 assembly (clang, -O0):
<px_strfreev>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
cmpq   $0x0,-0x8(%rbp)
jne    112c <px_strfreev+0x1c>
jmp    1172 <px_strfreev+0x62>
movl   $0x0,-0xc(%rbp)
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
cmpq   $0x0,(%rax,%rcx,8)
je     1167 <px_strfreev+0x57>
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
mov    (%rax,%rcx,8),%rdi
mov    $0x0,%al
call   1030 <px_free@plt>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1133 <px_strfreev+0x23>
mov    -0x8(%rbp),%rdi
mov    $0x0,%al
call   1030 <px_free@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<px_strfreev>:
test   %rdi,%rdi
je     1154 <px_strfreev+0x44>
push   %r14
push   %rbx
push   %rax
mov    %rdi,%r14
mov    (%rdi),%rdi
test   %rdi,%rdi
je     1143 <px_strfreev+0x33>
lea    0x8(%r14),%rbx
nopl   0x0(%rax,%rax,1)
xor    %eax,%eax
call   1030 <px_free@plt>
mov    (%rbx),%rdi
add    $0x8,%rbx
test   %rdi,%rdi
jne    1130 <px_strfreev+0x20>
mov    %r14,%rdi
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1030 <px_free@plt>
ret

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

LLVM IR (-O2):
define void @px_strfreev(i8** %0) {
%2 = icmp eq i8** %0, null
br i1 %2, label %16, label %3
3: ; preds = %1
%4 = load i8*, i8** %0
%5 = icmp eq i8* %4, null
br i1 %5, label %6, label %8
6: ; preds = %8, %3
%7 = tail call i32 (i8**, ...) bitcast (i32 (...)* @px_free to i32 (i8**, ...)*)(i8** %0)
br label %16
8: ; preds = %3, %8
%9 = phi i64 [ %12, %8 ], [ 0, %3 ]
%10 = phi i8* [ %14, %8 ], [ %4, %3 ]
%11 = tail call i32 (i8*, ...) bitcast (i32 (...)* @px_free to i32 (i8*, ...)*)(i8* %10)
%12 = add nuw i64 %9, 1
%13 = getelementptr inbounds i8*, i8** %0, i64 %12
%14 = load i8*, i8** %13
%15 = icmp eq i8* %14, null
br i1 %15, label %6, label %8
16: ; preds = %1, %6
ret void
}
int test_imm_CBint32_mem(int *val) {
  return ((*val) & (0xCB << 0)) ? -20 : -40;
}


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

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

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

LLVM IR (-O2):
define i32 @test_imm_CBint32_mem(i32* nocapture %0) {
%2 = load i32, i32* %0
%3 = and i32 %2, 203
%4 = icmp eq i32 %3, 0
%5 = select i1 %4, i32 -40, i32 -20
ret i32 %5
}
void destroy(int *i) {}


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

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

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

LLVM IR (-O2):
define void @destroy(i32* nocapture %0) {
ret void
}
extern void set_gdump_content_dnumcolumns_dnumversion(int *numcolumns,
                                                      int *numversion) {
  *numcolumns = 3 * 3 + 4 * 4 * 4 + 1 * 4 * 4 * 2 + 1 + 4 + 4 * 4;
  *numversion = 0;
}


x86 assembly (clang, -O0):
<set_gdump_content_dnumcolumns_dnumversion>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
movl   $0x7e,(%rax)
mov    -0x10(%rbp),%rax
movl   $0x0,(%rax)
pop    %rbp
ret

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

LLVM IR (-O0):
define void @set_gdump_content_dnumcolumns_dnumversion(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
store i32 126, i32* %5
%6 = load i32*, i32** %4
store i32 0, i32* %6
ret void
}

LLVM IR (-O2):
define void @set_gdump_content_dnumcolumns_dnumversion(i32* nocapture writeonly %0, i32* nocapture writeonly %1) {
store i32 126, i32* %0
store i32 0, i32* %1
ret void
}
void RandomFunc(unsigned char input[1], unsigned char output[1]) {
  unsigned char state[1];
  {
    state[0UL] = (input[0UL] + 51238316UL) + (unsigned char)234;
    if ((state[0UL] >> (unsigned char)4) & (unsigned char)1) {
      state[0UL] += state[0UL];
    } else {
      state[0UL] += state[0UL];
    }
    output[0UL] = (state[0UL] + 797481593UL) * (unsigned char)95;
  }
}


x86 assembly (clang, -O0):
<RandomFunc>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
movzbl (%rax),%eax
add    $0x30dd5ac,%rax
add    $0xea,%rax
mov    %al,-0x11(%rbp)
movzbl -0x11(%rbp),%eax
sar    $0x4,%eax
and    $0x1,%eax
cmp    $0x0,%eax
je     1147 <RandomFunc+0x47>
movzbl -0x11(%rbp),%ecx
movzbl -0x11(%rbp),%eax
add    %ecx,%eax
mov    %al,-0x11(%rbp)
jmp    1154 <RandomFunc+0x54>
movzbl -0x11(%rbp),%ecx
movzbl -0x11(%rbp),%eax
add    %ecx,%eax
mov    %al,-0x11(%rbp)
movzbl -0x11(%rbp),%eax
add    $0x2f889a79,%rax
imul   $0x5f,%rax,%rax
mov    %al,%cl
mov    -0x10(%rbp),%rax
mov    %cl,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<RandomFunc>:
movzbl (%rdi),%eax
imul   $0xffffffbe,%eax,%eax
add    $0x3b,%al
mov    %al,(%rsi)
ret

LLVM IR (-O0):
define void @RandomFunc(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
%5 = alloca [1 x i8]
store i8* %0, i8** %3
store i8* %1, i8** %4
%6 = load i8*, i8** %3
%7 = getelementptr inbounds i8, i8* %6, i64 0
%8 = load i8, i8* %7
%9 = zext i8 %8 to i64
%10 = add i64 %9, 51238316
%11 = add i64 %10, 234
%12 = trunc i64 %11 to i8
%13 = getelementptr inbounds [1 x i8], [1 x i8]* %5, i64 0, i64 0
store i8 %12, i8* %13
%14 = getelementptr inbounds [1 x i8], [1 x i8]* %5, i64 0, i64 0
%15 = load i8, i8* %14
%16 = zext i8 %15 to i32
%17 = ashr i32 %16, 4
%18 = and i32 %17, 1
%19 = icmp ne i32 %18, 0
br i1 %19, label %20, label %29
20: ; preds = %2
%21 = getelementptr inbounds [1 x i8], [1 x i8]* %5, i64 0, i64 0
%22 = load i8, i8* %21
%23 = zext i8 %22 to i32
%24 = getelementptr inbounds [1 x i8], [1 x i8]* %5, i64 0, i64 0
%25 = load i8, i8* %24
%26 = zext i8 %25 to i32
%27 = add nsw i32 %26, %23
%28 = trunc i32 %27 to i8
store i8 %28, i8* %24
br label %38
29: ; preds = %2
%30 = getelementptr inbounds [1 x i8], [1 x i8]* %5, i64 0, i64 0
%31 = load i8, i8* %30
%32 = zext i8 %31 to i32
%33 = getelementptr inbounds [1 x i8], [1 x i8]* %5, i64 0, i64 0
%34 = load i8, i8* %33
%35 = zext i8 %34 to i32
%36 = add nsw i32 %35, %32
%37 = trunc i32 %36 to i8
store i8 %37, i8* %33
br label %38
38: ; preds = %29, %20
%39 = getelementptr inbounds [1 x i8], [1 x i8]* %5, i64 0, i64 0
%40 = load i8, i8* %39
%41 = zext i8 %40 to i64
%42 = add i64 %41, 797481593
%43 = mul i64 %42, 95
%44 = trunc i64 %43 to i8
%45 = load i8*, i8** %4
%46 = getelementptr inbounds i8, i8* %45, i64 0
store i8 %44, i8* %46
ret void
}

LLVM IR (-O2):
define void @RandomFunc(i8* nocapture %0, i8* nocapture writeonly %1) {
%3 = load i8, i8* %0
%4 = mul i8 %3, -66
%5 = add i8 %4, 59
store i8 %5, i8* %1
ret void
}
const char *gcd_hupper_get_title(void) { return "Send HUP signals to gcd"; }


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

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

LLVM IR (-O0):
@.str = [24 x i8] c"Send HUP signals to gcd\00"
define i8* @gcd_hupper_get_title() {
ret i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str, i64 0, i64 0)
}

LLVM IR (-O2):
@.str = [24 x i8] c"Send HUP signals to gcd\00"
define i8* @gcd_hupper_get_title() {
ret i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str, i64 0, i64 0)
}
/* Variables and functions */
double pow(double, int);
double F2(double x) {
  double Y = (1.0 / 3.0) * pow(x, 3) - 2.0 * x;
  return Y;
}


x86 assembly (clang, -O0):
<F2>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
mov    $0x3,%edi
call   1030 <pow@plt>
movsd  0xed4(%rip),%xmm1
mulsd  -0x8(%rbp),%xmm1
movq   %xmm1,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm1
movsd  0xea8(%rip),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x10(%rbp)
movsd  -0x10(%rbp),%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<F2>:
push   %rax
movsd  %xmm0,(%rsp)
mov    $0x3,%edi
call   1030 <pow@plt>
mulsd  0xed8(%rip),%xmm0
movsd  (%rsp),%xmm1
addsd  %xmm1,%xmm1
subsd  %xmm1,%xmm0
pop    %rax
ret

LLVM IR (-O0):
define double @F2(double %0) {
%2 = alloca double
%3 = alloca double
store double %0, double* %2
%4 = load double, double* %2
%5 = call double @pow(double %4, i32 3)
%6 = load double, double* %2
%7 = fmul double 2.000000e+00, %6
%8 = fneg double %7
%9 = call double @llvm.fmuladd.f64(double 0x3FD5555555555555, double %5, double %8)
store double %9, double* %3
%10 = load double, double* %3
ret double %10
}

LLVM IR (-O2):
define double @F2(double %0) {
%2 = tail call double @pow(double %0, i32 3)
%3 = fmul double %0, -2.000000e+00
%4 = tail call double @llvm.fmuladd.f64(double %2, double 0x3FD5555555555555, double %3)
ret double %4
}
/* Type definitions */
typedef int /*<<< orphan*/ pthread_cond_t;

/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int pthread_cond_broadcast(pthread_cond_t *cond) {
  printf("pthread_cond_broadcast\n");
  return 0;
}


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

x86 assembly (clang, -O2):
<pthread_cond_broadcast>:
push   %rax
lea    0xee8(%rip),%rdi
call   1030 <puts@plt>
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
@str = [23 x i8] c"pthread_cond_broadcast\00"
define i32 @pthread_cond_broadcast(i32* nocapture readnone %0) {
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([23 x i8], [23 x i8]* @str, i64 0, i64 0))
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ puts(char *);
int /*<<< orphan*/ scanf(char *, char *);
void ask_user(char *card_name) {
  puts("Enter the card_name: ");
  scanf("%2s", card_name);
}


x86 assembly (clang, -O0):
<ask_user>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
lea    0xecd(%rip),%rdi
call   1030 <puts@plt>
mov    -0x8(%rbp),%rsi
lea    0xed3(%rip),%rdi
call   1040 <scanf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ask_user>:
push   %rbx
mov    %rdi,%rbx
lea    0xed5(%rip),%rdi
call   1030 <puts@plt>
lea    0xedf(%rip),%rdi
mov    %rbx,%rsi
pop    %rbx
jmp    1040 <scanf@plt>

LLVM IR (-O0):
@.str = [22 x i8] c"Enter the card_name: \00"
@.str.1 = [4 x i8] c"%2s\00"
define void @ask_user(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = call i32 @puts(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0))
%4 = load i8*, i8** %2
%5 = call i32 @scanf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i8* %4)
ret void
}

LLVM IR (-O2):
@.str = [22 x i8] c"Enter the card_name: \00"
@.str.1 = [4 x i8] c"%2s\00"
define void @ask_user(i8* %0) {
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0))
%3 = tail call i32 @scanf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i8* %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
void *malloc(size_t);
int /*<<< orphan*/ stderr;
void *xmalloc(size_t size) {
  void *buf = malloc(size);
  if (buf == NULL) {
    fprintf(stderr, "It is not enough memory");
    exit(1);
  }
  return buf;
}


x86 assembly (clang, -O0):
<xmalloc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <malloc@plt>
mov    %rax,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
jne    1173 <xmalloc+0x43>
mov    0x2e85(%rip),%rax
mov    (%rax),%edi
lea    0xe9c(%rip),%rsi
call   1030 <fprintf@plt>
mov    $0x1,%edi
call   1050 <exit@plt>
mov    -0x10(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<xmalloc>:
push   %rax
call   1040 <malloc@plt>
test   %rax,%rax
je     113d <xmalloc+0xd>
pop    %rcx
ret
mov    0x2e9c(%rip),%rax
mov    (%rax),%edi
lea    0xeb3(%rip),%rsi
call   1030 <fprintf@plt>
mov    $0x1,%edi
call   1050 <exit@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [24 x i8] c"It is not enough memory\00"
define i8* @xmalloc(i64 %0) {
%2 = alloca i64
%3 = alloca i8*
store i64 %0, i64* %2
%4 = load i64, i64* %2
%5 = call i8* @malloc(i64 %4)
store i8* %5, i8** %3
%6 = load i8*, i8** %3
%7 = icmp eq i8* %6, null
br i1 %7, label %8, label %12
8: ; preds = %1
%9 = load i32, i32* @stderr
%10 = call i32 @fprintf(i32 %9, i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str, i64 0, i64 0))
%11 = call i32 @exit(i32 1)
unreachable
12: ; preds = %1
%13 = load i8*, i8** %3
ret i8* %13
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [24 x i8] c"It is not enough memory\00"
define noalias i8* @xmalloc(i64 %0) {
%2 = tail call i8* @malloc(i64 %0)
%3 = icmp eq i8* %2, null
br i1 %3, label %4, label %8
4: ; preds = %1
%5 = load i32, i32* @stderr
%6 = tail call i32 @fprintf(i32 %5, i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str, i64 0, i64 0))
%7 = tail call i32 @exit(i32 1)
unreachable
8: ; preds = %1
ret i8* %2
}
int execute_getxattr() { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @execute_getxattr() {
ret i32 0
}
/* Type definitions */
struct xa_switch_t {
  int dummy;
};

/* Variables and functions */
struct xa_switch_t *db2xacic_std();
struct xa_switch_t *lixa_get_xa_switch() {
  return db2xacic_std();
}


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

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

LLVM IR (-O0):
%struct.xa_switch_t = type { i32 }
define %struct.xa_switch_t* @lixa_get_xa_switch() {
%1 = call %struct.xa_switch_t* (...) @db2xacic_std()
ret %struct.xa_switch_t* %1
}

LLVM IR (-O2):
%struct.xa_switch_t = type { i32 }
define %struct.xa_switch_t* @lixa_get_xa_switch() {
%1 = tail call %struct.xa_switch_t* (...) @db2xacic_std()
ret %struct.xa_switch_t* %1
}
/* Variables and functions */
int /*<<< orphan*/ print_greetings();
int /*<<< orphan*/ sleep(int);
void do_work() {
  while (1) {
    print_greetings();
    sleep(1);
  }
}


x86 assembly (clang, -O0):
<do_work>:
push   %rbp
mov    %rsp,%rbp
jmp    1129 <do_work+0x9>
mov    $0x0,%al
call   1030 <print_greetings@plt>
mov    $0x1,%edi
call   1040 <sleep@plt>
jmp    1129 <do_work+0x9>

x86 assembly (clang, -O2):
<do_work>:
push   %rax
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
xor    %eax,%eax
call   1030 <print_greetings@plt>
mov    $0x1,%edi
call   1040 <sleep@plt>
jmp    1130 <do_work+0x10>

LLVM IR (-O0):
define void @do_work() {
br label %1
1: ; preds = %0, %1
%2 = call i32 (...) @print_greetings()
%3 = call i32 @sleep(i32 1)
br label %1
}

LLVM IR (-O2):
define void @do_work() {
br label %1
1: ; preds = %0, %1
%2 = tail call i32 (...) @print_greetings()
%3 = tail call i32 @sleep(i32 1)
br label %1
}
extern void __outw_p(unsigned short value, unsigned short port) {
  __asm__ __volatile__("out"
                       "w"
                       " %"
                       "w"
                       "0,%"
                       "w"
                       "1"
                       :
                       : "a"(value), "d"(port));
  __asm__ __volatile__("jmp 1f\n1:\tjmp 1f\n1:");
}


x86 assembly (clang, -O0):
<__outw_p>:
push   %rbp
mov    %rsp,%rbp
mov    %si,%ax
mov    %di,%cx
mov    %cx,-0x2(%rbp)
mov    %ax,-0x4(%rbp)
mov    -0x2(%rbp),%ax
mov    -0x4(%rbp),%dx
out    %ax,(%dx)
jmp    1121 <__outw_p+0x21>
jmp    1126 <__outw_p+0x26>
pop    %rbp
ret

x86 assembly (clang, -O2):
<__outw_p>:
mov    %esi,%edx
mov    %edi,%eax
out    %ax,(%dx)
jmp    1108 <__outw_p+0x8>
jmp    110a <__outw_p+0xa>
ret

LLVM IR (-O0):
define void @__outw_p(i16 zeroext %0, i16 zeroext %1) {
%3 = alloca i16
%4 = alloca i16
store i16 %0, i16* %3
store i16 %1, i16* %4
%5 = load i16, i16* %3
%6 = load i16, i16* %4
ret void
}

LLVM IR (-O2):
define void @__outw_p(i16 zeroext %0, i16 zeroext %1) {
tail call void asm sideeffect "outw ${0:w},${1:w}", "{ax},{dx},~{dirflag},~{fpsr},~{flags}"(i16 %0, i16 %1)
tail call void asm sideeffect "jmp 1f\0A1:\09jmp 1f\0A1:", "~{dirflag},~{fpsr},~{flags}"()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char *);
void *realloc(void *, size_t);
int /*<<< orphan*/ stderr;
void *erealloc(void *ptr, size_t size, char *errmsg) {
  void *val = realloc(ptr, size);
  if (val == NULL) {
    fprintf(stderr, "\n%s\n", errmsg);
    exit(12);
  }
  return val;
}


x86 assembly (clang, -O0):
<erealloc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1040 <realloc@plt>
mov    %rax,-0x20(%rbp)
cmpq   $0x0,-0x20(%rbp)
jne    1183 <erealloc+0x53>
mov    0x2e79(%rip),%rax
mov    (%rax),%edi
mov    -0x18(%rbp),%rdx
lea    0xe8c(%rip),%rsi
call   1030 <fprintf@plt>
mov    $0xc,%edi
call   1050 <exit@plt>
mov    -0x20(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<erealloc>:
push   %rbx
mov    %rdx,%rbx
call   1040 <realloc@plt>
test   %rax,%rax
je     1140 <erealloc+0x10>
pop    %rbx
ret
mov    0x2e99(%rip),%rax
mov    (%rax),%edi
lea    0xeb0(%rip),%rsi
mov    %rbx,%rdx
call   1030 <fprintf@plt>
mov    $0xc,%edi
call   1050 <exit@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [5 x i8] c"\0A%s\0A\00"
define i8* @erealloc(i8* %0, i64 %1, i8* %2) {
%4 = alloca i8*
%5 = alloca i64
%6 = alloca i8*
%7 = alloca i8*
store i8* %0, i8** %4
store i64 %1, i64* %5
store i8* %2, i8** %6
%8 = load i8*, i8** %4
%9 = load i64, i64* %5
%10 = call i8* @realloc(i8* %8, i64 %9)
store i8* %10, i8** %7
%11 = load i8*, i8** %7
%12 = icmp eq i8* %11, null
br i1 %12, label %13, label %18
13: ; preds = %3
%14 = load i32, i32* @stderr
%15 = load i8*, i8** %6
%16 = call i32 @fprintf(i32 %14, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i8* %15)
%17 = call i32 @exit(i32 12)
unreachable
18: ; preds = %3
%19 = load i8*, i8** %7
ret i8* %19
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [5 x i8] c"\0A%s\0A\00"
define noalias i8* @erealloc(i8* nocapture %0, i64 %1, i8* %2) {
%4 = tail call i8* @realloc(i8* %0, i64 %1)
%5 = icmp eq i8* %4, null
br i1 %5, label %6, label %10
6: ; preds = %3
%7 = load i32, i32* @stderr
%8 = tail call i32 @fprintf(i32 %7, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i8* %2)
%9 = tail call i32 @exit(i32 12)
unreachable
10: ; preds = %3
ret i8* %4
}