xunge/DecIR huggingface dataset:
int main() {
  struct student {
    int id;
    char *name;
  };
  struct student one;
  one.id = 1;
  one.name = "Tahmid Rafi";
  printf("ID: %d\n", one.id);
  printf("Name: %s\n", one.name);
  return 0;
}


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

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xef4(%rip),%rdi
mov    $0x1,%esi
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xee9(%rip),%rdi
lea    0xece(%rip),%rsi
xor    %eax,%eax
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
@.str = [12 x i8] c"Tahmid Rafi\00"
@.str.1 = [8 x i8] c"ID: %d\0A\00"
@.str.2 = [10 x i8] c"Name: %s\0A\00"
define i32 @main() {
%1 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([8 x i8], [8 x i8]* @.str.1, i64 0, i64 0), i32 1)
%2 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([10 x i8], [10 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0))
ret i32 0
}
void transfer_UYVA8888_to_YUVA8888(unsigned char *(*output),
                                   unsigned char *input) {
  (*output)[0] = input[1];
  (*output)[1] = input[0];
  (*output)[2] = input[2];
  (*output)[3] = input[3];
  (*output) += 4;
}


x86 assembly (clang, -O0):
<transfer_UYVA8888_to_YUVA8888>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    0x1(%rax),%cl
mov    -0x8(%rbp),%rax
mov    (%rax),%rax
mov    %cl,(%rax)
mov    -0x10(%rbp),%rax
mov    (%rax),%cl
mov    -0x8(%rbp),%rax
mov    (%rax),%rax
mov    %cl,0x1(%rax)
mov    -0x10(%rbp),%rax
mov    0x2(%rax),%cl
mov    -0x8(%rbp),%rax
mov    (%rax),%rax
mov    %cl,0x2(%rax)
mov    -0x10(%rbp),%rax
mov    0x3(%rax),%cl
mov    -0x8(%rbp),%rax
mov    (%rax),%rax
mov    %cl,0x3(%rax)
mov    -0x8(%rbp),%rax
mov    (%rax),%rcx
add    $0x4,%rcx
mov    %rcx,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<transfer_UYVA8888_to_YUVA8888>:
mov    0x1(%rsi),%al
mov    (%rdi),%rcx
mov    %al,(%rcx)
mov    (%rsi),%al
mov    (%rdi),%rcx
mov    %al,0x1(%rcx)
mov    0x2(%rsi),%al
mov    (%rdi),%rcx
mov    %al,0x2(%rcx)
mov    0x3(%rsi),%al
mov    (%rdi),%rcx
mov    %al,0x3(%rcx)
addq   $0x4,(%rdi)
ret

LLVM IR (-O0):
define void @transfer_UYVA8888_to_YUVA8888(i8** %0, i8* %1) {
%3 = alloca i8**
%4 = alloca i8*
store i8** %0, i8*** %3
store i8* %1, i8** %4
%5 = load i8*, i8** %4
%6 = getelementptr inbounds i8, i8* %5, i64 1
%7 = load i8, i8* %6
%8 = load i8**, i8*** %3
%9 = load i8*, i8** %8
%10 = getelementptr inbounds i8, i8* %9, i64 0
store i8 %7, i8* %10
%11 = load i8*, i8** %4
%12 = getelementptr inbounds i8, i8* %11, i64 0
%13 = load i8, i8* %12
%14 = load i8**, i8*** %3
%15 = load i8*, i8** %14
%16 = getelementptr inbounds i8, i8* %15, i64 1
store i8 %13, i8* %16
%17 = load i8*, i8** %4
%18 = getelementptr inbounds i8, i8* %17, i64 2
%19 = load i8, i8* %18
%20 = load i8**, i8*** %3
%21 = load i8*, i8** %20
%22 = getelementptr inbounds i8, i8* %21, i64 2
store i8 %19, i8* %22
%23 = load i8*, i8** %4
%24 = getelementptr inbounds i8, i8* %23, i64 3
%25 = load i8, i8* %24
%26 = load i8**, i8*** %3
%27 = load i8*, i8** %26
%28 = getelementptr inbounds i8, i8* %27, i64 3
store i8 %25, i8* %28
%29 = load i8**, i8*** %3
%30 = load i8*, i8** %29
%31 = getelementptr inbounds i8, i8* %30, i64 4
store i8* %31, i8** %29
ret void
}

LLVM IR (-O2):
define void @transfer_UYVA8888_to_YUVA8888(i8** nocapture %0, i8* nocapture %1) {
%3 = getelementptr inbounds i8, i8* %1, i64 1
%4 = load i8, i8* %3
%5 = load i8*, i8** %0
store i8 %4, i8* %5
%6 = load i8, i8* %1
%7 = load i8*, i8** %0
%8 = getelementptr inbounds i8, i8* %7, i64 1
store i8 %6, i8* %8
%9 = getelementptr inbounds i8, i8* %1, i64 2
%10 = load i8, i8* %9
%11 = load i8*, i8** %0
%12 = getelementptr inbounds i8, i8* %11, i64 2
store i8 %10, i8* %12
%13 = getelementptr inbounds i8, i8* %1, i64 3
%14 = load i8, i8* %13
%15 = load i8*, i8** %0
%16 = getelementptr inbounds i8, i8* %15, i64 3
store i8 %14, i8* %16
%17 = load i8*, i8** %0
%18 = getelementptr inbounds i8, i8* %17, i64 4
store i8* %18, i8** %0
ret void
}
/* Variables and functions */
char *strstr(char *, char *);
char *remove_response_header(char *rps) {
  if (rps == NULL)
    return NULL;
  char *start = strstr(rps, "\r\n\r\n") + 3;
  return start;
}


x86 assembly (clang, -O0):
<remove_response_header>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
jne    1134 <remove_response_header+0x24>
movq   $0x0,-0x8(%rbp)
jmp    1154 <remove_response_header+0x44>
mov    -0x10(%rbp),%rdi
lea    0xec1(%rip),%rsi
call   1030 <strstr@plt>
add    $0x3,%rax
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<remove_response_header>:
test   %rdi,%rdi
je     112b <remove_response_header+0x1b>
push   %rax
lea    0xee3(%rip),%rsi
call   1030 <strstr@plt>
add    $0x3,%rax
add    $0x8,%rsp
ret
xor    %eax,%eax
ret

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

LLVM IR (-O2):
@.str = [5 x i8] c"\0D\0A\0D\0A\00"
define i8* @remove_response_header(i8* %0) {
%2 = icmp eq i8* %0, null
br i1 %2, label %6, label %3
3: ; preds = %1
%4 = tail call i8* @strstr(i8* %0, i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0))
%5 = getelementptr inbounds i8, i8* %4, i64 3
br label %6
6: ; preds = %1, %3
%7 = phi i8* [ %5, %3 ], [ null, %1 ]
ret i8* %7
}
/* Variables and functions */
int /*<<< orphan*/ close(int);
void ft_close3(int fd1, int fd2, int fd3) {
  close(fd1);
  close(fd2);
  close(fd3);
}


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

x86 assembly (clang, -O2):
<ft_close3>:
push   %rbp
push   %rbx
push   %rax
mov    %edx,%ebx
mov    %esi,%ebp
call   1030 <close@plt>
mov    %ebp,%edi
call   1030 <close@plt>
mov    %ebx,%edi
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    1030 <close@plt>

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

LLVM IR (-O2):
define void @ft_close3(i32 %0, i32 %1, i32 %2) {
%4 = tail call i32 @close(i32 %0)
%5 = tail call i32 @close(i32 %1)
%6 = tail call i32 @close(i32 %2)
ret void
}
void OBJ_new_nid(void) {}


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

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

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

LLVM IR (-O2):
define void @OBJ_new_nid() {
ret void
}
void test_invalid_clause() {
  int i;
#pragma omp parallel
#pragma omp for simd foo bar
  for (i = 0; i < 16; ++i)
    ;
}


x86 assembly (clang, -O0):
<test_invalid_clause>:
push   %rbp
mov    %rsp,%rbp
movl   $0x0,-0x4(%rbp)
cmpl   $0x10,-0x4(%rbp)
jge    1128 <test_invalid_clause+0x28>
jmp    111a <test_invalid_clause+0x1a>
mov    -0x4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
jmp    110b <test_invalid_clause+0xb>
pop    %rbp
ret

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

LLVM IR (-O0):
define void @test_invalid_clause() {
%1 = alloca i32
store i32 0, i32* %1
br label %2
2: ; preds = %6, %0
%3 = load i32, i32* %1
%4 = icmp slt i32 %3, 16
br i1 %4, label %5, label %9
5: ; preds = %2
br label %6
6: ; preds = %5
%7 = load i32, i32* %1
%8 = add nsw i32 %7, 1
store i32 %8, i32* %1
br label %2
9: ; preds = %2
ret void
}

LLVM IR (-O2):
define void @test_invalid_clause() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ fun();
int /*<<< orphan*/ printf(char *, int);
int main(void) {
  int a;
  printf("%d\n", a);
  fun();
  return 0;
}


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

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

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

LLVM IR (-O2):
@.str = [4 x i8] c"%d\0A\00"
define i32 @main() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 undef)
%2 = tail call i32 (...) @fun()
ret i32 0
}
int bounded(int n, int n0, int n1) { return (n < n0 ? n0 : n > n1 ? n1 : n); }


x86 assembly (clang, -O0):
<bounded>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    -0x4(%rbp),%eax
cmp    -0x8(%rbp),%eax
jge    1124 <bounded+0x24>
mov    -0x8(%rbp),%eax
mov    %eax,-0x10(%rbp)
jmp    1147 <bounded+0x47>
mov    -0x4(%rbp),%eax
cmp    -0xc(%rbp),%eax
jle    113b <bounded+0x3b>
mov    -0xc(%rbp),%eax
mov    %eax,-0x14(%rbp)
jmp    1141 <bounded+0x41>
mov    -0x4(%rbp),%eax
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
mov    %eax,-0x10(%rbp)
mov    -0x10(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<bounded>:
mov    %edx,%eax
cmp    %edx,%edi
cmovle %edi,%eax
cmp    %esi,%edi
cmovl  %esi,%eax
ret

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

LLVM IR (-O2):
define i32 @bounded(i32 %0, i32 %1, i32 %2) {
%4 = icmp slt i32 %0, %1
%5 = icmp sgt i32 %0, %2
%6 = select i1 %5, i32 %2, i32 %0
%7 = select i1 %4, i32 %1, i32 %6
ret i32 %7
}
/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
int /*<<< orphan*/ stdout;
void ki_logikai(int szam) {
  szam &= 1;
  if (szam)
    fprintf(stdout, "igaz\n");
  else
    fprintf(stdout, "hamis\n");
}


x86 assembly (clang, -O0):
<ki_logikai>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
and    $0x1,%eax
mov    %eax,-0x4(%rbp)
cmpl   $0x0,-0x4(%rbp)
je     1148 <ki_logikai+0x38>
mov    0x2eab(%rip),%rax
mov    (%rax),%edi
lea    0xec2(%rip),%rsi
call   1030 <fprintf@plt>
jmp    115d <ki_logikai+0x4d>
mov    0x2e91(%rip),%rax
mov    (%rax),%edi
lea    0xeae(%rip),%rsi
call   1030 <fprintf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ki_logikai>:
test   $0x1,%dil
mov    0x2ec5(%rip),%rax
mov    (%rax),%edi
lea    0xee2(%rip),%rax
lea    0xed5(%rip),%rsi
cmove  %rax,%rsi
jmp    1030 <fprintf@plt>

LLVM IR (-O0):
@stdout = global i32 0
@.str = [6 x i8] c"igaz\0A\00"
@.str.1 = [7 x i8] c"hamis\0A\00"
define void @ki_logikai(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = and i32 %3, 1
store i32 %4, i32* %2
%5 = load i32, i32* %2
%6 = icmp ne i32 %5, 0
br i1 %6, label %7, label %10
7: ; preds = %1
%8 = load i32, i32* @stdout
%9 = call i32 @fprintf(i32 %8, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0))
br label %13
10: ; preds = %1
%11 = load i32, i32* @stdout
%12 = call i32 @fprintf(i32 %11, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0))
br label %13
13: ; preds = %10, %7
ret void
}

LLVM IR (-O2):
@stdout = global i32 0
@.str = [6 x i8] c"igaz\0A\00"
@.str.1 = [7 x i8] c"hamis\0A\00"
define void @ki_logikai(i32 %0) {
%2 = and i32 %0, 1
%3 = icmp eq i32 %2, 0
%4 = load i32, i32* @stdout
%5 = select i1 %3, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0)
%6 = tail call i32 @fprintf(i32 %4, i8* %5)
ret void
}
/* Variables and functions */
double exp(int /*<<< orphan*/);
int /*<<< orphan*/ log_combinations_d(unsigned int, unsigned int);
double combinations_d(unsigned int n, unsigned int k) {
  return exp(log_combinations_d(n, k));
}


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

x86 assembly (clang, -O2):
<combinations_d>:
push   %rax
call   1030 <log_combinations_d@plt>
mov    %eax,%edi
pop    %rax
jmp    1040 <exp@plt>

LLVM IR (-O0):
define double @combinations_d(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 @log_combinations_d(i32 %5, i32 %6)
%8 = call double @exp(i32 %7)
ret double %8
}

LLVM IR (-O2):
define double @combinations_d(i32 %0, i32 %1) {
%3 = tail call i32 @log_combinations_d(i32 %0, i32 %1)
%4 = tail call double @exp(i32 %3)
ret double %4
}
/* Type definitions */
typedef int /*<<< orphan*/ buf;

/* Variables and functions */
int /*<<< orphan*/ safef(char *, int, char *, char const *, char const *);
char *_cartVarDbName(const char *db, const char *var) {
  static char buf[512];
  safef(buf, sizeof(buf), "%s_%s", var, db);
  return buf;
}


x86 assembly (clang, -O0):
<_cartVarDbName>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rcx
mov    -0x8(%rbp),%r8
lea    0x2f11(%rip),%rdi
mov    $0x200,%esi
lea    0xec5(%rip),%rdx
call   1030 <safef@plt>
lea    0x2ef9(%rip),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<_cartVarDbName>:
push   %rbx
mov    %rsi,%rcx
mov    %rdi,%r8
lea    0x2f22(%rip),%rbx
lea    0xedb(%rip),%rdx
mov    %rbx,%rdi
mov    $0x200,%esi
call   1030 <safef@plt>
mov    %rbx,%rax
pop    %rbx
ret

LLVM IR (-O0):
@_cartVarDbName.buf = internal global [512 x i8] zeroinitializer
@.str = [6 x i8] c"%s_%s\00"
define i8* @_cartVarDbName(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
store i8* %0, i8** %3
store i8* %1, i8** %4
%5 = load i8*, i8** %4
%6 = load i8*, i8** %3
%7 = call i32 @safef(i8* getelementptr inbounds ([512 x i8], [512 x i8]* @_cartVarDbName.buf, i64 0, i64 0), i32 512, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i8* %5, i8* %6)
ret i8* getelementptr inbounds ([512 x i8], [512 x i8]* @_cartVarDbName.buf, i64 0, i64 0)
}

LLVM IR (-O2):
@_cartVarDbName.buf = internal global [512 x i8] zeroinitializer
@.str = [6 x i8] c"%s_%s\00"
define i8* @_cartVarDbName(i8* %0, i8* %1) {
%3 = tail call i32 @safef(i8* getelementptr inbounds ([512 x i8], [512 x i8]* @_cartVarDbName.buf, i64 0, i64 0), i32 512, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i8* %1, i8* %0)
ret i8* getelementptr inbounds ([512 x i8], [512 x i8]* @_cartVarDbName.buf, i64 0, i64 0)
}
struct s3c24x0_dmas *s3c24x0_get_base_dmas(void) {
  return (struct s3c24x0_dmas *)0x4B000000;
}


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

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

LLVM IR (-O0):
%struct.s3c24x0_dmas = type opaque
define %struct.s3c24x0_dmas* @s3c24x0_get_base_dmas() {
ret %struct.s3c24x0_dmas* inttoptr (i64 1258291200 to %struct.s3c24x0_dmas*)
}

LLVM IR (-O2):
%struct.s3c24x0_dmas = type opaque
define %struct.s3c24x0_dmas* @s3c24x0_get_base_dmas() {
ret %struct.s3c24x0_dmas* inttoptr (i64 1258291200 to %struct.s3c24x0_dmas*)
}
/* Variables and functions */
int /*<<< orphan*/ serial_putc(unsigned int, char const);
void serial_putsn(unsigned int base, const char *s, int n) {
  int i;
  for (i = 0; i < n; i++) {
    serial_putc(base, s[i]);
  }
}


x86 assembly (clang, -O0):
<serial_putsn>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
movl   $0x0,-0x18(%rbp)
mov    -0x18(%rbp),%eax
cmp    -0x14(%rbp),%eax
jge    1157 <serial_putsn+0x47>
mov    -0x4(%rbp),%edi
mov    -0x10(%rbp),%rax
movslq -0x18(%rbp),%rcx
movsbl (%rax,%rcx,1),%esi
call   1030 <serial_putc@plt>
mov    -0x18(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x18(%rbp)
jmp    1129 <serial_putsn+0x19>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<serial_putsn>:
push   %rbp
push   %r15
push   %r14
push   %rbx
push   %rax
test   %edx,%edx
jle    1146 <serial_putsn+0x36>
mov    %rsi,%r14
mov    %edi,%r15d
mov    %edx,%ebx
xor    %ebp,%ebp
cs nopw 0x0(%rax,%rax,1)
nop
movsbl (%r14,%rbp,1),%esi
mov    %r15d,%edi
call   1030 <serial_putc@plt>
add    $0x1,%rbp
cmp    %rbp,%rbx
jne    1130 <serial_putsn+0x20>
add    $0x8,%rsp
pop    %rbx
pop    %r14
pop    %r15
pop    %rbp
ret

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

LLVM IR (-O2):
define void @serial_putsn(i32 %0, i8* nocapture %1, i32 %2) {
%4 = icmp sgt i32 %2, 0
br i1 %4, label %5, label %14
5: ; preds = %3
%6 = zext i32 %2 to i64
br label %7
7: ; preds = %5, %7
%8 = phi i64 [ 0, %5 ], [ %12, %7 ]
%9 = getelementptr inbounds i8, i8* %1, i64 %8
%10 = load i8, i8* %9
%11 = tail call i32 @serial_putc(i32 %0, i8 signext %10)
%12 = add nuw nsw i64 %8, 1
%13 = icmp eq i64 %12, %6
br i1 %13, label %14, label %7
14: ; preds = %7, %3
ret void
}
/* Type definitions */
struct List {
  int dummy;
};

/* Variables and functions */
scalar_t__ list_getSize(struct List *);
int /*<<< orphan*/ list_pop(struct List *);
void list_clear(struct List *list) {
  while (list_getSize(list) > 0)
    list_pop(list);
}


x86 assembly (clang, -O0):
<list_clear>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <list_getSize@plt>
cmp    $0x0,%rax
jle    114d <list_clear+0x2d>
mov    -0x8(%rbp),%rdi
call   1030 <list_pop@plt>
jmp    112c <list_clear+0xc>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<list_clear>:
push   %rbx
mov    %rdi,%rbx
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
call   1040 <list_getSize@plt>
test   %rax,%rax
jle    1147 <list_clear+0x27>
mov    %rbx,%rdi
call   1030 <list_pop@plt>
mov    %rbx,%rdi
jmp    1130 <list_clear+0x10>
pop    %rbx
ret

LLVM IR (-O0):
%struct.List = type { i32 }
define void @list_clear(%struct.List* %0) {
%2 = alloca %struct.List*
store %struct.List* %0, %struct.List** %2
br label %3
3: ; preds = %7, %1
%4 = load %struct.List*, %struct.List** %2
%5 = call i64 @list_getSize(%struct.List* %4)
%6 = icmp sgt i64 %5, 0
br i1 %6, label %7, label %10
7: ; preds = %3
%8 = load %struct.List*, %struct.List** %2
%9 = call i32 @list_pop(%struct.List* %8)
br label %3
10: ; preds = %3
ret void
}

LLVM IR (-O2):
%struct.List = type { i32 }
define void @list_clear(%struct.List* %0) {
%2 = tail call i64 @list_getSize(%struct.List* %0)
%3 = icmp sgt i64 %2, 0
br i1 %3, label %4, label %8
4: ; preds = %1, %4
%5 = tail call i32 @list_pop(%struct.List* %0)
%6 = tail call i64 @list_getSize(%struct.List* %0)
%7 = icmp sgt i64 %6, 0
br i1 %7, label %4, label %8
8: ; preds = %4, %1
ret void
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ isdigit(int);
void t_isdigit_0x48() {
  Assert_real((isdigit(72) == 0),
              "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
              "2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/"
              "dg/z88dk/test/suites/ctype/test_isdigit.c",
              365, ("isdigit should be 0 for H"));
}


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

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

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

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


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

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

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

LLVM IR (-O2):
define void @dac_conduct() {
ret void
}
/* Variables and functions */
int smp_file_size_from_seek(int);
int smp_memmap_remove(void *, int);
int smp_file2memmap_remove(void *start, int fd) {
  int file_size = 0;
  if ((file_size = smp_file_size_from_seek(fd)) == (-1))
    return (-1);
  return smp_memmap_remove(start, file_size);
}


x86 assembly (clang, -O0):
<smp_file2memmap_remove>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    %esi,-0x14(%rbp)
movl   $0x0,-0x18(%rbp)
mov    -0x14(%rbp),%edi
call   1040 <smp_file_size_from_seek@plt>
mov    %eax,-0x18(%rbp)
cmp    $0xffffffff,%eax
jne    1156 <smp_file2memmap_remove+0x36>
movl   $0xffffffff,-0x4(%rbp)
jmp    1165 <smp_file2memmap_remove+0x45>
mov    -0x10(%rbp),%rdi
mov    -0x18(%rbp),%esi
call   1030 <smp_memmap_remove@plt>
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<smp_file2memmap_remove>:
push   %rbx
mov    %rdi,%rbx
mov    %esi,%edi
call   1040 <smp_file_size_from_seek@plt>
cmp    $0xffffffff,%eax
je     113b <smp_file2memmap_remove+0x1b>
mov    %rbx,%rdi
mov    %eax,%esi
pop    %rbx
jmp    1030 <smp_memmap_remove@plt>
mov    $0xffffffff,%eax
pop    %rbx
ret

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

LLVM IR (-O2):
define i32 @smp_file2memmap_remove(i8* %0, i32 %1) {
%3 = tail call i32 @smp_file_size_from_seek(i32 %1)
%4 = icmp eq i32 %3, -1
br i1 %4, label %7, label %5
5: ; preds = %2
%6 = tail call i32 @smp_memmap_remove(i8* %0, i32 %3)
br label %7
7: ; preds = %2, %5
%8 = phi i32 [ %6, %5 ], [ -1, %2 ]
ret i32 %8
}
int rightmostone(int i) {
  int index = 0;
  while (i > 0) {
    if (i & 1) {
      return index;
    } else {
      i = i >> 1;
      index++;
    }
  }
}


x86 assembly (clang, -O0):
<rightmostone>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
cmpl   $0x0,-0x8(%rbp)
jle    1149 <rightmostone+0x49>
mov    -0x8(%rbp),%eax
and    $0x1,%eax
cmp    $0x0,%eax
je     1132 <rightmostone+0x32>
mov    -0xc(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    1149 <rightmostone+0x49>
mov    -0x8(%rbp),%eax
sar    $0x1,%eax
mov    %eax,-0x8(%rbp)
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    110e <rightmostone+0xe>
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<rightmostone>:
xor    %eax,%eax
test   %edi,%edi
jle    1123 <rightmostone+0x23>
mov    %edi,%ecx
and    $0x1,%ecx
jne    1123 <rightmostone+0x23>
xor    %eax,%eax
nop
add    $0x1,%eax
cmp    $0x2,%edi
jb     1123 <rightmostone+0x23>
mov    %edi,%ecx
shr    %ecx
and    $0x2,%edi
mov    %ecx,%edi
je     1110 <rightmostone+0x10>
ret

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

LLVM IR (-O2):
define i32 @rightmostone(i32 %0) {
%2 = icmp sgt i32 %0, 0
%3 = and i32 %0, 1
%4 = icmp eq i32 %3, 0
%5 = and i1 %2, %4
br i1 %5, label %6, label %15
6: ; preds = %1, %6
%7 = phi i32 [ %10, %6 ], [ 0, %1 ]
%8 = phi i32 [ %9, %6 ], [ %0, %1 ]
%9 = lshr i32 %8, 1
%10 = add nuw nsw i32 %7, 1
%11 = icmp ugt i32 %8, 1
%12 = and i32 %8, 2
%13 = icmp eq i32 %12, 0
%14 = and i1 %11, %13
br i1 %14, label %6, label %15
15: ; preds = %6, %1
%16 = phi i32 [ 0, %1 ], [ %10, %6 ]
ret i32 %16
}
/* Variables and functions */
int /*<<< orphan*/ menuDeSelection();
int main() {
  menuDeSelection();
  return 0;
}


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

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

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

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @menuDeSelection()
ret i32 0
}
int f(int a, int b, int c) {
  a += (short)b * (c >> 16);
  return a;
}


x86 assembly (clang, -O0):
<f>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    -0x8(%rbp),%eax
cwtl
mov    -0xc(%rbp),%ecx
sar    $0x10,%ecx
imul   %ecx,%eax
add    -0x4(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<f>:
movswl %si,%eax
sar    $0x10,%edx
imul   %edx,%eax
add    %edi,%eax
ret

LLVM IR (-O0):
define i32 @f(i32 %0, i32 %1, i32 %2) {
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
store i32 %0, i32* %4
store i32 %1, i32* %5
store i32 %2, i32* %6
%7 = load i32, i32* %5
%8 = trunc i32 %7 to i16
%9 = sext i16 %8 to i32
%10 = load i32, i32* %6
%11 = ashr i32 %10, 16
%12 = mul nsw i32 %9, %11
%13 = load i32, i32* %4
%14 = add nsw i32 %13, %12
store i32 %14, i32* %4
%15 = load i32, i32* %4
ret i32 %15
}

LLVM IR (-O2):
define i32 @f(i32 %0, i32 %1, i32 %2) {
%4 = shl i32 %1, 16
%5 = ashr exact i32 %4, 16
%6 = ashr i32 %2, 16
%7 = mul nsw i32 %5, %6
%8 = add nsw i32 %7, %0
ret i32 %8
}
/* Variables and functions */
int f419(int *);
int f420(int *p) { return f419(p); }


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

x86 assembly (clang, -O2):
<f420>:
jmp    1030 <f419@plt>

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

LLVM IR (-O2):
define i32 @f420(i32* %0) {
%2 = tail call i32 @f419(i32* %0)
ret i32 %2
}
/* Type definitions */
typedef int uint8_t;

/* Variables and functions */
uint8_t ctr_clex_is_delimiter(char symbol) {
  return (symbol == '(' || symbol == ')' || symbol == ',' || symbol == '.' ||
          symbol == ':' || symbol == ' ');
}


x86 assembly (clang, -O0):
<ctr_clex_is_delimiter>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movsbl -0x1(%rbp),%ecx
mov    $0x1,%al
cmp    $0x28,%ecx
mov    %al,-0x2(%rbp)
je     1171 <ctr_clex_is_delimiter+0x71>
movsbl -0x1(%rbp),%ecx
mov    $0x1,%al
cmp    $0x29,%ecx
mov    %al,-0x2(%rbp)
je     1171 <ctr_clex_is_delimiter+0x71>
movsbl -0x1(%rbp),%ecx
mov    $0x1,%al
cmp    $0x2c,%ecx
mov    %al,-0x2(%rbp)
je     1171 <ctr_clex_is_delimiter+0x71>
movsbl -0x1(%rbp),%ecx
mov    $0x1,%al
cmp    $0x2e,%ecx
mov    %al,-0x2(%rbp)
je     1171 <ctr_clex_is_delimiter+0x71>
movsbl -0x1(%rbp),%ecx
mov    $0x1,%al
cmp    $0x3a,%ecx
mov    %al,-0x2(%rbp)
je     1171 <ctr_clex_is_delimiter+0x71>
movsbl -0x1(%rbp),%eax
cmp    $0x20,%eax
sete   %al
mov    %al,-0x2(%rbp)
mov    -0x2(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<ctr_clex_is_delimiter>:
cmp    $0x3a,%dil
ja     1120 <ctr_clex_is_delimiter+0x20>
mov    $0x1,%eax
movzbl %dil,%ecx
movabs $0x400530000000000,%rdx
bt     %rcx,%rdx
jae    1120 <ctr_clex_is_delimiter+0x20>
ret
xor    %eax,%eax
cmp    $0x20,%dil
sete   %al
ret

LLVM IR (-O0):
define i32 @ctr_clex_is_delimiter(i8 signext %0) {
%2 = alloca i8
store i8 %0, i8* %2
%3 = load i8, i8* %2
%4 = sext i8 %3 to i32
%5 = icmp eq i32 %4, 40
br i1 %5, label %26, label %6
6: ; preds = %1
%7 = load i8, i8* %2
%8 = sext i8 %7 to i32
%9 = icmp eq i32 %8, 41
br i1 %9, label %26, label %10
10: ; preds = %6
%11 = load i8, i8* %2
%12 = sext i8 %11 to i32
%13 = icmp eq i32 %12, 44
br i1 %13, label %26, label %14
14: ; preds = %10
%15 = load i8, i8* %2
%16 = sext i8 %15 to i32
%17 = icmp eq i32 %16, 46
br i1 %17, label %26, label %18
18: ; preds = %14
%19 = load i8, i8* %2
%20 = sext i8 %19 to i32
%21 = icmp eq i32 %20, 58
br i1 %21, label %26, label %22
22: ; preds = %18
%23 = load i8, i8* %2
%24 = sext i8 %23 to i32
%25 = icmp eq i32 %24, 32
br label %26
26: ; preds = %22, %18, %14, %10, %6, %1
%27 = phi i1 [ true, %18 ], [ true, %14 ], [ true, %10 ], [ true, %6 ], [ true, %1 ], [ %25, %22 ]
%28 = zext i1 %27 to i32
ret i32 %28
}

LLVM IR (-O2):
define i32 @ctr_clex_is_delimiter(i8 signext %0) {
switch i8 %0, label %2 [
i8 58, label %5
i8 46, label %5
i8 44, label %5
i8 41, label %5
i8 40, label %5
]
2: ; preds = %1
%3 = icmp eq i8 %0, 32
%4 = zext i1 %3 to i32
br label %5
5: ; preds = %1, %1, %1, %1, %1, %2
%6 = phi i32 [ 1, %1 ], [ %4, %2 ], [ 1, %1 ], [ 1, %1 ], [ 1, %1 ], [ 1, %1 ]
ret i32 %6
}
/* Variables and functions */
int /*<<< orphan*/ Say(char *, int);
void talk(void) { Say("A small wooden table.", 1); }


x86 assembly (clang, -O0):
<talk>:
push   %rbp
mov    %rsp,%rbp
lea    0xee5(%rip),%rdi
mov    $0x1,%esi
call   1030 <Say@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<talk>:
lea    0xee9(%rip),%rdi
mov    $0x1,%esi
jmp    1030 <Say@plt>

LLVM IR (-O0):
@.str = [22 x i8] c"A small wooden table.\00"
define void @talk() {
%1 = call i32 @Say(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0), i32 1)
ret void
}

LLVM IR (-O2):
@.str = [22 x i8] c"A small wooden table.\00"
define void @talk() {
%1 = tail call i32 @Say(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0), i32 1)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ mergeSort(long long *, int, int, int);
void partition(long long *arr, int low, int high) {
  int mid;
  if (low < high) {
    mid = (low + high) / 2;
    partition(arr, low, mid);
    partition(arr, mid + 1, high);
    mergeSort(arr, low, mid, high);
  }
}


x86 assembly (clang, -O0):
<partition>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    -0xc(%rbp),%eax
cmp    -0x10(%rbp),%eax
jge    1182 <partition+0x62>
mov    -0xc(%rbp),%eax
add    -0x10(%rbp),%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
mov    %eax,-0x14(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
mov    -0x14(%rbp),%edx
call   1030 <partition@plt>
mov    -0x8(%rbp),%rdi
mov    -0x14(%rbp),%esi
add    $0x1,%esi
mov    -0x10(%rbp),%edx
call   1030 <partition@plt>
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
mov    -0x14(%rbp),%edx
mov    -0x10(%rbp),%ecx
call   1040 <mergeSort@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<partition>:
cmp    %edx,%esi
jge    1172 <partition+0x52>
push   %r15
push   %r14
push   %r12
push   %rbx
push   %rax
mov    %edx,%r14d
mov    %esi,%r12d
mov    %rdi,%r15
lea    (%r14,%r12,1),%eax
mov    %eax,%ebx
shr    $0x1f,%ebx
add    %eax,%ebx
sar    %ebx
mov    %ebx,%edx
call   1030 <partition@plt>
lea    0x1(%rbx),%esi
mov    %r15,%rdi
mov    %r14d,%edx
call   1030 <partition@plt>
mov    %r15,%rdi
mov    %r12d,%esi
mov    %ebx,%edx
mov    %r14d,%ecx
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
jmp    1040 <mergeSort@plt>
ret

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

LLVM IR (-O2):
define void @partition(i64* %0, i32 %1, i32 %2) {
%4 = icmp slt i32 %1, %2
br i1 %4, label %6, label %5
5: ; preds = %3, %6
ret void
6: ; preds = %3
%7 = add nsw i32 %2, %1
%8 = sdiv i32 %7, 2
tail call void @partition(i64* %0, i32 %1, i32 %8)
%9 = add nsw i32 %8, 1
tail call void @partition(i64* %0, i32 %9, i32 %2)
%10 = tail call i32 @mergeSort(i64* %0, i32 %1, i32 %8, i32 %2)
br label %5
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void clear_screen() { printf("\e[H\e[2J"); }


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

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

LLVM IR (-O0):
@.str = [8 x i8] c"\1B[H\1B[2J\00"
define void @clear_screen() {
%1 = call i32 @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [8 x i8] c"\1B[H\1B[2J\00"
define void @clear_screen() {
%1 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0))
ret void
}
void change_process_title(char *fmt, ...) {}


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

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

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

LLVM IR (-O2):
define void @change_process_title(i8* nocapture %0, ...) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ add_opcode(int /*<<< orphan*/, int);
int /*<<< orphan*/ gen_move(char *, int);
void move(int opcode) {
  if ((opcode & 0xC000) != 0)
    return;
  add_opcode(gen_move("move", opcode), opcode);
}


x86 assembly (clang, -O0):
<move>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
and    $0xc000,%eax
cmp    $0x0,%eax
je     1141 <move+0x21>
jmp    115a <move+0x3a>
mov    -0x4(%rbp),%esi
lea    0xeb5(%rip),%rdi
call   1030 <gen_move@plt>
mov    %eax,%edi
mov    -0x4(%rbp),%esi
call   1040 <add_opcode@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<move>:
test   $0xc000,%edi
je     1129 <move+0x9>
ret
push   %rbx
mov    %edi,%ebx
lea    0xecd(%rip),%rdi
mov    %ebx,%esi
call   1030 <gen_move@plt>
mov    %eax,%edi
mov    %ebx,%esi
pop    %rbx
jmp    1040 <add_opcode@plt>

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

LLVM IR (-O2):
@.str = [5 x i8] c"move\00"
define void @move(i32 %0) {
%2 = and i32 %0, 49152
%3 = icmp eq i32 %2, 0
br i1 %3, label %4, label %7
4: ; preds = %1
%5 = tail call i32 @gen_move(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i32 %0)
%6 = tail call i32 @add_opcode(i32 %5, i32 %0)
br label %7
7: ; preds = %1, %4
ret void
}
void fa98(void) {
a:
  ({
    P01A:
      goto P01A;
      ({
        P012A:
          goto P012A;
          0;
      });
    P01B:
      goto P01B;
      ({
        P013A:
          goto P013A;
          0;
      });
    P01C:
      goto P01C;
      0;
  });
P0B:
  goto P0B;
  ({
    p02A:
      goto p02A;
      goto a;
    P02A:
      goto P02A;
      ({
        P024A:
          goto P024A;
          0;
      });
    P02B:
      goto P02B;
      ({
        P025A:
          goto P025A;
          0;
      });
    P02C:
      goto P02C;
      0;
  });
P0C:
  goto P0C;
  0;
P0D:
  goto P0D;
}


x86 assembly (clang, -O0):
<fa98>:
push   %rbp
mov    %rsp,%rbp
jmp    1109 <fa98+0x9>
jmp    1109 <fa98+0x9>

x86 assembly (clang, -O2):
<fa98>:
jmp    1100 <fa98>

LLVM IR (-O0):
define void @fa98() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
br label %7
7: ; preds = %0
br label %8
8: ; preds = %8, %7
br label %8
9: ; No predecessors!
br label %10
10: ; preds = %10, %9
br label %10
11: ; preds = %11
br label %11
12: ; No predecessors!
br label %13
13: ; preds = %13, %12
br label %13
14: ; preds = %14
br label %14
15: ; preds = %15
br label %15
16: ; No predecessors!
br label %17
17: ; preds = %17, %16
br label %17
18: ; preds = %18
br label %18
19: ; No predecessors!
br label %20
20: ; preds = %20, %19
br label %20
21: ; preds = %21
br label %21
22: ; No predecessors!
br label %23
23: ; preds = %23, %22
br label %23
24: ; preds = %24
br label %24
25: ; preds = %25
br label %25
26: ; preds = %26
br label %26
}

LLVM IR (-O2):
define void @fa98() {
br label %1
1: ; preds = %1, %0
br label %1
}
/* Variables and functions */
int /*<<< orphan*/ reverseword();
void main() { reverseword(); }


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

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

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

LLVM IR (-O2):
define void @main() {
%1 = tail call i32 (...) @reverseword()
ret void
}
double norm2(int type) {
  double erg;
  switch (type) {
  case 1:
    erg = 6.02204 * 1E-12 * 100;
    break;
  case 2:
    erg = 6.02204 * 1E-12 * 100;
    break;
  case 3:
    erg = 6.02204 * 1E-12 * 100;
    break;
  case 4:
    erg = 6.02204 * 1E-12 * 100;
    break;
  case -99:
    erg = 6.02204 * 1E-12 * 295 * 295 * 9.92033 * 1E6;
    break;
  default:
    erg = 1.0;
    break;
  }
  return erg;
}


x86 assembly (clang, -O0):
<norm2>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
mov    %eax,-0x14(%rbp)
sub    $0xffffff9d,%eax
je     11a7 <norm2+0xa7>
jmp    111b <norm2+0x1b>
mov    -0x14(%rbp),%eax
sub    $0x1,%eax
je     115f <norm2+0x5f>
jmp    112c <norm2+0x2c>
mov    -0x14(%rbp),%eax
sub    $0x2,%eax
je     1171 <norm2+0x71>
jmp    113d <norm2+0x3d>
mov    -0x14(%rbp),%eax
sub    $0x3,%eax
je     1183 <norm2+0x83>
jmp    114e <norm2+0x4e>
mov    -0x14(%rbp),%eax
sub    $0x4,%eax
je     1195 <norm2+0x95>
jmp    11b9 <norm2+0xb9>
movsd  0xea1(%rip),%xmm0
movsd  %xmm0,-0x10(%rbp)
jmp    11c6 <norm2+0xc6>
movsd  0xe8f(%rip),%xmm0
movsd  %xmm0,-0x10(%rbp)
jmp    11c6 <norm2+0xc6>
movsd  0xe7d(%rip),%xmm0
movsd  %xmm0,-0x10(%rbp)
jmp    11c6 <norm2+0xc6>
movsd  0xe6b(%rip),%xmm0
movsd  %xmm0,-0x10(%rbp)
jmp    11c6 <norm2+0xc6>
movsd  0xe51(%rip),%xmm0
movsd  %xmm0,-0x10(%rbp)
jmp    11c6 <norm2+0xc6>
movsd  0xe4f(%rip),%xmm0
movsd  %xmm0,-0x10(%rbp)
movsd  -0x10(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<norm2>:
lea    -0x1(%rdi),%eax
cmp    $0x4,%eax
jae    1111 <norm2+0x11>
movsd  0xef0(%rip),%xmm0
ret
cmp    $0xffffff9d,%edi
jne    111f <norm2+0x1f>
movsd  0xeea(%rip),%xmm0
ret
movsd  0xee9(%rip),%xmm0
ret

LLVM IR (-O0):
define double @norm2(i32 %0) {
%2 = alloca i32
%3 = alloca double
store i32 %0, i32* %2
%4 = load i32, i32* %2
switch i32 %4, label %10 [
i32 1, label %5
i32 2, label %6
i32 3, label %7
i32 4, label %8
i32 -99, label %9
]
5: ; preds = %1
store double 0x3E04B10ADAE15041, double* %3
br label %11
6: ; preds = %1
store double 0x3E04B10ADAE15041, double* %3
br label %11
7: ; preds = %1
store double 0x3E04B10ADAE15041, double* %3
br label %11
8: ; preds = %1
store double 0x3E04B10ADAE15041, double* %3
br label %11
9: ; preds = %1
store double 0x4014CBB3BB585921, double* %3
br label %11
10: ; preds = %1
store double 1.000000e+00, double* %3
br label %11
11: ; preds = %10, %9, %8, %7, %6, %5
%12 = load double, double* %3
ret double %12
}

LLVM IR (-O2):
define double @norm2(i32 %0) {
switch i32 %0, label %3 [
i32 1, label %4
i32 2, label %4
i32 3, label %4
i32 4, label %4
i32 -99, label %2
]
2: ; preds = %1
br label %4
3: ; preds = %1
br label %4
4: ; preds = %1, %1, %1, %1, %3, %2
%5 = phi double [ 1.000000e+00, %3 ], [ 0x4014CBB3BB585921, %2 ], [ 0x3E04B10ADAE15041, %1 ], [ 0x3E04B10ADAE15041, %1 ], [ 0x3E04B10ADAE15041, %1 ], [ 0x3E04B10ADAE15041, %1 ]
ret double %5
}
void gtk_icon_view_get_text_column() {}


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

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

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

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

/* Variables and functions */
int /*<<< orphan*/ labelset_univ_setdescription(int /*<<< orphan*/,
                                                int /*<<< orphan*/,
                                                int /*<<< orphan*/ const *,
                                                int /*<<< orphan*/);
uint8_t labelset_setdescription(uint8_t labelid, uint8_t descrleng,
                                const uint8_t *description) {
  return labelset_univ_setdescription(labelid, descrleng, description, 0);
}


x86 assembly (clang, -O0):
<labelset_setdescription>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %rdx,-0x10(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x8(%rbp),%esi
mov    -0x10(%rbp),%rdx
xor    %ecx,%ecx
call   1030 <labelset_univ_setdescription@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<labelset_setdescription>:
xor    %ecx,%ecx
jmp    1030 <labelset_univ_setdescription@plt>

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

LLVM IR (-O2):
define i32 @labelset_setdescription(i32 %0, i32 %1, i32* %2) {
%4 = tail call i32 @labelset_univ_setdescription(i32 %0, i32 %1, i32* %2, i32 0)
ret i32 %4
}
OP(dd, ef) {
  illegal_1();
  op_ef();
}


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

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

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

LLVM IR (-O2):
define i32 @OP(i32 %0, i32 %1) {
%3 = tail call i32 (...) @illegal_1()
%4 = tail call i32 (...) @op_ef()
ret i32 undef
}
/* Variables and functions */
bool nrf53_errata_66(void) { return false; }


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

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

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

LLVM IR (-O2):
define i32 @nrf53_errata_66() {
ret i32 0
}