#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 O_NOCTTY;
int O_NONBLOCK;
int O_RDWR;
int O_WRONLY;
int S_IWRITE;
int open(char *, int);
int /*<<< orphan*/ printf(char *, ...);
int /*<<< orphan*/ sprintf(char *, char *, int);
int /*<<< orphan*/ strcat(char *, char *);
int /*<<< orphan*/ write(int, char *, int);
int UART_init(int UART_num, char TRX) {
  int tranceiver;
  int UARTpin;
  char UARTSetAddr[50] = "/sys/devices/ocp.3";
  char tty[15] = {
      '\0',
  };
  switch (TRX) {
  case 'T': {
    switch (UART_num) {
    case 0:
      printf("Number 0 is not export number\n");
      break;
    case 1:
      strcat(UARTSetAddr, "/P9_24_pinmux.41/state");
      break;
    case 2:
      strcat(UARTSetAddr, "/P9_21_pinmux.38/state");
      break;
    case 3:
      printf("Number T3 is not export number\n");
      break;
    case 4:
      strcat(UARTSetAddr, "/P9_13_pinmux.32/state");
      break;
    case 5:
      strcat(UARTSetAddr, "/P8_37_pinmux.26/state");
      break;
    default:
      printf("Out of export number\n");
      break;
    }
    break;
  }
  case 'R': {
    switch (UART_num) {
    case 0:
      printf("Number 0 is not export number\n");
      break;
    case 1:
      strcat(UARTSetAddr, "/P9_26_pinmux.42/state");
      break;
    case 2:
      strcat(UARTSetAddr, "/P9_22_pinmux.39/state");
      break;
    case 3:
      printf("Number R3 is not export number\n");
      break;
    case 4:
      strcat(UARTSetAddr, "/P9_11_pinmux.30/state");
      break;
    case 5:
      strcat(UARTSetAddr, "/P8_38_pinmux.27/state");
      break;
    default:
      printf("Out of export number\n");
      break;
    }
    break;
  }
  default:
    printf("Error : Input data is invalid\n");
    break;
  }
  UARTpin = open(UARTSetAddr, O_WRONLY | S_IWRITE);
  printf("echo uart > %s\n", UARTSetAddr);
  if (UARTpin > 0) {
    write(UARTpin, "uart", 4);
  } else
    printf("Failed to setting UART-pinmux!\n");
  printf("Setting : UART%i\n", UART_num);
  sprintf(tty, "/dev/ttyO%d", UART_num);
  tranceiver = open(tty, O_RDWR | O_NOCTTY | O_NONBLOCK);
  return tranceiver;
}


x86 assembly (clang, -O0):
<UART_init>:
push   %rbp
mov    %rsp,%rbp
sub    $0x80,%rsp
mov    %sil,%al
mov    %edi,-0x4(%rbp)
mov    %al,-0x5(%rbp)
movaps 0xee5(%rip),%xmm0
movaps %xmm0,-0x30(%rbp)
movaps 0xeca(%rip),%xmm0
movaps %xmm0,-0x40(%rbp)
movaps 0xeaf(%rip),%xmm0
movaps %xmm0,-0x50(%rbp)
movw   $0x0,-0x20(%rbp)
movq   $0x0,-0x59(%rbp)
movq   $0x0,-0x60(%rbp)
movsbl -0x5(%rbp),%eax
mov    %eax,-0x64(%rbp)
sub    $0x52,%eax
je     1273 <UART_init+0x123>
jmp    11b0 <UART_init+0x60>
mov    -0x64(%rbp),%eax
sub    $0x54,%eax
jne    1325 <UART_init+0x1d5>
jmp    11c1 <UART_init+0x71>
mov    -0x4(%rbp),%eax
mov    %rax,-0x70(%rbp)
sub    $0x5,%rax
ja     1260 <UART_init+0x110>
mov    -0x70(%rbp),%rax
lea    0xe3b(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
lea    0xe75(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
jmp    126e <UART_init+0x11e>
lea    -0x50(%rbp),%rdi
lea    0xe7d(%rip),%rsi
call   1060 <strcat@plt>
jmp    126e <UART_init+0x11e>
lea    -0x50(%rbp),%rdi
lea    0xe7f(%rip),%rsi
call   1060 <strcat@plt>
jmp    126e <UART_init+0x11e>
lea    0xe85(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
jmp    126e <UART_init+0x11e>
lea    -0x50(%rbp),%rdi
lea    0xe8e(%rip),%rsi
call   1060 <strcat@plt>
jmp    126e <UART_init+0x11e>
lea    -0x50(%rbp),%rdi
lea    0xe90(%rip),%rsi
call   1060 <strcat@plt>
jmp    126e <UART_init+0x11e>
lea    0xe96(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
jmp    1333 <UART_init+0x1e3>
mov    -0x4(%rbp),%eax
mov    %rax,-0x78(%rbp)
sub    $0x5,%rax
ja     1312 <UART_init+0x1c2>
mov    -0x78(%rbp),%rax
lea    0xd71(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
lea    0xdc3(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
jmp    1320 <UART_init+0x1d0>
lea    -0x50(%rbp),%rdi
lea    0xe5d(%rip),%rsi
call   1060 <strcat@plt>
jmp    1320 <UART_init+0x1d0>
lea    -0x50(%rbp),%rdi
lea    0xe5f(%rip),%rsi
call   1060 <strcat@plt>
jmp    1320 <UART_init+0x1d0>
lea    0xe65(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
jmp    1320 <UART_init+0x1d0>
lea    -0x50(%rbp),%rdi
lea    0xe6e(%rip),%rsi
call   1060 <strcat@plt>
jmp    1320 <UART_init+0x1d0>
lea    -0x50(%rbp),%rdi
lea    0xe70(%rip),%rsi
call   1060 <strcat@plt>
jmp    1320 <UART_init+0x1d0>
lea    0xde4(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
jmp    1333 <UART_init+0x1e3>
lea    0xe63(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
lea    -0x50(%rbp),%rdi
mov    0x2c7a(%rip),%rax
mov    (%rax),%esi
mov    0x2c91(%rip),%rax
or     (%rax),%esi
call   1050 <open@plt>
mov    %eax,-0x10(%rbp)
lea    -0x50(%rbp),%rsi
lea    0xe52(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
cmpl   $0x0,-0x10(%rbp)
jle    1386 <UART_init+0x236>
mov    -0x10(%rbp),%edi
lea    0xe47(%rip),%rsi
mov    $0x4,%edx
call   1030 <write@plt>
jmp    1394 <UART_init+0x244>
lea    0xe36(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    -0x4(%rbp),%esi
lea    0xe45(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
lea    -0x60(%rbp),%rdi
mov    -0x4(%rbp),%edx
lea    0xe42(%rip),%rsi
call   1070 <sprintf@plt>
lea    -0x60(%rbp),%rdi
mov    0x2c25(%rip),%rax
mov    (%rax),%esi
mov    0x2bfc(%rip),%rax
or     (%rax),%esi
mov    0x2c0b(%rip),%rax
or     (%rax),%esi
call   1050 <open@plt>
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
add    $0x80,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<UART_init>:
push   %rbp
push   %r14
push   %rbx
sub    $0x50,%rsp
mov    %edi,%r14d
movaps 0xede(%rip),%xmm0
movaps %xmm0,0x20(%rsp)
movaps 0xec2(%rip),%xmm0
movaps %xmm0,0x10(%rsp)
movaps 0xea6(%rip),%xmm0
movaps %xmm0,(%rsp)
movw   $0x0,0x30(%rsp)
movq   $0x0,0x47(%rsp)
movq   $0x0,0x40(%rsp)
cmp    $0x52,%esi
je     11d6 <UART_init+0x76>
cmp    $0x54,%esi
jne    11f8 <UART_init+0x98>
cmp    $0x5,%r14d
ja     1201 <UART_init+0xa1>
mov    %r14d,%eax
lea    0xe57(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
lea    0xe91(%rip),%rsi
jmp    125e <UART_init+0xfe>
cmp    $0x5,%r14d
ja     1201 <UART_init+0xa1>
mov    %r14d,%eax
lea    0xe1a(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
lea    0xfb4(%rip),%rdi
jmp    1247 <UART_init+0xe7>
lea    0xfde(%rip),%rdi
jmp    1247 <UART_init+0xe7>
lea    0xfc0(%rip),%rdi
jmp    1247 <UART_init+0xe7>
lea    0xe68(%rip),%rsi
jmp    125e <UART_init+0xfe>
lea    0xf71(%rip),%rdi
jmp    1247 <UART_init+0xe7>
lea    0xe6d(%rip),%rsi
jmp    125e <UART_init+0xfe>
lea    0xe7b(%rip),%rsi
jmp    125e <UART_init+0xfe>
lea    0xe89(%rip),%rsi
jmp    125e <UART_init+0xfe>
lea    0xe97(%rip),%rsi
jmp    125e <UART_init+0xfe>
lea    0xf25(%rip),%rdi
call   1030 <puts@plt>
jmp    1266 <UART_init+0x106>
lea    0xe97(%rip),%rsi
jmp    125e <UART_init+0xfe>
lea    0xea5(%rip),%rsi
mov    %rsp,%rdi
call   1070 <strcat@plt>
mov    0x2d4b(%rip),%rax
mov    0x2d64(%rip),%rcx
mov    (%rcx),%esi
or     (%rax),%esi
mov    %rsp,%rbx
mov    %rbx,%rdi
call   1060 <open@plt>
mov    %eax,%ebp
lea    0xe8e(%rip),%rdi
mov    %rbx,%rsi
xor    %eax,%eax
call   1050 <printf@plt>
test   %ebp,%ebp
jle    12af <UART_init+0x14f>
lea    0xe89(%rip),%rsi
mov    %ebp,%edi
mov    $0x4,%edx
call   1040 <write@plt>
jmp    12bb <UART_init+0x15b>
lea    0xe97(%rip),%rdi
call   1030 <puts@plt>
lea    0xe6d(%rip),%rdi
mov    %r14d,%esi
xor    %eax,%eax
call   1050 <printf@plt>
lea    0xe6e(%rip),%rsi
lea    0x40(%rsp),%rbx
mov    %rbx,%rdi
mov    %r14d,%edx
call   1080 <sprintf@plt>
mov    0x2cfe(%rip),%rax
mov    0x2cd7(%rip),%rcx
mov    (%rcx),%esi
or     (%rax),%esi
mov    0x2ce4(%rip),%rax
or     (%rax),%esi
mov    %rbx,%rdi
call   1060 <open@plt>
add    $0x50,%rsp
pop    %rbx
pop    %r14
pop    %rbp
ret

LLVM IR (-O0):
@__const.UART_init.UARTSetAddr = [50 x i8] c"/sys/devices/ocp.3\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00"
@.str = [31 x i8] c"Number 0 is not export number\0A\00"
@.str.1 = [23 x i8] c"/P9_24_pinmux.41/state\00"
@.str.2 = [23 x i8] c"/P9_21_pinmux.38/state\00"
@.str.3 = [32 x i8] c"Number T3 is not export number\0A\00"
@.str.4 = [23 x i8] c"/P9_13_pinmux.32/state\00"
@.str.5 = [23 x i8] c"/P8_37_pinmux.26/state\00"
@.str.6 = [22 x i8] c"Out of export number\0A\00"
@.str.7 = [23 x i8] c"/P9_26_pinmux.42/state\00"
@.str.8 = [23 x i8] c"/P9_22_pinmux.39/state\00"
@.str.9 = [32 x i8] c"Number R3 is not export number\0A\00"
@.str.10 = [23 x i8] c"/P9_11_pinmux.30/state\00"
@.str.11 = [23 x i8] c"/P8_38_pinmux.27/state\00"
@.str.12 = [31 x i8] c"Error : Input data is invalid\0A\00"
@O_WRONLY = global i32 0
@S_IWRITE = global i32 0
@.str.13 = [16 x i8] c"echo uart > %s\0A\00"
@.str.14 = [5 x i8] c"uart\00"
@.str.15 = [32 x i8] c"Failed to setting UART-pinmux!\0A\00"
@.str.16 = [18 x i8] c"Setting : UART%i\0A\00"
@.str.17 = [12 x i8] c"/dev/ttyO%d\00"
@O_RDWR = global i32 0
@O_NOCTTY = global i32 0
@O_NONBLOCK = global i32 0
define i32 @UART_init(i32 %0, i8 signext %1) {
%3 = alloca i32
%4 = alloca i8
%5 = alloca i32
%6 = alloca i32
%7 = alloca [50 x i8]
%8 = alloca [15 x i8]
store i32 %0, i32* %3
store i8 %1, i8* %4
%9 = bitcast [50 x i8]* %7 to i8*
%10 = bitcast [15 x i8]* %8 to i8*
%11 = load i8, i8* %4
%12 = sext i8 %11 to i32
switch i32 %12, label %55 [
i32 84, label %13
i32 82, label %34
]
13: ; preds = %2
%14 = load i32, i32* %3
switch i32 %14, label %31 [
i32 0, label %15
i32 1, label %17
i32 2, label %20
i32 3, label %23
i32 4, label %25
i32 5, label %28
]
15: ; preds = %13
%16 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str, i64 0, i64 0))
br label %33
17: ; preds = %13
%18 = getelementptr inbounds [50 x i8], [50 x i8]* %7, i64 0, i64 0
%19 = call i32 @strcat(i8* %18, i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.1, i64 0, i64 0))
br label %33
20: ; preds = %13
%21 = getelementptr inbounds [50 x i8], [50 x i8]* %7, i64 0, i64 0
%22 = call i32 @strcat(i8* %21, i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.2, i64 0, i64 0))
br label %33
23: ; preds = %13
%24 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str.3, i64 0, i64 0))
br label %33
25: ; preds = %13
%26 = getelementptr inbounds [50 x i8], [50 x i8]* %7, i64 0, i64 0
%27 = call i32 @strcat(i8* %26, i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.4, i64 0, i64 0))
br label %33
28: ; preds = %13
%29 = getelementptr inbounds [50 x i8], [50 x i8]* %7, i64 0, i64 0
%30 = call i32 @strcat(i8* %29, i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.5, i64 0, i64 0))
br label %33
31: ; preds = %13
%32 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.6, i64 0, i64 0))
br label %33
33: ; preds = %31, %28, %25, %23, %20, %17, %15
br label %57
34: ; preds = %2
%35 = load i32, i32* %3
switch i32 %35, label %52 [
i32 0, label %36
i32 1, label %38
i32 2, label %41
i32 3, label %44
i32 4, label %46
i32 5, label %49
]
36: ; preds = %34
%37 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str, i64 0, i64 0))
br label %54
38: ; preds = %34
%39 = getelementptr inbounds [50 x i8], [50 x i8]* %7, i64 0, i64 0
%40 = call i32 @strcat(i8* %39, i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.7, i64 0, i64 0))
br label %54
41: ; preds = %34
%42 = getelementptr inbounds [50 x i8], [50 x i8]* %7, i64 0, i64 0
%43 = call i32 @strcat(i8* %42, i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.8, i64 0, i64 0))
br label %54
44: ; preds = %34
%45 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str.9, i64 0, i64 0))
br label %54
46: ; preds = %34
%47 = getelementptr inbounds [50 x i8], [50 x i8]* %7, i64 0, i64 0
%48 = call i32 @strcat(i8* %47, i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.10, i64 0, i64 0))
br label %54
49: ; preds = %34
%50 = getelementptr inbounds [50 x i8], [50 x i8]* %7, i64 0, i64 0
%51 = call i32 @strcat(i8* %50, i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.11, i64 0, i64 0))
br label %54
52: ; preds = %34
%53 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.6, i64 0, i64 0))
br label %54
54: ; preds = %52, %49, %46, %44, %41, %38, %36
br label %57
55: ; preds = %2
%56 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str.12, i64 0, i64 0))
br label %57
57: ; preds = %55, %54, %33
%58 = getelementptr inbounds [50 x i8], [50 x i8]* %7, i64 0, i64 0
%59 = load i32, i32* @O_WRONLY
%60 = load i32, i32* @S_IWRITE
%61 = or i32 %59, %60
%62 = call i32 @open(i8* %58, i32 %61)
store i32 %62, i32* %6
%63 = getelementptr inbounds [50 x i8], [50 x i8]* %7, i64 0, i64 0
%64 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.13, i64 0, i64 0), i8* %63)
%65 = load i32, i32* %6
%66 = icmp sgt i32 %65, 0
br i1 %66, label %67, label %70
67: ; preds = %57
%68 = load i32, i32* %6
%69 = call i32 @write(i32 %68, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.14, i64 0, i64 0), i32 4)
br label %72
70: ; preds = %57
%71 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str.15, i64 0, i64 0))
br label %72
72: ; preds = %70, %67
%73 = load i32, i32* %3
%74 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.16, i64 0, i64 0), i32 %73)
%75 = getelementptr inbounds [15 x i8], [15 x i8]* %8, i64 0, i64 0
%76 = load i32, i32* %3
%77 = call i32 @sprintf(i8* %75, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.17, i64 0, i64 0), i32 %76)
%78 = getelementptr inbounds [15 x i8], [15 x i8]* %8, i64 0, i64 0
%79 = load i32, i32* @O_RDWR
%80 = load i32, i32* @O_NOCTTY
%81 = or i32 %79, %80
%82 = load i32, i32* @O_NONBLOCK
%83 = or i32 %81, %82
%84 = call i32 @open(i8* %78, i32 %83)
store i32 %84, i32* %5
%85 = load i32, i32* %5
ret i32 %85
}

LLVM IR (-O2):
@__const.UART_init.UARTSetAddr = [50 x i8] c"/sys/devices/ocp.3\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00"
@.str.1 = [23 x i8] c"/P9_24_pinmux.41/state\00"
@.str.2 = [23 x i8] c"/P9_21_pinmux.38/state\00"
@.str.4 = [23 x i8] c"/P9_13_pinmux.32/state\00"
@.str.5 = [23 x i8] c"/P8_37_pinmux.26/state\00"
@.str.7 = [23 x i8] c"/P9_26_pinmux.42/state\00"
@.str.8 = [23 x i8] c"/P9_22_pinmux.39/state\00"
@.str.10 = [23 x i8] c"/P9_11_pinmux.30/state\00"
@.str.11 = [23 x i8] c"/P8_38_pinmux.27/state\00"
@O_WRONLY = global i32 0
@S_IWRITE = global i32 0
@.str.13 = [16 x i8] c"echo uart > %s\0A\00"
@.str.14 = [5 x i8] c"uart\00"
@.str.16 = [18 x i8] c"Setting : UART%i\0A\00"
@.str.17 = [12 x i8] c"/dev/ttyO%d\00"
@O_RDWR = global i32 0
@O_NOCTTY = global i32 0
@O_NONBLOCK = global i32 0
@str = [31 x i8] c"Failed to setting UART-pinmux!\00"
@str.18 = [31 x i8] c"Number R3 is not export number\00"
@str.21 = [31 x i8] c"Number T3 is not export number\00"
@str.22 = [30 x i8] c"Number 0 is not export number\00"
@str.23 = [21 x i8] c"Out of export number\00"
@str.24 = [30 x i8] c"Error : Input data is invalid\00"
define i32 @UART_init(i32 %0, i8 signext %1) {
%3 = alloca [50 x i8]
%4 = alloca [15 x i8]
%5 = getelementptr inbounds [50 x i8], [50 x i8]* %3, i64 0, i64 0
%6 = getelementptr inbounds [15 x i8], [15 x i8]* %4, i64 0, i64 0
%7 = sext i8 %1 to i32
switch i32 %7, label %38 [
i32 84, label %8
i32 82, label %23
]
8: ; preds = %2
switch i32 %0, label %21 [
i32 0, label %9
i32 1, label %11
i32 2, label %13
i32 3, label %15
i32 4, label %17
i32 5, label %19
]
9: ; preds = %8
%10 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([30 x i8], [30 x i8]* @str.22, i64 0, i64 0))
br label %40
11: ; preds = %8
%12 = call i32 @strcat(i8* %5, i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.1, i64 0, i64 0))
br label %40
13: ; preds = %8
%14 = call i32 @strcat(i8* %5, i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.2, i64 0, i64 0))
br label %40
15: ; preds = %8
%16 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([31 x i8], [31 x i8]* @str.21, i64 0, i64 0))
br label %40
17: ; preds = %8
%18 = call i32 @strcat(i8* %5, i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.4, i64 0, i64 0))
br label %40
19: ; preds = %8
%20 = call i32 @strcat(i8* %5, i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.5, i64 0, i64 0))
br label %40
21: ; preds = %8
%22 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([21 x i8], [21 x i8]* @str.23, i64 0, i64 0))
br label %40
23: ; preds = %2
switch i32 %0, label %36 [
i32 0, label %24
i32 1, label %26
i32 2, label %28
i32 3, label %30
i32 4, label %32
i32 5, label %34
]
24: ; preds = %23
%25 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([30 x i8], [30 x i8]* @str.22, i64 0, i64 0))
br label %40
26: ; preds = %23
%27 = call i32 @strcat(i8* %5, i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.7, i64 0, i64 0))
br label %40
28: ; preds = %23
%29 = call i32 @strcat(i8* %5, i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.8, i64 0, i64 0))
br label %40
30: ; preds = %23
%31 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([31 x i8], [31 x i8]* @str.18, i64 0, i64 0))
br label %40
32: ; preds = %23
%33 = call i32 @strcat(i8* %5, i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.10, i64 0, i64 0))
br label %40
34: ; preds = %23
%35 = call i32 @strcat(i8* %5, i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.11, i64 0, i64 0))
br label %40
36: ; preds = %23
%37 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([21 x i8], [21 x i8]* @str.23, i64 0, i64 0))
br label %40
38: ; preds = %2
%39 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([30 x i8], [30 x i8]* @str.24, i64 0, i64 0))
br label %40
40: ; preds = %24, %26, %28, %30, %32, %34, %36, %9, %11, %13, %15, %17, %19, %21, %38
%41 = load i32, i32* @O_WRONLY
%42 = load i32, i32* @S_IWRITE
%43 = or i32 %42, %41
%44 = call i32 @open(i8* %5, i32 %43)
%45 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([16 x i8], [16 x i8]* @.str.13, i64 0, i64 0), i8* %5)
%46 = icmp sgt i32 %44, 0
br i1 %46, label %47, label %49
47: ; preds = %40
%48 = call i32 @write(i32 %44, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.14, i64 0, i64 0), i32 4)
br label %51
49: ; preds = %40
%50 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([31 x i8], [31 x i8]* @str, i64 0, i64 0))
br label %51
51: ; preds = %49, %47
%52 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([18 x i8], [18 x i8]* @.str.16, i64 0, i64 0), i32 %0)
%53 = call i32 @sprintf(i8* %6, i8* dereferenceable(1) getelementptr inbounds ([12 x i8], [12 x i8]* @.str.17, i64 0, i64 0), i32 %0)
%54 = load i32, i32* @O_RDWR
%55 = load i32, i32* @O_NOCTTY
%56 = or i32 %55, %54
%57 = load i32, i32* @O_NONBLOCK
%58 = or i32 %56, %57
%59 = call i32 @open(i8* %6, i32 %58)
ret i32 %59
}