#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 /*<<< orphan*/ F_OK;
int S_IFBLK;
int S_IFCHR;
int S_IFDIR;
int S_IFIFO;
int S_IFREG;
int S_IRWXU;
int /*<<< orphan*/ access_test(char *, int /*<<< orphan*/);
int expect_zng(int, int /*<<< orphan*/);
int /*<<< orphan*/ fflush(int /*<<< orphan*/ *);
int /*<<< orphan*/ mknod_test(char *, int, int /*<<< orphan*/);
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ testbreak();
int /*<<< orphan*/ unlink_test(char *);
int /*<<< orphan*/ xtmpnam(char *);
int BasicMknod(void) {
  char tf[8192] = {0};
  int fd;
  int passed;
  int block = 0;
  xtmpnam(tf);
  testbreak();
  passed = expect_zng(0, mknod_test(tf, S_IFIFO | S_IRWXU, 0));
  if (passed != 0) {
    printf("\tFailed Phase 2: This call did something unexpected.\n");
    fflush(NULL);
    block = -1;
  };
  if (passed == -1) {
    printf("\tFail Phase 2: Aborting test because of catastrophic failure\n");
    fflush(NULL);
    return passed;
  };
  passed = expect_zng(0, access_test(tf, F_OK));
  if (passed != 0) {
    printf("\tFailed Phase 2: This call did something unexpected.\n");
    fflush(NULL);
    block = -1;
  };
  passed = expect_zng(0, unlink_test(tf));
  if (passed != 0) {
    printf("\tFailed Phase 2: This call did something unexpected.\n");
    fflush(NULL);
    block = -1;
  };
  testbreak();
  passed = expect_zng(-1, mknod_test(tf, S_IFCHR | S_IRWXU, 0));
  if (passed != 0) {
    printf("\tFailed Phase 2: This call did something unexpected.\n");
    fflush(NULL);
    block = -1;
  };
  if (passed == -1) {
    printf("\tFail Phase 2: Aborting test because of catastrophic failure\n");
    fflush(NULL);
    return passed;
  };
  passed = expect_zng(-1, access_test(tf, F_OK));
  if (passed != 0) {
    printf("\tFailed Phase 2: This call did something unexpected.\n");
    fflush(NULL);
    block = -1;
  };
  passed = expect_zng(-1, unlink_test(tf));
  if (passed != 0) {
    printf("\tFailed Phase 2: This call did something unexpected.\n");
    fflush(NULL);
    block = -1;
  };
  testbreak();
  passed = expect_zng(-1, mknod_test(tf, S_IFDIR | S_IRWXU, 0));
  if (passed != 0) {
    printf("\tFailed Phase 2: This call did something unexpected.\n");
    fflush(NULL);
    block = -1;
  };
  if (passed == -1) {
    printf("\tFail Phase 2: Aborting test because of catastrophic failure\n");
    fflush(NULL);
    return passed;
  };
  passed = expect_zng(-1, access_test(tf, F_OK));
  if (passed != 0) {
    printf("\tFailed Phase 2: This call did something unexpected.\n");
    fflush(NULL);
    block = -1;
  };
  passed = expect_zng(-1, unlink_test(tf));
  if (passed != 0) {
    printf("\tFailed Phase 2: This call did something unexpected.\n");
    fflush(NULL);
    block = -1;
  };
  testbreak();
  passed = expect_zng(-1, mknod_test(tf, S_IFBLK | S_IRWXU, 0));
  if (passed != 0) {
    printf("\tFailed Phase 2: This call did something unexpected.\n");
    fflush(NULL);
    block = -1;
  };
  if (passed == -1) {
    printf("\tFail Phase 2: Aborting test because of catastrophic failure\n");
    fflush(NULL);
    return passed;
  };
  passed = expect_zng(-1, access_test(tf, F_OK));
  if (passed != 0) {
    printf("\tFailed Phase 2: This call did something unexpected.\n");
    fflush(NULL);
    block = -1;
  };
  passed = expect_zng(-1, unlink_test(tf));
  if (passed != 0) {
    printf("\tFailed Phase 2: This call did something unexpected.\n");
    fflush(NULL);
    block = -1;
  };
  testbreak();
  passed = expect_zng(-1, mknod_test(tf, S_IFREG | S_IRWXU, 0));
  if (passed != 0) {
    printf("\tFailed Phase 2: This call did something unexpected.\n");
    fflush(NULL);
    block = -1;
  };
  if (passed == -1) {
    printf("\tFail Phase 2: Aborting test because of catastrophic failure\n");
    fflush(NULL);
    return passed;
  };
  passed = expect_zng(-1, access_test(tf, F_OK));
  if (passed != 0) {
    printf("\tFailed Phase 2: This call did something unexpected.\n");
    fflush(NULL);
    block = -1;
  };
  passed = expect_zng(-1, unlink_test(tf));
  if (passed != 0) {
    printf("\tFailed Phase 2: This call did something unexpected.\n");
    fflush(NULL);
    block = -1;
  };
  testbreak();
  return block;
}


x86 assembly (clang, -O0):
<BasicMknod>:
push   %rbp
mov    %rsp,%rbp
sub    $0x2020,%rsp
lea    -0x2010(%rbp),%rdi
xor    %esi,%esi
mov    $0x2000,%edx
call   1060 <memset@plt>
movl   $0x0,-0x201c(%rbp)
lea    -0x2010(%rbp),%rdi
call   1040 <xtmpnam@plt>
mov    $0x0,%al
call   1090 <testbreak@plt>
lea    -0x2010(%rbp),%rdi
mov    0x2de7(%rip),%rax
mov    (%rax),%esi
mov    0x2e06(%rip),%rax
or     (%rax),%esi
xor    %edx,%edx
call   1030 <mknod_test@plt>
mov    %eax,%esi
xor    %edi,%edi
call   1070 <expect_zng@plt>
mov    %eax,-0x2018(%rbp)
cmpl   $0x0,-0x2018(%rbp)
je     1226 <BasicMknod+0x96>
lea    0xdf2(%rip),%rdi
call   1050 <printf@plt>
xor    %eax,%eax
mov    %eax,%edi
call   1080 <fflush@plt>
movl   $0xffffffff,-0x201c(%rbp)
ff ff ff
cmpl   $0xffffffff,-0x2018(%rbp)
jne    1256 <BasicMknod+0xc6>
lea    0xdfc(%rip),%rdi
call   1050 <printf@plt>
xor    %eax,%eax
mov    %eax,%edi
call   1080 <fflush@plt>
mov    -0x2018(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    17c5 <BasicMknod+0x635>
lea    -0x2010(%rbp),%rdi
mov    0x2d4c(%rip),%rax
mov    (%rax),%esi
call   10b0 <access_test@plt>
mov    %eax,%esi
xor    %edi,%edi
call   1070 <expect_zng@plt>
mov    %eax,-0x2018(%rbp)
cmpl   $0x0,-0x2018(%rbp)
je     12a6 <BasicMknod+0x116>
lea    0xd72(%rip),%rdi
call   1050 <printf@plt>
xor    %eax,%eax
mov    %eax,%edi
call   1080 <fflush@plt>
movl   $0xffffffff,-0x201c(%rbp)
ff ff ff
lea    -0x2010(%rbp),%rdi
call   10a0 <unlink_test@plt>
mov    %eax,%esi
xor    %edi,%edi
call   1070 <expect_zng@plt>
mov    %eax,-0x2018(%rbp)
cmpl   $0x0,-0x2018(%rbp)
je     12ed <BasicMknod+0x15d>
lea    0xd2b(%rip),%rdi
call   1050 <printf@plt>
xor    %eax,%eax
mov    %eax,%edi
call   1080 <fflush@plt>
movl   $0xffffffff,-0x201c(%rbp)
ff ff ff
mov    $0x0,%al
call   1090 <testbreak@plt>
lea    -0x2010(%rbp),%rdi
mov    0x2cc6(%rip),%rax
mov    (%rax),%esi
mov    0x2cdd(%rip),%rax
or     (%rax),%esi
xor    %edx,%edx
call   1030 <mknod_test@plt>
mov    %eax,%esi
mov    $0xffffffff,%edi
call   1070 <expect_zng@plt>
mov    %eax,-0x2018(%rbp)
cmpl   $0x0,-0x2018(%rbp)
je     1352 <BasicMknod+0x1c2>
lea    0xcc6(%rip),%rdi
call   1050 <printf@plt>
xor    %eax,%eax
mov    %eax,%edi
call   1080 <fflush@plt>
movl   $0xffffffff,-0x201c(%rbp)
ff ff ff
cmpl   $0xffffffff,-0x2018(%rbp)
jne    1382 <BasicMknod+0x1f2>
lea    0xcd0(%rip),%rdi
call   1050 <printf@plt>
xor    %eax,%eax
mov    %eax,%edi
call   1080 <fflush@plt>
mov    -0x2018(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    17c5 <BasicMknod+0x635>
lea    -0x2010(%rbp),%rdi
mov    0x2c20(%rip),%rax
mov    (%rax),%esi
call   10b0 <access_test@plt>
mov    %eax,%esi
mov    $0xffffffff,%edi
call   1070 <expect_zng@plt>
mov    %eax,-0x2018(%rbp)
cmpl   $0x0,-0x2018(%rbp)
je     13d5 <BasicMknod+0x245>
lea    0xc43(%rip),%rdi
call   1050 <printf@plt>
xor    %eax,%eax
mov    %eax,%edi
call   1080 <fflush@plt>
movl   $0xffffffff,-0x201c(%rbp)
ff ff ff
lea    -0x2010(%rbp),%rdi
call   10a0 <unlink_test@plt>
mov    %eax,%esi
mov    $0xffffffff,%edi
call   1070 <expect_zng@plt>
mov    %eax,-0x2018(%rbp)
cmpl   $0x0,-0x2018(%rbp)
je     141f <BasicMknod+0x28f>
lea    0xbf9(%rip),%rdi
call   1050 <printf@plt>
xor    %eax,%eax
mov    %eax,%edi
call   1080 <fflush@plt>
movl   $0xffffffff,-0x201c(%rbp)
ff ff ff
mov    $0x0,%al
call   1090 <testbreak@plt>
lea    -0x2010(%rbp),%rdi
mov    0x2b74(%rip),%rax
mov    (%rax),%esi
mov    0x2bab(%rip),%rax
or     (%rax),%esi
xor    %edx,%edx
call   1030 <mknod_test@plt>
mov    %eax,%esi
mov    $0xffffffff,%edi
call   1070 <expect_zng@plt>
mov    %eax,-0x2018(%rbp)
cmpl   $0x0,-0x2018(%rbp)
je     1484 <BasicMknod+0x2f4>
lea    0xb94(%rip),%rdi
call   1050 <printf@plt>
xor    %eax,%eax
mov    %eax,%edi
call   1080 <fflush@plt>
movl   $0xffffffff,-0x201c(%rbp)
ff ff ff
cmpl   $0xffffffff,-0x2018(%rbp)
jne    14b4 <BasicMknod+0x324>
lea    0xb9e(%rip),%rdi
call   1050 <printf@plt>
xor    %eax,%eax
mov    %eax,%edi
call   1080 <fflush@plt>
mov    -0x2018(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    17c5 <BasicMknod+0x635>
lea    -0x2010(%rbp),%rdi
mov    0x2aee(%rip),%rax
mov    (%rax),%esi
call   10b0 <access_test@plt>
mov    %eax,%esi
mov    $0xffffffff,%edi
call   1070 <expect_zng@plt>
mov    %eax,-0x2018(%rbp)
cmpl   $0x0,-0x2018(%rbp)
je     1507 <BasicMknod+0x377>
lea    0xb11(%rip),%rdi
call   1050 <printf@plt>
xor    %eax,%eax
mov    %eax,%edi
call   1080 <fflush@plt>
movl   $0xffffffff,-0x201c(%rbp)
ff ff ff
lea    -0x2010(%rbp),%rdi
call   10a0 <unlink_test@plt>
mov    %eax,%esi
mov    $0xffffffff,%edi
call   1070 <expect_zng@plt>
mov    %eax,-0x2018(%rbp)
cmpl   $0x0,-0x2018(%rbp)
je     1551 <BasicMknod+0x3c1>
lea    0xac7(%rip),%rdi
call   1050 <printf@plt>
xor    %eax,%eax
mov    %eax,%edi
call   1080 <fflush@plt>
movl   $0xffffffff,-0x201c(%rbp)
ff ff ff
mov    $0x0,%al
call   1090 <testbreak@plt>
lea    -0x2010(%rbp),%rdi
mov    0x2a6a(%rip),%rax
mov    (%rax),%esi
mov    0x2a79(%rip),%rax
or     (%rax),%esi
xor    %edx,%edx
call   1030 <mknod_test@plt>
mov    %eax,%esi
mov    $0xffffffff,%edi
call   1070 <expect_zng@plt>
mov    %eax,-0x2018(%rbp)
cmpl   $0x0,-0x2018(%rbp)
je     15b6 <BasicMknod+0x426>
lea    0xa62(%rip),%rdi
call   1050 <printf@plt>
xor    %eax,%eax
mov    %eax,%edi
call   1080 <fflush@plt>
movl   $0xffffffff,-0x201c(%rbp)
ff ff ff
cmpl   $0xffffffff,-0x2018(%rbp)
jne    15e6 <BasicMknod+0x456>
lea    0xa6c(%rip),%rdi
call   1050 <printf@plt>
xor    %eax,%eax
mov    %eax,%edi
call   1080 <fflush@plt>
mov    -0x2018(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    17c5 <BasicMknod+0x635>
lea    -0x2010(%rbp),%rdi
mov    0x29bc(%rip),%rax
mov    (%rax),%esi
call   10b0 <access_test@plt>
mov    %eax,%esi
mov    $0xffffffff,%edi
call   1070 <expect_zng@plt>
mov    %eax,-0x2018(%rbp)
cmpl   $0x0,-0x2018(%rbp)
je     1639 <BasicMknod+0x4a9>
lea    0x9df(%rip),%rdi
call   1050 <printf@plt>
xor    %eax,%eax
mov    %eax,%edi
call   1080 <fflush@plt>
movl   $0xffffffff,-0x201c(%rbp)
ff ff ff
lea    -0x2010(%rbp),%rdi
call   10a0 <unlink_test@plt>
mov    %eax,%esi
mov    $0xffffffff,%edi
call   1070 <expect_zng@plt>
mov    %eax,-0x2018(%rbp)
cmpl   $0x0,-0x2018(%rbp)
je     1683 <BasicMknod+0x4f3>
lea    0x995(%rip),%rdi
call   1050 <printf@plt>
xor    %eax,%eax
mov    %eax,%edi
call   1080 <fflush@plt>
movl   $0xffffffff,-0x201c(%rbp)
ff ff ff
mov    $0x0,%al
call   1090 <testbreak@plt>
lea    -0x2010(%rbp),%rdi
mov    0x2948(%rip),%rax
mov    (%rax),%esi
mov    0x2947(%rip),%rax
or     (%rax),%esi
xor    %edx,%edx
call   1030 <mknod_test@plt>
mov    %eax,%esi
mov    $0xffffffff,%edi
call   1070 <expect_zng@plt>
mov    %eax,-0x2018(%rbp)
cmpl   $0x0,-0x2018(%rbp)
je     16e8 <BasicMknod+0x558>
lea    0x930(%rip),%rdi
call   1050 <printf@plt>
xor    %eax,%eax
mov    %eax,%edi
call   1080 <fflush@plt>
movl   $0xffffffff,-0x201c(%rbp)
ff ff ff
cmpl   $0xffffffff,-0x2018(%rbp)
jne    1718 <BasicMknod+0x588>
lea    0x93a(%rip),%rdi
call   1050 <printf@plt>
xor    %eax,%eax
mov    %eax,%edi
call   1080 <fflush@plt>
mov    -0x2018(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    17c5 <BasicMknod+0x635>
lea    -0x2010(%rbp),%rdi
mov    0x288a(%rip),%rax
mov    (%rax),%esi
call   10b0 <access_test@plt>
mov    %eax,%esi
mov    $0xffffffff,%edi
call   1070 <expect_zng@plt>
mov    %eax,-0x2018(%rbp)
cmpl   $0x0,-0x2018(%rbp)
je     176b <BasicMknod+0x5db>
lea    0x8ad(%rip),%rdi
call   1050 <printf@plt>
xor    %eax,%eax
mov    %eax,%edi
call   1080 <fflush@plt>
movl   $0xffffffff,-0x201c(%rbp)
ff ff ff
lea    -0x2010(%rbp),%rdi
call   10a0 <unlink_test@plt>
mov    %eax,%esi
mov    $0xffffffff,%edi
call   1070 <expect_zng@plt>
mov    %eax,-0x2018(%rbp)
cmpl   $0x0,-0x2018(%rbp)
je     17b5 <BasicMknod+0x625>
lea    0x863(%rip),%rdi
call   1050 <printf@plt>
xor    %eax,%eax
mov    %eax,%edi
call   1080 <fflush@plt>
movl   $0xffffffff,-0x201c(%rbp)
ff ff ff
mov    $0x0,%al
call   1090 <testbreak@plt>
mov    -0x201c(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x2020,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<BasicMknod>:
push   %rbp
push   %r15
push   %r14
push   %rbx
sub    $0x2008,%rsp
mov    %rsp,%rbp
xor    %ebx,%ebx
mov    $0x2000,%edx
mov    %rbp,%rdi
xor    %esi,%esi
call   1060 <memset@plt>
mov    %rbp,%rdi
call   1050 <xtmpnam@plt>
xor    %eax,%eax
call   1090 <testbreak@plt>
mov    0x2df9(%rip),%rax
mov    0x2e1a(%rip),%r14
mov    (%r14),%esi
or     (%rax),%esi
mov    %rbp,%rdi
xor    %edx,%edx
call   1030 <mknod_test@plt>
xor    %edi,%edi
mov    %eax,%esi
call   1070 <expect_zng@plt>
test   %eax,%eax
je     120d <BasicMknod+0x7d>
mov    %eax,%ebp
lea    0xe4a(%rip),%rdi
call   1040 <puts@plt>
xor    %edi,%edi
call   1080 <fflush@plt>
mov    $0xffffffff,%ebx
cmp    $0xffffffff,%ebp
je     1542 <BasicMknod+0x3b2>
mov    0x2d9c(%rip),%r15
mov    (%r15),%esi
mov    %rsp,%rdi
call   10b0 <access_test@plt>
xor    %edi,%edi
mov    %eax,%esi
call   1070 <expect_zng@plt>
test   %eax,%eax
je     1244 <BasicMknod+0xb4>
lea    0xe0a(%rip),%rdi
call   1040 <puts@plt>
xor    %edi,%edi
call   1080 <fflush@plt>
mov    $0xffffffff,%ebx
mov    %rsp,%rdi
call   10a0 <unlink_test@plt>
xor    %edi,%edi
mov    %eax,%esi
call   1070 <expect_zng@plt>
test   %eax,%eax
je     1271 <BasicMknod+0xe1>
lea    0xddd(%rip),%rdi
call   1040 <puts@plt>
xor    %edi,%edi
call   1080 <fflush@plt>
mov    $0xffffffff,%ebx
xor    %eax,%eax
call   1090 <testbreak@plt>
mov    0x2d49(%rip),%rax
mov    (%r14),%esi
or     (%rax),%esi
mov    %rsp,%rdi
xor    %edx,%edx
call   1030 <mknod_test@plt>
mov    $0xffffffff,%edi
mov    %eax,%esi
call   1070 <expect_zng@plt>
test   %eax,%eax
je     12c1 <BasicMknod+0x131>
mov    %eax,%ebp
lea    0xd96(%rip),%rdi
call   1040 <puts@plt>
xor    %edi,%edi
call   1080 <fflush@plt>
mov    $0xffffffff,%ebx
cmp    $0xffffffff,%ebp
je     1542 <BasicMknod+0x3b2>
mov    (%r15),%esi
mov    %rsp,%rdi
call   10b0 <access_test@plt>
mov    $0xffffffff,%edi
mov    %eax,%esi
call   1070 <expect_zng@plt>
test   %eax,%eax
je     12f4 <BasicMknod+0x164>
lea    0xd5a(%rip),%rdi
call   1040 <puts@plt>
xor    %edi,%edi
call   1080 <fflush@plt>
mov    $0xffffffff,%ebx
mov    %rsp,%rdi
call   10a0 <unlink_test@plt>
mov    $0xffffffff,%edi
mov    %eax,%esi
call   1070 <expect_zng@plt>
test   %eax,%eax
je     1324 <BasicMknod+0x194>
lea    0xd2a(%rip),%rdi
call   1040 <puts@plt>
xor    %edi,%edi
call   1080 <fflush@plt>
mov    $0xffffffff,%ebx
xor    %eax,%eax
call   1090 <testbreak@plt>
mov    0x2c76(%rip),%rax
mov    (%r14),%esi
or     (%rax),%esi
mov    %rsp,%rdi
xor    %edx,%edx
call   1030 <mknod_test@plt>
mov    $0xffffffff,%edi
mov    %eax,%esi
call   1070 <expect_zng@plt>
test   %eax,%eax
je     1374 <BasicMknod+0x1e4>
mov    %eax,%ebp
lea    0xce3(%rip),%rdi
call   1040 <puts@plt>
xor    %edi,%edi
call   1080 <fflush@plt>
mov    $0xffffffff,%ebx
cmp    $0xffffffff,%ebp
je     1542 <BasicMknod+0x3b2>
mov    (%r15),%esi
mov    %rsp,%rdi
call   10b0 <access_test@plt>
mov    $0xffffffff,%edi
mov    %eax,%esi
call   1070 <expect_zng@plt>
test   %eax,%eax
je     13a7 <BasicMknod+0x217>
lea    0xca7(%rip),%rdi
call   1040 <puts@plt>
xor    %edi,%edi
call   1080 <fflush@plt>
mov    $0xffffffff,%ebx
mov    %rsp,%rdi
call   10a0 <unlink_test@plt>
mov    $0xffffffff,%edi
mov    %eax,%esi
call   1070 <expect_zng@plt>
test   %eax,%eax
je     13d7 <BasicMknod+0x247>
lea    0xc77(%rip),%rdi
call   1040 <puts@plt>
xor    %edi,%edi
call   1080 <fflush@plt>
mov    $0xffffffff,%ebx
xor    %eax,%eax
call   1090 <testbreak@plt>
mov    0x2beb(%rip),%rax
mov    (%r14),%esi
or     (%rax),%esi
mov    %rsp,%rdi
xor    %edx,%edx
call   1030 <mknod_test@plt>
mov    $0xffffffff,%edi
mov    %eax,%esi
call   1070 <expect_zng@plt>
test   %eax,%eax
je     1427 <BasicMknod+0x297>
mov    %eax,%ebp
lea    0xc30(%rip),%rdi
call   1040 <puts@plt>
xor    %edi,%edi
call   1080 <fflush@plt>
mov    $0xffffffff,%ebx
cmp    $0xffffffff,%ebp
je     1542 <BasicMknod+0x3b2>
mov    (%r15),%esi
mov    %rsp,%rdi
call   10b0 <access_test@plt>
mov    $0xffffffff,%edi
mov    %eax,%esi
call   1070 <expect_zng@plt>
test   %eax,%eax
je     145a <BasicMknod+0x2ca>
lea    0xbf4(%rip),%rdi
call   1040 <puts@plt>
xor    %edi,%edi
call   1080 <fflush@plt>
mov    $0xffffffff,%ebx
mov    %rsp,%rdi
call   10a0 <unlink_test@plt>
mov    $0xffffffff,%edi
mov    %eax,%esi
call   1070 <expect_zng@plt>
test   %eax,%eax
je     148a <BasicMknod+0x2fa>
lea    0xbc4(%rip),%rdi
call   1040 <puts@plt>
xor    %edi,%edi
call   1080 <fflush@plt>
mov    $0xffffffff,%ebx
xor    %eax,%eax
call   1090 <testbreak@plt>
mov    0x2b48(%rip),%rax
mov    (%r14),%esi
or     (%rax),%esi
mov    %rsp,%rdi
xor    %edx,%edx
call   1030 <mknod_test@plt>
mov    $0xffffffff,%edi
mov    %eax,%esi
call   1070 <expect_zng@plt>
test   %eax,%eax
je     14d6 <BasicMknod+0x346>
mov    %eax,%ebp
lea    0xb7d(%rip),%rdi
call   1040 <puts@plt>
xor    %edi,%edi
call   1080 <fflush@plt>
mov    $0xffffffff,%ebx
cmp    $0xffffffff,%ebp
je     1542 <BasicMknod+0x3b2>
mov    (%r15),%esi
mov    %rsp,%rdi
call   10b0 <access_test@plt>
mov    $0xffffffff,%edi
mov    %eax,%esi
call   1070 <expect_zng@plt>
test   %eax,%eax
je     1509 <BasicMknod+0x379>
lea    0xb45(%rip),%rdi
call   1040 <puts@plt>
xor    %edi,%edi
call   1080 <fflush@plt>
mov    $0xffffffff,%ebx
mov    %rsp,%rdi
call   10a0 <unlink_test@plt>
mov    $0xffffffff,%edi
mov    %eax,%esi
call   1070 <expect_zng@plt>
test   %eax,%eax
je     1539 <BasicMknod+0x3a9>
lea    0xb15(%rip),%rdi
call   1040 <puts@plt>
xor    %edi,%edi
call   1080 <fflush@plt>
mov    $0xffffffff,%ebx
xor    %eax,%eax
call   1090 <testbreak@plt>
jmp    155a <BasicMknod+0x3ca>
lea    0xab7(%rip),%rdi
call   1040 <puts@plt>
xor    %edi,%edi
call   1080 <fflush@plt>
mov    $0xffffffff,%ebx
mov    %ebx,%eax
add    $0x2008,%rsp
pop    %rbx
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@S_IFIFO = global i32 0
@S_IRWXU = global i32 0
@.str = [54 x i8] c"\09Failed Phase 2: This call did something unexpected.\0A\00"
@.str.1 = [62 x i8] c"\09Fail Phase 2: Aborting test because of catastrophic failure\0A\00"
@F_OK = global i32 0
@S_IFCHR = global i32 0
@S_IFDIR = global i32 0
@S_IFBLK = global i32 0
@S_IFREG = global i32 0
define i32 @BasicMknod() {
%1 = alloca i32
%2 = alloca [8192 x i8]
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
%6 = bitcast [8192 x i8]* %2 to i8*
store i32 0, i32* %5
%7 = getelementptr inbounds [8192 x i8], [8192 x i8]* %2, i64 0, i64 0
%8 = call i32 @xtmpnam(i8* %7)
%9 = call i32 (...) @testbreak()
%10 = getelementptr inbounds [8192 x i8], [8192 x i8]* %2, i64 0, i64 0
%11 = load i32, i32* @S_IFIFO
%12 = load i32, i32* @S_IRWXU
%13 = or i32 %11, %12
%14 = call i32 @mknod_test(i8* %10, i32 %13, i32 0)
%15 = call i32 @expect_zng(i32 0, i32 %14)
store i32 %15, i32* %4
%16 = load i32, i32* %4
%17 = icmp ne i32 %16, 0
br i1 %17, label %18, label %21
18: ; preds = %0
%19 = call i32 @printf(i8* getelementptr inbounds ([54 x i8], [54 x i8]* @.str, i64 0, i64 0))
%20 = call i32 @fflush(i32* null)
store i32 -1, i32* %5
br label %21
21: ; preds = %18, %0
%22 = load i32, i32* %4
%23 = icmp eq i32 %22, -1
br i1 %23, label %24, label %28
24: ; preds = %21
%25 = call i32 @printf(i8* getelementptr inbounds ([62 x i8], [62 x i8]* @.str.1, i64 0, i64 0))
%26 = call i32 @fflush(i32* null)
%27 = load i32, i32* %4
store i32 %27, i32* %1
br label %206
28: ; preds = %21
%29 = getelementptr inbounds [8192 x i8], [8192 x i8]* %2, i64 0, i64 0
%30 = load i32, i32* @F_OK
%31 = call i32 @access_test(i8* %29, i32 %30)
%32 = call i32 @expect_zng(i32 0, i32 %31)
store i32 %32, i32* %4
%33 = load i32, i32* %4
%34 = icmp ne i32 %33, 0
br i1 %34, label %35, label %38
35: ; preds = %28
%36 = call i32 @printf(i8* getelementptr inbounds ([54 x i8], [54 x i8]* @.str, i64 0, i64 0))
%37 = call i32 @fflush(i32* null)
store i32 -1, i32* %5
br label %38
38: ; preds = %35, %28
%39 = getelementptr inbounds [8192 x i8], [8192 x i8]* %2, i64 0, i64 0
%40 = call i32 @unlink_test(i8* %39)
%41 = call i32 @expect_zng(i32 0, i32 %40)
store i32 %41, i32* %4
%42 = load i32, i32* %4
%43 = icmp ne i32 %42, 0
br i1 %43, label %44, label %47
44: ; preds = %38
%45 = call i32 @printf(i8* getelementptr inbounds ([54 x i8], [54 x i8]* @.str, i64 0, i64 0))
%46 = call i32 @fflush(i32* null)
store i32 -1, i32* %5
br label %47
47: ; preds = %44, %38
%48 = call i32 (...) @testbreak()
%49 = getelementptr inbounds [8192 x i8], [8192 x i8]* %2, i64 0, i64 0
%50 = load i32, i32* @S_IFCHR
%51 = load i32, i32* @S_IRWXU
%52 = or i32 %50, %51
%53 = call i32 @mknod_test(i8* %49, i32 %52, i32 0)
%54 = call i32 @expect_zng(i32 -1, i32 %53)
store i32 %54, i32* %4
%55 = load i32, i32* %4
%56 = icmp ne i32 %55, 0
br i1 %56, label %57, label %60
57: ; preds = %47
%58 = call i32 @printf(i8* getelementptr inbounds ([54 x i8], [54 x i8]* @.str, i64 0, i64 0))
%59 = call i32 @fflush(i32* null)
store i32 -1, i32* %5
br label %60
60: ; preds = %57, %47
%61 = load i32, i32* %4
%62 = icmp eq i32 %61, -1
br i1 %62, label %63, label %67
63: ; preds = %60
%64 = call i32 @printf(i8* getelementptr inbounds ([62 x i8], [62 x i8]* @.str.1, i64 0, i64 0))
%65 = call i32 @fflush(i32* null)
%66 = load i32, i32* %4
store i32 %66, i32* %1
br label %206
67: ; preds = %60
%68 = getelementptr inbounds [8192 x i8], [8192 x i8]* %2, i64 0, i64 0
%69 = load i32, i32* @F_OK
%70 = call i32 @access_test(i8* %68, i32 %69)
%71 = call i32 @expect_zng(i32 -1, i32 %70)
store i32 %71, i32* %4
%72 = load i32, i32* %4
%73 = icmp ne i32 %72, 0
br i1 %73, label %74, label %77
74: ; preds = %67
%75 = call i32 @printf(i8* getelementptr inbounds ([54 x i8], [54 x i8]* @.str, i64 0, i64 0))
%76 = call i32 @fflush(i32* null)
store i32 -1, i32* %5
br label %77
77: ; preds = %74, %67
%78 = getelementptr inbounds [8192 x i8], [8192 x i8]* %2, i64 0, i64 0
%79 = call i32 @unlink_test(i8* %78)
%80 = call i32 @expect_zng(i32 -1, i32 %79)
store i32 %80, i32* %4
%81 = load i32, i32* %4
%82 = icmp ne i32 %81, 0
br i1 %82, label %83, label %86
83: ; preds = %77
%84 = call i32 @printf(i8* getelementptr inbounds ([54 x i8], [54 x i8]* @.str, i64 0, i64 0))
%85 = call i32 @fflush(i32* null)
store i32 -1, i32* %5
br label %86
86: ; preds = %83, %77
%87 = call i32 (...) @testbreak()
%88 = getelementptr inbounds [8192 x i8], [8192 x i8]* %2, i64 0, i64 0
%89 = load i32, i32* @S_IFDIR
%90 = load i32, i32* @S_IRWXU
%91 = or i32 %89, %90
%92 = call i32 @mknod_test(i8* %88, i32 %91, i32 0)
%93 = call i32 @expect_zng(i32 -1, i32 %92)
store i32 %93, i32* %4
%94 = load i32, i32* %4
%95 = icmp ne i32 %94, 0
br i1 %95, label %96, label %99
96: ; preds = %86
%97 = call i32 @printf(i8* getelementptr inbounds ([54 x i8], [54 x i8]* @.str, i64 0, i64 0))
%98 = call i32 @fflush(i32* null)
store i32 -1, i32* %5
br label %99
99: ; preds = %96, %86
%100 = load i32, i32* %4
%101 = icmp eq i32 %100, -1
br i1 %101, label %102, label %106
102: ; preds = %99
%103 = call i32 @printf(i8* getelementptr inbounds ([62 x i8], [62 x i8]* @.str.1, i64 0, i64 0))
%104 = call i32 @fflush(i32* null)
%105 = load i32, i32* %4
store i32 %105, i32* %1
br label %206
106: ; preds = %99
%107 = getelementptr inbounds [8192 x i8], [8192 x i8]* %2, i64 0, i64 0
%108 = load i32, i32* @F_OK
%109 = call i32 @access_test(i8* %107, i32 %108)
%110 = call i32 @expect_zng(i32 -1, i32 %109)
store i32 %110, i32* %4
%111 = load i32, i32* %4
%112 = icmp ne i32 %111, 0
br i1 %112, label %113, label %116
113: ; preds = %106
%114 = call i32 @printf(i8* getelementptr inbounds ([54 x i8], [54 x i8]* @.str, i64 0, i64 0))
%115 = call i32 @fflush(i32* null)
store i32 -1, i32* %5
br label %116
116: ; preds = %113, %106
%117 = getelementptr inbounds [8192 x i8], [8192 x i8]* %2, i64 0, i64 0
%118 = call i32 @unlink_test(i8* %117)
%119 = call i32 @expect_zng(i32 -1, i32 %118)
store i32 %119, i32* %4
%120 = load i32, i32* %4
%121 = icmp ne i32 %120, 0
br i1 %121, label %122, label %125
122: ; preds = %116
%123 = call i32 @printf(i8* getelementptr inbounds ([54 x i8], [54 x i8]* @.str, i64 0, i64 0))
%124 = call i32 @fflush(i32* null)
store i32 -1, i32* %5
br label %125
125: ; preds = %122, %116
%126 = call i32 (...) @testbreak()
%127 = getelementptr inbounds [8192 x i8], [8192 x i8]* %2, i64 0, i64 0
%128 = load i32, i32* @S_IFBLK
%129 = load i32, i32* @S_IRWXU
%130 = or i32 %128, %129
%131 = call i32 @mknod_test(i8* %127, i32 %130, i32 0)
%132 = call i32 @expect_zng(i32 -1, i32 %131)
store i32 %132, i32* %4
%133 = load i32, i32* %4
%134 = icmp ne i32 %133, 0
br i1 %134, label %135, label %138
135: ; preds = %125
%136 = call i32 @printf(i8* getelementptr inbounds ([54 x i8], [54 x i8]* @.str, i64 0, i64 0))
%137 = call i32 @fflush(i32* null)
store i32 -1, i32* %5
br label %138
138: ; preds = %135, %125
%139 = load i32, i32* %4
%140 = icmp eq i32 %139, -1
br i1 %140, label %141, label %145
141: ; preds = %138
%142 = call i32 @printf(i8* getelementptr inbounds ([62 x i8], [62 x i8]* @.str.1, i64 0, i64 0))
%143 = call i32 @fflush(i32* null)
%144 = load i32, i32* %4
store i32 %144, i32* %1
br label %206
145: ; preds = %138
%146 = getelementptr inbounds [8192 x i8], [8192 x i8]* %2, i64 0, i64 0
%147 = load i32, i32* @F_OK
%148 = call i32 @access_test(i8* %146, i32 %147)
%149 = call i32 @expect_zng(i32 -1, i32 %148)
store i32 %149, i32* %4
%150 = load i32, i32* %4
%151 = icmp ne i32 %150, 0
br i1 %151, label %152, label %155
152: ; preds = %145
%153 = call i32 @printf(i8* getelementptr inbounds ([54 x i8], [54 x i8]* @.str, i64 0, i64 0))
%154 = call i32 @fflush(i32* null)
store i32 -1, i32* %5
br label %155
155: ; preds = %152, %145
%156 = getelementptr inbounds [8192 x i8], [8192 x i8]* %2, i64 0, i64 0
%157 = call i32 @unlink_test(i8* %156)
%158 = call i32 @expect_zng(i32 -1, i32 %157)
store i32 %158, i32* %4
%159 = load i32, i32* %4
%160 = icmp ne i32 %159, 0
br i1 %160, label %161, label %164
161: ; preds = %155
%162 = call i32 @printf(i8* getelementptr inbounds ([54 x i8], [54 x i8]* @.str, i64 0, i64 0))
%163 = call i32 @fflush(i32* null)
store i32 -1, i32* %5
br label %164
164: ; preds = %161, %155
%165 = call i32 (...) @testbreak()
%166 = getelementptr inbounds [8192 x i8], [8192 x i8]* %2, i64 0, i64 0
%167 = load i32, i32* @S_IFREG
%168 = load i32, i32* @S_IRWXU
%169 = or i32 %167, %168
%170 = call i32 @mknod_test(i8* %166, i32 %169, i32 0)
%171 = call i32 @expect_zng(i32 -1, i32 %170)
store i32 %171, i32* %4
%172 = load i32, i32* %4
%173 = icmp ne i32 %172, 0
br i1 %173, label %174, label %177
174: ; preds = %164
%175 = call i32 @printf(i8* getelementptr inbounds ([54 x i8], [54 x i8]* @.str, i64 0, i64 0))
%176 = call i32 @fflush(i32* null)
store i32 -1, i32* %5
br label %177
177: ; preds = %174, %164
%178 = load i32, i32* %4
%179 = icmp eq i32 %178, -1
br i1 %179, label %180, label %184
180: ; preds = %177
%181 = call i32 @printf(i8* getelementptr inbounds ([62 x i8], [62 x i8]* @.str.1, i64 0, i64 0))
%182 = call i32 @fflush(i32* null)
%183 = load i32, i32* %4
store i32 %183, i32* %1
br label %206
184: ; preds = %177
%185 = getelementptr inbounds [8192 x i8], [8192 x i8]* %2, i64 0, i64 0
%186 = load i32, i32* @F_OK
%187 = call i32 @access_test(i8* %185, i32 %186)
%188 = call i32 @expect_zng(i32 -1, i32 %187)
store i32 %188, i32* %4
%189 = load i32, i32* %4
%190 = icmp ne i32 %189, 0
br i1 %190, label %191, label %194
191: ; preds = %184
%192 = call i32 @printf(i8* getelementptr inbounds ([54 x i8], [54 x i8]* @.str, i64 0, i64 0))
%193 = call i32 @fflush(i32* null)
store i32 -1, i32* %5
br label %194
194: ; preds = %191, %184
%195 = getelementptr inbounds [8192 x i8], [8192 x i8]* %2, i64 0, i64 0
%196 = call i32 @unlink_test(i8* %195)
%197 = call i32 @expect_zng(i32 -1, i32 %196)
store i32 %197, i32* %4
%198 = load i32, i32* %4
%199 = icmp ne i32 %198, 0
br i1 %199, label %200, label %203
200: ; preds = %194
%201 = call i32 @printf(i8* getelementptr inbounds ([54 x i8], [54 x i8]* @.str, i64 0, i64 0))
%202 = call i32 @fflush(i32* null)
store i32 -1, i32* %5
br label %203
203: ; preds = %200, %194
%204 = call i32 (...) @testbreak()
%205 = load i32, i32* %5
store i32 %205, i32* %1
br label %206
206: ; preds = %203, %180, %141, %102, %63, %24
%207 = load i32, i32* %1
ret i32 %207
}

LLVM IR (-O2):
@S_IFIFO = global i32 0
@S_IRWXU = global i32 0
@F_OK = global i32 0
@S_IFCHR = global i32 0
@S_IFDIR = global i32 0
@S_IFBLK = global i32 0
@S_IFREG = global i32 0
@str.19 = [61 x i8] c"\09Fail Phase 2: Aborting test because of catastrophic failure\00"
@str.20 = [53 x i8] c"\09Failed Phase 2: This call did something unexpected.\00"
define i32 @BasicMknod() {
%1 = alloca [8192 x i8]
%2 = getelementptr inbounds [8192 x i8], [8192 x i8]* %1, i64 0, i64 0
%3 = call i32 @xtmpnam(i8* %2)
%4 = call i32 (...) @testbreak()
%5 = load i32, i32* @S_IFIFO
%6 = load i32, i32* @S_IRWXU
%7 = or i32 %6, %5
%8 = call i32 @mknod_test(i8* %2, i32 %7, i32 0)
%9 = call i32 @expect_zng(i32 0, i32 %8)
%10 = icmp eq i32 %9, 0
br i1 %10, label %18, label %11
11: ; preds = %0
%12 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([53 x i8], [53 x i8]* @str.20, i64 0, i64 0))
%13 = call i32 @fflush(i32* null)
%14 = icmp eq i32 %9, -1
br i1 %14, label %15, label %18
15: ; preds = %11
%16 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([61 x i8], [61 x i8]* @str.19, i64 0, i64 0))
%17 = call i32 @fflush(i32* null)
br label %170
18: ; preds = %0, %11
%19 = phi i32 [ -1, %11 ], [ 0, %0 ]
%20 = load i32, i32* @F_OK
%21 = call i32 @access_test(i8* %2, i32 %20)
%22 = call i32 @expect_zng(i32 0, i32 %21)
%23 = icmp eq i32 %22, 0
br i1 %23, label %27, label %24
24: ; preds = %18
%25 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([53 x i8], [53 x i8]* @str.20, i64 0, i64 0))
%26 = call i32 @fflush(i32* null)
br label %27
27: ; preds = %24, %18
%28 = phi i32 [ -1, %24 ], [ %19, %18 ]
%29 = call i32 @unlink_test(i8* %2)
%30 = call i32 @expect_zng(i32 0, i32 %29)
%31 = icmp eq i32 %30, 0
br i1 %31, label %35, label %32
32: ; preds = %27
%33 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([53 x i8], [53 x i8]* @str.20, i64 0, i64 0))
%34 = call i32 @fflush(i32* null)
br label %35
35: ; preds = %32, %27
%36 = phi i32 [ -1, %32 ], [ %28, %27 ]
%37 = call i32 (...) @testbreak()
%38 = load i32, i32* @S_IFCHR
%39 = load i32, i32* @S_IRWXU
%40 = or i32 %39, %38
%41 = call i32 @mknod_test(i8* %2, i32 %40, i32 0)
%42 = call i32 @expect_zng(i32 -1, i32 %41)
%43 = icmp eq i32 %42, 0
br i1 %43, label %51, label %44
44: ; preds = %35
%45 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([53 x i8], [53 x i8]* @str.20, i64 0, i64 0))
%46 = call i32 @fflush(i32* null)
%47 = icmp eq i32 %42, -1
br i1 %47, label %48, label %51
48: ; preds = %44
%49 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([61 x i8], [61 x i8]* @str.19, i64 0, i64 0))
%50 = call i32 @fflush(i32* null)
br label %170
51: ; preds = %35, %44
%52 = phi i32 [ -1, %44 ], [ %36, %35 ]
%53 = load i32, i32* @F_OK
%54 = call i32 @access_test(i8* %2, i32 %53)
%55 = call i32 @expect_zng(i32 -1, i32 %54)
%56 = icmp eq i32 %55, 0
br i1 %56, label %60, label %57
57: ; preds = %51
%58 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([53 x i8], [53 x i8]* @str.20, i64 0, i64 0))
%59 = call i32 @fflush(i32* null)
br label %60
60: ; preds = %57, %51
%61 = phi i32 [ -1, %57 ], [ %52, %51 ]
%62 = call i32 @unlink_test(i8* %2)
%63 = call i32 @expect_zng(i32 -1, i32 %62)
%64 = icmp eq i32 %63, 0
br i1 %64, label %68, label %65
65: ; preds = %60
%66 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([53 x i8], [53 x i8]* @str.20, i64 0, i64 0))
%67 = call i32 @fflush(i32* null)
br label %68
68: ; preds = %65, %60
%69 = phi i32 [ -1, %65 ], [ %61, %60 ]
%70 = call i32 (...) @testbreak()
%71 = load i32, i32* @S_IFDIR
%72 = load i32, i32* @S_IRWXU
%73 = or i32 %72, %71
%74 = call i32 @mknod_test(i8* %2, i32 %73, i32 0)
%75 = call i32 @expect_zng(i32 -1, i32 %74)
%76 = icmp eq i32 %75, 0
br i1 %76, label %84, label %77
77: ; preds = %68
%78 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([53 x i8], [53 x i8]* @str.20, i64 0, i64 0))
%79 = call i32 @fflush(i32* null)
%80 = icmp eq i32 %75, -1
br i1 %80, label %81, label %84
81: ; preds = %77
%82 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([61 x i8], [61 x i8]* @str.19, i64 0, i64 0))
%83 = call i32 @fflush(i32* null)
br label %170
84: ; preds = %68, %77
%85 = phi i32 [ -1, %77 ], [ %69, %68 ]
%86 = load i32, i32* @F_OK
%87 = call i32 @access_test(i8* %2, i32 %86)
%88 = call i32 @expect_zng(i32 -1, i32 %87)
%89 = icmp eq i32 %88, 0
br i1 %89, label %93, label %90
90: ; preds = %84
%91 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([53 x i8], [53 x i8]* @str.20, i64 0, i64 0))
%92 = call i32 @fflush(i32* null)
br label %93
93: ; preds = %90, %84
%94 = phi i32 [ -1, %90 ], [ %85, %84 ]
%95 = call i32 @unlink_test(i8* %2)
%96 = call i32 @expect_zng(i32 -1, i32 %95)
%97 = icmp eq i32 %96, 0
br i1 %97, label %101, label %98
98: ; preds = %93
%99 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([53 x i8], [53 x i8]* @str.20, i64 0, i64 0))
%100 = call i32 @fflush(i32* null)
br label %101
101: ; preds = %98, %93
%102 = phi i32 [ -1, %98 ], [ %94, %93 ]
%103 = call i32 (...) @testbreak()
%104 = load i32, i32* @S_IFBLK
%105 = load i32, i32* @S_IRWXU
%106 = or i32 %105, %104
%107 = call i32 @mknod_test(i8* %2, i32 %106, i32 0)
%108 = call i32 @expect_zng(i32 -1, i32 %107)
%109 = icmp eq i32 %108, 0
br i1 %109, label %117, label %110
110: ; preds = %101
%111 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([53 x i8], [53 x i8]* @str.20, i64 0, i64 0))
%112 = call i32 @fflush(i32* null)
%113 = icmp eq i32 %108, -1
br i1 %113, label %114, label %117
114: ; preds = %110
%115 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([61 x i8], [61 x i8]* @str.19, i64 0, i64 0))
%116 = call i32 @fflush(i32* null)
br label %170
117: ; preds = %101, %110
%118 = phi i32 [ -1, %110 ], [ %102, %101 ]
%119 = load i32, i32* @F_OK
%120 = call i32 @access_test(i8* %2, i32 %119)
%121 = call i32 @expect_zng(i32 -1, i32 %120)
%122 = icmp eq i32 %121, 0
br i1 %122, label %126, label %123
123: ; preds = %117
%124 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([53 x i8], [53 x i8]* @str.20, i64 0, i64 0))
%125 = call i32 @fflush(i32* null)
br label %126
126: ; preds = %123, %117
%127 = phi i32 [ -1, %123 ], [ %118, %117 ]
%128 = call i32 @unlink_test(i8* %2)
%129 = call i32 @expect_zng(i32 -1, i32 %128)
%130 = icmp eq i32 %129, 0
br i1 %130, label %134, label %131
131: ; preds = %126
%132 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([53 x i8], [53 x i8]* @str.20, i64 0, i64 0))
%133 = call i32 @fflush(i32* null)
br label %134
134: ; preds = %131, %126
%135 = phi i32 [ -1, %131 ], [ %127, %126 ]
%136 = call i32 (...) @testbreak()
%137 = load i32, i32* @S_IFREG
%138 = load i32, i32* @S_IRWXU
%139 = or i32 %138, %137
%140 = call i32 @mknod_test(i8* %2, i32 %139, i32 0)
%141 = call i32 @expect_zng(i32 -1, i32 %140)
%142 = icmp eq i32 %141, 0
br i1 %142, label %150, label %143
143: ; preds = %134
%144 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([53 x i8], [53 x i8]* @str.20, i64 0, i64 0))
%145 = call i32 @fflush(i32* null)
%146 = icmp eq i32 %141, -1
br i1 %146, label %147, label %150
147: ; preds = %143
%148 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([61 x i8], [61 x i8]* @str.19, i64 0, i64 0))
%149 = call i32 @fflush(i32* null)
br label %170
150: ; preds = %134, %143
%151 = phi i32 [ -1, %143 ], [ %135, %134 ]
%152 = load i32, i32* @F_OK
%153 = call i32 @access_test(i8* %2, i32 %152)
%154 = call i32 @expect_zng(i32 -1, i32 %153)
%155 = icmp eq i32 %154, 0
br i1 %155, label %159, label %156
156: ; preds = %150
%157 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([53 x i8], [53 x i8]* @str.20, i64 0, i64 0))
%158 = call i32 @fflush(i32* null)
br label %159
159: ; preds = %156, %150
%160 = phi i32 [ -1, %156 ], [ %151, %150 ]
%161 = call i32 @unlink_test(i8* %2)
%162 = call i32 @expect_zng(i32 -1, i32 %161)
%163 = icmp eq i32 %162, 0
br i1 %163, label %167, label %164
164: ; preds = %159
%165 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([53 x i8], [53 x i8]* @str.20, i64 0, i64 0))
%166 = call i32 @fflush(i32* null)
br label %167
167: ; preds = %164, %159
%168 = phi i32 [ -1, %164 ], [ %160, %159 ]
%169 = call i32 (...) @testbreak()
br label %170
170: ; preds = %167, %147, %114, %81, %48, %15
%171 = phi i32 [ -1, %15 ], [ -1, %48 ], [ -1, %81 ], [ -1, %114 ], [ -1, %147 ], [ %168, %167 ]
ret i32 %171
}