xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ printf(char *, double);
double squareRoot(double);
int main(void) {
  printf("squareRoot(8863) = %f\n", squareRoot(8863));
  printf("squareRoot(0.00000005) = %f\n", squareRoot(0.00000005));
  printf("squareRoot(144.0) = %f\n", squareRoot(144.0));
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movsd  0xed9(%rip),%xmm0
call   1040 <squareRoot@plt>
lea    0xed5(%rip),%rdi
call   1030 <printf@plt>
movsd  0xeb8(%rip),%xmm0
call   1040 <squareRoot@plt>
lea    0xed3(%rip),%rdi
call   1030 <printf@plt>
movsd  0xe97(%rip),%xmm0
call   1040 <squareRoot@plt>
lea    0xed7(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
movsd  0xed7(%rip),%xmm0
call   1040 <squareRoot@plt>
lea    0xee3(%rip),%rdi
call   1030 <printf@plt>
movsd  0xec6(%rip),%xmm0
call   1040 <squareRoot@plt>
lea    0xee1(%rip),%rdi
call   1030 <printf@plt>
movsd  0xeb5(%rip),%xmm0
call   1040 <squareRoot@plt>
lea    0xee5(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [23 x i8] c"squareRoot(8863) = %f\0A\00"
@.str.1 = [29 x i8] c"squareRoot(0.00000005) = %f\0A\00"
@.str.2 = [24 x i8] c"squareRoot(144.0) = %f\0A\00"
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call double @squareRoot(double 8.863000e+03)
%3 = call i32 @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str, i64 0, i64 0), double %2)
%4 = call double @squareRoot(double 5.000000e-08)
%5 = call i32 @printf(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0), double %4)
%6 = call double @squareRoot(double 1.440000e+02)
%7 = call i32 @printf(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.2, i64 0, i64 0), double %6)
ret i32 0
}

LLVM IR (-O2):
@.str = [23 x i8] c"squareRoot(8863) = %f\0A\00"
@.str.1 = [29 x i8] c"squareRoot(0.00000005) = %f\0A\00"
@.str.2 = [24 x i8] c"squareRoot(144.0) = %f\0A\00"
define i32 @main() {
%1 = tail call double @squareRoot(double 8.863000e+03)
%2 = tail call i32 @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str, i64 0, i64 0), double %1)
%3 = tail call double @squareRoot(double 5.000000e-08)
%4 = tail call i32 @printf(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0), double %3)
%5 = tail call double @squareRoot(double 1.440000e+02)
%6 = tail call i32 @printf(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.2, i64 0, i64 0), double %5)
ret i32 0
}
unsigned long pfn_to_mfn(unsigned long pfn) { return pfn; }


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

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

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

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


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

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

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

LLVM IR (-O2):
define void @XkbGetVirtualMods() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ testloop();
int main() {
  testloop();
  return 0;
}


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

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

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

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @testloop()
ret i32 0
}
void s3c6410_default_sdhci0(void) {}


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

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

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

LLVM IR (-O2):
define void @s3c6410_default_sdhci0() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ EXIT_SUCCESS;
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ printf(char *);
void usage_and_quit() {
  printf("Usage: codecounter [-h|--help]\n");
  printf("       codecounter PATH ...\n");
  printf("\nstatistics your source code. supply some files or dirs\n"
         "codecounter will print how many lines of code, blank and\n"
         "comment in you project\n\n");
  exit(EXIT_SUCCESS);
}


x86 assembly (clang, -O0):
<usage_and_quit>:
push   %rbp
mov    %rsp,%rbp
lea    0xed5(%rip),%rdi
call   1030 <printf@plt>
lea    0xee9(%rip),%rdi
call   1030 <printf@plt>
lea    0xefa(%rip),%rdi
call   1030 <printf@plt>
mov    0x2e91(%rip),%rax
mov    (%rax),%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<usage_and_quit>:
push   %rax
lea    0xed8(%rip),%rdi
call   1030 <puts@plt>
lea    0xeeb(%rip),%rdi
call   1030 <puts@plt>
lea    0xefb(%rip),%rdi
call   1030 <puts@plt>
mov    0x2e94(%rip),%rax
mov    (%rax),%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@.str = [32 x i8] c"Usage: codecounter [-h|--help]\0A\00"
@.str.1 = [29 x i8] c" codecounter PATH ...\0A\00"
@.str.2 = [138 x i8] c"\0Astatistics your source code. supply some files or dirs\0Acodecounter will print how many lines of code, blank and\0Acomment in you project\0A\0A\00"
@EXIT_SUCCESS = global i32 0
define void @usage_and_quit() {
%1 = call i32 @printf(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str, i64 0, i64 0))
%2 = call i32 @printf(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0))
%3 = call i32 @printf(i8* getelementptr inbounds ([138 x i8], [138 x i8]* @.str.2, i64 0, i64 0))
%4 = load i32, i32* @EXIT_SUCCESS
%5 = call i32 @exit(i32 %4)
unreachable
}

LLVM IR (-O2):
@EXIT_SUCCESS = global i32 0
@str = [31 x i8] c"Usage: codecounter [-h|--help]\00"
@str.3 = [28 x i8] c" codecounter PATH ...\00"
@str.4 = [137 x i8] c"\0Astatistics your source code. supply some files or dirs\0Acodecounter will print how many lines of code, blank and\0Acomment in you project\0A\00"
define void @usage_and_quit() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([31 x i8], [31 x i8]* @str, i64 0, i64 0))
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([28 x i8], [28 x i8]* @str.3, i64 0, i64 0))
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([137 x i8], [137 x i8]* @str.4, i64 0, i64 0))
%4 = load i32, i32* @EXIT_SUCCESS
%5 = tail call i32 @exit(i32 %4)
unreachable
}
double d_sq(double f) { return f * f; }


x86 assembly (clang, -O0):
<d_sq>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
mulsd  -0x8(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<d_sq>:
mulsd  %xmm0,%xmm0
ret

LLVM IR (-O0):
define double @d_sq(double %0) {
%2 = alloca double
store double %0, double* %2
%3 = load double, double* %2
%4 = load double, double* %2
%5 = fmul double %3, %4
ret double %5
}

LLVM IR (-O2):
define double @d_sq(double %0) {
%2 = fmul double %0, %0
ret double %2
}
int integral(int t) { return (t == (-1) || t == (-2) || t == (-3)); }


x86 assembly (clang, -O0):
<integral>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    $0x1,%al
cmpl   $0xffffffff,-0x4(%rbp)
mov    %al,-0x5(%rbp)
je     112f <integral+0x2f>
mov    $0x1,%al
cmpl   $0xfffffffe,-0x4(%rbp)
mov    %al,-0x5(%rbp)
je     112f <integral+0x2f>
cmpl   $0xfffffffd,-0x4(%rbp)
sete   %al
mov    %al,-0x5(%rbp)
mov    -0x5(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<integral>:
xor    %eax,%eax
cmp    $0xfffffffd,%edi
setae  %al
ret

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

LLVM IR (-O2):
define i32 @integral(i32 %0) {
%2 = icmp ugt i32 %0, -4
%3 = zext i1 %2 to i32
ret i32 %3
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ SEEK_SET;
int /*<<< orphan*/ fread(int *, int, int, int /*<<< orphan*/ *);
int /*<<< orphan*/ fseek(int /*<<< orphan*/ *, int, int /*<<< orphan*/);
int get_audio_frq(FILE *file) {
  int ret;
  fseek(file, 24, SEEK_SET);
  fread(&ret, 4, 1, file);
  return ret;
}


x86 assembly (clang, -O0):
<get_audio_frq>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
mov    0x2ea9(%rip),%rax
mov    (%rax),%edx
mov    $0x18,%esi
call   1040 <fseek@plt>
mov    -0x8(%rbp),%rcx
lea    -0xc(%rbp),%rdi
mov    $0x4,%esi
mov    $0x1,%edx
call   1030 <fread@plt>
mov    -0xc(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_audio_frq>:
push   %rbx
sub    $0x10,%rsp
mov    %rdi,%rbx
mov    0x2eb1(%rip),%rax
mov    (%rax),%edx
mov    $0x18,%esi
call   1040 <fseek@plt>
lea    0xc(%rsp),%rdi
mov    $0x4,%esi
mov    $0x1,%edx
mov    %rbx,%rcx
call   1030 <fread@plt>
mov    0xc(%rsp),%eax
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@SEEK_SET = global i32 0
define i32 @get_audio_frq(i32* %0) {
%2 = alloca i32*
%3 = alloca i32
store i32* %0, i32** %2
%4 = load i32*, i32** %2
%5 = load i32, i32* @SEEK_SET
%6 = call i32 @fseek(i32* %4, i32 24, i32 %5)
%7 = load i32*, i32** %2
%8 = call i32 @fread(i32* %3, i32 4, i32 1, i32* %7)
%9 = load i32, i32* %3
ret i32 %9
}

LLVM IR (-O2):
@SEEK_SET = global i32 0
define i32 @get_audio_frq(i32* nocapture %0) {
%2 = alloca i32
%3 = bitcast i32* %2 to i8*
%4 = load i32, i32* @SEEK_SET
%5 = tail call i32 @fseek(i32* %0, i32 24, i32 %4)
%6 = call i32 @fread(i32* %2, i32 4, i32 1, i32* %0)
%7 = load i32, i32* %2
ret i32 %7
}
int output_args(char *p) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @output_args(i8* nocapture readnone %0) {
ret i32 0
}
int add513(int a, int *b) {
  int c = a + 513;
  if (c == 0)
    *b = a;
  return c;
}


x86 assembly (clang, -O0):
<add513>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x4(%rbp),%eax
add    $0x201,%eax
mov    %eax,-0x14(%rbp)
cmpl   $0x0,-0x14(%rbp)
jne    1129 <add513+0x29>
mov    -0x4(%rbp),%ecx
mov    -0x10(%rbp),%rax
mov    %ecx,(%rax)
mov    -0x14(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<add513>:
mov    %edi,%eax
add    $0x201,%eax
je     110a <add513+0xa>
ret
mov    %edi,(%rsi)
ret

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

LLVM IR (-O2):
define i32 @add513(i32 %0, i32* nocapture writeonly %1) {
%3 = add nsw i32 %0, 513
%4 = icmp eq i32 %3, 0
br i1 %4, label %5, label %6
5: ; preds = %2
store i32 %0, i32* %1
br label %6
6: ; preds = %5, %2
ret i32 %3
}
void ScaleARGBRowDown2_SSE2() {}


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

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

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

LLVM IR (-O2):
define void @ScaleARGBRowDown2_SSE2() {
ret void
}
/* Variables and functions */
scalar_t__ strlen(char *);
int /*<<< orphan*/ write(int, char *, scalar_t__);
void Body_print(int fd, char *s) {
  write(fd, s, strlen(s) + 1);
  return;
}


x86 assembly (clang, -O0):
<Body_print>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x4(%rbp),%eax
mov    %eax,-0x1c(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x10(%rbp),%rdi
call   1040 <strlen@plt>
mov    -0x1c(%rbp),%edi
mov    -0x18(%rbp),%rsi
mov    %rax,%rdx
add    $0x1,%rdx
call   1030 <write@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Body_print>:
push   %rbp
push   %rbx
push   %rax
mov    %rsi,%rbx
mov    %edi,%ebp
mov    %rsi,%rdi
call   1040 <strlen@plt>
lea    0x1(%rax),%rdx
mov    %ebp,%edi
mov    %rbx,%rsi
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    1030 <write@plt>

LLVM IR (-O0):
define void @Body_print(i32 %0, i8* %1) {
%3 = alloca i32
%4 = alloca i8*
store i32 %0, i32* %3
store i8* %1, i8** %4
%5 = load i32, i32* %3
%6 = load i8*, i8** %4
%7 = load i8*, i8** %4
%8 = call i64 @strlen(i8* %7)
%9 = add nsw i64 %8, 1
%10 = call i32 @write(i32 %5, i8* %6, i64 %9)
ret void
}

LLVM IR (-O2):
define void @Body_print(i32 %0, i8* nocapture %1) {
%3 = tail call i64 @strlen(i8* dereferenceable(1) %1)
%4 = add nsw i64 %3, 1
%5 = tail call i32 @write(i32 %0, i8* %1, i64 %4)
ret void
}
/* Type definitions */
struct servent {
  int dummy;
};

/* Variables and functions */
scalar_t__ getservbyport_r(int, char const *, struct servent *, void *, int,
                           struct servent **);
struct servent *getservbyport(int port, const char *prots) {
  static struct servent se;
  static long buf[32 / sizeof(long)];
  struct servent *res;
  if (getservbyport_r(port, prots, &se, (void *)buf, sizeof buf, &res))
    return 0;
  return &se;
}


x86 assembly (clang, -O0):
<getservbyport>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0xc(%rbp)
mov    %rsi,-0x18(%rbp)
mov    -0xc(%rbp),%edi
mov    -0x18(%rbp),%rsi
lea    0x2f13(%rip),%rdx
lea    0x2f1c(%rip),%rcx
mov    $0x20,%r8d
lea    -0x20(%rbp),%r9
call   1030 <getservbyport_r@plt>
cmp    $0x0,%rax
je     115a <getservbyport+0x4a>
movq   $0x0,-0x8(%rbp)
jmp    1165 <getservbyport+0x55>
lea    0x2edf(%rip),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<getservbyport>:
push   %rbx
sub    $0x10,%rsp
lea    0x2f24(%rip),%rbx
lea    0x2f2d(%rip),%rcx
lea    0x8(%rsp),%r9
mov    %rbx,%rdx
mov    $0x20,%r8d
call   1030 <getservbyport_r@plt>
xor    %ecx,%ecx
test   %rax,%rax
cmove  %rbx,%rcx
mov    %rcx,%rax
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
%struct.servent = type { i32 }
@getservbyport.se = internal global %struct.servent zeroinitializer
@getservbyport.buf = internal global [4 x i64] zeroinitializer
define %struct.servent* @getservbyport(i32 %0, i8* %1) {
%3 = alloca %struct.servent*
%4 = alloca i32
%5 = alloca i8*
%6 = alloca %struct.servent*
store i32 %0, i32* %4
store i8* %1, i8** %5
%7 = load i32, i32* %4
%8 = load i8*, i8** %5
%9 = call i64 @getservbyport_r(i32 %7, i8* %8, %struct.servent* @getservbyport.se, i8* bitcast ([4 x i64]* @getservbyport.buf to i8*), i32 32, %struct.servent** %6)
%10 = icmp ne i64 %9, 0
br i1 %10, label %11, label %12
11: ; preds = %2
store %struct.servent* null, %struct.servent** %3
br label %13
12: ; preds = %2
store %struct.servent* @getservbyport.se, %struct.servent** %3
br label %13
13: ; preds = %12, %11
%14 = load %struct.servent*, %struct.servent** %3
ret %struct.servent* %14
}

LLVM IR (-O2):
%struct.servent = type { i32 }
@getservbyport.se = internal global %struct.servent zeroinitializer
@getservbyport.buf = internal global [4 x i64] zeroinitializer
define %struct.servent* @getservbyport(i32 %0, i8* %1) {
%3 = alloca %struct.servent*
%4 = bitcast %struct.servent** %3 to i8*
%5 = call i64 @getservbyport_r(i32 %0, i8* %1, %struct.servent* @getservbyport.se, i8* bitcast ([4 x i64]* @getservbyport.buf to i8*), i32 32, %struct.servent** %3)
%6 = icmp eq i64 %5, 0
%7 = select i1 %6, %struct.servent* @getservbyport.se, %struct.servent* null
ret %struct.servent* %7
}
/* Variables and functions */
char *path_last_sep(char const *);
const char *base_name(const char *name) {
  const char *sep;
  return (name && (sep = path_last_sep(name))) ? sep + 1 : name;
}


x86 assembly (clang, -O0):
<base_name>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
cmpq   $0x0,-0x8(%rbp)
je     114f <base_name+0x3f>
mov    -0x8(%rbp),%rdi
call   1030 <path_last_sep@plt>
mov    %rax,-0x10(%rbp)
cmp    $0x0,%rax
je     114f <base_name+0x3f>
mov    -0x10(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x18(%rbp)
jmp    1157 <base_name+0x47>
mov    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<base_name>:
test   %rdi,%rdi
je     112e <base_name+0x1e>
push   %rbx
mov    %rdi,%rbx
call   1030 <path_last_sep@plt>
mov    %rax,%rcx
add    $0x1,%rax
test   %rcx,%rcx
cmove  %rbx,%rax
pop    %rbx
ret
xor    %eax,%eax
ret

LLVM IR (-O0):
define i8* @base_name(i8* %0) {
%2 = alloca i8*
%3 = alloca i8*
store i8* %0, i8** %2
%4 = load i8*, i8** %2
%5 = icmp ne i8* %4, null
br i1 %5, label %6, label %13
6: ; preds = %1
%7 = load i8*, i8** %2
%8 = call i8* @path_last_sep(i8* %7)
store i8* %8, i8** %3
%9 = icmp ne i8* %8, null
br i1 %9, label %10, label %13
10: ; preds = %6
%11 = load i8*, i8** %3
%12 = getelementptr inbounds i8, i8* %11, i64 1
br label %15
13: ; preds = %6, %1
%14 = load i8*, i8** %2
br label %15
15: ; preds = %13, %10
%16 = phi i8* [ %12, %10 ], [ %14, %13 ]
ret i8* %16
}

LLVM IR (-O2):
define i8* @base_name(i8* %0) {
%2 = icmp eq i8* %0, null
br i1 %2, label %8, label %3
3: ; preds = %1
%4 = tail call i8* @path_last_sep(i8* %0)
%5 = icmp eq i8* %4, null
%6 = getelementptr inbounds i8, i8* %4, i64 1
%7 = select i1 %5, i8* %0, i8* %6
br label %8
8: ; preds = %3, %1
%9 = phi i8* [ null, %1 ], [ %7, %3 ]
ret i8* %9
}
/* Type definitions */
typedef int /*<<< orphan*/ array;

/* Variables and functions */
int /*<<< orphan*/ es7(float *, int);
int main() {
  float array[] = {35.4, 46.7, 77.55, 11.1, 9.04, 0.75};
  es7(array, sizeof(array) / sizeof(array[0]));
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    0xee1(%rip),%rax
mov    %rax,-0x20(%rbp)
mov    0xede(%rip),%rax
mov    %rax,-0x18(%rbp)
mov    0xedb(%rip),%rax
mov    %rax,-0x10(%rbp)
lea    -0x20(%rbp),%rdi
mov    $0x6,%esi
call   1030 <es7@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
sub    $0x18,%rsp
mov    0xef5(%rip),%rax
mov    %rax,0x10(%rsp)
movaps 0xed9(%rip),%xmm0
movaps %xmm0,(%rsp)
mov    %rsp,%rdi
mov    $0x6,%esi
call   1030 <es7@plt>
xor    %eax,%eax
add    $0x18,%rsp
ret

LLVM IR (-O0):
@__const.main.array = [6 x float] [float 0x4041B33340000000, float 0x40475999A0000000, float 0x4053633340000000, float 0x4026333340000000, float 0x4022147AE0000000, float 7.500000e-01]
define i32 @main() {
%1 = alloca [6 x float]
%2 = bitcast [6 x float]* %1 to i8*
%3 = getelementptr inbounds [6 x float], [6 x float]* %1, i64 0, i64 0
%4 = call i32 @es7(float* %3, i32 6)
ret i32 0
}

LLVM IR (-O2):
@__const.main.array = [6 x float] [float 0x4041B33340000000, float 0x40475999A0000000, float 0x4053633340000000, float 0x4026333340000000, float 0x4022147AE0000000, float 7.500000e-01]
define i32 @main() {
%1 = alloca [6 x float]
%2 = bitcast [6 x float]* %1 to i8*
%3 = getelementptr inbounds [6 x float], [6 x float]* %1, i64 0, i64 0
%4 = call i32 @es7(float* %3, i32 6)
ret i32 0
}
/* Variables and functions */
int getopt(int const, char *const *, char const *);
int xgetopt(const int argc, char *const *argv, const char *opts) {
  return getopt(argc, argv, opts);
}


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

x86 assembly (clang, -O2):
<xgetopt>:
jmp    1030 <getopt@plt>

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

LLVM IR (-O2):
define i32 @xgetopt(i32 %0, i8** %1, i8* %2) {
%4 = tail call i32 @getopt(i32 %0, i8** %1, i8* %2)
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ conf_parse(char *);
int /*<<< orphan*/ menu__xgettext();
int /*<<< orphan*/ menu_build_message_list(int /*<<< orphan*/);
int /*<<< orphan*/ menu_get_root_menu(int /*<<< orphan*/ *);
int main(int ac, char **av) {
  conf_parse(av[1]);
  menu_build_message_list(menu_get_root_menu(NULL));
  menu__xgettext();
  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    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
call   1040 <conf_parse@plt>
xor    %eax,%eax
mov    %eax,%edi
call   1030 <menu_get_root_menu@plt>
mov    %eax,%edi
call   1050 <menu_build_message_list@plt>
mov    $0x0,%al
call   1060 <menu__xgettext@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    0x8(%rsi),%rdi
call   1040 <conf_parse@plt>
xor    %edi,%edi
call   1030 <menu_get_root_menu@plt>
mov    %eax,%edi
call   1050 <menu_build_message_list@plt>
xor    %eax,%eax
call   1060 <menu__xgettext@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 i8**, i8*** %5
%7 = getelementptr inbounds i8*, i8** %6, i64 1
%8 = load i8*, i8** %7
%9 = call i32 @conf_parse(i8* %8)
%10 = call i32 @menu_get_root_menu(i32* null)
%11 = call i32 @menu_build_message_list(i32 %10)
%12 = call i32 (...) @menu__xgettext()
ret i32 0
}

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = getelementptr inbounds i8*, i8** %1, i64 1
%4 = load i8*, i8** %3
%5 = tail call i32 @conf_parse(i8* %4)
%6 = tail call i32 @menu_get_root_menu(i32* null)
%7 = tail call i32 @menu_build_message_list(i32 %6)
%8 = tail call i32 (...) @menu__xgettext()
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ dis();
int /*<<< orphan*/ game();
int /*<<< orphan*/ init();
int main() {
  init();
  dis();
  game();
  return 0;
}


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

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

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

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @init()
%2 = tail call i32 (...) @dis()
%3 = tail call i32 (...) @game()
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ usleep(int);
void doSomething() { usleep(500000); }


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

x86 assembly (clang, -O2):
<doSomething>:
mov    $0x7a120,%edi
jmp    1030 <usleep@plt>

LLVM IR (-O0):
define void @doSomething() {
%1 = call i32 @usleep(i32 500000)
ret void
}

LLVM IR (-O2):
define void @doSomething() {
%1 = tail call i32 @usleep(i32 500000)
ret void
}
indirect(typeobj) char typeobj;
{
  ol("tfr\td,y");
  if (typeobj == (1 << 2))
    ol("ldb\t(y)\n\tsex");
  else
    ol("ldd\t(y)");
}


x86 assembly (clang, -O0):
<indirect>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %dil,%al
mov    %al,-0x5(%rbp)
lea    0xedb(%rip),%rdi
mov    $0x0,%al
call   1030 <ol@plt>
movsbl -0x5(%rbp),%eax
cmp    $0x4,%eax
jne    114c <indirect+0x3c>
lea    0xec8(%rip),%rdi
mov    $0x0,%al
call   1030 <ol@plt>
jmp    115a <indirect+0x4a>
lea    0xec2(%rip),%rdi
mov    $0x0,%al
call   1030 <ol@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<indirect>:
push   %rbx
mov    %edi,%ebx
lea    0xee6(%rip),%rdi
xor    %eax,%eax
call   1030 <ol@plt>
cmp    $0x4,%bl
lea    0xedd(%rip),%rax
lea    0xee3(%rip),%rdi
cmove  %rax,%rdi
xor    %eax,%eax
pop    %rbx
jmp    1030 <ol@plt>

LLVM IR (-O0):
@.str = [8 x i8] c"tfr\09d,y\00"
@.str.1 = [13 x i8] c"ldb\09(y)\0A\09sex\00"
@.str.2 = [8 x i8] c"ldd\09(y)\00"
define i32 @indirect(i32 %0) {
%2 = alloca i32
%3 = alloca i8
%4 = trunc i32 %0 to i8
store i8 %4, i8* %3
%5 = call i32 (i8*, ...) bitcast (i32 (...)* @ol to i32 (i8*, ...)*)(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0))
%6 = load i8, i8* %3
%7 = sext i8 %6 to i32
%8 = icmp eq i32 %7, 4
br i1 %8, label %9, label %11
9: ; preds = %1
%10 = call i32 (i8*, ...) bitcast (i32 (...)* @ol to i32 (i8*, ...)*)(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.1, i64 0, i64 0))
br label %13
11: ; preds = %1
%12 = call i32 (i8*, ...) bitcast (i32 (...)* @ol to i32 (i8*, ...)*)(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.2, i64 0, i64 0))
br label %13
13: ; preds = %11, %9
%14 = load i32, i32* %2
ret i32 %14
}

LLVM IR (-O2):
@.str = [8 x i8] c"tfr\09d,y\00"
@.str.1 = [13 x i8] c"ldb\09(y)\0A\09sex\00"
@.str.2 = [8 x i8] c"ldd\09(y)\00"
define i32 @indirect(i32 %0) {
%2 = tail call i32 (i8*, ...) bitcast (i32 (...)* @ol to i32 (i8*, ...)*)(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0))
%3 = and i32 %0, 255
%4 = icmp eq i32 %3, 4
%5 = select i1 %4, i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.2, i64 0, i64 0)
%6 = tail call i32 (i8*, ...) bitcast (i32 (...)* @ol to i32 (i8*, ...)*)(i8* %5)
ret i32 undef
}
/* Variables and functions */
double get_mtrand_int32();
double get_mtrand_float(void) {
  return get_mtrand_int32() * (1.0 / 4294967296.0);
}


x86 assembly (clang, -O0):
<get_mtrand_float>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1030 <get_mtrand_int32@plt>
movsd  0xedd(%rip),%xmm1
mulsd  %xmm1,%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_mtrand_float>:
push   %rax
xor    %eax,%eax
call   1030 <get_mtrand_int32@plt>
mulsd  0xee0(%rip),%xmm0
pop    %rax
ret

LLVM IR (-O0):
define double @get_mtrand_float() {
%1 = call double (...) @get_mtrand_int32()
%2 = fmul double %1, 0x3DF0000000000000
ret double %2
}

LLVM IR (-O2):
define double @get_mtrand_float() {
%1 = tail call double (...) @get_mtrand_int32()
%2 = fmul double %1, 0x3DF0000000000000
ret double %2
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void version_banner(void) {
  printf("ufat version 20120528\n"
         "Copyright (C) 2012 TracMap Holdings Ltd\n"
         "This is free software; see the source for copying conditions. There "
         "is NO\n"
         "warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR "
         "PURPOSE.\n");
}


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

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

LLVM IR (-O0):
@.str = [213 x i8] c"ufat version 20120528\0ACopyright (C) 2012 TracMap Holdings Ltd\0AThis is free software; see the source for copying conditions. There is NO\0Awarranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.\0A\00"
define void @version_banner() {
%1 = call i32 @printf(i8* getelementptr inbounds ([213 x i8], [213 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@str = [212 x i8] c"ufat version 20120528\0ACopyright (C) 2012 TracMap Holdings Ltd\0AThis is free software; see the source for copying conditions. There is NO\0Awarranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.\00"
define void @version_banner() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([212 x i8], [212 x i8]* @str, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, int /*<<< orphan*/);
int /*<<< orphan*/ pthread_self();
int rand();
int /*<<< orphan*/ sleep(int);
int /*<<< orphan*/ stdout;
void *Worker(void *inputData) {
  sleep(rand() % 5);
  fprintf(stdout, "ID vlakna je: %lu\n", pthread_self());
  return NULL;
}


x86 assembly (clang, -O0):
<Worker>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    $0x0,%al
call   1060 <rand@plt>
mov    $0x5,%ecx
cltd
idiv   %ecx
mov    %edx,%edi
call   1050 <sleep@plt>
mov    0x2e77(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0xc(%rbp)
mov    $0x0,%al
call   1040 <pthread_self@plt>
mov    -0xc(%rbp),%edi
mov    %eax,%edx
lea    0xe7f(%rip),%rsi
call   1030 <fprintf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Worker>:
push   %rbx
xor    %eax,%eax
call   1060 <rand@plt>
movslq %eax,%rdi
imul   $0x66666667,%rdi,%rax
mov    %rax,%rcx
shr    $0x3f,%rcx
sar    $0x21,%rax
add    %ecx,%eax
lea    (%rax,%rax,4),%eax
sub    %eax,%edi
call   1050 <sleep@plt>
mov    0x2e70(%rip),%rax
mov    (%rax),%ebx
xor    %eax,%eax
call   1040 <pthread_self@plt>
lea    0xe80(%rip),%rsi
mov    %ebx,%edi
mov    %eax,%edx
call   1030 <fprintf@plt>
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
@stdout = global i32 0
@.str = [19 x i8] c"ID vlakna je: %lu\0A\00"
define i8* @Worker(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = call i32 (...) @rand()
%4 = srem i32 %3, 5
%5 = call i32 @sleep(i32 %4)
%6 = load i32, i32* @stdout
%7 = call i32 (...) @pthread_self()
%8 = call i32 @fprintf(i32 %6, i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0), i32 %7)
ret i8* null
}

LLVM IR (-O2):
@stdout = global i32 0
@.str = [19 x i8] c"ID vlakna je: %lu\0A\00"
define noalias i8* @Worker(i8* nocapture readnone %0) {
%2 = tail call i32 (...) @rand()
%3 = srem i32 %2, 5
%4 = tail call i32 @sleep(i32 %3)
%5 = load i32, i32* @stdout
%6 = tail call i32 (...) @pthread_self()
%7 = tail call i32 @fprintf(i32 %5, i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0), i32 %6)
ret i8* null
}
unsigned ddr_init_sw(struct ddr_set *ddr_setting) { return 0; }


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

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

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

LLVM IR (-O2):
%struct.ddr_set = type opaque
define i32 @ddr_init_sw(%struct.ddr_set* nocapture readnone %0) {
ret i32 0
}
void digitalWriteDummy(struct wiringPiNodeStruct *node, int pin, int value) {
  return;
}


x86 assembly (clang, -O0):
<digitalWriteDummy>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
pop    %rbp
ret

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

LLVM IR (-O0):
%struct.wiringPiNodeStruct = type opaque
define void @digitalWriteDummy(%struct.wiringPiNodeStruct* %0, i32 %1, i32 %2) {
%4 = alloca %struct.wiringPiNodeStruct*
%5 = alloca i32
%6 = alloca i32
store %struct.wiringPiNodeStruct* %0, %struct.wiringPiNodeStruct** %4
store i32 %1, i32* %5
store i32 %2, i32* %6
ret void
}

LLVM IR (-O2):
%struct.wiringPiNodeStruct = type opaque
define void @digitalWriteDummy(%struct.wiringPiNodeStruct* nocapture %0, i32 %1, i32 %2) {
ret void
}
int bit_spin_is_locked(int bitnum, unsigned long *addr) { return 1; }


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

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

LLVM IR (-O0):
define i32 @bit_spin_is_locked(i32 %0, i64* %1) {
%3 = alloca i32
%4 = alloca i64*
store i32 %0, i32* %3
store i64* %1, i64** %4
ret i32 1
}

LLVM IR (-O2):
define i32 @bit_spin_is_locked(i32 %0, i64* nocapture readnone %1) {
ret i32 1
}
char *__SubStrings__ASCII__UpperS(char *const S) {
  register char *Worker = S;
  for (; *Worker != '\0'; ++Worker) {
    if (*Worker >= 'a' && *Worker <= 'z') {
      *Worker -= ('a' - 'A');
    }
  }
  return S;
}


x86 assembly (clang, -O0):
<__SubStrings__ASCII__UpperS>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x0,%eax
je     1162 <__SubStrings__ASCII__UpperS+0x62>
mov    -0x10(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x61,%eax
jl     114c <__SubStrings__ASCII__UpperS+0x4c>
mov    -0x10(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x7a,%eax
jg     114c <__SubStrings__ASCII__UpperS+0x4c>
mov    -0x10(%rbp),%rax
movsbl (%rax),%ecx
sub    $0x20,%ecx
mov    %cl,(%rax)
jmp    1151 <__SubStrings__ASCII__UpperS+0x51>
mov    -0x10(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x10(%rbp)
jmp    1110 <__SubStrings__ASCII__UpperS+0x10>
mov    -0x8(%rbp),%rax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i8* @__SubStrings__ASCII__UpperS(i8* returned %0) {
%2 = load i8, i8* %0
%3 = icmp eq i8 %2, 0
br i1 %3, label %15, label %4
4: ; preds = %1, %11
%5 = phi i8 [ %13, %11 ], [ %2, %1 ]
%6 = phi i8* [ %12, %11 ], [ %0, %1 ]
%7 = add i8 %5, -97
%8 = icmp ult i8 %7, 26
br i1 %8, label %9, label %11
9: ; preds = %4
%10 = add nsw i8 %5, -32
store i8 %10, i8* %6
br label %11
11: ; preds = %4, %9
%12 = getelementptr inbounds i8, i8* %6, i64 1
%13 = load i8, i8* %12
%14 = icmp eq i8 %13, 0
br i1 %14, label %15, label %4
15: ; preds = %11, %1
ret i8* %0
}
int of_property_notify(int action, struct device_node *np,
                       struct property *prop, struct property *old_prop) {
  return 0;
}


x86 assembly (clang, -O0):
<of_property_notify>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
xor    %eax,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
%struct.device_node = type opaque
%struct.property = type opaque
define i32 @of_property_notify(i32 %0, %struct.device_node* %1, %struct.property* %2, %struct.property* %3) {
%5 = alloca i32
%6 = alloca %struct.device_node*
%7 = alloca %struct.property*
%8 = alloca %struct.property*
store i32 %0, i32* %5
store %struct.device_node* %1, %struct.device_node** %6
store %struct.property* %2, %struct.property** %7
store %struct.property* %3, %struct.property** %8
ret i32 0
}

LLVM IR (-O2):
%struct.device_node = type opaque
%struct.property = type opaque
define i32 @of_property_notify(i32 %0, %struct.device_node* nocapture readnone %1, %struct.property* nocapture readnone %2, %struct.property* nocapture readnone %3) {
ret i32 0
}
/* Variables and functions */
scalar_t__ is_perfect(size_t);
int /*<<< orphan*/ printf(char *, size_t);
int main() {
  size_t max = 10000;
  for (size_t i = 0; i < max; i++) {
    if (is_perfect(i)) {
      printf("Liczba %ld jest doskonala\n", i);
    }
  }
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
movq   $0x2710,-0x10(%rbp)
movq   $0x0,-0x18(%rbp)
mov    -0x18(%rbp),%rax
cmp    -0x10(%rbp),%rax
jae    1186 <main+0x66>
mov    -0x18(%rbp),%rdi
call   1030 <is_perfect@plt>
cmp    $0x0,%rax
je     1170 <main+0x50>
mov    -0x18(%rbp),%rsi
lea    0xe95(%rip),%rdi
call   1040 <printf@plt>
jmp    1175 <main+0x55>
mov    -0x18(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x18(%rbp)
jmp    113f <main+0x1f>
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r14
push   %rbx
push   %rax
xor    %ebx,%ebx
lea    0xed3(%rip),%r14
jmp    113d <main+0x1d>
nop
add    $0x1,%rbx
cmp    $0x2710,%rbx
je     1157 <main+0x37>
mov    %rbx,%rdi
call   1030 <is_perfect@plt>
test   %rax,%rax
je     1130 <main+0x10>
mov    %r14,%rdi
mov    %rbx,%rsi
call   1040 <printf@plt>
jmp    1130 <main+0x10>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@.str = [27 x i8] c"Liczba %ld jest doskonala\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i64
%3 = alloca i64
store i32 0, i32* %1
store i64 10000, i64* %2
store i64 0, i64* %3
br label %4
4: ; preds = %16, %0
%5 = load i64, i64* %3
%6 = load i64, i64* %2
%7 = icmp ult i64 %5, %6
br i1 %7, label %8, label %19
8: ; preds = %4
%9 = load i64, i64* %3
%10 = call i64 @is_perfect(i64 %9)
%11 = icmp ne i64 %10, 0
br i1 %11, label %12, label %15
12: ; preds = %8
%13 = load i64, i64* %3
%14 = call i32 @printf(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str, i64 0, i64 0), i64 %13)
br label %15
15: ; preds = %12, %8
br label %16
16: ; preds = %15
%17 = load i64, i64* %3
%18 = add i64 %17, 1
store i64 %18, i64* %3
br label %4
19: ; preds = %4
%20 = load i32, i32* %1
ret i32 %20
}

LLVM IR (-O2):
@.str = [27 x i8] c"Liczba %ld jest doskonala\0A\00"
define i32 @main() {
br label %2
1: ; preds = %8
ret i32 0
2: ; preds = %0, %8
%3 = phi i64 [ 0, %0 ], [ %9, %8 ]
%4 = tail call i64 @is_perfect(i64 %3)
%5 = icmp eq i64 %4, 0
br i1 %5, label %8, label %6
6: ; preds = %2
%7 = tail call i32 @printf(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str, i64 0, i64 0), i64 %3)
br label %8
8: ; preds = %2, %6
%9 = add nuw nsw i64 %3, 1
%10 = icmp eq i64 %9, 10000
br i1 %10, label %1, label %2
}
/* Forward declarations */
typedef struct TYPE_2__ TYPE_1__;

/* Type definitions */
struct TYPE_2__ {
  unsigned long s_addr;
};
struct sockaddr_in {
  TYPE_1__ sin_addr;
};

/* Variables and functions */
scalar_t__ inet_aton(char const *, TYPE_1__ *);
unsigned long StrtoIP(const char *Str) {
  struct sockaddr_in sa;
  if (inet_aton(Str, &sa.sin_addr))
    return (sa.sin_addr.s_addr);
  return (0);
}


x86 assembly (clang, -O0):
<StrtoIP>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
lea    -0x18(%rbp),%rsi
call   1030 <inet_aton@plt>
cmp    $0x0,%rax
je     1140 <StrtoIP+0x30>
mov    -0x18(%rbp),%rax
mov    %rax,-0x8(%rbp)
jmp    1148 <StrtoIP+0x38>
movq   $0x0,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<StrtoIP>:
push   %rax
mov    %rsp,%rsi
call   1030 <inet_aton@plt>
test   %rax,%rax
je     1122 <StrtoIP+0x12>
mov    (%rsp),%rax
pop    %rcx
ret

LLVM IR (-O0):
%struct.sockaddr_in = type { %struct.TYPE_2__ }
%struct.TYPE_2__ = type { i64 }
define i64 @StrtoIP(i8* %0) {
%2 = alloca i64
%3 = alloca i8*
%4 = alloca %struct.sockaddr_in
store i8* %0, i8** %3
%5 = load i8*, i8** %3
%6 = getelementptr inbounds %struct.sockaddr_in, %struct.sockaddr_in* %4, i32 0, i32 0
%7 = call i64 @inet_aton(i8* %5, %struct.TYPE_2__* %6)
%8 = icmp ne i64 %7, 0
br i1 %8, label %9, label %13
9: ; preds = %1
%10 = getelementptr inbounds %struct.sockaddr_in, %struct.sockaddr_in* %4, i32 0, i32 0
%11 = getelementptr inbounds %struct.TYPE_2__, %struct.TYPE_2__* %10, i32 0, i32 0
%12 = load i64, i64* %11
store i64 %12, i64* %2
br label %14
13: ; preds = %1
store i64 0, i64* %2
br label %14
14: ; preds = %13, %9
%15 = load i64, i64* %2
ret i64 %15
}

LLVM IR (-O2):
%struct.sockaddr_in = type { %struct.TYPE_2__ }
%struct.TYPE_2__ = type { i64 }
define i64 @StrtoIP(i8* %0) {
%2 = alloca %struct.sockaddr_in
%3 = bitcast %struct.sockaddr_in* %2 to i8*
%4 = getelementptr inbounds %struct.sockaddr_in, %struct.sockaddr_in* %2, i64 0, i32 0
%5 = call i64 @inet_aton(i8* %0, %struct.TYPE_2__* %4)
%6 = icmp eq i64 %5, 0
%7 = getelementptr inbounds %struct.sockaddr_in, %struct.sockaddr_in* %2, i64 0, i32 0, i32 0
%8 = load i64, i64* %7
%9 = select i1 %6, i64 0, i64 %8
ret i64 %9
}
void gtk_radio_menu_item_get_group() {}


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

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

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

LLVM IR (-O2):
define void @gtk_radio_menu_item_get_group() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ isgraph(int);
void t_isgraph_0xcd() {
  Assert_real((isgraph(205) == 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_isgraph.c",
              1030, ("isgraph should be 0 for 0xcd"));
}


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

x86 assembly (clang, -O2):
<t_isgraph_0xcd>:
push   %rax
mov    $0xcd,%edi
call   1040 <isgraph@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf66(%rip),%rcx
mov    $0x406,%edx
pop    %rax
jmp    1030 <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_isgraph.c\00"
@.str.1 = [29 x i8] c"isgraph should be 0 for 0xcd\00"
define void @t_isgraph_0xcd() {
%1 = call i64 @isgraph(i32 205)
%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 1030, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [168 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/ctype/test_isgraph.c\00"
@.str.1 = [29 x i8] c"isgraph should be 0 for 0xcd\00"
define void @t_isgraph_0xcd() {
%1 = tail call i64 @isgraph(i32 205)
%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 1030, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ PRIO_PROCESS;
scalar_t__ errno;
int /*<<< orphan*/ exit(int);
int getpriority(int /*<<< orphan*/, int /*<<< orphan*/);
int /*<<< orphan*/ perror(char *);
int getpriority_or_exit() {
  int result = 0;
  errno = 0;
  result = getpriority(PRIO_PROCESS, 0);
  if (result == -1 && errno != 0) {
    perror("Can't setpriority");
    exit(11);
  }
  return (result);
}


x86 assembly (clang, -O0):
<getpriority_or_exit>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    0x2e92(%rip),%rax
movq   $0x0,(%rax)
mov    0x2e8c(%rip),%rax
mov    (%rax),%edi
xor    %esi,%esi
call   1030 <getpriority@plt>
mov    %eax,-0x4(%rbp)
cmpl   $0xffffffff,-0x4(%rbp)
jne    1191 <getpriority_or_exit+0x61>
mov    0x2e67(%rip),%rax
cmpq   $0x0,(%rax)
je     1191 <getpriority_or_exit+0x61>
lea    0xe7e(%rip),%rdi
call   1040 <perror@plt>
mov    $0xb,%edi
call   1050 <exit@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<getpriority_or_exit>:
push   %rbx
mov    0x2ea0(%rip),%rbx
movq   $0x0,(%rbx)
mov    0x2e9a(%rip),%rax
mov    (%rax),%edi
xor    %esi,%esi
call   1030 <getpriority@plt>
cmp    $0xffffffff,%eax
jne    115a <getpriority_or_exit+0x2a>
cmpq   $0x0,(%rbx)
jne    115c <getpriority_or_exit+0x2c>
pop    %rbx
ret
lea    0xe9d(%rip),%rdi
call   1040 <perror@plt>
mov    $0xb,%edi
call   1050 <exit@plt>

LLVM IR (-O0):
@errno = global i64 0
@PRIO_PROCESS = global i32 0
@.str = [18 x i8] c"Can't setpriority\00"
define i32 @getpriority_or_exit() {
%1 = alloca i32
store i32 0, i32* %1
store i64 0, i64* @errno
%2 = load i32, i32* @PRIO_PROCESS
%3 = call i32 @getpriority(i32 %2, i32 0)
store i32 %3, i32* %1
%4 = load i32, i32* %1
%5 = icmp eq i32 %4, -1
br i1 %5, label %6, label %12
6: ; preds = %0
%7 = load i64, i64* @errno
%8 = icmp ne i64 %7, 0
br i1 %8, label %9, label %12
9: ; preds = %6
%10 = call i32 @perror(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0))
%11 = call i32 @exit(i32 11)
unreachable
12: ; preds = %6, %0
%13 = load i32, i32* %1
ret i32 %13
}

LLVM IR (-O2):
@errno = global i64 0
@PRIO_PROCESS = global i32 0
@.str = [18 x i8] c"Can't setpriority\00"
define i32 @getpriority_or_exit() {
store i64 0, i64* @errno
%1 = load i32, i32* @PRIO_PROCESS
%2 = tail call i32 @getpriority(i32 %1, i32 0)
%3 = icmp eq i32 %2, -1
%4 = load i64, i64* @errno
%5 = icmp ne i64 %4, 0
%6 = select i1 %3, i1 %5, i1 false
br i1 %6, label %7, label %10
7: ; preds = %0
%8 = tail call i32 @perror(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0))
%9 = tail call i32 @exit(i32 11)
unreachable
10: ; preds = %0
ret i32 %2
}
OP(dd, f2) {
  illegal_1();
  op_f2();
}


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_f2@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_f2@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_f2()
%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_f2()
ret i32 undef
}