#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 */
struct client {
  int dummy;
};
typedef int /*<<< orphan*/ XMapRequestEvent;

/* Variables and functions */
int /*<<< orphan*/ CurrentTime;
int /*<<< orphan*/ cfocus(struct client *, int /*<<< orphan*/);
scalar_t__ cisvisible(struct client *);
int /*<<< orphan*/ cmap(struct client *);
int /*<<< orphan*/ cpopapp(struct client *);
int /*<<< orphan*/ ewmh_maprequest(struct client *);
void maprequest(struct client *c, XMapRequestEvent *e) {
  ewmh_maprequest(c);
  cpopapp(c);
  if (cisvisible(c)) {
    cmap(c);
    cfocus(c, CurrentTime);
  }
}


x86 assembly (clang, -O0):
<maprequest>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
call   1070 <ewmh_maprequest@plt>
mov    -0x8(%rbp),%rdi
call   1040 <cpopapp@plt>
mov    -0x8(%rbp),%rdi
call   1050 <cisvisible@plt>
cmp    $0x0,%rax
je     11a0 <maprequest+0x50>
mov    -0x8(%rbp),%rdi
call   1060 <cmap@plt>
mov    -0x8(%rbp),%rdi
mov    0x2e4f(%rip),%rax
mov    (%rax),%esi
call   1030 <cfocus@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<maprequest>:
push   %rbx
mov    %rdi,%rbx
call   1070 <ewmh_maprequest@plt>
mov    %rbx,%rdi
call   1040 <cpopapp@plt>
mov    %rbx,%rdi
call   1050 <cisvisible@plt>
test   %rax,%rax
je     1188 <maprequest+0x38>
mov    %rbx,%rdi
call   1060 <cmap@plt>
mov    0x2e6b(%rip),%rax
mov    (%rax),%esi
mov    %rbx,%rdi
pop    %rbx
jmp    1030 <cfocus@plt>
pop    %rbx
ret

LLVM IR (-O0):
%struct.client = type { i32 }
@CurrentTime = global i32 0
define void @maprequest(%struct.client* %0, i32* %1) {
%3 = alloca %struct.client*
%4 = alloca i32*
store %struct.client* %0, %struct.client** %3
store i32* %1, i32** %4
%5 = load %struct.client*, %struct.client** %3
%6 = call i32 @ewmh_maprequest(%struct.client* %5)
%7 = load %struct.client*, %struct.client** %3
%8 = call i32 @cpopapp(%struct.client* %7)
%9 = load %struct.client*, %struct.client** %3
%10 = call i64 @cisvisible(%struct.client* %9)
%11 = icmp ne i64 %10, 0
br i1 %11, label %12, label %18
12: ; preds = %2
%13 = load %struct.client*, %struct.client** %3
%14 = call i32 @cmap(%struct.client* %13)
%15 = load %struct.client*, %struct.client** %3
%16 = load i32, i32* @CurrentTime
%17 = call i32 @cfocus(%struct.client* %15, i32 %16)
br label %18
18: ; preds = %12, %2
ret void
}

LLVM IR (-O2):
%struct.client = type { i32 }
@CurrentTime = global i32 0
define void @maprequest(%struct.client* %0, i32* nocapture readnone %1) {
%3 = tail call i32 @ewmh_maprequest(%struct.client* %0)
%4 = tail call i32 @cpopapp(%struct.client* %0)
%5 = tail call i64 @cisvisible(%struct.client* %0)
%6 = icmp eq i64 %5, 0
br i1 %6, label %11, label %7
7: ; preds = %2
%8 = tail call i32 @cmap(%struct.client* %0)
%9 = load i32, i32* @CurrentTime
%10 = tail call i32 @cfocus(%struct.client* %0, i32 %9)
br label %11
11: ; preds = %7, %2
ret void
}