xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ EXIT_FAILURE;
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char const *);
int /*<<< orphan*/ stderr;
void usage(const char *restrict prog) {
  fprintf(stderr,
          "Usage: %s [ -d | -D ] [ -T <create_rtable> ] [ -I <ignorespec> ] "
          "[ -A <acceptspec> ] [ -s <static_ifnum> ] [ -f <testfile> ] "
          "[ -B <bind_rtable> ] <local-outer-ip> <local-ampr-ip>\n",
          prog);
  exit(EXIT_FAILURE);
}


x86 assembly (clang, -O0):
<usage>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    0x2ead(%rip),%rax
mov    (%rax),%edi
mov    -0x8(%rbp),%rdx
lea    0xec0(%rip),%rsi
call   1030 <fprintf@plt>
mov    0x2e8c(%rip),%rax
mov    (%rax),%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<usage>:
push   %rax
mov    %rdi,%rdx
mov    0x2eb5(%rip),%rax
mov    (%rax),%edi
lea    0xecc(%rip),%rsi
call   1030 <fprintf@plt>
mov    0x2e98(%rip),%rax
mov    (%rax),%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [180 x i8] c"Usage: %s [ -d | -D ] [ -T <create_rtable> ] [ -I <ignorespec> ] [ -A <acceptspec> ] [ -s <static_ifnum> ] [ -f <testfile> ] [ -B <bind_rtable> ] <local-outer-ip> <local-ampr-ip>\0A\00"
@EXIT_FAILURE = global i32 0
define void @usage(i8* noalias %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i32, i32* @stderr
%4 = load i8*, i8** %2
%5 = call i32 @fprintf(i32 %3, i8* getelementptr inbounds ([180 x i8], [180 x i8]* @.str, i64 0, i64 0), i8* %4)
%6 = load i32, i32* @EXIT_FAILURE
%7 = call i32 @exit(i32 %6)
unreachable
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [180 x i8] c"Usage: %s [ -d | -D ] [ -T <create_rtable> ] [ -I <ignorespec> ] [ -A <acceptspec> ] [ -s <static_ifnum> ] [ -f <testfile> ] [ -B <bind_rtable> ] <local-outer-ip> <local-ampr-ip>\0A\00"
@EXIT_FAILURE = global i32 0
define void @usage(i8* noalias %0) {
%2 = load i32, i32* @stderr
%3 = tail call i32 @fprintf(i32 %2, i8* getelementptr inbounds ([180 x i8], [180 x i8]* @.str, i64 0, i64 0), i8* %0)
%4 = load i32, i32* @EXIT_FAILURE
%5 = tail call i32 @exit(i32 %4)
unreachable
}
/* Variables and functions */
double outer_radius(double, double, double *);
double radius_effective(int mode, double core_radius, double fp_n,
                        double thickness[]) {
  switch (mode) {
  default:
  case 1:
    return outer_radius(core_radius, fp_n, thickness);
  case 2:
    return core_radius;
  }
}


x86 assembly (clang, -O0):
<radius_effective>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %edi,-0xc(%rbp)
movsd  %xmm0,-0x18(%rbp)
movsd  %xmm1,-0x20(%rbp)
mov    %rsi,-0x28(%rbp)
mov    -0xc(%rbp),%eax
mov    %eax,-0x2c(%rbp)
sub    $0x1,%eax
je     1153 <radius_effective+0x43>
jmp    113d <radius_effective+0x2d>
mov    -0x2c(%rbp),%eax
sub    $0x2,%eax
je     1170 <radius_effective+0x60>
jmp    114e <radius_effective+0x3e>
jmp    1153 <radius_effective+0x43>
movsd  -0x18(%rbp),%xmm0
movsd  -0x20(%rbp),%xmm1
mov    -0x28(%rbp),%rdi
call   1030 <outer_radius@plt>
movsd  %xmm0,-0x8(%rbp)
jmp    117a <radius_effective+0x6a>
movsd  -0x18(%rbp),%xmm0
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<radius_effective>:
cmp    $0x2,%edi
jne    1116 <radius_effective+0x6>
ret
mov    %rsi,%rdi
jmp    1030 <outer_radius@plt>

LLVM IR (-O0):
define double @radius_effective(i32 %0, double %1, double %2, double* %3) {
%5 = alloca double
%6 = alloca i32
%7 = alloca double
%8 = alloca double
%9 = alloca double*
store i32 %0, i32* %6
store double %1, double* %7
store double %2, double* %8
store double* %3, double** %9
%10 = load i32, i32* %6
switch i32 %10, label %11 [
i32 1, label %12
i32 2, label %17
]
11: ; preds = %4
br label %12
12: ; preds = %4, %11
%13 = load double, double* %7
%14 = load double, double* %8
%15 = load double*, double** %9
%16 = call double @outer_radius(double %13, double %14, double* %15)
store double %16, double* %5
br label %19
17: ; preds = %4
%18 = load double, double* %7
store double %18, double* %5
br label %19
19: ; preds = %17, %12
%20 = load double, double* %5
ret double %20
}

LLVM IR (-O2):
define double @radius_effective(i32 %0, double %1, double %2, double* %3) {
%5 = icmp eq i32 %0, 2
br i1 %5, label %8, label %6
6: ; preds = %4
%7 = tail call double @outer_radius(double %1, double %2, double* %3)
br label %8
8: ; preds = %4, %6
%9 = phi double [ %7, %6 ], [ %1, %4 ]
ret double %9
}
/* Type definitions */
struct timeval {
  scalar_t__ tv_usec;
  scalar_t__ tv_sec;
};

/* Variables and functions */
void winresettmo(struct timeval *tmo, struct timeval *tmo_at) {
  tmo->tv_sec = 0;
  tmo->tv_usec = 0;
  tmo_at->tv_sec = 0;
  tmo_at->tv_usec = 0;
}


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

x86 assembly (clang, -O2):
<winresettmo>:
xorps  %xmm0,%xmm0
movups %xmm0,(%rdi)
movups %xmm0,(%rsi)
ret

LLVM IR (-O0):
%struct.timeval = type { i64, i64 }
define void @winresettmo(%struct.timeval* %0, %struct.timeval* %1) {
%3 = alloca %struct.timeval*
%4 = alloca %struct.timeval*
store %struct.timeval* %0, %struct.timeval** %3
store %struct.timeval* %1, %struct.timeval** %4
%5 = load %struct.timeval*, %struct.timeval** %3
%6 = getelementptr inbounds %struct.timeval, %struct.timeval* %5, i32 0, i32 1
store i64 0, i64* %6
%7 = load %struct.timeval*, %struct.timeval** %3
%8 = getelementptr inbounds %struct.timeval, %struct.timeval* %7, i32 0, i32 0
store i64 0, i64* %8
%9 = load %struct.timeval*, %struct.timeval** %4
%10 = getelementptr inbounds %struct.timeval, %struct.timeval* %9, i32 0, i32 1
store i64 0, i64* %10
%11 = load %struct.timeval*, %struct.timeval** %4
%12 = getelementptr inbounds %struct.timeval, %struct.timeval* %11, i32 0, i32 0
store i64 0, i64* %12
ret void
}

LLVM IR (-O2):
%struct.timeval = type { i64, i64 }
define void @winresettmo(%struct.timeval* nocapture writeonly %0, %struct.timeval* nocapture writeonly %1) {
%3 = bitcast %struct.timeval* %0 to i8*
%4 = bitcast %struct.timeval* %1 to i8*
ret void
}
/* Variables and functions */
int ap_do_command_only(int, int);
int ap_unpause(int session) { return (ap_do_command_only(session, 0xcc05)); }


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

x86 assembly (clang, -O2):
<ap_unpause>:
mov    $0xcc05,%esi
jmp    1030 <ap_do_command_only@plt>

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

LLVM IR (-O2):
define i32 @ap_unpause(i32 %0) {
%2 = tail call i32 @ap_do_command_only(i32 %0, i32 52229)
ret i32 %2
}
unsigned int sub_offset(void *ptr, unsigned int offset) {
  return ((unsigned int)ptr - offset);
}


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

x86 assembly (clang, -O2):
<sub_offset>:
mov    %rdi,%rax
sub    %esi,%eax
ret

LLVM IR (-O0):
define i32 @sub_offset(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i32
store i8* %0, i8** %3
store i32 %1, i32* %4
%5 = load i8*, i8** %3
%6 = ptrtoint i8* %5 to i32
%7 = load i32, i32* %4
%8 = sub i32 %6, %7
ret i32 %8
}

LLVM IR (-O2):
define i32 @sub_offset(i8* %0, i32 %1) {
%3 = ptrtoint i8* %0 to i64
%4 = trunc i64 %3 to i32
%5 = sub i32 %4, %1
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ enter(char *);
int /*<<< orphan*/ error(int);
int /*<<< orphan*/ out();
char symbol();
pa() {
  enter("pa");
  if (symbol() != 'a')
    error(1);
  out();
}


x86 assembly (clang, -O0):
<pa>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    0xeb1(%rip),%rdi
call   1030 <enter@plt>
mov    $0x0,%al
call   1060 <symbol@plt>
movsbl %al,%eax
cmp    $0x61,%eax
je     1171 <pa+0x31>
mov    $0x1,%edi
call   1040 <error@plt>
mov    $0x0,%al
call   1050 <out@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<pa>:
push   %rax
lea    0xeb8(%rip),%rdi
call   1030 <enter@plt>
xor    %eax,%eax
call   1060 <symbol@plt>
cmp    $0x61,%al
je     1162 <pa+0x22>
mov    $0x1,%edi
call   1040 <error@plt>
xor    %eax,%eax
pop    %rcx
jmp    1050 <out@plt>

LLVM IR (-O0):
@.str = [3 x i8] c"pa\00"
define i32 @pa() {
%1 = alloca i32
%2 = call i32 @enter(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0))
%3 = call signext i8 (...) @symbol()
%4 = sext i8 %3 to i32
%5 = icmp ne i32 %4, 97
br i1 %5, label %6, label %8
6: ; preds = %0
%7 = call i32 @error(i32 1)
br label %8
8: ; preds = %6, %0
%9 = call i32 (...) @out()
%10 = load i32, i32* %1
ret i32 %10
}

LLVM IR (-O2):
@.str = [3 x i8] c"pa\00"
define i32 @pa() {
%1 = tail call i32 @enter(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0))
%2 = tail call signext i8 (...) @symbol()
%3 = icmp eq i8 %2, 97
br i1 %3, label %6, label %4
4: ; preds = %0
%5 = tail call i32 @error(i32 1)
br label %6
6: ; preds = %4, %0
%7 = tail call i32 (...) @out()
ret i32 undef
}
/* Variables and functions */
int foo(int);
int main(void) { return foo(2); }


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

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

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

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 @foo(i32 2)
ret i32 %1
}
/* Variables and functions */
int /*<<< orphan*/ __VERIFIER_nondet_int();
int /*<<< orphan*/ nestedLoop(int /*<<< orphan*/, int /*<<< orphan*/,
                              int /*<<< orphan*/);
main() {
  nestedLoop(__VERIFIER_nondet_int(), __VERIFIER_nondet_int(),
             __VERIFIER_nondet_int());
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1040 <__VERIFIER_nondet_int@plt>
mov    %eax,-0x8(%rbp)
mov    $0x0,%al
call   1040 <__VERIFIER_nondet_int@plt>
mov    %eax,-0x4(%rbp)
mov    $0x0,%al
call   1040 <__VERIFIER_nondet_int@plt>
mov    -0x8(%rbp),%edi
mov    -0x4(%rbp),%esi
mov    %eax,%edx
call   1030 <nestedLoop@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %rbx
push   %rax
xor    %eax,%eax
call   1040 <__VERIFIER_nondet_int@plt>
mov    %eax,%ebx
xor    %eax,%eax
call   1040 <__VERIFIER_nondet_int@plt>
mov    %eax,%ebp
xor    %eax,%eax
call   1040 <__VERIFIER_nondet_int@plt>
mov    %ebx,%edi
mov    %ebp,%esi
mov    %eax,%edx
call   1030 <nestedLoop@plt>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
define i32 @main() {
%1 = call i32 (...) @__VERIFIER_nondet_int()
%2 = call i32 (...) @__VERIFIER_nondet_int()
%3 = call i32 (...) @__VERIFIER_nondet_int()
%4 = call i32 @nestedLoop(i32 %1, i32 %2, i32 %3)
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @__VERIFIER_nondet_int()
%2 = tail call i32 (...) @__VERIFIER_nondet_int()
%3 = tail call i32 (...) @__VERIFIER_nondet_int()
%4 = tail call i32 @nestedLoop(i32 %1, i32 %2, i32 %3)
ret i32 0
}
void glMaterialf(void) { return; }


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

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

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

LLVM IR (-O2):
define void @glMaterialf() {
ret void
}
void disable_cache(void) { return; }


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

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

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

LLVM IR (-O2):
define void @disable_cache() {
ret void
}
void ft_ultimate_div_mod(int *a, int *b) {
  int x;
  int y;
  x = *a / *b;
  y = *a % *b;
  *a = x;
  *b = y;
}


x86 assembly (clang, -O0):
<ft_ultimate_div_mod>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%eax
mov    -0x10(%rbp),%rcx
cltd
idivl  (%rcx)
mov    %eax,-0x14(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%eax
mov    -0x10(%rbp),%rcx
cltd
idivl  (%rcx)
mov    %edx,-0x18(%rbp)
mov    -0x14(%rbp),%ecx
mov    -0x8(%rbp),%rax
mov    %ecx,(%rax)
mov    -0x18(%rbp),%ecx
mov    -0x10(%rbp),%rax
mov    %ecx,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<ft_ultimate_div_mod>:
mov    (%rdi),%eax
cltd
idivl  (%rsi)
mov    %eax,(%rdi)
mov    %edx,(%rsi)
ret

LLVM IR (-O0):
define void @ft_ultimate_div_mod(i32* %0, i32* %1) {
%3 = alloca i32*
%4 = alloca i32*
%5 = alloca i32
%6 = alloca i32
store i32* %0, i32** %3
store i32* %1, i32** %4
%7 = load i32*, i32** %3
%8 = load i32, i32* %7
%9 = load i32*, i32** %4
%10 = load i32, i32* %9
%11 = sdiv i32 %8, %10
store i32 %11, i32* %5
%12 = load i32*, i32** %3
%13 = load i32, i32* %12
%14 = load i32*, i32** %4
%15 = load i32, i32* %14
%16 = srem i32 %13, %15
store i32 %16, i32* %6
%17 = load i32, i32* %5
%18 = load i32*, i32** %3
store i32 %17, i32* %18
%19 = load i32, i32* %6
%20 = load i32*, i32** %4
store i32 %19, i32* %20
ret void
}

LLVM IR (-O2):
define void @ft_ultimate_div_mod(i32* nocapture %0, i32* nocapture %1) {
%3 = load i32, i32* %0
%4 = load i32, i32* %1
%5 = sdiv i32 %3, %4
%6 = srem i32 %3, %4
store i32 %5, i32* %0
store i32 %6, i32* %1
ret void
}
/* Variables and functions */
int /*<<< orphan*/ FLEXSPI_DriverIRQHandler();
__attribute__((weak)) void FLEXSPI_IRQHandler(void) {
  FLEXSPI_DriverIRQHandler();
}


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

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

LLVM IR (-O0):
define weak void @FLEXSPI_IRQHandler() {
%1 = call i32 (...) @FLEXSPI_DriverIRQHandler()
ret void
}

LLVM IR (-O2):
define weak void @FLEXSPI_IRQHandler() {
%1 = tail call i32 (...) @FLEXSPI_DriverIRQHandler()
ret void
}
__attribute__((no, noclone)) char *f8(char *p, unsigned long int i) {
  return p + i;
}


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

x86 assembly (clang, -O2):
<f8>:
lea    (%rdi,%rsi,1),%rax
ret

LLVM IR (-O0):
define i8* @f8(i8* %0, i64 %1) {
%3 = alloca i8*
%4 = alloca i64
store i8* %0, i8** %3
store i64 %1, i64* %4
%5 = load i8*, i8** %3
%6 = load i64, i64* %4
%7 = getelementptr inbounds i8, i8* %5, i64 %6
ret i8* %7
}

LLVM IR (-O2):
define i8* @f8(i8* readnone %0, i64 %1) {
%3 = getelementptr inbounds i8, i8* %0, i64 %1
ret i8* %3
}
unsigned long long int
unsignedlonglongint_ignoring_unsignedshortint(unsigned long long int x,
                                              unsigned short int y) {
  return x;
}


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

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

LLVM IR (-O0):
define i64 @unsignedlonglongint_ignoring_unsignedshortint(i64 %0, i16 zeroext %1) {
%3 = alloca i64
%4 = alloca i16
store i64 %0, i64* %3
store i16 %1, i16* %4
%5 = load i64, i64* %3
ret i64 %5
}

LLVM IR (-O2):
define i64 @unsignedlonglongint_ignoring_unsignedshortint(i64 returned %0, i16 zeroext %1) {
ret i64 %0
}
/* Variables and functions */
int rp_hex_nibble(char const);
int rp_decode_nibble(const char *in, unsigned int *nibble) {
  int nib;
  if ((nib = rp_hex_nibble(*in)) >= 0) {
    *nibble = nib;
    return (!0);
  }
  return 0;
}


x86 assembly (clang, -O0):
<rp_decode_nibble>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    -0x10(%rbp),%rax
movsbl (%rax),%edi
call   1030 <rp_hex_nibble@plt>
mov    %eax,-0x1c(%rbp)
cmp    $0x0,%eax
jl     114d <rp_decode_nibble+0x3d>
mov    -0x1c(%rbp),%ecx
mov    -0x18(%rbp),%rax
mov    %ecx,(%rax)
movl   $0x1,-0x4(%rbp)
jmp    1154 <rp_decode_nibble+0x44>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<rp_decode_nibble>:
push   %rbx
mov    %rsi,%rbx
movsbl (%rdi),%edi
call   1030 <rp_hex_nibble@plt>
test   %eax,%eax
js     1129 <rp_decode_nibble+0x19>
mov    %eax,(%rbx)
mov    $0x1,%eax
pop    %rbx
ret
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
define i32 @rp_decode_nibble(i8* %0, i32* %1) {
%3 = alloca i32
%4 = alloca i8*
%5 = alloca i32*
%6 = alloca i32
store i8* %0, i8** %4
store i32* %1, i32** %5
%7 = load i8*, i8** %4
%8 = load i8, i8* %7
%9 = call i32 @rp_hex_nibble(i8 signext %8)
store i32 %9, i32* %6
%10 = icmp sge i32 %9, 0
br i1 %10, label %11, label %14
11: ; preds = %2
%12 = load i32, i32* %6
%13 = load i32*, i32** %5
store i32 %12, i32* %13
store i32 1, i32* %3
br label %15
14: ; preds = %2
store i32 0, i32* %3
br label %15
15: ; preds = %14, %11
%16 = load i32, i32* %3
ret i32 %16
}

LLVM IR (-O2):
define i32 @rp_decode_nibble(i8* nocapture %0, i32* nocapture writeonly %1) {
%3 = load i8, i8* %0
%4 = tail call i32 @rp_hex_nibble(i8 signext %3)
%5 = icmp sgt i32 %4, -1
br i1 %5, label %6, label %7
6: ; preds = %2
store i32 %4, i32* %1
br label %7
7: ; preds = %2, %6
%8 = phi i32 [ 1, %6 ], [ 0, %2 ]
ret i32 %8
}
void func(void) {
  int a[10] = {};
  a[2] = 3;
}


x86 assembly (clang, -O0):
<func>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
lea    -0x30(%rbp),%rdi
xor    %esi,%esi
mov    $0x28,%edx
call   1030 <memset@plt>
movl   $0x3,-0x28(%rbp)
add    $0x30,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
define void @func() {
%1 = alloca [10 x i32]
%2 = bitcast [10 x i32]* %1 to i8*
%3 = getelementptr inbounds [10 x i32], [10 x i32]* %1, i64 0, i64 2
store i32 3, i32* %3
ret void
}

LLVM IR (-O2):
define void @func() {
ret void
}
int test11(int a) { return a > 0 ? 0x7FFFFFFF : 0x80000000; }


x86 assembly (clang, -O0):
<test11>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edx
mov    $0x80000000,%eax
mov    $0x7fffffff,%ecx
cmp    $0x0,%edx
cmovg  %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<test11>:
xor    %ecx,%ecx
test   %edi,%edi
setg   %cl
mov    $0x80000000,%eax
sub    %ecx,%eax
ret

LLVM IR (-O0):
define i32 @test11(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = icmp sgt i32 %3, 0
%5 = zext i1 %4 to i64
%6 = select i1 %4, i32 2147483647, i32 -2147483648
ret i32 %6
}

LLVM IR (-O2):
define i32 @test11(i32 %0) {
%2 = icmp sgt i32 %0, 0
%3 = select i1 %2, i32 2147483647, i32 -2147483648
ret i32 %3
}
/* Type definitions */
typedef int /*<<< orphan*/ size;

/* Variables and functions */
int /*<<< orphan*/ memcpy(double *, unsigned char const *, int);
double unpackValueFloat(unsigned char const **data) {
  double size;
  memcpy(&size, *data, sizeof(size));
  *data += sizeof(size);
  return size;
}


x86 assembly (clang, -O0):
<unpackValueFloat>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%rsi
lea    -0x10(%rbp),%rdi
mov    $0x8,%edx
call   1030 <memcpy@plt>
mov    -0x8(%rbp),%rax
mov    (%rax),%rcx
add    $0x8,%rcx
mov    %rcx,(%rax)
movsd  -0x10(%rbp),%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<unpackValueFloat>:
push   %rbx
sub    $0x10,%rsp
mov    %rdi,%rbx
mov    (%rdi),%rsi
lea    0x8(%rsp),%rdi
mov    $0x8,%edx
call   1030 <memcpy@plt>
addq   $0x8,(%rbx)
movsd  0x8(%rsp),%xmm0
add    $0x10,%rsp
pop    %rbx
ret

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

LLVM IR (-O2):
define double @unpackValueFloat(i8** nocapture %0) {
%2 = alloca double
%3 = bitcast double* %2 to i8*
%4 = load i8*, i8** %0
%5 = call i32 @memcpy(double* %2, i8* %4, i32 8)
%6 = load i8*, i8** %0
%7 = getelementptr inbounds i8, i8* %6, i64 8
store i8* %7, i8** %0
%8 = load double, double* %2
ret double %8
}
/* Variables and functions */
int /*<<< orphan*/ set32(int, int);
void disable_boot0() { set32((0xd800000 + 0x18c), 0x1000); }


x86 assembly (clang, -O0):
<disable_boot0>:
push   %rbp
mov    %rsp,%rbp
mov    $0xd80018c,%edi
mov    $0x1000,%esi
call   1030 <set32@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<disable_boot0>:
mov    $0xd80018c,%edi
mov    $0x1000,%esi
jmp    1030 <set32@plt>

LLVM IR (-O0):
define void @disable_boot0() {
%1 = call i32 @set32(i32 226492812, i32 4096)
ret void
}

LLVM IR (-O2):
define void @disable_boot0() {
%1 = tail call i32 @set32(i32 226492812, i32 4096)
ret void
}
int cairo_code_draw_casEnvelopeLabel_get_height() { return 12; }


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

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

LLVM IR (-O0):
define i32 @cairo_code_draw_casEnvelopeLabel_get_height() {
ret i32 12
}

LLVM IR (-O2):
define i32 @cairo_code_draw_casEnvelopeLabel_get_height() {
ret i32 12
}
/* Type definitions */
typedef scalar_t__ uint16_t;
typedef scalar_t__ int16_t;

/* Variables and functions */
bool InsSequenceGt(uint16_t a, uint16_t b) { return (int16_t)(a - b) > 0; }


x86 assembly (clang, -O0):
<InsSequenceGt>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
sub    -0x10(%rbp),%rax
cmp    $0x0,%rax
setg   %al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<InsSequenceGt>:
xor    %eax,%eax
cmp    %rsi,%rdi
setg   %al
ret

LLVM IR (-O0):
define i32 @InsSequenceGt(i64 %0, i64 %1) {
%3 = alloca i64
%4 = alloca i64
store i64 %0, i64* %3
store i64 %1, i64* %4
%5 = load i64, i64* %3
%6 = load i64, i64* %4
%7 = sub nsw i64 %5, %6
%8 = icmp sgt i64 %7, 0
%9 = zext i1 %8 to i32
ret i32 %9
}

LLVM IR (-O2):
define i32 @InsSequenceGt(i64 %0, i64 %1) {
%3 = icmp sgt i64 %0, %1
%4 = zext i1 %3 to i32
ret i32 %4
}
/* Type definitions */
typedef int /*<<< orphan*/ va_list;
struct gm_account {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ free(struct gm_account *);
int gm_account_db_final(void *key, void *data, va_list ap) {
  struct gm_account *p = data;
  free(p);
  return 0;
}


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

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

LLVM IR (-O0):
%struct.gm_account = type { i32 }
define i32 @gm_account_db_final(i8* %0, i8* %1, i32 %2) {
%4 = alloca i8*
%5 = alloca i8*
%6 = alloca i32
%7 = alloca %struct.gm_account*
store i8* %0, i8** %4
store i8* %1, i8** %5
store i32 %2, i32* %6
%8 = load i8*, i8** %5
%9 = bitcast i8* %8 to %struct.gm_account*
store %struct.gm_account* %9, %struct.gm_account** %7
%10 = load %struct.gm_account*, %struct.gm_account** %7
%11 = call i32 @free(%struct.gm_account* %10)
ret i32 0
}

LLVM IR (-O2):
%struct.gm_account = type { i32 }
define i32 @gm_account_db_final(i8* nocapture readnone %0, i8* nocapture %1, i32 %2) {
%4 = bitcast i8* %1 to %struct.gm_account*
%5 = tail call i32 @free(%struct.gm_account* %4)
ret i32 0
}
/* Variables and functions */
size_t enshift(size_t x) { return x & 0x0000001f; }


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

x86 assembly (clang, -O2):
<enshift>:
mov    %rdi,%rax
and    $0x1f,%eax
ret

LLVM IR (-O0):
define i64 @enshift(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = load i64, i64* %2
%4 = and i64 %3, 31
ret i64 %4
}

LLVM IR (-O2):
define i64 @enshift(i64 %0) {
%2 = and i64 %0, 31
ret i64 %2
}
/* Variables and functions */
int can_climb(int, int, int /*<<< orphan*/, int /*<<< orphan*/);
int /*<<< orphan*/ printf(char *, int);
int main(int argc, char const *argv[]) {
  printf("%d\n", can_climb(2, 3, 0, 0));
  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    $0x2,%edi
mov    $0x3,%esi
xor    %ecx,%ecx
mov    %ecx,%edx
call   1040 <can_climb@plt>
mov    %eax,%esi
lea    0xeae(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    $0x2,%edi
mov    $0x3,%esi
xor    %edx,%edx
xor    %ecx,%ecx
call   1040 <can_climb@plt>
lea    0xec5(%rip),%rdi
mov    %eax,%esi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
@.str = [4 x i8] c"%d\0A\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @can_climb(i32 2, i32 3, i32 0, i32 0)
%4 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %3)
ret i32 0
}
int min(const int a, const int b) { return a < b ? a : b; }


x86 assembly (clang, -O0):
<min>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
cmp    -0x8(%rbp),%eax
jge    1121 <min+0x21>
mov    -0x4(%rbp),%eax
mov    %eax,-0xc(%rbp)
jmp    1127 <min+0x27>
mov    -0x8(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<min>:
mov    %esi,%eax
cmp    %esi,%edi
cmovl  %edi,%eax
ret

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

LLVM IR (-O2):
define i32 @min(i32 %0, i32 %1) {
%3 = icmp slt i32 %0, %1
%4 = select i1 %3, i32 %0, i32 %1
ret i32 %4
}
double _f(const int n, const int m, const double omega,
          const double vertices_omegas[4]) {
  return ((omega - vertices_omegas[m]) /
          (vertices_omegas[n] - vertices_omegas[m]));
}


x86 assembly (clang, -O0):
<_f>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
movsd  %xmm0,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
movsd  -0x10(%rbp),%xmm0
mov    -0x18(%rbp),%rax
movslq -0x8(%rbp),%rcx
subsd  (%rax,%rcx,8),%xmm0
mov    -0x18(%rbp),%rax
movslq -0x4(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm1
mov    -0x18(%rbp),%rax
movslq -0x8(%rbp),%rcx
subsd  (%rax,%rcx,8),%xmm1
divsd  %xmm1,%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<_f>:
movslq %esi,%rax
movsd  (%rdx,%rax,8),%xmm1
subsd  %xmm1,%xmm0
movslq %edi,%rax
movsd  (%rdx,%rax,8),%xmm2
subsd  %xmm1,%xmm2
divsd  %xmm2,%xmm0
ret

LLVM IR (-O0):
define double @_f(i32 %0, i32 %1, double %2, double* %3) {
%5 = alloca i32
%6 = alloca i32
%7 = alloca double
%8 = alloca double*
store i32 %0, i32* %5
store i32 %1, i32* %6
store double %2, double* %7
store double* %3, double** %8
%9 = load double, double* %7
%10 = load double*, double** %8
%11 = load i32, i32* %6
%12 = sext i32 %11 to i64
%13 = getelementptr inbounds double, double* %10, i64 %12
%14 = load double, double* %13
%15 = fsub double %9, %14
%16 = load double*, double** %8
%17 = load i32, i32* %5
%18 = sext i32 %17 to i64
%19 = getelementptr inbounds double, double* %16, i64 %18
%20 = load double, double* %19
%21 = load double*, double** %8
%22 = load i32, i32* %6
%23 = sext i32 %22 to i64
%24 = getelementptr inbounds double, double* %21, i64 %23
%25 = load double, double* %24
%26 = fsub double %20, %25
%27 = fdiv double %15, %26
ret double %27
}

LLVM IR (-O2):
define double @_f(i32 %0, i32 %1, double %2, double* nocapture %3) {
%5 = sext i32 %1 to i64
%6 = getelementptr inbounds double, double* %3, i64 %5
%7 = load double, double* %6
%8 = fsub double %2, %7
%9 = sext i32 %0 to i64
%10 = getelementptr inbounds double, double* %3, i64 %9
%11 = load double, double* %10
%12 = fsub double %11, %7
%13 = fdiv double %8, %12
ret double %13
}
/* Variables and functions */
int add2(int, int);
int add1(int n) {
  if (n < 1)
    return 1;
  return 1 + add2(n - 1, n + 2);
}


x86 assembly (clang, -O0):
<add1>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
cmpl   $0x1,-0x8(%rbp)
jge    1131 <add1+0x21>
movl   $0x1,-0x4(%rbp)
jmp    1148 <add1+0x38>
mov    -0x8(%rbp),%edi
sub    $0x1,%edi
mov    -0x8(%rbp),%esi
add    $0x2,%esi
call   1030 <add2@plt>
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<add1>:
test   %edi,%edi
jle    112a <add1+0x1a>
push   %rax
mov    %edi,%esi
lea    -0x1(%rsi),%edi
add    $0x2,%esi
call   1030 <add2@plt>
add    $0x1,%eax
add    $0x8,%rsp
ret
mov    $0x1,%eax
ret

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

LLVM IR (-O2):
define i32 @add1(i32 %0) {
%2 = icmp slt i32 %0, 1
br i1 %2, label %8, label %3
3: ; preds = %1
%4 = add nsw i32 %0, -1
%5 = add nuw nsw i32 %0, 2
%6 = tail call i32 @add2(i32 %4, i32 %5)
%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 */
size_t lower_bound(size_t *pascal, size_t row_length, size_t L,
                   unsigned int n) {
  return pascal[(L - n + 1) * row_length + L];
}


x86 assembly (clang, -O0):
<lower_bound>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %ecx,-0x1c(%rbp)
mov    -0x8(%rbp),%rax
mov    -0x18(%rbp),%rcx
mov    -0x1c(%rbp),%edx
sub    %rdx,%rcx
add    $0x1,%rcx
imul   -0x10(%rbp),%rcx
add    -0x18(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<lower_bound>:
mov    %ecx,%eax
mov    %rdx,%rcx
sub    %rax,%rcx
add    $0x1,%rcx
imul   %rsi,%rcx
add    %rdx,%rcx
mov    (%rdi,%rcx,8),%rax
ret

LLVM IR (-O0):
define i64 @lower_bound(i64* %0, i64 %1, i64 %2, i32 %3) {
%5 = alloca i64*
%6 = alloca i64
%7 = alloca i64
%8 = alloca i32
store i64* %0, i64** %5
store i64 %1, i64* %6
store i64 %2, i64* %7
store i32 %3, i32* %8
%9 = load i64*, i64** %5
%10 = load i64, i64* %7
%11 = load i32, i32* %8
%12 = zext i32 %11 to i64
%13 = sub i64 %10, %12
%14 = add i64 %13, 1
%15 = load i64, i64* %6
%16 = mul i64 %14, %15
%17 = load i64, i64* %7
%18 = add i64 %16, %17
%19 = getelementptr inbounds i64, i64* %9, i64 %18
%20 = load i64, i64* %19
ret i64 %20
}

LLVM IR (-O2):
define i64 @lower_bound(i64* nocapture %0, i64 %1, i64 %2, i32 %3) {
%5 = zext i32 %3 to i64
%6 = add i64 %2, 1
%7 = sub i64 %6, %5
%8 = mul i64 %7, %1
%9 = add i64 %8, %2
%10 = getelementptr inbounds i64, i64* %0, i64 %9
%11 = load i64, i64* %10
ret i64 %11
}
int sandbox_issue_mach_extension(const char *name, char **ext_token) {
  return -1;
}


x86 assembly (clang, -O0):
<sandbox_issue_mach_extension>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    $0xffffffff,%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @sandbox_issue_mach_extension(i8* nocapture readnone %0, i8** nocapture readnone %1) {
ret i32 -1
}
void arc_unwind_setup(void) {}


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

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

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

LLVM IR (-O2):
define void @arc_unwind_setup() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void tBlockContextInfo(void) {
  printf("<u>Record Context Info</u><br>");
  printf("No context info available<br>");
}


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

x86 assembly (clang, -O2):
<tBlockContextInfo>:
push   %rax
lea    0xee8(%rip),%rdi
call   1030 <printf@plt>
lea    0xefb(%rip),%rdi
pop    %rax
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [31 x i8] c"<u>Record Context Info</u><br>\00"
@.str.1 = [30 x i8] c"No context info available<br>\00"
define void @tBlockContextInfo() {
%1 = call i32 @printf(i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str, i64 0, i64 0))
%2 = call i32 @printf(i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [31 x i8] c"<u>Record Context Info</u><br>\00"
@.str.1 = [30 x i8] c"No context info available<br>\00"
define void @tBlockContextInfo() {
%1 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([31 x i8], [31 x i8]* @.str, i64 0, i64 0))
%2 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([30 x i8], [30 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ int32_t;

/* Variables and functions */
int32_t mod(int32_t a, int32_t b) {
  a %= b;
  return a < 0 ? a + b : a;
}


x86 assembly (clang, -O0):
<mod>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x8(%rbp),%ecx
mov    -0x4(%rbp),%eax
cltd
idiv   %ecx
mov    %edx,-0x4(%rbp)
cmpl   $0x0,-0x4(%rbp)
jge    112e <mod+0x2e>
mov    -0x4(%rbp),%eax
add    -0x8(%rbp),%eax
mov    %eax,-0xc(%rbp)
jmp    1134 <mod+0x34>
mov    -0x4(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<mod>:
mov    %edi,%eax
cltd
idiv   %esi
mov    %edx,%eax
sar    $0x1f,%eax
and    %esi,%eax
add    %edx,%eax
ret

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

LLVM IR (-O2):
define i32 @mod(i32 %0, i32 %1) {
%3 = srem i32 %0, %1
%4 = icmp slt i32 %3, 0
%5 = select i1 %4, i32 %1, i32 0
%6 = add nsw i32 %5, %3
ret i32 %6
}
unsigned char f(unsigned int a) {
  unsigned int b = a & 0x10ff;
  return b;
}


x86 assembly (clang, -O0):
<f>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
and    $0x10ff,%eax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<f>:
mov    %edi,%eax
ret

LLVM IR (-O0):
define zeroext i8 @f(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %2
%4 = load i32, i32* %2
%5 = and i32 %4, 4351
store i32 %5, i32* %3
%6 = load i32, i32* %3
%7 = trunc i32 %6 to i8
ret i8 %7
}

LLVM IR (-O2):
define zeroext i8 @f(i32 %0) {
%2 = trunc i32 %0 to i8
ret i8 %2
}
int int_to_d6(int x) { return x << 6; }


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

x86 assembly (clang, -O2):
<int_to_d6>:
mov    %edi,%eax
shl    $0x6,%eax
ret

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

LLVM IR (-O2):
define i32 @int_to_d6(i32 %0) {
%2 = shl i32 %0, 6
ret i32 %2
}
/* Variables and functions */
int _ada_use_c2phc4c(int, int *, int *, double *, int /*<<< orphan*/);
int assign_standard_coefficient_of_slice(int i, int j, double *r) {
  int fail;
  fail = _ada_use_c2phc4c(43, &i, &j, r, 0);
  return fail;
}


x86 assembly (clang, -O0):
<assign_standard_coefficient_of_slice>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %rdx,-0x10(%rbp)
mov    -0x10(%rbp),%rcx
mov    $0x2b,%edi
lea    -0x4(%rbp),%rsi
lea    -0x8(%rbp),%rdx
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):
<assign_standard_coefficient_of_slice>:
push   %rax
mov    %rdx,%rcx
mov    %edi,0x4(%rsp)
mov    %esi,(%rsp)
lea    0x4(%rsp),%rsi
mov    %rsp,%rdx
mov    $0x2b,%edi
xor    %r8d,%r8d
call   1030 <_ada_use_c2phc4c@plt>
pop    %rcx
ret

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

LLVM IR (-O2):
define i32 @assign_standard_coefficient_of_slice(i32 %0, i32 %1, double* %2) {
%4 = alloca i32
%5 = alloca i32
store i32 %0, i32* %4
store i32 %1, i32* %5
%6 = call i32 @_ada_use_c2phc4c(i32 43, i32* %4, i32* %5, double* %2, i32 0)
ret i32 %6
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void print_usage() { printf("Usage: receive PORTNUM\n"); }


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

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

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

LLVM IR (-O2):
@str = [23 x i8] c"Usage: receive PORTNUM\00"
define void @print_usage() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([23 x i8], [23 x i8]* @str, i64 0, i64 0))
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ lBuff;
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ *fgets(char *, int, int /*<<< orphan*/ *);
int /*<<< orphan*/ pclose(int /*<<< orphan*/ *);
int /*<<< orphan*/ *popen(char const *, char *);
int tryCommand(char const *aCommand) {
  char lBuff[1024];
  FILE *lIn;
  lIn = popen(aCommand, "r");
  if (fgets(lBuff, sizeof(lBuff), lIn) == NULL) {
    pclose(lIn);
    return 1;
  } else {
    pclose(lIn);
    return 0;
  }
}


x86 assembly (clang, -O0):
<tryCommand>:
push   %rbp
mov    %rsp,%rbp
sub    $0x420,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
lea    0xeb6(%rip),%rsi
call   1050 <popen@plt>
mov    %rax,-0x418(%rbp)
lea    -0x410(%rbp),%rdi
mov    -0x418(%rbp),%rdx
mov    $0x400,%esi
call   1040 <fgets@plt>
cmp    $0x0,%rax
jne    1190 <tryCommand+0x60>
mov    -0x418(%rbp),%rdi
call   1030 <pclose@plt>
movl   $0x1,-0x4(%rbp)
jmp    11a3 <tryCommand+0x73>
mov    -0x418(%rbp),%rdi
call   1030 <pclose@plt>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x420,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<tryCommand>:
push   %rbp
push   %rbx
sub    $0x408,%rsp
lea    0xec0(%rip),%rsi
call   1050 <popen@plt>
mov    %rax,%rbx
mov    %rsp,%rdi
mov    $0x400,%esi
mov    %rax,%rdx
call   1040 <fgets@plt>
xor    %ebp,%ebp
test   %rax,%rax
sete   %bpl
mov    %rbx,%rdi
call   1030 <pclose@plt>
mov    %ebp,%eax
add    $0x408,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
@.str = [2 x i8] c"r\00"
define i32 @tryCommand(i8* %0) {
%2 = alloca i32
%3 = alloca i8*
%4 = alloca [1024 x i8]
%5 = alloca i32*
store i8* %0, i8** %3
%6 = load i8*, i8** %3
%7 = call i32* @popen(i8* %6, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
store i32* %7, i32** %5
%8 = getelementptr inbounds [1024 x i8], [1024 x i8]* %4, i64 0, i64 0
%9 = load i32*, i32** %5
%10 = call i32* @fgets(i8* %8, i32 1024, i32* %9)
%11 = icmp eq i32* %10, null
br i1 %11, label %12, label %15
12: ; preds = %1
%13 = load i32*, i32** %5
%14 = call i32 @pclose(i32* %13)
store i32 1, i32* %2
br label %18
15: ; preds = %1
%16 = load i32*, i32** %5
%17 = call i32 @pclose(i32* %16)
store i32 0, i32* %2
br label %18
18: ; preds = %15, %12
%19 = load i32, i32* %2
ret i32 %19
}

LLVM IR (-O2):
@.str = [2 x i8] c"r\00"
define i32 @tryCommand(i8* nocapture %0) {
%2 = alloca [1024 x i8]
%3 = getelementptr inbounds [1024 x i8], [1024 x i8]* %2, i64 0, i64 0
%4 = tail call i32* @popen(i8* %0, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
%5 = call i32* @fgets(i8* %3, i32 1024, i32* %4)
%6 = icmp eq i32* %5, null
%7 = call i32 @pclose(i32* %4)
%8 = zext i1 %6 to i32
ret i32 %8
}
/* Type definitions */
struct sigaction {
  scalar_t__ sa_flags;
  int /*<<< orphan*/ sa_handler;
  int /*<<< orphan*/ sa_mask;
};

/* Variables and functions */
int /*<<< orphan*/ SIG_IGN;
int sigaction(int, struct sigaction *, int /*<<< orphan*/ *);
int /*<<< orphan*/ sigemptyset(int /*<<< orphan*/ *);
int sigignore(int sig) {
  struct sigaction sa;
  sigemptyset(&sa.sa_mask);
  sa.sa_handler = SIG_IGN;
  sa.sa_flags = 0;
  return sigaction(sig, &sa, NULL);
}


x86 assembly (clang, -O0):
<sigignore>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
lea    -0x18(%rbp),%rdi
add    $0xc,%rdi
call   1040 <sigemptyset@plt>
mov    0x2ea9(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x10(%rbp)
movq   $0x0,-0x18(%rbp)
mov    -0x4(%rbp),%edi
lea    -0x18(%rbp),%rsi
xor    %eax,%eax
mov    %eax,%edx
call   1030 <sigaction@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<sigignore>:
push   %rbx
sub    $0x10,%rsp
mov    %edi,%ebx
lea    0xc(%rsp),%rdi
call   1040 <sigemptyset@plt>
mov    0x2eb0(%rip),%rax
mov    (%rax),%eax
mov    %eax,0x8(%rsp)
movq   $0x0,(%rsp)
mov    %rsp,%rsi
mov    %ebx,%edi
xor    %edx,%edx
call   1030 <sigaction@plt>
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
%struct.sigaction = type { i64, i32, i32 }
@SIG_IGN = global i32 0
define i32 @sigignore(i32 %0) {
%2 = alloca i32
%3 = alloca %struct.sigaction
store i32 %0, i32* %2
%4 = getelementptr inbounds %struct.sigaction, %struct.sigaction* %3, i32 0, i32 2
%5 = call i32 @sigemptyset(i32* %4)
%6 = load i32, i32* @SIG_IGN
%7 = getelementptr inbounds %struct.sigaction, %struct.sigaction* %3, i32 0, i32 1
store i32 %6, i32* %7
%8 = getelementptr inbounds %struct.sigaction, %struct.sigaction* %3, i32 0, i32 0
store i64 0, i64* %8
%9 = load i32, i32* %2
%10 = call i32 @sigaction(i32 %9, %struct.sigaction* %3, i32* null)
ret i32 %10
}

LLVM IR (-O2):
%struct.sigaction = type { i64, i32, i32 }
@SIG_IGN = global i32 0
define i32 @sigignore(i32 %0) {
%2 = alloca %struct.sigaction
%3 = bitcast %struct.sigaction* %2 to i8*
%4 = getelementptr inbounds %struct.sigaction, %struct.sigaction* %2, i64 0, i32 2
%5 = call i32 @sigemptyset(i32* %4)
%6 = load i32, i32* @SIG_IGN
%7 = getelementptr inbounds %struct.sigaction, %struct.sigaction* %2, i64 0, i32 1
store i32 %6, i32* %7
%8 = getelementptr inbounds %struct.sigaction, %struct.sigaction* %2, i64 0, i32 0
store i64 0, i64* %8
%9 = call i32 @sigaction(i32 %0, %struct.sigaction* %2, i32* null)
ret i32 %9
}
/* Variables and functions */
int /*<<< orphan*/ closelog_intern(int);
void closelog(void) { closelog_intern(1); }


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

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

LLVM IR (-O0):
define void @closelog() {
%1 = call i32 @closelog_intern(i32 1)
ret void
}

LLVM IR (-O2):
define void @closelog() {
%1 = tail call i32 @closelog_intern(i32 1)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void display_help(void) {
  printf("\nUsage: fidentify [--check] [+file_format] [directory|file]\n"
         "       fidentify --version\n"
         "\n"
         "fidentify determines the file type, the 'extension', by using the "
         "same database as PhotoRec.\n"
         "By default, all known file formats are searched unless one is "
         "specifically enabled.");
}


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

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

LLVM IR (-O0):
@.str = [265 x i8] c"\0AUsage: fidentify [--check] [+file_format] [directory|file]\0A fidentify --version\0A\0Afidentify determines the file type, the 'extension', by using the same database as PhotoRec.\0ABy default, all known file formats are searched unless one is specifically enabled.\00"
define void @display_help() {
%1 = call i32 @printf(i8* getelementptr inbounds ([265 x i8], [265 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [265 x i8] c"\0AUsage: fidentify [--check] [+file_format] [directory|file]\0A fidentify --version\0A\0Afidentify determines the file type, the 'extension', by using the same database as PhotoRec.\0ABy default, all known file formats are searched unless one is specifically enabled.\00"
define void @display_help() {
%1 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([265 x i8], [265 x i8]* @.str, i64 0, i64 0))
ret void
}
void clear_errors(void) {}


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

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

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

LLVM IR (-O2):
define void @clear_errors() {
ret void
}