xunge/DecIR huggingface dataset:
/* Type definitions */
typedef int uint32_t;

/* Variables and functions */
void SysCtlPeripheralDisable(uint32_t ui32Peripheral) {
  ;
  (*((volatile uint32_t
          *)(((uint32_t)(0x400fe600 + ((ui32Peripheral & 0xff00) >> 8)) &
              0xF0000000) |
             0x02000000 |
             (((uint32_t)(0x400fe600 + ((ui32Peripheral & 0xff00) >> 8)) &
               0x000FFFFF)
              << 5) |
             ((ui32Peripheral & 0xff) << 2)))) = 0;
}


x86 assembly (clang, -O0):
<SysCtlPeripheralDisable>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
and    $0xff00,%eax
sar    $0x8,%eax
add    $0x400fe600,%eax
and    $0xf0000000,%eax
or     $0x2000000,%eax
mov    -0x4(%rbp),%ecx
and    $0xff00,%ecx
sar    $0x8,%ecx
add    $0x400fe600,%ecx
and    $0xfffff,%ecx
shl    $0x5,%ecx
or     %ecx,%eax
mov    -0x4(%rbp),%ecx
and    $0xff,%ecx
shl    $0x2,%ecx
or     %ecx,%eax
mov    %eax,%eax
movl   $0x0,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<SysCtlPeripheralDisable>:
movzbl %dil,%eax
shr    $0x3,%edi
and    $0x1fe0,%edi
shl    $0x2,%eax
or     %edi,%eax
movl   $0x0,0x43fcc000(%rax)
ret

LLVM IR (-O0):
define void @SysCtlPeripheralDisable(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = and i32 %3, 65280
%5 = ashr i32 %4, 8
%6 = add nsw i32 1074783744, %5
%7 = and i32 %6, -268435456
%8 = or i32 %7, 33554432
%9 = load i32, i32* %2
%10 = and i32 %9, 65280
%11 = ashr i32 %10, 8
%12 = add nsw i32 1074783744, %11
%13 = and i32 %12, 1048575
%14 = shl i32 %13, 5
%15 = or i32 %8, %14
%16 = load i32, i32* %2
%17 = and i32 %16, 255
%18 = shl i32 %17, 2
%19 = or i32 %15, %18
%20 = zext i32 %19 to i64
%21 = inttoptr i64 %20 to i32*
store volatile i32 0, i32* %21
ret void
}

LLVM IR (-O2):
define void @SysCtlPeripheralDisable(i32 %0) {
%2 = lshr i32 %0, 3
%3 = and i32 %2, 8160
%4 = shl i32 %0, 2
%5 = and i32 %4, 1020
%6 = or i32 %5, %3
%7 = or i32 %6, 1140637696
%8 = zext i32 %7 to i64
%9 = inttoptr i64 %8 to i32*
store volatile i32 0, i32* %9
ret void
}
/* Variables and functions */
int /*<<< orphan*/ Cigebr2d(int, char *, char *, int, int, int *, int, int,
                            int);
void wcc_Cigebr2d(int ConTxt, char *scope, char *top, int m, int n, char *A,
                  int lda, int rsrc, int csrc) {
  Cigebr2d(ConTxt, scope, top, m, n, (int *)A, lda, rsrc, csrc);
}


x86 assembly (clang, -O0):
<wcc_Cigebr2d>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
mov    0x20(%rbp),%eax
mov    0x18(%rbp),%eax
mov    0x10(%rbp),%eax
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %ecx,-0x1c(%rbp)
mov    %r8d,-0x20(%rbp)
mov    %r9,-0x28(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
mov    -0x1c(%rbp),%ecx
mov    -0x20(%rbp),%r8d
mov    -0x28(%rbp),%r9
mov    0x10(%rbp),%r11d
mov    0x18(%rbp),%r10d
mov    0x20(%rbp),%eax
mov    %r11d,(%rsp)
mov    %r10d,0x8(%rsp)
mov    %eax,0x10(%rsp)
call   1030 <Cigebr2d@plt>
add    $0x40,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
define void @wcc_Cigebr2d(i32 %0, i8* %1, i8* %2, i32 %3, i32 %4, i8* %5, i32 %6, i32 %7, i32 %8) {
%10 = alloca i32
%11 = alloca i8*
%12 = alloca i8*
%13 = alloca i32
%14 = alloca i32
%15 = alloca i8*
%16 = alloca i32
%17 = alloca i32
%18 = alloca i32
store i32 %0, i32* %10
store i8* %1, i8** %11
store i8* %2, i8** %12
store i32 %3, i32* %13
store i32 %4, i32* %14
store i8* %5, i8** %15
store i32 %6, i32* %16
store i32 %7, i32* %17
store i32 %8, i32* %18
%19 = load i32, i32* %10
%20 = load i8*, i8** %11
%21 = load i8*, i8** %12
%22 = load i32, i32* %13
%23 = load i32, i32* %14
%24 = load i8*, i8** %15
%25 = bitcast i8* %24 to i32*
%26 = load i32, i32* %16
%27 = load i32, i32* %17
%28 = load i32, i32* %18
%29 = call i32 @Cigebr2d(i32 %19, i8* %20, i8* %21, i32 %22, i32 %23, i32* %25, i32 %26, i32 %27, i32 %28)
ret void
}

LLVM IR (-O2):
define void @wcc_Cigebr2d(i32 %0, i8* %1, i8* %2, i32 %3, i32 %4, i8* %5, i32 %6, i32 %7, i32 %8) {
%10 = bitcast i8* %5 to i32*
%11 = tail call i32 @Cigebr2d(i32 %0, i8* %1, i8* %2, i32 %3, i32 %4, i32* %10, i32 %6, i32 %7, i32 %8)
ret void
}
void putch(char c) { asm volatile("int $0x30" ::"a"(1), "b"(c)); }


x86 assembly (clang, -O0):
<putch>:
push   %rbp
mov    %rsp,%rbp
push   %rbx
mov    %dil,%al
mov    %al,-0x9(%rbp)
mov    -0x9(%rbp),%bl
mov    $0x1,%eax
int    $0x30
pop    %rbx
pop    %rbp
ret

x86 assembly (clang, -O2):
<putch>:
push   %rbx
mov    %edi,%ebx
mov    $0x1,%eax
int    $0x30
pop    %rbx
ret

LLVM IR (-O0):
define void @putch(i8 signext %0) {
%2 = alloca i8
store i8 %0, i8* %2
%3 = load i8, i8* %2
ret void
}

LLVM IR (-O2):
define void @putch(i8 signext %0) {
tail call void asm sideeffect "int $$0x30", "{ax},{bx},~{dirflag},~{fpsr},~{flags}"(i32 1, i8 %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ puts(char *);
int /*<<< orphan*/ switch1();
int /*<<< orphan*/ switch2();
int /*<<< orphan*/ switch3();
int /*<<< orphan*/ switch4();
int main() {
  switch1();
  switch2();
  switch3();
  switch4();
  puts("");
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1050 <switch1@plt>
mov    $0x0,%al
call   1070 <switch2@plt>
mov    $0x0,%al
call   1040 <switch3@plt>
mov    $0x0,%al
call   1060 <switch4@plt>
lea    0xe89(%rip),%rdi
call   1030 <puts@plt>
xor    %eax,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1050 <switch1@plt>
xor    %eax,%eax
call   1070 <switch2@plt>
xor    %eax,%eax
call   1040 <switch3@plt>
xor    %eax,%eax
call   1060 <switch4@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [1 x i8] zeroinitializer
define i32 @main() {
%1 = call i32 (...) @switch1()
%2 = call i32 (...) @switch2()
%3 = call i32 (...) @switch3()
%4 = call i32 (...) @switch4()
%5 = call i32 @puts(i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @switch1()
%2 = tail call i32 (...) @switch2()
%3 = tail call i32 (...) @switch3()
%4 = tail call i32 (...) @switch4()
%5 = tail call i32 @putchar(i32 10)
ret i32 0
}
/* Type definitions */
typedef int __le16;

/* Variables and functions */
int cpu_to_le16(int);
int ieee80211_is_back(__le16 fc) {
  return (fc & cpu_to_le16(0x000c | 0x00f0)) == cpu_to_le16(0x0004 | 0x0090);
}


x86 assembly (clang, -O0):
<ieee80211_is_back>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    $0xfc,%edi
call   1030 <cpu_to_le16@plt>
mov    %eax,%ecx
mov    -0xc(%rbp),%eax
and    %ecx,%eax
mov    %eax,-0x8(%rbp)
mov    $0x94,%edi
call   1030 <cpu_to_le16@plt>
mov    %eax,%ecx
mov    -0x8(%rbp),%eax
cmp    %ecx,%eax
sete   %al
and    $0x1,%al
movzbl %al,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ieee80211_is_back>:
push   %rbp
push   %rbx
push   %rax
mov    %edi,%ebx
mov    $0xfc,%edi
call   1030 <cpu_to_le16@plt>
mov    %eax,%ebp
and    %ebx,%ebp
mov    $0x94,%edi
call   1030 <cpu_to_le16@plt>
xor    %ecx,%ecx
cmp    %eax,%ebp
sete   %cl
mov    %ecx,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
define i32 @ieee80211_is_back(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = call i32 @cpu_to_le16(i32 252)
%5 = and i32 %3, %4
%6 = call i32 @cpu_to_le16(i32 148)
%7 = icmp eq i32 %5, %6
%8 = zext i1 %7 to i32
ret i32 %8
}

LLVM IR (-O2):
define i32 @ieee80211_is_back(i32 %0) {
%2 = tail call i32 @cpu_to_le16(i32 252)
%3 = and i32 %2, %0
%4 = tail call i32 @cpu_to_le16(i32 148)
%5 = icmp eq i32 %3, %4
%6 = zext i1 %5 to i32
ret i32 %6
}
int lstrcpyA(LPSTR, LPCSTR) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @lstrcpyA(i32 %0, i32 %1) {
ret i32 0
}
int exynos_drm_fbdev_init(struct drm_device *dev) { return 0; }


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

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

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

LLVM IR (-O2):
%struct.drm_device = type opaque
define i32 @exynos_drm_fbdev_init(%struct.drm_device* nocapture readnone %0) {
ret i32 0
}
/* Forward declarations */
typedef struct TYPE_4__ TYPE_1__;

/* Type definitions */
struct TYPE_4__ {
  struct TYPE_4__ *fts_link;
};
typedef TYPE_1__ FTSENT;

/* Variables and functions */
int /*<<< orphan*/ free(TYPE_1__ *);
void fts_lfree(FTSENT *head) {
  FTSENT *p;
  while ((p = head)) {
    head = head->fts_link;
    free(p);
  }
}


x86 assembly (clang, -O0):
<fts_lfree>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
cmp    $0x0,%rax
je     1147 <fts_lfree+0x37>
mov    -0x8(%rbp),%rax
mov    (%rax),%rax
mov    %rax,-0x8(%rbp)
mov    -0x10(%rbp),%rdi
call   1030 <free@plt>
jmp    111c <fts_lfree+0xc>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fts_lfree>:
push   %rbx
test   %rdi,%rdi
je     1130 <fts_lfree+0x20>
cs nopw 0x0(%rax,%rax,1)
mov    (%rdi),%rbx
call   1030 <free@plt>
mov    %rbx,%rdi
test   %rbx,%rbx
jne    1120 <fts_lfree+0x10>
pop    %rbx
ret

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

LLVM IR (-O2):
%struct.TYPE_4__ = type { %struct.TYPE_4__* }
define void @fts_lfree(%struct.TYPE_4__* %0) {
%2 = icmp eq %struct.TYPE_4__* %0, null
br i1 %2, label %9, label %3
3: ; preds = %1, %3
%4 = phi %struct.TYPE_4__* [ %6, %3 ], [ %0, %1 ]
%5 = getelementptr inbounds %struct.TYPE_4__, %struct.TYPE_4__* %4, i64 0, i32 0
%6 = load %struct.TYPE_4__*, %struct.TYPE_4__** %5
%7 = tail call i32 @free(%struct.TYPE_4__* %4)
%8 = icmp eq %struct.TYPE_4__* %6, null
br i1 %8, label %9, label %3
9: ; preds = %3, %1
ret void
}
const char *ajTextinTypeGetQlinks(void) { return "|"; }


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

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

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

LLVM IR (-O2):
@.str = [2 x i8] c"|\00"
define i8* @ajTextinTypeGetQlinks() {
ret i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0)
}
/* Type definitions */
struct gdIOCtx {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ efree(struct gdIOCtx *);
void _php_image_output_ctxfree(struct gdIOCtx *ctx) {
  if (ctx) {
    efree(ctx);
  }
}


x86 assembly (clang, -O0):
<_php_image_output_ctxfree>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
cmpq   $0x0,-0x8(%rbp)
je     1130 <_php_image_output_ctxfree+0x20>
mov    -0x8(%rbp),%rdi
call   1030 <efree@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<_php_image_output_ctxfree>:
test   %rdi,%rdi
je     111a <_php_image_output_ctxfree+0xa>
jmp    1030 <efree@plt>
ret

LLVM IR (-O0):
%struct.gdIOCtx = type { i32 }
define void @_php_image_output_ctxfree(%struct.gdIOCtx* %0) {
%2 = alloca %struct.gdIOCtx*
store %struct.gdIOCtx* %0, %struct.gdIOCtx** %2
%3 = load %struct.gdIOCtx*, %struct.gdIOCtx** %2
%4 = icmp ne %struct.gdIOCtx* %3, null
br i1 %4, label %5, label %8
5: ; preds = %1
%6 = load %struct.gdIOCtx*, %struct.gdIOCtx** %2
%7 = call i32 @efree(%struct.gdIOCtx* %6)
br label %8
8: ; preds = %5, %1
ret void
}

LLVM IR (-O2):
%struct.gdIOCtx = type { i32 }
define void @_php_image_output_ctxfree(%struct.gdIOCtx* %0) {
%2 = icmp eq %struct.gdIOCtx* %0, null
br i1 %2, label %5, label %3
3: ; preds = %1
%4 = tail call i32 @efree(%struct.gdIOCtx* %0)
br label %5
5: ; preds = %3, %1
ret void
}
unsigned int mem_hash(void **ptr) {
  unsigned long lp = (unsigned long)ptr;
  return (lp % 509);
}


x86 assembly (clang, -O0):
<mem_hash>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    $0x1fd,%ecx
xor    %edx,%edx
div    %rcx
mov    %edx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<mem_hash>:
movabs $0x10182436517a3753,%rcx
24 18 10
mov    %rdi,%rax
mul    %rcx
shr    $0x5,%rdx
imul   $0x1fd,%edx,%eax
sub    %eax,%edi
mov    %edi,%eax
ret

LLVM IR (-O0):
define i32 @mem_hash(i8** %0) {
%2 = alloca i8**
%3 = alloca i64
store i8** %0, i8*** %2
%4 = load i8**, i8*** %2
%5 = ptrtoint i8** %4 to i64
store i64 %5, i64* %3
%6 = load i64, i64* %3
%7 = urem i64 %6, 509
%8 = trunc i64 %7 to i32
ret i32 %8
}

LLVM IR (-O2):
define i32 @mem_hash(i8** %0) {
%2 = ptrtoint i8** %0 to i64
%3 = urem i64 %2, 509
%4 = trunc i64 %3 to i32
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ TransformCounterC__0__CounterFrom__overflow();
void Atm128CounterC__0__Counter__overflow(void) {
  TransformCounterC__0__CounterFrom__overflow();
}


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

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

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

LLVM IR (-O2):
define void @Atm128CounterC__0__Counter__overflow() {
%1 = tail call i32 (...) @TransformCounterC__0__CounterFrom__overflow()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ errx(int, char *);
void *realloc(void *, size_t);
void *xrealloc(void *p, size_t n) {
  p = realloc(p, n);
  if (p == NULL)
    errx(1, "Could not allocate memory");
  return p;
}


x86 assembly (clang, -O0):
<xrealloc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1040 <realloc@plt>
mov    %rax,-0x8(%rbp)
cmpq   $0x0,-0x8(%rbp)
jne    115d <xrealloc+0x3d>
mov    $0x1,%edi
lea    0xea8(%rip),%rsi
call   1030 <errx@plt>
mov    -0x8(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<xrealloc>:
push   %rbx
call   1040 <realloc@plt>
mov    %rax,%rbx
test   %rax,%rax
jne    113f <xrealloc+0x1f>
lea    0xecb(%rip),%rsi
mov    $0x1,%edi
call   1030 <errx@plt>
mov    %rbx,%rax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [26 x i8] c"Could not allocate memory\00"
define i8* @xrealloc(i8* %0, i64 %1) {
%3 = alloca i8*
%4 = alloca i64
store i8* %0, i8** %3
store i64 %1, i64* %4
%5 = load i8*, i8** %3
%6 = load i64, i64* %4
%7 = call i8* @realloc(i8* %5, i64 %6)
store i8* %7, i8** %3
%8 = load i8*, i8** %3
%9 = icmp eq i8* %8, null
br i1 %9, label %10, label %12
10: ; preds = %2
%11 = call i32 @errx(i32 1, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str, i64 0, i64 0))
br label %12
12: ; preds = %10, %2
%13 = load i8*, i8** %3
ret i8* %13
}

LLVM IR (-O2):
@.str = [26 x i8] c"Could not allocate memory\00"
define noalias i8* @xrealloc(i8* nocapture %0, i64 %1) {
%3 = tail call i8* @realloc(i8* %0, i64 %1)
%4 = icmp eq i8* %3, null
br i1 %4, label %5, label %7
5: ; preds = %2
%6 = tail call i32 @errx(i32 1, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str, i64 0, i64 0))
br label %7
7: ; preds = %5, %2
ret i8* %3
}
char hex(char i) {
  ;
  if (i >= 0 && i < 10) {
    return '0' + i;
  }
  if (i >= 10 && i < 16) {
    return 'a' + i - 10;
  }
  return '?';
}


x86 assembly (clang, -O0):
<hex>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x2(%rbp)
movsbl -0x2(%rbp),%eax
cmp    $0x0,%eax
jl     1133 <hex+0x33>
movsbl -0x2(%rbp),%eax
cmp    $0xa,%eax
jge    1133 <hex+0x33>
movsbl -0x2(%rbp),%eax
add    $0x30,%eax
mov    %al,-0x1(%rbp)
jmp    1163 <hex+0x63>
movsbl -0x2(%rbp),%eax
cmp    $0xa,%eax
jl     115f <hex+0x5f>
movsbl -0x2(%rbp),%eax
cmp    $0x10,%eax
jge    115f <hex+0x5f>
movsbl -0x2(%rbp),%eax
add    $0x61,%eax
sub    $0xa,%eax
mov    %al,-0x1(%rbp)
jmp    1163 <hex+0x63>
movb   $0x3f,-0x1(%rbp)
movsbl -0x1(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<hex>:
mov    %edi,%eax
cmp    $0x9,%al
ja     1109 <hex+0x9>
add    $0x30,%al
ret
lea    -0xa(%rax),%ecx
add    $0x57,%al
cmp    $0x6,%cl
movzbl %al,%ecx
mov    $0x3f,%eax
cmovb  %ecx,%eax
ret

LLVM IR (-O0):
define signext i8 @hex(i8 signext %0) {
%2 = alloca i8
%3 = alloca i8
store i8 %0, i8* %3
%4 = load i8, i8* %3
%5 = sext i8 %4 to i32
%6 = icmp sge i32 %5, 0
br i1 %6, label %7, label %16
7: ; preds = %1
%8 = load i8, i8* %3
%9 = sext i8 %8 to i32
%10 = icmp slt i32 %9, 10
br i1 %10, label %11, label %16
11: ; preds = %7
%12 = load i8, i8* %3
%13 = sext i8 %12 to i32
%14 = add nsw i32 48, %13
%15 = trunc i32 %14 to i8
store i8 %15, i8* %2
br label %31
16: ; preds = %7, %1
%17 = load i8, i8* %3
%18 = sext i8 %17 to i32
%19 = icmp sge i32 %18, 10
br i1 %19, label %20, label %30
20: ; preds = %16
%21 = load i8, i8* %3
%22 = sext i8 %21 to i32
%23 = icmp slt i32 %22, 16
br i1 %23, label %24, label %30
24: ; preds = %20
%25 = load i8, i8* %3
%26 = sext i8 %25 to i32
%27 = add nsw i32 97, %26
%28 = sub nsw i32 %27, 10
%29 = trunc i32 %28 to i8
store i8 %29, i8* %2
br label %31
30: ; preds = %20, %16
store i8 63, i8* %2
br label %31
31: ; preds = %30, %24, %11
%32 = load i8, i8* %2
ret i8 %32
}

LLVM IR (-O2):
define signext i8 @hex(i8 signext %0) {
%2 = icmp ult i8 %0, 10
br i1 %2, label %3, label %5
3: ; preds = %1
%4 = add nuw nsw i8 %0, 48
br label %10
5: ; preds = %1
%6 = add i8 %0, -10
%7 = icmp ult i8 %6, 6
%8 = add i8 %0, 87
%9 = select i1 %7, i8 %8, i8 63
br label %10
10: ; preds = %5, %3
%11 = phi i8 [ %4, %3 ], [ %9, %5 ]
ret i8 %11
}
float fahr2cel(float fahr) { return ((5.0 / 9.0) * (fahr - 32.0)); }


x86 assembly (clang, -O0):
<fahr2cel>:
push   %rbp
mov    %rsp,%rbp
movss  %xmm0,-0x4(%rbp)
movss  -0x4(%rbp),%xmm0
cvtss2sd %xmm0,%xmm1
movsd  0xeee(%rip),%xmm0
subsd  %xmm0,%xmm1
movsd  0xeda(%rip),%xmm0
mulsd  %xmm1,%xmm0
cvtsd2ss %xmm0,%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<fahr2cel>:
cvtss2sd %xmm0,%xmm0
addsd  0xef4(%rip),%xmm0
mulsd  0xef4(%rip),%xmm0
cvtsd2ss %xmm0,%xmm0
ret

LLVM IR (-O0):
define float @fahr2cel(float %0) {
%2 = alloca float
store float %0, float* %2
%3 = load float, float* %2
%4 = fpext float %3 to double
%5 = fsub double %4, 3.200000e+01
%6 = fmul double 0x3FE1C71C71C71C72, %5
%7 = fptrunc double %6 to float
ret float %7
}

LLVM IR (-O2):
define float @fahr2cel(float %0) {
%2 = fpext float %0 to double
%3 = fadd double %2, -3.200000e+01
%4 = fmul double %3, 0x3FE1C71C71C71C72
%5 = fptrunc double %4 to float
ret float %5
}
/* Variables and functions */
int /*<<< orphan*/ abort_gzip();
void write_error(void) {
  {
    abort_gzip();
    return;
  }
}


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

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

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

LLVM IR (-O2):
define void @write_error() {
%1 = tail call i32 (...) @abort_gzip()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
void printf_int(char *fmt, int arg) { printf(fmt, arg); }


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

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

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

LLVM IR (-O2):
define void @printf_int(i8* %0, i32 %1) {
%3 = tail call i32 @printf(i8* %0, i32 %1)
ret void
}
_Bool is_V_L_D_M(char c) {
  switch (c) {
  case 'V':
    return 1;
  case 'L':
    return 1;
  case 'D':
    return 1;
  case 'M':
    return 1;
  default:
    return 0;
  }
}


x86 assembly (clang, -O0):
<is_V_L_D_M>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x2(%rbp)
movsbl -0x2(%rbp),%eax
add    $0xffffffbc,%eax
mov    %eax,%ecx
mov    %rcx,-0x10(%rbp)
sub    $0x12,%eax
ja     1158 <is_V_L_D_M+0x58>
mov    -0x10(%rbp),%rax
lea    0xed5(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
movb   $0x1,-0x1(%rbp)
jmp    115c <is_V_L_D_M+0x5c>
movb   $0x1,-0x1(%rbp)
jmp    115c <is_V_L_D_M+0x5c>
movb   $0x1,-0x1(%rbp)
jmp    115c <is_V_L_D_M+0x5c>
movb   $0x1,-0x1(%rbp)
jmp    115c <is_V_L_D_M+0x5c>
movb   $0x0,-0x1(%rbp)
mov    -0x1(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<is_V_L_D_M>:
add    $0xffffffbc,%edi
cmp    $0x13,%edi
setb   %cl
mov    $0x40301,%eax
bt     %edi,%eax
setb   %al
and    %cl,%al
ret

LLVM IR (-O0):
define zeroext i1 @is_V_L_D_M(i8 signext %0) {
%2 = alloca i1
%3 = alloca i8
store i8 %0, i8* %3
%4 = load i8, i8* %3
%5 = sext i8 %4 to i32
switch i32 %5, label %10 [
i32 86, label %6
i32 76, label %7
i32 68, label %8
i32 77, label %9
]
6: ; preds = %1
store i1 true, i1* %2
br label %11
7: ; preds = %1
store i1 true, i1* %2
br label %11
8: ; preds = %1
store i1 true, i1* %2
br label %11
9: ; preds = %1
store i1 true, i1* %2
br label %11
10: ; preds = %1
store i1 false, i1* %2
br label %11
11: ; preds = %10, %9, %8, %7, %6
%12 = load i1, i1* %2
ret i1 %12
}

LLVM IR (-O2):
define zeroext i1 @is_V_L_D_M(i8 signext %0) {
%2 = sext i8 %0 to i32
%3 = add nsw i32 %2, -68
%4 = icmp ult i32 %3, 19
%5 = trunc i32 %3 to i19
%6 = lshr i19 -261375, %5
%7 = and i19 %6, 1
%8 = icmp ne i19 %7, 0
%9 = select i1 %4, i1 %8, i1 false
ret i1 %9
}
int test_imm_B9int64_midword_reg(long long val) {
  return ((val >> 16) & (0xB9 << 0)) ? -20 : -40;
}


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

x86 assembly (clang, -O2):
<test_imm_B9int64_midword_reg>:
test   $0xb90000,%edi
mov    $0xffffffd8,%ecx
mov    $0xffffffec,%eax
cmove  %ecx,%eax
ret

LLVM IR (-O0):
define i32 @test_imm_B9int64_midword_reg(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = load i64, i64* %2
%4 = ashr i64 %3, 16
%5 = and i64 %4, 185
%6 = icmp ne i64 %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_B9int64_midword_reg(i64 %0) {
%2 = and i64 %0, 12124160
%3 = icmp eq i64 %2, 0
%4 = select i1 %3, i32 -40, i32 -20
ret i32 %4
}
/* Type definitions */
struct timespec {
  int /*<<< orphan*/ tv_nsec;
};

/* Variables and functions */
int /*<<< orphan*/ CLOCK_MONOTONIC;
scalar_t__ clock_gettime(int /*<<< orphan*/, struct timespec *);
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ perror(char *);
int /*<<< orphan*/ srandom(int /*<<< orphan*/);
void randomize(void) {
  struct timespec tv;
  if (clock_gettime(CLOCK_MONOTONIC, &tv)) {
    perror("autoupdater: error: clock_gettime");
    exit(1);
  }
  srandom(tv.tv_nsec);
}


x86 assembly (clang, -O0):
<randomize>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    0x2e99(%rip),%rax
mov    (%rax),%edi
lea    -0x8(%rbp),%rsi
call   1040 <clock_gettime@plt>
cmp    $0x0,%rax
je     117a <randomize+0x3a>
lea    0xe95(%rip),%rdi
call   1050 <perror@plt>
mov    $0x1,%edi
call   1060 <exit@plt>
mov    -0x8(%rbp),%edi
call   1030 <srandom@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<randomize>:
push   %rax
mov    0x2ea0(%rip),%rax
mov    (%rax),%edi
mov    %rsp,%rsi
call   1040 <clock_gettime@plt>
test   %rax,%rax
jne    1161 <randomize+0x21>
mov    (%rsp),%edi
call   1030 <srandom@plt>
pop    %rax
ret
lea    0xe98(%rip),%rdi
call   1050 <perror@plt>
mov    $0x1,%edi
call   1060 <exit@plt>

LLVM IR (-O0):
%struct.timespec = type { i32 }
@CLOCK_MONOTONIC = global i32 0
@.str = [34 x i8] c"autoupdater: error: clock_gettime\00"
define void @randomize() {
%1 = alloca %struct.timespec
%2 = load i32, i32* @CLOCK_MONOTONIC
%3 = call i64 @clock_gettime(i32 %2, %struct.timespec* %1)
%4 = icmp ne i64 %3, 0
br i1 %4, label %5, label %8
5: ; preds = %0
%6 = call i32 @perror(i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str, i64 0, i64 0))
%7 = call i32 @exit(i32 1)
unreachable
8: ; preds = %0
%9 = getelementptr inbounds %struct.timespec, %struct.timespec* %1, i32 0, i32 0
%10 = load i32, i32* %9
%11 = call i32 @srandom(i32 %10)
ret void
}

LLVM IR (-O2):
%struct.timespec = type { i32 }
@CLOCK_MONOTONIC = global i32 0
@.str = [34 x i8] c"autoupdater: error: clock_gettime\00"
define void @randomize() {
%1 = alloca %struct.timespec
%2 = bitcast %struct.timespec* %1 to i8*
%3 = load i32, i32* @CLOCK_MONOTONIC
%4 = call i64 @clock_gettime(i32 %3, %struct.timespec* %1)
%5 = icmp eq i64 %4, 0
br i1 %5, label %9, label %6
6: ; preds = %0
%7 = call i32 @perror(i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str, i64 0, i64 0))
%8 = call i32 @exit(i32 1)
unreachable
9: ; preds = %0
%10 = getelementptr inbounds %struct.timespec, %struct.timespec* %1, i64 0, i32 0
%11 = load i32, i32* %10
%12 = call i32 @srandom(i32 %11)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, double);
void printVec(double *a, int n) {
  int i;
  for (i = 0; i < n; i++) {
    printf("[ %.8f ]\n", a[i]);
  }
}


x86 assembly (clang, -O0):
<printVec>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
movl   $0x0,-0x10(%rbp)
mov    -0x10(%rbp),%eax
cmp    -0xc(%rbp),%eax
jge    1159 <printVec+0x49>
mov    -0x8(%rbp),%rax
movslq -0x10(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
lea    0xeba(%rip),%rdi
call   1030 <printf@plt>
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    1126 <printVec+0x16>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<printVec>:
push   %r15
push   %r14
push   %r12
push   %rbx
push   %rax
test   %esi,%esi
jle    1147 <printVec+0x37>
mov    %rdi,%r15
mov    %esi,%r12d
xor    %ebx,%ebx
lea    0xed5(%rip),%r14
nopl   0x0(%rax,%rax,1)
movsd  (%r15,%rbx,8),%xmm0
mov    %r14,%rdi
call   1030 <printf@plt>
add    $0x1,%rbx
cmp    %rbx,%r12
jne    1130 <printVec+0x20>
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
ret

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

LLVM IR (-O2):
@.str = [10 x i8] c"[ %.8f ]\0A\00"
define void @printVec(double* nocapture %0, i32 %1) {
%3 = icmp sgt i32 %1, 0
br i1 %3, label %4, label %13
4: ; preds = %2
%5 = zext i32 %1 to i64
br label %6
6: ; preds = %4, %6
%7 = phi i64 [ 0, %4 ], [ %11, %6 ]
%8 = getelementptr inbounds double, double* %0, i64 %7
%9 = load double, double* %8
%10 = tail call i32 @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), double %9)
%11 = add nuw nsw i64 %7, 1
%12 = icmp eq i64 %11, %5
br i1 %12, label %13, label %6
13: ; preds = %6, %2
ret void
}
/* Variables and functions */
int EXIT_SUCCESS;
int /*<<< orphan*/ system(char *);
int main() {
  int i = 0;
  while (i != 6) {
    system("zenity --question --text \"¿es usted tonto?\" &");
    i++;
  }
  return EXIT_SUCCESS;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
cmpl   $0x6,-0x8(%rbp)
je     114a <main+0x3a>
lea    0xec9(%rip),%rdi
call   1030 <system@plt>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1126 <main+0x16>
mov    0x2e8f(%rip),%rax
mov    (%rax),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
lea    0xee8(%rip),%rbx
mov    %rbx,%rdi
call   1030 <system@plt>
mov    %rbx,%rdi
call   1030 <system@plt>
mov    %rbx,%rdi
call   1030 <system@plt>
mov    %rbx,%rdi
call   1030 <system@plt>
mov    %rbx,%rdi
call   1030 <system@plt>
mov    %rbx,%rdi
call   1030 <system@plt>
mov    0x2e91(%rip),%rax
mov    (%rax),%eax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [47 x i8] c"zenity --question --text \22\C2\BFes usted tonto?\22 &\00"
@EXIT_SUCCESS = global i32 0
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
store i32 0, i32* %1
store i32 0, i32* %2
br label %3
3: ; preds = %6, %0
%4 = load i32, i32* %2
%5 = icmp ne i32 %4, 6
br i1 %5, label %6, label %10
6: ; preds = %3
%7 = call i32 @system(i8* getelementptr inbounds ([47 x i8], [47 x i8]* @.str, i64 0, i64 0))
%8 = load i32, i32* %2
%9 = add nsw i32 %8, 1
store i32 %9, i32* %2
br label %3
10: ; preds = %3
%11 = load i32, i32* @EXIT_SUCCESS
ret i32 %11
}

LLVM IR (-O2):
@.str = [47 x i8] c"zenity --question --text \22\C2\BFes usted tonto?\22 &\00"
@EXIT_SUCCESS = global i32 0
define i32 @main() {
%1 = tail call i32 @system(i8* getelementptr inbounds ([47 x i8], [47 x i8]* @.str, i64 0, i64 0))
%2 = tail call i32 @system(i8* getelementptr inbounds ([47 x i8], [47 x i8]* @.str, i64 0, i64 0))
%3 = tail call i32 @system(i8* getelementptr inbounds ([47 x i8], [47 x i8]* @.str, i64 0, i64 0))
%4 = tail call i32 @system(i8* getelementptr inbounds ([47 x i8], [47 x i8]* @.str, i64 0, i64 0))
%5 = tail call i32 @system(i8* getelementptr inbounds ([47 x i8], [47 x i8]* @.str, i64 0, i64 0))
%6 = tail call i32 @system(i8* getelementptr inbounds ([47 x i8], [47 x i8]* @.str, i64 0, i64 0))
%7 = load i32, i32* @EXIT_SUCCESS
ret i32 %7
}
/* Variables and functions */
int EOF;
int /*<<< orphan*/ printf(char *, int);
int main(void) {
  printf("EOF value : %d\n", EOF);
  return 0;
}


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

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

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

LLVM IR (-O2):
@.str = [16 x i8] c"EOF value : %d\0A\00"
@EOF = global i32 0
define i32 @main() {
%1 = load i32, i32* @EOF
%2 = tail call i32 @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0), i32 %1)
ret i32 0
}
int fun674() { return 674; }


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

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

LLVM IR (-O0):
define i32 @fun674() {
ret i32 674
}

LLVM IR (-O2):
define i32 @fun674() {
ret i32 674
}
int total_peach(int day) {
  if (10 == day)
    return 1;
  else
    return (total_peach(day + 1) + 1) * 2;
}


x86 assembly (clang, -O0):
<total_peach>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
mov    $0xa,%eax
cmp    -0x8(%rbp),%eax
jne    1135 <total_peach+0x25>
movl   $0x1,-0x4(%rbp)
jmp    1149 <total_peach+0x39>
mov    -0x8(%rbp),%edi
add    $0x1,%edi
call   1030 <total_peach@plt>
add    $0x1,%eax
shl    $0x1,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<total_peach>:
mov    $0x1,%eax
cmp    $0xa,%edi
je     112c <total_peach+0x1c>
push   %rax
add    $0x1,%edi
call   1030 <total_peach@plt>
add    %eax,%eax
add    $0x2,%eax
add    $0x8,%rsp
ret

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

LLVM IR (-O2):
define i32 @total_peach(i32 %0) {
%2 = icmp eq i32 %0, 10
br i1 %2, label %3, label %5
3: ; preds = %1, %5
%4 = phi i32 [ %9, %5 ], [ 1, %1 ]
ret i32 %4
5: ; preds = %1
%6 = add nsw i32 %0, 1
%7 = tail call i32 @total_peach(i32 %6)
%8 = shl i32 %7, 1
%9 = add i32 %8, 2
br label %3
}
void kernel_so_lputs(const char *s) {}


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

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

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

LLVM IR (-O2):
define void @kernel_so_lputs(i8* nocapture %0) {
ret void
}
/* Variables and functions */
int MAXPATHLEN;
int NOFILE;
int /*<<< orphan*/ printf(char *, int);
int main() {
  printf("max path length: %d\n", MAXPATHLEN);
  printf("max open file: %d\n", NOFILE);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
mov    0x2ecd(%rip),%rax
mov    (%rax),%esi
lea    0xedc(%rip),%rdi
call   1030 <printf@plt>
mov    0x2ea0(%rip),%rax
mov    (%rax),%esi
lea    0xedc(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
@.str = [21 x i8] c"max path length: %d\0A\00"
@MAXPATHLEN = global i32 0
@.str.1 = [19 x i8] c"max open file: %d\0A\00"
@NOFILE = global i32 0
define i32 @main() {
%1 = load i32, i32* @MAXPATHLEN
%2 = call i32 @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str, i64 0, i64 0), i32 %1)
%3 = load i32, i32* @NOFILE
%4 = call i32 @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.1, i64 0, i64 0), i32 %3)
ret i32 0
}

LLVM IR (-O2):
@.str = [21 x i8] c"max path length: %d\0A\00"
@MAXPATHLEN = global i32 0
@.str.1 = [19 x i8] c"max open file: %d\0A\00"
@NOFILE = global i32 0
define i32 @main() {
%1 = load i32, i32* @MAXPATHLEN
%2 = tail call i32 @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str, i64 0, i64 0), i32 %1)
%3 = load i32, i32* @NOFILE
%4 = tail call i32 @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.1, i64 0, i64 0), i32 %3)
ret i32 0
}
/* Variables and functions */
float acos(double);
float pi() { return acos(-1.0); }


x86 assembly (clang, -O0):
<pi>:
push   %rbp
mov    %rsp,%rbp
movsd  0xee4(%rip),%xmm0
call   1030 <acos@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<pi>:
movsd  0xee8(%rip),%xmm0
jmp    1030 <acos@plt>

LLVM IR (-O0):
define float @pi() {
%1 = call float @acos(double -1.000000e+00)
ret float %1
}

LLVM IR (-O2):
define float @pi() {
%1 = tail call float @acos(double -1.000000e+00)
ret float %1
}
void dsi_uninit_platform_driver(void) {}


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

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

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

LLVM IR (-O2):
define void @dsi_uninit_platform_driver() {
ret void
}
/* Variables and functions */
double rand();
int main(int argc, char **argv) {
  double x = rand();
  double y = rand();
  return (int)(x * y) + (x / y) + (x - y);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    $0x0,%al
call   1030 <rand@plt>
movsd  %xmm0,-0x18(%rbp)
mov    $0x0,%al
call   1030 <rand@plt>
movsd  %xmm0,-0x20(%rbp)
movsd  -0x18(%rbp),%xmm0
mulsd  -0x20(%rbp),%xmm0
cvttsd2si %xmm0,%eax
cvtsi2sd %eax,%xmm0
movsd  -0x18(%rbp),%xmm1
divsd  -0x20(%rbp),%xmm1
addsd  %xmm1,%xmm0
movsd  -0x18(%rbp),%xmm1
subsd  -0x20(%rbp),%xmm1
addsd  %xmm1,%xmm0
cvttsd2si %xmm0,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1030 <rand@plt>
movsd  %xmm0,(%rsp)
xor    %eax,%eax
call   1030 <rand@plt>
movsd  (%rsp),%xmm3
movapd %xmm3,%xmm1
mulsd  %xmm0,%xmm1
cvttpd2dq %xmm1,%xmm1
cvtdq2pd %xmm1,%xmm1
movapd %xmm3,%xmm2
divsd  %xmm0,%xmm2
addsd  %xmm1,%xmm2
subsd  %xmm0,%xmm3
addsd  %xmm2,%xmm3
cvttsd2si %xmm3,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca double
%7 = alloca double
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%8 = call double (...) @rand()
store double %8, double* %6
%9 = call double (...) @rand()
store double %9, double* %7
%10 = load double, double* %6
%11 = load double, double* %7
%12 = fmul double %10, %11
%13 = fptosi double %12 to i32
%14 = sitofp i32 %13 to double
%15 = load double, double* %6
%16 = load double, double* %7
%17 = fdiv double %15, %16
%18 = fadd double %14, %17
%19 = load double, double* %6
%20 = load double, double* %7
%21 = fsub double %19, %20
%22 = fadd double %18, %21
%23 = fptosi double %22 to i32
ret i32 %23
}

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call double (...) @rand()
%4 = tail call double (...) @rand()
%5 = fmul double %3, %4
%6 = fptosi double %5 to i32
%7 = sitofp i32 %6 to double
%8 = fdiv double %3, %4
%9 = fadd double %8, %7
%10 = fsub double %3, %4
%11 = fadd double %10, %9
%12 = fptosi double %11 to i32
ret i32 %12
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int socket(int domain, int type, int protocol) {
  printf("Yeah.\n");
  return 0;
}


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

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

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

LLVM IR (-O2):
@str = [6 x i8] c"Yeah.\00"
define i32 @socket(i32 %0, i32 %1, i32 %2) {
%4 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([6 x i8], [6 x i8]* @str, i64 0, i64 0))
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ ExtSelect(char *, char *, int /*<<< orphan*/);
void ExttConfigurationSelect(void) {
  ExtSelect("tConfiguration",
            "tConfiguration.uConfiguration,tConfiguration.cLabel,"
            "tConfiguration.cValue,tConfiguration.cComment,tConfiguration."
            "uOwner,tConfiguration.uCreatedBy,tConfiguration.uCreatedDate,"
            "tConfiguration.uModBy,tConfiguration.uModDate",
            0);
}


x86 assembly (clang, -O0):
<ExttConfigurationSelect>:
push   %rbp
mov    %rsp,%rbp
lea    0xee5(%rip),%rdi
lea    0xeed(%rip),%rsi
xor    %edx,%edx
call   1030 <ExtSelect@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<ExttConfigurationSelect>:
lea    0xee9(%rip),%rdi
lea    0xef1(%rip),%rsi
xor    %edx,%edx
jmp    1030 <ExtSelect@plt>

LLVM IR (-O0):
@.str = [15 x i8] c"tConfiguration\00"
@.str.1 = [220 x i8] c"tConfiguration.uConfiguration,tConfiguration.cLabel,tConfiguration.cValue,tConfiguration.cComment,tConfiguration.uOwner,tConfiguration.uCreatedBy,tConfiguration.uCreatedDate,tConfiguration.uModBy,tConfiguration.uModDate\00"
define void @ExttConfigurationSelect() {
%1 = call i32 @ExtSelect(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([220 x i8], [220 x i8]* @.str.1, i64 0, i64 0), i32 0)
ret void
}

LLVM IR (-O2):
@.str = [15 x i8] c"tConfiguration\00"
@.str.1 = [220 x i8] c"tConfiguration.uConfiguration,tConfiguration.cLabel,tConfiguration.cValue,tConfiguration.cComment,tConfiguration.uOwner,tConfiguration.uCreatedBy,tConfiguration.uCreatedDate,tConfiguration.uModBy,tConfiguration.uModDate\00"
define void @ExttConfigurationSelect() {
%1 = tail call i32 @ExtSelect(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([220 x i8], [220 x i8]* @.str.1, i64 0, i64 0), i32 0)
ret void
}
void cygwin_premain3(int argc __attribute__((unused)),
                     char **argv __attribute__((unused))) {}


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

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

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

LLVM IR (-O2):
define void @cygwin_premain3(i32 %0, i8** nocapture %1) {
ret void
}
int test_imm_F5uint8_reg(unsigned char val) {
  return ((val) & (-0xF5 << 0)) ? -20 : -40;
}


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

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

LLVM IR (-O0):
define i32 @test_imm_F5uint8_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, -245
%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_F5uint8_reg(i8 zeroext %0) {
%2 = and i8 %0, 11
%3 = icmp eq i8 %2, 0
%4 = select i1 %3, i32 -40, i32 -20
ret i32 %4
}
/* Variables and functions */
int os_unsetenv(const char *name) { return -1; }


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

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

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

LLVM IR (-O2):
define i32 @os_unsetenv(i8* nocapture readnone %0) {
ret i32 -1
}
/* Variables and functions */
int translate_rec(int /*<<< orphan*/ *, char const *, char const *, char *,
                  int);
int translate_alias(const char *command, const char *args, char *out_cmd,
                    int max_len) {
  return translate_rec(NULL, command, args, out_cmd, max_len);
}


x86 assembly (clang, -O0):
<translate_alias>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %ecx,-0x1c(%rbp)
mov    -0x8(%rbp),%rsi
mov    -0x10(%rbp),%rdx
mov    -0x18(%rbp),%rcx
mov    -0x1c(%rbp),%r8d
xor    %eax,%eax
mov    %eax,%edi
call   1030 <translate_rec@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<translate_alias>:
mov    %ecx,%r8d
mov    %rdx,%rcx
mov    %rsi,%rdx
mov    %rdi,%rsi
xor    %edi,%edi
jmp    1030 <translate_rec@plt>

LLVM IR (-O0):
define i32 @translate_alias(i8* %0, i8* %1, i8* %2, i32 %3) {
%5 = alloca i8*
%6 = alloca i8*
%7 = alloca i8*
%8 = alloca i32
store i8* %0, i8** %5
store i8* %1, i8** %6
store i8* %2, i8** %7
store i32 %3, i32* %8
%9 = load i8*, i8** %5
%10 = load i8*, i8** %6
%11 = load i8*, i8** %7
%12 = load i32, i32* %8
%13 = call i32 @translate_rec(i32* null, i8* %9, i8* %10, i8* %11, i32 %12)
ret i32 %13
}

LLVM IR (-O2):
define i32 @translate_alias(i8* %0, i8* %1, i8* %2, i32 %3) {
%5 = tail call i32 @translate_rec(i32* null, i8* %0, i8* %1, i8* %2, i32 %3)
ret i32 %5
}
__attribute__((weak)) void SysTick_Handler(void) {
  while (1)
    ;
}


x86 assembly (clang, -O0):
<SysTick_Handler>:
push   %rbp
mov    %rsp,%rbp
jmp    1109 <SysTick_Handler+0x9>
jmp    1109 <SysTick_Handler+0x9>

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

LLVM IR (-O0):
define weak void @SysTick_Handler() {
br label %1
1: ; preds = %0, %1
br label %1
}

LLVM IR (-O2):
define weak void @SysTick_Handler() {
br label %1
1: ; preds = %0, %1
br label %1
}
int d6_to_d16(int x) { return x * (1 << 10); }


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

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

LLVM IR (-O0):
define i32 @d6_to_d16(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = mul nsw i32 %3, 1024
ret i32 %4
}

LLVM IR (-O2):
define i32 @d6_to_d16(i32 %0) {
%2 = shl nsw i32 %0, 10
ret i32 %2
}
double ho_recognize_font_1_five(const double *array_in) {
  double return_value = 0.0;
  return return_value;
}


x86 assembly (clang, -O0):
<ho_recognize_font_1_five>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x10(%rbp)
movsd  -0x10(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<ho_recognize_font_1_five>:
xorps  %xmm0,%xmm0
ret

LLVM IR (-O0):
define double @ho_recognize_font_1_five(double* %0) {
%2 = alloca double*
%3 = alloca double
store double* %0, double** %2
store double 0.000000e+00, double* %3
%4 = load double, double* %3
ret double %4
}

LLVM IR (-O2):
define double @ho_recognize_font_1_five(double* nocapture readnone %0) {
ret double 0.000000e+00
}