#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 atomic_shell_getn1(double, int /*<<< orphan*/ *);
int atomic_shell_getn(double Z, double A) {
  int n;
  if ((Z == 11.) && (A == 22.)) {
    n = atomic_shell_getn1(6, NULL);
    n += atomic_shell_getn1(8, NULL);
    n += atomic_shell_getn1(20, NULL);
  } else {
    n = atomic_shell_getn1(Z, NULL);
  }
  return n;
}


x86 assembly (clang, -O0):
<atomic_shell_getn>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  -0x8(%rbp),%xmm0
movsd  0xed1(%rip),%xmm1
ucomisd %xmm1,%xmm0
jne    11a3 <atomic_shell_getn+0x93>
jp     11a3 <atomic_shell_getn+0x93>
movsd  -0x10(%rbp),%xmm0
movsd  0xebc(%rip),%xmm1
ucomisd %xmm1,%xmm0
jne    11a3 <atomic_shell_getn+0x93>
jp     11a3 <atomic_shell_getn+0x93>
movsd  0xebc(%rip),%xmm0
xor    %eax,%eax
mov    %eax,%edi
call   1030 <atomic_shell_getn1@plt>
mov    %eax,-0x14(%rbp)
movsd  0xea0(%rip),%xmm0
xor    %eax,%eax
mov    %eax,%edi
call   1030 <atomic_shell_getn1@plt>
add    -0x14(%rbp),%eax
mov    %eax,-0x14(%rbp)
movsd  0xe81(%rip),%xmm0
xor    %eax,%eax
mov    %eax,%edi
call   1030 <atomic_shell_getn1@plt>
add    -0x14(%rbp),%eax
mov    %eax,-0x14(%rbp)
jmp    11b4 <atomic_shell_getn+0xa4>
movsd  -0x8(%rbp),%xmm0
xor    %eax,%eax
mov    %eax,%edi
call   1030 <atomic_shell_getn1@plt>
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<atomic_shell_getn>:
push   %rbp
push   %rbx
push   %rax
ucomisd 0xee5(%rip),%xmm0
jne    1167 <atomic_shell_getn+0x57>
jp     1167 <atomic_shell_getn+0x57>
ucomisd 0xee1(%rip),%xmm1
jne    1167 <atomic_shell_getn+0x57>
jp     1167 <atomic_shell_getn+0x57>
movsd  0xedd(%rip),%xmm0
xor    %edi,%edi
call   1030 <atomic_shell_getn1@plt>
mov    %eax,%ebx
movsd  0xed4(%rip),%xmm0
xor    %edi,%edi
call   1030 <atomic_shell_getn1@plt>
mov    %eax,%ebp
add    %ebx,%ebp
movsd  0xec9(%rip),%xmm0
xor    %edi,%edi
call   1030 <atomic_shell_getn1@plt>
add    %ebp,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret
xor    %edi,%edi
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    1030 <atomic_shell_getn1@plt>

LLVM IR (-O0):
define i32 @atomic_shell_getn(double %0, double %1) {
%3 = alloca double
%4 = alloca double
%5 = alloca i32
store double %0, double* %3
store double %1, double* %4
%6 = load double, double* %3
%7 = fcmp oeq double %6, 1.100000e+01
br i1 %7, label %8, label %19
8: ; preds = %2
%9 = load double, double* %4
%10 = fcmp oeq double %9, 2.200000e+01
br i1 %10, label %11, label %19
11: ; preds = %8
%12 = call i32 @atomic_shell_getn1(double 6.000000e+00, i32* null)
store i32 %12, i32* %5
%13 = call i32 @atomic_shell_getn1(double 8.000000e+00, i32* null)
%14 = load i32, i32* %5
%15 = add nsw i32 %14, %13
store i32 %15, i32* %5
%16 = call i32 @atomic_shell_getn1(double 2.000000e+01, i32* null)
%17 = load i32, i32* %5
%18 = add nsw i32 %17, %16
store i32 %18, i32* %5
br label %22
19: ; preds = %8, %2
%20 = load double, double* %3
%21 = call i32 @atomic_shell_getn1(double %20, i32* null)
store i32 %21, i32* %5
br label %22
22: ; preds = %19, %11
%23 = load i32, i32* %5
ret i32 %23
}

LLVM IR (-O2):
define i32 @atomic_shell_getn(double %0, double %1) {
%3 = fcmp oeq double %0, 1.100000e+01
%4 = fcmp oeq double %1, 2.200000e+01
%5 = and i1 %3, %4
br i1 %5, label %6, label %12
6: ; preds = %2
%7 = tail call i32 @atomic_shell_getn1(double 6.000000e+00, i32* null)
%8 = tail call i32 @atomic_shell_getn1(double 8.000000e+00, i32* null)
%9 = add nsw i32 %8, %7
%10 = tail call i32 @atomic_shell_getn1(double 2.000000e+01, i32* null)
%11 = add nsw i32 %9, %10
br label %14
12: ; preds = %2
%13 = tail call i32 @atomic_shell_getn1(double %0, i32* null)
br label %14
14: ; preds = %12, %6
%15 = phi i32 [ %11, %6 ], [ %13, %12 ]
ret i32 %15
}