xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ Message(int, char *, char *, int, char *);
void _MessageAssert(char *cond, char *filename, int line) {
  Message(4, "ASSERTION FAILED: '%s' Line: %d, File: '%s'!", cond, line,
          filename);
}


x86 assembly (clang, -O0):
<_MessageAssert>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    -0x8(%rbp),%rdx
mov    -0x14(%rbp),%ecx
mov    -0x10(%rbp),%r8
mov    $0x4,%edi
lea    0xec6(%rip),%rsi
call   1030 <Message@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<_MessageAssert>:
mov    %edx,%ecx
mov    %rsi,%r8
mov    %rdi,%rdx
lea    0xee1(%rip),%rsi
mov    $0x4,%edi
jmp    1030 <Message@plt>

LLVM IR (-O0):
@.str = [45 x i8] c"ASSERTION FAILED: '%s' Line: %d, File: '%s'!\00"
define void @_MessageAssert(i8* %0, i8* %1, i32 %2) {
%4 = alloca i8*
%5 = alloca i8*
%6 = alloca i32
store i8* %0, i8** %4
store i8* %1, i8** %5
store i32 %2, i32* %6
%7 = load i8*, i8** %4
%8 = load i32, i32* %6
%9 = load i8*, i8** %5
%10 = call i32 @Message(i32 4, i8* getelementptr inbounds ([45 x i8], [45 x i8]* @.str, i64 0, i64 0), i8* %7, i32 %8, i8* %9)
ret void
}

LLVM IR (-O2):
@.str = [45 x i8] c"ASSERTION FAILED: '%s' Line: %d, File: '%s'!\00"
define void @_MessageAssert(i8* %0, i8* %1, i32 %2) {
%4 = tail call i32 @Message(i32 4, i8* getelementptr inbounds ([45 x i8], [45 x i8]* @.str, i64 0, i64 0), i8* %0, i32 %2, i8* %1)
ret void
}
/* Variables and functions */
float sqrtf(float);
float IvRecipSqrt(float val) { return 1.0f / sqrtf(val); }


x86 assembly (clang, -O0):
<IvRecipSqrt>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movss  %xmm0,-0x4(%rbp)
movss  -0x4(%rbp),%xmm0
call   1030 <sqrtf@plt>
movaps %xmm0,%xmm1
movss  0xece(%rip),%xmm0
divss  %xmm1,%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<IvRecipSqrt>:
push   %rax
xorps  %xmm1,%xmm1
ucomiss %xmm1,%xmm0
jb     111f <IvRecipSqrt+0xf>
sqrtss %xmm0,%xmm0
jmp    1124 <IvRecipSqrt+0x14>
call   1030 <sqrtf@plt>
movss  0xed4(%rip),%xmm1
divss  %xmm0,%xmm1
movaps %xmm1,%xmm0
pop    %rax
ret

LLVM IR (-O0):
define float @IvRecipSqrt(float %0) {
%2 = alloca float
store float %0, float* %2
%3 = load float, float* %2
%4 = call float @sqrtf(float %3)
%5 = fdiv float 1.000000e+00, %4
ret float %5
}

LLVM IR (-O2):
define float @IvRecipSqrt(float %0) {
%2 = tail call float @sqrtf(float %0)
%3 = fdiv float 1.000000e+00, %2
ret float %3
}
/* Variables and functions */
int ENOTSUP;
int domain_ctx_init(int flags) { return -ENOTSUP; }


x86 assembly (clang, -O0):
<domain_ctx_init>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
xor    %eax,%eax
mov    0x2ed8(%rip),%rcx
sub    (%rcx),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<domain_ctx_init>:
mov    0x2ee1(%rip),%rcx
xor    %eax,%eax
sub    (%rcx),%eax
ret

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

LLVM IR (-O2):
@ENOTSUP = global i32 0
define i32 @domain_ctx_init(i32 %0) {
%2 = load i32, i32* @ENOTSUP
%3 = sub nsw i32 0, %2
ret i32 %3
}
void b43_leds_init(struct b43_wldev *dev) {}


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

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

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

LLVM IR (-O2):
%struct.b43_wldev = type opaque
define void @b43_leds_init(%struct.b43_wldev* nocapture %0) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ assert(int /*<<< orphan*/);
int /*<<< orphan*/ getcwd(char *, int);
const char *tvheadend_dataroot(void) {
  static char cwd[256] = {0};
  if (!*cwd) {
    assert(getcwd(cwd, 254));
  }
  return cwd;
}


x86 assembly (clang, -O0):
<tvheadend_dataroot>:
push   %rbp
mov    %rsp,%rbp
cmpb   $0x0,0x2f15(%rip)
jne    1149 <tvheadend_dataroot+0x29>
lea    0x2f08(%rip),%rdi
mov    $0xfe,%esi
call   1030 <getcwd@plt>
mov    %eax,%edi
call   1040 <assert@plt>
lea    0x2ef0(%rip),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<tvheadend_dataroot>:
push   %rax
cmpb   $0x0,0x2f18(%rip)
jne    1142 <tvheadend_dataroot+0x22>
lea    0x2f0f(%rip),%rdi
mov    $0xfe,%esi
call   1030 <getcwd@plt>
mov    %eax,%edi
call   1040 <assert@plt>
lea    0x2ef7(%rip),%rax
pop    %rcx
ret

LLVM IR (-O0):
@tvheadend_dataroot.cwd = internal global [256 x i8] zeroinitializer
define i8* @tvheadend_dataroot() {
%1 = load i8, i8* getelementptr inbounds ([256 x i8], [256 x i8]* @tvheadend_dataroot.cwd, i64 0, i64 0)
%2 = icmp ne i8 %1, 0
br i1 %2, label %6, label %3
3: ; preds = %0
%4 = call i32 @getcwd(i8* getelementptr inbounds ([256 x i8], [256 x i8]* @tvheadend_dataroot.cwd, i64 0, i64 0), i32 254)
%5 = call i32 @assert(i32 %4)
br label %6
6: ; preds = %3, %0
ret i8* getelementptr inbounds ([256 x i8], [256 x i8]* @tvheadend_dataroot.cwd, i64 0, i64 0)
}

LLVM IR (-O2):
@tvheadend_dataroot.cwd = internal global [256 x i8] zeroinitializer
define i8* @tvheadend_dataroot() {
%1 = load i8, i8* getelementptr inbounds ([256 x i8], [256 x i8]* @tvheadend_dataroot.cwd, i64 0, i64 0)
%2 = icmp eq i8 %1, 0
br i1 %2, label %3, label %6
3: ; preds = %0
%4 = tail call i32 @getcwd(i8* getelementptr inbounds ([256 x i8], [256 x i8]* @tvheadend_dataroot.cwd, i64 0, i64 0), i32 254)
%5 = tail call i32 @assert(i32 %4)
br label %6
6: ; preds = %3, %0
ret i8* getelementptr inbounds ([256 x i8], [256 x i8]* @tvheadend_dataroot.cwd, i64 0, i64 0)
}
int execute_setgid() { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @execute_setgid() {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ EXIT_FAILURE;
int bind_socket(char *);
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int xbind_socket(char *port) {
  int sockfd;
  sockfd = bind_socket(port);
  if (sockfd == -1) {
    exit(EXIT_FAILURE);
  } else {
    return sockfd;
  }
}


x86 assembly (clang, -O0):
<xbind_socket>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <bind_socket@plt>
mov    %eax,-0xc(%rbp)
cmpl   $0xffffffff,-0xc(%rbp)
jne    1150 <xbind_socket+0x30>
mov    0x2e97(%rip),%rax
mov    (%rax),%edi
call   1040 <exit@plt>
mov    -0xc(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<xbind_socket>:
push   %rax
call   1030 <bind_socket@plt>
cmp    $0xffffffff,%eax
je     112d <xbind_socket+0xd>
pop    %rcx
ret
mov    0x2eac(%rip),%rax
mov    (%rax),%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@EXIT_FAILURE = global i32 0
define i32 @xbind_socket(i8* %0) {
%2 = alloca i8*
%3 = alloca i32
store i8* %0, i8** %2
%4 = load i8*, i8** %2
%5 = call i32 @bind_socket(i8* %4)
store i32 %5, i32* %3
%6 = load i32, i32* %3
%7 = icmp eq i32 %6, -1
br i1 %7, label %8, label %11
8: ; preds = %1
%9 = load i32, i32* @EXIT_FAILURE
%10 = call i32 @exit(i32 %9)
unreachable
11: ; preds = %1
%12 = load i32, i32* %3
ret i32 %12
}

LLVM IR (-O2):
@EXIT_FAILURE = global i32 0
define i32 @xbind_socket(i8* %0) {
%2 = tail call i32 @bind_socket(i8* %0)
%3 = icmp eq i32 %2, -1
br i1 %3, label %4, label %7
4: ; preds = %1
%5 = load i32, i32* @EXIT_FAILURE
%6 = tail call i32 @exit(i32 %5)
unreachable
7: ; preds = %1
ret i32 %2
}
/* Variables and functions */
int /*<<< orphan*/ PRCMHIBRegWrite(int, unsigned long);
void PRCMLPDSWakeUpGPIOSelect(unsigned long ulGPIOPin, unsigned long ulType) {
  PRCMHIBRegWrite(0x4402F800 + 0x0000046C, ulGPIOPin);
  (*((volatile unsigned long *)(0x4402D000 + 0x00000110))) = (ulType & 0x3);
}


x86 assembly (clang, -O0):
<PRCMLPDSWakeUpGPIOSelect>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rsi
mov    $0x4402fc6c,%edi
call   1030 <PRCMHIBRegWrite@plt>
mov    -0x10(%rbp),%rcx
and    $0x3,%rcx
mov    $0x4402d110,%eax
mov    %rcx,(%rax)
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<PRCMLPDSWakeUpGPIOSelect>:
push   %rbx
mov    %rsi,%rbx
mov    %rdi,%rsi
mov    $0x4402fc6c,%edi
call   1030 <PRCMHIBRegWrite@plt>
and    $0x3,%ebx
mov    %rbx,0x4402d110
44
pop    %rbx
ret

LLVM IR (-O0):
define void @PRCMLPDSWakeUpGPIOSelect(i64 %0, i64 %1) {
%3 = alloca i64
%4 = alloca i64
store i64 %0, i64* %3
store i64 %1, i64* %4
%5 = load i64, i64* %3
%6 = call i32 @PRCMHIBRegWrite(i32 1141046380, i64 %5)
%7 = load i64, i64* %4
%8 = and i64 %7, 3
store volatile i64 %8, i64* inttoptr (i64 1141035280 to i64*)
ret void
}

LLVM IR (-O2):
define void @PRCMLPDSWakeUpGPIOSelect(i64 %0, i64 %1) {
%3 = tail call i32 @PRCMHIBRegWrite(i32 1141046380, i64 %0)
%4 = and i64 %1, 3
store volatile i64 %4, i64* inttoptr (i64 1141035280 to i64*)
ret void
}
int ft_tolower(int c) {
  if (c >= 'A' && c <= 'Z') {
    return (c + 'a' - 'A');
  }
  return (c);
}


x86 assembly (clang, -O0):
<ft_tolower>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
cmpl   $0x41,-0x8(%rbp)
jl     112c <ft_tolower+0x2c>
cmpl   $0x5a,-0x8(%rbp)
jg     112c <ft_tolower+0x2c>
mov    -0x8(%rbp),%eax
add    $0x61,%eax
sub    $0x41,%eax
mov    %eax,-0x4(%rbp)
jmp    1132 <ft_tolower+0x32>
mov    -0x8(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<ft_tolower>:
lea    -0x41(%rdi),%ecx
lea    0x20(%rdi),%eax
cmp    $0x1a,%ecx
cmovae %edi,%eax
ret

LLVM IR (-O0):
define i32 @ft_tolower(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %3
%4 = load i32, i32* %3
%5 = icmp sge i32 %4, 65
br i1 %5, label %6, label %13
6: ; preds = %1
%7 = load i32, i32* %3
%8 = icmp sle i32 %7, 90
br i1 %8, label %9, label %13
9: ; preds = %6
%10 = load i32, i32* %3
%11 = add nsw i32 %10, 97
%12 = sub nsw i32 %11, 65
store i32 %12, i32* %2
br label %15
13: ; preds = %6, %1
%14 = load i32, i32* %3
store i32 %14, i32* %2
br label %15
15: ; preds = %13, %9
%16 = load i32, i32* %2
ret i32 %16
}

LLVM IR (-O2):
define i32 @ft_tolower(i32 %0) {
%2 = add i32 %0, -65
%3 = icmp ult i32 %2, 26
%4 = add nsw i32 %0, 32
%5 = select i1 %3, i32 %4, i32 %0
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void draw_x(int offset) {
  for (int i = 0; i < offset; i++)
    printf("\n");
}


x86 assembly (clang, -O0):
<draw_x>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
mov    -0x8(%rbp),%eax
cmp    -0x4(%rbp),%eax
jge    1148 <draw_x+0x38>
lea    0xecb(%rip),%rdi
call   1030 <printf@plt>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1122 <draw_x+0x12>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<draw_x>:
push   %rbx
test   %edi,%edi
jle    112f <draw_x+0x1f>
mov    %edi,%ebx
nopw   0x0(%rax,%rax,1)
mov    $0xa,%edi
call   1030 <putchar@plt>
add    $0xffffffff,%ebx
jne    1120 <draw_x+0x10>
pop    %rbx
ret

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

LLVM IR (-O2):
define void @draw_x(i32 %0) {
%2 = icmp sgt i32 %0, 0
br i1 %2, label %4, label %3
3: ; preds = %4, %1
ret void
4: ; preds = %1, %4
%5 = phi i32 [ %7, %4 ], [ 0, %1 ]
%6 = tail call i32 @putchar(i32 10)
%7 = add nuw nsw i32 %5, 1
%8 = icmp eq i32 %7, %0
br i1 %8, label %3, label %4
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int, int);
int f(int a, int b) {
  printf("a: %d, b: %d\n", a, b);
  if (b == 0)
    return a;
  return f(b, a % b);
}


x86 assembly (clang, -O0):
<f>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%esi
mov    -0xc(%rbp),%edx
lea    0xec5(%rip),%rdi
call   1040 <printf@plt>
cmpl   $0x0,-0xc(%rbp)
jne    1155 <f+0x35>
mov    -0x8(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    1169 <f+0x49>
mov    -0xc(%rbp),%edi
mov    -0x8(%rbp),%eax
cltd
idivl  -0xc(%rbp)
mov    %edx,%esi
call   1030 <f@plt>
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<f>:
push   %rbp
push   %r15
push   %r14
push   %rbx
push   %rax
mov    %esi,%ebp
mov    %edi,%r15d
lea    0xedd(%rip),%rdi
mov    %r15d,%esi
mov    %ebp,%edx
call   1030 <printf@plt>
test   %ebp,%ebp
je     115d <f+0x4d>
lea    0xec8(%rip),%r14
nopl   0x0(%rax,%rax,1)
mov    %ebp,%ebx
mov    %r15d,%eax
cltd
idiv   %ebp
mov    %edx,%ebp
mov    %r14,%rdi
mov    %ebx,%esi
call   1030 <printf@plt>
mov    %ebx,%r15d
test   %ebp,%ebp
jne    1140 <f+0x30>
jmp    1160 <f+0x50>
mov    %r15d,%ebx
mov    %ebx,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@.str = [14 x i8] c"a: %d, b: %d\0A\00"
define i32 @f(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 = call i32 @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0), i32 %6, i32 %7)
%9 = load i32, i32* %5
%10 = icmp eq i32 %9, 0
br i1 %10, label %11, label %13
11: ; preds = %2
%12 = load i32, i32* %4
store i32 %12, i32* %3
br label %19
13: ; preds = %2
%14 = load i32, i32* %5
%15 = load i32, i32* %4
%16 = load i32, i32* %5
%17 = srem i32 %15, %16
%18 = call i32 @f(i32 %14, i32 %17)
store i32 %18, i32* %3
br label %19
19: ; preds = %13, %11
%20 = load i32, i32* %3
ret i32 %20
}

LLVM IR (-O2):
@.str = [14 x i8] c"a: %d, b: %d\0A\00"
define i32 @f(i32 %0, i32 %1) {
%3 = tail call i32 @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0), i32 %0, i32 %1)
%4 = icmp eq i32 %1, 0
br i1 %4, label %11, label %5
5: ; preds = %2, %5
%6 = phi i32 [ %8, %5 ], [ %1, %2 ]
%7 = phi i32 [ %6, %5 ], [ %0, %2 ]
%8 = srem i32 %7, %6
%9 = tail call i32 @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0), i32 %6, i32 %8)
%10 = icmp eq i32 %8, 0
br i1 %10, label %11, label %5
11: ; preds = %5, %2
%12 = phi i32 [ %0, %2 ], [ %6, %5 ]
ret i32 %12
}
int *allign(int *p) {
  unsigned int n = (unsigned)p;
  if (n % 4)
    n = n + (4 - (n % 4));
  return (int *)n;
}


x86 assembly (clang, -O0):
<allign>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
and    $0x3,%eax
cmp    $0x0,%eax
je     1133 <allign+0x33>
mov    -0xc(%rbp),%eax
mov    -0xc(%rbp),%edx
and    $0x3,%edx
mov    $0x4,%ecx
sub    %edx,%ecx
add    %ecx,%eax
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<allign>:
mov    %edi,%ecx
and    $0x3,%ecx
mov    $0x4,%eax
sub    %ecx,%eax
test   %ecx,%ecx
cmove  %ecx,%eax
add    %edi,%eax
ret

LLVM IR (-O0):
define i32* @allign(i32* %0) {
%2 = alloca i32*
%3 = alloca i32
store i32* %0, i32** %2
%4 = load i32*, i32** %2
%5 = ptrtoint i32* %4 to i32
store i32 %5, i32* %3
%6 = load i32, i32* %3
%7 = urem i32 %6, 4
%8 = icmp ne i32 %7, 0
br i1 %8, label %9, label %15
9: ; preds = %1
%10 = load i32, i32* %3
%11 = load i32, i32* %3
%12 = urem i32 %11, 4
%13 = sub i32 4, %12
%14 = add i32 %10, %13
store i32 %14, i32* %3
br label %15
15: ; preds = %9, %1
%16 = load i32, i32* %3
%17 = zext i32 %16 to i64
%18 = inttoptr i64 %17 to i32*
ret i32* %18
}

LLVM IR (-O2):
define i32* @allign(i32* %0) {
%2 = ptrtoint i32* %0 to i64
%3 = trunc i64 %2 to i32
%4 = and i32 %3, 3
%5 = icmp eq i32 %4, 0
%6 = sub nuw nsw i32 4, %4
%7 = select i1 %5, i32 0, i32 %6
%8 = add i32 %7, %3
%9 = zext i32 %8 to i64
%10 = inttoptr i64 %9 to i32*
ret i32* %10
}
/* Variables and functions */
int /*<<< orphan*/ grg_get_grid_address_from_index(long *, long const,
                                                   long const *);
void ksp_get_grgrid_address_from_index(long address[3], const long grid_index,
                                       const long D_diag[3]) {
  grg_get_grid_address_from_index(address, grid_index, D_diag);
}


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

x86 assembly (clang, -O2):
<ksp_get_grgrid_address_from_index>:
jmp    1030 <grg_get_grid_address_from_index@plt>

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

LLVM IR (-O2):
define void @ksp_get_grgrid_address_from_index(i64* %0, i64 %1, i64* %2) {
%4 = tail call i32 @grg_get_grid_address_from_index(i64* %0, i64 %1, i64* %2)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ close(int);
void close2(int fd1, int fd2) {
  close(fd1);
  close(fd2);
}


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

x86 assembly (clang, -O2):
<close2>:
push   %rbx
mov    %esi,%ebx
call   1030 <close@plt>
mov    %ebx,%edi
pop    %rbx
jmp    1030 <close@plt>

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

LLVM IR (-O2):
define void @close2(i32 %0, i32 %1) {
%3 = tail call i32 @close(i32 %0)
%4 = tail call i32 @close(i32 %1)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ OSDSetVisible(int /*<<< orphan*/, int);
void SetOSDToggle(int toggle) { OSDSetVisible(0, toggle); }


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

x86 assembly (clang, -O2):
<SetOSDToggle>:
mov    %edi,%esi
xor    %edi,%edi
jmp    1030 <OSDSetVisible@plt>

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

LLVM IR (-O2):
define void @SetOSDToggle(i32 %0) {
%2 = tail call i32 @OSDSetVisible(i32 0, i32 %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, size_t);
void *realloc(void *, size_t);
int /*<<< orphan*/ stderr;
void *ts_realloc_default(void *buffer, size_t size) {
  void *result = realloc(buffer, size);
  if (size > 0 && !result) {
    fprintf(stderr, "tree-sitter failed to reallocate %zu bytes", size);
    exit(1);
  }
  return result;
}


x86 assembly (clang, -O0):
<ts_realloc_default>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1040 <realloc@plt>
mov    %rax,-0x18(%rbp)
cmpq   $0x0,-0x10(%rbp)
jbe    118a <ts_realloc_default+0x5a>
cmpq   $0x0,-0x18(%rbp)
jne    118a <ts_realloc_default+0x5a>
mov    0x2e72(%rip),%rax
mov    (%rax),%edi
mov    -0x10(%rbp),%rdx
lea    0xe85(%rip),%rsi
call   1030 <fprintf@plt>
mov    $0x1,%edi
call   1050 <exit@plt>
mov    -0x18(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ts_realloc_default>:
push   %rbx
mov    %rsi,%rbx
call   1040 <realloc@plt>
test   %rbx,%rbx
je     1143 <ts_realloc_default+0x13>
test   %rax,%rax
je     1145 <ts_realloc_default+0x15>
pop    %rbx
ret
mov    0x2e94(%rip),%rax
mov    (%rax),%edi
lea    0xeab(%rip),%rsi
mov    %rbx,%rdx
call   1030 <fprintf@plt>
mov    $0x1,%edi
call   1050 <exit@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [43 x i8] c"tree-sitter failed to reallocate %zu bytes\00"
define i8* @ts_realloc_default(i8* %0, i64 %1) {
%3 = alloca i8*
%4 = alloca i64
%5 = alloca i8*
store i8* %0, i8** %3
store i64 %1, i64* %4
%6 = load i8*, i8** %3
%7 = load i64, i64* %4
%8 = call i8* @realloc(i8* %6, i64 %7)
store i8* %8, i8** %5
%9 = load i64, i64* %4
%10 = icmp ugt i64 %9, 0
br i1 %10, label %11, label %19
11: ; preds = %2
%12 = load i8*, i8** %5
%13 = icmp ne i8* %12, null
br i1 %13, label %19, label %14
14: ; preds = %11
%15 = load i32, i32* @stderr
%16 = load i64, i64* %4
%17 = call i32 @fprintf(i32 %15, i8* getelementptr inbounds ([43 x i8], [43 x i8]* @.str, i64 0, i64 0), i64 %16)
%18 = call i32 @exit(i32 1)
unreachable
19: ; preds = %11, %2
%20 = load i8*, i8** %5
ret i8* %20
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [43 x i8] c"tree-sitter failed to reallocate %zu bytes\00"
define noalias i8* @ts_realloc_default(i8* nocapture %0, i64 %1) {
%3 = tail call i8* @realloc(i8* %0, i64 %1)
%4 = icmp eq i64 %1, 0
%5 = icmp ne i8* %3, null
%6 = or i1 %4, %5
br i1 %6, label %11, label %7
7: ; preds = %2
%8 = load i32, i32* @stderr
%9 = tail call i32 @fprintf(i32 %8, i8* getelementptr inbounds ([43 x i8], [43 x i8]* @.str, i64 0, i64 0), i64 %1)
%10 = tail call i32 @exit(i32 1)
unreachable
11: ; preds = %2
ret i8* %3
}
/* Variables and functions */
int strcmp(char *, char *);
int mt_strcmp_nocap(char *log, char *opt) { return (strcmp(log, opt)); }


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

x86 assembly (clang, -O2):
<mt_strcmp_nocap>:
jmp    1030 <strcmp@plt>

LLVM IR (-O0):
define i32 @mt_strcmp_nocap(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 @strcmp(i8* %5, i8* %6)
ret i32 %7
}

LLVM IR (-O2):
define i32 @mt_strcmp_nocap(i8* nocapture %0, i8* nocapture %1) {
%3 = tail call i32 @strcmp(i8* dereferenceable(1) %0, i8* dereferenceable(1) %1)
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ drv_generic_serial_close();
int drv_FW8888_close(void) {
  drv_generic_serial_close();
  return 0;
}


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

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

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

LLVM IR (-O2):
define i32 @drv_FW8888_close() {
%1 = tail call i32 (...) @drv_generic_serial_close()
ret i32 0
}
/* Type definitions */
struct user_desc {
  int dummy;
};

/* Variables and functions */
int main(void) {
  struct user_desc u_info;
  (void)u_info;
  return 0;
}


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

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

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

LLVM IR (-O2):
define i32 @main() {
ret i32 0
}
void RandomFunc(unsigned short input[1], unsigned short output[1]) {
  unsigned short state[1];
  unsigned short local1;
  {
    state[0UL] = (input[0UL] | 51238316UL) >> (unsigned short)3;
    local1 = 0UL;
    while (local1 < (unsigned short)0) {
      state[0UL] <<=
          ((state[0UL] >> (unsigned short)3) & (unsigned short)7) | 1UL;
      local1 += 2UL;
    }
    output[0UL] = (state[0UL] & 144997984UL) & (unsigned short)59370;
  }
}


x86 assembly (clang, -O0):
<RandomFunc>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
movzwl (%rax),%eax
or     $0x30dd5ac,%rax
shr    $0x3,%rax
mov    %ax,-0x12(%rbp)
movw   $0x0,-0x14(%rbp)
movzwl -0x14(%rbp),%eax
cmp    $0x0,%eax
jge    1160 <RandomFunc+0x60>
movzwl -0x12(%rbp),%eax
sar    $0x3,%eax
and    $0x7,%eax
movslq %eax,%rcx
or     $0x1,%rcx
movzwl -0x12(%rbp),%eax
shl    %cl,%eax
mov    %ax,-0x12(%rbp)
movzwl -0x14(%rbp),%eax
add    $0x2,%rax
mov    %ax,-0x14(%rbp)
jmp    1127 <RandomFunc+0x27>
movzwl -0x12(%rbp),%eax
and    $0x8a47e60,%rax
and    $0xe7ea,%rax
mov    %ax,%cx
mov    -0x10(%rbp),%rax
mov    %cx,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<RandomFunc>:
movzwl (%rdi),%eax
shr    $0x3,%eax
and    $0x440,%eax
or     $0x2220,%eax
mov    %ax,(%rsi)
ret

LLVM IR (-O0):
define void @RandomFunc(i16* %0, i16* %1) {
%3 = alloca i16*
%4 = alloca i16*
%5 = alloca [1 x i16]
%6 = alloca i16
store i16* %0, i16** %3
store i16* %1, i16** %4
%7 = load i16*, i16** %3
%8 = getelementptr inbounds i16, i16* %7, i64 0
%9 = load i16, i16* %8
%10 = zext i16 %9 to i64
%11 = or i64 %10, 51238316
%12 = lshr i64 %11, 3
%13 = trunc i64 %12 to i16
%14 = getelementptr inbounds [1 x i16], [1 x i16]* %5, i64 0, i64 0
store i16 %13, i16* %14
store i16 0, i16* %6
br label %15
15: ; preds = %19, %2
%16 = load i16, i16* %6
%17 = zext i16 %16 to i32
%18 = icmp slt i32 %17, 0
br i1 %18, label %19, label %37
19: ; preds = %15
%20 = getelementptr inbounds [1 x i16], [1 x i16]* %5, i64 0, i64 0
%21 = load i16, i16* %20
%22 = zext i16 %21 to i32
%23 = ashr i32 %22, 3
%24 = and i32 %23, 7
%25 = sext i32 %24 to i64
%26 = or i64 %25, 1
%27 = getelementptr inbounds [1 x i16], [1 x i16]* %5, i64 0, i64 0
%28 = load i16, i16* %27
%29 = zext i16 %28 to i32
%30 = trunc i64 %26 to i32
%31 = shl i32 %29, %30
%32 = trunc i32 %31 to i16
store i16 %32, i16* %27
%33 = load i16, i16* %6
%34 = zext i16 %33 to i64
%35 = add i64 %34, 2
%36 = trunc i64 %35 to i16
store i16 %36, i16* %6
br label %15
37: ; preds = %15
%38 = getelementptr inbounds [1 x i16], [1 x i16]* %5, i64 0, i64 0
%39 = load i16, i16* %38
%40 = zext i16 %39 to i64
%41 = and i64 %40, 144997984
%42 = and i64 %41, 59370
%43 = trunc i64 %42 to i16
%44 = load i16*, i16** %4
%45 = getelementptr inbounds i16, i16* %44, i64 0
store i16 %43, i16* %45
ret void
}

LLVM IR (-O2):
define void @RandomFunc(i16* nocapture %0, i16* nocapture writeonly %1) {
%3 = load i16, i16* %0
%4 = lshr i16 %3, 3
%5 = and i16 %4, 1088
%6 = or i16 %5, 8736
store i16 %6, i16* %1
ret void
}
void glGetTransformFeedbackVarying(void) { return; }


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

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

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

LLVM IR (-O2):
define void @glGetTransformFeedbackVarying() {
ret void
}
void request_playerlist() {}


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

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

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

LLVM IR (-O2):
define void @request_playerlist() {
ret void
}
/* Variables and functions */
int EXIT_SUCCESS;
int /*<<< orphan*/ puts(char *);
int main(void) {
  puts("");
  return EXIT_SUCCESS;
}


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

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    $0xa,%edi
call   1030 <putchar@plt>
mov    0x2ebe(%rip),%rax
mov    (%rax),%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [1 x i8] zeroinitializer
@EXIT_SUCCESS = global i32 0
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 @puts(i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str, i64 0, i64 0))
%3 = load i32, i32* @EXIT_SUCCESS
ret i32 %3
}

LLVM IR (-O2):
@EXIT_SUCCESS = global i32 0
define i32 @main() {
%1 = tail call i32 @putchar(i32 10)
%2 = load i32, i32* @EXIT_SUCCESS
ret i32 %2
}
int beq(a, b, z)
unsigned char *a, *b;
int z;
{
  while (--z >= 0) {
    if (*a++ != *b++)
      return (0);
  }
  return (1);
}


x86 assembly (clang, -O0):
<beq>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    %edx,-0x1c(%rbp)
mov    -0x1c(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0x1c(%rbp)
cmp    $0x0,%eax
jl     115e <beq+0x5e>
mov    -0x10(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x10(%rbp)
movzbl (%rax),%eax
mov    -0x18(%rbp),%rcx
mov    %rcx,%rdx
add    $0x1,%rdx
mov    %rdx,-0x18(%rbp)
movzbl (%rcx),%ecx
cmp    %ecx,%eax
je     1159 <beq+0x59>
movl   $0x0,-0x4(%rbp)
jmp    1165 <beq+0x65>
jmp    110f <beq+0xf>
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<beq>:
xor    %eax,%eax
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
test   %edx,%edx
jle    112c <beq+0x2c>
add    $0xffffffff,%edx
movzbl (%rdi,%rax,1),%r8d
lea    0x1(%rax),%rcx
cmp    (%rsi,%rax,1),%r8b
mov    %rcx,%rax
je     1110 <beq+0x10>
xor    %eax,%eax
ret
mov    $0x1,%eax
ret

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

LLVM IR (-O2):
define i32 @beq(i8* nocapture %0, i8* nocapture %1, i32 %2) {
br label %4
4: ; preds = %9, %3
%5 = phi i8* [ %0, %3 ], [ %11, %9 ]
%6 = phi i8* [ %1, %3 ], [ %13, %9 ]
%7 = phi i32 [ %2, %3 ], [ %10, %9 ]
%8 = icmp sgt i32 %7, 0
br i1 %8, label %9, label %16
9: ; preds = %4
%10 = add nsw i32 %7, -1
%11 = getelementptr inbounds i8, i8* %5, i64 1
%12 = load i8, i8* %5
%13 = getelementptr inbounds i8, i8* %6, i64 1
%14 = load i8, i8* %6
%15 = icmp eq i8 %12, %14
br i1 %15, label %4, label %16
16: ; preds = %4, %9
%17 = phi i32 [ 0, %9 ], [ 1, %4 ]
ret i32 %17
}
/* Variables and functions */
char *bus_label_unescape_n(char const *, int /*<<< orphan*/);
int /*<<< orphan*/ strlen(char const *);
char *bus_label_unescape(const char *f) {
  return bus_label_unescape_n(f, f ? strlen(f) : 0);
}


x86 assembly (clang, -O0):
<bus_label_unescape>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
cmpq   $0x0,-0x8(%rbp)
je     1150 <bus_label_unescape+0x30>
mov    -0x8(%rbp),%rdi
call   1030 <strlen@plt>
mov    %eax,-0x14(%rbp)
jmp    115a <bus_label_unescape+0x3a>
xor    %eax,%eax
mov    %eax,-0x14(%rbp)
jmp    115a <bus_label_unescape+0x3a>
mov    -0x10(%rbp),%rdi
mov    -0x14(%rbp),%esi
call   1040 <bus_label_unescape_n@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<bus_label_unescape>:
push   %rbx
mov    %rdi,%rbx
test   %rdi,%rdi
je     1135 <bus_label_unescape+0x15>
mov    %rbx,%rdi
call   1030 <strlen@plt>
mov    %eax,%esi
jmp    1137 <bus_label_unescape+0x17>
xor    %esi,%esi
mov    %rbx,%rdi
pop    %rbx
jmp    1040 <bus_label_unescape_n@plt>

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

LLVM IR (-O2):
define i8* @bus_label_unescape(i8* %0) {
%2 = icmp eq i8* %0, null
br i1 %2, label %5, label %3
3: ; preds = %1
%4 = tail call i32 @strlen(i8* %0)
br label %5
5: ; preds = %1, %3
%6 = phi i32 [ %4, %3 ], [ 0, %1 ]
%7 = tail call i8* @bus_label_unescape_n(i8* %0, i32 %6)
ret i8* %7
}
unsigned char f47(unsigned char x, unsigned int y) {
  return (x >> y) | (x << (8 * sizeof(unsigned char) - y));
}


x86 assembly (clang, -O0):
<f47>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x1(%rbp)
mov    %esi,-0x8(%rbp)
movzbl -0x1(%rbp),%eax
mov    -0x8(%rbp),%ecx
sar    %cl,%eax
movzbl -0x1(%rbp),%edx
mov    -0x8(%rbp),%ecx
mov    %ecx,%esi
mov    $0x8,%ecx
sub    %rsi,%rcx
shl    %cl,%edx
mov    %edx,%ecx
or     %ecx,%eax
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<f47>:
mov    %esi,%ecx
mov    %edi,%eax
ror    %cl,%al
ret

LLVM IR (-O0):
define zeroext i8 @f47(i8 zeroext %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 = zext i8 %5 to i32
%7 = load i32, i32* %4
%8 = ashr i32 %6, %7
%9 = load i8, i8* %3
%10 = zext i8 %9 to i32
%11 = load i32, i32* %4
%12 = zext i32 %11 to i64
%13 = sub i64 8, %12
%14 = trunc i64 %13 to i32
%15 = shl i32 %10, %14
%16 = or i32 %8, %15
%17 = trunc i32 %16 to i8
ret i8 %17
}

LLVM IR (-O2):
define zeroext i8 @f47(i8 zeroext %0, i32 %1) {
%3 = trunc i32 %1 to i8
%4 = tail call i8 @llvm.fshr.i8(i8 %0, i8 %0, i8 %3)
ret i8 %4
}
int gkpd_get_test_mode(void) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @gkpd_get_test_mode() {
ret i32 0
}
/* Variables and functions */
int INT_MAX;
void *__mingw_aligned_malloc(unsigned int, int);
void *av_malloc(unsigned int size) {
  void *ptr;
  if (size > (INT_MAX - 16))
    return NULL;
  ptr = __mingw_aligned_malloc(size, 16);
  return ptr;
}


x86 assembly (clang, -O0):
<av_malloc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0xc(%rbp)
mov    -0xc(%rbp),%eax
mov    0x2ec3(%rip),%rcx
mov    (%rcx),%ecx
sub    $0x10,%ecx
cmp    %ecx,%eax
jbe    113f <av_malloc+0x2f>
movq   $0x0,-0x8(%rbp)
jmp    1158 <av_malloc+0x48>
mov    -0xc(%rbp),%edi
mov    $0x10,%esi
call   1030 <__mingw_aligned_malloc@plt>
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<av_malloc>:
mov    0x2ed1(%rip),%rax
mov    (%rax),%eax
add    $0xfffffff0,%eax
cmp    %edi,%eax
jae    1123 <av_malloc+0x13>
xor    %eax,%eax
ret
mov    $0x10,%esi
jmp    1030 <__mingw_aligned_malloc@plt>

LLVM IR (-O0):
@INT_MAX = global i32 0
define i8* @av_malloc(i32 %0) {
%2 = alloca i8*
%3 = alloca i32
%4 = alloca i8*
store i32 %0, i32* %3
%5 = load i32, i32* %3
%6 = load i32, i32* @INT_MAX
%7 = sub nsw i32 %6, 16
%8 = icmp ugt i32 %5, %7
br i1 %8, label %9, label %10
9: ; preds = %1
store i8* null, i8** %2
br label %14
10: ; preds = %1
%11 = load i32, i32* %3
%12 = call i8* @__mingw_aligned_malloc(i32 %11, i32 16)
store i8* %12, i8** %4
%13 = load i8*, i8** %4
store i8* %13, i8** %2
br label %14
14: ; preds = %10, %9
%15 = load i8*, i8** %2
ret i8* %15
}

LLVM IR (-O2):
@INT_MAX = global i32 0
define i8* @av_malloc(i32 %0) {
%2 = load i32, i32* @INT_MAX
%3 = add nsw i32 %2, -16
%4 = icmp ult i32 %3, %0
br i1 %4, label %7, label %5
5: ; preds = %1
%6 = tail call i8* @__mingw_aligned_malloc(i32 %0, i32 16)
br label %7
7: ; preds = %1, %5
%8 = phi i8* [ %6, %5 ], [ null, %1 ]
ret i8* %8
}
int run_test() {
  void (*main)(void *) = resolve_symbol("kfun:main(Array<String>)");
  main((void *)0);
  return 0;
}


x86 assembly (clang, -O0):
<run_test>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    0xee1(%rip),%rdi
mov    $0x0,%al
call   1030 <resolve_symbol@plt>
cltq
mov    %rax,-0x8(%rbp)
xor    %eax,%eax
mov    %eax,%edi
call   *-0x8(%rbp)
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
@.str = [25 x i8] c"kfun:main(Array<String>)\00"
define i32 @run_test() {
%1 = alloca void (i8*)*
%2 = call i32 (i8*, ...) bitcast (i32 (...)* @resolve_symbol to i32 (i8*, ...)*)(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str, i64 0, i64 0))
%3 = sext i32 %2 to i64
%4 = inttoptr i64 %3 to void (i8*)*
store void (i8*)* %4, void (i8*)** %1
%5 = load void (i8*)*, void (i8*)** %1
ret i32 0
}

LLVM IR (-O2):
@.str = [25 x i8] c"kfun:main(Array<String>)\00"
define i32 @run_test() {
%1 = tail call i32 (i8*, ...) bitcast (i32 (...)* @resolve_symbol to i32 (i8*, ...)*)(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str, i64 0, i64 0))
%2 = sext i32 %1 to i64
%3 = inttoptr i64 %2 to void (i8*)*
tail call void %3(i8* null)
ret i32 0
}
/* Type definitions */
typedef int uint8_t;
typedef int uint16_t;

/* Variables and functions */
void bytes_w16net(uint8_t *data, uint16_t v) {
  data[1] = v;
  data[0] = v >> 8;
}


x86 assembly (clang, -O0):
<bytes_w16net>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0xc(%rbp),%ecx
mov    -0x8(%rbp),%rax
mov    %ecx,0x4(%rax)
mov    -0xc(%rbp),%ecx
sar    $0x8,%ecx
mov    -0x8(%rbp),%rax
mov    %ecx,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<bytes_w16net>:
mov    %esi,0x4(%rdi)
sar    $0x8,%esi
mov    %esi,(%rdi)
ret

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

LLVM IR (-O2):
define void @bytes_w16net(i32* nocapture writeonly %0, i32 %1) {
%3 = getelementptr inbounds i32, i32* %0, i64 1
store i32 %1, i32* %3
%4 = ashr i32 %1, 8
store i32 %4, i32* %0
ret void
}
/* Variables and functions */
int /*<<< orphan*/ helloPrint();
int main() {
  helloPrint();
  return 1;
}


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

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

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

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @helloPrint()
ret i32 1
}
/* Variables and functions */
int /*<<< orphan*/ execute_path();
int /*<<< orphan*/ printf(char *);
int main() {
  printf("Execute_Path begin... \n");
  execute_path();
  return 0;
}


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

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

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

LLVM IR (-O2):
@str = [23 x i8] c"Execute_Path begin... \00"
define i32 @main() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([23 x i8], [23 x i8]* @str, i64 0, i64 0))
%2 = tail call i32 (...) @execute_path()
ret i32 0
}
void init_hypervisor(struct cpuinfo_x86 *c) {}


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

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

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

LLVM IR (-O2):
%struct.cpuinfo_x86 = type opaque
define void @init_hypervisor(%struct.cpuinfo_x86* nocapture %0) {
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ pthread_attr_t;

/* Variables and functions */
int EINVAL;
int pthread_attr_getschedpolicy(const pthread_attr_t *attr, int *policy) {
  (void)attr;
  (void)policy;
  return EINVAL;
}


x86 assembly (clang, -O0):
<pthread_attr_getschedpolicy>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    0x2ecd(%rip),%rax
mov    (%rax),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<pthread_attr_getschedpolicy>:
mov    0x2ed9(%rip),%rax
mov    (%rax),%eax
ret

LLVM IR (-O0):
@EINVAL = global i32 0
define i32 @pthread_attr_getschedpolicy(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 = load i32, i32* @EINVAL
ret i32 %7
}

LLVM IR (-O2):
@EINVAL = global i32 0
define i32 @pthread_attr_getschedpolicy(i32* nocapture readnone %0, i32* nocapture readnone %1) {
%3 = load i32, i32* @EINVAL
ret i32 %3
}
/* Type definitions */
typedef int /*<<< orphan*/ sigset_t;

/* Variables and functions */
int /*<<< orphan*/ sigismember(int /*<<< orphan*/ *, int);
void c_sigismember_(sigset_t *set, int *sig, int dmy) {
  sigismember(set, *sig);
}


x86 assembly (clang, -O0):
<c_sigismember_>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rax
mov    (%rax),%esi
call   1030 <sigismember@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<c_sigismember_>:
mov    (%rsi),%esi
jmp    1030 <sigismember@plt>

LLVM IR (-O0):
define void @c_sigismember_(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* %8
%10 = call i32 @sigismember(i32* %7, i32 %9)
ret void
}

LLVM IR (-O2):
define void @c_sigismember_(i32* %0, i32* nocapture %1, i32 %2) {
%4 = load i32, i32* %1
%5 = tail call i32 @sigismember(i32* %0, i32 %4)
ret void
}
long int labs(long int n) { return (n < 0) ? -n : n; }


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

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

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

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


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

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

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

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

/* Variables and functions */
int /*<<< orphan*/ PrintKeyTable(int /*<<< orphan*/, int /*<<< orphan*/);
int /*<<< orphan*/ stdout;
void print_key_table(Bool exprs) {
  PrintKeyTable(exprs, stdout);
  return;
}


x86 assembly (clang, -O0):
<print_key_table>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
mov    0x2ebb(%rip),%rax
mov    (%rax),%esi
call   1030 <PrintKeyTable@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<print_key_table>:
mov    0x2ec9(%rip),%rax
mov    (%rax),%esi
jmp    1030 <PrintKeyTable@plt>

LLVM IR (-O0):
@stdout = global i32 0
define void @print_key_table(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = load i32, i32* @stdout
%5 = call i32 @PrintKeyTable(i32 %3, i32 %4)
ret void
}

LLVM IR (-O2):
@stdout = global i32 0
define void @print_key_table(i32 %0) {
%2 = load i32, i32* @stdout
%3 = tail call i32 @PrintKeyTable(i32 %0, i32 %2)
ret void
}
/* Type definitions */
struct HashStrItem {
  int dummy;
};

/* Variables and functions */
void _fill_null(struct HashStrItem **items, int new_size) {
  int i;
  for (i = 0; i < new_size; i++) {
    items[i] = NULL;
  }
}


x86 assembly (clang, -O0):
<_fill_null>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
movl   $0x0,-0x10(%rbp)
mov    -0x10(%rbp),%eax
cmp    -0xc(%rbp),%eax
jge    113c <_fill_null+0x3c>
mov    -0x8(%rbp),%rax
movslq -0x10(%rbp),%rcx
movq   $0x0,(%rax,%rcx,8)
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    1112 <_fill_null+0x12>
pop    %rbp
ret

x86 assembly (clang, -O2):
<_fill_null>:
test   %esi,%esi
jle    1126 <_fill_null+0x16>
push   %rax
mov    %esi,%edx
shl    $0x3,%rdx
xor    %esi,%esi
call   1030 <memset@plt>
add    $0x8,%rsp
ret

LLVM IR (-O0):
%struct.HashStrItem = type { i32 }
define void @_fill_null(%struct.HashStrItem** %0, i32 %1) {
%3 = alloca %struct.HashStrItem**
%4 = alloca i32
%5 = alloca i32
store %struct.HashStrItem** %0, %struct.HashStrItem*** %3
store i32 %1, i32* %4
store i32 0, i32* %5
br label %6
6: ; preds = %15, %2
%7 = load i32, i32* %5
%8 = load i32, i32* %4
%9 = icmp slt i32 %7, %8
br i1 %9, label %10, label %18
10: ; preds = %6
%11 = load %struct.HashStrItem**, %struct.HashStrItem*** %3
%12 = load i32, i32* %5
%13 = sext i32 %12 to i64
%14 = getelementptr inbounds %struct.HashStrItem*, %struct.HashStrItem** %11, i64 %13
store %struct.HashStrItem* null, %struct.HashStrItem** %14
br label %15
15: ; preds = %10
%16 = load i32, i32* %5
%17 = add nsw i32 %16, 1
store i32 %17, i32* %5
br label %6
18: ; preds = %6
ret void
}

LLVM IR (-O2):
%struct.HashStrItem = type { i32 }
define void @_fill_null(%struct.HashStrItem** nocapture writeonly %0, i32 %1) {
%3 = icmp sgt i32 %1, 0
br i1 %3, label %4, label %8
4: ; preds = %2
%5 = bitcast %struct.HashStrItem** %0 to i8*
%6 = zext i32 %1 to i64
%7 = shl nuw nsw i64 %6, 3
br label %8
8: ; preds = %4, %2
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ fread(int *, int, int, int /*<<< orphan*/ *);
void ler_arquivo(int *vetor1, FILE *fp) {
  fread(vetor1, sizeof(int), 100000, fp);
  return;
}


x86 assembly (clang, -O0):
<ler_arquivo>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rcx
mov    $0x4,%esi
mov    $0x186a0,%edx
call   1030 <fread@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ler_arquivo>:
mov    %rsi,%rcx
mov    $0x4,%esi
mov    $0x186a0,%edx
jmp    1030 <fread@plt>

LLVM IR (-O0):
define void @ler_arquivo(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 @fread(i32* %5, i32 4, i32 100000, i32* %6)
ret void
}

LLVM IR (-O2):
define void @ler_arquivo(i32* nocapture %0, i32* nocapture %1) {
%3 = tail call i32 @fread(i32* %0, i32 4, i32 100000, i32* %1)
ret void
}