#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 fail(char *, int);
int getreg(int);
int /*<<< orphan*/ init_8n1();
int /*<<< orphan*/ printf(char *, ...);
int /*<<< orphan*/ send_char(char);
int /*<<< orphan*/ setreg(int, int);
int /*<<< orphan*/ test_mode(int);
void different_modes_test() {
  int speed, parity, length;
  printf("different modes test\n");
  init_8n1();
  printf("Passed line %i\n", 450);
  ((getreg(((0x9c000000) + 2)) == 0xc1) ? 1 : fail("?", 451));
  printf("Passed line %i\n", 452);
  for (speed = 1; speed < 5; speed++) {
    setreg(((0x9c000000) + 3), (0x80));
    setreg(((0x9c000000) + 1), speed >> 8);
    setreg(((0x9c000000) + 0), speed & 0xff);
    setreg(((0x9c000000) + 3), 0x03);
    test_mode(8);
    printf("Passed line %i\n", 461);
  }
  printf("Passed line %i\n", 463);
  setreg(((0x9c000000) + 3), (0x80));
  setreg(((0x9c000000) + 1), 1 >> 8);
  setreg(((0x9c000000) + 0), 1 & 0xff);
  printf("Passed line %i\n", 468);
  for (parity = 0; parity < 8; parity++)
    for (length = 0; length < 4; length++) {
      setreg(((0x9c000000) + 3), length | (0 << 2) | (parity << 3));
      test_mode(5 + length);
      printf("Passed line %i\n", 475);
    }
  printf("Passed line %i\n", 477);
  for (length = 0; length < 4; length++) {
    setreg(((0x9c000000) + 3), length | (1 << 2) | (0 << 3));
    test_mode(5 + length);
    printf("Passed line %i\n", 483);
  }
  printf("Passed line %i\n", 485);
  send_char('T');
  while (getreg(((0x9c000000) + 5)) != 0x60)
    ;
  setreg(((0x9c000000) + 3), (0x80));
  setreg(((0x9c000000) + 1), 2 >> 8);
  setreg(((0x9c000000) + 0), 2 & 0xff);
  setreg(((0x9c000000) + 3), 0x03);
  printf("Passed line %i\n", 494);
  while (!(getreg(((0x9c000000) + 5)) & 1))
    ;
  getreg(((0x9c000000) + 0));
  printf("Passed line %i\n", 497);
  send_char('T');
  while (getreg(((0x9c000000) + 5)) != 0x60)
    ;
  printf("Passed line %i\n", 501);
  printf("OK\n");
}


x86 assembly (clang, -O0):
<different_modes_test>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    0xe81(%rip),%rdi
mov    $0x0,%al
call   1060 <printf@plt>
mov    $0x0,%al
call   1090 <init_8n1@plt>
lea    0xe82(%rip),%rdi
mov    $0x1c2,%esi
mov    $0x0,%al
call   1060 <printf@plt>
mov    $0x9c000002,%edi
call   1080 <getreg@plt>
cmp    $0xc1,%eax
jne    11ba <different_modes_test+0x4a>
jmp    11cb <different_modes_test+0x5b>
lea    0xe65(%rip),%rdi
mov    $0x1c3,%esi
call   1040 <fail@plt>
lea    0xe44(%rip),%rdi
mov    $0x1c4,%esi
mov    $0x0,%al
call   1060 <printf@plt>
movl   $0x1,-0x4(%rbp)
cmpl   $0x5,-0x4(%rbp)
jge    125b <different_modes_test+0xeb>
mov    $0x9c000003,%edi
mov    $0x80,%esi
call   1050 <setreg@plt>
mov    -0x4(%rbp),%esi
sar    $0x8,%esi
mov    $0x9c000001,%edi
call   1050 <setreg@plt>
mov    -0x4(%rbp),%esi
and    $0xff,%esi
mov    $0x9c000000,%edi
call   1050 <setreg@plt>
mov    $0x9c000003,%edi
mov    $0x3,%esi
call   1050 <setreg@plt>
mov    $0x8,%edi
call   1030 <test_mode@plt>
lea    0xdd5(%rip),%rdi
mov    $0x1cd,%esi
mov    $0x0,%al
call   1060 <printf@plt>
mov    -0x4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
jmp    11e5 <different_modes_test+0x75>
lea    0xdb4(%rip),%rdi
mov    $0x1cf,%esi
mov    $0x0,%al
call   1060 <printf@plt>
mov    $0x9c000003,%edi
mov    $0x80,%esi
call   1050 <setreg@plt>
mov    $0x9c000001,%edi
xor    %esi,%esi
call   1050 <setreg@plt>
mov    $0x9c000000,%edi
mov    $0x1,%esi
call   1050 <setreg@plt>
lea    0xd77(%rip),%rdi
mov    $0x1d4,%esi
mov    $0x0,%al
call   1060 <printf@plt>
movl   $0x0,-0x8(%rbp)
cmpl   $0x8,-0x8(%rbp)
jge    1324 <different_modes_test+0x1b4>
movl   $0x0,-0xc(%rbp)
cmpl   $0x4,-0xc(%rbp)
jge    1311 <different_modes_test+0x1a1>
mov    -0xc(%rbp),%esi
or     $0x0,%esi
mov    -0x8(%rbp),%eax
shl    $0x3,%eax
or     %eax,%esi
mov    $0x9c000003,%edi
call   1050 <setreg@plt>
mov    -0xc(%rbp),%edi
add    $0x5,%edi
call   1030 <test_mode@plt>
lea    0xd1f(%rip),%rdi
mov    $0x1db,%esi
mov    $0x0,%al
call   1060 <printf@plt>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    12c3 <different_modes_test+0x153>
jmp    1316 <different_modes_test+0x1a6>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    12b2 <different_modes_test+0x142>
lea    0xceb(%rip),%rdi
mov    $0x1dd,%esi
mov    $0x0,%al
call   1060 <printf@plt>
movl   $0x0,-0xc(%rbp)
cmpl   $0x4,-0xc(%rbp)
jge    1387 <different_modes_test+0x217>
mov    -0xc(%rbp),%esi
or     $0x4,%esi
or     $0x0,%esi
mov    $0x9c000003,%edi
call   1050 <setreg@plt>
mov    -0xc(%rbp),%edi
add    $0x5,%edi
call   1030 <test_mode@plt>
lea    0xca9(%rip),%rdi
mov    $0x1e3,%esi
mov    $0x0,%al
call   1060 <printf@plt>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    133e <different_modes_test+0x1ce>
lea    0xc88(%rip),%rdi
mov    $0x1e5,%esi
mov    $0x0,%al
call   1060 <printf@plt>
mov    $0x54,%edi
call   1070 <send_char@plt>
mov    $0x9c000005,%edi
call   1080 <getreg@plt>
cmp    $0x60,%eax
je     13bc <different_modes_test+0x24c>
jmp    13a4 <different_modes_test+0x234>
mov    $0x9c000003,%edi
mov    $0x80,%esi
call   1050 <setreg@plt>
mov    $0x9c000001,%edi
xor    %esi,%esi
call   1050 <setreg@plt>
mov    $0x9c000000,%edi
mov    $0x2,%esi
call   1050 <setreg@plt>
mov    $0x9c000003,%edi
mov    $0x3,%esi
call   1050 <setreg@plt>
lea    0xc1a(%rip),%rdi
mov    $0x1ee,%esi
mov    $0x0,%al
call   1060 <printf@plt>
mov    $0x9c000005,%edi
call   1080 <getreg@plt>
and    $0x1,%eax
cmp    $0x0,%eax
setne  %al
xor    $0xff,%al
test   $0x1,%al
jne    142a <different_modes_test+0x2ba>
jmp    142f <different_modes_test+0x2bf>
jmp    1408 <different_modes_test+0x298>
mov    $0x9c000000,%edi
call   1080 <getreg@plt>
lea    0xbd6(%rip),%rdi
mov    $0x1f1,%esi
mov    $0x0,%al
call   1060 <printf@plt>
mov    $0x54,%edi
call   1070 <send_char@plt>
mov    $0x9c000005,%edi
call   1080 <getreg@plt>
cmp    $0x60,%eax
je     146e <different_modes_test+0x2fe>
jmp    1456 <different_modes_test+0x2e6>
lea    0xba1(%rip),%rdi
mov    $0x1f5,%esi
mov    $0x0,%al
call   1060 <printf@plt>
lea    0xba0(%rip),%rdi
mov    $0x0,%al
call   1060 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<different_modes_test>:
push   %r14
push   %rbx
push   %rax
lea    0xe87(%rip),%rdi
call   1040 <puts@plt>
xor    %eax,%eax
call   10a0 <init_8n1@plt>
lea    0xe62(%rip),%rdi
mov    $0x1c2,%esi
xor    %eax,%eax
call   1070 <printf@plt>
mov    $0x9c000002,%edi
call   1090 <getreg@plt>
cmp    $0xc1,%eax
je     11cc <different_modes_test+0x4c>
lea    0xe4e(%rip),%rdi
mov    $0x1c3,%esi
call   1050 <fail@plt>
lea    0xe2d(%rip),%r14
mov    %r14,%rdi
mov    $0x1c4,%esi
xor    %eax,%eax
call   1070 <printf@plt>
mov    $0x9c000003,%edi
mov    $0x80,%esi
call   1060 <setreg@plt>
mov    $0x9c000001,%edi
xor    %esi,%esi
call   1060 <setreg@plt>
mov    $0x9c000000,%edi
mov    $0x1,%esi
call   1060 <setreg@plt>
mov    $0x9c000003,%edi
mov    $0x3,%esi
call   1060 <setreg@plt>
mov    $0x8,%edi
call   1030 <test_mode@plt>
mov    %r14,%rdi
mov    $0x1cd,%esi
xor    %eax,%eax
call   1070 <printf@plt>
mov    $0x9c000003,%edi
mov    $0x80,%esi
call   1060 <setreg@plt>
mov    $0x9c000001,%edi
xor    %esi,%esi
call   1060 <setreg@plt>
mov    $0x9c000000,%edi
mov    $0x2,%esi
call   1060 <setreg@plt>
mov    $0x9c000003,%edi
mov    $0x3,%esi
call   1060 <setreg@plt>
mov    $0x8,%edi
call   1030 <test_mode@plt>
mov    %r14,%rdi
mov    $0x1cd,%esi
xor    %eax,%eax
call   1070 <printf@plt>
mov    $0x9c000003,%edi
mov    $0x80,%esi
call   1060 <setreg@plt>
mov    $0x9c000001,%edi
xor    %esi,%esi
call   1060 <setreg@plt>
mov    $0x9c000000,%edi
mov    $0x3,%esi
call   1060 <setreg@plt>
mov    $0x9c000003,%edi
mov    $0x3,%esi
call   1060 <setreg@plt>
mov    $0x8,%edi
call   1030 <test_mode@plt>
mov    %r14,%rdi
mov    $0x1cd,%esi
xor    %eax,%eax
call   1070 <printf@plt>
mov    $0x9c000003,%edi
mov    $0x80,%esi
call   1060 <setreg@plt>
mov    $0x9c000001,%edi
xor    %esi,%esi
call   1060 <setreg@plt>
mov    $0x9c000000,%edi
mov    $0x4,%esi
call   1060 <setreg@plt>
mov    $0x9c000003,%edi
mov    $0x3,%esi
call   1060 <setreg@plt>
mov    $0x8,%edi
call   1030 <test_mode@plt>
mov    %r14,%rdi
mov    $0x1cd,%esi
xor    %eax,%eax
call   1070 <printf@plt>
mov    %r14,%rdi
mov    $0x1cf,%esi
xor    %eax,%eax
call   1070 <printf@plt>
mov    $0x9c000003,%edi
mov    $0x80,%esi
call   1060 <setreg@plt>
mov    $0x9c000001,%edi
xor    %esi,%esi
call   1060 <setreg@plt>
mov    $0x9c000000,%edi
mov    $0x1,%esi
call   1060 <setreg@plt>
mov    %r14,%rdi
mov    $0x1d4,%esi
xor    %eax,%eax
call   1070 <printf@plt>
xor    %ebx,%ebx
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
mov    $0x9c000003,%edi
mov    %ebx,%esi
call   1060 <setreg@plt>
mov    $0x5,%edi
call   1030 <test_mode@plt>
mov    %r14,%rdi
mov    $0x1db,%esi
xor    %eax,%eax
call   1070 <printf@plt>
lea    0x1(%rbx),%esi
mov    $0x9c000003,%edi
call   1060 <setreg@plt>
mov    $0x6,%edi
call   1030 <test_mode@plt>
mov    %r14,%rdi
mov    $0x1db,%esi
xor    %eax,%eax
call   1070 <printf@plt>
lea    0x2(%rbx),%esi
mov    $0x9c000003,%edi
call   1060 <setreg@plt>
mov    $0x7,%edi
call   1030 <test_mode@plt>
mov    %r14,%rdi
mov    $0x1db,%esi
xor    %eax,%eax
call   1070 <printf@plt>
lea    0x3(%rbx),%esi
mov    $0x9c000003,%edi
call   1060 <setreg@plt>
mov    $0x8,%edi
call   1030 <test_mode@plt>
mov    %r14,%rdi
mov    $0x1db,%esi
xor    %eax,%eax
call   1070 <printf@plt>
add    $0x8,%ebx
cmp    $0x40,%ebx
jne    1380 <different_modes_test+0x200>
lea    0xbd6(%rip),%rbx
mov    %rbx,%rdi
mov    $0x1dd,%esi
xor    %eax,%eax
call   1070 <printf@plt>
mov    $0x9c000003,%edi
mov    $0x4,%esi
call   1060 <setreg@plt>
mov    $0x5,%edi
call   1030 <test_mode@plt>
mov    %rbx,%rdi
mov    $0x1e3,%esi
xor    %eax,%eax
call   1070 <printf@plt>
mov    $0x9c000003,%edi
mov    $0x5,%esi
call   1060 <setreg@plt>
mov    $0x6,%edi
call   1030 <test_mode@plt>
mov    %rbx,%rdi
mov    $0x1e3,%esi
xor    %eax,%eax
call   1070 <printf@plt>
mov    $0x9c000003,%edi
mov    $0x6,%esi
call   1060 <setreg@plt>
mov    $0x7,%edi
call   1030 <test_mode@plt>
mov    %rbx,%rdi
mov    $0x1e3,%esi
xor    %eax,%eax
call   1070 <printf@plt>
mov    $0x9c000003,%edi
mov    $0x7,%esi
call   1060 <setreg@plt>
mov    $0x8,%edi
call   1030 <test_mode@plt>
mov    %rbx,%rdi
mov    $0x1e3,%esi
xor    %eax,%eax
call   1070 <printf@plt>
mov    %rbx,%rdi
mov    $0x1e5,%esi
xor    %eax,%eax
call   1070 <printf@plt>
mov    $0x54,%edi
call   1080 <send_char@plt>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
mov    $0x9c000005,%edi
call   1090 <getreg@plt>
cmp    $0x60,%eax
jne    1500 <different_modes_test+0x380>
mov    $0x9c000003,%edi
mov    $0x80,%esi
call   1060 <setreg@plt>
mov    $0x9c000001,%edi
xor    %esi,%esi
call   1060 <setreg@plt>
mov    $0x9c000000,%edi
mov    $0x2,%esi
call   1060 <setreg@plt>
mov    $0x9c000003,%edi
mov    $0x3,%esi
call   1060 <setreg@plt>
lea    0xab1(%rip),%rdi
mov    $0x1ee,%esi
xor    %eax,%eax
call   1070 <printf@plt>
nopl   0x0(%rax,%rax,1)
mov    $0x9c000005,%edi
call   1090 <getreg@plt>
test   $0x1,%al
je     1560 <different_modes_test+0x3e0>
mov    $0x9c000000,%edi
call   1090 <getreg@plt>
lea    0xa81(%rip),%rdi
mov    $0x1f1,%esi
xor    %eax,%eax
call   1070 <printf@plt>
mov    $0x54,%edi
call   1080 <send_char@plt>
cs nopw 0x0(%rax,%rax,1)
nop
mov    $0x9c000005,%edi
call   1090 <getreg@plt>
cmp    $0x60,%eax
jne    15a0 <different_modes_test+0x420>
lea    0xa4a(%rip),%rdi
mov    $0x1f5,%esi
xor    %eax,%eax
call   1070 <printf@plt>
lea    0xa5e(%rip),%rdi
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1040 <puts@plt>

LLVM IR (-O0):
@.str = [22 x i8] c"different modes test\0A\00"
@.str.1 = [16 x i8] c"Passed line %i\0A\00"
@.str.2 = [2 x i8] c"?\00"
@.str.3 = [4 x i8] c"OK\0A\00"
define void @different_modes_test() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0))
%5 = call i32 (...) @init_8n1()
%6 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.1, i64 0, i64 0), i32 450)
%7 = call i32 @getreg(i32 -1677721598)
%8 = icmp eq i32 %7, 193
br i1 %8, label %9, label %10
9: ; preds = %0
br label %12
10: ; preds = %0
%11 = call i32 @fail(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0), i32 451)
br label %12
12: ; preds = %10, %9
%13 = phi i32 [ 1, %9 ], [ %11, %10 ]
%14 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.1, i64 0, i64 0), i32 452)
store i32 1, i32* %1
br label %15
15: ; preds = %29, %12
%16 = load i32, i32* %1
%17 = icmp slt i32 %16, 5
br i1 %17, label %18, label %32
18: ; preds = %15
%19 = call i32 @setreg(i32 -1677721597, i32 128)
%20 = load i32, i32* %1
%21 = ashr i32 %20, 8
%22 = call i32 @setreg(i32 -1677721599, i32 %21)
%23 = load i32, i32* %1
%24 = and i32 %23, 255
%25 = call i32 @setreg(i32 -1677721600, i32 %24)
%26 = call i32 @setreg(i32 -1677721597, i32 3)
%27 = call i32 @test_mode(i32 8)
%28 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.1, i64 0, i64 0), i32 461)
br label %29
29: ; preds = %18
%30 = load i32, i32* %1
%31 = add nsw i32 %30, 1
store i32 %31, i32* %1
br label %15
32: ; preds = %15
%33 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.1, i64 0, i64 0), i32 463)
%34 = call i32 @setreg(i32 -1677721597, i32 128)
%35 = call i32 @setreg(i32 -1677721599, i32 0)
%36 = call i32 @setreg(i32 -1677721600, i32 1)
%37 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.1, i64 0, i64 0), i32 468)
store i32 0, i32* %2
br label %38
38: ; preds = %60, %32
%39 = load i32, i32* %2
%40 = icmp slt i32 %39, 8
br i1 %40, label %41, label %63
41: ; preds = %38
store i32 0, i32* %3
br label %42
42: ; preds = %56, %41
%43 = load i32, i32* %3
%44 = icmp slt i32 %43, 4
br i1 %44, label %45, label %59
45: ; preds = %42
%46 = load i32, i32* %3
%47 = or i32 %46, 0
%48 = load i32, i32* %2
%49 = shl i32 %48, 3
%50 = or i32 %47, %49
%51 = call i32 @setreg(i32 -1677721597, i32 %50)
%52 = load i32, i32* %3
%53 = add nsw i32 5, %52
%54 = call i32 @test_mode(i32 %53)
%55 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.1, i64 0, i64 0), i32 475)
br label %56
56: ; preds = %45
%57 = load i32, i32* %3
%58 = add nsw i32 %57, 1
store i32 %58, i32* %3
br label %42
59: ; preds = %42
br label %60
60: ; preds = %59
%61 = load i32, i32* %2
%62 = add nsw i32 %61, 1
store i32 %62, i32* %2
br label %38
63: ; preds = %38
%64 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.1, i64 0, i64 0), i32 477)
store i32 0, i32* %3
br label %65
65: ; preds = %77, %63
%66 = load i32, i32* %3
%67 = icmp slt i32 %66, 4
br i1 %67, label %68, label %80
68: ; preds = %65
%69 = load i32, i32* %3
%70 = or i32 %69, 4
%71 = or i32 %70, 0
%72 = call i32 @setreg(i32 -1677721597, i32 %71)
%73 = load i32, i32* %3
%74 = add nsw i32 5, %73
%75 = call i32 @test_mode(i32 %74)
%76 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.1, i64 0, i64 0), i32 483)
br label %77
77: ; preds = %68
%78 = load i32, i32* %3
%79 = add nsw i32 %78, 1
store i32 %79, i32* %3
br label %65
80: ; preds = %65
%81 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.1, i64 0, i64 0), i32 485)
%82 = call i32 @send_char(i8 signext 84)
br label %83
83: ; preds = %86, %80
%84 = call i32 @getreg(i32 -1677721595)
%85 = icmp ne i32 %84, 96
br i1 %85, label %86, label %87
86: ; preds = %83
br label %83
87: ; preds = %83
%88 = call i32 @setreg(i32 -1677721597, i32 128)
%89 = call i32 @setreg(i32 -1677721599, i32 0)
%90 = call i32 @setreg(i32 -1677721600, i32 2)
%91 = call i32 @setreg(i32 -1677721597, i32 3)
%92 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.1, i64 0, i64 0), i32 494)
br label %93
93: ; preds = %98, %87
%94 = call i32 @getreg(i32 -1677721595)
%95 = and i32 %94, 1
%96 = icmp ne i32 %95, 0
%97 = xor i1 %96, true
br i1 %97, label %98, label %99
98: ; preds = %93
br label %93
99: ; preds = %93
%100 = call i32 @getreg(i32 -1677721600)
%101 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.1, i64 0, i64 0), i32 497)
%102 = call i32 @send_char(i8 signext 84)
br label %103
103: ; preds = %106, %99
%104 = call i32 @getreg(i32 -1677721595)
%105 = icmp ne i32 %104, 96
br i1 %105, label %106, label %107
106: ; preds = %103
br label %103
107: ; preds = %103
%108 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.1, i64 0, i64 0), i32 501)
%109 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.3, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str.1 = [16 x i8] c"Passed line %i\0A\00"
@.str.2 = [2 x i8] c"?\00"
@str = [21 x i8] c"different modes test\00"
@str.4 = [3 x i8] c"OK\00"
define void @different_modes_test() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([21 x i8], [21 x i8]* @str, i64 0, i64 0))
%2 = tail call i32 (...) @init_8n1()
%3 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([16 x i8], [16 x i8]* @.str.1, i64 0, i64 0), i32 450)
%4 = tail call i32 @getreg(i32 -1677721598)
%5 = icmp eq i32 %4, 193
br i1 %5, label %8, label %6
6: ; preds = %0
%7 = tail call i32 @fail(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0), i32 451)
br label %8
8: ; preds = %0, %6
%9 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([16 x i8], [16 x i8]* @.str.1, i64 0, i64 0), i32 452)
%10 = tail call i32 @setreg(i32 -1677721597, i32 128)
%11 = tail call i32 @setreg(i32 -1677721599, i32 0)
%12 = tail call i32 @setreg(i32 -1677721600, i32 1)
%13 = tail call i32 @setreg(i32 -1677721597, i32 3)
%14 = tail call i32 @test_mode(i32 8)
%15 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([16 x i8], [16 x i8]* @.str.1, i64 0, i64 0), i32 461)
%16 = tail call i32 @setreg(i32 -1677721597, i32 128)
%17 = tail call i32 @setreg(i32 -1677721599, i32 0)
%18 = tail call i32 @setreg(i32 -1677721600, i32 2)
%19 = tail call i32 @setreg(i32 -1677721597, i32 3)
%20 = tail call i32 @test_mode(i32 8)
%21 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([16 x i8], [16 x i8]* @.str.1, i64 0, i64 0), i32 461)
%22 = tail call i32 @setreg(i32 -1677721597, i32 128)
%23 = tail call i32 @setreg(i32 -1677721599, i32 0)
%24 = tail call i32 @setreg(i32 -1677721600, i32 3)
%25 = tail call i32 @setreg(i32 -1677721597, i32 3)
%26 = tail call i32 @test_mode(i32 8)
%27 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([16 x i8], [16 x i8]* @.str.1, i64 0, i64 0), i32 461)
%28 = tail call i32 @setreg(i32 -1677721597, i32 128)
%29 = tail call i32 @setreg(i32 -1677721599, i32 0)
%30 = tail call i32 @setreg(i32 -1677721600, i32 4)
%31 = tail call i32 @setreg(i32 -1677721597, i32 3)
%32 = tail call i32 @test_mode(i32 8)
%33 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([16 x i8], [16 x i8]* @.str.1, i64 0, i64 0), i32 461)
%34 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([16 x i8], [16 x i8]* @.str.1, i64 0, i64 0), i32 463)
%35 = tail call i32 @setreg(i32 -1677721597, i32 128)
%36 = tail call i32 @setreg(i32 -1677721599, i32 0)
%37 = tail call i32 @setreg(i32 -1677721600, i32 1)
%38 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([16 x i8], [16 x i8]* @.str.1, i64 0, i64 0), i32 468)
br label %39
39: ; preds = %8, %39
%40 = phi i32 [ 0, %8 ], [ %57, %39 ]
%41 = shl i32 %40, 3
%42 = tail call i32 @setreg(i32 -1677721597, i32 %41)
%43 = tail call i32 @test_mode(i32 5)
%44 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([16 x i8], [16 x i8]* @.str.1, i64 0, i64 0), i32 475)
%45 = or i32 %41, 1
%46 = tail call i32 @setreg(i32 -1677721597, i32 %45)
%47 = tail call i32 @test_mode(i32 6)
%48 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([16 x i8], [16 x i8]* @.str.1, i64 0, i64 0), i32 475)
%49 = or i32 %41, 2
%50 = tail call i32 @setreg(i32 -1677721597, i32 %49)
%51 = tail call i32 @test_mode(i32 7)
%52 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([16 x i8], [16 x i8]* @.str.1, i64 0, i64 0), i32 475)
%53 = or i32 %41, 3
%54 = tail call i32 @setreg(i32 -1677721597, i32 %53)
%55 = tail call i32 @test_mode(i32 8)
%56 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([16 x i8], [16 x i8]* @.str.1, i64 0, i64 0), i32 475)
%57 = add nuw nsw i32 %40, 1
%58 = icmp eq i32 %57, 8
br i1 %58, label %59, label %39
59: ; preds = %39
%60 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([16 x i8], [16 x i8]* @.str.1, i64 0, i64 0), i32 477)
%61 = tail call i32 @setreg(i32 -1677721597, i32 4)
%62 = tail call i32 @test_mode(i32 5)
%63 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([16 x i8], [16 x i8]* @.str.1, i64 0, i64 0), i32 483)
%64 = tail call i32 @setreg(i32 -1677721597, i32 5)
%65 = tail call i32 @test_mode(i32 6)
%66 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([16 x i8], [16 x i8]* @.str.1, i64 0, i64 0), i32 483)
%67 = tail call i32 @setreg(i32 -1677721597, i32 6)
%68 = tail call i32 @test_mode(i32 7)
%69 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([16 x i8], [16 x i8]* @.str.1, i64 0, i64 0), i32 483)
%70 = tail call i32 @setreg(i32 -1677721597, i32 7)
%71 = tail call i32 @test_mode(i32 8)
%72 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([16 x i8], [16 x i8]* @.str.1, i64 0, i64 0), i32 483)
%73 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([16 x i8], [16 x i8]* @.str.1, i64 0, i64 0), i32 485)
%74 = tail call i32 @send_char(i8 signext 84)
br label %75
75: ; preds = %75, %59
%76 = tail call i32 @getreg(i32 -1677721595)
%77 = icmp eq i32 %76, 96
br i1 %77, label %78, label %75
78: ; preds = %75
%79 = tail call i32 @setreg(i32 -1677721597, i32 128)
%80 = tail call i32 @setreg(i32 -1677721599, i32 0)
%81 = tail call i32 @setreg(i32 -1677721600, i32 2)
%82 = tail call i32 @setreg(i32 -1677721597, i32 3)
%83 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([16 x i8], [16 x i8]* @.str.1, i64 0, i64 0), i32 494)
br label %84
84: ; preds = %84, %78
%85 = tail call i32 @getreg(i32 -1677721595)
%86 = and i32 %85, 1
%87 = icmp eq i32 %86, 0
br i1 %87, label %84, label %88
88: ; preds = %84
%89 = tail call i32 @getreg(i32 -1677721600)
%90 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([16 x i8], [16 x i8]* @.str.1, i64 0, i64 0), i32 497)
%91 = tail call i32 @send_char(i8 signext 84)
br label %92
92: ; preds = %92, %88
%93 = tail call i32 @getreg(i32 -1677721595)
%94 = icmp eq i32 %93, 96
br i1 %94, label %95, label %92
95: ; preds = %92
%96 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([16 x i8], [16 x i8]* @.str.1, i64 0, i64 0), i32 501)
%97 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([3 x i8], [3 x i8]* @str.4, i64 0, i64 0))
ret void
}