#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*/ printf(char *);
scalar_t__ valid_language(char *);
int test_valid_language() {
  printf("test_valid_language...");
  assert(valid_language("english uk") != 0);
  assert(valid_language("klingon") == 0);
  assert(valid_language("russian") != 0);
  printf("ok\n");
  return 1;
}


x86 assembly (clang, -O0):
<test_valid_language>:
push   %rbp
mov    %rsp,%rbp
lea    0xec5(%rip),%rdi
call   1030 <printf@plt>
lea    0xed0(%rip),%rdi
call   1050 <valid_language@plt>
cmp    $0x0,%rax
setne  %al
and    $0x1,%al
movzbl %al,%edi
call   1040 <assert@plt>
lea    0xebe(%rip),%rdi
call   1050 <valid_language@plt>
cmp    $0x0,%rax
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1040 <assert@plt>
lea    0xea9(%rip),%rdi
call   1050 <valid_language@plt>
cmp    $0x0,%rax
setne  %al
and    $0x1,%al
movzbl %al,%edi
call   1040 <assert@plt>
lea    0xe94(%rip),%rdi
call   1030 <printf@plt>
mov    $0x1,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_valid_language>:
push   %rax
lea    0xeb8(%rip),%rdi
call   1040 <printf@plt>
lea    0xec3(%rip),%rdi
call   1060 <valid_language@plt>
xor    %edi,%edi
test   %rax,%rax
setne  %dil
call   1050 <assert@plt>
lea    0xeb4(%rip),%rdi
call   1060 <valid_language@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
call   1050 <assert@plt>
lea    0xea2(%rip),%rdi
call   1060 <valid_language@plt>
xor    %edi,%edi
test   %rax,%rax
setne  %dil
call   1050 <assert@plt>
lea    0xe90(%rip),%rdi
call   1030 <puts@plt>
mov    $0x1,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [23 x i8] c"test_valid_language...\00"
@.str.1 = [11 x i8] c"english uk\00"
@.str.2 = [8 x i8] c"klingon\00"
@.str.3 = [8 x i8] c"russian\00"
@.str.4 = [4 x i8] c"ok\0A\00"
define i32 @test_valid_language() {
%1 = call i32 @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str, i64 0, i64 0))
%2 = call i64 @valid_language(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.1, i64 0, i64 0))
%3 = icmp ne i64 %2, 0
%4 = zext i1 %3 to i32
%5 = call i32 @assert(i32 %4)
%6 = call i64 @valid_language(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.2, i64 0, i64 0))
%7 = icmp eq i64 %6, 0
%8 = zext i1 %7 to i32
%9 = call i32 @assert(i32 %8)
%10 = call i64 @valid_language(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.3, i64 0, i64 0))
%11 = icmp ne i64 %10, 0
%12 = zext i1 %11 to i32
%13 = call i32 @assert(i32 %12)
%14 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.4, i64 0, i64 0))
ret i32 1
}

LLVM IR (-O2):
@.str = [23 x i8] c"test_valid_language...\00"
@.str.1 = [11 x i8] c"english uk\00"
@.str.2 = [8 x i8] c"klingon\00"
@.str.3 = [8 x i8] c"russian\00"
@str = [3 x i8] c"ok\00"
define i32 @test_valid_language() {
%1 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([23 x i8], [23 x i8]* @.str, i64 0, i64 0))
%2 = tail call i64 @valid_language(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.1, i64 0, i64 0))
%3 = icmp ne i64 %2, 0
%4 = zext i1 %3 to i32
%5 = tail call i32 @assert(i32 %4)
%6 = tail call i64 @valid_language(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.2, i64 0, i64 0))
%7 = icmp eq i64 %6, 0
%8 = zext i1 %7 to i32
%9 = tail call i32 @assert(i32 %8)
%10 = tail call i64 @valid_language(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.3, i64 0, i64 0))
%11 = icmp ne i64 %10, 0
%12 = zext i1 %11 to i32
%13 = tail call i32 @assert(i32 %12)
%14 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([3 x i8], [3 x i8]* @str, i64 0, i64 0))
ret i32 1
}