xunge/DecIR huggingface dataset:
void ReverseGPIOP$1$In$set(void) { HplMcs51GeneralIOC$P13$set(); }


x86 assembly (clang, -O0):
<ReverseGPIOP$1$In$set>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1030 <HplMcs51GeneralIOC$P13$set@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<ReverseGPIOP$1$In$set>:
xor    %eax,%eax
jmp    1030 <HplMcs51GeneralIOC$P13$set@plt>

LLVM IR (-O0):
define void @"ReverseGPIOP$1$In$set"() {
%1 = call i32 (...) @"HplMcs51GeneralIOC$P13$set"()
ret void
}

LLVM IR (-O2):
define void @"ReverseGPIOP$1$In$set"() {
%1 = tail call i32 (...) @"HplMcs51GeneralIOC$P13$set"()
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ int64_t;

/* Variables and functions */
int /*<<< orphan*/ mlt_audio_calculate_samples_to_position(float, int,
                                                           int /*<<< orphan*/);
int64_t mlt_sample_calculator_to_now(float fps, int frequency,
                                     int64_t position) {
  return mlt_audio_calculate_samples_to_position(fps, frequency, position);
}


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

x86 assembly (clang, -O2):
<mlt_sample_calculator_to_now>:
jmp    1030 <mlt_audio_calculate_samples_to_position@plt>

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

LLVM IR (-O2):
define i32 @mlt_sample_calculator_to_now(float %0, i32 %1, i32 %2) {
%4 = tail call i32 @mlt_audio_calculate_samples_to_position(float %0, i32 %1, i32 %2)
ret i32 %4
}
/* Type definitions */
struct stat {
  int /*<<< orphan*/ st_mode;
};

/* Variables and functions */
scalar_t__ S_ISDIR(int /*<<< orphan*/);
int stat(char *, struct stat *);
extern int is_dir(char *dir) {
  struct stat info;
  return (stat(dir, &info) != -1 && S_ISDIR(info.st_mode));
}


x86 assembly (clang, -O0):
<is_dir>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
lea    -0x10(%rbp),%rsi
call   1040 <stat@plt>
mov    %eax,%ecx
xor    %eax,%eax
cmp    $0xffffffff,%ecx
mov    %al,-0x11(%rbp)
je     115b <is_dir+0x3b>
mov    -0x10(%rbp),%edi
call   1030 <S_ISDIR@plt>
cmp    $0x0,%rax
setne  %al
mov    %al,-0x11(%rbp)
mov    -0x11(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<is_dir>:
push   %rax
mov    %rsp,%rsi
call   1040 <stat@plt>
cmp    $0xffffffff,%eax
je     1143 <is_dir+0x23>
mov    (%rsp),%edi
call   1030 <S_ISDIR@plt>
mov    %rax,%rcx
xor    %eax,%eax
test   %rcx,%rcx
setne  %al
pop    %rcx
ret
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
%struct.stat = type { i32 }
define i32 @is_dir(i8* %0) {
%2 = alloca i8*
%3 = alloca %struct.stat
store i8* %0, i8** %2
%4 = load i8*, i8** %2
%5 = call i32 @stat(i8* %4, %struct.stat* %3)
%6 = icmp ne i32 %5, -1
br i1 %6, label %7, label %12
7: ; preds = %1
%8 = getelementptr inbounds %struct.stat, %struct.stat* %3, i32 0, i32 0
%9 = load i32, i32* %8
%10 = call i64 @S_ISDIR(i32 %9)
%11 = icmp ne i64 %10, 0
br label %12
12: ; preds = %7, %1
%13 = phi i1 [ false, %1 ], [ %11, %7 ]
%14 = zext i1 %13 to i32
ret i32 %14
}

LLVM IR (-O2):
%struct.stat = type { i32 }
define i32 @is_dir(i8* nocapture %0) {
%2 = alloca %struct.stat
%3 = bitcast %struct.stat* %2 to i8*
%4 = call i32 @stat(i8* %0, %struct.stat* %2)
%5 = icmp eq i32 %4, -1
br i1 %5, label %12, label %6
6: ; preds = %1
%7 = getelementptr inbounds %struct.stat, %struct.stat* %2, i64 0, i32 0
%8 = load i32, i32* %7
%9 = tail call i64 @S_ISDIR(i32 %8)
%10 = icmp ne i64 %9, 0
%11 = zext i1 %10 to i32
br label %12
12: ; preds = %6, %1
%13 = phi i32 [ 0, %1 ], [ %11, %6 ]
ret i32 %13
}
void XAddConnectionWatch() {}


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

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

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

LLVM IR (-O2):
define void @XAddConnectionWatch() {
ret void
}
int test_imm_B5uint64_midword_reg(unsigned long long val) {
  return ((val >> 16) & (0xB5 << 0)) ? -20 : -40;
}


x86 assembly (clang, -O0):
<test_imm_B5uint64_midword_reg>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdx
shr    $0x10,%rdx
and    $0xb5,%rdx
mov    $0xffffffd8,%eax
mov    $0xffffffec,%ecx
cmp    $0x0,%rdx
cmovne %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_imm_B5uint64_midword_reg>:
test   $0xb50000,%edi
mov    $0xffffffd8,%ecx
mov    $0xffffffec,%eax
cmove  %ecx,%eax
ret

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

LLVM IR (-O2):
define i32 @test_imm_B5uint64_midword_reg(i64 %0) {
%2 = and i64 %0, 11862016
%3 = icmp eq i64 %2, 0
%4 = select i1 %3, i32 -40, i32 -20
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ GSLog_Shutdown();
int /*<<< orphan*/ LNet_Shutdown();
int /*<<< orphan*/ Var_Shutdown();
void Lithium_Shutdown(void) {
  GSLog_Shutdown();
  Var_Shutdown();
  LNet_Shutdown();
}


x86 assembly (clang, -O0):
<Lithium_Shutdown>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1030 <GSLog_Shutdown@plt>
mov    $0x0,%al
call   1050 <Var_Shutdown@plt>
mov    $0x0,%al
call   1040 <LNet_Shutdown@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<Lithium_Shutdown>:
push   %rax
xor    %eax,%eax
call   1030 <GSLog_Shutdown@plt>
xor    %eax,%eax
call   1050 <Var_Shutdown@plt>
xor    %eax,%eax
pop    %rcx
jmp    1040 <LNet_Shutdown@plt>

LLVM IR (-O0):
define void @Lithium_Shutdown() {
%1 = call i32 (...) @GSLog_Shutdown()
%2 = call i32 (...) @Var_Shutdown()
%3 = call i32 (...) @LNet_Shutdown()
ret void
}

LLVM IR (-O2):
define void @Lithium_Shutdown() {
%1 = tail call i32 (...) @GSLog_Shutdown()
%2 = tail call i32 (...) @Var_Shutdown()
%3 = tail call i32 (...) @LNet_Shutdown()
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ wint_t;

/* Variables and functions */
int __infer_nondet_int();
int iswblank(wint_t wc) { return __infer_nondet_int(); }


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

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

LLVM IR (-O0):
define i32 @iswblank(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = call i32 (...) @__infer_nondet_int()
ret i32 %3
}

LLVM IR (-O2):
define i32 @iswblank(i32 %0) {
%2 = tail call i32 (...) @__infer_nondet_int()
ret i32 %2
}
/* Forward declarations */
typedef struct TYPE_6__ TYPE_3__;
typedef struct TYPE_5__ TYPE_2__;
typedef struct TYPE_4__ TYPE_1__;

/* Type definitions */
struct TYPE_4__ {
  scalar_t__ l;
};
struct TYPE_5__ {
  TYPE_1__ data;
};
struct TYPE_6__ {
  TYPE_2__ xclient;
};
typedef TYPE_3__ XEvent;

/* Variables and functions */
void *get_XEvent_xclient_data_l(void *_p) {
  return (void *)(((XEvent *)_p)->xclient.data.l);
}


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

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

LLVM IR (-O0):
%struct.TYPE_6__ = type { %struct.TYPE_5__ }
%struct.TYPE_5__ = type { %struct.TYPE_4__ }
%struct.TYPE_4__ = type { i64 }
define i8* @get_XEvent_xclient_data_l(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = bitcast i8* %3 to %struct.TYPE_6__*
%5 = getelementptr inbounds %struct.TYPE_6__, %struct.TYPE_6__* %4, i32 0, i32 0
%6 = getelementptr inbounds %struct.TYPE_5__, %struct.TYPE_5__* %5, i32 0, i32 0
%7 = getelementptr inbounds %struct.TYPE_4__, %struct.TYPE_4__* %6, i32 0, i32 0
%8 = load i64, i64* %7
%9 = inttoptr i64 %8 to i8*
ret i8* %9
}

LLVM IR (-O2):
define i8* @get_XEvent_xclient_data_l(i8* nocapture %0) {
%2 = bitcast i8* %0 to i64*
%3 = load i64, i64* %2
%4 = inttoptr i64 %3 to i8*
ret i8* %4
}
int intCompare(const void *pKey1, int n1, const void *pKey2, int n2) {
  return n2 - n1;
}


x86 assembly (clang, -O0):
<intCompare>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %ecx,-0x1c(%rbp)
mov    -0x1c(%rbp),%eax
sub    -0xc(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<intCompare>:
mov    %ecx,%eax
sub    %esi,%eax
ret

LLVM IR (-O0):
define i32 @intCompare(i8* %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 i32, i32* %8
%10 = load i32, i32* %6
%11 = sub nsw i32 %9, %10
ret i32 %11
}

LLVM IR (-O2):
define i32 @intCompare(i8* nocapture readnone %0, i32 %1, i8* nocapture readnone %2, i32 %3) {
%5 = sub nsw i32 %3, %1
ret i32 %5
}
/* Variables and functions */
int __builtin_mips_cabs_un_s(float, float);
int test1(float a, float b) { return __builtin_mips_cabs_un_s(a, b); }


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

x86 assembly (clang, -O2):
<test1>:
jmp    1030 <__builtin_mips_cabs_un_s@plt>

LLVM IR (-O0):
define i32 @test1(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 @__builtin_mips_cabs_un_s(float %5, float %6)
ret i32 %7
}

LLVM IR (-O2):
define i32 @test1(float %0, float %1) {
%3 = tail call i32 @__builtin_mips_cabs_un_s(float %0, float %1)
ret i32 %3
}
/* Type definitions */
typedef int /*<<< orphan*/ off_t;

/* Variables and functions */
int /*<<< orphan*/ EXIT_FAILURE;
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int ftruncate(int, int /*<<< orphan*/);
int /*<<< orphan*/ perror(char *);
int x_ftruncate(int fd, off_t length) {
  const int result = ftruncate(fd, length);
  if (result == -1) {
    perror("ftruncate() error");
    exit(EXIT_FAILURE);
  }
  return result;
}


x86 assembly (clang, -O0):
<x_ftruncate>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x8(%rbp),%esi
call   1030 <ftruncate@plt>
mov    %eax,-0xc(%rbp)
cmpl   $0xffffffff,-0xc(%rbp)
jne    1170 <x_ftruncate+0x40>
lea    0xea3(%rip),%rdi
call   1040 <perror@plt>
mov    0x2e77(%rip),%rax
mov    (%rax),%edi
call   1050 <exit@plt>
mov    -0xc(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<x_ftruncate>:
push   %rax
call   1030 <ftruncate@plt>
cmp    $0xffffffff,%eax
je     113d <x_ftruncate+0xd>
pop    %rcx
ret
lea    0xebc(%rip),%rdi
call   1040 <perror@plt>
mov    0x2e90(%rip),%rax
mov    (%rax),%edi
call   1050 <exit@plt>

LLVM IR (-O0):
@.str = [18 x i8] c"ftruncate() error\00"
@EXIT_FAILURE = global i32 0
define i32 @x_ftruncate(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%6 = load i32, i32* %3
%7 = load i32, i32* %4
%8 = call i32 @ftruncate(i32 %6, i32 %7)
store i32 %8, i32* %5
%9 = load i32, i32* %5
%10 = icmp eq i32 %9, -1
br i1 %10, label %11, label %15
11: ; preds = %2
%12 = call i32 @perror(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0))
%13 = load i32, i32* @EXIT_FAILURE
%14 = call i32 @exit(i32 %13)
unreachable
15: ; preds = %2
%16 = load i32, i32* %5
ret i32 %16
}

LLVM IR (-O2):
@.str = [18 x i8] c"ftruncate() error\00"
@EXIT_FAILURE = global i32 0
define i32 @x_ftruncate(i32 %0, i32 %1) {
%3 = tail call i32 @ftruncate(i32 %0, i32 %1)
%4 = icmp eq i32 %3, -1
br i1 %4, label %5, label %9
5: ; preds = %2
%6 = tail call i32 @perror(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0))
%7 = load i32, i32* @EXIT_FAILURE
%8 = tail call i32 @exit(i32 %7)
unreachable
9: ; preds = %2
ret i32 %3
}
int test_imm_FCuint16_mem(unsigned short *val) {
  return ((*val) & (0xFC << 0)) ? -20 : -40;
}


x86 assembly (clang, -O0):
<test_imm_FCuint16_mem>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movzwl (%rax),%edx
and    $0xfc,%edx
mov    $0xffffffd8,%eax
mov    $0xffffffec,%ecx
cmp    $0x0,%edx
cmovne %ecx,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @test_imm_FCuint16_mem(i16* %0) {
%2 = alloca i16*
store i16* %0, i16** %2
%3 = load i16*, i16** %2
%4 = load i16, i16* %3
%5 = zext i16 %4 to i32
%6 = and i32 %5, 252
%7 = icmp ne i32 %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_FCuint16_mem(i16* nocapture %0) {
%2 = load i16, i16* %0
%3 = and i16 %2, 252
%4 = icmp eq i16 %3, 0
%5 = select i1 %4, i32 -40, i32 -20
ret i32 %5
}
/* Variables and functions */
int test_sat_parser_should_fail(char *);
int test05(void) { return test_sat_parser_should_fail("(or b)"); }


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

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

LLVM IR (-O0):
@.str = [7 x i8] c"(or b)\00"
define i32 @test05() {
%1 = call i32 @test_sat_parser_should_fail(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0))
ret i32 %1
}

LLVM IR (-O2):
@.str = [7 x i8] c"(or b)\00"
define i32 @test05() {
%1 = tail call i32 @test_sat_parser_should_fail(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0))
ret i32 %1
}
/* Variables and functions */
int /*<<< orphan*/ ConfigureCMD();
int /*<<< orphan*/ StartupMenu(int /*<<< orphan*/, int /*<<< orphan*/ *);
int main(int argc, char *argv[]) {
  ConfigureCMD();
  StartupMenu(0, NULL);
  return 0;
}


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

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

LLVM IR (-O0):
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%6 = call i32 (...) @ConfigureCMD()
%7 = call i32 @StartupMenu(i32 0, i32* null)
ret i32 0
}

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 (...) @ConfigureCMD()
%4 = tail call i32 @StartupMenu(i32 0, i32* null)
ret i32 0
}
void *a_obj_dummy_copy(void *obj) { return obj; }


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

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

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

LLVM IR (-O2):
define i8* @a_obj_dummy_copy(i8* readnone returned %0) {
ret i8* %0
}
void _M2_SYSTEM_init(int argc, char *p) {}


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

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

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

LLVM IR (-O2):
define void @_M2_SYSTEM_init(i32 %0, i8* nocapture %1) {
ret void
}
extern void libvamphostsdk_v_2_5_present(void) {}


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

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

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

LLVM IR (-O2):
define void @libvamphostsdk_v_2_5_present() {
ret void
}
/* Variables and functions */
scalar_t__ DoMarker();
scalar_t__ ScreenMarker();
int DoAllMarker() {
  static char RoutineName[] = "DoAllMarker";
  if (DoMarker() < 0) {
    return (-1);
  }
  while (ScreenMarker() >= 0)
    ;
  return (0);
}


x86 assembly (clang, -O0):
<DoAllMarker>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1040 <DoMarker@plt>
cmp    $0x0,%rax
jge    1145 <DoAllMarker+0x25>
movl   $0xffffffff,-0x4(%rbp)
jmp    1167 <DoAllMarker+0x47>
jmp    114a <DoAllMarker+0x2a>
mov    $0x0,%al
call   1030 <ScreenMarker@plt>
cmp    $0x0,%rax
jl     1160 <DoAllMarker+0x40>
jmp    114a <DoAllMarker+0x2a>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<DoAllMarker>:
push   %rbx
xor    %eax,%eax
call   1040 <DoMarker@plt>
test   %rax,%rax
js     113e <DoAllMarker+0x1e>
xor    %ebx,%ebx
nop
xor    %eax,%eax
call   1030 <ScreenMarker@plt>
test   %rax,%rax
jns    1130 <DoAllMarker+0x10>
jmp    1143 <DoAllMarker+0x23>
mov    $0xffffffff,%ebx
mov    %ebx,%eax
pop    %rbx
ret

LLVM IR (-O0):
@DoAllMarker.RoutineName = internal global [12 x i8] c"DoAllMarker\00"
define i32 @DoAllMarker() {
%1 = alloca i32
%2 = call i64 (...) @DoMarker()
%3 = icmp slt i64 %2, 0
br i1 %3, label %4, label %5
4: ; preds = %0
store i32 -1, i32* %1
br label %11
5: ; preds = %0
br label %6
6: ; preds = %9, %5
%7 = call i64 (...) @ScreenMarker()
%8 = icmp sge i64 %7, 0
br i1 %8, label %9, label %10
9: ; preds = %6
br label %6
10: ; preds = %6
store i32 0, i32* %1
br label %11
11: ; preds = %10, %4
%12 = load i32, i32* %1
ret i32 %12
}

LLVM IR (-O2):
define i32 @DoAllMarker() {
%1 = tail call i64 (...) @DoMarker()
%2 = icmp slt i64 %1, 0
br i1 %2, label %6, label %3
3: ; preds = %0, %3
%4 = tail call i64 (...) @ScreenMarker()
%5 = icmp sgt i64 %4, -1
br i1 %5, label %3, label %6
6: ; preds = %3, %0
%7 = phi i32 [ -1, %0 ], [ 0, %3 ]
ret i32 %7
}
/* Type definitions */
typedef scalar_t__ uint64_t;
struct timespec {
  int tv_sec;
  scalar_t__ tv_nsec;
};

/* Variables and functions */
int /*<<< orphan*/ CLOCK_MONOTONIC;
int /*<<< orphan*/ clock_gettime(int /*<<< orphan*/, struct timespec *);
uint64_t tick() {
  struct timespec tp;
  clock_gettime(CLOCK_MONOTONIC, &tp);
  return tp.tv_sec * 1000000000 + tp.tv_nsec;
}


x86 assembly (clang, -O0):
<tick>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    0x2ec9(%rip),%rax
mov    (%rax),%edi
lea    -0x10(%rbp),%rsi
call   1030 <clock_gettime@plt>
imul   $0x3b9aca00,-0x10(%rbp),%eax
cltq
add    -0x8(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<tick>:
sub    $0x18,%rsp
mov    0x2ecd(%rip),%rax
mov    (%rax),%edi
lea    0x8(%rsp),%rsi
call   1030 <clock_gettime@plt>
movslq 0x8(%rsp),%rax
imul   $0x3b9aca00,%rax,%rax
add    0x10(%rsp),%rax
add    $0x18,%rsp
ret

LLVM IR (-O0):
%struct.timespec = type { i32, i64 }
@CLOCK_MONOTONIC = global i32 0
define i64 @tick() {
%1 = alloca %struct.timespec
%2 = load i32, i32* @CLOCK_MONOTONIC
%3 = call i32 @clock_gettime(i32 %2, %struct.timespec* %1)
%4 = getelementptr inbounds %struct.timespec, %struct.timespec* %1, i32 0, i32 0
%5 = load i32, i32* %4
%6 = mul nsw i32 %5, 1000000000
%7 = sext i32 %6 to i64
%8 = getelementptr inbounds %struct.timespec, %struct.timespec* %1, i32 0, i32 1
%9 = load i64, i64* %8
%10 = add nsw i64 %7, %9
ret i64 %10
}

LLVM IR (-O2):
%struct.timespec = type { i32, i64 }
@CLOCK_MONOTONIC = global i32 0
define i64 @tick() {
%1 = alloca %struct.timespec
%2 = bitcast %struct.timespec* %1 to i8*
%3 = load i32, i32* @CLOCK_MONOTONIC
%4 = call i32 @clock_gettime(i32 %3, %struct.timespec* %1)
%5 = getelementptr inbounds %struct.timespec, %struct.timespec* %1, i64 0, i32 0
%6 = load i32, i32* %5
%7 = mul nsw i32 %6, 1000000000
%8 = sext i32 %7 to i64
%9 = getelementptr inbounds %struct.timespec, %struct.timespec* %1, i64 0, i32 1
%10 = load i64, i64* %9
%11 = add nsw i64 %10, %8
ret i64 %11
}
/* Variables and functions */
int core7_swap(char *, int);
int U_EMRMOVETOEX_swap(char *record, int torev) {
  return (core7_swap(record, torev));
}


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

x86 assembly (clang, -O2):
<U_EMRMOVETOEX_swap>:
jmp    1030 <core7_swap@plt>

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

LLVM IR (-O2):
define i32 @U_EMRMOVETOEX_swap(i8* %0, i32 %1) {
%3 = tail call i32 @core7_swap(i8* %0, i32 %1)
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ gfx_color(int, int, int);
int /*<<< orphan*/ gfx_text(int, double, char *);
int /*<<< orphan*/ my_gfx_cleararea(int /*<<< orphan*/, int /*<<< orphan*/, int,
                                    int);
int /*<<< orphan*/ sprintf(char *, char *, int);
void display_score(int score) {
  char score_string[20];
  my_gfx_cleararea(0, 0, 12 * 20, 2 * 20);
  gfx_color(148, 56, 92);
  sprintf(score_string, "%d", score);
  gfx_text(2 * 20, 1.5 * 20, score_string);
}


x86 assembly (clang, -O0):
<display_score>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
xor    %esi,%esi
mov    $0xf0,%edx
mov    $0x28,%ecx
mov    %esi,%edi
call   1050 <my_gfx_cleararea@plt>
mov    $0x94,%edi
mov    $0x38,%esi
mov    $0x5c,%edx
call   1040 <gfx_color@plt>
lea    -0x20(%rbp),%rdi
mov    -0x4(%rbp),%edx
lea    0xe88(%rip),%rsi
call   1060 <sprintf@plt>
lea    -0x20(%rbp),%rsi
mov    $0x28,%edi
movsd  0xe6a(%rip),%xmm0
call   1030 <gfx_text@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<display_score>:
push   %rbp
push   %rbx
sub    $0x18,%rsp
mov    %edi,%ebp
xor    %edi,%edi
xor    %esi,%esi
mov    $0xf0,%edx
mov    $0x28,%ecx
call   1050 <my_gfx_cleararea@plt>
mov    $0x94,%edi
mov    $0x38,%esi
mov    $0x5c,%edx
call   1040 <gfx_color@plt>
lea    0xe92(%rip),%rsi
mov    %rsp,%rbx
mov    %rbx,%rdi
mov    %ebp,%edx
call   1060 <sprintf@plt>
movsd  0xe75(%rip),%xmm0
mov    $0x28,%edi
mov    %rbx,%rsi
call   1030 <gfx_text@plt>
add    $0x18,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
@.str = [3 x i8] c"%d\00"
define void @display_score(i32 %0) {
%2 = alloca i32
%3 = alloca [20 x i8]
store i32 %0, i32* %2
%4 = call i32 @my_gfx_cleararea(i32 0, i32 0, i32 240, i32 40)
%5 = call i32 @gfx_color(i32 148, i32 56, i32 92)
%6 = getelementptr inbounds [20 x i8], [20 x i8]* %3, i64 0, i64 0
%7 = load i32, i32* %2
%8 = call i32 @sprintf(i8* %6, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 %7)
%9 = getelementptr inbounds [20 x i8], [20 x i8]* %3, i64 0, i64 0
%10 = call i32 @gfx_text(i32 40, double 3.000000e+01, i8* %9)
ret void
}

LLVM IR (-O2):
@.str = [3 x i8] c"%d\00"
define void @display_score(i32 %0) {
%2 = alloca [20 x i8]
%3 = getelementptr inbounds [20 x i8], [20 x i8]* %2, i64 0, i64 0
%4 = tail call i32 @my_gfx_cleararea(i32 0, i32 0, i32 240, i32 40)
%5 = tail call i32 @gfx_color(i32 148, i32 56, i32 92)
%6 = call i32 @sprintf(i8* %3, i8* dereferenceable(1) getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 %0)
%7 = call i32 @gfx_text(i32 40, double 3.000000e+01, i8* %3)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ mayinit_vpp(void const **);
void *call_to_mayinit_and_return_good() {
  void *obj[10];
  mayinit_vpp((const void **)obj);
  return obj[0];
}


x86 assembly (clang, -O0):
<call_to_mayinit_and_return_good>:
push   %rbp
mov    %rsp,%rbp
sub    $0x50,%rsp
lea    -0x50(%rbp),%rdi
call   1030 <mayinit_vpp@plt>
mov    -0x50(%rbp),%rax
add    $0x50,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<call_to_mayinit_and_return_good>:
sub    $0x58,%rsp
mov    %rsp,%rdi
call   1030 <mayinit_vpp@plt>
mov    (%rsp),%rax
add    $0x58,%rsp
ret

LLVM IR (-O0):
define i8* @call_to_mayinit_and_return_good() {
%1 = alloca [10 x i8*]
%2 = getelementptr inbounds [10 x i8*], [10 x i8*]* %1, i64 0, i64 0
%3 = call i32 @mayinit_vpp(i8** %2)
%4 = getelementptr inbounds [10 x i8*], [10 x i8*]* %1, i64 0, i64 0
%5 = load i8*, i8** %4
ret i8* %5
}

LLVM IR (-O2):
define i8* @call_to_mayinit_and_return_good() {
%1 = alloca [10 x i8*]
%2 = bitcast [10 x i8*]* %1 to i8*
%3 = getelementptr inbounds [10 x i8*], [10 x i8*]* %1, i64 0, i64 0
%4 = call i32 @mayinit_vpp(i8** %3)
%5 = load i8*, i8** %3
ret i8* %5
}
/* Variables and functions */
int /*<<< orphan*/ memcpy(char *, char *, int);
void sendMsgToClient(char *sendbuf, int *sendlen) {
  memcpy(sendbuf, "1233211234567", 13);
  *sendlen = 13;
}


x86 assembly (clang, -O0):
<sendMsgToClient>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
lea    0xed5(%rip),%rsi
mov    $0xd,%edx
call   1030 <memcpy@plt>
mov    -0x10(%rbp),%rax
movl   $0xd,(%rax)
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<sendMsgToClient>:
push   %rbx
mov    %rsi,%rbx
lea    0xee5(%rip),%rsi
mov    $0xd,%edx
call   1030 <memcpy@plt>
movl   $0xd,(%rbx)
pop    %rbx
ret

LLVM IR (-O0):
@.str = [14 x i8] c"1233211234567\00"
define void @sendMsgToClient(i8* %0, i32* %1) {
%3 = alloca i8*
%4 = alloca i32*
store i8* %0, i8** %3
store i32* %1, i32** %4
%5 = load i8*, i8** %3
%6 = call i32 @memcpy(i8* %5, i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0), i32 13)
%7 = load i32*, i32** %4
store i32 13, i32* %7
ret void
}

LLVM IR (-O2):
@.str = [14 x i8] c"1233211234567\00"
define void @sendMsgToClient(i8* %0, i32* nocapture writeonly %1) {
%3 = tail call i32 @memcpy(i8* %0, i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0), i32 13)
store i32 13, i32* %1
ret void
}
/* Variables and functions */
double da_deta(double);
double dhubble_da(double);
double dhubble_deta(double a) { return da_deta(a) * dhubble_da(a); }


x86 assembly (clang, -O0):
<dhubble_deta>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
call   1040 <da_deta@plt>
movsd  %xmm0,-0x10(%rbp)
movsd  -0x8(%rbp),%xmm0
call   1030 <dhubble_da@plt>
movaps %xmm0,%xmm1
movsd  -0x10(%rbp),%xmm0
mulsd  %xmm1,%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<dhubble_deta>:
sub    $0x18,%rsp
movsd  %xmm0,0x8(%rsp)
call   1040 <da_deta@plt>
movsd  %xmm0,0x10(%rsp)
movsd  0x8(%rsp),%xmm0
call   1030 <dhubble_da@plt>
mulsd  0x10(%rsp),%xmm0
add    $0x18,%rsp
ret

LLVM IR (-O0):
define double @dhubble_deta(double %0) {
%2 = alloca double
store double %0, double* %2
%3 = load double, double* %2
%4 = call double @da_deta(double %3)
%5 = load double, double* %2
%6 = call double @dhubble_da(double %5)
%7 = fmul double %4, %6
ret double %7
}

LLVM IR (-O2):
define double @dhubble_deta(double %0) {
%2 = tail call double @da_deta(double %0)
%3 = tail call double @dhubble_da(double %0)
%4 = fmul double %2, %3
ret double %4
}
/* Variables and functions */
int /*<<< orphan*/ gmvwrite_surfflag_name(char *, int);
int /*<<< orphan*/ strncpy(char *, char *, int);
void fgmvwrite_surfflag_name_(char flagname[], int *numtypes) {
  char name[10];
  strncpy(name, flagname, 8);
  *(name + 8) = '\0';
  gmvwrite_surfflag_name(name, *numtypes);
}


x86 assembly (clang, -O0):
<fgmvwrite_surfflag_name_>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
lea    -0x1a(%rbp),%rdi
mov    -0x8(%rbp),%rsi
mov    $0x8,%edx
call   1030 <strncpy@plt>
movb   $0x0,-0x12(%rbp)
lea    -0x1a(%rbp),%rdi
mov    -0x10(%rbp),%rax
mov    (%rax),%esi
call   1040 <gmvwrite_surfflag_name@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fgmvwrite_surfflag_name_>:
push   %r14
push   %rbx
sub    $0x18,%rsp
mov    %rsi,%rbx
mov    %rdi,%rsi
lea    0xe(%rsp),%r14
mov    %r14,%rdi
mov    $0x8,%edx
call   1030 <strncpy@plt>
movb   $0x0,0x16(%rsp)
mov    (%rbx),%esi
mov    %r14,%rdi
call   1040 <gmvwrite_surfflag_name@plt>
add    $0x18,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define void @fgmvwrite_surfflag_name_(i8* %0, i32* %1) {
%3 = alloca i8*
%4 = alloca i32*
%5 = alloca [10 x i8]
store i8* %0, i8** %3
store i32* %1, i32** %4
%6 = getelementptr inbounds [10 x i8], [10 x i8]* %5, i64 0, i64 0
%7 = load i8*, i8** %3
%8 = call i32 @strncpy(i8* %6, i8* %7, i32 8)
%9 = getelementptr inbounds [10 x i8], [10 x i8]* %5, i64 0, i64 0
%10 = getelementptr inbounds i8, i8* %9, i64 8
store i8 0, i8* %10
%11 = getelementptr inbounds [10 x i8], [10 x i8]* %5, i64 0, i64 0
%12 = load i32*, i32** %4
%13 = load i32, i32* %12
%14 = call i32 @gmvwrite_surfflag_name(i8* %11, i32 %13)
ret void
}

LLVM IR (-O2):
define void @fgmvwrite_surfflag_name_(i8* %0, i32* nocapture %1) {
%3 = alloca [10 x i8]
%4 = getelementptr inbounds [10 x i8], [10 x i8]* %3, i64 0, i64 0
%5 = call i32 @strncpy(i8* %4, i8* %0, i32 8)
%6 = getelementptr inbounds [10 x i8], [10 x i8]* %3, i64 0, i64 8
store i8 0, i8* %6
%7 = load i32, i32* %1
%8 = call i32 @gmvwrite_surfflag_name(i8* %4, i32 %7)
ret void
}
unsigned addval_113(unsigned x) { return x + 3380137609U; }


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

x86 assembly (clang, -O2):
<addval_113>:
lea    -0x36873177(%rdi),%eax
ret

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

LLVM IR (-O2):
define i32 @addval_113(i32 %0) {
%2 = add i32 %0, -914829687
ret i32 %2
}
/* Type definitions */
typedef int /*<<< orphan*/ pthread_attr_t;

/* Variables and functions */
int pthread_attr_getstack(int /*<<< orphan*/ *, void **, size_t *);
int my_pthread_attr_getstack(pthread_attr_t const *__attr, void **stack_base,
                             size_t *stack_size) {
  pthread_attr_t *realattr = (pthread_attr_t *)*(unsigned int *)__attr;
  return pthread_attr_getstack(realattr, stack_base, stack_size);
}


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

x86 assembly (clang, -O2):
<my_pthread_attr_getstack>:
mov    (%rdi),%edi
jmp    1030 <pthread_attr_getstack@plt>

LLVM IR (-O0):
define i32 @my_pthread_attr_getstack(i32* %0, i8** %1, i64* %2) {
%4 = alloca i32*
%5 = alloca i8**
%6 = alloca i64*
%7 = alloca i32*
store i32* %0, i32** %4
store i8** %1, i8*** %5
store i64* %2, i64** %6
%8 = load i32*, i32** %4
%9 = load i32, i32* %8
%10 = zext i32 %9 to i64
%11 = inttoptr i64 %10 to i32*
store i32* %11, i32** %7
%12 = load i32*, i32** %7
%13 = load i8**, i8*** %5
%14 = load i64*, i64** %6
%15 = call i32 @pthread_attr_getstack(i32* %12, i8** %13, i64* %14)
ret i32 %15
}

LLVM IR (-O2):
define i32 @my_pthread_attr_getstack(i32* nocapture %0, i8** %1, i64* %2) {
%4 = load i32, i32* %0
%5 = zext i32 %4 to i64
%6 = inttoptr i64 %5 to i32*
%7 = tail call i32 @pthread_attr_getstack(i32* %6, i8** %1, i64* %2)
ret i32 %7
}
/* Variables and functions */
int /*<<< orphan*/ prop_reset_registration();
void prop_init(void *unused) { prop_reset_registration(); }


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

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

LLVM IR (-O0):
define void @prop_init(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = call i32 (...) @prop_reset_registration()
ret void
}

LLVM IR (-O2):
define void @prop_init(i8* nocapture readnone %0) {
%2 = tail call i32 (...) @prop_reset_registration()
ret void
}
/* Variables and functions */
int strcmp(char *const, char *const);
int mystrcmp(const void *p1, const void *p2) {
  return strcmp(*(char *const *)p1, *(char *const *)p2);
}


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

x86 assembly (clang, -O2):
<mystrcmp>:
mov    (%rdi),%rdi
mov    (%rsi),%rsi
jmp    1030 <strcmp@plt>

LLVM IR (-O0):
define i32 @mystrcmp(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 = bitcast i8* %5 to i8**
%7 = load i8*, i8** %6
%8 = load i8*, i8** %4
%9 = bitcast i8* %8 to i8**
%10 = load i8*, i8** %9
%11 = call i32 @strcmp(i8* %7, i8* %10)
ret i32 %11
}

LLVM IR (-O2):
define i32 @mystrcmp(i8* nocapture %0, i8* nocapture %1) {
%3 = bitcast i8* %0 to i8**
%4 = load i8*, i8** %3
%5 = bitcast i8* %1 to i8**
%6 = load i8*, i8** %5
%7 = tail call i32 @strcmp(i8* dereferenceable(1) %4, i8* dereferenceable(1) %6)
ret i32 %7
}
int test_06(short x, short *y, int z, int w) { return x & y[0] ? z : w; }


x86 assembly (clang, -O0):
<test_06>:
push   %rbp
mov    %rsp,%rbp
mov    %di,%ax
mov    %ax,-0x2(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    %ecx,-0x18(%rbp)
movswl -0x2(%rbp),%eax
mov    -0x10(%rbp),%rcx
movswl (%rcx),%ecx
and    %ecx,%eax
cmp    $0x0,%eax
je     1136 <test_06+0x36>
mov    -0x14(%rbp),%eax
mov    %eax,-0x1c(%rbp)
jmp    113c <test_06+0x3c>
mov    -0x18(%rbp),%eax
mov    %eax,-0x1c(%rbp)
mov    -0x1c(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_06>:
mov    %edx,%eax
test   %di,(%rsi)
cmove  %ecx,%eax
ret

LLVM IR (-O0):
define i32 @test_06(i16 signext %0, i16* %1, i32 %2, i32 %3) {
%5 = alloca i16
%6 = alloca i16*
%7 = alloca i32
%8 = alloca i32
store i16 %0, i16* %5
store i16* %1, i16** %6
store i32 %2, i32* %7
store i32 %3, i32* %8
%9 = load i16, i16* %5
%10 = sext i16 %9 to i32
%11 = load i16*, i16** %6
%12 = getelementptr inbounds i16, i16* %11, i64 0
%13 = load i16, i16* %12
%14 = sext i16 %13 to i32
%15 = and i32 %10, %14
%16 = icmp ne i32 %15, 0
br i1 %16, label %17, label %19
17: ; preds = %4
%18 = load i32, i32* %7
br label %21
19: ; preds = %4
%20 = load i32, i32* %8
br label %21
21: ; preds = %19, %17
%22 = phi i32 [ %18, %17 ], [ %20, %19 ]
ret i32 %22
}

LLVM IR (-O2):
define i32 @test_06(i16 signext %0, i16* nocapture %1, i32 %2, i32 %3) {
%5 = load i16, i16* %1
%6 = and i16 %5, %0
%7 = icmp eq i16 %6, 0
%8 = select i1 %7, i32 %3, i32 %2
ret i32 %8
}
/* Type definitions */
typedef int uint32_t;

/* Variables and functions */
uint32_t Maj(uint32_t x, uint32_t y, uint32_t z) {
  return ((x & y) | (z & (x | y)));
}


x86 assembly (clang, -O0):
<Maj>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    -0x4(%rbp),%eax
and    -0x8(%rbp),%eax
mov    -0xc(%rbp),%ecx
mov    -0x4(%rbp),%edx
or     -0x8(%rbp),%edx
and    %edx,%ecx
or     %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<Maj>:
mov    %esi,%eax
and    %edi,%eax
or     %edi,%esi
and    %edx,%esi
or     %esi,%eax
ret

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

LLVM IR (-O2):
define i32 @Maj(i32 %0, i32 %1, i32 %2) {
%4 = and i32 %1, %0
%5 = or i32 %1, %0
%6 = and i32 %5, %2
%7 = or i32 %6, %4
ret i32 %7
}
void netcdf_ConvertUnitsTS() {}


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

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

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

LLVM IR (-O2):
define void @netcdf_ConvertUnitsTS() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ GL_CULL_FACE;
int /*<<< orphan*/ GL_DEPTH_TEST;
int /*<<< orphan*/ glClearColor(double, double, double, double);
int /*<<< orphan*/ glEnable(int /*<<< orphan*/);
int /*<<< orphan*/ glOrtho(int, int, int, int, int, int);
void init(void) {
  glClearColor(0.0, 0.0, 0.0, 0.0);
  glOrtho(-50, 50, -50, 50, -50, 50);
  glEnable(GL_DEPTH_TEST);
  glEnable(GL_CULL_FACE);
}


x86 assembly (clang, -O0):
<init>:
push   %rbp
mov    %rsp,%rbp
xorps  %xmm3,%xmm3
movaps %xmm3,%xmm0
movaps %xmm3,%xmm1
movaps %xmm3,%xmm2
call   1050 <glClearColor@plt>
mov    $0xffffffce,%r8d
mov    $0x32,%r9d
mov    %r8d,%edi
mov    %r9d,%esi
mov    %r8d,%edx
mov    %r9d,%ecx
call   1040 <glOrtho@plt>
mov    0x2e6f(%rip),%rax
mov    (%rax),%edi
call   1030 <glEnable@plt>
mov    0x2e69(%rip),%rax
mov    (%rax),%edi
call   1030 <glEnable@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<init>:
push   %rax
xorps  %xmm0,%xmm0
xorps  %xmm1,%xmm1
xorps  %xmm2,%xmm2
xorps  %xmm3,%xmm3
call   1050 <glClearColor@plt>
mov    $0xffffffce,%edi
mov    $0x32,%esi
mov    $0xffffffce,%edx
mov    $0x32,%ecx
mov    $0xffffffce,%r8d
mov    $0x32,%r9d
call   1040 <glOrtho@plt>
mov    0x2e6a(%rip),%rax
mov    (%rax),%edi
call   1030 <glEnable@plt>
mov    0x2e64(%rip),%rax
mov    (%rax),%edi
pop    %rax
jmp    1030 <glEnable@plt>

LLVM IR (-O0):
@GL_DEPTH_TEST = global i32 0
@GL_CULL_FACE = global i32 0
define void @init() {
%1 = call i32 @glClearColor(double 0.000000e+00, double 0.000000e+00, double 0.000000e+00, double 0.000000e+00)
%2 = call i32 @glOrtho(i32 -50, i32 50, i32 -50, i32 50, i32 -50, i32 50)
%3 = load i32, i32* @GL_DEPTH_TEST
%4 = call i32 @glEnable(i32 %3)
%5 = load i32, i32* @GL_CULL_FACE
%6 = call i32 @glEnable(i32 %5)
ret void
}

LLVM IR (-O2):
@GL_DEPTH_TEST = global i32 0
@GL_CULL_FACE = global i32 0
define void @init() {
%1 = tail call i32 @glClearColor(double 0.000000e+00, double 0.000000e+00, double 0.000000e+00, double 0.000000e+00)
%2 = tail call i32 @glOrtho(i32 -50, i32 50, i32 -50, i32 50, i32 -50, i32 50)
%3 = load i32, i32* @GL_DEPTH_TEST
%4 = tail call i32 @glEnable(i32 %3)
%5 = load i32, i32* @GL_CULL_FACE
%6 = tail call i32 @glEnable(i32 %5)
ret void
}
void vlogd(int bg, const char *cmd, const char *arg) {}


x86 assembly (clang, -O0):
<vlogd>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
pop    %rbp
ret

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

LLVM IR (-O0):
define void @vlogd(i32 %0, i8* %1, i8* %2) {
%4 = alloca i32
%5 = alloca i8*
%6 = alloca i8*
store i32 %0, i32* %4
store i8* %1, i8** %5
store i8* %2, i8** %6
ret void
}

LLVM IR (-O2):
define void @vlogd(i32 %0, i8* nocapture %1, i8* nocapture %2) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ XOpenDisplay(int /*<<< orphan*/ *);
int main(int argc, char *argv[]) {
  (void)argv;
  XOpenDisplay(NULL);
  return argc;
}


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

x86 assembly (clang, -O2):
<main>:
push   %rbx
mov    %edi,%ebx
xor    %edi,%edi
call   1030 <XOpenDisplay@plt>
mov    %ebx,%eax
pop    %rbx
ret

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

LLVM IR (-O2):
define i32 @main(i32 returned %0, i8** nocapture readnone %1) {
%3 = tail call i32 @XOpenDisplay(i32* null)
ret i32 %0
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char const *, int);
void f2(const char *s, int count) {
  printf("%s triggered probe1:f2 (%i)\n", s, count);
}


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

x86 assembly (clang, -O2):
<f2>:
mov    %esi,%edx
mov    %rdi,%rsi
lea    0xee4(%rip),%rdi
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [29 x i8] c"%s triggered probe1:f2 (%i)\0A\00"
define void @f2(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i32
store i8* %0, i8** %3
store i32 %1, i32* %4
%5 = load i8*, i8** %3
%6 = load i32, i32* %4
%7 = call i32 @printf(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str, i64 0, i64 0), i8* %5, i32 %6)
ret void
}

LLVM IR (-O2):
@.str = [29 x i8] c"%s triggered probe1:f2 (%i)\0A\00"
define void @f2(i8* %0, i32 %1) {
%3 = tail call i32 @printf(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str, i64 0, i64 0), i8* %0, i32 %1)
ret void
}
int linkNolink(int old __attribute__((unused)), int new) {
  return new == 0 || new == 1;
}


x86 assembly (clang, -O0):
<linkNolink>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    $0x1,%al
cmpl   $0x0,-0x8(%rbp)
mov    %al,-0x9(%rbp)
je     1123 <linkNolink+0x23>
cmpl   $0x1,-0x8(%rbp)
sete   %al
mov    %al,-0x9(%rbp)
mov    -0x9(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<linkNolink>:
xor    %eax,%eax
cmp    $0x2,%esi
setb   %al
ret

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

LLVM IR (-O2):
define i32 @linkNolink(i32 %0, i32 %1) {
%3 = icmp ult i32 %1, 2
%4 = zext i1 %3 to i32
ret i32 %4
}
/* Type definitions */
typedef scalar_t__ uint32_t;
typedef int /*<<< orphan*/ uint16_t;

/* Variables and functions */
__attribute__((section(".flash.text.WriteW"))) void FlashWriteW(uint32_t addr,
                                                                uint16_t data) {
  *((volatile uint16_t *)addr) = data;
}


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

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

LLVM IR (-O0):
define void @FlashWriteW(i64 %0, i32 %1) section ".flash.text.WriteW" {
%3 = alloca i64
%4 = alloca i32
store i64 %0, i64* %3
store i32 %1, i32* %4
%5 = load i32, i32* %4
%6 = load i64, i64* %3
%7 = inttoptr i64 %6 to i32*
store volatile i32 %5, i32* %7
ret void
}

LLVM IR (-O2):
define void @FlashWriteW(i64 %0, i32 %1) section ".flash.text.WriteW" {
%3 = inttoptr i64 %0 to i32*
store volatile i32 %1, i32* %3
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ uint8_t;

/* Variables and functions */
void float_to_bigendian(uint8_t *dst, float f) {
  uint8_t *b = (uint8_t *)&f;
  dst[0] = b[3];
  dst[1] = b[2];
  dst[2] = b[1];
  dst[3] = b[0];
}


x86 assembly (clang, -O0):
<float_to_bigendian>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movss  %xmm0,-0xc(%rbp)
lea    -0xc(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rax
mov    0xc(%rax),%ecx
mov    -0x8(%rbp),%rax
mov    %ecx,(%rax)
mov    -0x18(%rbp),%rax
mov    0x8(%rax),%ecx
mov    -0x8(%rbp),%rax
mov    %ecx,0x4(%rax)
mov    -0x18(%rbp),%rax
mov    0x4(%rax),%ecx
mov    -0x8(%rbp),%rax
mov    %ecx,0x8(%rax)
mov    -0x18(%rbp),%rax
mov    (%rax),%ecx
mov    -0x8(%rbp),%rax
mov    %ecx,0xc(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<float_to_bigendian>:
movss  %xmm0,0xc(%rdi)
ret

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

LLVM IR (-O2):
define void @float_to_bigendian(i32* nocapture writeonly %0, float %1) {
%3 = getelementptr inbounds i32, i32* %0, i64 3
%4 = bitcast i32* %3 to float*
store float %1, float* %4
ret void
}
void *XSharpCreateFontXft(void *dpy, const char *family, int pointSize,
                          int style) {
  return 0;
}


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

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

LLVM IR (-O0):
define i8* @XSharpCreateFontXft(i8* %0, i8* %1, i32 %2, i32 %3) {
%5 = alloca i8*
%6 = alloca i8*
%7 = alloca i32
%8 = alloca i32
store i8* %0, i8** %5
store i8* %1, i8** %6
store i32 %2, i32* %7
store i32 %3, i32* %8
ret i8* null
}

LLVM IR (-O2):
define noalias i8* @XSharpCreateFontXft(i8* nocapture readnone %0, i8* nocapture readnone %1, i32 %2, i32 %3) {
ret i8* null
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void x1(void) {
  printf("Called mod1-x1 "
         ""
         "\n");
}


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

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

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

LLVM IR (-O2):
@str = [16 x i8] c"Called mod1-x1 \00"
define void @x1() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([16 x i8], [16 x i8]* @str, i64 0, i64 0))
ret void
}
void tx(char c) {}


x86 assembly (clang, -O0):
<tx>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x1(%rbp)
pop    %rbp
ret

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

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

LLVM IR (-O2):
define void @tx(i8 signext %0) {
ret void
}