xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ subsInit(int **);
int /*<<< orphan*/ subsPretty(int **);
int main(void) {
  int A[126][9];
  subsInit(A);
  subsPretty(A);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x11c0,%rsp
lea    -0x11c0(%rbp),%rdi
call   1040 <subsInit@plt>
lea    -0x11c0(%rbp),%rdi
call   1030 <subsPretty@plt>
xor    %eax,%eax
add    $0x11c0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x11c0,%rsp
mov    %rsp,%rbx
mov    %rbx,%rdi
call   1040 <subsInit@plt>
mov    %rbx,%rdi
call   1030 <subsPretty@plt>
xor    %eax,%eax
add    $0x11c0,%rsp
pop    %rbx
ret

LLVM IR (-O0):
define i32 @main() {
%1 = alloca [126 x [9 x i32]]
%2 = getelementptr inbounds [126 x [9 x i32]], [126 x [9 x i32]]* %1, i64 0, i64 0
%3 = bitcast [9 x i32]* %2 to i32**
%4 = call i32 @subsInit(i32** %3)
%5 = getelementptr inbounds [126 x [9 x i32]], [126 x [9 x i32]]* %1, i64 0, i64 0
%6 = bitcast [9 x i32]* %5 to i32**
%7 = call i32 @subsPretty(i32** %6)
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = alloca [126 x [9 x i32]]
%2 = bitcast [126 x [9 x i32]]* %1 to i8*
%3 = bitcast [126 x [9 x i32]]* %1 to i32**
%4 = call i32 @subsInit(i32** %3)
%5 = call i32 @subsPretty(i32** %3)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ point(int, int);
int dot(int x, int y, int dx, int n, char pattern) {
  point(x, y);
  return 0;
}


x86 assembly (clang, -O0):
<dot>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %r8b,%al
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    %ecx,-0x10(%rbp)
mov    %al,-0x11(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x8(%rbp),%esi
call   1030 <point@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @dot(i32 %0, i32 %1, i32 %2, i32 %3, i8 signext %4) {
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32
%10 = alloca i8
store i32 %0, i32* %6
store i32 %1, i32* %7
store i32 %2, i32* %8
store i32 %3, i32* %9
store i8 %4, i8* %10
%11 = load i32, i32* %6
%12 = load i32, i32* %7
%13 = call i32 @point(i32 %11, i32 %12)
ret i32 0
}

LLVM IR (-O2):
define i32 @dot(i32 %0, i32 %1, i32 %2, i32 %3, i8 signext %4) {
%6 = tail call i32 @point(i32 %0, i32 %1)
ret i32 0
}
/* Type definitions */
typedef scalar_t__ uint8_t;
typedef int uint16_t;

/* Variables and functions */
uint16_t ld_u16_le(const void *x) {
  return ((((uint16_t)(((uint8_t *)x)[1])) << 8) |
          ((uint16_t)(((uint8_t *)x)[0])));
}


x86 assembly (clang, -O0):
<ld_u16_le>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    0x8(%rax),%rax
shl    $0x8,%eax
mov    -0x8(%rbp),%rcx
mov    (%rcx),%rcx
or     %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<ld_u16_le>:
mov    0x8(%rdi),%eax
shl    $0x8,%eax
or     (%rdi),%eax
ret

LLVM IR (-O0):
define i32 @ld_u16_le(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = bitcast i8* %3 to i64*
%5 = getelementptr inbounds i64, i64* %4, i64 1
%6 = load i64, i64* %5
%7 = trunc i64 %6 to i32
%8 = shl i32 %7, 8
%9 = load i8*, i8** %2
%10 = bitcast i8* %9 to i64*
%11 = getelementptr inbounds i64, i64* %10, i64 0
%12 = load i64, i64* %11
%13 = trunc i64 %12 to i32
%14 = or i32 %8, %13
ret i32 %14
}

LLVM IR (-O2):
define i32 @ld_u16_le(i8* nocapture %0) {
%2 = bitcast i8* %0 to i64*
%3 = getelementptr inbounds i8, i8* %0, i64 8
%4 = bitcast i8* %3 to i64*
%5 = load i64, i64* %4
%6 = trunc i64 %5 to i32
%7 = shl i32 %6, 8
%8 = load i64, i64* %2
%9 = trunc i64 %8 to i32
%10 = or i32 %7, %9
ret i32 %10
}
/* Variables and functions */
int /*<<< orphan*/ nTNShift(int);
void IF_NTNShiftR(void) { nTNShift(1); }


x86 assembly (clang, -O0):
<IF_NTNShiftR>:
push   %rbp
mov    %rsp,%rbp
mov    $0x1,%edi
call   1030 <nTNShift@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<IF_NTNShiftR>:
mov    $0x1,%edi
jmp    1030 <nTNShift@plt>

LLVM IR (-O0):
define void @IF_NTNShiftR() {
%1 = call i32 @nTNShift(i32 1)
ret void
}

LLVM IR (-O2):
define void @IF_NTNShiftR() {
%1 = tail call i32 @nTNShift(i32 1)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ SEEK_SET;
scalar_t__ fgetc(int /*<<< orphan*/ *);
scalar_t__ fseek(int /*<<< orphan*/ *, int, int /*<<< orphan*/);
char NESGetPrgBankCount(FILE *ifile) {
  if (!ifile)
    return -1;
  if (fseek(ifile, 4, SEEK_SET) != 0) {
    return -1;
  }
  return (char)fgetc(ifile);
}


x86 assembly (clang, -O0):
<NESGetPrgBankCount>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
jne    1140 <NESGetPrgBankCount+0x20>
movb   $0xff,-0x1(%rbp)
jmp    1176 <NESGetPrgBankCount+0x56>
mov    -0x10(%rbp),%rdi
mov    0x2e95(%rip),%rax
mov    (%rax),%edx
mov    $0x4,%esi
call   1040 <fseek@plt>
cmp    $0x0,%rax
je     116a <NESGetPrgBankCount+0x4a>
movb   $0xff,-0x1(%rbp)
jmp    1176 <NESGetPrgBankCount+0x56>
mov    -0x10(%rbp),%rdi
call   1030 <fgetc@plt>
mov    %al,-0x1(%rbp)
movsbl -0x1(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<NESGetPrgBankCount>:
push   %r14
push   %rbx
push   %rax
mov    $0xff,%r14b
test   %rdi,%rdi
je     1152 <NESGetPrgBankCount+0x32>
mov    %rdi,%rbx
mov    0x2eaa(%rip),%rax
mov    (%rax),%edx
mov    $0x4,%esi
call   1040 <fseek@plt>
test   %rax,%rax
jne    1152 <NESGetPrgBankCount+0x32>
mov    %rbx,%rdi
call   1030 <fgetc@plt>
mov    %rax,%r14
mov    %r14d,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@SEEK_SET = global i32 0
define signext i8 @NESGetPrgBankCount(i32* %0) {
%2 = alloca i8
%3 = alloca i32*
store i32* %0, i32** %3
%4 = load i32*, i32** %3
%5 = icmp ne i32* %4, null
br i1 %5, label %7, label %6
6: ; preds = %1
store i8 -1, i8* %2
br label %17
7: ; preds = %1
%8 = load i32*, i32** %3
%9 = load i32, i32* @SEEK_SET
%10 = call i64 @fseek(i32* %8, i32 4, i32 %9)
%11 = icmp ne i64 %10, 0
br i1 %11, label %12, label %13
12: ; preds = %7
store i8 -1, i8* %2
br label %17
13: ; preds = %7
%14 = load i32*, i32** %3
%15 = call i64 @fgetc(i32* %14)
%16 = trunc i64 %15 to i8
store i8 %16, i8* %2
br label %17
17: ; preds = %13, %12, %6
%18 = load i8, i8* %2
ret i8 %18
}

LLVM IR (-O2):
@SEEK_SET = global i32 0
define signext i8 @NESGetPrgBankCount(i32* %0) {
%2 = icmp eq i32* %0, null
br i1 %2, label %10, label %3
3: ; preds = %1
%4 = load i32, i32* @SEEK_SET
%5 = tail call i64 @fseek(i32* %0, i32 4, i32 %4)
%6 = icmp eq i64 %5, 0
br i1 %6, label %7, label %10
7: ; preds = %3
%8 = tail call i64 @fgetc(i32* %0)
%9 = trunc i64 %8 to i8
br label %10
10: ; preds = %3, %1, %7
%11 = phi i8 [ %9, %7 ], [ -1, %1 ], [ -1, %3 ]
ret i8 %11
}
int test_imm_60int8_mem(signed char *val) {
  return ((*val) & (-0x60 << 0)) ? -20 : -40;
}


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

x86 assembly (clang, -O2):
<test_imm_60int8_mem>:
testb  $0xa0,(%rdi)
mov    $0xffffffd8,%ecx
mov    $0xffffffec,%eax
cmove  %ecx,%eax
ret

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

LLVM IR (-O2):
define i32 @test_imm_60int8_mem(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = and i8 %2, -96
%4 = icmp eq i8 %3, 0
%5 = select i1 %4, i32 -40, i32 -20
ret i32 %5
}
double logic_l(double a, double b) { return a < b; }


x86 assembly (clang, -O0):
<logic_l>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  -0x8(%rbp),%xmm1
movsd  -0x10(%rbp),%xmm0
ucomisd %xmm1,%xmm0
seta   %al
and    $0x1,%al
movzbl %al,%eax
cvtsi2sd %eax,%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<logic_l>:
cmpltsd %xmm1,%xmm0
movsd  0xef3(%rip),%xmm1
andpd  %xmm1,%xmm0
ret

LLVM IR (-O0):
define double @logic_l(double %0, double %1) {
%3 = alloca double
%4 = alloca double
store double %0, double* %3
store double %1, double* %4
%5 = load double, double* %3
%6 = load double, double* %4
%7 = fcmp olt double %5, %6
%8 = zext i1 %7 to i32
%9 = sitofp i32 %8 to double
ret double %9
}

LLVM IR (-O2):
define double @logic_l(double %0, double %1) {
%3 = fcmp olt double %0, %1
%4 = uitofp i1 %3 to double
ret double %4
}
/* Variables and functions */
scalar_t__ floor(double);
double log(double);
int intlog2(unsigned long X) {
  return (int)floor(log(1.0 * X) / log(2.0) + 0.5);
}


x86 assembly (clang, -O0):
<intlog2>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
movaps 0xeed(%rip),%xmm0
movq   -0x8(%rbp),%xmm1
punpckldq %xmm0,%xmm1
movapd 0xeec(%rip),%xmm0
subpd  %xmm0,%xmm1
movaps %xmm1,%xmm0
unpckhpd %xmm1,%xmm1
addsd  %xmm0,%xmm1
movsd  0xeb5(%rip),%xmm0
mulsd  %xmm1,%xmm0
call   1030 <log@plt>
movsd  %xmm0,-0x10(%rbp)
movsd  0xe97(%rip),%xmm0
call   1030 <log@plt>
movaps %xmm0,%xmm1
movsd  -0x10(%rbp),%xmm0
divsd  %xmm1,%xmm0
movsd  0xe76(%rip),%xmm1
addsd  %xmm1,%xmm0
call   1040 <floor@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<intlog2>:
push   %rax
movq   %rdi,%xmm1
punpckldq 0xed2(%rip),%xmm1
subpd  0xeda(%rip),%xmm1
movapd %xmm1,%xmm0
unpckhpd %xmm1,%xmm0
addsd  %xmm1,%xmm0
call   1030 <log@plt>
divsd  0xed1(%rip),%xmm0
addsd  0xed1(%rip),%xmm0
pop    %rax
jmp    1040 <floor@plt>

LLVM IR (-O0):
define i32 @intlog2(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = load i64, i64* %2
%4 = uitofp i64 %3 to double
%5 = fmul double 1.000000e+00, %4
%6 = call double @log(double %5)
%7 = call double @log(double 2.000000e+00)
%8 = fdiv double %6, %7
%9 = fadd double %8, 5.000000e-01
%10 = call i64 @floor(double %9)
%11 = trunc i64 %10 to i32
ret i32 %11
}

LLVM IR (-O2):
define i32 @intlog2(i64 %0) {
%2 = uitofp i64 %0 to double
%3 = tail call double @log(double %2)
%4 = fdiv double %3, 0x3FE62E42FEFA39EF
%5 = fadd double %4, 5.000000e-01
%6 = tail call i64 @floor(double %5)
%7 = trunc i64 %6 to i32
ret i32 %7
}
/* Variables and functions */
int /*<<< orphan*/ ft_putchar(char);
int ft_nputchar(char c, int n) {
  int i;
  i = 0;
  while (i < n) {
    ft_putchar(c);
    i += 1;
  }
  return (0);
}


x86 assembly (clang, -O0):
<ft_nputchar>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %dil,%al
mov    %al,-0x1(%rbp)
mov    %esi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
mov    -0xc(%rbp),%eax
cmp    -0x8(%rbp),%eax
jge    114b <ft_nputchar+0x3b>
movsbl -0x1(%rbp),%edi
call   1030 <ft_putchar@plt>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1128 <ft_nputchar+0x18>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ft_nputchar>:
push   %rbp
push   %rbx
push   %rax
test   %esi,%esi
jle    112c <ft_nputchar+0x1c>
mov    %esi,%ebx
movsbl %dil,%ebp
nopl   (%rax)
mov    %ebp,%edi
call   1030 <ft_putchar@plt>
add    $0xffffffff,%ebx
jne    1120 <ft_nputchar+0x10>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
define i32 @ft_nputchar(i8 signext %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
br label %6
6: ; preds = %10, %2
%7 = load i32, i32* %5
%8 = load i32, i32* %4
%9 = icmp slt i32 %7, %8
br i1 %9, label %10, label %15
10: ; preds = %6
%11 = load i8, i8* %3
%12 = call i32 @ft_putchar(i8 signext %11)
%13 = load i32, i32* %5
%14 = add nsw i32 %13, 1
store i32 %14, i32* %5
br label %6
15: ; preds = %6
ret i32 0
}

LLVM IR (-O2):
define i32 @ft_nputchar(i8 signext %0, i32 %1) {
%3 = icmp sgt i32 %1, 0
br i1 %3, label %4, label %9
4: ; preds = %2, %4
%5 = phi i32 [ %7, %4 ], [ 0, %2 ]
%6 = tail call i32 @ft_putchar(i8 signext %0)
%7 = add nuw nsw i32 %5, 1
%8 = icmp eq i32 %7, %1
br i1 %8, label %9, label %4
9: ; preds = %4, %2
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ strcpy(char *, char const *);
scalar_t__ strlen(char const *);
char *xmalloc(scalar_t__);
char *alloc_string(const char *str) {
  char *new = xmalloc(strlen(str) + 1);
  strcpy(new, str);
  return new;
}


x86 assembly (clang, -O0):
<alloc_string>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <strlen@plt>
mov    %rax,%rdi
add    $0x1,%rdi
call   1050 <xmalloc@plt>
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x8(%rbp),%rsi
call   1030 <strcpy@plt>
mov    -0x10(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<alloc_string>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%r14
call   1040 <strlen@plt>
lea    0x1(%rax),%rdi
call   1050 <xmalloc@plt>
mov    %rax,%rbx
mov    %rax,%rdi
mov    %r14,%rsi
call   1030 <strcpy@plt>
mov    %rbx,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define i8* @alloc_string(i8* %0) {
%2 = alloca i8*
%3 = alloca i8*
store i8* %0, i8** %2
%4 = load i8*, i8** %2
%5 = call i64 @strlen(i8* %4)
%6 = add nsw i64 %5, 1
%7 = call i8* @xmalloc(i64 %6)
store i8* %7, i8** %3
%8 = load i8*, i8** %3
%9 = load i8*, i8** %2
%10 = call i32 @strcpy(i8* %8, i8* %9)
%11 = load i8*, i8** %3
ret i8* %11
}

LLVM IR (-O2):
define i8* @alloc_string(i8* %0) {
%2 = tail call i64 @strlen(i8* dereferenceable(1) %0)
%3 = add nsw i64 %2, 1
%4 = tail call i8* @xmalloc(i64 %3)
%5 = tail call i32 @strcpy(i8* %4, i8* %0)
ret i8* %4
}
int(ars_d_set_tcpopt_ts)(struct ars_packet *pkt, int layer, char *f, char *v) {
  return 0;
}


x86 assembly (clang, -O0):
<ars_d_set_tcpopt_ts>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
xor    %eax,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
%struct.ars_packet = type opaque
define i32 @ars_d_set_tcpopt_ts(%struct.ars_packet* %0, i32 %1, i8* %2, i8* %3) {
%5 = alloca %struct.ars_packet*
%6 = alloca i32
%7 = alloca i8*
%8 = alloca i8*
store %struct.ars_packet* %0, %struct.ars_packet** %5
store i32 %1, i32* %6
store i8* %2, i8** %7
store i8* %3, i8** %8
ret i32 0
}

LLVM IR (-O2):
%struct.ars_packet = type opaque
define i32 @ars_d_set_tcpopt_ts(%struct.ars_packet* nocapture readnone %0, i32 %1, i8* nocapture readnone %2, i8* nocapture readnone %3) {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ assert(int);
int factorial(int);
int main() {
  assert(24 == factorial(4));
  assert(120 == factorial(5));
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
mov    $0x4,%edi
call   1030 <factorial@plt>
mov    %eax,%ecx
mov    $0x18,%eax
cmp    %ecx,%eax
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1040 <assert@plt>
mov    $0x5,%edi
call   1030 <factorial@plt>
mov    %eax,%ecx
mov    $0x78,%eax
cmp    %ecx,%eax
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1040 <assert@plt>
xor    %eax,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    $0x4,%edi
call   1030 <factorial@plt>
xor    %edi,%edi
cmp    $0x18,%eax
sete   %dil
call   1040 <assert@plt>
mov    $0x5,%edi
call   1030 <factorial@plt>
xor    %edi,%edi
cmp    $0x78,%eax
sete   %dil
call   1040 <assert@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @main() {
%1 = call i32 @factorial(i32 4)
%2 = icmp eq i32 24, %1
%3 = zext i1 %2 to i32
%4 = call i32 @assert(i32 %3)
%5 = call i32 @factorial(i32 5)
%6 = icmp eq i32 120, %5
%7 = zext i1 %6 to i32
%8 = call i32 @assert(i32 %7)
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 @factorial(i32 4)
%2 = icmp eq i32 %1, 24
%3 = zext i1 %2 to i32
%4 = tail call i32 @assert(i32 %3)
%5 = tail call i32 @factorial(i32 5)
%6 = icmp eq i32 %5, 120
%7 = zext i1 %6 to i32
%8 = tail call i32 @assert(i32 %7)
ret i32 0
}
/* Variables and functions */
int iso9660_serial(char const *, char *, int, int);
int bin_serial(const char *path, char *serial) {
  return iso9660_serial(path, serial, 0x0930, 0x18);
}


x86 assembly (clang, -O0):
<bin_serial>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    $0x930,%edx
mov    $0x18,%ecx
call   1030 <iso9660_serial@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<bin_serial>:
mov    $0x930,%edx
mov    $0x18,%ecx
jmp    1030 <iso9660_serial@plt>

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

LLVM IR (-O2):
define i32 @bin_serial(i8* %0, i8* %1) {
%3 = tail call i32 @iso9660_serial(i8* %0, i8* %1, i32 2352, i32 24)
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
int /*<<< orphan*/ stderr;
void usage(void) {
  fprintf(stderr, "usage: mktemp [-d] [-q] [-t prefix] [-u] template ...\n");
  fprintf(stderr, "       mktemp [-d] [-q] [-u] -t prefix \n");
  exit(1);
}


x86 assembly (clang, -O0):
<usage>:
push   %rbp
mov    %rsp,%rbp
mov    0x2eb5(%rip),%rax
mov    (%rax),%edi
lea    0xecc(%rip),%rsi
call   1030 <fprintf@plt>
mov    0x2ea0(%rip),%rax
mov    (%rax),%edi
lea    0xeee(%rip),%rsi
call   1030 <fprintf@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

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

LLVM IR (-O0):
@stderr = global i32 0
@.str = [55 x i8] c"usage: mktemp [-d] [-q] [-t prefix] [-u] template ...\0A\00"
@.str.1 = [41 x i8] c" mktemp [-d] [-q] [-u] -t prefix \0A\00"
define void @usage() {
%1 = load i32, i32* @stderr
%2 = call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([55 x i8], [55 x i8]* @.str, i64 0, i64 0))
%3 = load i32, i32* @stderr
%4 = call i32 @fprintf(i32 %3, i8* getelementptr inbounds ([41 x i8], [41 x i8]* @.str.1, i64 0, i64 0))
%5 = call i32 @exit(i32 1)
unreachable
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [55 x i8] c"usage: mktemp [-d] [-q] [-t prefix] [-u] template ...\0A\00"
@.str.1 = [41 x i8] c" mktemp [-d] [-q] [-u] -t prefix \0A\00"
define void @usage() {
%1 = load i32, i32* @stderr
%2 = tail call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([55 x i8], [55 x i8]* @.str, i64 0, i64 0))
%3 = load i32, i32* @stderr
%4 = tail call i32 @fprintf(i32 %3, i8* getelementptr inbounds ([41 x i8], [41 x i8]* @.str.1, i64 0, i64 0))
%5 = tail call i32 @exit(i32 1)
unreachable
}
/* Variables and functions */
int /*<<< orphan*/ bar();
int /*<<< orphan*/ foo();
int main(void) {
  bar();
  foo();
  return 0;
}


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

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1030 <bar@plt>
xor    %eax,%eax
call   1040 <foo@plt>
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @bar()
%2 = tail call i32 (...) @foo()
ret i32 0
}
int test_byteNot(int x, int n) {
  union {
    int xs;
    char b[4];
  } exp;
  exp.xs = x;
  exp.b[n] = ~exp.b[n];
  return x = exp.xs;
}


x86 assembly (clang, -O0):
<test_byteNot>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
mov    %eax,-0x10(%rbp)
movslq -0x8(%rbp),%rax
movsbl -0x10(%rbp,%rax,1),%eax
xor    $0xffffffff,%eax
mov    %al,%cl
movslq -0x8(%rbp),%rax
mov    %cl,-0x10(%rbp,%rax,1)
mov    -0x10(%rbp),%eax
mov    %eax,-0x4(%rbp)
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_byteNot>:
mov    %edi,-0x8(%rsp)
movslq %esi,%rax
notb   -0x8(%rsp,%rax,1)
mov    -0x8(%rsp),%eax
ret

LLVM IR (-O0):
%union.anon = type { i32 }
define i32 @test_byteNot(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca %union.anon
store i32 %0, i32* %3
store i32 %1, i32* %4
%6 = load i32, i32* %3
%7 = bitcast %union.anon* %5 to i32*
store i32 %6, i32* %7
%8 = bitcast %union.anon* %5 to [4 x i8]*
%9 = load i32, i32* %4
%10 = sext i32 %9 to i64
%11 = getelementptr inbounds [4 x i8], [4 x i8]* %8, i64 0, i64 %10
%12 = load i8, i8* %11
%13 = sext i8 %12 to i32
%14 = xor i32 %13, -1
%15 = trunc i32 %14 to i8
%16 = bitcast %union.anon* %5 to [4 x i8]*
%17 = load i32, i32* %4
%18 = sext i32 %17 to i64
%19 = getelementptr inbounds [4 x i8], [4 x i8]* %16, i64 0, i64 %18
store i8 %15, i8* %19
%20 = bitcast %union.anon* %5 to i32*
%21 = load i32, i32* %20
store i32 %21, i32* %3
ret i32 %21
}

LLVM IR (-O2):
%union.anon = type { i32 }
define i32 @test_byteNot(i32 %0, i32 %1) {
%3 = alloca %union.anon
%4 = bitcast %union.anon* %3 to i8*
%5 = getelementptr inbounds %union.anon, %union.anon* %3, i64 0, i32 0
store i32 %0, i32* %5
%6 = bitcast %union.anon* %3 to [4 x i8]*
%7 = sext i32 %1 to i64
%8 = getelementptr inbounds [4 x i8], [4 x i8]* %6, i64 0, i64 %7
%9 = load i8, i8* %8
%10 = xor i8 %9, -1
store i8 %10, i8* %8
%11 = load i32, i32* %5
ret i32 %11
}
/* Variables and functions */
int ls_full_strtou_b(char const *, int /*<<< orphan*/);
int /*<<< orphan*/ strlen(char const *);
__attribute__((unused)) int ls_full_strtou(const char *s) {
  return ls_full_strtou_b(s, strlen(s));
}


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

x86 assembly (clang, -O2):
<ls_full_strtou>:
push   %rbx
mov    %rdi,%rbx
call   1040 <strlen@plt>
mov    %rbx,%rdi
mov    %eax,%esi
pop    %rbx
jmp    1030 <ls_full_strtou_b@plt>

LLVM IR (-O0):
define i32 @ls_full_strtou(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = load i8*, i8** %2
%5 = call i32 @strlen(i8* %4)
%6 = call i32 @ls_full_strtou_b(i8* %3, i32 %5)
ret i32 %6
}

LLVM IR (-O2):
define i32 @ls_full_strtou(i8* %0) {
%2 = tail call i32 @strlen(i8* %0)
%3 = tail call i32 @ls_full_strtou_b(i8* %0, i32 %2)
ret i32 %3
}
int isEven(int original) { return (original % 2 == 0); }


x86 assembly (clang, -O0):
<isEven>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
cmp    $0x0,%edx
sete   %al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<isEven>:
mov    %edi,%eax
not    %eax
and    $0x1,%eax
ret

LLVM IR (-O0):
define i32 @isEven(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = srem i32 %3, 2
%5 = icmp eq i32 %4, 0
%6 = zext i1 %5 to i32
ret i32 %6
}

LLVM IR (-O2):
define i32 @isEven(i32 %0) {
%2 = and i32 %0, 1
%3 = xor i32 %2, 1
ret i32 %3
}
/* Variables and functions */
char const *getenv(char const *);
const char *sys_getenv(const char *name) { return getenv(name); }


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

x86 assembly (clang, -O2):
<sys_getenv>:
jmp    1030 <getenv@plt>

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

LLVM IR (-O2):
define i8* @sys_getenv(i8* nocapture %0) {
%2 = tail call i8* @getenv(i8* %0)
ret i8* %2
}
int test_imm_18uint8_mem(unsigned char *val) {
  return ((*val) & (-0x18 << 0)) ? -20 : -40;
}


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

x86 assembly (clang, -O2):
<test_imm_18uint8_mem>:
testb  $0xe8,(%rdi)
mov    $0xffffffd8,%ecx
mov    $0xffffffec,%eax
cmove  %ecx,%eax
ret

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

LLVM IR (-O2):
define i32 @test_imm_18uint8_mem(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = and i8 %2, -24
%4 = icmp eq i8 %3, 0
%5 = select i1 %4, i32 -40, i32 -20
ret i32 %5
}
/* Type definitions */
typedef int /*<<< orphan*/ mode_t;

/* Variables and functions */
int __get_array_size(char const *);
int __infer_nondet_int();
int mkdir(const char *filename, mode_t mode) {
  int size;
  int ret;
  size = __get_array_size(filename);
  ret = __infer_nondet_int();
  if (ret < -1 || ret > 0)
    while (1)
      ;
  return ret;
}


x86 assembly (clang, -O0):
<mkdir>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <__get_array_size@plt>
mov    %eax,-0x10(%rbp)
mov    $0x0,%al
call   1030 <__infer_nondet_int@plt>
mov    %eax,-0x14(%rbp)
cmpl   $0xffffffff,-0x14(%rbp)
jl     1159 <mkdir+0x39>
cmpl   $0x0,-0x14(%rbp)
jle    1163 <mkdir+0x43>
jmp    115e <mkdir+0x3e>
jmp    115e <mkdir+0x3e>
mov    -0x14(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<mkdir>:
push   %rax
call   1040 <__get_array_size@plt>
xor    %eax,%eax
call   1030 <__infer_nondet_int@plt>
lea    -0x1(%rax),%ecx
cmp    $0xfffffffd,%ecx
ja     1142 <mkdir+0x22>
cs nopw 0x0(%rax,%rax,1)
nop
jmp    1140 <mkdir+0x20>
pop    %rcx
ret

LLVM IR (-O0):
define i32 @mkdir(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
store i8* %0, i8** %3
store i32 %1, i32* %4
%7 = load i8*, i8** %3
%8 = call i32 @__get_array_size(i8* %7)
store i32 %8, i32* %5
%9 = call i32 (...) @__infer_nondet_int()
store i32 %9, i32* %6
%10 = load i32, i32* %6
%11 = icmp slt i32 %10, -1
br i1 %11, label %15, label %12
12: ; preds = %2
%13 = load i32, i32* %6
%14 = icmp sgt i32 %13, 0
br i1 %14, label %15, label %17
15: ; preds = %12, %2
br label %16
16: ; preds = %15, %16
br label %16
17: ; preds = %12
%18 = load i32, i32* %6
ret i32 %18
}

LLVM IR (-O2):
define i32 @mkdir(i8* %0, i32 %1) {
%3 = tail call i32 @__get_array_size(i8* %0)
%4 = tail call i32 (...) @__infer_nondet_int()
%5 = add i32 %4, -1
%6 = icmp ult i32 %5, -2
br i1 %6, label %7, label %8
7: ; preds = %2, %7
br label %7
8: ; preds = %2
ret i32 %4
}
void nseel_asm_above(void) {
  __asm__("fcompp\n"
          "fstsw %ax\n"
          "andl $1280, %eax\n");
}


x86 assembly (clang, -O0):
<nseel_asm_above>:
push   %rbp
mov    %rsp,%rbp
fcompp
fstsw  %ax
and    $0x500,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<nseel_asm_above>:
fcompp
fstsw  %ax
and    $0x500,%eax
ret

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

LLVM IR (-O2):
define void @nseel_asm_above() {
tail call void asm sideeffect "fcompp\0Afstsw %ax\0Aandl $$1280, %eax\0A", "~{dirflag},~{fpsr},~{flags}"()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char const *, size_t, size_t, char const *);
void onMarkLink(const char *text, size_t start, size_t end,
                void *callbackContext) {
  printf("MARK LINK: [%s] (%zu, %zu) [%s]\n", text, start, end,
         (const char *)callbackContext);
}


x86 assembly (clang, -O0):
<onMarkLink>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    -0x8(%rbp),%rsi
mov    -0x10(%rbp),%rdx
mov    -0x18(%rbp),%rcx
mov    -0x20(%rbp),%r8
lea    0xec1(%rip),%rdi
call   1030 <printf@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<onMarkLink>:
mov    %rcx,%r8
mov    %rdx,%rcx
mov    %rsi,%rdx
mov    %rdi,%rsi
lea    0xedd(%rip),%rdi
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [33 x i8] c"MARK LINK: [%s] (%zu, %zu) [%s]\0A\00"
define void @onMarkLink(i8* %0, i64 %1, i64 %2, i8* %3) {
%5 = alloca i8*
%6 = alloca i64
%7 = alloca i64
%8 = alloca i8*
store i8* %0, i8** %5
store i64 %1, i64* %6
store i64 %2, i64* %7
store i8* %3, i8** %8
%9 = load i8*, i8** %5
%10 = load i64, i64* %6
%11 = load i64, i64* %7
%12 = load i8*, i8** %8
%13 = call i32 @printf(i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str, i64 0, i64 0), i8* %9, i64 %10, i64 %11, i8* %12)
ret void
}

LLVM IR (-O2):
@.str = [33 x i8] c"MARK LINK: [%s] (%zu, %zu) [%s]\0A\00"
define void @onMarkLink(i8* %0, i64 %1, i64 %2, i8* %3) {
%5 = tail call i32 @printf(i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str, i64 0, i64 0), i8* %0, i64 %1, i64 %2, i8* %3)
ret void
}
void null_show_sensor(void *ui, const char *title, struct aq_sensor *sen) {}


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

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

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

LLVM IR (-O2):
%struct.aq_sensor = type opaque
define void @null_show_sensor(i8* nocapture %0, i8* nocapture %1, %struct.aq_sensor* nocapture %2) {
ret void
}
void foo102(int p) {}


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

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

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

LLVM IR (-O2):
define void @foo102(i32 %0) {
ret void
}
/* Variables and functions */
char *rtrim(char *);
char *timlib_rtrim(char *buffer) { return rtrim(buffer); }


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

x86 assembly (clang, -O2):
<timlib_rtrim>:
jmp    1030 <rtrim@plt>

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

LLVM IR (-O2):
define i8* @timlib_rtrim(i8* %0) {
%2 = tail call i8* @rtrim(i8* %0)
ret i8* %2
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char *);
void printstrings(char **ss, int n) {
  int k;
  for (k = 0; k < n; ++k) {
    printf("%s\n", ss[k]);
  }
}


x86 assembly (clang, -O0):
<printstrings>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
movl   $0x0,-0x10(%rbp)
mov    -0x10(%rbp),%eax
cmp    -0xc(%rbp),%eax
jge    1158 <printstrings+0x48>
mov    -0x8(%rbp),%rax
movslq -0x10(%rbp),%rcx
mov    (%rax,%rcx,8),%rsi
lea    0xebb(%rip),%rdi
call   1030 <printf@plt>
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    1126 <printstrings+0x16>
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
@.str = [4 x i8] c"%s\0A\00"
define void @printstrings(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
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 ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %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 = [4 x i8] c"%s\0A\00"
define void @printstrings(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 ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %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
}
/* Variables and functions */
int /*<<< orphan*/ mat3d_rotateEuler_new(double *, double, double, double,
                                         char const *);
int /*<<< orphan*/ mat4d_from_mat3d(double *, double *);
void mat4d_rotateEuler_new(double result[16], double a1_degrees,
                           double a2_degrees, double a3_degrees,
                           const char order[3]) {
  double tmpMat[9];
  mat3d_rotateEuler_new(tmpMat, a1_degrees, a2_degrees, a3_degrees, order);
  mat4d_from_mat3d(result, tmpMat);
}


x86 assembly (clang, -O0):
<mat4d_rotateEuler_new>:
push   %rbp
mov    %rsp,%rbp
sub    $0x70,%rsp
mov    %rdi,-0x8(%rbp)
movsd  %xmm0,-0x10(%rbp)
movsd  %xmm1,-0x18(%rbp)
movsd  %xmm2,-0x20(%rbp)
mov    %rsi,-0x28(%rbp)
lea    -0x70(%rbp),%rdi
movsd  -0x10(%rbp),%xmm0
movsd  -0x18(%rbp),%xmm1
movsd  -0x20(%rbp),%xmm2
mov    -0x28(%rbp),%rsi
call   1040 <mat3d_rotateEuler_new@plt>
mov    -0x8(%rbp),%rdi
lea    -0x70(%rbp),%rsi
call   1030 <mat4d_from_mat3d@plt>
add    $0x70,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<mat4d_rotateEuler_new>:
push   %r14
push   %rbx
sub    $0x48,%rsp
mov    %rdi,%rbx
mov    %rsp,%r14
mov    %r14,%rdi
call   1040 <mat3d_rotateEuler_new@plt>
mov    %rbx,%rdi
mov    %r14,%rsi
call   1030 <mat4d_from_mat3d@plt>
add    $0x48,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define void @mat4d_rotateEuler_new(double* %0, double %1, double %2, double %3, i8* %4) {
%6 = alloca double*
%7 = alloca double
%8 = alloca double
%9 = alloca double
%10 = alloca i8*
%11 = alloca [9 x double]
store double* %0, double** %6
store double %1, double* %7
store double %2, double* %8
store double %3, double* %9
store i8* %4, i8** %10
%12 = getelementptr inbounds [9 x double], [9 x double]* %11, i64 0, i64 0
%13 = load double, double* %7
%14 = load double, double* %8
%15 = load double, double* %9
%16 = load i8*, i8** %10
%17 = call i32 @mat3d_rotateEuler_new(double* %12, double %13, double %14, double %15, i8* %16)
%18 = load double*, double** %6
%19 = getelementptr inbounds [9 x double], [9 x double]* %11, i64 0, i64 0
%20 = call i32 @mat4d_from_mat3d(double* %18, double* %19)
ret void
}

LLVM IR (-O2):
define void @mat4d_rotateEuler_new(double* %0, double %1, double %2, double %3, i8* %4) {
%6 = alloca [9 x double]
%7 = bitcast [9 x double]* %6 to i8*
%8 = getelementptr inbounds [9 x double], [9 x double]* %6, i64 0, i64 0
%9 = call i32 @mat3d_rotateEuler_new(double* %8, double %1, double %2, double %3, i8* %4)
%10 = call i32 @mat4d_from_mat3d(double* %0, double* %8)
ret void
}
struct node *create_list() {
  return 0;
}


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

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

LLVM IR (-O0):
%struct.node = type opaque
define %struct.node* @create_list() {
ret %struct.node* null
}

LLVM IR (-O2):
%struct.node = type opaque
define noalias %struct.node* @create_list() {
ret %struct.node* null
}
void free_mat(double **m, int x) {
  int i;
  for (i = 0; i < x; ++i)
    free(m[i]);
  free(m);
}


x86 assembly (clang, -O0):
<free_mat>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
movl   $0x0,-0x10(%rbp)
mov    -0x10(%rbp),%eax
cmp    -0xc(%rbp),%eax
jge    1151 <free_mat+0x41>
mov    -0x8(%rbp),%rax
movslq -0x10(%rbp),%rcx
mov    (%rax,%rcx,8),%rdi
call   1030 <free@plt>
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    1126 <free_mat+0x16>
mov    -0x8(%rbp),%rdi
call   1030 <free@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<free_mat>:
push   %r15
push   %r14
push   %rbx
mov    %rdi,%r14
test   %esi,%esi
jle    1142 <free_mat+0x32>
mov    %esi,%r15d
xor    %ebx,%ebx
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
mov    (%r14,%rbx,8),%rdi
call   1030 <free@plt>
add    $0x1,%rbx
cmp    %rbx,%r15
jne    1130 <free_mat+0x20>
mov    %r14,%rdi
pop    %rbx
pop    %r14
pop    %r15
jmp    1030 <free@plt>

LLVM IR (-O0):
define void @free_mat(double** %0, i32 %1) {
%3 = alloca double**
%4 = alloca i32
%5 = alloca i32
store double** %0, double*** %3
store i32 %1, i32* %4
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 double**, double*** %3
%12 = load i32, i32* %5
%13 = sext i32 %12 to i64
%14 = getelementptr inbounds double*, double** %11, i64 %13
%15 = load double*, double** %14
%16 = bitcast double* %15 to i8*
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
%21 = load double**, double*** %3
%22 = bitcast double** %21 to i8*
ret void
}

LLVM IR (-O2):
define void @free_mat(double** 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 double*, double** %0, i64 %7
%9 = bitcast double** %8 to i8**
%10 = load i8*, i8** %9
tail call void @free(i8* %10)
%11 = add nuw nsw i64 %7, 1
%12 = icmp eq i64 %11, %5
br i1 %12, label %13, label %6
13: ; preds = %6, %2
%14 = bitcast double** %0 to i8*
tail call void @free(i8* %14)
ret void
}
/* Forward declarations */
typedef struct TYPE_2__ TYPE_1__;

/* Type definitions */
struct TYPE_2__ {
  int new;
};
typedef TYPE_1__ XColormapEvent;

/* Variables and functions */
void set_XColormapEvent_new(void *_p, int _v) {
  ((XColormapEvent *)_p)->new = (int)_v;
}


x86 assembly (clang, -O0):
<set_XColormapEvent_new>:
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_XColormapEvent_new>:
mov    %esi,(%rdi)
ret

LLVM IR (-O0):
%struct.TYPE_2__ = type { i32 }
define void @set_XColormapEvent_new(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_XColormapEvent_new(i8* nocapture writeonly %0, i32 %1) {
%3 = bitcast i8* %0 to i32*
store i32 %1, i32* %3
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char *);
int /*<<< orphan*/ scanf(char *, int *);
int main() {
  int number;
  scanf("%d", &number);
  printf("The year you entered is a %s year",
         number % 4 == 0 ? "leap" : "normal");
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    0xed1(%rip),%rdi
lea    -0x4(%rbp),%rsi
call   1040 <scanf@plt>
mov    -0x4(%rbp),%eax
mov    $0x4,%ecx
cltd
idiv   %ecx
lea    0xee0(%rip),%rsi
lea    0xed4(%rip),%rax
cmp    $0x0,%edx
cmove  %rax,%rsi
lea    0xea4(%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
lea    0x4(%rsp),%rsi
call   1040 <scanf@plt>
testb  $0x3,0x4(%rsp)
lea    0xee7(%rip),%rax
lea    0xee5(%rip),%rsi
cmove  %rax,%rsi
lea    0xeb3(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [3 x i8] c"%d\00"
@.str.1 = [34 x i8] c"The year you entered is a %s year\00"
@.str.2 = [5 x i8] c"leap\00"
@.str.3 = [7 x i8] c"normal\00"
define i32 @main() {
%1 = alloca i32
%2 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %1)
%3 = load i32, i32* %1
%4 = srem i32 %3, 4
%5 = icmp eq i32 %4, 0
%6 = zext i1 %5 to i64
%7 = select i1 %5, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.3, i64 0, i64 0)
%8 = call i32 @printf(i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str.1, i64 0, i64 0), i8* %7)
ret i32 0
}

LLVM IR (-O2):
@.str = [3 x i8] c"%d\00"
@.str.1 = [34 x i8] c"The year you entered is a %s year\00"
@.str.2 = [5 x i8] c"leap\00"
@.str.3 = [7 x i8] c"normal\00"
define i32 @main() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
%3 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %1)
%4 = load i32, i32* %1
%5 = and i32 %4, 3
%6 = icmp eq i32 %5, 0
%7 = select i1 %6, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.3, i64 0, i64 0)
%8 = call i32 @printf(i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str.1, i64 0, i64 0), i8* %7)
ret i32 0
}
int icomp(p1, p2)
int *p1, *p2;
{ return (*p1 - *p2); }


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

x86 assembly (clang, -O2):
<icomp>:
mov    (%rdi),%eax
sub    (%rsi),%eax
ret

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

LLVM IR (-O2):
define i32 @icomp(i32* nocapture %0, i32* nocapture %1) {
%3 = load i32, i32* %0
%4 = load i32, i32* %1
%5 = sub nsw i32 %3, %4
ret i32 %5
}
__attribute__((__no__)) void
do_nothing_packed_dynamic_all(struct test_packed *ptr) {
  if ((unsigned long)ptr > 0x2)
    return;
  else
    return;
}


x86 assembly (clang, -O0):
<do_nothing_packed_dynamic_all>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
cmp    $0x2,%rax
jbe    111b <do_nothing_packed_dynamic_all+0x1b>
jmp    1120 <do_nothing_packed_dynamic_all+0x20>
jmp    1120 <do_nothing_packed_dynamic_all+0x20>
pop    %rbp
ret

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

LLVM IR (-O0):
%struct.test_packed = type opaque
define void @do_nothing_packed_dynamic_all(%struct.test_packed* %0) {
%2 = alloca %struct.test_packed*
store %struct.test_packed* %0, %struct.test_packed** %2
%3 = load %struct.test_packed*, %struct.test_packed** %2
%4 = ptrtoint %struct.test_packed* %3 to i64
%5 = icmp ugt i64 %4, 2
br i1 %5, label %6, label %7
6: ; preds = %1
br label %8
7: ; preds = %1
br label %8
8: ; preds = %7, %6
ret void
}

LLVM IR (-O2):
%struct.test_packed = type opaque
define void @do_nothing_packed_dynamic_all(%struct.test_packed* nocapture %0) {
ret void
}
int xdtoi(c)
register int c;
{
  if (isdigit(c))
    return c - '0';
  else if (islower(c))
    return c - 'a' + 10;
  else
    return c - 'A' + 10;
}


x86 assembly (clang, -O0):
<xdtoi>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
mov    -0x8(%rbp),%edi
call   1030 <isdigit@plt>
cmp    $0x0,%eax
je     114a <xdtoi+0x2a>
mov    -0x8(%rbp),%eax
sub    $0x30,%eax
mov    %eax,-0x4(%rbp)
jmp    1178 <xdtoi+0x58>
mov    -0x8(%rbp),%edi
call   1040 <islower@plt>
cmp    $0x0,%eax
je     116c <xdtoi+0x4c>
mov    -0x8(%rbp),%eax
sub    $0x61,%eax
add    $0xa,%eax
mov    %eax,-0x4(%rbp)
jmp    1178 <xdtoi+0x58>
mov    -0x8(%rbp),%eax
sub    $0x41,%eax
add    $0xa,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<xdtoi>:
push   %rbx
mov    %edi,%ebx
lea    -0x30(%rbx),%eax
cmp    $0xa,%eax
jb     1130 <xdtoi+0x20>
mov    %ebx,%edi
call   1030 <islower@plt>
test   %eax,%eax
je     112b <xdtoi+0x1b>
add    $0xffffffa9,%ebx
jmp    112e <xdtoi+0x1e>
add    $0xffffffc9,%ebx
mov    %ebx,%eax
pop    %rbx
ret

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

LLVM IR (-O2):
define i32 @xdtoi(i32 %0) {
%2 = add i32 %0, -48
%3 = icmp ult i32 %2, 10
br i1 %3, label %11, label %4
4: ; preds = %1
%5 = tail call i32 @islower(i32 %0)
%6 = icmp eq i32 %5, 0
br i1 %6, label %9, label %7
7: ; preds = %4
%8 = add nsw i32 %0, -87
br label %11
9: ; preds = %4
%10 = add nsw i32 %0, -55
br label %11
11: ; preds = %1, %9, %7
%12 = phi i32 [ %8, %7 ], [ %10, %9 ], [ %2, %1 ]
ret i32 %12
}
/* Variables and functions */
int /*<<< orphan*/ SIGALRM;
int /*<<< orphan*/ signal(int /*<<< orphan*/, int (*)());
wakeup() { signal(SIGALRM, wakeup); }


x86 assembly (clang, -O0):
<wakeup>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    0x2ec9(%rip),%rax
mov    (%rax),%edi
mov    0x2ea8(%rip),%rsi
call   1030 <signal@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<wakeup>:
mov    0x2ed1(%rip),%rax
mov    (%rax),%edi
mov    0x2eb0(%rip),%rsi
jmp    1030 <signal@plt>

LLVM IR (-O0):
@SIGALRM = global i32 0
define i32 @wakeup() {
%1 = alloca i32
%2 = load i32, i32* @SIGALRM
%3 = call i32 @signal(i32 %2, i32 (...)* bitcast (i32 ()* @wakeup to i32 (...)*))
%4 = load i32, i32* %1
ret i32 %4
}

LLVM IR (-O2):
@SIGALRM = global i32 0
define i32 @wakeup() {
%1 = load i32, i32* @SIGALRM
%2 = tail call i32 @signal(i32 %1, i32 (...)* bitcast (i32 ()* @wakeup to i32 (...)*))
ret i32 undef
}
void HdcpReleaseGlobDefault(void *glob) {}


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

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

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

LLVM IR (-O2):
define void @HdcpReleaseGlobDefault(i8* nocapture %0) {
ret void
}
__attribute__((always_)) int pm_runtime_resume(struct device *dev) { return 0; }


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

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

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

LLVM IR (-O2):
%struct.device = type opaque
define i32 @pm_runtime_resume(%struct.device* nocapture readnone %0) {
ret i32 0
}
void RTTestIFailedV(void) {}


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

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

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

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


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

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

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

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