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

/* Variables and functions */
int /*<<< orphan*/ get_token(struct tokenizer *);
int /*<<< orphan*/ to_long_double(struct tokenizer *, long double *);
int /*<<< orphan*/ tok_err(struct tokenizer *, char *);
long double get_long_double(struct tokenizer *t) {
  long double x;
  if (!get_token(t))
    tok_err(t, "Unexpected end of file");
  if (!to_long_double(t, &x))
    tok_err(t, "Expected "
               "long_double");
  return x;
}


x86 assembly (clang, -O0):
<get_long_double>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1050 <get_token@plt>
cmp    $0x0,%eax
jne    115e <get_long_double+0x2e>
mov    -0x8(%rbp),%rdi
lea    0xea7(%rip),%rsi
call   1030 <tok_err@plt>
mov    -0x8(%rbp),%rdi
lea    -0x20(%rbp),%rsi
call   1040 <to_long_double@plt>
cmp    $0x0,%eax
jne    1184 <get_long_double+0x54>
mov    -0x8(%rbp),%rdi
lea    0xe98(%rip),%rsi
call   1030 <tok_err@plt>
fldt   -0x20(%rbp)
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_long_double>:
push   %rbx
sub    $0x10,%rsp
mov    %rdi,%rbx
call   1050 <get_token@plt>
test   %eax,%eax
jne    1150 <get_long_double+0x20>
lea    0xeb8(%rip),%rsi
mov    %rbx,%rdi
call   1030 <tok_err@plt>
mov    %rsp,%rsi
mov    %rbx,%rdi
call   1040 <to_long_double@plt>
test   %eax,%eax
jne    116e <get_long_double+0x3e>
lea    0xeb1(%rip),%rsi
mov    %rbx,%rdi
call   1030 <tok_err@plt>
fldt   (%rsp)
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
%struct.tokenizer = type { i32 }
@.str = [23 x i8] c"Unexpected end of file\00"
@.str.1 = [21 x i8] c"Expected long_double\00"
define x86_fp80 @get_long_double(%struct.tokenizer* %0) {
%2 = alloca %struct.tokenizer*
%3 = alloca x86_fp80
store %struct.tokenizer* %0, %struct.tokenizer** %2
%4 = load %struct.tokenizer*, %struct.tokenizer** %2
%5 = call i32 @get_token(%struct.tokenizer* %4)
%6 = icmp ne i32 %5, 0
br i1 %6, label %10, label %7
7: ; preds = %1
%8 = load %struct.tokenizer*, %struct.tokenizer** %2
%9 = call i32 @tok_err(%struct.tokenizer* %8, i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str, i64 0, i64 0))
br label %10
10: ; preds = %7, %1
%11 = load %struct.tokenizer*, %struct.tokenizer** %2
%12 = call i32 @to_long_double(%struct.tokenizer* %11, x86_fp80* %3)
%13 = icmp ne i32 %12, 0
br i1 %13, label %17, label %14
14: ; preds = %10
%15 = load %struct.tokenizer*, %struct.tokenizer** %2
%16 = call i32 @tok_err(%struct.tokenizer* %15, i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.1, i64 0, i64 0))
br label %17
17: ; preds = %14, %10
%18 = load x86_fp80, x86_fp80* %3
ret x86_fp80 %18
}

LLVM IR (-O2):
%struct.tokenizer = type { i32 }
@.str = [23 x i8] c"Unexpected end of file\00"
@.str.1 = [21 x i8] c"Expected long_double\00"
define x86_fp80 @get_long_double(%struct.tokenizer* %0) {
%2 = alloca x86_fp80
%3 = bitcast x86_fp80* %2 to i8*
%4 = tail call i32 @get_token(%struct.tokenizer* %0)
%5 = icmp eq i32 %4, 0
br i1 %5, label %6, label %8
6: ; preds = %1
%7 = tail call i32 @tok_err(%struct.tokenizer* %0, i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str, i64 0, i64 0))
br label %8
8: ; preds = %6, %1
%9 = call i32 @to_long_double(%struct.tokenizer* %0, x86_fp80* %2)
%10 = icmp eq i32 %9, 0
br i1 %10, label %11, label %13
11: ; preds = %8
%12 = call i32 @tok_err(%struct.tokenizer* %0, i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.1, i64 0, i64 0))
br label %13
13: ; preds = %11, %8
%14 = load x86_fp80, x86_fp80* %2
ret x86_fp80 %14
}