xunge/DecIR huggingface dataset:
void gtk_tool_item_get_homogeneous() {}


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

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

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

LLVM IR (-O2):
define void @gtk_tool_item_get_homogeneous() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ free(void *);
void Marrayfree(void *p) { free(p); }


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

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

LLVM IR (-O2):
define void @Marrayfree(i8* nocapture %0) {
%2 = tail call i32 @free(i8* %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int /*<<< orphan*/, char *, int, char *);
int /*<<< orphan*/ isascii(int);
void t_isascii_0x68() {
  Assert_real((isascii(104)),
              "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
              "2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/"
              "dg/z88dk/test/suites/ctype/test_isascii.c",
              525, ("isascii should be 1 for h"));
}


x86 assembly (clang, -O0):
<t_isascii_0x68>:
push   %rbp
mov    %rsp,%rbp
mov    $0x68,%edi
call   1030 <isascii@plt>
mov    %eax,%edi
lea    0xec9(%rip),%rsi
mov    $0x20d,%edx
lea    0xf65(%rip),%rcx
call   1040 <Assert_real@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<t_isascii_0x68>:
lea    0xee9(%rip),%rsi
lea    0xf8a(%rip),%rcx
mov    $0x1,%edi
mov    $0x20d,%edx
jmp    1030 <Assert_real@plt>

LLVM IR (-O0):
@.str = [168 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/ctype/test_isascii.c\00"
@.str.1 = [26 x i8] c"isascii should be 1 for h\00"
define void @t_isascii_0x68() {
%1 = call i32 @isascii(i32 104)
%2 = call i32 @Assert_real(i32 %1, i8* getelementptr inbounds ([168 x i8], [168 x i8]* @.str, i64 0, i64 0), i32 525, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [168 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/ctype/test_isascii.c\00"
@.str.1 = [26 x i8] c"isascii should be 1 for h\00"
define void @t_isascii_0x68() {
%1 = tail call i32 @Assert_real(i32 1, i8* getelementptr inbounds ([168 x i8], [168 x i8]* @.str, i64 0, i64 0), i32 525, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Variables and functions */
char *SDL_ultoa(unsigned long, char *, int);
char *SDL_uitoa(unsigned int value, char *string, int radix) {
  return SDL_ultoa((unsigned long)value, string, radix);
}


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

x86 assembly (clang, -O2):
<SDL_uitoa>:
mov    %edi,%edi
jmp    1030 <SDL_ultoa@plt>

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

LLVM IR (-O2):
define i8* @SDL_uitoa(i32 %0, i8* %1, i32 %2) {
%4 = zext i32 %0 to i64
%5 = tail call i8* @SDL_ultoa(i64 %4, i8* %1, i32 %2)
ret i8* %5
}
double e_NB(double ndvi, double lai) {
  if (ndvi > 0 && ndvi < 3)
    return (0.97 + 0.0033 * lai);
  else if (lai >= 3)
    return (0.98);
  else
    return (0.99);
}


x86 assembly (clang, -O0):
<e_NB>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x10(%rbp)
movsd  %xmm1,-0x18(%rbp)
movsd  -0x10(%rbp),%xmm0
xorps  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jbe    115a <e_NB+0x5a>
movsd  0xed8(%rip),%xmm0
ucomisd -0x10(%rbp),%xmm0
jbe    115a <e_NB+0x5a>
movsd  -0x18(%rbp),%xmm0
movsd  0xed8(%rip),%xmm1
mulsd  %xmm1,%xmm0
movsd  0xed4(%rip),%xmm1
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x8(%rbp)
jmp    1190 <e_NB+0x90>
movsd  -0x18(%rbp),%xmm0
movsd  0xe99(%rip),%xmm1
ucomisd %xmm1,%xmm0
jb     1183 <e_NB+0x83>
movsd  0xe97(%rip),%xmm0
movsd  %xmm0,-0x8(%rbp)
jmp    1190 <e_NB+0x90>
movsd  0xe7d(%rip),%xmm0
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<e_NB>:
movsd  0xef8(%rip),%xmm2
xor    %eax,%eax
ucomisd %xmm2,%xmm1
mulsd  0xef2(%rip),%xmm1
addsd  0xef2(%rip),%xmm1
setb   %al
lea    0xef0(%rip),%rcx
movsd  (%rcx,%rax,8),%xmm3
xorpd  %xmm4,%xmm4
cmpltsd %xmm0,%xmm4
cmpltsd %xmm2,%xmm0
movapd %xmm0,%xmm2
andnpd %xmm3,%xmm2
andpd  %xmm1,%xmm0
orpd   %xmm2,%xmm0
andpd  %xmm4,%xmm0
andnpd %xmm3,%xmm4
orpd   %xmm4,%xmm0
ret

LLVM IR (-O0):
define double @e_NB(double %0, double %1) {
%3 = alloca double
%4 = alloca double
%5 = alloca double
store double %0, double* %4
store double %1, double* %5
%6 = load double, double* %4
%7 = fcmp ogt double %6, 0.000000e+00
br i1 %7, label %8, label %14
8: ; preds = %2
%9 = load double, double* %4
%10 = fcmp olt double %9, 3.000000e+00
br i1 %10, label %11, label %14
11: ; preds = %8
%12 = load double, double* %5
%13 = call double @llvm.fmuladd.f64(double 3.300000e-03, double %12, double 0x3FEF0A3D70A3D70A)
store double %13, double* %3
br label %19
14: ; preds = %8, %2
%15 = load double, double* %5
%16 = fcmp oge double %15, 3.000000e+00
br i1 %16, label %17, label %18
17: ; preds = %14
store double 0x3FEF5C28F5C28F5C, double* %3
br label %19
18: ; preds = %14
store double 0x3FEFAE147AE147AE, double* %3
br label %19
19: ; preds = %18, %17, %11
%20 = load double, double* %3
ret double %20
}

LLVM IR (-O2):
define double @e_NB(double %0, double %1) {
%3 = fcmp ogt double %0, 0.000000e+00
%4 = fcmp olt double %0, 3.000000e+00
%5 = and i1 %3, %4
%6 = tail call double @llvm.fmuladd.f64(double %1, double 3.300000e-03, double 0x3FEF0A3D70A3D70A)
%7 = fcmp ult double %1, 3.000000e+00
%8 = select i1 %7, double 0x3FEFAE147AE147AE, double 0x3FEF5C28F5C28F5C
%9 = select i1 %5, double %6, double %8
ret double %9
}
/* Type definitions */
typedef unsigned int uint8_t;

/* Variables and functions */
unsigned int hex_decode(unsigned char c) {
  extern const uint8_t hex_table[256];
  return hex_table[c];
}


x86 assembly (clang, -O0):
<hex_decode>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movzbl -0x1(%rbp),%eax
mov    %eax,%ecx
mov    0x2ed1(%rip),%rax
mov    (%rax,%rcx,4),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<hex_decode>:
mov    %edi,%eax
mov    0x2edf(%rip),%rcx
mov    (%rcx,%rax,4),%eax
ret

LLVM IR (-O0):
@hex_table = external constant [256 x i32]
define i32 @hex_decode(i8 zeroext %0) {
%2 = alloca i8
store i8 %0, i8* %2
%3 = load i8, i8* %2
%4 = zext i8 %3 to i64
%5 = getelementptr inbounds [256 x i32], [256 x i32]* @hex_table, i64 0, i64 %4
%6 = load i32, i32* %5
ret i32 %6
}

LLVM IR (-O2):
@hex_table = external constant [256 x i32]
define i32 @hex_decode(i8 zeroext %0) {
%2 = zext i8 %0 to i64
%3 = getelementptr inbounds [256 x i32], [256 x i32]* @hex_table, i64 0, i64 %2
%4 = load i32, i32* %3
ret i32 %4
}
void av_codec_is_encoder() {}


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

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

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

LLVM IR (-O2):
define void @av_codec_is_encoder() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ setup_PWMs();
void setup() { setup_PWMs(); }


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

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

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

LLVM IR (-O2):
define void @setup() {
%1 = tail call i32 (...) @setup_PWMs()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ getword(char, int /*<<< orphan*/);
void Flcomment() { getword('\n', 0); }


x86 assembly (clang, -O0):
<Flcomment>:
push   %rbp
mov    %rsp,%rbp
mov    $0xa,%edi
xor    %esi,%esi
call   1030 <getword@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<Flcomment>:
mov    $0xa,%edi
xor    %esi,%esi
jmp    1030 <getword@plt>

LLVM IR (-O0):
define void @Flcomment() {
%1 = call i32 @getword(i8 signext 10, i32 0)
ret void
}

LLVM IR (-O2):
define void @Flcomment() {
%1 = tail call i32 @getword(i8 signext 10, i32 0)
ret void
}
int compare(const void *i, const void *j) {
  if ((*(unsigned long *)i) > (*(unsigned long *)j))
    return (1);
  if ((*(unsigned long *)i) < (*(unsigned long *)j))
    return (-1);
  return (0);
}


x86 assembly (clang, -O0):
<compare>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    -0x10(%rbp),%rax
mov    (%rax),%rax
mov    -0x18(%rbp),%rcx
cmp    (%rcx),%rax
jbe    112c <compare+0x2c>
movl   $0x1,-0x4(%rbp)
jmp    1153 <compare+0x53>
mov    -0x10(%rbp),%rax
mov    (%rax),%rax
mov    -0x18(%rbp),%rcx
cmp    (%rcx),%rax
jae    114c <compare+0x4c>
movl   $0xffffffff,-0x4(%rbp)
jmp    1153 <compare+0x53>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<compare>:
mov    (%rdi),%rax
mov    (%rsi),%rcx
cmp    %rcx,%rax
sbb    %edx,%edx
cmp    %rcx,%rax
mov    $0x1,%eax
cmovbe %edx,%eax
ret

LLVM IR (-O0):
define i32 @compare(i8* %0, i8* %1) {
%3 = alloca i32
%4 = alloca i8*
%5 = alloca i8*
store i8* %0, i8** %4
store i8* %1, i8** %5
%6 = load i8*, i8** %4
%7 = bitcast i8* %6 to i64*
%8 = load i64, i64* %7
%9 = load i8*, i8** %5
%10 = bitcast i8* %9 to i64*
%11 = load i64, i64* %10
%12 = icmp ugt i64 %8, %11
br i1 %12, label %13, label %14
13: ; preds = %2
store i32 1, i32* %3
br label %24
14: ; preds = %2
%15 = load i8*, i8** %4
%16 = bitcast i8* %15 to i64*
%17 = load i64, i64* %16
%18 = load i8*, i8** %5
%19 = bitcast i8* %18 to i64*
%20 = load i64, i64* %19
%21 = icmp ult i64 %17, %20
br i1 %21, label %22, label %23
22: ; preds = %14
store i32 -1, i32* %3
br label %24
23: ; preds = %14
store i32 0, i32* %3
br label %24
24: ; preds = %23, %22, %13
%25 = load i32, i32* %3
ret i32 %25
}

LLVM IR (-O2):
define i32 @compare(i8* nocapture %0, i8* nocapture %1) {
%3 = bitcast i8* %0 to i64*
%4 = load i64, i64* %3
%5 = bitcast i8* %1 to i64*
%6 = load i64, i64* %5
%7 = icmp ugt i64 %4, %6
%8 = icmp ult i64 %4, %6
%9 = sext i1 %8 to i32
%10 = select i1 %7, i32 1, i32 %9
ret i32 %10
}
/* Variables and functions */
int /*<<< orphan*/ _scanf_getl(char *, int *, int, int, int);
int /*<<< orphan*/ safe_gets(char *, int);
unsigned getfnum(int base, int isSigned, int width) {
  char buf[80];
  safe_gets(buf, 80);
  if (width > 80)
    width = 80;
  unsigned x = 0;
  _scanf_getl(buf, (int *)&x, base, width, isSigned);
  return x;
}


x86 assembly (clang, -O0):
<getfnum>:
push   %rbp
mov    %rsp,%rbp
sub    $0x70,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
lea    -0x60(%rbp),%rdi
mov    $0x50,%esi
call   1040 <safe_gets@plt>
cmpl   $0x50,-0xc(%rbp)
jle    1150 <getfnum+0x30>
movl   $0x50,-0xc(%rbp)
movl   $0x0,-0x64(%rbp)
lea    -0x60(%rbp),%rdi
mov    -0x4(%rbp),%edx
mov    -0xc(%rbp),%ecx
mov    -0x8(%rbp),%r8d
lea    -0x64(%rbp),%rsi
call   1030 <_scanf_getl@plt>
mov    -0x64(%rbp),%eax
add    $0x70,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<getfnum>:
push   %rbp
push   %r15
push   %r14
push   %r12
push   %rbx
sub    $0x60,%rsp
mov    %edx,%ebx
mov    %esi,%r14d
mov    %edi,%r12d
lea    0x10(%rsp),%r15
mov    $0x50,%ebp
mov    %r15,%rdi
mov    $0x50,%esi
call   1040 <safe_gets@plt>
cmp    $0x50,%ebx
cmovl  %ebx,%ebp
movl   $0x0,0xc(%rsp)
lea    0xc(%rsp),%rsi
mov    %r15,%rdi
mov    %r12d,%edx
mov    %ebp,%ecx
mov    %r14d,%r8d
call   1030 <_scanf_getl@plt>
mov    0xc(%rsp),%eax
add    $0x60,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
define i32 @getfnum(i32 %0, i32 %1, i32 %2) {
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
%7 = alloca [80 x i8]
%8 = alloca i32
store i32 %0, i32* %4
store i32 %1, i32* %5
store i32 %2, i32* %6
%9 = getelementptr inbounds [80 x i8], [80 x i8]* %7, i64 0, i64 0
%10 = call i32 @safe_gets(i8* %9, i32 80)
%11 = load i32, i32* %6
%12 = icmp sgt i32 %11, 80
br i1 %12, label %13, label %14
13: ; preds = %3
store i32 80, i32* %6
br label %14
14: ; preds = %13, %3
store i32 0, i32* %8
%15 = getelementptr inbounds [80 x i8], [80 x i8]* %7, i64 0, i64 0
%16 = load i32, i32* %4
%17 = load i32, i32* %6
%18 = load i32, i32* %5
%19 = call i32 @_scanf_getl(i8* %15, i32* %8, i32 %16, i32 %17, i32 %18)
%20 = load i32, i32* %8
ret i32 %20
}

LLVM IR (-O2):
define i32 @getfnum(i32 %0, i32 %1, i32 %2) {
%4 = alloca [80 x i8]
%5 = alloca i32
%6 = getelementptr inbounds [80 x i8], [80 x i8]* %4, i64 0, i64 0
%7 = call i32 @safe_gets(i8* %6, i32 80)
%8 = icmp slt i32 %2, 80
%9 = select i1 %8, i32 %2, i32 80
%10 = bitcast i32* %5 to i8*
store i32 0, i32* %5
%11 = call i32 @_scanf_getl(i8* %6, i32* %5, i32 %0, i32 %9, i32 %1)
%12 = load i32, i32* %5
ret i32 %12
}
void vfdcFinal() {}


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

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

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

LLVM IR (-O2):
define void @vfdcFinal() {
ret void
}
/* Type definitions */
typedef int off_t;

/* Variables and functions */
int /*<<< orphan*/ EXIT_FAILURE;
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int lseek(int, int, int);
int /*<<< orphan*/ perror(char *);
off_t x_lseek(int fd, off_t offset, int whence) {
  const off_t result = lseek(fd, offset, whence);
  if (result == -1) {
    perror("lseek() error");
    exit(EXIT_FAILURE);
  }
  return result;
}


x86 assembly (clang, -O0):
<x_lseek>:
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
call   1030 <lseek@plt>
mov    %eax,-0x10(%rbp)
cmpl   $0xffffffff,-0x10(%rbp)
jne    1176 <x_lseek+0x46>
lea    0xe9d(%rip),%rdi
call   1040 <perror@plt>
mov    0x2e71(%rip),%rax
mov    (%rax),%edi
call   1050 <exit@plt>
mov    -0x10(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<x_lseek>:
push   %rax
call   1030 <lseek@plt>
cmp    $0xffffffff,%eax
je     113d <x_lseek+0xd>
pop    %rcx
ret
lea    0xebc(%rip),%rdi
call   1040 <perror@plt>
mov    0x2e90(%rip),%rax
mov    (%rax),%edi
call   1050 <exit@plt>

LLVM IR (-O0):
@.str = [14 x i8] c"lseek() error\00"
@EXIT_FAILURE = global i32 0
define i32 @x_lseek(i32 %0, i32 %1, i32 %2) {
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
store i32 %0, i32* %4
store i32 %1, i32* %5
store i32 %2, i32* %6
%8 = load i32, i32* %4
%9 = load i32, i32* %5
%10 = load i32, i32* %6
%11 = call i32 @lseek(i32 %8, i32 %9, i32 %10)
store i32 %11, i32* %7
%12 = load i32, i32* %7
%13 = icmp eq i32 %12, -1
br i1 %13, label %14, label %18
14: ; preds = %3
%15 = call i32 @perror(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0))
%16 = load i32, i32* @EXIT_FAILURE
%17 = call i32 @exit(i32 %16)
unreachable
18: ; preds = %3
%19 = load i32, i32* %7
ret i32 %19
}

LLVM IR (-O2):
@.str = [14 x i8] c"lseek() error\00"
@EXIT_FAILURE = global i32 0
define i32 @x_lseek(i32 %0, i32 %1, i32 %2) {
%4 = tail call i32 @lseek(i32 %0, i32 %1, i32 %2)
%5 = icmp eq i32 %4, -1
br i1 %5, label %6, label %10
6: ; preds = %3
%7 = tail call i32 @perror(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0))
%8 = load i32, i32* @EXIT_FAILURE
%9 = tail call i32 @exit(i32 %8)
unreachable
10: ; preds = %3
ret i32 %4
}
void VID_MenuDraw(void) {}


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

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

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

LLVM IR (-O2):
define void @VID_MenuDraw() {
ret void
}
/* Type definitions */
typedef scalar_t__ uint32_t;

/* Variables and functions */
int /*<<< orphan*/ sds_mmap(void *, scalar_t__, int /*<<< orphan*/ *);
uint32_t cma_mmap(uint32_t phyAddr, uint32_t len) {
  return (uint32_t)sds_mmap((void *)phyAddr, len, NULL);
}


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

x86 assembly (clang, -O2):
<cma_mmap>:
push   %rax
xor    %edx,%edx
call   1030 <sds_mmap@plt>
cltq
pop    %rcx
ret

LLVM IR (-O0):
define i64 @cma_mmap(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 = inttoptr i64 %5 to i8*
%7 = load i64, i64* %4
%8 = call i32 @sds_mmap(i8* %6, i64 %7, i32* null)
%9 = sext i32 %8 to i64
ret i64 %9
}

LLVM IR (-O2):
define i64 @cma_mmap(i64 %0, i64 %1) {
%3 = inttoptr i64 %0 to i8*
%4 = tail call i32 @sds_mmap(i8* %3, i64 %1, i32* null)
%5 = sext i32 %4 to i64
ret i64 %5
}
/* Type definitions */
struct request_queue {
  int dummy;
};
struct blk_mq_ctx {
  int dummy;
};

/* Variables and functions */
struct blk_mq_ctx *__blk_mq_get_ctx(struct request_queue *, int /*<<< orphan*/);
int /*<<< orphan*/ get_cpu_light();
struct blk_mq_ctx *blk_mq_get_ctx(struct request_queue *q) {
  return __blk_mq_get_ctx(q, get_cpu_light());
}


x86 assembly (clang, -O0):
<blk_mq_get_ctx>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    $0x0,%al
call   1040 <get_cpu_light@plt>
mov    -0x10(%rbp),%rdi
mov    %eax,%esi
call   1030 <__blk_mq_get_ctx@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<blk_mq_get_ctx>:
push   %rbx
mov    %rdi,%rbx
xor    %eax,%eax
call   1040 <get_cpu_light@plt>
mov    %rbx,%rdi
mov    %eax,%esi
pop    %rbx
jmp    1030 <__blk_mq_get_ctx@plt>

LLVM IR (-O0):
%struct.blk_mq_ctx = type { i32 }
%struct.request_queue = type { i32 }
define %struct.blk_mq_ctx* @blk_mq_get_ctx(%struct.request_queue* %0) {
%2 = alloca %struct.request_queue*
store %struct.request_queue* %0, %struct.request_queue** %2
%3 = load %struct.request_queue*, %struct.request_queue** %2
%4 = call i32 (...) @get_cpu_light()
%5 = call %struct.blk_mq_ctx* @__blk_mq_get_ctx(%struct.request_queue* %3, i32 %4)
ret %struct.blk_mq_ctx* %5
}

LLVM IR (-O2):
%struct.blk_mq_ctx = type { i32 }
%struct.request_queue = type { i32 }
define %struct.blk_mq_ctx* @blk_mq_get_ctx(%struct.request_queue* %0) {
%2 = tail call i32 (...) @get_cpu_light()
%3 = tail call %struct.blk_mq_ctx* @__blk_mq_get_ctx(%struct.request_queue* %0, i32 %2)
ret %struct.blk_mq_ctx* %3
}
int w55fa93fb_blank_device(int blank_mode, struct fb_info *info) { return 0; }


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

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

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

LLVM IR (-O2):
%struct.fb_info = type opaque
define i32 @w55fa93fb_blank_device(i32 %0, %struct.fb_info* nocapture readnone %1) {
ret i32 0
}
/* Variables and functions */
scalar_t__ floor(double const);
void convertDecimal2DegMin(const double dec, int *deg, double *min) {
  *deg = (int)floor(dec);
  *min = (dec - *deg) / 0.01666666666666666667;
}


x86 assembly (clang, -O0):
<convertDecimal2DegMin>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movsd  %xmm0,-0x8(%rbp)
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
movsd  -0x8(%rbp),%xmm0
call   1030 <floor@plt>
mov    %eax,%ecx
mov    -0x10(%rbp),%rax
mov    %ecx,(%rax)
movsd  -0x8(%rbp),%xmm0
mov    -0x10(%rbp),%rax
cvtsi2sdl (%rax),%xmm1
subsd  %xmm1,%xmm0
movsd  0xeb0(%rip),%xmm1
divsd  %xmm1,%xmm0
mov    -0x18(%rbp),%rax
movsd  %xmm0,(%rax)
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<convertDecimal2DegMin>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%r14
mov    %rdi,%rbx
movsd  %xmm0,(%rsp)
call   1030 <floor@plt>
mov    %eax,(%rbx)
xorps  %xmm0,%xmm0
cvtsi2sd %eax,%xmm0
movsd  (%rsp),%xmm1
subsd  %xmm0,%xmm1
divsd  0xec2(%rip),%xmm1
movsd  %xmm1,(%r14)
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define void @convertDecimal2DegMin(double %0, i32* %1, double* %2) {
%4 = alloca double
%5 = alloca i32*
%6 = alloca double*
store double %0, double* %4
store i32* %1, i32** %5
store double* %2, double** %6
%7 = load double, double* %4
%8 = call i64 @floor(double %7)
%9 = trunc i64 %8 to i32
%10 = load i32*, i32** %5
store i32 %9, i32* %10
%11 = load double, double* %4
%12 = load i32*, i32** %5
%13 = load i32, i32* %12
%14 = sitofp i32 %13 to double
%15 = fsub double %11, %14
%16 = fdiv double %15, 0x3F91111111111111
%17 = load double*, double** %6
store double %16, double* %17
ret void
}

LLVM IR (-O2):
define void @convertDecimal2DegMin(double %0, i32* nocapture writeonly %1, double* nocapture writeonly %2) {
%4 = tail call i64 @floor(double %0)
%5 = trunc i64 %4 to i32
store i32 %5, i32* %1
%6 = sitofp i32 %5 to double
%7 = fsub double %0, %6
%8 = fdiv double %7, 0x3F91111111111111
store double %8, double* %2
ret void
}
int test_dma_abort() { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @test_dma_abort() {
ret i32 0
}
int subtract(int num1, int num2) { return num1 - num2; }


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

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

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

LLVM IR (-O2):
define i32 @subtract(i32 %0, i32 %1) {
%3 = sub nsw i32 %0, %1
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ dump_stuff_be(void *, unsigned int);
int /*<<< orphan*/ printf(char *, char *);
void dump_stuff_be_msg_sepline(const void *msg, void *x, unsigned int size) {
  printf("%s :\n", (char *)msg);
  dump_stuff_be(x, size);
}


x86 assembly (clang, -O0):
<dump_stuff_be_msg_sepline>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    -0x8(%rbp),%rsi
lea    0xec2(%rip),%rdi
call   1030 <printf@plt>
mov    -0x10(%rbp),%rdi
mov    -0x14(%rbp),%esi
call   1040 <dump_stuff_be@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<dump_stuff_be_msg_sepline>:
push   %rbp
push   %rbx
push   %rax
mov    %edx,%ebp
mov    %rsi,%rbx
mov    %rdi,%rsi
lea    0xece(%rip),%rdi
call   1030 <printf@plt>
mov    %rbx,%rdi
mov    %ebp,%esi
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    1040 <dump_stuff_be@plt>

LLVM IR (-O0):
@.str = [6 x i8] c"%s :\0A\00"
define void @dump_stuff_be_msg_sepline(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 = call i32 @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i8* %7)
%9 = load i8*, i8** %5
%10 = load i32, i32* %6
%11 = call i32 @dump_stuff_be(i8* %9, i32 %10)
ret void
}

LLVM IR (-O2):
@.str = [6 x i8] c"%s :\0A\00"
define void @dump_stuff_be_msg_sepline(i8* %0, i8* %1, i32 %2) {
%4 = tail call i32 @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i8* %0)
%5 = tail call i32 @dump_stuff_be(i8* %1, i32 %2)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ puts(char *);
void warning(void) {
  puts("you can use by :");
  puts("cbf </path/to/file>");
}


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

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

LLVM IR (-O0):
@.str = [17 x i8] c"you can use by :\00"
@.str.1 = [20 x i8] c"cbf </path/to/file>\00"
define void @warning() {
%1 = call i32 @puts(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0))
%2 = call i32 @puts(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [17 x i8] c"you can use by :\00"
@.str.1 = [20 x i8] c"cbf </path/to/file>\00"
define void @warning() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0))
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([20 x i8], [20 x i8]* @.str.1, i64 0, i64 0))
ret void
}
int isspace(int c) {
  if (c == ' ')
    return (1);
  if (c == '\t')
    return (1);
  if (c == '\n')
    return (1);
  return (0);
}


x86 assembly (clang, -O0):
<isspace>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
cmpl   $0x20,-0x8(%rbp)
jne    111d <isspace+0x1d>
movl   $0x1,-0x4(%rbp)
jmp    1150 <isspace+0x50>
cmpl   $0x9,-0x8(%rbp)
jne    1133 <isspace+0x33>
movl   $0x1,-0x4(%rbp)
jmp    1150 <isspace+0x50>
cmpl   $0xa,-0x8(%rbp)
jne    1149 <isspace+0x49>
movl   $0x1,-0x4(%rbp)
jmp    1150 <isspace+0x50>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<isspace>:
cmp    $0x20,%edi
ja     111d <isspace+0x1d>
mov    $0x1,%eax
mov    %edi,%ecx
movabs $0x100000600,%rdx
bt     %rcx,%rdx
jae    111d <isspace+0x1d>
ret
xor    %eax,%eax
ret

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

LLVM IR (-O2):
define i32 @isspace(i32 %0) {
switch i32 %0, label %2 [
i32 32, label %3
i32 9, label %3
i32 10, label %3
]
2: ; preds = %1
br label %3
3: ; preds = %1, %1, %1, %2
%4 = phi i32 [ 0, %2 ], [ 1, %1 ], [ 1, %1 ], [ 1, %1 ]
ret i32 %4
}
unsigned xrop3_232_1_1(unsigned char s, unsigned char t) {
  unsigned D = 0x00ff;
  unsigned S = ((unsigned)s << 8) | s;
  unsigned T = ((unsigned)t << 8) | t;
  unsigned stk1;
  unsigned stk2;
  unsigned stk3;
  stk2 = S ^ T;
  stk3 = D ^ S;
  stk2 = stk2 & stk3;
  stk1 = S ^ stk2;
  return (stk1 & (~S) & (~T)) | (D & S) | (D & T);
}


x86 assembly (clang, -O0):
<xrop3_232_1_1>:
push   %rbp
mov    %rsp,%rbp
mov    %sil,%al
mov    %dil,%cl
mov    %cl,-0x1(%rbp)
mov    %al,-0x2(%rbp)
movl   $0xff,-0x8(%rbp)
movzbl -0x1(%rbp),%eax
shl    $0x8,%eax
movzbl -0x1(%rbp),%ecx
or     %ecx,%eax
mov    %eax,-0xc(%rbp)
movzbl -0x2(%rbp),%eax
shl    $0x8,%eax
movzbl -0x2(%rbp),%ecx
or     %ecx,%eax
mov    %eax,-0x10(%rbp)
mov    -0xc(%rbp),%eax
xor    -0x10(%rbp),%eax
mov    %eax,-0x18(%rbp)
mov    -0x8(%rbp),%eax
xor    -0xc(%rbp),%eax
mov    %eax,-0x1c(%rbp)
mov    -0x18(%rbp),%eax
and    -0x1c(%rbp),%eax
mov    %eax,-0x18(%rbp)
mov    -0xc(%rbp),%eax
xor    -0x18(%rbp),%eax
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
mov    -0xc(%rbp),%ecx
xor    $0xffffffff,%ecx
and    %ecx,%eax
mov    -0x10(%rbp),%ecx
xor    $0xffffffff,%ecx
and    %ecx,%eax
mov    -0x8(%rbp),%ecx
and    -0xc(%rbp),%ecx
or     %ecx,%eax
mov    -0x8(%rbp),%ecx
and    -0x10(%rbp),%ecx
or     %ecx,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @xrop3_232_1_1(i8 zeroext %0, i8 zeroext %1) {
%3 = alloca i8
%4 = alloca i8
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32
%10 = alloca i32
store i8 %0, i8* %3
store i8 %1, i8* %4
store i32 255, i32* %5
%11 = load i8, i8* %3
%12 = zext i8 %11 to i32
%13 = shl i32 %12, 8
%14 = load i8, i8* %3
%15 = zext i8 %14 to i32
%16 = or i32 %13, %15
store i32 %16, i32* %6
%17 = load i8, i8* %4
%18 = zext i8 %17 to i32
%19 = shl i32 %18, 8
%20 = load i8, i8* %4
%21 = zext i8 %20 to i32
%22 = or i32 %19, %21
store i32 %22, i32* %7
%23 = load i32, i32* %6
%24 = load i32, i32* %7
%25 = xor i32 %23, %24
store i32 %25, i32* %9
%26 = load i32, i32* %5
%27 = load i32, i32* %6
%28 = xor i32 %26, %27
store i32 %28, i32* %10
%29 = load i32, i32* %9
%30 = load i32, i32* %10
%31 = and i32 %29, %30
store i32 %31, i32* %9
%32 = load i32, i32* %6
%33 = load i32, i32* %9
%34 = xor i32 %32, %33
store i32 %34, i32* %8
%35 = load i32, i32* %8
%36 = load i32, i32* %6
%37 = xor i32 %36, -1
%38 = and i32 %35, %37
%39 = load i32, i32* %7
%40 = xor i32 %39, -1
%41 = and i32 %38, %40
%42 = load i32, i32* %5
%43 = load i32, i32* %6
%44 = and i32 %42, %43
%45 = or i32 %41, %44
%46 = load i32, i32* %5
%47 = load i32, i32* %7
%48 = and i32 %46, %47
%49 = or i32 %45, %48
ret i32 %49
}

LLVM IR (-O2):
define i32 @xrop3_232_1_1(i8 zeroext %0, i8 zeroext %1) {
%3 = or i8 %1, %0
%4 = zext i8 %3 to i32
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ AT_FDCWD;
int /*<<< orphan*/ SYS_renameat2;
long syscall(int /*<<< orphan*/, int /*<<< orphan*/, char const *,
             int /*<<< orphan*/, char const *, int const);
long linux_xch_syscall(const char *path1, const char *path2) {
  const int RENAME_EXCHANGE = 2;
  return syscall(SYS_renameat2, AT_FDCWD, path1, AT_FDCWD, path2,
                 RENAME_EXCHANGE);
}


x86 assembly (clang, -O0):
<linux_xch_syscall>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x2,-0x14(%rbp)
mov    0x2ec2(%rip),%rax
mov    (%rax),%edi
mov    0x2e99(%rip),%rax
mov    (%rax),%esi
mov    -0x8(%rbp),%rdx
mov    0x2e8c(%rip),%rax
mov    (%rax),%ecx
mov    -0x10(%rbp),%r8
mov    $0x2,%r9d
call   1030 <syscall@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<linux_xch_syscall>:
mov    %rsi,%r8
mov    %rdi,%rdx
mov    0x2ed3(%rip),%rax
mov    (%rax),%edi
mov    0x2eaa(%rip),%rax
mov    (%rax),%ecx
mov    %ecx,%esi
mov    $0x2,%r9d
jmp    1030 <syscall@plt>

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

LLVM IR (-O2):
@SYS_renameat2 = global i32 0
@AT_FDCWD = global i32 0
define i64 @linux_xch_syscall(i8* %0, i8* %1) {
%3 = load i32, i32* @SYS_renameat2
%4 = load i32, i32* @AT_FDCWD
%5 = tail call i64 @syscall(i32 %3, i32 %4, i8* %0, i32 %4, i8* %1, i32 2)
ret i64 %5
}
signed char foo3(int x) { return x; }


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

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

LLVM IR (-O0):
define signext i8 @foo3(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = trunc i32 %3 to i8
ret i8 %4
}

LLVM IR (-O2):
define signext i8 @foo3(i32 %0) {
%2 = trunc i32 %0 to i8
ret i8 %2
}
const char *ls_info_git_branch() { return "[not defined]"; }


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

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

LLVM IR (-O0):
@.str = [14 x i8] c"[not defined]\00"
define i8* @ls_info_git_branch() {
ret i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0)
}

LLVM IR (-O2):
@.str = [14 x i8] c"[not defined]\00"
define i8* @ls_info_git_branch() {
ret i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0)
}
void glUniform2f(void) { return; }


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

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

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

LLVM IR (-O2):
define void @glUniform2f() {
ret void
}
int lwgeom_contains_subgeoms(int type) {
  switch (type) {
  case 4:
  case 5:
  case 6:
  case 7:
  case 9:
  case 14:
  case 15:
    return -1;
    break;
  default:
    return 0;
  }
}


x86 assembly (clang, -O0):
<lwgeom_contains_subgeoms>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
mov    -0x8(%rbp),%eax
mov    %eax,-0xc(%rbp)
add    $0xfffffffc,%eax
sub    $0x4,%eax
jb     1143 <lwgeom_contains_subgeoms+0x43>
jmp    111e <lwgeom_contains_subgeoms+0x1e>
mov    -0xc(%rbp),%eax
sub    $0x9,%eax
je     1143 <lwgeom_contains_subgeoms+0x43>
jmp    112f <lwgeom_contains_subgeoms+0x2f>
mov    -0xc(%rbp),%eax
add    $0xfffffff2,%eax
sub    $0x1,%eax
ja     114f <lwgeom_contains_subgeoms+0x4f>
jmp    1143 <lwgeom_contains_subgeoms+0x43>
movl   $0xffffffff,-0x4(%rbp)
jmp    1156 <lwgeom_contains_subgeoms+0x56>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<lwgeom_contains_subgeoms>:
add    $0xfffffffc,%edi
xor    %eax,%eax
cmp    $0xb,%edi
ja     1117 <lwgeom_contains_subgeoms+0x17>
movslq %edi,%rax
lea    0xeec(%rip),%rcx
mov    (%rcx,%rax,4),%eax
ret

LLVM IR (-O0):
define i32 @lwgeom_contains_subgeoms(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %3
%4 = load i32, i32* %3
switch i32 %4, label %6 [
i32 4, label %5
i32 5, label %5
i32 6, label %5
i32 7, label %5
i32 9, label %5
i32 14, label %5
i32 15, label %5
]
5: ; preds = %1, %1, %1, %1, %1, %1, %1
store i32 -1, i32* %2
br label %7
6: ; preds = %1
store i32 0, i32* %2
br label %7
7: ; preds = %6, %5
%8 = load i32, i32* %2
ret i32 %8
}

LLVM IR (-O2):
@switch.table.lwgeom_contains_subgeoms = [12 x i32] [i32 -1, i32 -1, i32 -1, i32 -1, i32 0, i32 -1, i32 0, i32 0, i32 0, i32 0, i32 -1, i32 -1]
define i32 @lwgeom_contains_subgeoms(i32 %0) {
%2 = add i32 %0, -4
%3 = icmp ult i32 %2, 12
br i1 %3, label %4, label %8
4: ; preds = %1
%5 = sext i32 %2 to i64
%6 = getelementptr inbounds [12 x i32], [12 x i32]* @switch.table.lwgeom_contains_subgeoms, i64 0, i64 %5
%7 = load i32, i32* %6
br label %8
8: ; preds = %1, %4
%9 = phi i32 [ %7, %4 ], [ 0, %1 ]
ret i32 %9
}
int test_imm_ABint8_reg(signed char val) {
  return ((val) & (0xAB << 0)) ? -20 : -40;
}


x86 assembly (clang, -O0):
<test_imm_ABint8_reg>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movsbl -0x1(%rbp),%edx
and    $0xab,%edx
mov    $0xffffffd8,%eax
mov    $0xffffffec,%ecx
cmp    $0x0,%edx
cmovne %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_imm_ABint8_reg>:
test   $0xab,%dil
mov    $0xffffffd8,%ecx
mov    $0xffffffec,%eax
cmove  %ecx,%eax
ret

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

LLVM IR (-O2):
define i32 @test_imm_ABint8_reg(i8 signext %0) {
%2 = and i8 %0, -85
%3 = icmp eq i8 %2, 0
%4 = select i1 %3, i32 -40, i32 -20
ret i32 %4
}
int execl(const char *path, const char *arg, ...) {}


x86 assembly (clang, -O0):
<execl>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @execl(i8* nocapture readnone %0, i8* nocapture readnone %1, ...) {
ret i32 undef
}
char *vector_pi(int *v, int i) { return (char *)&v[i + 1]; }


x86 assembly (clang, -O0):
<vector_pi>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rax
mov    -0xc(%rbp),%ecx
add    $0x1,%ecx
movslq %ecx,%rcx
shl    $0x2,%rcx
add    %rcx,%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<vector_pi>:
movslq %esi,%rax
lea    (%rdi,%rax,4),%rax
add    $0x4,%rax
ret

LLVM IR (-O0):
define i8* @vector_pi(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 %6, 1
%8 = sext i32 %7 to i64
%9 = getelementptr inbounds i32, i32* %5, i64 %8
%10 = bitcast i32* %9 to i8*
ret i8* %10
}

LLVM IR (-O2):
define i8* @vector_pi(i32* readnone %0, i32 %1) {
%3 = add nsw i32 %1, 1
%4 = sext i32 %3 to i64
%5 = getelementptr inbounds i32, i32* %0, i64 %4
%6 = bitcast i32* %5 to i8*
ret i8* %6
}
/* Variables and functions */
int /*<<< orphan*/ _HibernateWriteComplete();
void HibernateDisable(void) {
  (*((volatile unsigned long *)(0x400FC010))) &= ~0x00000040;
  _HibernateWriteComplete();
}


x86 assembly (clang, -O0):
<HibernateDisable>:
push   %rbp
mov    %rsp,%rbp
mov    $0x400fc010,%eax
mov    (%rax),%rcx
and    $0xffffffffffffffbf,%rcx
mov    $0x400fc010,%eax
mov    %rcx,(%rax)
mov    $0x0,%al
call   1030 <_HibernateWriteComplete@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<HibernateDisable>:
andq   $0xffffffffffffffbf,0x400fc010
40 bf
xor    %eax,%eax
jmp    1030 <_HibernateWriteComplete@plt>

LLVM IR (-O0):
define void @HibernateDisable() {
%1 = load volatile i64, i64* inttoptr (i64 1074774032 to i64*)
%2 = and i64 %1, -65
store volatile i64 %2, i64* inttoptr (i64 1074774032 to i64*)
%3 = call i32 (...) @_HibernateWriteComplete()
ret void
}

LLVM IR (-O2):
define void @HibernateDisable() {
%1 = load volatile i64, i64* inttoptr (i64 1074774032 to i64*)
%2 = and i64 %1, -65
store volatile i64 %2, i64* inttoptr (i64 1074774032 to i64*)
%3 = tail call i32 (...) @_HibernateWriteComplete()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ __builtin_arm_sev();
void sev() { __builtin_arm_sev(); }


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

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

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

LLVM IR (-O2):
define void @sev() {
%1 = tail call i32 (...) @__builtin_arm_sev()
ret void
}
char *xmalloc(size)
unsigned int size;
{
  char *result = malloc(size);
  if (result == 0)
    fatal("virtual memory exhausted");
  return result;
}


x86 assembly (clang, -O0):
<xmalloc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
mov    %eax,%edi
call   1030 <malloc@plt>
mov    %rax,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
jne    1152 <xmalloc+0x32>
lea    0xeb5(%rip),%rdi
mov    $0x0,%al
call   1040 <fatal@plt>
mov    -0x10(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<xmalloc>:
push   %rbx
mov    %edi,%edi
call   1030 <malloc@plt>
mov    %rax,%rbx
test   %rax,%rax
jne    113e <xmalloc+0x1e>
lea    0xec9(%rip),%rdi
xor    %eax,%eax
call   1040 <fatal@plt>
mov    %rbx,%rax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [25 x i8] c"virtual memory exhausted\00"
define i8* @xmalloc(i32 %0) {
%2 = alloca i32
%3 = alloca i8*
store i32 %0, i32* %2
%4 = load i32, i32* %2
%5 = zext i32 %4 to i64
%6 = call i8* @malloc(i64 %5)
store i8* %6, i8** %3
%7 = load i8*, i8** %3
%8 = icmp eq i8* %7, null
br i1 %8, label %9, label %11
9: ; preds = %1
%10 = call i32 (i8*, ...) bitcast (i32 (...)* @fatal to i32 (i8*, ...)*)(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str, i64 0, i64 0))
br label %11
11: ; preds = %9, %1
%12 = load i8*, i8** %3
ret i8* %12
}

LLVM IR (-O2):
@.str = [25 x i8] c"virtual memory exhausted\00"
define i8* @xmalloc(i32 %0) {
%2 = zext i32 %0 to i64
%3 = tail call i8* @malloc(i64 %2)
%4 = icmp eq i8* %3, null
br i1 %4, label %5, label %7
5: ; preds = %1
%6 = tail call i32 (i8*, ...) bitcast (i32 (...)* @fatal to i32 (i8*, ...)*)(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str, i64 0, i64 0))
br label %7
7: ; preds = %5, %1
ret i8* %3
}
void enter_lazy_tlb(struct mm_struct *mm, struct task_struct *tsk,
                    unsigned cpu) {}


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

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

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

LLVM IR (-O2):
%struct.mm_struct = type opaque
%struct.task_struct = type opaque
define void @enter_lazy_tlb(%struct.mm_struct* nocapture %0, %struct.task_struct* nocapture %1, i32 %2) {
ret void
}
void ADCTemperatureRefVolDisable(unsigned long ulBase) {
  ;
  (*((volatile unsigned long *)(ulBase + 0x00000008))) &= ~0x00800000;
}


x86 assembly (clang, -O0):
<ADCTemperatureRefVolDisable>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    0x8(%rax),%rcx
and    $0xffffffffff7fffff,%rcx
mov    %rcx,0x8(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<ADCTemperatureRefVolDisable>:
andq   $0xffffffffff7fffff,0x8(%rdi)
ff
ret

LLVM IR (-O0):
define void @ADCTemperatureRefVolDisable(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = load i64, i64* %2
%4 = add i64 %3, 8
%5 = inttoptr i64 %4 to i64*
%6 = load volatile i64, i64* %5
%7 = and i64 %6, -8388609
store volatile i64 %7, i64* %5
ret void
}

LLVM IR (-O2):
define void @ADCTemperatureRefVolDisable(i64 %0) {
%2 = add i64 %0, 8
%3 = inttoptr i64 %2 to i64*
%4 = load volatile i64, i64* %3
%5 = and i64 %4, -8388609
store volatile i64 %5, i64* %3
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ uint16_t;
struct ip {
  int /*<<< orphan*/ ip_len;
};
struct ether_header {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ ntohl(int /*<<< orphan*/);
uint16_t inet_get_iphdr_len(void *data) {
  struct ip *iph;
  iph = data + sizeof(struct ether_header);
  return ntohl(iph->ip_len);
}


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

x86 assembly (clang, -O2):
<inet_get_iphdr_len>:
mov    0x4(%rdi),%edi
jmp    1030 <ntohl@plt>

LLVM IR (-O0):
%struct.ip = type { i32 }
define i32 @inet_get_iphdr_len(i8* %0) {
%2 = alloca i8*
%3 = alloca %struct.ip*
store i8* %0, i8** %2
%4 = load i8*, i8** %2
%5 = getelementptr i8, i8* %4, i64 4
%6 = bitcast i8* %5 to %struct.ip*
store %struct.ip* %6, %struct.ip** %3
%7 = load %struct.ip*, %struct.ip** %3
%8 = getelementptr inbounds %struct.ip, %struct.ip* %7, i32 0, i32 0
%9 = load i32, i32* %8
%10 = call i32 @ntohl(i32 %9)
ret i32 %10
}

LLVM IR (-O2):
define i32 @inet_get_iphdr_len(i8* nocapture %0) {
%2 = getelementptr i8, i8* %0, i64 4
%3 = bitcast i8* %2 to i32*
%4 = load i32, i32* %3
%5 = tail call i32 @ntohl(i32 %4)
ret i32 %5
}
void gtk_aspect_frame_new() {}


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

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

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

LLVM IR (-O2):
define void @gtk_aspect_frame_new() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ leftDropAtPos(int);
int /*<<< orphan*/ writeDebugStreamLine(char *);
void leftOuterCrate4() {
  writeDebugStreamLine("Crate 4");
  leftDropAtPos(3);
}


x86 assembly (clang, -O0):
<leftOuterCrate4>:
push   %rbp
mov    %rsp,%rbp
lea    0xed5(%rip),%rdi
call   1040 <writeDebugStreamLine@plt>
mov    $0x3,%edi
call   1030 <leftDropAtPos@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<leftOuterCrate4>:
push   %rax
lea    0xed8(%rip),%rdi
call   1040 <writeDebugStreamLine@plt>
mov    $0x3,%edi
pop    %rax
jmp    1030 <leftDropAtPos@plt>

LLVM IR (-O0):
@.str = [8 x i8] c"Crate 4\00"
define void @leftOuterCrate4() {
%1 = call i32 @writeDebugStreamLine(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0))
%2 = call i32 @leftDropAtPos(i32 3)
ret void
}

LLVM IR (-O2):
@.str = [8 x i8] c"Crate 4\00"
define void @leftOuterCrate4() {
%1 = tail call i32 @writeDebugStreamLine(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0))
%2 = tail call i32 @leftDropAtPos(i32 3)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ error(char *);
int /*<<< orphan*/ junk();
illname() {
  error("illegal symbol NAME");
  junk();
}


x86 assembly (clang, -O0):
<illname>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    0xed1(%rip),%rdi
call   1040 <error@plt>
mov    $0x0,%al
call   1030 <junk@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
@.str = [20 x i8] c"illegal symbol NAME\00"
define i32 @illname() {
%1 = alloca i32
%2 = call i32 @error(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0))
%3 = call i32 (...) @junk()
%4 = load i32, i32* %1
ret i32 %4
}

LLVM IR (-O2):
@.str = [20 x i8] c"illegal symbol NAME\00"
define i32 @illname() {
%1 = tail call i32 @error(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0))
%2 = tail call i32 (...) @junk()
ret i32 undef
}