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

/* Variables and functions */
void encode_u16(uint8_t *p, uint16_t v) {
  p[1] = v & 0xff;
  v >>= 8;
  p[0] = v & 0xff;
}


x86 assembly (clang, -O0):
<encode_u16>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0xc(%rbp),%ecx
and    $0xff,%ecx
mov    -0x8(%rbp),%rax
mov    %ecx,0x4(%rax)
mov    -0xc(%rbp),%eax
sar    $0x8,%eax
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%ecx
and    $0xff,%ecx
mov    -0x8(%rbp),%rax
mov    %ecx,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<encode_u16>:
mov    %esi,%eax
movzbl %al,%ecx
mov    %ecx,0x4(%rdi)
movzbl %ah,%eax
mov    %eax,(%rdi)
ret

LLVM IR (-O0):
define void @encode_u16(i32* %0, i32 %1) {
%3 = alloca i32*
%4 = alloca i32
store i32* %0, i32** %3
store i32 %1, i32* %4
%5 = load i32, i32* %4
%6 = and i32 %5, 255
%7 = load i32*, i32** %3
%8 = getelementptr inbounds i32, i32* %7, i64 1
store i32 %6, i32* %8
%9 = load i32, i32* %4
%10 = ashr i32 %9, 8
store i32 %10, i32* %4
%11 = load i32, i32* %4
%12 = and i32 %11, 255
%13 = load i32*, i32** %3
%14 = getelementptr inbounds i32, i32* %13, i64 0
store i32 %12, i32* %14
ret void
}

LLVM IR (-O2):
define void @encode_u16(i32* nocapture writeonly %0, i32 %1) {
%3 = and i32 %1, 255
%4 = getelementptr inbounds i32, i32* %0, i64 1
store i32 %3, i32* %4
%5 = lshr i32 %1, 8
%6 = and i32 %5, 255
store i32 %6, i32* %0
ret void
}
/* Variables and functions */
int /*<<< orphan*/ ooa_loop();
void Escher_xtUML_run(void) { ooa_loop(); }


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

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

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

LLVM IR (-O2):
define void @Escher_xtUML_run() {
%1 = tail call i32 (...) @ooa_loop()
ret void
}
void ChgMark(PDMCSchema, V, M) struct frvStruct *PDMCSchema;
struct Vertex *V;
struct Mark *M;
{
  SubVertexList(PDMCSchema, V);
  AssignVertexMark(V, M);
  AddVertexList(PDMCSchema, V);
}


x86 assembly (clang, -O0):
<ChgMark>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    $0x0,%al
call   1050 <SubVertexList@plt>
mov    -0x10(%rbp),%rdi
mov    -0x18(%rbp),%rsi
mov    $0x0,%al
call   1030 <AssignVertexMark@plt>
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    $0x0,%al
call   1040 <AddVertexList@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ChgMark>:
push   %r15
push   %r14
push   %rbx
mov    %rdx,%r14
mov    %rsi,%rbx
mov    %rdi,%r15
xor    %eax,%eax
call   1050 <SubVertexList@plt>
mov    %rbx,%rdi
mov    %r14,%rsi
xor    %eax,%eax
call   1030 <AssignVertexMark@plt>
mov    %r15,%rdi
mov    %rbx,%rsi
xor    %eax,%eax
pop    %rbx
pop    %r14
pop    %r15
jmp    1040 <AddVertexList@plt>

LLVM IR (-O0):
%struct.frvStruct = type opaque
%struct.Vertex = type opaque
%struct.Mark = type opaque
define void @ChgMark(%struct.frvStruct* %0, %struct.Vertex* %1, %struct.Mark* %2) {
%4 = alloca %struct.frvStruct*
%5 = alloca %struct.Vertex*
%6 = alloca %struct.Mark*
store %struct.frvStruct* %0, %struct.frvStruct** %4
store %struct.Vertex* %1, %struct.Vertex** %5
store %struct.Mark* %2, %struct.Mark** %6
%7 = load %struct.frvStruct*, %struct.frvStruct** %4
%8 = load %struct.Vertex*, %struct.Vertex** %5
%9 = call i32 (%struct.frvStruct*, %struct.Vertex*, ...) bitcast (i32 (...)* @SubVertexList to i32 (%struct.frvStruct*, %struct.Vertex*, ...)*)(%struct.frvStruct* %7, %struct.Vertex* %8)
%10 = load %struct.Vertex*, %struct.Vertex** %5
%11 = load %struct.Mark*, %struct.Mark** %6
%12 = call i32 (%struct.Vertex*, %struct.Mark*, ...) bitcast (i32 (...)* @AssignVertexMark to i32 (%struct.Vertex*, %struct.Mark*, ...)*)(%struct.Vertex* %10, %struct.Mark* %11)
%13 = load %struct.frvStruct*, %struct.frvStruct** %4
%14 = load %struct.Vertex*, %struct.Vertex** %5
%15 = call i32 (%struct.frvStruct*, %struct.Vertex*, ...) bitcast (i32 (...)* @AddVertexList to i32 (%struct.frvStruct*, %struct.Vertex*, ...)*)(%struct.frvStruct* %13, %struct.Vertex* %14)
ret void
}

LLVM IR (-O2):
%struct.frvStruct = type opaque
%struct.Vertex = type opaque
%struct.Mark = type opaque
define void @ChgMark(%struct.frvStruct* %0, %struct.Vertex* %1, %struct.Mark* %2) {
%4 = tail call i32 (%struct.frvStruct*, %struct.Vertex*, ...) bitcast (i32 (...)* @SubVertexList to i32 (%struct.frvStruct*, %struct.Vertex*, ...)*)(%struct.frvStruct* %0, %struct.Vertex* %1)
%5 = tail call i32 (%struct.Vertex*, %struct.Mark*, ...) bitcast (i32 (...)* @AssignVertexMark to i32 (%struct.Vertex*, %struct.Mark*, ...)*)(%struct.Vertex* %1, %struct.Mark* %2)
%6 = tail call i32 (%struct.frvStruct*, %struct.Vertex*, ...) bitcast (i32 (...)* @AddVertexList to i32 (%struct.frvStruct*, %struct.Vertex*, ...)*)(%struct.frvStruct* %0, %struct.Vertex* %1)
ret void
}
__attribute__((pure)) int isControlCharOrSlash(const char c) {
  if ((unsigned char)c < '!')
    return !0;
  if (c == '/')
    return !0;
  return 0;
}


x86 assembly (clang, -O0):
<isControlCharOrSlash>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x5(%rbp)
movzbl -0x5(%rbp),%eax
cmp    $0x21,%eax
jge    1123 <isControlCharOrSlash+0x23>
movl   $0x1,-0x4(%rbp)
jmp    1143 <isControlCharOrSlash+0x43>
movsbl -0x5(%rbp),%eax
cmp    $0x2f,%eax
jne    113c <isControlCharOrSlash+0x3c>
movl   $0x1,-0x4(%rbp)
jmp    1143 <isControlCharOrSlash+0x43>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<isControlCharOrSlash>:
cmp    $0x21,%dil
setb   %al
cmp    $0x2f,%dil
sete   %cl
or     %al,%cl
movzbl %cl,%eax
ret

LLVM IR (-O0):
define i32 @isControlCharOrSlash(i8 signext %0) {
%2 = alloca i32
%3 = alloca i8
store i8 %0, i8* %3
%4 = load i8, i8* %3
%5 = zext i8 %4 to i32
%6 = icmp slt i32 %5, 33
br i1 %6, label %7, label %8
7: ; preds = %1
store i32 1, i32* %2
br label %14
8: ; preds = %1
%9 = load i8, i8* %3
%10 = sext i8 %9 to i32
%11 = icmp eq i32 %10, 47
br i1 %11, label %12, label %13
12: ; preds = %8
store i32 1, i32* %2
br label %14
13: ; preds = %8
store i32 0, i32* %2
br label %14
14: ; preds = %13, %12, %7
%15 = load i32, i32* %2
ret i32 %15
}

LLVM IR (-O2):
define i32 @isControlCharOrSlash(i8 signext %0) {
%2 = icmp ult i8 %0, 33
%3 = icmp eq i8 %0, 47
%4 = or i1 %2, %3
%5 = zext i1 %4 to i32
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ abort_gzip();
void write_error() { abort_gzip(); }


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 */
#define GLUT_KEY_DOWN 129
#define GLUT_KEY_UP 128
int /*<<< orphan*/ alphadown();
int /*<<< orphan*/ alphaup();
void special(int key, int x, int y) {
  switch (key) {
  case GLUT_KEY_UP:
    alphaup();
    break;
  case GLUT_KEY_DOWN:
    alphadown();
    break;
  }
}


x86 assembly (clang, -O0):
<special>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    -0x4(%rbp),%eax
mov    %eax,-0x10(%rbp)
sub    $0x80,%eax
je     115a <special+0x3a>
jmp    1147 <special+0x27>
mov    -0x10(%rbp),%eax
sub    $0x81,%eax
je     1166 <special+0x46>
jmp    116d <special+0x4d>
mov    $0x0,%al
call   1030 <alphaup@plt>
jmp    116d <special+0x4d>
mov    $0x0,%al
call   1040 <alphadown@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<special>:
cmp    $0x81,%edi
je     1137 <special+0x17>
cmp    $0x80,%edi
jne    113e <special+0x1e>
xor    %eax,%eax
jmp    1030 <alphaup@plt>
xor    %eax,%eax
jmp    1040 <alphadown@plt>
ret

LLVM IR (-O0):
define void @special(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 = load i32, i32* %4
switch i32 %7, label %12 [
i32 128, label %8
i32 129, label %10
]
8: ; preds = %3
%9 = call i32 (...) @alphaup()
br label %12
10: ; preds = %3
%11 = call i32 (...) @alphadown()
br label %12
12: ; preds = %3, %10, %8
ret void
}

LLVM IR (-O2):
define void @special(i32 %0, i32 %1, i32 %2) {
switch i32 %0, label %8 [
i32 128, label %4
i32 129, label %6
]
4: ; preds = %3
%5 = tail call i32 (...) @alphaup()
br label %8
6: ; preds = %3
%7 = tail call i32 (...) @alphadown()
br label %8
8: ; preds = %3, %6, %4
ret void
}
/* Variables and functions */
int f_decode(size_t, unsigned char *, size_t, unsigned char *);
extern int decode(size_t z, unsigned char *bz, size_t n, unsigned char *bp) {
  return f_decode(z, bz, n, bp);
}


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

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

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

LLVM IR (-O2):
define i32 @decode(i64 %0, i8* %1, i64 %2, i8* %3) {
%5 = tail call i32 @f_decode(i64 %0, i8* %1, i64 %2, i8* %3)
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ DDSpriteBuffer_BltImg(int, int, int, int);
int GetStretchX(int);
int GetStretchY(int);
void subDrawElectronTurnLeft(int si, int bx) {
  int X, Y;
  X = GetStretchX(si);
  Y = GetStretchY(si);
  DDSpriteBuffer_BltImg(X, Y, 134, bx);
}


x86 assembly (clang, -O0):
<subDrawElectronTurnLeft>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%edi
call   1030 <GetStretchX@plt>
mov    %eax,-0xc(%rbp)
mov    -0x4(%rbp),%edi
call   1050 <GetStretchY@plt>
mov    %eax,-0x10(%rbp)
mov    -0xc(%rbp),%edi
mov    -0x10(%rbp),%esi
mov    -0x8(%rbp),%ecx
mov    $0x86,%edx
call   1040 <DDSpriteBuffer_BltImg@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<subDrawElectronTurnLeft>:
push   %rbp
push   %r14
push   %rbx
mov    %esi,%r14d
mov    %edi,%ebp
call   1030 <GetStretchX@plt>
mov    %eax,%ebx
mov    %ebp,%edi
call   1050 <GetStretchY@plt>
mov    %ebx,%edi
mov    %eax,%esi
mov    $0x86,%edx
mov    %r14d,%ecx
pop    %rbx
pop    %r14
pop    %rbp
jmp    1040 <DDSpriteBuffer_BltImg@plt>

LLVM IR (-O0):
define void @subDrawElectronTurnLeft(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%7 = load i32, i32* %3
%8 = call i32 @GetStretchX(i32 %7)
store i32 %8, i32* %5
%9 = load i32, i32* %3
%10 = call i32 @GetStretchY(i32 %9)
store i32 %10, i32* %6
%11 = load i32, i32* %5
%12 = load i32, i32* %6
%13 = load i32, i32* %4
%14 = call i32 @DDSpriteBuffer_BltImg(i32 %11, i32 %12, i32 134, i32 %13)
ret void
}

LLVM IR (-O2):
define void @subDrawElectronTurnLeft(i32 %0, i32 %1) {
%3 = tail call i32 @GetStretchX(i32 %0)
%4 = tail call i32 @GetStretchY(i32 %0)
%5 = tail call i32 @DDSpriteBuffer_BltImg(i32 %3, i32 %4, i32 134, i32 %1)
ret void
}
void TclDateerror(s) char *s;
{}


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

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

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

LLVM IR (-O2):
define void @TclDateerror(i8* nocapture %0) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ close(int);
void raw_reader_cleanup(void *arg) {
  int fd = (int)arg;
  close(fd);
}


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

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

LLVM IR (-O0):
define void @raw_reader_cleanup(i8* %0) {
%2 = alloca i8*
%3 = alloca i32
store i8* %0, i8** %2
%4 = load i8*, i8** %2
%5 = ptrtoint i8* %4 to i32
store i32 %5, i32* %3
%6 = load i32, i32* %3
%7 = call i32 @close(i32 %6)
ret void
}

LLVM IR (-O2):
define void @raw_reader_cleanup(i8* %0) {
%2 = ptrtoint i8* %0 to i64
%3 = trunc i64 %2 to i32
%4 = tail call i32 @close(i32 %3)
ret void
}
void palm27x_irda_init(int pwdn) {}


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

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

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

LLVM IR (-O2):
define void @palm27x_irda_init(i32 %0) {
ret void
}
/* Variables and functions */
int pow(int, int);
int sqrt(int);
int main() { ((2 * 3) - sqrt(4)) / (4 - pow(2, 2)); }


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
mov    $0x4,%edi
call   1040 <sqrt@plt>
mov    $0x2,%esi
mov    %esi,%edi
call   1030 <pow@plt>
xor    %eax,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    $0x4,%edi
call   1040 <sqrt@plt>
mov    $0x2,%edi
mov    $0x2,%esi
call   1030 <pow@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @main() {
%1 = call i32 @sqrt(i32 4)
%2 = sub nsw i32 6, %1
%3 = call i32 @pow(i32 2, i32 2)
%4 = sub nsw i32 4, %3
%5 = sdiv i32 %2, %4
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 @sqrt(i32 4)
%2 = tail call i32 @pow(i32 2, i32 2)
ret i32 0
}
/* Variables and functions */
size_t get_used_size(void *mem_pool) { return 0; }


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

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

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

LLVM IR (-O2):
define i64 @get_used_size(i8* nocapture readnone %0) {
ret i64 0
}
__attribute__((no)) int main1(int *pa) {
  int i;
  for (i = 0; i < 256; i++) {
    pa[i] = pa[i] + 1;
  }
  return 0;
}


x86 assembly (clang, -O0):
<main1>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
cmpl   $0x100,-0xc(%rbp)
jge    1143 <main1+0x43>
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
mov    (%rax,%rcx,4),%edx
add    $0x1,%edx
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
mov    %edx,(%rax,%rcx,4)
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    110f <main1+0xf>
xor    %eax,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<main1>:
xor    %eax,%eax
pcmpeqd %xmm0,%xmm0
cs nopw 0x0(%rax,%rax,1)
movdqu (%rdi,%rax,4),%xmm1
movdqu 0x10(%rdi,%rax,4),%xmm2
movdqu 0x20(%rdi,%rax,4),%xmm3
movdqu 0x30(%rdi,%rax,4),%xmm4
psubd  %xmm0,%xmm1
psubd  %xmm0,%xmm2
movdqu %xmm1,(%rdi,%rax,4)
movdqu %xmm2,0x10(%rdi,%rax,4)
psubd  %xmm0,%xmm3
psubd  %xmm0,%xmm4
movdqu %xmm3,0x20(%rdi,%rax,4)
movdqu %xmm4,0x30(%rdi,%rax,4)
add    $0x10,%rax
cmp    $0x100,%rax
jne    1110 <main1+0x10>
xor    %eax,%eax
ret

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

LLVM IR (-O2):
define i32 @main1(i32* nocapture %0) {
br label %2
2: ; preds = %2, %1
%3 = phi i64 [ 0, %1 ], [ %25, %2 ]
%4 = getelementptr inbounds i32, i32* %0, i64 %3
%5 = bitcast i32* %4 to <4 x i32>*
%6 = load <4 x i32>, <4 x i32>* %5
%7 = getelementptr inbounds i32, i32* %4, i64 4
%8 = bitcast i32* %7 to <4 x i32>*
%9 = load <4 x i32>, <4 x i32>* %8
%10 = add nsw <4 x i32> %6, <i32 1, i32 1, i32 1, i32 1>
%11 = add nsw <4 x i32> %9, <i32 1, i32 1, i32 1, i32 1>
%12 = bitcast i32* %4 to <4 x i32>*
store <4 x i32> %10, <4 x i32>* %12
%13 = bitcast i32* %7 to <4 x i32>*
store <4 x i32> %11, <4 x i32>* %13
%14 = or i64 %3, 8
%15 = getelementptr inbounds i32, i32* %0, i64 %14
%16 = bitcast i32* %15 to <4 x i32>*
%17 = load <4 x i32>, <4 x i32>* %16
%18 = getelementptr inbounds i32, i32* %15, i64 4
%19 = bitcast i32* %18 to <4 x i32>*
%20 = load <4 x i32>, <4 x i32>* %19
%21 = add nsw <4 x i32> %17, <i32 1, i32 1, i32 1, i32 1>
%22 = add nsw <4 x i32> %20, <i32 1, i32 1, i32 1, i32 1>
%23 = bitcast i32* %15 to <4 x i32>*
store <4 x i32> %21, <4 x i32>* %23
%24 = bitcast i32* %18 to <4 x i32>*
store <4 x i32> %22, <4 x i32>* %24
%25 = add nuw nsw i64 %3, 16
%26 = icmp eq i64 %25, 256
br i1 %26, label %27, label %2
27: ; preds = %2
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int pa_utf8_valid() {
  printf("NOT IMPLEMENTED:"
         "pa_utf8_valid"
         "\n");
}


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

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

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

LLVM IR (-O2):
@str = [30 x i8] c"NOT IMPLEMENTED:pa_utf8_valid\00"
define i32 @pa_utf8_valid() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([30 x i8], [30 x i8]* @str, i64 0, i64 0))
ret i32 undef
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void usage(void) {
  printf("\ni2ctool [OPTIONS...]\n\n"
         "Generate some traffic over i2c, this program should only used for "
         "debugging purposes\n\n"
         "  -d i2c Linux device (/dev/i2c-0)\n"
         "  -a i2c device address, the address of the i2c device on the bus\n"
         "  -w data to write, comma seperated bytes 0,1,2,3,...\n"
         "  -r count of data to read, write will be executed before read\n"
         "  -c detect devices on the bus\n"
         "  -h show this message\n\n");
}


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

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

LLVM IR (-O0):
@.str = [383 x i8] c"\0Ai2ctool [OPTIONS...]\0A\0AGenerate some traffic over i2c, this program should only used for debugging purposes\0A\0A -d i2c Linux device (/dev/i2c-0)\0A -a i2c device address, the address of the i2c device on the bus\0A -w data to write, comma seperated bytes 0,1,2,3,...\0A -r count of data to read, write will be executed before read\0A -c detect devices on the bus\0A -h show this message\0A\0A\00"
define void @usage() {
%1 = call i32 @printf(i8* getelementptr inbounds ([383 x i8], [383 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@str = [382 x i8] c"\0Ai2ctool [OPTIONS...]\0A\0AGenerate some traffic over i2c, this program should only used for debugging purposes\0A\0A -d i2c Linux device (/dev/i2c-0)\0A -a i2c device address, the address of the i2c device on the bus\0A -w data to write, comma seperated bytes 0,1,2,3,...\0A -r count of data to read, write will be executed before read\0A -c detect devices on the bus\0A -h show this message\0A\00"
define void @usage() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([382 x i8], [382 x i8]* @str, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ EXIT_SUCCESS;
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int cmd_exit(int argc, char **argv) {
  (void)argc;
  (void)argv;
  exit(EXIT_SUCCESS);
}


x86 assembly (clang, -O0):
<cmd_exit>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    0x2eba(%rip),%rax
mov    (%rax),%edi
call   1030 <exit@plt>

x86 assembly (clang, -O2):
<cmd_exit>:
push   %rax
mov    0x2ec8(%rip),%rax
mov    (%rax),%edi
call   1030 <exit@plt>

LLVM IR (-O0):
@EXIT_SUCCESS = global i32 0
define i32 @cmd_exit(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i8**
store i32 %0, i32* %3
store i8** %1, i8*** %4
%5 = load i32, i32* %3
%6 = load i8**, i8*** %4
%7 = load i32, i32* @EXIT_SUCCESS
%8 = call i32 @exit(i32 %7)
unreachable
}

LLVM IR (-O2):
@EXIT_SUCCESS = global i32 0
define i32 @cmd_exit(i32 %0, i8** nocapture readnone %1) {
%3 = load i32, i32* @EXIT_SUCCESS
%4 = tail call i32 @exit(i32 %3)
unreachable
}
/* Type definitions */
typedef int /*<<< orphan*/ uint8_t;
typedef int uint32_t;
typedef int /*<<< orphan*/ uint16_t;
typedef int /*<<< orphan*/ int16_t;

/* Variables and functions */
int /*<<< orphan*/ ivory_serialize_unpack_prim_2_le(int /*<<< orphan*/ const *);
int /*<<< orphan*/ memcpy(int /*<<< orphan*/ *, int /*<<< orphan*/ *, int);
void ivory_serialize_unpack_int16_le(const uint8_t *src, uint32_t offs,
                                     int16_t *dst) {
  uint16_t tmp = ivory_serialize_unpack_prim_2_le(src + offs);
  memcpy(dst, &tmp, sizeof(*dst));
}


x86 assembly (clang, -O0):
<ivory_serialize_unpack_int16_le>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x8(%rbp),%rdi
movslq -0xc(%rbp),%rax
shl    $0x2,%rax
add    %rax,%rdi
call   1030 <ivory_serialize_unpack_prim_2_le@plt>
mov    %eax,-0x1c(%rbp)
mov    -0x18(%rbp),%rdi
lea    -0x1c(%rbp),%rsi
mov    $0x4,%edx
call   1040 <memcpy@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ivory_serialize_unpack_int16_le>:
push   %rbx
sub    $0x10,%rsp
mov    %rdx,%rbx
movslq %esi,%rax
lea    (%rdi,%rax,4),%rdi
call   1030 <ivory_serialize_unpack_prim_2_le@plt>
mov    %eax,0xc(%rsp)
lea    0xc(%rsp),%rsi
mov    %rbx,%rdi
mov    $0x4,%edx
call   1040 <memcpy@plt>
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
define void @ivory_serialize_unpack_int16_le(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* %5
%10 = sext i32 %9 to i64
%11 = getelementptr inbounds i32, i32* %8, i64 %10
%12 = call i32 @ivory_serialize_unpack_prim_2_le(i32* %11)
store i32 %12, i32* %7
%13 = load i32*, i32** %6
%14 = call i32 @memcpy(i32* %13, i32* %7, i32 4)
ret void
}

LLVM IR (-O2):
define void @ivory_serialize_unpack_int16_le(i32* %0, i32 %1, i32* %2) {
%4 = alloca i32
%5 = bitcast i32* %4 to i8*
%6 = sext i32 %1 to i64
%7 = getelementptr inbounds i32, i32* %0, i64 %6
%8 = tail call i32 @ivory_serialize_unpack_prim_2_le(i32* %7)
store i32 %8, i32* %4
%9 = call i32 @memcpy(i32* %2, i32* %4, i32 4)
ret void
}
_DAH(DIT_) {
  __DIT(DIT_ > 3 ? _DAH(DIT_ >> 1) : '\0');
  return DIT_ & 1 ? '-' : '.';
}


x86 assembly (clang, -O0):
<_DAH>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
cmpl   $0x3,-0x4(%rbp)
jle    1148 <_DAH+0x28>
mov    -0x4(%rbp),%edi
sar    $0x1,%edi
call   1040 <_DAH@plt>
mov    %eax,-0x8(%rbp)
jmp    1152 <_DAH+0x32>
xor    %eax,%eax
mov    %eax,-0x8(%rbp)
jmp    1152 <_DAH+0x32>
mov    -0x8(%rbp),%edi
mov    $0x0,%al
call   1030 <__DIT@plt>
mov    -0x4(%rbp),%edx
and    $0x1,%edx
mov    $0x2e,%eax
mov    $0x2d,%ecx
cmp    $0x0,%edx
cmovne %ecx,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<_DAH>:
push   %rbx
mov    %edi,%ebx
xor    %edi,%edi
cmp    $0x4,%ebx
jl     1135 <_DAH+0x15>
mov    %ebx,%edi
shr    %edi
call   1040 <_DAH@plt>
mov    %eax,%edi
xor    %eax,%eax
call   1030 <__DIT@plt>
and    $0x1,%ebx
mov    $0x2e,%eax
sub    %ebx,%eax
pop    %rbx
ret

LLVM IR (-O0):
define i32 @_DAH(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = icmp sgt i32 %3, 3
br i1 %4, label %5, label %9
5: ; preds = %1
%6 = load i32, i32* %2
%7 = ashr i32 %6, 1
%8 = call i32 @_DAH(i32 %7)
br label %10
9: ; preds = %1
br label %10
10: ; preds = %9, %5
%11 = phi i32 [ %8, %5 ], [ 0, %9 ]
%12 = call i32 (i32, ...) bitcast (i32 (...)* @__DIT to i32 (i32, ...)*)(i32 %11)
%13 = load i32, i32* %2
%14 = and i32 %13, 1
%15 = icmp ne i32 %14, 0
%16 = zext i1 %15 to i64
%17 = select i1 %15, i32 45, i32 46
ret i32 %17
}

LLVM IR (-O2):
define i32 @_DAH(i32 %0) {
%2 = icmp sgt i32 %0, 3
br i1 %2, label %3, label %6
3: ; preds = %1
%4 = lshr i32 %0, 1
%5 = tail call i32 @_DAH(i32 %4)
br label %6
6: ; preds = %1, %3
%7 = phi i32 [ %5, %3 ], [ 0, %1 ]
%8 = tail call i32 (i32, ...) bitcast (i32 (...)* @__DIT to i32 (i32, ...)*)(i32 %7)
%9 = and i32 %0, 1
%10 = icmp eq i32 %9, 0
%11 = select i1 %10, i32 46, i32 45
ret i32 %11
}
/* Variables and functions */
int /*<<< orphan*/ usleep(int);
void Time_sleep(double sec) { usleep(1000000 * sec); }


x86 assembly (clang, -O0):
<Time_sleep>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  0xedb(%rip),%xmm0
mulsd  -0x8(%rbp),%xmm0
cvttsd2si %xmm0,%edi
call   1030 <usleep@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Time_sleep>:
mulsd  0xee8(%rip),%xmm0
cvttsd2si %xmm0,%edi
jmp    1030 <usleep@plt>

LLVM IR (-O0):
define void @Time_sleep(double %0) {
%2 = alloca double
store double %0, double* %2
%3 = load double, double* %2
%4 = fmul double 1.000000e+06, %3
%5 = fptosi double %4 to i32
%6 = call i32 @usleep(i32 %5)
ret void
}

LLVM IR (-O2):
define void @Time_sleep(double %0) {
%2 = fmul double %0, 1.000000e+06
%3 = fptosi double %2 to i32
%4 = tail call i32 @usleep(i32 %3)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ wait(int /*<<< orphan*/ *);
void _nsntrace_cleanup() { wait(NULL); }


x86 assembly (clang, -O0):
<_nsntrace_cleanup>:
push   %rbp
mov    %rsp,%rbp
xor    %eax,%eax
mov    %eax,%edi
call   1030 <wait@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<_nsntrace_cleanup>:
xor    %edi,%edi
jmp    1030 <wait@plt>

LLVM IR (-O0):
define void @_nsntrace_cleanup() {
%1 = call i32 @wait(i32* null)
ret void
}

LLVM IR (-O2):
define void @_nsntrace_cleanup() {
%1 = tail call i32 @wait(i32* null)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char);
int main() {
  int i;
  for (i = 0; i != 258; ++i) {
    printf("%d\n", ((signed char)i) / (signed char)2);
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
cmpl   $0x102,-0x8(%rbp)
je     115e <main+0x4e>
mov    -0x8(%rbp),%eax
movsbl %al,%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
lea    0xeb8(%rip),%rdi
movsbl %al,%esi
call   1030 <printf@plt>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1126 <main+0x16>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %rbx
push   %rax
xor    %ebp,%ebp
lea    0xee4(%rip),%rbx
nopl   0x0(%rax)
mov    %ebp,%eax
shr    $0x7,%al
add    %bpl,%al
sar    %al
movsbl %al,%esi
mov    %rbx,%rdi
call   1030 <printf@plt>
add    $0x1,%ebp
cmp    $0x102,%ebp
jne    1120 <main+0x10>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
@.str = [4 x i8] c"%d\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
store i32 0, i32* %1
store i32 0, i32* %2
br label %3
3: ; preds = %13, %0
%4 = load i32, i32* %2
%5 = icmp ne i32 %4, 258
br i1 %5, label %6, label %16
6: ; preds = %3
%7 = load i32, i32* %2
%8 = trunc i32 %7 to i8
%9 = sext i8 %8 to i32
%10 = sdiv i32 %9, 2
%11 = trunc i32 %10 to i8
%12 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8 signext %11)
br label %13
13: ; preds = %6
%14 = load i32, i32* %2
%15 = add nsw i32 %14, 1
store i32 %15, i32* %2
br label %3
16: ; preds = %3
ret i32 0
}

LLVM IR (-O2):
@.str = [4 x i8] c"%d\0A\00"
define i32 @main() {
br label %1
1: ; preds = %0, %1
%2 = phi i32 [ 0, %0 ], [ %6, %1 ]
%3 = trunc i32 %2 to i8
%4 = sdiv i8 %3, 2
%5 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8 signext %4)
%6 = add nuw nsw i32 %2, 1
%7 = icmp eq i32 %6, 258
br i1 %7, label %8, label %1
8: ; preds = %1
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ CX4_immediate_reg(int);
void CX4_op6e(void) { CX4_immediate_reg(24); }


x86 assembly (clang, -O0):
<CX4_op6e>:
push   %rbp
mov    %rsp,%rbp
mov    $0x18,%edi
call   1030 <CX4_immediate_reg@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<CX4_op6e>:
mov    $0x18,%edi
jmp    1030 <CX4_immediate_reg@plt>

LLVM IR (-O0):
define void @CX4_op6e() {
%1 = call i32 @CX4_immediate_reg(i32 24)
ret void
}

LLVM IR (-O2):
define void @CX4_op6e() {
%1 = tail call i32 @CX4_immediate_reg(i32 24)
ret void
}
void G_ReadLevel(const char *filename) {}


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

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

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

LLVM IR (-O2):
define void @G_ReadLevel(i8* nocapture %0) {
ret void
}
/* Type definitions */
typedef scalar_t__ uint32_t;

/* Variables and functions */
scalar_t__ ring_data_avail(scalar_t__, scalar_t__, scalar_t__);
uint32_t ring_space_avail(uint32_t size, uint32_t head, uint32_t tail) {
  if (size == 0)
    return 0;
  return size - ring_data_avail(size, head, tail) - 1;
}


x86 assembly (clang, -O0):
<ring_space_avail>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    %rdx,-0x20(%rbp)
cmpq   $0x0,-0x10(%rbp)
jne    113c <ring_space_avail+0x2c>
movq   $0x0,-0x8(%rbp)
jmp    1167 <ring_space_avail+0x57>
mov    -0x10(%rbp),%rax
mov    %rax,-0x28(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x18(%rbp),%rsi
mov    -0x20(%rbp),%rdx
call   1030 <ring_data_avail@plt>
mov    %rax,%rcx
mov    -0x28(%rbp),%rax
sub    %rcx,%rax
sub    $0x1,%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ring_space_avail>:
test   %rdi,%rdi
je     1126 <ring_space_avail+0x16>
push   %rbx
mov    %rdi,%rbx
call   1030 <ring_data_avail@plt>
not    %rax
add    %rbx,%rax
pop    %rbx
ret
xor    %eax,%eax
ret

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

LLVM IR (-O2):
define i64 @ring_space_avail(i64 %0, i64 %1, i64 %2) {
%4 = icmp eq i64 %0, 0
br i1 %4, label %9, label %5
5: ; preds = %3
%6 = tail call i64 @ring_data_avail(i64 %0, i64 %1, i64 %2)
%7 = xor i64 %6, -1
%8 = add i64 %7, %0
br label %9
9: ; preds = %3, %5
%10 = phi i64 [ %8, %5 ], [ 0, %3 ]
ret i64 %10
}
unsigned xrop3_205_0_1(unsigned char s, unsigned char t) {
  unsigned D = 0x00ff;
  unsigned S = ((unsigned)s << 8) | s;
  unsigned T = ((unsigned)t << 8) | t;
  unsigned stk1;
  unsigned stk2;
  stk2 = D | T;
  stk2 = ~stk2;
  stk1 = S | stk2;
  return (stk1 & S) | (stk1 & (~T)) | (T & (~S) & D);
}


x86 assembly (clang, -O0):
<xrop3_205_0_1>:
push   %rbp
mov    %rsp,%rbp
mov    %sil,%al
mov    %dil,%cl
mov    %cl,-0x1(%rbp)
mov    %al,-0x2(%rbp)
movl   $0xff,-0x8(%rbp)
movzbl -0x1(%rbp),%eax
shl    $0x8,%eax
movzbl -0x1(%rbp),%ecx
or     %ecx,%eax
mov    %eax,-0xc(%rbp)
movzbl -0x2(%rbp),%eax
shl    $0x8,%eax
movzbl -0x2(%rbp),%ecx
or     %ecx,%eax
mov    %eax,-0x10(%rbp)
mov    -0x8(%rbp),%eax
or     -0x10(%rbp),%eax
mov    %eax,-0x18(%rbp)
mov    -0x18(%rbp),%eax
xor    $0xffffffff,%eax
mov    %eax,-0x18(%rbp)
mov    -0xc(%rbp),%eax
or     -0x18(%rbp),%eax
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
and    -0xc(%rbp),%eax
mov    -0x14(%rbp),%ecx
mov    -0x10(%rbp),%edx
xor    $0xffffffff,%edx
and    %edx,%ecx
or     %ecx,%eax
mov    -0x10(%rbp),%ecx
mov    -0xc(%rbp),%edx
xor    $0xffffffff,%edx
and    %edx,%ecx
and    -0x8(%rbp),%ecx
or     %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<xrop3_205_0_1>:
mov    %edi,%eax
shl    $0x8,%eax
or     %edi,%eax
mov    %esi,%ecx
shl    $0x8,%ecx
lea    (%rcx,%rsi,1),%edx
xor    $0xffffff00,%ecx
or     %eax,%ecx
not    %edx
and    %ecx,%edx
or     %esi,%eax
or     %edx,%eax
ret

LLVM IR (-O0):
define i32 @xrop3_205_0_1(i8 zeroext %0, i8 zeroext %1) {
%3 = alloca i8
%4 = alloca i8
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32
store i8 %0, i8* %3
store i8 %1, i8* %4
store i32 255, i32* %5
%10 = load i8, i8* %3
%11 = zext i8 %10 to i32
%12 = shl i32 %11, 8
%13 = load i8, i8* %3
%14 = zext i8 %13 to i32
%15 = or i32 %12, %14
store i32 %15, i32* %6
%16 = load i8, i8* %4
%17 = zext i8 %16 to i32
%18 = shl i32 %17, 8
%19 = load i8, i8* %4
%20 = zext i8 %19 to i32
%21 = or i32 %18, %20
store i32 %21, i32* %7
%22 = load i32, i32* %5
%23 = load i32, i32* %7
%24 = or i32 %22, %23
store i32 %24, i32* %9
%25 = load i32, i32* %9
%26 = xor i32 %25, -1
store i32 %26, i32* %9
%27 = load i32, i32* %6
%28 = load i32, i32* %9
%29 = or i32 %27, %28
store i32 %29, i32* %8
%30 = load i32, i32* %8
%31 = load i32, i32* %6
%32 = and i32 %30, %31
%33 = load i32, i32* %8
%34 = load i32, i32* %7
%35 = xor i32 %34, -1
%36 = and i32 %33, %35
%37 = or i32 %32, %36
%38 = load i32, i32* %7
%39 = load i32, i32* %6
%40 = xor i32 %39, -1
%41 = and i32 %38, %40
%42 = load i32, i32* %5
%43 = and i32 %41, %42
%44 = or i32 %37, %43
ret i32 %44
}

LLVM IR (-O2):
define i32 @xrop3_205_0_1(i8 zeroext %0, i8 zeroext %1) {
%3 = zext i8 %0 to i32
%4 = mul nuw nsw i32 %3, 257
%5 = zext i8 %1 to i32
%6 = shl nuw nsw i32 %5, 8
%7 = or i32 %6, %5
%8 = xor i32 %6, -256
%9 = or i32 %8, %4
%10 = xor i32 %7, -1
%11 = and i32 %9, %10
%12 = or i32 %4, %5
%13 = or i32 %12, %11
ret i32 %13
}
/* Variables and functions */
int __get_array_size(char const *);
int __infer_nondet_int();
int strcmp(const char *s1, const char *s2) {
  int size_s1;
  int size_s2;
  int res;
  res = __infer_nondet_int();
  size_s1 = __get_array_size(s1);
  size_s2 = __get_array_size(s2);
  return res;
}


x86 assembly (clang, -O0):
<strcmp>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    $0x0,%al
call   1030 <__infer_nondet_int@plt>
mov    %eax,-0x1c(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <__get_array_size@plt>
mov    %eax,-0x14(%rbp)
mov    -0x10(%rbp),%rdi
call   1040 <__get_array_size@plt>
mov    %eax,-0x18(%rbp)
mov    -0x1c(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<strcmp>:
push   %rbp
push   %r14
push   %rbx
mov    %rsi,%r14
mov    %rdi,%rbx
xor    %eax,%eax
call   1030 <__infer_nondet_int@plt>
mov    %eax,%ebp
mov    %rbx,%rdi
call   1040 <__get_array_size@plt>
mov    %r14,%rdi
call   1040 <__get_array_size@plt>
mov    %ebp,%eax
pop    %rbx
pop    %r14
pop    %rbp
ret

LLVM IR (-O0):
define i32 @strcmp(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
store i8* %0, i8** %3
store i8* %1, i8** %4
%8 = call i32 (...) @__infer_nondet_int()
store i32 %8, i32* %7
%9 = load i8*, i8** %3
%10 = call i32 @__get_array_size(i8* %9)
store i32 %10, i32* %5
%11 = load i8*, i8** %4
%12 = call i32 @__get_array_size(i8* %11)
store i32 %12, i32* %6
%13 = load i32, i32* %7
ret i32 %13
}

LLVM IR (-O2):
define i32 @strcmp(i8* %0, i8* %1) {
%3 = tail call i32 (...) @__infer_nondet_int()
%4 = tail call i32 @__get_array_size(i8* %0)
%5 = tail call i32 @__get_array_size(i8* %1)
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ assert(int);
char itoc(int i) {
  assert(i >= 0 && i <= 9);
  return 0 + i;
}


x86 assembly (clang, -O0):
<itoc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
xor    %eax,%eax
cmpl   $0x0,-0x4(%rbp)
mov    %al,-0x5(%rbp)
jl     1134 <itoc+0x24>
cmpl   $0x9,-0x4(%rbp)
setle  %al
mov    %al,-0x5(%rbp)
mov    -0x5(%rbp),%al
and    $0x1,%al
movzbl %al,%edi
call   1030 <assert@plt>
mov    -0x4(%rbp),%eax
add    $0x0,%eax
movsbl %al,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<itoc>:
push   %rbx
mov    %edi,%ebx
xor    %edi,%edi
cmp    $0xa,%ebx
setb   %dil
call   1030 <assert@plt>
mov    %ebx,%eax
pop    %rbx
ret

LLVM IR (-O0):
define signext i8 @itoc(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = icmp sge i32 %3, 0
br i1 %4, label %5, label %8
5: ; preds = %1
%6 = load i32, i32* %2
%7 = icmp sle i32 %6, 9
br label %8
8: ; preds = %5, %1
%9 = phi i1 [ false, %1 ], [ %7, %5 ]
%10 = zext i1 %9 to i32
%11 = call i32 @assert(i32 %10)
%12 = load i32, i32* %2
%13 = add nsw i32 0, %12
%14 = trunc i32 %13 to i8
ret i8 %14
}

LLVM IR (-O2):
define signext i8 @itoc(i32 %0) {
%2 = icmp ult i32 %0, 10
%3 = zext i1 %2 to i32
%4 = tail call i32 @assert(i32 %3)
%5 = trunc i32 %0 to i8
ret i8 %5
}
/* Variables and functions */
int run_tests();
int main(void) {
  int err = run_tests();
  return err;
}


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

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

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

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @run_tests()
ret i32 %1
}
/* Variables and functions */
int /*<<< orphan*/ Soft_UART_Write(int /*<<< orphan*/);
void LOG(char *x) {
  while (*x != 0)
    Soft_UART_Write(*x++);
}


x86 assembly (clang, -O0):
<LOG>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x0,%eax
je     1148 <LOG+0x38>
mov    -0x8(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x8(%rbp)
movsbl (%rax),%edi
call   1030 <Soft_UART_Write@plt>
jmp    111c <LOG+0xc>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<LOG>:
push   %rbx
mov    (%rdi),%al
test   %al,%al
je     1133 <LOG+0x23>
mov    %rdi,%rbx
add    $0x1,%rbx
xchg   %ax,%ax
movsbl %al,%edi
call   1030 <Soft_UART_Write@plt>
movzbl (%rbx),%eax
add    $0x1,%rbx
test   %al,%al
jne    1120 <LOG+0x10>
pop    %rbx
ret

LLVM IR (-O0):
define void @LOG(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
br label %3
3: ; preds = %8, %1
%4 = load i8*, i8** %2
%5 = load i8, i8* %4
%6 = sext i8 %5 to i32
%7 = icmp ne i32 %6, 0
br i1 %7, label %8, label %14
8: ; preds = %3
%9 = load i8*, i8** %2
%10 = getelementptr inbounds i8, i8* %9, i32 1
store i8* %10, i8** %2
%11 = load i8, i8* %9
%12 = sext i8 %11 to i32
%13 = call i32 @Soft_UART_Write(i32 %12)
br label %3
14: ; preds = %3
ret void
}

LLVM IR (-O2):
define void @LOG(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = icmp eq i8 %2, 0
br i1 %3, label %12, label %4
4: ; preds = %1, %4
%5 = phi i8 [ %10, %4 ], [ %2, %1 ]
%6 = phi i8* [ %8, %4 ], [ %0, %1 ]
%7 = sext i8 %5 to i32
%8 = getelementptr inbounds i8, i8* %6, i64 1
%9 = tail call i32 @Soft_UART_Write(i32 %7)
%10 = load i8, i8* %8
%11 = icmp eq i8 %10, 0
br i1 %11, label %12, label %4
12: ; preds = %4, %1
ret void
}
/* Variables and functions */
char *getenv(char *);
int /*<<< orphan*/ printf(char *, char *);
int main() {
  printf("PATH=%s", getenv("PATH"));
  return 0;
}


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

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

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

LLVM IR (-O2):
@.str = [8 x i8] c"PATH=%s\00"
@.str.1 = [5 x i8] c"PATH\00"
define i32 @main() {
%1 = tail call i8* @getenv(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0))
%2 = tail call i32 @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i8* %1)
ret i32 0
}
/* Variables and functions */
double RAND_MAX;
scalar_t__ rand();
void random_doubles(int n, double *d) {
  int i;
  for (i = 0; i < n; i++)
    d[i] = ((double)rand()) / RAND_MAX;
}


x86 assembly (clang, -O0):
<random_doubles>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
mov    -0x14(%rbp),%eax
cmp    -0x4(%rbp),%eax
jge    1164 <random_doubles+0x54>
mov    $0x0,%al
call   1030 <rand@plt>
cvtsi2sd %rax,%xmm0
mov    0x2ea3(%rip),%rax
divsd  (%rax),%xmm0
mov    -0x10(%rbp),%rax
movslq -0x14(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    1126 <random_doubles+0x16>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<random_doubles>:
push   %r15
push   %r14
push   %r12
push   %rbx
push   %rax
test   %edi,%edi
jle    1153 <random_doubles+0x43>
mov    %rsi,%r14
mov    %edi,%r12d
mov    0x2ebf(%rip),%r15
xor    %ebx,%ebx
nopl   0x0(%rax,%rax,1)
xor    %eax,%eax
call   1030 <rand@plt>
xorps  %xmm0,%xmm0
cvtsi2sd %rax,%xmm0
divsd  (%r15),%xmm0
movsd  %xmm0,(%r14,%rbx,8)
add    $0x1,%rbx
cmp    %rbx,%r12
jne    1130 <random_doubles+0x20>
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
@RAND_MAX = global double 0.000000e+00
define void @random_doubles(i32 %0, double* %1) {
%3 = alloca i32
%4 = alloca double*
%5 = alloca i32
store i32 %0, i32* %3
store double* %1, double** %4
store i32 0, i32* %5
br label %6
6: ; preds = %19, %2
%7 = load i32, i32* %5
%8 = load i32, i32* %3
%9 = icmp slt i32 %7, %8
br i1 %9, label %10, label %22
10: ; preds = %6
%11 = call i64 (...) @rand()
%12 = sitofp i64 %11 to double
%13 = load double, double* @RAND_MAX
%14 = fdiv double %12, %13
%15 = load double*, double** %4
%16 = load i32, i32* %5
%17 = sext i32 %16 to i64
%18 = getelementptr inbounds double, double* %15, i64 %17
store double %14, double* %18
br label %19
19: ; preds = %10
%20 = load i32, i32* %5
%21 = add nsw i32 %20, 1
store i32 %21, i32* %5
br label %6
22: ; preds = %6
ret void
}

LLVM IR (-O2):
@RAND_MAX = global double 0.000000e+00
define void @random_doubles(i32 %0, double* nocapture writeonly %1) {
%3 = icmp sgt i32 %0, 0
br i1 %3, label %4, label %15
4: ; preds = %2
%5 = zext i32 %0 to i64
br label %6
6: ; preds = %4, %6
%7 = phi i64 [ 0, %4 ], [ %13, %6 ]
%8 = tail call i64 (...) @rand()
%9 = sitofp i64 %8 to double
%10 = load double, double* @RAND_MAX
%11 = fdiv double %9, %10
%12 = getelementptr inbounds double, double* %1, i64 %7
store double %11, double* %12
%13 = add nuw nsw i64 %7, 1
%14 = icmp eq i64 %13, %5
br i1 %14, label %15, label %6
15: ; preds = %6, %2
ret void
}
/* Variables and functions */
int /*<<< orphan*/ assert(int);
int /*<<< orphan*/ stu__cc(int);
int stu__off();
int stu__cc3(int a, int b, int c) {
  if (a == '=')
    assert(c != 0);
  stu__cc(a);
  stu__cc(b);
  stu__cc(c);
  return stu__off() - 3;
}


x86 assembly (clang, -O0):
<stu__cc3>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
cmpl   $0x3d,-0x4(%rbp)
jne    115c <stu__cc3+0x2c>
cmpl   $0x0,-0xc(%rbp)
setne  %al
and    $0x1,%al
movzbl %al,%edi
call   1050 <assert@plt>
mov    -0x4(%rbp),%edi
call   1030 <stu__cc@plt>
mov    -0x8(%rbp),%edi
call   1030 <stu__cc@plt>
mov    -0xc(%rbp),%edi
call   1030 <stu__cc@plt>
mov    $0x0,%al
call   1040 <stu__off@plt>
sub    $0x3,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<stu__cc3>:
push   %rbp
push   %r14
push   %rbx
mov    %edx,%ebx
mov    %esi,%r14d
mov    %edi,%ebp
cmp    $0x3d,%edi
jne    114d <stu__cc3+0x1d>
xor    %edi,%edi
test   %ebx,%ebx
setne  %dil
call   1050 <assert@plt>
mov    %ebp,%edi
call   1030 <stu__cc@plt>
mov    %r14d,%edi
call   1030 <stu__cc@plt>
mov    %ebx,%edi
call   1030 <stu__cc@plt>
xor    %eax,%eax
call   1040 <stu__off@plt>
add    $0xfffffffd,%eax
pop    %rbx
pop    %r14
pop    %rbp
ret

LLVM IR (-O0):
define i32 @stu__cc3(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 = load i32, i32* %4
%8 = icmp eq i32 %7, 61
br i1 %8, label %9, label %14
9: ; preds = %3
%10 = load i32, i32* %6
%11 = icmp ne i32 %10, 0
%12 = zext i1 %11 to i32
%13 = call i32 @assert(i32 %12)
br label %14
14: ; preds = %9, %3
%15 = load i32, i32* %4
%16 = call i32 @stu__cc(i32 %15)
%17 = load i32, i32* %5
%18 = call i32 @stu__cc(i32 %17)
%19 = load i32, i32* %6
%20 = call i32 @stu__cc(i32 %19)
%21 = call i32 (...) @stu__off()
%22 = sub nsw i32 %21, 3
ret i32 %22
}

LLVM IR (-O2):
define i32 @stu__cc3(i32 %0, i32 %1, i32 %2) {
%4 = icmp eq i32 %0, 61
br i1 %4, label %5, label %9
5: ; preds = %3
%6 = icmp ne i32 %2, 0
%7 = zext i1 %6 to i32
%8 = tail call i32 @assert(i32 %7)
br label %9
9: ; preds = %5, %3
%10 = tail call i32 @stu__cc(i32 %0)
%11 = tail call i32 @stu__cc(i32 %1)
%12 = tail call i32 @stu__cc(i32 %2)
%13 = tail call i32 (...) @stu__off()
%14 = add nsw i32 %13, -3
ret i32 %14
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char *);
void show_html_page(char *loc) { printf("Location: %s\n\n", loc); }


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

x86 assembly (clang, -O2):
<show_html_page>:
mov    %rdi,%rsi
lea    0xee6(%rip),%rdi
jmp    1030 <printf@plt>

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

LLVM IR (-O2):
@.str = [15 x i8] c"Location: %s\0A\0A\00"
define void @show_html_page(i8* %0) {
%2 = tail call i32 @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0), i8* %0)
ret void
}