xunge/DecIR huggingface dataset:
void __attribute__((weak)) dma1_stream2_isr() { debug_handler(__FUNCTION__); }


x86 assembly (clang, -O0):
<dma1_stream2_isr>:
push   %rbp
mov    %rsp,%rbp
lea    0xee5(%rip),%rdi
mov    $0x0,%al
call   1030 <debug_handler@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<dma1_stream2_isr>:
lea    0xee9(%rip),%rdi
xor    %eax,%eax
jmp    1030 <debug_handler@plt>

LLVM IR (-O0):
@__FUNCTION__.dma1_stream2_isr = [17 x i8] c"dma1_stream2_isr\00"
define weak void @dma1_stream2_isr() {
%1 = call i32 (i8*, ...) bitcast (i32 (...)* @debug_handler to i32 (i8*, ...)*)(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @__FUNCTION__.dma1_stream2_isr, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@__FUNCTION__.dma1_stream2_isr = [17 x i8] c"dma1_stream2_isr\00"
define weak void @dma1_stream2_isr() {
%1 = tail call i32 (i8*, ...) bitcast (i32 (...)* @debug_handler to i32 (i8*, ...)*)(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @__FUNCTION__.dma1_stream2_isr, i64 0, i64 0))
ret void
}
/* Variables and functions */
int euler_problem_2();
int /*<<< orphan*/ printf(char *, int);
int main() {
  printf("%d\n", euler_problem_2());
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x0,%al
call   1040 <euler_problem_2@plt>
mov    %eax,%esi
lea    0xec1(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1040 <euler_problem_2@plt>
lea    0xed1(%rip),%rdi
mov    %eax,%esi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [4 x i8] c"%d\0A\00"
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 (...) @euler_problem_2()
%3 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %2)
ret i32 0
}

LLVM IR (-O2):
@.str = [4 x i8] c"%d\0A\00"
define i32 @main() {
%1 = tail call i32 (...) @euler_problem_2()
%2 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %1)
ret i32 0
}
/* Variables and functions */
int mysum(int, int, int, int, int);
int /*<<< orphan*/ printf(char *, int);
main() {
  int res;
  res = mysum(4, 2, 2, 1, 5);
  printf("result = %d\n", res);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x4,%edi
mov    $0x2,%edx
mov    $0x1,%ecx
mov    $0x5,%r8d
mov    %edx,%esi
call   1040 <mysum@plt>
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%esi
lea    0xeaf(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    $0x4,%edi
mov    $0x2,%esi
mov    $0x2,%edx
mov    $0x1,%ecx
mov    $0x5,%r8d
call   1040 <mysum@plt>
lea    0xeb9(%rip),%rdi
mov    %eax,%esi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [13 x i8] c"result = %d\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = call i32 @mysum(i32 4, i32 2, i32 2, i32 1, i32 5)
store i32 %2, i32* %1
%3 = load i32, i32* %1
%4 = call i32 @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0), i32 %3)
ret i32 0
}

LLVM IR (-O2):
@.str = [13 x i8] c"result = %d\0A\00"
define i32 @main() {
%1 = tail call i32 @mysum(i32 4, i32 2, i32 2, i32 1, i32 5)
%2 = tail call i32 @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0), i32 %1)
ret i32 0
}
/* Type definitions */
struct stream {
  int dummy;
};

/* Variables and functions */
int efp_stream_parse_int(struct stream *, int *);
int tok_int(struct stream *stream, int *val) {
  return efp_stream_parse_int(stream, val);
}


x86 assembly (clang, -O0):
<tok_int>:
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 <efp_stream_parse_int@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<tok_int>:
jmp    1030 <efp_stream_parse_int@plt>

LLVM IR (-O0):
%struct.stream = type { i32 }
define i32 @tok_int(%struct.stream* %0, i32* %1) {
%3 = alloca %struct.stream*
%4 = alloca i32*
store %struct.stream* %0, %struct.stream** %3
store i32* %1, i32** %4
%5 = load %struct.stream*, %struct.stream** %3
%6 = load i32*, i32** %4
%7 = call i32 @efp_stream_parse_int(%struct.stream* %5, i32* %6)
ret i32 %7
}

LLVM IR (-O2):
%struct.stream = type { i32 }
define i32 @tok_int(%struct.stream* %0, i32* %1) {
%3 = tail call i32 @efp_stream_parse_int(%struct.stream* %0, i32* %1)
ret i32 %3
}
/* Type definitions */
typedef int /*<<< orphan*/ ssize_t;

/* Variables and functions */
int /*<<< orphan*/ gendep__register_read(int, void *, size_t);
int /*<<< orphan*/ real_read(int, void *, size_t);
ssize_t __read(int fd, void *buf, size_t count) {
  gendep__register_read(fd, buf, count);
  return (real_read(fd, buf, count));
}


x86 assembly (clang, -O0):
<__read>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
call   1030 <gendep__register_read@plt>
mov    -0x4(%rbp),%edi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
call   1040 <real_read@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<__read>:
push   %rbp
push   %r14
push   %rbx
mov    %rdx,%r14
mov    %rsi,%rbx
mov    %edi,%ebp
call   1030 <gendep__register_read@plt>
mov    %ebp,%edi
mov    %rbx,%rsi
mov    %r14,%rdx
pop    %rbx
pop    %r14
pop    %rbp
jmp    1040 <real_read@plt>

LLVM IR (-O0):
define i32 @__read(i32 %0, i8* %1, i64 %2) {
%4 = alloca i32
%5 = alloca i8*
%6 = alloca i64
store i32 %0, i32* %4
store i8* %1, i8** %5
store i64 %2, i64* %6
%7 = load i32, i32* %4
%8 = load i8*, i8** %5
%9 = load i64, i64* %6
%10 = call i32 @gendep__register_read(i32 %7, i8* %8, i64 %9)
%11 = load i32, i32* %4
%12 = load i8*, i8** %5
%13 = load i64, i64* %6
%14 = call i32 @real_read(i32 %11, i8* %12, i64 %13)
ret i32 %14
}

LLVM IR (-O2):
define i32 @__read(i32 %0, i8* %1, i64 %2) {
%4 = tail call i32 @gendep__register_read(i32 %0, i8* %1, i64 %2)
%5 = tail call i32 @real_read(i32 %0, i8* %1, i64 %2)
ret i32 %5
}
unsigned long GrOffScreen1BPPColorTranslate(void *pvDisplayData,
                                            unsigned long ulValue) {
  ;
  return (((((((ulValue)&0x00ff0000) >> 16) * 19661) +
            ((((ulValue)&0x0000ff00) >> 8) * 38666) +
            (((ulValue)&0x000000ff) * 7209)) /
           (65536 * 128)));
}


x86 assembly (clang, -O0):
<GrOffScreen1BPPColorTranslate>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
and    $0xff0000,%rax
shr    $0x10,%rax
imul   $0x4ccd,%rax,%rax
mov    -0x10(%rbp),%rcx
and    $0xff00,%rcx
shr    $0x8,%rcx
imul   $0x970a,%rcx,%rcx
add    %rcx,%rax
mov    -0x10(%rbp),%rcx
and    $0xff,%rcx
imul   $0x1c29,%rcx,%rcx
add    %rcx,%rax
shr    $0x17,%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<GrOffScreen1BPPColorTranslate>:
mov    %rsi,%rax
movzbl %ah,%ecx
movzbl %al,%edx
shr    $0x10,%eax
movzbl %al,%eax
imul   $0x4ccd,%rax,%rsi
imul   $0x970a,%rcx,%rcx
imul   $0x1c29,%rdx,%rax
add    %rcx,%rax
add    %rsi,%rax
shr    $0x17,%rax
ret

LLVM IR (-O0):
define i64 @GrOffScreen1BPPColorTranslate(i8* %0, i64 %1) {
%3 = alloca i8*
%4 = alloca i64
store i8* %0, i8** %3
store i64 %1, i64* %4
%5 = load i64, i64* %4
%6 = and i64 %5, 16711680
%7 = lshr i64 %6, 16
%8 = mul i64 %7, 19661
%9 = load i64, i64* %4
%10 = and i64 %9, 65280
%11 = lshr i64 %10, 8
%12 = mul i64 %11, 38666
%13 = add i64 %8, %12
%14 = load i64, i64* %4
%15 = and i64 %14, 255
%16 = mul i64 %15, 7209
%17 = add i64 %13, %16
%18 = udiv i64 %17, 8388608
ret i64 %18
}

LLVM IR (-O2):
define i64 @GrOffScreen1BPPColorTranslate(i8* nocapture readnone %0, i64 %1) {
%3 = lshr i64 %1, 16
%4 = and i64 %3, 255
%5 = mul nuw nsw i64 %4, 19661
%6 = lshr i64 %1, 8
%7 = and i64 %6, 255
%8 = mul nuw nsw i64 %7, 38666
%9 = and i64 %1, 255
%10 = mul nuw nsw i64 %9, 7209
%11 = add nuw nsw i64 %8, %10
%12 = add nuw nsw i64 %11, %5
%13 = lshr i64 %12, 23
ret i64 %13
}
/* Variables and functions */
char *_xdg_mime_unalias_mime_type(char const *);
scalar_t__ strcmp(char const *, char const *);
int _xdg_mime_mime_type_equal(const char *mime_a, const char *mime_b) {
  const char *unalias_a, *unalias_b;
  unalias_a = _xdg_mime_unalias_mime_type(mime_a);
  unalias_b = _xdg_mime_unalias_mime_type(mime_b);
  if (strcmp(unalias_a, unalias_b) == 0)
    return 1;
  return 0;
}


x86 assembly (clang, -O0):
<_xdg_mime_mime_type_equal>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    -0x10(%rbp),%rdi
call   1040 <_xdg_mime_unalias_mime_type@plt>
mov    %rax,-0x20(%rbp)
mov    -0x18(%rbp),%rdi
call   1040 <_xdg_mime_unalias_mime_type@plt>
mov    %rax,-0x28(%rbp)
mov    -0x20(%rbp),%rdi
mov    -0x28(%rbp),%rsi
call   1030 <strcmp@plt>
cmp    $0x0,%rax
jne    116d <_xdg_mime_mime_type_equal+0x4d>
movl   $0x1,-0x4(%rbp)
jmp    1174 <_xdg_mime_mime_type_equal+0x54>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<_xdg_mime_mime_type_equal>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%r14
call   1040 <_xdg_mime_unalias_mime_type@plt>
mov    %rax,%rbx
mov    %r14,%rdi
call   1040 <_xdg_mime_unalias_mime_type@plt>
mov    %rbx,%rdi
mov    %rax,%rsi
call   1030 <strcmp@plt>
xor    %ecx,%ecx
test   %rax,%rax
sete   %cl
mov    %ecx,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

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

LLVM IR (-O2):
define i32 @_xdg_mime_mime_type_equal(i8* %0, i8* %1) {
%3 = tail call i8* @_xdg_mime_unalias_mime_type(i8* %0)
%4 = tail call i8* @_xdg_mime_unalias_mime_type(i8* %1)
%5 = tail call i64 @strcmp(i8* %3, i8* %4)
%6 = icmp eq i64 %5, 0
%7 = zext i1 %6 to i32
ret i32 %7
}
/* Variables and functions */
int osvm_main(int, char const **);
int main(int argc, const char **argv) { return osvm_main(argc, argv); }


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    -0x8(%rbp),%edi
mov    -0x10(%rbp),%rsi
call   1030 <osvm_main@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
jmp    1030 <osvm_main@plt>

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 = load i32, i32* %4
%7 = load i8**, i8*** %5
%8 = call i32 @osvm_main(i32 %6, i8** %7)
ret i32 %8
}

LLVM IR (-O2):
define i32 @main(i32 %0, i8** %1) {
%3 = tail call i32 @osvm_main(i32 %0, i8** %1)
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int pa_silence_cache_done() {
  printf("NOT IMPLEMENTED:"
         "pa_silence_cache_done"
         "\n");
}


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

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

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

LLVM IR (-O2):
@str = [38 x i8] c"NOT IMPLEMENTED:pa_silence_cache_done\00"
define i32 @pa_silence_cache_done() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([38 x i8], [38 x i8]* @str, i64 0, i64 0))
ret i32 undef
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int, int);
int /*<<< orphan*/ swap(int, int);
int main(void) {
  int a = 2, b = 4;
  swap(a, b);
  printf("a=%i, b=%i\n", a, b);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x2,-0x8(%rbp)
movl   $0x4,-0xc(%rbp)
mov    -0x8(%rbp),%edi
mov    -0xc(%rbp),%esi
call   1040 <swap@plt>
mov    -0x8(%rbp),%esi
mov    -0xc(%rbp),%edx
lea    0xeab(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    $0x2,%edi
mov    $0x4,%esi
call   1040 <swap@plt>
lea    0xec9(%rip),%rdi
mov    $0x2,%esi
mov    $0x4,%edx
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [12 x i8] c"a=%i, b=%i\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
store i32 0, i32* %1
store i32 2, i32* %2
store i32 4, i32* %3
%4 = load i32, i32* %2
%5 = load i32, i32* %3
%6 = call i32 @swap(i32 %4, i32 %5)
%7 = load i32, i32* %2
%8 = load i32, i32* %3
%9 = call i32 @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i32 %7, i32 %8)
ret i32 0
}

LLVM IR (-O2):
@.str = [12 x i8] c"a=%i, b=%i\0A\00"
define i32 @main() {
%1 = tail call i32 @swap(i32 2, i32 4)
%2 = tail call i32 @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i32 2, i32 4)
ret i32 0
}
/* Variables and functions */
int sched_getcpu();
int main(void) { return sched_getcpu(); }


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

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

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 (...) @sched_getcpu()
ret i32 %2
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @sched_getcpu()
ret i32 %1
}
int test_imm_A5int16_mem(short *val) {
  return ((*val) & (-0xA5 << 0)) ? -20 : -40;
}


x86 assembly (clang, -O0):
<test_imm_A5int16_mem>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movswl (%rax),%edx
and    $0xffffff5b,%edx
mov    $0xffffffd8,%eax
mov    $0xffffffec,%ecx
cmp    $0x0,%edx
cmovne %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_imm_A5int16_mem>:
movzwl (%rdi),%eax
test   $0xff5b,%eax
mov    $0xffffffd8,%ecx
mov    $0xffffffec,%eax
cmove  %ecx,%eax
ret

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

LLVM IR (-O2):
define i32 @test_imm_A5int16_mem(i16* nocapture %0) {
%2 = load i16, i16* %0
%3 = and i16 %2, -165
%4 = icmp eq i16 %3, 0
%5 = select i1 %4, i32 -40, i32 -20
ret i32 %5
}
/* Type definitions */
typedef int /*<<< orphan*/ uint32_t;

/* Variables and functions */
int /*<<< orphan*/ by_at(int /*<<< orphan*/);
int /*<<< orphan*/ sub();
void sub_by_at(uint32_t x) {
  by_at(x);
  sub();
}


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

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

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

LLVM IR (-O2):
define void @sub_by_at(i32 %0) {
%2 = tail call i32 @by_at(i32 %0)
%3 = tail call i32 (...) @sub()
ret void
}
void i2d_PKCS8_PRIV_KEY_INFO(void) {}


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

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

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

LLVM IR (-O2):
define void @i2d_PKCS8_PRIV_KEY_INFO() {
ret void
}
int test_imm_4Euint32_mem(unsigned int *val) {
  return ((*val) & (0x4E << 0)) ? -20 : -40;
}


x86 assembly (clang, -O0):
<test_imm_4Euint32_mem>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%edx
and    $0x4e,%edx
mov    $0xffffffd8,%eax
mov    $0xffffffec,%ecx
cmp    $0x0,%edx
cmovne %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_imm_4Euint32_mem>:
testb  $0x4e,(%rdi)
mov    $0xffffffd8,%ecx
mov    $0xffffffec,%eax
cmove  %ecx,%eax
ret

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

LLVM IR (-O2):
define i32 @test_imm_4Euint32_mem(i32* nocapture %0) {
%2 = load i32, i32* %0
%3 = and i32 %2, 78
%4 = icmp eq i32 %3, 0
%5 = select i1 %4, i32 -40, i32 -20
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ gen_assignment_stmt();
int /*<<< orphan*/ gen_if_stmt(unsigned int);
int rand();
void gen_stmt(unsigned int level) {
  if (!level || rand() % 100 < 5) {
    gen_assignment_stmt();
    return;
  }
  gen_if_stmt(level);
}


x86 assembly (clang, -O0):
<gen_stmt>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
cmpl   $0x0,-0x4(%rbp)
je     115d <gen_stmt+0x2d>
mov    $0x0,%al
call   1050 <rand@plt>
mov    $0x64,%ecx
cltd
idiv   %ecx
cmp    $0x5,%edx
jge    1169 <gen_stmt+0x39>
mov    $0x0,%al
call   1040 <gen_assignment_stmt@plt>
jmp    1171 <gen_stmt+0x41>
mov    -0x4(%rbp),%edi
call   1030 <gen_if_stmt@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<gen_stmt>:
push   %rbx
test   %edi,%edi
je     115e <gen_stmt+0x2e>
mov    %edi,%ebx
xor    %eax,%eax
call   1050 <rand@plt>
cltq
imul   $0x51eb851f,%rax,%rcx
mov    %rcx,%rdx
shr    $0x3f,%rdx
sar    $0x25,%rcx
add    %edx,%ecx
imul   $0x64,%ecx,%ecx
sub    %ecx,%eax
cmp    $0x4,%eax
jg     1166 <gen_stmt+0x36>
xor    %eax,%eax
pop    %rbx
jmp    1040 <gen_assignment_stmt@plt>
mov    %ebx,%edi
pop    %rbx
jmp    1030 <gen_if_stmt@plt>

LLVM IR (-O0):
define void @gen_stmt(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = icmp ne i32 %3, 0
br i1 %4, label %5, label %9
5: ; preds = %1
%6 = call i32 (...) @rand()
%7 = srem i32 %6, 100
%8 = icmp slt i32 %7, 5
br i1 %8, label %9, label %11
9: ; preds = %5, %1
%10 = call i32 (...) @gen_assignment_stmt()
br label %14
11: ; preds = %5
%12 = load i32, i32* %2
%13 = call i32 @gen_if_stmt(i32 %12)
br label %14
14: ; preds = %11, %9
ret void
}

LLVM IR (-O2):
define void @gen_stmt(i32 %0) {
%2 = icmp eq i32 %0, 0
br i1 %2, label %7, label %3
3: ; preds = %1
%4 = tail call i32 (...) @rand()
%5 = srem i32 %4, 100
%6 = icmp slt i32 %5, 5
br i1 %6, label %7, label %9
7: ; preds = %3, %1
%8 = tail call i32 (...) @gen_assignment_stmt()
br label %11
9: ; preds = %3
%10 = tail call i32 @gen_if_stmt(i32 %0)
br label %11
11: ; preds = %9, %7
ret void
}
/* Variables and functions */
int /*<<< orphan*/ free(int *);
int *malloc(int);
int /*<<< orphan*/ printf(char *, int);
int main() {
  int *ip;
  ip = malloc(sizeof(int));
  free(ip);
  *ip = 5;
  printf("%i", *ip);
  ip = NULL;
  *ip = 5;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x4,%edi
call   1050 <malloc@plt>
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <free@plt>
mov    -0x8(%rbp),%rax
movl   $0x5,(%rax)
mov    -0x8(%rbp),%rax
mov    (%rax),%esi
lea    0xe9a(%rip),%rdi
call   1040 <printf@plt>
movq   $0x0,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movl   $0x5,(%rax)
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    $0x4,%edi
call   1050 <malloc@plt>
mov    %rax,%rdi
call   1030 <free@plt>
lea    0xeb6(%rip),%rdi
mov    $0x5,%esi
call   1040 <printf@plt>

LLVM IR (-O0):
@.str = [3 x i8] c"%i\00"
define i32 @main() {
%1 = alloca i32*
%2 = call i32* @malloc(i32 4)
store i32* %2, i32** %1
%3 = load i32*, i32** %1
%4 = call i32 @free(i32* %3)
%5 = load i32*, i32** %1
store i32 5, i32* %5
%6 = load i32*, i32** %1
%7 = load i32, i32* %6
%8 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 %7)
store i32* null, i32** %1
%9 = load i32*, i32** %1
store i32 5, i32* %9
ret i32 0
}

LLVM IR (-O2):
@.str = [3 x i8] c"%i\00"
define i32 @main() {
%1 = tail call i32* @malloc(i32 4)
%2 = tail call i32 @free(i32* %1)
%3 = tail call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 5)
unreachable
}
/* Type definitions */
struct vink_epp_state {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ epp_writen(struct vink_epp_state *, char const *,
                              int /*<<< orphan*/);
int /*<<< orphan*/ strlen(char const *);
void epp_write(struct vink_epp_state *state, const char *data) {
  epp_writen(state, data, strlen(data));
}


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

x86 assembly (clang, -O2):
<epp_write>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%rbx
mov    %rdi,%r14
mov    %rsi,%rdi
call   1030 <strlen@plt>
mov    %r14,%rdi
mov    %rbx,%rsi
mov    %eax,%edx
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1040 <epp_writen@plt>

LLVM IR (-O0):
%struct.vink_epp_state = type { i32 }
define void @epp_write(%struct.vink_epp_state* %0, i8* %1) {
%3 = alloca %struct.vink_epp_state*
%4 = alloca i8*
store %struct.vink_epp_state* %0, %struct.vink_epp_state** %3
store i8* %1, i8** %4
%5 = load %struct.vink_epp_state*, %struct.vink_epp_state** %3
%6 = load i8*, i8** %4
%7 = load i8*, i8** %4
%8 = call i32 @strlen(i8* %7)
%9 = call i32 @epp_writen(%struct.vink_epp_state* %5, i8* %6, i32 %8)
ret void
}

LLVM IR (-O2):
%struct.vink_epp_state = type { i32 }
define void @epp_write(%struct.vink_epp_state* %0, i8* %1) {
%3 = tail call i32 @strlen(i8* %1)
%4 = tail call i32 @epp_writen(%struct.vink_epp_state* %0, i8* %1, i32 %3)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int EXIT_SUCCESS;
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/ *, char *, char const *);
int /*<<< orphan*/ *stderr;
int /*<<< orphan*/ *stdout;
void helpAndLeave(const char *progname, int status) {
  FILE *stream;
  if (status == EXIT_SUCCESS) {
    stream = stdout;
  } else {
    stream = stderr;
  }
  fprintf(stream, "Usage: %s [-s NAME=VALUE] [-g NAME]\n", progname);
  exit(status);
}


x86 assembly (clang, -O0):
<helpAndLeave>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0xc(%rbp),%eax
mov    0x2e97(%rip),%rcx
cmp    (%rcx),%eax
jne    1154 <helpAndLeave+0x34>
mov    0x2e90(%rip),%rax
mov    (%rax),%rax
mov    %rax,-0x18(%rbp)
jmp    1162 <helpAndLeave+0x42>
mov    0x2e85(%rip),%rax
mov    (%rax),%rax
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rdi
mov    -0x8(%rbp),%rdx
lea    0xe8f(%rip),%rsi
call   1030 <fprintf@plt>
mov    -0xc(%rbp),%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<helpAndLeave>:
push   %rbx
mov    %esi,%ebx
mov    %rdi,%rdx
mov    0x2ea3(%rip),%rax
cmp    %esi,(%rax)
jne    113a <helpAndLeave+0x1a>
mov    0x2ea0(%rip),%rax
jmp    1141 <helpAndLeave+0x21>
mov    0x2e9f(%rip),%rax
mov    (%rax),%rdi
lea    0xeb5(%rip),%rsi
call   1030 <fprintf@plt>
mov    %ebx,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@EXIT_SUCCESS = global i32 0
@stdout = global i32* null
@stderr = global i32* null
@.str = [37 x i8] c"Usage: %s [-s NAME=VALUE] [-g NAME]\0A\00"
define void @helpAndLeave(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i32
%5 = alloca i32*
store i8* %0, i8** %3
store i32 %1, i32* %4
%6 = load i32, i32* %4
%7 = load i32, i32* @EXIT_SUCCESS
%8 = icmp eq i32 %6, %7
br i1 %8, label %9, label %11
9: ; preds = %2
%10 = load i32*, i32** @stdout
store i32* %10, i32** %5
br label %13
11: ; preds = %2
%12 = load i32*, i32** @stderr
store i32* %12, i32** %5
br label %13
13: ; preds = %11, %9
%14 = load i32*, i32** %5
%15 = load i8*, i8** %3
%16 = call i32 @fprintf(i32* %14, i8* getelementptr inbounds ([37 x i8], [37 x i8]* @.str, i64 0, i64 0), i8* %15)
%17 = load i32, i32* %4
%18 = call i32 @exit(i32 %17)
unreachable
}

LLVM IR (-O2):
@EXIT_SUCCESS = global i32 0
@stdout = global i32* null
@stderr = global i32* null
@.str = [37 x i8] c"Usage: %s [-s NAME=VALUE] [-g NAME]\0A\00"
define void @helpAndLeave(i8* %0, i32 %1) {
%3 = load i32, i32* @EXIT_SUCCESS
%4 = icmp eq i32 %3, %1
%5 = load i32*, i32** @stdout
%6 = load i32*, i32** @stderr
%7 = select i1 %4, i32* %5, i32* %6
%8 = tail call i32 @fprintf(i32* %7, i8* getelementptr inbounds ([37 x i8], [37 x i8]* @.str, i64 0, i64 0), i8* %0)
%9 = tail call i32 @exit(i32 %1)
unreachable
}
int ixlnum(long *numvar) { return ((long)numvar / sizeof(float)); }


x86 assembly (clang, -O0):
<ixlnum>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
shr    $0x2,%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<ixlnum>:
mov    %rdi,%rax
shr    $0x2,%rax
ret

LLVM IR (-O0):
define i32 @ixlnum(i64* %0) {
%2 = alloca i64*
store i64* %0, i64** %2
%3 = load i64*, i64** %2
%4 = ptrtoint i64* %3 to i64
%5 = udiv i64 %4, 4
%6 = trunc i64 %5 to i32
ret i32 %6
}

LLVM IR (-O2):
define i32 @ixlnum(i64* %0) {
%2 = ptrtoint i64* %0 to i64
%3 = lshr i64 %2, 2
%4 = trunc i64 %3 to i32
ret i32 %4
}
int sq_size_impl() { return 20; }


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

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

LLVM IR (-O0):
define i32 @sq_size_impl() {
ret i32 20
}

LLVM IR (-O2):
define i32 @sq_size_impl() {
ret i32 20
}
/* Variables and functions */
int /*<<< orphan*/ snprintf(char *, int, char *, unsigned int);
void sprint_byte(char *s, unsigned int v) {
  snprintf(s, 3, "%02x", (v & 0377));
}


x86 assembly (clang, -O0):
<sprint_byte>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%ecx
and    $0xff,%ecx
mov    $0x3,%esi
lea    0xec8(%rip),%rdx
call   1030 <snprintf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<sprint_byte>:
movzbl %sil,%ecx
lea    0xee5(%rip),%rdx
mov    $0x3,%esi
jmp    1030 <snprintf@plt>

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

LLVM IR (-O2):
@.str = [5 x i8] c"%02x\00"
define void @sprint_byte(i8* %0, i32 %1) {
%3 = and i32 %1, 255
%4 = tail call i32 @snprintf(i8* %0, i32 3, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i32 %3)
ret void
}
const char *getprogname(void) { return "?"; }


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

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

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

LLVM IR (-O2):
@.str = [2 x i8] c"?\00"
define i8* @getprogname() {
ret i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0)
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int, int);
void term_goto(int r, int c) { printf("\033[%d;%df", r, c); }


x86 assembly (clang, -O0):
<term_goto>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%esi
mov    -0x8(%rbp),%edx
lea    0xed5(%rip),%rdi
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<term_goto>:
mov    %esi,%edx
mov    %edi,%esi
lea    0xee5(%rip),%rdi
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [9 x i8] c"\1B[%d;%df\00"
define void @term_goto(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%5 = load i32, i32* %3
%6 = load i32, i32* %4
%7 = call i32 @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), i32 %5, i32 %6)
ret void
}

LLVM IR (-O2):
@.str = [9 x i8] c"\1B[%d;%df\00"
define void @term_goto(i32 %0, i32 %1) {
%3 = tail call i32 @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), i32 %0, i32 %1)
ret void
}
/* Type definitions */
struct vec2 {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ vec2_bezier4(float *, float *, float *, float *, float *,
                                float);
__attribute__((always_)) struct vec2 *
psvec2_bezier4(struct vec2 *result, struct vec2 *a, struct vec2 *b,
               struct vec2 *c, struct vec2 *d, float p) {
  vec2_bezier4((float *)result, (float *)a, (float *)b, (float *)c, (float *)d,
               p);
  return result;
}


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

x86 assembly (clang, -O2):
<psvec2_bezier4>:
push   %rbx
mov    %rdi,%rbx
call   1030 <vec2_bezier4@plt>
mov    %rbx,%rax
pop    %rbx
ret

LLVM IR (-O0):
%struct.vec2 = type { i32 }
define %struct.vec2* @psvec2_bezier4(%struct.vec2* %0, %struct.vec2* %1, %struct.vec2* %2, %struct.vec2* %3, %struct.vec2* %4, float %5) {
%7 = alloca %struct.vec2*
%8 = alloca %struct.vec2*
%9 = alloca %struct.vec2*
%10 = alloca %struct.vec2*
%11 = alloca %struct.vec2*
%12 = alloca float
store %struct.vec2* %0, %struct.vec2** %7
store %struct.vec2* %1, %struct.vec2** %8
store %struct.vec2* %2, %struct.vec2** %9
store %struct.vec2* %3, %struct.vec2** %10
store %struct.vec2* %4, %struct.vec2** %11
store float %5, float* %12
%13 = load %struct.vec2*, %struct.vec2** %7
%14 = bitcast %struct.vec2* %13 to float*
%15 = load %struct.vec2*, %struct.vec2** %8
%16 = bitcast %struct.vec2* %15 to float*
%17 = load %struct.vec2*, %struct.vec2** %9
%18 = bitcast %struct.vec2* %17 to float*
%19 = load %struct.vec2*, %struct.vec2** %10
%20 = bitcast %struct.vec2* %19 to float*
%21 = load %struct.vec2*, %struct.vec2** %11
%22 = bitcast %struct.vec2* %21 to float*
%23 = load float, float* %12
%24 = call i32 @vec2_bezier4(float* %14, float* %16, float* %18, float* %20, float* %22, float %23)
%25 = load %struct.vec2*, %struct.vec2** %7
ret %struct.vec2* %25
}

LLVM IR (-O2):
%struct.vec2 = type { i32 }
define %struct.vec2* @psvec2_bezier4(%struct.vec2* returned %0, %struct.vec2* %1, %struct.vec2* %2, %struct.vec2* %3, %struct.vec2* %4, float %5) {
%7 = bitcast %struct.vec2* %0 to float*
%8 = bitcast %struct.vec2* %1 to float*
%9 = bitcast %struct.vec2* %2 to float*
%10 = bitcast %struct.vec2* %3 to float*
%11 = bitcast %struct.vec2* %4 to float*
%12 = tail call i32 @vec2_bezier4(float* %7, float* %8, float* %9, float* %10, float* %11, float %5)
ret %struct.vec2* %0
}
/* Type definitions */
typedef int /*<<< orphan*/ wint_t;
struct pane {
  int dummy;
};
struct mark {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ __doc_step(struct pane *, struct mark *, int, int);
wint_t doc_next(struct pane *p, struct mark *m) {
  return __doc_step(p, m, 1, 1);
}


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

x86 assembly (clang, -O2):
<doc_next>:
mov    $0x1,%edx
mov    $0x1,%ecx
jmp    1030 <__doc_step@plt>

LLVM IR (-O0):
%struct.pane = type { i32 }
%struct.mark = type { i32 }
define i32 @doc_next(%struct.pane* %0, %struct.mark* %1) {
%3 = alloca %struct.pane*
%4 = alloca %struct.mark*
store %struct.pane* %0, %struct.pane** %3
store %struct.mark* %1, %struct.mark** %4
%5 = load %struct.pane*, %struct.pane** %3
%6 = load %struct.mark*, %struct.mark** %4
%7 = call i32 @__doc_step(%struct.pane* %5, %struct.mark* %6, i32 1, i32 1)
ret i32 %7
}

LLVM IR (-O2):
%struct.pane = type { i32 }
%struct.mark = type { i32 }
define i32 @doc_next(%struct.pane* %0, %struct.mark* %1) {
%3 = tail call i32 @__doc_step(%struct.pane* %0, %struct.mark* %1, i32 1, i32 1)
ret i32 %3
}
/* Variables and functions */
int ***create_3D_array(int, int, int const);
scalar_t__ realloc(int ****, int);
void add_to_4D_array(int ****array, int new_array_size, int chessboard_size) {
  const int NEW_3D_ARRAYS = 1;
  array = (int ****)realloc(array, new_array_size * sizeof(int ****));
  array[new_array_size - 1] =
      create_3D_array(chessboard_size, chessboard_size, NEW_3D_ARRAYS);
}


x86 assembly (clang, -O0):
<add_to_4D_array>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
movl   $0x1,-0x14(%rbp)
mov    -0x8(%rbp),%rdi
movslq -0xc(%rbp),%rax
shl    $0x3,%rax
mov    %eax,%esi
call   1040 <realloc@plt>
mov    %rax,-0x8(%rbp)
mov    -0x10(%rbp),%edi
mov    -0x10(%rbp),%esi
mov    $0x1,%edx
call   1030 <create_3D_array@plt>
mov    %rax,%rdx
mov    -0x8(%rbp),%rax
mov    -0xc(%rbp),%ecx
sub    $0x1,%ecx
movslq %ecx,%rcx
mov    %rdx,(%rax,%rcx,8)
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<add_to_4D_array>:
push   %r15
push   %r14
push   %rbx
mov    %edx,%ebx
mov    %esi,%r14d
lea    0x0(,%r14,8),%esi
call   1040 <realloc@plt>
mov    %rax,%r15
mov    %ebx,%edi
mov    %ebx,%esi
mov    $0x1,%edx
call   1030 <create_3D_array@plt>
movslq %r14d,%rcx
mov    %rax,-0x8(%r15,%rcx,8)
pop    %rbx
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
define void @add_to_4D_array(i32**** %0, i32 %1, i32 %2) {
%4 = alloca i32****
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
store i32**** %0, i32***** %4
store i32 %1, i32* %5
store i32 %2, i32* %6
store i32 1, i32* %7
%8 = load i32****, i32***** %4
%9 = load i32, i32* %5
%10 = sext i32 %9 to i64
%11 = mul i64 %10, 8
%12 = trunc i64 %11 to i32
%13 = call i64 @realloc(i32**** %8, i32 %12)
%14 = inttoptr i64 %13 to i32****
store i32**** %14, i32***** %4
%15 = load i32, i32* %6
%16 = load i32, i32* %6
%17 = call i32*** @create_3D_array(i32 %15, i32 %16, i32 1)
%18 = load i32****, i32***** %4
%19 = load i32, i32* %5
%20 = sub nsw i32 %19, 1
%21 = sext i32 %20 to i64
%22 = getelementptr inbounds i32***, i32**** %18, i64 %21
store i32*** %17, i32**** %22
ret void
}

LLVM IR (-O2):
define void @add_to_4D_array(i32**** %0, i32 %1, i32 %2) {
%4 = shl i32 %1, 3
%5 = tail call i64 @realloc(i32**** %0, i32 %4)
%6 = inttoptr i64 %5 to i32****
%7 = tail call i32*** @create_3D_array(i32 %2, i32 %2, i32 1)
%8 = add nsw i32 %1, -1
%9 = sext i32 %8 to i64
%10 = getelementptr inbounds i32***, i32**** %6, i64 %9
store i32*** %7, i32**** %10
ret void
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ printf(char *, char *);
void usage(char *prog) {
  printf("Usage:  %s keystring [-s || 5 || 13]\n", prog);
  exit(1);
}


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

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

LLVM IR (-O0):
@.str = [38 x i8] c"Usage: %s keystring [-s || 5 || 13]\0A\00"
define void @usage(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 @printf(i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str, i64 0, i64 0), i8* %3)
%5 = call i32 @exit(i32 1)
unreachable
}

LLVM IR (-O2):
@.str = [38 x i8] c"Usage: %s keystring [-s || 5 || 13]\0A\00"
define void @usage(i8* %0) {
%2 = tail call i32 @printf(i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str, i64 0, i64 0), i8* %0)
%3 = tail call i32 @exit(i32 1)
unreachable
}
void set_bit(int nr, void *_addr) {
  char *addr = _addr;
  ((addr))[(nr) / 8] |= (1UL << ((nr) % 8));
}


x86 assembly (clang, -O0):
<set_bit>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x4(%rbp),%eax
mov    $0x8,%ecx
cltd
idiv   %ecx
mov    %edx,%eax
mov    %eax,%ecx
mov    $0x1,%esi
shl    %cl,%rsi
mov    -0x18(%rbp),%rax
mov    %rax,-0x20(%rbp)
mov    -0x4(%rbp),%eax
mov    $0x8,%ecx
cltd
idiv   %ecx
mov    %eax,%ecx
mov    -0x20(%rbp),%rax
movslq %ecx,%rcx
movsbq (%rax,%rcx,1),%rdx
or     %rsi,%rdx
mov    %dl,(%rax,%rcx,1)
pop    %rbp
ret

x86 assembly (clang, -O2):
<set_bit>:
mov    %edi,%ecx
lea    0x7(%rcx),%eax
test   %edi,%edi
cmovns %edi,%eax
mov    %eax,%edx
and    $0xfffffff8,%edx
sub    %edx,%ecx
mov    $0x1,%edx
shl    %cl,%rdx
sar    $0x3,%eax
cltq
or     %dl,(%rsi,%rax,1)
ret

LLVM IR (-O0):
define void @set_bit(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 i8*, i8** %4
store i8* %6, i8** %5
%7 = load i32, i32* %3
%8 = srem i32 %7, 8
%9 = zext i32 %8 to i64
%10 = shl i64 1, %9
%11 = load i8*, i8** %5
%12 = load i32, i32* %3
%13 = sdiv i32 %12, 8
%14 = sext i32 %13 to i64
%15 = getelementptr inbounds i8, i8* %11, i64 %14
%16 = load i8, i8* %15
%17 = sext i8 %16 to i64
%18 = or i64 %17, %10
%19 = trunc i64 %18 to i8
store i8 %19, i8* %15
ret void
}

LLVM IR (-O2):
define void @set_bit(i32 %0, i8* nocapture %1) {
%3 = srem i32 %0, 8
%4 = zext i32 %3 to i64
%5 = shl nuw i64 1, %4
%6 = sdiv i32 %0, 8
%7 = sext i32 %6 to i64
%8 = getelementptr inbounds i8, i8* %1, i64 %7
%9 = load i8, i8* %8
%10 = trunc i64 %5 to i8
%11 = or i8 %9, %10
store i8 %11, i8* %8
ret void
}
/* Variables and functions */
int Rechner();
int /*<<< orphan*/ printf(char *);
int main() {
  extern int started;
  if (!started) {
    printf("Calculator Version 0.3.10!\tFor help type 1 ? 1!\n"
           "For other languages than English type 1 L 1\n");
    started = 1;
  }
  if (Rechner() != 2)
    main();
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    0x2eb2(%rip),%rax
cmpl   $0x0,(%rax)
jne    1168 <main+0x38>
lea    0xeaa(%rip),%rdi
call   1040 <printf@plt>
mov    0x2e96(%rip),%rax
movl   $0x1,(%rax)
mov    $0x0,%al
call   1030 <Rechner@plt>
cmp    $0x2,%eax
je     117d <main+0x4d>
call   1050 <main@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r14
push   %rbx
push   %rax
mov    0x2ecd(%rip),%rbx
lea    0xece(%rip),%r14
jmp    114c <main+0x2c>
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
xor    %eax,%eax
call   1040 <Rechner@plt>
cmp    $0x2,%eax
je     1161 <main+0x41>
cmpl   $0x0,(%rbx)
jne    1140 <main+0x20>
mov    %r14,%rdi
call   1030 <puts@plt>
movl   $0x1,(%rbx)
jmp    1140 <main+0x20>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@started = external global i32
@.str = [93 x i8] c"Calculator Version 0.3.10!\09For help type 1 ? 1!\0AFor other languages than English type 1 L 1\0A\00"
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = load i32, i32* @started
%3 = icmp ne i32 %2, 0
br i1 %3, label %6, label %4
4: ; preds = %0
%5 = call i32 @printf(i8* getelementptr inbounds ([93 x i8], [93 x i8]* @.str, i64 0, i64 0))
store i32 1, i32* @started
br label %6
6: ; preds = %4, %0
%7 = call i32 (...) @Rechner()
%8 = icmp ne i32 %7, 2
br i1 %8, label %9, label %11
9: ; preds = %6
%10 = call i32 @main()
br label %11
11: ; preds = %9, %6
%12 = load i32, i32* %1
ret i32 %12
}

LLVM IR (-O2):
@started = external global i32
@str = [92 x i8] c"Calculator Version 0.3.10!\09For help type 1 ? 1!\0AFor other languages than English type 1 L 1\00"
define i32 @main() {
br label %1
1: ; preds = %6, %0
%2 = load i32, i32* @started
%3 = icmp eq i32 %2, 0
br i1 %3, label %4, label %6
4: ; preds = %1
%5 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([92 x i8], [92 x i8]* @str, i64 0, i64 0))
store i32 1, i32* @started
br label %6
6: ; preds = %4, %1
%7 = tail call i32 (...) @Rechner()
%8 = icmp eq i32 %7, 2
br i1 %8, label %9, label %1
9: ; preds = %6
ret i32 0
}
unsigned long long __atomic_exchange_8(volatile void *atom,
                                       unsigned long long value, int memorder) {
  unsigned long long xchg;
  unsigned long long cmp;
  __atomic_load((unsigned long long *)atom, (unsigned long long *)&cmp, 0);
  do {
    xchg = (value);
  } while (!__atomic_compare_exchange((unsigned long long *)atom, &cmp, &xchg,
                                      1, 5, 5));
  return cmp;
}


x86 assembly (clang, -O0):
<__atomic_exchange_8>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%rax
mov    %rax,-0x28(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x20(%rbp)
mov    -0x8(%rbp),%rcx
mov    -0x28(%rbp),%rax
mov    -0x20(%rbp),%rdx
lock cmpxchg %rdx,(%rcx)
mov    %rax,%rcx
sete   %al
mov    %al,-0x39(%rbp)
mov    %rcx,-0x38(%rbp)
test   $0x1,%al
jne    1150 <__atomic_exchange_8+0x50>
mov    -0x38(%rbp),%rax
mov    %rax,-0x28(%rbp)
mov    -0x39(%rbp),%al
and    $0x1,%al
mov    %al,-0x29(%rbp)
mov    -0x29(%rbp),%al
xor    $0xff,%al
test   $0x1,%al
jne    111a <__atomic_exchange_8+0x1a>
mov    -0x28(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<__atomic_exchange_8>:
mov    (%rdi),%rax
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
mov    %rax,%rcx
lock cmpxchg %rsi,(%rdi)
jne    1110 <__atomic_exchange_8+0x10>
mov    %rcx,%rax
ret

LLVM IR (-O0):
define i64 @__atomic_exchange_8(i8* %0, i64 %1, i32 %2) {
%4 = alloca i8*
%5 = alloca i64
%6 = alloca i32
%7 = alloca i64
%8 = alloca i64
%9 = alloca i8
store i8* %0, i8** %4
store i64 %1, i64* %5
store i32 %2, i32* %6
%10 = load i8*, i8** %4
%11 = bitcast i8* %10 to i64*
%12 = load atomic i64, i64* %11 monotonic
store i64 %12, i64* %8
br label %13
13: ; preds = %24, %3
%14 = load i64, i64* %5
store i64 %14, i64* %7
br label %15
15: ; preds = %13
%16 = load i8*, i8** %4
%17 = bitcast i8* %16 to i64*
%18 = load i64, i64* %8
%19 = load i64, i64* %7
%20 = cmpxchg weak i64* %17, i64 %18, i64 %19 seq_cst seq_cst
%21 = extractvalue { i64, i1 } %20, 0
%22 = extractvalue { i64, i1 } %20, 1
br i1 %22, label %24, label %23
23: ; preds = %15
store i64 %21, i64* %8
br label %24
24: ; preds = %23, %15
%25 = zext i1 %22 to i8
store i8 %25, i8* %9
%26 = load i8, i8* %9
%27 = trunc i8 %26 to i1
%28 = xor i1 %27, true
br i1 %28, label %13, label %29
29: ; preds = %24
%30 = load i64, i64* %8
ret i64 %30
}

LLVM IR (-O2):
define i64 @__atomic_exchange_8(i8* nocapture %0, i64 %1, i32 %2) {
%4 = bitcast i8* %0 to i64*
%5 = load atomic i64, i64* %4 monotonic
br label %6
6: ; preds = %6, %3
%7 = phi i64 [ %5, %3 ], [ %10, %6 ]
%8 = cmpxchg weak i64* %4, i64 %7, i64 %1 seq_cst seq_cst
%9 = extractvalue { i64, i1 } %8, 1
%10 = extractvalue { i64, i1 } %8, 0
br i1 %9, label %11, label %6
11: ; preds = %6
ret i64 %7
}
/* Variables and functions */
int bigrand();
int randint(int a, int b) { return a + bigrand() % (b - a); }


x86 assembly (clang, -O0):
<randint>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    $0x0,%al
call   1030 <bigrand@plt>
mov    -0x8(%rbp),%ecx
sub    -0x4(%rbp),%ecx
cltd
idiv   %ecx
mov    -0xc(%rbp),%eax
add    %edx,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<randint>:
push   %rbp
push   %rbx
push   %rax
mov    %esi,%ebx
mov    %edi,%ebp
xor    %eax,%eax
call   1030 <bigrand@plt>
sub    %ebp,%ebx
cltd
idiv   %ebx
add    %edx,%ebp
mov    %ebp,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
define i32 @randint(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%5 = load i32, i32* %3
%6 = call i32 (...) @bigrand()
%7 = load i32, i32* %4
%8 = load i32, i32* %3
%9 = sub nsw i32 %7, %8
%10 = srem i32 %6, %9
%11 = add nsw i32 %5, %10
ret i32 %11
}

LLVM IR (-O2):
define i32 @randint(i32 %0, i32 %1) {
%3 = tail call i32 (...) @bigrand()
%4 = sub nsw i32 %1, %0
%5 = srem i32 %3, %4
%6 = add nsw i32 %5, %0
ret i32 %6
}
const char *skip(const char *in) {
  while (in && (unsigned char)*in <= 32)
    in++;
  return in;
}


x86 assembly (clang, -O0):
<skip>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
xor    %eax,%eax
cmpq   $0x0,-0x8(%rbp)
mov    %al,-0x9(%rbp)
je     1128 <skip+0x28>
mov    -0x8(%rbp),%rax
movzbl (%rax),%eax
cmp    $0x20,%eax
setle  %al
mov    %al,-0x9(%rbp)
mov    -0x9(%rbp),%al
test   $0x1,%al
jne    1138 <skip+0x38>
jmp    1149 <skip+0x49>
mov    -0x8(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x8(%rbp)
jmp    1108 <skip+0x8>
mov    -0x8(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<skip>:
test   %rdi,%rdi
je     111e <skip+0x1e>
add    $0xffffffffffffffff,%rdi
nopl   0x0(%rax)
lea    0x1(%rdi),%rax
cmpb   $0x21,0x1(%rdi)
mov    %rax,%rdi
jb     1110 <skip+0x10>
ret
xor    %eax,%eax
ret

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

LLVM IR (-O2):
define i8* @skip(i8* %0) {
%2 = icmp eq i8* %0, null
br i1 %2, label %8, label %3
3: ; preds = %1, %3
%4 = phi i8* [ %7, %3 ], [ %0, %1 ]
%5 = load i8, i8* %4
%6 = icmp ult i8 %5, 33
%7 = getelementptr inbounds i8, i8* %4, i64 1
br i1 %6, label %3, label %8
8: ; preds = %3, %1
%9 = phi i8* [ null, %1 ], [ %4, %3 ]
ret i8* %9
}
int test_imm_84uint8_reg(unsigned char val) {
  return ((val) & (0x84 << 0)) ? -20 : -40;
}


x86 assembly (clang, -O0):
<test_imm_84uint8_reg>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movzbl -0x1(%rbp),%edx
and    $0x84,%edx
mov    $0xffffffd8,%eax
mov    $0xffffffec,%ecx
cmp    $0x0,%edx
cmovne %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_imm_84uint8_reg>:
test   $0x84,%dil
mov    $0xffffffd8,%ecx
mov    $0xffffffec,%eax
cmove  %ecx,%eax
ret

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

LLVM IR (-O2):
define i32 @test_imm_84uint8_reg(i8 zeroext %0) {
%2 = and i8 %0, -124
%3 = icmp eq i8 %2, 0
%4 = select i1 %3, i32 -40, i32 -20
ret i32 %4
}
void do_nothing() {}


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

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

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

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