xunge/DecIR huggingface dataset:
/* Variables and functions */
scalar_t__ log10(double);
unsigned int GetNumberOfDigits(unsigned int i) {
  return i > 0 ? (int)log10((double)i) + 1 : 1;
}


x86 assembly (clang, -O0):
<GetNumberOfDigits>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
cmpl   $0x0,-0x4(%rbp)
jbe    113d <GetNumberOfDigits+0x2d>
mov    -0x4(%rbp),%eax
cvtsi2sd %rax,%xmm0
call   1030 <log10@plt>
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    114a <GetNumberOfDigits+0x3a>
mov    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    114a <GetNumberOfDigits+0x3a>
mov    -0x8(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<GetNumberOfDigits>:
test   %edi,%edi
je     1129 <GetNumberOfDigits+0x19>
push   %rax
mov    %edi,%eax
cvtsi2sd %rax,%xmm0
call   1030 <log10@plt>
add    $0x1,%eax
add    $0x8,%rsp
ret
mov    $0x1,%eax
ret

LLVM IR (-O0):
define i32 @GetNumberOfDigits(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = icmp ugt i32 %3, 0
br i1 %4, label %5, label %11
5: ; preds = %1
%6 = load i32, i32* %2
%7 = uitofp i32 %6 to double
%8 = call i64 @log10(double %7)
%9 = trunc i64 %8 to i32
%10 = add nsw i32 %9, 1
br label %12
11: ; preds = %1
br label %12
12: ; preds = %11, %5
%13 = phi i32 [ %10, %5 ], [ 1, %11 ]
ret i32 %13
}

LLVM IR (-O2):
define i32 @GetNumberOfDigits(i32 %0) {
%2 = icmp eq i32 %0, 0
br i1 %2, label %8, label %3
3: ; preds = %1
%4 = uitofp i32 %0 to double
%5 = tail call i64 @log10(double %4)
%6 = trunc i64 %5 to i32
%7 = add nsw i32 %6, 1
br label %8
8: ; preds = %1, %3
%9 = phi i32 [ %7, %3 ], [ 1, %1 ]
ret i32 %9
}
/* Variables and functions */
int _ada_use_c2phc(int, int *, int *, double *);
int syscon_degree_of_standard_polynomial(int k, int *d) {
  int fail;
  double *c;
  fail = _ada_use_c2phc(119, &k, d, c);
  return fail;
}


x86 assembly (clang, -O0):
<syscon_degree_of_standard_polynomial>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rdx
mov    -0x20(%rbp),%rcx
mov    $0x77,%edi
lea    -0x4(%rbp),%rsi
call   1030 <_ada_use_c2phc@plt>
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<syscon_degree_of_standard_polynomial>:
push   %rax
mov    %rsi,%rdx
mov    %edi,0x4(%rsp)
lea    0x4(%rsp),%rsi
mov    $0x77,%edi
call   1030 <_ada_use_c2phc@plt>
pop    %rcx
ret

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

LLVM IR (-O2):
define i32 @syscon_degree_of_standard_polynomial(i32 %0, i32* %1) {
%3 = alloca i32
store i32 %0, i32* %3
%4 = call i32 @_ada_use_c2phc(i32 119, i32* %3, i32* %1, double* undef)
ret i32 %4
}
void ptrace_sandbox_permit_utimes(struct pt_sandbox *p_sandbox) {
  (void)p_sandbox;
}


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

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

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

LLVM IR (-O2):
%struct.pt_sandbox = type opaque
define void @ptrace_sandbox_permit_utimes(%struct.pt_sandbox* nocapture %0) {
ret void
}
/* Type definitions */
struct voice_t {
  int dummy;
};

/* Variables and functions */
int apply_gen_envx(struct voice_t *, int);
int apply_gen_volume(struct voice_t *, int, int *, int *);
int apply_gen_amp(struct voice_t *voice, int output, int *amp_0, int *amp_1) {
  output = apply_gen_envx(voice, output);
  output = apply_gen_volume(voice, output, amp_0, amp_1);
  return output;
}


x86 assembly (clang, -O0):
<apply_gen_amp>:
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    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
call   1040 <apply_gen_envx@plt>
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
mov    -0x18(%rbp),%rdx
mov    -0x20(%rbp),%rcx
call   1030 <apply_gen_volume@plt>
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<apply_gen_amp>:
push   %r15
push   %r14
push   %rbx
mov    %rcx,%r14
mov    %rdx,%r15
mov    %rdi,%rbx
call   1040 <apply_gen_envx@plt>
mov    %rbx,%rdi
mov    %eax,%esi
mov    %r15,%rdx
mov    %r14,%rcx
pop    %rbx
pop    %r14
pop    %r15
jmp    1030 <apply_gen_volume@plt>

LLVM IR (-O0):
%struct.voice_t = type { i32 }
define i32 @apply_gen_amp(%struct.voice_t* %0, i32 %1, i32* %2, i32* %3) {
%5 = alloca %struct.voice_t*
%6 = alloca i32
%7 = alloca i32*
%8 = alloca i32*
store %struct.voice_t* %0, %struct.voice_t** %5
store i32 %1, i32* %6
store i32* %2, i32** %7
store i32* %3, i32** %8
%9 = load %struct.voice_t*, %struct.voice_t** %5
%10 = load i32, i32* %6
%11 = call i32 @apply_gen_envx(%struct.voice_t* %9, i32 %10)
store i32 %11, i32* %6
%12 = load %struct.voice_t*, %struct.voice_t** %5
%13 = load i32, i32* %6
%14 = load i32*, i32** %7
%15 = load i32*, i32** %8
%16 = call i32 @apply_gen_volume(%struct.voice_t* %12, i32 %13, i32* %14, i32* %15)
store i32 %16, i32* %6
%17 = load i32, i32* %6
ret i32 %17
}

LLVM IR (-O2):
%struct.voice_t = type { i32 }
define i32 @apply_gen_amp(%struct.voice_t* %0, i32 %1, i32* %2, i32* %3) {
%5 = tail call i32 @apply_gen_envx(%struct.voice_t* %0, i32 %1)
%6 = tail call i32 @apply_gen_volume(%struct.voice_t* %0, i32 %5, i32* %2, i32* %3)
ret i32 %6
}
/* Type definitions */
typedef scalar_t__ uint32_t;

/* Variables and functions */
void I2CSlaveEnable(uint32_t ui32Base) {
  ;
  (*((volatile unsigned long *)(ui32Base + 0x00000020))) |= 0x00000020;
  (*((volatile unsigned long *)(ui32Base + 0x00000804))) = 0x00000001;
}


x86 assembly (clang, -O0):
<I2CSlaveEnable>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    0x20(%rax),%rcx
or     $0x20,%rcx
mov    %rcx,0x20(%rax)
mov    -0x8(%rbp),%rax
movq   $0x1,0x804(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<I2CSlaveEnable>:
orq    $0x20,0x20(%rdi)
movq   $0x1,0x804(%rdi)
ret

LLVM IR (-O0):
define void @I2CSlaveEnable(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = load i64, i64* %2
%4 = add nsw i64 %3, 32
%5 = inttoptr i64 %4 to i64*
%6 = load volatile i64, i64* %5
%7 = or i64 %6, 32
store volatile i64 %7, i64* %5
%8 = load i64, i64* %2
%9 = add nsw i64 %8, 2052
%10 = inttoptr i64 %9 to i64*
store volatile i64 1, i64* %10
ret void
}

LLVM IR (-O2):
define void @I2CSlaveEnable(i64 %0) {
%2 = add nsw i64 %0, 32
%3 = inttoptr i64 %2 to i64*
%4 = load volatile i64, i64* %3
%5 = or i64 %4, 32
store volatile i64 %5, i64* %3
%6 = add nsw i64 %0, 2052
%7 = inttoptr i64 %6 to i64*
store volatile i64 1, i64* %7
ret void
}
void os_graphics(int mode) {}


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

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

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

LLVM IR (-O2):
define void @os_graphics(i32 %0) {
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ uint8_t;

/* Variables and functions */
uint8_t format_address_byte_from_index_head(uint8_t *data) { return data[3]; }


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

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

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

LLVM IR (-O2):
define i32 @format_address_byte_from_index_head(i32* nocapture %0) {
%2 = getelementptr inbounds i32, i32* %0, i64 3
%3 = load i32, i32* %2
ret i32 %3
}
void EVP_MD_CTX_copy_ex(void) {}


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

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

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

LLVM IR (-O2):
define void @EVP_MD_CTX_copy_ex() {
ret void
}
int issorted(int count, int *list) {
  int iter;
  for (iter = 1; iter < count; iter++)
    if (list[iter] < list[iter - 1])
      return 0;
  return 1;
}


x86 assembly (clang, -O0):
<issorted>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x1,-0x14(%rbp)
mov    -0x14(%rbp),%eax
cmp    -0x8(%rbp),%eax
jge    115e <issorted+0x5e>
mov    -0x10(%rbp),%rax
movslq -0x14(%rbp),%rcx
mov    (%rax,%rcx,4),%eax
mov    -0x10(%rbp),%rcx
mov    -0x14(%rbp),%edx
sub    $0x1,%edx
movslq %edx,%rdx
cmp    (%rcx,%rdx,4),%eax
jge    114b <issorted+0x4b>
movl   $0x0,-0x4(%rbp)
jmp    1165 <issorted+0x65>
jmp    1150 <issorted+0x50>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    1112 <issorted+0x12>
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<issorted>:
mov    $0x1,%eax
cmp    $0x2,%edi
jl     1132 <issorted+0x32>
mov    %edi,%r8d
mov    (%rsi),%edx
mov    $0x1,%edi
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
mov    %edx,%ecx
mov    (%rsi,%rdi,4),%edx
cmp    %ecx,%edx
jl     1133 <issorted+0x33>
add    $0x1,%rdi
cmp    %rdi,%r8
jne    1120 <issorted+0x20>
ret
xor    %eax,%eax
ret

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

LLVM IR (-O2):
define i32 @issorted(i32 %0, i32* nocapture %1) {
%3 = icmp sgt i32 %0, 1
br i1 %3, label %4, label %16
4: ; preds = %2
%5 = zext i32 %0 to i64
%6 = load i32, i32* %1
br label %9
7: ; preds = %9
%8 = icmp eq i64 %15, %5
br i1 %8, label %16, label %9
9: ; preds = %4, %7
%10 = phi i32 [ %6, %4 ], [ %13, %7 ]
%11 = phi i64 [ 1, %4 ], [ %15, %7 ]
%12 = getelementptr inbounds i32, i32* %1, i64 %11
%13 = load i32, i32* %12
%14 = icmp slt i32 %13, %10
%15 = add nuw nsw i64 %11, 1
br i1 %14, label %16, label %7
16: ; preds = %9, %7, %2
%17 = phi i32 [ 1, %2 ], [ 1, %7 ], [ 0, %9 ]
ret i32 %17
}
int bit_turnoff_rightmost_bit(int n) { return (n & (n - 1)); }


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

x86 assembly (clang, -O2):
<bit_turnoff_rightmost_bit>:
lea    -0x1(%rdi),%eax
and    %edi,%eax
ret

LLVM IR (-O0):
define i32 @bit_turnoff_rightmost_bit(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = load i32, i32* %2
%5 = sub nsw i32 %4, 1
%6 = and i32 %3, %5
ret i32 %6
}

LLVM IR (-O2):
define i32 @bit_turnoff_rightmost_bit(i32 %0) {
%2 = add nsw i32 %0, -1
%3 = and i32 %2, %0
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ vx86_NBSB_Write8(int, unsigned char, unsigned char);
void nb1_Write8(unsigned char offset, unsigned char val) {
  vx86_NBSB_Write8(1, offset, val);
}


x86 assembly (clang, -O0):
<nb1_Write8>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %sil,%al
mov    %dil,%cl
mov    %cl,-0x1(%rbp)
mov    %al,-0x2(%rbp)
mov    -0x1(%rbp),%al
mov    $0x1,%edi
movzbl %al,%esi
movzbl -0x2(%rbp),%edx
call   1030 <vx86_NBSB_Write8@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<nb1_Write8>:
mov    %esi,%edx
mov    %edi,%esi
mov    $0x1,%edi
jmp    1030 <vx86_NBSB_Write8@plt>

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

LLVM IR (-O2):
define void @nb1_Write8(i8 zeroext %0, i8 zeroext %1) {
%3 = tail call i32 @vx86_NBSB_Write8(i32 1, i8 zeroext %0, i8 zeroext %1)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
void print_int(void *int_val) { printf("%d", *(int *)int_val); }


x86 assembly (clang, -O0):
<print_int>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%esi
lea    0xed7(%rip),%rdi
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<print_int>:
mov    (%rdi),%esi
lea    0xee7(%rip),%rdi
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [3 x i8] c"%d\00"
define void @print_int(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = bitcast i8* %3 to i32*
%5 = load i32, i32* %4
%6 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 %5)
ret void
}

LLVM IR (-O2):
@.str = [3 x i8] c"%d\00"
define void @print_int(i8* nocapture %0) {
%2 = bitcast i8* %0 to i32*
%3 = load i32, i32* %2
%4 = tail call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 %3)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ mew_duart_print_hex_ex(char const *, char const *,
                                          unsigned int);
void mew_debug_print_hex_ex(const char *text, const char *blob,
                            unsigned int len) {
  mew_duart_print_hex_ex(text, blob, len);
}


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

x86 assembly (clang, -O2):
<mew_debug_print_hex_ex>:
jmp    1030 <mew_duart_print_hex_ex@plt>

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

LLVM IR (-O2):
define void @mew_debug_print_hex_ex(i8* %0, i8* %1, i32 %2) {
%4 = tail call i32 @mew_duart_print_hex_ex(i8* %0, i8* %1, i32 %2)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ motor(int, int);
int /*<<< orphan*/ msleep(int);
int /*<<< orphan*/ off(int);
int /*<<< orphan*/ printf(char *);
void turnYourselfAround(int wheel) {
  printf("You do the Hokey Pokey\n");
  printf("and you turn yourself around\n");
  motor(wheel, 100);
  msleep(2500);
  off(wheel);
}


x86 assembly (clang, -O0):
<turnYourselfAround>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
lea    0xeae(%rip),%rdi
call   1060 <printf@plt>
lea    0xeba(%rip),%rdi
call   1060 <printf@plt>
mov    -0x4(%rbp),%edi
mov    $0x64,%esi
call   1030 <motor@plt>
mov    $0x9c4,%edi
call   1050 <msleep@plt>
mov    -0x4(%rbp),%edi
call   1040 <off@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<turnYourselfAround>:
push   %rbx
mov    %edi,%ebx
lea    0xeb6(%rip),%rdi
call   1040 <puts@plt>
lea    0xec1(%rip),%rdi
call   1040 <puts@plt>
mov    %ebx,%edi
mov    $0x64,%esi
call   1030 <motor@plt>
mov    $0x9c4,%edi
call   1060 <msleep@plt>
mov    %ebx,%edi
pop    %rbx
jmp    1050 <off@plt>

LLVM IR (-O0):
@.str = [24 x i8] c"You do the Hokey Pokey\0A\00"
@.str.1 = [30 x i8] c"and you turn yourself around\0A\00"
define void @turnYourselfAround(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = call i32 @printf(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str, i64 0, i64 0))
%4 = call i32 @printf(i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.1, i64 0, i64 0))
%5 = load i32, i32* %2
%6 = call i32 @motor(i32 %5, i32 100)
%7 = call i32 @msleep(i32 2500)
%8 = load i32, i32* %2
%9 = call i32 @off(i32 %8)
ret void
}

LLVM IR (-O2):
@str = [23 x i8] c"You do the Hokey Pokey\00"
@str.2 = [29 x i8] c"and you turn yourself around\00"
define void @turnYourselfAround(i32 %0) {
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([23 x i8], [23 x i8]* @str, i64 0, i64 0))
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([29 x i8], [29 x i8]* @str.2, i64 0, i64 0))
%4 = tail call i32 @motor(i32 %0, i32 100)
%5 = tail call i32 @msleep(i32 2500)
%6 = tail call i32 @off(i32 %0)
ret void
}
int est_triple(int i, signed char buff[], char c) {
  if (i < 2)
    return 0;
  return c == buff[i - 1] && c == buff[i - 2];
}


x86 assembly (clang, -O0):
<est_triple>:
push   %rbp
mov    %rsp,%rbp
mov    %dl,%al
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %al,-0x11(%rbp)
cmpl   $0x2,-0x8(%rbp)
jge    1126 <est_triple+0x26>
movl   $0x0,-0x4(%rbp)
jmp    1170 <est_triple+0x70>
movsbl -0x11(%rbp),%ecx
mov    -0x10(%rbp),%rax
mov    -0x8(%rbp),%edx
sub    $0x1,%edx
movslq %edx,%rdx
movsbl (%rax,%rdx,1),%edx
xor    %eax,%eax
cmp    %edx,%ecx
mov    %al,-0x12(%rbp)
jne    1165 <est_triple+0x65>
movsbl -0x11(%rbp),%eax
mov    -0x10(%rbp),%rcx
mov    -0x8(%rbp),%edx
sub    $0x2,%edx
movslq %edx,%rdx
movsbl (%rcx,%rdx,1),%ecx
cmp    %ecx,%eax
sete   %al
mov    %al,-0x12(%rbp)
mov    -0x12(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<est_triple>:
xor    %eax,%eax
cmp    $0x2,%edi
jl     111a <est_triple+0x1a>
lea    -0x1(%rdi),%ecx
cmp    %dl,(%rsi,%rcx,1)
jne    111a <est_triple+0x1a>
add    $0xfffffffe,%edi
xor    %eax,%eax
cmp    %dl,(%rsi,%rdi,1)
sete   %al
ret

LLVM IR (-O0):
define i32 @est_triple(i32 %0, i8* %1, i8 signext %2) {
%4 = alloca i32
%5 = alloca i32
%6 = alloca i8*
%7 = alloca i8
store i32 %0, i32* %5
store i8* %1, i8** %6
store i8 %2, i8* %7
%8 = load i32, i32* %5
%9 = icmp slt i32 %8, 2
br i1 %9, label %10, label %11
10: ; preds = %3
store i32 0, i32* %4
br label %36
11: ; preds = %3
%12 = load i8, i8* %7
%13 = sext i8 %12 to i32
%14 = load i8*, i8** %6
%15 = load i32, i32* %5
%16 = sub nsw i32 %15, 1
%17 = sext i32 %16 to i64
%18 = getelementptr inbounds i8, i8* %14, i64 %17
%19 = load i8, i8* %18
%20 = sext i8 %19 to i32
%21 = icmp eq i32 %13, %20
br i1 %21, label %22, label %33
22: ; preds = %11
%23 = load i8, i8* %7
%24 = sext i8 %23 to i32
%25 = load i8*, i8** %6
%26 = load i32, i32* %5
%27 = sub nsw i32 %26, 2
%28 = sext i32 %27 to i64
%29 = getelementptr inbounds i8, i8* %25, i64 %28
%30 = load i8, i8* %29
%31 = sext i8 %30 to i32
%32 = icmp eq i32 %24, %31
br label %33
33: ; preds = %22, %11
%34 = phi i1 [ false, %11 ], [ %32, %22 ]
%35 = zext i1 %34 to i32
store i32 %35, i32* %4
br label %36
36: ; preds = %33, %10
%37 = load i32, i32* %4
ret i32 %37
}

LLVM IR (-O2):
define i32 @est_triple(i32 %0, i8* nocapture %1, i8 signext %2) {
%4 = icmp slt i32 %0, 2
br i1 %4, label %18, label %5
5: ; preds = %3
%6 = add nsw i32 %0, -1
%7 = zext i32 %6 to i64
%8 = getelementptr inbounds i8, i8* %1, i64 %7
%9 = load i8, i8* %8
%10 = icmp eq i8 %9, %2
br i1 %10, label %11, label %18
11: ; preds = %5
%12 = add nsw i32 %0, -2
%13 = zext i32 %12 to i64
%14 = getelementptr inbounds i8, i8* %1, i64 %13
%15 = load i8, i8* %14
%16 = icmp eq i8 %15, %2
%17 = zext i1 %16 to i32
br label %18
18: ; preds = %5, %11, %3
%19 = phi i32 [ 0, %3 ], [ 0, %5 ], [ %17, %11 ]
ret i32 %19
}
/* Variables and functions */
float c_snrm2(int, float *, int);
int /*<<< orphan*/ printf(char *, float);
int main() {
  float x[] = {1.0, -2.0, 3.0, -4.0, 5.0, -6.0, 7.0, -8.0};
  int N = 8;
  int strideX = 1;
  float l2 = c_snrm2(N, x, strideX);
  printf("L2-norm: %f\n", l2);
}


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)
mov    0xec8(%rip),%rax
mov    %rax,-0x8(%rbp)
movl   $0x8,-0x24(%rbp)
movl   $0x1,-0x28(%rbp)
mov    -0x24(%rbp),%edi
lea    -0x20(%rbp),%rsi
mov    -0x28(%rbp),%edx
call   1040 <c_snrm2@plt>
movss  %xmm0,-0x2c(%rbp)
movss  -0x2c(%rbp),%xmm0
lea    0xe9e(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
sub    $0x28,%rsp
movaps 0xee5(%rip),%xmm0
movaps %xmm0,0x10(%rsp)
movaps 0xec9(%rip),%xmm0
movaps %xmm0,(%rsp)
mov    %rsp,%rsi
mov    $0x8,%edi
mov    $0x1,%edx
call   1040 <c_snrm2@plt>
lea    0xecc(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x28,%rsp
ret

LLVM IR (-O0):
@__const.main.x = [8 x float] [float 1.000000e+00, float -2.000000e+00, float 3.000000e+00, float -4.000000e+00, float 5.000000e+00, float -6.000000e+00, float 7.000000e+00, float -8.000000e+00]
@.str = [13 x i8] c"L2-norm: %f\0A\00"
define i32 @main() {
%1 = alloca [8 x float]
%2 = alloca i32
%3 = alloca i32
%4 = alloca float
%5 = bitcast [8 x float]* %1 to i8*
store i32 8, i32* %2
store i32 1, i32* %3
%6 = load i32, i32* %2
%7 = getelementptr inbounds [8 x float], [8 x float]* %1, i64 0, i64 0
%8 = load i32, i32* %3
%9 = call float @c_snrm2(i32 %6, float* %7, i32 %8)
store float %9, float* %4
%10 = load float, float* %4
%11 = call i32 @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0), float %10)
ret i32 0
}

LLVM IR (-O2):
@__const.main.x = [8 x float] [float 1.000000e+00, float -2.000000e+00, float 3.000000e+00, float -4.000000e+00, float 5.000000e+00, float -6.000000e+00, float 7.000000e+00, float -8.000000e+00]
@.str = [13 x i8] c"L2-norm: %f\0A\00"
define i32 @main() {
%1 = alloca [8 x float]
%2 = bitcast [8 x float]* %1 to i8*
%3 = getelementptr inbounds [8 x float], [8 x float]* %1, i64 0, i64 0
%4 = call float @c_snrm2(i32 8, float* %3, i32 1)
%5 = call i32 @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0), float %4)
ret i32 0
}
void gtk_justification_get_type() {}


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

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

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

LLVM IR (-O2):
define void @gtk_justification_get_type() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ _exit(int);
long sysconf(int name) {
  _exit(-1);
  return -1;
}


x86 assembly (clang, -O0):
<sysconf>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    $0xffffffff,%edi
call   1030 <_exit@plt>

x86 assembly (clang, -O2):
<sysconf>:
push   %rax
mov    $0xffffffff,%edi
call   1030 <_exit@plt>

LLVM IR (-O0):
define i64 @sysconf(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = call i32 @_exit(i32 -1)
unreachable
}

LLVM IR (-O2):
define i64 @sysconf(i32 %0) {
%2 = tail call i32 @_exit(i32 -1)
unreachable
}
/* Variables and functions */
scalar_t__ EPERM;
scalar_t__ errno;
int /*<<< orphan*/ getuid();
int seteuid(int /*<<< orphan*/);
int droprootprivs(void) {
  if (seteuid(getuid()) == -1 && errno != EPERM)
    return 0;
  else
    return 1;
}


x86 assembly (clang, -O0):
<droprootprivs>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1030 <getuid@plt>
mov    %eax,%edi
call   1040 <seteuid@plt>
cmp    $0xffffffff,%eax
jne    1165 <droprootprivs+0x45>
mov    0x2e9a(%rip),%rax
mov    (%rax),%rax
mov    0x2e80(%rip),%rcx
cmp    (%rcx),%rax
je     1165 <droprootprivs+0x45>
movl   $0x0,-0x4(%rbp)
jmp    116c <droprootprivs+0x4c>
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<droprootprivs>:
push   %rbx
xor    %ebx,%ebx
xor    %eax,%eax
call   1030 <getuid@plt>
mov    %eax,%edi
call   1040 <seteuid@plt>
cmp    $0xffffffff,%eax
jne    114c <droprootprivs+0x2c>
mov    0x2ea3(%rip),%rax
mov    (%rax),%rax
mov    0x2e89(%rip),%rcx
cmp    (%rcx),%rax
jne    1151 <droprootprivs+0x31>
mov    $0x1,%ebx
mov    %ebx,%eax
pop    %rbx
ret

LLVM IR (-O0):
@errno = global i64 0
@EPERM = global i64 0
define i32 @droprootprivs() {
%1 = alloca i32
%2 = call i32 (...) @getuid()
%3 = call i32 @seteuid(i32 %2)
%4 = icmp eq i32 %3, -1
br i1 %4, label %5, label %10
5: ; preds = %0
%6 = load i64, i64* @errno
%7 = load i64, i64* @EPERM
%8 = icmp ne i64 %6, %7
br i1 %8, label %9, label %10
9: ; preds = %5
store i32 0, i32* %1
br label %11
10: ; preds = %5, %0
store i32 1, i32* %1
br label %11
11: ; preds = %10, %9
%12 = load i32, i32* %1
ret i32 %12
}

LLVM IR (-O2):
@errno = global i64 0
@EPERM = global i64 0
define i32 @droprootprivs() {
%1 = tail call i32 (...) @getuid()
%2 = tail call i32 @seteuid(i32 %1)
%3 = icmp eq i32 %2, -1
br i1 %3, label %4, label %8
4: ; preds = %0
%5 = load i64, i64* @errno
%6 = load i64, i64* @EPERM
%7 = icmp eq i64 %5, %6
br i1 %7, label %8, label %9
8: ; preds = %4, %0
br label %9
9: ; preds = %4, %8
%10 = phi i32 [ 1, %8 ], [ 0, %4 ]
ret i32 %10
}
long long addimmdi3(long long a) { return a + 50; }


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

x86 assembly (clang, -O2):
<addimmdi3>:
lea    0x32(%rdi),%rax
ret

LLVM IR (-O0):
define i64 @addimmdi3(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = load i64, i64* %2
%4 = add nsw i64 %3, 50
ret i64 %4
}

LLVM IR (-O2):
define i64 @addimmdi3(i64 %0) {
%2 = add nsw i64 %0, 50
ret i64 %2
}
/* Variables and functions */
int w5100_read_byte(int);
unsigned w5100_readPMAGIC() { return w5100_read_byte(0x0029); }


x86 assembly (clang, -O0):
push   %rbp
mov    %rsp,%rbp
mov    $0x29,%edi
call   1030 <w5100_read_byte@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
mov    $0x29,%edi
jmp    1030 <w5100_read_byte@plt>

LLVM IR (-O0):
define i32 @w5100_readPMAGIC() {
%1 = call i32 @w5100_read_byte(i32 41)
ret i32 %1
}

LLVM IR (-O2):
define i32 @w5100_readPMAGIC() {
%1 = tail call i32 @w5100_read_byte(i32 41)
ret i32 %1
}
/* Variables and functions */
int /*<<< orphan*/ __print_int(int);
int main() {
  int i;
  int a;
  for (i = 0; i < 5; i++) {
    a = 5;
  }
  __print_int(a);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
cmpl   $0x5,-0x8(%rbp)
jge    1145 <main+0x35>
movl   $0x5,-0xc(%rbp)
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1126 <main+0x16>
mov    -0xc(%rbp),%edi
call   1030 <__print_int@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 @__print_int(i32 5)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
int main() {
  int array[3] = {100, 200, 300};
  printf("The 4th element is %d\n", array[3]);
  return (0);
}


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

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

LLVM IR (-O0):
@__const.main.array = [3 x i32] [i32 100, i32 200, i32 300]
@.str = [23 x i8] c"The 4th element is %d\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca [3 x i32]
store i32 0, i32* %1
%3 = bitcast [3 x i32]* %2 to i8*
%4 = getelementptr inbounds [3 x i32], [3 x i32]* %2, i64 0, i64 3
%5 = load i32, i32* %4
%6 = call i32 @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str, i64 0, i64 0), i32 %5)
ret i32 0
}

LLVM IR (-O2):
@.str = [23 x i8] c"The 4th element is %d\0A\00"
define i32 @main() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str, i64 0, i64 0), i32 poison)
ret i32 0
}
/* Variables and functions */
long double cosl(long double);
long double sinl(long double);
long double f_bonus_derivative(long double x) {
  return (x - 4.0L) * (2.0L * sinl(x) + (x - 4.0L) * cosl(x));
}


x86 assembly (clang, -O0):
<f_bonus_derivative>:
push   %rbp
mov    %rsp,%rbp
sub    $0x50,%rsp
fldt   0x10(%rbp)
fstpt  -0x10(%rbp)
fldt   -0x10(%rbp)
flds   0xec9(%rip)
fld    %st(0)
fstpt  -0x40(%rbp)
fsubr  %st(1),%st
fstpt  -0x1c(%rbp)
mov    %rsp,%rax
fstpt  (%rax)
call   1030 <sinl@plt>
fldt   -0x40(%rbp)
fxch   %st(1)
fstpt  -0x28(%rbp)
fldt   -0x10(%rbp)
fsub   %st,%st(1)
fxch   %st(1)
fstpt  -0x34(%rbp)
mov    %rsp,%rax
fstpt  (%rax)
call   1040 <cosl@plt>
fldt   -0x34(%rbp)
fldt   -0x28(%rbp)
fldt   -0x1c(%rbp)
fxch   %st(2)
fmulp  %st,%st(3)
fadd   %st,%st(0)
faddp  %st,%st(2)
fmulp  %st,%st(1)
add    $0x50,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<f_bonus_derivative>:
sub    $0x38,%rsp
fldt   0x40(%rsp)
fld    %st(0)
fstpt  0x14(%rsp)
fld    %st(0)
fadds  0xeca(%rip)
fstpt  0x2c(%rsp)
fstpt  (%rsp)
call   1030 <sinl@plt>
fstpt  0x20(%rsp)
fldt   0x14(%rsp)
fstpt  (%rsp)
call   1040 <cosl@plt>
fldt   0x2c(%rsp)
fmul   %st,%st(1)
fldt   0x20(%rsp)
fadd   %st,%st(0)
faddp  %st,%st(2)
fmulp  %st,%st(1)
add    $0x38,%rsp
ret

LLVM IR (-O0):
define x86_fp80 @f_bonus_derivative(x86_fp80 %0) {
%2 = alloca x86_fp80
store x86_fp80 %0, x86_fp80* %2
%3 = load x86_fp80, x86_fp80* %2
%4 = fsub x86_fp80 %3, 0xK40018000000000000000
%5 = load x86_fp80, x86_fp80* %2
%6 = call x86_fp80 @sinl(x86_fp80 %5)
%7 = load x86_fp80, x86_fp80* %2
%8 = fsub x86_fp80 %7, 0xK40018000000000000000
%9 = load x86_fp80, x86_fp80* %2
%10 = call x86_fp80 @cosl(x86_fp80 %9)
%11 = fmul x86_fp80 %8, %10
%12 = call x86_fp80 @llvm.fmuladd.f80(x86_fp80 0xK40008000000000000000, x86_fp80 %6, x86_fp80 %11)
%13 = fmul x86_fp80 %4, %12
ret x86_fp80 %13
}

LLVM IR (-O2):
define x86_fp80 @f_bonus_derivative(x86_fp80 %0) {
%2 = fadd x86_fp80 %0, 0xKC0018000000000000000
%3 = tail call x86_fp80 @sinl(x86_fp80 %0)
%4 = tail call x86_fp80 @cosl(x86_fp80 %0)
%5 = fmul x86_fp80 %2, %4
%6 = tail call x86_fp80 @llvm.fmuladd.f80(x86_fp80 %3, x86_fp80 0xK40008000000000000000, x86_fp80 %5)
%7 = fmul x86_fp80 %2, %6
ret x86_fp80 %7
}
/* Variables and functions */
int partition(int *, int, int);
void quicksort(int array[], int p, int r) {
  if (p < r) {
    int q;
    q = partition(array, p, r);
    quicksort(array, p, q - 1);
    quicksort(array, q + 1, r);
  }
}


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    -0xc(%rbp),%eax
cmp    -0x10(%rbp),%eax
jge    1174 <quicksort+0x54>
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
mov    -0x10(%rbp),%edx
call   1030 <partition@plt>
mov    %eax,-0x14(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
mov    -0x14(%rbp),%edx
sub    $0x1,%edx
call   1040 <quicksort@plt>
mov    -0x8(%rbp),%rdi
mov    -0x14(%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    %edx,%esi
jge    1166 <quicksort+0x46>
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 <partition@plt>
mov    %eax,%ebx
lea    -0x1(%rbx),%edx
mov    %r15,%rdi
mov    %ebp,%esi
call   1040 <quicksort@plt>
add    $0x1,%ebx
mov    %ebx,%ebp
cmp    %r14d,%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
store i32* %0, i32** %4
store i32 %1, i32* %5
store i32 %2, i32* %6
%8 = load i32, i32* %5
%9 = load i32, i32* %6
%10 = icmp slt i32 %8, %9
br i1 %10, label %11, label %24
11: ; preds = %3
%12 = load i32*, i32** %4
%13 = load i32, i32* %5
%14 = load i32, i32* %6
%15 = call i32 @partition(i32* %12, i32 %13, i32 %14)
store i32 %15, i32* %7
%16 = load i32*, i32** %4
%17 = load i32, i32* %5
%18 = load i32, i32* %7
%19 = sub nsw i32 %18, 1
%20 = load i32*, i32** %4
%21 = load i32, i32* %7
%22 = add nsw i32 %21, 1
%23 = load i32, i32* %6
br label %24
24: ; preds = %11, %3
ret void
}

LLVM IR (-O2):
define void @quicksort(i32* %0, i32 %1, i32 %2) {
%4 = icmp slt i32 %1, %2
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)
%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 die(const char *str) {
  print_emerg(str);
  do {
    asm volatile(" ");
  } while (1);
}


x86 assembly (clang, -O0):
<die>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
mov    $0x0,%al
call   1030 <print_emerg@plt>
mov    $0x1,%al
test   $0x1,%al
jne    1127 <die+0x17>
jmp    1136 <die+0x26>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<die>:
push   %rax
xor    %eax,%eax
call   1030 <print_emerg@plt>
nopl   0x0(%rax,%rax,1)
jmp    1120 <die+0x10>

LLVM IR (-O0):
define void @die(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 (i8*, ...) bitcast (i32 (...)* @print_emerg to i32 (i8*, ...)*)(i8* %3)
br label %5
5: ; preds = %6, %1
br label %6
6: ; preds = %5
br i1 true, label %5, label %7
7: ; preds = %6
ret void
}

LLVM IR (-O2):
define void @die(i8* %0) {
%2 = tail call i32 (i8*, ...) bitcast (i32 (...)* @print_emerg to i32 (i8*, ...)*)(i8* %0)
br label %3
3: ; preds = %3, %1
tail call void asm sideeffect " ", "~{dirflag},~{fpsr},~{flags}"()
br label %3
}
/* Variables and functions */
int /*<<< orphan*/ abort();
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
int /*<<< orphan*/ stderr;
void grpcsharp_native_callback_dispatcher_init() {
  fprintf(stderr, "Should never reach here");
  abort();
}


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

x86 assembly (clang, -O2):
<grpcsharp_native_callback_dispatcher_init>:
push   %rax
mov    0x2eb8(%rip),%rax
mov    (%rax),%edi
lea    0xecf(%rip),%rsi
call   1040 <fprintf@plt>
xor    %eax,%eax
call   1030 <abort@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [24 x i8] c"Should never reach here\00"
define void @grpcsharp_native_callback_dispatcher_init() {
%1 = load i32, i32* @stderr
%2 = call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str, i64 0, i64 0))
%3 = call i32 (...) @abort()
unreachable
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [24 x i8] c"Should never reach here\00"
define void @grpcsharp_native_callback_dispatcher_init() {
%1 = load i32, i32* @stderr
%2 = tail call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str, i64 0, i64 0))
%3 = tail call i32 (...) @abort()
unreachable
}
/* Type definitions */
struct section_list {
  int dummy;
};
struct genlist {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ genlist_unique(struct genlist *);
void section_list_unique(struct section_list *tthis) {
  genlist_unique((struct genlist *)tthis);
}


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

x86 assembly (clang, -O2):
<section_list_unique>:
jmp    1030 <genlist_unique@plt>

LLVM IR (-O0):
%struct.section_list = type { i32 }
%struct.genlist = type { i32 }
define void @section_list_unique(%struct.section_list* %0) {
%2 = alloca %struct.section_list*
store %struct.section_list* %0, %struct.section_list** %2
%3 = load %struct.section_list*, %struct.section_list** %2
%4 = bitcast %struct.section_list* %3 to %struct.genlist*
%5 = call i32 @genlist_unique(%struct.genlist* %4)
ret void
}

LLVM IR (-O2):
%struct.section_list = type { i32 }
%struct.genlist = type { i32 }
define void @section_list_unique(%struct.section_list* %0) {
%2 = bitcast %struct.section_list* %0 to %struct.genlist*
%3 = tail call i32 @genlist_unique(%struct.genlist* %2)
ret void
}
/* Variables and functions */
int _gotachar();
int /*<<< orphan*/ monLock();
int /*<<< orphan*/ monUnlock();
int mon_gotachar(void) {
  int ret;
  monLock();
  ret = _gotachar();
  monUnlock();
  return (ret);
}


x86 assembly (clang, -O0):
<mon_gotachar>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1030 <monLock@plt>
mov    $0x0,%al
call   1040 <_gotachar@plt>
mov    %eax,-0x4(%rbp)
mov    $0x0,%al
call   1050 <monUnlock@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<mon_gotachar>:
push   %rbx
xor    %eax,%eax
call   1030 <monLock@plt>
xor    %eax,%eax
call   1040 <_gotachar@plt>
mov    %eax,%ebx
xor    %eax,%eax
call   1050 <monUnlock@plt>
mov    %ebx,%eax
pop    %rbx
ret

LLVM IR (-O0):
define i32 @mon_gotachar() {
%1 = alloca i32
%2 = call i32 (...) @monLock()
%3 = call i32 (...) @_gotachar()
store i32 %3, i32* %1
%4 = call i32 (...) @monUnlock()
%5 = load i32, i32* %1
ret i32 %5
}

LLVM IR (-O2):
define i32 @mon_gotachar() {
%1 = tail call i32 (...) @monLock()
%2 = tail call i32 (...) @_gotachar()
%3 = tail call i32 (...) @monUnlock()
ret i32 %2
}
void debug_print(const char *fmt, ...) {}


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

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

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

LLVM IR (-O2):
define void @debug_print(i8* nocapture %0, ...) {
ret void
}
const char *vde_chain_nm5_name_out(int i) {
  switch (i) {
  case 0:
    return "o0";
  case 1:
    return "o1";
  case 2:
    return "o2";
  default:
    return 0;
  }
}


x86 assembly (clang, -O0):
<vde_chain_nm5_name_out>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0xc(%rbp)
mov    -0xc(%rbp),%eax
mov    %eax,-0x10(%rbp)
test   %eax,%eax
je     113c <vde_chain_nm5_name_out+0x3c>
jmp    111a <vde_chain_nm5_name_out+0x1a>
mov    -0x10(%rbp),%eax
sub    $0x1,%eax
je     114c <vde_chain_nm5_name_out+0x4c>
jmp    112b <vde_chain_nm5_name_out+0x2b>
mov    -0x10(%rbp),%eax
sub    $0x2,%eax
je     115c <vde_chain_nm5_name_out+0x5c>
jmp    116c <vde_chain_nm5_name_out+0x6c>
lea    0xebd(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    1174 <vde_chain_nm5_name_out+0x74>
lea    0xeb0(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    1174 <vde_chain_nm5_name_out+0x74>
lea    0xea3(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    1174 <vde_chain_nm5_name_out+0x74>
movq   $0x0,-0x8(%rbp)
mov    -0x8(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<vde_chain_nm5_name_out>:
cmp    $0x2,%edi
ja     1117 <vde_chain_nm5_name_out+0x17>
movslq %edi,%rax
lea    0xefd(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
ret
xor    %eax,%eax
ret

LLVM IR (-O0):
@.str = [3 x i8] c"o0\00"
@.str.1 = [3 x i8] c"o1\00"
@.str.2 = [3 x i8] c"o2\00"
define i8* @vde_chain_nm5_name_out(i32 %0) {
%2 = alloca i8*
%3 = alloca i32
store i32 %0, i32* %3
%4 = load i32, i32* %3
switch i32 %4, label %8 [
i32 0, label %5
i32 1, label %6
i32 2, label %7
]
5: ; preds = %1
store i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8** %2
br label %9
6: ; preds = %1
store i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i8** %2
br label %9
7: ; preds = %1
store i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0), i8** %2
br label %9
8: ; preds = %1
store i8* null, i8** %2
br label %9
9: ; preds = %8, %7, %6, %5
%10 = load i8*, i8** %2
ret i8* %10
}

LLVM IR (-O2):
@.str = [3 x i8] c"o0\00"
@.str.1 = [3 x i8] c"o1\00"
@.str.2 = [3 x i8] c"o2\00"
@reltable.vde_chain_nm5_name_out = [3 x i32] [i32 trunc (i64 sub (i64 ptrtoint ([3 x i8]* @.str to i64), i64 ptrtoint ([3 x i32]* @reltable.vde_chain_nm5_name_out to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([3 x i8]* @.str.1 to i64), i64 ptrtoint ([3 x i32]* @reltable.vde_chain_nm5_name_out to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([3 x i8]* @.str.2 to i64), i64 ptrtoint ([3 x i32]* @reltable.vde_chain_nm5_name_out to i64)) to i32)]
define i8* @vde_chain_nm5_name_out(i32 %0) {
%2 = icmp ult i32 %0, 3
br i1 %2, label %3, label %7
3: ; preds = %1
%4 = sext i32 %0 to i64
%5 = shl i64 %4, 2
%6 = call i8* @llvm.load.relative.i64(i8* bitcast ([3 x i32]* @reltable.vde_chain_nm5_name_out to i8*), i64 %5)
br label %7
7: ; preds = %1, %3
%8 = phi i8* [ %6, %3 ], [ null, %1 ]
ret i8* %8
}
/* Type definitions */
struct rte_mempool {
  int dummy;
};

/* Variables and functions */
int _rte_mempool_sc_get(struct rte_mempool *, void **);
int rte_mempool_get(struct rte_mempool *mp, void **obj_p) {
  return (_rte_mempool_sc_get(mp, obj_p));
}


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

x86 assembly (clang, -O2):
<rte_mempool_get>:
jmp    1030 <_rte_mempool_sc_get@plt>

LLVM IR (-O0):
%struct.rte_mempool = type { i32 }
define i32 @rte_mempool_get(%struct.rte_mempool* %0, i8** %1) {
%3 = alloca %struct.rte_mempool*
%4 = alloca i8**
store %struct.rte_mempool* %0, %struct.rte_mempool** %3
store i8** %1, i8*** %4
%5 = load %struct.rte_mempool*, %struct.rte_mempool** %3
%6 = load i8**, i8*** %4
%7 = call i32 @_rte_mempool_sc_get(%struct.rte_mempool* %5, i8** %6)
ret i32 %7
}

LLVM IR (-O2):
%struct.rte_mempool = type { i32 }
define i32 @rte_mempool_get(%struct.rte_mempool* %0, i8** %1) {
%3 = tail call i32 @_rte_mempool_sc_get(%struct.rte_mempool* %0, i8** %1)
ret i32 %3
}
int calcularValorInicialEnReglaCuadrado(int x) {
  return x <= 2 ? 0 : x >= 3 && x <= 5 ? 3 : x >= 6 && x <= 8 ? 6 : 8;
}


x86 assembly (clang, -O0):
<calcularValorInicialEnReglaCuadrado>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
cmpl   $0x2,-0x4(%rbp)
jg     111b <calcularValorInicialEnReglaCuadrado+0x1b>
xor    %eax,%eax
mov    %eax,-0x8(%rbp)
jmp    1171 <calcularValorInicialEnReglaCuadrado+0x71>
cmpl   $0x3,-0x4(%rbp)
jl     113c <calcularValorInicialEnReglaCuadrado+0x3c>
cmpl   $0x5,-0x4(%rbp)
jg     113c <calcularValorInicialEnReglaCuadrado+0x3c>
mov    $0x3,%eax
mov    %eax,-0xc(%rbp)
jmp    116b <calcularValorInicialEnReglaCuadrado+0x6b>
xor    %eax,%eax
cmpl   $0x6,-0x4(%rbp)
mov    %al,-0xd(%rbp)
jl     1155 <calcularValorInicialEnReglaCuadrado+0x55>
cmpl   $0x8,-0x4(%rbp)
setle  %al
mov    %al,-0xd(%rbp)
mov    -0xd(%rbp),%dl
mov    $0x8,%eax
mov    $0x6,%ecx
test   $0x1,%dl
cmovne %ecx,%eax
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<calcularValorInicialEnReglaCuadrado>:
xor    %eax,%eax
cmp    $0x3,%edi
jl     111e <calcularValorInicialEnReglaCuadrado+0x1e>
mov    $0x3,%eax
cmp    $0x6,%edi
jb     111e <calcularValorInicialEnReglaCuadrado+0x1e>
xor    %eax,%eax
cmp    $0x9,%edi
setae  %al
add    %eax,%eax
add    $0x6,%eax
ret

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

LLVM IR (-O2):
define i32 @calcularValorInicialEnReglaCuadrado(i32 %0) {
%2 = icmp slt i32 %0, 3
br i1 %2, label %8, label %3
3: ; preds = %1
%4 = icmp ult i32 %0, 6
br i1 %4, label %8, label %5
5: ; preds = %3
%6 = icmp ugt i32 %0, 8
%7 = select i1 %6, i32 8, i32 6
br label %8
8: ; preds = %5, %3, %1
%9 = phi i32 [ 0, %1 ], [ %7, %5 ], [ 3, %3 ]
ret i32 %9
}
/* Variables and functions */
int /*<<< orphan*/ doit();
int main(void) {
  doit();
  return 0;
}


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

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

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

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @doit()
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ putchar(char);
int main(void) {
  int i;
  int j;
  int arr = {1, 2, 3};
  int k;
  putchar('\n');
  return (0);
}


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

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

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
store i32 0, i32* %1
store i32 1, i32* %4
%6 = call i32 @putchar(i8 signext 10)
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 @putchar(i8 signext 10)
ret i32 0
}