xunge/DecIR huggingface dataset:
unsigned int ft_strnlen(char *str, unsigned int size) {
  unsigned int i;
  i = 0;
  while (i < size && str && str[i])
    i++;
  return (i);
}


x86 assembly (clang, -O0):
<ft_strnlen>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
movl   $0x0,-0x10(%rbp)
mov    -0x10(%rbp),%ecx
xor    %eax,%eax
cmp    -0xc(%rbp),%ecx
mov    %al,-0x11(%rbp)
jae    1147 <ft_strnlen+0x47>
xor    %eax,%eax
cmpq   $0x0,-0x8(%rbp)
mov    %al,-0x11(%rbp)
je     1147 <ft_strnlen+0x47>
mov    -0x8(%rbp),%rax
mov    -0x10(%rbp),%ecx
movsbl (%rax,%rcx,1),%eax
cmp    $0x0,%eax
setne  %al
mov    %al,-0x11(%rbp)
mov    -0x11(%rbp),%al
test   $0x1,%al
jne    1157 <ft_strnlen+0x57>
jmp    1165 <ft_strnlen+0x65>
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    1112 <ft_strnlen+0x12>
mov    -0x10(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<ft_strnlen>:
xor    %eax,%eax
test   %rdi,%rdi
je     111f <ft_strnlen+0x1f>
test   %esi,%esi
je     111f <ft_strnlen+0x1f>
mov    %esi,%ecx
xor    %eax,%eax
nop
cmpb   $0x0,(%rdi,%rax,1)
je     111f <ft_strnlen+0x1f>
add    $0x1,%rax
cmp    %rcx,%rax
jb     1110 <ft_strnlen+0x10>
ret

LLVM IR (-O0):
define i32 @ft_strnlen(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i32
%5 = alloca i32
store i8* %0, i8** %3
store i32 %1, i32* %4
store i32 0, i32* %5
br label %6
6: ; preds = %23, %2
%7 = load i32, i32* %5
%8 = load i32, i32* %4
%9 = icmp ult i32 %7, %8
br i1 %9, label %10, label %21
10: ; preds = %6
%11 = load i8*, i8** %3
%12 = icmp ne i8* %11, null
br i1 %12, label %13, label %21
13: ; preds = %10
%14 = load i8*, i8** %3
%15 = load i32, i32* %5
%16 = zext i32 %15 to i64
%17 = getelementptr inbounds i8, i8* %14, i64 %16
%18 = load i8, i8* %17
%19 = sext i8 %18 to i32
%20 = icmp ne i32 %19, 0
br label %21
21: ; preds = %13, %10, %6
%22 = phi i1 [ false, %10 ], [ false, %6 ], [ %20, %13 ]
br i1 %22, label %23, label %26
23: ; preds = %21
%24 = load i32, i32* %5
%25 = add i32 %24, 1
store i32 %25, i32* %5
br label %6
26: ; preds = %21
%27 = load i32, i32* %5
ret i32 %27
}

LLVM IR (-O2):
define i32 @ft_strnlen(i8* %0, i32 %1) {
%3 = icmp ne i8* %0, null
%4 = icmp ne i32 %1, 0
%5 = and i1 %3, %4
br i1 %5, label %6, label %19
6: ; preds = %2
%7 = zext i32 %1 to i64
br label %8
8: ; preds = %6, %13
%9 = phi i64 [ 0, %6 ], [ %14, %13 ]
%10 = getelementptr inbounds i8, i8* %0, i64 %9
%11 = load i8, i8* %10
%12 = icmp eq i8 %11, 0
br i1 %12, label %16, label %13
13: ; preds = %8
%14 = add nuw nsw i64 %9, 1
%15 = icmp ult i64 %14, %7
br i1 %15, label %8, label %16
16: ; preds = %13, %8
%17 = phi i64 [ %9, %8 ], [ %14, %13 ]
%18 = trunc i64 %17 to i32
br label %19
19: ; preds = %16, %2
%20 = phi i32 [ 0, %2 ], [ %18, %16 ]
ret i32 %20
}
int sqlite3GenericAllocationSize(void *p) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @sqlite3GenericAllocationSize(i8* nocapture readnone %0) {
ret i32 0
}
void put_2_le(unsigned char *ptr, unsigned int data) {
  ptr[0] = data & 0xff;
  ptr[1] = (data >> 8) & 0xff;
}


x86 assembly (clang, -O0):
<put_2_le>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0xc(%rbp),%eax
and    $0xff,%eax
mov    %al,%cl
mov    -0x8(%rbp),%rax
mov    %cl,(%rax)
mov    -0xc(%rbp),%eax
shr    $0x8,%eax
and    $0xff,%eax
mov    %al,%cl
mov    -0x8(%rbp),%rax
mov    %cl,0x1(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<put_2_le>:
mov    %si,(%rdi)
ret

LLVM IR (-O0):
define void @put_2_le(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i32
store i8* %0, i8** %3
store i32 %1, i32* %4
%5 = load i32, i32* %4
%6 = and i32 %5, 255
%7 = trunc i32 %6 to i8
%8 = load i8*, i8** %3
%9 = getelementptr inbounds i8, i8* %8, i64 0
store i8 %7, i8* %9
%10 = load i32, i32* %4
%11 = lshr i32 %10, 8
%12 = and i32 %11, 255
%13 = trunc i32 %12 to i8
%14 = load i8*, i8** %3
%15 = getelementptr inbounds i8, i8* %14, i64 1
store i8 %13, i8* %15
ret void
}

LLVM IR (-O2):
define void @put_2_le(i8* nocapture writeonly %0, i32 %1) {
%3 = trunc i32 %1 to i8
store i8 %3, i8* %0
%4 = lshr i32 %1, 8
%5 = trunc i32 %4 to i8
%6 = getelementptr inbounds i8, i8* %0, i64 1
store i8 %5, i8* %6
ret void
}
/* Type definitions */
typedef int uint32_t;

/* Variables and functions */
bool SHAREMIND_MAP_KEY_COPY_uint32_t(uint32_t *const dest, uint32_t const src) {
  return (((*dest) = src), true);
}


x86 assembly (clang, -O0):
<SHAREMIND_MAP_KEY_COPY_uint32_t>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0xc(%rbp),%ecx
mov    -0x8(%rbp),%rax
mov    %ecx,(%rax)
mov    $0x1,%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @SHAREMIND_MAP_KEY_COPY_uint32_t(i32* nocapture writeonly %0, i32 %1) {
store i32 %1, i32* %0
ret i32 1
}
/* Variables and functions */
int /*<<< orphan*/ nTabShift(int);
void IF_NTShiftL(void) { nTabShift(-1); }


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

x86 assembly (clang, -O2):
<IF_NTShiftL>:
mov    $0xffffffff,%edi
jmp    1030 <nTabShift@plt>

LLVM IR (-O0):
define void @IF_NTShiftL() {
%1 = call i32 @nTabShift(i32 -1)
ret void
}

LLVM IR (-O2):
define void @IF_NTShiftL() {
%1 = tail call i32 @nTabShift(i32 -1)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ GL_BACK;
int /*<<< orphan*/ GL_FRONT;
int /*<<< orphan*/ glDrawBuffer(int /*<<< orphan*/);
int /*<<< orphan*/ glReadBuffer(int /*<<< orphan*/);
void init(void) {
  glDrawBuffer(GL_FRONT);
  glReadBuffer(GL_BACK);
}


x86 assembly (clang, -O0):
<init>:
push   %rbp
mov    %rsp,%rbp
mov    0x2ebd(%rip),%rax
mov    (%rax),%edi
call   1040 <glDrawBuffer@plt>
mov    0x2e9f(%rip),%rax
mov    (%rax),%edi
call   1030 <glReadBuffer@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<init>:
push   %rax
mov    0x2ec0(%rip),%rax
mov    (%rax),%edi
call   1040 <glDrawBuffer@plt>
mov    0x2ea2(%rip),%rax
mov    (%rax),%edi
pop    %rax
jmp    1030 <glReadBuffer@plt>

LLVM IR (-O0):
@GL_FRONT = global i32 0
@GL_BACK = global i32 0
define void @init() {
%1 = load i32, i32* @GL_FRONT
%2 = call i32 @glDrawBuffer(i32 %1)
%3 = load i32, i32* @GL_BACK
%4 = call i32 @glReadBuffer(i32 %3)
ret void
}

LLVM IR (-O2):
@GL_FRONT = global i32 0
@GL_BACK = global i32 0
define void @init() {
%1 = load i32, i32* @GL_FRONT
%2 = tail call i32 @glDrawBuffer(i32 %1)
%3 = load i32, i32* @GL_BACK
%4 = tail call i32 @glReadBuffer(i32 %3)
ret void
}
int convertMemoryIndex(int index, int memorySize) {
  return (memorySize - (index * 4)) - 1;
}


x86 assembly (clang, -O0):
<convertMemoryIndex>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x8(%rbp),%eax
mov    -0x4(%rbp),%ecx
shl    $0x2,%ecx
sub    %ecx,%eax
sub    $0x1,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<convertMemoryIndex>:
lea    0x0(,%rdi,4),%eax
not    %eax
add    %esi,%eax
ret

LLVM IR (-O0):
define i32 @convertMemoryIndex(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%5 = load i32, i32* %4
%6 = load i32, i32* %3
%7 = mul nsw i32 %6, 4
%8 = sub nsw i32 %5, %7
%9 = sub nsw i32 %8, 1
ret i32 %9
}

LLVM IR (-O2):
define i32 @convertMemoryIndex(i32 %0, i32 %1) {
%3 = mul i32 %0, -4
%4 = add i32 %1, -1
%5 = add i32 %4, %3
ret i32 %5
}
int xdigitconv(char c) {
  if (c >= '0' && c <= '9')
    return c - '0';
  else if (c >= 'a' && c <= 'f')
    return c - 'a' + 10;
  else
    return c - 'A' + 10;
}


x86 assembly (clang, -O0):
<xdigitconv>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x5(%rbp)
movsbl -0x5(%rbp),%eax
cmp    $0x30,%eax
jl     1133 <xdigitconv+0x33>
movsbl -0x5(%rbp),%eax
cmp    $0x39,%eax
jg     1133 <xdigitconv+0x33>
movsbl -0x5(%rbp),%eax
sub    $0x30,%eax
mov    %eax,-0x4(%rbp)
jmp    116c <xdigitconv+0x6c>
movsbl -0x5(%rbp),%eax
cmp    $0x61,%eax
jl     115f <xdigitconv+0x5f>
movsbl -0x5(%rbp),%eax
cmp    $0x66,%eax
jg     115f <xdigitconv+0x5f>
movsbl -0x5(%rbp),%eax
sub    $0x61,%eax
add    $0xa,%eax
mov    %eax,-0x4(%rbp)
jmp    116c <xdigitconv+0x6c>
movsbl -0x5(%rbp),%eax
sub    $0x41,%eax
add    $0xa,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<xdigitconv>:
lea    -0x30(%rdi),%eax
lea    -0x61(%rdi),%ecx
xor    %edx,%edx
cmp    $0x6,%cl
setae  %dl
shl    $0x5,%edx
add    $0xffffffa9,%edx
cmp    $0xa,%al
mov    $0xffffffd0,%eax
cmovae %edx,%eax
add    %edi,%eax
ret

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

LLVM IR (-O2):
define i32 @xdigitconv(i8 signext %0) {
%2 = sext i8 %0 to i32
%3 = add i8 %0, -48
%4 = icmp ult i8 %3, 10
%5 = add i8 %0, -97
%6 = icmp ult i8 %5, 6
%7 = select i1 %6, i32 -87, i32 -55
%8 = select i1 %4, i32 -48, i32 %7
%9 = add nsw i32 %8, %2
ret i32 %9
}
/* Variables and functions */
int fdatasync(int);
int os_fdatasync(int fd) { return fdatasync(fd); }


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

x86 assembly (clang, -O2):
<os_fdatasync>:
jmp    1030 <fdatasync@plt>

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

LLVM IR (-O2):
define i32 @os_fdatasync(i32 %0) {
%2 = tail call i32 @fdatasync(i32 %0)
ret i32 %2
}
int test_imm_39int64_highword_reg(long long val) {
  return ((val >> 32) & (0x39 << 0)) ? -20 : -40;
}


x86 assembly (clang, -O0):
<test_imm_39int64_highword_reg>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdx
sar    $0x20,%rdx
and    $0x39,%rdx
mov    $0xffffffd8,%eax
mov    $0xffffffec,%ecx
cmp    $0x0,%rdx
cmovne %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_imm_39int64_highword_reg>:
movabs $0x3900000000,%rax
test   %rax,%rdi
mov    $0xffffffd8,%ecx
mov    $0xffffffec,%eax
cmove  %ecx,%eax
ret

LLVM IR (-O0):
define i32 @test_imm_39int64_highword_reg(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = load i64, i64* %2
%4 = ashr i64 %3, 32
%5 = and i64 %4, 57
%6 = icmp ne i64 %5, 0
%7 = zext i1 %6 to i64
%8 = select i1 %6, i32 -20, i32 -40
ret i32 %8
}

LLVM IR (-O2):
define i32 @test_imm_39int64_highword_reg(i64 %0) {
%2 = and i64 %0, 244813135872
%3 = icmp eq i64 %2, 0
%4 = select i1 %3, i32 -40, i32 -20
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ isspace(char);
int srt_isempty(char *s) {
  while (*s != 0) {
    if (!isspace(*s))
      return 0;
    ++s;
  }
  return 1;
}


x86 assembly (clang, -O0):
<srt_isempty>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x0,%eax
je     115e <srt_isempty+0x4e>
mov    -0x10(%rbp),%rax
movsbl (%rax),%edi
call   1030 <isspace@plt>
cmp    $0x0,%eax
jne    114d <srt_isempty+0x3d>
movl   $0x0,-0x4(%rbp)
jmp    1165 <srt_isempty+0x55>
mov    -0x10(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x10(%rbp)
jmp    111c <srt_isempty+0xc>
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<srt_isempty>:
push   %rbp
push   %rbx
push   %rax
mov    (%rdi),%al
mov    $0x1,%ebp
test   %al,%al
je     114b <srt_isempty+0x3b>
mov    %rdi,%rbx
add    $0x1,%rbx
cs nopw 0x0(%rax,%rax,1)
nop
movsbl %al,%edi
call   1030 <isspace@plt>
test   %eax,%eax
je     1149 <srt_isempty+0x39>
movzbl (%rbx),%eax
add    $0x1,%rbx
test   %al,%al
jne    1130 <srt_isempty+0x20>
jmp    114b <srt_isempty+0x3b>
xor    %ebp,%ebp
mov    %ebp,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

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

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

/* Variables and functions */
int beri_debug_client_unpipeline_execution(struct beri_debug *);
int /*<<< orphan*/ printf(char *);
int berictl_unpipeline(struct beri_debug *bdp) {
  int ret;
  ret = beri_debug_client_unpipeline_execution(bdp);
  if (ret != 0)
    return (ret);
  printf("CPU running unpipelined\n");
  return (0);
}


x86 assembly (clang, -O0):
<berictl_unpipeline>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
call   1040 <beri_debug_client_unpipeline_execution@plt>
mov    %eax,-0x14(%rbp)
cmpl   $0x0,-0x14(%rbp)
je     114d <berictl_unpipeline+0x2d>
mov    -0x14(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    1160 <berictl_unpipeline+0x40>
lea    0xeac(%rip),%rdi
call   1030 <printf@plt>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<berictl_unpipeline>:
push   %rbx
call   1040 <beri_debug_client_unpipeline_execution@plt>
mov    %eax,%ebx
test   %eax,%eax
jne    1138 <berictl_unpipeline+0x18>
lea    0xecd(%rip),%rdi
call   1030 <puts@plt>
mov    %ebx,%eax
pop    %rbx
ret

LLVM IR (-O0):
%struct.beri_debug = type { i32 }
@.str = [25 x i8] c"CPU running unpipelined\0A\00"
define i32 @berictl_unpipeline(%struct.beri_debug* %0) {
%2 = alloca i32
%3 = alloca %struct.beri_debug*
%4 = alloca i32
store %struct.beri_debug* %0, %struct.beri_debug** %3
%5 = load %struct.beri_debug*, %struct.beri_debug** %3
%6 = call i32 @beri_debug_client_unpipeline_execution(%struct.beri_debug* %5)
store i32 %6, i32* %4
%7 = load i32, i32* %4
%8 = icmp ne i32 %7, 0
br i1 %8, label %9, label %11
9: ; preds = %1
%10 = load i32, i32* %4
store i32 %10, i32* %2
br label %13
11: ; preds = %1
%12 = call i32 @printf(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str, i64 0, i64 0))
store i32 0, i32* %2
br label %13
13: ; preds = %11, %9
%14 = load i32, i32* %2
ret i32 %14
}

LLVM IR (-O2):
%struct.beri_debug = type { i32 }
@str = [24 x i8] c"CPU running unpipelined\00"
define i32 @berictl_unpipeline(%struct.beri_debug* %0) {
%2 = tail call i32 @beri_debug_client_unpipeline_execution(%struct.beri_debug* %0)
%3 = icmp eq i32 %2, 0
br i1 %3, label %4, label %6
4: ; preds = %1
%5 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([24 x i8], [24 x i8]* @str, i64 0, i64 0))
br label %6
6: ; preds = %1, %4
ret i32 %2
}
/* Variables and functions */
int /*<<< orphan*/ sgen2(char *, char *, int, char *);
void cgdecpg(char *s, int v) { sgen2("%s\t$%d,%s", "subq", v, s); }


x86 assembly (clang, -O0):
<cgdecpg>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0xc(%rbp),%edx
mov    -0x8(%rbp),%rcx
lea    0xed3(%rip),%rdi
lea    0xed6(%rip),%rsi
call   1030 <sgen2@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<cgdecpg>:
mov    %esi,%edx
mov    %rdi,%rcx
lea    0xee4(%rip),%rdi
lea    0xee7(%rip),%rsi
jmp    1030 <sgen2@plt>

LLVM IR (-O0):
@.str = [10 x i8] c"%s\09$%d,%s\00"
@.str.1 = [5 x i8] c"subq\00"
define void @cgdecpg(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i32
store i8* %0, i8** %3
store i32 %1, i32* %4
%5 = load i32, i32* %4
%6 = load i8*, i8** %3
%7 = call i32 @sgen2(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0), i32 %5, i8* %6)
ret void
}

LLVM IR (-O2):
@.str = [10 x i8] c"%s\09$%d,%s\00"
@.str.1 = [5 x i8] c"subq\00"
define void @cgdecpg(i8* %0, i32 %1) {
%3 = tail call i32 @sgen2(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0), i32 %1, i8* %0)
ret void
}
int passes_loc_constraints_urq(int **walk_points, int curr_num_pts,
                               double not_used) {
  if (walk_points[curr_num_pts - 1][0] < 0)
    return 0;
  if (walk_points[curr_num_pts - 1][1] < 0)
    return 0;
  return 1;
}


x86 assembly (clang, -O0):
<passes_loc_constraints_urq>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    %esi,-0x14(%rbp)
movsd  %xmm0,-0x20(%rbp)
mov    -0x10(%rbp),%rax
mov    -0x14(%rbp),%ecx
sub    $0x1,%ecx
movslq %ecx,%rcx
mov    (%rax,%rcx,8),%rax
cmpl   $0x0,(%rax)
jge    1136 <passes_loc_constraints_urq+0x36>
movl   $0x0,-0x4(%rbp)
jmp    1164 <passes_loc_constraints_urq+0x64>
mov    -0x10(%rbp),%rax
mov    -0x14(%rbp),%ecx
sub    $0x1,%ecx
movslq %ecx,%rcx
mov    (%rax,%rcx,8),%rax
cmpl   $0x0,0x4(%rax)
jge    115d <passes_loc_constraints_urq+0x5d>
movl   $0x0,-0x4(%rbp)
jmp    1164 <passes_loc_constraints_urq+0x64>
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<passes_loc_constraints_urq>:
movslq %esi,%rax
mov    -0x8(%rdi,%rax,8),%rax
cmpl   $0x0,(%rax)
js     1116 <passes_loc_constraints_urq+0x16>
mov    0x4(%rax),%eax
not    %eax
shr    $0x1f,%eax
ret
xor    %eax,%eax
ret

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

LLVM IR (-O2):
define i32 @passes_loc_constraints_urq(i32** nocapture %0, i32 %1, double %2) {
%4 = add nsw i32 %1, -1
%5 = sext i32 %4 to i64
%6 = getelementptr inbounds i32*, i32** %0, i64 %5
%7 = load i32*, i32** %6
%8 = load i32, i32* %7
%9 = icmp slt i32 %8, 0
br i1 %9, label %15, label %10
10: ; preds = %3
%11 = getelementptr inbounds i32, i32* %7, i64 1
%12 = load i32, i32* %11
%13 = xor i32 %12, -1
%14 = lshr i32 %13, 31
br label %15
15: ; preds = %10, %3
%16 = phi i32 [ 0, %3 ], [ %14, %10 ]
ret i32 %16
}
/* Type definitions */
typedef int /*<<< orphan*/ __wsum;
typedef int /*<<< orphan*/ __u8;
typedef int /*<<< orphan*/ __u32;
typedef int /*<<< orphan*/ __sum16;
typedef int /*<<< orphan*/ __be32;

/* Variables and functions */
int /*<<< orphan*/ csum_fold(int /*<<< orphan*/);
int /*<<< orphan*/ csum_tcpudp_nofold(int /*<<< orphan*/, int /*<<< orphan*/,
                                      int /*<<< orphan*/, int /*<<< orphan*/,
                                      int /*<<< orphan*/);
__sum16 csum_tcpudp_magic(__be32 saddr, __be32 daddr, __u32 len, __u8 proto,
                          __wsum sum) {
  return csum_fold(csum_tcpudp_nofold(saddr, daddr, len, proto, sum));
}


x86 assembly (clang, -O0):
<csum_tcpudp_magic>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    %ecx,-0x10(%rbp)
mov    %r8d,-0x14(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x8(%rbp),%esi
mov    -0xc(%rbp),%edx
mov    -0x10(%rbp),%ecx
mov    -0x14(%rbp),%r8d
call   1040 <csum_tcpudp_nofold@plt>
mov    %eax,%edi
call   1030 <csum_fold@plt>
add    $0x20,%rsp
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @csum_tcpudp_magic(i32 %0, i32 %1, i32 %2, i32 %3, i32 %4) {
%6 = tail call i32 @csum_tcpudp_nofold(i32 %0, i32 %1, i32 %2, i32 %3, i32 %4)
%7 = tail call i32 @csum_fold(i32 %6)
ret i32 %7
}
/* Variables and functions */
int /*<<< orphan*/ wait_xmitr();
void putc(int ch) {
  wait_xmitr();
  (*(short int *)((0xfffffc00L) + 0x0e)) = (char)ch;
  wait_xmitr();
}


x86 assembly (clang, -O0):
<putc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    $0x0,%al
call   1030 <wait_xmitr@plt>
mov    -0x4(%rbp),%eax
movsbl %al,%eax
mov    %ax,%cx
mov    $0xfffffc0e,%eax
mov    %cx,(%rax)
mov    $0x0,%al
call   1030 <wait_xmitr@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<putc>:
push   %rbx
mov    %edi,%ebx
xor    %eax,%eax
call   1030 <wait_xmitr@plt>
movsbl %bl,%eax
mov    $0xfffffc0e,%ecx
mov    %ax,(%rcx)
xor    %eax,%eax
pop    %rbx
jmp    1030 <wait_xmitr@plt>

LLVM IR (-O0):
define void @putc(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = call i32 (...) @wait_xmitr()
%4 = load i32, i32* %2
%5 = trunc i32 %4 to i8
%6 = sext i8 %5 to i16
store i16 %6, i16* inttoptr (i64 4294966286 to i16*)
%7 = call i32 (...) @wait_xmitr()
ret void
}

LLVM IR (-O2):
define void @putc(i32 %0) {
%2 = tail call i32 (...) @wait_xmitr()
%3 = trunc i32 %0 to i16
%4 = shl i16 %3, 8
%5 = ashr exact i16 %4, 8
store i16 %5, i16* inttoptr (i64 4294966286 to i16*)
%6 = tail call i32 (...) @wait_xmitr()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void func2(void) { printf("Hey, you entered bar! \n"); }


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

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

LLVM IR (-O0):
@.str = [24 x i8] c"Hey, you entered bar! \0A\00"
define void @func2() {
%1 = call i32 @printf(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@str = [23 x i8] c"Hey, you entered bar! \00"
define void @func2() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([23 x i8], [23 x i8]* @str, i64 0, i64 0))
ret void
}
/* Type definitions */
struct rcu_head {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ __xfs_free_perag(struct rcu_head *);
void xfs_free_perag_rcu_cb(struct rcu_head *head) { __xfs_free_perag(head); }


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

x86 assembly (clang, -O2):
<xfs_free_perag_rcu_cb>:
jmp    1030 <__xfs_free_perag@plt>

LLVM IR (-O0):
%struct.rcu_head = type { i32 }
define void @xfs_free_perag_rcu_cb(%struct.rcu_head* %0) {
%2 = alloca %struct.rcu_head*
store %struct.rcu_head* %0, %struct.rcu_head** %2
%3 = load %struct.rcu_head*, %struct.rcu_head** %2
%4 = call i32 @__xfs_free_perag(%struct.rcu_head* %3)
ret void
}

LLVM IR (-O2):
%struct.rcu_head = type { i32 }
define void @xfs_free_perag_rcu_cb(%struct.rcu_head* %0) {
%2 = tail call i32 @__xfs_free_perag(%struct.rcu_head* %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ get_char_frequencies();
int main(int argc, char const *argv[]) {
  get_char_frequencies();
  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   1030 <get_char_frequencies@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 (...) @get_char_frequencies()
ret i32 0
}
/* Type definitions */
typedef int /*<<< orphan*/ OCSP_REQUEST;
typedef int /*<<< orphan*/ ASN1_VALUE;

/* Variables and functions */
int ASN1_item_i2d(int /*<<< orphan*/ *, unsigned char **, int /*<<< orphan*/ *);
int /*<<< orphan*/ OCSP_REQUEST_it;
int i2d_OCSP_REQUEST(OCSP_REQUEST *a, unsigned char **out) {
  return ASN1_item_i2d((ASN1_VALUE *)a, out, &OCSP_REQUEST_it);
}


x86 assembly (clang, -O0):
<i2d_OCSP_REQUEST>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    0x2eb1(%rip),%rdx
call   1030 <ASN1_item_i2d@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<i2d_OCSP_REQUEST>:
mov    0x2ec9(%rip),%rdx
jmp    1030 <ASN1_item_i2d@plt>

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

LLVM IR (-O2):
@OCSP_REQUEST_it = global i32 0
define i32 @i2d_OCSP_REQUEST(i32* %0, i8** %1) {
%3 = tail call i32 @ASN1_item_i2d(i32* %0, i8** %1, i32* @OCSP_REQUEST_it)
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ isalpha(int);
void t_isalpha_0x09() {
  Assert_real((isalpha(9) == 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_isalpha.c",
              50, ("isalpha should be 0 for 0x09"));
}


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

x86 assembly (clang, -O2):
<t_isalpha_0x09>:
push   %rax
mov    $0x9,%edi
call   1030 <isalpha@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf66(%rip),%rcx
mov    $0x32,%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_isalpha.c\00"
@.str.1 = [29 x i8] c"isalpha should be 0 for 0x09\00"
define void @t_isalpha_0x09() {
%1 = call i64 @isalpha(i32 9)
%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 50, 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_isalpha.c\00"
@.str.1 = [29 x i8] c"isalpha should be 0 for 0x09\00"
define void @t_isalpha_0x09() {
%1 = tail call i64 @isalpha(i32 9)
%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 50, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ __u32;

/* Variables and functions */
scalar_t__ ntohl(int /*<<< orphan*/);
int /*<<< orphan*/ printf(char *, char *, char *);
void get_link(char *linkName, __u32 up) {
  printf("%s: %s\n", linkName, ntohl(up) ? "up" : "down");
}


x86 assembly (clang, -O0):
<get_link>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0xc(%rbp),%edi
call   1040 <ntohl@plt>
mov    -0x18(%rbp),%rsi
mov    %rax,%rcx
lea    0xebe(%rip),%rdx
lea    0xeb4(%rip),%rax
cmp    $0x0,%rcx
cmovne %rax,%rdx
lea    0xe9d(%rip),%rdi
call   1030 <printf@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_link>:
push   %rbx
mov    %rdi,%rbx
mov    %esi,%edi
call   1040 <ntohl@plt>
test   %rax,%rax
lea    0xed6(%rip),%rax
lea    0xecc(%rip),%rdx
cmove  %rax,%rdx
lea    0xeb9(%rip),%rdi
mov    %rbx,%rsi
pop    %rbx
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [8 x i8] c"%s: %s\0A\00"
@.str.1 = [3 x i8] c"up\00"
@.str.2 = [5 x i8] c"down\00"
define void @get_link(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i32
store i8* %0, i8** %3
store i32 %1, i32* %4
%5 = load i8*, i8** %3
%6 = load i32, i32* %4
%7 = call i64 @ntohl(i32 %6)
%8 = icmp ne i64 %7, 0
%9 = zext i1 %8 to i64
%10 = select i1 %8, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.2, i64 0, i64 0)
%11 = call i32 @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i8* %5, i8* %10)
ret void
}

LLVM IR (-O2):
@.str = [8 x i8] c"%s: %s\0A\00"
@.str.1 = [3 x i8] c"up\00"
@.str.2 = [5 x i8] c"down\00"
define void @get_link(i8* %0, i32 %1) {
%3 = tail call i64 @ntohl(i32 %1)
%4 = icmp eq i64 %3, 0
%5 = select i1 %4, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0)
%6 = tail call i32 @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i8* %0, i8* %5)
ret void
}
int ack(int m, int n) {
  if (m == 0)
    return n + 1;
  if (m > 0 && n == 0)
    return ack(m - 1, 1);
  return ack(m - 1, ack(m, n - 1));
}


x86 assembly (clang, -O0):
<ack>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
cmpl   $0x0,-0x8(%rbp)
jne    1136 <ack+0x26>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
jmp    1186 <ack+0x76>
cmpl   $0x0,-0x8(%rbp)
jle    1162 <ack+0x52>
cmpl   $0x0,-0xc(%rbp)
jne    1162 <ack+0x52>
mov    -0x8(%rbp),%edi
sub    $0x1,%edi
mov    $0x1,%esi
call   1030 <ack@plt>
mov    %eax,-0x4(%rbp)
jmp    1186 <ack+0x76>
mov    -0x8(%rbp),%eax
sub    $0x1,%eax
mov    %eax,-0x10(%rbp)
mov    -0x8(%rbp),%edi
mov    -0xc(%rbp),%esi
sub    $0x1,%esi
call   1030 <ack@plt>
mov    -0x10(%rbp),%edi
mov    %eax,%esi
call   1030 <ack@plt>
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ack>:
push   %rbx
test   %edi,%edi
je     1140 <ack+0x30>
mov    %edi,%ebx
jmp    1131 <ack+0x21>
nopl   0x0(%rax)
add    $0xffffffff,%esi
mov    %ebx,%edi
call   1030 <ack@plt>
mov    %eax,%esi
add    $0xffffffff,%ebx
je     1142 <ack+0x32>
test   %ebx,%ebx
jle    1120 <ack+0x10>
mov    $0x1,%eax
test   %esi,%esi
je     112a <ack+0x1a>
jmp    1120 <ack+0x10>
mov    %esi,%eax
add    $0x1,%eax
pop    %rbx
ret

LLVM IR (-O0):
define i32 @ack(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 eq i32 %6, 0
br i1 %7, label %8, label %11
8: ; preds = %2
%9 = load i32, i32* %5
%10 = add nsw i32 %9, 1
store i32 %10, i32* %3
br label %29
11: ; preds = %2
%12 = load i32, i32* %4
%13 = icmp sgt i32 %12, 0
br i1 %13, label %14, label %21
14: ; preds = %11
%15 = load i32, i32* %5
%16 = icmp eq i32 %15, 0
br i1 %16, label %17, label %21
17: ; preds = %14
%18 = load i32, i32* %4
%19 = sub nsw i32 %18, 1
%20 = call i32 @ack(i32 %19, i32 1)
store i32 %20, i32* %3
br label %29
21: ; preds = %14, %11
%22 = load i32, i32* %4
%23 = sub nsw i32 %22, 1
%24 = load i32, i32* %4
%25 = load i32, i32* %5
%26 = sub nsw i32 %25, 1
%27 = call i32 @ack(i32 %24, i32 %26)
%28 = call i32 @ack(i32 %23, i32 %27)
store i32 %28, i32* %3
br label %29
29: ; preds = %21, %17, %8
%30 = load i32, i32* %3
ret i32 %30
}

LLVM IR (-O2):
define i32 @ack(i32 %0, i32 %1) {
%3 = icmp eq i32 %0, 0
br i1 %3, label %4, label %7
4: ; preds = %13, %2
%5 = phi i32 [ %1, %2 ], [ %14, %13 ]
%6 = add nsw i32 %5, 1
ret i32 %6
7: ; preds = %2, %13
%8 = phi i32 [ %14, %13 ], [ %1, %2 ]
%9 = phi i32 [ %15, %13 ], [ %0, %2 ]
%10 = icmp sgt i32 %9, 0
%11 = icmp eq i32 %8, 0
%12 = and i1 %10, %11
br i1 %12, label %13, label %17
13: ; preds = %7, %17
%14 = phi i32 [ %19, %17 ], [ 1, %7 ]
%15 = add nsw i32 %9, -1
%16 = icmp eq i32 %15, 0
br i1 %16, label %4, label %7
17: ; preds = %7
%18 = add nsw i32 %8, -1
%19 = tail call i32 @ack(i32 %9, i32 %18)
br label %13
}
void gtk_icon_set_add_source() {}


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

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

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

LLVM IR (-O2):
define void @gtk_icon_set_add_source() {
ret void
}
void rmvs_(dx, dy, dz) short *dx, *dy, *dz;
{ rmv((float)*dx, (float)*dy, (float)*dz); }


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

x86 assembly (clang, -O2):
<rmvs_>:
movswl (%rdi),%eax
cvtsi2sd %eax,%xmm0
movswl (%rsi),%eax
cvtsi2sd %eax,%xmm1
movswl (%rdx),%eax
cvtsi2sd %eax,%xmm2
mov    $0x3,%al
jmp    1030 <rmv@plt>

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

LLVM IR (-O2):
define void @rmvs_(i16* nocapture %0, i16* nocapture %1, i16* nocapture %2) {
%4 = load i16, i16* %0
%5 = sitofp i16 %4 to double
%6 = load i16, i16* %1
%7 = sitofp i16 %6 to double
%8 = load i16, i16* %2
%9 = sitofp i16 %8 to double
%10 = tail call i32 (double, double, double, ...) bitcast (i32 (...)* @rmv to i32 (double, double, double, ...)*)(double %5, double %7, double %9)
ret void
}
/* Variables and functions */
double Entire_Incomplete_Gamma_Function(double, double);
double Gamma_Distribution(double x, double nu) {
  return (x <= 0.0) ? 0.0 : Entire_Incomplete_Gamma_Function(x, nu);
}


x86 assembly (clang, -O0):
<Gamma_Distribution>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
xorps  %xmm0,%xmm0
ucomisd -0x8(%rbp),%xmm0
jb     113d <Gamma_Distribution+0x2d>
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x18(%rbp)
jmp    1151 <Gamma_Distribution+0x41>
movsd  -0x8(%rbp),%xmm0
movsd  -0x10(%rbp),%xmm1
call   1030 <Entire_Incomplete_Gamma_Function@plt>
movsd  %xmm0,-0x18(%rbp)
movsd  -0x18(%rbp),%xmm0
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Gamma_Distribution>:
xorpd  %xmm2,%xmm2
ucomisd %xmm0,%xmm2
jae    111f <Gamma_Distribution+0xf>
jmp    1030 <Entire_Incomplete_Gamma_Function@plt>
xorpd  %xmm0,%xmm0
ret

LLVM IR (-O0):
define double @Gamma_Distribution(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 = fcmp ole double %5, 0.000000e+00
br i1 %6, label %7, label %8
7: ; preds = %2
br label %12
8: ; preds = %2
%9 = load double, double* %3
%10 = load double, double* %4
%11 = call double @Entire_Incomplete_Gamma_Function(double %9, double %10)
br label %12
12: ; preds = %8, %7
%13 = phi double [ 0.000000e+00, %7 ], [ %11, %8 ]
ret double %13
}

LLVM IR (-O2):
define double @Gamma_Distribution(double %0, double %1) {
%3 = fcmp ugt double %0, 0.000000e+00
br i1 %3, label %4, label %6
4: ; preds = %2
%5 = tail call double @Entire_Incomplete_Gamma_Function(double %0, double %1)
br label %6
6: ; preds = %2, %4
%7 = phi double [ %5, %4 ], [ 0.000000e+00, %2 ]
ret double %7
}
/* Type definitions */
typedef int /*<<< orphan*/ uint8_t;
typedef int /*<<< orphan*/ uint32_t;

/* Variables and functions */
int /*<<< orphan*/ crc32part(int /*<<< orphan*/ const *, size_t,
                             int /*<<< orphan*/);
uint32_t crc32(const uint8_t *src, size_t len) {
  return crc32part(src, len, 0);
}


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

x86 assembly (clang, -O2):
<crc32>:
xor    %edx,%edx
jmp    1030 <crc32part@plt>

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

LLVM IR (-O2):
define i32 @crc32(i32* %0, i64 %1) {
%3 = tail call i32 @crc32part(i32* %0, i64 %1, i32 0)
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, ...);
void print(int *a, int n) {
  int i;
  for (i = 0; i < n; i++) {
    printf("%d ", a[i]);
  }
  printf("\n");
}


x86 assembly (clang, -O0):
<print>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
movl   $0x0,-0x10(%rbp)
mov    -0x10(%rbp),%eax
cmp    -0xc(%rbp),%eax
jge    1159 <print+0x49>
mov    -0x8(%rbp),%rax
movslq -0x10(%rbp),%rcx
mov    (%rax,%rcx,4),%esi
lea    0xebc(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    1126 <print+0x16>
lea    0xea4(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<print>:
push   %r15
push   %r14
push   %r12
push   %rbx
push   %rax
test   %esi,%esi
jle    1157 <print+0x37>
mov    %rdi,%r15
mov    %esi,%r12d
lea    0xec7(%rip),%r14
xor    %ebx,%ebx
nopl   0x0(%rax,%rax,1)
mov    (%r15,%rbx,4),%esi
mov    %r14,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
add    $0x1,%rbx
cmp    %rbx,%r12
jne    1140 <print+0x20>
mov    $0xa,%edi
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
jmp    1030 <putchar@plt>

LLVM IR (-O0):
@.str = [4 x i8] c"%d \00"
@.str.1 = [2 x i8] c"\0A\00"
define void @print(i32* %0, i32 %1) {
%3 = alloca i32*
%4 = alloca i32
%5 = alloca i32
store i32* %0, i32** %3
store i32 %1, i32* %4
store i32 0, i32* %5
br label %6
6: ; preds = %17, %2
%7 = load i32, i32* %5
%8 = load i32, i32* %4
%9 = icmp slt i32 %7, %8
br i1 %9, label %10, label %20
10: ; preds = %6
%11 = load i32*, i32** %3
%12 = load i32, i32* %5
%13 = sext i32 %12 to i64
%14 = getelementptr inbounds i32, i32* %11, i64 %13
%15 = load i32, i32* %14
%16 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %15)
br label %17
17: ; preds = %10
%18 = load i32, i32* %5
%19 = add nsw i32 %18, 1
store i32 %19, i32* %5
br label %6
20: ; preds = %6
%21 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [4 x i8] c"%d \00"
define void @print(i32* nocapture %0, i32 %1) {
%3 = icmp sgt i32 %1, 0
br i1 %3, label %4, label %13
4: ; preds = %2
%5 = zext i32 %1 to i64
br label %6
6: ; preds = %4, %6
%7 = phi i64 [ 0, %4 ], [ %11, %6 ]
%8 = getelementptr inbounds i32, i32* %0, i64 %7
%9 = load i32, i32* %8
%10 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %9)
%11 = add nuw nsw i64 %7, 1
%12 = icmp eq i64 %11, %5
br i1 %12, label %13, label %6
13: ; preds = %6, %2
%14 = tail call i32 @putchar(i32 10)
ret void
}
char *mc_band_model_name(int model) {
  switch (model) {
  case 1:
    return "Parabolic";
  case 0:
    return "Kane";
  case 2:
    return "Full";
  default:
    return "Unknown Band Model";
  }
}


x86 assembly (clang, -O0):
<mc_band_model_name>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0xc(%rbp)
mov    -0xc(%rbp),%eax
mov    %eax,-0x10(%rbp)
test   %eax,%eax
je     114c <mc_band_model_name+0x4c>
jmp    111a <mc_band_model_name+0x1a>
mov    -0x10(%rbp),%eax
sub    $0x1,%eax
je     113c <mc_band_model_name+0x3c>
jmp    112b <mc_band_model_name+0x2b>
mov    -0x10(%rbp),%eax
sub    $0x2,%eax
je     115c <mc_band_model_name+0x5c>
jmp    116c <mc_band_model_name+0x6c>
lea    0xebd(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    1177 <mc_band_model_name+0x77>
lea    0xeb7(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    1177 <mc_band_model_name+0x77>
lea    0xeac(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    1177 <mc_band_model_name+0x77>
lea    0xea1(%rip),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<mc_band_model_name>:
cmp    $0x2,%edi
ja     1117 <mc_band_model_name+0x17>
movslq %edi,%rax
lea    0xf19(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
ret
lea    0xef6(%rip),%rax
ret

LLVM IR (-O0):
@.str = [10 x i8] c"Parabolic\00"
@.str.1 = [5 x i8] c"Kane\00"
@.str.2 = [5 x i8] c"Full\00"
@.str.3 = [19 x i8] c"Unknown Band Model\00"
define i8* @mc_band_model_name(i32 %0) {
%2 = alloca i8*
%3 = alloca i32
store i32 %0, i32* %3
%4 = load i32, i32* %3
switch i32 %4, label %8 [
i32 1, label %5
i32 0, label %6
i32 2, label %7
]
5: ; preds = %1
store i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i8** %2
br label %9
6: ; preds = %1
store i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0), i8** %2
br label %9
7: ; preds = %1
store i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.2, i64 0, i64 0), i8** %2
br label %9
8: ; preds = %1
store i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.3, i64 0, i64 0), i8** %2
br label %9
9: ; preds = %8, %7, %6, %5
%10 = load i8*, i8** %2
ret i8* %10
}

LLVM IR (-O2):
@.str = [10 x i8] c"Parabolic\00"
@.str.1 = [5 x i8] c"Kane\00"
@.str.2 = [5 x i8] c"Full\00"
@.str.3 = [19 x i8] c"Unknown Band Model\00"
@reltable.mc_band_model_name = [3 x i32] [i32 trunc (i64 sub (i64 ptrtoint ([5 x i8]* @.str.1 to i64), i64 ptrtoint ([3 x i32]* @reltable.mc_band_model_name to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([10 x i8]* @.str to i64), i64 ptrtoint ([3 x i32]* @reltable.mc_band_model_name to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([5 x i8]* @.str.2 to i64), i64 ptrtoint ([3 x i32]* @reltable.mc_band_model_name to i64)) to i32)]
define i8* @mc_band_model_name(i32 %0) {
%2 = icmp ult i32 %0, 3
br i1 %2, label %3, label %7
3: ; preds = %1
%4 = sext i32 %0 to i64
%5 = shl i64 %4, 2
%6 = call i8* @llvm.load.relative.i64(i8* bitcast ([3 x i32]* @reltable.mc_band_model_name to i8*), i64 %5)
br label %7
7: ; preds = %1, %3
%8 = phi i8* [ %6, %3 ], [ getelementptr inbounds ([19 x i8], [19 x i8]* @.str.3, i64 0, i64 0), %1 ]
ret i8* %8
}
/* Type definitions */
struct diGraph {
  int dummy;
};
struct dgNodeRef {
  int dummy;
};
struct dgNode {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ dgClearConnFlags(struct diGraph *);
struct dgNodeRef *dgFindNewConnected(struct diGraph *, struct dgNode *);
struct dgNodeRef *dgFindConnectedToNode(struct diGraph *dg, struct dgNode *a) {
  dgClearConnFlags(dg);
  return dgFindNewConnected(dg, a);
}


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

x86 assembly (clang, -O2):
<dgFindConnectedToNode>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%r14
mov    %rdi,%rbx
call   1030 <dgClearConnFlags@plt>
mov    %rbx,%rdi
mov    %r14,%rsi
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1040 <dgFindNewConnected@plt>

LLVM IR (-O0):
%struct.dgNodeRef = type { i32 }
%struct.diGraph = type { i32 }
%struct.dgNode = type { i32 }
define %struct.dgNodeRef* @dgFindConnectedToNode(%struct.diGraph* %0, %struct.dgNode* %1) {
%3 = alloca %struct.diGraph*
%4 = alloca %struct.dgNode*
store %struct.diGraph* %0, %struct.diGraph** %3
store %struct.dgNode* %1, %struct.dgNode** %4
%5 = load %struct.diGraph*, %struct.diGraph** %3
%6 = call i32 @dgClearConnFlags(%struct.diGraph* %5)
%7 = load %struct.diGraph*, %struct.diGraph** %3
%8 = load %struct.dgNode*, %struct.dgNode** %4
%9 = call %struct.dgNodeRef* @dgFindNewConnected(%struct.diGraph* %7, %struct.dgNode* %8)
ret %struct.dgNodeRef* %9
}

LLVM IR (-O2):
%struct.dgNodeRef = type { i32 }
%struct.diGraph = type { i32 }
%struct.dgNode = type { i32 }
define %struct.dgNodeRef* @dgFindConnectedToNode(%struct.diGraph* %0, %struct.dgNode* %1) {
%3 = tail call i32 @dgClearConnFlags(%struct.diGraph* %0)
%4 = tail call %struct.dgNodeRef* @dgFindNewConnected(%struct.diGraph* %0, %struct.dgNode* %1)
ret %struct.dgNodeRef* %4
}