xunge/DecIR huggingface dataset:
/* Variables and functions */
scalar_t__ isalpha(char);
int jep_is_ident_start(char c) {
  if (isalpha(c) || c == '_' || c == '$') {
    return 1;
  }
  return 0;
}


x86 assembly (clang, -O0):
<jep_is_ident_start>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %dil,%al
mov    %al,-0x5(%rbp)
movsbl -0x5(%rbp),%edi
call   1030 <isalpha@plt>
cmp    $0x0,%rax
jne    114b <jep_is_ident_start+0x3b>
movsbl -0x5(%rbp),%eax
cmp    $0x5f,%eax
je     114b <jep_is_ident_start+0x3b>
movsbl -0x5(%rbp),%eax
cmp    $0x24,%eax
jne    1157 <jep_is_ident_start+0x47>
movl   $0x1,-0x4(%rbp)
jmp    115e <jep_is_ident_start+0x4e>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @jep_is_ident_start(i8 signext %0) {
%2 = tail call i64 @isalpha(i8 signext %0)
%3 = freeze i64 %2
%4 = icmp ne i64 %3, 0
%5 = icmp eq i8 %0, 95
%6 = icmp eq i8 %0, 36
%7 = or i1 %5, %6
%8 = or i1 %7, %4
%9 = zext i1 %8 to i32
ret i32 %9
}
/* Variables and functions */
int /*<<< orphan*/ a_dump_to(int);
int /*<<< orphan*/ dump_set(int /*<<< orphan*/);
void a_dump_to_ground(void) {
  a_dump_to(3350);
  dump_set(0);
}


x86 assembly (clang, -O0):
<a_dump_to_ground>:
push   %rbp
mov    %rsp,%rbp
mov    $0xd16,%edi
call   1040 <a_dump_to@plt>
xor    %edi,%edi
call   1030 <dump_set@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<a_dump_to_ground>:
push   %rax
mov    $0xd16,%edi
call   1040 <a_dump_to@plt>
xor    %edi,%edi
pop    %rax
jmp    1030 <dump_set@plt>

LLVM IR (-O0):
define void @a_dump_to_ground() {
%1 = call i32 @a_dump_to(i32 3350)
%2 = call i32 @dump_set(i32 0)
ret void
}

LLVM IR (-O2):
define void @a_dump_to_ground() {
%1 = tail call i32 @a_dump_to(i32 3350)
%2 = tail call i32 @dump_set(i32 0)
ret void
}
int pldummy_emxvga(void) { return 0; }


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

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

LLVM IR (-O0):
define i32 @pldummy_emxvga() {
ret i32 0
}

LLVM IR (-O2):
define i32 @pldummy_emxvga() {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ ENOSYS;
int /*<<< orphan*/ errno;
int utime(const char *f, void *t) {
  errno = ENOSYS;
  return -1;
}


x86 assembly (clang, -O0):
<utime>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    0x2ed5(%rip),%rax
mov    (%rax),%ecx
mov    0x2ebc(%rip),%rax
mov    %ecx,(%rax)
mov    $0xffffffff,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<utime>:
mov    0x2ee1(%rip),%rax
mov    (%rax),%eax
mov    0x2ec8(%rip),%rcx
mov    %eax,(%rcx)
mov    $0xffffffff,%eax
ret

LLVM IR (-O0):
@ENOSYS = global i32 0
@errno = global i32 0
define i32 @utime(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
store i8* %0, i8** %3
store i8* %1, i8** %4
%5 = load i32, i32* @ENOSYS
store i32 %5, i32* @errno
ret i32 -1
}

LLVM IR (-O2):
@ENOSYS = global i32 0
@errno = global i32 0
define i32 @utime(i8* nocapture readnone %0, i8* nocapture readnone %1) {
%3 = load i32, i32* @ENOSYS
store i32 %3, i32* @errno
ret i32 -1
}
/* Variables and functions */
double pow(double, int);
double g2(double x) { return ((pow(x, 3) - 1)); }


x86 assembly (clang, -O0):
<g2>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
mov    $0x3,%edi
call   1030 <pow@plt>
movsd  0xecc(%rip),%xmm1
subsd  %xmm1,%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<g2>:
push   %rax
mov    $0x3,%edi
call   1030 <pow@plt>
addsd  0xedd(%rip),%xmm0
pop    %rax
ret

LLVM IR (-O0):
define double @g2(double %0) {
%2 = alloca double
store double %0, double* %2
%3 = load double, double* %2
%4 = call double @pow(double %3, i32 3)
%5 = fsub double %4, 1.000000e+00
ret double %5
}

LLVM IR (-O2):
define double @g2(double %0) {
%2 = tail call double @pow(double %0, i32 3)
%3 = fadd double %2, -1.000000e+00
ret double %3
}
void html_disp_bar(double perct) {}


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

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

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

LLVM IR (-O2):
define void @html_disp_bar(double %0) {
ret void
}
/* Variables and functions */
int strcmp(char *const, char *const);
int CmpEntries(const void *p1, const void *p2) {
  return strcmp(*(char *const *)p1, *(char *const *)p2);
}


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

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

LLVM IR (-O0):
define i32 @CmpEntries(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
store i8* %0, i8** %3
store i8* %1, i8** %4
%5 = load i8*, i8** %3
%6 = bitcast i8* %5 to i8**
%7 = load i8*, i8** %6
%8 = load i8*, i8** %4
%9 = bitcast i8* %8 to i8**
%10 = load i8*, i8** %9
%11 = call i32 @strcmp(i8* %7, i8* %10)
ret i32 %11
}

LLVM IR (-O2):
define i32 @CmpEntries(i8* nocapture %0, i8* nocapture %1) {
%3 = bitcast i8* %0 to i8**
%4 = load i8*, i8** %3
%5 = bitcast i8* %1 to i8**
%6 = load i8*, i8** %5
%7 = tail call i32 @strcmp(i8* dereferenceable(1) %4, i8* dereferenceable(1) %6)
ret i32 %7
}
/* Variables and functions */
scalar_t__ malloc(int);
int /*<<< orphan*/ recv(int, char *, int, int /*<<< orphan*/);
char *receiveFromClient(int clientfd) {
  int buffer_size = 1024;
  char *out = (char *)malloc(buffer_size);
  recv(clientfd, out, buffer_size - 1, 0);
  return out;
}


x86 assembly (clang, -O0):
<receiveFromClient>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
movl   $0x400,-0x8(%rbp)
mov    -0x8(%rbp),%edi
call   1040 <malloc@plt>
mov    %rax,-0x10(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x10(%rbp),%rsi
mov    -0x8(%rbp),%edx
sub    $0x1,%edx
xor    %ecx,%ecx
call   1030 <recv@plt>
mov    -0x10(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<receiveFromClient>:
push   %rbp
push   %rbx
push   %rax
mov    %edi,%ebp
mov    $0x400,%edi
call   1040 <malloc@plt>
mov    %rax,%rbx
mov    %ebp,%edi
mov    %rax,%rsi
mov    $0x3ff,%edx
xor    %ecx,%ecx
call   1030 <recv@plt>
mov    %rbx,%rax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
define i8* @receiveFromClient(i32 %0) {
%2 = alloca i32
%3 = alloca i32
%4 = alloca i8*
store i32 %0, i32* %2
store i32 1024, i32* %3
%5 = load i32, i32* %3
%6 = call i64 @malloc(i32 %5)
%7 = inttoptr i64 %6 to i8*
store i8* %7, i8** %4
%8 = load i32, i32* %2
%9 = load i8*, i8** %4
%10 = load i32, i32* %3
%11 = sub nsw i32 %10, 1
%12 = call i32 @recv(i32 %8, i8* %9, i32 %11, i32 0)
%13 = load i8*, i8** %4
ret i8* %13
}

LLVM IR (-O2):
define i8* @receiveFromClient(i32 %0) {
%2 = tail call i64 @malloc(i32 1024)
%3 = inttoptr i64 %2 to i8*
%4 = tail call i32 @recv(i32 %0, i8* %3, i32 1023, i32 0)
ret i8* %3
}
int XDisplayWidth() {}


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

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

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

LLVM IR (-O2):
define i32 @XDisplayWidth() {
ret i32 undef
}
/* Variables and functions */
int radamsa_main(int, char **);
int main(int argc, char **argv) { return radamsa_main(argc, argv); }


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    -0x8(%rbp),%edi
mov    -0x10(%rbp),%rsi
call   1030 <radamsa_main@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
jmp    1030 <radamsa_main@plt>

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

LLVM IR (-O2):
define i32 @main(i32 %0, i8** %1) {
%3 = tail call i32 @radamsa_main(i32 %0, i8** %1)
ret i32 %3
}
void tower(int n, char S, char A, char D) {
  if (n == 1)
    ;
  else {
    tower(n - 1, S, D, A);
    tower(n - 1, A, S, D);
  }
}


x86 assembly (clang, -O0):
<tower>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %cl,%al
mov    %dl,%cl
mov    %sil,%dl
mov    %edi,-0x4(%rbp)
mov    %dl,-0x5(%rbp)
mov    %cl,-0x6(%rbp)
mov    %al,-0x7(%rbp)
cmpl   $0x1,-0x4(%rbp)
jne    113a <tower+0x2a>
jmp    1170 <tower+0x60>
mov    -0x4(%rbp),%edi
sub    $0x1,%edi
mov    -0x5(%rbp),%cl
mov    -0x7(%rbp),%al
movsbl %cl,%esi
movsbl %al,%edx
movsbl -0x6(%rbp),%ecx
call   1030 <tower@plt>
mov    -0x4(%rbp),%edi
sub    $0x1,%edi
mov    -0x6(%rbp),%cl
mov    -0x5(%rbp),%al
movsbl %cl,%esi
movsbl %al,%edx
movsbl -0x7(%rbp),%ecx
call   1030 <tower@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<tower>:
push   %rbp
push   %r15
push   %r14
push   %rbx
push   %rax
cmp    $0x1,%edi
je     114d <tower+0x3d>
mov    %esi,%ebx
mov    %edi,%ebp
add    $0xffffffff,%ebp
movsbl %cl,%r14d
nopw   0x0(%rax,%rax,1)
mov    %edx,%r15d
movsbl %bl,%esi
movsbl %dl,%ecx
mov    %ebp,%edi
mov    %r14d,%edx
call   1030 <tower@plt>
mov    %ebx,%edx
mov    %r15d,%ebx
add    $0xffffffff,%ebp
jne    1130 <tower+0x20>
add    $0x8,%rsp
pop    %rbx
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
define void @tower(i32 %0, i8 signext %1, i8 signext %2, i8 signext %3) {
%5 = alloca i32
%6 = alloca i8
%7 = alloca i8
%8 = alloca i8
store i32 %0, i32* %5
store i8 %1, i8* %6
store i8 %2, i8* %7
store i8 %3, i8* %8
%9 = load i32, i32* %5
%10 = icmp eq i32 %9, 1
br i1 %10, label %11, label %12
11: ; preds = %4
br label %23
12: ; preds = %4
%13 = load i32, i32* %5
%14 = sub nsw i32 %13, 1
%15 = load i8, i8* %6
%16 = load i8, i8* %8
%17 = load i8, i8* %7
%18 = load i32, i32* %5
%19 = sub nsw i32 %18, 1
%20 = load i8, i8* %7
%21 = load i8, i8* %6
%22 = load i8, i8* %8
br label %23
23: ; preds = %12, %11
ret void
}

LLVM IR (-O2):
define void @tower(i32 %0, i8 signext %1, i8 signext %2, i8 signext %3) {
%5 = icmp eq i32 %0, 1
br i1 %5, label %12, label %6
6: ; preds = %4, %6
%7 = phi i8 [ %8, %6 ], [ %2, %4 ]
%8 = phi i8 [ %7, %6 ], [ %1, %4 ]
%9 = phi i32 [ %10, %6 ], [ %0, %4 ]
%10 = add nsw i32 %9, -1
tail call void @tower(i32 %10, i8 signext %8, i8 signext %3, i8 signext %7)
%11 = icmp eq i32 %10, 1
br i1 %11, label %12, label %6
12: ; preds = %6, %4
ret void
}
int test_imm_79int8_reg(signed char val) {
  return ((val) & (0x79 << 0)) ? -20 : -40;
}


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

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

LLVM IR (-O0):
define i32 @test_imm_79int8_reg(i8 signext %0) {
%2 = alloca i8
store i8 %0, i8* %2
%3 = load i8, i8* %2
%4 = sext i8 %3 to i32
%5 = and i32 %4, 121
%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_79int8_reg(i8 signext %0) {
%2 = and i8 %0, 121
%3 = icmp eq i8 %2, 0
%4 = select i1 %3, i32 -40, i32 -20
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ usleep(int);
void emu_sleep(int value) { usleep(value * 1000); }


x86 assembly (clang, -O0):
<emu_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):
<emu_sleep>:
imul   $0x3e8,%edi,%edi
jmp    1030 <usleep@plt>

LLVM IR (-O0):
define void @emu_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 @emu_sleep(i32 %0) {
%2 = mul nsw i32 %0, 1000
%3 = tail call i32 @usleep(i32 %2)
ret void
}
float IntNoise(int x) {
  int MAX_INT = (1 << 31) - 1;
  x = ((x << 13) & MAX_INT) ^ x;
  x = (x * (x * x * 15731 + 789221) + 1376312589) & MAX_INT;
  return 1.0 - x / 1073741824.0;
}


x86 assembly (clang, -O0):
<IntNoise>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
movl   $0x7fffffff,-0x8(%rbp)
mov    -0x4(%rbp),%eax
shl    $0xd,%eax
and    -0x8(%rbp),%eax
xor    -0x4(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
mov    -0x4(%rbp),%ecx
imul   -0x4(%rbp),%ecx
imul   $0x3d73,%ecx,%ecx
add    $0xc0ae5,%ecx
imul   %ecx,%eax
add    $0x5208dd0d,%eax
and    -0x8(%rbp),%eax
mov    %eax,-0x4(%rbp)
cvtsi2sdl -0x4(%rbp),%xmm1
movsd  0xeba(%rip),%xmm0
divsd  %xmm0,%xmm1
movsd  0xea6(%rip),%xmm0
subsd  %xmm1,%xmm0
cvtsd2ss %xmm0,%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<IntNoise>:
mov    %edi,%eax
shl    $0xd,%eax
and    $0x7fffe000,%eax
xor    %edi,%eax
mov    %eax,%ecx
imul   %eax,%ecx
imul   $0x3d73,%ecx,%ecx
add    $0xc0ae5,%ecx
imul   %eax,%ecx
add    $0x5208dd0d,%ecx
and    $0x7fffffff,%ecx
cvtsi2sd %ecx,%xmm0
mulsd  0xec8(%rip),%xmm0
addsd  0xec8(%rip),%xmm0
cvtsd2ss %xmm0,%xmm0
ret

LLVM IR (-O0):
define float @IntNoise(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %2
store i32 2147483647, i32* %3
%4 = load i32, i32* %2
%5 = shl i32 %4, 13
%6 = load i32, i32* %3
%7 = and i32 %5, %6
%8 = load i32, i32* %2
%9 = xor i32 %7, %8
store i32 %9, i32* %2
%10 = load i32, i32* %2
%11 = load i32, i32* %2
%12 = load i32, i32* %2
%13 = mul nsw i32 %11, %12
%14 = mul nsw i32 %13, 15731
%15 = add nsw i32 %14, 789221
%16 = mul nsw i32 %10, %15
%17 = add nsw i32 %16, 1376312589
%18 = load i32, i32* %3
%19 = and i32 %17, %18
store i32 %19, i32* %2
%20 = load i32, i32* %2
%21 = sitofp i32 %20 to double
%22 = fdiv double %21, 0x41D0000000000000
%23 = fsub double 1.000000e+00, %22
%24 = fptrunc double %23 to float
ret float %24
}

LLVM IR (-O2):
define float @IntNoise(i32 %0) {
%2 = shl i32 %0, 13
%3 = and i32 %2, 2147475456
%4 = xor i32 %3, %0
%5 = mul i32 %4, 15731
%6 = mul i32 %5, %4
%7 = add nuw nsw i32 %6, 789221
%8 = mul nsw i32 %7, %4
%9 = add nsw i32 %8, 1376312589
%10 = and i32 %9, 2147483647
%11 = sitofp i32 %10 to double
%12 = fmul double %11, 0x3E10000000000000
%13 = fsub double 1.000000e+00, %12
%14 = fptrunc double %13 to float
ret float %14
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char *, char *);
void printVersion(void) {
  printf("%s, version %s (c) by Brockmann Consult\n", "epr_subset_test", "1.0");
}


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

x86 assembly (clang, -O2):
<printVersion>:
lea    0xee9(%rip),%rdi
lea    0xf0b(%rip),%rsi
lea    0xf14(%rip),%rdx
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [41 x i8] c"%s, version %s (c) by Brockmann Consult\0A\00"
@.str.1 = [16 x i8] c"epr_subset_test\00"
@.str.2 = [4 x i8] c"1.0\00"
define void @printVersion() {
%1 = call i32 @printf(i8* getelementptr inbounds ([41 x i8], [41 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [41 x i8] c"%s, version %s (c) by Brockmann Consult\0A\00"
@.str.1 = [16 x i8] c"epr_subset_test\00"
@.str.2 = [4 x i8] c"1.0\00"
define void @printVersion() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([41 x i8], [41 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0))
ret void
}
/* Variables and functions */
long double powl(long double, int);
long double cbrtl(long double x) { return powl(x, 1. / 3.); }


x86 assembly (clang, -O0):
<cbrtl>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
fldt   0x10(%rbp)
fstpt  -0x10(%rbp)
fldt   -0x10(%rbp)
mov    %rsp,%rax
fstpt  (%rax)
xor    %edi,%edi
call   1030 <powl@plt>
fld    %st(0)
fstp   %st(0)
add    $0x20,%rsp
pop    %rbp
ret

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

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

LLVM IR (-O2):
define x86_fp80 @cbrtl(x86_fp80 %0) {
%2 = tail call x86_fp80 @powl(x86_fp80 %0, i32 0)
ret x86_fp80 %2
}
void delay3(int msec) {
  do {
    int x = 0x12345678;
    do {
      ;
    } while (--x > 0);
  } while (--msec != 0);
}


x86 assembly (clang, -O0):
<delay3>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
movl   $0x12345678,-0x8(%rbp)
jmp    1113 <delay3+0x13>
mov    -0x8(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0x8(%rbp)
cmp    $0x0,%eax
jg     110e <delay3+0xe>
jmp    112a <delay3+0x2a>
mov    -0x4(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0x4(%rbp)
cmp    $0x0,%eax
jne    1107 <delay3+0x7>
pop    %rbp
ret

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

LLVM IR (-O0):
define void @delay3(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %2
br label %4
4: ; preds = %11, %1
store i32 305419896, i32* %3
br label %5
5: ; preds = %6, %4
br label %6
6: ; preds = %5
%7 = load i32, i32* %3
%8 = add nsw i32 %7, -1
store i32 %8, i32* %3
%9 = icmp sgt i32 %8, 0
br i1 %9, label %5, label %10
10: ; preds = %6
br label %11
11: ; preds = %10
%12 = load i32, i32* %2
%13 = add nsw i32 %12, -1
store i32 %13, i32* %2
%14 = icmp ne i32 %13, 0
br i1 %14, label %4, label %15
15: ; preds = %11
ret void
}

LLVM IR (-O2):
define void @delay3(i32 %0) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ abort();
void check_d(double res, double expected) {
  if (res >= expected - 0.001 && res <= expected + 0.001)
    return;
  abort();
}


x86 assembly (clang, -O0):
<check_d>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  -0x8(%rbp),%xmm0
movsd  -0x10(%rbp),%xmm1
movsd  0xecc(%rip),%xmm2
subsd  %xmm2,%xmm1
ucomisd %xmm1,%xmm0
jb     1164 <check_d+0x54>
movsd  -0x8(%rbp),%xmm1
movsd  0xeb1(%rip),%xmm0
addsd  -0x10(%rbp),%xmm0
ucomisd %xmm1,%xmm0
jb     1164 <check_d+0x54>
add    $0x10,%rsp
pop    %rbp
ret
mov    $0x0,%al
call   1030 <abort@plt>

x86 assembly (clang, -O2):
<check_d>:
push   %rax
movsd  0xee7(%rip),%xmm2
addsd  %xmm1,%xmm2
ucomisd %xmm2,%xmm0
jb     1133 <check_d+0x23>
addsd  0xedd(%rip),%xmm1
ucomisd %xmm0,%xmm1
jb     1133 <check_d+0x23>
pop    %rax
ret
xor    %eax,%eax
call   1030 <abort@plt>

LLVM IR (-O0):
define void @check_d(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 = fsub double %6, 1.000000e-03
%8 = fcmp oge double %5, %7
br i1 %8, label %9, label %15
9: ; preds = %2
%10 = load double, double* %3
%11 = load double, double* %4
%12 = fadd double %11, 1.000000e-03
%13 = fcmp ole double %10, %12
br i1 %13, label %14, label %15
14: ; preds = %9
ret void
15: ; preds = %9, %2
%16 = call i32 (...) @abort()
unreachable
}

LLVM IR (-O2):
define void @check_d(double %0, double %1) {
%3 = fadd double %1, -1.000000e-03
%4 = fcmp ugt double %3, %0
%5 = fadd double %1, 1.000000e-03
%6 = fcmp ult double %5, %0
%7 = or i1 %4, %6
br i1 %7, label %9, label %8
8: ; preds = %2
ret void
9: ; preds = %2
%10 = tail call i32 (...) @abort()
unreachable
}
int morseFile(char *s) { return (-1); }


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

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

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

LLVM IR (-O2):
define i32 @morseFile(i8* nocapture readnone %0) {
ret i32 -1
}
const char *skip_nul(const char *s) {
  const char *str;
  str = s;
  while (*str == '0')
    str++;
  return (str);
}


x86 assembly (clang, -O0):
<skip_nul>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x30,%eax
jne    1131 <skip_nul+0x31>
mov    -0x10(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x10(%rbp)
jmp    1110 <skip_nul+0x10>
mov    -0x10(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<skip_nul>:
mov    %rdi,%rax
add    $0xffffffffffffffff,%rax
nopw   0x0(%rax,%rax,1)
cmpb   $0x30,0x1(%rax)
lea    0x1(%rax),%rax
je     1110 <skip_nul+0x10>
ret

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

LLVM IR (-O2):
define i8* @skip_nul(i8* %0) {
br label %2
2: ; preds = %2, %1
%3 = phi i8* [ %0, %1 ], [ %6, %2 ]
%4 = load i8, i8* %3
%5 = icmp eq i8 %4, 48
%6 = getelementptr inbounds i8, i8* %3, i64 1
br i1 %5, label %2, label %7
7: ; preds = %2
ret i8* %3
}
void PCA9685Reset() {}


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

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

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

LLVM IR (-O2):
define void @PCA9685Reset() {
ret void
}
int do_834() { return 834; }


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

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

LLVM IR (-O0):
define i32 @do_834() {
ret i32 834
}

LLVM IR (-O2):
define i32 @do_834() {
ret i32 834
}
/* Variables and functions */
int /*<<< orphan*/ abort();
int /*<<< orphan*/ fputs(char const *, int /*<<< orphan*/);
int /*<<< orphan*/ stderr;
void fatal_exception(const char *msg) {
  fputs(msg, stderr);
  fputs("\n", stderr);
  abort();
}


x86 assembly (clang, -O0):
<fatal_exception>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
mov    0x2ea9(%rip),%rax
mov    (%rax),%esi
call   1040 <fputs@plt>
mov    0x2e9b(%rip),%rax
mov    (%rax),%esi
lea    0xeb2(%rip),%rdi
call   1040 <fputs@plt>
mov    $0x0,%al
call   1030 <abort@plt>

x86 assembly (clang, -O2):
<fatal_exception>:
push   %rbx
mov    0x2eb8(%rip),%rbx
mov    (%rbx),%esi
call   1040 <fputs@plt>
mov    (%rbx),%esi
lea    0xec8(%rip),%rdi
call   1040 <fputs@plt>
xor    %eax,%eax
call   1030 <abort@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [2 x i8] c"\0A\00"
define void @fatal_exception(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = load i32, i32* @stderr
%5 = call i32 @fputs(i8* %3, i32 %4)
%6 = load i32, i32* @stderr
%7 = call i32 @fputs(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0), i32 %6)
%8 = call i32 (...) @abort()
unreachable
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [2 x i8] c"\0A\00"
define void @fatal_exception(i8* %0) {
%2 = load i32, i32* @stderr
%3 = tail call i32 @fputs(i8* %0, i32 %2)
%4 = load i32, i32* @stderr
%5 = tail call i32 @fputs(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0), i32 %4)
%6 = tail call i32 (...) @abort()
unreachable
}
/* Type definitions */
struct mlist {
  int dummy;
};
struct magic_set {
  int dummy;
};

/* Variables and functions */
struct mlist *file_apprentice(struct magic_set *, char const *, int);
int /*<<< orphan*/ free_mlist(struct mlist *);
int magic_check(struct magic_set *ms, const char *magicfile) {
  struct mlist *ml = file_apprentice(ms, magicfile, 1);
  free_mlist(ml);
  return ml ? 0 : -1;
}


x86 assembly (clang, -O0):
<magic_check>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    $0x1,%edx
call   1040 <file_apprentice@plt>
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rdi
call   1030 <free_mlist@plt>
mov    -0x18(%rbp),%rdx
mov    $0xffffffff,%eax
xor    %ecx,%ecx
cmp    $0x0,%rdx
cmovne %ecx,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<magic_check>:
push   %rbx
mov    $0x1,%edx
call   1040 <file_apprentice@plt>
mov    %rax,%rbx
mov    %rax,%rdi
call   1030 <free_mlist@plt>
cmp    $0x1,%rbx
sbb    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
%struct.magic_set = type { i32 }
%struct.mlist = type { i32 }
define i32 @magic_check(%struct.magic_set* %0, i8* %1) {
%3 = alloca %struct.magic_set*
%4 = alloca i8*
%5 = alloca %struct.mlist*
store %struct.magic_set* %0, %struct.magic_set** %3
store i8* %1, i8** %4
%6 = load %struct.magic_set*, %struct.magic_set** %3
%7 = load i8*, i8** %4
%8 = call %struct.mlist* @file_apprentice(%struct.magic_set* %6, i8* %7, i32 1)
store %struct.mlist* %8, %struct.mlist** %5
%9 = load %struct.mlist*, %struct.mlist** %5
%10 = call i32 @free_mlist(%struct.mlist* %9)
%11 = load %struct.mlist*, %struct.mlist** %5
%12 = icmp ne %struct.mlist* %11, null
%13 = zext i1 %12 to i64
%14 = select i1 %12, i32 0, i32 -1
ret i32 %14
}

LLVM IR (-O2):
%struct.magic_set = type { i32 }
%struct.mlist = type { i32 }
define i32 @magic_check(%struct.magic_set* %0, i8* %1) {
%3 = tail call %struct.mlist* @file_apprentice(%struct.magic_set* %0, i8* %1, i32 1)
%4 = tail call i32 @free_mlist(%struct.mlist* %3)
%5 = icmp eq %struct.mlist* %3, null
%6 = sext i1 %5 to i32
ret i32 %6
}
/* Variables and functions */
scalar_t__ snprintf(int /*<<< orphan*/ *, int /*<<< orphan*/, char *, float);
int /*<<< orphan*/ sprintf(char *, char *, float);
char *xmalloc(scalar_t__);
char *float_to_str(float d) {
  char *s = xmalloc(snprintf(NULL, 0, "%.2f", d) + 1);
  sprintf(s, "%.2f", d);
  return s;
}


x86 assembly (clang, -O0):
<float_to_str>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movss  %xmm0,-0x4(%rbp)
movss  -0x4(%rbp),%xmm0
xor    %eax,%eax
mov    %eax,%edi
xor    %esi,%esi
lea    0xeb1(%rip),%rdx
call   1030 <snprintf@plt>
mov    %rax,%rdi
add    $0x1,%rdi
call   1040 <xmalloc@plt>
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
movss  -0x4(%rbp),%xmm0
lea    0xe8c(%rip),%rsi
call   1050 <sprintf@plt>
mov    -0x10(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<float_to_str>:
push   %r14
push   %rbx
push   %rax
movss  %xmm0,0x4(%rsp)
lea    0xebf(%rip),%r14
xor    %edi,%edi
xor    %esi,%esi
mov    %r14,%rdx
call   1030 <snprintf@plt>
lea    0x1(%rax),%rdi
call   1040 <xmalloc@plt>
mov    %rax,%rbx
mov    %rax,%rdi
mov    %r14,%rsi
movss  0x4(%rsp),%xmm0
call   1050 <sprintf@plt>
mov    %rbx,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@.str = [5 x i8] c"%.2f\00"
define i8* @float_to_str(float %0) {
%2 = alloca float
%3 = alloca i8*
store float %0, float* %2
%4 = load float, float* %2
%5 = call i64 @snprintf(i32* null, i32 0, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), float %4)
%6 = add nsw i64 %5, 1
%7 = call i8* @xmalloc(i64 %6)
store i8* %7, i8** %3
%8 = load i8*, i8** %3
%9 = load float, float* %2
%10 = call i32 @sprintf(i8* %8, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), float %9)
%11 = load i8*, i8** %3
ret i8* %11
}

LLVM IR (-O2):
@.str = [5 x i8] c"%.2f\00"
define i8* @float_to_str(float %0) {
%2 = tail call i64 @snprintf(i32* null, i32 0, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), float %0)
%3 = add nsw i64 %2, 1
%4 = tail call i8* @xmalloc(i64 %3)
%5 = tail call i32 @sprintf(i8* dereferenceable(1) %4, i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), float %0)
ret i8* %4
}
/* Type definitions */
typedef int /*<<< orphan*/ pid_t;

/* Variables and functions */
int /*<<< orphan*/ SIGTERM;
int /*<<< orphan*/ kill(int /*<<< orphan*/, int /*<<< orphan*/);
int /*<<< orphan*/ waitpid(int /*<<< orphan*/, int /*<<< orphan*/ *,
                           int /*<<< orphan*/);
void join_idle_thread(pid_t pid) {
  kill(pid, SIGTERM);
  waitpid(pid, NULL, 0);
}


x86 assembly (clang, -O0):
<join_idle_thread>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
mov    0x2eb3(%rip),%rax
mov    (%rax),%esi
call   1030 <kill@plt>
mov    -0x4(%rbp),%edi
xor    %eax,%eax
mov    %eax,%esi
xor    %edx,%edx
call   1040 <waitpid@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<join_idle_thread>:
push   %rbx
mov    %edi,%ebx
mov    0x2ebe(%rip),%rax
mov    (%rax),%esi
call   1030 <kill@plt>
mov    %ebx,%edi
xor    %esi,%esi
xor    %edx,%edx
pop    %rbx
jmp    1040 <waitpid@plt>

LLVM IR (-O0):
@SIGTERM = global i32 0
define void @join_idle_thread(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = load i32, i32* @SIGTERM
%5 = call i32 @kill(i32 %3, i32 %4)
%6 = load i32, i32* %2
%7 = call i32 @waitpid(i32 %6, i32* null, i32 0)
ret void
}

LLVM IR (-O2):
@SIGTERM = global i32 0
define void @join_idle_thread(i32 %0) {
%2 = load i32, i32* @SIGTERM
%3 = tail call i32 @kill(i32 %0, i32 %2)
%4 = tail call i32 @waitpid(i32 %0, i32* null, i32 0)
ret void
}
int add_smart(int a, int b) {
  while (b != 0) {
    int sum = a ^ b;
    int carry = (a & b) << 1;
    a = sum;
    b = carry;
  }
  return a;
}


x86 assembly (clang, -O0):
<add_smart>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
cmpl   $0x0,-0x8(%rbp)
je     113a <add_smart+0x3a>
mov    -0x4(%rbp),%eax
xor    -0x8(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0x4(%rbp),%eax
and    -0x8(%rbp),%eax
shl    $0x1,%eax
mov    %eax,-0x10(%rbp)
mov    -0xc(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x10(%rbp),%eax
mov    %eax,-0x8(%rbp)
jmp    110a <add_smart+0xa>
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<add_smart>:
test   %esi,%esi
je     111b <add_smart+0x1b>
mov    %edi,%eax
cs nopw 0x0(%rax,%rax,1)
xor    %esi,%eax
and    %edi,%esi
mov    %eax,%edi
add    %esi,%esi
jne    1110 <add_smart+0x10>
ret
mov    %edi,%eax
ret

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

LLVM IR (-O2):
define i32 @add_smart(i32 %0, i32 %1) {
%3 = icmp eq i32 %1, 0
br i1 %3, label %11, label %4
4: ; preds = %2, %4
%5 = phi i32 [ %7, %4 ], [ %0, %2 ]
%6 = phi i32 [ %9, %4 ], [ %1, %2 ]
%7 = xor i32 %5, %6
%8 = and i32 %5, %6
%9 = shl i32 %8, 1
%10 = icmp eq i32 %9, 0
br i1 %10, label %11, label %4
11: ; preds = %4, %2
%12 = phi i32 [ %0, %2 ], [ %7, %4 ]
ret i32 %12
}
void f2(int *x) {
  for (int j = 0; j < 4; ++j)
    x[j] += 1;
}


x86 assembly (clang, -O0):
<f2>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
cmpl   $0x4,-0xc(%rbp)
jge    1138 <f2+0x38>
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
mov    (%rax,%rcx,4),%edx
add    $0x1,%edx
mov    %edx,(%rax,%rcx,4)
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    110f <f2+0xf>
pop    %rbp
ret

x86 assembly (clang, -O2):
<f2>:
movdqu (%rdi),%xmm0
pcmpeqd %xmm1,%xmm1
psubd  %xmm1,%xmm0
movdqu %xmm0,(%rdi)
ret

LLVM IR (-O0):
define void @f2(i32* %0) {
%2 = alloca i32*
%3 = alloca i32
store i32* %0, i32** %2
store i32 0, i32* %3
br label %4
4: ; preds = %14, %1
%5 = load i32, i32* %3
%6 = icmp slt i32 %5, 4
br i1 %6, label %7, label %17
7: ; preds = %4
%8 = load i32*, i32** %2
%9 = load i32, i32* %3
%10 = sext i32 %9 to i64
%11 = getelementptr inbounds i32, i32* %8, i64 %10
%12 = load i32, i32* %11
%13 = add nsw i32 %12, 1
store i32 %13, i32* %11
br label %14
14: ; preds = %7
%15 = load i32, i32* %3
%16 = add nsw i32 %15, 1
store i32 %16, i32* %3
br label %4
17: ; preds = %4
ret void
}

LLVM IR (-O2):
define void @f2(i32* nocapture %0) {
%2 = bitcast i32* %0 to <4 x i32>*
%3 = load <4 x i32>, <4 x i32>* %2
%4 = add nsw <4 x i32> %3, <i32 1, i32 1, i32 1, i32 1>
%5 = bitcast i32* %0 to <4 x i32>*
store <4 x i32> %4, <4 x i32>* %5
ret void
}
/* Variables and functions */
int /*<<< orphan*/ MF_todirname(char *, int);
void MF_uplevel(char *input, int inputlength, int levels) {
  for (int i = 0; i < levels; i++) {
    MF_todirname(input, inputlength);
  }
}


x86 assembly (clang, -O0):
<MF_uplevel>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
mov    -0x14(%rbp),%eax
cmp    -0x10(%rbp),%eax
jge    114f <MF_uplevel+0x3f>
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
call   1030 <MF_todirname@plt>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    1129 <MF_uplevel+0x19>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<MF_uplevel>:
push   %rbp
push   %r14
push   %rbx
test   %edx,%edx
jle    1130 <MF_uplevel+0x20>
mov    %edx,%ebx
mov    %esi,%r14d
mov    %rdi,%rbp
mov    %rbp,%rdi
mov    %r14d,%esi
call   1030 <MF_todirname@plt>
add    $0xffffffff,%ebx
jne    1120 <MF_uplevel+0x10>
pop    %rbx
pop    %r14
pop    %rbp
ret

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

LLVM IR (-O2):
define void @MF_uplevel(i8* %0, i32 %1, i32 %2) {
%4 = icmp sgt i32 %2, 0
br i1 %4, label %6, label %5
5: ; preds = %6, %3
ret void
6: ; preds = %3, %6
%7 = phi i32 [ %9, %6 ], [ 0, %3 ]
%8 = tail call i32 @MF_todirname(i8* %0, i32 %1)
%9 = add nuw nsw i32 %7, 1
%10 = icmp eq i32 %9, %2
br i1 %10, label %5, label %6
}
int gwyfile_compare_int(const void *pa, const void *pb) {
  int a = *(const int *)pa;
  int b = *(const int *)pb;
  if (a < b)
    return -1;
  if (a > b)
    return 1;
  return 0;
}


x86 assembly (clang, -O0):
<gwyfile_compare_int>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    -0x10(%rbp),%rax
mov    (%rax),%eax
mov    %eax,-0x1c(%rbp)
mov    -0x18(%rbp),%rax
mov    (%rax),%eax
mov    %eax,-0x20(%rbp)
mov    -0x1c(%rbp),%eax
cmp    -0x20(%rbp),%eax
jge    1136 <gwyfile_compare_int+0x36>
movl   $0xffffffff,-0x4(%rbp)
jmp    1155 <gwyfile_compare_int+0x55>
mov    -0x1c(%rbp),%eax
cmp    -0x20(%rbp),%eax
jle    114e <gwyfile_compare_int+0x4e>
movl   $0x1,-0x4(%rbp)
jmp    1155 <gwyfile_compare_int+0x55>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<gwyfile_compare_int>:
mov    (%rdi),%eax
xor    %ecx,%ecx
cmp    (%rsi),%eax
setg   %cl
mov    $0xffffffff,%eax
cmovge %ecx,%eax
ret

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

LLVM IR (-O2):
define i32 @gwyfile_compare_int(i8* nocapture %0, i8* nocapture %1) {
%3 = bitcast i8* %0 to i32*
%4 = load i32, i32* %3
%5 = bitcast i8* %1 to i32*
%6 = load i32, i32* %5
%7 = icmp slt i32 %4, %6
%8 = icmp sgt i32 %4, %6
%9 = zext i1 %8 to i32
%10 = select i1 %7, i32 -1, i32 %9
ret i32 %10
}
/* Variables and functions */
int core13_safe(char const *);
int U_EMRTRANSPARENTBLT_safe(const char *record) {
  return (core13_safe(record));
}


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

x86 assembly (clang, -O2):
<U_EMRTRANSPARENTBLT_safe>:
jmp    1030 <core13_safe@plt>

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

LLVM IR (-O2):
define i32 @U_EMRTRANSPARENTBLT_safe(i8* %0) {
%2 = tail call i32 @core13_safe(i8* %0)
ret i32 %2
}
int((hop_counter_transmit))(struct ss7 *ss7, struct isup_call *c,
                            int messagetype, unsigned char *parm, int len) {
  parm[0] = 0x01;
  return 1;
}


x86 assembly (clang, -O0):
<hop_counter_transmit>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    %rcx,-0x20(%rbp)
mov    %r8d,-0x24(%rbp)
mov    -0x20(%rbp),%rax
movb   $0x1,(%rax)
mov    $0x1,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
%struct.ss7 = type opaque
%struct.isup_call = type opaque
define i32 @hop_counter_transmit(%struct.ss7* %0, %struct.isup_call* %1, i32 %2, i8* %3, i32 %4) {
%6 = alloca %struct.ss7*
%7 = alloca %struct.isup_call*
%8 = alloca i32
%9 = alloca i8*
%10 = alloca i32
store %struct.ss7* %0, %struct.ss7** %6
store %struct.isup_call* %1, %struct.isup_call** %7
store i32 %2, i32* %8
store i8* %3, i8** %9
store i32 %4, i32* %10
%11 = load i8*, i8** %9
%12 = getelementptr inbounds i8, i8* %11, i64 0
store i8 1, i8* %12
ret i32 1
}

LLVM IR (-O2):
%struct.ss7 = type opaque
%struct.isup_call = type opaque
define i32 @hop_counter_transmit(%struct.ss7* nocapture readnone %0, %struct.isup_call* nocapture readnone %1, i32 %2, i8* nocapture writeonly %3, i32 %4) {
store i8 1, i8* %3
ret i32 1
}
void marktab_rend_stdin() {}


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

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

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

LLVM IR (-O2):
define void @marktab_rend_stdin() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ abort();
char *ta_oom_s(char *s) {
  if (!s)
    abort();
  return s;
}


x86 assembly (clang, -O0):
<ta_oom_s>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
cmpq   $0x0,-0x8(%rbp)
jne    112e <ta_oom_s+0x1e>
mov    $0x0,%al
call   1030 <abort@plt>
mov    -0x8(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ta_oom_s>:
test   %rdi,%rdi
je     1119 <ta_oom_s+0x9>
mov    %rdi,%rax
ret
push   %rax
xor    %eax,%eax
call   1030 <abort@plt>

LLVM IR (-O0):
define i8* @ta_oom_s(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = icmp ne i8* %3, null
br i1 %4, label %7, label %5
5: ; preds = %1
%6 = call i32 (...) @abort()
unreachable
7: ; preds = %1
%8 = load i8*, i8** %2
ret i8* %8
}

LLVM IR (-O2):
define i8* @ta_oom_s(i8* readnone returned %0) {
%2 = icmp eq i8* %0, null
br i1 %2, label %3, label %5
3: ; preds = %1
%4 = tail call i32 (...) @abort()
unreachable
5: ; preds = %1
ret i8* %0
}
void HalCC2430SimpleUartP$uart0$putDone(void) { StdOutM$UART$putDone(); }


x86 assembly (clang, -O0):
<HalCC2430SimpleUartP$uart0$putDone>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1030 <StdOutM$UART$putDone@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<HalCC2430SimpleUartP$uart0$putDone>:
xor    %eax,%eax
jmp    1030 <StdOutM$UART$putDone@plt>

LLVM IR (-O0):
define void @"HalCC2430SimpleUartP$uart0$putDone"() {
%1 = call i32 (...) @"StdOutM$UART$putDone"()
ret void
}

LLVM IR (-O2):
define void @"HalCC2430SimpleUartP$uart0$putDone"() {
%1 = tail call i32 (...) @"StdOutM$UART$putDone"()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
void gh_log_die(void) { exit(1); }


x86 assembly (clang, -O0):
<gh_log_die>:
push   %rbp
mov    %rsp,%rbp
mov    $0x1,%edi
call   1030 <exit@plt>

x86 assembly (clang, -O2):
<gh_log_die>:
push   %rax
mov    $0x1,%edi
call   1030 <exit@plt>

LLVM IR (-O0):
define void @gh_log_die() {
%1 = call i32 @exit(i32 1)
unreachable
}

LLVM IR (-O2):
define void @gh_log_die() {
%1 = tail call i32 @exit(i32 1)
unreachable
}
/* Variables and functions */
int /*<<< orphan*/ uart_close_dev(int);
void Zigbee_Release_Device(int fd) { uart_close_dev(fd); }


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

x86 assembly (clang, -O2):
<Zigbee_Release_Device>:
jmp    1030 <uart_close_dev@plt>

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

LLVM IR (-O2):
define void @Zigbee_Release_Device(i32 %0) {
%2 = tail call i32 @uart_close_dev(i32 %0)
ret void
}
int f2() { return 5; }


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

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

LLVM IR (-O0):
define i32 @f2() {
ret i32 5
}

LLVM IR (-O2):
define i32 @f2() {
ret i32 5
}
/* Variables and functions */
int /*<<< orphan*/ test_step_resume();
int /*<<< orphan*/ test_user_bp();
int main(void) {
  test_user_bp();
  test_step_resume();
  return 0;
}


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

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

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

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @test_user_bp()
%2 = tail call i32 (...) @test_step_resume()
ret i32 0
}
unsigned int IWM_FH_MEM_CBBC_QUEUE(unsigned int chnl) {
  if (chnl < 16)
    return ((0x1000) + 0x9D0) + 4 * chnl;
  if (chnl < 20)
    return ((0x1000) + 0xBF0) + 4 * (chnl - 16);
  return ((0x1000) + 0xB20) + 4 * (chnl - 20);
}


x86 assembly (clang, -O0):
<IWM_FH_MEM_CBBC_QUEUE>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
cmpl   $0x10,-0x8(%rbp)
jae    1124 <IWM_FH_MEM_CBBC_QUEUE+0x24>
mov    -0x8(%rbp),%eax
shl    $0x2,%eax
add    $0x19d0,%eax
mov    %eax,-0x4(%rbp)
jmp    1155 <IWM_FH_MEM_CBBC_QUEUE+0x55>
cmpl   $0x14,-0x8(%rbp)
jae    1144 <IWM_FH_MEM_CBBC_QUEUE+0x44>
mov    -0x8(%rbp),%eax
sub    $0x10,%eax
shl    $0x2,%eax
add    $0x1bf0,%eax
mov    %eax,-0x4(%rbp)
jmp    1155 <IWM_FH_MEM_CBBC_QUEUE+0x55>
mov    -0x8(%rbp),%eax
sub    $0x14,%eax
shl    $0x2,%eax
add    $0x1b20,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<IWM_FH_MEM_CBBC_QUEUE>:
cmp    $0xf,%edi
ja     110d <IWM_FH_MEM_CBBC_QUEUE+0xd>
lea    0x19d0(,%rdi,4),%eax
ret
lea    0x0(,%rdi,4),%eax
cmp    $0x13,%edi
ja     111f <IWM_FH_MEM_CBBC_QUEUE+0x1f>
add    $0x1bb0,%eax
ret
add    $0x1ad0,%eax
ret

LLVM IR (-O0):
define i32 @IWM_FH_MEM_CBBC_QUEUE(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %3
%4 = load i32, i32* %3
%5 = icmp ult i32 %4, 16
br i1 %5, label %6, label %10
6: ; preds = %1
%7 = load i32, i32* %3
%8 = mul i32 4, %7
%9 = add i32 6608, %8
store i32 %9, i32* %2
br label %23
10: ; preds = %1
%11 = load i32, i32* %3
%12 = icmp ult i32 %11, 20
br i1 %12, label %13, label %18
13: ; preds = %10
%14 = load i32, i32* %3
%15 = sub i32 %14, 16
%16 = mul i32 4, %15
%17 = add i32 7152, %16
store i32 %17, i32* %2
br label %23
18: ; preds = %10
%19 = load i32, i32* %3
%20 = sub i32 %19, 20
%21 = mul i32 4, %20
%22 = add i32 6944, %21
store i32 %22, i32* %2
br label %23
23: ; preds = %18, %13, %6
%24 = load i32, i32* %2
ret i32 %24
}

LLVM IR (-O2):
define i32 @IWM_FH_MEM_CBBC_QUEUE(i32 %0) {
%2 = icmp ult i32 %0, 16
br i1 %2, label %3, label %6
3: ; preds = %1
%4 = shl nuw nsw i32 %0, 2
%5 = add nuw nsw i32 %4, 6608
br label %13
6: ; preds = %1
%7 = icmp ult i32 %0, 20
%8 = shl i32 %0, 2
br i1 %7, label %9, label %11
9: ; preds = %6
%10 = add nuw nsw i32 %8, 7088
br label %13
11: ; preds = %6
%12 = add i32 %8, 6864
br label %13
13: ; preds = %11, %9, %3
%14 = phi i32 [ %5, %3 ], [ %10, %9 ], [ %12, %11 ]
ret i32 %14
}
/* Variables and functions */
int /*<<< orphan*/ print_char(char);
void print_z(void) {
  print_char('z');
  print_char('\n');
}


x86 assembly (clang, -O0):
<print_z>:
push   %rbp
mov    %rsp,%rbp
mov    $0x7a,%edi
call   1030 <print_char@plt>
mov    $0xa,%edi
call   1030 <print_char@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<print_z>:
push   %rax
mov    $0x7a,%edi
call   1030 <print_char@plt>
mov    $0xa,%edi
pop    %rax
jmp    1030 <print_char@plt>

LLVM IR (-O0):
define void @print_z() {
%1 = call i32 @print_char(i8 signext 122)
%2 = call i32 @print_char(i8 signext 10)
ret void
}

LLVM IR (-O2):
define void @print_z() {
%1 = tail call i32 @print_char(i8 signext 122)
%2 = tail call i32 @print_char(i8 signext 10)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ int32_t;
typedef int FILE;

/* Variables and functions */
int /*<<< orphan*/ assert(int *);
int read_int32_from_file(int *, int /*<<< orphan*/ *);
int read_int_from_file(FILE *f, int *num) {
  assert(f);
  assert(num);
  return read_int32_from_file(f, (int32_t *)num);
}


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

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

LLVM IR (-O0):
define i32 @read_int_from_file(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 = call i32 @assert(i32* %5)
%7 = load i32*, i32** %4
%8 = call i32 @assert(i32* %7)
%9 = load i32*, i32** %3
%10 = load i32*, i32** %4
%11 = call i32 @read_int32_from_file(i32* %9, i32* %10)
ret i32 %11
}

LLVM IR (-O2):
define i32 @read_int_from_file(i32* %0, i32* %1) {
%3 = tail call i32 @assert(i32* %0)
%4 = tail call i32 @assert(i32* %1)
%5 = tail call i32 @read_int32_from_file(i32* %0, i32* %1)
ret i32 %5
}