#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 uint32_t;

/* Variables and functions */
int /*<<< orphan*/ SW1Task();
int /*<<< orphan*/ SW2Task();
int /*<<< orphan*/ debounce();
void GPIOPortF_Handler(void) {
  if ((*((volatile uint32_t *)0x40025414)) & 0x10) {
    debounce();
    (*((volatile uint32_t *)0x4002541C)) = 0x10;
    SW1Task();
  }
  if ((*((volatile uint32_t *)0x40025414)) & 0x01) {
    debounce();
    (*((volatile uint32_t *)0x4002541C)) = 0x01;
    SW2Task();
  }
}


x86 assembly (clang, -O0):
<GPIOPortF_Handler>:
push   %rbp
mov    %rsp,%rbp
mov    $0x40025414,%eax
mov    (%rax),%eax
and    $0x10,%eax
cmp    $0x0,%eax
je     1160 <GPIOPortF_Handler+0x30>
mov    $0x0,%al
call   1050 <debounce@plt>
mov    $0x4002541c,%eax
movl   $0x10,(%rax)
mov    $0x0,%al
call   1030 <SW1Task@plt>
mov    $0x40025414,%eax
mov    (%rax),%eax
and    $0x1,%eax
cmp    $0x0,%eax
je     118c <GPIOPortF_Handler+0x5c>
mov    $0x0,%al
call   1050 <debounce@plt>
mov    $0x4002541c,%eax
movl   $0x1,(%rax)
mov    $0x0,%al
call   1040 <SW2Task@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<GPIOPortF_Handler>:
push   %rax
testl  $0x10,0x40025414
je     1157 <GPIOPortF_Handler+0x27>
xor    %eax,%eax
call   1050 <debounce@plt>
movl   $0x10,0x4002541c
xor    %eax,%eax
call   1030 <SW1Task@plt>
testl  $0x1,0x40025414
jne    1166 <GPIOPortF_Handler+0x36>
pop    %rax
ret
xor    %eax,%eax
call   1050 <debounce@plt>
movl   $0x1,0x4002541c
xor    %eax,%eax
pop    %rcx
jmp    1040 <SW2Task@plt>

LLVM IR (-O0):
define void @GPIOPortF_Handler() {
%1 = load volatile i32, i32* inttoptr (i64 1073894420 to i32*)
%2 = and i32 %1, 16
%3 = icmp ne i32 %2, 0
br i1 %3, label %4, label %7
4: ; preds = %0
%5 = call i32 (...) @debounce()
store volatile i32 16, i32* inttoptr (i64 1073894428 to i32*)
%6 = call i32 (...) @SW1Task()
br label %7
7: ; preds = %4, %0
%8 = load volatile i32, i32* inttoptr (i64 1073894420 to i32*)
%9 = and i32 %8, 1
%10 = icmp ne i32 %9, 0
br i1 %10, label %11, label %14
11: ; preds = %7
%12 = call i32 (...) @debounce()
store volatile i32 1, i32* inttoptr (i64 1073894428 to i32*)
%13 = call i32 (...) @SW2Task()
br label %14
14: ; preds = %11, %7
ret void
}

LLVM IR (-O2):
define void @GPIOPortF_Handler() {
%1 = load volatile i32, i32* inttoptr (i64 1073894420 to i32*)
%2 = and i32 %1, 16
%3 = icmp eq i32 %2, 0
br i1 %3, label %7, label %4
4: ; preds = %0
%5 = tail call i32 (...) @debounce()
store volatile i32 16, i32* inttoptr (i64 1073894428 to i32*)
%6 = tail call i32 (...) @SW1Task()
br label %7
7: ; preds = %4, %0
%8 = load volatile i32, i32* inttoptr (i64 1073894420 to i32*)
%9 = and i32 %8, 1
%10 = icmp eq i32 %9, 0
br i1 %10, label %14, label %11
11: ; preds = %7
%12 = tail call i32 (...) @debounce()
store volatile i32 1, i32* inttoptr (i64 1073894428 to i32*)
%13 = tail call i32 (...) @SW2Task()
br label %14
14: ; preds = %11, %7
ret void
}