#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);
void emit_writedword_indexed_tlb(int rh, int rl, int addr, int rs, int map) {
  assert(map >= 0);
  assert(rh >= 0);
  emit_writeword_indexed_tlb(rh, addr, rs, map);
  emit_writeword_indexed_tlb(rl, addr + 4, rs, map);
}


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)
cmpl   $0x0,-0x14(%rbp)
setge  %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <assert@plt>
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
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
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   %r12
push   %rbx
mov    %r8d,%r12d
mov    %ecx,%r14d
mov    %edx,%ebp
mov    %esi,%r15d
mov    %edi,%ebx
mov    %r8d,%edi
not    %edi
shr    $0x1f,%edi
call   1030 <assert@plt>
mov    %ebx,%edi
not    %edi
shr    $0x1f,%edi
call   1030 <assert@plt>
mov    %ebx,%edi
mov    %ebp,%esi
mov    %r14d,%edx
mov    %r12d,%ecx
call   1040 <emit_writeword_indexed_tlb@plt>
add    $0x4,%ebp
mov    %r15d,%edi
mov    %ebp,%esi
mov    %r14d,%edx
mov    %r12d,%ecx
pop    %rbx
pop    %r12
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) {
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32
%10 = alloca i32
store i32 %0, i32* %6
store i32 %1, i32* %7
store i32 %2, i32* %8
store i32 %3, i32* %9
store i32 %4, i32* %10
%11 = load i32, i32* %10
%12 = icmp sge i32 %11, 0
%13 = zext i1 %12 to i32
%14 = call i32 @assert(i32 %13)
%15 = load i32, i32* %6
%16 = icmp sge i32 %15, 0
%17 = zext i1 %16 to i32
%18 = call i32 @assert(i32 %17)
%19 = load i32, i32* %6
%20 = load i32, i32* %8
%21 = load i32, i32* %9
%22 = load i32, i32* %10
%23 = call i32 @emit_writeword_indexed_tlb(i32 %19, i32 %20, i32 %21, i32 %22)
%24 = load i32, i32* %7
%25 = load i32, i32* %8
%26 = add nsw i32 %25, 4
%27 = load i32, i32* %9
%28 = load i32, i32* %10
%29 = call i32 @emit_writeword_indexed_tlb(i32 %24, 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) {
%6 = xor i32 %4, -1
%7 = lshr i32 %6, 31
%8 = tail call i32 @assert(i32 %7)
%9 = xor i32 %0, -1
%10 = lshr i32 %9, 31
%11 = tail call i32 @assert(i32 %10)
%12 = tail call i32 @emit_writeword_indexed_tlb(i32 %0, i32 %2, i32 %3, i32 %4)
%13 = add nsw i32 %2, 4
%14 = tail call i32 @emit_writeword_indexed_tlb(i32 %1, i32 %13, i32 %3, i32 %4)
ret void
}