#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*/ explode_bomb();
int sscanf(char *, char *, int *, int *, int *, int *, int *, int *);
void read_six_numbers(char *input, int *numbers) {
  int numScanned = sscanf(input, "%d %d %d %d %d %d", numbers, numbers + 1,
                          numbers + 2, numbers + 3, numbers + 4, numbers + 5);
  if (numScanned < 6)
    explode_bomb();
}


x86 assembly (clang, -O0):
<read_six_numbers>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rdx
mov    -0x10(%rbp),%rcx
add    $0x4,%rcx
mov    -0x10(%rbp),%r8
add    $0x8,%r8
mov    -0x10(%rbp),%r9
add    $0xc,%r9
mov    -0x10(%rbp),%r10
add    $0x10,%r10
mov    -0x10(%rbp),%rax
add    $0x14,%rax
lea    0xe99(%rip),%rsi
mov    %r10,(%rsp)
mov    %rax,0x8(%rsp)
call   1040 <sscanf@plt>
mov    %eax,-0x14(%rbp)
cmpl   $0x6,-0x14(%rbp)
jge    1189 <read_six_numbers+0x69>
mov    $0x0,%al
call   1030 <explode_bomb@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<read_six_numbers>:
push   %rax
mov    %rsi,%rdx
lea    0x4(%rsi),%rcx
lea    0x8(%rsi),%r8
lea    0xc(%rsi),%r9
lea    0x10(%rsi),%r10
lea    0x14(%rsi),%rax
lea    0xec1(%rip),%rsi
push   %rax
push   %r10
call   1040 <sscanf@plt>
add    $0x10,%rsp
cmp    $0x5,%eax
jg     1158 <read_six_numbers+0x38>
xor    %eax,%eax
pop    %rcx
jmp    1030 <explode_bomb@plt>
pop    %rax
ret

LLVM IR (-O0):
@.str = [18 x i8] c"%d %d %d %d %d %d\00"
define void @read_six_numbers(i8* %0, i32* %1) {
%3 = alloca i8*
%4 = alloca i32*
%5 = alloca i32
store i8* %0, i8** %3
store i32* %1, i32** %4
%6 = load i8*, i8** %3
%7 = load i32*, i32** %4
%8 = load i32*, i32** %4
%9 = getelementptr inbounds i32, i32* %8, i64 1
%10 = load i32*, i32** %4
%11 = getelementptr inbounds i32, i32* %10, i64 2
%12 = load i32*, i32** %4
%13 = getelementptr inbounds i32, i32* %12, i64 3
%14 = load i32*, i32** %4
%15 = getelementptr inbounds i32, i32* %14, i64 4
%16 = load i32*, i32** %4
%17 = getelementptr inbounds i32, i32* %16, i64 5
%18 = call i32 @sscanf(i8* %6, i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0), i32* %7, i32* %9, i32* %11, i32* %13, i32* %15, i32* %17)
store i32 %18, i32* %5
%19 = load i32, i32* %5
%20 = icmp slt i32 %19, 6
br i1 %20, label %21, label %23
21: ; preds = %2
%22 = call i32 (...) @explode_bomb()
br label %23
23: ; preds = %21, %2
ret void
}

LLVM IR (-O2):
@.str = [18 x i8] c"%d %d %d %d %d %d\00"
define void @read_six_numbers(i8* nocapture %0, i32* %1) {
%3 = getelementptr inbounds i32, i32* %1, i64 1
%4 = getelementptr inbounds i32, i32* %1, i64 2
%5 = getelementptr inbounds i32, i32* %1, i64 3
%6 = getelementptr inbounds i32, i32* %1, i64 4
%7 = getelementptr inbounds i32, i32* %1, i64 5
%8 = tail call i32 @sscanf(i8* %0, i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0), i32* %1, i32* %3, i32* %4, i32* %5, i32* %6, i32* %7)
%9 = icmp slt i32 %8, 6
br i1 %9, label %10, label %12
10: ; preds = %2
%11 = tail call i32 (...) @explode_bomb()
br label %12
12: ; preds = %10, %2
ret void
}