#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*/ printf(char *, ...);
int /*<<< orphan*/ scanf(char *, char *);
void readInputController(char genstand[], char placering[]) {
  printf("Hvad er navnet p%s genstanden?\nIndtast input => ", "å");
  scanf("%s", genstand);
  printf("Hvor er denne placeret?\nIndtast input => ");
  scanf("%s", placering);
}


x86 assembly (clang, -O0):
<readInputController>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
lea    0xec9(%rip),%rdi
lea    0xef3(%rip),%rsi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x8(%rbp),%rsi
lea    0xee4(%rip),%rdi
call   1040 <scanf@plt>
lea    0xedb(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x10(%rbp),%rsi
lea    0xec6(%rip),%rdi
call   1040 <scanf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<readInputController>:
push   %r15
push   %r14
push   %rbx
mov    %rsi,%r14
mov    %rdi,%rbx
lea    0xece(%rip),%rdi
lea    0xef8(%rip),%rsi
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xeed(%rip),%r15
mov    %r15,%rdi
mov    %rbx,%rsi
call   1040 <scanf@plt>
lea    0xede(%rip),%rdi
xor    %eax,%eax
call   1030 <printf@plt>
mov    %r15,%rdi
mov    %r14,%rsi
pop    %rbx
pop    %r14
pop    %r15
jmp    1040 <scanf@plt>

LLVM IR (-O0):
@.str = [49 x i8] c"Hvad er navnet p%s genstanden?\0AIndtast input => \00"
@.str.1 = [3 x i8] c"\C3\A5\00"
@.str.2 = [3 x i8] c"%s\00"
@.str.3 = [42 x i8] c"Hvor er denne placeret?\0AIndtast input => \00"
define void @readInputController(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
store i8* %0, i8** %3
store i8* %1, i8** %4
%5 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([49 x i8], [49 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0))
%6 = load i8*, i8** %3
%7 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0), i8* %6)
%8 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([42 x i8], [42 x i8]* @.str.3, i64 0, i64 0))
%9 = load i8*, i8** %4
%10 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0), i8* %9)
ret void
}

LLVM IR (-O2):
@.str = [49 x i8] c"Hvad er navnet p%s genstanden?\0AIndtast input => \00"
@.str.1 = [3 x i8] c"\C3\A5\00"
@.str.2 = [3 x i8] c"%s\00"
@.str.3 = [42 x i8] c"Hvor er denne placeret?\0AIndtast input => \00"
define void @readInputController(i8* %0, i8* %1) {
%3 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([49 x i8], [49 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0))
%4 = tail call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0), i8* %0)
%5 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([42 x i8], [42 x i8]* @.str.3, i64 0, i64 0))
%6 = tail call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0), i8* %1)
ret void
}