xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ assert(int /*<<< orphan*/);
void send_ack(int sock) { assert(0); }


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

x86 assembly (clang, -O2):
<send_ack>:
xor    %edi,%edi
jmp    1030 <assert@plt>

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

LLVM IR (-O2):
define void @send_ack(i32 %0) {
%2 = tail call i32 @assert(i32 0)
ret void
}
void bits_set(const int x, int *bits) { bits[x >> 5] |= 1 << (x & 31); }


x86 assembly (clang, -O0):
<bits_set>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x4(%rbp),%ecx
and    $0x1f,%ecx
mov    $0x1,%edx
shl    %cl,%edx
mov    -0x10(%rbp),%rax
mov    -0x4(%rbp),%ecx
sar    $0x5,%ecx
movslq %ecx,%rcx
or     (%rax,%rcx,4),%edx
mov    %edx,(%rax,%rcx,4)
pop    %rbp
ret

x86 assembly (clang, -O2):
<bits_set>:
mov    %edi,%ecx
mov    $0x1,%eax
shl    %cl,%eax
sar    $0x5,%ecx
movslq %ecx,%rcx
or     %eax,(%rsi,%rcx,4)
ret

LLVM IR (-O0):
define void @bits_set(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 = and i32 %5, 31
%7 = shl i32 1, %6
%8 = load i32*, i32** %4
%9 = load i32, i32* %3
%10 = ashr i32 %9, 5
%11 = sext i32 %10 to i64
%12 = getelementptr inbounds i32, i32* %8, i64 %11
%13 = load i32, i32* %12
%14 = or i32 %13, %7
store i32 %14, i32* %12
ret void
}

LLVM IR (-O2):
define void @bits_set(i32 %0, i32* nocapture %1) {
%3 = and i32 %0, 31
%4 = shl nuw i32 1, %3
%5 = ashr i32 %0, 5
%6 = sext i32 %5 to i64
%7 = getelementptr inbounds i32, i32* %1, i64 %6
%8 = load i32, i32* %7
%9 = or i32 %8, %4
store i32 %9, i32* %7
ret void
}
int main() {
  int i = 3;
  int j = 0;
  int z = i / j;
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
movl   $0x0,-0x4(%rbp)
movl   $0x3,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
mov    -0x8(%rbp),%eax
cltd
idivl  -0xc(%rbp)
mov    %eax,-0x10(%rbp)
xor    %eax,%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @main() {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void shellcodeCreator_windows64() { printf("Not yet implemented.\n"); }


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

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

LLVM IR (-O0):
@.str = [22 x i8] c"Not yet implemented.\0A\00"
define void @shellcodeCreator_windows64() {
%1 = call i32 @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@str = [21 x i8] c"Not yet implemented.\00"
define void @shellcodeCreator_windows64() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([21 x i8], [21 x i8]* @str, i64 0, i64 0))
ret void
}
int fetch_and_inc(int *val) {
  int ret = 1;
  __asm__ __volatile__("lock; xaddl %0, %1"
                       : "+r"(ret), "+m"(*val)
                       :
                       : "memory");
  return ret;
}


x86 assembly (clang, -O0):
<fetch_and_inc>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movl   $0x1,-0xc(%rbp)
mov    -0xc(%rbp),%eax
mov    -0x8(%rbp),%rcx
lock xadd %eax,(%rcx)
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<fetch_and_inc>:
mov    $0x1,%eax
lock xadd %eax,(%rdi)
ret

LLVM IR (-O0):
define i32 @fetch_and_inc(i32* %0) {
%2 = alloca i32*
%3 = alloca i32
store i32* %0, i32** %2
store i32 1, i32* %3
%4 = load i32, i32* %3
%5 = load i32*, i32** %2
%6 = call i32 asm sideeffect "lock; xaddl $0, $1", "=r,=*m,0,*m,~{memory},~{dirflag},~{fpsr},~{flags}"(i32* elementtype(i32) %5, i32 %4, i32* elementtype(i32) %5)
store i32 %6, i32* %3
%7 = load i32, i32* %3
ret i32 %7
}

LLVM IR (-O2):
define i32 @fetch_and_inc(i32* %0) {
%2 = tail call i32 asm sideeffect "lock; xaddl $0, $1", "=r,=*m,0,*m,~{memory},~{dirflag},~{fpsr},~{flags}"(i32* elementtype(i32) %0, i32 1, i32* elementtype(i32) %0)
ret i32 %2
}
void INT_Excep_CTSU_CTSUWR(void) {}


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

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

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

LLVM IR (-O2):
define void @INT_Excep_CTSU_CTSUWR() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ isalnum(int);
void t_isalnum_0xfb() {
  Assert_real((isalnum(251) == 0),
              "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
              "2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/"
              "dg/z88dk/test/suites/ctype/test_isalnum.c",
              1260, ("isalnum should be 0 for 0xfb"));
}


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

x86 assembly (clang, -O2):
<t_isalnum_0xfb>:
push   %rax
mov    $0xfb,%edi
call   1030 <isalnum@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf66(%rip),%rcx
mov    $0x4ec,%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 = [29 x i8] c"isalnum should be 0 for 0xfb\00"
define void @t_isalnum_0xfb() {
%1 = call i64 @isalnum(i32 251)
%2 = icmp eq i64 %1, 0
%3 = zext i1 %2 to i32
%4 = call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([168 x i8], [168 x i8]* @.str, i64 0, i64 0), i32 1260, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [168 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/ctype/test_isalnum.c\00"
@.str.1 = [29 x i8] c"isalnum should be 0 for 0xfb\00"
define void @t_isalnum_0xfb() {
%1 = tail call i64 @isalnum(i32 251)
%2 = icmp eq i64 %1, 0
%3 = zext i1 %2 to i32
%4 = tail call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([168 x i8], [168 x i8]* @.str, i64 0, i64 0), i32 1260, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ assert(int /*<<< orphan*/);
void mm_free(void *mem) {
  assert(0);
  (void)mem;
}


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

x86 assembly (clang, -O2):
<mm_free>:
xor    %edi,%edi
jmp    1030 <assert@plt>

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

LLVM IR (-O2):
define void @mm_free(i8* nocapture readnone %0) {
%2 = tail call i32 @assert(i32 0)
ret void
}
void ptrace_sandbox_permit_getsockopt(struct pt_sandbox *p_sandbox) {
  (void)p_sandbox;
}


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

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

LLVM IR (-O0):
%struct.pt_sandbox = type opaque
define void @ptrace_sandbox_permit_getsockopt(%struct.pt_sandbox* %0) {
%2 = alloca %struct.pt_sandbox*
store %struct.pt_sandbox* %0, %struct.pt_sandbox** %2
%3 = load %struct.pt_sandbox*, %struct.pt_sandbox** %2
ret void
}

LLVM IR (-O2):
%struct.pt_sandbox = type opaque
define void @ptrace_sandbox_permit_getsockopt(%struct.pt_sandbox* nocapture %0) {
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ Display;

/* Variables and functions */
char *DisplayString(int /*<<< orphan*/ *);
int /*<<< orphan*/ printf(char *, char *);
void print_display_info(Display *dpy) {
  printf("name of display: %s\n", DisplayString(dpy));
}


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

x86 assembly (clang, -O2):
<print_display_info>:
push   %rax
call   1040 <DisplayString@plt>
lea    0xed3(%rip),%rdi
mov    %rax,%rsi
pop    %rax
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [21 x i8] c"name of display: %s\0A\00"
define void @print_display_info(i32* %0) {
%2 = alloca i32*
store i32* %0, i32** %2
%3 = load i32*, i32** %2
%4 = call i8* @DisplayString(i32* %3)
%5 = call i32 @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str, i64 0, i64 0), i8* %4)
ret void
}

LLVM IR (-O2):
@.str = [21 x i8] c"name of display: %s\0A\00"
define void @print_display_info(i32* %0) {
%2 = tail call i8* @DisplayString(i32* %0)
%3 = tail call i32 @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str, i64 0, i64 0), i8* %2)
ret void
}
float Sleef_roundf(float x) { return __builtin_roundf(x); }


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

x86 assembly (clang, -O2):
<Sleef_roundf>:
jmp    1030 <roundf@plt>

LLVM IR (-O0):
define float @Sleef_roundf(float %0) {
%2 = alloca float
store float %0, float* %2
%3 = load float, float* %2
%4 = call float @llvm.round.f32(float %3)
ret float %4
}

LLVM IR (-O2):
define float @Sleef_roundf(float %0) {
%2 = tail call float @llvm.round.f32(float %0)
ret float %2
}
/* Variables and functions */
int /*<<< orphan*/ EXIT_FAILURE;
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char *);
int /*<<< orphan*/ stderr;
void showUsage(char *com) {
  fprintf(stderr, "\nProgram usage:\n%s <input_file> <class_file> [<output>]\n",
          com);
  exit(EXIT_FAILURE);
}


x86 assembly (clang, -O0):
<showUsage>:
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    0x2e8c(%rip),%rax
mov    (%rax),%edi
call   1040 <exit@plt>

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

LLVM IR (-O0):
@stderr = global i32 0
@.str = [57 x i8] c"\0AProgram usage:\0A%s <input_file> <class_file> [<output>]\0A\00"
@EXIT_FAILURE = global i32 0
define void @showUsage(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 ([57 x i8], [57 x i8]* @.str, i64 0, i64 0), i8* %4)
%6 = load i32, i32* @EXIT_FAILURE
%7 = call i32 @exit(i32 %6)
unreachable
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [57 x i8] c"\0AProgram usage:\0A%s <input_file> <class_file> [<output>]\0A\00"
@EXIT_FAILURE = global i32 0
define void @showUsage(i8* %0) {
%2 = load i32, i32* @stderr
%3 = tail call i32 @fprintf(i32 %2, i8* getelementptr inbounds ([57 x i8], [57 x i8]* @.str, i64 0, i64 0), i8* %0)
%4 = load i32, i32* @EXIT_FAILURE
%5 = tail call i32 @exit(i32 %4)
unreachable
}
/* Variables and functions */
int /*<<< orphan*/ PAPI_shutdown();
void papif_shutdown__(void) { PAPI_shutdown(); }


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

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

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

LLVM IR (-O2):
define void @papif_shutdown__() {
%1 = tail call i32 (...) @PAPI_shutdown()
ret void
}
/* Type definitions */
typedef scalar_t__ uint32_t;

/* Variables and functions */
int /*<<< orphan*/ ASSERT(int /*<<< orphan*/);
int /*<<< orphan*/ _UARTBaseValid(scalar_t__);
void UARTIntClear(uint32_t ui32Base, uint32_t ui32IntFlags) {
  ASSERT(_UARTBaseValid(ui32Base));
  (*((volatile uint32_t *)(ui32Base + 0x00000044))) = ui32IntFlags;
}


x86 assembly (clang, -O0):
<UARTIntClear>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <_UARTBaseValid@plt>
mov    %eax,%edi
call   1040 <ASSERT@plt>
mov    -0x10(%rbp),%rcx
mov    -0x8(%rbp),%rax
mov    %rcx,0x44(%rax)
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<UARTIntClear>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%r14
mov    %rdi,%rbx
call   1030 <_UARTBaseValid@plt>
mov    %eax,%edi
call   1040 <ASSERT@plt>
mov    %r14,0x44(%rbx)
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define void @UARTIntClear(i64 %0, i64 %1) {
%3 = alloca i64
%4 = alloca i64
store i64 %0, i64* %3
store i64 %1, i64* %4
%5 = load i64, i64* %3
%6 = call i32 @_UARTBaseValid(i64 %5)
%7 = call i32 @ASSERT(i32 %6)
%8 = load i64, i64* %4
%9 = load i64, i64* %3
%10 = add nsw i64 %9, 68
%11 = inttoptr i64 %10 to i64*
store volatile i64 %8, i64* %11
ret void
}

LLVM IR (-O2):
define void @UARTIntClear(i64 %0, i64 %1) {
%3 = tail call i32 @_UARTBaseValid(i64 %0)
%4 = tail call i32 @ASSERT(i32 %3)
%5 = add nsw i64 %0, 68
%6 = inttoptr i64 %5 to i64*
store volatile i64 %1, i64* %6
ret void
}
/* Type definitions */
struct timeval {
  double tv_sec;
  scalar_t__ tv_usec;
};

/* Variables and functions */
int gettimeofday(struct timeval *, int /*<<< orphan*/ *);
double getdtime(void) {
  struct timeval timev;
  if (gettimeofday(&timev, NULL) == -1)
    return -1;
  return timev.tv_sec + ((double)timev.tv_usec) / 1000000.0;
}


x86 assembly (clang, -O0):
<getdtime>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
lea    -0x18(%rbp),%rdi
xor    %eax,%eax
mov    %eax,%esi
call   1030 <gettimeofday@plt>
cmp    $0xffffffff,%eax
jne    1140 <getdtime+0x30>
movsd  0xed2(%rip),%xmm0
movsd  %xmm0,-0x8(%rbp)
jmp    1160 <getdtime+0x50>
movsd  -0x18(%rbp),%xmm0
cvtsi2sdq -0x10(%rbp),%xmm1
movsd  0xead(%rip),%xmm2
divsd  %xmm2,%xmm1
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<getdtime>:
sub    $0x18,%rsp
lea    0x8(%rsp),%rdi
xor    %esi,%esi
call   1030 <gettimeofday@plt>
cmp    $0xffffffff,%eax
je     113f <getdtime+0x2f>
cvtsi2sdq 0x10(%rsp),%xmm0
divsd  0xed4(%rip),%xmm0
addsd  0x8(%rsp),%xmm0
add    $0x18,%rsp
ret
movsd  0xeb9(%rip),%xmm0
add    $0x18,%rsp
ret

LLVM IR (-O0):
%struct.timeval = type { double, i64 }
define double @getdtime() {
%1 = alloca double
%2 = alloca %struct.timeval
%3 = call i32 @gettimeofday(%struct.timeval* %2, i32* null)
%4 = icmp eq i32 %3, -1
br i1 %4, label %5, label %6
5: ; preds = %0
store double -1.000000e+00, double* %1
br label %14
6: ; preds = %0
%7 = getelementptr inbounds %struct.timeval, %struct.timeval* %2, i32 0, i32 0
%8 = load double, double* %7
%9 = getelementptr inbounds %struct.timeval, %struct.timeval* %2, i32 0, i32 1
%10 = load i64, i64* %9
%11 = sitofp i64 %10 to double
%12 = fdiv double %11, 1.000000e+06
%13 = fadd double %8, %12
store double %13, double* %1
br label %14
14: ; preds = %6, %5
%15 = load double, double* %1
ret double %15
}

LLVM IR (-O2):
%struct.timeval = type { double, i64 }
define double @getdtime() {
%1 = alloca %struct.timeval
%2 = bitcast %struct.timeval* %1 to i8*
%3 = call i32 @gettimeofday(%struct.timeval* %1, i32* null)
%4 = icmp eq i32 %3, -1
br i1 %4, label %13, label %5
5: ; preds = %0
%6 = getelementptr inbounds %struct.timeval, %struct.timeval* %1, i64 0, i32 0
%7 = load double, double* %6
%8 = getelementptr inbounds %struct.timeval, %struct.timeval* %1, i64 0, i32 1
%9 = load i64, i64* %8
%10 = sitofp i64 %9 to double
%11 = fdiv double %10, 1.000000e+06
%12 = fadd double %7, %11
br label %13
13: ; preds = %0, %5
%14 = phi double [ %12, %5 ], [ -1.000000e+00, %0 ]
ret double %14
}
/* Type definitions */
typedef int /*<<< orphan*/ v;
typedef int uint64_t;

/* Variables and functions */
uint64_t swab_64(uint64_t v) {
  uint64_t result = 0;
  size_t i;
  for (i = 0; i < sizeof(v); i++) {
    result <<= 8;
    result |= (v & 0xff);
    v >>= 8;
  }
  return result;
}


x86 assembly (clang, -O0):
<swab_64>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
movq   $0x0,-0x10(%rbp)
cmpq   $0x4,-0x10(%rbp)
jae    1152 <swab_64+0x52>
mov    -0x8(%rbp),%eax
shl    $0x8,%eax
mov    %eax,-0x8(%rbp)
mov    -0x4(%rbp),%eax
and    $0xff,%eax
or     -0x8(%rbp),%eax
mov    %eax,-0x8(%rbp)
mov    -0x4(%rbp),%eax
sar    $0x8,%eax
mov    %eax,-0x4(%rbp)
mov    -0x10(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x10(%rbp)
jmp    1116 <swab_64+0x16>
mov    -0x8(%rbp),%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @swab_64(i32 %0) {
%2 = alloca i32
%3 = alloca i32
%4 = alloca i64
store i32 %0, i32* %2
store i32 0, i32* %3
store i64 0, i64* %4
br label %5
5: ; preds = %17, %1
%6 = load i64, i64* %4
%7 = icmp ult i64 %6, 4
br i1 %7, label %8, label %20
8: ; preds = %5
%9 = load i32, i32* %3
%10 = shl i32 %9, 8
store i32 %10, i32* %3
%11 = load i32, i32* %2
%12 = and i32 %11, 255
%13 = load i32, i32* %3
%14 = or i32 %13, %12
store i32 %14, i32* %3
%15 = load i32, i32* %2
%16 = ashr i32 %15, 8
store i32 %16, i32* %2
br label %17
17: ; preds = %8
%18 = load i64, i64* %4
%19 = add i64 %18, 1
store i64 %19, i64* %4
br label %5
20: ; preds = %5
%21 = load i32, i32* %3
ret i32 %21
}

LLVM IR (-O2):
define i32 @swab_64(i32 %0) {
%2 = call i32 @llvm.bswap.i32(i32 %0)
ret i32 %2
}
/* Variables and functions */
int /*<<< orphan*/ LCD_Out(int, int, char);
int /*<<< orphan*/ limpamlc();
int /*<<< orphan*/ mostraplinha(char);
int /*<<< orphan*/ sprintf(char, char *);
void erro(char plinha, char slinha) {
  limpamlc();
  sprintf(plinha, "Favor pressionar");
  mostraplinha(plinha);
  sprintf(slinha, "apenas numeros");
  LCD_Out(2, 2, slinha);
}


x86 assembly (clang, -O0):
<erro>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %sil,%al
mov    %dil,%cl
mov    %cl,-0x1(%rbp)
mov    %al,-0x2(%rbp)
mov    $0x0,%al
call   1030 <limpamlc@plt>
lea    0xe9e(%rip),%rsi
movsbl -0x1(%rbp),%edi
call   1050 <sprintf@plt>
movsbl -0x1(%rbp),%edi
call   1060 <mostraplinha@plt>
lea    0xe96(%rip),%rsi
movsbl -0x2(%rbp),%edi
call   1050 <sprintf@plt>
mov    $0x2,%esi
mov    %esi,%edi
movsbl -0x2(%rbp),%edx
call   1040 <LCD_Out@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<erro>:
push   %rbp
push   %rbx
push   %rax
mov    %esi,%ebx
mov    %edi,%ebp
xor    %eax,%eax
call   1030 <limpamlc@plt>
lea    0xeab(%rip),%rsi
mov    %ebp,%edi
call   1050 <sprintf@plt>
mov    %ebp,%edi
call   1060 <mostraplinha@plt>
lea    0xea7(%rip),%rsi
mov    %ebx,%edi
call   1050 <sprintf@plt>
mov    $0x2,%edi
mov    $0x2,%esi
mov    %ebx,%edx
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    1040 <LCD_Out@plt>

LLVM IR (-O0):
@.str = [17 x i8] c"Favor pressionar\00"
@.str.1 = [15 x i8] c"apenas numeros\00"
define void @erro(i8 signext %0, i8 signext %1) {
%3 = alloca i8
%4 = alloca i8
store i8 %0, i8* %3
store i8 %1, i8* %4
%5 = call i32 (...) @limpamlc()
%6 = load i8, i8* %3
%7 = call i32 @sprintf(i8 signext %6, i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0))
%8 = load i8, i8* %3
%9 = call i32 @mostraplinha(i8 signext %8)
%10 = load i8, i8* %4
%11 = call i32 @sprintf(i8 signext %10, i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.1, i64 0, i64 0))
%12 = load i8, i8* %4
%13 = call i32 @LCD_Out(i32 2, i32 2, i8 signext %12)
ret void
}

LLVM IR (-O2):
@.str = [17 x i8] c"Favor pressionar\00"
@.str.1 = [15 x i8] c"apenas numeros\00"
define void @erro(i8 signext %0, i8 signext %1) {
%3 = tail call i32 (...) @limpamlc()
%4 = tail call i32 @sprintf(i8 signext %0, i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0))
%5 = tail call i32 @mostraplinha(i8 signext %0)
%6 = tail call i32 @sprintf(i8 signext %1, i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.1, i64 0, i64 0))
%7 = tail call i32 @LCD_Out(i32 2, i32 2, i8 signext %1)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ memset(void *, int /*<<< orphan*/, size_t);
void *tor_alloc(size_t);
void *tor_new(size_t size) {
  void *self = tor_alloc(size);
  memset(self, 0, size);
  return self;
}


x86 assembly (clang, -O0):
<tor_new>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <tor_alloc@plt>
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x8(%rbp),%rdx
xor    %esi,%esi
call   1040 <memset@plt>
mov    -0x10(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<tor_new>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%r14
call   1030 <tor_alloc@plt>
mov    %rax,%rbx
mov    %rax,%rdi
xor    %esi,%esi
mov    %r14,%rdx
call   1040 <memset@plt>
mov    %rbx,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define i8* @tor_new(i64 %0) {
%2 = alloca i64
%3 = alloca i8*
store i64 %0, i64* %2
%4 = load i64, i64* %2
%5 = call i8* @tor_alloc(i64 %4)
store i8* %5, i8** %3
%6 = load i8*, i8** %3
%7 = load i64, i64* %2
%8 = call i32 @memset(i8* %6, i32 0, i64 %7)
%9 = load i8*, i8** %3
ret i8* %9
}

LLVM IR (-O2):
define i8* @tor_new(i64 %0) {
%2 = tail call i8* @tor_alloc(i64 %0)
%3 = tail call i32 @memset(i8* %2, i32 0, i64 %0)
ret i8* %2
}
void out_short(char *c, short s) {
  *c++ = (s >> 8) & 0xff;
  *c = s & 0xff;
}


x86 assembly (clang, -O0):
<out_short>:
push   %rbp
mov    %rsp,%rbp
mov    %si,%ax
mov    %rdi,-0x8(%rbp)
mov    %ax,-0xa(%rbp)
movswl -0xa(%rbp),%eax
sar    $0x8,%eax
and    $0xff,%eax
mov    %al,%cl
mov    -0x8(%rbp),%rax
mov    %rax,%rdx
add    $0x1,%rdx
mov    %rdx,-0x8(%rbp)
mov    %cl,(%rax)
movswl -0xa(%rbp),%eax
and    $0xff,%eax
mov    %al,%cl
mov    -0x8(%rbp),%rax
mov    %cl,(%rax)
pop    %rbp
ret

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

LLVM IR (-O0):
define void @out_short(i8* %0, i16 signext %1) {
%3 = alloca i8*
%4 = alloca i16
store i8* %0, i8** %3
store i16 %1, i16* %4
%5 = load i16, i16* %4
%6 = sext i16 %5 to i32
%7 = ashr i32 %6, 8
%8 = and i32 %7, 255
%9 = trunc i32 %8 to i8
%10 = load i8*, i8** %3
%11 = getelementptr inbounds i8, i8* %10, i32 1
store i8* %11, i8** %3
store i8 %9, i8* %10
%12 = load i16, i16* %4
%13 = sext i16 %12 to i32
%14 = and i32 %13, 255
%15 = trunc i32 %14 to i8
%16 = load i8*, i8** %3
store i8 %15, i8* %16
ret void
}

LLVM IR (-O2):
define void @out_short(i8* nocapture writeonly %0, i16 signext %1) {
%3 = lshr i16 %1, 8
%4 = trunc i16 %3 to i8
%5 = getelementptr inbounds i8, i8* %0, i64 1
store i8 %4, i8* %0
%6 = trunc i16 %1 to i8
store i8 %6, i8* %5
ret void
}
/* Variables and functions */
char *gs_r_reject(char *, char const *);
char *gs_c_rtrim(char *str, const char *reject) {
  char *s = gs_r_reject(str, reject);
  if (!s) {
    *str = 0;
    return str;
  }
  s[1] = 0;
  return str;
}


x86 assembly (clang, -O0):
<gs_c_rtrim>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x18(%rbp),%rsi
call   1030 <gs_r_reject@plt>
mov    %rax,-0x20(%rbp)
cmpq   $0x0,-0x20(%rbp)
jne    1150 <gs_c_rtrim+0x40>
mov    -0x10(%rbp),%rax
movb   $0x0,(%rax)
mov    -0x10(%rbp),%rax
mov    %rax,-0x8(%rbp)
jmp    1160 <gs_c_rtrim+0x50>
mov    -0x20(%rbp),%rax
movb   $0x0,0x1(%rax)
mov    -0x10(%rbp),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<gs_c_rtrim>:
push   %rbx
mov    %rdi,%rbx
call   1030 <gs_r_reject@plt>
lea    0x1(%rax),%rcx
test   %rax,%rax
cmove  %rbx,%rcx
movb   $0x0,(%rcx)
mov    %rbx,%rax
pop    %rbx
ret

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

LLVM IR (-O2):
define i8* @gs_c_rtrim(i8* returned %0, i8* %1) {
%3 = tail call i8* @gs_r_reject(i8* %0, i8* %1)
%4 = icmp eq i8* %3, null
%5 = getelementptr inbounds i8, i8* %3, i64 1
%6 = select i1 %4, i8* %0, i8* %5
store i8 0, i8* %6
ret i8* %0
}
/* Type definitions */
typedef int /*<<< orphan*/ uint32_t;

/* Variables and functions */
int /*<<< orphan*/ internal_fiat_poly1305_carry_square(uintptr_t, uintptr_t);
void fiat_poly1305_carry_square(uint32_t out1[5], const uint32_t arg1[5]) {
  internal_fiat_poly1305_carry_square((uintptr_t)out1, (uintptr_t)arg1);
}


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

x86 assembly (clang, -O2):
<fiat_poly1305_carry_square>:
jmp    1030 <internal_fiat_poly1305_carry_square@plt>

LLVM IR (-O0):
define void @fiat_poly1305_carry_square(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 = ptrtoint i32* %5 to i64
%7 = load i32*, i32** %4
%8 = ptrtoint i32* %7 to i64
%9 = call i32 @internal_fiat_poly1305_carry_square(i64 %6, i64 %8)
ret void
}

LLVM IR (-O2):
define void @fiat_poly1305_carry_square(i32* %0, i32* %1) {
%3 = ptrtoint i32* %0 to i64
%4 = ptrtoint i32* %1 to i64
%5 = tail call i32 @internal_fiat_poly1305_carry_square(i64 %3, i64 %4)
ret void
}
/* Variables and functions */
void *ft_memchr(const void *s, int c, size_t n) {
  unsigned char *tail;
  tail = (unsigned char *)s;
  while (n-- > 0)
    if (*tail++ == (unsigned char)c)
      return ((void *)(tail - 1));
  return (NULL);
}


x86 assembly (clang, -O0):
<ft_memchr>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    %esi,-0x14(%rbp)
mov    %rdx,-0x20(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x28(%rbp)
mov    -0x20(%rbp),%rax
mov    %rax,%rcx
add    $0xffffffffffffffff,%rcx
mov    %rcx,-0x20(%rbp)
cmp    $0x0,%rax
jbe    1166 <ft_memchr+0x66>
mov    -0x28(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x28(%rbp)
movzbl (%rax),%eax
mov    -0x14(%rbp),%ecx
movzbl %cl,%ecx
cmp    %ecx,%eax
jne    1161 <ft_memchr+0x61>
mov    -0x28(%rbp),%rax
add    $0xffffffffffffffff,%rax
mov    %rax,-0x8(%rbp)
jmp    116e <ft_memchr+0x6e>
jmp    1117 <ft_memchr+0x17>
movq   $0x0,-0x8(%rbp)
mov    -0x8(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<ft_memchr>:
add    $0xffffffffffffffff,%rdi
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
sub    $0x1,%rdx
jb     1124 <ft_memchr+0x24>
lea    0x1(%rdi),%rax
cmp    %sil,0x1(%rdi)
mov    %rax,%rdi
jne    1110 <ft_memchr+0x10>
ret
xor    %eax,%eax
ret

LLVM IR (-O0):
define i8* @ft_memchr(i8* %0, i32 %1, i64 %2) {
%4 = alloca i8*
%5 = alloca i8*
%6 = alloca i32
%7 = alloca i64
%8 = alloca i8*
store i8* %0, i8** %5
store i32 %1, i32* %6
store i64 %2, i64* %7
%9 = load i8*, i8** %5
store i8* %9, i8** %8
br label %10
10: ; preds = %26, %3
%11 = load i64, i64* %7
%12 = add i64 %11, -1
store i64 %12, i64* %7
%13 = icmp ugt i64 %11, 0
br i1 %13, label %14, label %27
14: ; preds = %10
%15 = load i8*, i8** %8
%16 = getelementptr inbounds i8, i8* %15, i32 1
store i8* %16, i8** %8
%17 = load i8, i8* %15
%18 = zext i8 %17 to i32
%19 = load i32, i32* %6
%20 = trunc i32 %19 to i8
%21 = zext i8 %20 to i32
%22 = icmp eq i32 %18, %21
br i1 %22, label %23, label %26
23: ; preds = %14
%24 = load i8*, i8** %8
%25 = getelementptr inbounds i8, i8* %24, i64 -1
store i8* %25, i8** %4
br label %28
26: ; preds = %14
br label %10
27: ; preds = %10
store i8* null, i8** %4
br label %28
28: ; preds = %27, %23
%29 = load i8*, i8** %4
ret i8* %29
}

LLVM IR (-O2):
define i8* @ft_memchr(i8* %0, i32 %1, i64 %2) {
%4 = trunc i32 %1 to i8
br label %5
5: ; preds = %9, %3
%6 = phi i64 [ %2, %3 ], [ %10, %9 ]
%7 = phi i8* [ %0, %3 ], [ %11, %9 ]
%8 = icmp eq i64 %6, 0
br i1 %8, label %14, label %9
9: ; preds = %5
%10 = add i64 %6, -1
%11 = getelementptr inbounds i8, i8* %7, i64 1
%12 = load i8, i8* %7
%13 = icmp eq i8 %12, %4
br i1 %13, label %14, label %5
14: ; preds = %5, %9
%15 = phi i8* [ %7, %9 ], [ null, %5 ]
ret i8* %15
}
/* Variables and functions */
size_t atomic_add_return(size_t *, int);
size_t atomic_dec_return(size_t *x) { return atomic_add_return(x, -1); }


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

x86 assembly (clang, -O2):
<atomic_dec_return>:
mov    $0xffffffff,%esi
jmp    1030 <atomic_add_return@plt>

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

LLVM IR (-O2):
define i64 @atomic_dec_return(i64* %0) {
%2 = tail call i64 @atomic_add_return(i64* %0, i32 -1)
ret i64 %2
}
/* Variables and functions */
double fmod(double, double);
double my_fmod(double x, double y) { return fmod(x, y); }


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

x86 assembly (clang, -O2):
<my_fmod>:
jmp    1030 <fmod@plt>

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

LLVM IR (-O2):
define double @my_fmod(double %0, double %1) {
%3 = tail call double @fmod(double %0, double %1)
ret double %3
}
/* Variables and functions */
int next_utf8(char const *, int *);
int fn_ch_34(const char *text) {
  int pos = 0;
  if (next_utf8(text, &pos) == 34)
    return pos;
  return -1;
}


x86 assembly (clang, -O0):
<fn_ch_34>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
mov    -0x10(%rbp),%rdi
lea    -0x14(%rbp),%rsi
call   1030 <next_utf8@plt>
cmp    $0x22,%eax
jne    1144 <fn_ch_34+0x34>
mov    -0x14(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    114b <fn_ch_34+0x3b>
movl   $0xffffffff,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fn_ch_34>:
push   %rax
movl   $0x0,0x4(%rsp)
lea    0x4(%rsp),%rsi
call   1030 <next_utf8@plt>
mov    %eax,%ecx
mov    $0xffffffff,%eax
cmp    $0x22,%ecx
jne    1133 <fn_ch_34+0x23>
mov    0x4(%rsp),%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @fn_ch_34(i8* %0) {
%2 = alloca i32
%3 = alloca i8*
%4 = alloca i32
store i8* %0, i8** %3
store i32 0, i32* %4
%5 = load i8*, i8** %3
%6 = call i32 @next_utf8(i8* %5, i32* %4)
%7 = icmp eq i32 %6, 34
br i1 %7, label %8, label %10
8: ; preds = %1
%9 = load i32, i32* %4
store i32 %9, i32* %2
br label %11
10: ; preds = %1
store i32 -1, i32* %2
br label %11
11: ; preds = %10, %8
%12 = load i32, i32* %2
ret i32 %12
}

LLVM IR (-O2):
define i32 @fn_ch_34(i8* %0) {
%2 = alloca i32
%3 = bitcast i32* %2 to i8*
store i32 0, i32* %2
%4 = call i32 @next_utf8(i8* %0, i32* %2)
%5 = icmp eq i32 %4, 34
%6 = load i32, i32* %2
%7 = select i1 %5, i32 %6, i32 -1
ret i32 %7
}
/* Variables and functions */
int U_PMR_NODATAREC_print(char const *);
int U_PMR_STROKEFILLPATH_print(const char *contents) {
  return (U_PMR_NODATAREC_print(contents));
}


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

x86 assembly (clang, -O2):
<U_PMR_STROKEFILLPATH_print>:
jmp    1030 <U_PMR_NODATAREC_print@plt>

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

LLVM IR (-O2):
define i32 @U_PMR_STROKEFILLPATH_print(i8* %0) {
%2 = tail call i32 @U_PMR_NODATAREC_print(i8* %0)
ret i32 %2
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void print_failure(void) {
  printf("  <h1>Try again</h1>\n"
         "  <p>Your username and password could not authenticate you. "
         "You may <a href=\"login.html\">try again</a> or "
         "return to <a href=\"index.html\">the front page</a>."
         "</p>\n");
}


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

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

LLVM IR (-O0):
@.str = [183 x i8] c" <h1>Try again</h1>\0A <p>Your username and password could not authenticate you. You may <a href=\22login.html\22>try again</a> or return to <a href=\22index.html\22>the front page</a>.</p>\0A\00"
define void @print_failure() {
%1 = call i32 @printf(i8* getelementptr inbounds ([183 x i8], [183 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@str = [182 x i8] c" <h1>Try again</h1>\0A <p>Your username and password could not authenticate you. You may <a href=\22login.html\22>try again</a> or return to <a href=\22index.html\22>the front page</a>.</p>\00"
define void @print_failure() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([182 x i8], [182 x i8]* @str, i64 0, i64 0))
ret void
}
void(ata_scsi_dump_cdb)(struct ata_port *ap, struct scsi_cmnd *cmd) {
  { return; }
}


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

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

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

LLVM IR (-O2):
%struct.ata_port = type opaque
%struct.scsi_cmnd = type opaque
define void @ata_scsi_dump_cdb(%struct.ata_port* nocapture %0, %struct.scsi_cmnd* nocapture %1) {
ret void
}
/* Variables and functions */
int pow(float, int);
float f_prime(float x) { return 3 * pow(x, 2) + 6 * x; }


x86 assembly (clang, -O0):
<f_prime>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movss  %xmm0,-0x4(%rbp)
movss  -0x4(%rbp),%xmm0
mov    $0x2,%edi
call   1030 <pow@plt>
imul   $0x3,%eax,%eax
cvtsi2ss %eax,%xmm1
movss  -0x4(%rbp),%xmm0
movss  0xec0(%rip),%xmm2
mulss  %xmm2,%xmm0
addss  %xmm1,%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<f_prime>:
push   %rax
movss  %xmm0,0x4(%rsp)
mov    $0x2,%edi
call   1030 <pow@plt>
lea    (%rax,%rax,2),%eax
cvtsi2ss %eax,%xmm1
movss  0x4(%rsp),%xmm0
mulss  0xeca(%rip),%xmm0
addss  %xmm1,%xmm0
pop    %rax
ret

LLVM IR (-O0):
define float @f_prime(float %0) {
%2 = alloca float
store float %0, float* %2
%3 = load float, float* %2
%4 = call i32 @pow(float %3, i32 2)
%5 = mul nsw i32 3, %4
%6 = sitofp i32 %5 to float
%7 = load float, float* %2
%8 = call float @llvm.fmuladd.f32(float 6.000000e+00, float %7, float %6)
ret float %8
}

LLVM IR (-O2):
define float @f_prime(float %0) {
%2 = tail call i32 @pow(float %0, i32 2)
%3 = mul nsw i32 %2, 3
%4 = sitofp i32 %3 to float
%5 = tail call float @llvm.fmuladd.f32(float %0, float 6.000000e+00, float %4)
ret float %5
}
/* Variables and functions */
void *calloc(int, int);
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ yyerror(char *);
void *alloc(int nbytes) {
  void *p = calloc(1, nbytes);
  if (p == NULL) {
    yyerror("out of memory\n");
    exit(1);
  }
  return p;
}


x86 assembly (clang, -O0):
<alloc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%esi
mov    $0x1,%edi
call   1040 <calloc@plt>
mov    %rax,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
jne    116d <alloc+0x3d>
lea    0xea2(%rip),%rdi
call   1030 <yyerror@plt>
mov    $0x1,%edi
call   1050 <exit@plt>
mov    -0x10(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<alloc>:
push   %rax
mov    %edi,%esi
mov    $0x1,%edi
call   1040 <calloc@plt>
test   %rax,%rax
je     1144 <alloc+0x14>
pop    %rcx
ret
lea    0xeb5(%rip),%rdi
call   1030 <yyerror@plt>
mov    $0x1,%edi
call   1050 <exit@plt>

LLVM IR (-O0):
@.str = [15 x i8] c"out of memory\0A\00"
define i8* @alloc(i32 %0) {
%2 = alloca i32
%3 = alloca i8*
store i32 %0, i32* %2
%4 = load i32, i32* %2
%5 = call i8* @calloc(i32 1, i32 %4)
store i8* %5, i8** %3
%6 = load i8*, i8** %3
%7 = icmp eq i8* %6, null
br i1 %7, label %8, label %11
8: ; preds = %1
%9 = call i32 @yyerror(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0))
%10 = call i32 @exit(i32 1)
unreachable
11: ; preds = %1
%12 = load i8*, i8** %3
ret i8* %12
}

LLVM IR (-O2):
@.str = [15 x i8] c"out of memory\0A\00"
define noalias i8* @alloc(i32 %0) {
%2 = tail call i8* @calloc(i32 1, i32 %0)
%3 = icmp eq i8* %2, null
br i1 %3, label %4, label %7
4: ; preds = %1
%5 = tail call i32 @yyerror(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0))
%6 = tail call i32 @exit(i32 1)
unreachable
7: ; preds = %1
ret i8* %2
}
/* Type definitions */
struct spi_transaction_dev {
  int dummy;
};

/* Variables and functions */
int do_transaction(struct spi_transaction_dev *, unsigned int, unsigned int,
                   unsigned char *, int);
int spi_transaction_read(struct spi_transaction_dev *dev, unsigned int addr,
                         unsigned int size, unsigned char *data) {
  return do_transaction(dev, addr, size, data, (size > 4) ? 0x14 : 0x10);
}


x86 assembly (clang, -O0):
<spi_transaction_read>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    %rcx,-0x18(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
mov    -0x10(%rbp),%edx
mov    -0x18(%rbp),%rcx
mov    -0x10(%rbp),%r9d
mov    $0x10,%r8d
mov    $0x14,%eax
cmp    $0x4,%r9d
cmova  %eax,%r8d
call   1030 <do_transaction@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<spi_transaction_read>:
xor    %eax,%eax
cmp    $0x5,%edx
setae  %al
lea    0x10(,%rax,4),%r8d
jmp    1030 <do_transaction@plt>

LLVM IR (-O0):
%struct.spi_transaction_dev = type { i32 }
define i32 @spi_transaction_read(%struct.spi_transaction_dev* %0, i32 %1, i32 %2, i8* %3) {
%5 = alloca %struct.spi_transaction_dev*
%6 = alloca i32
%7 = alloca i32
%8 = alloca i8*
store %struct.spi_transaction_dev* %0, %struct.spi_transaction_dev** %5
store i32 %1, i32* %6
store i32 %2, i32* %7
store i8* %3, i8** %8
%9 = load %struct.spi_transaction_dev*, %struct.spi_transaction_dev** %5
%10 = load i32, i32* %6
%11 = load i32, i32* %7
%12 = load i8*, i8** %8
%13 = load i32, i32* %7
%14 = icmp ugt i32 %13, 4
%15 = zext i1 %14 to i64
%16 = select i1 %14, i32 20, i32 16
%17 = call i32 @do_transaction(%struct.spi_transaction_dev* %9, i32 %10, i32 %11, i8* %12, i32 %16)
ret i32 %17
}

LLVM IR (-O2):
%struct.spi_transaction_dev = type { i32 }
define i32 @spi_transaction_read(%struct.spi_transaction_dev* %0, i32 %1, i32 %2, i8* %3) {
%5 = icmp ugt i32 %2, 4
%6 = select i1 %5, i32 20, i32 16
%7 = tail call i32 @do_transaction(%struct.spi_transaction_dev* %0, i32 %1, i32 %2, i8* %3, i32 %6)
ret i32 %7
}
/* Variables and functions */
#define AF_INET 129
#define AF_INET6 128
int addr_max_prefix_len(int ai_family) {
  switch (ai_family) {
  case AF_INET:
    return 32;
  case AF_INET6:
    return 128;
  }
  return 0;
}


x86 assembly (clang, -O0):
<addr_max_prefix_len>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
mov    -0x8(%rbp),%eax
mov    %eax,-0xc(%rbp)
sub    $0x80,%eax
je     113c <addr_max_prefix_len+0x3c>
jmp    111d <addr_max_prefix_len+0x1d>
mov    -0xc(%rbp),%eax
sub    $0x81,%eax
jne    1148 <addr_max_prefix_len+0x48>
jmp    1130 <addr_max_prefix_len+0x30>
movl   $0x20,-0x4(%rbp)
jmp    114f <addr_max_prefix_len+0x4f>
movl   $0x80,-0x4(%rbp)
jmp    114f <addr_max_prefix_len+0x4f>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<addr_max_prefix_len>:
xor    %ecx,%ecx
cmp    $0x80,%edi
sete   %cl
shl    $0x7,%ecx
cmp    $0x81,%edi
mov    $0x20,%eax
cmovne %ecx,%eax
ret

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

LLVM IR (-O2):
define i32 @addr_max_prefix_len(i32 %0) {
%2 = icmp eq i32 %0, 128
%3 = select i1 %2, i32 128, i32 0
%4 = icmp eq i32 %0, 129
%5 = select i1 %4, i32 32, i32 %3
ret i32 %5
}
int d_bge_rr1(double a1, double a2) {
  return (__builtin_isgreaterequal(a1, a2));
}


x86 assembly (clang, -O0):
<d_bge_rr1>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  -0x8(%rbp),%xmm0
ucomisd -0x10(%rbp),%xmm0
setae  %al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<d_bge_rr1>:
xor    %eax,%eax
ucomisd %xmm1,%xmm0
setae  %al
ret

LLVM IR (-O0):
define i32 @d_bge_rr1(double %0, double %1) {
%3 = alloca double
%4 = alloca double
store double %0, double* %3
store double %1, double* %4
%5 = load double, double* %3
%6 = load double, double* %4
%7 = fcmp oge double %5, %6
%8 = zext i1 %7 to i32
ret i32 %8
}

LLVM IR (-O2):
define i32 @d_bge_rr1(double %0, double %1) {
%3 = fcmp oge double %0, %1
%4 = zext i1 %3 to i32
ret i32 %4
}
/* Type definitions */
struct drm_device {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ mdelay(int);
extern void cdv_intel_wait_for_vblank(struct drm_device *dev) { mdelay(20); }


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

x86 assembly (clang, -O2):
<cdv_intel_wait_for_vblank>:
mov    $0x14,%edi
jmp    1030 <mdelay@plt>

LLVM IR (-O0):
%struct.drm_device = type { i32 }
define void @cdv_intel_wait_for_vblank(%struct.drm_device* %0) {
%2 = alloca %struct.drm_device*
store %struct.drm_device* %0, %struct.drm_device** %2
%3 = call i32 @mdelay(i32 20)
ret void
}

LLVM IR (-O2):
%struct.drm_device = type { i32 }
define void @cdv_intel_wait_for_vblank(%struct.drm_device* nocapture readnone %0) {
%2 = tail call i32 @mdelay(i32 20)
ret void
}
void i2c4_iomux_config() {}


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

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

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

LLVM IR (-O2):
define void @i2c4_iomux_config() {
ret void
}
/* Variables and functions */
int find_the_first_only_one_char(char *);
int /*<<< orphan*/ printf(char *, int);
int main() {
  char str[10] = "ababcdcef";
  printf("%c", find_the_first_only_one_char(str));
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    0xeca(%rip),%rax
mov    %rax,-0xe(%rbp)
mov    0xec7(%rip),%ax
mov    %ax,-0x6(%rbp)
lea    -0xe(%rbp),%rdi
call   1040 <find_the_first_only_one_char@plt>
mov    %eax,%esi
lea    0xeb3(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
sub    $0x18,%rsp
movabs $0x6563646362616261,%rax
64 63 65
mov    %rax,0x8(%rsp)
movw   $0x66,0x10(%rsp)
lea    0x8(%rsp),%rdi
call   1040 <find_the_first_only_one_char@plt>
lea    0xebf(%rip),%rdi
mov    %eax,%esi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x18,%rsp
ret

LLVM IR (-O0):
@__const.main.str = [10 x i8] c"ababcdcef\00"
@.str = [3 x i8] c"%c\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca [10 x i8]
store i32 0, i32* %1
%3 = bitcast [10 x i8]* %2 to i8*
%4 = getelementptr inbounds [10 x i8], [10 x i8]* %2, i64 0, i64 0
%5 = call i32 @find_the_first_only_one_char(i8* %4)
%6 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 %5)
ret i32 0
}

LLVM IR (-O2):
@__const.main.str = [10 x i8] c"ababcdcef\00"
@.str = [3 x i8] c"%c\00"
define i32 @main() {
%1 = alloca [10 x i8]
%2 = getelementptr inbounds [10 x i8], [10 x i8]* %1, i64 0, i64 0
%3 = call i32 @find_the_first_only_one_char(i8* %2)
%4 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 %3)
ret i32 0
}
void PWMGenDisable(unsigned long ulBase, unsigned long ulGen) {
  ;
  ;
  (*((volatile unsigned long *)(((ulBase) + (+ulGen)) + 0x00000000))) &=
      ~(0x00000001);
}


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

x86 assembly (clang, -O2):
<PWMGenDisable>:
andq   $0xfffffffffffffffe,(%rsi,%rdi,1)
ret

LLVM IR (-O0):
define void @PWMGenDisable(i64 %0, i64 %1) {
%3 = alloca i64
%4 = alloca i64
store i64 %0, i64* %3
store i64 %1, i64* %4
%5 = load i64, i64* %3
%6 = load i64, i64* %4
%7 = add i64 %5, %6
%8 = add i64 %7, 0
%9 = inttoptr i64 %8 to i64*
%10 = load volatile i64, i64* %9
%11 = and i64 %10, -2
store volatile i64 %11, i64* %9
ret void
}

LLVM IR (-O2):
define void @PWMGenDisable(i64 %0, i64 %1) {
%3 = add i64 %1, %0
%4 = inttoptr i64 %3 to i64*
%5 = load volatile i64, i64* %4
%6 = and i64 %5, -2
store volatile i64 %6, i64* %4
ret void
}
double sequence_sum_geometric(long n, double nfirst, double nlast) {
  double sum_results = n * (nfirst + nlast) / 2;
  return sum_results;
}


x86 assembly (clang, -O0):
<sequence_sum_geometric>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movsd  %xmm0,-0x10(%rbp)
movsd  %xmm1,-0x18(%rbp)
cvtsi2sdq -0x8(%rbp),%xmm0
movsd  -0x10(%rbp),%xmm1
addsd  -0x18(%rbp),%xmm1
mulsd  %xmm1,%xmm0
movsd  0xed2(%rip),%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x20(%rbp)
movsd  -0x20(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<sequence_sum_geometric>:
cvtsi2sd %rdi,%xmm2
addsd  %xmm1,%xmm0
mulsd  %xmm2,%xmm0
mulsd  0xeeb(%rip),%xmm0
ret

LLVM IR (-O0):
define double @sequence_sum_geometric(i64 %0, double %1, double %2) {
%4 = alloca i64
%5 = alloca double
%6 = alloca double
%7 = alloca double
store i64 %0, i64* %4
store double %1, double* %5
store double %2, double* %6
%8 = load i64, i64* %4
%9 = sitofp i64 %8 to double
%10 = load double, double* %5
%11 = load double, double* %6
%12 = fadd double %10, %11
%13 = fmul double %9, %12
%14 = fdiv double %13, 2.000000e+00
store double %14, double* %7
%15 = load double, double* %7
ret double %15
}

LLVM IR (-O2):
define double @sequence_sum_geometric(i64 %0, double %1, double %2) {
%4 = sitofp i64 %0 to double
%5 = fadd double %1, %2
%6 = fmul double %5, %4
%7 = fmul double %6, 5.000000e-01
ret double %7
}