#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*/ setPosicionConflictoEnCuadrado(int **, int, int, int, int *);
scalar_t__ siTieneConflictoEnCuadradoEsEnLaMismaColumna(int *, int);
scalar_t__ tieneConflictoEnEstaColumna(int **, int, int);
int /*<<< orphan*/ tieneConflictoEnEstaFila(int **, int, int);
int hayConflictoSoloEnColumna(int sudoku[9][9], int ii, int jj, int candidato) {
  int posicionConflicto[2] = {10, 10};
  int *pPosicionConflicto = posicionConflicto;
  setPosicionConflictoEnCuadrado(sudoku, candidato, ii, jj, pPosicionConflicto);
  if (!tieneConflictoEnEstaFila(sudoku, ii, candidato) &&
      tieneConflictoEnEstaColumna(sudoku, jj, candidato) &&
      siTieneConflictoEnCuadradoEsEnLaMismaColumna(posicionConflicto, jj)) {
    return 1;
  }
  return 0;
}


x86 assembly (clang, -O0):
<hayConflictoSoloEnColumna>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x10(%rbp)
mov    %esi,-0x14(%rbp)
mov    %edx,-0x18(%rbp)
mov    %ecx,-0x1c(%rbp)
mov    0xea4(%rip),%rax
mov    %rax,-0x24(%rbp)
lea    -0x24(%rbp),%rax
mov    %rax,-0x30(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x1c(%rbp),%esi
mov    -0x14(%rbp),%edx
mov    -0x18(%rbp),%ecx
mov    -0x30(%rbp),%r8
call   1040 <setPosicionConflictoEnCuadrado@plt>
mov    -0x10(%rbp),%rdi
mov    -0x14(%rbp),%esi
mov    -0x1c(%rbp),%edx
call   1050 <tieneConflictoEnEstaFila@plt>
cmp    $0x0,%eax
jne    11d1 <hayConflictoSoloEnColumna+0x91>
mov    -0x10(%rbp),%rdi
mov    -0x18(%rbp),%esi
mov    -0x1c(%rbp),%edx
call   1030 <tieneConflictoEnEstaColumna@plt>
cmp    $0x0,%rax
je     11d1 <hayConflictoSoloEnColumna+0x91>
lea    -0x24(%rbp),%rdi
mov    -0x18(%rbp),%esi
call   1060 <siTieneConflictoEnCuadradoEsEnLaMismaColumna@plt>
cmp    $0x0,%rax
je     11d1 <hayConflictoSoloEnColumna+0x91>
movl   $0x1,-0x4(%rbp)
jmp    11d8 <hayConflictoSoloEnColumna+0x98>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<hayConflictoSoloEnColumna>:
push   %rbp
push   %r15
push   %r14
push   %rbx
push   %rax
mov    %ecx,%r15d
mov    %edx,%r14d
mov    %esi,%ebp
mov    %rdi,%rbx
movabs $0xa0000000a,%rax
mov    %rax,(%rsp)
mov    %rsp,%r8
mov    %ecx,%esi
mov    %ebp,%edx
mov    %r14d,%ecx
call   1040 <setPosicionConflictoEnCuadrado@plt>
mov    %rbx,%rdi
mov    %ebp,%esi
mov    %r15d,%edx
call   1050 <tieneConflictoEnEstaFila@plt>
test   %eax,%eax
je     118d <hayConflictoSoloEnColumna+0x4d>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
pop    %r15
pop    %rbp
ret
mov    %rbx,%rdi
mov    %r14d,%esi
mov    %r15d,%edx
call   1030 <tieneConflictoEnEstaColumna@plt>
test   %rax,%rax
je     1180 <hayConflictoSoloEnColumna+0x40>
mov    %rsp,%rdi
mov    %r14d,%esi
call   1060 <siTieneConflictoEnCuadradoEsEnLaMismaColumna@plt>
mov    %rax,%rcx
mov    $0x1,%eax
test   %rcx,%rcx
jne    1182 <hayConflictoSoloEnColumna+0x42>
jmp    1180 <hayConflictoSoloEnColumna+0x40>

LLVM IR (-O0):
@__const.hayConflictoSoloEnColumna.posicionConflicto = [2 x i32] [i32 10, i32 10]
define i32 @hayConflictoSoloEnColumna([9 x i32]* %0, i32 %1, i32 %2, i32 %3) {
%5 = alloca i32
%6 = alloca [9 x i32]*
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32
%10 = alloca [2 x i32]
%11 = alloca i32*
store [9 x i32]* %0, [9 x i32]** %6
store i32 %1, i32* %7
store i32 %2, i32* %8
store i32 %3, i32* %9
%12 = bitcast [2 x i32]* %10 to i8*
%13 = getelementptr inbounds [2 x i32], [2 x i32]* %10, i64 0, i64 0
store i32* %13, i32** %11
%14 = load [9 x i32]*, [9 x i32]** %6
%15 = bitcast [9 x i32]* %14 to i32**
%16 = load i32, i32* %9
%17 = load i32, i32* %7
%18 = load i32, i32* %8
%19 = load i32*, i32** %11
%20 = call i32 @setPosicionConflictoEnCuadrado(i32** %15, i32 %16, i32 %17, i32 %18, i32* %19)
%21 = load [9 x i32]*, [9 x i32]** %6
%22 = bitcast [9 x i32]* %21 to i32**
%23 = load i32, i32* %7
%24 = load i32, i32* %9
%25 = call i32 @tieneConflictoEnEstaFila(i32** %22, i32 %23, i32 %24)
%26 = icmp ne i32 %25, 0
br i1 %26, label %40, label %27
27: ; preds = %4
%28 = load [9 x i32]*, [9 x i32]** %6
%29 = bitcast [9 x i32]* %28 to i32**
%30 = load i32, i32* %8
%31 = load i32, i32* %9
%32 = call i64 @tieneConflictoEnEstaColumna(i32** %29, i32 %30, i32 %31)
%33 = icmp ne i64 %32, 0
br i1 %33, label %34, label %40
34: ; preds = %27
%35 = getelementptr inbounds [2 x i32], [2 x i32]* %10, i64 0, i64 0
%36 = load i32, i32* %8
%37 = call i64 @siTieneConflictoEnCuadradoEsEnLaMismaColumna(i32* %35, i32 %36)
%38 = icmp ne i64 %37, 0
br i1 %38, label %39, label %40
39: ; preds = %34
store i32 1, i32* %5
br label %41
40: ; preds = %34, %27, %4
store i32 0, i32* %5
br label %41
41: ; preds = %40, %39
%42 = load i32, i32* %5
ret i32 %42
}

LLVM IR (-O2):
define i32 @hayConflictoSoloEnColumna([9 x i32]* %0, i32 %1, i32 %2, i32 %3) {
%5 = alloca i64
%6 = bitcast i64* %5 to i8*
store i64 42949672970, i64* %5
%7 = bitcast i64* %5 to i32*
%8 = bitcast [9 x i32]* %0 to i32**
%9 = call i32 @setPosicionConflictoEnCuadrado(i32** %8, i32 %3, i32 %1, i32 %2, i32* %7)
%10 = call i32 @tieneConflictoEnEstaFila(i32** %8, i32 %1, i32 %3)
%11 = icmp eq i32 %10, 0
br i1 %11, label %12, label %18
12: ; preds = %4
%13 = call i64 @tieneConflictoEnEstaColumna(i32** %8, i32 %2, i32 %3)
%14 = icmp eq i64 %13, 0
br i1 %14, label %18, label %15
15: ; preds = %12
%16 = call i64 @siTieneConflictoEnCuadradoEsEnLaMismaColumna(i32* %7, i32 %2)
%17 = icmp eq i64 %16, 0
br i1 %17, label %18, label %19
18: ; preds = %15, %12, %4
br label %19
19: ; preds = %15, %18
%20 = phi i32 [ 0, %18 ], [ 1, %15 ]
ret i32 %20
}