xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ delayUsBusy(int);
int /*<<< orphan*/ pinHigh(int);
int /*<<< orphan*/ pinLow(int);
int /*<<< orphan*/ pinModeOut(int);
void onewire_send_bit(int pin, int bit) {
  pinModeOut(pin);
  pinLow(pin);
  if (bit) {
    delayUsBusy(1);
    pinHigh(pin);
    delayUsBusy(60);
  } else {
    delayUsBusy(60);
    pinHigh(pin);
    delayUsBusy(1);
  }
  delayUsBusy(60);
}


x86 assembly (clang, -O0):
<onewire_send_bit>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%edi
call   1050 <pinModeOut@plt>
mov    -0x4(%rbp),%edi
call   1060 <pinLow@plt>
cmpl   $0x0,-0x8(%rbp)
je     1189 <onewire_send_bit+0x49>
mov    $0x1,%edi
call   1030 <delayUsBusy@plt>
mov    -0x4(%rbp),%edi
call   1040 <pinHigh@plt>
mov    $0x3c,%edi
call   1030 <delayUsBusy@plt>
jmp    11a5 <onewire_send_bit+0x65>
mov    $0x3c,%edi
call   1030 <delayUsBusy@plt>
mov    -0x4(%rbp),%edi
call   1040 <pinHigh@plt>
mov    $0x1,%edi
call   1030 <delayUsBusy@plt>
mov    $0x3c,%edi
call   1030 <delayUsBusy@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<onewire_send_bit>:
push   %rbp
push   %rbx
push   %rax
mov    %esi,%ebx
mov    %edi,%ebp
call   1050 <pinModeOut@plt>
mov    %ebp,%edi
call   1060 <pinLow@plt>
test   %ebx,%ebx
mov    $0x3c,%eax
mov    $0x1,%ebx
mov    $0x1,%edi
cmove  %eax,%edi
cmovne %eax,%ebx
call   1030 <delayUsBusy@plt>
mov    %ebp,%edi
call   1040 <pinHigh@plt>
mov    %ebx,%edi
call   1030 <delayUsBusy@plt>
mov    $0x3c,%edi
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    1030 <delayUsBusy@plt>

LLVM IR (-O0):
define void @onewire_send_bit(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%5 = load i32, i32* %3
%6 = call i32 @pinModeOut(i32 %5)
%7 = load i32, i32* %3
%8 = call i32 @pinLow(i32 %7)
%9 = load i32, i32* %4
%10 = icmp ne i32 %9, 0
br i1 %10, label %11, label %16
11: ; preds = %2
%12 = call i32 @delayUsBusy(i32 1)
%13 = load i32, i32* %3
%14 = call i32 @pinHigh(i32 %13)
%15 = call i32 @delayUsBusy(i32 60)
br label %21
16: ; preds = %2
%17 = call i32 @delayUsBusy(i32 60)
%18 = load i32, i32* %3
%19 = call i32 @pinHigh(i32 %18)
%20 = call i32 @delayUsBusy(i32 1)
br label %21
21: ; preds = %16, %11
%22 = call i32 @delayUsBusy(i32 60)
ret void
}

LLVM IR (-O2):
define void @onewire_send_bit(i32 %0, i32 %1) {
%3 = tail call i32 @pinModeOut(i32 %0)
%4 = tail call i32 @pinLow(i32 %0)
%5 = icmp eq i32 %1, 0
%6 = select i1 %5, i32 60, i32 1
%7 = select i1 %5, i32 1, i32 60
%8 = tail call i32 @delayUsBusy(i32 %6)
%9 = tail call i32 @pinHigh(i32 %0)
%10 = tail call i32 @delayUsBusy(i32 %7)
%11 = tail call i32 @delayUsBusy(i32 60)
ret void
}
/* Variables and functions */
int fatfs_link(char const *, char const *);
int _link(const char *path1, const char *path2) {
  return fatfs_link(path1, path2);
}


x86 assembly (clang, -O0):
<_link>:
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 <fatfs_link@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<_link>:
jmp    1030 <fatfs_link@plt>

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

LLVM IR (-O2):
define i32 @_link(i8* %0, i8* %1) {
%3 = tail call i32 @fatfs_link(i8* %0, i8* %1)
ret i32 %3
}
int isDelimiter(char input) {
  int result = 0;
  switch (input) {
  case ' ':
  case '\0':
  case '\n':
  case '\a':
  case '\t':
  case '\r':
    result = 1;
  }
  return result;
}


x86 assembly (clang, -O0):
<isDelimiter>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movl   $0x0,-0x8(%rbp)
movsbl -0x1(%rbp),%eax
mov    %eax,-0xc(%rbp)
test   %eax,%eax
je     116c <isDelimiter+0x6c>
jmp    1125 <isDelimiter+0x25>
mov    -0xc(%rbp),%eax
sub    $0x7,%eax
je     116c <isDelimiter+0x6c>
jmp    1136 <isDelimiter+0x36>
mov    -0xc(%rbp),%eax
add    $0xfffffff7,%eax
sub    $0x2,%eax
jb     116c <isDelimiter+0x6c>
jmp    114a <isDelimiter+0x4a>
mov    -0xc(%rbp),%eax
sub    $0xd,%eax
je     116c <isDelimiter+0x6c>
jmp    115b <isDelimiter+0x5b>
mov    -0xc(%rbp),%eax
sub    $0x20,%eax
jne    1173 <isDelimiter+0x73>
jmp    116c <isDelimiter+0x6c>
movl   $0x1,-0x8(%rbp)
mov    -0x8(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<isDelimiter>:
xor    %eax,%eax
cmp    $0x20,%edi
ja     111e <isDelimiter+0x1e>
mov    %edi,%ecx
movabs $0x100002681,%rdx
bt     %rcx,%rdx
jae    111e <isDelimiter+0x1e>
mov    $0x1,%eax
ret

LLVM IR (-O0):
define i32 @isDelimiter(i8 signext %0) {
%2 = alloca i8
%3 = alloca i32
store i8 %0, i8* %2
store i32 0, i32* %3
%4 = load i8, i8* %2
%5 = sext i8 %4 to i32
switch i32 %5, label %7 [
i32 32, label %6
i32 0, label %6
i32 10, label %6
i32 7, label %6
i32 9, label %6
i32 13, label %6
]
6: ; preds = %1, %1, %1, %1, %1, %1
store i32 1, i32* %3
br label %7
7: ; preds = %6, %1
%8 = load i32, i32* %3
ret i32 %8
}

LLVM IR (-O2):
define i32 @isDelimiter(i8 signext %0) {
%2 = sext i8 %0 to i32
switch i32 %2, label %4 [
i32 32, label %3
i32 0, label %3
i32 10, label %3
i32 7, label %3
i32 9, label %3
i32 13, label %3
]
3: ; preds = %1, %1, %1, %1, %1, %1
br label %4
4: ; preds = %3, %1
%5 = phi i32 [ 0, %1 ], [ 1, %3 ]
ret i32 %5
}
/* Forward declarations */
typedef struct TYPE_2__ TYPE_1__;

/* Type definitions */
struct TYPE_2__ {
  int sigev_notify;
};
struct aiocb {
  TYPE_1__ aio_sigevent;
  scalar_t__ aio_reqprio;
  scalar_t__ aio_nbytes;
  scalar_t__ aio_buf;
  scalar_t__ aio_offset;
  scalar_t__ aio_fildes;
};

/* Variables and functions */
scalar_t__ aio_return(struct aiocb *);
int main(void) {
  struct aiocb aiocb;
  aiocb.aio_fildes = 0;
  aiocb.aio_offset = 0;
  aiocb.aio_buf = 0;
  aiocb.aio_nbytes = 0;
  aiocb.aio_reqprio = 0;
  aiocb.aio_sigevent.sigev_notify = 1;
  return (int)aio_return(&aiocb);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
movl   $0x0,-0x4(%rbp)
movq   $0x0,-0x10(%rbp)
movq   $0x0,-0x18(%rbp)
movq   $0x0,-0x20(%rbp)
movq   $0x0,-0x28(%rbp)
movq   $0x0,-0x30(%rbp)
movl   $0x1,-0x38(%rbp)
lea    -0x38(%rbp),%rdi
call   1030 <aio_return@plt>
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
sub    $0x38,%rsp
xorps  %xmm0,%xmm0
movups %xmm0,0x20(%rsp)
movups %xmm0,0x10(%rsp)
movq   $0x0,0x30(%rsp)
movl   $0x1,0x8(%rsp)
lea    0x8(%rsp),%rdi
call   1030 <aio_return@plt>
add    $0x38,%rsp
ret

LLVM IR (-O0):
%struct.aiocb = type { %struct.TYPE_2__, i64, i64, i64, i64, i64 }
%struct.TYPE_2__ = type { i32 }
define i32 @main() {
%1 = alloca i32
%2 = alloca %struct.aiocb
store i32 0, i32* %1
%3 = getelementptr inbounds %struct.aiocb, %struct.aiocb* %2, i32 0, i32 5
store i64 0, i64* %3
%4 = getelementptr inbounds %struct.aiocb, %struct.aiocb* %2, i32 0, i32 4
store i64 0, i64* %4
%5 = getelementptr inbounds %struct.aiocb, %struct.aiocb* %2, i32 0, i32 3
store i64 0, i64* %5
%6 = getelementptr inbounds %struct.aiocb, %struct.aiocb* %2, i32 0, i32 2
store i64 0, i64* %6
%7 = getelementptr inbounds %struct.aiocb, %struct.aiocb* %2, i32 0, i32 1
store i64 0, i64* %7
%8 = getelementptr inbounds %struct.aiocb, %struct.aiocb* %2, i32 0, i32 0
%9 = getelementptr inbounds %struct.TYPE_2__, %struct.TYPE_2__* %8, i32 0, i32 0
store i32 1, i32* %9
%10 = call i64 @aio_return(%struct.aiocb* %2)
%11 = trunc i64 %10 to i32
ret i32 %11
}

LLVM IR (-O2):
%struct.aiocb = type { %struct.TYPE_2__, i64, i64, i64, i64, i64 }
%struct.TYPE_2__ = type { i32 }
define i32 @main() {
%1 = alloca %struct.aiocb
%2 = bitcast %struct.aiocb* %1 to i8*
%3 = getelementptr inbounds %struct.aiocb, %struct.aiocb* %1, i64 0, i32 1
%4 = getelementptr inbounds %struct.aiocb, %struct.aiocb* %1, i64 0, i32 0, i32 0
%5 = bitcast i64* %3 to i8*
store i32 1, i32* %4
%6 = call i64 @aio_return(%struct.aiocb* %1)
%7 = trunc i64 %6 to i32
ret i32 %7
}
/* Variables and functions */
int /*<<< orphan*/ ABMON_1;
char *nl_langinfo(int /*<<< orphan*/);
char *langinfo_abmon_1() { return nl_langinfo(ABMON_1); }


x86 assembly (clang, -O0):
<langinfo_abmon_1>:
push   %rbp
mov    %rsp,%rbp
mov    0x2ec5(%rip),%rax
mov    (%rax),%edi
call   1030 <nl_langinfo@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<langinfo_abmon_1>:
mov    0x2ec9(%rip),%rax
mov    (%rax),%edi
jmp    1030 <nl_langinfo@plt>

LLVM IR (-O0):
@ABMON_1 = global i32 0
define i8* @langinfo_abmon_1() {
%1 = load i32, i32* @ABMON_1
%2 = call i8* @nl_langinfo(i32 %1)
ret i8* %2
}

LLVM IR (-O2):
@ABMON_1 = global i32 0
define i8* @langinfo_abmon_1() {
%1 = load i32, i32* @ABMON_1
%2 = tail call i8* @nl_langinfo(i32 %1)
ret i8* %2
}
/* Variables and functions */
scalar_t__ GC_calloc_atomic(unsigned int, unsigned int);
int /*<<< orphan*/ _throw_badalloc();
void *_cyccalloc_atomic(unsigned n, unsigned s) {
  void *ans = (void *)GC_calloc_atomic(n, s);
  if (!ans)
    _throw_badalloc();
  return ans;
}


x86 assembly (clang, -O0):
<_cyccalloc_atomic>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x8(%rbp),%esi
call   1030 <GC_calloc_atomic@plt>
mov    %rax,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
jne    114f <_cyccalloc_atomic+0x2f>
mov    $0x0,%al
call   1040 <_throw_badalloc@plt>
mov    -0x10(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<_cyccalloc_atomic>:
push   %rbx
call   1030 <GC_calloc_atomic@plt>
mov    %rax,%rbx
test   %rax,%rax
jne    1135 <_cyccalloc_atomic+0x15>
xor    %eax,%eax
call   1040 <_throw_badalloc@plt>
mov    %rbx,%rax
pop    %rbx
ret

LLVM IR (-O0):
define i8* @_cyccalloc_atomic(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8*
store i32 %0, i32* %3
store i32 %1, i32* %4
%6 = load i32, i32* %3
%7 = load i32, i32* %4
%8 = call i64 @GC_calloc_atomic(i32 %6, i32 %7)
%9 = inttoptr i64 %8 to i8*
store i8* %9, i8** %5
%10 = load i8*, i8** %5
%11 = icmp ne i8* %10, null
br i1 %11, label %14, label %12
12: ; preds = %2
%13 = call i32 (...) @_throw_badalloc()
br label %14
14: ; preds = %12, %2
%15 = load i8*, i8** %5
ret i8* %15
}

LLVM IR (-O2):
define i8* @_cyccalloc_atomic(i32 %0, i32 %1) {
%3 = tail call i64 @GC_calloc_atomic(i32 %0, i32 %1)
%4 = icmp eq i64 %3, 0
br i1 %4, label %5, label %7
5: ; preds = %2
%6 = tail call i32 (...) @_throw_badalloc()
br label %7
7: ; preds = %5, %2
%8 = inttoptr i64 %3 to i8*
ret i8* %8
}
/* Variables and functions */
int /*<<< orphan*/ getchar();
int /*<<< orphan*/ test6_freebsdcmpar();
int main() {
  test6_freebsdcmpar();
  getchar();
  return 0;
}


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

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

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

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @test6_freebsdcmpar()
%2 = tail call i32 (...) @getchar()
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ myMapLines();
int main(void) {
  myMapLines();
  return 0;
}


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

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

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

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @myMapLines()
ret i32 0
}
void ehci_ppc_soc_errata(struct ehci_hcd *ehci) {}


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

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

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

LLVM IR (-O2):
%struct.ehci_hcd = type opaque
define void @ehci_ppc_soc_errata(%struct.ehci_hcd* nocapture %0) {
ret void
}
/* Variables and functions */
int yywrap(void) { return (1); }


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

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

LLVM IR (-O0):
define i32 @yywrap() {
ret i32 1
}

LLVM IR (-O2):
define i32 @yywrap() {
ret i32 1
}
void iaad_adj(unsigned int *rmv, unsigned char **buf, unsigned int *lft,
              unsigned int adj) {
  *buf += adj;
  *rmv += adj;
  *lft -= adj;
}


x86 assembly (clang, -O0):
<iaad_adj>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %ecx,-0x1c(%rbp)
mov    -0x1c(%rbp),%edx
mov    -0x10(%rbp),%rax
mov    (%rax),%rcx
mov    %edx,%edx
add    %rdx,%rcx
mov    %rcx,(%rax)
mov    -0x1c(%rbp),%ecx
mov    -0x8(%rbp),%rax
add    (%rax),%ecx
mov    %ecx,(%rax)
mov    -0x1c(%rbp),%edx
mov    -0x18(%rbp),%rax
mov    (%rax),%ecx
sub    %edx,%ecx
mov    %ecx,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<iaad_adj>:
mov    %ecx,%eax
add    %rax,(%rsi)
add    %ecx,(%rdi)
sub    %ecx,(%rdx)
ret

LLVM IR (-O0):
define void @iaad_adj(i32* %0, i8** %1, i32* %2, i32 %3) {
%5 = alloca i32*
%6 = alloca i8**
%7 = alloca i32*
%8 = alloca i32
store i32* %0, i32** %5
store i8** %1, i8*** %6
store i32* %2, i32** %7
store i32 %3, i32* %8
%9 = load i32, i32* %8
%10 = load i8**, i8*** %6
%11 = load i8*, i8** %10
%12 = zext i32 %9 to i64
%13 = getelementptr inbounds i8, i8* %11, i64 %12
store i8* %13, i8** %10
%14 = load i32, i32* %8
%15 = load i32*, i32** %5
%16 = load i32, i32* %15
%17 = add i32 %16, %14
store i32 %17, i32* %15
%18 = load i32, i32* %8
%19 = load i32*, i32** %7
%20 = load i32, i32* %19
%21 = sub i32 %20, %18
store i32 %21, i32* %19
ret void
}

LLVM IR (-O2):
define void @iaad_adj(i32* nocapture %0, i8** nocapture %1, i32* nocapture %2, i32 %3) {
%5 = load i8*, i8** %1
%6 = zext i32 %3 to i64
%7 = getelementptr inbounds i8, i8* %5, i64 %6
store i8* %7, i8** %1
%8 = load i32, i32* %0
%9 = add i32 %8, %3
store i32 %9, i32* %0
%10 = load i32, i32* %2
%11 = sub i32 %10, %3
store i32 %11, i32* %2
ret void
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ isspace(int);
void t_isspace_0xf4() {
  Assert_real((isspace(244) == 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_isspace.c",
              1225, ("isspace should be 0 for 0xf4"));
}


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

x86 assembly (clang, -O2):
<t_isspace_0xf4>:
push   %rax
mov    $0xf4,%edi
call   1030 <isspace@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf66(%rip),%rcx
mov    $0x4c9,%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_isspace.c\00"
@.str.1 = [29 x i8] c"isspace should be 0 for 0xf4\00"
define void @t_isspace_0xf4() {
%1 = call i64 @isspace(i32 244)
%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 1225, i8* getelementptr inbounds ([29 x i8], [29 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_isspace.c\00"
@.str.1 = [29 x i8] c"isspace should be 0 for 0xf4\00"
define void @t_isspace_0xf4() {
%1 = tail call i64 @isspace(i32 244)
%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 1225, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Variables and functions */
unsigned long int abs(signed long int x) { return x < 0 ? -x : x; }


x86 assembly (clang, -O0):
<abs>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
cmpq   $0x0,-0x8(%rbp)
jge    1122 <abs+0x22>
xor    %eax,%eax
sub    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
jmp    112a <abs+0x2a>
mov    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<abs>:
mov    %rdi,%rax
neg    %rax
cmovs  %rdi,%rax
ret

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

LLVM IR (-O2):
define i64 @abs(i64 %0) {
%2 = tail call i64 @llvm.abs.i64(i64 %0, i1 true)
ret i64 %2
}
int errorWrongIndex(void) { ; }


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

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

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

LLVM IR (-O2):
define i32 @errorWrongIndex() {
ret i32 undef
}
int f(int x) { return (x >> (sizeof(x) * 8 - 1)) ? -1 : 1; }


x86 assembly (clang, -O0):
<f>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edx
sar    $0x1f,%edx
mov    $0x1,%eax
mov    $0xffffffff,%ecx
cmp    $0x0,%edx
cmovne %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<f>:
mov    %edi,%eax
sar    $0x1f,%eax
or     $0x1,%eax
ret

LLVM IR (-O0):
define i32 @f(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = ashr i32 %3, 31
%5 = icmp ne i32 %4, 0
%6 = zext i1 %5 to i64
%7 = select i1 %5, i32 -1, i32 1
ret i32 %7
}

LLVM IR (-O2):
define i32 @f(i32 %0) {
%2 = icmp sgt i32 %0, -1
%3 = select i1 %2, i32 1, i32 -1
ret i32 %3
}
/* Type definitions */
typedef int /*<<< orphan*/ fd_set;

/* Variables and functions */
int /*<<< orphan*/ FD_ZERO(int /*<<< orphan*/ *);
void _clear_set(fd_set *set) {
  if (set != NULL)
    FD_ZERO(set);
}


x86 assembly (clang, -O0):
<_clear_set>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
cmpq   $0x0,-0x8(%rbp)
je     1130 <_clear_set+0x20>
mov    -0x8(%rbp),%rdi
call   1030 <FD_ZERO@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<_clear_set>:
test   %rdi,%rdi
je     111a <_clear_set+0xa>
jmp    1030 <FD_ZERO@plt>
ret

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

LLVM IR (-O2):
define void @_clear_set(i32* %0) {
%2 = icmp eq i32* %0, null
br i1 %2, label %5, label %3
3: ; preds = %1
%4 = tail call i32 @FD_ZERO(i32* %0)
br label %5
5: ; preds = %3, %1
ret void
}
/* Type definitions */
typedef scalar_t__ uint8_t;
typedef int uint16_t;

/* Variables and functions */
uint16_t htoles(uint16_t value) {
  uint16_t tmp;
  ((uint8_t *)&tmp)[0] = (uint8_t)(value >> 0);
  ((uint8_t *)&tmp)[1] = (uint8_t)(value >> 8);
  return tmp;
}


x86 assembly (clang, -O0):
<htoles>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
sar    $0x0,%eax
cltq
mov    %rax,-0x8(%rbp)
mov    -0x4(%rbp),%eax
sar    $0x8,%eax
cltq
mov    %rax,0x0(%rbp)
mov    -0x8(%rbp),%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @htoles(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %2
%4 = load i32, i32* %2
%5 = ashr i32 %4, 0
%6 = sext i32 %5 to i64
%7 = bitcast i32* %3 to i64*
%8 = getelementptr inbounds i64, i64* %7, i64 0
store i64 %6, i64* %8
%9 = load i32, i32* %2
%10 = ashr i32 %9, 8
%11 = sext i32 %10 to i64
%12 = bitcast i32* %3 to i64*
%13 = getelementptr inbounds i64, i64* %12, i64 1
store i64 %11, i64* %13
%14 = load i32, i32* %3
ret i32 %14
}

LLVM IR (-O2):
define i32 @htoles(i32 %0) {
ret i32 undef
}
/* Type definitions */
struct FindjoB {
  int dummy;
};

/* Variables and functions */
int Findjob_set_prop_filter(struct FindjoB *, int /*<<< orphan*/, int, int);
int Findjob_set_false(struct FindjoB *o, int value, int flag) {
  int ret;
  ret = Findjob_set_prop_filter(o, 0, value, flag & 1);
  return (ret);
}


x86 assembly (clang, -O0):
<Findjob_set_false>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%edx
mov    -0x10(%rbp),%ecx
and    $0x1,%ecx
xor    %esi,%esi
call   1030 <Findjob_set_prop_filter@plt>
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Findjob_set_false>:
mov    %edx,%ecx
mov    %esi,%edx
and    $0x1,%ecx
xor    %esi,%esi
jmp    1030 <Findjob_set_prop_filter@plt>

LLVM IR (-O0):
%struct.FindjoB = type { i32 }
define i32 @Findjob_set_false(%struct.FindjoB* %0, i32 %1, i32 %2) {
%4 = alloca %struct.FindjoB*
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
store %struct.FindjoB* %0, %struct.FindjoB** %4
store i32 %1, i32* %5
store i32 %2, i32* %6
%8 = load %struct.FindjoB*, %struct.FindjoB** %4
%9 = load i32, i32* %5
%10 = load i32, i32* %6
%11 = and i32 %10, 1
%12 = call i32 @Findjob_set_prop_filter(%struct.FindjoB* %8, i32 0, i32 %9, i32 %11)
store i32 %12, i32* %7
%13 = load i32, i32* %7
ret i32 %13
}

LLVM IR (-O2):
%struct.FindjoB = type { i32 }
define i32 @Findjob_set_false(%struct.FindjoB* %0, i32 %1, i32 %2) {
%4 = and i32 %2, 1
%5 = tail call i32 @Findjob_set_prop_filter(%struct.FindjoB* %0, i32 0, i32 %1, i32 %4)
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ gdb_putchar(int /*<<< orphan*/);
void gdb_putstr(const char *str) {
  while (*str)
    gdb_putchar(*str++);
}


x86 assembly (clang, -O0):
<gdb_putstr>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
cmpb   $0x0,(%rax)
je     1145 <gdb_putstr+0x35>
mov    -0x8(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x8(%rbp)
movsbl (%rax),%edi
call   1030 <gdb_putchar@plt>
jmp    111c <gdb_putstr+0xc>
add    $0x10,%rsp
pop    %rbp
ret

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

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

LLVM IR (-O2):
define void @gdb_putstr(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = icmp eq i8 %2, 0
br i1 %3, label %12, label %4
4: ; preds = %1, %4
%5 = phi i8 [ %10, %4 ], [ %2, %1 ]
%6 = phi i8* [ %7, %4 ], [ %0, %1 ]
%7 = getelementptr inbounds i8, i8* %6, i64 1
%8 = sext i8 %5 to i32
%9 = tail call i32 @gdb_putchar(i32 %8)
%10 = load i8, i8* %7
%11 = icmp eq i8 %10, 0
br i1 %11, label %12, label %4
12: ; preds = %4, %1
ret void
}
/* Type definitions */
struct ip6_rthdr0 {
  int dummy;
};
struct in6_addr {
  int dummy;
};
typedef int socklen_t;

/* Variables and functions */
socklen_t inet6_rth_space2(int type, int segments) {
  switch (type) {
  case 2:
    if (segments < 0 || segments > 127)
      return 0;
    return sizeof(struct ip6_rthdr0) + segments * sizeof(struct in6_addr);
  }
  return 0;
}


x86 assembly (clang, -O0):
<inet6_rth_space2>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%eax
sub    $0x2,%eax
jne    114f <inet6_rth_space2+0x4f>
jmp    111b <inet6_rth_space2+0x1b>
cmpl   $0x0,-0xc(%rbp)
jl     112f <inet6_rth_space2+0x2f>
cmpl   $0x7f,-0xc(%rbp)
jle    113b <inet6_rth_space2+0x3b>
movl   $0x0,-0x4(%rbp)
jmp    1156 <inet6_rth_space2+0x56>
movslq -0xc(%rbp),%rax
shl    $0x2,%rax
add    $0x4,%rax
mov    %eax,-0x4(%rbp)
jmp    1156 <inet6_rth_space2+0x56>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<inet6_rth_space2>:
xor    %ecx,%ecx
cmp    $0x7f,%esi
lea    0x4(,%rsi,4),%eax
cmova  %ecx,%eax
cmp    $0x2,%edi
cmovne %ecx,%eax
ret

LLVM IR (-O0):
define i32 @inet6_rth_space2(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
store i32 %0, i32* %4
store i32 %1, i32* %5
%6 = load i32, i32* %4
switch i32 %6, label %20 [
i32 2, label %7
]
7: ; preds = %2
%8 = load i32, i32* %5
%9 = icmp slt i32 %8, 0
br i1 %9, label %13, label %10
10: ; preds = %7
%11 = load i32, i32* %5
%12 = icmp sgt i32 %11, 127
br i1 %12, label %13, label %14
13: ; preds = %10, %7
store i32 0, i32* %3
br label %21
14: ; preds = %10
%15 = load i32, i32* %5
%16 = sext i32 %15 to i64
%17 = mul i64 %16, 4
%18 = add i64 4, %17
%19 = trunc i64 %18 to i32
store i32 %19, i32* %3
br label %21
20: ; preds = %2
store i32 0, i32* %3
br label %21
21: ; preds = %20, %14, %13
%22 = load i32, i32* %3
ret i32 %22
}

LLVM IR (-O2):
define i32 @inet6_rth_space2(i32 %0, i32 %1) {
%3 = icmp ne i32 %0, 2
%4 = icmp ugt i32 %1, 127
%5 = or i1 %3, %4
%6 = shl i32 %1, 2
%7 = add i32 %6, 4
%8 = select i1 %5, i32 0, i32 %7
ret i32 %8
}
/* Variables and functions */
int /*<<< orphan*/ getuid();
void thread(void) { getuid(); }


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

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

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

LLVM IR (-O2):
define void @thread() {
%1 = tail call i32 (...) @getuid()
ret void
}
unsigned long strtou(const char *s, const char **end) {
  unsigned long u;
  unsigned digit;
  for (u = 0; (digit = *s - '0') <= 9; ++s)
    u = u * 10 + digit;
  *end = s;
  return u;
}


x86 assembly (clang, -O0):
<strtou>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movq   $0x0,-0x18(%rbp)
mov    -0x8(%rbp),%rax
movsbl (%rax),%eax
sub    $0x30,%eax
mov    %eax,-0x1c(%rbp)
cmp    $0x9,%eax
ja     114a <strtou+0x4a>
imul   $0xa,-0x18(%rbp),%rax
mov    -0x1c(%rbp),%ecx
add    %rcx,%rax
mov    %rax,-0x18(%rbp)
mov    -0x8(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x8(%rbp)
jmp    1114 <strtou+0x14>
mov    -0x8(%rbp),%rcx
mov    -0x10(%rbp),%rax
mov    %rcx,(%rax)
mov    -0x18(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<strtou>:
movsbl (%rdi),%ecx
add    $0xffffffd0,%ecx
xor    %eax,%eax
cmp    $0x9,%ecx
ja     112a <strtou+0x2a>
nopl   (%rax)
lea    (%rax,%rax,4),%rax
mov    %ecx,%ecx
lea    (%rcx,%rax,2),%rax
movsbl 0x1(%rdi),%ecx
add    $0x1,%rdi
add    $0xffffffd0,%ecx
cmp    $0xa,%ecx
jb     1110 <strtou+0x10>
mov    %rdi,(%rsi)
ret

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

LLVM IR (-O2):
define i64 @strtou(i8* %0, i8** nocapture writeonly %1) {
%3 = load i8, i8* %0
%4 = sext i8 %3 to i32
%5 = add nsw i32 %4, -48
%6 = icmp ult i32 %5, 10
br i1 %6, label %7, label %19
7: ; preds = %2, %7
%8 = phi i32 [ %17, %7 ], [ %5, %2 ]
%9 = phi i8* [ %14, %7 ], [ %0, %2 ]
%10 = phi i64 [ %13, %7 ], [ 0, %2 ]
%11 = mul i64 %10, 10
%12 = zext i32 %8 to i64
%13 = add i64 %11, %12
%14 = getelementptr inbounds i8, i8* %9, i64 1
%15 = load i8, i8* %14
%16 = sext i8 %15 to i32
%17 = add nsw i32 %16, -48
%18 = icmp ult i32 %17, 10
br i1 %18, label %7, label %19
19: ; preds = %7, %2
%20 = phi i64 [ 0, %2 ], [ %13, %7 ]
%21 = phi i8* [ %0, %2 ], [ %14, %7 ]
store i8* %21, i8** %1
ret i64 %20
}
/* Type definitions */
struct re_registers {
  int dummy;
};
struct re_pattern_buffer {
  int dummy;
};

/* Variables and functions */
int re_match_2_internal(struct re_pattern_buffer *, void *, int /*<<< orphan*/,
                        char const *, int, int, struct re_registers *, int);
int re_match(struct re_pattern_buffer *bufp, const char *string, int size,
             int pos, struct re_registers *regs) {
  int result =
      re_match_2_internal(bufp, (void *)0, 0, string, size, pos, regs, size);
  return result;
}


x86 assembly (clang, -O0):
<re_match>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    %ecx,-0x18(%rbp)
mov    %r8,-0x20(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rcx
mov    -0x14(%rbp),%r8d
mov    -0x18(%rbp),%r9d
mov    -0x20(%rbp),%r10
mov    -0x14(%rbp),%eax
xor    %edx,%edx
mov    %edx,%esi
xor    %edx,%edx
mov    %r10,(%rsp)
mov    %eax,0x8(%rsp)
call   1030 <re_match_2_internal@plt>
mov    %eax,-0x24(%rbp)
mov    -0x24(%rbp),%eax
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<re_match>:
push   %rax
mov    %r8,%rax
mov    %ecx,%r9d
mov    %edx,%r8d
mov    %rsi,%rcx
xor    %esi,%esi
xor    %edx,%edx
push   %r8
push   %rax
call   1030 <re_match_2_internal@plt>
add    $0x10,%rsp
pop    %rcx
ret

LLVM IR (-O0):
%struct.re_pattern_buffer = type { i32 }
%struct.re_registers = type { i32 }
define i32 @re_match(%struct.re_pattern_buffer* %0, i8* %1, i32 %2, i32 %3, %struct.re_registers* %4) {
%6 = alloca %struct.re_pattern_buffer*
%7 = alloca i8*
%8 = alloca i32
%9 = alloca i32
%10 = alloca %struct.re_registers*
%11 = alloca i32
store %struct.re_pattern_buffer* %0, %struct.re_pattern_buffer** %6
store i8* %1, i8** %7
store i32 %2, i32* %8
store i32 %3, i32* %9
store %struct.re_registers* %4, %struct.re_registers** %10
%12 = load %struct.re_pattern_buffer*, %struct.re_pattern_buffer** %6
%13 = load i8*, i8** %7
%14 = load i32, i32* %8
%15 = load i32, i32* %9
%16 = load %struct.re_registers*, %struct.re_registers** %10
%17 = load i32, i32* %8
%18 = call i32 @re_match_2_internal(%struct.re_pattern_buffer* %12, i8* null, i32 0, i8* %13, i32 %14, i32 %15, %struct.re_registers* %16, i32 %17)
store i32 %18, i32* %11
%19 = load i32, i32* %11
ret i32 %19
}

LLVM IR (-O2):
%struct.re_pattern_buffer = type { i32 }
%struct.re_registers = type { i32 }
define i32 @re_match(%struct.re_pattern_buffer* %0, i8* %1, i32 %2, i32 %3, %struct.re_registers* %4) {
%6 = tail call i32 @re_match_2_internal(%struct.re_pattern_buffer* %0, i8* null, i32 0, i8* %1, i32 %2, i32 %3, %struct.re_registers* %4, i32 %2)
ret i32 %6
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void modify_booking() { printf("Modyfikowanie rezerwacji\n"); }


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

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

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

LLVM IR (-O2):
@str = [25 x i8] c"Modyfikowanie rezerwacji\00"
define void @modify_booking() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([25 x i8], [25 x i8]* @str, i64 0, i64 0))
ret void
}
int drive_step(int seek_speed, int steps, int update_cyl, int err_fatal) {
  return 0;
}


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

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

LLVM IR (-O0):
define i32 @drive_step(i32 %0, i32 %1, i32 %2, i32 %3) {
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
store i32 %0, i32* %5
store i32 %1, i32* %6
store i32 %2, i32* %7
store i32 %3, i32* %8
ret i32 0
}

LLVM IR (-O2):
define i32 @drive_step(i32 %0, i32 %1, i32 %2, i32 %3) {
ret i32 0
}
/* Type definitions */
typedef int /*<<< orphan*/ uint8_t;

/* Variables and functions */
int /*<<< orphan*/ p264_pixel_avg_weight_w8_mmxext(int /*<<< orphan*/ *, int,
                                                   int /*<<< orphan*/ *, int,
                                                   int, int);
void p264_pixel_avg_weight_8x8_mmxext(uint8_t *dst, int i_dst, uint8_t *src,
                                      int i_src, int i_weight_dst) {
  p264_pixel_avg_weight_w8_mmxext(dst, i_dst, src, i_src, i_weight_dst, 8);
}


x86 assembly (clang, -O0):
<p264_pixel_avg_weight_8x8_mmxext>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %ecx,-0x1c(%rbp)
mov    %r8d,-0x20(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
mov    -0x18(%rbp),%rdx
mov    -0x1c(%rbp),%ecx
mov    -0x20(%rbp),%r8d
mov    $0x8,%r9d
call   1030 <p264_pixel_avg_weight_w8_mmxext@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<p264_pixel_avg_weight_8x8_mmxext>:
mov    $0x8,%r9d
jmp    1030 <p264_pixel_avg_weight_w8_mmxext@plt>

LLVM IR (-O0):
define void @p264_pixel_avg_weight_8x8_mmxext(i32* %0, i32 %1, i32* %2, i32 %3, i32 %4) {
%6 = alloca i32*
%7 = alloca i32
%8 = alloca i32*
%9 = alloca i32
%10 = alloca i32
store i32* %0, i32** %6
store i32 %1, i32* %7
store i32* %2, i32** %8
store i32 %3, i32* %9
store i32 %4, i32* %10
%11 = load i32*, i32** %6
%12 = load i32, i32* %7
%13 = load i32*, i32** %8
%14 = load i32, i32* %9
%15 = load i32, i32* %10
%16 = call i32 @p264_pixel_avg_weight_w8_mmxext(i32* %11, i32 %12, i32* %13, i32 %14, i32 %15, i32 8)
ret void
}

LLVM IR (-O2):
define void @p264_pixel_avg_weight_8x8_mmxext(i32* %0, i32 %1, i32* %2, i32 %3, i32 %4) {
%6 = tail call i32 @p264_pixel_avg_weight_w8_mmxext(i32* %0, i32 %1, i32* %2, i32 %3, i32 %4, i32 8)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ isgraph(int);
void t_isgraph_0x04() {
  Assert_real((isgraph(4) == 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_isgraph.c",
              25, ("isgraph should be 0 for 0x04"));
}


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

x86 assembly (clang, -O2):
<t_isgraph_0x04>:
push   %rax
mov    $0x4,%edi
call   1040 <isgraph@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf66(%rip),%rcx
mov    $0x19,%edx
pop    %rax
jmp    1030 <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_isgraph.c\00"
@.str.1 = [29 x i8] c"isgraph should be 0 for 0x04\00"
define void @t_isgraph_0x04() {
%1 = call i64 @isgraph(i32 4)
%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 25, i8* getelementptr inbounds ([29 x i8], [29 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_isgraph.c\00"
@.str.1 = [29 x i8] c"isgraph should be 0 for 0x04\00"
define void @t_isgraph_0x04() {
%1 = tail call i64 @isgraph(i32 4)
%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 25, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, double);
int /*<<< orphan*/ scanf(char *, double *);
int main(int argc, char const *argv[]) {
  double r;
  scanf("%lf", &r);
  printf("Area = %.4lf\n", (3.14159 * r / 100 * r / 100));
  return 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)
lea    0xed3(%rip),%rdi
lea    -0x18(%rbp),%rsi
call   1040 <scanf@plt>
movsd  0xeba(%rip),%xmm0
mulsd  -0x18(%rbp),%xmm0
movsd  0xea5(%rip),%xmm1
divsd  %xmm1,%xmm0
mulsd  -0x18(%rbp),%xmm0
movsd  0xe94(%rip),%xmm1
divsd  %xmm1,%xmm0
lea    0xe9d(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xee8(%rip),%rdi
mov    %rsp,%rsi
call   1040 <scanf@plt>
movsd  (%rsp),%xmm1
movsd  0xec3(%rip),%xmm0
mulsd  %xmm1,%xmm0
movsd  0xebf(%rip),%xmm2
divsd  %xmm2,%xmm0
mulsd  %xmm1,%xmm0
divsd  %xmm2,%xmm0
lea    0xeb8(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [4 x i8] c"%lf\00"
@.str.1 = [14 x i8] c"Area = %.4lf\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca double
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%7 = call i32 @scanf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), double* %6)
%8 = load double, double* %6
%9 = fmul double 3.141590e+00, %8
%10 = fdiv double %9, 1.000000e+02
%11 = load double, double* %6
%12 = fmul double %10, %11
%13 = fdiv double %12, 1.000000e+02
%14 = call i32 @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.1, i64 0, i64 0), double %13)
ret i32 0
}

LLVM IR (-O2):
@.str = [4 x i8] c"%lf\00"
@.str.1 = [14 x i8] c"Area = %.4lf\0A\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = alloca double
%4 = bitcast double* %3 to i8*
%5 = call i32 @scanf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), double* %3)
%6 = load double, double* %3
%7 = fmul double %6, 3.141590e+00
%8 = fdiv double %7, 1.000000e+02
%9 = fmul double %6, %8
%10 = fdiv double %9, 1.000000e+02
%11 = call i32 @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.1, i64 0, i64 0), double %10)
ret i32 0
}
int s2e_close(int fd) {
  int res;
  __asm__ __volatile__(".byte 0x0f, 0x3f\n"
                       ".byte 0x00, 0xEE, 0x01, 0x00\n"
                       ".byte 0x00, 0x00, 0x00, 0x00\n"
                       : "=a"(res)
                       : "a"(-1), "b"(fd));
  return res;
}


x86 assembly (clang, -O0):
<s2e_close>:
push   %rbp
mov    %rsp,%rbp
push   %rbx
mov    %edi,-0xc(%rbp)
mov    -0xc(%rbp),%ebx
mov    $0xffffffff,%eax
(bad)
add    %ch,%dh
add    %eax,(%rax)
add    %al,(%rax)
add    %al,(%rax)
mov    %eax,-0x10(%rbp)
mov    -0x10(%rbp),%eax
pop    %rbx
pop    %rbp
ret

x86 assembly (clang, -O2):
<s2e_close>:
push   %rbx
mov    %edi,%ebx
mov    $0xffffffff,%eax
(bad)
add    %ch,%dh
add    %eax,(%rax)
add    %al,(%rax)
add    %al,(%rax)
pop    %rbx
ret

LLVM IR (-O0):
define i32 @s2e_close(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %2
%4 = load i32, i32* %2
%5 = call i32 asm sideeffect ".byte 0x0f, 0x3f\0A.byte 0x00, 0xEE, 0x01, 0x00\0A.byte 0x00, 0x00, 0x00, 0x00\0A", "={ax},{ax},{bx},~{dirflag},~{fpsr},~{flags}"(i32 -1, i32 %4)
store i32 %5, i32* %3
%6 = load i32, i32* %3
ret i32 %6
}

LLVM IR (-O2):
define i32 @s2e_close(i32 %0) {
%2 = tail call i32 asm sideeffect ".byte 0x0f, 0x3f\0A.byte 0x00, 0xEE, 0x01, 0x00\0A.byte 0x00, 0x00, 0x00, 0x00\0A", "={ax},{ax},{bx},~{dirflag},~{fpsr},~{flags}"(i32 -1, i32 %0)
ret i32 %2
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
hello() {
  printf("hello, world!\n");
  printf("I'm Panhainan.F\cO\n");
  printf("hello, world!\b");
}


x86 assembly (clang, -O0):
<hello>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    0xee1(%rip),%rdi
call   1030 <printf@plt>
lea    0xee4(%rip),%rdi
call   1030 <printf@plt>
lea    0xeeb(%rip),%rdi
call   1030 <printf@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<hello>:
push   %rax
lea    0xee7(%rip),%rdi
call   1030 <puts@plt>
lea    0xee9(%rip),%rdi
call   1030 <puts@plt>
lea    0xec0(%rip),%rdi
pop    %rax
jmp    1040 <printf@plt>

LLVM IR (-O0):
@.str = [15 x i8] c"hello, world!\0A\00"
@.str.1 = [19 x i8] c"I'm Panhainan.FcO\0A\00"
@.str.2 = [15 x i8] c"hello, world!\08\00"
define i32 @hello() {
%1 = alloca i32
%2 = call i32 @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0))
%3 = call i32 @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.1, i64 0, i64 0))
%4 = call i32 @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.2, i64 0, i64 0))
%5 = load i32, i32* %1
ret i32 %5
}

LLVM IR (-O2):
@.str.2 = [15 x i8] c"hello, world!\08\00"
@str = [14 x i8] c"hello, world!\00"
@str.3 = [18 x i8] c"I'm Panhainan.FcO\00"
define i32 @hello() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([14 x i8], [14 x i8]* @str, i64 0, i64 0))
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([18 x i8], [18 x i8]* @str.3, i64 0, i64 0))
%3 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([15 x i8], [15 x i8]* @.str.2, i64 0, i64 0))
ret i32 undef
}
void rsn_preauth_scan_results(struct wpa_sm *sm,
                              struct wpa_scan_results *results) {}


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

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

LLVM IR (-O0):
%struct.wpa_sm = type opaque
%struct.wpa_scan_results = type opaque
define void @rsn_preauth_scan_results(%struct.wpa_sm* %0, %struct.wpa_scan_results* %1) {
%3 = alloca %struct.wpa_sm*
%4 = alloca %struct.wpa_scan_results*
store %struct.wpa_sm* %0, %struct.wpa_sm** %3
store %struct.wpa_scan_results* %1, %struct.wpa_scan_results** %4
ret void
}

LLVM IR (-O2):
%struct.wpa_sm = type opaque
%struct.wpa_scan_results = type opaque
define void @rsn_preauth_scan_results(%struct.wpa_sm* nocapture %0, %struct.wpa_scan_results* nocapture %1) {
ret void
}
/* Type definitions */
struct list_head {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ __list_del_entry(struct list_head *);
int /*<<< orphan*/ list_add_u(struct list_head *, struct list_head *);
void list_move(struct list_head *list, struct list_head *head) {
  __list_del_entry(list);
  list_add_u(list, head);
}


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

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

LLVM IR (-O0):
%struct.list_head = type { i32 }
define void @list_move(%struct.list_head* %0, %struct.list_head* %1) {
%3 = alloca %struct.list_head*
%4 = alloca %struct.list_head*
store %struct.list_head* %0, %struct.list_head** %3
store %struct.list_head* %1, %struct.list_head** %4
%5 = load %struct.list_head*, %struct.list_head** %3
%6 = call i32 @__list_del_entry(%struct.list_head* %5)
%7 = load %struct.list_head*, %struct.list_head** %3
%8 = load %struct.list_head*, %struct.list_head** %4
%9 = call i32 @list_add_u(%struct.list_head* %7, %struct.list_head* %8)
ret void
}

LLVM IR (-O2):
%struct.list_head = type { i32 }
define void @list_move(%struct.list_head* %0, %struct.list_head* %1) {
%3 = tail call i32 @__list_del_entry(%struct.list_head* %0)
%4 = tail call i32 @list_add_u(%struct.list_head* %0, %struct.list_head* %1)
ret void
}
unsigned int convert32(unsigned int value, unsigned int format) {
  return (format & (1 << 2)) ? (((value) >> 24) | (((value)&0x00FF0000) >> 8) |
                                (((value)&0x0000FF00) << 8) | ((value) << 24))
                             : value;
}


x86 assembly (clang, -O0):
<convert32>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x8(%rbp),%eax
and    $0x4,%eax
cmp    $0x0,%eax
je     114b <convert32+0x4b>
mov    -0x4(%rbp),%eax
shr    $0x18,%eax
mov    -0x4(%rbp),%ecx
and    $0xff0000,%ecx
shr    $0x8,%ecx
or     %ecx,%eax
mov    -0x4(%rbp),%ecx
and    $0xff00,%ecx
shl    $0x8,%ecx
or     %ecx,%eax
mov    -0x4(%rbp),%ecx
shl    $0x18,%ecx
or     %ecx,%eax
mov    %eax,-0xc(%rbp)
jmp    1151 <convert32+0x51>
mov    -0x4(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<convert32>:
test   $0x4,%sil
mov    %edi,%eax
bswap  %eax
cmove  %edi,%eax
ret

LLVM IR (-O0):
define i32 @convert32(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%5 = load i32, i32* %4
%6 = and i32 %5, 4
%7 = icmp ne i32 %6, 0
br i1 %7, label %8, label %22
8: ; preds = %2
%9 = load i32, i32* %3
%10 = lshr i32 %9, 24
%11 = load i32, i32* %3
%12 = and i32 %11, 16711680
%13 = lshr i32 %12, 8
%14 = or i32 %10, %13
%15 = load i32, i32* %3
%16 = and i32 %15, 65280
%17 = shl i32 %16, 8
%18 = or i32 %14, %17
%19 = load i32, i32* %3
%20 = shl i32 %19, 24
%21 = or i32 %18, %20
br label %24
22: ; preds = %2
%23 = load i32, i32* %3
br label %24
24: ; preds = %22, %8
%25 = phi i32 [ %21, %8 ], [ %23, %22 ]
ret i32 %25
}

LLVM IR (-O2):
define i32 @convert32(i32 %0, i32 %1) {
%3 = and i32 %1, 4
%4 = icmp eq i32 %3, 0
%5 = tail call i32 @llvm.bswap.i32(i32 %0)
%6 = select i1 %4, i32 %0, i32 %5
ret i32 %6
}
int string_expand(int x) { return (((x) + (4) - 1) & ~((4) - 1)); }


x86 assembly (clang, -O0):
<string_expand>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x4,%eax
sub    $0x1,%eax
and    $0xfffffffc,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<string_expand>:
lea    0x3(%rdi),%eax
and    $0xfffffffc,%eax
ret

LLVM IR (-O0):
define i32 @string_expand(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = add nsw i32 %3, 4
%5 = sub nsw i32 %4, 1
%6 = and i32 %5, -4
ret i32 %6
}

LLVM IR (-O2):
define i32 @string_expand(i32 %0) {
%2 = add nsw i32 %0, 3
%3 = and i32 %2, -4
ret i32 %3
}