#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 */
struct v4l2_sliced_vbi_data {
  int *data;
};
typedef int c;

/* Variables and functions */
scalar_t__ odd_parity(int);
void decode_xds(struct v4l2_sliced_vbi_data *s) {
  char c;
  c = odd_parity(s->data[0]) ? s->data[0] & 0x7F : '?';
  c = ((((c)&0x7F) < 0x20 || ((c)&0x7F) > 0x7E) ? '.' : ((c)&0x7F));
  c = odd_parity(s->data[1]) ? s->data[1] & 0x7F : '?';
  c = ((((c)&0x7F) < 0x20 || ((c)&0x7F) > 0x7E) ? '.' : ((c)&0x7F));
}


x86 assembly (clang, -O0):
<decode_xds>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%rax
mov    (%rax),%edi
call   1030 <odd_parity@plt>
cmp    $0x0,%rax
je     1148 <decode_xds+0x38>
mov    -0x8(%rbp),%rax
mov    (%rax),%rax
mov    (%rax),%eax
and    $0x7f,%eax
mov    %eax,-0x10(%rbp)
jmp    1155 <decode_xds+0x45>
mov    $0x3f,%eax
mov    %eax,-0x10(%rbp)
jmp    1155 <decode_xds+0x45>
mov    -0x10(%rbp),%eax
mov    %al,-0x9(%rbp)
movsbl -0x9(%rbp),%eax
and    $0x7f,%eax
cmp    $0x20,%eax
jl     117b <decode_xds+0x6b>
movsbl -0x9(%rbp),%eax
and    $0x7f,%eax
cmp    $0x7e,%eax
jle    1188 <decode_xds+0x78>
mov    $0x2e,%eax
mov    %eax,-0x14(%rbp)
jmp    1192 <decode_xds+0x82>
movsbl -0x9(%rbp),%eax
and    $0x7f,%eax
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
mov    %al,-0x9(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%rax
mov    0x4(%rax),%edi
call   1030 <odd_parity@plt>
cmp    $0x0,%rax
je     11c6 <decode_xds+0xb6>
mov    -0x8(%rbp),%rax
mov    (%rax),%rax
mov    0x4(%rax),%eax
and    $0x7f,%eax
mov    %eax,-0x18(%rbp)
jmp    11d3 <decode_xds+0xc3>
mov    $0x3f,%eax
mov    %eax,-0x18(%rbp)
jmp    11d3 <decode_xds+0xc3>
mov    -0x18(%rbp),%eax
mov    %al,-0x9(%rbp)
movsbl -0x9(%rbp),%eax
and    $0x7f,%eax
cmp    $0x20,%eax
jl     11f9 <decode_xds+0xe9>
movsbl -0x9(%rbp),%eax
and    $0x7f,%eax
cmp    $0x7e,%eax
jle    1206 <decode_xds+0xf6>
mov    $0x2e,%eax
mov    %eax,-0x1c(%rbp)
jmp    1210 <decode_xds+0x100>
movsbl -0x9(%rbp),%eax
and    $0x7f,%eax
mov    %eax,-0x1c(%rbp)
mov    -0x1c(%rbp),%eax
mov    %al,-0x9(%rbp)
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<decode_xds>:
push   %rbx
mov    %rdi,%rbx
mov    (%rdi),%rax
mov    (%rax),%edi
call   1030 <odd_parity@plt>
mov    (%rbx),%rax
mov    0x4(%rax),%edi
pop    %rbx
jmp    1030 <odd_parity@plt>

LLVM IR (-O0):
%struct.v4l2_sliced_vbi_data = type { i32* }
define void @decode_xds(%struct.v4l2_sliced_vbi_data* %0) {
%2 = alloca %struct.v4l2_sliced_vbi_data*
%3 = alloca i8
store %struct.v4l2_sliced_vbi_data* %0, %struct.v4l2_sliced_vbi_data** %2
%4 = load %struct.v4l2_sliced_vbi_data*, %struct.v4l2_sliced_vbi_data** %2
%5 = getelementptr inbounds %struct.v4l2_sliced_vbi_data, %struct.v4l2_sliced_vbi_data* %4, i32 0, i32 0
%6 = load i32*, i32** %5
%7 = getelementptr inbounds i32, i32* %6, i64 0
%8 = load i32, i32* %7
%9 = call i64 @odd_parity(i32 %8)
%10 = icmp ne i64 %9, 0
br i1 %10, label %11, label %18
11: ; preds = %1
%12 = load %struct.v4l2_sliced_vbi_data*, %struct.v4l2_sliced_vbi_data** %2
%13 = getelementptr inbounds %struct.v4l2_sliced_vbi_data, %struct.v4l2_sliced_vbi_data* %12, i32 0, i32 0
%14 = load i32*, i32** %13
%15 = getelementptr inbounds i32, i32* %14, i64 0
%16 = load i32, i32* %15
%17 = and i32 %16, 127
br label %19
18: ; preds = %1
br label %19
19: ; preds = %18, %11
%20 = phi i32 [ %17, %11 ], [ 63, %18 ]
%21 = trunc i32 %20 to i8
store i8 %21, i8* %3
%22 = load i8, i8* %3
%23 = sext i8 %22 to i32
%24 = and i32 %23, 127
%25 = icmp slt i32 %24, 32
br i1 %25, label %31, label %26
26: ; preds = %19
%27 = load i8, i8* %3
%28 = sext i8 %27 to i32
%29 = and i32 %28, 127
%30 = icmp sgt i32 %29, 126
br i1 %30, label %31, label %32
31: ; preds = %26, %19
br label %36
32: ; preds = %26
%33 = load i8, i8* %3
%34 = sext i8 %33 to i32
%35 = and i32 %34, 127
br label %36
36: ; preds = %32, %31
%37 = phi i32 [ 46, %31 ], [ %35, %32 ]
%38 = trunc i32 %37 to i8
store i8 %38, i8* %3
%39 = load %struct.v4l2_sliced_vbi_data*, %struct.v4l2_sliced_vbi_data** %2
%40 = getelementptr inbounds %struct.v4l2_sliced_vbi_data, %struct.v4l2_sliced_vbi_data* %39, i32 0, i32 0
%41 = load i32*, i32** %40
%42 = getelementptr inbounds i32, i32* %41, i64 1
%43 = load i32, i32* %42
%44 = call i64 @odd_parity(i32 %43)
%45 = icmp ne i64 %44, 0
br i1 %45, label %46, label %53
46: ; preds = %36
%47 = load %struct.v4l2_sliced_vbi_data*, %struct.v4l2_sliced_vbi_data** %2
%48 = getelementptr inbounds %struct.v4l2_sliced_vbi_data, %struct.v4l2_sliced_vbi_data* %47, i32 0, i32 0
%49 = load i32*, i32** %48
%50 = getelementptr inbounds i32, i32* %49, i64 1
%51 = load i32, i32* %50
%52 = and i32 %51, 127
br label %54
53: ; preds = %36
br label %54
54: ; preds = %53, %46
%55 = phi i32 [ %52, %46 ], [ 63, %53 ]
%56 = trunc i32 %55 to i8
store i8 %56, i8* %3
%57 = load i8, i8* %3
%58 = sext i8 %57 to i32
%59 = and i32 %58, 127
%60 = icmp slt i32 %59, 32
br i1 %60, label %66, label %61
61: ; preds = %54
%62 = load i8, i8* %3
%63 = sext i8 %62 to i32
%64 = and i32 %63, 127
%65 = icmp sgt i32 %64, 126
br i1 %65, label %66, label %67
66: ; preds = %61, %54
br label %71
67: ; preds = %61
%68 = load i8, i8* %3
%69 = sext i8 %68 to i32
%70 = and i32 %69, 127
br label %71
71: ; preds = %67, %66
%72 = phi i32 [ 46, %66 ], [ %70, %67 ]
%73 = trunc i32 %72 to i8
store i8 %73, i8* %3
ret void
}

LLVM IR (-O2):
%struct.v4l2_sliced_vbi_data = type { i32* }
define void @decode_xds(%struct.v4l2_sliced_vbi_data* nocapture %0) {
%2 = getelementptr inbounds %struct.v4l2_sliced_vbi_data, %struct.v4l2_sliced_vbi_data* %0, i64 0, i32 0
%3 = load i32*, i32** %2
%4 = load i32, i32* %3
%5 = tail call i64 @odd_parity(i32 %4)
%6 = load i32*, i32** %2
%7 = getelementptr inbounds i32, i32* %6, i64 1
%8 = load i32, i32* %7
%9 = tail call i64 @odd_parity(i32 %8)
ret void
}