xunge/DecIR huggingface dataset:
/* Variables and functions */
char getchar();
void clean_stdin() {
  int c;
  while (c = getchar() != '\n')
    ;
}


x86 assembly (clang, -O0):
<clean_stdin>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1030 <getchar@plt>
movsbl %al,%eax
cmp    $0xa,%eax
setne  %al
mov    %al,%cl
and    $0x1,%cl
movzbl %cl,%ecx
mov    %ecx,-0x4(%rbp)
test   $0x1,%al
jne    1140 <clean_stdin+0x30>
jmp    1145 <clean_stdin+0x35>
jmp    1118 <clean_stdin+0x8>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<clean_stdin>:
push   %rax
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
xor    %eax,%eax
call   1030 <getchar@plt>
cmp    $0xa,%al
jne    1120 <clean_stdin+0x10>
pop    %rax
ret

LLVM IR (-O0):
define void @clean_stdin() {
%1 = alloca i32
br label %2
2: ; preds = %7, %0
%3 = call signext i8 (...) @getchar()
%4 = sext i8 %3 to i32
%5 = icmp ne i32 %4, 10
%6 = zext i1 %5 to i32
store i32 %6, i32* %1
br i1 %5, label %7, label %8
7: ; preds = %2
br label %2
8: ; preds = %2
ret void
}

LLVM IR (-O2):
define void @clean_stdin() {
br label %1
1: ; preds = %1, %0
%2 = tail call signext i8 (...) @getchar()
%3 = icmp eq i8 %2, 10
br i1 %3, label %4, label %1
4: ; preds = %1
ret void
}
/* Variables and functions */
int pixma_get_info(unsigned char *);
int pixma_adf_is_ready() {
  unsigned char info[0x0c];
  return pixma_get_info(info) == 0x0606 && !info[1];
}


x86 assembly (clang, -O0):
<pixma_adf_is_ready>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    -0xc(%rbp),%rdi
call   1030 <pixma_get_info@plt>
mov    %eax,%ecx
xor    %eax,%eax
cmp    $0x606,%ecx
mov    %al,-0xd(%rbp)
jne    1140 <pixma_adf_is_ready+0x30>
cmpb   $0x0,-0xb(%rbp)
setne  %al
xor    $0xff,%al
mov    %al,-0xd(%rbp)
mov    -0xd(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<pixma_adf_is_ready>:
sub    $0x18,%rsp
lea    0xc(%rsp),%rdi
call   1030 <pixma_get_info@plt>
cmp    $0x606,%eax
sete   %al
cmpb   $0x0,0xd(%rsp)
sete   %cl
and    %al,%cl
movzbl %cl,%eax
add    $0x18,%rsp
ret

LLVM IR (-O0):
define i32 @pixma_adf_is_ready() {
%1 = alloca [12 x i8]
%2 = getelementptr inbounds [12 x i8], [12 x i8]* %1, i64 0, i64 0
%3 = call i32 @pixma_get_info(i8* %2)
%4 = icmp eq i32 %3, 1542
br i1 %4, label %5, label %10
5: ; preds = %0
%6 = getelementptr inbounds [12 x i8], [12 x i8]* %1, i64 0, i64 1
%7 = load i8, i8* %6
%8 = icmp ne i8 %7, 0
%9 = xor i1 %8, true
br label %10
10: ; preds = %5, %0
%11 = phi i1 [ false, %0 ], [ %9, %5 ]
%12 = zext i1 %11 to i32
ret i32 %12
}

LLVM IR (-O2):
define i32 @pixma_adf_is_ready() {
%1 = alloca [12 x i8]
%2 = getelementptr inbounds [12 x i8], [12 x i8]* %1, i64 0, i64 0
%3 = call i32 @pixma_get_info(i8* %2)
%4 = icmp eq i32 %3, 1542
%5 = getelementptr inbounds [12 x i8], [12 x i8]* %1, i64 0, i64 1
%6 = load i8, i8* %5
%7 = icmp eq i8 %6, 0
%8 = select i1 %4, i1 %7, i1 false
%9 = zext i1 %8 to i32
ret i32 %9
}
/* Variables and functions */
int /*<<< orphan*/ EVP_sha256();
unsigned char *crypto_hash(unsigned char const *, size_t, size_t *,
                           int /*<<< orphan*/);
unsigned char *crypto_sha256(const unsigned char *bytes, size_t len,
                             size_t *olen) {
  return crypto_hash(bytes, len, olen, EVP_sha256());
}


x86 assembly (clang, -O0):
<crypto_sha256>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x30(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x28(%rbp)
mov    -0x18(%rbp),%rax
mov    %rax,-0x20(%rbp)
mov    $0x0,%al
call   1040 <EVP_sha256@plt>
mov    -0x30(%rbp),%rdi
mov    -0x28(%rbp),%rsi
mov    -0x20(%rbp),%rdx
mov    %eax,%ecx
call   1030 <crypto_hash@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<crypto_sha256>:
push   %r15
push   %r14
push   %rbx
mov    %rdx,%r14
mov    %rsi,%r15
mov    %rdi,%rbx
xor    %eax,%eax
call   1040 <EVP_sha256@plt>
mov    %rbx,%rdi
mov    %r15,%rsi
mov    %r14,%rdx
mov    %eax,%ecx
pop    %rbx
pop    %r14
pop    %r15
jmp    1030 <crypto_hash@plt>

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

LLVM IR (-O2):
define i8* @crypto_sha256(i8* %0, i64 %1, i64* %2) {
%4 = tail call i32 (...) @EVP_sha256()
%5 = tail call i8* @crypto_hash(i8* %0, i64 %1, i64* %2, i32 %4)
ret i8* %5
}
void mng_fhsm(char *cwd, int unmount) {}


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

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

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

LLVM IR (-O2):
define void @mng_fhsm(i8* nocapture %0, i32 %1) {
ret void
}
void smpx(s1, m, s2, buf, len) char *s1, *s2, *m, *buf;
int len;
{
  printf(s1, m);
  print_c_hex_string(buf, len);
  printf(s2);
}


x86 assembly (clang, -O0):
<smpx>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    %r8d,-0x24(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x20(%rbp),%rdi
mov    -0x24(%rbp),%esi
mov    $0x0,%al
call   1040 <print_c_hex_string@plt>
mov    -0x18(%rbp),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<smpx>:
push   %rbp
push   %r14
push   %rbx
mov    %r8d,%ebp
mov    %rcx,%rbx
mov    %rdx,%r14
xor    %eax,%eax
call   1030 <printf@plt>
mov    %rbx,%rdi
mov    %ebp,%esi
xor    %eax,%eax
call   1040 <print_c_hex_string@plt>
mov    %r14,%rdi
xor    %eax,%eax
pop    %rbx
pop    %r14
pop    %rbp
jmp    1030 <printf@plt>

LLVM IR (-O0):
define void @smpx(i8* %0, i8* %1, i8* %2, i8* %3, i32 %4) {
%6 = alloca i8*
%7 = alloca i8*
%8 = alloca i8*
%9 = alloca i8*
%10 = alloca i32
store i8* %0, i8** %6
store i8* %1, i8** %7
store i8* %2, i8** %8
store i8* %3, i8** %9
store i32 %4, i32* %10
%11 = load i8*, i8** %6
%12 = load i8*, i8** %7
%13 = call i32 (i8*, ...) @printf(i8* %11, i8* %12)
%14 = load i8*, i8** %9
%15 = load i32, i32* %10
%16 = call i32 (i8*, i32, ...) bitcast (i32 (...)* @print_c_hex_string to i32 (i8*, i32, ...)*)(i8* %14, i32 %15)
%17 = load i8*, i8** %8
%18 = call i32 (i8*, ...) @printf(i8* %17)
ret void
}

LLVM IR (-O2):
define void @smpx(i8* nocapture %0, i8* %1, i8* nocapture %2, i8* %3, i32 %4) {
%6 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) %0, i8* %1)
%7 = tail call i32 (i8*, i32, ...) bitcast (i32 (...)* @print_c_hex_string to i32 (i8*, i32, ...)*)(i8* %3, i32 %4)
%8 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) %2)
ret void
}
void swap(int *num1, int *num2) {
  *num1 = *num1 ^ *num2;
  *num2 = *num1 ^ *num2;
  *num1 = *num1 ^ *num2;
}


x86 assembly (clang, -O0):
<swap>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%ecx
mov    -0x10(%rbp),%rax
xor    (%rax),%ecx
mov    -0x8(%rbp),%rax
mov    %ecx,(%rax)
mov    -0x8(%rbp),%rax
mov    (%rax),%ecx
mov    -0x10(%rbp),%rax
xor    (%rax),%ecx
mov    -0x10(%rbp),%rax
mov    %ecx,(%rax)
mov    -0x8(%rbp),%rax
mov    (%rax),%ecx
mov    -0x10(%rbp),%rax
xor    (%rax),%ecx
mov    -0x8(%rbp),%rax
mov    %ecx,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<swap>:
mov    (%rsi),%eax
xor    (%rdi),%eax
mov    %eax,(%rdi)
xor    (%rsi),%eax
mov    %eax,(%rsi)
xor    %eax,(%rdi)
ret

LLVM IR (-O0):
define void @swap(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* %5
%7 = load i32*, i32** %4
%8 = load i32, i32* %7
%9 = xor i32 %6, %8
%10 = load i32*, i32** %3
store i32 %9, i32* %10
%11 = load i32*, i32** %3
%12 = load i32, i32* %11
%13 = load i32*, i32** %4
%14 = load i32, i32* %13
%15 = xor i32 %12, %14
%16 = load i32*, i32** %4
store i32 %15, i32* %16
%17 = load i32*, i32** %3
%18 = load i32, i32* %17
%19 = load i32*, i32** %4
%20 = load i32, i32* %19
%21 = xor i32 %18, %20
%22 = load i32*, i32** %3
store i32 %21, i32* %22
ret void
}

LLVM IR (-O2):
define void @swap(i32* nocapture %0, i32* nocapture %1) {
%3 = load i32, i32* %0
%4 = load i32, i32* %1
%5 = xor i32 %4, %3
store i32 %5, i32* %0
%6 = load i32, i32* %1
%7 = xor i32 %6, %5
store i32 %7, i32* %1
%8 = load i32, i32* %0
%9 = xor i32 %8, %7
store i32 %9, i32* %0
ret void
}
/* Variables and functions */
int /*<<< orphan*/ op_to_sr(char *);
void i_andi_sr(void) { op_to_sr("and"); }


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

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

LLVM IR (-O0):
@.str = [4 x i8] c"and\00"
define void @i_andi_sr() {
%1 = call i32 @op_to_sr(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [4 x i8] c"and\00"
define void @i_andi_sr() {
%1 = tail call i32 @op_to_sr(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0))
ret void
}
void gtk_window_get_frame_dimensions() {}


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

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

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

LLVM IR (-O2):
define void @gtk_window_get_frame_dimensions() {
ret void
}
void g_return_if_fail_warning(const char *log_domain,
                              const char *pretty_function,
                              const char *expression) {}


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

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

LLVM IR (-O0):
define void @g_return_if_fail_warning(i8* %0, i8* %1, i8* %2) {
%4 = alloca i8*
%5 = alloca i8*
%6 = alloca i8*
store i8* %0, i8** %4
store i8* %1, i8** %5
store i8* %2, i8** %6
ret void
}

LLVM IR (-O2):
define void @g_return_if_fail_warning(i8* nocapture %0, i8* nocapture %1, i8* nocapture %2) {
ret void
}
char *strcat(char *dest, const char *src) {
  char *s = dest;
  for (; dest && *dest; dest++)
    ;
  while (*dest++ = *src++)
    ;
  return (s);
}


x86 assembly (clang, -O0):
<strcat>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
xor    %eax,%eax
cmpq   $0x0,-0x8(%rbp)
mov    %al,-0x19(%rbp)
je     1134 <strcat+0x34>
mov    -0x8(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x0,%eax
setne  %al
mov    %al,-0x19(%rbp)
mov    -0x19(%rbp),%al
test   $0x1,%al
jne    1144 <strcat+0x44>
jmp    115a <strcat+0x5a>
jmp    1149 <strcat+0x49>
mov    -0x8(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x8(%rbp)
jmp    1114 <strcat+0x14>
jmp    115f <strcat+0x5f>
mov    -0x10(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x10(%rbp)
mov    (%rax),%al
mov    -0x8(%rbp),%rcx
mov    %rcx,%rdx
add    $0x1,%rdx
mov    %rdx,-0x8(%rbp)
mov    %al,(%rcx)
cmp    $0x0,%al
je     118e <strcat+0x8e>
jmp    115f <strcat+0x5f>
mov    -0x18(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<strcat>:
mov    %rdi,%rax
mov    %rdi,%rcx
cs nopw 0x0(%rax,%rax,1)
cmpb   $0x0,(%rcx)
lea    0x1(%rcx),%rcx
jne    1110 <strcat+0x10>
xor    %edx,%edx
nopl   0x0(%rax,%rax,1)
movzbl (%rsi,%rdx,1),%edi
mov    %dil,-0x1(%rcx,%rdx,1)
add    $0x1,%rdx
test   %dil,%dil
jne    1120 <strcat+0x20>
ret

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

LLVM IR (-O2):
define i8* @strcat(i8* returned %0, i8* nocapture %1) {
%3 = icmp ne i8* %0, null
br label %4
4: ; preds = %2, %4
%5 = phi i8* [ %8, %4 ], [ %0, %2 ]
%6 = load i8, i8* %5
%7 = icmp eq i8 %6, 0
%8 = getelementptr inbounds i8, i8* %5, i64 1
br i1 %7, label %9, label %4
9: ; preds = %4, %9
%10 = phi i8* [ %12, %9 ], [ %1, %4 ]
%11 = phi i8* [ %14, %9 ], [ %5, %4 ]
%12 = getelementptr inbounds i8, i8* %10, i64 1
%13 = load i8, i8* %10
%14 = getelementptr inbounds i8, i8* %11, i64 1
store i8 %13, i8* %11
%15 = icmp eq i8 %13, 0
br i1 %15, label %16, label %9
16: ; preds = %9
ret i8* %0
}
double MPHtoMPS(double MPH) {
  double MPS = 0.44704 * MPH;
  return MPS;
}


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

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

LLVM IR (-O0):
define double @MPHtoMPS(double %0) {
%2 = alloca double
%3 = alloca double
store double %0, double* %2
%4 = load double, double* %2
%5 = fmul double 4.470400e-01, %4
store double %5, double* %3
%6 = load double, double* %3
ret double %6
}

LLVM IR (-O2):
define double @MPHtoMPS(double %0) {
%2 = fmul double %0, 4.470400e-01
ret double %2
}
float convertir(int gcent) {
  float gfahr;
  gfahr = 9 / 5 * gcent + 32;
  return (gfahr);
}


x86 assembly (clang, -O0):
<convertir>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
shl    $0x0,%eax
add    $0x20,%eax
cvtsi2ss %eax,%xmm0
movss  %xmm0,-0x8(%rbp)
movss  -0x8(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<convertir>:
add    $0x20,%edi
cvtsi2ss %edi,%xmm0
ret

LLVM IR (-O0):
define float @convertir(i32 %0) {
%2 = alloca i32
%3 = alloca float
store i32 %0, i32* %2
%4 = load i32, i32* %2
%5 = mul nsw i32 1, %4
%6 = add nsw i32 %5, 32
%7 = sitofp i32 %6 to float
store float %7, float* %3
%8 = load float, float* %3
ret float %8
}

LLVM IR (-O2):
define float @convertir(i32 %0) {
%2 = add nsw i32 %0, 32
%3 = sitofp i32 %2 to float
ret float %3
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ scanf(char *, int *);
int /*<<< orphan*/ towers(int, char, char, char);
int main() {
  int num;
  printf("Enter the number of disks : ");
  scanf("%d", &num);
  printf("The sequence of moves involved in the Tower of Hanoi are :\n");
  towers(num, 'A', 'C', 'B');
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeba(%rip),%rdi
call   1030 <printf@plt>
lea    0xecb(%rip),%rdi
lea    -0x8(%rbp),%rsi
call   1040 <scanf@plt>
lea    0xebe(%rip),%rdi
call   1030 <printf@plt>
mov    -0x8(%rbp),%edi
mov    $0x41,%esi
mov    $0x43,%edx
mov    $0x42,%ecx
call   1050 <towers@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xeb8(%rip),%rdi
call   1040 <printf@plt>
lea    0xec9(%rip),%rdi
lea    0x4(%rsp),%rsi
call   1050 <scanf@plt>
lea    0xebb(%rip),%rdi
call   1030 <puts@plt>
mov    0x4(%rsp),%edi
mov    $0x41,%esi
mov    $0x43,%edx
mov    $0x42,%ecx
call   1060 <towers@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [29 x i8] c"Enter the number of disks : \00"
@.str.1 = [3 x i8] c"%d\00"
@.str.2 = [60 x i8] c"The sequence of moves involved in the Tower of Hanoi are :\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
store i32 0, i32* %1
%3 = call i32 @printf(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str, i64 0, i64 0))
%4 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %2)
%5 = call i32 @printf(i8* getelementptr inbounds ([60 x i8], [60 x i8]* @.str.2, i64 0, i64 0))
%6 = load i32, i32* %2
%7 = call i32 @towers(i32 %6, i8 signext 65, i8 signext 67, i8 signext 66)
ret i32 0
}

LLVM IR (-O2):
@.str = [29 x i8] c"Enter the number of disks : \00"
@.str.1 = [3 x i8] c"%d\00"
@str = [59 x i8] c"The sequence of moves involved in the Tower of Hanoi are :\00"
define i32 @main() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
%3 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([29 x i8], [29 x i8]* @.str, i64 0, i64 0))
%4 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %1)
%5 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([59 x i8], [59 x i8]* @str, i64 0, i64 0))
%6 = load i32, i32* %1
%7 = call i32 @towers(i32 %6, i8 signext 65, i8 signext 67, i8 signext 66)
ret i32 0
}
/* Forward declarations */
typedef struct TYPE_4__ TYPE_2__;
typedef struct TYPE_3__ TYPE_1__;

/* Type definitions */
struct TYPE_3__ {
  scalar_t__ parent;
};
struct TYPE_4__ {
  TYPE_1__ xconfigurerequest;
};
typedef TYPE_2__ XEvent;

/* Variables and functions */
unsigned long get_XEvent_xconfigurerequest_parent(void *_p) {
  return (unsigned long)((XEvent *)_p)->xconfigurerequest.parent;
}


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

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

LLVM IR (-O0):
%struct.TYPE_4__ = type { %struct.TYPE_3__ }
%struct.TYPE_3__ = type { i64 }
define i64 @get_XEvent_xconfigurerequest_parent(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = bitcast i8* %3 to %struct.TYPE_4__*
%5 = getelementptr inbounds %struct.TYPE_4__, %struct.TYPE_4__* %4, i32 0, i32 0
%6 = getelementptr inbounds %struct.TYPE_3__, %struct.TYPE_3__* %5, i32 0, i32 0
%7 = load i64, i64* %6
ret i64 %7
}

LLVM IR (-O2):
define i64 @get_XEvent_xconfigurerequest_parent(i8* nocapture %0) {
%2 = bitcast i8* %0 to i64*
%3 = load i64, i64* %2
ret i64 %3
}
/* Variables and functions */
scalar_t__ strcmp(char *, char *);
bool is_loopback(char *interface) {
  if (strcmp(interface, "lo") == 0)
    return true;
  else
    return false;
}


x86 assembly (clang, -O0):
<is_loopback>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
lea    0xed9(%rip),%rsi
call   1030 <strcmp@plt>
cmp    $0x0,%rax
jne    1142 <is_loopback+0x32>
movl   $0x1,-0x4(%rbp)
jmp    1149 <is_loopback+0x39>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<is_loopback>:
push   %rax
lea    0xee8(%rip),%rsi
call   1030 <strcmp@plt>
xor    %ecx,%ecx
test   %rax,%rax
sete   %cl
mov    %ecx,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [3 x i8] c"lo\00"
define i32 @is_loopback(i8* %0) {
%2 = alloca i32
%3 = alloca i8*
store i8* %0, i8** %3
%4 = load i8*, i8** %3
%5 = call i64 @strcmp(i8* %4, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0))
%6 = icmp eq i64 %5, 0
br i1 %6, label %7, label %8
7: ; preds = %1
store i32 1, i32* %2
br label %9
8: ; preds = %1
store i32 0, i32* %2
br label %9
9: ; preds = %8, %7
%10 = load i32, i32* %2
ret i32 %10
}

LLVM IR (-O2):
@.str = [3 x i8] c"lo\00"
define i32 @is_loopback(i8* %0) {
%2 = tail call i64 @strcmp(i8* %0, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0))
%3 = icmp eq i64 %2, 0
%4 = zext i1 %3 to i32
ret i32 %4
}
/* Type definitions */
typedef int uint8_t;
typedef int uint16_t;
typedef int int16_t;

/* Variables and functions */
int16_t unpacki16(uint8_t *buf) {
  uint16_t i2 = ((uint16_t)buf[0] << 8) | buf[1];
  int16_t i;
  if (i2 <= 0x7fffu) {
    i = i2;
  } else {
    i = -1 - (uint16_t)(0xffffu - i2);
  }
  return i;
}


x86 assembly (clang, -O0):
<unpacki16>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%eax
shl    $0x8,%eax
mov    -0x8(%rbp),%rcx
or     0x4(%rcx),%eax
mov    %eax,-0xc(%rbp)
cmpl   $0x7fff,-0xc(%rbp)
ja     1133 <unpacki16+0x33>
mov    -0xc(%rbp),%eax
mov    %eax,-0x10(%rbp)
jmp    1145 <unpacki16+0x45>
mov    $0xffff,%ecx
sub    -0xc(%rbp),%ecx
mov    $0xffffffff,%eax
sub    %ecx,%eax
mov    %eax,-0x10(%rbp)
mov    -0x10(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<unpacki16>:
mov    (%rdi),%ecx
shl    $0x8,%ecx
or     0x4(%rdi),%ecx
lea    -0x10000(%rcx),%eax
cmp    $0x8000,%ecx
cmovb  %ecx,%eax
ret

LLVM IR (-O0):
define i32 @unpacki16(i32* %0) {
%2 = alloca i32*
%3 = alloca i32
%4 = alloca i32
store i32* %0, i32** %2
%5 = load i32*, i32** %2
%6 = getelementptr inbounds i32, i32* %5, i64 0
%7 = load i32, i32* %6
%8 = shl i32 %7, 8
%9 = load i32*, i32** %2
%10 = getelementptr inbounds i32, i32* %9, i64 1
%11 = load i32, i32* %10
%12 = or i32 %8, %11
store i32 %12, i32* %3
%13 = load i32, i32* %3
%14 = icmp ule i32 %13, 32767
br i1 %14, label %15, label %17
15: ; preds = %1
%16 = load i32, i32* %3
store i32 %16, i32* %4
br label %21
17: ; preds = %1
%18 = load i32, i32* %3
%19 = sub i32 65535, %18
%20 = sub nsw i32 -1, %19
store i32 %20, i32* %4
br label %21
21: ; preds = %17, %15
%22 = load i32, i32* %4
ret i32 %22
}

LLVM IR (-O2):
define i32 @unpacki16(i32* nocapture %0) {
%2 = load i32, i32* %0
%3 = shl i32 %2, 8
%4 = getelementptr inbounds i32, i32* %0, i64 1
%5 = load i32, i32* %4
%6 = or i32 %3, %5
%7 = icmp ult i32 %6, 32768
%8 = add i32 %6, -65536
%9 = select i1 %7, i32 %6, i32 %8
ret i32 %9
}
/* Type definitions */
struct UPnPService {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ printf(char *, int, char *);
void MSCP_ResponseSink_ContentDirectory_GetSortCapabilities(
    struct UPnPService *Service, int ErrorCode, void *User, char *SortCaps) {
  printf("MSCP_ Invoke Response: "
         "ContentDirectory/GetSortCapabilities[ErrorCode:%d](%s)\r\n",
         ErrorCode, SortCaps);
}


x86 assembly (clang, -O0):
<MSCP_ResponseSink_ContentDirectory_GetSortCapabilities>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    -0xc(%rbp),%esi
mov    -0x20(%rbp),%rdx
lea    0xecb(%rip),%rdi
call   1030 <printf@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<MSCP_ResponseSink_ContentDirectory_GetSortCapabilities>:
lea    0xee9(%rip),%rdi
mov    %rcx,%rdx
jmp    1030 <printf@plt>

LLVM IR (-O0):
%struct.UPnPService = type { i32 }
@.str = [80 x i8] c"MSCP_ Invoke Response: ContentDirectory/GetSortCapabilities[ErrorCode:%d](%s)\0D\0A\00"
define void @MSCP_ResponseSink_ContentDirectory_GetSortCapabilities(%struct.UPnPService* %0, i32 %1, i8* %2, i8* %3) {
%5 = alloca %struct.UPnPService*
%6 = alloca i32
%7 = alloca i8*
%8 = alloca i8*
store %struct.UPnPService* %0, %struct.UPnPService** %5
store i32 %1, i32* %6
store i8* %2, i8** %7
store i8* %3, i8** %8
%9 = load i32, i32* %6
%10 = load i8*, i8** %8
%11 = call i32 @printf(i8* getelementptr inbounds ([80 x i8], [80 x i8]* @.str, i64 0, i64 0), i32 %9, i8* %10)
ret void
}

LLVM IR (-O2):
%struct.UPnPService = type { i32 }
@.str = [80 x i8] c"MSCP_ Invoke Response: ContentDirectory/GetSortCapabilities[ErrorCode:%d](%s)\0D\0A\00"
define void @MSCP_ResponseSink_ContentDirectory_GetSortCapabilities(%struct.UPnPService* nocapture readnone %0, i32 %1, i8* nocapture readnone %2, i8* %3) {
%5 = tail call i32 @printf(i8* getelementptr inbounds ([80 x i8], [80 x i8]* @.str, i64 0, i64 0), i32 %1, i8* %3)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
int /*<<< orphan*/ stderr;
void usage() {
  fprintf(stderr, "Usage: elbd [-v]\n");
  exit(2);
}


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

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

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

LLVM IR (-O2):
@stderr = global i32 0
@.str = [18 x i8] c"Usage: elbd [-v]\0A\00"
define void @usage() {
%1 = load i32, i32* @stderr
%2 = tail call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0))
%3 = tail call i32 @exit(i32 2)
unreachable
}
int marker2(a)
int a;
{ return (1); }


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

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

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

LLVM IR (-O2):
define i32 @marker2(i32 %0) {
ret i32 1
}
/* Variables and functions */
int /*<<< orphan*/ AbsoluteIndexedXX1(int);
int /*<<< orphan*/ DEC8(int /*<<< orphan*/);
void OpDEM1X1(void) { DEC8(AbsoluteIndexedXX1(3)); }


x86 assembly (clang, -O0):
<OpDEM1X1>:
push   %rbp
mov    %rsp,%rbp
mov    $0x3,%edi
call   1040 <AbsoluteIndexedXX1@plt>
mov    %eax,%edi
call   1030 <DEC8@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<OpDEM1X1>:
push   %rax
mov    $0x3,%edi
call   1040 <AbsoluteIndexedXX1@plt>
mov    %eax,%edi
pop    %rax
jmp    1030 <DEC8@plt>

LLVM IR (-O0):
define void @OpDEM1X1() {
%1 = call i32 @AbsoluteIndexedXX1(i32 3)
%2 = call i32 @DEC8(i32 %1)
ret void
}

LLVM IR (-O2):
define void @OpDEM1X1() {
%1 = tail call i32 @AbsoluteIndexedXX1(i32 3)
%2 = tail call i32 @DEC8(i32 %1)
ret void
}
void ERR_error_string(void) {}


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

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

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

LLVM IR (-O2):
define void @ERR_error_string() {
ret void
}
/* Type definitions */
struct dummy {
  int dummy;
};
typedef enum dummy_enum { ____Placeholder_dummy_enum } dummy_enum;

/* Variables and functions */
void *hack(struct dummy *, int const *);
void *test2(struct dummy *t) {
  struct dummy *tt;
  const enum dummy_enum *e;
  tt = t;
  return hack(t, e);
}


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

x86 assembly (clang, -O2):
<test2>:
jmp    1030 <hack@plt>

LLVM IR (-O0):
%struct.dummy = type { i32 }
define i8* @test2(%struct.dummy* %0) {
%2 = alloca %struct.dummy*
%3 = alloca %struct.dummy*
%4 = alloca i32*
store %struct.dummy* %0, %struct.dummy** %2
%5 = load %struct.dummy*, %struct.dummy** %2
store %struct.dummy* %5, %struct.dummy** %3
%6 = load %struct.dummy*, %struct.dummy** %2
%7 = load i32*, i32** %4
%8 = call i8* @hack(%struct.dummy* %6, i32* %7)
ret i8* %8
}

LLVM IR (-O2):
%struct.dummy = type { i32 }
define i8* @test2(%struct.dummy* %0) {
%2 = tail call i8* @hack(%struct.dummy* %0, i32* undef)
ret i8* %2
}
int Bematech_FI_UltimoItemVendido(Var, Retorno) {
  return Formata("\x1b|35|12|\x1b", Var, Retorno);
}


x86 assembly (clang, -O0):
<Bematech_FI_UltimoItemVendido>:
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_UltimoItemVendido>:
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|12|\1B\00"
define i32 @Bematech_FI_UltimoItemVendido(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|12|\1B\00"
define i32 @Bematech_FI_UltimoItemVendido(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
}
/* Variables and functions */
long __infer_nondet_long_int();
long int lrintf(float x) { return __infer_nondet_long_int(); }


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

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

LLVM IR (-O0):
define i64 @lrintf(float %0) {
%2 = alloca float
store float %0, float* %2
%3 = call i64 (...) @__infer_nondet_long_int()
ret i64 %3
}

LLVM IR (-O2):
define i64 @lrintf(float %0) {
%2 = tail call i64 (...) @__infer_nondet_long_int()
ret i64 %2
}
void start(void *a, int b, int c) {}


x86 assembly (clang, -O0):
<start>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
pop    %rbp
ret

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

LLVM IR (-O0):
define void @start(i8* %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
ret void
}

LLVM IR (-O2):
define void @start(i8* nocapture %0, i32 %1, i32 %2) {
ret void
}
double m_limit_double(double val, double low, double high) {
  return (val < low) ? low : ((val > high) ? high : val);
}


x86 assembly (clang, -O0):
<m_limit_double>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  %xmm2,-0x18(%rbp)
movsd  -0x8(%rbp),%xmm1
movsd  -0x10(%rbp),%xmm0
ucomisd %xmm1,%xmm0
jbe    1136 <m_limit_double+0x36>
movsd  -0x10(%rbp),%xmm0
movsd  %xmm0,-0x20(%rbp)
jmp    1169 <m_limit_double+0x69>
movsd  -0x8(%rbp),%xmm0
ucomisd -0x18(%rbp),%xmm0
jbe    1155 <m_limit_double+0x55>
movsd  -0x18(%rbp),%xmm0
movsd  %xmm0,-0x28(%rbp)
jmp    115f <m_limit_double+0x5f>
movsd  -0x8(%rbp),%xmm0
movsd  %xmm0,-0x28(%rbp)
movsd  -0x28(%rbp),%xmm0
movsd  %xmm0,-0x20(%rbp)
movsd  -0x20(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<m_limit_double>:
minsd  %xmm0,%xmm2
cmpltsd %xmm1,%xmm0
movapd %xmm0,%xmm3
andnpd %xmm2,%xmm3
andpd  %xmm1,%xmm0
orpd   %xmm3,%xmm0
ret

LLVM IR (-O0):
define double @m_limit_double(double %0, double %1, double %2) {
%4 = alloca double
%5 = alloca double
%6 = alloca double
store double %0, double* %4
store double %1, double* %5
store double %2, double* %6
%7 = load double, double* %4
%8 = load double, double* %5
%9 = fcmp olt double %7, %8
br i1 %9, label %10, label %12
10: ; preds = %3
%11 = load double, double* %5
br label %22
12: ; preds = %3
%13 = load double, double* %4
%14 = load double, double* %6
%15 = fcmp ogt double %13, %14
br i1 %15, label %16, label %18
16: ; preds = %12
%17 = load double, double* %6
br label %20
18: ; preds = %12
%19 = load double, double* %4
br label %20
20: ; preds = %18, %16
%21 = phi double [ %17, %16 ], [ %19, %18 ]
br label %22
22: ; preds = %20, %10
%23 = phi double [ %11, %10 ], [ %21, %20 ]
ret double %23
}

LLVM IR (-O2):
define double @m_limit_double(double %0, double %1, double %2) {
%4 = fcmp olt double %0, %1
%5 = fcmp ogt double %0, %2
%6 = select i1 %5, double %2, double %0
%7 = select i1 %4, double %1, double %6
ret double %7
}
/* Variables and functions */
int partition(int *, int, int, int);
void quicksort(int *tab, int u, int o) {
  int p = o;
  int pn;
  if (o > u) {
    pn = partition(tab, u, o, p);
    quicksort(tab, u, pn - 1);
    quicksort(tab, pn + 1, o);
  }
}


x86 assembly (clang, -O0):
<quicksort>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    -0x10(%rbp),%eax
mov    %eax,-0x14(%rbp)
mov    -0x10(%rbp),%eax
cmp    -0xc(%rbp),%eax
jle    117d <quicksort+0x5d>
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
mov    -0x10(%rbp),%edx
mov    -0x14(%rbp),%ecx
call   1030 <partition@plt>
mov    %eax,-0x18(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
mov    -0x18(%rbp),%edx
sub    $0x1,%edx
call   1040 <quicksort@plt>
mov    -0x8(%rbp),%rdi
mov    -0x18(%rbp),%esi
add    $0x1,%esi
mov    -0x10(%rbp),%edx
call   1040 <quicksort@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<quicksort>:
push   %rbp
push   %r15
push   %r14
push   %rbx
push   %rax
cmp    %esi,%edx
jle    1169 <quicksort+0x49>
mov    %edx,%r15d
mov    %esi,%ebp
mov    %rdi,%r14
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
mov    %r14,%rdi
mov    %ebp,%esi
mov    %r15d,%edx
mov    %r15d,%ecx
call   1030 <partition@plt>
mov    %eax,%ebx
lea    -0x1(%rbx),%edx
mov    %r14,%rdi
mov    %ebp,%esi
call   1040 <quicksort@plt>
add    $0x1,%ebx
mov    %ebx,%ebp
cmp    %r15d,%ebx
jl     1140 <quicksort+0x20>
add    $0x8,%rsp
pop    %rbx
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
define void @quicksort(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* %6
store i32 %9, i32* %7
%10 = load i32, i32* %6
%11 = load i32, i32* %5
%12 = icmp sgt i32 %10, %11
br i1 %12, label %13, label %27
13: ; preds = %3
%14 = load i32*, i32** %4
%15 = load i32, i32* %5
%16 = load i32, i32* %6
%17 = load i32, i32* %7
%18 = call i32 @partition(i32* %14, i32 %15, i32 %16, i32 %17)
store i32 %18, i32* %8
%19 = load i32*, i32** %4
%20 = load i32, i32* %5
%21 = load i32, i32* %8
%22 = sub nsw i32 %21, 1
%23 = load i32*, i32** %4
%24 = load i32, i32* %8
%25 = add nsw i32 %24, 1
%26 = load i32, i32* %6
br label %27
27: ; preds = %13, %3
ret void
}

LLVM IR (-O2):
define void @quicksort(i32* %0, i32 %1, i32 %2) {
%4 = icmp sgt i32 %2, %1
br i1 %4, label %5, label %11
5: ; preds = %3, %5
%6 = phi i32 [ %9, %5 ], [ %1, %3 ]
%7 = tail call i32 @partition(i32* %0, i32 %6, i32 %2, i32 %2)
%8 = add nsw i32 %7, -1
tail call void @quicksort(i32* %0, i32 %6, i32 %8)
%9 = add nsw i32 %7, 1
%10 = icmp slt i32 %9, %2
br i1 %10, label %5, label %11
11: ; preds = %5, %3
ret void
}
void ClearCRLF(char *s) {
  register char *cp;
  cp = s;
  while (*cp > 31)
    cp++;
  *cp = 0;
}


x86 assembly (clang, -O0):
<ClearCRLF>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x1f,%eax
jle    1131 <ClearCRLF+0x31>
mov    -0x10(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x10(%rbp)
jmp    1110 <ClearCRLF+0x10>
mov    -0x10(%rbp),%rax
movb   $0x0,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<ClearCRLF>:
cmpb   $0x1f,(%rdi)
lea    0x1(%rdi),%rdi
jg     1100 <ClearCRLF>
movb   $0x0,-0x1(%rdi)
ret

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

LLVM IR (-O2):
define void @ClearCRLF(i8* nocapture %0) {
br label %2
2: ; preds = %2, %1
%3 = phi i8* [ %0, %1 ], [ %6, %2 ]
%4 = load i8, i8* %3
%5 = icmp sgt i8 %4, 31
%6 = getelementptr inbounds i8, i8* %3, i64 1
br i1 %5, label %2, label %7
7: ; preds = %2
store i8 0, i8* %3
ret void
}
/* Variables and functions */
int /*<<< orphan*/ __streams_init();
int /*<<< orphan*/ _exit(int);
int /*<<< orphan*/ error_init();
int /*<<< orphan*/ heap_init();
int main(int, char **, char **);
void _start(int argc, char *argv[], char *envp[]) {
  int ret;
  error_init();
  __streams_init();
  heap_init();
  ret = main(argc, argv, envp);
  _exit(ret);
}


x86 assembly (clang, -O0):
<_start>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    $0x0,%al
call   1040 <error_init@plt>
mov    $0x0,%al
call   1050 <__streams_init@plt>
mov    $0x0,%al
call   1070 <heap_init@plt>
mov    -0x4(%rbp),%edi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
call   1060 <main@plt>
mov    %eax,-0x1c(%rbp)
mov    -0x1c(%rbp),%edi
call   1030 <_exit@plt>

x86 assembly (clang, -O2):
<_start>:
push   %rbp
push   %r14
push   %rbx
mov    %rdx,%r14
mov    %rsi,%rbx
mov    %edi,%ebp
xor    %eax,%eax
call   1040 <error_init@plt>
xor    %eax,%eax
call   1050 <__streams_init@plt>
xor    %eax,%eax
call   1070 <heap_init@plt>
mov    %ebp,%edi
mov    %rbx,%rsi
mov    %r14,%rdx
call   1060 <main@plt>
mov    %eax,%edi
call   1030 <_exit@plt>

LLVM IR (-O0):
define void @_start(i32 %0, i8** %1, i8** %2) {
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i8**
%7 = alloca i32
store i32 %0, i32* %4
store i8** %1, i8*** %5
store i8** %2, i8*** %6
%8 = call i32 (...) @error_init()
%9 = call i32 (...) @__streams_init()
%10 = call i32 (...) @heap_init()
%11 = load i32, i32* %4
%12 = load i8**, i8*** %5
%13 = load i8**, i8*** %6
%14 = call i32 @main(i32 %11, i8** %12, i8** %13)
store i32 %14, i32* %7
%15 = load i32, i32* %7
%16 = call i32 @_exit(i32 %15)
unreachable
}

LLVM IR (-O2):
define void @_start(i32 %0, i8** %1, i8** %2) {
%4 = tail call i32 (...) @error_init()
%5 = tail call i32 (...) @__streams_init()
%6 = tail call i32 (...) @heap_init()
%7 = tail call i32 @main(i32 %0, i8** %1, i8** %2)
%8 = tail call i32 @_exit(i32 %7)
unreachable
}
/* Variables and functions */
int /*<<< orphan*/ printstr(char *);
int /*<<< orphan*/ send_signal(int, int);
void knife(int pid) {
  printstr("The weapon you've choosen is not in your arsenal. You're using "
           "your knife instead, but it is not very effective...\n");
  send_signal(pid, 18);
}


x86 assembly (clang, -O0):
<knife>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
lea    0xece(%rip),%rdi
call   1030 <printstr@plt>
mov    -0x4(%rbp),%edi
mov    $0x12,%esi
call   1040 <send_signal@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<knife>:
push   %rbx
mov    %edi,%ebx
lea    0xed6(%rip),%rdi
call   1030 <printstr@plt>
mov    %ebx,%edi
mov    $0x12,%esi
pop    %rbx
jmp    1040 <send_signal@plt>

LLVM IR (-O0):
@.str = [116 x i8] c"The weapon you've choosen is not in your arsenal. You're using your knife instead, but it is not very effective...\0A\00"
define void @knife(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = call i32 @printstr(i8* getelementptr inbounds ([116 x i8], [116 x i8]* @.str, i64 0, i64 0))
%4 = load i32, i32* %2
%5 = call i32 @send_signal(i32 %4, i32 18)
ret void
}

LLVM IR (-O2):
@.str = [116 x i8] c"The weapon you've choosen is not in your arsenal. You're using your knife instead, but it is not very effective...\0A\00"
define void @knife(i32 %0) {
%2 = tail call i32 @printstr(i8* getelementptr inbounds ([116 x i8], [116 x i8]* @.str, i64 0, i64 0))
%3 = tail call i32 @send_signal(i32 %0, i32 18)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ count();
int /*<<< orphan*/ put_i(int /*<<< orphan*/);
void main() { put_i(count()); }


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1030 <count@plt>
mov    %eax,%edi
call   1040 <put_i@plt>
pop    %rbp
ret

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

LLVM IR (-O0):
define void @main() {
%1 = call i32 (...) @count()
%2 = call i32 @put_i(i32 %1)
ret void
}

LLVM IR (-O2):
define void @main() {
%1 = tail call i32 (...) @count()
%2 = tail call i32 @put_i(i32 %1)
ret void
}
const char *fpp_config_get_plugin_mime_type(void) {
  return "application/pdf::Portable Document Format;"
         "application/x-google-chrome-print-preview-pdf::Portable Document "
         "Format";
}


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

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

LLVM IR (-O0):
@.str = [114 x i8] c"application/pdf::Portable Document Format;application/x-google-chrome-print-preview-pdf::Portable Document Format\00"
define i8* @fpp_config_get_plugin_mime_type() {
ret i8* getelementptr inbounds ([114 x i8], [114 x i8]* @.str, i64 0, i64 0)
}

LLVM IR (-O2):
@.str = [114 x i8] c"application/pdf::Portable Document Format;application/x-google-chrome-print-preview-pdf::Portable Document Format\00"
define i8* @fpp_config_get_plugin_mime_type() {
ret i8* getelementptr inbounds ([114 x i8], [114 x i8]* @.str, i64 0, i64 0)
}
/* Type definitions */
struct stat {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ err_sys(char *);
int stat(char const *, struct stat *);
int Stat(const char *path, struct stat *buf) {
  int ret;
  ret = stat(path, buf);
  if (ret < 0)
    err_sys("stat error");
  return ret;
}


x86 assembly (clang, -O0):
<Stat>:
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 <stat@plt>
mov    %eax,-0x14(%rbp)
cmpl   $0x0,-0x14(%rbp)
jge    1156 <Stat+0x36>
lea    0xeaf(%rip),%rdi
call   1030 <err_sys@plt>
mov    -0x14(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Stat>:
push   %rbx
call   1040 <stat@plt>
mov    %eax,%ebx
test   %eax,%eax
jns    1138 <Stat+0x18>
lea    0xecd(%rip),%rdi
call   1030 <err_sys@plt>
mov    %ebx,%eax
pop    %rbx
ret

LLVM IR (-O0):
%struct.stat = type { i32 }
@.str = [11 x i8] c"stat error\00"
define i32 @Stat(i8* %0, %struct.stat* %1) {
%3 = alloca i8*
%4 = alloca %struct.stat*
%5 = alloca i32
store i8* %0, i8** %3
store %struct.stat* %1, %struct.stat** %4
%6 = load i8*, i8** %3
%7 = load %struct.stat*, %struct.stat** %4
%8 = call i32 @stat(i8* %6, %struct.stat* %7)
store i32 %8, i32* %5
%9 = load i32, i32* %5
%10 = icmp slt i32 %9, 0
br i1 %10, label %11, label %13
11: ; preds = %2
%12 = call i32 @err_sys(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0))
br label %13
13: ; preds = %11, %2
%14 = load i32, i32* %5
ret i32 %14
}

LLVM IR (-O2):
%struct.stat = type { i32 }
@.str = [11 x i8] c"stat error\00"
define i32 @Stat(i8* nocapture %0, %struct.stat* nocapture %1) {
%3 = tail call i32 @stat(i8* %0, %struct.stat* %1)
%4 = icmp slt i32 %3, 0
br i1 %4, label %5, label %7
5: ; preds = %2
%6 = tail call i32 @err_sys(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0))
br label %7
7: ; preds = %5, %2
ret i32 %3
}
void ff_hevc_put_hevc_bi_w_qpel_h32_12_sse4() {}


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

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

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

LLVM IR (-O2):
define void @ff_hevc_put_hevc_bi_w_qpel_h32_12_sse4() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ g_set_foreground(int);
void NewLevel(int level, int *lcol) { g_set_foreground(lcol[level]); }


x86 assembly (clang, -O0):
<NewLevel>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
movslq -0x4(%rbp),%rcx
mov    (%rax,%rcx,4),%edi
call   1030 <g_set_foreground@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<NewLevel>:
movslq %edi,%rax
mov    (%rsi,%rax,4),%edi
jmp    1030 <g_set_foreground@plt>

LLVM IR (-O0):
define void @NewLevel(i32 %0, i32* %1) {
%3 = alloca i32
%4 = alloca i32*
store i32 %0, i32* %3
store i32* %1, i32** %4
%5 = load i32*, i32** %4
%6 = load i32, i32* %3
%7 = sext i32 %6 to i64
%8 = getelementptr inbounds i32, i32* %5, i64 %7
%9 = load i32, i32* %8
%10 = call i32 @g_set_foreground(i32 %9)
ret void
}

LLVM IR (-O2):
define void @NewLevel(i32 %0, i32* nocapture %1) {
%3 = sext i32 %0 to i64
%4 = getelementptr inbounds i32, i32* %1, i64 %3
%5 = load i32, i32* %4
%6 = tail call i32 @g_set_foreground(i32 %5)
ret void
}
int if_bad_constant(int j) {
  int p = 10;
  if (p < 10 + j) {
    p++;
  } else {
    p = j + 3;
    for (int k = 0; k < 10; k++) {
      j += 3;
    }
  }
  return p;
}


x86 assembly (clang, -O0):
<if_bad_constant>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
movl   $0xa,-0x8(%rbp)
mov    -0x8(%rbp),%eax
mov    -0x4(%rbp),%ecx
add    $0xa,%ecx
cmp    %ecx,%eax
jge    112d <if_bad_constant+0x2d>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1163 <if_bad_constant+0x63>
mov    -0x4(%rbp),%eax
add    $0x3,%eax
mov    %eax,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
cmpl   $0xa,-0xc(%rbp)
jge    115e <if_bad_constant+0x5e>
mov    -0x4(%rbp),%eax
add    $0x3,%eax
mov    %eax,-0x4(%rbp)
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    113d <if_bad_constant+0x3d>
jmp    1163 <if_bad_constant+0x63>
mov    -0x8(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<if_bad_constant>:
lea    0x3(%rdi),%ecx
test   %edi,%edi
mov    $0xb,%eax
cmovle %ecx,%eax
ret

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

LLVM IR (-O2):
define i32 @if_bad_constant(i32 %0) {
%2 = icmp sgt i32 %0, 0
%3 = add nsw i32 %0, 3
%4 = select i1 %2, i32 11, i32 %3
ret i32 %4
}