#define NULL ((void *)0)
typedef unsigned long size_t; // Customize by platform.
typedef long intptr_t;
typedef unsigned long uintptr_t;
typedef long scalar_t__; // Either arithmetic or pointer type.
/* By default, we understand bool (as a convenience). */
typedef int bool;
#define false 0
#define true 1

/* Forward declarations */
typedef struct TYPE_2__ TYPE_1__;

/* Type definitions */
struct TYPE_2__ {
  int /*<<< orphan*/ m_stride;
  int /*<<< orphan*/ m_repeat;
  int /*<<< orphan*/ m_poffset;
  int /*<<< orphan*/ m_info;
  int /*<<< orphan*/ m_value;
};
typedef TYPE_1__ Elf32_Move;

/* Variables and functions */
int /*<<< orphan*/ ELF32_M_SIZE(int /*<<< orphan*/);
int /*<<< orphan*/ ELF32_M_SYM(int /*<<< orphan*/);
int /*<<< orphan*/ beginblock(int);
int /*<<< orphan*/ endblock();
int /*<<< orphan*/ out(int /*<<< orphan*/);
int /*<<< orphan*/ outf(char *, int /*<<< orphan*/, int /*<<< orphan*/);
int /*<<< orphan*/ strdec(int /*<<< orphan*/);
int /*<<< orphan*/ strhex(int /*<<< orphan*/);
void outmove32(void const *ptr, long size, int ndx) {
  Elf32_Move const *moves = ptr;
  long count = size / sizeof *moves;
  long i;
  (void)ndx;
  beginblock(1);
  for (i = 0; i < count; ++i) {
    beginblock(0);
    (out(strdec(moves[i].m_value)));
    outf("ELF32_M_INFO(%lu, %u)", ELF32_M_SYM(moves[i].m_info),
         ELF32_M_SIZE(moves[i].m_info));
    (out(strhex(moves[i].m_poffset)));
    (out(strdec(moves[i].m_repeat)));
    (out(strdec(moves[i].m_stride)));
    endblock();
  }
  endblock();
}


x86 assembly (clang, -O0):
<outmove32>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x20(%rbp)
mov    -0x10(%rbp),%rax
mov    $0x14,%ecx
xor    %edx,%edx
div    %rcx
mov    %rax,-0x28(%rbp)
mov    $0x1,%edi
call   1080 <beginblock@plt>
movq   $0x0,-0x30(%rbp)
mov    -0x30(%rbp),%rax
cmp    -0x28(%rbp),%rax
jge    1293 <outmove32+0x113>
xor    %edi,%edi
call   1080 <beginblock@plt>
mov    -0x20(%rbp),%rax
imul   $0x14,-0x30(%rbp),%rcx
add    %rcx,%rax
mov    0x10(%rax),%edi
call   1060 <strdec@plt>
mov    %eax,%edi
call   1090 <out@plt>
mov    -0x20(%rbp),%rax
imul   $0x14,-0x30(%rbp),%rcx
add    %rcx,%rax
mov    0xc(%rax),%edi
call   10a0 <ELF32_M_SYM@plt>
mov    %eax,-0x34(%rbp)
mov    -0x20(%rbp),%rax
imul   $0x14,-0x30(%rbp),%rcx
add    %rcx,%rax
mov    0xc(%rax),%edi
call   1070 <ELF32_M_SIZE@plt>
mov    -0x34(%rbp),%esi
mov    %eax,%edx
lea    0xdda(%rip),%rdi
call   1050 <outf@plt>
mov    -0x20(%rbp),%rax
imul   $0x14,-0x30(%rbp),%rcx
add    %rcx,%rax
mov    0x8(%rax),%edi
call   1030 <strhex@plt>
mov    %eax,%edi
call   1090 <out@plt>
mov    -0x20(%rbp),%rax
imul   $0x14,-0x30(%rbp),%rcx
add    %rcx,%rax
mov    0x4(%rax),%edi
call   1060 <strdec@plt>
mov    %eax,%edi
call   1090 <out@plt>
mov    -0x20(%rbp),%rax
imul   $0x14,-0x30(%rbp),%rcx
add    %rcx,%rax
mov    (%rax),%edi
call   1060 <strdec@plt>
mov    %eax,%edi
call   1090 <out@plt>
mov    $0x0,%al
call   1040 <endblock@plt>
mov    -0x30(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x30(%rbp)
jmp    11bf <outmove32+0x3f>
mov    $0x0,%al
call   1040 <endblock@plt>
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<outmove32>:
push   %rbp
push   %r15
push   %r14
push   %rbx
push   %rax
mov    %rsi,%r14
mov    %rdi,%rbx
mov    $0x1,%edi
call   1080 <beginblock@plt>
cmp    $0x14,%r14
jb     1241 <outmove32+0xc1>
movabs $0xcccccccccccccccd,%rcx
cc cc cc
mov    %r14,%rax
mul    %rcx
mov    %rdx,%r14
shr    $0x4,%r14
add    $0x10,%rbx
lea    0xe3d(%rip),%r15
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
xor    %edi,%edi
call   1080 <beginblock@plt>
mov    (%rbx),%edi
call   1060 <strdec@plt>
mov    %eax,%edi
call   1090 <out@plt>
mov    -0x4(%rbx),%edi
call   10a0 <ELF32_M_SYM@plt>
mov    %eax,%ebp
mov    -0x4(%rbx),%edi
call   1070 <ELF32_M_SIZE@plt>
mov    %r15,%rdi
mov    %ebp,%esi
mov    %eax,%edx
call   1050 <outf@plt>
mov    -0x8(%rbx),%edi
call   1030 <strhex@plt>
mov    %eax,%edi
call   1090 <out@plt>
mov    -0xc(%rbx),%edi
call   1060 <strdec@plt>
mov    %eax,%edi
call   1090 <out@plt>
mov    -0x10(%rbx),%edi
call   1060 <strdec@plt>
mov    %eax,%edi
call   1090 <out@plt>
xor    %eax,%eax
call   1040 <endblock@plt>
add    $0x14,%rbx
add    $0xffffffffffffffff,%r14
jne    11d0 <outmove32+0x50>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
pop    %r15
pop    %rbp
jmp    1040 <endblock@plt>

LLVM IR (-O0):
%struct.TYPE_2__ = type { i32, i32, i32, i32, i32 }
@.str = [22 x i8] c"ELF32_M_INFO(%lu, %u)\00"
define void @outmove32(i8* %0, i64 %1, i32 %2) {
%4 = alloca i8*
%5 = alloca i64
%6 = alloca i32
%7 = alloca %struct.TYPE_2__*
%8 = alloca i64
%9 = alloca i64
store i8* %0, i8** %4
store i64 %1, i64* %5
store i32 %2, i32* %6
%10 = load i8*, i8** %4
%11 = bitcast i8* %10 to %struct.TYPE_2__*
store %struct.TYPE_2__* %11, %struct.TYPE_2__** %7
%12 = load i64, i64* %5
%13 = udiv i64 %12, 20
store i64 %13, i64* %8
%14 = load i32, i32* %6
%15 = call i32 @beginblock(i32 1)
store i64 0, i64* %9
br label %16
16: ; preds = %64, %3
%17 = load i64, i64* %9
%18 = load i64, i64* %8
%19 = icmp slt i64 %17, %18
br i1 %19, label %20, label %67
20: ; preds = %16
%21 = call i32 @beginblock(i32 0)
%22 = load %struct.TYPE_2__*, %struct.TYPE_2__** %7
%23 = load i64, i64* %9
%24 = getelementptr inbounds %struct.TYPE_2__, %struct.TYPE_2__* %22, i64 %23
%25 = getelementptr inbounds %struct.TYPE_2__, %struct.TYPE_2__* %24, i32 0, i32 4
%26 = load i32, i32* %25
%27 = call i32 @strdec(i32 %26)
%28 = call i32 @out(i32 %27)
%29 = load %struct.TYPE_2__*, %struct.TYPE_2__** %7
%30 = load i64, i64* %9
%31 = getelementptr inbounds %struct.TYPE_2__, %struct.TYPE_2__* %29, i64 %30
%32 = getelementptr inbounds %struct.TYPE_2__, %struct.TYPE_2__* %31, i32 0, i32 3
%33 = load i32, i32* %32
%34 = call i32 @ELF32_M_SYM(i32 %33)
%35 = load %struct.TYPE_2__*, %struct.TYPE_2__** %7
%36 = load i64, i64* %9
%37 = getelementptr inbounds %struct.TYPE_2__, %struct.TYPE_2__* %35, i64 %36
%38 = getelementptr inbounds %struct.TYPE_2__, %struct.TYPE_2__* %37, i32 0, i32 3
%39 = load i32, i32* %38
%40 = call i32 @ELF32_M_SIZE(i32 %39)
%41 = call i32 @outf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0), i32 %34, i32 %40)
%42 = load %struct.TYPE_2__*, %struct.TYPE_2__** %7
%43 = load i64, i64* %9
%44 = getelementptr inbounds %struct.TYPE_2__, %struct.TYPE_2__* %42, i64 %43
%45 = getelementptr inbounds %struct.TYPE_2__, %struct.TYPE_2__* %44, i32 0, i32 2
%46 = load i32, i32* %45
%47 = call i32 @strhex(i32 %46)
%48 = call i32 @out(i32 %47)
%49 = load %struct.TYPE_2__*, %struct.TYPE_2__** %7
%50 = load i64, i64* %9
%51 = getelementptr inbounds %struct.TYPE_2__, %struct.TYPE_2__* %49, i64 %50
%52 = getelementptr inbounds %struct.TYPE_2__, %struct.TYPE_2__* %51, i32 0, i32 1
%53 = load i32, i32* %52
%54 = call i32 @strdec(i32 %53)
%55 = call i32 @out(i32 %54)
%56 = load %struct.TYPE_2__*, %struct.TYPE_2__** %7
%57 = load i64, i64* %9
%58 = getelementptr inbounds %struct.TYPE_2__, %struct.TYPE_2__* %56, i64 %57
%59 = getelementptr inbounds %struct.TYPE_2__, %struct.TYPE_2__* %58, i32 0, i32 0
%60 = load i32, i32* %59
%61 = call i32 @strdec(i32 %60)
%62 = call i32 @out(i32 %61)
%63 = call i32 (...) @endblock()
br label %64
64: ; preds = %20
%65 = load i64, i64* %9
%66 = add nsw i64 %65, 1
store i64 %66, i64* %9
br label %16
67: ; preds = %16
%68 = call i32 (...) @endblock()
ret void
}

LLVM IR (-O2):
%struct.TYPE_2__ = type { i32, i32, i32, i32, i32 }
@.str = [22 x i8] c"ELF32_M_INFO(%lu, %u)\00"
define void @outmove32(i8* nocapture %0, i64 %1, i32 %2) {
%4 = bitcast i8* %0 to %struct.TYPE_2__*
%5 = tail call i32 @beginblock(i32 1)
%6 = icmp ult i64 %1, 20
br i1 %6, label %37, label %7
7: ; preds = %3
%8 = udiv i64 %1, 20
br label %9
9: ; preds = %7, %9
%10 = phi i64 [ %35, %9 ], [ 0, %7 ]
%11 = tail call i32 @beginblock(i32 0)
%12 = getelementptr inbounds %struct.TYPE_2__, %struct.TYPE_2__* %4, i64 %10, i32 4
%13 = load i32, i32* %12
%14 = tail call i32 @strdec(i32 %13)
%15 = tail call i32 @out(i32 %14)
%16 = getelementptr inbounds %struct.TYPE_2__, %struct.TYPE_2__* %4, i64 %10, i32 3
%17 = load i32, i32* %16
%18 = tail call i32 @ELF32_M_SYM(i32 %17)
%19 = load i32, i32* %16
%20 = tail call i32 @ELF32_M_SIZE(i32 %19)
%21 = tail call i32 @outf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0), i32 %18, i32 %20)
%22 = getelementptr inbounds %struct.TYPE_2__, %struct.TYPE_2__* %4, i64 %10, i32 2
%23 = load i32, i32* %22
%24 = tail call i32 @strhex(i32 %23)
%25 = tail call i32 @out(i32 %24)
%26 = getelementptr inbounds %struct.TYPE_2__, %struct.TYPE_2__* %4, i64 %10, i32 1
%27 = load i32, i32* %26
%28 = tail call i32 @strdec(i32 %27)
%29 = tail call i32 @out(i32 %28)
%30 = getelementptr inbounds %struct.TYPE_2__, %struct.TYPE_2__* %4, i64 %10, i32 0
%31 = load i32, i32* %30
%32 = tail call i32 @strdec(i32 %31)
%33 = tail call i32 @out(i32 %32)
%34 = tail call i32 (...) @endblock()
%35 = add nuw nsw i64 %10, 1
%36 = icmp eq i64 %35, %8
br i1 %36, label %37, label %9
37: ; preds = %9, %3
%38 = tail call i32 (...) @endblock()
ret void
}