xunge/DecIR huggingface dataset:
/* Type definitions */
typedef int /*<<< orphan*/ uint8_t;
typedef int /*<<< orphan*/ uint16_t;

/* Variables and functions */
int /*<<< orphan*/ little_endian_read_16(int /*<<< orphan*/ const *, int);
uint16_t hci_event_mode_change_event_get_interval(const uint8_t *event) {
  return little_endian_read_16(event, 6);
}


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

x86 assembly (clang, -O2):
<hci_event_mode_change_event_get_interval>:
mov    $0x6,%esi
jmp    1030 <little_endian_read_16@plt>

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

LLVM IR (-O2):
define i32 @hci_event_mode_change_event_get_interval(i32* %0) {
%2 = tail call i32 @little_endian_read_16(i32* %0, i32 6)
ret i32 %2
}
unsigned popcount32(unsigned x) { return __builtin_popcount(x); }


x86 assembly (clang, -O0):
<popcount32>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%ecx
mov    %ecx,%eax
shr    %eax
and    $0x55555555,%eax
sub    %eax,%ecx
mov    %ecx,%eax
and    $0x33333333,%eax
shr    $0x2,%ecx
and    $0x33333333,%ecx
add    %ecx,%eax
mov    %eax,%ecx
shr    $0x4,%ecx
add    %ecx,%eax
and    $0xf0f0f0f,%eax
imul   $0x1010101,%eax,%eax
shr    $0x18,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<popcount32>:
mov    %edi,%eax
shr    %eax
and    $0x55555555,%eax
sub    %eax,%edi
mov    %edi,%eax
and    $0x33333333,%eax
shr    $0x2,%edi
and    $0x33333333,%edi
add    %eax,%edi
mov    %edi,%eax
shr    $0x4,%eax
add    %edi,%eax
and    $0xf0f0f0f,%eax
imul   $0x1010101,%eax,%eax
shr    $0x18,%eax
ret

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

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

/* Variables and functions */
int __cpu_to_le16(int);
int ieee80211_is_assoc_req(__le16 fc) {
  return (fc & __cpu_to_le16(0x000c | 0x00f0)) ==
         __cpu_to_le16(0x0000 | 0x0000);
}


x86 assembly (clang, -O0):
<ieee80211_is_assoc_req>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    $0xfc,%edi
call   1030 <__cpu_to_le16@plt>
mov    %eax,%ecx
mov    -0xc(%rbp),%eax
and    %ecx,%eax
mov    %eax,-0x8(%rbp)
xor    %edi,%edi
call   1030 <__cpu_to_le16@plt>
mov    %eax,%ecx
mov    -0x8(%rbp),%eax
cmp    %ecx,%eax
sete   %al
and    $0x1,%al
movzbl %al,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ieee80211_is_assoc_req>:
push   %rbp
push   %rbx
push   %rax
mov    %edi,%ebx
mov    $0xfc,%edi
call   1030 <__cpu_to_le16@plt>
mov    %eax,%ebp
and    %ebx,%ebp
xor    %edi,%edi
call   1030 <__cpu_to_le16@plt>
xor    %ecx,%ecx
cmp    %eax,%ebp
sete   %cl
mov    %ecx,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
define i32 @ieee80211_is_assoc_req(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = call i32 @__cpu_to_le16(i32 252)
%5 = and i32 %3, %4
%6 = call i32 @__cpu_to_le16(i32 0)
%7 = icmp eq i32 %5, %6
%8 = zext i1 %7 to i32
ret i32 %8
}

LLVM IR (-O2):
define i32 @ieee80211_is_assoc_req(i32 %0) {
%2 = tail call i32 @__cpu_to_le16(i32 252)
%3 = and i32 %2, %0
%4 = tail call i32 @__cpu_to_le16(i32 0)
%5 = icmp eq i32 %3, %4
%6 = zext i1 %5 to i32
ret i32 %6
}
/* Variables and functions */
int /*<<< orphan*/ esc(char *);
void decdhl(int lower) {
  if (lower)
    esc("#4");
  else
    esc("#3");
}


x86 assembly (clang, -O0):
<decdhl>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
cmpl   $0x0,-0x4(%rbp)
je     1136 <decdhl+0x26>
lea    0xed4(%rip),%rdi
call   1030 <esc@plt>
jmp    1142 <decdhl+0x32>
lea    0xec6(%rip),%rdi
call   1030 <esc@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<decdhl>:
test   %edi,%edi
lea    0xeea(%rip),%rax
lea    0xee0(%rip),%rdi
cmove  %rax,%rdi
jmp    1030 <esc@plt>

LLVM IR (-O0):
@.str = [3 x i8] c"\00"
@.str.1 = [3 x i8] c"\00"
define void @decdhl(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = icmp ne i32 %3, 0
br i1 %4, label %5, label %7
5: ; preds = %1
%6 = call i32 @esc(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0))
br label %9
7: ; preds = %1
%8 = call i32 @esc(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0))
br label %9
9: ; preds = %7, %5
ret void
}

LLVM IR (-O2):
@.str = [3 x i8] c"\00"
@.str.1 = [3 x i8] c"\00"
define void @decdhl(i32 %0) {
%2 = icmp eq i32 %0, 0
%3 = select i1 %2, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0)
%4 = tail call i32 @esc(i8* %3)
ret void
}
float CG_OpFuncXOR(const float a, const float b) { return (int)a ^ (int)b; }


x86 assembly (clang, -O0):
<CG_OpFuncXOR>:
push   %rbp
mov    %rsp,%rbp
movss  %xmm0,-0x4(%rbp)
movss  %xmm1,-0x8(%rbp)
cvttss2si -0x4(%rbp),%eax
cvttss2si -0x8(%rbp),%ecx
xor    %ecx,%eax
cvtsi2ss %eax,%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<CG_OpFuncXOR>:
cvttss2si %xmm0,%eax
cvttss2si %xmm1,%ecx
xor    %eax,%ecx
xorps  %xmm0,%xmm0
cvtsi2ss %ecx,%xmm0
ret

LLVM IR (-O0):
define float @CG_OpFuncXOR(float %0, float %1) {
%3 = alloca float
%4 = alloca float
store float %0, float* %3
store float %1, float* %4
%5 = load float, float* %3
%6 = fptosi float %5 to i32
%7 = load float, float* %4
%8 = fptosi float %7 to i32
%9 = xor i32 %6, %8
%10 = sitofp i32 %9 to float
ret float %10
}

LLVM IR (-O2):
define float @CG_OpFuncXOR(float %0, float %1) {
%3 = fptosi float %0 to i32
%4 = fptosi float %1 to i32
%5 = xor i32 %4, %3
%6 = sitofp i32 %5 to float
ret float %6
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ puts(char *);
submenu_adquisicion(void) {
  puts("1. Compra");
  puts("2. Reserva");
  puts("3. Cancelar pasaje");
  puts("4. Volver al menu principal\n\n");
  printf("Opcion: ");
}


x86 assembly (clang, -O0):
<submenu_adquisicion>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    0xed1(%rip),%rdi
call   1030 <puts@plt>
lea    0xecf(%rip),%rdi
call   1030 <puts@plt>
lea    0xece(%rip),%rdi
call   1030 <puts@plt>
lea    0xed5(%rip),%rdi
call   1030 <puts@plt>
lea    0xee7(%rip),%rdi
call   1040 <printf@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<submenu_adquisicion>:
push   %rax
lea    0xed8(%rip),%rdi
call   1030 <puts@plt>
lea    0xed6(%rip),%rdi
call   1030 <puts@plt>
lea    0xed5(%rip),%rdi
call   1030 <puts@plt>
lea    0xedc(%rip),%rdi
call   1030 <puts@plt>
lea    0xeee(%rip),%rdi
pop    %rax
jmp    1040 <printf@plt>

LLVM IR (-O0):
@.str = [10 x i8] c"1. Compra\00"
@.str.1 = [11 x i8] c"2. Reserva\00"
@.str.2 = [19 x i8] c"3. Cancelar pasaje\00"
@.str.3 = [30 x i8] c"4. Volver al menu principal\0A\0A\00"
@.str.4 = [9 x i8] c"Opcion: \00"
define i32 @submenu_adquisicion() {
%1 = alloca i32
%2 = call i32 @puts(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0))
%3 = call i32 @puts(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.1, i64 0, i64 0))
%4 = call i32 @puts(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.2, i64 0, i64 0))
%5 = call i32 @puts(i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.3, i64 0, i64 0))
%6 = call i32 @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.4, i64 0, i64 0))
%7 = load i32, i32* %1
ret i32 %7
}

LLVM IR (-O2):
@.str = [10 x i8] c"1. Compra\00"
@.str.1 = [11 x i8] c"2. Reserva\00"
@.str.2 = [19 x i8] c"3. Cancelar pasaje\00"
@.str.3 = [30 x i8] c"4. Volver al menu principal\0A\0A\00"
@.str.4 = [9 x i8] c"Opcion: \00"
define i32 @submenu_adquisicion() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0))
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([11 x i8], [11 x i8]* @.str.1, i64 0, i64 0))
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([19 x i8], [19 x i8]* @.str.2, i64 0, i64 0))
%4 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([30 x i8], [30 x i8]* @.str.3, i64 0, i64 0))
%5 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([9 x i8], [9 x i8]* @.str.4, i64 0, i64 0))
ret i32 undef
}
int blockAllocated(int *p) { return *(p - 1) != (*(p - 1) & ~0x1); }


x86 assembly (clang, -O0):
<blockAllocated>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    -0x4(%rax),%eax
mov    -0x8(%rbp),%rcx
mov    -0x4(%rcx),%ecx
and    $0xfffffffe,%ecx
cmp    %ecx,%eax
setne  %al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<blockAllocated>:
mov    -0x4(%rdi),%eax
and    $0x1,%eax
ret

LLVM IR (-O0):
define i32 @blockAllocated(i32* %0) {
%2 = alloca i32*
store i32* %0, i32** %2
%3 = load i32*, i32** %2
%4 = getelementptr inbounds i32, i32* %3, i64 -1
%5 = load i32, i32* %4
%6 = load i32*, i32** %2
%7 = getelementptr inbounds i32, i32* %6, i64 -1
%8 = load i32, i32* %7
%9 = and i32 %8, -2
%10 = icmp ne i32 %5, %9
%11 = zext i1 %10 to i32
ret i32 %11
}

LLVM IR (-O2):
define i32 @blockAllocated(i32* nocapture %0) {
%2 = getelementptr inbounds i32, i32* %0, i64 -1
%3 = load i32, i32* %2
%4 = and i32 %3, -2
%5 = icmp ne i32 %3, %4
%6 = zext i1 %5 to i32
ret i32 %6
}
void imv_window_push_event(struct imv_window *window, struct imv_event *e) {
  (void)window;
  (void)e;
}


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

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

LLVM IR (-O0):
%struct.imv_window = type opaque
%struct.imv_event = type opaque
define void @imv_window_push_event(%struct.imv_window* %0, %struct.imv_event* %1) {
%3 = alloca %struct.imv_window*
%4 = alloca %struct.imv_event*
store %struct.imv_window* %0, %struct.imv_window** %3
store %struct.imv_event* %1, %struct.imv_event** %4
%5 = load %struct.imv_window*, %struct.imv_window** %3
%6 = load %struct.imv_event*, %struct.imv_event** %4
ret void
}

LLVM IR (-O2):
%struct.imv_window = type opaque
%struct.imv_event = type opaque
define void @imv_window_push_event(%struct.imv_window* nocapture %0, %struct.imv_event* nocapture %1) {
ret void
}
void WDC_DLLStartOfFrameHandler(void) {}


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

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

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

LLVM IR (-O2):
define void @WDC_DLLStartOfFrameHandler() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, ...);
void copyright() {
  printf("%s - %s\r\n", "G5", "TCP Transfer && Load-Balance Dispenser");
  printf("Copyright by calvin (calvinwilliams.c@gmail.com)\r\n");
  return;
}


x86 assembly (clang, -O0):
<copyright>:
push   %rbp
mov    %rsp,%rbp
lea    0xee5(%rip),%rdi
lea    0xee8(%rip),%rsi
lea    0xee4(%rip),%rdx
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xefd(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<copyright>:
push   %rax
lea    0xed8(%rip),%rdi
lea    0xedb(%rip),%rsi
lea    0xed7(%rip),%rdx
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xef0(%rip),%rdi
pop    %rax
jmp    1030 <puts@plt>

LLVM IR (-O0):
@.str = [10 x i8] c"%s - %s\0D\0A\00"
@.str.1 = [3 x i8] c"G5\00"
@.str.2 = [39 x i8] c"TCP Transfer && Load-Balance Dispenser\00"
@.str.3 = [51 x i8] c"Copyright by calvin (calvinwilliams.c@gmail.com)\0D\0A\00"
define void @copyright() {
%1 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([39 x i8], [39 x i8]* @.str.2, i64 0, i64 0))
%2 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([51 x i8], [51 x i8]* @.str.3, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [10 x i8] c"%s - %s\0D\0A\00"
@.str.1 = [3 x i8] c"G5\00"
@.str.2 = [39 x i8] c"TCP Transfer && Load-Balance Dispenser\00"
@str = [50 x i8] c"Copyright by calvin (calvinwilliams.c@gmail.com)\0D\00"
define void @copyright() {
%1 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([39 x i8], [39 x i8]* @.str.2, i64 0, i64 0))
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([50 x i8], [50 x i8]* @str, i64 0, i64 0))
ret void
}
/* Variables and functions */
int isalpha(int);
int isalpha_(int c) { return isalpha(c); }


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

x86 assembly (clang, -O2):
<isalpha_>:
jmp    1030 <isalpha@plt>

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

LLVM IR (-O2):
define i32 @isalpha_(i32 %0) {
%2 = tail call i32 @isalpha(i32 %0)
ret i32 %2
}
int ht_compare_ptr(void *key1, void *key2) { return (key1 == key2); }


x86 assembly (clang, -O0):
<ht_compare_ptr>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
cmp    -0x10(%rbp),%rax
sete   %al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<ht_compare_ptr>:
xor    %eax,%eax
cmp    %rsi,%rdi
sete   %al
ret

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

LLVM IR (-O2):
define i32 @ht_compare_ptr(i8* readnone %0, i8* readnone %1) {
%3 = icmp eq i8* %0, %1
%4 = zext i1 %3 to i32
ret i32 %4
}
void outb(int portnum, int data) {
  __asm__ __volatile__("outb %%al, %%dx" ::"a"(data), "d"(portnum));
}


x86 assembly (clang, -O0):
<outb>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x8(%rbp),%eax
mov    -0x4(%rbp),%edx
out    %al,(%dx)
pop    %rbp
ret

x86 assembly (clang, -O2):
<outb>:
mov    %esi,%eax
mov    %edi,%edx
out    %al,(%dx)
ret

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

LLVM IR (-O2):
define void @outb(i32 %0, i32 %1) {
tail call void asm sideeffect "outb %al, %dx", "{ax},{dx},~{dirflag},~{fpsr},~{flags}"(i32 %1, i32 %0)
ret void
}
void termop_reset(struct ansiseq *s) {
  tnc_log_log(
      7, 4, -1,
      "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
      "2022-01-22/02-19-57/repos/fstd/telnetcat/refs/heads/devel/src/xterm.c",
      453, __func__, "unhandled");
  ansiseq_dump(s);
}


x86 assembly (clang, -O0):
<termop_reset>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    $0x7,%edi
mov    $0x4,%esi
mov    $0xffffffff,%edx
lea    0xebe(%rip),%rcx
mov    $0x1c5,%r8d
lea    0xf37(%rip),%r9
lea    0xf3d(%rip),%rax
mov    %rax,(%rsp)
mov    $0x0,%al
call   1030 <tnc_log_log@plt>
mov    -0x8(%rbp),%rdi
mov    $0x0,%al
call   1040 <ansiseq_dump@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<termop_reset>:
push   %rbx
sub    $0x10,%rsp
mov    %rdi,%rbx
lea    0xf64(%rip),%rax
mov    %rax,(%rsp)
lea    0xec6(%rip),%rcx
lea    0xf45(%rip),%r9
mov    $0x7,%edi
mov    $0x4,%esi
mov    $0xffffffff,%edx
mov    $0x1c5,%r8d
xor    %eax,%eax
call   1030 <tnc_log_log@plt>
mov    %rbx,%rdi
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbx
jmp    1040 <ansiseq_dump@plt>

LLVM IR (-O0):
%struct.ansiseq = type opaque
@.str = [134 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/fstd/telnetcat/refs/heads/devel/src/xterm.c\00"
@__func__.termop_reset = [13 x i8] c"termop_reset\00"
@.str.1 = [10 x i8] c"unhandled\00"
define void @termop_reset(%struct.ansiseq* %0) {
%2 = alloca %struct.ansiseq*
store %struct.ansiseq* %0, %struct.ansiseq** %2
%3 = call i32 (i32, i32, i32, i8*, i32, i8*, i8*, ...) bitcast (i32 (...)* @tnc_log_log to i32 (i32, i32, i32, i8*, i32, i8*, i8*, ...)*)(i32 7, i32 4, i32 -1, i8* getelementptr inbounds ([134 x i8], [134 x i8]* @.str, i64 0, i64 0), i32 453, i8* getelementptr inbounds ([13 x i8], [13 x i8]* @__func__.termop_reset, i64 0, i64 0), i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.1, i64 0, i64 0))
%4 = load %struct.ansiseq*, %struct.ansiseq** %2
%5 = call i32 (%struct.ansiseq*, ...) bitcast (i32 (...)* @ansiseq_dump to i32 (%struct.ansiseq*, ...)*)(%struct.ansiseq* %4)
ret void
}

LLVM IR (-O2):
%struct.ansiseq = type opaque
@.str = [134 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/fstd/telnetcat/refs/heads/devel/src/xterm.c\00"
@__func__.termop_reset = [13 x i8] c"termop_reset\00"
@.str.1 = [10 x i8] c"unhandled\00"
define void @termop_reset(%struct.ansiseq* %0) {
%2 = tail call i32 (i32, i32, i32, i8*, i32, i8*, i8*, ...) bitcast (i32 (...)* @tnc_log_log to i32 (i32, i32, i32, i8*, i32, i8*, i8*, ...)*)(i32 7, i32 4, i32 -1, i8* getelementptr inbounds ([134 x i8], [134 x i8]* @.str, i64 0, i64 0), i32 453, i8* getelementptr inbounds ([13 x i8], [13 x i8]* @__func__.termop_reset, i64 0, i64 0), i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.1, i64 0, i64 0))
%3 = tail call i32 (%struct.ansiseq*, ...) bitcast (i32 (...)* @ansiseq_dump to i32 (%struct.ansiseq*, ...)*)(%struct.ansiseq* %0)
ret void
}
int israd(int c) { return '#' == c; }


x86 assembly (clang, -O0):
<israd>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    $0x23,%eax
cmp    -0x4(%rbp),%eax
sete   %al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<israd>:
xor    %eax,%eax
cmp    $0x23,%edi
sete   %al
ret

LLVM IR (-O0):
define i32 @israd(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = icmp eq i32 35, %3
%5 = zext i1 %4 to i32
ret i32 %5
}

LLVM IR (-O2):
define i32 @israd(i32 %0) {
%2 = icmp eq i32 %0, 35
%3 = zext i1 %2 to i32
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ reset_mycontext();
void Reset_SVG_Context() { reset_mycontext(); }


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

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

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

LLVM IR (-O2):
define void @Reset_SVG_Context() {
%1 = tail call i32 (...) @reset_mycontext()
ret void
}
void aa_free_cap_rules(struct aa_caps *caps) {}


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

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

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

LLVM IR (-O2):
%struct.aa_caps = type opaque
define void @aa_free_cap_rules(%struct.aa_caps* nocapture %0) {
ret void
}
char digito(char c) { return (c >= '0' && c <= '9') ? 1 : 0; }


x86 assembly (clang, -O0):
<digito>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movsbl -0x1(%rbp),%ecx
xor    %eax,%eax
cmp    $0x30,%ecx
mov    %al,-0x2(%rbp)
jl     1129 <digito+0x29>
movsbl -0x1(%rbp),%eax
cmp    $0x39,%eax
setle  %al
mov    %al,-0x2(%rbp)
mov    -0x2(%rbp),%dl
xor    %eax,%eax
mov    $0x1,%ecx
test   $0x1,%dl
cmovne %ecx,%eax
movsbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<digito>:
add    $0xd0,%dil
cmp    $0xa,%dil
setb   %al
ret

LLVM IR (-O0):
define signext i8 @digito(i8 signext %0) {
%2 = alloca i8
store i8 %0, i8* %2
%3 = load i8, i8* %2
%4 = sext i8 %3 to i32
%5 = icmp sge i32 %4, 48
br i1 %5, label %6, label %10
6: ; preds = %1
%7 = load i8, i8* %2
%8 = sext i8 %7 to i32
%9 = icmp sle i32 %8, 57
br label %10
10: ; preds = %6, %1
%11 = phi i1 [ false, %1 ], [ %9, %6 ]
%12 = zext i1 %11 to i64
%13 = select i1 %11, i32 1, i32 0
%14 = trunc i32 %13 to i8
ret i8 %14
}

LLVM IR (-O2):
define signext i8 @digito(i8 signext %0) {
%2 = add i8 %0, -48
%3 = icmp ult i8 %2, 10
%4 = zext i1 %3 to i8
ret i8 %4
}
int do_641() { return 641; }


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

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

LLVM IR (-O0):
define i32 @do_641() {
ret i32 641
}

LLVM IR (-O2):
define i32 @do_641() {
ret i32 641
}
int ifStatementFunction() {
  auto int n;
  auto int m;
  if (m)
    return n;
}


x86 assembly (clang, -O0):
<ifStatementFunction>:
push   %rbp
mov    %rsp,%rbp
cmpl   $0x0,-0xc(%rbp)
je     1114 <ifStatementFunction+0x14>
mov    -0x8(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @ifStatementFunction() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = load i32, i32* %3
%5 = icmp ne i32 %4, 0
br i1 %5, label %6, label %8
6: ; preds = %0
%7 = load i32, i32* %2
store i32 %7, i32* %1
br label %8
8: ; preds = %6, %0
%9 = load i32, i32* %1
ret i32 %9
}

LLVM IR (-O2):
define i32 @ifStatementFunction() {
ret i32 undef
}
int isprime(int a) {
  int i;
  if (a <= 1)
    return 0;
  for (i = 2; i <= a / 2; i++)
    if (!(a % i))
      return 0;
  return 1;
}


x86 assembly (clang, -O0):
<isprime>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
cmpl   $0x1,-0x8(%rbp)
jg     111d <isprime+0x1d>
movl   $0x0,-0x4(%rbp)
jmp    1178 <isprime+0x78>
movl   $0x2,-0xc(%rbp)
mov    -0xc(%rbp),%eax
mov    %eax,-0x10(%rbp)
mov    -0x8(%rbp),%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
mov    %eax,%ecx
mov    -0x10(%rbp),%eax
cmp    %ecx,%eax
jg     1171 <isprime+0x71>
mov    -0x8(%rbp),%eax
cltd
idivl  -0xc(%rbp)
cmp    $0x0,%edx
jne    115e <isprime+0x5e>
movl   $0x0,-0x4(%rbp)
jmp    1178 <isprime+0x78>
jmp    1163 <isprime+0x63>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1124 <isprime+0x24>
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<isprime>:
xor    %r8d,%r8d
cmp    $0x2,%edi
jge    110c <isprime+0xc>
mov    %r8d,%eax
ret
cmp    $0x4,%edi
jae    1117 <isprime+0x17>
mov    $0x1,%eax
ret
mov    %edi,%esi
shr    %esi
neg    %esi
mov    $0x2,%ecx
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
mov    %edi,%eax
cltd
idiv   %ecx
test   %edx,%edx
je     1108 <isprime+0x8>
lea    (%rsi,%rcx,1),%eax
add    $0x1,%eax
add    $0x1,%ecx
cmp    $0x1,%eax
jne    1130 <isprime+0x30>
mov    $0x1,%eax
ret

LLVM IR (-O0):
define i32 @isprime(i32 %0) {
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %3
%5 = load i32, i32* %3
%6 = icmp sle i32 %5, 1
br i1 %6, label %7, label %8
7: ; preds = %1
store i32 0, i32* %2
br label %25
8: ; preds = %1
store i32 2, i32* %4
br label %9
9: ; preds = %21, %8
%10 = load i32, i32* %4
%11 = load i32, i32* %3
%12 = sdiv i32 %11, 2
%13 = icmp sle i32 %10, %12
br i1 %13, label %14, label %24
14: ; preds = %9
%15 = load i32, i32* %3
%16 = load i32, i32* %4
%17 = srem i32 %15, %16
%18 = icmp ne i32 %17, 0
br i1 %18, label %20, label %19
19: ; preds = %14
store i32 0, i32* %2
br label %25
20: ; preds = %14
br label %21
21: ; preds = %20
%22 = load i32, i32* %4
%23 = add nsw i32 %22, 1
store i32 %23, i32* %4
br label %9
24: ; preds = %9
store i32 1, i32* %2
br label %25
25: ; preds = %24, %19, %7
%26 = load i32, i32* %2
ret i32 %26
}

LLVM IR (-O2):
define i32 @isprime(i32 %0) {
%2 = icmp slt i32 %0, 2
br i1 %2, label %14, label %3
3: ; preds = %1
%4 = icmp ult i32 %0, 4
br i1 %4, label %14, label %5
5: ; preds = %3
%6 = lshr i32 %0, 1
br label %10
7: ; preds = %10
%8 = add nuw nsw i32 %11, 1
%9 = icmp eq i32 %11, %6
br i1 %9, label %14, label %10
10: ; preds = %5, %7
%11 = phi i32 [ %8, %7 ], [ 2, %5 ]
%12 = srem i32 %0, %11
%13 = icmp eq i32 %12, 0
br i1 %13, label %14, label %7
14: ; preds = %10, %7, %3, %1
%15 = phi i32 [ 0, %1 ], [ 1, %3 ], [ 0, %10 ], [ 1, %7 ]
ret i32 %15
}
/* Variables and functions */
int /*<<< orphan*/ itoa(int, char *, int);
int /*<<< orphan*/ printf(char *, char *);
int main() {
  char s[1000];
  itoa(19322, s, 9);
  printf("%s\n", s);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x3f0,%rsp
lea    -0x3f0(%rbp),%rsi
mov    $0x4b7a,%edi
mov    $0x9,%edx
call   1040 <itoa@plt>
lea    -0x3f0(%rbp),%rsi
lea    0xeb1(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x3f0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x3f0,%rsp
mov    %rsp,%rbx
mov    $0x4b7a,%edi
mov    %rbx,%rsi
mov    $0x9,%edx
call   1040 <itoa@plt>
lea    0xebc(%rip),%rdi
mov    %rbx,%rsi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x3f0,%rsp
pop    %rbx
ret

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

LLVM IR (-O2):
@.str = [4 x i8] c"%s\0A\00"
define i32 @main() {
%1 = alloca [1000 x i8]
%2 = getelementptr inbounds [1000 x i8], [1000 x i8]* %1, i64 0, i64 0
%3 = call i32 @itoa(i32 19322, i8* %2, i32 9)
%4 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %2)
ret i32 0
}
AX0AR1(r0, r1, x0, x1, p0, p1) int r0, r1;
int *p0, *p1;
{
  if ((((int *)10000000)[x0]) <= (p1[1111111 / 4]))
    return 1;
  else
    return 0;
}


x86 assembly (clang, -O0):
<AX0AR1>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    %ecx,-0x14(%rbp)
mov    %r8,-0x20(%rbp)
mov    %r9,-0x28(%rbp)
movslq -0x10(%rbp),%rcx
mov    $0x989680,%eax
mov    (%rax,%rcx,4),%eax
mov    -0x28(%rbp),%rcx
cmp    0x10f444(%rcx),%eax
jg     1140 <AX0AR1+0x40>
movl   $0x1,-0x4(%rbp)
jmp    1147 <AX0AR1+0x47>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<AX0AR1>:
movslq %edx,%rax
mov    0x989680(,%rax,4),%ecx
xor    %eax,%eax
cmp    0x10f444(%r9),%ecx
setle  %al
ret

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

LLVM IR (-O2):
define i32 @AX0AR1(i32 %0, i32 %1, i32 %2, i32 %3, i32* nocapture readnone %4, i32* nocapture %5) {
%7 = sext i32 %2 to i64
%8 = getelementptr inbounds i32, i32* inttoptr (i64 10000000 to i32*), i64 %7
%9 = load i32, i32* %8
%10 = getelementptr inbounds i32, i32* %5, i64 277777
%11 = load i32, i32* %10
%12 = icmp sle i32 %9, %11
%13 = zext i1 %12 to i32
ret i32 %13
}
/* Variables and functions */
int /*<<< orphan*/ strcat(char *, char const *);
int /*<<< orphan*/ strcpy(char *, char const *);
char *strrchr(char *, char);
void str_swapext(char *text, const char *ext) {
  char *p = strrchr(text, '.');
  if (p == NULL) {
    strcat(text, ext);
  } else {
    strcpy(p, ext);
  }
}


x86 assembly (clang, -O0):
<str_swapext>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    $0x2e,%esi
call   1040 <strrchr@plt>
mov    %rax,-0x18(%rbp)
cmpq   $0x0,-0x18(%rbp)
jne    116f <str_swapext+0x3f>
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1050 <strcat@plt>
jmp    117c <str_swapext+0x4c>
mov    -0x18(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1030 <strcpy@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<str_swapext>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%r14
mov    %rdi,%rbx
mov    $0x2e,%esi
call   1040 <strrchr@plt>
test   %rax,%rax
je     115b <str_swapext+0x2b>
mov    %rax,%rdi
mov    %r14,%rsi
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1030 <strcpy@plt>
mov    %rbx,%rdi
mov    %r14,%rsi
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1050 <strcat@plt>

LLVM IR (-O0):
define void @str_swapext(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
%5 = alloca i8*
store i8* %0, i8** %3
store i8* %1, i8** %4
%6 = load i8*, i8** %3
%7 = call i8* @strrchr(i8* %6, i8 signext 46)
store i8* %7, i8** %5
%8 = load i8*, i8** %5
%9 = icmp eq i8* %8, null
br i1 %9, label %10, label %14
10: ; preds = %2
%11 = load i8*, i8** %3
%12 = load i8*, i8** %4
%13 = call i32 @strcat(i8* %11, i8* %12)
br label %18
14: ; preds = %2
%15 = load i8*, i8** %5
%16 = load i8*, i8** %4
%17 = call i32 @strcpy(i8* %15, i8* %16)
br label %18
18: ; preds = %14, %10
ret void
}

LLVM IR (-O2):
define void @str_swapext(i8* %0, i8* %1) {
%3 = tail call i8* @strrchr(i8* dereferenceable(1) %0, i8 signext 46)
%4 = icmp eq i8* %3, null
br i1 %4, label %5, label %7
5: ; preds = %2
%6 = tail call i32 @strcat(i8* %0, i8* %1)
br label %9
7: ; preds = %2
%8 = tail call i32 @strcpy(i8* %3, i8* %1)
br label %9
9: ; preds = %7, %5
ret void
}
/* Type definitions */
typedef int uint16_t;

/* Variables and functions */
uint16_t endian_rev16(uint16_t data) {
  return ((data & 0x00FF) << 8) | ((data & 0xFF00) >> 8);
}


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

x86 assembly (clang, -O2):
<endian_rev16>:
rol    $0x8,%di
movzwl %di,%eax
ret

LLVM IR (-O0):
define i32 @endian_rev16(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = and i32 %3, 255
%5 = shl i32 %4, 8
%6 = load i32, i32* %2
%7 = and i32 %6, 65280
%8 = ashr i32 %7, 8
%9 = or i32 %5, %8
ret i32 %9
}

LLVM IR (-O2):
define i32 @endian_rev16(i32 %0) {
%2 = trunc i32 %0 to i16
%3 = tail call i16 @llvm.bswap.i16(i16 %2)
%4 = zext i16 %3 to i32
ret i32 %4
}
int t(void) { return 1; }


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

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

LLVM IR (-O0):
define i32 @t() {
ret i32 1
}

LLVM IR (-O2):
define i32 @t() {
ret i32 1
}
int main() {
  int a;
  while (1)
    a++;
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
movl   $0x0,-0x4(%rbp)
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
mov    %eax,-0x8(%rbp)
jmp    110b <main+0xb>

x86 assembly (clang, -O2):
<main>:
jmp    1100 <main>

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
store i32 0, i32* %1
br label %3
3: ; preds = %0, %3
%4 = load i32, i32* %2
%5 = add nsw i32 %4, 1
store i32 %5, i32* %2
br label %3
}

LLVM IR (-O2):
define i32 @main() {
br label %1
1: ; preds = %1, %0
br label %1
}
/* Variables and functions */
int EINVAL;
__attribute__((visibility("default"))) int
sd_resolve_get_events(void *resolve) {
  return -EINVAL;
}


x86 assembly (clang, -O0):
<sd_resolve_get_events>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
xor    %eax,%eax
mov    0x2ecf(%rip),%rcx
sub    (%rcx),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<sd_resolve_get_events>:
mov    0x2ed9(%rip),%rcx
xor    %eax,%eax
sub    (%rcx),%eax
ret

LLVM IR (-O0):
@EINVAL = global i32 0
define i32 @sd_resolve_get_events(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i32, i32* @EINVAL
%4 = sub nsw i32 0, %3
ret i32 %4
}

LLVM IR (-O2):
@EINVAL = global i32 0
define i32 @sd_resolve_get_events(i8* nocapture readnone %0) {
%2 = load i32, i32* @EINVAL
%3 = sub nsw i32 0, %2
ret i32 %3
}
/* Type definitions */
typedef int /*<<< orphan*/ WINDOW;

/* Variables and functions */
int wredrawln(WINDOW *w, int n1, int n2) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @wredrawln(i32* nocapture readnone %0, i32 %1, i32 %2) {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ nurat_canonicalization(int);
void Init_rational(void) { nurat_canonicalization(1); }


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

x86 assembly (clang, -O2):
<Init_rational>:
mov    $0x1,%edi
jmp    1030 <nurat_canonicalization@plt>

LLVM IR (-O0):
define void @Init_rational() {
%1 = call i32 @nurat_canonicalization(i32 1)
ret void
}

LLVM IR (-O2):
define void @Init_rational() {
%1 = tail call i32 @nurat_canonicalization(i32 1)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ japi_appendtext(int, char *);
void j_appendtext(int arg0, char *arg1) { japi_appendtext(arg0, arg1); }


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

x86 assembly (clang, -O2):
<j_appendtext>:
jmp    1030 <japi_appendtext@plt>

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

LLVM IR (-O2):
define void @j_appendtext(i32 %0, i8* %1) {
%3 = tail call i32 @japi_appendtext(i32 %0, i8* %1)
ret void
}
/* Type definitions */
struct can_frame {
  int *data;
};

/* Variables and functions */
void sdo_set_cs(struct can_frame *frame, int cs) {
  frame->data[0] &= 0x1f;
  frame->data[0] |= cs << 5;
}


x86 assembly (clang, -O0):
<sdo_set_cs>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%rax
mov    (%rax),%ecx
and    $0x1f,%ecx
mov    %ecx,(%rax)
mov    -0xc(%rbp),%ecx
shl    $0x5,%ecx
mov    -0x8(%rbp),%rax
mov    (%rax),%rax
or     (%rax),%ecx
mov    %ecx,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<sdo_set_cs>:
mov    (%rdi),%rax
mov    (%rax),%ecx
and    $0x1f,%ecx
shl    $0x5,%esi
or     %ecx,%esi
mov    %esi,(%rax)
ret

LLVM IR (-O0):
%struct.can_frame = type { i32* }
define void @sdo_set_cs(%struct.can_frame* %0, i32 %1) {
%3 = alloca %struct.can_frame*
%4 = alloca i32
store %struct.can_frame* %0, %struct.can_frame** %3
store i32 %1, i32* %4
%5 = load %struct.can_frame*, %struct.can_frame** %3
%6 = getelementptr inbounds %struct.can_frame, %struct.can_frame* %5, i32 0, i32 0
%7 = load i32*, i32** %6
%8 = getelementptr inbounds i32, i32* %7, i64 0
%9 = load i32, i32* %8
%10 = and i32 %9, 31
store i32 %10, i32* %8
%11 = load i32, i32* %4
%12 = shl i32 %11, 5
%13 = load %struct.can_frame*, %struct.can_frame** %3
%14 = getelementptr inbounds %struct.can_frame, %struct.can_frame* %13, i32 0, i32 0
%15 = load i32*, i32** %14
%16 = getelementptr inbounds i32, i32* %15, i64 0
%17 = load i32, i32* %16
%18 = or i32 %17, %12
store i32 %18, i32* %16
ret void
}

LLVM IR (-O2):
%struct.can_frame = type { i32* }
define void @sdo_set_cs(%struct.can_frame* nocapture %0, i32 %1) {
%3 = getelementptr inbounds %struct.can_frame, %struct.can_frame* %0, i64 0, i32 0
%4 = load i32*, i32** %3
%5 = load i32, i32* %4
%6 = and i32 %5, 31
%7 = shl i32 %1, 5
%8 = or i32 %6, %7
store i32 %8, i32* %4
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void __ct_help() {
  printf("Very Very Simple C Test Framework Help Message\n\n"
         "--help\n"
         "   Print this help messages\n\n"
         "--list_tests\n"
         "   List the names of all tests instead of running them. The name of\n"
         "   TEST(Foo, Bar) is \"Foo.Bar\".\n\n"
         "--filter=POSTIVE_PATTERNS[-NEGATIVE_PATTERNS]\n"
         "   Run only the tests whose name matches one of the positive "
         "patterns but\n"
         "   none of the negative patterns. '?' matches any single character; "
         "'*'\n"
         "   matches any substring; ':' separates two patterns.\n\n");
}


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

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

LLVM IR (-O0):
@.str = [446 x i8] c"Very Very Simple C Test Framework Help Message\0A\0A--help\0A Print this help messages\0A\0A--list_tests\0A List the names of all tests instead of running them. The name of\0A TEST(Foo, Bar) is \22Foo.Bar\22.\0A\0A--filter=POSTIVE_PATTERNS[-NEGATIVE_PATTERNS]\0A Run only the tests whose name matches one of the positive patterns but\0A none of the negative patterns. '?' matches any single character; '*'\0A matches any substring; ':' separates two patterns.\0A\0A\00"
define void @__ct_help() {
%1 = call i32 @printf(i8* getelementptr inbounds ([446 x i8], [446 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@str = [445 x i8] c"Very Very Simple C Test Framework Help Message\0A\0A--help\0A Print this help messages\0A\0A--list_tests\0A List the names of all tests instead of running them. The name of\0A TEST(Foo, Bar) is \22Foo.Bar\22.\0A\0A--filter=POSTIVE_PATTERNS[-NEGATIVE_PATTERNS]\0A Run only the tests whose name matches one of the positive patterns but\0A none of the negative patterns. '?' matches any single character; '*'\0A matches any substring; ':' separates two patterns.\0A\00"
define void @__ct_help() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([445 x i8], [445 x i8]* @str, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ func(int);
int main() { func(-1); }


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

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

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

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 @func(i32 -1)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ with_type_qualifier();
int /*<<< orphan*/ without_type_qualifier();
int main(void) {
  printf("Without type qualifier:\n");
  without_type_qualifier();
  printf("\nWith type qualifier:\n");
  with_type_qualifier();
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeba(%rip),%rdi
call   1030 <printf@plt>
mov    $0x0,%al
call   1040 <without_type_qualifier@plt>
lea    0xec0(%rip),%rdi
call   1030 <printf@plt>
mov    $0x0,%al
call   1050 <with_type_qualifier@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xec8(%rip),%rdi
call   1030 <puts@plt>
xor    %eax,%eax
call   1040 <without_type_qualifier@plt>
lea    0xecd(%rip),%rdi
call   1030 <puts@plt>
xor    %eax,%eax
call   1050 <with_type_qualifier@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [25 x i8] c"Without type qualifier:\0A\00"
@.str.1 = [23 x i8] c"\0AWith type qualifier:\0A\00"
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 @printf(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str, i64 0, i64 0))
%3 = call i32 (...) @without_type_qualifier()
%4 = call i32 @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.1, i64 0, i64 0))
%5 = call i32 (...) @with_type_qualifier()
ret i32 0
}

LLVM IR (-O2):
@str = [24 x i8] c"Without type qualifier:\00"
@str.2 = [22 x i8] c"\0AWith type qualifier:\00"
define i32 @main() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([24 x i8], [24 x i8]* @str, i64 0, i64 0))
%2 = tail call i32 (...) @without_type_qualifier()
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([22 x i8], [22 x i8]* @str.2, i64 0, i64 0))
%4 = tail call i32 (...) @with_type_qualifier()
ret i32 0
}
/* Type definitions */
struct utmpx {
  int dummy;
};

/* Variables and functions */
struct utmpx *getutxid(const struct utmpx *ut) {
  return NULL;
}


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

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

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

LLVM IR (-O2):
%struct.utmpx = type { i32 }
define noalias %struct.utmpx* @getutxid(%struct.utmpx* nocapture readnone %0) {
ret %struct.utmpx* null
}
/* Variables and functions */
int /*<<< orphan*/ _assert_true(unsigned long long, char *, char *, int);
int /*<<< orphan*/ free(void *);
void free_value(const void *value, void *cleanup_value_data) {
  _assert_true(((unsigned long long)((value))), "value",
               "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/"
               "outputs/2022-01-22/02-19-57/repos/huor/incubator-hawq/refs/"
               "heads/master/src/test/unit/cmockery/cmockery.c",
               519);
  free((void *)value);
}


x86 assembly (clang, -O0):
<free_value>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
lea    0xec5(%rip),%rsi
lea    0xec4(%rip),%rdx
mov    $0x207,%ecx
call   1040 <_assert_true@plt>
mov    -0x8(%rbp),%rdi
call   1030 <free@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<free_value>:
push   %rbx
mov    %rdi,%rbx
lea    0xed5(%rip),%rsi
lea    0xed4(%rip),%rdx
mov    $0x207,%ecx
call   1040 <_assert_true@plt>
mov    %rbx,%rdi
pop    %rbx
jmp    1030 <free@plt>

LLVM IR (-O0):
@.str = [6 x i8] c"value\00"
@.str.1 = [162 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/huor/incubator-hawq/refs/heads/master/src/test/unit/cmockery/cmockery.c\00"
define void @free_value(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
store i8* %0, i8** %3
store i8* %1, i8** %4
%5 = load i8*, i8** %3
%6 = ptrtoint i8* %5 to i64
%7 = call i32 @_assert_true(i64 %6, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([162 x i8], [162 x i8]* @.str.1, i64 0, i64 0), i32 519)
%8 = load i8*, i8** %3
%9 = call i32 @free(i8* %8)
ret void
}

LLVM IR (-O2):
@.str = [6 x i8] c"value\00"
@.str.1 = [162 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/huor/incubator-hawq/refs/heads/master/src/test/unit/cmockery/cmockery.c\00"
define void @free_value(i8* %0, i8* nocapture readnone %1) {
%3 = ptrtoint i8* %0 to i64
%4 = tail call i32 @_assert_true(i64 %3, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([162 x i8], [162 x i8]* @.str.1, i64 0, i64 0), i32 519)
%5 = tail call i32 @free(i8* %0)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ uint16_t;

/* Variables and functions */
int /*<<< orphan*/ be16toh(int /*<<< orphan*/);
uint16_t ntohu16(const unsigned char *buf) { return be16toh(*(uint16_t *)buf); }


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

x86 assembly (clang, -O2):
<ntohu16>:
mov    (%rdi),%edi
jmp    1030 <be16toh@plt>

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

LLVM IR (-O2):
define i32 @ntohu16(i8* nocapture %0) {
%2 = bitcast i8* %0 to i32*
%3 = load i32, i32* %2
%4 = tail call i32 @be16toh(i32 %3)
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, ...);
int /*<<< orphan*/ stderr;
void print_usage(char *prg) {
  fprintf(stderr, "Usage: %s\n", prg);
  fprintf(stderr, "Options: -I <infile>  (default stdin)\n");
  fprintf(stderr, "         -O <outfile> (default stdout)\n");
}


x86 assembly (clang, -O0):
<print_usage>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    0x2ebd(%rip),%rax
mov    (%rax),%edi
mov    -0x8(%rbp),%rdx
lea    0xed0(%rip),%rsi
mov    $0x0,%al
call   1030 <fprintf@plt>
mov    0x2ea2(%rip),%rax
mov    (%rax),%edi
lea    0xec4(%rip),%rsi
mov    $0x0,%al
call   1030 <fprintf@plt>
mov    0x2e8b(%rip),%rax
mov    (%rax),%edi
lea    0xed4(%rip),%rsi
mov    $0x0,%al
call   1030 <fprintf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<print_usage>:
push   %rbx
mov    %rdi,%rdx
mov    0x2ec5(%rip),%rbx
mov    (%rbx),%edi
lea    0xedc(%rip),%rsi
xor    %eax,%eax
call   1030 <fprintf@plt>
mov    (%rbx),%edi
lea    0xed7(%rip),%rsi
xor    %eax,%eax
call   1030 <fprintf@plt>
mov    (%rbx),%edi
lea    0xeee(%rip),%rsi
xor    %eax,%eax
pop    %rbx
jmp    1030 <fprintf@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [11 x i8] c"Usage: %s\0A\00"
@.str.1 = [39 x i8] c"Options: -I <infile> (default stdin)\0A\00"
@.str.2 = [40 x i8] c" -O <outfile> (default stdout)\0A\00"
define void @print_usage(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i32, i32* @stderr
%4 = load i8*, i8** %2
%5 = call i32 (i32, i8*, ...) @fprintf(i32 %3, i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), i8* %4)
%6 = load i32, i32* @stderr
%7 = call i32 (i32, i8*, ...) @fprintf(i32 %6, i8* getelementptr inbounds ([39 x i8], [39 x i8]* @.str.1, i64 0, i64 0))
%8 = load i32, i32* @stderr
%9 = call i32 (i32, i8*, ...) @fprintf(i32 %8, i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str.2, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [11 x i8] c"Usage: %s\0A\00"
@.str.1 = [39 x i8] c"Options: -I <infile> (default stdin)\0A\00"
@.str.2 = [40 x i8] c" -O <outfile> (default stdout)\0A\00"
define void @print_usage(i8* %0) {
%2 = load i32, i32* @stderr
%3 = tail call i32 (i32, i8*, ...) @fprintf(i32 %2, i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), i8* %0)
%4 = load i32, i32* @stderr
%5 = tail call i32 (i32, i8*, ...) @fprintf(i32 %4, i8* getelementptr inbounds ([39 x i8], [39 x i8]* @.str.1, i64 0, i64 0))
%6 = load i32, i32* @stderr
%7 = tail call i32 (i32, i8*, ...) @fprintf(i32 %6, i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str.2, i64 0, i64 0))
ret void
}
void J420ToRGB565() {}


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

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

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

LLVM IR (-O2):
define void @J420ToRGB565() {
ret void
}