#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 */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ O_WRONLY;
int atoi(char *);
int /*<<< orphan*/ close(int);
int /*<<< orphan*/ fclose(int /*<<< orphan*/ *);
int /*<<< orphan*/ *fopen(char *, char *);
int /*<<< orphan*/ help_info(int, char **);
int open(char *, int /*<<< orphan*/);
scalar_t__ play_file(int, int /*<<< orphan*/ *);
int /*<<< orphan*/ printf(char *, ...);
int /*<<< orphan*/ scanf(char *, char *);
scalar_t__ set_audio_config(int, int /*<<< orphan*/ *);
int main(int ac, char *av[]) {
  FILE *fd_file = NULL;
  int fd_audio;
  char rep[32];
  int err = 0;
  int ssi = 0;
  printf("Hi... \n");
  if (ac != 3) {
    help_info(ac, av);
    return 1;
  }
  ssi = atoi(av[1]);
  if ((ssi != 0) && (ssi != 1)) {
    printf("unrecognized parameter for audio channel\n");
    help_info(ac, av);
    return 1;
  }
  if (ssi == 0) {
    printf("playing on /dev/sound/adsp (SSI1)\n");
    fd_audio = open("/dev/sound/adsp", O_WRONLY);
  } else {
    printf("playing on /dev/sound/dsp (SSI2)\n");
    fd_audio = open("/dev/sound/dsp", O_WRONLY);
  }
  if (fd_audio < 0) {
    printf("Error opening device file\n");
    err++;
    goto end_err;
  }
  if ((fd_file = fopen(av[2], "r")) <= 0) {
    err++;
    goto err_file_not_found;
  }
  if (set_audio_config(fd_audio, fd_file) < 0) {
    printf("Bad format for file 1. ");
    printf("Do you want to continue ? (y/n) : ");
    scanf("%s", rep);
    err++;
    if (rep[0] != 'y') {
      goto err_fmt;
    }
  }
  err += play_file(fd_audio, fd_file);
  printf("************** Closing the device\n");
  fclose(fd_file);
  close(fd_audio);
  if (err) {
    goto end_err;
  }
  printf("All tests passed with success\n");
  return 0;
err_fmt:
  close(fd_audio);
  fclose(fd_file);
end_err:
  printf("Encountered %d errors\n", err);
  return err;
err_file_not_found:
  printf("Error opening the file %s \n", av[1]);
  close(fd_audio);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x50,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movq   $0x0,-0x18(%rbp)
movl   $0x0,-0x44(%rbp)
movl   $0x0,-0x48(%rbp)
lea    0xe2d(%rip),%rdi
mov    $0x0,%al
call   1060 <printf@plt>
cmpl   $0x3,-0x8(%rbp)
je     11fc <main+0x5c>
mov    -0x8(%rbp),%edi
mov    -0x10(%rbp),%rsi
call   1080 <help_info@plt>
movl   $0x1,-0x4(%rbp)
jmp    140c <main+0x26c>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
call   10c0 <atoi@plt>
mov    %eax,-0x48(%rbp)
cmpl   $0x0,-0x48(%rbp)
je     1246 <main+0xa6>
cmpl   $0x1,-0x48(%rbp)
je     1246 <main+0xa6>
lea    0xde1(%rip),%rdi
mov    $0x0,%al
call   1060 <printf@plt>
mov    -0x8(%rbp),%edi
mov    -0x10(%rbp),%rsi
call   1080 <help_info@plt>
movl   $0x1,-0x4(%rbp)
jmp    140c <main+0x26c>
cmpl   $0x0,-0x48(%rbp)
jne    127b <main+0xdb>
lea    0xddb(%rip),%rdi
mov    $0x0,%al
call   1060 <printf@plt>
mov    0x2d73(%rip),%rax
mov    (%rax),%esi
lea    0xde7(%rip),%rdi
call   10a0 <open@plt>
mov    %eax,-0x1c(%rbp)
jmp    12a1 <main+0x101>
lea    0xde3(%rip),%rdi
mov    $0x0,%al
call   1060 <printf@plt>
mov    0x2d48(%rip),%rax
mov    (%rax),%esi
lea    0xdee(%rip),%rdi
call   10a0 <open@plt>
mov    %eax,-0x1c(%rbp)
cmpl   $0x0,-0x1c(%rbp)
jge    12c7 <main+0x127>
lea    0xde4(%rip),%rdi
mov    $0x0,%al
call   1060 <printf@plt>
mov    -0x44(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x44(%rbp)
jmp    13cb <main+0x22b>
mov    -0x10(%rbp),%rax
mov    0x10(%rax),%rdi
lea    0xddb(%rip),%rsi
call   10b0 <fopen@plt>
mov    %rax,-0x18(%rbp)
cmp    $0x0,%rax
ja     12f7 <main+0x157>
mov    -0x44(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x44(%rbp)
jmp    13e7 <main+0x247>
mov    -0x1c(%rbp),%edi
mov    -0x18(%rbp),%rsi
call   1030 <set_audio_config@plt>
cmp    $0x0,%rax
jge    1359 <main+0x1b9>
lea    0xd9f(%rip),%rdi
mov    $0x0,%al
call   1060 <printf@plt>
lea    0xda9(%rip),%rdi
mov    $0x0,%al
call   1060 <printf@plt>
lea    -0x40(%rbp),%rsi
lea    0xdba(%rip),%rdi
call   1090 <scanf@plt>
mov    -0x44(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x44(%rbp)
movsbl -0x40(%rbp),%eax
cmp    $0x79,%eax
je     1354 <main+0x1b4>
jmp    13ba <main+0x21a>
jmp    1359 <main+0x1b9>
mov    -0x1c(%rbp),%edi
mov    -0x18(%rbp),%rsi
call   1040 <play_file@plt>
mov    %rax,%rcx
movslq -0x44(%rbp),%rax
add    %rcx,%rax
mov    %eax,-0x44(%rbp)
lea    0xd78(%rip),%rdi
mov    $0x0,%al
call   1060 <printf@plt>
mov    -0x18(%rbp),%rdi
call   1050 <fclose@plt>
mov    -0x1c(%rbp),%edi
call   1070 <close@plt>
cmpl   $0x0,-0x44(%rbp)
je     13a0 <main+0x200>
jmp    13cb <main+0x22b>
lea    0xd6d(%rip),%rdi
mov    $0x0,%al
call   1060 <printf@plt>
movl   $0x0,-0x4(%rbp)
jmp    140c <main+0x26c>
mov    -0x1c(%rbp),%edi
call   1070 <close@plt>
mov    -0x18(%rbp),%rdi
call   1050 <fclose@plt>
mov    -0x44(%rbp),%esi
lea    0xd5e(%rip),%rdi
mov    $0x0,%al
call   1060 <printf@plt>
mov    -0x44(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    140c <main+0x26c>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rsi
lea    0xd54(%rip),%rdi
mov    $0x0,%al
call   1060 <printf@plt>
mov    -0x1c(%rbp),%edi
call   1070 <close@plt>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x50,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %rbx
sub    $0x28,%rsp
mov    %rsi,%rbx
mov    %edi,%ebp
lea    0xecc(%rip),%rdi
call   1030 <puts@plt>
cmp    $0x3,%ebp
jne    124e <main+0x9e>
mov    0x8(%rbx),%rdi
call   10d0 <atoi@plt>
cmp    $0x2,%eax
jae    1252 <main+0xa2>
test   %eax,%eax
lea    0xf2d(%rip),%rax
lea    0xeab(%rip),%rdi
cmove  %rax,%rdi
lea    0xe07(%rip),%rax
lea    0xe10(%rip),%rbp
cmove  %rax,%rbp
call   1030 <puts@plt>
mov    0x2dc8(%rip),%rax
mov    (%rax),%esi
mov    %rbp,%rdi
call   10b0 <open@plt>
test   %eax,%eax
js     127d <main+0xcd>
mov    %eax,%ebp
mov    0x10(%rbx),%rdi
lea    0xdf4(%rip),%rsi
call   10c0 <fopen@plt>
test   %rax,%rax
je     1293 <main+0xe3>
mov    %rax,%r14
mov    %ebp,%edi
mov    %rax,%rsi
call   1040 <set_audio_config@plt>
test   %rax,%rax
js     12b0 <main+0x100>
xor    %ebx,%ebx
jmp    12e6 <main+0x136>
mov    %ebp,%edi
jmp    1263 <main+0xb3>
lea    0xedd(%rip),%rdi
call   1030 <puts@plt>
mov    $0x3,%edi
mov    %rbx,%rsi
call   1090 <help_info@plt>
mov    $0x1,%ebx
mov    %ebx,%eax
add    $0x28,%rsp
pop    %rbx
pop    %r14
pop    %r15
pop    %rbp
ret
lea    0xe76(%rip),%rdi
call   1030 <puts@plt>
mov    $0x1,%ebx
jmp    1313 <main+0x163>
mov    0x8(%rbx),%rsi
lea    0xdd8(%rip),%rdi
xor    %ebx,%ebx
xor    %eax,%eax
call   1070 <printf@plt>
mov    %ebp,%edi
call   1080 <close@plt>
jmp    1270 <main+0xc0>
lea    0xd6a(%rip),%rdi
xor    %eax,%eax
call   1070 <printf@plt>
lea    0xd74(%rip),%rdi
xor    %eax,%eax
call   1070 <printf@plt>
lea    0xd89(%rip),%rdi
mov    %rsp,%rsi
call   10a0 <scanf@plt>
mov    $0x1,%ebx
cmpb   $0x79,(%rsp)
jne    133b <main+0x18b>
mov    %ebp,%edi
mov    %r14,%rsi
call   1050 <play_file@plt>
mov    %rax,%r15
lea    0xdc0(%rip),%rdi
call   1030 <puts@plt>
mov    %r14,%rdi
call   1060 <fclose@plt>
mov    %ebp,%edi
call   1080 <close@plt>
add    %r15d,%ebx
je     1328 <main+0x178>
lea    0xd45(%rip),%rdi
mov    %ebx,%esi
xor    %eax,%eax
call   1070 <printf@plt>
jmp    1270 <main+0xc0>
lea    0xdad(%rip),%rdi
call   1030 <puts@plt>
xor    %ebx,%ebx
jmp    1270 <main+0xc0>
mov    %ebp,%edi
call   1080 <close@plt>
mov    %r14,%rdi
call   1060 <fclose@plt>
jmp    1289 <main+0xd9>

LLVM IR (-O0):
@.str = [8 x i8] c"Hi... \0A\00"
@.str.1 = [42 x i8] c"unrecognized parameter for audio channel\0A\00"
@.str.2 = [35 x i8] c"playing on /dev/sound/adsp (SSI1)\0A\00"
@.str.3 = [16 x i8] c"/dev/sound/adsp\00"
@O_WRONLY = global i32 0
@.str.4 = [34 x i8] c"playing on /dev/sound/dsp (SSI2)\0A\00"
@.str.5 = [15 x i8] c"/dev/sound/dsp\00"
@.str.6 = [27 x i8] c"Error opening device file\0A\00"
@.str.7 = [2 x i8] c"r\00"
@.str.8 = [24 x i8] c"Bad format for file 1. \00"
@.str.9 = [35 x i8] c"Do you want to continue ? (y/n) : \00"
@.str.10 = [3 x i8] c"%s\00"
@.str.11 = [35 x i8] c"************** Closing the device\0A\00"
@.str.12 = [31 x i8] c"All tests passed with success\0A\00"
@.str.13 = [23 x i8] c"Encountered %d errors\0A\00"
@.str.14 = [28 x i8] c"Error opening the file %s \0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i32*
%7 = alloca i32
%8 = alloca [32 x i8]
%9 = alloca i32
%10 = alloca i32
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
store i32* null, i32** %6
store i32 0, i32* %9
store i32 0, i32* %10
%11 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0))
%12 = load i32, i32* %4
%13 = icmp ne i32 %12, 3
br i1 %13, label %14, label %18
14: ; preds = %2
%15 = load i32, i32* %4
%16 = load i8**, i8*** %5
%17 = call i32 @help_info(i32 %15, i8** %16)
store i32 1, i32* %3
br label %112
18: ; preds = %2
%19 = load i8**, i8*** %5
%20 = getelementptr inbounds i8*, i8** %19, i64 1
%21 = load i8*, i8** %20
%22 = call i32 @atoi(i8* %21)
store i32 %22, i32* %10
%23 = load i32, i32* %10
%24 = icmp ne i32 %23, 0
br i1 %24, label %25, label %33
25: ; preds = %18
%26 = load i32, i32* %10
%27 = icmp ne i32 %26, 1
br i1 %27, label %28, label %33
28: ; preds = %25
%29 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([42 x i8], [42 x i8]* @.str.1, i64 0, i64 0))
%30 = load i32, i32* %4
%31 = load i8**, i8*** %5
%32 = call i32 @help_info(i32 %30, i8** %31)
store i32 1, i32* %3
br label %112
33: ; preds = %25, %18
%34 = load i32, i32* %10
%35 = icmp eq i32 %34, 0
br i1 %35, label %36, label %40
36: ; preds = %33
%37 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str.2, i64 0, i64 0))
%38 = load i32, i32* @O_WRONLY
%39 = call i32 @open(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.3, i64 0, i64 0), i32 %38)
store i32 %39, i32* %7
br label %44
40: ; preds = %33
%41 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str.4, i64 0, i64 0))
%42 = load i32, i32* @O_WRONLY
%43 = call i32 @open(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.5, i64 0, i64 0), i32 %42)
store i32 %43, i32* %7
br label %44
44: ; preds = %40, %36
%45 = load i32, i32* %7
%46 = icmp slt i32 %45, 0
br i1 %46, label %47, label %51
47: ; preds = %44
%48 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.6, i64 0, i64 0))
%49 = load i32, i32* %9
%50 = add nsw i32 %49, 1
store i32 %50, i32* %9
br label %101
51: ; preds = %44
%52 = load i8**, i8*** %5
%53 = getelementptr inbounds i8*, i8** %52, i64 2
%54 = load i8*, i8** %53
%55 = call i32* @fopen(i8* %54, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.7, i64 0, i64 0))
store i32* %55, i32** %6
%56 = icmp ule i32* %55, null
br i1 %56, label %57, label %60
57: ; preds = %51
%58 = load i32, i32* %9
%59 = add nsw i32 %58, 1
store i32 %59, i32* %9
br label %105
60: ; preds = %51
%61 = load i32, i32* %7
%62 = load i32*, i32** %6
%63 = call i64 @set_audio_config(i32 %61, i32* %62)
%64 = icmp slt i64 %63, 0
br i1 %64, label %65, label %78
65: ; preds = %60
%66 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.8, i64 0, i64 0))
%67 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str.9, i64 0, i64 0))
%68 = getelementptr inbounds [32 x i8], [32 x i8]* %8, i64 0, i64 0
%69 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.10, i64 0, i64 0), i8* %68)
%70 = load i32, i32* %9
%71 = add nsw i32 %70, 1
store i32 %71, i32* %9
%72 = getelementptr inbounds [32 x i8], [32 x i8]* %8, i64 0, i64 0
%73 = load i8, i8* %72
%74 = sext i8 %73 to i32
%75 = icmp ne i32 %74, 121
br i1 %75, label %76, label %77
76: ; preds = %65
br label %96
77: ; preds = %65
br label %78
78: ; preds = %77, %60
%79 = load i32, i32* %7
%80 = load i32*, i32** %6
%81 = call i64 @play_file(i32 %79, i32* %80)
%82 = load i32, i32* %9
%83 = sext i32 %82 to i64
%84 = add nsw i64 %83, %81
%85 = trunc i64 %84 to i32
store i32 %85, i32* %9
%86 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str.11, i64 0, i64 0))
%87 = load i32*, i32** %6
%88 = call i32 @fclose(i32* %87)
%89 = load i32, i32* %7
%90 = call i32 @close(i32 %89)
%91 = load i32, i32* %9
%92 = icmp ne i32 %91, 0
br i1 %92, label %93, label %94
93: ; preds = %78
br label %101
94: ; preds = %78
%95 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str.12, i64 0, i64 0))
store i32 0, i32* %3
br label %112
96: ; preds = %76
%97 = load i32, i32* %7
%98 = call i32 @close(i32 %97)
%99 = load i32*, i32** %6
%100 = call i32 @fclose(i32* %99)
br label %101
101: ; preds = %96, %93, %47
%102 = load i32, i32* %9
%103 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.13, i64 0, i64 0), i32 %102)
%104 = load i32, i32* %9
store i32 %104, i32* %3
br label %112
105: ; preds = %57
%106 = load i8**, i8*** %5
%107 = getelementptr inbounds i8*, i8** %106, i64 1
%108 = load i8*, i8** %107
%109 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.14, i64 0, i64 0), i8* %108)
%110 = load i32, i32* %7
%111 = call i32 @close(i32 %110)
store i32 0, i32* %3
br label %112
112: ; preds = %105, %101, %94, %28, %14
%113 = load i32, i32* %3
ret i32 %113
}

LLVM IR (-O2):
@.str.3 = [16 x i8] c"/dev/sound/adsp\00"
@O_WRONLY = global i32 0
@.str.5 = [15 x i8] c"/dev/sound/dsp\00"
@.str.7 = [2 x i8] c"r\00"
@.str.8 = [24 x i8] c"Bad format for file 1. \00"
@.str.9 = [35 x i8] c"Do you want to continue ? (y/n) : \00"
@.str.10 = [3 x i8] c"%s\00"
@.str.13 = [23 x i8] c"Encountered %d errors\0A\00"
@.str.14 = [28 x i8] c"Error opening the file %s \0A\00"
@str = [7 x i8] c"Hi... \00"
@str.15 = [33 x i8] c"playing on /dev/sound/dsp (SSI2)\00"
@str.16 = [34 x i8] c"************** Closing the device\00"
@str.17 = [30 x i8] c"All tests passed with success\00"
@str.18 = [26 x i8] c"Error opening device file\00"
@str.19 = [34 x i8] c"playing on /dev/sound/adsp (SSI1)\00"
@str.20 = [41 x i8] c"unrecognized parameter for audio channel\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca [32 x i8]
%4 = getelementptr inbounds [32 x i8], [32 x i8]* %3, i64 0, i64 0
%5 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @str, i64 0, i64 0))
%6 = icmp eq i32 %0, 3
br i1 %6, label %9, label %7
7: ; preds = %2
%8 = tail call i32 @help_info(i32 %0, i8** %1)
br label %62
9: ; preds = %2
%10 = getelementptr inbounds i8*, i8** %1, i64 1
%11 = load i8*, i8** %10
%12 = tail call i32 @atoi(i8* %11)
%13 = icmp ult i32 %12, 2
br i1 %13, label %17, label %14
14: ; preds = %9
%15 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([41 x i8], [41 x i8]* @str.20, i64 0, i64 0))
%16 = tail call i32 @help_info(i32 3, i8** %1)
br label %62
17: ; preds = %9
%18 = icmp eq i32 %12, 0
%19 = select i1 %18, i8* getelementptr inbounds ([34 x i8], [34 x i8]* @str.19, i64 0, i64 0), i8* getelementptr inbounds ([33 x i8], [33 x i8]* @str.15, i64 0, i64 0)
%20 = select i1 %18, i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.3, i64 0, i64 0), i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.5, i64 0, i64 0)
%21 = tail call i32 @puts(i8* dereferenceable(1) %19)
%22 = load i32, i32* @O_WRONLY
%23 = tail call i32 @open(i8* %20, i32 %22)
%24 = icmp slt i32 %23, 0
br i1 %24, label %25, label %27
25: ; preds = %17
%26 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([26 x i8], [26 x i8]* @str.18, i64 0, i64 0))
br label %59
27: ; preds = %17
%28 = getelementptr inbounds i8*, i8** %1, i64 2
%29 = load i8*, i8** %28
%30 = tail call i32* @fopen(i8* %29, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.7, i64 0, i64 0))
%31 = icmp eq i32* %30, null
br i1 %31, label %32, label %36
32: ; preds = %27
%33 = load i8*, i8** %10
%34 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([28 x i8], [28 x i8]* @.str.14, i64 0, i64 0), i8* %33)
%35 = tail call i32 @close(i32 %23)
br label %62
36: ; preds = %27
%37 = tail call i64 @set_audio_config(i32 %23, i32* %30)
%38 = icmp slt i64 %37, 0
br i1 %38, label %39, label %45
39: ; preds = %36
%40 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([24 x i8], [24 x i8]* @.str.8, i64 0, i64 0))
%41 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([35 x i8], [35 x i8]* @.str.9, i64 0, i64 0))
%42 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.10, i64 0, i64 0), i8* %4)
%43 = load i8, i8* %4
%44 = icmp eq i8 %43, 121
br i1 %44, label %45, label %56
45: ; preds = %39, %36
%46 = phi i64 [ 1, %39 ], [ 0, %36 ]
%47 = call i64 @play_file(i32 %23, i32* %30)
%48 = add nsw i64 %47, %46
%49 = trunc i64 %48 to i32
%50 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([34 x i8], [34 x i8]* @str.16, i64 0, i64 0))
%51 = call i32 @fclose(i32* %30)
%52 = call i32 @close(i32 %23)
%53 = icmp eq i32 %49, 0
br i1 %53, label %54, label %59
54: ; preds = %45
%55 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([30 x i8], [30 x i8]* @str.17, i64 0, i64 0))
br label %62
56: ; preds = %39
%57 = call i32 @close(i32 %23)
%58 = call i32 @fclose(i32* %30)
br label %59
59: ; preds = %45, %56, %25
%60 = phi i32 [ 1, %25 ], [ 1, %56 ], [ %49, %45 ]
%61 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([23 x i8], [23 x i8]* @.str.13, i64 0, i64 0), i32 %60)
br label %62
62: ; preds = %32, %59, %54, %14, %7
%63 = phi i32 [ 1, %7 ], [ 1, %14 ], [ %60, %59 ], [ 0, %32 ], [ 0, %54 ]
ret i32 %63
}