#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*/ scanf(char *, ...);
void test_longlong(long long *x, unsigned long long *y) {
  scanf("%Ld", y);
  scanf("%Lu", y);
  scanf("%Lx", y);
  scanf("%Ld", x);
  scanf("%Lu", x);
  scanf("%Lx", x);
  scanf("%Ls", "hello");
}


x86 assembly (clang, -O0):
<test_longlong>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rsi
lea    0xed5(%rip),%rdi
mov    $0x0,%al
call   1030 <scanf@plt>
mov    -0x10(%rbp),%rsi
lea    0xec7(%rip),%rdi
mov    $0x0,%al
call   1030 <scanf@plt>
mov    -0x10(%rbp),%rsi
lea    0xeb9(%rip),%rdi
mov    $0x0,%al
call   1030 <scanf@plt>
mov    -0x8(%rbp),%rsi
lea    0xe9f(%rip),%rdi
mov    $0x0,%al
call   1030 <scanf@plt>
mov    -0x8(%rbp),%rsi
lea    0xe91(%rip),%rdi
mov    $0x0,%al
call   1030 <scanf@plt>
mov    -0x8(%rbp),%rsi
lea    0xe83(%rip),%rdi
mov    $0x0,%al
call   1030 <scanf@plt>
lea    0xe79(%rip),%rdi
lea    0xe76(%rip),%rsi
mov    $0x0,%al
call   1030 <scanf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_longlong>:
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
mov    %rsi,%rbx
mov    %rdi,%r14
lea    0xeda(%rip),%r15
mov    %r15,%rdi
xor    %eax,%eax
call   1030 <scanf@plt>
lea    0xecd(%rip),%r12
mov    %r12,%rdi
mov    %rbx,%rsi
xor    %eax,%eax
call   1030 <scanf@plt>
lea    0xebd(%rip),%r13
mov    %r13,%rdi
mov    %rbx,%rsi
xor    %eax,%eax
call   1030 <scanf@plt>
mov    %r15,%rdi
mov    %r14,%rsi
xor    %eax,%eax
call   1030 <scanf@plt>
mov    %r12,%rdi
mov    %r14,%rsi
xor    %eax,%eax
call   1030 <scanf@plt>
mov    %r13,%rdi
mov    %r14,%rsi
xor    %eax,%eax
call   1030 <scanf@plt>
lea    0xe86(%rip),%rdi
lea    0xe83(%rip),%rsi
xor    %eax,%eax
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
jmp    1030 <scanf@plt>

LLVM IR (-O0):
@.str = [4 x i8] c"%Ld\00"
@.str.1 = [4 x i8] c"%Lu\00"
@.str.2 = [4 x i8] c"%Lx\00"
@.str.3 = [4 x i8] c"%Ls\00"
@.str.4 = [6 x i8] c"hello\00"
define void @test_longlong(i64* %0, i64* %1) {
%3 = alloca i64*
%4 = alloca i64*
store i64* %0, i64** %3
store i64* %1, i64** %4
%5 = load i64*, i64** %4
%6 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i64* %5)
%7 = load i64*, i64** %4
%8 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i64* %7)
%9 = load i64*, i64** %4
%10 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0), i64* %9)
%11 = load i64*, i64** %3
%12 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i64* %11)
%13 = load i64*, i64** %3
%14 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i64* %13)
%15 = load i64*, i64** %3
%16 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0), i64* %15)
%17 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.3, i64 0, i64 0), i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.4, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [4 x i8] c"%Ld\00"
@.str.1 = [4 x i8] c"%Lu\00"
@.str.2 = [4 x i8] c"%Lx\00"
@.str.3 = [4 x i8] c"%Ls\00"
@.str.4 = [6 x i8] c"hello\00"
define void @test_longlong(i64* %0, i64* %1) {
%3 = tail call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i64* %1)
%4 = tail call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i64* %1)
%5 = tail call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0), i64* %1)
%6 = tail call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i64* %0)
%7 = tail call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i64* %0)
%8 = tail call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0), i64* %0)
%9 = tail call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.3, i64 0, i64 0), i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.4, i64 0, i64 0))
ret void
}