xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ character();
char get_char();
int /*<<< orphan*/ printf(char *);
more() {
  printf("---------- More ----------");
  if (get_char() == 'p') {
    character();
    printf("---------- More ----------");
    (void)get_char();
  };
}


x86 assembly (clang, -O0):
<more>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    0xec1(%rip),%rdi
call   1030 <printf@plt>
mov    $0x0,%al
call   1050 <get_char@plt>
movsbl %al,%eax
cmp    $0x70,%eax
jne    1171 <more+0x41>
mov    $0x0,%al
call   1040 <character@plt>
lea    0xe9b(%rip),%rdi
call   1030 <printf@plt>
mov    $0x0,%al
call   1050 <get_char@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<more>:
push   %rax
lea    0xec8(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
call   1050 <get_char@plt>
cmp    $0x70,%al
jne    1162 <more+0x32>
xor    %eax,%eax
call   1040 <character@plt>
lea    0xeaa(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
call   1050 <get_char@plt>
pop    %rcx
ret

LLVM IR (-O0):
@.str = [27 x i8] c"---------- More ----------\00"
define i32 @more() {
%1 = alloca i32
%2 = call i32 @printf(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str, i64 0, i64 0))
%3 = call signext i8 (...) @get_char()
%4 = sext i8 %3 to i32
%5 = icmp eq i32 %4, 112
br i1 %5, label %6, label %10
6: ; preds = %0
%7 = call i32 (...) @character()
%8 = call i32 @printf(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str, i64 0, i64 0))
%9 = call signext i8 (...) @get_char()
br label %10
10: ; preds = %6, %0
%11 = load i32, i32* %1
ret i32 %11
}

LLVM IR (-O2):
@.str = [27 x i8] c"---------- More ----------\00"
define i32 @more() {
%1 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([27 x i8], [27 x i8]* @.str, i64 0, i64 0))
%2 = tail call signext i8 (...) @get_char()
%3 = icmp eq i8 %2, 112
br i1 %3, label %4, label %8
4: ; preds = %0
%5 = tail call i32 (...) @character()
%6 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([27 x i8], [27 x i8]* @.str, i64 0, i64 0))
%7 = tail call signext i8 (...) @get_char()
br label %8
8: ; preds = %4, %0
ret i32 undef
}
/* Type definitions */
struct memorycontainer {
  int dummy;
};

/* Variables and functions */
struct memorycontainer *createExpression(int, struct memorycontainer *,
                                         struct memorycontainer *);
struct memorycontainer *
createModExpression(struct memorycontainer *expression1,
                    struct memorycontainer *expression2) {
  return createExpression(0x0E, expression1, expression2);
}


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

x86 assembly (clang, -O2):
<createModExpression>:
mov    %rsi,%rdx
mov    %rdi,%rsi
mov    $0xe,%edi
jmp    1030 <createExpression@plt>

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

LLVM IR (-O2):
%struct.memorycontainer = type { i32 }
define %struct.memorycontainer* @createModExpression(%struct.memorycontainer* %0, %struct.memorycontainer* %1) {
%3 = tail call %struct.memorycontainer* @createExpression(i32 14, %struct.memorycontainer* %0, %struct.memorycontainer* %1)
ret %struct.memorycontainer* %3
}
/* Type definitions */
typedef int /*<<< orphan*/ uint8_t;

/* Variables and functions */
void chacha_avx512(uint8_t *dst __attribute__((unused)),
                   const uint8_t *src __attribute__((unused)),
                   size_t len __attribute__((unused)),
                   const uint8_t *key __attribute__((unused)),
                   const uint8_t *salt __attribute__((unused)),
                   const uint8_t *iv __attribute__((unused))) {
  ;
}


x86 assembly (clang, -O0):
<chacha_avx512>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    %r8,-0x28(%rbp)
mov    %r9,-0x30(%rbp)
pop    %rbp
ret

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

LLVM IR (-O0):
define void @chacha_avx512(i32* %0, i32* %1, i64 %2, i32* %3, i32* %4, i32* %5) {
%7 = alloca i32*
%8 = alloca i32*
%9 = alloca i64
%10 = alloca i32*
%11 = alloca i32*
%12 = alloca i32*
store i32* %0, i32** %7
store i32* %1, i32** %8
store i64 %2, i64* %9
store i32* %3, i32** %10
store i32* %4, i32** %11
store i32* %5, i32** %12
ret void
}

LLVM IR (-O2):
define void @chacha_avx512(i32* nocapture %0, i32* nocapture %1, i64 %2, i32* nocapture %3, i32* nocapture %4, i32* nocapture %5) {
ret void
}
/* Variables and functions */
int C(int, int);
int /*<<< orphan*/ printf(char *, int, int, int);
int main() {
  printf("C(%d, %d = %d)\n", 4, 2, C(4, 2));
  printf("C(%d, %d = %d)\n", 49, 6, C(49, 6));
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
mov    $0x4,%edi
mov    $0x2,%esi
call   1040 <C@plt>
mov    %eax,%ecx
lea    0xec4(%rip),%rdi
mov    $0x4,%esi
mov    $0x2,%edx
call   1030 <printf@plt>
mov    $0x31,%edi
mov    $0x6,%esi
call   1040 <C@plt>
mov    %eax,%ecx
lea    0xe9d(%rip),%rdi
mov    $0x31,%esi
mov    $0x6,%edx
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
@.str = [16 x i8] c"C(%d, %d = %d)\0A\00"
define i32 @main() {
%1 = tail call i32 @C(i32 4, i32 2)
%2 = tail call i32 @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0), i32 4, i32 2, i32 %1)
%3 = tail call i32 @C(i32 49, i32 6)
%4 = tail call i32 @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0), i32 49, i32 6, i32 %3)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ perror(char *);
int /*<<< orphan*/ strcpy(char *, char *);
int /*<<< orphan*/ strncat(char *, char *, int);
void fatal(char *msg) {
  char error_msg[100];
  strcpy(error_msg, "** Fatal error ");
  strncat(error_msg, msg, 83);
  perror(error_msg);
  exit(-1);
}


x86 assembly (clang, -O0):
<fatal>:
push   %rbp
mov    %rsp,%rbp
sub    $0x70,%rsp
mov    %rdi,-0x8(%rbp)
lea    -0x70(%rbp),%rdi
lea    0xea9(%rip),%rsi
call   1030 <strcpy@plt>
lea    -0x70(%rbp),%rdi
mov    -0x8(%rbp),%rsi
mov    $0x53,%edx
call   1040 <strncat@plt>
lea    -0x70(%rbp),%rdi
call   1050 <perror@plt>
mov    $0xffffffff,%edi
call   1060 <exit@plt>

x86 assembly (clang, -O2):
<fatal>:
push   %r14
push   %rbx
sub    $0x68,%rsp
mov    %rdi,%rbx
lea    0xeaf(%rip),%rsi
mov    %rsp,%r14
mov    %r14,%rdi
call   1030 <strcpy@plt>
mov    %r14,%rdi
mov    %rbx,%rsi
mov    $0x53,%edx
call   1040 <strncat@plt>
mov    %r14,%rdi
call   1050 <perror@plt>
mov    $0xffffffff,%edi
call   1060 <exit@plt>

LLVM IR (-O0):
@.str = [16 x i8] c"** Fatal error \00"
define void @fatal(i8* %0) {
%2 = alloca i8*
%3 = alloca [100 x i8]
store i8* %0, i8** %2
%4 = getelementptr inbounds [100 x i8], [100 x i8]* %3, i64 0, i64 0
%5 = call i32 @strcpy(i8* %4, i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0))
%6 = getelementptr inbounds [100 x i8], [100 x i8]* %3, i64 0, i64 0
%7 = load i8*, i8** %2
%8 = call i32 @strncat(i8* %6, i8* %7, i32 83)
%9 = getelementptr inbounds [100 x i8], [100 x i8]* %3, i64 0, i64 0
%10 = call i32 @perror(i8* %9)
%11 = call i32 @exit(i32 -1)
unreachable
}

LLVM IR (-O2):
@.str = [16 x i8] c"** Fatal error \00"
define void @fatal(i8* %0) {
%2 = alloca [100 x i8]
%3 = getelementptr inbounds [100 x i8], [100 x i8]* %2, i64 0, i64 0
%4 = call i32 @strcpy(i8* %3, i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0))
%5 = call i32 @strncat(i8* %3, i8* %0, i32 83)
%6 = call i32 @perror(i8* %3)
%7 = call i32 @exit(i32 -1)
unreachable
}
/* Variables and functions */
int /*<<< orphan*/ find_start();
int /*<<< orphan*/ printf(char *, int /*<<< orphan*/);
int main(void) { printf("0x%lx\n", find_start()); }


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1040 <find_start@plt>
mov    %eax,%esi
lea    0xecc(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
@.str = [7 x i8] c"0x%lx\0A\00"
define i32 @main() {
%1 = tail call i32 (...) @find_start()
%2 = tail call i32 @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i32 %1)
ret i32 0
}
int ascending(int a, int b) { return b < a; }


x86 assembly (clang, -O0):
<ascending>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x8(%rbp),%eax
cmp    -0x4(%rbp),%eax
setl   %al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<ascending>:
xor    %eax,%eax
cmp    %edi,%esi
setl   %al
ret

LLVM IR (-O0):
define i32 @ascending(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%5 = load i32, i32* %4
%6 = load i32, i32* %3
%7 = icmp slt i32 %5, %6
%8 = zext i1 %7 to i32
ret i32 %8
}

LLVM IR (-O2):
define i32 @ascending(i32 %0, i32 %1) {
%3 = icmp slt i32 %1, %0
%4 = zext i1 %3 to i32
ret i32 %4
}
double d16_to_double(int x) { return ((double)x) / 0x10000; }


x86 assembly (clang, -O0):
<d16_to_double>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
cvtsi2sdl -0x4(%rbp),%xmm0
movsd  0xeec(%rip),%xmm1
divsd  %xmm1,%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<d16_to_double>:
cvtsi2sd %edi,%xmm0
mulsd  0xef4(%rip),%xmm0
ret

LLVM IR (-O0):
define double @d16_to_double(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = sitofp i32 %3 to double
%5 = fdiv double %4, 6.553600e+04
ret double %5
}

LLVM IR (-O2):
define double @d16_to_double(i32 %0) {
%2 = sitofp i32 %0 to double
%3 = fmul double %2, 0x3EF0000000000000
ret double %3
}
/* Variables and functions */
int /*<<< orphan*/ INITIALIZE_RECORD(char *, int);
void INITIALIZE_TEXT_RECORD(void) { INITIALIZE_RECORD("", 60); }


x86 assembly (clang, -O0):
<INITIALIZE_TEXT_RECORD>:
push   %rbp
mov    %rsp,%rbp
lea    0xee5(%rip),%rdi
mov    $0x3c,%esi
call   1030 <INITIALIZE_RECORD@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<INITIALIZE_TEXT_RECORD>:
lea    0xee9(%rip),%rdi
mov    $0x3c,%esi
jmp    1030 <INITIALIZE_RECORD@plt>

LLVM IR (-O0):
@.str = [1 x i8] zeroinitializer
define void @INITIALIZE_TEXT_RECORD() {
%1 = call i32 @INITIALIZE_RECORD(i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str, i64 0, i64 0), i32 60)
ret void
}

LLVM IR (-O2):
@.str = [1 x i8] zeroinitializer
define void @INITIALIZE_TEXT_RECORD() {
%1 = tail call i32 @INITIALIZE_RECORD(i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str, i64 0, i64 0), i32 60)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ uint32_t;

/* Variables and functions */
int /*<<< orphan*/ net_emit_uint32(int /*<<< orphan*/, int /*<<< orphan*/);
void net_emit_int(uint32_t temp_conn, int val) {
  net_emit_uint32(temp_conn, *(uint32_t *)&val);
}


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

x86 assembly (clang, -O2):
<net_emit_int>:
jmp    1030 <net_emit_uint32@plt>

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

LLVM IR (-O2):
define void @net_emit_int(i32 %0, i32 %1) {
%3 = tail call i32 @net_emit_uint32(i32 %0, i32 %1)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ fcall(int, int, int);
int /*<<< orphan*/ set_err(char *);
char_param() {
  set_err("char_param");
  fcall(1, 01002, -1);
}


x86 assembly (clang, -O0):
<char_param>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    0xed1(%rip),%rdi
call   1040 <set_err@plt>
mov    $0x1,%edi
mov    $0x202,%esi
mov    $0xffffffff,%edx
call   1030 <fcall@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<char_param>:
push   %rax
lea    0xed8(%rip),%rdi
call   1040 <set_err@plt>
mov    $0x1,%edi
mov    $0x202,%esi
mov    $0xffffffff,%edx
pop    %rax
jmp    1030 <fcall@plt>

LLVM IR (-O0):
@.str = [11 x i8] c"char_param\00"
define i32 @char_param() {
%1 = alloca i32
%2 = call i32 @set_err(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0))
%3 = call i32 @fcall(i32 1, i32 514, i32 -1)
%4 = load i32, i32* %1
ret i32 %4
}

LLVM IR (-O2):
@.str = [11 x i8] c"char_param\00"
define i32 @char_param() {
%1 = tail call i32 @set_err(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0))
%2 = tail call i32 @fcall(i32 1, i32 514, i32 -1)
ret i32 undef
}
/* Variables and functions */
int /*<<< orphan*/ HMAC_Update(void *, char const *, size_t);
void HMAC_update(void *ctx, const char *input, size_t len) {
  HMAC_Update(ctx, input, len);
}


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

x86 assembly (clang, -O2):
<HMAC_update>:
jmp    1030 <HMAC_Update@plt>

LLVM IR (-O0):
define void @HMAC_update(i8* %0, i8* %1, i64 %2) {
%4 = alloca i8*
%5 = alloca i8*
%6 = alloca i64
store i8* %0, i8** %4
store i8* %1, i8** %5
store i64 %2, i64* %6
%7 = load i8*, i8** %4
%8 = load i8*, i8** %5
%9 = load i64, i64* %6
%10 = call i32 @HMAC_Update(i8* %7, i8* %8, i64 %9)
ret void
}

LLVM IR (-O2):
define void @HMAC_update(i8* %0, i8* %1, i64 %2) {
%4 = tail call i32 @HMAC_Update(i8* %0, i8* %1, i64 %2)
ret void
}
/* Variables and functions */
double ln_get_dynamical_time_diff(double);
double ln_get_jde(double JD) {
  double JDE;
  double secs_in_day = 24.0 * 60.0 * 60.0;
  JDE = JD + ln_get_dynamical_time_diff(JD) / secs_in_day;
  return JDE;
}


x86 assembly (clang, -O0):
<ln_get_jde>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  0xedb(%rip),%xmm0
movsd  %xmm0,-0x18(%rbp)
movsd  -0x8(%rbp),%xmm0
movsd  %xmm0,-0x20(%rbp)
movsd  -0x8(%rbp),%xmm0
call   1030 <ln_get_dynamical_time_diff@plt>
movaps %xmm0,%xmm1
movsd  -0x20(%rbp),%xmm0
divsd  -0x18(%rbp),%xmm1
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x10(%rbp)
movsd  -0x10(%rbp),%xmm0
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ln_get_jde>:
push   %rax
movsd  %xmm0,(%rsp)
call   1030 <ln_get_dynamical_time_diff@plt>
divsd  0xedd(%rip),%xmm0
addsd  (%rsp),%xmm0
pop    %rax
ret

LLVM IR (-O0):
define double @ln_get_jde(double %0) {
%2 = alloca double
%3 = alloca double
%4 = alloca double
store double %0, double* %2
store double 8.640000e+04, double* %4
%5 = load double, double* %2
%6 = load double, double* %2
%7 = call double @ln_get_dynamical_time_diff(double %6)
%8 = load double, double* %4
%9 = fdiv double %7, %8
%10 = fadd double %5, %9
store double %10, double* %3
%11 = load double, double* %3
ret double %11
}

LLVM IR (-O2):
define double @ln_get_jde(double %0) {
%2 = tail call double @ln_get_dynamical_time_diff(double %0)
%3 = fdiv double %2, 8.640000e+04
%4 = fadd double %3, %0
ret double %4
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
int main(void) {
  char c = '0';
  printf("%i\n", ((((((c) >= 'A' && (c) <= 'Z') ? (1) : (0)) ||
                    (((c) >= 'a' && (c) <= 'z') ? (1) : (0)))
                       ? (1)
                       : (0))));
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movb   $0x30,-0x5(%rbp)
movsbl -0x5(%rbp),%eax
cmp    $0x41,%eax
jl     114f <main+0x3f>
movsbl -0x5(%rbp),%eax
cmp    $0x5a,%eax
jg     114f <main+0x3f>
mov    $0x1,%al
test   $0x1,%al
mov    %al,-0x6(%rbp)
jne    119c <main+0x8c>
jmp    1164 <main+0x54>
mov    $0x1,%al
xor    %ecx,%ecx
test   $0x1,%cl
mov    %al,-0x6(%rbp)
jne    119c <main+0x8c>
jmp    1164 <main+0x54>
movsbl -0x5(%rbp),%ecx
xor    %eax,%eax
cmp    $0x61,%ecx
mov    %al,-0x7(%rbp)
jl     1183 <main+0x73>
movsbl -0x5(%rbp),%eax
cmp    $0x7a,%eax
setle  %al
mov    %al,-0x7(%rbp)
mov    -0x7(%rbp),%dl
xor    %eax,%eax
mov    $0x1,%ecx
test   $0x1,%dl
cmovne %ecx,%eax
cmp    $0x0,%eax
setne  %al
mov    %al,-0x6(%rbp)
mov    -0x6(%rbp),%cl
xor    %esi,%esi
mov    $0x1,%eax
test   $0x1,%cl
cmovne %eax,%esi
lea    0xe4d(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
@.str = [4 x i8] c"%i\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i8
store i32 0, i32* %1
store i8 48, i8* %2
%3 = load i8, i8* %2
%4 = sext i8 %3 to i32
%5 = icmp sge i32 %4, 65
br i1 %5, label %6, label %11
6: ; preds = %0
%7 = load i8, i8* %2
%8 = sext i8 %7 to i32
%9 = icmp sle i32 %8, 90
br i1 %9, label %10, label %11
10: ; preds = %6
br i1 true, label %25, label %12
11: ; preds = %6, %0
br i1 false, label %25, label %12
12: ; preds = %11, %10
%13 = load i8, i8* %2
%14 = sext i8 %13 to i32
%15 = icmp sge i32 %14, 97
br i1 %15, label %16, label %20
16: ; preds = %12
%17 = load i8, i8* %2
%18 = sext i8 %17 to i32
%19 = icmp sle i32 %18, 122
br label %20
20: ; preds = %16, %12
%21 = phi i1 [ false, %12 ], [ %19, %16 ]
%22 = zext i1 %21 to i64
%23 = select i1 %21, i32 1, i32 0
%24 = icmp ne i32 %23, 0
br label %25
25: ; preds = %20, %11, %10
%26 = phi i1 [ true, %11 ], [ true, %10 ], [ %24, %20 ]
%27 = zext i1 %26 to i64
%28 = select i1 %26, i32 1, i32 0
%29 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %28)
ret i32 0
}

LLVM IR (-O2):
@.str = [4 x i8] c"%i\0A\00"
define i32 @main() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 0)
ret i32 0
}
int libc() { return 0; }


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

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

LLVM IR (-O0):
define i32 @libc() {
ret i32 0
}

LLVM IR (-O2):
define i32 @libc() {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
int /*<<< orphan*/ scanf(char *, int *, int *);
int main() {
  int a;
  int b;
  int bit;
  scanf("%d %d", &a, &b);
  bit = ((b >> a) & 1);
  printf("%d\n", bit);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeca(%rip),%rdi
lea    -0x8(%rbp),%rsi
lea    -0xc(%rbp),%rdx
call   1040 <scanf@plt>
mov    -0xc(%rbp),%eax
mov    -0x8(%rbp),%ecx
sar    %cl,%eax
and    $0x1,%eax
mov    %eax,-0x10(%rbp)
mov    -0x10(%rbp),%esi
lea    0xeab(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xed8(%rip),%rdi
lea    0x4(%rsp),%rsi
mov    %rsp,%rdx
call   1040 <scanf@plt>
mov    (%rsp),%esi
mov    0x4(%rsp),%cl
shr    %cl,%esi
and    $0x1,%esi
lea    0xebe(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
@.str = [6 x i8] c"%d %d\00"
@.str.1 = [4 x i8] c"%d\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = bitcast i32* %1 to i8*
%4 = bitcast i32* %2 to i8*
%5 = call i32 @scanf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i32* %1, i32* %2)
%6 = load i32, i32* %2
%7 = load i32, i32* %1
%8 = lshr i32 %6, %7
%9 = and i32 %8, 1
%10 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i32 %9)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ safefree(void *);
void sha1_free_context(void *handle) { safefree(handle); }


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

x86 assembly (clang, -O2):
<sha1_free_context>:
jmp    1030 <safefree@plt>

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

LLVM IR (-O2):
define void @sha1_free_context(i8* %0) {
%2 = tail call i32 @safefree(i8* %0)
ret void
}
float ldfloat(p)
register char *p;
{
  union {
    float fval;
    int ival;
  } uval;
  register unsigned int val;
  val = *((unsigned char *)p++);
  val = (val << 8) + *((unsigned char *)p++);
  val = (val << 8) + *((unsigned char *)p++);
  val = (val << 8) + *((unsigned char *)p++);
  uval.ival = val;
  return (uval.fval);
}


x86 assembly (clang, -O0):
<ldfloat>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x8(%rbp)
movzbl (%rax),%eax
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
shl    $0x8,%eax
mov    -0x8(%rbp),%rcx
mov    %rcx,%rdx
add    $0x1,%rdx
mov    %rdx,-0x8(%rbp)
movzbl (%rcx),%ecx
add    %ecx,%eax
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
shl    $0x8,%eax
mov    -0x8(%rbp),%rcx
mov    %rcx,%rdx
add    $0x1,%rdx
mov    %rdx,-0x8(%rbp)
movzbl (%rcx),%ecx
add    %ecx,%eax
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
shl    $0x8,%eax
mov    -0x8(%rbp),%rcx
mov    %rcx,%rdx
add    $0x1,%rdx
mov    %rdx,-0x8(%rbp)
movzbl (%rcx),%ecx
add    %ecx,%eax
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
mov    %eax,-0x10(%rbp)
movss  -0x10(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<ldfloat>:
mov    (%rdi),%eax
bswap  %eax
movd   %eax,%xmm0
ret

LLVM IR (-O0):
%union.anon = type { float }
define float @ldfloat(i8* %0) {
%2 = alloca i8*
%3 = alloca %union.anon
%4 = alloca i32
store i8* %0, i8** %2
%5 = load i8*, i8** %2
%6 = getelementptr inbounds i8, i8* %5, i32 1
store i8* %6, i8** %2
%7 = load i8, i8* %5
%8 = zext i8 %7 to i32
store i32 %8, i32* %4
%9 = load i32, i32* %4
%10 = shl i32 %9, 8
%11 = load i8*, i8** %2
%12 = getelementptr inbounds i8, i8* %11, i32 1
store i8* %12, i8** %2
%13 = load i8, i8* %11
%14 = zext i8 %13 to i32
%15 = add i32 %10, %14
store i32 %15, i32* %4
%16 = load i32, i32* %4
%17 = shl i32 %16, 8
%18 = load i8*, i8** %2
%19 = getelementptr inbounds i8, i8* %18, i32 1
store i8* %19, i8** %2
%20 = load i8, i8* %18
%21 = zext i8 %20 to i32
%22 = add i32 %17, %21
store i32 %22, i32* %4
%23 = load i32, i32* %4
%24 = shl i32 %23, 8
%25 = load i8*, i8** %2
%26 = getelementptr inbounds i8, i8* %25, i32 1
store i8* %26, i8** %2
%27 = load i8, i8* %25
%28 = zext i8 %27 to i32
%29 = add i32 %24, %28
store i32 %29, i32* %4
%30 = load i32, i32* %4
%31 = bitcast %union.anon* %3 to i32*
store i32 %30, i32* %31
%32 = bitcast %union.anon* %3 to float*
%33 = load float, float* %32
ret float %33
}

LLVM IR (-O2):
define float @ldfloat(i8* nocapture %0) {
%2 = getelementptr inbounds i8, i8* %0, i64 1
%3 = load i8, i8* %0
%4 = zext i8 %3 to i32
%5 = getelementptr inbounds i8, i8* %0, i64 2
%6 = load i8, i8* %2
%7 = zext i8 %6 to i32
%8 = shl nuw nsw i32 %4, 16
%9 = shl nuw nsw i32 %7, 8
%10 = or i32 %9, %8
%11 = getelementptr inbounds i8, i8* %0, i64 3
%12 = load i8, i8* %5
%13 = zext i8 %12 to i32
%14 = or i32 %10, %13
%15 = shl nuw i32 %14, 8
%16 = load i8, i8* %11
%17 = zext i8 %16 to i32
%18 = or i32 %15, %17
%19 = bitcast i32 %18 to float
ret float %19
}
/* Variables and functions */
unsigned int make_prime_bound(unsigned int);
int make_prime_check(unsigned nr) {
  unsigned x = 3;
  unsigned b = make_prime_bound(nr);
  while (x <= b) {
    if (0 == (nr % x))
      return 0;
    x += 2;
  }
  return 1;
}


x86 assembly (clang, -O0):
<make_prime_check>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
movl   $0x3,-0xc(%rbp)
mov    -0x8(%rbp),%edi
call   1030 <make_prime_bound@plt>
mov    %eax,-0x10(%rbp)
mov    -0xc(%rbp),%eax
cmp    -0x10(%rbp),%eax
ja     1165 <make_prime_check+0x55>
mov    -0x8(%rbp),%eax
xor    %edx,%edx
divl   -0xc(%rbp)
xor    %eax,%eax
cmp    %edx,%eax
jne    1157 <make_prime_check+0x47>
movl   $0x0,-0x4(%rbp)
jmp    116c <make_prime_check+0x5c>
mov    -0xc(%rbp),%eax
add    $0x2,%eax
mov    %eax,-0xc(%rbp)
jmp    112d <make_prime_check+0x1d>
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<make_prime_check>:
push   %rbx
mov    %edi,%ebx
call   1030 <make_prime_bound@plt>
cmp    $0x3,%eax
jb     1141 <make_prime_check+0x31>
mov    %eax,%ecx
mov    $0x3,%edi
xor    %esi,%esi
cs nopw 0x0(%rax,%rax,1)
mov    %ebx,%eax
xor    %edx,%edx
div    %edi
test   %edx,%edx
je     1146 <make_prime_check+0x36>
add    $0x2,%edi
cmp    %ecx,%edi
jbe    1130 <make_prime_check+0x20>
mov    $0x1,%esi
mov    %esi,%eax
pop    %rbx
ret

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

LLVM IR (-O2):
define i32 @make_prime_check(i32 %0) {
%2 = tail call i32 @make_prime_bound(i32 %0)
%3 = icmp ult i32 %2, 3
br i1 %3, label %11, label %6
4: ; preds = %6
%5 = icmp ugt i32 %10, %2
br i1 %5, label %11, label %6
6: ; preds = %1, %4
%7 = phi i32 [ %10, %4 ], [ 3, %1 ]
%8 = urem i32 %0, %7
%9 = icmp eq i32 %8, 0
%10 = add i32 %7, 2
br i1 %9, label %11, label %4
11: ; preds = %6, %4, %1
%12 = phi i32 [ 1, %1 ], [ 1, %4 ], [ 0, %6 ]
ret i32 %12
}
int unix_fcntl_o_search() { return -1; }


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

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

LLVM IR (-O0):
define i32 @unix_fcntl_o_search() {
ret i32 -1
}

LLVM IR (-O2):
define i32 @unix_fcntl_o_search() {
ret i32 -1
}
/* Variables and functions */
int /*<<< orphan*/ HplMsp430GeneralIOP__36__IO__clr();
void Msp430GpioC__7__HplGeneralIO__clr(void) {
  HplMsp430GeneralIOP__36__IO__clr();
}


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

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

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

LLVM IR (-O2):
define void @Msp430GpioC__7__HplGeneralIO__clr() {
%1 = tail call i32 (...) @HplMsp430GeneralIOP__36__IO__clr()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
int /*<<< orphan*/ stdout;
int main(int argc, char *argv[]) {
  fprintf(stdout, "hello world\n");
  exit(0);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    0x2ea3(%rip),%rax
mov    (%rax),%edi
lea    0xeba(%rip),%rsi
call   1030 <fprintf@plt>
xor    %edi,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    0x2eb8(%rip),%rax
mov    (%rax),%edi
lea    0xecf(%rip),%rsi
call   1030 <fprintf@plt>
xor    %edi,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@stdout = global i32 0
@.str = [13 x i8] c"hello world\0A\00"
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* @stdout
%7 = call i32 @fprintf(i32 %6, i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0))
%8 = call i32 @exit(i32 0)
unreachable
}

LLVM IR (-O2):
@stdout = global i32 0
@.str = [13 x i8] c"hello world\0A\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = load i32, i32* @stdout
%4 = tail call i32 @fprintf(i32 %3, i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0))
%5 = tail call i32 @exit(i32 0)
unreachable
}
int get_f_link(const int *mem, int header) { return (mem[header + 1]); }


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

x86 assembly (clang, -O2):
<get_f_link>:
movslq %esi,%rax
mov    0x4(%rdi,%rax,4),%eax
ret

LLVM IR (-O0):
define i32 @get_f_link(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 = add nsw i32 %6, 1
%8 = sext i32 %7 to i64
%9 = getelementptr inbounds i32, i32* %5, i64 %8
%10 = load i32, i32* %9
ret i32 %10
}

LLVM IR (-O2):
define i32 @get_f_link(i32* nocapture %0, i32 %1) {
%3 = add nsw i32 %1, 1
%4 = sext i32 %3 to i64
%5 = getelementptr inbounds i32, i32* %0, i64 %4
%6 = load i32, i32* %5
ret i32 %6
}
void gtk_text_iter_forward_chars() {}


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

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

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

LLVM IR (-O2):
define void @gtk_text_iter_forward_chars() {
ret void
}
/* Variables and functions */
int dkHibbard(int, int);
void shellSort(int array[], int n, int t) {
  void shellInsert(int array[], int n, int dk);
  int i;
  for (i = 1; i <= t; i++)
    shellInsert(array, n, dkHibbard(t, i));
}


x86 assembly (clang, -O0):
<shellSort>:
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    -0x14(%rbp),%eax
cmp    -0x10(%rbp),%eax
jg     117a <shellSort+0x5a>
mov    -0x8(%rbp),%rax
mov    %rax,-0x20(%rbp)
mov    -0xc(%rbp),%eax
mov    %eax,-0x18(%rbp)
mov    -0x10(%rbp),%edi
mov    -0x14(%rbp),%esi
call   1040 <dkHibbard@plt>
mov    -0x20(%rbp),%rdi
mov    -0x18(%rbp),%esi
mov    %eax,%edx
call   1030 <shellInsert@plt>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    1139 <shellSort+0x19>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<shellSort>:
push   %rbp
push   %r15
push   %r14
push   %r12
push   %rbx
test   %edx,%edx
jle    1169 <shellSort+0x49>
mov    %edx,%r12d
mov    %esi,%r14d
mov    %rdi,%r15
mov    %edx,%ebx
neg    %ebx
mov    $0x1,%ebp
xchg   %ax,%ax
mov    %r12d,%edi
mov    %ebp,%esi
call   1040 <dkHibbard@plt>
mov    %r15,%rdi
mov    %r14d,%esi
mov    %eax,%edx
call   1030 <shellInsert@plt>
lea    (%rbx,%rbp,1),%eax
add    $0x1,%eax
mov    %ebp,%ecx
add    $0x1,%ecx
mov    %ecx,%ebp
cmp    $0x1,%eax
jne    1140 <shellSort+0x20>
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
define void @shellSort(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
br label %8
8: ; preds = %18, %3
%9 = load i32, i32* %7
%10 = load i32, i32* %6
%11 = icmp sle i32 %9, %10
br i1 %11, label %12, label %21
12: ; preds = %8
%13 = load i32*, i32** %4
%14 = load i32, i32* %5
%15 = load i32, i32* %6
%16 = load i32, i32* %7
%17 = call i32 @dkHibbard(i32 %15, i32 %16)
br label %18
18: ; preds = %12
%19 = load i32, i32* %7
%20 = add nsw i32 %19, 1
store i32 %20, i32* %7
br label %8
21: ; preds = %8
ret void
}

LLVM IR (-O2):
define void @shellSort(i32* %0, i32 %1, i32 %2) {
%4 = icmp slt i32 %2, 1
br i1 %4, label %10, label %5
5: ; preds = %3, %5
%6 = phi i32 [ %8, %5 ], [ 1, %3 ]
%7 = tail call i32 @dkHibbard(i32 %2, i32 %6)
tail call void @shellInsert(i32* %0, i32 %1, i32 %7)
%8 = add nuw i32 %6, 1
%9 = icmp eq i32 %6, %2
br i1 %9, label %10, label %5
10: ; preds = %5, %3
ret void
}
flush_map_index() {}


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

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

LLVM IR (-O0):
define i32 @flush_map_index() {
%1 = alloca i32
%2 = load i32, i32* %1
ret i32 %2
}

LLVM IR (-O2):
define i32 @flush_map_index() {
ret i32 undef
}
int allEvenBits(int x) {
  int t = 0x55;
  t = t | (t << 8);
  t = t | (t << 16);
  return !((x & t) ^ t);
}


x86 assembly (clang, -O0):
<allEvenBits>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
movl   $0x55,-0x8(%rbp)
mov    -0x8(%rbp),%eax
mov    -0x8(%rbp),%ecx
shl    $0x8,%ecx
or     %ecx,%eax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
mov    -0x8(%rbp),%ecx
shl    $0x10,%ecx
or     %ecx,%eax
mov    %eax,-0x8(%rbp)
mov    -0x4(%rbp),%eax
and    -0x8(%rbp),%eax
xor    -0x8(%rbp),%eax
cmp    $0x0,%eax
setne  %al
xor    $0xff,%al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<allEvenBits>:
not    %edi
xor    %eax,%eax
test   $0x55555555,%edi
sete   %al
ret

LLVM IR (-O0):
define i32 @allEvenBits(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %2
store i32 85, i32* %3
%4 = load i32, i32* %3
%5 = load i32, i32* %3
%6 = shl i32 %5, 8
%7 = or i32 %4, %6
store i32 %7, i32* %3
%8 = load i32, i32* %3
%9 = load i32, i32* %3
%10 = shl i32 %9, 16
%11 = or i32 %8, %10
store i32 %11, i32* %3
%12 = load i32, i32* %2
%13 = load i32, i32* %3
%14 = and i32 %12, %13
%15 = load i32, i32* %3
%16 = xor i32 %14, %15
%17 = icmp ne i32 %16, 0
%18 = xor i1 %17, true
%19 = zext i1 %18 to i32
ret i32 %19
}

LLVM IR (-O2):
define i32 @allEvenBits(i32 %0) {
%2 = and i32 %0, 1431655765
%3 = icmp eq i32 %2, 1431655765
%4 = zext i1 %3 to i32
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ roadmap_main_remove_periodic(void (*)());
int /*<<< orphan*/ roadmap_messagebox(char *, char *);
int /*<<< orphan*/ roadmap_twitter_setting_dialog();
void twitter_un_empty(void) {
  roadmap_main_remove_periodic(twitter_un_empty);
  roadmap_twitter_setting_dialog();
  roadmap_messagebox("Error", "Twitter user name is empty");
}


x86 assembly (clang, -O0):
<twitter_un_empty>:
push   %rbp
mov    %rsp,%rbp
mov    0x2ea5(%rip),%rdi
call   1040 <roadmap_main_remove_periodic@plt>
mov    $0x0,%al
call   1030 <roadmap_twitter_setting_dialog@plt>
lea    0xeb2(%rip),%rdi
lea    0xeb1(%rip),%rsi
call   1050 <roadmap_messagebox@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<twitter_un_empty>:
push   %rax
mov    0x2ea8(%rip),%rdi
call   1040 <roadmap_main_remove_periodic@plt>
xor    %eax,%eax
call   1030 <roadmap_twitter_setting_dialog@plt>
lea    0xeb5(%rip),%rdi
lea    0xeb4(%rip),%rsi
pop    %rax
jmp    1050 <roadmap_messagebox@plt>

LLVM IR (-O0):
@.str = [6 x i8] c"Error\00"
@.str.1 = [27 x i8] c"Twitter user name is empty\00"
define void @twitter_un_empty() {
%1 = call i32 @roadmap_main_remove_periodic(void (...)* bitcast (void ()* @twitter_un_empty to void (...)*))
%2 = call i32 (...) @roadmap_twitter_setting_dialog()
%3 = call i32 @roadmap_messagebox(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [6 x i8] c"Error\00"
@.str.1 = [27 x i8] c"Twitter user name is empty\00"
define void @twitter_un_empty() {
%1 = tail call i32 @roadmap_main_remove_periodic(void (...)* bitcast (void ()* @twitter_un_empty to void (...)*))
%2 = tail call i32 (...) @roadmap_twitter_setting_dialog()
%3 = tail call i32 @roadmap_messagebox(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Type definitions */
typedef int uint64_t;

/* Variables and functions */
int CHAR_BIT;
uint64_t safe_rshift_func_uint64_t_u_s(uint64_t _left, int _right) {
  return (((((int)(_right)) < ((uint64_t)0)) ||
           (((int)(_right)) >= sizeof(uint64_t) * CHAR_BIT))
              ? ((uint64_t)(_left))
              : (((uint64_t)(_left)) >> ((int)(_right))));
}


x86 assembly (clang, -O0):
<safe_rshift_func_uint64_t_u_s>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
cmpl   $0x0,-0x8(%rbp)
jl     112f <safe_rshift_func_uint64_t_u_s+0x2f>
movslq -0x8(%rbp),%rax
mov    0x2ec1(%rip),%rcx
movslq (%rcx),%rcx
shl    $0x2,%rcx
cmp    %rcx,%rax
jb     113a <safe_rshift_func_uint64_t_u_s+0x3a>
mov    -0x4(%rbp),%eax
mov    %eax,-0xc(%rbp)
jmp    1145 <safe_rshift_func_uint64_t_u_s+0x45>
mov    -0x4(%rbp),%eax
mov    -0x8(%rbp),%ecx
sar    %cl,%eax
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<safe_rshift_func_uint64_t_u_s>:
mov    %edi,%eax
test   %esi,%esi
js     1120 <safe_rshift_func_uint64_t_u_s+0x20>
mov    %esi,%edx
mov    0x2ed1(%rip),%rcx
movslq (%rcx),%rdi
shl    $0x2,%rdi
xor    %ecx,%ecx
cmp    %rdx,%rdi
cmova  %esi,%ecx
sar    %cl,%eax
ret

LLVM IR (-O0):
@CHAR_BIT = global i32 0
define i32 @safe_rshift_func_uint64_t_u_s(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%5 = load i32, i32* %4
%6 = icmp slt i32 %5, 0
br i1 %6, label %14, label %7
7: ; preds = %2
%8 = load i32, i32* %4
%9 = sext i32 %8 to i64
%10 = load i32, i32* @CHAR_BIT
%11 = sext i32 %10 to i64
%12 = mul i64 4, %11
%13 = icmp uge i64 %9, %12
br i1 %13, label %14, label %16
14: ; preds = %7, %2
%15 = load i32, i32* %3
br label %20
16: ; preds = %7
%17 = load i32, i32* %3
%18 = load i32, i32* %4
%19 = ashr i32 %17, %18
br label %20
20: ; preds = %16, %14
%21 = phi i32 [ %15, %14 ], [ %19, %16 ]
ret i32 %21
}

LLVM IR (-O2):
@CHAR_BIT = global i32 0
define i32 @safe_rshift_func_uint64_t_u_s(i32 %0, i32 %1) {
%3 = icmp slt i32 %1, 0
br i1 %3, label %12, label %4
4: ; preds = %2
%5 = zext i32 %1 to i64
%6 = load i32, i32* @CHAR_BIT
%7 = sext i32 %6 to i64
%8 = shl nsw i64 %7, 2
%9 = icmp ugt i64 %8, %5
%10 = select i1 %9, i32 %1, i32 0
%11 = ashr i32 %0, %10
br label %12
12: ; preds = %4, %2
%13 = phi i32 [ %0, %2 ], [ %11, %4 ]
ret i32 %13
}
/* Type definitions */
struct pbst_table {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ assert(int);
void **pbst_probe(struct pbst_table *, void *);
void(pbst_assert_insert)(struct pbst_table *table, void *item) {
  void **p = pbst_probe(table, item);
  assert(p != NULL && *p == item);
}


x86 assembly (clang, -O0):
<pbst_assert_insert>:
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 <pbst_probe@plt>
mov    %rax,-0x18(%rbp)
xor    %eax,%eax
cmpq   $0x0,-0x18(%rbp)
mov    %al,-0x19(%rbp)
je     1162 <pbst_assert_insert+0x42>
mov    -0x18(%rbp),%rax
mov    (%rax),%rax
cmp    -0x10(%rbp),%rax
sete   %al
mov    %al,-0x19(%rbp)
mov    -0x19(%rbp),%al
and    $0x1,%al
movzbl %al,%edi
call   1040 <assert@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<pbst_assert_insert>:
push   %rbx
mov    %rsi,%rbx
call   1030 <pbst_probe@plt>
xor    %edi,%edi
test   %rax,%rax
je     1137 <pbst_assert_insert+0x17>
cmp    %rbx,(%rax)
sete   %dil
pop    %rbx
jmp    1040 <assert@plt>

LLVM IR (-O0):
%struct.pbst_table = type { i32 }
define void @pbst_assert_insert(%struct.pbst_table* %0, i8* %1) {
%3 = alloca %struct.pbst_table*
%4 = alloca i8*
%5 = alloca i8**
store %struct.pbst_table* %0, %struct.pbst_table** %3
store i8* %1, i8** %4
%6 = load %struct.pbst_table*, %struct.pbst_table** %3
%7 = load i8*, i8** %4
%8 = call i8** @pbst_probe(%struct.pbst_table* %6, i8* %7)
store i8** %8, i8*** %5
%9 = load i8**, i8*** %5
%10 = icmp ne i8** %9, null
br i1 %10, label %11, label %16
11: ; preds = %2
%12 = load i8**, i8*** %5
%13 = load i8*, i8** %12
%14 = load i8*, i8** %4
%15 = icmp eq i8* %13, %14
br label %16
16: ; preds = %11, %2
%17 = phi i1 [ false, %2 ], [ %15, %11 ]
%18 = zext i1 %17 to i32
%19 = call i32 @assert(i32 %18)
ret void
}

LLVM IR (-O2):
%struct.pbst_table = type { i32 }
define void @pbst_assert_insert(%struct.pbst_table* %0, i8* %1) {
%3 = tail call i8** @pbst_probe(%struct.pbst_table* %0, i8* %1)
%4 = icmp eq i8** %3, null
br i1 %4, label %9, label %5
5: ; preds = %2
%6 = load i8*, i8** %3
%7 = icmp eq i8* %6, %1
%8 = zext i1 %7 to i32
br label %9
9: ; preds = %5, %2
%10 = phi i32 [ 0, %2 ], [ %8, %5 ]
%11 = tail call i32 @assert(i32 %10)
ret void
}
/* Variables and functions */
int test_svarint(int);
char *test_svarint5() {
  do {
    if (!(test_svarint(0x04) == 2))
      return "error, test_svarint4";
  } while (0);
  return 0;
}


x86 assembly (clang, -O0):
<test_svarint5>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x4,%edi
call   1030 <test_svarint@plt>
cmp    $0x2,%eax
je     113b <test_svarint5+0x2b>
lea    0xece(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    1148 <test_svarint5+0x38>
jmp    1140 <test_svarint5+0x30>
movq   $0x0,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_svarint5>:
push   %rax
mov    $0x4,%edi
call   1030 <test_svarint@plt>
xor    %ecx,%ecx
cmp    $0x2,%eax
lea    0xed9(%rip),%rax
cmovne %rax,%rcx
mov    %rcx,%rax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [21 x i8] c"error, test_svarint4\00"
define i8* @test_svarint5() {
%1 = alloca i8*
br label %2
2: ; preds = %0
%3 = call i32 @test_svarint(i32 4)
%4 = icmp eq i32 %3, 2
br i1 %4, label %6, label %5
5: ; preds = %2
store i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str, i64 0, i64 0), i8** %1
br label %8
6: ; preds = %2
br label %7
7: ; preds = %6
store i8* null, i8** %1
br label %8
8: ; preds = %7, %5
%9 = load i8*, i8** %1
ret i8* %9
}

LLVM IR (-O2):
@.str = [21 x i8] c"error, test_svarint4\00"
define i8* @test_svarint5() {
%1 = tail call i32 @test_svarint(i32 4)
%2 = icmp eq i32 %1, 2
%3 = select i1 %2, i8* null, i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str, i64 0, i64 0)
ret i8* %3
}
int hfile_always_remote(const char *fname) { return 1; }


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

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

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

LLVM IR (-O2):
define i32 @hfile_always_remote(i8* nocapture readnone %0) {
ret i32 1
}
/* Variables and functions */
int timer_usecs();
int timer_wait(int dt) {
  int t0;
  int t1;
  t0 = timer_usecs();
  t1 = t0 + dt;
  for (;;) {
    t0 = timer_usecs();
    if ((t0 - t1) >= 0) {
      return t0;
    }
  }
}


x86 assembly (clang, -O0):
<timer_wait>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    $0x0,%al
call   1030 <timer_usecs@plt>
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
add    -0x4(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    $0x0,%al
call   1030 <timer_usecs@plt>
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
sub    -0xc(%rbp),%eax
cmp    $0x0,%eax
jl     1150 <timer_wait+0x40>
mov    -0x8(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret
jmp    112e <timer_wait+0x1e>

x86 assembly (clang, -O2):
<timer_wait>:
push   %rbp
push   %rbx
push   %rax
mov    %edi,%ebp
xor    %eax,%eax
call   1030 <timer_usecs@plt>
mov    %eax,%ebx
add    %ebp,%ebx
xor    %eax,%eax
call   1030 <timer_usecs@plt>
cmp    %ebx,%eax
jl     1120 <timer_wait+0x10>
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
define i32 @timer_wait(i32 %0) {
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %2
%5 = call i32 (...) @timer_usecs()
store i32 %5, i32* %3
%6 = load i32, i32* %3
%7 = load i32, i32* %2
%8 = add nsw i32 %6, %7
store i32 %8, i32* %4
br label %9
9: ; preds = %17, %1
%10 = call i32 (...) @timer_usecs()
store i32 %10, i32* %3
%11 = load i32, i32* %3
%12 = load i32, i32* %4
%13 = sub nsw i32 %11, %12
%14 = icmp sge i32 %13, 0
br i1 %14, label %15, label %17
15: ; preds = %9
%16 = load i32, i32* %3
ret i32 %16
17: ; preds = %9
br label %9
}

LLVM IR (-O2):
define i32 @timer_wait(i32 %0) {
%2 = tail call i32 (...) @timer_usecs()
%3 = add nsw i32 %2, %0
br label %4
4: ; preds = %4, %1
%5 = tail call i32 (...) @timer_usecs()
%6 = icmp slt i32 %5, %3
br i1 %6, label %4, label %7
7: ; preds = %4
ret i32 %5
}
unsigned str_hash(const char *str) {
  unsigned h = 0;
  while (*str)
    h = (h << 4) + *(const unsigned char *)str++;
  return h;
}


x86 assembly (clang, -O0):
<str_hash>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
mov    -0x8(%rbp),%rax
cmpb   $0x0,(%rax)
je     113e <str_hash+0x3e>
mov    -0xc(%rbp),%eax
shl    $0x4,%eax
mov    -0x8(%rbp),%rcx
mov    %rcx,%rdx
add    $0x1,%rdx
mov    %rdx,-0x8(%rbp)
movzbl (%rcx),%ecx
add    %ecx,%eax
mov    %eax,-0xc(%rbp)
jmp    110f <str_hash+0xf>
mov    -0xc(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<str_hash>:
mov    (%rdi),%cl
test   %cl,%cl
je     1124 <str_hash+0x24>
add    $0x1,%rdi
xor    %eax,%eax
nopl   0x0(%rax)
shl    $0x4,%eax
movzbl %cl,%ecx
add    %ecx,%eax
movzbl (%rdi),%ecx
add    $0x1,%rdi
test   %cl,%cl
jne    1110 <str_hash+0x10>
ret
xor    %eax,%eax
ret

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

LLVM IR (-O2):
define i32 @str_hash(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = icmp eq i8 %2, 0
br i1 %3, label %14, label %4
4: ; preds = %1, %4
%5 = phi i8 [ %12, %4 ], [ %2, %1 ]
%6 = phi i32 [ %11, %4 ], [ 0, %1 ]
%7 = phi i8* [ %9, %4 ], [ %0, %1 ]
%8 = shl i32 %6, 4
%9 = getelementptr inbounds i8, i8* %7, i64 1
%10 = zext i8 %5 to i32
%11 = add i32 %8, %10
%12 = load i8, i8* %9
%13 = icmp eq i8 %12, 0
br i1 %13, label %14, label %4
14: ; preds = %4, %1
%15 = phi i32 [ 0, %1 ], [ %11, %4 ]
ret i32 %15
}