xunge/DecIR huggingface dataset:
/* Variables and functions */
int d14(int);
int d15(int a) { return d14(d14(a)); }


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

x86 assembly (clang, -O2):
<d15>:
push   %rax
call   1030 <d14@plt>
mov    %eax,%edi
pop    %rax
jmp    1030 <d14@plt>

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

LLVM IR (-O2):
define i32 @d15(i32 %0) {
%2 = tail call i32 @d14(i32 %0)
%3 = tail call i32 @d14(i32 %2)
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int, int);
int main(int argc, char *argv[]) {
  int i = 0;
  int *p = &i;
  while (1) {
    i++;
    p++;
    printf("%d:%d\n", i, *p);
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
lea    -0x14(%rbp),%rax
mov    %rax,-0x20(%rbp)
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x2c(%rbp)
mov    %eax,-0x14(%rbp)
mov    -0x20(%rbp),%rax
add    $0x4,%rax
mov    %rax,-0x28(%rbp)
mov    %rax,-0x20(%rbp)
mov    -0x14(%rbp),%esi
mov    -0x20(%rbp),%rax
mov    (%rax),%edx
lea    0xe9f(%rip),%rdi
call   1030 <printf@plt>
jmp    1135 <main+0x25>

x86 assembly (clang, -O2):
<main>:
push   %r14
push   %rbx
push   %rax
mov    $0x1,%ebx
lea    0xee0(%rip),%r14
mov    %ebx,0x4(%rsp)
mov    0x4(%rsp,%rbx,4),%edx
mov    %r14,%rdi
mov    %ebx,%esi
call   1030 <printf@plt>
add    $0x1,%rbx
jmp    1120 <main+0x10>

LLVM IR (-O0):
@.str = [7 x i8] c"%d:%d\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i32
%7 = alloca i32*
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
store i32 0, i32* %6
store i32* %6, i32** %7
br label %8
8: ; preds = %2, %8
%9 = load i32, i32* %6
%10 = add nsw i32 %9, 1
store i32 %10, i32* %6
%11 = load i32*, i32** %7
%12 = getelementptr inbounds i32, i32* %11, i32 1
store i32* %12, i32** %7
%13 = load i32, i32* %6
%14 = load i32*, i32** %7
%15 = load i32, i32* %14
%16 = call i32 @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i32 %13, i32 %15)
br label %8
}

LLVM IR (-O2):
@.str = [7 x i8] c"%d:%d\0A\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = alloca i32
%4 = bitcast i32* %3 to i8*
br label %5
5: ; preds = %5, %2
%6 = phi i32 [ 0, %2 ], [ %8, %5 ]
%7 = phi i32* [ %3, %2 ], [ %9, %5 ]
%8 = add nuw nsw i32 %6, 1
store i32 %8, i32* %3
%9 = getelementptr inbounds i32, i32* %7, i64 1
%10 = load i32, i32* %9
%11 = tail call i32 @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i32 %8, i32 %10)
br label %5
}
int sdps_fill_write_reg(unsigned char *buf, unsigned addr, unsigned cnt) {
  return 0;
}


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

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

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

LLVM IR (-O2):
define i32 @sdps_fill_write_reg(i8* nocapture readnone %0, i32 %1, i32 %2) {
ret i32 0
}
/* Type definitions */
struct btf_type {
  int dummy;
};

/* Variables and functions */
scalar_t__ BTF_KIND_RESTRICT;
scalar_t__ btf_kind(struct btf_type const *);
bool btf_is_restrict(const struct btf_type *t) {
  return btf_kind(t) == BTF_KIND_RESTRICT;
}


x86 assembly (clang, -O0):
<btf_is_restrict>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <btf_kind@plt>
mov    0x2eb4(%rip),%rcx
cmp    (%rcx),%rax
sete   %al
and    $0x1,%al
movzbl %al,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<btf_is_restrict>:
push   %rax
call   1030 <btf_kind@plt>
mov    0x2ec3(%rip),%rdx
xor    %ecx,%ecx
cmp    (%rdx),%rax
sete   %cl
mov    %ecx,%eax
pop    %rcx
ret

LLVM IR (-O0):
%struct.btf_type = type { i32 }
@BTF_KIND_RESTRICT = global i64 0
define i32 @btf_is_restrict(%struct.btf_type* %0) {
%2 = alloca %struct.btf_type*
store %struct.btf_type* %0, %struct.btf_type** %2
%3 = load %struct.btf_type*, %struct.btf_type** %2
%4 = call i64 @btf_kind(%struct.btf_type* %3)
%5 = load i64, i64* @BTF_KIND_RESTRICT
%6 = icmp eq i64 %4, %5
%7 = zext i1 %6 to i32
ret i32 %7
}

LLVM IR (-O2):
%struct.btf_type = type { i32 }
@BTF_KIND_RESTRICT = global i64 0
define i32 @btf_is_restrict(%struct.btf_type* %0) {
%2 = tail call i64 @btf_kind(%struct.btf_type* %0)
%3 = load i64, i64* @BTF_KIND_RESTRICT
%4 = icmp eq i64 %2, %3
%5 = zext i1 %4 to i32
ret i32 %5
}
int simple_repeat(int a) { return a; }


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

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

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

LLVM IR (-O2):
define i32 @simple_repeat(i32 returned %0) {
ret i32 %0
}
/* Variables and functions */
int /*<<< orphan*/ two_complement(char *);
void op_neg_a(char rega[], char regb[], char accumulator[], char flags[]) {
  two_complement(rega);
}


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

x86 assembly (clang, -O2):
<op_neg_a>:
jmp    1030 <two_complement@plt>

LLVM IR (-O0):
define void @op_neg_a(i8* %0, i8* %1, i8* %2, i8* %3) {
%5 = alloca i8*
%6 = alloca i8*
%7 = alloca i8*
%8 = alloca i8*
store i8* %0, i8** %5
store i8* %1, i8** %6
store i8* %2, i8** %7
store i8* %3, i8** %8
%9 = load i8*, i8** %5
%10 = call i32 @two_complement(i8* %9)
ret void
}

LLVM IR (-O2):
define void @op_neg_a(i8* %0, i8* nocapture readnone %1, i8* nocapture readnone %2, i8* nocapture readnone %3) {
%5 = tail call i32 @two_complement(i8* %0)
ret void
}
float logf(float x) { return 0.0; }


x86 assembly (clang, -O0):
<logf>:
push   %rbp
mov    %rsp,%rbp
movss  %xmm0,-0x4(%rbp)
xorps  %xmm0,%xmm0
pop    %rbp
ret

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

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

LLVM IR (-O2):
define float @logf(float %0) {
ret float 0.000000e+00
}
/* Variables and functions */
int /*<<< orphan*/ CounterUpperLower(char *, int, int *, int *);
int /*<<< orphan*/ printf(char *, int, int);
int main(void) {
  char arr[5] = {'c', 'H', 'A', '/', '*'};
  int CounterUpper = 0, CounterLower = 0;
  CounterUpperLower(arr, 5, &CounterUpper, &CounterLower);
  printf("the number of odd uppercases in the array is %d, and lowercases %d\n",
         CounterUpper, CounterLower);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    0xecb(%rip),%eax
mov    %eax,-0x9(%rbp)
mov    0xec6(%rip),%al
mov    %al,-0x5(%rbp)
movl   $0x0,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
lea    -0x9(%rbp),%rdi
mov    $0x5,%esi
lea    -0x10(%rbp),%rdx
lea    -0x14(%rbp),%rcx
call   1040 <CounterUpperLower@plt>
mov    -0x10(%rbp),%esi
mov    -0x14(%rbp),%edx
lea    0xe93(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
sub    $0x18,%rsp
movb   $0x2a,0x14(%rsp)
movl   $0x2f414863,0x10(%rsp)
2f
movl   $0x0,0xc(%rsp)
movl   $0x0,0x8(%rsp)
lea    0x10(%rsp),%rdi
lea    0xc(%rsp),%rdx
lea    0x8(%rsp),%rcx
mov    $0x5,%esi
call   1040 <CounterUpperLower@plt>
mov    0xc(%rsp),%esi
mov    0x8(%rsp),%edx
lea    0xe9c(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x18,%rsp
ret

LLVM IR (-O0):
@__const.main.arr = [5 x i8] c"cHA/*"
@.str = [68 x i8] c"the number of odd uppercases in the array is %d, and lowercases %d\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca [5 x i8]
%3 = alloca i32
%4 = alloca i32
store i32 0, i32* %1
%5 = bitcast [5 x i8]* %2 to i8*
store i32 0, i32* %3
store i32 0, i32* %4
%6 = getelementptr inbounds [5 x i8], [5 x i8]* %2, i64 0, i64 0
%7 = call i32 @CounterUpperLower(i8* %6, i32 5, i32* %3, i32* %4)
%8 = load i32, i32* %3
%9 = load i32, i32* %4
%10 = call i32 @printf(i8* getelementptr inbounds ([68 x i8], [68 x i8]* @.str, i64 0, i64 0), i32 %8, i32 %9)
ret i32 0
}

LLVM IR (-O2):
@__const.main.arr = [5 x i8] c"cHA/*"
@.str = [68 x i8] c"the number of odd uppercases in the array is %d, and lowercases %d\0A\00"
define i32 @main() {
%1 = alloca [5 x i8]
%2 = alloca i32
%3 = alloca i32
%4 = getelementptr inbounds [5 x i8], [5 x i8]* %1, i64 0, i64 0
%5 = bitcast i32* %2 to i8*
store i32 0, i32* %2
%6 = bitcast i32* %3 to i8*
store i32 0, i32* %3
%7 = call i32 @CounterUpperLower(i8* %4, i32 5, i32* %2, i32* %3)
%8 = load i32, i32* %2
%9 = load i32, i32* %3
%10 = call i32 @printf(i8* getelementptr inbounds ([68 x i8], [68 x i8]* @.str, i64 0, i64 0), i32 %8, i32 %9)
ret i32 0
}
int YWTRACE_Init(void) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @YWTRACE_Init() {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ Done(int /*<<< orphan*/);
void DoneQuit() { Done(0); }


x86 assembly (clang, -O0):
<DoneQuit>:
push   %rbp
mov    %rsp,%rbp
xor    %edi,%edi
call   1030 <Done@plt>
pop    %rbp
ret

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

LLVM IR (-O0):
define void @DoneQuit() {
%1 = call i32 @Done(i32 0)
ret void
}

LLVM IR (-O2):
define void @DoneQuit() {
%1 = tail call i32 @Done(i32 0)
ret void
}
/* Type definitions */
typedef int __le16;

/* Variables and functions */
int cpu_to_le16(int);
int ieee80211_has_retry(__le16 fc) { return (fc & cpu_to_le16(0x0800)) != 0; }


x86 assembly (clang, -O0):
<ieee80211_has_retry>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
mov    %eax,-0x8(%rbp)
mov    $0x800,%edi
call   1030 <cpu_to_le16@plt>
mov    %eax,%ecx
mov    -0x8(%rbp),%eax
and    %ecx,%eax
cmp    $0x0,%eax
setne  %al
and    $0x1,%al
movzbl %al,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ieee80211_has_retry>:
push   %rbx
mov    %edi,%ebx
mov    $0x800,%edi
call   1030 <cpu_to_le16@plt>
xor    %ecx,%ecx
test   %ebx,%eax
setne  %cl
mov    %ecx,%eax
pop    %rbx
ret

LLVM IR (-O0):
define i32 @ieee80211_has_retry(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = call i32 @cpu_to_le16(i32 2048)
%5 = and i32 %3, %4
%6 = icmp ne i32 %5, 0
%7 = zext i1 %6 to i32
ret i32 %7
}

LLVM IR (-O2):
define i32 @ieee80211_has_retry(i32 %0) {
%2 = tail call i32 @cpu_to_le16(i32 2048)
%3 = and i32 %2, %0
%4 = icmp ne i32 %3, 0
%5 = zext i1 %4 to i32
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
int /*<<< orphan*/ stderr;
void version(void) {
  fprintf(stderr, "undupfs-debug version 0.1 (2013-06-29)\n");
  exit(0);
}


x86 assembly (clang, -O0):
<version>:
push   %rbp
mov    %rsp,%rbp
mov    0x2eb5(%rip),%rax
mov    (%rax),%edi
lea    0xecc(%rip),%rsi
call   1030 <fprintf@plt>
xor    %edi,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<version>:
push   %rax
mov    0x2eb8(%rip),%rax
mov    (%rax),%edi
lea    0xecf(%rip),%rsi
call   1030 <fprintf@plt>
xor    %edi,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [40 x i8] c"undupfs-debug version 0.1 (2013-06-29)\0A\00"
define void @version() {
%1 = load i32, i32* @stderr
%2 = call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str, i64 0, i64 0))
%3 = call i32 @exit(i32 0)
unreachable
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [40 x i8] c"undupfs-debug version 0.1 (2013-06-29)\0A\00"
define void @version() {
%1 = load i32, i32* @stderr
%2 = tail call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str, i64 0, i64 0))
%3 = tail call i32 @exit(i32 0)
unreachable
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int pa_reset_sigs() {
  printf("NOT IMPLEMENTED:"
         "pa_reset_sigs"
         "\n");
}


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

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

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

LLVM IR (-O2):
@str = [30 x i8] c"NOT IMPLEMENTED:pa_reset_sigs\00"
define i32 @pa_reset_sigs() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([30 x i8], [30 x i8]* @str, i64 0, i64 0))
ret i32 undef
}
/* Variables and functions */
int /*<<< orphan*/ IOMEM(int);
int __raw_readb(int /*<<< orphan*/);
int is_max197_installed(void) {
  return !!(__raw_readb(IOMEM(0xfebfe000)) & 0x01);
}


x86 assembly (clang, -O0):
<is_max197_installed>:
push   %rbp
mov    %rsp,%rbp
mov    $0xfebfe000,%edi
call   1040 <IOMEM@plt>
mov    %eax,%edi
call   1030 <__raw_readb@plt>
and    $0x1,%eax
cmp    $0x0,%eax
setne  %al
xor    $0xff,%al
xor    $0xff,%al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<is_max197_installed>:
push   %rax
mov    $0xfebfe000,%edi
call   1040 <IOMEM@plt>
mov    %eax,%edi
call   1030 <__raw_readb@plt>
and    $0x1,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @is_max197_installed() {
%1 = call i32 @IOMEM(i32 -20979712)
%2 = call i32 @__raw_readb(i32 %1)
%3 = and i32 %2, 1
%4 = icmp ne i32 %3, 0
%5 = xor i1 %4, true
%6 = xor i1 %5, true
%7 = zext i1 %6 to i32
ret i32 %7
}

LLVM IR (-O2):
define i32 @is_max197_installed() {
%1 = tail call i32 @IOMEM(i32 -20979712)
%2 = tail call i32 @__raw_readb(i32 %1)
%3 = and i32 %2, 1
ret i32 %3
}
void jit_flush(void *fptr, void *tptr) {}


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

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

LLVM IR (-O0):
define void @jit_flush(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
store i8* %0, i8** %3
store i8* %1, i8** %4
ret void
}

LLVM IR (-O2):
define void @jit_flush(i8* nocapture %0, i8* nocapture %1) {
ret void
}
int ft_isalpha(int c) {
  if (((c < 'A') || (c > 'Z')) && ((c < 'a') || (c > 'z')))
    return (0);
  else
    return (1);
}


x86 assembly (clang, -O0):
<ft_isalpha>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
cmpl   $0x41,-0x8(%rbp)
jl     111b <ft_isalpha+0x1b>
cmpl   $0x5a,-0x8(%rbp)
jle    113b <ft_isalpha+0x3b>
cmpl   $0x61,-0x8(%rbp)
jl     112f <ft_isalpha+0x2f>
cmpl   $0x7a,-0x8(%rbp)
jle    113b <ft_isalpha+0x3b>
movl   $0x0,-0x4(%rbp)
jmp    1142 <ft_isalpha+0x42>
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<ft_isalpha>:
and    $0xffffffdf,%edi
add    $0xffffffbf,%edi
xor    %eax,%eax
cmp    $0x1a,%edi
setb   %al
ret

LLVM IR (-O0):
define i32 @ft_isalpha(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %3
%4 = load i32, i32* %3
%5 = icmp slt i32 %4, 65
br i1 %5, label %9, label %6
6: ; preds = %1
%7 = load i32, i32* %3
%8 = icmp sgt i32 %7, 90
br i1 %8, label %9, label %16
9: ; preds = %6, %1
%10 = load i32, i32* %3
%11 = icmp slt i32 %10, 97
br i1 %11, label %15, label %12
12: ; preds = %9
%13 = load i32, i32* %3
%14 = icmp sgt i32 %13, 122
br i1 %14, label %15, label %16
15: ; preds = %12, %9
store i32 0, i32* %2
br label %17
16: ; preds = %12, %6
store i32 1, i32* %2
br label %17
17: ; preds = %16, %15
%18 = load i32, i32* %2
ret i32 %18
}

LLVM IR (-O2):
define i32 @ft_isalpha(i32 %0) {
%2 = and i32 %0, -33
%3 = add i32 %2, -65
%4 = icmp ult i32 %3, 26
%5 = zext i1 %4 to i32
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ isgraph(int);
void t_isgraph_0xba() {
  Assert_real((isgraph(186) == 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",
              935, ("isgraph should be 0 for 0xba"));
}


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

x86 assembly (clang, -O2):
<t_isgraph_0xba>:
push   %rax
mov    $0xba,%edi
call   1040 <isgraph@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf66(%rip),%rcx
mov    $0x3a7,%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 0xba\00"
define void @t_isgraph_0xba() {
%1 = call i64 @isgraph(i32 186)
%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 935, 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 0xba\00"
define void @t_isgraph_0xba() {
%1 = tail call i64 @isgraph(i32 186)
%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 935, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0))
ret void
}
void initPPP(void) {}


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

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

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

LLVM IR (-O2):
define void @initPPP() {
ret void
}
unsigned char core___core__Byte____62d_62d(unsigned char self, long p0) {
  unsigned char var;
  unsigned char var1;
  var1 = self >> p0;
  var = var1;
  goto RET_LABEL;
RET_LABEL:;
  return var;
}


x86 assembly (clang, -O0):
<core___core__Byte____62d_62d>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x1(%rbp)
mov    %rsi,-0x10(%rbp)
movzbl -0x1(%rbp),%eax
mov    -0x10(%rbp),%rcx
sar    %cl,%eax
mov    %al,-0x12(%rbp)
mov    -0x12(%rbp),%al
mov    %al,-0x11(%rbp)
movzbl -0x11(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<core___core__Byte____62d_62d>:
mov    %rsi,%rcx
mov    %edi,%eax
shr    %cl,%eax
ret

LLVM IR (-O0):
define zeroext i8 @core___core__Byte____62d_62d(i8 zeroext %0, i64 %1) {
%3 = alloca i8
%4 = alloca i64
%5 = alloca i8
%6 = alloca i8
store i8 %0, i8* %3
store i64 %1, i64* %4
%7 = load i8, i8* %3
%8 = zext i8 %7 to i32
%9 = load i64, i64* %4
%10 = trunc i64 %9 to i32
%11 = ashr i32 %8, %10
%12 = trunc i32 %11 to i8
store i8 %12, i8* %6
%13 = load i8, i8* %6
store i8 %13, i8* %5
br label %14
14: ; preds = %2
%15 = load i8, i8* %5
ret i8 %15
}

LLVM IR (-O2):
define zeroext i8 @core___core__Byte____62d_62d(i8 zeroext %0, i64 %1) {
%3 = zext i8 %0 to i32
%4 = trunc i64 %1 to i32
%5 = lshr i32 %3, %4
%6 = trunc i32 %5 to i8
ret i8 %6
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void help(void) {
  printf("'h'   - help\n");
  printf("'s'   - toggle single step mode\n");
}


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

x86 assembly (clang, -O2):
<help>:
push   %rax
lea    0xee8(%rip),%rdi
call   1030 <puts@plt>
lea    0xee9(%rip),%rdi
pop    %rax
jmp    1030 <puts@plt>

LLVM IR (-O0):
@.str = [14 x i8] c"'h' - help\0A\00"
@.str.1 = [33 x i8] c"'s' - toggle single step mode\0A\00"
define void @help() {
%1 = call i32 @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0))
%2 = call i32 @printf(i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@str = [13 x i8] c"'h' - help\00"
@str.2 = [32 x i8] c"'s' - toggle single step mode\00"
define void @help() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([13 x i8], [13 x i8]* @str, i64 0, i64 0))
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([32 x i8], [32 x i8]* @str.2, i64 0, i64 0))
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ uint8_t;
typedef int /*<<< orphan*/ uint64_t;

/* Variables and functions */
int /*<<< orphan*/ crc64_iso_refl_base(int /*<<< orphan*/,
                                       int /*<<< orphan*/ const *,
                                       int /*<<< orphan*/);
uint64_t crc64_iso_refl(uint64_t seed, const uint8_t *buf, uint64_t len) {
  return crc64_iso_refl_base(seed, buf, len);
}


x86 assembly (clang, -O0):
<crc64_iso_refl>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x10(%rbp),%rsi
mov    -0x14(%rbp),%edx
call   1030 <crc64_iso_refl_base@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<crc64_iso_refl>:
jmp    1030 <crc64_iso_refl_base@plt>

LLVM IR (-O0):
define i32 @crc64_iso_refl(i32 %0, i32* %1, i32 %2) {
%4 = alloca i32
%5 = alloca i32*
%6 = alloca i32
store i32 %0, i32* %4
store i32* %1, i32** %5
store i32 %2, i32* %6
%7 = load i32, i32* %4
%8 = load i32*, i32** %5
%9 = load i32, i32* %6
%10 = call i32 @crc64_iso_refl_base(i32 %7, i32* %8, i32 %9)
ret i32 %10
}

LLVM IR (-O2):
define i32 @crc64_iso_refl(i32 %0, i32* %1, i32 %2) {
%4 = tail call i32 @crc64_iso_refl_base(i32 %0, i32* %1, i32 %2)
ret i32 %4
}
/* Variables and functions */
int EVP_DigestUpdate(void *, unsigned char const *, size_t);
int digest_update_fn(void *ctx, const unsigned char *buf, size_t buflen) {
  return EVP_DigestUpdate(ctx, buf, buflen);
}


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

x86 assembly (clang, -O2):
<digest_update_fn>:
jmp    1030 <EVP_DigestUpdate@plt>

LLVM IR (-O0):
define i32 @digest_update_fn(i8* %0, i8* %1, i64 %2) {
%4 = alloca i8*
%5 = alloca i8*
%6 = alloca i64
store i8* %0, i8** %4
store i8* %1, i8** %5
store i64 %2, i64* %6
%7 = load i8*, i8** %4
%8 = load i8*, i8** %5
%9 = load i64, i64* %6
%10 = call i32 @EVP_DigestUpdate(i8* %7, i8* %8, i64 %9)
ret i32 %10
}

LLVM IR (-O2):
define i32 @digest_update_fn(i8* %0, i8* %1, i64 %2) {
%4 = tail call i32 @EVP_DigestUpdate(i8* %0, i8* %1, i64 %2)
ret i32 %4
}
/* Variables and functions */
int libfoo_add(int, int);
int /*<<< orphan*/ printf(char *, int);
int main(void) {
  printf("10 + 2 = %d\n", libfoo_add(10, 2));
  return 0;
}


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

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    $0xa,%edi
mov    $0x2,%esi
call   1040 <libfoo_add@plt>
lea    0xec9(%rip),%rdi
mov    %eax,%esi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [13 x i8] c"10 + 2 = %d\0A\00"
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 @libfoo_add(i32 10, i32 2)
%3 = call i32 @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0), i32 %2)
ret i32 0
}

LLVM IR (-O2):
@.str = [13 x i8] c"10 + 2 = %d\0A\00"
define i32 @main() {
%1 = tail call i32 @libfoo_add(i32 10, i32 2)
%2 = tail call i32 @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0), i32 %1)
ret i32 0
}
void SIO1_writeData16(unsigned short val) {}


x86 assembly (clang, -O0):
<SIO1_writeData16>:
push   %rbp
mov    %rsp,%rbp
mov    %di,%ax
mov    %ax,-0x2(%rbp)
pop    %rbp
ret

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

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

LLVM IR (-O2):
define void @SIO1_writeData16(i16 zeroext %0) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ esc(char *);
void decswl(void) { esc("#5"); }


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

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

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

LLVM IR (-O2):
@.str = [3 x i8] c"\00"
define void @decswl() {
%1 = tail call i32 @esc(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0))
ret void
}
void sysedp_lite_throttle(unsigned int power) {}


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

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

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

LLVM IR (-O2):
define void @sysedp_lite_throttle(i32 %0) {
ret void
}
void thread_print(void *arg_ptr) {
  printf(1, "Printing thread: pid %d\n", getpid());
  texit();
}


x86 assembly (clang, -O0):
<thread_print>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    $0x0,%al
call   1030 <getpid@plt>
mov    %eax,%edx
mov    $0x1,%edi
lea    0xeaf(%rip),%rsi
mov    $0x0,%al
call   1040 <printf@plt>
mov    $0x0,%al
call   1050 <texit@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<thread_print>:
push   %rax
xor    %eax,%eax
call   1030 <getpid@plt>
lea    0xec1(%rip),%rsi
mov    $0x1,%edi
mov    %eax,%edx
xor    %eax,%eax
call   1040 <printf@plt>
xor    %eax,%eax
pop    %rcx
jmp    1050 <texit@plt>

LLVM IR (-O0):
@.str = [25 x i8] c"Printing thread: pid %d\0A\00"
define void @thread_print(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = call i32 (...) @getpid()
%4 = call i32 (i8*, ...) @printf(i8* inttoptr (i64 1 to i8*), i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str, i64 0, i64 0), i32 %3)
%5 = call i32 (...) @texit()
ret void
}

LLVM IR (-O2):
@.str = [25 x i8] c"Printing thread: pid %d\0A\00"
define void @thread_print(i8* nocapture readnone %0) {
%2 = tail call i32 (...) @getpid()
%3 = tail call i32 (i8*, ...) @printf(i8* inttoptr (i64 1 to i8*), i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str, i64 0, i64 0), i32 %2)
%4 = tail call i32 (...) @texit()
ret void
}
/* Variables and functions */
scalar_t__ malloc(scalar_t__);
int /*<<< orphan*/ strcpy(char *, char const *);
scalar_t__ strlen(char const *);
char *savestring(const char *arg) {
  char *tmp = (char *)malloc(strlen(arg) + 1);
  strcpy(tmp, arg);
  return (tmp);
}


x86 assembly (clang, -O0):
<savestring>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <strlen@plt>
mov    %rax,%rdi
add    $0x1,%rdi
call   1050 <malloc@plt>
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x8(%rbp),%rsi
call   1030 <strcpy@plt>
mov    -0x10(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<savestring>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%r14
call   1040 <strlen@plt>
lea    0x1(%rax),%rdi
call   1050 <malloc@plt>
mov    %rax,%rbx
mov    %rax,%rdi
mov    %r14,%rsi
call   1030 <strcpy@plt>
mov    %rbx,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

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

LLVM IR (-O2):
define i8* @savestring(i8* %0) {
%2 = tail call i64 @strlen(i8* dereferenceable(1) %0)
%3 = add nsw i64 %2, 1
%4 = tail call i64 @malloc(i64 %3)
%5 = inttoptr i64 %4 to i8*
%6 = tail call i32 @strcpy(i8* %5, i8* %0)
ret i8* %5
}
/* Type definitions */
typedef int /*<<< orphan*/ jmp_buf;

/* Variables and functions */
int /*<<< orphan*/ assert(int /*<<< orphan*/);
int /*<<< orphan*/ longjmp(int /*<<< orphan*/, int);
int pop_error(jmp_buf *env, size_t len) {
  assert(env != NULL);
  longjmp(*env, 1);
}


x86 assembly (clang, -O0):
<pop_error>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
cmpq   $0x0,-0x8(%rbp)
setne  %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <assert@plt>
mov    -0x8(%rbp),%rax
mov    (%rax),%edi
mov    $0x1,%esi
call   1040 <longjmp@plt>

x86 assembly (clang, -O2):
<pop_error>:
push   %rbx
mov    %rdi,%rbx
xor    %edi,%edi
test   %rbx,%rbx
setne  %dil
call   1030 <assert@plt>
mov    (%rbx),%edi
mov    $0x1,%esi
call   1040 <longjmp@plt>

LLVM IR (-O0):
define i32 @pop_error(i32* %0, i64 %1) {
%3 = alloca i32*
%4 = alloca i64
store i32* %0, i32** %3
store i64 %1, i64* %4
%5 = load i32*, i32** %3
%6 = icmp ne i32* %5, null
%7 = zext i1 %6 to i32
%8 = call i32 @assert(i32 %7)
%9 = load i32*, i32** %3
%10 = load i32, i32* %9
%11 = call i32 @longjmp(i32 %10, i32 1)
unreachable
}

LLVM IR (-O2):
define i32 @pop_error(i32* %0, i64 %1) {
%3 = icmp ne i32* %0, null
%4 = zext i1 %3 to i32
%5 = tail call i32 @assert(i32 %4)
%6 = load i32, i32* %0
%7 = tail call i32 @longjmp(i32 %6, i32 1)
unreachable
}
/* Type definitions */
typedef int uint32_t;

/* Variables and functions */
bool is_branch(uint32_t insn) {
  uint32_t insn_base = insn & 0xfc000000;
  if (insn_base == 0x40000000)
    return true;
  return false;
}


x86 assembly (clang, -O0):
<is_branch>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
mov    -0x8(%rbp),%eax
and    $0xfc000000,%eax
mov    %eax,-0xc(%rbp)
cmpl   $0x40000000,-0xc(%rbp)
jne    112b <is_branch+0x2b>
movl   $0x1,-0x4(%rbp)
jmp    1132 <is_branch+0x32>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<is_branch>:
and    $0xfc000000,%edi
xor    %eax,%eax
cmp    $0x40000000,%edi
sete   %al
ret

LLVM IR (-O0):
define i32 @is_branch(i32 %0) {
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %3
%5 = load i32, i32* %3
%6 = and i32 %5, -67108864
store i32 %6, i32* %4
%7 = load i32, i32* %4
%8 = icmp eq i32 %7, 1073741824
br i1 %8, label %9, label %10
9: ; preds = %1
store i32 1, i32* %2
br label %11
10: ; preds = %1
store i32 0, i32* %2
br label %11
11: ; preds = %10, %9
%12 = load i32, i32* %2
ret i32 %12
}

LLVM IR (-O2):
define i32 @is_branch(i32 %0) {
%2 = and i32 %0, -67108864
%3 = icmp eq i32 %2, 1073741824
%4 = zext i1 %3 to i32
ret i32 %4
}
void av_div_i() {}


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

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

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

LLVM IR (-O2):
define void @av_div_i() {
ret void
}
void uart_outputchar(char c) {
  volatile char *uart_cout = (char *)0xFFFF0008;
  volatile char *uart_dout = (char *)0xFFFF000C;
  while (*uart_cout != 0)
    ;
  *uart_dout = c;
}


x86 assembly (clang, -O0):
<uart_outputchar>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x1(%rbp)
mov    $0xffff0008,%eax
mov    %rax,-0x10(%rbp)
mov    $0xffff000c,%eax
mov    %rax,-0x18(%rbp)
mov    -0x10(%rbp),%rax
mov    (%rax),%al
movsbl %al,%eax
cmp    $0x0,%eax
je     1133 <uart_outputchar+0x33>
jmp    111c <uart_outputchar+0x1c>
mov    -0x1(%rbp),%cl
mov    -0x18(%rbp),%rax
mov    %cl,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<uart_outputchar>:
mov    $0xffff0008,%eax
cs nopw 0x0(%rax,%rax,1)
nop
cmpb   $0x0,(%rax)
jne    1110 <uart_outputchar+0x10>
mov    %dil,0x4(%rax)
ret

LLVM IR (-O0):
define void @uart_outputchar(i8 signext %0) {
%2 = alloca i8
%3 = alloca i8*
%4 = alloca i8*
store i8 %0, i8* %2
store i8* inttoptr (i64 4294901768 to i8*), i8** %3
store i8* inttoptr (i64 4294901772 to i8*), i8** %4
br label %5
5: ; preds = %10, %1
%6 = load i8*, i8** %3
%7 = load volatile i8, i8* %6
%8 = sext i8 %7 to i32
%9 = icmp ne i32 %8, 0
br i1 %9, label %10, label %11
10: ; preds = %5
br label %5
11: ; preds = %5
%12 = load i8, i8* %2
%13 = load i8*, i8** %4
store volatile i8 %12, i8* %13
ret void
}

LLVM IR (-O2):
define void @uart_outputchar(i8 signext %0) {
br label %2
2: ; preds = %2, %1
%3 = load volatile i8, i8* inttoptr (i64 4294901768 to i8*)
%4 = icmp eq i8 %3, 0
br i1 %4, label %5, label %2
5: ; preds = %2
store volatile i8 %0, i8* inttoptr (i64 4294901772 to i8*)
ret void
}
/* Variables and functions */
int atoi(char *);
int /*<<< orphan*/ printf(char *, int);
int main(int argc, char *argv[]) {
  int a, b;
  a = atoi(argv[1]);
  b = a * 23;
  printf("b = %d\n", b);
  return b;
}


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)
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
call   1040 <atoi@plt>
mov    %eax,-0x14(%rbp)
imul   $0x17,-0x14(%rbp),%eax
mov    %eax,-0x18(%rbp)
mov    -0x18(%rbp),%esi
lea    0xea9(%rip),%rdi
call   1030 <printf@plt>
mov    -0x18(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
mov    0x8(%rsi),%rdi
call   1040 <atoi@plt>
lea    (%rax,%rax,2),%ebx
shl    $0x3,%ebx
sub    %eax,%ebx
lea    0xec7(%rip),%rdi
mov    %ebx,%esi
call   1030 <printf@plt>
mov    %ebx,%eax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [8 x i8] c"b = %d\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i32
%7 = alloca i32
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%8 = load i8**, i8*** %5
%9 = getelementptr inbounds i8*, i8** %8, i64 1
%10 = load i8*, i8** %9
%11 = call i32 @atoi(i8* %10)
store i32 %11, i32* %6
%12 = load i32, i32* %6
%13 = mul nsw i32 %12, 23
store i32 %13, i32* %7
%14 = load i32, i32* %7
%15 = call i32 @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i32 %14)
%16 = load i32, i32* %7
ret i32 %16
}

LLVM IR (-O2):
@.str = [8 x i8] c"b = %d\0A\00"
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = getelementptr inbounds i8*, i8** %1, i64 1
%4 = load i8*, i8** %3
%5 = tail call i32 @atoi(i8* %4)
%6 = mul nsw i32 %5, 23
%7 = tail call i32 @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i32 %6)
ret i32 %6
}
void cc3_filesystem_init(void) { return; }


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

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

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

LLVM IR (-O2):
define void @cc3_filesystem_init() {
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ uint32_t;

/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char const *);
int /*<<< orphan*/ stderr;
int /*<<< orphan*/ strtol(char const *, char **, int);
uint32_t parse_uint32(char const *s) {
  char *end;
  uint32_t r = strtol(s, &end, 10);
  if (*end) {
    fprintf(stderr, "Non integral characters: %s\n", s);
    exit(2);
  }
  return r;
}


x86 assembly (clang, -O0):
<parse_uint32>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
lea    -0x10(%rbp),%rsi
mov    $0xa,%edx
call   1040 <strtol@plt>
mov    %eax,-0x14(%rbp)
mov    -0x10(%rbp),%rax
cmpb   $0x0,(%rax)
je     1181 <parse_uint32+0x51>
mov    0x2e7b(%rip),%rax
mov    (%rax),%edi
mov    -0x8(%rbp),%rdx
lea    0xe8e(%rip),%rsi
call   1030 <fprintf@plt>
mov    $0x2,%edi
call   1050 <exit@plt>
mov    -0x14(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<parse_uint32>:
push   %rbx
sub    $0x10,%rsp
mov    %rdi,%rbx
lea    0x8(%rsp),%rsi
mov    $0xa,%edx
call   1040 <strtol@plt>
mov    0x8(%rsp),%rcx
cmpb   $0x0,(%rcx)
jne    1157 <parse_uint32+0x27>
add    $0x10,%rsp
pop    %rbx
ret
mov    0x2e82(%rip),%rax
mov    (%rax),%edi
lea    0xe99(%rip),%rsi
mov    %rbx,%rdx
call   1030 <fprintf@plt>
mov    $0x2,%edi
call   1050 <exit@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [29 x i8] c"Non integral characters: %s\0A\00"
define i32 @parse_uint32(i8* %0) {
%2 = alloca i8*
%3 = alloca i8*
%4 = alloca i32
store i8* %0, i8** %2
%5 = load i8*, i8** %2
%6 = call i32 @strtol(i8* %5, i8** %3, i32 10)
store i32 %6, i32* %4
%7 = load i8*, i8** %3
%8 = load i8, i8* %7
%9 = icmp ne i8 %8, 0
br i1 %9, label %10, label %15
10: ; preds = %1
%11 = load i32, i32* @stderr
%12 = load i8*, i8** %2
%13 = call i32 @fprintf(i32 %11, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str, i64 0, i64 0), i8* %12)
%14 = call i32 @exit(i32 2)
unreachable
15: ; preds = %1
%16 = load i32, i32* %4
ret i32 %16
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [29 x i8] c"Non integral characters: %s\0A\00"
define i32 @parse_uint32(i8* %0) {
%2 = alloca i8*
%3 = bitcast i8** %2 to i8*
%4 = call i32 @strtol(i8* %0, i8** %2, i32 10)
%5 = load i8*, i8** %2
%6 = load i8, i8* %5
%7 = icmp eq i8 %6, 0
br i1 %7, label %12, label %8
8: ; preds = %1
%9 = load i32, i32* @stderr
%10 = tail call i32 @fprintf(i32 %9, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str, i64 0, i64 0), i8* %0)
%11 = tail call i32 @exit(i32 2)
unreachable
12: ; preds = %1
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ dec_to_bin(int);
int /*<<< orphan*/ printf(char *, ...);
int /*<<< orphan*/ scanf(char *, int *);
int main() {
  int liczba;
  printf("Podaj liczbę: ");
  scanf("%d", &liczba);
  printf("%d po zamianie na postać binarną: ", liczba);
  dec_to_bin(liczba);
  printf("\n");
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeba(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
lea    0xebc(%rip),%rdi
lea    -0x8(%rbp),%rsi
call   1050 <scanf@plt>
mov    -0x8(%rbp),%esi
lea    0xeac(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    -0x8(%rbp),%edi
call   1030 <dec_to_bin@plt>
lea    0xebb(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xeb8(%rip),%rdi
xor    %eax,%eax
call   1050 <printf@plt>
lea    0xeba(%rip),%rdi
lea    0x4(%rsp),%rsi
call   1060 <scanf@plt>
mov    0x4(%rsp),%esi
lea    0xea8(%rip),%rdi
xor    %eax,%eax
call   1050 <printf@plt>
mov    0x4(%rsp),%edi
call   1040 <dec_to_bin@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [16 x i8] c"Podaj liczb\C4\99: \00"
@.str.1 = [3 x i8] c"%d\00"
@.str.2 = [37 x i8] c"%d po zamianie na posta\C4\87 binarn\C4\85: \00"
@.str.3 = [2 x i8] c"\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
store i32 0, i32* %1
%3 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([16 x i8], [16 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), i32* %2)
%5 = load i32, i32* %2
%6 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([37 x i8], [37 x i8]* @.str.2, i64 0, i64 0), i32 %5)
%7 = load i32, i32* %2
%8 = call i32 @dec_to_bin(i32 %7)
%9 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.3, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@.str = [16 x i8] c"Podaj liczb\C4\99: \00"
@.str.1 = [3 x i8] c"%d\00"
@.str.2 = [37 x i8] c"%d po zamianie na posta\C4\87 binarn\C4\85: \00"
define i32 @main() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
%3 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([16 x i8], [16 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), i32* %1)
%5 = load i32, i32* %1
%6 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([37 x i8], [37 x i8]* @.str.2, i64 0, i64 0), i32 %5)
%7 = load i32, i32* %1
%8 = call i32 @dec_to_bin(i32 %7)
%9 = call i32 @putchar(i32 10)
ret i32 0
}
char *test_helloworld_pass(void) { return 0; }


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

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

LLVM IR (-O0):
define i8* @test_helloworld_pass() {
ret i8* null
}

LLVM IR (-O2):
define noalias i8* @test_helloworld_pass() {
ret i8* null
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void tSiteUserContextInfo(void) {
  printf("No context information available\n");
}


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

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

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

LLVM IR (-O2):
@str = [33 x i8] c"No context information available\00"
define void @tSiteUserContextInfo() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([33 x i8], [33 x i8]* @str, i64 0, i64 0))
ret void
}
/* Forward declarations */
typedef struct TYPE_4__ TYPE_2__;
typedef struct TYPE_3__ TYPE_1__;

/* Type definitions */
struct TYPE_3__ {
  scalar_t__ drawable;
};
struct TYPE_4__ {
  TYPE_1__ xnoexpose;
};
typedef TYPE_2__ XEvent;

/* Variables and functions */
unsigned long get_XEvent_xnoexpose_drawable(void *_p) {
  return (unsigned long)((XEvent *)_p)->xnoexpose.drawable;
}


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

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

LLVM IR (-O0):
%struct.TYPE_4__ = type { %struct.TYPE_3__ }
%struct.TYPE_3__ = type { i64 }
define i64 @get_XEvent_xnoexpose_drawable(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = bitcast i8* %3 to %struct.TYPE_4__*
%5 = getelementptr inbounds %struct.TYPE_4__, %struct.TYPE_4__* %4, i32 0, i32 0
%6 = getelementptr inbounds %struct.TYPE_3__, %struct.TYPE_3__* %5, i32 0, i32 0
%7 = load i64, i64* %6
ret i64 %7
}

LLVM IR (-O2):
define i64 @get_XEvent_xnoexpose_drawable(i8* nocapture %0) {
%2 = bitcast i8* %0 to i64*
%3 = load i64, i64* %2
ret i64 %3
}
int arrotondamento(int subtotale, unsigned int numero_elementi) {
  int media_aritmetica;
  float new_subtotal;
  new_subtotal = (subtotale / numero_elementi);
  subtotale = (subtotale % numero_elementi);
  if (subtotale >= 0.5)
    media_aritmetica = ((new_subtotal -= subtotale) + 1);
  else
    media_aritmetica = (new_subtotal -= subtotale);
  return (media_aritmetica);
}


x86 assembly (clang, -O0):
<arrotondamento>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
mov    -0x8(%rbp),%ecx
xor    %edx,%edx
div    %ecx
cvtsi2ss %rax,%xmm0
movss  %xmm0,-0x10(%rbp)
mov    -0x4(%rbp),%eax
xor    %edx,%edx
divl   -0x8(%rbp)
mov    %edx,-0x4(%rbp)
cvtsi2sdl -0x4(%rbp),%xmm0
movsd  0xeca(%rip),%xmm1
ucomisd %xmm1,%xmm0
jb     116b <arrotondamento+0x6b>
cvtsi2ssl -0x4(%rbp),%xmm1
movss  -0x10(%rbp),%xmm0
subss  %xmm1,%xmm0
movss  %xmm0,-0x10(%rbp)
movss  0xead(%rip),%xmm1
addss  %xmm1,%xmm0
cvttss2si %xmm0,%eax
mov    %eax,-0xc(%rbp)
jmp    1185 <arrotondamento+0x85>
cvtsi2ssl -0x4(%rbp),%xmm1
movss  -0x10(%rbp),%xmm0
subss  %xmm1,%xmm0
movss  %xmm0,-0x10(%rbp)
cvttss2si %xmm0,%eax
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<arrotondamento>:
mov    %edi,%eax
xor    %edx,%edx
div    %esi
cvtsi2ss %rax,%xmm0
cvtsi2ss %edx,%xmm1
subss  %xmm1,%xmm0
test   %edx,%edx
jle    111f <arrotondamento+0x1f>
addss  0xee1(%rip),%xmm0
cvttss2si %xmm0,%eax
ret

LLVM IR (-O0):
define i32 @arrotondamento(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
%6 = alloca float
store i32 %0, i32* %3
store i32 %1, i32* %4
%7 = load i32, i32* %3
%8 = load i32, i32* %4
%9 = udiv i32 %7, %8
%10 = uitofp i32 %9 to float
store float %10, float* %6
%11 = load i32, i32* %3
%12 = load i32, i32* %4
%13 = urem i32 %11, %12
store i32 %13, i32* %3
%14 = load i32, i32* %3
%15 = sitofp i32 %14 to double
%16 = fcmp oge double %15, 5.000000e-01
br i1 %16, label %17, label %24
17: ; preds = %2
%18 = load i32, i32* %3
%19 = sitofp i32 %18 to float
%20 = load float, float* %6
%21 = fsub float %20, %19
store float %21, float* %6
%22 = fadd float %21, 1.000000e+00
%23 = fptosi float %22 to i32
store i32 %23, i32* %5
br label %30
24: ; preds = %2
%25 = load i32, i32* %3
%26 = sitofp i32 %25 to float
%27 = load float, float* %6
%28 = fsub float %27, %26
store float %28, float* %6
%29 = fptosi float %28 to i32
store i32 %29, i32* %5
br label %30
30: ; preds = %24, %17
%31 = load i32, i32* %5
ret i32 %31
}

LLVM IR (-O2):
define i32 @arrotondamento(i32 %0, i32 %1) {
%3 = udiv i32 %0, %1
%4 = uitofp i32 %3 to float
%5 = urem i32 %0, %1
%6 = icmp sgt i32 %5, 0
%7 = sitofp i32 %5 to float
%8 = fsub float %4, %7
%9 = fadd float %8, 1.000000e+00
%10 = select i1 %6, float %9, float %8
%11 = fptosi float %10 to i32
ret i32 %11
}
int dbg_leb_map(struct ubifs_info *c, int lnum, int dtype) { return 0; }


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

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

LLVM IR (-O0):
%struct.ubifs_info = type opaque
define i32 @dbg_leb_map(%struct.ubifs_info* %0, i32 %1, i32 %2) {
%4 = alloca %struct.ubifs_info*
%5 = alloca i32
%6 = alloca i32
store %struct.ubifs_info* %0, %struct.ubifs_info** %4
store i32 %1, i32* %5
store i32 %2, i32* %6
ret i32 0
}

LLVM IR (-O2):
%struct.ubifs_info = type opaque
define i32 @dbg_leb_map(%struct.ubifs_info* nocapture readnone %0, i32 %1, i32 %2) {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ free(void *);
void combining_unload_signal(void *signal) { free(signal); }


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

x86 assembly (clang, -O2):
<combining_unload_signal>:
jmp    1030 <free@plt>

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

LLVM IR (-O2):
define void @combining_unload_signal(i8* nocapture %0) {
%2 = tail call i32 @free(i8* %0)
ret void
}