xunge/DecIR huggingface dataset:
/* Variables and functions */
char *getRomFolder();
int /*<<< orphan*/ sprintf(char *, char *, char *, char *);
const char *get_documents_path(char *file) {
  static char documents_path[1024];
  sprintf(documents_path, "%s/%s", getRomFolder(), file);
  return documents_path;
}


x86 assembly (clang, -O0):
<get_documents_path>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    $0x0,%al
call   1030 <getRomFolder@plt>
mov    %rax,%rdx
mov    -0x8(%rbp),%rcx
lea    0x2eff(%rip),%rdi
lea    0xeb8(%rip),%rsi
call   1040 <sprintf@plt>
lea    0x2eec(%rip),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_documents_path>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%rbx
xor    %eax,%eax
call   1030 <getRomFolder@plt>
lea    0x2f0b(%rip),%r14
lea    0xec4(%rip),%rsi
mov    %r14,%rdi
mov    %rax,%rdx
mov    %rbx,%rcx
call   1040 <sprintf@plt>
mov    %r14,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@get_documents_path.documents_path = internal global [1024 x i8] zeroinitializer
@.str = [6 x i8] c"%s/%s\00"
define i8* @get_documents_path(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = call i8* (...) @getRomFolder()
%4 = load i8*, i8** %2
%5 = call i32 @sprintf(i8* getelementptr inbounds ([1024 x i8], [1024 x i8]* @get_documents_path.documents_path, i64 0, i64 0), i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i8* %3, i8* %4)
ret i8* getelementptr inbounds ([1024 x i8], [1024 x i8]* @get_documents_path.documents_path, i64 0, i64 0)
}

LLVM IR (-O2):
@get_documents_path.documents_path = internal global [1024 x i8] zeroinitializer
@.str = [6 x i8] c"%s/%s\00"
define i8* @get_documents_path(i8* %0) {
%2 = tail call i8* (...) @getRomFolder()
%3 = tail call i32 @sprintf(i8* dereferenceable(1) getelementptr inbounds ([1024 x i8], [1024 x i8]* @get_documents_path.documents_path, i64 0, i64 0), i8* dereferenceable(1) getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i8* %2, i8* %0)
ret i8* getelementptr inbounds ([1024 x i8], [1024 x i8]* @get_documents_path.documents_path, i64 0, i64 0)
}
/* Type definitions */
struct BSTree {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ clearBSTree(struct BSTree *);
int /*<<< orphan*/ free(struct BSTree *);
void deleteBSTree(struct BSTree *tree) {
  clearBSTree(tree);
  free(tree);
}


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

x86 assembly (clang, -O2):
<deleteBSTree>:
push   %rbx
mov    %rdi,%rbx
call   1040 <clearBSTree@plt>
mov    %rbx,%rdi
pop    %rbx
jmp    1030 <free@plt>

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

LLVM IR (-O2):
%struct.BSTree = type { i32 }
define void @deleteBSTree(%struct.BSTree* %0) {
%2 = tail call i32 @clearBSTree(%struct.BSTree* %0)
%3 = tail call i32 @free(%struct.BSTree* %0)
ret void
}
int exynos_otg_vbus_event(struct platform_device *pdev, int state) { return 0; }


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

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

LLVM IR (-O0):
%struct.platform_device = type opaque
define i32 @exynos_otg_vbus_event(%struct.platform_device* %0, i32 %1) {
%3 = alloca %struct.platform_device*
%4 = alloca i32
store %struct.platform_device* %0, %struct.platform_device** %3
store i32 %1, i32* %4
ret i32 0
}

LLVM IR (-O2):
%struct.platform_device = type opaque
define i32 @exynos_otg_vbus_event(%struct.platform_device* nocapture readnone %0, i32 %1) {
ret i32 0
}
int main(volatile register int argc, char **argv) {
  while (argc++)
    ;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%eax
mov    %eax,%ecx
add    $0x1,%ecx
mov    %ecx,-0x8(%rbp)
cmp    $0x0,%eax
je     112b <main+0x2b>
jmp    1112 <main+0x12>
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
mov    %edi,-0x4(%rsp)
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
mov    -0x4(%rsp),%eax
lea    0x1(%rax),%ecx
mov    %ecx,-0x4(%rsp)
test   %eax,%eax
jne    1110 <main+0x10>
xor    %eax,%eax
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 volatile i32 %0, i32* %4
store i8** %1, i8*** %5
br label %6
6: ; preds = %10, %2
%7 = load volatile i32, i32* %4
%8 = add nsw i32 %7, 1
store volatile i32 %8, i32* %4
%9 = icmp ne i32 %7, 0
br i1 %9, label %10, label %11
10: ; preds = %6
br label %6
11: ; preds = %6
%12 = load i32, i32* %3
ret i32 %12
}

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = alloca i32
store volatile i32 %0, i32* %3
br label %4
4: ; preds = %4, %2
%5 = load volatile i32, i32* %3
%6 = add nsw i32 %5, 1
store volatile i32 %6, i32* %3
%7 = icmp eq i32 %5, 0
br i1 %7, label %8, label %4
8: ; preds = %4
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char *, char *);
void g_error(char *message) { printf("%s: %s\n", "wc", message); }


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

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

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

LLVM IR (-O2):
@.str = [8 x i8] c"%s: %s\0A\00"
@.str.1 = [3 x i8] c"wc\00"
define void @g_error(i8* %0) {
%2 = tail call i32 @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i8* %0)
ret void
}
/* Variables and functions */
void Reserved_Handler9(void) {
  while (1)
    ;
}


x86 assembly (clang, -O0):
<Reserved_Handler9>:
push   %rbp
mov    %rsp,%rbp
jmp    1109 <Reserved_Handler9+0x9>
jmp    1109 <Reserved_Handler9+0x9>

x86 assembly (clang, -O2):
<Reserved_Handler9>:
jmp    1100 <Reserved_Handler9>

LLVM IR (-O0):
define void @Reserved_Handler9() {
br label %1
1: ; preds = %0, %1
br label %1
}

LLVM IR (-O2):
define void @Reserved_Handler9() {
br label %1
1: ; preds = %0, %1
br label %1
}
int test_imm_1Buint16_reg(unsigned short val) {
  return ((val) & (0x1B << 0)) ? -20 : -40;
}


x86 assembly (clang, -O0):
<test_imm_1Buint16_reg>:
push   %rbp
mov    %rsp,%rbp
mov    %di,%ax
mov    %ax,-0x2(%rbp)
movzwl -0x2(%rbp),%edx
and    $0x1b,%edx
mov    $0xffffffd8,%eax
mov    $0xffffffec,%ecx
cmp    $0x0,%edx
cmovne %ecx,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @test_imm_1Buint16_reg(i16 zeroext %0) {
%2 = alloca i16
store i16 %0, i16* %2
%3 = load i16, i16* %2
%4 = zext i16 %3 to i32
%5 = and i32 %4, 27
%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_1Buint16_reg(i16 zeroext %0) {
%2 = and i16 %0, 27
%3 = icmp eq i16 %2, 0
%4 = select i1 %3, i32 -40, i32 -20
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ minscanf(char *, char *, int *, float *);
int /*<<< orphan*/ printf(char *, char *, int, float);
int main() {
  char a[100];
  int b;
  float c;
  minscanf("%s%d%f", a, &b, &c);
  printf("%s\n%d\n%f\n", a, b, c);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x80,%rsp
movl   $0x0,-0x4(%rbp)
lea    -0x70(%rbp),%rsi
lea    0xec3(%rip),%rdi
lea    -0x74(%rbp),%rdx
lea    -0x78(%rbp),%rcx
call   1040 <minscanf@plt>
lea    -0x70(%rbp),%rsi
mov    -0x74(%rbp),%edx
movss  -0x78(%rbp),%xmm0
lea    0xeaa(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x80,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x80,%rsp
lea    0xed1(%rip),%rdi
lea    0x10(%rsp),%rbx
lea    0xc(%rsp),%rdx
lea    0x8(%rsp),%rcx
mov    %rbx,%rsi
call   1040 <minscanf@plt>
mov    0xc(%rsp),%edx
movss  0x8(%rsp),%xmm0
lea    0xeb0(%rip),%rdi
mov    %rbx,%rsi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x80,%rsp
pop    %rbx
ret

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

LLVM IR (-O2):
@.str = [7 x i8] c"%s%d%f\00"
@.str.1 = [10 x i8] c"%s\0A%d\0A%f\0A\00"
define i32 @main() {
%1 = alloca [100 x i8]
%2 = alloca i32
%3 = alloca float
%4 = getelementptr inbounds [100 x i8], [100 x i8]* %1, i64 0, i64 0
%5 = bitcast i32* %2 to i8*
%6 = bitcast float* %3 to i8*
%7 = call i32 @minscanf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i8* %4, i32* %2, float* %3)
%8 = load i32, i32* %2
%9 = load float, float* %3
%10 = call i32 @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.1, i64 0, i64 0), i8* %4, i32 %8, float %9)
ret i32 0
}
int test_imm_70int16_reg(short val) {
  return ((val) & (-0x70 << 0)) ? -20 : -40;
}


x86 assembly (clang, -O0):
<test_imm_70int16_reg>:
push   %rbp
mov    %rsp,%rbp
mov    %di,%ax
mov    %ax,-0x2(%rbp)
movswl -0x2(%rbp),%edx
and    $0xffffff90,%edx
mov    $0xffffffd8,%eax
mov    $0xffffffec,%ecx
cmp    $0x0,%edx
cmovne %ecx,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @test_imm_70int16_reg(i16 signext %0) {
%2 = alloca i16
store i16 %0, i16* %2
%3 = load i16, i16* %2
%4 = sext i16 %3 to i32
%5 = and i32 %4, -112
%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_70int16_reg(i16 signext %0) {
%2 = and i16 %0, -112
%3 = icmp eq i16 %2, 0
%4 = select i1 %3, i32 -40, i32 -20
ret i32 %4
}
/* Type definitions */
typedef int /*<<< orphan*/ uint8_t;
typedef int /*<<< orphan*/ uint32_t;
typedef int /*<<< orphan*/ uint16_t;
typedef int /*<<< orphan*/ key;

/* Variables and functions */
int /*<<< orphan*/ rgph_u32x3_jenkins2v_data(int /*<<< orphan*/ const *, size_t,
                                             uintptr_t, int /*<<< orphan*/ *);
void rgph_u32x3_jenkins2v_u16a(const uint16_t *key, size_t len, uintptr_t seed,
                               uint32_t *h) {
  const uint8_t *arg = ((const uint8_t *)(const char *)(key));
  rgph_u32x3_jenkins2v_data(arg, len * sizeof(key[0]), seed, h);
}


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

x86 assembly (clang, -O2):
<rgph_u32x3_jenkins2v_u16a>:
shl    $0x2,%rsi
jmp    1030 <rgph_u32x3_jenkins2v_data@plt>

LLVM IR (-O0):
define void @rgph_u32x3_jenkins2v_u16a(i32* %0, i64 %1, i64 %2, i32* %3) {
%5 = alloca i32*
%6 = alloca i64
%7 = alloca i64
%8 = alloca i32*
%9 = alloca i32*
store i32* %0, i32** %5
store i64 %1, i64* %6
store i64 %2, i64* %7
store i32* %3, i32** %8
%10 = load i32*, i32** %5
%11 = bitcast i32* %10 to i8*
%12 = bitcast i8* %11 to i32*
store i32* %12, i32** %9
%13 = load i32*, i32** %9
%14 = load i64, i64* %6
%15 = mul i64 %14, 4
%16 = load i64, i64* %7
%17 = load i32*, i32** %8
%18 = call i32 @rgph_u32x3_jenkins2v_data(i32* %13, i64 %15, i64 %16, i32* %17)
ret void
}

LLVM IR (-O2):
define void @rgph_u32x3_jenkins2v_u16a(i32* %0, i64 %1, i64 %2, i32* %3) {
%5 = shl i64 %1, 2
%6 = tail call i32 @rgph_u32x3_jenkins2v_data(i32* %0, i64 %5, i64 %2, i32* %3)
ret void
}
void mt_restore_generic_timer(unsigned int *container, int sw) {}


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

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

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

LLVM IR (-O2):
define void @mt_restore_generic_timer(i32* nocapture %0, i32 %1) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
int /*<<< orphan*/ stdout;
void load_cursor() { fprintf(stdout, "\33[u"); }


x86 assembly (clang, -O0):
<load_cursor>:
push   %rbp
mov    %rsp,%rbp
mov    0x2ec5(%rip),%rax
mov    (%rax),%edi
lea    0xedc(%rip),%rsi
call   1030 <fprintf@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<load_cursor>:
mov    0x2ec9(%rip),%rax
mov    (%rax),%edi
lea    0xee0(%rip),%rsi
jmp    1030 <fprintf@plt>

LLVM IR (-O0):
@stdout = global i32 0
@.str = [4 x i8] c"\1B[u\00"
define void @load_cursor() {
%1 = load i32, i32* @stdout
%2 = call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@stdout = global i32 0
@.str = [4 x i8] c"\1B[u\00"
define void @load_cursor() {
%1 = load i32, i32* @stdout
%2 = tail call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ cgcmp(char *);
void cgne() { cgcmp("je"); }


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

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

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

LLVM IR (-O2):
@.str = [3 x i8] c"je\00"
define void @cgne() {
%1 = tail call i32 @cgcmp(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0))
ret void
}
/* Variables and functions */
scalar_t__ isupper(int const);
int tolower(const int c) { return isupper(c) ? 'a' + (c - 'A') : c; }


x86 assembly (clang, -O0):
<tolower>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
call   1030 <isupper@plt>
cmp    $0x0,%rax
je     113e <tolower+0x2e>
mov    -0x4(%rbp),%eax
sub    $0x41,%eax
add    $0x61,%eax
mov    %eax,-0x8(%rbp)
jmp    1144 <tolower+0x34>
mov    -0x4(%rbp),%eax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<tolower>:
push   %rbx
mov    %edi,%ebx
call   1030 <isupper@plt>
lea    0x20(%rbx),%ecx
test   %rax,%rax
cmove  %ebx,%ecx
mov    %ecx,%eax
pop    %rbx
ret

LLVM IR (-O0):
define i32 @tolower(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = call i64 @isupper(i32 %3)
%5 = icmp ne i64 %4, 0
br i1 %5, label %6, label %10
6: ; preds = %1
%7 = load i32, i32* %2
%8 = sub nsw i32 %7, 65
%9 = add nsw i32 97, %8
br label %12
10: ; preds = %1
%11 = load i32, i32* %2
br label %12
12: ; preds = %10, %6
%13 = phi i32 [ %9, %6 ], [ %11, %10 ]
ret i32 %13
}

LLVM IR (-O2):
define i32 @tolower(i32 %0) {
%2 = tail call i64 @isupper(i32 %0)
%3 = icmp eq i64 %2, 0
%4 = add nsw i32 %0, 32
%5 = select i1 %3, i32 %0, i32 %4
ret i32 %5
}
/* Type definitions */
struct __test_metadata {
  int dummy;
};
struct __fixture_variant_metadata {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ epoll57(struct __test_metadata *);
void wrapper_epoll57(struct __test_metadata *_metadata,
                     struct __fixture_variant_metadata *variant) {
  epoll57(_metadata);
}


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

x86 assembly (clang, -O2):
<wrapper_epoll57>:
jmp    1030 <epoll57@plt>

LLVM IR (-O0):
%struct.__test_metadata = type { i32 }
%struct.__fixture_variant_metadata = type { i32 }
define void @wrapper_epoll57(%struct.__test_metadata* %0, %struct.__fixture_variant_metadata* %1) {
%3 = alloca %struct.__test_metadata*
%4 = alloca %struct.__fixture_variant_metadata*
store %struct.__test_metadata* %0, %struct.__test_metadata** %3
store %struct.__fixture_variant_metadata* %1, %struct.__fixture_variant_metadata** %4
%5 = load %struct.__test_metadata*, %struct.__test_metadata** %3
%6 = call i32 @epoll57(%struct.__test_metadata* %5)
ret void
}

LLVM IR (-O2):
%struct.__test_metadata = type { i32 }
%struct.__fixture_variant_metadata = type { i32 }
define void @wrapper_epoll57(%struct.__test_metadata* %0, %struct.__fixture_variant_metadata* nocapture readnone %1) {
%3 = tail call i32 @epoll57(%struct.__test_metadata* %0)
ret void
}
/* Type definitions */
struct io_file {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ F_WRLCK;
int __io_lock_record(struct io_file *, unsigned int, int /*<<< orphan*/);
int io_lock_record(struct io_file *mf, unsigned int slot) {
  return __io_lock_record(mf, slot, F_WRLCK);
}


x86 assembly (clang, -O0):
<io_lock_record>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
mov    0x2eb3(%rip),%rax
mov    (%rax),%edx
call   1030 <__io_lock_record@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<io_lock_record>:
mov    0x2ec9(%rip),%rax
mov    (%rax),%edx
jmp    1030 <__io_lock_record@plt>

LLVM IR (-O0):
%struct.io_file = type { i32 }
@F_WRLCK = global i32 0
define i32 @io_lock_record(%struct.io_file* %0, i32 %1) {
%3 = alloca %struct.io_file*
%4 = alloca i32
store %struct.io_file* %0, %struct.io_file** %3
store i32 %1, i32* %4
%5 = load %struct.io_file*, %struct.io_file** %3
%6 = load i32, i32* %4
%7 = load i32, i32* @F_WRLCK
%8 = call i32 @__io_lock_record(%struct.io_file* %5, i32 %6, i32 %7)
ret i32 %8
}

LLVM IR (-O2):
%struct.io_file = type { i32 }
@F_WRLCK = global i32 0
define i32 @io_lock_record(%struct.io_file* %0, i32 %1) {
%3 = load i32, i32* @F_WRLCK
%4 = tail call i32 @__io_lock_record(%struct.io_file* %0, i32 %1, i32 %3)
ret i32 %4
}
/* Type definitions */
typedef int uint8_t;
typedef int uint16_t;

/* Variables and functions */
void printByte(uint8_t byteToPrint) {
  uint16_t mask = (0x01 << 7);
  for (int bitIndex = 0; bitIndex < 8; bitIndex++) {
    if (byteToPrint & (mask >> bitIndex)) {
      ;
    } else {
      ;
    }
  }
}


x86 assembly (clang, -O0):
<printByte>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
movl   $0x80,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
cmpl   $0x8,-0xc(%rbp)
jge    1154 <printByte+0x54>
mov    -0x4(%rbp),%eax
mov    -0x8(%rbp),%edx
mov    -0xc(%rbp),%ecx
sar    %cl,%edx
mov    %edx,%ecx
and    %ecx,%eax
cmp    $0x0,%eax
je     113c <printByte+0x3c>
jmp    1141 <printByte+0x41>
jmp    1141 <printByte+0x41>
jmp    1146 <printByte+0x46>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1115 <printByte+0x15>
pop    %rbp
ret

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

LLVM IR (-O0):
define void @printByte(i32 %0) {
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %2
store i32 128, i32* %3
store i32 0, i32* %4
br label %5
5: ; preds = %18, %1
%6 = load i32, i32* %4
%7 = icmp slt i32 %6, 8
br i1 %7, label %8, label %21
8: ; preds = %5
%9 = load i32, i32* %2
%10 = load i32, i32* %3
%11 = load i32, i32* %4
%12 = ashr i32 %10, %11
%13 = and i32 %9, %12
%14 = icmp ne i32 %13, 0
br i1 %14, label %15, label %16
15: ; preds = %8
br label %17
16: ; preds = %8
br label %17
17: ; preds = %16, %15
br label %18
18: ; preds = %17
%19 = load i32, i32* %4
%20 = add nsw i32 %19, 1
store i32 %20, i32* %4
br label %5
21: ; preds = %5
ret void
}

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

/* Variables and functions */
int EINVAL;
__attribute__((visibility("default"))) int
sd_watchdog_enabled(int unset_environment, uint64_t *usec) {
  return -EINVAL;
}


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

x86 assembly (clang, -O2):
<sd_watchdog_enabled>:
mov    0x2ed9(%rip),%rcx
xor    %eax,%eax
sub    (%rcx),%eax
ret

LLVM IR (-O0):
@EINVAL = global i32 0
define i32 @sd_watchdog_enabled(i32 %0, i32* %1) {
%3 = alloca i32
%4 = alloca i32*
store i32 %0, i32* %3
store i32* %1, i32** %4
%5 = load i32, i32* @EINVAL
%6 = sub nsw i32 0, %5
ret i32 %6
}

LLVM IR (-O2):
@EINVAL = global i32 0
define i32 @sd_watchdog_enabled(i32 %0, i32* nocapture readnone %1) {
%3 = load i32, i32* @EINVAL
%4 = sub nsw i32 0, %3
ret i32 %4
}
/* Variables and functions */
scalar_t__ ispunct(char);
bool punct(char c) { return ispunct(c) && c != '_' && c != '"'; }


x86 assembly (clang, -O0):
<punct>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movsbl -0x1(%rbp),%edi
call   1030 <ispunct@plt>
mov    %rax,%rcx
xor    %eax,%eax
cmp    $0x0,%rcx
mov    %al,-0x2(%rbp)
je     1158 <punct+0x48>
movsbl -0x1(%rbp),%ecx
xor    %eax,%eax
cmp    $0x5f,%ecx
mov    %al,-0x2(%rbp)
je     1158 <punct+0x48>
movsbl -0x1(%rbp),%eax
cmp    $0x22,%eax
setne  %al
mov    %al,-0x2(%rbp)
mov    -0x2(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<punct>:
push   %rbx
mov    %edi,%ebx
call   1030 <ispunct@plt>
test   %rax,%rax
setne  %al
cmp    $0x5f,%bl
setne  %cl
cmp    $0x22,%bl
setne  %dl
and    %cl,%dl
and    %al,%dl
movzbl %dl,%eax
pop    %rbx
ret

LLVM IR (-O0):
define i32 @punct(i8 signext %0) {
%2 = alloca i8
store i8 %0, i8* %2
%3 = load i8, i8* %2
%4 = call i64 @ispunct(i8 signext %3)
%5 = icmp ne i64 %4, 0
br i1 %5, label %6, label %14
6: ; preds = %1
%7 = load i8, i8* %2
%8 = sext i8 %7 to i32
%9 = icmp ne i32 %8, 95
br i1 %9, label %10, label %14
10: ; preds = %6
%11 = load i8, i8* %2
%12 = sext i8 %11 to i32
%13 = icmp ne i32 %12, 34
br label %14
14: ; preds = %10, %6, %1
%15 = phi i1 [ false, %6 ], [ false, %1 ], [ %13, %10 ]
%16 = zext i1 %15 to i32
ret i32 %16
}

LLVM IR (-O2):
define i32 @punct(i8 signext %0) {
%2 = tail call i64 @ispunct(i8 signext %0)
%3 = icmp ne i64 %2, 0
%4 = icmp ne i8 %0, 95
%5 = and i1 %4, %3
%6 = icmp ne i8 %0, 34
%7 = and i1 %6, %5
%8 = zext i1 %7 to i32
ret i32 %8
}
/* Variables and functions */
char const *unctrl(unsigned int);
const char *wrap_unctrl(unsigned int c) { return unctrl(c); }


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

x86 assembly (clang, -O2):
<wrap_unctrl>:
jmp    1030 <unctrl@plt>

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

LLVM IR (-O2):
define i8* @wrap_unctrl(i32 %0) {
%2 = tail call i8* @unctrl(i32 %0)
ret i8* %2
}
int between(x, a, b)
double x, a, b;
{
  double tmp;
  tmp = (x - a) * (x - b);
  if (tmp <= 0.0)
    return (1);
  else
    return (0);
}


x86 assembly (clang, -O0):
<between>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x10(%rbp)
movsd  %xmm1,-0x18(%rbp)
movsd  %xmm2,-0x20(%rbp)
movsd  -0x10(%rbp),%xmm0
subsd  -0x18(%rbp),%xmm0
movsd  -0x10(%rbp),%xmm1
subsd  -0x20(%rbp),%xmm1
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0x28(%rbp)
xorps  %xmm0,%xmm0
ucomisd -0x28(%rbp),%xmm0
jb     114a <between+0x4a>
movl   $0x1,-0x4(%rbp)
jmp    1151 <between+0x51>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<between>:
movapd %xmm0,%xmm3
subsd  %xmm1,%xmm3
subsd  %xmm2,%xmm0
mulsd  %xmm3,%xmm0
xorpd  %xmm1,%xmm1
xor    %eax,%eax
ucomisd %xmm0,%xmm1
setae  %al
ret

LLVM IR (-O0):
define i32 @between(double %0, double %1, double %2) {
%4 = alloca i32
%5 = alloca double
%6 = alloca double
%7 = alloca double
%8 = alloca double
store double %0, double* %5
store double %1, double* %6
store double %2, double* %7
%9 = load double, double* %5
%10 = load double, double* %6
%11 = fsub double %9, %10
%12 = load double, double* %5
%13 = load double, double* %7
%14 = fsub double %12, %13
%15 = fmul double %11, %14
store double %15, double* %8
%16 = load double, double* %8
%17 = fcmp ole double %16, 0.000000e+00
br i1 %17, label %18, label %19
18: ; preds = %3
store i32 1, i32* %4
br label %20
19: ; preds = %3
store i32 0, i32* %4
br label %20
20: ; preds = %19, %18
%21 = load i32, i32* %4
ret i32 %21
}

LLVM IR (-O2):
define i32 @between(double %0, double %1, double %2) {
%4 = fsub double %0, %1
%5 = fsub double %0, %2
%6 = fmul double %4, %5
%7 = fcmp ole double %6, 0.000000e+00
%8 = zext i1 %7 to i32
ret i32 %8
}
/* Variables and functions */
int /*<<< orphan*/ usleep(int);
void util_sleep(int ms) { usleep(ms * 1000); }


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

x86 assembly (clang, -O2):
<util_sleep>:
imul   $0x3e8,%edi,%edi
jmp    1030 <usleep@plt>

LLVM IR (-O0):
define void @util_sleep(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = mul nsw i32 %3, 1000
%5 = call i32 @usleep(i32 %4)
ret void
}

LLVM IR (-O2):
define void @util_sleep(i32 %0) {
%2 = mul nsw i32 %0, 1000
%3 = tail call i32 @usleep(i32 %2)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
int /*<<< orphan*/ scanf(char *, int *, int *);
int main() {
  int a, b;
  scanf("%d %d", &a, &b);
  printf("SOMA = %d\n", (a + b));
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeca(%rip),%rdi
lea    -0x8(%rbp),%rsi
lea    -0xc(%rbp),%rdx
call   1040 <scanf@plt>
mov    -0x8(%rbp),%esi
add    -0xc(%rbp),%esi
lea    0xeb6(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xed8(%rip),%rdi
lea    0x4(%rsp),%rsi
mov    %rsp,%rdx
call   1040 <scanf@plt>
mov    (%rsp),%esi
add    0x4(%rsp),%esi
lea    0xec3(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
@.str = [6 x i8] c"%d %d\00"
@.str.1 = [11 x i8] c"SOMA = %d\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = bitcast i32* %1 to i8*
%4 = bitcast i32* %2 to i8*
%5 = call i32 @scanf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i32* %1, i32* %2)
%6 = load i32, i32* %1
%7 = load i32, i32* %2
%8 = add nsw i32 %7, %6
%9 = call i32 @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.1, i64 0, i64 0), i32 %8)
ret i32 0
}
/* Variables and functions */
int foo(int /*<<< orphan*/);
int main(void) { return foo(0); }


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

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

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

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 @foo(i32 0)
ret i32 %1
}
void IPCMtoCFlagSet(unsigned long ulFlags) {
  (*((volatile unsigned long *)(0x400FB700 + 0x000000008))) |= ulFlags;
}


x86 assembly (clang, -O0):
<IPCMtoCFlagSet>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    $0x400fb708,%ecx
mov    (%rcx),%rcx
or     %rax,%rcx
mov    $0x400fb708,%eax
mov    %rcx,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<IPCMtoCFlagSet>:
or     %rdi,0x400fb708
40
ret

LLVM IR (-O0):
define void @IPCMtoCFlagSet(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = load i64, i64* %2
%4 = load volatile i64, i64* inttoptr (i64 1074771720 to i64*)
%5 = or i64 %4, %3
store volatile i64 %5, i64* inttoptr (i64 1074771720 to i64*)
ret void
}

LLVM IR (-O2):
define void @IPCMtoCFlagSet(i64 %0) {
%2 = load volatile i64, i64* inttoptr (i64 1074771720 to i64*)
%3 = or i64 %2, %0
store volatile i64 %3, i64* inttoptr (i64 1074771720 to i64*)
ret void
}
int video_width(struct host *base) { return 0; }


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

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

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

LLVM IR (-O2):
%struct.host = type opaque
define i32 @video_width(%struct.host* nocapture readnone %0) {
ret i32 0
}
/* Type definitions */
typedef int /*<<< orphan*/ uint8_t;
struct lu_phy_attr {
  int dummy;
};

/* Variables and functions */
uint8_t ibm_media_load(struct lu_phy_attr *lu, int load) {
  ;
  return 0;
}


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

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

LLVM IR (-O0):
%struct.lu_phy_attr = type { i32 }
define i32 @ibm_media_load(%struct.lu_phy_attr* %0, i32 %1) {
%3 = alloca %struct.lu_phy_attr*
%4 = alloca i32
store %struct.lu_phy_attr* %0, %struct.lu_phy_attr** %3
store i32 %1, i32* %4
ret i32 0
}

LLVM IR (-O2):
%struct.lu_phy_attr = type { i32 }
define i32 @ibm_media_load(%struct.lu_phy_attr* nocapture readnone %0, i32 %1) {
ret i32 0
}
/* Variables and functions */
char *lstrip(int /*<<< orphan*/);
int /*<<< orphan*/ rstrip(char *);
char *strip(char *str) { return lstrip(rstrip(str)); }


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

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

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

LLVM IR (-O2):
define i8* @strip(i8* %0) {
%2 = tail call i32 @rstrip(i8* %0)
%3 = tail call i8* @lstrip(i32 %2)
ret i8* %3
}
/* Variables and functions */
char *Key_GetBinding(int);
int /*<<< orphan*/ Q_strncpyz(char *, char const *, int);
void Key_GetBindingBuf(int keynum, char *buf, int buflen) {
  const char *value;
  value = Key_GetBinding(keynum);
  if (value) {
    Q_strncpyz(buf, value, buflen);
  } else {
    *buf = '\0';
  }
}


x86 assembly (clang, -O0):
<Key_GetBindingBuf>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    -0x4(%rbp),%edi
call   1030 <Key_GetBinding@plt>
mov    %rax,-0x20(%rbp)
cmpq   $0x0,-0x20(%rbp)
je     115e <Key_GetBindingBuf+0x3e>
mov    -0x10(%rbp),%rdi
mov    -0x20(%rbp),%rsi
mov    -0x14(%rbp),%edx
call   1040 <Q_strncpyz@plt>
jmp    1165 <Key_GetBindingBuf+0x45>
mov    -0x10(%rbp),%rax
movb   $0x0,(%rax)
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Key_GetBindingBuf>:
push   %rbp
push   %rbx
push   %rax
mov    %edx,%ebp
mov    %rsi,%rbx
call   1030 <Key_GetBinding@plt>
test   %rax,%rax
je     1145 <Key_GetBindingBuf+0x25>
mov    %rbx,%rdi
mov    %rax,%rsi
mov    %ebp,%edx
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    1040 <Q_strncpyz@plt>
movb   $0x0,(%rbx)
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
define void @Key_GetBindingBuf(i32 %0, i8* %1, i32 %2) {
%4 = alloca i32
%5 = alloca i8*
%6 = alloca i32
%7 = alloca i8*
store i32 %0, i32* %4
store i8* %1, i8** %5
store i32 %2, i32* %6
%8 = load i32, i32* %4
%9 = call i8* @Key_GetBinding(i32 %8)
store i8* %9, i8** %7
%10 = load i8*, i8** %7
%11 = icmp ne i8* %10, null
br i1 %11, label %12, label %17
12: ; preds = %3
%13 = load i8*, i8** %5
%14 = load i8*, i8** %7
%15 = load i32, i32* %6
%16 = call i32 @Q_strncpyz(i8* %13, i8* %14, i32 %15)
br label %19
17: ; preds = %3
%18 = load i8*, i8** %5
store i8 0, i8* %18
br label %19
19: ; preds = %17, %12
ret void
}

LLVM IR (-O2):
define void @Key_GetBindingBuf(i32 %0, i8* %1, i32 %2) {
%4 = tail call i8* @Key_GetBinding(i32 %0)
%5 = icmp eq i8* %4, null
br i1 %5, label %8, label %6
6: ; preds = %3
%7 = tail call i32 @Q_strncpyz(i8* %1, i8* %4, i32 %2)
br label %9
8: ; preds = %3
store i8 0, i8* %1
br label %9
9: ; preds = %8, %6
ret void
}
/* Variables and functions */
int /*<<< orphan*/ getmaxyx(int /*<<< orphan*/, int, int);
int /*<<< orphan*/ mvprintw(int, int, char *, char);
int /*<<< orphan*/ stdscr;
void fill_vert(char ch, int col) {
  int y, x;
  (void)(y);
  getmaxyx(stdscr, y, x);
  for (int i = 0; i < x; i++) {
    mvprintw(i, col, "%c", ch);
  }
}


x86 assembly (clang, -O0):
<fill_vert>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %dil,%al
mov    %al,-0x1(%rbp)
mov    %esi,-0x8(%rbp)
mov    0x2eb0(%rip),%rax
mov    (%rax),%edi
mov    -0xc(%rbp),%esi
mov    -0x10(%rbp),%edx
call   1030 <getmaxyx@plt>
movl   $0x0,-0x14(%rbp)
mov    -0x14(%rbp),%eax
cmp    -0x10(%rbp),%eax
jge    117c <fill_vert+0x5c>
mov    -0x14(%rbp),%edi
mov    -0x8(%rbp),%esi
lea    0xe9b(%rip),%rdx
movsbl -0x1(%rbp),%ecx
call   1040 <mvprintw@plt>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    114c <fill_vert+0x2c>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fill_vert>:
mov    0x2ed1(%rip),%rax
mov    (%rax),%edi
jmp    1030 <getmaxyx@plt>

LLVM IR (-O0):
@stdscr = global i32 0
@.str = [3 x i8] c"%c\00"
define void @fill_vert(i8 signext %0, i32 %1) {
%3 = alloca i8
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
store i8 %0, i8* %3
store i32 %1, i32* %4
%8 = load i32, i32* %5
%9 = load i32, i32* @stdscr
%10 = load i32, i32* %5
%11 = load i32, i32* %6
%12 = call i32 @getmaxyx(i32 %9, i32 %10, i32 %11)
store i32 0, i32* %7
br label %13
13: ; preds = %22, %2
%14 = load i32, i32* %7
%15 = load i32, i32* %6
%16 = icmp slt i32 %14, %15
br i1 %16, label %17, label %25
17: ; preds = %13
%18 = load i32, i32* %7
%19 = load i32, i32* %4
%20 = load i8, i8* %3
%21 = call i32 @mvprintw(i32 %18, i32 %19, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8 signext %20)
br label %22
22: ; preds = %17
%23 = load i32, i32* %7
%24 = add nsw i32 %23, 1
store i32 %24, i32* %7
br label %13
25: ; preds = %13
ret void
}

LLVM IR (-O2):
@stdscr = global i32 0
define void @fill_vert(i8 signext %0, i32 %1) {
%3 = load i32, i32* @stdscr
%4 = tail call i32 @getmaxyx(i32 %3, i32 undef, i32 undef)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ sqlite3_file;

/* Variables and functions */
void memShmBarrier(sqlite3_file *pFile) { return; }


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

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

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

LLVM IR (-O2):
define void @memShmBarrier(i32* nocapture %0) {
ret void
}
/* Variables and functions */
char const *strdup(char *);
const char *clingPrint_TestEmpty() { return strdup("** TestEmpty **"); }


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

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

LLVM IR (-O0):
@.str = [16 x i8] c"** TestEmpty **\00"
define i8* @clingPrint_TestEmpty() {
%1 = call i8* @strdup(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0))
ret i8* %1
}

LLVM IR (-O2):
@.str = [16 x i8] c"** TestEmpty **\00"
define noalias i8* @clingPrint_TestEmpty() {
%1 = tail call dereferenceable_or_null(16) i8* @strdup(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0))
ret i8* %1
}
/* Variables and functions */
int check_nan(double *, int const);
int test2() {
  const int n = 4;
  const double nan = (double)0.0 / (double)0.0;
  double arr[] = {0.0, 1.0, nan, 3.0};
  int i = check_nan(arr, n);
  return (i == 2);
}


x86 assembly (clang, -O0):
<test2>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
movl   $0x4,-0x4(%rbp)
movsd  0xed9(%rip),%xmm0
movsd  %xmm0,-0x10(%rbp)
mov    0xedd(%rip),%rax
mov    %rax,-0x30(%rbp)
mov    0xeda(%rip),%rax
mov    %rax,-0x28(%rbp)
mov    0xed7(%rip),%rax
mov    %rax,-0x20(%rbp)
mov    0xed4(%rip),%rax
mov    %rax,-0x18(%rbp)
lea    -0x30(%rbp),%rdi
mov    $0x4,%esi
call   1030 <check_nan@plt>
mov    %eax,-0x34(%rbp)
cmpl   $0x2,-0x34(%rbp)
sete   %al
and    $0x1,%al
movzbl %al,%eax
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test2>:
sub    $0x28,%rsp
movaps 0xef5(%rip),%xmm0
movaps %xmm0,0x10(%rsp)
movaps 0xed9(%rip),%xmm0
movaps %xmm0,(%rsp)
mov    %rsp,%rdi
mov    $0x4,%esi
call   1030 <check_nan@plt>
xor    %ecx,%ecx
cmp    $0x2,%eax
sete   %cl
mov    %ecx,%eax
add    $0x28,%rsp
ret

LLVM IR (-O0):
@__const.test2.arr = [4 x double] [double 0.000000e+00, double 1.000000e+00, double 0x7FF8000000000000, double 3.000000e+00]
define i32 @test2() {
%1 = alloca i32
%2 = alloca double
%3 = alloca [4 x double]
%4 = alloca i32
store i32 4, i32* %1
store double 0x7FF8000000000000, double* %2
%5 = bitcast [4 x double]* %3 to i8*
%6 = getelementptr inbounds [4 x double], [4 x double]* %3, i64 0, i64 0
%7 = call i32 @check_nan(double* %6, i32 4)
store i32 %7, i32* %4
%8 = load i32, i32* %4
%9 = icmp eq i32 %8, 2
%10 = zext i1 %9 to i32
ret i32 %10
}

LLVM IR (-O2):
@__const.test2.arr = [4 x double] [double 0.000000e+00, double 1.000000e+00, double 0x7FF8000000000000, double 3.000000e+00]
define i32 @test2() {
%1 = alloca [4 x double]
%2 = bitcast [4 x double]* %1 to i8*
%3 = getelementptr inbounds [4 x double], [4 x double]* %1, i64 0, i64 0
%4 = call i32 @check_nan(double* %3, i32 4)
%5 = icmp eq i32 %4, 2
%6 = zext i1 %5 to i32
ret i32 %6
}
/* Variables and functions */
scalar_t__ crypt(char const *, char const *);
int /*<<< orphan*/ strcmp(char *, char const *);
int passwds_match_p(const char *cleartext, const char *ciphertext) {
  char *s = 0;
  s = (char *)crypt(cleartext, ciphertext);
  if (s && !strcmp(s, ciphertext))
    return 1;
  return 0;
}


x86 assembly (clang, -O0):
<passwds_match_p>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
movq   $0x0,-0x20(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x18(%rbp),%rsi
call   1030 <crypt@plt>
mov    %rax,-0x20(%rbp)
cmpq   $0x0,-0x20(%rbp)
je     1176 <passwds_match_p+0x56>
mov    -0x20(%rbp),%rdi
mov    -0x18(%rbp),%rsi
call   1040 <strcmp@plt>
cmp    $0x0,%eax
jne    1176 <passwds_match_p+0x56>
movl   $0x1,-0x4(%rbp)
jmp    117d <passwds_match_p+0x5d>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<passwds_match_p>:
push   %rbx
mov    %rsi,%rbx
call   1030 <crypt@plt>
test   %rax,%rax
je     113d <passwds_match_p+0x1d>
mov    %rax,%rdi
mov    %rbx,%rsi
call   1040 <strcmp@plt>
test   %eax,%eax
je     1141 <passwds_match_p+0x21>
xor    %eax,%eax
pop    %rbx
ret
mov    $0x1,%eax
pop    %rbx
ret

LLVM IR (-O0):
define i32 @passwds_match_p(i8* %0, i8* %1) {
%3 = alloca i32
%4 = alloca i8*
%5 = alloca i8*
%6 = alloca i8*
store i8* %0, i8** %4
store i8* %1, i8** %5
store i8* null, i8** %6
%7 = load i8*, i8** %4
%8 = load i8*, i8** %5
%9 = call i64 @crypt(i8* %7, i8* %8)
%10 = inttoptr i64 %9 to i8*
store i8* %10, i8** %6
%11 = load i8*, i8** %6
%12 = icmp ne i8* %11, null
br i1 %12, label %13, label %19
13: ; preds = %2
%14 = load i8*, i8** %6
%15 = load i8*, i8** %5
%16 = call i32 @strcmp(i8* %14, i8* %15)
%17 = icmp ne i32 %16, 0
br i1 %17, label %19, label %18
18: ; preds = %13
store i32 1, i32* %3
br label %20
19: ; preds = %13, %2
store i32 0, i32* %3
br label %20
20: ; preds = %19, %18
%21 = load i32, i32* %3
ret i32 %21
}

LLVM IR (-O2):
define i32 @passwds_match_p(i8* %0, i8* %1) {
%3 = tail call i64 @crypt(i8* %0, i8* %1)
%4 = icmp eq i64 %3, 0
br i1 %4, label %9, label %5
5: ; preds = %2
%6 = inttoptr i64 %3 to i8*
%7 = tail call i32 @strcmp(i8* %6, i8* dereferenceable(1) %1)
%8 = icmp eq i32 %7, 0
br i1 %8, label %10, label %9
9: ; preds = %5, %2
br label %10
10: ; preds = %5, %9
%11 = phi i32 [ 0, %9 ], [ 1, %5 ]
ret i32 %11
}
/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
int /*<<< orphan*/ stdout;
void printUsage() {
  fprintf(stdout, "Usage: irdc4cube -c configfile [-d device dir] [-h]\n");
}


x86 assembly (clang, -O0):
<printUsage>:
push   %rbp
mov    %rsp,%rbp
mov    0x2ec5(%rip),%rax
mov    (%rax),%edi
lea    0xedc(%rip),%rsi
call   1030 <fprintf@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<printUsage>:
mov    0x2ec9(%rip),%rax
mov    (%rax),%edi
lea    0xee0(%rip),%rsi
jmp    1030 <fprintf@plt>

LLVM IR (-O0):
@stdout = global i32 0
@.str = [53 x i8] c"Usage: irdc4cube -c configfile [-d device dir] [-h]\0A\00"
define void @printUsage() {
%1 = load i32, i32* @stdout
%2 = call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([53 x i8], [53 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@stdout = global i32 0
@.str = [53 x i8] c"Usage: irdc4cube -c configfile [-d device dir] [-h]\0A\00"
define void @printUsage() {
%1 = load i32, i32* @stdout
%2 = tail call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([53 x i8], [53 x i8]* @.str, i64 0, i64 0))
ret void
}
double CCutil_zeit(void) { return 0.0; }


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

x86 assembly (clang, -O2):
<CCutil_zeit>:
xorps  %xmm0,%xmm0
ret

LLVM IR (-O0):
define double @CCutil_zeit() {
ret double 0.000000e+00
}

LLVM IR (-O2):
define double @CCutil_zeit() {
ret double 0.000000e+00
}
/* Variables and functions */
int lambda(int);
int lambda3(int body) { return lambda(lambda(lambda(body))); }


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

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

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

LLVM IR (-O2):
define i32 @lambda3(i32 %0) {
%2 = tail call i32 @lambda(i32 %0)
%3 = tail call i32 @lambda(i32 %2)
%4 = tail call i32 @lambda(i32 %3)
ret i32 %4
}
/* Type definitions */
struct l_class_OC_small {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ _ZN5smallD1Ev(struct l_class_OC_small *);
int /*<<< orphan*/ _ZdlPv(unsigned char *);
void _ZN5smallD0Ev(struct l_class_OC_small *llvm_cbe_this) {
  struct l_class_OC_small *llvm_cbe_this_2e_addr;
  struct l_class_OC_small *llvm_cbe_this1;
  *(&llvm_cbe_this_2e_addr) = llvm_cbe_this;
  llvm_cbe_this1 = *(&llvm_cbe_this_2e_addr);
  _ZN5smallD1Ev(llvm_cbe_this1);
  _ZdlPv((((unsigned char *)llvm_cbe_this1)));
  return;
}


x86 assembly (clang, -O0):
<_ZN5smallD0Ev>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rdi
call   1040 <_ZN5smallD1Ev@plt>
mov    -0x18(%rbp),%rdi
call   1030 <_ZdlPv@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<_ZN5smallD0Ev>:
push   %rbx
mov    %rdi,%rbx
call   1040 <_ZN5smallD1Ev@plt>
mov    %rbx,%rdi
pop    %rbx
jmp    1030 <_ZdlPv@plt>

LLVM IR (-O0):
%struct.l_class_OC_small = type { i32 }
define void @_ZN5smallD0Ev(%struct.l_class_OC_small* %0) {
%2 = alloca %struct.l_class_OC_small*
%3 = alloca %struct.l_class_OC_small*
%4 = alloca %struct.l_class_OC_small*
store %struct.l_class_OC_small* %0, %struct.l_class_OC_small** %2
%5 = load %struct.l_class_OC_small*, %struct.l_class_OC_small** %2
store %struct.l_class_OC_small* %5, %struct.l_class_OC_small** %3
%6 = load %struct.l_class_OC_small*, %struct.l_class_OC_small** %3
store %struct.l_class_OC_small* %6, %struct.l_class_OC_small** %4
%7 = load %struct.l_class_OC_small*, %struct.l_class_OC_small** %4
%8 = call i32 @_ZN5smallD1Ev(%struct.l_class_OC_small* %7)
%9 = load %struct.l_class_OC_small*, %struct.l_class_OC_small** %4
%10 = bitcast %struct.l_class_OC_small* %9 to i8*
%11 = call i32 @_ZdlPv(i8* %10)
ret void
}

LLVM IR (-O2):
%struct.l_class_OC_small = type { i32 }
define void @_ZN5smallD0Ev(%struct.l_class_OC_small* %0) {
%2 = tail call i32 @_ZN5smallD1Ev(%struct.l_class_OC_small* %0)
%3 = bitcast %struct.l_class_OC_small* %0 to i8*
%4 = tail call i32 @_ZdlPv(i8* %3)
ret void
}