xunge/DecIR huggingface dataset:
double foo011(double a, float b, double c) { return (a * b + c); }


x86 assembly (clang, -O0):
<foo011>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
movss  %xmm1,-0xc(%rbp)
movsd  %xmm2,-0x18(%rbp)
movsd  -0x8(%rbp),%xmm0
movss  -0xc(%rbp),%xmm1
cvtss2sd %xmm1,%xmm2
movsd  -0x18(%rbp),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<foo011>:
cvtss2sd %xmm1,%xmm1
mulsd  %xmm1,%xmm0
addsd  %xmm2,%xmm0
ret

LLVM IR (-O0):
define double @foo011(double %0, float %1, double %2) {
%4 = alloca double
%5 = alloca float
%6 = alloca double
store double %0, double* %4
store float %1, float* %5
store double %2, double* %6
%7 = load double, double* %4
%8 = load float, float* %5
%9 = fpext float %8 to double
%10 = load double, double* %6
%11 = call double @llvm.fmuladd.f64(double %7, double %9, double %10)
ret double %11
}

LLVM IR (-O2):
define double @foo011(double %0, float %1, double %2) {
%4 = fpext float %1 to double
%5 = tail call double @llvm.fmuladd.f64(double %0, double %4, double %2)
ret double %5
}
int int_add(int a, int b) { return a + b; }


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

x86 assembly (clang, -O2):
<int_add>:
lea    (%rdi,%rsi,1),%eax
ret

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

LLVM IR (-O2):
define i32 @int_add(i32 %0, i32 %1) {
%3 = add nsw i32 %1, %0
ret i32 %3
}
int setPayloadLength(const unsigned int *const length,
                     int (*spiTransfer)(unsigned char *const, unsigned int,
                                        void *const customData),
                     void *const customData) {
  if (*length > 255) {
    return -1;
  }
  unsigned char data[] = {0x38 | 1 << 7, (unsigned char)*length};
  return (*spiTransfer)(data, 2, customData);
}


x86 assembly (clang, -O0):
<setPayloadLength>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    %rdx,-0x20(%rbp)
mov    -0x10(%rbp),%rax
cmpl   $0xff,(%rax)
jbe    1130 <setPayloadLength+0x30>
movl   $0xffffffff,-0x4(%rbp)
jmp    1153 <setPayloadLength+0x53>
movb   $0xb8,-0x22(%rbp)
mov    -0x10(%rbp),%rax
mov    (%rax),%eax
mov    %al,-0x21(%rbp)
mov    -0x18(%rbp),%rax
lea    -0x22(%rbp),%rdi
mov    -0x20(%rbp),%rdx
mov    $0x2,%esi
call   *%rax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<setPayloadLength>:
push   %rax
mov    %rsi,%rcx
mov    (%rdi),%esi
mov    $0xffffffff,%eax
cmp    $0xff,%esi
ja     1129 <setPayloadLength+0x29>
movb   $0xb8,0x6(%rsp)
mov    %sil,0x7(%rsp)
lea    0x6(%rsp),%rdi
mov    $0x2,%esi
call   *%rcx
pop    %rcx
ret

LLVM IR (-O0):
define i32 @setPayloadLength(i32* %0, i32 (i8*, i32, i8*)* %1, i8* %2) {
%4 = alloca i32
%5 = alloca i32*
%6 = alloca i32 (i8*, i32, i8*)*
%7 = alloca i8*
%8 = alloca [2 x i8]
store i32* %0, i32** %5
store i32 (i8*, i32, i8*)* %1, i32 (i8*, i32, i8*)** %6
store i8* %2, i8** %7
%9 = load i32*, i32** %5
%10 = load i32, i32* %9
%11 = icmp ugt i32 %10, 255
br i1 %11, label %12, label %13
12: ; preds = %3
store i32 -1, i32* %4
br label %23
13: ; preds = %3
%14 = getelementptr inbounds [2 x i8], [2 x i8]* %8, i64 0, i64 0
store i8 -72, i8* %14
%15 = getelementptr inbounds i8, i8* %14, i64 1
%16 = load i32*, i32** %5
%17 = load i32, i32* %16
%18 = trunc i32 %17 to i8
store i8 %18, i8* %15
%19 = load i32 (i8*, i32, i8*)*, i32 (i8*, i32, i8*)** %6
%20 = getelementptr inbounds [2 x i8], [2 x i8]* %8, i64 0, i64 0
%21 = load i8*, i8** %7
%22 = call i32 %19(i8* %20, i32 2, i8* %21)
store i32 %22, i32* %4
br label %23
23: ; preds = %13, %12
%24 = load i32, i32* %4
ret i32 %24
}

LLVM IR (-O2):
define i32 @setPayloadLength(i32* nocapture %0, i32 (i8*, i32, i8*)* nocapture %1, i8* %2) {
%4 = alloca [2 x i8]
%5 = load i32, i32* %0
%6 = icmp ugt i32 %5, 255
br i1 %6, label %12, label %7
7: ; preds = %3
%8 = getelementptr inbounds [2 x i8], [2 x i8]* %4, i64 0, i64 0
store i8 -72, i8* %8
%9 = getelementptr inbounds [2 x i8], [2 x i8]* %4, i64 0, i64 1
%10 = trunc i32 %5 to i8
store i8 %10, i8* %9
%11 = call i32 %1(i8* %8, i32 2, i8* %2)
br label %12
12: ; preds = %3, %7
%13 = phi i32 [ %11, %7 ], [ -1, %3 ]
ret i32 %13
}
/* Variables and functions */
void *ft_memset(void *b, int c, size_t len) {
  unsigned char character;
  size_t i;
  character = (unsigned char)c;
  i = 0;
  while (i < len) {
    ((unsigned char *)b)[i] = character;
    i++;
  }
  return (b);
}


x86 assembly (clang, -O0):
<ft_memset>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0xc(%rbp),%eax
mov    %al,-0x19(%rbp)
movq   $0x0,-0x28(%rbp)
mov    -0x28(%rbp),%rax
cmp    -0x18(%rbp),%rax
jae    114a <ft_memset+0x4a>
mov    -0x19(%rbp),%dl
mov    -0x8(%rbp),%rax
mov    -0x28(%rbp),%rcx
mov    %dl,(%rax,%rcx,1)
mov    -0x28(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x28(%rbp)
jmp    111d <ft_memset+0x1d>
mov    -0x8(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<ft_memset>:
push   %rbx
mov    %rdi,%rbx
test   %rdx,%rdx
je     1121 <ft_memset+0x11>
mov    %rbx,%rdi
call   1030 <memset@plt>
mov    %rbx,%rax
pop    %rbx
ret

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

LLVM IR (-O2):
define i8* @ft_memset(i8* returned writeonly %0, i32 %1, i64 %2) {
%4 = icmp eq i64 %2, 0
br i1 %4, label %7, label %5
5: ; preds = %3
%6 = trunc i32 %1 to i8
br label %7
7: ; preds = %5, %3
ret i8* %0
}
void *test_anti_range_67(long n) {
  extern void *alloc_anti_range_67(long) __attribute__((alloc_size(1)));
  if (0 <= n && n <= 0)
    n = 0 - 1;
  return alloc_anti_range_67(n);
}


x86 assembly (clang, -O0):
<test_anti_range_67>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
xor    %eax,%eax
cmp    -0x8(%rbp),%rax
jg     113b <test_anti_range_67+0x2b>
cmpq   $0x0,-0x8(%rbp)
jg     113b <test_anti_range_67+0x2b>
movq   $0xffffffffffffffff,-0x8(%rbp)
ff
mov    -0x8(%rbp),%rdi
call   1030 <alloc_anti_range_67@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_anti_range_67>:
cmp    $0x1,%rdi
sbb    %rax,%rax
or     %rax,%rdi
jmp    1030 <alloc_anti_range_67@plt>

LLVM IR (-O0):
define i8* @test_anti_range_67(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = load i64, i64* %2
%4 = icmp sle i64 0, %3
br i1 %4, label %5, label %9
5: ; preds = %1
%6 = load i64, i64* %2
%7 = icmp sle i64 %6, 0
br i1 %7, label %8, label %9
8: ; preds = %5
store i64 -1, i64* %2
br label %9
9: ; preds = %8, %5, %1
%10 = load i64, i64* %2
%11 = call i8* @alloc_anti_range_67(i64 %10)
ret i8* %11
}

LLVM IR (-O2):
define i8* @test_anti_range_67(i64 %0) {
%2 = icmp eq i64 %0, 0
%3 = select i1 %2, i64 -1, i64 %0
%4 = tail call i8* @alloc_anti_range_67(i64 %3)
ret i8* %4
}
/* Variables and functions */
int strcmp(char const *, char const *);
int test13a(const char *a1, const char *a2) { return strcmp(a1, a2); }


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

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

LLVM IR (-O0):
define i32 @test13a(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
store i8* %0, i8** %3
store i8* %1, i8** %4
%5 = load i8*, i8** %3
%6 = load i8*, i8** %4
%7 = call i32 @strcmp(i8* %5, i8* %6)
ret i32 %7
}

LLVM IR (-O2):
define i32 @test13a(i8* nocapture %0, i8* nocapture %1) {
%3 = tail call i32 @strcmp(i8* dereferenceable(1) %0, i8* dereferenceable(1) %1)
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ DMA0_DMA16_DriverIRQHandler();
__attribute__((weak)) void DMA0_DMA16_IRQHandler(void) {
  DMA0_DMA16_DriverIRQHandler();
}


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

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

LLVM IR (-O0):
define weak void @DMA0_DMA16_IRQHandler() {
%1 = call i32 (...) @DMA0_DMA16_DriverIRQHandler()
ret void
}

LLVM IR (-O2):
define weak void @DMA0_DMA16_IRQHandler() {
%1 = tail call i32 (...) @DMA0_DMA16_DriverIRQHandler()
ret void
}
void rotate(int *a, int *b, int *c) {
  int beispiel;
  beispiel = *a + *b;
  *a = *c;
  *b = beispiel - *b;
  *c = beispiel - *b;
}


x86 assembly (clang, -O0):
<rotate>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%eax
mov    -0x10(%rbp),%rcx
add    (%rcx),%eax
mov    %eax,-0x1c(%rbp)
mov    -0x18(%rbp),%rax
mov    (%rax),%ecx
mov    -0x8(%rbp),%rax
mov    %ecx,(%rax)
mov    -0x1c(%rbp),%ecx
mov    -0x10(%rbp),%rax
sub    (%rax),%ecx
mov    -0x10(%rbp),%rax
mov    %ecx,(%rax)
mov    -0x1c(%rbp),%ecx
mov    -0x10(%rbp),%rax
sub    (%rax),%ecx
mov    -0x18(%rbp),%rax
mov    %ecx,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<rotate>:
mov    (%rsi),%eax
add    (%rdi),%eax
mov    (%rdx),%ecx
mov    %ecx,(%rdi)
mov    (%rsi),%ecx
sub    %ecx,%eax
mov    %eax,(%rsi)
mov    %ecx,(%rdx)
ret

LLVM IR (-O0):
define void @rotate(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
%8 = load i32*, i32** %4
%9 = load i32, i32* %8
%10 = load i32*, i32** %5
%11 = load i32, i32* %10
%12 = add nsw i32 %9, %11
store i32 %12, i32* %7
%13 = load i32*, i32** %6
%14 = load i32, i32* %13
%15 = load i32*, i32** %4
store i32 %14, i32* %15
%16 = load i32, i32* %7
%17 = load i32*, i32** %5
%18 = load i32, i32* %17
%19 = sub nsw i32 %16, %18
%20 = load i32*, i32** %5
store i32 %19, i32* %20
%21 = load i32, i32* %7
%22 = load i32*, i32** %5
%23 = load i32, i32* %22
%24 = sub nsw i32 %21, %23
%25 = load i32*, i32** %6
store i32 %24, i32* %25
ret void
}

LLVM IR (-O2):
define void @rotate(i32* nocapture %0, i32* nocapture %1, i32* nocapture %2) {
%4 = load i32, i32* %0
%5 = load i32, i32* %1
%6 = add nsw i32 %5, %4
%7 = load i32, i32* %2
store i32 %7, i32* %0
%8 = load i32, i32* %1
%9 = sub i32 %6, %8
store i32 %9, i32* %1
store i32 %8, i32* %2
ret void
}
long long zig_zag_unfixll(unsigned long long inp) {
  return ((long long)(((inp)&1) ? (~((inp) >> 1)) : ((inp) >> 1)));
}


x86 assembly (clang, -O0):
<zig_zag_unfixll>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
and    $0x1,%rax
cmp    $0x0,%rax
je     112f <zig_zag_unfixll+0x2f>
mov    -0x8(%rbp),%rax
shr    $0x1,%rax
xor    $0xffffffffffffffff,%rax
mov    %rax,-0x10(%rbp)
jmp    113b <zig_zag_unfixll+0x3b>
mov    -0x8(%rbp),%rax
shr    $0x1,%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<zig_zag_unfixll>:
mov    %rdi,%rax
shr    %rax
and    $0x1,%edi
neg    %rdi
xor    %rdi,%rax
ret

LLVM IR (-O0):
define i64 @zig_zag_unfixll(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = load i64, i64* %2
%4 = and i64 %3, 1
%5 = icmp ne i64 %4, 0
br i1 %5, label %6, label %10
6: ; preds = %1
%7 = load i64, i64* %2
%8 = lshr i64 %7, 1
%9 = xor i64 %8, -1
br label %13
10: ; preds = %1
%11 = load i64, i64* %2
%12 = lshr i64 %11, 1
br label %13
13: ; preds = %10, %6
%14 = phi i64 [ %9, %6 ], [ %12, %10 ]
ret i64 %14
}

LLVM IR (-O2):
define i64 @zig_zag_unfixll(i64 %0) {
%2 = lshr i64 %0, 1
%3 = and i64 %0, 1
%4 = sub nsw i64 0, %3
%5 = xor i64 %2, %4
ret i64 %5
}
/* Variables and functions */
int /*<<< orphan*/ putchar(unsigned int);
int vprintf_help(unsigned c, void **ptr) {
  (void)(ptr);
  putchar(c);
  return 0;
}


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

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

LLVM IR (-O0):
define i32 @vprintf_help(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i8**
store i32 %0, i32* %3
store i8** %1, i8*** %4
%5 = load i8**, i8*** %4
%6 = load i32, i32* %3
%7 = call i32 @putchar(i32 %6)
ret i32 0
}

LLVM IR (-O2):
define i32 @vprintf_help(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @putchar(i32 %0)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ strlen(char *);
int /*<<< orphan*/ write(int, char *, int /*<<< orphan*/);
void puterr(char *str) { write(2, str, strlen(str)); }


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

x86 assembly (clang, -O2):
<puterr>:
push   %rbx
mov    %rdi,%rbx
call   1040 <strlen@plt>
mov    $0x2,%edi
mov    %rbx,%rsi
mov    %eax,%edx
pop    %rbx
jmp    1030 <write@plt>

LLVM IR (-O0):
define void @puterr(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = load i8*, i8** %2
%5 = call i32 @strlen(i8* %4)
%6 = call i32 @write(i32 2, i8* %3, i32 %5)
ret void
}

LLVM IR (-O2):
define void @puterr(i8* %0) {
%2 = tail call i32 @strlen(i8* %0)
%3 = tail call i32 @write(i32 2, i8* %0, i32 %2)
ret void
}
/* Variables and functions */
int _ada_use_c2phc4c(int, int *, int *, double *, int /*<<< orphan*/);
int mapcon_number_of_maps(int dim, int *nbmaps) {
  int fail;
  double *c;
  fail = _ada_use_c2phc4c(434, &dim, nbmaps, c, 0);
  return fail;
}


x86 assembly (clang, -O0):
<mapcon_number_of_maps>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rdx
mov    -0x20(%rbp),%rcx
mov    $0x1b2,%edi
lea    -0x4(%rbp),%rsi
xor    %r8d,%r8d
call   1030 <_ada_use_c2phc4c@plt>
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<mapcon_number_of_maps>:
push   %rax
mov    %rsi,%rdx
mov    %edi,0x4(%rsp)
lea    0x4(%rsp),%rsi
mov    $0x1b2,%edi
xor    %r8d,%r8d
call   1030 <_ada_use_c2phc4c@plt>
pop    %rcx
ret

LLVM IR (-O0):
define i32 @mapcon_number_of_maps(i32 %0, i32* %1) {
%3 = alloca i32
%4 = alloca i32*
%5 = alloca i32
%6 = alloca double*
store i32 %0, i32* %3
store i32* %1, i32** %4
%7 = load i32*, i32** %4
%8 = load double*, double** %6
%9 = call i32 @_ada_use_c2phc4c(i32 434, i32* %3, i32* %7, double* %8, i32 0)
store i32 %9, i32* %5
%10 = load i32, i32* %5
ret i32 %10
}

LLVM IR (-O2):
define i32 @mapcon_number_of_maps(i32 %0, i32* %1) {
%3 = alloca i32
store i32 %0, i32* %3
%4 = call i32 @_ada_use_c2phc4c(i32 434, i32* %3, i32* %1, double* undef, i32 0)
ret i32 %4
}
/* Type definitions */
typedef int /*<<< orphan*/ wchar_t;

/* Variables and functions */
size_t wcslen(const wchar_t *s) {
  size_t len = 0;
  while (*s++)
    len++;
  return len;
}


x86 assembly (clang, -O0):
<wcslen>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movq   $0x0,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,%rcx
add    $0x4,%rcx
mov    %rcx,-0x8(%rbp)
cmpl   $0x0,(%rax)
je     1139 <wcslen+0x39>
mov    -0x10(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x10(%rbp)
jmp    1110 <wcslen+0x10>
mov    -0x10(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<wcslen>:
cmpl   $0x0,(%rdi)
je     111f <wcslen+0x1f>
xor    %ecx,%ecx
nopw   0x0(%rax,%rax,1)
lea    0x1(%rcx),%rax
cmpl   $0x0,0x4(%rdi,%rcx,4)
mov    %rax,%rcx
jne    1110 <wcslen+0x10>
ret
xor    %eax,%eax
ret

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

LLVM IR (-O2):
define i64 @wcslen(i32* nocapture %0) {
%2 = load i32, i32* %0
%3 = icmp eq i32 %2, 0
br i1 %3, label %11, label %4
4: ; preds = %1, %4
%5 = phi i64 [ %8, %4 ], [ 0, %1 ]
%6 = phi i32* [ %7, %4 ], [ %0, %1 ]
%7 = getelementptr inbounds i32, i32* %6, i64 1
%8 = add i64 %5, 1
%9 = load i32, i32* %7
%10 = icmp eq i32 %9, 0
br i1 %10, label %11, label %4
11: ; preds = %4, %1
%12 = phi i64 [ 0, %1 ], [ %8, %4 ]
ret i64 %12
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
void afficherCoups(int cpt) {
  printf("\nIl vous reste %d coups a jouer\n", cpt);
}


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

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

LLVM IR (-O0):
@.str = [33 x i8] c"\0AIl vous reste %d coups a jouer\0A\00"
define void @afficherCoups(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = call i32 @printf(i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str, i64 0, i64 0), i32 %3)
ret void
}

LLVM IR (-O2):
@.str = [33 x i8] c"\0AIl vous reste %d coups a jouer\0A\00"
define void @afficherCoups(i32 %0) {
%2 = tail call i32 @printf(i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str, i64 0, i64 0), i32 %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ TestCrack();
int /*<<< orphan*/ TestRotK();
int main(int argc, char *argv[]) {
  TestRotK();
  TestCrack();
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    $0x0,%al
call   1040 <TestRotK@plt>
mov    $0x0,%al
call   1030 <TestCrack@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%6 = call i32 (...) @TestRotK()
%7 = call i32 (...) @TestCrack()
ret i32 0
}

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 (...) @TestRotK()
%4 = tail call i32 (...) @TestCrack()
ret i32 0
}
/* Variables and functions */
int f145(int *);
int f146(int *p) { return f145(p); }


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

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

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

LLVM IR (-O2):
define i32 @f146(i32* %0) {
%2 = tail call i32 @f145(i32* %0)
ret i32 %2
}
/* Variables and functions */
int /*<<< orphan*/ die(char *);
void overflo() { die("wordlist too large."); }


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

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

LLVM IR (-O0):
@.str = [20 x i8] c"wordlist too large.\00"
define void @overflo() {
%1 = call i32 @die(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [20 x i8] c"wordlist too large.\00"
define void @overflo() {
%1 = tail call i32 @die(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0))
ret void
}
/* Type definitions */
typedef int uint32_t;

/* Variables and functions */
bool ADCBusy(uint32_t ui32Base) {
  ;
  return (((*((volatile uint32_t *)(ui32Base + 0x00000000))) & 0x00010000)
              ? true
              : false);
}


x86 assembly (clang, -O0):
<ADCBusy>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x0,%eax
cltq
mov    (%rax),%edx
and    $0x10000,%edx
xor    %eax,%eax
mov    $0x1,%ecx
cmp    $0x0,%edx
cmovne %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<ADCBusy>:
movslq %edi,%rax
mov    (%rax),%eax
shr    $0x10,%eax
and    $0x1,%eax
ret

LLVM IR (-O0):
define i32 @ADCBusy(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = add nsw i32 %3, 0
%5 = sext i32 %4 to i64
%6 = inttoptr i64 %5 to i32*
%7 = load volatile i32, i32* %6
%8 = and i32 %7, 65536
%9 = icmp ne i32 %8, 0
%10 = zext i1 %9 to i64
%11 = select i1 %9, i32 1, i32 0
ret i32 %11
}

LLVM IR (-O2):
define i32 @ADCBusy(i32 %0) {
%2 = sext i32 %0 to i64
%3 = inttoptr i64 %2 to i32*
%4 = load volatile i32, i32* %3
%5 = lshr i32 %4, 16
%6 = and i32 %5, 1
ret i32 %6
}
/* Variables and functions */
int /*<<< orphan*/ free(void *);
void wrap_free(void *p) { free(p); }


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

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

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

LLVM IR (-O2):
define void @wrap_free(i8* nocapture %0) {
%2 = tail call i32 @free(i8* %0)
ret void
}
/* Type definitions */
struct FormaGeometrica {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void disegnati_fg(const struct FormaGeometrica *buttalo) {
  printf("non disegno nulla\n");
}


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

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

LLVM IR (-O0):
%struct.FormaGeometrica = type { i32 }
@.str = [19 x i8] c"non disegno nulla\0A\00"
define void @disegnati_fg(%struct.FormaGeometrica* %0) {
%2 = alloca %struct.FormaGeometrica*
store %struct.FormaGeometrica* %0, %struct.FormaGeometrica** %2
%3 = call i32 @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
%struct.FormaGeometrica = type { i32 }
@str = [18 x i8] c"non disegno nulla\00"
define void @disegnati_fg(%struct.FormaGeometrica* nocapture readnone %0) {
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([18 x i8], [18 x i8]* @str, i64 0, i64 0))
ret void
}
/* Variables and functions */
int EXIT_SUCCESS;
int /*<<< orphan*/ l1();
int /*<<< orphan*/ l2();
int /*<<< orphan*/ l3();
int main(int argc, char **argv) {
  l1();
  l2();
  l3();
  return (EXIT_SUCCESS);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    $0x0,%al
call   1040 <l1@plt>
mov    $0x0,%al
call   1050 <l2@plt>
mov    $0x0,%al
call   1030 <l3@plt>
mov    0x2e7e(%rip),%rax
mov    (%rax),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1040 <l1@plt>
xor    %eax,%eax
call   1050 <l2@plt>
xor    %eax,%eax
call   1030 <l3@plt>
mov    0x2e93(%rip),%rax
mov    (%rax),%eax
pop    %rcx
ret

LLVM IR (-O0):
@EXIT_SUCCESS = global i32 0
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%6 = call i32 (...) @l1()
%7 = call i32 (...) @l2()
%8 = call i32 (...) @l3()
%9 = load i32, i32* @EXIT_SUCCESS
ret i32 %9
}

LLVM IR (-O2):
@EXIT_SUCCESS = global i32 0
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 (...) @l1()
%4 = tail call i32 (...) @l2()
%5 = tail call i32 (...) @l3()
%6 = load i32, i32* @EXIT_SUCCESS
ret i32 %6
}
/* Variables and functions */
int /*<<< orphan*/ free(char *);
void FreeArray2D(void **m) {
  free((char *)m[0]);
  free((char *)m);
}


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

x86 assembly (clang, -O2):
<FreeArray2D>:
push   %rbx
mov    %rdi,%rbx
mov    (%rdi),%rdi
call   1030 <free@plt>
mov    %rbx,%rdi
pop    %rbx
jmp    1030 <free@plt>

LLVM IR (-O0):
define void @FreeArray2D(i8** %0) {
%2 = alloca i8**
store i8** %0, i8*** %2
%3 = load i8**, i8*** %2
%4 = getelementptr inbounds i8*, i8** %3, i64 0
%5 = load i8*, i8** %4
%6 = call i32 @free(i8* %5)
%7 = load i8**, i8*** %2
%8 = bitcast i8** %7 to i8*
%9 = call i32 @free(i8* %8)
ret void
}

LLVM IR (-O2):
define void @FreeArray2D(i8** nocapture %0) {
%2 = load i8*, i8** %0
%3 = tail call i32 @free(i8* %2)
%4 = bitcast i8** %0 to i8*
%5 = tail call i32 @free(i8* %4)
ret void
}
void INT_Excep_ICU_GROUPBE0(void) {}


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

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

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

LLVM IR (-O2):
define void @INT_Excep_ICU_GROUPBE0() {
ret void
}
/* Variables and functions */
#define SIGCHLD 131
#define SIGHUP 130
#define SIGINT 129
#define SIGTERM 128
int /*<<< orphan*/ shutdown();
int /*<<< orphan*/ wait(int /*<<< orphan*/ *);
void sig_handler(int signum) {
  switch (signum) {
  case SIGINT:
  case SIGTERM:
  case SIGHUP:
    shutdown();
    break;
  case SIGCHLD:
    wait(NULL);
    break;
  }
}


x86 assembly (clang, -O0):
<sig_handler>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
mov    %eax,-0x8(%rbp)
add    $0xffffff80,%eax
sub    $0x3,%eax
jb     1155 <sig_handler+0x35>
jmp    1142 <sig_handler+0x22>
mov    -0x8(%rbp),%eax
sub    $0x83,%eax
je     1161 <sig_handler+0x41>
jmp    116a <sig_handler+0x4a>
mov    $0x0,%al
call   1030 <shutdown@plt>
jmp    116a <sig_handler+0x4a>
xor    %eax,%eax
mov    %eax,%edi
call   1040 <wait@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<sig_handler>:
lea    -0x80(%rdi),%eax
cmp    $0x3,%eax
jae    112f <sig_handler+0xf>
xor    %eax,%eax
jmp    1030 <shutdown@plt>
cmp    $0x83,%edi
jne    113e <sig_handler+0x1e>
xor    %edi,%edi
jmp    1040 <wait@plt>
ret

LLVM IR (-O0):
define void @sig_handler(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
switch i32 %3, label %8 [
i32 129, label %4
i32 128, label %4
i32 130, label %4
i32 131, label %6
]
4: ; preds = %1, %1, %1
%5 = call i32 (...) @shutdown()
br label %8
6: ; preds = %1
%7 = call i32 @wait(i32* null)
br label %8
8: ; preds = %1, %6, %4
ret void
}

LLVM IR (-O2):
define void @sig_handler(i32 %0) {
switch i32 %0, label %6 [
i32 129, label %2
i32 128, label %2
i32 130, label %2
i32 131, label %4
]
2: ; preds = %1, %1, %1
%3 = tail call i32 (...) @shutdown()
br label %6
4: ; preds = %1
%5 = tail call i32 @wait(i32* null)
br label %6
6: ; preds = %1, %4, %2
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
void sighandler(int sig) { printf("Happily ignoring signal %d\n", sig); }


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

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

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

LLVM IR (-O2):
@.str = [28 x i8] c"Happily ignoring signal %d\0A\00"
define void @sighandler(i32 %0) {
%2 = tail call i32 @printf(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str, i64 0, i64 0), i32 %0)
ret void
}
void write_short(unsigned char *data, int offset, short value) {
  data[offset] = value >> 8;
  data[offset + 1] = value;
}


x86 assembly (clang, -O0):
<write_short>:
push   %rbp
mov    %rsp,%rbp
mov    %dx,%ax
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %ax,-0xe(%rbp)
movswl -0xe(%rbp),%eax
sar    $0x8,%eax
mov    %al,%dl
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
mov    %dl,(%rax,%rcx,1)
mov    -0xe(%rbp),%ax
mov    %al,%dl
mov    -0x8(%rbp),%rax
mov    -0xc(%rbp),%ecx
add    $0x1,%ecx
movslq %ecx,%rcx
mov    %dl,(%rax,%rcx,1)
pop    %rbp
ret

x86 assembly (clang, -O2):
<write_short>:
movslq %esi,%rax
rol    $0x8,%dx
mov    %dx,(%rdi,%rax,1)
ret

LLVM IR (-O0):
define void @write_short(i8* %0, i32 %1, i16 signext %2) {
%4 = alloca i8*
%5 = alloca i32
%6 = alloca i16
store i8* %0, i8** %4
store i32 %1, i32* %5
store i16 %2, i16* %6
%7 = load i16, i16* %6
%8 = sext i16 %7 to i32
%9 = ashr i32 %8, 8
%10 = trunc i32 %9 to i8
%11 = load i8*, i8** %4
%12 = load i32, i32* %5
%13 = sext i32 %12 to i64
%14 = getelementptr inbounds i8, i8* %11, i64 %13
store i8 %10, i8* %14
%15 = load i16, i16* %6
%16 = trunc i16 %15 to i8
%17 = load i8*, i8** %4
%18 = load i32, i32* %5
%19 = add nsw i32 %18, 1
%20 = sext i32 %19 to i64
%21 = getelementptr inbounds i8, i8* %17, i64 %20
store i8 %16, i8* %21
ret void
}

LLVM IR (-O2):
define void @write_short(i8* nocapture writeonly %0, i32 %1, i16 signext %2) {
%4 = lshr i16 %2, 8
%5 = trunc i16 %4 to i8
%6 = sext i32 %1 to i64
%7 = getelementptr inbounds i8, i8* %0, i64 %6
store i8 %5, i8* %7
%8 = trunc i16 %2 to i8
%9 = add nsw i32 %1, 1
%10 = sext i32 %9 to i64
%11 = getelementptr inbounds i8, i8* %0, i64 %10
store i8 %8, i8* %11
ret void
}
/* Variables and functions */
double __nv_tanh(double);
double tanh(double __a) { return __nv_tanh(__a); }


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

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

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

LLVM IR (-O2):
define double @tanh(double %0) {
%2 = tail call double @__nv_tanh(double %0)
ret double %2
}
/* Type definitions */
struct battle_char {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ add_status(struct battle_char *, int);
scalar_t__ get_random(int /*<<< orphan*/, int);
scalar_t__ mod6(struct battle_char *, struct battle_char *, int);
void quick(struct battle_char *origin, struct battle_char *target) {
  if (get_random(0, 100) < mod6(origin, target, 140)) {
    add_status(target, 29);
  }
}


x86 assembly (clang, -O0):
<quick>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
xor    %edi,%edi
mov    $0x64,%esi
call   1030 <get_random@plt>
mov    %rax,-0x18(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    $0x8c,%edx
call   1040 <mod6@plt>
mov    %rax,%rcx
mov    -0x18(%rbp),%rax
cmp    %rcx,%rax
jge    1180 <quick+0x50>
mov    -0x10(%rbp),%rdi
mov    $0x1d,%esi
call   1050 <add_status@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<quick>:
push   %r15
push   %r14
push   %rbx
mov    %rsi,%r14
mov    %rdi,%r15
xor    %edi,%edi
mov    $0x64,%esi
call   1030 <get_random@plt>
mov    %rax,%rbx
mov    %r15,%rdi
mov    %r14,%rsi
mov    $0x8c,%edx
call   1040 <mod6@plt>
cmp    %rax,%rbx
jge    1171 <quick+0x41>
mov    %r14,%rdi
mov    $0x1d,%esi
pop    %rbx
pop    %r14
pop    %r15
jmp    1050 <add_status@plt>
pop    %rbx
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
%struct.battle_char = type { i32 }
define void @quick(%struct.battle_char* %0, %struct.battle_char* %1) {
%3 = alloca %struct.battle_char*
%4 = alloca %struct.battle_char*
store %struct.battle_char* %0, %struct.battle_char** %3
store %struct.battle_char* %1, %struct.battle_char** %4
%5 = call i64 @get_random(i32 0, i32 100)
%6 = load %struct.battle_char*, %struct.battle_char** %3
%7 = load %struct.battle_char*, %struct.battle_char** %4
%8 = call i64 @mod6(%struct.battle_char* %6, %struct.battle_char* %7, i32 140)
%9 = icmp slt i64 %5, %8
br i1 %9, label %10, label %13
10: ; preds = %2
%11 = load %struct.battle_char*, %struct.battle_char** %4
%12 = call i32 @add_status(%struct.battle_char* %11, i32 29)
br label %13
13: ; preds = %10, %2
ret void
}

LLVM IR (-O2):
%struct.battle_char = type { i32 }
define void @quick(%struct.battle_char* %0, %struct.battle_char* %1) {
%3 = tail call i64 @get_random(i32 0, i32 100)
%4 = tail call i64 @mod6(%struct.battle_char* %0, %struct.battle_char* %1, i32 140)
%5 = icmp slt i64 %3, %4
br i1 %5, label %6, label %8
6: ; preds = %2
%7 = tail call i32 @add_status(%struct.battle_char* %1, i32 29)
br label %8
8: ; preds = %6, %2
ret void
}
void a4bcdefghijklmnopqrstuvwxzy() {}


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

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

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

LLVM IR (-O2):
define void @a4bcdefghijklmnopqrstuvwxzy() {
ret void
}
void pickspaces(line, col, number, nl) int line, col, number, nl;
{ pcspaces(line, col, number, nl, 0); }


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

x86 assembly (clang, -O2):
<pickspaces>:
xor    %r8d,%r8d
xor    %eax,%eax
jmp    1030 <pcspaces@plt>

LLVM IR (-O0):
define void @pickspaces(i32 %0, i32 %1, i32 %2, i32 %3) {
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
store i32 %0, i32* %5
store i32 %1, i32* %6
store i32 %2, i32* %7
store i32 %3, i32* %8
%9 = load i32, i32* %5
%10 = load i32, i32* %6
%11 = load i32, i32* %7
%12 = load i32, i32* %8
%13 = call i32 (i32, i32, i32, i32, i32, ...) bitcast (i32 (...)* @pcspaces to i32 (i32, i32, i32, i32, i32, ...)*)(i32 %9, i32 %10, i32 %11, i32 %12, i32 0)
ret void
}

LLVM IR (-O2):
define void @pickspaces(i32 %0, i32 %1, i32 %2, i32 %3) {
%5 = tail call i32 (i32, i32, i32, i32, i32, ...) bitcast (i32 (...)* @pcspaces to i32 (i32, i32, i32, i32, i32, ...)*)(i32 %0, i32 %1, i32 %2, i32 %3, i32 0)
ret void
}
void mimic_daravon(struct battle_char *origin, struct battle_char *target) {}


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

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

LLVM IR (-O0):
%struct.battle_char = type opaque
define void @mimic_daravon(%struct.battle_char* %0, %struct.battle_char* %1) {
%3 = alloca %struct.battle_char*
%4 = alloca %struct.battle_char*
store %struct.battle_char* %0, %struct.battle_char** %3
store %struct.battle_char* %1, %struct.battle_char** %4
ret void
}

LLVM IR (-O2):
%struct.battle_char = type opaque
define void @mimic_daravon(%struct.battle_char* nocapture %0, %struct.battle_char* nocapture %1) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ charts_store();
void chartsdata_store(void) { charts_store(); }


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

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

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

LLVM IR (-O2):
define void @chartsdata_store() {
%1 = tail call i32 (...) @charts_store()
ret void
}
void detab(p) char *p;
{
  while (p = strpbrk(p, "\t\n\v\f\r"))
    *p = ' ';
}


x86 assembly (clang, -O0):
<detab>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
lea    0xed9(%rip),%rsi
call   1030 <strpbrk@plt>
mov    %rax,-0x8(%rbp)
cmp    $0x0,%rax
je     1146 <detab+0x36>
mov    -0x8(%rbp),%rax
movb   $0x20,(%rax)
jmp    111c <detab+0xc>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<detab>:
push   %rbx
lea    0xee8(%rip),%rsi
call   1030 <strpbrk@plt>
test   %rax,%rax
je     1143 <detab+0x33>
lea    0xed7(%rip),%rbx
nopl   0x0(%rax)
movb   $0x20,(%rax)
mov    %rax,%rdi
mov    %rbx,%rsi
call   1030 <strpbrk@plt>
test   %rax,%rax
jne    1130 <detab+0x20>
pop    %rbx
ret

LLVM IR (-O0):
@.str = [6 x i8] c"\09\0A\0B\0C\0D\00"
define void @detab(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
br label %3
3: ; preds = %7, %1
%4 = load i8*, i8** %2
%5 = call i8* @strpbrk(i8* %4, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0))
store i8* %5, i8** %2
%6 = icmp ne i8* %5, null
br i1 %6, label %7, label %9
7: ; preds = %3
%8 = load i8*, i8** %2
store i8 32, i8* %8
br label %3
9: ; preds = %3
ret void
}

LLVM IR (-O2):
@.str = [6 x i8] c"\09\0A\0B\0C\0D\00"
define void @detab(i8* %0) {
%2 = tail call i8* @strpbrk(i8* %0, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0))
%3 = icmp eq i8* %2, null
br i1 %3, label %8, label %4
4: ; preds = %1, %4
%5 = phi i8* [ %6, %4 ], [ %2, %1 ]
store i8 32, i8* %5
%6 = tail call i8* @strpbrk(i8* %5, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0))
%7 = icmp eq i8* %6, null
br i1 %7, label %8, label %4
8: ; preds = %4, %1
ret void
}
void array_free(char **array) {
  char **tmp;
  if (!array)
    return;
  for (tmp = array; *tmp; tmp++)
    xfree(*tmp);
  xfree(array);
}


x86 assembly (clang, -O0):
<array_free>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
cmpq   $0x0,-0x8(%rbp)
jne    112c <array_free+0x1c>
jmp    116c <array_free+0x5c>
mov    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
cmpq   $0x0,(%rax)
je     1161 <array_free+0x51>
mov    -0x10(%rbp),%rax
mov    (%rax),%rdi
mov    $0x0,%al
call   1030 <xfree@plt>
mov    -0x10(%rbp),%rax
add    $0x8,%rax
mov    %rax,-0x10(%rbp)
jmp    1134 <array_free+0x24>
mov    -0x8(%rbp),%rdi
mov    $0x0,%al
call   1030 <xfree@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<array_free>:
test   %rdi,%rdi
je     1154 <array_free+0x44>
push   %r14
push   %rbx
push   %rax
mov    %rdi,%r14
mov    (%rdi),%rdi
test   %rdi,%rdi
je     1143 <array_free+0x33>
lea    0x8(%r14),%rbx
nopl   0x0(%rax,%rax,1)
xor    %eax,%eax
call   1030 <xfree@plt>
mov    (%rbx),%rdi
add    $0x8,%rbx
test   %rdi,%rdi
jne    1130 <array_free+0x20>
mov    %r14,%rdi
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1030 <xfree@plt>
ret

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

LLVM IR (-O2):
define void @array_free(i8** %0) {
%2 = icmp eq i8** %0, null
br i1 %2, label %15, label %3
3: ; preds = %1
%4 = load i8*, i8** %0
%5 = icmp eq i8* %4, null
br i1 %5, label %13, label %6
6: ; preds = %3, %6
%7 = phi i8* [ %11, %6 ], [ %4, %3 ]
%8 = phi i8** [ %10, %6 ], [ %0, %3 ]
%9 = tail call i32 (i8*, ...) bitcast (i32 (...)* @xfree to i32 (i8*, ...)*)(i8* %7)
%10 = getelementptr inbounds i8*, i8** %8, i64 1
%11 = load i8*, i8** %10
%12 = icmp eq i8* %11, null
br i1 %12, label %13, label %6
13: ; preds = %6, %3
%14 = tail call i32 (i8**, ...) bitcast (i32 (...)* @xfree to i32 (i8**, ...)*)(i8** %0)
br label %15
15: ; preds = %1, %13
ret void
}
/* Type definitions */
struct inode {
  int dummy;
};
struct file {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ DRM_DEBUG(char *);
int drm_block(struct inode *inode, struct file *filp, unsigned int cmd,
              unsigned long arg) {
  DRM_DEBUG("\n");
  return 0;
}


x86 assembly (clang, -O0):
<drm_block>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    %rcx,-0x20(%rbp)
lea    0xed2(%rip),%rdi
call   1030 <DRM_DEBUG@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
%struct.inode = type { i32 }
%struct.file = type { i32 }
@.str = [2 x i8] c"\0A\00"
define i32 @drm_block(%struct.inode* %0, %struct.file* %1, i32 %2, i64 %3) {
%5 = alloca %struct.inode*
%6 = alloca %struct.file*
%7 = alloca i32
%8 = alloca i64
store %struct.inode* %0, %struct.inode** %5
store %struct.file* %1, %struct.file** %6
store i32 %2, i32* %7
store i64 %3, i64* %8
%9 = call i32 @DRM_DEBUG(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
%struct.inode = type { i32 }
%struct.file = type { i32 }
@.str = [2 x i8] c"\0A\00"
define i32 @drm_block(%struct.inode* nocapture readnone %0, %struct.file* nocapture readnone %1, i32 %2, i64 %3) {
%5 = tail call i32 @DRM_DEBUG(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
ret i32 0
}
long int __ashrsi3(long int a, short int b) {
  while (b--)
    a >>= 1;
  return a;
}


x86 assembly (clang, -O0):
<__ashrsi3>:
push   %rbp
mov    %rsp,%rbp
mov    %si,%ax
mov    %rdi,-0x8(%rbp)
mov    %ax,-0xa(%rbp)
mov    -0xa(%rbp),%ax
mov    %ax,%cx
add    $0xffff,%cx
mov    %cx,-0xa(%rbp)
cmp    $0x0,%ax
je     1139 <__ashrsi3+0x39>
mov    -0x8(%rbp),%rax
sar    $0x1,%rax
mov    %rax,-0x8(%rbp)
jmp    110f <__ashrsi3+0xf>
mov    -0x8(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<__ashrsi3>:
mov    %rdi,%rax
test   %si,%si
je     114a <__ashrsi3+0x4a>
lea    -0x1(%rsi),%ecx
mov    %esi,%edi
and    $0x7,%di
je     112d <__ashrsi3+0x2d>
xor    %edx,%edx
cs nopw 0x0(%rax,%rax,1)
nop
sar    %rax
add    $0x1,%edx
cmp    %dx,%di
jne    1120 <__ashrsi3+0x20>
sub    %edx,%esi
cmp    $0x7,%cx
jb     114a <__ashrsi3+0x4a>
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
sar    $0x8,%rax
add    $0xfff8,%si
jne    1140 <__ashrsi3+0x40>
ret

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

LLVM IR (-O2):
define i64 @__ashrsi3(i64 %0, i16 signext %1) {
%3 = icmp eq i16 %1, 0
br i1 %3, label %27, label %4
4: ; preds = %2
%5 = add i16 %1, -1
%6 = and i16 %1, 7
%7 = icmp eq i16 %6, 0
br i1 %7, label %16, label %8
8: ; preds = %4, %8
%9 = phi i16 [ %12, %8 ], [ %1, %4 ]
%10 = phi i64 [ %13, %8 ], [ %0, %4 ]
%11 = phi i16 [ %14, %8 ], [ 0, %4 ]
%12 = add i16 %9, -1
%13 = ashr i64 %10, 1
%14 = add i16 %11, 1
%15 = icmp eq i16 %14, %6
br i1 %15, label %16, label %8
16: ; preds = %8, %4
%17 = phi i64 [ undef, %4 ], [ %13, %8 ]
%18 = phi i16 [ %1, %4 ], [ %12, %8 ]
%19 = phi i64 [ %0, %4 ], [ %13, %8 ]
%20 = icmp ult i16 %5, 7
br i1 %20, label %27, label %21
21: ; preds = %16, %21
%22 = phi i16 [ %24, %21 ], [ %18, %16 ]
%23 = phi i64 [ %25, %21 ], [ %19, %16 ]
%24 = add i16 %22, -8
%25 = ashr i64 %23, 8
%26 = icmp eq i16 %24, 0
br i1 %26, label %27, label %21
27: ; preds = %16, %21, %2
%28 = phi i64 [ %0, %2 ], [ %17, %16 ], [ %25, %21 ]
ret i64 %28
}
void gtk_file_chooser_get_preview_widget() {}


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

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

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

LLVM IR (-O2):
define void @gtk_file_chooser_get_preview_widget() {
ret void
}
int f5(int a, int b) {
  for (;;) {
    a = b;
    b = a;
  }
  return a;
}


x86 assembly (clang, -O0):
<f5>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x8(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
mov    %eax,-0x8(%rbp)
jmp    110a <f5+0xa>

x86 assembly (clang, -O2):
<f5>:
jmp    1100 <f5>

LLVM IR (-O0):
define i32 @f5(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
br label %5
5: ; preds = %5, %2
%6 = load i32, i32* %4
store i32 %6, i32* %3
%7 = load i32, i32* %3
store i32 %7, i32* %4
br label %5
}

LLVM IR (-O2):
define i32 @f5(i32 %0, i32 %1) {
br label %3
3: ; preds = %3, %2
br label %3
}
/* Variables and functions */
int /*<<< orphan*/ exit(int const);
void spamm_exit(const int *const exitcode) { exit(*exitcode); }


x86 assembly (clang, -O0):
<spamm_exit>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%edi
call   1030 <exit@plt>

x86 assembly (clang, -O2):
<spamm_exit>:
push   %rax
mov    (%rdi),%edi
call   1030 <exit@plt>

LLVM IR (-O0):
define void @spamm_exit(i32* %0) {
%2 = alloca i32*
store i32* %0, i32** %2
%3 = load i32*, i32** %2
%4 = load i32, i32* %3
%5 = call i32 @exit(i32 %4)
unreachable
}

LLVM IR (-O2):
define void @spamm_exit(i32* nocapture %0) {
%2 = load i32, i32* %0
%3 = tail call i32 @exit(i32 %2)
unreachable
}
void pal_panels_write() {}


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

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

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

LLVM IR (-O2):
define void @pal_panels_write() {
ret void
}
int myfunc() { return 10; }


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

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

LLVM IR (-O0):
define i32 @myfunc() {
ret i32 10
}

LLVM IR (-O2):
define i32 @myfunc() {
ret i32 10
}