xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ addbyte(int);
void MMX_ADDW(int dst_reg, int src_reg) {
  addbyte(0x66);
  addbyte(0x0f);
  addbyte(0xfd);
  addbyte(0xc0 | (dst_reg << 3) | src_reg);
}


x86 assembly (clang, -O0):
<MMX_ADDW>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    $0x66,%edi
call   1030 <addbyte@plt>
mov    $0xf,%edi
call   1030 <addbyte@plt>
mov    $0xfd,%edi
call   1030 <addbyte@plt>
mov    -0x4(%rbp),%edi
shl    $0x3,%edi
or     $0xc0,%edi
or     -0x8(%rbp),%edi
call   1030 <addbyte@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<MMX_ADDW>:
push   %rbp
push   %rbx
push   %rax
mov    %esi,%ebx
mov    %edi,%ebp
mov    $0x66,%edi
call   1030 <addbyte@plt>
mov    $0xf,%edi
call   1030 <addbyte@plt>
mov    $0xfd,%edi
call   1030 <addbyte@plt>
shl    $0x3,%ebp
or     %ebx,%ebp
or     $0xc0,%ebp
mov    %ebp,%edi
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    1030 <addbyte@plt>

LLVM IR (-O0):
define void @MMX_ADDW(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%5 = call i32 @addbyte(i32 102)
%6 = call i32 @addbyte(i32 15)
%7 = call i32 @addbyte(i32 253)
%8 = load i32, i32* %3
%9 = shl i32 %8, 3
%10 = or i32 192, %9
%11 = load i32, i32* %4
%12 = or i32 %10, %11
%13 = call i32 @addbyte(i32 %12)
ret void
}

LLVM IR (-O2):
define void @MMX_ADDW(i32 %0, i32 %1) {
%3 = tail call i32 @addbyte(i32 102)
%4 = tail call i32 @addbyte(i32 15)
%5 = tail call i32 @addbyte(i32 253)
%6 = shl i32 %0, 3
%7 = or i32 %6, %1
%8 = or i32 %7, 192
%9 = tail call i32 @addbyte(i32 %8)
ret void
}
/* Variables and functions */
int curses_init(char const *);
int /*<<< orphan*/ term_read_caps();
int /*<<< orphan*/ term_setup_extra_keys(char const *);
int term_init(const char *term) {
  int rc = curses_init(term);
  if (rc != 0) {
    return rc;
  }
  term_read_caps();
  term_setup_extra_keys(term);
  return 0;
}


x86 assembly (clang, -O0):
<term_init>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
call   1030 <curses_init@plt>
mov    %eax,-0x14(%rbp)
cmpl   $0x0,-0x14(%rbp)
je     115d <term_init+0x2d>
mov    -0x14(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    1174 <term_init+0x44>
mov    $0x0,%al
call   1040 <term_read_caps@plt>
mov    -0x10(%rbp),%rdi
call   1050 <term_setup_extra_keys@plt>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<term_init>:
push   %rbp
push   %rbx
push   %rax
mov    %rdi,%rbx
call   1030 <curses_init@plt>
mov    %eax,%ebp
test   %eax,%eax
jne    1150 <term_init+0x20>
xor    %eax,%eax
call   1040 <term_read_caps@plt>
mov    %rbx,%rdi
call   1050 <term_setup_extra_keys@plt>
mov    %ebp,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

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

LLVM IR (-O2):
define i32 @term_init(i8* %0) {
%2 = tail call i32 @curses_init(i8* %0)
%3 = icmp eq i32 %2, 0
br i1 %3, label %4, label %7
4: ; preds = %1
%5 = tail call i32 (...) @term_read_caps()
%6 = tail call i32 @term_setup_extra_keys(i8* %0)
br label %7
7: ; preds = %1, %4
ret i32 %2
}
char *hash_plugin_summary(void) {
  return ("osx-ml \tOSX Mountain Lion hashes plugin");
}


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

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

LLVM IR (-O0):
@.str = [40 x i8] c"osx-ml \09OSX Mountain Lion hashes plugin\00"
define i8* @hash_plugin_summary() {
ret i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str, i64 0, i64 0)
}

LLVM IR (-O2):
@.str = [40 x i8] c"osx-ml \09OSX Mountain Lion hashes plugin\00"
define i8* @hash_plugin_summary() {
ret i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str, i64 0, i64 0)
}
/* Type definitions */
struct drm_scatter_gather {
  int dummy;
};
struct drm_file {
  int dummy;
};
struct drm_device {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ DRM_DEBUG(char *);
int drm_sg_alloc(struct drm_device *, struct drm_scatter_gather *);
int drm_sg_alloc_ioctl(struct drm_device *dev, void *data,
                       struct drm_file *file_priv) {
  struct drm_scatter_gather *request = data;
  DRM_DEBUG("\n");
  return drm_sg_alloc(dev, request);
}


x86 assembly (clang, -O0):
<drm_sg_alloc_ioctl>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x20(%rbp)
lea    0xebd(%rip),%rdi
call   1040 <DRM_DEBUG@plt>
mov    -0x8(%rbp),%rdi
mov    -0x20(%rbp),%rsi
call   1030 <drm_sg_alloc@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<drm_sg_alloc_ioctl>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%r14
mov    %rdi,%rbx
lea    0xecf(%rip),%rdi
call   1040 <DRM_DEBUG@plt>
mov    %rbx,%rdi
mov    %r14,%rsi
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1030 <drm_sg_alloc@plt>

LLVM IR (-O0):
%struct.drm_device = type { i32 }
%struct.drm_file = type { i32 }
%struct.drm_scatter_gather = type { i32 }
@.str = [2 x i8] c"\0A\00"
define i32 @drm_sg_alloc_ioctl(%struct.drm_device* %0, i8* %1, %struct.drm_file* %2) {
%4 = alloca %struct.drm_device*
%5 = alloca i8*
%6 = alloca %struct.drm_file*
%7 = alloca %struct.drm_scatter_gather*
store %struct.drm_device* %0, %struct.drm_device** %4
store i8* %1, i8** %5
store %struct.drm_file* %2, %struct.drm_file** %6
%8 = load i8*, i8** %5
%9 = bitcast i8* %8 to %struct.drm_scatter_gather*
store %struct.drm_scatter_gather* %9, %struct.drm_scatter_gather** %7
%10 = call i32 @DRM_DEBUG(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
%11 = load %struct.drm_device*, %struct.drm_device** %4
%12 = load %struct.drm_scatter_gather*, %struct.drm_scatter_gather** %7
%13 = call i32 @drm_sg_alloc(%struct.drm_device* %11, %struct.drm_scatter_gather* %12)
ret i32 %13
}

LLVM IR (-O2):
%struct.drm_device = type { i32 }
%struct.drm_file = type { i32 }
%struct.drm_scatter_gather = type { i32 }
@.str = [2 x i8] c"\0A\00"
define i32 @drm_sg_alloc_ioctl(%struct.drm_device* %0, i8* %1, %struct.drm_file* nocapture readnone %2) {
%4 = bitcast i8* %1 to %struct.drm_scatter_gather*
%5 = tail call i32 @DRM_DEBUG(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
%6 = tail call i32 @drm_sg_alloc(%struct.drm_device* %0, %struct.drm_scatter_gather* %4)
ret i32 %6
}
unsigned _utf8_shiftpos(unsigned w, unsigned n) { return 6 * (w - 1 - n); }


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

x86 assembly (clang, -O2):
<_utf8_shiftpos>:
not    %esi
add    %edi,%esi
add    %esi,%esi
lea    (%rsi,%rsi,2),%eax
ret

LLVM IR (-O0):
define i32 @_utf8_shiftpos(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 = sub i32 %5, 1
%7 = load i32, i32* %4
%8 = sub i32 %6, %7
%9 = mul i32 6, %8
ret i32 %9
}

LLVM IR (-O2):
define i32 @_utf8_shiftpos(i32 %0, i32 %1) {
%3 = xor i32 %1, -1
%4 = add i32 %3, %0
%5 = mul i32 %4, 6
ret i32 %5
}
void g_date_clamp() {}


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

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

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

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


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

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

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

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


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

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

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

LLVM IR (-O2):
define void @g_printf() {
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ uint8_t;
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ assert(int /*<<< orphan*/);
int /*<<< orphan*/ fwrite(int /*<<< orphan*/ const *, int, int,
                          int /*<<< orphan*/ *);
void serialize_uint8(FILE *out, const uint8_t x) {
  assert(fwrite(&x, sizeof(uint8_t), 1, out));
}


x86 assembly (clang, -O0):
<serialize_uint8>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rcx
lea    -0xc(%rbp),%rdi
mov    $0x4,%esi
mov    $0x1,%edx
call   1040 <fwrite@plt>
mov    %eax,%edi
call   1030 <assert@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<serialize_uint8>:
push   %rax
mov    %rdi,%rcx
mov    %esi,0x4(%rsp)
lea    0x4(%rsp),%rdi
mov    $0x4,%esi
mov    $0x1,%edx
call   1040 <fwrite@plt>
mov    %eax,%edi
pop    %rax
jmp    1030 <assert@plt>

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

LLVM IR (-O2):
define void @serialize_uint8(i32* nocapture %0, i32 %1) {
%3 = alloca i32
store i32 %1, i32* %3
%4 = call i32 @fwrite(i32* %3, i32 4, i32 1, i32* %0)
%5 = tail call i32 @assert(i32 %4)
ret void
}
/* Type definitions */
typedef int uint32_t;

/* Variables and functions */
uint32_t mi_reg(uint32_t address) { return (address & 0xffff) >> 2; }


x86 assembly (clang, -O0):
<mi_reg>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
and    $0xffff,%eax
sar    $0x2,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<mi_reg>:
mov    %edi,%eax
shr    $0x2,%eax
and    $0x3fff,%eax
ret

LLVM IR (-O0):
define i32 @mi_reg(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = and i32 %3, 65535
%5 = ashr i32 %4, 2
ret i32 %5
}

LLVM IR (-O2):
define i32 @mi_reg(i32 %0) {
%2 = lshr i32 %0, 2
%3 = and i32 %2, 16383
ret i32 %3
}
/* Variables and functions */
int O_CREAT;
int O_DIRECTORY;
int O_EXCL;
int O_RDONLY;
int O_WRONLY;
int open(char *, int);
int /*<<< orphan*/ openat(int, char *, int, int);
int main() {
  int tmpd = open("tmp", O_RDONLY | O_DIRECTORY);
  openat(tmpd, "openat", O_WRONLY | O_CREAT | O_EXCL, 0666);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    0x2eaa(%rip),%rax
mov    (%rax),%esi
mov    0x2e91(%rip),%rax
or     (%rax),%esi
lea    0xeb8(%rip),%rdi
call   1040 <open@plt>
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%edi
mov    0x2e5e(%rip),%rax
mov    (%rax),%edx
mov    0x2e95(%rip),%rax
or     (%rax),%edx
mov    0x2e5c(%rip),%rax
or     (%rax),%edx
lea    0xe8f(%rip),%rsi
mov    $0x1b6,%ecx
call   1030 <openat@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    0x2eb8(%rip),%rax
mov    0x2ea1(%rip),%rcx
mov    (%rcx),%esi
or     (%rax),%esi
lea    0xec6(%rip),%rdi
call   1040 <open@plt>
mov    0x2e72(%rip),%rcx
mov    0x2eab(%rip),%rdx
mov    (%rdx),%edx
or     (%rcx),%edx
mov    0x2e70(%rip),%rcx
or     (%rcx),%edx
lea    0xea3(%rip),%rsi
mov    %eax,%edi
mov    $0x1b6,%ecx
call   1030 <openat@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [4 x i8] c"tmp\00"
@O_RDONLY = global i32 0
@O_DIRECTORY = global i32 0
@.str.1 = [7 x i8] c"openat\00"
@O_WRONLY = global i32 0
@O_CREAT = global i32 0
@O_EXCL = global i32 0
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
store i32 0, i32* %1
%3 = load i32, i32* @O_RDONLY
%4 = load i32, i32* @O_DIRECTORY
%5 = or i32 %3, %4
%6 = call i32 @open(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %5)
store i32 %6, i32* %2
%7 = load i32, i32* %2
%8 = load i32, i32* @O_WRONLY
%9 = load i32, i32* @O_CREAT
%10 = or i32 %8, %9
%11 = load i32, i32* @O_EXCL
%12 = or i32 %10, %11
%13 = call i32 @openat(i32 %7, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0), i32 %12, i32 438)
ret i32 0
}

LLVM IR (-O2):
@.str = [4 x i8] c"tmp\00"
@O_RDONLY = global i32 0
@O_DIRECTORY = global i32 0
@.str.1 = [7 x i8] c"openat\00"
@O_WRONLY = global i32 0
@O_CREAT = global i32 0
@O_EXCL = global i32 0
define i32 @main() {
%1 = load i32, i32* @O_RDONLY
%2 = load i32, i32* @O_DIRECTORY
%3 = or i32 %2, %1
%4 = tail call i32 @open(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %3)
%5 = load i32, i32* @O_WRONLY
%6 = load i32, i32* @O_CREAT
%7 = or i32 %6, %5
%8 = load i32, i32* @O_EXCL
%9 = or i32 %7, %8
%10 = tail call i32 @openat(i32 %4, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0), i32 %9, i32 438)
ret i32 0
}
int vlan_gvrp_init(void) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @vlan_gvrp_init() {
ret i32 0
}
/* Variables and functions */
double get_gcode_word_real(char);
scalar_t__ isnan(double);
double get_gcode_word_real_default(char word, double defVal) {
  double tmp = get_gcode_word_real(word);
  if (isnan(tmp))
    return defVal;
  else
    return tmp;
}


x86 assembly (clang, -O0):
<get_gcode_word_real_default>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %dil,%al
mov    %al,-0x9(%rbp)
movsd  %xmm0,-0x18(%rbp)
movsbl -0x9(%rbp),%edi
call   1030 <get_gcode_word_real@plt>
movsd  %xmm0,-0x20(%rbp)
movsd  -0x20(%rbp),%xmm0
call   1040 <isnan@plt>
cmp    $0x0,%rax
je     1164 <get_gcode_word_real_default+0x44>
movsd  -0x18(%rbp),%xmm0
movsd  %xmm0,-0x8(%rbp)
jmp    116e <get_gcode_word_real_default+0x4e>
movsd  -0x20(%rbp),%xmm0
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_gcode_word_real_default>:
sub    $0x18,%rsp
movsd  %xmm0,0x8(%rsp)
call   1030 <get_gcode_word_real@plt>
movsd  %xmm0,0x10(%rsp)
call   1040 <isnan@plt>
movsd  0x10(%rsp),%xmm0
test   %rax,%rax
je     114b <get_gcode_word_real_default+0x2b>
movsd  0x8(%rsp),%xmm0
add    $0x18,%rsp
ret

LLVM IR (-O0):
define double @get_gcode_word_real_default(i8 signext %0, double %1) {
%3 = alloca double
%4 = alloca i8
%5 = alloca double
%6 = alloca double
store i8 %0, i8* %4
store double %1, double* %5
%7 = load i8, i8* %4
%8 = call double @get_gcode_word_real(i8 signext %7)
store double %8, double* %6
%9 = load double, double* %6
%10 = call i64 @isnan(double %9)
%11 = icmp ne i64 %10, 0
br i1 %11, label %12, label %14
12: ; preds = %2
%13 = load double, double* %5
store double %13, double* %3
br label %16
14: ; preds = %2
%15 = load double, double* %6
store double %15, double* %3
br label %16
16: ; preds = %14, %12
%17 = load double, double* %3
ret double %17
}

LLVM IR (-O2):
define double @get_gcode_word_real_default(i8 signext %0, double %1) {
%3 = tail call double @get_gcode_word_real(i8 signext %0)
%4 = tail call i64 @isnan(double %3)
%5 = icmp eq i64 %4, 0
%6 = select i1 %5, double %3, double %1
ret double %6
}
/* Variables and functions */
int /*<<< orphan*/ puts(char *);
int a_print(char *opt[]) {
  int i;
  if (opt)
    for (i = 0; opt[i]; i++)
      puts(opt[i]);
  return 0;
}


x86 assembly (clang, -O0):
<a_print>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
cmpq   $0x0,-0x8(%rbp)
je     1165 <a_print+0x55>
movl   $0x0,-0xc(%rbp)
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
cmpq   $0x0,(%rax,%rcx,8)
je     1160 <a_print+0x50>
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
mov    (%rax,%rcx,8),%rdi
call   1030 <puts@plt>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    112e <a_print+0x1e>
jmp    1165 <a_print+0x55>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<a_print>:
push   %rbx
test   %rdi,%rdi
je     1141 <a_print+0x31>
mov    %rdi,%rbx
mov    (%rdi),%rdi
test   %rdi,%rdi
je     1141 <a_print+0x31>
add    $0x8,%rbx
cs nopw 0x0(%rax,%rax,1)
nop
call   1030 <puts@plt>
mov    (%rbx),%rdi
add    $0x8,%rbx
test   %rdi,%rdi
jne    1130 <a_print+0x20>
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
define i32 @a_print(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 %6, label %25
6: ; preds = %1
store i32 0, i32* %3
br label %7
7: ; preds = %21, %6
%8 = load i8**, i8*** %2
%9 = load i32, i32* %3
%10 = sext i32 %9 to i64
%11 = getelementptr inbounds i8*, i8** %8, i64 %10
%12 = load i8*, i8** %11
%13 = icmp ne i8* %12, null
br i1 %13, label %14, label %24
14: ; preds = %7
%15 = load i8**, i8*** %2
%16 = load i32, i32* %3
%17 = sext i32 %16 to i64
%18 = getelementptr inbounds i8*, i8** %15, i64 %17
%19 = load i8*, i8** %18
%20 = call i32 @puts(i8* %19)
br label %21
21: ; preds = %14
%22 = load i32, i32* %3
%23 = add nsw i32 %22, 1
store i32 %23, i32* %3
br label %7
24: ; preds = %7
br label %25
25: ; preds = %24, %1
ret i32 0
}

LLVM IR (-O2):
define i32 @a_print(i8** %0) {
%2 = icmp eq i8** %0, null
br i1 %2, label %14, label %3
3: ; preds = %1
%4 = load i8*, i8** %0
%5 = icmp eq i8* %4, null
br i1 %5, label %14, label %6
6: ; preds = %3, %6
%7 = phi i64 [ %10, %6 ], [ 0, %3 ]
%8 = phi i8* [ %12, %6 ], [ %4, %3 ]
%9 = tail call i32 @puts(i8* %8)
%10 = add nuw i64 %7, 1
%11 = getelementptr inbounds i8*, i8** %0, i64 %10
%12 = load i8*, i8** %11
%13 = icmp eq i8* %12, null
br i1 %13, label %14, label %6
14: ; preds = %6, %3, %1
ret i32 0
}
/* Type definitions */
typedef int uint8_t;
typedef int /*<<< orphan*/ uint32_t;

/* Variables and functions */
int /*<<< orphan*/ pci_read_cfgd(int, int, int);
uint32_t pci_read_config_dword(uint8_t bus, uint8_t dev_fn, uint8_t reg) {
  return pci_read_cfgd((0xb1 << 8) | 0x0a, (bus << 8) | dev_fn, reg);
}


x86 assembly (clang, -O0):
<pci_read_config_dword>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    -0x4(%rbp),%esi
shl    $0x8,%esi
or     -0x8(%rbp),%esi
mov    -0xc(%rbp),%edx
mov    $0xb10a,%edi
call   1030 <pci_read_cfgd@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<pci_read_config_dword>:
shl    $0x8,%edi
or     %edi,%esi
mov    $0xb10a,%edi
jmp    1030 <pci_read_cfgd@plt>

LLVM IR (-O0):
define i32 @pci_read_config_dword(i32 %0, i32 %1, i32 %2) {
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
store i32 %0, i32* %4
store i32 %1, i32* %5
store i32 %2, i32* %6
%7 = load i32, i32* %4
%8 = shl i32 %7, 8
%9 = load i32, i32* %5
%10 = or i32 %8, %9
%11 = load i32, i32* %6
%12 = call i32 @pci_read_cfgd(i32 45322, i32 %10, i32 %11)
ret i32 %12
}

LLVM IR (-O2):
define i32 @pci_read_config_dword(i32 %0, i32 %1, i32 %2) {
%4 = shl i32 %0, 8
%5 = or i32 %4, %1
%6 = tail call i32 @pci_read_cfgd(i32 45322, i32 %5, i32 %2)
ret i32 %6
}
void rop3_127_0_1(unsigned char *D, unsigned char S, unsigned char T) {
  unsigned char stk1;
  unsigned char stk2;
  stk2 = T & S;
  stk1 = *D & stk2;
  stk1 = ~stk1;
  *D = (stk1 & S) | (stk1 & (~T)) | (T & (~S) & *D);
}


x86 assembly (clang, -O0):
<rop3_127_0_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 -0xa(%rbp),%eax
movzbl -0x9(%rbp),%ecx
and    %ecx,%eax
mov    %al,-0xc(%rbp)
mov    -0x8(%rbp),%rax
movzbl (%rax),%eax
movzbl -0xc(%rbp),%ecx
and    %ecx,%eax
mov    %al,-0xb(%rbp)
movzbl -0xb(%rbp),%eax
xor    $0xffffffff,%eax
mov    %al,-0xb(%rbp)
movzbl -0xb(%rbp),%eax
movzbl -0x9(%rbp),%ecx
and    %ecx,%eax
movzbl -0xb(%rbp),%ecx
movzbl -0xa(%rbp),%edx
xor    $0xffffffff,%edx
and    %edx,%ecx
or     %ecx,%eax
movzbl -0xa(%rbp),%ecx
movzbl -0x9(%rbp),%edx
xor    $0xffffffff,%edx
and    %edx,%ecx
mov    -0x8(%rbp),%rdx
movzbl (%rdx),%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_127_0_1>:
mov    (%rdi),%al
and    %dl,%al
mov    %eax,%ecx
not    %cl
and    %sil,%cl
not    %dl
not    %sil
and    %al,%sil
or     %dl,%sil
or     %cl,%sil
mov    %sil,(%rdi)
ret

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

LLVM IR (-O2):
define void @rop3_127_0_1(i8* nocapture %0, i8 zeroext %1, i8 zeroext %2) {
%4 = load i8, i8* %0
%5 = and i8 %4, %2
%6 = xor i8 %5, -1
%7 = and i8 %6, %1
%8 = xor i8 %2, -1
%9 = xor i8 %1, -1
%10 = and i8 %5, %9
%11 = or i8 %10, %8
%12 = or i8 %11, %7
store i8 %12, i8* %0
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ uint8_t;
typedef int /*<<< orphan*/ uint16_t;

/* Variables and functions */
void imf_write(uint16_t addr, uint8_t val, void *priv) { ; }


x86 assembly (clang, -O0):
<imf_write>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %rdx,-0x10(%rbp)
pop    %rbp
ret

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

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

LLVM IR (-O2):
define void @imf_write(i32 %0, i32 %1, i8* nocapture %2) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ eatmarker(int);
void get_dac(int kind) { eatmarker(kind); }


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

x86 assembly (clang, -O2):
<get_dac>:
jmp    1030 <eatmarker@plt>

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

LLVM IR (-O2):
define void @get_dac(i32 %0) {
%2 = tail call i32 @eatmarker(i32 %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ generate_key();
int main(int argc, char *argv[]) {
  generate_key();
  return 0;
}


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

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

LLVM IR (-O0):
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%6 = call i32 (...) @generate_key()
ret i32 0
}

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 (...) @generate_key()
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ do_quit(char);
void goodbye() { do_quit('g'); }


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

x86 assembly (clang, -O2):
<goodbye>:
mov    $0x67,%edi
jmp    1030 <do_quit@plt>

LLVM IR (-O0):
define void @goodbye() {
%1 = call i32 @do_quit(i8 signext 103)
ret void
}

LLVM IR (-O2):
define void @goodbye() {
%1 = tail call i32 @do_quit(i8 signext 103)
ret void
}
int main(void) {
  const int a[9];
  int *c;
  c = &a;
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
movl   $0x0,-0x4(%rbp)
lea    -0x30(%rbp),%rax
mov    %rax,-0x38(%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 [9 x i32]
%3 = alloca i32*
store i32 0, i32* %1
%4 = bitcast [9 x i32]* %2 to i32*
store i32* %4, i32** %3
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
ret i32 0
}
/* Variables and functions */
int O_APPEND;
int O_WRONLY;
int /*<<< orphan*/ close(int /*<<< orphan*/);
int /*<<< orphan*/ open(char *, int);
void test_open_for_append() {
  close(open(".throwaway-test-output", O_WRONLY | O_APPEND));
}


x86 assembly (clang, -O0):
<test_open_for_append>:
push   %rbp
mov    %rsp,%rbp
mov    0x2ead(%rip),%rax
mov    (%rax),%esi
mov    0x2e9c(%rip),%rax
or     (%rax),%esi
lea    0xec3(%rip),%rdi
call   1040 <open@plt>
mov    %eax,%edi
call   1030 <close@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_open_for_append>:
push   %rax
mov    0x2eb0(%rip),%rax
mov    0x2ea1(%rip),%rcx
mov    (%rcx),%esi
or     (%rax),%esi
lea    0xec6(%rip),%rdi
call   1040 <open@plt>
mov    %eax,%edi
pop    %rax
jmp    1030 <close@plt>

LLVM IR (-O0):
@.str = [23 x i8] c".throwaway-test-output\00"
@O_WRONLY = global i32 0
@O_APPEND = global i32 0
define void @test_open_for_append() {
%1 = load i32, i32* @O_WRONLY
%2 = load i32, i32* @O_APPEND
%3 = or i32 %1, %2
%4 = call i32 @open(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str, i64 0, i64 0), i32 %3)
%5 = call i32 @close(i32 %4)
ret void
}

LLVM IR (-O2):
@.str = [23 x i8] c".throwaway-test-output\00"
@O_WRONLY = global i32 0
@O_APPEND = global i32 0
define void @test_open_for_append() {
%1 = load i32, i32* @O_WRONLY
%2 = load i32, i32* @O_APPEND
%3 = or i32 %2, %1
%4 = tail call i32 @open(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str, i64 0, i64 0), i32 %3)
%5 = tail call i32 @close(i32 %4)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ isdigit(int);
void t_isdigit_0xec() {
  Assert_real((isdigit(236) == 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_isdigit.c",
              1185, ("isdigit should be 0 for 0xec"));
}


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

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

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

LLVM IR (-O2):
@.str = [168 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/ctype/test_isdigit.c\00"
@.str.1 = [29 x i8] c"isdigit should be 0 for 0xec\00"
define void @t_isdigit_0xec() {
%1 = tail call i64 @isdigit(i32 236)
%2 = icmp eq i64 %1, 0
%3 = zext i1 %2 to i32
%4 = tail call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([168 x i8], [168 x i8]* @.str, i64 0, i64 0), i32 1185, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ strv_free(char **);
void strv_freep(char ***p) {
  if (*p)
    strv_free(*p);
}


x86 assembly (clang, -O0):
<strv_freep>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
cmpq   $0x0,(%rax)
je     1136 <strv_freep+0x26>
mov    -0x8(%rbp),%rax
mov    (%rax),%rdi
call   1030 <strv_free@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<strv_freep>:
mov    (%rdi),%rdi
test   %rdi,%rdi
je     111d <strv_freep+0xd>
jmp    1030 <strv_free@plt>
ret

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

LLVM IR (-O2):
define void @strv_freep(i8*** nocapture %0) {
%2 = load i8**, i8*** %0
%3 = icmp eq i8** %2, null
br i1 %3, label %6, label %4
4: ; preds = %1
%5 = tail call i32 @strv_free(i8** %2)
br label %6
6: ; preds = %4, %1
ret void
}
void uniphier_pxs3_pll_init(void) {}


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

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

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

LLVM IR (-O2):
define void @uniphier_pxs3_pll_init() {
ret void
}
int test_imm_F8int64_midword_reg(long long val) {
  return ((val >> 16) & (0xF8 << 0)) ? -20 : -40;
}


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

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

LLVM IR (-O0):
define i32 @test_imm_F8int64_midword_reg(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = load i64, i64* %2
%4 = ashr i64 %3, 16
%5 = and i64 %4, 248
%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_F8int64_midword_reg(i64 %0) {
%2 = and i64 %0, 16252928
%3 = icmp eq i64 %2, 0
%4 = select i1 %3, i32 -40, i32 -20
ret i32 %4
}
/* Variables and functions */
int _positive_solver_check(double **, double *, double *, int, double, int);
bool full_positive_solver_check(double **A, double *x, double *b, int n,
                                double eps) {
  bool is_symm = false;
  if (0 < eps)
    eps = 0.001;
  return _positive_solver_check(A, x, b, n, eps, is_symm);
}


x86 assembly (clang, -O0):
<full_positive_solver_check>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %ecx,-0x1c(%rbp)
movsd  %xmm0,-0x28(%rbp)
movl   $0x0,-0x2c(%rbp)
movsd  -0x28(%rbp),%xmm0
xorps  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jbe    1152 <full_positive_solver_check+0x42>
movsd  0xeb3(%rip),%xmm0
movsd  %xmm0,-0x28(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
mov    -0x1c(%rbp),%ecx
movsd  -0x28(%rbp),%xmm0
mov    -0x2c(%rbp),%r8d
call   1030 <_positive_solver_check@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<full_positive_solver_check>:
xorpd  %xmm1,%xmm1
cmpltsd %xmm0,%xmm1
movsd  0xedf(%rip),%xmm2
andpd  %xmm1,%xmm2
andnpd %xmm0,%xmm1
orpd   %xmm2,%xmm1
movapd %xmm1,%xmm0
xor    %r8d,%r8d
jmp    1030 <_positive_solver_check@plt>

LLVM IR (-O0):
define i32 @full_positive_solver_check(double** %0, double* %1, double* %2, i32 %3, double %4) {
%6 = alloca double**
%7 = alloca double*
%8 = alloca double*
%9 = alloca i32
%10 = alloca double
%11 = alloca i32
store double** %0, double*** %6
store double* %1, double** %7
store double* %2, double** %8
store i32 %3, i32* %9
store double %4, double* %10
store i32 0, i32* %11
%12 = load double, double* %10
%13 = fcmp olt double 0.000000e+00, %12
br i1 %13, label %14, label %15
14: ; preds = %5
store double 1.000000e-03, double* %10
br label %15
15: ; preds = %14, %5
%16 = load double**, double*** %6
%17 = load double*, double** %7
%18 = load double*, double** %8
%19 = load i32, i32* %9
%20 = load double, double* %10
%21 = load i32, i32* %11
%22 = call i32 @_positive_solver_check(double** %16, double* %17, double* %18, i32 %19, double %20, i32 %21)
ret i32 %22
}

LLVM IR (-O2):
define i32 @full_positive_solver_check(double** %0, double* %1, double* %2, i32 %3, double %4) {
%6 = fcmp ogt double %4, 0.000000e+00
%7 = select i1 %6, double 1.000000e-03, double %4
%8 = tail call i32 @_positive_solver_check(double** %0, double* %1, double* %2, i32 %3, double %7, i32 0)
ret i32 %8
}
/* Type definitions */
typedef int /*<<< orphan*/ uint32_t;

/* Variables and functions */
uint32_t *generate_arm_cmd_add_r_r_r_lsl(uint32_t *cmdbuffer, int dstreg,
                                         int r1, int r2, int r2_shift) {
  *cmdbuffer++ =
      0xE0800000 | (r1 << 16) | (dstreg << 12) | (r2_shift << 7) | (r2);
  return cmdbuffer;
}


x86 assembly (clang, -O0):
<generate_arm_cmd_add_r_r_r_lsl>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    %ecx,-0x14(%rbp)
mov    %r8d,-0x18(%rbp)
mov    -0x10(%rbp),%ecx
shl    $0x10,%ecx
or     $0xe0800000,%ecx
mov    -0xc(%rbp),%eax
shl    $0xc,%eax
or     %eax,%ecx
mov    -0x18(%rbp),%eax
shl    $0x7,%eax
or     %eax,%ecx
or     -0x14(%rbp),%ecx
mov    -0x8(%rbp),%rax
mov    %rax,%rdx
add    $0x4,%rdx
mov    %rdx,-0x8(%rbp)
mov    %ecx,(%rax)
mov    -0x8(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<generate_arm_cmd_add_r_r_r_lsl>:
shl    $0x10,%edx
shl    $0xc,%esi
or     %edx,%esi
shl    $0x7,%r8d
or     %ecx,%r8d
or     %esi,%r8d
or     $0xe0800000,%r8d
mov    %r8d,(%rdi)
lea    0x4(%rdi),%rax
ret

LLVM IR (-O0):
define i32* @generate_arm_cmd_add_r_r_r_lsl(i32* %0, i32 %1, i32 %2, i32 %3, i32 %4) {
%6 = alloca i32*
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32
%10 = alloca i32
store i32* %0, i32** %6
store i32 %1, i32* %7
store i32 %2, i32* %8
store i32 %3, i32* %9
store i32 %4, i32* %10
%11 = load i32, i32* %8
%12 = shl i32 %11, 16
%13 = or i32 -528482304, %12
%14 = load i32, i32* %7
%15 = shl i32 %14, 12
%16 = or i32 %13, %15
%17 = load i32, i32* %10
%18 = shl i32 %17, 7
%19 = or i32 %16, %18
%20 = load i32, i32* %9
%21 = or i32 %19, %20
%22 = load i32*, i32** %6
%23 = getelementptr inbounds i32, i32* %22, i32 1
store i32* %23, i32** %6
store i32 %21, i32* %22
%24 = load i32*, i32** %6
ret i32* %24
}

LLVM IR (-O2):
define i32* @generate_arm_cmd_add_r_r_r_lsl(i32* writeonly %0, i32 %1, i32 %2, i32 %3, i32 %4) {
%6 = shl i32 %2, 16
%7 = shl i32 %1, 12
%8 = shl i32 %4, 7
%9 = or i32 %7, %6
%10 = or i32 %9, %3
%11 = or i32 %10, %8
%12 = or i32 %11, -528482304
%13 = getelementptr inbounds i32, i32* %0, i64 1
store i32 %12, i32* %0
ret i32* %13
}
/* Type definitions */
struct mg_connection {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ close_connection(struct mg_connection *);
int /*<<< orphan*/ free(struct mg_connection *);
void mg_close_connection(struct mg_connection *conn) {
  close_connection(conn);
  free(conn);
}


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

x86 assembly (clang, -O2):
<mg_close_connection>:
push   %rbx
mov    %rdi,%rbx
call   1040 <close_connection@plt>
mov    %rbx,%rdi
pop    %rbx
jmp    1030 <free@plt>

LLVM IR (-O0):
%struct.mg_connection = type { i32 }
define void @mg_close_connection(%struct.mg_connection* %0) {
%2 = alloca %struct.mg_connection*
store %struct.mg_connection* %0, %struct.mg_connection** %2
%3 = load %struct.mg_connection*, %struct.mg_connection** %2
%4 = call i32 @close_connection(%struct.mg_connection* %3)
%5 = load %struct.mg_connection*, %struct.mg_connection** %2
%6 = call i32 @free(%struct.mg_connection* %5)
ret void
}

LLVM IR (-O2):
%struct.mg_connection = type { i32 }
define void @mg_close_connection(%struct.mg_connection* %0) {
%2 = tail call i32 @close_connection(%struct.mg_connection* %0)
%3 = tail call i32 @free(%struct.mg_connection* %0)
ret void
}
void alrm_handler() {}


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

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

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

LLVM IR (-O2):
define void @alrm_handler() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void sigalrm(int signo) { printf("catch sigalrm"); }


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

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

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

LLVM IR (-O2):
@.str = [14 x i8] c"catch sigalrm\00"
define void @sigalrm(i32 %0) {
%2 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0))
ret void
}
/* Variables and functions */
int do_rand(unsigned long *);
int rand_r(unsigned int *ctx) {
  unsigned long val;
  int r;
  val = (*ctx % 0x7ffffffe) + 1;
  r = do_rand(&val);
  *ctx = (unsigned int)(val - 1);
  return (r);
}


x86 assembly (clang, -O0):
<rand_r>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%eax
mov    $0x7ffffffe,%ecx
xor    %edx,%edx
div    %ecx
add    $0x1,%edx
mov    %edx,%eax
mov    %rax,-0x10(%rbp)
lea    -0x10(%rbp),%rdi
call   1030 <do_rand@plt>
mov    %eax,-0x14(%rbp)
mov    -0x10(%rbp),%rax
sub    $0x1,%rax
mov    %eax,%ecx
mov    -0x8(%rbp),%rax
mov    %ecx,(%rax)
mov    -0x14(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<rand_r>:
push   %rbx
sub    $0x10,%rsp
mov    %rdi,%rbx
mov    (%rdi),%eax
mov    %eax,%ecx
shr    %ecx
mov    $0x80000003,%edx
imul   %rcx,%rdx
shr    $0x3d,%rdx
mov    %edx,%ecx
shl    $0x1f,%ecx
mov    %edx,%esi
sub    %ecx,%esi
add    %edx,%esi
add    %esi,%eax
add    $0x1,%eax
mov    %rax,0x8(%rsp)
lea    0x8(%rsp),%rdi
call   1030 <do_rand@plt>
mov    0x8(%rsp),%ecx
add    $0xffffffff,%ecx
mov    %ecx,(%rbx)
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
define i32 @rand_r(i32* %0) {
%2 = alloca i32*
%3 = alloca i64
%4 = alloca i32
store i32* %0, i32** %2
%5 = load i32*, i32** %2
%6 = load i32, i32* %5
%7 = urem i32 %6, 2147483646
%8 = add i32 %7, 1
%9 = zext i32 %8 to i64
store i64 %9, i64* %3
%10 = call i32 @do_rand(i64* %3)
store i32 %10, i32* %4
%11 = load i64, i64* %3
%12 = sub i64 %11, 1
%13 = trunc i64 %12 to i32
%14 = load i32*, i32** %2
store i32 %13, i32* %14
%15 = load i32, i32* %4
ret i32 %15
}

LLVM IR (-O2):
define i32 @rand_r(i32* nocapture %0) {
%2 = alloca i64
%3 = bitcast i64* %2 to i8*
%4 = load i32, i32* %0
%5 = urem i32 %4, 2147483646
%6 = add nuw nsw i32 %5, 1
%7 = zext i32 %6 to i64
store i64 %7, i64* %2
%8 = call i32 @do_rand(i64* %2)
%9 = load i64, i64* %2
%10 = trunc i64 %9 to i32
%11 = add i32 %10, -1
store i32 %11, i32* %0
ret i32 %8
}
/* Variables and functions */
int gcd(int, int);
int /*<<< orphan*/ printf(char *, int);
int /*<<< orphan*/ scanf(char *, int *, int *);
int main(void) {
  int a, b;
  scanf("%d %d", &a, &b);
  int lcm = (a * b) / gcd(a, b);
  printf("%d\n", lcm);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeba(%rip),%rdi
lea    -0x8(%rbp),%rsi
lea    -0xc(%rbp),%rdx
call   1040 <scanf@plt>
mov    -0x8(%rbp),%eax
imul   -0xc(%rbp),%eax
mov    %eax,-0x14(%rbp)
mov    -0x8(%rbp),%edi
mov    -0xc(%rbp),%esi
call   1050 <gcd@plt>
mov    %eax,%ecx
mov    -0x14(%rbp),%eax
cltd
idiv   %ecx
mov    %eax,-0x10(%rbp)
mov    -0x10(%rbp),%esi
lea    0xe89(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x10,%rsp
lea    0xec4(%rip),%rdi
lea    0xc(%rsp),%rsi
lea    0x8(%rsp),%rdx
call   1040 <scanf@plt>
mov    0xc(%rsp),%edi
mov    0x8(%rsp),%esi
mov    %esi,%ebx
imul   %edi,%ebx
call   1050 <gcd@plt>
mov    %eax,%ecx
mov    %ebx,%eax
cltd
idiv   %ecx
lea    0xe9b(%rip),%rdi
mov    %eax,%esi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbx
ret

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

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


x86 assembly (clang, -O0):
<getchar>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    0x2ec9(%rip),%rax
mov    (%rax),%edi
call   1030 <getc@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<getchar>:
mov    0x2ed1(%rip),%rax
mov    (%rax),%edi
jmp    1030 <getc@plt>

LLVM IR (-O0):
@stdin = global i32 0
define i32 @getchar() {
%1 = alloca i32
%2 = load i32, i32* @stdin
%3 = call i32 @getc(i32 %2)
%4 = load i32, i32* %1
ret i32 %4
}

LLVM IR (-O2):
@stdin = global i32 0
define i32 @getchar() {
%1 = load i32, i32* @stdin
%2 = tail call i32 @getc(i32 %1)
ret i32 undef
}
/* Type definitions */
typedef int /*<<< orphan*/ __m128;

/* Variables and functions */
int /*<<< orphan*/ _mm_sqrt_ss(int /*<<< orphan*/);
__m128 test_sqrt_ss(__m128 x) { return _mm_sqrt_ss(x); }


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

x86 assembly (clang, -O2):
<test_sqrt_ss>:
jmp    1030 <_mm_sqrt_ss@plt>

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

LLVM IR (-O2):
define i32 @test_sqrt_ss(i32 %0) {
%2 = tail call i32 @_mm_sqrt_ss(i32 %0)
ret i32 %2
}
void computeMatchingMatrix(int numOfRNA) {}


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

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

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

LLVM IR (-O2):
define void @computeMatchingMatrix(i32 %0) {
ret void
}
int fun535() { return 535; }


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

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

LLVM IR (-O0):
define i32 @fun535() {
ret i32 535
}

LLVM IR (-O2):
define i32 @fun535() {
ret i32 535
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
int setuid(int /*<<< orphan*/);
int main() {
  int ret;
  ret = setuid(0);
  printf("ret:%d\n", ret);
  return 0;
}


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

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

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

LLVM IR (-O2):
@.str = [8 x i8] c"ret:%d\0A\00"
define i32 @main() {
%1 = tail call i32 @setuid(i32 0)
%2 = tail call i32 @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i32 %1)
ret i32 0
}
int null_stat(const char *path, struct stat *buf) { return 0; }


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

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

LLVM IR (-O0):
%struct.stat = type opaque
define i32 @null_stat(i8* %0, %struct.stat* %1) {
%3 = alloca i8*
%4 = alloca %struct.stat*
store i8* %0, i8** %3
store %struct.stat* %1, %struct.stat** %4
ret i32 0
}

LLVM IR (-O2):
%struct.stat = type opaque
define i32 @null_stat(i8* nocapture readnone %0, %struct.stat* nocapture readnone %1) {
ret i32 0
}
/* Variables and functions */
void function(int a, int b, int c) {
  char buffer1[5];
  char buffer2[10];
  int *ret;
  ret = buffer1 + 16;
}


x86 assembly (clang, -O0):
<function>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
lea    -0x11(%rbp),%rax
add    $0x10,%rax
mov    %rax,-0x28(%rbp)
pop    %rbp
ret

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

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

LLVM IR (-O2):
define void @function(i32 %0, i32 %1, i32 %2) {
ret void
}