xunge/DecIR huggingface dataset:
/* Variables and functions */
double __ieee754_pow(double, double);
double pow(double x, double y) { return __ieee754_pow(x, y); }


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

x86 assembly (clang, -O2):
<pow>:
jmp    1030 <__ieee754_pow@plt>

LLVM IR (-O0):
define double @pow(double %0, double %1) {
%3 = alloca double
%4 = alloca double
store double %0, double* %3
store double %1, double* %4
%5 = load double, double* %3
%6 = load double, double* %4
%7 = call double @__ieee754_pow(double %5, double %6)
ret double %7
}

LLVM IR (-O2):
define double @pow(double %0, double %1) {
%3 = tail call double @__ieee754_pow(double %0, double %1)
ret double %3
}
int f(int *x, int *y) {
  *x = 3;
  *y = 7;
  return 3;
}


x86 assembly (clang, -O0):
<f>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
movl   $0x3,(%rax)
mov    -0x10(%rbp),%rax
movl   $0x7,(%rax)
mov    $0x3,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<f>:
movl   $0x3,(%rdi)
movl   $0x7,(%rsi)
mov    $0x3,%eax
ret

LLVM IR (-O0):
define i32 @f(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
store i32 3, i32* %5
%6 = load i32*, i32** %4
store i32 7, i32* %6
ret i32 3
}

LLVM IR (-O2):
define i32 @f(i32* nocapture writeonly %0, i32* nocapture writeonly %1) {
store i32 3, i32* %0
store i32 7, i32* %1
ret i32 3
}
/* Variables and functions */
int /*<<< orphan*/ do_poll(int);
int /*<<< orphan*/ listen(int, int);
int socket_bind(char *, int);
int main(int argc, char *argv[]) {
  int listenfd;
  listenfd = socket_bind("127.0.0.1", 8787);
  listen(listenfd, 5);
  do_poll(listenfd);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
lea    0xeb3(%rip),%rdi
mov    $0x2253,%esi
call   1030 <socket_bind@plt>
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%edi
mov    $0x5,%esi
call   1040 <listen@plt>
mov    -0x14(%rbp),%edi
call   1050 <do_poll@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
lea    0xec8(%rip),%rdi
mov    $0x2253,%esi
call   1030 <socket_bind@plt>
mov    %eax,%ebx
mov    %eax,%edi
mov    $0x5,%esi
call   1040 <listen@plt>
mov    %ebx,%edi
call   1050 <do_poll@plt>
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [10 x i8] c"127.0.0.1\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i32
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%7 = call i32 @socket_bind(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i32 8787)
store i32 %7, i32* %6
%8 = load i32, i32* %6
%9 = call i32 @listen(i32 %8, i32 5)
%10 = load i32, i32* %6
%11 = call i32 @do_poll(i32 %10)
ret i32 0
}

LLVM IR (-O2):
@.str = [10 x i8] c"127.0.0.1\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @socket_bind(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i32 8787)
%4 = tail call i32 @listen(i32 %3, i32 5)
%5 = tail call i32 @do_poll(i32 %3)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ http_get(char *);
void stop() { http_get("/stop"); }


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

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

LLVM IR (-O0):
@.str = [6 x i8] c"/stop\00"
define void @stop() {
%1 = call i32 @http_get(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [6 x i8] c"/stop\00"
define void @stop() {
%1 = tail call i32 @http_get(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ assnull();
int /*<<< orphan*/ lshift();
int /*<<< orphan*/ uadd();
int /*<<< orphan*/ ushift();
main() {
  assnull();
  ushift();
  lshift();
  uadd();
  return 0;
}


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

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1060 <assnull@plt>
xor    %eax,%eax
call   1050 <ushift@plt>
xor    %eax,%eax
call   1040 <lshift@plt>
xor    %eax,%eax
call   1030 <uadd@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 (...) @assnull()
%3 = call i32 (...) @ushift()
%4 = call i32 (...) @lshift()
%5 = call i32 (...) @uadd()
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @assnull()
%2 = tail call i32 (...) @ushift()
%3 = tail call i32 (...) @lshift()
%4 = tail call i32 (...) @uadd()
ret i32 0
}
/* Type definitions */
struct tempfile {
  int dummy;
};

/* Variables and functions */
int mks_tempfile_sm(struct tempfile *, char const *, int, int);
int mks_tempfile_s(struct tempfile *tempfile, const char *template,
                   int suffixlen) {
  return mks_tempfile_sm(tempfile, template, suffixlen, 0600);
}


x86 assembly (clang, -O0):
<mks_tempfile_s>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x14(%rbp),%edx
mov    $0x180,%ecx
call   1030 <mks_tempfile_sm@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<mks_tempfile_s>:
mov    $0x180,%ecx
jmp    1030 <mks_tempfile_sm@plt>

LLVM IR (-O0):
%struct.tempfile = type { i32 }
define i32 @mks_tempfile_s(%struct.tempfile* %0, i8* %1, i32 %2) {
%4 = alloca %struct.tempfile*
%5 = alloca i8*
%6 = alloca i32
store %struct.tempfile* %0, %struct.tempfile** %4
store i8* %1, i8** %5
store i32 %2, i32* %6
%7 = load %struct.tempfile*, %struct.tempfile** %4
%8 = load i8*, i8** %5
%9 = load i32, i32* %6
%10 = call i32 @mks_tempfile_sm(%struct.tempfile* %7, i8* %8, i32 %9, i32 384)
ret i32 %10
}

LLVM IR (-O2):
%struct.tempfile = type { i32 }
define i32 @mks_tempfile_s(%struct.tempfile* %0, i8* %1, i32 %2) {
%4 = tail call i32 @mks_tempfile_sm(%struct.tempfile* %0, i8* %1, i32 %2, i32 384)
ret i32 %4
}
long map(long value, long fromStart, long fromEnd, long toStart, long toEnd) {
  return (value - fromStart) * (toEnd - toStart) / (fromEnd - fromStart) +
         toStart;
}


x86 assembly (clang, -O0):
<map>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    %r8,-0x28(%rbp)
mov    -0x8(%rbp),%rax
sub    -0x10(%rbp),%rax
mov    -0x28(%rbp),%rcx
sub    -0x20(%rbp),%rcx
imul   %rcx,%rax
mov    -0x18(%rbp),%rcx
sub    -0x10(%rbp),%rcx
cqto
idiv   %rcx
add    -0x20(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<map>:
mov    %r8,%rax
mov    %rdx,%r8
sub    %rsi,%rdi
sub    %rcx,%rax
imul   %rdi,%rax
sub    %rsi,%r8
mov    %rax,%rdx
or     %r8,%rdx
shr    $0x20,%rdx
je     1128 <map+0x28>
cqto
idiv   %r8
add    %rcx,%rax
ret
xor    %edx,%edx
div    %r8d
add    %rcx,%rax
ret

LLVM IR (-O0):
define i64 @map(i64 %0, i64 %1, i64 %2, i64 %3, i64 %4) {
%6 = alloca i64
%7 = alloca i64
%8 = alloca i64
%9 = alloca i64
%10 = alloca i64
store i64 %0, i64* %6
store i64 %1, i64* %7
store i64 %2, i64* %8
store i64 %3, i64* %9
store i64 %4, i64* %10
%11 = load i64, i64* %6
%12 = load i64, i64* %7
%13 = sub nsw i64 %11, %12
%14 = load i64, i64* %10
%15 = load i64, i64* %9
%16 = sub nsw i64 %14, %15
%17 = mul nsw i64 %13, %16
%18 = load i64, i64* %8
%19 = load i64, i64* %7
%20 = sub nsw i64 %18, %19
%21 = sdiv i64 %17, %20
%22 = load i64, i64* %9
%23 = add nsw i64 %21, %22
ret i64 %23
}

LLVM IR (-O2):
define i64 @map(i64 %0, i64 %1, i64 %2, i64 %3, i64 %4) {
%6 = sub nsw i64 %0, %1
%7 = sub nsw i64 %4, %3
%8 = mul nsw i64 %7, %6
%9 = sub nsw i64 %2, %1
%10 = sdiv i64 %8, %9
%11 = add nsw i64 %10, %3
ret i64 %11
}
int config_MODULE_SERIAL(void) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @config_MODULE_SERIAL() {
ret i32 0
}
/* Variables and functions */
unsigned long long ULLONG_MAX;
unsigned long long ullong(unsigned long long n) {
  return n == ULLONG_MAX ? n : 42;
}


x86 assembly (clang, -O0):
<ullong>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    0x2ed5(%rip),%rcx
cmp    (%rcx),%rax
jne    1129 <ullong+0x29>
mov    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
jmp    1137 <ullong+0x37>
mov    $0x2a,%eax
mov    %rax,-0x10(%rbp)
jmp    1137 <ullong+0x37>
mov    -0x10(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<ullong>:
mov    0x2ee1(%rip),%rax
cmp    %rdi,(%rax)
mov    $0x2a,%eax
cmove  %rdi,%rax
ret

LLVM IR (-O0):
@ULLONG_MAX = global i64 0
define i64 @ullong(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = load i64, i64* %2
%4 = load i64, i64* @ULLONG_MAX
%5 = icmp eq i64 %3, %4
br i1 %5, label %6, label %8
6: ; preds = %1
%7 = load i64, i64* %2
br label %9
8: ; preds = %1
br label %9
9: ; preds = %8, %6
%10 = phi i64 [ %7, %6 ], [ 42, %8 ]
ret i64 %10
}

LLVM IR (-O2):
@ULLONG_MAX = global i64 0
define i64 @ullong(i64 %0) {
%2 = load i64, i64* @ULLONG_MAX
%3 = icmp eq i64 %2, %0
%4 = select i1 %3, i64 %0, i64 42
ret i64 %4
}
/* Variables and functions */
double ran1();
double rand_double() { return ran1(); }


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

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

LLVM IR (-O0):
define double @rand_double() {
%1 = call double (...) @ran1()
ret double %1
}

LLVM IR (-O2):
define double @rand_double() {
%1 = tail call double (...) @ran1()
ret double %1
}
/* Type definitions */
struct dspd_dict {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ dspd_dict_find_value(struct dspd_dict const *, char const *,
                                        char **);
const char *dspd_dict_value_for_key(const struct dspd_dict *sect,
                                    const char *key) {
  char *ret = NULL;
  dspd_dict_find_value(sect, key, &ret);
  return ret;
}


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

x86 assembly (clang, -O2):
<dspd_dict_value_for_key>:
push   %rax
movq   $0x0,(%rsp)
mov    %rsp,%rdx
call   1030 <dspd_dict_find_value@plt>
mov    (%rsp),%rax
pop    %rcx
ret

LLVM IR (-O0):
%struct.dspd_dict = type { i32 }
define i8* @dspd_dict_value_for_key(%struct.dspd_dict* %0, i8* %1) {
%3 = alloca %struct.dspd_dict*
%4 = alloca i8*
%5 = alloca i8*
store %struct.dspd_dict* %0, %struct.dspd_dict** %3
store i8* %1, i8** %4
store i8* null, i8** %5
%6 = load %struct.dspd_dict*, %struct.dspd_dict** %3
%7 = load i8*, i8** %4
%8 = call i32 @dspd_dict_find_value(%struct.dspd_dict* %6, i8* %7, i8** %5)
%9 = load i8*, i8** %5
ret i8* %9
}

LLVM IR (-O2):
%struct.dspd_dict = type { i32 }
define i8* @dspd_dict_value_for_key(%struct.dspd_dict* %0, i8* %1) {
%3 = alloca i8*
%4 = bitcast i8** %3 to i8*
store i8* null, i8** %3
%5 = call i32 @dspd_dict_find_value(%struct.dspd_dict* %0, i8* %1, i8** %3)
%6 = load i8*, i8** %3
ret i8* %6
}
unsigned long myrand() {
  unsigned long lfsr = 0xACE1u;
  unsigned long bit;
  bit = ((lfsr >> 0) ^ (lfsr >> 2) ^ (lfsr >> 3) ^ (lfsr >> 5)) & 1;
  return lfsr = (lfsr >> 1) | (bit << 15);
}


x86 assembly (clang, -O0):
<myrand>:
push   %rbp
mov    %rsp,%rbp
movq   $0xace1,-0x8(%rbp)
mov    -0x8(%rbp),%rax
shr    $0x0,%rax
mov    -0x8(%rbp),%rcx
shr    $0x2,%rcx
xor    %rcx,%rax
mov    -0x8(%rbp),%rcx
shr    $0x3,%rcx
xor    %rcx,%rax
mov    -0x8(%rbp),%rcx
shr    $0x5,%rcx
xor    %rcx,%rax
and    $0x1,%rax
mov    %rax,-0x10(%rbp)
mov    -0x8(%rbp),%rax
shr    $0x1,%rax
mov    -0x10(%rbp),%rcx
shl    $0xf,%rcx
or     %rcx,%rax
mov    %rax,-0x8(%rbp)
pop    %rbp
ret

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

LLVM IR (-O0):
define i64 @myrand() {
%1 = alloca i64
%2 = alloca i64
store i64 44257, i64* %1
%3 = load i64, i64* %1
%4 = lshr i64 %3, 0
%5 = load i64, i64* %1
%6 = lshr i64 %5, 2
%7 = xor i64 %4, %6
%8 = load i64, i64* %1
%9 = lshr i64 %8, 3
%10 = xor i64 %7, %9
%11 = load i64, i64* %1
%12 = lshr i64 %11, 5
%13 = xor i64 %10, %12
%14 = and i64 %13, 1
store i64 %14, i64* %2
%15 = load i64, i64* %1
%16 = lshr i64 %15, 1
%17 = load i64, i64* %2
%18 = shl i64 %17, 15
%19 = or i64 %16, %18
store i64 %19, i64* %1
ret i64 %19
}

LLVM IR (-O2):
define i64 @myrand() {
ret i64 22128
}
/* Variables and functions */
int EXIT_SUCCESS;
double cels2fahr(double);
int /*<<< orphan*/ printf(char *, double);
double readd(char *);
int main() {
  double celsius, fahrenheit;
  celsius = readd("Enter temperature in Celsius");
  fahrenheit = cels2fahr(celsius);
  printf("The temperature in Fahrenheit: %.2f\n", fahrenheit);
  return EXIT_SUCCESS;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeba(%rip),%rdi
call   1040 <readd@plt>
movsd  %xmm0,-0x10(%rbp)
movsd  -0x10(%rbp),%xmm0
call   1050 <cels2fahr@plt>
movsd  %xmm0,-0x18(%rbp)
movsd  -0x18(%rbp),%xmm0
lea    0xeb2(%rip),%rdi
call   1030 <printf@plt>
mov    0x2e69(%rip),%rax
mov    (%rax),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xec8(%rip),%rdi
call   1040 <readd@plt>
call   1050 <cels2fahr@plt>
lea    0xed4(%rip),%rdi
call   1030 <printf@plt>
mov    0x2e8b(%rip),%rax
mov    (%rax),%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [29 x i8] c"Enter temperature in Celsius\00"
@.str.1 = [37 x i8] c"The temperature in Fahrenheit: %.2f\0A\00"
@EXIT_SUCCESS = global i32 0
define i32 @main() {
%1 = alloca i32
%2 = alloca double
%3 = alloca double
store i32 0, i32* %1
%4 = call double @readd(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str, i64 0, i64 0))
store double %4, double* %2
%5 = load double, double* %2
%6 = call double @cels2fahr(double %5)
store double %6, double* %3
%7 = load double, double* %3
%8 = call i32 @printf(i8* getelementptr inbounds ([37 x i8], [37 x i8]* @.str.1, i64 0, i64 0), double %7)
%9 = load i32, i32* @EXIT_SUCCESS
ret i32 %9
}

LLVM IR (-O2):
@.str = [29 x i8] c"Enter temperature in Celsius\00"
@.str.1 = [37 x i8] c"The temperature in Fahrenheit: %.2f\0A\00"
@EXIT_SUCCESS = global i32 0
define i32 @main() {
%1 = tail call double @readd(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str, i64 0, i64 0))
%2 = tail call double @cels2fahr(double %1)
%3 = tail call i32 @printf(i8* getelementptr inbounds ([37 x i8], [37 x i8]* @.str.1, i64 0, i64 0), double %2)
%4 = load i32, i32* @EXIT_SUCCESS
ret i32 %4
}
void g_tuples_index() {}


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

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

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

LLVM IR (-O2):
define void @g_tuples_index() {
ret void
}
float power_spec(float a) {
  float b = a * a;
  float c = b * b;
  return c * c;
}


x86 assembly (clang, -O0):
<power_spec>:
push   %rbp
mov    %rsp,%rbp
movss  %xmm0,-0x4(%rbp)
movss  -0x4(%rbp),%xmm0
mulss  -0x4(%rbp),%xmm0
movss  %xmm0,-0x8(%rbp)
movss  -0x8(%rbp),%xmm0
mulss  -0x8(%rbp),%xmm0
movss  %xmm0,-0xc(%rbp)
movss  -0xc(%rbp),%xmm0
mulss  -0xc(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<power_spec>:
mulss  %xmm0,%xmm0
mulss  %xmm0,%xmm0
mulss  %xmm0,%xmm0
ret

LLVM IR (-O0):
define float @power_spec(float %0) {
%2 = alloca float
%3 = alloca float
%4 = alloca float
store float %0, float* %2
%5 = load float, float* %2
%6 = load float, float* %2
%7 = fmul float %5, %6
store float %7, float* %3
%8 = load float, float* %3
%9 = load float, float* %3
%10 = fmul float %8, %9
store float %10, float* %4
%11 = load float, float* %4
%12 = load float, float* %4
%13 = fmul float %11, %12
ret float %13
}

LLVM IR (-O2):
define float @power_spec(float %0) {
%2 = fmul float %0, %0
%3 = fmul float %2, %2
%4 = fmul float %3, %3
ret float %4
}
/* Forward declarations */
typedef struct TYPE_4__ TYPE_2__;
typedef struct TYPE_3__ TYPE_1__;

/* Type definitions */
struct TYPE_3__ {
  int send_event;
};
struct TYPE_4__ {
  TYPE_1__ xreparent;
};
typedef TYPE_2__ XEvent;

/* Variables and functions */
void set_XEvent_xreparent_send_event(void *_p, int _v) {
  ((XEvent *)_p)->xreparent.send_event = (int)_v;
}


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

x86 assembly (clang, -O2):
<set_XEvent_xreparent_send_event>:
mov    %esi,(%rdi)
ret

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

LLVM IR (-O2):
define void @set_XEvent_xreparent_send_event(i8* nocapture writeonly %0, i32 %1) {
%3 = bitcast i8* %0 to i32*
store i32 %1, i32* %3
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ pthread_mutex_t;

/* Variables and functions */
int pthread_mutex_trylock(pthread_mutex_t *mutex) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @pthread_mutex_trylock(i32* nocapture readnone %0) {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ printf(char *);
int xpipe(int *fd) {
  printf("pipe() not implemented\n");
  exit(-1);
}


x86 assembly (clang, -O0):
<xpipe>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
lea    0xecd(%rip),%rdi
call   1030 <printf@plt>
mov    $0xffffffff,%edi
call   1040 <exit@plt>

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

LLVM IR (-O0):
@.str = [24 x i8] c"pipe() not implemented\0A\00"
define i32 @xpipe(i32* %0) {
%2 = alloca i32*
store i32* %0, i32** %2
%3 = call i32 @printf(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str, i64 0, i64 0))
%4 = call i32 @exit(i32 -1)
unreachable
}

LLVM IR (-O2):
@str = [23 x i8] c"pipe() not implemented\00"
define i32 @xpipe(i32* nocapture readnone %0) {
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([23 x i8], [23 x i8]* @str, i64 0, i64 0))
%3 = tail call i32 @exit(i32 -1)
unreachable
}
int test_imm_51int8_mem(signed char *val) {
  return ((*val) & (-0x51 << 0)) ? -20 : -40;
}


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

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

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

LLVM IR (-O2):
define i32 @test_imm_51int8_mem(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = and i8 %2, -81
%4 = icmp eq i8 %3, 0
%5 = select i1 %4, i32 -40, i32 -20
ret i32 %5
}
int getboxnr(int row, int col) { return (row - row % 3) + col / 3; }


x86 assembly (clang, -O0):
<getboxnr>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
mov    %eax,-0x10(%rbp)
mov    -0x4(%rbp),%eax
mov    $0x3,%ecx
cltd
idiv   %ecx
mov    -0x10(%rbp),%eax
sub    %edx,%eax
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%eax
mov    $0x3,%ecx
cltd
idiv   %ecx
mov    %eax,%ecx
mov    -0xc(%rbp),%eax
add    %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<getboxnr>:
movslq %edi,%rax
imul   $0x55555556,%rax,%rax
mov    %rax,%rcx
shr    $0x3f,%rcx
shr    $0x20,%rax
add    %ecx,%eax
lea    (%rax,%rax,2),%ecx
movslq %esi,%rax
imul   $0x55555556,%rax,%rax
mov    %rax,%rdx
shr    $0x3f,%rdx
shr    $0x20,%rax
add    %edx,%eax
add    %ecx,%eax
ret

LLVM IR (-O0):
define i32 @getboxnr(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* %3
%7 = srem i32 %6, 3
%8 = sub nsw i32 %5, %7
%9 = load i32, i32* %4
%10 = sdiv i32 %9, 3
%11 = add nsw i32 %8, %10
ret i32 %11
}

LLVM IR (-O2):
define i32 @getboxnr(i32 %0, i32 %1) {
%3 = srem i32 %0, 3
%4 = sub i32 %0, %3
%5 = sdiv i32 %1, 3
%6 = add nsw i32 %4, %5
ret i32 %6
}
/* Variables and functions */
int receive_data(int, float *, int);
int receive_float(int socket, float *x) {
  return receive_data(socket, x, sizeof(float));
}


x86 assembly (clang, -O0):
<receive_float>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x10(%rbp),%rsi
mov    $0x4,%edx
call   1030 <receive_data@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<receive_float>:
mov    $0x4,%edx
jmp    1030 <receive_data@plt>

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

LLVM IR (-O2):
define i32 @receive_float(i32 %0, float* %1) {
%3 = tail call i32 @receive_data(i32 %0, float* %1, i32 4)
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ recurse();
main() { recurse(); }


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

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

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

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @recurse()
ret i32 0
}
void do_fxrstor(void *p) {
  asm __volatile__("fxrstor (%0)" : : "r"(p) : "memory");
}


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

x86 assembly (clang, -O2):
<do_fxrstor>:
fxrstor (%rdi)
ret

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

LLVM IR (-O2):
define void @do_fxrstor(i8* %0) {
tail call void asm sideeffect "fxrstor ($0)", "r,~{memory},~{dirflag},~{fpsr},~{flags}"(i8* %0)
ret void
}
int commandA(char *inBuf, char *outBuf) { return 0; }


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

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

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

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

/* Variables and functions */
void mcnet_write_bool(uint8_t *out, int8_t in) { out[0] = ((in >> 0) & 0x01); }


x86 assembly (clang, -O0):
<mcnet_write_bool>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0xc(%rbp),%ecx
sar    $0x0,%ecx
and    $0x1,%ecx
mov    -0x8(%rbp),%rax
mov    %ecx,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<mcnet_write_bool>:
and    $0x1,%esi
mov    %esi,(%rdi)
ret

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

LLVM IR (-O2):
define void @mcnet_write_bool(i32* nocapture writeonly %0, i32 %1) {
%3 = and i32 %1, 1
store i32 %3, i32* %0
ret void
}
int cmp(const void *pa, const void *pb) {
  char a = *(const char *)pa;
  char b = *(const char *)pb;
  return a < b ? 1 : a == b ? 0 : 1;
}


x86 assembly (clang, -O0):
<cmp>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%al
mov    %al,-0x11(%rbp)
mov    -0x10(%rbp),%rax
mov    (%rax),%al
mov    %al,-0x12(%rbp)
movsbl -0x11(%rbp),%eax
movsbl -0x12(%rbp),%ecx
cmp    %ecx,%eax
jge    113b <cmp+0x3b>
mov    $0x1,%eax
mov    %eax,-0x18(%rbp)
jmp    1152 <cmp+0x52>
movsbl -0x11(%rbp),%edx
movsbl -0x12(%rbp),%esi
mov    $0x1,%eax
xor    %ecx,%ecx
cmp    %esi,%edx
cmove  %ecx,%eax
mov    %eax,-0x18(%rbp)
mov    -0x18(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<cmp>:
mov    (%rdi),%cl
xor    %eax,%eax
cmp    (%rsi),%cl
setne  %al
ret

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

LLVM IR (-O2):
define i32 @cmp(i8* nocapture %0, i8* nocapture %1) {
%3 = load i8, i8* %0
%4 = load i8, i8* %1
%5 = icmp ne i8 %3, %4
%6 = zext i1 %5 to i32
ret i32 %6
}
double mkelvin_to_F(int mkelvin) { return mkelvin * 9 / 5000.0 - 459.670; }


x86 assembly (clang, -O0):
<mkelvin_to_F>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
imul   $0x9,-0x4(%rbp),%eax
cvtsi2sd %eax,%xmm0
movsd  0xef1(%rip),%xmm1
divsd  %xmm1,%xmm0
movsd  0xedd(%rip),%xmm1
subsd  %xmm1,%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<mkelvin_to_F>:
lea    (%rdi,%rdi,8),%eax
cvtsi2sd %eax,%xmm0
divsd  0xef1(%rip),%xmm0
addsd  0xef1(%rip),%xmm0
ret

LLVM IR (-O0):
define double @mkelvin_to_F(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = mul nsw i32 %3, 9
%5 = sitofp i32 %4 to double
%6 = fdiv double %5, 5.000000e+03
%7 = fsub double %6, 4.596700e+02
ret double %7
}

LLVM IR (-O2):
define double @mkelvin_to_F(i32 %0) {
%2 = mul nsw i32 %0, 9
%3 = sitofp i32 %2 to double
%4 = fdiv double %3, 5.000000e+03
%5 = fadd double %4, -4.596700e+02
ret double %5
}
/* Variables and functions */
int read(int, unsigned char *, int);
int getbyte(int fd, unsigned char *b) { return (read(fd, b, 1) == 1); }


x86 assembly (clang, -O0):
<getbyte>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x10(%rbp),%rsi
mov    $0x1,%edx
call   1030 <read@plt>
cmp    $0x1,%eax
sete   %al
and    $0x1,%al
movzbl %al,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<getbyte>:
push   %rax
mov    $0x1,%edx
call   1030 <read@plt>
xor    %ecx,%ecx
cmp    $0x1,%eax
sete   %cl
mov    %ecx,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @getbyte(i32 %0, i8* %1) {
%3 = alloca i32
%4 = alloca i8*
store i32 %0, i32* %3
store i8* %1, i8** %4
%5 = load i32, i32* %3
%6 = load i8*, i8** %4
%7 = call i32 @read(i32 %5, i8* %6, i32 1)
%8 = icmp eq i32 %7, 1
%9 = zext i1 %8 to i32
ret i32 %9
}

LLVM IR (-O2):
define i32 @getbyte(i32 %0, i8* nocapture %1) {
%3 = tail call i32 @read(i32 %0, i8* %1, i32 1)
%4 = icmp eq i32 %3, 1
%5 = zext i1 %4 to i32
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ httpShutdown();
void sigHand(int sig __attribute__((unused))) {
  httpShutdown();
  exit(0);
}


x86 assembly (clang, -O0):
<sigHand>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    $0x0,%al
call   1030 <httpShutdown@plt>
xor    %edi,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<sigHand>:
push   %rax
xor    %eax,%eax
call   1030 <httpShutdown@plt>
xor    %edi,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
define void @sigHand(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = call i32 (...) @httpShutdown()
%4 = call i32 @exit(i32 0)
unreachable
}

LLVM IR (-O2):
define void @sigHand(i32 %0) {
%2 = tail call i32 (...) @httpShutdown()
%3 = tail call i32 @exit(i32 0)
unreachable
}
/* Forward declarations */
typedef struct TYPE_2__ TYPE_1__;

/* Type definitions */
typedef int /*<<< orphan*/ Visual;
struct TYPE_2__ {
  int /*<<< orphan*/ *root_visual;
};
typedef TYPE_1__ Screen;

/* Variables and functions */
void set_Screen_root_visual(void *_p, void *_v) {
  ((Screen *)_p)->root_visual = (Visual *)_v;
}


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

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

LLVM IR (-O0):
%struct.TYPE_2__ = type { i32* }
define void @set_Screen_root_visual(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
store i8* %0, i8** %3
store i8* %1, i8** %4
%5 = load i8*, i8** %4
%6 = bitcast i8* %5 to i32*
%7 = load i8*, i8** %3
%8 = bitcast i8* %7 to %struct.TYPE_2__*
%9 = getelementptr inbounds %struct.TYPE_2__, %struct.TYPE_2__* %8, i32 0, i32 0
store i32* %6, i32** %9
ret void
}

LLVM IR (-O2):
define void @set_Screen_root_visual(i8* nocapture writeonly %0, i8* %1) {
%3 = bitcast i8* %0 to i8**
store i8* %1, i8** %3
ret void
}
void CmdTabset(void) {}


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

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

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

LLVM IR (-O2):
define void @CmdTabset() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ EINVAL;
int INLINE_SYSCALL_ERROR_RETURN_VALUE(int /*<<< orphan*/);
int /*<<< orphan*/ TCSBRK;
int __ioctl(int, int /*<<< orphan*/, int /*<<< orphan*/);
int tcsendbreak(int fd, int duration) {
  if (duration <= 0)
    return __ioctl(fd, TCSBRK, 0);
  return INLINE_SYSCALL_ERROR_RETURN_VALUE(EINVAL);
}


x86 assembly (clang, -O0):
<tcsendbreak>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
cmpl   $0x0,-0xc(%rbp)
jg     1153 <tcsendbreak+0x33>
mov    -0x8(%rbp),%edi
mov    0x2eae(%rip),%rax
mov    (%rax),%esi
xor    %edx,%edx
call   1030 <__ioctl@plt>
mov    %eax,-0x4(%rbp)
jmp    1164 <tcsendbreak+0x44>
mov    0x2e7e(%rip),%rax
mov    (%rax),%edi
call   1040 <INLINE_SYSCALL_ERROR_RETURN_VALUE@plt>
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<tcsendbreak>:
test   %esi,%esi
jle    1132 <tcsendbreak+0x12>
mov    0x2ead(%rip),%rax
mov    (%rax),%edi
jmp    1040 <INLINE_SYSCALL_ERROR_RETURN_VALUE@plt>
mov    0x2eb7(%rip),%rax
mov    (%rax),%esi
xor    %edx,%edx
jmp    1030 <__ioctl@plt>

LLVM IR (-O0):
@TCSBRK = global i32 0
@EINVAL = global i32 0
define i32 @tcsendbreak(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* %5
%7 = icmp sle i32 %6, 0
br i1 %7, label %8, label %12
8: ; preds = %2
%9 = load i32, i32* %4
%10 = load i32, i32* @TCSBRK
%11 = call i32 @__ioctl(i32 %9, i32 %10, i32 0)
store i32 %11, i32* %3
br label %15
12: ; preds = %2
%13 = load i32, i32* @EINVAL
%14 = call i32 @INLINE_SYSCALL_ERROR_RETURN_VALUE(i32 %13)
store i32 %14, i32* %3
br label %15
15: ; preds = %12, %8
%16 = load i32, i32* %3
ret i32 %16
}

LLVM IR (-O2):
@TCSBRK = global i32 0
@EINVAL = global i32 0
define i32 @tcsendbreak(i32 %0, i32 %1) {
%3 = icmp slt i32 %1, 1
br i1 %3, label %4, label %7
4: ; preds = %2
%5 = load i32, i32* @TCSBRK
%6 = tail call i32 @__ioctl(i32 %0, i32 %5, i32 0)
br label %10
7: ; preds = %2
%8 = load i32, i32* @EINVAL
%9 = tail call i32 @INLINE_SYSCALL_ERROR_RETURN_VALUE(i32 %8)
br label %10
10: ; preds = %7, %4
%11 = phi i32 [ %6, %4 ], [ %9, %7 ]
ret i32 %11
}
/* Type definitions */
typedef int /*<<< orphan*/ socklen_t;

/* Variables and functions */
char const *inet_ntop(int, void const *, char *, int /*<<< orphan*/);
const char *_GeoIP_inet_ntop(int af, const void *src, char *dst,
                             socklen_t cnt) {
  return inet_ntop(af, src, dst, cnt);
}


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

x86 assembly (clang, -O2):
<_GeoIP_inet_ntop>:
jmp    1030 <inet_ntop@plt>

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

LLVM IR (-O2):
define i8* @_GeoIP_inet_ntop(i32 %0, i8* %1, i8* %2, i32 %3) {
%5 = tail call i8* @inet_ntop(i32 %0, i8* %1, i8* %2, i32 %3)
ret i8* %5
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ fputs(char *, int /*<<< orphan*/ *);
void __attribute__((__noreturn__)) usage(FILE *out) {
  fputs("Usage: test_sigreceive [-s|--setuid <login|uid>]\n", out);
  exit(0);
}


x86 assembly (clang, -O0):
<usage>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rsi
lea    0xec9(%rip),%rdi
call   1030 <fputs@plt>
xor    %edi,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<usage>:
push   %rax
mov    %rdi,%rcx
lea    0xed5(%rip),%rdi
mov    $0x31,%esi
mov    $0x1,%edx
call   1040 <fwrite@plt>
xor    %edi,%edi
call   1030 <exit@plt>

LLVM IR (-O0):
@.str = [50 x i8] c"Usage: test_sigreceive [-s|--setuid <login|uid>]\0A\00"
define void @usage(i32* %0) {
%2 = alloca i32*
store i32* %0, i32** %2
%3 = load i32*, i32** %2
%4 = call i32 @fputs(i8* getelementptr inbounds ([50 x i8], [50 x i8]* @.str, i64 0, i64 0), i32* %3)
%5 = call i32 @exit(i32 0)
unreachable
}

LLVM IR (-O2):
@.str = [50 x i8] c"Usage: test_sigreceive [-s|--setuid <login|uid>]\0A\00"
define void @usage(i32* nocapture %0) {
%2 = tail call i64 @fwrite(i8* getelementptr inbounds ([50 x i8], [50 x i8]* @.str, i64 0, i64 0), i64 49, i64 1, i32* %0)
%3 = tail call i32 @exit(i32 0)
unreachable
}
void leds_OFF_all(void) {
  ((*(volatile unsigned long *)0x7F008808) |= (1 << 5));
  ((*(volatile unsigned long *)0x7F008808) |= (1 << 6));
}


x86 assembly (clang, -O0):
<leds_OFF_all>:
push   %rbp
mov    %rsp,%rbp
mov    $0x7f008808,%eax
mov    (%rax),%rcx
or     $0x20,%rcx
mov    $0x7f008808,%eax
mov    %rcx,(%rax)
mov    $0x7f008808,%eax
mov    (%rax),%rcx
or     $0x40,%rcx
mov    $0x7f008808,%eax
mov    %rcx,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<leds_OFF_all>:
orq    $0x20,0x7f008808
7f 20
orq    $0x40,0x7f008808
7f 40
ret

LLVM IR (-O0):
define void @leds_OFF_all() {
%1 = load volatile i64, i64* inttoptr (i64 2130741256 to i64*)
%2 = or i64 %1, 32
store volatile i64 %2, i64* inttoptr (i64 2130741256 to i64*)
%3 = load volatile i64, i64* inttoptr (i64 2130741256 to i64*)
%4 = or i64 %3, 64
store volatile i64 %4, i64* inttoptr (i64 2130741256 to i64*)
ret void
}

LLVM IR (-O2):
define void @leds_OFF_all() {
%1 = load volatile i64, i64* inttoptr (i64 2130741256 to i64*)
%2 = or i64 %1, 32
store volatile i64 %2, i64* inttoptr (i64 2130741256 to i64*)
%3 = load volatile i64, i64* inttoptr (i64 2130741256 to i64*)
%4 = or i64 %3, 64
store volatile i64 %4, i64* inttoptr (i64 2130741256 to i64*)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ islower(int);
void t_islower_0xbd() {
  Assert_real((islower(189) == 0),
              "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
              "2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/"
              "dg/z88dk/test/suites/ctype/test_islower.c",
              950, ("islower should be 0 for 0xbd"));
}


x86 assembly (clang, -O0):
<t_islower_0xbd>:
push   %rbp
mov    %rsp,%rbp
mov    $0xbd,%edi
call   1030 <islower@plt>
cmp    $0x0,%rax
sete   %al
and    $0x1,%al
movzbl %al,%edi
lea    0xebf(%rip),%rsi
mov    $0x3b6,%edx
lea    0xf5b(%rip),%rcx
call   1040 <Assert_real@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<t_islower_0xbd>:
push   %rax
mov    $0xbd,%edi
call   1030 <islower@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf66(%rip),%rcx
mov    $0x3b6,%edx
pop    %rax
jmp    1040 <Assert_real@plt>

LLVM IR (-O0):
@.str = [168 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/ctype/test_islower.c\00"
@.str.1 = [29 x i8] c"islower should be 0 for 0xbd\00"
define void @t_islower_0xbd() {
%1 = call i64 @islower(i32 189)
%2 = icmp eq i64 %1, 0
%3 = zext i1 %2 to i32
%4 = call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([168 x i8], [168 x i8]* @.str, i64 0, i64 0), i32 950, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [168 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/ctype/test_islower.c\00"
@.str.1 = [29 x i8] c"islower should be 0 for 0xbd\00"
define void @t_islower_0xbd() {
%1 = tail call i64 @islower(i32 189)
%2 = icmp eq i64 %1, 0
%3 = zext i1 %2 to i32
%4 = tail call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([168 x i8], [168 x i8]* @.str, i64 0, i64 0), i32 950, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Type definitions */
struct comp {
  int dummy;
};
struct BrzBinaryFuncConstR_ {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ SEND_ACKDOWN_DELAYED(int /*<<< orphan*/, int /*<<< orphan*/);
void BrzBinaryFuncConstR_ackdown(struct comp *comp, int port) {
  struct BrzBinaryFuncConstR_ *c = (struct BrzBinaryFuncConstR_ *)comp;
  SEND_ACKDOWN_DELAYED(0, 0);
}


x86 assembly (clang, -O0):
<BrzBinaryFuncConstR_ackdown>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
xor    %esi,%esi
mov    %esi,%edi
call   1030 <SEND_ACKDOWN_DELAYED@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<BrzBinaryFuncConstR_ackdown>:
xor    %edi,%edi
xor    %esi,%esi
jmp    1030 <SEND_ACKDOWN_DELAYED@plt>

LLVM IR (-O0):
%struct.comp = type { i32 }
%struct.BrzBinaryFuncConstR_ = type { i32 }
define void @BrzBinaryFuncConstR_ackdown(%struct.comp* %0, i32 %1) {
%3 = alloca %struct.comp*
%4 = alloca i32
%5 = alloca %struct.BrzBinaryFuncConstR_*
store %struct.comp* %0, %struct.comp** %3
store i32 %1, i32* %4
%6 = load %struct.comp*, %struct.comp** %3
%7 = bitcast %struct.comp* %6 to %struct.BrzBinaryFuncConstR_*
store %struct.BrzBinaryFuncConstR_* %7, %struct.BrzBinaryFuncConstR_** %5
%8 = call i32 @SEND_ACKDOWN_DELAYED(i32 0, i32 0)
ret void
}

LLVM IR (-O2):
%struct.comp = type { i32 }
define void @BrzBinaryFuncConstR_ackdown(%struct.comp* nocapture readnone %0, i32 %1) {
%3 = tail call i32 @SEND_ACKDOWN_DELAYED(i32 0, i32 0)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ uint32_t;

/* Variables and functions */
int /*<<< orphan*/ *xmalloc(int);
uint32_t *i322ptr(uint32_t val) {
  uint32_t *ptr = xmalloc(sizeof(uint32_t));
  *ptr = val;
  return ptr;
}


x86 assembly (clang, -O0):
<i322ptr>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    $0x4,%edi
call   1030 <xmalloc@plt>
mov    %rax,-0x10(%rbp)
mov    -0x4(%rbp),%ecx
mov    -0x10(%rbp),%rax
mov    %ecx,(%rax)
mov    -0x10(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<i322ptr>:
push   %rbx
mov    %edi,%ebx
mov    $0x4,%edi
call   1030 <xmalloc@plt>
mov    %ebx,(%rax)
pop    %rbx
ret

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

LLVM IR (-O2):
define i32* @i322ptr(i32 %0) {
%2 = tail call i32* @xmalloc(i32 4)
store i32 %0, i32* %2
ret i32* %2
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ line_length(int /*<<< orphan*/ *);
void advance_to_sequence_name(FILE *alignment_file_pointer) {
  line_length(alignment_file_pointer);
}


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

x86 assembly (clang, -O2):
<advance_to_sequence_name>:
jmp    1030 <line_length@plt>

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

LLVM IR (-O2):
define void @advance_to_sequence_name(i32* %0) {
%2 = tail call i32 @line_length(i32* %0)
ret void
}
/* Variables and functions */
int recursive(int);
int main(void) { return recursive(100); }


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

x86 assembly (clang, -O2):
<main>:
mov    $0x64,%edi
jmp    1030 <recursive@plt>

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

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 @recursive(i32 100)
ret i32 %1
}
void LK_LED1_toggle(void) {}


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

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

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

LLVM IR (-O2):
define void @LK_LED1_toggle() {
ret void
}
unsigned xrop3_50_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;
  unsigned stk3;
  stk3 = T | S;
  stk2 = D | stk3;
  stk1 = S ^ stk2;
  return (stk1 & (~S) & (~T)) | (D & S) | (D & T);
}


x86 assembly (clang, -O0):
<xrop3_50_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    -0x10(%rbp),%eax
or     -0xc(%rbp),%eax
mov    %eax,-0x1c(%rbp)
mov    -0x8(%rbp),%eax
or     -0x1c(%rbp),%eax
mov    %eax,-0x18(%rbp)
mov    -0xc(%rbp),%eax
xor    -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_50_1_1>:
mov    %esi,%ecx
or     %edi,%esi
mov    %edi,%eax
shl    $0x8,%eax
shl    $0x8,%ecx
mov    %ecx,%edx
or     %eax,%edx
or     $0xff,%edx
or     %esi,%eax
or     %ecx,%eax
not    %eax
and    %edx,%eax
or     %esi,%eax
ret

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

LLVM IR (-O2):
define i32 @xrop3_50_1_1(i8 zeroext %0, i8 zeroext %1) {
%3 = zext i8 %0 to i32
%4 = shl nuw nsw i32 %3, 8
%5 = zext i8 %1 to i32
%6 = shl nuw nsw i32 %5, 8
%7 = or i32 %6, %4
%8 = or i32 %7, 255
%9 = or i8 %1, %0
%10 = zext i8 %9 to i32
%11 = or i32 %4, %10
%12 = or i32 %11, %6
%13 = xor i32 %12, -1
%14 = and i32 %8, %13
%15 = or i32 %14, %10
ret i32 %15
}