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

/* Variables and functions */
int /*<<< orphan*/ free(struct _stor_fwritesnap_rsp *);
void stor_fwritesnap_rsp_free(struct _stor_fwritesnap_rsp *ptr) { free(ptr); }


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

x86 assembly (clang, -O2):
<stor_fwritesnap_rsp_free>:
jmp    1030 <free@plt>

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

LLVM IR (-O2):
%struct._stor_fwritesnap_rsp = type { i32 }
define void @stor_fwritesnap_rsp_free(%struct._stor_fwritesnap_rsp* nocapture %0) {
%2 = tail call i32 @free(%struct._stor_fwritesnap_rsp* %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ clear_io_bit(int, int);
void TOSH_MAKE_YELLOW_LED_INPUT() { clear_io_bit(0x39, 5); }


x86 assembly (clang, -O0):
<TOSH_MAKE_YELLOW_LED_INPUT>:
push   %rbp
mov    %rsp,%rbp
mov    $0x39,%edi
mov    $0x5,%esi
call   1030 <clear_io_bit@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<TOSH_MAKE_YELLOW_LED_INPUT>:
mov    $0x39,%edi
mov    $0x5,%esi
jmp    1030 <clear_io_bit@plt>

LLVM IR (-O0):
define void @TOSH_MAKE_YELLOW_LED_INPUT() {
%1 = call i32 @clear_io_bit(i32 57, i32 5)
ret void
}

LLVM IR (-O2):
define void @TOSH_MAKE_YELLOW_LED_INPUT() {
%1 = tail call i32 @clear_io_bit(i32 57, i32 5)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void test1() { printf("Hello, World!\n"); }


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

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

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

LLVM IR (-O2):
@str = [14 x i8] c"Hello, World!\00"
define void @test1() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([14 x i8], [14 x i8]* @str, i64 0, i64 0))
ret void
}
double r3(void *x) { return *(double *)(x + 32765); }


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

x86 assembly (clang, -O2):
<r3>:
movsd  0x7ffd(%rdi),%xmm0
ret

LLVM IR (-O0):
define double @r3(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = getelementptr i8, i8* %3, i64 32765
%5 = bitcast i8* %4 to double*
%6 = load double, double* %5
ret double %6
}

LLVM IR (-O2):
define double @r3(i8* nocapture %0) {
%2 = getelementptr i8, i8* %0, i64 32765
%3 = bitcast i8* %2 to double*
%4 = load double, double* %3
ret double %4
}
void DPMSQueryExtension() {}


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

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

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

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

/* Variables and functions */
int /*<<< orphan*/ _mm_cmpgt_epi16(int /*<<< orphan*/, int /*<<< orphan*/);
int /*<<< orphan*/ _mm_setzero_si128();
int /*<<< orphan*/ _mm_unpacklo_epi16(int /*<<< orphan*/, int /*<<< orphan*/);
extern __attribute__((__gnu___, __always___, __artificial__)) __m128i
_MM_CVTEPI16_EPI32(__m128i a) {
  __m128i zero = _mm_setzero_si128();
  __m128i sign = _mm_cmpgt_epi16(zero, a);
  return _mm_unpacklo_epi16(a, sign);
}


x86 assembly (clang, -O0):
<_MM_CVTEPI16_EPI32>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    $0x0,%al
call   1030 <_mm_setzero_si128@plt>
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%edi
mov    -0x4(%rbp),%esi
call   1040 <_mm_cmpgt_epi16@plt>
mov    %eax,-0xc(%rbp)
mov    -0x4(%rbp),%edi
mov    -0xc(%rbp),%esi
call   1050 <_mm_unpacklo_epi16@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<_MM_CVTEPI16_EPI32>:
push   %rbx
mov    %edi,%ebx
xor    %eax,%eax
call   1030 <_mm_setzero_si128@plt>
mov    %eax,%edi
mov    %ebx,%esi
call   1040 <_mm_cmpgt_epi16@plt>
mov    %ebx,%edi
mov    %eax,%esi
pop    %rbx
jmp    1050 <_mm_unpacklo_epi16@plt>

LLVM IR (-O0):
define i32 @_MM_CVTEPI16_EPI32(i32 %0) {
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %2
%5 = call i32 (...) @_mm_setzero_si128()
store i32 %5, i32* %3
%6 = load i32, i32* %3
%7 = load i32, i32* %2
%8 = call i32 @_mm_cmpgt_epi16(i32 %6, i32 %7)
store i32 %8, i32* %4
%9 = load i32, i32* %2
%10 = load i32, i32* %4
%11 = call i32 @_mm_unpacklo_epi16(i32 %9, i32 %10)
ret i32 %11
}

LLVM IR (-O2):
define i32 @_MM_CVTEPI16_EPI32(i32 %0) {
%2 = tail call i32 (...) @_mm_setzero_si128()
%3 = tail call i32 @_mm_cmpgt_epi16(i32 %2, i32 %0)
%4 = tail call i32 @_mm_unpacklo_epi16(i32 %0, i32 %3)
ret i32 %4
}
void wr_banner() {}


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

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

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

LLVM IR (-O2):
define void @wr_banner() {
ret void
}
int test_imm_B7int64_highword_mem(long long *val) {
  return ((*val >> 32) & (0xB7 << 0)) ? -20 : -40;
}


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

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

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

LLVM IR (-O2):
define i32 @test_imm_B7int64_highword_mem(i64* nocapture %0) {
%2 = load i64, i64* %0
%3 = and i64 %2, 785979015168
%4 = icmp eq i64 %3, 0
%5 = select i1 %4, i32 -40, i32 -20
ret i32 %5
}
int main() { return -4; }


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
movl   $0x0,-0x4(%rbp)
mov    $0xfffffffc,%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @main() {
ret i32 -4
}
/* Type definitions */
typedef int uint8_t;
typedef int int16_t;

/* Variables and functions */
void int16ToBuf(int16_t val, uint8_t *buf) {
  buf[0] = (val >> 8) & 0xff;
  buf[1] = (val >> 0) & 0xff;
}


x86 assembly (clang, -O0):
<int16ToBuf>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x4(%rbp),%ecx
sar    $0x8,%ecx
and    $0xff,%ecx
mov    -0x10(%rbp),%rax
mov    %ecx,(%rax)
mov    -0x4(%rbp),%ecx
sar    $0x0,%ecx
and    $0xff,%ecx
mov    -0x10(%rbp),%rax
mov    %ecx,0x4(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<int16ToBuf>:
mov    %edi,%eax
movzbl %ah,%ecx
mov    %ecx,(%rsi)
movzbl %al,%eax
mov    %eax,0x4(%rsi)
ret

LLVM IR (-O0):
define void @int16ToBuf(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 = ashr i32 %5, 8
%7 = and i32 %6, 255
%8 = load i32*, i32** %4
%9 = getelementptr inbounds i32, i32* %8, i64 0
store i32 %7, i32* %9
%10 = load i32, i32* %3
%11 = ashr i32 %10, 0
%12 = and i32 %11, 255
%13 = load i32*, i32** %4
%14 = getelementptr inbounds i32, i32* %13, i64 1
store i32 %12, i32* %14
ret void
}

LLVM IR (-O2):
define void @int16ToBuf(i32 %0, i32* nocapture writeonly %1) {
%3 = lshr i32 %0, 8
%4 = and i32 %3, 255
store i32 %4, i32* %1
%5 = and i32 %0, 255
%6 = getelementptr inbounds i32, i32* %1, i64 1
store i32 %5, i32* %6
ret void
}
int do_092() { return 92; }


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

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

LLVM IR (-O0):
define i32 @do_092() {
ret i32 92
}

LLVM IR (-O2):
define i32 @do_092() {
ret i32 92
}
/* Variables and functions */
int EXIT_SUCCESS;
int /*<<< orphan*/ system(char *);
int idevice_id() {
  system("clear; idevice_id");
  return EXIT_SUCCESS;
}


x86 assembly (clang, -O0):
<idevice_id>:
push   %rbp
mov    %rsp,%rbp
lea    0xee5(%rip),%rdi
call   1030 <system@plt>
mov    0x2eb9(%rip),%rax
mov    (%rax),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<idevice_id>:
push   %rax
lea    0xee8(%rip),%rdi
call   1030 <system@plt>
mov    0x2ebc(%rip),%rax
mov    (%rax),%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [18 x i8] c"clear; idevice_id\00"
@EXIT_SUCCESS = global i32 0
define i32 @idevice_id() {
%1 = call i32 @system(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0))
%2 = load i32, i32* @EXIT_SUCCESS
ret i32 %2
}

LLVM IR (-O2):
@.str = [18 x i8] c"clear; idevice_id\00"
@EXIT_SUCCESS = global i32 0
define i32 @idevice_id() {
%1 = tail call i32 @system(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0))
%2 = load i32, i32* @EXIT_SUCCESS
ret i32 %2
}
/* Type definitions */
typedef scalar_t__ int64_t;

/* Variables and functions */
int compare_ints(const void *a, const void *b) {
  const int64_t *da = (const int64_t *)a;
  const int64_t *db = (const int64_t *)b;
  return (*da > *db) - (*db > *da);
}


x86 assembly (clang, -O0):
<compare_ints>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x20(%rbp)
mov    -0x18(%rbp),%rax
mov    (%rax),%rax
mov    -0x20(%rbp),%rcx
cmp    (%rcx),%rax
setg   %al
and    $0x1,%al
movzbl %al,%eax
mov    -0x20(%rbp),%rcx
mov    (%rcx),%rcx
mov    -0x18(%rbp),%rdx
cmp    (%rdx),%rcx
setg   %cl
and    $0x1,%cl
movzbl %cl,%ecx
sub    %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<compare_ints>:
mov    (%rdi),%rcx
mov    (%rsi),%rdx
xor    %eax,%eax
xor    %esi,%esi
cmp    %rdx,%rcx
setg   %al
setl   %sil
sub    %esi,%eax
ret

LLVM IR (-O0):
define i32 @compare_ints(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
%5 = alloca i64*
%6 = alloca i64*
store i8* %0, i8** %3
store i8* %1, i8** %4
%7 = load i8*, i8** %3
%8 = bitcast i8* %7 to i64*
store i64* %8, i64** %5
%9 = load i8*, i8** %4
%10 = bitcast i8* %9 to i64*
store i64* %10, i64** %6
%11 = load i64*, i64** %5
%12 = load i64, i64* %11
%13 = load i64*, i64** %6
%14 = load i64, i64* %13
%15 = icmp sgt i64 %12, %14
%16 = zext i1 %15 to i32
%17 = load i64*, i64** %6
%18 = load i64, i64* %17
%19 = load i64*, i64** %5
%20 = load i64, i64* %19
%21 = icmp sgt i64 %18, %20
%22 = zext i1 %21 to i32
%23 = sub nsw i32 %16, %22
ret i32 %23
}

LLVM IR (-O2):
define i32 @compare_ints(i8* nocapture %0, i8* nocapture %1) {
%3 = bitcast i8* %0 to i64*
%4 = bitcast i8* %1 to i64*
%5 = load i64, i64* %3
%6 = load i64, i64* %4
%7 = icmp sgt i64 %5, %6
%8 = zext i1 %7 to i32
%9 = icmp sgt i64 %6, %5
%10 = sext i1 %9 to i32
%11 = add nsw i32 %10, %8
ret i32 %11
}
/* Type definitions */
typedef int /*<<< orphan*/ EVP_MD;

/* Variables and functions */
int ecdh_KDF_X9_63(unsigned char *, size_t, unsigned char const *, size_t,
                   unsigned char const *, size_t, int /*<<< orphan*/ const *);
int ECDH_KDF_X9_62(unsigned char *out, size_t outlen, const unsigned char *Z,
                   size_t Zlen, const unsigned char *sinfo, size_t sinfolen,
                   const EVP_MD *md) {
  return ecdh_KDF_X9_63(out, outlen, Z, Zlen, sinfo, sinfolen, md);
}


x86 assembly (clang, -O0):
<ECDH_KDF_X9_62>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
mov    0x10(%rbp),%rax
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    %r8,-0x28(%rbp)
mov    %r9,-0x30(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
mov    -0x20(%rbp),%rcx
mov    -0x28(%rbp),%r8
mov    -0x30(%rbp),%r9
mov    0x10(%rbp),%rax
mov    %rax,(%rsp)
call   1030 <ecdh_KDF_X9_63@plt>
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ECDH_KDF_X9_62>:
jmp    1030 <ecdh_KDF_X9_63@plt>

LLVM IR (-O0):
define i32 @ECDH_KDF_X9_62(i8* %0, i64 %1, i8* %2, i64 %3, i8* %4, i64 %5, i32* %6) {
%8 = alloca i8*
%9 = alloca i64
%10 = alloca i8*
%11 = alloca i64
%12 = alloca i8*
%13 = alloca i64
%14 = alloca i32*
store i8* %0, i8** %8
store i64 %1, i64* %9
store i8* %2, i8** %10
store i64 %3, i64* %11
store i8* %4, i8** %12
store i64 %5, i64* %13
store i32* %6, i32** %14
%15 = load i8*, i8** %8
%16 = load i64, i64* %9
%17 = load i8*, i8** %10
%18 = load i64, i64* %11
%19 = load i8*, i8** %12
%20 = load i64, i64* %13
%21 = load i32*, i32** %14
%22 = call i32 @ecdh_KDF_X9_63(i8* %15, i64 %16, i8* %17, i64 %18, i8* %19, i64 %20, i32* %21)
ret i32 %22
}

LLVM IR (-O2):
define i32 @ECDH_KDF_X9_62(i8* %0, i64 %1, i8* %2, i64 %3, i8* %4, i64 %5, i32* %6) {
%8 = tail call i32 @ecdh_KDF_X9_63(i8* %0, i64 %1, i8* %2, i64 %3, i8* %4, i64 %5, i32* %6)
ret i32 %8
}
void XtProcessUnlock() {}


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

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

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

LLVM IR (-O2):
define void @XtProcessUnlock() {
ret void
}
int little_p0() {
  int a;
  unsigned char *b;
  a = 1;
  b = (unsigned char *)&a;
  return (*b) != 0;
}


x86 assembly (clang, -O0):
<little_p0>:
push   %rbp
mov    %rsp,%rbp
movl   $0x1,-0x4(%rbp)
lea    -0x4(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
movzbl (%rax),%eax
cmp    $0x0,%eax
setne  %al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @little_p0() {
%1 = alloca i32
%2 = alloca i8*
store i32 1, i32* %1
%3 = bitcast i32* %1 to i8*
store i8* %3, i8** %2
%4 = load i8*, i8** %2
%5 = load i8, i8* %4
%6 = zext i8 %5 to i32
%7 = icmp ne i32 %6, 0
%8 = zext i1 %7 to i32
ret i32 %8
}

LLVM IR (-O2):
define i32 @little_p0() {
ret i32 1
}
unsigned int htonl(unsigned int x) {
  return ((x & 0x000000ff) << 24) | ((x & 0x0000ff00) << 8) |
         ((x & 0x00ff0000) >> 8) | ((x & 0xff000000) >> 24);
}


x86 assembly (clang, -O0):
<htonl>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
and    $0xff,%eax
shl    $0x18,%eax
mov    -0x4(%rbp),%ecx
and    $0xff00,%ecx
shl    $0x8,%ecx
or     %ecx,%eax
mov    -0x4(%rbp),%ecx
and    $0xff0000,%ecx
shr    $0x8,%ecx
or     %ecx,%eax
mov    -0x4(%rbp),%ecx
and    $0xff000000,%ecx
shr    $0x18,%ecx
or     %ecx,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @htonl(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = and i32 %3, 255
%5 = shl i32 %4, 24
%6 = load i32, i32* %2
%7 = and i32 %6, 65280
%8 = shl i32 %7, 8
%9 = or i32 %5, %8
%10 = load i32, i32* %2
%11 = and i32 %10, 16711680
%12 = lshr i32 %11, 8
%13 = or i32 %9, %12
%14 = load i32, i32* %2
%15 = and i32 %14, -16777216
%16 = lshr i32 %15, 24
%17 = or i32 %13, %16
ret i32 %17
}

LLVM IR (-O2):
define i32 @htonl(i32 %0) {
%2 = tail call i32 @llvm.bswap.i32(i32 %0)
ret i32 %2
}
/* Variables and functions */
int /*<<< orphan*/ system(char *);
int main() {
  system("sudo apt-get update && apt-get install dd ddrescue pv");
  return 0;
}


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

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

LLVM IR (-O0):
@.str = [54 x i8] c"sudo apt-get update && apt-get install dd ddrescue pv\00"
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 @system(i8* getelementptr inbounds ([54 x i8], [54 x i8]* @.str, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@.str = [54 x i8] c"sudo apt-get update && apt-get install dd ddrescue pv\00"
define i32 @main() {
%1 = tail call i32 @system(i8* getelementptr inbounds ([54 x i8], [54 x i8]* @.str, i64 0, i64 0))
ret i32 0
}
void foo698(int p) {}


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

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

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

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

/* Variables and functions */
int trace_read_int(int /*<<< orphan*/ *);
int task_dline(FILE *f) { return trace_read_int(f); }


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

x86 assembly (clang, -O2):
<task_dline>:
jmp    1030 <trace_read_int@plt>

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

LLVM IR (-O2):
define i32 @task_dline(i32* %0) {
%2 = tail call i32 @trace_read_int(i32* %0)
ret i32 %2
}
/* Variables and functions */
unsigned int submask_unzip(unsigned int);
unsigned int submask_firstip(unsigned int ip, unsigned int mask) {
  unsigned int network = ip & mask;
  unsigned int firstipadd = network + 1;
  return submask_unzip(firstipadd);
}


x86 assembly (clang, -O0):
<submask_firstip>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
and    -0x8(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
mov    -0x10(%rbp),%edi
call   1030 <submask_unzip@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<submask_firstip>:
and    %esi,%edi
add    $0x1,%edi
jmp    1030 <submask_unzip@plt>

LLVM IR (-O0):
define i32 @submask_firstip(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* %4
%9 = and i32 %7, %8
store i32 %9, i32* %5
%10 = load i32, i32* %5
%11 = add i32 %10, 1
store i32 %11, i32* %6
%12 = load i32, i32* %6
%13 = call i32 @submask_unzip(i32 %12)
ret i32 %13
}

LLVM IR (-O2):
define i32 @submask_firstip(i32 %0, i32 %1) {
%3 = and i32 %1, %0
%4 = add i32 %3, 1
%5 = tail call i32 @submask_unzip(i32 %4)
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int test_bit(int bit_array[], unsigned bit_number) {
  int ArraySize = 1000;
  if (bit_number > ArraySize) {
    printf("the second parameter is too big! The set_bit function can not "
           "accept it!\n\n");
    return 0;
  }
  if (bit_array[bit_number] != 0) {
    return 1;
  } else {
    return 0;
  }
  return 0;
}


x86 assembly (clang, -O0):
<test_bit>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    %esi,-0x14(%rbp)
movl   $0x3e8,-0x18(%rbp)
mov    -0x14(%rbp),%eax
cmp    -0x18(%rbp),%eax
jbe    114a <test_bit+0x3a>
lea    0xec7(%rip),%rdi
call   1030 <printf@plt>
movl   $0x0,-0x4(%rbp)
jmp    116e <test_bit+0x5e>
mov    -0x10(%rbp),%rax
mov    -0x14(%rbp),%ecx
cmpl   $0x0,(%rax,%rcx,4)
je     1167 <test_bit+0x57>
movl   $0x1,-0x4(%rbp)
jmp    116e <test_bit+0x5e>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_bit>:
push   %rax
cmp    $0x3e9,%esi
jb     1129 <test_bit+0x19>
lea    0xee0(%rip),%rdi
call   1030 <puts@plt>
xor    %eax,%eax
pop    %rcx
ret
mov    %esi,%ecx
xor    %eax,%eax
cmpl   $0x0,(%rdi,%rcx,4)
setne  %al
pop    %rcx
ret

LLVM IR (-O0):
@.str = [75 x i8] c"the second parameter is too big! The set_bit function can not accept it!\0A\0A\00"
define i32 @test_bit(i32* %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32*
%5 = alloca i32
%6 = alloca i32
store i32* %0, i32** %4
store i32 %1, i32* %5
store i32 1000, i32* %6
%7 = load i32, i32* %5
%8 = load i32, i32* %6
%9 = icmp ugt i32 %7, %8
br i1 %9, label %10, label %12
10: ; preds = %2
%11 = call i32 @printf(i8* getelementptr inbounds ([75 x i8], [75 x i8]* @.str, i64 0, i64 0))
store i32 0, i32* %3
br label %21
12: ; preds = %2
%13 = load i32*, i32** %4
%14 = load i32, i32* %5
%15 = zext i32 %14 to i64
%16 = getelementptr inbounds i32, i32* %13, i64 %15
%17 = load i32, i32* %16
%18 = icmp ne i32 %17, 0
br i1 %18, label %19, label %20
19: ; preds = %12
store i32 1, i32* %3
br label %21
20: ; preds = %12
store i32 0, i32* %3
br label %21
21: ; preds = %20, %19, %10
%22 = load i32, i32* %3
ret i32 %22
}

LLVM IR (-O2):
@str = [74 x i8] c"the second parameter is too big! The set_bit function can not accept it!\0A\00"
define i32 @test_bit(i32* nocapture %0, i32 %1) {
%3 = icmp ugt i32 %1, 1000
br i1 %3, label %4, label %6
4: ; preds = %2
%5 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([74 x i8], [74 x i8]* @str, i64 0, i64 0))
br label %12
6: ; preds = %2
%7 = zext i32 %1 to i64
%8 = getelementptr inbounds i32, i32* %0, i64 %7
%9 = load i32, i32* %8
%10 = icmp ne i32 %9, 0
%11 = zext i1 %10 to i32
br label %12
12: ; preds = %6, %4
%13 = phi i32 [ 0, %4 ], [ %11, %6 ]
ret i32 %13
}
int foo2(int a, int b, int c, int d) {
  int e = 5;
  return a + c + e;
}


x86 assembly (clang, -O0):
<foo2>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    %ecx,-0x10(%rbp)
movl   $0x5,-0x14(%rbp)
mov    -0x4(%rbp),%eax
add    -0xc(%rbp),%eax
add    -0x14(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<foo2>:
lea    (%rdi,%rdx,1),%eax
add    $0x5,%eax
ret

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

LLVM IR (-O2):
define i32 @foo2(i32 %0, i32 %1, i32 %2, i32 %3) {
%5 = add i32 %0, 5
%6 = add i32 %5, %2
ret i32 %6
}
/* Type definitions */
typedef scalar_t__ __x;
typedef int __u32;

/* Variables and functions */
__u32 __fswahb32(__u32 x) {
  return ({
    __u32 __x = (x);
    ((__u32)((((__u32)(__x) & (__u32)0x00ff00ffUL) << 8) |
             (((__u32)(__x) & (__u32)0xff00ff00UL) >> 8)));
  });
}


x86 assembly (clang, -O0):
<__fswahb32>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
and    $0xff00ff,%eax
shl    $0x8,%eax
mov    -0x8(%rbp),%ecx
and    $0xff00ff00,%ecx
sar    $0x8,%ecx
or     %ecx,%eax
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<__fswahb32>:
mov    %edi,%eax
shl    $0x8,%eax
and    $0xff00ff00,%eax
sar    $0x8,%edi
and    $0xffff00ff,%edi
or     %edi,%eax
ret

LLVM IR (-O0):
define i32 @__fswahb32(i32 %0) {
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %2
%5 = load i32, i32* %2
store i32 %5, i32* %3
%6 = load i32, i32* %3
%7 = and i32 %6, 16711935
%8 = shl i32 %7, 8
%9 = load i32, i32* %3
%10 = and i32 %9, -16711936
%11 = ashr i32 %10, 8
%12 = or i32 %8, %11
store i32 %12, i32* %4
%13 = load i32, i32* %4
ret i32 %13
}

LLVM IR (-O2):
define i32 @__fswahb32(i32 %0) {
%2 = shl i32 %0, 8
%3 = and i32 %2, -16711936
%4 = ashr i32 %0, 8
%5 = and i32 %4, -65281
%6 = or i32 %3, %5
ret i32 %6
}
int main() {
  int arg1 = 56;
  int arg2 = 20;
  int arg3 = 21;
  int calc = 0;
  __asm__("addl %%ebx, %%eax;"
          "subl %%ecx, %%eax;"
          : "=a"(calc)
          : "a"(arg1), "b"(arg2), "c"(arg3));
  return calc;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
push   %rbx
movl   $0x0,-0xc(%rbp)
movl   $0x38,-0x10(%rbp)
movl   $0x14,-0x14(%rbp)
movl   $0x15,-0x18(%rbp)
movl   $0x0,-0x1c(%rbp)
mov    -0x10(%rbp),%eax
mov    -0x14(%rbp),%ebx
mov    -0x18(%rbp),%ecx
add    %ebx,%eax
sub    %ecx,%eax
mov    %eax,-0x1c(%rbp)
mov    -0x1c(%rbp),%eax
pop    %rbx
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
mov    $0x38,%eax
mov    $0x14,%ebx
mov    $0x15,%ecx
add    %ebx,%eax
sub    %ecx,%eax
pop    %rbx
ret

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
store i32 0, i32* %1
store i32 56, i32* %2
store i32 20, i32* %3
store i32 21, i32* %4
store i32 0, i32* %5
%6 = load i32, i32* %2
%7 = load i32, i32* %3
%8 = load i32, i32* %4
%9 = call i32 asm "addl %ebx, %eax;subl %ecx, %eax;", "={ax},{ax},{bx},{cx},~{dirflag},~{fpsr},~{flags}"(i32 %6, i32 %7, i32 %8)
store i32 %9, i32* %5
%10 = load i32, i32* %5
ret i32 %10
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 asm "addl %ebx, %eax;subl %ecx, %eax;", "={ax},{ax},{bx},{cx},~{dirflag},~{fpsr},~{flags}"(i32 56, i32 20, i32 21)
ret i32 %1
}
/* Variables and functions */
int /*<<< orphan*/ free(char *);
char *free_and_assign(char *dest, char *src) {
  free(dest);
  return src;
}


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

x86 assembly (clang, -O2):
<free_and_assign>:
push   %rbx
mov    %rsi,%rbx
call   1030 <free@plt>
mov    %rbx,%rax
pop    %rbx
ret

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

LLVM IR (-O2):
define i8* @free_and_assign(i8* nocapture %0, i8* readnone returned %1) {
%3 = tail call i32 @free(i8* %0)
ret i8* %1
}
void spellcheck_destroy(void *chk) {}


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

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

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

LLVM IR (-O2):
define void @spellcheck_destroy(i8* nocapture %0) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ isascii(int);
void t_isascii_0xb3() {
  Assert_real((isascii(179) == 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_isascii.c",
              900, ("isascii should be 0 for 0xb3"));
}


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

x86 assembly (clang, -O2):
<t_isascii_0xb3>:
push   %rax
mov    $0xb3,%edi
call   1030 <isascii@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf66(%rip),%rcx
mov    $0x384,%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_isascii.c\00"
@.str.1 = [29 x i8] c"isascii should be 0 for 0xb3\00"
define void @t_isascii_0xb3() {
%1 = call i64 @isascii(i32 179)
%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 900, 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_isascii.c\00"
@.str.1 = [29 x i8] c"isascii should be 0 for 0xb3\00"
define void @t_isascii_0xb3() {
%1 = tail call i64 @isascii(i32 179)
%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 900, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0))
ret void
}
long giInterlockedDecrement(volatile long *p) {
  return __sync_sub_and_fetch(p, 1L);
}


x86 assembly (clang, -O0):
<giInterlockedDecrement>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rcx
mov    $0xffffffffffffffff,%rax
lock xadd %rax,(%rcx)
sub    $0x1,%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<giInterlockedDecrement>:
mov    $0xffffffffffffffff,%rax
lock xadd %rax,(%rdi)
add    $0xffffffffffffffff,%rax
ret

LLVM IR (-O0):
define i64 @giInterlockedDecrement(i64* %0) {
%2 = alloca i64*
store i64* %0, i64** %2
%3 = load i64*, i64** %2
%4 = atomicrmw sub i64* %3, i64 1 seq_cst
%5 = sub i64 %4, 1
ret i64 %5
}

LLVM IR (-O2):
define i64 @giInterlockedDecrement(i64* nocapture %0) {
%2 = atomicrmw sub i64* %0, i64 1 seq_cst
%3 = add i64 %2, -1
ret i64 %3
}
/* Variables and functions */
int /*<<< orphan*/ detab(char *, char *);
int getline(char *, int);
int /*<<< orphan*/ printf(char *, char *);
int main() {
  int len;
  char sintabs[1000];
  char input[1000];
  while ((len = getline(input, 1000)) > 0) {
    detab(sintabs, input);
    printf("%s", sintabs);
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x7e0,%rsp
movl   $0x0,-0x4(%rbp)
lea    -0x7e0(%rbp),%rdi
mov    $0x3e8,%esi
call   1050 <getline@plt>
mov    %eax,-0x8(%rbp)
cmp    $0x0,%eax
jle    118a <main+0x5a>
lea    -0x3f0(%rbp),%rdi
lea    -0x7e0(%rbp),%rsi
call   1030 <detab@plt>
lea    -0x3f0(%rbp),%rsi
lea    0xe80(%rip),%rdi
call   1040 <printf@plt>
jmp    1142 <main+0x12>
xor    %eax,%eax
add    $0x7e0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r15
push   %r14
push   %rbx
sub    $0x7e0,%rsp
mov    %rsp,%rdi
mov    $0x3e8,%esi
call   1050 <getline@plt>
test   %eax,%eax
jle    1187 <main+0x57>
lea    0x3f0(%rsp),%r14
mov    %rsp,%rbx
lea    0xea1(%rip),%r15
nop
mov    %r14,%rdi
mov    %rbx,%rsi
call   1030 <detab@plt>
mov    %r15,%rdi
mov    %r14,%rsi
call   1040 <printf@plt>
mov    %rbx,%rdi
mov    $0x3e8,%esi
call   1050 <getline@plt>
test   %eax,%eax
jg     1160 <main+0x30>
xor    %eax,%eax
add    $0x7e0,%rsp
pop    %rbx
pop    %r14
pop    %r15
ret

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

LLVM IR (-O2):
@.str = [3 x i8] c"%s\00"
define i32 @main() {
%1 = alloca [1000 x i8]
%2 = alloca [1000 x i8]
%3 = getelementptr inbounds [1000 x i8], [1000 x i8]* %1, i64 0, i64 0
%4 = getelementptr inbounds [1000 x i8], [1000 x i8]* %2, i64 0, i64 0
%5 = call i32 @getline(i8* %4, i32 1000)
%6 = icmp sgt i32 %5, 0
br i1 %6, label %7, label %12
7: ; preds = %0, %7
%8 = call i32 @detab(i8* %3, i8* %4)
%9 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* %3)
%10 = call i32 @getline(i8* %4, i32 1000)
%11 = icmp sgt i32 %10, 0
br i1 %11, label %7, label %12
12: ; preds = %7, %0
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ snprintf(char *, int, char *, int);
int /*<<< orphan*/ stack_push(char *);
void push_stack_int(int arg) {
  char retval[255] = {'\0'};
  snprintf(retval, 255 - 2, "%d", arg);
  stack_push(retval);
}


x86 assembly (clang, -O0):
<push_stack_int>:
push   %rbp
mov    %rsp,%rbp
sub    $0x110,%rsp
mov    %edi,-0x4(%rbp)
lea    -0x110(%rbp),%rdi
xor    %esi,%esi
mov    $0xff,%edx
call   1040 <memset@plt>
lea    -0x110(%rbp),%rdi
mov    -0x4(%rbp),%ecx
mov    $0xfd,%esi
lea    0xe99(%rip),%rdx
call   1030 <snprintf@plt>
lea    -0x110(%rbp),%rdi
call   1050 <stack_push@plt>
add    $0x110,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<push_stack_int>:
push   %rbx
sub    $0x100,%rsp
mov    %edi,%ecx
xorps  %xmm0,%xmm0
movups %xmm0,0xef(%rsp)
movaps %xmm0,0xe0(%rsp)
movaps %xmm0,0xd0(%rsp)
movaps %xmm0,0xc0(%rsp)
movaps %xmm0,0xb0(%rsp)
movaps %xmm0,0xa0(%rsp)
movaps %xmm0,0x90(%rsp)
movaps %xmm0,0x80(%rsp)
movaps %xmm0,0x70(%rsp)
movaps %xmm0,0x60(%rsp)
movaps %xmm0,0x50(%rsp)
movaps %xmm0,0x40(%rsp)
movaps %xmm0,0x30(%rsp)
movaps %xmm0,0x20(%rsp)
movaps %xmm0,0x10(%rsp)
movaps %xmm0,(%rsp)
lea    0xe65(%rip),%rdx
mov    %rsp,%rbx
mov    %rbx,%rdi
mov    $0xfd,%esi
call   1030 <snprintf@plt>
mov    %rbx,%rdi
call   1040 <stack_push@plt>
add    $0x100,%rsp
pop    %rbx
ret

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

LLVM IR (-O2):
@.str = [3 x i8] c"%d\00"
define void @push_stack_int(i32 %0) {
%2 = alloca [255 x i8]
%3 = getelementptr inbounds [255 x i8], [255 x i8]* %2, i64 0, i64 0
%4 = call i32 @snprintf(i8* %3, i32 253, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 %0)
%5 = call i32 @stack_push(i8* %3)
ret void
}
int suite_all(struct ctest *t) { return 1; }


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

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

LLVM IR (-O0):
%struct.ctest = type opaque
define i32 @suite_all(%struct.ctest* %0) {
%2 = alloca %struct.ctest*
store %struct.ctest* %0, %struct.ctest** %2
ret i32 1
}

LLVM IR (-O2):
%struct.ctest = type opaque
define i32 @suite_all(%struct.ctest* nocapture readnone %0) {
ret i32 1
}
int fun1126() { return 1126; }


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

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

LLVM IR (-O0):
define i32 @fun1126() {
ret i32 1126
}

LLVM IR (-O2):
define i32 @fun1126() {
ret i32 1126
}
int ft_str_is_printable(char *str) {
  char *tmp;
  tmp = str;
  while (*tmp) {
    if (*tmp < ' ' || *tmp > '~')
      return (0);
    tmp++;
  }
  return (1);
}


x86 assembly (clang, -O0):
<ft_str_is_printable>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rax
cmpb   $0x0,(%rax)
je     115a <ft_str_is_printable+0x5a>
mov    -0x18(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x20,%eax
jl     113d <ft_str_is_printable+0x3d>
mov    -0x18(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x7e,%eax
jle    1149 <ft_str_is_printable+0x49>
movl   $0x0,-0x4(%rbp)
jmp    1161 <ft_str_is_printable+0x61>
mov    -0x18(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x18(%rbp)
jmp    1110 <ft_str_is_printable+0x10>
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<ft_str_is_printable>:
mov    (%rdi),%cl
mov    $0x1,%eax
test   %cl,%cl
je     1123 <ft_str_is_printable+0x23>
add    $0x1,%rdi
nop
add    $0x81,%cl
cmp    $0xa0,%cl
jbe    1124 <ft_str_is_printable+0x24>
movzbl (%rdi),%ecx
add    $0x1,%rdi
test   %cl,%cl
jne    1110 <ft_str_is_printable+0x10>
ret
xor    %eax,%eax
ret

LLVM IR (-O0):
define i32 @ft_str_is_printable(i8* %0) {
%2 = alloca i32
%3 = alloca i8*
%4 = alloca i8*
store i8* %0, i8** %3
%5 = load i8*, i8** %3
store i8* %5, i8** %4
br label %6
6: ; preds = %21, %1
%7 = load i8*, i8** %4
%8 = load i8, i8* %7
%9 = icmp ne i8 %8, 0
br i1 %9, label %10, label %24
10: ; preds = %6
%11 = load i8*, i8** %4
%12 = load i8, i8* %11
%13 = sext i8 %12 to i32
%14 = icmp slt i32 %13, 32
br i1 %14, label %20, label %15
15: ; preds = %10
%16 = load i8*, i8** %4
%17 = load i8, i8* %16
%18 = sext i8 %17 to i32
%19 = icmp sgt i32 %18, 126
br i1 %19, label %20, label %21
20: ; preds = %15, %10
store i32 0, i32* %2
br label %25
21: ; preds = %15
%22 = load i8*, i8** %4
%23 = getelementptr inbounds i8, i8* %22, i32 1
store i8* %23, i8** %4
br label %6
24: ; preds = %6
store i32 1, i32* %2
br label %25
25: ; preds = %24, %20
%26 = load i32, i32* %2
ret i32 %26
}

LLVM IR (-O2):
define i32 @ft_str_is_printable(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = icmp eq i8 %2, 0
br i1 %3, label %13, label %7
4: ; preds = %7
%5 = load i8, i8* %12
%6 = icmp eq i8 %5, 0
br i1 %6, label %13, label %7
7: ; preds = %1, %4
%8 = phi i8 [ %5, %4 ], [ %2, %1 ]
%9 = phi i8* [ %12, %4 ], [ %0, %1 ]
%10 = add i8 %8, -127
%11 = icmp ult i8 %10, -95
%12 = getelementptr inbounds i8, i8* %9, i64 1
br i1 %11, label %13, label %4
13: ; preds = %7, %4, %1
%14 = phi i32 [ 1, %1 ], [ 1, %4 ], [ 0, %7 ]
ret i32 %14
}
__attribute__((always_)) void flush_icache_page(struct vm_area_struct *vma,
                                                struct page *page) {}


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

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

LLVM IR (-O0):
%struct.vm_area_struct = type opaque
%struct.page = type opaque
define void @flush_icache_page(%struct.vm_area_struct* %0, %struct.page* %1) {
%3 = alloca %struct.vm_area_struct*
%4 = alloca %struct.page*
store %struct.vm_area_struct* %0, %struct.vm_area_struct** %3
store %struct.page* %1, %struct.page** %4
ret void
}

LLVM IR (-O2):
%struct.vm_area_struct = type opaque
%struct.page = type opaque
define void @flush_icache_page(%struct.vm_area_struct* nocapture %0, %struct.page* nocapture %1) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ notify_pvcall(char *);
int pvSendMailboxBytes(char byBoardNum, char *pData, short wNumBytes) {
  notify_pvcall("f");
  return (0);
}


x86 assembly (clang, -O0):
<pvSendMailboxBytes>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %dx,%ax
mov    %dil,%cl
mov    %cl,-0x1(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %ax,-0x12(%rbp)
lea    0xed0(%rip),%rdi
call   1030 <notify_pvcall@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
@.str = [2 x i8] c"f\00"
define i32 @pvSendMailboxBytes(i8 signext %0, i8* %1, i16 signext %2) {
%4 = alloca i8
%5 = alloca i8*
%6 = alloca i16
store i8 %0, i8* %4
store i8* %1, i8** %5
store i16 %2, i16* %6
%7 = call i32 @notify_pvcall(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@.str = [2 x i8] c"f\00"
define i32 @pvSendMailboxBytes(i8 signext %0, i8* nocapture readnone %1, i16 signext %2) {
%4 = tail call i32 @notify_pvcall(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
ret i32 0
}
double absd(double x) { return (x >= 0) ? x : x * -1.; }


x86 assembly (clang, -O0):
<absd>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
xorps  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jb     112a <absd+0x2a>
movsd  -0x8(%rbp),%xmm0
movsd  %xmm0,-0x10(%rbp)
jmp    113c <absd+0x3c>
movsd  0xece(%rip),%xmm0
mulsd  -0x8(%rbp),%xmm0
movsd  %xmm0,-0x10(%rbp)
movsd  -0x10(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<absd>:
movapd 0xef8(%rip),%xmm1
xorpd  %xmm0,%xmm1
xorpd  %xmm2,%xmm2
cmplesd %xmm0,%xmm2
andpd  %xmm2,%xmm0
andnpd %xmm1,%xmm2
orpd   %xmm2,%xmm0
ret

LLVM IR (-O0):
define double @absd(double %0) {
%2 = alloca double
store double %0, double* %2
%3 = load double, double* %2
%4 = fcmp oge double %3, 0.000000e+00
br i1 %4, label %5, label %7
5: ; preds = %1
%6 = load double, double* %2
br label %10
7: ; preds = %1
%8 = load double, double* %2
%9 = fmul double %8, -1.000000e+00
br label %10
10: ; preds = %7, %5
%11 = phi double [ %6, %5 ], [ %9, %7 ]
ret double %11
}

LLVM IR (-O2):
define double @absd(double %0) {
%2 = fcmp oge double %0, 0.000000e+00
%3 = fneg double %0
%4 = select i1 %2, double %0, double %3
ret double %4
}
/* Variables and functions */
int /*<<< orphan*/ permutation(char *, int /*<<< orphan*/, scalar_t__);
scalar_t__ strlen(char *);
int main(int argc0, char const *argv[]) {
  char a[] = "()()()";
  permutation(a, 0, strlen(a) - 1);
  return 0;
}


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)
mov    0xec4(%rip),%eax
mov    %eax,-0x17(%rbp)
mov    0xebe(%rip),%ax
mov    %ax,-0x13(%rbp)
mov    0xeb6(%rip),%al
mov    %al,-0x11(%rbp)
lea    -0x17(%rbp),%rax
mov    %rax,-0x20(%rbp)
lea    -0x17(%rbp),%rdi
call   1030 <strlen@plt>
mov    -0x20(%rbp),%rdi
mov    %rax,%rdx
sub    $0x1,%rdx
xor    %esi,%esi
call   1040 <permutation@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x10,%rsp
movl   $0x292829,0xb(%rsp)
movl   $0x29282928,0x8(%rsp)
29
lea    0x8(%rsp),%rbx
mov    %rbx,%rdi
call   1030 <strlen@plt>
lea    -0x1(%rax),%rdx
mov    %rbx,%rdi
xor    %esi,%esi
call   1040 <permutation@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@__const.main.a = [7 x i8] c"()()()\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca [7 x i8]
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%7 = bitcast [7 x i8]* %6 to i8*
%8 = getelementptr inbounds [7 x i8], [7 x i8]* %6, i64 0, i64 0
%9 = getelementptr inbounds [7 x i8], [7 x i8]* %6, i64 0, i64 0
%10 = call i64 @strlen(i8* %9)
%11 = sub nsw i64 %10, 1
%12 = call i32 @permutation(i8* %8, i32 0, i64 %11)
ret i32 0
}

LLVM IR (-O2):
@__const.main.a = [7 x i8] c"()()()\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = alloca [7 x i8]
%4 = getelementptr inbounds [7 x i8], [7 x i8]* %3, i64 0, i64 0
%5 = call i64 @strlen(i8* %4)
%6 = add nsw i64 %5, -1
%7 = call i32 @permutation(i8* %4, i32 0, i64 %6)
ret i32 0
}
main(int argc, char *argv[]) {}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
xor    %eax,%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture readnone %1) {
ret i32 0
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
size_t fread(void *, size_t, size_t, int /*<<< orphan*/ *);
size_t internalFread(void *ptr, size_t size, size_t count, void *userPtr) {
  return fread(ptr, size, count, (FILE *)userPtr);
}


x86 assembly (clang, -O0):
<internalFread>:
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 <fread@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<internalFread>:
jmp    1030 <fread@plt>

LLVM IR (-O0):
define i64 @internalFread(i8* %0, i64 %1, i64 %2, i8* %3) {
%5 = alloca i8*
%6 = alloca i64
%7 = alloca i64
%8 = alloca i8*
store i8* %0, i8** %5
store i64 %1, i64* %6
store i64 %2, i64* %7
store i8* %3, i8** %8
%9 = load i8*, i8** %5
%10 = load i64, i64* %6
%11 = load i64, i64* %7
%12 = load i8*, i8** %8
%13 = bitcast i8* %12 to i32*
%14 = call i64 @fread(i8* %9, i64 %10, i64 %11, i32* %13)
ret i64 %14
}

LLVM IR (-O2):
define i64 @internalFread(i8* nocapture %0, i64 %1, i64 %2, i8* nocapture %3) {
%5 = bitcast i8* %3 to i32*
%6 = tail call i64 @fread(i8* %0, i64 %1, i64 %2, i32* %5)
ret i64 %6
}
void RTStrToInt32(void) {}


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

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

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

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


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

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

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

LLVM IR (-O2):
define void @XcmsTekHVCToCIEuvY() {
ret void
}
float maths_deg_to_rad(float i) { return (3.141592653589793f / 180.0f) * i; }


x86 assembly (clang, -O0):
<maths_deg_to_rad>:
push   %rbp
mov    %rsp,%rbp
movss  %xmm0,-0x4(%rbp)
movss  0xeef(%rip),%xmm0
mulss  -0x4(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<maths_deg_to_rad>:
mulss  0xef8(%rip),%xmm0
ret

LLVM IR (-O0):
define float @maths_deg_to_rad(float %0) {
%2 = alloca float
store float %0, float* %2
%3 = load float, float* %2
%4 = fmul float 0x3F91DF46A0000000, %3
ret float %4
}

LLVM IR (-O2):
define float @maths_deg_to_rad(float %0) {
%2 = fmul float %0, 0x3F91DF46A0000000
ret float %2
}
/* Variables and functions */
int openRepFile(char const *);
int initRepFile(const char *path) { return openRepFile(path); }


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

x86 assembly (clang, -O2):
<initRepFile>:
jmp    1030 <openRepFile@plt>

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

LLVM IR (-O2):
define i32 @initRepFile(i8* %0) {
%2 = tail call i32 @openRepFile(i8* %0)
ret i32 %2
}
void __DELETE_java_nio_charset_CoderResult(void *me, void *client_data) {}


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

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

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

LLVM IR (-O2):
define void @__DELETE_java_nio_charset_CoderResult(i8* nocapture %0, i8* nocapture %1) {
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ wint_t;

/* Variables and functions */
int iswalpha(int /*<<< orphan*/);
int main() {
  int i = iswalpha((wint_t)0);
  (void)i;
  return 0;
}


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

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

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

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