#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 supertype {
  int dummy;
};

/* Variables and functions */
int ddf_level_to_layout(int);
void default_geometry_ddf(struct supertype *st, int *level, int *layout,
                          int *chunk) {
  if (level && *level == (0xfffe))
    *level = (-100);
  if (level && layout && *layout == (0xfffe))
    *layout = ddf_level_to_layout(*level);
}


x86 assembly (clang, -O0):
<default_geometry_ddf>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
cmpq   $0x0,-0x10(%rbp)
je     114d <default_geometry_ddf+0x3d>
mov    -0x10(%rbp),%rax
cmpl   $0xfffe,(%rax)
jne    114d <default_geometry_ddf+0x3d>
mov    -0x10(%rbp),%rax
movl   $0xffffff9c,(%rax)
cmpq   $0x0,-0x10(%rbp)
je     1186 <default_geometry_ddf+0x76>
cmpq   $0x0,-0x18(%rbp)
je     1186 <default_geometry_ddf+0x76>
mov    -0x18(%rbp),%rax
cmpl   $0xfffe,(%rax)
jne    1186 <default_geometry_ddf+0x76>
mov    -0x10(%rbp),%rax
mov    (%rax),%edi
call   1030 <ddf_level_to_layout@plt>
mov    %eax,%ecx
mov    -0x18(%rbp),%rax
mov    %ecx,(%rax)
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<default_geometry_ddf>:
push   %rbx
test   %rsi,%rsi
je     1142 <default_geometry_ddf+0x32>
mov    %rdx,%rbx
mov    (%rsi),%edi
cmp    $0xfffe,%edi
jne    112e <default_geometry_ddf+0x1e>
movl   $0xffffff9c,(%rsi)
mov    $0xffffff9c,%edi
test   %rbx,%rbx
je     1142 <default_geometry_ddf+0x32>
cmpl   $0xfffe,(%rbx)
jne    1142 <default_geometry_ddf+0x32>
call   1030 <ddf_level_to_layout@plt>
mov    %eax,(%rbx)
pop    %rbx
ret

LLVM IR (-O0):
%struct.supertype = type { i32 }
define void @default_geometry_ddf(%struct.supertype* %0, i32* %1, i32* %2, i32* %3) {
%5 = alloca %struct.supertype*
%6 = alloca i32*
%7 = alloca i32*
%8 = alloca i32*
store %struct.supertype* %0, %struct.supertype** %5
store i32* %1, i32** %6
store i32* %2, i32** %7
store i32* %3, i32** %8
%9 = load i32*, i32** %6
%10 = icmp ne i32* %9, null
br i1 %10, label %11, label %17
11: ; preds = %4
%12 = load i32*, i32** %6
%13 = load i32, i32* %12
%14 = icmp eq i32 %13, 65534
br i1 %14, label %15, label %17
15: ; preds = %11
%16 = load i32*, i32** %6
store i32 -100, i32* %16
br label %17
17: ; preds = %15, %11, %4
%18 = load i32*, i32** %6
%19 = icmp ne i32* %18, null
br i1 %19, label %20, label %32
20: ; preds = %17
%21 = load i32*, i32** %7
%22 = icmp ne i32* %21, null
br i1 %22, label %23, label %32
23: ; preds = %20
%24 = load i32*, i32** %7
%25 = load i32, i32* %24
%26 = icmp eq i32 %25, 65534
br i1 %26, label %27, label %32
27: ; preds = %23
%28 = load i32*, i32** %6
%29 = load i32, i32* %28
%30 = call i32 @ddf_level_to_layout(i32 %29)
%31 = load i32*, i32** %7
store i32 %30, i32* %31
br label %32
32: ; preds = %27, %23, %20, %17
ret void
}

LLVM IR (-O2):
%struct.supertype = type { i32 }
define void @default_geometry_ddf(%struct.supertype* nocapture readnone %0, i32* %1, i32* %2, i32* nocapture readnone %3) {
%5 = icmp eq i32* %1, null
br i1 %5, label %18, label %6
6: ; preds = %4
%7 = load i32, i32* %1
%8 = icmp eq i32 %7, 65534
br i1 %8, label %9, label %10
9: ; preds = %6
store i32 -100, i32* %1
br label %10
10: ; preds = %9, %6
%11 = phi i32 [ -100, %9 ], [ %7, %6 ]
%12 = icmp eq i32* %2, null
br i1 %12, label %18, label %13
13: ; preds = %10
%14 = load i32, i32* %2
%15 = icmp eq i32 %14, 65534
br i1 %15, label %16, label %18
16: ; preds = %13
%17 = tail call i32 @ddf_level_to_layout(i32 %11)
store i32 %17, i32* %2
br label %18
18: ; preds = %4, %16, %13, %10
ret void
}