xunge/DecIR huggingface dataset:
void glmSubtractVector3f(float result[3], const float v1[3],
                         const float v2[3]) {
  result[0] = v1[0] - v2[0];
  result[1] = v1[1] - v2[1];
  result[2] = v1[2] - v2[2];
}


x86 assembly (clang, -O0):
<glmSubtractVector3f>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x10(%rbp),%rax
movss  (%rax),%xmm0
mov    -0x18(%rbp),%rax
subss  (%rax),%xmm0
mov    -0x8(%rbp),%rax
movss  %xmm0,(%rax)
mov    -0x10(%rbp),%rax
movss  0x4(%rax),%xmm0
mov    -0x18(%rbp),%rax
subss  0x4(%rax),%xmm0
mov    -0x8(%rbp),%rax
movss  %xmm0,0x4(%rax)
mov    -0x10(%rbp),%rax
movss  0x8(%rax),%xmm0
mov    -0x18(%rbp),%rax
subss  0x8(%rax),%xmm0
mov    -0x8(%rbp),%rax
movss  %xmm0,0x8(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<glmSubtractVector3f>:
movss  (%rsi),%xmm0
subss  (%rdx),%xmm0
movss  %xmm0,(%rdi)
movss  0x4(%rsi),%xmm0
subss  0x4(%rdx),%xmm0
movss  %xmm0,0x4(%rdi)
movss  0x8(%rsi),%xmm0
subss  0x8(%rdx),%xmm0
movss  %xmm0,0x8(%rdi)
ret

LLVM IR (-O0):
define void @glmSubtractVector3f(float* %0, float* %1, float* %2) {
%4 = alloca float*
%5 = alloca float*
%6 = alloca float*
store float* %0, float** %4
store float* %1, float** %5
store float* %2, float** %6
%7 = load float*, float** %5
%8 = getelementptr inbounds float, float* %7, i64 0
%9 = load float, float* %8
%10 = load float*, float** %6
%11 = getelementptr inbounds float, float* %10, i64 0
%12 = load float, float* %11
%13 = fsub float %9, %12
%14 = load float*, float** %4
%15 = getelementptr inbounds float, float* %14, i64 0
store float %13, float* %15
%16 = load float*, float** %5
%17 = getelementptr inbounds float, float* %16, i64 1
%18 = load float, float* %17
%19 = load float*, float** %6
%20 = getelementptr inbounds float, float* %19, i64 1
%21 = load float, float* %20
%22 = fsub float %18, %21
%23 = load float*, float** %4
%24 = getelementptr inbounds float, float* %23, i64 1
store float %22, float* %24
%25 = load float*, float** %5
%26 = getelementptr inbounds float, float* %25, i64 2
%27 = load float, float* %26
%28 = load float*, float** %6
%29 = getelementptr inbounds float, float* %28, i64 2
%30 = load float, float* %29
%31 = fsub float %27, %30
%32 = load float*, float** %4
%33 = getelementptr inbounds float, float* %32, i64 2
store float %31, float* %33
ret void
}

LLVM IR (-O2):
define void @glmSubtractVector3f(float* nocapture writeonly %0, float* nocapture %1, float* nocapture %2) {
%4 = load float, float* %1
%5 = load float, float* %2
%6 = fsub float %4, %5
store float %6, float* %0
%7 = getelementptr inbounds float, float* %1, i64 1
%8 = load float, float* %7
%9 = getelementptr inbounds float, float* %2, i64 1
%10 = load float, float* %9
%11 = fsub float %8, %10
%12 = getelementptr inbounds float, float* %0, i64 1
store float %11, float* %12
%13 = getelementptr inbounds float, float* %1, i64 2
%14 = load float, float* %13
%15 = getelementptr inbounds float, float* %2, i64 2
%16 = load float, float* %15
%17 = fsub float %14, %16
%18 = getelementptr inbounds float, float* %0, i64 2
store float %17, float* %18
ret void
}
/* Type definitions */
typedef int pid_t;

/* Variables and functions */
int /*<<< orphan*/ EXIT_FAILURE;
int /*<<< orphan*/ exec_shell();
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int fork();
int /*<<< orphan*/ perror(char *);
void fork_shell() {
  pid_t rv;
  rv = fork();
  if (rv == -1) {
    perror("fork()");
    exit(EXIT_FAILURE);
  }
  if (rv == 0) {
    exec_shell();
  }
}


x86 assembly (clang, -O0):
<fork_shell>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1060 <fork@plt>
mov    %eax,-0x4(%rbp)
cmpl   $0xffffffff,-0x4(%rbp)
jne    1176 <fork_shell+0x36>
lea    0xe9d(%rip),%rdi
call   1040 <perror@plt>
mov    0x2e71(%rip),%rax
mov    (%rax),%edi
call   1050 <exit@plt>
cmpl   $0x0,-0x4(%rbp)
jne    1187 <fork_shell+0x47>
mov    $0x0,%al
call   1030 <exec_shell@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fork_shell>:
push   %rax
xor    %eax,%eax
call   1060 <fork@plt>
test   %eax,%eax
je     1153 <fork_shell+0x13>
cmp    $0xffffffff,%eax
je     115b <fork_shell+0x1b>
pop    %rax
ret
xor    %eax,%eax
pop    %rcx
jmp    1030 <exec_shell@plt>
lea    0xe9e(%rip),%rdi
call   1040 <perror@plt>
mov    0x2e72(%rip),%rax
mov    (%rax),%edi
call   1050 <exit@plt>

LLVM IR (-O0):
@.str = [7 x i8] c"fork()\00"
@EXIT_FAILURE = global i32 0
define void @fork_shell() {
%1 = alloca i32
%2 = call i32 (...) @fork()
store i32 %2, i32* %1
%3 = load i32, i32* %1
%4 = icmp eq i32 %3, -1
br i1 %4, label %5, label %9
5: ; preds = %0
%6 = call i32 @perror(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0))
%7 = load i32, i32* @EXIT_FAILURE
%8 = call i32 @exit(i32 %7)
unreachable
9: ; preds = %0
%10 = load i32, i32* %1
%11 = icmp eq i32 %10, 0
br i1 %11, label %12, label %14
12: ; preds = %9
%13 = call i32 (...) @exec_shell()
br label %14
14: ; preds = %12, %9
ret void
}

LLVM IR (-O2):
@.str = [7 x i8] c"fork()\00"
@EXIT_FAILURE = global i32 0
define void @fork_shell() {
%1 = tail call i32 (...) @fork()
switch i32 %1, label %8 [
i32 -1, label %2
i32 0, label %6
]
2: ; preds = %0
%3 = tail call i32 @perror(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0))
%4 = load i32, i32* @EXIT_FAILURE
%5 = tail call i32 @exit(i32 %4)
unreachable
6: ; preds = %0
%7 = tail call i32 (...) @exec_shell()
br label %8
8: ; preds = %0, %6
ret void
}
void test76_Test_targetInit__I() {}


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

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

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

LLVM IR (-O2):
define void @test76_Test_targetInit__I() {
ret void
}
/* Forward declarations */
typedef struct TYPE_2__ TYPE_1__;

/* Type definitions */
struct TYPE_2__ {
  long do_not_propagate_mask;
};
typedef TYPE_1__ XWindowAttributes;

/* Variables and functions */
void set_XWindowAttributes_do_not_propagate_mask(void *_p, long _v) {
  ((XWindowAttributes *)_p)->do_not_propagate_mask = (long)_v;
}


x86 assembly (clang, -O0):
<set_XWindowAttributes_do_not_propagate_mask>:
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_XWindowAttributes_do_not_propagate_mask>:
mov    %rsi,(%rdi)
ret

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

LLVM IR (-O2):
define void @set_XWindowAttributes_do_not_propagate_mask(i8* nocapture writeonly %0, i64 %1) {
%3 = bitcast i8* %0 to i64*
store i64 %1, i64* %3
ret void
}
/* Variables and functions */
int /*<<< orphan*/ MatchEvent(int);
void MatchProc() { MatchEvent(2); }


x86 assembly (clang, -O0):
<MatchProc>:
push   %rbp
mov    %rsp,%rbp
mov    $0x2,%edi
call   1030 <MatchEvent@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<MatchProc>:
mov    $0x2,%edi
jmp    1030 <MatchEvent@plt>

LLVM IR (-O0):
define void @MatchProc() {
%1 = call i32 @MatchEvent(i32 2)
ret void
}

LLVM IR (-O2):
define void @MatchProc() {
%1 = tail call i32 @MatchEvent(i32 2)
ret void
}
void foo_2_2_1_1_1_2_2_2_2() {}


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

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

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

LLVM IR (-O2):
define void @foo_2_2_1_1_1_2_2_2_2() {
ret void
}
void patchcurves_(nu, nv) int *nu, *nv;
{ patchcurves((long)*nu, (long)*nv); }


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

x86 assembly (clang, -O2):
<patchcurves_>:
movslq (%rdi),%rdi
movslq (%rsi),%rsi
xor    %eax,%eax
jmp    1030 <patchcurves@plt>

LLVM IR (-O0):
define void @patchcurves_(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* %5
%7 = sext i32 %6 to i64
%8 = load i32*, i32** %4
%9 = load i32, i32* %8
%10 = sext i32 %9 to i64
%11 = call i32 (i64, i64, ...) bitcast (i32 (...)* @patchcurves to i32 (i64, i64, ...)*)(i64 %7, i64 %10)
ret void
}

LLVM IR (-O2):
define void @patchcurves_(i32* nocapture %0, i32* nocapture %1) {
%3 = load i32, i32* %0
%4 = sext i32 %3 to i64
%5 = load i32, i32* %1
%6 = sext i32 %5 to i64
%7 = tail call i32 (i64, i64, ...) bitcast (i32 (...)* @patchcurves to i32 (i64, i64, ...)*)(i64 %4, i64 %6)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
void function3(int c) {
  printf("You entered %d so function3 was called\n\n", c);
}


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

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

LLVM IR (-O0):
@.str = [41 x i8] c"You entered %d so function3 was called\0A\0A\00"
define void @function3(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = call i32 @printf(i8* getelementptr inbounds ([41 x i8], [41 x i8]* @.str, i64 0, i64 0), i32 %3)
ret void
}

LLVM IR (-O2):
@.str = [41 x i8] c"You entered %d so function3 was called\0A\0A\00"
define void @function3(i32 %0) {
%2 = tail call i32 @printf(i8* getelementptr inbounds ([41 x i8], [41 x i8]* @.str, i64 0, i64 0), i32 %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ imprimir(int);
int main(int argc, char const *argv[]) {
  imprimir(5);
  return 0;
}


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

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    $0x5,%edi
call   1030 <imprimir@plt>
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @imprimir(i32 5)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char *);
void openLinkHTML() {
  printf("%s", "<link rel=\"stylesheet\" type=\"text/css\" href=\"");
}


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

x86 assembly (clang, -O2):
<openLinkHTML>:
lea    0xee9(%rip),%rdi
lea    0xee5(%rip),%rsi
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [3 x i8] c"%s\00"
@.str.1 = [46 x i8] c"<link rel=\22stylesheet\22 type=\22text/css\22 href=\22\00"
define void @openLinkHTML() {
%1 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([46 x i8], [46 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [3 x i8] c"%s\00"
@.str.1 = [46 x i8] c"<link rel=\22stylesheet\22 type=\22text/css\22 href=\22\00"
define void @openLinkHTML() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([46 x i8], [46 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Type definitions */
typedef int uint8_t;
typedef int volatile uint32_t;

/* Variables and functions */
uint32_t USBNumEndpointsGet(uint32_t ui32Base) {
  return ((*((volatile uint8_t *)(ui32Base + 0x00000078))) & 0x0000000F);
}


x86 assembly (clang, -O0):
<USBNumEndpointsGet>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x78,%eax
cltq
mov    (%rax),%eax
and    $0xf,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<USBNumEndpointsGet>:
mov    %edi,-0x4(%rsp)
movslq -0x4(%rsp),%rax
mov    0x78(%rax),%eax
and    $0xf,%eax
ret

LLVM IR (-O0):
define i32 @USBNumEndpointsGet(i32 %0) {
%2 = alloca i32
store volatile i32 %0, i32* %2
%3 = load volatile i32, i32* %2
%4 = add nsw i32 %3, 120
%5 = sext i32 %4 to i64
%6 = inttoptr i64 %5 to i32*
%7 = load volatile i32, i32* %6
%8 = and i32 %7, 15
ret i32 %8
}

LLVM IR (-O2):
define i32 @USBNumEndpointsGet(i32 %0) {
%2 = alloca i32
store volatile i32 %0, i32* %2
%3 = load volatile i32, i32* %2
%4 = add nsw i32 %3, 120
%5 = sext i32 %4 to i64
%6 = inttoptr i64 %5 to i32*
%7 = load volatile i32, i32* %6
%8 = and i32 %7, 15
ret i32 %8
}
/* Variables and functions */
int /*<<< orphan*/ soar_ecPrintReteStatistics();
void print_rete_statistics(void) { soar_ecPrintReteStatistics(); }


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

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

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

LLVM IR (-O2):
define void @print_rete_statistics() {
%1 = tail call i32 (...) @soar_ecPrintReteStatistics()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
scalar_t__ test_mul_num_num(unsigned int, unsigned int);
void check_mul_num_num(unsigned int number_of_tests, unsigned int seed) {
  printf("Mul:\n");
  if (test_mul_num_num(number_of_tests, seed)) {
    printf("Success\n");
  } else {
    printf("Failed\n");
  }
  printf("\n");
}


x86 assembly (clang, -O0):
<check_mul_num_num>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
lea    0xecb(%rip),%rdi
call   1030 <printf@plt>
mov    -0x4(%rbp),%edi
mov    -0x8(%rbp),%esi
call   1040 <test_mul_num_num@plt>
cmp    $0x0,%rax
je     1160 <check_mul_num_num+0x40>
lea    0xeb0(%rip),%rdi
call   1030 <printf@plt>
jmp    116c <check_mul_num_num+0x4c>
lea    0xea8(%rip),%rdi
call   1030 <printf@plt>
lea    0xe91(%rip),%rdi
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<check_mul_num_num>:
push   %rbp
push   %rbx
push   %rax
mov    %esi,%ebx
mov    %edi,%ebp
lea    0xec2(%rip),%rdi
call   1040 <puts@plt>
mov    %ebp,%edi
mov    %ebx,%esi
call   1050 <test_mul_num_num@plt>
test   %rax,%rax
lea    0xeaf(%rip),%rax
lea    0xeaf(%rip),%rdi
cmove  %rax,%rdi
call   1040 <puts@plt>
mov    $0xa,%edi
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    1030 <putchar@plt>

LLVM IR (-O0):
@.str = [6 x i8] c"Mul:\0A\00"
@.str.1 = [9 x i8] c"Success\0A\00"
@.str.2 = [8 x i8] c"Failed\0A\00"
@.str.3 = [2 x i8] c"\0A\00"
define void @check_mul_num_num(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%5 = call i32 @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0))
%6 = load i32, i32* %3
%7 = load i32, i32* %4
%8 = call i64 @test_mul_num_num(i32 %6, i32 %7)
%9 = icmp ne i64 %8, 0
br i1 %9, label %10, label %12
10: ; preds = %2
%11 = call i32 @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.1, i64 0, i64 0))
br label %14
12: ; preds = %2
%13 = call i32 @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.2, i64 0, i64 0))
br label %14
14: ; preds = %12, %10
%15 = call i32 @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.3, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@str = [5 x i8] c"Mul:\00"
@str.4 = [7 x i8] c"Failed\00"
@str.5 = [8 x i8] c"Success\00"
define void @check_mul_num_num(i32 %0, i32 %1) {
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @str, i64 0, i64 0))
%4 = tail call i64 @test_mul_num_num(i32 %0, i32 %1)
%5 = icmp eq i64 %4, 0
%6 = select i1 %5, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @str.4, i64 0, i64 0), i8* getelementptr inbounds ([8 x i8], [8 x i8]* @str.5, i64 0, i64 0)
%7 = tail call i32 @puts(i8* dereferenceable(1) %6)
%8 = tail call i32 @putchar(i32 10)
ret void
}
writemsg(f, n) int f, n;
{
  register int status;
  char buf[128];
  if ((status = mlreply("Message to write: ", buf, 128 - 1)) != 1)
    return (status);
  makelit(buf);
  mlforce(buf);
  return (1);
}


x86 assembly (clang, -O0):
<writemsg>:
push   %rbp
mov    %rsp,%rbp
sub    $0x90,%rsp
mov    %edi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
lea    -0x90(%rbp),%rsi
lea    0xeb1(%rip),%rdi
mov    $0x7f,%edx
mov    $0x0,%al
call   1050 <mlreply@plt>
mov    %eax,-0x10(%rbp)
cmp    $0x1,%eax
je     1172 <writemsg+0x42>
mov    -0x10(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    1195 <writemsg+0x65>
lea    -0x90(%rbp),%rdi
mov    $0x0,%al
call   1030 <makelit@plt>
lea    -0x90(%rbp),%rdi
mov    $0x0,%al
call   1040 <mlforce@plt>
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x90,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<writemsg>:
push   %r14
push   %rbx
sub    $0x88,%rsp
lea    0xebf(%rip),%rdi
mov    %rsp,%rsi
mov    $0x7f,%edx
xor    %eax,%eax
call   1050 <mlreply@plt>
mov    %eax,%ebx
cmp    $0x1,%eax
jne    116e <writemsg+0x3e>
mov    %rsp,%r14
mov    %r14,%rdi
xor    %eax,%eax
call   1030 <makelit@plt>
mov    %r14,%rdi
xor    %eax,%eax
call   1040 <mlforce@plt>
mov    %ebx,%eax
add    $0x88,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@.str = [19 x i8] c"Message to write: \00"
define i32 @writemsg(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
%7 = alloca [128 x i8]
store i32 %0, i32* %4
store i32 %1, i32* %5
%8 = getelementptr inbounds [128 x i8], [128 x i8]* %7, i64 0, i64 0
%9 = call i32 (i8*, i8*, i32, ...) bitcast (i32 (...)* @mlreply to i32 (i8*, i8*, i32, ...)*)(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0), i8* %8, i32 127)
store i32 %9, i32* %6
%10 = icmp ne i32 %9, 1
br i1 %10, label %11, label %13
11: ; preds = %2
%12 = load i32, i32* %6
store i32 %12, i32* %3
br label %18
13: ; preds = %2
%14 = getelementptr inbounds [128 x i8], [128 x i8]* %7, i64 0, i64 0
%15 = call i32 (i8*, ...) bitcast (i32 (...)* @makelit to i32 (i8*, ...)*)(i8* %14)
%16 = getelementptr inbounds [128 x i8], [128 x i8]* %7, i64 0, i64 0
%17 = call i32 (i8*, ...) bitcast (i32 (...)* @mlforce to i32 (i8*, ...)*)(i8* %16)
store i32 1, i32* %3
br label %18
18: ; preds = %13, %11
%19 = load i32, i32* %3
ret i32 %19
}

LLVM IR (-O2):
@.str = [19 x i8] c"Message to write: \00"
define i32 @writemsg(i32 %0, i32 %1) {
%3 = alloca [128 x i8]
%4 = getelementptr inbounds [128 x i8], [128 x i8]* %3, i64 0, i64 0
%5 = call i32 (i8*, i8*, i32, ...) bitcast (i32 (...)* @mlreply to i32 (i8*, i8*, i32, ...)*)(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0), i8* %4, i32 127)
%6 = icmp eq i32 %5, 1
br i1 %6, label %7, label %10
7: ; preds = %2
%8 = call i32 (i8*, ...) bitcast (i32 (...)* @makelit to i32 (i8*, ...)*)(i8* %4)
%9 = call i32 (i8*, ...) bitcast (i32 (...)* @mlforce to i32 (i8*, ...)*)(i8* %4)
br label %10
10: ; preds = %2, %7
ret i32 %5
}
/* Variables and functions */
int d25(int);
int d26(int a) { return d25(d25(a)); }


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

x86 assembly (clang, -O2):
<d26>:
push   %rax
call   1030 <d25@plt>
mov    %eax,%edi
pop    %rax
jmp    1030 <d25@plt>

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

LLVM IR (-O2):
define i32 @d26(i32 %0) {
%2 = tail call i32 @d25(i32 %0)
%3 = tail call i32 @d25(i32 %2)
ret i32 %3
}
/* Type definitions */
typedef int uint32_t;
typedef int int32_t;

/* Variables and functions */
uint32_t upb_zzencode_32(int32_t n) { return ((uint32_t)n << 1) ^ (n >> 31); }


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

x86 assembly (clang, -O2):
<upb_zzencode_32>:
lea    (%rdi,%rdi,1),%eax
sar    $0x1f,%edi
xor    %edi,%eax
ret

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

LLVM IR (-O2):
define i32 @upb_zzencode_32(i32 %0) {
%2 = shl i32 %0, 1
%3 = ashr i32 %0, 31
%4 = xor i32 %2, %3
ret i32 %4
}
double zeta(double phi) { return ((1.0) * phi + (2.0) * (1.0 - phi)); }


x86 assembly (clang, -O0):
<zeta>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
movsd  0xef2(%rip),%xmm2
subsd  -0x8(%rbp),%xmm2
movsd  0xedd(%rip),%xmm1
mulsd  %xmm2,%xmm1
addsd  %xmm1,%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<zeta>:
movsd  0xef8(%rip),%xmm1
subsd  %xmm0,%xmm1
addsd  %xmm1,%xmm1
addsd  %xmm1,%xmm0
ret

LLVM IR (-O0):
define double @zeta(double %0) {
%2 = alloca double
store double %0, double* %2
%3 = load double, double* %2
%4 = load double, double* %2
%5 = fsub double 1.000000e+00, %4
%6 = fmul double 2.000000e+00, %5
%7 = call double @llvm.fmuladd.f64(double 1.000000e+00, double %3, double %6)
ret double %7
}

LLVM IR (-O2):
define double @zeta(double %0) {
%2 = fsub double 1.000000e+00, %0
%3 = fmul double %2, 2.000000e+00
%4 = fadd double %3, %0
ret double %4
}
int barriereNatif32(int entier) {
  int resultat;
  resultat = (int)((unsigned int)entier >> 24);
  resultat |= (entier >> 8) & 0x0FF00;
  resultat |= (entier << 8) & 0x0FF0000;
  resultat |= (entier << 24);
  return resultat;
}


x86 assembly (clang, -O0):
<barriereNatif32>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
shr    $0x18,%eax
mov    %eax,-0x8(%rbp)
mov    -0x4(%rbp),%eax
sar    $0x8,%eax
and    $0xff00,%eax
or     -0x8(%rbp),%eax
mov    %eax,-0x8(%rbp)
mov    -0x4(%rbp),%eax
shl    $0x8,%eax
and    $0xff0000,%eax
or     -0x8(%rbp),%eax
mov    %eax,-0x8(%rbp)
mov    -0x4(%rbp),%eax
shl    $0x18,%eax
or     -0x8(%rbp),%eax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<barriereNatif32>:
mov    %edi,%eax
bswap  %eax
ret

LLVM IR (-O0):
define i32 @barriereNatif32(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %2
%4 = load i32, i32* %2
%5 = lshr i32 %4, 24
store i32 %5, i32* %3
%6 = load i32, i32* %2
%7 = ashr i32 %6, 8
%8 = and i32 %7, 65280
%9 = load i32, i32* %3
%10 = or i32 %9, %8
store i32 %10, i32* %3
%11 = load i32, i32* %2
%12 = shl i32 %11, 8
%13 = and i32 %12, 16711680
%14 = load i32, i32* %3
%15 = or i32 %14, %13
store i32 %15, i32* %3
%16 = load i32, i32* %2
%17 = shl i32 %16, 24
%18 = load i32, i32* %3
%19 = or i32 %18, %17
store i32 %19, i32* %3
%20 = load i32, i32* %3
ret i32 %20
}

LLVM IR (-O2):
define i32 @barriereNatif32(i32 %0) {
%2 = tail call i32 @llvm.bswap.i32(i32 %0)
ret i32 %2
}
/* Type definitions */
typedef int uint32_t;

/* Variables and functions */
int /*<<< orphan*/ w(char);
void prnum(uint32_t n) {
  do {
    w('a' + (n & 15));
    n >>= 4;
  } while (n);
  w('.');
}


x86 assembly (clang, -O0):
<prnum>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
and    $0xf,%eax
add    $0x61,%eax
movsbl %al,%edi
call   1030 <w@plt>
mov    -0x4(%rbp),%eax
sar    $0x4,%eax
mov    %eax,-0x4(%rbp)
cmpl   $0x0,-0x4(%rbp)
jne    111b <prnum+0xb>
mov    $0x2e,%edi
call   1030 <w@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<prnum>:
push   %rbp
push   %rbx
push   %rax
mov    %edi,%ebx
mov    %edi,%ebp
nopw   0x0(%rax,%rax,1)
mov    %ebx,%eax
and    $0xf,%al
add    $0x61,%al
movzbl %al,%edi
call   1030 <w@plt>
sar    $0x4,%ebp
cmp    $0xf,%ebx
mov    %ebp,%ebx
ja     1120 <prnum+0x10>
mov    $0x2e,%edi
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    1030 <w@plt>

LLVM IR (-O0):
define void @prnum(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
br label %3
3: ; preds = %11, %1
%4 = load i32, i32* %2
%5 = and i32 %4, 15
%6 = add nsw i32 97, %5
%7 = trunc i32 %6 to i8
%8 = call i32 @w(i8 signext %7)
%9 = load i32, i32* %2
%10 = ashr i32 %9, 4
store i32 %10, i32* %2
br label %11
11: ; preds = %3
%12 = load i32, i32* %2
%13 = icmp ne i32 %12, 0
br i1 %13, label %3, label %14
14: ; preds = %11
%15 = call i32 @w(i8 signext 46)
ret void
}

LLVM IR (-O2):
define void @prnum(i32 %0) {
br label %2
2: ; preds = %2, %1
%3 = phi i32 [ %0, %1 ], [ %8, %2 ]
%4 = trunc i32 %3 to i8
%5 = and i8 %4, 15
%6 = add nuw nsw i8 %5, 97
%7 = tail call i32 @w(i8 signext %6)
%8 = ashr i32 %3, 4
%9 = icmp ult i32 %3, 16
br i1 %9, label %10, label %2
10: ; preds = %2
%11 = tail call i32 @w(i8 signext 46)
ret void
}
/* Type definitions */
typedef int uint8_t;

/* Variables and functions */
uint8_t encode_prescalar(uint8_t m) {
  switch (m) {
  case 1:
    return 0;
  case 2:
    return 1;
  case 4:
    return 2;
  case 8:
    return 3;
  default:
    return -1;
  }
}


x86 assembly (clang, -O0):
<encode_prescalar>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
mov    -0x8(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,%ecx
mov    %rcx,-0x10(%rbp)
sub    $0x7,%eax
ja     1160 <encode_prescalar+0x60>
mov    -0x10(%rbp),%rax
lea    0xed9(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
movl   $0x0,-0x4(%rbp)
jmp    1167 <encode_prescalar+0x67>
movl   $0x1,-0x4(%rbp)
jmp    1167 <encode_prescalar+0x67>
movl   $0x2,-0x4(%rbp)
jmp    1167 <encode_prescalar+0x67>
movl   $0x3,-0x4(%rbp)
jmp    1167 <encode_prescalar+0x67>
movl   $0xffffffff,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<encode_prescalar>:
add    $0xffffffff,%edi
mov    $0xffffffff,%eax
cmp    $0x7,%edi
ja     111a <encode_prescalar+0x1a>
movslq %edi,%rax
lea    0xee9(%rip),%rcx
mov    (%rcx,%rax,4),%eax
ret

LLVM IR (-O0):
define i32 @encode_prescalar(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %3
%4 = load i32, i32* %3
switch i32 %4, label %9 [
i32 1, label %5
i32 2, label %6
i32 4, label %7
i32 8, label %8
]
5: ; preds = %1
store i32 0, i32* %2
br label %10
6: ; preds = %1
store i32 1, i32* %2
br label %10
7: ; preds = %1
store i32 2, i32* %2
br label %10
8: ; preds = %1
store i32 3, i32* %2
br label %10
9: ; preds = %1
store i32 -1, i32* %2
br label %10
10: ; preds = %9, %8, %7, %6, %5
%11 = load i32, i32* %2
ret i32 %11
}

LLVM IR (-O2):
@switch.table.encode_prescalar = [8 x i32] [i32 0, i32 1, i32 -1, i32 2, i32 -1, i32 -1, i32 -1, i32 3]
define i32 @encode_prescalar(i32 %0) {
%2 = add i32 %0, -1
%3 = icmp ult i32 %2, 8
br i1 %3, label %4, label %8
4: ; preds = %1
%5 = sext i32 %2 to i64
%6 = getelementptr inbounds [8 x i32], [8 x i32]* @switch.table.encode_prescalar, i64 0, i64 %5
%7 = load i32, i32* %6
br label %8
8: ; preds = %1, %4
%9 = phi i32 [ %7, %4 ], [ -1, %1 ]
ret i32 %9
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int vobb(int a) {
  printf("In shared library\n");
  return a + 1;
}


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

x86 assembly (clang, -O2):
<vobb>:
push   %rbx
mov    %edi,%ebx
lea    0xee6(%rip),%rdi
call   1030 <puts@plt>
add    $0x1,%ebx
mov    %ebx,%eax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [19 x i8] c"In shared library\0A\00"
define i32 @vobb(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = call i32 @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0))
%4 = load i32, i32* %2
%5 = add nsw i32 %4, 1
ret i32 %5
}

LLVM IR (-O2):
@str = [18 x i8] c"In shared library\00"
define i32 @vobb(i32 %0) {
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([18 x i8], [18 x i8]* @str, i64 0, i64 0))
%3 = add nsw i32 %0, 1
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char *);
int main(void) {
  int i;
  char line[81];
  void readLine(char buffer[]);
  for (i = 0; i < 3; ++i) {
    readLine(line);
    printf("%s \n\n", line);
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x60,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
cmpl   $0x3,-0x8(%rbp)
jge    1167 <main+0x47>
lea    -0x60(%rbp),%rdi
call   1040 <readLine@plt>
lea    -0x60(%rbp),%rsi
lea    0xeac(%rip),%rdi
call   1030 <printf@plt>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1136 <main+0x16>
xor    %eax,%eax
add    $0x60,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r14
push   %rbx
sub    $0x58,%rsp
mov    %rsp,%rbx
mov    %rbx,%rdi
call   1040 <readLine@plt>
lea    0xec7(%rip),%r14
mov    %r14,%rdi
mov    %rbx,%rsi
call   1030 <printf@plt>
mov    %rbx,%rdi
call   1040 <readLine@plt>
mov    %r14,%rdi
mov    %rbx,%rsi
call   1030 <printf@plt>
mov    %rbx,%rdi
call   1040 <readLine@plt>
mov    %r14,%rdi
mov    %rbx,%rsi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x58,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@.str = [6 x i8] c"%s \0A\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca [81 x i8]
store i32 0, i32* %1
store i32 0, i32* %2
br label %4
4: ; preds = %11, %0
%5 = load i32, i32* %2
%6 = icmp slt i32 %5, 3
br i1 %6, label %7, label %14
7: ; preds = %4
%8 = getelementptr inbounds [81 x i8], [81 x i8]* %3, i64 0, i64 0
%9 = getelementptr inbounds [81 x i8], [81 x i8]* %3, i64 0, i64 0
%10 = call i32 @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i8* %9)
br label %11
11: ; preds = %7
%12 = load i32, i32* %2
%13 = add nsw i32 %12, 1
store i32 %13, i32* %2
br label %4
14: ; preds = %4
ret i32 0
}

LLVM IR (-O2):
@.str = [6 x i8] c"%s \0A\0A\00"
define i32 @main() {
%1 = alloca [81 x i8]
%2 = getelementptr inbounds [81 x i8], [81 x i8]* %1, i64 0, i64 0
%3 = call i32 @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i8* %2)
%4 = call i32 @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i8* %2)
%5 = call i32 @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i8* %2)
ret i32 0
}
void *memmove(void *out, void *in, unsigned int bytes) {
  char *b1 = (char *)out;
  char *bi = malloc(bytes);
  char *b2 = (char *)in;
  memcpy(bi, b1, bytes);
  memcpy(b2, bi, bytes);
  free(bi);
  return b1;
}


x86 assembly (clang, -O0):
<memmove>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x20(%rbp)
mov    -0x14(%rbp),%eax
mov    %eax,%edi
call   1050 <malloc@plt>
mov    %rax,-0x28(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x30(%rbp)
mov    -0x28(%rbp),%rdi
mov    -0x20(%rbp),%rsi
mov    -0x14(%rbp),%eax
mov    %eax,%edx
call   1040 <memcpy@plt>
mov    -0x30(%rbp),%rdi
mov    -0x28(%rbp),%rsi
mov    -0x14(%rbp),%eax
mov    %eax,%edx
call   1040 <memcpy@plt>
mov    -0x28(%rbp),%rdi
call   1030 <free@plt>
mov    -0x20(%rbp),%rax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<memmove>:
push   %rbx
mov    %rdi,%rbx
mov    %edx,%edx
mov    %rsi,%rdi
mov    %rbx,%rsi
call   1030 <memmove@plt>
mov    %rbx,%rax
pop    %rbx
ret

LLVM IR (-O0):
define i8* @memmove(i8* %0, i8* %1, i32 %2) {
%4 = alloca i8*
%5 = alloca i8*
%6 = alloca i32
%7 = alloca i8*
%8 = alloca i8*
%9 = alloca i8*
store i8* %0, i8** %4
store i8* %1, i8** %5
store i32 %2, i32* %6
%10 = load i8*, i8** %4
store i8* %10, i8** %7
%11 = load i32, i32* %6
%12 = zext i32 %11 to i64
%13 = call i8* @malloc(i64 %12)
store i8* %13, i8** %8
%14 = load i8*, i8** %5
store i8* %14, i8** %9
%15 = load i8*, i8** %8
%16 = load i8*, i8** %7
%17 = load i32, i32* %6
%18 = zext i32 %17 to i64
%19 = load i8*, i8** %9
%20 = load i8*, i8** %8
%21 = load i32, i32* %6
%22 = zext i32 %21 to i64
%23 = load i8*, i8** %8
%24 = load i8*, i8** %7
ret i8* %24
}

LLVM IR (-O2):
define i8* @memmove(i8* returned %0, i8* nocapture writeonly %1, i32 %2) {
%4 = zext i32 %2 to i64
ret i8* %0
}
/* Variables and functions */
int /*<<< orphan*/ debug(char *, ...);
int G17_f(char *s) {
  debug("G17_f(const char *s) is not yet implemented!\n");
  debug("%s\n", s);
  return 1;
}


x86 assembly (clang, -O0):
<G17_f>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
lea    0xedd(%rip),%rdi
mov    $0x0,%al
call   1030 <debug@plt>
mov    -0x8(%rbp),%rsi
lea    0xef9(%rip),%rdi
mov    $0x0,%al
call   1030 <debug@plt>
mov    $0x1,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<G17_f>:
push   %rbx
mov    %rdi,%rbx
lea    0xee5(%rip),%rdi
xor    %eax,%eax
call   1030 <debug@plt>
lea    0xf05(%rip),%rdi
mov    %rbx,%rsi
xor    %eax,%eax
call   1030 <debug@plt>
mov    $0x1,%eax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [46 x i8] c"G17_f(const char *s) is not yet implemented!\0A\00"
@.str.1 = [4 x i8] c"%s\0A\00"
define i32 @G17_f(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = call i32 (i8*, ...) @debug(i8* getelementptr inbounds ([46 x i8], [46 x i8]* @.str, i64 0, i64 0))
%4 = load i8*, i8** %2
%5 = call i32 (i8*, ...) @debug(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i8* %4)
ret i32 1
}

LLVM IR (-O2):
@.str = [46 x i8] c"G17_f(const char *s) is not yet implemented!\0A\00"
@.str.1 = [4 x i8] c"%s\0A\00"
define i32 @G17_f(i8* %0) {
%2 = tail call i32 (i8*, ...) @debug(i8* getelementptr inbounds ([46 x i8], [46 x i8]* @.str, i64 0, i64 0))
%3 = tail call i32 (i8*, ...) @debug(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i8* %0)
ret i32 1
}
/* Variables and functions */
int capturePositiveValue();
int /*<<< orphan*/ printf(char *);
int getHeight() {
  printf("\nEnter number of rows to print");
  printf("\n(must be greater than or equal to 3): ");
  return capturePositiveValue();
}


x86 assembly (clang, -O0):
<getHeight>:
push   %rbp
mov    %rsp,%rbp
lea    0xed5(%rip),%rdi
call   1030 <printf@plt>
lea    0xee8(%rip),%rdi
call   1030 <printf@plt>
mov    $0x0,%al
call   1040 <capturePositiveValue@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<getHeight>:
push   %rax
lea    0xed8(%rip),%rdi
call   1030 <printf@plt>
lea    0xeeb(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
jmp    1040 <capturePositiveValue@plt>

LLVM IR (-O0):
@.str = [31 x i8] c"\0AEnter number of rows to print\00"
@.str.1 = [40 x i8] c"\0A(must be greater than or equal to 3): \00"
define i32 @getHeight() {
%1 = call i32 @printf(i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str, i64 0, i64 0))
%2 = call i32 @printf(i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str.1, i64 0, i64 0))
%3 = call i32 (...) @capturePositiveValue()
ret i32 %3
}

LLVM IR (-O2):
@.str = [31 x i8] c"\0AEnter number of rows to print\00"
@.str.1 = [40 x i8] c"\0A(must be greater than or equal to 3): \00"
define i32 @getHeight() {
%1 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([31 x i8], [31 x i8]* @.str, i64 0, i64 0))
%2 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([40 x i8], [40 x i8]* @.str.1, i64 0, i64 0))
%3 = tail call i32 (...) @capturePositiveValue()
ret i32 %3
}
/* Variables and functions */
long meat_time_offset_hours(int const);
long meat_time_offset_minutes(int const);
signed long int meat_time_offset_time_of_day(int const i_hour,
                                             int const i_minutes) {
  return (meat_time_offset_hours(i_hour) + meat_time_offset_minutes(i_minutes));
}


x86 assembly (clang, -O0):
<meat_time_offset_time_of_day>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%edi
call   1040 <meat_time_offset_hours@plt>
mov    %rax,-0x10(%rbp)
mov    -0x8(%rbp),%edi
call   1030 <meat_time_offset_minutes@plt>
mov    %rax,%rcx
mov    -0x10(%rbp),%rax
add    %rcx,%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<meat_time_offset_time_of_day>:
push   %rbp
push   %rbx
push   %rax
mov    %esi,%ebp
call   1040 <meat_time_offset_hours@plt>
mov    %rax,%rbx
mov    %ebp,%edi
call   1030 <meat_time_offset_minutes@plt>
add    %rbx,%rax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
define i64 @meat_time_offset_time_of_day(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 = call i64 @meat_time_offset_hours(i32 %5)
%7 = load i32, i32* %4
%8 = call i64 @meat_time_offset_minutes(i32 %7)
%9 = add nsw i64 %6, %8
ret i64 %9
}

LLVM IR (-O2):
define i64 @meat_time_offset_time_of_day(i32 %0, i32 %1) {
%3 = tail call i64 @meat_time_offset_hours(i32 %0)
%4 = tail call i64 @meat_time_offset_minutes(i32 %1)
%5 = add nsw i64 %4, %3
ret i64 %5
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ perror(char *);
int send(int, char *, scalar_t__, int /*<<< orphan*/);
scalar_t__ strlen(char *);
int client_main(int sockfd, char *message) {
  int rc;
  rc = send(sockfd, message, strlen(message) + 1, 0);
  if (rc < 0) {
    perror("ERROR on send");
    exit(-1);
  }
  return rc;
}


x86 assembly (clang, -O0):
<client_main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x4(%rbp),%eax
mov    %eax,-0x24(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x20(%rbp)
mov    -0x10(%rbp),%rdi
call   1030 <strlen@plt>
mov    -0x24(%rbp),%edi
mov    -0x20(%rbp),%rsi
mov    %rax,%rdx
add    $0x1,%rdx
xor    %ecx,%ecx
call   1040 <send@plt>
mov    %eax,-0x14(%rbp)
cmpl   $0x0,-0x14(%rbp)
jge    119e <client_main+0x5e>
lea    0xe71(%rip),%rdi
call   1050 <perror@plt>
mov    $0xffffffff,%edi
call   1060 <exit@plt>
mov    -0x14(%rbp),%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<client_main>:
push   %rbp
push   %rbx
push   %rax
mov    %rsi,%rbx
mov    %edi,%ebp
mov    %rsi,%rdi
call   1030 <strlen@plt>
lea    0x1(%rax),%rdx
mov    %ebp,%edi
mov    %rbx,%rsi
xor    %ecx,%ecx
call   1040 <send@plt>
test   %eax,%eax
js     116b <client_main+0x2b>
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret
lea    0xe8e(%rip),%rdi
call   1050 <perror@plt>
mov    $0xffffffff,%edi
call   1060 <exit@plt>

LLVM IR (-O0):
@.str = [14 x i8] c"ERROR on send\00"
define i32 @client_main(i32 %0, i8* %1) {
%3 = alloca i32
%4 = alloca i8*
%5 = alloca i32
store i32 %0, i32* %3
store i8* %1, i8** %4
%6 = load i32, i32* %3
%7 = load i8*, i8** %4
%8 = load i8*, i8** %4
%9 = call i64 @strlen(i8* %8)
%10 = add nsw i64 %9, 1
%11 = call i32 @send(i32 %6, i8* %7, i64 %10, i32 0)
store i32 %11, i32* %5
%12 = load i32, i32* %5
%13 = icmp slt i32 %12, 0
br i1 %13, label %14, label %17
14: ; preds = %2
%15 = call i32 @perror(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0))
%16 = call i32 @exit(i32 -1)
unreachable
17: ; preds = %2
%18 = load i32, i32* %5
ret i32 %18
}

LLVM IR (-O2):
@.str = [14 x i8] c"ERROR on send\00"
define i32 @client_main(i32 %0, i8* %1) {
%3 = tail call i64 @strlen(i8* dereferenceable(1) %1)
%4 = add nsw i64 %3, 1
%5 = tail call i32 @send(i32 %0, i8* %1, i64 %4, i32 0)
%6 = icmp slt i32 %5, 0
br i1 %6, label %7, label %10
7: ; preds = %2
%8 = tail call i32 @perror(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0))
%9 = tail call i32 @exit(i32 -1)
unreachable
10: ; preds = %2
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ register_sot_function_list();
void sot_init() { register_sot_function_list(); }


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

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

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

LLVM IR (-O2):
define void @sot_init() {
%1 = tail call i32 (...) @register_sot_function_list()
ret void
}
int exampleProgram() {}


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

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

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

LLVM IR (-O2):
define i32 @exampleProgram() {
ret i32 undef
}
/* Variables and functions */
int Score();
int /*<<< orphan*/ system(char *);
int Scoreonly() {
  int score = Score();
  system("cls");
  return score;
}


x86 assembly (clang, -O0):
<Scoreonly>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1040 <Score@plt>
mov    %eax,-0x4(%rbp)
lea    0xec7(%rip),%rdi
call   1030 <system@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Scoreonly>:
push   %rbx
xor    %eax,%eax
call   1040 <Score@plt>
mov    %eax,%ebx
lea    0xecf(%rip),%rdi
call   1030 <system@plt>
mov    %ebx,%eax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [4 x i8] c"cls\00"
define i32 @Scoreonly() {
%1 = alloca i32
%2 = call i32 (...) @Score()
store i32 %2, i32* %1
%3 = call i32 @system(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0))
%4 = load i32, i32* %1
ret i32 %4
}

LLVM IR (-O2):
@.str = [4 x i8] c"cls\00"
define i32 @Scoreonly() {
%1 = tail call i32 (...) @Score()
%2 = tail call i32 @system(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0))
ret i32 %1
}
int testExe2libImp(void) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @testExe2libImp() {
ret i32 0
}
adrx0adrx1_set(r0, r1, x0, x1, p0, p1) float r0, r1;
float *p0, *p1;
{
  (((float *)10000000)[x0]) =
      (((float *)(11111111 & ~(__alignof__(float) - 1)))[x1]);
}


x86 assembly (clang, -O0):
<adrx0adrx1_set>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm1,-0x30(%rbp)
movaps %xmm0,%xmm1
movsd  -0x30(%rbp),%xmm0
cvtsd2ss %xmm1,%xmm1
cvtsd2ss %xmm0,%xmm0
movss  %xmm1,-0x8(%rbp)
movss  %xmm0,-0xc(%rbp)
mov    %edi,-0x10(%rbp)
mov    %esi,-0x14(%rbp)
mov    %rdx,-0x20(%rbp)
mov    %rcx,-0x28(%rbp)
movslq -0x14(%rbp),%rcx
mov    $0xa98ac4,%eax
movss  (%rax,%rcx,4),%xmm0
movslq -0x10(%rbp),%rcx
mov    $0x989680,%eax
movss  %xmm0,(%rax,%rcx,4)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<adrx0adrx1_set>:
movslq %esi,%rax
movss  0xa98ac4(,%rax,4),%xmm0
movslq %edi,%rax
movss  %xmm0,0x989680(,%rax,4)
ret

LLVM IR (-O0):
define i32 @adrx0adrx1_set(double %0, double %1, i32 %2, i32 %3, float* %4, float* %5) {
%7 = alloca i32
%8 = alloca float
%9 = alloca float
%10 = alloca i32
%11 = alloca i32
%12 = alloca float*
%13 = alloca float*
%14 = fptrunc double %0 to float
%15 = fptrunc double %1 to float
store float %14, float* %8
store float %15, float* %9
store i32 %2, i32* %10
store i32 %3, i32* %11
store float* %4, float** %12
store float* %5, float** %13
%16 = load i32, i32* %11
%17 = sext i32 %16 to i64
%18 = getelementptr inbounds float, float* inttoptr (i64 11111108 to float*), i64 %17
%19 = load float, float* %18
%20 = load i32, i32* %10
%21 = sext i32 %20 to i64
%22 = getelementptr inbounds float, float* inttoptr (i64 10000000 to float*), i64 %21
store float %19, float* %22
%23 = load i32, i32* %7
ret i32 %23
}

LLVM IR (-O2):
define i32 @adrx0adrx1_set(double %0, double %1, i32 %2, i32 %3, float* nocapture readnone %4, float* nocapture readnone %5) {
%7 = sext i32 %3 to i64
%8 = getelementptr inbounds float, float* inttoptr (i64 11111108 to float*), i64 %7
%9 = load float, float* %8
%10 = sext i32 %2 to i64
%11 = getelementptr inbounds float, float* inttoptr (i64 10000000 to float*), i64 %10
store float %9, float* %11
ret i32 undef
}
/* Variables and functions */
int gcd(int, int);
int gcdOfArray(int input[], int size) {
  int result = input[0];
  for (int i = 1; i < size; i++) {
    result = gcd(result, input[i]);
  }
  return result;
}


x86 assembly (clang, -O0):
<gcdOfArray>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%eax
mov    %eax,-0x10(%rbp)
movl   $0x1,-0x14(%rbp)
mov    -0x14(%rbp),%eax
cmp    -0xc(%rbp),%eax
jge    115f <gcdOfArray+0x4f>
mov    -0x10(%rbp),%edi
mov    -0x8(%rbp),%rax
movslq -0x14(%rbp),%rcx
mov    (%rax,%rcx,4),%esi
call   1030 <gcd@plt>
mov    %eax,-0x10(%rbp)
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    112f <gcdOfArray+0x1f>
mov    -0x10(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<gcdOfArray>:
push   %r15
push   %r14
push   %rbx
mov    (%rdi),%eax
cmp    $0x2,%esi
jl     1144 <gcdOfArray+0x34>
mov    %rdi,%r15
mov    %esi,%r14d
mov    $0x1,%ebx
nopw   0x0(%rax,%rax,1)
mov    (%r15,%rbx,4),%esi
mov    %eax,%edi
call   1030 <gcd@plt>
add    $0x1,%rbx
cmp    %rbx,%r14
jne    1130 <gcdOfArray+0x20>
pop    %rbx
pop    %r14
pop    %r15
ret

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

LLVM IR (-O2):
define i32 @gcdOfArray(i32* nocapture %0, i32 %1) {
%3 = load i32, i32* %0
%4 = icmp sgt i32 %1, 1
br i1 %4, label %5, label %7
5: ; preds = %2
%6 = zext i32 %1 to i64
br label %9
7: ; preds = %9, %2
%8 = phi i32 [ %3, %2 ], [ %14, %9 ]
ret i32 %8
9: ; preds = %5, %9
%10 = phi i64 [ 1, %5 ], [ %15, %9 ]
%11 = phi i32 [ %3, %5 ], [ %14, %9 ]
%12 = getelementptr inbounds i32, i32* %0, i64 %10
%13 = load i32, i32* %12
%14 = tail call i32 @gcd(i32 %11, i32 %13)
%15 = add nuw nsw i64 %10, 1
%16 = icmp eq i64 %15, %6
br i1 %16, label %7, label %9
}
/* Variables and functions */
int change(int *);
int /*<<< orphan*/ printf(char *, int, int);
int main(void) {
  int number = 10;
  int *pnumber = &number;
  int result = 0;
  result = change(pnumber);
  printf("\nIn main, result = %d\tnumber = %d", result, number);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0xa,-0x8(%rbp)
lea    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
mov    -0x10(%rbp),%rdi
call   1030 <change@plt>
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%esi
mov    -0x8(%rbp),%edx
lea    0xea2(%rip),%rdi
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
movl   $0xa,0x4(%rsp)
lea    0x4(%rsp),%rdi
call   1030 <change@plt>
mov    0x4(%rsp),%edx
lea    0xec2(%rip),%rdi
mov    %eax,%esi
call   1040 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
@.str = [34 x i8] c"\0AIn main, result = %d\09number = %d\00"
define i32 @main() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
store i32 10, i32* %1
%3 = call i32 @change(i32* %1)
%4 = load i32, i32* %1
%5 = call i32 @printf(i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str, i64 0, i64 0), i32 %3, i32 %4)
ret i32 0
}