xunge/DecIR huggingface dataset:
int test_12(int a, int b) { return (a >= 0) ^ (b < 0) ? -20 : -40; }


x86 assembly (clang, -O0):
<test_12>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
cmpl   $0x0,-0x4(%rbp)
setge  %al
and    $0x1,%al
movzbl %al,%edx
cmpl   $0x0,-0x8(%rbp)
setl   %al
and    $0x1,%al
movzbl %al,%eax
xor    %eax,%edx
mov    $0xffffffd8,%eax
mov    $0xffffffec,%ecx
cmp    $0x0,%edx
cmovne %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_12>:
xor    %esi,%edi
mov    $0xffffffd8,%ecx
mov    $0xffffffec,%eax
cmovs  %ecx,%eax
ret

LLVM IR (-O0):
define i32 @test_12(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 = icmp sge i32 %5, 0
%7 = zext i1 %6 to i32
%8 = load i32, i32* %4
%9 = icmp slt i32 %8, 0
%10 = zext i1 %9 to i32
%11 = xor i32 %7, %10
%12 = icmp ne i32 %11, 0
%13 = zext i1 %12 to i64
%14 = select i1 %12, i32 -20, i32 -40
ret i32 %14
}

LLVM IR (-O2):
define i32 @test_12(i32 %0, i32 %1) {
%3 = xor i32 %1, %0
%4 = icmp slt i32 %3, 0
%5 = select i1 %4, i32 -40, i32 -20
ret i32 %5
}
/* Type definitions */
typedef int uint8_t;

/* Variables and functions */
scalar_t__ ERR;
scalar_t__ clrtobot();
uint8_t ccbi_clrtobot() { return ((clrtobot()) == ERR ? 0 : 1); }


x86 assembly (clang, -O0):
<ccbi_clrtobot>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1030 <clrtobot@plt>
mov    %rax,%rdx
mov    0x2ec3(%rip),%rax
mov    (%rax),%rsi
mov    $0x1,%eax
xor    %ecx,%ecx
cmp    %rsi,%rdx
cmove  %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<ccbi_clrtobot>:
push   %rax
xor    %eax,%eax
call   1030 <clrtobot@plt>
mov    0x2ec9(%rip),%rdx
xor    %ecx,%ecx
cmp    (%rdx),%rax
setne  %cl
mov    %ecx,%eax
pop    %rcx
ret

LLVM IR (-O0):
@ERR = global i64 0
define i32 @ccbi_clrtobot() {
%1 = call i64 (...) @clrtobot()
%2 = load i64, i64* @ERR
%3 = icmp eq i64 %1, %2
%4 = zext i1 %3 to i64
%5 = select i1 %3, i32 0, i32 1
ret i32 %5
}

LLVM IR (-O2):
@ERR = global i64 0
define i32 @ccbi_clrtobot() {
%1 = tail call i64 (...) @clrtobot()
%2 = load i64, i64* @ERR
%3 = icmp ne i64 %1, %2
%4 = zext i1 %3 to i32
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char *);
int /*<<< orphan*/ stderr;
void usage(char *prog) {
  fprintf(stderr, "Usage: %s start [reps [stride]].\n", prog);
  exit(1);
}


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

x86 assembly (clang, -O2):
<usage>:
push   %rax
mov    %rdi,%rdx
mov    0x2eb5(%rip),%rax
mov    (%rax),%edi
lea    0xecc(%rip),%rsi
call   1030 <fprintf@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [34 x i8] c"Usage: %s start [reps [stride]].\0A\00"
define void @usage(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i32, i32* @stderr
%4 = load i8*, i8** %2
%5 = call i32 @fprintf(i32 %3, i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str, i64 0, i64 0), i8* %4)
%6 = call i32 @exit(i32 1)
unreachable
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [34 x i8] c"Usage: %s start [reps [stride]].\0A\00"
define void @usage(i8* %0) {
%2 = load i32, i32* @stderr
%3 = tail call i32 @fprintf(i32 %2, i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str, i64 0, i64 0), i8* %0)
%4 = tail call i32 @exit(i32 1)
unreachable
}
void main() {
  int a = 2, b = 3;
  printf("%d\n", ({
           typeof(a) _a = a;
           typeof(b) _b = b;
           (void *)(&_a == &_b);
           _a > _b ? _a : _b;
         }));
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x2,-0x4(%rbp)
movl   $0x3,-0x8(%rbp)
mov    -0x4(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%eax
mov    %eax,-0x10(%rbp)
mov    -0xc(%rbp),%eax
cmp    -0x10(%rbp),%eax
jle    1149 <main+0x39>
mov    -0xc(%rbp),%eax
mov    %eax,-0x18(%rbp)
jmp    114f <main+0x3f>
mov    -0x10(%rbp),%eax
mov    %eax,-0x18(%rbp)
mov    -0x18(%rbp),%eax
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%esi
lea    0xea1(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
add    $0x20,%rsp
pop    %rbp
ret

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

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

LLVM IR (-O2):
@.str = [4 x i8] c"%d\0A\00"
define void @main() {
%1 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 3)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ print(char *, int);
int /*<<< orphan*/ print_set(int);
void efail() {
  print_set(66);
  print("[", 7);
  print("EPIC FAIL", 12);
  print("]\r\n", 7);
}


x86 assembly (clang, -O0):
<efail>:
push   %rbp
mov    %rsp,%rbp
mov    $0x42,%edi
call   1030 <print_set@plt>
lea    0xecb(%rip),%rdi
mov    $0x7,%esi
call   1040 <print@plt>
lea    0xebc(%rip),%rdi
mov    $0xc,%esi
call   1040 <print@plt>
lea    0xeb5(%rip),%rdi
mov    $0x7,%esi
call   1040 <print@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<efail>:
push   %rax
mov    $0x42,%edi
call   1030 <print_set@plt>
lea    0xece(%rip),%rdi
mov    $0x7,%esi
call   1040 <print@plt>
lea    0xebf(%rip),%rdi
mov    $0xc,%esi
call   1040 <print@plt>
lea    0xeb8(%rip),%rdi
mov    $0x7,%esi
pop    %rax
jmp    1040 <print@plt>

LLVM IR (-O0):
@.str = [2 x i8] c"[\00"
@.str.1 = [10 x i8] c"EPIC FAIL\00"
@.str.2 = [4 x i8] c"]\0D\0A\00"
define void @efail() {
%1 = call i32 @print_set(i32 66)
%2 = call i32 @print(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0), i32 7)
%3 = call i32 @print(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.1, i64 0, i64 0), i32 12)
%4 = call i32 @print(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0), i32 7)
ret void
}

LLVM IR (-O2):
@.str = [2 x i8] c"[\00"
@.str.1 = [10 x i8] c"EPIC FAIL\00"
@.str.2 = [4 x i8] c"]\0D\0A\00"
define void @efail() {
%1 = tail call i32 @print_set(i32 66)
%2 = tail call i32 @print(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0), i32 7)
%3 = tail call i32 @print(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.1, i64 0, i64 0), i32 12)
%4 = tail call i32 @print(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0), i32 7)
ret void
}
/* Variables and functions */
int rand();
double frand(void) { return (rand() / 32768.); }


x86 assembly (clang, -O0):
<frand>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1030 <rand@plt>
cvtsi2sd %eax,%xmm0
movsd  0xed9(%rip),%xmm1
divsd  %xmm1,%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<frand>:
push   %rax
xor    %eax,%eax
call   1030 <rand@plt>
cvtsi2sd %eax,%xmm0
mulsd  0xedc(%rip),%xmm0
pop    %rax
ret

LLVM IR (-O0):
define double @frand() {
%1 = call i32 (...) @rand()
%2 = sitofp i32 %1 to double
%3 = fdiv double %2, 3.276800e+04
ret double %3
}

LLVM IR (-O2):
define double @frand() {
%1 = tail call i32 (...) @rand()
%2 = sitofp i32 %1 to double
%3 = fmul double %2, 0x3F00000000000000
ret double %3
}
/* Variables and functions */
int /*<<< orphan*/ uart_puts(char *);
void mk_fault(void) {
  long *p;
  long test;
  uart_puts("one\n");
  p = (long *)0x1;
  test = *p;
}


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

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

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

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


x86 assembly (clang, -O0):
<down>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edx
lea    0xedb(%rip),%rdi
mov    $0x1b,%esi
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<down>:
mov    %edi,%edx
lea    0xee7(%rip),%rdi
mov    $0x1b,%esi
jmp    1030 <printf@plt>

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

LLVM IR (-O2):
@.str = [7 x i8] c"%c[%dB\00"
define void @down(i32 %0) {
%2 = tail call i32 @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i32 27, i32 %0)
ret void
}
signed long long dynref__iter__(const struct dynref__obj *p,
                                const struct dynref__iter *i) {}


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

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

LLVM IR (-O0):
%struct.dynref__obj = type opaque
%struct.dynref__iter = type opaque
define i64 @dynref__iter__(%struct.dynref__obj* %0, %struct.dynref__iter* %1) {
%3 = alloca i64
%4 = alloca %struct.dynref__obj*
%5 = alloca %struct.dynref__iter*
store %struct.dynref__obj* %0, %struct.dynref__obj** %4
store %struct.dynref__iter* %1, %struct.dynref__iter** %5
%6 = load i64, i64* %3
ret i64 %6
}

LLVM IR (-O2):
%struct.dynref__obj = type opaque
%struct.dynref__iter = type opaque
define i64 @dynref__iter__(%struct.dynref__obj* nocapture readnone %0, %struct.dynref__iter* nocapture readnone %1) {
ret i64 undef
}
void __deregister_frame_info_bases(void) {}


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

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

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

LLVM IR (-O2):
define void @__deregister_frame_info_bases() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ UARTCharPut(unsigned long, unsigned char);
void UARTBufferWrite(unsigned long ulBase, unsigned char *ucBuffer,
                     unsigned long ulLength) {
  unsigned long ulCount;
  ;
  for (ulCount = 0; ulCount < ulLength; ulCount++) {
    UARTCharPut(ulBase, ucBuffer[ulCount]);
  }
}


x86 assembly (clang, -O0):
<UARTBufferWrite>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
movq   $0x0,-0x20(%rbp)
mov    -0x20(%rbp),%rax
cmp    -0x18(%rbp),%rax
jae    1160 <UARTBufferWrite+0x50>
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rax
mov    -0x20(%rbp),%rcx
movzbl (%rax,%rcx,1),%esi
call   1030 <UARTCharPut@plt>
mov    -0x20(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x20(%rbp)
jmp    112c <UARTBufferWrite+0x1c>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<UARTBufferWrite>:
push   %r15
push   %r14
push   %r12
push   %rbx
push   %rax
test   %rdx,%rdx
je     1146 <UARTBufferWrite+0x36>
mov    %rdx,%r12
mov    %rsi,%r14
mov    %rdi,%r15
xor    %ebx,%ebx
nopl   0x0(%rax,%rax,1)
movzbl (%r14,%rbx,1),%esi
mov    %r15,%rdi
call   1030 <UARTCharPut@plt>
add    $0x1,%rbx
cmp    %rbx,%r12
jne    1130 <UARTBufferWrite+0x20>
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
ret

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

LLVM IR (-O2):
define void @UARTBufferWrite(i64 %0, i8* nocapture %1, i64 %2) {
%4 = icmp eq i64 %2, 0
br i1 %4, label %12, label %5
5: ; preds = %3, %5
%6 = phi i64 [ %10, %5 ], [ 0, %3 ]
%7 = getelementptr inbounds i8, i8* %1, i64 %6
%8 = load i8, i8* %7
%9 = tail call i32 @UARTCharPut(i64 %0, i8 zeroext %8)
%10 = add nuw i64 %6, 1
%11 = icmp eq i64 %10, %2
br i1 %11, label %12, label %5
12: ; preds = %5, %3
ret void
}
/* Variables and functions */
int /*<<< orphan*/ enviarCadenaSerial(char *);
void enviarMensaje_a_Serial(char *texto) { enviarCadenaSerial(texto); }


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

x86 assembly (clang, -O2):
<enviarMensaje_a_Serial>:
jmp    1030 <enviarCadenaSerial@plt>

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

LLVM IR (-O2):
define void @enviarMensaje_a_Serial(i8* %0) {
%2 = tail call i32 @enviarCadenaSerial(i8* %0)
ret void
}
void flush_cache_vmap(unsigned long start, unsigned long end) {}


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

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

LLVM IR (-O0):
define void @flush_cache_vmap(i64 %0, i64 %1) {
%3 = alloca i64
%4 = alloca i64
store i64 %0, i64* %3
store i64 %1, i64* %4
ret void
}

LLVM IR (-O2):
define void @flush_cache_vmap(i64 %0, i64 %1) {
ret void
}
/* Variables and functions */
int inp_emulate(int);
char TOSH_READ_RFM_TXD_PIN() { return 0x01 & (inp_emulate(0x38) >> 3); }


x86 assembly (clang, -O0):
<TOSH_READ_RFM_TXD_PIN>:
push   %rbp
mov    %rsp,%rbp
mov    $0x38,%edi
call   1030 <inp_emulate@plt>
sar    $0x3,%eax
and    $0x1,%eax
movsbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<TOSH_READ_RFM_TXD_PIN>:
push   %rax
mov    $0x38,%edi
call   1030 <inp_emulate@plt>
shr    $0x3,%al
and    $0x1,%al
pop    %rcx
ret

LLVM IR (-O0):
define signext i8 @TOSH_READ_RFM_TXD_PIN() {
%1 = call i32 @inp_emulate(i32 56)
%2 = ashr i32 %1, 3
%3 = and i32 1, %2
%4 = trunc i32 %3 to i8
ret i8 %4
}

LLVM IR (-O2):
define signext i8 @TOSH_READ_RFM_TXD_PIN() {
%1 = tail call i32 @inp_emulate(i32 56)
%2 = trunc i32 %1 to i8
%3 = lshr i8 %2, 3
%4 = and i8 %3, 1
ret i8 %4
}
void RTP_set_extension_len(unsigned char *p, unsigned int v) {
  p[14] = (unsigned char)((unsigned int)(0xff & v >> 8));
  p[15] = (unsigned char)(0xff & v);
}


x86 assembly (clang, -O0):
<RTP_set_extension_len>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0xc(%rbp),%eax
shr    $0x8,%eax
and    $0xff,%eax
mov    %al,%cl
mov    -0x8(%rbp),%rax
mov    %cl,0xe(%rax)
mov    -0xc(%rbp),%eax
and    $0xff,%eax
mov    %al,%cl
mov    -0x8(%rbp),%rax
mov    %cl,0xf(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<RTP_set_extension_len>:
rol    $0x8,%si
mov    %si,0xe(%rdi)
ret

LLVM IR (-O0):
define void @RTP_set_extension_len(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 = lshr i32 %5, 8
%7 = and i32 255, %6
%8 = trunc i32 %7 to i8
%9 = load i8*, i8** %3
%10 = getelementptr inbounds i8, i8* %9, i64 14
store i8 %8, i8* %10
%11 = load i32, i32* %4
%12 = and i32 255, %11
%13 = trunc i32 %12 to i8
%14 = load i8*, i8** %3
%15 = getelementptr inbounds i8, i8* %14, i64 15
store i8 %13, i8* %15
ret void
}

LLVM IR (-O2):
define void @RTP_set_extension_len(i8* nocapture writeonly %0, i32 %1) {
%3 = lshr i32 %1, 8
%4 = trunc i32 %3 to i8
%5 = getelementptr inbounds i8, i8* %0, i64 14
store i8 %4, i8* %5
%6 = trunc i32 %1 to i8
%7 = getelementptr inbounds i8, i8* %0, i64 15
store i8 %6, i8* %7
ret void
}
unsigned xrop3_202_0_0(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 = S ^ D;
  stk2 = T & stk3;
  stk1 = D ^ stk2;
  return stk1;
}


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

x86 assembly (clang, -O2):
<xrop3_202_0_0>:
mov    %edi,%eax
shl    $0x8,%eax
or     %edi,%eax
mov    %esi,%ecx
shl    $0x8,%ecx
or     %esi,%ecx
xor    $0xff,%eax
and    %ecx,%eax
xor    $0xff,%eax
ret

LLVM IR (-O0):
define i32 @xrop3_202_0_0(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* %6
%24 = load i32, i32* %5
%25 = xor i32 %23, %24
store i32 %25, i32* %10
%26 = load i32, i32* %7
%27 = load i32, i32* %10
%28 = and i32 %26, %27
store i32 %28, i32* %9
%29 = load i32, i32* %5
%30 = load i32, i32* %9
%31 = xor i32 %29, %30
store i32 %31, i32* %8
%32 = load i32, i32* %8
ret i32 %32
}

LLVM IR (-O2):
define i32 @xrop3_202_0_0(i8 zeroext %0, i8 zeroext %1) {
%3 = zext i8 %0 to i32
%4 = mul nuw nsw i32 %3, 257
%5 = zext i8 %1 to i32
%6 = mul nuw nsw i32 %5, 257
%7 = xor i32 %4, 255
%8 = and i32 %6, %7
%9 = xor i32 %8, 255
ret i32 %9
}
/* Type definitions */
typedef int uint64_t;

/* Variables and functions */
int /*<<< orphan*/ copy_32bit(char *);
int swap_32bit(int /*<<< orphan*/);
uint64_t ntoh_64bit(char *ptr) {
  uint64_t r = (uint64_t)swap_32bit(copy_32bit(ptr)) << 32;
  return (r | swap_32bit(copy_32bit(ptr + 4)));
}


x86 assembly (clang, -O0):
<ntoh_64bit>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <copy_32bit@plt>
mov    %eax,%edi
call   1040 <swap_32bit@plt>
mov    $0x20,%ecx
shl    %cl,%eax
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
mov    %eax,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
add    $0x4,%rdi
call   1030 <copy_32bit@plt>
mov    %eax,%edi
call   1040 <swap_32bit@plt>
mov    %eax,%ecx
mov    -0x10(%rbp),%eax
or     %ecx,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ntoh_64bit>:
push   %rbx
mov    %rdi,%rbx
call   1030 <copy_32bit@plt>
mov    %eax,%edi
call   1040 <swap_32bit@plt>
add    $0x4,%rbx
mov    %rbx,%rdi
call   1030 <copy_32bit@plt>
mov    %eax,%edi
pop    %rbx
jmp    1040 <swap_32bit@plt>

LLVM IR (-O0):
define i32 @ntoh_64bit(i8* %0) {
%2 = alloca i8*
%3 = alloca i32
store i8* %0, i8** %2
%4 = load i8*, i8** %2
%5 = call i32 @copy_32bit(i8* %4)
%6 = call i32 @swap_32bit(i32 %5)
%7 = shl i32 %6, 32
store i32 %7, i32* %3
%8 = load i32, i32* %3
%9 = load i8*, i8** %2
%10 = getelementptr inbounds i8, i8* %9, i64 4
%11 = call i32 @copy_32bit(i8* %10)
%12 = call i32 @swap_32bit(i32 %11)
%13 = or i32 %8, %12
ret i32 %13
}

LLVM IR (-O2):
define i32 @ntoh_64bit(i8* %0) {
%2 = tail call i32 @copy_32bit(i8* %0)
%3 = tail call i32 @swap_32bit(i32 %2)
%4 = getelementptr inbounds i8, i8* %0, i64 4
%5 = tail call i32 @copy_32bit(i8* %4)
%6 = tail call i32 @swap_32bit(i32 %5)
ret i32 poison
}
/* Type definitions */
struct Request {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ request_enqueue_header(struct Request *, char const *,
                                          int /*<<< orphan*/);
int /*<<< orphan*/ strlen(char const *);
void request_enqueue_header_str(struct Request *req, const char *s) {
  request_enqueue_header(req, s, strlen(s));
}


x86 assembly (clang, -O0):
<request_enqueue_header_str>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x20(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x10(%rbp),%rdi
call   1030 <strlen@plt>
mov    -0x20(%rbp),%rdi
mov    -0x18(%rbp),%rsi
mov    %eax,%edx
call   1040 <request_enqueue_header@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<request_enqueue_header_str>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%rbx
mov    %rdi,%r14
mov    %rsi,%rdi
call   1030 <strlen@plt>
mov    %r14,%rdi
mov    %rbx,%rsi
mov    %eax,%edx
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1040 <request_enqueue_header@plt>

LLVM IR (-O0):
%struct.Request = type { i32 }
define void @request_enqueue_header_str(%struct.Request* %0, i8* %1) {
%3 = alloca %struct.Request*
%4 = alloca i8*
store %struct.Request* %0, %struct.Request** %3
store i8* %1, i8** %4
%5 = load %struct.Request*, %struct.Request** %3
%6 = load i8*, i8** %4
%7 = load i8*, i8** %4
%8 = call i32 @strlen(i8* %7)
%9 = call i32 @request_enqueue_header(%struct.Request* %5, i8* %6, i32 %8)
ret void
}

LLVM IR (-O2):
%struct.Request = type { i32 }
define void @request_enqueue_header_str(%struct.Request* %0, i8* %1) {
%3 = tail call i32 @strlen(i8* %1)
%4 = tail call i32 @request_enqueue_header(%struct.Request* %0, i8* %1, i32 %3)
ret void
}
/* Variables and functions */
scalar_t__ strtol(char const *, char **, int);
int atoi(const char *p) { return ((int)strtol(p, (char **)NULL, 10)); }


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

x86 assembly (clang, -O2):
<atoi>:
xor    %esi,%esi
mov    $0xa,%edx
jmp    1030 <strtol@plt>

LLVM IR (-O0):
define i32 @atoi(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i64 @strtol(i8* %3, i8** null, i32 10)
%5 = trunc i64 %4 to i32
ret i32 %5
}

LLVM IR (-O2):
define i32 @atoi(i8* nocapture %0) {
%2 = tail call i64 @strtol(i8* nocapture %0, i8** null, i32 10)
%3 = trunc i64 %2 to i32
ret i32 %3
}
/* Variables and functions */
scalar_t__ strcmp(void *, void *);
int globus_hashtable_string_keyeq(void *string1, void *string2) {
  if (string1 == string2 ||
      (string1 && string2 && strcmp(string1, string2) == 0)) {
    return 1;
  }
  return 0;
}


x86 assembly (clang, -O0):
<globus_hashtable_string_keyeq>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    -0x10(%rbp),%rax
cmp    -0x18(%rbp),%rax
je     115b <globus_hashtable_string_keyeq+0x4b>
cmpq   $0x0,-0x10(%rbp)
je     1167 <globus_hashtable_string_keyeq+0x57>
cmpq   $0x0,-0x18(%rbp)
je     1167 <globus_hashtable_string_keyeq+0x57>
mov    -0x10(%rbp),%rdi
mov    -0x18(%rbp),%rsi
call   1030 <strcmp@plt>
cmp    $0x0,%rax
jne    1167 <globus_hashtable_string_keyeq+0x57>
movl   $0x1,-0x4(%rbp)
jmp    116e <globus_hashtable_string_keyeq+0x5e>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<globus_hashtable_string_keyeq>:
push   %rbx
mov    $0x1,%ebx
cmp    %rsi,%rdi
je     1131 <globus_hashtable_string_keyeq+0x21>
test   %rdi,%rdi
je     112f <globus_hashtable_string_keyeq+0x1f>
test   %rsi,%rsi
je     112f <globus_hashtable_string_keyeq+0x1f>
call   1030 <strcmp@plt>
test   %rax,%rax
je     1131 <globus_hashtable_string_keyeq+0x21>
xor    %ebx,%ebx
mov    %ebx,%eax
pop    %rbx
ret

LLVM IR (-O0):
define i32 @globus_hashtable_string_keyeq(i8* %0, i8* %1) {
%3 = alloca i32
%4 = alloca i8*
%5 = alloca i8*
store i8* %0, i8** %4
store i8* %1, i8** %5
%6 = load i8*, i8** %4
%7 = load i8*, i8** %5
%8 = icmp eq i8* %6, %7
br i1 %8, label %20, label %9
9: ; preds = %2
%10 = load i8*, i8** %4
%11 = icmp ne i8* %10, null
br i1 %11, label %12, label %21
12: ; preds = %9
%13 = load i8*, i8** %5
%14 = icmp ne i8* %13, null
br i1 %14, label %15, label %21
15: ; preds = %12
%16 = load i8*, i8** %4
%17 = load i8*, i8** %5
%18 = call i64 @strcmp(i8* %16, i8* %17)
%19 = icmp eq i64 %18, 0
br i1 %19, label %20, label %21
20: ; preds = %15, %2
store i32 1, i32* %3
br label %22
21: ; preds = %15, %12, %9
store i32 0, i32* %3
br label %22
22: ; preds = %21, %20
%23 = load i32, i32* %3
ret i32 %23
}

LLVM IR (-O2):
define i32 @globus_hashtable_string_keyeq(i8* %0, i8* %1) {
%3 = icmp eq i8* %0, %1
br i1 %3, label %12, label %4
4: ; preds = %2
%5 = icmp ne i8* %0, null
%6 = icmp ne i8* %1, null
%7 = and i1 %5, %6
br i1 %7, label %8, label %11
8: ; preds = %4
%9 = tail call i64 @strcmp(i8* %0, i8* %1)
%10 = icmp eq i64 %9, 0
br i1 %10, label %12, label %11
11: ; preds = %8, %4
br label %12
12: ; preds = %2, %8, %11
%13 = phi i32 [ 0, %11 ], [ 1, %8 ], [ 1, %2 ]
ret i32 %13
}
int find_bit(int a, int b) {
  if ((b >> a & 1) == 1)
    return 1;
  else
    return 0;
}


x86 assembly (clang, -O0):
<find_bit>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0xc(%rbp),%eax
mov    -0x8(%rbp),%ecx
sar    %cl,%eax
and    $0x1,%eax
cmp    $0x1,%eax
jne    112a <find_bit+0x2a>
movl   $0x1,-0x4(%rbp)
jmp    1131 <find_bit+0x31>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @find_bit(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 = load i32, i32* %4
%8 = ashr i32 %6, %7
%9 = and i32 %8, 1
%10 = icmp eq i32 %9, 1
br i1 %10, label %11, label %12
11: ; preds = %2
store i32 1, i32* %3
br label %13
12: ; preds = %2
store i32 0, i32* %3
br label %13
13: ; preds = %12, %11
%14 = load i32, i32* %3
ret i32 %14
}

LLVM IR (-O2):
define i32 @find_bit(i32 %0, i32 %1) {
%3 = lshr i32 %1, %0
%4 = and i32 %3, 1
ret i32 %4
}
/* Type definitions */
typedef int /*<<< orphan*/ int64_t;

/* Variables and functions */
int /*<<< orphan*/ feof(int /*<<< orphan*/);
int /*<<< orphan*/ stdin;
int64_t _prim_ffi_file_eof(int64_t p1) { return feof(stdin); }


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

x86 assembly (clang, -O2):
<_prim_ffi_file_eof>:
mov    0x2ed1(%rip),%rax
mov    (%rax),%edi
jmp    1030 <feof@plt>

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

LLVM IR (-O2):
@stdin = global i32 0
define i32 @_prim_ffi_file_eof(i32 %0) {
%2 = load i32, i32* @stdin
%3 = tail call i32 @feof(i32 %2)
ret i32 %3
}
void null_show_title(void *ui, const char *title) {}


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

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

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

LLVM IR (-O2):
define void @null_show_title(i8* nocapture %0, i8* nocapture %1) {
ret void
}
int CreateGui(void) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @CreateGui() {
ret i32 0
}
/* Variables and functions */
__attribute__((weak)) void matrix_init_user(void) {}


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

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

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

LLVM IR (-O2):
define weak void @matrix_init_user() {
ret void
}
int Crt_GetRoundUp(float f) {
  int n = (int)f;
  if (f - n > 0.0)
    n++;
  return n;
}


x86 assembly (clang, -O0):
<Crt_GetRoundUp>:
push   %rbp
mov    %rsp,%rbp
movss  %xmm0,-0x4(%rbp)
cvttss2si -0x4(%rbp),%eax
mov    %eax,-0x8(%rbp)
movss  -0x4(%rbp),%xmm0
cvtsi2ssl -0x8(%rbp),%xmm1
subss  %xmm1,%xmm0
cvtss2sd %xmm0,%xmm0
xorps  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jbe    1139 <Crt_GetRoundUp+0x39>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<Crt_GetRoundUp>:
cvttss2si %xmm0,%ecx
cvttps2dq %xmm0,%xmm1
cvtdq2ps %xmm1,%xmm1
subss  %xmm1,%xmm0
xorps  %xmm1,%xmm1
xor    %eax,%eax
ucomiss %xmm1,%xmm0
seta   %al
add    %ecx,%eax
ret

LLVM IR (-O0):
define i32 @Crt_GetRoundUp(float %0) {
%2 = alloca float
%3 = alloca i32
store float %0, float* %2
%4 = load float, float* %2
%5 = fptosi float %4 to i32
store i32 %5, i32* %3
%6 = load float, float* %2
%7 = load i32, i32* %3
%8 = sitofp i32 %7 to float
%9 = fsub float %6, %8
%10 = fpext float %9 to double
%11 = fcmp ogt double %10, 0.000000e+00
br i1 %11, label %12, label %15
12: ; preds = %1
%13 = load i32, i32* %3
%14 = add nsw i32 %13, 1
store i32 %14, i32* %3
br label %15
15: ; preds = %12, %1
%16 = load i32, i32* %3
ret i32 %16
}

LLVM IR (-O2):
define i32 @Crt_GetRoundUp(float %0) {
%2 = fptosi float %0 to i32
%3 = sitofp i32 %2 to float
%4 = fsub float %0, %3
%5 = fcmp ogt float %4, 0.000000e+00
%6 = zext i1 %5 to i32
%7 = add nsw i32 %6, %2
ret i32 %7
}
/* Variables and functions */
int /*<<< orphan*/ fputs(char *, int /*<<< orphan*/);
int /*<<< orphan*/ printf(char *, int, int);
int /*<<< orphan*/ stdout;
int multiply_operator(int x, int y) {
  fputs("> multiply_operator got: ", stdout);
  printf("%d, %d\n", x, y);
  return x * y;
}


x86 assembly (clang, -O0):
<multiply_operator>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    0x2eab(%rip),%rax
mov    (%rax),%esi
lea    0xec2(%rip),%rdi
call   1040 <fputs@plt>
mov    -0x4(%rbp),%esi
mov    -0x8(%rbp),%edx
lea    0xeca(%rip),%rdi
call   1030 <printf@plt>
mov    -0x4(%rbp),%eax
imul   -0x8(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<multiply_operator>:
push   %rbp
push   %rbx
push   %rax
mov    %esi,%ebx
mov    %edi,%ebp
mov    0x2eb2(%rip),%rax
mov    (%rax),%esi
lea    0xec9(%rip),%rdi
call   1040 <fputs@plt>
lea    0xed7(%rip),%rdi
mov    %ebp,%esi
mov    %ebx,%edx
call   1030 <printf@plt>
imul   %ebp,%ebx
mov    %ebx,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

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

LLVM IR (-O2):
@.str = [26 x i8] c"> multiply_operator got: \00"
@stdout = global i32 0
@.str.1 = [8 x i8] c"%d, %d\0A\00"
define i32 @multiply_operator(i32 %0, i32 %1) {
%3 = load i32, i32* @stdout
%4 = tail call i32 @fputs(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str, i64 0, i64 0), i32 %3)
%5 = tail call i32 @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.1, i64 0, i64 0), i32 %0, i32 %1)
%6 = mul nsw i32 %1, %0
ret i32 %6
}
void gdb2029_marker(void) {}


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

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

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

LLVM IR (-O2):
define void @gdb2029_marker() {
ret void
}
int *elementRevertPos(int *elements, int pos_1, int pos_2) {
  int aux = elements[pos_1];
  elements[pos_1] = elements[pos_2];
  elements[pos_2] = aux;
  return elements;
}


x86 assembly (clang, -O0):
<elementRevertPos>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
mov    (%rax,%rcx,4),%eax
mov    %eax,-0x14(%rbp)
mov    -0x8(%rbp),%rax
movslq -0x10(%rbp),%rcx
mov    (%rax,%rcx,4),%edx
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
mov    %edx,(%rax,%rcx,4)
mov    -0x14(%rbp),%edx
mov    -0x8(%rbp),%rax
movslq -0x10(%rbp),%rcx
mov    %edx,(%rax,%rcx,4)
mov    -0x8(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<elementRevertPos>:
mov    %rdi,%rax
movslq %esi,%rcx
mov    (%rdi,%rcx,4),%esi
movslq %edx,%rdx
mov    (%rdi,%rdx,4),%edi
mov    %edi,(%rax,%rcx,4)
mov    %esi,(%rax,%rdx,4)
ret

LLVM IR (-O0):
define i32* @elementRevertPos(i32* %0, i32 %1, i32 %2) {
%4 = alloca i32*
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
store i32* %0, i32** %4
store i32 %1, i32* %5
store i32 %2, i32* %6
%8 = load i32*, i32** %4
%9 = load i32, i32* %5
%10 = sext i32 %9 to i64
%11 = getelementptr inbounds i32, i32* %8, i64 %10
%12 = load i32, i32* %11
store i32 %12, i32* %7
%13 = load i32*, i32** %4
%14 = load i32, i32* %6
%15 = sext i32 %14 to i64
%16 = getelementptr inbounds i32, i32* %13, i64 %15
%17 = load i32, i32* %16
%18 = load i32*, i32** %4
%19 = load i32, i32* %5
%20 = sext i32 %19 to i64
%21 = getelementptr inbounds i32, i32* %18, i64 %20
store i32 %17, i32* %21
%22 = load i32, i32* %7
%23 = load i32*, i32** %4
%24 = load i32, i32* %6
%25 = sext i32 %24 to i64
%26 = getelementptr inbounds i32, i32* %23, i64 %25
store i32 %22, i32* %26
%27 = load i32*, i32** %4
ret i32* %27
}

LLVM IR (-O2):
define i32* @elementRevertPos(i32* returned %0, i32 %1, i32 %2) {
%4 = sext i32 %1 to i64
%5 = getelementptr inbounds i32, i32* %0, i64 %4
%6 = load i32, i32* %5
%7 = sext i32 %2 to i64
%8 = getelementptr inbounds i32, i32* %0, i64 %7
%9 = load i32, i32* %8
store i32 %9, i32* %5
store i32 %6, i32* %8
ret i32* %0
}
int q_empty(int top, int bottom) {
  if (top == bottom)
    return 1;
  else
    return 0;
}


x86 assembly (clang, -O0):
<q_empty>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%eax
cmp    -0xc(%rbp),%eax
jne    1122 <q_empty+0x22>
movl   $0x1,-0x4(%rbp)
jmp    1129 <q_empty+0x29>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<q_empty>:
xor    %eax,%eax
cmp    %esi,%edi
sete   %al
ret

LLVM IR (-O0):
define i32 @q_empty(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* %5
%8 = icmp eq i32 %6, %7
br i1 %8, label %9, label %10
9: ; preds = %2
store i32 1, i32* %3
br label %11
10: ; preds = %2
store i32 0, i32* %3
br label %11
11: ; preds = %10, %9
%12 = load i32, i32* %3
ret i32 %12
}

LLVM IR (-O2):
define i32 @q_empty(i32 %0, i32 %1) {
%3 = icmp eq i32 %0, %1
%4 = zext i1 %3 to i32
ret i32 %4
}
void balance_control(float forward, float turn, float gyro, float gyro_offset,
                     float theta_l, float theta_r, float battery,
                     signed char *pwm_l, signed char *pwm_r) {
  *pwm_l = *pwm_r = 0;
}


x86 assembly (clang, -O0):
<balance_control>:
push   %rbp
mov    %rsp,%rbp
movss  %xmm0,-0x4(%rbp)
movss  %xmm1,-0x8(%rbp)
movss  %xmm2,-0xc(%rbp)
movss  %xmm3,-0x10(%rbp)
movss  %xmm4,-0x14(%rbp)
movss  %xmm5,-0x18(%rbp)
movss  %xmm6,-0x1c(%rbp)
mov    %rdi,-0x28(%rbp)
mov    %rsi,-0x30(%rbp)
mov    -0x30(%rbp),%rax
movb   $0x0,(%rax)
mov    -0x28(%rbp),%rax
movb   $0x0,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<balance_control>:
movb   $0x0,(%rsi)
movb   $0x0,(%rdi)
ret

LLVM IR (-O0):
define void @balance_control(float %0, float %1, float %2, float %3, float %4, float %5, float %6, i8* %7, i8* %8) {
%10 = alloca float
%11 = alloca float
%12 = alloca float
%13 = alloca float
%14 = alloca float
%15 = alloca float
%16 = alloca float
%17 = alloca i8*
%18 = alloca i8*
store float %0, float* %10
store float %1, float* %11
store float %2, float* %12
store float %3, float* %13
store float %4, float* %14
store float %5, float* %15
store float %6, float* %16
store i8* %7, i8** %17
store i8* %8, i8** %18
%19 = load i8*, i8** %18
store i8 0, i8* %19
%20 = load i8*, i8** %17
store i8 0, i8* %20
ret void
}

LLVM IR (-O2):
define void @balance_control(float %0, float %1, float %2, float %3, float %4, float %5, float %6, i8* nocapture writeonly %7, i8* nocapture writeonly %8) {
store i8 0, i8* %8
store i8 0, i8* %7
ret void
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int /*<<< orphan*/, char *, int, char *);
int /*<<< orphan*/ isalnum(int);
void t_isalnum_0x31() {
  Assert_real((isalnum(49)),
              "/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_isalnum.c",
              250, ("isalnum should be 1 for 1"));
}


x86 assembly (clang, -O0):
<t_isalnum_0x31>:
push   %rbp
mov    %rsp,%rbp
mov    $0x31,%edi
call   1030 <isalnum@plt>
mov    %eax,%edi
lea    0xec9(%rip),%rsi
mov    $0xfa,%edx
lea    0xf65(%rip),%rcx
call   1040 <Assert_real@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<t_isalnum_0x31>:
push   %rax
mov    $0x31,%edi
call   1030 <isalnum@plt>
lea    0xece(%rip),%rsi
lea    0xf6f(%rip),%rcx
mov    %eax,%edi
mov    $0xfa,%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_isalnum.c\00"
@.str.1 = [26 x i8] c"isalnum should be 1 for 1\00"
define void @t_isalnum_0x31() {
%1 = call i32 @isalnum(i32 49)
%2 = call i32 @Assert_real(i32 %1, i8* getelementptr inbounds ([168 x i8], [168 x i8]* @.str, i64 0, i64 0), i32 250, i8* getelementptr inbounds ([26 x i8], [26 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_isalnum.c\00"
@.str.1 = [26 x i8] c"isalnum should be 1 for 1\00"
define void @t_isalnum_0x31() {
%1 = tail call i32 @isalnum(i32 49)
%2 = tail call i32 @Assert_real(i32 %1, i8* getelementptr inbounds ([168 x i8], [168 x i8]* @.str, i64 0, i64 0), i32 250, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Variables and functions */
char *emalloc(scalar_t__);
int /*<<< orphan*/ strcpy(char *, char *);
scalar_t__ strlen(char *);
char *strsave(char *string) {
  char *p = emalloc(strlen(string) + 1);
  strcpy(p, string);
  return p;
}


x86 assembly (clang, -O0):
<strsave>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <strlen@plt>
mov    %rax,%rdi
add    $0x1,%rdi
call   1050 <emalloc@plt>
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x8(%rbp),%rsi
call   1030 <strcpy@plt>
mov    -0x10(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<strsave>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%r14
call   1040 <strlen@plt>
lea    0x1(%rax),%rdi
call   1050 <emalloc@plt>
mov    %rax,%rbx
mov    %rax,%rdi
mov    %r14,%rsi
call   1030 <strcpy@plt>
mov    %rbx,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define i8* @strsave(i8* %0) {
%2 = alloca i8*
%3 = alloca i8*
store i8* %0, i8** %2
%4 = load i8*, i8** %2
%5 = call i64 @strlen(i8* %4)
%6 = add nsw i64 %5, 1
%7 = call i8* @emalloc(i64 %6)
store i8* %7, i8** %3
%8 = load i8*, i8** %3
%9 = load i8*, i8** %2
%10 = call i32 @strcpy(i8* %8, i8* %9)
%11 = load i8*, i8** %3
ret i8* %11
}

LLVM IR (-O2):
define i8* @strsave(i8* %0) {
%2 = tail call i64 @strlen(i8* dereferenceable(1) %0)
%3 = add nsw i64 %2, 1
%4 = tail call i8* @emalloc(i64 %3)
%5 = tail call i32 @strcpy(i8* %4, i8* %0)
ret i8* %4
}
/* Variables and functions */
char *puthex_digit(char *, unsigned char);
char *puthex_tetra(char *b, unsigned char byte) {
  b = puthex_digit(b, byte >> 4);
  b = puthex_digit(b, byte & 0x0F);
  return b;
}


x86 assembly (clang, -O0):
<puthex_tetra>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %sil,%al
mov    %rdi,-0x8(%rbp)
mov    %al,-0x9(%rbp)
mov    -0x8(%rbp),%rdi
movzbl -0x9(%rbp),%eax
sar    $0x4,%eax
movzbl %al,%esi
call   1030 <puthex_digit@plt>
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
movzbl -0x9(%rbp),%eax
and    $0xf,%eax
movzbl %al,%esi
call   1030 <puthex_digit@plt>
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<puthex_tetra>:
push   %rbx
mov    %esi,%ebx
mov    %ebx,%eax
shr    $0x4,%al
movzbl %al,%esi
call   1030 <puthex_digit@plt>
and    $0xf,%ebx
mov    %rax,%rdi
mov    %ebx,%esi
pop    %rbx
jmp    1030 <puthex_digit@plt>

LLVM IR (-O0):
define i8* @puthex_tetra(i8* %0, i8 zeroext %1) {
%3 = alloca i8*
%4 = alloca i8
store i8* %0, i8** %3
store i8 %1, i8* %4
%5 = load i8*, i8** %3
%6 = load i8, i8* %4
%7 = zext i8 %6 to i32
%8 = ashr i32 %7, 4
%9 = trunc i32 %8 to i8
%10 = call i8* @puthex_digit(i8* %5, i8 zeroext %9)
store i8* %10, i8** %3
%11 = load i8*, i8** %3
%12 = load i8, i8* %4
%13 = zext i8 %12 to i32
%14 = and i32 %13, 15
%15 = trunc i32 %14 to i8
%16 = call i8* @puthex_digit(i8* %11, i8 zeroext %15)
store i8* %16, i8** %3
%17 = load i8*, i8** %3
ret i8* %17
}

LLVM IR (-O2):
define i8* @puthex_tetra(i8* %0, i8 zeroext %1) {
%3 = lshr i8 %1, 4
%4 = tail call i8* @puthex_digit(i8* %0, i8 zeroext %3)
%5 = and i8 %1, 15
%6 = tail call i8* @puthex_digit(i8* %4, i8 zeroext %5)
ret i8* %6
}
/* Type definitions */
typedef int /*<<< orphan*/ posix_spawnattr_t;
typedef int /*<<< orphan*/ posix_spawn_file_actions_t;
typedef int /*<<< orphan*/ pid_t;

/* Variables and functions */
int __posix_spawnx(int /*<<< orphan*/ *, char const *, int /*<<< orphan*/,
                   int /*<<< orphan*/ const *, int /*<<< orphan*/ const *,
                   char *const *, char *const *);
int /*<<< orphan*/ execv;
int posix_spawn(pid_t *res, const char *path,
                const posix_spawn_file_actions_t *fa,
                const posix_spawnattr_t *attr, char *const argv[],
                char *const envp[]) {
  return __posix_spawnx(res, path, execv, fa, attr, argv, envp);
}


x86 assembly (clang, -O0):
<posix_spawn>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    %r8,-0x28(%rbp)
mov    %r9,-0x30(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    0x2ea9(%rip),%rax
mov    (%rax),%edx
mov    -0x18(%rbp),%rcx
mov    -0x20(%rbp),%r8
mov    -0x28(%rbp),%r9
mov    -0x30(%rbp),%rax
mov    %rax,(%rsp)
call   1030 <__posix_spawnx@plt>
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<posix_spawn>:
push   %rax
mov    %r8,%rax
mov    %rcx,%r8
mov    %rdx,%rcx
mov    0x2ec7(%rip),%rdx
mov    (%rdx),%edx
mov    %r9,(%rsp)
mov    %rax,%r9
call   1030 <__posix_spawnx@plt>
pop    %rcx
ret

LLVM IR (-O0):
@execv = global i32 0
define i32 @posix_spawn(i32* %0, i8* %1, i32* %2, i32* %3, i8** %4, i8** %5) {
%7 = alloca i32*
%8 = alloca i8*
%9 = alloca i32*
%10 = alloca i32*
%11 = alloca i8**
%12 = alloca i8**
store i32* %0, i32** %7
store i8* %1, i8** %8
store i32* %2, i32** %9
store i32* %3, i32** %10
store i8** %4, i8*** %11
store i8** %5, i8*** %12
%13 = load i32*, i32** %7
%14 = load i8*, i8** %8
%15 = load i32, i32* @execv
%16 = load i32*, i32** %9
%17 = load i32*, i32** %10
%18 = load i8**, i8*** %11
%19 = load i8**, i8*** %12
%20 = call i32 @__posix_spawnx(i32* %13, i8* %14, i32 %15, i32* %16, i32* %17, i8** %18, i8** %19)
ret i32 %20
}

LLVM IR (-O2):
@execv = global i32 0
define i32 @posix_spawn(i32* %0, i8* %1, i32* %2, i32* %3, i8** %4, i8** %5) {
%7 = load i32, i32* @execv
%8 = tail call i32 @__posix_spawnx(i32* %0, i8* %1, i32 %7, i32* %2, i32* %3, i8** %4, i8** %5)
ret i32 %8
}
/* Variables and functions */
float random();
float random_float(float min, float max) {
  return min + random() * (max - min);
}


x86 assembly (clang, -O0):
<random_float>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movss  %xmm0,-0x4(%rbp)
movss  %xmm1,-0x8(%rbp)
movss  -0x4(%rbp),%xmm0
movss  %xmm0,-0xc(%rbp)
mov    $0x0,%al
call   1030 <random@plt>
movss  -0xc(%rbp),%xmm1
movss  -0x8(%rbp),%xmm2
subss  -0x4(%rbp),%xmm2
mulss  %xmm2,%xmm0
addss  %xmm1,%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<random_float>:
push   %rax
movss  %xmm1,0x4(%rsp)
movss  %xmm0,(%rsp)
xor    %eax,%eax
call   1030 <random@plt>
movss  (%rsp),%xmm1
movss  0x4(%rsp),%xmm2
subss  %xmm1,%xmm2
mulss  %xmm2,%xmm0
addss  %xmm1,%xmm0
pop    %rax
ret

LLVM IR (-O0):
define float @random_float(float %0, float %1) {
%3 = alloca float
%4 = alloca float
store float %0, float* %3
store float %1, float* %4
%5 = load float, float* %3
%6 = call float (...) @random()
%7 = load float, float* %4
%8 = load float, float* %3
%9 = fsub float %7, %8
%10 = call float @llvm.fmuladd.f32(float %6, float %9, float %5)
ret float %10
}

LLVM IR (-O2):
define float @random_float(float %0, float %1) {
%3 = tail call float (...) @random()
%4 = fsub float %1, %0
%5 = tail call float @llvm.fmuladd.f32(float %3, float %4, float %0)
ret float %5
}