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


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

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

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

LLVM IR (-O2):
define void @signals_handle_tstp() {
ret void
}
void c_vector3_subtract(float *result, const float *a, const float *b) {
  result[0] = a[0] - b[0];
  result[1] = a[1] - b[1];
  result[2] = a[2] - b[2];
}


x86 assembly (clang, -O0):
<c_vector3_subtract>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x10(%rbp),%rax
movss  (%rax),%xmm0
mov    -0x18(%rbp),%rax
subss  (%rax),%xmm0
mov    -0x8(%rbp),%rax
movss  %xmm0,(%rax)
mov    -0x10(%rbp),%rax
movss  0x4(%rax),%xmm0
mov    -0x18(%rbp),%rax
subss  0x4(%rax),%xmm0
mov    -0x8(%rbp),%rax
movss  %xmm0,0x4(%rax)
mov    -0x10(%rbp),%rax
movss  0x8(%rax),%xmm0
mov    -0x18(%rbp),%rax
subss  0x8(%rax),%xmm0
mov    -0x8(%rbp),%rax
movss  %xmm0,0x8(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<c_vector3_subtract>:
movss  (%rsi),%xmm0
subss  (%rdx),%xmm0
movss  %xmm0,(%rdi)
movss  0x4(%rsi),%xmm0
subss  0x4(%rdx),%xmm0
movss  %xmm0,0x4(%rdi)
movss  0x8(%rsi),%xmm0
subss  0x8(%rdx),%xmm0
movss  %xmm0,0x8(%rdi)
ret

LLVM IR (-O0):
define void @c_vector3_subtract(float* %0, float* %1, float* %2) {
%4 = alloca float*
%5 = alloca float*
%6 = alloca float*
store float* %0, float** %4
store float* %1, float** %5
store float* %2, float** %6
%7 = load float*, float** %5
%8 = getelementptr inbounds float, float* %7, i64 0
%9 = load float, float* %8
%10 = load float*, float** %6
%11 = getelementptr inbounds float, float* %10, i64 0
%12 = load float, float* %11
%13 = fsub float %9, %12
%14 = load float*, float** %4
%15 = getelementptr inbounds float, float* %14, i64 0
store float %13, float* %15
%16 = load float*, float** %5
%17 = getelementptr inbounds float, float* %16, i64 1
%18 = load float, float* %17
%19 = load float*, float** %6
%20 = getelementptr inbounds float, float* %19, i64 1
%21 = load float, float* %20
%22 = fsub float %18, %21
%23 = load float*, float** %4
%24 = getelementptr inbounds float, float* %23, i64 1
store float %22, float* %24
%25 = load float*, float** %5
%26 = getelementptr inbounds float, float* %25, i64 2
%27 = load float, float* %26
%28 = load float*, float** %6
%29 = getelementptr inbounds float, float* %28, i64 2
%30 = load float, float* %29
%31 = fsub float %27, %30
%32 = load float*, float** %4
%33 = getelementptr inbounds float, float* %32, i64 2
store float %31, float* %33
ret void
}

LLVM IR (-O2):
define void @c_vector3_subtract(float* nocapture writeonly %0, float* nocapture %1, float* nocapture %2) {
%4 = load float, float* %1
%5 = load float, float* %2
%6 = fsub float %4, %5
store float %6, float* %0
%7 = getelementptr inbounds float, float* %1, i64 1
%8 = load float, float* %7
%9 = getelementptr inbounds float, float* %2, i64 1
%10 = load float, float* %9
%11 = fsub float %8, %10
%12 = getelementptr inbounds float, float* %0, i64 1
store float %11, float* %12
%13 = getelementptr inbounds float, float* %1, i64 2
%14 = load float, float* %13
%15 = getelementptr inbounds float, float* %2, i64 2
%16 = load float, float* %15
%17 = fsub float %14, %16
%18 = getelementptr inbounds float, float* %0, i64 2
store float %17, float* %18
ret void
}
/* Variables and functions */
int /*<<< orphan*/ VIM_SIF_I2cWriteByte(unsigned char, unsigned char);
void SensorSetReg_GC306(unsigned short uAddr, unsigned short uVal) {
  VIM_SIF_I2cWriteByte((unsigned char)uAddr, (unsigned char)uVal);
}


x86 assembly (clang, -O0):
<SensorSetReg_GC306>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %si,%ax
mov    %di,%cx
mov    %cx,-0x2(%rbp)
mov    %ax,-0x4(%rbp)
mov    -0x2(%rbp),%ax
mov    %al,%cl
mov    -0x4(%rbp),%ax
movzbl %cl,%edi
movzbl %al,%esi
call   1030 <VIM_SIF_I2cWriteByte@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<SensorSetReg_GC306>:
movzbl %dil,%edi
movzbl %sil,%esi
jmp    1030 <VIM_SIF_I2cWriteByte@plt>

LLVM IR (-O0):
define void @SensorSetReg_GC306(i16 zeroext %0, i16 zeroext %1) {
%3 = alloca i16
%4 = alloca i16
store i16 %0, i16* %3
store i16 %1, i16* %4
%5 = load i16, i16* %3
%6 = trunc i16 %5 to i8
%7 = load i16, i16* %4
%8 = trunc i16 %7 to i8
%9 = call i32 @VIM_SIF_I2cWriteByte(i8 zeroext %6, i8 zeroext %8)
ret void
}

LLVM IR (-O2):
define void @SensorSetReg_GC306(i16 zeroext %0, i16 zeroext %1) {
%3 = trunc i16 %0 to i8
%4 = trunc i16 %1 to i8
%5 = tail call i32 @VIM_SIF_I2cWriteByte(i8 zeroext %3, i8 zeroext %4)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ uint8_t;
typedef int /*<<< orphan*/ uint32_t;

/* Variables and functions */
int /*<<< orphan*/ demarshal32(int /*<<< orphan*/ *);
uint32_t read32(uint8_t **b) {
  uint8_t *d = *b;
  *b += 4;
  return demarshal32(d);
}


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

x86 assembly (clang, -O2):
<read32>:
mov    (%rdi),%rax
lea    0x10(%rax),%rcx
mov    %rcx,(%rdi)
mov    %rax,%rdi
jmp    1030 <demarshal32@plt>

LLVM IR (-O0):
define i32 @read32(i32** %0) {
%2 = alloca i32**
%3 = alloca i32*
store i32** %0, i32*** %2
%4 = load i32**, i32*** %2
%5 = load i32*, i32** %4
store i32* %5, i32** %3
%6 = load i32**, i32*** %2
%7 = load i32*, i32** %6
%8 = getelementptr inbounds i32, i32* %7, i64 4
store i32* %8, i32** %6
%9 = load i32*, i32** %3
%10 = call i32 @demarshal32(i32* %9)
ret i32 %10
}

LLVM IR (-O2):
define i32 @read32(i32** nocapture %0) {
%2 = load i32*, i32** %0
%3 = getelementptr inbounds i32, i32* %2, i64 4
store i32* %3, i32** %0
%4 = tail call i32 @demarshal32(i32* %2)
ret i32 %4
}
/* Type definitions */
typedef int /*<<< orphan*/ file_short;
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int fwrite(char *, int, int, int /*<<< orphan*/ *);
int write_ushort(FILE *file, unsigned short s) {
  unsigned char file_short[2];
  file_short[0] = (s & (unsigned)0xff00) >> 8;
  file_short[1] = s & 0xff;
  if (fwrite((char *)file_short, (int)sizeof(file_short), 1, file) != 1)
    return 0;
  return 1;
}


x86 assembly (clang, -O0):
<write_ushort>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %si,%ax
mov    %rdi,-0x10(%rbp)
mov    %ax,-0x12(%rbp)
movzwl -0x12(%rbp),%eax
and    $0xff00,%eax
shr    $0x8,%eax
mov    %al,-0x14(%rbp)
movzwl -0x12(%rbp),%eax
and    $0xff,%eax
mov    %al,-0x13(%rbp)
lea    -0x14(%rbp),%rdi
mov    -0x10(%rbp),%rcx
mov    $0x2,%esi
mov    $0x1,%edx
call   1030 <fwrite@plt>
cmp    $0x1,%eax
je     116a <write_ushort+0x5a>
movl   $0x0,-0x4(%rbp)
jmp    1171 <write_ushort+0x61>
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<write_ushort>:
push   %rax
mov    %rdi,%rcx
rol    $0x8,%si
mov    %si,0x6(%rsp)
lea    0x6(%rsp),%rdi
mov    $0x2,%esi
mov    $0x1,%edx
call   1030 <fwrite@plt>
xor    %ecx,%ecx
cmp    $0x1,%eax
sete   %cl
mov    %ecx,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @write_ushort(i32* %0, i16 zeroext %1) {
%3 = alloca i32
%4 = alloca i32*
%5 = alloca i16
%6 = alloca [2 x i8]
store i32* %0, i32** %4
store i16 %1, i16* %5
%7 = load i16, i16* %5
%8 = zext i16 %7 to i32
%9 = and i32 %8, 65280
%10 = lshr i32 %9, 8
%11 = trunc i32 %10 to i8
%12 = getelementptr inbounds [2 x i8], [2 x i8]* %6, i64 0, i64 0
store i8 %11, i8* %12
%13 = load i16, i16* %5
%14 = zext i16 %13 to i32
%15 = and i32 %14, 255
%16 = trunc i32 %15 to i8
%17 = getelementptr inbounds [2 x i8], [2 x i8]* %6, i64 0, i64 1
store i8 %16, i8* %17
%18 = getelementptr inbounds [2 x i8], [2 x i8]* %6, i64 0, i64 0
%19 = load i32*, i32** %4
%20 = call i32 @fwrite(i8* %18, i32 2, i32 1, i32* %19)
%21 = icmp ne i32 %20, 1
br i1 %21, label %22, label %23
22: ; preds = %2
store i32 0, i32* %3
br label %24
23: ; preds = %2
store i32 1, i32* %3
br label %24
24: ; preds = %23, %22
%25 = load i32, i32* %3
ret i32 %25
}

LLVM IR (-O2):
define i32 @write_ushort(i32* nocapture %0, i16 zeroext %1) {
%3 = alloca [2 x i8]
%4 = getelementptr inbounds [2 x i8], [2 x i8]* %3, i64 0, i64 0
%5 = lshr i16 %1, 8
%6 = trunc i16 %5 to i8
store i8 %6, i8* %4
%7 = trunc i16 %1 to i8
%8 = getelementptr inbounds [2 x i8], [2 x i8]* %3, i64 0, i64 1
store i8 %7, i8* %8
%9 = call i32 @fwrite(i8* %4, i32 2, i32 1, i32* %0)
%10 = icmp eq i32 %9, 1
%11 = zext i1 %10 to i32
ret i32 %11
}
/* Variables and functions */
int /*<<< orphan*/ setcstrasfstr(char **, char *, unsigned int);
void fmud_ftocstring(char **pcString, char *fString, unsigned lenf) {
  setcstrasfstr(pcString, fString, lenf);
}


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

x86 assembly (clang, -O2):
<fmud_ftocstring>:
jmp    1030 <setcstrasfstr@plt>

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

LLVM IR (-O2):
define void @fmud_ftocstring(i8** %0, i8* %1, i32 %2) {
%4 = tail call i32 @setcstrasfstr(i8** %0, i8* %1, i32 %2)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ getword(char, int /*<<< orphan*/);
void Fcomment() { getword(')', 0); }


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

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

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

LLVM IR (-O2):
define void @Fcomment() {
%1 = tail call i32 @getword(i8 signext 41, i32 0)
ret void
}
/* Variables and functions */
int f10_t();
int f10(void) { return f10_t(); }


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

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

LLVM IR (-O0):
define i32 @f10() {
%1 = call i32 (...) @f10_t()
ret i32 %1
}

LLVM IR (-O2):
define i32 @f10() {
%1 = tail call i32 (...) @f10_t()
ret i32 %1
}
/* Variables and functions */
int /*<<< orphan*/ free(char *);
void yyRuU8free(void *ptr) { free((char *)ptr); }


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

x86 assembly (clang, -O2):
<yyRuU8free>:
jmp    1030 <free@plt>

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

LLVM IR (-O2):
define void @yyRuU8free(i8* nocapture %0) {
%2 = tail call i32 @free(i8* %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int, char const *);
void displayMenuEntry(int index, const char *label) {
  printf("%d | %s\n", index, label);
}


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

x86 assembly (clang, -O2):
<displayMenuEntry>:
mov    %rsi,%rdx
mov    %edi,%esi
lea    0xee4(%rip),%rdi
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [9 x i8] c"%d | %s\0A\00"
define void @displayMenuEntry(i32 %0, i8* %1) {
%3 = alloca i32
%4 = alloca i8*
store i32 %0, i32* %3
store i8* %1, i8** %4
%5 = load i32, i32* %3
%6 = load i8*, i8** %4
%7 = call i32 @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), i32 %5, i8* %6)
ret void
}

LLVM IR (-O2):
@.str = [9 x i8] c"%d | %s\0A\00"
define void @displayMenuEntry(i32 %0, i8* %1) {
%3 = tail call i32 @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), i32 %0, i8* %1)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char const);
void printcstr(const char *s, int n) {
  int i = 0;
  for (i = 0; i < n; i++) {
    printf("%c", s[i]);
  }
}


x86 assembly (clang, -O0):
<printcstr>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
movl   $0x0,-0x10(%rbp)
movl   $0x0,-0x10(%rbp)
mov    -0x10(%rbp),%eax
cmp    -0xc(%rbp),%eax
jge    115f <printcstr+0x4f>
mov    -0x8(%rbp),%rax
movslq -0x10(%rbp),%rcx
lea    0xeb8(%rip),%rdi
movsbl (%rax,%rcx,1),%esi
call   1030 <printf@plt>
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    112d <printcstr+0x1d>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<printcstr>:
push   %r15
push   %r14
push   %r12
push   %rbx
push   %rax
test   %esi,%esi
jle    1146 <printcstr+0x36>
mov    %rdi,%r15
mov    %esi,%r12d
xor    %ebx,%ebx
lea    0xed5(%rip),%r14
nopl   0x0(%rax,%rax,1)
movsbl (%r15,%rbx,1),%esi
mov    %r14,%rdi
call   1030 <printf@plt>
add    $0x1,%rbx
cmp    %rbx,%r12
jne    1130 <printcstr+0x20>
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
ret

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

LLVM IR (-O2):
@.str = [3 x i8] c"%c\00"
define void @printcstr(i8* nocapture %0, i32 %1) {
%3 = icmp sgt i32 %1, 0
br i1 %3, label %4, label %13
4: ; preds = %2
%5 = zext i32 %1 to i64
br label %6
6: ; preds = %4, %6
%7 = phi i64 [ 0, %4 ], [ %11, %6 ]
%8 = getelementptr inbounds i8, i8* %0, i64 %7
%9 = load i8, i8* %8
%10 = tail call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8 signext %9)
%11 = add nuw nsw i64 %7, 1
%12 = icmp eq i64 %11, %5
br i1 %12, label %13, label %6
13: ; preds = %6, %2
ret void
}
int isspace2(char c) {
  if (c == ' ' || c == ',' || c == '\f' || c == '\n' || c == '\r' ||
      c == '\t' || c == '\v')
    return 1;
  else
    return 0;
}


x86 assembly (clang, -O0):
<isspace2>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x5(%rbp)
movsbl -0x5(%rbp),%eax
cmp    $0x20,%eax
je     1165 <isspace2+0x65>
movsbl -0x5(%rbp),%eax
cmp    $0x2c,%eax
je     1165 <isspace2+0x65>
movsbl -0x5(%rbp),%eax
cmp    $0xc,%eax
je     1165 <isspace2+0x65>
movsbl -0x5(%rbp),%eax
cmp    $0xa,%eax
je     1165 <isspace2+0x65>
movsbl -0x5(%rbp),%eax
cmp    $0xd,%eax
je     1165 <isspace2+0x65>
movsbl -0x5(%rbp),%eax
cmp    $0x9,%eax
je     1165 <isspace2+0x65>
movsbl -0x5(%rbp),%eax
cmp    $0xb,%eax
jne    1171 <isspace2+0x71>
movl   $0x1,-0x4(%rbp)
jmp    1178 <isspace2+0x78>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<isspace2>:
cmp    $0x2c,%dil
ja     1120 <isspace2+0x20>
mov    $0x1,%eax
movzbl %dil,%ecx
movabs $0x100100003e00,%rdx
bt     %rcx,%rdx
jae    1120 <isspace2+0x20>
ret
xor    %eax,%eax
ret

LLVM IR (-O0):
define i32 @isspace2(i8 signext %0) {
%2 = alloca i32
%3 = alloca i8
store i8 %0, i8* %3
%4 = load i8, i8* %3
%5 = sext i8 %4 to i32
%6 = icmp eq i32 %5, 32
br i1 %6, label %31, label %7
7: ; preds = %1
%8 = load i8, i8* %3
%9 = sext i8 %8 to i32
%10 = icmp eq i32 %9, 44
br i1 %10, label %31, label %11
11: ; preds = %7
%12 = load i8, i8* %3
%13 = sext i8 %12 to i32
%14 = icmp eq i32 %13, 12
br i1 %14, label %31, label %15
15: ; preds = %11
%16 = load i8, i8* %3
%17 = sext i8 %16 to i32
%18 = icmp eq i32 %17, 10
br i1 %18, label %31, label %19
19: ; preds = %15
%20 = load i8, i8* %3
%21 = sext i8 %20 to i32
%22 = icmp eq i32 %21, 13
br i1 %22, label %31, label %23
23: ; preds = %19
%24 = load i8, i8* %3
%25 = sext i8 %24 to i32
%26 = icmp eq i32 %25, 9
br i1 %26, label %31, label %27
27: ; preds = %23
%28 = load i8, i8* %3
%29 = sext i8 %28 to i32
%30 = icmp eq i32 %29, 11
br i1 %30, label %31, label %32
31: ; preds = %27, %23, %19, %15, %11, %7, %1
store i32 1, i32* %2
br label %33
32: ; preds = %27
store i32 0, i32* %2
br label %33
33: ; preds = %32, %31
%34 = load i32, i32* %2
ret i32 %34
}

LLVM IR (-O2):
define i32 @isspace2(i8 signext %0) {
switch i8 %0, label %2 [
i8 44, label %3
i8 32, label %3
i8 13, label %3
i8 12, label %3
i8 11, label %3
i8 10, label %3
i8 9, label %3
]
2: ; preds = %1
br label %3
3: ; preds = %1, %1, %1, %1, %1, %1, %1, %2
%4 = phi i32 [ 0, %2 ], [ 1, %1 ], [ 1, %1 ], [ 1, %1 ], [ 1, %1 ], [ 1, %1 ], [ 1, %1 ], [ 1, %1 ]
ret i32 %4
}
int test_imm_BFint8_reg(signed char val) {
  return ((val) & (-0xBF << 0)) ? -20 : -40;
}


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

x86 assembly (clang, -O2):
<test_imm_BFint8_reg>:
test   $0xffffff41,%edi
mov    $0xffffffd8,%ecx
mov    $0xffffffec,%eax
cmove  %ecx,%eax
ret

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

LLVM IR (-O2):
define i32 @test_imm_BFint8_reg(i8 signext %0) {
%2 = sext i8 %0 to i32
%3 = and i32 %2, -191
%4 = icmp eq i32 %3, 0
%5 = select i1 %4, i32 -40, i32 -20
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ __stpncpy(char *, char const *, size_t);
char *strncpy(char *d, const char *s, size_t n) {
  __stpncpy(d, s, n);
  return d;
}


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

x86 assembly (clang, -O2):
<strncpy>:
push   %rbx
mov    %rdi,%rbx
call   1030 <__stpncpy@plt>
mov    %rbx,%rax
pop    %rbx
ret

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

LLVM IR (-O2):
define i8* @strncpy(i8* returned %0, i8* %1, i64 %2) {
%4 = tail call i32 @__stpncpy(i8* %0, i8* %1, i64 %2)
ret i8* %0
}
/* Variables and functions */
int bar(scalar_t__);
scalar_t__ foo(int);
int /*<<< orphan*/ func(int);
int /*<<< orphan*/ func3();
int /*<<< orphan*/ marker1();
int main() {
  int result;
  int b, c;
  c = 5;
  b = 3;
  func(c);
  marker1();
  func3();
  result = bar(b + foo(c));
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x5,-0x10(%rbp)
movl   $0x3,-0xc(%rbp)
mov    -0x10(%rbp),%edi
call   1060 <func@plt>
mov    $0x0,%al
call   1050 <marker1@plt>
mov    $0x0,%al
call   1030 <func3@plt>
movslq -0xc(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x10(%rbp),%edi
call   1070 <foo@plt>
mov    -0x18(%rbp),%rdi
add    %rax,%rdi
call   1040 <bar@plt>
mov    %eax,-0x8(%rbp)
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    $0x5,%edi
call   1060 <func@plt>
xor    %eax,%eax
call   1050 <marker1@plt>
xor    %eax,%eax
call   1030 <func3@plt>
mov    $0x5,%edi
call   1070 <foo@plt>
lea    0x3(%rax),%rdi
call   1040 <bar@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
store i32 0, i32* %1
store i32 5, i32* %4
store i32 3, i32* %3
%5 = load i32, i32* %4
%6 = call i32 @func(i32 %5)
%7 = call i32 (...) @marker1()
%8 = call i32 (...) @func3()
%9 = load i32, i32* %3
%10 = sext i32 %9 to i64
%11 = load i32, i32* %4
%12 = call i64 @foo(i32 %11)
%13 = add nsw i64 %10, %12
%14 = call i32 @bar(i64 %13)
store i32 %14, i32* %2
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 @func(i32 5)
%2 = tail call i32 (...) @marker1()
%3 = tail call i32 (...) @func3()
%4 = tail call i64 @foo(i32 5)
%5 = add nsw i64 %4, 3
%6 = tail call i32 @bar(i64 %5)
ret i32 0
}
/* Variables and functions */
int juniper_fpga_partition_write_bytes(int, int, char *, char *, int);
int juniper_fpga_partition_write_flag(int devNo, int partNo, char *flagName,
                                      int flag) {
  char flagChar;
  ;
  flagChar = flag ? '1' : '0';
  return juniper_fpga_partition_write_bytes(devNo, partNo, flagName, &flagChar,
                                            1);
}


x86 assembly (clang, -O0):
<juniper_fpga_partition_write_flag>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %rdx,-0x10(%rbp)
mov    %ecx,-0x14(%rbp)
mov    -0x14(%rbp),%edx
mov    $0x30,%eax
mov    $0x31,%ecx
cmp    $0x0,%edx
cmovne %ecx,%eax
mov    %al,-0x15(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x8(%rbp),%esi
mov    -0x10(%rbp),%rdx
lea    -0x15(%rbp),%rcx
mov    $0x1,%r8d
call   1030 <juniper_fpga_partition_write_bytes@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<juniper_fpga_partition_write_flag>:
push   %rax
cmp    $0x1,%ecx
mov    $0x31,%al
sbb    $0x0,%al
mov    %al,0x7(%rsp)
lea    0x7(%rsp),%rcx
mov    $0x1,%r8d
call   1030 <juniper_fpga_partition_write_bytes@plt>
pop    %rcx
ret

LLVM IR (-O0):
define i32 @juniper_fpga_partition_write_flag(i32 %0, i32 %1, i8* %2, i32 %3) {
%5 = alloca i32
%6 = alloca i32
%7 = alloca i8*
%8 = alloca i32
%9 = alloca i8
store i32 %0, i32* %5
store i32 %1, i32* %6
store i8* %2, i8** %7
store i32 %3, i32* %8
%10 = load i32, i32* %8
%11 = icmp ne i32 %10, 0
%12 = zext i1 %11 to i64
%13 = select i1 %11, i32 49, i32 48
%14 = trunc i32 %13 to i8
store i8 %14, i8* %9
%15 = load i32, i32* %5
%16 = load i32, i32* %6
%17 = load i8*, i8** %7
%18 = call i32 @juniper_fpga_partition_write_bytes(i32 %15, i32 %16, i8* %17, i8* %9, i32 1)
ret i32 %18
}

LLVM IR (-O2):
define i32 @juniper_fpga_partition_write_flag(i32 %0, i32 %1, i8* %2, i32 %3) {
%5 = alloca i8
%6 = icmp eq i32 %3, 0
%7 = select i1 %6, i8 48, i8 49
store i8 %7, i8* %5
%8 = call i32 @juniper_fpga_partition_write_bytes(i32 %0, i32 %1, i8* %2, i8* %5, i32 1)
ret i32 %8
}
/* Variables and functions */
double exp(double);
double math__Float__exp(double self) {
  double var;
  double var1;
  var1 = exp(self);
  var = var1;
  goto RET_LABEL;
RET_LABEL:;
  return var;
}


x86 assembly (clang, -O0):
<math__Float__exp>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
call   1030 <exp@plt>
movsd  %xmm0,-0x18(%rbp)
movsd  -0x18(%rbp),%xmm0
movsd  %xmm0,-0x10(%rbp)
movsd  -0x10(%rbp),%xmm0
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<math__Float__exp>:
jmp    1030 <exp@plt>

LLVM IR (-O0):
define double @math__Float__exp(double %0) {
%2 = alloca double
%3 = alloca double
%4 = alloca double
store double %0, double* %2
%5 = load double, double* %2
%6 = call double @exp(double %5)
store double %6, double* %4
%7 = load double, double* %4
store double %7, double* %3
br label %8
8: ; preds = %1
%9 = load double, double* %3
ret double %9
}

LLVM IR (-O2):
define double @math__Float__exp(double %0) {
%2 = tail call double @exp(double %0)
ret double %2
}
/* Forward declarations */
typedef struct TYPE_2__ TYPE_1__;

/* Type definitions */
struct TYPE_2__ {
  int x_root;
};
typedef TYPE_1__ XLeaveWindowEvent;

/* Variables and functions */
void set_XLeaveWindowEvent_x_root(void *_p, int _v) {
  ((XLeaveWindowEvent *)_p)->x_root = (int)_v;
}


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

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

LLVM IR (-O0):
%struct.TYPE_2__ = type { i32 }
define void @set_XLeaveWindowEvent_x_root(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i32
store i8* %0, i8** %3
store i32 %1, i32* %4
%5 = load i32, i32* %4
%6 = load i8*, i8** %3
%7 = bitcast i8* %6 to %struct.TYPE_2__*
%8 = getelementptr inbounds %struct.TYPE_2__, %struct.TYPE_2__* %7, i32 0, i32 0
store i32 %5, i32* %8
ret void
}

LLVM IR (-O2):
define void @set_XLeaveWindowEvent_x_root(i8* nocapture writeonly %0, i32 %1) {
%3 = bitcast i8* %0 to i32*
store i32 %1, i32* %3
ret void
}
void httpd_init(void) {}


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

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

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

LLVM IR (-O2):
define void @httpd_init() {
ret void
}
int foo(unsigned int i, unsigned int j) {
  i &= 15;
  j &= 15;
  i += 1024;
  j += 2048;
  i &= j;
  return i < 16;
}


x86 assembly (clang, -O0):
<foo>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
and    $0xf,%eax
mov    %eax,-0x4(%rbp)
mov    -0x8(%rbp),%eax
and    $0xf,%eax
mov    %eax,-0x8(%rbp)
mov    -0x4(%rbp),%eax
add    $0x400,%eax
mov    %eax,-0x4(%rbp)
mov    -0x8(%rbp),%eax
add    $0x800,%eax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
and    -0x4(%rbp),%eax
mov    %eax,-0x4(%rbp)
cmpl   $0x10,-0x4(%rbp)
setb   %al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @foo(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 = and i32 %5, 15
store i32 %6, i32* %3
%7 = load i32, i32* %4
%8 = and i32 %7, 15
store i32 %8, i32* %4
%9 = load i32, i32* %3
%10 = add i32 %9, 1024
store i32 %10, i32* %3
%11 = load i32, i32* %4
%12 = add i32 %11, 2048
store i32 %12, i32* %4
%13 = load i32, i32* %4
%14 = load i32, i32* %3
%15 = and i32 %14, %13
store i32 %15, i32* %3
%16 = load i32, i32* %3
%17 = icmp ult i32 %16, 16
%18 = zext i1 %17 to i32
ret i32 %18
}

LLVM IR (-O2):
define i32 @foo(i32 %0, i32 %1) {
ret i32 1
}
void mdp4_lcdc_overlay_blt(struct msm_fb_data_type *mfd,
                           struct msmfb_overlay_blt *req) {}


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

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

LLVM IR (-O0):
%struct.msm_fb_data_type = type opaque
%struct.msmfb_overlay_blt = type opaque
define void @mdp4_lcdc_overlay_blt(%struct.msm_fb_data_type* %0, %struct.msmfb_overlay_blt* %1) {
%3 = alloca %struct.msm_fb_data_type*
%4 = alloca %struct.msmfb_overlay_blt*
store %struct.msm_fb_data_type* %0, %struct.msm_fb_data_type** %3
store %struct.msmfb_overlay_blt* %1, %struct.msmfb_overlay_blt** %4
ret void
}

LLVM IR (-O2):
%struct.msm_fb_data_type = type opaque
%struct.msmfb_overlay_blt = type opaque
define void @mdp4_lcdc_overlay_blt(%struct.msm_fb_data_type* nocapture %0, %struct.msmfb_overlay_blt* nocapture %1) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ lngtxt(int);
int /*<<< orphan*/ p_log(int, int, int /*<<< orphan*/);
int /*<<< orphan*/ usr1_error(int);
int cmdsockstat(int usern) {
  p_log(0x0000, usern, lngtxt(22));
  usr1_error(31337);
  p_log(0x0000, usern, lngtxt(23));
  return 0x0;
}


x86 assembly (clang, -O0):
<cmdsockstat>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    $0x16,%edi
call   1050 <lngtxt@plt>
mov    -0xc(%rbp),%esi
mov    %eax,%edx
xor    %edi,%edi
call   1030 <p_log@plt>
mov    $0x7a69,%edi
call   1040 <usr1_error@plt>
mov    -0x4(%rbp),%eax
mov    %eax,-0x8(%rbp)
mov    $0x17,%edi
call   1050 <lngtxt@plt>
mov    -0x8(%rbp),%esi
mov    %eax,%edx
xor    %edi,%edi
call   1030 <p_log@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<cmdsockstat>:
push   %rbx
mov    %edi,%ebx
mov    $0x16,%edi
call   1050 <lngtxt@plt>
xor    %edi,%edi
mov    %ebx,%esi
mov    %eax,%edx
call   1030 <p_log@plt>
mov    $0x7a69,%edi
call   1040 <usr1_error@plt>
mov    $0x17,%edi
call   1050 <lngtxt@plt>
xor    %edi,%edi
mov    %ebx,%esi
mov    %eax,%edx
call   1030 <p_log@plt>
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
define i32 @cmdsockstat(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = call i32 @lngtxt(i32 22)
%5 = call i32 @p_log(i32 0, i32 %3, i32 %4)
%6 = call i32 @usr1_error(i32 31337)
%7 = load i32, i32* %2
%8 = call i32 @lngtxt(i32 23)
%9 = call i32 @p_log(i32 0, i32 %7, i32 %8)
ret i32 0
}

LLVM IR (-O2):
define i32 @cmdsockstat(i32 %0) {
%2 = tail call i32 @lngtxt(i32 22)
%3 = tail call i32 @p_log(i32 0, i32 %0, i32 %2)
%4 = tail call i32 @usr1_error(i32 31337)
%5 = tail call i32 @lngtxt(i32 23)
%6 = tail call i32 @p_log(i32 0, i32 %0, i32 %5)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ isdigit(int);
void t_isdigit_0x24() {
  Assert_real((isdigit(36) == 0),
              "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
              "2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/"
              "dg/z88dk/test/suites/ctype/test_isdigit.c",
              185, ("isdigit should be 0 for $"));
}


x86 assembly (clang, -O0):
<t_isdigit_0x24>:
push   %rbp
mov    %rsp,%rbp
mov    $0x24,%edi
call   1030 <isdigit@plt>
cmp    $0x0,%rax
sete   %al
and    $0x1,%al
movzbl %al,%edi
lea    0xebf(%rip),%rsi
mov    $0xb9,%edx
lea    0xf5b(%rip),%rcx
call   1040 <Assert_real@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<t_isdigit_0x24>:
push   %rax
mov    $0x24,%edi
call   1030 <isdigit@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf66(%rip),%rcx
mov    $0xb9,%edx
pop    %rax
jmp    1040 <Assert_real@plt>

LLVM IR (-O0):
@.str = [168 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/ctype/test_isdigit.c\00"
@.str.1 = [26 x i8] c"isdigit should be 0 for $\00"
define void @t_isdigit_0x24() {
%1 = call i64 @isdigit(i32 36)
%2 = icmp eq i64 %1, 0
%3 = zext i1 %2 to i32
%4 = call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([168 x i8], [168 x i8]* @.str, i64 0, i64 0), i32 185, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [168 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/ctype/test_isdigit.c\00"
@.str.1 = [26 x i8] c"isdigit should be 0 for $\00"
define void @t_isdigit_0x24() {
%1 = tail call i64 @isdigit(i32 36)
%2 = icmp eq i64 %1, 0
%3 = zext i1 %2 to i32
%4 = tail call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([168 x i8], [168 x i8]* @.str, i64 0, i64 0), i32 185, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int hello3() {
  printf("Hello, world!");
  return 0;
}


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

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

LLVM IR (-O0):
@.str = [14 x i8] c"Hello, world!\00"
define i32 @hello3() {
%1 = call i32 @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@.str = [14 x i8] c"Hello, world!\00"
define i32 @hello3() {
%1 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0))
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ printf(char *);
void usage(void) {
  printf("Usage:\n");
  printf(" db_add <database in> <database out> <song> <mac path>\n");
  exit(1);
}


x86 assembly (clang, -O0):
<usage>:
push   %rbp
mov    %rsp,%rbp
lea    0xed5(%rip),%rdi
call   1030 <printf@plt>
lea    0xed1(%rip),%rdi
call   1030 <printf@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<usage>:
push   %rax
lea    0xed8(%rip),%rdi
call   1030 <puts@plt>
lea    0xed3(%rip),%rdi
call   1030 <puts@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@.str = [8 x i8] c"Usage:\0A\00"
@.str.1 = [56 x i8] c" db_add <database in> <database out> <song> <mac path>\0A\00"
define void @usage() {
%1 = call i32 @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0))
%2 = call i32 @printf(i8* getelementptr inbounds ([56 x i8], [56 x i8]* @.str.1, i64 0, i64 0))
%3 = call i32 @exit(i32 1)
unreachable
}

LLVM IR (-O2):
@str = [7 x i8] c"Usage:\00"
@str.2 = [55 x i8] c" db_add <database in> <database out> <song> <mac path>\00"
define void @usage() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @str, i64 0, i64 0))
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([55 x i8], [55 x i8]* @str.2, i64 0, i64 0))
%3 = tail call i32 @exit(i32 1)
unreachable
}
int iscnumber(char c) { return '0' <= c && c <= '9'; }


x86 assembly (clang, -O0):
<iscnumber>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movsbl -0x1(%rbp),%edx
xor    %eax,%eax
mov    $0x30,%ecx
cmp    %edx,%ecx
mov    %al,-0x2(%rbp)
jg     112d <iscnumber+0x2d>
movsbl -0x1(%rbp),%eax
cmp    $0x39,%eax
setle  %al
mov    %al,-0x2(%rbp)
mov    -0x2(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<iscnumber>:
add    $0xd0,%dil
xor    %eax,%eax
cmp    $0xa,%dil
setb   %al
ret

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

LLVM IR (-O2):
define i32 @iscnumber(i8 signext %0) {
%2 = add i8 %0, -48
%3 = icmp ult i8 %2, 10
%4 = zext i1 %3 to i32
ret i32 %4
}
int c075(void) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @c075() {
ret i32 0
}
TEST(TrivialTest, Addition) { ASSERT_EQ(1 + 1, 2); }


x86 assembly (clang, -O0):
<TEST>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    $0x2,%esi
mov    %esi,%edi
mov    $0x0,%al
call   1030 <ASSERT_EQ@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<TEST>:
mov    $0x2,%edi
mov    $0x2,%esi
xor    %eax,%eax
jmp    1030 <ASSERT_EQ@plt>

LLVM IR (-O0):
define i32 @TEST(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
store i32 %0, i32* %4
store i32 %1, i32* %5
%6 = call i32 (i32, i32, ...) bitcast (i32 (...)* @ASSERT_EQ to i32 (i32, i32, ...)*)(i32 2, i32 2)
%7 = load i32, i32* %3
ret i32 %7
}

LLVM IR (-O2):
define i32 @TEST(i32 %0, i32 %1) {
%3 = tail call i32 (i32, i32, ...) bitcast (i32 (...)* @ASSERT_EQ to i32 (i32, i32, ...)*)(i32 2, i32 2)
ret i32 undef
}
int test_imm_90uint64_highword_reg(unsigned long long val) {
  return ((val >> 32) & (0x90 << 0)) ? -20 : -40;
}


x86 assembly (clang, -O0):
<test_imm_90uint64_highword_reg>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdx
shr    $0x20,%rdx
and    $0x90,%rdx
mov    $0xffffffd8,%eax
mov    $0xffffffec,%ecx
cmp    $0x0,%rdx
cmovne %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_imm_90uint64_highword_reg>:
movabs $0x9000000000,%rax
test   %rax,%rdi
mov    $0xffffffd8,%ecx
mov    $0xffffffec,%eax
cmove  %ecx,%eax
ret

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

LLVM IR (-O2):
define i32 @test_imm_90uint64_highword_reg(i64 %0) {
%2 = and i64 %0, 618475290624
%3 = icmp eq i64 %2, 0
%4 = select i1 %3, i32 -40, i32 -20
ret i32 %4
}
/* Variables and functions */
int pow(int, double);
int /*<<< orphan*/ printf(char *, double);
double perfeito(double k) {
  if (0) {
    printf("P recebe > %lf\n", k);
  }
  return ((pow(2, (k - 1)) * (pow(2, k) - 1)));
}


x86 assembly (clang, -O0):
<perfeito>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
movsd  0xed6(%rip),%xmm1
subsd  %xmm1,%xmm0
mov    $0x2,%edi
call   1030 <pow@plt>
mov    %eax,-0xc(%rbp)
movsd  -0x8(%rbp),%xmm0
mov    $0x2,%edi
call   1030 <pow@plt>
mov    %eax,%ecx
mov    -0xc(%rbp),%eax
sub    $0x1,%ecx
imul   %ecx,%eax
cvtsi2sd %eax,%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<perfeito>:
push   %rbx
sub    $0x10,%rsp
movapd %xmm0,%xmm1
movsd  %xmm0,0x8(%rsp)
movsd  0xed9(%rip),%xmm0
addsd  %xmm1,%xmm0
mov    $0x2,%edi
call   1030 <pow@plt>
mov    %eax,%ebx
mov    $0x2,%edi
movsd  0x8(%rsp),%xmm0
call   1030 <pow@plt>
add    $0xffffffff,%eax
imul   %ebx,%eax
xorps  %xmm0,%xmm0
cvtsi2sd %eax,%xmm0
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
define double @perfeito(double %0) {
%2 = alloca double
store double %0, double* %2
%3 = load double, double* %2
%4 = fsub double %3, 1.000000e+00
%5 = call i32 @pow(i32 2, double %4)
%6 = load double, double* %2
%7 = call i32 @pow(i32 2, double %6)
%8 = sub nsw i32 %7, 1
%9 = mul nsw i32 %5, %8
%10 = sitofp i32 %9 to double
ret double %10
}

LLVM IR (-O2):
define double @perfeito(double %0) {
%2 = fadd double %0, -1.000000e+00
%3 = tail call i32 @pow(i32 2, double %2)
%4 = tail call i32 @pow(i32 2, double %0)
%5 = add nsw i32 %4, -1
%6 = mul nsw i32 %5, %3
%7 = sitofp i32 %6 to double
ret double %7
}
/* Variables and functions */
int _ctype_lookup(int);
int isxdigit(int c) { return _ctype_lookup(c) & (0x40 | 0x04); }


x86 assembly (clang, -O0):
<isxdigit>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
call   1030 <_ctype_lookup@plt>
and    $0x44,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<isxdigit>:
push   %rax
call   1030 <_ctype_lookup@plt>
and    $0x44,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @isxdigit(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = call i32 @_ctype_lookup(i32 %3)
%5 = and i32 %4, 68
ret i32 %5
}

LLVM IR (-O2):
define i32 @isxdigit(i32 %0) {
%2 = tail call i32 @_ctype_lookup(i32 %0)
%3 = and i32 %2, 68
ret i32 %3
}
void ARGB4444ToARGB() {}


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

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

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

LLVM IR (-O2):
define void @ARGB4444ToARGB() {
ret void
}
/* Variables and functions */
scalar_t__ dcac_info_ops(int, int, char const *, int /*<<< orphan*/ *,
                         int /*<<< orphan*/);
int dcac_get_attr_fd(const char *attr) {
  return (int)dcac_info_ops(60, -1, attr, NULL, 0);
}


x86 assembly (clang, -O0):
<dcac_get_attr_fd>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdx
mov    $0x3c,%edi
mov    $0xffffffff,%esi
xor    %eax,%eax
mov    %eax,%ecx
xor    %r8d,%r8d
call   1030 <dcac_info_ops@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<dcac_get_attr_fd>:
mov    %rdi,%rdx
mov    $0x3c,%edi
mov    $0xffffffff,%esi
xor    %ecx,%ecx
xor    %r8d,%r8d
jmp    1030 <dcac_info_ops@plt>

LLVM IR (-O0):
define i32 @dcac_get_attr_fd(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i64 @dcac_info_ops(i32 60, i32 -1, i8* %3, i32* null, i32 0)
%5 = trunc i64 %4 to i32
ret i32 %5
}

LLVM IR (-O2):
define i32 @dcac_get_attr_fd(i8* %0) {
%2 = tail call i64 @dcac_info_ops(i32 60, i32 -1, i8* %0, i32* null, i32 0)
%3 = trunc i64 %2 to i32
ret i32 %3
}
void zero_open(struct fs_node *node, unsigned int flags) {
  (void)node;
  (void)flags;
  return;
}


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

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

LLVM IR (-O0):
%struct.fs_node = type opaque
define void @zero_open(%struct.fs_node* %0, i32 %1) {
%3 = alloca %struct.fs_node*
%4 = alloca i32
store %struct.fs_node* %0, %struct.fs_node** %3
store i32 %1, i32* %4
%5 = load %struct.fs_node*, %struct.fs_node** %3
%6 = load i32, i32* %4
ret void
}

LLVM IR (-O2):
%struct.fs_node = type opaque
define void @zero_open(%struct.fs_node* nocapture %0, i32 %1) {
ret void
}
long pv__calc_percentage(long long so_far, const long long total) {
  if (total < 1)
    return 0;
  so_far *= 100;
  so_far /= total;
  return (long)so_far;
}


x86 assembly (clang, -O0):
<pv__calc_percentage>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
cmpq   $0x1,-0x18(%rbp)
jge    1124 <pv__calc_percentage+0x24>
movq   $0x0,-0x8(%rbp)
jmp    1146 <pv__calc_percentage+0x46>
imul   $0x64,-0x10(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x18(%rbp),%rcx
mov    -0x10(%rbp),%rax
cqto
idiv   %rcx
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<pv__calc_percentage>:
test   %rsi,%rsi
jle    111b <pv__calc_percentage+0x1b>
imul   $0x64,%rdi,%rax
mov    %rax,%rcx
or     %rsi,%rcx
shr    $0x20,%rcx
je     111e <pv__calc_percentage+0x1e>
cqto
idiv   %rsi
ret
xor    %eax,%eax
ret
xor    %edx,%edx
div    %esi
ret

LLVM IR (-O0):
define i64 @pv__calc_percentage(i64 %0, i64 %1) {
%3 = alloca i64
%4 = alloca i64
%5 = alloca i64
store i64 %0, i64* %4
store i64 %1, i64* %5
%6 = load i64, i64* %5
%7 = icmp slt i64 %6, 1
br i1 %7, label %8, label %9
8: ; preds = %2
store i64 0, i64* %3
br label %16
9: ; preds = %2
%10 = load i64, i64* %4
%11 = mul nsw i64 %10, 100
store i64 %11, i64* %4
%12 = load i64, i64* %5
%13 = load i64, i64* %4
%14 = sdiv i64 %13, %12
store i64 %14, i64* %4
%15 = load i64, i64* %4
store i64 %15, i64* %3
br label %16
16: ; preds = %9, %8
%17 = load i64, i64* %3
ret i64 %17
}

LLVM IR (-O2):
define i64 @pv__calc_percentage(i64 %0, i64 %1) {
%3 = icmp slt i64 %1, 1
br i1 %3, label %7, label %4
4: ; preds = %2
%5 = mul nsw i64 %0, 100
%6 = sdiv i64 %5, %1
br label %7
7: ; preds = %2, %4
%8 = phi i64 [ %6, %4 ], [ 0, %2 ]
ret i64 %8
}
char *kstrcpy(char *s, const char *ct) {
  int i = 0;
  do {
    s[i] = ct[i];
  } while (ct[i++] != '\0');
  return s;
}


x86 assembly (clang, -O0):
<kstrcpy>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
mov    -0x10(%rbp),%rax
movslq -0x14(%rbp),%rcx
mov    (%rax,%rcx,1),%dl
mov    -0x8(%rbp),%rax
movslq -0x14(%rbp),%rcx
mov    %dl,(%rax,%rcx,1)
mov    -0x10(%rbp),%rax
mov    -0x14(%rbp),%ecx
mov    %ecx,%edx
add    $0x1,%edx
mov    %edx,-0x14(%rbp)
movslq %ecx,%rcx
movsbl (%rax,%rcx,1),%eax
cmp    $0x0,%eax
jne    1113 <kstrcpy+0x13>
mov    -0x8(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<kstrcpy>:
mov    %rdi,%rax
xor    %ecx,%ecx
cs nopw 0x0(%rax,%rax,1)
nop
movzbl (%rsi,%rcx,1),%edx
mov    %dl,(%rax,%rcx,1)
cmpb   $0x0,(%rsi,%rcx,1)
lea    0x1(%rcx),%rcx
jne    1110 <kstrcpy+0x10>
ret

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

LLVM IR (-O2):
define i8* @kstrcpy(i8* returned writeonly %0, i8* nocapture %1) {
br label %3
3: ; preds = %3, %2
%4 = phi i64 [ %8, %3 ], [ 0, %2 ]
%5 = getelementptr inbounds i8, i8* %1, i64 %4
%6 = load i8, i8* %5
%7 = getelementptr inbounds i8, i8* %0, i64 %4
store i8 %6, i8* %7
%8 = add nuw i64 %4, 1
%9 = load i8, i8* %5
%10 = icmp eq i8 %9, 0
br i1 %10, label %11, label %3
11: ; preds = %3
ret i8* %0
}
/* Type definitions */
struct stat {
  int /*<<< orphan*/ st_uid;
};

/* Variables and functions */
int /*<<< orphan*/ printf(char *, int /*<<< orphan*/);
scalar_t__ stat(char *, struct stat *);
int main(void) {
  struct stat sst;
  if (stat("test.txt", &sst) == 0) {
    printf("sst.st_uid = %lu\n", sst.st_uid);
  }
  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 <stat@plt>
cmp    $0x0,%rax
jne    1158 <main+0x38>
mov    -0x8(%rbp),%esi
lea    0xeb6(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xed8(%rip),%rdi
mov    %rsp,%rsi
call   1040 <stat@plt>
test   %rax,%rax
jne    1144 <main+0x24>
mov    (%rsp),%esi
lea    0xeca(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
%struct.stat = type { i32 }
@.str = [9 x i8] c"test.txt\00"
@.str.1 = [18 x i8] c"sst.st_uid = %lu\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca %struct.stat
store i32 0, i32* %1
%3 = call i64 @stat(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), %struct.stat* %2)
%4 = icmp eq i64 %3, 0
br i1 %4, label %5, label %9
5: ; preds = %0
%6 = getelementptr inbounds %struct.stat, %struct.stat* %2, i32 0, i32 0
%7 = load i32, i32* %6
%8 = call i32 @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.1, i64 0, i64 0), i32 %7)
br label %9
9: ; preds = %5, %0
ret i32 0
}

LLVM IR (-O2):
%struct.stat = type { i32 }
@.str = [9 x i8] c"test.txt\00"
@.str.1 = [18 x i8] c"sst.st_uid = %lu\0A\00"
define i32 @main() {
%1 = alloca %struct.stat
%2 = bitcast %struct.stat* %1 to i8*
%3 = call i64 @stat(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), %struct.stat* %1)
%4 = icmp eq i64 %3, 0
br i1 %4, label %5, label %9
5: ; preds = %0
%6 = getelementptr inbounds %struct.stat, %struct.stat* %1, i64 0, i32 0
%7 = load i32, i32* %6
%8 = call i32 @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.1, i64 0, i64 0), i32 %7)
br label %9
9: ; preds = %5, %0
ret i32 0
}