xunge/DecIR huggingface dataset:
/* Type definitions */
typedef int /*<<< orphan*/ __m128i;

/* Variables and functions */
int /*<<< orphan*/ idct16_8col(int /*<<< orphan*/ *const,
                               int /*<<< orphan*/ *const);
int /*<<< orphan*/ transpose_16bit_16x16(int /*<<< orphan*/ *const,
                                         int /*<<< orphan*/ *const);
void idct16_sse2(__m128i *const in0, __m128i *const in1) {
  transpose_16bit_16x16(in0, in1);
  idct16_8col(in0, in0);
  idct16_8col(in1, in1);
}


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

x86 assembly (clang, -O2):
<idct16_sse2>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%r14
mov    %rdi,%rbx
call   1030 <transpose_16bit_16x16@plt>
mov    %rbx,%rdi
mov    %rbx,%rsi
call   1040 <idct16_8col@plt>
mov    %r14,%rdi
mov    %r14,%rsi
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1040 <idct16_8col@plt>

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

LLVM IR (-O2):
define void @idct16_sse2(i32* %0, i32* %1) {
%3 = tail call i32 @transpose_16bit_16x16(i32* %0, i32* %1)
%4 = tail call i32 @idct16_8col(i32* %0, i32* %0)
%5 = tail call i32 @idct16_8col(i32* %1, i32* %1)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ notify_pvcall(char *);
int pvSetFrameOrientation(char byBoardNum, long dwFrameOrientation) {
  notify_pvcall("f");
  return (0);
}


x86 assembly (clang, -O0):
<pvSetFrameOrientation>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %dil,%al
mov    %al,-0x1(%rbp)
mov    %rsi,-0x10(%rbp)
lea    0xed7(%rip),%rdi
call   1030 <notify_pvcall@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<pvSetFrameOrientation>:
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 @pvSetFrameOrientation(i8 signext %0, i64 %1) {
%3 = alloca i8
%4 = alloca i64
store i8 %0, i8* %3
store i64 %1, i64* %4
%5 = 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 @pvSetFrameOrientation(i8 signext %0, i64 %1) {
%3 = tail call i32 @notify_pvcall(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
ret i32 0
}
/* Type definitions */
struct IQIndex {
  int dummy;
};
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
struct IQIndex *IQIndexLoad(int /*<<< orphan*/);
int /*<<< orphan*/ fileno(int /*<<< orphan*/ *);
struct IQIndex *IQIndexFload(FILE *fp) {
  return IQIndexLoad(fileno(fp));
}


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

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

LLVM IR (-O0):
%struct.IQIndex = type { i32 }
define %struct.IQIndex* @IQIndexFload(i32* %0) {
%2 = alloca i32*
store i32* %0, i32** %2
%3 = load i32*, i32** %2
%4 = call i32 @fileno(i32* %3)
%5 = call %struct.IQIndex* @IQIndexLoad(i32 %4)
ret %struct.IQIndex* %5
}

LLVM IR (-O2):
%struct.IQIndex = type { i32 }
define %struct.IQIndex* @IQIndexFload(i32* nocapture %0) {
%2 = tail call i32 @fileno(i32* %0)
%3 = tail call %struct.IQIndex* @IQIndexLoad(i32 %2)
ret %struct.IQIndex* %3
}
double test3(double x) { return __builtin_sin(x); }


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

x86 assembly (clang, -O2):
<test3>:
jmp    1030 <sin@plt>

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

LLVM IR (-O2):
define double @test3(double %0) {
%2 = tail call double @sin(double %0)
ret double %2
}
/* Type definitions */
typedef int /*<<< orphan*/ id_t;

/* Variables and functions */
int syscall(int, int, int /*<<< orphan*/, int);
int setpriority(int which, id_t who, int prio) {
  return syscall(97, which, who, prio);
}


x86 assembly (clang, -O0):
<setpriority>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    -0x4(%rbp),%esi
mov    -0x8(%rbp),%edx
mov    -0xc(%rbp),%ecx
mov    $0x61,%edi
call   1030 <syscall@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<setpriority>:
mov    %edx,%ecx
mov    %esi,%edx
mov    %edi,%esi
mov    $0x61,%edi
jmp    1030 <syscall@plt>

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

LLVM IR (-O2):
define i32 @setpriority(i32 %0, i32 %1, i32 %2) {
%4 = tail call i32 @syscall(i32 97, i32 %0, i32 %1, i32 %2)
ret i32 %4
}
/* Type definitions */
typedef int /*<<< orphan*/ SHA_CTX;

/* Variables and functions */
int /*<<< orphan*/ SHA1_Final(unsigned char *, int /*<<< orphan*/ *);
int /*<<< orphan*/ SHA1_Init(int /*<<< orphan*/ *);
int /*<<< orphan*/ SHA1_Update(int /*<<< orphan*/ *, char const *,
                               unsigned int);
void hashsg_init(const char *src, unsigned int len, char *buffer) {
  SHA_CTX ctx[1];
  SHA1_Init(ctx);
  SHA1_Update(ctx, src, len);
  SHA1_Final((unsigned char *)buffer, ctx);
}


x86 assembly (clang, -O0):
<hashsg_init>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %rdx,-0x18(%rbp)
lea    -0x1c(%rbp),%rdi
call   1040 <SHA1_Init@plt>
lea    -0x1c(%rbp),%rdi
mov    -0x8(%rbp),%rsi
mov    -0xc(%rbp),%edx
call   1030 <SHA1_Update@plt>
mov    -0x18(%rbp),%rdi
lea    -0x1c(%rbp),%rsi
call   1050 <SHA1_Final@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<hashsg_init>:
push   %rbp
push   %r15
push   %r14
push   %rbx
push   %rax
mov    %rdx,%r14
mov    %esi,%ebp
mov    %rdi,%rbx
lea    0x4(%rsp),%r15
mov    %r15,%rdi
call   1040 <SHA1_Init@plt>
mov    %r15,%rdi
mov    %rbx,%rsi
mov    %ebp,%edx
call   1030 <SHA1_Update@plt>
mov    %r14,%rdi
mov    %r15,%rsi
call   1050 <SHA1_Final@plt>
add    $0x8,%rsp
pop    %rbx
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
define void @hashsg_init(i8* %0, i32 %1, i8* %2) {
%4 = alloca i8*
%5 = alloca i32
%6 = alloca i8*
%7 = alloca [1 x i32]
store i8* %0, i8** %4
store i32 %1, i32* %5
store i8* %2, i8** %6
%8 = getelementptr inbounds [1 x i32], [1 x i32]* %7, i64 0, i64 0
%9 = call i32 @SHA1_Init(i32* %8)
%10 = getelementptr inbounds [1 x i32], [1 x i32]* %7, i64 0, i64 0
%11 = load i8*, i8** %4
%12 = load i32, i32* %5
%13 = call i32 @SHA1_Update(i32* %10, i8* %11, i32 %12)
%14 = load i8*, i8** %6
%15 = getelementptr inbounds [1 x i32], [1 x i32]* %7, i64 0, i64 0
%16 = call i32 @SHA1_Final(i8* %14, i32* %15)
ret void
}

LLVM IR (-O2):
define void @hashsg_init(i8* %0, i32 %1, i8* %2) {
%4 = alloca [1 x i32]
%5 = bitcast [1 x i32]* %4 to i8*
%6 = getelementptr inbounds [1 x i32], [1 x i32]* %4, i64 0, i64 0
%7 = call i32 @SHA1_Init(i32* %6)
%8 = call i32 @SHA1_Update(i32* %6, i8* %0, i32 %1)
%9 = call i32 @SHA1_Final(i8* %2, i32* %6)
ret void
}
int ioCanDeletePathOfSize(char *pathString, int pathStringLength) { return 1; }


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

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

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

LLVM IR (-O2):
define i32 @ioCanDeletePathOfSize(i8* nocapture readnone %0, i32 %1) {
ret i32 1
}
/* Type definitions */
struct sockaddr_in {
  int dummy;
};
struct sockaddr {
  int dummy;
};
typedef int /*<<< orphan*/ ssize_t;

/* Variables and functions */
int /*<<< orphan*/ sendto(int, void *, size_t, int /*<<< orphan*/,
                          struct sockaddr *, int);
ssize_t udp_write(int fd, void *buffer, size_t count,
                  const struct sockaddr_in *addr) {
  return sendto(fd, buffer, count, 0, (struct sockaddr *)addr, sizeof(*addr));
}


x86 assembly (clang, -O0):
<udp_write>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
mov    -0x20(%rbp),%r8
xor    %ecx,%ecx
mov    $0x4,%r9d
call   1030 <sendto@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<udp_write>:
mov    %rcx,%r8
xor    %ecx,%ecx
mov    $0x4,%r9d
jmp    1030 <sendto@plt>

LLVM IR (-O0):
%struct.sockaddr_in = type { i32 }
%struct.sockaddr = type { i32 }
define i32 @udp_write(i32 %0, i8* %1, i64 %2, %struct.sockaddr_in* %3) {
%5 = alloca i32
%6 = alloca i8*
%7 = alloca i64
%8 = alloca %struct.sockaddr_in*
store i32 %0, i32* %5
store i8* %1, i8** %6
store i64 %2, i64* %7
store %struct.sockaddr_in* %3, %struct.sockaddr_in** %8
%9 = load i32, i32* %5
%10 = load i8*, i8** %6
%11 = load i64, i64* %7
%12 = load %struct.sockaddr_in*, %struct.sockaddr_in** %8
%13 = bitcast %struct.sockaddr_in* %12 to %struct.sockaddr*
%14 = call i32 @sendto(i32 %9, i8* %10, i64 %11, i32 0, %struct.sockaddr* %13, i32 4)
ret i32 %14
}

LLVM IR (-O2):
%struct.sockaddr_in = type { i32 }
%struct.sockaddr = type { i32 }
define i32 @udp_write(i32 %0, i8* %1, i64 %2, %struct.sockaddr_in* %3) {
%5 = bitcast %struct.sockaddr_in* %3 to %struct.sockaddr*
%6 = tail call i32 @sendto(i32 %0, i8* %1, i64 %2, i32 0, %struct.sockaddr* %5, i32 4)
ret i32 %6
}
void test_failure(void) {
  subtest_start_specific(__FUNCTION__);
  subtest_finish_specific(__FUNCTION__);
}


x86 assembly (clang, -O0):
<test_failure>:
push   %rbp
mov    %rsp,%rbp
lea    0xed5(%rip),%rdi
mov    $0x0,%al
call   1030 <subtest_start_specific@plt>
lea    0xec7(%rip),%rdi
mov    $0x0,%al
call   1040 <subtest_finish_specific@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_failure>:
push   %rbx
lea    0xed8(%rip),%rbx
mov    %rbx,%rdi
xor    %eax,%eax
call   1030 <subtest_start_specific@plt>
mov    %rbx,%rdi
xor    %eax,%eax
pop    %rbx
jmp    1040 <subtest_finish_specific@plt>

LLVM IR (-O0):
@__FUNCTION__.test_failure = [13 x i8] c"test_failure\00"
define void @test_failure() {
%1 = call i32 (i8*, ...) bitcast (i32 (...)* @subtest_start_specific to i32 (i8*, ...)*)(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @__FUNCTION__.test_failure, i64 0, i64 0))
%2 = call i32 (i8*, ...) bitcast (i32 (...)* @subtest_finish_specific to i32 (i8*, ...)*)(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @__FUNCTION__.test_failure, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@__FUNCTION__.test_failure = [13 x i8] c"test_failure\00"
define void @test_failure() {
%1 = tail call i32 (i8*, ...) bitcast (i32 (...)* @subtest_start_specific to i32 (i8*, ...)*)(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @__FUNCTION__.test_failure, i64 0, i64 0))
%2 = tail call i32 (i8*, ...) bitcast (i32 (...)* @subtest_finish_specific to i32 (i8*, ...)*)(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @__FUNCTION__.test_failure, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ memcpy(float *, float const *, int);
void m44f_copy(float *dst, const float *src) {
  memcpy(dst, src, sizeof(float) * 16);
}


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

x86 assembly (clang, -O2):
<m44f_copy>:
mov    $0x40,%edx
jmp    1030 <memcpy@plt>

LLVM IR (-O0):
define void @m44f_copy(float* %0, float* %1) {
%3 = alloca float*
%4 = alloca float*
store float* %0, float** %3
store float* %1, float** %4
%5 = load float*, float** %3
%6 = load float*, float** %4
%7 = call i32 @memcpy(float* %5, float* %6, i32 64)
ret void
}

LLVM IR (-O2):
define void @m44f_copy(float* %0, float* %1) {
%3 = tail call i32 @memcpy(float* %0, float* %1, i32 64)
ret void
}
/* Variables and functions */
int /*<<< orphan*/
_test_consulta_debe_permitir_consultar_un_elemento_sin_sacarlo();
int /*<<< orphan*/
_test_pone_y_saca_deben_permitir_poner_y_sacar_elementos_de_la_pila();
int /*<<< orphan*/ _test_vacia_debe_indicar_si_la_pila_esta_vacia();
void pilae_tests() {
  _test_vacia_debe_indicar_si_la_pila_esta_vacia();
  _test_pone_y_saca_deben_permitir_poner_y_sacar_elementos_de_la_pila();
  _test_consulta_debe_permitir_consultar_un_elemento_sin_sacarlo();
}


x86 assembly (clang, -O0):
<pilae_tests>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1030 <_test_vacia_debe_indicar_si_la_pila_esta_vacia@plt>
mov    $0x0,%al
call   1040 <_test_pone_y_saca_deben_permitir_poner_y_sacar_elementos_de_la_pila@plt>
mov    $0x0,%al
call   1050 <_test_consulta_debe_permitir_consultar_un_elemento_sin_sacarlo@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<pilae_tests>:
push   %rax
xor    %eax,%eax
call   1030 <_test_vacia_debe_indicar_si_la_pila_esta_vacia@plt>
xor    %eax,%eax
call   1040 <_test_pone_y_saca_deben_permitir_poner_y_sacar_elementos_de_la_pila@plt>
xor    %eax,%eax
pop    %rcx
jmp    1050 <_test_consulta_debe_permitir_consultar_un_elemento_sin_sacarlo@plt>

LLVM IR (-O0):
define void @pilae_tests() {
%1 = call i32 (...) @_test_vacia_debe_indicar_si_la_pila_esta_vacia()
%2 = call i32 (...) @_test_pone_y_saca_deben_permitir_poner_y_sacar_elementos_de_la_pila()
%3 = call i32 (...) @_test_consulta_debe_permitir_consultar_un_elemento_sin_sacarlo()
ret void
}

LLVM IR (-O2):
define void @pilae_tests() {
%1 = tail call i32 (...) @_test_vacia_debe_indicar_si_la_pila_esta_vacia()
%2 = tail call i32 (...) @_test_pone_y_saca_deben_permitir_poner_y_sacar_elementos_de_la_pila()
%3 = tail call i32 (...) @_test_consulta_debe_permitir_consultar_un_elemento_sin_sacarlo()
ret void
}
/* Type definitions */
typedef int int64_t;

/* Variables and functions */
int ex_inquire_internal(int, int, int *, float *, char *);
int64_t ex_inquire_int(int exoid, int req_info) {
  char *cdummy = 0;
  float fdummy = 0;
  int64_t ret_val = 0;
  int error = ex_inquire_internal(exoid, req_info, &ret_val, &fdummy, cdummy);
  if (error < 0)
    ret_val = error;
  return ret_val;
}


x86 assembly (clang, -O0):
<ex_inquire_int>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
movq   $0x0,-0x10(%rbp)
xorps  %xmm0,%xmm0
movss  %xmm0,-0x14(%rbp)
movl   $0x0,-0x18(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x8(%rbp),%esi
mov    -0x10(%rbp),%r8
lea    -0x18(%rbp),%rdx
lea    -0x14(%rbp),%rcx
call   1030 <ex_inquire_internal@plt>
mov    %eax,-0x1c(%rbp)
cmpl   $0x0,-0x1c(%rbp)
jge    115f <ex_inquire_int+0x4f>
mov    -0x1c(%rbp),%eax
mov    %eax,-0x18(%rbp)
mov    -0x18(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ex_inquire_int>:
push   %rax
movl   $0x0,0x4(%rsp)
movl   $0x0,(%rsp)
mov    %rsp,%rdx
lea    0x4(%rsp),%rcx
xor    %r8d,%r8d
call   1030 <ex_inquire_internal@plt>
test   %eax,%eax
js     1137 <ex_inquire_int+0x27>
mov    (%rsp),%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @ex_inquire_int(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8*
%6 = alloca float
%7 = alloca i32
%8 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
store i8* null, i8** %5
store float 0.000000e+00, float* %6
store i32 0, i32* %7
%9 = load i32, i32* %3
%10 = load i32, i32* %4
%11 = load i8*, i8** %5
%12 = call i32 @ex_inquire_internal(i32 %9, i32 %10, i32* %7, float* %6, i8* %11)
store i32 %12, i32* %8
%13 = load i32, i32* %8
%14 = icmp slt i32 %13, 0
br i1 %14, label %15, label %17
15: ; preds = %2
%16 = load i32, i32* %8
store i32 %16, i32* %7
br label %17
17: ; preds = %15, %2
%18 = load i32, i32* %7
ret i32 %18
}

LLVM IR (-O2):
define i32 @ex_inquire_int(i32 %0, i32 %1) {
%3 = alloca float
%4 = alloca i32
%5 = bitcast float* %3 to i8*
store float 0.000000e+00, float* %3
%6 = bitcast i32* %4 to i8*
store i32 0, i32* %4
%7 = call i32 @ex_inquire_internal(i32 %0, i32 %1, i32* %4, float* %3, i8* null)
%8 = icmp slt i32 %7, 0
%9 = load i32, i32* %4
%10 = select i1 %8, i32 %7, i32 %9
ret i32 %10
}
/* Variables and functions */
int d39(int);
int d40(int a) { return d39(d39(a)); }


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

x86 assembly (clang, -O2):
<d40>:
push   %rax
call   1030 <d39@plt>
mov    %eax,%edi
pop    %rax
jmp    1030 <d39@plt>

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

LLVM IR (-O2):
define i32 @d40(i32 %0) {
%2 = tail call i32 @d39(i32 %0)
%3 = tail call i32 @d39(i32 %2)
ret i32 %3
}
int fun679() { return 679; }


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

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

LLVM IR (-O0):
define i32 @fun679() {
ret i32 679
}

LLVM IR (-O2):
define i32 @fun679() {
ret i32 679
}
/* Type definitions */
typedef int /*<<< orphan*/ jmp_buf;

/* Variables and functions */
int /*<<< orphan*/ *exception_env_get();
int /*<<< orphan*/ exception_env_pop();
int /*<<< orphan*/ exception_print_uncaught_message_and_exit();
int /*<<< orphan*/ longjmp(int /*<<< orphan*/, int);
void exception_rethrow(void) {
  jmp_buf *env;
  exception_env_pop();
  if ((env = exception_env_get())) {
    longjmp(*env, 1);
  }
  exception_print_uncaught_message_and_exit();
}


x86 assembly (clang, -O0):
<exception_rethrow>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1050 <exception_env_pop@plt>
mov    $0x0,%al
call   1040 <exception_env_get@plt>
mov    %rax,-0x8(%rbp)
cmp    $0x0,%rax
je     1174 <exception_rethrow+0x34>
mov    -0x8(%rbp),%rax
mov    (%rax),%edi
mov    $0x1,%esi
call   1060 <longjmp@plt>
mov    $0x0,%al
call   1030 <exception_print_uncaught_message_and_exit@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<exception_rethrow>:
push   %rax
xor    %eax,%eax
call   1050 <exception_env_pop@plt>
xor    %eax,%eax
call   1040 <exception_env_get@plt>
test   %rax,%rax
jne    115c <exception_rethrow+0x1c>
xor    %eax,%eax
pop    %rcx
jmp    1030 <exception_print_uncaught_message_and_exit@plt>
mov    (%rax),%edi
mov    $0x1,%esi
call   1060 <longjmp@plt>

LLVM IR (-O0):
define void @exception_rethrow() {
%1 = alloca i32*
%2 = call i32 (...) @exception_env_pop()
%3 = call i32* (...) @exception_env_get()
store i32* %3, i32** %1
%4 = icmp ne i32* %3, null
br i1 %4, label %5, label %9
5: ; preds = %0
%6 = load i32*, i32** %1
%7 = load i32, i32* %6
%8 = call i32 @longjmp(i32 %7, i32 1)
unreachable
9: ; preds = %0
%10 = call i32 (...) @exception_print_uncaught_message_and_exit()
ret void
}

LLVM IR (-O2):
define void @exception_rethrow() {
%1 = tail call i32 (...) @exception_env_pop()
%2 = tail call i32* (...) @exception_env_get()
%3 = icmp eq i32* %2, null
br i1 %3, label %7, label %4
4: ; preds = %0
%5 = load i32, i32* %2
%6 = tail call i32 @longjmp(i32 %5, i32 1)
unreachable
7: ; preds = %0
%8 = tail call i32 (...) @exception_print_uncaught_message_and_exit()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ endOfProcess();
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ putChar(char);
char *receive();
void receiver() {
  char *message;
  message = receive();
  printf("I received the following message: ");
  printf(message);
  putChar('\n');
  putChar('>');
  endOfProcess();
}


x86 assembly (clang, -O0):
<receiver>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1050 <receive@plt>
mov    %rax,-0x8(%rbp)
lea    0xea6(%rip),%rdi
call   1040 <printf@plt>
mov    -0x8(%rbp),%rdi
call   1040 <printf@plt>
mov    $0xa,%edi
call   1060 <putChar@plt>
mov    $0x3e,%edi
call   1060 <putChar@plt>
mov    $0x0,%al
call   1030 <endOfProcess@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<receiver>:
push   %rbx
xor    %eax,%eax
call   1050 <receive@plt>
mov    %rax,%rbx
lea    0xeae(%rip),%rdi
call   1040 <printf@plt>
mov    %rbx,%rdi
call   1040 <printf@plt>
mov    $0xa,%edi
call   1060 <putChar@plt>
mov    $0x3e,%edi
call   1060 <putChar@plt>
xor    %eax,%eax
pop    %rbx
jmp    1030 <endOfProcess@plt>

LLVM IR (-O0):
@.str = [35 x i8] c"I received the following message: \00"
define void @receiver() {
%1 = alloca i8*
%2 = call i8* (...) @receive()
store i8* %2, i8** %1
%3 = call i32 @printf(i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str, i64 0, i64 0))
%4 = load i8*, i8** %1
%5 = call i32 @printf(i8* %4)
%6 = call i32 @putChar(i8 signext 10)
%7 = call i32 @putChar(i8 signext 62)
%8 = call i32 (...) @endOfProcess()
ret void
}

LLVM IR (-O2):
@.str = [35 x i8] c"I received the following message: \00"
define void @receiver() {
%1 = tail call i8* (...) @receive()
%2 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([35 x i8], [35 x i8]* @.str, i64 0, i64 0))
%3 = tail call i32 @printf(i8* dereferenceable(1) %1)
%4 = tail call i32 @putChar(i8 signext 10)
%5 = tail call i32 @putChar(i8 signext 62)
%6 = tail call i32 (...) @endOfProcess()
ret void
}
int feed_device_null_enter(void *const p_context) {
  (void)(p_context);
  return -1;
}


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

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

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

LLVM IR (-O2):
define i32 @feed_device_null_enter(i8* nocapture readnone %0) {
ret i32 -1
}
/* Variables and functions */
int /*<<< orphan*/ EXIT_FAILURE;
int /*<<< orphan*/ EXIT_SUCCESS;
int /*<<< orphan*/ exit(int /*<<< orphan*/);
void check_pid(const int pid) {
  if (pid < 0)
    exit(EXIT_FAILURE);
  if (pid > 0)
    exit(EXIT_SUCCESS);
}


x86 assembly (clang, -O0):
<check_pid>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
cmpl   $0x0,-0x4(%rbp)
jge    1133 <check_pid+0x23>
mov    0x2eb4(%rip),%rax
mov    (%rax),%edi
call   1030 <exit@plt>
cmpl   $0x0,-0x4(%rbp)
jle    114b <check_pid+0x3b>
mov    0x2e94(%rip),%rax
mov    (%rax),%edi
call   1030 <exit@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<check_pid>:
push   %rax
test   %edi,%edi
js     1119 <check_pid+0x9>
jne    1127 <check_pid+0x17>
pop    %rax
ret
mov    0x2ec0(%rip),%rax
mov    (%rax),%edi
call   1030 <exit@plt>
mov    0x2eaa(%rip),%rax
mov    (%rax),%edi
call   1030 <exit@plt>

LLVM IR (-O0):
@EXIT_FAILURE = global i32 0
@EXIT_SUCCESS = global i32 0
define void @check_pid(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = icmp slt i32 %3, 0
br i1 %4, label %5, label %8
5: ; preds = %1
%6 = load i32, i32* @EXIT_FAILURE
%7 = call i32 @exit(i32 %6)
unreachable
8: ; preds = %1
%9 = load i32, i32* %2
%10 = icmp sgt i32 %9, 0
br i1 %10, label %11, label %14
11: ; preds = %8
%12 = load i32, i32* @EXIT_SUCCESS
%13 = call i32 @exit(i32 %12)
unreachable
14: ; preds = %8
ret void
}

LLVM IR (-O2):
@EXIT_FAILURE = global i32 0
@EXIT_SUCCESS = global i32 0
define void @check_pid(i32 %0) {
%2 = icmp slt i32 %0, 0
br i1 %2, label %3, label %6
3: ; preds = %1
%4 = load i32, i32* @EXIT_FAILURE
%5 = tail call i32 @exit(i32 %4)
unreachable
6: ; preds = %1
%7 = icmp eq i32 %0, 0
br i1 %7, label %11, label %8
8: ; preds = %6
%9 = load i32, i32* @EXIT_SUCCESS
%10 = tail call i32 @exit(i32 %9)
unreachable
11: ; preds = %6
ret void
}
/* Variables and functions */
int /*<<< orphan*/ RST(int, int, int);
int /*<<< orphan*/ T_WAIT_UNTIL(int);
void op_0xc7(void) {
  RST(0x00, 5, 8);
  T_WAIT_UNTIL(11);
  return;
}


x86 assembly (clang, -O0):
<op_0xc7>:
push   %rbp
mov    %rsp,%rbp
xor    %edi,%edi
mov    $0x5,%esi
mov    $0x8,%edx
call   1030 <RST@plt>
mov    $0xb,%edi
call   1040 <T_WAIT_UNTIL@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<op_0xc7>:
push   %rax
xor    %edi,%edi
mov    $0x5,%esi
mov    $0x8,%edx
call   1030 <RST@plt>
mov    $0xb,%edi
pop    %rax
jmp    1040 <T_WAIT_UNTIL@plt>

LLVM IR (-O0):
define void @op_0xc7() {
%1 = call i32 @RST(i32 0, i32 5, i32 8)
%2 = call i32 @T_WAIT_UNTIL(i32 11)
ret void
}

LLVM IR (-O2):
define void @op_0xc7() {
%1 = tail call i32 @RST(i32 0, i32 5, i32 8)
%2 = tail call i32 @T_WAIT_UNTIL(i32 11)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ exit(int);
scalar_t__ fclose(int /*<<< orphan*/ *);
int /*<<< orphan*/ perror(char *);
void close_file_or_die(FILE *fp) {
  if (fclose(fp) != 0) {
    perror("fclose");
    exit(1);
  }
}


x86 assembly (clang, -O0):
<close_file_or_die>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <fclose@plt>
cmp    $0x0,%rax
je     1165 <close_file_or_die+0x35>
lea    0xeaa(%rip),%rdi
call   1040 <perror@plt>
mov    $0x1,%edi
call   1050 <exit@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<close_file_or_die>:
push   %rax
call   1030 <fclose@plt>
test   %rax,%rax
jne    113d <close_file_or_die+0xd>
pop    %rax
ret
lea    0xebc(%rip),%rdi
call   1040 <perror@plt>
mov    $0x1,%edi
call   1050 <exit@plt>

LLVM IR (-O0):
@.str = [7 x i8] c"fclose\00"
define void @close_file_or_die(i32* %0) {
%2 = alloca i32*
store i32* %0, i32** %2
%3 = load i32*, i32** %2
%4 = call i64 @fclose(i32* %3)
%5 = icmp ne i64 %4, 0
br i1 %5, label %6, label %9
6: ; preds = %1
%7 = call i32 @perror(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0))
%8 = call i32 @exit(i32 1)
unreachable
9: ; preds = %1
ret void
}

LLVM IR (-O2):
@.str = [7 x i8] c"fclose\00"
define void @close_file_or_die(i32* nocapture %0) {
%2 = tail call i64 @fclose(i32* %0)
%3 = icmp eq i64 %2, 0
br i1 %3, label %7, label %4
4: ; preds = %1
%5 = tail call i32 @perror(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0))
%6 = tail call i32 @exit(i32 1)
unreachable
7: ; preds = %1
ret void
}
/* Type definitions */
struct timeval {
  long tv_usec;
  scalar_t__ tv_sec;
};

/* Variables and functions */
int /*<<< orphan*/ gettimeofday(struct timeval *, int /*<<< orphan*/ *);
long usecs() {
  struct timeval tv;
  gettimeofday(&tv, NULL);
  return ((long)tv.tv_sec * 1000000) + tv.tv_usec;
}


x86 assembly (clang, -O0):
<usecs>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    -0x10(%rbp),%rdi
xor    %eax,%eax
mov    %eax,%esi
call   1030 <gettimeofday@plt>
imul   $0xf4240,-0x8(%rbp),%rax
add    -0x10(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<usecs>:
sub    $0x18,%rsp
lea    0x8(%rsp),%rdi
xor    %esi,%esi
call   1030 <gettimeofday@plt>
imul   $0xf4240,0x10(%rsp),%rax
add    0x8(%rsp),%rax
add    $0x18,%rsp
ret

LLVM IR (-O0):
%struct.timeval = type { i64, i64 }
define i64 @usecs() {
%1 = alloca %struct.timeval
%2 = call i32 @gettimeofday(%struct.timeval* %1, i32* null)
%3 = getelementptr inbounds %struct.timeval, %struct.timeval* %1, i32 0, i32 1
%4 = load i64, i64* %3
%5 = mul nsw i64 %4, 1000000
%6 = getelementptr inbounds %struct.timeval, %struct.timeval* %1, i32 0, i32 0
%7 = load i64, i64* %6
%8 = add nsw i64 %5, %7
ret i64 %8
}

LLVM IR (-O2):
%struct.timeval = type { i64, i64 }
define i64 @usecs() {
%1 = alloca %struct.timeval
%2 = bitcast %struct.timeval* %1 to i8*
%3 = call i32 @gettimeofday(%struct.timeval* %1, i32* null)
%4 = getelementptr inbounds %struct.timeval, %struct.timeval* %1, i64 0, i32 1
%5 = load i64, i64* %4
%6 = mul nsw i64 %5, 1000000
%7 = getelementptr inbounds %struct.timeval, %struct.timeval* %1, i64 0, i32 0
%8 = load i64, i64* %7
%9 = add nsw i64 %6, %8
ret i64 %9
}
/* Type definitions */
typedef scalar_t__ int64_t;

/* Variables and functions */
scalar_t__ floorf(float const);
void floor_l_s(const float *source, int64_t *dest) {
  *dest = (int64_t)floorf(*source);
}


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

x86 assembly (clang, -O2):
<floor_l_s>:
push   %rbx
mov    %rsi,%rbx
movss  (%rdi),%xmm0
call   1030 <floorf@plt>
mov    %rax,(%rbx)
pop    %rbx
ret

LLVM IR (-O0):
define void @floor_l_s(float* %0, i64* %1) {
%3 = alloca float*
%4 = alloca i64*
store float* %0, float** %3
store i64* %1, i64** %4
%5 = load float*, float** %3
%6 = load float, float* %5
%7 = call i64 @floorf(float %6)
%8 = load i64*, i64** %4
store i64 %7, i64* %8
ret void
}

LLVM IR (-O2):
define void @floor_l_s(float* nocapture %0, i64* nocapture writeonly %1) {
%3 = load float, float* %0
%4 = tail call i64 @floorf(float %3)
store i64 %4, i64* %1
ret void
}
int little_endian(void) {
  unsigned char *m = (unsigned char *)"\x00\x00\x00\x01";
  return (*((unsigned int *)(m)) >> 24);
}


x86 assembly (clang, -O0):
<little_endian>:
push   %rbp
mov    %rsp,%rbp
lea    0xef5(%rip),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%eax
shr    $0x18,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
@.str = [5 x i8] c"\00\00\00\01\00"
define i32 @little_endian() {
%1 = alloca i8*
store i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i8** %1
%2 = load i8*, i8** %1
%3 = bitcast i8* %2 to i32*
%4 = load i32, i32* %3
%5 = lshr i32 %4, 24
ret i32 %5
}

LLVM IR (-O2):
define i32 @little_endian() {
ret i32 1
}
/* Variables and functions */
int /*<<< orphan*/ clear_io_bit(int, int);
void TOSH_CLR_RFM_TXD_PIN() { clear_io_bit(0x37, 3); }


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

x86 assembly (clang, -O2):
<TOSH_CLR_RFM_TXD_PIN>:
mov    $0x37,%edi
mov    $0x3,%esi
jmp    1030 <clear_io_bit@plt>

LLVM IR (-O0):
define void @TOSH_CLR_RFM_TXD_PIN() {
%1 = call i32 @clear_io_bit(i32 55, i32 3)
ret void
}

LLVM IR (-O2):
define void @TOSH_CLR_RFM_TXD_PIN() {
%1 = tail call i32 @clear_io_bit(i32 55, i32 3)
ret void
}
/* Variables and functions */
float fabsf(float const);
void abs_s(const float *source, float *target) { *target = fabsf(*source); }


x86 assembly (clang, -O0):
<abs_s>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
movss  (%rax),%xmm0
movaps 0xee5(%rip),%xmm1
pand   %xmm1,%xmm0
mov    -0x10(%rbp),%rax
movss  %xmm0,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<abs_s>:
movss  (%rdi),%xmm0
andps  0xef5(%rip),%xmm0
movss  %xmm0,(%rsi)
ret

LLVM IR (-O0):
define void @abs_s(float* %0, float* %1) {
%3 = alloca float*
%4 = alloca float*
store float* %0, float** %3
store float* %1, float** %4
%5 = load float*, float** %3
%6 = load float, float* %5
%7 = call float @llvm.fabs.f32(float %6)
%8 = load float*, float** %4
store float %7, float* %8
ret void
}

LLVM IR (-O2):
define void @abs_s(float* nocapture %0, float* nocapture writeonly %1) {
%3 = load float, float* %0
%4 = tail call float @llvm.fabs.f32(float %3)
store float %4, float* %1
ret void
}
/* Variables and functions */
void *compare_char_context(void) { return NULL; }


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

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

LLVM IR (-O0):
define i8* @compare_char_context() {
ret i8* null
}

LLVM IR (-O2):
define noalias i8* @compare_char_context() {
ret i8* null
}
/* Variables and functions */
scalar_t__ get_byte(char, unsigned int);
void bit_to_pin(char c, unsigned int pos, volatile unsigned char *port,
                unsigned int pin) {
  if (get_byte(c, pos)) {
    *port |= pin;
  } else {
    *port &= ~pin;
  }
}


x86 assembly (clang, -O0):
<bit_to_pin>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %dil,%al
mov    %al,-0x1(%rbp)
mov    %esi,-0x8(%rbp)
mov    %rdx,-0x10(%rbp)
mov    %ecx,-0x14(%rbp)
mov    -0x1(%rbp),%al
mov    -0x8(%rbp),%esi
movsbl %al,%edi
call   1030 <get_byte@plt>
cmp    $0x0,%rax
je     1155 <bit_to_pin+0x45>
mov    -0x14(%rbp),%edx
mov    -0x10(%rbp),%rax
mov    (%rax),%cl
movzbl %cl,%ecx
or     %edx,%ecx
mov    %cl,(%rax)
jmp    1168 <bit_to_pin+0x58>
mov    -0x14(%rbp),%edx
xor    $0xffffffff,%edx
mov    -0x10(%rbp),%rax
mov    (%rax),%cl
movzbl %cl,%ecx
and    %edx,%ecx
mov    %cl,(%rax)
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<bit_to_pin>:
push   %r14
push   %rbx
push   %rax
mov    %ecx,%ebx
mov    %rdx,%r14
call   1030 <get_byte@plt>
mov    (%r14),%cl
mov    %ebx,%edx
not    %dl
and    %cl,%dl
or     %bl,%cl
test   %rax,%rax
movzbl %dl,%eax
movzbl %cl,%ecx
cmove  %eax,%ecx
mov    %cl,(%r14)
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define void @bit_to_pin(i8 signext %0, i32 %1, i8* %2, i32 %3) {
%5 = alloca i8
%6 = alloca i32
%7 = alloca i8*
%8 = alloca i32
store i8 %0, i8* %5
store i32 %1, i32* %6
store i8* %2, i8** %7
store i32 %3, i32* %8
%9 = load i8, i8* %5
%10 = load i32, i32* %6
%11 = call i64 @get_byte(i8 signext %9, i32 %10)
%12 = icmp ne i64 %11, 0
br i1 %12, label %13, label %20
13: ; preds = %4
%14 = load i32, i32* %8
%15 = load i8*, i8** %7
%16 = load volatile i8, i8* %15
%17 = zext i8 %16 to i32
%18 = or i32 %17, %14
%19 = trunc i32 %18 to i8
store volatile i8 %19, i8* %15
br label %28
20: ; preds = %4
%21 = load i32, i32* %8
%22 = xor i32 %21, -1
%23 = load i8*, i8** %7
%24 = load volatile i8, i8* %23
%25 = zext i8 %24 to i32
%26 = and i32 %25, %22
%27 = trunc i32 %26 to i8
store volatile i8 %27, i8* %23
br label %28
28: ; preds = %20, %13
ret void
}

LLVM IR (-O2):
define void @bit_to_pin(i8 signext %0, i32 %1, i8* %2, i32 %3) {
%5 = tail call i64 @get_byte(i8 signext %0, i32 %1)
%6 = icmp eq i64 %5, 0
%7 = load volatile i8, i8* %2
%8 = trunc i32 %3 to i8
%9 = xor i8 %8, -1
%10 = and i8 %7, %9
%11 = or i8 %7, %8
%12 = select i1 %6, i8 %10, i8 %11
store volatile i8 %12, i8* %2
ret void
}
/* Variables and functions */
int /*<<< orphan*/ run_100times(int, int, int);
int main(void) {
  int i = 1, prime_num = 0, prime_100;
  run_100times(i, prime_num, prime_100);
  return 0;
}


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

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

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

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 @run_100times(i32 1, i32 0, i32 undef)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char const *);
void regerror(const char *s) { printf("re error %s\n", s); }


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

x86 assembly (clang, -O2):
<regerror>:
mov    %rdi,%rsi
lea    0xee6(%rip),%rdi
jmp    1030 <printf@plt>

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

LLVM IR (-O2):
@.str = [13 x i8] c"re error %s\0A\00"
define void @regerror(i8* %0) {
%2 = tail call i32 @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0), i8* %0)
ret void
}
/* Variables and functions */
float __nv_cosf(float);
float cosf(float __a) { return __nv_cosf(__a); }


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

x86 assembly (clang, -O2):
<cosf>:
jmp    1030 <__nv_cosf@plt>

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

LLVM IR (-O2):
define float @cosf(float %0) {
%2 = tail call float @__nv_cosf(float %0)
ret float %2
}
int i2c_register_board_info(int busnum, struct i2c_board_info const *info,
                            unsigned n) {
  return 0;
}


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

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

LLVM IR (-O0):
%struct.i2c_board_info = type opaque
define i32 @i2c_register_board_info(i32 %0, %struct.i2c_board_info* %1, i32 %2) {
%4 = alloca i32
%5 = alloca %struct.i2c_board_info*
%6 = alloca i32
store i32 %0, i32* %4
store %struct.i2c_board_info* %1, %struct.i2c_board_info** %5
store i32 %2, i32* %6
ret i32 0
}

LLVM IR (-O2):
%struct.i2c_board_info = type opaque
define i32 @i2c_register_board_info(i32 %0, %struct.i2c_board_info* nocapture readnone %1, i32 %2) {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ puts(char *);
void n_hello_worlds(int n) {
  for (int i = 0; i < n; i += 1) {
    puts("Hello World!");
  }
}


x86 assembly (clang, -O0):
<n_hello_worlds>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
mov    -0x8(%rbp),%eax
cmp    -0x4(%rbp),%eax
jge    1148 <n_hello_worlds+0x38>
lea    0xecb(%rip),%rdi
call   1030 <puts@plt>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1122 <n_hello_worlds+0x12>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<n_hello_worlds>:
push   %r14
push   %rbx
push   %rax
test   %edi,%edi
jle    113d <n_hello_worlds+0x2d>
mov    %edi,%ebx
lea    0xedf(%rip),%r14
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
mov    %r14,%rdi
call   1030 <puts@plt>
add    $0xffffffff,%ebx
jne    1130 <n_hello_worlds+0x20>
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@.str = [13 x i8] c"Hello World!\00"
define void @n_hello_worlds(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %2
store i32 0, i32* %3
br label %4
4: ; preds = %10, %1
%5 = load i32, i32* %3
%6 = load i32, i32* %2
%7 = icmp slt i32 %5, %6
br i1 %7, label %8, label %13
8: ; preds = %4
%9 = call i32 @puts(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0))
br label %10
10: ; preds = %8
%11 = load i32, i32* %3
%12 = add nsw i32 %11, 1
store i32 %12, i32* %3
br label %4
13: ; preds = %4
ret void
}

LLVM IR (-O2):
@.str = [13 x i8] c"Hello World!\00"
define void @n_hello_worlds(i32 %0) {
%2 = icmp sgt i32 %0, 0
br i1 %2, label %4, label %3
3: ; preds = %4, %1
ret void
4: ; preds = %1, %4
%5 = phi i32 [ %7, %4 ], [ 0, %1 ]
%6 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0))
%7 = add nuw nsw i32 %5, 1
%8 = icmp eq i32 %7, %0
br i1 %8, label %3, label %4
}
/* Variables and functions */
size_t heap_left__(size_t idx) { return idx * 2; }


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

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

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

LLVM IR (-O2):
define i64 @heap_left__(i64 %0) {
%2 = shl i64 %0, 1
ret i64 %2
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char *);
char *get_array1(int *, int, int /*<<< orphan*/ *);
int /*<<< orphan*/ stderr;
void rd_loop(int loop[31], FILE *fp) {
  char *cp;
  cp = get_array1(loop, 31, fp);
  if (cp) {
    fprintf(stderr, "convert_epars: \nrd_loop: %s\n", cp);
    exit(1);
  }
  return;
}


x86 assembly (clang, -O0):
<rd_loop>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rdx
mov    $0x1f,%esi
call   1040 <get_array1@plt>
mov    %rax,-0x18(%rbp)
cmpq   $0x0,-0x18(%rbp)
je     1184 <rd_loop+0x54>
mov    0x2e78(%rip),%rax
mov    (%rax),%edi
mov    -0x18(%rbp),%rdx
lea    0xe8b(%rip),%rsi
call   1030 <fprintf@plt>
mov    $0x1,%edi
call   1050 <exit@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<rd_loop>:
push   %rax
mov    %rsi,%rdx
mov    $0x1f,%esi
call   1040 <get_array1@plt>
test   %rax,%rax
jne    1145 <rd_loop+0x15>
pop    %rax
ret
mov    0x2e94(%rip),%rcx
mov    (%rcx),%edi
lea    0xeab(%rip),%rsi
mov    %rax,%rdx
call   1030 <fprintf@plt>
mov    $0x1,%edi
call   1050 <exit@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [29 x i8] c"convert_epars: \0Ard_loop: %s\0A\00"
define void @rd_loop(i32* %0, i32* %1) {
%3 = alloca i32*
%4 = alloca i32*
%5 = alloca i8*
store i32* %0, i32** %3
store i32* %1, i32** %4
%6 = load i32*, i32** %3
%7 = load i32*, i32** %4
%8 = call i8* @get_array1(i32* %6, i32 31, i32* %7)
store i8* %8, i8** %5
%9 = load i8*, i8** %5
%10 = icmp ne i8* %9, null
br i1 %10, label %11, label %16
11: ; preds = %2
%12 = load i32, i32* @stderr
%13 = load i8*, i8** %5
%14 = call i32 @fprintf(i32 %12, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str, i64 0, i64 0), i8* %13)
%15 = call i32 @exit(i32 1)
unreachable
16: ; preds = %2
ret void
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [29 x i8] c"convert_epars: \0Ard_loop: %s\0A\00"
define void @rd_loop(i32* %0, i32* %1) {
%3 = tail call i8* @get_array1(i32* %0, i32 31, i32* %1)
%4 = icmp eq i8* %3, null
br i1 %4, label %9, label %5
5: ; preds = %2
%6 = load i32, i32* @stderr
%7 = tail call i32 @fprintf(i32 %6, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str, i64 0, i64 0), i8* %3)
%8 = tail call i32 @exit(i32 1)
unreachable
9: ; preds = %2
ret void
}
/* Variables and functions */
int fs_dir_exists(char *);
int _dir_exists(char *path) { return fs_dir_exists(path); }


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

x86 assembly (clang, -O2):
<_dir_exists>:
jmp    1030 <fs_dir_exists@plt>

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

LLVM IR (-O2):
define i32 @_dir_exists(i8* %0) {
%2 = tail call i32 @fs_dir_exists(i8* %0)
ret i32 %2
}
int test_imm_36int8_reg(signed char val) {
  return ((val) & (0x36 << 0)) ? -20 : -40;
}


x86 assembly (clang, -O0):
<test_imm_36int8_reg>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movsbl -0x1(%rbp),%edx
and    $0x36,%edx
mov    $0xffffffd8,%eax
mov    $0xffffffec,%ecx
cmp    $0x0,%edx
cmovne %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_imm_36int8_reg>:
test   $0x36,%dil
mov    $0xffffffd8,%ecx
mov    $0xffffffec,%eax
cmove  %ecx,%eax
ret

LLVM IR (-O0):
define i32 @test_imm_36int8_reg(i8 signext %0) {
%2 = alloca i8
store i8 %0, i8* %2
%3 = load i8, i8* %2
%4 = sext i8 %3 to i32
%5 = and i32 %4, 54
%6 = icmp ne i32 %5, 0
%7 = zext i1 %6 to i64
%8 = select i1 %6, i32 -20, i32 -40
ret i32 %8
}

LLVM IR (-O2):
define i32 @test_imm_36int8_reg(i8 signext %0) {
%2 = and i8 %0, 54
%3 = icmp eq i8 %2, 0
%4 = select i1 %3, i32 -40, i32 -20
ret i32 %4
}
/* Variables and functions */
char *false_sym();
int str_to_sn(char *, int /*<<< orphan*/);
char *true_sym();
void declare_base_symbols(void) {
  int sn;
  sn = str_to_sn(false_sym(), 0);
  sn = str_to_sn(true_sym(), 0);
  sn = str_to_sn("false", 0);
  sn = str_to_sn("true", 0);
}


x86 assembly (clang, -O0):
<declare_base_symbols>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1030 <false_sym@plt>
mov    %rax,%rdi
xor    %esi,%esi
call   1050 <str_to_sn@plt>
mov    %eax,-0x4(%rbp)
mov    $0x0,%al
call   1040 <true_sym@plt>
mov    %rax,%rdi
xor    %esi,%esi
call   1050 <str_to_sn@plt>
mov    %eax,-0x4(%rbp)
lea    0xe99(%rip),%rdi
xor    %esi,%esi
call   1050 <str_to_sn@plt>
mov    %eax,-0x4(%rbp)
lea    0xe8e(%rip),%rdi
xor    %esi,%esi
call   1050 <str_to_sn@plt>
mov    %eax,-0x4(%rbp)
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<declare_base_symbols>:
push   %rax
xor    %eax,%eax
call   1030 <false_sym@plt>
mov    %rax,%rdi
xor    %esi,%esi
call   1050 <str_to_sn@plt>
xor    %eax,%eax
call   1040 <true_sym@plt>
mov    %rax,%rdi
xor    %esi,%esi
call   1050 <str_to_sn@plt>
lea    0xea6(%rip),%rdi
xor    %esi,%esi
call   1050 <str_to_sn@plt>
lea    0xe9e(%rip),%rdi
xor    %esi,%esi
pop    %rax
jmp    1050 <str_to_sn@plt>

LLVM IR (-O0):
@.str = [6 x i8] c"false\00"
@.str.1 = [5 x i8] c"true\00"
define void @declare_base_symbols() {
%1 = alloca i32
%2 = call i8* (...) @false_sym()
%3 = call i32 @str_to_sn(i8* %2, i32 0)
store i32 %3, i32* %1
%4 = call i8* (...) @true_sym()
%5 = call i32 @str_to_sn(i8* %4, i32 0)
store i32 %5, i32* %1
%6 = call i32 @str_to_sn(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i32 0)
store i32 %6, i32* %1
%7 = call i32 @str_to_sn(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0), i32 0)
store i32 %7, i32* %1
ret void
}

LLVM IR (-O2):
@.str = [6 x i8] c"false\00"
@.str.1 = [5 x i8] c"true\00"
define void @declare_base_symbols() {
%1 = tail call i8* (...) @false_sym()
%2 = tail call i32 @str_to_sn(i8* %1, i32 0)
%3 = tail call i8* (...) @true_sym()
%4 = tail call i32 @str_to_sn(i8* %3, i32 0)
%5 = tail call i32 @str_to_sn(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i32 0)
%6 = tail call i32 @str_to_sn(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0), i32 0)
ret void
}
int any(int c) { return 1; }


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

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

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

LLVM IR (-O2):
define i32 @any(i32 %0) {
ret i32 1
}