#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 /*<<< orphan*/ c_cflag;
};

/* Variables and functions */
int /*<<< orphan*/ CS8;
int /*<<< orphan*/ CSIZE;
int /*<<< orphan*/ CSTOPB;
int /*<<< orphan*/ PARENB;
void _8N1(struct termios *t) {
  t->c_cflag &= ~PARENB;
  t->c_cflag &= ~CSTOPB;
  t->c_cflag &= ~CSIZE;
  t->c_cflag |= CS8;
}


x86 assembly (clang, -O0):
<_8N1>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    0x2ed9(%rip),%rax
mov    (%rax),%ecx
xor    $0xffffffff,%ecx
mov    -0x8(%rbp),%rax
and    (%rax),%ecx
mov    %ecx,(%rax)
mov    0x2e9d(%rip),%rax
mov    (%rax),%ecx
xor    $0xffffffff,%ecx
mov    -0x8(%rbp),%rax
and    (%rax),%ecx
mov    %ecx,(%rax)
mov    0x2ea1(%rip),%rax
mov    (%rax),%ecx
xor    $0xffffffff,%ecx
mov    -0x8(%rbp),%rax
and    (%rax),%ecx
mov    %ecx,(%rax)
mov    0x2e95(%rip),%rax
mov    (%rax),%ecx
mov    -0x8(%rbp),%rax
or     (%rax),%ecx
mov    %ecx,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<_8N1>:
mov    0x2ee1(%rip),%rax
mov    (%rax),%eax
not    %eax
and    (%rdi),%eax
mov    %eax,(%rdi)
mov    0x2eaa(%rip),%rcx
mov    (%rcx),%ecx
not    %ecx
and    %eax,%ecx
mov    %ecx,(%rdi)
mov    0x2eb3(%rip),%rax
mov    (%rax),%eax
not    %eax
and    %ecx,%eax
mov    %eax,(%rdi)
mov    0x2eac(%rip),%rcx
or     (%rcx),%eax
mov    %eax,(%rdi)
ret

LLVM IR (-O0):
%struct.termios = type { i32 }
@PARENB = global i32 0
@CSTOPB = global i32 0
@CSIZE = global i32 0
@CS8 = global i32 0
define void @_8N1(%struct.termios* %0) {
%2 = alloca %struct.termios*
store %struct.termios* %0, %struct.termios** %2
%3 = load i32, i32* @PARENB
%4 = xor i32 %3, -1
%5 = load %struct.termios*, %struct.termios** %2
%6 = getelementptr inbounds %struct.termios, %struct.termios* %5, i32 0, i32 0
%7 = load i32, i32* %6
%8 = and i32 %7, %4
store i32 %8, i32* %6
%9 = load i32, i32* @CSTOPB
%10 = xor i32 %9, -1
%11 = load %struct.termios*, %struct.termios** %2
%12 = getelementptr inbounds %struct.termios, %struct.termios* %11, i32 0, i32 0
%13 = load i32, i32* %12
%14 = and i32 %13, %10
store i32 %14, i32* %12
%15 = load i32, i32* @CSIZE
%16 = xor i32 %15, -1
%17 = load %struct.termios*, %struct.termios** %2
%18 = getelementptr inbounds %struct.termios, %struct.termios* %17, i32 0, i32 0
%19 = load i32, i32* %18
%20 = and i32 %19, %16
store i32 %20, i32* %18
%21 = load i32, i32* @CS8
%22 = load %struct.termios*, %struct.termios** %2
%23 = getelementptr inbounds %struct.termios, %struct.termios* %22, i32 0, i32 0
%24 = load i32, i32* %23
%25 = or i32 %24, %21
store i32 %25, i32* %23
ret void
}

LLVM IR (-O2):
%struct.termios = type { i32 }
@PARENB = global i32 0
@CSTOPB = global i32 0
@CSIZE = global i32 0
@CS8 = global i32 0
define void @_8N1(%struct.termios* nocapture %0) {
%2 = load i32, i32* @PARENB
%3 = xor i32 %2, -1
%4 = getelementptr inbounds %struct.termios, %struct.termios* %0, i64 0, i32 0
%5 = load i32, i32* %4
%6 = and i32 %5, %3
store i32 %6, i32* %4
%7 = load i32, i32* @CSTOPB
%8 = xor i32 %7, -1
%9 = and i32 %6, %8
store i32 %9, i32* %4
%10 = load i32, i32* @CSIZE
%11 = xor i32 %10, -1
%12 = and i32 %9, %11
store i32 %12, i32* %4
%13 = load i32, i32* @CS8
%14 = or i32 %13, %12
store i32 %14, i32* %4
ret void
}