#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 */
int /*<<< orphan*/ endpar();
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, float, float);
int /*<<< orphan*/ getpar(char *, char *, ...);
int /*<<< orphan*/ setpar(int, char **);
int /*<<< orphan*/ stderr;
int /*<<< orphan*/ subr(float *);
main(int ac, char **av) {
  float xlon, lon;
  int ffault = 0;
  setpar(ac, av);
  getpar("ffault", "d", &ffault);
  if (ffault == 2)
    subr(&xlon);
  fprintf(stderr, "xlon= %13.5f lon= %13.5f\n", xlon, lon);
  getpar("lon", "f", &lon);
  endpar();
  fprintf(stderr, "xlon= %13.5f lon= %13.5f\n", xlon, lon);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x0,-0x1c(%rbp)
mov    -0x8(%rbp),%edi
mov    -0x10(%rbp),%rsi
call   1030 <setpar@plt>
lea    0xe80(%rip),%rdi
lea    0xe80(%rip),%rsi
lea    -0x1c(%rbp),%rdx
mov    $0x0,%al
call   1060 <getpar@plt>
cmpl   $0x2,-0x1c(%rbp)
jne    11a5 <main+0x55>
lea    -0x14(%rbp),%rdi
call   1040 <subr@plt>
mov    0x2e34(%rip),%rax
mov    (%rax),%edi
movss  -0x14(%rbp),%xmm0
movss  -0x18(%rbp),%xmm1
lea    0xe4a(%rip),%rsi
call   1050 <fprintf@plt>
lea    0xe58(%rip),%rdi
lea    0xe55(%rip),%rsi
lea    -0x18(%rbp),%rdx
mov    $0x0,%al
call   1060 <getpar@plt>
mov    $0x0,%al
call   1070 <endpar@plt>
mov    0x2df5(%rip),%rax
mov    (%rax),%edi
movss  -0x14(%rbp),%xmm0
movss  -0x18(%rbp),%xmm1
lea    0xe0b(%rip),%rsi
call   1050 <fprintf@plt>
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r14
push   %rbx
sub    $0x18,%rsp
movl   $0x0,0x10(%rsp)
call   1030 <setpar@plt>
lea    0xe95(%rip),%rdi
lea    0xe95(%rip),%rsi
lea    0x10(%rsp),%rdx
xor    %eax,%eax
call   1060 <getpar@plt>
lea    0xc(%rsp),%rdi
call   1040 <subr@plt>
movss  0xc(%rsp),%xmm0
mov    0x2e4b(%rip),%rbx
mov    (%rbx),%edi
lea    0xe6b(%rip),%r14
mov    %r14,%rsi
call   1050 <fprintf@plt>
lea    0xe76(%rip),%rdi
lea    0xe73(%rip),%rsi
lea    0x14(%rsp),%rdx
xor    %eax,%eax
call   1060 <getpar@plt>
xor    %eax,%eax
call   1070 <endpar@plt>
mov    (%rbx),%edi
movss  0xc(%rsp),%xmm0
movss  0x14(%rsp),%xmm1
mov    %r14,%rsi
call   1050 <fprintf@plt>
xor    %eax,%eax
add    $0x18,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@.str = [7 x i8] c"ffault\00"
@.str.1 = [2 x i8] c"d\00"
@stderr = global i32 0
@.str.2 = [26 x i8] c"xlon= %13.5f lon= %13.5f\0A\00"
@.str.3 = [4 x i8] c"lon\00"
@.str.4 = [2 x i8] c"f\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca float
%7 = alloca float
%8 = alloca i32
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
store i32 0, i32* %8
%9 = load i32, i32* %4
%10 = load i8**, i8*** %5
%11 = call i32 @setpar(i32 %9, i8** %10)
%12 = call i32 (i8*, i8*, ...) @getpar(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0), i32* %8)
%13 = load i32, i32* %8
%14 = icmp eq i32 %13, 2
br i1 %14, label %15, label %17
15: ; preds = %2
%16 = call i32 @subr(float* %6)
br label %17
17: ; preds = %15, %2
%18 = load i32, i32* @stderr
%19 = load float, float* %6
%20 = load float, float* %7
%21 = call i32 @fprintf(i32 %18, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.2, i64 0, i64 0), float %19, float %20)
%22 = call i32 (i8*, i8*, ...) @getpar(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.3, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.4, i64 0, i64 0), float* %7)
%23 = call i32 (...) @endpar()
%24 = load i32, i32* @stderr
%25 = load float, float* %6
%26 = load float, float* %7
%27 = call i32 @fprintf(i32 %24, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.2, i64 0, i64 0), float %25, float %26)
%28 = load i32, i32* %3
ret i32 %28
}

LLVM IR (-O2):
@.str = [7 x i8] c"ffault\00"
@.str.1 = [2 x i8] c"d\00"
@stderr = global i32 0
@.str.2 = [26 x i8] c"xlon= %13.5f lon= %13.5f\0A\00"
@.str.3 = [4 x i8] c"lon\00"
@.str.4 = [2 x i8] c"f\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca float
%4 = alloca float
%5 = alloca i32
%6 = bitcast float* %3 to i8*
%7 = bitcast float* %4 to i8*
%8 = bitcast i32* %5 to i8*
store i32 0, i32* %5
%9 = tail call i32 @setpar(i32 %0, i8** %1)
%10 = call i32 (i8*, i8*, ...) @getpar(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0), i32* %5)
%11 = load i32, i32* %5
%12 = icmp eq i32 %11, 2
%13 = call i32 @subr(float* %3)
%14 = load float, float* %3
%15 = load i32, i32* @stderr
%16 = call i32 @fprintf(i32 %15, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.2, i64 0, i64 0), float %14, float undef)
%17 = call i32 (i8*, i8*, ...) @getpar(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.3, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.4, i64 0, i64 0), float* %4)
%18 = call i32 (...) @endpar()
%19 = load i32, i32* @stderr
%20 = load float, float* %3
%21 = load float, float* %4
%22 = call i32 @fprintf(i32 %19, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.2, i64 0, i64 0), float %20, float %21)
ret i32 0
}