xunge/DecIR huggingface dataset:
char *exchange(char *str) {
  int i = 0;
  while (str[i] != '\0') {
    if (str[i] == '_')
      str[i] = '-';
    i++;
  }
  return str;
}


x86 assembly (clang, -O0):
<exchange>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
movsbl (%rax,%rcx,1),%eax
cmp    $0x0,%eax
je     1153 <exchange+0x53>
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
movsbl (%rax,%rcx,1),%eax
cmp    $0x5f,%eax
jne    1145 <exchange+0x45>
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
movb   $0x2d,(%rax,%rcx,1)
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    110f <exchange+0xf>
mov    -0x8(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<exchange>:
mov    %rdi,%rax
mov    %rdi,%rcx
jmp    1117 <exchange+0x17>
nopl   0x0(%rax,%rax,1)
movb   $0x2d,(%rcx)
add    $0x1,%rcx
movzbl (%rcx),%edx
cmp    $0x5f,%dl
je     1110 <exchange+0x10>
test   %dl,%dl
jne    1113 <exchange+0x13>
ret

LLVM IR (-O0):
define i8* @exchange(i8* %0) {
%2 = alloca i8*
%3 = alloca i32
store i8* %0, i8** %2
store i32 0, i32* %3
br label %4
4: ; preds = %25, %1
%5 = load i8*, i8** %2
%6 = load i32, i32* %3
%7 = sext i32 %6 to i64
%8 = getelementptr inbounds i8, i8* %5, i64 %7
%9 = load i8, i8* %8
%10 = sext i8 %9 to i32
%11 = icmp ne i32 %10, 0
br i1 %11, label %12, label %28
12: ; preds = %4
%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 = icmp eq i32 %18, 95
br i1 %19, label %20, label %25
20: ; preds = %12
%21 = load i8*, i8** %2
%22 = load i32, i32* %3
%23 = sext i32 %22 to i64
%24 = getelementptr inbounds i8, i8* %21, i64 %23
store i8 45, i8* %24
br label %25
25: ; preds = %20, %12
%26 = load i32, i32* %3
%27 = add nsw i32 %26, 1
store i32 %27, i32* %3
br label %4
28: ; preds = %4
%29 = load i8*, i8** %2
ret i8* %29
}

LLVM IR (-O2):
define i8* @exchange(i8* returned %0) {
br label %2
2: ; preds = %7, %1
%3 = phi i64 [ %8, %7 ], [ 0, %1 ]
%4 = getelementptr inbounds i8, i8* %0, i64 %3
%5 = load i8, i8* %4
switch i8 %5, label %7 [
i8 0, label %9
i8 95, label %6
]
6: ; preds = %2
store i8 45, i8* %4
br label %7
7: ; preds = %2, %6
%8 = add nuw i64 %3, 1
br label %2
9: ; preds = %2
ret i8* %0
}
void gtk_binding_entry_add_signal() {}


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

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

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

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


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

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

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

LLVM IR (-O2):
define i32 @test_imm_16uint64_midword_reg(i64 %0) {
%2 = and i64 %0, 1441792
%3 = icmp eq i64 %2, 0
%4 = select i1 %3, i32 -40, i32 -20
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ FD_CLOEXEC;
int /*<<< orphan*/ F_SETFD;
int fcntl(int, int /*<<< orphan*/, int /*<<< orphan*/);
int xyz_sock_closeonexec(int sockfd) {
  return fcntl(sockfd, F_SETFD, FD_CLOEXEC);
}


x86 assembly (clang, -O0):
<xyz_sock_closeonexec>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
mov    0x2ebb(%rip),%rax
mov    (%rax),%esi
mov    0x2eaa(%rip),%rax
mov    (%rax),%edx
call   1030 <fcntl@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<xyz_sock_closeonexec>:
mov    0x2ec9(%rip),%rax
mov    (%rax),%esi
mov    0x2eb8(%rip),%rax
mov    (%rax),%edx
jmp    1030 <fcntl@plt>

LLVM IR (-O0):
@F_SETFD = global i32 0
@FD_CLOEXEC = global i32 0
define i32 @xyz_sock_closeonexec(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = load i32, i32* @F_SETFD
%5 = load i32, i32* @FD_CLOEXEC
%6 = call i32 @fcntl(i32 %3, i32 %4, i32 %5)
ret i32 %6
}

LLVM IR (-O2):
@F_SETFD = global i32 0
@FD_CLOEXEC = global i32 0
define i32 @xyz_sock_closeonexec(i32 %0) {
%2 = load i32, i32* @F_SETFD
%3 = load i32, i32* @FD_CLOEXEC
%4 = tail call i32 @fcntl(i32 %0, i32 %2, i32 %3)
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ UI_DEV_DESTROY;
int close(int);
scalar_t__ ioctl(int, int /*<<< orphan*/);
int destroy_device(int uinput_fd) {
  if (ioctl(uinput_fd, UI_DEV_DESTROY) < 0)
    return -1;
  return close(uinput_fd);
}


x86 assembly (clang, -O0):
<destroy_device>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
mov    -0x8(%rbp),%edi
mov    0x2eb3(%rip),%rax
mov    (%rax),%esi
call   1030 <ioctl@plt>
cmp    $0x0,%rax
jge    1152 <destroy_device+0x32>
movl   $0xffffffff,-0x4(%rbp)
jmp    115d <destroy_device+0x3d>
mov    -0x8(%rbp),%edi
call   1040 <close@plt>
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<destroy_device>:
push   %rbx
mov    %edi,%ebx
mov    0x2ebe(%rip),%rax
mov    (%rax),%esi
call   1030 <ioctl@plt>
test   %rax,%rax
js     113e <destroy_device+0x1e>
mov    %ebx,%edi
pop    %rbx
jmp    1040 <close@plt>
mov    $0xffffffff,%eax
pop    %rbx
ret

LLVM IR (-O0):
@UI_DEV_DESTROY = global i32 0
define i32 @destroy_device(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %3
%4 = load i32, i32* %3
%5 = load i32, i32* @UI_DEV_DESTROY
%6 = call i64 @ioctl(i32 %4, i32 %5)
%7 = icmp slt i64 %6, 0
br i1 %7, label %8, label %9
8: ; preds = %1
store i32 -1, i32* %2
br label %12
9: ; preds = %1
%10 = load i32, i32* %3
%11 = call i32 @close(i32 %10)
store i32 %11, i32* %2
br label %12
12: ; preds = %9, %8
%13 = load i32, i32* %2
ret i32 %13
}

LLVM IR (-O2):
@UI_DEV_DESTROY = global i32 0
define i32 @destroy_device(i32 %0) {
%2 = load i32, i32* @UI_DEV_DESTROY
%3 = tail call i64 @ioctl(i32 %0, i32 %2)
%4 = icmp slt i64 %3, 0
br i1 %4, label %7, label %5
5: ; preds = %1
%6 = tail call i32 @close(i32 %0)
br label %7
7: ; preds = %1, %5
%8 = phi i32 [ %6, %5 ], [ -1, %1 ]
ret i32 %8
}
/* Type definitions */
typedef int /*<<< orphan*/ uint;

/* Variables and functions */
void swap_u(uint *a, uint *b) {
  uint tmp = *a;
  *a = *b;
  *b = tmp;
}


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

x86 assembly (clang, -O2):
<swap_u>:
mov    (%rdi),%eax
mov    (%rsi),%ecx
mov    %ecx,(%rdi)
mov    %eax,(%rsi)
ret

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

LLVM IR (-O2):
define void @swap_u(i32* nocapture %0, i32* nocapture %1) {
%3 = load i32, i32* %0
%4 = load i32, i32* %1
store i32 %4, i32* %0
store i32 %3, i32* %1
ret void
}
void EVP_sha512(void) {}


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

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

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

LLVM IR (-O2):
define void @EVP_sha512() {
ret void
}
void trimgreedytailchard(char *str, char token) {
  while (*str) {
    if (*str == token) {
      *str = '\0';
      return;
    }
    str++;
  }
}


x86 assembly (clang, -O0):
<trimgreedytailchard>:
push   %rbp
mov    %rsp,%rbp
mov    %sil,%al
mov    %rdi,-0x8(%rbp)
mov    %al,-0x9(%rbp)
mov    -0x8(%rbp),%rax
cmpb   $0x0,(%rax)
je     114b <trimgreedytailchard+0x4b>
mov    -0x8(%rbp),%rax
movsbl (%rax),%eax
movsbl -0x9(%rbp),%ecx
cmp    %ecx,%eax
jne    113a <trimgreedytailchard+0x3a>
mov    -0x8(%rbp),%rax
movb   $0x0,(%rax)
jmp    114b <trimgreedytailchard+0x4b>
mov    -0x8(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x8(%rbp)
jmp    110e <trimgreedytailchard+0xe>
pop    %rbp
ret

x86 assembly (clang, -O2):
<trimgreedytailchard>:
mov    (%rdi),%al
test   %al,%al
je     1120 <trimgreedytailchard+0x20>
add    $0x1,%rdi
nopw   0x0(%rax,%rax,1)
cmp    %sil,%al
je     1121 <trimgreedytailchard+0x21>
movzbl (%rdi),%eax
add    $0x1,%rdi
test   %al,%al
jne    1110 <trimgreedytailchard+0x10>
ret
movb   $0x0,-0x1(%rdi)
ret

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

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

/* Variables and functions */
int /*<<< orphan*/ expected_pk_fault(int /*<<< orphan*/);
int /*<<< orphan*/ fflush(int /*<<< orphan*/ *);
int /*<<< orphan*/ pkey_access_deny(int /*<<< orphan*/);
int /*<<< orphan*/ sigsafe_printf(char *, int /*<<< orphan*/);
void test_write_of_access_disabled_region(int *ptr, uint16_t pkey) {
  do {
    if (1 <= 0)
      sigsafe_printf("disabling access to PKEY[%02d], doing write\n", pkey);
    fflush(NULL);
  } while (0);
  pkey_access_deny(pkey);
  *ptr = 1160;
  expected_pk_fault(pkey);
}


x86 assembly (clang, -O0):
<test_write_of_access_disabled_region>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
xor    %eax,%eax
mov    %eax,%edi
call   1030 <fflush@plt>
mov    -0xc(%rbp),%edi
call   1040 <pkey_access_deny@plt>
mov    -0x8(%rbp),%rax
movl   $0x488,(%rax)
mov    -0xc(%rbp),%edi
call   1050 <expected_pk_fault@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_write_of_access_disabled_region>:
push   %r14
push   %rbx
push   %rax
mov    %esi,%ebx
mov    %rdi,%r14
xor    %edi,%edi
call   1030 <fflush@plt>
mov    %ebx,%edi
call   1040 <pkey_access_deny@plt>
movl   $0x488,(%r14)
mov    %ebx,%edi
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1050 <expected_pk_fault@plt>

LLVM IR (-O0):
define void @test_write_of_access_disabled_region(i32* %0, i32 %1) {
%3 = alloca i32*
%4 = alloca i32
store i32* %0, i32** %3
store i32 %1, i32* %4
br label %5
5: ; preds = %2
%6 = call i32 @fflush(i32* null)
br label %7
7: ; preds = %5
%8 = load i32, i32* %4
%9 = call i32 @pkey_access_deny(i32 %8)
%10 = load i32*, i32** %3
store i32 1160, i32* %10
%11 = load i32, i32* %4
%12 = call i32 @expected_pk_fault(i32 %11)
ret void
}

LLVM IR (-O2):
define void @test_write_of_access_disabled_region(i32* nocapture writeonly %0, i32 %1) {
%3 = tail call i32 @fflush(i32* null)
%4 = tail call i32 @pkey_access_deny(i32 %1)
store i32 1160, i32* %0
%5 = tail call i32 @expected_pk_fault(i32 %1)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int main(int argc, char **argv) {
  printf("Hola Mundo!\n");
  return 0;
}


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

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xee8(%rip),%rdi
call   1030 <puts@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [13 x i8] c"Hola Mundo!\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%6 = call i32 @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@str = [12 x i8] c"Hola Mundo!\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([12 x i8], [12 x i8]* @str, i64 0, i64 0))
ret i32 0
}
/* Variables and functions */
double log(double);
double EtoTd(double E) {
  double a = log(E / 6.112);
  double Td = (243.5 * a) / (17.67 - a);
  return Td;
}


x86 assembly (clang, -O0):
<EtoTd>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
movsd  0xee6(%rip),%xmm1
divsd  %xmm1,%xmm0
call   1030 <log@plt>
movsd  %xmm0,-0x10(%rbp)
movsd  0xec8(%rip),%xmm0
mulsd  -0x10(%rbp),%xmm0
movsd  0xeb3(%rip),%xmm1
subsd  -0x10(%rbp),%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x18(%rbp)
movsd  -0x18(%rbp),%xmm0
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<EtoTd>:
push   %rax
divsd  0xee7(%rip),%xmm0
call   1030 <log@plt>
movsd  0xee2(%rip),%xmm1
mulsd  %xmm0,%xmm1
movsd  0xede(%rip),%xmm2
subsd  %xmm0,%xmm2
divsd  %xmm2,%xmm1
movapd %xmm1,%xmm0
pop    %rax
ret

LLVM IR (-O0):
define double @EtoTd(double %0) {
%2 = alloca double
%3 = alloca double
%4 = alloca double
store double %0, double* %2
%5 = load double, double* %2
%6 = fdiv double %5, 6.112000e+00
%7 = call double @log(double %6)
store double %7, double* %3
%8 = load double, double* %3
%9 = fmul double 2.435000e+02, %8
%10 = load double, double* %3
%11 = fsub double 1.767000e+01, %10
%12 = fdiv double %9, %11
store double %12, double* %4
%13 = load double, double* %4
ret double %13
}

LLVM IR (-O2):
define double @EtoTd(double %0) {
%2 = fdiv double %0, 6.112000e+00
%3 = tail call double @log(double %2)
%4 = fmul double %3, 2.435000e+02
%5 = fsub double 1.767000e+01, %3
%6 = fdiv double %4, %5
ret double %6
}
/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char *);
int /*<<< orphan*/ stderr;
int yyerror(char *s) {
  fprintf(stderr, "%s\n", s);
  return 0;
}


x86 assembly (clang, -O0):
<yyerror>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    0x2ebd(%rip),%rax
mov    (%rax),%edi
mov    -0x8(%rbp),%rdx
lea    0xed0(%rip),%rsi
call   1030 <fprintf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<yyerror>:
push   %rax
mov    %rdi,%rdx
mov    0x2ec5(%rip),%rax
mov    (%rax),%edi
lea    0xedc(%rip),%rsi
call   1030 <fprintf@plt>
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
@stderr = global i32 0
@.str = [4 x i8] c"%s\0A\00"
define i32 @yyerror(i8* %0) {
%2 = load i32, i32* @stderr
%3 = tail call i32 @fprintf(i32 %2, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %0)
ret i32 0
}
int is_empty(unsigned char *data, unsigned int length) {
  int empty;
  unsigned int i;
  empty = 1;
  for (i = 0; i < length; i++) {
    if (data[i] != 0) {
      empty = 0;
      break;
    }
  }
  return empty;
}


x86 assembly (clang, -O0):
<is_empty>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
movl   $0x1,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
mov    -0x14(%rbp),%eax
cmp    -0xc(%rbp),%eax
jae    1158 <is_empty+0x58>
mov    -0x8(%rbp),%rax
mov    -0x14(%rbp),%ecx
movzbl (%rax,%rcx,1),%eax
cmp    $0x0,%eax
je     1145 <is_empty+0x45>
movl   $0x0,-0x10(%rbp)
jmp    1158 <is_empty+0x58>
jmp    114a <is_empty+0x4a>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    1119 <is_empty+0x19>
mov    -0x10(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<is_empty>:
mov    $0x1,%eax
test   %esi,%esi
je     111f <is_empty+0x1f>
mov    %esi,%ecx
xor    %edx,%edx
nopl   (%rax)
cmpb   $0x0,(%rdi,%rdx,1)
jne    1120 <is_empty+0x20>
add    $0x1,%rdx
cmp    %rdx,%rcx
jne    1110 <is_empty+0x10>
ret
xor    %eax,%eax
ret

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

LLVM IR (-O2):
define i32 @is_empty(i8* nocapture %0, i32 %1) {
%3 = icmp eq i32 %1, 0
br i1 %3, label %14, label %4
4: ; preds = %2
%5 = zext i32 %1 to i64
br label %8
6: ; preds = %8
%7 = icmp eq i64 %13, %5
br i1 %7, label %14, label %8
8: ; preds = %4, %6
%9 = phi i64 [ 0, %4 ], [ %13, %6 ]
%10 = getelementptr inbounds i8, i8* %0, i64 %9
%11 = load i8, i8* %10
%12 = icmp eq i8 %11, 0
%13 = add nuw nsw i64 %9, 1
br i1 %12, label %6, label %14
14: ; preds = %6, %8, %2
%15 = phi i32 [ 1, %2 ], [ 0, %8 ], [ 1, %6 ]
ret i32 %15
}
void slashcharclass2NWORDCHAR() {}


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

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

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

LLVM IR (-O2):
define void @slashcharclass2NWORDCHAR() {
ret void
}
int sys$clrast(void) {
  return ({
    unsigned long resultvar;
    asm volatile("movq %1, %%rax\n\t"
                 "int $0x81\n\t"
                 : "=a"(resultvar)
                 : "i"(40)
                 : "memory", "cc", "r11", "cx");
    (long)resultvar;
  });
}


x86 assembly (clang, -O0):
<sys$clrast>:
push   %rbp
mov    %rsp,%rbp
mov    $0x28,%rax
int    $0x81
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<sys$clrast>:
mov    $0x28,%rax
int    $0x81
ret

LLVM IR (-O0):
define i32 @"sys$clrast"() {
%1 = alloca i64
%2 = alloca i64
%3 = call i64 asm sideeffect "movq $1, %rax\0A\09int $$0x81\0A\09", "={ax},i,~{memory},~{cc},~{r11},~{cx},~{dirflag},~{fpsr},~{flags}"(i32 40)
store i64 %3, i64* %1
%4 = load i64, i64* %1
store i64 %4, i64* %2
%5 = load i64, i64* %2
%6 = trunc i64 %5 to i32
ret i32 %6
}

LLVM IR (-O2):
define i32 @"sys$clrast"() {
%1 = tail call i64 asm sideeffect "movq $1, %rax\0A\09int $$0x81\0A\09", "={ax},i,~{memory},~{cc},~{r11},~{cx},~{dirflag},~{fpsr},~{flags}"(i32 40)
%2 = trunc i64 %1 to i32
ret i32 %2
}
/* Variables and functions */
int /*<<< orphan*/ delete_token();
int /*<<< orphan*/ update_state();
char *iftag_fi(int argc, char *argv[]) {
  delete_token();
  update_state();
  return 0;
}


x86 assembly (clang, -O0):
<iftag_fi>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    $0x0,%al
call   1040 <delete_token@plt>
mov    $0x0,%al
call   1030 <update_state@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

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

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

LLVM IR (-O2):
define noalias i8* @iftag_fi(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 (...) @delete_token()
%4 = tail call i32 (...) @update_state()
ret i8* null
}
/* Variables and functions */
int jump(int *, int);
int /*<<< orphan*/ printf(char *, int);
int main(void) {
  int x[] = {1, 1, 1, 1};
  printf("%d\n", jump(x, 4));
  return (0);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    0xeca(%rip),%rax
mov    %rax,-0x20(%rbp)
mov    0xec7(%rip),%rax
mov    %rax,-0x18(%rbp)
lea    -0x20(%rbp),%rdi
mov    $0x4,%esi
call   1040 <jump@plt>
mov    %eax,%esi
lea    0xeb4(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
sub    $0x18,%rsp
movaps 0xed5(%rip),%xmm0
movaps %xmm0,(%rsp)
mov    %rsp,%rdi
mov    $0x4,%esi
call   1040 <jump@plt>
lea    0xecd(%rip),%rdi
mov    %eax,%esi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x18,%rsp
ret

LLVM IR (-O0):
@__const.main.x = [4 x i32] [i32 1, i32 1, i32 1, i32 1]
@.str = [4 x i8] c"%d\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca [4 x i32]
store i32 0, i32* %1
%3 = bitcast [4 x i32]* %2 to i8*
%4 = getelementptr inbounds [4 x i32], [4 x i32]* %2, i64 0, i64 0
%5 = call i32 @jump(i32* %4, i32 4)
%6 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %5)
ret i32 0
}

LLVM IR (-O2):
@__const.main.x = [4 x i32] [i32 1, i32 1, i32 1, i32 1]
@.str = [4 x i8] c"%d\0A\00"
define i32 @main() {
%1 = alloca [4 x i32]
%2 = bitcast [4 x i32]* %1 to i8*
%3 = getelementptr inbounds [4 x i32], [4 x i32]* %1, i64 0, i64 0
%4 = call i32 @jump(i32* %3, i32 4)
%5 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %4)
ret i32 0
}
/* Variables and functions */
int hash(char const *);
int /*<<< orphan*/ printf(char *, int);
int main(int argc, const char *argv[]) {
  printf("%u\n", argc == 2 ? hash(argv[1]) : 0);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
cmpl   $0x2,-0x8(%rbp)
jne    1155 <main+0x35>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
call   1030 <hash@plt>
mov    %eax,-0x14(%rbp)
jmp    115f <main+0x3f>
xor    %eax,%eax
mov    %eax,-0x14(%rbp)
jmp    115f <main+0x3f>
mov    -0x14(%rbp),%esi
lea    0xe97(%rip),%rdi
call   1040 <printf@plt>
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    %rsi,%rax
xor    %esi,%esi
cmp    $0x2,%edi
jne    1136 <main+0x16>
mov    0x8(%rax),%rdi
call   1030 <hash@plt>
mov    %eax,%esi
lea    0xec3(%rip),%rdi
call   1040 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [4 x i8] c"%u\0A\00"
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 = icmp eq i32 %6, 2
br i1 %7, label %8, label %13
8: ; preds = %2
%9 = load i8**, i8*** %5
%10 = getelementptr inbounds i8*, i8** %9, i64 1
%11 = load i8*, i8** %10
%12 = call i32 @hash(i8* %11)
br label %14
13: ; preds = %2
br label %14
14: ; preds = %13, %8
%15 = phi i32 [ %12, %8 ], [ 0, %13 ]
%16 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %15)
%17 = load i32, i32* %3
ret i32 %17
}

LLVM IR (-O2):
@.str = [4 x i8] c"%u\0A\00"
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = icmp eq i32 %0, 2
br i1 %3, label %4, label %8
4: ; preds = %2
%5 = getelementptr inbounds i8*, i8** %1, i64 1
%6 = load i8*, i8** %5
%7 = tail call i32 @hash(i8* %6)
br label %8
8: ; preds = %2, %4
%9 = phi i32 [ %7, %4 ], [ 0, %2 ]
%10 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %9)
ret i32 0
}
unsigned xrop3_32_0_1(unsigned char s, unsigned char t) {
  unsigned D = 0x00ff;
  unsigned S = ((unsigned)s << 8) | s;
  unsigned T = ((unsigned)t << 8) | t;
  unsigned stk1;
  unsigned stk2;
  unsigned stk3;
  stk3 = ~S;
  stk2 = T & stk3;
  stk1 = D & stk2;
  return (stk1 & S) | (stk1 & (~T)) | (T & (~S) & D);
}


x86 assembly (clang, -O0):
<xrop3_32_0_1>:
push   %rbp
mov    %rsp,%rbp
mov    %sil,%al
mov    %dil,%cl
mov    %cl,-0x1(%rbp)
mov    %al,-0x2(%rbp)
movl   $0xff,-0x8(%rbp)
movzbl -0x1(%rbp),%eax
shl    $0x8,%eax
movzbl -0x1(%rbp),%ecx
or     %ecx,%eax
mov    %eax,-0xc(%rbp)
movzbl -0x2(%rbp),%eax
shl    $0x8,%eax
movzbl -0x2(%rbp),%ecx
or     %ecx,%eax
mov    %eax,-0x10(%rbp)
mov    -0xc(%rbp),%eax
xor    $0xffffffff,%eax
mov    %eax,-0x1c(%rbp)
mov    -0x10(%rbp),%eax
and    -0x1c(%rbp),%eax
mov    %eax,-0x18(%rbp)
mov    -0x8(%rbp),%eax
and    -0x18(%rbp),%eax
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
and    -0xc(%rbp),%eax
mov    -0x14(%rbp),%ecx
mov    -0x10(%rbp),%edx
xor    $0xffffffff,%edx
and    %edx,%ecx
or     %ecx,%eax
mov    -0x10(%rbp),%ecx
mov    -0xc(%rbp),%edx
xor    $0xffffffff,%edx
and    %edx,%ecx
and    -0x8(%rbp),%ecx
or     %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<xrop3_32_0_1>:
mov    %edi,%eax
shl    $0x8,%eax
or     %edi,%eax
not    %eax
and    %esi,%eax
ret

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

LLVM IR (-O2):
define i32 @xrop3_32_0_1(i8 zeroext %0, i8 zeroext %1) {
%3 = zext i8 %0 to i32
%4 = mul nuw nsw i32 %3, 257
%5 = zext i8 %1 to i32
%6 = xor i32 %4, -1
%7 = and i32 %6, %5
ret i32 %7
}
unsigned long long int rnd8lfsr(unsigned long long int x) {
  unsigned long long int bit;
  if (x == 0) {
    x = 1;
  } else {
    bit = ((x >> 0) ^ (x >> 2) ^ (x >> 3) ^ (x >> 4)) & 1;
    x = (x >> 1) | (bit << 7);
    if (x == 1)
      x = 0;
  }
  return x;
}


x86 assembly (clang, -O0):
<rnd8lfsr>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
cmpq   $0x0,-0x8(%rbp)
jne    1120 <rnd8lfsr+0x20>
movq   $0x1,-0x8(%rbp)
jmp    1180 <rnd8lfsr+0x80>
mov    -0x8(%rbp),%rax
shr    $0x0,%rax
mov    -0x8(%rbp),%rcx
shr    $0x2,%rcx
xor    %rcx,%rax
mov    -0x8(%rbp),%rcx
shr    $0x3,%rcx
xor    %rcx,%rax
mov    -0x8(%rbp),%rcx
shr    $0x4,%rcx
xor    %rcx,%rax
and    $0x1,%rax
mov    %rax,-0x10(%rbp)
mov    -0x8(%rbp),%rax
shr    $0x1,%rax
mov    -0x10(%rbp),%rcx
shl    $0x7,%rcx
or     %rcx,%rax
mov    %rax,-0x8(%rbp)
cmpq   $0x1,-0x8(%rbp)
jne    117b <rnd8lfsr+0x7b>
movq   $0x0,-0x8(%rbp)
jmp    1180 <rnd8lfsr+0x80>
mov    -0x8(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<rnd8lfsr>:
test   %rdi,%rdi
je     1131 <rnd8lfsr+0x31>
mov    %edi,%eax
shr    $0x2,%eax
xor    %edi,%eax
mov    %edi,%ecx
shr    $0x3,%ecx
mov    %edi,%edx
shr    $0x4,%edx
xor    %ecx,%edx
xor    %eax,%edx
shr    %rdi
shl    $0x7,%edx
movzbl %dl,%ecx
or     %rdi,%rcx
xor    %eax,%eax
cmp    $0x1,%rcx
cmovne %rcx,%rax
ret
mov    $0x1,%eax
ret

LLVM IR (-O0):
define i64 @rnd8lfsr(i64 %0) {
%2 = alloca i64
%3 = alloca i64
store i64 %0, i64* %2
%4 = load i64, i64* %2
%5 = icmp eq i64 %4, 0
br i1 %5, label %6, label %7
6: ; preds = %1
store i64 1, i64* %2
br label %29
7: ; preds = %1
%8 = load i64, i64* %2
%9 = lshr i64 %8, 0
%10 = load i64, i64* %2
%11 = lshr i64 %10, 2
%12 = xor i64 %9, %11
%13 = load i64, i64* %2
%14 = lshr i64 %13, 3
%15 = xor i64 %12, %14
%16 = load i64, i64* %2
%17 = lshr i64 %16, 4
%18 = xor i64 %15, %17
%19 = and i64 %18, 1
store i64 %19, i64* %3
%20 = load i64, i64* %2
%21 = lshr i64 %20, 1
%22 = load i64, i64* %3
%23 = shl i64 %22, 7
%24 = or i64 %21, %23
store i64 %24, i64* %2
%25 = load i64, i64* %2
%26 = icmp eq i64 %25, 1
br i1 %26, label %27, label %28
27: ; preds = %7
store i64 0, i64* %2
br label %28
28: ; preds = %27, %7
br label %29
29: ; preds = %28, %6
%30 = load i64, i64* %2
ret i64 %30
}

LLVM IR (-O2):
define i64 @rnd8lfsr(i64 %0) {
%2 = icmp eq i64 %0, 0
br i1 %2, label %16, label %3
3: ; preds = %1
%4 = lshr i64 %0, 2
%5 = xor i64 %4, %0
%6 = lshr i64 %0, 3
%7 = xor i64 %5, %6
%8 = lshr i64 %0, 4
%9 = xor i64 %7, %8
%10 = lshr i64 %0, 1
%11 = shl i64 %9, 7
%12 = and i64 %11, 128
%13 = or i64 %12, %10
%14 = icmp eq i64 %13, 1
%15 = select i1 %14, i64 0, i64 %13
br label %16
16: ; preds = %1, %3
%17 = phi i64 [ %15, %3 ], [ 1, %1 ]
ret i64 %17
}
/* Variables and functions */
int test_fifo(int, int, int);
int test_fifo_5_7_5(int argc, const char **argv) { return test_fifo(5, 7, 5); }


x86 assembly (clang, -O0):
<test_fifo_5_7_5>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    $0x5,%edx
mov    $0x7,%esi
mov    %edx,%edi
call   1030 <test_fifo@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_fifo_5_7_5>:
mov    $0x5,%edi
mov    $0x7,%esi
mov    $0x5,%edx
jmp    1030 <test_fifo@plt>

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

LLVM IR (-O2):
define i32 @test_fifo_5_7_5(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @test_fifo(i32 5, i32 7, i32 5)
ret i32 %3
}
double min(double x) { return 0.0; }


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

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

LLVM IR (-O0):
define double @min(double %0) {
%2 = alloca double
store double %0, double* %2
ret double 0.000000e+00
}

LLVM IR (-O2):
define double @min(double %0) {
ret double 0.000000e+00
}
void enable_interrupts(void) { __asm__ __volatile__("sti"); }


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

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

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

LLVM IR (-O2):
define void @enable_interrupts() {
tail call void asm sideeffect "sti", "~{dirflag},~{fpsr},~{flags}"()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ wait_ms(int);
void wait_s(long s) {
  long i = 0;
  while (i < s) {
    wait_ms(1000);
    i++;
  }
}


x86 assembly (clang, -O0):
<wait_s>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
movq   $0x0,-0x10(%rbp)
mov    -0x10(%rbp),%rax
cmp    -0x8(%rbp),%rax
jge    114d <wait_s+0x3d>
mov    $0x3e8,%edi
call   1030 <wait_ms@plt>
mov    -0x10(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x10(%rbp)
jmp    1124 <wait_s+0x14>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<wait_s>:
push   %rbx
test   %rdi,%rdi
jle    1130 <wait_s+0x20>
mov    %rdi,%rbx
nopl   0x0(%rax)
mov    $0x3e8,%edi
call   1030 <wait_ms@plt>
add    $0xffffffffffffffff,%rbx
jne    1120 <wait_s+0x10>
pop    %rbx
ret

LLVM IR (-O0):
define void @wait_s(i64 %0) {
%2 = alloca i64
%3 = alloca i64
store i64 %0, i64* %2
store i64 0, i64* %3
br label %4
4: ; preds = %8, %1
%5 = load i64, i64* %3
%6 = load i64, i64* %2
%7 = icmp slt i64 %5, %6
br i1 %7, label %8, label %12
8: ; preds = %4
%9 = call i32 @wait_ms(i32 1000)
%10 = load i64, i64* %3
%11 = add nsw i64 %10, 1
store i64 %11, i64* %3
br label %4
12: ; preds = %4
ret void
}

LLVM IR (-O2):
define void @wait_s(i64 %0) {
%2 = icmp sgt i64 %0, 0
br i1 %2, label %3, label %8
3: ; preds = %1, %3
%4 = phi i64 [ %6, %3 ], [ 0, %1 ]
%5 = tail call i32 @wait_ms(i32 1000)
%6 = add nuw nsw i64 %4, 1
%7 = icmp eq i64 %6, %0
br i1 %7, label %8, label %3
8: ; preds = %3, %1
ret void
}
/* Variables and functions */
int /*<<< orphan*/ netCloseSocket(int);
int /*<<< orphan*/ printf(char *, int);
void onError(int socket) {
  printf("onError: socket %i\n", socket);
  netCloseSocket(socket);
}


x86 assembly (clang, -O0):
<onError>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%esi
lea    0xecb(%rip),%rdi
call   1040 <printf@plt>
mov    -0x4(%rbp),%edi
call   1030 <netCloseSocket@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<onError>:
push   %rbx
mov    %edi,%ebx
lea    0xed6(%rip),%rdi
mov    %ebx,%esi
call   1040 <printf@plt>
mov    %ebx,%edi
pop    %rbx
jmp    1030 <netCloseSocket@plt>

LLVM IR (-O0):
@.str = [20 x i8] c"onError: socket %i\0A\00"
define void @onError(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = call i32 @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0), i32 %3)
%5 = load i32, i32* %2
%6 = call i32 @netCloseSocket(i32 %5)
ret void
}

LLVM IR (-O2):
@.str = [20 x i8] c"onError: socket %i\0A\00"
define void @onError(i32 %0) {
%2 = tail call i32 @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0), i32 %0)
%3 = tail call i32 @netCloseSocket(i32 %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void doc_begin(void) { printf("{\n"); }


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

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

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

LLVM IR (-O2):
@str = [2 x i8] c"{\00"
define void @doc_begin() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([2 x i8], [2 x i8]* @str, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int main() {
  int n;
  n = 0;
  if (n = 0)
    printf("rowne\n");
  else
    printf("nierowne\n");
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
movl   $0x0,-0x8(%rbp)
xor    %eax,%eax
test   $0x1,%al
jne    113c <main+0x2c>
jmp    114d <main+0x3d>
lea    0xec0(%rip),%rdi
call   1030 <printf@plt>
jmp    1159 <main+0x49>
lea    0xeac(%rip),%rdi
call   1030 <printf@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xee8(%rip),%rdi
call   1030 <puts@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [7 x i8] c"rowne\0A\00"
@.str.1 = [10 x i8] c"nierowne\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
store i32 0, i32* %1
store i32 0, i32* %2
store i32 0, i32* %2
br i1 false, label %3, label %5
3: ; preds = %0
%4 = call i32 @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0))
br label %7
5: ; preds = %0
%6 = call i32 @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.1, i64 0, i64 0))
br label %7
7: ; preds = %5, %3
%8 = load i32, i32* %1
ret i32 %8
}

LLVM IR (-O2):
@str = [9 x i8] c"nierowne\00"
define i32 @main() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([9 x i8], [9 x i8]* @str, i64 0, i64 0))
ret i32 0
}
/* Type definitions */
typedef int /*<<< orphan*/ uint8_t;
typedef int uint16_t;

/* Variables and functions */
const uint8_t *read_u16(const uint8_t *p, size_t *s, uint16_t *v) {
  *v = 0;
  *v |= (uint16_t)*p++ << 8;
  *v |= (uint16_t)*p++ << 0;
  *s -= 2;
  return (p);
}


x86 assembly (clang, -O0):
<read_u16>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x18(%rbp),%rax
movl   $0x0,(%rax)
mov    -0x8(%rbp),%rax
mov    %rax,%rcx
add    $0x4,%rcx
mov    %rcx,-0x8(%rbp)
mov    (%rax),%ecx
shl    $0x8,%ecx
mov    -0x18(%rbp),%rax
or     (%rax),%ecx
mov    %ecx,(%rax)
mov    -0x8(%rbp),%rax
mov    %rax,%rcx
add    $0x4,%rcx
mov    %rcx,-0x8(%rbp)
mov    (%rax),%ecx
shl    $0x0,%ecx
mov    -0x18(%rbp),%rax
or     (%rax),%ecx
mov    %ecx,(%rax)
mov    -0x10(%rbp),%rax
mov    (%rax),%rcx
sub    $0x2,%rcx
mov    %rcx,(%rax)
mov    -0x8(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<read_u16>:
movl   $0x0,(%rdx)
mov    (%rdi),%ecx
shl    $0x8,%ecx
mov    %ecx,(%rdx)
or     0x4(%rdi),%ecx
lea    0x8(%rdi),%rax
mov    %ecx,(%rdx)
addq   $0xfffffffffffffffe,(%rsi)
ret

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

LLVM IR (-O2):
define i32* @read_u16(i32* %0, i64* nocapture %1, i32* nocapture writeonly %2) {
store i32 0, i32* %2
%4 = getelementptr inbounds i32, i32* %0, i64 1
%5 = load i32, i32* %0
%6 = shl i32 %5, 8
store i32 %6, i32* %2
%7 = getelementptr inbounds i32, i32* %0, i64 2
%8 = load i32, i32* %4
%9 = or i32 %8, %6
store i32 %9, i32* %2
%10 = load i64, i64* %1
%11 = add i64 %10, -2
store i64 %11, i64* %1
ret i32* %7
}
/* Variables and functions */
int /*<<< orphan*/ close(int);
int /*<<< orphan*/ file_get(char const *);
int open(char const *, int);
int flags_file_get(const char *file, int flags) {
  if (!file_get(file))
    return (0);
  int fd = open(file, flags);
  if (fd < 0)
    return (0);
  close(fd);
  return (1);
}


x86 assembly (clang, -O0):
<flags_file_get>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    %esi,-0x14(%rbp)
mov    -0x10(%rbp),%rdi
call   1050 <file_get@plt>
cmp    $0x0,%eax
jne    115d <flags_file_get+0x2d>
movl   $0x0,-0x4(%rbp)
jmp    1191 <flags_file_get+0x61>
mov    -0x10(%rbp),%rdi
mov    -0x14(%rbp),%esi
call   1040 <open@plt>
mov    %eax,-0x18(%rbp)
cmpl   $0x0,-0x18(%rbp)
jge    1182 <flags_file_get+0x52>
movl   $0x0,-0x4(%rbp)
jmp    1191 <flags_file_get+0x61>
mov    -0x18(%rbp),%edi
call   1030 <close@plt>
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<flags_file_get>:
push   %rbp
push   %r14
push   %rbx
mov    %esi,%r14d
mov    %rdi,%rbp
call   1050 <file_get@plt>
xor    %ebx,%ebx
test   %eax,%eax
je     1160 <flags_file_get+0x30>
mov    %rbp,%rdi
mov    %r14d,%esi
call   1040 <open@plt>
test   %eax,%eax
js     1160 <flags_file_get+0x30>
mov    %eax,%edi
call   1030 <close@plt>
mov    $0x1,%ebx
mov    %ebx,%eax
pop    %rbx
pop    %r14
pop    %rbp
ret

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

LLVM IR (-O2):
define i32 @flags_file_get(i8* %0, i32 %1) {
%3 = tail call i32 @file_get(i8* %0)
%4 = icmp eq i32 %3, 0
br i1 %4, label %10, label %5
5: ; preds = %2
%6 = tail call i32 @open(i8* %0, i32 %1)
%7 = icmp slt i32 %6, 0
br i1 %7, label %10, label %8
8: ; preds = %5
%9 = tail call i32 @close(i32 %6)
br label %10
10: ; preds = %8, %5, %2
%11 = phi i32 [ 0, %2 ], [ 1, %8 ], [ 0, %5 ]
ret i32 %11
}
/* Type definitions */
typedef int uint32_t;

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


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

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

LLVM IR (-O0):
define i32 @rmd_f4(i32 %0, i32 %1, i32 %2) {
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
store i32 %0, i32* %4
store i32 %1, i32* %5
store i32 %2, i32* %6
%7 = load i32, i32* %4
%8 = load i32, i32* %6
%9 = and i32 %7, %8
%10 = load i32, i32* %5
%11 = load i32, i32* %6
%12 = xor i32 %11, -1
%13 = and i32 %10, %12
%14 = or i32 %9, %13
ret i32 %14
}

LLVM IR (-O2):
define i32 @rmd_f4(i32 %0, i32 %1, i32 %2) {
%4 = and i32 %2, %0
%5 = xor i32 %2, -1
%6 = and i32 %5, %1
%7 = or i32 %4, %6
ret i32 %7
}
/* Variables and functions */
double pow(double, double);
double LtoY(double L) {
  if (L <= 8)
    return L * (27. / 24389);
  else
    return pow((L + 16.0) / 116, 3.0);
}


x86 assembly (clang, -O0):
<LtoY>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movsd  %xmm0,-0x10(%rbp)
movsd  0xedb(%rip),%xmm0
ucomisd -0x10(%rbp),%xmm0
jb     1147 <LtoY+0x37>
movsd  0xee8(%rip),%xmm0
mulsd  -0x10(%rbp),%xmm0
movsd  %xmm0,-0x8(%rbp)
jmp    1172 <LtoY+0x62>
movsd  0xec9(%rip),%xmm0
addsd  -0x10(%rbp),%xmm0
movsd  0xeb4(%rip),%xmm1
divsd  %xmm1,%xmm0
movsd  0xea0(%rip),%xmm1
call   1030 <pow@plt>
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<LtoY>:
movsd  0xee8(%rip),%xmm1
ucomisd %xmm0,%xmm1
jae    113b <LtoY+0x2b>
addsd  0xeea(%rip),%xmm0
divsd  0xeea(%rip),%xmm0
movsd  0xeea(%rip),%xmm1
jmp    1030 <pow@plt>
mulsd  0xec5(%rip),%xmm0
ret

LLVM IR (-O0):
define double @LtoY(double %0) {
%2 = alloca double
%3 = alloca double
store double %0, double* %3
%4 = load double, double* %3
%5 = fcmp ole double %4, 8.000000e+00
br i1 %5, label %6, label %9
6: ; preds = %1
%7 = load double, double* %3
%8 = fmul double %7, 0x3F522354D28F7CD6
store double %8, double* %2
br label %14
9: ; preds = %1
%10 = load double, double* %3
%11 = fadd double %10, 1.600000e+01
%12 = fdiv double %11, 1.160000e+02
%13 = call double @pow(double %12, double 3.000000e+00)
store double %13, double* %2
br label %14
14: ; preds = %9, %6
%15 = load double, double* %2
ret double %15
}

LLVM IR (-O2):
define double @LtoY(double %0) {
%2 = fcmp ugt double %0, 8.000000e+00
br i1 %2, label %5, label %3
3: ; preds = %1
%4 = fmul double %0, 0x3F522354D28F7CD6
br label %9
5: ; preds = %1
%6 = fadd double %0, 1.600000e+01
%7 = fdiv double %6, 1.160000e+02
%8 = tail call double @pow(double %7, double 3.000000e+00)
br label %9
9: ; preds = %5, %3
%10 = phi double [ %4, %3 ], [ %8, %5 ]
ret double %10
}
/* Variables and functions */
int /*<<< orphan*/ lgen(char *, char *, int);
void cgldsa(int n) { lgen("%s\t$%c%d,%%eax", "movl", n); }


x86 assembly (clang, -O0):
<cgldsa>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edx
lea    0xedb(%rip),%rdi
lea    0xee3(%rip),%rsi
call   1030 <lgen@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<cgldsa>:
mov    %edi,%edx
lea    0xee7(%rip),%rdi
lea    0xeef(%rip),%rsi
jmp    1030 <lgen@plt>

LLVM IR (-O0):
@.str = [15 x i8] c"%s\09$%c%d,%%eax\00"
@.str.1 = [5 x i8] c"movl\00"
define void @cgldsa(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = call i32 @lgen(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0), i32 %3)
ret void
}

LLVM IR (-O2):
@.str = [15 x i8] c"%s\09$%c%d,%%eax\00"
@.str.1 = [5 x i8] c"movl\00"
define void @cgldsa(i32 %0) {
%2 = tail call i32 @lgen(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0), i32 %0)
ret void
}
int cairo_code_draw_casCellFrame_get_width() { return 252; }


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

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

LLVM IR (-O0):
define i32 @cairo_code_draw_casCellFrame_get_width() {
ret i32 252
}

LLVM IR (-O2):
define i32 @cairo_code_draw_casCellFrame_get_width() {
ret i32 252
}
/* Type definitions */
typedef int /*<<< orphan*/ time_t;
struct tm {
  int dummy;
};

/* Variables and functions */
struct tm *gmtime_r(int /*<<< orphan*/ const *, struct tm *);
struct tm *OPENSSL_gmtime(const time_t *time, struct tm *result) {
  return gmtime_r(time, result);
}


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

x86 assembly (clang, -O2):
<OPENSSL_gmtime>:
jmp    1030 <gmtime_r@plt>

LLVM IR (-O0):
%struct.tm = type { i32 }
define %struct.tm* @OPENSSL_gmtime(i32* %0, %struct.tm* %1) {
%3 = alloca i32*
%4 = alloca %struct.tm*
store i32* %0, i32** %3
store %struct.tm* %1, %struct.tm** %4
%5 = load i32*, i32** %3
%6 = load %struct.tm*, %struct.tm** %4
%7 = call %struct.tm* @gmtime_r(i32* %5, %struct.tm* %6)
ret %struct.tm* %7
}

LLVM IR (-O2):
%struct.tm = type { i32 }
define %struct.tm* @OPENSSL_gmtime(i32* %0, %struct.tm* %1) {
%3 = tail call %struct.tm* @gmtime_r(i32* %0, %struct.tm* %1)
ret %struct.tm* %3
}