#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*/ Window;
typedef int /*<<< orphan*/ Display;
typedef scalar_t__ Atom;

/* Variables and functions */
int /*<<< orphan*/ False;
scalar_t__ None;
scalar_t__ ParseAtom(int /*<<< orphan*/ *, char *, int /*<<< orphan*/);
int /*<<< orphan*/ True;
int /*<<< orphan*/ XA_INTEGER;
int /*<<< orphan*/ XDeleteProperty(int /*<<< orphan*/ *, int /*<<< orphan*/,
                                   scalar_t__);
int /*<<< orphan*/ XFree(char *);
int /*<<< orphan*/ XGetWindowProperty(int /*<<< orphan*/ *, int /*<<< orphan*/,
                                      scalar_t__, int /*<<< orphan*/, int,
                                      int /*<<< orphan*/, int /*<<< orphan*/,
                                      scalar_t__ *, int *, unsigned long *,
                                      unsigned long *, unsigned char **);
scalar_t__ XInternAtom(int /*<<< orphan*/ *, char *, int /*<<< orphan*/);
int /*<<< orphan*/ printf(char *, char *);
void RemoveSCCData(Display *dpy, Window root, int colorFlag) {
  unsigned char *ret_prop;
  unsigned long ret_len, ret_after;
  int ret_format;
  Atom MatricesAtom, CorrectAtom, ret_atom;
  if (colorFlag != 0) {
    MatricesAtom = ParseAtom(dpy, "XDCCC_LINEAR_RGB_MATRICES", True);
    if (MatricesAtom != None) {
      XGetWindowProperty(dpy, root, MatricesAtom, 0, 8192, False, XA_INTEGER,
                         &ret_atom, &ret_format, &ret_len, &ret_after,
                         &ret_prop);
    }
    if (MatricesAtom == None || !ret_format) {
      printf("Could not find property %s\n", "XDCCC_LINEAR_RGB_MATRICES");
    } else {
      printf("Deleting property %s\n", "XDCCC_LINEAR_RGB_MATRICES");
      XDeleteProperty(dpy, root, MatricesAtom);
      XFree((char *)ret_prop);
    }
    CorrectAtom = XInternAtom(dpy, "XDCCC_LINEAR_RGB_CORRECTION", True);
    if (CorrectAtom != None) {
      XGetWindowProperty(dpy, root, CorrectAtom, 0, 8192, False, XA_INTEGER,
                         &ret_atom, &ret_format, &ret_len, &ret_after,
                         &ret_prop);
    }
    if (CorrectAtom == None || !ret_format) {
      printf("Could not find property %s\n", "XDCCC_LINEAR_RGB_CORRECTION");
    } else {
      printf("Deleting property %s\n", "XDCCC_LINEAR_RGB_CORRECTION");
      XDeleteProperty(dpy, root, CorrectAtom);
      XFree((char *)ret_prop);
    }
  }
}


x86 assembly (clang, -O0):
<RemoveSCCData>:
push   %rbp
mov    %rsp,%rbp
push   %r15
push   %r14
push   %rbx
sub    $0x78,%rsp
mov    %rdi,-0x20(%rbp)
mov    %esi,-0x24(%rbp)
mov    %edx,-0x28(%rbp)
cmpl   $0x0,-0x28(%rbp)
je     1366 <RemoveSCCData+0x206>
mov    -0x20(%rbp),%rdi
mov    0x2e4c(%rip),%rax
mov    (%rax),%edx
lea    0xe6b(%rip),%rsi
call   1060 <ParseAtom@plt>
mov    %rax,-0x50(%rbp)
mov    -0x50(%rbp),%rax
mov    0x2e37(%rip),%rcx
cmp    (%rcx),%rax
je     120f <RemoveSCCData+0xaf>
mov    -0x20(%rbp),%rdi
mov    -0x24(%rbp),%esi
mov    -0x50(%rbp),%rdx
mov    0x2e24(%rip),%rax
mov    (%rax),%r9d
mov    0x2dfa(%rip),%rax
mov    (%rax),%r15d
xor    %ecx,%ecx
mov    $0x2000,%r8d
lea    -0x60(%rbp),%r14
lea    -0x44(%rbp),%rbx
lea    -0x38(%rbp),%r11
lea    -0x40(%rbp),%r10
lea    -0x30(%rbp),%rax
mov    %r15d,(%rsp)
mov    %r14,0x8(%rsp)
mov    %rbx,0x10(%rsp)
mov    %r11,0x18(%rsp)
mov    %r10,0x20(%rsp)
mov    %rax,0x28(%rsp)
call   1080 <XGetWindowProperty@plt>
mov    -0x50(%rbp),%rax
mov    0x2dc6(%rip),%rcx
cmp    (%rcx),%rax
je     122d <RemoveSCCData+0xcd>
cmpl   $0x0,-0x44(%rbp)
jne    1245 <RemoveSCCData+0xe5>
lea    0xde6(%rip),%rdi
lea    0xdc5(%rip),%rsi
call   1030 <printf@plt>
jmp    1271 <RemoveSCCData+0x111>
lea    0xdea(%rip),%rdi
lea    0xdad(%rip),%rsi
call   1030 <printf@plt>
mov    -0x20(%rbp),%rdi
mov    -0x24(%rbp),%esi
mov    -0x50(%rbp),%rdx
call   1050 <XDeleteProperty@plt>
mov    -0x30(%rbp),%rdi
call   1040 <XFree@plt>
mov    -0x20(%rbp),%rdi
mov    0x2d5c(%rip),%rax
mov    (%rax),%edx
lea    0xdc7(%rip),%rsi
call   1070 <XInternAtom@plt>
mov    %rax,-0x58(%rbp)
mov    -0x58(%rbp),%rax
mov    0x2d47(%rip),%rcx
cmp    (%rcx),%rax
je     12ff <RemoveSCCData+0x19f>
mov    -0x20(%rbp),%rdi
mov    -0x24(%rbp),%esi
mov    -0x58(%rbp),%rdx
mov    0x2d34(%rip),%rax
mov    (%rax),%r9d
mov    0x2d0a(%rip),%rax
mov    (%rax),%r15d
xor    %ecx,%ecx
mov    $0x2000,%r8d
lea    -0x60(%rbp),%r14
lea    -0x44(%rbp),%rbx
lea    -0x38(%rbp),%r11
lea    -0x40(%rbp),%r10
lea    -0x30(%rbp),%rax
mov    %r15d,(%rsp)
mov    %r14,0x8(%rsp)
mov    %rbx,0x10(%rsp)
mov    %r11,0x18(%rsp)
mov    %r10,0x20(%rsp)
mov    %rax,0x28(%rsp)
call   1080 <XGetWindowProperty@plt>
mov    -0x58(%rbp),%rax
mov    0x2cd6(%rip),%rcx
cmp    (%rcx),%rax
je     131d <RemoveSCCData+0x1bd>
cmpl   $0x0,-0x44(%rbp)
jne    1335 <RemoveSCCData+0x1d5>
lea    0xcf6(%rip),%rdi
lea    0xd21(%rip),%rsi
call   1030 <printf@plt>
jmp    1361 <RemoveSCCData+0x201>
lea    0xcfa(%rip),%rdi
lea    0xd09(%rip),%rsi
call   1030 <printf@plt>
mov    -0x20(%rbp),%rdi
mov    -0x24(%rbp),%esi
mov    -0x58(%rbp),%rdx
call   1050 <XDeleteProperty@plt>
mov    -0x30(%rbp),%rdi
call   1040 <XFree@plt>
jmp    1366 <RemoveSCCData+0x206>
add    $0x78,%rsp
pop    %rbx
pop    %r14
pop    %r15
pop    %rbp
ret

x86 assembly (clang, -O2):
<RemoveSCCData>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x28,%rsp
test   %edx,%edx
je     12fe <RemoveSCCData+0x19e>
mov    %esi,%r14d
mov    %rdi,%rbx
mov    0x2e55(%rip),%r12
mov    (%r12),%edx
lea    0xe72(%rip),%rsi
call   1060 <ParseAtom@plt>
mov    0x2e46(%rip),%r15
cmp    (%r15),%rax
je     122f <RemoveSCCData+0xcf>
mov    %rax,%rbp
mov    0x2e3b(%rip),%rax
mov    (%rax),%r9d
mov    0x2e11(%rip),%rax
mov    (%rax),%r13d
lea    0x8(%rsp),%r10
lea    0x18(%rsp),%r11
lea    0x20(%rsp),%rax
mov    %rbx,%rdi
mov    %r14d,%esi
mov    %rbp,%rdx
xor    %ecx,%ecx
mov    $0x2000,%r8d
push   %r10
push   %r11
push   %rax
lea    0x1c(%rsp),%rax
push   %rax
lea    0x30(%rsp),%rax
push   %rax
push   %r13
call   1080 <XGetWindowProperty@plt>
add    $0x30,%rsp
cmp    (%r15),%rbp
je     122f <RemoveSCCData+0xcf>
cmpl   $0x0,0x4(%rsp)
je     122f <RemoveSCCData+0xcf>
lea    0xe2d(%rip),%rdi
lea    0xdf0(%rip),%rsi
call   1030 <printf@plt>
mov    %rbx,%rdi
mov    %r14d,%esi
mov    %rbp,%rdx
call   1050 <XDeleteProperty@plt>
mov    0x8(%rsp),%rdi
call   1040 <XFree@plt>
jmp    1242 <RemoveSCCData+0xe2>
lea    0xde4(%rip),%rdi
lea    0xdc3(%rip),%rsi
call   1030 <printf@plt>
mov    (%r12),%edx
lea    0xdff(%rip),%rsi
mov    %rbx,%rdi
call   1070 <XInternAtom@plt>
cmp    (%r15),%rax
je     12eb <RemoveSCCData+0x18b>
mov    %rax,%rbp
mov    0x2d80(%rip),%rax
mov    (%rax),%r9d
mov    0x2d56(%rip),%rax
mov    (%rax),%r13d
lea    0x8(%rsp),%r10
lea    0x18(%rsp),%r11
lea    0x20(%rsp),%r12
lea    0x4(%rsp),%rax
mov    %rbx,%rdi
mov    %r14d,%esi
mov    %rbp,%rdx
xor    %ecx,%ecx
mov    $0x2000,%r8d
push   %r10
push   %r11
push   %r12
push   %rax
lea    0x30(%rsp),%rax
push   %rax
push   %r13
call   1080 <XGetWindowProperty@plt>
add    $0x30,%rsp
cmp    (%r15),%rbp
je     12eb <RemoveSCCData+0x18b>
cmpl   $0x0,0x4(%rsp)
je     12eb <RemoveSCCData+0x18b>
lea    0xd71(%rip),%rdi
lea    0xd80(%rip),%rsi
call   1030 <printf@plt>
mov    %rbx,%rdi
mov    %r14d,%esi
mov    %rbp,%rdx
call   1050 <XDeleteProperty@plt>
mov    0x8(%rsp),%rdi
call   1040 <XFree@plt>
jmp    12fe <RemoveSCCData+0x19e>
lea    0xd28(%rip),%rdi
lea    0xd53(%rip),%rsi
call   1030 <printf@plt>
add    $0x28,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@.str = [26 x i8] c"XDCCC_LINEAR_RGB_MATRICES\00"
@True = global i32 0
@None = global i64 0
@False = global i32 0
@XA_INTEGER = global i32 0
@.str.1 = [28 x i8] c"Could not find property %s\0A\00"
@.str.2 = [22 x i8] c"Deleting property %s\0A\00"
@.str.3 = [28 x i8] c"XDCCC_LINEAR_RGB_CORRECTION\00"
define void @RemoveSCCData(i32* %0, i32 %1, i32 %2) {
%4 = alloca i32*
%5 = alloca i32
%6 = alloca i32
%7 = alloca i8*
%8 = alloca i64
%9 = alloca i64
%10 = alloca i32
%11 = alloca i64
%12 = alloca i64
%13 = alloca i64
store i32* %0, i32** %4
store i32 %1, i32* %5
store i32 %2, i32* %6
%14 = load i32, i32* %6
%15 = icmp ne i32 %14, 0
br i1 %15, label %16, label %79
16: ; preds = %3
%17 = load i32*, i32** %4
%18 = load i32, i32* @True
%19 = call i64 @ParseAtom(i32* %17, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str, i64 0, i64 0), i32 %18)
store i64 %19, i64* %11
%20 = load i64, i64* %11
%21 = load i64, i64* @None
%22 = icmp ne i64 %20, %21
br i1 %22, label %23, label %30
23: ; preds = %16
%24 = load i32*, i32** %4
%25 = load i32, i32* %5
%26 = load i64, i64* %11
%27 = load i32, i32* @False
%28 = load i32, i32* @XA_INTEGER
%29 = call i32 @XGetWindowProperty(i32* %24, i32 %25, i64 %26, i32 0, i32 8192, i32 %27, i32 %28, i64* %13, i32* %10, i64* %8, i64* %9, i8** %7)
br label %30
30: ; preds = %23, %16
%31 = load i64, i64* %11
%32 = load i64, i64* @None
%33 = icmp eq i64 %31, %32
br i1 %33, label %37, label %34
34: ; preds = %30
%35 = load i32, i32* %10
%36 = icmp ne i32 %35, 0
br i1 %36, label %39, label %37
37: ; preds = %34, %30
%38 = call i32 @printf(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str, i64 0, i64 0))
br label %47
39: ; preds = %34
%40 = call i32 @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str, i64 0, i64 0))
%41 = load i32*, i32** %4
%42 = load i32, i32* %5
%43 = load i64, i64* %11
%44 = call i32 @XDeleteProperty(i32* %41, i32 %42, i64 %43)
%45 = load i8*, i8** %7
%46 = call i32 @XFree(i8* %45)
br label %47
47: ; preds = %39, %37
%48 = load i32*, i32** %4
%49 = load i32, i32* @True
%50 = call i64 @XInternAtom(i32* %48, i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.3, i64 0, i64 0), i32 %49)
store i64 %50, i64* %12
%51 = load i64, i64* %12
%52 = load i64, i64* @None
%53 = icmp ne i64 %51, %52
br i1 %53, label %54, label %61
54: ; preds = %47
%55 = load i32*, i32** %4
%56 = load i32, i32* %5
%57 = load i64, i64* %12
%58 = load i32, i32* @False
%59 = load i32, i32* @XA_INTEGER
%60 = call i32 @XGetWindowProperty(i32* %55, i32 %56, i64 %57, i32 0, i32 8192, i32 %58, i32 %59, i64* %13, i32* %10, i64* %8, i64* %9, i8** %7)
br label %61
61: ; preds = %54, %47
%62 = load i64, i64* %12
%63 = load i64, i64* @None
%64 = icmp eq i64 %62, %63
br i1 %64, label %68, label %65
65: ; preds = %61
%66 = load i32, i32* %10
%67 = icmp ne i32 %66, 0
br i1 %67, label %70, label %68
68: ; preds = %65, %61
%69 = call i32 @printf(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.3, i64 0, i64 0))
br label %78
70: ; preds = %65
%71 = call i32 @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.3, i64 0, i64 0))
%72 = load i32*, i32** %4
%73 = load i32, i32* %5
%74 = load i64, i64* %12
%75 = call i32 @XDeleteProperty(i32* %72, i32 %73, i64 %74)
%76 = load i8*, i8** %7
%77 = call i32 @XFree(i8* %76)
br label %78
78: ; preds = %70, %68
br label %79
79: ; preds = %78, %3
ret void
}

LLVM IR (-O2):
@.str = [26 x i8] c"XDCCC_LINEAR_RGB_MATRICES\00"
@True = global i32 0
@None = global i64 0
@False = global i32 0
@XA_INTEGER = global i32 0
@.str.1 = [28 x i8] c"Could not find property %s\0A\00"
@.str.2 = [22 x i8] c"Deleting property %s\0A\00"
@.str.3 = [28 x i8] c"XDCCC_LINEAR_RGB_CORRECTION\00"
define void @RemoveSCCData(i32* %0, i32 %1, i32 %2) {
%4 = alloca i8*
%5 = alloca i64
%6 = alloca i64
%7 = alloca i32
%8 = alloca i64
%9 = bitcast i8** %4 to i8*
%10 = bitcast i64* %5 to i8*
%11 = bitcast i64* %6 to i8*
%12 = bitcast i32* %7 to i8*
%13 = bitcast i64* %8 to i8*
%14 = icmp eq i32 %2, 0
br i1 %14, label %57, label %15
15: ; preds = %3
%16 = load i32, i32* @True
%17 = tail call i64 @ParseAtom(i32* %0, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str, i64 0, i64 0), i32 %16)
%18 = load i64, i64* @None
%19 = icmp eq i64 %17, %18
br i1 %19, label %29, label %20
20: ; preds = %15
%21 = load i32, i32* @False
%22 = load i32, i32* @XA_INTEGER
%23 = call i32 @XGetWindowProperty(i32* %0, i32 %1, i64 %17, i32 0, i32 8192, i32 %21, i32 %22, i64* %8, i32* %7, i64* %5, i64* %6, i8** %4)
%24 = load i64, i64* @None
%25 = load i32, i32* %7
%26 = icmp ne i32 %25, 0
%27 = icmp ne i64 %17, %24
%28 = select i1 %27, i1 %26, i1 false
br i1 %28, label %31, label %29
29: ; preds = %15, %20
%30 = call i32 @printf(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str, i64 0, i64 0))
br label %36
31: ; preds = %20
%32 = call i32 @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str, i64 0, i64 0))
%33 = call i32 @XDeleteProperty(i32* %0, i32 %1, i64 %17)
%34 = load i8*, i8** %4
%35 = call i32 @XFree(i8* %34)
br label %36
36: ; preds = %31, %29
%37 = load i32, i32* @True
%38 = call i64 @XInternAtom(i32* %0, i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.3, i64 0, i64 0), i32 %37)
%39 = load i64, i64* @None
%40 = icmp eq i64 %38, %39
br i1 %40, label %50, label %41
41: ; preds = %36
%42 = load i32, i32* @False
%43 = load i32, i32* @XA_INTEGER
%44 = call i32 @XGetWindowProperty(i32* %0, i32 %1, i64 %38, i32 0, i32 8192, i32 %42, i32 %43, i64* %8, i32* %7, i64* %5, i64* %6, i8** %4)
%45 = load i64, i64* @None
%46 = icmp ne i64 %38, %45
%47 = load i32, i32* %7
%48 = icmp ne i32 %47, 0
%49 = select i1 %46, i1 %48, i1 false
br i1 %49, label %52, label %50
50: ; preds = %36, %41
%51 = call i32 @printf(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.3, i64 0, i64 0))
br label %57
52: ; preds = %41
%53 = call i32 @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.3, i64 0, i64 0))
%54 = call i32 @XDeleteProperty(i32* %0, i32 %1, i64 %38)
%55 = load i8*, i8** %4
%56 = call i32 @XFree(i8* %55)
br label %57
57: ; preds = %50, %52, %3
ret void
}