xunge/DecIR huggingface dataset:
/* Type definitions */
struct option {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ output_longopts(struct option const *);
int /*<<< orphan*/ output_optstring(char const *);
int /*<<< orphan*/ printf(char *, char const *);
int getopt_long_only(int argc, char *const argv[], const char *optstring,
                     const struct option *longopts, int *longindex) {
  printf("# getopt_long_only() optstring = %s\n", optstring);
  output_optstring(optstring);
  output_longopts(longopts);
  return -1;
}


x86 assembly (clang, -O0):
<getopt_long_only>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    %r8,-0x28(%rbp)
mov    -0x18(%rbp),%rsi
lea    0xeaa(%rip),%rdi
call   1040 <printf@plt>
mov    -0x18(%rbp),%rdi
call   1030 <output_optstring@plt>
mov    -0x20(%rbp),%rdi
call   1050 <output_longopts@plt>
mov    $0xffffffff,%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<getopt_long_only>:
push   %r14
push   %rbx
push   %rax
mov    %rcx,%r14
mov    %rdx,%rbx
lea    0xebf(%rip),%rdi
mov    %rdx,%rsi
call   1040 <printf@plt>
mov    %rbx,%rdi
call   1030 <output_optstring@plt>
mov    %r14,%rdi
call   1050 <output_longopts@plt>
mov    $0xffffffff,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
%struct.option = type { i32 }
@.str = [37 x i8] c"# getopt_long_only() optstring = %s\0A\00"
define i32 @getopt_long_only(i32 %0, i8** %1, i8* %2, %struct.option* %3, i32* %4) {
%6 = alloca i32
%7 = alloca i8**
%8 = alloca i8*
%9 = alloca %struct.option*
%10 = alloca i32*
store i32 %0, i32* %6
store i8** %1, i8*** %7
store i8* %2, i8** %8
store %struct.option* %3, %struct.option** %9
store i32* %4, i32** %10
%11 = load i8*, i8** %8
%12 = call i32 @printf(i8* getelementptr inbounds ([37 x i8], [37 x i8]* @.str, i64 0, i64 0), i8* %11)
%13 = load i8*, i8** %8
%14 = call i32 @output_optstring(i8* %13)
%15 = load %struct.option*, %struct.option** %9
%16 = call i32 @output_longopts(%struct.option* %15)
ret i32 -1
}

LLVM IR (-O2):
%struct.option = type { i32 }
@.str = [37 x i8] c"# getopt_long_only() optstring = %s\0A\00"
define i32 @getopt_long_only(i32 %0, i8** nocapture readnone %1, i8* %2, %struct.option* %3, i32* nocapture readnone %4) {
%6 = tail call i32 @printf(i8* getelementptr inbounds ([37 x i8], [37 x i8]* @.str, i64 0, i64 0), i8* %2)
%7 = tail call i32 @output_optstring(i8* %2)
%8 = tail call i32 @output_longopts(%struct.option* %3)
ret i32 -1
}
/* Variables and functions */
int /*<<< orphan*/ evilfunction(char *);
int main(int argc, char **argv) {
  evilfunction(argv[1]);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
call   1030 <evilfunction@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    0x8(%rsi),%rdi
call   1030 <evilfunction@plt>
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = getelementptr inbounds i8*, i8** %1, i64 1
%4 = load i8*, i8** %3
%5 = tail call i32 @evilfunction(i8* %4)
ret i32 0
}
/* Variables and functions */
int rom_present(char *);
int dtc5150x_available(void) {
  return (rom_present(L"roms/hdd/mfm_xebec/dtc_cxd21a.bin"));
}


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

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

LLVM IR (-O0):
@.str = [34 x i32] [i32 114, i32 111, i32 109, i32 115, i32 47, i32 104, i32 100, i32 100, i32 47, i32 109, i32 102, i32 109, i32 95, i32 120, i32 101, i32 98, i32 101, i32 99, i32 47, i32 100, i32 116, i32 99, i32 95, i32 99, i32 120, i32 100, i32 50, i32 49, i32 97, i32 46, i32 98, i32 105, i32 110, i32 0]
define i32 @dtc5150x_available() {
%1 = call i32 @rom_present(i8* bitcast ([34 x i32]* @.str to i8*))
ret i32 %1
}

LLVM IR (-O2):
@.str = [34 x i32] [i32 114, i32 111, i32 109, i32 115, i32 47, i32 104, i32 100, i32 100, i32 47, i32 109, i32 102, i32 109, i32 95, i32 120, i32 101, i32 98, i32 101, i32 99, i32 47, i32 100, i32 116, i32 99, i32 95, i32 99, i32 120, i32 100, i32 50, i32 49, i32 97, i32 46, i32 98, i32 105, i32 110, i32 0]
define i32 @dtc5150x_available() {
%1 = tail call i32 @rom_present(i8* bitcast ([34 x i32]* @.str to i8*))
ret i32 %1
}
/* Variables and functions */
int /*<<< orphan*/ ENOSYS;
int /*<<< orphan*/ errno;
int __attribute__((weak)) pause(void) {
  errno = ENOSYS;
  return -1;
}


x86 assembly (clang, -O0):
<pause>:
push   %rbp
mov    %rsp,%rbp
mov    0x2edd(%rip),%rax
mov    (%rax),%ecx
mov    0x2ec4(%rip),%rax
mov    %ecx,(%rax)
mov    $0xffffffff,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<pause>:
mov    0x2ee1(%rip),%rax
mov    (%rax),%eax
mov    0x2ec8(%rip),%rcx
mov    %eax,(%rcx)
mov    $0xffffffff,%eax
ret

LLVM IR (-O0):
@ENOSYS = global i32 0
@errno = global i32 0
define weak i32 @pause() {
%1 = load i32, i32* @ENOSYS
store i32 %1, i32* @errno
ret i32 -1
}

LLVM IR (-O2):
@ENOSYS = global i32 0
@errno = global i32 0
define weak i32 @pause() {
%1 = load i32, i32* @ENOSYS
store i32 %1, i32* @errno
ret i32 -1
}
int _test_song_select(void *buffer) {
  return ((unsigned char *)buffer)[0] == 0xf3;
}


x86 assembly (clang, -O0):
<_test_song_select>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movzbl (%rax),%eax
cmp    $0xf3,%eax
sete   %al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<_test_song_select>:
xor    %eax,%eax
cmpb   $0xf3,(%rdi)
sete   %al
ret

LLVM IR (-O0):
define i32 @_test_song_select(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = getelementptr inbounds i8, i8* %3, i64 0
%5 = load i8, i8* %4
%6 = zext i8 %5 to i32
%7 = icmp eq i32 %6, 243
%8 = zext i1 %7 to i32
ret i32 %8
}

LLVM IR (-O2):
define i32 @_test_song_select(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = icmp eq i8 %2, -13
%4 = zext i1 %3 to i32
ret i32 %4
}
unsigned short inw(unsigned short portnum) {
  unsigned short _v;
  asm("inw %1,%0" : "=a"(_v) : "d"(portnum));
  return _v;
}


x86 assembly (clang, -O0):
<inw>:
push   %rbp
mov    %rsp,%rbp
mov    %di,%ax
mov    %ax,-0x2(%rbp)
mov    -0x2(%rbp),%dx
in     (%dx),%ax
mov    %ax,-0x4(%rbp)
movzwl -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<inw>:
mov    %edi,%edx
in     (%dx),%ax
ret

LLVM IR (-O0):
define zeroext i16 @inw(i16 zeroext %0) {
%2 = alloca i16
%3 = alloca i16
store i16 %0, i16* %2
%4 = load i16, i16* %2
%5 = call i16 asm "inw $1,$0", "={ax},{dx},~{dirflag},~{fpsr},~{flags}"(i16 %4)
store i16 %5, i16* %3
%6 = load i16, i16* %3
ret i16 %6
}

LLVM IR (-O2):
define zeroext i16 @inw(i16 zeroext %0) {
%2 = tail call i16 asm "inw $1,$0", "={ax},{dx},~{dirflag},~{fpsr},~{flags}"(i16 %0)
ret i16 %2
}
/* Variables and functions */
long long roundl(long double);
long long int llroundl(long double x) { return roundl(x); }


x86 assembly (clang, -O0):
<llroundl>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
fldt   0x10(%rbp)
fstpt  -0x10(%rbp)
fldt   -0x10(%rbp)
mov    %rsp,%rax
fstpt  (%rax)
call   1030 <roundl@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<llroundl>:
jmp    1030 <roundl@plt>

LLVM IR (-O0):
define i64 @llroundl(x86_fp80 %0) {
%2 = alloca x86_fp80
store x86_fp80 %0, x86_fp80* %2
%3 = load x86_fp80, x86_fp80* %2
%4 = call i64 @roundl(x86_fp80 %3)
ret i64 %4
}

LLVM IR (-O2):
define i64 @llroundl(x86_fp80 %0) {
%2 = tail call i64 @roundl(x86_fp80 %0)
ret i64 %2
}
/* Type definitions */
struct product {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void product_do_something(struct product *product) {
  printf("product::do_something()\n");
}


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

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

LLVM IR (-O0):
%struct.product = type { i32 }
@.str = [25 x i8] c"product::do_something()\0A\00"
define void @product_do_something(%struct.product* %0) {
%2 = alloca %struct.product*
store %struct.product* %0, %struct.product** %2
%3 = call i32 @printf(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
%struct.product = type { i32 }
@str = [24 x i8] c"product::do_something()\00"
define void @product_do_something(%struct.product* nocapture readnone %0) {
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([24 x i8], [24 x i8]* @str, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ perr_exit(char *);
int socket(int, int, int);
int Socket(int family, int type, int protocol) {
  int n;
  if ((n = socket(family, type, protocol)) < 0)
    perr_exit("socket error");
  return n;
}


x86 assembly (clang, -O0):
<Socket>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x8(%rbp),%esi
mov    -0xc(%rbp),%edx
call   1040 <socket@plt>
mov    %eax,-0x10(%rbp)
cmp    $0x0,%eax
jge    1157 <Socket+0x37>
lea    0xeae(%rip),%rdi
call   1030 <perr_exit@plt>
mov    -0x10(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Socket>:
push   %rbx
call   1040 <socket@plt>
mov    %eax,%ebx
test   %eax,%eax
jns    1138 <Socket+0x18>
lea    0xecd(%rip),%rdi
call   1030 <perr_exit@plt>
mov    %ebx,%eax
pop    %rbx
ret

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

LLVM IR (-O2):
@.str = [13 x i8] c"socket error\00"
define i32 @Socket(i32 %0, i32 %1, i32 %2) {
%4 = tail call i32 @socket(i32 %0, i32 %1, i32 %2)
%5 = icmp slt i32 %4, 0
br i1 %5, label %6, label %8
6: ; preds = %3
%7 = tail call i32 @perr_exit(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0))
br label %8
8: ; preds = %6, %3
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ initializeMap();
int main() {
  initializeMap();
  return 0;
}


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

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

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

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @initializeMap()
ret i32 0
}
float quartic_ease_out(float p) {
  float f = (p - 1.0f);
  return f * f * f * (1.0f - p) + 1.0f;
}


x86 assembly (clang, -O0):
<quartic_ease_out>:
push   %rbp
mov    %rsp,%rbp
movss  %xmm0,-0x4(%rbp)
movss  -0x4(%rbp),%xmm0
movss  0xeea(%rip),%xmm1
subss  %xmm1,%xmm0
movss  %xmm0,-0x8(%rbp)
movss  -0x8(%rbp),%xmm0
mulss  -0x8(%rbp),%xmm0
mulss  -0x8(%rbp),%xmm0
movss  0xeca(%rip),%xmm1
subss  -0x4(%rbp),%xmm1
mulss  %xmm1,%xmm0
movss  0xeb9(%rip),%xmm1
addss  %xmm1,%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<quartic_ease_out>:
movss  0xef8(%rip),%xmm1
addss  %xmm0,%xmm1
movaps %xmm1,%xmm2
mulss  %xmm1,%xmm2
mulss  %xmm1,%xmm2
movss  0xee5(%rip),%xmm3
movaps %xmm3,%xmm1
subss  %xmm0,%xmm1
mulss  %xmm2,%xmm1
addss  %xmm3,%xmm1
movaps %xmm1,%xmm0
ret

LLVM IR (-O0):
define float @quartic_ease_out(float %0) {
%2 = alloca float
%3 = alloca float
store float %0, float* %2
%4 = load float, float* %2
%5 = fsub float %4, 1.000000e+00
store float %5, float* %3
%6 = load float, float* %3
%7 = load float, float* %3
%8 = fmul float %6, %7
%9 = load float, float* %3
%10 = fmul float %8, %9
%11 = load float, float* %2
%12 = fsub float 1.000000e+00, %11
%13 = call float @llvm.fmuladd.f32(float %10, float %12, float 1.000000e+00)
ret float %13
}

LLVM IR (-O2):
define float @quartic_ease_out(float %0) {
%2 = fadd float %0, -1.000000e+00
%3 = fmul float %2, %2
%4 = fmul float %2, %3
%5 = fsub float 1.000000e+00, %0
%6 = tail call float @llvm.fmuladd.f32(float %4, float %5, float 1.000000e+00)
ret float %6
}
void gtk_text_buffer_new() {}


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

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

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

LLVM IR (-O2):
define void @gtk_text_buffer_new() {
ret void
}
void ClockHandler(int sig) {}


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

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

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

LLVM IR (-O2):
define void @ClockHandler(i32 %0) {
ret void
}
/* Variables and functions */
int jac_jacobi_zeros(double *, int const, double, double);
int jac_zeros_grjm(double *z, const int Q, double alpha, double beta) {
  z[0] = -1.0;
  return jac_jacobi_zeros(z + 1, Q - 1, alpha, beta + 1.0);
}


x86 assembly (clang, -O0):
<jac_zeros_grjm>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
movsd  %xmm0,-0x18(%rbp)
movsd  %xmm1,-0x20(%rbp)
mov    -0x8(%rbp),%rax
movsd  0xed3(%rip),%xmm0
movsd  %xmm0,(%rax)
mov    -0x8(%rbp),%rdi
add    $0x8,%rdi
mov    -0xc(%rbp),%esi
sub    $0x1,%esi
movsd  -0x18(%rbp),%xmm0
movsd  0xeac(%rip),%xmm1
addsd  -0x20(%rbp),%xmm1
call   1030 <jac_jacobi_zeros@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<jac_zeros_grjm>:
movabs $0xbff0000000000000,%rax
mov    %rax,(%rdi)
add    $0x8,%rdi
add    $0xffffffff,%esi
addsd  0xed4(%rip),%xmm1
jmp    1030 <jac_jacobi_zeros@plt>

LLVM IR (-O0):
define i32 @jac_zeros_grjm(double* %0, i32 %1, double %2, double %3) {
%5 = alloca double*
%6 = alloca i32
%7 = alloca double
%8 = alloca double
store double* %0, double** %5
store i32 %1, i32* %6
store double %2, double* %7
store double %3, double* %8
%9 = load double*, double** %5
%10 = getelementptr inbounds double, double* %9, i64 0
store double -1.000000e+00, double* %10
%11 = load double*, double** %5
%12 = getelementptr inbounds double, double* %11, i64 1
%13 = load i32, i32* %6
%14 = sub nsw i32 %13, 1
%15 = load double, double* %7
%16 = load double, double* %8
%17 = fadd double %16, 1.000000e+00
%18 = call i32 @jac_jacobi_zeros(double* %12, i32 %14, double %15, double %17)
ret i32 %18
}

LLVM IR (-O2):
define i32 @jac_zeros_grjm(double* %0, i32 %1, double %2, double %3) {
store double -1.000000e+00, double* %0
%5 = getelementptr inbounds double, double* %0, i64 1
%6 = add nsw i32 %1, -1
%7 = fadd double %3, 1.000000e+00
%8 = tail call i32 @jac_jacobi_zeros(double* %5, i32 %6, double %2, double %7)
ret i32 %8
}
/* Variables and functions */
int /*<<< orphan*/ print_matrix(int **, int);
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ rotate(int **, int);
void test(void (*func4test)(int **, int), int **matrix, int n) {
  printf("The original matrix is :\n");
  print_matrix(matrix, n);
  rotate(matrix, n);
  printf("The rotated matrix is :\n");
  print_matrix(matrix, n);
}


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

x86 assembly (clang, -O2):
<test>:
push   %rbp
push   %rbx
push   %rax
mov    %edx,%ebp
mov    %rsi,%rbx
lea    0xec1(%rip),%rdi
call   1030 <puts@plt>
mov    %rbx,%rdi
mov    %ebp,%esi
call   1050 <print_matrix@plt>
mov    %rbx,%rdi
mov    %ebp,%esi
call   1040 <rotate@plt>
lea    0xeba(%rip),%rdi
call   1030 <puts@plt>
mov    %rbx,%rdi
mov    %ebp,%esi
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    1050 <print_matrix@plt>

LLVM IR (-O0):
@.str = [26 x i8] c"The original matrix is :\0A\00"
@.str.1 = [25 x i8] c"The rotated matrix is :\0A\00"
define void @test(void (i32**, i32)* %0, i32** %1, i32 %2) {
%4 = alloca void (i32**, i32)*
%5 = alloca i32**
%6 = alloca i32
store void (i32**, i32)* %0, void (i32**, i32)** %4
store i32** %1, i32*** %5
store i32 %2, i32* %6
%7 = call i32 @printf(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str, i64 0, i64 0))
%8 = load i32**, i32*** %5
%9 = load i32, i32* %6
%10 = call i32 @print_matrix(i32** %8, i32 %9)
%11 = load i32**, i32*** %5
%12 = load i32, i32* %6
%13 = call i32 @rotate(i32** %11, i32 %12)
%14 = call i32 @printf(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.1, i64 0, i64 0))
%15 = load i32**, i32*** %5
%16 = load i32, i32* %6
%17 = call i32 @print_matrix(i32** %15, i32 %16)
ret void
}

LLVM IR (-O2):
@str = [25 x i8] c"The original matrix is :\00"
@str.2 = [24 x i8] c"The rotated matrix is :\00"
define void @test(void (i32**, i32)* nocapture readnone %0, i32** %1, i32 %2) {
%4 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([25 x i8], [25 x i8]* @str, i64 0, i64 0))
%5 = tail call i32 @print_matrix(i32** %1, i32 %2)
%6 = tail call i32 @rotate(i32** %1, i32 %2)
%7 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([24 x i8], [24 x i8]* @str.2, i64 0, i64 0))
%8 = tail call i32 @print_matrix(i32** %1, i32 %2)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ emsSeti(char const *, int);
void msgSeti(const char *token, int ivalue) { emsSeti(token, ivalue); }


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

x86 assembly (clang, -O2):
<msgSeti>:
jmp    1030 <emsSeti@plt>

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

LLVM IR (-O2):
define void @msgSeti(i8* %0, i32 %1) {
%3 = tail call i32 @emsSeti(i8* %0, i32 %1)
ret void
}
int is_wall(char ch) { return ch == '#'; }


x86 assembly (clang, -O0):
<is_wall>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movsbl -0x1(%rbp),%eax
cmp    $0x23,%eax
sete   %al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<is_wall>:
xor    %eax,%eax
cmp    $0x23,%dil
sete   %al
ret

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

LLVM IR (-O2):
define i32 @is_wall(i8 signext %0) {
%2 = icmp eq i8 %0, 35
%3 = zext i1 %2 to i32
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ system(char *);
int main() {
  system("bash test_script");
  exit(1);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeca(%rip),%rdi
call   1030 <system@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

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

LLVM IR (-O0):
@.str = [17 x i8] c"bash test_script\00"
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 @system(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0))
%3 = call i32 @exit(i32 1)
unreachable
}

LLVM IR (-O2):
@.str = [17 x i8] c"bash test_script\00"
define i32 @main() {
%1 = tail call i32 @system(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0))
%2 = tail call i32 @exit(i32 1)
unreachable
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
int main(int argc, char const *argv[]) {
  int x = 10, y = 15;
  int min;
  min = (x) < (y) ? x : y;
  printf("%d\n", min);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0xa,-0x14(%rbp)
movl   $0xf,-0x18(%rbp)
mov    -0x14(%rbp),%eax
cmp    -0x18(%rbp),%eax
jge    114b <main+0x3b>
mov    -0x14(%rbp),%eax
mov    %eax,-0x20(%rbp)
jmp    1151 <main+0x41>
mov    -0x18(%rbp),%eax
mov    %eax,-0x20(%rbp)
mov    -0x20(%rbp),%eax
mov    %eax,-0x1c(%rbp)
mov    -0x1c(%rbp),%esi
lea    0xe9f(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

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

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

LLVM IR (-O2):
@.str = [4 x i8] c"%d\0A\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 10)
ret i32 0
}
unsigned int gen_hash(const struct vm_cache *cache, unsigned int offset) {
  return (unsigned int)cache + (unsigned int)offset / 0x1000;
}


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

x86 assembly (clang, -O2):
<gen_hash>:
shr    $0xc,%esi
lea    (%rsi,%rdi,1),%eax
ret

LLVM IR (-O0):
%struct.vm_cache = type opaque
define i32 @gen_hash(%struct.vm_cache* %0, i32 %1) {
%3 = alloca %struct.vm_cache*
%4 = alloca i32
store %struct.vm_cache* %0, %struct.vm_cache** %3
store i32 %1, i32* %4
%5 = load %struct.vm_cache*, %struct.vm_cache** %3
%6 = ptrtoint %struct.vm_cache* %5 to i32
%7 = load i32, i32* %4
%8 = udiv i32 %7, 4096
%9 = add i32 %6, %8
ret i32 %9
}

LLVM IR (-O2):
%struct.vm_cache = type opaque
define i32 @gen_hash(%struct.vm_cache* %0, i32 %1) {
%3 = ptrtoint %struct.vm_cache* %0 to i64
%4 = trunc i64 %3 to i32
%5 = lshr i32 %1, 12
%6 = add i32 %5, %4
ret i32 %6
}
/* Variables and functions */
scalar_t__ toupper(int);
char *strupper(char *x) {
  char *result = x;
  for (; (*x = (char)toupper((int)*x)); x++)
    ;
  return result;
}


x86 assembly (clang, -O0):
<strupper>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x8(%rbp),%rax
movsbl (%rax),%edi
call   1030 <toupper@plt>
mov    -0x8(%rbp),%rcx
mov    %al,(%rcx)
cmp    $0x0,%al
je     1154 <strupper+0x44>
jmp    1143 <strupper+0x33>
mov    -0x8(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x8(%rbp)
jmp    1124 <strupper+0x14>
mov    -0x10(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<strupper>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%r14
mov    %rdi,%rbx
nopw   0x0(%rax,%rax,1)
movsbl (%rbx),%edi
call   1030 <toupper@plt>
mov    %al,(%rbx)
add    $0x1,%rbx
test   %al,%al
jne    1120 <strupper+0x10>
mov    %r14,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

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

LLVM IR (-O2):
define i8* @strupper(i8* returned %0) {
br label %2
2: ; preds = %2, %1
%3 = phi i8* [ %0, %1 ], [ %9, %2 ]
%4 = load i8, i8* %3
%5 = sext i8 %4 to i32
%6 = tail call i64 @toupper(i32 %5)
%7 = trunc i64 %6 to i8
store i8 %7, i8* %3
%8 = icmp eq i8 %7, 0
%9 = getelementptr inbounds i8, i8* %3, i64 1
br i1 %8, label %10, label %2
10: ; preds = %2
ret i8* %0
}
int MINI(int a, int b) { return (a < b) ? a : b; }


x86 assembly (clang, -O0):
<MINI>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
cmp    -0x8(%rbp),%eax
jge    1121 <MINI+0x21>
mov    -0x4(%rbp),%eax
mov    %eax,-0xc(%rbp)
jmp    1127 <MINI+0x27>
mov    -0x8(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<MINI>:
mov    %esi,%eax
cmp    %esi,%edi
cmovl  %edi,%eax
ret

LLVM IR (-O0):
define i32 @MINI(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%5 = load i32, i32* %3
%6 = load i32, i32* %4
%7 = icmp slt i32 %5, %6
br i1 %7, label %8, label %10
8: ; preds = %2
%9 = load i32, i32* %3
br label %12
10: ; preds = %2
%11 = load i32, i32* %4
br label %12
12: ; preds = %10, %8
%13 = phi i32 [ %9, %8 ], [ %11, %10 ]
ret i32 %13
}

LLVM IR (-O2):
define i32 @MINI(i32 %0, i32 %1) {
%3 = icmp slt i32 %0, %1
%4 = select i1 %3, i32 %0, i32 %1
ret i32 %4
}
int sort_subject(char *database, int (*compare)(const void *x, const void *y)) {
  return 0;
}


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

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

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

LLVM IR (-O2):
define i32 @sort_subject(i8* nocapture readnone %0, i32 (i8*, i8*)* nocapture readnone %1) {
ret i32 0
}
/* Type definitions */
typedef scalar_t__ uint8_t;

/* Variables and functions */
bool SHAREMIND_MAP_KEY_LESS_uint8_t(uint8_t const k1, uint8_t const k2) {
  return k1 < k2;
}


x86 assembly (clang, -O0):
<SHAREMIND_MAP_KEY_LESS_uint8_t>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
cmp    -0x10(%rbp),%rax
setl   %al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<SHAREMIND_MAP_KEY_LESS_uint8_t>:
xor    %eax,%eax
cmp    %rsi,%rdi
setl   %al
ret

LLVM IR (-O0):
define i32 @SHAREMIND_MAP_KEY_LESS_uint8_t(i64 %0, i64 %1) {
%3 = alloca i64
%4 = alloca i64
store i64 %0, i64* %3
store i64 %1, i64* %4
%5 = load i64, i64* %3
%6 = load i64, i64* %4
%7 = icmp slt i64 %5, %6
%8 = zext i1 %7 to i32
ret i32 %8
}

LLVM IR (-O2):
define i32 @SHAREMIND_MAP_KEY_LESS_uint8_t(i64 %0, i64 %1) {
%3 = icmp slt i64 %0, %1
%4 = zext i1 %3 to i32
ret i32 %4
}
/* Variables and functions */
float ANTweenTimingFunctionElasticOut(float, int /*<<< orphan*/, int, float);
float ANTweenProgressTimingFunctionElasticOut(float time, float duration) {
  return ANTweenTimingFunctionElasticOut(time, 0, 1, duration);
}


x86 assembly (clang, -O0):
<ANTweenProgressTimingFunctionElasticOut>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movss  %xmm0,-0x4(%rbp)
movss  %xmm1,-0x8(%rbp)
movss  -0x4(%rbp),%xmm0
movss  -0x8(%rbp),%xmm1
xor    %edi,%edi
mov    $0x1,%esi
call   1030 <ANTweenTimingFunctionElasticOut@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ANTweenProgressTimingFunctionElasticOut>:
xor    %edi,%edi
mov    $0x1,%esi
jmp    1030 <ANTweenTimingFunctionElasticOut@plt>

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

LLVM IR (-O2):
define float @ANTweenProgressTimingFunctionElasticOut(float %0, float %1) {
%3 = tail call float @ANTweenTimingFunctionElasticOut(float %0, i32 0, i32 1, float %1)
ret float %3
}
void test_isalpha(void) {
  int i, j;
  for (i = -127; i < 256;)
    j = i, printf("%s: %d -> %d\n", __FUNCTION__, j, isalpha(i++) ? 1 : 0);
}


x86 assembly (clang, -O0):
<test_isalpha>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0xffffff81,-0x4(%rbp)
cmpl   $0x100,-0x4(%rbp)
jge    1184 <test_isalpha+0x64>
mov    -0x4(%rbp),%eax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0x4(%rbp),%edi
mov    %edi,%eax
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
call   1040 <isalpha@plt>
mov    -0xc(%rbp),%edx
mov    %eax,%esi
xor    %ecx,%ecx
mov    $0x1,%eax
cmp    $0x0,%esi
cmovne %eax,%ecx
lea    0xe8f(%rip),%rdi
lea    0xe96(%rip),%rsi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    112f <test_isalpha+0xf>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_isalpha>:
push   %rbp
push   %r15
push   %r14
push   %rbx
push   %rax
mov    $0xffffff81,%ebx
lea    0xecd(%rip),%r14
lea    0xed4(%rip),%r15
nopw   0x0(%rax,%rax,1)
lea    0x1(%rbx),%ebp
mov    %ebx,%edi
call   1040 <isalpha@plt>
xor    %ecx,%ecx
test   %eax,%eax
setne  %cl
mov    %r14,%rdi
mov    %r15,%rsi
mov    %ebx,%edx
xor    %eax,%eax
call   1030 <printf@plt>
mov    %ebp,%ebx
cmp    $0x100,%ebp
jne    1140 <test_isalpha+0x20>
add    $0x8,%rsp
pop    %rbx
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@.str = [14 x i8] c"%s: %d -> %d\0A\00"
@__FUNCTION__.test_isalpha = [13 x i8] c"test_isalpha\00"
define void @test_isalpha() {
%1 = alloca i32
%2 = alloca i32
store i32 -127, i32* %1
br label %3
3: ; preds = %6, %0
%4 = load i32, i32* %1
%5 = icmp slt i32 %4, 256
br i1 %5, label %6, label %16
6: ; preds = %3
%7 = load i32, i32* %1
store i32 %7, i32* %2
%8 = load i32, i32* %2
%9 = load i32, i32* %1
%10 = add nsw i32 %9, 1
store i32 %10, i32* %1
%11 = call i32 @isalpha(i32 %9)
%12 = icmp ne i32 %11, 0
%13 = zext i1 %12 to i64
%14 = select i1 %12, i32 1, i32 0
%15 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([13 x i8], [13 x i8]* @__FUNCTION__.test_isalpha, i64 0, i64 0), i32 %8, i32 %14)
br label %3
16: ; preds = %3
ret void
}

LLVM IR (-O2):
@.str = [14 x i8] c"%s: %d -> %d\0A\00"
@__FUNCTION__.test_isalpha = [13 x i8] c"test_isalpha\00"
define void @test_isalpha() {
br label %1
1: ; preds = %0, %1
%2 = phi i32 [ -127, %0 ], [ %3, %1 ]
%3 = add nsw i32 %2, 1
%4 = tail call i32 @isalpha(i32 %2)
%5 = icmp ne i32 %4, 0
%6 = zext i1 %5 to i32
%7 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([13 x i8], [13 x i8]* @__FUNCTION__.test_isalpha, i64 0, i64 0), i32 %2, i32 %6)
%8 = icmp eq i32 %3, 256
br i1 %8, label %9, label %1
9: ; preds = %1
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ uint16_t;

/* Variables and functions */
int /*<<< orphan*/ sdmmc_read16(int /*<<< orphan*/);
int /*<<< orphan*/ sdmmc_write16(int /*<<< orphan*/, int /*<<< orphan*/);
void sdmmc_mask16(uint16_t reg, uint16_t clear, uint16_t set) {
  uint16_t val = sdmmc_read16(reg);
  val &= ~clear;
  val |= set;
  sdmmc_write16(reg, val);
}


x86 assembly (clang, -O0):
<sdmmc_mask16>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    -0x4(%rbp),%edi
call   1040 <sdmmc_read16@plt>
mov    %eax,-0x10(%rbp)
mov    -0x8(%rbp),%eax
xor    $0xffffffff,%eax
and    -0x10(%rbp),%eax
mov    %eax,-0x10(%rbp)
mov    -0xc(%rbp),%eax
or     -0x10(%rbp),%eax
mov    %eax,-0x10(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x10(%rbp),%esi
call   1030 <sdmmc_write16@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<sdmmc_mask16>:
push   %rbp
push   %r14
push   %rbx
mov    %edx,%r14d
mov    %esi,%ebp
mov    %edi,%ebx
call   1040 <sdmmc_read16@plt>
not    %ebp
and    %eax,%ebp
or     %r14d,%ebp
mov    %ebx,%edi
mov    %ebp,%esi
pop    %rbx
pop    %r14
pop    %rbp
jmp    1030 <sdmmc_write16@plt>

LLVM IR (-O0):
define void @sdmmc_mask16(i32 %0, i32 %1, i32 %2) {
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
store i32 %0, i32* %4
store i32 %1, i32* %5
store i32 %2, i32* %6
%8 = load i32, i32* %4
%9 = call i32 @sdmmc_read16(i32 %8)
store i32 %9, i32* %7
%10 = load i32, i32* %5
%11 = xor i32 %10, -1
%12 = load i32, i32* %7
%13 = and i32 %12, %11
store i32 %13, i32* %7
%14 = load i32, i32* %6
%15 = load i32, i32* %7
%16 = or i32 %15, %14
store i32 %16, i32* %7
%17 = load i32, i32* %4
%18 = load i32, i32* %7
%19 = call i32 @sdmmc_write16(i32 %17, i32 %18)
ret void
}

LLVM IR (-O2):
define void @sdmmc_mask16(i32 %0, i32 %1, i32 %2) {
%4 = tail call i32 @sdmmc_read16(i32 %0)
%5 = xor i32 %1, -1
%6 = and i32 %4, %5
%7 = or i32 %6, %2
%8 = tail call i32 @sdmmc_write16(i32 %0, i32 %7)
ret void
}
/* Variables and functions */
int unlink(char *);
int remove_fifo(char *path) { return unlink(path); }


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

x86 assembly (clang, -O2):
<remove_fifo>:
jmp    1030 <unlink@plt>

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

LLVM IR (-O2):
define i32 @remove_fifo(i8* nocapture %0) {
%2 = tail call i32 @unlink(i8* %0)
ret i32 %2
}
int test_imm_D3int64_lowword_reg(long long val) {
  return ((val) & (0xD3 << 0)) ? -20 : -40;
}


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

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

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

LLVM IR (-O2):
define i32 @test_imm_D3int64_lowword_reg(i64 %0) {
%2 = and i64 %0, 211
%3 = icmp eq i64 %2, 0
%4 = select i1 %3, i32 -40, i32 -20
ret i32 %4
}
void GLCD_Delay(void) {}


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

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

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

LLVM IR (-O2):
define void @GLCD_Delay() {
ret void
}
void psi_task_tick(struct rq *rq) {}


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

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

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

LLVM IR (-O2):
%struct.rq = type opaque
define void @psi_task_tick(%struct.rq* nocapture %0) {
ret void
}
int test_imm_75uint8_reg(unsigned char val) {
  return ((val) & (-0x75 << 0)) ? -20 : -40;
}


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

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

LLVM IR (-O0):
define i32 @test_imm_75uint8_reg(i8 zeroext %0) {
%2 = alloca i8
store i8 %0, i8* %2
%3 = load i8, i8* %2
%4 = zext i8 %3 to i32
%5 = and i32 %4, -117
%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_75uint8_reg(i8 zeroext %0) {
%2 = and i8 %0, -117
%3 = icmp eq i8 %2, 0
%4 = select i1 %3, i32 -40, i32 -20
ret i32 %4
}
unsigned int _hrt_align_down_p2(unsigned int a, unsigned int b) {
  return a & -b;
}


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

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

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

LLVM IR (-O2):
define i32 @_hrt_align_down_p2(i32 %0, i32 %1) {
%3 = sub i32 0, %1
%4 = and i32 %3, %0
ret i32 %4
}
/* Type definitions */
struct _mgmt_deluser_rsp {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ osapi_free(struct _mgmt_deluser_rsp *);
void mgmt_deluser_rsp_free(struct _mgmt_deluser_rsp *ptr) { osapi_free(ptr); }


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

x86 assembly (clang, -O2):
<mgmt_deluser_rsp_free>:
jmp    1030 <osapi_free@plt>

LLVM IR (-O0):
%struct._mgmt_deluser_rsp = type { i32 }
define void @mgmt_deluser_rsp_free(%struct._mgmt_deluser_rsp* %0) {
%2 = alloca %struct._mgmt_deluser_rsp*
store %struct._mgmt_deluser_rsp* %0, %struct._mgmt_deluser_rsp** %2
%3 = load %struct._mgmt_deluser_rsp*, %struct._mgmt_deluser_rsp** %2
%4 = call i32 @osapi_free(%struct._mgmt_deluser_rsp* %3)
ret void
}

LLVM IR (-O2):
%struct._mgmt_deluser_rsp = type { i32 }
define void @mgmt_deluser_rsp_free(%struct._mgmt_deluser_rsp* %0) {
%2 = tail call i32 @osapi_free(%struct._mgmt_deluser_rsp* %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ puts(char *);
void CgiHeader() {
  puts("X-Powered-By: "
       "PH7/2.1.4"
       "\r");
  puts("Content-type: text/html; charset=UTF-8\r\n\r");
}


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

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

LLVM IR (-O0):
@.str = [25 x i8] c"X-Powered-By: PH7/2.1.4\0D\00"
@.str.1 = [42 x i8] c"Content-type: text/html; charset=UTF-8\0D\0A\0D\00"
define void @CgiHeader() {
%1 = call i32 @puts(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str, i64 0, i64 0))
%2 = call i32 @puts(i8* getelementptr inbounds ([42 x i8], [42 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [25 x i8] c"X-Powered-By: PH7/2.1.4\0D\00"
@.str.1 = [42 x i8] c"Content-type: text/html; charset=UTF-8\0D\0A\0D\00"
define void @CgiHeader() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([25 x i8], [25 x i8]* @.str, i64 0, i64 0))
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([42 x i8], [42 x i8]* @.str.1, i64 0, i64 0))
ret void
}
extern int onigenc_property_list_init(int (*f)(void)) {
  int r;
  ;
  r = f();
  ;
  return r;
}


x86 assembly (clang, -O0):
<onigenc_property_list_init>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
call   *-0x8(%rbp)
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<onigenc_property_list_init>:
jmp    *%rdi

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

LLVM IR (-O2):
define i32 @onigenc_property_list_init(i32 ()* nocapture %0) {
%2 = tail call i32 %0()
ret i32 %2
}
void reverse(char *s, int i, int j) {
  char temp;
  while (i < j) {
    temp = s[i];
    s[i] = s[j];
    s[j] = temp;
    i++;
    j--;
  }
}


x86 assembly (clang, -O0):
<reverse>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    -0xc(%rbp),%eax
cmp    -0x10(%rbp),%eax
jge    1163 <reverse+0x63>
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
mov    (%rax,%rcx,1),%al
mov    %al,-0x11(%rbp)
mov    -0x8(%rbp),%rax
movslq -0x10(%rbp),%rcx
mov    (%rax,%rcx,1),%dl
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
mov    %dl,(%rax,%rcx,1)
mov    -0x11(%rbp),%dl
mov    -0x8(%rbp),%rax
movslq -0x10(%rbp),%rcx
mov    %dl,(%rax,%rcx,1)
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
mov    -0x10(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0x10(%rbp)
jmp    110e <reverse+0xe>
pop    %rbp
ret

x86 assembly (clang, -O2):
<reverse>:
cmp    %edx,%esi
jge    1131 <reverse+0x31>
movslq %esi,%rax
movslq %edx,%rcx
add    $0x1,%rax
xchg   %ax,%ax
movzbl -0x1(%rdi,%rax,1),%esi
movzbl (%rdi,%rcx,1),%edx
mov    %dl,-0x1(%rdi,%rax,1)
mov    %sil,(%rdi,%rcx,1)
add    $0xffffffffffffffff,%rcx
lea    0x1(%rax),%rdx
cmp    %rcx,%rax
mov    %rdx,%rax
jl     1110 <reverse+0x10>
ret

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

LLVM IR (-O2):
define void @reverse(i8* nocapture %0, i32 %1, i32 %2) {
%4 = icmp slt i32 %1, %2
br i1 %4, label %5, label %18
5: ; preds = %3
%6 = sext i32 %1 to i64
%7 = sext i32 %2 to i64
br label %8
8: ; preds = %5, %8
%9 = phi i64 [ %7, %5 ], [ %16, %8 ]
%10 = phi i64 [ %6, %5 ], [ %15, %8 ]
%11 = getelementptr inbounds i8, i8* %0, i64 %10
%12 = load i8, i8* %11
%13 = getelementptr inbounds i8, i8* %0, i64 %9
%14 = load i8, i8* %13
store i8 %14, i8* %11
store i8 %12, i8* %13
%15 = add nsw i64 %10, 1
%16 = add nsw i64 %9, -1
%17 = icmp slt i64 %15, %16
br i1 %17, label %8, label %18
18: ; preds = %8, %3
ret void
}
/* Variables and functions */
int /*<<< orphan*/ SystemAlarmsHandle();
int /*<<< orphan*/ UAVObjLogging(int /*<<< orphan*/);
void SystemAlarmsLogging() { UAVObjLogging(SystemAlarmsHandle()); }


x86 assembly (clang, -O0):
<SystemAlarmsLogging>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1040 <SystemAlarmsHandle@plt>
mov    %eax,%edi
call   1030 <UAVObjLogging@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<SystemAlarmsLogging>:
push   %rax
xor    %eax,%eax
call   1040 <SystemAlarmsHandle@plt>
mov    %eax,%edi
pop    %rax
jmp    1030 <UAVObjLogging@plt>

LLVM IR (-O0):
define void @SystemAlarmsLogging() {
%1 = call i32 (...) @SystemAlarmsHandle()
%2 = call i32 @UAVObjLogging(i32 %1)
ret void
}

LLVM IR (-O2):
define void @SystemAlarmsLogging() {
%1 = tail call i32 (...) @SystemAlarmsHandle()
%2 = tail call i32 @UAVObjLogging(i32 %1)
ret void
}
/* Type definitions */
struct rlimit {
  int rlim_cur;
};

/* Variables and functions */
int /*<<< orphan*/ RLIMIT_CPU;
int /*<<< orphan*/ getrlimit(int /*<<< orphan*/, struct rlimit *);
int /*<<< orphan*/ setrlimit(int /*<<< orphan*/, struct rlimit *);
int main() {
  struct rlimit rl;
  getrlimit(RLIMIT_CPU, &rl);
  rl.rlim_cur = 1;
  setrlimit(RLIMIT_CPU, &rl);
  while (1)
    ;
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    0x2ea2(%rip),%rax
mov    (%rax),%edi
lea    -0x8(%rbp),%rsi
call   1040 <getrlimit@plt>
movl   $0x1,-0x8(%rbp)
mov    0x2e89(%rip),%rax
mov    (%rax),%edi
lea    -0x8(%rbp),%rsi
call   1030 <setrlimit@plt>
jmp    115a <main+0x3a>

x86 assembly (clang, -O2):
<main>:
push   %r14
push   %rbx
push   %rax
mov    0x2ead(%rip),%r14
mov    (%r14),%edi
mov    %rsp,%rbx
mov    %rbx,%rsi
call   1040 <getrlimit@plt>
movl   $0x1,(%rsp)
mov    (%r14),%edi
mov    %rbx,%rsi
call   1030 <setrlimit@plt>
nopl   0x0(%rax,%rax,1)
jmp    1150 <main+0x30>

LLVM IR (-O0):
%struct.rlimit = type { i32 }
@RLIMIT_CPU = global i32 0
define i32 @main() {
%1 = alloca i32
%2 = alloca %struct.rlimit
store i32 0, i32* %1
%3 = load i32, i32* @RLIMIT_CPU
%4 = call i32 @getrlimit(i32 %3, %struct.rlimit* %2)
%5 = getelementptr inbounds %struct.rlimit, %struct.rlimit* %2, i32 0, i32 0
store i32 1, i32* %5
%6 = load i32, i32* @RLIMIT_CPU
%7 = call i32 @setrlimit(i32 %6, %struct.rlimit* %2)
br label %8
8: ; preds = %0, %8
br label %8
}

LLVM IR (-O2):
%struct.rlimit = type { i32 }
@RLIMIT_CPU = global i32 0
define i32 @main() {
%1 = alloca %struct.rlimit
%2 = bitcast %struct.rlimit* %1 to i8*
%3 = load i32, i32* @RLIMIT_CPU
%4 = call i32 @getrlimit(i32 %3, %struct.rlimit* %1)
%5 = getelementptr inbounds %struct.rlimit, %struct.rlimit* %1, i64 0, i32 0
store i32 1, i32* %5
%6 = load i32, i32* @RLIMIT_CPU
%7 = call i32 @setrlimit(i32 %6, %struct.rlimit* %1)
br label %8
8: ; preds = %8, %0
br label %8
}
/* Forward declarations */
typedef struct TYPE_2__ TYPE_1__;

/* Type definitions */
struct TYPE_2__ {
  scalar_t__ bits_per_pixel;
};
typedef TYPE_1__ XPixmapFormatValues;

/* Variables and functions */
int get_XPixmapFormatValues_bits_per_pixel(void *_p) {
  return (int)((XPixmapFormatValues *)_p)->bits_per_pixel;
}


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

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

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

LLVM IR (-O2):
define i32 @get_XPixmapFormatValues_bits_per_pixel(i8* nocapture %0) {
%2 = bitcast i8* %0 to i64*
%3 = load i64, i64* %2
%4 = trunc i64 %3 to i32
ret i32 %4
}
void VIDDummyVdp1PolygonDraw(void) {}


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

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

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

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