xunge/DecIR huggingface dataset:
int hash(char lastname[]) {
  int number = 0;
  while (*lastname)
    number += *lastname++;
  return number % 100;
}


x86 assembly (clang, -O0):
<hash>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
mov    -0x8(%rbp),%rax
cmpb   $0x0,(%rax)
je     1139 <hash+0x39>
mov    -0x8(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x8(%rbp)
movsbl (%rax),%eax
add    -0xc(%rbp),%eax
mov    %eax,-0xc(%rbp)
jmp    110f <hash+0xf>
mov    -0xc(%rbp),%eax
mov    $0x64,%ecx
cltd
idiv   %ecx
mov    %edx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<hash>:
mov    (%rdi),%al
test   %al,%al
je     113d <hash+0x3d>
add    $0x1,%rdi
xor    %ecx,%ecx
nopl   0x0(%rax)
movsbl %al,%eax
add    %eax,%ecx
movzbl (%rdi),%eax
add    $0x1,%rdi
test   %al,%al
jne    1110 <hash+0x10>
movslq %ecx,%rax
imul   $0x51eb851f,%rax,%rcx
mov    %rcx,%rdx
shr    $0x3f,%rdx
sar    $0x25,%rcx
add    %edx,%ecx
imul   $0x64,%ecx,%ecx
sub    %ecx,%eax
ret
xor    %eax,%eax
ret

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

LLVM IR (-O2):
define i32 @hash(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = icmp eq i8 %2, 0
br i1 %3, label %15, label %4
4: ; preds = %1, %4
%5 = phi i8 [ %11, %4 ], [ %2, %1 ]
%6 = phi i32 [ %10, %4 ], [ 0, %1 ]
%7 = phi i8* [ %8, %4 ], [ %0, %1 ]
%8 = getelementptr inbounds i8, i8* %7, i64 1
%9 = sext i8 %5 to i32
%10 = add nsw i32 %6, %9
%11 = load i8, i8* %8
%12 = icmp eq i8 %11, 0
br i1 %12, label %13, label %4
13: ; preds = %4
%14 = srem i32 %10, 100
br label %15
15: ; preds = %13, %1
%16 = phi i32 [ 0, %1 ], [ %14, %13 ]
ret i32 %16
}
/* Variables and functions */
int /*<<< orphan*/ _Error(long, char *);
void Error_RSyntaxMethodArgumentsDontConform(long p_position) {
  _Error(p_position, "Evaluate syntax method arguments must match order of "
                     "syntax rule then end with 'output'");
}


x86 assembly (clang, -O0):
<Error_RSyntaxMethodArgumentsDontConform>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
lea    0xed9(%rip),%rsi
call   1030 <_Error@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Error_RSyntaxMethodArgumentsDontConform>:
lea    0xee9(%rip),%rsi
jmp    1030 <_Error@plt>

LLVM IR (-O0):
@.str = [88 x i8] c"Evaluate syntax method arguments must match order of syntax rule then end with 'output'\00"
define void @Error_RSyntaxMethodArgumentsDontConform(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = load i64, i64* %2
%4 = call i32 @_Error(i64 %3, i8* getelementptr inbounds ([88 x i8], [88 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [88 x i8] c"Evaluate syntax method arguments must match order of syntax rule then end with 'output'\00"
define void @Error_RSyntaxMethodArgumentsDontConform(i64 %0) {
%2 = tail call i32 @_Error(i64 %0, i8* getelementptr inbounds ([88 x i8], [88 x i8]* @.str, i64 0, i64 0))
ret void
}
/* Variables and functions */
int log_file_set(char const *, int /*<<< orphan*/ *);
int /*<<< orphan*/ log_params_set(int, int, int);
int logfile(const char *file, int log_level_in, int log_roll_number_in) {
  log_params_set(log_level_in, log_roll_number_in, 104857600);
  return log_file_set(file, NULL);
}


x86 assembly (clang, -O0):
<logfile>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    -0xc(%rbp),%edi
mov    -0x10(%rbp),%esi
mov    $0x6400000,%edx
call   1030 <log_params_set@plt>
mov    -0x8(%rbp),%rdi
xor    %eax,%eax
mov    %eax,%esi
call   1040 <log_file_set@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<logfile>:
push   %rbx
mov    %rdi,%rbx
mov    %esi,%edi
mov    %edx,%esi
mov    $0x6400000,%edx
call   1030 <log_params_set@plt>
mov    %rbx,%rdi
xor    %esi,%esi
pop    %rbx
jmp    1040 <log_file_set@plt>

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

LLVM IR (-O2):
define i32 @logfile(i8* %0, i32 %1, i32 %2) {
%4 = tail call i32 @log_params_set(i32 %1, i32 %2, i32 104857600)
%5 = tail call i32 @log_file_set(i8* %0, i32* null)
ret i32 %5
}
/* Type definitions */
typedef int /*<<< orphan*/ WINDOW;

/* Variables and functions */
int /*<<< orphan*/ wprintw(int /*<<< orphan*/ *, char *, char, char *);
void checkbox(WINDOW *win, char *label, int *value) {
  wprintw(win,
          "    "
          "[%c] %s",
          *value ? 'x' : ' ', label);
}


x86 assembly (clang, -O0):
<checkbox>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x18(%rbp),%rax
mov    (%rax),%edx
mov    $0x20,%eax
mov    $0x78,%ecx
cmp    $0x0,%edx
cmovne %ecx,%eax
mov    -0x10(%rbp),%rcx
lea    0xeb7(%rip),%rsi
movsbl %al,%edx
call   1030 <wprintw@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<checkbox>:
mov    %rsi,%rcx
cmpl   $0x0,(%rdx)
mov    $0x20,%eax
mov    $0x78,%edx
cmove  %eax,%edx
lea    0xed6(%rip),%rsi
jmp    1030 <wprintw@plt>

LLVM IR (-O0):
@.str = [12 x i8] c" [%c] %s\00"
define void @checkbox(i32* %0, i8* %1, i32* %2) {
%4 = alloca i32*
%5 = alloca i8*
%6 = alloca i32*
store i32* %0, i32** %4
store i8* %1, i8** %5
store i32* %2, i32** %6
%7 = load i32*, i32** %4
%8 = load i32*, i32** %6
%9 = load i32, i32* %8
%10 = icmp ne i32 %9, 0
%11 = zext i1 %10 to i64
%12 = select i1 %10, i32 120, i32 32
%13 = trunc i32 %12 to i8
%14 = load i8*, i8** %5
%15 = call i32 @wprintw(i32* %7, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i8 signext %13, i8* %14)
ret void
}

LLVM IR (-O2):
@.str = [12 x i8] c" [%c] %s\00"
define void @checkbox(i32* %0, i8* %1, i32* nocapture %2) {
%4 = load i32, i32* %2
%5 = icmp eq i32 %4, 0
%6 = select i1 %5, i8 32, i8 120
%7 = tail call i32 @wprintw(i32* %0, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i8 signext %6, i8* %1)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ usleep(int);
void msleep(int c) {
  while (c-- > 0)
    usleep(1000);
}


x86 assembly (clang, -O0):
<msleep>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
mov    %eax,%ecx
add    $0xffffffff,%ecx
mov    %ecx,-0x4(%rbp)
cmp    $0x0,%eax
jle    113e <msleep+0x2e>
mov    $0x3e8,%edi
call   1030 <usleep@plt>
jmp    111b <msleep+0xb>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<msleep>:
push   %rbx
test   %edi,%edi
jle    1132 <msleep+0x22>
mov    %edi,%ebx
add    $0x1,%ebx
nopw   0x0(%rax,%rax,1)
mov    $0x3e8,%edi
call   1030 <usleep@plt>
add    $0xffffffff,%ebx
cmp    $0x1,%ebx
ja     1120 <msleep+0x10>
pop    %rbx
ret

LLVM IR (-O0):
define void @msleep(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
br label %3
3: ; preds = %7, %1
%4 = load i32, i32* %2
%5 = add nsw i32 %4, -1
store i32 %5, i32* %2
%6 = icmp sgt i32 %4, 0
br i1 %6, label %7, label %9
7: ; preds = %3
%8 = call i32 @usleep(i32 1000)
br label %3
9: ; preds = %3
ret void
}

LLVM IR (-O2):
define void @msleep(i32 %0) {
%2 = icmp sgt i32 %0, 0
br i1 %2, label %3, label %8
3: ; preds = %1, %3
%4 = phi i32 [ %5, %3 ], [ %0, %1 ]
%5 = add nsw i32 %4, -1
%6 = tail call i32 @usleep(i32 1000)
%7 = icmp ugt i32 %4, 1
br i1 %7, label %3, label %8
8: ; preds = %3, %1
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, unsigned long);
int PrintAddr(void *a, void *b) {
  printf("%lx ", (unsigned long)a);
  return b ? 0 : 0;
}


x86 assembly (clang, -O0):
<PrintAddr>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rsi
lea    0xed5(%rip),%rdi
call   1030 <printf@plt>
mov    -0x10(%rbp),%rcx
xor    %eax,%eax
cmp    $0x0,%rcx
cmovne %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<PrintAddr>:
push   %rax
mov    %rdi,%rsi
lea    0xee5(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
@.str = [5 x i8] c"%lx \00"
define i32 @PrintAddr(i8* %0, i8* nocapture readnone %1) {
%3 = ptrtoint i8* %0 to i64
%4 = tail call i32 @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i64 %3)
ret i32 0
}
/* Variables and functions */
size_t get_value_at(size_t *items, size_t i) { return items[i * 2]; }


x86 assembly (clang, -O0):
<get_value_at>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    -0x10(%rbp),%rcx
shl    $0x1,%rcx
mov    (%rax,%rcx,8),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_value_at>:
shl    $0x4,%rsi
mov    (%rdi,%rsi,1),%rax
ret

LLVM IR (-O0):
define i64 @get_value_at(i64* %0, i64 %1) {
%3 = alloca i64*
%4 = alloca i64
store i64* %0, i64** %3
store i64 %1, i64* %4
%5 = load i64*, i64** %3
%6 = load i64, i64* %4
%7 = mul i64 %6, 2
%8 = getelementptr inbounds i64, i64* %5, i64 %7
%9 = load i64, i64* %8
ret i64 %9
}

LLVM IR (-O2):
define i64 @get_value_at(i64* nocapture %0, i64 %1) {
%3 = shl i64 %1, 1
%4 = getelementptr inbounds i64, i64* %0, i64 %3
%5 = load i64, i64* %4
ret i64 %5
}
/* Variables and functions */
int /*<<< orphan*/ close(int);
void pipeHelperClosePipe(int fd) { close(fd); }


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

x86 assembly (clang, -O2):
<pipeHelperClosePipe>:
jmp    1030 <close@plt>

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

LLVM IR (-O2):
define void @pipeHelperClosePipe(i32 %0) {
%2 = tail call i32 @close(i32 %0)
ret void
}
void cfunction(float *a, float *b) {
  *a = 7.0;
  *b = 8.0;
}


x86 assembly (clang, -O0):
<cfunction>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
movss  0xeec(%rip),%xmm0
movss  %xmm0,(%rax)
mov    -0x10(%rbp),%rax
movss  0xed8(%rip),%xmm0
movss  %xmm0,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<cfunction>:
movl   $0x40e00000,(%rdi)
movl   $0x41000000,(%rsi)
ret

LLVM IR (-O0):
define void @cfunction(float* %0, float* %1) {
%3 = alloca float*
%4 = alloca float*
store float* %0, float** %3
store float* %1, float** %4
%5 = load float*, float** %3
store float 7.000000e+00, float* %5
%6 = load float*, float** %4
store float 8.000000e+00, float* %6
ret void
}

LLVM IR (-O2):
define void @cfunction(float* nocapture writeonly %0, float* nocapture writeonly %1) {
store float 7.000000e+00, float* %0
store float 8.000000e+00, float* %1
ret void
}
void rop3_170_0_1(unsigned char *D, unsigned char S, unsigned char T) {
  *D = (*D & S) | (*D & (~T)) | (T & (~S) & *D);
}


x86 assembly (clang, -O0):
<rop3_170_0_1>:
push   %rbp
mov    %rsp,%rbp
mov    %dl,%al
mov    %sil,%cl
mov    %rdi,-0x8(%rbp)
mov    %cl,-0x9(%rbp)
mov    %al,-0xa(%rbp)
mov    -0x8(%rbp),%rax
movzbl (%rax),%eax
movzbl -0x9(%rbp),%ecx
and    %ecx,%eax
mov    -0x8(%rbp),%rcx
movzbl (%rcx),%ecx
movzbl -0xa(%rbp),%edx
xor    $0xffffffff,%edx
and    %edx,%ecx
or     %ecx,%eax
movzbl -0xa(%rbp),%ecx
movzbl -0x9(%rbp),%edx
xor    $0xffffffff,%edx
and    %edx,%ecx
mov    -0x8(%rbp),%rdx
movzbl (%rdx),%edx
and    %edx,%ecx
or     %ecx,%eax
mov    %al,%cl
mov    -0x8(%rbp),%rax
mov    %cl,(%rax)
pop    %rbp
ret

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

LLVM IR (-O0):
define void @rop3_170_0_1(i8* %0, i8 zeroext %1, i8 zeroext %2) {
%4 = alloca i8*
%5 = alloca i8
%6 = alloca i8
store i8* %0, i8** %4
store i8 %1, i8* %5
store i8 %2, i8* %6
%7 = load i8*, i8** %4
%8 = load i8, i8* %7
%9 = zext i8 %8 to i32
%10 = load i8, i8* %5
%11 = zext i8 %10 to i32
%12 = and i32 %9, %11
%13 = load i8*, i8** %4
%14 = load i8, i8* %13
%15 = zext i8 %14 to i32
%16 = load i8, i8* %6
%17 = zext i8 %16 to i32
%18 = xor i32 %17, -1
%19 = and i32 %15, %18
%20 = or i32 %12, %19
%21 = load i8, i8* %6
%22 = zext i8 %21 to i32
%23 = load i8, i8* %5
%24 = zext i8 %23 to i32
%25 = xor i32 %24, -1
%26 = and i32 %22, %25
%27 = load i8*, i8** %4
%28 = load i8, i8* %27
%29 = zext i8 %28 to i32
%30 = and i32 %26, %29
%31 = or i32 %20, %30
%32 = trunc i32 %31 to i8
%33 = load i8*, i8** %4
store i8 %32, i8* %33
ret void
}

LLVM IR (-O2):
define void @rop3_170_0_1(i8* nocapture %0, i8 zeroext %1, i8 zeroext %2) {
ret void
}
unsigned long find_gcd(long num, long denom) {
  long temp;
  while (denom) {
    temp = denom;
    denom = num % denom;
    num = temp;
  }
  return num;
}


x86 assembly (clang, -O0):
<find_gcd>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
je     113a <find_gcd+0x3a>
mov    -0x10(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x8(%rbp),%rax
cqto
idivq  -0x10(%rbp)
mov    %rdx,-0x10(%rbp)
mov    -0x18(%rbp),%rax
mov    %rax,-0x8(%rbp)
jmp    110c <find_gcd+0xc>
mov    -0x8(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<find_gcd>:
mov    %rdi,%rax
test   %rsi,%rsi
je     1135 <find_gcd+0x35>
mov    %rsi,%rdx
jmp    111d <find_gcd+0x1d>
nopl   (%rax)
cqto
idiv   %rcx
mov    %rcx,%rax
test   %rdx,%rdx
je     1132 <find_gcd+0x32>
mov    %rdx,%rcx
mov    %rax,%rdx
or     %rcx,%rdx
shr    $0x20,%rdx
jne    1110 <find_gcd+0x10>
xor    %edx,%edx
div    %ecx
jmp    1115 <find_gcd+0x15>
mov    %rcx,%rax
ret

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

LLVM IR (-O2):
define i64 @find_gcd(i64 %0, i64 %1) {
%3 = icmp eq i64 %1, 0
br i1 %3, label %9, label %4
4: ; preds = %2, %4
%5 = phi i64 [ %6, %4 ], [ %0, %2 ]
%6 = phi i64 [ %7, %4 ], [ %1, %2 ]
%7 = srem i64 %5, %6
%8 = icmp eq i64 %7, 0
br i1 %8, label %9, label %4
9: ; preds = %4, %2
%10 = phi i64 [ %0, %2 ], [ %6, %4 ]
ret i64 %10
}
/* Variables and functions */
int /*<<< orphan*/ sprintf(char *, char *, double);
void ftodPrecision1(double value, char *strDouble) {
  sprintf(strDouble, "%.1f", value);
}


x86 assembly (clang, -O0):
<ftodPrecision1>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movsd  %xmm0,-0x8(%rbp)
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
movsd  -0x8(%rbp),%xmm0
lea    0xecf(%rip),%rsi
call   1030 <sprintf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ftodPrecision1>:
lea    0xee9(%rip),%rsi
jmp    1030 <sprintf@plt>

LLVM IR (-O0):
@.str = [5 x i8] c"%.1f\00"
define void @ftodPrecision1(double %0, i8* %1) {
%3 = alloca double
%4 = alloca i8*
store double %0, double* %3
store i8* %1, i8** %4
%5 = load i8*, i8** %4
%6 = load double, double* %3
%7 = call i32 @sprintf(i8* %5, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), double %6)
ret void
}

LLVM IR (-O2):
@.str = [5 x i8] c"%.1f\00"
define void @ftodPrecision1(double %0, i8* nocapture writeonly %1) {
%3 = tail call i32 @sprintf(i8* dereferenceable(1) %1, i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), double %0)
ret void
}
/* Variables and functions */
scalar_t__ lookup_vendor(unsigned int);
const char *lookup_vendor_str(unsigned int id) {
  return lookup_vendor(id) ?: "Unknown";
}


x86 assembly (clang, -O0):
<lookup_vendor_str>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
call   1030 <lookup_vendor@plt>
mov    %rax,-0x10(%rbp)
cmp    $0x0,%rax
je     113e <lookup_vendor_str+0x2e>
mov    -0x10(%rbp),%rax
mov    %rax,-0x18(%rbp)
jmp    114e <lookup_vendor_str+0x3e>
lea    0xebb(%rip),%rax
mov    %rax,-0x18(%rbp)
jmp    114e <lookup_vendor_str+0x3e>
mov    -0x18(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<lookup_vendor_str>:
push   %rax
call   1030 <lookup_vendor@plt>
test   %rax,%rax
lea    0xee0(%rip),%rcx
cmove  %rcx,%rax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [8 x i8] c"Unknown\00"
define i8* @lookup_vendor_str(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = call i64 @lookup_vendor(i32 %3)
%5 = icmp ne i64 %4, 0
br i1 %5, label %6, label %8
6: ; preds = %1
%7 = inttoptr i64 %4 to i8*
br label %9
8: ; preds = %1
br label %9
9: ; preds = %8, %6
%10 = phi i8* [ %7, %6 ], [ getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), %8 ]
ret i8* %10
}

LLVM IR (-O2):
@.str = [8 x i8] c"Unknown\00"
define i8* @lookup_vendor_str(i32 %0) {
%2 = tail call i64 @lookup_vendor(i32 %0)
%3 = icmp eq i64 %2, 0
%4 = inttoptr i64 %2 to i8*
%5 = select i1 %3, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i8* %4
ret i8* %5
}
void gdk_region_destroy() {}


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

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

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

LLVM IR (-O2):
define void @gdk_region_destroy() {
ret void
}
/* Variables and functions */
float tolower(int);
int isxdigit(int c) { return tolower(c) >= '0' && tolower(c) <= 'f'; }


x86 assembly (clang, -O0):
<isxdigit>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
call   1030 <tolower@plt>
xor    %eax,%eax
movss  0xed3(%rip),%xmm1
ucomiss %xmm1,%xmm0
mov    %al,-0x5(%rbp)
jb     1155 <isxdigit+0x45>
mov    -0x4(%rbp),%edi
call   1030 <tolower@plt>
movaps %xmm0,%xmm1
movss  0xeb8(%rip),%xmm0
ucomiss %xmm1,%xmm0
setae  %al
mov    %al,-0x5(%rbp)
mov    -0x5(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<isxdigit>:
push   %rbx
mov    %edi,%ebx
call   1030 <tolower@plt>
xor    %eax,%eax
ucomiss 0xedf(%rip),%xmm0
jb     113a <isxdigit+0x2a>
mov    %ebx,%edi
call   1030 <tolower@plt>
movss  0xed2(%rip),%xmm1
xor    %eax,%eax
ucomiss %xmm0,%xmm1
setae  %al
pop    %rbx
ret

LLVM IR (-O0):
define i32 @isxdigit(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = call float @tolower(i32 %3)
%5 = fcmp oge float %4, 4.800000e+01
br i1 %5, label %6, label %10
6: ; preds = %1
%7 = load i32, i32* %2
%8 = call float @tolower(i32 %7)
%9 = fcmp ole float %8, 1.020000e+02
br label %10
10: ; preds = %6, %1
%11 = phi i1 [ false, %1 ], [ %9, %6 ]
%12 = zext i1 %11 to i32
ret i32 %12
}

LLVM IR (-O2):
define i32 @isxdigit(i32 %0) {
%2 = tail call float @tolower(i32 %0)
%3 = fcmp ult float %2, 4.800000e+01
br i1 %3, label %8, label %4
4: ; preds = %1
%5 = tail call float @tolower(i32 %0)
%6 = fcmp ole float %5, 1.020000e+02
%7 = zext i1 %6 to i32
br label %8
8: ; preds = %4, %1
%9 = phi i32 [ 0, %1 ], [ %7, %4 ]
ret i32 %9
}
/* Type definitions */
typedef scalar_t__ uint32_t;

/* Variables and functions */
int __semihost(int, scalar_t__ *);
int semihost_read(int fh, unsigned char *buffer, unsigned int length,
                  int mode) {
  uint32_t args[3];
  args[0] = (uint32_t)fh;
  args[1] = (uint32_t)buffer;
  args[2] = (uint32_t)length;
  return __semihost((0x6), args);
}


x86 assembly (clang, -O0):
<semihost_read>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    %ecx,-0x18(%rbp)
movslq -0x4(%rbp),%rax
mov    %rax,-0x30(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x28(%rbp)
mov    -0x14(%rbp),%eax
mov    %rax,-0x20(%rbp)
lea    -0x30(%rbp),%rsi
mov    $0x6,%edi
call   1030 <__semihost@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<semihost_read>:
sub    $0x18,%rsp
movslq %edi,%rax
mov    %rax,(%rsp)
mov    %rsi,0x8(%rsp)
mov    %edx,%eax
mov    %rax,0x10(%rsp)
mov    %rsp,%rsi
mov    $0x6,%edi
call   1030 <__semihost@plt>
add    $0x18,%rsp
ret

LLVM IR (-O0):
define i32 @semihost_read(i32 %0, i8* %1, i32 %2, i32 %3) {
%5 = alloca i32
%6 = alloca i8*
%7 = alloca i32
%8 = alloca i32
%9 = alloca [3 x i64]
store i32 %0, i32* %5
store i8* %1, i8** %6
store i32 %2, i32* %7
store i32 %3, i32* %8
%10 = load i32, i32* %5
%11 = sext i32 %10 to i64
%12 = getelementptr inbounds [3 x i64], [3 x i64]* %9, i64 0, i64 0
store i64 %11, i64* %12
%13 = load i8*, i8** %6
%14 = ptrtoint i8* %13 to i64
%15 = getelementptr inbounds [3 x i64], [3 x i64]* %9, i64 0, i64 1
store i64 %14, i64* %15
%16 = load i32, i32* %7
%17 = zext i32 %16 to i64
%18 = getelementptr inbounds [3 x i64], [3 x i64]* %9, i64 0, i64 2
store i64 %17, i64* %18
%19 = getelementptr inbounds [3 x i64], [3 x i64]* %9, i64 0, i64 0
%20 = call i32 @__semihost(i32 6, i64* %19)
ret i32 %20
}

LLVM IR (-O2):
define i32 @semihost_read(i32 %0, i8* %1, i32 %2, i32 %3) {
%5 = alloca [3 x i64]
%6 = bitcast [3 x i64]* %5 to i8*
%7 = sext i32 %0 to i64
%8 = getelementptr inbounds [3 x i64], [3 x i64]* %5, i64 0, i64 0
store i64 %7, i64* %8
%9 = ptrtoint i8* %1 to i64
%10 = getelementptr inbounds [3 x i64], [3 x i64]* %5, i64 0, i64 1
store i64 %9, i64* %10
%11 = zext i32 %2 to i64
%12 = getelementptr inbounds [3 x i64], [3 x i64]* %5, i64 0, i64 2
store i64 %11, i64* %12
%13 = call i32 @__semihost(i32 6, i64* %8)
ret i32 %13
}
void foo() {
  unsigned i1 = 1U << (sizeof(unsigned) * 8);
  unsigned i2 = 1U >> (sizeof(unsigned) * 8);
}


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

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

LLVM IR (-O0):
define void @foo() {
%1 = alloca i32
%2 = alloca i32
store i32 poison, i32* %1
store i32 poison, i32* %2
ret void
}

LLVM IR (-O2):
define void @foo() {
ret void
}
char pop(char c[100], int *kc) {
  char j;
  j = c[*kc];
  *kc = *kc + 1;
  return j;
}


x86 assembly (clang, -O0):
<pop>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    -0x10(%rbp),%rcx
movslq (%rcx),%rcx
mov    (%rax,%rcx,1),%al
mov    %al,-0x11(%rbp)
mov    -0x10(%rbp),%rax
mov    (%rax),%ecx
add    $0x1,%ecx
mov    -0x10(%rbp),%rax
mov    %ecx,(%rax)
movsbl -0x11(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<pop>:
movslq (%rsi),%rcx
mov    (%rdi,%rcx,1),%al
add    $0x1,%ecx
mov    %ecx,(%rsi)
ret

LLVM IR (-O0):
define signext i8 @pop(i8* %0, i32* %1) {
%3 = alloca i8*
%4 = alloca i32*
%5 = alloca i8
store i8* %0, i8** %3
store i32* %1, i32** %4
%6 = load i8*, i8** %3
%7 = load i32*, i32** %4
%8 = load i32, i32* %7
%9 = sext i32 %8 to i64
%10 = getelementptr inbounds i8, i8* %6, i64 %9
%11 = load i8, i8* %10
store i8 %11, i8* %5
%12 = load i32*, i32** %4
%13 = load i32, i32* %12
%14 = add nsw i32 %13, 1
%15 = load i32*, i32** %4
store i32 %14, i32* %15
%16 = load i8, i8* %5
ret i8 %16
}

LLVM IR (-O2):
define signext i8 @pop(i8* nocapture %0, i32* nocapture %1) {
%3 = load i32, i32* %1
%4 = sext i32 %3 to i64
%5 = getelementptr inbounds i8, i8* %0, i64 %4
%6 = load i8, i8* %5
%7 = add nsw i32 %3, 1
store i32 %7, i32* %1
ret i8 %6
}
int min(int first, int second) {
  if (first < second) {
    return first;
  }
  return second;
}


x86 assembly (clang, -O0):
<min>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%eax
cmp    -0xc(%rbp),%eax
jge    1121 <min+0x21>
mov    -0x8(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    1127 <min+0x27>
mov    -0xc(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<min>:
mov    %esi,%eax
cmp    %esi,%edi
cmovl  %edi,%eax
ret

LLVM IR (-O0):
define i32 @min(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 = load i32, i32* %5
%8 = icmp slt i32 %6, %7
br i1 %8, label %9, label %11
9: ; preds = %2
%10 = load i32, i32* %4
store i32 %10, i32* %3
br label %13
11: ; preds = %2
%12 = load i32, i32* %5
store i32 %12, i32* %3
br label %13
13: ; preds = %11, %9
%14 = load i32, i32* %3
ret i32 %14
}

LLVM IR (-O2):
define i32 @min(i32 %0, i32 %1) {
%3 = icmp slt i32 %0, %1
%4 = select i1 %3, i32 %0, i32 %1
ret i32 %4
}
void show_rcu_tasks_gp_kthreads(void) {}


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

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

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

LLVM IR (-O2):
define void @show_rcu_tasks_gp_kthreads() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ test_readline_empty_line();
int /*<<< orphan*/ test_readline_last();
int /*<<< orphan*/ test_readline_last_empty_line();
int /*<<< orphan*/ test_readline_last_line();
int /*<<< orphan*/ test_readline_last_without_10();
int /*<<< orphan*/ test_readline_simple();
int main() {
  test_readline_simple();
  test_readline_empty_line();
  test_readline_last_line();
  test_readline_last_empty_line();
  test_readline_last();
  test_readline_last_without_10();
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x0,%al
call   1080 <test_readline_simple@plt>
mov    $0x0,%al
call   1030 <test_readline_empty_line@plt>
mov    $0x0,%al
call   1070 <test_readline_last_line@plt>
mov    $0x0,%al
call   1060 <test_readline_last_empty_line@plt>
mov    $0x0,%al
call   1040 <test_readline_last@plt>
mov    $0x0,%al
call   1050 <test_readline_last_without_10@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1080 <test_readline_simple@plt>
xor    %eax,%eax
call   1030 <test_readline_empty_line@plt>
xor    %eax,%eax
call   1070 <test_readline_last_line@plt>
xor    %eax,%eax
call   1060 <test_readline_last_empty_line@plt>
xor    %eax,%eax
call   1040 <test_readline_last@plt>
xor    %eax,%eax
call   1050 <test_readline_last_without_10@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 (...) @test_readline_simple()
%3 = call i32 (...) @test_readline_empty_line()
%4 = call i32 (...) @test_readline_last_line()
%5 = call i32 (...) @test_readline_last_empty_line()
%6 = call i32 (...) @test_readline_last()
%7 = call i32 (...) @test_readline_last_without_10()
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @test_readline_simple()
%2 = tail call i32 (...) @test_readline_empty_line()
%3 = tail call i32 (...) @test_readline_last_line()
%4 = tail call i32 (...) @test_readline_last_empty_line()
%5 = tail call i32 (...) @test_readline_last()
%6 = tail call i32 (...) @test_readline_last_without_10()
ret i32 0
}
/* Type definitions */
typedef int /*<<< orphan*/ u_short;

/* Variables and functions */
int SetUpSocket(int /*<<< orphan*/);
int initialize_socket(int port) { return (SetUpSocket((u_short)port)); }


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

x86 assembly (clang, -O2):
<initialize_socket>:
jmp    1030 <SetUpSocket@plt>

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

LLVM IR (-O2):
define i32 @initialize_socket(i32 %0) {
%2 = tail call i32 @SetUpSocket(i32 %0)
ret i32 %2
}
void class2classStart_inclass_classEnd() {}


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

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

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

LLVM IR (-O2):
define void @class2classStart_inclass_classEnd() {
ret void
}
void f7() { __func__; }


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

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

LLVM IR (-O0):
@__func__.f7 = [3 x i8] c"f7\00"
define void @f7() {
ret void
}

LLVM IR (-O2):
define void @f7() {
ret void
}
/* Type definitions */
struct imap {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ _popv(struct imap *, int);
int /*<<< orphan*/ _setval(struct imap *, int, int /*<<< orphan*/);
void pop(struct imap *ci, int arg) { _setval(ci, arg, _popv(ci, arg)); }


x86 assembly (clang, -O0):
<pop>:
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),%eax
mov    %eax,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
call   1030 <_popv@plt>
mov    -0x18(%rbp),%rdi
mov    -0x10(%rbp),%esi
mov    %eax,%edx
call   1040 <_setval@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<pop>:
push   %rbp
push   %rbx
push   %rax
mov    %esi,%ebp
mov    %rdi,%rbx
call   1030 <_popv@plt>
mov    %rbx,%rdi
mov    %ebp,%esi
mov    %eax,%edx
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    1040 <_setval@plt>

LLVM IR (-O0):
%struct.imap = type { i32 }
define void @pop(%struct.imap* %0, i32 %1) {
%3 = alloca %struct.imap*
%4 = alloca i32
store %struct.imap* %0, %struct.imap** %3
store i32 %1, i32* %4
%5 = load %struct.imap*, %struct.imap** %3
%6 = load i32, i32* %4
%7 = load %struct.imap*, %struct.imap** %3
%8 = load i32, i32* %4
%9 = call i32 @_popv(%struct.imap* %7, i32 %8)
%10 = call i32 @_setval(%struct.imap* %5, i32 %6, i32 %9)
ret void
}

LLVM IR (-O2):
%struct.imap = type { i32 }
define void @pop(%struct.imap* %0, i32 %1) {
%3 = tail call i32 @_popv(%struct.imap* %0, i32 %1)
%4 = tail call i32 @_setval(%struct.imap* %0, i32 %1, i32 %3)
ret void
}
/* Type definitions */
typedef int uint8_t;
typedef int uint32_t;

/* Variables and functions */
int /*<<< orphan*/ snprintf(char *, size_t, char *, char *, int, int, int,
                            char *);
void worddir(char *buffer, size_t length, char *word, uint32_t hash,
             char *basepath) {
  snprintf(buffer, length, "%s/words/%02X/%02X/%08X/%s", basepath,
           (uint8_t)((hash >> 24) & 0xFF), (uint8_t)((hash >> 16) & 0xFF), hash,
           word);
}


x86 assembly (clang, -O0):
<worddir>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %ecx,-0x1c(%rbp)
mov    %r8,-0x28(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x28(%rbp),%rcx
mov    -0x1c(%rbp),%r8d
sar    $0x18,%r8d
and    $0xff,%r8d
mov    -0x1c(%rbp),%r9d
sar    $0x10,%r9d
and    $0xff,%r9d
mov    -0x1c(%rbp),%r10d
mov    -0x18(%rbp),%rax
lea    0xe9c(%rip),%rdx
mov    %r10d,(%rsp)
mov    %rax,0x8(%rsp)
call   1030 <snprintf@plt>
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<worddir>:
push   %rax
mov    %r8,%r11
mov    %ecx,%eax
mov    %rdx,%r10
mov    %ecx,%r8d
shr    $0x18,%r8d
shr    $0x10,%ecx
movzbl %cl,%r9d
lea    0xed2(%rip),%rdx
mov    %r11,%rcx
push   %r10
push   %rax
call   1030 <snprintf@plt>
add    $0x10,%rsp
pop    %rax
ret

LLVM IR (-O0):
@.str = [27 x i8] c"%s/words/%02X/%02X/%08X/%s\00"
define void @worddir(i8* %0, i64 %1, i8* %2, i32 %3, i8* %4) {
%6 = alloca i8*
%7 = alloca i64
%8 = alloca i8*
%9 = alloca i32
%10 = alloca i8*
store i8* %0, i8** %6
store i64 %1, i64* %7
store i8* %2, i8** %8
store i32 %3, i32* %9
store i8* %4, i8** %10
%11 = load i8*, i8** %6
%12 = load i64, i64* %7
%13 = load i8*, i8** %10
%14 = load i32, i32* %9
%15 = ashr i32 %14, 24
%16 = and i32 %15, 255
%17 = load i32, i32* %9
%18 = ashr i32 %17, 16
%19 = and i32 %18, 255
%20 = load i32, i32* %9
%21 = load i8*, i8** %8
%22 = call i32 @snprintf(i8* %11, i64 %12, i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str, i64 0, i64 0), i8* %13, i32 %16, i32 %19, i32 %20, i8* %21)
ret void
}

LLVM IR (-O2):
@.str = [27 x i8] c"%s/words/%02X/%02X/%08X/%s\00"
define void @worddir(i8* %0, i64 %1, i8* %2, i32 %3, i8* %4) {
%6 = lshr i32 %3, 24
%7 = lshr i32 %3, 16
%8 = and i32 %7, 255
%9 = tail call i32 @snprintf(i8* %0, i64 %1, i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str, i64 0, i64 0), i8* %4, i32 %6, i32 %8, i32 %3, i8* %2)
ret void
}
/* Variables and functions */
scalar_t__ df_malloc(size_t);
int /*<<< orphan*/ strncpy(char *, char const *, size_t);
char *df_strndup(const char *string, size_t n) {
  char *output_string = (char *)df_malloc(n + 1);
  if (!output_string) {
    return NULL;
  }
  output_string[n] = '\0';
  strncpy(output_string, string, n);
  return output_string;
}


x86 assembly (clang, -O0):
<df_strndup>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    -0x18(%rbp),%rdi
add    $0x1,%rdi
call   1040 <df_malloc@plt>
mov    %rax,-0x20(%rbp)
cmpq   $0x0,-0x20(%rbp)
jne    1159 <df_strndup+0x39>
movq   $0x0,-0x8(%rbp)
jmp    117e <df_strndup+0x5e>
mov    -0x20(%rbp),%rax
mov    -0x18(%rbp),%rcx
movb   $0x0,(%rax,%rcx,1)
mov    -0x20(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
call   1030 <strncpy@plt>
mov    -0x20(%rbp),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<df_strndup>:
push   %r15
push   %r14
push   %rbx
mov    %rsi,%r14
mov    %rdi,%r15
lea    0x1(%rsi),%rdi
call   1040 <df_malloc@plt>
test   %rax,%rax
je     1151 <df_strndup+0x31>
mov    %rax,%rbx
movb   $0x0,(%rax,%r14,1)
mov    %rax,%rdi
mov    %r15,%rsi
mov    %r14,%rdx
call   1030 <strncpy@plt>
jmp    1153 <df_strndup+0x33>
xor    %ebx,%ebx
mov    %rbx,%rax
pop    %rbx
pop    %r14
pop    %r15
ret

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

LLVM IR (-O2):
define i8* @df_strndup(i8* %0, i64 %1) {
%3 = add i64 %1, 1
%4 = tail call i64 @df_malloc(i64 %3)
%5 = inttoptr i64 %4 to i8*
%6 = icmp eq i64 %4, 0
br i1 %6, label %10, label %7
7: ; preds = %2
%8 = getelementptr inbounds i8, i8* %5, i64 %1
store i8 0, i8* %8
%9 = tail call i32 @strncpy(i8* %5, i8* %0, i64 %1)
br label %10
10: ; preds = %2, %7
%11 = phi i8* [ %5, %7 ], [ null, %2 ]
ret i8* %11
}
int __nesf2(float a, float b) {
  return (*(unsigned long *)&(a)) != (*(unsigned long *)&(b));
}


x86 assembly (clang, -O0):
<__nesf2>:
push   %rbp
mov    %rsp,%rbp
movss  %xmm0,-0x4(%rbp)
movss  %xmm1,-0x8(%rbp)
mov    -0x4(%rbp),%rax
cmp    -0x8(%rbp),%rax
setne  %al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<__nesf2>:
movss  %xmm0,-0x8(%rsp)
movss  %xmm1,-0x10(%rsp)
mov    -0x8(%rsp),%rcx
xor    %eax,%eax
cmp    -0x10(%rsp),%rcx
setne  %al
ret

LLVM IR (-O0):
define i32 @__nesf2(float %0, float %1) {
%3 = alloca float
%4 = alloca float
store float %0, float* %3
store float %1, float* %4
%5 = bitcast float* %3 to i64*
%6 = load i64, i64* %5
%7 = bitcast float* %4 to i64*
%8 = load i64, i64* %7
%9 = icmp ne i64 %6, %8
%10 = zext i1 %9 to i32
ret i32 %10
}

LLVM IR (-O2):
define i32 @__nesf2(float %0, float %1) {
%3 = alloca float
%4 = alloca float
store float %0, float* %3
store float %1, float* %4
%5 = bitcast float* %3 to i64*
%6 = load i64, i64* %5
%7 = bitcast float* %4 to i64*
%8 = load i64, i64* %7
%9 = icmp ne i64 %6, %8
%10 = zext i1 %9 to i32
ret i32 %10
}
/* Variables and functions */
int /*<<< orphan*/ execlp(char *, char *, char *, char *, int /*<<< orphan*/ *);
int /*<<< orphan*/ puts(char *);
int main() {
  execlp("cal", "cal", "12", "2012", NULL);
  puts("error");
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
lea    0xed5(%rip),%rsi
lea    0xed4(%rip),%rdx
lea    0xecb(%rip),%rcx
xor    %eax,%eax
mov    %eax,%r8d
mov    %rsi,%rdi
call   1040 <execlp@plt>
lea    0xebc(%rip),%rdi
call   1030 <puts@plt>
xor    %eax,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xed8(%rip),%rdi
lea    0xed7(%rip),%rdx
lea    0xece(%rip),%rcx
mov    %rdi,%rsi
xor    %r8d,%r8d
call   1040 <execlp@plt>
lea    0xec1(%rip),%rdi
call   1030 <puts@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [4 x i8] c"cal\00"
@.str.1 = [3 x i8] c"12\00"
@.str.2 = [5 x i8] c"2012\00"
@.str.3 = [6 x i8] c"error\00"
define i32 @main() {
%1 = call i32 @execlp(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), 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), i32* null)
%2 = call i32 @puts(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.3, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@.str = [4 x i8] c"cal\00"
@.str.1 = [3 x i8] c"12\00"
@.str.2 = [5 x i8] c"2012\00"
@.str.3 = [6 x i8] c"error\00"
define i32 @main() {
%1 = tail call i32 @execlp(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), 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), i32* null)
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([6 x i8], [6 x i8]* @.str.3, i64 0, i64 0))
ret i32 0
}
unsigned roundup(unsigned n, unsigned div) {
  unsigned rem = n % div;
  return rem ? n - rem + div : n;
}


x86 assembly (clang, -O0):
<roundup>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
xor    %edx,%edx
divl   -0x8(%rbp)
mov    %edx,-0xc(%rbp)
cmpl   $0x0,-0xc(%rbp)
je     1130 <roundup+0x30>
mov    -0x4(%rbp),%eax
sub    -0xc(%rbp),%eax
add    -0x8(%rbp),%eax
mov    %eax,-0x10(%rbp)
jmp    1136 <roundup+0x36>
mov    -0x4(%rbp),%eax
mov    %eax,-0x10(%rbp)
mov    -0x10(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<roundup>:
mov    %edi,%eax
xor    %edx,%edx
div    %esi
lea    (%rsi,%rdi,1),%eax
sub    %edx,%eax
test   %edx,%edx
cmove  %edi,%eax
ret

LLVM IR (-O0):
define i32 @roundup(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%6 = load i32, i32* %3
%7 = load i32, i32* %4
%8 = urem i32 %6, %7
store i32 %8, i32* %5
%9 = load i32, i32* %5
%10 = icmp ne i32 %9, 0
br i1 %10, label %11, label %17
11: ; preds = %2
%12 = load i32, i32* %3
%13 = load i32, i32* %5
%14 = sub i32 %12, %13
%15 = load i32, i32* %4
%16 = add i32 %14, %15
br label %19
17: ; preds = %2
%18 = load i32, i32* %3
br label %19
19: ; preds = %17, %11
%20 = phi i32 [ %16, %11 ], [ %18, %17 ]
ret i32 %20
}

LLVM IR (-O2):
define i32 @roundup(i32 %0, i32 %1) {
%3 = urem i32 %0, %1
%4 = icmp eq i32 %3, 0
%5 = add i32 %1, %0
%6 = sub i32 %5, %3
%7 = select i1 %4, i32 %0, i32 %6
ret i32 %7
}
/* Variables and functions */
int /*<<< orphan*/ DumpGB2312();
int main(int argc, char *argv[]) {
  DumpGB2312();
  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 <DumpGB2312@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1030 <DumpGB2312@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 (...) @DumpGB2312()
ret i32 0
}

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 (...) @DumpGB2312()
ret i32 0
}
void gtk_invisible_get_type() {}


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

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

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

LLVM IR (-O2):
define void @gtk_invisible_get_type() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void cmdExit(void) { printf("bye, bye!\n"); }


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

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

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

LLVM IR (-O2):
@str = [10 x i8] c"bye, bye!\00"
define void @cmdExit() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([10 x i8], [10 x i8]* @str, i64 0, i64 0))
ret void
}
int do_405() { return 405; }


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

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

LLVM IR (-O0):
define i32 @do_405() {
ret i32 405
}

LLVM IR (-O2):
define i32 @do_405() {
ret i32 405
}
/* Variables and functions */
int /*<<< orphan*/ generateMaze(int **, int *, int *);
int /*<<< orphan*/ printMaze(int **);
int /*<<< orphan*/ printf(char *, int, int);
int main() {
  int maze[32][32];
  int sci, scj;
  generateMaze(maze, &sci, &scj);
  printf("Starting cell = {%d,%d}\n", sci, scj);
  printMaze(maze);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x1020,%rsp
movl   $0x0,-0x4(%rbp)
lea    -0x1010(%rbp),%rdi
lea    -0x1014(%rbp),%rsi
lea    -0x1018(%rbp),%rdx
call   1050 <generateMaze@plt>
mov    -0x1014(%rbp),%esi
mov    -0x1018(%rbp),%edx
lea    0xe91(%rip),%rdi
call   1030 <printf@plt>
lea    -0x1010(%rbp),%rdi
call   1040 <printMaze@plt>
xor    %eax,%eax
add    $0x1020,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x1010,%rsp
lea    0x10(%rsp),%rbx
lea    0xc(%rsp),%rsi
lea    0x8(%rsp),%rdx
mov    %rbx,%rdi
call   1050 <generateMaze@plt>
mov    0xc(%rsp),%esi
mov    0x8(%rsp),%edx
lea    0xea2(%rip),%rdi
call   1030 <printf@plt>
mov    %rbx,%rdi
call   1040 <printMaze@plt>
xor    %eax,%eax
add    $0x1010,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@.str = [25 x i8] c"Starting cell = {%d,%d}\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca [32 x [32 x i32]]
%3 = alloca i32
%4 = alloca i32
store i32 0, i32* %1
%5 = getelementptr inbounds [32 x [32 x i32]], [32 x [32 x i32]]* %2, i64 0, i64 0
%6 = bitcast [32 x i32]* %5 to i32**
%7 = call i32 @generateMaze(i32** %6, i32* %3, i32* %4)
%8 = load i32, i32* %3
%9 = load i32, i32* %4
%10 = call i32 @printf(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str, i64 0, i64 0), i32 %8, i32 %9)
%11 = getelementptr inbounds [32 x [32 x i32]], [32 x [32 x i32]]* %2, i64 0, i64 0
%12 = bitcast [32 x i32]* %11 to i32**
%13 = call i32 @printMaze(i32** %12)
ret i32 0
}

LLVM IR (-O2):
@.str = [25 x i8] c"Starting cell = {%d,%d}\0A\00"
define i32 @main() {
%1 = alloca [32 x [32 x i32]]
%2 = alloca i32
%3 = alloca i32
%4 = bitcast [32 x [32 x i32]]* %1 to i8*
%5 = bitcast i32* %2 to i8*
%6 = bitcast i32* %3 to i8*
%7 = bitcast [32 x [32 x i32]]* %1 to i32**
%8 = call i32 @generateMaze(i32** %7, i32* %2, i32* %3)
%9 = load i32, i32* %2
%10 = load i32, i32* %3
%11 = call i32 @printf(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str, i64 0, i64 0), i32 %9, i32 %10)
%12 = call i32 @printMaze(i32** %7)
ret i32 0
}
/* Variables and functions */
int ADD(int, int);
int /*<<< orphan*/ __VERIFIER_assert(int);
int __VERIFIER_nondet_int();
int main(int argc, char *argv[]) {
  int x, y, result;
  x = __VERIFIER_nondet_int();
  y = __VERIFIER_nondet_int();
  result = ADD(x, y);
  __VERIFIER_assert(result == x + y);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    $0x0,%al
call   1030 <__VERIFIER_nondet_int@plt>
mov    %eax,-0x14(%rbp)
mov    $0x0,%al
call   1030 <__VERIFIER_nondet_int@plt>
mov    %eax,-0x18(%rbp)
mov    -0x14(%rbp),%edi
mov    -0x18(%rbp),%esi
call   1050 <ADD@plt>
mov    %eax,-0x1c(%rbp)
mov    -0x1c(%rbp),%eax
mov    -0x14(%rbp),%ecx
add    -0x18(%rbp),%ecx
cmp    %ecx,%eax
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1040 <__VERIFIER_assert@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %rbx
push   %rax
xor    %eax,%eax
call   1030 <__VERIFIER_nondet_int@plt>
mov    %eax,%ebx
xor    %eax,%eax
call   1030 <__VERIFIER_nondet_int@plt>
mov    %eax,%ebp
mov    %ebx,%edi
mov    %eax,%esi
call   1050 <ADD@plt>
add    %ebx,%ebp
xor    %edi,%edi
cmp    %ebp,%eax
sete   %dil
call   1040 <__VERIFIER_assert@plt>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i8**
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
store i32 %0, i32* %3
store i8** %1, i8*** %4
%8 = call i32 (...) @__VERIFIER_nondet_int()
store i32 %8, i32* %5
%9 = call i32 (...) @__VERIFIER_nondet_int()
store i32 %9, i32* %6
%10 = load i32, i32* %5
%11 = load i32, i32* %6
%12 = call i32 @ADD(i32 %10, i32 %11)
store i32 %12, i32* %7
%13 = load i32, i32* %7
%14 = load i32, i32* %5
%15 = load i32, i32* %6
%16 = add nsw i32 %14, %15
%17 = icmp eq i32 %13, %16
%18 = zext i1 %17 to i32
%19 = call i32 @__VERIFIER_assert(i32 %18)
ret i32 0
}

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 (...) @__VERIFIER_nondet_int()
%4 = tail call i32 (...) @__VERIFIER_nondet_int()
%5 = tail call i32 @ADD(i32 %3, i32 %4)
%6 = add nsw i32 %4, %3
%7 = icmp eq i32 %5, %6
%8 = zext i1 %7 to i32
%9 = tail call i32 @__VERIFIER_assert(i32 %8)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ sched_yield();
void jimi_yield() { sched_yield(); }


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

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

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

LLVM IR (-O2):
define void @jimi_yield() {
%1 = tail call i32 (...) @sched_yield()
ret void
}