xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ SHUT_WR;
int close(int);
int /*<<< orphan*/ shutdown(int, int /*<<< orphan*/);
int tcpclose(int sock) {
  shutdown(sock, SHUT_WR);
  return close(sock);
}


x86 assembly (clang, -O0):
<tcpclose>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
mov    0x2eb3(%rip),%rax
mov    (%rax),%esi
call   1030 <shutdown@plt>
mov    -0x4(%rbp),%edi
call   1040 <close@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<tcpclose>:
push   %rbx
mov    %edi,%ebx
mov    0x2ebe(%rip),%rax
mov    (%rax),%esi
call   1030 <shutdown@plt>
mov    %ebx,%edi
pop    %rbx
jmp    1040 <close@plt>

LLVM IR (-O0):
@SHUT_WR = global i32 0
define i32 @tcpclose(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = load i32, i32* @SHUT_WR
%5 = call i32 @shutdown(i32 %3, i32 %4)
%6 = load i32, i32* %2
%7 = call i32 @close(i32 %6)
ret i32 %7
}

LLVM IR (-O2):
@SHUT_WR = global i32 0
define i32 @tcpclose(i32 %0) {
%2 = load i32, i32* @SHUT_WR
%3 = tail call i32 @shutdown(i32 %0, i32 %2)
%4 = tail call i32 @close(i32 %0)
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ append_command(char, char *);
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ printf(char *);
void set_exit_message(char *message) {
  if (!message) {
    printf("No message chosen\n");
    exit(1);
  }
  printf("Exit message set!\n");
  printf(message);
  append_command('e', message);
  exit(0);
}


x86 assembly (clang, -O0):
<set_exit_message>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
cmpq   $0x0,-0x8(%rbp)
jne    115d <set_exit_message+0x2d>
lea    0xeb2(%rip),%rdi
call   1030 <printf@plt>
mov    $0x1,%edi
call   1050 <exit@plt>
lea    0xeaf(%rip),%rdi
call   1030 <printf@plt>
mov    -0x8(%rbp),%rdi
call   1030 <printf@plt>
mov    -0x8(%rbp),%rsi
mov    $0x65,%edi
call   1040 <append_command@plt>
xor    %edi,%edi
call   1050 <exit@plt>

x86 assembly (clang, -O2):
<set_exit_message>:
push   %rbx
test   %rdi,%rdi
jne    115c <set_exit_message+0x1c>
lea    0xeb3(%rip),%rdi
call   1030 <puts@plt>
mov    $0x1,%edi
call   1060 <exit@plt>
mov    %rdi,%rbx
lea    0xeac(%rip),%rdi
call   1030 <puts@plt>
mov    %rbx,%rdi
call   1040 <printf@plt>
mov    $0x65,%edi
mov    %rbx,%rsi
call   1050 <append_command@plt>
xor    %edi,%edi
call   1060 <exit@plt>

LLVM IR (-O0):
@.str = [19 x i8] c"No message chosen\0A\00"
@.str.1 = [19 x i8] c"Exit message set!\0A\00"
define void @set_exit_message(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 %8, label %5
5: ; preds = %1
%6 = call i32 @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0))
%7 = call i32 @exit(i32 1)
unreachable
8: ; preds = %1
%9 = call i32 @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.1, i64 0, i64 0))
%10 = load i8*, i8** %2
%11 = call i32 @printf(i8* %10)
%12 = load i8*, i8** %2
%13 = call i32 @append_command(i8 signext 101, i8* %12)
%14 = call i32 @exit(i32 0)
unreachable
}

LLVM IR (-O2):
@str = [18 x i8] c"No message chosen\00"
@str.2 = [18 x i8] c"Exit message set!\00"
define void @set_exit_message(i8* %0) {
%2 = icmp eq i8* %0, null
br i1 %2, label %3, label %6
3: ; preds = %1
%4 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([18 x i8], [18 x i8]* @str, i64 0, i64 0))
%5 = tail call i32 @exit(i32 1)
unreachable
6: ; preds = %1
%7 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([18 x i8], [18 x i8]* @str.2, i64 0, i64 0))
%8 = tail call i32 @printf(i8* %0)
%9 = tail call i32 @append_command(i8 signext 101, i8* %0)
%10 = tail call i32 @exit(i32 0)
unreachable
}
void gpio_finished(void) {}


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

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

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

LLVM IR (-O2):
define void @gpio_finished() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ InlineWords(int, int, int, int, int);
void DoStarSlashMod(void) { InlineWords(4, 40, 13, 41, 63); }


x86 assembly (clang, -O0):
<DoStarSlashMod>:
push   %rbp
mov    %rsp,%rbp
mov    $0x4,%edi
mov    $0x28,%esi
mov    $0xd,%edx
mov    $0x29,%ecx
mov    $0x3f,%r8d
call   1030 <InlineWords@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<DoStarSlashMod>:
mov    $0x4,%edi
mov    $0x28,%esi
mov    $0xd,%edx
mov    $0x29,%ecx
mov    $0x3f,%r8d
jmp    1030 <InlineWords@plt>

LLVM IR (-O0):
define void @DoStarSlashMod() {
%1 = call i32 @InlineWords(i32 4, i32 40, i32 13, i32 41, i32 63)
ret void
}

LLVM IR (-O2):
define void @DoStarSlashMod() {
%1 = tail call i32 @InlineWords(i32 4, i32 40, i32 13, i32 41, i32 63)
ret void
}
double calc_thermal_penalty(temp, tempcrit)
double temp, tempcrit;
{
  double value;
  value = 0.0;
  value = (temp * temp) / (tempcrit * tempcrit * 5);
  if (temp > tempcrit)
    value += (temp - tempcrit) * (temp - tempcrit) / (5);
  return (value);
}


x86 assembly (clang, -O0):
<calc_thermal_penalty>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x18(%rbp)
movsd  -0x8(%rbp),%xmm0
mulsd  -0x8(%rbp),%xmm0
movsd  -0x10(%rbp),%xmm1
mulsd  -0x10(%rbp),%xmm1
movsd  0xece(%rip),%xmm2
mulsd  %xmm2,%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x18(%rbp)
movsd  -0x8(%rbp),%xmm0
ucomisd -0x10(%rbp),%xmm0
jbe    117d <calc_thermal_penalty+0x7d>
movsd  -0x8(%rbp),%xmm0
subsd  -0x10(%rbp),%xmm0
movsd  -0x8(%rbp),%xmm1
subsd  -0x10(%rbp),%xmm1
mulsd  %xmm1,%xmm0
movsd  0xe91(%rip),%xmm1
divsd  %xmm1,%xmm0
addsd  -0x18(%rbp),%xmm0
movsd  %xmm0,-0x18(%rbp)
movsd  -0x18(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<calc_thermal_penalty>:
movapd %xmm0,%xmm2
movapd %xmm1,%xmm3
mulsd  %xmm1,%xmm3
mulsd  0xeec(%rip),%xmm3
mulsd  %xmm0,%xmm0
divsd  %xmm3,%xmm0
ucomisd %xmm1,%xmm2
jbe    1136 <calc_thermal_penalty+0x36>
subsd  %xmm1,%xmm2
mulsd  %xmm2,%xmm2
divsd  0xece(%rip),%xmm2
addsd  %xmm2,%xmm0
ret

LLVM IR (-O0):
define double @calc_thermal_penalty(double %0, double %1) {
%3 = alloca double
%4 = alloca double
%5 = alloca double
store double %0, double* %3
store double %1, double* %4
store double 0.000000e+00, double* %5
%6 = load double, double* %3
%7 = load double, double* %3
%8 = fmul double %6, %7
%9 = load double, double* %4
%10 = load double, double* %4
%11 = fmul double %9, %10
%12 = fmul double %11, 5.000000e+00
%13 = fdiv double %8, %12
store double %13, double* %5
%14 = load double, double* %3
%15 = load double, double* %4
%16 = fcmp ogt double %14, %15
br i1 %16, label %17, label %28
17: ; preds = %2
%18 = load double, double* %3
%19 = load double, double* %4
%20 = fsub double %18, %19
%21 = load double, double* %3
%22 = load double, double* %4
%23 = fsub double %21, %22
%24 = fmul double %20, %23
%25 = fdiv double %24, 5.000000e+00
%26 = load double, double* %5
%27 = fadd double %26, %25
store double %27, double* %5
br label %28
28: ; preds = %17, %2
%29 = load double, double* %5
ret double %29
}

LLVM IR (-O2):
define double @calc_thermal_penalty(double %0, double %1) {
%3 = fmul double %0, %0
%4 = fmul double %1, %1
%5 = fmul double %4, 5.000000e+00
%6 = fdiv double %3, %5
%7 = fcmp ogt double %0, %1
br i1 %7, label %8, label %13
8: ; preds = %2
%9 = fsub double %0, %1
%10 = fmul double %9, %9
%11 = fdiv double %10, 5.000000e+00
%12 = fadd double %6, %11
br label %13
13: ; preds = %8, %2
%14 = phi double [ %12, %8 ], [ %6, %2 ]
ret double %14
}
int OSC_effectiveBlobLength(int blobDataSize) {
  int len = 4 + blobDataSize;
  if ((len % 4) != 0) {
    len += 4 - (len % 4);
  }
  return len;
}


x86 assembly (clang, -O0):
<OSC_effectiveBlobLength>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x4,%eax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
mov    $0x4,%ecx
cltd
idiv   %ecx
cmp    $0x0,%edx
je     113c <OSC_effectiveBlobLength+0x3c>
mov    -0x8(%rbp),%eax
mov    $0x4,%ecx
cltd
idiv   %ecx
mov    $0x4,%eax
sub    %edx,%eax
add    -0x8(%rbp),%eax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<OSC_effectiveBlobLength>:
lea    0x4(%rdi),%ecx
lea    0x7(%rdi),%eax
test   %ecx,%ecx
cmovns %ecx,%eax
and    $0xfffffffc,%eax
neg    %eax
lea    (%rdi,%rax,1),%edx
add    $0x4,%edx
sub    %edx,%edi
lea    0x8(%rdi),%eax
test   %edx,%edx
cmove  %ecx,%eax
ret

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

LLVM IR (-O2):
define i32 @OSC_effectiveBlobLength(i32 %0) {
%2 = add nsw i32 %0, 4
%3 = srem i32 %2, 4
%4 = icmp eq i32 %3, 0
%5 = add i32 %0, 8
%6 = sub i32 %5, %3
%7 = select i1 %4, i32 %2, i32 %6
ret i32 %7
}
void ff_hevc_put_hevc_bi_epel_h12_8_sse4() {}


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

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

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

LLVM IR (-O2):
define void @ff_hevc_put_hevc_bi_epel_h12_8_sse4() {
ret void
}
int main(void) { int num; }


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

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

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
ret i32 0
}
unsigned int getbit(unsigned int x, int i) { return (x >> i) & 1; }


x86 assembly (clang, -O0):
<getbit>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
mov    -0x8(%rbp),%ecx
shr    %cl,%eax
and    $0x1,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<getbit>:
mov    %esi,%ecx
mov    %edi,%eax
shr    %cl,%eax
and    $0x1,%eax
ret

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

LLVM IR (-O2):
define i32 @getbit(i32 %0, i32 %1) {
%3 = lshr i32 %0, %1
%4 = and i32 %3, 1
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ exit(int /*<<< orphan*/);
scalar_t__ fork();
int /*<<< orphan*/ setsid();
void daemonize() {
  setsid();
  if (fork())
    exit(0);
}


x86 assembly (clang, -O0):
<daemonize>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1030 <setsid@plt>
mov    $0x0,%al
call   1050 <fork@plt>
cmp    $0x0,%rax
je     1153 <daemonize+0x23>
xor    %edi,%edi
call   1040 <exit@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<daemonize>:
push   %rax
xor    %eax,%eax
call   1030 <setsid@plt>
xor    %eax,%eax
call   1050 <fork@plt>
test   %rax,%rax
jne    1146 <daemonize+0x16>
pop    %rax
ret
xor    %edi,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
define void @daemonize() {
%1 = call i32 (...) @setsid()
%2 = call i64 (...) @fork()
%3 = icmp ne i64 %2, 0
br i1 %3, label %4, label %6
4: ; preds = %0
%5 = call i32 @exit(i32 0)
unreachable
6: ; preds = %0
ret void
}

LLVM IR (-O2):
define void @daemonize() {
%1 = tail call i32 (...) @setsid()
%2 = tail call i64 (...) @fork()
%3 = icmp eq i64 %2, 0
br i1 %3, label %6, label %4
4: ; preds = %0
%5 = tail call i32 @exit(i32 0)
unreachable
6: ; preds = %0
ret void
}
/* Variables and functions */
int /*<<< orphan*/ puts(char *);
void func1() { puts("This is the function func1(). "); }


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

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

LLVM IR (-O0):
@.str = [31 x i8] c"This is the function func1(). \00"
define void @func1() {
%1 = call i32 @puts(i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [31 x i8] c"This is the function func1(). \00"
define void @func1() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([31 x i8], [31 x i8]* @.str, i64 0, i64 0))
ret void
}
deflinestyle_(n, s) int *n, *s;
{ deflinestyle(*n, *s); }


x86 assembly (clang, -O0):
<deflinestyle_>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    -0x10(%rbp),%rax
mov    (%rax),%edi
mov    -0x18(%rbp),%rax
mov    (%rax),%esi
mov    $0x0,%al
call   1030 <deflinestyle@plt>
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<deflinestyle_>:
mov    (%rdi),%edi
mov    (%rsi),%esi
xor    %eax,%eax
jmp    1030 <deflinestyle@plt>

LLVM IR (-O0):
define i32 @deflinestyle_(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 = load i32, i32* %6
%8 = load i32*, i32** %5
%9 = load i32, i32* %8
%10 = call i32 (i32, i32, ...) bitcast (i32 (...)* @deflinestyle to i32 (i32, i32, ...)*)(i32 %7, i32 %9)
%11 = load i32, i32* %3
ret i32 %11
}

LLVM IR (-O2):
define i32 @deflinestyle_(i32* nocapture %0, i32* nocapture %1) {
%3 = load i32, i32* %0
%4 = load i32, i32* %1
%5 = tail call i32 (i32, i32, ...) bitcast (i32 (...)* @deflinestyle to i32 (i32, i32, ...)*)(i32 %3, i32 %4)
ret i32 undef
}
/* Type definitions */
typedef int uint64_t;
typedef int uint32_t;
typedef int int64_t;
typedef int int32_t;

/* Variables and functions */
int64_t div_by_2_25(const int64_t v) {
  const uint32_t highword = (uint32_t)(((uint64_t)v) >> 32);
  const int32_t sign = ((int32_t)highword) >> 31;
  const int32_t roundoff = ((uint32_t)sign) >> 7;
  return (v + roundoff) >> 25;
}


x86 assembly (clang, -O0):
<div_by_2_25>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
mov    $0x20,%ecx
sar    %cl,%eax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
sar    $0x1f,%eax
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
sar    $0x7,%eax
mov    %eax,-0x10(%rbp)
mov    -0x4(%rbp),%eax
add    -0x10(%rbp),%eax
sar    $0x19,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @div_by_2_25(i32 %0) {
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
store i32 %0, i32* %2
%6 = load i32, i32* %2
%7 = ashr i32 %6, 32
store i32 %7, i32* %3
%8 = load i32, i32* %3
%9 = ashr i32 %8, 31
store i32 %9, i32* %4
%10 = load i32, i32* %4
%11 = ashr i32 %10, 7
store i32 %11, i32* %5
%12 = load i32, i32* %2
%13 = load i32, i32* %5
%14 = add nsw i32 %12, %13
%15 = ashr i32 %14, 25
ret i32 %15
}

LLVM IR (-O2):
define i32 @div_by_2_25(i32 %0) {
ret i32 poison
}
/* Variables and functions */
int /*<<< orphan*/ print_board();
int /*<<< orphan*/ printf(char *, char);
int /*<<< orphan*/ scanf(char *, char *);
int /*<<< orphan*/ update(char, char);
void player(char play) {
  char color[2];
  printf("\nChoose a color player %c :\n", play);
  scanf("%s", color);
  update(play, color[0]);
  print_board();
}


x86 assembly (clang, -O0):
<player>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %dil,%al
mov    %al,-0x1(%rbp)
lea    0xeab(%rip),%rdi
movsbl -0x1(%rbp),%esi
call   1040 <printf@plt>
lea    -0x3(%rbp),%rsi
lea    0xeb4(%rip),%rdi
call   1060 <scanf@plt>
mov    -0x1(%rbp),%al
movsbl %al,%edi
movsbl -0x3(%rbp),%esi
call   1030 <update@plt>
mov    $0x0,%al
call   1050 <print_board@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<player>:
push   %rbx
sub    $0x10,%rsp
mov    %edi,%ebx
lea    0xeb2(%rip),%rdi
mov    %ebx,%esi
call   1040 <printf@plt>
lea    0xec1(%rip),%rdi
lea    0xe(%rsp),%rsi
call   1060 <scanf@plt>
movsbl 0xe(%rsp),%esi
mov    %ebx,%edi
call   1030 <update@plt>
xor    %eax,%eax
call   1050 <print_board@plt>
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@.str = [29 x i8] c"\0AChoose a color player %c :\0A\00"
@.str.1 = [3 x i8] c"%s\00"
define void @player(i8 signext %0) {
%2 = alloca i8
%3 = alloca [2 x i8]
store i8 %0, i8* %2
%4 = load i8, i8* %2
%5 = call i32 @printf(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str, i64 0, i64 0), i8 signext %4)
%6 = getelementptr inbounds [2 x i8], [2 x i8]* %3, i64 0, i64 0
%7 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i8* %6)
%8 = load i8, i8* %2
%9 = getelementptr inbounds [2 x i8], [2 x i8]* %3, i64 0, i64 0
%10 = load i8, i8* %9
%11 = call i32 @update(i8 signext %8, i8 signext %10)
%12 = call i32 (...) @print_board()
ret void
}

LLVM IR (-O2):
@.str = [29 x i8] c"\0AChoose a color player %c :\0A\00"
@.str.1 = [3 x i8] c"%s\00"
define void @player(i8 signext %0) {
%2 = alloca [2 x i8]
%3 = getelementptr inbounds [2 x i8], [2 x i8]* %2, i64 0, i64 0
%4 = tail call i32 @printf(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str, i64 0, i64 0), i8 signext %0)
%5 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i8* %3)
%6 = load i8, i8* %3
%7 = call i32 @update(i8 signext %0, i8 signext %6)
%8 = call i32 (...) @print_board()
ret void
}
/* Variables and functions */
double hv_wfg(void *);
double calculate_hv(void *ptr) {
  double hv_value;
  hv_value = hv_wfg(ptr);
  return hv_value;
}


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

x86 assembly (clang, -O2):
<calculate_hv>:
jmp    1030 <hv_wfg@plt>

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

LLVM IR (-O2):
define double @calculate_hv(i8* %0) {
%2 = tail call double @hv_wfg(i8* %0)
ret double %2
}
/* Variables and functions */
int /*<<< orphan*/ notify_pvcall(char *);
int pvAllocateFrameBuffer(char byBoardNum) {
  notify_pvcall("f");
  return (0);
}


x86 assembly (clang, -O0):
<pvAllocateFrameBuffer>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %dil,%al
mov    %al,-0x1(%rbp)
lea    0xedb(%rip),%rdi
call   1030 <notify_pvcall@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
@.str = [2 x i8] c"f\00"
define i32 @pvAllocateFrameBuffer(i8 signext %0) {
%2 = alloca i8
store i8 %0, i8* %2
%3 = call i32 @notify_pvcall(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@.str = [2 x i8] c"f\00"
define i32 @pvAllocateFrameBuffer(i8 signext %0) {
%2 = tail call i32 @notify_pvcall(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
ret i32 0
}
/* Type definitions */
typedef int /*<<< orphan*/ time_t;

/* Variables and functions */
char *ctime(int /*<<< orphan*/ *);
int /*<<< orphan*/ time(void *);
char *wrapc_strtime(void) {
  time_t clock = time((void *)0);
  char *string = ctime(&clock);
  string[24] = (char)0;
  return string;
}


x86 assembly (clang, -O0):
<wrapc_strtime>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
xor    %eax,%eax
mov    %eax,%edi
call   1040 <time@plt>
mov    %eax,-0x4(%rbp)
lea    -0x4(%rbp),%rdi
call   1030 <ctime@plt>
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
movb   $0x0,0x18(%rax)
mov    -0x10(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<wrapc_strtime>:
push   %rax
xor    %edi,%edi
call   1040 <time@plt>
mov    %eax,0x4(%rsp)
lea    0x4(%rsp),%rdi
call   1030 <ctime@plt>
movb   $0x0,0x18(%rax)
pop    %rcx
ret

LLVM IR (-O0):
define i8* @wrapc_strtime() {
%1 = alloca i32
%2 = alloca i8*
%3 = call i32 @time(i8* null)
store i32 %3, i32* %1
%4 = call i8* @ctime(i32* %1)
store i8* %4, i8** %2
%5 = load i8*, i8** %2
%6 = getelementptr inbounds i8, i8* %5, i64 24
store i8 0, i8* %6
%7 = load i8*, i8** %2
ret i8* %7
}

LLVM IR (-O2):
define i8* @wrapc_strtime() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
%3 = tail call i32 @time(i8* null)
store i32 %3, i32* %1
%4 = call i8* @ctime(i32* %1)
%5 = getelementptr inbounds i8, i8* %4, i64 24
store i8 0, i8* %5
ret i8* %4
}
int Bematech_FI_FlagEpromConectada(Var, Retorno) {
  return Formata("\x1b|35|21|\x1b", Var, Retorno);
}


x86 assembly (clang, -O0):
<Bematech_FI_FlagEpromConectada>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%esi
mov    -0x8(%rbp),%edx
lea    0xed5(%rip),%rdi
mov    $0x0,%al
call   1030 <Formata@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Bematech_FI_FlagEpromConectada>:
mov    %esi,%edx
mov    %edi,%esi
lea    0xee5(%rip),%rdi
xor    %eax,%eax
jmp    1030 <Formata@plt>

LLVM IR (-O0):
@.str = [10 x i8] c"\1B|35|21|\1B\00"
define i32 @Bematech_FI_FlagEpromConectada(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%5 = load i32, i32* %3
%6 = load i32, i32* %4
%7 = call i32 (i8*, i32, i32, ...) bitcast (i32 (...)* @Formata to i32 (i8*, i32, i32, ...)*)(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i32 %5, i32 %6)
ret i32 %7
}

LLVM IR (-O2):
@.str = [10 x i8] c"\1B|35|21|\1B\00"
define i32 @Bematech_FI_FlagEpromConectada(i32 %0, i32 %1) {
%3 = tail call i32 (i8*, i32, i32, ...) bitcast (i32 (...)* @Formata to i32 (i8*, i32, i32, ...)*)(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i32 %0, i32 %1)
ret i32 %3
}
/* Type definitions */
typedef int /*<<< orphan*/ SSL;

/* Variables and functions */
int /*<<< orphan*/ SSL_write;
int zopenssl_timed_do(int /*<<< orphan*/ *, int /*<<< orphan*/,
                      int /*<<< orphan*/, int /*<<< orphan*/, void *, int,
                      long);
int zopenssl_write(SSL *ssl, const void *buf, int len, long timeout) {
  return zopenssl_timed_do(ssl, 0, 0, SSL_write, (void *)buf, len, timeout);
}


x86 assembly (clang, -O0):
<zopenssl_write>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    %rcx,-0x20(%rbp)
mov    -0x8(%rbp),%rdi
mov    0x2eae(%rip),%rax
mov    (%rax),%ecx
mov    -0x10(%rbp),%r8
mov    -0x14(%rbp),%r9d
mov    -0x20(%rbp),%rax
xor    %edx,%edx
mov    %edx,%esi
mov    %rax,(%rsp)
call   1030 <zopenssl_timed_do@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<zopenssl_write>:
push   %rax
mov    %edx,%r9d
mov    %rsi,%r8
mov    0x2ec2(%rip),%rax
mov    (%rax),%eax
mov    %rcx,(%rsp)
xor    %esi,%esi
xor    %edx,%edx
mov    %eax,%ecx
call   1030 <zopenssl_timed_do@plt>
pop    %rcx
ret

LLVM IR (-O0):
@SSL_write = global i32 0
define i32 @zopenssl_write(i32* %0, i8* %1, i32 %2, i64 %3) {
%5 = alloca i32*
%6 = alloca i8*
%7 = alloca i32
%8 = alloca i64
store i32* %0, i32** %5
store i8* %1, i8** %6
store i32 %2, i32* %7
store i64 %3, i64* %8
%9 = load i32*, i32** %5
%10 = load i32, i32* @SSL_write
%11 = load i8*, i8** %6
%12 = load i32, i32* %7
%13 = load i64, i64* %8
%14 = call i32 @zopenssl_timed_do(i32* %9, i32 0, i32 0, i32 %10, i8* %11, i32 %12, i64 %13)
ret i32 %14
}

LLVM IR (-O2):
@SSL_write = global i32 0
define i32 @zopenssl_write(i32* %0, i8* %1, i32 %2, i64 %3) {
%5 = load i32, i32* @SSL_write
%6 = tail call i32 @zopenssl_timed_do(i32* %0, i32 0, i32 0, i32 %5, i8* %1, i32 %2, i64 %3)
ret i32 %6
}
int on_load(struct fs_context *context) { return 0; }


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

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

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

LLVM IR (-O2):
%struct.fs_context = type opaque
define i32 @on_load(%struct.fs_context* nocapture readnone %0) {
ret i32 0
}
void compressor(struct mem *pmem, char *parameters) {}


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

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

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

LLVM IR (-O2):
%struct.mem = type opaque
define void @compressor(%struct.mem* nocapture %0, i8* nocapture %1) {
ret void
}
unsigned long tf_L(unsigned long c) { return c / 3; }


x86 assembly (clang, -O0):
<tf_L>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    $0x3,%ecx
xor    %edx,%edx
div    %rcx
pop    %rbp
ret

x86 assembly (clang, -O2):
<tf_L>:
mov    %rdi,%rax
movabs $0xaaaaaaaaaaaaaaab,%rcx
aa aa aa
mul    %rcx
mov    %rdx,%rax
shr    %rax
ret

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

LLVM IR (-O2):
define i64 @tf_L(i64 %0) {
%2 = udiv i64 %0, 3
ret i64 %2
}
/* Variables and functions */
int f(int *);
int pass_int(int *p) { return f(p); }


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

x86 assembly (clang, -O2):
<pass_int>:
jmp    1030 <f@plt>

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

LLVM IR (-O2):
define i32 @pass_int(i32* %0) {
%2 = tail call i32 @f(i32* %0)
ret i32 %2
}
void XRestackWindows() {}


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

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

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

LLVM IR (-O2):
define void @XRestackWindows() {
ret void
}
/* Type definitions */
struct evhttp_request {
  int dummy;
};
struct evhttp_connection {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ evhttp_connection_free(struct evhttp_connection *);
void slave_request_cb(struct evhttp_request *req, void *arg) {
  struct evhttp_connection *conn = arg;
  if (!req) {
    evhttp_connection_free(conn);
    return;
  }
}


x86 assembly (clang, -O0):
<slave_request_cb>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x18(%rbp)
cmpq   $0x0,-0x8(%rbp)
jne    113c <slave_request_cb+0x2c>
mov    -0x18(%rbp),%rdi
call   1030 <evhttp_connection_free@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<slave_request_cb>:
test   %rdi,%rdi
je     1116 <slave_request_cb+0x6>
ret
mov    %rsi,%rdi
jmp    1030 <evhttp_connection_free@plt>

LLVM IR (-O0):
%struct.evhttp_request = type { i32 }
%struct.evhttp_connection = type { i32 }
define void @slave_request_cb(%struct.evhttp_request* %0, i8* %1) {
%3 = alloca %struct.evhttp_request*
%4 = alloca i8*
%5 = alloca %struct.evhttp_connection*
store %struct.evhttp_request* %0, %struct.evhttp_request** %3
store i8* %1, i8** %4
%6 = load i8*, i8** %4
%7 = bitcast i8* %6 to %struct.evhttp_connection*
store %struct.evhttp_connection* %7, %struct.evhttp_connection** %5
%8 = load %struct.evhttp_request*, %struct.evhttp_request** %3
%9 = icmp ne %struct.evhttp_request* %8, null
br i1 %9, label %13, label %10
10: ; preds = %2
%11 = load %struct.evhttp_connection*, %struct.evhttp_connection** %5
%12 = call i32 @evhttp_connection_free(%struct.evhttp_connection* %11)
br label %13
13: ; preds = %10, %2
ret void
}

LLVM IR (-O2):
%struct.evhttp_request = type { i32 }
%struct.evhttp_connection = type { i32 }
define void @slave_request_cb(%struct.evhttp_request* readnone %0, i8* %1) {
%3 = icmp eq %struct.evhttp_request* %0, null
br i1 %3, label %4, label %7
4: ; preds = %2
%5 = bitcast i8* %1 to %struct.evhttp_connection*
%6 = tail call i32 @evhttp_connection_free(%struct.evhttp_connection* %5)
br label %7
7: ; preds = %2, %4
ret void
}
extern short ReturnNegShort() { return -102; }


x86 assembly (clang, -O0):
<ReturnNegShort>:
push   %rbp
mov    %rsp,%rbp
mov    $0xff9a,%ax
cwtl
pop    %rbp
ret

x86 assembly (clang, -O2):
<ReturnNegShort>:
mov    $0xff9a,%ax
ret

LLVM IR (-O0):
define signext i16 @ReturnNegShort() {
ret i16 -102
}

LLVM IR (-O2):
define signext i16 @ReturnNegShort() {
ret i16 -102
}
/* Variables and functions */
int /*<<< orphan*/ key_id();
int /*<<< orphan*/ printf(char *);
extern void issuer_key_ID(int len) {
  printf("\t");
  key_id();
}


x86 assembly (clang, -O0):
<issuer_key_ID>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
lea    0xece(%rip),%rdi
call   1030 <printf@plt>
mov    $0x0,%al
call   1040 <key_id@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<issuer_key_ID>:
push   %rax
mov    $0x9,%edi
call   1030 <putchar@plt>
xor    %eax,%eax
pop    %rcx
jmp    1040 <key_id@plt>

LLVM IR (-O0):
@.str = [2 x i8] c"\09\00"
define void @issuer_key_ID(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = call i32 @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
%4 = call i32 (...) @key_id()
ret void
}

LLVM IR (-O2):
define void @issuer_key_ID(i32 %0) {
%2 = tail call i32 @putchar(i32 9)
%3 = tail call i32 (...) @key_id()
ret void
}
/* Variables and functions */
int GetIntegerArray(int *, int, int /*<<< orphan*/);
int /*<<< orphan*/ GiveInstructions();
int /*<<< orphan*/ PrintIntegerArray(int *, int);
int /*<<< orphan*/ ReverseIntegerArray(int *, int);
main() {
  int list[250], n;
  GiveInstructions();
  n = GetIntegerArray(list, 250, 0);
  ReverseIntegerArray(list, n);
  PrintIntegerArray(list, n);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x400,%rsp
mov    $0x0,%al
call   1060 <GiveInstructions@plt>
lea    -0x3f0(%rbp),%rdi
mov    $0xfa,%esi
xor    %edx,%edx
call   1040 <GetIntegerArray@plt>
mov    %eax,-0x3f4(%rbp)
lea    -0x3f0(%rbp),%rdi
mov    -0x3f4(%rbp),%esi
call   1050 <ReverseIntegerArray@plt>
lea    -0x3f0(%rbp),%rdi
mov    -0x3f4(%rbp),%esi
call   1030 <PrintIntegerArray@plt>
xor    %eax,%eax
add    $0x400,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %rbx
sub    $0x3e8,%rsp
xor    %eax,%eax
call   1060 <GiveInstructions@plt>
mov    %rsp,%rbx
mov    %rbx,%rdi
mov    $0xfa,%esi
xor    %edx,%edx
call   1040 <GetIntegerArray@plt>
mov    %eax,%ebp
mov    %rbx,%rdi
mov    %eax,%esi
call   1050 <ReverseIntegerArray@plt>
mov    %rbx,%rdi
mov    %ebp,%esi
call   1030 <PrintIntegerArray@plt>
xor    %eax,%eax
add    $0x3e8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
define i32 @main() {
%1 = alloca [250 x i32]
%2 = alloca i32
%3 = call i32 (...) @GiveInstructions()
%4 = getelementptr inbounds [250 x i32], [250 x i32]* %1, i64 0, i64 0
%5 = call i32 @GetIntegerArray(i32* %4, i32 250, i32 0)
store i32 %5, i32* %2
%6 = getelementptr inbounds [250 x i32], [250 x i32]* %1, i64 0, i64 0
%7 = load i32, i32* %2
%8 = call i32 @ReverseIntegerArray(i32* %6, i32 %7)
%9 = getelementptr inbounds [250 x i32], [250 x i32]* %1, i64 0, i64 0
%10 = load i32, i32* %2
%11 = call i32 @PrintIntegerArray(i32* %9, i32 %10)
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = alloca [250 x i32]
%2 = bitcast [250 x i32]* %1 to i8*
%3 = tail call i32 (...) @GiveInstructions()
%4 = getelementptr inbounds [250 x i32], [250 x i32]* %1, i64 0, i64 0
%5 = call i32 @GetIntegerArray(i32* %4, i32 250, i32 0)
%6 = call i32 @ReverseIntegerArray(i32* %4, i32 %5)
%7 = call i32 @PrintIntegerArray(i32* %4, i32 %5)
ret i32 0
}
char *getenv(name) const char *name;
{
  int offset;
  char *_findenv();
  return (_findenv(name, &offset));
}


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

x86 assembly (clang, -O2):
<getenv>:
push   %rax
lea    0x4(%rsp),%rsi
xor    %eax,%eax
call   1030 <_findenv@plt>
pop    %rcx
ret

LLVM IR (-O0):
define i8* @getenv(i8* %0) {
%2 = alloca i8*
%3 = alloca i32
store i8* %0, i8** %2
%4 = load i8*, i8** %2
%5 = call i8* (i8*, i32*, ...) bitcast (i8* (...)* @_findenv to i8* (i8*, i32*, ...)*)(i8* %4, i32* %3)
ret i8* %5
}

LLVM IR (-O2):
define i8* @getenv(i8* %0) {
%2 = alloca i32
%3 = bitcast i32* %2 to i8*
%4 = call i8* (i8*, i32*, ...) bitcast (i8* (...)* @_findenv to i8* (i8*, i32*, ...)*)(i8* %0, i32* %2)
ret i8* %4
}
int FastIntClampToZero(int x) { return x & (~(x >> 31)); }


x86 assembly (clang, -O0):
<FastIntClampToZero>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
mov    -0x4(%rbp),%ecx
sar    $0x1f,%ecx
xor    $0xffffffff,%ecx
and    %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<FastIntClampToZero>:
xor    %eax,%eax
test   %edi,%edi
cmovns %edi,%eax
ret

LLVM IR (-O0):
define i32 @FastIntClampToZero(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = load i32, i32* %2
%5 = ashr i32 %4, 31
%6 = xor i32 %5, -1
%7 = and i32 %3, %6
ret i32 %7
}

LLVM IR (-O2):
define i32 @FastIntClampToZero(i32 %0) {
%2 = icmp sgt i32 %0, 0
%3 = select i1 %2, i32 %0, i32 0
ret i32 %3
}
int iclamp(int val, int min, int max) {
  return ({
    __typeof__(max) _a = (max);
    __typeof__(({
      __typeof__(min) _a = (min);
      __typeof__(val) _b = (val);
      _a > _b ? _a : _b;
    })) _b = (({
      __typeof__(min) _a = (min);
      __typeof__(val) _b = (val);
      _a > _b ? _a : _b;
    }));
    _a < _b ? _a : _b;
  });
}


x86 assembly (clang, -O0):
<iclamp>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    -0xc(%rbp),%eax
mov    %eax,-0x10(%rbp)
mov    -0x8(%rbp),%eax
mov    %eax,-0x18(%rbp)
mov    -0x4(%rbp),%eax
mov    %eax,-0x1c(%rbp)
mov    -0x18(%rbp),%eax
cmp    -0x1c(%rbp),%eax
jle    1136 <iclamp+0x36>
mov    -0x18(%rbp),%eax
mov    %eax,-0x28(%rbp)
jmp    113c <iclamp+0x3c>
mov    -0x1c(%rbp),%eax
mov    %eax,-0x28(%rbp)
mov    -0x28(%rbp),%eax
mov    %eax,-0x20(%rbp)
mov    -0x20(%rbp),%eax
mov    %eax,-0x14(%rbp)
mov    -0x10(%rbp),%eax
cmp    -0x14(%rbp),%eax
jge    115f <iclamp+0x5f>
mov    -0x10(%rbp),%eax
mov    %eax,-0x2c(%rbp)
jmp    1165 <iclamp+0x65>
mov    -0x14(%rbp),%eax
mov    %eax,-0x2c(%rbp)
mov    -0x2c(%rbp),%eax
mov    %eax,-0x24(%rbp)
mov    -0x24(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<iclamp>:
mov    %edi,%eax
cmp    %edi,%esi
cmovg  %esi,%eax
cmp    %edx,%eax
cmovg  %edx,%eax
ret

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

LLVM IR (-O2):
define i32 @iclamp(i32 %0, i32 %1, i32 %2) {
%4 = icmp sgt i32 %1, %0
%5 = select i1 %4, i32 %1, i32 %0
%6 = icmp sgt i32 %5, %2
%7 = select i1 %6, i32 %2, i32 %5
ret i32 %7
}
__attribute__((visibility("default"))) const char *openr2_get_revision() {
  return "(release)";
}


x86 assembly (clang, -O0):
<openr2_get_revision>:
push   %rbp
mov    %rsp,%rbp
lea    0xef5(%rip),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<openr2_get_revision>:
lea    0xef9(%rip),%rax
ret

LLVM IR (-O0):
@.str = [10 x i8] c"(release)\00"
define i8* @openr2_get_revision() {
ret i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0)
}

LLVM IR (-O2):
@.str = [10 x i8] c"(release)\00"
define i8* @openr2_get_revision() {
ret i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0)
}
__attribute__((always_)) void patch_NCAS_1_7_2741_extra(void) {}


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

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

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

LLVM IR (-O2):
define void @patch_NCAS_1_7_2741_extra() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ HDMITX_WriteI2C_Byte(int, int);
void FireAFE(void) {
  HDMITX_WriteI2C_Byte(0x0f, (0) & 1);
  HDMITX_WriteI2C_Byte(0x61, 0);
  ;
  ;
  ;
  ;
  ;
}


x86 assembly (clang, -O0):
<FireAFE>:
push   %rbp
mov    %rsp,%rbp
mov    $0xf,%edi
xor    %esi,%esi
call   1030 <HDMITX_WriteI2C_Byte@plt>
mov    $0x61,%edi
xor    %esi,%esi
call   1030 <HDMITX_WriteI2C_Byte@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<FireAFE>:
push   %rax
mov    $0xf,%edi
xor    %esi,%esi
call   1030 <HDMITX_WriteI2C_Byte@plt>
mov    $0x61,%edi
xor    %esi,%esi
pop    %rax
jmp    1030 <HDMITX_WriteI2C_Byte@plt>

LLVM IR (-O0):
define void @FireAFE() {
%1 = call i32 @HDMITX_WriteI2C_Byte(i32 15, i32 0)
%2 = call i32 @HDMITX_WriteI2C_Byte(i32 97, i32 0)
ret void
}

LLVM IR (-O2):
define void @FireAFE() {
%1 = tail call i32 @HDMITX_WriteI2C_Byte(i32 15, i32 0)
%2 = tail call i32 @HDMITX_WriteI2C_Byte(i32 97, i32 0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ callee1();
int /*<<< orphan*/ indirect1();
int /*<<< orphan*/ scc2();
void scc1() {
  scc2();
  callee1();
  indirect1();
}


x86 assembly (clang, -O0):
<scc1>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1040 <scc2@plt>
mov    $0x0,%al
call   1030 <callee1@plt>
mov    $0x0,%al
call   1050 <indirect1@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<scc1>:
push   %rax
xor    %eax,%eax
call   1040 <scc2@plt>
xor    %eax,%eax
call   1030 <callee1@plt>
xor    %eax,%eax
pop    %rcx
jmp    1050 <indirect1@plt>

LLVM IR (-O0):
define void @scc1() {
%1 = call i32 (...) @scc2()
%2 = call i32 (...) @callee1()
%3 = call i32 (...) @indirect1()
ret void
}

LLVM IR (-O2):
define void @scc1() {
%1 = tail call i32 (...) @scc2()
%2 = tail call i32 (...) @callee1()
%3 = tail call i32 (...) @indirect1()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char *);
void mytool1_print(char *print_str) {
  printf("This is mytool1 print %s\n", print_str);
}


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

x86 assembly (clang, -O2):
<mytool1_print>:
mov    %rdi,%rsi
lea    0xee6(%rip),%rdi
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [26 x i8] c"This is mytool1 print %s\0A\00"
define void @mytool1_print(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 @printf(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str, i64 0, i64 0), i8* %3)
ret void
}

LLVM IR (-O2):
@.str = [26 x i8] c"This is mytool1 print %s\0A\00"
define void @mytool1_print(i8* %0) {
%2 = tail call i32 @printf(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str, i64 0, i64 0), i8* %0)
ret void
}
void foo383() {}


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

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

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

LLVM IR (-O2):
define void @foo383() {
ret void
}
/* Variables and functions */
int _ada_use_c2phc(int, int *, int *, double *);
int clear_varbprec_tracker(void) {
  int fail, *a, *b;
  double *c;
  fail = _ada_use_c2phc(519, a, b, c);
  return fail;
}


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

x86 assembly (clang, -O2):
<clear_varbprec_tracker>:
mov    $0x207,%edi
jmp    1030 <_ada_use_c2phc@plt>

LLVM IR (-O0):
define i32 @clear_varbprec_tracker() {
%1 = alloca i32
%2 = alloca i32*
%3 = alloca i32*
%4 = alloca double*
%5 = load i32*, i32** %2
%6 = load i32*, i32** %3
%7 = load double*, double** %4
%8 = call i32 @_ada_use_c2phc(i32 519, i32* %5, i32* %6, double* %7)
store i32 %8, i32* %1
%9 = load i32, i32* %1
ret i32 %9
}

LLVM IR (-O2):
define i32 @clear_varbprec_tracker() {
%1 = tail call i32 @_ada_use_c2phc(i32 519, i32* undef, i32* undef, double* undef)
ret i32 %1
}
char getXChar(int x) { return 8 - x + 'A'; }


x86 assembly (clang, -O0):
<getXChar>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    $0x8,%eax
sub    -0x4(%rbp),%eax
add    $0x41,%eax
movsbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<getXChar>:
mov    $0x49,%al
sub    %dil,%al
ret

LLVM IR (-O0):
define signext i8 @getXChar(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = sub nsw i32 8, %3
%5 = add nsw i32 %4, 65
%6 = trunc i32 %5 to i8
ret i8 %6
}

LLVM IR (-O2):
define signext i8 @getXChar(i32 %0) {
%2 = trunc i32 %0 to i8
%3 = sub i8 73, %2
ret i8 %3
}
int foo() {
  int x[2][2], y[2];
  int i, n, s;
  for (n = 0; n < 2; n++) {
    s = 0;
    for (i = 0; i < 2; i++)
      s += x[n][i] * y[i];
    s += 1;
  }
  return s;
}


x86 assembly (clang, -O0):
<foo>:
push   %rbp
mov    %rsp,%rbp
movl   $0x0,-0x20(%rbp)
cmpl   $0x2,-0x20(%rbp)
jge    1177 <foo+0x77>
movl   $0x0,-0x24(%rbp)
movl   $0x0,-0x1c(%rbp)
cmpl   $0x2,-0x1c(%rbp)
jge    1160 <foo+0x60>
movslq -0x20(%rbp),%rcx
lea    -0x10(%rbp),%rax
shl    $0x3,%rcx
add    %rcx,%rax
movslq -0x1c(%rbp),%rcx
mov    (%rax,%rcx,4),%eax
movslq -0x1c(%rbp),%rcx
imul   -0x18(%rbp,%rcx,4),%eax
add    -0x24(%rbp),%eax
mov    %eax,-0x24(%rbp)
mov    -0x1c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x1c(%rbp)
jmp    1123 <foo+0x23>
mov    -0x24(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x24(%rbp)
mov    -0x20(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x20(%rbp)
jmp    110b <foo+0xb>
mov    -0x24(%rbp),%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @foo() {
ret i32 undef
}
unsigned xrop3_96_1_1(unsigned char s, unsigned char t) {
  unsigned D = 0x00ff;
  unsigned S = ((unsigned)s << 8) | s;
  unsigned T = ((unsigned)t << 8) | t;
  unsigned stk1;
  unsigned stk2;
  stk2 = D ^ S;
  stk1 = T & stk2;
  return (stk1 & (~S) & (~T)) | (D & S) | (D & T);
}


x86 assembly (clang, -O0):
<xrop3_96_1_1>:
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)
movzbl -0x2(%rbp),%eax
shl    $0x8,%eax
movzbl -0x2(%rbp),%ecx
or     %ecx,%eax
mov    %eax,-0x10(%rbp)
mov    -0x8(%rbp),%eax
xor    -0xc(%rbp),%eax
mov    %eax,-0x18(%rbp)
mov    -0x10(%rbp),%eax
and    -0x18(%rbp),%eax
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
mov    -0xc(%rbp),%ecx
xor    $0xffffffff,%ecx
and    %ecx,%eax
mov    -0x10(%rbp),%ecx
xor    $0xffffffff,%ecx
and    %ecx,%eax
mov    -0x8(%rbp),%ecx
and    -0xc(%rbp),%ecx
or     %ecx,%eax
mov    -0x8(%rbp),%ecx
and    -0x10(%rbp),%ecx
or     %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<xrop3_96_1_1>:
mov    %edi,%eax
or     %esi,%eax
ret

LLVM IR (-O0):
define i32 @xrop3_96_1_1(i8 zeroext %0, i8 zeroext %1) {
%3 = alloca i8
%4 = alloca i8
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32
store i8 %0, i8* %3
store i8 %1, i8* %4
store i32 255, i32* %5
%10 = load i8, i8* %3
%11 = zext i8 %10 to i32
%12 = shl i32 %11, 8
%13 = load i8, i8* %3
%14 = zext i8 %13 to i32
%15 = or i32 %12, %14
store i32 %15, i32* %6
%16 = load i8, i8* %4
%17 = zext i8 %16 to i32
%18 = shl i32 %17, 8
%19 = load i8, i8* %4
%20 = zext i8 %19 to i32
%21 = or i32 %18, %20
store i32 %21, i32* %7
%22 = load i32, i32* %5
%23 = load i32, i32* %6
%24 = xor i32 %22, %23
store i32 %24, i32* %9
%25 = load i32, i32* %7
%26 = load i32, i32* %9
%27 = and i32 %25, %26
store i32 %27, i32* %8
%28 = load i32, i32* %8
%29 = load i32, i32* %6
%30 = xor i32 %29, -1
%31 = and i32 %28, %30
%32 = load i32, i32* %7
%33 = xor i32 %32, -1
%34 = and i32 %31, %33
%35 = load i32, i32* %5
%36 = load i32, i32* %6
%37 = and i32 %35, %36
%38 = or i32 %34, %37
%39 = load i32, i32* %5
%40 = load i32, i32* %7
%41 = and i32 %39, %40
%42 = or i32 %38, %41
ret i32 %42
}

LLVM IR (-O2):
define i32 @xrop3_96_1_1(i8 zeroext %0, i8 zeroext %1) {
%3 = or i8 %1, %0
%4 = zext i8 %3 to i32
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ test_mxml_comment_entities();
void all_mxml_tests() { test_mxml_comment_entities(); }


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

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

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

LLVM IR (-O2):
define void @all_mxml_tests() {
%1 = tail call i32 (...) @test_mxml_comment_entities()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int /*<<< orphan*/ *);
int main(int argc, char *argv[]) { printf("\"%s\"\n", NULL); }


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

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

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

LLVM IR (-O2):
@.str = [6 x i8] c"\22%s\22\0A\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i32* null)
ret i32 0
}