#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 */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ parse_read_char(int /*<<< orphan*/ *, char);
int /*<<< orphan*/ parse_read_int(int /*<<< orphan*/ *);
int /*<<< orphan*/ parse_read_space(int /*<<< orphan*/ *);
int parse_expense(FILE *f) {
  int amount_dec = 0;
  int amount_frac = 0;
  int date_year = 0;
  int date_month = 0;
  int date_day = 0;
  parse_read_space(f);
  parse_read_int(f);
  parse_read_char(f, '.');
  parse_read_int(f);
  parse_read_space(f);
  parse_read_int(f);
  parse_read_char(f, '-');
  parse_read_int(f);
  parse_read_char(f, '-');
  parse_read_int(f);
  parse_read_space(f);
  return 0;
}


x86 assembly (clang, -O0):
<parse_expense>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
movl   $0x0,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
movl   $0x0,-0x18(%rbp)
movl   $0x0,-0x1c(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <parse_read_space@plt>
mov    -0x8(%rbp),%rdi
call   1050 <parse_read_int@plt>
mov    -0x8(%rbp),%rdi
mov    $0x2e,%esi
call   1030 <parse_read_char@plt>
mov    -0x8(%rbp),%rdi
call   1050 <parse_read_int@plt>
mov    -0x8(%rbp),%rdi
call   1040 <parse_read_space@plt>
mov    -0x8(%rbp),%rdi
call   1050 <parse_read_int@plt>
mov    -0x8(%rbp),%rdi
mov    $0x2d,%esi
call   1030 <parse_read_char@plt>
mov    -0x8(%rbp),%rdi
call   1050 <parse_read_int@plt>
mov    -0x8(%rbp),%rdi
mov    $0x2d,%esi
call   1030 <parse_read_char@plt>
mov    -0x8(%rbp),%rdi
call   1050 <parse_read_int@plt>
mov    -0x8(%rbp),%rdi
call   1040 <parse_read_space@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<parse_expense>:
push   %rbx
mov    %rdi,%rbx
call   1040 <parse_read_space@plt>
mov    %rbx,%rdi
call   1050 <parse_read_int@plt>
mov    %rbx,%rdi
mov    $0x2e,%esi
call   1030 <parse_read_char@plt>
mov    %rbx,%rdi
call   1050 <parse_read_int@plt>
mov    %rbx,%rdi
call   1040 <parse_read_space@plt>
mov    %rbx,%rdi
call   1050 <parse_read_int@plt>
mov    %rbx,%rdi
mov    $0x2d,%esi
call   1030 <parse_read_char@plt>
mov    %rbx,%rdi
call   1050 <parse_read_int@plt>
mov    %rbx,%rdi
mov    $0x2d,%esi
call   1030 <parse_read_char@plt>
mov    %rbx,%rdi
call   1050 <parse_read_int@plt>
mov    %rbx,%rdi
call   1040 <parse_read_space@plt>
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
define i32 @parse_expense(i32* %0) {
%2 = alloca i32*
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
store i32* %0, i32** %2
store i32 0, i32* %3
store i32 0, i32* %4
store i32 0, i32* %5
store i32 0, i32* %6
store i32 0, i32* %7
%8 = load i32*, i32** %2
%9 = call i32 @parse_read_space(i32* %8)
%10 = load i32*, i32** %2
%11 = call i32 @parse_read_int(i32* %10)
%12 = load i32*, i32** %2
%13 = call i32 @parse_read_char(i32* %12, i8 signext 46)
%14 = load i32*, i32** %2
%15 = call i32 @parse_read_int(i32* %14)
%16 = load i32*, i32** %2
%17 = call i32 @parse_read_space(i32* %16)
%18 = load i32*, i32** %2
%19 = call i32 @parse_read_int(i32* %18)
%20 = load i32*, i32** %2
%21 = call i32 @parse_read_char(i32* %20, i8 signext 45)
%22 = load i32*, i32** %2
%23 = call i32 @parse_read_int(i32* %22)
%24 = load i32*, i32** %2
%25 = call i32 @parse_read_char(i32* %24, i8 signext 45)
%26 = load i32*, i32** %2
%27 = call i32 @parse_read_int(i32* %26)
%28 = load i32*, i32** %2
%29 = call i32 @parse_read_space(i32* %28)
ret i32 0
}

LLVM IR (-O2):
define i32 @parse_expense(i32* %0) {
%2 = tail call i32 @parse_read_space(i32* %0)
%3 = tail call i32 @parse_read_int(i32* %0)
%4 = tail call i32 @parse_read_char(i32* %0, i8 signext 46)
%5 = tail call i32 @parse_read_int(i32* %0)
%6 = tail call i32 @parse_read_space(i32* %0)
%7 = tail call i32 @parse_read_int(i32* %0)
%8 = tail call i32 @parse_read_char(i32* %0, i8 signext 45)
%9 = tail call i32 @parse_read_int(i32* %0)
%10 = tail call i32 @parse_read_char(i32* %0, i8 signext 45)
%11 = tail call i32 @parse_read_int(i32* %0)
%12 = tail call i32 @parse_read_space(i32* %0)
ret i32 0
}