xunge/DecIR huggingface dataset:
/* Type definitions */
struct net_interface_event {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ net_interface_obus_event(struct net_interface_event *);
int obus_event_commit(int /*<<< orphan*/);
int net_interface_event_commit(struct net_interface_event *event) {
  return obus_event_commit(net_interface_obus_event(event));
}


x86 assembly (clang, -O0):
<net_interface_event_commit>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <net_interface_obus_event@plt>
mov    %eax,%edi
call   1040 <obus_event_commit@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<net_interface_event_commit>:
push   %rax
call   1030 <net_interface_obus_event@plt>
mov    %eax,%edi
pop    %rax
jmp    1040 <obus_event_commit@plt>

LLVM IR (-O0):
%struct.net_interface_event = type { i32 }
define i32 @net_interface_event_commit(%struct.net_interface_event* %0) {
%2 = alloca %struct.net_interface_event*
store %struct.net_interface_event* %0, %struct.net_interface_event** %2
%3 = load %struct.net_interface_event*, %struct.net_interface_event** %2
%4 = call i32 @net_interface_obus_event(%struct.net_interface_event* %3)
%5 = call i32 @obus_event_commit(i32 %4)
ret i32 %5
}

LLVM IR (-O2):
%struct.net_interface_event = type { i32 }
define i32 @net_interface_event_commit(%struct.net_interface_event* %0) {
%2 = tail call i32 @net_interface_obus_event(%struct.net_interface_event* %0)
%3 = tail call i32 @obus_event_commit(i32 %2)
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ output_with_tab(char *);
void gen_immediate(void) { output_with_tab("ldd "); }


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

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

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

LLVM IR (-O2):
@.str = [5 x i8] c"ldd \00"
define void @gen_immediate() {
%1 = tail call i32 @output_with_tab(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ errx(char *);
void usage(void) { errx("./prog -c connaddr -C connport"); }


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

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

LLVM IR (-O0):
@.str = [31 x i8] c"./prog -c connaddr -C connport\00"
define void @usage() {
%1 = call i32 @errx(i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [31 x i8] c"./prog -c connaddr -C connport\00"
define void @usage() {
%1 = tail call i32 @errx(i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str, i64 0, i64 0))
ret void
}
/* Variables and functions */
bool nrf53_errata_34(void) { return false; }


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

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

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

LLVM IR (-O2):
define i32 @nrf53_errata_34() {
ret i32 0
}
/* Variables and functions */
float pow(double, double);
int main(void) {
  float x = pow(10.0, 38.0);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movsd  0xed9(%rip),%xmm0
movsd  0xed9(%rip),%xmm1
call   1030 <pow@plt>
movss  %xmm0,-0x8(%rbp)
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
movsd  0xee7(%rip),%xmm0
movsd  0xee7(%rip),%xmm1
call   1030 <pow@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca float
store i32 0, i32* %1
%3 = call float @pow(double 1.000000e+01, double 3.800000e+01)
store float %3, float* %2
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call float @pow(double 1.000000e+01, double 3.800000e+01)
ret i32 0
}
/* Type definitions */
typedef int const int32_t;
typedef int /*<<< orphan*/ int16_t;

/* Variables and functions */
int16_t quantization16(int32_t x, const int fractional_digits) {
  return (int16_t)(x >> fractional_digits);
}


x86 assembly (clang, -O0):
<quantization16>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
mov    -0x8(%rbp),%ecx
sar    %cl,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<quantization16>:
mov    %esi,%ecx
mov    %edi,%eax
sar    %cl,%eax
ret

LLVM IR (-O0):
define i32 @quantization16(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 = ashr i32 %5, %6
ret i32 %7
}

LLVM IR (-O2):
define i32 @quantization16(i32 %0, i32 %1) {
%3 = ashr i32 %0, %1
ret i32 %3
}
void foo341() {}


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

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

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

LLVM IR (-O2):
define void @foo341() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
main() {
  int a = 164;
  printf("el valor de ñ es: %c\n", a);
}


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

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

LLVM IR (-O0):
@.str = [23 x i8] c"el valor de \C3\B1 es: %c\0A\00"
define i32 @main() {
%1 = alloca i32
store i32 164, i32* %1
%2 = load i32, i32* %1
%3 = call i32 @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str, i64 0, i64 0), i32 %2)
ret i32 0
}

LLVM IR (-O2):
@.str = [23 x i8] c"el valor de \C3\B1 es: %c\0A\00"
define i32 @main() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str, i64 0, i64 0), i32 164)
ret i32 0
}
void foo(int *P) {
  __builtin_prefetch(P);
  __builtin_prefetch(P, 1);
}


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

x86 assembly (clang, -O2):
<foo>:
prefetcht0 (%rdi)
prefetcht0 (%rdi)
ret

LLVM IR (-O0):
define void @foo(i32* %0) {
%2 = alloca i32*
store i32* %0, i32** %2
%3 = load i32*, i32** %2
%4 = bitcast i32* %3 to i8*
%5 = load i32*, i32** %2
%6 = bitcast i32* %5 to i8*
ret void
}

LLVM IR (-O2):
define void @foo(i32* nocapture %0) {
%2 = bitcast i32* %0 to i8*
tail call void @llvm.prefetch.p0i8(i8* %2, i32 0, i32 3, i32 1)
tail call void @llvm.prefetch.p0i8(i8* %2, i32 1, i32 3, i32 1)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, ...);
int /*<<< orphan*/ stderr;
void usage(const char *mess) {
  fprintf(stderr, "Error: %s\n", mess);
  fprintf(stderr, "Usage: wndr3700 input_file output_file\n");
  fprintf(stderr, "\n");
  exit(1);
}


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
mov    $0x0,%al
call   1030 <fprintf@plt>
mov    0x2e92(%rip),%rax
mov    (%rax),%edi
lea    0xeb4(%rip),%rsi
mov    $0x0,%al
call   1030 <fprintf@plt>
mov    0x2e7b(%rip),%rax
mov    (%rax),%edi
lea    0xec3(%rip),%rsi
mov    $0x0,%al
call   1030 <fprintf@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<usage>:
push   %rbx
mov    %rdi,%rdx
mov    0x2eb5(%rip),%rbx
mov    (%rbx),%edi
lea    0xecc(%rip),%rsi
xor    %eax,%eax
call   1030 <fprintf@plt>
mov    (%rbx),%edi
lea    0xec7(%rip),%rsi
xor    %eax,%eax
call   1030 <fprintf@plt>
mov    (%rbx),%edi
lea    0xedd(%rip),%rsi
xor    %eax,%eax
call   1030 <fprintf@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [11 x i8] c"Error: %s\0A\00"
@.str.1 = [40 x i8] c"Usage: wndr3700 input_file output_file\0A\00"
@.str.2 = [2 x i8] c"\0A\00"
define void @usage(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i32, i32* @stderr
%4 = load i8*, i8** %2
%5 = call i32 (i32, i8*, ...) @fprintf(i32 %3, i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), i8* %4)
%6 = load i32, i32* @stderr
%7 = call i32 (i32, i8*, ...) @fprintf(i32 %6, i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str.1, i64 0, i64 0))
%8 = load i32, i32* @stderr
%9 = call i32 (i32, i8*, ...) @fprintf(i32 %8, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0))
%10 = call i32 @exit(i32 1)
unreachable
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [11 x i8] c"Error: %s\0A\00"
@.str.1 = [40 x i8] c"Usage: wndr3700 input_file output_file\0A\00"
@.str.2 = [2 x i8] c"\0A\00"
define void @usage(i8* %0) {
%2 = load i32, i32* @stderr
%3 = tail call i32 (i32, i8*, ...) @fprintf(i32 %2, i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), i8* %0)
%4 = load i32, i32* @stderr
%5 = tail call i32 (i32, i8*, ...) @fprintf(i32 %4, i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str.1, i64 0, i64 0))
%6 = load i32, i32* @stderr
%7 = tail call i32 (i32, i8*, ...) @fprintf(i32 %6, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0))
%8 = tail call i32 @exit(i32 1)
unreachable
}
/* Variables and functions */
double floor(double);
double mods3600(double x) {
  double lx;
  lx = x;
  lx = lx - 1296000.0 * floor(lx / 1296000.0);
  return (lx);
}


x86 assembly (clang, -O0):
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
movsd  %xmm0,-0x10(%rbp)
movsd  -0x10(%rbp),%xmm0
movsd  %xmm0,-0x18(%rbp)
movsd  -0x10(%rbp),%xmm0
movsd  0xeca(%rip),%xmm1
divsd  %xmm1,%xmm0
call   1030 <floor@plt>
movsd  -0x18(%rbp),%xmm1
movsd  0xeac(%rip),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x10(%rbp)
movsd  -0x10(%rbp),%xmm0
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
push   %rax
movsd  %xmm0,(%rsp)
divsd  0xee2(%rip),%xmm0
call   1030 <floor@plt>
mulsd  0xedd(%rip),%xmm0
addsd  (%rsp),%xmm0
pop    %rax
ret

LLVM IR (-O0):
define double @mods3600(double %0) {
%2 = alloca double
%3 = alloca double
store double %0, double* %2
%4 = load double, double* %2
store double %4, double* %3
%5 = load double, double* %3
%6 = load double, double* %3
%7 = fdiv double %6, 1.296000e+06
%8 = call double @llvm.floor.f64(double %7)
%9 = call double @llvm.fmuladd.f64(double -1.296000e+06, double %8, double %5)
store double %9, double* %3
%10 = load double, double* %3
ret double %10
}

LLVM IR (-O2):
define double @mods3600(double %0) {
%2 = fdiv double %0, 1.296000e+06
%3 = tail call double @llvm.floor.f64(double %2)
%4 = tail call double @llvm.fmuladd.f64(double %3, double -1.296000e+06, double %0)
ret double %4
}
/* Type definitions */
struct navi_scope {
  int dummy;
};

/* Variables and functions */
struct navi_scope *_navi_scope_ref(struct navi_scope *);
struct navi_scope *_navi_extern_scope_ref(struct navi_scope *scope) {
  return _navi_scope_ref(scope);
}


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

x86 assembly (clang, -O2):
<_navi_extern_scope_ref>:
jmp    1030 <_navi_scope_ref@plt>

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

LLVM IR (-O2):
%struct.navi_scope = type { i32 }
define %struct.navi_scope* @_navi_extern_scope_ref(%struct.navi_scope* %0) {
%2 = tail call %struct.navi_scope* @_navi_scope_ref(%struct.navi_scope* %0)
ret %struct.navi_scope* %2
}
void idrnet_poke(void *ptr, unsigned int offset, char val) {
  char *buf_c = (char *)ptr;
  buf_c[offset] = val;
}


x86 assembly (clang, -O0):
<idrnet_poke>:
push   %rbp
mov    %rsp,%rbp
mov    %dl,%al
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %al,-0xd(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0xd(%rbp),%dl
mov    -0x18(%rbp),%rax
mov    -0xc(%rbp),%ecx
mov    %dl,(%rax,%rcx,1)
pop    %rbp
ret

x86 assembly (clang, -O2):
<idrnet_poke>:
mov    %esi,%eax
mov    %dl,(%rdi,%rax,1)
ret

LLVM IR (-O0):
define void @idrnet_poke(i8* %0, i32 %1, i8 signext %2) {
%4 = alloca i8*
%5 = alloca i32
%6 = alloca i8
%7 = alloca i8*
store i8* %0, i8** %4
store i32 %1, i32* %5
store i8 %2, i8* %6
%8 = load i8*, i8** %4
store i8* %8, i8** %7
%9 = load i8, i8* %6
%10 = load i8*, i8** %7
%11 = load i32, i32* %5
%12 = zext i32 %11 to i64
%13 = getelementptr inbounds i8, i8* %10, i64 %12
store i8 %9, i8* %13
ret void
}

LLVM IR (-O2):
define void @idrnet_poke(i8* nocapture writeonly %0, i32 %1, i8 signext %2) {
%4 = zext i32 %1 to i64
%5 = getelementptr inbounds i8, i8* %0, i64 %4
store i8 %2, i8* %5
ret void
}
/* Variables and functions */
int /*<<< orphan*/ _Error(long, char *);
void Error_PhraseBoundMarkSyntaxArgumentMustBindToInParameter(long p_position) {
  _Error(
      p_position,
      "Syntax mark argument which is of phrase type must bind to in parameter");
}


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

x86 assembly (clang, -O2):
<Error_PhraseBoundMarkSyntaxArgumentMustBindToInParameter>:
lea    0xee9(%rip),%rsi
jmp    1030 <_Error@plt>

LLVM IR (-O0):
@.str = [71 x i8] c"Syntax mark argument which is of phrase type must bind to in parameter\00"
define void @Error_PhraseBoundMarkSyntaxArgumentMustBindToInParameter(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = load i64, i64* %2
%4 = call i32 @_Error(i64 %3, i8* getelementptr inbounds ([71 x i8], [71 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [71 x i8] c"Syntax mark argument which is of phrase type must bind to in parameter\00"
define void @Error_PhraseBoundMarkSyntaxArgumentMustBindToInParameter(i64 %0) {
%2 = tail call i32 @_Error(i64 %0, i8* getelementptr inbounds ([71 x i8], [71 x i8]* @.str, i64 0, i64 0))
ret void
}
void glDeleteShader(void) { return; }


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

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

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

LLVM IR (-O2):
define void @glDeleteShader() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ setup_RPM();
int /*<<< orphan*/ setup_TPS(int /*<<< orphan*/);
int /*<<< orphan*/ setup_alphaN_table();
int setup_fueling() {
  setup_TPS(0);
  setup_RPM();
  setup_alphaN_table();
  return 0;
}


x86 assembly (clang, -O0):
<setup_fueling>:
push   %rbp
mov    %rsp,%rbp
xor    %edi,%edi
call   1040 <setup_TPS@plt>
mov    $0x0,%al
call   1050 <setup_RPM@plt>
mov    $0x0,%al
call   1030 <setup_alphaN_table@plt>
xor    %eax,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<setup_fueling>:
push   %rax
xor    %edi,%edi
call   1040 <setup_TPS@plt>
xor    %eax,%eax
call   1050 <setup_RPM@plt>
xor    %eax,%eax
call   1030 <setup_alphaN_table@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @setup_fueling() {
%1 = call i32 @setup_TPS(i32 0)
%2 = call i32 (...) @setup_RPM()
%3 = call i32 (...) @setup_alphaN_table()
ret i32 0
}

LLVM IR (-O2):
define i32 @setup_fueling() {
%1 = tail call i32 @setup_TPS(i32 0)
%2 = tail call i32 (...) @setup_RPM()
%3 = tail call i32 (...) @setup_alphaN_table()
ret i32 0
}
/* Type definitions */
typedef int uint32_t;

/* Variables and functions */
uint32_t precoding_bits_f2a(uint32_t nof_ports) {
  if (nof_ports <= 2) {
    return 0;
  } else {
    return 2;
  }
}


x86 assembly (clang, -O0):
<precoding_bits_f2a>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
cmpl   $0x2,-0x8(%rbp)
jg     111d <precoding_bits_f2a+0x1d>
movl   $0x0,-0x4(%rbp)
jmp    1124 <precoding_bits_f2a+0x24>
movl   $0x2,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<precoding_bits_f2a>:
xor    %eax,%eax
cmp    $0x3,%edi
setge  %al
add    %eax,%eax
ret

LLVM IR (-O0):
define i32 @precoding_bits_f2a(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %3
%4 = load i32, i32* %3
%5 = icmp sle i32 %4, 2
br i1 %5, label %6, label %7
6: ; preds = %1
store i32 0, i32* %2
br label %8
7: ; preds = %1
store i32 2, i32* %2
br label %8
8: ; preds = %7, %6
%9 = load i32, i32* %2
ret i32 %9
}

LLVM IR (-O2):
define i32 @precoding_bits_f2a(i32 %0) {
%2 = icmp sgt i32 %0, 2
%3 = select i1 %2, i32 2, i32 0
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, ...);
void reverse_message(const int *array, int *c) {
  while (*c != -1) {
    printf("%c", *(array + *c));
    *c -= 1;
  }
  printf("\n");
}


x86 assembly (clang, -O0):
<reverse_message>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
cmpl   $0xffffffff,(%rax)
je     1159 <reverse_message+0x49>
mov    -0x8(%rbp),%rax
mov    -0x10(%rbp),%rcx
movslq (%rcx),%rcx
mov    (%rax,%rcx,4),%esi
lea    0xebe(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x10(%rbp),%rax
mov    (%rax),%ecx
sub    $0x1,%ecx
mov    %ecx,(%rax)
jmp    1120 <reverse_message+0x10>
lea    0xea3(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<reverse_message>:
push   %r14
push   %rbx
push   %rax
mov    (%rsi),%eax
cmp    $0xffffffff,%eax
je     1144 <reverse_message+0x34>
mov    %rsi,%rbx
mov    %rdi,%r14
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
cltq
mov    (%r14,%rax,4),%edi
call   1030 <putchar@plt>
mov    (%rbx),%eax
sub    $0x1,%eax
mov    %eax,(%rbx)
jae    1130 <reverse_message+0x20>
mov    $0xa,%edi
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1030 <putchar@plt>

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

LLVM IR (-O2):
define void @reverse_message(i32* nocapture %0, i32* nocapture %1) {
%3 = load i32, i32* %1
%4 = icmp eq i32 %3, -1
br i1 %4, label %14, label %5
5: ; preds = %2, %5
%6 = phi i32 [ %12, %5 ], [ %3, %2 ]
%7 = sext i32 %6 to i64
%8 = getelementptr inbounds i32, i32* %0, i64 %7
%9 = load i32, i32* %8
%10 = tail call i32 @putchar(i32 %9)
%11 = load i32, i32* %1
%12 = add nsw i32 %11, -1
store i32 %12, i32* %1
%13 = icmp eq i32 %11, 0
br i1 %13, label %14, label %5
14: ; preds = %5, %2
%15 = tail call i32 @putchar(i32 10)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ napms(int);
int /*<<< orphan*/ refresh();
void showit(void) {
  refresh();
  napms(120);
}


x86 assembly (clang, -O0):
<showit>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1030 <refresh@plt>
mov    $0x78,%edi
call   1040 <napms@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<showit>:
push   %rax
xor    %eax,%eax
call   1030 <refresh@plt>
mov    $0x78,%edi
pop    %rax
jmp    1040 <napms@plt>

LLVM IR (-O0):
define void @showit() {
%1 = call i32 (...) @refresh()
%2 = call i32 @napms(i32 120)
ret void
}

LLVM IR (-O2):
define void @showit() {
%1 = tail call i32 (...) @refresh()
%2 = tail call i32 @napms(i32 120)
ret void
}
int sum(int a, int b) { return (a + b); }


x86 assembly (clang, -O0):
<sum>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
add    -0x8(%rbp),%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @sum(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 = add nsw i32 %5, %6
ret i32 %7
}

LLVM IR (-O2):
define i32 @sum(i32 %0, i32 %1) {
%3 = add nsw i32 %1, %0
ret i32 %3
}
int octave_o_nonblock_wrapper(void) { return -1; }


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

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

LLVM IR (-O0):
define i32 @octave_o_nonblock_wrapper() {
ret i32 -1
}

LLVM IR (-O2):
define i32 @octave_o_nonblock_wrapper() {
ret i32 -1
}
/* Variables and functions */
int /*<<< orphan*/ is_hex_padded(char *);
char *is_hex_padded_01a() {
  char hex[] =
      "B300562F8F9A961E158BDE2D4CCD2A64BB1D923208939714675BFFB17BBAF2A3";
  do {
    if (!(!is_hex_padded(hex)))
      return "return false if hex string doesn't start with '0x'";
  } while (0);
  return 0;
}


x86 assembly (clang, -O0):
<is_hex_padded_01a>:
push   %rbp
mov    %rsp,%rbp
sub    $0x50,%rsp
lea    -0x50(%rbp),%rdi
lea    0xecd(%rip),%rsi
mov    $0x41,%edx
call   1030 <memcpy@plt>
lea    -0x50(%rbp),%rdi
call   1040 <is_hex_padded@plt>
cmp    $0x0,%eax
je     115f <is_hex_padded_01a+0x3f>
lea    0xeeb(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    116c <is_hex_padded_01a+0x4c>
jmp    1164 <is_hex_padded_01a+0x44>
movq   $0x0,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x50,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<is_hex_padded_01a>:
sub    $0x48,%rsp
movaps 0xf15(%rip),%xmm0
movaps %xmm0,0x30(%rsp)
movaps 0xef9(%rip),%xmm0
movaps %xmm0,0x20(%rsp)
movaps 0xedd(%rip),%xmm0
movaps %xmm0,0x10(%rsp)
movaps 0xec1(%rip),%xmm0
movaps %xmm0,(%rsp)
movb   $0x0,0x40(%rsp)
mov    %rsp,%rdi
call   1030 <is_hex_padded@plt>
xor    %ecx,%ecx
test   %eax,%eax
lea    0xee6(%rip),%rax
cmovne %rax,%rcx
mov    %rcx,%rax
add    $0x48,%rsp
ret

LLVM IR (-O0):
@__const.is_hex_padded_01a.hex = [65 x i8] c"B300562F8F9A961E158BDE2D4CCD2A64BB1D923208939714675BFFB17BBAF2A3\00"
@.str = [51 x i8] c"return false if hex string doesn't start with '0x'\00"
define i8* @is_hex_padded_01a() {
%1 = alloca i8*
%2 = alloca [65 x i8]
%3 = bitcast [65 x i8]* %2 to i8*
br label %4
4: ; preds = %0
%5 = getelementptr inbounds [65 x i8], [65 x i8]* %2, i64 0, i64 0
%6 = call i32 @is_hex_padded(i8* %5)
%7 = icmp ne i32 %6, 0
br i1 %7, label %8, label %9
8: ; preds = %4
store i8* getelementptr inbounds ([51 x i8], [51 x i8]* @.str, i64 0, i64 0), i8** %1
br label %11
9: ; preds = %4
br label %10
10: ; preds = %9
store i8* null, i8** %1
br label %11
11: ; preds = %10, %8
%12 = load i8*, i8** %1
ret i8* %12
}

LLVM IR (-O2):
@__const.is_hex_padded_01a.hex = [65 x i8] c"B300562F8F9A961E158BDE2D4CCD2A64BB1D923208939714675BFFB17BBAF2A3\00"
@.str = [51 x i8] c"return false if hex string doesn't start with '0x'\00"
define i8* @is_hex_padded_01a() {
%1 = alloca [65 x i8]
%2 = getelementptr inbounds [65 x i8], [65 x i8]* %1, i64 0, i64 0
%3 = call i32 @is_hex_padded(i8* %2)
%4 = icmp eq i32 %3, 0
%5 = select i1 %4, i8* null, i8* getelementptr inbounds ([51 x i8], [51 x i8]* @.str, i64 0, i64 0)
ret i8* %5
}
/* Variables and functions */
int /*<<< orphan*/ abort();
int /*<<< orphan*/ perror(char *);
void PERROR(char *msg) {
  perror(msg);
  abort();
}


x86 assembly (clang, -O0):
<PERROR>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <perror@plt>
mov    $0x0,%al
call   1030 <abort@plt>

x86 assembly (clang, -O2):
<PERROR>:
push   %rax
call   1040 <perror@plt>
xor    %eax,%eax
call   1030 <abort@plt>

LLVM IR (-O0):
define void @PERROR(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 @perror(i8* %3)
%5 = call i32 (...) @abort()
unreachable
}

LLVM IR (-O2):
define void @PERROR(i8* nocapture %0) {
%2 = tail call i32 @perror(i8* %0)
%3 = tail call i32 (...) @abort()
unreachable
}
void foo673(int p) {}


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

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

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

LLVM IR (-O2):
define void @foo673(i32 %0) {
ret void
}
void setWriteLock(void *mem, int semid) {
  int *p = mem;
  p[(3)] = semid;
}


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

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

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

LLVM IR (-O2):
define void @setWriteLock(i8* nocapture writeonly %0, i32 %1) {
%3 = getelementptr inbounds i8, i8* %0, i64 12
%4 = bitcast i8* %3 to i32*
store i32 %1, i32* %4
ret void
}
/* Variables and functions */
int /*<<< orphan*/ test_strcat(char *, char *);
void __run_test_strcat__(void) {
  test_strcat("Hello", "World");
  test_strcat("Hello", "");
  test_strcat("", "World");
  test_strcat("", "");
}


x86 assembly (clang, -O0):
<__run_test_strcat__>:
push   %rbp
mov    %rsp,%rbp
lea    0xee5(%rip),%rdi
lea    0xee4(%rip),%rsi
call   1030 <test_strcat@plt>
lea    0xed2(%rip),%rdi
lea    0xed6(%rip),%rsi
call   1030 <test_strcat@plt>
lea    0xeca(%rip),%rdi
lea    0xebe(%rip),%rsi
call   1030 <test_strcat@plt>
lea    0xeb7(%rip),%rsi
mov    %rsi,%rdi
call   1030 <test_strcat@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<__run_test_strcat__>:
push   %r15
push   %r14
push   %rbx
lea    0xee4(%rip),%r15
lea    0xee3(%rip),%r14
mov    %r15,%rdi
mov    %r14,%rsi
call   1030 <test_strcat@plt>
lea    0xed6(%rip),%rbx
mov    %r15,%rdi
mov    %rbx,%rsi
call   1030 <test_strcat@plt>
mov    %rbx,%rdi
mov    %r14,%rsi
call   1030 <test_strcat@plt>
mov    %rbx,%rdi
mov    %rbx,%rsi
pop    %rbx
pop    %r14
pop    %r15
jmp    1030 <test_strcat@plt>

LLVM IR (-O0):
@.str = [6 x i8] c"Hello\00"
@.str.1 = [6 x i8] c"World\00"
@.str.2 = [1 x i8] zeroinitializer
define void @__run_test_strcat__() {
%1 = call i32 @test_strcat(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0))
%2 = call i32 @test_strcat(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.2, i64 0, i64 0))
%3 = call i32 @test_strcat(i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0))
%4 = call i32 @test_strcat(i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.2, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [6 x i8] c"Hello\00"
@.str.1 = [6 x i8] c"World\00"
@.str.2 = [1 x i8] zeroinitializer
define void @__run_test_strcat__() {
%1 = tail call i32 @test_strcat(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0))
%2 = tail call i32 @test_strcat(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.2, i64 0, i64 0))
%3 = tail call i32 @test_strcat(i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0))
%4 = tail call i32 @test_strcat(i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.2, i64 0, i64 0))
ret void
}
/* Type definitions */
typedef int uint32_t;

/* Variables and functions */
int a_ctz_32(uint32_t x) {
  static const char debruijn32[32] = {
      0,  1,  23, 2,  29, 24, 19, 3,  30, 27, 25, 11, 20, 8, 4,  13,
      31, 22, 28, 18, 26, 10, 7,  12, 21, 17, 9,  6,  16, 5, 15, 14};
  return debruijn32[(x & -x) * 0x076be629 >> 27];
}


x86 assembly (clang, -O0):
<a_ctz_32>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
xor    %ecx,%ecx
sub    -0x4(%rbp),%ecx
and    %ecx,%eax
imul   $0x76be629,%eax,%eax
sar    $0x1b,%eax
movslq %eax,%rcx
lea    0xedc(%rip),%rax
movsbl (%rax,%rcx,1),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<a_ctz_32>:
mov    %edi,%eax
neg    %eax
and    %edi,%eax
imul   $0x76be629,%eax,%eax
sar    $0x1b,%eax
cltq
lea    0xee8(%rip),%rcx
movsbl (%rax,%rcx,1),%eax
ret

LLVM IR (-O0):
@a_ctz_32.debruijn32 = internal constant [32 x i8] c"\00\01\17\02\1D\18\13\03\1E\1B\19\0B\14\08\04\0D\1F\16\1C\12\1A\0A\07\0C\15\11\09\06\10\05\0F\0E"
define i32 @a_ctz_32(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = load i32, i32* %2
%5 = sub nsw i32 0, %4
%6 = and i32 %3, %5
%7 = mul nsw i32 %6, 124511785
%8 = ashr i32 %7, 27
%9 = sext i32 %8 to i64
%10 = getelementptr inbounds [32 x i8], [32 x i8]* @a_ctz_32.debruijn32, i64 0, i64 %9
%11 = load i8, i8* %10
%12 = sext i8 %11 to i32
ret i32 %12
}

LLVM IR (-O2):
@a_ctz_32.debruijn32 = internal unnamed_addr constant [32 x i8] c"\00\01\17\02\1D\18\13\03\1E\1B\19\0B\14\08\04\0D\1F\16\1C\12\1A\0A\07\0C\15\11\09\06\10\05\0F\0E"
define i32 @a_ctz_32(i32 %0) {
%2 = sub nsw i32 0, %0
%3 = and i32 %2, %0
%4 = mul nsw i32 %3, 124511785
%5 = ashr i32 %4, 27
%6 = sext i32 %5 to i64
%7 = getelementptr inbounds [32 x i8], [32 x i8]* @a_ctz_32.debruijn32, i64 0, i64 %6
%8 = load i8, i8* %7
%9 = sext i8 %8 to i32
ret i32 %9
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ iscntrl(int);
void t_iscntrl_0x94() {
  Assert_real((iscntrl(148) == 0),
              "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
              "2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/"
              "dg/z88dk/test/suites/ctype/test_iscntrl.c",
              745, ("iscntrl should be 0 for 0x94"));
}


x86 assembly (clang, -O0):
<t_iscntrl_0x94>:
push   %rbp
mov    %rsp,%rbp
mov    $0x94,%edi
call   1030 <iscntrl@plt>
cmp    $0x0,%rax
sete   %al
and    $0x1,%al
movzbl %al,%edi
lea    0xebf(%rip),%rsi
mov    $0x2e9,%edx
lea    0xf5b(%rip),%rcx
call   1040 <Assert_real@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<t_iscntrl_0x94>:
push   %rax
mov    $0x94,%edi
call   1030 <iscntrl@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf66(%rip),%rcx
mov    $0x2e9,%edx
pop    %rax
jmp    1040 <Assert_real@plt>

LLVM IR (-O0):
@.str = [168 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/ctype/test_iscntrl.c\00"
@.str.1 = [29 x i8] c"iscntrl should be 0 for 0x94\00"
define void @t_iscntrl_0x94() {
%1 = call i64 @iscntrl(i32 148)
%2 = icmp eq i64 %1, 0
%3 = zext i1 %2 to i32
%4 = call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([168 x i8], [168 x i8]* @.str, i64 0, i64 0), i32 745, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [168 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/ctype/test_iscntrl.c\00"
@.str.1 = [29 x i8] c"iscntrl should be 0 for 0x94\00"
define void @t_iscntrl_0x94() {
%1 = tail call i64 @iscntrl(i32 148)
%2 = icmp eq i64 %1, 0
%3 = zext i1 %2 to i32
%4 = tail call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([168 x i8], [168 x i8]* @.str, i64 0, i64 0), i32 745, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Type definitions */
typedef unsigned char uint8_t;

/* Variables and functions */
void swap16(const uint8_t *buffer, void *out) {
  unsigned char *ptr = (unsigned char *)out;
  ptr[0] = buffer[1];
  ptr[1] = buffer[0];
}


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

x86 assembly (clang, -O2):
<swap16>:
mov    0x1(%rdi),%al
mov    %al,(%rsi)
mov    (%rdi),%al
mov    %al,0x1(%rsi)
ret

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

LLVM IR (-O2):
define void @swap16(i8* nocapture %0, i8* nocapture writeonly %1) {
%3 = getelementptr inbounds i8, i8* %0, i64 1
%4 = load i8, i8* %3
store i8 %4, i8* %1
%5 = load i8, i8* %0
%6 = getelementptr inbounds i8, i8* %1, i64 1
store i8 %5, i8* %6
ret void
}
void XCreatePixmapFromBitmapData() {}


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

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

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

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


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

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

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

LLVM IR (-O2):
define void @__enable_interrupt() {
ret void
}
void lpm_stats_suspend_enter(void) { return; }


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

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

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

LLVM IR (-O2):
define void @lpm_stats_suspend_enter() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, float, float, double);
int /*<<< orphan*/ scanf(char *, float *, float *, double *);
int main() {
  float a, b;
  double c;
  scanf("%f %f %lf", &a, &b, &c);
  printf("%.3f\n%.3f\n%.3lf", a, b, c);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeca(%rip),%rdi
lea    -0x8(%rbp),%rsi
lea    -0xc(%rbp),%rdx
lea    -0x18(%rbp),%rcx
call   1040 <scanf@plt>
movss  -0x8(%rbp),%xmm0
movss  -0xc(%rbp),%xmm1
movsd  -0x18(%rbp),%xmm2
lea    0xead(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
sub    $0x18,%rsp
lea    0xed5(%rip),%rdi
lea    0xc(%rsp),%rsi
lea    0x8(%rsp),%rdx
lea    0x10(%rsp),%rcx
call   1040 <scanf@plt>
movss  0xc(%rsp),%xmm0
movss  0x8(%rsp),%xmm1
movsd  0x10(%rsp),%xmm2
lea    0xeb2(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x18,%rsp
ret

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

LLVM IR (-O2):
@.str = [10 x i8] c"%f %f %lf\00"
@.str.1 = [16 x i8] c"%.3f\0A%.3f\0A%.3lf\00"
define i32 @main() {
%1 = alloca float
%2 = alloca float
%3 = alloca double
%4 = bitcast float* %1 to i8*
%5 = bitcast float* %2 to i8*
%6 = bitcast double* %3 to i8*
%7 = call i32 @scanf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), float* %1, float* %2, double* %3)
%8 = load float, float* %1
%9 = load float, float* %2
%10 = load double, double* %3
%11 = call i32 @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.1, i64 0, i64 0), float %8, float %9, double %10)
ret i32 0
}
void BZ2_bzWrite(void *b) {
  int *bzf = (int *)b;
  if (bzf == 0) {
    return;
  }
  while (1) {
    *bzf = 0;
  }
}


x86 assembly (clang, -O0):
<BZ2_bzWrite>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
jne    111d <BZ2_bzWrite+0x1d>
pop    %rbp
ret
jmp    1122 <BZ2_bzWrite+0x22>
mov    -0x10(%rbp),%rax
movl   $0x0,(%rax)
jmp    1122 <BZ2_bzWrite+0x22>

x86 assembly (clang, -O2):
<BZ2_bzWrite>:
test   %rdi,%rdi
je     1112 <BZ2_bzWrite+0x12>
movl   $0x0,(%rdi)
nopl   0x0(%rax,%rax,1)
jmp    1110 <BZ2_bzWrite+0x10>
ret

LLVM IR (-O0):
define void @BZ2_bzWrite(i8* %0) {
%2 = alloca i8*
%3 = alloca i32*
store i8* %0, i8** %2
%4 = load i8*, i8** %2
%5 = bitcast i8* %4 to i32*
store i32* %5, i32** %3
%6 = load i32*, i32** %3
%7 = icmp eq i32* %6, null
br i1 %7, label %8, label %9
8: ; preds = %1
ret void
9: ; preds = %1
br label %10
10: ; preds = %9, %10
%11 = load i32*, i32** %3
store i32 0, i32* %11
br label %10
}

LLVM IR (-O2):
define void @BZ2_bzWrite(i8* writeonly %0) {
%2 = icmp eq i8* %0, null
br i1 %2, label %5, label %3
3: ; preds = %1
%4 = bitcast i8* %0 to i32*
store i32 0, i32* %4
br label %6
5: ; preds = %1
ret void
6: ; preds = %3, %6
br label %6
}
/* Variables and functions */
bool is_power_of_two(unsigned int n) { return n && !(n & (n - 1)); }


x86 assembly (clang, -O0):
<is_power_of_two>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
xor    %eax,%eax
cmpl   $0x0,-0x4(%rbp)
mov    %al,-0x5(%rbp)
je     112c <is_power_of_two+0x2c>
mov    -0x4(%rbp),%eax
mov    -0x4(%rbp),%ecx
sub    $0x1,%ecx
and    %ecx,%eax
cmp    $0x0,%eax
setne  %al
xor    $0xff,%al
mov    %al,-0x5(%rbp)
mov    -0x5(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<is_power_of_two>:
test   %edi,%edi
je     110f <is_power_of_two+0xf>
lea    -0x1(%rdi),%ecx
xor    %eax,%eax
test   %ecx,%edi
sete   %al
ret
xor    %eax,%eax
ret

LLVM IR (-O0):
define i32 @is_power_of_two(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = icmp ne i32 %3, 0
br i1 %4, label %5, label %12
5: ; preds = %1
%6 = load i32, i32* %2
%7 = load i32, i32* %2
%8 = sub i32 %7, 1
%9 = and i32 %6, %8
%10 = icmp ne i32 %9, 0
%11 = xor i1 %10, true
br label %12
12: ; preds = %5, %1
%13 = phi i1 [ false, %1 ], [ %11, %5 ]
%14 = zext i1 %13 to i32
ret i32 %14
}

LLVM IR (-O2):
define i32 @is_power_of_two(i32 %0) {
%2 = icmp eq i32 %0, 0
br i1 %2, label %7, label %3
3: ; preds = %1
%4 = tail call i32 @llvm.ctpop.i32(i32 %0)
%5 = icmp ult i32 %4, 2
%6 = zext i1 %5 to i32
br label %7
7: ; preds = %3, %1
%8 = phi i32 [ 0, %1 ], [ %6, %3 ]
ret i32 %8
}
/* Type definitions */
struct imv_window {
  int dummy;
};

/* Variables and functions */
bool imv_window_get_mouse_button(struct imv_window *window, int button) {
  (void)window;
  (void)button;
  return false;
}


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

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

LLVM IR (-O0):
%struct.imv_window = type { i32 }
define i32 @imv_window_get_mouse_button(%struct.imv_window* %0, i32 %1) {
%3 = alloca %struct.imv_window*
%4 = alloca i32
store %struct.imv_window* %0, %struct.imv_window** %3
store i32 %1, i32* %4
%5 = load %struct.imv_window*, %struct.imv_window** %3
%6 = load i32, i32* %4
ret i32 0
}

LLVM IR (-O2):
%struct.imv_window = type { i32 }
define i32 @imv_window_get_mouse_button(%struct.imv_window* nocapture readnone %0, i32 %1) {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
void xdbg_sample_panic(int code) {
  1 ? 0 : ("@vmeta>> finished (FAIL: exit abnormal)\n");
  exit(code);
}


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

x86 assembly (clang, -O2):
<xdbg_sample_panic>:
push   %rax
call   1030 <exit@plt>

LLVM IR (-O0):
define void @xdbg_sample_panic(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = call i32 @exit(i32 %3)
unreachable
}

LLVM IR (-O2):
define void @xdbg_sample_panic(i32 %0) {
%2 = tail call i32 @exit(i32 %0)
unreachable
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void loop_signal_handler_usr2(int signal_number) {
  (void)(signal_number);
  printf("Got SIGUSR2.\n");
}


x86 assembly (clang, -O0):
<loop_signal_handler_usr2>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
lea    0xede(%rip),%rdi
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
@.str = [14 x i8] c"Got SIGUSR2.\0A\00"
define void @loop_signal_handler_usr2(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = call i32 @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@str = [13 x i8] c"Got SIGUSR2.\00"
define void @loop_signal_handler_usr2(i32 %0) {
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([13 x i8], [13 x i8]* @str, i64 0, i64 0))
ret void
}
/* Variables and functions */
scalar_t__ suite_profiler();
int main(int argc, char **argv) {
  int status = 0;
  status += suite_profiler();
  return status;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
mov    $0x0,%al
call   1030 <suite_profiler@plt>
mov    %rax,%rcx
movslq -0x14(%rbp),%rax
add    %rcx,%rax
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i32
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
store i32 0, i32* %6
%7 = call i64 (...) @suite_profiler()
%8 = load i32, i32* %6
%9 = sext i32 %8 to i64
%10 = add nsw i64 %9, %7
%11 = trunc i64 %10 to i32
store i32 %11, i32* %6
%12 = load i32, i32* %6
ret i32 %12
}

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i64 (...) @suite_profiler()
%4 = trunc i64 %3 to i32
ret i32 %4
}
int check_prime(int num) {
  if (num == 0)
    return 0;
  int i, c = 0;
  for (i = 2; i < num; i++) {
    if (num % i == 0)
      return 0;
  }
  return num;
}


x86 assembly (clang, -O0):
<check_prime>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
cmpl   $0x0,-0x8(%rbp)
jne    111d <check_prime+0x1d>
movl   $0x0,-0x4(%rbp)
jmp    116c <check_prime+0x6c>
movl   $0x0,-0x10(%rbp)
movl   $0x2,-0xc(%rbp)
mov    -0xc(%rbp),%eax
cmp    -0x8(%rbp),%eax
jge    1166 <check_prime+0x66>
mov    -0x8(%rbp),%eax
cltd
idivl  -0xc(%rbp)
cmp    $0x0,%edx
jne    1153 <check_prime+0x53>
movl   $0x0,-0x4(%rbp)
jmp    116c <check_prime+0x6c>
jmp    1158 <check_prime+0x58>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    112b <check_prime+0x2b>
mov    -0x8(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<check_prime>:
xor    %ecx,%ecx
test   %edi,%edi
je     1123 <check_prime+0x23>
cmp    $0x3,%edi
jl     1120 <check_prime+0x20>
mov    $0x2,%esi
mov    %edi,%eax
cltd
idiv   %esi
test   %edx,%edx
je     1123 <check_prime+0x23>
add    $0x1,%esi
cmp    %esi,%edi
jne    1110 <check_prime+0x10>
mov    %edi,%eax
ret
mov    %ecx,%eax
ret

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

LLVM IR (-O2):
define i32 @check_prime(i32 %0) {
%2 = icmp eq i32 %0, 0
br i1 %2, label %12, label %3
3: ; preds = %1
%4 = icmp sgt i32 %0, 2
br i1 %4, label %7, label %12
5: ; preds = %7
%6 = icmp eq i32 %11, %0
br i1 %6, label %12, label %7
7: ; preds = %3, %5
%8 = phi i32 [ %11, %5 ], [ 2, %3 ]
%9 = srem i32 %0, %8
%10 = icmp eq i32 %9, 0
%11 = add nuw nsw i32 %8, 1
br i1 %10, label %12, label %5
12: ; preds = %5, %7, %3, %1
%13 = phi i32 [ 0, %1 ], [ %0, %3 ], [ %0, %5 ], [ 0, %7 ]
ret i32 %13
}
void XtConvertAndStore() {}


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

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

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

LLVM IR (-O2):
define void @XtConvertAndStore() {
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ __m256i;

/* Variables and functions */
int /*<<< orphan*/ filter_16_2t_pixels(int /*<<< orphan*/ const *,
                                       int /*<<< orphan*/ const *,
                                       int /*<<< orphan*/ *,
                                       int /*<<< orphan*/ *);
void filter_16x2_2t_pixels(const __m256i *sig, const __m256i *f, __m256i *y0,
                           __m256i *y1) {
  filter_16_2t_pixels(sig, f, y0, y1);
}


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

x86 assembly (clang, -O2):
<filter_16x2_2t_pixels>:
jmp    1030 <filter_16_2t_pixels@plt>

LLVM IR (-O0):
define void @filter_16x2_2t_pixels(i32* %0, i32* %1, i32* %2, i32* %3) {
%5 = alloca i32*
%6 = alloca i32*
%7 = alloca i32*
%8 = alloca i32*
store i32* %0, i32** %5
store i32* %1, i32** %6
store i32* %2, i32** %7
store i32* %3, i32** %8
%9 = load i32*, i32** %5
%10 = load i32*, i32** %6
%11 = load i32*, i32** %7
%12 = load i32*, i32** %8
%13 = call i32 @filter_16_2t_pixels(i32* %9, i32* %10, i32* %11, i32* %12)
ret void
}

LLVM IR (-O2):
define void @filter_16x2_2t_pixels(i32* %0, i32* %1, i32* %2, i32* %3) {
%5 = tail call i32 @filter_16_2t_pixels(i32* %0, i32* %1, i32* %2, i32* %3)
ret void
}