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

/* Variables and functions */
struct eb32_node *__eb32_insert(struct eb_root *, struct eb32_node *);
struct eb32_node *eb32_insert(struct eb_root *root, struct eb32_node *new) {
  return __eb32_insert(root, new);
}


x86 assembly (clang, -O0):
<eb32_insert>:
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 <__eb32_insert@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<eb32_insert>:
jmp    1030 <__eb32_insert@plt>

LLVM IR (-O0):
%struct.eb_root = type { i32 }
%struct.eb32_node = type { i32 }
define %struct.eb32_node* @eb32_insert(%struct.eb_root* %0, %struct.eb32_node* %1) {
%3 = alloca %struct.eb_root*
%4 = alloca %struct.eb32_node*
store %struct.eb_root* %0, %struct.eb_root** %3
store %struct.eb32_node* %1, %struct.eb32_node** %4
%5 = load %struct.eb_root*, %struct.eb_root** %3
%6 = load %struct.eb32_node*, %struct.eb32_node** %4
%7 = call %struct.eb32_node* @__eb32_insert(%struct.eb_root* %5, %struct.eb32_node* %6)
ret %struct.eb32_node* %7
}

LLVM IR (-O2):
%struct.eb_root = type { i32 }
%struct.eb32_node = type { i32 }
define %struct.eb32_node* @eb32_insert(%struct.eb_root* %0, %struct.eb32_node* %1) {
%3 = tail call %struct.eb32_node* @__eb32_insert(%struct.eb_root* %0, %struct.eb32_node* %1)
ret %struct.eb32_node* %3
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char *);
int /*<<< orphan*/ stderr;
void speex_error(char *str) {
  fprintf(stderr, "Fatal error: %s\n", str);
  exit(1);
}


x86 assembly (clang, -O0):
<speex_error>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    0x2ead(%rip),%rax
mov    (%rax),%edi
mov    -0x8(%rbp),%rdx
lea    0xec0(%rip),%rsi
call   1030 <fprintf@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<speex_error>:
push   %rax
mov    %rdi,%rdx
mov    0x2eb5(%rip),%rax
mov    (%rax),%edi
lea    0xecc(%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"Fatal error: %s\0A\00"
define void @speex_error(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i32, i32* @stderr
%4 = load i8*, i8** %2
%5 = call i32 @fprintf(i32 %3, i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0), i8* %4)
%6 = call i32 @exit(i32 1)
unreachable
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [17 x i8] c"Fatal error: %s\0A\00"
define void @speex_error(i8* %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), i8* %0)
%4 = tail call i32 @exit(i32 1)
unreachable
}
int sspm_is_printable(char c) { return (c >= 33) && (c <= 126) && (c != '='); }


x86 assembly (clang, -O0):
<sspm_is_printable>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movsbl -0x1(%rbp),%ecx
xor    %eax,%eax
cmp    $0x21,%ecx
mov    %al,-0x2(%rbp)
jl     113b <sspm_is_printable+0x3b>
movsbl -0x1(%rbp),%ecx
xor    %eax,%eax
cmp    $0x7e,%ecx
mov    %al,-0x2(%rbp)
jg     113b <sspm_is_printable+0x3b>
movsbl -0x1(%rbp),%eax
cmp    $0x3d,%eax
setne  %al
mov    %al,-0x2(%rbp)
mov    -0x2(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<sspm_is_printable>:
lea    -0x21(%rdi),%eax
cmp    $0x5e,%al
setb   %al
cmp    $0x3d,%dil
setne  %cl
and    %al,%cl
movzbl %cl,%eax
ret

LLVM IR (-O0):
define i32 @sspm_is_printable(i8 signext %0) {
%2 = alloca i8
store i8 %0, i8* %2
%3 = load i8, i8* %2
%4 = sext i8 %3 to i32
%5 = icmp sge i32 %4, 33
br i1 %5, label %6, label %14
6: ; preds = %1
%7 = load i8, i8* %2
%8 = sext i8 %7 to i32
%9 = icmp sle i32 %8, 126
br i1 %9, label %10, label %14
10: ; preds = %6
%11 = load i8, i8* %2
%12 = sext i8 %11 to i32
%13 = icmp ne i32 %12, 61
br label %14
14: ; preds = %10, %6, %1
%15 = phi i1 [ false, %6 ], [ false, %1 ], [ %13, %10 ]
%16 = zext i1 %15 to i32
ret i32 %16
}

LLVM IR (-O2):
define i32 @sspm_is_printable(i8 signext %0) {
%2 = add i8 %0, -33
%3 = icmp ult i8 %2, 94
%4 = icmp ne i8 %0, 61
%5 = and i1 %4, %3
%6 = zext i1 %5 to i32
ret i32 %6
}
/* Variables and functions */
int /*<<< orphan*/ jstp_tx_char(char);
void jstp_tx_end() {
  jstp_tx_char('}');
  jstp_tx_char('\n');
}


x86 assembly (clang, -O0):
<jstp_tx_end>:
push   %rbp
mov    %rsp,%rbp
mov    $0x7d,%edi
call   1030 <jstp_tx_char@plt>
mov    $0xa,%edi
call   1030 <jstp_tx_char@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<jstp_tx_end>:
push   %rax
mov    $0x7d,%edi
call   1030 <jstp_tx_char@plt>
mov    $0xa,%edi
pop    %rax
jmp    1030 <jstp_tx_char@plt>

LLVM IR (-O0):
define void @jstp_tx_end() {
%1 = call i32 @jstp_tx_char(i8 signext 125)
%2 = call i32 @jstp_tx_char(i8 signext 10)
ret void
}

LLVM IR (-O2):
define void @jstp_tx_end() {
%1 = tail call i32 @jstp_tx_char(i8 signext 125)
%2 = tail call i32 @jstp_tx_char(i8 signext 10)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ miniscanf(char *, int *, char *, int *);
int /*<<< orphan*/ printf(char *, int, char *, int);
main() {
  int day, year;
  char month[20];
  miniscanf("%d %s %d", &year, month, &day);
  printf("%d/%s/%d\n", year, month, day);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
lea    -0x20(%rbp),%rdx
lea    0xec6(%rip),%rdi
lea    -0xc(%rbp),%rsi
lea    -0x8(%rbp),%rcx
call   1040 <miniscanf@plt>
mov    -0xc(%rbp),%esi
lea    -0x20(%rbp),%rdx
mov    -0x8(%rbp),%ecx
lea    0xeb1(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x30,%rsp
lea    0xed4(%rip),%rdi
lea    0x8(%rsp),%rsi
lea    0x10(%rsp),%rbx
lea    0xc(%rsp),%rcx
mov    %rbx,%rdx
call   1040 <miniscanf@plt>
mov    0x8(%rsp),%esi
mov    0xc(%rsp),%ecx
lea    0xeb7(%rip),%rdi
mov    %rbx,%rdx
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x30,%rsp
pop    %rbx
ret

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

LLVM IR (-O2):
@.str = [9 x i8] c"%d %s %d\00"
@.str.1 = [10 x i8] c"%d/%s/%d\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca [20 x i8]
%4 = bitcast i32* %1 to i8*
%5 = bitcast i32* %2 to i8*
%6 = getelementptr inbounds [20 x i8], [20 x i8]* %3, i64 0, i64 0
%7 = call i32 @miniscanf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), i32* %2, i8* %6, i32* %1)
%8 = load i32, i32* %2
%9 = load i32, i32* %1
%10 = call i32 @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.1, i64 0, i64 0), i32 %8, i8* %6, i32 %9)
ret i32 0
}
/* Variables and functions */
scalar_t__ cos(double);
float cosf(float s) { return (float)cos((double)s); }


x86 assembly (clang, -O0):
<cosf>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movss  %xmm0,-0x4(%rbp)
movss  -0x4(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
call   1030 <cos@plt>
cvtsi2ss %rax,%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<cosf>:
push   %rax
cvtss2sd %xmm0,%xmm0
call   1030 <cos@plt>
xorps  %xmm0,%xmm0
cvtsi2ss %rax,%xmm0
pop    %rax
ret

LLVM IR (-O0):
define float @cosf(float %0) {
%2 = alloca float
store float %0, float* %2
%3 = load float, float* %2
%4 = fpext float %3 to double
%5 = call i64 @cos(double %4)
%6 = sitofp i64 %5 to float
ret float %6
}

LLVM IR (-O2):
define float @cosf(float %0) {
%2 = fpext float %0 to double
%3 = tail call i64 @cos(double %2)
%4 = sitofp i64 %3 to float
ret float %4
}
/* Variables and functions */
int /*<<< orphan*/ box_fill8(char *, int, int, int, int, int, int);
void draw_boxes() {
  char *vram = (char *)0xa0000;
  int width = 320;
  box_fill8(vram, width, 20, 20, 120, 120, 1);
  box_fill8(vram, width, 70, 50, 170, 150, 2);
  box_fill8(vram, width, 120, 80, 220, 180, 4);
}


x86 assembly (clang, -O0):
<draw_boxes>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    $0xa0000,%eax
mov    %rax,-0x8(%rbp)
movl   $0x140,-0xc(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
mov    $0x14,%ecx
mov    $0x78,%r9d
mov    %ecx,%edx
mov    %r9d,%r8d
movl   $0x1,(%rsp)
call   1030 <box_fill8@plt>
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
mov    $0x46,%edx
mov    $0x32,%ecx
mov    $0xaa,%r8d
mov    $0x96,%r9d
movl   $0x2,(%rsp)
call   1030 <box_fill8@plt>
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
mov    $0x78,%edx
mov    $0x50,%ecx
mov    $0xdc,%r8d
mov    $0xb4,%r9d
movl   $0x4,(%rsp)
call   1030 <box_fill8@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<draw_boxes>:
push   %rax
movl   $0x1,(%rsp)
mov    $0xa0000,%edi
mov    $0x140,%esi
mov    $0x14,%edx
mov    $0x14,%ecx
mov    $0x78,%r8d
mov    $0x78,%r9d
call   1030 <box_fill8@plt>
movl   $0x2,(%rsp)
mov    $0xa0000,%edi
mov    $0x140,%esi
mov    $0x46,%edx
mov    $0x32,%ecx
mov    $0xaa,%r8d
mov    $0x96,%r9d
call   1030 <box_fill8@plt>
movl   $0x4,(%rsp)
mov    $0xa0000,%edi
mov    $0x140,%esi
mov    $0x78,%edx
mov    $0x50,%ecx
mov    $0xdc,%r8d
mov    $0xb4,%r9d
call   1030 <box_fill8@plt>
pop    %rax
ret

LLVM IR (-O0):
define void @draw_boxes() {
%1 = alloca i8*
%2 = alloca i32
store i8* inttoptr (i64 655360 to i8*), i8** %1
store i32 320, i32* %2
%3 = load i8*, i8** %1
%4 = load i32, i32* %2
%5 = call i32 @box_fill8(i8* %3, i32 %4, i32 20, i32 20, i32 120, i32 120, i32 1)
%6 = load i8*, i8** %1
%7 = load i32, i32* %2
%8 = call i32 @box_fill8(i8* %6, i32 %7, i32 70, i32 50, i32 170, i32 150, i32 2)
%9 = load i8*, i8** %1
%10 = load i32, i32* %2
%11 = call i32 @box_fill8(i8* %9, i32 %10, i32 120, i32 80, i32 220, i32 180, i32 4)
ret void
}

LLVM IR (-O2):
define void @draw_boxes() {
%1 = tail call i32 @box_fill8(i8* inttoptr (i64 655360 to i8*), i32 320, i32 20, i32 20, i32 120, i32 120, i32 1)
%2 = tail call i32 @box_fill8(i8* inttoptr (i64 655360 to i8*), i32 320, i32 70, i32 50, i32 170, i32 150, i32 2)
%3 = tail call i32 @box_fill8(i8* inttoptr (i64 655360 to i8*), i32 320, i32 120, i32 80, i32 220, i32 180, i32 4)
ret void
}
/* Variables and functions */
int strlen(char *);
void RTF_BuildName(char *token, char ch) {
  int len;
  len = strlen(token);
  if (len >= 40 - 1)
    return;
  token[len] = ch;
  token[len + 1] = 0;
}


x86 assembly (clang, -O0):
<RTF_BuildName>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %sil,%al
mov    %rdi,-0x8(%rbp)
mov    %al,-0x9(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <strlen@plt>
mov    %eax,-0x10(%rbp)
cmpl   $0x27,-0x10(%rbp)
jl     113d <RTF_BuildName+0x2d>
jmp    115c <RTF_BuildName+0x4c>
mov    -0x9(%rbp),%dl
mov    -0x8(%rbp),%rax
movslq -0x10(%rbp),%rcx
mov    %dl,(%rax,%rcx,1)
mov    -0x8(%rbp),%rax
mov    -0x10(%rbp),%ecx
add    $0x1,%ecx
movslq %ecx,%rcx
movb   $0x0,(%rax,%rcx,1)
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<RTF_BuildName>:
push   %rbp
push   %rbx
push   %rax
mov    %esi,%ebp
mov    %rdi,%rbx
call   1030 <strlen@plt>
cmp    $0x26,%eax
jg     112d <RTF_BuildName+0x1d>
cltq
mov    %bpl,(%rbx,%rax,1)
movb   $0x0,0x1(%rbx,%rax,1)
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

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

LLVM IR (-O2):
define void @RTF_BuildName(i8* %0, i8 signext %1) {
%3 = tail call i32 @strlen(i8* %0)
%4 = icmp sgt i32 %3, 38
br i1 %4, label %11, label %5
5: ; preds = %2
%6 = sext i32 %3 to i64
%7 = getelementptr inbounds i8, i8* %0, i64 %6
store i8 %1, i8* %7
%8 = add nsw i32 %3, 1
%9 = sext i32 %8 to i64
%10 = getelementptr inbounds i8, i8* %0, i64 %9
store i8 0, i8* %10
br label %11
11: ; preds = %2, %5
ret void
}
XSetRegion() {}


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

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

LLVM IR (-O0):
define i32 @XSetRegion() {
%1 = alloca i32
%2 = load i32, i32* %1
ret i32 %2
}

LLVM IR (-O2):
define i32 @XSetRegion() {
ret i32 undef
}
/* Variables and functions */
int /*<<< orphan*/ ecleq_aux(int, double, double, double, double *, double *);
void ecl_eq(double mj, double lt, double lg, double *ra, double *dec) {
  ecleq_aux((-1), mj, lg, lt, ra, dec);
}


x86 assembly (clang, -O0):
<ecl_eq>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  %xmm2,-0x18(%rbp)
mov    %rdi,-0x20(%rbp)
mov    %rsi,-0x28(%rbp)
movsd  -0x8(%rbp),%xmm0
movsd  -0x18(%rbp),%xmm1
movsd  -0x10(%rbp),%xmm2
mov    -0x20(%rbp),%rsi
mov    -0x28(%rbp),%rdx
mov    $0xffffffff,%edi
call   1030 <ecleq_aux@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ecl_eq>:
mov    %rsi,%rdx
mov    %rdi,%rsi
movaps %xmm1,%xmm3
mov    $0xffffffff,%edi
movaps %xmm2,%xmm1
movaps %xmm3,%xmm2
jmp    1030 <ecleq_aux@plt>

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

LLVM IR (-O2):
define void @ecl_eq(double %0, double %1, double %2, double* %3, double* %4) {
%6 = tail call i32 @ecleq_aux(i32 -1, double %0, double %2, double %1, double* %3, double* %4)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ inmidi_programchange(int, int, int);
int libpd_programchange(int channel, int value) {
  if (channel < 0)
    return -1;
  if (value < 0 || value > 0x7f)
    return -1;
  inmidi_programchange((channel >> 4), (channel & 0x0f), value);
  return 0;
}


x86 assembly (clang, -O0):
<libpd_programchange>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
cmpl   $0x0,-0x8(%rbp)
jge    1134 <libpd_programchange+0x24>
movl   $0xffffffff,-0x4(%rbp)
jmp    116f <libpd_programchange+0x5f>
cmpl   $0x0,-0xc(%rbp)
jl     1148 <libpd_programchange+0x38>
cmpl   $0x7f,-0xc(%rbp)
jle    1154 <libpd_programchange+0x44>
movl   $0xffffffff,-0x4(%rbp)
jmp    116f <libpd_programchange+0x5f>
mov    -0x8(%rbp),%edi
sar    $0x4,%edi
mov    -0x8(%rbp),%esi
and    $0xf,%esi
mov    -0xc(%rbp),%edx
call   1030 <inmidi_programchange@plt>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<libpd_programchange>:
mov    $0xffffffff,%eax
test   %edi,%edi
js     1134 <libpd_programchange+0x24>
mov    %esi,%edx
cmp    $0x7f,%esi
ja     1134 <libpd_programchange+0x24>
push   %rax
mov    %edi,%esi
shr    $0x4,%edi
and    $0xf,%esi
call   1030 <inmidi_programchange@plt>
xor    %eax,%eax
add    $0x8,%rsp
ret

LLVM IR (-O0):
define i32 @libpd_programchange(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
store i32 %0, i32* %4
store i32 %1, i32* %5
%6 = load i32, i32* %4
%7 = icmp slt i32 %6, 0
br i1 %7, label %8, label %9
8: ; preds = %2
store i32 -1, i32* %3
br label %23
9: ; preds = %2
%10 = load i32, i32* %5
%11 = icmp slt i32 %10, 0
br i1 %11, label %15, label %12
12: ; preds = %9
%13 = load i32, i32* %5
%14 = icmp sgt i32 %13, 127
br i1 %14, label %15, label %16
15: ; preds = %12, %9
store i32 -1, i32* %3
br label %23
16: ; preds = %12
%17 = load i32, i32* %4
%18 = ashr i32 %17, 4
%19 = load i32, i32* %4
%20 = and i32 %19, 15
%21 = load i32, i32* %5
%22 = call i32 @inmidi_programchange(i32 %18, i32 %20, i32 %21)
store i32 0, i32* %3
br label %23
23: ; preds = %16, %15, %8
%24 = load i32, i32* %3
ret i32 %24
}

LLVM IR (-O2):
define i32 @libpd_programchange(i32 %0, i32 %1) {
%3 = icmp slt i32 %0, 0
%4 = icmp ugt i32 %1, 127
%5 = or i1 %3, %4
br i1 %5, label %10, label %6
6: ; preds = %2
%7 = lshr i32 %0, 4
%8 = and i32 %0, 15
%9 = tail call i32 @inmidi_programchange(i32 %7, i32 %8, i32 %1)
br label %10
10: ; preds = %2, %6
%11 = phi i32 [ 0, %6 ], [ -1, %2 ]
ret i32 %11
}
void module1_section3_topic0() {}


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

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

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

LLVM IR (-O2):
define void @module1_section3_topic0() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ userSetDefault();
void func6Default() { userSetDefault(); }


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

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

LLVM IR (-O0):
define void @func6Default() {
%1 = call i32 (...) @userSetDefault()
ret void
}

LLVM IR (-O2):
define void @func6Default() {
%1 = tail call i32 (...) @userSetDefault()
ret void
}
int ima_module_check(struct file *file) { return 0; }


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

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

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

LLVM IR (-O2):
%struct.file = type opaque
define i32 @ima_module_check(%struct.file* nocapture readnone %0) {
ret i32 0
}
int cpu_is_msm8960(void) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @cpu_is_msm8960() {
ret i32 0
}
int isBigEndian() {
  int x = 1;
  return (*(char *)&x != 1);
}


x86 assembly (clang, -O0):
<isBigEndian>:
push   %rbp
mov    %rsp,%rbp
movl   $0x1,-0x4(%rbp)
movsbl -0x4(%rbp),%eax
cmp    $0x1,%eax
setne  %al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @isBigEndian() {
%1 = alloca i32
store i32 1, i32* %1
%2 = bitcast i32* %1 to i8*
%3 = load i8, i8* %2
%4 = sext i8 %3 to i32
%5 = icmp ne i32 %4, 1
%6 = zext i1 %5 to i32
ret i32 %6
}

LLVM IR (-O2):
define i32 @isBigEndian() {
ret i32 0
}
_Complex long double test_ccosl(_Complex long double x) {
  return __builtin_ccosl(x);
}


x86 assembly (clang, -O0):
<test_ccosl>:
push   %rbp
mov    %rsp,%rbp
sub    $0x60,%rsp
lea    0x10(%rbp),%rax
fldt   (%rax)
fldt   0x10(%rax)
fxch   %st(1)
fstpt  -0x40(%rbp)
fstpt  -0x30(%rbp)
movaps -0x40(%rbp),%xmm0
movaps -0x30(%rbp),%xmm1
mov    %rsp,%rax
movaps %xmm1,0x10(%rax)
movaps %xmm0,(%rax)
call   1030 <ccosl@plt>
fstpt  -0x20(%rbp)
fstpt  -0x10(%rbp)
fldt   -0x10(%rbp)
fldt   -0x20(%rbp)
add    $0x60,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_ccosl>:
sub    $0x48,%rsp
fldt   0x50(%rsp)
fldt   0x60(%rsp)
fxch   %st(1)
fstpt  0x20(%rsp)
fstpt  0x30(%rsp)
movaps 0x20(%rsp),%xmm0
movaps 0x30(%rsp),%xmm1
movaps %xmm1,0x10(%rsp)
movaps %xmm0,(%rsp)
call   1030 <ccosl@plt>
add    $0x48,%rsp
ret

LLVM IR (-O0):
define { x86_fp80, x86_fp80 } @test_ccosl({ x86_fp80, x86_fp80 }* byval({ x86_fp80, x86_fp80 }) align 16 %0) {
%2 = alloca { x86_fp80, x86_fp80 }
%3 = alloca { x86_fp80, x86_fp80 }
%4 = getelementptr inbounds { x86_fp80, x86_fp80 }, { x86_fp80, x86_fp80 }* %0, i32 0, i32 0
%5 = load x86_fp80, x86_fp80* %4
%6 = getelementptr inbounds { x86_fp80, x86_fp80 }, { x86_fp80, x86_fp80 }* %0, i32 0, i32 1
%7 = load x86_fp80, x86_fp80* %6
%8 = getelementptr inbounds { x86_fp80, x86_fp80 }, { x86_fp80, x86_fp80 }* %3, i32 0, i32 0
%9 = getelementptr inbounds { x86_fp80, x86_fp80 }, { x86_fp80, x86_fp80 }* %3, i32 0, i32 1
store x86_fp80 %5, x86_fp80* %8
store x86_fp80 %7, x86_fp80* %9
%10 = call { x86_fp80, x86_fp80 } @ccosl({ x86_fp80, x86_fp80 }* byval({ x86_fp80, x86_fp80 }) align 16 %3)
%11 = extractvalue { x86_fp80, x86_fp80 } %10, 0
%12 = extractvalue { x86_fp80, x86_fp80 } %10, 1
%13 = getelementptr inbounds { x86_fp80, x86_fp80 }, { x86_fp80, x86_fp80 }* %2, i32 0, i32 0
%14 = getelementptr inbounds { x86_fp80, x86_fp80 }, { x86_fp80, x86_fp80 }* %2, i32 0, i32 1
store x86_fp80 %11, x86_fp80* %13
store x86_fp80 %12, x86_fp80* %14
%15 = load { x86_fp80, x86_fp80 }, { x86_fp80, x86_fp80 }* %2
ret { x86_fp80, x86_fp80 } %15
}

LLVM IR (-O2):
define { x86_fp80, x86_fp80 } @test_ccosl({ x86_fp80, x86_fp80 }* nocapture byval({ x86_fp80, x86_fp80 }) align 16 %0) {
%2 = alloca { x86_fp80, x86_fp80 }
%3 = getelementptr inbounds { x86_fp80, x86_fp80 }, { x86_fp80, x86_fp80 }* %0, i64 0, i32 0
%4 = load x86_fp80, x86_fp80* %3
%5 = getelementptr inbounds { x86_fp80, x86_fp80 }, { x86_fp80, x86_fp80 }* %0, i64 0, i32 1
%6 = load x86_fp80, x86_fp80* %5
%7 = getelementptr inbounds { x86_fp80, x86_fp80 }, { x86_fp80, x86_fp80 }* %2, i64 0, i32 0
%8 = getelementptr inbounds { x86_fp80, x86_fp80 }, { x86_fp80, x86_fp80 }* %2, i64 0, i32 1
store x86_fp80 %4, x86_fp80* %7
store x86_fp80 %6, x86_fp80* %8
%9 = tail call { x86_fp80, x86_fp80 } @ccosl({ x86_fp80, x86_fp80 }* byval({ x86_fp80, x86_fp80 }) align 16 %2)
ret { x86_fp80, x86_fp80 } %9
}
/* Variables and functions */
unsigned int str_hash_add(char const *, int /*<<< orphan*/ *);
unsigned int str_hash_del(const char *name) { return str_hash_add(name, NULL); }


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

x86 assembly (clang, -O2):
<str_hash_del>:
xor    %esi,%esi
jmp    1030 <str_hash_add@plt>

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

LLVM IR (-O2):
define i32 @str_hash_del(i8* %0) {
%2 = tail call i32 @str_hash_add(i8* %0, i32* null)
ret i32 %2
}
/* Type definitions */
typedef scalar_t__ uint16_t;

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


x86 assembly (clang, -O0):
<SHAREMIND_MAP_KEY_LESS_uint16_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_uint16_t>:
xor    %eax,%eax
cmp    %rsi,%rdi
setl   %al
ret

LLVM IR (-O0):
define i32 @SHAREMIND_MAP_KEY_LESS_uint16_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_uint16_t(i64 %0, i64 %1) {
%3 = icmp slt i64 %0, %1
%4 = zext i1 %3 to i32
ret i32 %4
}
/* Variables and functions */
int strlen(char *);
void strip(char array[]) {
  int len = strlen(array);
  if (array[len - 1] == '\n') {
    array[len - 1] = '\0';
  }
}


x86 assembly (clang, -O0):
<strip>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <strlen@plt>
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%rax
mov    -0xc(%rbp),%ecx
sub    $0x1,%ecx
movslq %ecx,%rcx
movsbl (%rax,%rcx,1),%eax
cmp    $0xa,%eax
jne    1153 <strip+0x43>
mov    -0x8(%rbp),%rax
mov    -0xc(%rbp),%ecx
sub    $0x1,%ecx
movslq %ecx,%rcx
movb   $0x0,(%rax,%rcx,1)
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<strip>:
push   %rbx
mov    %rdi,%rbx
call   1030 <strlen@plt>
cltq
cmpb   $0xa,-0x1(%rax,%rbx,1)
jne    1127 <strip+0x17>
movb   $0x0,-0x1(%rbx,%rax,1)
pop    %rbx
ret

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

LLVM IR (-O2):
define void @strip(i8* %0) {
%2 = tail call i32 @strlen(i8* %0)
%3 = add nsw i32 %2, -1
%4 = sext i32 %3 to i64
%5 = getelementptr inbounds i8, i8* %0, i64 %4
%6 = load i8, i8* %5
%7 = icmp eq i8 %6, 10
br i1 %7, label %8, label %9
8: ; preds = %1
store i8 0, i8* %5
br label %9
9: ; preds = %8, %1
ret void
}
/* Variables and functions */
scalar_t__ portWrite(char *);
int switch_Temmamountside(void) {
  if (portWrite("PT") < 0)
    return -1;
  return 0;
}


x86 assembly (clang, -O0):
<switch_Temmamountside>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    0xee1(%rip),%rdi
call   1030 <portWrite@plt>
cmp    $0x0,%rax
jge    113a <switch_Temmamountside+0x2a>
movl   $0xffffffff,-0x4(%rbp)
jmp    1141 <switch_Temmamountside+0x31>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<switch_Temmamountside>:
push   %rax
lea    0xee8(%rip),%rdi
call   1030 <portWrite@plt>
sar    $0x3f,%rax
pop    %rcx
ret

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

LLVM IR (-O2):
@.str = [3 x i8] c"PT\00"
define i32 @switch_Temmamountside() {
%1 = tail call i64 @portWrite(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0))
%2 = ashr i64 %1, 63
%3 = trunc i64 %2 to i32
ret i32 %3
}
/* Variables and functions */
int strcmp(void const *, void const *);
int compareFuncForLLFindNodeByData(const void *data_given,
                                   const void *data_in_node) {
  return strcmp(data_given, data_in_node);
}


x86 assembly (clang, -O0):
<compareFuncForLLFindNodeByData>:
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 <strcmp@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<compareFuncForLLFindNodeByData>:
jmp    1030 <strcmp@plt>

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

LLVM IR (-O2):
define i32 @compareFuncForLLFindNodeByData(i8* nocapture %0, i8* nocapture %1) {
%3 = tail call i32 @strcmp(i8* dereferenceable(1) %0, i8* dereferenceable(1) %1)
ret i32 %3
}
/* Type definitions */
typedef int uint64_t;

/* Variables and functions */
int /*<<< orphan*/ assert(int);
int /*<<< orphan*/ read_unixtstamp(char *, int *);
void test_too_long() {
  char *str = "1234.0123456789";
  uint64_t dest;
  read_unixtstamp(str, &dest);
  assert((dest / 1000000000) == 1234 && (dest % 1000000000) == 12345678);
}


x86 assembly (clang, -O0):
<test_too_long>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    0xed1(%rip),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
lea    -0xc(%rbp),%rsi
call   1040 <read_unixtstamp@plt>
mov    -0xc(%rbp),%eax
mov    $0x3b9aca00,%ecx
cltd
idiv   %ecx
mov    %eax,%ecx
xor    %eax,%eax
cmp    $0x4d2,%ecx
mov    %al,-0xd(%rbp)
jne    1175 <test_too_long+0x55>
mov    -0xc(%rbp),%eax
mov    $0x3b9aca00,%ecx
cltd
idiv   %ecx
cmp    $0xbc614e,%edx
sete   %al
mov    %al,-0xd(%rbp)
mov    -0xd(%rbp),%al
and    $0x1,%al
movzbl %al,%edi
call   1030 <assert@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_too_long>:
push   %rax
lea    0xed8(%rip),%rdi
lea    0x4(%rsp),%rsi
call   1040 <read_unixtstamp@plt>
xor    %edi,%edi
call   1030 <assert@plt>
pop    %rax
ret

LLVM IR (-O0):
@.str = [16 x i8] c"1234.0123456789\00"
define void @test_too_long() {
%1 = alloca i8*
%2 = alloca i32
store i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0), i8** %1
%3 = load i8*, i8** %1
%4 = call i32 @read_unixtstamp(i8* %3, i32* %2)
%5 = load i32, i32* %2
%6 = sdiv i32 %5, 1000000000
%7 = icmp eq i32 %6, 1234
br i1 %7, label %8, label %12
8: ; preds = %0
%9 = load i32, i32* %2
%10 = srem i32 %9, 1000000000
%11 = icmp eq i32 %10, 12345678
br label %12
12: ; preds = %8, %0
%13 = phi i1 [ false, %0 ], [ %11, %8 ]
%14 = zext i1 %13 to i32
%15 = call i32 @assert(i32 %14)
ret void
}

LLVM IR (-O2):
@.str = [16 x i8] c"1234.0123456789\00"
define void @test_too_long() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
%3 = call i32 @read_unixtstamp(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0), i32* %1)
%4 = call i32 @assert(i32 0)
ret void
}
void SensorSetBrightness_SANYO(unsigned char val) {}


x86 assembly (clang, -O0):
<SensorSetBrightness_SANYO>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x1(%rbp)
pop    %rbp
ret

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

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

LLVM IR (-O2):
define void @SensorSetBrightness_SANYO(i8 zeroext %0) {
ret void
}
/* Variables and functions */
short _pic_read_reg(int);
short pic_read_isr() { return _pic_read_reg(0x0B); }


x86 assembly (clang, -O0):
<pic_read_isr>:
push   %rbp
mov    %rsp,%rbp
mov    $0xb,%edi
call   1030 <_pic_read_reg@plt>
cwtl
pop    %rbp
ret

x86 assembly (clang, -O2):
<pic_read_isr>:
mov    $0xb,%edi
jmp    1030 <_pic_read_reg@plt>

LLVM IR (-O0):
define signext i16 @pic_read_isr() {
%1 = call signext i16 @_pic_read_reg(i32 11)
ret i16 %1
}

LLVM IR (-O2):
define signext i16 @pic_read_isr() {
%1 = tail call signext i16 @_pic_read_reg(i32 11)
ret i16 %1
}
int use_fixed(int level) {
  static int fixed_level = 0;
  if (level >= 0) {
    fixed_level = level;
  }
  return (fixed_level);
}


x86 assembly (clang, -O0):
<use_fixed>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
cmpl   $0x0,-0x4(%rbp)
jl     111a <use_fixed+0x1a>
mov    -0x4(%rbp),%eax
mov    %eax,0x2f0a(%rip)
mov    0x2f04(%rip),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<use_fixed>:
test   %edi,%edi
js     110d <use_fixed+0xd>
mov    %edi,%eax
mov    %edi,0x2f18(%rip)
ret
mov    0x2f11(%rip),%eax
ret

LLVM IR (-O0):
@use_fixed.fixed_level = internal global i32 0
define i32 @use_fixed(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = icmp sge i32 %3, 0
br i1 %4, label %5, label %7
5: ; preds = %1
%6 = load i32, i32* %2
store i32 %6, i32* @use_fixed.fixed_level
br label %7
7: ; preds = %5, %1
%8 = load i32, i32* @use_fixed.fixed_level
ret i32 %8
}

LLVM IR (-O2):
@use_fixed.fixed_level = internal unnamed_addr global i32 0
define i32 @use_fixed(i32 %0) {
%2 = icmp sgt i32 %0, -1
br i1 %2, label %5, label %3
3: ; preds = %1
%4 = load i32, i32* @use_fixed.fixed_level
br label %6
5: ; preds = %1
store i32 %0, i32* @use_fixed.fixed_level
br label %6
6: ; preds = %3, %5
%7 = phi i32 [ %4, %3 ], [ %0, %5 ]
ret i32 %7
}
/* Variables and functions */
int /*<<< orphan*/ gcn64_shutdown();
int /*<<< orphan*/ pb_freeAllAdapters();
int pb_shutdown(void) {
  pb_freeAllAdapters();
  gcn64_shutdown();
  return 0;
}


x86 assembly (clang, -O0):
<pb_shutdown>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1030 <pb_freeAllAdapters@plt>
mov    $0x0,%al
call   1040 <gcn64_shutdown@plt>
xor    %eax,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @pb_shutdown() {
%1 = call i32 (...) @pb_freeAllAdapters()
%2 = call i32 (...) @gcn64_shutdown()
ret i32 0
}

LLVM IR (-O2):
define i32 @pb_shutdown() {
%1 = tail call i32 (...) @pb_freeAllAdapters()
%2 = tail call i32 (...) @gcn64_shutdown()
ret i32 0
}
unsigned xrop3_51_1_0(unsigned char s, unsigned char t) {
  unsigned D = 0x00ff;
  unsigned S = ((unsigned)s << 8) | s;
  unsigned stk1;
  stk1 = ~S;
  return (stk1 & (~S)) | (D & S);
}


x86 assembly (clang, -O0):
<xrop3_51_1_0>:
push   %rbp
mov    %rsp,%rbp
mov    %sil,%al
mov    %dil,%cl
mov    %cl,-0x1(%rbp)
mov    %al,-0x2(%rbp)
movl   $0xff,-0x8(%rbp)
movzbl -0x1(%rbp),%eax
shl    $0x8,%eax
movzbl -0x1(%rbp),%ecx
or     %ecx,%eax
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
xor    $0xffffffff,%eax
mov    %eax,-0x10(%rbp)
mov    -0x10(%rbp),%eax
mov    -0xc(%rbp),%ecx
xor    $0xffffffff,%ecx
and    %ecx,%eax
mov    -0x8(%rbp),%ecx
and    -0xc(%rbp),%ecx
or     %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<xrop3_51_1_0>:
mov    %edi,%eax
shl    $0x8,%eax
not    %eax
ret

LLVM IR (-O0):
define i32 @xrop3_51_1_0(i8 zeroext %0, i8 zeroext %1) {
%3 = alloca i8
%4 = alloca i8
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
store i8 %0, i8* %3
store i8 %1, i8* %4
store i32 255, i32* %5
%8 = load i8, i8* %3
%9 = zext i8 %8 to i32
%10 = shl i32 %9, 8
%11 = load i8, i8* %3
%12 = zext i8 %11 to i32
%13 = or i32 %10, %12
store i32 %13, i32* %6
%14 = load i32, i32* %6
%15 = xor i32 %14, -1
store i32 %15, i32* %7
%16 = load i32, i32* %7
%17 = load i32, i32* %6
%18 = xor i32 %17, -1
%19 = and i32 %16, %18
%20 = load i32, i32* %5
%21 = load i32, i32* %6
%22 = and i32 %20, %21
%23 = or i32 %19, %22
ret i32 %23
}

LLVM IR (-O2):
define i32 @xrop3_51_1_0(i8 zeroext %0, i8 zeroext %1) {
%3 = zext i8 %0 to i32
%4 = shl nuw nsw i32 %3, 8
%5 = xor i32 %4, -1
ret i32 %5
}
int oom_init(void) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @oom_init() {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ getpid();
int rand();
int /*<<< orphan*/ srand(int /*<<< orphan*/);
char pickLetter(char letters[], int size) {
  srand(getpid());
  int m = rand() % size;
  return letters[m];
}


x86 assembly (clang, -O0):
<pickLetter>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    $0x0,%al
call   1030 <getpid@plt>
mov    %eax,%edi
call   1040 <srand@plt>
mov    $0x0,%al
call   1050 <rand@plt>
cltd
idivl  -0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    -0x8(%rbp),%rax
movslq -0x10(%rbp),%rcx
movsbl (%rax,%rcx,1),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<pickLetter>:
push   %r14
push   %rbx
push   %rax
mov    %esi,%ebx
mov    %rdi,%r14
xor    %eax,%eax
call   1030 <getpid@plt>
mov    %eax,%edi
call   1040 <srand@plt>
xor    %eax,%eax
call   1050 <rand@plt>
cltd
idiv   %ebx
movslq %edx,%rax
mov    (%r14,%rax,1),%al
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define signext i8 @pickLetter(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i32
%5 = alloca i32
store i8* %0, i8** %3
store i32 %1, i32* %4
%6 = call i32 (...) @getpid()
%7 = call i32 @srand(i32 %6)
%8 = call i32 (...) @rand()
%9 = load i32, i32* %4
%10 = srem i32 %8, %9
store i32 %10, i32* %5
%11 = load i8*, i8** %3
%12 = load i32, i32* %5
%13 = sext i32 %12 to i64
%14 = getelementptr inbounds i8, i8* %11, i64 %13
%15 = load i8, i8* %14
ret i8 %15
}

LLVM IR (-O2):
define signext i8 @pickLetter(i8* nocapture %0, i32 %1) {
%3 = tail call i32 (...) @getpid()
%4 = tail call i32 @srand(i32 %3)
%5 = tail call i32 (...) @rand()
%6 = srem i32 %5, %1
%7 = sext i32 %6 to i64
%8 = getelementptr inbounds i8, i8* %0, i64 %7
%9 = load i8, i8* %8
ret i8 %9
}
/* Variables and functions */
int /*<<< orphan*/ PSG_InitialiseEnvelopeShapes();
void PSGPlay_Initialise(void) { PSG_InitialiseEnvelopeShapes(); }


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

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

LLVM IR (-O0):
define void @PSGPlay_Initialise() {
%1 = call i32 (...) @PSG_InitialiseEnvelopeShapes()
ret void
}

LLVM IR (-O2):
define void @PSGPlay_Initialise() {
%1 = tail call i32 (...) @PSG_InitialiseEnvelopeShapes()
ret void
}
/* Type definitions */
struct timeval {
  long long tv_sec;
  long long tv_usec;
};

/* Variables and functions */
scalar_t__ gettimeofday(struct timeval *, int /*<<< orphan*/);
unsigned long inv_get_tick_count() {
  struct timeval tv;
  if (gettimeofday(&tv, 0) != 0)
    return 0;
  return (long)((tv.tv_sec * 1000000LL + tv.tv_usec) / 1000LL);
}


x86 assembly (clang, -O0):
<inv_get_tick_count>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
lea    -0x18(%rbp),%rdi
xor    %esi,%esi
call   1030 <gettimeofday@plt>
cmp    $0x0,%rax
je     113a <inv_get_tick_count+0x2a>
movq   $0x0,-0x8(%rbp)
jmp    1154 <inv_get_tick_count+0x44>
imul   $0xf4240,-0x18(%rbp),%rax
add    -0x10(%rbp),%rax
mov    $0x3e8,%ecx
cqto
idiv   %rcx
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<inv_get_tick_count>:
push   %rbx
sub    $0x10,%rsp
mov    %rsp,%rdi
xor    %ebx,%ebx
xor    %esi,%esi
call   1030 <gettimeofday@plt>
test   %rax,%rax
jne    1151 <inv_get_tick_count+0x41>
imul   $0xf4240,(%rsp),%rax
add    0x8(%rsp),%rax
movabs $0x20c49ba5e353f7cf,%rcx
9b c4 20
imul   %rcx
mov    %rdx,%rbx
mov    %rdx,%rax
shr    $0x3f,%rax
sar    $0x7,%rbx
add    %rax,%rbx
mov    %rbx,%rax
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
%struct.timeval = type { i64, i64 }
define i64 @inv_get_tick_count() {
%1 = alloca i64
%2 = alloca %struct.timeval
%3 = call i64 @gettimeofday(%struct.timeval* %2, i32 0)
%4 = icmp ne i64 %3, 0
br i1 %4, label %5, label %6
5: ; preds = %0
store i64 0, i64* %1
br label %14
6: ; preds = %0
%7 = getelementptr inbounds %struct.timeval, %struct.timeval* %2, i32 0, i32 0
%8 = load i64, i64* %7
%9 = mul nsw i64 %8, 1000000
%10 = getelementptr inbounds %struct.timeval, %struct.timeval* %2, i32 0, i32 1
%11 = load i64, i64* %10
%12 = add nsw i64 %9, %11
%13 = sdiv i64 %12, 1000
store i64 %13, i64* %1
br label %14
14: ; preds = %6, %5
%15 = load i64, i64* %1
ret i64 %15
}

LLVM IR (-O2):
%struct.timeval = type { i64, i64 }
define i64 @inv_get_tick_count() {
%1 = alloca %struct.timeval
%2 = bitcast %struct.timeval* %1 to i8*
%3 = call i64 @gettimeofday(%struct.timeval* %1, i32 0)
%4 = icmp eq i64 %3, 0
br i1 %4, label %5, label %13
5: ; preds = %0
%6 = getelementptr inbounds %struct.timeval, %struct.timeval* %1, i64 0, i32 0
%7 = load i64, i64* %6
%8 = mul nsw i64 %7, 1000000
%9 = getelementptr inbounds %struct.timeval, %struct.timeval* %1, i64 0, i32 1
%10 = load i64, i64* %9
%11 = add nsw i64 %8, %10
%12 = sdiv i64 %11, 1000
br label %13
13: ; preds = %0, %5
%14 = phi i64 [ %12, %5 ], [ 0, %0 ]
ret i64 %14
}
void cpu_cli() { __asm__ __volatile__("cli"); }


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

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

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

LLVM IR (-O2):
define void @cpu_cli() {
tail call void asm sideeffect "cli", "~{dirflag},~{fpsr},~{flags}"()
ret void
}
double r1mach() {
  float u = 1.0e0, comp;
  do {
    u *= 0.5e0;
    comp = 1.0e0 + u;
  } while (comp != 1.0e0);
  return ((double)u * 2.0e0);
}


x86 assembly (clang, -O0):
<r1mach>:
push   %rbp
mov    %rsp,%rbp
movss  0xef4(%rip),%xmm0
movss  %xmm0,-0x4(%rbp)
movss  -0x4(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
movsd  0xeee(%rip),%xmm1
mulsd  %xmm1,%xmm0
cvtsd2ss %xmm0,%xmm0
movss  %xmm0,-0x4(%rbp)
movss  -0x4(%rbp),%xmm0
cvtss2sd %xmm0,%xmm1
movsd  0xec8(%rip),%xmm0
addsd  %xmm1,%xmm0
cvtsd2ss %xmm0,%xmm0
movss  %xmm0,-0x8(%rbp)
movss  -0x8(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
movsd  0xeaa(%rip),%xmm1
ucomisd %xmm1,%xmm0
jne    1111 <r1mach+0x11>
jp     1111 <r1mach+0x11>
movss  -0x4(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
movsd  0xe99(%rip),%xmm1
mulsd  %xmm1,%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<r1mach>:
movsd  0xef8(%rip),%xmm0
ret

LLVM IR (-O0):
define double @r1mach() {
%1 = alloca float
%2 = alloca float
store float 1.000000e+00, float* %1
br label %3
3: ; preds = %12, %0
%4 = load float, float* %1
%5 = fpext float %4 to double
%6 = fmul double %5, 5.000000e-01
%7 = fptrunc double %6 to float
store float %7, float* %1
%8 = load float, float* %1
%9 = fpext float %8 to double
%10 = fadd double 1.000000e+00, %9
%11 = fptrunc double %10 to float
store float %11, float* %2
br label %12
12: ; preds = %3
%13 = load float, float* %2
%14 = fpext float %13 to double
%15 = fcmp une double %14, 1.000000e+00
br i1 %15, label %3, label %16
16: ; preds = %12
%17 = load float, float* %1
%18 = fpext float %17 to double
%19 = fmul double %18, 2.000000e+00
ret double %19
}

LLVM IR (-O2):
define double @r1mach() {
ret double 0x3E80000000000000
}
/* Variables and functions */
scalar_t__ malloc(int);
int /*<<< orphan*/ sprintf(char *, char *, int);
char *intToCString(double num1) {
  int num1_int = (int)num1;
  char *temp = (char *)malloc(sizeof(char) * 1000);
  sprintf(temp, "%d", num1_int);
  return temp;
}


x86 assembly (clang, -O0):
<intToCString>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movsd  %xmm0,-0x8(%rbp)
cvttsd2si -0x8(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    $0x3e8,%edi
call   1030 <malloc@plt>
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rdi
mov    -0xc(%rbp),%edx
lea    0xeaf(%rip),%rsi
call   1040 <sprintf@plt>
mov    -0x18(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<intToCString>:
push   %rbp
push   %rbx
push   %rax
cvttsd2si %xmm0,%ebp
mov    $0x3e8,%edi
call   1030 <malloc@plt>
mov    %rax,%rbx
lea    0xec5(%rip),%rsi
mov    %rax,%rdi
mov    %ebp,%edx
call   1040 <sprintf@plt>
mov    %rbx,%rax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
@.str = [3 x i8] c"%d\00"
define i8* @intToCString(double %0) {
%2 = alloca double
%3 = alloca i32
%4 = alloca i8*
store double %0, double* %2
%5 = load double, double* %2
%6 = fptosi double %5 to i32
store i32 %6, i32* %3
%7 = call i64 @malloc(i32 1000)
%8 = inttoptr i64 %7 to i8*
store i8* %8, i8** %4
%9 = load i8*, i8** %4
%10 = load i32, i32* %3
%11 = call i32 @sprintf(i8* %9, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 %10)
%12 = load i8*, i8** %4
ret i8* %12
}

LLVM IR (-O2):
@.str = [3 x i8] c"%d\00"
define i8* @intToCString(double %0) {
%2 = fptosi double %0 to i32
%3 = tail call i64 @malloc(i32 1000)
%4 = inttoptr i64 %3 to i8*
%5 = tail call i32 @sprintf(i8* dereferenceable(1) %4, i8* dereferenceable(1) getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 %2)
ret i8* %4
}
/* Type definitions */
struct proctal {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ proctal_implementation_pid_set(struct proctal *, int);
void proctal_pid_set(struct proctal *p, int pid) {
  proctal_implementation_pid_set(p, pid);
}


x86 assembly (clang, -O0):
<proctal_pid_set>:
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 <proctal_implementation_pid_set@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<proctal_pid_set>:
jmp    1030 <proctal_implementation_pid_set@plt>

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

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

/* Variables and functions */
int /*<<< orphan*/ free(struct http_request *);
int reset_http_request(struct http_request *);
int destroy_http_request(struct http_request *req) {
  int st = reset_http_request(req);
  free(req);
  return st;
}


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

x86 assembly (clang, -O2):
<destroy_http_request>:
push   %rbp
push   %rbx
push   %rax
mov    %rdi,%rbx
call   1030 <reset_http_request@plt>
mov    %eax,%ebp
mov    %rbx,%rdi
call   1040 <free@plt>
mov    %ebp,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
%struct.http_request = type { i32 }
define i32 @destroy_http_request(%struct.http_request* %0) {
%2 = alloca %struct.http_request*
%3 = alloca i32
store %struct.http_request* %0, %struct.http_request** %2
%4 = load %struct.http_request*, %struct.http_request** %2
%5 = call i32 @reset_http_request(%struct.http_request* %4)
store i32 %5, i32* %3
%6 = load %struct.http_request*, %struct.http_request** %2
%7 = call i32 @free(%struct.http_request* %6)
%8 = load i32, i32* %3
ret i32 %8
}

LLVM IR (-O2):
%struct.http_request = type { i32 }
define i32 @destroy_http_request(%struct.http_request* %0) {
%2 = tail call i32 @reset_http_request(%struct.http_request* %0)
%3 = tail call i32 @free(%struct.http_request* %0)
ret i32 %2
}
/* Variables and functions */
char *strchr(char *, char);
void remove_carriage_return_from_string(char *str) {
  char *pos;
  if ((pos = strchr(str, '\n')) != NULL)
    *pos = '\0';
}


x86 assembly (clang, -O0):
<remove_carriage_return_from_string>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
mov    $0xa,%esi
call   1030 <strchr@plt>
mov    %rax,-0x10(%rbp)
cmp    $0x0,%rax
je     113f <remove_carriage_return_from_string+0x2f>
mov    -0x10(%rbp),%rax
movb   $0x0,(%rax)
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<remove_carriage_return_from_string>:
push   %rax
mov    $0xa,%esi
call   1030 <strchr@plt>
test   %rax,%rax
je     1123 <remove_carriage_return_from_string+0x13>
movb   $0x0,(%rax)
pop    %rax
ret

LLVM IR (-O0):
define void @remove_carriage_return_from_string(i8* %0) {
%2 = alloca i8*
%3 = alloca i8*
store i8* %0, i8** %2
%4 = load i8*, i8** %2
%5 = call i8* @strchr(i8* %4, i8 signext 10)
store i8* %5, i8** %3
%6 = icmp ne i8* %5, null
br i1 %6, label %7, label %9
7: ; preds = %1
%8 = load i8*, i8** %3
store i8 0, i8* %8
br label %9
9: ; preds = %7, %1
ret void
}

LLVM IR (-O2):
define void @remove_carriage_return_from_string(i8* %0) {
%2 = tail call i8* @strchr(i8* dereferenceable(1) %0, i8 signext 10)
%3 = icmp eq i8* %2, null
br i1 %3, label %5, label %4
4: ; preds = %1
store i8 0, i8* %2
br label %5
5: ; preds = %4, %1
ret void
}