#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*/ ssize_t;

/* Variables and functions */
int /*<<< orphan*/ EXIT_FAILURE;
int /*<<< orphan*/ EXIT_SUCCESS;
int /*<<< orphan*/ deleteAttr(char *, char *);
scalar_t__ listattr_numattr(char *);
int /*<<< orphan*/ setattr_testattr();
ssize_t deleteattr_numattr() {
  setattr_testattr();
  deleteAttr("testFile", "ctest_testing");
  if (listattr_numattr("testFile") != 0) {
    return EXIT_FAILURE;
  }
  return EXIT_SUCCESS;
}


x86 assembly (clang, -O0):
<deleteattr_numattr>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1040 <setattr_testattr@plt>
lea    0xeba(%rip),%rdi
lea    0xebc(%rip),%rsi
call   1030 <deleteAttr@plt>
lea    0xea7(%rip),%rdi
call   1050 <listattr_numattr@plt>
cmp    $0x0,%rax
je     1179 <deleteattr_numattr+0x49>
mov    0x2e71(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x4(%rbp)
jmp    1185 <deleteattr_numattr+0x55>
mov    0x2e58(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<deleteattr_numattr>:
push   %rbx
xor    %eax,%eax
call   1040 <setattr_testattr@plt>
lea    0xec1(%rip),%rbx
lea    0xec3(%rip),%rsi
mov    %rbx,%rdi
call   1030 <deleteAttr@plt>
mov    %rbx,%rdi
call   1050 <listattr_numattr@plt>
test   %rax,%rax
jne    1164 <deleteattr_numattr+0x34>
mov    0x2e76(%rip),%rax
jmp    116b <deleteattr_numattr+0x3b>
mov    0x2e75(%rip),%rax
mov    (%rax),%eax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [9 x i8] c"testFile\00"
@.str.1 = [14 x i8] c"ctest_testing\00"
@EXIT_FAILURE = global i32 0
@EXIT_SUCCESS = global i32 0
define i32 @deleteattr_numattr() {
%1 = alloca i32
%2 = call i32 (...) @setattr_testattr()
%3 = call i32 @deleteAttr(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.1, i64 0, i64 0))
%4 = call i64 @listattr_numattr(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0))
%5 = icmp ne i64 %4, 0
br i1 %5, label %6, label %8
6: ; preds = %0
%7 = load i32, i32* @EXIT_FAILURE
store i32 %7, i32* %1
br label %10
8: ; preds = %0
%9 = load i32, i32* @EXIT_SUCCESS
store i32 %9, i32* %1
br label %10
10: ; preds = %8, %6
%11 = load i32, i32* %1
ret i32 %11
}

LLVM IR (-O2):
@.str = [9 x i8] c"testFile\00"
@.str.1 = [14 x i8] c"ctest_testing\00"
@EXIT_FAILURE = global i32 0
@EXIT_SUCCESS = global i32 0
define i32 @deleteattr_numattr() {
%1 = tail call i32 (...) @setattr_testattr()
%2 = tail call i32 @deleteAttr(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.1, i64 0, i64 0))
%3 = tail call i64 @listattr_numattr(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0))
%4 = icmp eq i64 %3, 0
%5 = load i32, i32* @EXIT_SUCCESS
%6 = load i32, i32* @EXIT_FAILURE
%7 = select i1 %4, i32 %5, i32 %6
ret i32 %7
}