#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_cflag;
  scalar_t__ c_lflag;
  scalar_t__ c_oflag;
  int /*<<< orphan*/ c_iflag;
};
struct serial_struct {
  int /*<<< orphan*/ flags;
};

/* Variables and functions */
int /*<<< orphan*/ ASYNC_LOW_LATENCY;
int /*<<< orphan*/ B115200;
int /*<<< orphan*/ B1200;
int /*<<< orphan*/ B19200;
int /*<<< orphan*/ B2400;
int /*<<< orphan*/ B300;
int /*<<< orphan*/ B38400;
int /*<<< orphan*/ B4800;
int /*<<< orphan*/ B57600;
int /*<<< orphan*/ B9600;
int CLOCAL;
int CREAD;
int CS8;
int /*<<< orphan*/ IGNPAR;
int /*<<< orphan*/ TCSANOW;
int /*<<< orphan*/ TIOCGSERIAL;
int /*<<< orphan*/ TIOCSSERIAL;
int /*<<< orphan*/ cfsetispeed(struct termios *, int /*<<< orphan*/);
int /*<<< orphan*/ cfsetospeed(struct termios *, int /*<<< orphan*/);
int /*<<< orphan*/ ioctl(int, int /*<<< orphan*/, struct serial_struct *);
scalar_t__ tcgetattr(int, struct termios *);
scalar_t__ tcsetattr(int, int /*<<< orphan*/, struct termios *);
int set_serial(int fd, int baud) {
  struct termios tios;
  if (tcgetattr(fd, &tios))
    return -1;
  tios.c_iflag = IGNPAR;
  tios.c_oflag = 0;
  tios.c_cflag = (CS8 | CREAD | CLOCAL);
  tios.c_lflag = 0;
  if (baud == 115200) {
    cfsetospeed(&tios, B115200);
    cfsetispeed(&tios, B115200);
  } else if (baud == 57600) {
    cfsetospeed(&tios, B57600);
    cfsetispeed(&tios, B57600);
  } else if (baud == 38400) {
    cfsetospeed(&tios, B38400);
    cfsetispeed(&tios, B38400);
  } else if (baud == 19200) {
    cfsetospeed(&tios, B19200);
    cfsetispeed(&tios, B19200);
  } else if (baud == 9600) {
    cfsetospeed(&tios, B9600);
    cfsetispeed(&tios, B9600);
  } else if (baud == 4800) {
    cfsetospeed(&tios, B4800);
    cfsetispeed(&tios, B4800);
  } else if (baud == 2400) {
    cfsetospeed(&tios, B2400);
    cfsetispeed(&tios, B2400);
  } else if (baud == 1200) {
    cfsetospeed(&tios, B1200);
    cfsetispeed(&tios, B1200);
  } else if (baud == 300) {
    cfsetospeed(&tios, B300);
    cfsetispeed(&tios, B300);
  } else
    return -1;
  if (tcsetattr(fd, TCSANOW, &tios))
    return -1;
  struct serial_struct ss;
  ioctl(fd, TIOCGSERIAL, &ss);
  ss.flags |= ASYNC_LOW_LATENCY;
  ioctl(fd, TIOCSSERIAL, &ss);
  return 0;
}


x86 assembly (clang, -O0):
<set_serial>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
mov    %edi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%edi
lea    -0x30(%rbp),%rsi
call   1050 <tcgetattr@plt>
cmp    $0x0,%rax
je     1180 <set_serial+0x30>
movl   $0xffffffff,-0x4(%rbp)
jmp    143f <set_serial+0x2ef>
mov    0x2de9(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x18(%rbp)
movq   $0x0,-0x20(%rbp)
mov    0x2e0d(%rip),%rax
mov    (%rax),%eax
mov    0x2e0c(%rip),%rcx
or     (%rcx),%eax
mov    0x2db3(%rip),%rcx
or     (%rcx),%eax
mov    %eax,-0x30(%rbp)
movq   $0x0,-0x28(%rbp)
cmpl   $0x1c200,-0xc(%rbp)
jne    11f0 <set_serial+0xa0>
mov    0x2daa(%rip),%rax
mov    (%rax),%esi
lea    -0x30(%rbp),%rdi
call   1030 <cfsetospeed@plt>
mov    0x2d98(%rip),%rax
mov    (%rax),%esi
lea    -0x30(%rbp),%rdi
call   1070 <cfsetispeed@plt>
jmp    13d4 <set_serial+0x284>
cmpl   $0xe100,-0xc(%rbp)
jne    1226 <set_serial+0xd6>
mov    0x2d9c(%rip),%rax
mov    (%rax),%esi
lea    -0x30(%rbp),%rdi
call   1030 <cfsetospeed@plt>
mov    0x2d8a(%rip),%rax
mov    (%rax),%esi
lea    -0x30(%rbp),%rdi
call   1070 <cfsetispeed@plt>
jmp    13cf <set_serial+0x27f>
cmpl   $0x9600,-0xc(%rbp)
jne    125c <set_serial+0x10c>
mov    0x2d1e(%rip),%rax
mov    (%rax),%esi
lea    -0x30(%rbp),%rdi
call   1030 <cfsetospeed@plt>
mov    0x2d0c(%rip),%rax
mov    (%rax),%esi
lea    -0x30(%rbp),%rdi
call   1070 <cfsetispeed@plt>
jmp    13ca <set_serial+0x27a>
cmpl   $0x4b00,-0xc(%rbp)
jne    1292 <set_serial+0x142>
mov    0x2d78(%rip),%rax
mov    (%rax),%esi
lea    -0x30(%rbp),%rdi
call   1030 <cfsetospeed@plt>
mov    0x2d66(%rip),%rax
mov    (%rax),%esi
lea    -0x30(%rbp),%rdi
call   1070 <cfsetispeed@plt>
jmp    13c5 <set_serial+0x275>
cmpl   $0x2580,-0xc(%rbp)
jne    12c8 <set_serial+0x178>
mov    0x2d1a(%rip),%rax
mov    (%rax),%esi
lea    -0x30(%rbp),%rdi
call   1030 <cfsetospeed@plt>
mov    0x2d08(%rip),%rax
mov    (%rax),%esi
lea    -0x30(%rbp),%rdi
call   1070 <cfsetispeed@plt>
jmp    13c0 <set_serial+0x270>
cmpl   $0x12c0,-0xc(%rbp)
jne    12fe <set_serial+0x1ae>
mov    0x2cec(%rip),%rax
mov    (%rax),%esi
lea    -0x30(%rbp),%rdi
call   1030 <cfsetospeed@plt>
mov    0x2cda(%rip),%rax
mov    (%rax),%esi
lea    -0x30(%rbp),%rdi
call   1070 <cfsetispeed@plt>
jmp    13bb <set_serial+0x26b>
cmpl   $0x960,-0xc(%rbp)
jne    1334 <set_serial+0x1e4>
mov    0x2c7e(%rip),%rax
mov    (%rax),%esi
lea    -0x30(%rbp),%rdi
call   1030 <cfsetospeed@plt>
mov    0x2c6c(%rip),%rax
mov    (%rax),%esi
lea    -0x30(%rbp),%rdi
call   1070 <cfsetispeed@plt>
jmp    13b6 <set_serial+0x266>
cmpl   $0x4b0,-0xc(%rbp)
jne    136a <set_serial+0x21a>
mov    0x2c38(%rip),%rax
mov    (%rax),%esi
lea    -0x30(%rbp),%rdi
call   1030 <cfsetospeed@plt>
mov    0x2c26(%rip),%rax
mov    (%rax),%esi
lea    -0x30(%rbp),%rdi
call   1070 <cfsetispeed@plt>
jmp    13b1 <set_serial+0x261>
cmpl   $0x12c,-0xc(%rbp)
jne    13a0 <set_serial+0x250>
mov    0x2c3a(%rip),%rax
mov    (%rax),%esi
lea    -0x30(%rbp),%rdi
call   1030 <cfsetospeed@plt>
mov    0x2c28(%rip),%rax
mov    (%rax),%esi
lea    -0x30(%rbp),%rdi
call   1070 <cfsetispeed@plt>
jmp    13ac <set_serial+0x25c>
movl   $0xffffffff,-0x4(%rbp)
jmp    143f <set_serial+0x2ef>
jmp    13b1 <set_serial+0x261>
jmp    13b6 <set_serial+0x266>
jmp    13bb <set_serial+0x26b>
jmp    13c0 <set_serial+0x270>
jmp    13c5 <set_serial+0x275>
jmp    13ca <set_serial+0x27a>
jmp    13cf <set_serial+0x27f>
jmp    13d4 <set_serial+0x284>
mov    -0x8(%rbp),%edi
mov    0x2bfa(%rip),%rax
mov    (%rax),%esi
lea    -0x30(%rbp),%rdx
call   1060 <tcsetattr@plt>
cmp    $0x0,%rax
je     13ff <set_serial+0x2af>
movl   $0xffffffff,-0x4(%rbp)
jmp    143f <set_serial+0x2ef>
mov    -0x8(%rbp),%edi
mov    0x2b7f(%rip),%rax
mov    (%rax),%esi
lea    -0x38(%rbp),%rdx
call   1040 <ioctl@plt>
mov    0x2bb5(%rip),%rax
mov    (%rax),%eax
or     -0x38(%rbp),%eax
mov    %eax,-0x38(%rbp)
mov    -0x8(%rbp),%edi
mov    0x2bcb(%rip),%rax
mov    (%rax),%esi
lea    -0x38(%rbp),%rdx
call   1040 <ioctl@plt>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<set_serial>:
push   %rbp
push   %r15
push   %r14
push   %rbx
sub    $0x28,%rsp
mov    %esi,%ebp
mov    %edi,%r15d
lea    0x8(%rsp),%rsi
call   1050 <tcgetattr@plt>
mov    $0xffffffff,%r14d
test   %rax,%rax
jne    12e2 <set_serial+0x192>
mov    0x2e29(%rip),%rax
mov    0x2e2a(%rip),%rcx
mov    (%rcx),%ecx
or     (%rax),%ecx
mov    0x2ddf(%rip),%rax
mov    (%rax),%eax
mov    %eax,0x20(%rsp)
mov    0x2dc2(%rip),%rax
or     (%rax),%ecx
mov    %ecx,0x8(%rsp)
xorps  %xmm0,%xmm0
movups %xmm0,0x10(%rsp)
cmp    $0x257f,%ebp
jle    11ec <set_serial+0x9c>
cmp    $0x95ff,%ebp
jle    1211 <set_serial+0xc1>
cmp    $0x9600,%ebp
je     124b <set_serial+0xfb>
cmp    $0x1c200,%ebp
je     1254 <set_serial+0x104>
cmp    $0xe100,%ebp
jne    12e2 <set_serial+0x192>
mov    0x2db9(%rip),%rbx
jmp    1276 <set_serial+0x126>
cmp    $0x95f,%ebp
jg     122e <set_serial+0xde>
cmp    $0x12c,%ebp
je     125d <set_serial+0x10d>
cmp    $0x4b0,%ebp
jne    12e2 <set_serial+0x192>
mov    0x2d71(%rip),%rbx
jmp    1276 <set_serial+0x126>
cmp    $0x2580,%ebp
je     1266 <set_serial+0x116>
cmp    $0x4b00,%ebp
jne    12e2 <set_serial+0x192>
mov    0x2dbc(%rip),%rbx
jmp    1276 <set_serial+0x126>
cmp    $0x960,%ebp
je     126f <set_serial+0x11f>
cmp    $0x12c0,%ebp
jne    12e2 <set_serial+0x192>
mov    0x2d7f(%rip),%rbx
jmp    1276 <set_serial+0x126>
mov    0x2d06(%rip),%rbx
jmp    1276 <set_serial+0x126>
mov    0x2d1d(%rip),%rbx
jmp    1276 <set_serial+0x126>
mov    0x2d54(%rip),%rbx
jmp    1276 <set_serial+0x126>
mov    0x2d53(%rip),%rbx
jmp    1276 <set_serial+0x126>
mov    0x2d1a(%rip),%rbx
mov    (%rbx),%esi
lea    0x8(%rsp),%rbp
mov    %rbp,%rdi
call   1030 <cfsetospeed@plt>
mov    (%rbx),%esi
mov    %rbp,%rdi
call   1070 <cfsetispeed@plt>
mov    0x2d42(%rip),%rax
mov    (%rax),%esi
mov    %r15d,%edi
mov    %rbp,%rdx
call   1060 <tcsetattr@plt>
test   %rax,%rax
jne    12e2 <set_serial+0x192>
mov    0x2cd9(%rip),%rax
mov    (%rax),%esi
mov    %rsp,%rbp
mov    %r15d,%edi
mov    %rbp,%rdx
call   1040 <ioctl@plt>
mov    0x2d0a(%rip),%rax
mov    (%rax),%eax
or     %eax,(%rsp)
mov    0x2d26(%rip),%rax
mov    (%rax),%esi
mov    %r15d,%edi
mov    %rbp,%rdx
call   1040 <ioctl@plt>
xor    %r14d,%r14d
mov    %r14d,%eax
add    $0x28,%rsp
pop    %rbx
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
%struct.termios = type { i32, i64, i64, i32 }
%struct.serial_struct = type { i32 }
@IGNPAR = global i32 0
@CS8 = global i32 0
@CREAD = global i32 0
@CLOCAL = global i32 0
@B115200 = global i32 0
@B57600 = global i32 0
@B38400 = global i32 0
@B19200 = global i32 0
@B9600 = global i32 0
@B4800 = global i32 0
@B2400 = global i32 0
@B1200 = global i32 0
@B300 = global i32 0
@TCSANOW = global i32 0
@TIOCGSERIAL = global i32 0
@ASYNC_LOW_LATENCY = global i32 0
@TIOCSSERIAL = global i32 0
define i32 @set_serial(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
%6 = alloca %struct.termios
%7 = alloca %struct.serial_struct
store i32 %0, i32* %4
store i32 %1, i32* %5
%8 = load i32, i32* %4
%9 = call i64 @tcgetattr(i32 %8, %struct.termios* %6)
%10 = icmp ne i64 %9, 0
br i1 %10, label %11, label %12
11: ; preds = %2
store i32 -1, i32* %3
br label %120
12: ; preds = %2
%13 = load i32, i32* @IGNPAR
%14 = getelementptr inbounds %struct.termios, %struct.termios* %6, i32 0, i32 3
store i32 %13, i32* %14
%15 = getelementptr inbounds %struct.termios, %struct.termios* %6, i32 0, i32 2
store i64 0, i64* %15
%16 = load i32, i32* @CS8
%17 = load i32, i32* @CREAD
%18 = or i32 %16, %17
%19 = load i32, i32* @CLOCAL
%20 = or i32 %18, %19
%21 = getelementptr inbounds %struct.termios, %struct.termios* %6, i32 0, i32 0
store i32 %20, i32* %21
%22 = getelementptr inbounds %struct.termios, %struct.termios* %6, i32 0, i32 1
store i64 0, i64* %22
%23 = load i32, i32* %5
%24 = icmp eq i32 %23, 115200
br i1 %24, label %25, label %30
25: ; preds = %12
%26 = load i32, i32* @B115200
%27 = call i32 @cfsetospeed(%struct.termios* %6, i32 %26)
%28 = load i32, i32* @B115200
%29 = call i32 @cfsetispeed(%struct.termios* %6, i32 %28)
br label %103
30: ; preds = %12
%31 = load i32, i32* %5
%32 = icmp eq i32 %31, 57600
br i1 %32, label %33, label %38
33: ; preds = %30
%34 = load i32, i32* @B57600
%35 = call i32 @cfsetospeed(%struct.termios* %6, i32 %34)
%36 = load i32, i32* @B57600
%37 = call i32 @cfsetispeed(%struct.termios* %6, i32 %36)
br label %102
38: ; preds = %30
%39 = load i32, i32* %5
%40 = icmp eq i32 %39, 38400
br i1 %40, label %41, label %46
41: ; preds = %38
%42 = load i32, i32* @B38400
%43 = call i32 @cfsetospeed(%struct.termios* %6, i32 %42)
%44 = load i32, i32* @B38400
%45 = call i32 @cfsetispeed(%struct.termios* %6, i32 %44)
br label %101
46: ; preds = %38
%47 = load i32, i32* %5
%48 = icmp eq i32 %47, 19200
br i1 %48, label %49, label %54
49: ; preds = %46
%50 = load i32, i32* @B19200
%51 = call i32 @cfsetospeed(%struct.termios* %6, i32 %50)
%52 = load i32, i32* @B19200
%53 = call i32 @cfsetispeed(%struct.termios* %6, i32 %52)
br label %100
54: ; preds = %46
%55 = load i32, i32* %5
%56 = icmp eq i32 %55, 9600
br i1 %56, label %57, label %62
57: ; preds = %54
%58 = load i32, i32* @B9600
%59 = call i32 @cfsetospeed(%struct.termios* %6, i32 %58)
%60 = load i32, i32* @B9600
%61 = call i32 @cfsetispeed(%struct.termios* %6, i32 %60)
br label %99
62: ; preds = %54
%63 = load i32, i32* %5
%64 = icmp eq i32 %63, 4800
br i1 %64, label %65, label %70
65: ; preds = %62
%66 = load i32, i32* @B4800
%67 = call i32 @cfsetospeed(%struct.termios* %6, i32 %66)
%68 = load i32, i32* @B4800
%69 = call i32 @cfsetispeed(%struct.termios* %6, i32 %68)
br label %98
70: ; preds = %62
%71 = load i32, i32* %5
%72 = icmp eq i32 %71, 2400
br i1 %72, label %73, label %78
73: ; preds = %70
%74 = load i32, i32* @B2400
%75 = call i32 @cfsetospeed(%struct.termios* %6, i32 %74)
%76 = load i32, i32* @B2400
%77 = call i32 @cfsetispeed(%struct.termios* %6, i32 %76)
br label %97
78: ; preds = %70
%79 = load i32, i32* %5
%80 = icmp eq i32 %79, 1200
br i1 %80, label %81, label %86
81: ; preds = %78
%82 = load i32, i32* @B1200
%83 = call i32 @cfsetospeed(%struct.termios* %6, i32 %82)
%84 = load i32, i32* @B1200
%85 = call i32 @cfsetispeed(%struct.termios* %6, i32 %84)
br label %96
86: ; preds = %78
%87 = load i32, i32* %5
%88 = icmp eq i32 %87, 300
br i1 %88, label %89, label %94
89: ; preds = %86
%90 = load i32, i32* @B300
%91 = call i32 @cfsetospeed(%struct.termios* %6, i32 %90)
%92 = load i32, i32* @B300
%93 = call i32 @cfsetispeed(%struct.termios* %6, i32 %92)
br label %95
94: ; preds = %86
store i32 -1, i32* %3
br label %120
95: ; preds = %89
br label %96
96: ; preds = %95, %81
br label %97
97: ; preds = %96, %73
br label %98
98: ; preds = %97, %65
br label %99
99: ; preds = %98, %57
br label %100
100: ; preds = %99, %49
br label %101
101: ; preds = %100, %41
br label %102
102: ; preds = %101, %33
br label %103
103: ; preds = %102, %25
%104 = load i32, i32* %4
%105 = load i32, i32* @TCSANOW
%106 = call i64 @tcsetattr(i32 %104, i32 %105, %struct.termios* %6)
%107 = icmp ne i64 %106, 0
br i1 %107, label %108, label %109
108: ; preds = %103
store i32 -1, i32* %3
br label %120
109: ; preds = %103
%110 = load i32, i32* %4
%111 = load i32, i32* @TIOCGSERIAL
%112 = call i32 @ioctl(i32 %110, i32 %111, %struct.serial_struct* %7)
%113 = load i32, i32* @ASYNC_LOW_LATENCY
%114 = getelementptr inbounds %struct.serial_struct, %struct.serial_struct* %7, i32 0, i32 0
%115 = load i32, i32* %114
%116 = or i32 %115, %113
store i32 %116, i32* %114
%117 = load i32, i32* %4
%118 = load i32, i32* @TIOCSSERIAL
%119 = call i32 @ioctl(i32 %117, i32 %118, %struct.serial_struct* %7)
store i32 0, i32* %3
br label %120
120: ; preds = %109, %108, %94, %11
%121 = load i32, i32* %3
ret i32 %121
}

LLVM IR (-O2):
%struct.termios = type { i32, i64, i64, i32 }
%struct.serial_struct = type { i32 }
@IGNPAR = global i32 0
@CS8 = global i32 0
@CREAD = global i32 0
@CLOCAL = global i32 0
@B115200 = global i32 0
@B57600 = global i32 0
@B38400 = global i32 0
@B19200 = global i32 0
@B9600 = global i32 0
@B4800 = global i32 0
@B2400 = global i32 0
@B1200 = global i32 0
@B300 = global i32 0
@TCSANOW = global i32 0
@TIOCGSERIAL = global i32 0
@ASYNC_LOW_LATENCY = global i32 0
@TIOCSSERIAL = global i32 0
define i32 @set_serial(i32 %0, i32 %1) {
%3 = alloca %struct.termios
%4 = alloca %struct.serial_struct
%5 = bitcast %struct.termios* %3 to i8*
%6 = call i64 @tcgetattr(i32 %0, %struct.termios* %3)
%7 = icmp eq i64 %6, 0
br i1 %7, label %8, label %46
8: ; preds = %2
%9 = load i32, i32* @IGNPAR
%10 = getelementptr inbounds %struct.termios, %struct.termios* %3, i64 0, i32 3
store i32 %9, i32* %10
%11 = load i32, i32* @CS8
%12 = load i32, i32* @CREAD
%13 = or i32 %12, %11
%14 = load i32, i32* @CLOCAL
%15 = or i32 %13, %14
%16 = getelementptr inbounds %struct.termios, %struct.termios* %3, i64 0, i32 0
store i32 %15, i32* %16
%17 = getelementptr inbounds %struct.termios, %struct.termios* %3, i64 0, i32 1
%18 = bitcast i64* %17 to <2 x i64>*
store <2 x i64> zeroinitializer, <2 x i64>* %18
switch i32 %1, label %46 [
i32 115200, label %27
i32 57600, label %19
i32 38400, label %20
i32 19200, label %21
i32 9600, label %22
i32 4800, label %23
i32 2400, label %24
i32 1200, label %25
i32 300, label %26
]
19: ; preds = %8
br label %27
20: ; preds = %8
br label %27
21: ; preds = %8
br label %27
22: ; preds = %8
br label %27
23: ; preds = %8
br label %27
24: ; preds = %8
br label %27
25: ; preds = %8
br label %27
26: ; preds = %8
br label %27
27: ; preds = %8, %19, %21, %23, %25, %26, %24, %22, %20
%28 = phi i32* [ @B57600, %19 ], [ @B19200, %21 ], [ @B4800, %23 ], [ @B1200, %25 ], [ @B300, %26 ], [ @B2400, %24 ], [ @B9600, %22 ], [ @B38400, %20 ], [ @B115200, %8 ]
%29 = load i32, i32* %28
%30 = call i32 @cfsetospeed(%struct.termios* %3, i32 %29)
%31 = load i32, i32* %28
%32 = call i32 @cfsetispeed(%struct.termios* %3, i32 %31)
%33 = load i32, i32* @TCSANOW
%34 = call i64 @tcsetattr(i32 %0, i32 %33, %struct.termios* %3)
%35 = icmp eq i64 %34, 0
br i1 %35, label %36, label %46
36: ; preds = %27
%37 = bitcast %struct.serial_struct* %4 to i8*
%38 = load i32, i32* @TIOCGSERIAL
%39 = call i32 @ioctl(i32 %0, i32 %38, %struct.serial_struct* %4)
%40 = load i32, i32* @ASYNC_LOW_LATENCY
%41 = getelementptr inbounds %struct.serial_struct, %struct.serial_struct* %4, i64 0, i32 0
%42 = load i32, i32* %41
%43 = or i32 %42, %40
store i32 %43, i32* %41
%44 = load i32, i32* @TIOCSSERIAL
%45 = call i32 @ioctl(i32 %0, i32 %44, %struct.serial_struct* %4)
br label %46
46: ; preds = %27, %8, %2, %36
%47 = phi i32 [ 0, %36 ], [ -1, %2 ], [ -1, %8 ], [ -1, %27 ]
ret i32 %47
}