xunge/DecIR huggingface dataset:
void fc35(int n) {
  {
    typedef int(*b)[n];
  a : {
    typedef int(*c)[n];
    goto a;
    0;
  }
    {
      typedef int(*d)[n];
      0;
    };
    typedef int(*e)[n];
    0;
  };
  {
    typedef int(*f)[n];
    {
      typedef int(*g)[n];
      0;
    };
    {
      typedef int(*h)[n];
      0;
    };
    ;
    typedef int(*i)[n];
    0;
  };
  ;
  typedef int(*j)[n];
  0;
}


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

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

LLVM IR (-O0):
define void @fc35(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = zext i32 %3 to i64
br label %5
5: ; preds = %5, %1
%6 = load i32, i32* %2
%7 = zext i32 %6 to i64
br label %5
8: ; No predecessors!
%9 = load i32, i32* %2
%10 = zext i32 %9 to i64
%11 = load i32, i32* %2
%12 = zext i32 %11 to i64
%13 = load i32, i32* %2
%14 = zext i32 %13 to i64
%15 = load i32, i32* %2
%16 = zext i32 %15 to i64
%17 = load i32, i32* %2
%18 = zext i32 %17 to i64
%19 = load i32, i32* %2
%20 = zext i32 %19 to i64
%21 = load i32, i32* %2
%22 = zext i32 %21 to i64
ret void
}

LLVM IR (-O2):
define void @fc35(i32 %0) {
br label %2
2: ; preds = %2, %1
br label %2
}
/* Variables and functions */
int /*<<< orphan*/ assert(int);
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fflush(int /*<<< orphan*/);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
void *malloc(int);
int /*<<< orphan*/ stderr;
void *emalloc(int n) {
  void *p;
  assert(n >= 0);
  p = malloc(n);
  if (p == NULL) {
    fprintf(stderr, "Couldn't allocate memory\n");
    fflush(stderr);
    exit(1);
  }
  return p;
}


x86 assembly (clang, -O0):
<emalloc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
cmpl   $0x0,-0x4(%rbp)
setge  %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <assert@plt>
mov    -0x4(%rbp),%edi
call   1050 <malloc@plt>
mov    %rax,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
jne    11b0 <emalloc+0x60>
mov    0x2e56(%rip),%rax
mov    (%rax),%edi
lea    0xe6d(%rip),%rsi
call   1040 <fprintf@plt>
mov    0x2e41(%rip),%rax
mov    (%rax),%edi
call   1060 <fflush@plt>
mov    $0x1,%edi
call   1070 <exit@plt>
mov    -0x10(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<emalloc>:
push   %rbx
mov    %edi,%ebx
not    %edi
shr    $0x1f,%edi
call   1030 <assert@plt>
mov    %ebx,%edi
call   1050 <malloc@plt>
test   %rax,%rax
je     116b <emalloc+0x1b>
pop    %rbx
ret
mov    0x2e6e(%rip),%rbx
mov    (%rbx),%edi
lea    0xe85(%rip),%rsi
call   1040 <fprintf@plt>
mov    (%rbx),%edi
call   1060 <fflush@plt>
mov    $0x1,%edi
call   1070 <exit@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [26 x i8] c"Couldn't allocate memory\0A\00"
define i8* @emalloc(i32 %0) {
%2 = alloca i32
%3 = alloca i8*
store i32 %0, i32* %2
%4 = load i32, i32* %2
%5 = icmp sge i32 %4, 0
%6 = zext i1 %5 to i32
%7 = call i32 @assert(i32 %6)
%8 = load i32, i32* %2
%9 = call i8* @malloc(i32 %8)
store i8* %9, i8** %3
%10 = load i8*, i8** %3
%11 = icmp eq i8* %10, null
br i1 %11, label %12, label %18
12: ; preds = %1
%13 = load i32, i32* @stderr
%14 = call i32 @fprintf(i32 %13, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str, i64 0, i64 0))
%15 = load i32, i32* @stderr
%16 = call i32 @fflush(i32 %15)
%17 = call i32 @exit(i32 1)
unreachable
18: ; preds = %1
%19 = load i8*, i8** %3
ret i8* %19
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [26 x i8] c"Couldn't allocate memory\0A\00"
define noalias i8* @emalloc(i32 %0) {
%2 = xor i32 %0, -1
%3 = lshr i32 %2, 31
%4 = tail call i32 @assert(i32 %3)
%5 = tail call i8* @malloc(i32 %0)
%6 = icmp eq i8* %5, null
br i1 %6, label %7, label %13
7: ; preds = %1
%8 = load i32, i32* @stderr
%9 = tail call i32 @fprintf(i32 %8, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str, i64 0, i64 0))
%10 = load i32, i32* @stderr
%11 = tail call i32 @fflush(i32 %10)
%12 = tail call i32 @exit(i32 1)
unreachable
13: ; preds = %1
ret i8* %5
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ perror(char *);
void error(char *err) {
  perror(err);
  exit(1);
}


x86 assembly (clang, -O0):
<error>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <perror@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<error>:
push   %rax
call   1030 <perror@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
define void @error(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 @perror(i8* %3)
%5 = call i32 @exit(i32 1)
unreachable
}

LLVM IR (-O2):
define void @error(i8* nocapture %0) {
%2 = tail call i32 @perror(i8* %0)
%3 = tail call i32 @exit(i32 1)
unreachable
}
int _is_blank(char c) { return (' ' == c) || ('\t' == c); }


x86 assembly (clang, -O0):
<_is_blank>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movsbl -0x1(%rbp),%edx
mov    $0x1,%al
mov    $0x20,%ecx
cmp    %edx,%ecx
mov    %al,-0x2(%rbp)
je     1131 <_is_blank+0x31>
movsbl -0x1(%rbp),%ecx
mov    $0x9,%eax
cmp    %ecx,%eax
sete   %al
mov    %al,-0x2(%rbp)
mov    -0x2(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<_is_blank>:
cmp    $0x20,%dil
sete   %al
cmp    $0x9,%dil
sete   %cl
or     %al,%cl
movzbl %cl,%eax
ret

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

LLVM IR (-O2):
define i32 @_is_blank(i8 signext %0) {
%2 = icmp eq i8 %0, 32
%3 = icmp eq i8 %0, 9
%4 = or i1 %2, %3
%5 = zext i1 %4 to i32
ret i32 %5
}
int isgraph(int x) {
  unsigned char c = x & 0xff;
  return (c >= 33 && c <= 126) || c >= 161;
}


x86 assembly (clang, -O0):
<isgraph>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
and    $0xff,%eax
mov    %al,-0x5(%rbp)
movzbl -0x5(%rbp),%eax
cmp    $0x21,%eax
jl     1131 <isgraph+0x31>
movzbl -0x5(%rbp),%ecx
mov    $0x1,%al
cmp    $0x7e,%ecx
mov    %al,-0x6(%rbp)
jle    1140 <isgraph+0x40>
movzbl -0x5(%rbp),%eax
cmp    $0xa1,%eax
setge  %al
mov    %al,-0x6(%rbp)
mov    -0x6(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<isgraph>:
movzbl %dil,%eax
lea    -0x21(%rax),%ecx
cmp    $0x5e,%ecx
setb   %cl
cmp    $0xa1,%eax
setae  %al
or     %cl,%al
movzbl %al,%eax
ret

LLVM IR (-O0):
define i32 @isgraph(i32 %0) {
%2 = alloca i32
%3 = alloca i8
store i32 %0, i32* %2
%4 = load i32, i32* %2
%5 = and i32 %4, 255
%6 = trunc i32 %5 to i8
store i8 %6, i8* %3
%7 = load i8, i8* %3
%8 = zext i8 %7 to i32
%9 = icmp sge i32 %8, 33
br i1 %9, label %10, label %14
10: ; preds = %1
%11 = load i8, i8* %3
%12 = zext i8 %11 to i32
%13 = icmp sle i32 %12, 126
br i1 %13, label %18, label %14
14: ; preds = %10, %1
%15 = load i8, i8* %3
%16 = zext i8 %15 to i32
%17 = icmp sge i32 %16, 161
br label %18
18: ; preds = %14, %10
%19 = phi i1 [ true, %10 ], [ %17, %14 ]
%20 = zext i1 %19 to i32
ret i32 %20
}

LLVM IR (-O2):
define i32 @isgraph(i32 %0) {
%2 = and i32 %0, 255
%3 = add nsw i32 %2, -33
%4 = icmp ult i32 %3, 94
%5 = icmp ugt i32 %2, 160
%6 = or i1 %5, %4
%7 = zext i1 %6 to i32
ret i32 %7
}
int fcntl(int fd, int cmd, ...) { return -1; }


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

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

LLVM IR (-O0):
define i32 @fcntl(i32 %0, i32 %1, ...) {
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
ret i32 -1
}

LLVM IR (-O2):
define i32 @fcntl(i32 %0, i32 %1, ...) {
ret i32 -1
}
void XtNameToWidget() {}


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

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

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

LLVM IR (-O2):
define void @XtNameToWidget() {
ret void
}
/* Type definitions */
struct icmp {
  int icmp_id;
};

/* Variables and functions */
int get_icmp_id(struct icmp *self) { return self->icmp_id; }


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

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

LLVM IR (-O0):
%struct.icmp = type { i32 }
define i32 @get_icmp_id(%struct.icmp* %0) {
%2 = alloca %struct.icmp*
store %struct.icmp* %0, %struct.icmp** %2
%3 = load %struct.icmp*, %struct.icmp** %2
%4 = getelementptr inbounds %struct.icmp, %struct.icmp* %3, i32 0, i32 0
%5 = load i32, i32* %4
ret i32 %5
}

LLVM IR (-O2):
%struct.icmp = type { i32 }
define i32 @get_icmp_id(%struct.icmp* nocapture %0) {
%2 = getelementptr inbounds %struct.icmp, %struct.icmp* %0, i64 0, i32 0
%3 = load i32, i32* %2
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ i430lx_nx_write(int /*<<< orphan*/, int, int,
                                   int /*<<< orphan*/ *);
void i430lx_nx_pci_reset(void) { i430lx_nx_write(0, 0x59, 0x00, NULL); }


x86 assembly (clang, -O0):
<i430lx_nx_pci_reset>:
push   %rbp
mov    %rsp,%rbp
xor    %edx,%edx
mov    $0x59,%esi
xor    %eax,%eax
mov    %eax,%ecx
mov    %edx,%edi
call   1030 <i430lx_nx_write@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<i430lx_nx_pci_reset>:
xor    %edi,%edi
mov    $0x59,%esi
xor    %edx,%edx
xor    %ecx,%ecx
jmp    1030 <i430lx_nx_write@plt>

LLVM IR (-O0):
define void @i430lx_nx_pci_reset() {
%1 = call i32 @i430lx_nx_write(i32 0, i32 89, i32 0, i32* null)
ret void
}

LLVM IR (-O2):
define void @i430lx_nx_pci_reset() {
%1 = tail call i32 @i430lx_nx_write(i32 0, i32 89, i32 0, i32* null)
ret void
}
int maior(int n1, int n2) {
  if (n1 > n2)
    return n1;
  else
    return n2;
}


x86 assembly (clang, -O0):
<maior>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%eax
cmp    -0xc(%rbp),%eax
jle    1121 <maior+0x21>
mov    -0x8(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    1127 <maior+0x27>
mov    -0xc(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<maior>:
mov    %esi,%eax
cmp    %esi,%edi
cmovg  %edi,%eax
ret

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

LLVM IR (-O2):
define i32 @maior(i32 %0, i32 %1) {
%3 = icmp sgt i32 %0, %1
%4 = select i1 %3, i32 %0, i32 %1
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ free(double *);
void free_1d_double(double *d) { free(d); }


x86 assembly (clang, -O0):
<free_1d_double>:
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):
<free_1d_double>:
jmp    1030 <free@plt>

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

LLVM IR (-O2):
define void @free_1d_double(double* nocapture %0) {
%2 = tail call i32 @free(double* %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ free(char *);
int /*<<< orphan*/ printf(char *, ...);
int /*<<< orphan*/ scanf(char *, short *);
short getAMenuInput(char *message) {
  printf("%s", message);
  free(message);
  message = NULL;
  short input;
  printf("Enter a menu option: ");
  scanf("%hi", &input);
  return input;
}


x86 assembly (clang, -O0):
<getAMenuInput>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rsi
lea    0xeb9(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    -0x8(%rbp),%rdi
call   1030 <free@plt>
movq   $0x0,-0x8(%rbp)
lea    0xe9d(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
lea    0xea5(%rip),%rdi
lea    -0xa(%rbp),%rsi
call   1050 <scanf@plt>
movswl -0xa(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<getAMenuInput>:
push   %rbx
sub    $0x10,%rsp
mov    %rdi,%rbx
lea    0xec1(%rip),%rdi
mov    %rbx,%rsi
xor    %eax,%eax
call   1040 <printf@plt>
mov    %rbx,%rdi
call   1030 <free@plt>
lea    0xeab(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xeb3(%rip),%rdi
lea    0xe(%rsp),%rsi
call   1050 <scanf@plt>
movzwl 0xe(%rsp),%eax
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@.str = [3 x i8] c"%s\00"
@.str.1 = [22 x i8] c"Enter a menu option: \00"
@.str.2 = [4 x i8] c"%hi\00"
define signext i16 @getAMenuInput(i8* %0) {
%2 = alloca i8*
%3 = alloca i16
store i8* %0, i8** %2
%4 = load i8*, i8** %2
%5 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* %4)
%6 = load i8*, i8** %2
%7 = call i32 @free(i8* %6)
store i8* null, i8** %2
%8 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.1, i64 0, i64 0))
%9 = call i32 @scanf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0), i16* %3)
%10 = load i16, i16* %3
ret i16 %10
}

LLVM IR (-O2):
@.str = [3 x i8] c"%s\00"
@.str.1 = [22 x i8] c"Enter a menu option: \00"
@.str.2 = [4 x i8] c"%hi\00"
define signext i16 @getAMenuInput(i8* %0) {
%2 = alloca i16
%3 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* %0)
%4 = tail call i32 @free(i8* %0)
%5 = bitcast i16* %2 to i8*
%6 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([22 x i8], [22 x i8]* @.str.1, i64 0, i64 0))
%7 = call i32 @scanf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0), i16* %2)
%8 = load i16, i16* %2
ret i16 %8
}
void enable_l1_icache(void) {}


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

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

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

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

/* Variables and functions */
scalar_t__ memcpy(int /*<<< orphan*/ *, int /*<<< orphan*/ const *, size_t);
wchar_t *wmemcpy(wchar_t *d, const wchar_t *s, size_t n) {
  return (wchar_t *)memcpy(d, s, n * sizeof(wchar_t));
}


x86 assembly (clang, -O0):
<wmemcpy>:
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
shl    $0x2,%rdx
call   1030 <memcpy@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<wmemcpy>:
shl    $0x2,%rdx
jmp    1030 <memcpy@plt>

LLVM IR (-O0):
define i32* @wmemcpy(i32* %0, i32* %1, i64 %2) {
%4 = alloca i32*
%5 = alloca i32*
%6 = alloca i64
store i32* %0, i32** %4
store i32* %1, i32** %5
store i64 %2, i64* %6
%7 = load i32*, i32** %4
%8 = load i32*, i32** %5
%9 = load i64, i64* %6
%10 = mul i64 %9, 4
%11 = call i64 @memcpy(i32* %7, i32* %8, i64 %10)
%12 = inttoptr i64 %11 to i32*
ret i32* %12
}

LLVM IR (-O2):
define i32* @wmemcpy(i32* %0, i32* %1, i64 %2) {
%4 = shl i64 %2, 2
%5 = tail call i64 @memcpy(i32* %0, i32* %1, i64 %4)
%6 = inttoptr i64 %5 to i32*
ret i32* %6
}
FNIEMOP_DEF(iemOp_frstpm) {
  IEMOP_MNEMONIC("frstpm (80287XL/ign)");
  return IEMOP_RAISE_INVALID_OPCODE();
}


x86 assembly (clang, -O0):
<FNIEMOP_DEF>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
lea    0xece(%rip),%rdi
mov    $0x0,%al
call   1040 <IEMOP_MNEMONIC@plt>
mov    $0x0,%al
call   1030 <IEMOP_RAISE_INVALID_OPCODE@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<FNIEMOP_DEF>:
push   %rax
lea    0xed8(%rip),%rdi
xor    %eax,%eax
call   1040 <IEMOP_MNEMONIC@plt>
xor    %eax,%eax
pop    %rcx
jmp    1030 <IEMOP_RAISE_INVALID_OPCODE@plt>

LLVM IR (-O0):
@.str = [21 x i8] c"frstpm (80287XL/ign)\00"
define i32 @FNIEMOP_DEF(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = call i32 (i8*, ...) bitcast (i32 (...)* @IEMOP_MNEMONIC to i32 (i8*, ...)*)(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str, i64 0, i64 0))
%4 = call i32 (...) @IEMOP_RAISE_INVALID_OPCODE()
ret i32 %4
}

LLVM IR (-O2):
@.str = [21 x i8] c"frstpm (80287XL/ign)\00"
define i32 @FNIEMOP_DEF(i32 %0) {
%2 = tail call i32 (i8*, ...) bitcast (i32 (...)* @IEMOP_MNEMONIC to i32 (i8*, ...)*)(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str, i64 0, i64 0))
%3 = tail call i32 (...) @IEMOP_RAISE_INVALID_OPCODE()
ret i32 %3
}
void omp_set_num_threads(int i) { return; }


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

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

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

LLVM IR (-O2):
define void @omp_set_num_threads(i32 %0) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ A7_command_writeport(char *);
void A7board_print(char *command) { A7_command_writeport(command); }


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

x86 assembly (clang, -O2):
<A7board_print>:
jmp    1030 <A7_command_writeport@plt>

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

LLVM IR (-O2):
define void @A7board_print(i8* %0) {
%2 = tail call i32 @A7_command_writeport(i8* %0)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ uint64_t;

/* Variables and functions */
uint64_t end_time(void) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @end_time() {
ret i32 0
}
/* Variables and functions */
int lsp_imp_byteswap_ushort(unsigned long);
unsigned long lsp_imp_byteswap_ulong(unsigned long x) {
  return ((unsigned long)(lsp_imp_byteswap_ushort(x & 0xFFFF) << 16)) |
         ((unsigned long)(lsp_imp_byteswap_ushort(x >> 16)));
}


x86 assembly (clang, -O0):
<lsp_imp_byteswap_ulong>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
and    $0xffff,%rdi
call   1030 <lsp_imp_byteswap_ushort@plt>
shl    $0x10,%eax
cltq
mov    %rax,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
shr    $0x10,%rdi
call   1030 <lsp_imp_byteswap_ushort@plt>
mov    %eax,%ecx
mov    -0x10(%rbp),%rax
movslq %ecx,%rcx
or     %rcx,%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<lsp_imp_byteswap_ulong>:
push   %rbp
push   %rbx
push   %rax
mov    %rdi,%rbx
movzwl %bx,%edi
call   1030 <lsp_imp_byteswap_ushort@plt>
mov    %eax,%ebp
shl    $0x10,%ebp
shr    $0x10,%rbx
mov    %rbx,%rdi
call   1030 <lsp_imp_byteswap_ushort@plt>
or     %ebp,%eax
cltq
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
define i64 @lsp_imp_byteswap_ulong(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = load i64, i64* %2
%4 = and i64 %3, 65535
%5 = call i32 @lsp_imp_byteswap_ushort(i64 %4)
%6 = shl i32 %5, 16
%7 = sext i32 %6 to i64
%8 = load i64, i64* %2
%9 = lshr i64 %8, 16
%10 = call i32 @lsp_imp_byteswap_ushort(i64 %9)
%11 = sext i32 %10 to i64
%12 = or i64 %7, %11
ret i64 %12
}

LLVM IR (-O2):
define i64 @lsp_imp_byteswap_ulong(i64 %0) {
%2 = and i64 %0, 65535
%3 = tail call i32 @lsp_imp_byteswap_ushort(i64 %2)
%4 = shl i32 %3, 16
%5 = lshr i64 %0, 16
%6 = tail call i32 @lsp_imp_byteswap_ushort(i64 %5)
%7 = or i32 %4, %6
%8 = sext i32 %7 to i64
ret i64 %8
}
/* Forward declarations */
typedef struct TYPE_4__ TYPE_2__;
typedef struct TYPE_3__ TYPE_1__;

/* Type definitions */
struct TYPE_3__ {
  scalar_t__ serial;
};
struct TYPE_4__ {
  TYPE_1__ xgraphicsexpose;
};
typedef TYPE_2__ XEvent;

/* Variables and functions */
unsigned long get_XEvent_xgraphicsexpose_serial(void *_p) {
  return (unsigned long)((XEvent *)_p)->xgraphicsexpose.serial;
}


x86 assembly (clang, -O0):
<get_XEvent_xgraphicsexpose_serial>:
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_xgraphicsexpose_serial>:
mov    (%rdi),%rax
ret

LLVM IR (-O0):
%struct.TYPE_4__ = type { %struct.TYPE_3__ }
%struct.TYPE_3__ = type { i64 }
define i64 @get_XEvent_xgraphicsexpose_serial(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_xgraphicsexpose_serial(i8* nocapture %0) {
%2 = bitcast i8* %0 to i64*
%3 = load i64, i64* %2
ret i64 %3
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char *);
int /*<<< orphan*/ stderr;
void usage(char *progname) {
  fprintf(stderr,
          "usage:  %s cid port\n"
          "\nWhere:\n\t"
          "cid     Context Identifier of the server\n\t"
          "port    Server port\n",
          progname);
  exit(1);
}


x86 assembly (clang, -O0):
<usage>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    0x2ead(%rip),%rax
mov    (%rax),%edi
mov    -0x8(%rbp),%rdx
lea    0xec0(%rip),%rsi
call   1030 <fprintf@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<usage>:
push   %rax
mov    %rdi,%rdx
mov    0x2eb5(%rip),%rax
mov    (%rax),%edi
lea    0xecc(%rip),%rsi
call   1030 <fprintf@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [92 x i8] c"usage: %s cid port\0A\0AWhere:\0A\09cid Context Identifier of the server\0A\09port Server port\0A\00"
define void @usage(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i32, i32* @stderr
%4 = load i8*, i8** %2
%5 = call i32 @fprintf(i32 %3, i8* getelementptr inbounds ([92 x i8], [92 x i8]* @.str, i64 0, i64 0), i8* %4)
%6 = call i32 @exit(i32 1)
unreachable
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [92 x i8] c"usage: %s cid port\0A\0AWhere:\0A\09cid Context Identifier of the server\0A\09port Server port\0A\00"
define void @usage(i8* %0) {
%2 = load i32, i32* @stderr
%3 = tail call i32 @fprintf(i32 %2, i8* getelementptr inbounds ([92 x i8], [92 x i8]* @.str, i64 0, i64 0), i8* %0)
%4 = tail call i32 @exit(i32 1)
unreachable
}
/* Type definitions */
typedef int /*<<< orphan*/ line;

/* Variables and functions */
int /*<<< orphan*/ fflush(int /*<<< orphan*/);
int /*<<< orphan*/ fgets(char *, int, int /*<<< orphan*/);
int /*<<< orphan*/ stdin;
int /*<<< orphan*/ stdout;
int yes(void) {
  char line[20];
  fflush(stdout);
  if (!fgets(line, sizeof(line), stdin) || (*line != 'y' && *line != 'Y'))
    return (0);
  return (1);
}


x86 assembly (clang, -O0):
<yes>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    0x2ea9(%rip),%rax
mov    (%rax),%edi
call   1040 <fflush@plt>
lea    -0x20(%rbp),%rdi
mov    0x2ea7(%rip),%rax
mov    (%rax),%edx
mov    $0x14,%esi
call   1030 <fgets@plt>
cmp    $0x0,%eax
je     1170 <yes+0x50>
movsbl -0x20(%rbp),%eax
cmp    $0x79,%eax
je     117c <yes+0x5c>
movsbl -0x20(%rbp),%eax
cmp    $0x59,%eax
je     117c <yes+0x5c>
movl   $0x0,-0x4(%rbp)
jmp    1183 <yes+0x63>
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<yes>:
sub    $0x18,%rsp
mov    0x2ead(%rip),%rax
mov    (%rax),%edi
call   1040 <fflush@plt>
mov    0x2eaf(%rip),%rax
mov    (%rax),%edx
mov    %rsp,%rdi
mov    $0x14,%esi
call   1030 <fgets@plt>
test   %eax,%eax
setne  %al
mov    (%rsp),%cl
and    $0xdf,%cl
cmp    $0x59,%cl
sete   %cl
and    %al,%cl
movzbl %cl,%eax
add    $0x18,%rsp
ret

LLVM IR (-O0):
@stdout = global i32 0
@stdin = global i32 0
define i32 @yes() {
%1 = alloca i32
%2 = alloca [20 x i8]
%3 = load i32, i32* @stdout
%4 = call i32 @fflush(i32 %3)
%5 = getelementptr inbounds [20 x i8], [20 x i8]* %2, i64 0, i64 0
%6 = load i32, i32* @stdin
%7 = call i32 @fgets(i8* %5, i32 20, i32 %6)
%8 = icmp ne i32 %7, 0
br i1 %8, label %9, label %19
9: ; preds = %0
%10 = getelementptr inbounds [20 x i8], [20 x i8]* %2, i64 0, i64 0
%11 = load i8, i8* %10
%12 = sext i8 %11 to i32
%13 = icmp ne i32 %12, 121
br i1 %13, label %14, label %20
14: ; preds = %9
%15 = getelementptr inbounds [20 x i8], [20 x i8]* %2, i64 0, i64 0
%16 = load i8, i8* %15
%17 = sext i8 %16 to i32
%18 = icmp ne i32 %17, 89
br i1 %18, label %19, label %20
19: ; preds = %14, %0
store i32 0, i32* %1
br label %21
20: ; preds = %14, %9
store i32 1, i32* %1
br label %21
21: ; preds = %20, %19
%22 = load i32, i32* %1
ret i32 %22
}

LLVM IR (-O2):
@stdout = global i32 0
@stdin = global i32 0
define i32 @yes() {
%1 = alloca [20 x i8]
%2 = getelementptr inbounds [20 x i8], [20 x i8]* %1, i64 0, i64 0
%3 = load i32, i32* @stdout
%4 = tail call i32 @fflush(i32 %3)
%5 = load i32, i32* @stdin
%6 = call i32 @fgets(i8* %2, i32 20, i32 %5)
%7 = icmp ne i32 %6, 0
%8 = load i8, i8* %2
%9 = and i8 %8, -33
%10 = icmp eq i8 %9, 89
%11 = select i1 %7, i1 %10, i1 false
%12 = zext i1 %11 to i32
ret i32 %12
}
/* Variables and functions */
int /*<<< orphan*/ toxic();
int main() { toxic(); }


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

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

LLVM IR (-O0):
define i32 @main() {
%1 = call i32 (...) @toxic()
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @toxic()
ret i32 0
}
/* Type definitions */
typedef int /*<<< orphan*/ uint32_t;

/* Variables and functions */
int /*<<< orphan*/ pigpio_command(int, int, int /*<<< orphan*/,
                                  int /*<<< orphan*/, int);
uint32_t read_bank_2(int pi) { return pigpio_command(pi, 11, 0, 0, 1); }


x86 assembly (clang, -O0):
<read_bank_2>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
mov    $0xb,%esi
xor    %ecx,%ecx
mov    $0x1,%r8d
mov    %ecx,%edx
call   1030 <pigpio_command@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<read_bank_2>:
mov    $0xb,%esi
xor    %edx,%edx
xor    %ecx,%ecx
mov    $0x1,%r8d
jmp    1030 <pigpio_command@plt>

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

LLVM IR (-O2):
define i32 @read_bank_2(i32 %0) {
%2 = tail call i32 @pigpio_command(i32 %0, i32 11, i32 0, i32 0, i32 1)
ret i32 %2
}
/* Type definitions */
struct sensor_data {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ sensor_data_returned(struct sensor_data *);
void notify_sensor_data_returned(struct sensor_data *sd) {
  sensor_data_returned(sd);
}


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

x86 assembly (clang, -O2):
<notify_sensor_data_returned>:
jmp    1030 <sensor_data_returned@plt>

LLVM IR (-O0):
%struct.sensor_data = type { i32 }
define void @notify_sensor_data_returned(%struct.sensor_data* %0) {
%2 = alloca %struct.sensor_data*
store %struct.sensor_data* %0, %struct.sensor_data** %2
%3 = load %struct.sensor_data*, %struct.sensor_data** %2
%4 = call i32 @sensor_data_returned(%struct.sensor_data* %3)
ret void
}

LLVM IR (-O2):
%struct.sensor_data = type { i32 }
define void @notify_sensor_data_returned(%struct.sensor_data* %0) {
%2 = tail call i32 @sensor_data_returned(%struct.sensor_data* %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
void main() {
  int a = 3, b = 5;
  printf("%d", a + b > b ? a + b : b);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x3,-0x4(%rbp)
movl   $0x5,-0x8(%rbp)
mov    -0x4(%rbp),%eax
add    -0x8(%rbp),%eax
cmp    -0x8(%rbp),%eax
jle    1143 <main+0x33>
mov    -0x4(%rbp),%eax
add    -0x8(%rbp),%eax
mov    %eax,-0xc(%rbp)
jmp    1149 <main+0x39>
mov    -0x8(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%esi
lea    0xead(%rip),%rdi
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
lea    0xee9(%rip),%rdi
mov    $0x8,%esi
jmp    1030 <printf@plt>

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

LLVM IR (-O2):
@.str = [3 x i8] c"%d\00"
define void @main() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 8)
ret void
}
int netadd(int a, int b) { return a + b; }


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

x86 assembly (clang, -O2):
<netadd>:
lea    (%rdi,%rsi,1),%eax
ret

LLVM IR (-O0):
define i32 @netadd(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 = add nsw i32 %5, %6
ret i32 %7
}

LLVM IR (-O2):
define i32 @netadd(i32 %0, i32 %1) {
%3 = add nsw i32 %1, %0
ret i32 %3
}
int printk(char const *fmt, ...) {
  { return (0); }
}


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

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

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

LLVM IR (-O2):
define i32 @printk(i8* nocapture readnone %0, ...) {
ret i32 0
}
void get_lib_names(char *names[], unsigned int *cnt) { *cnt = 0; }


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

x86 assembly (clang, -O2):
<get_lib_names>:
movl   $0x0,(%rsi)
ret

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

LLVM IR (-O2):
define void @get_lib_names(i8** nocapture readnone %0, i32* nocapture writeonly %1) {
store i32 0, i32* %1
ret void
}
void do_write_v(const unsigned char *buf, unsigned char *ptr, int i, int j) {
  *ptr = buf[i + 160 + j];
}


x86 assembly (clang, -O0):
<do_write_v>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    %ecx,-0x18(%rbp)
mov    -0x8(%rbp),%rax
mov    -0x14(%rbp),%ecx
add    $0xa0,%ecx
add    -0x18(%rbp),%ecx
movslq %ecx,%rcx
mov    (%rax,%rcx,1),%cl
mov    -0x10(%rbp),%rax
mov    %cl,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<do_write_v>:
lea    (%rdx,%rcx,1),%eax
add    $0xa0,%eax
cltq
mov    (%rdi,%rax,1),%al
mov    %al,(%rsi)
ret

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

LLVM IR (-O2):
define void @do_write_v(i8* nocapture %0, i8* nocapture writeonly %1, i32 %2, i32 %3) {
%5 = add nsw i32 %2, 160
%6 = add nsw i32 %5, %3
%7 = sext i32 %6 to i64
%8 = getelementptr inbounds i8, i8* %0, i64 %7
%9 = load i8, i8* %8
store i8 %9, i8* %1
ret void
}
int x_error(c)
int c;
{
  x_e_putc(0x07);
  return 0;
}


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

x86 assembly (clang, -O2):
<x_error>:
push   %rax
mov    $0x7,%edi
xor    %eax,%eax
call   1030 <x_e_putc@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @x_error(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = call i32 (i32, ...) bitcast (i32 (...)* @x_e_putc to i32 (i32, ...)*)(i32 7)
ret i32 0
}

LLVM IR (-O2):
define i32 @x_error(i32 %0) {
%2 = tail call i32 (i32, ...) bitcast (i32 (...)* @x_e_putc to i32 (i32, ...)*)(i32 7)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ *strchr(char const *, int);
int option_resolution_contains(const char *specification, int option_char) {
  return strchr(specification, option_char) != NULL;
}


x86 assembly (clang, -O0):
<option_resolution_contains>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
call   1030 <strchr@plt>
cmp    $0x0,%rax
setne  %al
and    $0x1,%al
movzbl %al,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<option_resolution_contains>:
push   %rax
call   1030 <strchr@plt>
xor    %ecx,%ecx
test   %rax,%rax
setne  %cl
mov    %ecx,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @option_resolution_contains(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i32
store i8* %0, i8** %3
store i32 %1, i32* %4
%5 = load i8*, i8** %3
%6 = load i32, i32* %4
%7 = call i32* @strchr(i8* %5, i32 %6)
%8 = icmp ne i32* %7, null
%9 = zext i1 %8 to i32
ret i32 %9
}

LLVM IR (-O2):
define i32 @option_resolution_contains(i8* %0, i32 %1) {
%3 = tail call i32* @strchr(i8* %0, i32 %1)
%4 = icmp ne i32* %3, null
%5 = zext i1 %4 to i32
ret i32 %5
}
__attribute__((always_)) int use_pci_vector(void) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @use_pci_vector() {
ret i32 0
}
/* Type definitions */
typedef int /*<<< orphan*/ uint8_t;

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


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

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

LLVM IR (-O0):
define void @set_interrupt_on_port(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 @set_port(i32 %7, i32 %8, i32 %9, i32 4, i32 5)
ret void
}

LLVM IR (-O2):
define void @set_interrupt_on_port(i32 %0, i32 %1, i32 %2) {
%4 = tail call i32 @set_port(i32 %0, i32 %1, i32 %2, i32 4, i32 5)
ret void
}
int isinf(double d) {
  union {
    unsigned long long l;
    double d;
  } u;
  u.d = d;
  return (u.l == 0x7FF0000000000000ll   ? 1
          : u.l == 0xFFF0000000000000ll ? -1
                                        : 0);
}


x86 assembly (clang, -O0):
<isinf>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
movsd  %xmm0,-0x10(%rbp)
movabs $0x7ff0000000000000,%rax
cmp    %rax,-0x10(%rbp)
jne    1134 <isinf+0x34>
mov    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    1152 <isinf+0x52>
mov    -0x10(%rbp),%rdx
movabs $0xfff0000000000000,%rsi
xor    %eax,%eax
mov    $0xffffffff,%ecx
cmp    %rsi,%rdx
cmove  %ecx,%eax
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<isinf>:
movq   %xmm0,%rax
movabs $0xfff0000000000000,%rcx
xor    %edx,%edx
cmp    %rcx,%rax
sete   %dl
neg    %edx
movabs $0x7ff0000000000000,%rcx
cmp    %rcx,%rax
mov    $0x1,%eax
cmovne %edx,%eax
ret

LLVM IR (-O0):
%union.anon = type { i64 }
define i32 @isinf(double %0) {
%2 = alloca double
%3 = alloca %union.anon
store double %0, double* %2
%4 = load double, double* %2
%5 = bitcast %union.anon* %3 to double*
store double %4, double* %5
%6 = bitcast %union.anon* %3 to i64*
%7 = load i64, i64* %6
%8 = icmp eq i64 %7, 9218868437227405312
br i1 %8, label %9, label %10
9: ; preds = %1
br label %16
10: ; preds = %1
%11 = bitcast %union.anon* %3 to i64*
%12 = load i64, i64* %11
%13 = icmp eq i64 %12, -4503599627370496
%14 = zext i1 %13 to i64
%15 = select i1 %13, i32 -1, i32 0
br label %16
16: ; preds = %10, %9
%17 = phi i32 [ 1, %9 ], [ %15, %10 ]
ret i32 %17
}

LLVM IR (-O2):
define i32 @isinf(double %0) {
%2 = bitcast double %0 to i64
%3 = icmp eq i64 %2, 9218868437227405312
%4 = icmp eq i64 %2, -4503599627370496
%5 = sext i1 %4 to i32
%6 = select i1 %3, i32 1, i32 %5
ret i32 %6
}
/* Variables and functions */
unsigned int MAKE_INT_16(int /*<<< orphan*/);
int /*<<< orphan*/ m68ki_push_32(unsigned int);
int /*<<< orphan*/ m68ki_read_imm_16();
void m68k_op_pea_32_aw(void) {
  unsigned int ea = MAKE_INT_16(m68ki_read_imm_16());
  m68ki_push_32(ea);
}


x86 assembly (clang, -O0):
<m68k_op_pea_32_aw>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1040 <m68ki_read_imm_16@plt>
mov    %eax,%edi
call   1030 <MAKE_INT_16@plt>
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%edi
call   1050 <m68ki_push_32@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<m68k_op_pea_32_aw>:
push   %rax
xor    %eax,%eax
call   1040 <m68ki_read_imm_16@plt>
mov    %eax,%edi
call   1030 <MAKE_INT_16@plt>
mov    %eax,%edi
pop    %rax
jmp    1050 <m68ki_push_32@plt>

LLVM IR (-O0):
define void @m68k_op_pea_32_aw() {
%1 = alloca i32
%2 = call i32 (...) @m68ki_read_imm_16()
%3 = call i32 @MAKE_INT_16(i32 %2)
store i32 %3, i32* %1
%4 = load i32, i32* %1
%5 = call i32 @m68ki_push_32(i32 %4)
ret void
}

LLVM IR (-O2):
define void @m68k_op_pea_32_aw() {
%1 = tail call i32 (...) @m68ki_read_imm_16()
%2 = tail call i32 @MAKE_INT_16(i32 %1)
%3 = tail call i32 @m68ki_push_32(i32 %2)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ uint32_t;
typedef int /*<<< orphan*/ uint16_t;

/* Variables and functions */
uint32_t swap_words(uint32_t arg) {
  uint16_t *const sp = (uint16_t *)&arg;
  uint16_t hi = sp[0];
  uint16_t lo = sp[1];
  sp[1] = hi;
  sp[0] = lo;
  return (arg);
}


x86 assembly (clang, -O0):
<swap_words>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
lea    -0x4(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    (%rax),%eax
mov    %eax,-0x14(%rbp)
mov    -0x10(%rbp),%rax
mov    0x4(%rax),%eax
mov    %eax,-0x18(%rbp)
mov    -0x14(%rbp),%ecx
mov    -0x10(%rbp),%rax
mov    %ecx,0x4(%rax)
mov    -0x18(%rbp),%ecx
mov    -0x10(%rbp),%rax
mov    %ecx,(%rax)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @swap_words(i32 %0) {
%2 = alloca i32
%3 = alloca i32*
%4 = alloca i32
%5 = alloca i32
store i32 %0, i32* %2
store i32* %2, i32** %3
%6 = load i32*, i32** %3
%7 = getelementptr inbounds i32, i32* %6, i64 0
%8 = load i32, i32* %7
store i32 %8, i32* %4
%9 = load i32*, i32** %3
%10 = getelementptr inbounds i32, i32* %9, i64 1
%11 = load i32, i32* %10
store i32 %11, i32* %5
%12 = load i32, i32* %4
%13 = load i32*, i32** %3
%14 = getelementptr inbounds i32, i32* %13, i64 1
store i32 %12, i32* %14
%15 = load i32, i32* %5
%16 = load i32*, i32** %3
%17 = getelementptr inbounds i32, i32* %16, i64 0
store i32 %15, i32* %17
%18 = load i32, i32* %2
ret i32 %18
}

LLVM IR (-O2):
define i32 @swap_words(i32 %0) {
ret i32 poison
}
void rk29_sdmmc_gpio_open(int device_id, int on) {
  switch (device_id) {
  case 0: {
  } break;
  case 1: {
  } break;
  case 2:
    break;
  default:
    break;
  }
}


x86 assembly (clang, -O0):
<rk29_sdmmc_gpio_open>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
mov    %eax,-0xc(%rbp)
test   %eax,%eax
je     113f <rk29_sdmmc_gpio_open+0x3f>
jmp    111d <rk29_sdmmc_gpio_open+0x1d>
mov    -0xc(%rbp),%eax
sub    $0x1,%eax
je     1144 <rk29_sdmmc_gpio_open+0x44>
jmp    112e <rk29_sdmmc_gpio_open+0x2e>
mov    -0xc(%rbp),%eax
sub    $0x2,%eax
je     1149 <rk29_sdmmc_gpio_open+0x49>
jmp    114e <rk29_sdmmc_gpio_open+0x4e>
jmp    1153 <rk29_sdmmc_gpio_open+0x53>
jmp    1153 <rk29_sdmmc_gpio_open+0x53>
jmp    1153 <rk29_sdmmc_gpio_open+0x53>
jmp    1153 <rk29_sdmmc_gpio_open+0x53>
pop    %rbp
ret

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

LLVM IR (-O0):
define void @rk29_sdmmc_gpio_open(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
switch i32 %5, label %9 [
i32 0, label %6
i32 1, label %7
i32 2, label %8
]
6: ; preds = %2
br label %10
7: ; preds = %2
br label %10
8: ; preds = %2
br label %10
9: ; preds = %2
br label %10
10: ; preds = %9, %8, %7, %6
ret void
}

LLVM IR (-O2):
define void @rk29_sdmmc_gpio_open(i32 %0, i32 %1) {
ret void
}
wr_long(fd, l) long l;
{
  char buf[4];
  (*((long *)(buf)) = (l));
  wr_bytes(fd, buf, 4L);
}


x86 assembly (clang, -O0):
<wr_long>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x14(%rbp)
mov    -0x8(%rbp),%edi
lea    -0x14(%rbp),%rsi
mov    $0x4,%edx
mov    $0x0,%al
call   1030 <wr_bytes@plt>
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<wr_long>:
push   %rax
mov    %rsi,(%rsp)
mov    %rsp,%rsi
mov    $0x4,%edx
xor    %eax,%eax
call   1030 <wr_bytes@plt>
pop    %rcx
ret

LLVM IR (-O0):
define i32 @wr_long(i32 %0, i64 %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i64
%6 = alloca [4 x i8]
store i32 %0, i32* %4
store i64 %1, i64* %5
%7 = load i64, i64* %5
%8 = getelementptr inbounds [4 x i8], [4 x i8]* %6, i64 0, i64 0
%9 = bitcast i8* %8 to i64*
store i64 %7, i64* %9
%10 = load i32, i32* %4
%11 = getelementptr inbounds [4 x i8], [4 x i8]* %6, i64 0, i64 0
%12 = call i32 (i32, i8*, i64, ...) bitcast (i32 (...)* @wr_bytes to i32 (i32, i8*, i64, ...)*)(i32 %10, i8* %11, i64 4)
%13 = load i32, i32* %3
ret i32 %13
}

LLVM IR (-O2):
define i32 @wr_long(i32 %0, i64 %1) {
%3 = alloca [4 x i8]
%4 = getelementptr inbounds [4 x i8], [4 x i8]* %3, i64 0, i64 0
%5 = bitcast [4 x i8]* %3 to i64*
store i64 %1, i64* %5
%6 = call i32 (i32, i8*, i64, ...) bitcast (i32 (...)* @wr_bytes to i32 (i32, i8*, i64, ...)*)(i32 %0, i8* %4, i64 4)
ret i32 undef
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int main(void) {
  printf(
      "*********     ***       *        *     \n*       *    *   *     ***     "
      " * *  \n*       *   *     *   *****    *   *\n*       *   *     *     * "
      "    *     *\n*       *   *     *     *    *       *\n*       *   *     "
      "*     *     *     *\n*       *   *     *     *      *   *\n*       *    "
      "*   *      *       * *\n*********     ***       *        *\n\n\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 = [341 x i8] c"********* *** * * \0A* * * * *** * * \0A* * * * ***** * *\0A* * * * * * *\0A* * * * * * *\0A* * * * * * *\0A* * * * * * *\0A* * * * * * *\0A********* *** * *\0A\0A\0A\00"
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 @printf(i8* getelementptr inbounds ([341 x i8], [341 x i8]* @.str, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@str = [340 x i8] c"********* *** * * \0A* * * * *** * * \0A* * * * ***** * *\0A* * * * * * *\0A* * * * * * *\0A* * * * * * *\0A* * * * * * *\0A* * * * * * *\0A********* *** * *\0A\0A\00"
define i32 @main() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([340 x i8], [340 x i8]* @str, i64 0, i64 0))
ret i32 0
}
void copy4(unsigned char *out, unsigned int x) {
  out[0] = x & 0xFF;
  out[1] = (x >> 8) & 0xFF;
  out[2] = (x >> 16) & 0xFF;
  out[3] = (x >> 24) & 0xFF;
}


x86 assembly (clang, -O0):
<copy4>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0xc(%rbp),%eax
and    $0xff,%eax
mov    %al,%cl
mov    -0x8(%rbp),%rax
mov    %cl,(%rax)
mov    -0xc(%rbp),%eax
shr    $0x8,%eax
and    $0xff,%eax
mov    %al,%cl
mov    -0x8(%rbp),%rax
mov    %cl,0x1(%rax)
mov    -0xc(%rbp),%eax
shr    $0x10,%eax
and    $0xff,%eax
mov    %al,%cl
mov    -0x8(%rbp),%rax
mov    %cl,0x2(%rax)
mov    -0xc(%rbp),%eax
shr    $0x18,%eax
and    $0xff,%eax
mov    %al,%cl
mov    -0x8(%rbp),%rax
mov    %cl,0x3(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<copy4>:
mov    %esi,(%rdi)
ret

LLVM IR (-O0):
define void @copy4(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i32
store i8* %0, i8** %3
store i32 %1, i32* %4
%5 = load i32, i32* %4
%6 = and i32 %5, 255
%7 = trunc i32 %6 to i8
%8 = load i8*, i8** %3
%9 = getelementptr inbounds i8, i8* %8, i64 0
store i8 %7, i8* %9
%10 = load i32, i32* %4
%11 = lshr i32 %10, 8
%12 = and i32 %11, 255
%13 = trunc i32 %12 to i8
%14 = load i8*, i8** %3
%15 = getelementptr inbounds i8, i8* %14, i64 1
store i8 %13, i8* %15
%16 = load i32, i32* %4
%17 = lshr i32 %16, 16
%18 = and i32 %17, 255
%19 = trunc i32 %18 to i8
%20 = load i8*, i8** %3
%21 = getelementptr inbounds i8, i8* %20, i64 2
store i8 %19, i8* %21
%22 = load i32, i32* %4
%23 = lshr i32 %22, 24
%24 = and i32 %23, 255
%25 = trunc i32 %24 to i8
%26 = load i8*, i8** %3
%27 = getelementptr inbounds i8, i8* %26, i64 3
store i8 %25, i8* %27
ret void
}

LLVM IR (-O2):
define void @copy4(i8* nocapture writeonly %0, i32 %1) {
%3 = trunc i32 %1 to i8
store i8 %3, i8* %0
%4 = lshr i32 %1, 8
%5 = trunc i32 %4 to i8
%6 = getelementptr inbounds i8, i8* %0, i64 1
store i8 %5, i8* %6
%7 = lshr i32 %1, 16
%8 = trunc i32 %7 to i8
%9 = getelementptr inbounds i8, i8* %0, i64 2
store i8 %8, i8* %9
%10 = lshr i32 %1, 24
%11 = trunc i32 %10 to i8
%12 = getelementptr inbounds i8, i8* %0, i64 3
store i8 %11, i8* %12
ret void
}