#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 */

/* Type definitions */

/* Variables and functions */
int /*<<< orphan*/ assert(int);
int /*<<< orphan*/ emit_writeword_indexed_tlb(int, int, int, int, int);
void emit_writedword_indexed_tlb(int rh, int rl, int addr, int rs, int map,
                                 int temp) {
  assert(rh >= 0);
  emit_writeword_indexed_tlb(rh, addr, rs, map, temp);
  emit_writeword_indexed_tlb(rl, addr + 4, rs, map, temp);
}


x86 assembly (clang, -O0):
<emit_writedword_indexed_tlb>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    %ecx,-0x10(%rbp)
mov    %r8d,-0x14(%rbp)
mov    %r9d,-0x18(%rbp)
cmpl   $0x0,-0x4(%rbp)
setge  %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <assert@plt>
mov    -0x4(%rbp),%edi
mov    -0xc(%rbp),%esi
mov    -0x10(%rbp),%edx
mov    -0x14(%rbp),%ecx
mov    -0x18(%rbp),%r8d
call   1040 <emit_writeword_indexed_tlb@plt>
mov    -0x8(%rbp),%edi
mov    -0xc(%rbp),%esi
add    $0x4,%esi
mov    -0x10(%rbp),%edx
mov    -0x14(%rbp),%ecx
mov    -0x18(%rbp),%r8d
call   1040 <emit_writeword_indexed_tlb@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<emit_writedword_indexed_tlb>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
push   %rax
mov    %r9d,%r14d
mov    %r8d,%r15d
mov    %ecx,%r13d
mov    %edx,%ebp
mov    %esi,%r12d
mov    %edi,%ebx
not    %edi
shr    $0x1f,%edi
call   1030 <assert@plt>
mov    %ebx,%edi
mov    %ebp,%esi
mov    %r13d,%edx
mov    %r15d,%ecx
mov    %r14d,%r8d
call   1040 <emit_writeword_indexed_tlb@plt>
add    $0x4,%ebp
mov    %r12d,%edi
mov    %ebp,%esi
mov    %r13d,%edx
mov    %r15d,%ecx
mov    %r14d,%r8d
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
jmp    1040 <emit_writeword_indexed_tlb@plt>

LLVM IR (-O0):
define void @emit_writedword_indexed_tlb(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
store i32 %0, i32* %7
store i32 %1, i32* %8
store i32 %2, i32* %9
store i32 %3, i32* %10
store i32 %4, i32* %11
store i32 %5, i32* %12
%13 = load i32, i32* %7
%14 = icmp sge i32 %13, 0
%15 = zext i1 %14 to i32
%16 = call i32 @assert(i32 %15)
%17 = load i32, i32* %7
%18 = load i32, i32* %9
%19 = load i32, i32* %10
%20 = load i32, i32* %11
%21 = load i32, i32* %12
%22 = call i32 @emit_writeword_indexed_tlb(i32 %17, i32 %18, i32 %19, i32 %20, i32 %21)
%23 = load i32, i32* %8
%24 = load i32, i32* %9
%25 = add nsw i32 %24, 4
%26 = load i32, i32* %10
%27 = load i32, i32* %11
%28 = load i32, i32* %12
%29 = call i32 @emit_writeword_indexed_tlb(i32 %23, i32 %25, i32 %26, i32 %27, i32 %28)
ret void
}

LLVM IR (-O2):
define void @emit_writedword_indexed_tlb(i32 %0, i32 %1, i32 %2, i32 %3, i32 %4, i32 %5) {
%7 = xor i32 %0, -1
%8 = lshr i32 %7, 31
%9 = tail call i32 @assert(i32 %8)
%10 = tail call i32 @emit_writeword_indexed_tlb(i32 %0, i32 %2, i32 %3, i32 %4, i32 %5)
%11 = add nsw i32 %2, 4
%12 = tail call i32 @emit_writeword_indexed_tlb(i32 %1, i32 %11, i32 %3, i32 %4, i32 %5)
ret void
}