xunge/DecIR huggingface dataset:
void walkRight() {}


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

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

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

LLVM IR (-O2):
define void @walkRight() {
ret void
}
/* Variables and functions */
int strlen(char *);
int OSC_effectiveStringLength(char *string) {
  int len = strlen(string) + 1;
  if ((len % 4) != 0) {
    len += 4 - (len % 4);
  }
  return len;
}


x86 assembly (clang, -O0):
<OSC_effectiveStringLength>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <strlen@plt>
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
mov    $0x4,%ecx
cltd
idiv   %ecx
cmp    $0x0,%edx
je     1157 <OSC_effectiveStringLength+0x47>
mov    -0xc(%rbp),%eax
mov    $0x4,%ecx
cltd
idiv   %ecx
mov    $0x4,%eax
sub    %edx,%eax
add    -0xc(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<OSC_effectiveStringLength>:
push   %rax
call   1030 <strlen@plt>
lea    0x1(%rax),%ecx
lea    0x4(%rax),%edx
test   %ecx,%ecx
cmovns %ecx,%edx
and    $0xfffffffc,%edx
neg    %edx
add    %eax,%edx
add    $0x1,%edx
sub    %edx,%eax
add    $0x5,%eax
test   %edx,%edx
cmove  %ecx,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @OSC_effectiveStringLength(i8* %0) {
%2 = alloca i8*
%3 = alloca i32
store i8* %0, i8** %2
%4 = load i8*, i8** %2
%5 = call i32 @strlen(i8* %4)
%6 = add nsw i32 %5, 1
store i32 %6, i32* %3
%7 = load i32, i32* %3
%8 = srem i32 %7, 4
%9 = icmp ne i32 %8, 0
br i1 %9, label %10, label %16
10: ; preds = %1
%11 = load i32, i32* %3
%12 = srem i32 %11, 4
%13 = sub nsw i32 4, %12
%14 = load i32, i32* %3
%15 = add nsw i32 %14, %13
store i32 %15, i32* %3
br label %16
16: ; preds = %10, %1
%17 = load i32, i32* %3
ret i32 %17
}

LLVM IR (-O2):
define i32 @OSC_effectiveStringLength(i8* %0) {
%2 = tail call i32 @strlen(i8* %0)
%3 = add nsw i32 %2, 1
%4 = srem i32 %3, 4
%5 = icmp eq i32 %4, 0
%6 = add i32 %2, 5
%7 = sub i32 %6, %4
%8 = select i1 %5, i32 %3, i32 %7
ret i32 %8
}
/* Type definitions */
typedef int /*<<< orphan*/ uint64_t;

/* Variables and functions */
int /*<<< orphan*/ crc64(int /*<<< orphan*/, unsigned char *, size_t);
uint64_t crc64Hash(char *key, size_t len) {
  return crc64(0, (unsigned char *)key, len);
}


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

x86 assembly (clang, -O2):
<crc64Hash>:
mov    %rsi,%rdx
mov    %rdi,%rsi
xor    %edi,%edi
jmp    1030 <crc64@plt>

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

LLVM IR (-O2):
define i32 @crc64Hash(i8* %0, i64 %1) {
%3 = tail call i32 @crc64(i32 0, i8* %0, i64 %1)
ret i32 %3
}
char ucase(char c) {
  if (c >= 'a' && c <= 'z') {
    c = c - 32;
  }
  return c;
}


x86 assembly (clang, -O0):
<ucase>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movsbl -0x1(%rbp),%eax
cmp    $0x61,%eax
jl     112e <ucase+0x2e>
movsbl -0x1(%rbp),%eax
cmp    $0x7a,%eax
jg     112e <ucase+0x2e>
movsbl -0x1(%rbp),%eax
sub    $0x20,%eax
mov    %al,-0x1(%rbp)
movsbl -0x1(%rbp),%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define signext i8 @ucase(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, 97
br i1 %5, label %6, label %15
6: ; preds = %1
%7 = load i8, i8* %2
%8 = sext i8 %7 to i32
%9 = icmp sle i32 %8, 122
br i1 %9, label %10, label %15
10: ; preds = %6
%11 = load i8, i8* %2
%12 = sext i8 %11 to i32
%13 = sub nsw i32 %12, 32
%14 = trunc i32 %13 to i8
store i8 %14, i8* %2
br label %15
15: ; preds = %10, %6, %1
%16 = load i8, i8* %2
ret i8 %16
}

LLVM IR (-O2):
define signext i8 @ucase(i8 signext %0) {
%2 = add i8 %0, -97
%3 = icmp ult i8 %2, 26
%4 = add i8 %0, -32
%5 = select i1 %3, i8 %4, i8 %0
ret i8 %5
}
void ARGBCopyYToAlphaRow_SSE2() {}


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

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

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

LLVM IR (-O2):
define void @ARGBCopyYToAlphaRow_SSE2() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ write(int, char *, int);
void my_putnbr_s(int fd, long nb) {
  char c;
  if (nb <= -10)
    my_putnbr_s(fd, nb / 10);
  c = (char)('0' - (nb % 10));
  write(fd, &c, 1);
}


x86 assembly (clang, -O0):
<my_putnbr_s>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
cmpq   $0xfffffffffffffff6,-0x10(%rbp)
jg     1153 <my_putnbr_s+0x33>
mov    -0x4(%rbp),%edi
mov    -0x10(%rbp),%rax
mov    $0xa,%ecx
cqto
idiv   %rcx
mov    %rax,%rsi
call   1040 <my_putnbr_s@plt>
mov    -0x10(%rbp),%rax
mov    $0xa,%ecx
cqto
idiv   %rcx
mov    $0x30,%eax
sub    %rdx,%rax
mov    %al,-0x11(%rbp)
mov    -0x4(%rbp),%edi
lea    -0x11(%rbp),%rsi
mov    $0x1,%edx
call   1030 <write@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<my_putnbr_s>:
push   %rbp
push   %rbx
push   %rax
mov    %rsi,%rbx
mov    %edi,%ebp
cmp    $0xfffffffffffffff6,%rsi
jg     1152 <my_putnbr_s+0x32>
mov    %rbx,%rax
neg    %rax
movabs $0xcccccccccccccccd,%rcx
cc cc cc
mul    %rcx
shr    $0x3,%rdx
neg    %rdx
mov    %ebp,%edi
mov    %rdx,%rsi
call   1040 <my_putnbr_s@plt>
movabs $0x6666666666666667,%rcx
66 66 66
mov    %rbx,%rax
imul   %rcx
mov    %rdx,%rax
shr    $0x3f,%rax
shr    $0x2,%edx
add    %eax,%edx
add    %edx,%edx
lea    (%rdx,%rdx,4),%eax
sub    %eax,%ebx
mov    $0x30,%al
sub    %bl,%al
mov    %al,0x7(%rsp)
lea    0x7(%rsp),%rsi
mov    %ebp,%edi
mov    $0x1,%edx
call   1030 <write@plt>
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
define void @my_putnbr_s(i32 %0, i64 %1) {
%3 = alloca i32
%4 = alloca i64
%5 = alloca i8
store i32 %0, i32* %3
store i64 %1, i64* %4
%6 = load i64, i64* %4
%7 = icmp sle i64 %6, -10
br i1 %7, label %8, label %12
8: ; preds = %2
%9 = load i32, i32* %3
%10 = load i64, i64* %4
%11 = sdiv i64 %10, 10
br label %12
12: ; preds = %8, %2
%13 = load i64, i64* %4
%14 = srem i64 %13, 10
%15 = sub nsw i64 48, %14
%16 = trunc i64 %15 to i8
store i8 %16, i8* %5
%17 = load i32, i32* %3
%18 = call i32 @write(i32 %17, i8* %5, i32 1)
ret void
}

LLVM IR (-O2):
define void @my_putnbr_s(i32 %0, i64 %1) {
%3 = alloca i8
%4 = icmp slt i64 %1, -9
br i1 %4, label %5, label %9
5: ; preds = %2
%6 = sub i64 0, %1
%7 = udiv i64 %6, 10
%8 = sub nsw i64 0, %7
tail call void @my_putnbr_s(i32 %0, i64 %8)
br label %9
9: ; preds = %5, %2
%10 = srem i64 %1, 10
%11 = trunc i64 %10 to i8
%12 = sub nsw i8 48, %11
store i8 %12, i8* %3
%13 = call i32 @write(i32 %0, i8* %3, i32 1)
ret void
}
/* Variables and functions */
scalar_t__ isspace(char);
char *skip_over_blank(char *cp) {
  while (*cp && isspace(*cp))
    cp++;
  return cp;
}


x86 assembly (clang, -O0):
<skip_over_blank>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movsbl (%rax),%ecx
xor    %eax,%eax
cmp    $0x0,%ecx
mov    %al,-0x9(%rbp)
je     1147 <skip_over_blank+0x37>
mov    -0x8(%rbp),%rax
movsbl (%rax),%edi
call   1030 <isspace@plt>
cmp    $0x0,%rax
setne  %al
mov    %al,-0x9(%rbp)
mov    -0x9(%rbp),%al
test   $0x1,%al
jne    1157 <skip_over_blank+0x47>
jmp    1168 <skip_over_blank+0x58>
mov    -0x8(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x8(%rbp)
jmp    111c <skip_over_blank+0xc>
mov    -0x8(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<skip_over_blank>:
push   %rbx
mov    %rdi,%rbx
mov    (%rdi),%al
test   %al,%al
je     1139 <skip_over_blank+0x29>
nopw   0x0(%rax,%rax,1)
movsbl %al,%edi
call   1030 <isspace@plt>
test   %rax,%rax
je     1139 <skip_over_blank+0x29>
movzbl 0x1(%rbx),%eax
add    $0x1,%rbx
test   %al,%al
jne    1120 <skip_over_blank+0x10>
mov    %rbx,%rax
pop    %rbx
ret

LLVM IR (-O0):
define i8* @skip_over_blank(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
br label %3
3: ; preds = %15, %1
%4 = load i8*, i8** %2
%5 = load i8, i8* %4
%6 = sext i8 %5 to i32
%7 = icmp ne i32 %6, 0
br i1 %7, label %8, label %13
8: ; preds = %3
%9 = load i8*, i8** %2
%10 = load i8, i8* %9
%11 = call i64 @isspace(i8 signext %10)
%12 = icmp ne i64 %11, 0
br label %13
13: ; preds = %8, %3
%14 = phi i1 [ false, %3 ], [ %12, %8 ]
br i1 %14, label %15, label %18
15: ; preds = %13
%16 = load i8*, i8** %2
%17 = getelementptr inbounds i8, i8* %16, i32 1
store i8* %17, i8** %2
br label %3
18: ; preds = %13
%19 = load i8*, i8** %2
ret i8* %19
}

LLVM IR (-O2):
define i8* @skip_over_blank(i8* %0) {
%2 = load i8, i8* %0
%3 = icmp eq i8 %2, 0
br i1 %3, label %13, label %4
4: ; preds = %1, %9
%5 = phi i8 [ %11, %9 ], [ %2, %1 ]
%6 = phi i8* [ %10, %9 ], [ %0, %1 ]
%7 = tail call i64 @isspace(i8 signext %5)
%8 = icmp eq i64 %7, 0
br i1 %8, label %13, label %9
9: ; preds = %4
%10 = getelementptr inbounds i8, i8* %6, i64 1
%11 = load i8, i8* %10
%12 = icmp eq i8 %11, 0
br i1 %12, label %13, label %4
13: ; preds = %4, %9, %1
%14 = phi i8* [ %0, %1 ], [ %10, %9 ], [ %6, %4 ]
ret i8* %14
}
void PrintFactPNGetVar3(void *theEnv, const char *logicalName, void *theValue) {

}


x86 assembly (clang, -O0):
<PrintFactPNGetVar3>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
pop    %rbp
ret

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

LLVM IR (-O0):
define void @PrintFactPNGetVar3(i8* %0, i8* %1, i8* %2) {
%4 = alloca i8*
%5 = alloca i8*
%6 = alloca i8*
store i8* %0, i8** %4
store i8* %1, i8** %5
store i8* %2, i8** %6
ret void
}

LLVM IR (-O2):
define void @PrintFactPNGetVar3(i8* nocapture %0, i8* nocapture %1, i8* nocapture %2) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ putchar(char);
void main(void) {
  char a;
  char b;
  char c;
  a = 'M';
  b = 1 + a + 1;
  c = b + 1;
  putchar(b);
  putchar(c);
  putchar('\n');
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movb   $0x4d,-0x1(%rbp)
movsbl -0x1(%rbp),%eax
add    $0x1,%eax
add    $0x1,%eax
mov    %al,-0x2(%rbp)
movsbl -0x2(%rbp),%eax
add    $0x1,%eax
mov    %al,-0x3(%rbp)
movsbl -0x2(%rbp),%edi
call   1030 <putchar@plt>
movsbl -0x3(%rbp),%edi
call   1030 <putchar@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    $0x4f,%edi
call   1030 <putchar@plt>
mov    $0x50,%edi
call   1030 <putchar@plt>
mov    $0xa,%edi
pop    %rax
jmp    1030 <putchar@plt>

LLVM IR (-O0):
define void @main() {
%1 = alloca i8
%2 = alloca i8
%3 = alloca i8
store i8 77, i8* %1
%4 = load i8, i8* %1
%5 = sext i8 %4 to i32
%6 = add nsw i32 1, %5
%7 = add nsw i32 %6, 1
%8 = trunc i32 %7 to i8
store i8 %8, i8* %2
%9 = load i8, i8* %2
%10 = sext i8 %9 to i32
%11 = add nsw i32 %10, 1
%12 = trunc i32 %11 to i8
store i8 %12, i8* %3
%13 = load i8, i8* %2
%14 = call i32 @putchar(i8 signext %13)
%15 = load i8, i8* %3
%16 = call i32 @putchar(i8 signext %15)
%17 = call i32 @putchar(i8 signext 10)
ret void
}

LLVM IR (-O2):
define void @main() {
%1 = tail call i32 @putchar(i8 signext 79)
%2 = tail call i32 @putchar(i8 signext 80)
%3 = tail call i32 @putchar(i8 signext 10)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ isalnum(int);
void t_isalnum_0xa3() {
  Assert_real((isalnum(163) == 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_isalnum.c",
              820, ("isalnum should be 0 for 0xa3"));
}


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

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

LLVM IR (-O0):
@.str = [168 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/ctype/test_isalnum.c\00"
@.str.1 = [29 x i8] c"isalnum should be 0 for 0xa3\00"
define void @t_isalnum_0xa3() {
%1 = call i64 @isalnum(i32 163)
%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 820, 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_isalnum.c\00"
@.str.1 = [29 x i8] c"isalnum should be 0 for 0xa3\00"
define void @t_isalnum_0xa3() {
%1 = tail call i64 @isalnum(i32 163)
%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 820, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ GLvoid;
typedef int /*<<< orphan*/ GLsizei;
typedef int /*<<< orphan*/ GLenum;

/* Variables and functions */
int /*<<< orphan*/ glCallLists(int /*<<< orphan*/, int /*<<< orphan*/,
                               int /*<<< orphan*/ *);
void CallLists(GLsizei n, GLenum type, GLvoid *lists) {
  glCallLists(n, type, lists);
}


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

x86 assembly (clang, -O2):
<CallLists>:
jmp    1030 <glCallLists@plt>

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

LLVM IR (-O2):
define void @CallLists(i32 %0, i32 %1, i32* %2) {
%4 = tail call i32 @glCallLists(i32 %0, i32 %1, i32* %2)
ret void
}
float Fade(float t) { return t * t * t * (t * (t * 6 - 15) + 10); }


x86 assembly (clang, -O0):
<Fade>:
push   %rbp
mov    %rsp,%rbp
movss  %xmm0,-0x4(%rbp)
movss  -0x4(%rbp),%xmm0
mulss  -0x4(%rbp),%xmm0
mulss  -0x4(%rbp),%xmm0
movss  -0x4(%rbp),%xmm1
movss  -0x4(%rbp),%xmm2
movss  0xeda(%rip),%xmm3
mulss  %xmm3,%xmm2
movss  0xed2(%rip),%xmm3
addss  %xmm3,%xmm2
mulss  %xmm2,%xmm1
movss  0xeba(%rip),%xmm2
addss  %xmm2,%xmm1
mulss  %xmm1,%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<Fade>:
movaps %xmm0,%xmm1
mulss  %xmm0,%xmm1
mulss  %xmm0,%xmm1
movss  0xeed(%rip),%xmm2
mulss  %xmm0,%xmm2
addss  0xee5(%rip),%xmm2
mulss  %xmm2,%xmm0
addss  0xedd(%rip),%xmm0
mulss  %xmm1,%xmm0
ret

LLVM IR (-O0):
define float @Fade(float %0) {
%2 = alloca float
store float %0, float* %2
%3 = load float, float* %2
%4 = load float, float* %2
%5 = fmul float %3, %4
%6 = load float, float* %2
%7 = fmul float %5, %6
%8 = load float, float* %2
%9 = load float, float* %2
%10 = call float @llvm.fmuladd.f32(float %9, float 6.000000e+00, float -1.500000e+01)
%11 = call float @llvm.fmuladd.f32(float %8, float %10, float 1.000000e+01)
%12 = fmul float %7, %11
ret float %12
}

LLVM IR (-O2):
define float @Fade(float %0) {
%2 = fmul float %0, %0
%3 = fmul float %2, %0
%4 = tail call float @llvm.fmuladd.f32(float %0, float 6.000000e+00, float -1.500000e+01)
%5 = tail call float @llvm.fmuladd.f32(float %0, float %4, float 1.000000e+01)
%6 = fmul float %3, %5
ret float %6
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ isxdigit(int);
void t_isxdigit_0x19() {
  Assert_real((isxdigit(25) == 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_isxdigit.c",
              130, ("isxdigit should be 0 for 0x19"));
}


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

x86 assembly (clang, -O2):
<t_isxdigit_0x19>:
push   %rax
mov    $0x19,%edi
call   1030 <isxdigit@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf67(%rip),%rcx
mov    $0x82,%edx
pop    %rax
jmp    1040 <Assert_real@plt>

LLVM IR (-O0):
@.str = [169 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_isxdigit.c\00"
@.str.1 = [30 x i8] c"isxdigit should be 0 for 0x19\00"
define void @t_isxdigit_0x19() {
%1 = call i64 @isxdigit(i32 25)
%2 = icmp eq i64 %1, 0
%3 = zext i1 %2 to i32
%4 = call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([169 x i8], [169 x i8]* @.str, i64 0, i64 0), i32 130, i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [169 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_isxdigit.c\00"
@.str.1 = [30 x i8] c"isxdigit should be 0 for 0x19\00"
define void @t_isxdigit_0x19() {
%1 = tail call i64 @isxdigit(i32 25)
%2 = icmp eq i64 %1, 0
%3 = zext i1 %2 to i32
%4 = tail call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([169 x i8], [169 x i8]* @.str, i64 0, i64 0), i32 130, i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.1, i64 0, i64 0))
ret void
}
void fd150(int n) {
P0A:
  goto P0A;
  {
    typedef int(*b)[n];
  P01A:
    goto P01A;
    {
      typedef int(*c)[n];
    P012A:
      goto P012A;
      0;
    }
  P01B:
    goto P01B;
    {
      typedef int(*d)[n];
    P013A:
      goto P013A;
      0;
    }
  P01C:
    goto P01C;
    ;
    typedef int(*e)[n];
  P014A:
    goto P014A;
    0;
  };
P0B:
  goto P0B;
  {
    typedef int(*f)[n];
  p02A:
    goto p02A;
    goto a;
  P02A:
    goto P02A;
    {
      typedef int(*g)[n];
    P024A:
      goto P024A;
      0;
    };
  P02B:
    goto P02B;
    {
      typedef int(*h)[n];
    P025A:
      goto P025A;
      0;
    };
  P02C:
    goto P02C;
    ;
    typedef int(*i)[n];
  P026A:
    goto P026A;
    0;
  };
a:;
  typedef int(*j)[n];
P03A:
  goto P03A;
  0;
P03B:
  goto P03B;
}


x86 assembly (clang, -O0):
<fd150>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
jmp    1107 <fd150+0x7>

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

LLVM IR (-O0):
define void @fd150(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
br label %3
3: ; preds = %3, %1
br label %3
4: ; No predecessors!
%5 = load i32, i32* %2
%6 = zext i32 %5 to i64
br label %7
7: ; preds = %7, %4
br label %7
8: ; No predecessors!
%9 = load i32, i32* %2
%10 = zext i32 %9 to i64
br label %11
11: ; preds = %11, %8
br label %11
12: ; preds = %12
br label %12
13: ; No predecessors!
%14 = load i32, i32* %2
%15 = zext i32 %14 to i64
br label %16
16: ; preds = %16, %13
br label %16
17: ; preds = %17
br label %17
18: ; No predecessors!
%19 = load i32, i32* %2
%20 = zext i32 %19 to i64
br label %21
21: ; preds = %21, %18
br label %21
22: ; preds = %22
br label %22
23: ; No predecessors!
%24 = load i32, i32* %2
%25 = zext i32 %24 to i64
br label %26
26: ; preds = %26, %23
br label %26
27: ; preds = %27
br label %27
28: ; No predecessors!
%29 = load i32, i32* %2
%30 = zext i32 %29 to i64
br label %31
31: ; preds = %31, %28
br label %31
32: ; preds = %32
br label %32
33: ; No predecessors!
%34 = load i32, i32* %2
%35 = zext i32 %34 to i64
br label %36
36: ; preds = %36, %33
br label %36
37: ; preds = %37
br label %37
38: ; No predecessors!
%39 = load i32, i32* %2
%40 = zext i32 %39 to i64
br label %41
41: ; preds = %41, %38
br label %41
42: ; No predecessors!
%43 = load i32, i32* %2
%44 = zext i32 %43 to i64
br label %45
45: ; preds = %45, %42
br label %45
46: ; preds = %46
br label %46
}

LLVM IR (-O2):
define void @fd150(i32 %0) {
br label %2
2: ; preds = %2, %1
br label %2
}
/* Type definitions */
typedef int /*<<< orphan*/ MYSQL;

/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char const *, char *);
char *mysql_error(int /*<<< orphan*/ **);
int /*<<< orphan*/ stderr;
void fatal(MYSQL *mysql, const char *msg) {
  fprintf(stderr, "%s: %s\n", msg, mysql_error(&mysql));
  exit(1);
}


x86 assembly (clang, -O0):
<fatal>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    0x2e99(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x1c(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x18(%rbp)
lea    -0x8(%rbp),%rdi
call   1040 <mysql_error@plt>
mov    -0x1c(%rbp),%edi
mov    -0x18(%rbp),%rdx
mov    %rax,%rcx
lea    0xe92(%rip),%rsi
call   1030 <fprintf@plt>
mov    $0x1,%edi
call   1050 <exit@plt>

x86 assembly (clang, -O2):
<fatal>:
push   %rbp
push   %rbx
push   %rax
mov    %rsi,%rbx
mov    %rdi,(%rsp)
mov    0x2e9f(%rip),%rax
mov    (%rax),%ebp
mov    %rsp,%rdi
call   1040 <mysql_error@plt>
lea    0xeae(%rip),%rsi
mov    %ebp,%edi
mov    %rbx,%rdx
mov    %rax,%rcx
call   1030 <fprintf@plt>
mov    $0x1,%edi
call   1050 <exit@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [8 x i8] c"%s: %s\0A\00"
define void @fatal(i32* %0, i8* %1) {
%3 = alloca i32*
%4 = alloca i8*
store i32* %0, i32** %3
store i8* %1, i8** %4
%5 = load i32, i32* @stderr
%6 = load i8*, i8** %4
%7 = call i8* @mysql_error(i32** %3)
%8 = call i32 @fprintf(i32 %5, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i8* %6, i8* %7)
%9 = call i32 @exit(i32 1)
unreachable
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [8 x i8] c"%s: %s\0A\00"
define void @fatal(i32* %0, i8* %1) {
%3 = alloca i32*
store i32* %0, i32** %3
%4 = load i32, i32* @stderr
%5 = call i8* @mysql_error(i32** %3)
%6 = call i32 @fprintf(i32 %4, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i8* %1, i8* %5)
%7 = call i32 @exit(i32 1)
unreachable
}
/* Variables and functions */
scalar_t__ dlerror();
scalar_t__ strdup(char *);
char *dlerrordup(char *errormsg) {
  char *error = (char *)dlerror();
  if (error && !errormsg)
    errormsg = (char *)strdup(error);
  return errormsg;
}


x86 assembly (clang, -O0):
<dlerrordup>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    $0x0,%al
call   1030 <dlerror@plt>
mov    %rax,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
je     115a <dlerrordup+0x3a>
cmpq   $0x0,-0x8(%rbp)
jne    115a <dlerrordup+0x3a>
mov    -0x10(%rbp),%rdi
call   1040 <strdup@plt>
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<dlerrordup>:
push   %rbx
mov    %rdi,%rbx
xor    %eax,%eax
call   1030 <dlerror@plt>
test   %rbx,%rbx
jne    1140 <dlerrordup+0x20>
test   %rax,%rax
je     1140 <dlerrordup+0x20>
mov    %rax,%rdi
call   1040 <strdup@plt>
mov    %rax,%rbx
mov    %rbx,%rax
pop    %rbx
ret

LLVM IR (-O0):
define i8* @dlerrordup(i8* %0) {
%2 = alloca i8*
%3 = alloca i8*
store i8* %0, i8** %2
%4 = call i64 (...) @dlerror()
%5 = inttoptr i64 %4 to i8*
store i8* %5, i8** %3
%6 = load i8*, i8** %3
%7 = icmp ne i8* %6, null
br i1 %7, label %8, label %15
8: ; preds = %1
%9 = load i8*, i8** %2
%10 = icmp ne i8* %9, null
br i1 %10, label %15, label %11
11: ; preds = %8
%12 = load i8*, i8** %3
%13 = call i64 @strdup(i8* %12)
%14 = inttoptr i64 %13 to i8*
store i8* %14, i8** %2
br label %15
15: ; preds = %11, %8, %1
%16 = load i8*, i8** %2
ret i8* %16
}

LLVM IR (-O2):
define i8* @dlerrordup(i8* readnone %0) {
%2 = tail call i64 (...) @dlerror()
%3 = icmp eq i64 %2, 0
%4 = icmp ne i8* %0, null
%5 = or i1 %4, %3
br i1 %5, label %10, label %6
6: ; preds = %1
%7 = inttoptr i64 %2 to i8*
%8 = tail call i64 @strdup(i8* %7)
%9 = inttoptr i64 %8 to i8*
br label %10
10: ; preds = %6, %1
%11 = phi i8* [ %0, %1 ], [ %9, %6 ]
ret i8* %11
}
/* Variables and functions */
int /*<<< orphan*/ endwin();
void destroyConsole() { endwin(); }


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

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

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

LLVM IR (-O2):
define void @destroyConsole() {
%1 = tail call i32 (...) @endwin()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
int /*<<< orphan*/ stderr;
void usage(int exit_status) {
  fprintf(stderr, "USAGE: utf8-category [-l|--long-names] "
                  "[-c|--count-ascii|-s|--skip-ascii]\n");
  exit(exit_status);
}


x86 assembly (clang, -O0):
<usage>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    0x2eae(%rip),%rax
mov    (%rax),%edi
lea    0xec5(%rip),%rsi
call   1030 <fprintf@plt>
mov    -0x4(%rbp),%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<usage>:
push   %rbx
mov    %edi,%ebx
mov    0x2eb6(%rip),%rax
mov    (%rax),%edi
lea    0xecd(%rip),%rsi
call   1030 <fprintf@plt>
mov    %ebx,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [75 x i8] c"USAGE: utf8-category [-l|--long-names] [-c|--count-ascii|-s|--skip-ascii]\0A\00"
define void @usage(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* @stderr
%4 = call i32 @fprintf(i32 %3, i8* getelementptr inbounds ([75 x i8], [75 x i8]* @.str, i64 0, i64 0))
%5 = load i32, i32* %2
%6 = call i32 @exit(i32 %5)
unreachable
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [75 x i8] c"USAGE: utf8-category [-l|--long-names] [-c|--count-ascii|-s|--skip-ascii]\0A\00"
define void @usage(i32 %0) {
%2 = load i32, i32* @stderr
%3 = tail call i32 @fprintf(i32 %2, i8* getelementptr inbounds ([75 x i8], [75 x i8]* @.str, i64 0, i64 0))
%4 = tail call i32 @exit(i32 %0)
unreachable
}
/* Variables and functions */
int /*<<< orphan*/ seq_utils_clamp(scalar_t__, int, int);
scalar_t__ song_get_cv_bend_range();
int /*<<< orphan*/ song_set_cv_bend_range(int /*<<< orphan*/);
void seq_ctrl_adjust_cv_bend_range(int change) {
  song_set_cv_bend_range(
      seq_utils_clamp(song_get_cv_bend_range() + change, 1, 12));
}


x86 assembly (clang, -O0):
<seq_ctrl_adjust_cv_bend_range>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    $0x0,%al
call   1050 <song_get_cv_bend_range@plt>
mov    %rax,%rdi
movslq -0x4(%rbp),%rax
add    %rax,%rdi
mov    $0x1,%esi
mov    $0xc,%edx
call   1040 <seq_utils_clamp@plt>
mov    %eax,%edi
call   1030 <song_set_cv_bend_range@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<seq_ctrl_adjust_cv_bend_range>:
push   %rbx
mov    %edi,%ebx
xor    %eax,%eax
call   1050 <song_get_cv_bend_range@plt>
movslq %ebx,%rdi
add    %rax,%rdi
mov    $0x1,%esi
mov    $0xc,%edx
call   1040 <seq_utils_clamp@plt>
mov    %eax,%edi
pop    %rbx
jmp    1030 <song_set_cv_bend_range@plt>

LLVM IR (-O0):
define void @seq_ctrl_adjust_cv_bend_range(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = call i64 (...) @song_get_cv_bend_range()
%4 = load i32, i32* %2
%5 = sext i32 %4 to i64
%6 = add nsw i64 %3, %5
%7 = call i32 @seq_utils_clamp(i64 %6, i32 1, i32 12)
%8 = call i32 @song_set_cv_bend_range(i32 %7)
ret void
}

LLVM IR (-O2):
define void @seq_ctrl_adjust_cv_bend_range(i32 %0) {
%2 = tail call i64 (...) @song_get_cv_bend_range()
%3 = sext i32 %0 to i64
%4 = add nsw i64 %2, %3
%5 = tail call i32 @seq_utils_clamp(i64 %4, i32 1, i32 12)
%6 = tail call i32 @song_set_cv_bend_range(i32 %5)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ use(char const *);
void test_my_log() {
  __attribute__((internal_linkage)) static const char fmt[] = "foobar";
  use(fmt);
}


x86 assembly (clang, -O0):
<test_my_log>:
push   %rbp
mov    %rsp,%rbp
mov    0x2ec5(%rip),%rdi
call   1030 <use@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_my_log>:
mov    0x2ec9(%rip),%rdi
jmp    1030 <use@plt>

LLVM IR (-O0):
@test_my_log.fmt = internal constant [7 x i8] c"foobar\00"
@fmt = external constant [7 x i8]
define void @test_my_log() {
%1 = call i32 @use(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @fmt, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@fmt = external constant [7 x i8]
define void @test_my_log() {
%1 = tail call i32 @use(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @fmt, i64 0, i64 0))
ret void
}
void swap_scores(float *scores, int s1, int s2) {
  float temp;
  temp = scores[s1];
  scores[s1] = scores[s2];
  scores[s2] = temp;
}


x86 assembly (clang, -O0):
<swap_scores>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
movss  (%rax,%rcx,4),%xmm0
movss  %xmm0,-0x14(%rbp)
mov    -0x8(%rbp),%rax
movslq -0x10(%rbp),%rcx
movss  (%rax,%rcx,4),%xmm0
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
movss  %xmm0,(%rax,%rcx,4)
movss  -0x14(%rbp),%xmm0
mov    -0x8(%rbp),%rax
movslq -0x10(%rbp),%rcx
movss  %xmm0,(%rax,%rcx,4)
pop    %rbp
ret

x86 assembly (clang, -O2):
<swap_scores>:
movslq %esi,%rax
movss  (%rdi,%rax,4),%xmm0
movslq %edx,%rcx
movss  (%rdi,%rcx,4),%xmm1
movss  %xmm1,(%rdi,%rax,4)
movss  %xmm0,(%rdi,%rcx,4)
ret

LLVM IR (-O0):
define void @swap_scores(float* %0, i32 %1, i32 %2) {
%4 = alloca float*
%5 = alloca i32
%6 = alloca i32
%7 = alloca float
store float* %0, float** %4
store i32 %1, i32* %5
store i32 %2, i32* %6
%8 = load float*, float** %4
%9 = load i32, i32* %5
%10 = sext i32 %9 to i64
%11 = getelementptr inbounds float, float* %8, i64 %10
%12 = load float, float* %11
store float %12, float* %7
%13 = load float*, float** %4
%14 = load i32, i32* %6
%15 = sext i32 %14 to i64
%16 = getelementptr inbounds float, float* %13, i64 %15
%17 = load float, float* %16
%18 = load float*, float** %4
%19 = load i32, i32* %5
%20 = sext i32 %19 to i64
%21 = getelementptr inbounds float, float* %18, i64 %20
store float %17, float* %21
%22 = load float, float* %7
%23 = load float*, float** %4
%24 = load i32, i32* %6
%25 = sext i32 %24 to i64
%26 = getelementptr inbounds float, float* %23, i64 %25
store float %22, float* %26
ret void
}

LLVM IR (-O2):
define void @swap_scores(float* nocapture %0, i32 %1, i32 %2) {
%4 = sext i32 %1 to i64
%5 = getelementptr inbounds float, float* %0, i64 %4
%6 = load float, float* %5
%7 = sext i32 %2 to i64
%8 = getelementptr inbounds float, float* %0, i64 %7
%9 = load float, float* %8
store float %9, float* %5
store float %6, float* %8
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
extern void shmem_short_sum_to_all(short *target, short *source, int nreduce,
                                   int PE_start, int logPE_stride, int PE_size,
                                   short *pWrk, long *pSync) {
  printf("\nOpenSHMEM Analyzer\n");
}


x86 assembly (clang, -O0):
<shmem_short_sum_to_all>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    0x18(%rbp),%rax
mov    0x10(%rbp),%rax
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    %ecx,-0x18(%rbp)
mov    %r8d,-0x1c(%rbp)
mov    %r9d,-0x20(%rbp)
lea    0xec3(%rip),%rdi
call   1030 <printf@plt>
add    $0x20,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
@.str = [21 x i8] c"\0AOpenSHMEM Analyzer\0A\00"
define void @shmem_short_sum_to_all(i16* %0, i16* %1, i32 %2, i32 %3, i32 %4, i32 %5, i16* %6, i64* %7) {
%9 = alloca i16*
%10 = alloca i16*
%11 = alloca i32
%12 = alloca i32
%13 = alloca i32
%14 = alloca i32
%15 = alloca i16*
%16 = alloca i64*
store i16* %0, i16** %9
store i16* %1, i16** %10
store i32 %2, i32* %11
store i32 %3, i32* %12
store i32 %4, i32* %13
store i32 %5, i32* %14
store i16* %6, i16** %15
store i64* %7, i64** %16
%17 = call i32 @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@str = [20 x i8] c"\0AOpenSHMEM Analyzer\00"
define void @shmem_short_sum_to_all(i16* nocapture readnone %0, i16* nocapture readnone %1, i32 %2, i32 %3, i32 %4, i32 %5, i16* nocapture readnone %6, i64* nocapture readnone %7) {
%9 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([20 x i8], [20 x i8]* @str, i64 0, i64 0))
ret void
}
const char *fp_get_type() { return "_Z_FD"; }


x86 assembly (clang, -O0):
<fp_get_type>:
push   %rbp
mov    %rsp,%rbp
lea    0xef5(%rip),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<fp_get_type>:
lea    0xef9(%rip),%rax
ret

LLVM IR (-O0):
@.str = [6 x i8] c"_Z_FD\00"
define i8* @fp_get_type() {
ret i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0)
}

LLVM IR (-O2):
@.str = [6 x i8] c"_Z_FD\00"
define i8* @fp_get_type() {
ret i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0)
}
/* Variables and functions */
int /*<<< orphan*/ err(int, char *, char const *);
double strtod(char const *, char **);
double parse_double(const char *arg) {
  double ret;
  char *s;
  ret = strtod(arg, &s);
  if (*s != '\0')
    err(1, "parse_count: unexpected character in \"%s\"\n", arg);
  return ret;
}


x86 assembly (clang, -O0):
<parse_double>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
lea    -0x18(%rbp),%rsi
call   1030 <strtod@plt>
movsd  %xmm0,-0x10(%rbp)
mov    -0x18(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x0,%eax
je     1163 <parse_double+0x43>
mov    -0x8(%rbp),%rdx
mov    $0x1,%edi
lea    0xea2(%rip),%rsi
call   1040 <err@plt>
movsd  -0x10(%rbp),%xmm0
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<parse_double>:
push   %rbx
sub    $0x10,%rsp
mov    %rdi,%rbx
lea    0x8(%rsp),%rsi
call   1030 <strtod@plt>
mov    0x8(%rsp),%rax
cmpb   $0x0,(%rax)
je     115a <parse_double+0x3a>
lea    0xebd(%rip),%rsi
mov    $0x1,%edi
mov    %rbx,%rdx
movsd  %xmm0,(%rsp)
call   1040 <err@plt>
movsd  (%rsp),%xmm0
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@.str = [43 x i8] c"parse_count: unexpected character in \22%s\22\0A\00"
define double @parse_double(i8* %0) {
%2 = alloca i8*
%3 = alloca double
%4 = alloca i8*
store i8* %0, i8** %2
%5 = load i8*, i8** %2
%6 = call double @strtod(i8* %5, i8** %4)
store double %6, double* %3
%7 = load i8*, i8** %4
%8 = load i8, i8* %7
%9 = sext i8 %8 to i32
%10 = icmp ne i32 %9, 0
br i1 %10, label %11, label %14
11: ; preds = %1
%12 = load i8*, i8** %2
%13 = call i32 @err(i32 1, i8* getelementptr inbounds ([43 x i8], [43 x i8]* @.str, i64 0, i64 0), i8* %12)
br label %14
14: ; preds = %11, %1
%15 = load double, double* %3
ret double %15
}

LLVM IR (-O2):
@.str = [43 x i8] c"parse_count: unexpected character in \22%s\22\0A\00"
define double @parse_double(i8* %0) {
%2 = alloca i8*
%3 = bitcast i8** %2 to i8*
%4 = call double @strtod(i8* %0, i8** %2)
%5 = load i8*, i8** %2
%6 = load i8, i8* %5
%7 = icmp eq i8 %6, 0
br i1 %7, label %10, label %8
8: ; preds = %1
%9 = tail call i32 @err(i32 1, i8* getelementptr inbounds ([43 x i8], [43 x i8]* @.str, i64 0, i64 0), i8* %0)
br label %10
10: ; preds = %8, %1
ret double %4
}
void gtk_match_type_get_type() {}


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

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

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

LLVM IR (-O2):
define void @gtk_match_type_get_type() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ kernel_printf(char *, char *);
void assert(int statement, char *message) {
  if (statement != 1) {
    kernel_printf("[ASSERT ERROR]: %s\n", message);
    while (1)
      ;
  }
}


x86 assembly (clang, -O0):
<assert>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
cmpl   $0x1,-0x4(%rbp)
je     113e <assert+0x2e>
mov    -0x10(%rbp),%rsi
lea    0xecc(%rip),%rdi
call   1030 <kernel_printf@plt>
jmp    1139 <assert+0x29>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<assert>:
cmp    $0x1,%edi
jne    1116 <assert+0x6>
ret
push   %rax
lea    0xee2(%rip),%rdi
call   1030 <kernel_printf@plt>
add    $0x8,%rsp
nopw   0x0(%rax,%rax,1)
jmp    1130 <assert+0x20>

LLVM IR (-O0):
@.str = [20 x i8] c"[ASSERT ERROR]: %s\0A\00"
define void @assert(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 = icmp ne i32 %5, 1
br i1 %6, label %7, label %11
7: ; preds = %2
%8 = load i8*, i8** %4
%9 = call i32 @kernel_printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0), i8* %8)
br label %10
10: ; preds = %7, %10
br label %10
11: ; preds = %2
ret void
}

LLVM IR (-O2):
@.str = [20 x i8] c"[ASSERT ERROR]: %s\0A\00"
define void @assert(i32 %0, i8* %1) {
%3 = icmp eq i32 %0, 1
br i1 %3, label %7, label %4
4: ; preds = %2
%5 = tail call i32 @kernel_printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0), i8* %1)
br label %6
6: ; preds = %4, %6
br label %6
7: ; preds = %2
ret void
}
/* Variables and functions */
int gethostname(char *, size_t);
int /*<<< orphan*/ snprintf(char *, size_t, char *);
void get_hostname(char *buf, size_t s) {
  int res = gethostname(buf, s);
  if (res != 0) {
    snprintf(buf, s, "unk hostname");
  }
}


x86 assembly (clang, -O0):
<get_hostname>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1040 <gethostname@plt>
mov    %eax,-0x14(%rbp)
cmpl   $0x0,-0x14(%rbp)
je     115e <get_hostname+0x3e>
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
lea    0xea7(%rip),%rdx
call   1030 <snprintf@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_hostname>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%r14
mov    %rdi,%rbx
call   1040 <gethostname@plt>
test   %eax,%eax
je     114c <get_hostname+0x2c>
lea    0xec6(%rip),%rdx
mov    %rbx,%rdi
mov    %r14,%rsi
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1030 <snprintf@plt>
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

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

LLVM IR (-O2):
@.str = [13 x i8] c"unk hostname\00"
define void @get_hostname(i8* %0, i64 %1) {
%3 = tail call i32 @gethostname(i8* %0, i64 %1)
%4 = icmp eq i32 %3, 0
br i1 %4, label %7, label %5
5: ; preds = %2
%6 = tail call i32 @snprintf(i8* %0, i64 %1, i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0))
br label %7
7: ; preds = %5, %2
ret void
}
/* Variables and functions */
int streq(char const *, char const *);
bool streq_not_null(const char *s1, const char *s2) {
  if (!s1 || !s2)
    return false;
  return streq(s1, s2);
}


x86 assembly (clang, -O0):
<streq_not_null>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
cmpq   $0x0,-0x10(%rbp)
je     1136 <streq_not_null+0x26>
cmpq   $0x0,-0x18(%rbp)
jne    1142 <streq_not_null+0x32>
movl   $0x0,-0x4(%rbp)
jmp    1152 <streq_not_null+0x42>
mov    -0x10(%rbp),%rdi
mov    -0x18(%rbp),%rsi
call   1030 <streq@plt>
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<streq_not_null>:
test   %rdi,%rdi
je     111f <streq_not_null+0xf>
test   %rsi,%rsi
je     111f <streq_not_null+0xf>
jmp    1030 <streq@plt>
xor    %eax,%eax
ret

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

LLVM IR (-O2):
define i32 @streq_not_null(i8* %0, i8* %1) {
%3 = icmp ne i8* %0, null
%4 = icmp ne i8* %1, null
%5 = and i1 %3, %4
br i1 %5, label %6, label %8
6: ; preds = %2
%7 = tail call i32 @streq(i8* %0, i8* %1)
br label %8
8: ; preds = %2, %6
%9 = phi i32 [ %7, %6 ], [ 0, %2 ]
ret i32 %9
}
/* Type definitions */
typedef int /*<<< orphan*/ u_char;
typedef int /*<<< orphan*/ res_state;

/* Variables and functions */
int __libc_res_nquerydomain(int /*<<< orphan*/, char const *, char const *, int,
                            int, int /*<<< orphan*/ *, int,
                            int /*<<< orphan*/ *);
int res_nquerydomain(res_state statp, const char *name, const char *domain,
                     int class, int type, u_char *answer, int anslen) {
  return __libc_res_nquerydomain(statp, name, domain, class, type, answer,
                                 anslen, NULL);
}


x86 assembly (clang, -O0):
<res_nquerydomain>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
mov    0x10(%rbp),%eax
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %ecx,-0x1c(%rbp)
mov    %r8d,-0x20(%rbp)
mov    %r9,-0x28(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
mov    -0x1c(%rbp),%ecx
mov    -0x20(%rbp),%r8d
mov    -0x28(%rbp),%r9
mov    0x10(%rbp),%eax
xor    %r10d,%r10d
mov    %eax,(%rsp)
movq   $0x0,0x8(%rsp)
call   1030 <__libc_res_nquerydomain@plt>
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<res_nquerydomain>:
push   %rax
mov    0x10(%rsp),%eax
push   $0x0
push   %rax
call   1030 <__libc_res_nquerydomain@plt>
add    $0x10,%rsp
pop    %rcx
ret

LLVM IR (-O0):
define i32 @res_nquerydomain(i32 %0, i8* %1, i8* %2, i32 %3, i32 %4, i32* %5, i32 %6) {
%8 = alloca i32
%9 = alloca i8*
%10 = alloca i8*
%11 = alloca i32
%12 = alloca i32
%13 = alloca i32*
%14 = alloca i32
store i32 %0, i32* %8
store i8* %1, i8** %9
store i8* %2, i8** %10
store i32 %3, i32* %11
store i32 %4, i32* %12
store i32* %5, i32** %13
store i32 %6, i32* %14
%15 = load i32, i32* %8
%16 = load i8*, i8** %9
%17 = load i8*, i8** %10
%18 = load i32, i32* %11
%19 = load i32, i32* %12
%20 = load i32*, i32** %13
%21 = load i32, i32* %14
%22 = call i32 @__libc_res_nquerydomain(i32 %15, i8* %16, i8* %17, i32 %18, i32 %19, i32* %20, i32 %21, i32* null)
ret i32 %22
}

LLVM IR (-O2):
define i32 @res_nquerydomain(i32 %0, i8* %1, i8* %2, i32 %3, i32 %4, i32* %5, i32 %6) {
%8 = tail call i32 @__libc_res_nquerydomain(i32 %0, i8* %1, i8* %2, i32 %3, i32 %4, i32* %5, i32 %6, i32* null)
ret i32 %8
}
/* Variables and functions */
int haha();
int /*<<< orphan*/ printf(char *, int);
int main(int argc, char **argv) {
  printf("\n\nThe answer in C is %d\n\n", haha());
  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    $0x0,%al
call   1040 <haha@plt>
mov    %eax,%esi
lea    0xeba(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
@.str = [26 x i8] c"\0A\0AThe answer in C is %d\0A\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%6 = call i32 (...) @haha()
%7 = call i32 @printf(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str, i64 0, i64 0), i32 %6)
ret i32 0
}

LLVM IR (-O2):
@.str = [26 x i8] c"\0A\0AThe answer in C is %d\0A\0A\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 (...) @haha()
%4 = tail call i32 @printf(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str, i64 0, i64 0), i32 %3)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ __gmpn_sqr_basecase(unsigned long *, unsigned long *, long);
void __gmpn_sqr(unsigned long *d, unsigned long *a_0, long e) {
  __gmpn_sqr_basecase(d, a_0, e);
  return;
}


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

x86 assembly (clang, -O2):
<__gmpn_sqr>:
jmp    1030 <__gmpn_sqr_basecase@plt>

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

LLVM IR (-O2):
define void @__gmpn_sqr(i64* %0, i64* %1, i64 %2) {
%4 = tail call i32 @__gmpn_sqr_basecase(i64* %0, i64* %1, i64 %2)
ret void
}
/* Variables and functions */
int atoi(char *);
int opt_int(char *str, int def) {
  if (str == NULL) {
    return def;
  } else {
    return atoi(str);
  }
}


x86 assembly (clang, -O0):
<opt_int>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    %esi,-0x14(%rbp)
cmpq   $0x0,-0x10(%rbp)
jne    1135 <opt_int+0x25>
mov    -0x14(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    1141 <opt_int+0x31>
mov    -0x10(%rbp),%rdi
call   1030 <atoi@plt>
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<opt_int>:
test   %rdi,%rdi
je     111a <opt_int+0xa>
jmp    1030 <atoi@plt>
mov    %esi,%eax
ret

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

LLVM IR (-O2):
define i32 @opt_int(i8* %0, i32 %1) {
%3 = icmp eq i8* %0, null
br i1 %3, label %6, label %4
4: ; preds = %2
%5 = tail call i32 @atoi(i8* %0)
br label %6
6: ; preds = %2, %4
%7 = phi i32 [ %5, %4 ], [ %1, %2 ]
ret i32 %7
}