xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ ENC2_DriverIRQHandler();
__attribute__((weak)) void ENC2_IRQHandler(void) { ENC2_DriverIRQHandler(); }


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

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

LLVM IR (-O0):
define weak void @ENC2_IRQHandler() {
%1 = call i32 (...) @ENC2_DriverIRQHandler()
ret void
}

LLVM IR (-O2):
define weak void @ENC2_IRQHandler() {
%1 = tail call i32 (...) @ENC2_DriverIRQHandler()
ret void
}
void av_force_cpu_flags() {}


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

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

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

LLVM IR (-O2):
define void @av_force_cpu_flags() {
ret void
}
unsigned long long facto(int n) {
  if (n > 1) {
    return (facto(n - 1) * n);
  } else {
    return (1);
  }
}


x86 assembly (clang, -O0):
<facto>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0xc(%rbp)
cmpl   $0x1,-0xc(%rbp)
jle    1141 <facto+0x31>
mov    -0xc(%rbp),%edi
sub    $0x1,%edi
call   1030 <facto@plt>
movslq -0xc(%rbp),%rcx
imul   %rcx,%rax
mov    %rax,-0x8(%rbp)
jmp    1149 <facto+0x39>
movq   $0x1,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<facto>:
mov    $0x1,%eax
cmp    $0x2,%edi
jl     1131 <facto+0x31>
mov    %edi,%ecx
mov    $0x1,%eax
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
imul   %rcx,%rax
lea    -0x1(%rcx),%rdx
cmp    $0x2,%rcx
mov    %rdx,%rcx
ja     1120 <facto+0x20>
ret

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

LLVM IR (-O2):
define i64 @facto(i32 %0) {
%2 = icmp sgt i32 %0, 1
br i1 %2, label %3, label %11
3: ; preds = %1
%4 = zext i32 %0 to i64
br label %5
5: ; preds = %3, %5
%6 = phi i64 [ %4, %3 ], [ %8, %5 ]
%7 = phi i64 [ 1, %3 ], [ %9, %5 ]
%8 = add nsw i64 %6, -1
%9 = mul i64 %7, %6
%10 = icmp ugt i64 %6, 2
br i1 %10, label %5, label %11
11: ; preds = %5, %1
%12 = phi i64 [ 1, %1 ], [ %9, %5 ]
ret i64 %12
}
/* Variables and functions */
int /*<<< orphan*/ sprintf(char *, char *, char *, char *, char *, char *);
scalar_t__ system(char *);
void output_bad_records(char *bad_parse_file, char *bad_range_file,
                        char *bad_frequency_file, char *bad_insert_file) {
  char sys_string[1024];
  sprintf(sys_string, "cat %s %s %s %s | html_table.e '^^Bad Records' '' ''",
          bad_parse_file, bad_range_file, bad_frequency_file, bad_insert_file);
  if (system(sys_string)) {
  };
}


x86 assembly (clang, -O0):
<output_bad_records>:
push   %rbp
mov    %rsp,%rbp
sub    $0x420,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
lea    -0x420(%rbp),%rdi
mov    -0x8(%rbp),%rdx
mov    -0x10(%rbp),%rcx
mov    -0x18(%rbp),%r8
mov    -0x20(%rbp),%r9
lea    0xea7(%rip),%rsi
call   1040 <sprintf@plt>
lea    -0x420(%rbp),%rdi
call   1030 <system@plt>
cmp    $0x0,%rax
je     1179 <output_bad_records+0x59>
jmp    1179 <output_bad_records+0x59>
add    $0x420,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<output_bad_records>:
push   %rbx
sub    $0x400,%rsp
mov    %rcx,%r9
mov    %rdx,%r8
mov    %rsi,%rcx
mov    %rdi,%rdx
lea    0xec5(%rip),%rsi
mov    %rsp,%rbx
mov    %rbx,%rdi
call   1040 <sprintf@plt>
mov    %rbx,%rdi
call   1030 <system@plt>
add    $0x400,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@.str = [53 x i8] c"cat %s %s %s %s | html_table.e '^^Bad Records' '' ''\00"
define void @output_bad_records(i8* %0, i8* %1, i8* %2, i8* %3) {
%5 = alloca i8*
%6 = alloca i8*
%7 = alloca i8*
%8 = alloca i8*
%9 = alloca [1024 x i8]
store i8* %0, i8** %5
store i8* %1, i8** %6
store i8* %2, i8** %7
store i8* %3, i8** %8
%10 = getelementptr inbounds [1024 x i8], [1024 x i8]* %9, i64 0, i64 0
%11 = load i8*, i8** %5
%12 = load i8*, i8** %6
%13 = load i8*, i8** %7
%14 = load i8*, i8** %8
%15 = call i32 @sprintf(i8* %10, i8* getelementptr inbounds ([53 x i8], [53 x i8]* @.str, i64 0, i64 0), i8* %11, i8* %12, i8* %13, i8* %14)
%16 = getelementptr inbounds [1024 x i8], [1024 x i8]* %9, i64 0, i64 0
%17 = call i64 @system(i8* %16)
%18 = icmp ne i64 %17, 0
br i1 %18, label %19, label %20
19: ; preds = %4
br label %20
20: ; preds = %19, %4
ret void
}

LLVM IR (-O2):
@.str = [53 x i8] c"cat %s %s %s %s | html_table.e '^^Bad Records' '' ''\00"
define void @output_bad_records(i8* %0, i8* %1, i8* %2, i8* %3) {
%5 = alloca [1024 x i8]
%6 = getelementptr inbounds [1024 x i8], [1024 x i8]* %5, i64 0, i64 0
%7 = call i32 @sprintf(i8* %6, i8* dereferenceable(1) getelementptr inbounds ([53 x i8], [53 x i8]* @.str, i64 0, i64 0), i8* %0, i8* %1, i8* %2, i8* %3)
%8 = call i64 @system(i8* %6)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ free(void *);
void *malloc(int);
void corrupt() {
  void *p = malloc(10);
  free(p);
  free(p);
}


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

x86 assembly (clang, -O2):
<corrupt>:
push   %rbx
mov    $0xa,%edi
call   1040 <malloc@plt>
mov    %rax,%rbx
mov    %rax,%rdi
call   1030 <free@plt>
mov    %rbx,%rdi
pop    %rbx
jmp    1030 <free@plt>

LLVM IR (-O0):
define void @corrupt() {
%1 = alloca i8*
%2 = call i8* @malloc(i32 10)
store i8* %2, i8** %1
%3 = load i8*, i8** %1
%4 = call i32 @free(i8* %3)
%5 = load i8*, i8** %1
%6 = call i32 @free(i8* %5)
ret void
}

LLVM IR (-O2):
define void @corrupt() {
%1 = tail call dereferenceable_or_null(10) i8* @malloc(i32 10)
%2 = tail call i32 @free(i8* %1)
%3 = tail call i32 @free(i8* %1)
ret void
}
void ExttFWStatusAuxTable(void) {}


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

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

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

LLVM IR (-O2):
define void @ExttFWStatusAuxTable() {
ret void
}
/* Variables and functions */
unsigned long bitmap_find_next_zero_area_off(unsigned long *, unsigned long,
                                             unsigned long, unsigned int,
                                             unsigned long, int /*<<< orphan*/);
unsigned long bitmap_find_next_zero_area(unsigned long *map, unsigned long size,
                                         unsigned long start, unsigned int nr,
                                         unsigned long align_mask) {
  return bitmap_find_next_zero_area_off(map, size, start, nr, align_mask, 0);
}


x86 assembly (clang, -O0):
<bitmap_find_next_zero_area>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %ecx,-0x1c(%rbp)
mov    %r8,-0x28(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
mov    -0x1c(%rbp),%ecx
mov    -0x28(%rbp),%r8
xor    %r9d,%r9d
call   1030 <bitmap_find_next_zero_area_off@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<bitmap_find_next_zero_area>:
xor    %r9d,%r9d
jmp    1030 <bitmap_find_next_zero_area_off@plt>

LLVM IR (-O0):
define i64 @bitmap_find_next_zero_area(i64* %0, i64 %1, i64 %2, i32 %3, i64 %4) {
%6 = alloca i64*
%7 = alloca i64
%8 = alloca i64
%9 = alloca i32
%10 = alloca i64
store i64* %0, i64** %6
store i64 %1, i64* %7
store i64 %2, i64* %8
store i32 %3, i32* %9
store i64 %4, i64* %10
%11 = load i64*, i64** %6
%12 = load i64, i64* %7
%13 = load i64, i64* %8
%14 = load i32, i32* %9
%15 = load i64, i64* %10
%16 = call i64 @bitmap_find_next_zero_area_off(i64* %11, i64 %12, i64 %13, i32 %14, i64 %15, i32 0)
ret i64 %16
}

LLVM IR (-O2):
define i64 @bitmap_find_next_zero_area(i64* %0, i64 %1, i64 %2, i32 %3, i64 %4) {
%6 = tail call i64 @bitmap_find_next_zero_area_off(i64* %0, i64 %1, i64 %2, i32 %3, i64 %4, i32 0)
ret i64 %6
}
/* Variables and functions */
int /*<<< orphan*/ enable_irq(unsigned int);
__attribute__((always_)) void
enable_irq_lockdep_irqrestore(unsigned int irq, unsigned long *flags) {
  enable_irq(irq);
}


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

x86 assembly (clang, -O2):
<enable_irq_lockdep_irqrestore>:
jmp    1030 <enable_irq@plt>

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

LLVM IR (-O2):
define void @enable_irq_lockdep_irqrestore(i32 %0, i64* nocapture readnone %1) {
%3 = tail call i32 @enable_irq(i32 %0)
ret void
}
/* Variables and functions */
scalar_t__ strcmp(char *, char *);
int opt_playername(char *opt) {
  if (strcmp(opt, "-n") == 0)
    return 1;
  if (strcmp(opt, "--name") == 0)
    return 1;
  return 0;
}


x86 assembly (clang, -O0):
<opt_playername>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
lea    0xed9(%rip),%rsi
call   1030 <strcmp@plt>
cmp    $0x0,%rax
jne    1142 <opt_playername+0x32>
movl   $0x1,-0x4(%rbp)
jmp    116f <opt_playername+0x5f>
mov    -0x10(%rbp),%rdi
lea    0xeb6(%rip),%rsi
call   1030 <strcmp@plt>
cmp    $0x0,%rax
jne    1168 <opt_playername+0x58>
movl   $0x1,-0x4(%rbp)
jmp    116f <opt_playername+0x5f>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<opt_playername>:
push   %rbx
mov    %rdi,%rbx
lea    0xee5(%rip),%rsi
call   1030 <strcmp@plt>
test   %rax,%rax
je     1141 <opt_playername+0x31>
lea    0xed7(%rip),%rsi
mov    %rbx,%rdi
call   1030 <strcmp@plt>
mov    %rax,%rcx
xor    %eax,%eax
test   %rcx,%rcx
sete   %al
pop    %rbx
ret
mov    $0x1,%eax
pop    %rbx
ret

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

LLVM IR (-O2):
@.str = [3 x i8] c"-n\00"
@.str.1 = [7 x i8] c"--name\00"
define i32 @opt_playername(i8* %0) {
%2 = tail call i64 @strcmp(i8* %0, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0))
%3 = icmp eq i64 %2, 0
br i1 %3, label %8, label %4
4: ; preds = %1
%5 = tail call i64 @strcmp(i8* %0, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0))
%6 = icmp eq i64 %5, 0
%7 = zext i1 %6 to i32
br label %8
8: ; preds = %4, %1
%9 = phi i32 [ 1, %1 ], [ %7, %4 ]
ret i32 %9
}
int get_stat(void) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @get_stat() {
ret i32 0
}
/* Variables and functions */
char *strrchr(char const *, char);
const char *lacf_basename(const char *str) {
  const char *sep = strrchr(str, '/');
  if (sep == NULL)
    return (str);
  return (&sep[1]);
}


x86 assembly (clang, -O0):
<lacf_basename>:
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 <lacf_basename+0x36>
mov    -0x10(%rbp),%rax
mov    %rax,-0x8(%rbp)
jmp    1152 <lacf_basename+0x42>
mov    -0x18(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<lacf_basename>:
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* @lacf_basename(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, i64 1
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* @lacf_basename(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
}
int IntCmp(const void *a, const void *b) { return *((int *)a) - *((int *)b); }


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

x86 assembly (clang, -O2):
<IntCmp>:
mov    (%rdi),%eax
sub    (%rsi),%eax
ret

LLVM IR (-O0):
define i32 @IntCmp(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 = bitcast i8* %5 to i32*
%7 = load i32, i32* %6
%8 = load i8*, i8** %4
%9 = bitcast i8* %8 to i32*
%10 = load i32, i32* %9
%11 = sub nsw i32 %7, %10
ret i32 %11
}

LLVM IR (-O2):
define i32 @IntCmp(i8* nocapture %0, i8* nocapture %1) {
%3 = bitcast i8* %0 to i32*
%4 = load i32, i32* %3
%5 = bitcast i8* %1 to i32*
%6 = load i32, i32* %5
%7 = sub nsw i32 %4, %6
ret i32 %7
}
/* Variables and functions */
void *malloc(int);
int /*<<< orphan*/ zfatal(char *, int);
void *zmalloc_malloc(int len) {
  void *r;
  if (len < 0) {
    len = 0;
  }
  if ((r = malloc(len)) == 0) {
    zfatal("FATAL zmalloc: insufficient memory for %d bytes: %m", len);
  }
  return r;
}


x86 assembly (clang, -O0):
<zmalloc_malloc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
cmpl   $0x0,-0x4(%rbp)
jge    113c <zmalloc_malloc+0x1c>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%edi
call   1040 <malloc@plt>
mov    %rax,-0x10(%rbp)
cmp    $0x0,%rax
jne    1161 <zmalloc_malloc+0x41>
mov    -0x4(%rbp),%esi
lea    0xea4(%rip),%rdi
call   1030 <zfatal@plt>
mov    -0x10(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<zmalloc_malloc>:
push   %r14
push   %rbx
push   %rax
xor    %ebx,%ebx
test   %edi,%edi
cmovns %edi,%ebx
mov    %ebx,%edi
call   1040 <malloc@plt>
mov    %rax,%r14
test   %rax,%rax
jne    1148 <zmalloc_malloc+0x28>
lea    0xebf(%rip),%rdi
mov    %ebx,%esi
call   1030 <zfatal@plt>
mov    %r14,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@.str = [52 x i8] c"FATAL zmalloc: insufficient memory for %d bytes: %m\00"
define i8* @zmalloc_malloc(i32 %0) {
%2 = alloca i32
%3 = alloca i8*
store i32 %0, i32* %2
%4 = load i32, i32* %2
%5 = icmp slt i32 %4, 0
br i1 %5, label %6, label %7
6: ; preds = %1
store i32 0, i32* %2
br label %7
7: ; preds = %6, %1
%8 = load i32, i32* %2
%9 = call i8* @malloc(i32 %8)
store i8* %9, i8** %3
%10 = icmp eq i8* %9, null
br i1 %10, label %11, label %14
11: ; preds = %7
%12 = load i32, i32* %2
%13 = call i32 @zfatal(i8* getelementptr inbounds ([52 x i8], [52 x i8]* @.str, i64 0, i64 0), i32 %12)
br label %14
14: ; preds = %11, %7
%15 = load i8*, i8** %3
ret i8* %15
}

LLVM IR (-O2):
@.str = [52 x i8] c"FATAL zmalloc: insufficient memory for %d bytes: %m\00"
define noalias i8* @zmalloc_malloc(i32 %0) {
%2 = icmp sgt i32 %0, 0
%3 = select i1 %2, i32 %0, i32 0
%4 = tail call i8* @malloc(i32 %3)
%5 = icmp eq i8* %4, null
br i1 %5, label %6, label %8
6: ; preds = %1
%7 = tail call i32 @zfatal(i8* getelementptr inbounds ([52 x i8], [52 x i8]* @.str, i64 0, i64 0), i32 %3)
br label %8
8: ; preds = %6, %1
ret i8* %4
}
int psmouse_smbus_module_init(void) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @psmouse_smbus_module_init() {
ret i32 0
}
int toupper(int c) {
  if (c >= 'a' && c <= 'z')
    return 'A' - 'a' + c;
  return c;
}


x86 assembly (clang, -O0):
<toupper>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
cmpl   $0x61,-0x8(%rbp)
jl     112b <toupper+0x2b>
cmpl   $0x7a,-0x8(%rbp)
jg     112b <toupper+0x2b>
mov    -0x8(%rbp),%eax
add    $0xffffffe0,%eax
mov    %eax,-0x4(%rbp)
jmp    1131 <toupper+0x31>
mov    -0x8(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<toupper>:
lea    -0x61(%rdi),%ecx
lea    -0x20(%rdi),%eax
cmp    $0x1a,%ecx
cmovae %edi,%eax
ret

LLVM IR (-O0):
define i32 @toupper(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %3
%4 = load i32, i32* %3
%5 = icmp sge i32 %4, 97
br i1 %5, label %6, label %12
6: ; preds = %1
%7 = load i32, i32* %3
%8 = icmp sle i32 %7, 122
br i1 %8, label %9, label %12
9: ; preds = %6
%10 = load i32, i32* %3
%11 = add nsw i32 -32, %10
store i32 %11, i32* %2
br label %14
12: ; preds = %6, %1
%13 = load i32, i32* %3
store i32 %13, i32* %2
br label %14
14: ; preds = %12, %9
%15 = load i32, i32* %2
ret i32 %15
}

LLVM IR (-O2):
define i32 @toupper(i32 %0) {
%2 = add i32 %0, -97
%3 = icmp ult i32 %2, 26
%4 = add nsw i32 %0, -32
%5 = select i1 %3, i32 %4, i32 %0
ret i32 %5
}
__attribute__((device)) void foodev() {}


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

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

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

LLVM IR (-O2):
define void @foodev() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ sha512_process_bytes(unsigned char const *, unsigned int,
                                        void *);
void sha512_update(void *context, unsigned char const *buf, unsigned int len) {
  sha512_process_bytes(buf, len, context);
}


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

x86 assembly (clang, -O2):
<sha512_update>:
mov    %rdi,%rax
mov    %rsi,%rdi
mov    %edx,%esi
mov    %rax,%rdx
jmp    1030 <sha512_process_bytes@plt>

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

LLVM IR (-O2):
define void @sha512_update(i8* %0, i8* %1, i32 %2) {
%4 = tail call i32 @sha512_process_bytes(i8* %1, i32 %2, i8* %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ Delay();
void Delay_us(int delayus) {
  while (delayus != 0) {
    Delay();
    delayus--;
  }
}


x86 assembly (clang, -O0):
<Delay_us>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
cmpl   $0x0,-0x4(%rbp)
je     113a <Delay_us+0x2a>
mov    $0x0,%al
call   1030 <Delay@plt>
mov    -0x4(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0x4(%rbp)
jmp    111b <Delay_us+0xb>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Delay_us>:
push   %rbx
test   %edi,%edi
je     112c <Delay_us+0x1c>
mov    %edi,%ebx
nopw   0x0(%rax,%rax,1)
xor    %eax,%eax
call   1030 <Delay@plt>
add    $0xffffffff,%ebx
jne    1120 <Delay_us+0x10>
pop    %rbx
ret

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

LLVM IR (-O2):
define void @Delay_us(i32 %0) {
%2 = icmp eq i32 %0, 0
br i1 %2, label %8, label %3
3: ; preds = %1, %3
%4 = phi i32 [ %6, %3 ], [ %0, %1 ]
%5 = tail call i32 (...) @Delay()
%6 = add nsw i32 %4, -1
%7 = icmp eq i32 %6, 0
br i1 %7, label %8, label %3
8: ; preds = %3, %1
ret void
}
/* Variables and functions */
int /*<<< orphan*/ gmx_bundle(int, char **);
int main(int argc, char *argv[]) {
  gmx_bundle(argc, argv);
  return 0;
}


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

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

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

LLVM IR (-O2):
define i32 @main(i32 %0, i8** %1) {
%3 = tail call i32 @gmx_bundle(i32 %0, i8** %1)
ret i32 0
}
void gtk_file_chooser_widget_new() {}


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

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

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

LLVM IR (-O2):
define void @gtk_file_chooser_widget_new() {
ret void
}
/* Type definitions */
struct tms {
  int dummy;
};
typedef int /*<<< orphan*/ clock_t;

/* Variables and functions */
int /*<<< orphan*/ times(struct tms *);
clock_t clock() {
  struct tms buf;
  return times(&buf);
}


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

x86 assembly (clang, -O2):
<clock>:
push   %rax
mov    %rsp,%rdi
call   1030 <times@plt>
pop    %rcx
ret

LLVM IR (-O0):
%struct.tms = type { i32 }
define i32 @clock() {
%1 = alloca %struct.tms
%2 = call i32 @times(%struct.tms* %1)
ret i32 %2
}

LLVM IR (-O2):
%struct.tms = type { i32 }
define i32 @clock() {
%1 = alloca %struct.tms
%2 = bitcast %struct.tms* %1 to i8*
%3 = call i32 @times(%struct.tms* %1)
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, ...);
int /*<<< orphan*/ scanf(char *, double *);
int /*<<< orphan*/ squareRoot(double);
int main() {
  double num = 0;
  printf("Enter number for finding square root:");
  scanf("%lf", &num);
  printf("Square root of %lf is %lf\n", num, squareRoot(num));
  return (0);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x10(%rbp)
lea    0xeb2(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xeca(%rip),%rdi
lea    -0x10(%rbp),%rsi
call   1040 <scanf@plt>
movsd  -0x10(%rbp),%xmm0
movsd  %xmm0,-0x18(%rbp)
movsd  -0x10(%rbp),%xmm0
call   1050 <squareRoot@plt>
movsd  -0x18(%rbp),%xmm0
mov    %eax,%esi
lea    0xea3(%rip),%rdi
mov    $0x1,%al
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
sub    $0x18,%rsp
movq   $0x0,0x8(%rsp)
lea    0xebc(%rip),%rdi
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xed4(%rip),%rdi
lea    0x8(%rsp),%rsi
call   1040 <scanf@plt>
movsd  0x8(%rsp),%xmm0
movsd  %xmm0,0x10(%rsp)
call   1050 <squareRoot@plt>
lea    0xeb6(%rip),%rdi
movsd  0x10(%rsp),%xmm0
mov    %eax,%esi
mov    $0x1,%al
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x18,%rsp
ret

LLVM IR (-O0):
@.str = [38 x i8] c"Enter number for finding square root:\00"
@.str.1 = [4 x i8] c"%lf\00"
@.str.2 = [27 x i8] c"Square root of %lf is %lf\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca double
store i32 0, i32* %1
store double 0.000000e+00, double* %2
%3 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str, i64 0, i64 0))
%4 = call i32 @scanf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), double* %2)
%5 = load double, double* %2
%6 = load double, double* %2
%7 = call i32 @squareRoot(double %6)
%8 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.2, i64 0, i64 0), double %5, i32 %7)
ret i32 0
}

LLVM IR (-O2):
@.str = [38 x i8] c"Enter number for finding square root:\00"
@.str.1 = [4 x i8] c"%lf\00"
@.str.2 = [27 x i8] c"Square root of %lf is %lf\0A\00"
define i32 @main() {
%1 = alloca double
%2 = bitcast double* %1 to i8*
store double 0.000000e+00, double* %1
%3 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([38 x i8], [38 x i8]* @.str, i64 0, i64 0))
%4 = call i32 @scanf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), double* %1)
%5 = load double, double* %1
%6 = call i32 @squareRoot(double %5)
%7 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([27 x i8], [27 x i8]* @.str.2, i64 0, i64 0), double %5, i32 %6)
ret i32 0
}
int is_hex(char c) {
  return (c >= '0' && c <= '9') || ((c | 0x20) >= 'a' && (c | 0x20) <= 'f');
}


x86 assembly (clang, -O0):
<is_hex>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movsbl -0x1(%rbp),%eax
cmp    $0x30,%eax
jl     1129 <is_hex+0x29>
movsbl -0x1(%rbp),%ecx
mov    $0x1,%al
cmp    $0x39,%ecx
mov    %al,-0x2(%rbp)
jle    1154 <is_hex+0x54>
movsbl -0x1(%rbp),%ecx
or     $0x20,%ecx
xor    %eax,%eax
cmp    $0x61,%ecx
mov    %al,-0x3(%rbp)
jl     114e <is_hex+0x4e>
movsbl -0x1(%rbp),%eax
or     $0x20,%eax
cmp    $0x66,%eax
setle  %al
mov    %al,-0x3(%rbp)
mov    -0x3(%rbp),%al
mov    %al,-0x2(%rbp)
mov    -0x2(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<is_hex>:
lea    -0x30(%rdi),%eax
cmp    $0xa,%al
setb   %al
or     $0x20,%dil
add    $0x9f,%dil
cmp    $0x6,%dil
setb   %cl
or     %al,%cl
movzbl %cl,%eax
ret

LLVM IR (-O0):
define i32 @is_hex(i8 signext %0) {
%2 = alloca i8
store i8 %0, i8* %2
%3 = load i8, i8* %2
%4 = sext i8 %3 to i32
%5 = icmp sge i32 %4, 48
br i1 %5, label %6, label %10
6: ; preds = %1
%7 = load i8, i8* %2
%8 = sext i8 %7 to i32
%9 = icmp sle i32 %8, 57
br i1 %9, label %22, label %10
10: ; preds = %6, %1
%11 = load i8, i8* %2
%12 = sext i8 %11 to i32
%13 = or i32 %12, 32
%14 = icmp sge i32 %13, 97
br i1 %14, label %15, label %20
15: ; preds = %10
%16 = load i8, i8* %2
%17 = sext i8 %16 to i32
%18 = or i32 %17, 32
%19 = icmp sle i32 %18, 102
br label %20
20: ; preds = %15, %10
%21 = phi i1 [ false, %10 ], [ %19, %15 ]
br label %22
22: ; preds = %20, %6
%23 = phi i1 [ true, %6 ], [ %21, %20 ]
%24 = zext i1 %23 to i32
ret i32 %24
}

LLVM IR (-O2):
define i32 @is_hex(i8 signext %0) {
%2 = add i8 %0, -48
%3 = icmp ult i8 %2, 10
%4 = or i8 %0, 32
%5 = add i8 %4, -97
%6 = icmp ult i8 %5, 6
%7 = or i1 %3, %6
%8 = zext i1 %7 to i32
ret i32 %8
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/ *, char *, char const *);
int /*<<< orphan*/ send_status(int /*<<< orphan*/ *, int, char const *);
char const *strlen(char const *);
void send_response(FILE *client, int code, const char *reason_phrase,
                   const char *message_body) {
  send_status(client, code, reason_phrase);
  fprintf(client, "Content-Length: %zu\r\n\r\n", strlen(message_body));
  fprintf(client, "%s", message_body);
}


x86 assembly (clang, -O0):
<send_response>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
mov    -0x18(%rbp),%rdx
call   1030 <send_status@plt>
mov    -0x8(%rbp),%rax
mov    %rax,-0x28(%rbp)
mov    -0x20(%rbp),%rdi
call   1040 <strlen@plt>
mov    -0x28(%rbp),%rdi
mov    %rax,%rdx
lea    0xe8a(%rip),%rsi
call   1050 <fprintf@plt>
mov    -0x8(%rbp),%rdi
mov    -0x20(%rbp),%rdx
lea    0xe8e(%rip),%rsi
call   1050 <fprintf@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<send_response>:
push   %r14
push   %rbx
push   %rax
mov    %rcx,%r14
mov    %rdi,%rbx
call   1030 <send_status@plt>
mov    %r14,%rdi
call   1040 <strlen@plt>
lea    0xea2(%rip),%rsi
mov    %rbx,%rdi
mov    %rax,%rdx
call   1060 <fprintf@plt>
mov    %r14,%rdi
mov    %rbx,%rsi
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1050 <fputs@plt>

LLVM IR (-O0):
@.str = [24 x i8] c"Content-Length: %zu\0D\0A\0D\0A\00"
@.str.1 = [3 x i8] c"%s\00"
define void @send_response(i32* %0, i32 %1, i8* %2, i8* %3) {
%5 = alloca i32*
%6 = alloca i32
%7 = alloca i8*
%8 = alloca i8*
store i32* %0, i32** %5
store i32 %1, i32* %6
store i8* %2, i8** %7
store i8* %3, i8** %8
%9 = load i32*, i32** %5
%10 = load i32, i32* %6
%11 = load i8*, i8** %7
%12 = call i32 @send_status(i32* %9, i32 %10, i8* %11)
%13 = load i32*, i32** %5
%14 = load i8*, i8** %8
%15 = call i8* @strlen(i8* %14)
%16 = call i32 @fprintf(i32* %13, i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str, i64 0, i64 0), i8* %15)
%17 = load i32*, i32** %5
%18 = load i8*, i8** %8
%19 = call i32 @fprintf(i32* %17, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i8* %18)
ret void
}

LLVM IR (-O2):
@.str = [24 x i8] c"Content-Length: %zu\0D\0A\0D\0A\00"
define void @send_response(i32* %0, i32 %1, i8* %2, i8* %3) {
%5 = tail call i32 @send_status(i32* %0, i32 %1, i8* %2)
%6 = tail call i8* @strlen(i8* %3)
%7 = tail call i32 @fprintf(i32* %0, i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str, i64 0, i64 0), i8* %6)
%8 = tail call i32 @fputs(i8* %3, i32* %0)
ret void
}
void RTHeapOffsetSize(void) {}


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

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

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

LLVM IR (-O2):
define void @RTHeapOffsetSize() {
ret void
}
const char *pathcon_nm4_name_in(int i) {
  switch (i) {
  case 0:
    return "i0";
  case 1:
    return "i1";
  default:
    return 0;
  }
}


x86 assembly (clang, -O0):
<pathcon_nm4_name_in>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0xc(%rbp)
mov    -0xc(%rbp),%eax
mov    %eax,-0x10(%rbp)
test   %eax,%eax
je     112b <pathcon_nm4_name_in+0x2b>
jmp    111a <pathcon_nm4_name_in+0x1a>
mov    -0x10(%rbp),%eax
sub    $0x1,%eax
je     113b <pathcon_nm4_name_in+0x3b>
jmp    114b <pathcon_nm4_name_in+0x4b>
lea    0xece(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    1153 <pathcon_nm4_name_in+0x53>
lea    0xec1(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    1153 <pathcon_nm4_name_in+0x53>
movq   $0x0,-0x8(%rbp)
mov    -0x8(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<pathcon_nm4_name_in>:
xor    %ecx,%ecx
cmp    $0x1,%edi
lea    0xef7(%rip),%rax
cmove  %rax,%rcx
test   %edi,%edi
lea    0xee7(%rip),%rax
cmovne %rcx,%rax
ret

LLVM IR (-O0):
@.str = [3 x i8] c"i0\00"
@.str.1 = [3 x i8] c"i1\00"
define i8* @pathcon_nm4_name_in(i32 %0) {
%2 = alloca i8*
%3 = alloca i32
store i32 %0, i32* %3
%4 = load i32, i32* %3
switch i32 %4, label %7 [
i32 0, label %5
i32 1, label %6
]
5: ; preds = %1
store i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8** %2
br label %8
6: ; preds = %1
store i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i8** %2
br label %8
7: ; preds = %1
store i8* null, i8** %2
br label %8
8: ; preds = %7, %6, %5
%9 = load i8*, i8** %2
ret i8* %9
}

LLVM IR (-O2):
@.str = [3 x i8] c"i0\00"
@.str.1 = [3 x i8] c"i1\00"
define i8* @pathcon_nm4_name_in(i32 %0) {
%2 = icmp eq i32 %0, 1
%3 = select i1 %2, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i8* null
%4 = icmp eq i32 %0, 0
%5 = select i1 %4, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* %3
ret i8* %5
}
/* Variables and functions */
int sync_wake(int, int);
int sync_wake_parent(int fd[2], int seq) { return sync_wake(fd[0], seq); }


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

x86 assembly (clang, -O2):
<sync_wake_parent>:
mov    (%rdi),%edi
jmp    1030 <sync_wake@plt>

LLVM IR (-O0):
define i32 @sync_wake_parent(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 = getelementptr inbounds i32, i32* %5, i64 0
%7 = load i32, i32* %6
%8 = load i32, i32* %4
%9 = call i32 @sync_wake(i32 %7, i32 %8)
ret i32 %9
}

LLVM IR (-O2):
define i32 @sync_wake_parent(i32* nocapture %0, i32 %1) {
%3 = load i32, i32* %0
%4 = tail call i32 @sync_wake(i32 %3, i32 %1)
ret i32 %4
}
int tegra_smmu_restore(void) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @tegra_smmu_restore() {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ write(int, char *, int);
int my_putchar(char c) {
  write(1, &c, 1);
  return (1);
}


x86 assembly (clang, -O0):
<my_putchar>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %dil,%al
mov    %al,-0x1(%rbp)
mov    $0x1,%edx
lea    -0x1(%rbp),%rsi
mov    %edx,%edi
call   1030 <write@plt>
mov    $0x1,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<my_putchar>:
push   %rax
mov    %dil,0x7(%rsp)
lea    0x7(%rsp),%rsi
mov    $0x1,%edi
mov    $0x1,%edx
call   1030 <write@plt>
mov    $0x1,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @my_putchar(i8 signext %0) {
%2 = alloca i8
store i8 %0, i8* %2
%3 = call i32 @write(i32 1, i8* %2, i32 1)
ret i32 1
}

LLVM IR (-O2):
define i32 @my_putchar(i8 signext %0) {
%2 = alloca i8
store i8 %0, i8* %2
%3 = call i32 @write(i32 1, i8* %2, i32 1)
ret i32 1
}
/* Type definitions */
typedef scalar_t__ pid_t;

/* Variables and functions */
int /*<<< orphan*/ exit(int /*<<< orphan*/);
scalar_t__ fork();
int /*<<< orphan*/ printf(char *, ...);
int main() {
  pid_t pid;
  pid = fork();
  if (pid == 0) {
    printf("Siamo nel figlio\n");
    exit(0);
  } else {
    printf("Siamo nel padre: %x\n", pid);
    while (1)
      ;
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x0,%al
call   1050 <fork@plt>
mov    %rax,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
jne    116a <main+0x3a>
lea    0xea4(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
xor    %edi,%edi
call   1040 <exit@plt>
mov    -0x10(%rbp),%rsi
lea    0xe9d(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    117c <main+0x4c>

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1060 <fork@plt>
test   %rax,%rax
je     1162 <main+0x22>
lea    0xeac(%rip),%rdi
mov    %rax,%rsi
xor    %eax,%eax
call   1040 <printf@plt>
xchg   %ax,%ax
jmp    1160 <main+0x20>
lea    0xeac(%rip),%rdi
call   1030 <puts@plt>
xor    %edi,%edi
call   1050 <exit@plt>

LLVM IR (-O0):
@.str = [18 x i8] c"Siamo nel figlio\0A\00"
@.str.1 = [21 x i8] c"Siamo nel padre: %x\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i64
store i32 0, i32* %1
%3 = call i64 (...) @fork()
store i64 %3, i64* %2
%4 = load i64, i64* %2
%5 = icmp eq i64 %4, 0
br i1 %5, label %6, label %9
6: ; preds = %0
%7 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0))
%8 = call i32 @exit(i32 0)
unreachable
9: ; preds = %0
%10 = load i64, i64* %2
%11 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.1, i64 0, i64 0), i64 %10)
br label %12
12: ; preds = %9, %12
br label %12
}

LLVM IR (-O2):
@.str.1 = [21 x i8] c"Siamo nel padre: %x\0A\00"
@str = [17 x i8] c"Siamo nel figlio\00"
define i32 @main() {
%1 = tail call i64 (...) @fork()
%2 = icmp eq i64 %1, 0
br i1 %2, label %3, label %6
3: ; preds = %0
%4 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([17 x i8], [17 x i8]* @str, i64 0, i64 0))
%5 = tail call i32 @exit(i32 0)
unreachable
6: ; preds = %0
%7 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([21 x i8], [21 x i8]* @.str.1, i64 0, i64 0), i64 %1)
br label %8
8: ; preds = %8, %6
br label %8
}
/* Variables and functions */
int /*<<< orphan*/ e_umsti(int, int);
void co__msti(int i, int vr) { e_umsti(i, vr); }


x86 assembly (clang, -O0):
<co__msti>:
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 <e_umsti@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<co__msti>:
jmp    1030 <e_umsti@plt>

LLVM IR (-O0):
define void @co__msti(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 @e_umsti(i32 %5, i32 %6)
ret void
}

LLVM IR (-O2):
define void @co__msti(i32 %0, i32 %1) {
%3 = tail call i32 @e_umsti(i32 %0, i32 %1)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ abort();
void assert_true(int val) {
  if (!val) {
    abort();
  }
}


x86 assembly (clang, -O0):
<assert_true>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
cmpl   $0x0,-0x4(%rbp)
jne    112c <assert_true+0x1c>
mov    $0x0,%al
call   1030 <abort@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<assert_true>:
test   %edi,%edi
je     1115 <assert_true+0x5>
ret
push   %rax
xor    %eax,%eax
call   1030 <abort@plt>

LLVM IR (-O0):
define void @assert_true(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = icmp ne i32 %3, 0
br i1 %4, label %7, label %5
5: ; preds = %1
%6 = call i32 (...) @abort()
unreachable
7: ; preds = %1
ret void
}

LLVM IR (-O2):
define void @assert_true(i32 %0) {
%2 = icmp eq i32 %0, 0
br i1 %2, label %3, label %5
3: ; preds = %1
%4 = tail call i32 (...) @abort()
unreachable
5: ; preds = %1
ret void
}
void main() {
  int i = 0;
  if (i != 0) {
  ERROR:
    return;
  }
  return;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
movl   $0x0,-0x4(%rbp)
cmpl   $0x0,-0x4(%rbp)
je     111f <main+0x1f>
jmp    111a <main+0x1a>
jmp    1124 <main+0x24>
jmp    1124 <main+0x24>
pop    %rbp
ret

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

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

LLVM IR (-O2):
define void @main() {
ret void
}
int makewild(void *x) { return *((int *)x); }


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

x86 assembly (clang, -O2):
<makewild>:
mov    (%rdi),%eax
ret

LLVM IR (-O0):
define i32 @makewild(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = bitcast i8* %3 to i32*
%5 = load i32, i32* %4
ret i32 %5
}

LLVM IR (-O2):
define i32 @makewild(i8* nocapture %0) {
%2 = bitcast i8* %0 to i32*
%3 = load i32, i32* %2
ret i32 %3
}
int client_access_val() { return 8; }


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

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

LLVM IR (-O0):
define i32 @client_access_val() {
ret i32 8
}

LLVM IR (-O2):
define i32 @client_access_val() {
ret i32 8
}
/* Variables and functions */
int /*<<< orphan*/ ERA;
char *nl_langinfo(int /*<<< orphan*/);
char *langinfo_era() { return nl_langinfo(ERA); }


x86 assembly (clang, -O0):
<langinfo_era>:
push   %rbp
mov    %rsp,%rbp
mov    0x2ec5(%rip),%rax
mov    (%rax),%edi
call   1030 <nl_langinfo@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<langinfo_era>:
mov    0x2ec9(%rip),%rax
mov    (%rax),%edi
jmp    1030 <nl_langinfo@plt>

LLVM IR (-O0):
@ERA = global i32 0
define i8* @langinfo_era() {
%1 = load i32, i32* @ERA
%2 = call i8* @nl_langinfo(i32 %1)
ret i8* %2
}

LLVM IR (-O2):
@ERA = global i32 0
define i8* @langinfo_era() {
%1 = load i32, i32* @ERA
%2 = tail call i8* @nl_langinfo(i32 %1)
ret i8* %2
}
int findleft(int *height, int size, int loc) {
  if (height[loc - 1] <= height[loc])
    return -1;
  else
    return loc - 1;
}


x86 assembly (clang, -O0):
<findleft>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    %esi,-0x14(%rbp)
mov    %edx,-0x18(%rbp)
mov    -0x10(%rbp),%rax
mov    -0x18(%rbp),%ecx
sub    $0x1,%ecx
movslq %ecx,%rcx
mov    (%rax,%rcx,4),%eax
mov    -0x10(%rbp),%rcx
movslq -0x18(%rbp),%rdx
cmp    (%rcx,%rdx,4),%eax
jg     113b <findleft+0x3b>
movl   $0xffffffff,-0x4(%rbp)
jmp    1144 <findleft+0x44>
mov    -0x18(%rbp),%eax
sub    $0x1,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<findleft>:
movslq %edx,%rax
mov    -0x4(%rdi,%rax,4),%ecx
cmp    (%rdi,%rax,4),%ecx
lea    -0x1(%rdx),%ecx
mov    $0xffffffff,%eax
cmovg  %ecx,%eax
ret

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

LLVM IR (-O2):
define i32 @findleft(i32* nocapture %0, i32 %1, i32 %2) {
%4 = add nsw i32 %2, -1
%5 = sext i32 %4 to i64
%6 = getelementptr inbounds i32, i32* %0, i64 %5
%7 = load i32, i32* %6
%8 = sext i32 %2 to i64
%9 = getelementptr inbounds i32, i32* %0, i64 %8
%10 = load i32, i32* %9
%11 = icmp sgt i32 %7, %10
%12 = select i1 %11, i32 %4, i32 -1
ret i32 %12
}
/* Type definitions */
typedef int /*<<< orphan*/ SVCXPRT;

/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
int /*<<< orphan*/ svc_destroy(int /*<<< orphan*/ *);
int /*<<< orphan*/ *svcfd_create(int, int, int);
int /*<<< orphan*/ xprt_register(int /*<<< orphan*/ *);
int main(int argn, char *argc[]) {
  int run_mode = 0;
  int test_status = 1;
  SVCXPRT *svcr = NULL;
  int fd = 0;
  svcr = svcfd_create(fd, 1024, 1024);
  xprt_register(svcr);
  test_status = 0;
  svc_destroy(svcr);
  printf("%d\n", test_status);
  return test_status;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
movl   $0x1,-0x18(%rbp)
movq   $0x0,-0x20(%rbp)
movl   $0x0,-0x24(%rbp)
mov    -0x24(%rbp),%edi
mov    $0x400,%edx
mov    %edx,%esi
call   1060 <svcfd_create@plt>
mov    %rax,-0x20(%rbp)
mov    -0x20(%rbp),%rdi
call   1050 <xprt_register@plt>
movl   $0x0,-0x18(%rbp)
mov    -0x20(%rbp),%rdi
call   1040 <svc_destroy@plt>
mov    -0x18(%rbp),%esi
lea    0xe57(%rip),%rdi
call   1030 <printf@plt>
mov    -0x18(%rbp),%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
xor    %edi,%edi
mov    $0x400,%esi
mov    $0x400,%edx
call   1060 <svcfd_create@plt>
mov    %rax,%rbx
mov    %rax,%rdi
call   1050 <xprt_register@plt>
mov    %rbx,%rdi
call   1040 <svc_destroy@plt>
lea    0xe94(%rip),%rdi
xor    %esi,%esi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [4 x i8] c"%d\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32*
%9 = alloca i32
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
store i32 0, i32* %6
store i32 1, i32* %7
store i32* null, i32** %8
store i32 0, i32* %9
%10 = load i32, i32* %9
%11 = call i32* @svcfd_create(i32 %10, i32 1024, i32 1024)
store i32* %11, i32** %8
%12 = load i32*, i32** %8
%13 = call i32 @xprt_register(i32* %12)
store i32 0, i32* %7
%14 = load i32*, i32** %8
%15 = call i32 @svc_destroy(i32* %14)
%16 = load i32, i32* %7
%17 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %16)
%18 = load i32, i32* %7
ret i32 %18
}

LLVM IR (-O2):
@.str = [4 x i8] c"%d\0A\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32* @svcfd_create(i32 0, i32 1024, i32 1024)
%4 = tail call i32 @xprt_register(i32* %3)
%5 = tail call i32 @svc_destroy(i32* %3)
%6 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 0)
ret i32 0
}
long fixmul32(long x, long y) {
  long long temp;
  temp = x;
  temp *= y;
  temp >>= 20;
  return (long)temp;
}


x86 assembly (clang, -O0):
<fixmul32>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x10(%rbp),%rax
imul   -0x18(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rax
sar    $0x14,%rax
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<fixmul32>:
mov    %rdi,%rax
imul   %rsi,%rax
sar    $0x14,%rax
ret

LLVM IR (-O0):
define i64 @fixmul32(i64 %0, i64 %1) {
%3 = alloca i64
%4 = alloca i64
%5 = alloca i64
store i64 %0, i64* %3
store i64 %1, i64* %4
%6 = load i64, i64* %3
store i64 %6, i64* %5
%7 = load i64, i64* %4
%8 = load i64, i64* %5
%9 = mul nsw i64 %8, %7
store i64 %9, i64* %5
%10 = load i64, i64* %5
%11 = ashr i64 %10, 20
store i64 %11, i64* %5
%12 = load i64, i64* %5
ret i64 %12
}

LLVM IR (-O2):
define i64 @fixmul32(i64 %0, i64 %1) {
%3 = mul nsw i64 %1, %0
%4 = ashr i64 %3, 20
ret i64 %4
}
void t100() {
  unsigned char i;
  for (i = 0; i < 100; i++) {
  }
}


x86 assembly (clang, -O0):
push   %rbp
mov    %rsp,%rbp
movb   $0x0,-0x1(%rbp)
movzbl -0x1(%rbp),%eax
cmp    $0x64,%eax
jge    1127 <t100+0x27>
jmp    111a <t100+0x1a>
mov    -0x1(%rbp),%al
add    $0x1,%al
mov    %al,-0x1(%rbp)
jmp    1108 <t100+0x8>
pop    %rbp
ret

x86 assembly (clang, -O2):
ret

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

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