xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
void imprimir_vetor(int vet[], int tam) {
  int i;
  for (i = 0; i < tam; i++) {
    printf(">>%d\n", vet[i]);
  }
}


x86 assembly (clang, -O0):
<imprimir_vetor>:
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    1157 <imprimir_vetor+0x47>
mov    -0x8(%rbp),%rax
movslq -0x10(%rbp),%rcx
mov    (%rax,%rcx,4),%esi
lea    0xebc(%rip),%rdi
call   1030 <printf@plt>
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    1126 <imprimir_vetor+0x16>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<imprimir_vetor>:
push   %r15
push   %r14
push   %r12
push   %rbx
push   %rax
test   %esi,%esi
jle    1145 <imprimir_vetor+0x35>
mov    %rdi,%r15
mov    %esi,%r12d
xor    %ebx,%ebx
lea    0xed5(%rip),%r14
nopl   0x0(%rax,%rax,1)
mov    (%r15,%rbx,4),%esi
mov    %r14,%rdi
call   1030 <printf@plt>
add    $0x1,%rbx
cmp    %rbx,%r12
jne    1130 <imprimir_vetor+0x20>
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
@.str = [6 x i8] c">>%d\0A\00"
define void @imprimir_vetor(i32* %0, i32 %1) {
%3 = alloca i32*
%4 = alloca i32
%5 = alloca i32
store i32* %0, i32** %3
store i32 %1, i32* %4
store i32 0, i32* %5
br label %6
6: ; preds = %17, %2
%7 = load i32, i32* %5
%8 = load i32, i32* %4
%9 = icmp slt i32 %7, %8
br i1 %9, label %10, label %20
10: ; preds = %6
%11 = load i32*, i32** %3
%12 = load i32, i32* %5
%13 = sext i32 %12 to i64
%14 = getelementptr inbounds i32, i32* %11, i64 %13
%15 = load i32, i32* %14
%16 = call i32 @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i32 %15)
br label %17
17: ; preds = %10
%18 = load i32, i32* %5
%19 = add nsw i32 %18, 1
store i32 %19, i32* %5
br label %6
20: ; preds = %6
ret void
}

LLVM IR (-O2):
@.str = [6 x i8] c">>%d\0A\00"
define void @imprimir_vetor(i32* nocapture %0, i32 %1) {
%3 = icmp sgt i32 %1, 0
br i1 %3, label %4, label %13
4: ; preds = %2
%5 = zext i32 %1 to i64
br label %6
6: ; preds = %4, %6
%7 = phi i64 [ 0, %4 ], [ %11, %6 ]
%8 = getelementptr inbounds i32, i32* %0, i64 %7
%9 = load i32, i32* %8
%10 = tail call i32 @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i32 %9)
%11 = add nuw nsw i64 %7, 1
%12 = icmp eq i64 %11, %5
br i1 %12, label %13, label %6
13: ; preds = %6, %2
ret void
}
/* Variables and functions */
int /*<<< orphan*/ go_left(int);
int /*<<< orphan*/ go_right(int);
void go_horiz(int n) {
  if (n > 0) {
    go_right(n);
  } else if (n < 0) {
    go_left(-n);
  }
}


x86 assembly (clang, -O0):
<go_horiz>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
cmpl   $0x0,-0x4(%rbp)
jle    1142 <go_horiz+0x22>
mov    -0x4(%rbp),%edi
call   1040 <go_right@plt>
jmp    115b <go_horiz+0x3b>
cmpl   $0x0,-0x4(%rbp)
jge    1156 <go_horiz+0x36>
xor    %edi,%edi
sub    -0x4(%rbp),%edi
call   1030 <go_left@plt>
jmp    115b <go_horiz+0x3b>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<go_horiz>:
test   %edi,%edi
jle    1129 <go_horiz+0x9>
jmp    1040 <go_right@plt>
js     112c <go_horiz+0xc>
ret
neg    %edi
jmp    1030 <go_left@plt>

LLVM IR (-O0):
define void @go_horiz(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = icmp sgt i32 %3, 0
br i1 %4, label %5, label %8
5: ; preds = %1
%6 = load i32, i32* %2
%7 = call i32 @go_right(i32 %6)
br label %16
8: ; preds = %1
%9 = load i32, i32* %2
%10 = icmp slt i32 %9, 0
br i1 %10, label %11, label %15
11: ; preds = %8
%12 = load i32, i32* %2
%13 = sub nsw i32 0, %12
%14 = call i32 @go_left(i32 %13)
br label %15
15: ; preds = %11, %8
br label %16
16: ; preds = %15, %5
ret void
}

LLVM IR (-O2):
define void @go_horiz(i32 %0) {
%2 = icmp sgt i32 %0, 0
br i1 %2, label %3, label %5
3: ; preds = %1
%4 = tail call i32 @go_right(i32 %0)
br label %10
5: ; preds = %1
%6 = icmp slt i32 %0, 0
br i1 %6, label %7, label %10
7: ; preds = %5
%8 = sub nsw i32 0, %0
%9 = tail call i32 @go_left(i32 %8)
br label %10
10: ; preds = %5, %7, %3
ret void
}
/* Variables and functions */
int /*<<< orphan*/ binaryOps();
int /*<<< orphan*/ comparisonOps();
int /*<<< orphan*/ testBranching();
int /*<<< orphan*/ testParameterPassing();
int /*<<< orphan*/ unaryOps();
int main() {
  unaryOps();
  binaryOps();
  comparisonOps();
  testBranching();
  testParameterPassing();
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x0,%al
call   1030 <unaryOps@plt>
mov    $0x0,%al
call   1060 <binaryOps@plt>
mov    $0x0,%al
call   1040 <comparisonOps@plt>
mov    $0x0,%al
call   1050 <testBranching@plt>
mov    $0x0,%al
call   1070 <testParameterPassing@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1030 <unaryOps@plt>
xor    %eax,%eax
call   1060 <binaryOps@plt>
xor    %eax,%eax
call   1040 <comparisonOps@plt>
xor    %eax,%eax
call   1050 <testBranching@plt>
xor    %eax,%eax
call   1070 <testParameterPassing@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 (...) @unaryOps()
%3 = call i32 (...) @binaryOps()
%4 = call i32 (...) @comparisonOps()
%5 = call i32 (...) @testBranching()
%6 = call i32 (...) @testParameterPassing()
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @unaryOps()
%2 = tail call i32 (...) @binaryOps()
%3 = tail call i32 (...) @comparisonOps()
%4 = tail call i32 (...) @testBranching()
%5 = tail call i32 (...) @testParameterPassing()
ret i32 0
}
/* Type definitions */
struct sched_param {
  int /*<<< orphan*/ sched_priority;
};
typedef int /*<<< orphan*/ sched;

/* Variables and functions */
int /*<<< orphan*/ SCHED_FIFO;
int /*<<< orphan*/ memset(struct sched_param *, int /*<<< orphan*/, int);
int /*<<< orphan*/ sched_get_priority_max(int /*<<< orphan*/);
int /*<<< orphan*/ sched_setscheduler(int /*<<< orphan*/, int /*<<< orphan*/,
                                      struct sched_param *);
void gpio_max_priority(void) {
  struct sched_param sched;
  memset(&sched, 0, sizeof(sched));
  sched.sched_priority = sched_get_priority_max(SCHED_FIFO);
  sched_setscheduler(0, SCHED_FIFO, &sched);
}


x86 assembly (clang, -O0):
<gpio_max_priority>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    -0x8(%rbp),%rdi
xor    %esi,%esi
mov    $0x4,%edx
call   1040 <memset@plt>
mov    0x2e99(%rip),%rax
mov    (%rax),%edi
call   1050 <sched_get_priority_max@plt>
mov    %eax,-0x8(%rbp)
mov    0x2e88(%rip),%rax
mov    (%rax),%esi
xor    %edi,%edi
lea    -0x8(%rbp),%rdx
call   1030 <sched_setscheduler@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<gpio_max_priority>:
push   %r14
push   %rbx
push   %rax
mov    %rsp,%r14
mov    %r14,%rdi
xor    %esi,%esi
mov    $0x4,%edx
call   1040 <memset@plt>
mov    0x2e9b(%rip),%rbx
mov    (%rbx),%edi
call   1050 <sched_get_priority_max@plt>
mov    %eax,(%rsp)
mov    (%rbx),%esi
xor    %edi,%edi
mov    %r14,%rdx
call   1030 <sched_setscheduler@plt>
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
%struct.sched_param = type { i32 }
@SCHED_FIFO = global i32 0
define void @gpio_max_priority() {
%1 = alloca %struct.sched_param
%2 = call i32 @memset(%struct.sched_param* %1, i32 0, i32 4)
%3 = load i32, i32* @SCHED_FIFO
%4 = call i32 @sched_get_priority_max(i32 %3)
%5 = getelementptr inbounds %struct.sched_param, %struct.sched_param* %1, i32 0, i32 0
store i32 %4, i32* %5
%6 = load i32, i32* @SCHED_FIFO
%7 = call i32 @sched_setscheduler(i32 0, i32 %6, %struct.sched_param* %1)
ret void
}

LLVM IR (-O2):
%struct.sched_param = type { i32 }
@SCHED_FIFO = global i32 0
define void @gpio_max_priority() {
%1 = alloca %struct.sched_param
%2 = bitcast %struct.sched_param* %1 to i8*
%3 = call i32 @memset(%struct.sched_param* %1, i32 0, i32 4)
%4 = load i32, i32* @SCHED_FIFO
%5 = call i32 @sched_get_priority_max(i32 %4)
%6 = getelementptr inbounds %struct.sched_param, %struct.sched_param* %1, i64 0, i32 0
store i32 %5, i32* %6
%7 = load i32, i32* @SCHED_FIFO
%8 = call i32 @sched_setscheduler(i32 0, i32 %7, %struct.sched_param* %1)
ret void
}
void ff_hevc_put_hevc_uni_qpel_h12_8_sse4() {}


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

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

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

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

/* Variables and functions */
int8_t mcnet_read_bool(uint8_t *in) { return (*((int8_t *)(in)) == 0) ? 0 : 1; }


x86 assembly (clang, -O0):
<mcnet_read_bool>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%rdx
mov    $0x1,%eax
xor    %ecx,%ecx
cmp    $0x0,%rdx
cmove  %ecx,%eax
cltq
pop    %rbp
ret

x86 assembly (clang, -O2):
<mcnet_read_bool>:
xor    %eax,%eax
cmpq   $0x0,(%rdi)
setne  %al
ret

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

LLVM IR (-O2):
define i64 @mcnet_read_bool(i32* nocapture %0) {
%2 = bitcast i32* %0 to i64*
%3 = load i64, i64* %2
%4 = icmp ne i64 %3, 0
%5 = zext i1 %4 to i64
ret i64 %5
}
/* Variables and functions */
int /*<<< orphan*/ strcpy(unsigned char *, char *);
int strlen(char *);
unsigned char *put_string(unsigned char *buffer, char *mystring) {
  strcpy(buffer, mystring);
  return buffer + strlen(mystring) + 1;
}


x86 assembly (clang, -O0):
<put_string>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1030 <strcpy@plt>
mov    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x10(%rbp),%rdi
call   1040 <strlen@plt>
mov    %eax,%ecx
mov    -0x18(%rbp),%rax
movslq %ecx,%rcx
add    %rcx,%rax
add    $0x1,%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<put_string>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%rbx
mov    %rdi,%r14
call   1030 <strcpy@plt>
mov    %rbx,%rdi
call   1040 <strlen@plt>
cltq
add    %r14,%rax
add    $0x1,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define i8* @put_string(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 i32 @strcpy(i8* %5, i8* %6)
%8 = load i8*, i8** %3
%9 = load i8*, i8** %4
%10 = call i32 @strlen(i8* %9)
%11 = sext i32 %10 to i64
%12 = getelementptr inbounds i8, i8* %8, i64 %11
%13 = getelementptr inbounds i8, i8* %12, i64 1
ret i8* %13
}

LLVM IR (-O2):
define i8* @put_string(i8* %0, i8* %1) {
%3 = tail call i32 @strcpy(i8* %0, i8* %1)
%4 = tail call i32 @strlen(i8* %1)
%5 = sext i32 %4 to i64
%6 = getelementptr inbounds i8, i8* %0, i64 %5
%7 = getelementptr inbounds i8, i8* %6, i64 1
ret i8* %7
}
/* Type definitions */
typedef int /*<<< orphan*/ uint16_t;

/* Variables and functions */
int /*<<< orphan*/ htons(int /*<<< orphan*/);
void ahtons(uint16_t *t, int len) {
  int pos = len - 1;
  while (pos >= 0) {
    t[pos] = htons(t[pos]);
    pos--;
  }
}


x86 assembly (clang, -O0):
<ahtons>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0xc(%rbp),%eax
sub    $0x1,%eax
mov    %eax,-0x10(%rbp)
cmpl   $0x0,-0x10(%rbp)
jl     115d <ahtons+0x4d>
mov    -0x8(%rbp),%rax
movslq -0x10(%rbp),%rcx
mov    (%rax,%rcx,4),%edi
call   1030 <htons@plt>
mov    %eax,%edx
mov    -0x8(%rbp),%rax
movslq -0x10(%rbp),%rcx
mov    %edx,(%rax,%rcx,4)
mov    -0x10(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0x10(%rbp)
jmp    1128 <ahtons+0x18>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ahtons>:
push   %r15
push   %r14
push   %rbx
test   %esi,%esi
jle    114b <ahtons+0x3b>
mov    %rdi,%r14
mov    %esi,%ebx
add    $0x1,%rbx
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
lea    -0x2(%rbx),%r15d
mov    (%r14,%r15,4),%edi
call   1030 <htons@plt>
mov    %eax,(%r14,%r15,4)
add    $0xffffffffffffffff,%rbx
cmp    $0x1,%rbx
ja     1130 <ahtons+0x20>
pop    %rbx
pop    %r14
pop    %r15
ret

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

LLVM IR (-O2):
define void @ahtons(i32* nocapture %0, i32 %1) {
%3 = icmp sgt i32 %1, 0
br i1 %3, label %4, label %14
4: ; preds = %2
%5 = zext i32 %1 to i64
br label %6
6: ; preds = %4, %6
%7 = phi i64 [ %5, %4 ], [ %8, %6 ]
%8 = add nsw i64 %7, -1
%9 = and i64 %8, 4294967295
%10 = getelementptr inbounds i32, i32* %0, i64 %9
%11 = load i32, i32* %10
%12 = tail call i32 @htons(i32 %11)
store i32 %12, i32* %10
%13 = icmp ugt i64 %7, 1
br i1 %13, label %6, label %14
14: ; preds = %6, %2
ret void
}
/* Variables and functions */
int /*<<< orphan*/ run_short_tests(int);
int /*<<< orphan*/ sleep(int);
void run_long_tests(unsigned int mins) {
  unsigned int i;
  unsigned int secs = mins * 60;
  for (i = 0; i < secs; i++) {
    run_short_tests(1000);
    sleep(1);
  }
}


x86 assembly (clang, -O0):
<run_long_tests>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
imul   $0x3c,-0x4(%rbp),%eax
mov    %eax,-0xc(%rbp)
movl   $0x0,-0x8(%rbp)
mov    -0x8(%rbp),%eax
cmp    -0xc(%rbp),%eax
jae    1167 <run_long_tests+0x47>
mov    $0x3e8,%edi
call   1030 <run_short_tests@plt>
mov    $0x1,%edi
call   1040 <sleep@plt>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1139 <run_long_tests+0x19>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<run_long_tests>:
push   %rbx
imul   $0x3c,%edi,%ebx
test   %ebx,%ebx
je     1149 <run_long_tests+0x29>
nopl   0x0(%rax,%rax,1)
mov    $0x3e8,%edi
call   1030 <run_short_tests@plt>
mov    $0x1,%edi
call   1040 <sleep@plt>
add    $0xffffffff,%ebx
jne    1130 <run_long_tests+0x10>
pop    %rbx
ret

LLVM IR (-O0):
define void @run_long_tests(i32 %0) {
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %2
%5 = load i32, i32* %2
%6 = mul i32 %5, 60
store i32 %6, i32* %4
store i32 0, i32* %3
br label %7
7: ; preds = %14, %1
%8 = load i32, i32* %3
%9 = load i32, i32* %4
%10 = icmp ult i32 %8, %9
br i1 %10, label %11, label %17
11: ; preds = %7
%12 = call i32 @run_short_tests(i32 1000)
%13 = call i32 @sleep(i32 1)
br label %14
14: ; preds = %11
%15 = load i32, i32* %3
%16 = add i32 %15, 1
store i32 %16, i32* %3
br label %7
17: ; preds = %7
ret void
}

LLVM IR (-O2):
define void @run_long_tests(i32 %0) {
%2 = mul i32 %0, 60
%3 = icmp eq i32 %2, 0
br i1 %3, label %10, label %4
4: ; preds = %1, %4
%5 = phi i32 [ %8, %4 ], [ 0, %1 ]
%6 = tail call i32 @run_short_tests(i32 1000)
%7 = tail call i32 @sleep(i32 1)
%8 = add nuw i32 %5, 1
%9 = icmp eq i32 %8, %2
br i1 %9, label %10, label %4
10: ; preds = %4, %1
ret void
}
int _sbrk(int incr) { return -1; }


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

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

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

LLVM IR (-O2):
define i32 @_sbrk(i32 %0) {
ret i32 -1
}
const char *skipstring(const char *s) {
  while (*s++)
    ;
  return s;
}


x86 assembly (clang, -O0):
<skipstring>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x8(%rbp)
cmpb   $0x0,(%rax)
je     1125 <skipstring+0x25>
jmp    1108 <skipstring+0x8>
mov    -0x8(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<skipstring>:
mov    %rdi,%rax
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
cmpb   $0x0,(%rax)
lea    0x1(%rax),%rax
jne    1110 <skipstring+0x10>
ret

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

LLVM IR (-O2):
define i8* @skipstring(i8* %0) {
br label %2
2: ; preds = %2, %1
%3 = phi i8* [ %0, %1 ], [ %4, %2 ]
%4 = getelementptr inbounds i8, i8* %3, i64 1
%5 = load i8, i8* %3
%6 = icmp eq i8 %5, 0
br i1 %6, label %7, label %2
7: ; preds = %2
ret i8* %4
}
/* Variables and functions */
int getchar();
int /*<<< orphan*/ printf(char *, int);
main(void) {
  int c;
  int nc = 0;
  while ((c = getchar()) != '\n') {
    nc++;
  }
  printf("número de caracteres: %d\n", nc);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0xc(%rbp)
mov    $0x0,%al
call   1040 <getchar@plt>
mov    %eax,-0x8(%rbp)
cmp    $0xa,%eax
je     1157 <main+0x37>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1136 <main+0x16>
mov    -0xc(%rbp),%esi
lea    0xe9f(%rip),%rdi
call   1030 <printf@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
mov    $0xffffffff,%ebx
cs nopw 0x0(%rax,%rax,1)
xor    %eax,%eax
call   1040 <getchar@plt>
add    $0x1,%ebx
cmp    $0xa,%eax
jne    1130 <main+0x10>
lea    0xeba(%rip),%rdi
mov    %ebx,%esi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [27 x i8] c"n\C3\BAmero de caracteres: %d\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
store i32 0, i32* %1
store i32 0, i32* %3
br label %4
4: ; preds = %7, %0
%5 = call i32 (...) @getchar()
store i32 %5, i32* %2
%6 = icmp ne i32 %5, 10
br i1 %6, label %7, label %10
7: ; preds = %4
%8 = load i32, i32* %3
%9 = add nsw i32 %8, 1
store i32 %9, i32* %3
br label %4
10: ; preds = %4
%11 = load i32, i32* %3
%12 = call i32 @printf(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str, i64 0, i64 0), i32 %11)
%13 = load i32, i32* %1
ret i32 %13
}

LLVM IR (-O2):
@.str = [27 x i8] c"n\C3\BAmero de caracteres: %d\0A\00"
define i32 @main() {
br label %1
1: ; preds = %1, %0
%2 = phi i32 [ 0, %0 ], [ %5, %1 ]
%3 = tail call i32 (...) @getchar()
%4 = icmp eq i32 %3, 10
%5 = add nuw nsw i32 %2, 1
br i1 %4, label %6, label %1
6: ; preds = %1
%7 = tail call i32 @printf(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str, i64 0, i64 0), i32 %2)
ret i32 0
}
int musbgm_fade(int no, int time, int vol) {
  printf("%s not implemented\n", __func__);
  return (-1);
}


x86 assembly (clang, -O0):
<musbgm_fade>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
lea    0xed8(%rip),%rdi
lea    0xee5(%rip),%rsi
mov    $0x0,%al
call   1030 <printf@plt>
mov    $0xffffffff,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<musbgm_fade>:
push   %rax
lea    0xee8(%rip),%rdi
lea    0xef5(%rip),%rsi
xor    %eax,%eax
call   1030 <printf@plt>
mov    $0xffffffff,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [20 x i8] c"%s not implemented\0A\00"
@__func__.musbgm_fade = [12 x i8] c"musbgm_fade\00"
define i32 @musbgm_fade(i32 %0, i32 %1, i32 %2) {
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
store i32 %0, i32* %4
store i32 %1, i32* %5
store i32 %2, i32* %6
%7 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([12 x i8], [12 x i8]* @__func__.musbgm_fade, i64 0, i64 0))
ret i32 -1
}

LLVM IR (-O2):
@.str = [20 x i8] c"%s not implemented\0A\00"
@__func__.musbgm_fade = [12 x i8] c"musbgm_fade\00"
define i32 @musbgm_fade(i32 %0, i32 %1, i32 %2) {
%4 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([12 x i8], [12 x i8]* @__func__.musbgm_fade, i64 0, i64 0))
ret i32 -1
}
void uDMAChannelDisable(unsigned long ulChannelNum) {
  ;
  (*((volatile unsigned long *)(0x400FF02C))) = 1 << (ulChannelNum & 0x1f);
}


x86 assembly (clang, -O0):
<uDMAChannelDisable>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
and    $0x1f,%rax
mov    %eax,%ecx
mov    $0x1,%eax
shl    %cl,%eax
movslq %eax,%rcx
mov    $0x400ff02c,%eax
mov    %rcx,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<uDMAChannelDisable>:
mov    %rdi,%rcx
mov    $0x1,%eax
shl    %cl,%eax
cltq
mov    %rax,0x400ff02c
40
ret

LLVM IR (-O0):
define void @uDMAChannelDisable(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = load i64, i64* %2
%4 = and i64 %3, 31
%5 = trunc i64 %4 to i32
%6 = shl i32 1, %5
%7 = sext i32 %6 to i64
store volatile i64 %7, i64* inttoptr (i64 1074786348 to i64*)
ret void
}

LLVM IR (-O2):
define void @uDMAChannelDisable(i64 %0) {
%2 = trunc i64 %0 to i32
%3 = and i32 %2, 31
%4 = shl nuw i32 1, %3
%5 = sext i32 %4 to i64
store volatile i64 %5, i64* inttoptr (i64 1074786348 to i64*)
ret void
}
void __attribute__((weak)) comp_isr() { debug_handler(__FUNCTION__); }


x86 assembly (clang, -O0):
<comp_isr>:
push   %rbp
mov    %rsp,%rbp
lea    0xee5(%rip),%rdi
mov    $0x0,%al
call   1030 <debug_handler@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<comp_isr>:
lea    0xee9(%rip),%rdi
xor    %eax,%eax
jmp    1030 <debug_handler@plt>

LLVM IR (-O0):
@__FUNCTION__.comp_isr = [9 x i8] c"comp_isr\00"
define weak void @comp_isr() {
%1 = call i32 (i8*, ...) bitcast (i32 (...)* @debug_handler to i32 (i8*, ...)*)(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @__FUNCTION__.comp_isr, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@__FUNCTION__.comp_isr = [9 x i8] c"comp_isr\00"
define weak void @comp_isr() {
%1 = tail call i32 (i8*, ...) bitcast (i32 (...)* @debug_handler to i32 (i8*, ...)*)(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @__FUNCTION__.comp_isr, i64 0, i64 0))
ret void
}
/* Variables and functions */
int __VERIFIER_nondet_int();
int main() {
  int i = __VERIFIER_nondet_int();
  int j = __VERIFIER_nondet_int();
  while (i < 5) {
    j = 0;
    while (i > 2 && j <= 9)
      j++;
    i++;
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x0,%al
call   1030 <__VERIFIER_nondet_int@plt>
mov    %eax,-0x8(%rbp)
mov    $0x0,%al
call   1030 <__VERIFIER_nondet_int@plt>
mov    %eax,-0xc(%rbp)
cmpl   $0x5,-0x8(%rbp)
jge    1189 <main+0x79>
movl   $0x0,-0xc(%rbp)
xor    %eax,%eax
cmpl   $0x2,-0x8(%rbp)
mov    %al,-0xd(%rbp)
jle    115d <main+0x4d>
cmpl   $0x9,-0xc(%rbp)
setle  %al
mov    %al,-0xd(%rbp)
mov    -0xd(%rbp),%al
test   $0x1,%al
jne    116d <main+0x5d>
jmp    117b <main+0x6b>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1144 <main+0x34>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1133 <main+0x23>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
store i32 0, i32* %1
%4 = call i32 (...) @__VERIFIER_nondet_int()
store i32 %4, i32* %2
%5 = call i32 (...) @__VERIFIER_nondet_int()
store i32 %5, i32* %3
br label %6
6: ; preds = %21, %0
%7 = load i32, i32* %2
%8 = icmp slt i32 %7, 5
br i1 %8, label %9, label %24
9: ; preds = %6
store i32 0, i32* %3
br label %10
10: ; preds = %18, %9
%11 = load i32, i32* %2
%12 = icmp sgt i32 %11, 2
br i1 %12, label %13, label %16
13: ; preds = %10
%14 = load i32, i32* %3
%15 = icmp sle i32 %14, 9
br label %16
16: ; preds = %13, %10
%17 = phi i1 [ false, %10 ], [ %15, %13 ]
br i1 %17, label %18, label %21
18: ; preds = %16
%19 = load i32, i32* %3
%20 = add nsw i32 %19, 1
store i32 %20, i32* %3
br label %10
21: ; preds = %16
%22 = load i32, i32* %2
%23 = add nsw i32 %22, 1
store i32 %23, i32* %2
br label %6
24: ; preds = %6
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @__VERIFIER_nondet_int()
%2 = tail call i32 (...) @__VERIFIER_nondet_int()
ret i32 0
}
double prv_process_fpa_sub_real64(double a, double b) { return a - b; }


x86 assembly (clang, -O0):
<prv_process_fpa_sub_real64>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  -0x8(%rbp),%xmm0
subsd  -0x10(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<prv_process_fpa_sub_real64>:
subsd  %xmm1,%xmm0
ret

LLVM IR (-O0):
define double @prv_process_fpa_sub_real64(double %0, double %1) {
%3 = alloca double
%4 = alloca double
store double %0, double* %3
store double %1, double* %4
%5 = load double, double* %3
%6 = load double, double* %4
%7 = fsub double %5, %6
ret double %7
}

LLVM IR (-O2):
define double @prv_process_fpa_sub_real64(double %0, double %1) {
%3 = fsub double %0, %1
ret double %3
}
int fun1013() { return 1013; }


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

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

LLVM IR (-O0):
define i32 @fun1013() {
ret i32 1013
}

LLVM IR (-O2):
define i32 @fun1013() {
ret i32 1013
}
/* Variables and functions */
int /*<<< orphan*/ strspn(char *, char *);
void uninitvar_strspn(void) {
  char *cs;
  char *ct;
  (void)strspn(cs, ct);
}


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

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

LLVM IR (-O0):
define void @uninitvar_strspn() {
%1 = alloca i8*
%2 = alloca i8*
%3 = load i8*, i8** %1
%4 = load i8*, i8** %2
%5 = call i32 @strspn(i8* %3, i8* %4)
ret void
}

LLVM IR (-O2):
define void @uninitvar_strspn() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ sscanf(char *, char *, unsigned long *);
unsigned long js_read_u_escaped(char **s) {
  unsigned long p;
  if (**s == '\\')
    *s += 2;
  sscanf(*s, "%4lx", &p);
  *s += 4;
  return p;
}


x86 assembly (clang, -O0):
<js_read_u_escaped>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%rax
movsbl (%rax),%eax
cmp    $0x5c,%eax
jne    113d <js_read_u_escaped+0x2d>
mov    -0x8(%rbp),%rax
mov    (%rax),%rcx
add    $0x2,%rcx
mov    %rcx,(%rax)
mov    -0x8(%rbp),%rax
mov    (%rax),%rdi
lea    0xeb5(%rip),%rsi
lea    -0x10(%rbp),%rdx
call   1030 <sscanf@plt>
mov    -0x8(%rbp),%rax
mov    (%rax),%rcx
add    $0x4,%rcx
mov    %rcx,(%rax)
mov    -0x10(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<js_read_u_escaped>:
push   %rbx
sub    $0x10,%rsp
mov    %rdi,%rbx
mov    (%rdi),%rdi
cmpb   $0x5c,(%rdi)
jne    1127 <js_read_u_escaped+0x17>
add    $0x2,%rdi
mov    %rdi,(%rbx)
lea    0xed2(%rip),%rsi
lea    0x8(%rsp),%rdx
call   1030 <sscanf@plt>
addq   $0x4,(%rbx)
mov    0x8(%rsp),%rax
add    $0x10,%rsp
pop    %rbx
ret

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

LLVM IR (-O2):
@.str = [5 x i8] c"%4lx\00"
define i64 @js_read_u_escaped(i8** nocapture %0) {
%2 = alloca i64
%3 = bitcast i64* %2 to i8*
%4 = load i8*, i8** %0
%5 = load i8, i8* %4
%6 = icmp eq i8 %5, 92
br i1 %6, label %7, label %9
7: ; preds = %1
%8 = getelementptr inbounds i8, i8* %4, i64 2
store i8* %8, i8** %0
br label %9
9: ; preds = %7, %1
%10 = phi i8* [ %8, %7 ], [ %4, %1 ]
%11 = call i32 @sscanf(i8* %10, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i64* %2)
%12 = load i8*, i8** %0
%13 = getelementptr inbounds i8, i8* %12, i64 4
store i8* %13, i8** %0
%14 = load i64, i64* %2
ret i64 %14
}
/* Variables and functions */
int getpid();
int /*<<< orphan*/ wait(int *);
parent() {
  int n;
  n = getpid();
  wait(&n);
}


x86 assembly (clang, -O0):
<parent>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1030 <getpid@plt>
mov    %eax,-0x8(%rbp)
lea    -0x8(%rbp),%rdi
call   1040 <wait@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<parent>:
push   %rax
xor    %eax,%eax
call   1030 <getpid@plt>
mov    %eax,0x4(%rsp)
lea    0x4(%rsp),%rdi
call   1040 <wait@plt>
pop    %rcx
ret

LLVM IR (-O0):
define i32 @parent() {
%1 = alloca i32
%2 = alloca i32
%3 = call i32 (...) @getpid()
store i32 %3, i32* %2
%4 = call i32 @wait(i32* %2)
%5 = load i32, i32* %1
ret i32 %5
}

LLVM IR (-O2):
define i32 @parent() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
%3 = tail call i32 (...) @getpid()
store i32 %3, i32* %1
%4 = call i32 @wait(i32* %1)
ret i32 undef
}
long long sszu() { return 0xffffffff00007fffLL; }


x86 assembly (clang, -O0):
<sszu>:
push   %rbp
mov    %rsp,%rbp
movabs $0xffffffff00007fff,%rax
ff ff ff
pop    %rbp
ret

x86 assembly (clang, -O2):
<sszu>:
movabs $0xffffffff00007fff,%rax
ff ff ff
ret

LLVM IR (-O0):
define i64 @sszu() {
ret i64 -4294934529
}

LLVM IR (-O2):
define i64 @sszu() {
ret i64 -4294934529
}
/* Variables and functions */
float M_PI;
float lw6sys_math_rad2deg(float rad) { return rad * 180.0f / M_PI; }


x86 assembly (clang, -O0):
<lw6sys_math_rad2deg>:
push   %rbp
mov    %rsp,%rbp
movss  %xmm0,-0x4(%rbp)
movss  0xeef(%rip),%xmm0
mulss  -0x4(%rbp),%xmm0
mov    0x2ecb(%rip),%rax
divss  (%rax),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<lw6sys_math_rad2deg>:
mulss  0xef8(%rip),%xmm0
mov    0x2ed9(%rip),%rax
divss  (%rax),%xmm0
ret

LLVM IR (-O0):
@M_PI = global float 0.000000e+00
define float @lw6sys_math_rad2deg(float %0) {
%2 = alloca float
store float %0, float* %2
%3 = load float, float* %2
%4 = fmul float %3, 1.800000e+02
%5 = load float, float* @M_PI
%6 = fdiv float %4, %5
ret float %6
}

LLVM IR (-O2):
@M_PI = global float 0.000000e+00
define float @lw6sys_math_rad2deg(float %0) {
%2 = fmul float %0, 1.800000e+02
%3 = load float, float* @M_PI
%4 = fdiv float %2, %3
ret float %4
}
/* Variables and functions */
char *strrchr(char const *, char);
const char *filename(const char *path) {
  const char *p = strrchr(path, '/');
  if (p == NULL)
    return path;
  return ++p;
}


x86 assembly (clang, -O0):
<filename>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
mov    $0x2f,%esi
call   1030 <strrchr@plt>
mov    %rax,-0x18(%rbp)
cmpq   $0x0,-0x18(%rbp)
jne    1146 <filename+0x36>
mov    -0x10(%rbp),%rax
mov    %rax,-0x8(%rbp)
jmp    1156 <filename+0x46>
mov    -0x18(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x18(%rbp)
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<filename>:
push   %rbx
mov    %rdi,%rbx
mov    $0x2f,%esi
call   1030 <strrchr@plt>
lea    0x1(%rax),%rcx
test   %rax,%rax
cmove  %rbx,%rcx
mov    %rcx,%rax
pop    %rbx
ret

LLVM IR (-O0):
define i8* @filename(i8* %0) {
%2 = alloca i8*
%3 = alloca i8*
%4 = alloca i8*
store i8* %0, i8** %3
%5 = load i8*, i8** %3
%6 = call i8* @strrchr(i8* %5, i8 signext 47)
store i8* %6, i8** %4
%7 = load i8*, i8** %4
%8 = icmp eq i8* %7, null
br i1 %8, label %9, label %11
9: ; preds = %1
%10 = load i8*, i8** %3
store i8* %10, i8** %2
br label %14
11: ; preds = %1
%12 = load i8*, i8** %4
%13 = getelementptr inbounds i8, i8* %12, i32 1
store i8* %13, i8** %4
store i8* %13, i8** %2
br label %14
14: ; preds = %11, %9
%15 = load i8*, i8** %2
ret i8* %15
}

LLVM IR (-O2):
define i8* @filename(i8* %0) {
%2 = tail call i8* @strrchr(i8* dereferenceable(1) %0, i8 signext 47)
%3 = icmp eq i8* %2, null
%4 = getelementptr inbounds i8, i8* %2, i64 1
%5 = select i1 %3, i8* %0, i8* %4
ret i8* %5
}
/* Type definitions */
struct pattern {
  int dummy;
};

/* Variables and functions */
int countlib(int);
int offset(int /*<<< orphan*/, int, int, int);
int autohelperowl_attackpat112(struct pattern *patt, int transformation,
                               int move, int color, int action) {
  int a;
  (void)patt;
  (void)color;
  (void)action;
  a = offset(0, 3, move, transformation);
  return countlib(a) > 1;
}


x86 assembly (clang, -O0):
<autohelperowl_attackpat112>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    %ecx,-0x14(%rbp)
mov    %r8d,-0x18(%rbp)
mov    -0x10(%rbp),%edx
mov    -0xc(%rbp),%ecx
xor    %edi,%edi
mov    $0x3,%esi
call   1030 <offset@plt>
mov    %eax,-0x1c(%rbp)
mov    -0x1c(%rbp),%edi
call   1040 <countlib@plt>
cmp    $0x1,%eax
setg   %al
and    $0x1,%al
movzbl %al,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<autohelperowl_attackpat112>:
push   %rax
mov    %esi,%ecx
xor    %edi,%edi
mov    $0x3,%esi
call   1030 <offset@plt>
mov    %eax,%edi
call   1040 <countlib@plt>
xor    %ecx,%ecx
cmp    $0x2,%eax
setge  %cl
mov    %ecx,%eax
pop    %rcx
ret

LLVM IR (-O0):
%struct.pattern = type { i32 }
define i32 @autohelperowl_attackpat112(%struct.pattern* %0, i32 %1, i32 %2, i32 %3, i32 %4) {
%6 = alloca %struct.pattern*
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32
%10 = alloca i32
%11 = alloca i32
store %struct.pattern* %0, %struct.pattern** %6
store i32 %1, i32* %7
store i32 %2, i32* %8
store i32 %3, i32* %9
store i32 %4, i32* %10
%12 = load %struct.pattern*, %struct.pattern** %6
%13 = load i32, i32* %9
%14 = load i32, i32* %10
%15 = load i32, i32* %8
%16 = load i32, i32* %7
%17 = call i32 @offset(i32 0, i32 3, i32 %15, i32 %16)
store i32 %17, i32* %11
%18 = load i32, i32* %11
%19 = call i32 @countlib(i32 %18)
%20 = icmp sgt i32 %19, 1
%21 = zext i1 %20 to i32
ret i32 %21
}

LLVM IR (-O2):
%struct.pattern = type { i32 }
define i32 @autohelperowl_attackpat112(%struct.pattern* nocapture readnone %0, i32 %1, i32 %2, i32 %3, i32 %4) {
%6 = tail call i32 @offset(i32 0, i32 3, i32 %2, i32 %1)
%7 = tail call i32 @countlib(i32 %6)
%8 = icmp sgt i32 %7, 1
%9 = zext i1 %8 to i32
ret i32 %9
}
/* Variables and functions */
int /*<<< orphan*/ fill_prefetch_1(int);
int /*<<< orphan*/ irc2ir();
void fill_prefetch_full(void) {
  fill_prefetch_1(0);
  irc2ir();
  fill_prefetch_1(2);
}


x86 assembly (clang, -O0):
<fill_prefetch_full>:
push   %rbp
mov    %rsp,%rbp
xor    %edi,%edi
call   1030 <fill_prefetch_1@plt>
mov    $0x0,%al
call   1040 <irc2ir@plt>
mov    $0x2,%edi
call   1030 <fill_prefetch_1@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<fill_prefetch_full>:
push   %rax
xor    %edi,%edi
call   1030 <fill_prefetch_1@plt>
xor    %eax,%eax
call   1040 <irc2ir@plt>
mov    $0x2,%edi
pop    %rax
jmp    1030 <fill_prefetch_1@plt>

LLVM IR (-O0):
define void @fill_prefetch_full() {
%1 = call i32 @fill_prefetch_1(i32 0)
%2 = call i32 (...) @irc2ir()
%3 = call i32 @fill_prefetch_1(i32 2)
ret void
}

LLVM IR (-O2):
define void @fill_prefetch_full() {
%1 = tail call i32 @fill_prefetch_1(i32 0)
%2 = tail call i32 (...) @irc2ir()
%3 = tail call i32 @fill_prefetch_1(i32 2)
ret void
}
/* Variables and functions */
int maximum(int const **, int, int);
int /*<<< orphan*/ printf(char *, int);
void menuMaximum(const int grades[][4], int pupils, int tests) {
  printf("\n\nHighest grade: %d\n", maximum(grades, pupils, tests));
}


x86 assembly (clang, -O0):
<menuMaximum>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
mov    -0x10(%rbp),%edx
call   1030 <maximum@plt>
mov    %eax,%esi
lea    0xeb6(%rip),%rdi
call   1040 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<menuMaximum>:
push   %rax
call   1030 <maximum@plt>
lea    0xed3(%rip),%rdi
mov    %eax,%esi
pop    %rax
jmp    1040 <printf@plt>

LLVM IR (-O0):
@.str = [21 x i8] c"\0A\0AHighest grade: %d\0A\00"
define void @menuMaximum([4 x i32]* %0, i32 %1, i32 %2) {
%4 = alloca [4 x i32]*
%5 = alloca i32
%6 = alloca i32
store [4 x i32]* %0, [4 x i32]** %4
store i32 %1, i32* %5
store i32 %2, i32* %6
%7 = load [4 x i32]*, [4 x i32]** %4
%8 = bitcast [4 x i32]* %7 to i32**
%9 = load i32, i32* %5
%10 = load i32, i32* %6
%11 = call i32 @maximum(i32** %8, i32 %9, i32 %10)
%12 = call i32 @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str, i64 0, i64 0), i32 %11)
ret void
}

LLVM IR (-O2):
@.str = [21 x i8] c"\0A\0AHighest grade: %d\0A\00"
define void @menuMaximum([4 x i32]* %0, i32 %1, i32 %2) {
%4 = bitcast [4 x i32]* %0 to i32**
%5 = tail call i32 @maximum(i32** %4, i32 %1, i32 %2)
%6 = tail call i32 @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str, i64 0, i64 0), i32 %5)
ret void
}
char *Q_strlwr(char *s1) {
  char *s;
  for (s = s1; *s; ++s) {
    if (('A' <= *s) && (*s <= 'Z')) {
      *s -= 'A' - 'a';
    }
  }
  return s1;
}


x86 assembly (clang, -O0):
<Q_strlwr>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
cmpb   $0x0,(%rax)
je     1163 <Q_strlwr+0x63>
mov    -0x10(%rbp),%rax
movsbl (%rax),%ecx
mov    $0x41,%eax
cmp    %ecx,%eax
jg     114d <Q_strlwr+0x4d>
mov    -0x10(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x5a,%eax
jg     114d <Q_strlwr+0x4d>
mov    -0x10(%rbp),%rax
movsbl (%rax),%ecx
sub    $0xffffffe0,%ecx
mov    %cl,(%rax)
jmp    1152 <Q_strlwr+0x52>
mov    -0x10(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x10(%rbp)
jmp    1110 <Q_strlwr+0x10>
mov    -0x8(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<Q_strlwr>:
mov    %rdi,%rax
mov    (%rdi),%cl
test   %cl,%cl
je     112c <Q_strlwr+0x2c>
lea    0x1(%rax),%rdx
jmp    111b <Q_strlwr+0x1b>
nop
movzbl (%rdx),%ecx
add    $0x1,%rdx
test   %cl,%cl
je     112c <Q_strlwr+0x2c>
lea    -0x41(%rcx),%esi
cmp    $0x19,%sil
ja     1110 <Q_strlwr+0x10>
add    $0x20,%cl
mov    %cl,-0x1(%rdx)
jmp    1110 <Q_strlwr+0x10>
ret

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

LLVM IR (-O2):
define i8* @Q_strlwr(i8* returned %0) {
%2 = load i8, i8* %0
%3 = icmp eq i8 %2, 0
br i1 %3, label %15, label %4
4: ; preds = %1, %11
%5 = phi i8 [ %13, %11 ], [ %2, %1 ]
%6 = phi i8* [ %12, %11 ], [ %0, %1 ]
%7 = add i8 %5, -65
%8 = icmp ult i8 %7, 26
br i1 %8, label %9, label %11
9: ; preds = %4
%10 = add nuw nsw i8 %5, 32
store i8 %10, i8* %6
br label %11
11: ; preds = %4, %9
%12 = getelementptr inbounds i8, i8* %6, i64 1
%13 = load i8, i8* %12
%14 = icmp eq i8 %13, 0
br i1 %14, label %15, label %4
15: ; preds = %11, %1
ret i8* %0
}
/* Type definitions */
struct Cyc_Hashtable_Table {
  int dummy;
};
struct Cyc_Absyn_Exp {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ Cyc_scan_exp(struct Cyc_Absyn_Exp *,
                                struct Cyc_Hashtable_Table *);
void Cyc_scan_exp_opt(struct Cyc_Absyn_Exp *eo,
                      struct Cyc_Hashtable_Table *dep) {
  if ((unsigned)eo)
    ({ Cyc_scan_exp(eo, dep); });
  return;
}


x86 assembly (clang, -O0):
<Cyc_scan_exp_opt>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
cmp    $0x0,%eax
je     113d <Cyc_scan_exp_opt+0x2d>
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1030 <Cyc_scan_exp@plt>
mov    %eax,-0x14(%rbp)
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Cyc_scan_exp_opt>:
test   %edi,%edi
je     1119 <Cyc_scan_exp_opt+0x9>
jmp    1030 <Cyc_scan_exp@plt>
ret

LLVM IR (-O0):
%struct.Cyc_Absyn_Exp = type { i32 }
%struct.Cyc_Hashtable_Table = type { i32 }
define void @Cyc_scan_exp_opt(%struct.Cyc_Absyn_Exp* %0, %struct.Cyc_Hashtable_Table* %1) {
%3 = alloca %struct.Cyc_Absyn_Exp*
%4 = alloca %struct.Cyc_Hashtable_Table*
%5 = alloca i32
store %struct.Cyc_Absyn_Exp* %0, %struct.Cyc_Absyn_Exp** %3
store %struct.Cyc_Hashtable_Table* %1, %struct.Cyc_Hashtable_Table** %4
%6 = load %struct.Cyc_Absyn_Exp*, %struct.Cyc_Absyn_Exp** %3
%7 = ptrtoint %struct.Cyc_Absyn_Exp* %6 to i32
%8 = icmp ne i32 %7, 0
br i1 %8, label %9, label %14
9: ; preds = %2
%10 = load %struct.Cyc_Absyn_Exp*, %struct.Cyc_Absyn_Exp** %3
%11 = load %struct.Cyc_Hashtable_Table*, %struct.Cyc_Hashtable_Table** %4
%12 = call i32 @Cyc_scan_exp(%struct.Cyc_Absyn_Exp* %10, %struct.Cyc_Hashtable_Table* %11)
store i32 %12, i32* %5
%13 = load i32, i32* %5
br label %14
14: ; preds = %9, %2
ret void
}

LLVM IR (-O2):
%struct.Cyc_Absyn_Exp = type { i32 }
%struct.Cyc_Hashtable_Table = type { i32 }
define void @Cyc_scan_exp_opt(%struct.Cyc_Absyn_Exp* %0, %struct.Cyc_Hashtable_Table* %1) {
%3 = ptrtoint %struct.Cyc_Absyn_Exp* %0 to i64
%4 = trunc i64 %3 to i32
%5 = icmp eq i32 %4, 0
br i1 %5, label %8, label %6
6: ; preds = %2
%7 = tail call i32 @Cyc_scan_exp(%struct.Cyc_Absyn_Exp* %0, %struct.Cyc_Hashtable_Table* %1)
br label %8
8: ; preds = %6, %2
ret void
}
/* Variables and functions */
int /*<<< orphan*/ reset_svg_frame();
void Reset_SVG_Frame() { reset_svg_frame(); }


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

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

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

LLVM IR (-O2):
define void @Reset_SVG_Frame() {
%1 = tail call i32 (...) @reset_svg_frame()
ret void
}
/* Variables and functions */
float __nv_tgammaf(float);
float tgammaf(float __a) { return __nv_tgammaf(__a); }


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

x86 assembly (clang, -O2):
<tgammaf>:
jmp    1030 <__nv_tgammaf@plt>

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

LLVM IR (-O2):
define float @tgammaf(float %0) {
%2 = tail call float @__nv_tgammaf(float %0)
ret float %2
}
void __bitmap_or(void) { nsc_assert(0, __func__); }


x86 assembly (clang, -O0):
<__bitmap_or>:
push   %rbp
mov    %rsp,%rbp
xor    %edi,%edi
lea    0xee3(%rip),%rsi
mov    $0x0,%al
call   1030 <nsc_assert@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<__bitmap_or>:
lea    0xee9(%rip),%rsi
xor    %edi,%edi
xor    %eax,%eax
jmp    1030 <nsc_assert@plt>

LLVM IR (-O0):
@__func__.__bitmap_or = [12 x i8] c"__bitmap_or\00"
define void @__bitmap_or() {
%1 = call i32 (i32, i8*, ...) bitcast (i32 (...)* @nsc_assert to i32 (i32, i8*, ...)*)(i32 0, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @__func__.__bitmap_or, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@__func__.__bitmap_or = [12 x i8] c"__bitmap_or\00"
define void @__bitmap_or() {
%1 = tail call i32 (i32, i8*, ...) bitcast (i32 (...)* @nsc_assert to i32 (i32, i8*, ...)*)(i32 0, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @__func__.__bitmap_or, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
main() { printf("hellooo0oo, world\n"); }


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

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

LLVM IR (-O0):
@.str = [19 x i8] c"hellooo0oo, world\0A\00"
define i32 @main() {
%1 = call i32 @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@str = [18 x i8] c"hellooo0oo, world\00"
define i32 @main() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([18 x i8], [18 x i8]* @str, i64 0, i64 0))
ret i32 0
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ fclose(int /*<<< orphan*/ *);
int /*<<< orphan*/ *fopen(char *, char *);
int fichier_existe(char *nom_fichier) {
  FILE *fichier = fopen(nom_fichier, "r");
  if (fichier) {
    fclose(fichier);
    return 1;
  } else {
    return 0;
  }
}


x86 assembly (clang, -O0):
<fichier_existe>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
lea    0xec9(%rip),%rsi
call   1040 <fopen@plt>
mov    %rax,-0x18(%rbp)
cmpq   $0x0,-0x18(%rbp)
je     1160 <fichier_existe+0x40>
mov    -0x18(%rbp),%rdi
call   1030 <fclose@plt>
movl   $0x1,-0x4(%rbp)
jmp    1167 <fichier_existe+0x47>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fichier_existe>:
push   %rax
lea    0xed8(%rip),%rsi
call   1040 <fopen@plt>
test   %rax,%rax
je     1141 <fichier_existe+0x21>
mov    %rax,%rdi
call   1030 <fclose@plt>
mov    $0x1,%eax
pop    %rcx
ret
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
@.str = [2 x i8] c"r\00"
define i32 @fichier_existe(i8* nocapture %0) {
%2 = tail call i32* @fopen(i8* %0, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
%3 = icmp eq i32* %2, null
br i1 %3, label %6, label %4
4: ; preds = %1
%5 = tail call i32 @fclose(i32* %2)
br label %6
6: ; preds = %1, %4
%7 = phi i32 [ 1, %4 ], [ 0, %1 ]
ret i32 %7
}
signed long long int signedlonglongint_id(signed long long int x) { return x; }


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

x86 assembly (clang, -O2):
<signedlonglongint_id>:
mov    %rdi,%rax
ret

LLVM IR (-O0):
define i64 @signedlonglongint_id(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = load i64, i64* %2
ret i64 %3
}

LLVM IR (-O2):
define i64 @signedlonglongint_id(i64 returned %0) {
ret i64 %0
}