xunge/DecIR huggingface dataset:
/* Type definitions */
typedef scalar_t__ pid_t;

/* Variables and functions */
scalar_t__ fork();
int getpid();
int /*<<< orphan*/ printf(char *, int, scalar_t__);
int main() {
  pid_t child_pid = fork();
  if (child_pid == 0) {
    printf("### Child ###\nCurrent PID: %d and Child PID: %d\n", getpid(),
           child_pid);
  } else {
    printf("### Parent ###\nCurrent PID: %d and Child PID: %d\n", getpid(),
           child_pid);
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x0,%al
call   1050 <fork@plt>
mov    %rax,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
jne    1173 <main+0x43>
mov    $0x0,%al
call   1030 <getpid@plt>
mov    %eax,%esi
mov    -0x10(%rbp),%rdx
lea    0xe97(%rip),%rdi
call   1040 <printf@plt>
jmp    118c <main+0x5c>
mov    $0x0,%al
call   1030 <getpid@plt>
mov    %eax,%esi
mov    -0x10(%rbp),%rdx
lea    0xeaa(%rip),%rdi
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
xor    %eax,%eax
call   1050 <fork@plt>
mov    %rax,%rbx
xor    %eax,%eax
call   1030 <getpid@plt>
test   %rbx,%rbx
je     1155 <main+0x25>
lea    0xee3(%rip),%rdi
mov    %eax,%esi
mov    %rbx,%rdx
jmp    1160 <main+0x30>
lea    0xea4(%rip),%rdi
mov    %eax,%esi
xor    %edx,%edx
call   1040 <printf@plt>
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [49 x i8] c"### Child ###\0ACurrent PID: %d and Child PID: %d\0A\00"
@.str.1 = [50 x i8] c"### Parent ###\0ACurrent PID: %d and Child PID: %d\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i64
store i32 0, i32* %1
%3 = call i64 (...) @fork()
store i64 %3, i64* %2
%4 = load i64, i64* %2
%5 = icmp eq i64 %4, 0
br i1 %5, label %6, label %10
6: ; preds = %0
%7 = call i32 (...) @getpid()
%8 = load i64, i64* %2
%9 = call i32 @printf(i8* getelementptr inbounds ([49 x i8], [49 x i8]* @.str, i64 0, i64 0), i32 %7, i64 %8)
br label %14
10: ; preds = %0
%11 = call i32 (...) @getpid()
%12 = load i64, i64* %2
%13 = call i32 @printf(i8* getelementptr inbounds ([50 x i8], [50 x i8]* @.str.1, i64 0, i64 0), i32 %11, i64 %12)
br label %14
14: ; preds = %10, %6
ret i32 0
}

LLVM IR (-O2):
@.str = [49 x i8] c"### Child ###\0ACurrent PID: %d and Child PID: %d\0A\00"
@.str.1 = [50 x i8] c"### Parent ###\0ACurrent PID: %d and Child PID: %d\0A\00"
define i32 @main() {
%1 = tail call i64 (...) @fork()
%2 = icmp eq i64 %1, 0
%3 = tail call i32 (...) @getpid()
br i1 %2, label %4, label %6
4: ; preds = %0
%5 = tail call i32 @printf(i8* getelementptr inbounds ([49 x i8], [49 x i8]* @.str, i64 0, i64 0), i32 %3, i64 0)
br label %8
6: ; preds = %0
%7 = tail call i32 @printf(i8* getelementptr inbounds ([50 x i8], [50 x i8]* @.str.1, i64 0, i64 0), i32 %3, i64 %1)
br label %8
8: ; preds = %6, %4
ret i32 0
}
void av_opt_next() {}


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

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

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

LLVM IR (-O2):
define void @av_opt_next() {
ret void
}
/* Variables and functions */
scalar_t__ bin_exists(char *);
int is_openssh_client_enabled(void) {
  return (bin_exists("ssh") && bin_exists("ssh-keygen"));
}


x86 assembly (clang, -O0):
<is_openssh_client_enabled>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    0xee1(%rip),%rdi
call   1030 <bin_exists@plt>
mov    %rax,%rcx
xor    %eax,%eax
cmp    $0x0,%rcx
mov    %al,-0x1(%rbp)
je     114c <is_openssh_client_enabled+0x3c>
lea    0xec7(%rip),%rdi
call   1030 <bin_exists@plt>
cmp    $0x0,%rax
setne  %al
mov    %al,-0x1(%rbp)
mov    -0x1(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<is_openssh_client_enabled>:
push   %rax
lea    0xee8(%rip),%rdi
call   1030 <bin_exists@plt>
test   %rax,%rax
je     113b <is_openssh_client_enabled+0x2b>
lea    0xedb(%rip),%rdi
call   1030 <bin_exists@plt>
mov    %rax,%rcx
xor    %eax,%eax
test   %rcx,%rcx
setne  %al
pop    %rcx
ret
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [4 x i8] c"ssh\00"
@.str.1 = [11 x i8] c"ssh-keygen\00"
define i32 @is_openssh_client_enabled() {
%1 = call i64 @bin_exists(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0))
%2 = icmp ne i64 %1, 0
br i1 %2, label %3, label %6
3: ; preds = %0
%4 = call i64 @bin_exists(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.1, i64 0, i64 0))
%5 = icmp ne i64 %4, 0
br label %6
6: ; preds = %3, %0
%7 = phi i1 [ false, %0 ], [ %5, %3 ]
%8 = zext i1 %7 to i32
ret i32 %8
}

LLVM IR (-O2):
@.str = [4 x i8] c"ssh\00"
@.str.1 = [11 x i8] c"ssh-keygen\00"
define i32 @is_openssh_client_enabled() {
%1 = tail call i64 @bin_exists(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0))
%2 = icmp eq i64 %1, 0
br i1 %2, label %7, label %3
3: ; preds = %0
%4 = tail call i64 @bin_exists(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.1, i64 0, i64 0))
%5 = icmp ne i64 %4, 0
%6 = zext i1 %5 to i32
br label %7
7: ; preds = %3, %0
%8 = phi i32 [ 0, %0 ], [ %6, %3 ]
ret i32 %8
}
unsigned int texthash(const char *str) {
  int i, s;
  for (i = s = 0; str[i]; i++) {
    s += str[i];
  }
  return s % 73;
}


x86 assembly (clang, -O0):
<texthash>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0x10(%rbp)
movl   $0x0,-0xc(%rbp)
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
cmpb   $0x0,(%rax,%rcx,1)
je     1148 <texthash+0x48>
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
movsbl (%rax,%rcx,1),%eax
add    -0x10(%rbp),%eax
mov    %eax,-0x10(%rbp)
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1116 <texthash+0x16>
mov    -0x10(%rbp),%eax
mov    $0x49,%ecx
cltd
idiv   %ecx
mov    %edx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<texthash>:
mov    (%rdi),%al
test   %al,%al
je     1143 <texthash+0x43>
add    $0x1,%rdi
xor    %ecx,%ecx
nopl   0x0(%rax)
movsbl %al,%eax
add    %eax,%ecx
movzbl (%rdi),%eax
add    $0x1,%rdi
test   %al,%al
jne    1110 <texthash+0x10>
movslq %ecx,%rax
imul   $0xffffffffe070381d,%rax,%rcx
shr    $0x20,%rcx
add    %eax,%ecx
mov    %ecx,%edx
shr    $0x1f,%edx
sar    $0x6,%ecx
add    %edx,%ecx
lea    (%rcx,%rcx,8),%edx
lea    (%rcx,%rdx,8),%ecx
sub    %ecx,%eax
ret
xor    %eax,%eax
ret

LLVM IR (-O0):
define i32 @texthash(i8* %0) {
%2 = alloca i8*
%3 = alloca i32
%4 = alloca i32
store i8* %0, i8** %2
store i32 0, i32* %4
store i32 0, i32* %3
br label %5
5: ; preds = %21, %1
%6 = load i8*, i8** %2
%7 = load i32, i32* %3
%8 = sext i32 %7 to i64
%9 = getelementptr inbounds i8, i8* %6, i64 %8
%10 = load i8, i8* %9
%11 = icmp ne i8 %10, 0
br i1 %11, label %12, label %24
12: ; preds = %5
%13 = load i8*, i8** %2
%14 = load i32, i32* %3
%15 = sext i32 %14 to i64
%16 = getelementptr inbounds i8, i8* %13, i64 %15
%17 = load i8, i8* %16
%18 = sext i8 %17 to i32
%19 = load i32, i32* %4
%20 = add nsw i32 %19, %18
store i32 %20, i32* %4
br label %21
21: ; preds = %12
%22 = load i32, i32* %3
%23 = add nsw i32 %22, 1
store i32 %23, i32* %3
br label %5
24: ; preds = %5
%25 = load i32, i32* %4
%26 = srem i32 %25, 73
ret i32 %26
}

LLVM IR (-O2):
define i32 @texthash(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = icmp eq i8 %2, 0
br i1 %3, label %16, label %4
4: ; preds = %1, %4
%5 = phi i64 [ %10, %4 ], [ 0, %1 ]
%6 = phi i8 [ %12, %4 ], [ %2, %1 ]
%7 = phi i32 [ %9, %4 ], [ 0, %1 ]
%8 = sext i8 %6 to i32
%9 = add nsw i32 %7, %8
%10 = add nuw nsw i64 %5, 1
%11 = getelementptr inbounds i8, i8* %0, i64 %10
%12 = load i8, i8* %11
%13 = icmp eq i8 %12, 0
br i1 %13, label %14, label %4
14: ; preds = %4
%15 = srem i32 %9, 73
br label %16
16: ; preds = %14, %1
%17 = phi i32 [ 0, %1 ], [ %15, %14 ]
ret i32 %17
}
/* Variables and functions */
float calcSine(double);
double sineCoefficient(int, int);
float sineOsc(float A, int FRuency, int SR) {
  double coef = sineCoefficient(FRuency, SR);
  return A * calcSine(coef);
}


x86 assembly (clang, -O0):
<sineOsc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movss  %xmm0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%edi
mov    -0xc(%rbp),%esi
call   1040 <sineCoefficient@plt>
movsd  %xmm0,-0x18(%rbp)
movss  -0x4(%rbp),%xmm0
movss  %xmm0,-0x1c(%rbp)
movsd  -0x18(%rbp),%xmm0
call   1030 <calcSine@plt>
movaps %xmm0,%xmm1
movss  -0x1c(%rbp),%xmm0
mulss  %xmm1,%xmm0
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<sineOsc>:
push   %rax
movss  %xmm0,0x4(%rsp)
call   1040 <sineCoefficient@plt>
call   1030 <calcSine@plt>
mulss  0x4(%rsp),%xmm0
pop    %rax
ret

LLVM IR (-O0):
define float @sineOsc(float %0, i32 %1, i32 %2) {
%4 = alloca float
%5 = alloca i32
%6 = alloca i32
%7 = alloca double
store float %0, float* %4
store i32 %1, i32* %5
store i32 %2, i32* %6
%8 = load i32, i32* %5
%9 = load i32, i32* %6
%10 = call double @sineCoefficient(i32 %8, i32 %9)
store double %10, double* %7
%11 = load float, float* %4
%12 = load double, double* %7
%13 = call float @calcSine(double %12)
%14 = fmul float %11, %13
ret float %14
}

LLVM IR (-O2):
define float @sineOsc(float %0, i32 %1, i32 %2) {
%4 = tail call double @sineCoefficient(i32 %1, i32 %2)
%5 = tail call float @calcSine(double %4)
%6 = fmul float %5, %0
ret float %6
}
/* Variables and functions */
int /*<<< orphan*/ perror(char *);
int unlink(char *);
void rmfifo(void) {
  if (-1 == unlink("cmd_fifo")) {
    perror("unlink");
  }
  if (-1 == unlink("data_fifo")) {
    perror("unlink");
  }
}


x86 assembly (clang, -O0):
<rmfifo>:
push   %rbp
mov    %rsp,%rbp
lea    0xed5(%rip),%rdi
call   1030 <unlink@plt>
mov    %eax,%ecx
mov    $0xffffffff,%eax
cmp    %ecx,%eax
jne    114b <rmfifo+0x2b>
lea    0xec3(%rip),%rdi
call   1040 <perror@plt>
lea    0xebe(%rip),%rdi
call   1030 <unlink@plt>
mov    %eax,%ecx
mov    $0xffffffff,%eax
cmp    %ecx,%eax
jne    1172 <rmfifo+0x52>
lea    0xe9c(%rip),%rdi
call   1040 <perror@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<rmfifo>:
push   %rax
lea    0xed8(%rip),%rdi
call   1030 <unlink@plt>
cmp    $0xffffffff,%eax
je     1145 <rmfifo+0x25>
lea    0xed7(%rip),%rdi
call   1030 <unlink@plt>
cmp    $0xffffffff,%eax
je     1153 <rmfifo+0x33>
pop    %rax
ret
lea    0xebd(%rip),%rdi
call   1040 <perror@plt>
jmp    1132 <rmfifo+0x12>
lea    0xeaf(%rip),%rdi
pop    %rax
jmp    1040 <perror@plt>

LLVM IR (-O0):
@.str = [9 x i8] c"cmd_fifo\00"
@.str.1 = [7 x i8] c"unlink\00"
@.str.2 = [10 x i8] c"data_fifo\00"
define void @rmfifo() {
%1 = call i32 @unlink(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0))
%2 = icmp eq i32 -1, %1
br i1 %2, label %3, label %5
3: ; preds = %0
%4 = call i32 @perror(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0))
br label %5
5: ; preds = %3, %0
%6 = call i32 @unlink(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.2, i64 0, i64 0))
%7 = icmp eq i32 -1, %6
br i1 %7, label %8, label %10
8: ; preds = %5
%9 = call i32 @perror(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0))
br label %10
10: ; preds = %8, %5
ret void
}

LLVM IR (-O2):
@.str = [9 x i8] c"cmd_fifo\00"
@.str.1 = [7 x i8] c"unlink\00"
@.str.2 = [10 x i8] c"data_fifo\00"
define void @rmfifo() {
%1 = tail call i32 @unlink(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0))
%2 = icmp eq i32 %1, -1
br i1 %2, label %3, label %5
3: ; preds = %0
%4 = tail call i32 @perror(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0))
br label %5
5: ; preds = %3, %0
%6 = tail call i32 @unlink(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.2, i64 0, i64 0))
%7 = icmp eq i32 %6, -1
br i1 %7, label %8, label %10
8: ; preds = %5
%9 = tail call i32 @perror(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0))
br label %10
10: ; preds = %8, %5
ret void
}
/* Variables and functions */
int /*<<< orphan*/ test_boyer_moore();
void test_matchers() { test_boyer_moore(); }


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

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

LLVM IR (-O0):
define void @test_matchers() {
%1 = call i32 (...) @test_boyer_moore()
ret void
}

LLVM IR (-O2):
define void @test_matchers() {
%1 = tail call i32 (...) @test_boyer_moore()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ get_LED_flags(char *);
int /*<<< orphan*/ set_LED_flags(char);
void turn_on_LED(char which_LED) {
  char flags = 0;
  get_LED_flags(&flags);
  flags |= which_LED;
  set_LED_flags(flags);
}


x86 assembly (clang, -O0):
<turn_on_LED>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movb   $0x0,-0x2(%rbp)
lea    -0x2(%rbp),%rdi
call   1040 <get_LED_flags@plt>
movsbl -0x1(%rbp),%ecx
movsbl -0x2(%rbp),%eax
or     %ecx,%eax
mov    %al,-0x2(%rbp)
movsbl -0x2(%rbp),%edi
call   1030 <set_LED_flags@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<turn_on_LED>:
push   %rbx
sub    $0x10,%rsp
mov    %edi,%ebx
movb   $0x0,0xf(%rsp)
lea    0xf(%rsp),%rdi
call   1040 <get_LED_flags@plt>
or     0xf(%rsp),%bl
mov    %bl,0xf(%rsp)
movsbl %bl,%edi
call   1030 <set_LED_flags@plt>
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
define void @turn_on_LED(i8 signext %0) {
%2 = alloca i8
%3 = alloca i8
store i8 %0, i8* %2
store i8 0, i8* %3
%4 = call i32 @get_LED_flags(i8* %3)
%5 = load i8, i8* %2
%6 = sext i8 %5 to i32
%7 = load i8, i8* %3
%8 = sext i8 %7 to i32
%9 = or i32 %8, %6
%10 = trunc i32 %9 to i8
store i8 %10, i8* %3
%11 = load i8, i8* %3
%12 = call i32 @set_LED_flags(i8 signext %11)
ret void
}

LLVM IR (-O2):
define void @turn_on_LED(i8 signext %0) {
%2 = alloca i8
store i8 0, i8* %2
%3 = call i32 @get_LED_flags(i8* %2)
%4 = load i8, i8* %2
%5 = or i8 %4, %0
store i8 %5, i8* %2
%6 = call i32 @set_LED_flags(i8 signext %5)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void main(void) { printf("Merhaba Dunya\n"); }


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

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

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

LLVM IR (-O2):
@str = [14 x i8] c"Merhaba Dunya\00"
define void @main() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([14 x i8], [14 x i8]* @str, i64 0, i64 0))
ret void
}
/* Variables and functions */
void *alloc(unsigned int);
int /*<<< orphan*/ alloc_free(void *);
int /*<<< orphan*/ memcpy(void *, void *, unsigned int);
void alloc_re(void **x, unsigned int m, unsigned int n) {
  void *y;
  y = alloc(n);
  memcpy((y), (*x), (m));
  alloc_free(*x);
  *x = y;
}


x86 assembly (clang, -O0):
<alloc_re>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    -0x10(%rbp),%edi
call   1050 <alloc@plt>
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rdi
mov    -0x8(%rbp),%rax
mov    (%rax),%rsi
mov    -0xc(%rbp),%edx
call   1030 <memcpy@plt>
mov    -0x8(%rbp),%rax
mov    (%rax),%rdi
call   1040 <alloc_free@plt>
mov    -0x18(%rbp),%rcx
mov    -0x8(%rbp),%rax
mov    %rcx,(%rax)
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<alloc_re>:
push   %rbp
push   %r14
push   %rbx
mov    %esi,%r14d
mov    %rdi,%rbx
mov    %edx,%edi
call   1050 <alloc@plt>
mov    %rax,%rbp
mov    (%rbx),%rsi
mov    %rax,%rdi
mov    %r14d,%edx
call   1030 <memcpy@plt>
mov    (%rbx),%rdi
call   1040 <alloc_free@plt>
mov    %rbp,(%rbx)
pop    %rbx
pop    %r14
pop    %rbp
ret

LLVM IR (-O0):
define void @alloc_re(i8** %0, i32 %1, i32 %2) {
%4 = alloca i8**
%5 = alloca i32
%6 = alloca i32
%7 = alloca i8*
store i8** %0, i8*** %4
store i32 %1, i32* %5
store i32 %2, i32* %6
%8 = load i32, i32* %6
%9 = call i8* @alloc(i32 %8)
store i8* %9, i8** %7
%10 = load i8*, i8** %7
%11 = load i8**, i8*** %4
%12 = load i8*, i8** %11
%13 = load i32, i32* %5
%14 = call i32 @memcpy(i8* %10, i8* %12, i32 %13)
%15 = load i8**, i8*** %4
%16 = load i8*, i8** %15
%17 = call i32 @alloc_free(i8* %16)
%18 = load i8*, i8** %7
%19 = load i8**, i8*** %4
store i8* %18, i8** %19
ret void
}

LLVM IR (-O2):
define void @alloc_re(i8** nocapture %0, i32 %1, i32 %2) {
%4 = tail call i8* @alloc(i32 %2)
%5 = load i8*, i8** %0
%6 = tail call i32 @memcpy(i8* %4, i8* %5, i32 %1)
%7 = load i8*, i8** %0
%8 = tail call i32 @alloc_free(i8* %7)
store i8* %4, i8** %0
ret void
}
/* Variables and functions */
int /*<<< orphan*/ int80(int, char *, char *, char *, int /*<<< orphan*/,
                         int /*<<< orphan*/, int /*<<< orphan*/);
char getHours() {
  char h;
  char mi;
  char s;
  int80(6, &h, &mi, &s, 0, 0, 0);
  return h;
}


x86 assembly (clang, -O0):
<getHours>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x6,%edi
lea    -0x1(%rbp),%rsi
lea    -0x2(%rbp),%rdx
lea    -0x3(%rbp),%rcx
xor    %r9d,%r9d
mov    %r9d,%r8d
movl   $0x0,(%rsp)
call   1030 <int80@plt>
movsbl -0x1(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<getHours>:
sub    $0x18,%rsp
movl   $0x0,(%rsp)
lea    0x15(%rsp),%rsi
lea    0x17(%rsp),%rdx
lea    0x16(%rsp),%rcx
mov    $0x6,%edi
xor    %r8d,%r8d
xor    %r9d,%r9d
call   1030 <int80@plt>
mov    0x15(%rsp),%al
add    $0x18,%rsp
ret

LLVM IR (-O0):
define signext i8 @getHours() {
%1 = alloca i8
%2 = alloca i8
%3 = alloca i8
%4 = call i32 @int80(i32 6, i8* %1, i8* %2, i8* %3, i32 0, i32 0, i32 0)
%5 = load i8, i8* %1
ret i8 %5
}

LLVM IR (-O2):
define signext i8 @getHours() {
%1 = alloca i8
%2 = alloca i8
%3 = alloca i8
%4 = call i32 @int80(i32 6, i8* %1, i8* %2, i8* %3, i32 0, i32 0, i32 0)
%5 = load i8, i8* %1
ret i8 %5
}
error(s, f) char *s, *f;
{
  std_err("sum: ");
  std_err(s);
  if (f)
    std_err(f);
  std_err("\n");
}


x86 assembly (clang, -O0):
<error>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
lea    0xed9(%rip),%rdi
mov    $0x0,%al
call   1030 <std_err@plt>
mov    -0x10(%rbp),%rdi
mov    $0x0,%al
call   1030 <std_err@plt>
cmpq   $0x0,-0x18(%rbp)
je     114f <error+0x3f>
mov    -0x18(%rbp),%rdi
mov    $0x0,%al
call   1030 <std_err@plt>
lea    0xeb0(%rip),%rdi
mov    $0x0,%al
call   1030 <std_err@plt>
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<error>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%r14
mov    %rdi,%rbx
lea    0xedf(%rip),%rdi
xor    %eax,%eax
call   1030 <std_err@plt>
mov    %rbx,%rdi
xor    %eax,%eax
call   1030 <std_err@plt>
test   %r14,%r14
je     1141 <error+0x31>
mov    %r14,%rdi
xor    %eax,%eax
call   1030 <std_err@plt>
lea    0xebe(%rip),%rdi
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1030 <std_err@plt>

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

LLVM IR (-O2):
@.str = [6 x i8] c"sum: \00"
@.str.1 = [2 x i8] c"\0A\00"
define i32 @error(i8* %0, i8* %1) {
%3 = tail call i32 (i8*, ...) bitcast (i32 (...)* @std_err to i32 (i8*, ...)*)(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0))
%4 = tail call i32 (i8*, ...) bitcast (i32 (...)* @std_err to i32 (i8*, ...)*)(i8* %0)
%5 = icmp eq i8* %1, null
br i1 %5, label %8, label %6
6: ; preds = %2
%7 = tail call i32 (i8*, ...) bitcast (i32 (...)* @std_err to i32 (i8*, ...)*)(i8* %1)
br label %8
8: ; preds = %6, %2
%9 = tail call i32 (i8*, ...) bitcast (i32 (...)* @std_err to i32 (i8*, ...)*)(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
ret i32 undef
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, ...);
void print_version() {
  printf("%s %s\n", "NTTTCP for Linux", "1.4.0");
  printf("---------------------------------------------------------\n");
}


x86 assembly (clang, -O0):
<print_version>:
push   %rbp
mov    %rsp,%rbp
lea    0xee5(%rip),%rdi
lea    0xee5(%rip),%rsi
lea    0xeef(%rip),%rdx
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xee7(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<print_version>:
push   %rax
lea    0xed8(%rip),%rdi
lea    0xed8(%rip),%rsi
lea    0xee2(%rip),%rdx
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xeda(%rip),%rdi
pop    %rax
jmp    1030 <puts@plt>

LLVM IR (-O0):
@.str = [7 x i8] c"%s %s\0A\00"
@.str.1 = [17 x i8] c"NTTTCP for Linux\00"
@.str.2 = [6 x i8] c"1.4.0\00"
@.str.3 = [59 x i8] c"---------------------------------------------------------\0A\00"
define void @print_version() {
%1 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.2, i64 0, i64 0))
%2 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([59 x i8], [59 x i8]* @.str.3, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [7 x i8] c"%s %s\0A\00"
@.str.1 = [17 x i8] c"NTTTCP for Linux\00"
@.str.2 = [6 x i8] c"1.4.0\00"
@str = [58 x i8] c"---------------------------------------------------------\00"
define void @print_version() {
%1 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.2, i64 0, i64 0))
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([58 x i8], [58 x i8]* @str, i64 0, i64 0))
ret void
}
int LZ4_compressBound(int isize) {
  return ((unsigned)(isize) > (unsigned)0x7E000000
              ? 0
              : (isize) + ((isize) / 255) + 16);
}


x86 assembly (clang, -O0):
<LZ4_compressBound>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
cmpl   $0x7e000000,-0x4(%rbp)
jbe    111e <LZ4_compressBound+0x1e>
xor    %eax,%eax
mov    %eax,-0x8(%rbp)
jmp    113c <LZ4_compressBound+0x3c>
mov    -0x4(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0x4(%rbp),%eax
mov    $0xff,%ecx
cltd
idiv   %ecx
mov    %eax,%ecx
mov    -0xc(%rbp),%eax
add    %ecx,%eax
add    $0x10,%eax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<LZ4_compressBound>:
xor    %eax,%eax
cmp    $0x7e000000,%edi
ja     111f <LZ4_compressBound+0x1f>
mov    %edi,%eax
mov    $0x80808081,%ecx
imul   %rax,%rcx
shr    $0x27,%rcx
lea    (%rdi,%rcx,1),%eax
add    $0x10,%eax
ret

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

LLVM IR (-O2):
define i32 @LZ4_compressBound(i32 %0) {
%2 = icmp ugt i32 %0, 2113929216
br i1 %2, label %7, label %3
3: ; preds = %1
%4 = udiv i32 %0, 255
%5 = add nuw nsw i32 %0, 16
%6 = add nuw nsw i32 %5, %4
br label %7
7: ; preds = %1, %3
%8 = phi i32 [ %6, %3 ], [ 0, %1 ]
ret i32 %8
}
void csr_close_3wire(void) {}


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

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

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

LLVM IR (-O2):
define void @csr_close_3wire() {
ret void
}
void d2i_ASN1_TIME(void) {}


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

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

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

LLVM IR (-O2):
define void @d2i_ASN1_TIME() {
ret void
}
int net_sock_unblock(int sock) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @net_sock_unblock(i32 %0) {
ret i32 0
}
/* Variables and functions */
scalar_t__ malloc(int);
int strlen(char const *);
char *greeter_allocate(const char *greetings, const char *name) {
  return (char *)malloc((strlen(greetings) + strlen(name) + 1) * sizeof(char));
}


x86 assembly (clang, -O0):
<greeter_allocate>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <strlen@plt>
mov    %eax,-0x14(%rbp)
mov    -0x10(%rbp),%rdi
call   1030 <strlen@plt>
mov    %eax,%ecx
mov    -0x14(%rbp),%eax
add    %ecx,%eax
add    $0x1,%eax
cltq
shl    $0x0,%rax
mov    %eax,%edi
call   1040 <malloc@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<greeter_allocate>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%rbx
call   1030 <strlen@plt>
mov    %eax,%r14d
mov    %rbx,%rdi
call   1030 <strlen@plt>
lea    (%r14,%rax,1),%edi
add    $0x1,%edi
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1040 <malloc@plt>

LLVM IR (-O0):
define i8* @greeter_allocate(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 = call i32 @strlen(i8* %5)
%7 = load i8*, i8** %4
%8 = call i32 @strlen(i8* %7)
%9 = add nsw i32 %6, %8
%10 = add nsw i32 %9, 1
%11 = sext i32 %10 to i64
%12 = mul i64 %11, 1
%13 = trunc i64 %12 to i32
%14 = call i64 @malloc(i32 %13)
%15 = inttoptr i64 %14 to i8*
ret i8* %15
}

LLVM IR (-O2):
define i8* @greeter_allocate(i8* %0, i8* %1) {
%3 = tail call i32 @strlen(i8* %0)
%4 = tail call i32 @strlen(i8* %1)
%5 = add i32 %3, 1
%6 = add i32 %5, %4
%7 = tail call i64 @malloc(i32 %6)
%8 = inttoptr i64 %7 to i8*
ret i8* %8
}
int findProcessTableSegment(int index) { return (index + 2) * 0x1000; }


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

x86 assembly (clang, -O2):
<findProcessTableSegment>:
shl    $0xc,%edi
lea    0x2000(%rdi),%eax
ret

LLVM IR (-O0):
define i32 @findProcessTableSegment(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = add nsw i32 %3, 2
%5 = mul nsw i32 %4, 4096
ret i32 %5
}

LLVM IR (-O2):
define i32 @findProcessTableSegment(i32 %0) {
%2 = shl i32 %0, 12
%3 = add i32 %2, 8192
ret i32 %3
}
/* Variables and functions */
int core4_swap(char *, int);
int U_EMRSCALEWINDOWEXTEX_swap(char *record, int torev) {
  return (core4_swap(record, torev));
}


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

x86 assembly (clang, -O2):
<U_EMRSCALEWINDOWEXTEX_swap>:
jmp    1030 <core4_swap@plt>

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

LLVM IR (-O2):
define i32 @U_EMRSCALEWINDOWEXTEX_swap(i8* %0, i32 %1) {
%3 = tail call i32 @core4_swap(i8* %0, i32 %1)
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ assert(unsigned char *);
unsigned int logic_byte_shift_right(unsigned char to_shift, size_t shift_by,
                                    unsigned char *p_result) {
  assert(p_result);
  unsigned int err_code = 0;
  if (!p_result) {
    err_code = 2;
    goto end;
  }
  *p_result = (to_shift >> shift_by);
end:
  return err_code;
}


x86 assembly (clang, -O0):
<logic_byte_shift_right>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %dil,%al
mov    %al,-0x1(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x18(%rbp),%rdi
call   1030 <assert@plt>
movl   $0x0,-0x1c(%rbp)
cmpq   $0x0,-0x18(%rbp)
jne    114d <logic_byte_shift_right+0x3d>
movl   $0x2,-0x1c(%rbp)
jmp    115f <logic_byte_shift_right+0x4f>
movzbl -0x1(%rbp),%eax
mov    -0x10(%rbp),%rcx
sar    %cl,%eax
mov    %al,%cl
mov    -0x18(%rbp),%rax
mov    %cl,(%rax)
mov    -0x1c(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<logic_byte_shift_right>:
push   %rbp
push   %r14
push   %rbx
mov    %rdx,%rbx
mov    %rsi,%r14
mov    %edi,%ebp
mov    %rdx,%rdi
call   1030 <assert@plt>
test   %rbx,%rbx
je     1138 <logic_byte_shift_right+0x28>
movzbl %bpl,%eax
mov    %r14d,%ecx
shr    %cl,%eax
mov    %al,(%rbx)
xor    %eax,%eax
jmp    113d <logic_byte_shift_right+0x2d>
mov    $0x2,%eax
pop    %rbx
pop    %r14
pop    %rbp
ret

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

LLVM IR (-O2):
define i32 @logic_byte_shift_right(i8 zeroext %0, i64 %1, i8* %2) {
%4 = tail call i32 @assert(i8* %2)
%5 = icmp eq i8* %2, null
br i1 %5, label %11, label %6
6: ; preds = %3
%7 = zext i8 %0 to i32
%8 = trunc i64 %1 to i32
%9 = lshr i32 %7, %8
%10 = trunc i32 %9 to i8
store i8 %10, i8* %2
br label %11
11: ; preds = %3, %6
%12 = phi i32 [ 0, %6 ], [ 2, %3 ]
ret i32 %12
}
/* Type definitions */
struct globs {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ globs_free(struct globs *);
void globs_cleanup(struct globs **g) { globs_free(*g); }


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

x86 assembly (clang, -O2):
<globs_cleanup>:
mov    (%rdi),%rdi
jmp    1030 <globs_free@plt>

LLVM IR (-O0):
%struct.globs = type { i32 }
define void @globs_cleanup(%struct.globs** %0) {
%2 = alloca %struct.globs**
store %struct.globs** %0, %struct.globs*** %2
%3 = load %struct.globs**, %struct.globs*** %2
%4 = load %struct.globs*, %struct.globs** %3
%5 = call i32 @globs_free(%struct.globs* %4)
ret void
}

LLVM IR (-O2):
%struct.globs = type { i32 }
define void @globs_cleanup(%struct.globs** nocapture %0) {
%2 = load %struct.globs*, %struct.globs** %0
%3 = tail call i32 @globs_free(%struct.globs* %2)
ret void
}
void ADCDataAlignModeSet(unsigned long ulBase, unsigned long ulAlignMode) {
  ;
  ;
  if (ulAlignMode == 0x00000000) {
    (*((volatile unsigned long *)(ulBase + 0x00000008))) &= ~0x00000800;
  } else {
    (*((volatile unsigned long *)(ulBase + 0x00000008))) |= 0x00000800;
  }
}


x86 assembly (clang, -O0):
<ADCDataAlignModeSet>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
jne    112f <ADCDataAlignModeSet+0x2f>
mov    -0x8(%rbp),%rax
mov    0x8(%rax),%rcx
and    $0xfffffffffffff7ff,%rcx
mov    %rcx,0x8(%rax)
jmp    1142 <ADCDataAlignModeSet+0x42>
mov    -0x8(%rbp),%rax
mov    0x8(%rax),%rcx
or     $0x800,%rcx
mov    %rcx,0x8(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<ADCDataAlignModeSet>:
xor    %eax,%eax
test   %rsi,%rsi
setne  %al
mov    $0xfffffffffffff7ff,%rcx
and    0x8(%rdi),%rcx
shl    $0xb,%rax
or     %rcx,%rax
mov    %rax,0x8(%rdi)
ret

LLVM IR (-O0):
define void @ADCDataAlignModeSet(i64 %0, i64 %1) {
%3 = alloca i64
%4 = alloca i64
store i64 %0, i64* %3
store i64 %1, i64* %4
%5 = load i64, i64* %4
%6 = icmp eq i64 %5, 0
br i1 %6, label %7, label %13
7: ; preds = %2
%8 = load i64, i64* %3
%9 = add i64 %8, 8
%10 = inttoptr i64 %9 to i64*
%11 = load volatile i64, i64* %10
%12 = and i64 %11, -2049
store volatile i64 %12, i64* %10
br label %19
13: ; preds = %2
%14 = load i64, i64* %3
%15 = add i64 %14, 8
%16 = inttoptr i64 %15 to i64*
%17 = load volatile i64, i64* %16
%18 = or i64 %17, 2048
store volatile i64 %18, i64* %16
br label %19
19: ; preds = %13, %7
ret void
}

LLVM IR (-O2):
define void @ADCDataAlignModeSet(i64 %0, i64 %1) {
%3 = icmp eq i64 %1, 0
%4 = add i64 %0, 8
%5 = inttoptr i64 %4 to i64*
%6 = load volatile i64, i64* %5
%7 = and i64 %6, -2049
%8 = select i1 %3, i64 0, i64 2048
%9 = or i64 %7, %8
store volatile i64 %9, i64* %5
ret void
}
void rop3_88_1_0(unsigned char *D, unsigned char S, unsigned char T) {
  unsigned char stk1;
  unsigned char stk2;
  unsigned char stk3;
  stk3 = S | T;
  stk2 = *D & stk3;
  stk1 = T ^ stk2;
  *D = (stk1 & (~S)) | (*D & S);
}


x86 assembly (clang, -O0):
<rop3_88_1_0>:
push   %rbp
mov    %rsp,%rbp
mov    %dl,%al
mov    %sil,%cl
mov    %rdi,-0x8(%rbp)
mov    %cl,-0x9(%rbp)
mov    %al,-0xa(%rbp)
movzbl -0x9(%rbp),%eax
movzbl -0xa(%rbp),%ecx
or     %ecx,%eax
mov    %al,-0xd(%rbp)
mov    -0x8(%rbp),%rax
movzbl (%rax),%eax
movzbl -0xd(%rbp),%ecx
and    %ecx,%eax
mov    %al,-0xc(%rbp)
movzbl -0xa(%rbp),%eax
movzbl -0xc(%rbp),%ecx
xor    %ecx,%eax
mov    %al,-0xb(%rbp)
movzbl -0xb(%rbp),%eax
movzbl -0x9(%rbp),%ecx
xor    $0xffffffff,%ecx
and    %ecx,%eax
mov    -0x8(%rbp),%rcx
movzbl (%rcx),%ecx
movzbl -0x9(%rbp),%edx
and    %edx,%ecx
or     %ecx,%eax
mov    %al,%cl
mov    -0x8(%rbp),%rax
mov    %cl,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<rop3_88_1_0>:
mov    %edx,%eax
or     %sil,%al
mov    (%rdi),%cl
and    %cl,%al
xor    %dl,%al
xor    %al,%cl
and    %sil,%cl
xor    %al,%cl
mov    %cl,(%rdi)
ret

LLVM IR (-O0):
define void @rop3_88_1_0(i8* %0, i8 zeroext %1, i8 zeroext %2) {
%4 = alloca i8*
%5 = alloca i8
%6 = alloca i8
%7 = alloca i8
%8 = alloca i8
%9 = alloca i8
store i8* %0, i8** %4
store i8 %1, i8* %5
store i8 %2, i8* %6
%10 = load i8, i8* %5
%11 = zext i8 %10 to i32
%12 = load i8, i8* %6
%13 = zext i8 %12 to i32
%14 = or i32 %11, %13
%15 = trunc i32 %14 to i8
store i8 %15, i8* %9
%16 = load i8*, i8** %4
%17 = load i8, i8* %16
%18 = zext i8 %17 to i32
%19 = load i8, i8* %9
%20 = zext i8 %19 to i32
%21 = and i32 %18, %20
%22 = trunc i32 %21 to i8
store i8 %22, i8* %8
%23 = load i8, i8* %6
%24 = zext i8 %23 to i32
%25 = load i8, i8* %8
%26 = zext i8 %25 to i32
%27 = xor i32 %24, %26
%28 = trunc i32 %27 to i8
store i8 %28, i8* %7
%29 = load i8, i8* %7
%30 = zext i8 %29 to i32
%31 = load i8, i8* %5
%32 = zext i8 %31 to i32
%33 = xor i32 %32, -1
%34 = and i32 %30, %33
%35 = load i8*, i8** %4
%36 = load i8, i8* %35
%37 = zext i8 %36 to i32
%38 = load i8, i8* %5
%39 = zext i8 %38 to i32
%40 = and i32 %37, %39
%41 = or i32 %34, %40
%42 = trunc i32 %41 to i8
%43 = load i8*, i8** %4
store i8 %42, i8* %43
ret void
}

LLVM IR (-O2):
define void @rop3_88_1_0(i8* nocapture %0, i8 zeroext %1, i8 zeroext %2) {
%4 = or i8 %2, %1
%5 = load i8, i8* %0
%6 = and i8 %5, %4
%7 = xor i8 %6, %2
%8 = xor i8 %1, -1
%9 = and i8 %7, %8
%10 = and i8 %5, %1
%11 = or i8 %9, %10
store i8 %11, i8* %0
ret void
}
void INT_Excep_SDHI_SDACI(void) {}


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

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

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

LLVM IR (-O2):
define void @INT_Excep_SDHI_SDACI() {
ret void
}
int iscntrl(int c) { return !!(((c >= 0) && (c <= 0x1F)) || (c == 0x7F)); }


x86 assembly (clang, -O0):
<iscntrl>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
cmpl   $0x0,-0x4(%rbp)
jl     1120 <iscntrl+0x20>
mov    $0x1,%al
cmpl   $0x1f,-0x4(%rbp)
mov    %al,-0x5(%rbp)
jle    112a <iscntrl+0x2a>
cmpl   $0x7f,-0x4(%rbp)
sete   %al
mov    %al,-0x5(%rbp)
mov    -0x5(%rbp),%al
xor    $0xff,%al
xor    $0xff,%al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<iscntrl>:
cmp    $0x20,%edi
setb   %al
cmp    $0x7f,%edi
sete   %cl
or     %al,%cl
movzbl %cl,%eax
ret

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

LLVM IR (-O2):
define i32 @iscntrl(i32 %0) {
%2 = icmp ult i32 %0, 32
%3 = icmp eq i32 %0, 127
%4 = or i1 %2, %3
%5 = zext i1 %4 to i32
ret i32 %5
}
/* Variables and functions */
unsigned int Si702x_I2C_read16(int);
int /*<<< orphan*/ Si702x_I2C_write8(int);
float Si702x_readTemperature(void) {
  float temp;
  unsigned int rawTemp;
  Si702x_I2C_write8(0xE3);
  rawTemp = Si702x_I2C_read16(0xE3);
  temp = (rawTemp * 175.72 / 65536) - 46.85;
  return temp;
}


x86 assembly (clang, -O0):
<Si702x_readTemperature>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0xe3,%edi
mov    %edi,-0xc(%rbp)
call   1030 <Si702x_I2C_write8@plt>
mov    -0xc(%rbp),%edi
call   1040 <Si702x_I2C_read16@plt>
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
cvtsi2sd %rax,%xmm0
movsd  0xec0(%rip),%xmm1
mulsd  %xmm1,%xmm0
movsd  0xeac(%rip),%xmm1
divsd  %xmm1,%xmm0
movsd  0xe98(%rip),%xmm1
subsd  %xmm1,%xmm0
cvtsd2ss %xmm0,%xmm0
movss  %xmm0,-0x4(%rbp)
movss  -0x4(%rbp),%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Si702x_readTemperature>:
push   %rax
mov    $0xe3,%edi
call   1030 <Si702x_I2C_write8@plt>
mov    $0xe3,%edi
call   1040 <Si702x_I2C_read16@plt>
mov    %eax,%eax
cvtsi2sd %rax,%xmm0
mulsd  0xebc(%rip),%xmm0
mulsd  0xebc(%rip),%xmm0
addsd  0xebc(%rip),%xmm0
cvtsd2ss %xmm0,%xmm0
pop    %rax
ret

LLVM IR (-O0):
define float @Si702x_readTemperature() {
%1 = alloca float
%2 = alloca i32
%3 = call i32 @Si702x_I2C_write8(i32 227)
%4 = call i32 @Si702x_I2C_read16(i32 227)
store i32 %4, i32* %2
%5 = load i32, i32* %2
%6 = uitofp i32 %5 to double
%7 = fmul double %6, 1.757200e+02
%8 = fdiv double %7, 6.553600e+04
%9 = fsub double %8, 4.685000e+01
%10 = fptrunc double %9 to float
store float %10, float* %1
%11 = load float, float* %1
ret float %11
}

LLVM IR (-O2):
define float @Si702x_readTemperature() {
%1 = tail call i32 @Si702x_I2C_write8(i32 227)
%2 = tail call i32 @Si702x_I2C_read16(i32 227)
%3 = uitofp i32 %2 to double
%4 = fmul double %3, 1.757200e+02
%5 = fmul double %4, 0x3EF0000000000000
%6 = fadd double %5, -4.685000e+01
%7 = fptrunc double %6 to float
ret float %7
}
int parse_char(char c, const char **str) {
  if (**str != c)
    return -1;
  (*str)++;
  return 0;
}


x86 assembly (clang, -O0):
<parse_char>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x5(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    (%rax),%rax
movsbl (%rax),%eax
movsbl -0x5(%rbp),%ecx
cmp    %ecx,%eax
je     1130 <parse_char+0x30>
movl   $0xffffffff,-0x4(%rbp)
jmp    1145 <parse_char+0x45>
mov    -0x10(%rbp),%rax
mov    (%rax),%rcx
add    $0x1,%rcx
mov    %rcx,(%rax)
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<parse_char>:
mov    (%rsi),%rcx
mov    $0xffffffff,%eax
cmp    %dil,(%rcx)
jne    1116 <parse_char+0x16>
add    $0x1,%rcx
mov    %rcx,(%rsi)
xor    %eax,%eax
ret

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

LLVM IR (-O2):
define i32 @parse_char(i8 signext %0, i8** nocapture %1) {
%3 = load i8*, i8** %1
%4 = load i8, i8* %3
%5 = icmp eq i8 %4, %0
br i1 %5, label %6, label %8
6: ; preds = %2
%7 = getelementptr inbounds i8, i8* %3, i64 1
store i8* %7, i8** %1
br label %8
8: ; preds = %2, %6
%9 = phi i32 [ 0, %6 ], [ -1, %2 ]
ret i32 %9
}
/* Type definitions */
typedef int /*<<< orphan*/ uint8_t;

/* Variables and functions */
int /*<<< orphan*/ crc8_p93_next(int /*<<< orphan*/, int /*<<< orphan*/ const);
uint8_t crc8_p93_2b(uint8_t const data1, uint8_t const data2) {
  uint8_t crc = 0;
  crc = crc8_p93_next(crc, data1);
  crc = crc8_p93_next(crc, data2);
  return crc;
}


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

x86 assembly (clang, -O2):
<crc8_p93_2b>:
push   %rbx
mov    %esi,%ebx
mov    %edi,%esi
xor    %edi,%edi
call   1030 <crc8_p93_next@plt>
mov    %eax,%edi
mov    %ebx,%esi
pop    %rbx
jmp    1030 <crc8_p93_next@plt>

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

LLVM IR (-O2):
define i32 @crc8_p93_2b(i32 %0, i32 %1) {
%3 = tail call i32 @crc8_p93_next(i32 0, i32 %0)
%4 = tail call i32 @crc8_p93_next(i32 %3, i32 %1)
ret i32 %4
}
/* Variables and functions */
void *a999(int);
void *a17(int x) { return (((x >> 17) & 1) ? a999(x) : a999(x)); }


x86 assembly (clang, -O0):
<a17>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
sar    $0x11,%eax
and    $0x1,%eax
cmp    $0x0,%eax
je     113e <a17+0x2e>
mov    -0x4(%rbp),%edi
call   1030 <a999@plt>
mov    %rax,-0x10(%rbp)
jmp    114a <a17+0x3a>
mov    -0x4(%rbp),%edi
call   1030 <a999@plt>
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<a17>:
jmp    1030 <a999@plt>

LLVM IR (-O0):
define i8* @a17(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = ashr i32 %3, 17
%5 = and i32 %4, 1
%6 = icmp ne i32 %5, 0
br i1 %6, label %7, label %10
7: ; preds = %1
%8 = load i32, i32* %2
%9 = call i8* @a999(i32 %8)
br label %13
10: ; preds = %1
%11 = load i32, i32* %2
%12 = call i8* @a999(i32 %11)
br label %13
13: ; preds = %10, %7
%14 = phi i8* [ %9, %7 ], [ %12, %10 ]
ret i8* %14
}

LLVM IR (-O2):
define i8* @a17(i32 %0) {
%2 = tail call i8* @a999(i32 %0)
ret i8* %2
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int freadstring_into_str(int /*<<< orphan*/ *, char, char *, size_t);
int freadline_into_str(FILE *input, char *str, size_t len) {
  return freadstring_into_str(input, '\n', str, len);
}


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

x86 assembly (clang, -O2):
<freadline_into_str>:
mov    %rdx,%rcx
mov    %rsi,%rdx
mov    $0xa,%esi
jmp    1030 <freadstring_into_str@plt>

LLVM IR (-O0):
define i32 @freadline_into_str(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 @freadstring_into_str(i32* %7, i8 signext 10, i8* %8, i64 %9)
ret i32 %10
}

LLVM IR (-O2):
define i32 @freadline_into_str(i32* %0, i8* %1, i64 %2) {
%4 = tail call i32 @freadstring_into_str(i32* %0, i8 signext 10, i8* %1, i64 %2)
ret i32 %4
}
/* Variables and functions */
int __syscall(int, void *, size_t, int /*<<< orphan*/, int);
int read(int filedes, void *buffer, size_t length) {
  return __syscall(filedes, buffer, length, 0, 0x403);
}


x86 assembly (clang, -O0):
<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
xor    %ecx,%ecx
mov    $0x403,%r8d
call   1030 <__syscall@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<read>:
xor    %ecx,%ecx
mov    $0x403,%r8d
jmp    1030 <__syscall@plt>

LLVM IR (-O0):
define i32 @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 @__syscall(i32 %7, i8* %8, i64 %9, i32 0, i32 1027)
ret i32 %10
}

LLVM IR (-O2):
define i32 @read(i32 %0, i8* %1, i64 %2) {
%4 = tail call i32 @__syscall(i32 %0, i8* %1, i64 %2, i32 0, i32 1027)
ret i32 %4
}
void cl_rhash_table_debug(struct cl_rhash_table *tbl, void **ent, char ps) {}


x86 assembly (clang, -O0):
<cl_rhash_table_debug>:
push   %rbp
mov    %rsp,%rbp
mov    %dl,%al
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %al,-0x11(%rbp)
pop    %rbp
ret

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

LLVM IR (-O0):
%struct.cl_rhash_table = type opaque
define void @cl_rhash_table_debug(%struct.cl_rhash_table* %0, i8** %1, i8 signext %2) {
%4 = alloca %struct.cl_rhash_table*
%5 = alloca i8**
%6 = alloca i8
store %struct.cl_rhash_table* %0, %struct.cl_rhash_table** %4
store i8** %1, i8*** %5
store i8 %2, i8* %6
ret void
}

LLVM IR (-O2):
%struct.cl_rhash_table = type opaque
define void @cl_rhash_table_debug(%struct.cl_rhash_table* nocapture %0, i8** nocapture %1, i8 signext %2) {
ret void
}