#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*/ my_putstr(char *);
char *readLine();
int /*<<< orphan*/ read_user();
int /*<<< orphan*/ show_ingredients();
int /*<<< orphan*/ update_ingredients(char *, char *);
void update_qte() {
  char *name, *s_qte;
  my_putstr("    Quel ingredient voulez vous changer/ajouter ?\n    > ");
  name = readLine();
  my_putstr("    Combien y a t'il de ");
  my_putstr(name);
  my_putstr(" dans votre frigo ?\n    > ");
  s_qte = readLine();
  update_ingredients(name, s_qte);
  show_ingredients();
  read_user();
}


x86 assembly (clang, -O0):
<update_qte>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    0xea1(%rip),%rdi
call   1060 <my_putstr@plt>
mov    $0x0,%al
call   1050 <readLine@plt>
mov    %rax,-0x8(%rbp)
lea    0xec3(%rip),%rdi
call   1060 <my_putstr@plt>
mov    -0x8(%rbp),%rdi
call   1060 <my_putstr@plt>
lea    0xec7(%rip),%rdi
call   1060 <my_putstr@plt>
mov    $0x0,%al
call   1050 <readLine@plt>
mov    %rax,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1030 <update_ingredients@plt>
mov    $0x0,%al
call   1070 <show_ingredients@plt>
mov    $0x0,%al
call   1040 <read_user@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<update_qte>:
push   %rbx
lea    0xea8(%rip),%rdi
call   1060 <my_putstr@plt>
xor    %eax,%eax
call   1050 <readLine@plt>
mov    %rax,%rbx
lea    0xecb(%rip),%rdi
call   1060 <my_putstr@plt>
mov    %rbx,%rdi
call   1060 <my_putstr@plt>
lea    0xed0(%rip),%rdi
call   1060 <my_putstr@plt>
xor    %eax,%eax
call   1050 <readLine@plt>
mov    %rbx,%rdi
mov    %rax,%rsi
call   1030 <update_ingredients@plt>
xor    %eax,%eax
call   1070 <show_ingredients@plt>
xor    %eax,%eax
pop    %rbx
jmp    1040 <read_user@plt>

LLVM IR (-O0):
@.str = [57 x i8] c" Quel ingredient voulez vous changer/ajouter ?\0A > \00"
@.str.1 = [25 x i8] c" Combien y a t'il de \00"
@.str.2 = [27 x i8] c" dans votre frigo ?\0A > \00"
define void @update_qte() {
%1 = alloca i8*
%2 = alloca i8*
%3 = call i32 @my_putstr(i8* getelementptr inbounds ([57 x i8], [57 x i8]* @.str, i64 0, i64 0))
%4 = call i8* (...) @readLine()
store i8* %4, i8** %1
%5 = call i32 @my_putstr(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.1, i64 0, i64 0))
%6 = load i8*, i8** %1
%7 = call i32 @my_putstr(i8* %6)
%8 = call i32 @my_putstr(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.2, i64 0, i64 0))
%9 = call i8* (...) @readLine()
store i8* %9, i8** %2
%10 = load i8*, i8** %1
%11 = load i8*, i8** %2
%12 = call i32 @update_ingredients(i8* %10, i8* %11)
%13 = call i32 (...) @show_ingredients()
%14 = call i32 (...) @read_user()
ret void
}

LLVM IR (-O2):
@.str = [57 x i8] c" Quel ingredient voulez vous changer/ajouter ?\0A > \00"
@.str.1 = [25 x i8] c" Combien y a t'il de \00"
@.str.2 = [27 x i8] c" dans votre frigo ?\0A > \00"
define void @update_qte() {
%1 = tail call i32 @my_putstr(i8* getelementptr inbounds ([57 x i8], [57 x i8]* @.str, i64 0, i64 0))
%2 = tail call i8* (...) @readLine()
%3 = tail call i32 @my_putstr(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.1, i64 0, i64 0))
%4 = tail call i32 @my_putstr(i8* %2)
%5 = tail call i32 @my_putstr(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.2, i64 0, i64 0))
%6 = tail call i8* (...) @readLine()
%7 = tail call i32 @update_ingredients(i8* %2, i8* %6)
%8 = tail call i32 (...) @show_ingredients()
%9 = tail call i32 (...) @read_user()
ret void
}