xunge/DecIR huggingface dataset:
int s_min(int a, int b) { return (a < b) ? a : b; }


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

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

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

LLVM IR (-O2):
define i32 @s_min(i32 %0, i32 %1) {
%3 = icmp slt i32 %0, %1
%4 = select i1 %3, i32 %0, i32 %1
ret i32 %4
}
int test_imm_8Aint64_highword_mem(long long *val) {
  return ((*val >> 32) & (0x8A << 0)) ? -20 : -40;
}


x86 assembly (clang, -O0):
<test_imm_8Aint64_highword_mem>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%rdx
sar    $0x20,%rdx
and    $0x8a,%rdx
mov    $0xffffffd8,%eax
mov    $0xffffffec,%ecx
cmp    $0x0,%rdx
cmovne %ecx,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @test_imm_8Aint64_highword_mem(i64* %0) {
%2 = alloca i64*
store i64* %0, i64** %2
%3 = load i64*, i64** %2
%4 = load i64, i64* %3
%5 = ashr i64 %4, 32
%6 = and i64 %5, 138
%7 = icmp ne i64 %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_8Aint64_highword_mem(i64* nocapture %0) {
%2 = load i64, i64* %0
%3 = and i64 %2, 592705486848
%4 = icmp eq i64 %3, 0
%5 = select i1 %4, i32 -40, i32 -20
ret i32 %5
}
/* Variables and functions */
double rand();
double generateTrueAlea(void) { return rand(); }


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

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

LLVM IR (-O0):
define double @generateTrueAlea() {
%1 = call double (...) @rand()
ret double %1
}

LLVM IR (-O2):
define double @generateTrueAlea() {
%1 = tail call double (...) @rand()
ret double %1
}
struct iam_key *iam_leaf_key_at(struct iam_lentry *entry) {
  return (struct iam_key *)entry;
}


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

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

LLVM IR (-O0):
%struct.iam_key = type opaque
%struct.iam_lentry = type opaque
define %struct.iam_key* @iam_leaf_key_at(%struct.iam_lentry* %0) {
%2 = alloca %struct.iam_lentry*
store %struct.iam_lentry* %0, %struct.iam_lentry** %2
%3 = load %struct.iam_lentry*, %struct.iam_lentry** %2
%4 = bitcast %struct.iam_lentry* %3 to %struct.iam_key*
ret %struct.iam_key* %4
}

LLVM IR (-O2):
%struct.iam_key = type opaque
%struct.iam_lentry = type opaque
define %struct.iam_key* @iam_leaf_key_at(%struct.iam_lentry* readnone %0) {
%2 = bitcast %struct.iam_lentry* %0 to %struct.iam_key*
ret %struct.iam_key* %2
}
int mus_audio_read(int line, char *buf, int bytes) { return (-1); }


x86 assembly (clang, -O0):
<mus_audio_read>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    $0xffffffff,%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @mus_audio_read(i32 %0, i8* nocapture readnone %1, i32 %2) {
ret i32 -1
}
/* Type definitions */
typedef int /*<<< orphan*/ uint32_t;

/* Variables and functions */
int /*<<< orphan*/ htonl(int /*<<< orphan*/ const);
char *pack_u32(const uint32_t *data, char *buffer) {
  *((uint32_t *)buffer) = htonl(*data);
  return buffer + sizeof(*data);
}


x86 assembly (clang, -O0):
<pack_u32>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%edi
call   1030 <htonl@plt>
mov    %eax,%ecx
mov    -0x10(%rbp),%rax
mov    %ecx,(%rax)
mov    -0x10(%rbp),%rax
add    $0x4,%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<pack_u32>:
push   %rbx
mov    %rsi,%rbx
mov    (%rdi),%edi
call   1030 <htonl@plt>
mov    %eax,(%rbx)
add    $0x4,%rbx
mov    %rbx,%rax
pop    %rbx
ret

LLVM IR (-O0):
define i8* @pack_u32(i32* %0, i8* %1) {
%3 = alloca i32*
%4 = alloca i8*
store i32* %0, i32** %3
store i8* %1, i8** %4
%5 = load i32*, i32** %3
%6 = load i32, i32* %5
%7 = call i32 @htonl(i32 %6)
%8 = load i8*, i8** %4
%9 = bitcast i8* %8 to i32*
store i32 %7, i32* %9
%10 = load i8*, i8** %4
%11 = getelementptr inbounds i8, i8* %10, i64 4
ret i8* %11
}

LLVM IR (-O2):
define i8* @pack_u32(i32* nocapture %0, i8* writeonly %1) {
%3 = load i32, i32* %0
%4 = tail call i32 @htonl(i32 %3)
%5 = bitcast i8* %1 to i32*
store i32 %4, i32* %5
%6 = getelementptr inbounds i8, i8* %1, i64 4
ret i8* %6
}
/* Variables and functions */
long hash(char *);
int /*<<< orphan*/ printf(char *, long);
int /*<<< orphan*/ scanf(char *, char *);
int main() {
  long hesche;
  char duma[200];
  scanf("%s", duma);
  hesche = hash(duma);
  printf("%ld", hesche);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0xe0,%rsp
movl   $0x0,-0x4(%rbp)
lea    -0xe0(%rbp),%rsi
lea    0xeb0(%rip),%rdi
call   1050 <scanf@plt>
lea    -0xe0(%rbp),%rdi
call   1030 <hash@plt>
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rsi
lea    0xe93(%rip),%rdi
call   1040 <printf@plt>
xor    %eax,%eax
add    $0xe0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0xd0,%rsp
lea    0xec1(%rip),%rdi
mov    %rsp,%rbx
mov    %rbx,%rsi
call   1050 <scanf@plt>
mov    %rbx,%rdi
call   1030 <hash@plt>
lea    0xeaa(%rip),%rdi
mov    %rax,%rsi
call   1040 <printf@plt>
xor    %eax,%eax
add    $0xd0,%rsp
pop    %rbx
ret

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

LLVM IR (-O2):
@.str = [3 x i8] c"%s\00"
@.str.1 = [4 x i8] c"%ld\00"
define i32 @main() {
%1 = alloca [200 x i8]
%2 = getelementptr inbounds [200 x i8], [200 x i8]* %1, i64 0, i64 0
%3 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* %2)
%4 = call i64 @hash(i8* %2)
%5 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i64 %4)
ret i32 0
}
void CRYPTO_remalloc(void) {}


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

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

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

LLVM IR (-O2):
define void @CRYPTO_remalloc() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ DEBUG_ASSERT(int /*<<< orphan*/);
int /*<<< orphan*/ UARTBaseValid(unsigned long);
void UART9BitDisable(unsigned long ulBase) {
  DEBUG_ASSERT(UARTBaseValid(ulBase));
  (*((volatile unsigned long *)(ulBase + 0x000000A4))) &= ~0x00008000;
}


x86 assembly (clang, -O0):
<UART9BitDisable>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <UARTBaseValid@plt>
mov    %eax,%edi
call   1030 <DEBUG_ASSERT@plt>
mov    -0x8(%rbp),%rax
mov    0xa4(%rax),%rcx
and    $0xffffffffffff7fff,%rcx
mov    %rcx,0xa4(%rax)
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<UART9BitDisable>:
push   %rbx
mov    %rdi,%rbx
call   1040 <UARTBaseValid@plt>
mov    %eax,%edi
call   1030 <DEBUG_ASSERT@plt>
andq   $0xffffffffffff7fff,0xa4(%rbx)
ff 7f ff ff
pop    %rbx
ret

LLVM IR (-O0):
define void @UART9BitDisable(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = load i64, i64* %2
%4 = call i32 @UARTBaseValid(i64 %3)
%5 = call i32 @DEBUG_ASSERT(i32 %4)
%6 = load i64, i64* %2
%7 = add i64 %6, 164
%8 = inttoptr i64 %7 to i64*
%9 = load volatile i64, i64* %8
%10 = and i64 %9, -32769
store volatile i64 %10, i64* %8
ret void
}

LLVM IR (-O2):
define void @UART9BitDisable(i64 %0) {
%2 = tail call i32 @UARTBaseValid(i64 %0)
%3 = tail call i32 @DEBUG_ASSERT(i32 %2)
%4 = add i64 %0, 164
%5 = inttoptr i64 %4 to i64*
%6 = load volatile i64, i64* %5
%7 = and i64 %6, -32769
store volatile i64 %7, i64* %5
ret void
}
/* Variables and functions */
int /*<<< orphan*/ delay_500micros();
void I2C_delay() { delay_500micros(); }


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

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

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

LLVM IR (-O2):
define void @I2C_delay() {
%1 = tail call i32 (...) @delay_500micros()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ Sync();
void BMCT262Restore(int version) { Sync(); }


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

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

LLVM IR (-O0):
define void @BMCT262Restore(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = call i32 (...) @Sync()
ret void
}

LLVM IR (-O2):
define void @BMCT262Restore(i32 %0) {
%2 = tail call i32 (...) @Sync()
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ pthread_mutex_t;

/* Variables and functions */
int /*<<< orphan*/ handle_error(char *);
scalar_t__ pthread_mutex_destroy(int /*<<< orphan*/ *);
int delete_mutexb(pthread_mutex_t *mtx) {
  if (pthread_mutex_destroy(mtx) != 0) {
    handle_error("Failed to delete mutex.");
  }
  return 0;
}


x86 assembly (clang, -O0):
<delete_mutexb>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <pthread_mutex_destroy@plt>
cmp    $0x0,%rax
je     114b <delete_mutexb+0x2b>
lea    0xeba(%rip),%rdi
call   1040 <handle_error@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<delete_mutexb>:
push   %rax
call   1030 <pthread_mutex_destroy@plt>
test   %rax,%rax
je     1137 <delete_mutexb+0x17>
lea    0xece(%rip),%rdi
call   1040 <handle_error@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [24 x i8] c"Failed to delete mutex.\00"
define i32 @delete_mutexb(i32* %0) {
%2 = alloca i32*
store i32* %0, i32** %2
%3 = load i32*, i32** %2
%4 = call i64 @pthread_mutex_destroy(i32* %3)
%5 = icmp ne i64 %4, 0
br i1 %5, label %6, label %8
6: ; preds = %1
%7 = call i32 @handle_error(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str, i64 0, i64 0))
br label %8
8: ; preds = %6, %1
ret i32 0
}

LLVM IR (-O2):
@.str = [24 x i8] c"Failed to delete mutex.\00"
define i32 @delete_mutexb(i32* %0) {
%2 = tail call i64 @pthread_mutex_destroy(i32* %0)
%3 = icmp eq i64 %2, 0
br i1 %3, label %6, label %4
4: ; preds = %1
%5 = tail call i32 @handle_error(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str, i64 0, i64 0))
br label %6
6: ; preds = %4, %1
ret i32 0
}
void RTMemFree(void) {}


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

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

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

LLVM IR (-O2):
define void @RTMemFree() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ assert(int);
int main(void) {
  int ret = 0;
  unsigned int s__version;
  if (s__version + 65280 != 768) {
    ret = 0;
  } else {
    ret = 1;
  }
  assert(ret == 0);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
mov    -0xc(%rbp),%eax
add    $0xff00,%eax
cmp    $0x300,%eax
je     1145 <main+0x35>
movl   $0x0,-0x8(%rbp)
jmp    114c <main+0x3c>
movl   $0x1,-0x8(%rbp)
cmpl   $0x0,-0x8(%rbp)
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <assert@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %edi,%edi
call   1030 <assert@plt>
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 @assert(i32 0)
ret i32 0
}
/* Variables and functions */
float __racosd(float);
float intr_wrap_004(float p1) { return __racosd(p1); }


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

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

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

LLVM IR (-O2):
define float @intr_wrap_004(float %0) {
%2 = tail call float @__racosd(float %0)
ret float %2
}
void gtc_read(void) {}


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

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

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

LLVM IR (-O2):
define void @gtc_read() {
ret void
}
void delay(unsigned int ms) {
  unsigned int i;
  while (ms && ms--) {
    for (i = 0; i < (100 * 1000 * 1000) / 1000 / 5; i++)
      __asm__ __volatile__("nop");
  }
}


x86 assembly (clang, -O0):
<delay>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
xor    %eax,%eax
cmpl   $0x0,-0x4(%rbp)
mov    %al,-0x9(%rbp)
je     112a <delay+0x2a>
mov    -0x4(%rbp),%eax
mov    %eax,%ecx
add    $0xffffffff,%ecx
mov    %ecx,-0x4(%rbp)
cmp    $0x0,%eax
setne  %al
mov    %al,-0x9(%rbp)
mov    -0x9(%rbp),%al
test   $0x1,%al
jne    113a <delay+0x3a>
jmp    1162 <delay+0x62>
movl   $0x0,-0x8(%rbp)
cmpl   $0x4e20,-0x8(%rbp)
jae    115d <delay+0x5d>
nop
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1141 <delay+0x41>
jmp    1107 <delay+0x7>
pop    %rbp
ret

x86 assembly (clang, -O2):
<delay>:
test   %edi,%edi
je     112b <delay+0x2b>
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
mov    $0x4e20,%eax
cs nopw 0x0(%rax,%rax,1)
nop
nop
add    $0xffffffff,%eax
jne    1120 <delay+0x20>
add    $0xffffffff,%edi
jne    1110 <delay+0x10>
ret

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

LLVM IR (-O2):
define void @delay(i32 %0) {
%2 = icmp eq i32 %0, 0
br i1 %2, label %12, label %6
3: ; preds = %8
%4 = add i32 %7, -1
%5 = icmp eq i32 %4, 0
br i1 %5, label %12, label %6
6: ; preds = %1, %3
%7 = phi i32 [ %4, %3 ], [ %0, %1 ]
br label %8
8: ; preds = %6, %8
%9 = phi i32 [ 0, %6 ], [ %10, %8 ]
tail call void asm sideeffect "nop", "~{dirflag},~{fpsr},~{flags}"()
%10 = add nuw nsw i32 %9, 1
%11 = icmp eq i32 %10, 20000
br i1 %11, label %3, label %8
12: ; preds = %3, %1
ret void
}
/* Variables and functions */
double log(double const);
char f_ln(double *a, const double *b) {
  if (*b <= 0) {
    return (1);
  } else {
    *a = log(*b);
  }
  return (0);
}


x86 assembly (clang, -O0):
<f_ln>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    -0x18(%rbp),%rax
xorps  %xmm0,%xmm0
ucomisd (%rax),%xmm0
jb     113a <f_ln+0x2a>
movb   $0x1,-0x1(%rbp)
jmp    1153 <f_ln+0x43>
mov    -0x18(%rbp),%rax
movsd  (%rax),%xmm0
call   1030 <log@plt>
mov    -0x10(%rbp),%rax
movsd  %xmm0,(%rax)
movb   $0x0,-0x1(%rbp)
movsbl -0x1(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<f_ln>:
push   %rbx
movsd  (%rsi),%xmm0
mov    $0x1,%al
xorpd  %xmm1,%xmm1
ucomisd %xmm0,%xmm1
jae    112f <f_ln+0x1f>
mov    %rdi,%rbx
call   1030 <log@plt>
movsd  %xmm0,(%rbx)
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
define signext i8 @f_ln(double* %0, double* %1) {
%3 = alloca i8
%4 = alloca double*
%5 = alloca double*
store double* %0, double** %4
store double* %1, double** %5
%6 = load double*, double** %5
%7 = load double, double* %6
%8 = fcmp ole double %7, 0.000000e+00
br i1 %8, label %9, label %10
9: ; preds = %2
store i8 1, i8* %3
br label %16
10: ; preds = %2
%11 = load double*, double** %5
%12 = load double, double* %11
%13 = call double @log(double %12)
%14 = load double*, double** %4
store double %13, double* %14
br label %15
15: ; preds = %10
store i8 0, i8* %3
br label %16
16: ; preds = %15, %9
%17 = load i8, i8* %3
ret i8 %17
}

LLVM IR (-O2):
define signext i8 @f_ln(double* nocapture writeonly %0, double* nocapture %1) {
%3 = load double, double* %1
%4 = fcmp ugt double %3, 0.000000e+00
br i1 %4, label %5, label %7
5: ; preds = %2
%6 = tail call double @log(double %3)
store double %6, double* %0
br label %7
7: ; preds = %2, %5
%8 = phi i8 [ 0, %5 ], [ 1, %2 ]
ret i8 %8
}
/* Variables and functions */
int /*<<< orphan*/ am_util_stdio_printf(char *);
void am_util_stdio_terminal_clear(void) {
  am_util_stdio_printf("\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n");
}


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

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

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

LLVM IR (-O2):
@.str = [19 x i8] c"\0A\0A\0A\0A\0A\0A\0A\0A\0A\0A\0A\0A\0A\0A\0A\0A\0A\0A\00"
define void @am_util_stdio_terminal_clear() {
%1 = tail call i32 @am_util_stdio_printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0))
ret void
}
/* Variables and functions */
int fibonacci(int);
int /*<<< orphan*/ printf(char *, int);
main() { printf("fibonacci(15) = %d\n", fibonacci(15)); }


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

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

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

LLVM IR (-O2):
@.str = [20 x i8] c"fibonacci(15) = %d\0A\00"
define i32 @main() {
%1 = tail call i32 @fibonacci(i32 15)
%2 = tail call i32 @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0), i32 %1)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ thr0(int /*<<< orphan*/);
int /*<<< orphan*/ thr1(int /*<<< orphan*/);
int /*<<< orphan*/ thr2(int /*<<< orphan*/);
int /*<<< orphan*/ thr3(int /*<<< orphan*/);
int /*<<< orphan*/ thr4(int /*<<< orphan*/);
int /*<<< orphan*/ thr5(int /*<<< orphan*/);
int /*<<< orphan*/ thr6(int /*<<< orphan*/);
int /*<<< orphan*/ thr7(int /*<<< orphan*/);
int /*<<< orphan*/ thr8(int /*<<< orphan*/);
int main() {
__CPROVER_ASYNC_0:
  thr0(0);
__CPROVER_ASYNC_1:
  thr1(0);
__CPROVER_ASYNC_2:
  thr2(0);
__CPROVER_ASYNC_3:
  thr3(0);
__CPROVER_ASYNC_4:
  thr4(0);
__CPROVER_ASYNC_5:
  thr5(0);
__CPROVER_ASYNC_6:
  thr6(0);
__CPROVER_ASYNC_7:
  thr7(0);
__CPROVER_ASYNC_8:
  thr8(0);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
xor    %edi,%edi
call   1080 <thr0@plt>
xor    %edi,%edi
call   1030 <thr1@plt>
xor    %edi,%edi
call   1050 <thr2@plt>
xor    %edi,%edi
call   10a0 <thr3@plt>
xor    %edi,%edi
call   1040 <thr4@plt>
xor    %edi,%edi
call   1090 <thr5@plt>
xor    %edi,%edi
call   1060 <thr6@plt>
xor    %edi,%edi
call   10b0 <thr7@plt>
xor    %edi,%edi
call   1070 <thr8@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %edi,%edi
call   1080 <thr0@plt>
xor    %edi,%edi
call   1030 <thr1@plt>
xor    %edi,%edi
call   1050 <thr2@plt>
xor    %edi,%edi
call   10a0 <thr3@plt>
xor    %edi,%edi
call   1040 <thr4@plt>
xor    %edi,%edi
call   1090 <thr5@plt>
xor    %edi,%edi
call   1060 <thr6@plt>
xor    %edi,%edi
call   10b0 <thr7@plt>
xor    %edi,%edi
call   1070 <thr8@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
br label %2
2: ; preds = %0
%3 = call i32 @thr0(i32 0)
br label %4
4: ; preds = %2
%5 = call i32 @thr1(i32 0)
br label %6
6: ; preds = %4
%7 = call i32 @thr2(i32 0)
br label %8
8: ; preds = %6
%9 = call i32 @thr3(i32 0)
br label %10
10: ; preds = %8
%11 = call i32 @thr4(i32 0)
br label %12
12: ; preds = %10
%13 = call i32 @thr5(i32 0)
br label %14
14: ; preds = %12
%15 = call i32 @thr6(i32 0)
br label %16
16: ; preds = %14
%17 = call i32 @thr7(i32 0)
br label %18
18: ; preds = %16
%19 = call i32 @thr8(i32 0)
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 @thr0(i32 0)
%2 = tail call i32 @thr1(i32 0)
%3 = tail call i32 @thr2(i32 0)
%4 = tail call i32 @thr3(i32 0)
%5 = tail call i32 @thr4(i32 0)
%6 = tail call i32 @thr5(i32 0)
%7 = tail call i32 @thr6(i32 0)
%8 = tail call i32 @thr7(i32 0)
%9 = tail call i32 @thr8(i32 0)
ret i32 0
}
int test_imm_45uint8_reg(unsigned char val) {
  return ((val) & (-0x45 << 0)) ? -20 : -40;
}


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

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

LLVM IR (-O0):
define i32 @test_imm_45uint8_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, -69
%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_45uint8_reg(i8 zeroext %0) {
%2 = and i8 %0, -69
%3 = icmp eq i8 %2, 0
%4 = select i1 %3, i32 -40, i32 -20
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ _islower(char);
int _toupper(char c) {
  if (!_islower(c))
    return c;
  return c - ('a' - 'A');
}


x86 assembly (clang, -O0):
<_toupper>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %dil,%al
mov    %al,-0x5(%rbp)
movsbl -0x5(%rbp),%edi
call   1030 <_islower@plt>
cmp    $0x0,%eax
jne    113c <_toupper+0x2c>
movsbl -0x5(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    1146 <_toupper+0x36>
movsbl -0x5(%rbp),%eax
sub    $0x20,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<_toupper>:
push   %rbx
mov    %edi,%ebx
call   1030 <_islower@plt>
lea    -0x20(%rbx),%ecx
test   %eax,%eax
cmove  %ebx,%ecx
mov    %ecx,%eax
pop    %rbx
ret

LLVM IR (-O0):
define i32 @_toupper(i8 signext %0) {
%2 = alloca i32
%3 = alloca i8
store i8 %0, i8* %3
%4 = load i8, i8* %3
%5 = call i32 @_islower(i8 signext %4)
%6 = icmp ne i32 %5, 0
br i1 %6, label %10, label %7
7: ; preds = %1
%8 = load i8, i8* %3
%9 = sext i8 %8 to i32
store i32 %9, i32* %2
br label %14
10: ; preds = %1
%11 = load i8, i8* %3
%12 = sext i8 %11 to i32
%13 = sub nsw i32 %12, 32
store i32 %13, i32* %2
br label %14
14: ; preds = %10, %7
%15 = load i32, i32* %2
ret i32 %15
}

LLVM IR (-O2):
define i32 @_toupper(i8 signext %0) {
%2 = tail call i32 @_islower(i8 signext %0)
%3 = icmp eq i32 %2, 0
%4 = sext i8 %0 to i32
%5 = add nsw i32 %4, -32
%6 = select i1 %3, i32 %4, i32 %5
ret i32 %6
}
void destruct_obj(void *priv_data, void *val) {}


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

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

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

LLVM IR (-O2):
define void @destruct_obj(i8* nocapture %0, i8* nocapture %1) {
ret void
}
void g_hash_table_lookup() {}


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

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

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

LLVM IR (-O2):
define void @g_hash_table_lookup() {
ret void
}
/* Variables and functions */
scalar_t__ longueur_mois(int, int);
int jours_mois(short int mois, int an) {
  int nombreJours = 0, m;
  for (m = mois - 1; m >= 1; --m)
    nombreJours += longueur_mois(an, m);
  return nombreJours;
}


x86 assembly (clang, -O0):
<jours_mois>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %di,%ax
mov    %ax,-0x2(%rbp)
mov    %esi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
movswl -0x2(%rbp),%eax
sub    $0x1,%eax
mov    %eax,-0x10(%rbp)
cmpl   $0x1,-0x10(%rbp)
jl     1163 <jours_mois+0x53>
mov    -0x8(%rbp),%edi
mov    -0x10(%rbp),%esi
call   1030 <longueur_mois@plt>
mov    %rax,%rcx
movslq -0xc(%rbp),%rax
add    %rcx,%rax
mov    %eax,-0xc(%rbp)
mov    -0x10(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0x10(%rbp)
jmp    1133 <jours_mois+0x23>
mov    -0xc(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<jours_mois>:
push   %rbp
push   %r14
push   %rbx
xor    %ebp,%ebp
cmp    $0x2,%di
jl     1145 <jours_mois+0x35>
mov    %esi,%r14d
movzwl %di,%ebx
add    $0x1,%ebx
xor    %ebp,%ebp
nopw   0x0(%rax,%rax,1)
lea    -0x2(%rbx),%esi
mov    %r14d,%edi
call   1030 <longueur_mois@plt>
add    %eax,%ebp
add    $0xffffffff,%ebx
cmp    $0x2,%ebx
ja     1130 <jours_mois+0x20>
mov    %ebp,%eax
pop    %rbx
pop    %r14
pop    %rbp
ret

LLVM IR (-O0):
define i32 @jours_mois(i16 signext %0, i32 %1) {
%3 = alloca i16
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
store i16 %0, i16* %3
store i32 %1, i32* %4
store i32 0, i32* %5
%7 = load i16, i16* %3
%8 = sext i16 %7 to i32
%9 = sub nsw i32 %8, 1
store i32 %9, i32* %6
br label %10
10: ; preds = %21, %2
%11 = load i32, i32* %6
%12 = icmp sge i32 %11, 1
br i1 %12, label %13, label %24
13: ; preds = %10
%14 = load i32, i32* %4
%15 = load i32, i32* %6
%16 = call i64 @longueur_mois(i32 %14, i32 %15)
%17 = load i32, i32* %5
%18 = sext i32 %17 to i64
%19 = add nsw i64 %18, %16
%20 = trunc i64 %19 to i32
store i32 %20, i32* %5
br label %21
21: ; preds = %13
%22 = load i32, i32* %6
%23 = add nsw i32 %22, -1
store i32 %23, i32* %6
br label %10
24: ; preds = %10
%25 = load i32, i32* %5
ret i32 %25
}

LLVM IR (-O2):
define i32 @jours_mois(i16 signext %0, i32 %1) {
%3 = icmp sgt i16 %0, 1
br i1 %3, label %4, label %14
4: ; preds = %2
%5 = zext i16 %0 to i32
br label %6
6: ; preds = %4, %6
%7 = phi i32 [ %9, %6 ], [ %5, %4 ]
%8 = phi i32 [ %12, %6 ], [ 0, %4 ]
%9 = add nsw i32 %7, -1
%10 = tail call i64 @longueur_mois(i32 %1, i32 %9)
%11 = trunc i64 %10 to i32
%12 = add i32 %8, %11
%13 = icmp ugt i32 %7, 2
br i1 %13, label %6, label %14
14: ; preds = %6, %2
%15 = phi i32 [ 0, %2 ], [ %12, %6 ]
ret i32 %15
}
/* Variables and functions */
int IsHighVowelWord(char *);
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ scanf(char *, char *);
int main() {
  char word[50];
  scanf("%s", word);
  int res = IsHighVowelWord(word);
  if (res == 1) {
    printf("true");
  } else {
    printf("false");
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x50,%rsp
movl   $0x0,-0x4(%rbp)
lea    -0x40(%rbp),%rsi
lea    0xeb6(%rip),%rdi
call   1050 <scanf@plt>
lea    -0x40(%rbp),%rdi
call   1040 <IsHighVowelWord@plt>
mov    %eax,-0x44(%rbp)
cmpl   $0x1,-0x44(%rbp)
jne    1176 <main+0x46>
lea    0xe97(%rip),%rdi
call   1030 <printf@plt>
jmp    1182 <main+0x52>
lea    0xe8b(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x50,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x40,%rsp
lea    0xec4(%rip),%rdi
mov    %rsp,%rbx
mov    %rbx,%rsi
call   1050 <scanf@plt>
mov    %rbx,%rdi
call   1040 <IsHighVowelWord@plt>
cmp    $0x1,%eax
lea    0xeaa(%rip),%rax
lea    0xea8(%rip),%rdi
cmove  %rax,%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x40,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@.str = [3 x i8] c"%s\00"
@.str.1 = [5 x i8] c"true\00"
@.str.2 = [6 x i8] c"false\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca [50 x i8]
%3 = alloca i32
store i32 0, i32* %1
%4 = getelementptr inbounds [50 x i8], [50 x i8]* %2, i64 0, i64 0
%5 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* %4)
%6 = getelementptr inbounds [50 x i8], [50 x i8]* %2, i64 0, i64 0
%7 = call i32 @IsHighVowelWord(i8* %6)
store i32 %7, i32* %3
%8 = load i32, i32* %3
%9 = icmp eq i32 %8, 1
br i1 %9, label %10, label %12
10: ; preds = %0
%11 = call i32 @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0))
br label %14
12: ; preds = %0
%13 = call i32 @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.2, i64 0, i64 0))
br label %14
14: ; preds = %12, %10
ret i32 0
}

LLVM IR (-O2):
@.str = [3 x i8] c"%s\00"
@.str.1 = [5 x i8] c"true\00"
@.str.2 = [6 x i8] c"false\00"
define i32 @main() {
%1 = alloca [50 x i8]
%2 = getelementptr inbounds [50 x i8], [50 x i8]* %1, i64 0, i64 0
%3 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* %2)
%4 = call i32 @IsHighVowelWord(i8* %2)
%5 = icmp eq i32 %4, 1
%6 = select i1 %5, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.2, i64 0, i64 0)
%7 = call i32 @printf(i8* dereferenceable(1) %6)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ pritnf(char *, int const);
void printInt(const int *p) { pritnf("%d", *p); }


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

x86 assembly (clang, -O2):
<printInt>:
mov    (%rdi),%esi
lea    0xee7(%rip),%rdi
jmp    1030 <pritnf@plt>

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

LLVM IR (-O2):
@.str = [3 x i8] c"%d\00"
define void @printInt(i32* nocapture %0) {
%2 = load i32, i32* %0
%3 = tail call i32 @pritnf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 %2)
ret void
}
/* Variables and functions */
size_t ipow2(size_t exp) { return exp < 64 ? 1 << exp : 0; }


x86 assembly (clang, -O0):
<ipow2>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
cmpq   $0x40,-0x8(%rbp)
jae    1128 <ipow2+0x28>
mov    -0x8(%rbp),%rax
mov    %eax,%ecx
mov    $0x1,%eax
shl    %cl,%eax
mov    %eax,-0xc(%rbp)
jmp    1132 <ipow2+0x32>
xor    %eax,%eax
mov    %eax,-0xc(%rbp)
jmp    1132 <ipow2+0x32>
mov    -0xc(%rbp),%eax
cltq
pop    %rbp
ret

x86 assembly (clang, -O2):
<ipow2>:
mov    %rdi,%rcx
mov    $0x1,%edx
shl    %cl,%edx
xor    %eax,%eax
cmp    $0x40,%rdi
movslq %edx,%rcx
cmovb  %rcx,%rax
ret

LLVM IR (-O0):
define i64 @ipow2(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = load i64, i64* %2
%4 = icmp ult i64 %3, 64
br i1 %4, label %5, label %9
5: ; preds = %1
%6 = load i64, i64* %2
%7 = trunc i64 %6 to i32
%8 = shl i32 1, %7
br label %10
9: ; preds = %1
br label %10
10: ; preds = %9, %5
%11 = phi i32 [ %8, %5 ], [ 0, %9 ]
%12 = sext i32 %11 to i64
ret i64 %12
}

LLVM IR (-O2):
define i64 @ipow2(i64 %0) {
%2 = icmp ult i64 %0, 64
%3 = trunc i64 %0 to i32
%4 = shl nuw i32 1, %3
%5 = sext i32 %4 to i64
%6 = select i1 %2, i64 %5, i64 0
ret i64 %6
}
int inside_rect(int x, int y, int x0, int y0, int x1, int y1) {
  return !(x < x0 || x > x1 || y < y0 || y > y1);
}


x86 assembly (clang, -O0):
<inside_rect>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    %ecx,-0x10(%rbp)
mov    %r8d,-0x14(%rbp)
mov    %r9d,-0x18(%rbp)
mov    -0x4(%rbp),%ecx
mov    $0x1,%al
cmp    -0xc(%rbp),%ecx
mov    %al,-0x19(%rbp)
jl     1157 <inside_rect+0x57>
mov    -0x4(%rbp),%ecx
mov    $0x1,%al
cmp    -0x14(%rbp),%ecx
mov    %al,-0x19(%rbp)
jg     1157 <inside_rect+0x57>
mov    -0x8(%rbp),%ecx
mov    $0x1,%al
cmp    -0x10(%rbp),%ecx
mov    %al,-0x19(%rbp)
jl     1157 <inside_rect+0x57>
mov    -0x8(%rbp),%eax
cmp    -0x18(%rbp),%eax
setg   %al
mov    %al,-0x19(%rbp)
mov    -0x19(%rbp),%al
xor    $0xff,%al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<inside_rect>:
cmp    %edx,%edi
setge  %al
cmp    %r8d,%edi
setle  %dl
and    %al,%dl
cmp    %ecx,%esi
setge  %al
cmp    %r9d,%esi
setle  %cl
and    %al,%cl
and    %dl,%cl
movzbl %cl,%eax
ret

LLVM IR (-O0):
define i32 @inside_rect(i32 %0, i32 %1, i32 %2, i32 %3, i32 %4, i32 %5) {
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32
%10 = alloca i32
%11 = alloca i32
%12 = alloca i32
store i32 %0, i32* %7
store i32 %1, i32* %8
store i32 %2, i32* %9
store i32 %3, i32* %10
store i32 %4, i32* %11
store i32 %5, i32* %12
%13 = load i32, i32* %7
%14 = load i32, i32* %9
%15 = icmp slt i32 %13, %14
br i1 %15, label %28, label %16
16: ; preds = %6
%17 = load i32, i32* %7
%18 = load i32, i32* %11
%19 = icmp sgt i32 %17, %18
br i1 %19, label %28, label %20
20: ; preds = %16
%21 = load i32, i32* %8
%22 = load i32, i32* %10
%23 = icmp slt i32 %21, %22
br i1 %23, label %28, label %24
24: ; preds = %20
%25 = load i32, i32* %8
%26 = load i32, i32* %12
%27 = icmp sgt i32 %25, %26
br label %28
28: ; preds = %24, %20, %16, %6
%29 = phi i1 [ true, %20 ], [ true, %16 ], [ true, %6 ], [ %27, %24 ]
%30 = xor i1 %29, true
%31 = zext i1 %30 to i32
ret i32 %31
}

LLVM IR (-O2):
define i32 @inside_rect(i32 %0, i32 %1, i32 %2, i32 %3, i32 %4, i32 %5) {
%7 = icmp slt i32 %0, %2
%8 = icmp sgt i32 %0, %4
%9 = or i1 %7, %8
%10 = icmp slt i32 %1, %3
%11 = or i1 %10, %9
%12 = icmp sle i32 %1, %5
%13 = xor i1 %11, true
%14 = and i1 %12, %13
%15 = zext i1 %14 to i32
ret i32 %15
}
/* Variables and functions */
scalar_t__ isalnum(char);
int isuscoreoralnum(char ch) { return ((ch == '_') || isalnum(ch)); }


x86 assembly (clang, -O0):
<isuscoreoralnum>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movsbl -0x1(%rbp),%ecx
mov    $0x1,%al
cmp    $0x5f,%ecx
mov    %al,-0x2(%rbp)
je     1143 <isuscoreoralnum+0x33>
movsbl -0x1(%rbp),%edi
call   1030 <isalnum@plt>
cmp    $0x0,%rax
setne  %al
mov    %al,-0x2(%rbp)
mov    -0x2(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<isuscoreoralnum>:
mov    $0x1,%eax
cmp    $0x5f,%dil
je     1134 <isuscoreoralnum+0x24>
push   %rax
movsbl %dil,%edi
call   1030 <isalnum@plt>
mov    %rax,%rcx
xor    %eax,%eax
test   %rcx,%rcx
setne  %al
add    $0x8,%rsp
ret

LLVM IR (-O0):
define i32 @isuscoreoralnum(i8 signext %0) {
%2 = alloca i8
store i8 %0, i8* %2
%3 = load i8, i8* %2
%4 = sext i8 %3 to i32
%5 = icmp eq i32 %4, 95
br i1 %5, label %10, label %6
6: ; preds = %1
%7 = load i8, i8* %2
%8 = call i64 @isalnum(i8 signext %7)
%9 = icmp ne i64 %8, 0
br label %10
10: ; preds = %6, %1
%11 = phi i1 [ true, %1 ], [ %9, %6 ]
%12 = zext i1 %11 to i32
ret i32 %12
}

LLVM IR (-O2):
define i32 @isuscoreoralnum(i8 signext %0) {
%2 = icmp eq i8 %0, 95
br i1 %2, label %7, label %3
3: ; preds = %1
%4 = tail call i64 @isalnum(i8 signext %0)
%5 = icmp ne i64 %4, 0
%6 = zext i1 %5 to i32
br label %7
7: ; preds = %3, %1
%8 = phi i32 [ 1, %1 ], [ %6, %3 ]
ret i32 %8
}
/* Variables and functions */
void *s4(size_t);
void *s5(size_t n) { return s4(n); }


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

x86 assembly (clang, -O2):
<s5>:
jmp    1030 <s4@plt>

LLVM IR (-O0):
define i8* @s5(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = load i64, i64* %2
%4 = call i8* @s4(i64 %3)
ret i8* %4
}

LLVM IR (-O2):
define i8* @s5(i64 %0) {
%2 = tail call i8* @s4(i64 %0)
ret i8* %2
}
/* Variables and functions */
int /*<<< orphan*/ buf_init(void *, int);
void *numa_alloc_onnode(int, int);
void *buf_create(int node_alloc) {
  void *buf;
  buf = numa_alloc_onnode(256 * 1024 * 1024, node_alloc);
  if (buf != NULL)
    buf_init(buf, 256 * 1024 * 1024);
  return (buf);
}


x86 assembly (clang, -O0):
<buf_create>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%esi
mov    $0x10000000,%edi
call   1040 <numa_alloc_onnode@plt>
mov    %rax,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
je     1155 <buf_create+0x35>
mov    -0x10(%rbp),%rdi
mov    $0x10000000,%esi
call   1030 <buf_init@plt>
mov    -0x10(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<buf_create>:
push   %rbx
mov    %edi,%esi
mov    $0x10000000,%edi
call   1040 <numa_alloc_onnode@plt>
mov    %rax,%rbx
test   %rax,%rax
je     1142 <buf_create+0x22>
mov    %rbx,%rdi
mov    $0x10000000,%esi
call   1030 <buf_init@plt>
mov    %rbx,%rax
pop    %rbx
ret

LLVM IR (-O0):
define i8* @buf_create(i32 %0) {
%2 = alloca i32
%3 = alloca i8*
store i32 %0, i32* %2
%4 = load i32, i32* %2
%5 = call i8* @numa_alloc_onnode(i32 268435456, i32 %4)
store i8* %5, i8** %3
%6 = load i8*, i8** %3
%7 = icmp ne i8* %6, null
br i1 %7, label %8, label %11
8: ; preds = %1
%9 = load i8*, i8** %3
%10 = call i32 @buf_init(i8* %9, i32 268435456)
br label %11
11: ; preds = %8, %1
%12 = load i8*, i8** %3
ret i8* %12
}

LLVM IR (-O2):
define i8* @buf_create(i32 %0) {
%2 = tail call i8* @numa_alloc_onnode(i32 268435456, i32 %0)
%3 = icmp eq i8* %2, null
br i1 %3, label %6, label %4
4: ; preds = %1
%5 = tail call i32 @buf_init(i8* %2, i32 268435456)
br label %6
6: ; preds = %4, %1
ret i8* %2
}
/* Type definitions */
typedef int /*<<< orphan*/ uint8_t;

/* Variables and functions */
int w5100_read(int, int /*<<< orphan*/ *, int);
unsigned w5100_readSHAR(uint8_t *buff) { return w5100_read(0x0009, buff, 6); }


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

x86 assembly (clang, -O2):
mov    %rdi,%rsi
mov    $0x9,%edi
mov    $0x6,%edx
jmp    1030 <w5100_read@plt>

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

LLVM IR (-O2):
define i32 @w5100_readSHAR(i32* %0) {
%2 = tail call i32 @w5100_read(i32 9, i32* %0, i32 6)
ret i32 %2
}
/* Type definitions */
struct node {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ reverseLinkedList3(struct node **, int /*<<< orphan*/ *,
                                      struct node *);
void startReverse(struct node **head) {
  if (*head == NULL) {
    return;
  }
  reverseLinkedList3(head, NULL, *head);
}


x86 assembly (clang, -O0):
<startReverse>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
cmpq   $0x0,(%rax)
jne    112f <startReverse+0x1f>
jmp    1143 <startReverse+0x33>
mov    -0x8(%rbp),%rdi
mov    -0x8(%rbp),%rax
mov    (%rax),%rdx
xor    %eax,%eax
mov    %eax,%esi
call   1030 <reverseLinkedList3@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<startReverse>:
mov    (%rdi),%rdx
test   %rdx,%rdx
je     111f <startReverse+0xf>
xor    %esi,%esi
jmp    1030 <reverseLinkedList3@plt>
ret

LLVM IR (-O0):
%struct.node = type { i32 }
define void @startReverse(%struct.node** %0) {
%2 = alloca %struct.node**
store %struct.node** %0, %struct.node*** %2
%3 = load %struct.node**, %struct.node*** %2
%4 = load %struct.node*, %struct.node** %3
%5 = icmp eq %struct.node* %4, null
br i1 %5, label %6, label %7
6: ; preds = %1
br label %12
7: ; preds = %1
%8 = load %struct.node**, %struct.node*** %2
%9 = load %struct.node**, %struct.node*** %2
%10 = load %struct.node*, %struct.node** %9
%11 = call i32 @reverseLinkedList3(%struct.node** %8, i32* null, %struct.node* %10)
br label %12
12: ; preds = %7, %6
ret void
}

LLVM IR (-O2):
%struct.node = type { i32 }
define void @startReverse(%struct.node** %0) {
%2 = load %struct.node*, %struct.node** %0
%3 = icmp eq %struct.node* %2, null
br i1 %3, label %6, label %4
4: ; preds = %1
%5 = tail call i32 @reverseLinkedList3(%struct.node** %0, i32* null, %struct.node* %2)
br label %6
6: ; preds = %1, %4
ret void
}
int char_to_piece(int c) {
  int piece;
  switch (c) {
  case 'K':
    piece = 6;
    break;
  case 'Q':
    piece = 5;
    break;
  case 'R':
    piece = 4;
    break;
  case 'B':
    piece = 3;
    break;
  case 'N':
    piece = 2;
    break;
  default:
    piece = 1;
    break;
  }
  return piece;
}


x86 assembly (clang, -O0):
<char_to_piece>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0xffffffbe,%eax
mov    %eax,%ecx
mov    %rcx,-0x10(%rbp)
sub    $0x10,%eax
ja     116c <char_to_piece+0x6c>
mov    -0x10(%rbp),%rax
lea    0xed9(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
movl   $0x6,-0x8(%rbp)
jmp    1173 <char_to_piece+0x73>
movl   $0x5,-0x8(%rbp)
jmp    1173 <char_to_piece+0x73>
movl   $0x4,-0x8(%rbp)
jmp    1173 <char_to_piece+0x73>
movl   $0x3,-0x8(%rbp)
jmp    1173 <char_to_piece+0x73>
movl   $0x2,-0x8(%rbp)
jmp    1173 <char_to_piece+0x73>
movl   $0x1,-0x8(%rbp)
mov    -0x8(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<char_to_piece>:
add    $0xffffffbe,%edi
cmp    $0x10,%edi
ja     1123 <char_to_piece+0x23>
mov    $0x6,%eax
lea    0xeec(%rip),%rcx
movslq (%rcx,%rdi,4),%rdx
add    %rcx,%rdx
jmp    *%rdx
mov    $0x3,%eax
ret
mov    $0x1,%eax
ret
mov    $0x2,%eax
ret
mov    $0x5,%eax
ret
mov    $0x4,%eax
ret

LLVM IR (-O0):
define i32 @char_to_piece(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %2
%4 = load i32, i32* %2
switch i32 %4, label %10 [
i32 75, label %5
i32 81, label %6
i32 82, label %7
i32 66, label %8
i32 78, label %9
]
5: ; preds = %1
store i32 6, i32* %3
br label %11
6: ; preds = %1
store i32 5, i32* %3
br label %11
7: ; preds = %1
store i32 4, i32* %3
br label %11
8: ; preds = %1
store i32 3, i32* %3
br label %11
9: ; preds = %1
store i32 2, i32* %3
br label %11
10: ; preds = %1
store i32 1, i32* %3
br label %11
11: ; preds = %10, %9, %8, %7, %6, %5
%12 = load i32, i32* %3
ret i32 %12
}

LLVM IR (-O2):
define i32 @char_to_piece(i32 %0) {
switch i32 %0, label %6 [
i32 75, label %7
i32 81, label %2
i32 82, label %3
i32 66, label %4
i32 78, label %5
]
2: ; preds = %1
br label %7
3: ; preds = %1
br label %7
4: ; preds = %1
br label %7
5: ; preds = %1
br label %7
6: ; preds = %1
br label %7
7: ; preds = %1, %6, %5, %4, %3, %2
%8 = phi i32 [ 1, %6 ], [ 2, %5 ], [ 3, %4 ], [ 4, %3 ], [ 5, %2 ], [ 6, %1 ]
ret i32 %8
}
/* Variables and functions */
int truncate(char const *, int /*<<< orphan*/);
int File_Clear(const char *FileName) { return truncate(FileName, 0); }


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

x86 assembly (clang, -O2):
<File_Clear>:
xor    %esi,%esi
jmp    1030 <truncate@plt>

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

LLVM IR (-O2):
define i32 @File_Clear(i8* %0) {
%2 = tail call i32 @truncate(i8* %0, i32 0)
ret i32 %2
}
/* Variables and functions */
int /*<<< orphan*/ EXIT_FAILURE;
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, int);
int optopt;
int /*<<< orphan*/ stderr;
void print_error(int opt) {
  fprintf(stderr, "Unknown option -%c.\n", optopt);
  exit(EXIT_FAILURE);
}


x86 assembly (clang, -O0):
<print_error>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    0x2ea6(%rip),%rax
mov    (%rax),%edi
mov    0x2ead(%rip),%rax
mov    (%rax),%edx
lea    0xebc(%rip),%rsi
call   1030 <fprintf@plt>
mov    0x2e80(%rip),%rax
mov    (%rax),%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<print_error>:
push   %rax
mov    0x2eb0(%rip),%rax
mov    (%rax),%edi
mov    0x2eb7(%rip),%rax
mov    (%rax),%edx
lea    0xec6(%rip),%rsi
call   1030 <fprintf@plt>
mov    0x2e8a(%rip),%rax
mov    (%rax),%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [21 x i8] c"Unknown option -%c.\0A\00"
@optopt = global i32 0
@EXIT_FAILURE = global i32 0
define void @print_error(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* @stderr
%4 = load i32, i32* @optopt
%5 = call i32 @fprintf(i32 %3, i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str, i64 0, i64 0), i32 %4)
%6 = load i32, i32* @EXIT_FAILURE
%7 = call i32 @exit(i32 %6)
unreachable
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [21 x i8] c"Unknown option -%c.\0A\00"
@optopt = global i32 0
@EXIT_FAILURE = global i32 0
define void @print_error(i32 %0) {
%2 = load i32, i32* @stderr
%3 = load i32, i32* @optopt
%4 = tail call i32 @fprintf(i32 %2, i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str, i64 0, i64 0), i32 %3)
%5 = load i32, i32* @EXIT_FAILURE
%6 = tail call i32 @exit(i32 %5)
unreachable
}
/* Type definitions */
struct fs_file {
  int dummy;
};
typedef int /*<<< orphan*/ mode_t;

/* Variables and functions */
int fs_http_creat(struct fs_file *f, const char *url, mode_t mode) {
  return -1;
}


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

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

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

LLVM IR (-O2):
%struct.fs_file = type { i32 }
define i32 @fs_http_creat(%struct.fs_file* nocapture readnone %0, i8* nocapture readnone %1, i32 %2) {
ret i32 -1
}