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

/* Variables and functions */
scalar_t__ path_to_xyz(char const *, char const *, char *, int *, int *, int *);
int /*<<< orphan*/ printf(char *, char *, int, int, int);
int /*<<< orphan*/ process_loop(int, char *, int, int, int);
void process(const char *tilepath, int fd, const char *name) {
  char xmlconfig[41];
  int x, y, z;
  if (path_to_xyz(tilepath, name, xmlconfig, &x, &y, &z))
    return;
  printf("Requesting xml(%s) x(%d) y(%d) z(%d)\n", xmlconfig, x, y, z);
  process_loop(fd, xmlconfig, x, y, z);
}


x86 assembly (clang, -O0):
<process>:
push   %rbp
mov    %rsp,%rbp
sub    $0x60,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x18(%rbp),%rsi
lea    -0x50(%rbp),%rdx
lea    -0x54(%rbp),%rcx
lea    -0x58(%rbp),%r8
lea    -0x5c(%rbp),%r9
call   1050 <path_to_xyz@plt>
cmp    $0x0,%rax
je     116f <process+0x3f>
jmp    119f <process+0x6f>
lea    -0x50(%rbp),%rsi
mov    -0x54(%rbp),%edx
mov    -0x58(%rbp),%ecx
mov    -0x5c(%rbp),%r8d
lea    0xe7c(%rip),%rdi
call   1040 <printf@plt>
mov    -0xc(%rbp),%edi
lea    -0x50(%rbp),%rsi
mov    -0x54(%rbp),%edx
mov    -0x58(%rbp),%ecx
mov    -0x5c(%rbp),%r8d
call   1030 <process_loop@plt>
add    $0x60,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<process>:
push   %r14
push   %rbx
sub    $0x48,%rsp
mov    %esi,%ebx
lea    0x10(%rsp),%rax
lea    0xc(%rsp),%rcx
lea    0x8(%rsp),%r8
lea    0x4(%rsp),%r9
mov    %rdx,%rsi
mov    %rax,%rdx
call   1050 <path_to_xyz@plt>
test   %rax,%rax
jne    1195 <process+0x65>
mov    0xc(%rsp),%edx
mov    0x8(%rsp),%ecx
mov    0x4(%rsp),%r8d
lea    0xe8f(%rip),%rdi
lea    0x10(%rsp),%r14
mov    %r14,%rsi
call   1040 <printf@plt>
mov    0xc(%rsp),%edx
mov    0x8(%rsp),%ecx
mov    0x4(%rsp),%r8d
mov    %ebx,%edi
mov    %r14,%rsi
call   1030 <process_loop@plt>
add    $0x48,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@.str = [38 x i8] c"Requesting xml(%s) x(%d) y(%d) z(%d)\0A\00"
define void @process(i8* %0, i32 %1, i8* %2) {
%4 = alloca i8*
%5 = alloca i32
%6 = alloca i8*
%7 = alloca [41 x i8]
%8 = alloca i32
%9 = alloca i32
%10 = alloca i32
store i8* %0, i8** %4
store i32 %1, i32* %5
store i8* %2, i8** %6
%11 = load i8*, i8** %4
%12 = load i8*, i8** %6
%13 = getelementptr inbounds [41 x i8], [41 x i8]* %7, i64 0, i64 0
%14 = call i64 @path_to_xyz(i8* %11, i8* %12, i8* %13, i32* %8, i32* %9, i32* %10)
%15 = icmp ne i64 %14, 0
br i1 %15, label %16, label %17
16: ; preds = %3
br label %29
17: ; preds = %3
%18 = getelementptr inbounds [41 x i8], [41 x i8]* %7, i64 0, i64 0
%19 = load i32, i32* %8
%20 = load i32, i32* %9
%21 = load i32, i32* %10
%22 = call i32 @printf(i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str, i64 0, i64 0), i8* %18, i32 %19, i32 %20, i32 %21)
%23 = load i32, i32* %5
%24 = getelementptr inbounds [41 x i8], [41 x i8]* %7, i64 0, i64 0
%25 = load i32, i32* %8
%26 = load i32, i32* %9
%27 = load i32, i32* %10
%28 = call i32 @process_loop(i32 %23, i8* %24, i32 %25, i32 %26, i32 %27)
br label %29
29: ; preds = %17, %16
ret void
}

LLVM IR (-O2):
@.str = [38 x i8] c"Requesting xml(%s) x(%d) y(%d) z(%d)\0A\00"
define void @process(i8* %0, i32 %1, i8* %2) {
%4 = alloca [41 x i8]
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
%8 = getelementptr inbounds [41 x i8], [41 x i8]* %4, i64 0, i64 0
%9 = bitcast i32* %5 to i8*
%10 = bitcast i32* %6 to i8*
%11 = bitcast i32* %7 to i8*
%12 = call i64 @path_to_xyz(i8* %0, i8* %2, i8* %8, i32* %5, i32* %6, i32* %7)
%13 = icmp eq i64 %12, 0
br i1 %13, label %14, label %23
14: ; preds = %3
%15 = load i32, i32* %5
%16 = load i32, i32* %6
%17 = load i32, i32* %7
%18 = call i32 @printf(i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str, i64 0, i64 0), i8* %8, i32 %15, i32 %16, i32 %17)
%19 = load i32, i32* %5
%20 = load i32, i32* %6
%21 = load i32, i32* %7
%22 = call i32 @process_loop(i32 %1, i8* %8, i32 %19, i32 %20, i32 %21)
br label %23
23: ; preds = %3, %14
ret void
}