xunge/DecIR huggingface dataset:
void g_key_file_get_keys() {}


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

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

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

LLVM IR (-O2):
define void @g_key_file_get_keys() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ gl2psPrintf(char *, unsigned char, unsigned char);
void gl2psWriteByte(unsigned char byte) {
  unsigned char h = byte / 16;
  unsigned char l = byte % 16;
  gl2psPrintf("%x%x", h, l);
}


x86 assembly (clang, -O0):
<gl2psWriteByte>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movzbl -0x1(%rbp),%eax
mov    $0x10,%ecx
cltd
idiv   %ecx
mov    %al,-0x2(%rbp)
movzbl -0x1(%rbp),%eax
mov    $0x10,%ecx
cltd
idiv   %ecx
mov    %dl,%al
mov    %al,-0x3(%rbp)
mov    -0x2(%rbp),%al
lea    0xeb8(%rip),%rdi
movzbl %al,%esi
movzbl -0x3(%rbp),%edx
call   1030 <gl2psPrintf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<gl2psWriteByte>:
mov    %edi,%edx
mov    %edx,%eax
shr    $0x4,%al
and    $0xf,%edx
movzbl %al,%esi
lea    0xedc(%rip),%rdi
jmp    1030 <gl2psPrintf@plt>

LLVM IR (-O0):
@.str = [5 x i8] c"%x%x\00"
define void @gl2psWriteByte(i8 zeroext %0) {
%2 = alloca i8
%3 = alloca i8
%4 = alloca i8
store i8 %0, i8* %2
%5 = load i8, i8* %2
%6 = zext i8 %5 to i32
%7 = sdiv i32 %6, 16
%8 = trunc i32 %7 to i8
store i8 %8, i8* %3
%9 = load i8, i8* %2
%10 = zext i8 %9 to i32
%11 = srem i32 %10, 16
%12 = trunc i32 %11 to i8
store i8 %12, i8* %4
%13 = load i8, i8* %3
%14 = load i8, i8* %4
%15 = call i32 @gl2psPrintf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i8 zeroext %13, i8 zeroext %14)
ret void
}

LLVM IR (-O2):
@.str = [5 x i8] c"%x%x\00"
define void @gl2psWriteByte(i8 zeroext %0) {
%2 = lshr i8 %0, 4
%3 = and i8 %0, 15
%4 = tail call i32 @gl2psPrintf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i8 zeroext %2, i8 zeroext %3)
ret void
}
/* Variables and functions */
long _xte_utf8_count_chars_between(char const *, char const *const);
long xte_cstring_chars_between(char const *in_begin, char const *const in_end) {
  return _xte_utf8_count_chars_between(in_begin, in_end);
}


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

x86 assembly (clang, -O2):
<xte_cstring_chars_between>:
jmp    1030 <_xte_utf8_count_chars_between@plt>

LLVM IR (-O0):
define i64 @xte_cstring_chars_between(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 = load i8*, i8** %4
%7 = call i64 @_xte_utf8_count_chars_between(i8* %5, i8* %6)
ret i64 %7
}

LLVM IR (-O2):
define i64 @xte_cstring_chars_between(i8* %0, i8* %1) {
%3 = tail call i64 @_xte_utf8_count_chars_between(i8* %0, i8* %1)
ret i64 %3
}
/* Variables and functions */
int /*<<< orphan*/ usleep(int);
void EsperarMiliSeg(int t) {
  usleep(t * 100);
  return;
}


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

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

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

LLVM IR (-O2):
define void @EsperarMiliSeg(i32 %0) {
%2 = mul nsw i32 %0, 100
%3 = tail call i32 @usleep(i32 %2)
ret void
}
unsigned int config_cmd(unsigned char bus, unsigned devfn, unsigned where) {
  return 0x80000000 | (bus << 16) | (devfn << 8) | (where & ~3);
}


x86 assembly (clang, -O0):
<config_cmd>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x1(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
movzbl -0x1(%rbp),%eax
shl    $0x10,%eax
or     $0x80000000,%eax
mov    -0x8(%rbp),%ecx
shl    $0x8,%ecx
or     %ecx,%eax
mov    -0xc(%rbp),%ecx
and    $0xfffffffc,%ecx
or     %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<config_cmd>:
mov    %edx,%eax
shl    $0x10,%edi
shl    $0x8,%esi
or     %edi,%esi
and    $0x7ffffffc,%eax
or     %esi,%eax
or     $0x80000000,%eax
ret

LLVM IR (-O0):
define i32 @config_cmd(i8 zeroext %0, i32 %1, i32 %2) {
%4 = alloca i8
%5 = alloca i32
%6 = alloca i32
store i8 %0, i8* %4
store i32 %1, i32* %5
store i32 %2, i32* %6
%7 = load i8, i8* %4
%8 = zext i8 %7 to i32
%9 = shl i32 %8, 16
%10 = or i32 -2147483648, %9
%11 = load i32, i32* %5
%12 = shl i32 %11, 8
%13 = or i32 %10, %12
%14 = load i32, i32* %6
%15 = and i32 %14, -4
%16 = or i32 %13, %15
ret i32 %16
}

LLVM IR (-O2):
define i32 @config_cmd(i8 zeroext %0, i32 %1, i32 %2) {
%4 = zext i8 %0 to i32
%5 = shl nuw nsw i32 %4, 16
%6 = shl i32 %1, 8
%7 = and i32 %2, 2147483644
%8 = or i32 %6, %5
%9 = or i32 %8, %7
%10 = or i32 %9, -2147483648
ret i32 %10
}
/* Variables and functions */
scalar_t__ __builtin_dremf(float, float);
int /*<<< orphan*/ link_failure_builtin_dremf();
void test_builtin_dremf(float f1, float f2) {
  if (__builtin_dremf(f1, f2) != __builtin_dremf(f1, f2))
    link_failure_builtin_dremf();
}


x86 assembly (clang, -O0):
<test_builtin_dremf>:
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_dremf@plt>
mov    %rax,-0x10(%rbp)
movss  -0x4(%rbp),%xmm0
movss  -0x8(%rbp),%xmm1
call   1030 <__builtin_dremf@plt>
mov    %rax,%rcx
mov    -0x10(%rbp),%rax
cmp    %rcx,%rax
je     116b <test_builtin_dremf+0x4b>
mov    $0x0,%al
call   1040 <link_failure_builtin_dremf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_builtin_dremf>:
push   %rbx
sub    $0x10,%rsp
movss  %xmm1,0xc(%rsp)
movss  %xmm0,0x8(%rsp)
call   1030 <__builtin_dremf@plt>
mov    %rax,%rbx
movss  0x8(%rsp),%xmm0
movss  0xc(%rsp),%xmm1
call   1030 <__builtin_dremf@plt>
cmp    %rax,%rbx
jne    1155 <test_builtin_dremf+0x35>
add    $0x10,%rsp
pop    %rbx
ret
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbx
jmp    1040 <link_failure_builtin_dremf@plt>

LLVM IR (-O0):
define void @test_builtin_dremf(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 i64 @__builtin_dremf(float %5, float %6)
%8 = load float, float* %3
%9 = load float, float* %4
%10 = call i64 @__builtin_dremf(float %8, float %9)
%11 = icmp ne i64 %7, %10
br i1 %11, label %12, label %14
12: ; preds = %2
%13 = call i32 (...) @link_failure_builtin_dremf()
br label %14
14: ; preds = %12, %2
ret void
}

LLVM IR (-O2):
define void @test_builtin_dremf(float %0, float %1) {
%3 = tail call i64 @__builtin_dremf(float %0, float %1)
%4 = tail call i64 @__builtin_dremf(float %0, float %1)
%5 = icmp eq i64 %3, %4
br i1 %5, label %8, label %6
6: ; preds = %2
%7 = tail call i32 (...) @link_failure_builtin_dremf()
br label %8
8: ; preds = %6, %2
ret void
}
/* Variables and functions */
double pow(int, double);
double bmp_qnh(double p, double StationAlt) {
  return p / pow((1 - (StationAlt / 145437.86)), 5.255);
}


x86 assembly (clang, -O0):
<bmp_qnh>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  -0x8(%rbp),%xmm0
movsd  %xmm0,-0x18(%rbp)
movsd  -0x10(%rbp),%xmm1
movsd  0xed7(%rip),%xmm0
divsd  %xmm0,%xmm1
movsd  0xec3(%rip),%xmm0
subsd  %xmm1,%xmm0
cvttsd2si %xmm0,%edi
movsd  0xeab(%rip),%xmm0
call   1030 <pow@plt>
movaps %xmm0,%xmm1
movsd  -0x18(%rbp),%xmm0
divsd  %xmm1,%xmm0
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<bmp_qnh>:
push   %rax
movsd  %xmm0,(%rsp)
divsd  0xee2(%rip),%xmm1
addsd  0xee2(%rip),%xmm1
cvttsd2si %xmm1,%edi
movsd  0xede(%rip),%xmm0
call   1030 <pow@plt>
movsd  (%rsp),%xmm1
divsd  %xmm0,%xmm1
movapd %xmm1,%xmm0
pop    %rax
ret

LLVM IR (-O0):
define double @bmp_qnh(double %0, double %1) {
%3 = alloca double
%4 = alloca double
store double %0, double* %3
store double %1, double* %4
%5 = load double, double* %3
%6 = load double, double* %4
%7 = fdiv double %6, 0x4101C0EEE147AE14
%8 = fsub double 1.000000e+00, %7
%9 = fptosi double %8 to i32
%10 = call double @pow(i32 %9, double 5.255000e+00)
%11 = fdiv double %5, %10
ret double %11
}

LLVM IR (-O2):
define double @bmp_qnh(double %0, double %1) {
%3 = fdiv double %1, 0x4101C0EEE147AE14
%4 = fsub double 1.000000e+00, %3
%5 = fptosi double %4 to i32
%6 = tail call double @pow(i32 %5, double 5.255000e+00)
%7 = fdiv double %0, %6
ret double %7
}
/* Variables and functions */
char *biggest_suffix(char *, char *);
int /*<<< orphan*/ printf(char *, char *);
int /*<<< orphan*/ scanf(char *, char *);
int main(void) {
  char s1[100];
  char s2[100];
  scanf("%s", s1);
  scanf("%s", s2);
  printf("Biggest suffix is: %s\n", biggest_suffix(s1, s2));
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0xe0,%rsp
movl   $0x0,-0x4(%rbp)
lea    -0x70(%rbp),%rsi
lea    0xeb3(%rip),%rdi
call   1040 <scanf@plt>
lea    -0xe0(%rbp),%rsi
lea    0xea0(%rip),%rdi
call   1040 <scanf@plt>
lea    -0x70(%rbp),%rdi
lea    -0xe0(%rbp),%rsi
call   1050 <biggest_suffix@plt>
mov    %rax,%rsi
lea    0xe84(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0xe0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r15
push   %r14
push   %rbx
sub    $0xe0,%rsp
lea    0xebd(%rip),%r15
lea    0x70(%rsp),%r14
mov    %r15,%rdi
mov    %r14,%rsi
call   1040 <scanf@plt>
mov    %rsp,%rbx
mov    %r15,%rdi
mov    %rbx,%rsi
call   1040 <scanf@plt>
mov    %r14,%rdi
mov    %rbx,%rsi
call   1050 <biggest_suffix@plt>
lea    0xe90(%rip),%rdi
mov    %rax,%rsi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0xe0,%rsp
pop    %rbx
pop    %r14
pop    %r15
ret

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

LLVM IR (-O2):
@.str = [3 x i8] c"%s\00"
@.str.1 = [23 x i8] c"Biggest suffix is: %s\0A\00"
define i32 @main() {
%1 = alloca [100 x i8]
%2 = alloca [100 x i8]
%3 = getelementptr inbounds [100 x i8], [100 x i8]* %1, i64 0, i64 0
%4 = getelementptr inbounds [100 x i8], [100 x i8]* %2, i64 0, i64 0
%5 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* %3)
%6 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* %4)
%7 = call i8* @biggest_suffix(i8* %3, i8* %4)
%8 = call i32 @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.1, i64 0, i64 0), i8* %7)
ret i32 0
}
/* Variables and functions */
void *memmem(void const *, size_t, void const *, size_t);
void *jet_memmem(const void *haystack, size_t haystacklen, const void *needle,
                 size_t needlelen) {
  return memmem(haystack, haystacklen, needle, needlelen);
}


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

x86 assembly (clang, -O2):
<jet_memmem>:
jmp    1030 <memmem@plt>

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

LLVM IR (-O2):
define i8* @jet_memmem(i8* %0, i64 %1, i8* %2, i64 %3) {
%5 = tail call i8* @memmem(i8* %0, i64 %1, i8* %2, i64 %3)
ret i8* %5
}
/* Variables and functions */
int /*<<< orphan*/ op_to_ccr(char *);
void i_ori_ccr(void) { op_to_ccr("or"); }


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

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

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

LLVM IR (-O2):
@.str = [3 x i8] c"or\00"
define void @i_ori_ccr() {
%1 = tail call i32 @op_to_ccr(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ i430fx_write(int /*<<< orphan*/, int, int,
                                int /*<<< orphan*/ *);
void i430fx_pci_reset(void) { i430fx_write(0, 0x59, 0xf, NULL); }


x86 assembly (clang, -O0):
<i430fx_pci_reset>:
push   %rbp
mov    %rsp,%rbp
xor    %edi,%edi
mov    $0x59,%esi
mov    $0xf,%edx
xor    %eax,%eax
mov    %eax,%ecx
call   1030 <i430fx_write@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<i430fx_pci_reset>:
xor    %edi,%edi
mov    $0x59,%esi
mov    $0xf,%edx
xor    %ecx,%ecx
jmp    1030 <i430fx_write@plt>

LLVM IR (-O0):
define void @i430fx_pci_reset() {
%1 = call i32 @i430fx_write(i32 0, i32 89, i32 15, i32* null)
ret void
}

LLVM IR (-O2):
define void @i430fx_pci_reset() {
%1 = tail call i32 @i430fx_write(i32 0, i32 89, i32 15, i32* null)
ret void
}
/* Variables and functions */
int d();
int e(void) { return d(); }


x86 assembly (clang, -O0):
<e>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1030 <d@plt>
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @e() {
%1 = call i32 (...) @d()
ret i32 %1
}

LLVM IR (-O2):
define i32 @e() {
%1 = tail call i32 (...) @d()
ret i32 %1
}
void element2TAB() {}


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

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

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

LLVM IR (-O2):
define void @element2TAB() {
ret void
}
/* Variables and functions */
scalar_t__ strcmp_ptr(char const *, char const *);
bool streq_ptr(const char *a, const char *b) { return strcmp_ptr(a, b) == 0; }


x86 assembly (clang, -O0):
<streq_ptr>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1030 <strcmp_ptr@plt>
cmp    $0x0,%rax
sete   %al
and    $0x1,%al
movzbl %al,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<streq_ptr>:
push   %rax
call   1030 <strcmp_ptr@plt>
xor    %ecx,%ecx
test   %rax,%rax
sete   %cl
mov    %ecx,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @streq_ptr(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 = load i8*, i8** %4
%7 = call i64 @strcmp_ptr(i8* %5, i8* %6)
%8 = icmp eq i64 %7, 0
%9 = zext i1 %8 to i32
ret i32 %9
}

LLVM IR (-O2):
define i32 @streq_ptr(i8* %0, i8* %1) {
%3 = tail call i64 @strcmp_ptr(i8* %0, i8* %1)
%4 = icmp eq i64 %3, 0
%5 = zext i1 %4 to i32
ret i32 %5
}
/* Type definitions */
struct phresamplectx {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ free(struct phresamplectx *);
void ph_resample_cleanup(void *p) {
  struct phresamplectx *ctx = (struct phresamplectx *)p;
  free(ctx);
}


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

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

LLVM IR (-O0):
%struct.phresamplectx = type { i32 }
define void @ph_resample_cleanup(i8* %0) {
%2 = alloca i8*
%3 = alloca %struct.phresamplectx*
store i8* %0, i8** %2
%4 = load i8*, i8** %2
%5 = bitcast i8* %4 to %struct.phresamplectx*
store %struct.phresamplectx* %5, %struct.phresamplectx** %3
%6 = load %struct.phresamplectx*, %struct.phresamplectx** %3
%7 = call i32 @free(%struct.phresamplectx* %6)
ret void
}

LLVM IR (-O2):
%struct.phresamplectx = type { i32 }
define void @ph_resample_cleanup(i8* nocapture %0) {
%2 = bitcast i8* %0 to %struct.phresamplectx*
%3 = tail call i32 @free(%struct.phresamplectx* %2)
ret void
}
int sample1_func() { return 13; }


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

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

LLVM IR (-O0):
define i32 @sample1_func() {
ret i32 13
}

LLVM IR (-O2):
define i32 @sample1_func() {
ret i32 13
}
const int c() { return 10; }


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

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

LLVM IR (-O0):
define i32 @c() {
ret i32 10
}

LLVM IR (-O2):
define i32 @c() {
ret i32 10
}
void glmAddVector3f(float result[3], const float v1[3], const float v2[3]) {
  result[0] = v1[0] + v2[0];
  result[1] = v1[1] + v2[1];
  result[2] = v1[2] + v2[2];
}


x86 assembly (clang, -O0):
<glmAddVector3f>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x10(%rbp),%rax
movss  (%rax),%xmm0
mov    -0x18(%rbp),%rax
addss  (%rax),%xmm0
mov    -0x8(%rbp),%rax
movss  %xmm0,(%rax)
mov    -0x10(%rbp),%rax
movss  0x4(%rax),%xmm0
mov    -0x18(%rbp),%rax
addss  0x4(%rax),%xmm0
mov    -0x8(%rbp),%rax
movss  %xmm0,0x4(%rax)
mov    -0x10(%rbp),%rax
movss  0x8(%rax),%xmm0
mov    -0x18(%rbp),%rax
addss  0x8(%rax),%xmm0
mov    -0x8(%rbp),%rax
movss  %xmm0,0x8(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<glmAddVector3f>:
movss  (%rsi),%xmm0
addss  (%rdx),%xmm0
movss  %xmm0,(%rdi)
movss  0x4(%rsi),%xmm0
addss  0x4(%rdx),%xmm0
movss  %xmm0,0x4(%rdi)
movss  0x8(%rsi),%xmm0
addss  0x8(%rdx),%xmm0
movss  %xmm0,0x8(%rdi)
ret

LLVM IR (-O0):
define void @glmAddVector3f(float* %0, float* %1, float* %2) {
%4 = alloca float*
%5 = alloca float*
%6 = alloca float*
store float* %0, float** %4
store float* %1, float** %5
store float* %2, float** %6
%7 = load float*, float** %5
%8 = getelementptr inbounds float, float* %7, i64 0
%9 = load float, float* %8
%10 = load float*, float** %6
%11 = getelementptr inbounds float, float* %10, i64 0
%12 = load float, float* %11
%13 = fadd float %9, %12
%14 = load float*, float** %4
%15 = getelementptr inbounds float, float* %14, i64 0
store float %13, float* %15
%16 = load float*, float** %5
%17 = getelementptr inbounds float, float* %16, i64 1
%18 = load float, float* %17
%19 = load float*, float** %6
%20 = getelementptr inbounds float, float* %19, i64 1
%21 = load float, float* %20
%22 = fadd float %18, %21
%23 = load float*, float** %4
%24 = getelementptr inbounds float, float* %23, i64 1
store float %22, float* %24
%25 = load float*, float** %5
%26 = getelementptr inbounds float, float* %25, i64 2
%27 = load float, float* %26
%28 = load float*, float** %6
%29 = getelementptr inbounds float, float* %28, i64 2
%30 = load float, float* %29
%31 = fadd float %27, %30
%32 = load float*, float** %4
%33 = getelementptr inbounds float, float* %32, i64 2
store float %31, float* %33
ret void
}

LLVM IR (-O2):
define void @glmAddVector3f(float* nocapture writeonly %0, float* nocapture %1, float* nocapture %2) {
%4 = load float, float* %1
%5 = load float, float* %2
%6 = fadd float %4, %5
store float %6, float* %0
%7 = getelementptr inbounds float, float* %1, i64 1
%8 = load float, float* %7
%9 = getelementptr inbounds float, float* %2, i64 1
%10 = load float, float* %9
%11 = fadd float %8, %10
%12 = getelementptr inbounds float, float* %0, i64 1
store float %11, float* %12
%13 = getelementptr inbounds float, float* %1, i64 2
%14 = load float, float* %13
%15 = getelementptr inbounds float, float* %2, i64 2
%16 = load float, float* %15
%17 = fadd float %14, %16
%18 = getelementptr inbounds float, float* %0, i64 2
store float %17, float* %18
ret void
}
int fun644() { return 644; }


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

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

LLVM IR (-O0):
define i32 @fun644() {
ret i32 644
}

LLVM IR (-O2):
define i32 @fun644() {
ret i32 644
}
min(int x, int y) { return (x <= y) ? x : y; }


x86 assembly (clang, -O0):
<min>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
cmp    -0x8(%rbp),%eax
jg     1121 <min+0x21>
mov    -0x4(%rbp),%eax
mov    %eax,-0xc(%rbp)
jmp    1127 <min+0x27>
mov    -0x8(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<min>:
mov    %edi,%eax
cmp    %esi,%edi
cmovg  %esi,%eax
ret

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

LLVM IR (-O2):
define i32 @min(i32 %0, i32 %1) {
%3 = icmp sgt i32 %0, %1
%4 = select i1 %3, i32 %1, i32 %0
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ sprintf(char *, char *, float);
void ftoaPrecision0(float value, char *strFloat) {
  sprintf(strFloat, "%.0f", value);
}


x86 assembly (clang, -O0):
<ftoaPrecision0>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movss  %xmm0,-0x4(%rbp)
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
movss  -0x4(%rbp),%xmm0
lea    0xecf(%rip),%rsi
call   1030 <sprintf@plt>
add    $0x10,%rsp
pop    %rbp
ret

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

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

LLVM IR (-O2):
@.str = [5 x i8] c"%.0f\00"
define void @ftoaPrecision0(float %0, i8* nocapture writeonly %1) {
%3 = tail call i32 @sprintf(i8* dereferenceable(1) %1, i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), float %0)
ret void
}
/* Variables and functions */
scalar_t__ isdigit(char const);
bool isstrnumeric(const char *s) {
  while (isdigit(*s))
    ++s;
  return *s == '\0';
}


x86 assembly (clang, -O0):
<isstrnumeric>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movsbl (%rax),%edi
call   1030 <isdigit@plt>
cmp    $0x0,%rax
je     1143 <isstrnumeric+0x33>
mov    -0x8(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x8(%rbp)
jmp    111c <isstrnumeric+0xc>
mov    -0x8(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x0,%eax
sete   %al
and    $0x1,%al
movzbl %al,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<isstrnumeric>:
push   %rbx
mov    %rdi,%rbx
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
movsbl (%rbx),%edi
call   1030 <isdigit@plt>
add    $0x1,%rbx
test   %rax,%rax
jne    1120 <isstrnumeric+0x10>
xor    %eax,%eax
cmpb   $0x0,-0x1(%rbx)
sete   %al
pop    %rbx
ret

LLVM IR (-O0):
define i32 @isstrnumeric(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
br label %3
3: ; preds = %8, %1
%4 = load i8*, i8** %2
%5 = load i8, i8* %4
%6 = call i64 @isdigit(i8 signext %5)
%7 = icmp ne i64 %6, 0
br i1 %7, label %8, label %11
8: ; preds = %3
%9 = load i8*, i8** %2
%10 = getelementptr inbounds i8, i8* %9, i32 1
store i8* %10, i8** %2
br label %3
11: ; preds = %3
%12 = load i8*, i8** %2
%13 = load i8, i8* %12
%14 = sext i8 %13 to i32
%15 = icmp eq i32 %14, 0
%16 = zext i1 %15 to i32
ret i32 %16
}

LLVM IR (-O2):
define i32 @isstrnumeric(i8* nocapture %0) {
br label %2
2: ; preds = %2, %1
%3 = phi i8* [ %0, %1 ], [ %7, %2 ]
%4 = load i8, i8* %3
%5 = tail call i64 @isdigit(i8 signext %4)
%6 = icmp eq i64 %5, 0
%7 = getelementptr inbounds i8, i8* %3, i64 1
br i1 %6, label %8, label %2
8: ; preds = %2
%9 = load i8, i8* %3
%10 = icmp eq i8 %9, 0
%11 = zext i1 %10 to i32
ret i32 %11
}
/* Type definitions */
typedef scalar_t__ uint64_t;
typedef int uint32_t;

/* Variables and functions */
int /*<<< orphan*/ EXIT_FAILURE;
int /*<<< orphan*/ exit(int /*<<< orphan*/);
scalar_t__ fprintf(int /*<<< orphan*/, char *, int);
int /*<<< orphan*/ stdout;
void print_upperhex32(uint64_t value) {
  if (fprintf(stdout, "%08X\n", (uint32_t)value) < 0) {
    exit(EXIT_FAILURE);
  }
}


x86 assembly (clang, -O0):
<print_upperhex32>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    0x2ea5(%rip),%rax
mov    (%rax),%edi
mov    -0x8(%rbp),%rax
mov    %eax,%edx
lea    0xebe(%rip),%rsi
call   1030 <fprintf@plt>
cmp    $0x0,%rax
jge    115f <print_upperhex32+0x3f>
mov    0x2e88(%rip),%rax
mov    (%rax),%edi
call   1040 <exit@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<print_upperhex32>:
push   %rax
mov    %rdi,%rdx
mov    0x2ead(%rip),%rax
mov    (%rax),%edi
lea    0xecc(%rip),%rsi
call   1030 <fprintf@plt>
test   %rax,%rax
js     1140 <print_upperhex32+0x20>
pop    %rax
ret
mov    0x2e99(%rip),%rax
mov    (%rax),%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@stdout = global i32 0
@.str = [6 x i8] c"%08X\0A\00"
@EXIT_FAILURE = global i32 0
define void @print_upperhex32(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = load i32, i32* @stdout
%4 = load i64, i64* %2
%5 = trunc i64 %4 to i32
%6 = call i64 @fprintf(i32 %3, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i32 %5)
%7 = icmp slt i64 %6, 0
br i1 %7, label %8, label %11
8: ; preds = %1
%9 = load i32, i32* @EXIT_FAILURE
%10 = call i32 @exit(i32 %9)
unreachable
11: ; preds = %1
ret void
}

LLVM IR (-O2):
@stdout = global i32 0
@.str = [6 x i8] c"%08X\0A\00"
@EXIT_FAILURE = global i32 0
define void @print_upperhex32(i64 %0) {
%2 = load i32, i32* @stdout
%3 = trunc i64 %0 to i32
%4 = tail call i64 @fprintf(i32 %2, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i32 %3)
%5 = icmp slt i64 %4, 0
br i1 %5, label %6, label %9
6: ; preds = %1
%7 = load i32, i32* @EXIT_FAILURE
%8 = tail call i32 @exit(i32 %7)
unreachable
9: ; preds = %1
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int /*<<< orphan*/);
void printhex(const unsigned char *c, const unsigned char *e) {
  while (c < e)
    printf("%02x", *c++);
}


x86 assembly (clang, -O0):
<printhex>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
cmp    -0x10(%rbp),%rax
jae    1151 <printhex+0x41>
mov    -0x8(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x8(%rbp)
movzbl (%rax),%esi
lea    0xeb9(%rip),%rdi
call   1030 <printf@plt>
jmp    1120 <printhex+0x10>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<printhex>:
push   %r15
push   %r14
push   %r12
push   %rbx
push   %rax
cmp    %rsi,%rdi
jae    1146 <printhex+0x36>
mov    %rsi,%r12
mov    %rdi,%r14
sub    %rdi,%r12
xor    %ebx,%ebx
lea    0xed1(%rip),%r15
nop
movzbl (%r14,%rbx,1),%esi
mov    %r15,%rdi
call   1030 <printf@plt>
add    $0x1,%rbx
cmp    %rbx,%r12
jne    1130 <printhex+0x20>
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
ret

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

LLVM IR (-O2):
@.str = [5 x i8] c"%02x\00"
define void @printhex(i8* %0, i8* readnone %1) {
%3 = icmp ult i8* %0, %1
br i1 %3, label %4, label %16
4: ; preds = %2
%5 = ptrtoint i8* %1 to i64
%6 = ptrtoint i8* %0 to i64
%7 = sub i64 %5, %6
%8 = getelementptr i8, i8* %0, i64 %7
br label %9
9: ; preds = %4, %9
%10 = phi i8* [ %11, %9 ], [ %0, %4 ]
%11 = getelementptr inbounds i8, i8* %10, i64 1
%12 = load i8, i8* %10
%13 = zext i8 %12 to i32
%14 = tail call i32 @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i32 %13)
%15 = icmp eq i8* %11, %8
br i1 %15, label %16, label %9
16: ; preds = %9, %2
ret void
}
/* Type definitions */
struct in_addr {
  int dummy;
};

/* Variables and functions */
int inet_aton_1(char const *, char const *, struct in_addr *);
int strlen(char const *);
extern int inet_aton(const char *s, struct in_addr *out) {
  return inet_aton_1(s, s + strlen(s), out);
}


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

x86 assembly (clang, -O2):
<inet_aton>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%r14
mov    %rdi,%rbx
call   1040 <strlen@plt>
movslq %eax,%rsi
add    %rbx,%rsi
mov    %rbx,%rdi
mov    %r14,%rdx
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1030 <inet_aton_1@plt>

LLVM IR (-O0):
%struct.in_addr = type { i32 }
define i32 @inet_aton(i8* %0, %struct.in_addr* %1) {
%3 = alloca i8*
%4 = alloca %struct.in_addr*
store i8* %0, i8** %3
store %struct.in_addr* %1, %struct.in_addr** %4
%5 = load i8*, i8** %3
%6 = load i8*, i8** %3
%7 = load i8*, i8** %3
%8 = call i32 @strlen(i8* %7)
%9 = sext i32 %8 to i64
%10 = getelementptr inbounds i8, i8* %6, i64 %9
%11 = load %struct.in_addr*, %struct.in_addr** %4
%12 = call i32 @inet_aton_1(i8* %5, i8* %10, %struct.in_addr* %11)
ret i32 %12
}

LLVM IR (-O2):
%struct.in_addr = type { i32 }
define i32 @inet_aton(i8* %0, %struct.in_addr* %1) {
%3 = tail call i32 @strlen(i8* %0)
%4 = sext i32 %3 to i64
%5 = getelementptr inbounds i8, i8* %0, i64 %4
%6 = tail call i32 @inet_aton_1(i8* %0, i8* %5, %struct.in_addr* %1)
ret i32 %6
}
void foo(int n, int i) {
  int A[n];
#pragma omp parallel shared(A)
  { A[i] = sizeof(A); }
}


x86 assembly (clang, -O0):
<foo>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
mov    %eax,%ecx
mov    %rsp,%rax
mov    %rax,-0x10(%rbp)
lea    0xf(,%rcx,4),%rdx
and    $0xfffffffffffffff0,%rdx
mov    %rsp,%rax
sub    %rdx,%rax
mov    %rax,%rsp
mov    %rcx,-0x18(%rbp)
shl    $0x2,%rcx
mov    %ecx,%edx
movslq -0x8(%rbp),%rcx
mov    %edx,(%rax,%rcx,4)
mov    -0x10(%rbp),%rax
mov    %rax,%rsp
mov    %rbp,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
define void @foo(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8*
%6 = alloca i64
store i32 %0, i32* %3
store i32 %1, i32* %4
%7 = load i32, i32* %3
%8 = zext i32 %7 to i64
%9 = call i8* @llvm.stacksave()
store i8* %9, i8** %5
%10 = alloca i32, i64 %8
store i64 %8, i64* %6
%11 = mul nuw i64 4, %8
%12 = trunc i64 %11 to i32
%13 = load i32, i32* %4
%14 = sext i32 %13 to i64
%15 = getelementptr inbounds i32, i32* %10, i64 %14
store i32 %12, i32* %15
%16 = load i8*, i8** %5
ret void
}

LLVM IR (-O2):
define void @foo(i32 %0, i32 %1) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ testapplyAlgs();
int main(int argc, char **argcv) {
  testapplyAlgs();
  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 <testapplyAlgs@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1030 <testapplyAlgs@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 (...) @testapplyAlgs()
ret i32 0
}

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 (...) @testapplyAlgs()
ret i32 0
}
/* Variables and functions */
int hidCodeFromString(char *);
int /*<<< orphan*/ hidMapRot(int, int /*<<< orphan*/ *);
int /*<<< orphan*/ scriptThrowException(char *);
void consoleCmdRunmap(char *key) {
  int code = hidCodeFromString(key);
  if (!code) {
    scriptThrowException("Wrong key shortcut");
    return;
  }
  hidMapRot(code, NULL);
}


x86 assembly (clang, -O0):
<consoleCmdRunmap>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <hidCodeFromString@plt>
mov    %eax,-0xc(%rbp)
cmpl   $0x0,-0xc(%rbp)
jne    1163 <consoleCmdRunmap+0x33>
lea    0xea7(%rip),%rdi
call   1050 <scriptThrowException@plt>
jmp    116f <consoleCmdRunmap+0x3f>
mov    -0xc(%rbp),%edi
xor    %eax,%eax
mov    %eax,%esi
call   1030 <hidMapRot@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<consoleCmdRunmap>:
push   %rax
call   1040 <hidCodeFromString@plt>
test   %eax,%eax
je     1144 <consoleCmdRunmap+0x14>
mov    %eax,%edi
xor    %esi,%esi
pop    %rax
jmp    1030 <hidMapRot@plt>
lea    0xeb5(%rip),%rdi
pop    %rax
jmp    1050 <scriptThrowException@plt>

LLVM IR (-O0):
@.str = [19 x i8] c"Wrong key shortcut\00"
define void @consoleCmdRunmap(i8* %0) {
%2 = alloca i8*
%3 = alloca i32
store i8* %0, i8** %2
%4 = load i8*, i8** %2
%5 = call i32 @hidCodeFromString(i8* %4)
store i32 %5, i32* %3
%6 = load i32, i32* %3
%7 = icmp ne i32 %6, 0
br i1 %7, label %10, label %8
8: ; preds = %1
%9 = call i32 @scriptThrowException(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0))
br label %13
10: ; preds = %1
%11 = load i32, i32* %3
%12 = call i32 @hidMapRot(i32 %11, i32* null)
br label %13
13: ; preds = %10, %8
ret void
}

LLVM IR (-O2):
@.str = [19 x i8] c"Wrong key shortcut\00"
define void @consoleCmdRunmap(i8* %0) {
%2 = tail call i32 @hidCodeFromString(i8* %0)
%3 = icmp eq i32 %2, 0
br i1 %3, label %4, label %6
4: ; preds = %1
%5 = tail call i32 @scriptThrowException(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0))
br label %8
6: ; preds = %1
%7 = tail call i32 @hidMapRot(i32 %2, i32* null)
br label %8
8: ; preds = %6, %4
ret void
}
/* Variables and functions */
float atan(float);
float f_atan(float x) { return atan(x); }


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

x86 assembly (clang, -O2):
<f_atan>:
jmp    1030 <atan@plt>

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

LLVM IR (-O2):
define float @f_atan(float %0) {
%2 = tail call float @atan(float %0)
ret float %2
}
/* Type definitions */
struct aFILE {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ _get_actual_fp(struct aFILE *);
int fseek(int /*<<< orphan*/, long, int);
int my_fseek(struct aFILE *fp, long offset, int whence) {
  return fseek(_get_actual_fp(fp), offset, whence);
}


x86 assembly (clang, -O0):
<my_fseek>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <_get_actual_fp@plt>
mov    %eax,%edi
mov    -0x10(%rbp),%rsi
mov    -0x14(%rbp),%edx
call   1040 <fseek@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<my_fseek>:
push   %rbp
push   %rbx
push   %rax
mov    %edx,%ebp
mov    %rsi,%rbx
call   1030 <_get_actual_fp@plt>
mov    %eax,%edi
mov    %rbx,%rsi
mov    %ebp,%edx
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    1040 <fseek@plt>

LLVM IR (-O0):
%struct.aFILE = type { i32 }
define i32 @my_fseek(%struct.aFILE* %0, i64 %1, i32 %2) {
%4 = alloca %struct.aFILE*
%5 = alloca i64
%6 = alloca i32
store %struct.aFILE* %0, %struct.aFILE** %4
store i64 %1, i64* %5
store i32 %2, i32* %6
%7 = load %struct.aFILE*, %struct.aFILE** %4
%8 = call i32 @_get_actual_fp(%struct.aFILE* %7)
%9 = load i64, i64* %5
%10 = load i32, i32* %6
%11 = call i32 @fseek(i32 %8, i64 %9, i32 %10)
ret i32 %11
}

LLVM IR (-O2):
%struct.aFILE = type { i32 }
define i32 @my_fseek(%struct.aFILE* %0, i64 %1, i32 %2) {
%4 = tail call i32 @_get_actual_fp(%struct.aFILE* %0)
%5 = tail call i32 @fseek(i32 %4, i64 %1, i32 %2)
ret i32 %5
}
/* Variables and functions */
int EXIT_SUCCESS;
int main(void) { return EXIT_SUCCESS; }


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

x86 assembly (clang, -O2):
<main>:
mov    0x2ed9(%rip),%rax
mov    (%rax),%eax
ret

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

LLVM IR (-O2):
@EXIT_SUCCESS = global i32 0
define i32 @main() {
%1 = load i32, i32* @EXIT_SUCCESS
ret i32 %1
}
/* Type definitions */
typedef int /*<<< orphan*/ time_t;
struct tm {
  int tm_hour;
  int tm_min;
};

/* Variables and functions */
struct tm *localtime(int /*<<< orphan*/ *);
int daysecs(time_t itime) {
  struct tm *tt;
  tt = localtime(&itime);
  return ((tt->tm_hour * 3600) + (tt->tm_min * 60));
}


x86 assembly (clang, -O0):
<daysecs>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
lea    -0x4(%rbp),%rdi
call   1030 <localtime@plt>
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
imul   $0xe10,(%rax),%eax
mov    -0x10(%rbp),%rcx
imul   $0x3c,0x4(%rcx),%ecx
add    %ecx,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<daysecs>:
push   %rax
mov    %edi,0x4(%rsp)
lea    0x4(%rsp),%rdi
call   1030 <localtime@plt>
imul   $0xe10,(%rax),%ecx
imul   $0x3c,0x4(%rax),%eax
add    %ecx,%eax
pop    %rcx
ret

LLVM IR (-O0):
%struct.tm = type { i32, i32 }
define i32 @daysecs(i32 %0) {
%2 = alloca i32
%3 = alloca %struct.tm*
store i32 %0, i32* %2
%4 = call %struct.tm* @localtime(i32* %2)
store %struct.tm* %4, %struct.tm** %3
%5 = load %struct.tm*, %struct.tm** %3
%6 = getelementptr inbounds %struct.tm, %struct.tm* %5, i32 0, i32 0
%7 = load i32, i32* %6
%8 = mul nsw i32 %7, 3600
%9 = load %struct.tm*, %struct.tm** %3
%10 = getelementptr inbounds %struct.tm, %struct.tm* %9, i32 0, i32 1
%11 = load i32, i32* %10
%12 = mul nsw i32 %11, 60
%13 = add nsw i32 %8, %12
ret i32 %13
}

LLVM IR (-O2):
%struct.tm = type { i32, i32 }
define i32 @daysecs(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = call %struct.tm* @localtime(i32* %2)
%4 = getelementptr inbounds %struct.tm, %struct.tm* %3, i64 0, i32 0
%5 = load i32, i32* %4
%6 = mul nsw i32 %5, 3600
%7 = getelementptr inbounds %struct.tm, %struct.tm* %3, i64 0, i32 1
%8 = load i32, i32* %7
%9 = mul nsw i32 %8, 60
%10 = add nsw i32 %9, %6
ret i32 %10
}
const char *Filter_Brief(void) { return "Filtered Iterable"; }


x86 assembly (clang, -O0):
<Filter_Brief>:
push   %rbp
mov    %rsp,%rbp
lea    0xef5(%rip),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<Filter_Brief>:
lea    0xef9(%rip),%rax
ret

LLVM IR (-O0):
@.str = [18 x i8] c"Filtered Iterable\00"
define i8* @Filter_Brief() {
ret i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0)
}

LLVM IR (-O2):
@.str = [18 x i8] c"Filtered Iterable\00"
define i8* @Filter_Brief() {
ret i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0)
}
/* Variables and functions */
size_t const divup(size_t const, size_t const);
size_t roundup(size_t const a, size_t const b) { return divup(a, b) * b; }


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

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

LLVM IR (-O0):
define i64 @roundup(i64 %0, i64 %1) {
%3 = alloca i64
%4 = alloca i64
store i64 %0, i64* %3
store i64 %1, i64* %4
%5 = load i64, i64* %3
%6 = load i64, i64* %4
%7 = call i64 @divup(i64 %5, i64 %6)
%8 = load i64, i64* %4
%9 = mul i64 %7, %8
ret i64 %9
}

LLVM IR (-O2):
define i64 @roundup(i64 %0, i64 %1) {
%3 = tail call i64 @divup(i64 %0, i64 %1)
%4 = mul i64 %3, %1
ret i64 %4
}
int func(int upTo) {
  static int arr[10] = {0};
  int sum = 0, i = 0;
  for (; i < upTo; i++) {
    sum = arr[i];
  }
  arr[upTo] = sum;
  return sum;
}


x86 assembly (clang, -O0):
<func>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
mov    -0xc(%rbp),%eax
cmp    -0x4(%rbp),%eax
jge    1140 <func+0x40>
movslq -0xc(%rbp),%rcx
lea    0x2f04(%rip),%rax
mov    (%rax,%rcx,4),%eax
mov    %eax,-0x8(%rbp)
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1115 <func+0x15>
mov    -0x8(%rbp),%edx
movslq -0x4(%rbp),%rcx
lea    0x2ee2(%rip),%rax
mov    %edx,(%rax,%rcx,4)
mov    -0x8(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<func>:
test   %edi,%edi
jle    1113 <func+0x13>
lea    -0x1(%rdi),%eax
lea    0x2f22(%rip),%rcx
mov    (%rcx,%rax,4),%eax
jmp    1115 <func+0x15>
xor    %eax,%eax
movslq %edi,%rcx
lea    0x2f11(%rip),%rdx
mov    %eax,(%rdx,%rcx,4)
ret

LLVM IR (-O0):
@func.arr = internal global [10 x i32] zeroinitializer
define i32 @func(i32 %0) {
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %2
store i32 0, i32* %3
store i32 0, i32* %4
br label %5
5: ; preds = %14, %1
%6 = load i32, i32* %4
%7 = load i32, i32* %2
%8 = icmp slt i32 %6, %7
br i1 %8, label %9, label %17
9: ; preds = %5
%10 = load i32, i32* %4
%11 = sext i32 %10 to i64
%12 = getelementptr inbounds [10 x i32], [10 x i32]* @func.arr, i64 0, i64 %11
%13 = load i32, i32* %12
store i32 %13, i32* %3
br label %14
14: ; preds = %9
%15 = load i32, i32* %4
%16 = add nsw i32 %15, 1
store i32 %16, i32* %4
br label %5
17: ; preds = %5
%18 = load i32, i32* %3
%19 = load i32, i32* %2
%20 = sext i32 %19 to i64
%21 = getelementptr inbounds [10 x i32], [10 x i32]* @func.arr, i64 0, i64 %20
store i32 %18, i32* %21
%22 = load i32, i32* %3
ret i32 %22
}

LLVM IR (-O2):
@func.arr = internal unnamed_addr global [10 x i32] zeroinitializer
define i32 @func(i32 %0) {
%2 = icmp sgt i32 %0, 0
br i1 %2, label %3, label %8
3: ; preds = %1
%4 = add nsw i32 %0, -1
%5 = zext i32 %4 to i64
%6 = getelementptr inbounds [10 x i32], [10 x i32]* @func.arr, i64 0, i64 %5
%7 = load i32, i32* %6
br label %8
8: ; preds = %3, %1
%9 = phi i32 [ %7, %3 ], [ 0, %1 ]
%10 = sext i32 %0 to i64
%11 = getelementptr inbounds [10 x i32], [10 x i32]* @func.arr, i64 0, i64 %10
store i32 %9, i32* %11
ret i32 %9
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ *fdopen(int, char const *);
int /*<<< orphan*/ perror(char *);
FILE *std_fdopen(int filedes, const char *mode) {
  FILE *fp;
  if ((fp = fdopen(filedes, mode)) == NULL) {
    perror("fdopen");
    exit(1);
  }
  return fp;
}


x86 assembly (clang, -O0):
<std_fdopen>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x10(%rbp),%rsi
call   1030 <fdopen@plt>
mov    %rax,-0x18(%rbp)
cmp    $0x0,%rax
jne    116f <std_fdopen+0x3f>
lea    0xea0(%rip),%rdi
call   1040 <perror@plt>
mov    $0x1,%edi
call   1050 <exit@plt>
mov    -0x18(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

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

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

LLVM IR (-O2):
@.str = [7 x i8] c"fdopen\00"
define noalias i32* @std_fdopen(i32 %0, i8* nocapture %1) {
%3 = tail call i32* @fdopen(i32 %0, i8* %1)
%4 = icmp eq i32* %3, null
br i1 %4, label %5, label %8
5: ; preds = %2
%6 = tail call i32 @perror(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0))
%7 = tail call i32 @exit(i32 1)
unreachable
8: ; preds = %2
ret i32* %3
}
/* Type definitions */
typedef int /*<<< orphan*/ int64_t;

/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, int /*<<< orphan*/);
int /*<<< orphan*/ stderr;
void print_int64_t(int64_t m) { fprintf(stderr, "%ld", m); }


x86 assembly (clang, -O0):
<print_int64_t>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    0x2ebe(%rip),%rax
mov    (%rax),%edi
mov    -0x4(%rbp),%edx
lea    0xed2(%rip),%rsi
call   1030 <fprintf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<print_int64_t>:
mov    %edi,%edx
mov    0x2ec7(%rip),%rax
mov    (%rax),%edi
lea    0xede(%rip),%rsi
jmp    1030 <fprintf@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [4 x i8] c"%ld\00"
define void @print_int64_t(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* @stderr
%4 = load i32, i32* %2
%5 = call i32 @fprintf(i32 %3, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %4)
ret void
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [4 x i8] c"%ld\00"
define void @print_int64_t(i32 %0) {
%2 = load i32, i32* @stderr
%3 = tail call i32 @fprintf(i32 %2, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %0)
ret void
}
__attribute__((visibility("default"))) int the_answer() { return 42; }


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

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

LLVM IR (-O0):
define i32 @the_answer() {
ret i32 42
}

LLVM IR (-O2):
define i32 @the_answer() {
ret i32 42
}
/* Variables and functions */
int read(int, void *, size_t);
int beaglelogic_read(int fd, void *buf, size_t bytes) {
  return read(fd, buf, bytes);
}


x86 assembly (clang, -O0):
<beaglelogic_read>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
call   1030 <read@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<beaglelogic_read>:
jmp    1030 <read@plt>

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

LLVM IR (-O2):
define i32 @beaglelogic_read(i32 %0, i8* nocapture %1, i64 %2) {
%4 = tail call i32 @read(i32 %0, i8* %1, i64 %2)
ret i32 %4
}