xunge/DecIR huggingface dataset:
/* Variables and functions */
int fdt_next_node(void *, int, int *);
int _fdt_node_end_offset(void *fdt, int offset) {
  int depth = 0;
  while ((offset >= 0) && (depth >= 0))
    offset = fdt_next_node(fdt, offset, &depth);
  return offset;
}


x86 assembly (clang, -O0):
<_fdt_node_end_offset>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
movl   $0x0,-0x10(%rbp)
xor    %eax,%eax
cmpl   $0x0,-0xc(%rbp)
mov    %al,-0x11(%rbp)
jl     113f <_fdt_node_end_offset+0x2f>
cmpl   $0x0,-0x10(%rbp)
setge  %al
mov    %al,-0x11(%rbp)
mov    -0x11(%rbp),%al
test   $0x1,%al
jne    114f <_fdt_node_end_offset+0x3f>
jmp    1167 <_fdt_node_end_offset+0x57>
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
lea    -0x10(%rbp),%rdx
call   1030 <fdt_next_node@plt>
mov    %eax,-0xc(%rbp)
jmp    1126 <_fdt_node_end_offset+0x16>
mov    -0xc(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<_fdt_node_end_offset>:
push   %r14
push   %rbx
push   %rax
mov    %esi,%eax
movl   $0x0,0x4(%rsp)
test   %esi,%esi
js     1148 <_fdt_node_end_offset+0x38>
mov    %rdi,%rbx
lea    0x4(%rsp),%r14
nopw   0x0(%rax,%rax,1)
mov    %rbx,%rdi
mov    %eax,%esi
mov    %r14,%rdx
call   1030 <fdt_next_node@plt>
test   %eax,%eax
js     1148 <_fdt_node_end_offset+0x38>
cmpl   $0x0,0x4(%rsp)
jns    1130 <_fdt_node_end_offset+0x20>
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

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

LLVM IR (-O2):
define i32 @_fdt_node_end_offset(i8* %0, i32 %1) {
%3 = alloca i32
%4 = bitcast i32* %3 to i8*
store i32 0, i32* %3
%5 = icmp sgt i32 %1, -1
br i1 %5, label %6, label %13
6: ; preds = %2, %6
%7 = phi i32 [ %8, %6 ], [ %1, %2 ]
%8 = call i32 @fdt_next_node(i8* %0, i32 %7, i32* %3)
%9 = icmp sgt i32 %8, -1
%10 = load i32, i32* %3
%11 = icmp sgt i32 %10, -1
%12 = select i1 %9, i1 %11, i1 false
br i1 %12, label %6, label %13
13: ; preds = %6, %2
%14 = phi i32 [ %1, %2 ], [ %8, %6 ]
ret i32 %14
}
/* Variables and functions */
long abs(long);
long int_gcd(long a, long b) {
  long tmp;
  a = abs(a);
  b = abs(b);
  while (b != 0) {
    tmp = b;
    b = a % b;
    a = tmp;
  }
  return a;
}


x86 assembly (clang, -O0):
<int_gcd>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <abs@plt>
mov    %rax,-0x8(%rbp)
mov    -0x10(%rbp),%rdi
call   1030 <abs@plt>
mov    %rax,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
je     1168 <int_gcd+0x58>
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    113a <int_gcd+0x2a>
mov    -0x8(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<int_gcd>:
mov    %rdi,%rax
neg    %rax
cmovs  %rdi,%rax
test   %rsi,%rsi
je     1145 <int_gcd+0x45>
mov    %rsi,%rdx
neg    %rdx
cmovs  %rsi,%rdx
jmp    112d <int_gcd+0x2d>
nopl   0x0(%rax,%rax,1)
cqto
idiv   %rcx
mov    %rcx,%rax
test   %rdx,%rdx
je     1142 <int_gcd+0x42>
mov    %rdx,%rcx
mov    %rax,%rdx
or     %rcx,%rdx
shr    $0x20,%rdx
jne    1120 <int_gcd+0x20>
xor    %edx,%edx
div    %ecx
jmp    1125 <int_gcd+0x25>
mov    %rcx,%rax
ret

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

LLVM IR (-O2):
define i64 @int_gcd(i64 %0, i64 %1) {
%3 = tail call i64 @llvm.abs.i64(i64 %0, i1 true)
%4 = icmp eq i64 %1, 0
br i1 %4, label %12, label %5
5: ; preds = %2
%6 = tail call i64 @llvm.abs.i64(i64 %1, i1 true)
br label %7
7: ; preds = %5, %7
%8 = phi i64 [ %9, %7 ], [ %3, %5 ]
%9 = phi i64 [ %10, %7 ], [ %6, %5 ]
%10 = srem i64 %8, %9
%11 = icmp eq i64 %10, 0
br i1 %11, label %12, label %7
12: ; preds = %7, %2
%13 = phi i64 [ %3, %2 ], [ %9, %7 ]
ret i64 %13
}
/* Variables and functions */
int /*<<< orphan*/ glmACos3f(float *, float const *);
int /*<<< orphan*/ glmDegrees3f_(float *);
void glmACosD3f(float out[3], const float x[3]) {
  glmACos3f(out, x);
  glmDegrees3f_(out);
}


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

x86 assembly (clang, -O2):
<glmACosD3f>:
push   %rbx
mov    %rdi,%rbx
call   1040 <glmACos3f@plt>
mov    %rbx,%rdi
pop    %rbx
jmp    1030 <glmDegrees3f_@plt>

LLVM IR (-O0):
define void @glmACosD3f(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
%6 = load float*, float** %4
%7 = call i32 @glmACos3f(float* %5, float* %6)
%8 = load float*, float** %3
%9 = call i32 @glmDegrees3f_(float* %8)
ret void
}

LLVM IR (-O2):
define void @glmACosD3f(float* %0, float* %1) {
%3 = tail call i32 @glmACos3f(float* %0, float* %1)
%4 = tail call i32 @glmDegrees3f_(float* %0)
ret void
}
void main_dispose() {}


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

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

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

LLVM IR (-O2):
define void @main_dispose() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ mprintf(char *);
void recputeog(void) { mprintf("EOG\n"); }


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

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

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

LLVM IR (-O2):
@.str = [5 x i8] c"EOG\0A\00"
define void @recputeog() {
%1 = tail call i32 @mprintf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0))
ret void
}
int digitalRead(uint8_t) { return 2; }


x86 assembly (clang, -O0):
<digitalRead>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    $0x2,%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @digitalRead(i32 %0) {
ret i32 2
}
/* Variables and functions */
int /*<<< orphan*/ reduce(unsigned int);
int /*<<< orphan*/ reset_incremental_usage();
void picosat_remove_learned(unsigned percentage) {
  reset_incremental_usage();
  reduce(percentage);
}


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

x86 assembly (clang, -O2):
<picosat_remove_learned>:
push   %rbx
mov    %edi,%ebx
xor    %eax,%eax
call   1030 <reset_incremental_usage@plt>
mov    %ebx,%edi
pop    %rbx
jmp    1040 <reduce@plt>

LLVM IR (-O0):
define void @picosat_remove_learned(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = call i32 (...) @reset_incremental_usage()
%4 = load i32, i32* %2
%5 = call i32 @reduce(i32 %4)
ret void
}

LLVM IR (-O2):
define void @picosat_remove_learned(i32 %0) {
%2 = tail call i32 (...) @reset_incremental_usage()
%3 = tail call i32 @reduce(i32 %0)
ret void
}
void do_final_rodex(void) {}


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

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

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

LLVM IR (-O2):
define void @do_final_rodex() {
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ uint8_t;
typedef int /*<<< orphan*/ ptrdiff_t;

/* Variables and functions */
int /*<<< orphan*/ ff_bfin_put_pixels16uc(int /*<<< orphan*/ *,
                                          int /*<<< orphan*/ const *,
                                          int /*<<< orphan*/ const *,
                                          int /*<<< orphan*/,
                                          int /*<<< orphan*/, int);
void bfin_put_pixels16(uint8_t *block, const uint8_t *pixels,
                       ptrdiff_t line_size, int h) {
  ff_bfin_put_pixels16uc(block, pixels, pixels, line_size, line_size, h);
}


x86 assembly (clang, -O0):
<bfin_put_pixels16>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    %ecx,-0x18(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x10(%rbp),%rdx
mov    -0x14(%rbp),%ecx
mov    -0x14(%rbp),%r8d
mov    -0x18(%rbp),%r9d
call   1030 <ff_bfin_put_pixels16uc@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<bfin_put_pixels16>:
mov    %ecx,%r9d
mov    %edx,%ecx
mov    %rsi,%rdx
mov    %ecx,%r8d
jmp    1030 <ff_bfin_put_pixels16uc@plt>

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

LLVM IR (-O2):
define void @bfin_put_pixels16(i32* %0, i32* %1, i32 %2, i32 %3) {
%5 = tail call i32 @ff_bfin_put_pixels16uc(i32* %0, i32* %1, i32* %1, i32 %2, i32 %2, i32 %3)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf2(char *);
void GenStartCommentLine(void) { printf2("; "); }


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

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

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

LLVM IR (-O2):
@.str = [3 x i8] c"; \00"
define void @GenStartCommentLine() {
%1 = tail call i32 @printf2(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0))
ret void
}
void OOC_Codec_TwofishC_close() {}


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

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

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

LLVM IR (-O2):
define void @OOC_Codec_TwofishC_close() {
ret void
}
/* Variables and functions */
char *strrchr(char *, char);
char *util_get_extension(char *filename) {
  char *s;
  if (filename == NULL) {
    return NULL;
  }
  s = strrchr(filename, '.');
  if (s) {
    return s + 1;
  } else {
    return NULL;
  }
}


x86 assembly (clang, -O0):
<util_get_extension>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
jne    1134 <util_get_extension+0x24>
movq   $0x0,-0x8(%rbp)
jmp    116a <util_get_extension+0x5a>
mov    -0x10(%rbp),%rdi
mov    $0x2e,%esi
call   1030 <strrchr@plt>
mov    %rax,-0x18(%rbp)
cmpq   $0x0,-0x18(%rbp)
je     1162 <util_get_extension+0x52>
mov    -0x18(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x8(%rbp)
jmp    116a <util_get_extension+0x5a>
movq   $0x0,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<util_get_extension>:
test   %rdi,%rdi
je     1133 <util_get_extension+0x23>
push   %rax
mov    $0x2e,%esi
call   1030 <strrchr@plt>
mov    %rax,%rcx
add    $0x1,%rax
test   %rcx,%rcx
cmove  %rcx,%rax
add    $0x8,%rsp
ret
xor    %eax,%eax
ret

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

LLVM IR (-O2):
define i8* @util_get_extension(i8* %0) {
%2 = icmp eq i8* %0, null
br i1 %2, label %8, label %3
3: ; preds = %1
%4 = tail call i8* @strrchr(i8* %0, i8 signext 46)
%5 = icmp eq i8* %4, null
%6 = getelementptr inbounds i8, i8* %4, i64 1
%7 = select i1 %5, i8* null, i8* %6
br label %8
8: ; preds = %3, %1
%9 = phi i8* [ null, %1 ], [ %7, %3 ]
ret i8* %9
}
unsigned char calcQ(unsigned char *X, unsigned char *Y,
                    const unsigned char *C) {
  return (~(*X ^ *Y)) ^ *C;
}


x86 assembly (clang, -O0):
<calcQ>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x8(%rbp),%rax
movzbl (%rax),%eax
mov    -0x10(%rbp),%rcx
movzbl (%rcx),%ecx
xor    %ecx,%eax
xor    $0xffffffff,%eax
mov    -0x18(%rbp),%rcx
movzbl (%rcx),%ecx
xor    %ecx,%eax
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<calcQ>:
mov    (%rdi),%al
xor    (%rsi),%al
xor    (%rdx),%al
not    %al
ret

LLVM IR (-O0):
define zeroext i8 @calcQ(i8* %0, i8* %1, i8* %2) {
%4 = alloca i8*
%5 = alloca i8*
%6 = alloca i8*
store i8* %0, i8** %4
store i8* %1, i8** %5
store i8* %2, i8** %6
%7 = load i8*, i8** %4
%8 = load i8, i8* %7
%9 = zext i8 %8 to i32
%10 = load i8*, i8** %5
%11 = load i8, i8* %10
%12 = zext i8 %11 to i32
%13 = xor i32 %9, %12
%14 = xor i32 %13, -1
%15 = load i8*, i8** %6
%16 = load i8, i8* %15
%17 = zext i8 %16 to i32
%18 = xor i32 %14, %17
%19 = trunc i32 %18 to i8
ret i8 %19
}

LLVM IR (-O2):
define zeroext i8 @calcQ(i8* nocapture %0, i8* nocapture %1, i8* nocapture %2) {
%4 = load i8, i8* %0
%5 = load i8, i8* %1
%6 = load i8, i8* %2
%7 = xor i8 %4, %5
%8 = xor i8 %7, %6
%9 = xor i8 %8, -1
ret i8 %9
}
/* Type definitions */
typedef int /*<<< orphan*/ sqlite3;

/* Variables and functions */
int /*<<< orphan*/ logprintf(int /*<<< orphan*/, char *);
int sqlite_delete_popd(int /*<<< orphan*/ *, char *);
int mode_delete(sqlite3 *db, int argc, char *argv[]) {
  if (argc < 2) {
    logprintf(0, "Missing user\n\n");
    return -1;
  }
  return sqlite_delete_popd(db, argv[1]);
}


x86 assembly (clang, -O0):
<mode_delete>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    %esi,-0x14(%rbp)
mov    %rdx,-0x20(%rbp)
cmpl   $0x2,-0x14(%rbp)
jge    1157 <mode_delete+0x37>
xor    %edi,%edi
lea    0xeba(%rip),%rsi
call   1040 <logprintf@plt>
movl   $0xffffffff,-0x4(%rbp)
jmp    116b <mode_delete+0x4b>
mov    -0x10(%rbp),%rdi
mov    -0x20(%rbp),%rax
mov    0x8(%rax),%rsi
call   1030 <sqlite_delete_popd@plt>
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<mode_delete>:
push   %rax
cmp    $0x1,%esi
jg     113b <mode_delete+0x1b>
lea    0xed3(%rip),%rsi
xor    %edi,%edi
call   1040 <logprintf@plt>
mov    $0xffffffff,%eax
pop    %rcx
ret
mov    0x8(%rdx),%rsi
pop    %rax
jmp    1030 <sqlite_delete_popd@plt>

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

LLVM IR (-O2):
@.str = [15 x i8] c"Missing user\0A\0A\00"
define i32 @mode_delete(i32* %0, i32 %1, i8** nocapture %2) {
%4 = icmp slt i32 %1, 2
br i1 %4, label %5, label %7
5: ; preds = %3
%6 = tail call i32 @logprintf(i32 0, i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0))
br label %11
7: ; preds = %3
%8 = getelementptr inbounds i8*, i8** %2, i64 1
%9 = load i8*, i8** %8
%10 = tail call i32 @sqlite_delete_popd(i32* %0, i8* %9)
br label %11
11: ; preds = %7, %5
%12 = phi i32 [ -1, %5 ], [ %10, %7 ]
ret i32 %12
}
float min(float a, float b) {
  if (a < b)
    return a;
  else
    return b;
}


x86 assembly (clang, -O0):
<min>:
push   %rbp
mov    %rsp,%rbp
movss  %xmm0,-0x8(%rbp)
movss  %xmm1,-0xc(%rbp)
movss  -0x8(%rbp),%xmm1
movss  -0xc(%rbp),%xmm0
ucomiss %xmm1,%xmm0
jbe    1130 <min+0x30>
movss  -0x8(%rbp),%xmm0
movss  %xmm0,-0x4(%rbp)
jmp    113a <min+0x3a>
movss  -0xc(%rbp),%xmm0
movss  %xmm0,-0x4(%rbp)
movss  -0x4(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<min>:
minss  %xmm1,%xmm0
ret

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

LLVM IR (-O2):
define float @min(float %0, float %1) {
%3 = fcmp olt float %0, %1
%4 = select i1 %3, float %0, float %1
ret float %4
}
/* Variables and functions */
int rename(char *, char *);
int wfile_rename_utf8(char *filename1, char *filename2) {
  return (rename(filename1, filename2));
}


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

x86 assembly (clang, -O2):
<wfile_rename_utf8>:
jmp    1030 <rename@plt>

LLVM IR (-O0):
define i32 @wfile_rename_utf8(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 = load i8*, i8** %4
%7 = call i32 @rename(i8* %5, i8* %6)
ret i32 %7
}

LLVM IR (-O2):
define i32 @wfile_rename_utf8(i8* nocapture %0, i8* nocapture %1) {
%3 = tail call i32 @rename(i8* %0, i8* %1)
ret i32 %3
}
/* Type definitions */
typedef int /*<<< orphan*/ uint32_t;
struct wl_proxy {
  int dummy;
};
struct wl_compositor {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ wl_proxy_get_version(struct wl_proxy *);
uint32_t wl_compositor_get_version(struct wl_compositor *wl_compositor) {
  return wl_proxy_get_version((struct wl_proxy *)wl_compositor);
}


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

x86 assembly (clang, -O2):
<wl_compositor_get_version>:
jmp    1030 <wl_proxy_get_version@plt>

LLVM IR (-O0):
%struct.wl_compositor = type { i32 }
%struct.wl_proxy = type { i32 }
define i32 @wl_compositor_get_version(%struct.wl_compositor* %0) {
%2 = alloca %struct.wl_compositor*
store %struct.wl_compositor* %0, %struct.wl_compositor** %2
%3 = load %struct.wl_compositor*, %struct.wl_compositor** %2
%4 = bitcast %struct.wl_compositor* %3 to %struct.wl_proxy*
%5 = call i32 @wl_proxy_get_version(%struct.wl_proxy* %4)
ret i32 %5
}

LLVM IR (-O2):
%struct.wl_compositor = type { i32 }
%struct.wl_proxy = type { i32 }
define i32 @wl_compositor_get_version(%struct.wl_compositor* %0) {
%2 = bitcast %struct.wl_compositor* %0 to %struct.wl_proxy*
%3 = tail call i32 @wl_proxy_get_version(%struct.wl_proxy* %2)
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ output_string(char *);
void output_label_terminator() { output_string(":"); }


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

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

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

LLVM IR (-O2):
@.str = [2 x i8] c":\00"
define void @output_label_terminator() {
%1 = tail call i32 @output_string(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
ret void
}
void foo658(int p) {}


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

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

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

LLVM IR (-O2):
define void @foo658(i32 %0) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ add_deps(char *);
int /*<<< orphan*/ free(char *);
char *process_text(char *);
char *tag_dep(int argc, char *argv[]) {
  if (argc >= 1) {
    char *filename = process_text(argv[0]);
    add_deps(filename);
    free(filename);
  }
  return 0;
}


x86 assembly (clang, -O0):
<tag_dep>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
cmpl   $0x1,-0x4(%rbp)
jl     116b <tag_dep+0x3b>
mov    -0x10(%rbp),%rax
mov    (%rax),%rdi
call   1050 <process_text@plt>
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rdi
call   1040 <add_deps@plt>
mov    -0x18(%rbp),%rdi
call   1030 <free@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<tag_dep>:
test   %edi,%edi
jle    1151 <tag_dep+0x21>
push   %rbx
mov    (%rsi),%rdi
call   1050 <process_text@plt>
mov    %rax,%rbx
mov    %rax,%rdi
call   1040 <add_deps@plt>
mov    %rbx,%rdi
call   1030 <free@plt>
pop    %rbx
xor    %eax,%eax
ret

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

LLVM IR (-O2):
define noalias i8* @tag_dep(i32 %0, i8** nocapture %1) {
%3 = icmp sgt i32 %0, 0
br i1 %3, label %4, label %9
4: ; preds = %2
%5 = load i8*, i8** %1
%6 = tail call i8* @process_text(i8* %5)
%7 = tail call i32 @add_deps(i8* %6)
%8 = tail call i32 @free(i8* %6)
br label %9
9: ; preds = %4, %2
ret i8* null
}
unsigned int x(unsigned int b, unsigned int a, unsigned int *c) {
  unsigned int y = a & 15;
  unsigned int z = y + b;
  if (y == 0)
    *c = z;
  return z;
}


x86 assembly (clang, -O0):
<x>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %rdx,-0x10(%rbp)
mov    -0x8(%rbp),%eax
and    $0xf,%eax
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
add    -0x4(%rbp),%eax
mov    %eax,-0x18(%rbp)
cmpl   $0x0,-0x14(%rbp)
jne    1133 <x+0x33>
mov    -0x18(%rbp),%ecx
mov    -0x10(%rbp),%rax
mov    %ecx,(%rax)
mov    -0x18(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<x>:
mov    %edi,%eax
and    $0xf,%esi
add    %esi,%eax
test   %esi,%esi
je     110c <x+0xc>
ret
mov    %eax,(%rdx)
ret

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

LLVM IR (-O2):
define i32 @x(i32 %0, i32 %1, i32* nocapture writeonly %2) {
%4 = and i32 %1, 15
%5 = add i32 %4, %0
%6 = icmp eq i32 %4, 0
br i1 %6, label %7, label %8
7: ; preds = %3
store i32 %5, i32* %2
br label %8
8: ; preds = %7, %3
ret i32 %5
}
void StreamWriter_WriteBinaryData(struct StreamWriter *self, char *data,
                                  int size) {}


x86 assembly (clang, -O0):
<StreamWriter_WriteBinaryData>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
pop    %rbp
ret

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

LLVM IR (-O0):
%struct.StreamWriter = type opaque
define void @StreamWriter_WriteBinaryData(%struct.StreamWriter* %0, i8* %1, i32 %2) {
%4 = alloca %struct.StreamWriter*
%5 = alloca i8*
%6 = alloca i32
store %struct.StreamWriter* %0, %struct.StreamWriter** %4
store i8* %1, i8** %5
store i32 %2, i32* %6
ret void
}

LLVM IR (-O2):
%struct.StreamWriter = type opaque
define void @StreamWriter_WriteBinaryData(%struct.StreamWriter* nocapture %0, i8* nocapture %1, i32 %2) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, unsigned int);
int _lst_dump_node(const void *datum) {
  printf(" 0x%08x\n", (unsigned int)datum);
  return 0;
}


x86 assembly (clang, -O0):
<_lst_dump_node>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    %eax,%esi
lea    0xed7(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
@.str = [9 x i8] c" 0x%08x\0A\00"
define i32 @_lst_dump_node(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = ptrtoint i8* %3 to i32
%5 = call i32 @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), i32 %4)
ret i32 0
}

LLVM IR (-O2):
@.str = [9 x i8] c" 0x%08x\0A\00"
define i32 @_lst_dump_node(i8* %0) {
%2 = ptrtoint i8* %0 to i64
%3 = trunc i64 %2 to i32
%4 = tail call i32 @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), i32 %3)
ret i32 0
}
/* Variables and functions */
int test_odd_sized_keys();
int test_sequences();
int test_vectors();
int self_test() {
  int ret;
  if ((ret = test_vectors()) < 0)
    return ret;
  if ((ret = test_sequences()) < 0)
    return ret;
  if ((ret = test_odd_sized_keys()) < 0)
    return ret;
  return 1;
}


x86 assembly (clang, -O0):
<self_test>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1050 <test_vectors@plt>
mov    %eax,-0x8(%rbp)
cmp    $0x0,%eax
jge    1156 <self_test+0x26>
mov    -0x8(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    1199 <self_test+0x69>
mov    $0x0,%al
call   1030 <test_sequences@plt>
mov    %eax,-0x8(%rbp)
cmp    $0x0,%eax
jge    1174 <self_test+0x44>
mov    -0x8(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    1199 <self_test+0x69>
mov    $0x0,%al
call   1040 <test_odd_sized_keys@plt>
mov    %eax,-0x8(%rbp)
cmp    $0x0,%eax
jge    1192 <self_test+0x62>
mov    -0x8(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    1199 <self_test+0x69>
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<self_test>:
push   %rax
xor    %eax,%eax
call   1050 <test_vectors@plt>
test   %eax,%eax
js     115a <self_test+0x2a>
xor    %eax,%eax
call   1030 <test_sequences@plt>
test   %eax,%eax
js     115a <self_test+0x2a>
xor    %eax,%eax
call   1040 <test_odd_sized_keys@plt>
mov    %eax,%ecx
test   %eax,%eax
mov    $0x1,%eax
cmovs  %ecx,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @self_test() {
%1 = alloca i32
%2 = alloca i32
%3 = call i32 (...) @test_vectors()
store i32 %3, i32* %2
%4 = icmp slt i32 %3, 0
br i1 %4, label %5, label %7
5: ; preds = %0
%6 = load i32, i32* %2
store i32 %6, i32* %1
br label %18
7: ; preds = %0
%8 = call i32 (...) @test_sequences()
store i32 %8, i32* %2
%9 = icmp slt i32 %8, 0
br i1 %9, label %10, label %12
10: ; preds = %7
%11 = load i32, i32* %2
store i32 %11, i32* %1
br label %18
12: ; preds = %7
%13 = call i32 (...) @test_odd_sized_keys()
store i32 %13, i32* %2
%14 = icmp slt i32 %13, 0
br i1 %14, label %15, label %17
15: ; preds = %12
%16 = load i32, i32* %2
store i32 %16, i32* %1
br label %18
17: ; preds = %12
store i32 1, i32* %1
br label %18
18: ; preds = %17, %15, %10, %5
%19 = load i32, i32* %1
ret i32 %19
}

LLVM IR (-O2):
define i32 @self_test() {
%1 = tail call i32 (...) @test_vectors()
%2 = icmp slt i32 %1, 0
br i1 %2, label %10, label %3
3: ; preds = %0
%4 = tail call i32 (...) @test_sequences()
%5 = icmp slt i32 %4, 0
br i1 %5, label %10, label %6
6: ; preds = %3
%7 = tail call i32 (...) @test_odd_sized_keys()
%8 = icmp slt i32 %7, 0
%9 = select i1 %8, i32 %7, i32 1
br label %10
10: ; preds = %6, %3, %0
%11 = phi i32 [ %1, %0 ], [ %4, %3 ], [ %9, %6 ]
ret i32 %11
}
/* Variables and functions */
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ printf(char *);
void Footer_ism3(void) {
  printf("</blockquote>");
  exit(0);
}


x86 assembly (clang, -O0):
<Footer_ism3>:
push   %rbp
mov    %rsp,%rbp
lea    0xed5(%rip),%rdi
call   1030 <printf@plt>
xor    %edi,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<Footer_ism3>:
push   %rax
lea    0xed8(%rip),%rdi
call   1030 <printf@plt>
xor    %edi,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@.str = [14 x i8] c"</blockquote>\00"
define void @Footer_ism3() {
%1 = call i32 @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0))
%2 = call i32 @exit(i32 0)
unreachable
}

LLVM IR (-O2):
@.str = [14 x i8] c"</blockquote>\00"
define void @Footer_ism3() {
%1 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0))
%2 = tail call i32 @exit(i32 0)
unreachable
}
/* Variables and functions */
int swi10(int volatile);
int swi120(int volatile);
int swi50(int volatile);
int benchmark() {
  volatile int cnt = 0;
  cnt = swi10(cnt);
  cnt = swi50(cnt);
  cnt = swi120(cnt);
  return cnt;
}


x86 assembly (clang, -O0):
<benchmark>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%edi
call   1040 <swi10@plt>
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%edi
call   1030 <swi50@plt>
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%edi
call   1050 <swi120@plt>
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<benchmark>:
push   %rax
movl   $0x0,0x4(%rsp)
mov    0x4(%rsp),%edi
call   1040 <swi10@plt>
mov    %eax,0x4(%rsp)
mov    0x4(%rsp),%edi
call   1030 <swi50@plt>
mov    %eax,0x4(%rsp)
mov    0x4(%rsp),%edi
call   1050 <swi120@plt>
mov    %eax,0x4(%rsp)
mov    0x4(%rsp),%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @benchmark() {
%1 = alloca i32
store volatile i32 0, i32* %1
%2 = load volatile i32, i32* %1
%3 = call i32 @swi10(i32 %2)
store volatile i32 %3, i32* %1
%4 = load volatile i32, i32* %1
%5 = call i32 @swi50(i32 %4)
store volatile i32 %5, i32* %1
%6 = load volatile i32, i32* %1
%7 = call i32 @swi120(i32 %6)
store volatile i32 %7, i32* %1
%8 = load volatile i32, i32* %1
ret i32 %8
}

LLVM IR (-O2):
define i32 @benchmark() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
store volatile i32 0, i32* %1
%3 = load volatile i32, i32* %1
%4 = tail call i32 @swi10(i32 %3)
store volatile i32 %4, i32* %1
%5 = load volatile i32, i32* %1
%6 = tail call i32 @swi50(i32 %5)
store volatile i32 %6, i32* %1
%7 = load volatile i32, i32* %1
%8 = tail call i32 @swi120(i32 %7)
store volatile i32 %8, i32* %1
%9 = load volatile i32, i32* %1
ret i32 %9
}
/* Variables and functions */
scalar_t__ strchr(char *, int);
int my_chchk(int ch) { return strchr("YyNn", ch) ? 1 : 0; }


x86 assembly (clang, -O0):
<my_chchk>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%esi
lea    0xedb(%rip),%rdi
call   1030 <strchr@plt>
mov    %rax,%rdx
xor    %eax,%eax
mov    $0x1,%ecx
cmp    $0x0,%rdx
cmovne %ecx,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<my_chchk>:
push   %rax
mov    %edi,%esi
lea    0xee6(%rip),%rdi
call   1030 <strchr@plt>
xor    %ecx,%ecx
test   %rax,%rax
setne  %cl
mov    %ecx,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [5 x i8] c"YyNn\00"
define i32 @my_chchk(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = call i64 @strchr(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i32 %3)
%5 = icmp ne i64 %4, 0
%6 = zext i1 %5 to i64
%7 = select i1 %5, i32 1, i32 0
ret i32 %7
}

LLVM IR (-O2):
@.str = [5 x i8] c"YyNn\00"
define i32 @my_chchk(i32 %0) {
%2 = tail call i64 @strchr(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i32 %0)
%3 = icmp ne i64 %2, 0
%4 = zext i1 %3 to i32
ret i32 %4
}
void swap(char *s, int a, int b) {
  char t;
  t = s[a];
  s[a] = s[b];
  s[b] = t;
}


x86 assembly (clang, -O0):
<swap>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
mov    (%rax,%rcx,1),%al
mov    %al,-0x11(%rbp)
mov    -0x8(%rbp),%rax
movslq -0x10(%rbp),%rcx
mov    (%rax,%rcx,1),%dl
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
mov    %dl,(%rax,%rcx,1)
mov    -0x11(%rbp),%dl
mov    -0x8(%rbp),%rax
movslq -0x10(%rbp),%rcx
mov    %dl,(%rax,%rcx,1)
pop    %rbp
ret

x86 assembly (clang, -O2):
<swap>:
movslq %esi,%rax
mov    (%rdi,%rax,1),%sil
movslq %edx,%rdx
mov    (%rdi,%rdx,1),%cl
mov    %cl,(%rdi,%rax,1)
mov    %sil,(%rdi,%rdx,1)
ret

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

LLVM IR (-O2):
define void @swap(i8* nocapture %0, i32 %1, i32 %2) {
%4 = sext i32 %1 to i64
%5 = getelementptr inbounds i8, i8* %0, i64 %4
%6 = load i8, i8* %5
%7 = sext i32 %2 to i64
%8 = getelementptr inbounds i8, i8* %0, i64 %7
%9 = load i8, i8* %8
store i8 %9, i8* %5
store i8 %6, i8* %8
ret void
}
/* Variables and functions */
int strcmp(char const *, char const *);
int str_equal(const char *str1, const char *str2) {
  int diff = strcmp(str1, str2);
  return diff == 0 ? 1 : 0;
}


x86 assembly (clang, -O0):
<str_equal>:
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 <strcmp@plt>
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%edx
xor    %eax,%eax
mov    $0x1,%ecx
cmp    $0x0,%edx
cmove  %ecx,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<str_equal>:
push   %rax
call   1030 <strcmp@plt>
xor    %ecx,%ecx
test   %eax,%eax
sete   %cl
mov    %ecx,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @str_equal(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 = load i8*, i8** %4
%8 = call i32 @strcmp(i8* %6, i8* %7)
store i32 %8, i32* %5
%9 = load i32, i32* %5
%10 = icmp eq i32 %9, 0
%11 = zext i1 %10 to i64
%12 = select i1 %10, i32 1, i32 0
ret i32 %12
}

LLVM IR (-O2):
define i32 @str_equal(i8* nocapture %0, i8* nocapture %1) {
%3 = tail call i32 @strcmp(i8* dereferenceable(1) %0, i8* dereferenceable(1) %1)
%4 = icmp eq i32 %3, 0
%5 = zext i1 %4 to i32
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ THAtomicCompareAndSwap(int volatile *, int, int);
void THAtomicSet(int volatile *a, int newvalue) {
  int oldvalue;
  do {
    oldvalue = *a;
  } while (!THAtomicCompareAndSwap(a, oldvalue, newvalue));
}


x86 assembly (clang, -O0):
<THAtomicSet>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%eax
mov    %eax,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%esi
mov    -0xc(%rbp),%edx
call   1030 <THAtomicCompareAndSwap@plt>
cmp    $0x0,%eax
setne  %al
xor    $0xff,%al
test   $0x1,%al
jne    111f <THAtomicSet+0xf>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<THAtomicSet>:
push   %rbp
push   %rbx
push   %rax
mov    %esi,%ebp
mov    %rdi,%rbx
nopl   0x0(%rax,%rax,1)
mov    (%rbx),%esi
mov    %rbx,%rdi
mov    %ebp,%edx
call   1030 <THAtomicCompareAndSwap@plt>
test   %eax,%eax
je     1120 <THAtomicSet+0x10>
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

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

LLVM IR (-O2):
define void @THAtomicSet(i32* %0, i32 %1) {
br label %3
3: ; preds = %3, %2
%4 = load volatile i32, i32* %0
%5 = tail call i32 @THAtomicCompareAndSwap(i32* %0, i32 %4, i32 %1)
%6 = icmp eq i32 %5, 0
br i1 %6, label %3, label %7
7: ; preds = %3
ret void
}
/* Type definitions */
typedef scalar_t__ ptrdiff_t;

/* Variables and functions */
size_t objp_to_size(void *ptr) {
  size_t ptr_rep;
  ptrdiff_t distance;
  distance = (ptrdiff_t)(((unsigned char *)ptr) - ((unsigned char *)NULL));
  ptr_rep = (size_t)distance;
  return ((size_t)ptr_rep);
}


x86 assembly (clang, -O0):
<objp_to_size>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
sub    $0x0,%rax
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<objp_to_size>:
mov    %rdi,%rax
ret

LLVM IR (-O0):
define i64 @objp_to_size(i8* %0) {
%2 = alloca i8*
%3 = alloca i64
%4 = alloca i64
store i8* %0, i8** %2
%5 = load i8*, i8** %2
%6 = ptrtoint i8* %5 to i64
%7 = sub i64 %6, 0
store i64 %7, i64* %4
%8 = load i64, i64* %4
store i64 %8, i64* %3
%9 = load i64, i64* %3
ret i64 %9
}

LLVM IR (-O2):
define i64 @objp_to_size(i8* %0) {
%2 = ptrtoint i8* %0 to i64
ret i64 %2
}
void ble_evt_sm_bond_status(const struct ble_msg_sm_bond_status_evt_t *msg) {}


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

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

LLVM IR (-O0):
%struct.ble_msg_sm_bond_status_evt_t = type opaque
define void @ble_evt_sm_bond_status(%struct.ble_msg_sm_bond_status_evt_t* %0) {
%2 = alloca %struct.ble_msg_sm_bond_status_evt_t*
store %struct.ble_msg_sm_bond_status_evt_t* %0, %struct.ble_msg_sm_bond_status_evt_t** %2
ret void
}

LLVM IR (-O2):
%struct.ble_msg_sm_bond_status_evt_t = type opaque
define void @ble_evt_sm_bond_status(%struct.ble_msg_sm_bond_status_evt_t* nocapture %0) {
ret void
}
/* Variables and functions */
int fl_fread(unsigned char *, int, int, void *);
int fl_fgetc(void *f) {
  int res;
  unsigned char data = 0;
  res = fl_fread(&data, 1, 1, f);
  if (res == 1)
    return (int)data;
  else
    return res;
}


x86 assembly (clang, -O0):
<fl_fgetc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
movb   $0x0,-0x15(%rbp)
mov    -0x10(%rbp),%rcx
lea    -0x15(%rbp),%rdi
mov    $0x1,%edx
mov    %edx,%esi
call   1030 <fl_fread@plt>
mov    %eax,-0x14(%rbp)
cmpl   $0x1,-0x14(%rbp)
jne    114d <fl_fgetc+0x3d>
movzbl -0x15(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    1153 <fl_fgetc+0x43>
mov    -0x14(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fl_fgetc>:
push   %rax
mov    %rdi,%rcx
movb   $0x0,0x7(%rsp)
lea    0x7(%rsp),%rdi
mov    $0x1,%esi
mov    $0x1,%edx
call   1030 <fl_fread@plt>
cmp    $0x1,%eax
movzbl 0x7(%rsp),%ecx
cmove  %ecx,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
define i32 @fl_fgetc(i8* %0) {
%2 = alloca i8
store i8 0, i8* %2
%3 = call i32 @fl_fread(i8* %2, i32 1, i32 1, i8* %0)
%4 = icmp eq i32 %3, 1
%5 = load i8, i8* %2
%6 = zext i8 %5 to i32
%7 = select i1 %4, i32 %6, i32 %3
ret i32 %7
}
/* Type definitions */
typedef int int8_t;
typedef int /*<<< orphan*/ input;

/* Variables and functions */
int /*<<< orphan*/ test_rebase(int, int *, int, int, int *, int /*<<< orphan*/);
void test_second_base_is_negative(void) {
  int8_t input[] = {1};
  int8_t expected[] = {0};
  test_rebase(2, input, (sizeof(input) / sizeof(input[0])), -7, expected, 0);
}


x86 assembly (clang, -O0):
<test_second_base_is_negative>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    0xed2(%rip),%eax
mov    %eax,-0x4(%rbp)
lea    -0x8(%rbp),%rdi
xor    %esi,%esi
mov    $0x4,%edx
call   1030 <memset@plt>
lea    -0x4(%rbp),%rsi
lea    -0x8(%rbp),%r8
mov    $0x2,%edi
mov    $0x1,%edx
mov    $0xfffffff9,%ecx
xor    %r9d,%r9d
call   1040 <test_rebase@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_second_base_is_negative>:
push   %rax
movl   $0x1,0x4(%rsp)
movl   $0x0,(%rsp)
lea    0x4(%rsp),%rsi
mov    %rsp,%r8
mov    $0x2,%edi
mov    $0x1,%edx
mov    $0xfffffff9,%ecx
xor    %r9d,%r9d
call   1030 <test_rebase@plt>
pop    %rax
ret

LLVM IR (-O0):
@__const.test_second_base_is_negative.input = [1 x i32] [i32 1]
define void @test_second_base_is_negative() {
%1 = alloca [1 x i32]
%2 = alloca [1 x i32]
%3 = bitcast [1 x i32]* %1 to i8*
%4 = bitcast [1 x i32]* %2 to i8*
%5 = getelementptr inbounds [1 x i32], [1 x i32]* %1, i64 0, i64 0
%6 = getelementptr inbounds [1 x i32], [1 x i32]* %2, i64 0, i64 0
%7 = call i32 @test_rebase(i32 2, i32* %5, i32 1, i32 -7, i32* %6, i32 0)
ret void
}

LLVM IR (-O2):
define void @test_second_base_is_negative() {
%1 = alloca [1 x i32]
%2 = alloca [1 x i32]
%3 = bitcast [1 x i32]* %1 to i8*
%4 = getelementptr inbounds [1 x i32], [1 x i32]* %1, i64 0, i64 0
store i32 1, i32* %4
%5 = bitcast [1 x i32]* %2 to i8*
%6 = getelementptr inbounds [1 x i32], [1 x i32]* %2, i64 0, i64 0
store i32 0, i32* %6
%7 = call i32 @test_rebase(i32 2, i32* %4, i32 1, i32 -7, i32* %6, i32 0)
ret void
}
short int isNumber(char chrsource) {
  if ((chrsource >= 48) && (chrsource <= 57))
    return 1;
  return 0;
}


x86 assembly (clang, -O0):
<isNumber>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x3(%rbp)
movsbl -0x3(%rbp),%eax
cmp    $0x30,%eax
jl     112f <isNumber+0x2f>
movsbl -0x3(%rbp),%eax
cmp    $0x39,%eax
jg     112f <isNumber+0x2f>
movw   $0x1,-0x2(%rbp)
jmp    1135 <isNumber+0x35>
movw   $0x0,-0x2(%rbp)
movswl -0x2(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<isNumber>:
add    $0xd0,%dil
xor    %eax,%eax
cmp    $0xa,%dil
setb   %al
ret

LLVM IR (-O0):
define signext i16 @isNumber(i8 signext %0) {
%2 = alloca i16
%3 = alloca i8
store i8 %0, i8* %3
%4 = load i8, i8* %3
%5 = sext i8 %4 to i32
%6 = icmp sge i32 %5, 48
br i1 %6, label %7, label %12
7: ; preds = %1
%8 = load i8, i8* %3
%9 = sext i8 %8 to i32
%10 = icmp sle i32 %9, 57
br i1 %10, label %11, label %12
11: ; preds = %7
store i16 1, i16* %2
br label %13
12: ; preds = %7, %1
store i16 0, i16* %2
br label %13
13: ; preds = %12, %11
%14 = load i16, i16* %2
ret i16 %14
}

LLVM IR (-O2):
define signext i16 @isNumber(i8 signext %0) {
%2 = add i8 %0, -48
%3 = icmp ult i8 %2, 10
%4 = zext i1 %3 to i16
ret i16 %4
}
unsigned char slapi_unsetbit_uchar(unsigned char f, unsigned char bitnum) {
  unsigned char t;
  t = f & (~((unsigned char)1 << bitnum));
  return (t);
}


x86 assembly (clang, -O0):
<slapi_unsetbit_uchar>:
push   %rbp
mov    %rsp,%rbp
mov    %sil,%al
mov    %dil,%cl
mov    %cl,-0x1(%rbp)
mov    %al,-0x2(%rbp)
movzbl -0x1(%rbp),%eax
movzbl -0x2(%rbp),%ecx
mov    $0x1,%edx
shl    %cl,%edx
mov    %edx,%ecx
xor    $0xffffffff,%ecx
and    %ecx,%eax
mov    %al,-0x3(%rbp)
movzbl -0x3(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<slapi_unsetbit_uchar>:
mov    %esi,%ecx
mov    $0x1,%eax
shl    %cl,%eax
not    %al
and    %dil,%al
ret

LLVM IR (-O0):
define zeroext i8 @slapi_unsetbit_uchar(i8 zeroext %0, i8 zeroext %1) {
%3 = alloca i8
%4 = alloca i8
%5 = alloca i8
store i8 %0, i8* %3
store i8 %1, i8* %4
%6 = load i8, i8* %3
%7 = zext i8 %6 to i32
%8 = load i8, i8* %4
%9 = zext i8 %8 to i32
%10 = shl i32 1, %9
%11 = xor i32 %10, -1
%12 = and i32 %7, %11
%13 = trunc i32 %12 to i8
store i8 %13, i8* %5
%14 = load i8, i8* %5
ret i8 %14
}

LLVM IR (-O2):
define zeroext i8 @slapi_unsetbit_uchar(i8 zeroext %0, i8 zeroext %1) {
%3 = zext i8 %1 to i32
%4 = shl nuw i32 1, %3
%5 = trunc i32 %4 to i8
%6 = xor i8 %5, -1
%7 = and i8 %6, %0
ret i8 %7
}
__attribute__((always_)) void __nop(void) { __asm("  nop"); }


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

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

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

LLVM IR (-O2):
define void @__nop() {
tail call void asm sideeffect " nop", "~{dirflag},~{fpsr},~{flags}"()
ret void
}
/* Variables and functions */
int kevent_add_del_socket(int, int);
int kevent_del_socket(int socket) { return kevent_add_del_socket(socket, 1); }


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

x86 assembly (clang, -O2):
<kevent_del_socket>:
mov    $0x1,%esi
jmp    1030 <kevent_add_del_socket@plt>

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

LLVM IR (-O2):
define i32 @kevent_del_socket(i32 %0) {
%2 = tail call i32 @kevent_add_del_socket(i32 %0, i32 1)
ret i32 %2
}