xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ write_instr(int);
void eval_log_or(void) { write_instr(0x1F); }


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

x86 assembly (clang, -O2):
<eval_log_or>:
mov    $0x1f,%edi
jmp    1030 <write_instr@plt>

LLVM IR (-O0):
define void @eval_log_or() {
%1 = call i32 @write_instr(i32 31)
ret void
}

LLVM IR (-O2):
define void @eval_log_or() {
%1 = tail call i32 @write_instr(i32 31)
ret void
}
int sw(int v) { return v & ((256 * 1024) - 1); }


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

x86 assembly (clang, -O2):
<sw>:
mov    %edi,%eax
and    $0x3ffff,%eax
ret

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

LLVM IR (-O2):
define i32 @sw(i32 %0) {
%2 = and i32 %0, 262143
ret i32 %2
}
/* Type definitions */
typedef int /*<<< orphan*/ uint32_t;

/* Variables and functions */
int /*<<< orphan*/ write_bytes(char *, int);
void write_32bit_value(uint32_t i) { write_bytes((char *)&i, 4); }


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

x86 assembly (clang, -O2):
<write_32bit_value>:
push   %rax
mov    %edi,0x4(%rsp)
lea    0x4(%rsp),%rdi
mov    $0x4,%esi
call   1030 <write_bytes@plt>
pop    %rax
ret

LLVM IR (-O0):
define void @write_32bit_value(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = bitcast i32* %2 to i8*
%4 = call i32 @write_bytes(i8* %3, i32 4)
ret void
}

LLVM IR (-O2):
define void @write_32bit_value(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = bitcast i32* %2 to i8*
%4 = call i32 @write_bytes(i8* %3, i32 4)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ _hmt_register_covercase(char *, char *);
void _hmt_covercase_HMM_Scale_init(void) {
  _hmt_register_covercase("HMM_Scale", "1");
}


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

x86 assembly (clang, -O2):
<_hmt_covercase_HMM_Scale_init>:
lea    0xee9(%rip),%rdi
lea    0xeec(%rip),%rsi
jmp    1030 <_hmt_register_covercase@plt>

LLVM IR (-O0):
@.str = [10 x i8] c"HMM_Scale\00"
@.str.1 = [2 x i8] c"1\00"
define void @_hmt_covercase_HMM_Scale_init() {
%1 = call i32 @_hmt_register_covercase(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [10 x i8] c"HMM_Scale\00"
@.str.1 = [2 x i8] c"1\00"
define void @_hmt_covercase_HMM_Scale_init() {
%1 = tail call i32 @_hmt_register_covercase(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ HwSparkyBGCHandle();
int /*<<< orphan*/ UAVObjRequestUpdate(int /*<<< orphan*/);
void HwSparkyBGCRequestUpdate() { UAVObjRequestUpdate(HwSparkyBGCHandle()); }


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

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

LLVM IR (-O0):
define void @HwSparkyBGCRequestUpdate() {
%1 = call i32 (...) @HwSparkyBGCHandle()
%2 = call i32 @UAVObjRequestUpdate(i32 %1)
ret void
}

LLVM IR (-O2):
define void @HwSparkyBGCRequestUpdate() {
%1 = tail call i32 (...) @HwSparkyBGCHandle()
%2 = tail call i32 @UAVObjRequestUpdate(i32 %1)
ret void
}
int D_is_operator(char ch) {
  return (ch >= '!' && ch <= '/') || (ch >= ':' && ch <= '@') ||
         (ch >= '{' && ch <= '~') || (ch >= '[' && ch <= '^');
}


x86 assembly (clang, -O0):
<D_is_operator>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movsbl -0x1(%rbp),%eax
cmp    $0x21,%eax
jl     1129 <D_is_operator+0x29>
movsbl -0x1(%rbp),%ecx
mov    $0x1,%al
cmp    $0x2f,%ecx
mov    %al,-0x2(%rbp)
jle    118c <D_is_operator+0x8c>
movsbl -0x1(%rbp),%eax
cmp    $0x3a,%eax
jl     1148 <D_is_operator+0x48>
movsbl -0x1(%rbp),%ecx
mov    $0x1,%al
cmp    $0x40,%ecx
mov    %al,-0x2(%rbp)
jle    118c <D_is_operator+0x8c>
movsbl -0x1(%rbp),%eax
cmp    $0x7b,%eax
jl     1167 <D_is_operator+0x67>
movsbl -0x1(%rbp),%ecx
mov    $0x1,%al
cmp    $0x7e,%ecx
mov    %al,-0x2(%rbp)
jle    118c <D_is_operator+0x8c>
movsbl -0x1(%rbp),%ecx
xor    %eax,%eax
cmp    $0x5b,%ecx
mov    %al,-0x3(%rbp)
jl     1186 <D_is_operator+0x86>
movsbl -0x1(%rbp),%eax
cmp    $0x5e,%eax
setle  %al
mov    %al,-0x3(%rbp)
mov    -0x3(%rbp),%al
mov    %al,-0x2(%rbp)
mov    -0x2(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<D_is_operator>:
lea    -0x21(%rdi),%eax
cmp    $0xf,%al
setb   %al
lea    -0x3a(%rdi),%ecx
cmp    $0x7,%cl
setb   %cl
or     %al,%cl
and    $0xdf,%dil
add    $0xa5,%dil
cmp    $0x4,%dil
setb   %al
or     %cl,%al
movzbl %al,%eax
ret

LLVM IR (-O0):
define i32 @D_is_operator(i8 signext %0) {
%2 = alloca i8
store i8 %0, i8* %2
%3 = load i8, i8* %2
%4 = sext i8 %3 to i32
%5 = icmp sge i32 %4, 33
br i1 %5, label %6, label %10
6: ; preds = %1
%7 = load i8, i8* %2
%8 = sext i8 %7 to i32
%9 = icmp sle i32 %8, 47
br i1 %9, label %36, label %10
10: ; preds = %6, %1
%11 = load i8, i8* %2
%12 = sext i8 %11 to i32
%13 = icmp sge i32 %12, 58
br i1 %13, label %14, label %18
14: ; preds = %10
%15 = load i8, i8* %2
%16 = sext i8 %15 to i32
%17 = icmp sle i32 %16, 64
br i1 %17, label %36, label %18
18: ; preds = %14, %10
%19 = load i8, i8* %2
%20 = sext i8 %19 to i32
%21 = icmp sge i32 %20, 123
br i1 %21, label %22, label %26
22: ; preds = %18
%23 = load i8, i8* %2
%24 = sext i8 %23 to i32
%25 = icmp sle i32 %24, 126
br i1 %25, label %36, label %26
26: ; preds = %22, %18
%27 = load i8, i8* %2
%28 = sext i8 %27 to i32
%29 = icmp sge i32 %28, 91
br i1 %29, label %30, label %34
30: ; preds = %26
%31 = load i8, i8* %2
%32 = sext i8 %31 to i32
%33 = icmp sle i32 %32, 94
br label %34
34: ; preds = %30, %26
%35 = phi i1 [ false, %26 ], [ %33, %30 ]
br label %36
36: ; preds = %34, %22, %14, %6
%37 = phi i1 [ true, %22 ], [ true, %14 ], [ true, %6 ], [ %35, %34 ]
%38 = zext i1 %37 to i32
ret i32 %38
}

LLVM IR (-O2):
define i32 @D_is_operator(i8 signext %0) {
%2 = add i8 %0, -33
%3 = icmp ult i8 %2, 15
%4 = add i8 %0, -58
%5 = icmp ult i8 %4, 7
%6 = or i1 %3, %5
%7 = and i8 %0, -33
%8 = add i8 %7, -91
%9 = icmp ult i8 %8, 4
%10 = or i1 %9, %6
%11 = zext i1 %10 to i32
ret i32 %11
}
/* Type definitions */
typedef int ssize_t;

/* Variables and functions */
scalar_t__ EINTR;
scalar_t__ errno;
int read(int, void *, size_t);
ssize_t xread(int fd, void *buf, size_t count) {
  int i;
  do
    i = read(fd, buf, count);
  while (i == -1 && errno == EINTR);
  return i;
}


x86 assembly (clang, -O0):
<xread>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
call   1030 <read@plt>
mov    %eax,-0x1c(%rbp)
xor    %eax,%eax
cmpl   $0xffffffff,-0x1c(%rbp)
mov    %al,-0x1d(%rbp)
jne    115f <xread+0x4f>
mov    0x2e94(%rip),%rax
mov    (%rax),%rax
mov    0x2e82(%rip),%rcx
cmp    (%rcx),%rax
sete   %al
mov    %al,-0x1d(%rbp)
mov    -0x1d(%rbp),%al
test   $0x1,%al
jne    1123 <xread+0x13>
mov    -0x1c(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<xread>:
push   %rbp
push   %r15
push   %r14
push   %r12
push   %rbx
mov    %rdx,%r14
mov    %rsi,%rbx
mov    %edi,%ebp
mov    0x2eb9(%rip),%r15
mov    0x2eaa(%rip),%r12
xchg   %ax,%ax
mov    %ebp,%edi
mov    %rbx,%rsi
mov    %r14,%rdx
call   1030 <read@plt>
cmp    $0xffffffff,%eax
jne    114b <xread+0x3b>
mov    (%r12),%rcx
cmp    %rcx,(%r15)
je     1130 <xread+0x20>
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
pop    %rbp
ret

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

LLVM IR (-O2):
@errno = global i64 0
@EINTR = global i64 0
define i32 @xread(i32 %0, i8* nocapture %1, i64 %2) {
br label %4
4: ; preds = %4, %3
%5 = tail call i32 @read(i32 %0, i8* %1, i64 %2)
%6 = icmp eq i32 %5, -1
%7 = load i64, i64* @errno
%8 = load i64, i64* @EINTR
%9 = icmp eq i64 %7, %8
%10 = select i1 %6, i1 %9, i1 false
br i1 %10, label %4, label %11
11: ; preds = %4
ret i32 %5
}
__attribute__((no)) unsigned int si_sll(unsigned int x) { return (x << 1); }


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

x86 assembly (clang, -O2):
<si_sll>:
lea    (%rdi,%rdi,1),%eax
ret

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

LLVM IR (-O2):
define i32 @si_sll(i32 %0) {
%2 = shl i32 %0, 1
ret i32 %2
}
int adis16350_probe_trigger(struct iio_dev *indio_dev) { return 0; }


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

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

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

LLVM IR (-O2):
%struct.iio_dev = type opaque
define i32 @adis16350_probe_trigger(%struct.iio_dev* nocapture readnone %0) {
ret i32 0
}
/* Type definitions */
struct wpabuf {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ os_memcpy(int /*<<< orphan*/, void const *, size_t);
int /*<<< orphan*/ wpabuf_put(struct wpabuf *, size_t);
void wpabuf_put_data(struct wpabuf *buf, const void *data, size_t len) {
  if (data)
    os_memcpy(wpabuf_put(buf, len), data, len);
}


x86 assembly (clang, -O0):
<wpabuf_put_data>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
cmpq   $0x0,-0x10(%rbp)
je     115b <wpabuf_put_data+0x3b>
mov    -0x8(%rbp),%rdi
mov    -0x18(%rbp),%rsi
call   1030 <wpabuf_put@plt>
mov    %eax,%edi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
call   1040 <os_memcpy@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<wpabuf_put_data>:
test   %rsi,%rsi
je     114b <wpabuf_put_data+0x2b>
push   %r14
push   %rbx
push   %rax
mov    %rdx,%r14
mov    %rsi,%rbx
mov    %rdx,%rsi
call   1030 <wpabuf_put@plt>
mov    %eax,%edi
mov    %rbx,%rsi
mov    %r14,%rdx
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1040 <os_memcpy@plt>
ret

LLVM IR (-O0):
%struct.wpabuf = type { i32 }
define void @wpabuf_put_data(%struct.wpabuf* %0, i8* %1, i64 %2) {
%4 = alloca %struct.wpabuf*
%5 = alloca i8*
%6 = alloca i64
store %struct.wpabuf* %0, %struct.wpabuf** %4
store i8* %1, i8** %5
store i64 %2, i64* %6
%7 = load i8*, i8** %5
%8 = icmp ne i8* %7, null
br i1 %8, label %9, label %16
9: ; preds = %3
%10 = load %struct.wpabuf*, %struct.wpabuf** %4
%11 = load i64, i64* %6
%12 = call i32 @wpabuf_put(%struct.wpabuf* %10, i64 %11)
%13 = load i8*, i8** %5
%14 = load i64, i64* %6
%15 = call i32 @os_memcpy(i32 %12, i8* %13, i64 %14)
br label %16
16: ; preds = %9, %3
ret void
}

LLVM IR (-O2):
%struct.wpabuf = type { i32 }
define void @wpabuf_put_data(%struct.wpabuf* %0, i8* %1, i64 %2) {
%4 = icmp eq i8* %1, null
br i1 %4, label %8, label %5
5: ; preds = %3
%6 = tail call i32 @wpabuf_put(%struct.wpabuf* %0, i64 %2)
%7 = tail call i32 @os_memcpy(i32 %6, i8* %1, i64 %2)
br label %8
8: ; preds = %5, %3
ret void
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ isupper(int);
void t_isupper_0xb6() {
  Assert_real((isupper(182) == 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_isupper.c",
              915, ("isupper should be 0 for 0xb6"));
}


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

x86 assembly (clang, -O2):
<t_isupper_0xb6>:
push   %rax
mov    $0xb6,%edi
call   1030 <isupper@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf66(%rip),%rcx
mov    $0x393,%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_isupper.c\00"
@.str.1 = [29 x i8] c"isupper should be 0 for 0xb6\00"
define void @t_isupper_0xb6() {
%1 = call i64 @isupper(i32 182)
%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 915, 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_isupper.c\00"
@.str.1 = [29 x i8] c"isupper should be 0 for 0xb6\00"
define void @t_isupper_0xb6() {
%1 = tail call i64 @isupper(i32 182)
%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 915, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0))
ret void
}
unsigned short int f86(unsigned short int x, unsigned long int y) {
  return (x << ((-y) & (8 * 2 - 1))) + (x >> y);
}


x86 assembly (clang, -O0):
<f86>:
push   %rbp
mov    %rsp,%rbp
mov    %di,%ax
mov    %ax,-0x2(%rbp)
mov    %rsi,-0x10(%rbp)
movzwl -0x2(%rbp),%eax
xor    %ecx,%ecx
sub    -0x10(%rbp),%rcx
and    $0xf,%rcx
shl    %cl,%eax
movzwl -0x2(%rbp),%edx
mov    -0x10(%rbp),%rcx
sar    %cl,%edx
mov    %edx,%ecx
add    %ecx,%eax
movzwl %ax,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<f86>:
mov    %esi,%ecx
neg    %cl
and    $0xf,%cl
mov    %edi,%eax
shl    %cl,%eax
mov    %esi,%ecx
shr    %cl,%edi
add    %edi,%eax
ret

LLVM IR (-O0):
define zeroext i16 @f86(i16 zeroext %0, i64 %1) {
%3 = alloca i16
%4 = alloca i64
store i16 %0, i16* %3
store i64 %1, i64* %4
%5 = load i16, i16* %3
%6 = zext i16 %5 to i32
%7 = load i64, i64* %4
%8 = sub i64 0, %7
%9 = and i64 %8, 15
%10 = trunc i64 %9 to i32
%11 = shl i32 %6, %10
%12 = load i16, i16* %3
%13 = zext i16 %12 to i32
%14 = load i64, i64* %4
%15 = trunc i64 %14 to i32
%16 = ashr i32 %13, %15
%17 = add nsw i32 %11, %16
%18 = trunc i32 %17 to i16
ret i16 %18
}

LLVM IR (-O2):
define zeroext i16 @f86(i16 zeroext %0, i64 %1) {
%3 = zext i16 %0 to i32
%4 = trunc i64 %1 to i32
%5 = sub i32 0, %4
%6 = and i32 %5, 15
%7 = shl nuw nsw i32 %3, %6
%8 = lshr i32 %3, %4
%9 = add nuw nsw i32 %7, %8
%10 = trunc i32 %9 to i16
ret i16 %10
}
/* Variables and functions */
double sqrt(double);
double f(double x) { return x / (sqrt((x + 1.0)) + 1.0); }


x86 assembly (clang, -O0):
<f>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
movsd  %xmm0,-0x10(%rbp)
movsd  0xed1(%rip),%xmm0
addsd  -0x8(%rbp),%xmm0
call   1030 <sqrt@plt>
movaps %xmm0,%xmm1
movsd  -0x10(%rbp),%xmm0
movsd  0xeb7(%rip),%xmm2
addsd  %xmm2,%xmm1
divsd  %xmm1,%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<f>:
push   %rax
movapd %xmm0,%xmm2
movsd  0xee3(%rip),%xmm0
addsd  %xmm2,%xmm0
xorpd  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jb     1131 <f+0x21>
sqrtsd %xmm0,%xmm0
jmp    1140 <f+0x30>
movsd  %xmm2,(%rsp)
call   1030 <sqrt@plt>
movsd  (%rsp),%xmm2
addsd  0xeb8(%rip),%xmm0
divsd  %xmm0,%xmm2
movapd %xmm2,%xmm0
pop    %rax
ret

LLVM IR (-O0):
define double @f(double %0) {
%2 = alloca double
store double %0, double* %2
%3 = load double, double* %2
%4 = load double, double* %2
%5 = fadd double %4, 1.000000e+00
%6 = call double @sqrt(double %5)
%7 = fadd double %6, 1.000000e+00
%8 = fdiv double %3, %7
ret double %8
}

LLVM IR (-O2):
define double @f(double %0) {
%2 = fadd double %0, 1.000000e+00
%3 = tail call double @sqrt(double %2)
%4 = fadd double %3, 1.000000e+00
%5 = fdiv double %0, %4
ret double %5
}
void free2d_dble(double **array2) {
  free(array2[0]);
  free(array2);
}


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

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

LLVM IR (-O0):
define void @free2d_dble(double** %0) {
%2 = alloca double**
store double** %0, double*** %2
%3 = load double**, double*** %2
%4 = getelementptr inbounds double*, double** %3, i64 0
%5 = load double*, double** %4
%6 = bitcast double* %5 to i8*
%7 = load double**, double*** %2
%8 = bitcast double** %7 to i8*
ret void
}

LLVM IR (-O2):
define void @free2d_dble(double** nocapture %0) {
%2 = bitcast double** %0 to i8**
%3 = load i8*, i8** %2
tail call void @free(i8* %3)
%4 = bitcast double** %0 to i8*
tail call void @free(i8* %4)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ ispunct(int);
void t_ispunct_0x6c() {
  Assert_real((ispunct(108) == 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_ispunct.c",
              545, ("ispunct should be 0 for l"));
}


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

x86 assembly (clang, -O2):
<t_ispunct_0x6c>:
push   %rax
mov    $0x6c,%edi
call   1030 <ispunct@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf66(%rip),%rcx
mov    $0x221,%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_ispunct.c\00"
@.str.1 = [26 x i8] c"ispunct should be 0 for l\00"
define void @t_ispunct_0x6c() {
%1 = call i64 @ispunct(i32 108)
%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 545, i8* getelementptr inbounds ([26 x i8], [26 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_ispunct.c\00"
@.str.1 = [26 x i8] c"ispunct should be 0 for l\00"
define void @t_ispunct_0x6c() {
%1 = tail call i64 @ispunct(i32 108)
%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 545, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.1, i64 0, i64 0))
ret void
}
void epsf_title(char *p) {
  char c;
  while ((c = *p) != '\0') {
    if (c == ' ')
      *p = '_';
    else if (c == '/' || (unsigned)c >= 127)
      *p = '.';
    p++;
  }
}


x86 assembly (clang, -O0):
<epsf_title>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%al
mov    %al,-0x9(%rbp)
movsbl %al,%eax
cmp    $0x0,%eax
je     116d <epsf_title+0x6d>
movsbl -0x9(%rbp),%eax
cmp    $0x20,%eax
jne    1136 <epsf_title+0x36>
mov    -0x8(%rbp),%rax
movb   $0x5f,(%rax)
jmp    115c <epsf_title+0x5c>
movsbl -0x9(%rbp),%eax
cmp    $0x2f,%eax
je     1150 <epsf_title+0x50>
movsbl -0x9(%rbp),%eax
cmp    $0x7f,%eax
jb     1157 <epsf_title+0x57>
mov    -0x8(%rbp),%rax
movb   $0x2e,(%rax)
jmp    115c <epsf_title+0x5c>
mov    -0x8(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x8(%rbp)
jmp    1108 <epsf_title+0x8>
pop    %rbp
ret

x86 assembly (clang, -O2):
<epsf_title>:
jmp    1116 <epsf_title+0x16>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
mov    %al,(%rdi)
add    $0x1,%rdi
movzbl (%rdi),%ecx
mov    $0x5f,%al
cmp    $0x20,%cl
je     1110 <epsf_title+0x10>
test   %cl,%cl
je     1132 <epsf_title+0x32>
mov    $0x2e,%al
cmp    $0x2f,%cl
je     1110 <epsf_title+0x10>
cmp    $0x7f,%cl
jb     1112 <epsf_title+0x12>
jmp    1110 <epsf_title+0x10>
ret

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

LLVM IR (-O2):
define void @epsf_title(i8* nocapture %0) {
br label %2
2: ; preds = %11, %1
%3 = phi i8* [ %0, %1 ], [ %12, %11 ]
%4 = load i8, i8* %3
switch i8 %4, label %5 [
i8 0, label %13
i8 32, label %9
]
5: ; preds = %2
%6 = icmp eq i8 %4, 47
%7 = icmp ugt i8 %4, 126
%8 = or i1 %6, %7
br i1 %8, label %9, label %11
9: ; preds = %5, %2
%10 = phi i8 [ 95, %2 ], [ 46, %5 ]
store i8 %10, i8* %3
br label %11
11: ; preds = %9, %5
%12 = getelementptr inbounds i8, i8* %3, i64 1
br label %2
13: ; preds = %2
ret void
}
void __DELETE_java_nio_BufferFactory(void *me, void *client_data) {}


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

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

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

LLVM IR (-O2):
define void @__DELETE_java_nio_BufferFactory(i8* nocapture %0, i8* nocapture %1) {
ret void
}
/* Variables and functions */
int exp(double const);
double logistic_gradient(const double x) {
  double fx = 1. / (1. + exp(-x));
  return (1 - fx) * fx;
}


x86 assembly (clang, -O0):
<logistic_gradient>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
call   1030 <exp@plt>
cvtsi2sd %eax,%xmm0
movsd  0xeb6(%rip),%xmm1
addsd  %xmm0,%xmm1
movsd  0xeaa(%rip),%xmm0
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x10(%rbp)
movsd  0xe99(%rip),%xmm0
subsd  -0x10(%rbp),%xmm0
mulsd  -0x10(%rbp),%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<logistic_gradient>:
push   %rax
xorps  0xee8(%rip),%xmm0
call   1030 <exp@plt>
cvtsi2sd %eax,%xmm1
movsd  0xee7(%rip),%xmm0
addsd  %xmm0,%xmm1
movapd %xmm0,%xmm2
divsd  %xmm1,%xmm2
subsd  %xmm2,%xmm0
mulsd  %xmm2,%xmm0
pop    %rax
ret

LLVM IR (-O0):
define double @logistic_gradient(double %0) {
%2 = alloca double
%3 = alloca double
store double %0, double* %2
%4 = load double, double* %2
%5 = fneg double %4
%6 = call i32 @exp(double %5)
%7 = sitofp i32 %6 to double
%8 = fadd double 1.000000e+00, %7
%9 = fdiv double 1.000000e+00, %8
store double %9, double* %3
%10 = load double, double* %3
%11 = fsub double 1.000000e+00, %10
%12 = load double, double* %3
%13 = fmul double %11, %12
ret double %13
}

LLVM IR (-O2):
define double @logistic_gradient(double %0) {
%2 = fneg double %0
%3 = tail call i32 @exp(double %2)
%4 = sitofp i32 %3 to double
%5 = fadd double %4, 1.000000e+00
%6 = fdiv double 1.000000e+00, %5
%7 = fsub double 1.000000e+00, %6
%8 = fmul double %6, %7
ret double %8
}
/* Variables and functions */
int /*<<< orphan*/ arm_arith_rsc(int /*<<< orphan*/);
int /*<<< orphan*/ arm_data_regr_op();
void arm_rsc_regr() { arm_arith_rsc(arm_data_regr_op()); }


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

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

LLVM IR (-O0):
define void @arm_rsc_regr() {
%1 = call i32 (...) @arm_data_regr_op()
%2 = call i32 @arm_arith_rsc(i32 %1)
ret void
}

LLVM IR (-O2):
define void @arm_rsc_regr() {
%1 = tail call i32 (...) @arm_data_regr_op()
%2 = tail call i32 @arm_arith_rsc(i32 %1)
ret void
}
void drawimage_old(int endclock) { return; }


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

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

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

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


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

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

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

LLVM IR (-O2):
define void @ff_hevc_put_hevc_epel_v24_10_avx2() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ asyncWriterThread();
void sqlite3async_run(void) { asyncWriterThread(); }


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

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

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

LLVM IR (-O2):
define void @sqlite3async_run() {
%1 = tail call i32 (...) @asyncWriterThread()
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ uint32_t;

/* Variables and functions */
int /*<<< orphan*/ strtoul(char const *, char **, int);
uint32_t str_to_uint32(const char *nptr, char **endptr, int base) {
  return strtoul(nptr, endptr, base);
}


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

x86 assembly (clang, -O2):
<str_to_uint32>:
jmp    1030 <strtoul@plt>

LLVM IR (-O0):
define i32 @str_to_uint32(i8* %0, i8** %1, i32 %2) {
%4 = alloca i8*
%5 = alloca i8**
%6 = alloca i32
store i8* %0, i8** %4
store i8** %1, i8*** %5
store i32 %2, i32* %6
%7 = load i8*, i8** %4
%8 = load i8**, i8*** %5
%9 = load i32, i32* %6
%10 = call i32 @strtoul(i8* %7, i8** %8, i32 %9)
ret i32 %10
}

LLVM IR (-O2):
define i32 @str_to_uint32(i8* %0, i8** nocapture %1, i32 %2) {
%4 = tail call i32 @strtoul(i8* %0, i8** %1, i32 %2)
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, ...);
int main(void) {
  int x;
  int y;
  int *const ptr = &x;
  *ptr = 7;
  printf("%d\n", *ptr);
  printf("%p\n", ptr);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
lea    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rax
movl   $0x7,(%rax)
mov    -0x18(%rbp),%rax
mov    (%rax),%esi
lea    0xec2(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x18(%rbp),%rsi
lea    0xeb4(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
movl   $0x7,0x4(%rsp)
lea    0xee0(%rip),%rdi
mov    $0x7,%esi
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xed1(%rip),%rdi
lea    0x4(%rsp),%rsi
xor    %eax,%eax
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
@.str = [4 x i8] c"%d\0A\00"
@.str.1 = [4 x i8] c"%p\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
store i32 7, i32* %1
%3 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 7)
%4 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i32* %1)
ret i32 0
}
/* Type definitions */
typedef int /*<<< orphan*/ pthread_attr_t;

/* Variables and functions */
int ENOSYS;
int pthread_attr_getscope(const pthread_attr_t *attr, int *scope) {
  return (ENOSYS);
}


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

x86 assembly (clang, -O2):
<pthread_attr_getscope>:
mov    0x2ee1(%rip),%rax
mov    (%rax),%eax
ret

LLVM IR (-O0):
@ENOSYS = global i32 0
define i32 @pthread_attr_getscope(i32* %0, i32* %1) {
%3 = alloca i32*
%4 = alloca i32*
store i32* %0, i32** %3
store i32* %1, i32** %4
%5 = load i32, i32* @ENOSYS
ret i32 %5
}

LLVM IR (-O2):
@ENOSYS = global i32 0
define i32 @pthread_attr_getscope(i32* nocapture readnone %0, i32* nocapture readnone %1) {
%3 = load i32, i32* @ENOSYS
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ assert(int);
int find_or_insert(int);
void *process3(void *arg) {
  int val = 59;
  int found = find_or_insert(val);
  assert(found);
  return NULL;
}


x86 assembly (clang, -O0):
<process3>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
movl   $0x3b,-0xc(%rbp)
mov    -0xc(%rbp),%edi
call   1040 <find_or_insert@plt>
mov    %eax,-0x10(%rbp)
mov    -0x10(%rbp),%edi
call   1030 <assert@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<process3>:
push   %rax
mov    $0x3b,%edi
call   1040 <find_or_insert@plt>
mov    %eax,%edi
call   1030 <assert@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i8* @process3(i8* %0) {
%2 = alloca i8*
%3 = alloca i32
%4 = alloca i32
store i8* %0, i8** %2
store i32 59, i32* %3
%5 = load i32, i32* %3
%6 = call i32 @find_or_insert(i32 %5)
store i32 %6, i32* %4
%7 = load i32, i32* %4
%8 = call i32 @assert(i32 %7)
ret i8* null
}

LLVM IR (-O2):
define noalias i8* @process3(i8* nocapture readnone %0) {
%2 = tail call i32 @find_or_insert(i32 59)
%3 = tail call i32 @assert(i32 %2)
ret i8* null
}
/* Type definitions */
typedef int uint8_t;
typedef int uint16_t;

/* Variables and functions */
int s291_parity(int);
void s291_set_did(uint16_t *p_s291, uint8_t i_did) {
  p_s291[3] = i_did | s291_parity(i_did);
}


x86 assembly (clang, -O0):
<s291_set_did>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0xc(%rbp),%eax
mov    %eax,-0x10(%rbp)
mov    -0xc(%rbp),%edi
call   1030 <s291_parity@plt>
mov    -0x10(%rbp),%ecx
or     %eax,%ecx
mov    -0x8(%rbp),%rax
mov    %ecx,0xc(%rax)
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<s291_set_did>:
push   %r14
push   %rbx
push   %rax
mov    %esi,%ebx
mov    %rdi,%r14
mov    %esi,%edi
call   1030 <s291_parity@plt>
or     %ebx,%eax
mov    %eax,0xc(%r14)
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define void @s291_set_did(i32* %0, i32 %1) {
%3 = alloca i32*
%4 = alloca i32
store i32* %0, i32** %3
store i32 %1, i32* %4
%5 = load i32, i32* %4
%6 = load i32, i32* %4
%7 = call i32 @s291_parity(i32 %6)
%8 = or i32 %5, %7
%9 = load i32*, i32** %3
%10 = getelementptr inbounds i32, i32* %9, i64 3
store i32 %8, i32* %10
ret void
}

LLVM IR (-O2):
define void @s291_set_did(i32* nocapture writeonly %0, i32 %1) {
%3 = tail call i32 @s291_parity(i32 %1)
%4 = or i32 %3, %1
%5 = getelementptr inbounds i32, i32* %0, i64 3
store i32 %4, i32* %5
ret void
}
/* Type definitions */
typedef int uint32_t;

/* Variables and functions */
int loop_mask_32(int);
uint32_t mask_32(int a, int b) {
  if (a > b) {
    int t = a;
    a = b;
    b = t;
  }
  uint32_t b_mask = loop_mask_32(b);
  uint32_t a_mask = ~(loop_mask_32(a - 1));
  return b_mask & a_mask;
}


x86 assembly (clang, -O0):
<mask_32>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
cmp    -0x8(%rbp),%eax
jle    113c <mask_32+0x2c>
mov    -0x4(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0xc(%rbp),%eax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%edi
call   1030 <loop_mask_32@plt>
mov    %eax,-0x10(%rbp)
mov    -0x4(%rbp),%edi
sub    $0x1,%edi
call   1030 <loop_mask_32@plt>
xor    $0xffffffff,%eax
mov    %eax,-0x14(%rbp)
mov    -0x10(%rbp),%eax
and    -0x14(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<mask_32>:
push   %rbp
push   %rbx
push   %rax
mov    %edi,%ebx
cmp    %esi,%edi
mov    %esi,%edi
cmovg  %ebx,%edi
cmovg  %esi,%ebx
call   1030 <loop_mask_32@plt>
mov    %eax,%ebp
add    $0xffffffff,%ebx
mov    %ebx,%edi
call   1030 <loop_mask_32@plt>
not    %eax
and    %ebp,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
define i32 @mask_32(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%8 = load i32, i32* %3
%9 = load i32, i32* %4
%10 = icmp sgt i32 %8, %9
br i1 %10, label %11, label %15
11: ; preds = %2
%12 = load i32, i32* %3
store i32 %12, i32* %5
%13 = load i32, i32* %4
store i32 %13, i32* %3
%14 = load i32, i32* %5
store i32 %14, i32* %4
br label %15
15: ; preds = %11, %2
%16 = load i32, i32* %4
%17 = call i32 @loop_mask_32(i32 %16)
store i32 %17, i32* %6
%18 = load i32, i32* %3
%19 = sub nsw i32 %18, 1
%20 = call i32 @loop_mask_32(i32 %19)
%21 = xor i32 %20, -1
store i32 %21, i32* %7
%22 = load i32, i32* %6
%23 = load i32, i32* %7
%24 = and i32 %22, %23
ret i32 %24
}

LLVM IR (-O2):
define i32 @mask_32(i32 %0, i32 %1) {
%3 = icmp sgt i32 %0, %1
%4 = select i1 %3, i32 %0, i32 %1
%5 = select i1 %3, i32 %1, i32 %0
%6 = tail call i32 @loop_mask_32(i32 %4)
%7 = add nsw i32 %5, -1
%8 = tail call i32 @loop_mask_32(i32 %7)
%9 = xor i32 %8, -1
%10 = and i32 %6, %9
ret i32 %10
}
/* Variables and functions */
scalar_t__ parse();
int /*<<< orphan*/ printf(char *);
scalar_t__ scan();
int main() {
  if (scan() < 0)
    return 1;
  if (parse() < 0)
    return 1;
  printf("\n");
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x0,%al
call   1040 <scan@plt>
cmp    $0x0,%rax
jge    115c <main+0x2c>
movl   $0x1,-0x4(%rbp)
jmp    118c <main+0x5c>
mov    $0x0,%al
call   1050 <parse@plt>
cmp    $0x0,%rax
jge    1179 <main+0x49>
movl   $0x1,-0x4(%rbp)
jmp    118c <main+0x5c>
lea    0xe80(%rip),%rdi
call   1030 <printf@plt>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
xor    %eax,%eax
call   1040 <scan@plt>
mov    $0x1,%ebx
test   %rax,%rax
js     115a <main+0x2a>
xor    %eax,%eax
call   1050 <parse@plt>
test   %rax,%rax
js     115a <main+0x2a>
mov    $0xa,%edi
call   1030 <putchar@plt>
xor    %ebx,%ebx
mov    %ebx,%eax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [2 x i8] c"\0A\00"
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i64 (...) @scan()
%3 = icmp slt i64 %2, 0
br i1 %3, label %4, label %5
4: ; preds = %0
store i32 1, i32* %1
br label %11
5: ; preds = %0
%6 = call i64 (...) @parse()
%7 = icmp slt i64 %6, 0
br i1 %7, label %8, label %9
8: ; preds = %5
store i32 1, i32* %1
br label %11
9: ; preds = %5
%10 = call i32 @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
store i32 0, i32* %1
br label %11
11: ; preds = %9, %8, %4
%12 = load i32, i32* %1
ret i32 %12
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i64 (...) @scan()
%2 = icmp slt i64 %1, 0
br i1 %2, label %8, label %3
3: ; preds = %0
%4 = tail call i64 (...) @parse()
%5 = icmp slt i64 %4, 0
br i1 %5, label %8, label %6
6: ; preds = %3
%7 = tail call i32 @putchar(i32 10)
br label %8
8: ; preds = %3, %0, %6
%9 = phi i32 [ 0, %6 ], [ 1, %0 ], [ 1, %3 ]
ret i32 %9
}
/* Variables and functions */
int /*<<< orphan*/ abort();
int array_sum(int *);
int /*<<< orphan*/ foo(int *);
int main(void) {
  int a[50];
  foo(a);
  int res = array_sum(a);
  if (res != 63)
    abort();
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0xe0,%rsp
movl   $0x0,-0x4(%rbp)
lea    -0xd0(%rbp),%rdi
call   1040 <foo@plt>
lea    -0xd0(%rbp),%rdi
call   1050 <array_sum@plt>
mov    %eax,-0xd4(%rbp)
cmpl   $0x3f,-0xd4(%rbp)
je     1174 <main+0x44>
mov    $0x0,%al
call   1030 <abort@plt>
xor    %eax,%eax
add    $0xe0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0xd0,%rsp
mov    %rsp,%rbx
mov    %rbx,%rdi
call   1040 <foo@plt>
mov    %rbx,%rdi
call   1050 <array_sum@plt>
cmp    $0x3f,%eax
jne    115b <main+0x2b>
xor    %eax,%eax
add    $0xd0,%rsp
pop    %rbx
ret
xor    %eax,%eax
call   1030 <abort@plt>

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca [50 x i32]
%3 = alloca i32
store i32 0, i32* %1
%4 = getelementptr inbounds [50 x i32], [50 x i32]* %2, i64 0, i64 0
%5 = call i32 @foo(i32* %4)
%6 = getelementptr inbounds [50 x i32], [50 x i32]* %2, i64 0, i64 0
%7 = call i32 @array_sum(i32* %6)
store i32 %7, i32* %3
%8 = load i32, i32* %3
%9 = icmp ne i32 %8, 63
br i1 %9, label %10, label %12
10: ; preds = %0
%11 = call i32 (...) @abort()
unreachable
12: ; preds = %0
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = alloca [50 x i32]
%2 = bitcast [50 x i32]* %1 to i8*
%3 = getelementptr inbounds [50 x i32], [50 x i32]* %1, i64 0, i64 0
%4 = call i32 @foo(i32* %3)
%5 = call i32 @array_sum(i32* %3)
%6 = icmp eq i32 %5, 63
br i1 %6, label %9, label %7
7: ; preds = %0
%8 = call i32 (...) @abort()
unreachable
9: ; preds = %0
ret i32 0
}
int roi_set_control(unsigned char *buff) {
  buff[0] = (130);
  return 1;
}


x86 assembly (clang, -O0):
<roi_set_control>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movb   $0x82,(%rax)
mov    $0x1,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<roi_set_control>:
movb   $0x82,(%rdi)
mov    $0x1,%eax
ret

LLVM IR (-O0):
define i32 @roi_set_control(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = getelementptr inbounds i8, i8* %3, i64 0
store i8 -126, i8* %4
ret i32 1
}

LLVM IR (-O2):
define i32 @roi_set_control(i8* nocapture writeonly %0) {
store i8 -126, i8* %0
ret i32 1
}
int main(int argc, const char *argv[]) {
  struct my_struct {
    int a;
    float b;
    int c;
    struct {
      int e;
      float f;
      double g;
      struct {
        float i[10];
      } h;
      int j;
    } d;
  } y;
  struct my_struct x = {.a = 1,
                        .b = 1.3,
                        .c = 12,
                        .d.e = 100,
                        .d.f = 1.45,
                        .d.g = 45.85,
                        .d.h.i = {0, 1, 2, 3, 4, 5, 6, 7, 8, 9},
                        .d.j = 1578};
  y = x;
  x.d.h.i[0] = 20;
  x.d.h.i[1] = 30;
  x.d.e = 10;
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0xb0,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
lea    -0xb0(%rbp),%rdi
lea    0xed1(%rip),%rsi
mov    $0x50,%edx
call   1030 <memcpy@plt>
lea    -0x60(%rbp),%rdi
lea    -0xb0(%rbp),%rsi
mov    $0x50,%edx
call   1030 <memcpy@plt>
movss  0xea6(%rip),%xmm0
movss  %xmm0,-0x90(%rbp)
ff
movss  0xe92(%rip),%xmm0
movss  %xmm0,-0x8c(%rbp)
ff
movl   $0xa,-0xa0(%rbp)
xor    %eax,%eax
add    $0xb0,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
%struct.my_struct = type { i32, float, i32, %struct.anon }
%struct.anon = type { i32, float, double, %struct.anon.0, i32 }
%struct.anon.0 = type { [10 x float] }
@__const.main.x = %struct.my_struct { i32 1, float 0x3FF4CCCCC0000000, i32 12, %struct.anon { i32 100, float 0x3FF7333340000000, double 4.585000e+01, %struct.anon.0 { [10 x float] [float 0.000000e+00, float 1.000000e+00, float 2.000000e+00, float 3.000000e+00, float 4.000000e+00, float 5.000000e+00, float 6.000000e+00, float 7.000000e+00, float 8.000000e+00, float 9.000000e+00] }, i32 1578 } }
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca %struct.my_struct
%7 = alloca %struct.my_struct
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%8 = bitcast %struct.my_struct* %7 to i8*
%9 = bitcast %struct.my_struct* %6 to i8*
%10 = bitcast %struct.my_struct* %7 to i8*
%11 = getelementptr inbounds %struct.my_struct, %struct.my_struct* %7, i32 0, i32 3
%12 = getelementptr inbounds %struct.anon, %struct.anon* %11, i32 0, i32 3
%13 = getelementptr inbounds %struct.anon.0, %struct.anon.0* %12, i32 0, i32 0
%14 = getelementptr inbounds [10 x float], [10 x float]* %13, i64 0, i64 0
store float 2.000000e+01, float* %14
%15 = getelementptr inbounds %struct.my_struct, %struct.my_struct* %7, i32 0, i32 3
%16 = getelementptr inbounds %struct.anon, %struct.anon* %15, i32 0, i32 3
%17 = getelementptr inbounds %struct.anon.0, %struct.anon.0* %16, i32 0, i32 0
%18 = getelementptr inbounds [10 x float], [10 x float]* %17, i64 0, i64 1
store float 3.000000e+01, float* %18
%19 = getelementptr inbounds %struct.my_struct, %struct.my_struct* %7, i32 0, i32 3
%20 = getelementptr inbounds %struct.anon, %struct.anon* %19, i32 0, i32 0
store i32 10, i32* %20
ret i32 0
}

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture readnone %1) {
ret i32 0
}
unsigned int f50(unsigned int x, unsigned long int y) {
  return (x << ((-y) & (8 * 4 - 1))) ^ (x >> y);
}


x86 assembly (clang, -O0):
<f50>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x4(%rbp),%eax
xor    %ecx,%ecx
sub    -0x10(%rbp),%rcx
and    $0x1f,%rcx
shl    %cl,%eax
mov    -0x4(%rbp),%edx
mov    -0x10(%rbp),%rcx
shr    %cl,%edx
mov    %edx,%ecx
xor    %ecx,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @f50(i32 %0, i64 %1) {
%3 = alloca i32
%4 = alloca i64
store i32 %0, i32* %3
store i64 %1, i64* %4
%5 = load i32, i32* %3
%6 = load i64, i64* %4
%7 = sub i64 0, %6
%8 = and i64 %7, 31
%9 = trunc i64 %8 to i32
%10 = shl i32 %5, %9
%11 = load i32, i32* %3
%12 = load i64, i64* %4
%13 = trunc i64 %12 to i32
%14 = lshr i32 %11, %13
%15 = xor i32 %10, %14
ret i32 %15
}

LLVM IR (-O2):
define i32 @f50(i32 %0, i64 %1) {
%3 = trunc i64 %1 to i32
%4 = sub i32 0, %3
%5 = and i32 %4, 31
%6 = shl i32 %0, %5
%7 = lshr i32 %0, %3
%8 = xor i32 %6, %7
ret i32 %8
}
unsigned int hash_keyval(const char *key_) {
  const unsigned char *key = (const unsigned char *)key_;
  unsigned int keyval = *key;
  while (*key)
    keyval = keyval * 2147059363 + *key++;
  return keyval;
}


x86 assembly (clang, -O0):
<hash_keyval>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
movzbl (%rax),%eax
mov    %eax,-0x14(%rbp)
mov    -0x10(%rbp),%rax
cmpb   $0x0,(%rax)
je     114a <hash_keyval+0x4a>
imul   $0x7ff986a3,-0x14(%rbp),%eax
mov    -0x10(%rbp),%rcx
mov    %rcx,%rdx
add    $0x1,%rdx
mov    %rdx,-0x10(%rbp)
movzbl (%rcx),%ecx
add    %ecx,%eax
mov    %eax,-0x14(%rbp)
jmp    111a <hash_keyval+0x1a>
mov    -0x14(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<hash_keyval>:
movzbl (%rdi),%eax
test   %eax,%eax
je     1127 <hash_keyval+0x27>
add    $0x1,%rdi
mov    %eax,%ecx
nopl   (%rax)
imul   $0x7ff986a3,%eax,%edx
movzbl %cl,%eax
add    %edx,%eax
movzbl (%rdi),%ecx
add    $0x1,%rdi
test   %cl,%cl
jne    1110 <hash_keyval+0x10>
ret
xor    %eax,%eax
ret

LLVM IR (-O0):
define i32 @hash_keyval(i8* %0) {
%2 = alloca i8*
%3 = alloca i8*
%4 = alloca i32
store i8* %0, i8** %2
%5 = load i8*, i8** %2
store i8* %5, i8** %3
%6 = load i8*, i8** %3
%7 = load i8, i8* %6
%8 = zext i8 %7 to i32
store i32 %8, i32* %4
br label %9
9: ; preds = %13, %1
%10 = load i8*, i8** %3
%11 = load i8, i8* %10
%12 = icmp ne i8 %11, 0
br i1 %12, label %13, label %21
13: ; preds = %9
%14 = load i32, i32* %4
%15 = mul i32 %14, 2147059363
%16 = load i8*, i8** %3
%17 = getelementptr inbounds i8, i8* %16, i32 1
store i8* %17, i8** %3
%18 = load i8, i8* %16
%19 = zext i8 %18 to i32
%20 = add i32 %15, %19
store i32 %20, i32* %4
br label %9
21: ; preds = %9
%22 = load i32, i32* %4
ret i32 %22
}

LLVM IR (-O2):
define i32 @hash_keyval(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = icmp eq i8 %2, 0
br i1 %3, label %16, label %4
4: ; preds = %1
%5 = zext i8 %2 to i32
br label %6
6: ; preds = %4, %6
%7 = phi i32 [ %13, %6 ], [ %5, %4 ]
%8 = phi i8* [ %11, %6 ], [ %0, %4 ]
%9 = phi i8 [ %14, %6 ], [ %2, %4 ]
%10 = mul i32 %7, 2147059363
%11 = getelementptr inbounds i8, i8* %8, i64 1
%12 = zext i8 %9 to i32
%13 = add i32 %10, %12
%14 = load i8, i8* %11
%15 = icmp eq i8 %14, 0
br i1 %15, label %16, label %6
16: ; preds = %6, %1
%17 = phi i32 [ 0, %1 ], [ %13, %6 ]
ret i32 %17
}