xunge/DecIR huggingface dataset:
/* Variables and functions */
scalar_t__ isgraph(char const);
const char *trim_left(const char *start, const char *stop) {
  for (; start < stop; start++) {
    if (isgraph(*start)) {
      break;
    }
  }
  return start;
}


x86 assembly (clang, -O0):
<trim_left>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
cmp    -0x10(%rbp),%rax
jae    115f <trim_left+0x4f>
mov    -0x8(%rbp),%rax
movsbl (%rax),%edi
call   1030 <isgraph@plt>
cmp    $0x0,%rax
je     1149 <trim_left+0x39>
jmp    115f <trim_left+0x4f>
jmp    114e <trim_left+0x3e>
mov    -0x8(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x8(%rbp)
jmp    1120 <trim_left+0x10>
mov    -0x8(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<trim_left>:
push   %r15
push   %r14
push   %rbx
mov    %rdi,%r15
cmp    %rsi,%rdi
jae    114b <trim_left+0x3b>
mov    %rsi,%r14
mov    %rsi,%rbx
sub    %r15,%rbx
cs nopw 0x0(%rax,%rax,1)
movsbl (%r15),%edi
call   1030 <isgraph@plt>
test   %rax,%rax
jne    114b <trim_left+0x3b>
add    $0x1,%r15
add    $0xffffffffffffffff,%rbx
jne    1130 <trim_left+0x20>
mov    %r14,%r15
mov    %r15,%rax
pop    %rbx
pop    %r14
pop    %r15
ret

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

LLVM IR (-O2):
define i8* @trim_left(i8* %0, i8* readnone %1) {
%3 = icmp ult i8* %0, %1
br i1 %3, label %4, label %17
4: ; preds = %2
%5 = ptrtoint i8* %1 to i64
%6 = ptrtoint i8* %0 to i64
%7 = sub i64 %5, %6
%8 = getelementptr i8, i8* %0, i64 %7
br label %9
9: ; preds = %4, %14
%10 = phi i8* [ %15, %14 ], [ %0, %4 ]
%11 = load i8, i8* %10
%12 = tail call i64 @isgraph(i8 signext %11)
%13 = icmp eq i64 %12, 0
br i1 %13, label %14, label %17
14: ; preds = %9
%15 = getelementptr inbounds i8, i8* %10, i64 1
%16 = icmp eq i8* %15, %8
br i1 %16, label %17, label %9
17: ; preds = %14, %9, %2
%18 = phi i8* [ %0, %2 ], [ %10, %9 ], [ %8, %14 ]
ret i8* %18
}
int matherr(struct exception *exc) { return 1; }


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

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

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

LLVM IR (-O2):
%struct.exception = type opaque
define i32 @matherr(%struct.exception* nocapture readnone %0) {
ret i32 1
}
/* Type definitions */
typedef int /*<<< orphan*/ __m128d;

/* Variables and functions */
int _mm_comile_sd(int /*<<< orphan*/, int /*<<< orphan*/);
int test_mm_comile_sd(__m128d A, __m128d B) { return _mm_comile_sd(A, B); }


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

x86 assembly (clang, -O2):
<test_mm_comile_sd>:
jmp    1030 <_mm_comile_sd@plt>

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

LLVM IR (-O2):
define i32 @test_mm_comile_sd(i32 %0, i32 %1) {
%3 = tail call i32 @_mm_comile_sd(i32 %0, i32 %1)
ret i32 %3
}
void walkLeft() {}


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

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

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

LLVM IR (-O2):
define void @walkLeft() {
ret void
}
int Bematech_FI_FlagIntervencaoTecnica(Var, Retorno) {
  return Formata("\x1b|35|20|\x1b", Var, Retorno);
}


x86 assembly (clang, -O0):
<Bematech_FI_FlagIntervencaoTecnica>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%esi
mov    -0x8(%rbp),%edx
lea    0xed5(%rip),%rdi
mov    $0x0,%al
call   1030 <Formata@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Bematech_FI_FlagIntervencaoTecnica>:
mov    %esi,%edx
mov    %edi,%esi
lea    0xee5(%rip),%rdi
xor    %eax,%eax
jmp    1030 <Formata@plt>

LLVM IR (-O0):
@.str = [10 x i8] c"\1B|35|20|\1B\00"
define i32 @Bematech_FI_FlagIntervencaoTecnica(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 (i8*, i32, i32, ...) bitcast (i32 (...)* @Formata to i32 (i8*, i32, i32, ...)*)(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i32 %5, i32 %6)
ret i32 %7
}

LLVM IR (-O2):
@.str = [10 x i8] c"\1B|35|20|\1B\00"
define i32 @Bematech_FI_FlagIntervencaoTecnica(i32 %0, i32 %1) {
%3 = tail call i32 (i8*, i32, i32, ...) bitcast (i32 (...)* @Formata to i32 (i8*, i32, i32, ...)*)(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i32 %0, i32 %1)
ret i32 %3
}
int ft_isalpha(int c) {
  int is_alpha;
  is_alpha = ((c >= 0101) && (c <= 0132));
  return (is_alpha || ((c >= 0141) && (c <= 0172)));
}


x86 assembly (clang, -O0):
<ft_isalpha>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
xor    %eax,%eax
cmpl   $0x41,-0x4(%rbp)
mov    %al,-0x9(%rbp)
jl     1120 <ft_isalpha+0x20>
cmpl   $0x5a,-0x4(%rbp)
setle  %al
mov    %al,-0x9(%rbp)
mov    -0x9(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
mov    %eax,-0x8(%rbp)
mov    $0x1,%al
cmpl   $0x0,-0x8(%rbp)
mov    %al,-0xa(%rbp)
jne    1159 <ft_isalpha+0x59>
xor    %eax,%eax
cmpl   $0x61,-0x4(%rbp)
mov    %al,-0xb(%rbp)
jl     1153 <ft_isalpha+0x53>
cmpl   $0x7a,-0x4(%rbp)
setle  %al
mov    %al,-0xb(%rbp)
mov    -0xb(%rbp),%al
mov    %al,-0xa(%rbp)
mov    -0xa(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<ft_isalpha>:
and    $0xffffffdf,%edi
add    $0xffffffbf,%edi
xor    %eax,%eax
cmp    $0x1a,%edi
setb   %al
ret

LLVM IR (-O0):
define i32 @ft_isalpha(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %2
%4 = load i32, i32* %2
%5 = icmp sge i32 %4, 65
br i1 %5, label %6, label %9
6: ; preds = %1
%7 = load i32, i32* %2
%8 = icmp sle i32 %7, 90
br label %9
9: ; preds = %6, %1
%10 = phi i1 [ false, %1 ], [ %8, %6 ]
%11 = zext i1 %10 to i32
store i32 %11, i32* %3
%12 = load i32, i32* %3
%13 = icmp ne i32 %12, 0
br i1 %13, label %22, label %14
14: ; preds = %9
%15 = load i32, i32* %2
%16 = icmp sge i32 %15, 97
br i1 %16, label %17, label %20
17: ; preds = %14
%18 = load i32, i32* %2
%19 = icmp sle i32 %18, 122
br label %20
20: ; preds = %17, %14
%21 = phi i1 [ false, %14 ], [ %19, %17 ]
br label %22
22: ; preds = %20, %9
%23 = phi i1 [ true, %9 ], [ %21, %20 ]
%24 = zext i1 %23 to i32
ret i32 %24
}

LLVM IR (-O2):
define i32 @ft_isalpha(i32 %0) {
%2 = and i32 %0, -33
%3 = add i32 %2, -65
%4 = icmp ult i32 %3, 26
%5 = zext i1 %4 to i32
ret i32 %5
}
int wps_validate_m2(const struct wpabuf *tlvs) { return 0; }


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

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

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

LLVM IR (-O2):
%struct.wpabuf = type opaque
define i32 @wps_validate_m2(%struct.wpabuf* nocapture readnone %0) {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ printf(char *, char *);
void print_usage(char *pgm, int ec) {
  printf("Usage: %s <dev> <GB> [num reducers]\n", pgm);
  if (ec)
    exit(ec);
}


x86 assembly (clang, -O0):
<print_usage>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rsi
lea    0xec6(%rip),%rdi
call   1030 <printf@plt>
cmpl   $0x0,-0xc(%rbp)
je     1151 <print_usage+0x31>
mov    -0xc(%rbp),%edi
call   1040 <exit@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<print_usage>:
push   %rbx
mov    %esi,%ebx
mov    %rdi,%rsi
lea    0xed3(%rip),%rdi
call   1030 <printf@plt>
test   %ebx,%ebx
jne    1138 <print_usage+0x18>
pop    %rbx
ret
mov    %ebx,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@.str = [37 x i8] c"Usage: %s <dev> <GB> [num reducers]\0A\00"
define void @print_usage(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i32
store i8* %0, i8** %3
store i32 %1, i32* %4
%5 = load i8*, i8** %3
%6 = call i32 @printf(i8* getelementptr inbounds ([37 x i8], [37 x i8]* @.str, i64 0, i64 0), i8* %5)
%7 = load i32, i32* %4
%8 = icmp ne i32 %7, 0
br i1 %8, label %9, label %12
9: ; preds = %2
%10 = load i32, i32* %4
%11 = call i32 @exit(i32 %10)
unreachable
12: ; preds = %2
ret void
}

LLVM IR (-O2):
@.str = [37 x i8] c"Usage: %s <dev> <GB> [num reducers]\0A\00"
define void @print_usage(i8* %0, i32 %1) {
%3 = tail call i32 @printf(i8* getelementptr inbounds ([37 x i8], [37 x i8]* @.str, i64 0, i64 0), i8* %0)
%4 = icmp eq i32 %1, 0
br i1 %4, label %7, label %5
5: ; preds = %2
%6 = tail call i32 @exit(i32 %1)
unreachable
7: ; preds = %2
ret void
}
/* Variables and functions */
int /*<<< orphan*/ close_sems();
void db_close() { close_sems(); }


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

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

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

LLVM IR (-O2):
define void @db_close() {
%1 = tail call i32 (...) @close_sems()
ret void
}
int test_imm_A3int8_mem(signed char *val) {
  return ((*val) & (0xA3 << 0)) ? -20 : -40;
}


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

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

LLVM IR (-O0):
define i32 @test_imm_A3int8_mem(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = load i8, i8* %3
%5 = sext i8 %4 to i32
%6 = and i32 %5, 163
%7 = icmp ne i32 %6, 0
%8 = zext i1 %7 to i64
%9 = select i1 %7, i32 -20, i32 -40
ret i32 %9
}

LLVM IR (-O2):
define i32 @test_imm_A3int8_mem(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = and i8 %2, -93
%4 = icmp eq i8 %3, 0
%5 = select i1 %4, i32 -40, i32 -20
ret i32 %5
}
int simple() { return 9; }


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

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

LLVM IR (-O0):
define i32 @simple() {
ret i32 9
}

LLVM IR (-O2):
define i32 @simple() {
ret i32 9
}
int error_conforms(int error, int base, int mask) {
  int force0 = (!base) & mask;
  int force1 = base & mask;
  return ((force0 | error) == error) &&
         (((error ^ force1) & (error | force1)) == error);
}


x86 assembly (clang, -O0):
<error_conforms>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
cmpl   $0x0,-0x8(%rbp)
setne  %al
xor    $0xff,%al
and    $0x1,%al
movzbl %al,%eax
and    -0xc(%rbp),%eax
mov    %eax,-0x10(%rbp)
mov    -0x8(%rbp),%eax
and    -0xc(%rbp),%eax
mov    %eax,-0x14(%rbp)
mov    -0x10(%rbp),%ecx
or     -0x4(%rbp),%ecx
xor    %eax,%eax
cmp    -0x4(%rbp),%ecx
mov    %al,-0x15(%rbp)
jne    1155 <error_conforms+0x55>
mov    -0x4(%rbp),%eax
xor    -0x14(%rbp),%eax
mov    -0x4(%rbp),%ecx
or     -0x14(%rbp),%ecx
and    %ecx,%eax
cmp    -0x4(%rbp),%eax
sete   %al
mov    %al,-0x15(%rbp)
mov    -0x15(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<error_conforms>:
xor    %ecx,%ecx
test   %esi,%esi
sete   %cl
and    %edx,%ecx
or     %edi,%ecx
xor    %edi,%ecx
and    %esi,%edx
xor    %eax,%eax
or     %ecx,%edx
sete   %al
ret

LLVM IR (-O0):
define i32 @error_conforms(i32 %0, i32 %1, i32 %2) {
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
store i32 %0, i32* %4
store i32 %1, i32* %5
store i32 %2, i32* %6
%9 = load i32, i32* %5
%10 = icmp ne i32 %9, 0
%11 = xor i1 %10, true
%12 = zext i1 %11 to i32
%13 = load i32, i32* %6
%14 = and i32 %12, %13
store i32 %14, i32* %7
%15 = load i32, i32* %5
%16 = load i32, i32* %6
%17 = and i32 %15, %16
store i32 %17, i32* %8
%18 = load i32, i32* %7
%19 = load i32, i32* %4
%20 = or i32 %18, %19
%21 = load i32, i32* %4
%22 = icmp eq i32 %20, %21
br i1 %22, label %23, label %33
23: ; preds = %3
%24 = load i32, i32* %4
%25 = load i32, i32* %8
%26 = xor i32 %24, %25
%27 = load i32, i32* %4
%28 = load i32, i32* %8
%29 = or i32 %27, %28
%30 = and i32 %26, %29
%31 = load i32, i32* %4
%32 = icmp eq i32 %30, %31
br label %33
33: ; preds = %23, %3
%34 = phi i1 [ false, %3 ], [ %32, %23 ]
%35 = zext i1 %34 to i32
ret i32 %35
}

LLVM IR (-O2):
define i32 @error_conforms(i32 %0, i32 %1, i32 %2) {
%4 = icmp eq i32 %1, 0
%5 = zext i1 %4 to i32
%6 = and i32 %5, %2
%7 = or i32 %6, %0
%8 = icmp eq i32 %7, %0
%9 = and i32 %2, %1
%10 = icmp eq i32 %9, 0
%11 = and i1 %10, %8
%12 = zext i1 %11 to i32
ret i32 %12
}
/* Variables and functions */
int tolower(int);
int invalidFunctionArgBool_tolower(bool b, int c) {
  (void)tolower(b);
  return tolower(c != 0);
}


x86 assembly (clang, -O0):
<invalidFunctionArgBool_tolower>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
cmpl   $0x0,-0x8(%rbp)
setne  %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <tolower@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<invalidFunctionArgBool_tolower>:
xor    %edi,%edi
test   %esi,%esi
setne  %dil
jmp    1030 <tolower@plt>

LLVM IR (-O0):
define i32 @invalidFunctionArgBool_tolower(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 = call i32 @tolower(i32 %5)
%7 = load i32, i32* %4
%8 = icmp ne i32 %7, 0
%9 = zext i1 %8 to i32
%10 = call i32 @tolower(i32 %9)
ret i32 %10
}

LLVM IR (-O2):
define i32 @invalidFunctionArgBool_tolower(i32 %0, i32 %1) {
%3 = icmp ne i32 %1, 0
%4 = zext i1 %3 to i32
%5 = tail call i32 @tolower(i32 %4)
ret i32 %5
}
/* Variables and functions */
int _ada_use_c2phc4c(int, int *, int *, double *, int /*<<< orphan*/);
int syspool_copy_to_standard_container(int k) {
  int fail, *b;
  double *c;
  fail = _ada_use_c2phc4c(313, &k, b, c, 0);
  return fail;
}


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

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

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

LLVM IR (-O2):
define i32 @syspool_copy_to_standard_container(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = call i32 @_ada_use_c2phc4c(i32 313, i32* %2, i32* undef, double* undef, i32 0)
ret i32 %3
}
int label_default(char x) {
  int ret = 0;
  switch (x) {
  case 1:
    ret++;
    goto l;
  case 2:
    ret = 2;
    break;
  l:
  default:
    ret--;
  }
  return ret;
}


x86 assembly (clang, -O0):
<label_default>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movl   $0x0,-0x8(%rbp)
movsbl -0x1(%rbp),%eax
mov    %eax,-0xc(%rbp)
sub    $0x1,%eax
je     1137 <label_default+0x37>
jmp    1126 <label_default+0x26>
mov    -0xc(%rbp),%eax
sub    $0x2,%eax
je     1145 <label_default+0x45>
jmp    1156 <label_default+0x56>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1151 <label_default+0x51>
movl   $0x2,-0x8(%rbp)
jmp    115f <label_default+0x5f>
jmp    1156 <label_default+0x56>
mov    -0x8(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<label_default>:
cmp    $0x2,%edi
je     1112 <label_default+0x12>
mov    $0xffffffff,%eax
cmp    $0x1,%edi
jne    1111 <label_default+0x11>
xor    %eax,%eax
ret
mov    %edi,%eax
ret

LLVM IR (-O0):
define i32 @label_default(i8 signext %0) {
%2 = alloca i8
%3 = alloca i32
store i8 %0, i8* %2
store i32 0, i32* %3
%4 = load i8, i8* %2
%5 = sext i8 %4 to i32
switch i32 %5, label %11 [
i32 1, label %6
i32 2, label %9
]
6: ; preds = %1
%7 = load i32, i32* %3
%8 = add nsw i32 %7, 1
store i32 %8, i32* %3
br label %10
9: ; preds = %1
store i32 2, i32* %3
br label %14
10: ; preds = %6
br label %11
11: ; preds = %1, %10
%12 = load i32, i32* %3
%13 = add nsw i32 %12, -1
store i32 %13, i32* %3
br label %14
14: ; preds = %11, %9
%15 = load i32, i32* %3
ret i32 %15
}

LLVM IR (-O2):
define i32 @label_default(i8 signext %0) {
%2 = sext i8 %0 to i32
switch i32 %2, label %4 [
i32 1, label %3
i32 2, label %6
]
3: ; preds = %1
br label %4
4: ; preds = %1, %3
%5 = phi i32 [ -1, %1 ], [ 0, %3 ]
br label %6
6: ; preds = %1, %4
%7 = phi i32 [ %5, %4 ], [ %2, %1 ]
ret i32 %7
}
/* Type definitions */
struct hiena_dcel {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ dcel_cleanup(struct hiena_dcel *);
struct hiena_dcel *dcel_new(int /*<<< orphan*/ *);
int /*<<< orphan*/ perror(char *);
int main() {
  int er;
  struct hiena_dcel *dc = NULL;
  if ((dc = dcel_new(NULL)) == NULL) {
    perror("err new_dcel()");
    er++;
    ;
    goto cleanup;
  }
cleanup:
  dcel_cleanup(dc);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movq   $0x0,-0x10(%rbp)
xor    %eax,%eax
mov    %eax,%edi
call   1030 <dcel_new@plt>
mov    %rax,-0x10(%rbp)
cmp    $0x0,%rax
jne    1178 <main+0x48>
lea    0xe9b(%rip),%rdi
call   1050 <perror@plt>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    117d <main+0x4d>
jmp    117d <main+0x4d>
mov    -0x10(%rbp),%rdi
call   1040 <dcel_cleanup@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
xor    %edi,%edi
call   1030 <dcel_new@plt>
mov    %rax,%rbx
test   %rax,%rax
je     114c <main+0x1c>
mov    %rbx,%rdi
call   1040 <dcel_cleanup@plt>
xor    %eax,%eax
pop    %rbx
ret
lea    0xead(%rip),%rdi
call   1050 <perror@plt>
jmp    1140 <main+0x10>

LLVM IR (-O0):
%struct.hiena_dcel = type { i32 }
@.str = [15 x i8] c"err new_dcel()\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca %struct.hiena_dcel*
store i32 0, i32* %1
store %struct.hiena_dcel* null, %struct.hiena_dcel** %3
%4 = call %struct.hiena_dcel* @dcel_new(i32* null)
store %struct.hiena_dcel* %4, %struct.hiena_dcel** %3
%5 = icmp eq %struct.hiena_dcel* %4, null
br i1 %5, label %6, label %10
6: ; preds = %0
%7 = call i32 @perror(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0))
%8 = load i32, i32* %2
%9 = add nsw i32 %8, 1
store i32 %9, i32* %2
br label %11
10: ; preds = %0
br label %11
11: ; preds = %10, %6
%12 = load %struct.hiena_dcel*, %struct.hiena_dcel** %3
%13 = call i32 @dcel_cleanup(%struct.hiena_dcel* %12)
ret i32 0
}

LLVM IR (-O2):
%struct.hiena_dcel = type { i32 }
@.str = [15 x i8] c"err new_dcel()\00"
define i32 @main() {
%1 = tail call %struct.hiena_dcel* @dcel_new(i32* null)
%2 = icmp eq %struct.hiena_dcel* %1, null
br i1 %2, label %3, label %5
3: ; preds = %0
%4 = tail call i32 @perror(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0))
br label %5
5: ; preds = %0, %3
%6 = tail call i32 @dcel_cleanup(%struct.hiena_dcel* %1)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ dprintf(int, char *);
void print_help(int fd) {
  dprintf(fd, "Short Help Text:\n"
              "  h, help                 - This Help Text\n"
              "  frame_debug <on/off>    - Set state of Frame Debugging\n"
              "  list [class]            - Show parameter List\n"
              "  g, get <p_name>         - Query Parameter\n"
              "  gvu <p_name>            - Get Value of Parameter with Unit\n"
              "  s, set <p_name> <value> - Set Parameter\n"
              "  gc <class>              - Query a class of Parameters\n"
              "     Parameterklassen:\n"
              "       P_ALLE       0\n"
              "       P_ERRORS     1\n"
              "       P_ALLGEMEIN  2\n"
              "       P_KESSEL     3\n"
              "       P_WARMWASSER 4\n"
              "       P_HEIZKREIS  5\n"
              "       P_BRENNER    6\n"
              "       P_HYDRAULIK  7\n"
              "\n");
}


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

x86 assembly (clang, -O2):
<print_help>:
lea    0xee9(%rip),%rsi
jmp    1030 <dprintf@plt>

LLVM IR (-O0):
@.str = [569 x i8] c"Short Help Text:\0A h, help - This Help Text\0A frame_debug <on/off> - Set state of Frame Debugging\0A list [class] - Show parameter List\0A g, get <p_name> - Query Parameter\0A gvu <p_name> - Get Value of Parameter with Unit\0A s, set <p_name> <value> - Set Parameter\0A gc <class> - Query a class of Parameters\0A Parameterklassen:\0A P_ALLE 0\0A P_ERRORS 1\0A P_ALLGEMEIN 2\0A P_KESSEL 3\0A P_WARMWASSER 4\0A P_HEIZKREIS 5\0A P_BRENNER 6\0A P_HYDRAULIK 7\0A\0A\00"
define void @print_help(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = call i32 @dprintf(i32 %3, i8* getelementptr inbounds ([569 x i8], [569 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [569 x i8] c"Short Help Text:\0A h, help - This Help Text\0A frame_debug <on/off> - Set state of Frame Debugging\0A list [class] - Show parameter List\0A g, get <p_name> - Query Parameter\0A gvu <p_name> - Get Value of Parameter with Unit\0A s, set <p_name> <value> - Set Parameter\0A gc <class> - Query a class of Parameters\0A Parameterklassen:\0A P_ALLE 0\0A P_ERRORS 1\0A P_ALLGEMEIN 2\0A P_KESSEL 3\0A P_WARMWASSER 4\0A P_HEIZKREIS 5\0A P_BRENNER 6\0A P_HYDRAULIK 7\0A\0A\00"
define void @print_help(i32 %0) {
%2 = tail call i32 @dprintf(i32 %0, i8* getelementptr inbounds ([569 x i8], [569 x i8]* @.str, i64 0, i64 0))
ret void
}
void _Jv_AllocObjectNoFinalizer() {}


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

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

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

LLVM IR (-O2):
define void @_Jv_AllocObjectNoFinalizer() {
ret void
}
double yardsToKilometres(double yards) { return yards * 0.0009144; }


x86 assembly (clang, -O0):
<yardsToKilometres>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
movsd  0xeef(%rip),%xmm0
mulsd  -0x8(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<yardsToKilometres>:
mulsd  0xef8(%rip),%xmm0
ret

LLVM IR (-O0):
define double @yardsToKilometres(double %0) {
%2 = alloca double
store double %0, double* %2
%3 = load double, double* %2
%4 = fmul double %3, 9.144000e-04
ret double %4
}

LLVM IR (-O2):
define double @yardsToKilometres(double %0) {
%2 = fmul double %0, 9.144000e-04
ret double %2
}
void native_just_call(void (*callback)()) { callback(); }


x86 assembly (clang, -O0):
<native_just_call>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    $0x0,%al
call   *-0x8(%rbp)
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<native_just_call>:
xor    %eax,%eax
jmp    *%rdi

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

LLVM IR (-O2):
define void @native_just_call(void (...)* nocapture %0) {
tail call void (...) %0()
ret void
}
/* Variables and functions */
char *ensure_real_path(char *);
char *determine_executable_name(char *argv0) { return ensure_real_path(argv0); }


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

x86 assembly (clang, -O2):
<determine_executable_name>:
jmp    1030 <ensure_real_path@plt>

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

LLVM IR (-O2):
define i8* @determine_executable_name(i8* %0) {
%2 = tail call i8* @ensure_real_path(i8* %0)
ret i8* %2
}
int zm(char a) {
  if ((a >= 'a' && a <= 'z') || (a >= 'A' && a <= 'Z'))
    return 1;
  return 0;
}


x86 assembly (clang, -O0):
<zm>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x5(%rbp)
movsbl -0x5(%rbp),%eax
cmp    $0x61,%eax
jl     1124 <zm+0x24>
movsbl -0x5(%rbp),%eax
cmp    $0x7a,%eax
jle    113e <zm+0x3e>
movsbl -0x5(%rbp),%eax
cmp    $0x41,%eax
jl     114a <zm+0x4a>
movsbl -0x5(%rbp),%eax
cmp    $0x5a,%eax
jg     114a <zm+0x4a>
movl   $0x1,-0x4(%rbp)
jmp    1151 <zm+0x51>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<zm>:
and    $0xdf,%dil
add    $0xbf,%dil
xor    %eax,%eax
cmp    $0x1a,%dil
setb   %al
ret

LLVM IR (-O0):
define i32 @zm(i8 signext %0) {
%2 = alloca i32
%3 = alloca i8
store i8 %0, i8* %3
%4 = load i8, i8* %3
%5 = sext i8 %4 to i32
%6 = icmp sge i32 %5, 97
br i1 %6, label %7, label %11
7: ; preds = %1
%8 = load i8, i8* %3
%9 = sext i8 %8 to i32
%10 = icmp sle i32 %9, 122
br i1 %10, label %19, label %11
11: ; preds = %7, %1
%12 = load i8, i8* %3
%13 = sext i8 %12 to i32
%14 = icmp sge i32 %13, 65
br i1 %14, label %15, label %20
15: ; preds = %11
%16 = load i8, i8* %3
%17 = sext i8 %16 to i32
%18 = icmp sle i32 %17, 90
br i1 %18, label %19, label %20
19: ; preds = %15, %7
store i32 1, i32* %2
br label %21
20: ; preds = %15, %11
store i32 0, i32* %2
br label %21
21: ; preds = %20, %19
%22 = load i32, i32* %2
ret i32 %22
}

LLVM IR (-O2):
define i32 @zm(i8 signext %0) {
%2 = and i8 %0, -33
%3 = add i8 %2, -65
%4 = icmp ult i8 %3, 26
%5 = zext i1 %4 to i32
ret i32 %5
}
void endian_(int *nval) {
  short int one = 1;
  *nval = ((int)*(char *)&one);
}


x86 assembly (clang, -O0):
<endian_>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movw   $0x1,-0xa(%rbp)
movsbl -0xa(%rbp),%ecx
mov    -0x8(%rbp),%rax
mov    %ecx,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<endian_>:
movl   $0x1,(%rdi)
ret

LLVM IR (-O0):
define void @endian_(i32* %0) {
%2 = alloca i32*
%3 = alloca i16
store i32* %0, i32** %2
store i16 1, i16* %3
%4 = bitcast i16* %3 to i8*
%5 = load i8, i8* %4
%6 = sext i8 %5 to i32
%7 = load i32*, i32** %2
store i32 %6, i32* %7
ret void
}

LLVM IR (-O2):
define void @endian_(i32* nocapture writeonly %0) {
store i32 1, i32* %0
ret void
}
/* Variables and functions */
int /*<<< orphan*/ xip_fpo_log_flt(float *, float);
float xil_fpo_log_flt(float a) {
  float res_flt;
  xip_fpo_log_flt(&res_flt, a);
  return res_flt;
}


x86 assembly (clang, -O0):
<xil_fpo_log_flt>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movss  %xmm0,-0x4(%rbp)
movss  -0x4(%rbp),%xmm0
lea    -0x8(%rbp),%rdi
call   1030 <xip_fpo_log_flt@plt>
movss  -0x8(%rbp),%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<xil_fpo_log_flt>:
push   %rax
lea    0x4(%rsp),%rdi
call   1030 <xip_fpo_log_flt@plt>
movss  0x4(%rsp),%xmm0
pop    %rax
ret

LLVM IR (-O0):
define float @xil_fpo_log_flt(float %0) {
%2 = alloca float
%3 = alloca float
store float %0, float* %2
%4 = load float, float* %2
%5 = call i32 @xip_fpo_log_flt(float* %3, float %4)
%6 = load float, float* %3
ret float %6
}

LLVM IR (-O2):
define float @xil_fpo_log_flt(float %0) {
%2 = alloca float
%3 = bitcast float* %2 to i8*
%4 = call i32 @xip_fpo_log_flt(float* %2, float %0)
%5 = load float, float* %2
ret float %5
}
void g_log() {}


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

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

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

LLVM IR (-O2):
define void @g_log() {
ret void
}
/* Type definitions */
struct sockaddr_in {
  int /*<<< orphan*/ sin_port;
  int /*<<< orphan*/ sin_addr;
};

/* Variables and functions */
int htons(int /*<<< orphan*/);
char *inet_ntoa(int /*<<< orphan*/);
int /*<<< orphan*/ printf(char *, char *, int);
void debug_print(void *arg) {
  struct sockaddr_in *addr = (struct sockaddr_in *)arg;
  printf("%s %d", inet_ntoa(addr->sin_addr), htons(addr->sin_port));
}


x86 assembly (clang, -O0):
<debug_print>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    0x4(%rax),%edi
call   1030 <inet_ntoa@plt>
mov    %rax,-0x18(%rbp)
mov    -0x10(%rbp),%rax
mov    (%rax),%edi
call   1040 <htons@plt>
mov    -0x18(%rbp),%rsi
mov    %eax,%edx
lea    0xe94(%rip),%rdi
call   1050 <printf@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<debug_print>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%rbx
mov    0x4(%rdi),%edi
call   1030 <inet_ntoa@plt>
mov    %rax,%r14
mov    (%rbx),%edi
call   1040 <htons@plt>
lea    0xeb0(%rip),%rdi
mov    %r14,%rsi
mov    %eax,%edx
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1050 <printf@plt>

LLVM IR (-O0):
%struct.sockaddr_in = type { i32, i32 }
@.str = [6 x i8] c"%s %d\00"
define void @debug_print(i8* %0) {
%2 = alloca i8*
%3 = alloca %struct.sockaddr_in*
store i8* %0, i8** %2
%4 = load i8*, i8** %2
%5 = bitcast i8* %4 to %struct.sockaddr_in*
store %struct.sockaddr_in* %5, %struct.sockaddr_in** %3
%6 = load %struct.sockaddr_in*, %struct.sockaddr_in** %3
%7 = getelementptr inbounds %struct.sockaddr_in, %struct.sockaddr_in* %6, i32 0, i32 1
%8 = load i32, i32* %7
%9 = call i8* @inet_ntoa(i32 %8)
%10 = load %struct.sockaddr_in*, %struct.sockaddr_in** %3
%11 = getelementptr inbounds %struct.sockaddr_in, %struct.sockaddr_in* %10, i32 0, i32 0
%12 = load i32, i32* %11
%13 = call i32 @htons(i32 %12)
%14 = call i32 @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i8* %9, i32 %13)
ret void
}

LLVM IR (-O2):
@.str = [6 x i8] c"%s %d\00"
define void @debug_print(i8* nocapture %0) {
%2 = getelementptr inbounds i8, i8* %0, i64 4
%3 = bitcast i8* %2 to i32*
%4 = load i32, i32* %3
%5 = tail call i8* @inet_ntoa(i32 %4)
%6 = bitcast i8* %0 to i32*
%7 = load i32, i32* %6
%8 = tail call i32 @htons(i32 %7)
%9 = tail call i32 @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i8* %5, i32 %8)
ret void
}
/* Type definitions */
struct sx_prefix {
  int dummy;
};

/* Variables and functions */
int sx_prefix_snprintf_sep(struct sx_prefix *, char *, int, char *);
int sx_prefix_snprintf(struct sx_prefix *p, char *rbuffer, int srb) {
  return sx_prefix_snprintf_sep(p, rbuffer, srb, "/");
}


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

x86 assembly (clang, -O2):
<sx_prefix_snprintf>:
lea    0xee9(%rip),%rcx
jmp    1030 <sx_prefix_snprintf_sep@plt>

LLVM IR (-O0):
%struct.sx_prefix = type { i32 }
@.str = [2 x i8] c"/\00"
define i32 @sx_prefix_snprintf(%struct.sx_prefix* %0, i8* %1, i32 %2) {
%4 = alloca %struct.sx_prefix*
%5 = alloca i8*
%6 = alloca i32
store %struct.sx_prefix* %0, %struct.sx_prefix** %4
store i8* %1, i8** %5
store i32 %2, i32* %6
%7 = load %struct.sx_prefix*, %struct.sx_prefix** %4
%8 = load i8*, i8** %5
%9 = load i32, i32* %6
%10 = call i32 @sx_prefix_snprintf_sep(%struct.sx_prefix* %7, i8* %8, i32 %9, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
ret i32 %10
}

LLVM IR (-O2):
%struct.sx_prefix = type { i32 }
@.str = [2 x i8] c"/\00"
define i32 @sx_prefix_snprintf(%struct.sx_prefix* %0, i8* %1, i32 %2) {
%4 = tail call i32 @sx_prefix_snprintf_sep(%struct.sx_prefix* %0, i8* %1, i32 %2, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
ret i32 %4
}
char *extend(p, name)
register char *p;
const char *name;
{
  register int l;
  l = strlen(name);
  bcopy(name, p, l);
  p += l;
  *p++ = ',';
  *p++ = ' ';
  return (p);
}


x86 assembly (clang, -O0):
<extend>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
call   1030 <strlen@plt>
mov    %eax,-0x14(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x8(%rbp),%rsi
mov    -0x14(%rbp),%edx
mov    $0x0,%al
call   1040 <bcopy@plt>
mov    -0x14(%rbp),%ecx
mov    -0x8(%rbp),%rax
movslq %ecx,%rcx
add    %rcx,%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x8(%rbp)
movb   $0x2c,(%rax)
mov    -0x8(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x8(%rbp)
movb   $0x20,(%rax)
mov    -0x8(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<extend>:
push   %r15
push   %r14
push   %rbx
mov    %rsi,%r14
mov    %rdi,%rbx
mov    %rsi,%rdi
call   1030 <strlen@plt>
mov    %rax,%r15
mov    %r14,%rdi
mov    %rbx,%rsi
mov    %r15d,%edx
xor    %eax,%eax
call   1040 <bcopy@plt>
movslq %r15d,%rax
movw   $0x202c,(%rbx,%rax,1)
add    %rbx,%rax
add    $0x2,%rax
pop    %rbx
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
define i8* @extend(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
%5 = alloca i32
store i8* %0, i8** %3
store i8* %1, i8** %4
%6 = load i8*, i8** %4
%7 = call i64 @strlen(i8* %6)
%8 = trunc i64 %7 to i32
store i32 %8, i32* %5
%9 = load i8*, i8** %4
%10 = load i8*, i8** %3
%11 = load i32, i32* %5
%12 = call i32 (i8*, i8*, i32, ...) bitcast (i32 (...)* @bcopy to i32 (i8*, i8*, i32, ...)*)(i8* %9, i8* %10, i32 %11)
%13 = load i32, i32* %5
%14 = load i8*, i8** %3
%15 = sext i32 %13 to i64
%16 = getelementptr inbounds i8, i8* %14, i64 %15
store i8* %16, i8** %3
%17 = load i8*, i8** %3
%18 = getelementptr inbounds i8, i8* %17, i32 1
store i8* %18, i8** %3
store i8 44, i8* %17
%19 = load i8*, i8** %3
%20 = getelementptr inbounds i8, i8* %19, i32 1
store i8* %20, i8** %3
store i8 32, i8* %19
%21 = load i8*, i8** %3
ret i8* %21
}

LLVM IR (-O2):
define i8* @extend(i8* %0, i8* %1) {
%3 = tail call i64 @strlen(i8* dereferenceable(1) %1)
%4 = trunc i64 %3 to i32
%5 = tail call i32 (i8*, i8*, i32, ...) bitcast (i32 (...)* @bcopy to i32 (i8*, i8*, i32, ...)*)(i8* %1, i8* %0, i32 %4)
%6 = shl i64 %3, 32
%7 = ashr exact i64 %6, 32
%8 = getelementptr inbounds i8, i8* %0, i64 %7
%9 = getelementptr inbounds i8, i8* %8, i64 1
store i8 44, i8* %8
%10 = getelementptr inbounds i8, i8* %9, i64 1
store i8 32, i8* %9
ret i8* %10
}
/* Variables and functions */
int strcmp(char *, char *);
int cmpstr(const void *s1, const void *s2) {
  return strcmp((char *)s1, (char *)s2);
}


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

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

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

LLVM IR (-O2):
define i32 @cmpstr(i8* nocapture %0, i8* nocapture %1) {
%3 = tail call i32 @strcmp(i8* dereferenceable(1) %0, i8* dereferenceable(1) %1)
ret i32 %3
}
void bar(char *p) {}


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

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

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

LLVM IR (-O2):
define void @bar(i8* nocapture %0) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ mbox_writeread(unsigned int);
unsigned get_core_clock(void) {
  unsigned proptag[] __attribute__((aligned(16))) = {
      8 * 4, 0x00000000, 0x00030002, 4 * 4, 1 * 4, 4, 0, 0x00000000};
  mbox_writeread((unsigned)(unsigned long)&proptag);
  return proptag[6];
}


x86 assembly (clang, -O0):
<get_core_clock>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    0xee1(%rip),%rax
mov    %rax,-0x20(%rbp)
mov    0xede(%rip),%rax
mov    %rax,-0x18(%rbp)
mov    0xedb(%rip),%rax
mov    %rax,-0x10(%rbp)
mov    0xed8(%rip),%rax
mov    %rax,-0x8(%rbp)
lea    -0x20(%rbp),%rax
mov    %eax,%edi
call   1030 <mbox_writeread@plt>
mov    -0x8(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_core_clock>:
sub    $0x28,%rsp
movaps 0xef5(%rip),%xmm0
movaps %xmm0,0x10(%rsp)
movaps 0xed9(%rip),%xmm0
movaps %xmm0,(%rsp)
mov    %rsp,%rdi
call   1030 <mbox_writeread@plt>
mov    0x18(%rsp),%eax
add    $0x28,%rsp
ret

LLVM IR (-O0):
@__const.get_core_clock.proptag = [8 x i32] [i32 32, i32 0, i32 196610, i32 16, i32 4, i32 4, i32 0, i32 0]
define i32 @get_core_clock() {
%1 = alloca [8 x i32]
%2 = bitcast [8 x i32]* %1 to i8*
%3 = ptrtoint [8 x i32]* %1 to i64
%4 = trunc i64 %3 to i32
%5 = call i32 @mbox_writeread(i32 %4)
%6 = getelementptr inbounds [8 x i32], [8 x i32]* %1, i64 0, i64 6
%7 = load i32, i32* %6
ret i32 %7
}

LLVM IR (-O2):
@__const.get_core_clock.proptag = [8 x i32] [i32 32, i32 0, i32 196610, i32 16, i32 4, i32 4, i32 0, i32 0]
define i32 @get_core_clock() {
%1 = alloca [8 x i32]
%2 = bitcast [8 x i32]* %1 to i8*
%3 = ptrtoint [8 x i32]* %1 to i64
%4 = trunc i64 %3 to i32
%5 = call i32 @mbox_writeread(i32 %4)
%6 = getelementptr inbounds [8 x i32], [8 x i32]* %1, i64 0, i64 6
%7 = load i32, i32* %6
ret i32 %7
}
void mem_manage_exception(void) {
  while (1)
    ;
}


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

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

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

LLVM IR (-O2):
define void @mem_manage_exception() {
br label %1
1: ; preds = %0, %1
br label %1
}
/* Variables and functions */
long double sinl(long double);
long double cbuiltin_sinl(long double x) { return sinl(x); }


x86 assembly (clang, -O0):
<cbuiltin_sinl>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
fldt   0x10(%rbp)
fstpt  -0x10(%rbp)
fldt   -0x10(%rbp)
mov    %rsp,%rax
fstpt  (%rax)
call   1030 <sinl@plt>
fld    %st(0)
fstp   %st(0)
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<cbuiltin_sinl>:
jmp    1030 <sinl@plt>

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

LLVM IR (-O2):
define x86_fp80 @cbuiltin_sinl(x86_fp80 %0) {
%2 = tail call x86_fp80 @sinl(x86_fp80 %0)
ret x86_fp80 %2
}
/* Type definitions */
typedef int /*<<< orphan*/ uint8_t;

/* Variables and functions */
size_t fread(int /*<<< orphan*/ *, int, size_t, void *);
size_t stream_read(void *priv, size_t len, uint8_t *buf) {
  return fread(buf, 1, len, priv);
}


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

x86 assembly (clang, -O2):
<stream_read>:
mov    %rdx,%rax
mov    %rsi,%rdx
mov    %rdi,%rcx
mov    %rax,%rdi
mov    $0x1,%esi
jmp    1030 <fread@plt>

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

LLVM IR (-O2):
define i64 @stream_read(i8* nocapture %0, i64 %1, i32* nocapture %2) {
%4 = tail call i64 @fread(i32* %2, i32 1, i64 %1, i8* %0)
ret i64 %4
}
/* Variables and functions */
scalar_t__ GLeeInit();
int /*<<< orphan*/ pglResizeBuffersMESA();
void _Lazy_glResizeBuffersMESA(void) {
  if (GLeeInit())
    pglResizeBuffersMESA();
}


x86 assembly (clang, -O0):
<_Lazy_glResizeBuffersMESA>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1030 <GLeeInit@plt>
cmp    $0x0,%rax
je     113c <_Lazy_glResizeBuffersMESA+0x1c>
mov    $0x0,%al
call   1040 <pglResizeBuffersMESA@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<_Lazy_glResizeBuffersMESA>:
push   %rax
xor    %eax,%eax
call   1030 <GLeeInit@plt>
test   %rax,%rax
je     1135 <_Lazy_glResizeBuffersMESA+0x15>
xor    %eax,%eax
pop    %rcx
jmp    1040 <pglResizeBuffersMESA@plt>
pop    %rax
ret

LLVM IR (-O0):
define void @_Lazy_glResizeBuffersMESA() {
%1 = call i64 (...) @GLeeInit()
%2 = icmp ne i64 %1, 0
br i1 %2, label %3, label %5
3: ; preds = %0
%4 = call i32 (...) @pglResizeBuffersMESA()
br label %5
5: ; preds = %3, %0
ret void
}

LLVM IR (-O2):
define void @_Lazy_glResizeBuffersMESA() {
%1 = tail call i64 (...) @GLeeInit()
%2 = icmp eq i64 %1, 0
br i1 %2, label %5, label %3
3: ; preds = %0
%4 = tail call i32 (...) @pglResizeBuffersMESA()
br label %5
5: ; preds = %3, %0
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, short, int, short);
int fun_call_align_7(short a, int b, short c) {
  printf("a = %d, b = %d, c = %d\n", a, b, c);
  return a + b + c;
}


x86 assembly (clang, -O0):
<fun_call_align_7>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %dx,%ax
mov    %di,%cx
mov    %cx,-0x2(%rbp)
mov    %esi,-0x8(%rbp)
mov    %ax,-0xa(%rbp)
mov    -0x2(%rbp),%ax
mov    -0x8(%rbp),%edx
lea    0xec9(%rip),%rdi
movswl %ax,%esi
movswl -0xa(%rbp),%ecx
call   1030 <printf@plt>
movswl -0x2(%rbp),%eax
add    -0x8(%rbp),%eax
movswl -0xa(%rbp),%ecx
add    %ecx,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fun_call_align_7>:
push   %rbp
push   %r14
push   %rbx
mov    %edx,%r14d
mov    %esi,%ebp
mov    %edi,%ebx
lea    0xede(%rip),%rdi
mov    %ebx,%esi
mov    %ebp,%edx
mov    %r14d,%ecx
call   1030 <printf@plt>
add    %ebp,%ebx
add    %r14d,%ebx
mov    %ebx,%eax
pop    %rbx
pop    %r14
pop    %rbp
ret

LLVM IR (-O0):
@.str = [24 x i8] c"a = %d, b = %d, c = %d\0A\00"
define i32 @fun_call_align_7(i16 signext %0, i32 %1, i16 signext %2) {
%4 = alloca i16
%5 = alloca i32
%6 = alloca i16
store i16 %0, i16* %4
store i32 %1, i32* %5
store i16 %2, i16* %6
%7 = load i16, i16* %4
%8 = load i32, i32* %5
%9 = load i16, i16* %6
%10 = call i32 @printf(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str, i64 0, i64 0), i16 signext %7, i32 %8, i16 signext %9)
%11 = load i16, i16* %4
%12 = sext i16 %11 to i32
%13 = load i32, i32* %5
%14 = add nsw i32 %12, %13
%15 = load i16, i16* %6
%16 = sext i16 %15 to i32
%17 = add nsw i32 %14, %16
ret i32 %17
}

LLVM IR (-O2):
@.str = [24 x i8] c"a = %d, b = %d, c = %d\0A\00"
define i32 @fun_call_align_7(i16 signext %0, i32 %1, i16 signext %2) {
%4 = tail call i32 @printf(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str, i64 0, i64 0), i16 signext %0, i32 %1, i16 signext %2)
%5 = sext i16 %0 to i32
%6 = add nsw i32 %5, %1
%7 = sext i16 %2 to i32
%8 = add nsw i32 %6, %7
ret i32 %8
}
/* Variables and functions */
int /*<<< orphan*/ print_str(long, long, char *);
void draw_star(long x, long y, long z) { print_str(x, y, "."); }


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

x86 assembly (clang, -O2):
<draw_star>:
lea    0xee9(%rip),%rdx
jmp    1030 <print_str@plt>

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

LLVM IR (-O2):
@.str = [2 x i8] c".\00"
define void @draw_star(i64 %0, i64 %1, i64 %2) {
%4 = tail call i32 @print_str(i64 %0, i64 %1, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
ret void
}
int snb_offcore_num(void) { return (2); }


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

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

LLVM IR (-O0):
define i32 @snb_offcore_num() {
ret i32 2
}

LLVM IR (-O2):
define i32 @snb_offcore_num() {
ret i32 2
}
unsigned xrop3_107_0_0(unsigned char s, unsigned char t) {
  unsigned D = 0x00ff;
  unsigned S = ((unsigned)s << 8) | s;
  unsigned T = ((unsigned)t << 8) | t;
  unsigned stk1;
  unsigned stk2;
  unsigned stk3;
  unsigned stk4;
  stk4 = T | S;
  stk3 = D & stk4;
  stk2 = S ^ stk3;
  stk1 = T ^ stk2;
  stk1 = ~stk1;
  return stk1;
}


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

x86 assembly (clang, -O2):
<xrop3_107_0_0>:
mov    %edi,%eax
shl    $0x8,%eax
or     %edi,%eax
mov    %esi,%ecx
shl    $0x8,%ecx
or     %esi,%ecx
or     %edi,%esi
xor    %esi,%eax
xor    %ecx,%eax
not    %eax
ret

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

LLVM IR (-O2):
define i32 @xrop3_107_0_0(i8 zeroext %0, i8 zeroext %1) {
%3 = zext i8 %0 to i32
%4 = mul nuw nsw i32 %3, 257
%5 = zext i8 %1 to i32
%6 = mul nuw nsw i32 %5, 257
%7 = or i8 %1, %0
%8 = zext i8 %7 to i32
%9 = xor i32 %4, %8
%10 = xor i32 %9, %6
%11 = xor i32 %10, -1
ret i32 %11
}