xunge/DecIR huggingface dataset:
unsigned short rgb24_to_rgb16(unsigned char r, unsigned char g,
                              unsigned char b) {
  int r16, g16, b16;
  unsigned short rgb16;
  b16 = (b * 0x1f) / 0xff;
  g16 = (g * 0x3f) / 0xff;
  r16 = (r * 0x1f) / 0xff;
  rgb16 = (r16 << 11) | (g16 << 5) | (b16);
  return rgb16;
}


x86 assembly (clang, -O0):
<rgb24_to_rgb16>:
push   %rbp
mov    %rsp,%rbp
mov    %dl,%al
mov    %sil,%cl
mov    %dil,%dl
mov    %dl,-0x1(%rbp)
mov    %cl,-0x2(%rbp)
mov    %al,-0x3(%rbp)
movzbl -0x3(%rbp),%eax
imul   $0x1f,%eax,%eax
mov    $0xff,%ecx
cltd
idiv   %ecx
mov    %eax,-0x10(%rbp)
movzbl -0x2(%rbp),%eax
imul   $0x3f,%eax,%eax
mov    $0xff,%ecx
cltd
idiv   %ecx
mov    %eax,-0xc(%rbp)
movzbl -0x1(%rbp),%eax
imul   $0x1f,%eax,%eax
mov    $0xff,%ecx
cltd
idiv   %ecx
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
shl    $0xb,%eax
mov    -0xc(%rbp),%ecx
shl    $0x5,%ecx
or     %ecx,%eax
or     -0x10(%rbp),%eax
mov    %ax,-0x12(%rbp)
movzwl -0x12(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<rgb24_to_rgb16>:
imul   $0xf8f9f,%edx,%ecx
shr    $0x17,%ecx
imul   $0x1f9fbf,%esi,%edx
shr    $0x12,%edx
and    $0xffffffe0,%edx
imul   $0xf8f9f,%edi,%eax
shr    $0xc,%eax
and    $0x1f800,%eax
or     %edx,%eax
or     %ecx,%eax
ret

LLVM IR (-O0):
define zeroext i16 @rgb24_to_rgb16(i8 zeroext %0, i8 zeroext %1, i8 zeroext %2) {
%4 = alloca i8
%5 = alloca i8
%6 = alloca i8
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32
%10 = alloca i16
store i8 %0, i8* %4
store i8 %1, i8* %5
store i8 %2, i8* %6
%11 = load i8, i8* %6
%12 = zext i8 %11 to i32
%13 = mul nsw i32 %12, 31
%14 = sdiv i32 %13, 255
store i32 %14, i32* %9
%15 = load i8, i8* %5
%16 = zext i8 %15 to i32
%17 = mul nsw i32 %16, 63
%18 = sdiv i32 %17, 255
store i32 %18, i32* %8
%19 = load i8, i8* %4
%20 = zext i8 %19 to i32
%21 = mul nsw i32 %20, 31
%22 = sdiv i32 %21, 255
store i32 %22, i32* %7
%23 = load i32, i32* %7
%24 = shl i32 %23, 11
%25 = load i32, i32* %8
%26 = shl i32 %25, 5
%27 = or i32 %24, %26
%28 = load i32, i32* %9
%29 = or i32 %27, %28
%30 = trunc i32 %29 to i16
store i16 %30, i16* %10
%31 = load i16, i16* %10
ret i16 %31
}

LLVM IR (-O2):
define zeroext i16 @rgb24_to_rgb16(i8 zeroext %0, i8 zeroext %1, i8 zeroext %2) {
%4 = zext i8 %2 to i16
%5 = mul nuw nsw i16 %4, 31
%6 = udiv i16 %5, 255
%7 = zext i8 %1 to i16
%8 = mul nuw nsw i16 %7, 63
%9 = udiv i16 %8, 255
%10 = zext i8 %0 to i16
%11 = mul nuw nsw i16 %10, 31
%12 = udiv i16 %11, 255
%13 = shl nuw i16 %12, 11
%14 = shl nuw nsw i16 %9, 5
%15 = or i16 %14, %13
%16 = or i16 %15, %6
ret i16 %16
}
void f(s1, s2) char *s1, *s2;
{ printf(s1, s2); }


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

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

LLVM IR (-O0):
define void @f(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 (i8*, ...) @printf(i8* %5, i8* %6)
ret void
}

LLVM IR (-O2):
define void @f(i8* nocapture %0, i8* %1) {
%3 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) %0, i8* %1)
ret void
}
/* Variables and functions */
char *getlogin(void) { return NULL; }


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

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

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

LLVM IR (-O2):
define noalias i8* @getlogin() {
ret i8* null
}
/* Type definitions */
typedef int /*<<< orphan*/ uint32_t;

/* Variables and functions */
int /*<<< orphan*/ volatile *mem_get_reg32(int);
volatile uint32_t *syscfg_get_EXTICR4() {
  return mem_get_reg32(0x40010000 + 0x14);
}


x86 assembly (clang, -O0):
<syscfg_get_EXTICR4>:
push   %rbp
mov    %rsp,%rbp
mov    $0x40010014,%edi
call   1030 <mem_get_reg32@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<syscfg_get_EXTICR4>:
mov    $0x40010014,%edi
jmp    1030 <mem_get_reg32@plt>

LLVM IR (-O0):
define i32* @syscfg_get_EXTICR4() {
%1 = call i32* @mem_get_reg32(i32 1073807380)
ret i32* %1
}

LLVM IR (-O2):
define i32* @syscfg_get_EXTICR4() {
%1 = tail call i32* @mem_get_reg32(i32 1073807380)
ret i32* %1
}
int default_heap_cmp_fn(int *m, int *n) {
  int i = *m - *n;
  return i > 0 ? 1 : (i < 0 ? -1 : 0);
}


x86 assembly (clang, -O0):
<default_heap_cmp_fn>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%eax
mov    -0x10(%rbp),%rcx
sub    (%rcx),%eax
mov    %eax,-0x14(%rbp)
cmpl   $0x0,-0x14(%rbp)
jle    1132 <default_heap_cmp_fn+0x32>
mov    $0x1,%eax
mov    %eax,-0x18(%rbp)
jmp    1145 <default_heap_cmp_fn+0x45>
mov    -0x14(%rbp),%edx
xor    %eax,%eax
mov    $0xffffffff,%ecx
cmp    $0x0,%edx
cmovl  %ecx,%eax
mov    %eax,-0x18(%rbp)
mov    -0x18(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<default_heap_cmp_fn>:
mov    (%rdi),%eax
mov    (%rsi),%ecx
xor    %edx,%edx
cmp    %ecx,%eax
setne  %dl
neg    %edx
cmp    %ecx,%eax
mov    $0x1,%eax
cmovle %edx,%eax
ret

LLVM IR (-O0):
define i32 @default_heap_cmp_fn(i32* %0, i32* %1) {
%3 = alloca i32*
%4 = alloca i32*
%5 = alloca i32
store i32* %0, i32** %3
store i32* %1, i32** %4
%6 = load i32*, i32** %3
%7 = load i32, i32* %6
%8 = load i32*, i32** %4
%9 = load i32, i32* %8
%10 = sub nsw i32 %7, %9
store i32 %10, i32* %5
%11 = load i32, i32* %5
%12 = icmp sgt i32 %11, 0
br i1 %12, label %13, label %14
13: ; preds = %2
br label %19
14: ; preds = %2
%15 = load i32, i32* %5
%16 = icmp slt i32 %15, 0
%17 = zext i1 %16 to i64
%18 = select i1 %16, i32 -1, i32 0
br label %19
19: ; preds = %14, %13
%20 = phi i32 [ 1, %13 ], [ %18, %14 ]
ret i32 %20
}

LLVM IR (-O2):
define i32 @default_heap_cmp_fn(i32* nocapture %0, i32* nocapture %1) {
%3 = load i32, i32* %0
%4 = load i32, i32* %1
%5 = sub nsw i32 %3, %4
%6 = icmp ne i32 %5, 0
%7 = sext i1 %6 to i32
%8 = icmp slt i32 %5, 1
%9 = select i1 %8, i32 %7, i32 1
ret i32 %9
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int main(void) {
  printf("Hello World\n");
  return 0;
}


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

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

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

LLVM IR (-O2):
@str = [12 x i8] c"Hello World\00"
define i32 @main() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([12 x i8], [12 x i8]* @str, i64 0, i64 0))
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ Fork();
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int getpid();
int getppid();
int /*<<< orphan*/ printf(char *, int, int);
int main() {
  Fork();
  printf("ppid=%d,pid=%d\n", getppid(), getpid());
  exit(0);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x0,%al
call   1030 <Fork@plt>
mov    $0x0,%al
call   1060 <getppid@plt>
mov    %eax,-0x8(%rbp)
mov    $0x0,%al
call   1040 <getpid@plt>
mov    -0x8(%rbp),%esi
mov    %eax,%edx
lea    0xe7d(%rip),%rdi
call   1050 <printf@plt>
xor    %edi,%edi
call   1070 <exit@plt>

x86 assembly (clang, -O2):
<main>:
push   %rbx
xor    %eax,%eax
call   1030 <Fork@plt>
xor    %eax,%eax
call   1060 <getppid@plt>
mov    %eax,%ebx
xor    %eax,%eax
call   1040 <getpid@plt>
lea    0xe91(%rip),%rdi
mov    %ebx,%esi
mov    %eax,%edx
call   1050 <printf@plt>
xor    %edi,%edi
call   1070 <exit@plt>

LLVM IR (-O0):
@.str = [16 x i8] c"ppid=%d,pid=%d\0A\00"
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 (...) @Fork()
%3 = call i32 (...) @getppid()
%4 = call i32 (...) @getpid()
%5 = call i32 @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0), i32 %3, i32 %4)
%6 = call i32 @exit(i32 0)
unreachable
}

LLVM IR (-O2):
@.str = [16 x i8] c"ppid=%d,pid=%d\0A\00"
define i32 @main() {
%1 = tail call i32 (...) @Fork()
%2 = tail call i32 (...) @getppid()
%3 = tail call i32 (...) @getpid()
%4 = tail call i32 @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0), i32 %2, i32 %3)
%5 = tail call i32 @exit(i32 0)
unreachable
}
long long bit27() { return 0x0000000008000000LL; }


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

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

LLVM IR (-O0):
define i64 @bit27() {
ret i64 134217728
}

LLVM IR (-O2):
define i64 @bit27() {
ret i64 134217728
}
int view_back(struct view *v) {
  (void)v;
  return 0;
}


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

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

LLVM IR (-O0):
%struct.view = type opaque
define i32 @view_back(%struct.view* %0) {
%2 = alloca %struct.view*
store %struct.view* %0, %struct.view** %2
%3 = load %struct.view*, %struct.view** %2
ret i32 0
}

LLVM IR (-O2):
%struct.view = type opaque
define i32 @view_back(%struct.view* nocapture readnone %0) {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ abort_impl();
int /*<<< orphan*/ printf(char *, char const *);
void oc_abort(const char *msg) {
  printf("\n%s\nAbort.\n", msg);
  abort_impl();
}


x86 assembly (clang, -O0):
<oc_abort>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rsi
lea    0xec9(%rip),%rdi
call   1030 <printf@plt>
mov    $0x0,%al
call   1040 <abort_impl@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<oc_abort>:
push   %rax
mov    %rdi,%rsi
lea    0xed5(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
jmp    1040 <abort_impl@plt>

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

LLVM IR (-O2):
@.str = [12 x i8] c"\0A%s\0AAbort.\0A\00"
define void @oc_abort(i8* %0) {
%2 = tail call i32 @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i8* %0)
%3 = tail call i32 (...) @abort_impl()
ret void
}
/* Type definitions */
struct Cyc_Absyn_RgnEffect {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ Cyc_Absyn_copy_rgneffect(struct Cyc_Absyn_RgnEffect *);
struct Cyc_Absyn_RgnEffect *
Cyc_IOEffect_copyeffelt(struct Cyc_Absyn_RgnEffect *f) {
  return ({ Cyc_Absyn_copy_rgneffect(f); });
}


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

x86 assembly (clang, -O2):
<Cyc_IOEffect_copyeffelt>:
push   %rax
call   1030 <Cyc_Absyn_copy_rgneffect@plt>
cltq
pop    %rcx
ret

LLVM IR (-O0):
%struct.Cyc_Absyn_RgnEffect = type { i32 }
define %struct.Cyc_Absyn_RgnEffect* @Cyc_IOEffect_copyeffelt(%struct.Cyc_Absyn_RgnEffect* %0) {
%2 = alloca %struct.Cyc_Absyn_RgnEffect*
%3 = alloca i32
store %struct.Cyc_Absyn_RgnEffect* %0, %struct.Cyc_Absyn_RgnEffect** %2
%4 = load %struct.Cyc_Absyn_RgnEffect*, %struct.Cyc_Absyn_RgnEffect** %2
%5 = call i32 @Cyc_Absyn_copy_rgneffect(%struct.Cyc_Absyn_RgnEffect* %4)
store i32 %5, i32* %3
%6 = load i32, i32* %3
%7 = sext i32 %6 to i64
%8 = inttoptr i64 %7 to %struct.Cyc_Absyn_RgnEffect*
ret %struct.Cyc_Absyn_RgnEffect* %8
}

LLVM IR (-O2):
%struct.Cyc_Absyn_RgnEffect = type { i32 }
define %struct.Cyc_Absyn_RgnEffect* @Cyc_IOEffect_copyeffelt(%struct.Cyc_Absyn_RgnEffect* %0) {
%2 = tail call i32 @Cyc_Absyn_copy_rgneffect(%struct.Cyc_Absyn_RgnEffect* %0)
%3 = sext i32 %2 to i64
%4 = inttoptr i64 %3 to %struct.Cyc_Absyn_RgnEffect*
ret %struct.Cyc_Absyn_RgnEffect* %4
}
/* Type definitions */
struct activity {
  int dummy;
};

/* Variables and functions */
int get_filesystem_nr();
int wrap_get_filesystem_nr(struct activity *a) {
  int n = 0;
  if ((n = get_filesystem_nr()) > 0) {
    if (n > (65536 * 4096))
      return (65536 * 4096);
    else
      return n;
  }
  return 0;
}


x86 assembly (clang, -O0):
<wrap_get_filesystem_nr>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
mov    $0x0,%al
call   1030 <get_filesystem_nr@plt>
mov    %eax,-0x14(%rbp)
cmp    $0x0,%eax
jle    115a <wrap_get_filesystem_nr+0x4a>
cmpl   $0x10000000,-0x14(%rbp)
jle    114f <wrap_get_filesystem_nr+0x3f>
movl   $0x10000000,-0x4(%rbp)
jmp    1161 <wrap_get_filesystem_nr+0x51>
mov    -0x14(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    1161 <wrap_get_filesystem_nr+0x51>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<wrap_get_filesystem_nr>:
push   %rbx
xor    %ebx,%ebx
xor    %eax,%eax
call   1030 <get_filesystem_nr@plt>
cmp    $0x10000000,%eax
mov    $0x10000000,%ecx
cmovge %ecx,%eax
test   %eax,%eax
cmovs  %ebx,%eax
pop    %rbx
ret

LLVM IR (-O0):
%struct.activity = type { i32 }
define i32 @wrap_get_filesystem_nr(%struct.activity* %0) {
%2 = alloca i32
%3 = alloca %struct.activity*
%4 = alloca i32
store %struct.activity* %0, %struct.activity** %3
store i32 0, i32* %4
%5 = call i32 (...) @get_filesystem_nr()
store i32 %5, i32* %4
%6 = icmp sgt i32 %5, 0
br i1 %6, label %7, label %13
7: ; preds = %1
%8 = load i32, i32* %4
%9 = icmp sgt i32 %8, 268435456
br i1 %9, label %10, label %11
10: ; preds = %7
store i32 268435456, i32* %2
br label %14
11: ; preds = %7
%12 = load i32, i32* %4
store i32 %12, i32* %2
br label %14
13: ; preds = %1
store i32 0, i32* %2
br label %14
14: ; preds = %13, %11, %10
%15 = load i32, i32* %2
ret i32 %15
}

LLVM IR (-O2):
%struct.activity = type { i32 }
define i32 @wrap_get_filesystem_nr(%struct.activity* nocapture readnone %0) {
%2 = tail call i32 (...) @get_filesystem_nr()
%3 = icmp slt i32 %2, 268435456
%4 = select i1 %3, i32 %2, i32 268435456
%5 = icmp sgt i32 %4, 0
%6 = select i1 %5, i32 %4, i32 0
ret i32 %6
}
/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
int /*<<< orphan*/ stderr;
int back_spin(__attribute__((__unused__)) int argc,
              __attribute__((__unused__)) char **argv) {
  fprintf(stderr, "[BACK] "
                  "error"
                  ": "
                  "subcommand 'spin' not yet implemented"
                  "\n");
  return -1;
}


x86 assembly (clang, -O0):
<back_spin>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    0x2eba(%rip),%rax
mov    (%rax),%edi
lea    0xed1(%rip),%rsi
call   1030 <fprintf@plt>
mov    $0xffffffff,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<back_spin>:
push   %rax
mov    0x2ec8(%rip),%rax
mov    (%rax),%edi
lea    0xedf(%rip),%rsi
call   1030 <fprintf@plt>
mov    $0xffffffff,%eax
pop    %rcx
ret

LLVM IR (-O0):
@stderr = global i32 0
@.str = [53 x i8] c"[BACK] error: subcommand 'spin' not yet implemented\0A\00"
define i32 @back_spin(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i8**
store i32 %0, i32* %3
store i8** %1, i8*** %4
%5 = load i32, i32* @stderr
%6 = call i32 @fprintf(i32 %5, i8* getelementptr inbounds ([53 x i8], [53 x i8]* @.str, i64 0, i64 0))
ret i32 -1
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [53 x i8] c"[BACK] error: subcommand 'spin' not yet implemented\0A\00"
define i32 @back_spin(i32 %0, i8** nocapture readnone %1) {
%3 = load i32, i32* @stderr
%4 = tail call i32 @fprintf(i32 %3, i8* getelementptr inbounds ([53 x i8], [53 x i8]* @.str, i64 0, i64 0))
ret i32 -1
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ isxdigit(int);
void t_isxdigit_0xdc() {
  Assert_real((isxdigit(220) == 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_isxdigit.c",
              1105, ("isxdigit should be 0 for 0xdc"));
}


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

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

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

LLVM IR (-O2):
@.str = [169 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/ctype/test_isxdigit.c\00"
@.str.1 = [30 x i8] c"isxdigit should be 0 for 0xdc\00"
define void @t_isxdigit_0xdc() {
%1 = tail call i64 @isxdigit(i32 220)
%2 = icmp eq i64 %1, 0
%3 = zext i1 %2 to i32
%4 = tail call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([169 x i8], [169 x i8]* @.str, i64 0, i64 0), i32 1105, i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ ssize_t;

/* Variables and functions */
int /*<<< orphan*/ syscall(int, int, char *, size_t);
ssize_t flistxattr(int filedes, char *list, size_t size) {
  return syscall(196, filedes, list, size);
}


x86 assembly (clang, -O0):
<flistxattr>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x4(%rbp),%esi
mov    -0x10(%rbp),%rdx
mov    -0x18(%rbp),%rcx
mov    $0xc4,%edi
call   1030 <syscall@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<flistxattr>:
mov    %rdx,%rcx
mov    %rsi,%rdx
mov    %edi,%esi
mov    $0xc4,%edi
jmp    1030 <syscall@plt>

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

LLVM IR (-O2):
define i32 @flistxattr(i32 %0, i8* %1, i64 %2) {
%4 = tail call i32 @syscall(i32 196, i32 %0, i8* %1, i64 %2)
ret i32 %4
}
/* Variables and functions */
int _ada_use_c2phc(int, int *, int *, double *, int /*<<< orphan*/);
int clear_standard_Laurent_data(void) {
  int *a, *b, fail;
  double *c;
  fail = _ada_use_c2phc(771, a, b, c, 0);
  return fail;
}


x86 assembly (clang, -O0):
<clear_standard_Laurent_data>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    -0x8(%rbp),%rsi
mov    -0x10(%rbp),%rdx
mov    -0x20(%rbp),%rcx
mov    $0x303,%edi
xor    %r8d,%r8d
call   1030 <_ada_use_c2phc@plt>
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<clear_standard_Laurent_data>:
mov    $0x303,%edi
xor    %r8d,%r8d
jmp    1030 <_ada_use_c2phc@plt>

LLVM IR (-O0):
define i32 @clear_standard_Laurent_data() {
%1 = alloca i32*
%2 = alloca i32*
%3 = alloca i32
%4 = alloca double*
%5 = load i32*, i32** %1
%6 = load i32*, i32** %2
%7 = load double*, double** %4
%8 = call i32 @_ada_use_c2phc(i32 771, i32* %5, i32* %6, double* %7, i32 0)
store i32 %8, i32* %3
%9 = load i32, i32* %3
ret i32 %9
}

LLVM IR (-O2):
define i32 @clear_standard_Laurent_data() {
%1 = tail call i32 @_ada_use_c2phc(i32 771, i32* undef, i32* undef, double* undef, i32 0)
ret i32 %1
}
void help_command() {}


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

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

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

LLVM IR (-O2):
define void @help_command() {
ret void
}
char *split_at(string, delimiter)
char *string;
int delimiter;
{
  char *cp;
  if ((cp = strchr(string, delimiter)) != 0)
    *cp++ = 0;
  return (cp);
}


x86 assembly (clang, -O0):
<split_at>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
call   1030 <strchr@plt>
mov    %rax,-0x18(%rbp)
cmp    $0x0,%rax
je     114b <split_at+0x3b>
mov    -0x18(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x18(%rbp)
movb   $0x0,(%rax)
mov    -0x18(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<split_at>:
push   %rax
call   1030 <strchr@plt>
test   %rax,%rax
je     1127 <split_at+0x17>
mov    %rax,%rcx
add    $0x1,%rax
movb   $0x0,(%rcx)
pop    %rcx
ret
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
define i8* @split_at(i8* %0, i32 %1) {
%3 = tail call i8* @strchr(i8* dereferenceable(1) %0, i32 %1)
%4 = icmp eq i8* %3, null
br i1 %4, label %7, label %5
5: ; preds = %2
%6 = getelementptr inbounds i8, i8* %3, i64 1
store i8 0, i8* %3
br label %7
7: ; preds = %5, %2
%8 = phi i8* [ %6, %5 ], [ null, %2 ]
ret i8* %8
}
/* Type definitions */
struct media_device_info {
  int dummy;
};
typedef int /*<<< orphan*/ m;

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


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

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

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

LLVM IR (-O2):
define i32 @main() {
ret i32 4
}
/* Type definitions */
typedef int uint64_t;

/* Variables and functions */
void finalizer_scrub24(void *ptr) {
  uint64_t *sz_ptr = (uint64_t *)ptr;
  sz_ptr[0] = 0xa5a5a5a5a5a5a5a5ULL;
  sz_ptr[1] = 0xa5a5a5a5a5a5a5a5ULL;
  sz_ptr[2] = 0xa5a5a5a5a5a5a5a5ULL;
}


x86 assembly (clang, -O0):
<finalizer_scrub24>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
movl   $0xa5a5a5a5,(%rax)
mov    -0x10(%rbp),%rax
movl   $0xa5a5a5a5,0x4(%rax)
mov    -0x10(%rbp),%rax
movl   $0xa5a5a5a5,0x8(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<finalizer_scrub24>:
movabs $0xa5a5a5a5a5a5a5a5,%rax
a5 a5 a5
mov    %rax,(%rdi)
movl   $0xa5a5a5a5,0x8(%rdi)
ret

LLVM IR (-O0):
define void @finalizer_scrub24(i8* %0) {
%2 = alloca i8*
%3 = alloca i32*
store i8* %0, i8** %2
%4 = load i8*, i8** %2
%5 = bitcast i8* %4 to i32*
store i32* %5, i32** %3
%6 = load i32*, i32** %3
%7 = getelementptr inbounds i32, i32* %6, i64 0
store i32 -1515870811, i32* %7
%8 = load i32*, i32** %3
%9 = getelementptr inbounds i32, i32* %8, i64 1
store i32 -1515870811, i32* %9
%10 = load i32*, i32** %3
%11 = getelementptr inbounds i32, i32* %10, i64 2
store i32 -1515870811, i32* %11
ret void
}

LLVM IR (-O2):
define void @finalizer_scrub24(i8* nocapture writeonly %0) {
%2 = bitcast i8* %0 to i32*
store i32 -1515870811, i32* %2
%3 = getelementptr inbounds i8, i8* %0, i64 4
%4 = bitcast i8* %3 to i32*
store i32 -1515870811, i32* %4
%5 = getelementptr inbounds i8, i8* %0, i64 8
%6 = bitcast i8* %5 to i32*
store i32 -1515870811, i32* %6
ret void
}
/* Variables and functions */
int /*<<< orphan*/ assert(int);
char get_char_key(int telephone_key, int place) {
  assert(2 <= telephone_key && telephone_key <= 9);
  assert(1 <= place && place <= 3);
  return 'a' + (telephone_key - 2) * 3 + (place - 1);
}


x86 assembly (clang, -O0):
<get_char_key>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
xor    %eax,%eax
mov    $0x2,%ecx
cmp    -0x4(%rbp),%ecx
mov    %al,-0x9(%rbp)
jg     113b <get_char_key+0x2b>
cmpl   $0x9,-0x4(%rbp)
setle  %al
mov    %al,-0x9(%rbp)
mov    -0x9(%rbp),%al
and    $0x1,%al
movzbl %al,%edi
call   1030 <assert@plt>
xor    %eax,%eax
mov    $0x1,%ecx
cmp    -0x8(%rbp),%ecx
mov    %al,-0xa(%rbp)
jg     1165 <get_char_key+0x55>
cmpl   $0x3,-0x8(%rbp)
setle  %al
mov    %al,-0xa(%rbp)
mov    -0xa(%rbp),%al
and    $0x1,%al
movzbl %al,%edi
call   1030 <assert@plt>
mov    -0x4(%rbp),%eax
sub    $0x2,%eax
imul   $0x3,%eax,%eax
add    $0x61,%eax
mov    -0x8(%rbp),%ecx
sub    $0x1,%ecx
add    %ecx,%eax
movsbl %al,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_char_key>:
push   %r14
push   %rbx
push   %rax
mov    %esi,%r14d
mov    %edi,%ebx
lea    -0x2(%rbx),%eax
xor    %edi,%edi
cmp    $0x8,%eax
setb   %dil
call   1030 <assert@plt>
lea    -0x1(%r14),%eax
xor    %edi,%edi
cmp    $0x3,%eax
setb   %dil
call   1030 <assert@plt>
lea    (%rbx,%rbx,2),%eax
add    %r14d,%eax
add    $0x5a,%al
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define signext i8 @get_char_key(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%5 = load i32, i32* %3
%6 = icmp sle i32 2, %5
br i1 %6, label %7, label %10
7: ; preds = %2
%8 = load i32, i32* %3
%9 = icmp sle i32 %8, 9
br label %10
10: ; preds = %7, %2
%11 = phi i1 [ false, %2 ], [ %9, %7 ]
%12 = zext i1 %11 to i32
%13 = call i32 @assert(i32 %12)
%14 = load i32, i32* %4
%15 = icmp sle i32 1, %14
br i1 %15, label %16, label %19
16: ; preds = %10
%17 = load i32, i32* %4
%18 = icmp sle i32 %17, 3
br label %19
19: ; preds = %16, %10
%20 = phi i1 [ false, %10 ], [ %18, %16 ]
%21 = zext i1 %20 to i32
%22 = call i32 @assert(i32 %21)
%23 = load i32, i32* %3
%24 = sub nsw i32 %23, 2
%25 = mul nsw i32 %24, 3
%26 = add nsw i32 97, %25
%27 = load i32, i32* %4
%28 = sub nsw i32 %27, 1
%29 = add nsw i32 %26, %28
%30 = trunc i32 %29 to i8
ret i8 %30
}

LLVM IR (-O2):
define signext i8 @get_char_key(i32 %0, i32 %1) {
%3 = add i32 %0, -2
%4 = icmp ult i32 %3, 8
%5 = zext i1 %4 to i32
%6 = tail call i32 @assert(i32 %5)
%7 = add i32 %1, -1
%8 = icmp ult i32 %7, 3
%9 = zext i1 %8 to i32
%10 = tail call i32 @assert(i32 %9)
%11 = mul i32 %0, 3
%12 = add i32 %11, %1
%13 = trunc i32 %12 to i8
%14 = add i8 %13, 90
ret i8 %14
}
/* Variables and functions */
int /*<<< orphan*/ really();
int main(void) {
  really();
  return 0;
}


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

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

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

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @really()
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ link_error();
void f11(unsigned long int s) {
  if ((unsigned int)s == 0)
    return;
  if (s == 0)
    link_error();
}


x86 assembly (clang, -O0):
<f11>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
cmp    $0x0,%eax
jne    112e <f11+0x1e>
jmp    1140 <f11+0x30>
cmpq   $0x0,-0x8(%rbp)
jne    1140 <f11+0x30>
mov    $0x0,%al
call   1030 <link_error@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<f11>:
test   %rdi,%rdi
jne    1120 <f11+0x10>
test   %edi,%edi
je     1120 <f11+0x10>
xor    %eax,%eax
jmp    1030 <link_error@plt>
ret

LLVM IR (-O0):
define void @f11(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = load i64, i64* %2
%4 = trunc i64 %3 to i32
%5 = icmp eq i32 %4, 0
br i1 %5, label %6, label %7
6: ; preds = %1
br label %12
7: ; preds = %1
%8 = load i64, i64* %2
%9 = icmp eq i64 %8, 0
br i1 %9, label %10, label %12
10: ; preds = %7
%11 = call i32 (...) @link_error()
br label %12
12: ; preds = %6, %10, %7
ret void
}

LLVM IR (-O2):
define void @f11(i64 %0) {
%2 = trunc i64 %0 to i32
%3 = icmp ne i32 %2, 0
%4 = icmp eq i64 %0, 0
%5 = and i1 %4, %3
br i1 %5, label %6, label %8
6: ; preds = %1
%7 = tail call i32 (...) @link_error()
br label %8
8: ; preds = %1, %6
ret void
}
/* Type definitions */
typedef int uint32_t;

/* Variables and functions */
uint32_t _gcd(uint32_t a, uint32_t b) {
  while (b) {
    a %= b;
    {
      uint32_t temp;
      temp = *(&a);
      *(&a) = *(&b);
      *(&b) = temp;
    };
  }
  return a;
}


x86 assembly (clang, -O0):
<_gcd>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
cmpl   $0x0,-0x8(%rbp)
je     1137 <_gcd+0x37>
mov    -0x8(%rbp),%ecx
mov    -0x4(%rbp),%eax
cltd
idiv   %ecx
mov    %edx,-0x4(%rbp)
mov    -0x4(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0xc(%rbp),%eax
mov    %eax,-0x8(%rbp)
jmp    110a <_gcd+0xa>
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<_gcd>:
mov    %edi,%eax
test   %esi,%esi
je     111d <_gcd+0x1d>
mov    %esi,%edx
nopl   0x0(%rax,%rax,1)
mov    %edx,%ecx
cltd
idiv   %ecx
mov    %ecx,%eax
test   %edx,%edx
jne    1110 <_gcd+0x10>
mov    %ecx,%eax
ret

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

LLVM IR (-O2):
define i32 @_gcd(i32 %0, i32 %1) {
%3 = icmp eq i32 %1, 0
br i1 %3, label %9, label %4
4: ; preds = %2, %4
%5 = phi i32 [ %6, %4 ], [ %0, %2 ]
%6 = phi i32 [ %7, %4 ], [ %1, %2 ]
%7 = srem i32 %5, %6
%8 = icmp eq i32 %7, 0
br i1 %8, label %9, label %4
9: ; preds = %4, %2
%10 = phi i32 [ %0, %2 ], [ %6, %4 ]
ret i32 %10
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char *, char *);
void g_error(char *message) { printf("%s: %s\n", "chown", message); }


x86 assembly (clang, -O0):
<g_error>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdx
lea    0xed9(%rip),%rdi
lea    0xeda(%rip),%rsi
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<g_error>:
mov    %rdi,%rdx
lea    0xee6(%rip),%rdi
lea    0xee7(%rip),%rsi
jmp    1030 <printf@plt>

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

LLVM IR (-O2):
@.str = [8 x i8] c"%s: %s\0A\00"
@.str.1 = [6 x i8] c"chown\00"
define void @g_error(i8* %0) {
%2 = tail call i32 @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), i8* %0)
ret void
}
/* Variables and functions */
int EFAULT;
scalar_t__ access_ok(int, void const *, unsigned long);
int verify_area(int type, const void *addr, unsigned long size) {
  return access_ok(type, addr, size) ? 0 : -EFAULT;
}


x86 assembly (clang, -O0):
<verify_area>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
call   1030 <access_ok@plt>
cmp    $0x0,%rax
je     1147 <verify_area+0x37>
xor    %eax,%eax
mov    %eax,-0x1c(%rbp)
jmp    1155 <verify_area+0x45>
xor    %eax,%eax
mov    0x2ea8(%rip),%rcx
sub    (%rcx),%eax
mov    %eax,-0x1c(%rbp)
mov    -0x1c(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<verify_area>:
push   %rax
call   1030 <access_ok@plt>
mov    0x2edb(%rip),%rdx
xor    %ecx,%ecx
sub    (%rdx),%ecx
xor    %edx,%edx
test   %rax,%rax
cmovne %edx,%ecx
mov    %ecx,%eax
pop    %rcx
ret

LLVM IR (-O0):
@EFAULT = global i32 0
define i32 @verify_area(i32 %0, i8* %1, i64 %2) {
%4 = alloca i32
%5 = alloca i8*
%6 = alloca i64
store i32 %0, i32* %4
store i8* %1, i8** %5
store i64 %2, i64* %6
%7 = load i32, i32* %4
%8 = load i8*, i8** %5
%9 = load i64, i64* %6
%10 = call i64 @access_ok(i32 %7, i8* %8, i64 %9)
%11 = icmp ne i64 %10, 0
br i1 %11, label %12, label %13
12: ; preds = %3
br label %16
13: ; preds = %3
%14 = load i32, i32* @EFAULT
%15 = sub nsw i32 0, %14
br label %16
16: ; preds = %13, %12
%17 = phi i32 [ 0, %12 ], [ %15, %13 ]
ret i32 %17
}

LLVM IR (-O2):
@EFAULT = global i32 0
define i32 @verify_area(i32 %0, i8* %1, i64 %2) {
%4 = tail call i64 @access_ok(i32 %0, i8* %1, i64 %2)
%5 = icmp eq i64 %4, 0
%6 = load i32, i32* @EFAULT
%7 = sub nsw i32 0, %6
%8 = select i1 %5, i32 %7, i32 0
ret i32 %8
}
unsigned short dosversion(void) {
  unsigned short v1, v2;
  __asm__("mov    $0x30, %%ah	    \n\t"
          "int    $0x21	    \n\t"
          : "=a"(v1)
          :
          : "bx", "cx");
  if (!(v1 & 0xff))
    v1 = 0x0001;
  v2 = v1 >> 8 & 0xff;
  v1 = v1 << 8 | v2;
  return v1;
}


x86 assembly (clang, -O0):
<dosversion>:
push   %rbp
mov    %rsp,%rbp
push   %rbx
mov    $0x30,%ah
int    $0x21
mov    %ax,-0xa(%rbp)
movzwl -0xa(%rbp),%eax
and    $0xff,%eax
cmp    $0x0,%eax
jne    1125 <dosversion+0x25>
movw   $0x1,-0xa(%rbp)
movzwl -0xa(%rbp),%eax
sar    $0x8,%eax
and    $0xff,%eax
mov    %ax,-0xc(%rbp)
movzwl -0xa(%rbp),%eax
shl    $0x8,%eax
movzwl -0xc(%rbp),%ecx
or     %ecx,%eax
mov    %ax,-0xa(%rbp)
movzwl -0xa(%rbp),%eax
pop    %rbx
pop    %rbp
ret

x86 assembly (clang, -O2):
<dosversion>:
push   %rbx
mov    $0x30,%ah
int    $0x21
test   %al,%al
mov    $0x1,%ecx
cmove  %ecx,%eax
rol    $0x8,%ax
pop    %rbx
ret

LLVM IR (-O0):
define zeroext i16 @dosversion() {
%1 = alloca i16
%2 = alloca i16
%3 = call i16 asm "mov $$0x30, %ah\09 \0A\09int $$0x21\09 \0A\09", "={ax},~{bx},~{cx},~{dirflag},~{fpsr},~{flags}"()
store i16 %3, i16* %1
%4 = load i16, i16* %1
%5 = zext i16 %4 to i32
%6 = and i32 %5, 255
%7 = icmp ne i32 %6, 0
br i1 %7, label %9, label %8
8: ; preds = %0
store i16 1, i16* %1
br label %9
9: ; preds = %8, %0
%10 = load i16, i16* %1
%11 = zext i16 %10 to i32
%12 = ashr i32 %11, 8
%13 = and i32 %12, 255
%14 = trunc i32 %13 to i16
store i16 %14, i16* %2
%15 = load i16, i16* %1
%16 = zext i16 %15 to i32
%17 = shl i32 %16, 8
%18 = load i16, i16* %2
%19 = zext i16 %18 to i32
%20 = or i32 %17, %19
%21 = trunc i32 %20 to i16
store i16 %21, i16* %1
%22 = load i16, i16* %1
ret i16 %22
}

LLVM IR (-O2):
define zeroext i16 @dosversion() {
%1 = tail call i16 asm "mov $$0x30, %ah\09 \0A\09int $$0x21\09 \0A\09", "={ax},~{bx},~{cx},~{dirflag},~{fpsr},~{flags}"()
%2 = and i16 %1, 255
%3 = icmp eq i16 %2, 0
%4 = select i1 %3, i16 1, i16 %1
%5 = tail call i16 @llvm.bswap.i16(i16 %4)
ret i16 %5
}
/* Variables and functions */
int /*<<< orphan*/ puts(char *);
int /*<<< orphan*/ strcmp(char *, char *);
char *strtok(int /*<<< orphan*/ *, char *);
int /*<<< orphan*/ where(char *);
void from(char *tok) {
  char *token;
  if (!strcmp(tok, "from")) {
    token = strtok(NULL, " ");
    where(token);
  } else
    puts("From error! \n");
}


x86 assembly (clang, -O0):
<from>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
lea    0xea9(%rip),%rsi
call   1050 <strcmp@plt>
cmp    $0x0,%eax
jne    1187 <from+0x47>
xor    %eax,%eax
mov    %eax,%edi
lea    0xe95(%rip),%rsi
call   1060 <strtok@plt>
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
call   1040 <where@plt>
jmp    1193 <from+0x53>
lea    0xe79(%rip),%rdi
call   1030 <puts@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<from>:
push   %rax
lea    0xeb8(%rip),%rsi
call   1050 <strcmp@plt>
test   %eax,%eax
je     115e <from+0x1e>
lea    0xeaf(%rip),%rdi
pop    %rax
jmp    1030 <puts@plt>
lea    0xea0(%rip),%rsi
xor    %edi,%edi
call   1060 <strtok@plt>
mov    %rax,%rdi
pop    %rax
jmp    1040 <where@plt>

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

LLVM IR (-O2):
@.str = [5 x i8] c"from\00"
@.str.1 = [2 x i8] c" \00"
@.str.2 = [14 x i8] c"From error! \0A\00"
define void @from(i8* nocapture %0) {
%2 = tail call i32 @strcmp(i8* dereferenceable(1) %0, i8* dereferenceable(5) getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0))
%3 = icmp eq i32 %2, 0
br i1 %3, label %4, label %7
4: ; preds = %1
%5 = tail call i8* @strtok(i32* null, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
%6 = tail call i32 @where(i8* %5)
br label %9
7: ; preds = %1
%8 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([14 x i8], [14 x i8]* @.str.2, i64 0, i64 0))
br label %9
9: ; preds = %7, %4
ret void
}
/* Type definitions */
struct xfs_inode {
  int dummy;
};

/* Variables and functions */
int xfs_iflags_test(struct xfs_inode *, int);
int xfs_isiflocked(struct xfs_inode *ip) {
  return xfs_iflags_test(ip, (1 << 7));
}


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

x86 assembly (clang, -O2):
<xfs_isiflocked>:
mov    $0x80,%esi
jmp    1030 <xfs_iflags_test@plt>

LLVM IR (-O0):
%struct.xfs_inode = type { i32 }
define i32 @xfs_isiflocked(%struct.xfs_inode* %0) {
%2 = alloca %struct.xfs_inode*
store %struct.xfs_inode* %0, %struct.xfs_inode** %2
%3 = load %struct.xfs_inode*, %struct.xfs_inode** %2
%4 = call i32 @xfs_iflags_test(%struct.xfs_inode* %3, i32 128)
ret i32 %4
}

LLVM IR (-O2):
%struct.xfs_inode = type { i32 }
define i32 @xfs_isiflocked(%struct.xfs_inode* %0) {
%2 = tail call i32 @xfs_iflags_test(%struct.xfs_inode* %0, i32 128)
ret i32 %2
}
/* Type definitions */
typedef int /*<<< orphan*/ EVP_PKEY;

/* Variables and functions */
int /*<<< orphan*/ *do_b2i(unsigned char const **, long, int /*<<< orphan*/);
EVP_PKEY *b2i_PrivateKey(const unsigned char **in, long length) {
  return do_b2i(in, length, 0);
}


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

x86 assembly (clang, -O2):
<b2i_PrivateKey>:
xor    %edx,%edx
jmp    1030 <do_b2i@plt>

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

LLVM IR (-O2):
define i32* @b2i_PrivateKey(i8** %0, i64 %1) {
%3 = tail call i32* @do_b2i(i8** %0, i64 %1, i32 0)
ret i32* %3
}
void SSMR3GetGCPhys(void) {}


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

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

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

LLVM IR (-O2):
define void @SSMR3GetGCPhys() {
ret void
}
void Sys_Error(char *fmt, ...) {}


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

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

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

LLVM IR (-O2):
define void @Sys_Error(i8* nocapture %0, ...) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char const *, char *);
int prompt(char *msg) {
  int retValue_acc;
  int retval;
  char const *__restrict __cil_tmp4;
  {
    {
      __cil_tmp4 = (char const *__restrict)"%s\n";
      printf(__cil_tmp4, msg);
      retValue_acc = retval;
    }
    return (retValue_acc);
    return (retValue_acc);
  }
}


x86 assembly (clang, -O0):
<prompt>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
lea    0xedd(%rip),%rax
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rdi
mov    -0x8(%rbp),%rsi
call   1030 <printf@plt>
mov    -0x10(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<prompt>:
mov    %rdi,%rsi
lea    0xee6(%rip),%rdi
jmp    1030 <printf@plt>

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

LLVM IR (-O2):
@.str = [4 x i8] c"%s\0A\00"
define i32 @prompt(i8* %0) {
%2 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %0)
ret i32 undef
}
/* Type definitions */
typedef int /*<<< orphan*/ uint8_t;

/* Variables and functions */
int /*<<< orphan*/ set_port(int /*<<< orphan*/, int /*<<< orphan*/, int, int);
void io_set_interrupt_on_port(uint8_t port, uint8_t value) {
  set_port(port, value, 0x04, 0x05);
}


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

x86 assembly (clang, -O2):
<io_set_interrupt_on_port>:
mov    $0x4,%edx
mov    $0x5,%ecx
jmp    1030 <set_port@plt>

LLVM IR (-O0):
define void @io_set_interrupt_on_port(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 = load i32, i32* %4
%7 = call i32 @set_port(i32 %5, i32 %6, i32 4, i32 5)
ret void
}

LLVM IR (-O2):
define void @io_set_interrupt_on_port(i32 %0, i32 %1) {
%3 = tail call i32 @set_port(i32 %0, i32 %1, i32 4, i32 5)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ test(int);
int main(int argc, char **argv) {
  test(argc);
  return 0;
}


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

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

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

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @test(i32 %0)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ f();
int g(int);
main() {
  if (0) {
    int i;
    f();
  a:
    i = 2;
    return g(i);
  }
  goto a;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
xor    %eax,%eax
test   $0x1,%al
jne    113e <main+0x1e>
jmp    115a <main+0x3a>
mov    $0x0,%al
call   1030 <f@plt>
movl   $0x2,-0x8(%rbp)
mov    -0x8(%rbp),%edi
call   1040 <g@plt>
add    $0x10,%rsp
pop    %rbp
ret
jmp    1145 <main+0x25>

x86 assembly (clang, -O2):
<main>:
mov    $0x2,%edi
jmp    1030 <g@plt>

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
store i32 0, i32* %1
br i1 false, label %3, label %8
3: ; preds = %0
%4 = call i32 (...) @f()
br label %5
5: ; preds = %8, %3
store i32 2, i32* %2
%6 = load i32, i32* %2
%7 = call i32 @g(i32 %6)
ret i32 %7
8: ; preds = %0
br label %5
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 @g(i32 2)
ret i32 %1
}
const char *Concat_Definition(void) {
  return "struct Concat {\n"
         "  void (*concat)(var, var);\n"
         "  void (*append)(var, var);\n"
         "};\n";
}


x86 assembly (clang, -O0):
<Concat_Definition>:
push   %rbp
mov    %rsp,%rbp
lea    0xef5(%rip),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<Concat_Definition>:
lea    0xef9(%rip),%rax
ret

LLVM IR (-O0):
@.str = [76 x i8] c"struct Concat {\0A void (*concat)(var, var);\0A void (*append)(var, var);\0A};\0A\00"
define i8* @Concat_Definition() {
ret i8* getelementptr inbounds ([76 x i8], [76 x i8]* @.str, i64 0, i64 0)
}

LLVM IR (-O2):
@.str = [76 x i8] c"struct Concat {\0A void (*concat)(var, var);\0A void (*append)(var, var);\0A};\0A\00"
define i8* @Concat_Definition() {
ret i8* getelementptr inbounds ([76 x i8], [76 x i8]* @.str, i64 0, i64 0)
}
/* Variables and functions */
int /*<<< orphan*/ isp1362_probe();
int main(void) {
  isp1362_probe();
  return 0;
}


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

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

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

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @isp1362_probe()
ret i32 0
}
int test_imm_74uint8_mem(unsigned char *val) {
  return ((*val) & (0x74 << 0)) ? -20 : -40;
}


x86 assembly (clang, -O0):
<test_imm_74uint8_mem>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movzbl (%rax),%edx
and    $0x74,%edx
mov    $0xffffffd8,%eax
mov    $0xffffffec,%ecx
cmp    $0x0,%edx
cmovne %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_imm_74uint8_mem>:
testb  $0x74,(%rdi)
mov    $0xffffffd8,%ecx
mov    $0xffffffec,%eax
cmove  %ecx,%eax
ret

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

LLVM IR (-O2):
define i32 @test_imm_74uint8_mem(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = and i8 %2, 116
%4 = icmp eq i8 %3, 0
%5 = select i1 %4, i32 -40, i32 -20
ret i32 %5
}