xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ isalnum(int);
void t_isalnum_0xf0() {
  Assert_real((isalnum(240) == 0),
              "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
              "2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/"
              "dg/z88dk/test/suites/ctype/test_isalnum.c",
              1205, ("isalnum should be 0 for 0xf0"));
}


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

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

LLVM IR (-O0):
@.str = [168 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/ctype/test_isalnum.c\00"
@.str.1 = [29 x i8] c"isalnum should be 0 for 0xf0\00"
define void @t_isalnum_0xf0() {
%1 = call i64 @isalnum(i32 240)
%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 1205, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0))
ret void
}

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

/* Variables and functions */
int /*<<< orphan*/ EINVAL;
int /*<<< orphan*/ errno;
int /*<<< orphan*/ printf(char *);
int sigaddset(sigset_t *set __attribute__((unused)),
              int signum __attribute__((unused))) {
  printf("sigaddset\n");
  errno = EINVAL;
  return -1;
}


x86 assembly (clang, -O0):
<sigaddset>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
lea    0xeda(%rip),%rdi
call   1030 <printf@plt>
mov    0x2ea6(%rip),%rax
mov    (%rax),%ecx
mov    0x2ea5(%rip),%rax
mov    %ecx,(%rax)
mov    $0xffffffff,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<sigaddset>:
push   %rax
lea    0xee8(%rip),%rdi
call   1030 <puts@plt>
mov    0x2eb4(%rip),%rax
mov    (%rax),%eax
mov    0x2eb3(%rip),%rcx
mov    %eax,(%rcx)
mov    $0xffffffff,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [11 x i8] c"sigaddset\0A\00"
@EINVAL = global i32 0
@errno = global i32 0
define i32 @sigaddset(i32* %0, i32 %1) {
%3 = alloca i32*
%4 = alloca i32
store i32* %0, i32** %3
store i32 %1, i32* %4
%5 = call i32 @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0))
%6 = load i32, i32* @EINVAL
store i32 %6, i32* @errno
ret i32 -1
}

LLVM IR (-O2):
@EINVAL = global i32 0
@errno = global i32 0
@str = [10 x i8] c"sigaddset\00"
define i32 @sigaddset(i32* nocapture readnone %0, i32 %1) {
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([10 x i8], [10 x i8]* @str, i64 0, i64 0))
%4 = load i32, i32* @EINVAL
store i32 %4, i32* @errno
ret i32 -1
}
char *strtok(char *str, const char *delim) { return 0; }


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

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

LLVM IR (-O0):
define i8* @strtok(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
store i8* %0, i8** %3
store i8* %1, i8** %4
ret i8* null
}

LLVM IR (-O2):
define noalias i8* @strtok(i8* nocapture readnone %0, i8* nocapture readnone %1) {
ret i8* null
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int /*<<< orphan*/, char *, int, char *);
int /*<<< orphan*/ isprint(int);
void t_isprint_0x27() {
  Assert_real((isprint(39)),
              "/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_isprint.c",
              200, ("isprint should be 1 for '"));
}


x86 assembly (clang, -O0):
<t_isprint_0x27>:
push   %rbp
mov    %rsp,%rbp
mov    $0x27,%edi
call   1030 <isprint@plt>
mov    %eax,%edi
lea    0xec9(%rip),%rsi
mov    $0xc8,%edx
lea    0xf65(%rip),%rcx
call   1040 <Assert_real@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<t_isprint_0x27>:
push   %rax
mov    $0x27,%edi
call   1030 <isprint@plt>
lea    0xece(%rip),%rsi
lea    0xf6f(%rip),%rcx
mov    %eax,%edi
mov    $0xc8,%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_isprint.c\00"
@.str.1 = [26 x i8] c"isprint should be 1 for '\00"
define void @t_isprint_0x27() {
%1 = call i32 @isprint(i32 39)
%2 = call i32 @Assert_real(i32 %1, i8* getelementptr inbounds ([168 x i8], [168 x i8]* @.str, i64 0, i64 0), i32 200, i8* getelementptr inbounds ([26 x i8], [26 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_isprint.c\00"
@.str.1 = [26 x i8] c"isprint should be 1 for '\00"
define void @t_isprint_0x27() {
%1 = tail call i32 @isprint(i32 39)
%2 = tail call i32 @Assert_real(i32 %1, i8* getelementptr inbounds ([168 x i8], [168 x i8]* @.str, i64 0, i64 0), i32 200, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.1, i64 0, i64 0))
ret void
}
void INT_Excep_TPU0_TGI0D(void) {}


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

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

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

LLVM IR (-O2):
define void @INT_Excep_TPU0_TGI0D() {
ret void
}
void test_isxdigit(void) {
  int i, j;
  for (i = -127; i < 256;)
    j = i, printf("%s: %d -> %d\n", __FUNCTION__, j, isxdigit(i++) ? 1 : 0);
}


x86 assembly (clang, -O0):
<test_isxdigit>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0xffffff81,-0x4(%rbp)
cmpl   $0x100,-0x4(%rbp)
jge    1184 <test_isxdigit+0x64>
mov    -0x4(%rbp),%eax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0x4(%rbp),%edi
mov    %edi,%eax
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
call   1040 <isxdigit@plt>
mov    -0xc(%rbp),%edx
mov    %eax,%esi
xor    %ecx,%ecx
mov    $0x1,%eax
cmp    $0x0,%esi
cmovne %eax,%ecx
lea    0xe8f(%rip),%rdi
lea    0xe96(%rip),%rsi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    112f <test_isxdigit+0xf>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_isxdigit>:
push   %rbp
push   %r15
push   %r14
push   %rbx
push   %rax
mov    $0xffffff81,%ebx
lea    0xecd(%rip),%r14
lea    0xed4(%rip),%r15
nopw   0x0(%rax,%rax,1)
lea    0x1(%rbx),%ebp
mov    %ebx,%edi
call   1040 <isxdigit@plt>
xor    %ecx,%ecx
test   %eax,%eax
setne  %cl
mov    %r14,%rdi
mov    %r15,%rsi
mov    %ebx,%edx
xor    %eax,%eax
call   1030 <printf@plt>
mov    %ebp,%ebx
cmp    $0x100,%ebp
jne    1140 <test_isxdigit+0x20>
add    $0x8,%rsp
pop    %rbx
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@.str = [14 x i8] c"%s: %d -> %d\0A\00"
@__FUNCTION__.test_isxdigit = [14 x i8] c"test_isxdigit\00"
define void @test_isxdigit() {
%1 = alloca i32
%2 = alloca i32
store i32 -127, i32* %1
br label %3
3: ; preds = %6, %0
%4 = load i32, i32* %1
%5 = icmp slt i32 %4, 256
br i1 %5, label %6, label %16
6: ; preds = %3
%7 = load i32, i32* %1
store i32 %7, i32* %2
%8 = load i32, i32* %2
%9 = load i32, i32* %1
%10 = add nsw i32 %9, 1
store i32 %10, i32* %1
%11 = call i32 @isxdigit(i32 %9)
%12 = icmp ne i32 %11, 0
%13 = zext i1 %12 to i64
%14 = select i1 %12, i32 1, i32 0
%15 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([14 x i8], [14 x i8]* @__FUNCTION__.test_isxdigit, i64 0, i64 0), i32 %8, i32 %14)
br label %3
16: ; preds = %3
ret void
}

LLVM IR (-O2):
@.str = [14 x i8] c"%s: %d -> %d\0A\00"
@__FUNCTION__.test_isxdigit = [14 x i8] c"test_isxdigit\00"
define void @test_isxdigit() {
br label %1
1: ; preds = %0, %1
%2 = phi i32 [ -127, %0 ], [ %3, %1 ]
%3 = add nsw i32 %2, 1
%4 = tail call i32 @isxdigit(i32 %2)
%5 = icmp ne i32 %4, 0
%6 = zext i1 %5 to i32
%7 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([14 x i8], [14 x i8]* @__FUNCTION__.test_isxdigit, i64 0, i64 0), i32 %2, i32 %6)
%8 = icmp eq i32 %3, 256
br i1 %8, label %9, label %1
9: ; preds = %1
ret void
}
void pokeb(int segment, int offset, char value) {}


x86 assembly (clang, -O0):
<pokeb>:
push   %rbp
mov    %rsp,%rbp
mov    %dl,%al
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %al,-0x9(%rbp)
pop    %rbp
ret

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

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

LLVM IR (-O2):
define void @pokeb(i32 %0, i32 %1, i8 signext %2) {
ret void
}
void MultiplyRow_16_AVX2() {}


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

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

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

LLVM IR (-O2):
define void @MultiplyRow_16_AVX2() {
ret void
}
/* Type definitions */
struct timespec {
  scalar_t__ tv_sec;
  long tv_nsec;
};

/* Variables and functions */
int ap_utils_timespec_is_set(struct timespec *ts) {
  return (ts->tv_sec > 0 || ts->tv_nsec > 0l);
}


x86 assembly (clang, -O0):
<ap_utils_timespec_is_set>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rcx
mov    $0x1,%al
cmpq   $0x0,(%rcx)
mov    %al,-0x9(%rbp)
jg     112a <ap_utils_timespec_is_set+0x2a>
mov    -0x8(%rbp),%rax
cmpq   $0x0,0x8(%rax)
setg   %al
mov    %al,-0x9(%rbp)
mov    -0x9(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<ap_utils_timespec_is_set>:
mov    $0x1,%eax
cmpq   $0x0,(%rdi)
jle    110c <ap_utils_timespec_is_set+0xc>
ret
xor    %eax,%eax
cmpq   $0x0,0x8(%rdi)
setg   %al
ret

LLVM IR (-O0):
%struct.timespec = type { i64, i64 }
define i32 @ap_utils_timespec_is_set(%struct.timespec* %0) {
%2 = alloca %struct.timespec*
store %struct.timespec* %0, %struct.timespec** %2
%3 = load %struct.timespec*, %struct.timespec** %2
%4 = getelementptr inbounds %struct.timespec, %struct.timespec* %3, i32 0, i32 0
%5 = load i64, i64* %4
%6 = icmp sgt i64 %5, 0
br i1 %6, label %12, label %7
7: ; preds = %1
%8 = load %struct.timespec*, %struct.timespec** %2
%9 = getelementptr inbounds %struct.timespec, %struct.timespec* %8, i32 0, i32 1
%10 = load i64, i64* %9
%11 = icmp sgt i64 %10, 0
br label %12
12: ; preds = %7, %1
%13 = phi i1 [ true, %1 ], [ %11, %7 ]
%14 = zext i1 %13 to i32
ret i32 %14
}

LLVM IR (-O2):
%struct.timespec = type { i64, i64 }
define i32 @ap_utils_timespec_is_set(%struct.timespec* nocapture %0) {
%2 = getelementptr inbounds %struct.timespec, %struct.timespec* %0, i64 0, i32 0
%3 = load i64, i64* %2
%4 = icmp sgt i64 %3, 0
br i1 %4, label %10, label %5
5: ; preds = %1
%6 = getelementptr inbounds %struct.timespec, %struct.timespec* %0, i64 0, i32 1
%7 = load i64, i64* %6
%8 = icmp sgt i64 %7, 0
%9 = zext i1 %8 to i32
br label %10
10: ; preds = %5, %1
%11 = phi i32 [ 1, %1 ], [ %9, %5 ]
ret i32 %11
}
/* Variables and functions */
int EINVAL;
int internal_irq_map(unsigned int hw) { return -EINVAL; }


x86 assembly (clang, -O0):
<internal_irq_map>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
xor    %eax,%eax
mov    0x2ed0(%rip),%rcx
sub    (%rcx),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<internal_irq_map>:
mov    0x2ed9(%rip),%rcx
xor    %eax,%eax
sub    (%rcx),%eax
ret

LLVM IR (-O0):
@EINVAL = global i32 0
define i32 @internal_irq_map(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* @EINVAL
%4 = sub nsw i32 0, %3
ret i32 %4
}

LLVM IR (-O2):
@EINVAL = global i32 0
define i32 @internal_irq_map(i32 %0) {
%2 = load i32, i32* @EINVAL
%3 = sub nsw i32 0, %2
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char *);
int /*<<< orphan*/ stderr;
void usage(char *progname) {
  fprintf(stderr, "Usage: %s MULTICAST_IP PORT INTERFACE_IP MESSAGE_FILE\n",
          progname);
}


x86 assembly (clang, -O0):
<usage>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    0x2ebd(%rip),%rax
mov    (%rax),%edi
mov    -0x8(%rbp),%rdx
lea    0xed0(%rip),%rsi
call   1030 <fprintf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<usage>:
mov    %rdi,%rdx
mov    0x2ec6(%rip),%rax
mov    (%rax),%edi
lea    0xedd(%rip),%rsi
jmp    1030 <fprintf@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [55 x i8] c"Usage: %s MULTICAST_IP PORT INTERFACE_IP MESSAGE_FILE\0A\00"
define void @usage(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i32, i32* @stderr
%4 = load i8*, i8** %2
%5 = call i32 @fprintf(i32 %3, i8* getelementptr inbounds ([55 x i8], [55 x i8]* @.str, i64 0, i64 0), i8* %4)
ret void
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [55 x i8] c"Usage: %s MULTICAST_IP PORT INTERFACE_IP MESSAGE_FILE\0A\00"
define void @usage(i8* %0) {
%2 = load i32, i32* @stderr
%3 = tail call i32 @fprintf(i32 %2, i8* getelementptr inbounds ([55 x i8], [55 x i8]* @.str, i64 0, i64 0), i8* %0)
ret void
}
void RandomFunc(unsigned short input[1], unsigned short output[1]) {
  unsigned short state[1];
  unsigned short local1;
  {
    state[0UL] = (input[0UL] & 914778474UL) << (unsigned short)7;
    local1 = 0UL;
    while (local1 < (unsigned short)0) {
      state[0UL] &= state[local1];
      local1++;
    }
    output[0UL] = state[0UL] ^ 912013688UL;
  }
}


x86 assembly (clang, -O0):
<RandomFunc>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
movzwl (%rax),%eax
and    $0x3686696a,%rax
shl    $0x7,%rax
mov    %ax,-0x12(%rbp)
movw   $0x0,-0x14(%rbp)
movzwl -0x14(%rbp),%eax
cmp    $0x0,%eax
jge    1158 <RandomFunc+0x58>
movzwl -0x14(%rbp),%eax
movzwl -0x12(%rbp,%rax,2),%ecx
movzwl -0x12(%rbp),%eax
and    %ecx,%eax
mov    %ax,-0x12(%rbp)
mov    -0x14(%rbp),%ax
add    $0x1,%ax
mov    %ax,-0x14(%rbp)
jmp    1127 <RandomFunc+0x27>
movzwl -0x12(%rbp),%eax
xor    $0x365c3978,%rax
mov    %ax,%cx
mov    -0x10(%rbp),%rax
mov    %cx,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<RandomFunc>:
movzwl (%rdi),%eax
shl    $0x7,%eax
and    $0xffffb500,%eax
xor    $0x3978,%eax
mov    %ax,(%rsi)
ret

LLVM IR (-O0):
define void @RandomFunc(i16* %0, i16* %1) {
%3 = alloca i16*
%4 = alloca i16*
%5 = alloca [1 x i16]
%6 = alloca i16
store i16* %0, i16** %3
store i16* %1, i16** %4
%7 = load i16*, i16** %3
%8 = getelementptr inbounds i16, i16* %7, i64 0
%9 = load i16, i16* %8
%10 = zext i16 %9 to i64
%11 = and i64 %10, 914778474
%12 = shl i64 %11, 7
%13 = trunc i64 %12 to i16
%14 = getelementptr inbounds [1 x i16], [1 x i16]* %5, i64 0, i64 0
store i16 %13, i16* %14
store i16 0, i16* %6
br label %15
15: ; preds = %19, %2
%16 = load i16, i16* %6
%17 = zext i16 %16 to i32
%18 = icmp slt i32 %17, 0
br i1 %18, label %19, label %32
19: ; preds = %15
%20 = load i16, i16* %6
%21 = zext i16 %20 to i64
%22 = getelementptr inbounds [1 x i16], [1 x i16]* %5, i64 0, i64 %21
%23 = load i16, i16* %22
%24 = zext i16 %23 to i32
%25 = getelementptr inbounds [1 x i16], [1 x i16]* %5, i64 0, i64 0
%26 = load i16, i16* %25
%27 = zext i16 %26 to i32
%28 = and i32 %27, %24
%29 = trunc i32 %28 to i16
store i16 %29, i16* %25
%30 = load i16, i16* %6
%31 = add i16 %30, 1
store i16 %31, i16* %6
br label %15
32: ; preds = %15
%33 = getelementptr inbounds [1 x i16], [1 x i16]* %5, i64 0, i64 0
%34 = load i16, i16* %33
%35 = zext i16 %34 to i64
%36 = xor i64 %35, 912013688
%37 = trunc i64 %36 to i16
%38 = load i16*, i16** %4
%39 = getelementptr inbounds i16, i16* %38, i64 0
store i16 %37, i16* %39
ret void
}

LLVM IR (-O2):
define void @RandomFunc(i16* nocapture %0, i16* nocapture writeonly %1) {
%3 = load i16, i16* %0
%4 = shl i16 %3, 7
%5 = and i16 %4, -19200
%6 = xor i16 %5, 14712
store i16 %6, i16* %1
ret void
}
/* Variables and functions */
int /*<<< orphan*/ DrawTextlnXY126(char const *, long, long, unsigned long,
                                   unsigned long);
void drawtextlnxy(const char *s, long x, long y, unsigned long cfg,
                  unsigned long cbg) {
  DrawTextlnXY126(s, x, y, cfg, cbg);
}


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

x86 assembly (clang, -O2):
<drawtextlnxy>:
jmp    1030 <DrawTextlnXY126@plt>

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

LLVM IR (-O2):
define void @drawtextlnxy(i8* %0, i64 %1, i64 %2, i64 %3, i64 %4) {
%6 = tail call i32 @DrawTextlnXY126(i8* %0, i64 %1, i64 %2, i64 %3, i64 %4)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ ADC_(int /*<<< orphan*/);
int /*<<< orphan*/ c64_memImm();
void ADC_imm(void) {
  c64_memImm();
  ADC_(0);
}


x86 assembly (clang, -O0):
<ADC_imm>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1030 <c64_memImm@plt>
xor    %edi,%edi
call   1040 <ADC_@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<ADC_imm>:
push   %rax
xor    %eax,%eax
call   1030 <c64_memImm@plt>
xor    %edi,%edi
pop    %rax
jmp    1040 <ADC_@plt>

LLVM IR (-O0):
define void @ADC_imm() {
%1 = call i32 (...) @c64_memImm()
%2 = call i32 @ADC_(i32 0)
ret void
}

LLVM IR (-O2):
define void @ADC_imm() {
%1 = tail call i32 (...) @c64_memImm()
%2 = tail call i32 @ADC_(i32 0)
ret void
}
int fun1399() { return 1399; }


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

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

LLVM IR (-O0):
define i32 @fun1399() {
ret i32 1399
}

LLVM IR (-O2):
define i32 @fun1399() {
ret i32 1399
}
/* Variables and functions */
int /*<<< orphan*/ U_WMRNOTIMPLEMENTED_swap(char *, int);
void U_WMRC6_swap(char *record, int torev) {
  U_WMRNOTIMPLEMENTED_swap(record, torev);
}


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

x86 assembly (clang, -O2):
<U_WMRC6_swap>:
jmp    1030 <U_WMRNOTIMPLEMENTED_swap@plt>

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

LLVM IR (-O2):
define void @U_WMRC6_swap(i8* %0, i32 %1) {
%3 = tail call i32 @U_WMRNOTIMPLEMENTED_swap(i8* %0, i32 %1)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ pthread_rwlock_t;

/* Variables and functions */
int /*<<< orphan*/ pthread_rwlock_unlock(int /*<<< orphan*/ *);
void __attribute__((__unused__))
_hash_pthread_rwlock_unlock_hnode_hh(void *m,
                                     void *_HU_d __attribute__((__unused__))) {
  pthread_rwlock_t *rwlck = (pthread_rwlock_t *)m;
  pthread_rwlock_unlock(rwlck);
}


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

x86 assembly (clang, -O2):
<_hash_pthread_rwlock_unlock_hnode_hh>:
jmp    1030 <pthread_rwlock_unlock@plt>

LLVM IR (-O0):
define void @_hash_pthread_rwlock_unlock_hnode_hh(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
%5 = alloca i32*
store i8* %0, i8** %3
store i8* %1, i8** %4
%6 = load i8*, i8** %3
%7 = bitcast i8* %6 to i32*
store i32* %7, i32** %5
%8 = load i32*, i32** %5
%9 = call i32 @pthread_rwlock_unlock(i32* %8)
ret void
}

LLVM IR (-O2):
define void @_hash_pthread_rwlock_unlock_hnode_hh(i8* %0, i8* nocapture readnone %1) {
%3 = bitcast i8* %0 to i32*
%4 = tail call i32 @pthread_rwlock_unlock(i32* %3)
ret void
}
__attribute__((always_)) int eal_is_big_endian(void) {
  unsigned short ed = 0x0100;
  return (char)ed;
}


x86 assembly (clang, -O0):
<eal_is_big_endian>:
push   %rbp
mov    %rsp,%rbp
movw   $0x100,-0x2(%rbp)
mov    -0x2(%rbp),%ax
movsbl %al,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @eal_is_big_endian() {
%1 = alloca i16
store i16 256, i16* %1
%2 = load i16, i16* %1
%3 = trunc i16 %2 to i8
%4 = sext i8 %3 to i32
ret i32 %4
}

LLVM IR (-O2):
define i32 @eal_is_big_endian() {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ output_decimal(int);
void output_number(int num) { output_decimal(num); }


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

x86 assembly (clang, -O2):
<output_number>:
jmp    1030 <output_decimal@plt>

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

LLVM IR (-O2):
define void @output_number(i32 %0) {
%2 = tail call i32 @output_decimal(i32 %0)
ret void
}
/* Variables and functions */
int rand();
int isGoal(int skill) {
  int probability = 50 * skill / 10;
  int random = rand() % (100 - 1 + 1) + 1;
  return (random <= probability);
}


x86 assembly (clang, -O0):
<isGoal>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
imul   $0x32,-0x4(%rbp),%eax
mov    $0xa,%ecx
cltd
idiv   %ecx
mov    %eax,-0x8(%rbp)
mov    $0x0,%al
call   1030 <rand@plt>
mov    $0x64,%ecx
cltd
idiv   %ecx
add    $0x1,%edx
mov    %edx,-0xc(%rbp)
mov    -0xc(%rbp),%eax
cmp    -0x8(%rbp),%eax
setle  %al
and    $0x1,%al
movzbl %al,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<isGoal>:
push   %rbx
lea    (%rdi,%rdi,4),%ebx
xor    %eax,%eax
call   1030 <rand@plt>
movslq %eax,%rcx
imul   $0x51eb851f,%rcx,%rax
mov    %rax,%rdx
shr    $0x3f,%rdx
sar    $0x25,%rax
add    %edx,%eax
imul   $0x64,%eax,%eax
sub    %eax,%ecx
xor    %eax,%eax
cmp    %ebx,%ecx
setl   %al
pop    %rbx
ret

LLVM IR (-O0):
define i32 @isGoal(i32 %0) {
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %2
%5 = load i32, i32* %2
%6 = mul nsw i32 50, %5
%7 = sdiv i32 %6, 10
store i32 %7, i32* %3
%8 = call i32 (...) @rand()
%9 = srem i32 %8, 100
%10 = add nsw i32 %9, 1
store i32 %10, i32* %4
%11 = load i32, i32* %4
%12 = load i32, i32* %3
%13 = icmp sle i32 %11, %12
%14 = zext i1 %13 to i32
ret i32 %14
}

LLVM IR (-O2):
define i32 @isGoal(i32 %0) {
%2 = mul nsw i32 %0, 5
%3 = tail call i32 (...) @rand()
%4 = srem i32 %3, 100
%5 = icmp slt i32 %4, %2
%6 = zext i1 %5 to i32
ret i32 %6
}
/* Type definitions */
struct timeval {
  int dummy;
};
typedef int /*<<< orphan*/ fd_set;

/* Variables and functions */
int select(int, int /*<<< orphan*/ *, int /*<<< orphan*/ *,
           int /*<<< orphan*/ *, struct timeval *);
__attribute__((__weak__, __always___)) int
softboundmpx_select(int nfds, fd_set *readfds, fd_set *writefds,
                    fd_set *exceptfds, struct timeval *timeout) {
  return select(nfds, readfds, writefds, exceptfds, timeout);
}


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

x86 assembly (clang, -O2):
<softboundmpx_select>:
jmp    1030 <select@plt>

LLVM IR (-O0):
%struct.timeval = type { i32 }
define weak i32 @softboundmpx_select(i32 %0, i32* %1, i32* %2, i32* %3, %struct.timeval* %4) {
%6 = alloca i32
%7 = alloca i32*
%8 = alloca i32*
%9 = alloca i32*
%10 = alloca %struct.timeval*
store i32 %0, i32* %6
store i32* %1, i32** %7
store i32* %2, i32** %8
store i32* %3, i32** %9
store %struct.timeval* %4, %struct.timeval** %10
%11 = load i32, i32* %6
%12 = load i32*, i32** %7
%13 = load i32*, i32** %8
%14 = load i32*, i32** %9
%15 = load %struct.timeval*, %struct.timeval** %10
%16 = call i32 @select(i32 %11, i32* %12, i32* %13, i32* %14, %struct.timeval* %15)
ret i32 %16
}

LLVM IR (-O2):
%struct.timeval = type { i32 }
define weak i32 @softboundmpx_select(i32 %0, i32* %1, i32* %2, i32* %3, %struct.timeval* %4) {
%6 = tail call i32 @select(i32 %0, i32* %1, i32* %2, i32* %3, %struct.timeval* %4)
ret i32 %6
}
int is_token(char ch) {
  if (ch == 0x1F || ch == 0x20 || ch == 0x22 || ch == 0x29)
    return 0;
  return 0x0A <= ch && ch <= 0x2D;
}


x86 assembly (clang, -O0):
<is_token>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x5(%rbp)
movsbl -0x5(%rbp),%eax
cmp    $0x1f,%eax
je     113e <is_token+0x3e>
movsbl -0x5(%rbp),%eax
cmp    $0x20,%eax
je     113e <is_token+0x3e>
movsbl -0x5(%rbp),%eax
cmp    $0x22,%eax
je     113e <is_token+0x3e>
movsbl -0x5(%rbp),%eax
cmp    $0x29,%eax
jne    114a <is_token+0x4a>
movl   $0x0,-0x4(%rbp)
jmp    1178 <is_token+0x78>
movsbl -0x5(%rbp),%edx
xor    %eax,%eax
mov    $0xa,%ecx
cmp    %edx,%ecx
mov    %al,-0x6(%rbp)
jg     116d <is_token+0x6d>
movsbl -0x5(%rbp),%eax
cmp    $0x2d,%eax
setle  %al
mov    %al,-0x6(%rbp)
mov    -0x6(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<is_token>:
cmp    $0x29,%dil
ja     111d <is_token+0x1d>
xor    %eax,%eax
movzbl %dil,%ecx
movabs $0x20580000000,%rdx
bt     %rcx,%rdx
jae    111d <is_token+0x1d>
ret
lea    -0xa(%rdi),%ecx
xor    %eax,%eax
cmp    $0x24,%cl
setb   %al
ret

LLVM IR (-O0):
define i32 @is_token(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 eq i32 %5, 31
br i1 %6, label %19, label %7
7: ; preds = %1
%8 = load i8, i8* %3
%9 = sext i8 %8 to i32
%10 = icmp eq i32 %9, 32
br i1 %10, label %19, label %11
11: ; preds = %7
%12 = load i8, i8* %3
%13 = sext i8 %12 to i32
%14 = icmp eq i32 %13, 34
br i1 %14, label %19, label %15
15: ; preds = %11
%16 = load i8, i8* %3
%17 = sext i8 %16 to i32
%18 = icmp eq i32 %17, 41
br i1 %18, label %19, label %20
19: ; preds = %15, %11, %7, %1
store i32 0, i32* %2
br label %31
20: ; preds = %15
%21 = load i8, i8* %3
%22 = sext i8 %21 to i32
%23 = icmp sle i32 10, %22
br i1 %23, label %24, label %28
24: ; preds = %20
%25 = load i8, i8* %3
%26 = sext i8 %25 to i32
%27 = icmp sle i32 %26, 45
br label %28
28: ; preds = %24, %20
%29 = phi i1 [ false, %20 ], [ %27, %24 ]
%30 = zext i1 %29 to i32
store i32 %30, i32* %2
br label %31
31: ; preds = %28, %19
%32 = load i32, i32* %2
ret i32 %32
}

LLVM IR (-O2):
define i32 @is_token(i8 signext %0) {
switch i8 %0, label %2 [
i8 41, label %6
i8 34, label %6
i8 32, label %6
i8 31, label %6
]
2: ; preds = %1
%3 = add i8 %0, -10
%4 = icmp ult i8 %3, 36
%5 = zext i1 %4 to i32
br label %6
6: ; preds = %1, %1, %1, %1, %2
%7 = phi i32 [ %5, %2 ], [ 0, %1 ], [ 0, %1 ], [ 0, %1 ], [ 0, %1 ]
ret i32 %7
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char *);
int /*<<< orphan*/ strlen(char *);
int /*<<< orphan*/ write(int, char *, int /*<<< orphan*/);
int /*<<< orphan*/ writeLen(int, int /*<<< orphan*/);
void writeWord(int fdSock, char *szWord) {
  0 ? printf("Word to write is %s\n", szWord) : 0;
  writeLen(fdSock, strlen(szWord));
  write(fdSock, szWord, strlen(szWord));
}


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

x86 assembly (clang, -O2):
<writeWord>:
push   %rbp
push   %rbx
push   %rax
mov    %rsi,%rbx
mov    %edi,%ebp
mov    %rsi,%rdi
call   1050 <strlen@plt>
mov    %ebp,%edi
mov    %eax,%esi
call   1030 <writeLen@plt>
mov    %rbx,%rdi
call   1050 <strlen@plt>
mov    %ebp,%edi
mov    %rbx,%rsi
mov    %eax,%edx
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    1040 <write@plt>

LLVM IR (-O0):
define void @writeWord(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 @strlen(i8* %6)
%8 = call i32 @writeLen(i32 %5, i32 %7)
%9 = load i32, i32* %3
%10 = load i8*, i8** %4
%11 = load i8*, i8** %4
%12 = call i32 @strlen(i8* %11)
%13 = call i32 @write(i32 %9, i8* %10, i32 %12)
ret void
}

LLVM IR (-O2):
define void @writeWord(i32 %0, i8* %1) {
%3 = tail call i32 @strlen(i8* %1)
%4 = tail call i32 @writeLen(i32 %0, i32 %3)
%5 = tail call i32 @strlen(i8* %1)
%6 = tail call i32 @write(i32 %0, i8* %1, i32 %5)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ strncpy(char *, char *, int);
char *pdu_get_smsc_number(char *body, int smsc_len, char *smsc_number_dso) {
  char *pBegin, *pEnd;
  int smsc_number_len = (smsc_len - 1) * 2;
  pBegin = body;
  pEnd = pBegin + smsc_number_len;
  strncpy(smsc_number_dso, pBegin, smsc_number_len);
  smsc_number_dso[smsc_number_len] = '\0';
  return pEnd;
}


x86 assembly (clang, -O0):
<pdu_get_smsc_number>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0xc(%rbp),%eax
sub    $0x1,%eax
shl    $0x1,%eax
mov    %eax,-0x2c(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x20(%rbp)
mov    -0x20(%rbp),%rax
movslq -0x2c(%rbp),%rcx
add    %rcx,%rax
mov    %rax,-0x28(%rbp)
mov    -0x18(%rbp),%rdi
mov    -0x20(%rbp),%rsi
mov    -0x2c(%rbp),%edx
call   1030 <strncpy@plt>
mov    -0x18(%rbp),%rax
movslq -0x2c(%rbp),%rcx
movb   $0x0,(%rax,%rcx,1)
mov    -0x28(%rbp),%rax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<pdu_get_smsc_number>:
push   %r15
push   %r14
push   %rbx
mov    %rdx,%r14
mov    %rdi,%rax
lea    -0x2(%rsi,%rsi,1),%ecx
movslq %ecx,%rbx
lea    (%rdi,%rbx,1),%r15
mov    %rdx,%rdi
mov    %rax,%rsi
mov    %ebx,%edx
call   1030 <strncpy@plt>
movb   $0x0,(%r14,%rbx,1)
mov    %r15,%rax
pop    %rbx
pop    %r14
pop    %r15
ret

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

LLVM IR (-O2):
define i8* @pdu_get_smsc_number(i8* %0, i32 %1, i8* %2) {
%4 = shl i32 %1, 1
%5 = add i32 %4, -2
%6 = sext i32 %5 to i64
%7 = getelementptr inbounds i8, i8* %0, i64 %6
%8 = tail call i32 @strncpy(i8* %2, i8* %0, i32 %5)
%9 = getelementptr inbounds i8, i8* %2, i64 %6
store i8 0, i8* %9
ret i8* %7
}
/* Variables and functions */
int _ada_use_c2phc4c(int, int *, int *, double *, int /*<<< orphan*/);
int copy_quaddobl_Laurent_start_system_to_container(void) {
  int *a, *b, fail;
  double *c;
  fail = _ada_use_c2phc4c(785, a, b, c, 0);
  return fail;
}


x86 assembly (clang, -O0):
<copy_quaddobl_Laurent_start_system_to_container>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    -0x8(%rbp),%rsi
mov    -0x10(%rbp),%rdx
mov    -0x20(%rbp),%rcx
mov    $0x311,%edi
xor    %r8d,%r8d
call   1030 <_ada_use_c2phc4c@plt>
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<copy_quaddobl_Laurent_start_system_to_container>:
mov    $0x311,%edi
xor    %r8d,%r8d
jmp    1030 <_ada_use_c2phc4c@plt>

LLVM IR (-O0):
define i32 @copy_quaddobl_Laurent_start_system_to_container() {
%1 = alloca i32*
%2 = alloca i32*
%3 = alloca i32
%4 = alloca double*
%5 = load i32*, i32** %1
%6 = load i32*, i32** %2
%7 = load double*, double** %4
%8 = call i32 @_ada_use_c2phc4c(i32 785, i32* %5, i32* %6, double* %7, i32 0)
store i32 %8, i32* %3
%9 = load i32, i32* %3
ret i32 %9
}

LLVM IR (-O2):
define i32 @copy_quaddobl_Laurent_start_system_to_container() {
%1 = tail call i32 @_ada_use_c2phc4c(i32 785, i32* undef, i32* undef, double* undef, i32 0)
ret i32 %1
}
/* Type definitions */
struct ofpbuf {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ memset(void *, int /*<<< orphan*/, size_t);
void *ofpbuf_push_uninit(struct ofpbuf *, size_t);
void *ofpbuf_push_zeros(struct ofpbuf *b, size_t size) {
  void *dst = ofpbuf_push_uninit(b, size);
  memset(dst, 0, size);
  return dst;
}


x86 assembly (clang, -O0):
<ofpbuf_push_zeros>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1030 <ofpbuf_push_uninit@plt>
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rdi
mov    -0x10(%rbp),%rdx
xor    %esi,%esi
call   1040 <memset@plt>
mov    -0x18(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ofpbuf_push_zeros>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%r14
call   1030 <ofpbuf_push_uninit@plt>
mov    %rax,%rbx
mov    %rax,%rdi
xor    %esi,%esi
mov    %r14,%rdx
call   1040 <memset@plt>
mov    %rbx,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
%struct.ofpbuf = type { i32 }
define i8* @ofpbuf_push_zeros(%struct.ofpbuf* %0, i64 %1) {
%3 = alloca %struct.ofpbuf*
%4 = alloca i64
%5 = alloca i8*
store %struct.ofpbuf* %0, %struct.ofpbuf** %3
store i64 %1, i64* %4
%6 = load %struct.ofpbuf*, %struct.ofpbuf** %3
%7 = load i64, i64* %4
%8 = call i8* @ofpbuf_push_uninit(%struct.ofpbuf* %6, i64 %7)
store i8* %8, i8** %5
%9 = load i8*, i8** %5
%10 = load i64, i64* %4
%11 = call i32 @memset(i8* %9, i32 0, i64 %10)
%12 = load i8*, i8** %5
ret i8* %12
}

LLVM IR (-O2):
%struct.ofpbuf = type { i32 }
define i8* @ofpbuf_push_zeros(%struct.ofpbuf* %0, i64 %1) {
%3 = tail call i8* @ofpbuf_push_uninit(%struct.ofpbuf* %0, i64 %1)
%4 = tail call i32 @memset(i8* %3, i32 0, i64 %1)
ret i8* %3
}
int encode_allow(char *hdrstart, int hdrlen, unsigned int *bodi, char *where) {
  unsigned int i;
  memcpy(&i, bodi, 4);
  i = htonl(i);
  memcpy(where, &i, 4);
  return 4;
}


x86 assembly (clang, -O0):
<encode_allow>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    -0x18(%rbp),%rax
mov    (%rax),%eax
mov    %eax,-0x24(%rbp)
mov    -0x24(%rbp),%edi
mov    $0x0,%al
call   1030 <htonl@plt>
mov    %eax,-0x24(%rbp)
mov    -0x20(%rbp),%rax
mov    -0x24(%rbp),%ecx
mov    %ecx,(%rax)
mov    $0x4,%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<encode_allow>:
push   %rbx
mov    %rcx,%rbx
mov    (%rdx),%edi
xor    %eax,%eax
call   1030 <htonl@plt>
mov    %eax,(%rbx)
mov    $0x4,%eax
pop    %rbx
ret

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

LLVM IR (-O2):
define i32 @encode_allow(i8* nocapture readnone %0, i32 %1, i32* nocapture %2, i8* nocapture writeonly %3) {
%5 = load i32, i32* %2
%6 = tail call i32 (i32, ...) bitcast (i32 (...)* @htonl to i32 (i32, ...)*)(i32 %5)
%7 = bitcast i8* %3 to i32*
store i32 %6, i32* %7
ret i32 4
}
char *getenv(name) const char *name;
{ return "42"; }


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

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

LLVM IR (-O0):
@.str = [3 x i8] c"42\00"
define i8* @getenv(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
ret i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0)
}

LLVM IR (-O2):
@.str = [3 x i8] c"42\00"
define i8* @getenv(i8* nocapture readnone %0) {
ret i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0)
}
int f_recursive(int n) {
  int u1, u2, f;
  if (n < 2)
    f = n + 1;
  else {
    u1 = f_recursive((int)(n / 2));
    u2 = f_recursive((int)(n / 4));
    f = u1 * u2;
  }
  return f;
}


x86 assembly (clang, -O0):
<f_recursive>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
cmpl   $0x2,-0x4(%rbp)
jge    1133 <f_recursive+0x23>
mov    -0x4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    1167 <f_recursive+0x57>
mov    -0x4(%rbp),%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
mov    %eax,%edi
call   1030 <f_recursive@plt>
mov    %eax,-0x8(%rbp)
mov    -0x4(%rbp),%eax
mov    $0x4,%ecx
cltd
idiv   %ecx
mov    %eax,%edi
call   1030 <f_recursive@plt>
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%eax
imul   -0xc(%rbp),%eax
mov    %eax,-0x10(%rbp)
mov    -0x10(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<f_recursive>:
push   %rbp
push   %r14
push   %rbx
mov    %edi,%r14d
mov    $0x1,%ebp
cmp    $0x2,%edi
jge    1126 <f_recursive+0x16>
mov    %r14d,%ebx
jmp    1149 <f_recursive+0x39>
mov    $0x1,%ebp
mov    %r14d,%ebx
xchg   %ax,%ax
mov    %r14d,%edi
shr    %edi
call   1030 <f_recursive@plt>
shr    $0x2,%ebx
imul   %eax,%ebp
cmp    $0x8,%r14d
mov    %ebx,%r14d
jae    1130 <f_recursive+0x20>
add    $0x1,%ebx
imul   %ebp,%ebx
mov    %ebx,%eax
pop    %rbx
pop    %r14
pop    %rbp
ret

LLVM IR (-O0):
define i32 @f_recursive(i32 %0) {
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
store i32 %0, i32* %2
%6 = load i32, i32* %2
%7 = icmp slt i32 %6, 2
br i1 %7, label %8, label %11
8: ; preds = %1
%9 = load i32, i32* %2
%10 = add nsw i32 %9, 1
store i32 %10, i32* %5
br label %21
11: ; preds = %1
%12 = load i32, i32* %2
%13 = sdiv i32 %12, 2
%14 = call i32 @f_recursive(i32 %13)
store i32 %14, i32* %3
%15 = load i32, i32* %2
%16 = sdiv i32 %15, 4
%17 = call i32 @f_recursive(i32 %16)
store i32 %17, i32* %4
%18 = load i32, i32* %3
%19 = load i32, i32* %4
%20 = mul nsw i32 %18, %19
store i32 %20, i32* %5
br label %21
21: ; preds = %11, %8
%22 = load i32, i32* %5
ret i32 %22
}

LLVM IR (-O2):
define i32 @f_recursive(i32 %0) {
%2 = icmp slt i32 %0, 2
br i1 %2, label %3, label %8
3: ; preds = %8, %1
%4 = phi i32 [ 1, %1 ], [ %14, %8 ]
%5 = phi i32 [ %0, %1 ], [ %13, %8 ]
%6 = add nsw i32 %5, 1
%7 = mul nsw i32 %6, %4
ret i32 %7
8: ; preds = %1, %8
%9 = phi i32 [ %13, %8 ], [ %0, %1 ]
%10 = phi i32 [ %14, %8 ], [ 1, %1 ]
%11 = lshr i32 %9, 1
%12 = tail call i32 @f_recursive(i32 %11)
%13 = lshr i32 %9, 2
%14 = mul nsw i32 %12, %10
%15 = icmp ult i32 %9, 8
br i1 %15, label %3, label %8
}
__attribute__((no)) int int_(float f) {
  int c = f;
  if (c) {
    return c;
  }
  return 23;
}


x86 assembly (clang, -O0):
<int_>:
push   %rbp
mov    %rsp,%rbp
movss  %xmm0,-0x8(%rbp)
cvttss2si -0x8(%rbp),%eax
mov    %eax,-0xc(%rbp)
cmpl   $0x0,-0xc(%rbp)
je     1126 <int_+0x26>
mov    -0xc(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    112d <int_+0x2d>
movl   $0x17,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<int_>:
cvttss2si %xmm0,%ecx
test   %ecx,%ecx
mov    $0x17,%eax
cmovne %ecx,%eax
ret

LLVM IR (-O0):
define i32 @int_(float %0) {
%2 = alloca i32
%3 = alloca float
%4 = alloca i32
store float %0, float* %3
%5 = load float, float* %3
%6 = fptosi float %5 to i32
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 %12
11: ; preds = %1
store i32 23, i32* %2
br label %12
12: ; preds = %11, %9
%13 = load i32, i32* %2
ret i32 %13
}

LLVM IR (-O2):
define i32 @int_(float %0) {
%2 = fptosi float %0 to i32
%3 = icmp eq i32 %2, 0
%4 = select i1 %3, i32 23, i32 %2
ret i32 %4
}
/* Type definitions */
struct TreeNode {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ helper(struct TreeNode *, int *);
struct TreeNode *convertBST(struct TreeNode *root) {
  int sum = 0;
  helper(root, &sum);
  return root;
}


x86 assembly (clang, -O0):
<convertBST>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
mov    -0x8(%rbp),%rdi
lea    -0xc(%rbp),%rsi
call   1030 <helper@plt>
mov    -0x8(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<convertBST>:
push   %rbx
sub    $0x10,%rsp
mov    %rdi,%rbx
movl   $0x0,0xc(%rsp)
lea    0xc(%rsp),%rsi
call   1030 <helper@plt>
mov    %rbx,%rax
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
%struct.TreeNode = type { i32 }
define %struct.TreeNode* @convertBST(%struct.TreeNode* %0) {
%2 = alloca %struct.TreeNode*
%3 = alloca i32
store %struct.TreeNode* %0, %struct.TreeNode** %2
store i32 0, i32* %3
%4 = load %struct.TreeNode*, %struct.TreeNode** %2
%5 = call i32 @helper(%struct.TreeNode* %4, i32* %3)
%6 = load %struct.TreeNode*, %struct.TreeNode** %2
ret %struct.TreeNode* %6
}

LLVM IR (-O2):
%struct.TreeNode = type { i32 }
define %struct.TreeNode* @convertBST(%struct.TreeNode* returned %0) {
%2 = alloca i32
%3 = bitcast i32* %2 to i8*
store i32 0, i32* %2
%4 = call i32 @helper(%struct.TreeNode* %0, i32* %2)
ret %struct.TreeNode* %0
}
/* Variables and functions */
int /*<<< orphan*/ bar();
int /*<<< orphan*/ external_symbol();
void foo(void) {
  external_symbol();
  bar();
}


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

x86 assembly (clang, -O2):
<foo>:
push   %rax
xor    %eax,%eax
call   1040 <external_symbol@plt>
xor    %eax,%eax
pop    %rcx
jmp    1030 <bar@plt>

LLVM IR (-O0):
define void @foo() {
%1 = call i32 (...) @external_symbol()
%2 = call i32 (...) @bar()
ret void
}

LLVM IR (-O2):
define void @foo() {
%1 = tail call i32 (...) @external_symbol()
%2 = tail call i32 (...) @bar()
ret void
}
void child(i) int i;
{
  int n;
  n = getpid();
  exit(100 + i);
}


x86 assembly (clang, -O0):
<child>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    $0x0,%al
call   1030 <getpid@plt>
mov    %eax,-0x8(%rbp)
mov    -0x4(%rbp),%edi
add    $0x64,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<child>:
push   %rbx
mov    %edi,%ebx
xor    %eax,%eax
call   1030 <getpid@plt>
add    $0x64,%ebx
mov    %ebx,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
define void @child(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %2
%4 = call i32 (...) @getpid()
store i32 %4, i32* %3
%5 = load i32, i32* %2
%6 = add nsw i32 100, %5
unreachable
}

LLVM IR (-O2):
define void @child(i32 %0) {
%2 = tail call i32 (...) @getpid()
%3 = add nsw i32 %0, 100
tail call void @exit(i32 %3)
unreachable
}
const char *ffm_getversionstring(void) {
  return "(use ffm_getversionstring() function)";
}


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

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

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

LLVM IR (-O2):
@.str = [38 x i8] c"(use ffm_getversionstring() function)\00"
define i8* @ffm_getversionstring() {
ret i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str, i64 0, i64 0)
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void so_init2() {
  printf("so_init2"
         "\n");
}


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

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

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

LLVM IR (-O2):
@str = [9 x i8] c"so_init2\00"
define void @so_init2() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([9 x i8], [9 x i8]* @str, i64 0, i64 0))
ret void
}