xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ isodigit(int);
void t_isodigit_0x78() {
  Assert_real((isodigit(120) == 0),
              "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
              "2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/"
              "dg/z88dk/test/suites/ctype/test_isodigit.c",
              605, ("isodigit should be 0 for x"));
}


x86 assembly (clang, -O0):
<t_isodigit_0x78>:
push   %rbp
mov    %rsp,%rbp
mov    $0x78,%edi
call   1040 <isodigit@plt>
cmp    $0x0,%rax
sete   %al
and    $0x1,%al
movzbl %al,%edi
lea    0xebf(%rip),%rsi
mov    $0x25d,%edx
lea    0xf5c(%rip),%rcx
call   1030 <Assert_real@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<t_isodigit_0x78>:
push   %rax
mov    $0x78,%edi
call   1040 <isodigit@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf67(%rip),%rcx
mov    $0x25d,%edx
pop    %rax
jmp    1030 <Assert_real@plt>

LLVM IR (-O0):
@.str = [169 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/ctype/test_isodigit.c\00"
@.str.1 = [27 x i8] c"isodigit should be 0 for x\00"
define void @t_isodigit_0x78() {
%1 = call i64 @isodigit(i32 120)
%2 = icmp eq i64 %1, 0
%3 = zext i1 %2 to i32
%4 = call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([169 x i8], [169 x i8]* @.str, i64 0, i64 0), i32 605, i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [169 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/ctype/test_isodigit.c\00"
@.str.1 = [27 x i8] c"isodigit should be 0 for x\00"
define void @t_isodigit_0x78() {
%1 = tail call i64 @isodigit(i32 120)
%2 = icmp eq i64 %1, 0
%3 = zext i1 %2 to i32
%4 = tail call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([169 x i8], [169 x i8]* @.str, i64 0, i64 0), i32 605, i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ propagate_latent_2_latent(int);
void propagate_latent_3_latent(int a3) { propagate_latent_2_latent(a3); }


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

x86 assembly (clang, -O2):
<propagate_latent_3_latent>:
jmp    1030 <propagate_latent_2_latent@plt>

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

LLVM IR (-O2):
define void @propagate_latent_3_latent(i32 %0) {
%2 = tail call i32 @propagate_latent_2_latent(i32 %0)
ret void
}
float p1(float x, float y, ...) { return x + y; }


x86 assembly (clang, -O0):
<p1>:
push   %rbp
mov    %rsp,%rbp
movss  %xmm0,-0x4(%rbp)
movss  %xmm1,-0x8(%rbp)
movss  -0x4(%rbp),%xmm0
movss  -0x8(%rbp),%xmm1
addss  %xmm1,%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<p1>:
addss  %xmm1,%xmm0
ret

LLVM IR (-O0):
define float @p1(float %0, float %1, ...) {
%3 = alloca float
%4 = alloca float
store float %0, float* %3
store float %1, float* %4
%5 = load float, float* %3
%6 = load float, float* %4
%7 = fadd float %5, %6
ret float %7
}

LLVM IR (-O2):
define float @p1(float %0, float %1, ...) {
%3 = fadd float %0, %1
ret float %3
}
/* Variables and functions */
int /*<<< orphan*/ __free_cf(void *);
void CGPDFPageRelease(void *item) { __free_cf(item); }


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

x86 assembly (clang, -O2):
<CGPDFPageRelease>:
jmp    1030 <__free_cf@plt>

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

LLVM IR (-O2):
define void @CGPDFPageRelease(i8* %0) {
%2 = tail call i32 @__free_cf(i8* %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ printf(char *, char *, int);
void HtAssert_(char *file, int line) {
  printf("Fatal : internal inconsistency detected\n   File: %s\n   Line: %d\n",
         file, line);
  exit(1);
}


x86 assembly (clang, -O0):
<HtAssert_>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rsi
mov    -0xc(%rbp),%edx
lea    0xec3(%rip),%rdi
call   1030 <printf@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<HtAssert_>:
push   %rax
mov    %esi,%edx
mov    %rdi,%rsi
lea    0xed3(%rip),%rdi
call   1030 <printf@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@.str = [65 x i8] c"Fatal : internal inconsistency detected\0A File: %s\0A Line: %d\0A\00"
define void @HtAssert_(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 @printf(i8* getelementptr inbounds ([65 x i8], [65 x i8]* @.str, i64 0, i64 0), i8* %5, i32 %6)
%8 = call i32 @exit(i32 1)
unreachable
}

LLVM IR (-O2):
@.str = [65 x i8] c"Fatal : internal inconsistency detected\0A File: %s\0A Line: %d\0A\00"
define void @HtAssert_(i8* %0, i32 %1) {
%3 = tail call i32 @printf(i8* getelementptr inbounds ([65 x i8], [65 x i8]* @.str, i64 0, i64 0), i8* %0, i32 %1)
%4 = tail call i32 @exit(i32 1)
unreachable
}
int capture_nonoption(const char *carg, void *pvar) {
  static int i = 0;
  int r = 0;
  const char **opts = (const char **)pvar;
  if (opts) {
    if (!carg)
      r = i;
    opts[i++] = carg;
  } else {
    r = i;
    i = 0;
  }
  return r;
}


x86 assembly (clang, -O0):
<capture_nonoption>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x20(%rbp)
cmpq   $0x0,-0x20(%rbp)
je     115f <capture_nonoption+0x5f>
cmpq   $0x0,-0x8(%rbp)
jne    113a <capture_nonoption+0x3a>
mov    0x2eed(%rip),%eax
mov    %eax,-0x14(%rbp)
mov    -0x8(%rbp),%rdx
mov    -0x20(%rbp),%rax
mov    0x2edc(%rip),%ecx
mov    %ecx,%esi
add    $0x1,%esi
mov    %esi,0x2ed1(%rip)
movslq %ecx,%rcx
mov    %rdx,(%rax,%rcx,8)
jmp    1172 <capture_nonoption+0x72>
mov    0x2ebf(%rip),%eax
mov    %eax,-0x14(%rbp)
movl   $0x0,0x2eb2(%rip)
mov    -0x14(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<capture_nonoption>:
test   %rsi,%rsi
je     1122 <capture_nonoption+0x22>
xor    %eax,%eax
test   %rdi,%rdi
movslq 0x2f13(%rip),%rcx
cmove  %ecx,%eax
lea    0x1(%rcx),%edx
mov    %edx,0x2f07(%rip)
mov    %rdi,(%rsi,%rcx,8)
ret
mov    0x2efc(%rip),%eax
movl   $0x0,0x2ef2(%rip)
ret

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

LLVM IR (-O2):
@capture_nonoption.i = internal unnamed_addr global i32 0
define i32 @capture_nonoption(i8* %0, i8* writeonly %1) {
%3 = icmp eq i8* %1, null
br i1 %3, label %12, label %4
4: ; preds = %2
%5 = bitcast i8* %1 to i8**
%6 = icmp eq i8* %0, null
%7 = load i32, i32* @capture_nonoption.i
%8 = select i1 %6, i32 %7, i32 0
%9 = add nsw i32 %7, 1
store i32 %9, i32* @capture_nonoption.i
%10 = sext i32 %7 to i64
%11 = getelementptr inbounds i8*, i8** %5, i64 %10
store i8* %0, i8** %11
br label %14
12: ; preds = %2
%13 = load i32, i32* @capture_nonoption.i
store i32 0, i32* @capture_nonoption.i
br label %14
14: ; preds = %12, %4
%15 = phi i32 [ %8, %4 ], [ %13, %12 ]
ret i32 %15
}
/* Variables and functions */
int /*<<< orphan*/ serial_putc(char);
void serial_print_str(const char *s) {
  char c;
  while (c = *s++) {
    serial_putc(c);
  }
}


x86 assembly (clang, -O0):
<serial_print_str>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x8(%rbp)
mov    (%rax),%al
mov    %al,-0x9(%rbp)
cmp    $0x0,%al
je     1146 <serial_print_str+0x36>
movsbl -0x9(%rbp),%edi
call   1030 <serial_putc@plt>
jmp    111c <serial_print_str+0xc>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<serial_print_str>:
push   %rbx
mov    (%rdi),%al
test   %al,%al
je     1133 <serial_print_str+0x23>
mov    %rdi,%rbx
add    $0x1,%rbx
xchg   %ax,%ax
movsbl %al,%edi
call   1030 <serial_putc@plt>
movzbl (%rbx),%eax
add    $0x1,%rbx
test   %al,%al
jne    1120 <serial_print_str+0x10>
pop    %rbx
ret

LLVM IR (-O0):
define void @serial_print_str(i8* %0) {
%2 = alloca i8*
%3 = alloca i8
store i8* %0, i8** %2
br label %4
4: ; preds = %9, %1
%5 = load i8*, i8** %2
%6 = getelementptr inbounds i8, i8* %5, i32 1
store i8* %6, i8** %2
%7 = load i8, i8* %5
store i8 %7, i8* %3
%8 = icmp ne i8 %7, 0
br i1 %8, label %9, label %12
9: ; preds = %4
%10 = load i8, i8* %3
%11 = call i32 @serial_putc(i8 signext %10)
br label %4
12: ; preds = %4
ret void
}

LLVM IR (-O2):
define void @serial_print_str(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = icmp eq i8 %2, 0
br i1 %3, label %11, label %4
4: ; preds = %1, %4
%5 = phi i8 [ %9, %4 ], [ %2, %1 ]
%6 = phi i8* [ %7, %4 ], [ %0, %1 ]
%7 = getelementptr inbounds i8, i8* %6, i64 1
%8 = tail call i32 @serial_putc(i8 signext %5)
%9 = load i8, i8* %7
%10 = icmp eq i8 %9, 0
br i1 %10, label %11, label %4
11: ; preds = %4, %1
ret void
}
/* Variables and functions */
int /*<<< orphan*/ io_hlt();
void HariMain(void) {
fin:
  io_hlt();
  goto fin;
}


x86 assembly (clang, -O0):
<HariMain>:
push   %rbp
mov    %rsp,%rbp
jmp    1119 <HariMain+0x9>
mov    $0x0,%al
call   1030 <io_hlt@plt>
jmp    1119 <HariMain+0x9>

x86 assembly (clang, -O2):
<HariMain>:
push   %rax
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
xor    %eax,%eax
call   1030 <io_hlt@plt>
jmp    1120 <HariMain+0x10>

LLVM IR (-O0):
define void @HariMain() {
br label %1
1: ; preds = %1, %0
%2 = call i32 (...) @io_hlt()
br label %1
}

LLVM IR (-O2):
define void @HariMain() {
br label %1
1: ; preds = %1, %0
%2 = tail call i32 (...) @io_hlt()
br label %1
}
int fun856() { return 856; }


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

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

LLVM IR (-O0):
define i32 @fun856() {
ret i32 856
}

LLVM IR (-O2):
define i32 @fun856() {
ret i32 856
}
/* Type definitions */
struct timespec {
  int dummy;
};
typedef int /*<<< orphan*/ clockid_t;

/* Variables and functions */
long clock_gettime_vdso(int /*<<< orphan*/, struct timespec *);
long errno;
int clock_gettime_vdso_wrapper(clockid_t id, struct timespec *ts) {
  return ({
    long int err;
    int v_ret;
    v_ret = err = clock_gettime_vdso(id, ts);
    if ((v_ret < 0)) {
      errno = -err;
      v_ret = -1;
    }
    v_ret;
  });
}


x86 assembly (clang, -O0):
<clock_gettime_vdso_wrapper>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x10(%rbp),%rsi
call   1030 <clock_gettime_vdso@plt>
mov    %rax,-0x18(%rbp)
mov    %eax,-0x1c(%rbp)
cmpl   $0x0,-0x1c(%rbp)
jge    1155 <clock_gettime_vdso_wrapper+0x45>
xor    %eax,%eax
mov    %eax,%ecx
sub    -0x18(%rbp),%rcx
mov    0x2e95(%rip),%rax
mov    %rcx,(%rax)
movl   $0xffffffff,-0x1c(%rbp)
mov    -0x1c(%rbp),%eax
mov    %eax,-0x20(%rbp)
mov    -0x20(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<clock_gettime_vdso_wrapper>:
push   %rax
call   1030 <clock_gettime_vdso@plt>
test   %eax,%eax
js     111c <clock_gettime_vdso_wrapper+0xc>
pop    %rcx
ret
neg    %rax
mov    0x2eba(%rip),%rcx
mov    %rax,(%rcx)
mov    $0xffffffff,%eax
pop    %rcx
ret

LLVM IR (-O0):
%struct.timespec = type { i32 }
@errno = global i64 0
define i32 @clock_gettime_vdso_wrapper(i32 %0, %struct.timespec* %1) {
%3 = alloca i32
%4 = alloca %struct.timespec*
%5 = alloca i64
%6 = alloca i32
%7 = alloca i32
store i32 %0, i32* %3
store %struct.timespec* %1, %struct.timespec** %4
%8 = load i32, i32* %3
%9 = load %struct.timespec*, %struct.timespec** %4
%10 = call i64 @clock_gettime_vdso(i32 %8, %struct.timespec* %9)
store i64 %10, i64* %5
%11 = trunc i64 %10 to i32
store i32 %11, i32* %6
%12 = load i32, i32* %6
%13 = icmp slt i32 %12, 0
br i1 %13, label %14, label %17
14: ; preds = %2
%15 = load i64, i64* %5
%16 = sub nsw i64 0, %15
store i64 %16, i64* @errno
store i32 -1, i32* %6
br label %17
17: ; preds = %14, %2
%18 = load i32, i32* %6
store i32 %18, i32* %7
%19 = load i32, i32* %7
ret i32 %19
}

LLVM IR (-O2):
%struct.timespec = type { i32 }
@errno = global i64 0
define i32 @clock_gettime_vdso_wrapper(i32 %0, %struct.timespec* %1) {
%3 = tail call i64 @clock_gettime_vdso(i32 %0, %struct.timespec* %1)
%4 = trunc i64 %3 to i32
%5 = icmp slt i32 %4, 0
br i1 %5, label %6, label %8
6: ; preds = %2
%7 = sub nsw i64 0, %3
store i64 %7, i64* @errno
br label %8
8: ; preds = %6, %2
%9 = phi i32 [ -1, %6 ], [ %4, %2 ]
ret i32 %9
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ islower(int);
void t_islower_0x31() {
  Assert_real((islower(49) == 0),
              "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
              "2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/"
              "dg/z88dk/test/suites/ctype/test_islower.c",
              250, ("islower should be 0 for 1"));
}


x86 assembly (clang, -O0):
<t_islower_0x31>:
push   %rbp
mov    %rsp,%rbp
mov    $0x31,%edi
call   1030 <islower@plt>
cmp    $0x0,%rax
sete   %al
and    $0x1,%al
movzbl %al,%edi
lea    0xebf(%rip),%rsi
mov    $0xfa,%edx
lea    0xf5b(%rip),%rcx
call   1040 <Assert_real@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<t_islower_0x31>:
push   %rax
mov    $0x31,%edi
call   1030 <islower@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf66(%rip),%rcx
mov    $0xfa,%edx
pop    %rax
jmp    1040 <Assert_real@plt>

LLVM IR (-O0):
@.str = [168 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/ctype/test_islower.c\00"
@.str.1 = [26 x i8] c"islower should be 0 for 1\00"
define void @t_islower_0x31() {
%1 = call i64 @islower(i32 49)
%2 = icmp eq i64 %1, 0
%3 = zext i1 %2 to i32
%4 = call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([168 x i8], [168 x i8]* @.str, i64 0, i64 0), i32 250, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [168 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/ctype/test_islower.c\00"
@.str.1 = [26 x i8] c"islower should be 0 for 1\00"
define void @t_islower_0x31() {
%1 = tail call i64 @islower(i32 49)
%2 = icmp eq i64 %1, 0
%3 = zext i1 %2 to i32
%4 = tail call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([168 x i8], [168 x i8]* @.str, i64 0, i64 0), i32 250, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Type definitions */
typedef int uint16_t;

/* Variables and functions */
uint16_t BSP_LCD_SwapColor(uint16_t x) {
  return (x << 11) | (x & 0x07E0) | (x >> 11);
}


x86 assembly (clang, -O0):
<BSP_LCD_SwapColor>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
shl    $0xb,%eax
mov    -0x4(%rbp),%ecx
and    $0x7e0,%ecx
or     %ecx,%eax
mov    -0x4(%rbp),%ecx
sar    $0xb,%ecx
or     %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<BSP_LCD_SwapColor>:
mov    %edi,%ecx
shl    $0xb,%ecx
mov    %edi,%eax
and    $0x7e0,%eax
or     %ecx,%eax
sar    $0xb,%edi
or     %edi,%eax
ret

LLVM IR (-O0):
define i32 @BSP_LCD_SwapColor(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = shl i32 %3, 11
%5 = load i32, i32* %2
%6 = and i32 %5, 2016
%7 = or i32 %4, %6
%8 = load i32, i32* %2
%9 = ashr i32 %8, 11
%10 = or i32 %7, %9
ret i32 %10
}

LLVM IR (-O2):
define i32 @BSP_LCD_SwapColor(i32 %0) {
%2 = shl i32 %0, 11
%3 = and i32 %0, 2016
%4 = or i32 %2, %3
%5 = ashr i32 %0, 11
%6 = or i32 %4, %5
ret i32 %6
}
/* Variables and functions */
int /*<<< orphan*/ couleur(unsigned int const);
int /*<<< orphan*/ printf(char *, char const *);
int /*<<< orphan*/ system(char *);
void titre(const char *s, const unsigned int typeCouleur) {
  system("clear");
  couleur(typeCouleur);
  printf("\t\t\t\t%s\n\n", s);
  couleur(0);
}


x86 assembly (clang, -O0):
<titre>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
lea    0xeba(%rip),%rdi
call   1030 <system@plt>
mov    -0xc(%rbp),%edi
call   1050 <couleur@plt>
mov    -0x8(%rbp),%rsi
lea    0xea8(%rip),%rdi
call   1040 <printf@plt>
xor    %edi,%edi
call   1050 <couleur@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<titre>:
push   %r14
push   %rbx
push   %rax
mov    %esi,%ebx
mov    %rdi,%r14
lea    0xec0(%rip),%rdi
call   1030 <system@plt>
mov    %ebx,%edi
call   1050 <couleur@plt>
lea    0xeb3(%rip),%rdi
mov    %r14,%rsi
call   1040 <printf@plt>
xor    %edi,%edi
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1050 <couleur@plt>

LLVM IR (-O0):
@.str = [6 x i8] c"clear\00"
@.str.1 = [9 x i8] c"\09\09\09\09%s\0A\0A\00"
define void @titre(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i32
store i8* %0, i8** %3
store i32 %1, i32* %4
%5 = call i32 @system(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0))
%6 = load i32, i32* %4
%7 = call i32 @couleur(i32 %6)
%8 = load i8*, i8** %3
%9 = call i32 @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.1, i64 0, i64 0), i8* %8)
%10 = call i32 @couleur(i32 0)
ret void
}

LLVM IR (-O2):
@.str = [6 x i8] c"clear\00"
@.str.1 = [9 x i8] c"\09\09\09\09%s\0A\0A\00"
define void @titre(i8* %0, i32 %1) {
%3 = tail call i32 @system(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0))
%4 = tail call i32 @couleur(i32 %1)
%5 = tail call i32 @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.1, i64 0, i64 0), i8* %0)
%6 = tail call i32 @couleur(i32 0)
ret void
}
int pchar_index_of(const char *s, char c) {
  register int i = 0;
  while (s[i]) {
    if (s[i] == c)
      return i;
    i++;
  }
  return -1;
}


x86 assembly (clang, -O0):
<pchar_index_of>:
push   %rbp
mov    %rsp,%rbp
mov    %sil,%al
mov    %rdi,-0x10(%rbp)
mov    %al,-0x11(%rbp)
movl   $0x0,-0x18(%rbp)
mov    -0x10(%rbp),%rax
movslq -0x18(%rbp),%rcx
cmpb   $0x0,(%rax,%rcx,1)
je     1158 <pchar_index_of+0x58>
mov    -0x10(%rbp),%rax
movslq -0x18(%rbp),%rcx
movsbl (%rax,%rcx,1),%eax
movsbl -0x11(%rbp),%ecx
cmp    %ecx,%eax
jne    114a <pchar_index_of+0x4a>
mov    -0x18(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    115f <pchar_index_of+0x5f>
mov    -0x18(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x18(%rbp)
jmp    1115 <pchar_index_of+0x15>
movl   $0xffffffff,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<pchar_index_of>:
mov    (%rdi),%dl
mov    $0xffffffff,%eax
test   %dl,%dl
je     1122 <pchar_index_of+0x22>
xor    %ecx,%ecx
nopl   (%rax)
cmp    %sil,%dl
je     1123 <pchar_index_of+0x23>
movzbl 0x1(%rdi,%rcx,1),%edx
add    $0x1,%rcx
test   %dl,%dl
jne    1110 <pchar_index_of+0x10>
ret
mov    %ecx,%eax
ret

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

LLVM IR (-O2):
define i32 @pchar_index_of(i8* nocapture %0, i8 signext %1) {
%3 = load i8, i8* %0
%4 = icmp eq i8 %3, 0
br i1 %4, label %16, label %5
5: ; preds = %2, %9
%6 = phi i64 [ %10, %9 ], [ 0, %2 ]
%7 = phi i8 [ %12, %9 ], [ %3, %2 ]
%8 = icmp eq i8 %7, %1
br i1 %8, label %14, label %9
9: ; preds = %5
%10 = add nuw i64 %6, 1
%11 = getelementptr inbounds i8, i8* %0, i64 %10
%12 = load i8, i8* %11
%13 = icmp eq i8 %12, 0
br i1 %13, label %16, label %5
14: ; preds = %5
%15 = trunc i64 %6 to i32
br label %16
16: ; preds = %9, %14, %2
%17 = phi i32 [ -1, %2 ], [ %15, %14 ], [ -1, %9 ]
ret i32 %17
}
/* Variables and functions */
int /*<<< orphan*/ sizeof_test();
int /*<<< orphan*/ struct_align_test();
int /*<<< orphan*/ struct_test();
int main() {
  struct_test();
  sizeof_test();
  struct_align_test();
  return 0;
}


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

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

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

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @struct_test()
%2 = tail call i32 (...) @sizeof_test()
%3 = tail call i32 (...) @struct_align_test()
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ set_io_bit(int, int);
void TOSH_MAKE_RADIO_GIO0_OUTPUT() { set_io_bit(-3, 5); }


x86 assembly (clang, -O0):
<TOSH_MAKE_RADIO_GIO0_OUTPUT>:
push   %rbp
mov    %rsp,%rbp
mov    $0xfffffffd,%edi
mov    $0x5,%esi
call   1030 <set_io_bit@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<TOSH_MAKE_RADIO_GIO0_OUTPUT>:
mov    $0xfffffffd,%edi
mov    $0x5,%esi
jmp    1030 <set_io_bit@plt>

LLVM IR (-O0):
define void @TOSH_MAKE_RADIO_GIO0_OUTPUT() {
%1 = call i32 @set_io_bit(i32 -3, i32 5)
ret void
}

LLVM IR (-O2):
define void @TOSH_MAKE_RADIO_GIO0_OUTPUT() {
%1 = tail call i32 @set_io_bit(i32 -3, i32 5)
ret void
}
void fifo_nullfree(void *arg) {}


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

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

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

LLVM IR (-O2):
define void @fifo_nullfree(i8* nocapture %0) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ scanf(char *, float *);
float InserimentoScalare(void) {
  float scalare = 0;
  printf("\nInserire il valore Scalare e premere INVIO ");
  scanf("%f", &scalare);
  return scalare;
}


x86 assembly (clang, -O0):
<InserimentoScalare>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
xorps  %xmm0,%xmm0
movss  %xmm0,-0x4(%rbp)
lea    0xec9(%rip),%rdi
call   1030 <printf@plt>
lea    0xeea(%rip),%rdi
lea    -0x4(%rbp),%rsi
call   1040 <scanf@plt>
movss  -0x4(%rbp),%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<InserimentoScalare>:
push   %rax
movl   $0x0,0x4(%rsp)
lea    0xed0(%rip),%rdi
call   1030 <printf@plt>
lea    0xef1(%rip),%rdi
lea    0x4(%rsp),%rsi
call   1040 <scanf@plt>
movss  0x4(%rsp),%xmm0
pop    %rax
ret

LLVM IR (-O0):
@.str = [45 x i8] c"\0AInserire il valore Scalare e premere INVIO \00"
@.str.1 = [3 x i8] c"%f\00"
define float @InserimentoScalare() {
%1 = alloca float
store float 0.000000e+00, float* %1
%2 = call i32 @printf(i8* getelementptr inbounds ([45 x i8], [45 x i8]* @.str, i64 0, i64 0))
%3 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), float* %1)
%4 = load float, float* %1
ret float %4
}

LLVM IR (-O2):
@.str = [45 x i8] c"\0AInserire il valore Scalare e premere INVIO \00"
@.str.1 = [3 x i8] c"%f\00"
define float @InserimentoScalare() {
%1 = alloca float
%2 = bitcast float* %1 to i8*
store float 0.000000e+00, float* %1
%3 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([45 x i8], [45 x i8]* @.str, i64 0, i64 0))
%4 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), float* %1)
%5 = load float, float* %1
ret float %5
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
int time_interval(int);
void run(int num) {
  int ti = time_interval(num);
  printf(">: %dms\n", ti);
}


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

x86 assembly (clang, -O2):
<run>:
push   %rax
call   1040 <time_interval@plt>
lea    0xed3(%rip),%rdi
mov    %eax,%esi
pop    %rax
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [9 x i8] c">: %dms\0A\00"
define void @run(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %2
%4 = load i32, i32* %2
%5 = call i32 @time_interval(i32 %4)
store i32 %5, i32* %3
%6 = load i32, i32* %3
%7 = call i32 @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), i32 %6)
ret void
}

LLVM IR (-O2):
@.str = [9 x i8] c">: %dms\0A\00"
define void @run(i32 %0) {
%2 = tail call i32 @time_interval(i32 %0)
%3 = tail call i32 @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), i32 %2)
ret void
}
/* Type definitions */
struct filestack_t {
  int dummy;
};

/* Variables and functions */
struct filestack_t *stack_pop(struct filestack_t *);
void stack_free(struct filestack_t *entry) {
  while (entry) {
    entry = stack_pop(entry);
  }
}


x86 assembly (clang, -O0):
<stack_free>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
cmpq   $0x0,-0x8(%rbp)
je     1139 <stack_free+0x29>
mov    -0x8(%rbp),%rdi
call   1030 <stack_pop@plt>
mov    %rax,-0x8(%rbp)
jmp    111c <stack_free+0xc>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<stack_free>:
push   %rax
test   %rdi,%rdi
je     112d <stack_free+0x1d>
mov    %rdi,%rax
nopl   0x0(%rax)
mov    %rax,%rdi
call   1030 <stack_pop@plt>
test   %rax,%rax
jne    1120 <stack_free+0x10>
pop    %rax
ret

LLVM IR (-O0):
%struct.filestack_t = type { i32 }
define void @stack_free(%struct.filestack_t* %0) {
%2 = alloca %struct.filestack_t*
store %struct.filestack_t* %0, %struct.filestack_t** %2
br label %3
3: ; preds = %6, %1
%4 = load %struct.filestack_t*, %struct.filestack_t** %2
%5 = icmp ne %struct.filestack_t* %4, null
br i1 %5, label %6, label %9
6: ; preds = %3
%7 = load %struct.filestack_t*, %struct.filestack_t** %2
%8 = call %struct.filestack_t* @stack_pop(%struct.filestack_t* %7)
store %struct.filestack_t* %8, %struct.filestack_t** %2
br label %3
9: ; preds = %3
ret void
}

LLVM IR (-O2):
%struct.filestack_t = type { i32 }
define void @stack_free(%struct.filestack_t* %0) {
%2 = icmp eq %struct.filestack_t* %0, null
br i1 %2, label %7, label %3
3: ; preds = %1, %3
%4 = phi %struct.filestack_t* [ %5, %3 ], [ %0, %1 ]
%5 = tail call %struct.filestack_t* @stack_pop(%struct.filestack_t* %4)
%6 = icmp eq %struct.filestack_t* %5, null
br i1 %6, label %7, label %3
7: ; preds = %3, %1
ret void
}
void bld_track_load_activate(struct rq *rq) {}


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

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

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

LLVM IR (-O2):
%struct.rq = type opaque
define void @bld_track_load_activate(%struct.rq* nocapture %0) {
ret void
}
int OR_OP(int x, int y) { return x || y; }


x86 assembly (clang, -O0):
<OR_OP>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    $0x1,%al
cmpl   $0x0,-0x4(%rbp)
mov    %al,-0x9(%rbp)
jne    1123 <OR_OP+0x23>
cmpl   $0x0,-0x8(%rbp)
setne  %al
mov    %al,-0x9(%rbp)
mov    -0x9(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<OR_OP>:
xor    %eax,%eax
or     %esi,%edi
setne  %al
ret

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

LLVM IR (-O2):
define i32 @OR_OP(i32 %0, i32 %1) {
%3 = or i32 %1, %0
%4 = icmp ne i32 %3, 0
%5 = zext i1 %4 to i32
ret i32 %5
}
int leftmost_one(unsigned x) {}


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

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

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

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

/* Variables and functions */
int /*<<< orphan*/ __socketcall(int, unsigned long *);
ssize_t __libc_send(int sockfd, const void *buffer, size_t len, int flags) {
  unsigned long args[4];
  args[0] = sockfd;
  args[1] = (unsigned long)buffer;
  args[2] = len;
  args[3] = flags;
  return (__socketcall(9, args));
}


x86 assembly (clang, -O0):
<__libc_send>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %ecx,-0x1c(%rbp)
movslq -0x4(%rbp),%rax
mov    %rax,-0x40(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x38(%rbp)
mov    -0x18(%rbp),%rax
mov    %rax,-0x30(%rbp)
movslq -0x1c(%rbp),%rax
mov    %rax,-0x28(%rbp)
lea    -0x40(%rbp),%rsi
mov    $0x9,%edi
call   1030 <__socketcall@plt>
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<__libc_send>:
sub    $0x28,%rsp
movslq %edi,%rax
mov    %rax,(%rsp)
mov    %rsi,0x8(%rsp)
mov    %rdx,0x10(%rsp)
movslq %ecx,%rax
mov    %rax,0x18(%rsp)
mov    %rsp,%rsi
mov    $0x9,%edi
call   1030 <__socketcall@plt>
add    $0x28,%rsp
ret

LLVM IR (-O0):
define i32 @__libc_send(i32 %0, i8* %1, i64 %2, i32 %3) {
%5 = alloca i32
%6 = alloca i8*
%7 = alloca i64
%8 = alloca i32
%9 = alloca [4 x i64]
store i32 %0, i32* %5
store i8* %1, i8** %6
store i64 %2, i64* %7
store i32 %3, i32* %8
%10 = load i32, i32* %5
%11 = sext i32 %10 to i64
%12 = getelementptr inbounds [4 x i64], [4 x i64]* %9, i64 0, i64 0
store i64 %11, i64* %12
%13 = load i8*, i8** %6
%14 = ptrtoint i8* %13 to i64
%15 = getelementptr inbounds [4 x i64], [4 x i64]* %9, i64 0, i64 1
store i64 %14, i64* %15
%16 = load i64, i64* %7
%17 = getelementptr inbounds [4 x i64], [4 x i64]* %9, i64 0, i64 2
store i64 %16, i64* %17
%18 = load i32, i32* %8
%19 = sext i32 %18 to i64
%20 = getelementptr inbounds [4 x i64], [4 x i64]* %9, i64 0, i64 3
store i64 %19, i64* %20
%21 = getelementptr inbounds [4 x i64], [4 x i64]* %9, i64 0, i64 0
%22 = call i32 @__socketcall(i32 9, i64* %21)
ret i32 %22
}

LLVM IR (-O2):
define i32 @__libc_send(i32 %0, i8* %1, i64 %2, i32 %3) {
%5 = alloca [4 x i64]
%6 = bitcast [4 x i64]* %5 to i8*
%7 = sext i32 %0 to i64
%8 = getelementptr inbounds [4 x i64], [4 x i64]* %5, i64 0, i64 0
store i64 %7, i64* %8
%9 = ptrtoint i8* %1 to i64
%10 = getelementptr inbounds [4 x i64], [4 x i64]* %5, i64 0, i64 1
store i64 %9, i64* %10
%11 = getelementptr inbounds [4 x i64], [4 x i64]* %5, i64 0, i64 2
store i64 %2, i64* %11
%12 = sext i32 %3 to i64
%13 = getelementptr inbounds [4 x i64], [4 x i64]* %5, i64 0, i64 3
store i64 %12, i64* %13
%14 = call i32 @__socketcall(i32 9, i64* %8)
ret i32 %14
}
int test_get_msb(int x) {
  int shift_val = 8 * (sizeof(int) - 1);
  int xright = (unsigned)x >> shift_val;
  return xright;
}


x86 assembly (clang, -O0):
<test_get_msb>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
movl   $0x18,-0x8(%rbp)
mov    -0x4(%rbp),%eax
mov    -0x8(%rbp),%ecx
shr    %cl,%eax
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_get_msb>:
mov    %edi,%eax
shr    $0x18,%eax
ret

LLVM IR (-O0):
define i32 @test_get_msb(i32 %0) {
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %2
store i32 24, i32* %3
%5 = load i32, i32* %2
%6 = load i32, i32* %3
%7 = lshr i32 %5, %6
store i32 %7, i32* %4
%8 = load i32, i32* %4
ret i32 %8
}

LLVM IR (-O2):
define i32 @test_get_msb(i32 %0) {
%2 = lshr i32 %0, 24
ret i32 %2
}
/* Variables and functions */
scalar_t__ EINTR;
scalar_t__ errno;
int rename(char const *, char const *);
int zrename(const char *oldpath, const char *newpath) {
  int ret;
  do {
    ret = rename(oldpath, newpath);
  } while ((ret < 0) && (errno == EINTR));
  return ret;
  ;
}


x86 assembly (clang, -O0):
<zrename>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1030 <rename@plt>
mov    %eax,-0x14(%rbp)
xor    %eax,%eax
cmpl   $0x0,-0x14(%rbp)
mov    %al,-0x15(%rbp)
jge    1159 <zrename+0x49>
mov    0x2e9a(%rip),%rax
mov    (%rax),%rax
mov    0x2e88(%rip),%rcx
cmp    (%rcx),%rax
sete   %al
mov    %al,-0x15(%rbp)
mov    -0x15(%rbp),%al
test   $0x1,%al
jne    1120 <zrename+0x10>
mov    -0x14(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<zrename>:
push   %r15
push   %r14
push   %r12
push   %rbx
push   %rax
mov    %rsi,%r14
mov    %rdi,%rbx
mov    0x2ebb(%rip),%r15
mov    0x2eac(%rip),%r12
nopl   0x0(%rax)
mov    %rbx,%rdi
mov    %r14,%rsi
call   1030 <rename@plt>
test   %eax,%eax
jns    1148 <zrename+0x38>
mov    (%r12),%rcx
cmp    %rcx,(%r15)
je     1130 <zrename+0x20>
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
@errno = global i64 0
@EINTR = global i64 0
define i32 @zrename(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
%5 = alloca i32
store i8* %0, i8** %3
store i8* %1, i8** %4
br label %6
6: ; preds = %17, %2
%7 = load i8*, i8** %3
%8 = load i8*, i8** %4
%9 = call i32 @rename(i8* %7, i8* %8)
store i32 %9, i32* %5
br label %10
10: ; preds = %6
%11 = load i32, i32* %5
%12 = icmp slt i32 %11, 0
br i1 %12, label %13, label %17
13: ; preds = %10
%14 = load i64, i64* @errno
%15 = load i64, i64* @EINTR
%16 = icmp eq i64 %14, %15
br label %17
17: ; preds = %13, %10
%18 = phi i1 [ false, %10 ], [ %16, %13 ]
br i1 %18, label %6, label %19
19: ; preds = %17
%20 = load i32, i32* %5
ret i32 %20
}

LLVM IR (-O2):
@errno = global i64 0
@EINTR = global i64 0
define i32 @zrename(i8* nocapture %0, i8* nocapture %1) {
br label %3
3: ; preds = %3, %2
%4 = tail call i32 @rename(i8* %0, i8* %1)
%5 = icmp slt i32 %4, 0
%6 = load i64, i64* @errno
%7 = load i64, i64* @EINTR
%8 = icmp eq i64 %6, %7
%9 = select i1 %5, i1 %8, i1 false
br i1 %9, label %3, label %10
10: ; preds = %3
ret i32 %4
}
void __attribute__((weak)) _exit(int code) {
  for (;;)
    ;
}


x86 assembly (clang, -O0):
<_exit>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
jmp    1107 <_exit+0x7>

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

LLVM IR (-O0):
define weak void @_exit(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
br label %3
3: ; preds = %3, %1
br label %3
}

LLVM IR (-O2):
define weak void @_exit(i32 %0) {
br label %2
2: ; preds = %2, %1
br label %2
}
/* Variables and functions */
int /*<<< orphan*/ pr_time(char *, long);
int /*<<< orphan*/ printf(char *, char *);
int main() {
  char *str;
  long time = 2 + 1844674407370;
  pr_time(str, time);
  printf("%s", str);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movabs $0x1ad7f29abcc,%rax
mov    %rax,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1040 <pr_time@plt>
mov    -0x8(%rbp),%rsi
lea    0xeb2(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
movabs $0x1ad7f29abcc,%rsi
call   1040 <pr_time@plt>
lea    0xec9(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
@.str = [3 x i8] c"%s\00"
define i32 @main() {
%1 = tail call i32 @pr_time(i8* undef, i64 1844674407372)
%2 = tail call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* undef)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ write_t1();
void write_1() { write_t1(); }


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

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

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

LLVM IR (-O2):
define void @write_1() {
%1 = tail call i32 (...) @write_t1()
ret void
}
int byte_row_gbk2(int byte) {
  if (byte >= 0x81 && byte < 0xff)
    return byte - 0x81;
  else
    return -1;
}


x86 assembly (clang, -O0):
<byte_row_gbk2>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
cmpl   $0x81,-0x8(%rbp)
jl     1131 <byte_row_gbk2+0x31>
cmpl   $0xff,-0x8(%rbp)
jge    1131 <byte_row_gbk2+0x31>
mov    -0x8(%rbp),%eax
sub    $0x81,%eax
mov    %eax,-0x4(%rbp)
jmp    1138 <byte_row_gbk2+0x38>
movl   $0xffffffff,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<byte_row_gbk2>:
lea    -0x81(%rdi),%ecx
cmp    $0x7e,%ecx
mov    $0xffffffff,%eax
cmovb  %ecx,%eax
ret

LLVM IR (-O0):
define i32 @byte_row_gbk2(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %3
%4 = load i32, i32* %3
%5 = icmp sge i32 %4, 129
br i1 %5, label %6, label %12
6: ; preds = %1
%7 = load i32, i32* %3
%8 = icmp slt i32 %7, 255
br i1 %8, label %9, label %12
9: ; preds = %6
%10 = load i32, i32* %3
%11 = sub nsw i32 %10, 129
store i32 %11, i32* %2
br label %13
12: ; preds = %6, %1
store i32 -1, i32* %2
br label %13
13: ; preds = %12, %9
%14 = load i32, i32* %2
ret i32 %14
}

LLVM IR (-O2):
define i32 @byte_row_gbk2(i32 %0) {
%2 = add i32 %0, -129
%3 = icmp ult i32 %2, 126
%4 = select i1 %3, i32 %2, i32 -1
ret i32 %4
}
/* Variables and functions */
int atoi(char *);
int valid_processors(char *n) { return atoi(n); }


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

x86 assembly (clang, -O2):
<valid_processors>:
jmp    1030 <atoi@plt>

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

LLVM IR (-O2):
define i32 @valid_processors(i8* nocapture %0) {
%2 = tail call i32 @atoi(i8* %0)
ret i32 %2
}
/* Type definitions */
typedef int /*<<< orphan*/ vc;
struct vt_consize {
  int dummy;
};

/* Variables and functions */
int main(void) {
  struct vt_consize vc;
  (void)vc;
  return sizeof(vc);
}


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

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

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

LLVM IR (-O2):
define i32 @main() {
ret i32 4
}
/* Variables and functions */
int atoi(char *);
int argumenti_gadayvanili_ricxvshi(char *string) { return atoi(string); }


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

x86 assembly (clang, -O2):
<argumenti_gadayvanili_ricxvshi>:
jmp    1030 <atoi@plt>

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

LLVM IR (-O2):
define i32 @argumenti_gadayvanili_ricxvshi(i8* nocapture %0) {
%2 = tail call i32 @atoi(i8* %0)
ret i32 %2
}
int matchempty(void *__restrict__ x, const char *__restrict__ s, int ofs,
               struct __regex_t *__restrict__ preg, int plus, int eflags) {
  return 0;
}


x86 assembly (clang, -O0):
<matchempty>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    %rcx,-0x20(%rbp)
mov    %r8d,-0x24(%rbp)
mov    %r9d,-0x28(%rbp)
xor    %eax,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
%struct.__regex_t = type opaque
define i32 @matchempty(i8* noalias %0, i8* noalias %1, i32 %2, %struct.__regex_t* noalias %3, i32 %4, i32 %5) {
%7 = alloca i8*
%8 = alloca i8*
%9 = alloca i32
%10 = alloca %struct.__regex_t*
%11 = alloca i32
%12 = alloca i32
store i8* %0, i8** %7
store i8* %1, i8** %8
store i32 %2, i32* %9
store %struct.__regex_t* %3, %struct.__regex_t** %10
store i32 %4, i32* %11
store i32 %5, i32* %12
ret i32 0
}

LLVM IR (-O2):
%struct.__regex_t = type opaque
define i32 @matchempty(i8* noalias nocapture readnone %0, i8* noalias nocapture readnone %1, i32 %2, %struct.__regex_t* noalias nocapture readnone %3, i32 %4, i32 %5) {
ret i32 0
}
char lower(c)
register char c;
{
  if (isascii(c) && isupper(c))
    c = c - 'A' + 'a';
  return (c);
}


x86 assembly (clang, -O0):
<lower>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movsbl -0x1(%rbp),%edi
mov    $0x0,%al
call   1040 <isascii@plt>
cmp    $0x0,%eax
je     1161 <lower+0x41>
movsbl -0x1(%rbp),%edi
call   1030 <isupper@plt>
cmp    $0x0,%eax
je     1161 <lower+0x41>
movsbl -0x1(%rbp),%eax
sub    $0x41,%eax
add    $0x61,%eax
mov    %al,-0x1(%rbp)
movsbl -0x1(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<lower>:
push   %rbp
push   %rbx
push   %rax
mov    %edi,%ebx
movsbl %bl,%ebp
mov    %ebp,%edi
xor    %eax,%eax
call   1040 <isascii@plt>
test   %eax,%eax
je     1144 <lower+0x24>
mov    %ebp,%edi
call   1030 <isupper@plt>
add    $0x20,%ebp
test   %eax,%eax
cmovne %ebp,%ebx
mov    %ebx,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
define signext i8 @lower(i32 %0) {
%2 = alloca i8
%3 = trunc i32 %0 to i8
store i8 %3, i8* %2
%4 = load i8, i8* %2
%5 = sext i8 %4 to i32
%6 = call i32 (i32, ...) bitcast (i32 (...)* @isascii to i32 (i32, ...)*)(i32 %5)
%7 = icmp ne i32 %6, 0
br i1 %7, label %8, label %19
8: ; preds = %1
%9 = load i8, i8* %2
%10 = sext i8 %9 to i32
%11 = call i32 @isupper(i32 %10)
%12 = icmp ne i32 %11, 0
br i1 %12, label %13, label %19
13: ; preds = %8
%14 = load i8, i8* %2
%15 = sext i8 %14 to i32
%16 = sub nsw i32 %15, 65
%17 = add nsw i32 %16, 97
%18 = trunc i32 %17 to i8
store i8 %18, i8* %2
br label %19
19: ; preds = %13, %8, %1
%20 = load i8, i8* %2
ret i8 %20
}

LLVM IR (-O2):
define signext i8 @lower(i32 %0) {
%2 = shl i32 %0, 24
%3 = ashr exact i32 %2, 24
%4 = tail call i32 (i32, ...) bitcast (i32 (...)* @isascii to i32 (i32, ...)*)(i32 %3)
%5 = icmp eq i32 %4, 0
br i1 %5, label %11, label %6
6: ; preds = %1
%7 = tail call i32 @isupper(i32 %3)
%8 = icmp eq i32 %7, 0
%9 = add nsw i32 %3, 32
%10 = select i1 %8, i32 %0, i32 %9
br label %11
11: ; preds = %6, %1
%12 = phi i32 [ %0, %1 ], [ %10, %6 ]
%13 = trunc i32 %12 to i8
ret i8 %13
}
/* Variables and functions */
int read_poll_flag(int, int, int, int);
int wait_for_return(int fd) { return read_poll_flag(fd, 0x02, 0x02, 0x02); }


x86 assembly (clang, -O0):
<wait_for_return>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
mov    $0x2,%ecx
mov    %ecx,%esi
mov    %ecx,%edx
call   1030 <read_poll_flag@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<wait_for_return>:
mov    $0x2,%esi
mov    $0x2,%edx
mov    $0x2,%ecx
jmp    1030 <read_poll_flag@plt>

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

LLVM IR (-O2):
define i32 @wait_for_return(i32 %0) {
%2 = tail call i32 @read_poll_flag(i32 %0, i32 2, i32 2, i32 2)
ret i32 %2
}
unsigned short int
unsignedshortint_ignoring_unsignedlonglongint(unsigned short int x,
                                              unsigned long long int y) {
  return x;
}


x86 assembly (clang, -O0):
<unsignedshortint_ignoring_unsignedlonglongint>:
push   %rbp
mov    %rsp,%rbp
mov    %di,%ax
mov    %ax,-0x2(%rbp)
mov    %rsi,-0x10(%rbp)
movzwl -0x2(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<unsignedshortint_ignoring_unsignedlonglongint>:
mov    %edi,%eax
ret

LLVM IR (-O0):
define zeroext i16 @unsignedshortint_ignoring_unsignedlonglongint(i16 zeroext %0, i64 %1) {
%3 = alloca i16
%4 = alloca i64
store i16 %0, i16* %3
store i64 %1, i64* %4
%5 = load i16, i16* %3
ret i16 %5
}

LLVM IR (-O2):
define zeroext i16 @unsignedshortint_ignoring_unsignedlonglongint(i16 returned zeroext %0, i64 %1) {
ret i16 %0
}