xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ sprintf(char *, char *, int);
int /*<<< orphan*/ system(char *);
int x31_teardown() {
  char cmd[256];
  sprintf(cmd,
          "iptables -D INPUT -p tcp -m multiport --sport 53,80 --tcp-flags "
          "SYN,ACK SYN,ACK -j NFQUEUE --queue-num %d",
          1);
  system(cmd);
  return 0;
}


x86 assembly (clang, -O0):
<x31_teardown>:
push   %rbp
mov    %rsp,%rbp
sub    $0x100,%rsp
lea    -0x100(%rbp),%rdi
lea    0xec7(%rip),%rsi
mov    $0x1,%edx
call   1040 <sprintf@plt>
lea    -0x100(%rbp),%rdi
call   1030 <system@plt>
xor    %eax,%eax
add    $0x100,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<x31_teardown>:
push   %rbx
sub    $0x100,%rsp
lea    0xed1(%rip),%rsi
mov    %rsp,%rbx
mov    %rbx,%rdi
mov    $0x1,%edx
call   1040 <sprintf@plt>
mov    %rbx,%rdi
call   1030 <system@plt>
xor    %eax,%eax
add    $0x100,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@.str = [106 x i8] c"iptables -D INPUT -p tcp -m multiport --sport 53,80 --tcp-flags SYN,ACK SYN,ACK -j NFQUEUE --queue-num %d\00"
define i32 @x31_teardown() {
%1 = alloca [256 x i8]
%2 = getelementptr inbounds [256 x i8], [256 x i8]* %1, i64 0, i64 0
%3 = call i32 @sprintf(i8* %2, i8* getelementptr inbounds ([106 x i8], [106 x i8]* @.str, i64 0, i64 0), i32 1)
%4 = getelementptr inbounds [256 x i8], [256 x i8]* %1, i64 0, i64 0
%5 = call i32 @system(i8* %4)
ret i32 0
}

LLVM IR (-O2):
@.str = [106 x i8] c"iptables -D INPUT -p tcp -m multiport --sport 53,80 --tcp-flags SYN,ACK SYN,ACK -j NFQUEUE --queue-num %d\00"
define i32 @x31_teardown() {
%1 = alloca [256 x i8]
%2 = getelementptr inbounds [256 x i8], [256 x i8]* %1, i64 0, i64 0
%3 = call i32 @sprintf(i8* %2, i8* dereferenceable(1) getelementptr inbounds ([106 x i8], [106 x i8]* @.str, i64 0, i64 0), i32 1)
%4 = call i32 @system(i8* %2)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ exemplo1();
int /*<<< orphan*/ exemplo2();
int /*<<< orphan*/ printf(char *);
int main(int argc, char *argv[]) {
  printf("Operacoes com bits em C\n");
  exemplo1();
  exemplo2();
  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)
lea    0xeb3(%rip),%rdi
call   1040 <printf@plt>
mov    $0x0,%al
call   1030 <exemplo1@plt>
mov    $0x0,%al
call   1050 <exemplo2@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xec8(%rip),%rdi
call   1030 <puts@plt>
xor    %eax,%eax
call   1040 <exemplo1@plt>
xor    %eax,%eax
call   1050 <exemplo2@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [25 x i8] c"Operacoes com bits em C\0A\00"
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 @printf(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str, i64 0, i64 0))
%7 = call i32 (...) @exemplo1()
%8 = call i32 (...) @exemplo2()
ret i32 0
}

LLVM IR (-O2):
@str = [24 x i8] c"Operacoes com bits em C\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([24 x i8], [24 x i8]* @str, i64 0, i64 0))
%4 = tail call i32 (...) @exemplo1()
%5 = tail call i32 (...) @exemplo2()
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ ir_hash_free();
void ir_free_commands(void) { ir_hash_free(); }


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

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

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

LLVM IR (-O2):
define void @ir_free_commands() {
%1 = tail call i32 (...) @ir_hash_free()
ret void
}
int test_imm_9Cuint16_reg(unsigned short val) {
  return ((val) & (0x9C << 0)) ? -20 : -40;
}


x86 assembly (clang, -O0):
<test_imm_9Cuint16_reg>:
push   %rbp
mov    %rsp,%rbp
mov    %di,%ax
mov    %ax,-0x2(%rbp)
movzwl -0x2(%rbp),%edx
and    $0x9c,%edx
mov    $0xffffffd8,%eax
mov    $0xffffffec,%ecx
cmp    $0x0,%edx
cmovne %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_imm_9Cuint16_reg>:
test   $0x9c,%dil
mov    $0xffffffd8,%ecx
mov    $0xffffffec,%eax
cmove  %ecx,%eax
ret

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

LLVM IR (-O2):
define i32 @test_imm_9Cuint16_reg(i16 zeroext %0) {
%2 = and i16 %0, 156
%3 = icmp eq i16 %2, 0
%4 = select i1 %3, i32 -40, i32 -20
ret i32 %4
}
/* Type definitions */
struct timeval {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ select(int /*<<< orphan*/, int /*<<< orphan*/ *,
                          int /*<<< orphan*/ *, int /*<<< orphan*/ *,
                          struct timeval *);
void sleep(struct timeval *tvptr) { select(0, NULL, NULL, NULL, tvptr); }


x86 assembly (clang, -O0):
<sleep>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%r8
xor    %edi,%edi
xor    %eax,%eax
mov    %eax,%ecx
mov    %rcx,%rsi
mov    %rcx,%rdx
call   1030 <select@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<sleep>:
mov    %rdi,%r8
xor    %edi,%edi
xor    %esi,%esi
xor    %edx,%edx
xor    %ecx,%ecx
jmp    1030 <select@plt>

LLVM IR (-O0):
%struct.timeval = type { i32 }
define void @sleep(%struct.timeval* %0) {
%2 = alloca %struct.timeval*
store %struct.timeval* %0, %struct.timeval** %2
%3 = load %struct.timeval*, %struct.timeval** %2
%4 = call i32 @select(i32 0, i32* null, i32* null, i32* null, %struct.timeval* %3)
ret void
}

LLVM IR (-O2):
%struct.timeval = type { i32 }
define void @sleep(%struct.timeval* %0) {
%2 = tail call i32 @select(i32 0, i32* null, i32* null, i32* null, %struct.timeval* %0)
ret void
}
void XDrawImageString() {}


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

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

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

LLVM IR (-O2):
define void @XDrawImageString() {
ret void
}
__attribute__((always_)) void insb(unsigned short port, void *addr,
                                   unsigned long count) {
  asm volatile("rep ; ins"
               "b"
               : "=D"(addr), "=c"(count)
               : "d"(port), "0"(addr), "1"(count));
}


x86 assembly (clang, -O0):
<insb>:
push   %rbp
mov    %rsp,%rbp
mov    %di,%ax
mov    %ax,-0x2(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x2(%rbp),%dx
mov    -0x10(%rbp),%rdi
mov    -0x18(%rbp),%rcx
rep insb (%dx),%es:(%rdi)
mov    %rdi,-0x10(%rbp)
mov    %rcx,-0x18(%rbp)
pop    %rbp
ret

x86 assembly (clang, -O2):
<insb>:
mov    %rdx,%rcx
mov    %edi,%edx
mov    %rsi,%rdi
rep insb (%dx),%es:(%rdi)
ret

LLVM IR (-O0):
define void @insb(i16 zeroext %0, i8* %1, i64 %2) {
%4 = alloca i16
%5 = alloca i8*
%6 = alloca i64
store i16 %0, i16* %4
store i8* %1, i8** %5
store i64 %2, i64* %6
%7 = load i16, i16* %4
%8 = load i8*, i8** %5
%9 = load i64, i64* %6
%10 = call { i8*, i64 } asm sideeffect "rep ; insb", "={di},={cx},{dx},0,1,~{dirflag},~{fpsr},~{flags}"(i16 %7, i8* %8, i64 %9)
%11 = extractvalue { i8*, i64 } %10, 0
%12 = extractvalue { i8*, i64 } %10, 1
store i8* %11, i8** %5
store i64 %12, i64* %6
ret void
}

LLVM IR (-O2):
define void @insb(i16 zeroext %0, i8* %1, i64 %2) {
%4 = tail call { i8*, i64 } asm sideeffect "rep ; insb", "={di},={cx},{dx},0,1,~{dirflag},~{fpsr},~{flags}"(i16 %0, i8* %1, i64 %2)
ret void
}
/* Variables and functions */
int gob_encode_unsigned_int(char *, size_t, size_t);
int gob_start_slice(char *buf, size_t buf_size, size_t size) {
  return gob_encode_unsigned_int(buf, buf_size, size);
}


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

x86 assembly (clang, -O2):
<gob_start_slice>:
jmp    1030 <gob_encode_unsigned_int@plt>

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

LLVM IR (-O2):
define i32 @gob_start_slice(i8* %0, i64 %1, i64 %2) {
%4 = tail call i32 @gob_encode_unsigned_int(i8* %0, i64 %1, i64 %2)
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ absolutex();
int /*<<< orphan*/ rol16addr(int /*<<< orphan*/);
void rolAbsx16(void) { rol16addr(absolutex()); }


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

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

LLVM IR (-O0):
define void @rolAbsx16() {
%1 = call i32 (...) @absolutex()
%2 = call i32 @rol16addr(i32 %1)
ret void
}

LLVM IR (-O2):
define void @rolAbsx16() {
%1 = tail call i32 (...) @absolutex()
%2 = tail call i32 @rol16addr(i32 %1)
ret void
}
void *mb_correct_addr_and_bit(int *bit, void *addr) {
  *bit += ((unsigned long)addr & 3UL) << 3;
  addr = (void *)((unsigned long)addr & ~3UL);
  return addr;
}


x86 assembly (clang, -O0):
<mb_correct_addr_and_bit>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rdx
and    $0x3,%rdx
shl    $0x3,%rdx
mov    -0x8(%rbp),%rax
movslq (%rax),%rcx
add    %rdx,%rcx
mov    %ecx,(%rax)
mov    -0x10(%rbp),%rax
and    $0xfffffffffffffffc,%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<mb_correct_addr_and_bit>:
mov    %rsi,%rax
lea    0x0(,%rsi,8),%ecx
and    $0x18,%ecx
add    %ecx,(%rdi)
and    $0xfffffffffffffffc,%rax
ret

LLVM IR (-O0):
define i8* @mb_correct_addr_and_bit(i32* %0, i8* %1) {
%3 = alloca i32*
%4 = alloca i8*
store i32* %0, i32** %3
store i8* %1, i8** %4
%5 = load i8*, i8** %4
%6 = ptrtoint i8* %5 to i64
%7 = and i64 %6, 3
%8 = shl i64 %7, 3
%9 = load i32*, i32** %3
%10 = load i32, i32* %9
%11 = sext i32 %10 to i64
%12 = add i64 %11, %8
%13 = trunc i64 %12 to i32
store i32 %13, i32* %9
%14 = load i8*, i8** %4
%15 = ptrtoint i8* %14 to i64
%16 = and i64 %15, -4
%17 = inttoptr i64 %16 to i8*
store i8* %17, i8** %4
%18 = load i8*, i8** %4
ret i8* %18
}

LLVM IR (-O2):
define i8* @mb_correct_addr_and_bit(i32* nocapture %0, i8* %1) {
%3 = ptrtoint i8* %1 to i64
%4 = load i32, i32* %0
%5 = trunc i64 %3 to i32
%6 = shl i32 %5, 3
%7 = and i32 %6, 24
%8 = add i32 %4, %7
store i32 %8, i32* %0
%9 = and i64 %3, -4
%10 = inttoptr i64 %9 to i8*
ret i8* %10
}
int makeIntoCents(float dollars) {
  int cents;
  cents = dollars * 100;
  return cents;
}


x86 assembly (clang, -O0):
<makeIntoCents>:
push   %rbp
mov    %rsp,%rbp
movss  %xmm0,-0x4(%rbp)
movss  0xeef(%rip),%xmm0
mulss  -0x4(%rbp),%xmm0
cvttss2si %xmm0,%eax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<makeIntoCents>:
mulss  0xef8(%rip),%xmm0
cvttss2si %xmm0,%eax
ret

LLVM IR (-O0):
define i32 @makeIntoCents(float %0) {
%2 = alloca float
%3 = alloca i32
store float %0, float* %2
%4 = load float, float* %2
%5 = fmul float %4, 1.000000e+02
%6 = fptosi float %5 to i32
store i32 %6, i32* %3
%7 = load i32, i32* %3
ret i32 %7
}

LLVM IR (-O2):
define i32 @makeIntoCents(float %0) {
%2 = fmul float %0, 1.000000e+02
%3 = fptosi float %2 to i32
ret i32 %3
}
/* Type definitions */
typedef int /*<<< orphan*/ magic;

/* Variables and functions */
int /*<<< orphan*/ wl_ioctl(char const *, int /*<<< orphan*/, int *, int);
int wl_probe(const char *ifname) {
  int magic;
  return (!wl_ioctl(ifname, 0, &magic, sizeof(magic)) && (magic == 0x14e46c77));
}


x86 assembly (clang, -O0):
<wl_probe>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
xor    %esi,%esi
lea    -0xc(%rbp),%rdx
mov    $0x4,%ecx
call   1030 <wl_ioctl@plt>
mov    %eax,%ecx
xor    %eax,%eax
cmp    $0x0,%ecx
mov    %al,-0xd(%rbp)
jne    114d <wl_probe+0x3d>
cmpl   $0x14e46c77,-0xc(%rbp)
sete   %al
mov    %al,-0xd(%rbp)
mov    -0xd(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<wl_probe>:
push   %rax
lea    0x4(%rsp),%rdx
xor    %esi,%esi
mov    $0x4,%ecx
call   1030 <wl_ioctl@plt>
mov    $0x14e46c77,%edx
xor    0x4(%rsp),%edx
xor    %ecx,%ecx
or     %eax,%edx
sete   %cl
mov    %ecx,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @wl_probe(i8* %0) {
%2 = alloca i8*
%3 = alloca i32
store i8* %0, i8** %2
%4 = load i8*, i8** %2
%5 = call i32 @wl_ioctl(i8* %4, i32 0, i32* %3, i32 4)
%6 = icmp ne i32 %5, 0
br i1 %6, label %10, label %7
7: ; preds = %1
%8 = load i32, i32* %3
%9 = icmp eq i32 %8, 350514295
br label %10
10: ; preds = %7, %1
%11 = phi i1 [ false, %1 ], [ %9, %7 ]
%12 = zext i1 %11 to i32
ret i32 %12
}

LLVM IR (-O2):
define i32 @wl_probe(i8* %0) {
%2 = alloca i32
%3 = bitcast i32* %2 to i8*
%4 = call i32 @wl_ioctl(i8* %0, i32 0, i32* %2, i32 4)
%5 = icmp eq i32 %4, 0
%6 = load i32, i32* %2
%7 = icmp eq i32 %6, 350514295
%8 = select i1 %5, i1 %7, i1 false
%9 = zext i1 %8 to i32
ret i32 %9
}
void free_up(char **line, int no_lines) {
  int i;
  for (i = 0; i < no_lines; i++) {
    free(line[i]);
  }
  free(line);
}


x86 assembly (clang, -O0):
<free_up>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
movl   $0x0,-0x10(%rbp)
mov    -0x10(%rbp),%eax
cmp    -0xc(%rbp),%eax
jge    1151 <free_up+0x41>
mov    -0x8(%rbp),%rax
movslq -0x10(%rbp),%rcx
mov    (%rax,%rcx,8),%rdi
call   1030 <free@plt>
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    1126 <free_up+0x16>
mov    -0x8(%rbp),%rdi
call   1030 <free@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<free_up>:
push   %r15
push   %r14
push   %rbx
mov    %rdi,%r14
test   %esi,%esi
jle    1142 <free_up+0x32>
mov    %esi,%r15d
xor    %ebx,%ebx
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
mov    (%r14,%rbx,8),%rdi
call   1030 <free@plt>
add    $0x1,%rbx
cmp    %rbx,%r15
jne    1130 <free_up+0x20>
mov    %r14,%rdi
pop    %rbx
pop    %r14
pop    %r15
jmp    1030 <free@plt>

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

LLVM IR (-O2):
define void @free_up(i8** nocapture %0, i32 %1) {
%3 = icmp sgt i32 %1, 0
br i1 %3, label %4, label %12
4: ; preds = %2
%5 = zext i32 %1 to i64
br label %6
6: ; preds = %4, %6
%7 = phi i64 [ 0, %4 ], [ %10, %6 ]
%8 = getelementptr inbounds i8*, i8** %0, i64 %7
%9 = load i8*, i8** %8
tail call void @free(i8* %9)
%10 = add nuw nsw i64 %7, 1
%11 = icmp eq i64 %10, %5
br i1 %11, label %12, label %6
12: ; preds = %6, %2
%13 = bitcast i8** %0 to i8*
tail call void @free(i8* %13)
ret void
}
void g_object_class_override_property() {}


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

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

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

LLVM IR (-O2):
define void @g_object_class_override_property() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void test_system_program_install_sequence_probability() {
  printf("test_system_program_install_sequence_probability...");
  printf("Ok\n");
}


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

x86 assembly (clang, -O2):
<test_system_program_install_sequence_probability>:
push   %rax
lea    0xed8(%rip),%rdi
call   1040 <printf@plt>
lea    0xf00(%rip),%rdi
pop    %rax
jmp    1030 <puts@plt>

LLVM IR (-O0):
@.str = [52 x i8] c"test_system_program_install_sequence_probability...\00"
@.str.1 = [4 x i8] c"Ok\0A\00"
define void @test_system_program_install_sequence_probability() {
%1 = call i32 @printf(i8* getelementptr inbounds ([52 x i8], [52 x i8]* @.str, i64 0, i64 0))
%2 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [52 x i8] c"test_system_program_install_sequence_probability...\00"
@str = [3 x i8] c"Ok\00"
define void @test_system_program_install_sequence_probability() {
%1 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([52 x i8], [52 x i8]* @.str, i64 0, i64 0))
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([3 x i8], [3 x i8]* @str, i64 0, i64 0))
ret void
}
void test_106(unsigned short *x, unsigned int *y) { y[0] = x[1] >> 7; }


x86 assembly (clang, -O0):
<test_106>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
movzwl 0x2(%rax),%ecx
sar    $0x7,%ecx
mov    -0x10(%rbp),%rax
mov    %ecx,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_106>:
movzwl 0x2(%rdi),%eax
shr    $0x7,%eax
mov    %eax,(%rsi)
ret

LLVM IR (-O0):
define void @test_106(i16* %0, i32* %1) {
%3 = alloca i16*
%4 = alloca i32*
store i16* %0, i16** %3
store i32* %1, i32** %4
%5 = load i16*, i16** %3
%6 = getelementptr inbounds i16, i16* %5, i64 1
%7 = load i16, i16* %6
%8 = zext i16 %7 to i32
%9 = ashr i32 %8, 7
%10 = load i32*, i32** %4
%11 = getelementptr inbounds i32, i32* %10, i64 0
store i32 %9, i32* %11
ret void
}

LLVM IR (-O2):
define void @test_106(i16* nocapture %0, i32* nocapture writeonly %1) {
%3 = getelementptr inbounds i16, i16* %0, i64 1
%4 = load i16, i16* %3
%5 = lshr i16 %4, 7
%6 = zext i16 %5 to i32
store i32 %6, i32* %1
ret void
}
/* Variables and functions */
int /*<<< orphan*/ do_initcalls();
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
int /*<<< orphan*/ stderr;
int main(void) {
  fprintf(stderr, "in main()/n");
  do_initcalls();
  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),%edi
lea    0xec1(%rip),%rsi
call   1040 <fprintf@plt>
mov    $0x0,%al
call   1030 <do_initcalls@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    0x2eb8(%rip),%rax
mov    (%rax),%edi
lea    0xecf(%rip),%rsi
call   1040 <fprintf@plt>
xor    %eax,%eax
call   1030 <do_initcalls@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@stderr = global i32 0
@.str = [12 x i8] c"in main()/n\00"
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = load i32, i32* @stderr
%3 = call i32 @fprintf(i32 %2, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0))
%4 = call i32 (...) @do_initcalls()
ret i32 0
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [12 x i8] c"in main()/n\00"
define i32 @main() {
%1 = load i32, i32* @stderr
%2 = tail call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0))
%3 = tail call i32 (...) @do_initcalls()
ret i32 0
}
int energymon_is_exclusive_shmem(void) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @energymon_is_exclusive_shmem() {
ret i32 0
}
void FPUNaNModeSet(unsigned long ulMode) {
  (*((volatile unsigned long *)(0xE000EF3C))) =
      ((*((volatile unsigned long *)(0xE000EF3C))) & ~(0x02000000)) | ulMode;
}


x86 assembly (clang, -O0):
<FPUNaNModeSet>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    $0xe000ef3c,%eax
mov    (%rax),%rcx
and    $0xfffffffffdffffff,%rcx
or     -0x8(%rbp),%rcx
mov    $0xe000ef3c,%eax
mov    %rcx,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<FPUNaNModeSet>:
mov    $0xe000ef3c,%eax
mov    $0xfffffffffdffffff,%rcx
and    (%rax),%rcx
or     %rdi,%rcx
mov    %rcx,(%rax)
ret

LLVM IR (-O0):
define void @FPUNaNModeSet(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = load volatile i64, i64* inttoptr (i64 3758157628 to i64*)
%4 = and i64 %3, -33554433
%5 = load i64, i64* %2
%6 = or i64 %4, %5
store volatile i64 %6, i64* inttoptr (i64 3758157628 to i64*)
ret void
}

LLVM IR (-O2):
define void @FPUNaNModeSet(i64 %0) {
%2 = load volatile i64, i64* inttoptr (i64 3758157628 to i64*)
%3 = and i64 %2, -33554433
%4 = or i64 %3, %0
store volatile i64 %4, i64* inttoptr (i64 3758157628 to i64*)
ret void
}
/* Variables and functions */
scalar_t__ strcmp(char const *, char const *);
int streq(const char *a, const char *b) { return strcmp(a, b) == 0 ? 1 : 0; }


x86 assembly (clang, -O0):
<streq>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1030 <strcmp@plt>
mov    %rax,%rdx
xor    %eax,%eax
mov    $0x1,%ecx
cmp    $0x0,%rdx
cmove  %ecx,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<streq>:
push   %rax
call   1030 <strcmp@plt>
xor    %ecx,%ecx
test   %rax,%rax
sete   %cl
mov    %ecx,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @streq(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
store i8* %0, i8** %3
store i8* %1, i8** %4
%5 = load i8*, i8** %3
%6 = load i8*, i8** %4
%7 = call i64 @strcmp(i8* %5, i8* %6)
%8 = icmp eq i64 %7, 0
%9 = zext i1 %8 to i64
%10 = select i1 %8, i32 1, i32 0
ret i32 %10
}

LLVM IR (-O2):
define i32 @streq(i8* %0, i8* %1) {
%3 = tail call i64 @strcmp(i8* %0, i8* %1)
%4 = icmp eq i64 %3, 0
%5 = zext i1 %4 to i32
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ free(unsigned char *);
void destroy_image_buffer(unsigned char *image) { free(image); }


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

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

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

LLVM IR (-O2):
define void @destroy_image_buffer(i8* nocapture %0) {
%2 = tail call i32 @free(i8* %0)
ret void
}
int inCircle(unsigned long long a, unsigned long long b,
             unsigned long long size) {
  unsigned long long c = a * a + b * b;
  return (c <= size * size);
}


x86 assembly (clang, -O0):
<inCircle>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x8(%rbp),%rax
imul   -0x8(%rbp),%rax
mov    -0x10(%rbp),%rcx
imul   -0x10(%rbp),%rcx
add    %rcx,%rax
mov    %rax,-0x20(%rbp)
mov    -0x20(%rbp),%rax
mov    -0x18(%rbp),%rcx
imul   -0x18(%rbp),%rcx
cmp    %rcx,%rax
setbe  %al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<inCircle>:
imul   %rdi,%rdi
imul   %rsi,%rsi
add    %rdi,%rsi
imul   %rdx,%rdx
xor    %eax,%eax
cmp    %rdx,%rsi
setbe  %al
ret

LLVM IR (-O0):
define i32 @inCircle(i64 %0, i64 %1, i64 %2) {
%4 = alloca i64
%5 = alloca i64
%6 = alloca i64
%7 = alloca i64
store i64 %0, i64* %4
store i64 %1, i64* %5
store i64 %2, i64* %6
%8 = load i64, i64* %4
%9 = load i64, i64* %4
%10 = mul i64 %8, %9
%11 = load i64, i64* %5
%12 = load i64, i64* %5
%13 = mul i64 %11, %12
%14 = add i64 %10, %13
store i64 %14, i64* %7
%15 = load i64, i64* %7
%16 = load i64, i64* %6
%17 = load i64, i64* %6
%18 = mul i64 %16, %17
%19 = icmp ule i64 %15, %18
%20 = zext i1 %19 to i32
ret i32 %20
}

LLVM IR (-O2):
define i32 @inCircle(i64 %0, i64 %1, i64 %2) {
%4 = mul i64 %0, %0
%5 = mul i64 %1, %1
%6 = add i64 %5, %4
%7 = mul i64 %2, %2
%8 = icmp ule i64 %6, %7
%9 = zext i1 %8 to i32
ret i32 %9
}
void RTAvlUIntPtrDoWithAll(void) {}


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

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

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

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

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


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

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

LLVM IR (-O0):
define void @GPIOPinTypeKBColumn(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%5 = load i32, i32* %3
%6 = load i32, i32* %4
%7 = call i32 @GPIODirModeSet(i32 %5, i32 %6, i32 2)
%8 = load i32, i32* %3
%9 = load i32, i32* %4
%10 = call i32 @GPIOPadConfigSet(i32 %8, i32 %9, i32 1, i32 10)
ret void
}

LLVM IR (-O2):
define void @GPIOPinTypeKBColumn(i32 %0, i32 %1) {
%3 = tail call i32 @GPIODirModeSet(i32 %0, i32 %1, i32 2)
%4 = tail call i32 @GPIOPadConfigSet(i32 %0, i32 %1, i32 1, i32 10)
ret void
}
/* Variables and functions */
void *malloc(size_t);
void *ALdedicatedState_New(size_t size) { return malloc(size); }


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

x86 assembly (clang, -O2):
<ALdedicatedState_New>:
jmp    1030 <malloc@plt>

LLVM IR (-O0):
define i8* @ALdedicatedState_New(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = load i64, i64* %2
%4 = call i8* @malloc(i64 %3)
ret i8* %4
}

LLVM IR (-O2):
define noalias i8* @ALdedicatedState_New(i64 %0) {
%2 = tail call i8* @malloc(i64 %0)
ret i8* %2
}
/* Variables and functions */
int /*<<< orphan*/ sed_insert_append(int, int, int, int, char *);
void sed_append(int fd, int start, int end, char *txt) {
  sed_insert_append(1, fd, start, end, txt);
}


x86 assembly (clang, -O0):
<sed_append>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    %rcx,-0x18(%rbp)
mov    -0x4(%rbp),%esi
mov    -0x8(%rbp),%edx
mov    -0xc(%rbp),%ecx
mov    -0x18(%rbp),%r8
mov    $0x1,%edi
call   1030 <sed_insert_append@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<sed_append>:
mov    %rcx,%r8
mov    %edx,%ecx
mov    %esi,%edx
mov    %edi,%esi
mov    $0x1,%edi
jmp    1030 <sed_insert_append@plt>

LLVM IR (-O0):
define void @sed_append(i32 %0, i32 %1, i32 %2, i8* %3) {
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
%8 = alloca i8*
store i32 %0, i32* %5
store i32 %1, i32* %6
store i32 %2, i32* %7
store i8* %3, i8** %8
%9 = load i32, i32* %5
%10 = load i32, i32* %6
%11 = load i32, i32* %7
%12 = load i8*, i8** %8
%13 = call i32 @sed_insert_append(i32 1, i32 %9, i32 %10, i32 %11, i8* %12)
ret void
}

LLVM IR (-O2):
define void @sed_append(i32 %0, i32 %1, i32 %2, i8* %3) {
%5 = tail call i32 @sed_insert_append(i32 1, i32 %0, i32 %1, i32 %2, i8* %3)
ret void
}
/* Type definitions */
struct dirent {
  int dummy;
};
typedef int /*<<< orphan*/ DIR;

/* Variables and functions */
struct dirent *fake_readdir(int /*<<< orphan*/ *);
struct dirent *readdir(DIR *dirp) {
  return fake_readdir(dirp);
}


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

x86 assembly (clang, -O2):
<readdir>:
jmp    1030 <fake_readdir@plt>

LLVM IR (-O0):
%struct.dirent = type { i32 }
define %struct.dirent* @readdir(i32* %0) {
%2 = alloca i32*
store i32* %0, i32** %2
%3 = load i32*, i32** %2
%4 = call %struct.dirent* @fake_readdir(i32* %3)
ret %struct.dirent* %4
}

LLVM IR (-O2):
%struct.dirent = type { i32 }
define %struct.dirent* @readdir(i32* %0) {
%2 = tail call %struct.dirent* @fake_readdir(i32* %0)
ret %struct.dirent* %2
}
float absoluteValue(float value) { return (value > 0) ? value : -value; }


x86 assembly (clang, -O0):
<absoluteValue>:
push   %rbp
mov    %rsp,%rbp
movss  %xmm0,-0x4(%rbp)
movss  -0x4(%rbp),%xmm0
xorps  %xmm1,%xmm1
ucomiss %xmm1,%xmm0
jbe    1129 <absoluteValue+0x29>
movss  -0x4(%rbp),%xmm0
movss  %xmm0,-0x8(%rbp)
jmp    1140 <absoluteValue+0x40>
movss  -0x4(%rbp),%xmm0
movd   %xmm0,%eax
xor    $0x80000000,%eax
movd   %eax,%xmm0
movss  %xmm0,-0x8(%rbp)
movss  -0x8(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<absoluteValue>:
movaps 0xef9(%rip),%xmm1
xorps  %xmm0,%xmm1
xorps  %xmm2,%xmm2
cmpltss %xmm0,%xmm2
andps  %xmm2,%xmm0
andnps %xmm1,%xmm2
orps   %xmm2,%xmm0
ret

LLVM IR (-O0):
define float @absoluteValue(float %0) {
%2 = alloca float
store float %0, float* %2
%3 = load float, float* %2
%4 = fcmp ogt float %3, 0.000000e+00
br i1 %4, label %5, label %7
5: ; preds = %1
%6 = load float, float* %2
br label %10
7: ; preds = %1
%8 = load float, float* %2
%9 = fneg float %8
br label %10
10: ; preds = %7, %5
%11 = phi float [ %6, %5 ], [ %9, %7 ]
ret float %11
}

LLVM IR (-O2):
define float @absoluteValue(float %0) {
%2 = fcmp ogt float %0, 0.000000e+00
%3 = fneg float %0
%4 = select i1 %2, float %0, float %3
ret float %4
}
/* Variables and functions */
int /*<<< orphan*/ gfx_delay_milliseconds(int);
int /*<<< orphan*/ gu2_vga_attr_ctrl(int /*<<< orphan*/);
int /*<<< orphan*/ gu2_vga_extcrtc(int, int);
int /*<<< orphan*/ gu2_vga_seq_blanking();
void gu2_vga_to_gfx(void) {
  gu2_vga_attr_ctrl(0);
  gu2_vga_seq_blanking();
  gfx_delay_milliseconds(2);
  gu2_vga_extcrtc(0x3F, 1);
}


x86 assembly (clang, -O0):
<gu2_vga_to_gfx>:
push   %rbp
mov    %rsp,%rbp
xor    %edi,%edi
call   1030 <gu2_vga_attr_ctrl@plt>
mov    $0x0,%al
call   1040 <gu2_vga_seq_blanking@plt>
mov    $0x2,%edi
call   1060 <gfx_delay_milliseconds@plt>
mov    $0x3f,%edi
mov    $0x1,%esi
call   1050 <gu2_vga_extcrtc@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<gu2_vga_to_gfx>:
push   %rax
xor    %edi,%edi
call   1030 <gu2_vga_attr_ctrl@plt>
xor    %eax,%eax
call   1040 <gu2_vga_seq_blanking@plt>
mov    $0x2,%edi
call   1060 <gfx_delay_milliseconds@plt>
mov    $0x3f,%edi
mov    $0x1,%esi
pop    %rax
jmp    1050 <gu2_vga_extcrtc@plt>

LLVM IR (-O0):
define void @gu2_vga_to_gfx() {
%1 = call i32 @gu2_vga_attr_ctrl(i32 0)
%2 = call i32 (...) @gu2_vga_seq_blanking()
%3 = call i32 @gfx_delay_milliseconds(i32 2)
%4 = call i32 @gu2_vga_extcrtc(i32 63, i32 1)
ret void
}

LLVM IR (-O2):
define void @gu2_vga_to_gfx() {
%1 = tail call i32 @gu2_vga_attr_ctrl(i32 0)
%2 = tail call i32 (...) @gu2_vga_seq_blanking()
%3 = tail call i32 @gfx_delay_milliseconds(i32 2)
%4 = tail call i32 @gu2_vga_extcrtc(i32 63, i32 1)
ret void
}
/* Variables and functions */
double sqrt(double);
double dist2(double x1, double y1, double x2, double y2) {
  return sqrt((x1 - x2) * (x1 - x2) + (y1 - y2) * (y1 - y2));
}


x86 assembly (clang, -O0):
<dist2>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  %xmm2,-0x18(%rbp)
movsd  %xmm3,-0x20(%rbp)
movsd  -0x8(%rbp),%xmm0
subsd  -0x18(%rbp),%xmm0
movsd  -0x8(%rbp),%xmm2
subsd  -0x18(%rbp),%xmm2
movsd  -0x10(%rbp),%xmm1
subsd  -0x20(%rbp),%xmm1
movsd  -0x10(%rbp),%xmm3
subsd  -0x20(%rbp),%xmm3
mulsd  %xmm3,%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
call   1030 <sqrt@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<dist2>:
subsd  %xmm2,%xmm0
subsd  %xmm3,%xmm1
mulsd  %xmm1,%xmm1
mulsd  %xmm0,%xmm0
addsd  %xmm1,%xmm0
xorpd  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jb     1133 <dist2+0x23>
sqrtsd %xmm0,%xmm0
ret
jmp    1030 <sqrt@plt>

LLVM IR (-O0):
define double @dist2(double %0, double %1, double %2, double %3) {
%5 = alloca double
%6 = alloca double
%7 = alloca double
%8 = alloca double
store double %0, double* %5
store double %1, double* %6
store double %2, double* %7
store double %3, double* %8
%9 = load double, double* %5
%10 = load double, double* %7
%11 = fsub double %9, %10
%12 = load double, double* %5
%13 = load double, double* %7
%14 = fsub double %12, %13
%15 = load double, double* %6
%16 = load double, double* %8
%17 = fsub double %15, %16
%18 = load double, double* %6
%19 = load double, double* %8
%20 = fsub double %18, %19
%21 = fmul double %17, %20
%22 = call double @llvm.fmuladd.f64(double %11, double %14, double %21)
%23 = call double @sqrt(double %22)
ret double %23
}

LLVM IR (-O2):
define double @dist2(double %0, double %1, double %2, double %3) {
%5 = fsub double %0, %2
%6 = fsub double %1, %3
%7 = fmul double %6, %6
%8 = tail call double @llvm.fmuladd.f64(double %5, double %5, double %7)
%9 = tail call double @sqrt(double %8)
ret double %9
}
void xmlCleanupPredefinedEntities(void) {}


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

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

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

LLVM IR (-O2):
define void @xmlCleanupPredefinedEntities() {
ret void
}
void grib_reset_all_timers() { return; }


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

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

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

LLVM IR (-O2):
define void @grib_reset_all_timers() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ func(char *, char *);
void stricmp_equal_mixed() {
  Assert_real((func("EqUaL", "eQuAl") == 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/string/stricmp.c",
              22, ("Should be == 0"));
}


x86 assembly (clang, -O0):
<stricmp_equal_mixed>:
push   %rbp
mov    %rsp,%rbp
lea    0xed5(%rip),%rdi
lea    0xed4(%rip),%rsi
call   1030 <func@plt>
cmp    $0x0,%rax
sete   %al
and    $0x1,%al
movzbl %al,%edi
lea    0xec2(%rip),%rsi
mov    $0x16,%edx
lea    0xf5a(%rip),%rcx
call   1040 <Assert_real@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<stricmp_equal_mixed>:
push   %rax
lea    0xed8(%rip),%rdi
lea    0xed7(%rip),%rsi
call   1030 <func@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
lea    0xec8(%rip),%rsi
lea    0xf65(%rip),%rcx
mov    $0x16,%edx
pop    %rax
jmp    1040 <Assert_real@plt>

LLVM IR (-O0):
@.str = [6 x i8] c"EqUaL\00"
@.str.1 = [6 x i8] c"eQuAl\00"
@.str.2 = [164 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/string/stricmp.c\00"
@.str.3 = [15 x i8] c"Should be == 0\00"
define void @stricmp_equal_mixed() {
%1 = call i64 @func(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0))
%2 = icmp eq i64 %1, 0
%3 = zext i1 %2 to i32
%4 = call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([164 x i8], [164 x i8]* @.str.2, i64 0, i64 0), i32 22, i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.3, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [6 x i8] c"EqUaL\00"
@.str.1 = [6 x i8] c"eQuAl\00"
@.str.2 = [164 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/string/stricmp.c\00"
@.str.3 = [15 x i8] c"Should be == 0\00"
define void @stricmp_equal_mixed() {
%1 = tail call i64 @func(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0))
%2 = icmp eq i64 %1, 0
%3 = zext i1 %2 to i32
%4 = tail call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([164 x i8], [164 x i8]* @.str.2, i64 0, i64 0), i32 22, i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.3, i64 0, i64 0))
ret void
}
/* Type definitions */
struct gengetopt_args_info {
  int dummy;
};

/* Variables and functions */
int EXIT_SUCCESS;
int test_manual_help_cmd_parser_required(struct gengetopt_args_info *args_info,
                                         const char *prog_name) {
  (void)(args_info);
  (void)(prog_name);
  return EXIT_SUCCESS;
}


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

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

LLVM IR (-O0):
%struct.gengetopt_args_info = type { i32 }
@EXIT_SUCCESS = global i32 0
define i32 @test_manual_help_cmd_parser_required(%struct.gengetopt_args_info* %0, i8* %1) {
%3 = alloca %struct.gengetopt_args_info*
%4 = alloca i8*
store %struct.gengetopt_args_info* %0, %struct.gengetopt_args_info** %3
store i8* %1, i8** %4
%5 = load %struct.gengetopt_args_info*, %struct.gengetopt_args_info** %3
%6 = load i8*, i8** %4
%7 = load i32, i32* @EXIT_SUCCESS
ret i32 %7
}

LLVM IR (-O2):
%struct.gengetopt_args_info = type { i32 }
@EXIT_SUCCESS = global i32 0
define i32 @test_manual_help_cmd_parser_required(%struct.gengetopt_args_info* nocapture readnone %0, i8* nocapture readnone %1) {
%3 = load i32, i32* @EXIT_SUCCESS
ret i32 %3
}
/* Variables and functions */
int abs(int);
int min_dist(int a, int b) {
  int fdi = abs(a % 10 - b % 10);
  int rdi = abs(a / 10 - b / 10);
  return (((rdi) < (fdi)) ? (rdi) : (fdi));
}


x86 assembly (clang, -O0):
<min_dist>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
mov    $0xa,%ecx
cltd
idiv   %ecx
mov    %edx,%edi
mov    -0x8(%rbp),%eax
mov    $0xa,%ecx
cltd
idiv   %ecx
sub    %edx,%edi
call   1030 <abs@plt>
mov    %eax,-0xc(%rbp)
mov    -0x4(%rbp),%eax
mov    $0xa,%ecx
cltd
idiv   %ecx
mov    %eax,%edi
mov    -0x8(%rbp),%eax
mov    $0xa,%ecx
cltd
idiv   %ecx
sub    %eax,%edi
call   1030 <abs@plt>
mov    %eax,-0x10(%rbp)
mov    -0x10(%rbp),%eax
cmp    -0xc(%rbp),%eax
jge    1179 <min_dist+0x69>
mov    -0x10(%rbp),%eax
mov    %eax,-0x14(%rbp)
jmp    117f <min_dist+0x6f>
mov    -0xc(%rbp),%eax
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<min_dist>:
movslq %esi,%rax
imul   $0x66666667,%rax,%rcx
mov    %rcx,%rdx
shr    $0x3f,%rdx
sar    $0x22,%rcx
add    %edx,%ecx
add    %ecx,%ecx
lea    (%rcx,%rcx,4),%edx
sub    %eax,%edx
movslq %edi,%rsi
imul   $0x66666667,%rsi,%rcx
mov    %rcx,%rdi
shr    $0x3f,%rdi
sar    $0x22,%rcx
add    %edi,%ecx
lea    (%rcx,%rcx,1),%edi
lea    (%rdi,%rdi,4),%edi
sub    %edi,%esi
add    %edx,%esi
mov    %esi,%edx
neg    %edx
cmovs  %esi,%edx
imul   $0xffffffff99999999,%rax,%rsi
mov    %rsi,%rax
shr    $0x3f,%rax
sar    $0x22,%rsi
add    %eax,%esi
add    %ecx,%esi
mov    %esi,%eax
neg    %eax
cmovs  %esi,%eax
cmp    %edx,%eax
cmovae %edx,%eax
ret

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

LLVM IR (-O2):
define i32 @min_dist(i32 %0, i32 %1) {
%3 = srem i32 %0, 10
%4 = srem i32 %1, 10
%5 = sub nsw i32 %3, %4
%6 = tail call i32 @llvm.abs.i32(i32 %5, i1 true)
%7 = sdiv i32 %0, 10
%8 = sdiv i32 %1, -10
%9 = add nsw i32 %8, %7
%10 = tail call i32 @llvm.abs.i32(i32 %9, i1 true)
%11 = icmp ult i32 %10, %6
%12 = select i1 %11, i32 %10, i32 %6
ret i32 %12
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int, int, int);
int main() {
  int a[] = {5, 6, 7};
  printf("a[0] = %d\na[1] = %d\na[2] = %d\n", a[0], a[1], a[2]);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    0xeda(%rip),%rax
mov    %rax,-0x10(%rbp)
mov    0xed8(%rip),%eax
mov    %eax,-0x8(%rbp)
mov    -0x10(%rbp),%esi
mov    -0xc(%rbp),%edx
mov    -0x8(%rbp),%ecx
lea    0xec9(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xee8(%rip),%rdi
mov    $0x5,%esi
mov    $0x6,%edx
mov    $0x7,%ecx
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
@.str = [31 x i8] c"a[0] = %d\0Aa[1] = %d\0Aa[2] = %d\0A\00"
define i32 @main() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str, i64 0, i64 0), i32 5, i32 6, i32 7)
ret i32 0
}
/* Type definitions */
struct drand48_data {
  int /*<<< orphan*/ __x;
};

/* Variables and functions */
int jrand48_r(int /*<<< orphan*/, struct drand48_data *, long *);
int mrand48_r(struct drand48_data *buffer, long int *result) {
  if (buffer == NULL)
    return -1;
  return jrand48_r(buffer->__x, buffer, result);
}


x86 assembly (clang, -O0):
<mrand48_r>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
cmpq   $0x0,-0x10(%rbp)
jne    1137 <mrand48_r+0x27>
movl   $0xffffffff,-0x4(%rbp)
jmp    114d <mrand48_r+0x3d>
mov    -0x10(%rbp),%rax
mov    (%rax),%edi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
call   1030 <jrand48_r@plt>
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<mrand48_r>:
test   %rdi,%rdi
je     1122 <mrand48_r+0x12>
mov    %rsi,%rdx
mov    %rdi,%rsi
mov    (%rdi),%edi
jmp    1030 <jrand48_r@plt>
mov    $0xffffffff,%eax
ret

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

LLVM IR (-O2):
%struct.drand48_data = type { i32 }
define i32 @mrand48_r(%struct.drand48_data* %0, i64* %1) {
%3 = icmp eq %struct.drand48_data* %0, null
br i1 %3, label %8, label %4
4: ; preds = %2
%5 = getelementptr inbounds %struct.drand48_data, %struct.drand48_data* %0, i64 0, i32 0
%6 = load i32, i32* %5
%7 = tail call i32 @jrand48_r(i32 %6, %struct.drand48_data* %0, i64* %1)
br label %8
8: ; preds = %2, %4
%9 = phi i32 [ %7, %4 ], [ -1, %2 ]
ret i32 %9
}
/* Variables and functions */
int /*<<< orphan*/ getcwd(char *, int);
int /*<<< orphan*/ printf(char *, char *);
int main() {
  char buf[512];
  getcwd(buf, 512);
  printf("%s\n", buf);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x200,%rsp
lea    -0x200(%rbp),%rdi
mov    $0x200,%esi
call   1040 <getcwd@plt>
lea    -0x200(%rbp),%rsi
lea    0xeb6(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x200,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x200,%rsp
mov    %rsp,%rbx
mov    %rbx,%rdi
mov    $0x200,%esi
call   1040 <getcwd@plt>
lea    0xec1(%rip),%rdi
mov    %rbx,%rsi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x200,%rsp
pop    %rbx
ret

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

LLVM IR (-O2):
@.str = [4 x i8] c"%s\0A\00"
define i32 @main() {
%1 = alloca [512 x i8]
%2 = getelementptr inbounds [512 x i8], [512 x i8]* %1, i64 0, i64 0
%3 = call i32 @getcwd(i8* %2, i32 512)
%4 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %2)
ret i32 0
}