xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void usage() {
  printf(
      "usage: <prog> [ -c | --create ] \n    [ -d | --destroy ] \n    [ -g | "
      "--get ] \n    [ -s | --set ] \n    [ -p | --permissions ] \n    [ -k | "
      "--key <KEY> ] //The key for the Shared Memory segment \n    [ -l | "
      "--length <size in bytes> ] //Size of the shm. Needs to be specified if "
      "-c is set \n    [ -f | --file-input ] //bashm takes the stream stdin, "
      "and writes that as content \n    <string>\n\n    If --get is used, "
      "bashm will read from the shared memory segment until \n    it hits \\0. "
      "This behaviour can be changed if an additional -l <num of bytes> option "
      "is specified \n\n    If --set is used, bashm will only write the first "
      "parameter following \"-s\" or \"--set\" into the shm segment\n");
}


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

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

LLVM IR (-O0):
@.str = [675 x i8] c"usage: <prog> [ -c | --create ] \0A [ -d | --destroy ] \0A [ -g | --get ] \0A [ -s | --set ] \0A [ -p | --permissions ] \0A [ -k | --key <KEY> ] //The key for the Shared Memory segment \0A [ -l | --length <size in bytes> ] //Size of the shm. Needs to be specified if -c is set \0A [ -f | --file-input ] //bashm takes the stream stdin, and writes that as content \0A <string>\0A\0A If --get is used, bashm will read from the shared memory segment until \0A it hits \\0. This behaviour can be changed if an additional -l <num of bytes> option is specified \0A\0A If --set is used, bashm will only write the first parameter following \22-s\22 or \22--set\22 into the shm segment\0A\00"
define void @usage() {
%1 = call i32 @printf(i8* getelementptr inbounds ([675 x i8], [675 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@str = [674 x i8] c"usage: <prog> [ -c | --create ] \0A [ -d | --destroy ] \0A [ -g | --get ] \0A [ -s | --set ] \0A [ -p | --permissions ] \0A [ -k | --key <KEY> ] //The key for the Shared Memory segment \0A [ -l | --length <size in bytes> ] //Size of the shm. Needs to be specified if -c is set \0A [ -f | --file-input ] //bashm takes the stream stdin, and writes that as content \0A <string>\0A\0A If --get is used, bashm will read from the shared memory segment until \0A it hits \\0. This behaviour can be changed if an additional -l <num of bytes> option is specified \0A\0A If --set is used, bashm will only write the first parameter following \22-s\22 or \22--set\22 into the shm segment\00"
define void @usage() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([674 x i8], [674 x i8]* @str, i64 0, i64 0))
ret void
}
/* Variables and functions */
int passivesock(char const *, char *, int);
int passiveTCP(const char *service, int qlen) {
  return passivesock(service, "tcp", qlen);
}


x86 assembly (clang, -O0):
<passiveTCP>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%edx
lea    0xed3(%rip),%rsi
call   1030 <passivesock@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<passiveTCP>:
mov    %esi,%edx
lea    0xee7(%rip),%rsi
jmp    1030 <passivesock@plt>

LLVM IR (-O0):
@.str = [4 x i8] c"tcp\00"
define i32 @passiveTCP(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i32
store i8* %0, i8** %3
store i32 %1, i32* %4
%5 = load i8*, i8** %3
%6 = load i32, i32* %4
%7 = call i32 @passivesock(i8* %5, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %6)
ret i32 %7
}

LLVM IR (-O2):
@.str = [4 x i8] c"tcp\00"
define i32 @passiveTCP(i8* %0, i32 %1) {
%3 = tail call i32 @passivesock(i8* %0, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %1)
ret i32 %3
}
/* Variables and functions */
int sin(double);
short smoothHiliteGradient(const short currentXValue, const short maxXValue) {
  return (short)(100 * sin(3.14159265 * currentXValue / (maxXValue)));
}


x86 assembly (clang, -O0):
<smoothHiliteGradient>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %si,%ax
mov    %di,%cx
mov    %cx,-0x2(%rbp)
mov    %ax,-0x4(%rbp)
movswl -0x2(%rbp),%eax
cvtsi2sd %eax,%xmm1
movsd  0xeca(%rip),%xmm0
mulsd  %xmm1,%xmm0
movswl -0x4(%rbp),%eax
cvtsi2sd %eax,%xmm1
divsd  %xmm1,%xmm0
call   1030 <sin@plt>
imul   $0x64,%eax,%eax
cwtl
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<smoothHiliteGradient>:
push   %rax
cvtsi2sd %edi,%xmm0
mulsd  0xee3(%rip),%xmm0
cvtsi2sd %esi,%xmm1
divsd  %xmm1,%xmm0
call   1030 <sin@plt>
imul   $0x64,%eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define signext i16 @smoothHiliteGradient(i16 signext %0, i16 signext %1) {
%3 = alloca i16
%4 = alloca i16
store i16 %0, i16* %3
store i16 %1, i16* %4
%5 = load i16, i16* %3
%6 = sext i16 %5 to i32
%7 = sitofp i32 %6 to double
%8 = fmul double 0x400921FB53C8D4F1, %7
%9 = load i16, i16* %4
%10 = sext i16 %9 to i32
%11 = sitofp i32 %10 to double
%12 = fdiv double %8, %11
%13 = call i32 @sin(double %12)
%14 = mul nsw i32 100, %13
%15 = trunc i32 %14 to i16
ret i16 %15
}

LLVM IR (-O2):
define signext i16 @smoothHiliteGradient(i16 signext %0, i16 signext %1) {
%3 = sitofp i16 %0 to double
%4 = fmul double %3, 0x400921FB53C8D4F1
%5 = sitofp i16 %1 to double
%6 = fdiv double %4, %5
%7 = tail call i32 @sin(double %6)
%8 = trunc i32 %7 to i16
%9 = mul i16 %8, 100
ret i16 %9
}
int solution(double t, double y[], void *params) {
  double *pars = (double *)params;
  y[0] = 0.0;
  y[1] = 0.0;
  y[2] = 0.0;
  y[3] = 0.0;
  y[4] = 0.0;
  y[5] = 0.0;
  return 0;
}


x86 assembly (clang, -O0):
<solution>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    -0x18(%rbp),%rax
mov    %rax,-0x20(%rbp)
mov    -0x10(%rbp),%rax
xorps  %xmm0,%xmm0
movsd  %xmm0,(%rax)
mov    -0x10(%rbp),%rax
xorps  %xmm0,%xmm0
movsd  %xmm0,0x8(%rax)
mov    -0x10(%rbp),%rax
xorps  %xmm0,%xmm0
movsd  %xmm0,0x10(%rax)
mov    -0x10(%rbp),%rax
xorps  %xmm0,%xmm0
movsd  %xmm0,0x18(%rax)
mov    -0x10(%rbp),%rax
xorps  %xmm0,%xmm0
movsd  %xmm0,0x20(%rax)
mov    -0x10(%rbp),%rax
xorps  %xmm0,%xmm0
movsd  %xmm0,0x28(%rax)
xor    %eax,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<solution>:
xorps  %xmm0,%xmm0
movups %xmm0,0x20(%rdi)
movups %xmm0,0x10(%rdi)
movups %xmm0,(%rdi)
xor    %eax,%eax
ret

LLVM IR (-O0):
define i32 @solution(double %0, double* %1, i8* %2) {
%4 = alloca double
%5 = alloca double*
%6 = alloca i8*
%7 = alloca double*
store double %0, double* %4
store double* %1, double** %5
store i8* %2, i8** %6
%8 = load i8*, i8** %6
%9 = bitcast i8* %8 to double*
store double* %9, double** %7
%10 = load double*, double** %5
%11 = getelementptr inbounds double, double* %10, i64 0
store double 0.000000e+00, double* %11
%12 = load double*, double** %5
%13 = getelementptr inbounds double, double* %12, i64 1
store double 0.000000e+00, double* %13
%14 = load double*, double** %5
%15 = getelementptr inbounds double, double* %14, i64 2
store double 0.000000e+00, double* %15
%16 = load double*, double** %5
%17 = getelementptr inbounds double, double* %16, i64 3
store double 0.000000e+00, double* %17
%18 = load double*, double** %5
%19 = getelementptr inbounds double, double* %18, i64 4
store double 0.000000e+00, double* %19
%20 = load double*, double** %5
%21 = getelementptr inbounds double, double* %20, i64 5
store double 0.000000e+00, double* %21
ret i32 0
}

LLVM IR (-O2):
define i32 @solution(double %0, double* nocapture writeonly %1, i8* nocapture readnone %2) {
%4 = bitcast double* %1 to i8*
ret i32 0
}
void swscale_license() {}


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

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

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

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

/* Variables and functions */
int mmio_read_32(uintptr_t);
int /*<<< orphan*/ mmio_write_32(uintptr_t, int);
void mmio_clrbits_32(uintptr_t addr, uint32_t clear) {
  mmio_write_32(addr, mmio_read_32(addr) & ~clear);
}


x86 assembly (clang, -O0):
<mmio_clrbits_32>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <mmio_read_32@plt>
mov    -0x18(%rbp),%rdi
mov    %eax,%esi
mov    -0xc(%rbp),%eax
xor    $0xffffffff,%eax
and    %eax,%esi
call   1030 <mmio_write_32@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<mmio_clrbits_32>:
push   %r14
push   %rbx
push   %rax
mov    %esi,%ebx
mov    %rdi,%r14
call   1040 <mmio_read_32@plt>
not    %ebx
and    %eax,%ebx
mov    %r14,%rdi
mov    %ebx,%esi
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1030 <mmio_write_32@plt>

LLVM IR (-O0):
define void @mmio_clrbits_32(i64 %0, i32 %1) {
%3 = alloca i64
%4 = alloca i32
store i64 %0, i64* %3
store i32 %1, i32* %4
%5 = load i64, i64* %3
%6 = load i64, i64* %3
%7 = call i32 @mmio_read_32(i64 %6)
%8 = load i32, i32* %4
%9 = xor i32 %8, -1
%10 = and i32 %7, %9
%11 = call i32 @mmio_write_32(i64 %5, i32 %10)
ret void
}

LLVM IR (-O2):
define void @mmio_clrbits_32(i64 %0, i32 %1) {
%3 = tail call i32 @mmio_read_32(i64 %0)
%4 = xor i32 %1, -1
%5 = and i32 %3, %4
%6 = tail call i32 @mmio_write_32(i64 %0, i32 %5)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ oosmos_DelayMS(int);
int /*<<< orphan*/ oosmos_RunStateMachines();
int /*<<< orphan*/ pidtestNew();
extern int main(void) {
  (void)pidtestNew();
  for (;;) {
    oosmos_RunStateMachines();
    oosmos_DelayMS(1);
  }
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x0,%al
call   1030 <pidtestNew@plt>
mov    $0x0,%al
call   1050 <oosmos_RunStateMachines@plt>
mov    $0x1,%edi
call   1040 <oosmos_DelayMS@plt>
jmp    1146 <main+0x16>

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1030 <pidtestNew@plt>
nopl   0x0(%rax,%rax,1)
xor    %eax,%eax
call   1050 <oosmos_RunStateMachines@plt>
mov    $0x1,%edi
call   1040 <oosmos_DelayMS@plt>
jmp    1140 <main+0x10>

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 (...) @pidtestNew()
br label %3
3: ; preds = %3, %0
%4 = call i32 (...) @oosmos_RunStateMachines()
%5 = call i32 @oosmos_DelayMS(i32 1)
br label %3
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @pidtestNew()
br label %2
2: ; preds = %2, %0
%3 = tail call i32 (...) @oosmos_RunStateMachines()
%4 = tail call i32 @oosmos_DelayMS(i32 1)
br label %2
}
unsigned colour32(unsigned char r, unsigned char g, unsigned char b) {
  return ((b << 16) | (g << 8) | r);
}


x86 assembly (clang, -O0):
<colour32>:
push   %rbp
mov    %rsp,%rbp
mov    %dl,%al
mov    %sil,%cl
mov    %dil,%dl
mov    %dl,-0x1(%rbp)
mov    %cl,-0x2(%rbp)
mov    %al,-0x3(%rbp)
movzbl -0x3(%rbp),%eax
shl    $0x10,%eax
movzbl -0x2(%rbp),%ecx
shl    $0x8,%ecx
or     %ecx,%eax
movzbl -0x1(%rbp),%ecx
or     %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<colour32>:
shl    $0x10,%edx
shl    $0x8,%esi
lea    (%rsi,%rdx,1),%eax
or     %edi,%eax
ret

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

LLVM IR (-O2):
define i32 @colour32(i8 zeroext %0, i8 zeroext %1, i8 zeroext %2) {
%4 = zext i8 %2 to i32
%5 = shl nuw nsw i32 %4, 16
%6 = zext i8 %1 to i32
%7 = shl nuw nsw i32 %6, 8
%8 = or i32 %5, %7
%9 = zext i8 %0 to i32
%10 = or i32 %8, %9
ret i32 %10
}
void g_value_set_uint64() {}


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

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

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

LLVM IR (-O2):
define void @g_value_set_uint64() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ getCurrentSConsole();
int /*<<< orphan*/ sConsoleWrite(int /*<<< orphan*/, unsigned char *);
void echo(unsigned int argc, unsigned char (*argv_pointer)[10]) {
  sConsoleWrite(getCurrentSConsole(), argv_pointer[1]);
}


x86 assembly (clang, -O0):
<echo>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    $0x0,%al
call   1030 <getCurrentSConsole@plt>
mov    %eax,%edi
mov    -0x10(%rbp),%rsi
add    $0xa,%rsi
call   1040 <sConsoleWrite@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<echo>:
push   %rbx
mov    %rsi,%rbx
xor    %eax,%eax
call   1030 <getCurrentSConsole@plt>
add    $0xa,%rbx
mov    %eax,%edi
mov    %rbx,%rsi
pop    %rbx
jmp    1040 <sConsoleWrite@plt>

LLVM IR (-O0):
define void @echo(i32 %0, [10 x i8]* %1) {
%3 = alloca i32
%4 = alloca [10 x i8]*
store i32 %0, i32* %3
store [10 x i8]* %1, [10 x i8]** %4
%5 = call i32 (...) @getCurrentSConsole()
%6 = load [10 x i8]*, [10 x i8]** %4
%7 = getelementptr inbounds [10 x i8], [10 x i8]* %6, i64 1
%8 = getelementptr inbounds [10 x i8], [10 x i8]* %7, i64 0, i64 0
%9 = call i32 @sConsoleWrite(i32 %5, i8* %8)
ret void
}

LLVM IR (-O2):
define void @echo(i32 %0, [10 x i8]* %1) {
%3 = tail call i32 (...) @getCurrentSConsole()
%4 = getelementptr inbounds [10 x i8], [10 x i8]* %1, i64 1, i64 0
%5 = tail call i32 @sConsoleWrite(i32 %3, i8* %4)
ret void
}
int cdAppShort(unsigned char *es, short int addme) {
  short int temp;
  temp = addme >> 8;
  *es = (unsigned char)temp & 0377;
  es++;
  *es = (unsigned char)addme & 0377;
  return 2;
}


x86 assembly (clang, -O0):
<cdAppShort>:
push   %rbp
mov    %rsp,%rbp
mov    %si,%ax
mov    %rdi,-0x8(%rbp)
mov    %ax,-0xa(%rbp)
movswl -0xa(%rbp),%eax
sar    $0x8,%eax
mov    %ax,-0xc(%rbp)
mov    -0xc(%rbp),%ax
movzbl %al,%eax
and    $0xff,%eax
mov    %al,%cl
mov    -0x8(%rbp),%rax
mov    %cl,(%rax)
mov    -0x8(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x8(%rbp)
mov    -0xa(%rbp),%ax
movzbl %al,%eax
and    $0xff,%eax
mov    %al,%cl
mov    -0x8(%rbp),%rax
mov    %cl,(%rax)
mov    $0x2,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<cdAppShort>:
rol    $0x8,%si
mov    %si,(%rdi)
mov    $0x2,%eax
ret

LLVM IR (-O0):
define i32 @cdAppShort(i8* %0, i16 signext %1) {
%3 = alloca i8*
%4 = alloca i16
%5 = alloca i16
store i8* %0, i8** %3
store i16 %1, i16* %4
%6 = load i16, i16* %4
%7 = sext i16 %6 to i32
%8 = ashr i32 %7, 8
%9 = trunc i32 %8 to i16
store i16 %9, i16* %5
%10 = load i16, i16* %5
%11 = trunc i16 %10 to i8
%12 = zext i8 %11 to i32
%13 = and i32 %12, 255
%14 = trunc i32 %13 to i8
%15 = load i8*, i8** %3
store i8 %14, i8* %15
%16 = load i8*, i8** %3
%17 = getelementptr inbounds i8, i8* %16, i32 1
store i8* %17, i8** %3
%18 = load i16, i16* %4
%19 = trunc i16 %18 to i8
%20 = zext i8 %19 to i32
%21 = and i32 %20, 255
%22 = trunc i32 %21 to i8
%23 = load i8*, i8** %3
store i8 %22, i8* %23
ret i32 2
}

LLVM IR (-O2):
define i32 @cdAppShort(i8* nocapture writeonly %0, i16 signext %1) {
%3 = lshr i16 %1, 8
%4 = trunc i16 %3 to i8
store i8 %4, i8* %0
%5 = getelementptr inbounds i8, i8* %0, i64 1
%6 = trunc i16 %1 to i8
store i8 %6, i8* %5
ret i32 2
}
void foo638() {}


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

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

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

LLVM IR (-O2):
define void @foo638() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ gets(char *);
int /*<<< orphan*/ printf(char *, ...);
int main() {
  char nome[20];
  printf("Digite um nome: ");
  gets(nome);
  printf("Nome digitado: %s", nome);
  return 0;
}


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

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x20,%rsp
lea    0xed4(%rip),%rdi
xor    %eax,%eax
call   1030 <printf@plt>
mov    %rsp,%rbx
mov    %rbx,%rdi
call   1040 <gets@plt>
lea    0xecc(%rip),%rdi
mov    %rbx,%rsi
xor    %eax,%eax
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@.str = [17 x i8] c"Digite um nome: \00"
@.str.1 = [18 x i8] c"Nome digitado: %s\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca [20 x i8]
store i32 0, i32* %1
%3 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0))
%4 = getelementptr inbounds [20 x i8], [20 x i8]* %2, i64 0, i64 0
%5 = call i32 @gets(i8* %4)
%6 = getelementptr inbounds [20 x i8], [20 x i8]* %2, i64 0, i64 0
%7 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.1, i64 0, i64 0), i8* %6)
ret i32 0
}

LLVM IR (-O2):
@.str = [17 x i8] c"Digite um nome: \00"
@.str.1 = [18 x i8] c"Nome digitado: %s\00"
define i32 @main() {
%1 = alloca [20 x i8]
%2 = getelementptr inbounds [20 x i8], [20 x i8]* %1, i64 0, i64 0
%3 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0))
%4 = call i32 @gets(i8* %2)
%5 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([18 x i8], [18 x i8]* @.str.1, i64 0, i64 0), i8* %2)
ret i32 0
}
/* Type definitions */
struct _reent {
  int dummy;
};

/* Variables and functions */
size_t malloc_usable_size(void *);
size_t _malloc_usable_size_r(struct _reent *ptr, void *mem) {
  return malloc_usable_size(mem);
}


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

x86 assembly (clang, -O2):
<_malloc_usable_size_r>:
mov    %rsi,%rdi
jmp    1030 <malloc_usable_size@plt>

LLVM IR (-O0):
%struct._reent = type { i32 }
define i64 @_malloc_usable_size_r(%struct._reent* %0, i8* %1) {
%3 = alloca %struct._reent*
%4 = alloca i8*
store %struct._reent* %0, %struct._reent** %3
store i8* %1, i8** %4
%5 = load i8*, i8** %4
%6 = call i64 @malloc_usable_size(i8* %5)
ret i64 %6
}

LLVM IR (-O2):
%struct._reent = type { i32 }
define i64 @_malloc_usable_size_r(%struct._reent* nocapture readnone %0, i8* %1) {
%3 = tail call i64 @malloc_usable_size(i8* %1)
ret i64 %3
}
/* Variables and functions */
int /*<<< orphan*/ digitalWrite(int, int);
void pcd8544_set_backlight_state(bool value) { digitalWrite(48, value); }


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

x86 assembly (clang, -O2):
<pcd8544_set_backlight_state>:
mov    %edi,%esi
mov    $0x30,%edi
jmp    1030 <digitalWrite@plt>

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

LLVM IR (-O2):
define void @pcd8544_set_backlight_state(i32 %0) {
%2 = tail call i32 @digitalWrite(i32 48, i32 %0)
ret void
}
unsigned int firstbit(unsigned int mask) { return mask ^ ((mask - 1) & mask); }


x86 assembly (clang, -O0):
<firstbit>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
mov    -0x4(%rbp),%ecx
sub    $0x1,%ecx
and    -0x4(%rbp),%ecx
xor    %ecx,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @firstbit(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = load i32, i32* %2
%5 = sub i32 %4, 1
%6 = load i32, i32* %2
%7 = and i32 %5, %6
%8 = xor i32 %3, %7
ret i32 %8
}

LLVM IR (-O2):
define i32 @firstbit(i32 %0) {
%2 = sub i32 0, %0
%3 = and i32 %2, %0
ret i32 %3
}
/* Type definitions */
typedef int uint64_t;

/* Variables and functions */
uint64_t clr_xlow_1_trail_0s(uint64_t u) { return (u - 1) ^ u; }


x86 assembly (clang, -O0):
<clr_xlow_1_trail_0s>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
sub    $0x1,%eax
xor    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<clr_xlow_1_trail_0s>:
lea    -0x1(%rdi),%eax
xor    %edi,%eax
ret

LLVM IR (-O0):
define i32 @clr_xlow_1_trail_0s(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = sub nsw i32 %3, 1
%5 = load i32, i32* %2
%6 = xor i32 %4, %5
ret i32 %6
}

LLVM IR (-O2):
define i32 @clr_xlow_1_trail_0s(i32 %0) {
%2 = add nsw i32 %0, -1
%3 = xor i32 %2, %0
ret i32 %3
}
/* Variables and functions */
int file_redir(char *);
int run_pipe(char *, char *);
char *strsep(char **, char *);
int process_redir(char *cmd) {
  char *cmd1;
  int status;
  cmd1 = strsep(&cmd, "|");
  if (cmd) {
    status = run_pipe(cmd1, cmd);
  } else {
    status = file_redir(cmd1);
  }
  return status;
}


x86 assembly (clang, -O0):
<process_redir>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
lea    -0x8(%rbp),%rdi
lea    0xeb9(%rip),%rsi
call   1040 <strsep@plt>
mov    %rax,-0x10(%rbp)
cmpq   $0x0,-0x8(%rbp)
je     1170 <process_redir+0x40>
mov    -0x10(%rbp),%rdi
mov    -0x8(%rbp),%rsi
call   1030 <run_pipe@plt>
mov    %eax,-0x14(%rbp)
jmp    117c <process_redir+0x4c>
mov    -0x10(%rbp),%rdi
call   1050 <file_redir@plt>
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<process_redir>:
push   %rax
mov    %rdi,(%rsp)
lea    0xec4(%rip),%rsi
mov    %rsp,%rdi
call   1040 <strsep@plt>
mov    (%rsp),%rsi
mov    %rax,%rdi
test   %rsi,%rsi
je     1157 <process_redir+0x27>
call   1030 <run_pipe@plt>
pop    %rcx
ret
call   1050 <file_redir@plt>
pop    %rcx
ret

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

LLVM IR (-O2):
@.str = [2 x i8] c"|\00"
define i32 @process_redir(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = call i8* @strsep(i8** %2, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
%4 = load i8*, i8** %2
%5 = icmp eq i8* %4, null
br i1 %5, label %8, label %6
6: ; preds = %1
%7 = call i32 @run_pipe(i8* %3, i8* %4)
br label %10
8: ; preds = %1
%9 = call i32 @file_redir(i8* %3)
br label %10
10: ; preds = %8, %6
%11 = phi i32 [ %7, %6 ], [ %9, %8 ]
ret i32 %11
}
void f3() {
#pragma omp declare reduction(f3 : struct U : omp_out.u *= omp_in.u)
#pragma omp declare reduction(f3 : struct U : omp_out.u += omp_in.u)
}


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

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

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

LLVM IR (-O2):
define void @f3() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ U_WMRNOTIMPLEMENTED_swap(char *, int);
void U_WMR6A_swap(char *record, int torev) {
  U_WMRNOTIMPLEMENTED_swap(record, torev);
}


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

x86 assembly (clang, -O2):
<U_WMR6A_swap>:
jmp    1030 <U_WMRNOTIMPLEMENTED_swap@plt>

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

LLVM IR (-O2):
define void @U_WMR6A_swap(i8* %0, i32 %1) {
%3 = tail call i32 @U_WMRNOTIMPLEMENTED_swap(i8* %0, i32 %1)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ rev_string(int);
int main() {
  printf("Enter a string(s) to get the reverse form: ");
  rev_string(1);
  printf("\n");
  return 0;
}


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

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xec8(%rip),%rdi
call   1050 <printf@plt>
mov    $0x1,%edi
call   1040 <rev_string@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [44 x i8] c"Enter a string(s) to get the reverse form: \00"
@.str.1 = [2 x i8] c"\0A\00"
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 @printf(i8* getelementptr inbounds ([44 x i8], [44 x i8]* @.str, i64 0, i64 0))
%3 = call i32 @rev_string(i32 1)
%4 = call i32 @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@.str = [44 x i8] c"Enter a string(s) to get the reverse form: \00"
define i32 @main() {
%1 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([44 x i8], [44 x i8]* @.str, i64 0, i64 0))
%2 = tail call i32 @rev_string(i32 1)
%3 = tail call i32 @putchar(i32 10)
ret i32 0
}
/* Type definitions */
typedef int /*<<< orphan*/ uint16_t;
struct pkt_buff {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ dissect_routinghdr_type_0(struct pkt_buff *,
                                             int /*<<< orphan*/ *,
                                             int /*<<< orphan*/);
void dissect_routinghdr_type_0_norm(struct pkt_buff *pkt, uint16_t *data_len) {
  dissect_routinghdr_type_0(pkt, data_len, 0);
}


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

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

LLVM IR (-O0):
%struct.pkt_buff = type { i32 }
define void @dissect_routinghdr_type_0_norm(%struct.pkt_buff* %0, i32* %1) {
%3 = alloca %struct.pkt_buff*
%4 = alloca i32*
store %struct.pkt_buff* %0, %struct.pkt_buff** %3
store i32* %1, i32** %4
%5 = load %struct.pkt_buff*, %struct.pkt_buff** %3
%6 = load i32*, i32** %4
%7 = call i32 @dissect_routinghdr_type_0(%struct.pkt_buff* %5, i32* %6, i32 0)
ret void
}

LLVM IR (-O2):
%struct.pkt_buff = type { i32 }
define void @dissect_routinghdr_type_0_norm(%struct.pkt_buff* %0, i32* %1) {
%3 = tail call i32 @dissect_routinghdr_type_0(%struct.pkt_buff* %0, i32* %1, i32 0)
ret void
}
/* Type definitions */
struct stat {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ ASSERT(int);
scalar_t__ fstat(int, struct stat *);
int write(int, char *, int);
void get_stat(int fd, struct stat *st, int do_write) {
  if (do_write)
    ASSERT(write(fd, "\n", 1) == 1);
  ASSERT(fstat(fd, st) == 0);
}


x86 assembly (clang, -O0):
<get_stat>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
cmpl   $0x0,-0x14(%rbp)
je     1170 <get_stat+0x40>
mov    -0x4(%rbp),%edi
lea    0xeaa(%rip),%rsi
mov    $0x1,%edx
call   1030 <write@plt>
cmp    $0x1,%eax
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1040 <ASSERT@plt>
mov    -0x4(%rbp),%edi
mov    -0x10(%rbp),%rsi
call   1050 <fstat@plt>
cmp    $0x0,%rax
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1040 <ASSERT@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_stat>:
push   %rbp
push   %rbx
push   %rax
mov    %rsi,%rbx
mov    %edi,%ebp
test   %edx,%edx
je     115d <get_stat+0x2d>
lea    0xebd(%rip),%rsi
mov    %ebp,%edi
mov    $0x1,%edx
call   1030 <write@plt>
xor    %edi,%edi
cmp    $0x1,%eax
sete   %dil
call   1040 <ASSERT@plt>
mov    %ebp,%edi
mov    %rbx,%rsi
call   1050 <fstat@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    1040 <ASSERT@plt>

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

LLVM IR (-O2):
%struct.stat = type { i32 }
@.str = [2 x i8] c"\0A\00"
define void @get_stat(i32 %0, %struct.stat* nocapture %1, i32 %2) {
%4 = icmp eq i32 %2, 0
br i1 %4, label %10, label %5
5: ; preds = %3
%6 = tail call i32 @write(i32 %0, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0), i32 1)
%7 = icmp eq i32 %6, 1
%8 = zext i1 %7 to i32
%9 = tail call i32 @ASSERT(i32 %8)
br label %10
10: ; preds = %5, %3
%11 = tail call i64 @fstat(i32 %0, %struct.stat* %1)
%12 = icmp eq i64 %11, 0
%13 = zext i1 %12 to i32
%14 = tail call i32 @ASSERT(i32 %13)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ fsemu_control_paused();
int /*<<< orphan*/ fsemu_control_set_paused(int);
void fsemu_control_toggle_paused(void) {
  fsemu_control_set_paused(!fsemu_control_paused());
}


x86 assembly (clang, -O0):
<fsemu_control_toggle_paused>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1040 <fsemu_control_paused@plt>
cmp    $0x0,%eax
setne  %al
xor    $0xff,%al
and    $0x1,%al
movzbl %al,%edi
call   1030 <fsemu_control_set_paused@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<fsemu_control_toggle_paused>:
push   %rax
xor    %eax,%eax
call   1040 <fsemu_control_paused@plt>
xor    %edi,%edi
test   %eax,%eax
sete   %dil
pop    %rax
jmp    1030 <fsemu_control_set_paused@plt>

LLVM IR (-O0):
define void @fsemu_control_toggle_paused() {
%1 = call i32 (...) @fsemu_control_paused()
%2 = icmp ne i32 %1, 0
%3 = xor i1 %2, true
%4 = zext i1 %3 to i32
%5 = call i32 @fsemu_control_set_paused(i32 %4)
ret void
}

LLVM IR (-O2):
define void @fsemu_control_toggle_paused() {
%1 = tail call i32 (...) @fsemu_control_paused()
%2 = icmp eq i32 %1, 0
%3 = zext i1 %2 to i32
%4 = tail call i32 @fsemu_control_set_paused(i32 %3)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ fNewMemory(void **, scalar_t__);
int /*<<< orphan*/ strcpy(char *, char *);
scalar_t__ strlen(char *);
char *SU_Copy(char *string) {
  char *result;
  if (!string) {
    result = NULL;
  } else {
    fNewMemory((void **)&result, strlen(string) + 1);
    if (result) {
      strcpy(result, string);
    }
  }
  return result;
}


x86 assembly (clang, -O0):
<SU_Copy>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
cmpq   $0x0,-0x8(%rbp)
jne    1154 <SU_Copy+0x24>
movq   $0x0,-0x10(%rbp)
jmp    118a <SU_Copy+0x5a>
mov    -0x8(%rbp),%rdi
call   1040 <strlen@plt>
mov    %rax,%rsi
add    $0x1,%rsi
lea    -0x10(%rbp),%rdi
call   1050 <fNewMemory@plt>
cmpq   $0x0,-0x10(%rbp)
je     1185 <SU_Copy+0x55>
mov    -0x10(%rbp),%rdi
mov    -0x8(%rbp),%rsi
call   1030 <strcpy@plt>
jmp    118a <SU_Copy+0x5a>
mov    -0x10(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<SU_Copy>:
push   %rbx
sub    $0x10,%rsp
test   %rdi,%rdi
je     1169 <SU_Copy+0x39>
mov    %rdi,%rbx
call   1040 <strlen@plt>
lea    0x1(%rax),%rsi
lea    0x8(%rsp),%rdi
call   1050 <fNewMemory@plt>
mov    0x8(%rsp),%rdi
test   %rdi,%rdi
je     1169 <SU_Copy+0x39>
mov    %rbx,%rsi
call   1030 <strcpy@plt>
mov    0x8(%rsp),%rax
jmp    116b <SU_Copy+0x3b>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
define i8* @SU_Copy(i8* %0) {
%2 = alloca i8*
%3 = alloca i8*
store i8* %0, i8** %2
%4 = load i8*, i8** %2
%5 = icmp ne i8* %4, null
br i1 %5, label %7, label %6
6: ; preds = %1
store i8* null, i8** %3
br label %19
7: ; preds = %1
%8 = load i8*, i8** %2
%9 = call i64 @strlen(i8* %8)
%10 = add nsw i64 %9, 1
%11 = call i32 @fNewMemory(i8** %3, i64 %10)
%12 = load i8*, i8** %3
%13 = icmp ne i8* %12, null
br i1 %13, label %14, label %18
14: ; preds = %7
%15 = load i8*, i8** %3
%16 = load i8*, i8** %2
%17 = call i32 @strcpy(i8* %15, i8* %16)
br label %18
18: ; preds = %14, %7
br label %19
19: ; preds = %18, %6
%20 = load i8*, i8** %3
ret i8* %20
}

LLVM IR (-O2):
define i8* @SU_Copy(i8* %0) {
%2 = alloca i8*
%3 = bitcast i8** %2 to i8*
%4 = icmp eq i8* %0, null
br i1 %4, label %14, label %5
5: ; preds = %1
%6 = tail call i64 @strlen(i8* %0)
%7 = add nsw i64 %6, 1
%8 = call i32 @fNewMemory(i8** %2, i64 %7)
%9 = load i8*, i8** %2
%10 = icmp eq i8* %9, null
br i1 %10, label %14, label %11
11: ; preds = %5
%12 = call i32 @strcpy(i8* %9, i8* %0)
%13 = load i8*, i8** %2
br label %14
14: ; preds = %1, %5, %11
%15 = phi i8* [ null, %5 ], [ %13, %11 ], [ null, %1 ]
ret i8* %15
}
void sn_nsdl_nsp_lost(struct nsdl_s *handle) {}


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

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

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

LLVM IR (-O2):
%struct.nsdl_s = type opaque
define void @sn_nsdl_nsp_lost(%struct.nsdl_s* nocapture %0) {
ret void
}
void USBSTK5505_wait(unsigned long delay) {
  volatile unsigned long i;
  for (i = 0; i < delay; i++) {
  };
}


x86 assembly (clang, -O0):
<USBSTK5505_wait>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movq   $0x0,-0x10(%rbp)
mov    -0x10(%rbp),%rax
cmp    -0x8(%rbp),%rax
jae    1134 <USBSTK5505_wait+0x34>
jmp    1123 <USBSTK5505_wait+0x23>
mov    -0x10(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x10(%rbp)
jmp    1110 <USBSTK5505_wait+0x10>
pop    %rbp
ret

x86 assembly (clang, -O2):
<USBSTK5505_wait>:
movq   $0x0,-0x8(%rsp)
nopl   0x0(%rax)
mov    -0x8(%rsp),%rax
cmp    %rdi,%rax
jae    1122 <USBSTK5505_wait+0x22>
addq   $0x1,-0x8(%rsp)
jmp    1110 <USBSTK5505_wait+0x10>
ret

LLVM IR (-O0):
define void @USBSTK5505_wait(i64 %0) {
%2 = alloca i64
%3 = alloca i64
store i64 %0, i64* %2
store volatile i64 0, i64* %3
br label %4
4: ; preds = %9, %1
%5 = load volatile i64, i64* %3
%6 = load i64, i64* %2
%7 = icmp ult i64 %5, %6
br i1 %7, label %8, label %12
8: ; preds = %4
br label %9
9: ; preds = %8
%10 = load volatile i64, i64* %3
%11 = add i64 %10, 1
store volatile i64 %11, i64* %3
br label %4
12: ; preds = %4
ret void
}

LLVM IR (-O2):
define void @USBSTK5505_wait(i64 %0) {
%2 = alloca i64
%3 = bitcast i64* %2 to i8*
store volatile i64 0, i64* %2
%4 = load volatile i64, i64* %2
%5 = icmp ult i64 %4, %0
br i1 %5, label %6, label %11
6: ; preds = %1, %6
%7 = load volatile i64, i64* %2
%8 = add i64 %7, 1
store volatile i64 %8, i64* %2
%9 = load volatile i64, i64* %2
%10 = icmp ult i64 %9, %0
br i1 %10, label %6, label %11
11: ; preds = %6, %1
ret void
}
/* Variables and functions */
int /*<<< orphan*/ EXIT_FAILURE;
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ printf(char *, char const *);
void usage(const char *prog) {
  printf("\t** Test program for the parser\n"
         "\t** Usage: %s <pcap_in> <pcap_anonymized>\n",
         prog);
  exit(EXIT_FAILURE);
}


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

x86 assembly (clang, -O2):
<usage>:
push   %rax
mov    %rdi,%rsi
lea    0xed5(%rip),%rdi
call   1030 <printf@plt>
mov    0x2ea9(%rip),%rax
mov    (%rax),%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@.str = [75 x i8] c"\09** Test program for the parser\0A\09** Usage: %s <pcap_in> <pcap_anonymized>\0A\00"
@EXIT_FAILURE = global i32 0
define void @usage(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 @printf(i8* getelementptr inbounds ([75 x i8], [75 x i8]* @.str, i64 0, i64 0), i8* %3)
%5 = load i32, i32* @EXIT_FAILURE
%6 = call i32 @exit(i32 %5)
unreachable
}

LLVM IR (-O2):
@.str = [75 x i8] c"\09** Test program for the parser\0A\09** Usage: %s <pcap_in> <pcap_anonymized>\0A\00"
@EXIT_FAILURE = global i32 0
define void @usage(i8* %0) {
%2 = tail call i32 @printf(i8* getelementptr inbounds ([75 x i8], [75 x i8]* @.str, i64 0, i64 0), i8* %0)
%3 = load i32, i32* @EXIT_FAILURE
%4 = tail call i32 @exit(i32 %3)
unreachable
}
/* Variables and functions */
int /*<<< orphan*/ describe(char *);
int /*<<< orphan*/ endDescribe();
int /*<<< orphan*/ util_nb_digits_asserts();
void test_util() {
  describe("Utilitaires");
  util_nb_digits_asserts();
  endDescribe();
}


x86 assembly (clang, -O0):
<test_util>:
push   %rbp
mov    %rsp,%rbp
lea    0xec5(%rip),%rdi
call   1050 <describe@plt>
mov    $0x0,%al
call   1040 <util_nb_digits_asserts@plt>
mov    $0x0,%al
call   1030 <endDescribe@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_util>:
push   %rax
lea    0xec8(%rip),%rdi
call   1050 <describe@plt>
xor    %eax,%eax
call   1040 <util_nb_digits_asserts@plt>
xor    %eax,%eax
pop    %rcx
jmp    1030 <endDescribe@plt>

LLVM IR (-O0):
@.str = [12 x i8] c"Utilitaires\00"
define void @test_util() {
%1 = call i32 @describe(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0))
%2 = call i32 (...) @util_nb_digits_asserts()
%3 = call i32 (...) @endDescribe()
ret void
}

LLVM IR (-O2):
@.str = [12 x i8] c"Utilitaires\00"
define void @test_util() {
%1 = tail call i32 @describe(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0))
%2 = tail call i32 (...) @util_nb_digits_asserts()
%3 = tail call i32 (...) @endDescribe()
ret void
}
int tdefault_can_run(struct target_ops *self) { return 0; }


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

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

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

LLVM IR (-O2):
%struct.target_ops = type opaque
define i32 @tdefault_can_run(%struct.target_ops* nocapture readnone %0) {
ret i32 0
}
/* Variables and functions */
double to_mV(int);
double to_mVns(int q) { return to_mV(q) * 2.0; }


x86 assembly (clang, -O0):
<to_mVns>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
call   1030 <to_mV@plt>
movsd  0xed5(%rip),%xmm1
mulsd  %xmm1,%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<to_mVns>:
push   %rax
call   1030 <to_mV@plt>
addsd  %xmm0,%xmm0
pop    %rax
ret

LLVM IR (-O0):
define double @to_mVns(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = call double @to_mV(i32 %3)
%5 = fmul double %4, 2.000000e+00
ret double %5
}

LLVM IR (-O2):
define double @to_mVns(i32 %0) {
%2 = tail call double @to_mV(i32 %0)
%3 = fmul double %2, 2.000000e+00
ret double %3
}
int main() {
  int x = 10;
  do {
    x++;
  } while (x < 700);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
movl   $0x0,-0x4(%rbp)
movl   $0xa,-0x8(%rbp)
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
cmpl   $0x2bc,-0x8(%rbp)
jl     1112 <main+0x12>
mov    -0x4(%rbp),%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
store i32 0, i32* %1
store i32 10, i32* %2
br label %3
3: ; preds = %6, %0
%4 = load i32, i32* %2
%5 = add nsw i32 %4, 1
store i32 %5, i32* %2
br label %6
6: ; preds = %3
%7 = load i32, i32* %2
%8 = icmp slt i32 %7, 700
br i1 %8, label %3, label %9
9: ; preds = %6
%10 = load i32, i32* %1
ret i32 %10
}

LLVM IR (-O2):
define i32 @main() {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
void print_convert(int N, int M) {
  printf("\n\t- number of detected individuals:\t%d\n", N);
  printf("\t- number of detected loci:\t\t%d\n\n", M);
}


x86 assembly (clang, -O0):
<print_convert>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%esi
lea    0xed8(%rip),%rdi
call   1030 <printf@plt>
mov    -0x8(%rbp),%esi
lea    0xef1(%rip),%rdi
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<print_convert>:
push   %rbx
mov    %esi,%ebx
mov    %edi,%esi
lea    0xee4(%rip),%rdi
call   1030 <printf@plt>
lea    0xf00(%rip),%rdi
mov    %ebx,%esi
pop    %rbx
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [40 x i8] c"\0A\09- number of detected individuals:\09%d\0A\00"
@.str.1 = [34 x i8] c"\09- number of detected loci:\09\09%d\0A\0A\00"
define void @print_convert(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%5 = load i32, i32* %3
%6 = call i32 @printf(i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str, i64 0, i64 0), i32 %5)
%7 = load i32, i32* %4
%8 = call i32 @printf(i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str.1, i64 0, i64 0), i32 %7)
ret void
}

LLVM IR (-O2):
@.str = [40 x i8] c"\0A\09- number of detected individuals:\09%d\0A\00"
@.str.1 = [34 x i8] c"\09- number of detected loci:\09\09%d\0A\0A\00"
define void @print_convert(i32 %0, i32 %1) {
%3 = tail call i32 @printf(i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str, i64 0, i64 0), i32 %0)
%4 = tail call i32 @printf(i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str.1, i64 0, i64 0), i32 %1)
ret void
}
void vec2_add2(double *v1, const double *v2) {
  v1[0] += v2[0];
  v1[1] += v2[1];
}


x86 assembly (clang, -O0):
<vec2_add2>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
movsd  (%rax),%xmm0
mov    -0x8(%rbp),%rax
addsd  (%rax),%xmm0
movsd  %xmm0,(%rax)
mov    -0x10(%rbp),%rax
movsd  0x8(%rax),%xmm0
mov    -0x8(%rbp),%rax
addsd  0x8(%rax),%xmm0
movsd  %xmm0,0x8(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<vec2_add2>:
movsd  (%rsi),%xmm0
addsd  (%rdi),%xmm0
movsd  %xmm0,(%rdi)
movsd  0x8(%rsi),%xmm0
addsd  0x8(%rdi),%xmm0
movsd  %xmm0,0x8(%rdi)
ret

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

LLVM IR (-O2):
define void @vec2_add2(double* nocapture %0, double* nocapture %1) {
%3 = load double, double* %1
%4 = load double, double* %0
%5 = fadd double %3, %4
store double %5, double* %0
%6 = getelementptr inbounds double, double* %1, i64 1
%7 = load double, double* %6
%8 = getelementptr inbounds double, double* %0, i64 1
%9 = load double, double* %8
%10 = fadd double %7, %9
store double %10, double* %8
ret void
}
void init_irq(void) {}


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

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

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

LLVM IR (-O2):
define void @init_irq() {
ret void
}
void check_logfs_disk_dentry(void) { ; }


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

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

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

LLVM IR (-O2):
define void @check_logfs_disk_dentry() {
ret void
}
void fc234(int n) {
  {
    typedef int(*b)[n];
    {
      typedef int(*c)[n];
      0;
    }
    {
      typedef int(*d)[n];
      0;
    };
    typedef int(*e)[n];
    0;
  };
  {
    typedef int(*f)[n];
    {
      typedef int(*g)[n];
      0;
    };
    {
      typedef int(*h)[n];
      0;
    };
    ;
    typedef int(*i)[n];
    goto a;
  a:
    0;
  };
  ;
  typedef int(*j)[n];
  0;
}


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

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

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

LLVM IR (-O2):
define void @fc234(i32 %0) {
ret void
}
void INT_Excep_TPU8_TCI8U(void) {}


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

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

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

LLVM IR (-O2):
define void @INT_Excep_TPU8_TCI8U() {
ret void
}
void ff_hevc_v_loop_filter_luma_10_avx() {}


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

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

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

LLVM IR (-O2):
define void @ff_hevc_v_loop_filter_luma_10_avx() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ abort();
f(double x[2], double y[2]) {
  if (x == y)
    abort();
}


x86 assembly (clang, -O0):
<f>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    -0x10(%rbp),%rax
cmp    -0x18(%rbp),%rax
jne    1135 <f+0x25>
mov    $0x0,%al
call   1030 <abort@plt>
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<f>:
cmp    %rsi,%rdi
je     1116 <f+0x6>
ret
push   %rax
xor    %eax,%eax
call   1030 <abort@plt>

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

LLVM IR (-O2):
define i32 @f(double* readnone %0, double* readnone %1) {
%3 = icmp eq double* %0, %1
br i1 %3, label %4, label %6
4: ; preds = %2
%5 = tail call i32 (...) @abort()
unreachable
6: ; preds = %2
ret i32 undef
}
void tickGreen() {}


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

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

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

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