xunge/DecIR huggingface dataset:
/* Variables and functions */
unsigned int vp8_sub_pixel_variance16x16_c(unsigned char const *, int, int,
                                           int /*<<< orphan*/,
                                           unsigned char const *, int,
                                           unsigned int *);
unsigned int vp8_variance_halfpixvar16x16_h_c(const unsigned char *src_ptr,
                                              int source_stride,
                                              const unsigned char *ref_ptr,
                                              int recon_stride,
                                              unsigned int *sse) {
  return vp8_sub_pixel_variance16x16_c(src_ptr, source_stride, 4, 0, ref_ptr,
                                       recon_stride, sse);
}


x86 assembly (clang, -O0):
<vp8_variance_halfpixvar16x16_h_c>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %ecx,-0x1c(%rbp)
mov    %r8,-0x28(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
mov    -0x18(%rbp),%r8
mov    -0x1c(%rbp),%r9d
mov    -0x28(%rbp),%rax
mov    $0x4,%edx
xor    %ecx,%ecx
mov    %rax,(%rsp)
call   1030 <vp8_sub_pixel_variance16x16_c@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<vp8_variance_halfpixvar16x16_h_c>:
push   %rax
mov    %ecx,%r9d
mov    %rdx,%rax
mov    %r8,(%rsp)
mov    $0x4,%edx
xor    %ecx,%ecx
mov    %rax,%r8
call   1030 <vp8_sub_pixel_variance16x16_c@plt>
pop    %rcx
ret

LLVM IR (-O0):
define i32 @vp8_variance_halfpixvar16x16_h_c(i8* %0, i32 %1, i8* %2, i32 %3, i32* %4) {
%6 = alloca i8*
%7 = alloca i32
%8 = alloca i8*
%9 = alloca i32
%10 = alloca i32*
store i8* %0, i8** %6
store i32 %1, i32* %7
store i8* %2, i8** %8
store i32 %3, i32* %9
store i32* %4, i32** %10
%11 = load i8*, i8** %6
%12 = load i32, i32* %7
%13 = load i8*, i8** %8
%14 = load i32, i32* %9
%15 = load i32*, i32** %10
%16 = call i32 @vp8_sub_pixel_variance16x16_c(i8* %11, i32 %12, i32 4, i32 0, i8* %13, i32 %14, i32* %15)
ret i32 %16
}

LLVM IR (-O2):
define i32 @vp8_variance_halfpixvar16x16_h_c(i8* %0, i32 %1, i8* %2, i32 %3, i32* %4) {
%6 = tail call i32 @vp8_sub_pixel_variance16x16_c(i8* %0, i32 %1, i32 4, i32 0, i8* %2, i32 %3, i32* %4)
ret i32 %6
}
/* Type definitions */
typedef int /*<<< orphan*/ uint16_t;

/* Variables and functions */
uint16_t check_decode_time(void) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @check_decode_time() {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ test_sigaction();
int /*<<< orphan*/ test_signal();
int main(int argc, char **argv) {
  if (!test_signal())
    return 1;
  if (!test_sigaction())
    return 1;
  printf("OK\n");
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    $0x0,%al
call   1030 <test_signal@plt>
cmp    $0x0,%eax
jne    1162 <main+0x32>
movl   $0x1,-0x4(%rbp)
jmp    1191 <main+0x61>
mov    $0x0,%al
call   1050 <test_sigaction@plt>
cmp    $0x0,%eax
jne    117e <main+0x4e>
movl   $0x1,-0x4(%rbp)
jmp    1191 <main+0x61>
lea    0xe7b(%rip),%rdi
call   1040 <printf@plt>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
xor    %eax,%eax
call   1040 <test_signal@plt>
mov    $0x1,%ebx
test   %eax,%eax
je     115a <main+0x2a>
xor    %eax,%eax
call   1050 <test_sigaction@plt>
test   %eax,%eax
je     115a <main+0x2a>
lea    0xead(%rip),%rdi
call   1030 <puts@plt>
xor    %ebx,%ebx
mov    %ebx,%eax
pop    %rbx
ret

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

LLVM IR (-O2):
@str = [3 x i8] c"OK\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 (...) @test_signal()
%4 = icmp eq i32 %3, 0
br i1 %4, label %10, label %5
5: ; preds = %2
%6 = tail call i32 (...) @test_sigaction()
%7 = icmp eq i32 %6, 0
br i1 %7, label %10, label %8
8: ; preds = %5
%9 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([3 x i8], [3 x i8]* @str, i64 0, i64 0))
br label %10
10: ; preds = %5, %2, %8
%11 = phi i32 [ 0, %8 ], [ 1, %2 ], [ 1, %5 ]
ret i32 %11
}
int test_imm_93int64_lowword_mem(long long *val) {
  return ((*val) & (0x93 << 0)) ? -20 : -40;
}


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

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

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

LLVM IR (-O2):
define i32 @test_imm_93int64_lowword_mem(i64* nocapture %0) {
%2 = load i64, i64* %0
%3 = and i64 %2, 147
%4 = icmp eq i64 %3, 0
%5 = select i1 %4, i32 -40, i32 -20
ret i32 %5
}
int test_imm_B8uint32_mem(unsigned int *val) {
  return ((*val) & (0xB8 << 0)) ? -20 : -40;
}


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

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

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

LLVM IR (-O2):
define i32 @test_imm_B8uint32_mem(i32* nocapture %0) {
%2 = load i32, i32* %0
%3 = and i32 %2, 184
%4 = icmp eq i32 %3, 0
%5 = select i1 %4, i32 -40, i32 -20
ret i32 %5
}
/* Variables and functions */
double pow(double, double);
double hill_function(double x, double n, double k) {
  return (pow(x, n) / (pow(x, n) + pow(k, n)));
}


x86 assembly (clang, -O0):
<hill_function>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  %xmm2,-0x18(%rbp)
movsd  -0x8(%rbp),%xmm0
movsd  -0x10(%rbp),%xmm1
call   1030 <pow@plt>
movsd  %xmm0,-0x20(%rbp)
movsd  -0x8(%rbp),%xmm0
movsd  -0x10(%rbp),%xmm1
call   1030 <pow@plt>
movsd  %xmm0,-0x28(%rbp)
movsd  -0x18(%rbp),%xmm0
movsd  -0x10(%rbp),%xmm1
call   1030 <pow@plt>
movsd  -0x28(%rbp),%xmm1
movaps %xmm0,%xmm2
movsd  -0x20(%rbp),%xmm0
addsd  %xmm2,%xmm1
divsd  %xmm1,%xmm0
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<hill_function>:
sub    $0x28,%rsp
movsd  %xmm2,0x20(%rsp)
movsd  %xmm1,0x10(%rsp)
movsd  %xmm0,0x8(%rsp)
call   1030 <pow@plt>
movsd  %xmm0,0x18(%rsp)
movsd  0x8(%rsp),%xmm0
movsd  0x10(%rsp),%xmm1
call   1030 <pow@plt>
movsd  %xmm0,0x8(%rsp)
movsd  0x20(%rsp),%xmm0
movsd  0x10(%rsp),%xmm1
call   1030 <pow@plt>
addsd  0x8(%rsp),%xmm0
movsd  0x18(%rsp),%xmm1
divsd  %xmm0,%xmm1
movapd %xmm1,%xmm0
add    $0x28,%rsp
ret

LLVM IR (-O0):
define double @hill_function(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 = call double @pow(double %7, double %8)
%10 = load double, double* %4
%11 = load double, double* %5
%12 = call double @pow(double %10, double %11)
%13 = load double, double* %6
%14 = load double, double* %5
%15 = call double @pow(double %13, double %14)
%16 = fadd double %12, %15
%17 = fdiv double %9, %16
ret double %17
}

LLVM IR (-O2):
define double @hill_function(double %0, double %1, double %2) {
%4 = tail call double @pow(double %0, double %1)
%5 = tail call double @pow(double %0, double %1)
%6 = tail call double @pow(double %2, double %1)
%7 = fadd double %5, %6
%8 = fdiv double %4, %7
ret double %8
}
int f5(unsigned x) { return x >= 1 && x <= 0x7fffffff; }


x86 assembly (clang, -O0):
<f5>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
xor    %eax,%eax
cmpl   $0x1,-0x4(%rbp)
mov    %al,-0x5(%rbp)
jb     1123 <f5+0x23>
cmpl   $0x7fffffff,-0x4(%rbp)
setbe  %al
mov    %al,-0x5(%rbp)
mov    -0x5(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<f5>:
xor    %eax,%eax
test   %edi,%edi
setg   %al
ret

LLVM IR (-O0):
define i32 @f5(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = icmp uge i32 %3, 1
br i1 %4, label %5, label %8
5: ; preds = %1
%6 = load i32, i32* %2
%7 = icmp ule i32 %6, 2147483647
br label %8
8: ; preds = %5, %1
%9 = phi i1 [ false, %1 ], [ %7, %5 ]
%10 = zext i1 %9 to i32
ret i32 %10
}

LLVM IR (-O2):
define i32 @f5(i32 %0) {
%2 = icmp sgt i32 %0, 0
%3 = zext i1 %2 to i32
ret i32 %3
}
/* Variables and functions */
char getchar();
int /*<<< orphan*/ putchar(char);
void interaction_getchar(char *arg1) {
  0;
  char input = getchar();
  putchar(input);
  0;
}


x86 assembly (clang, -O0):
<interaction_getchar>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    $0x0,%al
call   1040 <getchar@plt>
mov    %al,-0x9(%rbp)
movsbl -0x9(%rbp),%edi
call   1030 <putchar@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<interaction_getchar>:
push   %rax
xor    %eax,%eax
call   1040 <getchar@plt>
movsbl %al,%edi
pop    %rax
jmp    1030 <putchar@plt>

LLVM IR (-O0):
define void @interaction_getchar(i8* %0) {
%2 = alloca i8*
%3 = alloca i8
store i8* %0, i8** %2
%4 = call signext i8 (...) @getchar()
store i8 %4, i8* %3
%5 = load i8, i8* %3
%6 = call i32 @putchar(i8 signext %5)
ret void
}

LLVM IR (-O2):
define void @interaction_getchar(i8* nocapture readnone %0) {
%2 = tail call signext i8 (...) @getchar()
%3 = tail call i32 @putchar(i8 signext %2)
ret void
}
int slv(int a, int b) { return (a << b) != 0; }


x86 assembly (clang, -O0):
<slv>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
mov    -0x8(%rbp),%ecx
shl    %cl,%eax
cmp    $0x0,%eax
setne  %al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<slv>:
mov    %esi,%ecx
shl    %cl,%edi
xor    %eax,%eax
test   %edi,%edi
setne  %al
ret

LLVM IR (-O0):
define i32 @slv(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 = shl i32 %5, %6
%8 = icmp ne i32 %7, 0
%9 = zext i1 %8 to i32
ret i32 %9
}

LLVM IR (-O2):
define i32 @slv(i32 %0, i32 %1) {
%3 = shl i32 %0, %1
%4 = icmp ne i32 %3, 0
%5 = zext i1 %4 to i32
ret i32 %5
}
long long zuss() { return 0x00007fffffffffffLL; }


x86 assembly (clang, -O0):
<zuss>:
push   %rbp
mov    %rsp,%rbp
movabs $0x7fffffffffff,%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<zuss>:
movabs $0x7fffffffffff,%rax
ret

LLVM IR (-O0):
define i64 @zuss() {
ret i64 140737488355327
}

LLVM IR (-O2):
define i64 @zuss() {
ret i64 140737488355327
}
/* Type definitions */
typedef scalar_t__ uint32_t;
typedef scalar_t__ time_t;

/* Variables and functions */
scalar_t__ time(int /*<<< orphan*/ *);
uint32_t esp_log_timestamp(void) {
  static time_t t_first = 0;
  if (t_first) {
    t_first = time(NULL);
    return 0;
  }
  return time(NULL) - t_first;
}


x86 assembly (clang, -O0):
<esp_log_timestamp>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
cmpq   $0x0,0x2f10(%rip)
je     1143 <esp_log_timestamp+0x33>
xor    %eax,%eax
mov    %eax,%edi
call   1030 <time@plt>
mov    %rax,0x2efa(%rip)
movq   $0x0,-0x8(%rbp)
jmp    1157 <esp_log_timestamp+0x47>
xor    %eax,%eax
mov    %eax,%edi
call   1030 <time@plt>
sub    0x2edd(%rip),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
@esp_log_timestamp.t_first = internal global i64 0
define i64 @esp_log_timestamp() {
%1 = alloca i64
%2 = load i64, i64* @esp_log_timestamp.t_first
%3 = icmp ne i64 %2, 0
br i1 %3, label %4, label %6
4: ; preds = %0
%5 = call i64 @time(i32* null)
store i64 %5, i64* @esp_log_timestamp.t_first
store i64 0, i64* %1
br label %10
6: ; preds = %0
%7 = call i64 @time(i32* null)
%8 = load i64, i64* @esp_log_timestamp.t_first
%9 = sub nsw i64 %7, %8
store i64 %9, i64* %1
br label %10
10: ; preds = %6, %4
%11 = load i64, i64* %1
ret i64 %11
}

LLVM IR (-O2):
define i64 @esp_log_timestamp() {
%1 = tail call i64 @time(i32* null)
ret i64 %1
}
/* Variables and functions */
int /*<<< orphan*/ fortune_cookie(char *);
int main() {
  char quote[] = "Cookies make you fat.";
  fortune_cookie(quote);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    0xeda(%rip),%rax
mov    %rax,-0x20(%rbp)
mov    0xed7(%rip),%rax
mov    %rax,-0x18(%rbp)
mov    0xed5(%rip),%eax
mov    %eax,-0x10(%rbp)
mov    0xecf(%rip),%ax
mov    %ax,-0xc(%rbp)
lea    -0x20(%rbp),%rdi
call   1030 <fortune_cookie@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
sub    $0x18,%rsp
movaps 0xee5(%rip),%xmm0
movaps %xmm0,(%rsp)
movabs $0x2e74616620756f,%rax
mov    %rax,0xe(%rsp)
mov    %rsp,%rdi
call   1030 <fortune_cookie@plt>
xor    %eax,%eax
add    $0x18,%rsp
ret

LLVM IR (-O0):
@__const.main.quote = [22 x i8] c"Cookies make you fat.\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca [22 x i8]
store i32 0, i32* %1
%3 = bitcast [22 x i8]* %2 to i8*
%4 = getelementptr inbounds [22 x i8], [22 x i8]* %2, i64 0, i64 0
%5 = call i32 @fortune_cookie(i8* %4)
ret i32 0
}

LLVM IR (-O2):
@__const.main.quote = [22 x i8] c"Cookies make you fat.\00"
define i32 @main() {
%1 = alloca [22 x i8]
%2 = getelementptr inbounds [22 x i8], [22 x i8]* %1, i64 0, i64 0
%3 = call i32 @fortune_cookie(i8* %2)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ addbyte(int);
void MMX_PSLLQ(int dst_reg, int src_reg) {
  addbyte(0x66);
  addbyte(0x0f);
  addbyte(0xf3);
  addbyte(0xc0 | (dst_reg << 3) | src_reg);
}


x86 assembly (clang, -O0):
<MMX_PSLLQ>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    $0x66,%edi
call   1030 <addbyte@plt>
mov    $0xf,%edi
call   1030 <addbyte@plt>
mov    $0xf3,%edi
call   1030 <addbyte@plt>
mov    -0x4(%rbp),%edi
shl    $0x3,%edi
or     $0xc0,%edi
or     -0x8(%rbp),%edi
call   1030 <addbyte@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<MMX_PSLLQ>:
push   %rbp
push   %rbx
push   %rax
mov    %esi,%ebx
mov    %edi,%ebp
mov    $0x66,%edi
call   1030 <addbyte@plt>
mov    $0xf,%edi
call   1030 <addbyte@plt>
mov    $0xf3,%edi
call   1030 <addbyte@plt>
shl    $0x3,%ebp
or     %ebx,%ebp
or     $0xc0,%ebp
mov    %ebp,%edi
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    1030 <addbyte@plt>

LLVM IR (-O0):
define void @MMX_PSLLQ(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%5 = call i32 @addbyte(i32 102)
%6 = call i32 @addbyte(i32 15)
%7 = call i32 @addbyte(i32 243)
%8 = load i32, i32* %3
%9 = shl i32 %8, 3
%10 = or i32 192, %9
%11 = load i32, i32* %4
%12 = or i32 %10, %11
%13 = call i32 @addbyte(i32 %12)
ret void
}

LLVM IR (-O2):
define void @MMX_PSLLQ(i32 %0, i32 %1) {
%3 = tail call i32 @addbyte(i32 102)
%4 = tail call i32 @addbyte(i32 15)
%5 = tail call i32 @addbyte(i32 243)
%6 = shl i32 %0, 3
%7 = or i32 %6, %1
%8 = or i32 %7, 192
%9 = tail call i32 @addbyte(i32 %8)
ret void
}
char *irafgetc2(irafheader, offset, nc)
char *irafheader;
int offset;
int nc;
{
  char *irafstring, *string;
  irafstring = irafgetc(irafheader, offset, 2 * (nc + 1));
  string = iraf2str(irafstring, nc);
  free(irafstring);
  return (string);
}


x86 assembly (clang, -O0):
<irafgetc2>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
mov    -0x10(%rbp),%edx
add    $0x1,%edx
shl    $0x1,%edx
mov    $0x0,%al
call   1050 <irafgetc@plt>
cltq
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rdi
mov    -0x10(%rbp),%esi
mov    $0x0,%al
call   1040 <iraf2str@plt>
cltq
mov    %rax,-0x20(%rbp)
mov    -0x18(%rbp),%rdi
call   1030 <free@plt>
mov    -0x20(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<irafgetc2>:
push   %r14
push   %rbx
push   %rax
mov    %edx,%r14d
lea    (%r14,%r14,1),%edx
add    $0x2,%edx
xor    %eax,%eax
call   1050 <irafgetc@plt>
movslq %eax,%rbx
mov    %rbx,%rdi
mov    %r14d,%esi
xor    %eax,%eax
call   1040 <iraf2str@plt>
movslq %eax,%r14
mov    %rbx,%rdi
call   1030 <free@plt>
mov    %r14,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define i8* @irafgetc2(i8* %0, i32 %1, i32 %2) {
%4 = alloca i8*
%5 = alloca i32
%6 = alloca i32
%7 = alloca i8*
%8 = alloca i8*
store i8* %0, i8** %4
store i32 %1, i32* %5
store i32 %2, i32* %6
%9 = load i8*, i8** %4
%10 = load i32, i32* %5
%11 = load i32, i32* %6
%12 = add nsw i32 %11, 1
%13 = mul nsw i32 2, %12
%14 = call i32 (i8*, i32, i32, ...) bitcast (i32 (...)* @irafgetc to i32 (i8*, i32, i32, ...)*)(i8* %9, i32 %10, i32 %13)
%15 = sext i32 %14 to i64
%16 = inttoptr i64 %15 to i8*
store i8* %16, i8** %7
%17 = load i8*, i8** %7
%18 = load i32, i32* %6
%19 = call i32 (i8*, i32, ...) bitcast (i32 (...)* @iraf2str to i32 (i8*, i32, ...)*)(i8* %17, i32 %18)
%20 = sext i32 %19 to i64
%21 = inttoptr i64 %20 to i8*
store i8* %21, i8** %8
%22 = load i8*, i8** %7
%23 = load i8*, i8** %8
ret i8* %23
}

LLVM IR (-O2):
define i8* @irafgetc2(i8* %0, i32 %1, i32 %2) {
%4 = shl i32 %2, 1
%5 = add i32 %4, 2
%6 = tail call i32 (i8*, i32, i32, ...) bitcast (i32 (...)* @irafgetc to i32 (i8*, i32, i32, ...)*)(i8* %0, i32 %1, i32 %5)
%7 = sext i32 %6 to i64
%8 = inttoptr i64 %7 to i8*
%9 = tail call i32 (i8*, i32, ...) bitcast (i32 (...)* @iraf2str to i32 (i8*, i32, ...)*)(i8* %8, i32 %2)
%10 = sext i32 %9 to i64
%11 = inttoptr i64 %10 to i8*
tail call void @free(i8* %8)
ret i8* %11
}
/* Type definitions */
typedef int uint32_t;
typedef int int32_t;

/* Variables and functions */
int32_t signex32(uint32_t v, int bit) {
  int32_t m = 1U << (bit - 1);
  return (v ^ m) - m;
}


x86 assembly (clang, -O0):
<signex32>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x8(%rbp),%ecx
sub    $0x1,%ecx
mov    $0x1,%eax
shl    %cl,%eax
mov    %eax,-0xc(%rbp)
mov    -0x4(%rbp),%eax
xor    -0xc(%rbp),%eax
sub    -0xc(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<signex32>:
mov    %esi,%ecx
add    $0xff,%cl
mov    $0x1,%edx
shl    %cl,%edx
mov    %edi,%eax
btc    %ecx,%eax
sub    %edx,%eax
ret

LLVM IR (-O0):
define i32 @signex32(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%6 = load i32, i32* %4
%7 = sub nsw i32 %6, 1
%8 = shl i32 1, %7
store i32 %8, i32* %5
%9 = load i32, i32* %3
%10 = load i32, i32* %5
%11 = xor i32 %9, %10
%12 = load i32, i32* %5
%13 = sub nsw i32 %11, %12
ret i32 %13
}

LLVM IR (-O2):
define i32 @signex32(i32 %0, i32 %1) {
%3 = add nsw i32 %1, -1
%4 = shl nuw i32 1, %3
%5 = xor i32 %4, %0
%6 = sub nsw i32 %5, %4
ret i32 %6
}
void fun(void) {}


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

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

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

LLVM IR (-O2):
define void @fun() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ gpanel_fill(int, int, int, int, int);
void drawNet() {
  int i;
  for (i = 1; i < 240 - 4; i += 6) {
    gpanel_fill(0xFFFF, 320 / 2, i, 320 / 2, i + 3);
  }
}


x86 assembly (clang, -O0):
<drawNet>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x1,-0x4(%rbp)
cmpl   $0xec,-0x4(%rbp)
jge    1156 <drawNet+0x46>
mov    -0x4(%rbp),%edx
mov    -0x4(%rbp),%r8d
add    $0x3,%r8d
mov    $0xffff,%edi
mov    $0xa0,%ecx
mov    %ecx,%esi
call   1030 <gpanel_fill@plt>
mov    -0x4(%rbp),%eax
add    $0x6,%eax
mov    %eax,-0x4(%rbp)
jmp    111f <drawNet+0xf>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<drawNet>:
push   %rbx
mov    $0x1,%ebx
cs nopw 0x0(%rax,%rax,1)
lea    0x3(%rbx),%r8d
mov    $0xffff,%edi
mov    $0xa0,%esi
mov    %ebx,%edx
mov    $0xa0,%ecx
call   1030 <gpanel_fill@plt>
lea    0x6(%rbx),%eax
cmp    $0xe6,%ebx
mov    %eax,%ebx
jb     1120 <drawNet+0x10>
pop    %rbx
ret

LLVM IR (-O0):
define void @drawNet() {
%1 = alloca i32
store i32 1, i32* %1
br label %2
2: ; preds = %10, %0
%3 = load i32, i32* %1
%4 = icmp slt i32 %3, 236
br i1 %4, label %5, label %13
5: ; preds = %2
%6 = load i32, i32* %1
%7 = load i32, i32* %1
%8 = add nsw i32 %7, 3
%9 = call i32 @gpanel_fill(i32 65535, i32 160, i32 %6, i32 160, i32 %8)
br label %10
10: ; preds = %5
%11 = load i32, i32* %1
%12 = add nsw i32 %11, 6
store i32 %12, i32* %1
br label %2
13: ; preds = %2
ret void
}

LLVM IR (-O2):
define void @drawNet() {
br label %1
1: ; preds = %0, %1
%2 = phi i32 [ 1, %0 ], [ %5, %1 ]
%3 = add nuw nsw i32 %2, 3
%4 = tail call i32 @gpanel_fill(i32 65535, i32 160, i32 %2, i32 160, i32 %3)
%5 = add nuw nsw i32 %2, 6
%6 = icmp ult i32 %2, 230
br i1 %6, label %1, label %7
7: ; preds = %1
ret void
}
/* Variables and functions */
int /*<<< orphan*/ NF_CMD(int);
int /*<<< orphan*/ NF_Reset();
void NF_Init(void) {
  NF_Reset();
  NF_CMD((0x00));
}


x86 assembly (clang, -O0):
<NF_Init>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1030 <NF_Reset@plt>
xor    %edi,%edi
call   1040 <NF_CMD@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<NF_Init>:
push   %rax
xor    %eax,%eax
call   1030 <NF_Reset@plt>
xor    %edi,%edi
pop    %rax
jmp    1040 <NF_CMD@plt>

LLVM IR (-O0):
define void @NF_Init() {
%1 = call i32 (...) @NF_Reset()
%2 = call i32 @NF_CMD(i32 0)
ret void
}

LLVM IR (-O2):
define void @NF_Init() {
%1 = tail call i32 (...) @NF_Reset()
%2 = tail call i32 @NF_CMD(i32 0)
ret void
}
int C_Utils_compare_longdouble(const long double item1,
                               const long double item2) {
  if (item1 == item2)
    return 0;
  return item1 < item2 ? -1 : 1;
}


x86 assembly (clang, -O0):
<C_Utils_compare_longdouble>:
push   %rbp
mov    %rsp,%rbp
fldt   0x20(%rbp)
fldt   0x10(%rbp)
fstpt  -0x20(%rbp)
fstpt  -0x30(%rbp)
fldt   -0x20(%rbp)
fldt   -0x30(%rbp)
fxch   %st(1)
fucomip %st(1),%st
fstp   %st(0)
jne    1139 <C_Utils_compare_longdouble+0x39>
jp     1139 <C_Utils_compare_longdouble+0x39>
jmp    112d <C_Utils_compare_longdouble+0x2d>
movl   $0x0,-0x4(%rbp)
jmp    1152 <C_Utils_compare_longdouble+0x52>
fldt   -0x20(%rbp)
fldt   -0x30(%rbp)
fucomip %st(1),%st
fstp   %st(0)
setbe  %al
movzbl %al,%ecx
mov    %ecx,%eax
lea    -0x1(%rax,%rax,1),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<C_Utils_compare_longdouble>:
fldt   0x8(%rsp)
fldt   0x18(%rsp)
xor    %ecx,%ecx
fucomi %st(1),%st
setbe  %cl
xor    %eax,%eax
fxch   %st(1)
fucomip %st(1),%st
fstp   %st(0)
lea    -0x1(%rcx,%rcx,1),%ecx
cmovne %ecx,%eax
cmovp  %ecx,%eax
ret

LLVM IR (-O0):
define i32 @C_Utils_compare_longdouble(x86_fp80 %0, x86_fp80 %1) {
%3 = alloca i32
%4 = alloca x86_fp80
%5 = alloca x86_fp80
store x86_fp80 %0, x86_fp80* %4
store x86_fp80 %1, x86_fp80* %5
%6 = load x86_fp80, x86_fp80* %4
%7 = load x86_fp80, x86_fp80* %5
%8 = fcmp oeq x86_fp80 %6, %7
br i1 %8, label %9, label %10
9: ; preds = %2
store i32 0, i32* %3
br label %16
10: ; preds = %2
%11 = load x86_fp80, x86_fp80* %4
%12 = load x86_fp80, x86_fp80* %5
%13 = fcmp olt x86_fp80 %11, %12
%14 = zext i1 %13 to i64
%15 = select i1 %13, i32 -1, i32 1
store i32 %15, i32* %3
br label %16
16: ; preds = %10, %9
%17 = load i32, i32* %3
ret i32 %17
}

LLVM IR (-O2):
define i32 @C_Utils_compare_longdouble(x86_fp80 %0, x86_fp80 %1) {
%3 = fcmp oeq x86_fp80 %0, %1
%4 = fcmp olt x86_fp80 %0, %1
%5 = select i1 %4, i32 -1, i32 1
%6 = select i1 %3, i32 0, i32 %5
ret i32 %6
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void registerObject() { printf("Registered !"); }


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

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

LLVM IR (-O0):
@.str = [13 x i8] c"Registered !\00"
define void @registerObject() {
%1 = call i32 @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [13 x i8] c"Registered !\00"
define void @registerObject() {
%1 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0))
ret void
}
int test_imm_69int64_lowword_mem(long long *val) {
  return ((*val) & (0x69 << 0)) ? -20 : -40;
}


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

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

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

LLVM IR (-O2):
define i32 @test_imm_69int64_lowword_mem(i64* nocapture %0) {
%2 = load i64, i64* %0
%3 = and i64 %2, 105
%4 = icmp eq i64 %3, 0
%5 = select i1 %4, i32 -40, i32 -20
ret i32 %5
}
int mdp_ppp_blit_and_wait(struct mdp_info *mdp, struct mdp_blit_req *req,
                          struct file *src_file, unsigned long src_start,
                          unsigned long src_len, struct file *dst_file,
                          unsigned long dst_start, unsigned long dst_len) {
  return 0;
}


x86 assembly (clang, -O0):
<mdp_ppp_blit_and_wait>:
push   %rbp
mov    %rsp,%rbp
mov    0x18(%rbp),%rax
mov    0x10(%rbp),%rax
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    %r8,-0x28(%rbp)
mov    %r9,-0x30(%rbp)
xor    %eax,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
%struct.mdp_info = type opaque
%struct.mdp_blit_req = type opaque
%struct.file = type opaque
define i32 @mdp_ppp_blit_and_wait(%struct.mdp_info* %0, %struct.mdp_blit_req* %1, %struct.file* %2, i64 %3, i64 %4, %struct.file* %5, i64 %6, i64 %7) {
%9 = alloca %struct.mdp_info*
%10 = alloca %struct.mdp_blit_req*
%11 = alloca %struct.file*
%12 = alloca i64
%13 = alloca i64
%14 = alloca %struct.file*
%15 = alloca i64
%16 = alloca i64
store %struct.mdp_info* %0, %struct.mdp_info** %9
store %struct.mdp_blit_req* %1, %struct.mdp_blit_req** %10
store %struct.file* %2, %struct.file** %11
store i64 %3, i64* %12
store i64 %4, i64* %13
store %struct.file* %5, %struct.file** %14
store i64 %6, i64* %15
store i64 %7, i64* %16
ret i32 0
}

LLVM IR (-O2):
%struct.mdp_info = type opaque
%struct.mdp_blit_req = type opaque
%struct.file = type opaque
define i32 @mdp_ppp_blit_and_wait(%struct.mdp_info* nocapture readnone %0, %struct.mdp_blit_req* nocapture readnone %1, %struct.file* nocapture readnone %2, i64 %3, i64 %4, %struct.file* nocapture readnone %5, i64 %6, i64 %7) {
ret i32 0
}
/* Type definitions */
typedef int /*<<< orphan*/ key;

/* Variables and functions */
int /*<<< orphan*/ memcpy(char *, int *, int);
const char *nogr_name_from_key(int key) {
  static char str[9] = {0};
  memcpy(str, &key, sizeof(key));
  return str;
}


x86 assembly (clang, -O0):
<nogr_name_from_key>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
lea    0x2f07(%rip),%rdi
lea    -0x4(%rbp),%rsi
mov    $0x4,%edx
call   1030 <memcpy@plt>
lea    0x2ef2(%rip),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<nogr_name_from_key>:
push   %rbx
sub    $0x10,%rsp
mov    %edi,0xc(%rsp)
lea    0x2f09(%rip),%rbx
lea    0xc(%rsp),%rsi
mov    %rbx,%rdi
mov    $0x4,%edx
call   1030 <memcpy@plt>
mov    %rbx,%rax
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@nogr_name_from_key.str = internal global [9 x i8] zeroinitializer
define i8* @nogr_name_from_key(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = call i32 @memcpy(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @nogr_name_from_key.str, i64 0, i64 0), i32* %2, i32 4)
ret i8* getelementptr inbounds ([9 x i8], [9 x i8]* @nogr_name_from_key.str, i64 0, i64 0)
}

LLVM IR (-O2):
@nogr_name_from_key.str = internal global [9 x i8] zeroinitializer
define i8* @nogr_name_from_key(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = call i32 @memcpy(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @nogr_name_from_key.str, i64 0, i64 0), i32* %2, i32 4)
ret i8* getelementptr inbounds ([9 x i8], [9 x i8]* @nogr_name_from_key.str, i64 0, i64 0)
}
/* Type definitions */
typedef int /*<<< orphan*/ pid_t;

/* Variables and functions */
int /*<<< orphan*/ SYS_getpid;
int /*<<< orphan*/ syscall(int /*<<< orphan*/);
pid_t sys_getpid(void) { return syscall(SYS_getpid); }


x86 assembly (clang, -O0):
<sys_getpid>:
push   %rbp
mov    %rsp,%rbp
mov    0x2ed5(%rip),%rax
mov    (%rax),%edi
call   1030 <syscall@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<sys_getpid>:
mov    0x2ed9(%rip),%rax
mov    (%rax),%edi
jmp    1030 <syscall@plt>

LLVM IR (-O0):
@SYS_getpid = global i32 0
define i32 @sys_getpid() {
%1 = load i32, i32* @SYS_getpid
%2 = call i32 @syscall(i32 %1)
ret i32 %2
}

LLVM IR (-O2):
@SYS_getpid = global i32 0
define i32 @sys_getpid() {
%1 = load i32, i32* @SYS_getpid
%2 = tail call i32 @syscall(i32 %1)
ret i32 %2
}
/* Variables and functions */
int partion(int *, int, int);
void quick_sort(int *elements, int low, int high) {
  int pivot = 0;
  if (high < low)
    return;
  pivot = partion(elements, low, high);
  quick_sort(elements, low, pivot - 1);
  quick_sort(elements, pivot + 1, high);
}


x86 assembly (clang, -O0):
<quick_sort>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
mov    -0x10(%rbp),%eax
cmp    -0xc(%rbp),%eax
jge    114a <quick_sort+0x2a>
jmp    1180 <quick_sort+0x60>
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
mov    -0x10(%rbp),%edx
call   1030 <partion@plt>
mov    %eax,-0x14(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
mov    -0x14(%rbp),%edx
sub    $0x1,%edx
call   1040 <quick_sort@plt>
mov    -0x8(%rbp),%rdi
mov    -0x14(%rbp),%esi
add    $0x1,%esi
mov    -0x10(%rbp),%edx
call   1040 <quick_sort@plt>
add    $0x20,%rsp
pop    %rbp
ret

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

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

LLVM IR (-O2):
define void @quick_sort(i32* %0, i32 %1, i32 %2) {
%4 = icmp slt i32 %2, %1
br i1 %4, label %11, label %5
5: ; preds = %3, %5
%6 = phi i32 [ %9, %5 ], [ %1, %3 ]
%7 = tail call i32 @partion(i32* %0, i32 %6, i32 %2)
%8 = add nsw i32 %7, -1
tail call void @quick_sort(i32* %0, i32 %6, i32 %8)
%9 = add nsw i32 %7, 1
%10 = icmp slt i32 %7, %2
br i1 %10, label %5, label %11
11: ; preds = %5, %3
ret void
}
/* Variables and functions */
scalar_t__ SafeMalloc(scalar_t__, char *);
int /*<<< orphan*/ strcpy(char *, char *);
scalar_t__ strlen(char *);
char *strdup(char *str) {
  char *temp;
  temp = (char *)SafeMalloc(strlen(str) + 1, "strdup");
  strcpy(temp, str);
  return temp;
}


x86 assembly (clang, -O0):
<strdup>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <strlen@plt>
mov    %rax,%rdi
add    $0x1,%rdi
lea    0xead(%rip),%rsi
call   1050 <SafeMalloc@plt>
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x8(%rbp),%rsi
call   1030 <strcpy@plt>
mov    -0x10(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<strdup>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%r14
call   1040 <strlen@plt>
lea    0x1(%rax),%rdi
lea    0xeb9(%rip),%rsi
call   1050 <SafeMalloc@plt>
mov    %rax,%rbx
mov    %rax,%rdi
mov    %r14,%rsi
call   1030 <strcpy@plt>
mov    %rbx,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@.str = [7 x i8] c"strdup\00"
define i8* @strdup(i8* %0) {
%2 = alloca i8*
%3 = alloca i8*
store i8* %0, i8** %2
%4 = load i8*, i8** %2
%5 = call i64 @strlen(i8* %4)
%6 = add nsw i64 %5, 1
%7 = call i64 @SafeMalloc(i64 %6, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0))
%8 = inttoptr i64 %7 to i8*
store i8* %8, i8** %3
%9 = load i8*, i8** %3
%10 = load i8*, i8** %2
%11 = call i32 @strcpy(i8* %9, i8* %10)
%12 = load i8*, i8** %3
ret i8* %12
}

LLVM IR (-O2):
@.str = [7 x i8] c"strdup\00"
define i8* @strdup(i8* %0) {
%2 = tail call i64 @strlen(i8* dereferenceable(1) %0)
%3 = add nsw i64 %2, 1
%4 = tail call i64 @SafeMalloc(i64 %3, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0))
%5 = inttoptr i64 %4 to i8*
%6 = tail call i32 @strcpy(i8* %5, i8* %0)
ret i8* %5
}
void *get(char *key) {}


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

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

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

LLVM IR (-O2):
define noalias i8* @get(i8* nocapture readnone %0) {
ret i8* undef
}
/* Variables and functions */
int /*<<< orphan*/ abort();
h() {
  int c[4];
  c[0] = 0;
  c[1] = 1;
  c[2] = 2;
  c[3] = 3;
  for (int i = 0; i < 4; i++)
    if (!(c[i] == i))
      abort();
}


x86 assembly (clang, -O0):
<h>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movl   $0x0,-0x20(%rbp)
movl   $0x1,-0x1c(%rbp)
movl   $0x2,-0x18(%rbp)
movl   $0x3,-0x14(%rbp)
movl   $0x0,-0x24(%rbp)
cmpl   $0x4,-0x24(%rbp)
jge    1170 <h+0x60>
movslq -0x24(%rbp),%rax
mov    -0x20(%rbp,%rax,4),%eax
cmp    -0x24(%rbp),%eax
je     115d <h+0x4d>
mov    $0x0,%al
call   1030 <abort@plt>
jmp    1162 <h+0x52>
mov    -0x24(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x24(%rbp)
jmp    113b <h+0x2b>
mov    -0x4(%rbp),%eax
add    $0x30,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @h() {
%1 = alloca i32
%2 = alloca [4 x i32]
%3 = alloca i32
%4 = getelementptr inbounds [4 x i32], [4 x i32]* %2, i64 0, i64 0
store i32 0, i32* %4
%5 = getelementptr inbounds [4 x i32], [4 x i32]* %2, i64 0, i64 1
store i32 1, i32* %5
%6 = getelementptr inbounds [4 x i32], [4 x i32]* %2, i64 0, i64 2
store i32 2, i32* %6
%7 = getelementptr inbounds [4 x i32], [4 x i32]* %2, i64 0, i64 3
store i32 3, i32* %7
store i32 0, i32* %3
br label %8
8: ; preds = %21, %0
%9 = load i32, i32* %3
%10 = icmp slt i32 %9, 4
br i1 %10, label %11, label %24
11: ; preds = %8
%12 = load i32, i32* %3
%13 = sext i32 %12 to i64
%14 = getelementptr inbounds [4 x i32], [4 x i32]* %2, i64 0, i64 %13
%15 = load i32, i32* %14
%16 = load i32, i32* %3
%17 = icmp eq i32 %15, %16
br i1 %17, label %20, label %18
18: ; preds = %11
%19 = call i32 (...) @abort()
unreachable
20: ; preds = %11
br label %21
21: ; preds = %20
%22 = load i32, i32* %3
%23 = add nsw i32 %22, 1
store i32 %23, i32* %3
br label %8
24: ; preds = %8
%25 = load i32, i32* %1
ret i32 %25
}

LLVM IR (-O2):
define i32 @h() {
ret i32 undef
}
/* Type definitions */
typedef size_t uint32_t;
typedef scalar_t__ int32_t;

/* Variables and functions */
uint32_t walk_stack_usage(int32_t *stack_usage) {
  uint32_t idx = 0;
  while (stack_usage[idx]) {
    idx++;
  }
  return idx;
}


x86 assembly (clang, -O0):
<walk_stack_usage>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movq   $0x0,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    -0x10(%rbp),%rcx
cmpq   $0x0,(%rax,%rcx,8)
je     1134 <walk_stack_usage+0x34>
mov    -0x10(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x10(%rbp)
jmp    1110 <walk_stack_usage+0x10>
mov    -0x10(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<walk_stack_usage>:
mov    $0xffffffffffffffff,%rax
nopw   0x0(%rax,%rax,1)
cmpq   $0x0,0x8(%rdi,%rax,8)
lea    0x1(%rax),%rax
jne    1110 <walk_stack_usage+0x10>
ret

LLVM IR (-O0):
define i64 @walk_stack_usage(i64* %0) {
%2 = alloca i64*
%3 = alloca i64
store i64* %0, i64** %2
store i64 0, i64* %3
br label %4
4: ; preds = %10, %1
%5 = load i64*, i64** %2
%6 = load i64, i64* %3
%7 = getelementptr inbounds i64, i64* %5, i64 %6
%8 = load i64, i64* %7
%9 = icmp ne i64 %8, 0
br i1 %9, label %10, label %13
10: ; preds = %4
%11 = load i64, i64* %3
%12 = add i64 %11, 1
store i64 %12, i64* %3
br label %4
13: ; preds = %4
%14 = load i64, i64* %3
ret i64 %14
}

LLVM IR (-O2):
define i64 @walk_stack_usage(i64* nocapture %0) {
br label %2
2: ; preds = %2, %1
%3 = phi i64 [ 0, %1 ], [ %7, %2 ]
%4 = getelementptr inbounds i64, i64* %0, i64 %3
%5 = load i64, i64* %4
%6 = icmp eq i64 %5, 0
%7 = add i64 %3, 1
br i1 %6, label %8, label %2
8: ; preds = %2
ret i64 %3
}
/* Type definitions */
typedef int /*<<< orphan*/ a;

/* Variables and functions */
int find_subarray_len(int *, int, int);
int /*<<< orphan*/ printf(char *, int);
void main() {
  int a[] = {1, 4, 45, 6, 0, 19};
  int len = sizeof(a) / sizeof(a[0]);
  int sum = 5;
  int res = find_subarray_len(a, len, sum);
  printf("\nthe subarray len is %d\n", res);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    0xed1(%rip),%rax
mov    %rax,-0x20(%rbp)
mov    0xece(%rip),%rax
mov    %rax,-0x18(%rbp)
mov    0xecb(%rip),%rax
mov    %rax,-0x10(%rbp)
movl   $0x6,-0x24(%rbp)
movl   $0x5,-0x28(%rbp)
lea    -0x20(%rbp),%rdi
mov    -0x24(%rbp),%esi
mov    -0x28(%rbp),%edx
call   1040 <find_subarray_len@plt>
mov    %eax,-0x2c(%rbp)
mov    -0x2c(%rbp),%esi
lea    0xea5(%rip),%rdi
call   1030 <printf@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
sub    $0x18,%rsp
mov    0xee5(%rip),%rax
mov    %rax,0x10(%rsp)
movaps 0xec9(%rip),%xmm0
movaps %xmm0,(%rsp)
mov    %rsp,%rdi
mov    $0x6,%esi
mov    $0x5,%edx
call   1040 <find_subarray_len@plt>
lea    0xec4(%rip),%rdi
mov    %eax,%esi
call   1030 <printf@plt>
add    $0x18,%rsp
ret

LLVM IR (-O0):
@__const.main.a = [6 x i32] [i32 1, i32 4, i32 45, i32 6, i32 0, i32 19]
@.str = [25 x i8] c"\0Athe subarray len is %d\0A\00"
define void @main() {
%1 = alloca [6 x i32]
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
%5 = bitcast [6 x i32]* %1 to i8*
store i32 6, i32* %2
store i32 5, i32* %3
%6 = getelementptr inbounds [6 x i32], [6 x i32]* %1, i64 0, i64 0
%7 = load i32, i32* %2
%8 = load i32, i32* %3
%9 = call i32 @find_subarray_len(i32* %6, i32 %7, i32 %8)
store i32 %9, i32* %4
%10 = load i32, i32* %4
%11 = call i32 @printf(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str, i64 0, i64 0), i32 %10)
ret void
}

LLVM IR (-O2):
@__const.main.a = [6 x i32] [i32 1, i32 4, i32 45, i32 6, i32 0, i32 19]
@.str = [25 x i8] c"\0Athe subarray len is %d\0A\00"
define void @main() {
%1 = alloca [6 x i32]
%2 = bitcast [6 x i32]* %1 to i8*
%3 = getelementptr inbounds [6 x i32], [6 x i32]* %1, i64 0, i64 0
%4 = call i32 @find_subarray_len(i32* %3, i32 6, i32 5)
%5 = call i32 @printf(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str, i64 0, i64 0), i32 %4)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ prints(char *);
int /*<<< orphan*/ sprintf(char *, char *, int, int);
int move(int x, int y) {
  char c[100];
  sprintf(c, "[%d;%dH", y + 1, x + 1);
  prints(c);
}


x86 assembly (clang, -O0):
<move>:
push   %rbp
mov    %rsp,%rbp
sub    $0x70,%rsp
mov    %edi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
lea    -0x70(%rbp),%rdi
mov    -0xc(%rbp),%edx
add    $0x1,%edx
mov    -0x8(%rbp),%ecx
add    $0x1,%ecx
lea    0xebb(%rip),%rsi
call   1040 <sprintf@plt>
lea    -0x70(%rbp),%rdi
call   1030 <prints@plt>
mov    -0x4(%rbp),%eax
add    $0x70,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<move>:
push   %rbx
sub    $0x70,%rsp
lea    0x1(%rsi),%edx
lea    0x1(%rdi),%ecx
lea    0xece(%rip),%rsi
mov    %rsp,%rbx
mov    %rbx,%rdi
call   1040 <sprintf@plt>
mov    %rbx,%rdi
call   1030 <prints@plt>
add    $0x70,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@.str = [9 x i8] c"\1B[%d;%dH\00"
define i32 @move(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
%6 = alloca [100 x i8]
store i32 %0, i32* %4
store i32 %1, i32* %5
%7 = getelementptr inbounds [100 x i8], [100 x i8]* %6, i64 0, i64 0
%8 = load i32, i32* %5
%9 = add nsw i32 %8, 1
%10 = load i32, i32* %4
%11 = add nsw i32 %10, 1
%12 = call i32 @sprintf(i8* %7, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), i32 %9, i32 %11)
%13 = getelementptr inbounds [100 x i8], [100 x i8]* %6, i64 0, i64 0
%14 = call i32 @prints(i8* %13)
%15 = load i32, i32* %3
ret i32 %15
}

LLVM IR (-O2):
@.str = [9 x i8] c"\1B[%d;%dH\00"
define i32 @move(i32 %0, i32 %1) {
%3 = alloca [100 x i8]
%4 = getelementptr inbounds [100 x i8], [100 x i8]* %3, i64 0, i64 0
%5 = add nsw i32 %1, 1
%6 = add nsw i32 %0, 1
%7 = call i32 @sprintf(i8* %4, i8* dereferenceable(1) getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), i32 %5, i32 %6)
%8 = call i32 @prints(i8* %4)
ret i32 undef
}
/* Forward declarations */
typedef struct TYPE_2__ TYPE_1__;

/* Type definitions */
struct TYPE_2__ {
  char *client_data;
};
typedef TYPE_1__ XIMCallback;

/* Variables and functions */
void set_XIMCallback_client_data(void *_p, void *_v) {
  ((XIMCallback *)_p)->client_data = (char *)_v;
}


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

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

LLVM IR (-O0):
%struct.TYPE_2__ = type { i8* }
define void @set_XIMCallback_client_data(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
store i8* %0, i8** %3
store i8* %1, i8** %4
%5 = load i8*, i8** %4
%6 = load i8*, i8** %3
%7 = bitcast i8* %6 to %struct.TYPE_2__*
%8 = getelementptr inbounds %struct.TYPE_2__, %struct.TYPE_2__* %7, i32 0, i32 0
store i8* %5, i8** %8
ret void
}

LLVM IR (-O2):
define void @set_XIMCallback_client_data(i8* nocapture writeonly %0, i8* %1) {
%3 = bitcast i8* %0 to i8**
store i8* %1, i8** %3
ret void
}
/* Variables and functions */
int f35(int *);
int f36(int *p) { return f35(p); }


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

x86 assembly (clang, -O2):
<f36>:
jmp    1030 <f35@plt>

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

LLVM IR (-O2):
define i32 @f36(i32* %0) {
%2 = tail call i32 @f35(i32* %0)
ret i32 %2
}
/* Variables and functions */
int alphanum_to_int(char c) { return (c < 58) ? c - 48 : c - 87; }


x86 assembly (clang, -O0):
<alphanum_to_int>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movsbl -0x1(%rbp),%eax
cmp    $0x3a,%eax
jge    1126 <alphanum_to_int+0x26>
movsbl -0x1(%rbp),%eax
sub    $0x30,%eax
mov    %eax,-0x8(%rbp)
jmp    1130 <alphanum_to_int+0x30>
movsbl -0x1(%rbp),%eax
sub    $0x57,%eax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<alphanum_to_int>:
lea    -0x57(%rdi),%ecx
lea    -0x30(%rdi),%eax
cmp    $0x3a,%dil
cmovge %ecx,%eax
ret

LLVM IR (-O0):
define i32 @alphanum_to_int(i8 signext %0) {
%2 = alloca i8
store i8 %0, i8* %2
%3 = load i8, i8* %2
%4 = sext i8 %3 to i32
%5 = icmp slt i32 %4, 58
br i1 %5, label %6, label %10
6: ; preds = %1
%7 = load i8, i8* %2
%8 = sext i8 %7 to i32
%9 = sub nsw i32 %8, 48
br label %14
10: ; preds = %1
%11 = load i8, i8* %2
%12 = sext i8 %11 to i32
%13 = sub nsw i32 %12, 87
br label %14
14: ; preds = %10, %6
%15 = phi i32 [ %9, %6 ], [ %13, %10 ]
ret i32 %15
}

LLVM IR (-O2):
define i32 @alphanum_to_int(i8 signext %0) {
%2 = sext i8 %0 to i32
%3 = icmp slt i8 %0, 58
%4 = select i1 %3, i32 -48, i32 -87
%5 = add nsw i32 %4, %2
ret i32 %5
}
/* Variables and functions */
unsigned int readu4(unsigned char *);
unsigned int zip_entry_datetime(unsigned char *entry) {
  return readu4(entry + 12);
}


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

x86 assembly (clang, -O2):
<zip_entry_datetime>:
add    $0xc,%rdi
jmp    1030 <readu4@plt>

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

LLVM IR (-O2):
define i32 @zip_entry_datetime(i8* %0) {
%2 = getelementptr inbounds i8, i8* %0, i64 12
%3 = tail call i32 @readu4(i8* %2)
ret i32 %3
}
void c_pomp_section_begin_(struct ompregdescr *r) { (void)0; }


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

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

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

LLVM IR (-O2):
%struct.ompregdescr = type opaque
define void @c_pomp_section_begin_(%struct.ompregdescr* nocapture %0) {
ret void
}
void bz_internal_error(int errcode) {}


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

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

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

LLVM IR (-O2):
define void @bz_internal_error(i32 %0) {
ret void
}