xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ TIOCMGET;
int /*<<< orphan*/ TIOCMSET;
int /*<<< orphan*/ ioctl(int, int /*<<< orphan*/, int *);
void serialResetPin(int fd, int pin) {
  int set;
  ioctl(fd, TIOCMGET, &set);
  set &= ~pin;
  ioctl(fd, TIOCMSET, &set);
}


x86 assembly (clang, -O0):
<serialResetPin>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%edi
mov    0x2eb8(%rip),%rax
mov    (%rax),%esi
lea    -0xc(%rbp),%rdx
call   1030 <ioctl@plt>
mov    -0x8(%rbp),%eax
xor    $0xffffffff,%eax
and    -0xc(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0x4(%rbp),%edi
mov    0x2e9f(%rip),%rax
mov    (%rax),%esi
lea    -0xc(%rbp),%rdx
call   1030 <ioctl@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<serialResetPin>:
push   %rbp
push   %r14
push   %rbx
sub    $0x10,%rsp
mov    %esi,%ebx
mov    %edi,%ebp
mov    0x2ebd(%rip),%rax
mov    (%rax),%esi
lea    0xc(%rsp),%r14
mov    %r14,%rdx
call   1030 <ioctl@plt>
not    %ebx
and    %ebx,0xc(%rsp)
mov    0x2ea9(%rip),%rax
mov    (%rax),%esi
mov    %ebp,%edi
mov    %r14,%rdx
call   1030 <ioctl@plt>
add    $0x10,%rsp
pop    %rbx
pop    %r14
pop    %rbp
ret

LLVM IR (-O0):
@TIOCMGET = global i32 0
@TIOCMSET = global i32 0
define void @serialResetPin(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 = load i32, i32* @TIOCMGET
%8 = call i32 @ioctl(i32 %6, i32 %7, i32* %5)
%9 = load i32, i32* %4
%10 = xor i32 %9, -1
%11 = load i32, i32* %5
%12 = and i32 %11, %10
store i32 %12, i32* %5
%13 = load i32, i32* %3
%14 = load i32, i32* @TIOCMSET
%15 = call i32 @ioctl(i32 %13, i32 %14, i32* %5)
ret void
}

LLVM IR (-O2):
@TIOCMGET = global i32 0
@TIOCMSET = global i32 0
define void @serialResetPin(i32 %0, i32 %1) {
%3 = alloca i32
%4 = bitcast i32* %3 to i8*
%5 = load i32, i32* @TIOCMGET
%6 = call i32 @ioctl(i32 %0, i32 %5, i32* %3)
%7 = xor i32 %1, -1
%8 = load i32, i32* %3
%9 = and i32 %8, %7
store i32 %9, i32* %3
%10 = load i32, i32* @TIOCMSET
%11 = call i32 @ioctl(i32 %0, i32 %10, i32* %3)
ret void
}
/* Type definitions */
typedef int ssize_t;

/* Variables and functions */
scalar_t__ EINTR;
scalar_t__ errno;
int read(int, void *, int);
ssize_t r_read(int fd, void *buf, size_t size) {
  ssize_t retval;
  while (((retval = read(fd, buf, (int)size)) == -1) && (errno == EINTR)) {
  };
  return retval;
}


x86 assembly (clang, -O0):
<r_read>:
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),%rax
mov    %eax,%edx
call   1030 <read@plt>
mov    %eax,%ecx
mov    %ecx,-0x1c(%rbp)
xor    %eax,%eax
cmp    $0xffffffff,%ecx
mov    %al,-0x1d(%rbp)
jne    1162 <r_read+0x52>
mov    0x2e91(%rip),%rax
mov    (%rax),%rax
mov    0x2e7f(%rip),%rcx
cmp    (%rcx),%rax
sete   %al
mov    %al,-0x1d(%rbp)
mov    -0x1d(%rbp),%al
test   $0x1,%al
jne    1172 <r_read+0x62>
jmp    1177 <r_read+0x67>
jmp    1123 <r_read+0x13>
mov    -0x1c(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<r_read>:
push   %rbp
push   %r15
push   %r14
push   %r12
push   %rbx
mov    %rdx,%r14
mov    %rsi,%rbx
mov    %edi,%ebp
mov    0x2eb9(%rip),%r15
mov    0x2eaa(%rip),%r12
xchg   %ax,%ax
mov    %ebp,%edi
mov    %rbx,%rsi
mov    %r14d,%edx
call   1030 <read@plt>
cmp    $0xffffffff,%eax
jne    114b <r_read+0x3b>
mov    (%r12),%rcx
cmp    %rcx,(%r15)
je     1130 <r_read+0x20>
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@errno = global i64 0
@EINTR = global i64 0
define i32 @r_read(i32 %0, i8* %1, i64 %2) {
%4 = alloca i32
%5 = alloca i8*
%6 = alloca i64
%7 = alloca i32
store i32 %0, i32* %4
store i8* %1, i8** %5
store i64 %2, i64* %6
br label %8
8: ; preds = %21, %3
%9 = load i32, i32* %4
%10 = load i8*, i8** %5
%11 = load i64, i64* %6
%12 = trunc i64 %11 to i32
%13 = call i32 @read(i32 %9, i8* %10, i32 %12)
store i32 %13, i32* %7
%14 = icmp eq i32 %13, -1
br i1 %14, label %15, label %19
15: ; preds = %8
%16 = load i64, i64* @errno
%17 = load i64, i64* @EINTR
%18 = icmp eq i64 %16, %17
br label %19
19: ; preds = %15, %8
%20 = phi i1 [ false, %8 ], [ %18, %15 ]
br i1 %20, label %21, label %22
21: ; preds = %19
br label %8
22: ; preds = %19
%23 = load i32, i32* %7
ret i32 %23
}

LLVM IR (-O2):
@errno = global i64 0
@EINTR = global i64 0
define i32 @r_read(i32 %0, i8* nocapture %1, i64 %2) {
%4 = trunc i64 %2 to i32
br label %5
5: ; preds = %5, %3
%6 = tail call i32 @read(i32 %0, i8* %1, i32 %4)
%7 = icmp eq i32 %6, -1
%8 = load i64, i64* @errno
%9 = load i64, i64* @EINTR
%10 = icmp eq i64 %8, %9
%11 = select i1 %7, i1 %10, i1 false
br i1 %11, label %5, label %12
12: ; preds = %5
ret i32 %6
}
/* Variables and functions */
scalar_t__ isupper(int);
int tolower(int c) { return isupper(c) ? (c + ('A' - 'a')) : c; }


x86 assembly (clang, -O0):
<tolower>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
call   1030 <isupper@plt>
cmp    $0x0,%rax
je     113b <tolower+0x2b>
mov    -0x4(%rbp),%eax
add    $0xffffffe0,%eax
mov    %eax,-0x8(%rbp)
jmp    1141 <tolower+0x31>
mov    -0x4(%rbp),%eax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<tolower>:
push   %rbx
mov    %edi,%ebx
call   1030 <isupper@plt>
lea    -0x20(%rbx),%ecx
test   %rax,%rax
cmove  %ebx,%ecx
mov    %ecx,%eax
pop    %rbx
ret

LLVM IR (-O0):
define i32 @tolower(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = call i64 @isupper(i32 %3)
%5 = icmp ne i64 %4, 0
br i1 %5, label %6, label %9
6: ; preds = %1
%7 = load i32, i32* %2
%8 = add nsw i32 %7, -32
br label %11
9: ; preds = %1
%10 = load i32, i32* %2
br label %11
11: ; preds = %9, %6
%12 = phi i32 [ %8, %6 ], [ %10, %9 ]
ret i32 %12
}

LLVM IR (-O2):
define i32 @tolower(i32 %0) {
%2 = tail call i64 @isupper(i32 %0)
%3 = icmp eq i64 %2, 0
%4 = add nsw i32 %0, -32
%5 = select i1 %3, i32 %0, i32 %4
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ func4();
void func2(int x) { func4(); }


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

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

LLVM IR (-O0):
define void @func2(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = call i32 (...) @func4()
ret void
}

LLVM IR (-O2):
define void @func2(i32 %0) {
%2 = tail call i32 (...) @func4()
ret void
}
void rdr_(dx, dy, dz) float *dx, *dy, *dz;
{ rdr(*dx, *dy, *dz); }


x86 assembly (clang, -O0):
<rdr_>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x8(%rbp),%rax
movss  (%rax),%xmm0
cvtss2sd %xmm0,%xmm0
mov    -0x10(%rbp),%rax
movss  (%rax),%xmm1
cvtss2sd %xmm1,%xmm1
mov    -0x18(%rbp),%rax
movss  (%rax),%xmm2
cvtss2sd %xmm2,%xmm2
mov    $0x3,%al
call   1030 <rdr@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<rdr_>:
movss  (%rdi),%xmm0
cvtss2sd %xmm0,%xmm0
movss  (%rsi),%xmm1
cvtss2sd %xmm1,%xmm1
movss  (%rdx),%xmm2
cvtss2sd %xmm2,%xmm2
mov    $0x3,%al
jmp    1030 <rdr@plt>

LLVM IR (-O0):
define void @rdr_(float* %0, float* %1, float* %2) {
%4 = alloca float*
%5 = alloca float*
%6 = alloca float*
store float* %0, float** %4
store float* %1, float** %5
store float* %2, float** %6
%7 = load float*, float** %4
%8 = load float, float* %7
%9 = fpext float %8 to double
%10 = load float*, float** %5
%11 = load float, float* %10
%12 = fpext float %11 to double
%13 = load float*, float** %6
%14 = load float, float* %13
%15 = fpext float %14 to double
%16 = call i32 (double, double, double, ...) bitcast (i32 (...)* @rdr to i32 (double, double, double, ...)*)(double %9, double %12, double %15)
ret void
}

LLVM IR (-O2):
define void @rdr_(float* nocapture %0, float* nocapture %1, float* nocapture %2) {
%4 = load float, float* %0
%5 = fpext float %4 to double
%6 = load float, float* %1
%7 = fpext float %6 to double
%8 = load float, float* %2
%9 = fpext float %8 to double
%10 = tail call i32 (double, double, double, ...) bitcast (i32 (...)* @rdr to i32 (double, double, double, ...)*)(double %5, double %7, double %9)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ isgraph(int);
void t_isgraph_0xee() {
  Assert_real((isgraph(238) == 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",
              1195, ("isgraph should be 0 for 0xee"));
}


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

x86 assembly (clang, -O2):
<t_isgraph_0xee>:
push   %rax
mov    $0xee,%edi
call   1040 <isgraph@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf66(%rip),%rcx
mov    $0x4ab,%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 0xee\00"
define void @t_isgraph_0xee() {
%1 = call i64 @isgraph(i32 238)
%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 1195, 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 0xee\00"
define void @t_isgraph_0xee() {
%1 = tail call i64 @isgraph(i32 238)
%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 1195, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Variables and functions */
char *q_internal(char *, char *, int);
char *lispdir() {
  return (q_internal("",
                     "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/"
                     "outputs/2022-01-22/02-19-57/repos/Rudolph-Miller/roswell/"
                     "refs/heads/master/src/generate.c",
                     4));
}


x86 assembly (clang, -O0):
<lispdir>:
push   %rbp
mov    %rsp,%rbp
lea    0xf76(%rip),%rdi
lea    0xede(%rip),%rsi
mov    $0x4,%edx
call   1030 <q_internal@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<lispdir>:
lea    0xf7a(%rip),%rdi
lea    0xee2(%rip),%rsi
mov    $0x4,%edx
jmp    1030 <q_internal@plt>

LLVM IR (-O0):
@.str = [1 x i8] zeroinitializer
@.str.1 = [146 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/Rudolph-Miller/roswell/refs/heads/master/src/generate.c\00"
define i8* @lispdir() {
%1 = call i8* @q_internal(i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([146 x i8], [146 x i8]* @.str.1, i64 0, i64 0), i32 4)
ret i8* %1
}

LLVM IR (-O2):
@.str = [1 x i8] zeroinitializer
@.str.1 = [146 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/Rudolph-Miller/roswell/refs/heads/master/src/generate.c\00"
define i8* @lispdir() {
%1 = tail call i8* @q_internal(i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([146 x i8], [146 x i8]* @.str.1, i64 0, i64 0), i32 4)
ret i8* %1
}
/* Variables and functions */
int /*<<< orphan*/ trap(char *);
void trap_fiq(void) { trap("FIQ"); }


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

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

LLVM IR (-O0):
@.str = [4 x i8] c"FIQ\00"
define void @trap_fiq() {
%1 = call i32 @trap(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [4 x i8] c"FIQ\00"
define void @trap_fiq() {
%1 = tail call i32 @trap(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0))
ret void
}
void PDMR3ThreadSleep(void) {}


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

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

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

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


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

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

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

LLVM IR (-O2):
define void @gendsubu() {
ret void
}
/* Variables and functions */
int unknown_function();
void band_negative_Good() {
  char a[3];
  int x = unknown_function();
  int y = unknown_function();
  if (x <= -3 && y <= -2) {
    int z = x & y;
    z = z + 5;
    if (z >= 0) {
      a[z] = 0;
    }
  }
}


x86 assembly (clang, -O0):
<band_negative_Good>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1030 <unknown_function@plt>
mov    %eax,-0x8(%rbp)
mov    $0x0,%al
call   1030 <unknown_function@plt>
mov    %eax,-0xc(%rbp)
cmpl   $0xfffffffd,-0x8(%rbp)
jg     116a <band_negative_Good+0x5a>
cmpl   $0xfffffffe,-0xc(%rbp)
jg     116a <band_negative_Good+0x5a>
mov    -0x8(%rbp),%eax
and    -0xc(%rbp),%eax
mov    %eax,-0x10(%rbp)
mov    -0x10(%rbp),%eax
add    $0x5,%eax
mov    %eax,-0x10(%rbp)
cmpl   $0x0,-0x10(%rbp)
jl     1165 <band_negative_Good+0x55>
movslq -0x10(%rbp),%rax
movb   $0x0,-0x3(%rbp,%rax,1)
jmp    116a <band_negative_Good+0x5a>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<band_negative_Good>:
push   %rax
xor    %eax,%eax
call   1030 <unknown_function@plt>
xor    %eax,%eax
pop    %rcx
jmp    1030 <unknown_function@plt>

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

LLVM IR (-O2):
define void @band_negative_Good() {
%1 = tail call i32 (...) @unknown_function()
%2 = tail call i32 (...) @unknown_function()
ret void
}
char *strcpy(char *dest, const char *src) {
  do {
    *dest++ = *src++;
  } while (*src != 0);
}


x86 assembly (clang, -O0):
<strcpy>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    -0x18(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x18(%rbp)
mov    (%rax),%cl
mov    -0x10(%rbp),%rax
mov    %rax,%rdx
add    $0x1,%rdx
mov    %rdx,-0x10(%rbp)
mov    %cl,(%rax)
mov    -0x18(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x0,%eax
jne    110c <strcpy+0xc>
mov    -0x8(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<strcpy>:
mov    (%rsi),%cl
xor    %eax,%eax
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
mov    %cl,(%rdi,%rax,1)
movzbl 0x1(%rsi,%rax,1),%ecx
add    $0x1,%rax
test   %cl,%cl
jne    1110 <strcpy+0x10>
ret

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

LLVM IR (-O2):
define noalias i8* @strcpy(i8* nocapture writeonly %0, i8* nocapture %1) {
%3 = load i8, i8* %1
br label %4
4: ; preds = %4, %2
%5 = phi i8 [ %3, %2 ], [ %10, %4 ]
%6 = phi i8* [ %0, %2 ], [ %9, %4 ]
%7 = phi i8* [ %1, %2 ], [ %8, %4 ]
%8 = getelementptr inbounds i8, i8* %7, i64 1
%9 = getelementptr inbounds i8, i8* %6, i64 1
store i8 %5, i8* %6
%10 = load i8, i8* %8
%11 = icmp eq i8 %10, 0
br i1 %11, label %12, label %4
12: ; preds = %4
ret i8* undef
}
/* Type definitions */
struct genlmsg {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ GENL_HDRLEN;
size_t NLMSG_LENGTH(int /*<<< orphan*/);
scalar_t__ nlmsg_alloc(size_t);
extern struct genlmsg *genlmsg_alloc(size_t size) {
  size_t len = NLMSG_LENGTH(GENL_HDRLEN) + size;
  return (struct genlmsg *)nlmsg_alloc(len);
}


x86 assembly (clang, -O0):
<genlmsg_alloc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    0x2eb5(%rip),%rax
mov    (%rax),%edi
call   1030 <NLMSG_LENGTH@plt>
add    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
call   1040 <nlmsg_alloc@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<genlmsg_alloc>:
push   %rbx
mov    %rdi,%rbx
mov    0x2ebd(%rip),%rax
mov    (%rax),%edi
call   1030 <NLMSG_LENGTH@plt>
add    %rax,%rbx
mov    %rbx,%rdi
pop    %rbx
jmp    1040 <nlmsg_alloc@plt>

LLVM IR (-O0):
%struct.genlmsg = type { i32 }
@GENL_HDRLEN = global i32 0
define %struct.genlmsg* @genlmsg_alloc(i64 %0) {
%2 = alloca i64
%3 = alloca i64
store i64 %0, i64* %2
%4 = load i32, i32* @GENL_HDRLEN
%5 = call i64 @NLMSG_LENGTH(i32 %4)
%6 = load i64, i64* %2
%7 = add i64 %5, %6
store i64 %7, i64* %3
%8 = load i64, i64* %3
%9 = call i64 @nlmsg_alloc(i64 %8)
%10 = inttoptr i64 %9 to %struct.genlmsg*
ret %struct.genlmsg* %10
}

LLVM IR (-O2):
%struct.genlmsg = type { i32 }
@GENL_HDRLEN = global i32 0
define %struct.genlmsg* @genlmsg_alloc(i64 %0) {
%2 = load i32, i32* @GENL_HDRLEN
%3 = tail call i64 @NLMSG_LENGTH(i32 %2)
%4 = add i64 %3, %0
%5 = tail call i64 @nlmsg_alloc(i64 %4)
%6 = inttoptr i64 %5 to %struct.genlmsg*
ret %struct.genlmsg* %6
}
void fa82(void) {
P0A:
  goto P0A;
  ({
    P01A:
      goto P01A;
      ({
        P012A:
          goto P012A;
          0;
      });
    P01B:
      goto P01B;
      ({
        P013A:
          goto P013A;
          0;
      });
    p01C:
      goto p01C;
      goto a;
    P01C:
      goto P01C;
      0;
  });
P0B:
  goto P0B;
  ({
    P02A:
      goto P02A;
      ({
        P024A:
          goto P024A;
          0;
      });
    P02B:
      goto P02B;
      ({
        P025A:
          goto P025A;
          0;
      });
    P02C:
      goto P02C;
      0;
  });
a:
  0;
P0D:
  goto P0D;
}


x86 assembly (clang, -O0):
<fa82>:
push   %rbp
mov    %rsp,%rbp
jmp    1104 <fa82+0x4>

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

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

LLVM IR (-O2):
define void @fa82() {
br label %1
1: ; preds = %1, %0
br label %1
}
/* Variables and functions */
int EDOM;
int scalanative_edom() { return EDOM; }


x86 assembly (clang, -O0):
<scalanative_edom>:
push   %rbp
mov    %rsp,%rbp
mov    0x2edd(%rip),%rax
mov    (%rax),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<scalanative_edom>:
mov    0x2ee1(%rip),%rax
mov    (%rax),%eax
ret

LLVM IR (-O0):
@EDOM = global i32 0
define i32 @scalanative_edom() {
%1 = load i32, i32* @EDOM
ret i32 %1
}

LLVM IR (-O2):
@EDOM = global i32 0
define i32 @scalanative_edom() {
%1 = load i32, i32* @EDOM
ret i32 %1
}
/* Variables and functions */
int lin_rsk_lo_create();
int init_loopback_raw_socket(void) { return lin_rsk_lo_create(); }


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

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

LLVM IR (-O0):
define i32 @init_loopback_raw_socket() {
%1 = call i32 (...) @lin_rsk_lo_create()
ret i32 %1
}

LLVM IR (-O2):
define i32 @init_loopback_raw_socket() {
%1 = tail call i32 (...) @lin_rsk_lo_create()
ret i32 %1
}
/* Variables and functions */
int /*<<< orphan*/ empty_log(char *);
void d_time_restart() { empty_log("time_restart\n"); }


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

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

LLVM IR (-O0):
@.str = [14 x i8] c"time_restart\0A\00"
define void @d_time_restart() {
%1 = call i32 @empty_log(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [14 x i8] c"time_restart\0A\00"
define void @d_time_restart() {
%1 = tail call i32 @empty_log(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0))
ret void
}
int bothNonZero_2(int x, int y) {
  if (x && y) {
    return 1;
  }
  return 0;
}


x86 assembly (clang, -O0):
<bothNonZero_2>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
cmpl   $0x0,-0x8(%rbp)
je     112a <bothNonZero_2+0x2a>
cmpl   $0x0,-0xc(%rbp)
je     112a <bothNonZero_2+0x2a>
movl   $0x1,-0x4(%rbp)
jmp    1131 <bothNonZero_2+0x31>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<bothNonZero_2>:
test   %edi,%edi
setne  %al
test   %esi,%esi
setne  %cl
and    %al,%cl
movzbl %cl,%eax
ret

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

LLVM IR (-O2):
define i32 @bothNonZero_2(i32 %0, i32 %1) {
%3 = icmp ne i32 %0, 0
%4 = icmp ne i32 %1, 0
%5 = and i1 %3, %4
%6 = zext i1 %5 to i32
ret i32 %6
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, float);
int /*<<< orphan*/ scanf(char *, float *);
main() {
  float celsius;
  scanf("%f", &celsius);
  printf("%f", celsius * (9.0 / 5.0) + 32.0);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeda(%rip),%rdi
lea    -0x8(%rbp),%rsi
call   1040 <scanf@plt>
movss  -0x8(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
movsd  0xeb0(%rip),%xmm1
mulsd  %xmm1,%xmm0
movsd  0xeac(%rip),%xmm1
addsd  %xmm1,%xmm0
cvtsd2ss %xmm0,%xmm0
lea    0xea5(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x10,%rsp
lea    0xee4(%rip),%rbx
lea    0xc(%rsp),%rsi
mov    %rbx,%rdi
call   1040 <scanf@plt>
movss  0xc(%rsp),%xmm0
cvtss2sd %xmm0,%xmm0
mulsd  0xeb5(%rip),%xmm0
addsd  0xeb5(%rip),%xmm0
cvtsd2ss %xmm0,%xmm0
mov    %rbx,%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@.str = [3 x i8] c"%f\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca float
store i32 0, i32* %1
%3 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), float* %2)
%4 = load float, float* %2
%5 = fpext float %4 to double
%6 = call double @llvm.fmuladd.f64(double %5, double 1.800000e+00, double 3.200000e+01)
%7 = fptrunc double %6 to float
%8 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), float %7)
ret i32 0
}

LLVM IR (-O2):
@.str = [3 x i8] c"%f\00"
define i32 @main() {
%1 = alloca float
%2 = bitcast float* %1 to i8*
%3 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), float* %1)
%4 = load float, float* %1
%5 = fpext float %4 to double
%6 = call double @llvm.fmuladd.f64(double %5, double 1.800000e+00, double 3.200000e+01)
%7 = fptrunc double %6 to float
%8 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), float %7)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ print_err(char *, size_t);
void *realloc(void *, size_t);
void *use_realloc(void *prevptr, size_t size) {
  void *ptr;
  if ((ptr = realloc(prevptr, size)) == NULL)
    print_err("Error: Could not realloc() %zd bytes.\n", size);
  else
    return ptr;
  return NULL;
}


x86 assembly (clang, -O0):
<use_realloc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x18(%rbp),%rsi
call   1040 <realloc@plt>
mov    %rax,-0x20(%rbp)
cmp    $0x0,%rax
jne    1160 <use_realloc+0x40>
mov    -0x18(%rbp),%rsi
lea    0xeaa(%rip),%rdi
call   1030 <print_err@plt>
jmp    116d <use_realloc+0x4d>
mov    -0x20(%rbp),%rax
mov    %rax,-0x8(%rbp)
jmp    1175 <use_realloc+0x55>
movq   $0x0,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<use_realloc>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%r14
call   1040 <realloc@plt>
mov    %rax,%rbx
test   %rax,%rax
jne    1143 <use_realloc+0x23>
lea    0xec5(%rip),%rdi
mov    %r14,%rsi
call   1030 <print_err@plt>
mov    %rbx,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@.str = [39 x i8] c"Error: Could not realloc() %zd bytes.\0A\00"
define i8* @use_realloc(i8* %0, i64 %1) {
%3 = alloca i8*
%4 = alloca i8*
%5 = alloca i64
%6 = alloca i8*
store i8* %0, i8** %4
store i64 %1, i64* %5
%7 = load i8*, i8** %4
%8 = load i64, i64* %5
%9 = call i8* @realloc(i8* %7, i64 %8)
store i8* %9, i8** %6
%10 = icmp eq i8* %9, null
br i1 %10, label %11, label %14
11: ; preds = %2
%12 = load i64, i64* %5
%13 = call i32 @print_err(i8* getelementptr inbounds ([39 x i8], [39 x i8]* @.str, i64 0, i64 0), i64 %12)
br label %16
14: ; preds = %2
%15 = load i8*, i8** %6
store i8* %15, i8** %3
br label %17
16: ; preds = %11
store i8* null, i8** %3
br label %17
17: ; preds = %16, %14
%18 = load i8*, i8** %3
ret i8* %18
}

LLVM IR (-O2):
@.str = [39 x i8] c"Error: Could not realloc() %zd bytes.\0A\00"
define noalias i8* @use_realloc(i8* nocapture %0, i64 %1) {
%3 = tail call i8* @realloc(i8* %0, i64 %1)
%4 = icmp eq i8* %3, null
br i1 %4, label %5, label %7
5: ; preds = %2
%6 = tail call i32 @print_err(i8* getelementptr inbounds ([39 x i8], [39 x i8]* @.str, i64 0, i64 0), i64 %1)
br label %7
7: ; preds = %2, %5
ret i8* %3
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ printf(char *);
void timer(int value) {
  if (value != 23) {
    printf("FAIL: bad timer value\n");
    exit(1);
  }
  printf("PASS: test24\n");
  exit(0);
}


x86 assembly (clang, -O0):
<timer>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
cmpl   $0x17,-0x4(%rbp)
je     114b <timer+0x2b>
lea    0xec4(%rip),%rdi
call   1030 <printf@plt>
mov    $0x1,%edi
call   1040 <exit@plt>
lea    0xec5(%rip),%rdi
call   1030 <printf@plt>
xor    %edi,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<timer>:
push   %rax
cmp    $0x17,%edi
jne    1139 <timer+0x19>
lea    0xed3(%rip),%rdi
call   1030 <puts@plt>
xor    %edi,%edi
call   1040 <exit@plt>
lea    0xecd(%rip),%rdi
call   1030 <puts@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@.str = [23 x i8] c"FAIL: bad timer value\0A\00"
@.str.1 = [14 x i8] c"PASS: test24\0A\00"
define void @timer(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = icmp ne i32 %3, 23
br i1 %4, label %5, label %8
5: ; preds = %1
%6 = call i32 @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str, i64 0, i64 0))
%7 = call i32 @exit(i32 1)
unreachable
8: ; preds = %1
%9 = call i32 @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.1, i64 0, i64 0))
%10 = call i32 @exit(i32 0)
unreachable
}

LLVM IR (-O2):
@str = [13 x i8] c"PASS: test24\00"
@str.2 = [22 x i8] c"FAIL: bad timer value\00"
define void @timer(i32 %0) {
%2 = icmp eq i32 %0, 23
br i1 %2, label %6, label %3
3: ; preds = %1
%4 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([22 x i8], [22 x i8]* @str.2, i64 0, i64 0))
%5 = tail call i32 @exit(i32 1)
unreachable
6: ; preds = %1
%7 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([13 x i8], [13 x i8]* @str, i64 0, i64 0))
%8 = tail call i32 @exit(i32 0)
unreachable
}
int strcmp(char *s, char *t) {
  for (; *s = *t; s++, t++)
    if (*s == '\0')
      return 0;
  return *s - *t;
}


x86 assembly (clang, -O0):
<strcmp>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    -0x18(%rbp),%rax
mov    (%rax),%al
mov    -0x10(%rbp),%rcx
mov    %al,(%rcx)
cmp    $0x0,%al
je     115e <strcmp+0x5e>
mov    -0x10(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x0,%eax
jne    113c <strcmp+0x3c>
movl   $0x0,-0x4(%rbp)
jmp    1171 <strcmp+0x71>
jmp    1141 <strcmp+0x41>
mov    -0x10(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x10(%rbp)
mov    -0x18(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x18(%rbp)
jmp    110c <strcmp+0xc>
mov    -0x10(%rbp),%rax
movsbl (%rax),%eax
mov    -0x18(%rbp),%rcx
movsbl (%rcx),%ecx
sub    %ecx,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<strcmp>:
mov    (%rsi),%al
mov    %al,(%rdi)
test   %al,%al
je     1122 <strcmp+0x22>
add    $0x1,%rdi
nopl   0x0(%rax)
movzbl 0x1(%rsi),%eax
add    $0x1,%rsi
mov    %al,(%rdi)
add    $0x1,%rdi
test   %al,%al
jne    1110 <strcmp+0x10>
movsbl (%rsi),%eax
neg    %eax
ret

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

LLVM IR (-O2):
define i32 @strcmp(i8* nocapture writeonly %0, i8* nocapture %1) {
%3 = load i8, i8* %1
store i8 %3, i8* %0
%4 = icmp eq i8 %3, 0
br i1 %4, label %12, label %5
5: ; preds = %2, %5
%6 = phi i8* [ %9, %5 ], [ %1, %2 ]
%7 = phi i8* [ %8, %5 ], [ %0, %2 ]
%8 = getelementptr inbounds i8, i8* %7, i64 1
%9 = getelementptr inbounds i8, i8* %6, i64 1
%10 = load i8, i8* %9
store i8 %10, i8* %8
%11 = icmp eq i8 %10, 0
br i1 %11, label %12, label %5
12: ; preds = %5, %2
%13 = phi i8* [ %1, %2 ], [ %9, %5 ]
%14 = load i8, i8* %13
%15 = sext i8 %14 to i32
%16 = sub nsw i32 0, %15
ret i32 %16
}
void XauReadAuth() {}


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

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

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

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


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

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

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

LLVM IR (-O2):
define void @g_filename_from_uri() {
ret void
}
int rdigits(s)
char *s;
{
  if (!s)
    return (0);
  do {
    if (!isdigit(*s))
      return (0);
    s++;
  } while (*s);
  return (1);
}


x86 assembly (clang, -O0):
<rdigits>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
jne    1133 <rdigits+0x23>
movl   $0x0,-0x4(%rbp)
jmp    1179 <rdigits+0x69>
jmp    1138 <rdigits+0x28>
mov    -0x10(%rbp),%rax
movsbl (%rax),%edi
call   1030 <isdigit@plt>
cmp    $0x0,%eax
jne    1159 <rdigits+0x49>
movl   $0x0,-0x4(%rbp)
jmp    1179 <rdigits+0x69>
mov    -0x10(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
cmpb   $0x0,(%rax)
jne    1138 <rdigits+0x28>
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<rdigits>:
xor    %eax,%eax
test   %rdi,%rdi
je     112b <rdigits+0x2b>
mov    (%rdi),%cl
add    $0x1,%rdi
nopl   (%rax)
movsbl %cl,%ecx
add    $0xffffffd0,%ecx
cmp    $0x9,%ecx
ja     112b <rdigits+0x2b>
movzbl (%rdi),%ecx
add    $0x1,%rdi
test   %cl,%cl
jne    1110 <rdigits+0x10>
mov    $0x1,%eax
ret

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

LLVM IR (-O2):
define i32 @rdigits(i8* %0) {
%2 = icmp eq i8* %0, null
br i1 %2, label %15, label %3
3: ; preds = %1
%4 = load i8, i8* %0
br label %5
5: ; preds = %3, %11
%6 = phi i8 [ %13, %11 ], [ %4, %3 ]
%7 = phi i8* [ %12, %11 ], [ %0, %3 ]
%8 = sext i8 %6 to i32
%9 = add nsw i32 %8, -48
%10 = icmp ult i32 %9, 10
br i1 %10, label %11, label %15
11: ; preds = %5
%12 = getelementptr inbounds i8, i8* %7, i64 1
%13 = load i8, i8* %12
%14 = icmp eq i8 %13, 0
br i1 %14, label %15, label %5
15: ; preds = %11, %5, %1
%16 = phi i32 [ 0, %1 ], [ 1, %11 ], [ 0, %5 ]
ret i32 %16
}
/* Variables and functions */
unsigned long CalcCRCBase(int, char const *, int);
unsigned long CalcCRC(const char *buffer, int length) {
  unsigned long k = CalcCRCBase(0xFFFFFFFF, buffer, length);
  k ^= 0xffffffff;
  k &= 0xffffffff;
  return k;
}


x86 assembly (clang, -O0):
<CalcCRC>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rsi
mov    -0xc(%rbp),%edx
mov    $0xffffffff,%edi
call   1030 <CalcCRCBase@plt>
mov    %rax,-0x18(%rbp)
movabs $0xffffffff,%rax
xor    -0x18(%rbp),%rax
mov    %rax,-0x18(%rbp)
movabs $0xffffffff,%rax
and    -0x18(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<CalcCRC>:
push   %rax
mov    %esi,%edx
mov    %rdi,%rsi
mov    $0xffffffff,%edi
call   1030 <CalcCRCBase@plt>
not    %eax
pop    %rcx
ret

LLVM IR (-O0):
define i64 @CalcCRC(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i32
%5 = alloca i64
store i8* %0, i8** %3
store i32 %1, i32* %4
%6 = load i8*, i8** %3
%7 = load i32, i32* %4
%8 = call i64 @CalcCRCBase(i32 -1, i8* %6, i32 %7)
store i64 %8, i64* %5
%9 = load i64, i64* %5
%10 = xor i64 %9, 4294967295
store i64 %10, i64* %5
%11 = load i64, i64* %5
%12 = and i64 %11, 4294967295
store i64 %12, i64* %5
%13 = load i64, i64* %5
ret i64 %13
}

LLVM IR (-O2):
define i64 @CalcCRC(i8* %0, i32 %1) {
%3 = tail call i64 @CalcCRCBase(i32 -1, i8* %0, i32 %1)
%4 = and i64 %3, 4294967295
%5 = xor i64 %4, 4294967295
ret i64 %5
}
/* Variables and functions */
double fabs(double);
double e_dist(double x, double y) { return fabs(x - y); }


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

x86 assembly (clang, -O2):
<e_dist>:
subsd  %xmm1,%xmm0
andpd  0xef4(%rip),%xmm0
ret

LLVM IR (-O0):
define double @e_dist(double %0, double %1) {
%3 = alloca double
%4 = alloca double
store double %0, double* %3
store double %1, double* %4
%5 = load double, double* %3
%6 = load double, double* %4
%7 = fsub double %5, %6
%8 = call double @llvm.fabs.f64(double %7)
ret double %8
}

LLVM IR (-O2):
define double @e_dist(double %0, double %1) {
%3 = fsub double %0, %1
%4 = tail call double @llvm.fabs.f64(double %3)
ret double %4
}
/* Type definitions */
typedef int /*<<< orphan*/ __m128i;

/* Variables and functions */
int /*<<< orphan*/ _mm_slli_epi16(int /*<<< orphan*/, int);
__m128i test_mm_slli_epi16_1(__m128i A) { return _mm_slli_epi16(A, -1); }


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

x86 assembly (clang, -O2):
<test_mm_slli_epi16_1>:
mov    $0xffffffff,%esi
jmp    1030 <_mm_slli_epi16@plt>

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

LLVM IR (-O2):
define i32 @test_mm_slli_epi16_1(i32 %0) {
%2 = tail call i32 @_mm_slli_epi16(i32 %0, i32 -1)
ret i32 %2
}
/* Variables and functions */
int f(int);
void g(int x) {
  int y;
  y = f(x - 1);
}


x86 assembly (clang, -O0):
<g>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
sub    $0x1,%edi
call   1030 <f@plt>
mov    %eax,-0x8(%rbp)
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<g>:
add    $0xffffffff,%edi
jmp    1030 <f@plt>

LLVM IR (-O0):
define void @g(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %2
%4 = load i32, i32* %2
%5 = sub nsw i32 %4, 1
%6 = call i32 @f(i32 %5)
store i32 %6, i32* %3
ret void
}

LLVM IR (-O2):
define void @g(i32 %0) {
%2 = add nsw i32 %0, -1
%3 = tail call i32 @f(i32 %2)
ret void
}
void XGetIconName() {}


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

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

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

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


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

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

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

LLVM IR (-O2):
define void @foo_1_2_2_2_1_2_2_2_2() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ printf(char *);
void *func(void *arg) {
  printf("\n Thread one is running...\n");
  exit(1);
}


x86 assembly (clang, -O0):
<func>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
lea    0xecd(%rip),%rdi
call   1030 <printf@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

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

LLVM IR (-O0):
@.str = [28 x i8] c"\0A Thread one is running...\0A\00"
define i8* @func(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = call i32 @printf(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str, i64 0, i64 0))
%4 = call i32 @exit(i32 1)
unreachable
}

LLVM IR (-O2):
@str = [27 x i8] c"\0A Thread one is running...\00"
define noalias i8* @func(i8* nocapture readnone %0) {
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([27 x i8], [27 x i8]* @str, i64 0, i64 0))
%3 = tail call i32 @exit(i32 1)
unreachable
}
/* Variables and functions */
int const RAND_MAX;
int rand();
int randRange(int min, int max) {
  rand();
  int r;
  const int range = 1 + max - min;
  const int buckets = RAND_MAX / range;
  const int limit = buckets * range;
  do {
    r = rand();
  } while (r >= limit);
  return min + (r / buckets);
}


x86 assembly (clang, -O0):
<randRange>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    $0x0,%al
call   1030 <rand@plt>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
sub    -0x4(%rbp),%eax
mov    %eax,-0x10(%rbp)
mov    0x2eb0(%rip),%rax
mov    (%rax),%eax
cltd
idivl  -0x10(%rbp)
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
imul   -0x10(%rbp),%eax
mov    %eax,-0x18(%rbp)
mov    $0x0,%al
call   1030 <rand@plt>
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
cmp    -0x18(%rbp),%eax
jge    114b <randRange+0x3b>
mov    -0x4(%rbp),%eax
mov    %eax,-0x1c(%rbp)
mov    -0xc(%rbp),%eax
cltd
idivl  -0x14(%rbp)
mov    %eax,%ecx
mov    -0x1c(%rbp),%eax
add    %ecx,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<randRange>:
push   %rax
xor    %eax,%eax
call   1030 <rand@plt>
nopl   0x0(%rax,%rax,1)
xor    %eax,%eax
call   1030 <rand@plt>
test   %eax,%eax
jns    1120 <randRange+0x10>
pop    %rcx
ret

LLVM IR (-O0):
@RAND_MAX = constant i32 0
define i32 @randRange(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%9 = call i32 (...) @rand()
%10 = load i32, i32* %4
%11 = add nsw i32 1, %10
%12 = load i32, i32* %3
%13 = sub nsw i32 %11, %12
store i32 %13, i32* %6
%14 = load i32, i32* @RAND_MAX
%15 = load i32, i32* %6
%16 = sdiv i32 %14, %15
store i32 %16, i32* %7
%17 = load i32, i32* %7
%18 = load i32, i32* %6
%19 = mul nsw i32 %17, %18
store i32 %19, i32* %8
br label %20
20: ; preds = %22, %2
%21 = call i32 (...) @rand()
store i32 %21, i32* %5
br label %22
22: ; preds = %20
%23 = load i32, i32* %5
%24 = load i32, i32* %8
%25 = icmp sge i32 %23, %24
br i1 %25, label %20, label %26
26: ; preds = %22
%27 = load i32, i32* %3
%28 = load i32, i32* %5
%29 = load i32, i32* %7
%30 = sdiv i32 %28, %29
%31 = add nsw i32 %27, %30
ret i32 %31
}

LLVM IR (-O2):
@RAND_MAX = constant i32 0
define i32 @randRange(i32 %0, i32 %1) {
%3 = tail call i32 (...) @rand()
br label %4
4: ; preds = %4, %2
%5 = tail call i32 (...) @rand()
%6 = icmp sgt i32 %5, -1
br i1 %6, label %4, label %7
7: ; preds = %4
ret i32 poison
}
/* Variables and functions */
int randomNumber(int, int);
int rollDie() { return randomNumber(1, 6); }


x86 assembly (clang, -O0):
<rollDie>:
push   %rbp
mov    %rsp,%rbp
mov    $0x1,%edi
mov    $0x6,%esi
call   1030 <randomNumber@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<rollDie>:
mov    $0x1,%edi
mov    $0x6,%esi
jmp    1030 <randomNumber@plt>

LLVM IR (-O0):
define i32 @rollDie() {
%1 = call i32 @randomNumber(i32 1, i32 6)
ret i32 %1
}

LLVM IR (-O2):
define i32 @rollDie() {
%1 = tail call i32 @randomNumber(i32 1, i32 6)
ret i32 %1
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int pa_once_end() {
  printf("NOT IMPLEMENTED:"
         "pa_once_end"
         "\n");
}


x86 assembly (clang, -O0):
<pa_once_end>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    0xee1(%rip),%rdi
call   1030 <printf@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
@.str = [29 x i8] c"NOT IMPLEMENTED:pa_once_end\0A\00"
define i32 @pa_once_end() {
%1 = alloca i32
%2 = call i32 @printf(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str, i64 0, i64 0))
%3 = load i32, i32* %1
ret i32 %3
}

LLVM IR (-O2):
@str = [28 x i8] c"NOT IMPLEMENTED:pa_once_end\00"
define i32 @pa_once_end() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([28 x i8], [28 x i8]* @str, i64 0, i64 0))
ret i32 undef
}
extern void put_fs_byte(char val, char *addr) {
  __asm__("movb %0,%%fs:%1" ::"q"(val), "m"(*addr));
}


x86 assembly (clang, -O0):
<put_fs_byte>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x1(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x1(%rbp),%al
mov    -0x10(%rbp),%rcx
mov    %al,%fs:(%rcx)
pop    %rbp
ret

x86 assembly (clang, -O2):
<put_fs_byte>:
mov    %dil,%fs:(%rsi)
ret

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

LLVM IR (-O2):
define void @put_fs_byte(i8 signext %0, i8* %1) {
tail call void asm sideeffect "movb $0,%fs:$1", "q,*m,~{dirflag},~{fpsr},~{flags}"(i8 %0, i8* elementtype(i8) %1)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ isspace(int);
void t_isspace_0xb8() {
  Assert_real((isspace(184) == 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_isspace.c",
              925, ("isspace should be 0 for 0xb8"));
}


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

x86 assembly (clang, -O2):
<t_isspace_0xb8>:
push   %rax
mov    $0xb8,%edi
call   1030 <isspace@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf66(%rip),%rcx
mov    $0x39d,%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_isspace.c\00"
@.str.1 = [29 x i8] c"isspace should be 0 for 0xb8\00"
define void @t_isspace_0xb8() {
%1 = call i64 @isspace(i32 184)
%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 925, 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_isspace.c\00"
@.str.1 = [29 x i8] c"isspace should be 0 for 0xb8\00"
define void @t_isspace_0xb8() {
%1 = tail call i64 @isspace(i32 184)
%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 925, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0))
ret void
}