#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 */
typedef int /*<<< orphan*/ uint8_t;
typedef int uint32_t;
typedef int /*<<< orphan*/ uint16_t;

/* Variables and functions */
int /*<<< orphan*/ *_hs_text_decode_utf7_int(int /*<<< orphan*/ *const,
                                             size_t *,
                                             int /*<<< orphan*/ const **,
                                             int /*<<< orphan*/ const *,
                                             int /*<<< orphan*/ *, int *);
uint8_t const *_hs_text_decode_utf7_state(uint16_t *const dest, size_t *destoff,
                                          const uint8_t **src,
                                          const uint8_t *srcend,
                                          uint16_t *codepoint0,
                                          uint32_t *state0) {
  uint8_t const *ret =
      _hs_text_decode_utf7_int(dest, destoff, src, srcend, codepoint0, state0);
  if (*state0 & 0x000000ff == 2)
    ret -= 1;
  return ret;
}


x86 assembly (clang, -O0):
<_hs_text_decode_utf7_state>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    %r8,-0x28(%rbp)
mov    %r9,-0x30(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
mov    -0x20(%rbp),%rcx
mov    -0x28(%rbp),%r8
mov    -0x30(%rbp),%r9
call   1030 <_hs_text_decode_utf7_int@plt>
mov    %rax,-0x38(%rbp)
mov    -0x30(%rbp),%rax
mov    (%rax),%eax
and    $0x0,%eax
cmp    $0x0,%eax
je     116f <_hs_text_decode_utf7_state+0x5f>
mov    -0x38(%rbp),%rax
add    $0xfffffffffffffffc,%rax
mov    %rax,-0x38(%rbp)
mov    -0x38(%rbp),%rax
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<_hs_text_decode_utf7_state>:
jmp    1030 <_hs_text_decode_utf7_int@plt>

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

LLVM IR (-O2):
define i32* @_hs_text_decode_utf7_state(i32* %0, i64* %1, i32** %2, i32* %3, i32* %4, i32* %5) {
%7 = tail call i32* @_hs_text_decode_utf7_int(i32* %0, i64* %1, i32** %2, i32* %3, i32* %4, i32* %5)
ret i32* %7
}