xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int, int, int);
int /*<<< orphan*/ rotr(int *, int *, int *, int);
int /*<<< orphan*/ scanf(char *, int *, int *, int *, int *);
int main() {
  int a, b, c, n;
  scanf("%d  %d  %d  %d", &a, &b, &c, &n);
  rotr(&a, &b, &c, n);
  printf(" %d  %d  %d ", a, b, c);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeba(%rip),%rdi
lea    -0x8(%rbp),%rsi
lea    -0xc(%rbp),%rdx
lea    -0x10(%rbp),%rcx
lea    -0x14(%rbp),%r8
call   1040 <scanf@plt>
mov    -0x14(%rbp),%ecx
lea    -0x8(%rbp),%rdi
lea    -0xc(%rbp),%rsi
lea    -0x10(%rbp),%rdx
call   1050 <rotr@plt>
mov    -0x8(%rbp),%esi
mov    -0xc(%rbp),%edx
mov    -0x10(%rbp),%ecx
lea    0xe90(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r15
push   %r14
push   %rbx
sub    $0x10,%rsp
lea    0xec0(%rip),%rdi
lea    0xc(%rsp),%rbx
lea    0x8(%rsp),%r14
lea    0x4(%rsp),%r15
mov    %rsp,%r8
mov    %rbx,%rsi
mov    %r14,%rdx
mov    %r15,%rcx
call   1040 <scanf@plt>
mov    (%rsp),%ecx
mov    %rbx,%rdi
mov    %r14,%rsi
mov    %r15,%rdx
call   1050 <rotr@plt>
mov    0xc(%rsp),%esi
mov    0x8(%rsp),%edx
mov    0x4(%rsp),%ecx
lea    0xe8b(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbx
pop    %r14
pop    %r15
ret

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

LLVM IR (-O2):
@.str = [15 x i8] c"%d %d %d %d\00"
@.str.1 = [13 x i8] c" %d %d %d \00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
%5 = bitcast i32* %1 to i8*
%6 = bitcast i32* %2 to i8*
%7 = bitcast i32* %3 to i8*
%8 = bitcast i32* %4 to i8*
%9 = call i32 @scanf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0), i32* %1, i32* %2, i32* %3, i32* %4)
%10 = load i32, i32* %4
%11 = call i32 @rotr(i32* %1, i32* %2, i32* %3, i32 %10)
%12 = load i32, i32* %1
%13 = load i32, i32* %2
%14 = load i32, i32* %3
%15 = call i32 @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.1, i64 0, i64 0), i32 %12, i32 %13, i32 %14)
ret i32 0
}
/* Variables and functions */
int pathcon_nm3_f0(double const **, double **, int *, double *, int);
int pathcon_nm3(const double **arg, double **res, int *iw, double *w, int mem) {
  return pathcon_nm3_f0(arg, res, iw, w, mem);
}


x86 assembly (clang, -O0):
<pathcon_nm3>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    %r8d,-0x24(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
mov    -0x20(%rbp),%rcx
mov    -0x24(%rbp),%r8d
call   1030 <pathcon_nm3_f0@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<pathcon_nm3>:
jmp    1030 <pathcon_nm3_f0@plt>

LLVM IR (-O0):
define i32 @pathcon_nm3(double** %0, double** %1, i32* %2, double* %3, i32 %4) {
%6 = alloca double**
%7 = alloca double**
%8 = alloca i32*
%9 = alloca double*
%10 = alloca i32
store double** %0, double*** %6
store double** %1, double*** %7
store i32* %2, i32** %8
store double* %3, double** %9
store i32 %4, i32* %10
%11 = load double**, double*** %6
%12 = load double**, double*** %7
%13 = load i32*, i32** %8
%14 = load double*, double** %9
%15 = load i32, i32* %10
%16 = call i32 @pathcon_nm3_f0(double** %11, double** %12, i32* %13, double* %14, i32 %15)
ret i32 %16
}

LLVM IR (-O2):
define i32 @pathcon_nm3(double** %0, double** %1, i32* %2, double* %3, i32 %4) {
%6 = tail call i32 @pathcon_nm3_f0(double** %0, double** %1, i32* %2, double* %3, i32 %4)
ret i32 %6
}
/* Type definitions */
struct ir_remote {
  int dummy;
};
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/ *, char *);
int /*<<< orphan*/ is_raw(struct ir_remote const *);
void fprint_remote_signal_head(FILE *f, const struct ir_remote *rem) {
  if (!is_raw(rem))
    fprintf(f, "      begin codes\n");
  else
    fprintf(f, "      begin raw_codes\n\n");
}


x86 assembly (clang, -O0):
<fprint_remote_signal_head>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
call   1040 <is_raw@plt>
cmp    $0x0,%eax
jne    1157 <fprint_remote_signal_head+0x37>
mov    -0x8(%rbp),%rdi
lea    0xeb3(%rip),%rsi
call   1030 <fprintf@plt>
jmp    1167 <fprint_remote_signal_head+0x47>
mov    -0x8(%rbp),%rdi
lea    0xeb1(%rip),%rsi
call   1030 <fprintf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fprint_remote_signal_head>:
push   %rbx
mov    %rdi,%rbx
mov    %rsi,%rdi
call   1030 <is_raw@plt>
test   %eax,%eax
je     113e <fprint_remote_signal_head+0x1e>
lea    0xedc(%rip),%rdi
mov    $0x17,%esi
jmp    114a <fprint_remote_signal_head+0x2a>
lea    0xebb(%rip),%rdi
mov    $0x12,%esi
mov    $0x1,%edx
mov    %rbx,%rcx
pop    %rbx
jmp    1040 <fwrite@plt>

LLVM IR (-O0):
%struct.ir_remote = type { i32 }
@.str = [19 x i8] c" begin codes\0A\00"
@.str.1 = [24 x i8] c" begin raw_codes\0A\0A\00"
define void @fprint_remote_signal_head(i32* %0, %struct.ir_remote* %1) {
%3 = alloca i32*
%4 = alloca %struct.ir_remote*
store i32* %0, i32** %3
store %struct.ir_remote* %1, %struct.ir_remote** %4
%5 = load %struct.ir_remote*, %struct.ir_remote** %4
%6 = call i32 @is_raw(%struct.ir_remote* %5)
%7 = icmp ne i32 %6, 0
br i1 %7, label %11, label %8
8: ; preds = %2
%9 = load i32*, i32** %3
%10 = call i32 @fprintf(i32* %9, i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0))
br label %14
11: ; preds = %2
%12 = load i32*, i32** %3
%13 = call i32 @fprintf(i32* %12, i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.1, i64 0, i64 0))
br label %14
14: ; preds = %11, %8
ret void
}

LLVM IR (-O2):
%struct.ir_remote = type { i32 }
@.str = [19 x i8] c" begin codes\0A\00"
@.str.1 = [24 x i8] c" begin raw_codes\0A\0A\00"
define void @fprint_remote_signal_head(i32* nocapture %0, %struct.ir_remote* %1) {
%3 = tail call i32 @is_raw(%struct.ir_remote* %1)
%4 = icmp eq i32 %3, 0
br i1 %4, label %5, label %7
5: ; preds = %2
%6 = tail call i64 @fwrite(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0), i64 18, i64 1, i32* %0)
br label %9
7: ; preds = %2
%8 = tail call i64 @fwrite(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.1, i64 0, i64 0), i64 23, i64 1, i32* %0)
br label %9
9: ; preds = %7, %5
ret void
}
/* Variables and functions */
int /*<<< orphan*/ appaserver_error_starting_argv_append_file(int, char **,
                                                              char *);
void appaserver_output_starting_argv_append_file(int argc, char **argv,
                                                 char *application_name) {
  appaserver_error_starting_argv_append_file(argc, argv, application_name);
}


x86 assembly (clang, -O0):
<appaserver_output_starting_argv_append_file>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
call   1030 <appaserver_error_starting_argv_append_file@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<appaserver_output_starting_argv_append_file>:
jmp    1030 <appaserver_error_starting_argv_append_file@plt>

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

LLVM IR (-O2):
define void @appaserver_output_starting_argv_append_file(i32 %0, i8** %1, i8* %2) {
%4 = tail call i32 @appaserver_error_starting_argv_append_file(i32 %0, i8** %1, i8* %2)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ err(int, char *, char const *);
void *realloc(void *, size_t);
extern void *checked_realloc(void *ptr, size_t size, int code,
                             const char *str) {
  ptr = realloc(ptr, size);
  if (ptr == NULL)
    err(code, "%s", str);
  return ptr;
}


x86 assembly (clang, -O0):
<checked_realloc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    %rcx,-0x20(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1040 <realloc@plt>
mov    %rax,-0x8(%rbp)
cmpq   $0x0,-0x8(%rbp)
jne    1166 <checked_realloc+0x46>
mov    -0x14(%rbp),%edi
mov    -0x20(%rbp),%rdx
lea    0xe9f(%rip),%rsi
call   1030 <err@plt>
mov    -0x8(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<checked_realloc>:
push   %rbp
push   %r14
push   %rbx
mov    %rcx,%r14
mov    %edx,%ebp
call   1040 <realloc@plt>
mov    %rax,%rbx
test   %rax,%rax
jne    1147 <checked_realloc+0x27>
lea    0xec3(%rip),%rsi
mov    %ebp,%edi
mov    %r14,%rdx
call   1030 <err@plt>
mov    %rbx,%rax
pop    %rbx
pop    %r14
pop    %rbp
ret

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

LLVM IR (-O2):
@.str = [3 x i8] c"%s\00"
define noalias i8* @checked_realloc(i8* nocapture %0, i64 %1, i32 %2, i8* %3) {
%5 = tail call i8* @realloc(i8* %0, i64 %1)
%6 = icmp eq i8* %5, null
br i1 %6, label %7, label %9
7: ; preds = %4
%8 = tail call i32 @err(i32 %2, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* %3)
br label %9
9: ; preds = %7, %4
ret i8* %5
}
void speakup_bs(int currcons) {}


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

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

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

LLVM IR (-O2):
define void @speakup_bs(i32 %0) {
ret void
}
/* Type definitions */
typedef int int32_t;

/* Variables and functions */
int32_t f3m_calc_tempo_samples(int32_t tempo) {
  return (44100 * 10) / (tempo * 4);
}


x86 assembly (clang, -O0):
<f3m_calc_tempo_samples>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%ecx
shl    $0x2,%ecx
mov    $0x6baa8,%eax
cltd
idiv   %ecx
pop    %rbp
ret

x86 assembly (clang, -O2):
<f3m_calc_tempo_samples>:
shl    $0x2,%edi
mov    $0x6baa8,%eax
xor    %edx,%edx
idiv   %edi
ret

LLVM IR (-O0):
define i32 @f3m_calc_tempo_samples(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = mul nsw i32 %3, 4
%5 = sdiv i32 441000, %4
ret i32 %5
}

LLVM IR (-O2):
define i32 @f3m_calc_tempo_samples(i32 %0) {
%2 = shl nsw i32 %0, 2
%3 = sdiv i32 441000, %2
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ GL_COLOR_BUFFER_BIT;
int /*<<< orphan*/ glClear(int /*<<< orphan*/);
int /*<<< orphan*/ glFlush();
int /*<<< orphan*/ triangulo();
void display() {
  glClear(GL_COLOR_BUFFER_BIT);
  triangulo();
  glFlush();
}


x86 assembly (clang, -O0):
<display>:
push   %rbp
mov    %rsp,%rbp
mov    0x2ea5(%rip),%rax
mov    (%rax),%edi
call   1030 <glClear@plt>
mov    $0x0,%al
call   1040 <triangulo@plt>
mov    $0x0,%al
call   1050 <glFlush@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<display>:
push   %rax
mov    0x2ea8(%rip),%rax
mov    (%rax),%edi
call   1030 <glClear@plt>
xor    %eax,%eax
call   1040 <triangulo@plt>
xor    %eax,%eax
pop    %rcx
jmp    1050 <glFlush@plt>

LLVM IR (-O0):
@GL_COLOR_BUFFER_BIT = global i32 0
define void @display() {
%1 = load i32, i32* @GL_COLOR_BUFFER_BIT
%2 = call i32 @glClear(i32 %1)
%3 = call i32 (...) @triangulo()
%4 = call i32 (...) @glFlush()
ret void
}

LLVM IR (-O2):
@GL_COLOR_BUFFER_BIT = global i32 0
define void @display() {
%1 = load i32, i32* @GL_COLOR_BUFFER_BIT
%2 = tail call i32 @glClear(i32 %1)
%3 = tail call i32 (...) @triangulo()
%4 = tail call i32 (...) @glFlush()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
void main() {
  char *str = "123";
  printf("\n %d", (int)(str[1]));
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    0xee1(%rip),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movsbl 0x1(%rax),%esi
lea    0xed2(%rip),%rdi
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
lea    0xee9(%rip),%rdi
mov    $0x32,%esi
jmp    1030 <printf@plt>

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

LLVM IR (-O2):
@.str.1 = [5 x i8] c"\0A %d\00"
define void @main() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0), i32 50)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ turtle_add_action(char *);
void turtle_right() { turtle_add_action("r()\n"); }


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

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

LLVM IR (-O0):
@.str = [5 x i8] c"r()\0A\00"
define void @turtle_right() {
%1 = call i32 @turtle_add_action(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [5 x i8] c"r()\0A\00"
define void @turtle_right() {
%1 = tail call i32 @turtle_add_action(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0))
ret void
}
unsigned int get2l(const char *attr, int p) {
  int i;
  unsigned int v;
  v = 0;
  for (i = 0; i < 2; i++)
    v += (attr[p + i] & 255) << (8 * i);
  return (v);
}


x86 assembly (clang, -O0):
<get2l>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
movl   $0x0,-0x14(%rbp)
movl   $0x0,-0x10(%rbp)
cmpl   $0x2,-0x10(%rbp)
jge    1155 <get2l+0x55>
mov    -0x8(%rbp),%rax
mov    -0xc(%rbp),%ecx
add    -0x10(%rbp),%ecx
movslq %ecx,%rcx
movsbl (%rax,%rcx,1),%eax
and    $0xff,%eax
mov    -0x10(%rbp),%ecx
shl    $0x3,%ecx
shl    %cl,%eax
add    -0x14(%rbp),%eax
mov    %eax,-0x14(%rbp)
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    1119 <get2l+0x19>
mov    -0x14(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<get2l>:
movslq %esi,%rax
movzwl (%rdi,%rax,1),%eax
ret

LLVM IR (-O0):
define i32 @get2l(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
store i32 0, i32* %6
store i32 0, i32* %5
br label %7
7: ; preds = %25, %2
%8 = load i32, i32* %5
%9 = icmp slt i32 %8, 2
br i1 %9, label %10, label %28
10: ; preds = %7
%11 = load i8*, i8** %3
%12 = load i32, i32* %4
%13 = load i32, i32* %5
%14 = add nsw i32 %12, %13
%15 = sext i32 %14 to i64
%16 = getelementptr inbounds i8, i8* %11, i64 %15
%17 = load i8, i8* %16
%18 = sext i8 %17 to i32
%19 = and i32 %18, 255
%20 = load i32, i32* %5
%21 = mul nsw i32 8, %20
%22 = shl i32 %19, %21
%23 = load i32, i32* %6
%24 = add i32 %23, %22
store i32 %24, i32* %6
br label %25
25: ; preds = %10
%26 = load i32, i32* %5
%27 = add nsw i32 %26, 1
store i32 %27, i32* %5
br label %7
28: ; preds = %7
%29 = load i32, i32* %6
ret i32 %29
}

LLVM IR (-O2):
define i32 @get2l(i8* nocapture %0, i32 %1) {
%3 = sext i32 %1 to i64
%4 = getelementptr inbounds i8, i8* %0, i64 %3
%5 = load i8, i8* %4
%6 = zext i8 %5 to i32
%7 = add nsw i64 %3, 1
%8 = getelementptr inbounds i8, i8* %0, i64 %7
%9 = load i8, i8* %8
%10 = zext i8 %9 to i32
%11 = shl nuw nsw i32 %10, 8
%12 = or i32 %11, %6
ret i32 %12
}
void barrier_omp() {
#pragma omp barrier
  ;
}


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

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

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

LLVM IR (-O2):
define void @barrier_omp() {
ret void
}
int ipmi_cmd_lan2(char *node, unsigned short cmd, unsigned char *pdata,
                  int sdata, unsigned char *presp, int *sresp,
                  unsigned char *pcc, char fdebugcmd) {
  return (-8);
}


x86 assembly (clang, -O0):
<ipmi_cmd_lan2>:
push   %rbp
mov    %rsp,%rbp
mov    %si,%ax
mov    0x18(%rbp),%sil
mov    0x10(%rbp),%rsi
mov    %rdi,-0x8(%rbp)
mov    %ax,-0xa(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %ecx,-0x1c(%rbp)
mov    %r8,-0x28(%rbp)
mov    %r9,-0x30(%rbp)
mov    $0xfffffff8,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @ipmi_cmd_lan2(i8* %0, i16 zeroext %1, i8* %2, i32 %3, i8* %4, i32* %5, i8* %6, i8 signext %7) {
%9 = alloca i8*
%10 = alloca i16
%11 = alloca i8*
%12 = alloca i32
%13 = alloca i8*
%14 = alloca i32*
%15 = alloca i8*
%16 = alloca i8
store i8* %0, i8** %9
store i16 %1, i16* %10
store i8* %2, i8** %11
store i32 %3, i32* %12
store i8* %4, i8** %13
store i32* %5, i32** %14
store i8* %6, i8** %15
store i8 %7, i8* %16
ret i32 -8
}

LLVM IR (-O2):
define i32 @ipmi_cmd_lan2(i8* nocapture readnone %0, i16 zeroext %1, i8* nocapture readnone %2, i32 %3, i8* nocapture readnone %4, i32* nocapture readnone %5, i8* nocapture readnone %6, i8 signext %7) {
ret i32 -8
}
long double square(long double x) { return x * x; }


x86 assembly (clang, -O0):
<square>:
push   %rbp
mov    %rsp,%rbp
fldt   0x10(%rbp)
fstpt  -0x10(%rbp)
fldt   -0x10(%rbp)
fmul   %st,%st(0)
pop    %rbp
ret

x86 assembly (clang, -O2):
<square>:
fldt   0x8(%rsp)
fmul   %st,%st(0)
ret

LLVM IR (-O0):
define x86_fp80 @square(x86_fp80 %0) {
%2 = alloca x86_fp80
store x86_fp80 %0, x86_fp80* %2
%3 = load x86_fp80, x86_fp80* %2
%4 = load x86_fp80, x86_fp80* %2
%5 = fmul x86_fp80 %3, %4
ret x86_fp80 %5
}

LLVM IR (-O2):
define x86_fp80 @square(x86_fp80 %0) {
%2 = fmul x86_fp80 %0, %0
ret x86_fp80 %2
}
int get(char *a, int idx) { return a[idx]; }


x86 assembly (clang, -O0):
<get>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
movsbl (%rax,%rcx,1),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<get>:
movslq %esi,%rax
movsbl (%rdi,%rax,1),%eax
ret

LLVM IR (-O0):
define i32 @get(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 = sext i32 %6 to i64
%8 = getelementptr inbounds i8, i8* %5, i64 %7
%9 = load i8, i8* %8
%10 = sext i8 %9 to i32
ret i32 %10
}

LLVM IR (-O2):
define i32 @get(i8* nocapture %0, i32 %1) {
%3 = sext i32 %1 to i64
%4 = getelementptr inbounds i8, i8* %0, i64 %3
%5 = load i8, i8* %4
%6 = sext i8 %5 to i32
ret i32 %6
}
int NeedBitrate(void) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @NeedBitrate() {
ret i32 0
}
/* Variables and functions */
scalar_t__ cset82(unsigned char const *, int const, int /*<<< orphan*/, int,
                  int, int *, int *, char *);
int x1__28(const unsigned char *data, const int data_len, int *p_err_no,
           int *p_err_posn, char err_msg[50]) {
  return data_len >= 1 && data_len <= 28 &&
         cset82(data, data_len, 0, 1, 28, p_err_no, p_err_posn, err_msg);
}


x86 assembly (clang, -O0):
<x1__28>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    %r8,-0x28(%rbp)
xor    %eax,%eax
cmpl   $0x1,-0xc(%rbp)
mov    %al,-0x29(%rbp)
jl     1181 <x1__28+0x71>
xor    %eax,%eax
cmpl   $0x1c,-0xc(%rbp)
mov    %al,-0x29(%rbp)
jg     1181 <x1__28+0x71>
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
mov    -0x18(%rbp),%r9
mov    -0x20(%rbp),%r10
mov    -0x28(%rbp),%rax
xor    %edx,%edx
mov    $0x1,%ecx
mov    $0x1c,%r8d
mov    %r10,(%rsp)
mov    %rax,0x8(%rsp)
call   1030 <cset82@plt>
cmp    $0x0,%rax
setne  %al
mov    %al,-0x29(%rbp)
mov    -0x29(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<x1__28>:
mov    %rcx,%r10
lea    -0x1(%rsi),%ecx
xor    %eax,%eax
cmp    $0x1b,%ecx
ja     114d <x1__28+0x3d>
push   %rax
mov    %r8,%r11
mov    %rdx,%r9
xor    %edx,%edx
mov    $0x1,%ecx
mov    $0x1c,%r8d
push   %r11
push   %r10
call   1030 <cset82@plt>
add    $0x10,%rsp
mov    %rax,%rcx
xor    %eax,%eax
test   %rcx,%rcx
setne  %al
add    $0x8,%rsp
ret

LLVM IR (-O0):
define i32 @x1__28(i8* %0, i32 %1, i32* %2, i32* %3, i8* %4) {
%6 = alloca i8*
%7 = alloca i32
%8 = alloca i32*
%9 = alloca i32*
%10 = alloca i8*
store i8* %0, i8** %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* %7
%12 = icmp sge i32 %11, 1
br i1 %12, label %13, label %24
13: ; preds = %5
%14 = load i32, i32* %7
%15 = icmp sle i32 %14, 28
br i1 %15, label %16, label %24
16: ; preds = %13
%17 = load i8*, i8** %6
%18 = load i32, i32* %7
%19 = load i32*, i32** %8
%20 = load i32*, i32** %9
%21 = load i8*, i8** %10
%22 = call i64 @cset82(i8* %17, i32 %18, i32 0, i32 1, i32 28, i32* %19, i32* %20, i8* %21)
%23 = icmp ne i64 %22, 0
br label %24
24: ; preds = %16, %13, %5
%25 = phi i1 [ false, %13 ], [ false, %5 ], [ %23, %16 ]
%26 = zext i1 %25 to i32
ret i32 %26
}

LLVM IR (-O2):
define i32 @x1__28(i8* %0, i32 %1, i32* %2, i32* %3, i8* %4) {
%6 = add i32 %1, -1
%7 = icmp ult i32 %6, 28
br i1 %7, label %8, label %12
8: ; preds = %5
%9 = tail call i64 @cset82(i8* %0, i32 %1, i32 0, i32 1, i32 28, i32* %2, i32* %3, i8* %4)
%10 = icmp ne i64 %9, 0
%11 = zext i1 %10 to i32
br label %12
12: ; preds = %8, %5
%13 = phi i32 [ 0, %5 ], [ %11, %8 ]
ret i32 %13
}
int test4() {
  int x;
  ++x;
  return x;
}


x86 assembly (clang, -O0):
<test4>:
push   %rbp
mov    %rsp,%rbp
mov    -0x4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @test4() {
%1 = alloca i32
%2 = load i32, i32* %1
%3 = add nsw i32 %2, 1
store i32 %3, i32* %1
%4 = load i32, i32* %1
ret i32 %4
}

LLVM IR (-O2):
define i32 @test4() {
ret i32 undef
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ ConvertToFloat(unsigned char *, float *);
int fread(unsigned char *, int, int, int /*<<< orphan*/ *);
int ConvertFreadFloat(FILE *fp, float *val) {
  unsigned char tmp[4];
  if (fread(tmp, 4, 1, fp) != 1)
    return -1;
  ConvertToFloat(tmp, val);
  return 0;
}


x86 assembly (clang, -O0):
<ConvertFreadFloat>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
lea    -0x1c(%rbp),%rdi
mov    -0x10(%rbp),%rcx
mov    $0x4,%esi
mov    $0x1,%edx
call   1040 <fread@plt>
cmp    $0x1,%eax
je     115c <ConvertFreadFloat+0x3c>
movl   $0xffffffff,-0x4(%rbp)
jmp    1170 <ConvertFreadFloat+0x50>
lea    -0x1c(%rbp),%rdi
mov    -0x18(%rbp),%rsi
call   1030 <ConvertToFloat@plt>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ConvertFreadFloat>:
push   %rbx
sub    $0x10,%rsp
mov    %rsi,%rbx
mov    %rdi,%rcx
lea    0xc(%rsp),%rdi
mov    $0x4,%esi
mov    $0x1,%edx
call   1040 <fread@plt>
mov    %eax,%ecx
mov    $0xffffffff,%eax
cmp    $0x1,%ecx
jne    115a <ConvertFreadFloat+0x3a>
lea    0xc(%rsp),%rdi
mov    %rbx,%rsi
call   1030 <ConvertToFloat@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
define i32 @ConvertFreadFloat(i32* %0, float* %1) {
%3 = alloca i32
%4 = alloca i32*
%5 = alloca float*
%6 = alloca [4 x i8]
store i32* %0, i32** %4
store float* %1, float** %5
%7 = getelementptr inbounds [4 x i8], [4 x i8]* %6, i64 0, i64 0
%8 = load i32*, i32** %4
%9 = call i32 @fread(i8* %7, i32 4, i32 1, i32* %8)
%10 = icmp ne i32 %9, 1
br i1 %10, label %11, label %12
11: ; preds = %2
store i32 -1, i32* %3
br label %16
12: ; preds = %2
%13 = getelementptr inbounds [4 x i8], [4 x i8]* %6, i64 0, i64 0
%14 = load float*, float** %5
%15 = call i32 @ConvertToFloat(i8* %13, float* %14)
store i32 0, i32* %3
br label %16
16: ; preds = %12, %11
%17 = load i32, i32* %3
ret i32 %17
}

LLVM IR (-O2):
define i32 @ConvertFreadFloat(i32* nocapture %0, float* %1) {
%3 = alloca [4 x i8]
%4 = getelementptr inbounds [4 x i8], [4 x i8]* %3, i64 0, i64 0
%5 = call i32 @fread(i8* %4, i32 4, i32 1, i32* %0)
%6 = icmp eq i32 %5, 1
br i1 %6, label %7, label %9
7: ; preds = %2
%8 = call i32 @ConvertToFloat(i8* %4, float* %1)
br label %9
9: ; preds = %2, %7
%10 = phi i32 [ 0, %7 ], [ -1, %2 ]
ret i32 %10
}
/* Type definitions */
struct ib_hash_map {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ ib_map_rehash(struct ib_hash_map *, size_t);
void ib_map_reserve(struct ib_hash_map *hm, size_t capacity) {
  ib_map_rehash(hm, capacity);
}


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

x86 assembly (clang, -O2):
<ib_map_reserve>:
jmp    1030 <ib_map_rehash@plt>

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

LLVM IR (-O2):
%struct.ib_hash_map = type { i32 }
define void @ib_map_reserve(%struct.ib_hash_map* %0, i64 %1) {
%3 = tail call i32 @ib_map_rehash(%struct.ib_hash_map* %0, i64 %1)
ret void
}
int check_season(int s) {
  if (s < 1 || s > 12)
    return -1;
  return 0;
}


x86 assembly (clang, -O0):
<check_season>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
cmpl   $0x1,-0x8(%rbp)
jl     111b <check_season+0x1b>
cmpl   $0xc,-0x8(%rbp)
jle    1127 <check_season+0x27>
movl   $0xffffffff,-0x4(%rbp)
jmp    112e <check_season+0x2e>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<check_season>:
add    $0xfffffff3,%edi
cmp    $0xfffffff4,%edi
sbb    %eax,%eax
ret

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

LLVM IR (-O2):
define i32 @check_season(i32 %0) {
%2 = add i32 %0, -13
%3 = icmp ult i32 %2, -12
%4 = sext i1 %3 to i32
ret i32 %4
}
int test_imm_27int64_lowword_mem(long long *val) {
  return ((*val) & (0x27 << 0)) ? -20 : -40;
}


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

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

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

LLVM IR (-O2):
define i32 @test_imm_27int64_lowword_mem(i64* nocapture %0) {
%2 = load i64, i64* %0
%3 = and i64 %2, 39
%4 = icmp eq i64 %3, 0
%5 = select i1 %4, i32 -40, i32 -20
ret i32 %5
}
int isspace(int c) {
  return c == ' ' || c == '\t' || c == '\r' || c == '\n' || c == '\f' ||
         c == '\v';
}


x86 assembly (clang, -O0):
<isspace>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    $0x1,%al
cmpl   $0x20,-0x4(%rbp)
mov    %al,-0x5(%rbp)
je     115c <isspace+0x5c>
mov    $0x1,%al
cmpl   $0x9,-0x4(%rbp)
mov    %al,-0x5(%rbp)
je     115c <isspace+0x5c>
mov    $0x1,%al
cmpl   $0xd,-0x4(%rbp)
mov    %al,-0x5(%rbp)
je     115c <isspace+0x5c>
mov    $0x1,%al
cmpl   $0xa,-0x4(%rbp)
mov    %al,-0x5(%rbp)
je     115c <isspace+0x5c>
mov    $0x1,%al
cmpl   $0xc,-0x4(%rbp)
mov    %al,-0x5(%rbp)
je     115c <isspace+0x5c>
cmpl   $0xb,-0x4(%rbp)
sete   %al
mov    %al,-0x5(%rbp)
mov    -0x5(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<isspace>:
cmp    $0x20,%edi
ja     111d <isspace+0x1d>
mov    $0x1,%eax
mov    %edi,%ecx
movabs $0x100003600,%rdx
bt     %rcx,%rdx
jae    111d <isspace+0x1d>
ret
xor    %eax,%eax
cmp    $0xb,%edi
sete   %al
ret

LLVM IR (-O0):
define i32 @isspace(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = icmp eq i32 %3, 32
br i1 %4, label %20, label %5
5: ; preds = %1
%6 = load i32, i32* %2
%7 = icmp eq i32 %6, 9
br i1 %7, label %20, label %8
8: ; preds = %5
%9 = load i32, i32* %2
%10 = icmp eq i32 %9, 13
br i1 %10, label %20, label %11
11: ; preds = %8
%12 = load i32, i32* %2
%13 = icmp eq i32 %12, 10
br i1 %13, label %20, label %14
14: ; preds = %11
%15 = load i32, i32* %2
%16 = icmp eq i32 %15, 12
br i1 %16, label %20, label %17
17: ; preds = %14
%18 = load i32, i32* %2
%19 = icmp eq i32 %18, 11
br label %20
20: ; preds = %17, %14, %11, %8, %5, %1
%21 = phi i1 [ true, %14 ], [ true, %11 ], [ true, %8 ], [ true, %5 ], [ true, %1 ], [ %19, %17 ]
%22 = zext i1 %21 to i32
ret i32 %22
}

LLVM IR (-O2):
define i32 @isspace(i32 %0) {
switch i32 %0, label %2 [
i32 32, label %5
i32 13, label %5
i32 12, label %5
i32 10, label %5
i32 9, label %5
]
2: ; preds = %1
%3 = icmp eq i32 %0, 11
%4 = zext i1 %3 to i32
br label %5
5: ; preds = %1, %1, %1, %1, %1, %2
%6 = phi i32 [ 1, %1 ], [ %4, %2 ], [ 1, %1 ], [ 1, %1 ], [ 1, %1 ], [ 1, %1 ]
ret i32 %6
}
int fun431() { return 431; }


x86 assembly (clang, -O0):
<fun431>:
push   %rbp
mov    %rsp,%rbp
mov    $0x1af,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @fun431() {
ret i32 431
}

LLVM IR (-O2):
define i32 @fun431() {
ret i32 431
}
/* Type definitions */
typedef int /*<<< orphan*/ wchar_t;
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ fwscanf(int /*<<< orphan*/ *, int /*<<< orphan*/ *, ...);
void uninivar_fwscanf(void) {
  FILE *stream;
  wchar_t *format;
  int i;
  (void)fwscanf(stream, format);
  (void)fwscanf(stream, format, &i);
}


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

x86 assembly (clang, -O2):
<uninivar_fwscanf>:
push   %rax
xor    %eax,%eax
call   1030 <fwscanf@plt>
lea    0x4(%rsp),%rdx
xor    %eax,%eax
call   1030 <fwscanf@plt>
pop    %rax
ret

LLVM IR (-O0):
define void @uninivar_fwscanf() {
%1 = alloca i32*
%2 = alloca i32*
%3 = alloca i32
%4 = load i32*, i32** %1
%5 = load i32*, i32** %2
%6 = call i32 (i32*, i32*, ...) @fwscanf(i32* %4, i32* %5)
%7 = load i32*, i32** %1
%8 = load i32*, i32** %2
%9 = call i32 (i32*, i32*, ...) @fwscanf(i32* %7, i32* %8, i32* %3)
ret void
}

LLVM IR (-O2):
define void @uninivar_fwscanf() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
%3 = tail call i32 (i32*, i32*, ...) @fwscanf(i32* undef, i32* undef)
%4 = call i32 (i32*, i32*, ...) @fwscanf(i32* undef, i32* undef, i32* %1)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ free(void *);
int pdict_ent_remove_change_listeners_cb(const void *v, const void *v0,
                                         void *a) {
  free((void *)v);
  v = NULL;
  return (1);
}


x86 assembly (clang, -O0):
<pdict_ent_remove_change_listeners_cb>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <free@plt>
movq   $0x0,-0x8(%rbp)
mov    $0x1,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<pdict_ent_remove_change_listeners_cb>:
push   %rax
call   1030 <free@plt>
mov    $0x1,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
define i32 @pdict_ent_remove_change_listeners_cb(i8* nocapture %0, i8* nocapture readnone %1, i8* nocapture readnone %2) {
%4 = tail call i32 @free(i8* %0)
ret i32 1
}
void delete_file_manager() {}


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

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

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

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


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeca(%rip),%rdi
lea    -0x8(%rbp),%rsi
call   1040 <scanf@plt>
mov    -0x8(%rbp),%esi
imul   -0x8(%rbp),%esi
mov    -0x8(%rbp),%edx
imul   -0x8(%rbp),%edx
imul   -0x8(%rbp),%edx
lea    0xeab(%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>
mov    0x4(%rsp),%edx
mov    %edx,%esi
imul   %edx,%esi
imul   %esi,%edx
lea    0xebe(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
@.str = [3 x i8] c"%d\00"
@.str.1 = [7 x i8] c"%d\0A%d\0A\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 = mul nsw i32 %4, %4
%6 = mul nsw i32 %5, %4
%7 = call i32 @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0), i32 %5, i32 %6)
ret i32 0
}
_Bool QuietNotEqual(double f1, double f2) { return f1 != f2; }


x86 assembly (clang, -O0):
<QuietNotEqual>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  -0x8(%rbp),%xmm0
ucomisd -0x10(%rbp),%xmm0
setne  %al
setp   %cl
or     %cl,%al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<QuietNotEqual>:
cmpneqsd %xmm1,%xmm0
movq   %xmm0,%rax
and    $0x1,%eax
ret

LLVM IR (-O0):
define zeroext i1 @QuietNotEqual(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 une double %5, %6
ret i1 %7
}

LLVM IR (-O2):
define zeroext i1 @QuietNotEqual(double %0, double %1) {
%3 = fcmp une double %0, %1
ret i1 %3
}
/* Variables and functions */
int /*<<< orphan*/ loopForever(int);
int /*<<< orphan*/ printf(char *, unsigned long, unsigned long);
void printInputThenLoop2(unsigned long a, unsigned long b) {
  printf("\na: %lu, b: %lu\n", a, b);
  loopForever(2);
}


x86 assembly (clang, -O0):
<printInputThenLoop2>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rsi
mov    -0x10(%rbp),%rdx
lea    0xec1(%rip),%rdi
call   1030 <printf@plt>
mov    $0x2,%edi
call   1040 <loopForever@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<printInputThenLoop2>:
push   %rax
mov    %rsi,%rdx
mov    %rdi,%rsi
lea    0xed2(%rip),%rdi
call   1030 <printf@plt>
mov    $0x2,%edi
pop    %rax
jmp    1040 <loopForever@plt>

LLVM IR (-O0):
@.str = [17 x i8] c"\0Aa: %lu, b: %lu\0A\00"
define void @printInputThenLoop2(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 = call i32 @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0), i64 %5, i64 %6)
%8 = call i32 @loopForever(i32 2)
ret void
}

LLVM IR (-O2):
@.str = [17 x i8] c"\0Aa: %lu, b: %lu\0A\00"
define void @printInputThenLoop2(i64 %0, i64 %1) {
%3 = tail call i32 @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0), i64 %0, i64 %1)
%4 = tail call i32 @loopForever(i32 2)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, float const, float const, float const,
                          float const);
void mlSpherePrint(const float *a) {
  printf("[(%f, %f, %f), %f]\n", a[0], a[1], a[2], a[3]);
}


x86 assembly (clang, -O0):
<mlSpherePrint>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movss  (%rax),%xmm0
mov    -0x8(%rbp),%rax
movss  0x4(%rax),%xmm1
mov    -0x8(%rbp),%rax
movss  0x8(%rax),%xmm2
mov    -0x8(%rbp),%rax
movss  0xc(%rax),%xmm3
lea    0xeba(%rip),%rdi
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<mlSpherePrint>:
movss  (%rdi),%xmm0
movss  0x4(%rdi),%xmm1
movss  0x8(%rdi),%xmm2
movss  0xc(%rdi),%xmm3
lea    0xed6(%rip),%rdi
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [20 x i8] c"[(%f, %f, %f), %f]\0A\00"
define void @mlSpherePrint(float* %0) {
%2 = alloca float*
store float* %0, float** %2
%3 = load float*, float** %2
%4 = getelementptr inbounds float, float* %3, i64 0
%5 = load float, float* %4
%6 = load float*, float** %2
%7 = getelementptr inbounds float, float* %6, i64 1
%8 = load float, float* %7
%9 = load float*, float** %2
%10 = getelementptr inbounds float, float* %9, i64 2
%11 = load float, float* %10
%12 = load float*, float** %2
%13 = getelementptr inbounds float, float* %12, i64 3
%14 = load float, float* %13
%15 = call i32 @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0), float %5, float %8, float %11, float %14)
ret void
}

LLVM IR (-O2):
@.str = [20 x i8] c"[(%f, %f, %f), %f]\0A\00"
define void @mlSpherePrint(float* nocapture %0) {
%2 = load float, float* %0
%3 = getelementptr inbounds float, float* %0, i64 1
%4 = load float, float* %3
%5 = getelementptr inbounds float, float* %0, i64 2
%6 = load float, float* %5
%7 = getelementptr inbounds float, float* %0, i64 3
%8 = load float, float* %7
%9 = tail call i32 @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0), float %2, float %4, float %6, float %8)
ret void
}
void setrgbpalette(int i, int i1, int i2, int i3) {}


x86 assembly (clang, -O0):
<setrgbpalette>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    %ecx,-0x10(%rbp)
pop    %rbp
ret

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

LLVM IR (-O0):
define void @setrgbpalette(i32 %0, i32 %1, i32 %2, i32 %3) {
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
store i32 %0, i32* %5
store i32 %1, i32* %6
store i32 %2, i32* %7
store i32 %3, i32* %8
ret void
}

LLVM IR (-O2):
define void @setrgbpalette(i32 %0, i32 %1, i32 %2, i32 %3) {
ret void
}
/* Forward declarations */
typedef struct TYPE_4__ TYPE_2__;
typedef struct TYPE_3__ TYPE_1__;

/* Type definitions */
struct TYPE_3__ {
  scalar_t__ type;
};
struct TYPE_4__ {
  TYPE_1__ xreparent;
};
typedef TYPE_2__ XEvent;

/* Variables and functions */
int get_XEvent_xreparent_type(void *_p) {
  return (int)((XEvent *)_p)->xreparent.type;
}


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

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

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

LLVM IR (-O2):
define i32 @get_XEvent_xreparent_type(i8* nocapture %0) {
%2 = bitcast i8* %0 to i64*
%3 = load i64, i64* %2
%4 = trunc i64 %3 to i32
ret i32 %4
}
int foo(int v) { return 2 * v; }


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

x86 assembly (clang, -O2):
<foo>:
lea    (%rdi,%rdi,1),%eax
ret

LLVM IR (-O0):
define i32 @foo(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = mul nsw i32 2, %3
ret i32 %4
}

LLVM IR (-O2):
define i32 @foo(i32 %0) {
%2 = shl nsw i32 %0, 1
ret i32 %2
}
/* Variables and functions */
int /*<<< orphan*/ strcpy(char *, char *);
int GetDefaultPath(char *path) {
  if (path != NULL)
    strcpy(path, "A:\\GAME");
  return 0;
}


x86 assembly (clang, -O0):
<GetDefaultPath>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
cmpq   $0x0,-0x8(%rbp)
je     1137 <GetDefaultPath+0x27>
mov    -0x8(%rbp),%rdi
lea    0xece(%rip),%rsi
call   1030 <strcpy@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<GetDefaultPath>:
test   %rdi,%rdi
je     1126 <GetDefaultPath+0x16>
push   %rax
lea    0xee3(%rip),%rsi
call   1030 <strcpy@plt>
add    $0x8,%rsp
xor    %eax,%eax
ret

LLVM IR (-O0):
@.str = [8 x i8] c"A:\\GAME\00"
define i32 @GetDefaultPath(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = icmp ne i8* %3, null
br i1 %4, label %5, label %8
5: ; preds = %1
%6 = load i8*, i8** %2
%7 = call i32 @strcpy(i8* %6, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0))
br label %8
8: ; preds = %5, %1
ret i32 0
}

LLVM IR (-O2):
@.str = [8 x i8] c"A:\\GAME\00"
define i32 @GetDefaultPath(i8* %0) {
%2 = icmp eq i8* %0, null
br i1 %2, label %5, label %3
3: ; preds = %1
%4 = tail call i32 @strcpy(i8* %0, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0))
br label %5
5: ; preds = %3, %1
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
int /*<<< orphan*/ stderr;
void sigpipehand(int sig) {
  fprintf(stderr, "Sigpipe occured\n");
  exit(1);
}


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

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

LLVM IR (-O0):
@stderr = global i32 0
@.str = [17 x i8] c"Sigpipe occured\0A\00"
define void @sigpipehand(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* @stderr
%4 = call i32 @fprintf(i32 %3, i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0))
%5 = call i32 @exit(i32 1)
unreachable
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [17 x i8] c"Sigpipe occured\0A\00"
define void @sigpipehand(i32 %0) {
%2 = load i32, i32* @stderr
%3 = tail call i32 @fprintf(i32 %2, i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0))
%4 = tail call i32 @exit(i32 1)
unreachable
}
int fastrand() {
  static int g_seed = 23;
  g_seed = (214013 * g_seed + 2531011);
  return (g_seed >> 16) & 0x7FFF;
}


x86 assembly (clang, -O0):
<fastrand>:
push   %rbp
mov    %rsp,%rbp
imul   $0x343fd,0x2f12(%rip),%eax
add    $0x269ec3,%eax
mov    %eax,0x2f07(%rip)
mov    0x2f01(%rip),%eax
sar    $0x10,%eax
and    $0x7fff,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<fastrand>:
imul   $0x343fd,0x2f16(%rip),%eax
add    $0x269ec3,%eax
mov    %eax,0x2f0b(%rip)
shr    $0x10,%eax
and    $0x7fff,%eax
ret

LLVM IR (-O0):
@fastrand.g_seed = internal global i32 23
define i32 @fastrand() {
%1 = load i32, i32* @fastrand.g_seed
%2 = mul nsw i32 214013, %1
%3 = add nsw i32 %2, 2531011
store i32 %3, i32* @fastrand.g_seed
%4 = load i32, i32* @fastrand.g_seed
%5 = ashr i32 %4, 16
%6 = and i32 %5, 32767
ret i32 %6
}

LLVM IR (-O2):
@fastrand.g_seed = internal unnamed_addr global i32 23
define i32 @fastrand() {
%1 = load i32, i32* @fastrand.g_seed
%2 = mul nsw i32 %1, 214013
%3 = add nsw i32 %2, 2531011
store i32 %3, i32* @fastrand.g_seed
%4 = lshr i32 %3, 16
%5 = and i32 %4, 32767
ret i32 %5
}
int gcd(int a, int b) {
  while (b) {
    int t = b;
    b = a % b;
    a = t;
  }
  return a;
}


x86 assembly (clang, -O0):
<gcd>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
cmpl   $0x0,-0x8(%rbp)
je     112f <gcd+0x2f>
mov    -0x8(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0x4(%rbp),%eax
cltd
idivl  -0x8(%rbp)
mov    %edx,-0x8(%rbp)
mov    -0xc(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    110a <gcd+0xa>
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<gcd>:
mov    %edi,%eax
test   %esi,%esi
je     111d <gcd+0x1d>
mov    %esi,%edx
nopl   0x0(%rax,%rax,1)
mov    %edx,%ecx
cltd
idiv   %ecx
mov    %ecx,%eax
test   %edx,%edx
jne    1110 <gcd+0x10>
mov    %ecx,%eax
ret

LLVM IR (-O0):
define i32 @gcd(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
br label %6
6: ; preds = %9, %2
%7 = load i32, i32* %4
%8 = icmp ne i32 %7, 0
br i1 %8, label %9, label %15
9: ; preds = %6
%10 = load i32, i32* %4
store i32 %10, i32* %5
%11 = load i32, i32* %3
%12 = load i32, i32* %4
%13 = srem i32 %11, %12
store i32 %13, i32* %4
%14 = load i32, i32* %5
store i32 %14, i32* %3
br label %6
15: ; preds = %6
%16 = load i32, i32* %3
ret i32 %16
}

LLVM IR (-O2):
define i32 @gcd(i32 %0, i32 %1) {
%3 = icmp eq i32 %1, 0
br i1 %3, label %9, label %4
4: ; preds = %2, %4
%5 = phi i32 [ %6, %4 ], [ %0, %2 ]
%6 = phi i32 [ %7, %4 ], [ %1, %2 ]
%7 = srem i32 %5, %6
%8 = icmp eq i32 %7, 0
br i1 %8, label %9, label %4
9: ; preds = %4, %2
%10 = phi i32 [ %0, %2 ], [ %6, %4 ]
ret i32 %10
}