void RasterSoftWareResetControlDisable(unsigned int baseAddr,
                                       unsigned int flag) {
  if ((0x00000001u) == flag) {
    (*((volatile unsigned int *)(baseAddr + (0x70)))) &= ~(0x00000001u);
  } else if ((0x00000004u) == flag) {
    (*((volatile unsigned int *)(baseAddr + (0x70)))) &= ~(0x00000004u);
  } else if ((0x00000008u) == flag) {
    (*((volatile unsigned int *)(baseAddr + (0x70)))) &= ~(0x00000008u);
  } else {
    ;
  }
}


x86 assembly (clang, -O0):
<RasterSoftWareResetControlDisable>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    $0x1,%eax
cmp    -0x8(%rbp),%eax
jne    112c <RasterSoftWareResetControlDisable+0x2c>
mov    -0x4(%rbp),%eax
add    $0x70,%eax
mov    %eax,%eax
mov    (%rax),%ecx
and    $0xfffffffe,%ecx
mov    %ecx,(%rax)
jmp    117f <RasterSoftWareResetControlDisable+0x7f>
mov    $0x4,%eax
cmp    -0x8(%rbp),%eax
jne    114e <RasterSoftWareResetControlDisable+0x4e>
mov    -0x4(%rbp),%eax
add    $0x70,%eax
mov    %eax,%eax
mov    (%rax),%ecx
and    $0xfffffffb,%ecx
mov    %ecx,(%rax)
jmp    117a <RasterSoftWareResetControlDisable+0x7a>
mov    $0x8,%eax
cmp    -0x8(%rbp),%eax
jne    1170 <RasterSoftWareResetControlDisable+0x70>
mov    -0x4(%rbp),%eax
add    $0x70,%eax
mov    %eax,%eax
mov    (%rax),%ecx
and    $0xfffffff7,%ecx
mov    %ecx,(%rax)
jmp    1175 <RasterSoftWareResetControlDisable+0x75>
jmp    1175 <RasterSoftWareResetControlDisable+0x75>
jmp    117a <RasterSoftWareResetControlDisable+0x7a>
jmp    117f <RasterSoftWareResetControlDisable+0x7f>
pop    %rbp
ret

x86 assembly (clang, -O2):
<RasterSoftWareResetControlDisable>:
cmp    $0x1,%esi
je     1116 <RasterSoftWareResetControlDisable+0x16>
cmp    $0x8,%esi
je     111d <RasterSoftWareResetControlDisable+0x1d>
cmp    $0x4,%esi
jne    1127 <RasterSoftWareResetControlDisable+0x27>
mov    $0xfffffffb,%eax
jmp    1122 <RasterSoftWareResetControlDisable+0x22>
mov    $0xfffffffe,%eax
jmp    1122 <RasterSoftWareResetControlDisable+0x22>
mov    $0xfffffff7,%eax
add    $0x70,%edi
and    %eax,(%rdi)
ret

LLVM IR (-O0):
define void @RasterSoftWareResetControlDisable(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%5 = load i32, i32* %4
%6 = icmp eq i32 1, %5
br i1 %6, label %7, label %14
7: ; preds = %2
%8 = load i32, i32* %3
%9 = add i32 %8, 112
%10 = zext i32 %9 to i64
%11 = inttoptr i64 %10 to i32*
%12 = load volatile i32, i32* %11
%13 = and i32 %12, -2
store volatile i32 %13, i32* %11
br label %37
14: ; preds = %2
%15 = load i32, i32* %4
%16 = icmp eq i32 4, %15
br i1 %16, label %17, label %24
17: ; preds = %14
%18 = load i32, i32* %3
%19 = add i32 %18, 112
%20 = zext i32 %19 to i64
%21 = inttoptr i64 %20 to i32*
%22 = load volatile i32, i32* %21
%23 = and i32 %22, -5
store volatile i32 %23, i32* %21
br label %36
24: ; preds = %14
%25 = load i32, i32* %4
%26 = icmp eq i32 8, %25
br i1 %26, label %27, label %34
27: ; preds = %24
%28 = load i32, i32* %3
%29 = add i32 %28, 112
%30 = zext i32 %29 to i64
%31 = inttoptr i64 %30 to i32*
%32 = load volatile i32, i32* %31
%33 = and i32 %32, -9
store volatile i32 %33, i32* %31
br label %35
34: ; preds = %24
br label %35
35: ; preds = %34, %27
br label %36
36: ; preds = %35, %17
br label %37
37: ; preds = %36, %7
ret void
}

LLVM IR (-O2):
define void @RasterSoftWareResetControlDisable(i32 %0, i32 %1) {
switch i32 %1, label %12 [
i32 1, label %5
i32 4, label %3
i32 8, label %4
]
3: ; preds = %2
br label %5
4: ; preds = %2
br label %5
5: ; preds = %2, %4, %3
%6 = phi i32 [ -5, %3 ], [ -9, %4 ], [ -2, %2 ]
%7 = add i32 %0, 112
%8 = zext i32 %7 to i64
%9 = inttoptr i64 %8 to i32*
%10 = load volatile i32, i32* %9
%11 = and i32 %10, %6
store volatile i32 %11, i32* %9
br label %12
12: ; preds = %5, %2
ret void
}