xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ ft_bzero(void *, size_t);
void *malloc(size_t);
void *ft_memalloc(size_t size) {
  void *tmp;
  if ((tmp = malloc(size)) == NULL)
    return (NULL);
  ft_bzero(tmp, size);
  return (tmp);
}


x86 assembly (clang, -O0):
<ft_memalloc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
call   1040 <malloc@plt>
mov    %rax,-0x18(%rbp)
cmp    $0x0,%rax
jne    1150 <ft_memalloc+0x30>
movq   $0x0,-0x8(%rbp)
jmp    1165 <ft_memalloc+0x45>
mov    -0x18(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1030 <ft_bzero@plt>
mov    -0x18(%rbp),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ft_memalloc>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%r14
call   1040 <malloc@plt>
mov    %rax,%rbx
test   %rax,%rax
je     113f <ft_memalloc+0x1f>
mov    %rbx,%rdi
mov    %r14,%rsi
call   1030 <ft_bzero@plt>
mov    %rbx,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

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

LLVM IR (-O2):
define i8* @ft_memalloc(i64 %0) {
%2 = tail call i8* @malloc(i64 %0)
%3 = icmp eq i8* %2, null
br i1 %3, label %6, label %4
4: ; preds = %1
%5 = tail call i32 @ft_bzero(i8* %2, i64 %0)
br label %6
6: ; preds = %1, %4
ret i8* %2
}
int _(float x, float y) { return x >= 0 && x < 50 && y >= 0 && y < 20; }


x86 assembly (clang, -O0):
<_>:
push   %rbp
mov    %rsp,%rbp
movss  %xmm0,-0x4(%rbp)
movss  %xmm1,-0x8(%rbp)
movss  -0x4(%rbp),%xmm0
xor    %eax,%eax
xorps  %xmm1,%xmm1
ucomiss %xmm1,%xmm0
mov    %al,-0x9(%rbp)
jb     1163 <_+0x63>
xor    %eax,%eax
movss  0xed2(%rip),%xmm0
ucomiss -0x4(%rbp),%xmm0
mov    %al,-0x9(%rbp)
jbe    1163 <_+0x63>
movss  -0x8(%rbp),%xmm0
xor    %eax,%eax
xorps  %xmm1,%xmm1
ucomiss %xmm1,%xmm0
mov    %al,-0x9(%rbp)
jb     1163 <_+0x63>
movss  0xeab(%rip),%xmm0
ucomiss -0x8(%rbp),%xmm0
seta   %al
mov    %al,-0x9(%rbp)
mov    -0x9(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<_>:
xorps  %xmm2,%xmm2
ucomiss %xmm2,%xmm0
setae  %al
movss  0xeef(%rip),%xmm3
ucomiss %xmm0,%xmm3
seta   %cl
ucomiss %xmm2,%xmm1
setae  %dl
and    %al,%dl
and    %cl,%dl
movss  0xedb(%rip),%xmm0
ucomiss %xmm1,%xmm0
seta   %al
and    %dl,%al
movzbl %al,%eax
ret

LLVM IR (-O0):
define i32 @_(float %0, float %1) {
%3 = alloca float
%4 = alloca float
store float %0, float* %3
store float %1, float* %4
%5 = load float, float* %3
%6 = fcmp oge float %5, 0.000000e+00
br i1 %6, label %7, label %16
7: ; preds = %2
%8 = load float, float* %3
%9 = fcmp olt float %8, 5.000000e+01
br i1 %9, label %10, label %16
10: ; preds = %7
%11 = load float, float* %4
%12 = fcmp oge float %11, 0.000000e+00
br i1 %12, label %13, label %16
13: ; preds = %10
%14 = load float, float* %4
%15 = fcmp olt float %14, 2.000000e+01
br label %16
16: ; preds = %13, %10, %7, %2
%17 = phi i1 [ false, %10 ], [ false, %7 ], [ false, %2 ], [ %15, %13 ]
%18 = zext i1 %17 to i32
ret i32 %18
}

LLVM IR (-O2):
define i32 @_(float %0, float %1) {
%3 = fcmp oge float %0, 0.000000e+00
%4 = fcmp olt float %0, 5.000000e+01
%5 = and i1 %3, %4
%6 = fcmp oge float %1, 0.000000e+00
%7 = and i1 %5, %6
%8 = fcmp olt float %1, 2.000000e+01
%9 = and i1 %8, %7
%10 = zext i1 %9 to i32
ret i32 %10
}
/* Forward declarations */
typedef struct TYPE_3__ TYPE_1__;

/* Type definitions */
typedef int /*<<< orphan*/ int32_t;
typedef int /*<<< orphan*/ bool_t;
struct TYPE_3__ {
  int /*<<< orphan*/ x_handy;
};
typedef TYPE_1__ XDR;

/* Variables and functions */
scalar_t__ BYTES_PER_XDR_UNIT;
int /*<<< orphan*/ TRUE;
bool_t x_putint32(XDR *xdrs, const int32_t *int32p) {
  xdrs->x_handy += BYTES_PER_XDR_UNIT;
  return TRUE;
}


x86 assembly (clang, -O0):
<x_putint32>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    0x2ec5(%rip),%rax
mov    (%rax),%rdx
mov    -0x8(%rbp),%rax
movslq (%rax),%rcx
add    %rdx,%rcx
mov    %ecx,(%rax)
mov    0x2ebf(%rip),%rax
mov    (%rax),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<x_putint32>:
mov    0x2ed1(%rip),%rax
mov    (%rax),%eax
add    %eax,(%rdi)
mov    0x2ed6(%rip),%rax
mov    (%rax),%eax
ret

LLVM IR (-O0):
%struct.TYPE_3__ = type { i32 }
@BYTES_PER_XDR_UNIT = global i64 0
@TRUE = global i32 0
define i32 @x_putint32(%struct.TYPE_3__* %0, i32* %1) {
%3 = alloca %struct.TYPE_3__*
%4 = alloca i32*
store %struct.TYPE_3__* %0, %struct.TYPE_3__** %3
store i32* %1, i32** %4
%5 = load i64, i64* @BYTES_PER_XDR_UNIT
%6 = load %struct.TYPE_3__*, %struct.TYPE_3__** %3
%7 = getelementptr inbounds %struct.TYPE_3__, %struct.TYPE_3__* %6, i32 0, i32 0
%8 = load i32, i32* %7
%9 = sext i32 %8 to i64
%10 = add nsw i64 %9, %5
%11 = trunc i64 %10 to i32
store i32 %11, i32* %7
%12 = load i32, i32* @TRUE
ret i32 %12
}

LLVM IR (-O2):
%struct.TYPE_3__ = type { i32 }
@BYTES_PER_XDR_UNIT = global i64 0
@TRUE = global i32 0
define i32 @x_putint32(%struct.TYPE_3__* nocapture %0, i32* nocapture readnone %1) {
%3 = load i64, i64* @BYTES_PER_XDR_UNIT
%4 = getelementptr inbounds %struct.TYPE_3__, %struct.TYPE_3__* %0, i64 0, i32 0
%5 = load i32, i32* %4
%6 = trunc i64 %3 to i32
%7 = add i32 %5, %6
store i32 %7, i32* %4
%8 = load i32, i32* @TRUE
ret i32 %8
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
int /*<<< orphan*/ stderr;
void alarm_handler(int signo) {
  fprintf(stderr, "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/"
                  "outputs/2022-01-22/02-19-57/repos/RaimoNiskanen/otp/refs/"
                  "heads/basho/erts/test/erlexec_SUITE_data/erlexec_tests.c"
                  " self terminating after timeout\n");
  exit(1);
}


x86 assembly (clang, -O0):
<alarm_handler>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    0x2eae(%rip),%rax
mov    (%rax),%edi
lea    0xec5(%rip),%rsi
call   1030 <fprintf@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

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

LLVM IR (-O0):
@stderr = global i32 0
@.str = [202 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/RaimoNiskanen/otp/refs/heads/basho/erts/test/erlexec_SUITE_data/erlexec_tests.c self terminating after timeout\0A\00"
define void @alarm_handler(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* @stderr
%4 = call i32 @fprintf(i32 %3, i8* getelementptr inbounds ([202 x i8], [202 x i8]* @.str, i64 0, i64 0))
%5 = call i32 @exit(i32 1)
unreachable
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [202 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/RaimoNiskanen/otp/refs/heads/basho/erts/test/erlexec_SUITE_data/erlexec_tests.c self terminating after timeout\0A\00"
define void @alarm_handler(i32 %0) {
%2 = load i32, i32* @stderr
%3 = tail call i32 @fprintf(i32 %2, i8* getelementptr inbounds ([202 x i8], [202 x i8]* @.str, i64 0, i64 0))
%4 = tail call i32 @exit(i32 1)
unreachable
}
int test_imm_DEint8_mem(signed char *val) {
  return ((*val) & (-0xDE << 0)) ? -20 : -40;
}


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

x86 assembly (clang, -O2):
<test_imm_DEint8_mem>:
movsbl (%rdi),%eax
test   $0xffffff22,%eax
mov    $0xffffffd8,%ecx
mov    $0xffffffec,%eax
cmove  %ecx,%eax
ret

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

LLVM IR (-O2):
define i32 @test_imm_DEint8_mem(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = sext i8 %2 to i32
%4 = and i32 %3, -222
%5 = icmp eq i32 %4, 0
%6 = select i1 %5, i32 -40, i32 -20
ret i32 %6
}
/* Variables and functions */
int /*<<< orphan*/ fflush(int /*<<< orphan*/);
char getchar();
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ scanf(char *, char *);
int /*<<< orphan*/ stdout;
char *getCUIFileName(char *fileRequested) {
  printf("Please, type the file name, or \"..\" to go back to menu\n");
  fflush(stdout);
  scanf("%s", fileRequested);
  while (getchar() != '\n')
    ;
  return fileRequested;
}


x86 assembly (clang, -O0):
<getCUIFileName>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
lea    0xead(%rip),%rdi
call   1030 <printf@plt>
mov    0x2e81(%rip),%rax
mov    (%rax),%edi
call   1050 <fflush@plt>
mov    -0x8(%rbp),%rsi
lea    0xec7(%rip),%rdi
call   1060 <scanf@plt>
mov    $0x0,%al
call   1040 <getchar@plt>
movsbl %al,%eax
cmp    $0xa,%eax
je     118e <getCUIFileName+0x4e>
jmp    1176 <getCUIFileName+0x36>
mov    -0x8(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<getCUIFileName>:
push   %rbx
mov    %rdi,%rbx
lea    0xeb8(%rip),%rdi
call   1030 <puts@plt>
mov    0x2e89(%rip),%rax
mov    (%rax),%edi
call   1050 <fflush@plt>
lea    0xe9b(%rip),%rdi
mov    %rbx,%rsi
call   1060 <scanf@plt>
nopl   (%rax)
xor    %eax,%eax
call   1040 <getchar@plt>
cmp    $0xa,%al
jne    1170 <getCUIFileName+0x30>
mov    %rbx,%rax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [56 x i8] c"Please, type the file name, or \22..\22 to go back to menu\0A\00"
@stdout = global i32 0
@.str.1 = [3 x i8] c"%s\00"
define i8* @getCUIFileName(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = call i32 @printf(i8* getelementptr inbounds ([56 x i8], [56 x i8]* @.str, i64 0, i64 0))
%4 = load i32, i32* @stdout
%5 = call i32 @fflush(i32 %4)
%6 = load i8*, i8** %2
%7 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i8* %6)
br label %8
8: ; preds = %12, %1
%9 = call signext i8 (...) @getchar()
%10 = sext i8 %9 to i32
%11 = icmp ne i32 %10, 10
br i1 %11, label %12, label %13
12: ; preds = %8
br label %8
13: ; preds = %8
%14 = load i8*, i8** %2
ret i8* %14
}

LLVM IR (-O2):
@stdout = global i32 0
@.str.1 = [3 x i8] c"%s\00"
@str = [55 x i8] c"Please, type the file name, or \22..\22 to go back to menu\00"
define i8* @getCUIFileName(i8* returned %0) {
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([55 x i8], [55 x i8]* @str, i64 0, i64 0))
%3 = load i32, i32* @stdout
%4 = tail call i32 @fflush(i32 %3)
%5 = tail call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i8* %0)
br label %6
6: ; preds = %6, %1
%7 = tail call signext i8 (...) @getchar()
%8 = icmp eq i8 %7, 10
br i1 %8, label %9, label %6
9: ; preds = %6
ret i8* %0
}
__attribute__((__const__)) int wrap(int x, int max) {
  while (x < 0)
    x += max;
  while (x >= max)
    x -= max;
  return x;
}


x86 assembly (clang, -O0):
<wrap>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
cmpl   $0x0,-0x4(%rbp)
jge    1122 <wrap+0x22>
mov    -0x8(%rbp),%eax
add    -0x4(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    110a <wrap+0xa>
jmp    1127 <wrap+0x27>
mov    -0x4(%rbp),%eax
cmp    -0x8(%rbp),%eax
jl     1143 <wrap+0x43>
mov    -0x8(%rbp),%ecx
mov    -0x4(%rbp),%eax
sub    %ecx,%eax
mov    %eax,-0x4(%rbp)
jmp    1127 <wrap+0x27>
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<wrap>:
mov    %edi,%eax
mov    %esi,%ecx
neg    %ecx
cs nopw 0x0(%rax,%rax,1)
add    %esi,%eax
mov    %ecx,%edx
add    %eax,%edx
js     1110 <wrap+0x10>
nopl   0x0(%rax,%rax,1)
sub    %esi,%eax
cmp    %esi,%eax
jge    1120 <wrap+0x20>
ret

LLVM IR (-O0):
define i32 @wrap(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
br label %5
5: ; preds = %8, %2
%6 = load i32, i32* %3
%7 = icmp slt i32 %6, 0
br i1 %7, label %8, label %12
8: ; preds = %5
%9 = load i32, i32* %4
%10 = load i32, i32* %3
%11 = add nsw i32 %10, %9
store i32 %11, i32* %3
br label %5
12: ; preds = %5
br label %13
13: ; preds = %17, %12
%14 = load i32, i32* %3
%15 = load i32, i32* %4
%16 = icmp sge i32 %14, %15
br i1 %16, label %17, label %21
17: ; preds = %13
%18 = load i32, i32* %4
%19 = load i32, i32* %3
%20 = sub nsw i32 %19, %18
store i32 %20, i32* %3
br label %13
21: ; preds = %13
%22 = load i32, i32* %3
ret i32 %22
}

LLVM IR (-O2):
define i32 @wrap(i32 %0, i32 %1) {
br label %3
3: ; preds = %3, %2
%4 = phi i32 [ %0, %2 ], [ %6, %3 ]
%5 = icmp slt i32 %4, 0
%6 = add nsw i32 %4, %1
br i1 %5, label %3, label %7
7: ; preds = %3, %7
%8 = phi i32 [ %10, %7 ], [ %4, %3 ]
%9 = icmp slt i32 %8, %1
%10 = sub nsw i32 %8, %1
br i1 %9, label %11, label %7
11: ; preds = %7
ret i32 %8
}
/* Variables and functions */
int atoi(char const *);
int /*<<< orphan*/ printf(char *, int, int);
int siguienteNumeroPrimo(int);
int main(int argc, char const *argv[]) {
  int primo;
  int anterior;
  anterior = atoi(argv[1]);
  primo = siguienteNumeroPrimo(anterior);
  printf("El siguiente numero primo despues de %d es: %d\n", anterior, primo);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
call   1050 <atoi@plt>
mov    %eax,-0x18(%rbp)
mov    -0x18(%rbp),%edi
call   1030 <siguienteNumeroPrimo@plt>
mov    %eax,-0x14(%rbp)
mov    -0x18(%rbp),%esi
mov    -0x14(%rbp),%edx
lea    0xe92(%rip),%rdi
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
mov    0x8(%rsi),%rdi
call   1050 <atoi@plt>
mov    %eax,%ebx
mov    %eax,%edi
call   1030 <siguienteNumeroPrimo@plt>
lea    0xeb6(%rip),%rdi
mov    %ebx,%esi
mov    %eax,%edx
call   1040 <printf@plt>
xor    %eax,%eax
pop    %rbx
ret

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

LLVM IR (-O2):
@.str = [48 x i8] c"El siguiente numero primo despues de %d es: %d\0A\00"
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = getelementptr inbounds i8*, i8** %1, i64 1
%4 = load i8*, i8** %3
%5 = tail call i32 @atoi(i8* %4)
%6 = tail call i32 @siguienteNumeroPrimo(i32 %5)
%7 = tail call i32 @printf(i8* getelementptr inbounds ([48 x i8], [48 x i8]* @.str, i64 0, i64 0), i32 %5, i32 %6)
ret i32 0
}
void FlashCtl_Handler(void) {
  while (1) {
  }
}


x86 assembly (clang, -O0):
<FlashCtl_Handler>:
push   %rbp
mov    %rsp,%rbp
jmp    1109 <FlashCtl_Handler+0x9>
jmp    1109 <FlashCtl_Handler+0x9>

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

LLVM IR (-O0):
define void @FlashCtl_Handler() {
br label %1
1: ; preds = %0, %1
br label %1
}

LLVM IR (-O2):
define void @FlashCtl_Handler() {
br label %1
1: ; preds = %0, %1
br label %1
}
/* Variables and functions */
int U_WMRCORENONE_get(char *);
int U_WMRCE_get(void) { return U_WMRCORENONE_get("U_WMRCE"); }


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

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

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

LLVM IR (-O2):
@.str = [8 x i8] c"U_WMRCE\00"
define i32 @U_WMRCE_get() {
%1 = tail call i32 @U_WMRCORENONE_get(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0))
ret i32 %1
}
void Cffempty(void) { return; }


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

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

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

LLVM IR (-O2):
define void @Cffempty() {
ret void
}
char *langRomTypeAscii8() { return "ASCII 8"; }


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

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

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

LLVM IR (-O2):
@.str = [8 x i8] c"ASCII 8\00"
define i8* @langRomTypeAscii8() {
ret i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0)
}
/* Type definitions */
struct iwinfo_ops {
  int dummy;
};

/* Variables and functions */
char *iwinfo_type(char const *);
const char *print_type(const struct iwinfo_ops *iw, const char *ifname) {
  const char *type = iwinfo_type(ifname);
  return type ? type : "unknown";
}


x86 assembly (clang, -O0):
<print_type>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
call   1030 <iwinfo_type@plt>
mov    %rax,-0x18(%rbp)
cmpq   $0x0,-0x18(%rbp)
je     1145 <print_type+0x35>
mov    -0x18(%rbp),%rax
mov    %rax,-0x20(%rbp)
jmp    1155 <print_type+0x45>
lea    0xeb4(%rip),%rax
mov    %rax,-0x20(%rbp)
jmp    1155 <print_type+0x45>
mov    -0x20(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<print_type>:
push   %rax
mov    %rsi,%rdi
call   1030 <iwinfo_type@plt>
test   %rax,%rax
lea    0xedd(%rip),%rcx
cmove  %rcx,%rax
pop    %rcx
ret

LLVM IR (-O0):
%struct.iwinfo_ops = type { i32 }
@.str = [8 x i8] c"unknown\00"
define i8* @print_type(%struct.iwinfo_ops* %0, i8* %1) {
%3 = alloca %struct.iwinfo_ops*
%4 = alloca i8*
%5 = alloca i8*
store %struct.iwinfo_ops* %0, %struct.iwinfo_ops** %3
store i8* %1, i8** %4
%6 = load i8*, i8** %4
%7 = call i8* @iwinfo_type(i8* %6)
store i8* %7, i8** %5
%8 = load i8*, i8** %5
%9 = icmp ne i8* %8, null
br i1 %9, label %10, label %12
10: ; preds = %2
%11 = load i8*, i8** %5
br label %13
12: ; preds = %2
br label %13
13: ; preds = %12, %10
%14 = phi i8* [ %11, %10 ], [ getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), %12 ]
ret i8* %14
}

LLVM IR (-O2):
%struct.iwinfo_ops = type { i32 }
@.str = [8 x i8] c"unknown\00"
define i8* @print_type(%struct.iwinfo_ops* nocapture readnone %0, i8* %1) {
%3 = tail call i8* @iwinfo_type(i8* %1)
%4 = icmp eq i8* %3, null
%5 = select i1 %4, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i8* %3
ret i8* %5
}
void R_SyncRenderThread(void) {}


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

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

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

LLVM IR (-O2):
define void @R_SyncRenderThread() {
ret void
}
unsigned short toUInt16(unsigned char a, unsigned char b) {
  unsigned short shortA = ((unsigned short)a);
  unsigned short shortB = ((unsigned short)b) << 8;
  return shortA | shortB;
}


x86 assembly (clang, -O0):
<toUInt16>:
push   %rbp
mov    %rsp,%rbp
mov    %sil,%al
mov    %dil,%cl
mov    %cl,-0x1(%rbp)
mov    %al,-0x2(%rbp)
movzbl -0x1(%rbp),%eax
mov    %ax,-0x4(%rbp)
movzbl -0x2(%rbp),%eax
movzwl %ax,%eax
shl    $0x8,%eax
mov    %ax,-0x6(%rbp)
movzwl -0x4(%rbp),%eax
movzwl -0x6(%rbp),%ecx
or     %ecx,%eax
movzwl %ax,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<toUInt16>:
shl    $0x8,%esi
lea    (%rsi,%rdi,1),%eax
ret

LLVM IR (-O0):
define zeroext i16 @toUInt16(i8 zeroext %0, i8 zeroext %1) {
%3 = alloca i8
%4 = alloca i8
%5 = alloca i16
%6 = alloca i16
store i8 %0, i8* %3
store i8 %1, i8* %4
%7 = load i8, i8* %3
%8 = zext i8 %7 to i16
store i16 %8, i16* %5
%9 = load i8, i8* %4
%10 = zext i8 %9 to i16
%11 = zext i16 %10 to i32
%12 = shl i32 %11, 8
%13 = trunc i32 %12 to i16
store i16 %13, i16* %6
%14 = load i16, i16* %5
%15 = zext i16 %14 to i32
%16 = load i16, i16* %6
%17 = zext i16 %16 to i32
%18 = or i32 %15, %17
%19 = trunc i32 %18 to i16
ret i16 %19
}

LLVM IR (-O2):
define zeroext i16 @toUInt16(i8 zeroext %0, i8 zeroext %1) {
%3 = zext i8 %1 to i16
%4 = shl nuw i16 %3, 8
%5 = zext i8 %0 to i16
%6 = or i16 %4, %5
ret i16 %6
}
void I422ToUYVYRow_SSE2() {}


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

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

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

LLVM IR (-O2):
define void @I422ToUYVYRow_SSE2() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
int /*<<< orphan*/ scanf(char *, int *);
int main(void) {
  int A, B, C;
  scanf("%d", &A);
  scanf("%d", &B);
  C = A * B;
  printf("PROD = %d\n", C);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeca(%rip),%rdi
lea    -0x8(%rbp),%rsi
call   1040 <scanf@plt>
lea    0xeba(%rip),%rdi
lea    -0xc(%rbp),%rsi
call   1040 <scanf@plt>
mov    -0x8(%rbp),%eax
imul   -0xc(%rbp),%eax
mov    %eax,-0x10(%rbp)
mov    -0x10(%rbp),%esi
lea    0xea0(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x10,%rsp
lea    0xed4(%rip),%rbx
lea    0xc(%rsp),%rsi
mov    %rbx,%rdi
call   1040 <scanf@plt>
lea    0x8(%rsp),%rsi
mov    %rbx,%rdi
call   1040 <scanf@plt>
mov    0x8(%rsp),%esi
imul   0xc(%rsp),%esi
lea    0xead(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbx
ret

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

LLVM IR (-O2):
@.str = [3 x i8] c"%d\00"
@.str.1 = [11 x i8] c"PROD = %d\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = bitcast i32* %1 to i8*
%4 = bitcast i32* %2 to i8*
%5 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %1)
%6 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %2)
%7 = load i32, i32* %1
%8 = load i32, i32* %2
%9 = mul nsw i32 %8, %7
%10 = call i32 @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.1, i64 0, i64 0), i32 %9)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ erase();
void cmd_erase(const char *pf, char **args) { erase(); }


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

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

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

LLVM IR (-O2):
define void @cmd_erase(i8* nocapture readnone %0, i8** nocapture readnone %1) {
%3 = tail call i32 (...) @erase()
ret void
}
int ok_all_files(const char *f) { return 1; }


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

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

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

LLVM IR (-O2):
define i32 @ok_all_files(i8* nocapture readnone %0) {
ret i32 1
}
/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, long);
int /*<<< orphan*/ pthread_exit(int /*<<< orphan*/ *);
int /*<<< orphan*/ sleep(int);
int /*<<< orphan*/ stderr;
void *fonction(void *arg) {
  long numero = (long)arg;
  while (1) {
    fprintf(stderr, "fonction(%ld)\n", numero);
    sleep(1);
    if (numero == 4)
      pthread_exit(NULL);
  }
  return NULL;
}


x86 assembly (clang, -O0):
<fonction>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    0x2e95(%rip),%rax
mov    (%rax),%edi
mov    -0x10(%rbp),%rdx
lea    0xea8(%rip),%rsi
call   1030 <fprintf@plt>
mov    $0x1,%edi
call   1050 <sleep@plt>
cmpq   $0x4,-0x10(%rbp)
jne    117b <fonction+0x4b>
xor    %eax,%eax
mov    %eax,%edi
call   1040 <pthread_exit@plt>
jmp    1144 <fonction+0x14>

x86 assembly (clang, -O2):
<fonction>:
push   %r15
push   %r14
push   %rbx
mov    %rdi,%rbx
mov    0x2ea1(%rip),%r15
lea    0xeba(%rip),%r14
cs nopw 0x0(%rax,%rax,1)
mov    (%r15),%edi
mov    %r14,%rsi
mov    %rbx,%rdx
call   1030 <fprintf@plt>
mov    $0x1,%edi
call   1050 <sleep@plt>
cmp    $0x4,%rbx
jne    1150 <fonction+0x20>
xor    %edi,%edi
call   1040 <pthread_exit@plt>
jmp    1150 <fonction+0x20>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [15 x i8] c"fonction(%ld)\0A\00"
define i8* @fonction(i8* %0) {
%2 = alloca i8*
%3 = alloca i64
store i8* %0, i8** %2
%4 = load i8*, i8** %2
%5 = ptrtoint i8* %4 to i64
store i64 %5, i64* %3
br label %6
6: ; preds = %1, %15
%7 = load i32, i32* @stderr
%8 = load i64, i64* %3
%9 = call i32 @fprintf(i32 %7, i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0), i64 %8)
%10 = call i32 @sleep(i32 1)
%11 = load i64, i64* %3
%12 = icmp eq i64 %11, 4
br i1 %12, label %13, label %15
13: ; preds = %6
%14 = call i32 @pthread_exit(i32* null)
br label %15
15: ; preds = %13, %6
br label %6
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [15 x i8] c"fonction(%ld)\0A\00"
define noalias i8* @fonction(i8* %0) {
%2 = ptrtoint i8* %0 to i64
%3 = icmp eq i8* %0, inttoptr (i64 4 to i8*)
br label %4
4: ; preds = %10, %1
%5 = load i32, i32* @stderr
%6 = tail call i32 @fprintf(i32 %5, i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0), i64 %2)
%7 = tail call i32 @sleep(i32 1)
br i1 %3, label %8, label %10
8: ; preds = %4
%9 = tail call i32 @pthread_exit(i32* null)
br label %10
10: ; preds = %8, %4
br label %4
}
/* Variables and functions */
int /*<<< orphan*/ abnormal();
int /*<<< orphan*/ deep_copy();
int /*<<< orphan*/ equality();
int /*<<< orphan*/ normal();
int main(void) {
  normal();
  equality();
  deep_copy();
  abnormal();
  return 0;
}


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

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1050 <normal@plt>
xor    %eax,%eax
call   1040 <equality@plt>
xor    %eax,%eax
call   1060 <deep_copy@plt>
xor    %eax,%eax
call   1030 <abnormal@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 (...) @normal()
%3 = call i32 (...) @equality()
%4 = call i32 (...) @deep_copy()
%5 = call i32 (...) @abnormal()
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @normal()
%2 = tail call i32 (...) @equality()
%3 = tail call i32 (...) @deep_copy()
%4 = tail call i32 (...) @abnormal()
ret i32 0
}
void XtCvtStringToUnsignedChar() {}


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

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

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

LLVM IR (-O2):
define void @XtCvtStringToUnsignedChar() {
ret void
}
float expm1f(float x) {
  if (fabsf(x) < 6.9314718055994530941723E-1L) {
    x *= 1.4426950408889634073599E0L;
    __asm__("f2xm1" : "=t"(x) : "0"(x));
    return x;
  } else
    return expf(x) - 1.0F;
}


x86 assembly (clang, -O0):
<expm1f>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movss  %xmm0,-0x8(%rbp)
movaps 0xedc(%rip),%xmm1
movss  -0x8(%rbp),%xmm0
pand   %xmm1,%xmm0
movss  %xmm0,-0xc(%rbp)
flds   -0xc(%rbp)
fldt   0xed5(%rip)
fucomip %st(1),%st
fstp   %st(0)
jbe    118d <expm1f+0x7d>
jmp    114a <expm1f+0x3a>
flds   -0x8(%rbp)
fldt   0xecd(%rip)
fmulp  %st,%st(1)
fstps  -0x18(%rbp)
movss  -0x18(%rbp),%xmm0
movss  %xmm0,-0x8(%rbp)
movss  -0x8(%rbp),%xmm0
movss  %xmm0,-0x10(%rbp)
flds   -0x10(%rbp)
f2xm1
fstps  -0x14(%rbp)
movss  -0x14(%rbp),%xmm0
movss  %xmm0,-0x8(%rbp)
movss  -0x8(%rbp),%xmm0
movss  %xmm0,-0x4(%rbp)
jmp    11a8 <expm1f+0x98>
movss  -0x8(%rbp),%xmm0
call   1030 <expf@plt>
movss  0xe91(%rip),%xmm1
subss  %xmm1,%xmm0
movss  %xmm0,-0x4(%rbp)
movss  -0x4(%rbp),%xmm0
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<expm1f>:
sub    $0x18,%rsp
movaps 0xee5(%rip),%xmm1
andps  %xmm0,%xmm1
movss  %xmm1,0x14(%rsp)
flds   0x14(%rsp)
fldt   0xee2(%rip)
fucomip %st(1),%st
fstp   %st(0)
jbe    1169 <expm1f+0x59>
movss  %xmm0,0x10(%rsp)
fldt   0xee0(%rip)
fmuls  0x10(%rsp)
fstps  0xc(%rsp)
movss  0xc(%rsp),%xmm0
movss  %xmm0,0x8(%rsp)
flds   0x8(%rsp)
f2xm1
fstps  0x4(%rsp)
movss  0x4(%rsp),%xmm0
add    $0x18,%rsp
ret
call   1030 <expf@plt>
addss  0xeba(%rip),%xmm0
add    $0x18,%rsp
ret

LLVM IR (-O0):
define float @expm1f(float %0) {
%2 = alloca float
%3 = alloca float
store float %0, float* %3
%4 = load float, float* %3
%5 = call float @llvm.fabs.f32(float %4)
%6 = fpext float %5 to x86_fp80
%7 = fcmp olt x86_fp80 %6, 0xK3FFEB17217F7D1CF79AC
br i1 %7, label %8, label %16
8: ; preds = %1
%9 = load float, float* %3
%10 = fpext float %9 to x86_fp80
%11 = fmul x86_fp80 %10, 0xK3FFFB8AA3B295C17F0BC
%12 = fptrunc x86_fp80 %11 to float
store float %12, float* %3
%13 = load float, float* %3
%14 = call float asm "f2xm1", "={st},0,~{dirflag},~{fpsr},~{flags}"(float %13)
store float %14, float* %3
%15 = load float, float* %3
store float %15, float* %2
br label %20
16: ; preds = %1
%17 = load float, float* %3
%18 = call float @expf(float %17)
%19 = fsub float %18, 1.000000e+00
store float %19, float* %2
br label %20
20: ; preds = %16, %8
%21 = load float, float* %2
ret float %21
}

LLVM IR (-O2):
define float @expm1f(float %0) {
%2 = tail call float @llvm.fabs.f32(float %0)
%3 = fpext float %2 to x86_fp80
%4 = fcmp olt x86_fp80 %3, 0xK3FFEB17217F7D1CF79AC
br i1 %4, label %5, label %10
5: ; preds = %1
%6 = fpext float %0 to x86_fp80
%7 = fmul x86_fp80 %6, 0xK3FFFB8AA3B295C17F0BC
%8 = fptrunc x86_fp80 %7 to float
%9 = tail call float asm "f2xm1", "={st},0,~{dirflag},~{fpsr},~{flags}"(float %8)
br label %13
10: ; preds = %1
%11 = tail call float @expf(float %0)
%12 = fadd float %11, -1.000000e+00
br label %13
13: ; preds = %10, %5
%14 = phi float [ %9, %5 ], [ %12, %10 ]
ret float %14
}
/* Variables and functions */
char *stb_strtok_raw(char *, char *, char *, int /*<<< orphan*/,
                     int /*<<< orphan*/);
char *stb_strtok(char *output, char *src, char *delimit) {
  return stb_strtok_raw(output, src, delimit, 0, 0);
}


x86 assembly (clang, -O0):
<stb_strtok>:
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
xor    %r8d,%r8d
mov    %r8d,%ecx
call   1030 <stb_strtok_raw@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<stb_strtok>:
xor    %ecx,%ecx
xor    %r8d,%r8d
jmp    1030 <stb_strtok_raw@plt>

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

LLVM IR (-O2):
define i8* @stb_strtok(i8* %0, i8* %1, i8* %2) {
%4 = tail call i8* @stb_strtok_raw(i8* %0, i8* %1, i8* %2, i32 0, i32 0)
ret i8* %4
}
int test1(const char *c) { return c[0] * 2; }


x86 assembly (clang, -O0):
<test1>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movsbl (%rax),%eax
shl    $0x1,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<test1>:
movsbl (%rdi),%eax
add    %eax,%eax
ret

LLVM IR (-O0):
define i32 @test1(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = getelementptr inbounds i8, i8* %3, i64 0
%5 = load i8, i8* %4
%6 = sext i8 %5 to i32
%7 = mul nsw i32 %6, 2
ret i32 %7
}

LLVM IR (-O2):
define i32 @test1(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = sext i8 %2 to i32
%4 = shl nsw i32 %3, 1
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ BSP_EnableInt();
int SpinUnlock(int);
int BSP_ReleaseSpinlockIrqRestore(int id) {
  BSP_EnableInt();
  return SpinUnlock(id);
}


x86 assembly (clang, -O0):
<BSP_ReleaseSpinlockIrqRestore>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    $0x0,%al
call   1030 <BSP_EnableInt@plt>
mov    -0x4(%rbp),%edi
call   1040 <SpinUnlock@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<BSP_ReleaseSpinlockIrqRestore>:
push   %rbx
mov    %edi,%ebx
xor    %eax,%eax
call   1030 <BSP_EnableInt@plt>
mov    %ebx,%edi
pop    %rbx
jmp    1040 <SpinUnlock@plt>

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

LLVM IR (-O2):
define i32 @BSP_ReleaseSpinlockIrqRestore(i32 %0) {
%2 = tail call i32 (...) @BSP_EnableInt()
%3 = tail call i32 @SpinUnlock(i32 %0)
ret i32 %3
}
void ff_hevc_put_hevc_qpel_hv8_8_sse4() {}


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

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

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

LLVM IR (-O2):
define void @ff_hevc_put_hevc_qpel_hv8_8_sse4() {
ret void
}
double rev180(double ang) {
  while (ang < -180.)
    ang += 360.;
  while (ang > 180.)
    ang -= 360.;
  return ang;
}


x86 assembly (clang, -O0):
<rev180>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
movsd  0xeef(%rip),%xmm0
ucomisd -0x8(%rbp),%xmm0
jbe    1133 <rev180+0x33>
movsd  0xeec(%rip),%xmm0
addsd  -0x8(%rbp),%xmm0
movsd  %xmm0,-0x8(%rbp)
jmp    1109 <rev180+0x9>
jmp    1138 <rev180+0x38>
movsd  -0x8(%rbp),%xmm0
movsd  0xec3(%rip),%xmm1
ucomisd %xmm1,%xmm0
jbe    116a <rev180+0x6a>
movsd  -0x8(%rbp),%xmm0
movsd  0xeb4(%rip),%xmm1
subsd  %xmm1,%xmm0
movsd  %xmm0,-0x8(%rbp)
jmp    1138 <rev180+0x38>
movsd  -0x8(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<rev180>:
movsd  0xef8(%rip),%xmm1
ucomisd %xmm0,%xmm1
jbe    112a <rev180+0x2a>
movsd  0xef2(%rip),%xmm2
cs nopw 0x0(%rax,%rax,1)
addsd  %xmm2,%xmm0
ucomisd %xmm0,%xmm1
ja     1120 <rev180+0x20>
ucomisd 0xede(%rip),%xmm0
jbe    115a <rev180+0x5a>
movsd  0xedc(%rip),%xmm1
movsd  0xecc(%rip),%xmm2
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
addsd  %xmm1,%xmm0
ucomisd %xmm2,%xmm0
ja     1150 <rev180+0x50>
ret

LLVM IR (-O0):
define double @rev180(double %0) {
%2 = alloca double
store double %0, double* %2
br label %3
3: ; preds = %6, %1
%4 = load double, double* %2
%5 = fcmp olt double %4, -1.800000e+02
br i1 %5, label %6, label %9
6: ; preds = %3
%7 = load double, double* %2
%8 = fadd double %7, 3.600000e+02
store double %8, double* %2
br label %3
9: ; preds = %3
br label %10
10: ; preds = %13, %9
%11 = load double, double* %2
%12 = fcmp ogt double %11, 1.800000e+02
br i1 %12, label %13, label %16
13: ; preds = %10
%14 = load double, double* %2
%15 = fsub double %14, 3.600000e+02
store double %15, double* %2
br label %10
16: ; preds = %10
%17 = load double, double* %2
ret double %17
}

LLVM IR (-O2):
define double @rev180(double %0) {
%2 = fcmp olt double %0, -1.800000e+02
br i1 %2, label %6, label %3
3: ; preds = %6, %1
%4 = phi double [ %0, %1 ], [ %8, %6 ]
%5 = fcmp ogt double %4, 1.800000e+02
br i1 %5, label %10, label %14
6: ; preds = %1, %6
%7 = phi double [ %8, %6 ], [ %0, %1 ]
%8 = fadd double %7, 3.600000e+02
%9 = fcmp olt double %8, -1.800000e+02
br i1 %9, label %6, label %3
10: ; preds = %3, %10
%11 = phi double [ %12, %10 ], [ %4, %3 ]
%12 = fadd double %11, -3.600000e+02
%13 = fcmp ogt double %12, 1.800000e+02
br i1 %13, label %10, label %14
14: ; preds = %10, %3
%15 = phi double [ %4, %3 ], [ %12, %10 ]
ret double %15
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ fclose(int /*<<< orphan*/ *);
int /*<<< orphan*/ *fopen(char const *, char *);
short file_exists(const char *filename) {
  FILE *resource;
  if ((resource = fopen(filename, "re"))) {
    fclose(resource);
    return 1;
  } else {
    return 0;
  }
}


x86 assembly (clang, -O0):
<file_exists>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
lea    0xec9(%rip),%rsi
call   1040 <fopen@plt>
mov    %rax,-0x18(%rbp)
cmp    $0x0,%rax
je     115e <file_exists+0x3e>
mov    -0x18(%rbp),%rdi
call   1030 <fclose@plt>
movw   $0x1,-0x2(%rbp)
jmp    1164 <file_exists+0x44>
movw   $0x0,-0x2(%rbp)
movswl -0x2(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<file_exists>:
push   %rax
lea    0xed8(%rip),%rsi
call   1040 <fopen@plt>
test   %rax,%rax
je     1140 <file_exists+0x20>
mov    %rax,%rdi
call   1030 <fclose@plt>
mov    $0x1,%ax
pop    %rcx
ret
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [3 x i8] c"re\00"
define signext i16 @file_exists(i8* %0) {
%2 = alloca i16
%3 = alloca i8*
%4 = alloca i32*
store i8* %0, i8** %3
%5 = load i8*, i8** %3
%6 = call i32* @fopen(i8* %5, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0))
store i32* %6, i32** %4
%7 = icmp ne i32* %6, null
br i1 %7, label %8, label %11
8: ; preds = %1
%9 = load i32*, i32** %4
%10 = call i32 @fclose(i32* %9)
store i16 1, i16* %2
br label %12
11: ; preds = %1
store i16 0, i16* %2
br label %12
12: ; preds = %11, %8
%13 = load i16, i16* %2
ret i16 %13
}

LLVM IR (-O2):
@.str = [3 x i8] c"re\00"
define signext i16 @file_exists(i8* nocapture %0) {
%2 = tail call i32* @fopen(i8* %0, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0))
%3 = icmp eq i32* %2, null
br i1 %3, label %6, label %4
4: ; preds = %1
%5 = tail call i32 @fclose(i32* %2)
br label %6
6: ; preds = %1, %4
%7 = phi i16 [ 1, %4 ], [ 0, %1 ]
ret i16 %7
}
void function_desc(char *desc) {}


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

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

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

LLVM IR (-O2):
define void @function_desc(i8* nocapture %0) {
ret void
}
double max_4(const double *ptr) {
  double retval = ptr[0];
  int i;
  for (i = 1; i < 4; ++i) {
    if (ptr[i] > retval) {
      retval = ptr[i];
    }
  }
  return retval;
}


x86 assembly (clang, -O0):
<max_4>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movsd  (%rax),%xmm0
movsd  %xmm0,-0x10(%rbp)
movl   $0x1,-0x14(%rbp)
cmpl   $0x4,-0x14(%rbp)
jge    1163 <max_4+0x63>
mov    -0x8(%rbp),%rax
movslq -0x14(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
ucomisd -0x10(%rbp),%xmm0
jbe    1150 <max_4+0x50>
mov    -0x8(%rbp),%rax
movslq -0x14(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
movsd  %xmm0,-0x10(%rbp)
jmp    1155 <max_4+0x55>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    111c <max_4+0x1c>
movsd  -0x10(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<max_4>:
movsd  0x8(%rdi),%xmm0
maxsd  (%rdi),%xmm0
movsd  0x10(%rdi),%xmm1
maxsd  %xmm0,%xmm1
movsd  0x18(%rdi),%xmm0
maxsd  %xmm1,%xmm0
ret

LLVM IR (-O0):
define double @max_4(double* %0) {
%2 = alloca double*
%3 = alloca double
%4 = alloca i32
store double* %0, double** %2
%5 = load double*, double** %2
%6 = getelementptr inbounds double, double* %5, i64 0
%7 = load double, double* %6
store double %7, double* %3
store i32 1, i32* %4
br label %8
8: ; preds = %26, %1
%9 = load i32, i32* %4
%10 = icmp slt i32 %9, 4
br i1 %10, label %11, label %29
11: ; preds = %8
%12 = load double*, double** %2
%13 = load i32, i32* %4
%14 = sext i32 %13 to i64
%15 = getelementptr inbounds double, double* %12, i64 %14
%16 = load double, double* %15
%17 = load double, double* %3
%18 = fcmp ogt double %16, %17
br i1 %18, label %19, label %25
19: ; preds = %11
%20 = load double*, double** %2
%21 = load i32, i32* %4
%22 = sext i32 %21 to i64
%23 = getelementptr inbounds double, double* %20, i64 %22
%24 = load double, double* %23
store double %24, double* %3
br label %25
25: ; preds = %19, %11
br label %26
26: ; preds = %25
%27 = load i32, i32* %4
%28 = add nsw i32 %27, 1
store i32 %28, i32* %4
br label %8
29: ; preds = %8
%30 = load double, double* %3
ret double %30
}

LLVM IR (-O2):
define double @max_4(double* nocapture %0) {
%2 = load double, double* %0
%3 = getelementptr inbounds double, double* %0, i64 1
%4 = load double, double* %3
%5 = fcmp ogt double %4, %2
%6 = select i1 %5, double %4, double %2
%7 = getelementptr inbounds double, double* %0, i64 2
%8 = load double, double* %7
%9 = fcmp ogt double %8, %6
%10 = select i1 %9, double %8, double %6
%11 = getelementptr inbounds double, double* %0, i64 3
%12 = load double, double* %11
%13 = fcmp ogt double %12, %10
%14 = select i1 %13, double %12, double %10
ret double %14
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, unsigned char const);
void hexdump(const unsigned char *data, size_t len) {
  unsigned int i;
  for (i = 0; i < len; i++) {
    printf("%02x", data[i]);
  }
}


x86 assembly (clang, -O0):
<hexdump>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
mov    -0x14(%rbp),%eax
cmp    -0x10(%rbp),%rax
jae    1159 <hexdump+0x49>
mov    -0x8(%rbp),%rax
mov    -0x14(%rbp),%ecx
lea    0xebe(%rip),%rdi
movzbl (%rax,%rcx,1),%esi
call   1030 <printf@plt>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    1127 <hexdump+0x17>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<hexdump>:
push   %r15
push   %r14
push   %r12
push   %rbx
push   %rax
test   %rsi,%rsi
je     1145 <hexdump+0x35>
mov    %rsi,%r12
mov    %rdi,%r14
xor    %ebx,%ebx
lea    0xed4(%rip),%r15
nopl   0x0(%rax)
movzbl (%r14,%rbx,1),%esi
mov    %r15,%rdi
call   1030 <printf@plt>
add    $0x1,%ebx
cmp    %r12,%rbx
jb     1130 <hexdump+0x20>
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
@.str = [5 x i8] c"%02x\00"
define void @hexdump(i8* %0, i64 %1) {
%3 = alloca i8*
%4 = alloca i64
%5 = alloca i32
store i8* %0, i8** %3
store i64 %1, i64* %4
store i32 0, i32* %5
br label %6
6: ; preds = %18, %2
%7 = load i32, i32* %5
%8 = zext i32 %7 to i64
%9 = load i64, i64* %4
%10 = icmp ult i64 %8, %9
br i1 %10, label %11, label %21
11: ; preds = %6
%12 = load i8*, i8** %3
%13 = load i32, i32* %5
%14 = zext i32 %13 to i64
%15 = getelementptr inbounds i8, i8* %12, i64 %14
%16 = load i8, i8* %15
%17 = call i32 @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i8 zeroext %16)
br label %18
18: ; preds = %11
%19 = load i32, i32* %5
%20 = add i32 %19, 1
store i32 %20, i32* %5
br label %6
21: ; preds = %6
ret void
}

LLVM IR (-O2):
@.str = [5 x i8] c"%02x\00"
define void @hexdump(i8* nocapture %0, i64 %1) {
%3 = icmp eq i64 %1, 0
br i1 %3, label %12, label %4
4: ; preds = %2, %4
%5 = phi i64 [ %10, %4 ], [ 0, %2 ]
%6 = getelementptr inbounds i8, i8* %0, i64 %5
%7 = load i8, i8* %6
%8 = tail call i32 @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i8 zeroext %7)
%9 = add nuw nsw i64 %5, 1
%10 = and i64 %9, 4294967295
%11 = icmp ult i64 %10, %1
br i1 %11, label %4, label %12
12: ; preds = %4, %2
ret void
}
/* Variables and functions */
scalar_t__ ccnl_ndntlv_varlenint(unsigned char **, int *, int *);
int ccnl_ndntlv_dehead(unsigned char **buf, int *len, int *typ, int *vallen) {
  if (ccnl_ndntlv_varlenint(buf, len, (int *)typ))
    return -1;
  if (ccnl_ndntlv_varlenint(buf, len, (int *)vallen))
    return -1;
  return 0;
}


x86 assembly (clang, -O0):
<ccnl_ndntlv_dehead>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    %rdx,-0x20(%rbp)
mov    %rcx,-0x28(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x18(%rbp),%rsi
mov    -0x20(%rbp),%rdx
call   1030 <ccnl_ndntlv_varlenint@plt>
cmp    $0x0,%rax
je     114f <ccnl_ndntlv_dehead+0x3f>
movl   $0xffffffff,-0x4(%rbp)
jmp    117d <ccnl_ndntlv_dehead+0x6d>
mov    -0x10(%rbp),%rdi
mov    -0x18(%rbp),%rsi
mov    -0x28(%rbp),%rdx
call   1030 <ccnl_ndntlv_varlenint@plt>
cmp    $0x0,%rax
je     1176 <ccnl_ndntlv_dehead+0x66>
movl   $0xffffffff,-0x4(%rbp)
jmp    117d <ccnl_ndntlv_dehead+0x6d>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ccnl_ndntlv_dehead>:
push   %r15
push   %r14
push   %rbx
mov    %rcx,%r14
mov    %rsi,%r15
mov    %rdi,%rbx
call   1030 <ccnl_ndntlv_varlenint@plt>
mov    %rax,%rcx
mov    $0xffffffff,%eax
test   %rcx,%rcx
jne    1143 <ccnl_ndntlv_dehead+0x33>
mov    %rbx,%rdi
mov    %r15,%rsi
mov    %r14,%rdx
call   1030 <ccnl_ndntlv_varlenint@plt>
neg    %rax
sbb    %eax,%eax
pop    %rbx
pop    %r14
pop    %r15
ret

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

LLVM IR (-O2):
define i32 @ccnl_ndntlv_dehead(i8** %0, i32* %1, i32* %2, i32* %3) {
%5 = tail call i64 @ccnl_ndntlv_varlenint(i8** %0, i32* %1, i32* %2)
%6 = icmp eq i64 %5, 0
br i1 %6, label %7, label %11
7: ; preds = %4
%8 = tail call i64 @ccnl_ndntlv_varlenint(i8** %0, i32* %1, i32* %3)
%9 = icmp ne i64 %8, 0
%10 = sext i1 %9 to i32
br label %11
11: ; preds = %7, %4
%12 = phi i32 [ -1, %4 ], [ %10, %7 ]
ret i32 %12
}
/* Variables and functions */
int /*<<< orphan*/ scanf(char *, int *);
int /*<<< orphan*/ square(int);
void main(void) {
  int side;
  scanf("%d", &side);
  square(side);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    0xed1(%rip),%rdi
lea    -0x4(%rbp),%rsi
call   1040 <scanf@plt>
mov    -0x4(%rbp),%edi
call   1030 <square@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xed8(%rip),%rdi
lea    0x4(%rsp),%rsi
call   1040 <scanf@plt>
mov    0x4(%rsp),%edi
call   1030 <square@plt>
pop    %rax
ret

LLVM IR (-O0):
@.str = [3 x i8] c"%d\00"
define void @main() {
%1 = alloca i32
%2 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %1)
%3 = load i32, i32* %1
%4 = call i32 @square(i32 %3)
ret void
}

LLVM IR (-O2):
@.str = [3 x i8] c"%d\00"
define void @main() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
%3 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %1)
%4 = load i32, i32* %1
%5 = call i32 @square(i32 %4)
ret void
}