xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ testexec(char **);
int main(int argc, char *argv[], char *envp[]) {
  testexec(envp);
  return 0;
}


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    %rdx,-0x18(%rbp)
mov    -0x18(%rbp),%rdi
call   1030 <testexec@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture readnone %1, i8** %2) {
%4 = tail call i32 @testexec(i8** %2)
ret i32 0
}
unsigned int hash_function(const char *str, unsigned htable_size) {
  unsigned int h = 0;
  unsigned char *p;
  for (p = (unsigned char *)str; *p != '\0'; p++) {
    h = 31 * h + *p;
  }
  return (h % htable_size);
}


x86 assembly (clang, -O0):
<hash_function>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
movl   $0x0,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rax
movzbl (%rax),%eax
cmp    $0x0,%eax
je     114b <hash_function+0x4b>
imul   $0x1f,-0x10(%rbp),%eax
mov    -0x18(%rbp),%rcx
movzbl (%rcx),%ecx
add    %ecx,%eax
mov    %eax,-0x10(%rbp)
mov    -0x18(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x18(%rbp)
jmp    111a <hash_function+0x1a>
mov    -0x10(%rbp),%eax
xor    %edx,%edx
divl   -0xc(%rbp)
mov    %edx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<hash_function>:
mov    (%rdi),%cl
test   %cl,%cl
je     1129 <hash_function+0x29>
add    $0x1,%rdi
xor    %edx,%edx
mov    %edx,%eax
xchg   %ax,%ax
movzbl %cl,%ecx
shl    $0x5,%eax
sub    %edx,%eax
add    %ecx,%eax
movzbl (%rdi),%ecx
add    $0x1,%rdi
mov    %eax,%edx
test   %cl,%cl
jne    1110 <hash_function+0x10>
jmp    112b <hash_function+0x2b>
xor    %eax,%eax
xor    %edx,%edx
div    %esi
mov    %edx,%eax
ret

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

LLVM IR (-O2):
define i32 @hash_function(i8* nocapture %0, i32 %1) {
%3 = load i8, i8* %0
%4 = icmp eq i8 %3, 0
br i1 %4, label %15, label %5
5: ; preds = %2, %5
%6 = phi i8 [ %13, %5 ], [ %3, %2 ]
%7 = phi i8* [ %12, %5 ], [ %0, %2 ]
%8 = phi i32 [ %11, %5 ], [ 0, %2 ]
%9 = zext i8 %6 to i32
%10 = mul i32 %8, 31
%11 = add i32 %10, %9
%12 = getelementptr inbounds i8, i8* %7, i64 1
%13 = load i8, i8* %12
%14 = icmp eq i8 %13, 0
br i1 %14, label %15, label %5
15: ; preds = %5, %2
%16 = phi i32 [ 0, %2 ], [ %11, %5 ]
%17 = urem i32 %16, %1
ret i32 %17
}
/* Variables and functions */
int discovery();
int get_param(char *, char *);
int usage(char *);
int main(int argc, char *argv[]) {
  switch (argc) {
  case 2:
    return discovery();
  case 3:
    return get_param(argv[1], argv[2]);
  default:
    return usage(argv[0]);
  }
}


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    -0x8(%rbp),%eax
mov    %eax,-0x14(%rbp)
sub    $0x2,%eax
je     116b <main+0x3b>
jmp    115a <main+0x2a>
mov    -0x14(%rbp),%eax
sub    $0x3,%eax
je     117a <main+0x4a>
jmp    1197 <main+0x67>
mov    $0x0,%al
call   1030 <discovery@plt>
mov    %eax,-0x4(%rbp)
jmp    11a6 <main+0x76>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
mov    -0x10(%rbp),%rax
mov    0x10(%rax),%rsi
call   1040 <get_param@plt>
mov    %eax,-0x4(%rbp)
jmp    11a6 <main+0x76>
mov    -0x10(%rbp),%rax
mov    (%rax),%rdi
call   1050 <usage@plt>
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
cmp    $0x3,%edi
je     1141 <main+0x11>
cmp    $0x2,%edi
jne    114e <main+0x1e>
xor    %eax,%eax
jmp    1030 <discovery@plt>
mov    0x8(%rsi),%rdi
mov    0x10(%rsi),%rsi
jmp    1040 <get_param@plt>
mov    (%rsi),%rdi
jmp    1050 <usage@plt>

LLVM IR (-O0):
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%6 = load i32, i32* %4
switch i32 %6, label %17 [
i32 2, label %7
i32 3, label %9
]
7: ; preds = %2
%8 = call i32 (...) @discovery()
store i32 %8, i32* %3
br label %22
9: ; preds = %2
%10 = load i8**, i8*** %5
%11 = getelementptr inbounds i8*, i8** %10, i64 1
%12 = load i8*, i8** %11
%13 = load i8**, i8*** %5
%14 = getelementptr inbounds i8*, i8** %13, i64 2
%15 = load i8*, i8** %14
%16 = call i32 @get_param(i8* %12, i8* %15)
store i32 %16, i32* %3
br label %22
17: ; preds = %2
%18 = load i8**, i8*** %5
%19 = getelementptr inbounds i8*, i8** %18, i64 0
%20 = load i8*, i8** %19
%21 = call i32 @usage(i8* %20)
store i32 %21, i32* %3
br label %22
22: ; preds = %17, %9, %7
%23 = load i32, i32* %3
ret i32 %23
}

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture %1) {
switch i32 %0, label %11 [
i32 2, label %3
i32 3, label %5
]
3: ; preds = %2
%4 = tail call i32 (...) @discovery()
br label %14
5: ; preds = %2
%6 = getelementptr inbounds i8*, i8** %1, i64 1
%7 = load i8*, i8** %6
%8 = getelementptr inbounds i8*, i8** %1, i64 2
%9 = load i8*, i8** %8
%10 = tail call i32 @get_param(i8* %7, i8* %9)
br label %14
11: ; preds = %2
%12 = load i8*, i8** %1
%13 = tail call i32 @usage(i8* %12)
br label %14
14: ; preds = %11, %5, %3
%15 = phi i32 [ %13, %11 ], [ %10, %5 ], [ %4, %3 ]
ret i32 %15
}
int fun966() { return 966; }


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

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

LLVM IR (-O0):
define i32 @fun966() {
ret i32 966
}

LLVM IR (-O2):
define i32 @fun966() {
ret i32 966
}
void tegra_smmu_unmap_misc_device(struct device *dev) {}


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

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

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

LLVM IR (-O2):
%struct.device = type opaque
define void @tegra_smmu_unmap_misc_device(%struct.device* nocapture %0) {
ret void
}
/* Variables and functions */
int strcmp(char *, char *);
int sortfunc(const void *a, const void *b) {
  return strcmp(*(char **)a, *(char **)b);
}


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

x86 assembly (clang, -O2):
<sortfunc>:
mov    (%rdi),%rdi
mov    (%rsi),%rsi
jmp    1030 <strcmp@plt>

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

LLVM IR (-O2):
define i32 @sortfunc(i8* nocapture %0, i8* nocapture %1) {
%3 = bitcast i8* %0 to i8**
%4 = load i8*, i8** %3
%5 = bitcast i8* %1 to i8**
%6 = load i8*, i8** %5
%7 = tail call i32 @strcmp(i8* dereferenceable(1) %4, i8* dereferenceable(1) %6)
ret i32 %7
}
void ff_hevc_put_hevc_uni_pel_pixels16_12_sse4() {}


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

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

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

LLVM IR (-O2):
define void @ff_hevc_put_hevc_uni_pel_pixels16_12_sse4() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
int /*<<< orphan*/ stderr;
void usage(void) {
  fprintf(stderr, "usage: lscpu [-h|--help]\n");
  exit(1);
}


x86 assembly (clang, -O0):
<usage>:
push   %rbp
mov    %rsp,%rbp
mov    0x2eb5(%rip),%rax
mov    (%rax),%edi
lea    0xecc(%rip),%rsi
call   1030 <fprintf@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

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

LLVM IR (-O0):
@stderr = global i32 0
@.str = [26 x i8] c"usage: lscpu [-h|--help]\0A\00"
define void @usage() {
%1 = load i32, i32* @stderr
%2 = call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str, i64 0, i64 0))
%3 = call i32 @exit(i32 1)
unreachable
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [26 x i8] c"usage: lscpu [-h|--help]\0A\00"
define void @usage() {
%1 = load i32, i32* @stderr
%2 = tail call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str, i64 0, i64 0))
%3 = tail call i32 @exit(i32 1)
unreachable
}
void _M2_bounce2_finish(__attribute__((unused)) int argc,
                        __attribute__((unused)) char *argv[]) {}


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

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

LLVM IR (-O0):
define void @_M2_bounce2_finish(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 @_M2_bounce2_finish(i32 %0, i8** nocapture %1) {
ret void
}
char *strcpy(char *str1, const char *str2) {
  register char *p1 = str1;
  register const char *p2 = str2;
  while ((*p1++ = *p2++))
    ;
  *p1 = '\0';
  return str1;
}


x86 assembly (clang, -O0):
<strcpy>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x20(%rbp)
mov    -0x20(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x20(%rbp)
mov    (%rax),%al
mov    -0x18(%rbp),%rcx
mov    %rcx,%rdx
add    $0x1,%rdx
mov    %rdx,-0x18(%rbp)
mov    %al,(%rcx)
cmp    $0x0,%al
je     114b <strcpy+0x4b>
jmp    111c <strcpy+0x1c>
mov    -0x18(%rbp),%rax
movb   $0x0,(%rax)
mov    -0x8(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<strcpy>:
mov    %rdi,%rax
xor    %ecx,%ecx
cs nopw 0x0(%rax,%rax,1)
nop
movzbl (%rsi,%rcx,1),%edx
mov    %dl,(%rax,%rcx,1)
add    $0x1,%rcx
test   %dl,%dl
jne    1110 <strcpy+0x10>
movb   $0x0,(%rax,%rcx,1)
ret

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

LLVM IR (-O2):
define i8* @strcpy(i8* returned writeonly %0, i8* nocapture %1) {
br label %3
3: ; preds = %3, %2
%4 = phi i8* [ %0, %2 ], [ %8, %3 ]
%5 = phi i8* [ %1, %2 ], [ %6, %3 ]
%6 = getelementptr inbounds i8, i8* %5, i64 1
%7 = load i8, i8* %5
%8 = getelementptr inbounds i8, i8* %4, i64 1
store i8 %7, i8* %4
%9 = icmp eq i8 %7, 0
br i1 %9, label %10, label %3
10: ; preds = %3
store i8 0, i8* %8
ret i8* %0
}
int test_imm_B5uint32_mem(unsigned int *val) {
  return ((*val) & (0xB5 << 0)) ? -20 : -40;
}


x86 assembly (clang, -O0):
<test_imm_B5uint32_mem>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%edx
and    $0xb5,%edx
mov    $0xffffffd8,%eax
mov    $0xffffffec,%ecx
cmp    $0x0,%edx
cmovne %ecx,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @test_imm_B5uint32_mem(i32* %0) {
%2 = alloca i32*
store i32* %0, i32** %2
%3 = load i32*, i32** %2
%4 = load i32, i32* %3
%5 = and i32 %4, 181
%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_B5uint32_mem(i32* nocapture %0) {
%2 = load i32, i32* %0
%3 = and i32 %2, 181
%4 = icmp eq i32 %3, 0
%5 = select i1 %4, i32 -40, i32 -20
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
main() {
  printf("Hello from vforked-prog...\n");
  return 0;
}


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

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

LLVM IR (-O0):
@.str = [28 x i8] c"Hello from vforked-prog...\0A\00"
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 @printf(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@str = [27 x i8] c"Hello from vforked-prog...\00"
define i32 @main() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([27 x i8], [27 x i8]* @str, i64 0, i64 0))
ret i32 0
}
/* Type definitions */
struct Cyc_Absyn_Exp {
  int dummy;
};

/* Variables and functions */
struct Cyc_Absyn_Exp *Cyc_Absyn_prim2_exp(unsigned int, struct Cyc_Absyn_Exp *,
                                          struct Cyc_Absyn_Exp *, unsigned int);
struct Cyc_Absyn_Exp *Cyc_Absyn_divide_exp(struct Cyc_Absyn_Exp *e1,
                                           struct Cyc_Absyn_Exp *e2,
                                           unsigned loc) {
  struct Cyc_Absyn_Exp *_T0;
  _T0 = Cyc_Absyn_prim2_exp(3U, e1, e2, loc);
  return _T0;
}


x86 assembly (clang, -O0):
<Cyc_Absyn_divide_exp>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    -0x8(%rbp),%rsi
mov    -0x10(%rbp),%rdx
mov    -0x14(%rbp),%ecx
mov    $0x3,%edi
call   1030 <Cyc_Absyn_prim2_exp@plt>
mov    %rax,-0x20(%rbp)
mov    -0x20(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Cyc_Absyn_divide_exp>:
mov    %edx,%ecx
mov    %rsi,%rdx
mov    %rdi,%rsi
mov    $0x3,%edi
jmp    1030 <Cyc_Absyn_prim2_exp@plt>

LLVM IR (-O0):
%struct.Cyc_Absyn_Exp = type { i32 }
define %struct.Cyc_Absyn_Exp* @Cyc_Absyn_divide_exp(%struct.Cyc_Absyn_Exp* %0, %struct.Cyc_Absyn_Exp* %1, i32 %2) {
%4 = alloca %struct.Cyc_Absyn_Exp*
%5 = alloca %struct.Cyc_Absyn_Exp*
%6 = alloca i32
%7 = alloca %struct.Cyc_Absyn_Exp*
store %struct.Cyc_Absyn_Exp* %0, %struct.Cyc_Absyn_Exp** %4
store %struct.Cyc_Absyn_Exp* %1, %struct.Cyc_Absyn_Exp** %5
store i32 %2, i32* %6
%8 = load %struct.Cyc_Absyn_Exp*, %struct.Cyc_Absyn_Exp** %4
%9 = load %struct.Cyc_Absyn_Exp*, %struct.Cyc_Absyn_Exp** %5
%10 = load i32, i32* %6
%11 = call %struct.Cyc_Absyn_Exp* @Cyc_Absyn_prim2_exp(i32 3, %struct.Cyc_Absyn_Exp* %8, %struct.Cyc_Absyn_Exp* %9, i32 %10)
store %struct.Cyc_Absyn_Exp* %11, %struct.Cyc_Absyn_Exp** %7
%12 = load %struct.Cyc_Absyn_Exp*, %struct.Cyc_Absyn_Exp** %7
ret %struct.Cyc_Absyn_Exp* %12
}

LLVM IR (-O2):
%struct.Cyc_Absyn_Exp = type { i32 }
define %struct.Cyc_Absyn_Exp* @Cyc_Absyn_divide_exp(%struct.Cyc_Absyn_Exp* %0, %struct.Cyc_Absyn_Exp* %1, i32 %2) {
%4 = tail call %struct.Cyc_Absyn_Exp* @Cyc_Absyn_prim2_exp(i32 3, %struct.Cyc_Absyn_Exp* %0, %struct.Cyc_Absyn_Exp* %1, i32 %2)
ret %struct.Cyc_Absyn_Exp* %4
}
/* Variables and functions */
int /*<<< orphan*/ platform_inw(unsigned long);
void __insw(unsigned long port, void *dst, unsigned long count) {
  unsigned short *dp = dst;
  while (count--)
    *dp++ = platform_inw(port);
}


x86 assembly (clang, -O0):
<__insw>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x20(%rbp)
mov    -0x18(%rbp),%rax
mov    %rax,%rcx
add    $0xffffffffffffffff,%rcx
mov    %rcx,-0x18(%rbp)
cmp    $0x0,%rax
je     1168 <__insw+0x58>
mov    -0x8(%rbp),%rdi
call   1030 <platform_inw@plt>
mov    %ax,%cx
mov    -0x20(%rbp),%rax
mov    %rax,%rdx
add    $0x2,%rdx
mov    %rdx,-0x20(%rbp)
mov    %cx,(%rax)
jmp    112c <__insw+0x1c>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<__insw>:
push   %r15
push   %r14
push   %r12
push   %rbx
push   %rax
test   %rdx,%rdx
je     1146 <__insw+0x36>
mov    %rdx,%r12
mov    %rsi,%r14
mov    %rdi,%r15
xor    %ebx,%ebx
nopl   0x0(%rax,%rax,1)
mov    %r15,%rdi
call   1030 <platform_inw@plt>
mov    %ax,(%r14,%rbx,2)
add    $0x1,%rbx
cmp    %rbx,%r12
jne    1130 <__insw+0x20>
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
ret

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

LLVM IR (-O2):
define void @__insw(i64 %0, i8* nocapture writeonly %1, i64 %2) {
%4 = icmp eq i64 %2, 0
br i1 %4, label %15, label %5
5: ; preds = %3
%6 = bitcast i8* %1 to i16*
br label %7
7: ; preds = %5, %7
%8 = phi i16* [ %13, %7 ], [ %6, %5 ]
%9 = phi i64 [ %10, %7 ], [ %2, %5 ]
%10 = add i64 %9, -1
%11 = tail call i32 @platform_inw(i64 %0)
%12 = trunc i32 %11 to i16
%13 = getelementptr inbounds i16, i16* %8, i64 1
store i16 %12, i16* %8
%14 = icmp eq i64 %10, 0
br i1 %14, label %15, label %7
15: ; preds = %7, %3
ret void
}
/* Variables and functions */
scalar_t__ __is_local(unsigned long);
int /*<<< orphan*/ __local_outb(unsigned char, unsigned long);
int /*<<< orphan*/ __outb(unsigned char, unsigned long);
extern void outb(unsigned char b, unsigned long addr) {
  if (__is_local(addr))
    __local_outb(b, addr);
  else
    __outb(b, addr);
}


x86 assembly (clang, -O0):
<outb>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %dil,%al
mov    %al,-0x1(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
call   1050 <__is_local@plt>
cmp    $0x0,%rax
je     1169 <outb+0x39>
mov    -0x1(%rbp),%al
mov    -0x10(%rbp),%rsi
movzbl %al,%edi
call   1030 <__local_outb@plt>
jmp    1178 <outb+0x48>
mov    -0x1(%rbp),%al
mov    -0x10(%rbp),%rsi
movzbl %al,%edi
call   1040 <__outb@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<outb>:
push   %rbp
push   %rbx
push   %rax
mov    %rsi,%rbx
mov    %edi,%ebp
mov    %rsi,%rdi
call   1050 <__is_local@plt>
movzbl %bpl,%edi
mov    %rbx,%rsi
add    $0x8,%rsp
test   %rax,%rax
je     1157 <outb+0x27>
pop    %rbx
pop    %rbp
jmp    1030 <__local_outb@plt>
pop    %rbx
pop    %rbp
jmp    1040 <__outb@plt>

LLVM IR (-O0):
define void @outb(i8 zeroext %0, i64 %1) {
%3 = alloca i8
%4 = alloca i64
store i8 %0, i8* %3
store i64 %1, i64* %4
%5 = load i64, i64* %4
%6 = call i64 @__is_local(i64 %5)
%7 = icmp ne i64 %6, 0
br i1 %7, label %8, label %12
8: ; preds = %2
%9 = load i8, i8* %3
%10 = load i64, i64* %4
%11 = call i32 @__local_outb(i8 zeroext %9, i64 %10)
br label %16
12: ; preds = %2
%13 = load i8, i8* %3
%14 = load i64, i64* %4
%15 = call i32 @__outb(i8 zeroext %13, i64 %14)
br label %16
16: ; preds = %12, %8
ret void
}

LLVM IR (-O2):
define void @outb(i8 zeroext %0, i64 %1) {
%3 = tail call i64 @__is_local(i64 %1)
%4 = icmp eq i64 %3, 0
br i1 %4, label %7, label %5
5: ; preds = %2
%6 = tail call i32 @__local_outb(i8 zeroext %0, i64 %1)
br label %9
7: ; preds = %2
%8 = tail call i32 @__outb(i8 zeroext %0, i64 %1)
br label %9
9: ; preds = %7, %5
ret void
}
/* Variables and functions */
int is_valid_in_NestedParty(size_t __tag) {
  switch (__tag) {
  case 524:
  case 525:
  case 538:
    return 1;
  default:
    return 0;
  }
}


x86 assembly (clang, -O0):
<is_valid_in_NestedParty>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x18(%rbp)
add    $0xfffffffffffffdf4,%rax
sub    $0x2,%rax
jb     113a <is_valid_in_NestedParty+0x3a>
jmp    1125 <is_valid_in_NestedParty+0x25>
mov    -0x18(%rbp),%rax
sub    $0x21a,%rax
jne    1146 <is_valid_in_NestedParty+0x46>
jmp    113a <is_valid_in_NestedParty+0x3a>
movl   $0x1,-0x4(%rbp)
jmp    114d <is_valid_in_NestedParty+0x4d>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<is_valid_in_NestedParty>:
add    $0xfffffffffffffdf4,%rdi
cmp    $0xe,%rdi
ja     111e <is_valid_in_NestedParty+0x1e>
mov    $0x1,%eax
mov    $0x4003,%ecx
bt     %rdi,%rcx
jae    111e <is_valid_in_NestedParty+0x1e>
ret
xor    %eax,%eax
ret

LLVM IR (-O0):
define i32 @is_valid_in_NestedParty(i64 %0) {
%2 = alloca i32
%3 = alloca i64
store i64 %0, i64* %3
%4 = load i64, i64* %3
switch i64 %4, label %6 [
i64 524, label %5
i64 525, label %5
i64 538, label %5
]
5: ; preds = %1, %1, %1
store i32 1, i32* %2
br label %7
6: ; preds = %1
store i32 0, i32* %2
br label %7
7: ; preds = %6, %5
%8 = load i32, i32* %2
ret i32 %8
}

LLVM IR (-O2):
define i32 @is_valid_in_NestedParty(i64 %0) {
switch i64 %0, label %2 [
i64 524, label %3
i64 525, label %3
i64 538, label %3
]
2: ; preds = %1
br label %3
3: ; preds = %1, %1, %1, %2
%4 = phi i32 [ 0, %2 ], [ 1, %1 ], [ 1, %1 ], [ 1, %1 ]
ret i32 %4
}
/* Variables and functions */
size_t bnode_get_value(size_t value) { return ((value) >> 1); }


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

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

LLVM IR (-O0):
define i64 @bnode_get_value(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = load i64, i64* %2
%4 = lshr i64 %3, 1
ret i64 %4
}

LLVM IR (-O2):
define i64 @bnode_get_value(i64 %0) {
%2 = lshr i64 %0, 1
ret i64 %2
}
/* Variables and functions */
long double fabs(double);
int FPEqual(double d1, double d2) { return fabs(d1 - d2) < 0.000001L; }


x86 assembly (clang, -O0):
<FPEqual>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  -0x8(%rbp),%xmm0
movsd  -0x10(%rbp),%xmm1
subsd  %xmm1,%xmm0
call   1030 <fabs@plt>
fldt   0xec5(%rip)
fucomip %st(1),%st
fstp   %st(0)
seta   %al
and    $0x1,%al
movzbl %al,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<FPEqual>:
push   %rax
subsd  %xmm1,%xmm0
call   1030 <fabs@plt>
fldt   0xee0(%rip)
xor    %eax,%eax
fucomip %st(1),%st
fstp   %st(0)
seta   %al
pop    %rcx
ret

LLVM IR (-O0):
define i32 @FPEqual(double %0, double %1) {
%3 = alloca double
%4 = alloca double
store double %0, double* %3
store double %1, double* %4
%5 = load double, double* %3
%6 = load double, double* %4
%7 = fsub double %5, %6
%8 = call x86_fp80 @fabs(double %7)
%9 = fcmp olt x86_fp80 %8, 0xK3FEB8637BD05AF6C69B6
%10 = zext i1 %9 to i32
ret i32 %10
}

LLVM IR (-O2):
define i32 @FPEqual(double %0, double %1) {
%3 = fsub double %0, %1
%4 = tail call x86_fp80 @fabs(double %3)
%5 = fcmp olt x86_fp80 %4, 0xK3FEB8637BD05AF6C69B6
%6 = zext i1 %5 to i32
ret i32 %6
}
/* Variables and functions */
void *worker(void *arg) { return NULL; }


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

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

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

LLVM IR (-O2):
define noalias i8* @worker(i8* nocapture readnone %0) {
ret i8* null
}
double function(double x) { return x * x - 5 * x; }


x86 assembly (clang, -O0):
<function>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
movsd  -0x8(%rbp),%xmm2
movsd  0xee5(%rip),%xmm1
mulsd  -0x8(%rbp),%xmm1
movq   %xmm1,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<function>:
movsd  0xef8(%rip),%xmm1
mulsd  %xmm0,%xmm1
mulsd  %xmm0,%xmm0
addsd  %xmm1,%xmm0
ret

LLVM IR (-O0):
define double @function(double %0) {
%2 = alloca double
store double %0, double* %2
%3 = load double, double* %2
%4 = load double, double* %2
%5 = load double, double* %2
%6 = fmul double 5.000000e+00, %5
%7 = fneg double %6
%8 = call double @llvm.fmuladd.f64(double %3, double %4, double %7)
ret double %8
}

LLVM IR (-O2):
define double @function(double %0) {
%2 = fmul double %0, -5.000000e+00
%3 = tail call double @llvm.fmuladd.f64(double %0, double %0, double %2)
ret double %3
}
/* Variables and functions */
int /*<<< orphan*/ __lgammaf_r(float, int *);
float exp(int /*<<< orphan*/);
float tgammaf(float x) {
  int sign;
  float y;
  y = exp(__lgammaf_r(x, &sign));
  if (sign < 0)
    y = -y;
  return y;
}


x86 assembly (clang, -O0):
<tgammaf>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movss  %xmm0,-0x4(%rbp)
movss  -0x4(%rbp),%xmm0
lea    -0x8(%rbp),%rdi
call   1040 <__lgammaf_r@plt>
mov    %eax,%edi
call   1030 <exp@plt>
movss  %xmm0,-0xc(%rbp)
cmpl   $0x0,-0x8(%rbp)
jge    1168 <tgammaf+0x48>
movss  -0xc(%rbp),%xmm0
movd   %xmm0,%eax
xor    $0x80000000,%eax
movd   %eax,%xmm0
movss  %xmm0,-0xc(%rbp)
movss  -0xc(%rbp),%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<tgammaf>:
push   %rax
lea    0x4(%rsp),%rdi
call   1040 <__lgammaf_r@plt>
mov    %eax,%edi
call   1030 <exp@plt>
cmpl   $0x0,0x4(%rsp)
jns    1140 <tgammaf+0x20>
xorps  0xec0(%rip),%xmm0
pop    %rax
ret

LLVM IR (-O0):
define float @tgammaf(float %0) {
%2 = alloca float
%3 = alloca i32
%4 = alloca float
store float %0, float* %2
%5 = load float, float* %2
%6 = call i32 @__lgammaf_r(float %5, i32* %3)
%7 = call float @exp(i32 %6)
store float %7, float* %4
%8 = load i32, i32* %3
%9 = icmp slt i32 %8, 0
br i1 %9, label %10, label %13
10: ; preds = %1
%11 = load float, float* %4
%12 = fneg float %11
store float %12, float* %4
br label %13
13: ; preds = %10, %1
%14 = load float, float* %4
ret float %14
}

LLVM IR (-O2):
define float @tgammaf(float %0) {
%2 = alloca i32
%3 = bitcast i32* %2 to i8*
%4 = call i32 @__lgammaf_r(float %0, i32* %2)
%5 = call float @exp(i32 %4)
%6 = load i32, i32* %2
%7 = icmp slt i32 %6, 0
%8 = fneg float %5
%9 = select i1 %7, float %8, float %5
ret float %9
}
/* Variables and functions */
int /*<<< orphan*/ sleep(int);
int /*<<< orphan*/ stack_overflow_test();
int main() {
  stack_overflow_test();
  sleep(1);
  return 0;
}


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

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1030 <stack_overflow_test@plt>
mov    $0x1,%edi
call   1040 <sleep@plt>
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @stack_overflow_test()
%2 = tail call i32 @sleep(i32 1)
ret i32 0
}
/* Type definitions */
struct fs_dir {
  int dummy;
};
typedef int /*<<< orphan*/ off_t;

/* Variables and functions */
off_t fs_http_telldir(struct fs_dir *d) { return 0; }


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

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

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

LLVM IR (-O2):
%struct.fs_dir = type { i32 }
define i32 @fs_http_telldir(%struct.fs_dir* nocapture readnone %0) {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
int /*<<< orphan*/ stderr;
void printUsageAndDie() {
  fprintf(stderr, "Usage: moveperl [-l] [-a] [-s <srcdir>] [-r <libsuffix>] "
                  "<fromdir> <todir>\n");
  exit(1);
}


x86 assembly (clang, -O0):
<printUsageAndDie>:
push   %rbp
mov    %rsp,%rbp
mov    0x2eb5(%rip),%rax
mov    (%rax),%edi
lea    0xecc(%rip),%rsi
call   1030 <fprintf@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

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

LLVM IR (-O0):
@stderr = global i32 0
@.str = [76 x i8] c"Usage: moveperl [-l] [-a] [-s <srcdir>] [-r <libsuffix>] <fromdir> <todir>\0A\00"
define void @printUsageAndDie() {
%1 = load i32, i32* @stderr
%2 = call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([76 x i8], [76 x i8]* @.str, i64 0, i64 0))
%3 = call i32 @exit(i32 1)
unreachable
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [76 x i8] c"Usage: moveperl [-l] [-a] [-s <srcdir>] [-r <libsuffix>] <fromdir> <todir>\0A\00"
define void @printUsageAndDie() {
%1 = load i32, i32* @stderr
%2 = tail call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([76 x i8], [76 x i8]* @.str, i64 0, i64 0))
%3 = tail call i32 @exit(i32 1)
unreachable
}
void USBHwReset(void) {}


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

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

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

LLVM IR (-O2):
define void @USBHwReset() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int main();
void _reset() {
  int i = main();
  exit(i);
}


x86 assembly (clang, -O0):
<_reset>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1030 <main@plt>
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<_reset>:
push   %rax
xor    %eax,%eax
call   1030 <main@plt>
mov    %eax,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
define void @_reset() {
%1 = alloca i32
%2 = call i32 (...) @main()
store i32 %2, i32* %1
%3 = load i32, i32* %1
%4 = call i32 @exit(i32 %3)
unreachable
}

LLVM IR (-O2):
define void @_reset() {
%1 = tail call i32 (...) @main()
%2 = tail call i32 @exit(i32 %1)
unreachable
}
void test() {
#pragma omp parallel
  ;
}


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

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

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

LLVM IR (-O2):
define void @test() {
ret void
}
/* Variables and functions */
int getsysctl(char *);
int getopenfiles(void) { return (getsysctl("kern.openfiles")); }


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

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

LLVM IR (-O0):
@.str = [15 x i8] c"kern.openfiles\00"
define i32 @getopenfiles() {
%1 = call i32 @getsysctl(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0))
ret i32 %1
}

LLVM IR (-O2):
@.str = [15 x i8] c"kern.openfiles\00"
define i32 @getopenfiles() {
%1 = tail call i32 @getsysctl(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0))
ret i32 %1
}
/* Variables and functions */
char *U_WMRCORENONE_set(char *);
char *U_WMR55_set(void) { return U_WMRCORENONE_set("U_WMR55"); }


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

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

LLVM IR (-O0):
@.str = [8 x i8] c"U_WMR55\00"
define i8* @U_WMR55_set() {
%1 = call i8* @U_WMRCORENONE_set(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0))
ret i8* %1
}

LLVM IR (-O2):
@.str = [8 x i8] c"U_WMR55\00"
define i8* @U_WMR55_set() {
%1 = tail call i8* @U_WMRCORENONE_set(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0))
ret i8* %1
}
/* Variables and functions */
int imin(int, int);
int imina(int a[], int length) {
  int min = a[0];
  int i;
  for (i = 0; i < length; i++) {
    min = imin(min, a[i]);
  }
  return min;
}


x86 assembly (clang, -O0):
<imina>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%eax
mov    %eax,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
mov    -0x14(%rbp),%eax
cmp    -0xc(%rbp),%eax
jge    115f <imina+0x4f>
mov    -0x10(%rbp),%edi
mov    -0x8(%rbp),%rax
movslq -0x14(%rbp),%rcx
mov    (%rax,%rcx,4),%esi
call   1030 <imin@plt>
mov    %eax,-0x10(%rbp)
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    112f <imina+0x1f>
mov    -0x10(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<imina>:
push   %rbp
push   %r14
push   %rbx
mov    (%rdi),%eax
test   %esi,%esi
jle    1154 <imina+0x44>
mov    %esi,%ebp
mov    %rdi,%r14
mov    %eax,%edi
mov    %eax,%esi
call   1030 <imin@plt>
cmp    $0x1,%ebp
je     1154 <imina+0x44>
mov    %ebp,%ebp
mov    $0x1,%ebx
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
mov    (%r14,%rbx,4),%esi
mov    %eax,%edi
call   1030 <imin@plt>
add    $0x1,%rbx
cmp    %rbx,%rbp
jne    1140 <imina+0x30>
pop    %rbx
pop    %r14
pop    %rbp
ret

LLVM IR (-O0):
define i32 @imina(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 = getelementptr inbounds i32, i32* %7, i64 0
%9 = load i32, i32* %8
store i32 %9, i32* %5
store i32 0, i32* %6
br label %10
10: ; preds = %22, %2
%11 = load i32, i32* %6
%12 = load i32, i32* %4
%13 = icmp slt i32 %11, %12
br i1 %13, label %14, label %25
14: ; preds = %10
%15 = load i32, i32* %5
%16 = load i32*, i32** %3
%17 = load i32, i32* %6
%18 = sext i32 %17 to i64
%19 = getelementptr inbounds i32, i32* %16, i64 %18
%20 = load i32, i32* %19
%21 = call i32 @imin(i32 %15, i32 %20)
store i32 %21, i32* %5
br label %22
22: ; preds = %14
%23 = load i32, i32* %6
%24 = add nsw i32 %23, 1
store i32 %24, i32* %6
br label %10
25: ; preds = %10
%26 = load i32, i32* %5
ret i32 %26
}

LLVM IR (-O2):
define i32 @imina(i32* nocapture %0, i32 %1) {
%3 = load i32, i32* %0
%4 = icmp sgt i32 %1, 0
br i1 %4, label %5, label %17
5: ; preds = %2
%6 = zext i32 %1 to i64
%7 = tail call i32 @imin(i32 %3, i32 %3)
%8 = icmp eq i32 %1, 1
br i1 %8, label %17, label %9
9: ; preds = %5, %9
%10 = phi i64 [ %15, %9 ], [ 1, %5 ]
%11 = phi i32 [ %14, %9 ], [ %7, %5 ]
%12 = getelementptr inbounds i32, i32* %0, i64 %10
%13 = load i32, i32* %12
%14 = tail call i32 @imin(i32 %11, i32 %13)
%15 = add nuw nsw i64 %10, 1
%16 = icmp eq i64 %15, %6
br i1 %16, label %17, label %9
17: ; preds = %9, %5, %2
%18 = phi i32 [ %3, %2 ], [ %7, %5 ], [ %14, %9 ]
ret i32 %18
}
void itoa(int n, char *s) {
  static int i = 0;
  if (n / 10) {
    itoa(n / 10, s);
  }
  s[i++] = n % 10 + '0';
  s[i] = '\0';
}


x86 assembly (clang, -O0):
<itoa>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x4(%rbp),%eax
mov    $0xa,%ecx
cltd
idiv   %ecx
cmp    $0x0,%eax
je     1149 <itoa+0x39>
mov    -0x4(%rbp),%eax
mov    $0xa,%ecx
cltd
idiv   %ecx
mov    %eax,%edi
mov    -0x10(%rbp),%rsi
call   1030 <itoa@plt>
mov    -0x4(%rbp),%eax
mov    $0xa,%ecx
cltd
idiv   %ecx
add    $0x30,%edx
mov    -0x10(%rbp),%rax
mov    0x2ecb(%rip),%ecx
mov    %ecx,%esi
add    $0x1,%esi
mov    %esi,0x2ec0(%rip)
movslq %ecx,%rcx
mov    %dl,(%rax,%rcx,1)
mov    -0x10(%rbp),%rax
movslq 0x2eaf(%rip),%rcx
movb   $0x0,(%rax,%rcx,1)
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<itoa>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%r14
lea    0x9(%rdi),%eax
movslq %edi,%rbx
cmp    $0x13,%eax
jb     113e <itoa+0x2e>
imul   $0x66666667,%rbx,%rdi
mov    %rdi,%rax
shr    $0x3f,%rax
sar    $0x22,%rdi
add    %eax,%edi
mov    %r14,%rsi
call   1030 <itoa@plt>
imul   $0x66666667,%rbx,%rax
mov    %rax,%rcx
shr    $0x3f,%rcx
shr    $0x22,%rax
add    %ecx,%eax
add    %eax,%eax
lea    (%rax,%rax,4),%eax
sub    %eax,%ebx
add    $0x30,%bl
movslq 0x2ec9(%rip),%rax
lea    0x1(%rax),%rcx
mov    %ecx,0x2ebf(%rip)
mov    %bl,(%r14,%rax,1)
movb   $0x0,0x1(%r14,%rax,1)
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@itoa.i = internal global i32 0
define void @itoa(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 = sdiv i32 %5, 10
%7 = icmp ne i32 %6, 0
br i1 %7, label %8, label %12
8: ; preds = %2
%9 = load i32, i32* %3
%10 = sdiv i32 %9, 10
%11 = load i8*, i8** %4
br label %12
12: ; preds = %8, %2
%13 = load i32, i32* %3
%14 = srem i32 %13, 10
%15 = add nsw i32 %14, 48
%16 = trunc i32 %15 to i8
%17 = load i8*, i8** %4
%18 = load i32, i32* @itoa.i
%19 = add nsw i32 %18, 1
store i32 %19, i32* @itoa.i
%20 = sext i32 %18 to i64
%21 = getelementptr inbounds i8, i8* %17, i64 %20
store i8 %16, i8* %21
%22 = load i8*, i8** %4
%23 = load i32, i32* @itoa.i
%24 = sext i32 %23 to i64
%25 = getelementptr inbounds i8, i8* %22, i64 %24
store i8 0, i8* %25
ret void
}

LLVM IR (-O2):
@itoa.i = internal unnamed_addr global i32 0
define void @itoa(i32 %0, i8* nocapture writeonly %1) {
%3 = add i32 %0, 9
%4 = icmp ult i32 %3, 19
br i1 %4, label %7, label %5
5: ; preds = %2
%6 = sdiv i32 %0, 10
tail call void @itoa(i32 %6, i8* %1)
br label %7
7: ; preds = %5, %2
%8 = srem i32 %0, 10
%9 = trunc i32 %8 to i8
%10 = add nsw i8 %9, 48
%11 = load i32, i32* @itoa.i
%12 = add nsw i32 %11, 1
store i32 %12, i32* @itoa.i
%13 = sext i32 %11 to i64
%14 = getelementptr inbounds i8, i8* %1, i64 %13
store i8 %10, i8* %14
%15 = sext i32 %12 to i64
%16 = getelementptr inbounds i8, i8* %1, i64 %15
store i8 0, i8* %16
ret void
}
/* Variables and functions */
void *memscan(const void *addr, int c, size_t size) {
  unsigned char *p = (unsigned char *)addr;
  while (size) {
    if (*p == c)
      return (void *)p;
    p++;
    size--;
  }
  return (void *)p;
}


x86 assembly (clang, -O0):
<memscan>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    %esi,-0x14(%rbp)
mov    %rdx,-0x20(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x28(%rbp)
cmpq   $0x0,-0x20(%rbp)
je     115c <memscan+0x5c>
mov    -0x28(%rbp),%rax
movzbl (%rax),%eax
cmp    -0x14(%rbp),%eax
jne    113f <memscan+0x3f>
mov    -0x28(%rbp),%rax
mov    %rax,-0x8(%rbp)
jmp    1164 <memscan+0x64>
mov    -0x28(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x28(%rbp)
mov    -0x20(%rbp),%rax
add    $0xffffffffffffffff,%rax
mov    %rax,-0x20(%rbp)
jmp    1117 <memscan+0x17>
mov    -0x28(%rbp),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<memscan>:
mov    %rdi,%rax
test   %rdx,%rdx
je     1124 <memscan+0x24>
lea    (%rax,%rdx,1),%rcx
nopl   0x0(%rax)
movzbl (%rax),%edi
cmp    %esi,%edi
je     1124 <memscan+0x24>
add    $0x1,%rax
add    $0xffffffffffffffff,%rdx
jne    1110 <memscan+0x10>
mov    %rcx,%rax
ret

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

LLVM IR (-O2):
define i8* @memscan(i8* %0, i32 %1, i64 %2) {
%4 = icmp eq i64 %2, 0
br i1 %4, label %17, label %5
5: ; preds = %3
%6 = getelementptr i8, i8* %0, i64 %2
br label %7
7: ; preds = %5, %13
%8 = phi i8* [ %14, %13 ], [ %0, %5 ]
%9 = phi i64 [ %15, %13 ], [ %2, %5 ]
%10 = load i8, i8* %8
%11 = zext i8 %10 to i32
%12 = icmp eq i32 %11, %1
br i1 %12, label %17, label %13
13: ; preds = %7
%14 = getelementptr inbounds i8, i8* %8, i64 1
%15 = add i64 %9, -1
%16 = icmp eq i64 %15, 0
br i1 %16, label %17, label %7
17: ; preds = %7, %13, %3
%18 = phi i8* [ %0, %3 ], [ %6, %13 ], [ %8, %7 ]
ret i8* %18
}
/* Type definitions */
struct dirent {
  int /*<<< orphan*/ d_name;
};

/* Variables and functions */
scalar_t__ strcmp(int /*<<< orphan*/, char *);
int _scan_filter_skip_dot(const struct dirent *dir) {
  return strcmp(dir->d_name, ".") && strcmp(dir->d_name, "..");
}


x86 assembly (clang, -O0):
<_scan_filter_skip_dot>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%edi
lea    0xed8(%rip),%rsi
call   1030 <strcmp@plt>
mov    %rax,%rcx
xor    %eax,%eax
cmp    $0x0,%rcx
mov    %al,-0x9(%rbp)
je     115c <_scan_filter_skip_dot+0x4c>
mov    -0x8(%rbp),%rax
mov    (%rax),%edi
lea    0xeb3(%rip),%rsi
call   1030 <strcmp@plt>
cmp    $0x0,%rax
setne  %al
mov    %al,-0x9(%rbp)
mov    -0x9(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<_scan_filter_skip_dot>:
push   %rbx
mov    %rdi,%rbx
mov    (%rdi),%edi
lea    0xee4(%rip),%rsi
call   1030 <strcmp@plt>
test   %rax,%rax
je     1142 <_scan_filter_skip_dot+0x32>
mov    (%rbx),%edi
lea    0xed0(%rip),%rsi
call   1030 <strcmp@plt>
mov    %rax,%rcx
xor    %eax,%eax
test   %rcx,%rcx
setne  %al
pop    %rbx
ret
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
%struct.dirent = type { i32 }
@.str = [2 x i8] c".\00"
@.str.1 = [3 x i8] c"..\00"
define i32 @_scan_filter_skip_dot(%struct.dirent* %0) {
%2 = alloca %struct.dirent*
store %struct.dirent* %0, %struct.dirent** %2
%3 = load %struct.dirent*, %struct.dirent** %2
%4 = getelementptr inbounds %struct.dirent, %struct.dirent* %3, i32 0, i32 0
%5 = load i32, i32* %4
%6 = call i64 @strcmp(i32 %5, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
%7 = icmp ne i64 %6, 0
br i1 %7, label %8, label %14
8: ; preds = %1
%9 = load %struct.dirent*, %struct.dirent** %2
%10 = getelementptr inbounds %struct.dirent, %struct.dirent* %9, i32 0, i32 0
%11 = load i32, i32* %10
%12 = call i64 @strcmp(i32 %11, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0))
%13 = icmp ne i64 %12, 0
br label %14
14: ; preds = %8, %1
%15 = phi i1 [ false, %1 ], [ %13, %8 ]
%16 = zext i1 %15 to i32
ret i32 %16
}

LLVM IR (-O2):
%struct.dirent = type { i32 }
@.str = [2 x i8] c".\00"
@.str.1 = [3 x i8] c"..\00"
define i32 @_scan_filter_skip_dot(%struct.dirent* nocapture %0) {
%2 = getelementptr inbounds %struct.dirent, %struct.dirent* %0, i64 0, i32 0
%3 = load i32, i32* %2
%4 = tail call i64 @strcmp(i32 %3, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
%5 = icmp eq i64 %4, 0
br i1 %5, label %11, label %6
6: ; preds = %1
%7 = load i32, i32* %2
%8 = tail call i64 @strcmp(i32 %7, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0))
%9 = icmp ne i64 %8, 0
%10 = zext i1 %9 to i32
br label %11
11: ; preds = %6, %1
%12 = phi i32 [ 0, %1 ], [ %10, %6 ]
ret i32 %12
}
/* Type definitions */
typedef int uint8_t;
typedef int uint16_t;

/* Variables and functions */
int wd76c10_read(int, void *);
uint8_t wd76c10_readb(uint16_t port, void *priv) {
  if (port & 1)
    return (wd76c10_read(port & ~1, priv) >> 8);
  return (wd76c10_read(port, priv) & 0xff);
}


x86 assembly (clang, -O0):
<wd76c10_readb>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%eax
and    $0x1,%eax
cmp    $0x0,%eax
je     1148 <wd76c10_readb+0x38>
mov    -0x8(%rbp),%edi
and    $0xfffffffe,%edi
mov    -0x10(%rbp),%rsi
call   1030 <wd76c10_read@plt>
sar    $0x8,%eax
mov    %eax,-0x4(%rbp)
jmp    115c <wd76c10_readb+0x4c>
mov    -0x8(%rbp),%edi
mov    -0x10(%rbp),%rsi
call   1030 <wd76c10_read@plt>
and    $0xff,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<wd76c10_readb>:
push   %rax
test   $0x1,%dil
jne    1121 <wd76c10_readb+0x11>
call   1030 <wd76c10_read@plt>
movzbl %al,%eax
pop    %rcx
ret
and    $0xfffffffe,%edi
call   1030 <wd76c10_read@plt>
sar    $0x8,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @wd76c10_readb(i32 %0, i8* %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8*
store i32 %0, i32* %4
store i8* %1, i8** %5
%6 = load i32, i32* %4
%7 = and i32 %6, 1
%8 = icmp ne i32 %7, 0
br i1 %8, label %9, label %15
9: ; preds = %2
%10 = load i32, i32* %4
%11 = and i32 %10, -2
%12 = load i8*, i8** %5
%13 = call i32 @wd76c10_read(i32 %11, i8* %12)
%14 = ashr i32 %13, 8
store i32 %14, i32* %3
br label %20
15: ; preds = %2
%16 = load i32, i32* %4
%17 = load i8*, i8** %5
%18 = call i32 @wd76c10_read(i32 %16, i8* %17)
%19 = and i32 %18, 255
store i32 %19, i32* %3
br label %20
20: ; preds = %15, %9
%21 = load i32, i32* %3
ret i32 %21
}

LLVM IR (-O2):
define i32 @wd76c10_readb(i32 %0, i8* %1) {
%3 = and i32 %0, 1
%4 = icmp eq i32 %3, 0
br i1 %4, label %9, label %5
5: ; preds = %2
%6 = and i32 %0, -2
%7 = tail call i32 @wd76c10_read(i32 %6, i8* %1)
%8 = ashr i32 %7, 8
br label %12
9: ; preds = %2
%10 = tail call i32 @wd76c10_read(i32 %0, i8* %1)
%11 = and i32 %10, 255
br label %12
12: ; preds = %9, %5
%13 = phi i32 [ %8, %5 ], [ %11, %9 ]
ret i32 %13
}