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

/* Variables and functions */
int /*<<< orphan*/ putc_volapuk(int, int /*<<< orphan*/);
int /*<<< orphan*/ putchar(int);
int /*<<< orphan*/ stdout;
int utf8_getc(int /*<<< orphan*/ *);
void process(FILE *fd) {
  int c;
  for (;;) {
    c = utf8_getc(fd);
    if (c < 0)
      break;
    if (c >= 0x400 && c < 0x4ff)
      putc_volapuk(c, stdout);
    else
      putchar(c & 0xff);
  }
}


x86 assembly (clang, -O0):
<process>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <utf8_getc@plt>
mov    %eax,-0xc(%rbp)
cmpl   $0x0,-0xc(%rbp)
jge    1157 <process+0x27>
jmp    119a <process+0x6a>
cmpl   $0x400,-0xc(%rbp)
jl     1187 <process+0x57>
cmpl   $0x4ff,-0xc(%rbp)
jge    1187 <process+0x57>
mov    -0xc(%rbp),%edi
mov    0x2e65(%rip),%rax
mov    (%rax),%esi
call   1050 <putc_volapuk@plt>
jmp    1195 <process+0x65>
mov    -0xc(%rbp),%edi
and    $0xff,%edi
call   1030 <putchar@plt>
jmp    113c <process+0xc>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<process>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%rbx
call   1040 <utf8_getc@plt>
test   %eax,%eax
js     117e <process+0x4e>
mov    0x2e99(%rip),%r14
jmp    1164 <process+0x34>
nopl   0x0(%rax)
movzbl %al,%edi
call   1030 <putchar@plt>
mov    %rbx,%rdi
call   1040 <utf8_getc@plt>
test   %eax,%eax
js     117e <process+0x4e>
lea    -0x400(%rax),%ecx
cmp    $0xfe,%ecx
ja     1150 <process+0x20>
mov    (%r14),%esi
mov    %eax,%edi
call   1050 <putc_volapuk@plt>
jmp    1158 <process+0x28>
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@stdout = global i32 0
define void @process(i32* %0) {
%2 = alloca i32*
%3 = alloca i32
store i32* %0, i32** %2
br label %4
4: ; preds = %24, %1
%5 = load i32*, i32** %2
%6 = call i32 @utf8_getc(i32* %5)
store i32 %6, i32* %3
%7 = load i32, i32* %3
%8 = icmp slt i32 %7, 0
br i1 %8, label %9, label %10
9: ; preds = %4
br label %25
10: ; preds = %4
%11 = load i32, i32* %3
%12 = icmp sge i32 %11, 1024
br i1 %12, label %13, label %20
13: ; preds = %10
%14 = load i32, i32* %3
%15 = icmp slt i32 %14, 1279
br i1 %15, label %16, label %20
16: ; preds = %13
%17 = load i32, i32* %3
%18 = load i32, i32* @stdout
%19 = call i32 @putc_volapuk(i32 %17, i32 %18)
br label %24
20: ; preds = %13, %10
%21 = load i32, i32* %3
%22 = and i32 %21, 255
%23 = call i32 @putchar(i32 %22)
br label %24
24: ; preds = %20, %16
br label %4
25: ; preds = %9
ret void
}

LLVM IR (-O2):
@stdout = global i32 0
define void @process(i32* %0) {
%2 = tail call i32 @utf8_getc(i32* %0)
%3 = icmp slt i32 %2, 0
br i1 %3, label %17, label %4
4: ; preds = %1, %14
%5 = phi i32 [ %15, %14 ], [ %2, %1 ]
%6 = add nsw i32 %5, -1024
%7 = icmp ult i32 %6, 255
br i1 %7, label %8, label %11
8: ; preds = %4
%9 = load i32, i32* @stdout
%10 = tail call i32 @putc_volapuk(i32 %5, i32 %9)
br label %14
11: ; preds = %4
%12 = and i32 %5, 255
%13 = tail call i32 @putchar(i32 %12)
br label %14
14: ; preds = %11, %8
%15 = tail call i32 @utf8_getc(i32* %0)
%16 = icmp slt i32 %15, 0
br i1 %16, label %17, label %4
17: ; preds = %14, %1
ret void
}