xunge/DecIR huggingface dataset:
odwrocona(int a) {
  int b = 0;
  while (a > 0) {
    b = b * 10 + a % 10;
    a = a / 10;
  }
  return b;
}


x86 assembly (clang, -O0):
<odwrocona>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
cmpl   $0x0,-0x4(%rbp)
jle    1145 <odwrocona+0x45>
imul   $0xa,-0x8(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0x4(%rbp),%eax
mov    $0xa,%ecx
cltd
idiv   %ecx
mov    -0xc(%rbp),%eax
add    %edx,%eax
mov    %eax,-0x8(%rbp)
mov    -0x4(%rbp),%eax
mov    $0xa,%ecx
cltd
idiv   %ecx
mov    %eax,-0x4(%rbp)
jmp    110e <odwrocona+0xe>
mov    -0x8(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<odwrocona>:
xor    %eax,%eax
test   %edi,%edi
jle    1131 <odwrocona+0x31>
mov    $0xcccccccd,%r8d
nopl   0x0(%rax)
lea    (%rax,%rax,4),%eax
mov    %edi,%edx
imul   %r8,%rdx
shr    $0x23,%rdx
lea    (%rdx,%rdx,1),%esi
lea    (%rsi,%rsi,4),%esi
mov    %edi,%ecx
sub    %esi,%ecx
lea    (%rcx,%rax,2),%eax
cmp    $0x9,%edi
mov    %edx,%edi
ja     1110 <odwrocona+0x10>
ret

LLVM IR (-O0):
define i32 @odwrocona(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %2
store i32 0, i32* %3
br label %4
4: ; preds = %7, %1
%5 = load i32, i32* %2
%6 = icmp sgt i32 %5, 0
br i1 %6, label %7, label %15
7: ; preds = %4
%8 = load i32, i32* %3
%9 = mul nsw i32 %8, 10
%10 = load i32, i32* %2
%11 = srem i32 %10, 10
%12 = add nsw i32 %9, %11
store i32 %12, i32* %3
%13 = load i32, i32* %2
%14 = sdiv i32 %13, 10
store i32 %14, i32* %2
br label %4
15: ; preds = %4
%16 = load i32, i32* %3
ret i32 %16
}

LLVM IR (-O2):
define i32 @odwrocona(i32 %0) {
%2 = icmp sgt i32 %0, 0
br i1 %2, label %3, label %11
3: ; preds = %1, %3
%4 = phi i32 [ %8, %3 ], [ 0, %1 ]
%5 = phi i32 [ %9, %3 ], [ %0, %1 ]
%6 = mul nsw i32 %4, 10
%7 = urem i32 %5, 10
%8 = add nsw i32 %6, %7
%9 = udiv i32 %5, 10
%10 = icmp ult i32 %5, 10
br i1 %10, label %11, label %3
11: ; preds = %3, %1
%12 = phi i32 [ 0, %1 ], [ %8, %3 ]
ret i32 %12
}
/* Type definitions */
typedef int uint8_t;

/* Variables and functions */
int /*<<< orphan*/ EXIT_FAILURE;
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
int /*<<< orphan*/ stderr;
uint8_t umod8(uint8_t a, uint8_t b) {
  uint8_t r;
  if (b == 0) {
    fprintf(stderr, "Should not happen\n");
    exit(EXIT_FAILURE);
  }
  r = a % b;
  return r;
}


x86 assembly (clang, -O0):
<umod8>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
cmpl   $0x0,-0x8(%rbp)
jne    115b <umod8+0x3b>
mov    0x2ea1(%rip),%rax
mov    (%rax),%edi
lea    0xeb8(%rip),%rsi
call   1030 <fprintf@plt>
mov    0x2e84(%rip),%rax
mov    (%rax),%edi
call   1040 <exit@plt>
mov    -0x4(%rbp),%eax
cltd
idivl  -0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    -0xc(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<umod8>:
test   %esi,%esi
je     112c <umod8+0xc>
mov    %edi,%eax
cltd
idiv   %esi
mov    %edx,%eax
ret
push   %rax
mov    0x2eac(%rip),%rax
mov    (%rax),%edi
lea    0xec3(%rip),%rsi
call   1030 <fprintf@plt>
mov    0x2e8f(%rip),%rax
mov    (%rax),%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [19 x i8] c"Should not happen\0A\00"
@EXIT_FAILURE = global i32 0
define i32 @umod8(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 = icmp eq i32 %6, 0
br i1 %7, label %8, label %13
8: ; preds = %2
%9 = load i32, i32* @stderr
%10 = call i32 @fprintf(i32 %9, i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0))
%11 = load i32, i32* @EXIT_FAILURE
%12 = call i32 @exit(i32 %11)
unreachable
13: ; preds = %2
%14 = load i32, i32* %3
%15 = load i32, i32* %4
%16 = srem i32 %14, %15
store i32 %16, i32* %5
%17 = load i32, i32* %5
ret i32 %17
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [19 x i8] c"Should not happen\0A\00"
@EXIT_FAILURE = global i32 0
define i32 @umod8(i32 %0, i32 %1) {
%3 = icmp eq i32 %1, 0
br i1 %3, label %4, label %9
4: ; preds = %2
%5 = load i32, i32* @stderr
%6 = tail call i32 @fprintf(i32 %5, i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0))
%7 = load i32, i32* @EXIT_FAILURE
%8 = tail call i32 @exit(i32 %7)
unreachable
9: ; preds = %2
%10 = srem i32 %0, %1
ret i32 %10
}
/* Type definitions */
typedef int /*<<< orphan*/ uint64_t;

/* Variables and functions */
int /*<<< orphan*/ cpuid(int, int /*<<< orphan*/ *, int /*<<< orphan*/ *,
                         int /*<<< orphan*/ *, int /*<<< orphan*/ *);
uint64_t cpuid_MaxLeaf(void) {
  uint64_t rax, rbx, rcx, rdx;
  int leaf = 0;
  cpuid(leaf, &rax, &rbx, &rcx, &rdx);
  return rax;
}


x86 assembly (clang, -O0):
<cpuid_MaxLeaf>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x14(%rbp)
mov    -0x14(%rbp),%edi
lea    -0x4(%rbp),%rsi
lea    -0x8(%rbp),%rdx
lea    -0xc(%rbp),%rcx
lea    -0x10(%rbp),%r8
call   1030 <cpuid@plt>
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<cpuid_MaxLeaf>:
sub    $0x18,%rsp
lea    0x8(%rsp),%rsi
lea    0x14(%rsp),%rdx
lea    0x10(%rsp),%rcx
lea    0xc(%rsp),%r8
xor    %edi,%edi
call   1030 <cpuid@plt>
mov    0x8(%rsp),%eax
add    $0x18,%rsp
ret

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

LLVM IR (-O2):
define i32 @cpuid_MaxLeaf() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
%5 = bitcast i32* %1 to i8*
%6 = bitcast i32* %2 to i8*
%7 = bitcast i32* %3 to i8*
%8 = bitcast i32* %4 to i8*
%9 = call i32 @cpuid(i32 0, i32* %1, i32* %2, i32* %3, i32* %4)
%10 = load i32, i32* %1
ret i32 %10
}
/* Variables and functions */
unsigned int __lzcnt(unsigned int);
unsigned int test__lzcnt(unsigned int x) { return __lzcnt(x); }


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

x86 assembly (clang, -O2):
<test__lzcnt>:
jmp    1030 <__lzcnt@plt>

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

LLVM IR (-O2):
define i32 @test__lzcnt(i32 %0) {
%2 = tail call i32 @__lzcnt(i32 %0)
ret i32 %2
}
void XExtentsOfFontSet() {}


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

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

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

LLVM IR (-O2):
define void @XExtentsOfFontSet() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ puts(char *);
void anthem(void) { puts("Unable to retrieve file!"); }


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

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

LLVM IR (-O0):
@.str = [25 x i8] c"Unable to retrieve file!\00"
define void @anthem() {
%1 = call i32 @puts(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [25 x i8] c"Unable to retrieve file!\00"
define void @anthem() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([25 x i8], [25 x i8]* @.str, i64 0, i64 0))
ret void
}
void CounterToLocalTimeC__0__Counter__overflow(void) {}


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

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

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

LLVM IR (-O2):
define void @CounterToLocalTimeC__0__Counter__overflow() {
ret void
}
/* Variables and functions */
int _ada_use_c2phc(int, int *, int *, double *);
int solcon_length_current_standard_solution_string(int *cursor, int *n) {
  int fail;
  double *c;
  fail = _ada_use_c2phc(525, cursor, n, c);
  return fail;
}


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

x86 assembly (clang, -O2):
<solcon_length_current_standard_solution_string>:
mov    %rsi,%rdx
mov    %rdi,%rsi
mov    $0x20d,%edi
jmp    1030 <_ada_use_c2phc@plt>

LLVM IR (-O0):
define i32 @solcon_length_current_standard_solution_string(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** %3
%8 = load i32*, i32** %4
%9 = load double*, double** %6
%10 = call i32 @_ada_use_c2phc(i32 525, i32* %7, i32* %8, double* %9)
store i32 %10, i32* %5
%11 = load i32, i32* %5
ret i32 %11
}

LLVM IR (-O2):
define i32 @solcon_length_current_standard_solution_string(i32* %0, i32* %1) {
%3 = tail call i32 @_ada_use_c2phc(i32 525, i32* %0, i32* %1, double* undef)
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void PlaneStep3(void) { printf("PlaneStep3\n"); }


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

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

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

LLVM IR (-O2):
@str = [11 x i8] c"PlaneStep3\00"
define void @PlaneStep3() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([11 x i8], [11 x i8]* @str, i64 0, i64 0))
ret void
}
/* Variables and functions */
int strcmp(char const *, char const *);
int cmpnames(const void *s1, const void *s2) {
  const char *name1 = s1;
  const char *name2 = s2;
  return (strcmp(name1, name2));
}


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

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

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

LLVM IR (-O2):
define i32 @cmpnames(i8* nocapture %0, i8* nocapture %1) {
%3 = tail call i32 @strcmp(i8* dereferenceable(1) %0, i8* dereferenceable(1) %1)
ret i32 %3
}
/* Variables and functions */
double rosenbrockFunctionLowerRangeBound(int);
double installedProblemLowerRangeBound(int index, int dimension) {
  return (rosenbrockFunctionLowerRangeBound(dimension));
}


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

x86 assembly (clang, -O2):
<installedProblemLowerRangeBound>:
mov    %esi,%edi
jmp    1030 <rosenbrockFunctionLowerRangeBound@plt>

LLVM IR (-O0):
define double @installedProblemLowerRangeBound(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%5 = load i32, i32* %4
%6 = call double @rosenbrockFunctionLowerRangeBound(i32 %5)
ret double %6
}

LLVM IR (-O2):
define double @installedProblemLowerRangeBound(i32 %0, i32 %1) {
%3 = tail call double @rosenbrockFunctionLowerRangeBound(i32 %1)
ret double %3
}
/* Variables and functions */
int _ada_use_c2phc4c(int, int *, int *, double *, int /*<<< orphan*/);
int syscon_number_of_standard_Laurentials(int *length) {
  int *b, fail;
  double *c;
  fail = _ada_use_c2phc4c(122, length, b, c, 0);
  return fail;
}


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

x86 assembly (clang, -O2):
<syscon_number_of_standard_Laurentials>:
mov    %rdi,%rsi
mov    $0x7a,%edi
xor    %r8d,%r8d
jmp    1030 <_ada_use_c2phc4c@plt>

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

LLVM IR (-O2):
define i32 @syscon_number_of_standard_Laurentials(i32* %0) {
%2 = tail call i32 @_ada_use_c2phc4c(i32 122, i32* %0, i32* undef, double* undef, i32 0)
ret i32 %2
}
void fs_emu_lua_run_handler(const char *name) {}


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

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

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

LLVM IR (-O2):
define void @fs_emu_lua_run_handler(i8* nocapture %0) {
ret void
}
/* Type definitions */
typedef int uint8_t;

/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
void print_hex_string(uint8_t *hexstring, size_t length) {
  for (size_t i = 0; i < length; i++) {
    printf("%02X ", hexstring[i] & 0xff);
  }
}


x86 assembly (clang, -O0):
<print_hex_string>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movq   $0x0,-0x18(%rbp)
mov    -0x18(%rbp),%rax
cmp    -0x10(%rbp),%rax
jae    1164 <print_hex_string+0x54>
mov    -0x8(%rbp),%rax
mov    -0x18(%rbp),%rcx
mov    (%rax,%rcx,4),%esi
and    $0xff,%esi
lea    0xeb2(%rip),%rdi
call   1030 <printf@plt>
mov    -0x18(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x18(%rbp)
jmp    1128 <print_hex_string+0x18>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<print_hex_string>:
push   %r15
push   %r14
push   %r12
push   %rbx
push   %rax
test   %rsi,%rsi
je     1146 <print_hex_string+0x36>
mov    %rsi,%r12
mov    %rdi,%r14
xor    %ebx,%ebx
lea    0xed4(%rip),%r15
nopl   0x0(%rax)
movzbl (%r14,%rbx,4),%esi
mov    %r15,%rdi
call   1030 <printf@plt>
add    $0x1,%rbx
cmp    %rbx,%r12
jne    1130 <print_hex_string+0x20>
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
@.str = [6 x i8] c"%02X \00"
define void @print_hex_string(i32* %0, i64 %1) {
%3 = alloca i32*
%4 = alloca i64
%5 = alloca i64
store i32* %0, i32** %3
store i64 %1, i64* %4
store i64 0, i64* %5
br label %6
6: ; preds = %17, %2
%7 = load i64, i64* %5
%8 = load i64, i64* %4
%9 = icmp ult i64 %7, %8
br i1 %9, label %10, label %20
10: ; preds = %6
%11 = load i32*, i32** %3
%12 = load i64, i64* %5
%13 = getelementptr inbounds i32, i32* %11, i64 %12
%14 = load i32, i32* %13
%15 = and i32 %14, 255
%16 = call i32 @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i32 %15)
br label %17
17: ; preds = %10
%18 = load i64, i64* %5
%19 = add i64 %18, 1
store i64 %19, i64* %5
br label %6
20: ; preds = %6
ret void
}

LLVM IR (-O2):
@.str = [6 x i8] c"%02X \00"
define void @print_hex_string(i32* nocapture %0, i64 %1) {
%3 = icmp eq i64 %1, 0
br i1 %3, label %4, label %5
4: ; preds = %5, %2
ret void
5: ; preds = %2, %5
%6 = phi i64 [ %11, %5 ], [ 0, %2 ]
%7 = getelementptr inbounds i32, i32* %0, i64 %6
%8 = load i32, i32* %7
%9 = and i32 %8, 255
%10 = tail call i32 @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i32 %9)
%11 = add nuw i64 %6, 1
%12 = icmp eq i64 %11, %1
br i1 %12, label %4, label %5
}
/* Variables and functions */
size_t strlen(char *);
char *trim(char *s) {
  s++;
  s[strlen(s)] = 0;
  return s;
}


x86 assembly (clang, -O0):
<trim>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <strlen@plt>
mov    %rax,%rcx
mov    -0x10(%rbp),%rax
movb   $0x0,(%rax,%rcx,1)
mov    -0x8(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<trim>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%rbx
lea    0x1(%rdi),%r14
mov    %r14,%rdi
call   1030 <strlen@plt>
movb   $0x0,0x1(%rbx,%rax,1)
mov    %r14,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

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

LLVM IR (-O2):
define i8* @trim(i8* %0) {
%2 = getelementptr inbounds i8, i8* %0, i64 1
%3 = tail call i64 @strlen(i8* %2)
%4 = getelementptr inbounds i8, i8* %2, i64 %3
store i8 0, i8* %4
ret i8* %2
}
void c_vector3_init(float *vector, float x, float y, float z) {
  vector[0] = x;
  vector[1] = y;
  vector[2] = z;
}


x86 assembly (clang, -O0):
<c_vector3_init>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movss  %xmm0,-0xc(%rbp)
movss  %xmm1,-0x10(%rbp)
movss  %xmm2,-0x14(%rbp)
movss  -0xc(%rbp),%xmm0
mov    -0x8(%rbp),%rax
movss  %xmm0,(%rax)
movss  -0x10(%rbp),%xmm0
mov    -0x8(%rbp),%rax
movss  %xmm0,0x4(%rax)
movss  -0x14(%rbp),%xmm0
mov    -0x8(%rbp),%rax
movss  %xmm0,0x8(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<c_vector3_init>:
movss  %xmm0,(%rdi)
movss  %xmm1,0x4(%rdi)
movss  %xmm2,0x8(%rdi)
ret

LLVM IR (-O0):
define void @c_vector3_init(float* %0, float %1, float %2, float %3) {
%5 = alloca float*
%6 = alloca float
%7 = alloca float
%8 = alloca float
store float* %0, float** %5
store float %1, float* %6
store float %2, float* %7
store float %3, float* %8
%9 = load float, float* %6
%10 = load float*, float** %5
%11 = getelementptr inbounds float, float* %10, i64 0
store float %9, float* %11
%12 = load float, float* %7
%13 = load float*, float** %5
%14 = getelementptr inbounds float, float* %13, i64 1
store float %12, float* %14
%15 = load float, float* %8
%16 = load float*, float** %5
%17 = getelementptr inbounds float, float* %16, i64 2
store float %15, float* %17
ret void
}

LLVM IR (-O2):
define void @c_vector3_init(float* nocapture writeonly %0, float %1, float %2, float %3) {
store float %1, float* %0
%5 = getelementptr inbounds float, float* %0, i64 1
store float %2, float* %5
%6 = getelementptr inbounds float, float* %0, i64 2
store float %3, float* %6
ret void
}
/* Variables and functions */
int getch();
int getche();
int /*<<< orphan*/ printf(char *, ...);
int main() {
  printf("getche()");
  printf("\nYou typed: %c\n", getche());
  printf("getch()");
  printf("\nYou typed: %c\n", getch());
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeba(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    $0x0,%al
call   1040 <getche@plt>
mov    %eax,%esi
lea    0xeac(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xeae(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    $0x0,%al
call   1050 <getch@plt>
mov    %eax,%esi
lea    0xe87(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
lea    0xec8(%rip),%rdi
xor    %eax,%eax
call   1030 <printf@plt>
xor    %eax,%eax
call   1040 <getche@plt>
lea    0xebc(%rip),%rbx
mov    %rbx,%rdi
mov    %eax,%esi
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xeb9(%rip),%rdi
xor    %eax,%eax
call   1030 <printf@plt>
xor    %eax,%eax
call   1050 <getch@plt>
mov    %rbx,%rdi
mov    %eax,%esi
xor    %eax,%eax
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [9 x i8] c"getche()\00"
@.str.1 = [16 x i8] c"\0AYou typed: %c\0A\00"
@.str.2 = [8 x i8] c"getch()\00"
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0))
%3 = call i32 (...) @getche()
%4 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.1, i64 0, i64 0), i32 %3)
%5 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.2, i64 0, i64 0))
%6 = call i32 (...) @getch()
%7 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.1, i64 0, i64 0), i32 %6)
ret i32 0
}

LLVM IR (-O2):
@.str = [9 x i8] c"getche()\00"
@.str.1 = [16 x i8] c"\0AYou typed: %c\0A\00"
@.str.2 = [8 x i8] c"getch()\00"
define i32 @main() {
%1 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0))
%2 = tail call i32 (...) @getche()
%3 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([16 x i8], [16 x i8]* @.str.1, i64 0, i64 0), i32 %2)
%4 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([8 x i8], [8 x i8]* @.str.2, i64 0, i64 0))
%5 = tail call i32 (...) @getch()
%6 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([16 x i8], [16 x i8]* @.str.1, i64 0, i64 0), i32 %5)
ret i32 0
}
/* Type definitions */
struct sqlConnection {
  int dummy;
};
typedef int /*<<< orphan*/ query;

/* Variables and functions */
int sqlQuickNum(struct sqlConnection *, char *);
int /*<<< orphan*/ sqlSafef(char *, int, char *, int);
int visiGeneImageFile(struct sqlConnection *conn, int id) {
  char query[256];
  sqlSafef(query, sizeof(query), "select imageFile from image where id=%d", id);
  return sqlQuickNum(conn, query);
}


x86 assembly (clang, -O0):
<visiGeneImageFile>:
push   %rbp
mov    %rsp,%rbp
sub    $0x110,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
lea    -0x110(%rbp),%rdi
mov    -0xc(%rbp),%ecx
mov    $0x100,%esi
lea    0xeb8(%rip),%rdx
call   1030 <sqlSafef@plt>
mov    -0x8(%rbp),%rdi
lea    -0x110(%rbp),%rsi
call   1040 <sqlQuickNum@plt>
add    $0x110,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<visiGeneImageFile>:
push   %r14
push   %rbx
sub    $0x108,%rsp
mov    %esi,%ecx
mov    %rdi,%rbx
lea    0xeca(%rip),%rdx
mov    %rsp,%r14
mov    %r14,%rdi
mov    $0x100,%esi
call   1030 <sqlSafef@plt>
mov    %rbx,%rdi
mov    %r14,%rsi
call   1040 <sqlQuickNum@plt>
add    $0x108,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
%struct.sqlConnection = type { i32 }
@.str = [40 x i8] c"select imageFile from image where id=%d\00"
define i32 @visiGeneImageFile(%struct.sqlConnection* %0, i32 %1) {
%3 = alloca %struct.sqlConnection*
%4 = alloca i32
%5 = alloca [256 x i8]
store %struct.sqlConnection* %0, %struct.sqlConnection** %3
store i32 %1, i32* %4
%6 = getelementptr inbounds [256 x i8], [256 x i8]* %5, i64 0, i64 0
%7 = load i32, i32* %4
%8 = call i32 @sqlSafef(i8* %6, i32 256, i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str, i64 0, i64 0), i32 %7)
%9 = load %struct.sqlConnection*, %struct.sqlConnection** %3
%10 = getelementptr inbounds [256 x i8], [256 x i8]* %5, i64 0, i64 0
%11 = call i32 @sqlQuickNum(%struct.sqlConnection* %9, i8* %10)
ret i32 %11
}

LLVM IR (-O2):
%struct.sqlConnection = type { i32 }
@.str = [40 x i8] c"select imageFile from image where id=%d\00"
define i32 @visiGeneImageFile(%struct.sqlConnection* %0, i32 %1) {
%3 = alloca [256 x i8]
%4 = getelementptr inbounds [256 x i8], [256 x i8]* %3, i64 0, i64 0
%5 = call i32 @sqlSafef(i8* %4, i32 256, i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str, i64 0, i64 0), i32 %1)
%6 = call i32 @sqlQuickNum(%struct.sqlConnection* %0, i8* %4)
ret i32 %6
}
/* Type definitions */
struct Output {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ free(struct Output *);
int output_fin(struct Output *q) {
  free(q);
  return 0;
}


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

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

LLVM IR (-O0):
%struct.Output = type { i32 }
define i32 @output_fin(%struct.Output* %0) {
%2 = alloca %struct.Output*
store %struct.Output* %0, %struct.Output** %2
%3 = load %struct.Output*, %struct.Output** %2
%4 = call i32 @free(%struct.Output* %3)
ret i32 0
}

LLVM IR (-O2):
%struct.Output = type { i32 }
define i32 @output_fin(%struct.Output* nocapture %0) {
%2 = tail call i32 @free(%struct.Output* %0)
ret i32 0
}
int test_imm_96int64_highword_reg(long long val) {
  return ((val >> 32) & (0x96 << 0)) ? -20 : -40;
}


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

x86 assembly (clang, -O2):
<test_imm_96int64_highword_reg>:
movabs $0x9600000000,%rax
test   %rax,%rdi
mov    $0xffffffd8,%ecx
mov    $0xffffffec,%eax
cmove  %ecx,%eax
ret

LLVM IR (-O0):
define i32 @test_imm_96int64_highword_reg(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = load i64, i64* %2
%4 = ashr i64 %3, 32
%5 = and i64 %4, 150
%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_96int64_highword_reg(i64 %0) {
%2 = and i64 %0, 644245094400
%3 = icmp eq i64 %2, 0
%4 = select i1 %3, i32 -40, i32 -20
ret i32 %4
}
/* Type definitions */
typedef int /*<<< orphan*/ message;

/* Variables and functions */
int /*<<< orphan*/ STDERR_FILENO;
int /*<<< orphan*/ write(int /*<<< orphan*/, char const *, int);
void _exit(int code) {
  const char message[] = "\nProgram has exited with code:";
  write(STDERR_FILENO, message, sizeof(message) - 1);
  for (;;)
    ;
}


x86 assembly (clang, -O0):
<_exit>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %edi,-0x4(%rbp)
mov    0xede(%rip),%rax
mov    %rax,-0x30(%rbp)
mov    0xedb(%rip),%rax
mov    %rax,-0x28(%rbp)
mov    0xed8(%rip),%rax
mov    %rax,-0x20(%rbp)
mov    0xed6(%rip),%eax
mov    %eax,-0x18(%rbp)
mov    0xed0(%rip),%ax
mov    %ax,-0x14(%rbp)
mov    0xec8(%rip),%al
mov    %al,-0x12(%rbp)
mov    0x2e80(%rip),%rax
mov    (%rax),%edi
lea    -0x30(%rbp),%rsi
mov    $0x1e,%edx
call   1030 <write@plt>
jmp    1170 <_exit+0x60>

x86 assembly (clang, -O2):
<_exit>:
sub    $0x28,%rsp
movups 0xef4(%rip),%xmm0
movups %xmm0,0xf(%rsp)
movaps 0xed9(%rip),%xmm0
movaps %xmm0,(%rsp)
mov    0x2eae(%rip),%rax
mov    (%rax),%edi
mov    %rsp,%rsi
mov    $0x1e,%edx
call   1030 <write@plt>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
jmp    1150 <_exit+0x40>

LLVM IR (-O0):
@__const._exit.message = [31 x i8] c"\0AProgram has exited with code:\00"
@STDERR_FILENO = global i32 0
define void @_exit(i32 %0) {
%2 = alloca i32
%3 = alloca [31 x i8]
store i32 %0, i32* %2
%4 = bitcast [31 x i8]* %3 to i8*
%5 = load i32, i32* @STDERR_FILENO
%6 = getelementptr inbounds [31 x i8], [31 x i8]* %3, i64 0, i64 0
%7 = call i32 @write(i32 %5, i8* %6, i32 30)
br label %8
8: ; preds = %8, %1
br label %8
}

LLVM IR (-O2):
@__const._exit.message = [31 x i8] c"\0AProgram has exited with code:\00"
@STDERR_FILENO = global i32 0
define void @_exit(i32 %0) {
%2 = alloca [31 x i8]
%3 = getelementptr inbounds [31 x i8], [31 x i8]* %2, i64 0, i64 0
%4 = load i32, i32* @STDERR_FILENO
%5 = call i32 @write(i32 %4, i8* %3, i32 30)
br label %6
6: ; preds = %6, %1
br label %6
}
int intercanvia(int *x, int *y) {
  int temp;
  temp = *x;
  *x = *y;
  *y = temp;
}


x86 assembly (clang, -O0):
<intercanvia>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    -0x10(%rbp),%rax
mov    (%rax),%eax
mov    %eax,-0x1c(%rbp)
mov    -0x18(%rbp),%rax
mov    (%rax),%ecx
mov    -0x10(%rbp),%rax
mov    %ecx,(%rax)
mov    -0x1c(%rbp),%ecx
mov    -0x18(%rbp),%rax
mov    %ecx,(%rax)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @intercanvia(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
%7 = load i32*, i32** %4
%8 = load i32, i32* %7
store i32 %8, i32* %6
%9 = load i32*, i32** %5
%10 = load i32, i32* %9
%11 = load i32*, i32** %4
store i32 %10, i32* %11
%12 = load i32, i32* %6
%13 = load i32*, i32** %5
store i32 %12, i32* %13
%14 = load i32, i32* %3
ret i32 %14
}

LLVM IR (-O2):
define i32 @intercanvia(i32* nocapture %0, i32* nocapture %1) {
%3 = load i32, i32* %0
%4 = load i32, i32* %1
store i32 %4, i32* %0
store i32 %3, i32* %1
ret i32 undef
}
/* Variables and functions */
int /*<<< orphan*/ endwin();
void ncurses_end() { endwin(); }


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

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

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

LLVM IR (-O2):
define void @ncurses_end() {
%1 = tail call i32 (...) @endwin()
ret void
}
/* Variables and functions */
int f6(void *, unsigned long);
int f1(void *p) { return f6(p, 256UL); }


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

x86 assembly (clang, -O2):
<f1>:
mov    $0x100,%esi
jmp    1030 <f6@plt>

LLVM IR (-O0):
define i32 @f1(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 @f6(i8* %3, i64 256)
ret i32 %4
}

LLVM IR (-O2):
define i32 @f1(i8* %0) {
%2 = tail call i32 @f6(i8* %0, i64 256)
ret i32 %2
}
char *procprt_THR_e(struct tstat *curstat, int avgval, int nsecs) {
  return "   0";
}


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

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

LLVM IR (-O0):
%struct.tstat = type opaque
@.str = [5 x i8] c" 0\00"
define i8* @procprt_THR_e(%struct.tstat* %0, i32 %1, i32 %2) {
%4 = alloca %struct.tstat*
%5 = alloca i32
%6 = alloca i32
store %struct.tstat* %0, %struct.tstat** %4
store i32 %1, i32* %5
store i32 %2, i32* %6
ret i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0)
}

LLVM IR (-O2):
%struct.tstat = type opaque
@.str = [5 x i8] c" 0\00"
define i8* @procprt_THR_e(%struct.tstat* nocapture readnone %0, i32 %1, i32 %2) {
ret i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0)
}
const char *Help_Brief(void) { return "Usage information"; }


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

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

LLVM IR (-O0):
@.str = [18 x i8] c"Usage information\00"
define i8* @Help_Brief() {
ret i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0)
}

LLVM IR (-O2):
@.str = [18 x i8] c"Usage information\00"
define i8* @Help_Brief() {
ret i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0)
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ scanf(char *, int *);
int main() {
  int numero, suma = 0;
  printf("Introduce un numero");
  scanf("%d", &numero);
  suma = numero + numero;
  if (suma == 0) {
    printf("Esa es la respuesta");
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0xc(%rbp)
lea    0xec3(%rip),%rdi
call   1030 <printf@plt>
lea    0xecb(%rip),%rdi
lea    -0x8(%rbp),%rsi
call   1040 <scanf@plt>
mov    -0x8(%rbp),%eax
add    -0x8(%rbp),%eax
mov    %eax,-0xc(%rbp)
cmpl   $0x0,-0xc(%rbp)
jne    1171 <main+0x51>
lea    0xeab(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xed8(%rip),%rdi
call   1030 <printf@plt>
lea    0xee0(%rip),%rdi
lea    0x4(%rsp),%rsi
call   1040 <scanf@plt>
cmpl   $0x0,0x4(%rsp)
jne    1151 <main+0x31>
lea    0xecb(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [20 x i8] c"Introduce un numero\00"
@.str.1 = [3 x i8] c"%d\00"
@.str.2 = [20 x i8] c"Esa es la respuesta\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
store i32 0, i32* %1
store i32 0, i32* %3
%4 = call i32 @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0))
%5 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %2)
%6 = load i32, i32* %2
%7 = load i32, i32* %2
%8 = add nsw i32 %6, %7
store i32 %8, i32* %3
%9 = load i32, i32* %3
%10 = icmp eq i32 %9, 0
br i1 %10, label %11, label %13
11: ; preds = %0
%12 = call i32 @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.2, i64 0, i64 0))
br label %13
13: ; preds = %11, %0
ret i32 0
}

LLVM IR (-O2):
@.str = [20 x i8] c"Introduce un numero\00"
@.str.1 = [3 x i8] c"%d\00"
@.str.2 = [20 x i8] c"Esa es la respuesta\00"
define i32 @main() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
%3 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0))
%4 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %1)
%5 = load i32, i32* %1
%6 = icmp eq i32 %5, 0
br i1 %6, label %7, label %9
7: ; preds = %0
%8 = call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([20 x i8], [20 x i8]* @.str.2, i64 0, i64 0))
br label %9
9: ; preds = %7, %0
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ HwSharedHandle();
int /*<<< orphan*/ UAVObjRequestUpdate(int /*<<< orphan*/);
void HwSharedRequestUpdate() { UAVObjRequestUpdate(HwSharedHandle()); }


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

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

LLVM IR (-O0):
define void @HwSharedRequestUpdate() {
%1 = call i32 (...) @HwSharedHandle()
%2 = call i32 @UAVObjRequestUpdate(i32 %1)
ret void
}

LLVM IR (-O2):
define void @HwSharedRequestUpdate() {
%1 = tail call i32 (...) @HwSharedHandle()
%2 = tail call i32 @UAVObjRequestUpdate(i32 %1)
ret void
}
void reset_partial_memory_test(void) {}


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

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

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

LLVM IR (-O2):
define void @reset_partial_memory_test() {
ret void
}
/* Type definitions */
typedef scalar_t__ volatile uint32_t;

/* Variables and functions */
uint32_t DPORT_READ_PERI_REG(uint32_t reg) {
  return (*(volatile uint32_t *)(reg));
}


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

x86 assembly (clang, -O2):
<DPORT_READ_PERI_REG>:
mov    %rdi,-0x8(%rsp)
mov    -0x8(%rsp),%rax
mov    (%rax),%rax
ret

LLVM IR (-O0):
define i64 @DPORT_READ_PERI_REG(i64 %0) {
%2 = alloca i64
store volatile i64 %0, i64* %2
%3 = load volatile i64, i64* %2
%4 = inttoptr i64 %3 to i64*
%5 = load volatile i64, i64* %4
ret i64 %5
}

LLVM IR (-O2):
define i64 @DPORT_READ_PERI_REG(i64 %0) {
%2 = alloca i64
store volatile i64 %0, i64* %2
%3 = load volatile i64, i64* %2
%4 = inttoptr i64 %3 to i64*
%5 = load volatile i64, i64* %4
ret i64 %5
}
/* Variables and functions */
int /*<<< orphan*/ HSEReady_Callback();
int /*<<< orphan*/ LL_RCC_ClearFlag_HSERDY();
scalar_t__ LL_RCC_IsActiveFlag_HSERDY();
void RCC_IRQHandler(void) {
  if (LL_RCC_IsActiveFlag_HSERDY() != 0) {
    LL_RCC_ClearFlag_HSERDY();
    HSEReady_Callback();
  }
}


x86 assembly (clang, -O0):
<RCC_IRQHandler>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1030 <LL_RCC_IsActiveFlag_HSERDY@plt>
cmp    $0x0,%rax
je     1153 <RCC_IRQHandler+0x23>
mov    $0x0,%al
call   1040 <LL_RCC_ClearFlag_HSERDY@plt>
mov    $0x0,%al
call   1050 <HSEReady_Callback@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<RCC_IRQHandler>:
push   %rax
xor    %eax,%eax
call   1030 <LL_RCC_IsActiveFlag_HSERDY@plt>
test   %rax,%rax
je     114c <RCC_IRQHandler+0x1c>
xor    %eax,%eax
call   1040 <LL_RCC_ClearFlag_HSERDY@plt>
xor    %eax,%eax
pop    %rcx
jmp    1050 <HSEReady_Callback@plt>
pop    %rax
ret

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

LLVM IR (-O2):
define void @RCC_IRQHandler() {
%1 = tail call i64 (...) @LL_RCC_IsActiveFlag_HSERDY()
%2 = icmp eq i64 %1, 0
br i1 %2, label %6, label %3
3: ; preds = %0
%4 = tail call i32 (...) @LL_RCC_ClearFlag_HSERDY()
%5 = tail call i32 (...) @HSEReady_Callback()
br label %6
6: ; preds = %3, %0
ret void
}
/* Variables and functions */
int /*<<< orphan*/ plugin_manager_main();
int main(int argc, char **argv) {
  plugin_manager_main();
  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 <plugin_manager_main@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
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 (...) @plugin_manager_main()
ret i32 0
}

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 (...) @plugin_manager_main()
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void __attribute__((weak)) weakSemiColon(void) { printf("redefine"); }


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

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

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

LLVM IR (-O2):
@.str = [9 x i8] c"redefine\00"
define weak void @weakSemiColon() {
%1 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0))
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ float_t;

/* Variables and functions */
float atan2f(float, int /*<<< orphan*/);
float r_atn2(float *x, float_t *y) { return (atan2f(*x, *y)); }


x86 assembly (clang, -O0):
<r_atn2>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
movss  (%rax),%xmm0
mov    -0x10(%rbp),%rax
mov    (%rax),%edi
call   1030 <atan2f@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<r_atn2>:
movss  (%rdi),%xmm0
mov    (%rsi),%edi
jmp    1030 <atan2f@plt>

LLVM IR (-O0):
define float @r_atn2(float* %0, i32* %1) {
%3 = alloca float*
%4 = alloca i32*
store float* %0, float** %3
store i32* %1, i32** %4
%5 = load float*, float** %3
%6 = load float, float* %5
%7 = load i32*, i32** %4
%8 = load i32, i32* %7
%9 = call float @atan2f(float %6, i32 %8)
ret float %9
}

LLVM IR (-O2):
define float @r_atn2(float* nocapture %0, i32* nocapture %1) {
%3 = load float, float* %0
%4 = load i32, i32* %1
%5 = tail call float @atan2f(float %3, i32 %4)
ret float %5
}
void move2s_(x, y) short *x, *y;
{ move((float)*x, (float)*y, 0.0); }


x86 assembly (clang, -O0):
<move2s_>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
movswl (%rax),%eax
cvtsi2ss %eax,%xmm0
cvtss2sd %xmm0,%xmm0
mov    -0x10(%rbp),%rax
movswl (%rax),%eax
cvtsi2ss %eax,%xmm1
cvtss2sd %xmm1,%xmm1
xorps  %xmm2,%xmm2
mov    $0x3,%al
call   1030 <move@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<move2s_>:
movswl (%rdi),%eax
cvtsi2sd %eax,%xmm0
movswl (%rsi),%eax
cvtsi2sd %eax,%xmm1
xorps  %xmm2,%xmm2
mov    $0x3,%al
jmp    1030 <move@plt>

LLVM IR (-O0):
define void @move2s_(i16* %0, i16* %1) {
%3 = alloca i16*
%4 = alloca i16*
store i16* %0, i16** %3
store i16* %1, i16** %4
%5 = load i16*, i16** %3
%6 = load i16, i16* %5
%7 = sitofp i16 %6 to float
%8 = fpext float %7 to double
%9 = load i16*, i16** %4
%10 = load i16, i16* %9
%11 = sitofp i16 %10 to float
%12 = fpext float %11 to double
%13 = call i32 (double, double, double, ...) bitcast (i32 (...)* @move to i32 (double, double, double, ...)*)(double %8, double %12, double 0.000000e+00)
ret void
}

LLVM IR (-O2):
define void @move2s_(i16* nocapture %0, i16* nocapture %1) {
%3 = load i16, i16* %0
%4 = sitofp i16 %3 to double
%5 = load i16, i16* %1
%6 = sitofp i16 %5 to double
%7 = tail call i32 (double, double, double, ...) bitcast (i32 (...)* @move to i32 (double, double, double, ...)*)(double %4, double %6, double 0.000000e+00)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ *freopen64(char const *, char const *, int /*<<< orphan*/ *);
FILE *_freopen64(const char *path, const char *mode, FILE *file) {
  return freopen64(path, mode, file);
}


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

x86 assembly (clang, -O2):
<_freopen64>:
jmp    1030 <freopen64@plt>

LLVM IR (-O0):
define i32* @_freopen64(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* @freopen64(i8* %7, i8* %8, i32* %9)
ret i32* %10
}

LLVM IR (-O2):
define i32* @_freopen64(i8* %0, i8* %1, i32* %2) {
%4 = tail call i32* @freopen64(i8* %0, i8* %1, i32* %2)
ret i32* %4
}
void free(void *l) { return; }


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

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

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

LLVM IR (-O2):
define void @free(i8* nocapture %0) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
void fun1(void) {
  static int i = 0;
  i++;
  printf("***i=%d\n", i);
}


x86 assembly (clang, -O0):
<fun1>:
push   %rbp
mov    %rsp,%rbp
mov    0x2f12(%rip),%eax
add    $0x1,%eax
mov    %eax,0x2f09(%rip)
mov    0x2f03(%rip),%esi
lea    0xed0(%rip),%rdi
call   1030 <printf@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<fun1>:
mov    0x2f16(%rip),%esi
add    $0x1,%esi
mov    %esi,0x2f0d(%rip)
lea    0xeda(%rip),%rdi
jmp    1030 <printf@plt>

LLVM IR (-O0):
@fun1.i = internal global i32 0
@.str = [9 x i8] c"***i=%d\0A\00"
define void @fun1() {
%1 = load i32, i32* @fun1.i
%2 = add nsw i32 %1, 1
store i32 %2, i32* @fun1.i
%3 = load i32, i32* @fun1.i
%4 = call i32 @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), i32 %3)
ret void
}

LLVM IR (-O2):
@fun1.i = internal unnamed_addr global i32 0
@.str = [9 x i8] c"***i=%d\0A\00"
define void @fun1() {
%1 = load i32, i32* @fun1.i
%2 = add nsw i32 %1, 1
store i32 %2, i32* @fun1.i
%3 = tail call i32 @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), i32 %2)
ret void
}
double f4_sum_pre_double_double_double_double_short(double v0, double v1,
                                                    double v2, double v3,
                                                    short v) {
  return v0 + v1 + v2 + v3 + ((double)(v));
}


x86 assembly (clang, -O0):
<f4_sum_pre_double_double_double_double_short>:
push   %rbp
mov    %rsp,%rbp
mov    %di,%ax
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  %xmm2,-0x18(%rbp)
movsd  %xmm3,-0x20(%rbp)
mov    %ax,-0x22(%rbp)
movsd  -0x8(%rbp),%xmm0
movsd  -0x10(%rbp),%xmm1
addsd  %xmm1,%xmm0
movsd  -0x18(%rbp),%xmm1
addsd  %xmm1,%xmm0
movsd  -0x20(%rbp),%xmm1
addsd  %xmm1,%xmm0
movswl -0x22(%rbp),%eax
cvtsi2sd %eax,%xmm1
addsd  %xmm1,%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<f4_sum_pre_double_double_double_double_short>:
addsd  %xmm1,%xmm0
addsd  %xmm2,%xmm0
addsd  %xmm3,%xmm0
xorps  %xmm1,%xmm1
cvtsi2sd %edi,%xmm1
addsd  %xmm1,%xmm0
ret

LLVM IR (-O0):
define double @f4_sum_pre_double_double_double_double_short(double %0, double %1, double %2, double %3, i16 signext %4) {
%6 = alloca double
%7 = alloca double
%8 = alloca double
%9 = alloca double
%10 = alloca i16
store double %0, double* %6
store double %1, double* %7
store double %2, double* %8
store double %3, double* %9
store i16 %4, i16* %10
%11 = load double, double* %6
%12 = load double, double* %7
%13 = fadd double %11, %12
%14 = load double, double* %8
%15 = fadd double %13, %14
%16 = load double, double* %9
%17 = fadd double %15, %16
%18 = load i16, i16* %10
%19 = sitofp i16 %18 to double
%20 = fadd double %17, %19
ret double %20
}

LLVM IR (-O2):
define double @f4_sum_pre_double_double_double_double_short(double %0, double %1, double %2, double %3, i16 signext %4) {
%6 = fadd double %0, %1
%7 = fadd double %6, %2
%8 = fadd double %7, %3
%9 = sitofp i16 %4 to double
%10 = fadd double %8, %9
ret double %10
}
/* Variables and functions */
int /*<<< orphan*/ cpuworkers_rotate();
void cpu_init(void) { cpuworkers_rotate(); }


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

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

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

LLVM IR (-O2):
define void @cpu_init() {
%1 = tail call i32 (...) @cpuworkers_rotate()
ret void
}