#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 termios {
  int c_iflag;
  int *c_cc;
  unsigned short c_cflag;
  scalar_t__ c_line;
  scalar_t__ c_lflag;
  scalar_t__ c_oflag;
};

/* Variables and functions */
unsigned short B1200;
unsigned short B19200;
unsigned short B2400;
unsigned short B4800;
unsigned short B9600;
int IGNBRK;
int IGNPAR;
int /*<<< orphan*/ TCSAFLUSH;
size_t VMIN;
size_t VTIME;
int /*<<< orphan*/ tcgetattr(int, struct termios *);
int /*<<< orphan*/ tcsetattr(int, int /*<<< orphan*/, struct termios *);
int /*<<< orphan*/ usleep(int);
int /*<<< orphan*/ write(int, char *, int);
int setspeed(int fd, int old, int new, int needtowrite, unsigned short flags) {
  struct termios tty;
  char *c;
  tcgetattr(fd, &tty);
  tty.c_iflag = IGNBRK | IGNPAR;
  tty.c_oflag = 0;
  tty.c_lflag = 0;
  tty.c_line = 0;
  tty.c_cc[VTIME] = 0;
  tty.c_cc[VMIN] = 1;
  switch (old) {
  case 19200:
    tty.c_cflag = flags | B19200;
    break;
  case 9600:
    tty.c_cflag = flags | B9600;
    break;
  case 4800:
    tty.c_cflag = flags | B4800;
    break;
  case 2400:
    tty.c_cflag = flags | B2400;
    break;
  case 1200:
  default:
    tty.c_cflag = flags | B1200;
    break;
  }
  tcsetattr(fd, TCSAFLUSH, &tty);
  switch (new) {
  case 19200:
    c = "*r";
    tty.c_cflag = flags | B19200;
    break;
  case 9600:
    c = "*q";
    tty.c_cflag = flags | B9600;
    break;
  case 4800:
    c = "*p";
    tty.c_cflag = flags | B4800;
    break;
  case 2400:
    c = "*o";
    tty.c_cflag = flags | B2400;
    break;
  case 1200:
  default:
    c = "*n";
    tty.c_cflag = flags | B1200;
    break;
  }
  if (needtowrite)
    write(fd, c, 2);
  usleep(100000);
  tcsetattr(fd, TCSAFLUSH, &tty);
  return 0;
}


x86 assembly (clang, -O0):
<setspeed>:
push   %rbp
mov    %rsp,%rbp
sub    $0x60,%rsp
mov    %r8w,%ax
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    %ecx,-0x10(%rbp)
mov    %ax,-0x12(%rbp)
mov    -0x4(%rbp),%edi
lea    -0x48(%rbp),%rsi
call   1040 <tcgetattr@plt>
mov    0x2e39(%rip),%rax
mov    (%rax),%eax
mov    0x2e20(%rip),%rcx
mov    (%rcx),%ecx
or     %ecx,%eax
mov    %eax,-0x48(%rbp)
movq   $0x0,-0x20(%rbp)
movq   $0x0,-0x28(%rbp)
movq   $0x0,-0x30(%rbp)
mov    -0x40(%rbp),%rax
mov    0x2dfe(%rip),%rcx
mov    (%rcx),%rcx
movl   $0x0,(%rax,%rcx,4)
mov    -0x40(%rbp),%rax
mov    0x2e11(%rip),%rcx
mov    (%rcx),%rcx
movl   $0x1,(%rax,%rcx,4)
mov    -0x8(%rbp),%eax
mov    %eax,-0x54(%rbp)
sub    $0x4b0,%eax
je     1287 <setspeed+0x147>
jmp    11d7 <setspeed+0x97>
mov    -0x54(%rbp),%eax
sub    $0x960,%eax
je     126e <setspeed+0x12e>
jmp    11ea <setspeed+0xaa>
mov    -0x54(%rbp),%eax
sub    $0x12c0,%eax
je     1255 <setspeed+0x115>
jmp    11fd <setspeed+0xbd>
mov    -0x54(%rbp),%eax
sub    $0x2580,%eax
je     123c <setspeed+0xfc>
jmp    1210 <setspeed+0xd0>
mov    -0x54(%rbp),%eax
sub    $0x4b00,%eax
jne    128c <setspeed+0x14c>
jmp    1223 <setspeed+0xe3>
movzwl -0x12(%rbp),%eax
mov    0x2dc2(%rip),%rcx
movzwl (%rcx),%ecx
or     %ecx,%eax
mov    %ax,-0x38(%rbp)
jmp    12a0 <setspeed+0x160>
movzwl -0x12(%rbp),%eax
mov    0x2d89(%rip),%rcx
movzwl (%rcx),%ecx
or     %ecx,%eax
mov    %ax,-0x38(%rbp)
jmp    12a0 <setspeed+0x160>
movzwl -0x12(%rbp),%eax
mov    0x2d78(%rip),%rcx
movzwl (%rcx),%ecx
or     %ecx,%eax
mov    %ax,-0x38(%rbp)
jmp    12a0 <setspeed+0x160>
movzwl -0x12(%rbp),%eax
mov    0x2d3f(%rip),%rcx
movzwl (%rcx),%ecx
or     %ecx,%eax
mov    %ax,-0x38(%rbp)
jmp    12a0 <setspeed+0x160>
jmp    128c <setspeed+0x14c>
movzwl -0x12(%rbp),%eax
mov    0x2d19(%rip),%rcx
movzwl (%rcx),%ecx
or     %ecx,%eax
mov    %ax,-0x38(%rbp)
mov    -0x4(%rbp),%edi
mov    0x2d36(%rip),%rax
mov    (%rax),%esi
lea    -0x48(%rbp),%rdx
call   1050 <tcsetattr@plt>
mov    -0xc(%rbp),%eax
mov    %eax,-0x58(%rbp)
sub    $0x4b0,%eax
je     13a7 <setspeed+0x267>
jmp    12cb <setspeed+0x18b>
mov    -0x58(%rbp),%eax
sub    $0x960,%eax
je     1383 <setspeed+0x243>
jmp    12de <setspeed+0x19e>
mov    -0x58(%rbp),%eax
sub    $0x12c0,%eax
je     135f <setspeed+0x21f>
jmp    12f1 <setspeed+0x1b1>
mov    -0x58(%rbp),%eax
sub    $0x2580,%eax
je     133b <setspeed+0x1fb>
jmp    1304 <setspeed+0x1c4>
mov    -0x58(%rbp),%eax
sub    $0x4b00,%eax
jne    13ac <setspeed+0x26c>
jmp    1317 <setspeed+0x1d7>
lea    0xce2(%rip),%rax
mov    %rax,-0x50(%rbp)
movzwl -0x12(%rbp),%eax
mov    0x2cc3(%rip),%rcx
movzwl (%rcx),%ecx
or     %ecx,%eax
mov    %ax,-0x38(%rbp)
jmp    13cb <setspeed+0x28b>
lea    0xcc1(%rip),%rax
mov    %rax,-0x50(%rbp)
movzwl -0x12(%rbp),%eax
mov    0x2c7f(%rip),%rcx
movzwl (%rcx),%ecx
or     %ecx,%eax
mov    %ax,-0x38(%rbp)
jmp    13cb <setspeed+0x28b>
lea    0xca0(%rip),%rax
mov    %rax,-0x50(%rbp)
movzwl -0x12(%rbp),%eax
mov    0x2c63(%rip),%rcx
movzwl (%rcx),%ecx
or     %ecx,%eax
mov    %ax,-0x38(%rbp)
jmp    13cb <setspeed+0x28b>
lea    0xc7f(%rip),%rax
mov    %rax,-0x50(%rbp)
movzwl -0x12(%rbp),%eax
mov    0x2c1f(%rip),%rcx
movzwl (%rcx),%ecx
or     %ecx,%eax
mov    %ax,-0x38(%rbp)
jmp    13cb <setspeed+0x28b>
jmp    13ac <setspeed+0x26c>
lea    0xc59(%rip),%rax
mov    %rax,-0x50(%rbp)
movzwl -0x12(%rbp),%eax
mov    0x2bee(%rip),%rcx
movzwl (%rcx),%ecx
or     %ecx,%eax
mov    %ax,-0x38(%rbp)
cmpl   $0x0,-0x10(%rbp)
je     13e6 <setspeed+0x2a6>
mov    -0x4(%rbp),%edi
mov    -0x50(%rbp),%rsi
mov    $0x2,%edx
call   1030 <write@plt>
mov    $0x186a0,%edi
call   1060 <usleep@plt>
mov    -0x4(%rbp),%edi
mov    0x2be6(%rip),%rax
mov    (%rax),%esi
lea    -0x48(%rbp),%rdx
call   1050 <tcsetattr@plt>
xor    %eax,%eax
add    $0x60,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<setspeed>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x38,%rsp
mov    %r8d,%ebp
mov    %ecx,%r14d
mov    %edx,%r12d
mov    %esi,%ebx
mov    %edi,%r15d
lea    0x8(%rsp),%rsi
call   1040 <tcgetattr@plt>
mov    0x2e3b(%rip),%rax
mov    0x2e24(%rip),%rcx
mov    (%rcx),%ecx
or     (%rax),%ecx
mov    %ecx,0x8(%rsp)
xorps  %xmm0,%xmm0
movups %xmm0,0x20(%rsp)
movq   $0x0,0x30(%rsp)
mov    0x10(%rsp),%rax
mov    0x2e07(%rip),%rcx
mov    (%rcx),%rcx
movl   $0x0,(%rax,%rcx,4)
mov    0x2e1e(%rip),%rcx
mov    (%rcx),%rcx
movl   $0x1,(%rax,%rcx,4)
mov    0x2e35(%rip),%r13
cmp    $0x257f,%ebx
jg     11dc <setspeed+0x9c>
cmp    $0x960,%ebx
je     1201 <setspeed+0xc1>
cmp    $0x12c0,%ebx
jne    11f8 <setspeed+0xb8>
mov    0x2dfe(%rip),%rax
jmp    1208 <setspeed+0xc8>
mov    %r13,%rax
cmp    $0x4b00,%ebx
je     1208 <setspeed+0xc8>
cmp    $0x2580,%ebx
jne    11f8 <setspeed+0xb8>
mov    0x2dda(%rip),%rax
jmp    1208 <setspeed+0xc8>
mov    0x2db1(%rip),%rax
jmp    1208 <setspeed+0xc8>
mov    0x2db0(%rip),%rax
movzwl (%rax),%eax
or     %bp,%ax
mov    %ax,0x18(%rsp)
mov    0x2dc6(%rip),%rbx
mov    (%rbx),%esi
lea    0x8(%rsp),%rdx
mov    %r15d,%edi
call   1050 <tcsetattr@plt>
cmp    $0x257f,%r12d
jg     1254 <setspeed+0x114>
cmp    $0x960,%r12d
je     1286 <setspeed+0x146>
cmp    $0x12c0,%r12d
jne    1276 <setspeed+0x136>
lea    0xdbb(%rip),%rsi
mov    0x2d86(%rip),%r13
jmp    129d <setspeed+0x15d>
cmp    $0x4b00,%r12d
je     1296 <setspeed+0x156>
cmp    $0x2580,%r12d
jne    1276 <setspeed+0x136>
lea    0xd96(%rip),%rsi
mov    0x2d5c(%rip),%r13
jmp    129d <setspeed+0x15d>
lea    0xd8f(%rip),%rsi
mov    0x2d2c(%rip),%r13
jmp    129d <setspeed+0x15d>
lea    0xd7c(%rip),%rsi
mov    0x2d24(%rip),%r13
jmp    129d <setspeed+0x15d>
lea    0xd63(%rip),%rsi
or     0x0(%r13),%bp
mov    %bp,0x18(%rsp)
test   %r14d,%r14d
je     12b9 <setspeed+0x179>
mov    %r15d,%edi
mov    $0x2,%edx
call   1030 <write@plt>
mov    $0x186a0,%edi
call   1060 <usleep@plt>
mov    (%rbx),%esi
lea    0x8(%rsp),%rdx
mov    %r15d,%edi
call   1050 <tcsetattr@plt>
xor    %eax,%eax
add    $0x38,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
%struct.termios = type { i32, i32*, i16, i64, i64, i64 }
@IGNBRK = global i32 0
@IGNPAR = global i32 0
@VTIME = global i64 0
@VMIN = global i64 0
@B19200 = global i16 0
@B9600 = global i16 0
@B4800 = global i16 0
@B2400 = global i16 0
@B1200 = global i16 0
@TCSAFLUSH = global i32 0
@.str = [3 x i8] c"*r\00"
@.str.1 = [3 x i8] c"*q\00"
@.str.2 = [3 x i8] c"*p\00"
@.str.3 = [3 x i8] c"*o\00"
@.str.4 = [3 x i8] c"*n\00"
define i32 @setspeed(i32 %0, i32 %1, i32 %2, i32 %3, i16 zeroext %4) {
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32
%10 = alloca i16
%11 = alloca %struct.termios
%12 = alloca i8*
store i32 %0, i32* %6
store i32 %1, i32* %7
store i32 %2, i32* %8
store i32 %3, i32* %9
store i16 %4, i16* %10
%13 = load i32, i32* %6
%14 = call i32 @tcgetattr(i32 %13, %struct.termios* %11)
%15 = load i32, i32* @IGNBRK
%16 = load i32, i32* @IGNPAR
%17 = or i32 %15, %16
%18 = getelementptr inbounds %struct.termios, %struct.termios* %11, i32 0, i32 0
store i32 %17, i32* %18
%19 = getelementptr inbounds %struct.termios, %struct.termios* %11, i32 0, i32 5
store i64 0, i64* %19
%20 = getelementptr inbounds %struct.termios, %struct.termios* %11, i32 0, i32 4
store i64 0, i64* %20
%21 = getelementptr inbounds %struct.termios, %struct.termios* %11, i32 0, i32 3
store i64 0, i64* %21
%22 = getelementptr inbounds %struct.termios, %struct.termios* %11, i32 0, i32 1
%23 = load i32*, i32** %22
%24 = load i64, i64* @VTIME
%25 = getelementptr inbounds i32, i32* %23, i64 %24
store i32 0, i32* %25
%26 = getelementptr inbounds %struct.termios, %struct.termios* %11, i32 0, i32 1
%27 = load i32*, i32** %26
%28 = load i64, i64* @VMIN
%29 = getelementptr inbounds i32, i32* %27, i64 %28
store i32 1, i32* %29
%30 = load i32, i32* %7
switch i32 %30, label %64 [
i32 19200, label %31
i32 9600, label %39
i32 4800, label %47
i32 2400, label %55
i32 1200, label %63
]
31: ; preds = %5
%32 = load i16, i16* %10
%33 = zext i16 %32 to i32
%34 = load i16, i16* @B19200
%35 = zext i16 %34 to i32
%36 = or i32 %33, %35
%37 = trunc i32 %36 to i16
%38 = getelementptr inbounds %struct.termios, %struct.termios* %11, i32 0, i32 2
store i16 %37, i16* %38
br label %72
39: ; preds = %5
%40 = load i16, i16* %10
%41 = zext i16 %40 to i32
%42 = load i16, i16* @B9600
%43 = zext i16 %42 to i32
%44 = or i32 %41, %43
%45 = trunc i32 %44 to i16
%46 = getelementptr inbounds %struct.termios, %struct.termios* %11, i32 0, i32 2
store i16 %45, i16* %46
br label %72
47: ; preds = %5
%48 = load i16, i16* %10
%49 = zext i16 %48 to i32
%50 = load i16, i16* @B4800
%51 = zext i16 %50 to i32
%52 = or i32 %49, %51
%53 = trunc i32 %52 to i16
%54 = getelementptr inbounds %struct.termios, %struct.termios* %11, i32 0, i32 2
store i16 %53, i16* %54
br label %72
55: ; preds = %5
%56 = load i16, i16* %10
%57 = zext i16 %56 to i32
%58 = load i16, i16* @B2400
%59 = zext i16 %58 to i32
%60 = or i32 %57, %59
%61 = trunc i32 %60 to i16
%62 = getelementptr inbounds %struct.termios, %struct.termios* %11, i32 0, i32 2
store i16 %61, i16* %62
br label %72
63: ; preds = %5
br label %64
64: ; preds = %5, %63
%65 = load i16, i16* %10
%66 = zext i16 %65 to i32
%67 = load i16, i16* @B1200
%68 = zext i16 %67 to i32
%69 = or i32 %66, %68
%70 = trunc i32 %69 to i16
%71 = getelementptr inbounds %struct.termios, %struct.termios* %11, i32 0, i32 2
store i16 %70, i16* %71
br label %72
72: ; preds = %64, %55, %47, %39, %31
%73 = load i32, i32* %6
%74 = load i32, i32* @TCSAFLUSH
%75 = call i32 @tcsetattr(i32 %73, i32 %74, %struct.termios* %11)
%76 = load i32, i32* %8
switch i32 %76, label %110 [
i32 19200, label %77
i32 9600, label %85
i32 4800, label %93
i32 2400, label %101
i32 1200, label %109
]
77: ; preds = %72
store i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8** %12
%78 = load i16, i16* %10
%79 = zext i16 %78 to i32
%80 = load i16, i16* @B19200
%81 = zext i16 %80 to i32
%82 = or i32 %79, %81
%83 = trunc i32 %82 to i16
%84 = getelementptr inbounds %struct.termios, %struct.termios* %11, i32 0, i32 2
store i16 %83, i16* %84
br label %118
85: ; preds = %72
store i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i8** %12
%86 = load i16, i16* %10
%87 = zext i16 %86 to i32
%88 = load i16, i16* @B9600
%89 = zext i16 %88 to i32
%90 = or i32 %87, %89
%91 = trunc i32 %90 to i16
%92 = getelementptr inbounds %struct.termios, %struct.termios* %11, i32 0, i32 2
store i16 %91, i16* %92
br label %118
93: ; preds = %72
store i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0), i8** %12
%94 = load i16, i16* %10
%95 = zext i16 %94 to i32
%96 = load i16, i16* @B4800
%97 = zext i16 %96 to i32
%98 = or i32 %95, %97
%99 = trunc i32 %98 to i16
%100 = getelementptr inbounds %struct.termios, %struct.termios* %11, i32 0, i32 2
store i16 %99, i16* %100
br label %118
101: ; preds = %72
store i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.3, i64 0, i64 0), i8** %12
%102 = load i16, i16* %10
%103 = zext i16 %102 to i32
%104 = load i16, i16* @B2400
%105 = zext i16 %104 to i32
%106 = or i32 %103, %105
%107 = trunc i32 %106 to i16
%108 = getelementptr inbounds %struct.termios, %struct.termios* %11, i32 0, i32 2
store i16 %107, i16* %108
br label %118
109: ; preds = %72
br label %110
110: ; preds = %72, %109
store i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.4, i64 0, i64 0), i8** %12
%111 = load i16, i16* %10
%112 = zext i16 %111 to i32
%113 = load i16, i16* @B1200
%114 = zext i16 %113 to i32
%115 = or i32 %112, %114
%116 = trunc i32 %115 to i16
%117 = getelementptr inbounds %struct.termios, %struct.termios* %11, i32 0, i32 2
store i16 %116, i16* %117
br label %118
118: ; preds = %110, %101, %93, %85, %77
%119 = load i32, i32* %9
%120 = icmp ne i32 %119, 0
br i1 %120, label %121, label %125
121: ; preds = %118
%122 = load i32, i32* %6
%123 = load i8*, i8** %12
%124 = call i32 @write(i32 %122, i8* %123, i32 2)
br label %125
125: ; preds = %121, %118
%126 = call i32 @usleep(i32 100000)
%127 = load i32, i32* %6
%128 = load i32, i32* @TCSAFLUSH
%129 = call i32 @tcsetattr(i32 %127, i32 %128, %struct.termios* %11)
ret i32 0
}

LLVM IR (-O2):
%struct.termios = type { i32, i32*, i16, i64, i64, i64 }
@IGNBRK = global i32 0
@IGNPAR = global i32 0
@VTIME = global i64 0
@VMIN = global i64 0
@B19200 = global i16 0
@B9600 = global i16 0
@B4800 = global i16 0
@B2400 = global i16 0
@B1200 = global i16 0
@TCSAFLUSH = global i32 0
@.str = [3 x i8] c"*r\00"
@.str.1 = [3 x i8] c"*q\00"
@.str.2 = [3 x i8] c"*p\00"
@.str.3 = [3 x i8] c"*o\00"
@.str.4 = [3 x i8] c"*n\00"
define i32 @setspeed(i32 %0, i32 %1, i32 %2, i32 %3, i16 zeroext %4) {
%6 = alloca %struct.termios
%7 = bitcast %struct.termios* %6 to i8*
%8 = call i32 @tcgetattr(i32 %0, %struct.termios* %6)
%9 = load i32, i32* @IGNBRK
%10 = load i32, i32* @IGNPAR
%11 = or i32 %10, %9
%12 = getelementptr inbounds %struct.termios, %struct.termios* %6, i64 0, i32 0
store i32 %11, i32* %12
%13 = getelementptr inbounds %struct.termios, %struct.termios* %6, i64 0, i32 3
%14 = getelementptr inbounds %struct.termios, %struct.termios* %6, i64 0, i32 1
%15 = bitcast i64* %13 to i8*
%16 = load i32*, i32** %14
%17 = load i64, i64* @VTIME
%18 = getelementptr inbounds i32, i32* %16, i64 %17
store i32 0, i32* %18
%19 = load i64, i64* @VMIN
%20 = getelementptr inbounds i32, i32* %16, i64 %19
store i32 1, i32* %20
switch i32 %1, label %24 [
i32 19200, label %25
i32 9600, label %21
i32 4800, label %22
i32 2400, label %23
]
21: ; preds = %5
br label %25
22: ; preds = %5
br label %25
23: ; preds = %5
br label %25
24: ; preds = %5
br label %25
25: ; preds = %5, %24, %23, %22, %21
%26 = phi i16* [ @B1200, %24 ], [ @B2400, %23 ], [ @B4800, %22 ], [ @B9600, %21 ], [ @B19200, %5 ]
%27 = load i16, i16* %26
%28 = or i16 %27, %4
%29 = getelementptr inbounds %struct.termios, %struct.termios* %6, i64 0, i32 2
store i16 %28, i16* %29
%30 = load i32, i32* @TCSAFLUSH
%31 = call i32 @tcsetattr(i32 %0, i32 %30, %struct.termios* %6)
switch i32 %2, label %35 [
i32 19200, label %36
i32 9600, label %32
i32 4800, label %33
i32 2400, label %34
]
32: ; preds = %25
br label %36
33: ; preds = %25
br label %36
34: ; preds = %25
br label %36
35: ; preds = %25
br label %36
36: ; preds = %25, %35, %34, %33, %32
%37 = phi i16* [ @B1200, %35 ], [ @B2400, %34 ], [ @B4800, %33 ], [ @B9600, %32 ], [ @B19200, %25 ]
%38 = phi i8* [ getelementptr inbounds ([3 x i8], [3 x i8]* @.str.4, i64 0, i64 0), %35 ], [ getelementptr inbounds ([3 x i8], [3 x i8]* @.str.3, i64 0, i64 0), %34 ], [ getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0), %33 ], [ getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), %32 ], [ getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), %25 ]
%39 = load i16, i16* %37
%40 = or i16 %39, %4
%41 = getelementptr inbounds %struct.termios, %struct.termios* %6, i64 0, i32 2
store i16 %40, i16* %41
%42 = icmp eq i32 %3, 0
br i1 %42, label %45, label %43
43: ; preds = %36
%44 = call i32 @write(i32 %0, i8* %38, i32 2)
br label %45
45: ; preds = %43, %36
%46 = call i32 @usleep(i32 100000)
%47 = load i32, i32* @TCSAFLUSH
%48 = call i32 @tcsetattr(i32 %0, i32 %47, %struct.termios* %6)
ret i32 0
}