xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ die_bad_config(char const *);
int /*<<< orphan*/ perf_parse_long(char const *, long *);
int perf_config_int(const char *name, const char *value) {
  long ret = 0;
  if (!perf_parse_long(value, &ret))
    die_bad_config(name);
  return ret;
}


x86 assembly (clang, -O0):
<perf_config_int>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movq   $0x0,-0x18(%rbp)
mov    -0x10(%rbp),%rdi
lea    -0x18(%rbp),%rsi
call   1040 <perf_parse_long@plt>
cmp    $0x0,%eax
jne    1157 <perf_config_int+0x37>
mov    -0x8(%rbp),%rdi
call   1030 <die_bad_config@plt>
mov    -0x18(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<perf_config_int>:
push   %rbx
sub    $0x10,%rsp
mov    %rsi,%rax
mov    %rdi,%rbx
movq   $0x0,0x8(%rsp)
lea    0x8(%rsp),%rsi
mov    %rax,%rdi
call   1040 <perf_parse_long@plt>
test   %eax,%eax
jne    114d <perf_config_int+0x2d>
mov    %rbx,%rdi
call   1030 <die_bad_config@plt>
mov    0x8(%rsp),%eax
add    $0x10,%rsp
pop    %rbx
ret

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

LLVM IR (-O2):
define i32 @perf_config_int(i8* %0, i8* %1) {
%3 = alloca i64
%4 = bitcast i64* %3 to i8*
store i64 0, i64* %3
%5 = call i32 @perf_parse_long(i8* %1, i64* %3)
%6 = icmp eq i32 %5, 0
br i1 %6, label %7, label %9
7: ; preds = %2
%8 = call i32 @die_bad_config(i8* %0)
br label %9
9: ; preds = %7, %2
%10 = load i64, i64* %3
%11 = trunc i64 %10 to i32
ret i32 %11
}
/* Variables and functions */
void *calloc(size_t, size_t);
size_t element_length(char);
void *vector_alloc(long n, char type) {
  size_t el;
  el = element_length(type);
  return calloc((size_t)(n + 1), el);
}


x86 assembly (clang, -O0):
<vector_alloc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %sil,%al
mov    %rdi,-0x8(%rbp)
mov    %al,-0x9(%rbp)
movsbl -0x9(%rbp),%edi
call   1040 <element_length@plt>
mov    %rax,-0x18(%rbp)
mov    -0x8(%rbp),%rdi
add    $0x1,%rdi
mov    -0x18(%rbp),%rsi
call   1030 <calloc@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<vector_alloc>:
push   %rbx
mov    %rdi,%rbx
mov    %esi,%edi
call   1040 <element_length@plt>
add    $0x1,%rbx
mov    %rbx,%rdi
mov    %rax,%rsi
pop    %rbx
jmp    1030 <calloc@plt>

LLVM IR (-O0):
define i8* @vector_alloc(i64 %0, i8 signext %1) {
%3 = alloca i64
%4 = alloca i8
%5 = alloca i64
store i64 %0, i64* %3
store i8 %1, i8* %4
%6 = load i8, i8* %4
%7 = call i64 @element_length(i8 signext %6)
store i64 %7, i64* %5
%8 = load i64, i64* %3
%9 = add nsw i64 %8, 1
%10 = load i64, i64* %5
%11 = call i8* @calloc(i64 %9, i64 %10)
ret i8* %11
}

LLVM IR (-O2):
define noalias i8* @vector_alloc(i64 %0, i8 signext %1) {
%3 = tail call i64 @element_length(i8 signext %1)
%4 = add nsw i64 %0, 1
%5 = tail call i8* @calloc(i64 %4, i64 %3)
ret i8* %5
}
/* Type definitions */
typedef char *__m128i;

/* Variables and functions */
char *_mm_subs_epi16(char *, char *);
__m128i __attribute__((no, unused)) test(__m128i s1, __m128i s2) {
  __asm("" : "+v"(s1), "+v"(s2));
  return _mm_subs_epi16(s1, s2);
}


x86 assembly (clang, -O0):
<test>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rcx
mov    -0x10(%rbp),%rax
movq   %rcx,%xmm0
movq   %rax,%xmm1
movq   %xmm1,%rax
movq   %xmm0,%rcx
mov    %rcx,-0x8(%rbp)
mov    %rax,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1030 <_mm_subs_epi16@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test>:
movq   %rdi,%xmm0
movq   %rsi,%xmm1
movq   %xmm0,%rdi
movq   %xmm1,%rsi
jmp    1030 <_mm_subs_epi16@plt>

LLVM IR (-O0):
define i8* @test(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
store i8* %0, i8** %3
store i8* %1, i8** %4
%5 = load i8*, i8** %3
%6 = load i8*, i8** %4
%7 = call { i8*, i8* } asm "", "=v,=v,0,1,~{dirflag},~{fpsr},~{flags}"(i8* %5, i8* %6)
%8 = extractvalue { i8*, i8* } %7, 0
%9 = extractvalue { i8*, i8* } %7, 1
store i8* %8, i8** %3
store i8* %9, i8** %4
%10 = load i8*, i8** %3
%11 = load i8*, i8** %4
%12 = call i8* @_mm_subs_epi16(i8* %10, i8* %11)
ret i8* %12
}

LLVM IR (-O2):
define i8* @test(i8* %0, i8* %1) {
%3 = tail call { i8*, i8* } asm "", "=v,=v,0,1,~{dirflag},~{fpsr},~{flags}"(i8* %0, i8* %1)
%4 = extractvalue { i8*, i8* } %3, 0
%5 = extractvalue { i8*, i8* } %3, 1
%6 = tail call i8* @_mm_subs_epi16(i8* %4, i8* %5)
ret i8* %6
}
int is_dashdash(const char *arg) {
  return arg != 0 && arg[0] == '-' && arg[1] == '-' && arg[2] == '\0';
}


x86 assembly (clang, -O0):
<is_dashdash>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
xor    %eax,%eax
cmpq   $0x0,-0x8(%rbp)
mov    %al,-0x9(%rbp)
je     1154 <is_dashdash+0x54>
mov    -0x8(%rbp),%rax
movsbl (%rax),%ecx
xor    %eax,%eax
cmp    $0x2d,%ecx
mov    %al,-0x9(%rbp)
jne    1154 <is_dashdash+0x54>
mov    -0x8(%rbp),%rax
movsbl 0x1(%rax),%ecx
xor    %eax,%eax
cmp    $0x2d,%ecx
mov    %al,-0x9(%rbp)
jne    1154 <is_dashdash+0x54>
mov    -0x8(%rbp),%rax
movsbl 0x2(%rax),%eax
cmp    $0x0,%eax
sete   %al
mov    %al,-0x9(%rbp)
mov    -0x9(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<is_dashdash>:
xor    %eax,%eax
test   %rdi,%rdi
je     111b <is_dashdash+0x1b>
cmpb   $0x2d,(%rdi)
jne    111b <is_dashdash+0x1b>
cmpb   $0x2d,0x1(%rdi)
jne    111b <is_dashdash+0x1b>
xor    %eax,%eax
cmpb   $0x0,0x2(%rdi)
sete   %al
ret

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

LLVM IR (-O2):
define i32 @is_dashdash(i8* %0) {
%2 = icmp eq i8* %0, null
br i1 %2, label %15, label %3
3: ; preds = %1
%4 = load i8, i8* %0
%5 = icmp eq i8 %4, 45
br i1 %5, label %6, label %15
6: ; preds = %3
%7 = getelementptr inbounds i8, i8* %0, i64 1
%8 = load i8, i8* %7
%9 = icmp eq i8 %8, 45
br i1 %9, label %10, label %15
10: ; preds = %6
%11 = getelementptr inbounds i8, i8* %0, i64 2
%12 = load i8, i8* %11
%13 = icmp eq i8 %12, 0
%14 = zext i1 %13 to i32
br label %15
15: ; preds = %10, %6, %3, %1
%16 = phi i32 [ 0, %6 ], [ 0, %3 ], [ 0, %1 ], [ %14, %10 ]
ret i32 %16
}
/* Variables and functions */
int _ada_use_c2phc(int, int *, int *, double *, int /*<<< orphan*/);
int copy_quaddobl_container_to_start_solutions(void) {
  int *a, *b, fail;
  double *c;
  fail = _ada_use_c2phc(268, a, b, c, 0);
  return fail;
}


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

x86 assembly (clang, -O2):
<copy_quaddobl_container_to_start_solutions>:
mov    $0x10c,%edi
xor    %r8d,%r8d
jmp    1030 <_ada_use_c2phc@plt>

LLVM IR (-O0):
define i32 @copy_quaddobl_container_to_start_solutions() {
%1 = alloca i32*
%2 = alloca i32*
%3 = alloca i32
%4 = alloca double*
%5 = load i32*, i32** %1
%6 = load i32*, i32** %2
%7 = load double*, double** %4
%8 = call i32 @_ada_use_c2phc(i32 268, i32* %5, i32* %6, double* %7, i32 0)
store i32 %8, i32* %3
%9 = load i32, i32* %3
ret i32 %9
}

LLVM IR (-O2):
define i32 @copy_quaddobl_container_to_start_solutions() {
%1 = tail call i32 @_ada_use_c2phc(i32 268, i32* undef, i32* undef, double* undef, i32 0)
ret i32 %1
}
/* Type definitions */
typedef int /*<<< orphan*/ const uint8_t;

/* Variables and functions */
uint8_t hci_event_hardware_error_get_hardware_code(const uint8_t *event) {
  return event[2];
}


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

x86 assembly (clang, -O2):
<hci_event_hardware_error_get_hardware_code>:
mov    0x8(%rdi),%eax
ret

LLVM IR (-O0):
define i32 @hci_event_hardware_error_get_hardware_code(i32* %0) {
%2 = alloca i32*
store i32* %0, i32** %2
%3 = load i32*, i32** %2
%4 = getelementptr inbounds i32, i32* %3, i64 2
%5 = load i32, i32* %4
ret i32 %5
}

LLVM IR (-O2):
define i32 @hci_event_hardware_error_get_hardware_code(i32* nocapture %0) {
%2 = getelementptr inbounds i32, i32* %0, i64 2
%3 = load i32, i32* %2
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int main() {
  int x = 0;
  if (x) {
    printf("x is true\n");
  } else {
    printf("x is not true\n");
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
cmpl   $0x0,-0x8(%rbp)
je     1141 <main+0x31>
lea    0xec9(%rip),%rdi
call   1030 <printf@plt>
jmp    114d <main+0x3d>
lea    0xec3(%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 = [11 x i8] c"x is true\0A\00"
@.str.1 = [15 x i8] c"x is not true\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
store i32 0, i32* %1
store i32 0, i32* %2
%3 = load i32, i32* %2
%4 = icmp ne i32 %3, 0
br i1 %4, label %5, label %7
5: ; preds = %0
%6 = call i32 @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0))
br label %9
7: ; preds = %0
%8 = call i32 @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.1, i64 0, i64 0))
br label %9
9: ; preds = %7, %5
ret i32 0
}

LLVM IR (-O2):
@str = [14 x i8] c"x is not true\00"
define i32 @main() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([14 x i8], [14 x i8]* @str, i64 0, i64 0))
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int main(void) {
  printf("MBEDTLS_BIGNUM_C and/or MBEDTLS_RSA_C and/or "
         "MBEDTLS_FS_IO and/or MBEDTLS_ENTROPY_C and/or "
         "MBEDTLS_CTR_DRBG_C not defined.\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 = [124 x i8] c"MBEDTLS_BIGNUM_C and/or MBEDTLS_RSA_C and/or MBEDTLS_FS_IO and/or MBEDTLS_ENTROPY_C and/or MBEDTLS_CTR_DRBG_C not defined.\0A\00"
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 @printf(i8* getelementptr inbounds ([124 x i8], [124 x i8]* @.str, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@str = [123 x i8] c"MBEDTLS_BIGNUM_C and/or MBEDTLS_RSA_C and/or MBEDTLS_FS_IO and/or MBEDTLS_ENTROPY_C and/or MBEDTLS_CTR_DRBG_C not defined.\00"
define i32 @main() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([123 x i8], [123 x i8]* @str, i64 0, i64 0))
ret i32 0
}
int close_direct(void) { return (0); }


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

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

LLVM IR (-O0):
define i32 @close_direct() {
ret i32 0
}

LLVM IR (-O2):
define i32 @close_direct() {
ret i32 0
}
/* Variables and functions */
int getlasterror();
int getlastsocketerror(int s) { return getlasterror(); }


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

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

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

LLVM IR (-O2):
define i32 @getlastsocketerror(i32 %0) {
%2 = tail call i32 (...) @getlasterror()
ret i32 %2
}
/* Variables and functions */
int /*<<< orphan*/ test_anonymous_aligned_wide();
int /*<<< orphan*/ test_anonymous_narrow();
int /*<<< orphan*/ test_named_bitfield();
int /*<<< orphan*/ test_union();
int /*<<< orphan*/ test_with_pointers();
int main(void) {
  test_anonymous_narrow();
  test_anonymous_aligned_wide();
  test_named_bitfield();
  test_union();
  test_with_pointers();
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1050 <test_anonymous_narrow@plt>
mov    $0x0,%al
call   1030 <test_anonymous_aligned_wide@plt>
mov    $0x0,%al
call   1070 <test_named_bitfield@plt>
mov    $0x0,%al
call   1060 <test_union@plt>
mov    $0x0,%al
call   1040 <test_with_pointers@plt>
xor    %eax,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1050 <test_anonymous_narrow@plt>
xor    %eax,%eax
call   1030 <test_anonymous_aligned_wide@plt>
xor    %eax,%eax
call   1070 <test_named_bitfield@plt>
xor    %eax,%eax
call   1060 <test_union@plt>
xor    %eax,%eax
call   1040 <test_with_pointers@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @main() {
%1 = call i32 (...) @test_anonymous_narrow()
%2 = call i32 (...) @test_anonymous_aligned_wide()
%3 = call i32 (...) @test_named_bitfield()
%4 = call i32 (...) @test_union()
%5 = call i32 (...) @test_with_pointers()
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @test_anonymous_narrow()
%2 = tail call i32 (...) @test_anonymous_aligned_wide()
%3 = tail call i32 (...) @test_named_bitfield()
%4 = tail call i32 (...) @test_union()
%5 = tail call i32 (...) @test_with_pointers()
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ cave_set_feat(int, int, int);
void place_up_stairs(int y, int x) { cave_set_feat(y, x, 0x06); }


x86 assembly (clang, -O0):
<place_up_stairs>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x8(%rbp),%esi
mov    $0x6,%edx
call   1030 <cave_set_feat@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<place_up_stairs>:
mov    $0x6,%edx
jmp    1030 <cave_set_feat@plt>

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

LLVM IR (-O2):
define void @place_up_stairs(i32 %0, i32 %1) {
%3 = tail call i32 @cave_set_feat(i32 %0, i32 %1, i32 6)
ret void
}
void IRC_OnChannelDeSuperOp(const struct instance_data *pID,
                            const struct userinfo *pUI, const char *szChannel,
                            const char *szTargetNick) {}


x86 assembly (clang, -O0):
<IRC_OnChannelDeSuperOp>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
pop    %rbp
ret

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

LLVM IR (-O0):
%struct.instance_data = type opaque
%struct.userinfo = type opaque
define void @IRC_OnChannelDeSuperOp(%struct.instance_data* %0, %struct.userinfo* %1, i8* %2, i8* %3) {
%5 = alloca %struct.instance_data*
%6 = alloca %struct.userinfo*
%7 = alloca i8*
%8 = alloca i8*
store %struct.instance_data* %0, %struct.instance_data** %5
store %struct.userinfo* %1, %struct.userinfo** %6
store i8* %2, i8** %7
store i8* %3, i8** %8
ret void
}

LLVM IR (-O2):
%struct.instance_data = type opaque
%struct.userinfo = type opaque
define void @IRC_OnChannelDeSuperOp(%struct.instance_data* nocapture %0, %struct.userinfo* nocapture %1, i8* nocapture %2, i8* nocapture %3) {
ret void
}
/* Variables and functions */
unsigned long __copy_to_user_inatomic(void *, void const *, unsigned long);
__attribute__((always_)) unsigned long
__copy_to_user(void *to, const void *from, unsigned long n) {
  do {
    do {
    } while (0);
  } while (0);
  return __copy_to_user_inatomic(to, from, n);
}


x86 assembly (clang, -O0):
<__copy_to_user>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
jmp    1129 <__copy_to_user+0x19>
jmp    112e <__copy_to_user+0x1e>
jmp    1133 <__copy_to_user+0x23>
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
call   1030 <__copy_to_user_inatomic@plt>
add    $0x20,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
define i64 @__copy_to_user(i8* %0, i8* %1, i64 %2) {
%4 = alloca i8*
%5 = alloca i8*
%6 = alloca i64
store i8* %0, i8** %4
store i8* %1, i8** %5
store i64 %2, i64* %6
br label %7
7: ; preds = %3
br label %8
8: ; preds = %7
br label %9
9: ; preds = %8
br label %10
10: ; preds = %9
%11 = load i8*, i8** %4
%12 = load i8*, i8** %5
%13 = load i64, i64* %6
%14 = call i64 @__copy_to_user_inatomic(i8* %11, i8* %12, i64 %13)
ret i64 %14
}

LLVM IR (-O2):
define i64 @__copy_to_user(i8* %0, i8* %1, i64 %2) {
%4 = tail call i64 @__copy_to_user_inatomic(i8* %0, i8* %1, i64 %2)
ret i64 %4
}
void i8042_lock_chip(void) {}


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

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

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

LLVM IR (-O2):
define void @i8042_lock_chip() {
ret void
}
int sdCardCmd(int interface, int cmd, unsigned long arg, unsigned char *resp) {
  return (-1);
}


x86 assembly (clang, -O0):
<sdCardCmd>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %rdx,-0x10(%rbp)
mov    %rcx,-0x18(%rbp)
mov    $0xffffffff,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @sdCardCmd(i32 %0, i32 %1, i64 %2, i8* %3) {
%5 = alloca i32
%6 = alloca i32
%7 = alloca i64
%8 = alloca i8*
store i32 %0, i32* %5
store i32 %1, i32* %6
store i64 %2, i64* %7
store i8* %3, i8** %8
ret i32 -1
}

LLVM IR (-O2):
define i32 @sdCardCmd(i32 %0, i32 %1, i64 %2, i8* nocapture readnone %3) {
ret i32 -1
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char const *);
int /*<<< orphan*/ stderr;
void usage(const char *name) {
  fprintf(stderr, "Usage:\n %s <body name> <error multiplier>\n", name);
  exit(1);
}


x86 assembly (clang, -O0):
<usage>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    0x2ead(%rip),%rax
mov    (%rax),%edi
mov    -0x8(%rbp),%rdx
lea    0xec0(%rip),%rsi
call   1030 <fprintf@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

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

LLVM IR (-O0):
@stderr = global i32 0
@.str = [43 x i8] c"Usage:\0A %s <body name> <error multiplier>\0A\00"
define void @usage(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i32, i32* @stderr
%4 = load i8*, i8** %2
%5 = call i32 @fprintf(i32 %3, i8* getelementptr inbounds ([43 x i8], [43 x i8]* @.str, i64 0, i64 0), i8* %4)
%6 = call i32 @exit(i32 1)
unreachable
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [43 x i8] c"Usage:\0A %s <body name> <error multiplier>\0A\00"
define void @usage(i8* %0) {
%2 = load i32, i32* @stderr
%3 = tail call i32 @fprintf(i32 %2, i8* getelementptr inbounds ([43 x i8], [43 x i8]* @.str, i64 0, i64 0), i8* %0)
%4 = tail call i32 @exit(i32 1)
unreachable
}
void I422ToRGB565Row_Any_SSSE3() {}


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

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

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

LLVM IR (-O2):
define void @I422ToRGB565Row_Any_SSSE3() {
ret void
}
char *devpw_shortdesc(void) {
  return "compute a secret key based on specified device properties";
}


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

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

LLVM IR (-O0):
@.str = [58 x i8] c"compute a secret key based on specified device properties\00"
define i8* @devpw_shortdesc() {
ret i8* getelementptr inbounds ([58 x i8], [58 x i8]* @.str, i64 0, i64 0)
}

LLVM IR (-O2):
@.str = [58 x i8] c"compute a secret key based on specified device properties\00"
define i8* @devpw_shortdesc() {
ret i8* getelementptr inbounds ([58 x i8], [58 x i8]* @.str, i64 0, i64 0)
}
unsigned int UARTIntStatus(unsigned int baseAdd) {
  unsigned int iirValue = 0;
  iirValue = (*((volatile unsigned int *)(baseAdd + (0x8))));
  iirValue &= (0x0000000Eu);
  iirValue >>= (0x00000001u);
  return iirValue;
}


x86 assembly (clang, -O0):
<UARTIntStatus>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
mov    -0x4(%rbp),%eax
add    $0x8,%eax
mov    %eax,%eax
mov    (%rax),%eax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
and    $0xe,%eax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
shr    $0x1,%eax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<UARTIntStatus>:
add    $0x8,%edi
mov    (%rdi),%eax
shr    %eax
and    $0x7,%eax
ret

LLVM IR (-O0):
define i32 @UARTIntStatus(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %2
store i32 0, i32* %3
%4 = load i32, i32* %2
%5 = add i32 %4, 8
%6 = zext i32 %5 to i64
%7 = inttoptr i64 %6 to i32*
%8 = load volatile i32, i32* %7
store i32 %8, i32* %3
%9 = load i32, i32* %3
%10 = and i32 %9, 14
store i32 %10, i32* %3
%11 = load i32, i32* %3
%12 = lshr i32 %11, 1
store i32 %12, i32* %3
%13 = load i32, i32* %3
ret i32 %13
}

LLVM IR (-O2):
define i32 @UARTIntStatus(i32 %0) {
%2 = add i32 %0, 8
%3 = zext i32 %2 to i64
%4 = inttoptr i64 %3 to i32*
%5 = load volatile i32, i32* %4
%6 = lshr i32 %5, 1
%7 = and i32 %6, 7
ret i32 %7
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, ...);
int /*<<< orphan*/ scanf(char *, char *);
int main(void) {
  char name[20];
  printf("Enter Name: ");
  scanf("%[^\n]", name);
  printf("Your name is %s.", name);
  return 0;
}


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

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x20,%rsp
lea    0xed4(%rip),%rdi
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xed3(%rip),%rdi
mov    %rsp,%rbx
mov    %rbx,%rsi
call   1040 <scanf@plt>
lea    0xec7(%rip),%rdi
mov    %rbx,%rsi
xor    %eax,%eax
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@.str = [13 x i8] c"Enter Name: \00"
@.str.1 = [6 x i8] c"%[^\0A]\00"
@.str.2 = [17 x i8] c"Your name is %s.\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca [20 x i8]
store i32 0, i32* %1
%3 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0))
%4 = getelementptr inbounds [20 x i8], [20 x i8]* %2, i64 0, i64 0
%5 = call i32 @scanf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), i8* %4)
%6 = getelementptr inbounds [20 x i8], [20 x i8]* %2, i64 0, i64 0
%7 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.2, i64 0, i64 0), i8* %6)
ret i32 0
}

LLVM IR (-O2):
@.str = [13 x i8] c"Enter Name: \00"
@.str.1 = [6 x i8] c"%[^\0A]\00"
@.str.2 = [17 x i8] c"Your name is %s.\00"
define i32 @main() {
%1 = alloca [20 x i8]
%2 = getelementptr inbounds [20 x i8], [20 x i8]* %1, i64 0, i64 0
%3 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0))
%4 = call i32 @scanf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), i8* %2)
%5 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([17 x i8], [17 x i8]* @.str.2, i64 0, i64 0), i8* %2)
ret i32 0
}
int linearSearch(const int array[], int key, int size) {
  if (size <= 0)
    return -1;
  if (array[size - 1] == key)
    return size - 1;
  else
    return linearSearch(array, key, size - 1);
}


x86 assembly (clang, -O0):
<linearSearch>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    %esi,-0x14(%rbp)
mov    %edx,-0x18(%rbp)
cmpl   $0x0,-0x18(%rbp)
jg     1138 <linearSearch+0x28>
movl   $0xffffffff,-0x4(%rbp)
jmp    1174 <linearSearch+0x64>
mov    -0x10(%rbp),%rax
mov    -0x18(%rbp),%ecx
sub    $0x1,%ecx
movslq %ecx,%rcx
mov    (%rax,%rcx,4),%eax
cmp    -0x14(%rbp),%eax
jne    115f <linearSearch+0x4f>
mov    -0x18(%rbp),%eax
sub    $0x1,%eax
mov    %eax,-0x4(%rbp)
jmp    1174 <linearSearch+0x64>
mov    -0x10(%rbp),%rdi
mov    -0x14(%rbp),%esi
mov    -0x18(%rbp),%edx
sub    $0x1,%edx
call   1030 <linearSearch@plt>
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<linearSearch>:
mov    %edx,%eax
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
test   %eax,%eax
jle    1120 <linearSearch+0x20>
add    $0xffffffffffffffff,%rax
mov    %eax,%ecx
cmp    %esi,(%rdi,%rcx,4)
jne    1110 <linearSearch+0x10>
ret
mov    $0xffffffff,%eax
ret

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

LLVM IR (-O2):
define i32 @linearSearch(i32* nocapture %0, i32 %1, i32 %2) {
%4 = zext i32 %2 to i64
br label %5
5: ; preds = %9, %3
%6 = phi i64 [ %10, %9 ], [ %4, %3 ]
%7 = trunc i64 %6 to i32
%8 = icmp slt i32 %7, 1
br i1 %8, label %17, label %9
9: ; preds = %5
%10 = add nsw i64 %6, -1
%11 = and i64 %10, 4294967295
%12 = getelementptr inbounds i32, i32* %0, i64 %11
%13 = load i32, i32* %12
%14 = icmp eq i32 %13, %1
br i1 %14, label %15, label %5
15: ; preds = %9
%16 = trunc i64 %10 to i32
br label %17
17: ; preds = %5, %15
%18 = phi i32 [ %16, %15 ], [ -1, %5 ]
ret i32 %18
}
/* Variables and functions */
int japi_nextaction();
int j_nextaction() { return (japi_nextaction()); }


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

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

LLVM IR (-O0):
define i32 @j_nextaction() {
%1 = call i32 (...) @japi_nextaction()
ret i32 %1
}

LLVM IR (-O2):
define i32 @j_nextaction() {
%1 = tail call i32 (...) @japi_nextaction()
ret i32 %1
}
void Interp2(unsigned char *pc, int c1, int c2, int c3) {
  *((int *)pc) = (c1 * 2 + c2 + c3) >> 2;
}


x86 assembly (clang, -O0):
<Interp2>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    %ecx,-0x14(%rbp)
mov    -0xc(%rbp),%ecx
shl    $0x1,%ecx
add    -0x10(%rbp),%ecx
add    -0x14(%rbp),%ecx
sar    $0x2,%ecx
mov    -0x8(%rbp),%rax
mov    %ecx,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<Interp2>:
lea    (%rdx,%rsi,2),%eax
add    %ecx,%eax
sar    $0x2,%eax
mov    %eax,(%rdi)
ret

LLVM IR (-O0):
define void @Interp2(i8* %0, i32 %1, i32 %2, i32 %3) {
%5 = alloca i8*
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
store i8* %0, i8** %5
store i32 %1, i32* %6
store i32 %2, i32* %7
store i32 %3, i32* %8
%9 = load i32, i32* %6
%10 = mul nsw i32 %9, 2
%11 = load i32, i32* %7
%12 = add nsw i32 %10, %11
%13 = load i32, i32* %8
%14 = add nsw i32 %12, %13
%15 = ashr i32 %14, 2
%16 = load i8*, i8** %5
%17 = bitcast i8* %16 to i32*
store i32 %15, i32* %17
ret void
}

LLVM IR (-O2):
define void @Interp2(i8* nocapture writeonly %0, i32 %1, i32 %2, i32 %3) {
%5 = shl nsw i32 %1, 1
%6 = add nsw i32 %5, %2
%7 = add nsw i32 %6, %3
%8 = ashr i32 %7, 2
%9 = bitcast i8* %0 to i32*
store i32 %8, i32* %9
ret void
}
float foo(float x) { return x; }


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

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

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

LLVM IR (-O2):
define float @foo(float returned %0) {
ret float %0
}
/* Variables and functions */
int /*<<< orphan*/ getch();
int /*<<< orphan*/ printf(char *, float);
main() {
  int q = 2;
  float s;
  s = 2.0 / 10.0;
  printf("%f", s);
  getch();
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x2,-0x4(%rbp)
movss  0xec9(%rip),%xmm0
movss  %xmm0,-0x8(%rbp)
movss  -0x8(%rbp),%xmm0
lea    0xebc(%rip),%rdi
call   1030 <printf@plt>
mov    $0x0,%al
call   1040 <getch@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xedc(%rip),%rdi
movss  0xed0(%rip),%xmm0
call   1030 <printf@plt>
xor    %eax,%eax
call   1040 <getch@plt>
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
@.str = [3 x i8] c"%f\00"
define i32 @main() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), float 0x3FC99999A0000000)
%2 = tail call i32 (...) @getch()
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void isAlreadyClosed(void) { printf("That is already closed.\n"); }


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

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

LLVM IR (-O0):
@.str = [25 x i8] c"That is already closed.\0A\00"
define void @isAlreadyClosed() {
%1 = call i32 @printf(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@str = [24 x i8] c"That is already closed.\00"
define void @isAlreadyClosed() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([24 x i8], [24 x i8]* @str, i64 0, i64 0))
ret void
}
const char *Start_Brief(void) { return "Can be started or stopped"; }


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

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

LLVM IR (-O0):
@.str = [26 x i8] c"Can be started or stopped\00"
define i8* @Start_Brief() {
ret i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str, i64 0, i64 0)
}

LLVM IR (-O2):
@.str = [26 x i8] c"Can be started or stopped\00"
define i8* @Start_Brief() {
ret i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str, i64 0, i64 0)
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int pa_reduce() {
  printf("NOT IMPLEMENTED:"
         "pa_reduce"
         "\n");
}


x86 assembly (clang, -O0):
<pa_reduce>:
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_reduce>:
lea    0xee9(%rip),%rdi
jmp    1030 <puts@plt>

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

LLVM IR (-O2):
@str = [26 x i8] c"NOT IMPLEMENTED:pa_reduce\00"
define i32 @pa_reduce() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([26 x i8], [26 x i8]* @str, i64 0, i64 0))
ret i32 undef
}
int isspace(int c) {
  switch (c) {
  case ' ':
  case '\t':
  case '\n':
  case '\v':
  case '\f':
  case '\r':
    return 1;
  default:
    return 0;
  }
}


x86 assembly (clang, -O0):
<isspace>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
mov    -0x8(%rbp),%eax
mov    %eax,-0xc(%rbp)
add    $0xfffffff7,%eax
sub    $0x5,%eax
jb     112f <isspace+0x2f>
jmp    111e <isspace+0x1e>
mov    -0xc(%rbp),%eax
sub    $0x20,%eax
jne    113b <isspace+0x3b>
jmp    112f <isspace+0x2f>
movl   $0x1,-0x4(%rbp)
jmp    1142 <isspace+0x42>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<isspace>:
mov    $0x1,%eax
lea    -0x9(%rdi),%ecx
cmp    $0x5,%ecx
jae    110e <isspace+0xe>
ret
cmp    $0x20,%edi
je     110d <isspace+0xd>
xor    %eax,%eax
ret

LLVM IR (-O0):
define i32 @isspace(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %3
%4 = load i32, i32* %3
switch i32 %4, label %6 [
i32 32, label %5
i32 9, label %5
i32 10, label %5
i32 11, label %5
i32 12, label %5
i32 13, label %5
]
5: ; preds = %1, %1, %1, %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 @isspace(i32 %0) {
switch i32 %0, label %2 [
i32 32, label %3
i32 9, label %3
i32 10, label %3
i32 11, label %3
i32 12, label %3
i32 13, label %3
]
2: ; preds = %1
br label %3
3: ; preds = %1, %1, %1, %1, %1, %1, %2
%4 = phi i32 [ 0, %2 ], [ 1, %1 ], [ 1, %1 ], [ 1, %1 ], [ 1, %1 ], [ 1, %1 ], [ 1, %1 ]
ret i32 %4
}
int audioRecStart(int freq, int gain) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @audioRecStart(i32 %0, i32 %1) {
ret i32 0
}
unsigned long sub3(unsigned long i) { return (i << 1) >> 1; }


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

x86 assembly (clang, -O2):
<sub3>:
movabs $0x7fffffffffffffff,%rax
ff ff 7f
and    %rdi,%rax
ret

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

LLVM IR (-O2):
define i64 @sub3(i64 %0) {
%2 = and i64 %0, 9223372036854775807
ret i64 %2
}
/* Variables and functions */
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ help();
int /*<<< orphan*/ wire();
void key(unsigned char key, int x, int y) {
  switch (key) {
  case '\033':
    exit(0);
    break;
  case 'h':
    help();
    break;
  case 'w':
    wire();
    break;
  }
}


x86 assembly (clang, -O0):
<key>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %dil,%al
mov    %al,-0x1(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
movzbl -0x1(%rbp),%eax
mov    %eax,-0x10(%rbp)
sub    $0x1b,%eax
je     117b <key+0x4b>
jmp    1159 <key+0x29>
mov    -0x10(%rbp),%eax
sub    $0x68,%eax
je     1182 <key+0x52>
jmp    116a <key+0x3a>
mov    -0x10(%rbp),%eax
sub    $0x77,%eax
je     118e <key+0x5e>
jmp    1195 <key+0x65>
xor    %edi,%edi
call   1050 <exit@plt>
mov    $0x0,%al
call   1040 <help@plt>
jmp    1195 <key+0x65>
mov    $0x0,%al
call   1030 <wire@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<key>:
cmp    $0x68,%dil
je     1143 <key+0x13>
cmp    $0x77,%dil
je     114a <key+0x1a>
cmp    $0x1b,%dil
je     1151 <key+0x21>
ret
xor    %eax,%eax
jmp    1040 <help@plt>
xor    %eax,%eax
jmp    1030 <wire@plt>
push   %rax
xor    %edi,%edi
call   1050 <exit@plt>

LLVM IR (-O0):
define void @key(i8 zeroext %0, i32 %1, i32 %2) {
%4 = alloca i8
%5 = alloca i32
%6 = alloca i32
store i8 %0, i8* %4
store i32 %1, i32* %5
store i32 %2, i32* %6
%7 = load i8, i8* %4
%8 = zext i8 %7 to i32
switch i32 %8, label %15 [
i32 27, label %9
i32 104, label %11
i32 119, label %13
]
9: ; preds = %3
%10 = call i32 @exit(i32 0)
unreachable
11: ; preds = %3
%12 = call i32 (...) @help()
br label %15
13: ; preds = %3
%14 = call i32 (...) @wire()
br label %15
15: ; preds = %3, %13, %11
ret void
}

LLVM IR (-O2):
define void @key(i8 zeroext %0, i32 %1, i32 %2) {
switch i8 %0, label %10 [
i8 27, label %4
i8 104, label %6
i8 119, label %8
]
4: ; preds = %3
%5 = tail call i32 @exit(i32 0)
unreachable
6: ; preds = %3
%7 = tail call i32 (...) @help()
br label %10
8: ; preds = %3
%9 = tail call i32 (...) @wire()
br label %10
10: ; preds = %3, %8, %6
ret void
}
/* Type definitions */
typedef int mode_t;

/* Variables and functions */
mode_t umask(mode_t mask) { return 0777; }


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

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

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

LLVM IR (-O2):
define i32 @umask(i32 %0) {
ret i32 511
}
/* Variables and functions */
void *calloc(size_t, size_t);
int /*<<< orphan*/ log_oom_and_exit();
void *xcalloc(size_t nmemb, size_t size) {
  void *p;
  p = calloc(nmemb, size);
  if (!p) {
    log_oom_and_exit();
  }
  return p;
}


x86 assembly (clang, -O0):
<xcalloc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1040 <calloc@plt>
mov    %rax,-0x18(%rbp)
cmpq   $0x0,-0x18(%rbp)
jne    1153 <xcalloc+0x33>
mov    $0x0,%al
call   1030 <log_oom_and_exit@plt>
mov    -0x18(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<xcalloc>:
push   %rbx
call   1040 <calloc@plt>
mov    %rax,%rbx
test   %rax,%rax
jne    1135 <xcalloc+0x15>
xor    %eax,%eax
call   1030 <log_oom_and_exit@plt>
mov    %rbx,%rax
pop    %rbx
ret

LLVM IR (-O0):
define i8* @xcalloc(i64 %0, i64 %1) {
%3 = alloca i64
%4 = alloca i64
%5 = alloca i8*
store i64 %0, i64* %3
store i64 %1, i64* %4
%6 = load i64, i64* %3
%7 = load i64, i64* %4
%8 = call i8* @calloc(i64 %6, i64 %7)
store i8* %8, i8** %5
%9 = load i8*, i8** %5
%10 = icmp ne i8* %9, null
br i1 %10, label %13, label %11
11: ; preds = %2
%12 = call i32 (...) @log_oom_and_exit()
br label %13
13: ; preds = %11, %2
%14 = load i8*, i8** %5
ret i8* %14
}

LLVM IR (-O2):
define noalias i8* @xcalloc(i64 %0, i64 %1) {
%3 = tail call i8* @calloc(i64 %0, i64 %1)
%4 = icmp eq i8* %3, null
br i1 %4, label %5, label %7
5: ; preds = %2
%6 = tail call i32 (...) @log_oom_and_exit()
br label %7
7: ; preds = %5, %2
ret i8* %3
}
/* Type definitions */
typedef int uint8_t;
typedef int int8_t;

/* Variables and functions */
int8_t Nibble2HexChar(uint8_t a) {
  if (a < 10) {
    return '0' + a;
  } else if (a < 16) {
    return 'A' + (a - 10);
  } else {
    return '?';
  }
}


x86 assembly (clang, -O0):
<Nibble2HexChar>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
cmpl   $0xa,-0x8(%rbp)
jge    111f <Nibble2HexChar+0x1f>
mov    -0x8(%rbp),%eax
add    $0x30,%eax
mov    %eax,-0x4(%rbp)
jmp    1141 <Nibble2HexChar+0x41>
cmpl   $0x10,-0x8(%rbp)
jge    113a <Nibble2HexChar+0x3a>
mov    -0x8(%rbp),%eax
sub    $0xa,%eax
add    $0x41,%eax
mov    %eax,-0x4(%rbp)
jmp    1141 <Nibble2HexChar+0x41>
movl   $0x3f,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<Nibble2HexChar>:
lea    0x37(%rdi),%ecx
cmp    $0x10,%edi
mov    $0x3f,%eax
cmovl  %ecx,%eax
lea    0x30(%rdi),%ecx
cmp    $0xa,%edi
cmovl  %ecx,%eax
ret

LLVM IR (-O0):
define i32 @Nibble2HexChar(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %3
%4 = load i32, i32* %3
%5 = icmp slt i32 %4, 10
br i1 %5, label %6, label %9
6: ; preds = %1
%7 = load i32, i32* %3
%8 = add nsw i32 48, %7
store i32 %8, i32* %2
br label %17
9: ; preds = %1
%10 = load i32, i32* %3
%11 = icmp slt i32 %10, 16
br i1 %11, label %12, label %16
12: ; preds = %9
%13 = load i32, i32* %3
%14 = sub nsw i32 %13, 10
%15 = add nsw i32 65, %14
store i32 %15, i32* %2
br label %17
16: ; preds = %9
store i32 63, i32* %2
br label %17
17: ; preds = %16, %12, %6
%18 = load i32, i32* %2
ret i32 %18
}

LLVM IR (-O2):
define i32 @Nibble2HexChar(i32 %0) {
%2 = icmp slt i32 %0, 10
%3 = add nsw i32 %0, 48
%4 = icmp slt i32 %0, 16
%5 = add nsw i32 %0, 55
%6 = select i1 %4, i32 %5, i32 63
%7 = select i1 %2, i32 %3, i32 %6
ret i32 %7
}
unsigned geom_imax2d(const double v[2]) { return (v[0] > v[1]) ? 0 : 1; }


x86 assembly (clang, -O0):
<geom_imax2d>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movsd  (%rax),%xmm0
mov    -0x8(%rbp),%rax
movsd  0x8(%rax),%xmm1
mov    $0x1,%eax
xor    %ecx,%ecx
ucomisd %xmm1,%xmm0
cmova  %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<geom_imax2d>:
movsd  (%rdi),%xmm0
xor    %eax,%eax
ucomisd 0x8(%rdi),%xmm0
setbe  %al
ret

LLVM IR (-O0):
define i32 @geom_imax2d(double* %0) {
%2 = alloca double*
store double* %0, double** %2
%3 = load double*, double** %2
%4 = getelementptr inbounds double, double* %3, i64 0
%5 = load double, double* %4
%6 = load double*, double** %2
%7 = getelementptr inbounds double, double* %6, i64 1
%8 = load double, double* %7
%9 = fcmp ogt double %5, %8
%10 = zext i1 %9 to i64
%11 = select i1 %9, i32 0, i32 1
ret i32 %11
}

LLVM IR (-O2):
define i32 @geom_imax2d(double* nocapture %0) {
%2 = load double, double* %0
%3 = getelementptr inbounds double, double* %0, i64 1
%4 = load double, double* %3
%5 = fcmp ule double %2, %4
%6 = zext i1 %5 to i32
ret i32 %6
}
/* Variables and functions */
int _NSIG;
int __libc_current_sigrtmax() { return _NSIG - 1; }


x86 assembly (clang, -O0):
<__libc_current_sigrtmax>:
push   %rbp
mov    %rsp,%rbp
mov    0x2ee5(%rip),%rax
mov    (%rax),%eax
sub    $0x1,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<__libc_current_sigrtmax>:
mov    0x2ee9(%rip),%rax
mov    (%rax),%eax
add    $0xffffffff,%eax
ret

LLVM IR (-O0):
@_NSIG = global i32 0
define i32 @__libc_current_sigrtmax() {
%1 = load i32, i32* @_NSIG
%2 = sub nsw i32 %1, 1
ret i32 %2
}

LLVM IR (-O2):
@_NSIG = global i32 0
define i32 @__libc_current_sigrtmax() {
%1 = load i32, i32* @_NSIG
%2 = add nsw i32 %1, -1
ret i32 %2
}
/* Variables and functions */
int EOF;
int getchar();
int /*<<< orphan*/ printf(char *, int);
void main(void) {
  int c, i = 0;
  while (c != EOF) {
    c = getchar();
    if (c == 10)
      i++;
  }
  printf("El total de lineas en el archivo es: %i\n", i);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x8(%rbp)
mov    -0x4(%rbp),%eax
mov    0x2eaf(%rip),%rcx
cmp    (%rcx),%eax
je     1163 <main+0x43>
mov    $0x0,%al
call   1040 <getchar@plt>
mov    %eax,-0x4(%rbp)
cmpl   $0xa,-0x4(%rbp)
jne    115e <main+0x3e>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    112f <main+0xf>
mov    -0x8(%rbp),%esi
lea    0xe93(%rip),%rdi
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r14
push   %rbx
push   %rax
mov    0x2ebd(%rip),%r14
xor    %ebx,%ebx
nopl   (%rax)
xor    %eax,%eax
call   1040 <getchar@plt>
xor    %ecx,%ecx
cmp    $0xa,%eax
sete   %cl
add    %ecx,%ebx
cmp    (%r14),%eax
jne    1130 <main+0x10>
lea    0xeb3(%rip),%rdi
mov    %ebx,%esi
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1030 <printf@plt>

LLVM IR (-O0):
@EOF = global i32 0
@.str = [41 x i8] c"El total de lineas en el archivo es: %i\0A\00"
define void @main() {
%1 = alloca i32
%2 = alloca i32
store i32 0, i32* %2
br label %3
3: ; preds = %14, %0
%4 = load i32, i32* %1
%5 = load i32, i32* @EOF
%6 = icmp ne i32 %4, %5
br i1 %6, label %7, label %15
7: ; preds = %3
%8 = call i32 (...) @getchar()
store i32 %8, i32* %1
%9 = load i32, i32* %1
%10 = icmp eq i32 %9, 10
br i1 %10, label %11, label %14
11: ; preds = %7
%12 = load i32, i32* %2
%13 = add nsw i32 %12, 1
store i32 %13, i32* %2
br label %14
14: ; preds = %11, %7
br label %3
15: ; preds = %3
%16 = load i32, i32* %2
%17 = call i32 @printf(i8* getelementptr inbounds ([41 x i8], [41 x i8]* @.str, i64 0, i64 0), i32 %16)
ret void
}

LLVM IR (-O2):
@EOF = global i32 0
@.str = [41 x i8] c"El total de lineas en el archivo es: %i\0A\00"
define void @main() {
br label %1
1: ; preds = %0, %1
%2 = phi i32 [ %6, %1 ], [ 0, %0 ]
%3 = tail call i32 (...) @getchar()
%4 = icmp eq i32 %3, 10
%5 = zext i1 %4 to i32
%6 = add nuw nsw i32 %2, %5
%7 = load i32, i32* @EOF
%8 = icmp eq i32 %3, %7
br i1 %8, label %9, label %1
9: ; preds = %1
%10 = tail call i32 @printf(i8* getelementptr inbounds ([41 x i8], [41 x i8]* @.str, i64 0, i64 0), i32 %6)
ret void
}